MCP: имя сервера accounting_automation
All checks were successful
ci / test (push) Successful in 39s
ci / deploy (push) Successful in 2m42s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 08:27:42 +03:00
parent b422309148
commit 22d87d8d01
2 changed files with 2 additions and 2 deletions

View File

@@ -241,7 +241,7 @@ d("MCP бухгалтерии (временная БД)", () => {
it("initialize, notifications/initialized, ping, tools/list", async () => {
const i = await post(bearer(TOKEN_A), rpc("initialize", { protocolVersion: "2025-03-26" }));
expect(i.statusCode).toBe(200);
expect(i.json().result.serverInfo.name).toBe("khb-accounting");
expect(i.json().result.serverInfo.name).toBe("accounting_automation");
expect((await post(bearer(TOKEN_A), { jsonrpc: "2.0", method: "notifications/initialized" })).statusCode).toBe(202);
expect(((await post(bearer(TOKEN_A), rpc("ping"))).json()).result).toEqual({});
const l = (await post(bearer(TOKEN_A), rpc("tools/list"))).json();

View File

@@ -399,7 +399,7 @@ export async function handleMcpMessage(tools: ReviewTools, personId: string, msg
switch (method) {
case "initialize": {
const asked = (msg.params as Json | undefined)?.protocolVersion;
return { jsonrpc: "2.0", id, result: { protocolVersion: typeof asked === "string" ? asked : "2025-03-26", capabilities: { tools: {} }, serverInfo: { name: "khb-accounting", version: "0.1.0" } } };
return { jsonrpc: "2.0", id, result: { protocolVersion: typeof asked === "string" ? asked : "2025-03-26", capabilities: { tools: {} }, serverInfo: { name: "accounting_automation", version: "0.1.0" } } };
}
case "ping":
return { jsonrpc: "2.0", id, result: {} };