@dotobokuri/fleet-console 1.5.4 → 1.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/AGENTS.md +17 -13
  2. package/README.md +8 -10
  3. package/dist/cli-bin.mjs +11158 -3571
  4. package/dist/cli.d.ts +2 -1
  5. package/dist/cli.mjs +11159 -3572
  6. package/dist/client/assets/{_baseUniq-D7ldFdBJ.js → _baseUniq-CpEjig2A.js} +1 -1
  7. package/dist/client/assets/{arc-DzMX4L00.js → arc-BmymS_Kz.js} +1 -1
  8. package/dist/client/assets/{architectureDiagram-Q4EWVU46-Bfe8XBF5.js → architectureDiagram-Q4EWVU46-D1d0KVz1.js} +1 -1
  9. package/dist/client/assets/{blockDiagram-DXYQGD6D-CL5UJtpO.js → blockDiagram-DXYQGD6D-Cwuv0sNk.js} +1 -1
  10. package/dist/client/assets/{c4Diagram-AHTNJAMY-BG1S-0a9.js → c4Diagram-AHTNJAMY-Bsk-GjC_.js} +1 -1
  11. package/dist/client/assets/channel--qpYuR58.js +1 -0
  12. package/dist/client/assets/{chunk-4BX2VUAB-fcrf3M4S.js → chunk-4BX2VUAB-ZM4i9T4D.js} +1 -1
  13. package/dist/client/assets/{chunk-4TB4RGXK-Bes4-UzB.js → chunk-4TB4RGXK-Sw5ODKRj.js} +1 -1
  14. package/dist/client/assets/{chunk-55IACEB6-CL9Aews-.js → chunk-55IACEB6-DDDLwVg4.js} +1 -1
  15. package/dist/client/assets/{chunk-EDXVE4YY-1E3ReMdN.js → chunk-EDXVE4YY-BNk5Xk1Q.js} +1 -1
  16. package/dist/client/assets/{chunk-FMBD7UC4-Bux2wmMW.js → chunk-FMBD7UC4-C_CC6grw.js} +1 -1
  17. package/dist/client/assets/{chunk-OYMX7WX6-WBdVt2Xn.js → chunk-OYMX7WX6-DTbaYVUc.js} +1 -1
  18. package/dist/client/assets/{chunk-QZHKN3VN-Cq3F4_8u.js → chunk-QZHKN3VN-i7z9jXPR.js} +1 -1
  19. package/dist/client/assets/{chunk-YZCP3GAM-DcHhyTiM.js → chunk-YZCP3GAM-cTSeZOtz.js} +1 -1
  20. package/dist/client/assets/classDiagram-6PBFFD2Q-BAI-fNQ3.js +1 -0
  21. package/dist/client/assets/classDiagram-v2-HSJHXN6E-BAI-fNQ3.js +1 -0
  22. package/dist/client/assets/clone-CqNqlAzp.js +1 -0
  23. package/dist/client/assets/{cose-bilkent-S5V4N54A-0OTGk_5l.js → cose-bilkent-S5V4N54A-uVW4wTRq.js} +1 -1
  24. package/dist/client/assets/{dagre-KV5264BT-Cd07lJmH.js → dagre-KV5264BT-CclQ97X6.js} +1 -1
  25. package/dist/client/assets/{diagram-5BDNPKRD--GO9Ay4Y.js → diagram-5BDNPKRD-eZaXK0Xj.js} +1 -1
  26. package/dist/client/assets/{diagram-G4DWMVQ6-DuoN0tN6.js → diagram-G4DWMVQ6-DIQ8qOFv.js} +1 -1
  27. package/dist/client/assets/{diagram-MMDJMWI5-BPKiNSRQ.js → diagram-MMDJMWI5-B_EbeR8B.js} +1 -1
  28. package/dist/client/assets/{diagram-TYMM5635-BkQ_957M.js → diagram-TYMM5635-DI64qX-Y.js} +1 -1
  29. package/dist/client/assets/{erDiagram-SMLLAGMA-DpH6S7Hm.js → erDiagram-SMLLAGMA-DLkwbOsk.js} +1 -1
  30. package/dist/client/assets/{flowDiagram-DWJPFMVM-Cd6e33QO.js → flowDiagram-DWJPFMVM-BWvMzejD.js} +1 -1
  31. package/dist/client/assets/{ganttDiagram-T4ZO3ILL-B-GRhaMk.js → ganttDiagram-T4ZO3ILL-B4qUxmRl.js} +1 -1
  32. package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-cYDvYf-0.js → gitGraphDiagram-UUTBAWPF-CnvcLURP.js} +1 -1
  33. package/dist/client/assets/{graph-DAKaKvrJ.js → graph-N4oFFLXe.js} +1 -1
  34. package/dist/client/assets/index-DfJLxHX8.js +734 -0
  35. package/dist/client/assets/index-uNbiLDxs.css +1 -0
  36. package/dist/client/assets/{infoDiagram-42DDH7IO-DC4i0tDk.js → infoDiagram-42DDH7IO-3uxP8aX_.js} +1 -1
  37. package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-Cf3X5-T4.js → ishikawaDiagram-UXIWVN3A-DQomHvSO.js} +1 -1
  38. package/dist/client/assets/{journeyDiagram-VCZTEJTY-BYsWnyQ6.js → journeyDiagram-VCZTEJTY-C_Ogwo77.js} +1 -1
  39. package/dist/client/assets/{kanban-definition-6JOO6SKY-MD2eg7rn.js → kanban-definition-6JOO6SKY-CGOeur5D.js} +1 -1
  40. package/dist/client/assets/{layout-DDm-cQAf.js → layout-DKlBkSB9.js} +1 -1
  41. package/dist/client/assets/{linear-BD106olW.js → linear-2pQUtBdp.js} +1 -1
  42. package/dist/client/assets/{mermaid.core-CUbDCP_N.js → mermaid.core-BrseLPLb.js} +4 -4
  43. package/dist/client/assets/{min-DxxF28tm.js → min-OFtHLPyF.js} +1 -1
  44. package/dist/client/assets/{mindmap-definition-QFDTVHPH-CuxnDIcW.js → mindmap-definition-QFDTVHPH-DQk9T3wA.js} +1 -1
  45. package/dist/client/assets/{pieDiagram-DEJITSTG-Cnq76TaP.js → pieDiagram-DEJITSTG-Btu4aJWj.js} +1 -1
  46. package/dist/client/assets/{quadrantDiagram-34T5L4WZ-VcR3-fX8.js → quadrantDiagram-34T5L4WZ-BHMDVip9.js} +1 -1
  47. package/dist/client/assets/{requirementDiagram-MS252O5E-DYRVWWdS.js → requirementDiagram-MS252O5E-CbXi80dX.js} +1 -1
  48. package/dist/client/assets/{sankeyDiagram-XADWPNL6-CAz7RWhc.js → sankeyDiagram-XADWPNL6-D5c7vUw4.js} +1 -1
  49. package/dist/client/assets/{sequenceDiagram-FGHM5R23-qYaH6Dka.js → sequenceDiagram-FGHM5R23-CGuRanG_.js} +1 -1
  50. package/dist/client/assets/{stateDiagram-FHFEXIEX-DDMVklbk.js → stateDiagram-FHFEXIEX-CVD3CB69.js} +1 -1
  51. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-BevvDvg0.js +1 -0
  52. package/dist/client/assets/{timeline-definition-GMOUNBTQ-C-mWZM54.js → timeline-definition-GMOUNBTQ-DMTeeglq.js} +1 -1
  53. package/dist/client/assets/{vennDiagram-DHZGUBPP-CdKXIcUK.js → vennDiagram-DHZGUBPP-CQ6TwRhb.js} +1 -1
  54. package/dist/client/assets/{wardley-RL74JXVD-DysqreeI.js → wardley-RL74JXVD-DdgusU4o.js} +1 -1
  55. package/dist/client/assets/{wardleyDiagram-NUSXRM2D-CClfteqo.js → wardleyDiagram-NUSXRM2D-BFsWqK49.js} +1 -1
  56. package/dist/client/assets/{xychartDiagram-5P7HB3ND-Dkr6Scmy.js → xychartDiagram-5P7HB3ND-Hca3jUV6.js} +1 -1
  57. package/dist/client/index.html +2 -2
  58. package/package.json +1 -1
  59. package/dist/client/assets/channel-DCD8FNrf.js +0 -1
  60. package/dist/client/assets/classDiagram-6PBFFD2Q-CWjFS_X3.js +0 -1
  61. package/dist/client/assets/classDiagram-v2-HSJHXN6E-CWjFS_X3.js +0 -1
  62. package/dist/client/assets/clone-Ch-EfM-U.js +0 -1
  63. package/dist/client/assets/index-CJO9QNau.js +0 -734
  64. package/dist/client/assets/index-DyIWJOIv.css +0 -1
  65. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-DeNzMGOg.js +0 -1
