Repository navigation
bridge S10 (#14376): console provisioning — enroll + credential mints shown once, token state, revoke by agent - #14506
Merged
developing-today-fleet[bot] merged 3 commits intoNov 24, 2026
Conversation
added 3 commits
November 24, 2026 17:03
… shown once, token state, revoke by agent Worker: GET enroll-token state list (owner route + read-scope credential route) over a new enrollTokenList store op on both stores; states pending/used/expired/revoked folded with their closing times, never a hash or value. Revoke-by-agent on the enroll revoke route (the console's form: its list shows no hash); the hash/value forms stand. fleet-bridge: mint-enroll, enroll-tokens, revoke-enroll (--agent | --token-hash), mint-credential central verbs. Console: Agents screen gains Provisioning — new-agent enroll mint (token + exact enroll command shown once, in the DOM only, never in state/audit/outbox), direct credential mint (scopes, service binding), per-agent token state list, take-back of unused tokens. Mints are never HOLDABLE (their answer is the secret); the enroll revoke is, like agent.revoke. Edge reads enroll-tokens through the PM credential; the provisioning verbs are never translated there. Book: reference/bridge.md gains the four verbs.
…credential-address mint refusal with the console views' 405
…enroll/mint-credential
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
developing-today-fleet
Bot
deleted the
felix/14376-console-provisioning
branch
November 24, 2026 17:33
This was referenced Nov 24, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #14376
Bridge slice S10: the PM console provisioning surface. A new agent can now be onboarded from the console alone — mint a bootstrap enroll token, hand it off once, watch it close (used / expired / revoked), mint scoped credentials directly, and take tokens back — paired with S4's
fleet agent enroll --bootstrap.What changed
Worker (
pkgs/message-bridge/worker)enrollTokenListstore op on both stores (Durable Object SQL + MemoryStore), returning minted-token rows without the hash. State is folded from the row:pending/used(closed by the exchange) /expired(closed by the clock) /revoked(closed by the owner), with the mint binding (agent, kind, groups, notes_identity) and mint/expiry times.GET /api/<owner>/enroll-tokensand the read-scope twinGET /fleet/<credential>/enroll-tokens. Mint and revoke stay owner-only; the shared fleet token and non-read credentials get 404.{agent}: revokes every still-pending token for that agent, counted. The console list deliberately shows no hash, so the console revokes by name; the{bootstrap_token | token_hash}forms stand. Used tokens are untouched (they became credentials); expired ones keep their state.fleet-bridge CLI (
pkgs/fleet/crates/fleet-bridge)mint-enroll,enroll-tokens,revoke-enroll(exactly one of--agent/--token-hash, checked before any credential is resolved),mint-credential(scopes, optionalservice:<name>addr). Book:pkgs/fleet/book/reference/bridge.mdgained the four verb sections.Console (
pm-stack/console)enrollTokens,mintEnrollToken(validates names, ≤16 groups, TTL 60–604800 before anything runs),revokeEnrollTokens(by agent),mintCredential(scopes ⊆ inbox/send/read; a service addr must be the agent's own name).platformReadsectionenroll-tokens; the edgebridgeCalltranslates onlyenroll-tokensto the PM credential's read route — mints and revoke-enroll are never translated there. Actions:agent.mint-enroll,agent.mint-credential,agent.revoke-enroll.fleet agent enroll --name <name> --kind <kind> [--groups …] --bootstrap <token>command, with copy buttons and a Hide button; New credential form → same show-once card; per-token state list with closing time and what closed it, plus a Take back button on pending tokens. S8's roster Revoke is reused untouched.Show-once (the security bar)
The two mints are never HOLDABLE and never device-kept: a mint's answer is the secret, so holding it would lose it. Their audit records name only the binding, never the value.
agent.revoke-enrollis HOLDABLE (no value in it), subjectenroll:<agent>. A minted value lives only in the action result and the hand-off card's DOM node — never in Ops state, docs sections, audit, outbox, or argv/stdin — and any redraw (leaving the screen, refresh) removes it. Worker-side storage stays hash-only (S3 invariant unchanged).Deliberate non-change: enroll tokens still mint the exchange credential with S3's fixed scopes (
inbox, send); scoped mints are the directmint-credentialpath, per design §4.5. No new dependencies.Verification (remote only, fleet-command workflow on developing-today/fleet)
0bc58a967— 119 tests, 119 pass, 0 fail (baseline 114). New tests intest/provisioning.test.mjs, all passing by name: "the list shows each minted token's state and closing time, and never a hash or a value"; "the console path: a token minted for one name enrolls that name only, and the list follows it"; "revoking by agent name takes back that agent's pending tokens and no others"; "the read scope sees the same state list; plainer doors stay shut, and revoking stays the owner's"; "the Durable Object's SQL folds the same states, hash-free (store parity)".a7ce18947(later commits touched only worker/fleet-bridge files) — 654 pass / 0 fail, 26 files (baseline 653). New test: "provisioning: a mint's value reaches the caller once and is kept nowhere" — asserts the value is absent from console state, audit, and every recorded argv/stdin, the HOLDABLE split, and validation refusals before anything runs; plus edge/direct coverage thatenroll-tokensreads through the PM credential while mints are refused at the edge.5053555627b280a2f08b03654ced05901892b44b— 19 passed, 0 failed, command outcome success. New testprovisioning_verb_shapes(all four verbs' method/URL/body shapes) passing by name, withevery_verb_has_its_own_helpandusage_errors_exit_2_before_any_requestextended for the new verbs.Note: the worker/console/bridge runs' GitHub conclusions read "cancelled" where the lane cancelled the run after its Execute step completed, to release the full log from the known Post-Execute hang; each log carries the command's own outcome=success marker and the counts above.
Left open
work,pipeline,directory,credentials,revoke) were already undocumented inreference/bridge.mdbefore this slice.{ "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-24T17:27:12Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch/workspace/issue-14376/wt", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch/workspace/issue-14376/wt", "repo": "developing-today/code", "branch": "felix/14376-console-provisioning", "sha": "5053555627b280a2f08b03654ced05901892b44b" }, "auth_subject": "felix", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.