/** * Elicitation Error Classes * * Errors related to MCP elicitation requests. */ import { PublicMcpError, InternalMcpError } from './mcp.error'; /** * Elicitation not supported error. * * Thrown when attempting to elicit from a client that does not support * elicitation, or when the transport is not available for elicitation. */ export declare class ElicitationNotSupportedError extends PublicMcpError { constructor(message?: string); } /** * Elicitation fallback required. * * Thrown when elicitation is requested but the client doesn't support the * standard elicitation protocol. This is NOT a failure error - it triggers * the fallback flow where the tool returns instructions to the LLM, and * the LLM uses the sendElicitationResult tool to continue. * * This error carries all context needed to re-invoke the tool when * the result arrives via sendElicitationResult. */ export declare class ElicitationFallbackRequired extends PublicMcpError { /** Unique identifier for this elicitation request */ readonly elicitId: string; /** Message to display to the user */ readonly elicitMessage: string; /** JSON Schema for the expected response */ readonly schema: Record; /** Name of the tool that requested elicitation */ readonly toolName: string; /** Original input arguments passed to the tool */ readonly toolInput: unknown; /** Time-to-live in milliseconds */ readonly ttl: number; constructor( /** Unique identifier for this elicitation request */ elicitId: string, /** Message to display to the user */ elicitMessage: string, /** JSON Schema for the expected response */ schema: Record, /** Name of the tool that requested elicitation */ toolName: string, /** Original input arguments passed to the tool */ toolInput: unknown, /** Time-to-live in milliseconds */ ttl: number); getPublicMessage(): string; } /** * Elicitation timeout error. * * Thrown when an elicitation request times out waiting for user response. * This error is thrown to kill the tool/agent execution memory and ensure * resources are properly cleaned up. */ export declare class ElicitationTimeoutError extends PublicMcpError { /** The ID of the timed-out elicitation request */ readonly elicitId: string; /** The TTL that was exceeded (in milliseconds) */ readonly ttl: number; constructor(elicitId: string, ttl: number); getPublicMessage(): string; } /** * Elicitation store not initialized error. * * Thrown when attempting to access the elicitation store before scope initialization * has completed. Callers should await scope.ready before accessing elicitationStore. */ export declare class ElicitationStoreNotInitializedError extends InternalMcpError { constructor(); } /** * Elicitation disabled error. * * Thrown when attempting to use elicitation when it is disabled in server configuration. * To enable elicitation, set `elicitation: { enabled: true }` in @FrontMcp metadata. */ export declare class ElicitationDisabledError extends PublicMcpError { constructor(); getPublicMessage(): string; } /** * Elicitation encryption error. * * Thrown when encryption/decryption fails for elicitation data, * typically when sessionId is missing or key derivation fails. */ export declare class ElicitationEncryptionError extends InternalMcpError { readonly originalError?: Error; constructor(message: string, originalError?: Error); getInternalMessage(): string; } /** * Elicitation subscription error. * * Thrown when subscription to elicitation pub/sub channel fails. * This is distinct from timeout - it indicates a transport or infrastructure * failure rather than user non-response. */ export declare class ElicitationSubscriptionError extends InternalMcpError { /** The ID of the elicitation request that failed to subscribe */ readonly elicitId: string; /** The underlying error that caused the subscription failure */ readonly originalError?: Error; constructor(elicitId: string, originalError?: Error); getInternalMessage(): string; } //# sourceMappingURL=elicitation.error.d.ts.map