@dotobokuri/fleet-console 1.9.0 → 1.10.1

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 (63) hide show
  1. package/AGENTS.md +4 -4
  2. package/dist/cli-bin.mjs +571 -344
  3. package/dist/cli.mjs +571 -344
  4. package/dist/client/assets/{_baseUniq-_nKBty4x.js → _baseUniq-e_j340KJ.js} +1 -1
  5. package/dist/client/assets/{arc-DEjqUlkY.js → arc-CioNx0k6.js} +1 -1
  6. package/dist/client/assets/{architectureDiagram-Q4EWVU46-CPF3RLab.js → architectureDiagram-Q4EWVU46-B_8HDSCb.js} +1 -1
  7. package/dist/client/assets/{blockDiagram-DXYQGD6D-DguupB0e.js → blockDiagram-DXYQGD6D-CpHdrypQ.js} +1 -1
  8. package/dist/client/assets/{c4Diagram-AHTNJAMY-Dd7AVc09.js → c4Diagram-AHTNJAMY-CkitEGpF.js} +1 -1
  9. package/dist/client/assets/channel-CEwT4AXW.js +1 -0
  10. package/dist/client/assets/{chunk-4BX2VUAB-CSIihHG7.js → chunk-4BX2VUAB-DxyXXSCc.js} +1 -1
  11. package/dist/client/assets/{chunk-4TB4RGXK-DR_cPI3H.js → chunk-4TB4RGXK-C2-nU4zS.js} +1 -1
  12. package/dist/client/assets/{chunk-55IACEB6-97czQ3iV.js → chunk-55IACEB6-Ch5DNHFU.js} +1 -1
  13. package/dist/client/assets/{chunk-EDXVE4YY-piQCPtjQ.js → chunk-EDXVE4YY-CHE6KKZa.js} +1 -1
  14. package/dist/client/assets/{chunk-FMBD7UC4-BIeV9l0L.js → chunk-FMBD7UC4-PFqCeOs6.js} +1 -1
  15. package/dist/client/assets/{chunk-OYMX7WX6-DWUJBKm_.js → chunk-OYMX7WX6-DHE5_rgO.js} +1 -1
  16. package/dist/client/assets/{chunk-QZHKN3VN-DHL5fPU4.js → chunk-QZHKN3VN-BNsfe2Ai.js} +1 -1
  17. package/dist/client/assets/{chunk-YZCP3GAM-Dk19Wldz.js → chunk-YZCP3GAM-Du6aAWOS.js} +1 -1
  18. package/dist/client/assets/classDiagram-6PBFFD2Q-BcAsKAPs.js +1 -0
  19. package/dist/client/assets/classDiagram-v2-HSJHXN6E-BcAsKAPs.js +1 -0
  20. package/dist/client/assets/clone-BbRCSYXZ.js +1 -0
  21. package/dist/client/assets/{cose-bilkent-S5V4N54A-CcROwyfn.js → cose-bilkent-S5V4N54A-BMbRb2Ij.js} +1 -1
  22. package/dist/client/assets/{dagre-KV5264BT-kdHN8OcZ.js → dagre-KV5264BT-BIYIuU4t.js} +1 -1
  23. package/dist/client/assets/{diagram-5BDNPKRD-yqi72mWd.js → diagram-5BDNPKRD-DE58KlL0.js} +1 -1
  24. package/dist/client/assets/{diagram-G4DWMVQ6-CTjHbP--.js → diagram-G4DWMVQ6-BBHYXkDj.js} +1 -1
  25. package/dist/client/assets/{diagram-MMDJMWI5-BCGN9v8i.js → diagram-MMDJMWI5-BGA4ZKw3.js} +1 -1
  26. package/dist/client/assets/{diagram-TYMM5635-p6gtwFXr.js → diagram-TYMM5635-DusN1Hix.js} +1 -1
  27. package/dist/client/assets/{erDiagram-SMLLAGMA-BHNCT04F.js → erDiagram-SMLLAGMA-84E-AJKo.js} +1 -1
  28. package/dist/client/assets/{flowDiagram-DWJPFMVM-DP-E6Gb1.js → flowDiagram-DWJPFMVM-Dpap9NqV.js} +1 -1
  29. package/dist/client/assets/{ganttDiagram-T4ZO3ILL-COKcadl7.js → ganttDiagram-T4ZO3ILL-CukRJAaM.js} +1 -1
  30. package/dist/client/assets/{gitGraphDiagram-UUTBAWPF-CVkte06j.js → gitGraphDiagram-UUTBAWPF-DuAwiTii.js} +1 -1
  31. package/dist/client/assets/{graph-BljmCiGu.js → graph-B7irxl7Q.js} +1 -1
  32. package/dist/client/assets/index-CTyjGQHF.css +1 -0
  33. package/dist/client/assets/index-Uidvbtqb.js +777 -0
  34. package/dist/client/assets/{infoDiagram-42DDH7IO-Dh_U82lE.js → infoDiagram-42DDH7IO-Gdh2w_Ry.js} +1 -1
  35. package/dist/client/assets/{ishikawaDiagram-UXIWVN3A-BtZhb0mv.js → ishikawaDiagram-UXIWVN3A-DvbqJman.js} +1 -1
  36. package/dist/client/assets/{journeyDiagram-VCZTEJTY-_Zd4No67.js → journeyDiagram-VCZTEJTY-DIQYAsjN.js} +1 -1
  37. package/dist/client/assets/{kanban-definition-6JOO6SKY-CpIIMkPJ.js → kanban-definition-6JOO6SKY-8BBtOuAV.js} +1 -1
  38. package/dist/client/assets/{layout-ButG21vs.js → layout-DDUpLunD.js} +1 -1
  39. package/dist/client/assets/{linear-C-frnGuN.js → linear-BzLoJVdP.js} +1 -1
  40. package/dist/client/assets/{mermaid.core-ISlBhdkY.js → mermaid.core-Ddi7z3V3.js} +4 -4
  41. package/dist/client/assets/{min-CalB2Q9y.js → min-CEKwugI-.js} +1 -1
  42. package/dist/client/assets/{mindmap-definition-QFDTVHPH-BfilPIUD.js → mindmap-definition-QFDTVHPH-y-V-6GIi.js} +1 -1
  43. package/dist/client/assets/{pieDiagram-DEJITSTG-Dm_1WIPT.js → pieDiagram-DEJITSTG-DjqTUefi.js} +1 -1
  44. package/dist/client/assets/{quadrantDiagram-34T5L4WZ-DMzRgLeF.js → quadrantDiagram-34T5L4WZ-BZbwyDuC.js} +1 -1
  45. package/dist/client/assets/{requirementDiagram-MS252O5E-Bl1lUR6U.js → requirementDiagram-MS252O5E-M2epVejI.js} +1 -1
  46. package/dist/client/assets/{sankeyDiagram-XADWPNL6-VxDrFumf.js → sankeyDiagram-XADWPNL6-DQHzVL6h.js} +1 -1
  47. package/dist/client/assets/{sequenceDiagram-FGHM5R23-BoB_k7L2.js → sequenceDiagram-FGHM5R23-Dldq08WJ.js} +1 -1
  48. package/dist/client/assets/{stateDiagram-FHFEXIEX-C8DFihD3.js → stateDiagram-FHFEXIEX-B32muPdI.js} +1 -1
  49. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-Ct3tm_Bq.js +1 -0
  50. package/dist/client/assets/{timeline-definition-GMOUNBTQ-G5hn4rEl.js → timeline-definition-GMOUNBTQ-nSYYEX6t.js} +1 -1
  51. package/dist/client/assets/{vennDiagram-DHZGUBPP-D_jMNDmm.js → vennDiagram-DHZGUBPP-DPIMKKCQ.js} +1 -1
  52. package/dist/client/assets/{wardley-RL74JXVD-Clc5Li47.js → wardley-RL74JXVD-DArerB6Y.js} +1 -1
  53. package/dist/client/assets/{wardleyDiagram-NUSXRM2D-Bygn2On7.js → wardleyDiagram-NUSXRM2D-DRvimWEN.js} +1 -1
  54. package/dist/client/assets/{xychartDiagram-5P7HB3ND-arK3uijt.js → xychartDiagram-5P7HB3ND-D0VCX3ps.js} +1 -1
  55. package/dist/client/index.html +2 -2
  56. package/package.json +1 -1
  57. package/dist/client/assets/channel-DA6xE92d.js +0 -1
  58. package/dist/client/assets/classDiagram-6PBFFD2Q-D46R_D_e.js +0 -1
  59. package/dist/client/assets/classDiagram-v2-HSJHXN6E-D46R_D_e.js +0 -1
  60. package/dist/client/assets/clone-DV233GSJ.js +0 -1
  61. package/dist/client/assets/index-B7IECSX7.css +0 -1
  62. package/dist/client/assets/index-CSTdaEyG.js +0 -777
  63. package/dist/client/assets/stateDiagram-v2-QKLJ7IA2-DlDadEC7.js +0 -1
