feat(agent-bus): principal registry and inbox API (#2155 slice 1) #2156
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.44) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.44 · 268 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 99% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.335
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #2156"
general
weight: 0.35
chatgpt-codex-connector[bot]
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
Summary
Implements slice 1 of epic #2155: a dashboard-local principal registry and agent inbox API backed by
staff_runs.sqlite3and staff conversation threads (no parallel message store). Agents register with role, provider, node, and session id; heartbeats renew a lease; typed messages (request,status,handoff,blocked) require a repo plus issue or PR number, carry an idempotency key, and are mirrored onto the work-item thread. Auth reusescoordination.writeand the agent-token / fleet-peer bootstrap model; bearer tokens are never logged.Test plan
pytest tests/api/test_agent_bus_slice1.py(handoff AffineDrift#5117, Brick local Cursor register, expired lease 409, DbC 422)Handoff
cursor/agent-inbox-slice1-ccf8pytest tests/api/test_agent_bus_slice1.pygreen locally; OpenAPI/types regenerated viascripts/gen-api-client.shRelated: #2155 (epic; not closed by this slice).
<!-- CURSOR_AGENT_PR_BODY_END -->
<div><a href="https://cursor.com/agents/bc-6060f597-8e64-5fae-9cf0-54d619e6ccf8?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a href="https://cursor.com/background-agent?bcId=bc-6060f597-8e64-5fae-9cf0-54d619e6ccf8&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>