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
+23
View File
@@ -0,0 +1,23 @@
import type { McpServer } from "@modelcontextprotocol/server";
import type { BinarySessionPort } from "../application/BinarySession.js";
import { SESSION_TOOL_CONTRACTS } from "../contracts/toolContracts.js";
import { toCallToolResult } from "./toolResult.js";
/** Register the read-only provider and target status operation. */
export const registerSessionStatusTool = (
server: McpServer,
session: BinarySessionPort,
contract: (typeof SESSION_TOOL_CONTRACTS)[2],
): void => {
server.registerTool(
contract.name,
{
description: contract.description,
inputSchema: contract.inputSchema,
outputSchema: contract.outputSchema,
annotations: contract.annotations,
},
() => toCallToolResult({ ok: true, value: session.status() }, contract),
);
};