import type { ClarificationPresentation } from '@xopcai/gateway-contract'; import type { AgentTool } from '@earendil-works/pi-agent-core'; export type ClarifyRequestPayload = ClarificationPresentation & { kind?: 'approval'; question: string; /** Stable hash of the exact operation guarded by an approval. */ approvalKey?: string; deviceInteraction?: import('@xopcai/gateway-contract').DeviceInteractionCheckpoint; deviceGrantRequest?: import('@xopcai/gateway-contract').DeviceGrantRequestCheckpoint; }; export type ClarifyRequestResult = { status: 'answered'; answer: string; } | { status: 'waiting'; waitId: string; expiresAt?: number; }; export type GatewayClarifyRequestFn = (context: { conversationId: string; runId: string; toolCallId: string; }, request: ClarifyRequestPayload) => Promise; export interface ClarifyToolDeps { /** Resolve a per-turn callback; returns null when clarification is unavailable. */ resolveAskUser: (toolCallId: string) => ((request: ClarifyRequestPayload) => Promise) | null; } export declare function createClarifyTool(deps: ClarifyToolDeps): AgentTool;