package/AGENTS.md CHANGED
@@ -1,39 +1,39 @@
1
1
  # Fleet Console Doctrine
2
2
 
3
- `runtime/fleet-console` owns the Fleet Console — a standalone fullstack product: its own loopback HTTP backend plus the React web surface for observing carrier jobs, live output streams from registered fleet-cli workspaces, and the Codex/Fleet Wiki web surface, driven by the `fleet-console` CLI lifecycle. It is the unified Fleet GUI runtime.
3
+ `runtime/fleet-console` owns the Fleet Console — a standalone fullstack product: its own loopback HTTP backend plus the React web surface for observing carrier jobs, live output streams from console-owned terminal sessions, and the Codex/Fleet Wiki web surface, driven by the `fleet-console` CLI lifecycle. It is the unified Fleet GUI runtime.
4
4
 
5
5
  ## Owns
6
6
 
7
- - The console HTTP backend (loopback-only): its own server skeleton, CLI ingest bearer auth, security headers, static `/console/` serving of its own `dist/client/`, the CLI register-ingest API, the browser observer REST/SSE surface, and the terminal PTY WebSocket. The console no longer imports or launches the retired gateway package.
7
+ - The console HTTP backend (loopback-only): its own server skeleton, security headers, static `/console/` serving of its own `dist/client/`, the browser observer REST/SSE surface, and the terminal PTY WebSocket. The console no longer imports or launches the retired gateway package.
8
8
  - The server lifecycle: lock file, runtime paths, health probe, and build-stale detection are console-owned. `fleet-console` is the daemon, not a launcher over someone else's daemon.
