Skip to content

Bridge S8 (#14374): console Messages + Agents surfaces over the unified pipeline - #14463

Merged
developing-today-fleet[bot] merged 3 commits into
mainfrom
felix/14374-console-messages-agents
Nov 24, 2026
Merged

developing-today-fleet[bot] merged 3 commits into
mainfrom
felix/14374-console-messages-agents

Conversation

@developing-today-fleet

@developing-today-fleet developing-today-fleet Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Bridge build-out S8 (#14374, design §4.9): the PM Stack console gains its Messages and Agents surfaces over the bridge's unified projections. Read-only slice — no send capability added (S9's composer) and no provisioning (S10).

What is here

Bridge worker (pkgs/message-bridge/worker)

  • Per-agent credential state: a fold over fleet_credential (state active/revoked, live scope union, service addr, mint/revocation times — hashes are never selected) at GET /api/<owner>/fleet/credentials, on both stores (Durable Object SQL + MemoryStore).
  • The read scope now also opens the unified projections at the credential address — GET /fleet/<credential>/pipeline, /directory, /credentials — answered by the very functions the owner's S2 routes use. Revoking stays an owner-token route: a service credential can see a revocation, never make one. Enroll-minted credentials (no read) and the shared fleet token still get the plain 404.

fleet bridge CLI (pkgs/fleet/crates/fleet-bridge)

  • New central verbs pipeline, directory, credentials, revoke (--agent | --identity), so the console speaks one argv on both transports, as S7 established. Per-verb help for each; the new value flags registered in VALUE_FLAGS.

Console (pm-stack/console)

  • Ops.pipelineFeed / directory / credentials / revokeCredential. The directory merges credential state in by agent name; a notes row's state derives from its token scopes (revoked tokens = both scopes off, identity keeps its directory place). Notes identities keep presence: "none" — nothing invented.
  • platformRead gains pipeline + directory; the edge gate treats them like messages (attempted only while the PM bridge credential is held). edgeRun's bridgeCall translates the three reads to the new credential routes and refuses revoke as a machine's; agent.revoke is HOLDABLE with an agent:<surface>:<name> ordering subject (edge-proto + outbox kept in step), so the owner's kill switch is held for a machine, never performed by the edge's read-scope credential.
  • App: a Messages screen under More (beside Agents) with kind / sender / receiver / surface / batch / unread / work-state filters and full provenance on every row — the owner's view is never sender-stripped; anonymity is what agents see. The Agents screen roster now comes from the unified directory (fleet + notes-only identities, surface chip, credential state) with a Revoke control per live agent, falling back to the fleet roster with a said-so note when the directory cannot be read. Work-state columns light up when S6 lands; the filter passes through today.

Acceptance, against the issue

  1. Agent→agent instruction in Messages with its real sender; sender filter exact — worker test "read scope: the pipeline through the PM credential shows every surface with its real sender" (fleet command agent:felix → agent:archer, connector instruction, note; sender filter asserted).
  2. Receiver + kind filters narrow across all three surfaces — the same worker test plus console "the pipeline read carries the owner's filters as the bridge's own flags".
  3. Notes-only agent in Agents, marked notes-only, no invented presence — worker directory test (muse/scout, presence: "none", last_seen: null) and console/edge directory tests.
  4. Revoking from Agents takes effect and the list reflects it — worker credential-state test (active → owner revoke → revoked, credential itself then 404s), console "the directory merges credential state in, and a revocation shows on the next read", edge test "a revoke is held for a machine, never done here".
  5. No agent-facing surface changes — agent routes untouched except the read-scope block's additions; the full pre-existing worker suite passes unchanged.

Verification (remote only, fleet-command on developing-today/fleet, target HEAD d1ed40ab9 named in every log)

  • Bridge worker: run 45431261508 — 104/104 pass (node --test via nix shell nixpkgs#nodejs_22), incl. the 6 new console-views tests by name.
  • Console: run 45431279039 — 653 pass / 0 fail across 26 files (bun test; baseline 648, +5 new), incl. the edge end-to-end test by name.
  • fleet-bridge: run 45431317511 — 18 passed / 0 failed (cargo test -p fleet-bridge).

First round (runs 45428706451 / 45428754116 / 45428774695) caught three defects, all fixed in d1ed40ab9: the feed method shadowed Ops' internal queue-store pipeline() (renamed pipelineFeed), the new CLI flags were missing from VALUE_FLAGS, and one worker-test expectation used the connector spelling for a note's sender.

Left unmerged for Felix's review. Refs #14374.

{
  "direct_parent": null,
  "links": [],
  "lineage": {
    "design": null,
    "roadmap_item": null,
    "priority": null
  },
  "pm_meta": 1,
  "provenance": {
    "queue_id": null,
    "scheduled_start": null,
    "picked_up_at": null,
    "work_started_at": null,
    "created_at": "2026-11-24T16:15:43Z",
    "session_id": null,
    "lane": null,
    "host": "htch-runtime",
    "worktree": "/home/hatch/workspace/issue-14374/wt",
    "model": null,
    "lane_start_issues": [],
    "workspace_ref": {
      "kind": "worktree",
      "id": "/home/hatch/workspace/issue-14374/wt",
      "repo": "developing-today/code",
      "branch": "felix/14374-console-messages-agents",
      "sha": "d1ed40ab94806e5a10813bf025ba83f798cd7deb"
    },
    "auth_subject": "felix",
    "stamped_by": "fleet 0.1.0 (native)"
  }
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

felix added 2 commits November 24, 2026 15:42
…ed pipeline

Bridge worker: per-agent credential state (fold over fleet_credential,
hashes never read out) at GET /api/<owner>/fleet/credentials, and the
read scope widened to the unified projections the console reads —
/fleet/<credential>/pipeline, /directory, /credentials — the same
functions the owner's routes answer with. Revoking stays owner-only.

fleet bridge CLI: new central verbs pipeline, directory, credentials
and revoke (--agent | --identity), so the console speaks one argv on
both transports, as S7 established.

Console: Ops.pipeline/directory/credentials/revokeCredential;
platformRead pipeline + directory; agent.revoke action (held for a
machine at the edge — the PM credential is read-scope and never
revokes); edge bridgeCall translations for the three reads and the
bridgeReady gate widened to them; Messages screen under More with
kind/sender/receiver/surface/batch/unread/work-state filters and full
provenance; Agents screen roster from the unified directory with
credential state and a Revoke control per agent.

Read-only slice: no send or provisioning added (S9/S10 own those).
- Ops: the bridge feed method is pipelineFeed — Ops already has an
  internal pipeline() for queue-store statements, and the feed method
  shadowed it for every board read (console suite, run 45428754116).
- fleet-bridge: register the new verbs' value flags in VALUE_FLAGS
  (--receiver, --surface, --batch, --work-state, --identity); the
  Args accessors assert on it (cargo suite, run 45428774695).
- worker test: a note's sender is its notes identity (user/drew),
  not the connector spelling (user:drew) (run 45428706451).
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 80f5778d-a0d7-4165-99f7-1abaadde83c2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

…essages-agents

# Conflicts:
#	pkgs/message-bridge/worker/README.md
#	pkgs/message-bridge/worker/src/fleet.js
@developing-today-fleet

Copy link
Copy Markdown
Contributor Author

agent-note:v1
worker: felix (merge-refresh lane)
state: merge-refreshed, verified, ready for Felix's merge

Merged current origin/main (6319ae854) into felix/14374-console-messages-agents; new head 642b70f7693587c68c21d00a769c89af349e669b (merge commit, no rebase). PR is now MERGEABLE / CLEAN. Two files conflicted; everything else auto-merged.

Conflicts and resolutions

  1. pkgs/message-bridge/worker/src/fleet.js — S5's offer-pool routes landed on main beside the route block S8 widened. Union: main's offers / offer / claim route blocks kept verbatim (incl. the claim block's sender-stripped projection of the delivered row), followed by S8's read-scope block — the wider condition (agents|messages|pipeline|directory|credentials), S8's fuller comment (revoke stays owner-only; enroll-minted credentials never hold read), and S8's handler body, which the merge had already carried through. No credential-scope, anonymity, or revoke semantics changed on either side.
  2. pkgs/message-bridge/worker/README.md — route-table rows only. Union: S8's four rows (owner GET /fleet/credentials + credential pipeline|directory|credentials) and main's five offer rows, with main's offer paragraph kept after the table.

Sanity after resolution: no duplicate definitions (pipelineFeed/unifiedAgents once in pipeline.js; fleetCredentialState once per store — SQL fold in fleet.js/index.js, memory impl in messages.js; offer store ops present in both stores); node --check clean on fleet.js.

Re-verification (remote only, fleet-command on developing-today/fleet; target HEAD 642b70f76… named in every log; all three runs completed success)

  • Worker: run 45435560747 — 114 pass / 0 fail (104 on the pre-merge head; the +10 are main's S5 offer + S6 tests now in the tree, all passing alongside S8's console-views tests).
  • Console: run 45435611607 — 653 pass / 0 fail, 26 files (unchanged from the pre-merge head, as expected).
  • fleet-bridge: run 45435637282 — 18 passed / 0 failed.

Not merged — left for Felix.

@developing-today-fleet
developing-today-fleet Bot merged commit 40b75e0 into main Nov 24, 2026
2 checks passed
@developing-today-fleet
developing-today-fleet Bot deleted the felix/14374-console-messages-agents branch November 24, 2026 16:47
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.

0 participants