feat(analysis): add provider-neutral persistent snapshots

This commit is contained in:
morluto
2026-07-14 04:18:38 +08:00
parent 179870e825
commit c439b9e778
28 changed files with 1707 additions and 343 deletions
+36
View File
@@ -0,0 +1,36 @@
import type { z } from "zod";
import type { JsonValue } from "../domain/jsonValue.js";
/** Caller-visible MCP execution hints. */
export interface ToolAnnotations {
readonly readOnlyHint: boolean;
readonly destructiveHint: boolean;
readonly idempotentHint: boolean;
readonly openWorldHint: boolean;
}
/** One validated example request for an MCP tool contract. */
export interface ToolExample {
readonly title: string;
readonly input: Readonly<Record<string, JsonValue>>;
}
/** Adapter family responsible for implementing a public MCP tool. */
export type ToolKind =
| "official-proxy"
| "enhanced"
| "native-provider"
| "artifact-provider"
| "session";
/** Single source of truth for a public MCP tool. */
export interface ToolContract<Name extends string = string> {
readonly name: Name;
readonly description: string;
readonly kind: ToolKind;
readonly inputSchema: z.ZodObject;
readonly outputSchema: z.ZodObject;
readonly annotations: ToolAnnotations;
readonly examples: readonly ToolExample[];
}