import { type SecretRequestDelivery, type SecretRequestField } from '@xopcai/gateway-contract'; import type { AgentTool } from '@earendil-works/pi-agent-core'; export type RequestSecretPayload = { label: string; reason: string; url?: string; placeholder?: string; delivery: SecretRequestDelivery; fields?: SecretRequestField[]; supportsReference?: boolean; }; export type RequestSecretResult = { status: 'saved'; ref?: string; file?: string; files?: Record; } | { status: 'declined' | 'cancelled' | 'timed_out'; note?: string; } | { status: 'waiting'; requestId: string; expiresAt?: number; }; export type GatewaySecretRequestFn = (context: { conversationId: string; runId: string; toolCallId: string; }, request: RequestSecretPayload) => Promise; export interface RequestSecretToolDeps { resolveRequestSecret: (toolCallId: string) => ((request: RequestSecretPayload) => Promise) | null; savePastedSecret?: (toolCallId: string, input: { label: string; value: string; }) => Promise<{ file: string; }>; } export declare function createRequestSecretTool(deps: RequestSecretToolDeps): AgentTool;