PEP-23: MCP tool list and update_project_settings in the remote MCP test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7d1e354096
commit
5465238d1a
@ -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_epic", "create_goal", "create_project", "create_task", "decide_incident", "deploy", "get_incident", "get_incident_policy", "get_task", "list_epics", "list_goals", "list_inbox", "list_incidents", "list_members", "list_projects", "list_releases", "list_tasks", "move_task", "remove_member", "resolve_incident", "set_incident_policy", "set_project_visibility", "update_epic", "update_goal", "update_task"]);
|
||||
assert.deepEqual(tools.map((t) => t.name).sort(), ["add_member", "answer_question", "create_epic", "create_goal", "create_project", "create_task", "decide_incident", "deploy", "get_incident", "get_incident_policy", "get_project_settings", "get_task", "list_epics", "list_goals", "list_inbox", "list_incidents", "list_members", "list_projects", "list_releases", "list_tasks", "move_task", "remove_member", "resolve_incident", "set_incident_policy", "set_project_visibility", "update_epic", "update_goal", "update_project_settings", "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);
|
||||
|
||||
@ -124,6 +124,11 @@ describe("PM tools over MCP", () => {
|
||||
assert.ok((await s.call("answer_question", { question_id: q.id, answer: "x" })).isError);
|
||||
|
||||
assert.match((await call("move_task", { task: `${p.key}-2`, to: "backlog" })).text, /1 session\(s\) stopped/);
|
||||
// PEP-23: autonomy settings of the project; strangers can't touch them.
|
||||
assert.match((await call("get_project_settings", { project: p.key })).text, /Уровень: Ручной/);
|
||||
assert.match((await call("update_project_settings", { project: p.key, level: "auto", proposal: "pm" })).text, /Уровень: Свой[\s\S]*каждый одобряет PM/);
|
||||
assert.ok((await s.call("update_project_settings", { project: p.key, level: "manual" })).isError);
|
||||
await call("update_project_settings", { project: p.key, level: "manual" });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user