MCP: имя сервера accounting_automation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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: {} };
|
||||
|
||||
Reference in New Issue
Block a user