package/AGENTS.md CHANGED
@@ -4,13 +4,13 @@
4
4
 
5
5
  ## Owns
6
6
 
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.
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 (including the `validateHost`-gated `GET /observer/api-catalog` route-catalog introspection that backs the Settings backend-API list), 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`; 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 the console data directory's `state.json` (`createDurableJsonStore`, `sensitivity: "sensitive"`). The data directory follows the release channel: published stable builds use `~/.fleet/console/state.json`, while unpublished local runs (`pnpm fleet-console`/`tsx`) use the project workspace `.fleet/console/state.json` co-located with the lock, so a dev console never shares Theaters/Operations with a globally installed one. Setting `FLEET_CONSOLE_DIR` relocates the durable state (and captures) into that directory too — co-located with the lock, matching the runtime-file escape hatch — so a read-only checkout can point its writable runtime slot away from the project tree. 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. Each Operation also records whether its label came from the operator or from automatic naming (`labelSource`), so the prompt-derived auto-name never overwrites a manual rename.
12
12
  - A capture inbound channel writes `{fleetSessionId}.json` under the same console data directory's `captures/` (`~/.fleet/console/captures/` for stable, the project `.fleet/console/captures/` for local runs). 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()` (stable) / the project `.fleet/console` lock (local).
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.
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 surface renders a single spatial Map canvas of terminal sessions filtered to the active Theater; operators create sessions directly on the canvas (Shift-drag or right-click), choosing an Agent CLI before a new terminal session starts. Each session panel lists its active carrier jobs in a floating job dock, and selecting a job opens a centered streaming overlay scoped to that session's jobs. The canvas also hosts free shell panels (right-click) that resolve their cwd from the active Theater. 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.
14
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.
15
15
  - The observer-side client contract: REST snapshot fetches and the SSE consumption loop with reconnect/resync.
