import { Static, Type } from "typebox"; import { Context } from "@deepseek-ai/cordis"; //#region src/schemas/mcpStatus.d.ts /** Session-scoped MCP status service owned by doompi-mcp. */ export declare const DOOM_MCP_STATUS_SERVICE = "doom/mcp-status"; /** * Connection state of one downstream MCP server. * * `not-connected` is the startup state: tools restored from the previous run's * catalog exist before any socket opens, and their server has not reported yet. * `disabled` comes from configuration rather than the connection stream, since a * disabled server is never dialled at all. */ export declare const McpServerStateSchema: Type.TUnion<[Type.TLiteral<"not-connected">, Type.TLiteral<"connecting">, Type.TLiteral<"connected">, Type.TLiteral<"degraded">, Type.TLiteral<"needs-auth">, Type.TLiteral<"failed">, Type.TLiteral<"closed">, Type.TLiteral<"disabled">]>; export type McpServerState = Static; export declare const McpServerSnapshotSchema: Type.TObject<{ name: Type.TString; state: Type.TUnion<[Type.TLiteral<"not-connected">, Type.TLiteral<"connecting">, Type.TLiteral<"connected">, Type.TLiteral<"degraded">, Type.TLiteral<"needs-auth">, Type.TLiteral<"failed">, Type.TLiteral<"closed">, Type.TLiteral<"disabled">]>; /** * Pi tool names registered for this server, exactly as registered. * * Published rather than derived: a consumer that reverse-engineers the link from * tool-name prefixes cannot attribute anything under an unprefixed naming scheme, * and guesses wrong whenever two servers share a prefix. */ tools: Type.TArray; resourceCount: Type.TInteger; /** Why the server is in `failed` or `needs-auth`; absent otherwise. */ error: Type.TOptional; }>; export type McpServerSnapshot = Static; export declare const McpStatusSnapshotSchema: Type.TObject<{ servers: Type.TArray, Type.TLiteral<"connecting">, Type.TLiteral<"connected">, Type.TLiteral<"degraded">, Type.TLiteral<"needs-auth">, Type.TLiteral<"failed">, Type.TLiteral<"closed">, Type.TLiteral<"disabled">]>; /** * Pi tool names registered for this server, exactly as registered. * * Published rather than derived: a consumer that reverse-engineers the link from * tool-name prefixes cannot attribute anything under an unprefixed naming scheme, * and guesses wrong whenever two servers share a prefix. */ tools: Type.TArray; resourceCount: Type.TInteger; /** Why the server is in `failed` or `needs-auth`; absent otherwise. */ error: Type.TOptional; }>>; }>; export type McpStatusSnapshot = Static; /** * The current MCP picture, with optional live change notifications. * * Consumers subscribe before reading the snapshot so startup ordering cannot * lose a change. Older providers remain readable through getSnapshot alone. * * No provider means MCP is not loaded for this session (`--no-mcp`), which times * out and is not an error. */ export interface DoomMcpStatusService { /** Fences consumers against a replaced MCP session. */ readonly generation: string; getSnapshot(): McpStatusSnapshot; /** Notifies after tool registration and status updates; returns listener cleanup. */ onChange?(listener: () => void): () => void; } declare module '@deepseek-ai/cordis' { interface Context { 'doom/mcp-status': DoomMcpStatusService; } } export declare function readDoomMcpStatus(context: Context): DoomMcpStatusService | undefined; //#endregion //# sourceMappingURL=mcpStatus.d.mts.map