import type { CanonClient } from './client.js'; import type { CanonUnifiedDiff } from './types.js'; import type { ApprovalConfig, ApprovalNativeRequestMetadata, ApprovalResult, ApprovalRequestCategory, ApprovalRequestDetail, ApprovalRisk } from './approval-types.js'; import { RuntimeRequestManager } from './runtime-request-manager.js'; interface ApprovalRequestOpts { riskLevel?: 'normal' | 'destructive'; risk?: ApprovalRisk; category?: ApprovalRequestCategory; runtimeId?: string; turnId?: string; native?: ApprovalNativeRequestMetadata; toolSummary?: string; details?: ApprovalRequestDetail[]; /** File-change preview rendered inline on the approval card (size-disciplined automatically). */ diff?: CanonUnifiedDiff; ignoreSessionRules?: boolean; allowSessionRule?: boolean; /** Human conversation member who triggered this turn and should answer. */ responseUserId?: string; } /** * Platform-agnostic approval protocol for Canon. * * Now a thin `RuntimeRequestManager` subclass: the pending map, deadline timers, * the hybrid poll-plus-push loop, and cancellation live in the generalized * engine; approval-specific behaviour (session-rule fast path, redacted request * metadata, owner-authored outcome messages, and session-rule storage) is * expressed as a single `KindDescriptor`. Behaviour is preserved verbatim. */ export declare class ApprovalManager extends RuntimeRequestManager { private config; constructor(client: CanonClient, agentId: string, ownerId: string, config?: Partial); /** * Request approval for a tool call. * * 1. Checks session rules — may resolve immediately. * 2. Sends a message with approval card metadata. * 3. Waits for the owner's reply (or timeout). */ requestApproval(conversationId: string, toolName: string, toolInput: Record, opts?: ApprovalRequestOpts, runtimeOptions?: { signal?: AbortSignal; }): Promise; private buildApprovalDescriptor; } export {};