16
16
  - The streaming view model: the event reducer that folds `CarrierJobStreamEvent` timelines into per-job, per-track views with incremental text accumulation.
@@ -21,7 +21,7 @@
21
21
  - 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.
22
22
  - 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.
23
23
  - 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.
24
- - Codex has two presentation modes — **Full** (the dedicated `/console/codex` route) and **Side** (a right-docked overlay panel over the current route). A single shared mount host (`codex-host.ts`) is relocated between containers with `appendChild` and is never mounted twice — the Vanilla client is a module-level singleton, so exactly one Codex instance is ever live and switching modes must not `destroy()`+remount. In every mode the URL stays `/console/codex/...`; Side keeps the previously active route mounted as a background via the react-router `<Routes location=…>` pattern, and a direct deep-link or refresh onto `/codex` always renders Full. The view mode persists at `fleet-console.codex.view-mode` (`route`|`side`) and is switchable both from the global navigation bar (on the Codex route) and, while Side is closed, from a right-edge handle shown on any non-Codex route that opens Side directly (navigates to `/codex` and switches to `side`); the Side panel width persists at `fleet-console.codex.side-width` with no fixed min/max (viewport-bounded only), and the Codex layout is container-responsive — it sheds the rail, then the nav, as the panel narrows, leaving only the reading content. While Side is open, the ⌘K command palette is scoped to the Side panel region instead of rendering full-screen (driven by a `data-codex-side` body marker plus the `--codex-side-width` body variable), and the panel header carries manual collapse toggles for the left (Nav) and right (ToC/Manifest) panes — persisted at `fleet-console.codex.nav-collapsed`/`fleet-console.codex.rail-collapsed` and applied via `app-shell--nav-collapsed`/`app-shell--rail-collapsed` grid classes, independent of the container-query auto-collapse. The pane-collapse state is owned by the Vanilla Codex module and exposed to the React surface only through the `codex-host.ts` boundary.
24
+ - Codex has two presentation modes — **Full** (the dedicated `/console/codex` route) and **Side** (a right-docked overlay panel over the current route). A single shared mount host (`codex-host.ts`) is relocated between containers with `appendChild` and is never mounted twice — the Vanilla client is a module-level singleton, so exactly one Codex instance is ever live and switching modes must not `destroy()`+remount. In every mode the URL stays `/console/codex/...`; Side keeps the previously active route mounted as a background via the react-router `<Routes location=…>` pattern, and a direct deep-link or refresh onto `/codex` always renders Full. The view mode persists at `fleet-console.codex.view-mode` (`route`|`side`) and is switchable from a right-edge handle shown on any non-Codex route that opens Side directly (navigates to `/codex` and switches to `side`); the Side panel width persists at `fleet-console.codex.side-width` with no fixed min/max (viewport-bounded only), and the Codex layout is container-responsive — it sheds the rail, then the nav, as the panel narrows, leaving only the reading content. While Side is open, the ⌘K command palette is scoped to the Side panel region instead of rendering full-screen (driven by a `data-codex-side` body marker plus the `--codex-side-width` body variable), and the panel header carries manual collapse toggles for the left (Nav) and right (ToC/Manifest) panes — persisted at `fleet-console.codex.nav-collapsed`/`fleet-console.codex.rail-collapsed` and applied via `app-shell--nav-collapsed`/`app-shell--rail-collapsed` grid classes, independent of the container-query auto-collapse. The pane-collapse state is owned by the Vanilla Codex module and exposed to the React surface only through the `codex-host.ts` boundary.
25
25
  - The Codex reading surface uses a single `app-shell` grid for every route. The reading measure (78ch at 17px / 1.78) is owned by `.markdown-body` and its reading-wrapper siblings (`.document-header`, `.related-list`) — never the shell grid; the shell max-width is 1680px and the rail track is `clamp(272px, 20vw, 320px)`. Shell modifiers are limited to `app-shell--wide` (browse routes home/index-md/log/conflicts/queue — rail removed), `app-shell--raw` (raw source — rail removed, full-width body, sidebar kept; the old `renderRawShell()` is gone), and the Side-only `app-shell--nav-collapsed`/`app-shell--rail-collapsed`. Modifiers only set grid columns/areas (single-class or `:where()` specificity) so the 900px/560px container queries still win by cascade, and queue-detail keeps its own internal `1fr + 300px` layout. The reading rail renders the ToC before the Manifest (the Manifest is an open-by-default `<details>`), the ToC has an `IntersectionObserver` scroll-spy that cleans up on every route change, and below 760px the rail is replaced by a document-level ToC drawer (a focus-trapped `role="dialog"`). Reading entries carry a breadcrumb and drop a duplicate title only when the first markdown H1 exactly normalizes to the entry title. Codex typography is tokenized through `--font-size-*`; brass = active/location and aurora = live/link semantics, glass surfaces, self-hosted Fraunces/Manrope/JetBrains Mono, and `prefers-reduced-motion` short-circuits are unchanged.
