import type { Agent } from '@deepseek-ai/dsh-agent'; import type { ToolCallId as CallId } from '@deepseek-ai/dsh-llm'; import type { ToolDefinition } from '@deepseek-ai/dsh-tools'; export interface ArkmeConversationalConfirmationRequired { status: 'confirmation_required'; question: string; expiresAtMillis: number; } type ToolArguments = Parameters[0]; type ToolExecution = Parameters[1]; type ToolExecutionResult = ReturnType; export interface ArkmeConfirmationContextHooks { /** Keep invocation intent separate from the business scope requiring approval. */ confirmationRequest?(args: ToolArguments): { arguments: unknown; forcePrepare: boolean; }; prepare(args: ToolArguments, exec: ToolExecution): PreparedContext | Promise; /** A read-only preparation may finish immediately when it contains no writes. */ question?(args: ToolArguments, preparedContext: PreparedContext): string | undefined; execute(args: ToolArguments, exec: ToolExecution, preparedContext: PreparedContext): ToolExecutionResult; } /** Adds Host-only prepare/commit state without exposing it in model arguments or Tool schemas. */ export declare function withArkmeConfirmationContext(definition: ToolDefinition, hooks: ArkmeConfirmationContextHooks): ToolDefinition; export declare function arkmeConfirmationContextHooks(definition: ToolDefinition): ArkmeConfirmationContextHooks | undefined; export declare const ARKME_CONVERSATIONAL_CONFIRMATION_PROMPT: string; export declare class ArkmeConversationalConfirmation { private readonly pending; private readonly running; private readonly now; private readonly confirmationTtlMillis; constructor(options?: { now?: () => number; confirmationTtlMillis?: number; }); prepareOrExecute(input: { agent: Agent; callId: CallId; rootCallId: CallId; operationKey: string; arguments: unknown; forcePrepare?: boolean; question: string | ((preparedContext: PreparedContext | undefined) => string | undefined); prepare?: () => PreparedContext | Promise; execute(preparedContext: PreparedContext | undefined): Promise; }): Promise; private prepare; private clearExpired; } export declare function hasLaterDirectUserMessage(agent: Agent, preparedAfterSeq: number): boolean; export declare function lastSessionSeq(agent: Agent): number; export {}; //# sourceMappingURL=conversational-confirmation.d.ts.map