PEP-57: MCP tool list in the OAuth test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
59c3b583de
commit
c964a00c21
@ -503,7 +503,8 @@ describe("MCP для PM", () => {
|
||||
await bugsink.capture(c.api, { ...AMOUNT, value: "via mcp" });
|
||||
const i = await waitIncident(c, "TypeError: via mcp", (x) => x.status === "pending");
|
||||
assert.match(await call("list_incidents", { project: c.key, status: "pending" }), new RegExp(`#${i.id} \\[pending\\] TypeError: via mcp`));
|
||||
assert.match(await call("decide_incident", { id: i.id, action: "backlog" }), /created in the backlog/);
|
||||
assert.match(await call("decide_incident",
|
||||
"deploy", { id: i.id, action: "backlog" }), /created in the backlog/);
|
||||
assert.match(await call("resolve_incident", { id: i.id }), /Incident #\d+ resolved/);
|
||||
await waitFor("ask message closed", async () => pmMessages("via mcp").some((m) => m.text.includes("Решено (mock-pm): в бэклог")));
|
||||
});
|
||||
|
||||
@ -99,7 +99,7 @@ describe("PM tools over MCP", () => {
|
||||
await core.setProjectOwner(db, proj.id, owner.id);
|
||||
const { client, call } = await mcpAs(owner);
|
||||
const tools = (await client.listTools()).tools;
|
||||
assert.deepEqual(tools.map((t) => t.name).sort(), ["add_member", "answer_question", "create_goal", "create_project", "create_task", "decide_incident", "get_incident", "get_incident_policy", "get_task", "list_goals", "list_inbox", "list_incidents", "list_members", "list_projects", "list_tasks", "move_task", "remove_member", "resolve_incident", "set_incident_policy", "update_goal", "update_task"]);
|
||||
assert.deepEqual(tools.map((t) => t.name).sort(), ["add_member", "answer_question", "create_goal", "create_project", "create_task", "decide_incident", "deploy", "get_incident", "get_incident_policy", "get_task", "list_goals", "list_inbox", "list_incidents", "list_members", "list_projects", "list_releases", "list_tasks", "move_task", "remove_member", "resolve_incident", "set_incident_policy", "update_goal", "update_task"]);
|
||||
assert.equal(tools.find((t) => t.name === "list_tasks")?.annotations?.readOnlyHint, true);
|
||||
assert.equal(tools.find((t) => t.name === "move_task")?.annotations?.readOnlyHint, false);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user