Skip to content

Board token: agents need no board ID, changes are attributed to the analyst - #5

Merged
k3mpaxl merged 1 commit into
mainfrom
feature/board-token
Oct 6, 2026
Merged

k3mpaxl merged 1 commit into
mainfrom
feature/board-token

Conversation

@k3mpaxl

@k3mpaxl k3mpaxl commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Why

Agents connected with the token in the X-FactGraph-Token header still asked the analyst for the board ID and the token. The server instructions told them to ("the analyst gives you board ID and token"), and every agent tool had board_id as a required parameter. The token already names the board, though: each browser tab creates its own token for each board it opens.

What changed

  • Board from the token. MCP tools look up the board from the token (board_of_session).
    • The default agent tools no longer show board_id. One passed anyway (older prompts, the old suggested first message) is still accepted and must match the token, as before.
    • The full REST-parity profile shows board_id as optional, with a description.
    • A token whose tab is not open gets a clear 409: "No open board for this board token: ask the analyst to open the board…".
  • "Session token" → "board token" in the UI (menu, command palette, Connect dialog), README and MCP instructions.
    • This also ends the name clash with Entra session tokens (uti) in the attack-impact analysis; those texts are unchanged.
    • The MCP parameter is now board_token. session_token is still accepted but hidden from the schema. The header name is unchanged.
  • Attribution. The tab applying an agent's change knows its analyst, so the author is recorded as MCP (Gregor), REST (Gregor) or the agent's own name (Claude (Gregor)). Agent undo/redo are labelled the same way.
    • Notifications and evidence provenance render these as "Agent via MCP (Gregor)" and "Confirmed by an agent via MCP (Gregor)".
    • Older actions ("MCP") read "Agent via MCP" as before.
    • Enricher pushes with an analyst's token ("Enricher (Gregor)") are still classified as Enricher.
  • Connect dialog explains the token (yours, for this board, valid while this tab has it open; changes appear as yours). The suggested first message no longer contains a board ID.

For reviewers

  • Trust rules are unchanged: review kind and auto-confirmation depend on the channel (REST/MCP/Import), not on the author. The analyst's own file imports keep the exact author Import, which the auto-confirm rule relies on.
  • Hiding board_id/session_token only changes the advertised tool schema. FastMCP validates arguments against the function, which still accepts both.
  • The analyst name is the tab's display name, the same (self-chosen) name UI changes carry; it is not a verified identity.
  • The agent tool definitions stay at about 9,700 tokens (budget test unchanged).

Tests

  • Python: all 56 tests pass. The relay test covers an MCP call without board_id, a call that still passes it, a token without an open board, and that agent tool schemas show no board_id. Contract tests check the instructions and the parity profile.
  • Web unit tests: author attribution in notifications and provenance (onBehalf, agentText).
  • Playwright: full suite, 29 passed, 1 skipped. The notifications test checks that MCP and REST changes are stored as MCP (Test analyst) / REST (Test analyst), and the Connect dialog test checks that the prompt has no board ID.

🤖 Generated with Claude Code

…nalyst

Agents connected with the token in the X-FactGraph-Token header were asked for
the board ID and the token: the server instructions said so, and every agent
tool required board_id. The token already names the board (each browser tab
makes its own token for each board), so the server now takes the board from
it.

- Agent tools no longer show board_id; one passed anyway (older prompts) is
  accepted and must match the token. The full REST-parity profile shows it as
  optional. A token without an open tab gets a clear 409.
- "Session token" is now "board token" in the UI, docs and MCP instructions,
  and no longer shares a name with Entra session tokens (uti) in the impact
  analysis. The MCP parameter is board_token; session_token is still accepted
  but not shown.
- Changes an agent makes with an analyst's token are recorded as that
  analyst's agent: "MCP (Gregor)", "REST (Gregor)" or the agent's own name,
  "Claude (Gregor)". Notifications and evidence provenance read "Agent via MCP
  (Gregor)". Trust rules still depend only on the channel.
- The connect dialog explains the token and no longer puts a board ID into the
  suggested prompt. Agent tool budget unchanged (about 9,700 tokens).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@k3mpaxl
k3mpaxl merged commit 4c99e2d into main Oct 6, 2026
4 checks passed
@k3mpaxl k3mpaxl mentioned this pull request Oct 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant