@abelxiaoxing/cadence 2.0.13 → 2.0.15

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/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # Cadence
2
2
 
3
3
  `@abelxiaoxing/cadence` is a shared Pi task workspace with two independently usable clients: native `/cadence` and a browser WebUI.
4
- One persistent service owns tasks, bounded subagent collaboration, real parent checks and retained history.
5
- Ordinary conversations, resource discovery and opening history never start work or a service.
4
+ One authenticated workbench entry routes to independent project owners, which own tasks, bounded subagent collaboration, real parent checks and retained history.
5
+ Resource discovery and opening history never start work or a service.
6
+ The WebUI also supports ordinary Pi conversations: only an explicit Send starts their direct host-tool work, independently of Cadence task admission.
6
7
  `cadence server install` registers that service with the user's service manager and starts its WebUI on the default address.
7
8
 
8
9
  This is a trusted workflow assistant, **not a sandbox, certified executor or transactional application system**.
@@ -21,7 +22,9 @@ cadence server install
21
22
  The global install puts `cadence` (and its alias `cadence-service`) on `PATH`.
22
23
  Cadence ships no install script, so npm 12 and Bun, which skip untrusted install scripts by default, change nothing.
23
24
  They may still report blocked scripts from the pinned Pi SDK's dependencies: `@google/genai`'s preinstall only echoes `no-op`, and `protobufjs`'s postinstall only warns about a dependent's version scheme, so neither needs approval.
24
- `cadence server install` registers and starts the background service for `~/cadence` on `http://127.0.0.1:17423`; `--workspace /absolute/project` selects another workspace.
25
+ `cadence server install` registers and starts the project-less workbench on `http://127.0.0.1:17423`; it does not create `~/cadence` or select a working directory.
26
+ Open an existing folder explicitly in the workbench to associate its project owner.
27
+ The explicit `--workspace /absolute/project` option retains the older single-project service route for compatibility; it never creates a missing project.
25
28
  It prints the private link to open, `http://127.0.0.1:17423/?token=…`.
26
29
  The port and that token live with the research settings in `~/.pi/agent/cadence/.env`.
