@dotobokuri/fleet-console 1.5.5 → 1.7.0
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.
- package/AGENTS.md +14 -11
- package/README.md +9 -4
- package/dist/cli-bin.mjs +1915 -689
- package/dist/cli.d.ts +10 -1
- package/dist/cli.mjs +1915 -689
- package/dist/client/assets/{_baseUniq-CpEjig2A.js → _baseUniq-DaRHKvkJ.js} +1 -1
- package/dist/client/assets/{arc-BmymS_Kz.js → arc-ByrjrNFZ.js} +1 -1
- package/dist/client/assets/{architectureDiagram-Q4EWVU46-D1d0KVz1.js → architectureDiagram-Q4EWVU46-yRDXYtYq.js} +1 -1
- package/dist/client/assets/{blockDiagram-DXYQGD6D-Cwuv0sNk.js → blockDiagram-DXYQGD6D-B3Ud4HmY.js} +1 -1
- package/dist/client/assets/{c4Diagram-AHTNJAMY-Bsk-GjC_.js → c4Diagram-AHTNJAMY-BWtT7uJ6.js} +1 -1
- package/dist/client/assets/channel-D1hUfR86.js +1 -0
- package/dist/client/assets/{chunk-4BX2VUAB-ZM4i9T4D.js → chunk-4BX2VUAB-Cdk_k5EX.js} +1 -1
- package/dist/client/assets/{chunk-4TB4RGXK-Sw5ODKRj.js → chunk-4TB4RGXK-CfeLiRAa.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-DDDLwVg4.js → chunk-55IACEB6-B26kabv5.js} +1 -1
- package/dist/client/assets/{chunk-EDXVE4YY-BNk5Xk1Q.js → chunk-EDXVE4YY-CZ5hqsgg.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-C_CC6grw.js → chunk-FMBD7UC4-CuCp-r0v.js} +1 -1
- package/dist/client/assets/{chunk-OYMX7WX6-DTbaYVUc.js → chunk-OYMX7WX6-Dy5T8Uzb.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-i7z9jXPR.js → chunk-QZHKN3VN-PNRzwWoU.js} +1 -1
- package/dist/client/assets/{chunk-YZCP3GAM-cTSeZOtz.js → chunk-YZCP3GAM-BjJxIVvV.js} +1 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-B7ZtwAd2.js +1 -0
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-B7ZtwAd2.js +1 -0
- package/dist/client/assets/clone-BggxG0Ng.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-uVW4wTRq.js → cose-bilkent-S5V4N54A-CIL2KUnC.js} +1 -1
- package/dist/client/assets/{dagre-KV5264BT-CclQ97X6.js → dagre-KV5264BT-BoekxdN3.js} +1 -1
- package/dist/client/assets/{diagram-5BDNPKRD-eZaXK0Xj.js → diagram-5BDNPKRD-8Uqn3Uve.js} +1 -1
- package/dist/client/assets/{diagram-G4DWMVQ6-DIQ8qOFv.js → diagram-G4DWMVQ6-CWZp4Fw1.js} +1 -1
- package/dist/client/assets/{diagram-MMDJMWI5-B_EbeR8B.js → diagram-MMDJMWI5-Cxxmq5lR.js} +1 -1
- package/dist/client/assets/{diagram-TYMM5635-DI64qX-Y.js → diagram-TYMM5635-BDL3SVhp.js} +1 -1
- package/dist/client/assets/{erDiagram-SMLLAGMA-DLkwbOsk.js → erDiagram-SMLLAGMA-Bm_XDDZi.js} +1 -1
- package/dist/client/assets/{flowDiagram-DWJPFMVM-BWvMzejD.js → flowDiagram-DWJPFMVM-z3JhyUpl.js} +1 -1
- package/dist/client/assets/fraunces-latin-ext-standard-italic-CGbN9UgK.woff2 +0 -0
- package/dist/client/assets/fraunces-latin-standard-italic-lSdLDfvT.woff2 +0 -0
- package/dist/client/assets/fraunces-vietnamese-standard-italic-DxWqP7Ku.woff2 +0 -0
- package/dist/client/assets/{ganttDiagram-T4ZO3ILL-B4qUxmRl.js → ganttDiagram-T4ZO3ILL-DVfDRTRP.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-CnvcLURP.js → gitGraphDiagram-UUTBAWPF-_gni8LDF.js} +1 -1
- package/dist/client/assets/{graph-N4oFFLXe.js → graph-Beq1lcyq.js} +1 -1
- package/dist/client/assets/index-3nhZQ9tb.css +1 -0
- package/dist/client/assets/index-DFffaVk9.js +734 -0
- package/dist/client/assets/{infoDiagram-42DDH7IO-3uxP8aX_.js → infoDiagram-42DDH7IO-B-TP33al.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-DQomHvSO.js → ishikawaDiagram-UXIWVN3A-1YDVINPA.js} +1 -1
- package/dist/client/assets/{journeyDiagram-VCZTEJTY-C_Ogwo77.js → journeyDiagram-VCZTEJTY-CZJuR6NC.js} +1 -1
- package/dist/client/assets/{kanban-definition-6JOO6SKY-CGOeur5D.js → kanban-definition-6JOO6SKY-_sSHU_-t.js} +1 -1
- package/dist/client/assets/{layout-DKlBkSB9.js → layout-UzmHJbGX.js} +1 -1
- package/dist/client/assets/{linear-2pQUtBdp.js → linear-BHitegAT.js} +1 -1
- package/dist/client/assets/{mermaid.core-BrseLPLb.js → mermaid.core-ptwBQDH8.js} +4 -4
- package/dist/client/assets/{min-OFtHLPyF.js → min-CBjwmJst.js} +1 -1
- package/dist/client/assets/{mindmap-definition-QFDTVHPH-DQk9T3wA.js → mindmap-definition-QFDTVHPH-C8NIvAO1.js} +1 -1
- package/dist/client/assets/{pieDiagram-DEJITSTG-Btu4aJWj.js → pieDiagram-DEJITSTG-paebhRXC.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-34T5L4WZ-BHMDVip9.js → quadrantDiagram-34T5L4WZ-Bk0pN-T7.js} +1 -1
- package/dist/client/assets/{requirementDiagram-MS252O5E-CbXi80dX.js → requirementDiagram-MS252O5E-CkPyeOJB.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-XADWPNL6-D5c7vUw4.js → sankeyDiagram-XADWPNL6-tJsRZl9C.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-FGHM5R23-CGuRanG_.js → sequenceDiagram-FGHM5R23-D1V2Qnb3.js} +1 -1
- package/dist/client/assets/{stateDiagram-FHFEXIEX-CVD3CB69.js → stateDiagram-FHFEXIEX-DdEFxPzQ.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-CpqK8Q3C.js +1 -0
- package/dist/client/assets/{timeline-definition-GMOUNBTQ-DMTeeglq.js → timeline-definition-GMOUNBTQ-D8sNtFqY.js} +1 -1
- package/dist/client/assets/{vennDiagram-DHZGUBPP-CQ6TwRhb.js → vennDiagram-DHZGUBPP-DoTEQk3E.js} +1 -1
- package/dist/client/assets/{wardley-RL74JXVD-DdgusU4o.js → wardley-RL74JXVD-BuEgLJ7M.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-NUSXRM2D-BFsWqK49.js → wardleyDiagram-NUSXRM2D-B0Gl34Zh.js} +1 -1
- package/dist/client/assets/{xychartDiagram-5P7HB3ND-Hca3jUV6.js → xychartDiagram-5P7HB3ND-Bf4nAMbM.js} +1 -1
- package/dist/client/index.html +2 -2
- package/package.json +1 -1
- package/dist/client/assets/channel--qpYuR58.js +0 -1
- package/dist/client/assets/classDiagram-6PBFFD2Q-BAI-fNQ3.js +0 -1
- package/dist/client/assets/classDiagram-v2-HSJHXN6E-BAI-fNQ3.js +0 -1
- package/dist/client/assets/clone-CqNqlAzp.js +0 -1
- package/dist/client/assets/index-DfJLxHX8.js +0 -734
- package/dist/client/assets/index-uNbiLDxs.css +0 -1
- package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-BevvDvg0.js +0 -1
package/AGENTS.md
CHANGED
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
|
|
7
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
|
-
- 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`.
|
|
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`; unpublished local runs isolate runtime files under the project workspace `.fleet/console` unless `FLEET_CONSOLE_DIR` is set, while published stable builds continue using the OS temp directory.
|
|
10
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
|
-
-
|
|
11
|
+
- Console durable state is persisted in `~/.fleet/console/state.json` (`createDurableJsonStore`, `sensitivity: "sensitive"`). The console server is the sole writer; the file stores `{ version: 1, theaters, operations }`. On startup the server restores Theaters and Operations into a dormant state (no PTY), and Operation state survives console restarts.
|
|
12
|
+
- A capture inbound channel writes `~/.fleet/console/captures/{fleetSessionId}.json`. Provider CLI SessionStart hooks record provider session ids via `fleet-console hook capture-session <provider>`; the server reads the capture file, merges the provider session id into durable state, and cleans up the capture file. This is separate from the console lock file in `os.tmpdir()`.
|
|
13
|
+
- 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. A console-wide Operation quick-search (Cmd/Ctrl+K) searches terminal sessions across all Theaters, switches to the selected Operation's Theater, selects that Operation, and navigates to `/operations`; on `/codex` paths the same shortcut yields to Codex's own search.
|
|
12
14
|
- 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
15
|
- The observer-side client contract: REST snapshot fetches and the SSE consumption loop with reconnect/resync.
|
|
14
16
|
- The streaming view model: the event reducer that folds `CarrierJobStreamEvent` timelines into per-job, per-track views with incremental text accumulation.
|
|
@@ -26,23 +28,24 @@
|
|
|
26
28
|
|
|
27
29
|
- 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
30
|
- 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.
|
|
31
|
+
- Fleet tool builders, carrier persona policy, or provider-specific launch/resume/hook logic. Console may consume the `@dotobokuri/fleet-admiral` root launch/runtime API (including public hooks such as `createSessionCaptureHookExec`) but must not copy, fork, or deep-import provider-specific launch builders, resume argument renderers, or hook renderers.
|
|
30
32
|
|
|
31
33
|
## Token Boundary (hard rule)
|
|
32
34
|
|
|
33
35
|
- Browser observer routes are loopback-only and do not use browser bearer tokens.
|
|
34
36
|
- 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
37
|
- 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,
|
|
38
|
+
- Theater routes likewise do not expose admin bearer tokens, MCP/session tokens, terminal tickets, folder-grant identifiers, raw working-directory paths, provider session ids, or transcript paths to the browser.
|
|
39
|
+
- Folder browser routes (`POST /terminal/folders/list`, `POST /terminal/folders/grants`) are gated by `validateHost` then `isTerminalAuthorized` (the same Origin boundary as all terminal routes). No adminToken or bearer auth is added. Folder selection is browser UI plus loopback fs APIs; no OS-native dialog or child process is spawned. Selected absolute paths appear only in list and grant responses; they are not included in session, Theater, observer, or SSE payloads. When a Theater is registered the resolved cwd is stored in durable local state (`sensitivity: "sensitive"`) as before — it is not transmitted to the browser.
|
|
37
40
|
|
|
38
|
-
## Carrier Readiness Boundary
|
|
41
|
+
## Carrier Readiness/Settings Boundary
|
|
39
42
|
|
|
40
|
-
- `runtime/fleet-console/src/**` may import `@dotobokuri/fleet-carriers` public root exports to consume
|
|
43
|
+
- `runtime/fleet-console/src/**` may import `@dotobokuri/fleet-carriers` public root exports to consume Carrier Readiness read models and mutate global Carrier Settings through the carrier store.
|
|
41
44
|
- `runtime/fleet-console/client/**` must not import `@dotobokuri/fleet-carriers`, carrier persona modules, deep carrier paths, or Node-only carrier runtime modules.
|
|
42
|
-
- Fleet Console may render display-safe carrier
|
|
43
|
-
- `fleet-carriers` remains the source of truth for carrier persona defaults, carrier-store interpretation, and carrier read-model construction. Console must not copy
|
|
45
|
+
- Fleet Console may render and edit display-safe carrier settings data such as carrier id, display name, role/category, resolved CLI/model/effort, Task Force backend count/configuration, and subagent mode/tag.
|
|
46
|
+
- `fleet-carriers` remains the source of truth for carrier persona defaults, carrier-store interpretation, store mutation, and carrier read-model construction. Console must not copy or reconstruct carrier persona policy or carrier runtime state.
|
|
44
47
|
- Console must not deep-import `@dotobokuri/fleet-carriers/src/**`, `packages/fleet-carriers/src/**`, `runtime/fleet-cli/**`, or `@dotobokuri/fleet-cli`.
|
|
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.
|
|
48
|
+
- Carrier readiness/settings 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
49
|
|
|
47
50
|
## Server-side Dependency Boundary
|
|
48
51
|
|
|
@@ -50,7 +53,7 @@
|
|
|
50
53
|
|
|
51
54
|
## Layout
|
|
52
55
|
|
|
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
|
|
56
|
+
- `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, session launch, and `DELETE /observer/theaters/:theaterId` for Theater plus cascading Operation/capture removal), the SSE helper, `codex/` (Fleet Wiki/Codex API gateway and workspace registration), `theaters.ts` (console-level in-memory TheaterRegistry backed by durable state), `theater.ts` (Theater id hash, realpath canonicalization, and label helpers), `terminal/` (PTY ticket/session/ws transport, `POST /terminal/sessions/:sessionId/resume` for lazy on-open resume of dormant Operations, and `DELETE /terminal/sessions/:sessionId` which kills a live session and removes it or simply removes a dormant session, persisting the change in all cases; console terminal sessions resolve Agent CLI launch specs through `@dotobokuri/fleet-admiral`, spawn the selected provider CLI directly, inject carrier job completion system-reminders (and, on Operation rename, a `/rename <name>` slash command) 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 — live sessions persist until the child process exits, an operator explicitly terminates the session, or the server stops; restarting the console restores Operations in a dormant state without a PTY and resumes them lazily when opened), 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.
|
|
54
57
|
- `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/`).
|
|
55
58
|
- `tests/` — vitest suites for the reducer, SSE parser, store, terminal, and CLI lifecycle.
|
|
56
59
|
|
|
@@ -80,7 +83,7 @@ The console is the operations variant of Fleet Wiki's **Maritime Codex** languag
|
|
|
80
83
|
- `coral` means error/bad; `--warn` (amber, near `oklch(80% 0.13 85)`) means warning/connecting; neutral ink means idle.
|
|
81
84
|
- **Typography**: `Fraunces Variable` is display type for the topbar brand, job titles, idle marks, and large headings. `Manrope Variable` is the default UI family. `JetBrains Mono Variable` is for stream output, job ids, timelines, and eyebrow labels with uppercase tracked styling. **Exception**: the Operations terminal (xterm) uses `Cascadia Code` — a terminal-tuned face for box-drawing/Powerline glyph alignment — rendered via the xterm WebGL addon with DOM fallback. This is the sole surface where the console mono identity deliberately diverges from JetBrains Mono; the terminal font lives in the `terminal.tsx` xterm options (xterm takes a JS font string, not a CSS token), so it is not a `theme.css` variable.
|
|
82
85
|
- **Surface and atmosphere**: `body::before` owns the multi-radial cold teal + brass afterglow field, and `body::after` owns the `feTurbulence` grain overlay. Sidebar, selected-job stage, timeline dock, and job summary are glass cards using `backdrop-filter: blur(18px) saturate(140%)`, `--surface-glass`, `--surface-rim`, `--shadow-soft`, and `--radius-xl`/large-radius surfaces.
|
|
83
|
-
- **Motion**: panes use one first-paint `codex-rise` reveal (720ms, `--ease-spring`, topbar/sidebar/stage staggered 40/120/200ms). Live dots use aurora pulse, the stream caret keeps its blink, and ambient infinite motion is forbidden. `prefers-reduced-motion` must continue to short-circuit animation.
|
|
86
|
+
- **Motion**: panes use one first-paint `codex-rise` reveal (720ms, `--ease-spring`, topbar/sidebar/stage staggered 40/120/200ms). Live dots use aurora pulse, the stream caret keeps its blink, and ambient infinite motion is forbidden. `prefers-reduced-motion` must continue to short-circuit animation. Exception: the Operations canvas background may render a user-toggleable ambient radar sweep that defaults on and persists per browser; it remains short-circuited by `prefers-reduced-motion`.
|
|
84
87
|
- **Hard bans**: no font CDN; no `Inter`/`Roboto`/`Arial`/`system-ui` as the first font family; no solid `#fff` or `#000` backgrounds; no card/button/chip radius at or below 4px; no removal of `prefers-reduced-motion`; no mixing brass and aurora roles; no reintroduction of `--carbon-*` or `--signal-*` token families.
|
|
85
88
|
- CSS stays in three layers: `theme.css` (tokens/reset/keyframes only), `layout.css` (shell grid/breakpoints only), `components.css` (every concrete surface).
|
|
86
89
|
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Standalone loopback web console for observing carrier jobs, live output streams,
|
|
|
7
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
9
|
- Console-owned terminal sessions and observed jobs in a navigable rail.
|
|
10
|
-
- Workspace hub sessions created
|
|
10
|
+
- Workspace hub sessions created through an in-console directory browser — no OS-native dialog.
|
|
11
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`.
|
|
@@ -19,7 +19,8 @@ Fleet Console owns its own local HTTP server. Terminal sessions are spawned by t
|
|
|
19
19
|
| Channel | Purpose | Token Boundary |
|
|
20
20
|
|---|---|---|
|
|
21
21
|
| `/observer/*` | Browser snapshot and SSE observer surface. | Loopback-only; no browser bearer token. |
|
|
22
|
-
| `POST /terminal/folders/
|
|
22
|
+
| `POST /terminal/folders/list` | Returns a directory listing (`{ path, parentPath, roots, entries, truncated? }`) for the given path, or the server home directory when `path` is null. Directories only, non-recursive, capped at 500 entries. | Requires the terminal Origin boundary (`isTerminalAuthorized`); no adminToken. |
|
|
23
|
+
| `POST /terminal/folders/grants` | Validates the client-supplied absolute path through `validateAbsoluteDirectory` and returns a one-use `{ folderGrantId }`. | Requires the terminal Origin boundary; no adminToken. |
|
|
23
24
|
| `POST /terminal/sessions` | Consumes `{ folderGrantId }` to create a console-spawned Agent CLI PTY session. | Raw cwd values from browser requests are rejected. |
|
|
24
25
|
| `GET /terminal/sessions` | Lists non-secret terminal session metadata for hydration. | Requires the terminal Origin boundary. |
|
|
25
26
|
| `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. |
|
|
@@ -32,11 +33,15 @@ Fleet Console owns its own local HTTP server. Terminal sessions are spawned by t
|
|
|
32
33
|
|
|
33
34
|
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.
|
|
34
35
|
|
|
35
|
-
Folder grants
|
|
36
|
+
Folder selection is handled entirely in the browser UI: the React directory browser modal calls `POST /terminal/folders/list` to browse the server's local filesystem, then calls `POST /terminal/folders/grants` once the operator confirms a directory. The resulting one-use grant is consumed by `POST /terminal/sessions` or Theater registration; no OS-native dialog or child process is involved. The browser modal works in remote and headless browser sessions without any OS-level dialog support.
|
|
37
|
+
|
|
38
|
+
Folder grants are one-use and in-memory. Browser-side cancellation stays local to the modal and does not call the server grant endpoint.
|
|
36
39
|
|
|
37
40
|
## Security Notes
|
|
38
41
|
|
|
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
|
+
HTTP surfaces are loopback-only. Browser observer routes are directly available on loopback and terminal routes retain their Origin boundary (`isTerminalAuthorized`). 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.
|
|
43
|
+
|
|
44
|
+
`POST /terminal/folders/list` and `POST /terminal/folders/grants` both require `validateHost` and `isTerminalAuthorized`. No adminToken or bearer auth is used for folder endpoints. Selected absolute paths appear only in list and grant API responses; they are not included in session, Theater, observer, or SSE payloads. When a Theater is registered, the resolved cwd is stored in durable local state (`~/.fleet/console/state.json`, `sensitivity: "sensitive"`) exactly as before; this is a sensitive local file and is not transmitted to the browser.
|
|
40
45
|
|
|
41
46
|
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.
|
|
42
47
|
|