import { Static, Type } from "typebox"; import { Context } from "@deepseek-ai/cordis"; //#region src/schemas/mcpProjection.d.ts /** Schema revision of the neutral MCP projection shared across DoomPi packages. */ export declare const DOOM_MCP_PROJECTION_VERSION: 1; /** The portable MCP document revision represented by `agent-plugin-v1`. */ export declare const AGENT_PLUGIN_MCP_SCHEMA_URL: 'https://agent-plugins.org/schemas/1.0.0/mcp.schema.json'; /** Cordis service name for the immutable MCP projection of one Pi session. */ export declare const DOOM_MCP_PROJECTION_SERVICE = "doom/mcp-projection"; export declare const DoomMcpProjectionAllowlistSchema: Type.TObject<{ servers: Type.TOptional>; proxy: Type.TOptional>; }>; export declare const DoomMcpNativeProjectionSourceSchema: Type.TObject<{ sourceId: Type.TString; owner: Type.TUnion<[Type.TLiteral<"repository">, Type.TLiteral<"plugin">]>; format: Type.TLiteral<"native">; configPath: Type.TString; contentDigest: Type.TString; }>; export declare const DoomMcpAgentPluginProjectionSourceSchema: Type.TObject<{ sourceId: Type.TString; owner: Type.TLiteral<"plugin">; format: Type.TLiteral<"agent-plugin-v1">; configPath: Type.TString; contentDigest: Type.TString; pluginId: Type.TString; pluginRoot: Type.TString; pluginDataDirectory: Type.TString; mcpSchemaUrl: Type.TLiteral<"https://agent-plugins.org/schemas/1.0.0/mcp.schema.json">; }>; /** One native Doom layer or one portable Agent Plugin MCP document. */ export declare const DoomMcpProjectionSourceSchema: Type.TUnion<[Type.TObject<{ sourceId: Type.TString; owner: Type.TUnion<[Type.TLiteral<"repository">, Type.TLiteral<"plugin">]>; format: Type.TLiteral<"native">; configPath: Type.TString; contentDigest: Type.TString; }>, Type.TObject<{ sourceId: Type.TString; owner: Type.TLiteral<"plugin">; format: Type.TLiteral<"agent-plugin-v1">; configPath: Type.TString; contentDigest: Type.TString; pluginId: Type.TString; pluginRoot: Type.TString; pluginDataDirectory: Type.TString; mcpSchemaUrl: Type.TLiteral<"https://agent-plugins.org/schemas/1.0.0/mcp.schema.json">; }>]>; export declare const DoomMcpProjectionSchema: Type.TObject<{ version: Type.TLiteral<1>; enabled: Type.TBoolean; /** Content identity supplied by the projection producer. */ fingerprint: Type.TString; repoRoot: Type.TString; stagingDirectory: Type.TString; generatedConfigPath: Type.TOptional; sources: Type.TArray, Type.TLiteral<"plugin">]>; format: Type.TLiteral<"native">; configPath: Type.TString; contentDigest: Type.TString; }>, Type.TObject<{ sourceId: Type.TString; owner: Type.TLiteral<"plugin">; format: Type.TLiteral<"agent-plugin-v1">; configPath: Type.TString; contentDigest: Type.TString; pluginId: Type.TString; pluginRoot: Type.TString; pluginDataDirectory: Type.TString; mcpSchemaUrl: Type.TLiteral<"https://agent-plugins.org/schemas/1.0.0/mcp.schema.json">; }>]>>; allowlist: Type.TOptional>; proxy: Type.TOptional>; }>>; }>; type DeepReadonly = TValue extends ((...args: never[]) => unknown) ? TValue : TValue extends readonly (infer TItem)[] ? readonly DeepReadonly[] : TValue extends object ? { readonly [TKey in keyof TValue]: DeepReadonly; } : TValue; export type DoomMcpProjectionAllowlist = DeepReadonly>; export type DoomMcpNativeProjectionSource = DeepReadonly>; export type DoomMcpAgentPluginProjectionSource = DeepReadonly>; export type DoomMcpProjectionSource = DeepReadonly>; export type DoomMcpProjectionSourceFormat = DoomMcpProjectionSource['format']; export type DoomMcpProjection = DeepReadonly>; export interface DoomMcpProjectionService { readonly sessionId: string; readonly generation: string; getSnapshot(): DoomMcpProjection; } export interface DoomMcpProjectionServiceInput { readonly sessionId: string; readonly generation: string; readonly projection: DoomMcpProjection; } export interface DisabledDoomMcpProjectionInput { readonly repoRoot: string; readonly stagingDirectory: string; } /** Runtime guard used when a projection crosses a JSON persistence boundary. */ export declare function isDoomMcpProjection(value: unknown): value is DoomMcpProjection; /** * Builds the explicit fail-closed state used when a Doom session has no MCP * projection. The root and staging path remain visible for diagnostics, while * the empty source list prevents an MCP consumer from falling back to cwd. */ export declare function createDisabledDoomMcpProjection({ repoRoot, stagingDirectory }: DisabledDoomMcpProjectionInput): DoomMcpProjection; /** Creates a generation-bound, immutable Cordis service value. */ export declare function createDoomMcpProjectionService({ sessionId, generation, projection }: DoomMcpProjectionServiceInput): DoomMcpProjectionService; /** Reads the MCP projection provider from one Doom session's Cordis root. */ export declare function readDoomMcpProjectionService(root: Context): DoomMcpProjectionService | undefined; /** Reads the MCP projection provider or reports that the Doom session is incomplete. */ export declare function requireDoomMcpProjectionService(root: Context): DoomMcpProjectionService; //#endregion //# sourceMappingURL=mcpProjection.d.mts.map