27
30
  Install creates that file from the research template when missing (Pi's startup card names the path until it exists), and adds either line when it is missing, never changing an existing one:
@@ -89,7 +92,10 @@ cadence token-link --workspace /absolute/project --reveal
89
92
  Use the installed `cadence` bin (or `cadence-service`), or `node /absolute/cadence/src/service-cli.mjs` followed by those arguments.
90
93
  Default binding is numeric loopback `127.0.0.1:17423`; `--foreground` is available for an explicitly configured supervisor.
91
94
  Start reads the existing Pi agent directory (or an explicit private configuration), never creates another login/profile.
92
- A directory that contains the private state home (the home directory and its ancestors, such as `C:\Users\<you>`) cannot be a workspace, so commands there use `~/cadence` instead of refusing; only `start` creates it, and `/cadence` started there attaches to that owner.
95
+ Without `--workspace`, `cadence start|status|diagnose|stop|token-link|token-rotate` address the workbench; `cadence workbench <operation>` is the explicit equivalent.
96
+ Project-scoped commands and native `/cadence` require an actual project directory.
97
+ A directory containing private state, or inside the private namespace, is refused as a project root without redirection, mkdir or reconstruction.
98
+ An existing `~/cadence` is consumer data: it is neither deleted nor automatically associated.
93
99
  See [service management](docs/service-management.md) for configuration, model/auth policy, Stop, diagnosis and informed recovery.
94
100
 
95
101
  ### Native terminal
@@ -131,18 +137,51 @@ For manual checks, `pi -e ./src/index.ts -e ./scripts/agent-panel-demo.ts` adds
131
137
 
132
138
  Open the private link that `cadence server install` printed, or that `cadence token-link --reveal` reveals.
133
139
  Valid bootstrap redirects to a token-free URL and uses an HttpOnly SameSite cookie for subsequent HTTP/WebSocket access; no localStorage token copy.
134
- The browser can create/plan/Start/Cancel, run exact configured checks and record human review without a live Pi terminal.
140
+ The unified browser entry first shows projects, without an execution cwd, SDK session or default workspace.
141
+ Only explicit Open starts or reuses a project owner.
142
+ Within that project, the browser opens on an ordinary conversation with a real message composer, retained multi-turn context and standard read/write/edit/bash tools; no Cadence task is created by Send.
143
+ Use `cadence <goal>` or `/cadence <goal>` at the beginning of the input, or select Cadence task, to prepare a separate task.
144
+ Mentions, quotations and fenced code do not select task mode.
145
+ Create is not Start: the readable plan, explicit Start, exact configured checks and human review remain separate.
146
+ A task created from an existing ordinary conversation retains a navigation link back; the old conversation is not converted and its history is not silently injected into the task.
147
+ All of this works without a live Pi terminal.
135
148
  A token grants workspace access, not action consent.
136
- Every mutation needs its own context-bound preview/confirmation; stale/duplicate/lost replies do not silently replay work.
149
+ Cadence task mutations need their own context-bound preview/confirmation.
150
+ Ordinary Send binds its exact text, conversation head, epoch, access and selected model; stale/duplicate/lost replies do not silently replay work.
137
151
  The WebUI provides task/run/assignment navigation, long retained messages and tool detail, exact literal search, timeline and complete scoped NDJSON/Markdown downloads.
138
152
  Desktop panes and phone drawers retain cancellation and keyboard controls.
139
- Its layout follows pi-web-ui: the topbar shows the connection state, every recorded view as a tab, icon actions, the exact owner model and a **New task** chip; the left sidebar lists the project, running conversations and task history, each task's runs and subagents nested under it; the right panel holds the task's plan, checks, changes and review; a statusbar sits below.
140
- With no task selected the page is pi's new conversation: a welcome page with starter cards above a composer whose Enter previews Create (kind and model chips beside it), and a confirmed Create opens its new task.
141
- A selected task shows its conversation and, where the composer sits, a next-step bar (goal → plan → start → check and review) whose buttons only open panels or request previews; every effect still needs its own confirmation.
142
- Phones wrap the topbar into an action row and an icon tab row, with both panels as drawers.
153
+ Its chrome follows pi-web-ui: a compact topbar with view tabs and icon actions, a sectioned task sidebar, pill inspector tabs, transcript/tool cards and a bottom statusbar; phones wrap the topbar into an action row and an icon tab row.
154
+ The left sidebar lists recent projects and running/retained conversations; a separate lower-left dock observes Cadence subagents and opens their retained transcripts.
155
+ It is not pi-web-ui's subagent engine.
156
+ The right sidebar defaults to readonly files, bounded text previews and path-only references; task plan/check/change/review controls occupy its Task details tab.
157
+ The lower-right folder button browses directories on the service host and explicitly opens another independent project owner.
158
+ The unified entry switches project clients on the same origin, including an explicitly configured HTTPS proxy; it never changes a running task's cwd, registers a boot service or cancels the project left behind.
159
+ Backend cookies and native capabilities never reach the browser; proxied actions remain browser-authority actions, with owner-side consent/build/CSRF checks.
160
+ The gateway refuses the legacy project-level Open command: all project openings use its own association route, without returning an independent backend token link.
161
+ Direct legacy project entries remain available; only that compatibility route retains its older loopback-only cross-project navigation.
143
162
  The interface is in English or Simplified Chinese: it follows the browser's first preferred language, and the topbar's globe chip (`中文` / `EN`) switches it, remembered only in that browser.
144
163
  Error codes, identifiers, commands and recorded content stay untranslated.
145
164
 
165
+ #### Ordinary conversation boundaries
166
+
167
+ Ordinary conversations run through the same isolated SDK process launcher, exact model/auth sources and orderly Stop as tasks, with a separate private `service-v1/conversations-v1` store rather than fabricated task records or imported Pi sessions.
168
+ Their tools operate on the host, not in a sandbox.
169
+ Each turn holds the checkout's exclusive gate, so ordinary turns, Cadence children and parent checks cannot edit/read across one another's active write window; leaving a tab only detaches.
170
+ Conversation identities are not recreated when their metadata disappears, unaccepted turn directories are never adopted, and rolling private writes compare their exact expected bytes.
171
+ An active turn retains independent interruption authority even when its metadata is unavailable; readonly views do not reconstruct that metadata.
172
+ Access-token rotation revokes viewers, not admitted queued turns.
173
+ A completed turn retains sanitized text and tool exchanges for its next explicit Send.
174
+ The bounded checkpoint passes through an anonymous pipe and owner-side credential redaction before persistence; hidden thinking, signatures and media are not retained.
175
+ Failed, interrupted or over-budget turns remain visible but currently require a new conversation instead of replaying incomplete context.
176
+ A restart never resumes pending turns; unknown work keeps fences.
177
+ There is no upstream goal/delegate loop, subagent tool/template pack, PTY, plugin loader, prompt composer or automatic retry/compaction.
178
+ Ordinary resources are Pi's base prompt, applicable `SYSTEM.md`/`APPEND_SYSTEM.md`/project instructions and the default skill directories, loaded on demand at Send; package extensions and package-discovered resources are not loaded into these workers.
179
+ Limits are explicit: 200 conversations, 1000 turns per conversation, eight admitted turns (serialized within one checkout), 384KiB per retained visible turn, 2MiB continuation context, and 512MiB/10,000 entries for the separate conversation store, without eviction.
180
+ Task history retains its existing independent bounds.
181
+ File browsing lists at most 200 entries from 2000 directory entries and previews at most 128KiB of UTF-8 text.
182
+ It refuses symlinks, hard-linked files, private state, Pi's agent directory (including its configured alias target), `.git`, `.env` variants, common credential directories such as `.ssh`/`.aws`, and credential/config filenames; limitations remain visible.
183
+ This is not a filesystem sandbox for model tools.
184
+
146
185
  ### Root services and independent projects
147
186
 
148
187
  Linux can run Cadence as a system-level root service, without a user bus or linger:
@@ -165,7 +204,7 @@ cadence project open /absolute/new-project --create
165
204
 
166
205
  A new project selects an available loopback port once; reopening keeps its exact owner, port, cwd and history.
167
206
  The command prints its private WebUI entry link; it does not create a task, choose a model or Start execution, and existing projects' admitted work continues.
168
- Each project has its own WebUI entry and native `/cadence` attachment, not a global mutable cwd or a same-page cross-project router.
207
+ Each project retains its native `/cadence` attachment and independent owner; the unified browser routes to it without a global mutable execution cwd.
169
208
  For independent boot services, use `cadence server install --system --name api --workspace /srv/api --port 17424` as root, and manage it with the same `--system --name api` flags.
170
209
  See [service management](docs/service-management.md) for migration, named port/token files and limits.
171
210
 
@@ -193,6 +232,10 @@ Capture reports redaction, omitted binary/hidden data, source truncation and inc
193
232
  Known-secret redaction is not universal detection of business secrets.
194
233
  Storage exhaustion refuses new work rather than silently evicting history.
195
234
 
235
+ Workbench state lives separately under `<state-home>/cadence-assistant-v1/workbenches-v1/<configuration-hash>/`, not in a hidden substitute workspace.
236
+ Whole-workbench Stop joins its accepted openings and associated exact-epoch project owners, serializing their final registry releases; unrelated, unassociated owners are not stopped.
237
+ A changed epoch, uncertain launch or unconfirmed Stop keeps the workbench fenced, but does not prevent Stop from reaching its other known associated owners.
238
+ Workbenches never repair missing private state or erase uncertain locks.
196
239
  Service restart never resumes the old queue.
197
240
  Uncertain process/auth/storage settlement keeps fences; use documented local informed recovery, not PID-only deletion or automatic cleanup.
198
241
 
@@ -265,6 +308,13 @@ Historical logs are not runtime dependencies, and removing development tooling m
265
308
  | `web/src/` | Reused presentation and thin shared-client adapters, not SDK/session/execution ownership |
266
309
  | `scripts/`, `provenance/`, `licenses/` | Reproducible builds, exact package/body/reference/notice audits and pinned reuse |
267
310
 
311
+ `src/service/{gateway,gateway-store,gateway-cli}.ts` owns the no-project entry, private workbench coordination and same-origin project routing, not task execution.
312
+ A root access rotation retires its proxy attachment IDs and detaches those exact browser viewers at the owners, without cancelling admitted work.
313
+ The first version requires a selected project for ordinary Send/tools; the empty workbench is a project selector, not an unbound chat executor.
314
+ `src/service/{workbench,conversations,workbench-files}.ts` owns ordinary conversations, their private retained turns, readonly files and explicit project navigation; `src/service/contracts/workbench.ts` is the portable closed DTO boundary.
315
+ Conversation auth intents and original settlements use their own flushed private journal, never fabricated task/history receipts.
316
+ Their original Stop lifetime and exclusive checkout barrier belong to the existing service owner and scheduler.
317
+
268
318
  The native path is `index → shell → native client → service → scheduler/process/history`.
269
319
  `src/task-controller.ts` remains a legacy regression subject, not a reachable or shipped production executor.
270
320
  The readonly operator and independent research/startup modules must not gain service startup or execution side effects.
@@ -282,6 +332,11 @@ Use their current declarations rather than copying DTO parsing, reducers, a seco
282
332
  Ordinary-user Git trust behavior remains unchanged.
283
333
  System services require uid0, bypass user managers/logind entirely and require confirmed native Stop before manager stop or definition replacement; changed state-home inputs, old user units and detached running owners refuse implicit adoption.
284
334
  Registry reservation atomically rejects canonical ancestor/descendant overlaps, including nested Git roots and aliases; a different state-home does not coordinate arbitrary other owners.
335
+ - The short global registry lock never expires or auto-reclaims from PID absence.
336
+ `recover inspect|resolve` handles a valid dead same-host lock explicitly before project recovery, with fresh local-terminal acknowledgments, exact registry/unreserved-project checks and a flushed exclusive evidence receipt.
337
+ Concurrent or interrupted resolvers cannot remove a successor lock; all project reservations, locks and history remain intact.
338
+ Unreserved partial release, unsafe/corrupt registry or receipt bytes, live/remote/ambiguous holders and changed resources stay fenced.
339
+ Readonly diagnosis and project Open name `registry-locked`; see [global registry recovery](docs/service-management.md#residual-global-registry-lock).
285
340
  - Native entry requires fresh raw Enter within1500ms, trusted/idle TUI, no pending modal/messages and no child guard.
286
341
  Browser authentication grants access, not task consent; normal mutation ingress also requires independently built compatible client/service/assets identities.
287
342
  - Boot model choice is absent until explicitly selected.
@@ -334,7 +389,8 @@ Local operation errors neither hide an independent observation error nor imply t
334
389
 
335
390
  ### Capture, retained history and privacy
336
391
 
337
- The maintained worker uses public SDK APIs, explicit empty resources, in-memory session/settings and disabled retries/compaction/cache warming.
392
+ Task workers use public SDK APIs, explicit empty resources, in-memory session/settings and disabled retries/compaction/cache warming.
393
+ Ordinary-conversation workers share that launcher/auth/capture boundary but load only the explicit ordinary resource policy above and restore their own bounded sanitized checkpoint into an in-memory SessionManager.
338
394
  Verify exact model and effective thinking before READY/prompt; no provider discovery, credential argv/file envelope or implicit network fallback.
339
395
  Use the awaited public core-agent subscription for backpressure, reserving synchronous tool/update ingress before any copy or await.
340
396
  Custom bash uses public local operations plus the bounded redacted accumulator, not the stock raw-spill accumulator.
@@ -381,51 +437,53 @@ Browser download requested is not UI-verified completion; native export verifies
381
437
 
382
438
  Byte values are UTF-8/encoded bounds where specified; they are not targets to silently increase when a fixture fails.
383
439
 
384
- | Boundary | Default / ceiling |
385
- | --------------------- | ---------------------------------------------------------------------------------------------------------------- |
386
- | Graph / assignments | 512KiB body;1–16 required assignments |
387
- | Scheduling | 8 episodes;128 queued assignments;2 preparing/running/closing child-or-check reservations |
388
- | Policy deadlines | 6h episode;10min ready wait;20min default worker |
389
- | Dependency input | 16KiB per predecessor;32KiB aggregate; oversized required input blocks, not clips |
390
- | Worker request | 96KiB public pre-auth plus32KiB reserve; actual complete envelope128KiB |
391
- | Process stop | TERM then KILL after1000ms; unknown after3000ms without confirmed close |
392
- | Native service checks | 16MiB aggregate raw output;64KiB raw chunk;32MiB retained detail; legacy256KiB/64KiB behavior unchanged |
393
- | Capture | 64KiB encoded frame;8KiB decoded chunk;32MiB detail;128MiB child protocol |
394
- | Capture queues | Worker4MiB/1024 frames; owner8MiB/2048;5s reporting stall retains original charges |
395
- | Task v1 | 128KiB record; goal8KiB/plan32KiB/result and baseline16KiB;32 checks/64 activity;1000-task compatibility ceiling |
396
- | Read quantum | 8MiB or100ms cooperative work, including resumed proof/accounting |
397
- | Read replies | 512KiB full paged/progress Reply;256KiB detail text; graph data/export-frame1MiB with graph body512KiB |
398
- | Paging/search | 50 default/200 maximum entries; literal case-sensitive query1–1024 bytes |
399
- | Navigation | 8192 encoded ASCII bytes; encrypted plaintext6000 bytes; no execution authority |
400
- | Live/export | 16 viewers,256 messages/1MiB each; two search/two export readers;120s download idle, not total archive timeout |
401
- | Storage | 10GiB checkout quota;512MiB reserved per episode;256MiB free-space floor; no TTL cleanup |
402
- | Assets | 16MiB per member/64MiB closure; fixed complete manifest and all font bodies |
440
+ | Boundary | Default / ceiling |
441
+ | --------------------- | -------------------------------------------------------------------------------------------------------------------- |
442
+ | Graph / assignments | 512KiB body;1–16 required assignments |
443
+ | Scheduling | 8 episodes;128 queued assignments;2 preparing/running/closing child-or-check reservations |
444
+ | Policy deadlines | 6h episode;10min ready wait;20min default worker |
445
+ | Dependency input | 16KiB per predecessor;32KiB aggregate; oversized required input blocks, not clips |
446
+ | Worker request | 96KiB public pre-auth plus32KiB reserve; actual complete envelope128KiB |
447
+ | Process stop | TERM then KILL after1000ms; unknown after3000ms without confirmed close |
448
+ | Native service checks | 16MiB aggregate raw output;64KiB raw chunk;32MiB retained detail; legacy256KiB/64KiB behavior unchanged |
449
+ | Capture | 64KiB encoded frame;8KiB decoded chunk;32MiB detail;128MiB child protocol |
450
+ | Capture queues | Worker4MiB/1024 frames; owner8MiB/2048;5s reporting stall retains original charges |
451
+ | Task v1 | 128KiB record; goal8KiB/plan32KiB/result and baseline16KiB;32 checks/64 activity;1000-task compatibility ceiling |
452
+ | Read quantum | 8MiB or100ms cooperative work, including resumed proof/accounting |
453
+ | Read replies | 512KiB full paged/progress Reply;256KiB detail text; graph data/export-frame1MiB with graph body512KiB |
454
+ | Paging/search | 50 default/200 maximum entries; literal case-sensitive query1–1024 bytes |
455
+ | Navigation | 8192 encoded ASCII bytes; encrypted plaintext6000 bytes; no execution authority |
456
+ | Live/export | 16 viewers,256 messages/1MiB each; two search/two export readers;120s download idle, not total archive timeout |
457
+ | Storage | 10GiB checkout quota;512MiB reserved per episode;256MiB free-space floor; no TTL cleanup |
458
+ | Registry recovery | 1024 namespace entries; 128 immutable attempts per lock incarnation; no evidence eviction |
459
+ | Unified workbench | 128 associated projects; 1024 durable opening receipts; 64 connections; bounded proxy frames and bodies; no eviction |
460
+ | Assets | 16MiB per member/64MiB closure; fixed complete manifest and all font bodies |
403
461
 
404
462
  ### Validation and regression lessons
405
463
 
406
- | Condition | Required behavior |
407
- | -------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
408
- | Missing/unsafe/corrupt/partial selected state | Absent or fixed refusal; no bootstrap, adoption, repair or cleanup on observation |
409
- | Native exit0 with recording/stdin/final/cleanup failure | Preserve native zero independently; no workflow success |
410
- | Stale grant, selected task bytes or model/source identity | Refuse and require fresh observation/confirmation |
411
- | Unknown original stop/auth/storage or changed lease | Retain fences/charges; no guessed process signaling or automatic release |
412
- | Failed/unrun/stale check, partial child or incomplete coverage | Explicit issues review; preserve independent recorded outcomes |
413
- | Lost reply or detached view | Observe original receipt/run; no mutation replay or implicit Cancel |
414
- | Invalid read proof or changed source/key | Refuse; never rebase or interpret budget exhaustion as absence |
415
- | Dirty/partial/extra compiled assets or unsafe archive | Refuse in place; no source refill, wildcard serving or fallback build |
416
- | Extension import outside Pi aliases declared only as a peer | Exact production dependency; Pi's install omits peers and Pi fails to start |
417
- | Server install without the optional SDK or Pi `auth.json` | No SDK: nothing written; no `auth.json`: registered, not started (no quarantine) |
418
- | Package files hard-linked into a package manager's store (Bun) | Packaged reads ignore link count, bind exact bodies; other files stay single-link |
419
- | Host refuses during startup | Fixed code/stage only; unregistered exits `refused`, registered stays `quarantined` |
420
- | Workspace containing the private state home | Land on `~/cadence` (only start creates it); never move state into the working copy |
421
- | Restart changes the definition's workspace or Node path | Stop with the loaded definition before rewriting, not only a signal |
422
- | npm 12 or Bun skips untrusted install scripts by default | Ship none; `cadence server install` registers the service and creates the template |
423
- | Service manager that only signals (launchd, Windows login) | Orderly Stop first; an unconfirmed Stop changes nothing; no SIGTERM or `taskkill` |
424
- | Pi's TUI replaces an info status with the next one | The missing-service hint is its own warning notification |
425
- | Token source the user edits (`CADENCE_TOKEN` in `.env`) | Read once before binding, never bound for the run: an edit cannot fence Stop |
426
- | Saved port/token source differs from `.env` | Only when stopped, reselect just those under the reservation; running ones refuse |
427
- | User-made `.env` (0755/0644, umask 002, dotfiles links) | Like Pi's sources: ownership only, links followed; each refusal names its reason |
428
- | Credential value inside a provider/model ID (Ollama `ollama`) | Withhold and count only that catalog entry; choosing it refuses; others selectable |
464
+ | Condition | Required behavior |
465
+ | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
466
+ | Missing/unsafe/corrupt/partial selected state | Absent or fixed refusal; no bootstrap, adoption, repair or cleanup on observation |
467
+ | Native exit0 with recording/stdin/final/cleanup failure | Preserve native zero independently; no workflow success |
468
+ | Stale grant, selected task bytes or model/source identity | Refuse and require fresh observation/confirmation |
469
+ | Unknown original stop/auth/storage or changed lease | Retain fences/charges; no guessed process signaling or automatic release |
470
+ | Failed/unrun/stale check, partial child or incomplete coverage | Explicit issues review; preserve independent recorded outcomes |
471
+ | Lost reply or detached view | Observe original receipt/run; no mutation replay or implicit Cancel |
472
+ | Invalid read proof or changed source/key | Refuse; never rebase or interpret budget exhaustion as absence |
473
+ | Dirty/partial/extra compiled assets or unsafe archive | Refuse in place; no source refill, wildcard serving or fallback build |
474
+ | Extension import outside Pi aliases declared only as a peer | Exact production dependency; Pi's install omits peers and Pi fails to start |
475
+ | Missing optional SDK or Pi `auth.json` | Project-less workbench may start without loading either; explicit project startup retains its refusal |
476
+ | Package files hard-linked into a package manager's store (Bun) | Packaged reads ignore link count, bind exact bodies; other files stay single-link |
477
+ | Host refuses during startup | Fixed code/stage only; unregistered exits `refused`, registered stays `quarantined` |
478
+ | Workspace containing the private state home | Refuse the project selection; no redirection, default directory or state relocation |
479
+ | Restart changes the definition's workspace or Node path | Stop with the loaded definition before rewriting, not only a signal |
480
+ | npm 12 or Bun skips untrusted install scripts by default | Ship none; `cadence server install` registers the service and creates the template |
481
+ | Service manager that only signals (launchd, Windows login) | Orderly Stop first; an unconfirmed Stop changes nothing; no SIGTERM or `taskkill` |
482
+ | Pi's TUI replaces an info status with the next one | The missing-service hint is its own warning notification |
483
+ | Token source the user edits (`CADENCE_TOKEN` in `.env`) | Read once before binding, never bound for the run: an edit cannot fence Stop |
484
+ | Saved port/token source differs from `.env` | Only when stopped, reselect just those under the reservation; running ones refuse |
485
+ | User-made `.env` (0755/0644, umask 002, dotfiles links) | Like Pi's sources: ownership only, links followed; each refusal names its reason |
486
+ | Credential value inside a provider/model ID (Ollama `ollama`) | Withhold and count only that catalog entry; choosing it refuses; others selectable |
429
487
 
430
488
  Good: current context → explicit grant → durable acceptance → genuine original native/storage settlement → exact retained dependency → real checks → human review.
431
489
  Base: a client leaves and another reattaches to the same accepted run without launching it again.
@@ -453,7 +511,7 @@ Preserve failed attempts; correct a demonstrated cause before rerunning, and nev
453
511
  Regression owners:
454
512
 
455
513
  - `service-contract`, `service-current`, `service-model-choice`, `service-auth`: closed DTOs, exact source/choice/current authority, security and compatibility.
456
- - `service-owner`, `service-accepted-work`, `service-stop-continuation`, `service-recovery`: original operations, overlap, Stop, unknown fences and informed recovery.
514
+ - `service-owner`, `service-accepted-work`, `service-stop-continuation`, `service-recovery`, `service-registry-recovery`: original operations, overlap, Stop, unknown fences and informed recovery.
457
515
  - `service-scheduler`, `service-checks`, `service-human-review`, `service-accepting-host`: real SDK overlap/exclusion, native checks, review and publication.
458
516
  - `worker-*`, `lightweight-sdk`, `lightweight-process-diff`: genuine SDK/tool capture, split redaction, no-spill bounds and original native facts.
459
517
  - `service-history-*`: durable ordering, cold/no-index/restarted proof/search/export, corruption/torn/quota and expected-byte publication.
@@ -463,20 +521,20 @@ Regression owners:
463
521
  - `package-*`, `distribution`, `service-package`, `independence`: exact tar/member/body/import/notice closure and nonactivating discovery.
464
522
  - `service-autostart`, `project-start`, `install-config`: explicit `cadence server` registration on systemd (root system scope without linger, legacy user scope), launchd and the Windows Run key, separate named service definitions and directory owners, definition escaping, restart/disable/mask/foreign handling, orderly Stop before every change, the `.env` port and token lines and a package without install scripts.
465
523
  - `service-cli`: real owners started from the `.env` port and token, reselection of a stopped workspace, edits while running and rotation of the token line.
466
- - `workspace-landing`: home-directory redirection to `~/cadence` across management, native attach and observation.
524
+ - `workspace-landing`: no-default-workspace startup, explicit root refusal and noncreating native/readonly entry.
525
+ - `service-gateway` and `gateway-browser`: real same-origin project routing, browser-only authority, retirement on token rotation, continuing ordinary work and genuine multi-owner Stop; loopback and isolated HTTPS browser lanes.
467
526
 
468
527
  Regenerate operator/service/native/browser outputs only through their canonical builders; `--check` variants compare new private output without overwriting canonical bytes.
469
528
  WebUI text is keyed by its English source: fixed text goes through `useT().t`, whose type requires a `web/src/i18n/zh.ts` entry with the same `{name}` marks, and run-time status words or kept notices through `tx`, which passes unknown text and codes through.
470
529
  The timeline client takes the chosen language from its bridge and is remounted on a switch; browser scenarios pin `locale: "en-US"` so English assertions do not follow the host's `LANG`.
471
- The browser is conversation-first: the left panel groups the current service project, the actual active roster and retained task conversations, with run/subagent children under their task.
472
- One service still exposes one checkout; the project section is not a cross-project registry, Pi session importer or cwd switcher.
473
- The center shows retained message text as Markdown by default; tools/context/timeline/run facts are direct topbar tabs beside export/link actions, while the collapsible right inspector remains bound to the task's current plan/check/change/review context even when viewing a child.
474
- With no task selected the center is the new-task composer; Enter only requests a Create preview, and a followed Create receipt opens its task once published.
475
- A selected task's next-step bar derives its step from the saved graph revision, observed runs and the active roster (the Cancel authority); it opens inspector tabs or requests Generate/Start previews.
476
- An observation poll withholds action capability while it reads, which invalidates an open confirmation, so automatic follow-ups (receipt lookups, roster rereads after a run settles) never poll or navigate while a preview is prepared or confirmed.
477
- A failed poll is observed again after 2s, doubling to the 30s cadence; the owner can answer a read `receipt-inconclusive` briefly while it publishes.
530
+ The browser is conversation-first: ordinary chat and explicit Cadence task conversations share its sidebar, while a lower-left dock observes actual Cadence child identities.
531
+ One service still owns one checkout.
532
+ The recent-project directory records only explicit project openings in the same private namespace; navigation opens that project's independent authenticated entry rather than changing global cwd, importing Pi sessions or adopting another account's state.
533
+ The center shows ordinary streamed messages or retained task text as Markdown.
534
+ Task tools/context/timeline/run facts and export/link actions live under Details.
535
+ The right panel defaults to files; its Task details inspector remains bound to the task's current plan/check/change/review context even when viewing a child.
478
536
  Historical child links bind exact scope and watermark.
479
- Bounded history and Back never silently rebase; a conversation that fits its first page follows newer snapshots with one bounded read at a time, paged history offers an explicit new-activity update, and source limitations/progress stay visible even when complete-record metadata is folded.
537
+ Bounded history and Back never silently rebase; running conversations offer an explicit new-activity update, and source limitations/progress stay visible even when complete-record metadata is folded.
480
538
  Cancel uses the independent active roster (including the fallback strip when workspace discovery fails); navigation, project selection and hiding panels never cancel or authorize execution.
481
539
 
482
540
  Publish `web/dist` from Node: Vite run under Bun lays out its preload helper differently, so a Bun build fails a Node `build:web:check`.
@@ -484,13 +542,48 @@ Review the independently enumerated package member list and every emitted body,
484
542
  Keep public Pi peers external for the extension, the exact Undici/ws runtime edges, the exact optional SDK pins for the standalone owner and all upstream/font/vendor notices.
485
543
  Preserve original license bytes through their precise Git attributes; line-ending normalization must not invalidate audited source/notice hashes.
486
544
 
487
- ### Release 2.0.13 acceptance snapshot
545
+ ### Release 2.0.15 acceptance snapshot
546
+
547
+ The release candidate passed the complete root suite: 2034 tests in 85 files, with 27 platform skips on Linux.
548
+ The final browser-only frame-readiness adjustment then passed all 9 real-browser scenarios; 130 web tests and the 135-member real-pack audit also passed.
549
+ This is separate-lane evidence, not a claim that one final `verify` invocation was entirely green.
550
+ Observed environment: Linux x86_64, Node26.7.0, Bun1.3.14, Pi SDK0.84.3 and existing Chrome for Testing151.0.7922.34; root runs used `VITEST_MAX_WORKERS=1` without changing test deadlines.
551
+ New coverage includes actual registry-writer and resolver exits, concurrent resolvers, unchanged project fences/history, changed/linked/remote/live resources, a removed stopped workspace, piped/pasted/canceled refusal, genuine native-TTY confirmation and browser Open after explicit recovery without replay.
488
552
 
489
- Full `verify` passed on the 2.0.13 release candidate before this evidence-only paragraph: 1983 root tests in 80 files (27 skipped on Linux), 133 web tests, 6 real-browser scenarios and the 132-member pack audit.
490
- Observed environment: Linux x86_64, Node22.22.1, Bun1.3.14, Pi SDK0.84.3 and existing Chrome for Testing153.0.8010.12.
491
- The WebUI follows pi-web-ui's new-conversation layout: a bottom composer whose Enter only previews Create, starter cards that only fill the draft, a next-step bar per task, direct topbar view tabs and a New task chip; a followed Create receipt opens the created task.
492
- The accepting-browser scenario first failed with Confirm start disabled because automatic follow-ups polled while a confirmation was open; they now skip while a preview is prepared or confirmed.
493
- Service contracts are unchanged; no new Windows/macOS, real service-manager installation or paid-provider qualification is claimed.
553
+ The first integration command was cut off by its 25-minute outer command budget while tests were still running.
554
+ The next completed root run failed one omitted browser-test provenance pin (updated) and three owner/proxy settlement or timeout cases, which passed separately; their timing cause was not established.
555
+ A later complete root/web pass encountered Chromium's first screenshot-capture failure; the browser fixture now waits for painted frames before that capture, without retrying operations or swallowing capture errors, and all browser scenarios passed afterward.
556
+ The last full attempt hit six history-test deadlines in two files; those unchanged files passed all 45 tests in a subsequent diagnostic run, and the earlier complete root pass remains distinct from that later failure.
557
+ Failed logs and isolated fixture evidence were preserved; no test budget was increased, dependency/browser downloaded, consumer lock deleted or service installed/restarted.
558
+ No paid-provider use or new native Windows/macOS qualification is claimed.
559
+
560
+ ### Release 2.0.14 acceptance snapshot
561
+
562
+ Full `verify` passed on the release candidate before this evidence-only note, with `VITEST_MAX_WORKERS=1`: 2000 root tests in 84 files (27 skipped on Linux), 130 web tests, 9 real-browser scenarios and the 135-member real-pack audit.
563
+ Observed environment: Linux x86_64, Node26.7.0, Bun1.3.14, Pi SDK0.84.3 and existing Chrome for Testing151.0.7922.34.
564
+ Review fixes refuse hard-linked file previews, common credential paths and configured private-directory alias targets; block legacy project Open through the gateway so backend token links and unassociated owners cannot escape its route; and continue serial Stop attempts for other associated owners after an earlier refusal, without releasing uncertain fences.
565
+ Each boundary regression was observed failing before its fix and passing afterward; the generated service and browser outputs were rebuilt through their canonical builders.
566
+ The first default-concurrency integration run failed 25 tests: 21 timeouts, three state refusals and one stale provenance pin.
567
+ The reviewed destination pins were refreshed, the three state-refusal cases passed independently, and the complete single-worker run passed without increasing any deadline or omitting tests; the earlier failures remain failure evidence, not retrospectively successful runs.
568
+ No consumer service installation/restart, paid-provider use or new native Windows/macOS qualification is claimed.
569
+
570
+ ### Unified-entry verification snapshot
571
+
572
+ The unified no-default-workspace change passed full `verify` before this evidence-only note: 1997 root tests in 84 files (27 skipped on Linux), 130 web tests, 9 real-browser scenarios and the 135-member real-pack audit.
573
+ New browser cases exercise a real generated workbench and independently opened owners under both loopback and a CA-validated HTTPS proxy: no default directory, same-origin switching, ordinary Send, explicit Create without Start, and retained chat/task navigation after refresh.
574
+ The genuine SDK uses an isolated fabricated provider; no paid account, physical device or new native Windows/macOS qualification is implied.
575
+ An early browser attempt completed its UI assertions but left one concurrently stopped owner quarantined; its failed closure receipt remains failure evidence, and the gateway now serializes associated owner Stop through their shared registry.
576
+ The first full integration attempt then passed root/web checks but hit an existing browser harness's late response-body read; the harness now reads that exact response immediately, without request replay or a larger wait, and the subsequent complete `verify` passed.
577
+ No consumer service was installed or restarted, and no existing `~/cadence` or uncertain state was deleted.
578
+
579
+ ### Ordinary-chat workbench integration snapshot
580
+
581
+ Full `verify` passed on the working tree before this evidence-only note: 1994 root tests in 82 files (27 skipped on Linux), 130 web tests, 7 real-browser scenarios and the 135-member real pack audit.
582
+ Observed environment: Linux x86_64, Node26.7.0, Bun1.3.14, Pi SDK0.84.3 and existing Chrome for Testing151.0.7922.34.
583
+ The new lane used the genuine SDK against a fabricated loopback provider: ordinary multi-turn restore, a real write tool, duplicate-send observation, directory/credential boundaries, queued cancellation, orderly Stop/restart, rotation while queued, independent project owners/ports, and preserved unaccepted or missing metadata.
584
+ Browser coverage includes the ordinary composer, file preview/reference, explicit Cadence creation without Start, retained origin navigation, and settled desktop/390px/320px drawer layouts.
585
+ Early attempts caught an optional-envelope decoder regression, late OAuth-settlement tracking during Stop, old package/body counts and worker source pins, plus browser interactions that needed to await modal closure and reference/drawer updates; those were corrected before the final full pass.
586
+ No existing budgets were enlarged, no browser/dependency was downloaded, and no consumer service installation, paid-provider or new Windows/macOS qualification is claimed.
494
587
 
495
588
  ### Release 2.0.12 acceptance snapshot
496
589
 
@@ -17,6 +17,7 @@ Cadence directly adapts token digest comparison, cookie encoding/decoding, boots
17
17
  The source/destination inventory and deliberate security changes are recorded in `provenance/auth-reuse.json`.
18
18
  The complete upstream notice is preserved at `licenses/pi-web-ui-MIT.txt`.
19
19
  The substantial workspace/navigation/transcript/tool/Markdown/review/search/timeline/responsive/reconciliation adaptations are inventoried in `provenance/webui-reuse.json` and summarized in shipped `docs/reuse-and-distribution.md`.
20
+ The ordinary-chat composer, directory picker, readonly file browser and agent-dock presentation additionally reference pi-web-ui revision `944f556463d6693a3f0cfe375c22680090e85bbe`, under the same retained MIT notice; its subagent/goal/delegate engines and prompt composer are not included.
20
21
 
21
22
  ## Bundled browser dependencies, icons and fonts
22
23
 
@@ -59,3 +59,16 @@ Environment-backed tokens require explicit Stop/restart with changed environment
59
59
  Links may already exist in clipboard/history or external logs; redirecting cannot retract disclosure.
60
60
  Use [management and recovery](service-management.md) for Stop, uncertainty and exact local resolution.
61
61
  Loopback HTTPS/viewport tests are not physical-device or second-machine deployment qualification.
62
+
63
+ ## Unified workbench entry
64
+
65
+ The default workbench can route associated projects on the same HTTPS origin; it does not redirect remote browsers to a project owner's loopback port.
66
+ Its explicit `cadence workbench start --config /absolute/private-http-policy.json` accepts the HTTP policy object (schema `cadence-service-http/1`, `host`, `port`, `proxy`), not a project HostConfig or an execution cwd.
67
+ Use the same `proxy.origin` and trusted immediate proxy addresses as above; the `.env` remains authoritative for the port and token.
68
+ The selected policy is retained in private workbench state, so after orderly `cadence workbench stop` a default `cadence server install` can register that entry without a project or a default workspace.
69
+ Do not install over an independently running detached entry; stop it explicitly first.
70
+ The gateway authenticates and validates Host/Origin before routing, rejects browser local-capability headers and management paths, and forwards project requests with browser cookies, not native authority.
71
+ Project attachment IDs, owner CSRF/build compatibility, consent, retained read proofs and exports remain owner-validated.
72
+ A workbench token rotation revokes its routes and retires its exact browser viewers without cancelling admitted project work.
73
+ Project ports, backend cookies and local capabilities remain server-side.
74
+ This is one entry for a trusted service account, not multi-tenant filesystem isolation or an OS sandbox.
@@ -3,6 +3,7 @@
3
3
  ## Source families
4
4
 
5
5
  Cadence adapts `xing-shuyin/pi-web-ui@e8bab487af208bc9a1ab60a821652323f598127f`, MIT copyright 2026 xing-shuyin.
6
+ The ordinary-chat composer, folder picker and file/dock presentation additionally reference sibling revision `944f556463d6693a3f0cfe375c22680090e85bbe`; the separate reference hashes are retained alongside the original pins.
6
7
  The full original license is `licenses/pi-web-ui-MIT.txt`.
7
8
  Repository `provenance/webui-reuse.json` records source/destination hashes and explicit incompatible branches removed; `provenance/auth-reuse.json` records token/cookie adaptation.
8
9
 
@@ -18,8 +19,9 @@ Repository `provenance/webui-reuse.json` records source/destination hashes and e
18
19
  | use-chat, message-delta | Shared typed reconciliation, gaps/resync and no mutation replay |
19
20
  | Token/cookie and upgrade guards | Cookie-first authenticated HTTP/WS, explicit Host/Origin/CSRF boundaries |
20
21
 
21
- No upstream runtime, general chat server, PTY, plugin loader, browser shell, credentials editor, reconnect continuation or task repair ships.
22
- Cadence's finite owner/admission/history contracts replace those incompatible seams.
22
+ No upstream chat/subagent runtime, goal/delegate loop, PTY, plugin loader, browser shell, credentials editor, prompt composer, reconnect replay or task repair ships.
23
+ Cadence owns ordinary conversations separately, using its existing native launcher, exact model/auth resolution and checkout gate; its finite task admission/history contracts remain unchanged.
24
+ Readonly file browsing and explicit independent project opening are new Cadence service operations, not upstream filesystem mutation or global `set_cwd` routes.
23
25
 
24
26
  ## Emitted licenses
25
27
 
@@ -43,3 +45,12 @@ The retired shell-local controller is not a shipped competing executor.
43
45
  The real pack audit rejects missing/extra/duplicate/linked/special/unsafe members, altered bodies, pin/notice/font drift and linked extraction roots/ancestors.
44
46
  Extracted tests use tar-only package bodies and explicitly linked existing fixture peers; they never fill missing package files from source.
45
47
  No version bump, dependency install or publication is implied by this redesign.
48
+
49
+ ## Unified entry without a default workspace
50
+
51
+ `web/src/Workbench.tsx` composes the project selector and existing project UI without importing pi-web-ui's session/execution service.
52
+ The Cadence-owned gateway uses the existing authentication, public codecs, private-files discipline and independently coordinated project owners.
53
+ The no-project entry never initializes an SDK session, manufactures a checkout, creates `~/cadence`, or repairs a missing project directory.
54
+ A technical service-process cwd is not a model/tool workspace.
55
+ The built same-origin routing covers both HTTP requests and WebSockets, while browser authority and project consent remain distinct from native management capability.
56
+ New Linux manager tests exercise the no-workspace default; macOS/Windows generated-definition tests are not native-platform execution qualification.