9
9
  - The `fleet-console` CLI entry point (`./cli` export, `dist/cli.mjs`): `start` (the default when no subcommand is given) ensures the local console server and opens the console URL in a browser; if a healthy daemon already exists, it opens that daemon's URL without starting a new server or erroring. `stop` stops the console server; `restart` stops the console server then starts a fresh one and opens it; `status` prints server health, endpoint, console URL, and registered-workspace count. The server binds to an OS-assigned random loopback port and records the actual port in the lock file, so consumers discover the port from the lock endpoint. `--help`/`-h` prints the banner-style help. `fleet console <args>` in `fleet-cli` relays the full argument list to this CLI as a child process, so every subcommand works through both `fleet console …` and the standalone `fleet-console …` binary. The root `pnpm fleet-console` script runs it from source via `tsx`.
10
- - The CLI register-ingest contract (server side): `POST /api/cli/register` (returns only `registrationId`, `ingestToken`, `heartbeatIntervalMs`, `leaseTtlMs`, `maxBatchEvents`), `POST /api/cli/events` (ordered `{cliRunId, seq, at, event}[]` batches authenticated by the ingest token; the console assigns its own `observedId`), `POST /api/cli/heartbeat`, and best-effort `POST /api/cli/deregister`. Registration and ingest are CLI-only; the shared register/ingest data-contract types are owned by `@dotobokuri/core-agent`.
11
- - The React SPA served from the console backend at `/console/`: layout, components, styles, and visual identity. The global navigation bar owns **Theater** selection — a project root directory that groups console-owned terminal sessions and Codex wiki context. The Operations sidebar (under the Operation nav tab) lists terminal sessions filtered to the active Theater, each listing its carrier job history (active and finished) in registration order; selecting a job opens a centered streaming overlay over that session's terminal, scoped to the active session's jobs.
10
+ - Console-owned terminal sessions are spawned server-side and observed in-process; carrier events flow directly into the observer store and browser SSE without a separate fleet-cli registration channel.
11
+ - The React SPA served from the console backend at `/console/`: layout, components, styles, and visual identity. The global navigation bar owns **Theater** selection — a project root directory that groups console-owned terminal sessions and Codex wiki context. The Operations sidebar (under the Operation nav tab) lists terminal sessions filtered to the active Theater and provides a launch control that asks the operator to choose an Agent CLI before starting a new terminal session; each session lists its carrier job history (active and finished) in registration order, and selecting a job opens a centered streaming overlay over that session's terminal, scoped to the active session's jobs.
12
12
  - The Codex/Fleet Wiki web surface under `/console/codex`: the console-owned Codex server gateway, workspace registry, wiki API routes, migrated vanilla TypeScript Maritime Codex client, `fleet wiki` compatibility helpers, and standalone `fleet-wiki` binary shim. The console-level **TheaterRegistry** is the source of truth for project roots and does not require a Fleet Wiki knowledge root; the Codex `WorkspaceRegistry` is the subset of Theaters whose directories contain a Fleet Wiki knowledge root. Codex must remain mounted under the Fleet Console GNB without an iframe or proxy daemon.