26
26
  - 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.
27
27
  - 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.
@@ -62,7 +62,7 @@
62
62
 
63
63
  ## Tech Stack (deliberate)
64
64
 
65
- - **React 19 + Vite + TypeScript.** Chosen because the console's core requirement is smooth incremental streaming UI and the package is slated to grow into the unified Fleet GUI. Do not replace with hand-rolled DOM rendering. A second surface has now landed (the Welcome dashboard), so `react-router-dom` (`BrowserRouter` with `basename="/console"`) is the sanctioned client router. Routes: `/` renders **Welcome** (the live dashboard); `/operations` renders the carrier observation surface (Sidebar + JobView); unknown paths redirect to `/`. The console backend already serves extensionless `/console/*` paths as `index.html` (SPA fallback in `static-console.ts`), so client-side routes require **no** backend change. Routing state belongs to react-router; observation data stays in the external `store.ts`. Do not add a state-management library until that store proves insufficient.
65
+ - **React 19 + Vite + TypeScript.** Chosen because the console's core requirement is smooth incremental streaming UI and the package is slated to grow into the unified Fleet GUI. Do not replace with hand-rolled DOM rendering. `react-router-dom` (`BrowserRouter` with `basename="/console"`) is the sanctioned client router. Routes: `/` redirects to `/operations`; `/operations` renders the carrier observation surface (the Map canvas of session panels + JobView); unknown paths redirect to `/operations`. The console backend already serves extensionless `/console/*` paths as `index.html` (SPA fallback in `static-console.ts`), so client-side routes require **no** backend change. Routing state belongs to react-router; observation data stays in the external `store.ts`. Do not add a state-management library until that store proves insufficient.
66
66
  - State lives in a framework-agnostic external store (`client/src/store.ts`) bridged via `useSyncExternalStore`. Pure reduction logic stays in `client/src/reduce.ts` and must remain React-free and unit-tested.
67
67
  - Web fonts are self-hosted via `@fontsource-variable/*`. External font CDNs are forbidden.
68
68
  - Browser launch must use OS-level commands via `child_process.spawn`; do not add an `open` dependency.