You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run session git and workflow lifecycle outside the TUI (#854)
* Commit session checkpoints through isomorphic git
* Thread isogit audit methods into agent assembly
* Move workflow lifecycle out of the terminal UI
* Format session store and documentation
* Persist session commit keys with exclusive create
Write first-time commit keys with wx and reload on EEXIST. Wrap JSON.parse failures as Invalid commit signing key. Stop listIndexPaths from swallowing every error. Treat SessionStores as an interface. Drop the IMPLEMENTATION.md claim that exclusive-delta blob staging is in place.
* Flash workflow status from the product host
The runner now emits workflow. The product host subscribes and flashes the active step or complete via existing notices.
* Read worker audit from the shared session store
Copy file name to clipboardExpand all lines: docs/ARCHITECTURE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -198,7 +198,7 @@ Workflows are named, ordered recipes the agent follows step by step — a thin l
198
198
-`coordinator.ts` — bridges runtime and director: produces the `[WORKFLOW STEP i/total: label]` directive injected into each turn's system prompt, and compare-and-advances the runtime when a `submit_output` tagged `{ step }` completes. Already-complete and not-current ids are acknowledged without moving the cursor. Shared by both directors. Fresh and resumed runs share one listener path.
199
199
- The built-in recipes: the atomics `update-ticket`, `improve-docs`, `write-tests`, `triage-bug`, `code-review`, `scope-project`, and the `build-feature` composite that chains them.
200
200
201
-
Invocation: workflows are **not** top-level slash commands. Recipe definitions load into the `WORKFLOWS` registry from **enabled workflow/command plugins** at startup; command surfaces on those plugins (e.g. a workflow plugin's command prefix such as `/mywf scope`). Slash commands may also be authored as data-only markdown (`commands/*.md`, no `index.ts`); see PLUGINS.md. The model never suggests or auto-starts workflows from ordinary chat. Skills (bundled `corbits-skills`, enabled plugins, or `.agents/skills/`) load on demand via `skill_search` then `use_skill`, or as `/<skill-name>` slash commands when `user-invocable` is not `false` (see Skills below). The TUI surfaces state via `src/tui/workflow-controller.ts` (lifecycle, capability overrides, resume) — the header shows step progress (`⟳ name · step/total label`).
201
+
Invocation: workflows are **not** top-level slash commands. Recipe definitions load into the `WORKFLOWS` registry from **enabled workflow/command plugins** at startup; command surfaces on those plugins (e.g. a workflow plugin's command prefix such as `/mywf scope`). Slash commands may also be authored as data-only markdown (`commands/*.md`, no `index.ts`); see PLUGINS.md. The model never suggests or auto-starts workflows from ordinary chat. Skills (bundled `corbits-skills`, enabled plugins, or `.agents/skills/`) load on demand via `skill_search` then `use_skill`, or as `/<skill-name>` slash commands when `user-invocable` is not `false` (see Skills below). `WorkflowHost` (`src/workflows/host.ts`) owns lifecycle, capability overrides, and resume; the TUI only renders host status in the header (`⟳ name · step/total label`).
Checkpoint commits go through isomorphic-git (`base.commit()` after staging extra
419
+
segment files and blobs). Author and committer are Interchange's harness identity
420
+
(`interchange-harness`, `harness@interchange.local`); a `CommitSigner` from
421
+
`commit-signer.ts` signs each commit. The wrapper never shells out to system git.
422
422
The append-only snapshots (`turns.jsonl`, `prompt.jsonl`) are written as rolling
423
423
segments (`turns-0001.jsonl`, ...) that seal at 256KB, so `git add` re-hashes only
424
424
the small active segment instead of the whole growing file. Segment zero keeps the
425
425
original filename, so a legacy monolithic `turns.jsonl` reads back as its own first
426
426
segment. `load` and `readAt` concatenate every segment in order; a torn final line
427
-
in the active segment (from a crash mid-write) is dropped on resume. Only tool-output
428
-
blobs new since the last commit are staged, and stale segments deleted by a
429
-
history rewrite (compaction) are removed from the tree on the next commit. The
427
+
in the active segment (from a crash mid-write) is dropped on resume. The wrapper
428
+
stages extra tool-output blobs it wrote since the last commit; vendor
429
+
`base.commit()` also stages the whole `tool-output/` tree. Stale segments deleted
430
+
by a history rewrite (compaction) are removed from the tree on the next commit. The
430
431
per-commit git tree still grows one entry per spilled tool-output blob across the
431
432
session; that tree re-write is inherent to git and left as residual cost.
432
433
@@ -485,13 +486,14 @@ Corbits Code v0.3 memory and stall hardening is implemented under `src/`, `tests
485
486
486
487
### Bounded audit collector retention between checkpoints
487
488
488
-
Agent-owned audit collectors buffer completed tool results until checkpoint or
489
-
shutdown flush, including when a noop store is supplied. Workers use the durable
490
-
store described under State Persistence; the parent's noop store does not make
491
-
collector retention inapplicable. Long, checkpoint-sparse runs can retain
489
+
Production chat and sub-agent assembly persist audit via the same isogit
490
+
object as context storage (`createSessionStores`), plus a stable `sessionId`.
491
+
Agent-owned audit collectors still buffer completed tool results until
492
+
checkpoint or shutdown flush. Long, checkpoint-sparse runs can retain
492
493
unbounded results. Bounded retention remains owned by the `@intx/inference`
493
494
audit collector: opportunistic flushing or capped result bodies must preserve
494
-
metadata.
495
+
metadata. If a collector is introduced in front of the isogit audit methods,
496
+
add a bounded wrapper in `src/` and re-run hardening tests.
495
497
496
498
Other wave items (read bounds, shell truncation, process-group kill, grep caps, plugin spawn mitigation, per-tool watchdog, inference retry UX) are implemented or partially mitigated in `src/` with co-located tests; the two items above remain upstream-owned.
0 commit comments