UNPKG

@civic/hub-bridge

Version:

Stdio <-> HTTP/SSE MCP bridge with Civic auth handling

20 lines 849 B
import { AbstractHook } from "@civic/hook-common"; import type { HookResponse, ToolCall, HookContext } from "@civic/hook-common"; /** * SessionRecoveryHook detects when the server has dropped the session * and automatically recreates the client connection. * * This hook monitors responses for the specific error message: * "Bad Request: No valid session ID provided or not an initialize request" * which indicates the server has lost the session. */ export declare class SessionRecoveryHook extends AbstractHook { private isRecovering; get name(): string; /** * Check if the error indicates a dropped session */ private isSessionDroppedError; processToolException(toolError: unknown, originalToolCall: ToolCall, context: HookContext): Promise<HookResponse>; } //# sourceMappingURL=session-recovery-hook.d.ts.map