Skip to main content

Classes

Interfaces

Type Aliases

McpReconciledCall

Ƭ McpReconciledCall: Object

Type declaration


McpTool

Ƭ McpTool: Object

Type declaration


McpRequestStatus

Ƭ McpRequestStatus: McpPresentedStatus | Exclude<McpRequestDecision, { kind: "accepted" | "accepted_result_omitted" }>

McpClient

Ƭ McpClient: Awaited<ReturnType<typeof connectMcp>>

McpConnectionOptions

Ƭ McpConnectionOptions: Object

Type declaration


RequestRef

Ƭ RequestRef: string & { __requestRef: unique symbol }

RequestAddress

Ƭ RequestAddress: Object Not exported: an exported type refers to it.

Type declaration


McpRequestScope

Ƭ McpRequestScope: Pick<RequestAddress, "resource" | "interaction">

McpOperationBinding

Ƭ McpOperationBinding: Object Not exported: an exported type refers to it.

Type declaration


McpRequestRecord

Ƭ McpRequestRecord: Object Persist before dispatch. An access session is deliberately absent.

Type declaration


McpRequestInput

Ƭ McpRequestInput: Omit<McpRequestRecord, "version" | "request_key" | "ref">

McpRequestDecision

Ƭ McpRequestDecision: { kind: "not_observed" } | { kind: "refused" ; refusal: { code: string ; message?: string } } | { kind: "expired" } | { kind: "accepted" ; invocation_id: string ; accepted_revision: string ; result?: unknown } | { kind: "accepted_result_omitted" ; invocation_id: string ; accepted_revision: string ; reason: "result_too_large" | "result_encoding_failed" } Native acceptance decisions are closed; business refusal codes are owned by the application’s operation and intentionally remain extensible.

Functions

withMcpDeadline

▸ withMcpDeadline<T>(execute, callerSignal?): Promise<T>

Type parameters

Parameters

Returns

Promise<T>

connectMcp

▸ connectMcp(options): Promise<{ interactionId: string ; dispose: () => void ; endInteraction: () => Promise<void> ; instructions: string ; reconcilePending: (options: { unaccepted?: "leave" | "refuse" }) => Promise<McpReconciledCall[]> ; discover: () => Promise<McpTool[]> ; call: (tool: string, inputArgs: Record<string, unknown>, executionInput?: { call: string ; signal?: AbortSignal }) => Promise<any> ; requests: { loadCall: (call: string) => Promise<McpRequestRecord | null> ; restoreCall: (call: string, snapshot: McpRequestRecord) => Promise<void> ; acknowledge: (ref: RequestRef) => Promise<void> ; refuse: (ref: RequestRef, options?: { signal?: AbortSignal }) => Promise<McpRequestDecision> ; recover: (ref: RequestRef, options?: { signal?: AbortSignal }) => Promise<McpRequestDecision> ; status: (ref: RequestRef, options?: { signal?: AbortSignal }) => Promise<McpRequestStatus> } }>

Parameters

Returns

Promise<{ interactionId: string ; dispose: () => void ; endInteraction: () => Promise<void> ; instructions: string ; reconcilePending: (options: { unaccepted?: "leave" | "refuse" }) => Promise<McpReconciledCall[]> ; discover: () => Promise<McpTool[]> ; call: (tool: string, inputArgs: Record<string, unknown>, executionInput?: { call: string ; signal?: AbortSignal }) => Promise<any> ; requests: { loadCall: (call: string) => Promise<McpRequestRecord | null> ; restoreCall: (call: string, snapshot: McpRequestRecord) => Promise<void> ; acknowledge: (ref: RequestRef) => Promise<void> ; refuse: (ref: RequestRef, options?: { signal?: AbortSignal }) => Promise<McpRequestDecision> ; recover: (ref: RequestRef, options?: { signal?: AbortSignal }) => Promise<McpRequestDecision> ; status: (ref: RequestRef, options?: { signal?: AbortSignal }) => Promise<McpRequestStatus> } }>