@chllming/wave-orchestration 0.8.9 → 0.9.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.
- package/CHANGELOG.md +57 -0
- package/README.md +135 -18
- package/docs/README.md +9 -3
- package/docs/architecture/README.md +1498 -0
- package/docs/concepts/context7-vs-skills.md +1 -1
- package/docs/concepts/operating-modes.md +3 -3
- package/docs/concepts/what-is-a-wave.md +1 -1
- package/docs/guides/author-and-run-waves.md +27 -4
- package/docs/guides/monorepo-projects.md +226 -0
- package/docs/guides/planner.md +10 -3
- package/docs/guides/{recommendations-0.8.9.md → recommendations-0.9.1.md} +8 -7
- package/docs/guides/sandboxed-environments.md +158 -0
- package/docs/guides/terminal-surfaces.md +14 -12
- package/docs/plans/current-state.md +11 -7
- package/docs/plans/end-state-architecture.md +3 -1
- package/docs/plans/examples/wave-example-design-handoff.md +3 -1
- package/docs/plans/examples/wave-example-live-proof.md +6 -1
- package/docs/plans/examples/wave-example-rollout-fidelity.md +2 -0
- package/docs/plans/migration.md +48 -18
- package/docs/plans/sandbox-end-state-architecture.md +153 -0
- package/docs/plans/wave-orchestrator.md +4 -4
- package/docs/reference/cli-reference.md +125 -57
- package/docs/reference/coordination-and-closure.md +1 -1
- package/docs/reference/github-packages-setup.md +1 -1
- package/docs/reference/migration-0.2-to-0.5.md +9 -7
- package/docs/reference/npmjs-token-publishing.md +53 -0
- package/docs/reference/npmjs-trusted-publishing.md +4 -50
- package/docs/reference/package-publishing-flow.md +272 -0
- package/docs/reference/runtime-config/README.md +140 -12
- package/docs/reference/sample-waves.md +100 -5
- package/docs/reference/skills.md +1 -1
- package/docs/reference/wave-control.md +23 -5
- package/docs/roadmap.md +43 -201
- package/package.json +1 -1
- package/releases/manifest.json +38 -0
- package/scripts/wave-orchestrator/adhoc.mjs +49 -17
- package/scripts/wave-orchestrator/agent-process-runner.mjs +344 -0
- package/scripts/wave-orchestrator/agent-state.mjs +0 -1
- package/scripts/wave-orchestrator/artifact-schemas.mjs +7 -0
- package/scripts/wave-orchestrator/autonomous.mjs +96 -29
- package/scripts/wave-orchestrator/benchmark-external.mjs +23 -7
- package/scripts/wave-orchestrator/benchmark.mjs +33 -10
- package/scripts/wave-orchestrator/closure-engine.mjs +138 -17
- package/scripts/wave-orchestrator/config.mjs +239 -24
- package/scripts/wave-orchestrator/control-cli.mjs +71 -28
- package/scripts/wave-orchestrator/coord-cli.mjs +22 -14
- package/scripts/wave-orchestrator/coordination-store.mjs +8 -0
- package/scripts/wave-orchestrator/dashboard-renderer.mjs +123 -44
- package/scripts/wave-orchestrator/dep-cli.mjs +47 -21
- package/scripts/wave-orchestrator/derived-state-engine.mjs +6 -3
- package/scripts/wave-orchestrator/feedback.mjs +28 -11
- package/scripts/wave-orchestrator/gate-engine.mjs +106 -38
- package/scripts/wave-orchestrator/human-input-resolution.mjs +5 -1
- package/scripts/wave-orchestrator/install.mjs +13 -0
- package/scripts/wave-orchestrator/launcher-progress.mjs +91 -0
- package/scripts/wave-orchestrator/launcher-runtime.mjs +179 -68
- package/scripts/wave-orchestrator/launcher.mjs +222 -53
- package/scripts/wave-orchestrator/ledger.mjs +7 -2
- package/scripts/wave-orchestrator/planner.mjs +48 -27
- package/scripts/wave-orchestrator/project-profile.mjs +31 -8
- package/scripts/wave-orchestrator/projection-writer.mjs +13 -1
- package/scripts/wave-orchestrator/proof-cli.mjs +18 -12
- package/scripts/wave-orchestrator/reducer-snapshot.mjs +6 -0
- package/scripts/wave-orchestrator/retry-cli.mjs +19 -13
- package/scripts/wave-orchestrator/retry-control.mjs +3 -3
- package/scripts/wave-orchestrator/retry-engine.mjs +93 -6
- package/scripts/wave-orchestrator/role-helpers.mjs +30 -0
- package/scripts/wave-orchestrator/session-supervisor.mjs +94 -85
- package/scripts/wave-orchestrator/shared.mjs +77 -14
- package/scripts/wave-orchestrator/supervisor-cli.mjs +1306 -0
- package/scripts/wave-orchestrator/terminals.mjs +12 -32
- package/scripts/wave-orchestrator/tmux-adapter.mjs +300 -0
- package/scripts/wave-orchestrator/wave-control-client.mjs +84 -16
- package/scripts/wave-orchestrator/wave-files.mjs +43 -6
- package/scripts/wave.mjs +13 -0
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
# Current State
|
|
2
2
|
|
|
3
|
-
- The published package is `0.
|
|
4
|
-
- The canonical shipped runtime architecture is documented in `docs/plans/end-state-architecture.md`; historical cutover notes remain in `docs/plans/architecture-hardening-migration.md`.
|
|
3
|
+
- The published package is `0.9.1`; that release keeps the shipped monorepo, design-role, and signal-hygiene surfaces, but now also moves live agent execution to detached process runners, reduces tmux and memory pressure during wide orchestration bursts, and hardens the sandbox-safe supervisor path for LEAPclaw, OpenClaw, Nemoshell, Docker, and similar short-lived exec environments.
|
|
4
|
+
- The canonical shipped runtime architecture is documented in `docs/plans/end-state-architecture.md`; the sandbox-runtime companion is `docs/plans/sandbox-end-state-architecture.md`; historical cutover notes remain in `docs/plans/architecture-hardening-migration.md`.
|
|
5
5
|
- The repository contains the published `@chllming/wave-orchestration` package plus the starter scaffold used by `wave init`.
|
|
6
6
|
- The runtime is package-first and non-destructive for adopting repos: `wave init --adopt-existing` records existing repo-owned plans, waves, prompts, and config without overwriting them, and `wave upgrade` writes only `.wave/install-state.json` plus `.wave/upgrade-history/`.
|
|
7
|
-
- The recommended `0.
|
|
7
|
+
- The recommended `0.9.1` operating stance is documented in `docs/guides/recommendations-0.9.1.md`: keep proof and closure strict, keep generic `budget.turns` advisory, and use softer coordination states only for non-proof follow-up.
|
|
8
|
+
- Sandbox-safe setup guidance now ships in `docs/guides/sandboxed-environments.md`: use `wave submit/supervise/status/wait/attach` for short-lived clients, keep `tmux` optional and dashboard-only, and preserve `.tmp/` plus `.wave/` when running inside Nemoshell or Docker.
|
|
8
9
|
- Runtime launch entrypoints now perform a best-effort npmjs version check, cache the result under `.wave/package-update-check.json`, and point operators at `pnpm exec wave self-update` when a newer published package exists.
|
|
9
10
|
- This source repo is itself kept as an adopted Wave workspace, so `node scripts/wave.mjs doctor --json` should pass from the repo root.
|
|
10
11
|
- The default lane is `main`.
|
|
11
12
|
- Planner foundation is now shipped:
|
|
12
|
-
- `.wave/project-profile.json` stores default oversight mode, terminal surface, draft template, lane, and deploy-environment memory
|
|
13
|
+
- `.wave/project-profile.json` stores default oversight mode, terminal surface, draft template, lane, and deploy-environment memory for the implicit default project
|
|
14
|
+
- explicit monorepo projects store the same profile under `.wave/projects/<projectId>/project-profile.json`
|
|
13
15
|
- `wave project setup|show` manage that profile
|
|
14
16
|
- `wave draft` writes planner JSON specs plus launcher-compatible markdown waves
|
|
15
17
|
- Ad-hoc task runs are now first-class:
|
|
16
18
|
- `wave adhoc plan|run|list|show|promote` manage transient operator-driven work
|
|
17
|
-
- requests, generated specs, rendered markdown, and final results live under `.wave/adhoc
|
|
18
|
-
- runtime state stays isolated under `.tmp/<lane>-wave-launcher/adhoc/<run-id>/`
|
|
19
|
+
- requests, generated specs, rendered markdown, and final results live under `.wave/adhoc/<projectId>/runs/<run-id>/` for explicit projects, while the implicit default project keeps the legacy layout
|
|
20
|
+
- runtime state stays isolated under `.tmp/<lane>-wave-launcher/adhoc/<run-id>/` for the implicit default project, or `.tmp/projects/<projectId>/<lane>-wave-launcher/adhoc/<run-id>/` for explicit projects
|
|
19
21
|
- `wave feedback respond --run <run-id>` now reconciles answered human-input state inside that isolated ad-hoc state root and can queue a safe one-shot continuation request without touching roadmap state
|
|
20
22
|
- ad-hoc runs always keep integration, documentation, and cont-QA closure, while `cont-EVAL` and security review are synthesized only when the request needs them
|
|
21
23
|
- documentation closure still queues canonical shared-plan docs when a run reports a shared-plan delta, alongside the ad-hoc closure report
|
|
@@ -45,12 +47,14 @@
|
|
|
45
47
|
- orchestrator-first clarification triage plus human escalation artifacts
|
|
46
48
|
- answered human-feedback responses that reconcile canonical coordination state, helper assignments, and safe continuation intent even when the launcher is no longer active
|
|
47
49
|
- optional `--resident-orchestrator` support for a long-running, non-owning orchestrator session during live waves
|
|
50
|
+
- detached process-backed agent execution, per-agent runtime records, and log-follow attach behavior so normal agents no longer require tmux-backed execution sessions
|
|
48
51
|
- seeded operator wrappers `scripts/wave-status.sh` and `scripts/wave-watch.sh` that expose machine-friendly wait, completion, failure, and input-required status by reading `wave control status --json`
|
|
49
52
|
- persisted relaunch plans under `.tmp/<lane>-wave-launcher/status/` so targeted retry intent can survive a launcher restart
|
|
50
53
|
- a canonical control-plane event log under `.tmp/<lane>-wave-launcher/control-plane/` that records operator tasks, rerun requests, proof bundles, contradictions, facts, human-input workflow, observed `wave_run`, `attempt`, and `agent_run` lifecycle events, plus `wave_signal` and `agent_signal` update events as append-only JSONL; `wave control` materializes state from this log
|
|
51
54
|
- operator-applied retry overrides projected to `.tmp/<lane>-wave-launcher/control/` for compatibility with selected reruns, explicit reuse selectors, reuse clearing or preservation, and explicit resume targets
|
|
52
55
|
- authoritative proof registries projected to `.tmp/<lane>-wave-launcher/proof/` for compatibility, while preserving proof bundle lifecycle state so revoked or superseded operator evidence cannot keep satisfying closure
|
|
53
|
-
- optional Wave Control telemetry under `.tmp/<lane>-wave-launcher/control-plane/telemetry/` for
|
|
56
|
+
- optional Wave Control telemetry under `.tmp/<lane>-wave-launcher/control-plane/telemetry/` for the implicit default project, or `.tmp/projects/<projectId>/<lane>-wave-launcher/control-plane/telemetry/` for explicit projects
|
|
57
|
+
- packaged telemetry defaults now point at `https://wave-control.up.railway.app/api/v1` with `reportMode: metadata-only`, and repos must opt out explicitly if they do not want default project/lane/wave metadata delivery
|
|
54
58
|
- reducer-driven live state snapshots plus persisted machine-readable shadow diffs for helper-assignment, blocker, contradiction, closure, and retry slices
|
|
55
59
|
- reducer-authoritative helper-assignment blocking, retry target selection, and resume planning, with live gate and closure reads now driven from validated result envelopes
|
|
56
60
|
- optional design agents that publish validated design packets under `docs/plans/waves/design/wave-<n>-<agent>.md`, gate implementation through `designGate`, and run before code-owning implementation agents
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# End-State Architecture
|
|
2
2
|
|
|
3
|
-
This document describes the canonical architecture for the current Wave runtime. It is the authoritative reference for the engine boundaries, canonical authority set, and artifact ownership model that the shipped `0.
|
|
3
|
+
This document describes the canonical architecture for the current Wave runtime. It is the authoritative reference for the engine boundaries, canonical authority set, and artifact ownership model that the shipped `0.9.1` surface now follows.
|
|
4
|
+
|
|
5
|
+
For the sandbox-specific execution model, including async supervisor ownership, daemon adoption goals, and forwarded closure-gap behavior, read [sandbox-end-state-architecture.md](./sandbox-end-state-architecture.md).
|
|
4
6
|
|
|
5
7
|
The thesis is unchanged: bounded waves, closure roles, proof artifacts, selective rerun, and delivery discipline. What changes is the internal authority model. The launcher stops being the decision engine and becomes a thin orchestrator that reads decisions from canonical state, sequences the engines, and delegates process work to the session supervisor.
|
|
6
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Wave 12 - Optional Design Steward Handoff
|
|
2
2
|
|
|
3
|
-
This is a showcase-first sample wave for the shipped `design` worker role in `0.
|
|
3
|
+
This is a showcase-first sample wave for the shipped `design` worker role in `0.9.1`.
|
|
4
4
|
|
|
5
5
|
This example demonstrates the docs-first design-steward path where a design packet is published before code-owning implementation begins.
|
|
6
6
|
|
|
@@ -12,6 +12,8 @@ Use this shape when:
|
|
|
12
12
|
|
|
13
13
|
If you want the hybrid design-steward variant instead, keep the same packet path but also assign that same design agent implementation-owned files plus the normal implementation contract sections. The runtime will then run the design pass first and include that same agent in the later implementation fan-out.
|
|
14
14
|
|
|
15
|
+
All launcher-owned `.tmp/main-wave-launcher/...` paths in this example assume the implicit default project. For explicit monorepo projects, rewrite them to `.tmp/projects/<projectId>/main-wave-launcher/...` and launch the wave with `--project <projectId>`.
|
|
16
|
+
|
|
15
17
|
**Commit message**: `Feat: add design packet before implementation fan-out`
|
|
16
18
|
|
|
17
19
|
## Component promotions
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
This is a showcase-first sample wave.
|
|
4
4
|
|
|
5
|
-
Use it as the single reference example for the current `0.
|
|
5
|
+
Use it as the single reference example for the current `0.9.1` Wave surface.
|
|
6
6
|
|
|
7
7
|
It intentionally combines more sections than a normal production wave so one file can demonstrate:
|
|
8
8
|
|
|
9
9
|
- standard closure roles (`A0`, `E0`, `A8`, `A9`)
|
|
10
|
+
- optional security review (`A7`) before integration closure
|
|
10
11
|
- `## Eval targets` with delegated and pinned benchmark selection
|
|
11
12
|
- richer `### Executor` blocks, budgets, and sticky retry
|
|
12
13
|
- `### Skills`
|
|
@@ -19,6 +20,10 @@ It intentionally combines more sections than a normal production wave so one fil
|
|
|
19
20
|
|
|
20
21
|
This example is intentionally denser than a launch-minimal wave. Its job is to teach the full authored surface in one place.
|
|
21
22
|
|
|
23
|
+
It keeps the starter closure role ids (`A0`, `E0`, `A8`, `A9`, `A7`) so the example stays easy to scan. If your repo uses different ids, keep the same role prompts and closure intent but rename the agent ids at the wave level.
|
|
24
|
+
|
|
25
|
+
All launcher-owned `.tmp/main-wave-launcher/...` paths in this example assume the implicit default project. For explicit monorepo projects, rewrite them to `.tmp/projects/<projectId>/main-wave-launcher/...` and launch the wave with `--project <projectId>`.
|
|
26
|
+
|
|
22
27
|
**Commit message**: `Docs: add full modern sample wave`
|
|
23
28
|
|
|
24
29
|
## Component promotions
|
|
@@ -10,6 +10,8 @@ This example is intentionally generic. The component id, deliverable paths, and
|
|
|
10
10
|
Go control-plane slices are illustrative, but the authored Wave structure,
|
|
11
11
|
closure expectations, and maturity discipline match the current surface.
|
|
12
12
|
|
|
13
|
+
All launcher-owned `.tmp/main-wave-launcher/...` paths in this example assume the implicit default project. For explicit monorepo projects, rewrite them to `.tmp/projects/<projectId>/main-wave-launcher/...` and launch the wave with `--project <projectId>`.
|
|
14
|
+
|
|
13
15
|
**Commit message**: `Feat: land rollout substrate and desired-state records`
|
|
14
16
|
|
|
15
17
|
## Component promotions
|
package/docs/plans/migration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Migration
|
|
2
2
|
|
|
3
|
-
This page is the practical repo-upgrade guide for the current `0.
|
|
3
|
+
This page is the practical repo-upgrade guide for the current `0.9.1` surface.
|
|
4
4
|
|
|
5
5
|
Use it when you are:
|
|
6
6
|
|
|
@@ -10,20 +10,25 @@ Use it when you are:
|
|
|
10
10
|
|
|
11
11
|
For the completed internal architecture cutover record, see [architecture-hardening-migration.md](./architecture-hardening-migration.md). That document is historical. This one is the operator-facing upgrade checklist.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
For the sandbox-specific long-running execution target, including async `submit/status/wait` semantics and daemon ownership goals, see [sandbox-end-state-architecture.md](./sandbox-end-state-architecture.md).
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## What `0.9.1` Changes
|
|
16
|
+
|
|
17
|
+
The current `0.9.1` surface keeps the packaged operator-guidance alignment, monorepo project support, and project-aware default telemetry from `0.9.0`, but adds a more sandbox-friendly execution model and lower-overhead live orchestration.
|
|
16
18
|
|
|
17
19
|
The practical changes are:
|
|
18
20
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
21
|
+
- live agent execution now uses detached process runners instead of per-agent tmux execution sessions, which reduces tmux churn and lowers memory pressure during broader fan-out
|
|
22
|
+
- `wave submit`, `wave supervise`, `wave status`, `wave wait`, and `wave attach` are now the preferred path for short-lived clients and sandbox automation
|
|
23
|
+
- supervisor recovery now reconciles launcher status and progress more conservatively, preserves the correct remaining wave range during multi-wave reruns, and keeps read-side status/wait calls aligned even after daemon loss
|
|
24
|
+
- a dedicated setup guide now ships for LEAPclaw, OpenClaw, Nemoshell, Docker, and similar constrained environments
|
|
25
|
+
- the `0.9.0` monorepo and project-aware state layout remains part of the release surface, including `defaultProject`, `projects.<projectId>`, project-scoped state roots, and project-aware CLI routing
|
|
26
|
+
- the current release surface and tracked install-state fixtures now all move together on `0.9.1`
|
|
23
27
|
|
|
24
|
-
If your repo copied starter docs, shell automation, or
|
|
28
|
+
If your repo copied starter docs, shell automation, runbooks, or `wave.config.json` defaults, these are the areas most likely to need a sync before the `0.9.1` package cut.
|
|
25
29
|
|
|
26
|
-
For a practical `0.
|
|
30
|
+
For a practical `0.9.1` operating stance after the upgrade, read [../guides/recommendations-0.9.1.md](../guides/recommendations-0.9.1.md).
|
|
31
|
+
For the concrete operator setup in Nemoshell, Docker, and other sandboxed shells, also read [../guides/sandboxed-environments.md](../guides/sandboxed-environments.md).
|
|
27
32
|
|
|
28
33
|
## What `0.8.6` Changes
|
|
29
34
|
|
|
@@ -90,7 +95,7 @@ pnpm exec wave upgrade
|
|
|
90
95
|
|
|
91
96
|
### 3. Sync repo-owned starter surface only if you copied it
|
|
92
97
|
|
|
93
|
-
The most common sync set for `0.
|
|
98
|
+
The most common sync set for `0.9.1` is:
|
|
94
99
|
|
|
95
100
|
- `docs/agents/wave-launcher-role.md`
|
|
96
101
|
- `docs/agents/wave-orchestrator-role.md`
|
|
@@ -104,6 +109,7 @@ The most common sync set for `0.8.6` is:
|
|
|
104
109
|
- `scripts/wave-status.sh`
|
|
105
110
|
- `scripts/wave-watch.sh`
|
|
106
111
|
- `docs/guides/author-and-run-waves.md`
|
|
112
|
+
- `docs/guides/sandboxed-environments.md`
|
|
107
113
|
- `docs/guides/planner.md`
|
|
108
114
|
- `docs/guides/terminal-surfaces.md`
|
|
109
115
|
- `docs/guides/signal-wrappers.md`
|
|
@@ -119,6 +125,8 @@ The most common sync set for `0.8.6` is:
|
|
|
119
125
|
|
|
120
126
|
If your repo copied starter `wave.config.json` defaults, also sync:
|
|
121
127
|
|
|
128
|
+
- `defaultProject`
|
|
129
|
+
- `projects.<projectId>`
|
|
122
130
|
- `roles.designRolePromptPath`
|
|
123
131
|
- `skills.byRole.design`
|
|
124
132
|
- `executors.profiles.design-pass`
|
|
@@ -138,14 +146,36 @@ pnpm exec wave coord inbox --lane main --wave 0 --agent A1 --dry-run
|
|
|
138
146
|
|
|
139
147
|
Use `pnpm exec wave dashboard --lane <lane> --attach current` or `--attach global` when you need to reattach to a tmux-backed dashboard after the upgrade.
|
|
140
148
|
|
|
141
|
-
## `0.
|
|
149
|
+
## `0.9.1` Release Model
|
|
142
150
|
|
|
143
|
-
The current `0.
|
|
151
|
+
The current `0.9.1` surface is five changes together:
|
|
144
152
|
|
|
153
|
+
- the detached process-runner and sandbox supervisor hardening released in `0.9.1`
|
|
154
|
+
- the shipped `0.9.0` monorepo project support and project-aware runtime isolation
|
|
145
155
|
- the shipped `design` worker role and hybrid design-steward flow introduced in `0.8.5`
|
|
146
156
|
- the signal-driven long-running-agent and wrapper model introduced in `0.8.6`
|
|
147
157
|
- the policy-consistency, targeted-recovery, capability-specific routing, and stable per-wave session reuse hardening introduced in `0.8.7`
|
|
148
|
-
- the packaged recommendations guide and install-state alignment follow-up released in `0.
|
|
158
|
+
- the packaged recommendations guide, sandbox setup guide, and install-state alignment follow-up released in `0.9.1`
|
|
159
|
+
|
|
160
|
+
### Sandbox-safe execution and lower-overhead live runs
|
|
161
|
+
|
|
162
|
+
This is the main new behavior in `0.9.1`.
|
|
163
|
+
|
|
164
|
+
The runtime now:
|
|
165
|
+
|
|
166
|
+
- launches live agents through detached process runners instead of per-agent tmux sessions
|
|
167
|
+
- treats tmux as dashboard-only and optional
|
|
168
|
+
- keeps `wave attach --agent` usable through log-follow attach even when no live interactive terminal session exists
|
|
169
|
+
- uses `wave submit/supervise/status/wait/attach` as the preferred sandbox-safe surface for short-lived clients
|
|
170
|
+
|
|
171
|
+
If your repo copied sandbox, CI, or container runbooks, this is the main sync set to apply from `0.9.1`:
|
|
172
|
+
|
|
173
|
+
- `README.md`
|
|
174
|
+
- `docs/README.md`
|
|
175
|
+
- `docs/guides/sandboxed-environments.md`
|
|
176
|
+
- `docs/guides/terminal-surfaces.md`
|
|
177
|
+
- `docs/reference/cli-reference.md`
|
|
178
|
+
- `docs/plans/sandbox-end-state-architecture.md`
|
|
149
179
|
|
|
150
180
|
### Signal-driven waiting and wrapper model
|
|
151
181
|
|
|
@@ -329,9 +359,9 @@ If the repo copied starter `wave.config.json` defaults, also sync:
|
|
|
329
359
|
- if the repo uses hybrid design stewards, confirm the same agent rejoins implementation only when the authored wave explicitly gives it code ownership
|
|
330
360
|
- if the repo uses long-running agents or shell automation, confirm the new wrapper exit contract and ack-loop semantics before relying on an older polling script
|
|
331
361
|
|
|
332
|
-
## Upgrading From `0.8.3` To `0.
|
|
362
|
+
## Upgrading From `0.8.3` To `0.9.1`
|
|
333
363
|
|
|
334
|
-
Treat this as one move to the current `0.
|
|
364
|
+
Treat this as one move to the current `0.9.1` surface.
|
|
335
365
|
|
|
336
366
|
### What changed across that range
|
|
337
367
|
|
|
@@ -364,7 +394,7 @@ If your repo copied starter docs or skills, sync:
|
|
|
364
394
|
- dry-run one design-steward wave if the repo wants the new authored surface
|
|
365
395
|
- if the repo uses long-running watcher agents or shell automation, validate `scripts/wave-status.sh` and `scripts/wave-watch.sh` against a live or staged lane
|
|
366
396
|
|
|
367
|
-
## Upgrading From `0.6.x` Or `0.7.x` To `0.
|
|
397
|
+
## Upgrading From `0.6.x` Or `0.7.x` To `0.9.1`
|
|
368
398
|
|
|
369
399
|
This is the main migration path for older adopted repos.
|
|
370
400
|
|
|
@@ -405,7 +435,7 @@ pnpm exec wave control proof get --lane main --wave 0 --json
|
|
|
405
435
|
|
|
406
436
|
If the repo carries proof-first waves, verify that required proof artifacts still exist locally and not only in historical summaries.
|
|
407
437
|
|
|
408
|
-
## Upgrading From `0.5.x` Or Earlier To `0.
|
|
438
|
+
## Upgrading From `0.5.x` Or Earlier To `0.9.1`
|
|
409
439
|
|
|
410
440
|
Do not treat this as a tiny patch bump.
|
|
411
441
|
|
|
@@ -515,4 +545,4 @@ For repos that depend on replay parity, replay at least:
|
|
|
515
545
|
|
|
516
546
|
## Summary
|
|
517
547
|
|
|
518
|
-
The current `0.
|
|
548
|
+
The current `0.9.1` surface keeps the same authority-set and phase-engine architecture, ships both the design-role starter surface and the signal-driven long-running-agent starter surface, keeps the `0.8.7` policy and routing hardening, and now also packages the practical operator recommendations guide inside the release line. For most repos already on `0.8.x`, the upgrade is package bump plus validation. For older adopted repos, the real work is syncing repo-owned prompts, skills, planner corpus, wrapper scripts, and runbooks so they describe the runtime the package now ships.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Sandbox End-State Architecture
|
|
2
|
+
|
|
3
|
+
This document is the sandbox-runtime companion to [end-state-architecture.md](./end-state-architecture.md). The core architecture still applies: the canonical authority set remains wave definitions, the coordination log, and the control-plane event log. This page narrows that model to the execution environments that impose short-lived `exec` sessions, process ceilings, or terminal instability.
|
|
4
|
+
|
|
5
|
+
The goal is straightforward: sandbox client commands must stay short and disposable, while long-running wave ownership moves to a durable supervisor that can survive launcher exit, sandbox timeout, and terminal churn.
|
|
6
|
+
|
|
7
|
+
For the operator-facing setup flow in LEAPclaw, OpenClaw, Nemoshell, Docker, and similar environments, read [../guides/sandboxed-environments.md](../guides/sandboxed-environments.md). This page is the deeper design and authority-model reference.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Problem Statement
|
|
12
|
+
|
|
13
|
+
Sandboxed runtimes have failure modes that the generic architecture does not need to describe in detail:
|
|
14
|
+
|
|
15
|
+
- the sandbox `exec` session may have a wall-clock timeout that is much shorter than a real wave
|
|
16
|
+
- bursty `spawnSync` and `tmux` probes can hit `EAGAIN`, `EMFILE`, or related process pressure limits
|
|
17
|
+
- the launcher process can die before child agents finish, leaving orphaned sessions and ambiguous status
|
|
18
|
+
- a missing `tmux` session is not enough evidence that the actual agent process failed
|
|
19
|
+
|
|
20
|
+
The shipped runtime now has an initial async supervisor wrapper plus forwarded closure-gap handling, but it does not yet satisfy the full sandbox ownership model described here.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Target Command Model
|
|
25
|
+
|
|
26
|
+
Sandbox-facing commands should follow an async submit/observe pattern:
|
|
27
|
+
|
|
28
|
+
- `wave submit [launcher options]`
|
|
29
|
+
Validate the request, persist a run request, print a `runId`, and exit quickly.
|
|
30
|
+
- `wave supervise`
|
|
31
|
+
Long-running daemon command that owns launch, monitoring, retry, adoption, and cleanup. This command is not intended to be bound to a short sandbox `exec` lifetime.
|
|
32
|
+
- `wave status --run-id <id>`
|
|
33
|
+
Read canonical supervisor state for a run.
|
|
34
|
+
- `wave wait --run-id <id> --timeout-seconds <n>`
|
|
35
|
+
Observe until a state change or timeout. Timing out never cancels the run.
|
|
36
|
+
- `wave attach --run-id <id>`
|
|
37
|
+
Optional operator projection surface for `tmux` or another terminal UI. This is not a liveness authority.
|
|
38
|
+
|
|
39
|
+
Compatibility rules:
|
|
40
|
+
|
|
41
|
+
- `wave launch` remains the canonical full launcher surface for direct local execution and dry-run validation.
|
|
42
|
+
- `wave autonomous` should submit and observe wave execution when it is used in sandbox-oriented flows.
|
|
43
|
+
- `wave submit`, `wave supervise`, `wave status`, `wave wait`, and `wave attach` are the preferred sandbox-facing surface, even while some internals remain partial.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Canonical Authority In Sandboxed Runs
|
|
48
|
+
|
|
49
|
+
The canonical authority set does not change, but sandbox supervision adds one more durable runtime layer:
|
|
50
|
+
|
|
51
|
+
- wave definitions remain authoritative for declared work, closure roles, proof artifacts, and task contracts
|
|
52
|
+
- coordination and control-plane logs remain authoritative for workflow, lifecycle, proof, and blocker state
|
|
53
|
+
- supervisor run state becomes the canonical record of daemon-owned runtime observation for a submitted run
|
|
54
|
+
|
|
55
|
+
The supervisor-owned state should converge on this per-run structure under `.tmp/<lane>-wave-launcher/supervisor/runs/<runId>/`:
|
|
56
|
+
|
|
57
|
+
- `request.json`
|
|
58
|
+
Immutable submitted request.
|
|
59
|
+
- `state.json`
|
|
60
|
+
Current daemon-owned run snapshot, including `runId`, `status`, `submittedAt`, `startedAt`, `completedAt`, `launcherPid`, `supervisorId`, `leaseExpiresAt`, `terminalDisposition`, and the latest observed launcher status.
|
|
61
|
+
- `events.jsonl`
|
|
62
|
+
Supervisor-local observation history for adoption, retries, reconciliation, and cleanup decisions.
|
|
63
|
+
- `launcher-status.json`
|
|
64
|
+
Canonical launcher completion status written atomically by the detached launcher wrapper.
|
|
65
|
+
- `launcher.log`
|
|
66
|
+
Human-facing log stream only.
|
|
67
|
+
- `agents/<agentId>.runtime.json`
|
|
68
|
+
Agent runtime observation record with fields such as `pid`, `pgid`, `attempt`, `startedAt`, `lastHeartbeatAt`, `exitCode`, `exitReason`, `statusPath`, and optional projection metadata like `tmuxSessionName`.
|
|
69
|
+
|
|
70
|
+
Authority rules:
|
|
71
|
+
|
|
72
|
+
- `tmux` is projection-only
|
|
73
|
+
- dashboards, summaries, inboxes, and board markdown remain projections only
|
|
74
|
+
- missing `tmux` state cannot by itself fail a run and is warning-only telemetry
|
|
75
|
+
- pid checks, heartbeats, and atomic status files outrank terminal presence for liveness
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Daemon Ownership, Adoption, And Process Control
|
|
80
|
+
|
|
81
|
+
The end state requires one daemon-owned control path for long-running work:
|
|
82
|
+
|
|
83
|
+
1. `wave submit` writes the request and exits.
|
|
84
|
+
2. `wave supervise` claims or renews a lease, launches work, and records observed runtime facts.
|
|
85
|
+
3. `wave status` and `wave wait` read canonical state only.
|
|
86
|
+
4. If the daemon dies, a later daemon instance can adopt active runs after lease expiry and continue observation without relaunching healthy agents.
|
|
87
|
+
|
|
88
|
+
The daemon must own:
|
|
89
|
+
|
|
90
|
+
- bounded process launch concurrency
|
|
91
|
+
- async retry with jittered backoff for `EAGAIN`, `EMFILE`, and `ENFILE`
|
|
92
|
+
- orphan adoption after stale lease detection
|
|
93
|
+
- conservative orphan cleanup only after lease expiry, stale heartbeat, and failed pid confirmation
|
|
94
|
+
- reconciliation between launcher status files, live pid state, and control-plane events
|
|
95
|
+
|
|
96
|
+
The daemon must not depend on:
|
|
97
|
+
|
|
98
|
+
- repeated `spawnSync("tmux", "list-sessions")` calls in the steady-state wait loop
|
|
99
|
+
- one sandbox client process staying alive for the full wave duration
|
|
100
|
+
- terminal presence as the source of truth for agent or wave health
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Closure Semantics For Forwarded Proof Gaps
|
|
105
|
+
|
|
106
|
+
Closure staging still runs in the normal order:
|
|
107
|
+
|
|
108
|
+
`implementation + proof -> cont-EVAL -> security/A7 -> integration/A8 -> docs/A9 -> cont-QA/A0`
|
|
109
|
+
|
|
110
|
+
Sandbox stability does not change closure authority, but the daemon must preserve one special case:
|
|
111
|
+
|
|
112
|
+
- `wave-proof-gap` from a closure-stage agent is a forwarded soft blocker, not an immediate full-wave stop
|
|
113
|
+
|
|
114
|
+
Forwarding rules:
|
|
115
|
+
|
|
116
|
+
- if A7 returns `wave-proof-gap`, the daemon still dispatches A8, A9, and A0 with the gap included as structured input
|
|
117
|
+
- if A8 returns `wave-proof-gap`, the daemon still dispatches A9 and A0
|
|
118
|
+
- if A9 returns `wave-proof-gap`, the daemon still dispatches A0
|
|
119
|
+
- later closure agents must evaluate the currently available artifacts and report what is true; they must not refuse to run only because an earlier closure-stage agent reported `wave-proof-gap`
|
|
120
|
+
- the final wave disposition remains blocked until the forwarded closure gaps are resolved
|
|
121
|
+
|
|
122
|
+
Non-forwardable closure failures remain hard stops. Examples include malformed outputs, missing proof envelopes, explicit integration blockers, or invalid marker formats.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Current Implementation Status
|
|
127
|
+
|
|
128
|
+
Already landed:
|
|
129
|
+
|
|
130
|
+
- `wave submit`, `wave supervise`, `wave status`, `wave wait`, and `wave attach` exist as a file-backed async wrapper over the existing launcher
|
|
131
|
+
- supervisor state now includes lease-backed daemon ownership, `events.jsonl`, exact lane-scoped lookup, and detached launcher-status reconciliation
|
|
132
|
+
- agent runtime records now capture per-agent pid, heartbeat, runner metadata, terminal disposition, and attach or log-follow metadata for supervisor-owned runs
|
|
133
|
+
- `wave autonomous` now submits and observes single-wave runs through the supervisor surface instead of binding them to one blocking launcher subprocess
|
|
134
|
+
- closure-stage `wave-proof-gap` forwarding now continues later closure stages and records the blocker instead of failing the whole sweep immediately
|
|
135
|
+
- retry planning now invalidates later closure reuse from the earliest forwarded closure-gap stage
|
|
136
|
+
- agent execution now uses detached process runners by default, which lowers tmux session churn and memory pressure in wide fan-outs; tmux remains dashboard-only and `wave attach --agent` falls back to log following when no live session exists
|
|
137
|
+
- launcher progress journaling now lets the supervisor recover finalized runs and safely resume the active wave without a repo-wide rescan
|
|
138
|
+
|
|
139
|
+
Still missing for the true end state:
|
|
140
|
+
|
|
141
|
+
- broader resume semantics beyond “restart the active wave with preserved control state”; recovery can now use finalized progress journals and canonical run-state completion, but multi-wave and auto-next recovery is still conservative
|
|
142
|
+
- fully tmux-free live dashboard projection; dashboard attach now falls back to the last written dashboard file, but live dashboard sessions still use tmux today
|
|
143
|
+
- full success inference from canonical runtime facts alone; the daemon still refuses to synthesize success from agent runtime files without either finalized progress or canonical run-state completion
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Remaining Gap Plan
|
|
148
|
+
|
|
149
|
+
1. Implement supervisor lease, heartbeat, and stale-lock reclamation so a restarted daemon can adopt active runs without relaunching healthy work.
|
|
150
|
+
2. Move liveness authority to pid, heartbeat, and atomic status files; keep `tmux` as projection-only and remove sync terminal probes from steady-state monitoring.
|
|
151
|
+
3. Materialize supervisor events and per-agent runtime records as canonical daemon state, not only ad hoc wrapper files.
|
|
152
|
+
4. Extend forwarded closure-gap handling into retry planning so the earliest forwarded gap invalidates later closure outputs for reuse while still preserving them for operator evidence.
|
|
153
|
+
5. Converge sandbox-facing entrypoints so `submit/status/wait` become the default operator path and `autonomous` no longer owns a multi-hour blocking launcher process.
|
|
@@ -38,7 +38,7 @@ The live runtime is organized around explicit modules:
|
|
|
38
38
|
## What It Does
|
|
39
39
|
|
|
40
40
|
- parses wave plans from `docs/plans/waves/`
|
|
41
|
-
- supports transient ad-hoc runs from `.wave/adhoc
|
|
41
|
+
- supports transient ad-hoc runs from project-scoped `.wave/adhoc/<projectId>/runs/` storage on the same runtime substrate, with the implicit default project keeping the legacy layout
|
|
42
42
|
- fans a wave out into one session per `## Agent ...` section
|
|
43
43
|
- supports standing role imports from `docs/agents/*.md`
|
|
44
44
|
- supports optional pre-implementation design stewards that publish design packets before code-owning implementation starts
|
|
@@ -103,9 +103,9 @@ The live runtime is organized around explicit modules:
|
|
|
103
103
|
- `docs/reference/wave-control.md` documents the Wave Control telemetry and analysis plane, including entity types, artifact upload policies, and the local-first reporting contract.
|
|
104
104
|
- `docs/plans/component-cutover-matrix.json` is the canonical machine-readable source for component maturity and per-wave promotion targets.
|
|
105
105
|
- `.wave/install-state.json` records how the workspace was initialized and which package version is installed.
|
|
106
|
-
- `.wave/project-profile.json` (created by `wave project setup`) records planner defaults
|
|
107
|
-
- `.wave/adhoc
|
|
108
|
-
- ad-hoc documentation closure
|
|
106
|
+
- `.wave/project-profile.json` (created by `wave project setup`) records planner defaults for the implicit default project; explicit projects use `.wave/projects/<projectId>/project-profile.json`.
|
|
107
|
+
- `.wave/adhoc/<projectId>/runs/<run-id>/` stores transient ad-hoc request, spec, rendered markdown, and result artifacts for explicit projects, while the implicit default project keeps the legacy layout.
|
|
108
|
+
- ad-hoc documentation closure writes project-scoped report paths under the run directory, but shared-plan deltas still queue the canonical lane shared-plan docs.
|
|
109
109
|
- ad-hoc task ownership inference only accepts repo-local paths; URLs and other external references are ignored.
|
|
110
110
|
- `wave adhoc promote` promotes the stored ad-hoc spec into `docs/plans/waves/` instead of re-reading the current project profile.
|
|
111
111
|
|