13
13
  - The observer-side client contract: REST snapshot fetches and the SSE consumption loop with reconnect/resync.
14
14
  - The streaming view model: the event reducer that folds `CarrierJobStreamEvent` timelines into per-job, per-track views with incremental text accumulation.
15
15
 
16
16
  ## Codex / Fleet Wiki Surface
17
17
 
18
- - Canonical Codex workspace routes live under `/console/codex/w/:ws/...`; MRU-compatible API routes live under `/console/codex/api/...`. Do not reintroduce global `/api/...` wiki routes because console owns `/api/cli/*`.
18
+ - Canonical Codex workspace routes live under `/console/codex/w/:ws/...`; MRU-compatible API routes live under `/console/codex/api/...`. Do not reintroduce global `/api/...` wiki routes because console owns its own local API namespace.
19
19
  - The console-level **Theater** is the parent concept for project roots. Codex workspaces share the same id space (`workspaceHash(realpath(dir))`) but are a strict subset of the Theater registry (`hasWiki=true`). The Codex left workspace switcher is removed; Theater selection in the global navigation bar is the only workspace switch, and Theaters without a Fleet Wiki knowledge root render a "Codex 없음" state instead of mounting a wiki surface.
20
20
  - The migrated Codex client stays Vanilla TypeScript under `client/src/codex/**`; do not rewrite it into React state or components beyond the React mount host.
21
21
  - Preserve Maritime Codex UX: reading flow, raw viewer, Drydock queue, conflicts, index/log views, command palette, Manifest/ToC rails, copy-context actions, diagram lightbox, brass/aurora roles, and self-hosted fonts.
22
22
  - Preserve wiki security invariants: Host allowlist, Origin guard, write-surface loopback gate, DOMPurify markdown sanitization, Mermaid `securityLevel: "strict"` with `htmlLabels: false` and no `bindFunctions`, path containment, and lockfile bearer auth for admin workspace registration.
23
- - Browser payloads must not expose CLI ingest tokens, MCP/session tokens, terminal tickets, or Codex admin tokens.
23
+ - Browser payloads must not expose MCP/session tokens, terminal tickets, or Codex admin tokens.
24
24
 
25
25
  ## Must Not Own
26
26
 
