Repository navigation
feat(mcp): board column tools for the dashboard MCP server - #15432
Conversation
|
👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review. When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically. |
ea7f38b to
9d9d9d2
Compare
|
Intent: Let an agent on the dashboard MCP server read the sidebar board, add a column for one existing tag, and move a column next to another, with the board's write endpoints refusing the same agent principals the tag vocabulary refuses. |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Confirm the breaking 403 fence on the pre-existing column write endpoints for app/crew callers is what #15425 asked for. The change follows the tag-vocabulary precedent exactly (same refusal, same budget shape, same channel/dispatch split, refusals at the endpoint layer rather than the tool), the writer-sweep claim checks out against the base tree (the board UI in [DESIGN-REVIEWED] ae8352e Description read[DESCRIPTION-READ] baa387668de15d99e6a2c44d8be2fafefe702a6bfbc655e4b7675124f4fd4f90 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Fable 5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify one reversal: the member gate's pinned exclusion of What this change shipsInventory (10 items, 1 more capped) — 10 justifiedIntent: let an agent list, add, and place board columns via the dashboard MCP server — an ADDITION.
Capped: an 11th item, [FIRST-PRINCIPLES-REVIEWED] ae8352e Description read[DESCRIPTION-READ] db35a37bb5ec65c3d0d49a75e5ee9aa0a6d134e31f5fcd55f5b4b710c9b74218 That sha256 names the PR description this verdict read. Recompute it with |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed Review detailsThe FINDING — src/kiro_crew/dashboard/chat_tags.py:1517 — [OPUS-REVIEWED] ae8352e |
|
|
|
|
9d9d9d2 to
a344662
Compare
|
Rebased: main moved in files this PR imports ( |
|
|
|
a344662 to
373a8b9
Compare
373a8b9 to
48e369e
Compare
|
Rebased: #15166 (session_end_wait) merged and conflicted in the tool lists and tool count in |
|
|
48e369e to
87767c9
Compare
chat_tag_column_list, chat_tag_column_create and chat_tag_column_move let an agent read the sidebar board, add a column for one existing tag, and move a column next to another. The four /api/chat/tag-columns write handlers apply _refuse_vocabulary_write, column create gets its own TAG_COLUMN_CREATE budget, the member chat-route gate admits GET on the list only, and the two writes are blocked for channel agents. Fixes kirodotdev#15425
87767c9 to
ae8352e
Compare
|
|
|
Rebased onto current main with the two GPT fixes answered above; CI re-running. The round-4 Windows shard 7 red was |
iamwhatever
left a comment
There was a problem hiding this comment.
Reviewed. Three tools (list, create with ensure, move with base_ids compare-and-set), no delete/rename/retag tool and a test pins that. _refuse_vocabulary_write is the first statement in all four chat_tags.py handlers (app agents and crew members get 403 app_forbidden); handlers/_shared.py admits members to GET only on the exact collection path, so /{id} and /order are refused at the gate too; channel: callers refused by the blocklist and again at dispatch. Names redacted, stripped, capped at 60; ambiguous name refused. TAG_COLUMN_CREATE rate limit charged only on an actual append from a non-dashboard source. Deleting a column removes only the view, never session tags.
Non-blocking: mcp_dashboard.py move builds base_ids from string ids only while the endpoint compares str(id), so a hand-edited non-string id would stale_base every move.
Problem / Motivation
Goal: An agent can list the sidebar board's columns, add a column for a tag, and move a column next to another, through the dashboard MCP server.
The board (the Trello-style columns behind
/api/chat/tag-columns) has no MCP tool. An agent that sorts its worker sessions withchat_tag_createandchat_tag_assigncannot see which columns exist, cannot add a column for a status tag it just created, and cannot place that column beside the related ones. The person does those steps by hand.Why it matters
Agents that already manage folders, tags and pins stop one step short of the board view the person reads. Every new status tag an agent coins needs a manual trip to the board UI before it shows up as a column.
Not a goal
include_untaggededits from MCP. Those remove or change a view the person built.What changed (motivation → approach → change)
Agents get three board tools in
mcp_dashboard.py(argument schemas invalidation.py), and the board's write endpoints refuse the same agent principals the tag vocabulary refuses.chat_tag_column_listGET /api/chat/tag-columnschat_tag_column_create(name, tag)POST /api/chat/tag-columnswithtag_ids: [tag]andensure: truechat_tag_column_move(column, before or after)PUT /api/chat/tag-columns/orderwith the full id list andbase_idsstale_baseThe board is the person's own layout and has no owner, like the tag vocabulary, so the tools follow the
chat_tag_createrules and the rules live in the endpoints. The four column write handlers inchat_tags.py(create, update, delete, reorder) call_refuse_vocabulary_write: an app agent or crew member gets 403app_forbidden, and a caller naming a closed slot getscaller_unattributable. Both new body fields are opt-in and decided under the board's write lock:ensurecloses the race where two agents creating the same column both append, andbase_idsstops a stale full order from overwriting the person's reorder. The board UI sends neither, so its behaviour is unchanged. Each column write records the real caller in the SEL audit (request_origin), so an agent's board change is not logged as the person's. Column create draws on its ownTAG_COLUMN_CREATEbudget, charged only when a column is actually appended so anensureretry costs nothing increate_rate_limit.py, the same size as the tag budget, and the browser stays exempt. The crew-member chat-route gate inhandlers/_shared.pyadmitsGET /api/chat/tag-columnsonly, so a member can list the board. The two writes are on the channel-agent blocklist inchannel.pyand are refused again at dispatch for achannel:caller, aschat_session_pinis.There is no delete or retag tool: either would remove a view the person built. The tools are withheld from the unattended conductor grant list in
agent.py, like the tag verbs.session-control.md(including the new budget and the channel block),docs/architecture/mcp.md,docs/index.mdandmcp_tool_titles.jsonname the three tools.mcp_dashboard.pyimportsselat module scope, as the top-level-imports rule asks.Backwards compatibility
Breaking: an app-scoped or crew-member caller can no longer create, update, delete or reorder board columns over
/api/chat/tag-columns(403app_forbidden), and an internal caller creating more than 10 columns in 5 minutes gets 429. Writer sweep on origin/main @ 31a6511: the only writers are the dashboard board UI (website/src/pages/chat-sidebar/board.ts, browser caller, unaffected) and tests; no MCP tool, app or crew path wrote the board before this PR, and crew members were already refused at the route gate.Tests
test/test_mcp_dashboard_tag_columns.py(new): list rendering and order, create body and the verified key, an existing column the endpoint returns reported as existing, unknown-tag and blank-name refusal, theapp_forbiddenmessage, the id order andbase_idsa move sends, thestale_basemessage, the untagged-column label, a hand-edited non-listtag_idsrendered instead of crashing, the no-change, self-anchor and empty-side cases, a shared column name refused rather than guessed, and the channel refusal for both writes.test/test_chat_tag_column_writers.py(new): every column write refuses an app, a member and a gone slot with the board unchanged; apps and members still read; the person keeps every write;ensureconverges on one column while a create without it still appends; a stalebase_idsis refused and a fresh one applied; the create budget holds for an internal caller and not for the browser, and anensureretry does not spend it;ensuredoes not match a column that also shows untagged sessions or one whose persistedtag_idsis not a list; an MCP-driven create, ensure hit and reorder are audited asmcp/kirocrew-dashboard.test/test_member_chat_folders_gate.py: the gate admitsGETon the column list and nothing else under/tag-columns.test/test_mcp_dashboard_registration.py: the granted set includes the three column tools.test/test_session_control_doc.py: the page quotes the board-column budget constant.test/test_mcp_dashboard_pin.pyandtest/test_mcp_dashboard_folders.py: patchselwhere it now lives, and list the three column tools in the advertised set.Manual verification
N/A — unit coverage sufficient: the tools are thin wrappers over existing endpoints whose behaviour is covered by the endpoint tests above, and there is no UI change.
Related Issues
Fixes #15425
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)