import { Static, TSchema, Type } from "typebox"; import { Context } from "@deepseek-ai/cordis"; //#region src/schemas/voiceTools.d.ts /** Voice-owned Cordis service for the live tool registrar and active session. */ export declare const DOOM_VOICE_TOOLS_SERVICE = "doom/voice-tools"; /** The two stable Pi tools that expose registered voice capabilities. */ export declare const VOICE_DESCRIBE_TOOL_NAME: 'describe_voice_tools'; export declare const VOICE_USE_TOOL_NAME: 'use_voice_tools'; export declare const VOICE_FACADE_TOOL_NAMES: readonly ["describe_voice_tools", "use_voice_tools"]; /** The standalone Pi tool owned by an active autonomous Voice session. */ export declare const VOICE_NARRATE_TOOL_NAME: 'narrate'; /** Every Pi tool whose availability is owned by autonomous Voice mode. */ export declare const VOICE_MODE_TOOL_NAMES: readonly ["describe_voice_tools", "use_voice_tools", "narrate"]; export declare const VOICE_TOOL_DEFAULT_TIMEOUT_MS = 10000; export declare const VOICE_TOOL_MAX_TIMEOUT_MS = 30000; export declare const VOICE_TOOL_MAX_BATCH_ITEMS = 16; export declare const VOICE_TOOL_MAX_INPUT_BYTES: number; export declare const VOICE_TOOL_MAX_BATCH_BYTES: number; export declare const VOICE_TOOL_MAX_SCHEMA_BYTES: number; export declare const VOICE_TOOL_MAX_JSON_DEPTH = 16; export declare const VOICE_TOOL_TERMINAL_OPERATION_LIMIT = 256; export declare const VOICE_TOOL_MAX_IDENTIFIER_LENGTH = 128; export declare const VOICE_TOOL_MAX_LABEL_LENGTH = 96; export declare const VOICE_TOOL_MAX_DESCRIPTION_LENGTH = 240; export declare const VOICE_TOOL_MAX_ERROR_MESSAGE_LENGTH = 240; export declare const VOICE_TOOL_MAX_DOMAIN_COUNT = 32; export declare const VOICE_TOOL_ERROR_CODE: { readonly hostUnavailable: 'VOICE_TOOL_HOST_UNAVAILABLE'; readonly inactive: 'VOICE_TOOL_INACTIVE'; readonly staleSession: 'VOICE_TOOL_STALE_SESSION'; readonly staleCatalog: 'VOICE_TOOL_STALE_CATALOG'; readonly notFound: 'VOICE_TOOL_NOT_FOUND'; readonly nameConflict: 'VOICE_TOOL_NAME_CONFLICT'; readonly invalidInput: 'VOICE_TOOL_INVALID_INPUT'; readonly invalidResult: 'VOICE_TOOL_INVALID_RESULT'; readonly executionFailed: 'VOICE_TOOL_EXECUTION_FAILED'; readonly timeout: 'VOICE_TOOL_TIMEOUT'; readonly aborted: 'VOICE_TOOL_ABORTED'; readonly cancelled: 'VOICE_TOOL_CANCELLED'; readonly registrationDisposed: 'VOICE_TOOL_REGISTRATION_DISPOSED'; readonly sessionShutdown: 'VOICE_TOOL_SESSION_SHUTDOWN'; readonly batchStopped: 'VOICE_TOOL_BATCH_STOPPED'; readonly reloadQueued: 'VOICE_TOOL_RELOAD_QUEUED'; readonly invalidRequest: 'VOICE_TOOL_INVALID_REQUEST'; }; export declare const VOICE_TOOL_HOST_UNAVAILABLE: "VOICE_TOOL_HOST_UNAVAILABLE"; export declare const VOICE_TOOL_INACTIVE: "VOICE_TOOL_INACTIVE"; export declare const VOICE_TOOL_STALE_SESSION: "VOICE_TOOL_STALE_SESSION"; export declare const VOICE_TOOL_STALE_CATALOG: "VOICE_TOOL_STALE_CATALOG"; export declare const VOICE_TOOL_NOT_FOUND: "VOICE_TOOL_NOT_FOUND"; export declare const VOICE_TOOL_NAME_CONFLICT: "VOICE_TOOL_NAME_CONFLICT"; export declare const VOICE_TOOL_INVALID_INPUT: "VOICE_TOOL_INVALID_INPUT"; export declare const VOICE_TOOL_INVALID_RESULT: "VOICE_TOOL_INVALID_RESULT"; export declare const VOICE_TOOL_TIMEOUT: "VOICE_TOOL_TIMEOUT"; export declare const VOICE_TOOL_ABORTED: "VOICE_TOOL_ABORTED"; export declare const VOICE_TOOL_EXECUTION_FAILED: "VOICE_TOOL_EXECUTION_FAILED"; export declare const VOICE_TOOL_BATCH_STOPPED: "VOICE_TOOL_BATCH_STOPPED"; export declare const VoiceToolDescriptorSchema: Type.TObject<{ source: Type.TString; id: Type.TString; name: Type.TString; label: Type.TString; description: Type.TString; order: Type.TInteger; inputSchema: Type.TUnknown; resultSchema: Type.TUnknown; timeoutMs: Type.TOptional; }>; export interface VoiceToolDescriptor { readonly source: string; readonly id: string; readonly name: string; readonly label: string; readonly description: string; readonly order: number; readonly inputSchema: TSchema; readonly resultSchema: TSchema; readonly timeoutMs?: number; } export declare const VoiceToolBatchCallSchema: Type.TObject<{ name: Type.TString; input: Type.TUnknown; }>; export type VoiceToolBatchCall = Static; export declare const VoiceToolDescribeInputSchema: Type.TObject<{ names: Type.TOptional>; }>; export type VoiceToolDescribeInput = Static; export declare const VoiceToolCatalogTokenSchema: Type.TString; export type VoiceToolCatalogToken = Static; export declare const VoiceToolUseInputSchema: Type.TObject<{ catalogToken: Type.TString; calls: Type.TArray>; }>; export type VoiceToolUseInput = Static; export declare const VoiceToolErrorCodeSchema: Type.TUnion<[Type.TLiteral<"VOICE_TOOL_HOST_UNAVAILABLE">, Type.TLiteral<"VOICE_TOOL_INACTIVE">, Type.TLiteral<"VOICE_TOOL_STALE_SESSION">, Type.TLiteral<"VOICE_TOOL_STALE_CATALOG">, Type.TLiteral<"VOICE_TOOL_NOT_FOUND">, Type.TLiteral<"VOICE_TOOL_NAME_CONFLICT">, Type.TLiteral<"VOICE_TOOL_INVALID_INPUT">, Type.TLiteral<"VOICE_TOOL_INVALID_RESULT">, Type.TLiteral<"VOICE_TOOL_EXECUTION_FAILED">, Type.TLiteral<"VOICE_TOOL_TIMEOUT">, Type.TLiteral<"VOICE_TOOL_ABORTED">, Type.TLiteral<"VOICE_TOOL_CANCELLED">, Type.TLiteral<"VOICE_TOOL_REGISTRATION_DISPOSED">, Type.TLiteral<"VOICE_TOOL_SESSION_SHUTDOWN">, Type.TLiteral<"VOICE_TOOL_BATCH_STOPPED">, Type.TLiteral<"VOICE_TOOL_RELOAD_QUEUED">, Type.TLiteral<"VOICE_TOOL_INVALID_REQUEST">]>; export type VoiceToolErrorCode = Static; export declare const VoiceToolErrorSchema: Type.TObject<{ code: Type.TUnion<[Type.TLiteral<"VOICE_TOOL_HOST_UNAVAILABLE">, Type.TLiteral<"VOICE_TOOL_INACTIVE">, Type.TLiteral<"VOICE_TOOL_STALE_SESSION">, Type.TLiteral<"VOICE_TOOL_STALE_CATALOG">, Type.TLiteral<"VOICE_TOOL_NOT_FOUND">, Type.TLiteral<"VOICE_TOOL_NAME_CONFLICT">, Type.TLiteral<"VOICE_TOOL_INVALID_INPUT">, Type.TLiteral<"VOICE_TOOL_INVALID_RESULT">, Type.TLiteral<"VOICE_TOOL_EXECUTION_FAILED">, Type.TLiteral<"VOICE_TOOL_TIMEOUT">, Type.TLiteral<"VOICE_TOOL_ABORTED">, Type.TLiteral<"VOICE_TOOL_CANCELLED">, Type.TLiteral<"VOICE_TOOL_REGISTRATION_DISPOSED">, Type.TLiteral<"VOICE_TOOL_SESSION_SHUTDOWN">, Type.TLiteral<"VOICE_TOOL_BATCH_STOPPED">, Type.TLiteral<"VOICE_TOOL_RELOAD_QUEUED">, Type.TLiteral<"VOICE_TOOL_INVALID_REQUEST">]>; message: Type.TString; retryable: Type.TOptional; }>; export type VoiceToolErrorPayload = Static; export declare const VoiceToolConflictDiagnosticSchema: Type.TObject<{ name: Type.TString; message: Type.TString; claims: Type.TArray>; }>; export type VoiceToolConflictDiagnostic = Static; export declare const VoiceToolCatalogEntrySchema: Type.TObject<{ source: Type.TString; id: Type.TString; name: Type.TString; label: Type.TString; description: Type.TString; order: Type.TInteger; inputSchema: Type.TUnknown; enabled: Type.TBoolean; }>; export type VoiceToolCatalogEntry = Static; export declare const VoiceToolCatalogSnapshotSchema: Type.TObject<{ hostGeneration: Type.TString; catalogRevision: Type.TInteger; catalogToken: Type.TString; tools: Type.TArray>; conflicts: Type.TArray>; }>>; unknownNames: Type.TArray; }>; export type VoiceToolCatalogSnapshot = Static; export declare const VoiceToolBatchItemResultSchema: Type.TObject<{ index: Type.TInteger; name: Type.TString; status: Type.TUnion<[Type.TLiteral<"completed">, Type.TLiteral<"failed">, Type.TLiteral<"cancelled">, Type.TLiteral<"not_executed">, Type.TLiteral<"preflight_failed">]>; result: Type.TOptional; error: Type.TOptional, Type.TLiteral<"VOICE_TOOL_INACTIVE">, Type.TLiteral<"VOICE_TOOL_STALE_SESSION">, Type.TLiteral<"VOICE_TOOL_STALE_CATALOG">, Type.TLiteral<"VOICE_TOOL_NOT_FOUND">, Type.TLiteral<"VOICE_TOOL_NAME_CONFLICT">, Type.TLiteral<"VOICE_TOOL_INVALID_INPUT">, Type.TLiteral<"VOICE_TOOL_INVALID_RESULT">, Type.TLiteral<"VOICE_TOOL_EXECUTION_FAILED">, Type.TLiteral<"VOICE_TOOL_TIMEOUT">, Type.TLiteral<"VOICE_TOOL_ABORTED">, Type.TLiteral<"VOICE_TOOL_CANCELLED">, Type.TLiteral<"VOICE_TOOL_REGISTRATION_DISPOSED">, Type.TLiteral<"VOICE_TOOL_SESSION_SHUTDOWN">, Type.TLiteral<"VOICE_TOOL_BATCH_STOPPED">, Type.TLiteral<"VOICE_TOOL_RELOAD_QUEUED">, Type.TLiteral<"VOICE_TOOL_INVALID_REQUEST">]>; message: Type.TString; retryable: Type.TOptional; }>>; }>; export type VoiceToolBatchItemResult = Static; export declare const VoiceToolBatchResultSchema: Type.TObject<{ status: Type.TUnion<[Type.TLiteral<"completed">, Type.TLiteral<"rejected">, Type.TLiteral<"cancelled">, Type.TLiteral<"stopped">]>; catalogToken: Type.TString; results: Type.TArray, Type.TLiteral<"failed">, Type.TLiteral<"cancelled">, Type.TLiteral<"not_executed">, Type.TLiteral<"preflight_failed">]>; result: Type.TOptional; error: Type.TOptional, Type.TLiteral<"VOICE_TOOL_INACTIVE">, Type.TLiteral<"VOICE_TOOL_STALE_SESSION">, Type.TLiteral<"VOICE_TOOL_STALE_CATALOG">, Type.TLiteral<"VOICE_TOOL_NOT_FOUND">, Type.TLiteral<"VOICE_TOOL_NAME_CONFLICT">, Type.TLiteral<"VOICE_TOOL_INVALID_INPUT">, Type.TLiteral<"VOICE_TOOL_INVALID_RESULT">, Type.TLiteral<"VOICE_TOOL_EXECUTION_FAILED">, Type.TLiteral<"VOICE_TOOL_TIMEOUT">, Type.TLiteral<"VOICE_TOOL_ABORTED">, Type.TLiteral<"VOICE_TOOL_CANCELLED">, Type.TLiteral<"VOICE_TOOL_REGISTRATION_DISPOSED">, Type.TLiteral<"VOICE_TOOL_SESSION_SHUTDOWN">, Type.TLiteral<"VOICE_TOOL_BATCH_STOPPED">, Type.TLiteral<"VOICE_TOOL_RELOAD_QUEUED">, Type.TLiteral<"VOICE_TOOL_INVALID_REQUEST">]>; message: Type.TString; retryable: Type.TOptional; }>>; }>>; errors: Type.TOptional, Type.TLiteral<"VOICE_TOOL_INACTIVE">, Type.TLiteral<"VOICE_TOOL_STALE_SESSION">, Type.TLiteral<"VOICE_TOOL_STALE_CATALOG">, Type.TLiteral<"VOICE_TOOL_NOT_FOUND">, Type.TLiteral<"VOICE_TOOL_NAME_CONFLICT">, Type.TLiteral<"VOICE_TOOL_INVALID_INPUT">, Type.TLiteral<"VOICE_TOOL_INVALID_RESULT">, Type.TLiteral<"VOICE_TOOL_EXECUTION_FAILED">, Type.TLiteral<"VOICE_TOOL_TIMEOUT">, Type.TLiteral<"VOICE_TOOL_ABORTED">, Type.TLiteral<"VOICE_TOOL_CANCELLED">, Type.TLiteral<"VOICE_TOOL_REGISTRATION_DISPOSED">, Type.TLiteral<"VOICE_TOOL_SESSION_SHUTDOWN">, Type.TLiteral<"VOICE_TOOL_BATCH_STOPPED">, Type.TLiteral<"VOICE_TOOL_RELOAD_QUEUED">, Type.TLiteral<"VOICE_TOOL_INVALID_REQUEST">]>; message: Type.TString; retryable: Type.TOptional; }>>>; }>; export type VoiceToolBatchResult = Static; export interface VoiceToolExecutionContext { readonly sessionId: string; readonly hostGeneration: string; readonly operationId: string; readonly batchIndex: number; readonly batchSize: number; readonly signal: AbortSignal; readonly context: Context; } export interface VoiceToolDefinition { readonly descriptor: VoiceToolDescriptor; execute(input: unknown, execution: VoiceToolExecutionContext): unknown; } export interface VoiceToolRegistrationHandle { readonly source: string; readonly id: string; readonly registrationGeneration: string; dispose(): void; } export interface VoiceToolSessionHandle { readonly sessionId: string; readonly hostGeneration: string; readonly active: boolean; setActive(active: boolean): void; subscribe(listener: () => void): () => void; describe(input?: VoiceToolDescribeInput): VoiceToolCatalogSnapshot; executeBatch(input: VoiceToolUseInput, context: Context, options?: VoiceToolExecuteOptions): Promise; useVoiceTools(input: VoiceToolUseInput, context: Context, options?: VoiceToolExecuteOptions): Promise; dispose(): void; } export interface VoiceToolExecuteOptions { readonly signal?: AbortSignal; readonly operationId?: string; } export interface VoiceToolRegistrationOptions { readonly sessionId?: string; readonly context?: Context; } export interface DoomVoiceToolsService { readonly generation: string; register(definition: VoiceToolDefinition, options?: VoiceToolRegistrationOptions): VoiceToolRegistrationHandle; bindSession(sessionId: string, context?: SessionContext): VoiceToolSessionHandle; readSession(sessionId: string): VoiceToolSessionHandle | undefined; subscribeSession(sessionId: string, listener: (session: VoiceToolSessionHandle | undefined) => void): () => void; dispose(): void; } declare module '@deepseek-ai/cordis' { interface Context { 'doom/voice-tools': DoomVoiceToolsService; } } export declare class VoiceToolError extends Error { readonly code: VoiceToolErrorCode; readonly retryable: boolean; constructor(code: VoiceToolErrorCode, message: string, retryable?: boolean); } /** Creates the Voice-owned live registrar and session service. */ export declare function createDoomVoiceToolsService(generation: string): DoomVoiceToolsService; export declare function readDoomVoiceToolsService(context: Context): DoomVoiceToolsService | undefined; export declare function requireDoomVoiceToolsService(context: Context): DoomVoiceToolsService; //#endregion //# sourceMappingURL=voiceTools.d.cts.map