27
- - Multi-tenant aggregation or tenant/session token issuance — the console observes a single workspace's registered fleet-cli sessions; it does not re-implement the retired gateway tenant model.
28
- - MCP transport the MCP HTTP/JSON-RPC server is owned by `fleet-cli` in-process (assembled from `@dotobokuri/core-agent` primitives). The console never proxies or owns MCP tool-call routing.
29
- - Fleet tool builders, carrier persona policy, or provider-specific launch logic.
27
+ - Multi-tenant aggregation or tenant/session token issuance — the console observes local console-owned terminal sessions; it does not re-implement the retired gateway tenant model.
28
+ - Browser-facing MCP transport or MCP proxying. Console server-side terminal sessions may create per-session Fleet MCP runtimes and executor session tokens only through `@dotobokuri/fleet-admiral`; tokens remain server-only and must never reach browser payloads, tickets, logs, URLs, or static assets.
29
+ - Fleet tool builders, carrier persona policy, or provider-specific launch logic. Console may consume the `@dotobokuri/fleet-admiral` root launch/runtime API but must not copy, fork, or deep-import provider-specific launch builders.
30
30
 
31
31
  ## Token Boundary (hard rule)
32
32
 
33
33
  - Browser observer routes are loopback-only and do not use browser bearer tokens.
34
34
  - Terminal HTTP routes do not use browser bearer tokens, but must retain the terminal Origin check; the terminal WebSocket is reached through a one-use ticket.
35
- - The CLI `ingestToken` and any MCP session token must never reach browser code, URL query strings, SSE payloads, terminal tickets, logs, or static assets.
36
- - Theater routes likewise do not expose admin bearer tokens, ingest tokens, MCP/session tokens, terminal tickets, folder-grant identifiers, or raw working-directory paths to the browser.
35
+ - MCP session tokens must never reach browser code, URL query strings, SSE payloads, terminal tickets, logs, or static assets.
36
+ - Theater routes likewise do not expose admin bearer tokens, MCP/session tokens, terminal tickets, folder-grant identifiers, or raw working-directory paths to the browser.
37
37
 
38
38
  ## Carrier Readiness Boundary
39
39
 
@@ -44,11 +44,15 @@
44
44
  - Console must not deep-import `@dotobokuri/fleet-carriers/src/**`, `packages/fleet-carriers/src/**`, `runtime/fleet-cli/**`, or `@dotobokuri/fleet-cli`.
45
45
  - Carrier readiness browser payloads must not serialize prompt bodies, raw persona instructions, executor tool allowlists, tokens, credential values, auth env details, terminal/session/admin tickets, or raw filesystem paths.
46
46
 
47
+ ## Server-side Dependency Boundary
48
+
49
+ - `runtime/fleet-console/src/**` may import `@dotobokuri/fleet-admiral` public root exports for server-only Agent CLI launch/runtime assembly. `runtime/fleet-console/client/**` must not import `@dotobokuri/fleet-admiral`.
50
+
47
51
  ## Layout
48
52
 
49
- - `src/` — Node-side backend and CLI lifecycle: the HTTP server (`server.ts`), bearer auth and security headers, static serving (`static-console.ts`), the register-ingest and observer routes (including `/observer/theaters*` Theater registry and session launch), the SSE helper, `codex/` (Fleet Wiki/Codex API gateway and workspace registration), `theaters.ts` (console-level in-memory TheaterRegistry), `theater.ts` (Theater id hash, realpath canonicalization, and label helpers), `terminal/` (PTY ticket/session/ws transport; console terminal sessions launch `fleet-cli --headless --native` so the child Agent CLI owns the PTY while registering with the console; closing the browser view or switching Operations does not terminate the PTY — sessions persist until the child process exits, an operator explicitly terminates the session, or the server stops), the lifecycle modules (`lock.ts`, `paths.ts`, `health.ts`, `stale.ts`), and the CLI (`cli.ts`, `cli-bin.ts`, `browser.ts`, `help-style.ts`). Built by tsup to `dist/cli.mjs` and `dist/cli-bin.mjs`. Depends on `@dotobokuri/core-agent` for the shared register data contract; must **not** depend on the retired gateway package. `help-style.ts` is a CLI-help-only **self-hosted** style helper shared by the console and Codex compatibility CLIs; it must not import from `fleet-cli`, `packages/*` (beyond the core-agent contract), or `client/`, and changes to the shared banner/SGR vocabulary require manual sync across those copies.
53
+ - `src/` — Node-side backend and CLI lifecycle: the HTTP server (`server.ts`), security headers, static serving (`static-console.ts`), observer routes (including `/observer/theaters*` Theater registry and session launch), the SSE helper, `codex/` (Fleet Wiki/Codex API gateway and workspace registration), `theaters.ts` (console-level in-memory TheaterRegistry), `theater.ts` (Theater id hash, realpath canonicalization, and label helpers), `terminal/` (PTY ticket/session/ws transport; console terminal sessions resolve Agent CLI launch specs through `@dotobokuri/fleet-admiral`, spawn the selected provider CLI directly, inject carrier job completion system-reminders only into the originating session's PTY, and bridge carrier runtime events into console-owned observability without exposing MCP/session tokens, terminal tickets, or system reminders to the browser; closing the browser view or switching Operations does not terminate the PTY — sessions persist until the child process exits, an operator explicitly terminates the session, or the server stops), the lifecycle modules (`lock.ts`, `paths.ts`, `health.ts`, `stale.ts`), and the CLI (`cli.ts`, `cli-bin.ts`, `browser.ts`, `help-style.ts`). Built by tsup to `dist/cli.mjs` and `dist/cli-bin.mjs`. `help-style.ts` is a CLI-help-only **self-hosted** style helper shared by the console and Codex compatibility CLIs; it must not import from `fleet-cli`, `packages/*`, or `client/`, and changes to the shared banner/SGR vocabulary require manual sync across those copies.
50
54
  - `client/` — the Vite React SPA (`client/src/`, `client/index.html`, `client/vite.config.ts`). Must not import Node-only modules or the console backend (`src/`).
51
- - `tests/` — vitest suites for the reducer, SSE parser, store, register-ingest, terminal, and CLI lifecycle.
55
+ - `tests/` — vitest suites for the reducer, SSE parser, store, terminal, and CLI lifecycle.
52
56
 
53
57
  ## Tech Stack (deliberate)
54
58
 
package/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # Fleet Console
2
2
 
3
- Standalone loopback web console for observing registered Fleet CLI workspaces, carrier jobs, live output streams, and multi-session PTY terminal workspaces.
3
+ Standalone loopback web console for observing carrier jobs, live output streams, and multi-session PTY terminal workspaces.
4
4
 
5
5
  ## What It Does
6
6
 
7
- Fleet Console owns its own local HTTP server. Fleet CLI processes register with the console when available, push ordered event batches through the CLI-only ingest API, and continue normally if the console is absent.
7
+ Fleet Console owns its own local HTTP server. Terminal sessions are spawned by the console server and observed in-process; carrier events are streamed to the browser through the observer API.
8
8
 
9
- - Registered CLI workspaces and observed jobs in a navigable rail.
9
+ - Console-owned terminal sessions and observed jobs in a navigable rail.
10
10
  - Workspace hub sessions created from OS-native folder selection.
11
- - Console-spawned `fleet-cli --native` PTYs with deterministic registration binding.
11
+ - Console-spawned Agent CLI PTYs with in-process observation.
12
12
  - Per-job carrier tracks with incremental output text, reasoning folds, and tool-call activity.
13
13
  - Codex/Fleet Wiki browsing under the shared Console GNB at `/console/codex`.
14
14
  - Browser observer snapshots and SSE streams backed by console-owned global observed ids.
@@ -18,27 +18,25 @@ Fleet Console owns its own local HTTP server. Fleet CLI processes register with
18
18
 
19
19
  | Channel | Purpose | Token Boundary |
20
20
  |---|---|---|
21
- | `POST /api/cli/register` | CLI registers a workspace session. | Uses the console bootstrap token from the lock file. |
22
- | `POST /api/cli/events` | CLI pushes `{ cliRunId, seq, at, event }[]` batches. | Uses CLI-only `ingestToken`; never sent to browser code. |
23
21
  | `/observer/*` | Browser snapshot and SSE observer surface. | Loopback-only; no browser bearer token. |
24
22
  | `POST /terminal/folders/pick` | Opens a native folder picker and returns a one-use folder grant, or `{ cancelled: true }`. | Requires the terminal Origin boundary; selected paths are kept server-side. |
25
- | `POST /terminal/sessions` | Consumes `{ folderGrantId }` to create a console-spawned `fleet-cli --native` PTY session. | Raw cwd values from browser requests are rejected. |
23
+ | `POST /terminal/sessions` | Consumes `{ folderGrantId }` to create a console-spawned Agent CLI PTY session. | Raw cwd values from browser requests are rejected. |
26
24
  | `GET /terminal/sessions` | Lists non-secret terminal session metadata for hydration. | Requires the terminal Origin boundary. |
27
25
  | `POST /terminal/ticket` + `/terminal/ws` | Browser terminal PTY transport; ticket requests may include `{ sessionId }` and default to `"default"` for compatibility. | Browser receives a one-use ticket. |
28
26
  | `/console/` | Static React client served from this package's `dist/client`. | Served directly from the loopback console URL. |
29
27
  | `/console/codex/*` | Console-owned Codex/Fleet Wiki web, workspace API, and migrated Maritime Codex client. | Admin workspace registration uses the lock bearer token; browser reads stay token-free on allowed local origins. |
30
28
 
31
- `/observer/tenants` may include `terminalSessionId` when a registered CLI workspace is deterministically bound to a console-spawned terminal session. `/terminal/ws` keeps the same path and query shape.
29
+ `/observer/tenants` may include `terminalSessionId` for console-owned terminal sessions. `/terminal/ws` keeps the same path and query shape.
32
30
 
33
31
  ## Session Binding
34
32
 
35
- When the console creates a terminal session, it generates a session id and launches `fleet-cli --native` with `FLEET_CONSOLE_SESSION_ID`, `INIT_CWD`, and `PWD` set to the selected absolute cwd. Fleet CLI uses that session id as `cliRunId` unless an explicit `cliRunId` was provided. The console binds registration metadata to a pending terminal session only when `cliRunId === sessionId` and the canonical cwd matches. It does not use pid matching or cwd/time proximity fallback.
33
+ When the console creates a terminal session, it generates a session id, resolves the selected Agent CLI through the shared fleet-admiral runtime, and keeps the selected absolute cwd server-side. The console records non-secret session metadata for observer hydration.
36
34
 
37
35
  Folder grants are one-use and in-memory. Folder picker cancellation is a normal response. Picker failures are reported with typed errors such as `unsupported_platform`, `dialog_unavailable`, `dialog_timeout`, and `invalid_folder`.
38
36
 
39
37
  ## Security Notes
40
38
 
41
- HTTP surfaces are loopback-only. CLI ingest remains protected by bearer tokens, while browser observer routes are directly available on loopback and terminal routes retain their Origin boundary. CLI `ingestToken`, MCP session tokens, bootstrap tokens, and selected absolute paths are not exposed through browser payloads, URL query strings, SSE frames, terminal tickets, logs, or static assets.
39
+ HTTP surfaces are loopback-only. Browser observer routes are directly available on loopback and terminal routes retain their Origin boundary. MCP session tokens, bootstrap tokens, and selected absolute paths are not exposed through browser payloads, URL query strings, SSE frames, terminal tickets, logs, or static assets.
42
40
 
43
41
  Codex/Fleet Wiki routes preserve the migrated wiki security boundary: Host allowlist, Origin checks for write routes, loopback write gates, path containment, DOMPurify markdown sanitization, strict Mermaid rendering, and lockfile bearer auth for workspace registration.
44
42