@voybio/ace-swarm 2.4.4 → 2.4.7
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 +69 -0
- package/README.md +72 -532
- package/assets/eval-battery/battery.json +85 -0
- package/assets/eval-battery/fixtures/edit-target.js +3 -0
- package/assets/scripts/render-mcp-configs.sh +12 -0
- package/dist/ace-context.d.ts +18 -0
- package/dist/ace-context.js +161 -16
- package/dist/ace-server-instructions.js +41 -12
- package/dist/bridge-trace.d.ts +17 -0
- package/dist/bridge-trace.js +23 -0
- package/dist/cli.d.ts +9 -1
- package/dist/cli.js +623 -11
- package/dist/discovery-runtime-wrappers.d.ts +16 -1
- package/dist/discovery-runtime-wrappers.js +65 -9
- package/dist/eval-harness.d.ts +110 -0
- package/dist/eval-harness.js +254 -0
- package/dist/experience-reflector.d.ts +13 -0
- package/dist/experience-reflector.js +62 -0
- package/dist/goal-engine.d.ts +155 -0
- package/dist/goal-engine.js +795 -0
- package/dist/helpers/store-resolution.js +40 -39
- package/dist/hermes/session-manager.d.ts +10 -0
- package/dist/hermes/session-manager.js +130 -27
- package/dist/job-scheduler.d.ts +58 -0
- package/dist/job-scheduler.js +202 -2
- package/dist/job-worker.d.ts +87 -0
- package/dist/job-worker.js +182 -0
- package/dist/local-model-policy.d.ts +8 -2
- package/dist/local-model-policy.js +31 -17
- package/dist/local-model-runtime.d.ts +6 -0
- package/dist/local-model-runtime.js +130 -2
- package/dist/measured-classing.d.ts +66 -0
- package/dist/measured-classing.js +165 -0
- package/dist/model-bridge.d.ts +45 -0
- package/dist/model-bridge.js +502 -44
- package/dist/orchestrator-supervisor.js +1 -1
- package/dist/plan-proposal.d.ts +7 -0
- package/dist/plan-proposal.js +74 -4
- package/dist/playbook-adaptation.d.ts +37 -0
- package/dist/playbook-adaptation.js +159 -0
- package/dist/playbook-curator.d.ts +16 -0
- package/dist/playbook-curator.js +106 -0
- package/dist/playbook-llm-reflector.d.ts +26 -0
- package/dist/playbook-llm-reflector.js +157 -0
- package/dist/public-surface.d.ts +2 -0
- package/dist/public-surface.js +26 -14
- package/dist/safe-edit.d.ts +20 -0
- package/dist/safe-edit.js +355 -78
- package/dist/server.d.ts +11 -2
- package/dist/server.js +55 -5
- package/dist/shared.d.ts +12 -0
- package/dist/shared.js +13 -1
- package/dist/source-mutation-coordinator.d.ts +54 -0
- package/dist/source-mutation-coordinator.js +259 -0
- package/dist/status-events.d.ts +4 -1
- package/dist/status-events.js +41 -6
- package/dist/store/ace-packed-store.d.ts +28 -9
- package/dist/store/ace-packed-store.js +324 -57
- package/dist/store/bgzf.d.ts +4 -0
- package/dist/store/bgzf.js +94 -0
- package/dist/store/bootstrap-store.d.ts +4 -1
- package/dist/store/bootstrap-store.js +57 -3
- package/dist/store/cache-workspace.d.ts +8 -0
- package/dist/store/cache-workspace.js +67 -1
- package/dist/store/crc32.d.ts +2 -0
- package/dist/store/crc32.js +16 -0
- package/dist/store/fsck.d.ts +16 -0
- package/dist/store/fsck.js +240 -0
- package/dist/store/materializers/context-snapshot-materializer.d.ts +1 -0
- package/dist/store/materializers/context-snapshot-materializer.js +4 -1
- package/dist/store/materializers/projection-manager.d.ts +7 -0
- package/dist/store/materializers/projection-manager.js +37 -0
- package/dist/store/materializers/scheduler-projection-materializer.js +10 -3
- package/dist/store/repositories/goal-repository.d.ts +112 -0
- package/dist/store/repositories/goal-repository.js +157 -0
- package/dist/store/repositories/playbook-repository.d.ts +107 -0
- package/dist/store/repositories/playbook-repository.js +314 -0
- package/dist/store/store-artifacts.js +44 -2
- package/dist/store/store-authority-audit.js +1 -0
- package/dist/store/store-cli.d.ts +30 -0
- package/dist/store/store-cli.js +242 -0
- package/dist/store/store-snapshot.d.ts +12 -0
- package/dist/store/store-snapshot.js +74 -11
- package/dist/store/types.d.ts +1 -0
- package/dist/store/write-coordinator.d.ts +7 -0
- package/dist/store/write-coordinator.js +11 -0
- package/dist/todo-state.d.ts +21 -0
- package/dist/todo-state.js +150 -53
- package/dist/tools-agent.js +86 -22
- package/dist/tools-discovery.js +5 -3
- package/dist/tools-files.js +39 -18
- package/dist/tools-framework.js +31 -3
- package/dist/tools-goal.d.ts +11 -0
- package/dist/tools-goal.js +108 -0
- package/dist/tools-handoff.js +7 -11
- package/dist/tools-lifecycle.js +2 -0
- package/dist/tools-scheduler.js +44 -1
- package/dist/tools-skills.js +3 -2
- package/dist/tools-todo.js +64 -3
- package/dist/tools.js +2 -0
- package/dist/tui/chat.js +4 -0
- package/dist/tui/index.js +4 -1
- package/dist/tui/ollama.d.ts +2 -0
- package/dist/tui/openai-compatible.d.ts +14 -0
- package/dist/tui/openai-compatible.js +15 -2
- package/dist/tui/provider-discovery.d.ts +1 -0
- package/dist/tui/provider-discovery.js +2 -2
- package/docs/cli-reference.md +127 -0
- package/docs/development.md +46 -0
- package/docs/evaluation-safety.md +27 -0
- package/docs/experience-playbook.md +35 -0
- package/docs/hermes.md +129 -0
- package/docs/library-api.md +31 -0
- package/docs/mcp-tool-reference.md +290 -0
- package/docs/provider-security.md +85 -0
- package/docs/state-model.md +113 -0
- package/docs/troubleshooting.md +95 -0
- package/docs/tui-operator-guide.md +75 -0
- package/package.json +3 -1
- package/scripts/dev/run_hermes_crispr_live.mjs +212 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
## [2.4.6] - 2026-07-15
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `ace ls` / `ace read` (aliases `get`, `cat`) — human read surface for ACEPACK-only artifacts.
|
|
10
|
+
- `ace fsck` (+ `ace doctor` integration): header/index/length-prefix/CRC/event-section validation, orphan detection, `--repair`.
|
|
11
|
+
- Per-chunk CRC32 in the ACEPACK index; `AcePackedStoreCorruptionError`; corrupt-store quarantine before any rewrite.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Store-first by default: all generated `agent-state/**` artifacts are ACEPACK-only unless on the projection allowlist (`.agents/ACE/tasks/todo.md`). `ACE_STORE_FIRST=0` keeps legacy disk read precedence for one release.
|
|
16
|
+
- `ace compact` now also sweeps loose generated artifacts. `ace cache` is **deprecated** and is *not* an alias for it: `cache` ingests + cleans without compacting.
|
|
17
|
+
- `ace goal start` refuses an objective whose compiled plan carries no machine-checkable obligation, with reason code `contract_uncheckable`. Declare an expected artifact, or add a `verify: <shell command>` success criterion.
|
|
18
|
+
- `ace goal resume` now un-parks a `--plan-only` goal (previously the compiled plan was unreachable), and refuses to resume a `contract_uncheckable` goal, which re-running cannot change.
|
|
19
|
+
- `ace eval`'s default battery ships at `assets/eval-battery/battery.json`; `--battery` is no longer needed.
|
|
20
|
+
- `ace eval --adapt --epochs N` now re-runs the battery once per epoch against the updated playbook instead of re-reflecting a single cached trace N times.
|
|
21
|
+
- `ace help` lists `goal`, `playbook`, `eval`, `compact`, `migrate`, `repair`, and `add skills`.
|
|
22
|
+
- Handoff payloads, source-edit events, playbook data, and scheduler/context-snapshot projections are store-backed; root `tasks/SWARM_HANDOFF.*.json` is no longer written.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- Preserved the configured provider profile for isolated `ace eval` runs while keeping task writes and traces inside disposable workspaces.
|
|
27
|
+
- Restricted goal verification directives so model-authored or operator prose containing `verification:` cannot become shell commands.
|
|
28
|
+
- Refreshed hosted-provider defaults and setup guidance, including Claude Opus 4.8 and the Anthropic OpenAI-compatible endpoint.
|
|
29
|
+
- Unified mutation-intent completion checks, accepted `--flag=value` in eval/playbook commands, scoped concurrent Hermes subprocess interruption per turn, and bounded large diffs to changed regions.
|
|
30
|
+
|
|
31
|
+
- Silent truncation / cross-section bleed on corrupt-index store reads; stale snapshot-cache serving; event-section trust of corrupt counts.
|
|
32
|
+
- **Lifecycle-sweep deadlock:** `ProjectionManager.projectAfterCommit()` awaited the workspace sweep from inside `withStoreWriteCoordinator`; on a dirty workspace (>=1 loose file older than 5 min) the sweep's own coordinated write re-entered the non-reentrant write queue and hung forever. The sweep is now detached (fire-and-forget, throttled to once per 60s) and exposed via `waitForPendingLifecycleSweep()` for CLI/test flows to drain.
|
|
33
|
+
- **Uncoordinated source-edit event writes:** `appendSourceEditEvent` wrote the store directly via `writeStoreBlobSync` with no lease, risking lost updates under concurrent writers and unbounded NDJSON growth. Events are now buffered and flushed through a coordinated writer, with a 2000-line rotation cap into `state/source-edit-events-archive.ndjson`.
|
|
34
|
+
- **`ace fsck --repair` deleting live write leases:** lock directories are now classified (`active`/`stale`/`unreadable`) before repair; only stale or unreadable leases are removed, and an active lease surfaces as a passing `workspace:write-lock` check instead of a false orphan.
|
|
35
|
+
- **fsck false failures on v1 stores:** `header:regions` and chunk-bounds checks now branch on store version instead of assuming v2 header fields (v1 has `evtOffset=0` and chunks starting at `HEADER_SIZE_V1`, not `HEADER_SIZE`).
|
|
36
|
+
- `ace read --out <file> <path>` no longer misparses the flag's value as the target path; `ace ls` reads sizes from the store index instead of decoding every blob.
|
|
37
|
+
- **`ace compact` / `ace cache` destroyed all goal state (data loss):** the sweep ingested `agent-state/goals/**` into ACEPACK and deleted it from disk, but `GoalRepository` reads plain files — every goal became `Unknown goal_id` and any detached `ace goal run` was orphaned. The sweep now excludes that directory, and `ace repair` restores goals stranded by a pre-fix compact.
|
|
38
|
+
- **Success contract could be satisfied vacuously:** `checkSuccessContract` returned `ok` when a contract had zero enforceable obligations, so a model reached `status: "done"` on prose alone. Contracts with no required artifact, no path-like evidence ref, and no verification command are now refused at `startGoal` and again at verify time. `required_evidence_refs` are enforced; non-path refs (e.g. `reviewer sign-off`) route to `uncompilable_criteria` instead of being silently unsatisfiable.
|
|
39
|
+
- **`ace eval` could not run from a published install:** the default battery resolved under `test/`, which `package.json` `files[]` excludes. `loadBattery` now fails with an actionable message rather than a raw `ENOENT`, and `--adapt` validates the battery before creating `agent-state/eval-reports/`.
|
|
40
|
+
- **Flag values leaked into positional text:** `ace goal start "Ship it" --budget-hours 2` stored the objective `"Ship it 2"`, and `ace playbook add --section verification` created a bullet whose content was literally `"--section verification"`. Both now parse `--flag value` and `--flag=value` correctly and honour `--`.
|
|
41
|
+
- `ace playbook tag <unknown-id>` exits 1 instead of reporting success; `ace goal run|resume|stop <unknown-id>` print `Unknown goal: <id>` instead of dumping a raw stack trace.
|
|
42
|
+
- `ace eval --adapt`'s baseline pass no longer mutates the playbook it is a control for (`ACE_PLAYBOOK_REFLECT=0` during every measured run), so `playbook_stats` counts exactly the harness's own curations.
|
|
43
|
+
|
|
44
|
+
## [2.4.5] - 2026-07-09
|
|
45
|
+
|
|
46
|
+
Mitigations from `REPORT_ACE_DEEP_INVESTIGATION_2026-07-01.md` (WS-A/B/C/D/E/G plus the WS-H telemetry seam), with code-review tightening of the already-landed trenches.
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- **D1 / WS-A — Hermes zero-tool shadow:** `defaultToolScopeForPolicy` is now total (never returns `undefined`/`[]`); undefined scopes resolve to the role's `ROLE_TOOL_DEFAULTS` (with a new `builder` entry) and unknown roles to orchestrator defaults minus mutation tools. The Hermes executor and `ace mcp-shadow --tools ""` now hard-fail with `reason_code=hermes_empty_tool_scope`. Each Hermes-local turn records a capability snapshot. `ace doctor --hermes` now asserts a computed non-coders (orchestrator) scope is actually served (>=3 tools), not just `get_all_agents_summary`.
|
|
51
|
+
- **D2 / WS-B — fake green:** no-model-runtime orchestrator steps now return `blocked`/`no_model_runtime` instead of `completed`; the supervisor maps `blocked` bridge results to blocked steps; `run_orchestrator` short-circuits to a plan envelope (`execution_backend:"none"`) and gained an explicit `mode:"plan_only"`.
|
|
52
|
+
- **D6 (partial) / WS-A step 6 — Hermes secret leak & context:** the Python worker env is now allowlisted (`PATH`/`HOME`/`HERMES_*`/`ACE_*`/provider base-URL vars) instead of forwarding the full `process.env`; the hard-coded 65536 context length is replaced by a probed-or-8192 conservative default.
|
|
53
|
+
- **D14 — promotion predicate:** structural-edit `promotable` now keys on the unified-diff result, not the set-membership `diffContents` (display-only).
|
|
54
|
+
- **D5 / WS-G step 3 — version truth:** the MCP server now reports the real `package.json` version instead of the stale `0.2.1`.
|
|
55
|
+
- **D11 / §14 — hygiene:** removed the stray `src/.vericify/` dogfood state and git-ignored dogfood/staging litter paths.
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
|
|
59
|
+
- **WS-J — Experience Playbook (experimental):** added fs-backed playbook bullet storage under `agent-state/playbook/`, deterministic reflection/curation, `ACE_PLAYBOOK`-gated prompt injection, direct-lane attribution, adaptation reports via `ace eval --adapt`, and `ace playbook` CLI/projection support. The legacy `get_lessons`/`add_lesson` MCP tools now read/write playbook bullets instead of appending a second markdown memory family. Injection remains off by default pending adaptation evidence; no paper-magnitude gains are claimed.
|
|
60
|
+
- **WS-C — forward-pacing gate:** the completion gate is now conjunctive — a `completed` claim is demoted to `blocked`/`forward_pacing_incomplete` unless every declared `expected_artifact` and `required_evidence_ref` is satisfied (unstructured steps unchanged). `run_orchestrator` threads both into the bridge. Added a tool doom-loop brake (identical tool+result 3x warns, 4x blocks with a native blocker post; polling with changing results is exempt) and an inter-turn text-loop brake for envelopes that execute no tool (e.g. repeated empty `tool_calls`). Per-step `PLAN_UPDATE` status events carry `{plan_id, step_id, from, to, in_progress_step_id}`. Coders/builder guardrails forbid `status:complete` while artifacts/evidence are missing.
|
|
61
|
+
- **WS-H (seam) — token truth:** provider usage (`prompt_eval_count`/`eval_count`, OpenAI usage) is threaded into `BridgeResult.usage_totals`; a context-overflow sentinel blocks and emits `MODEL_CONTEXT_OVERFLOW_SUSPECTED` at >=98% of `num_ctx`; an output cap (`num_predict`/`max_tokens`) bounds runaway generation; retries are restricted to transport-class errors (5xx/408/429/network), never deterministic 4xx; envelope-required roles request JSON mode (`format:"json"` / `response_format`); a per-run NDJSON bridge trace is written under `agent-state/bridge-traces/`.
|
|
62
|
+
- **WS-E — surgical-edit cost & concurrency:** full-workspace staging only when validation is requested; staging prunes `node_modules`/`.git` at any depth (not just top-level); `expected_base_hash` fail-closed precondition; a source-mutation lease coordinator with `SOURCE_EDIT_*` events; backups moved under `.ace-staging/`; `gcStaging` GC wired into `ace mcp`/`ace cache`.
|
|
63
|
+
- **WS-G — premium-host profile & governance throttle:** `ace mcp --profile host-min|full` (host-min = 22 curated tools, ~22 KB vs 113/~68 KB); governance mutation guidance is now delta-only (append on digest change or every 10th call) and the bootstrap nudge is throttled per session; `buildAceDigest` is memoized with a 60s TTL to stop per-call file I/O.
|
|
64
|
+
- **D3 / WS-D — in-process job worker & heartbeat watchdog:** the scheduler was a pure planner — `dispatch_jobs` moved jobs to `running` and grabbed locks but nothing ever executed a job body or called `complete_job`, and `dispatchJobs` re-stamped every running lock's heartbeat each tick, which *masked* a dead worker and left jobs stuck `running` forever. Dispatch no longer renews running-job heartbeats: only a live worker (`heartbeat_job`) or a fresh start proves liveness, so a missing heartbeat reliably signals a dead worker. A heartbeat watchdog (`DEFAULT_HEARTBEAT_STALE_MS`, default 120 s; tunable per tick via `heartbeat_stale_seconds`) now runs inside every `dispatch_jobs` tick and as a standalone `reap_stale_jobs` tool, moving stale running jobs into `unknown_recovery` and releasing their locks (`SCHEDULER_WATCHDOG` events, `reason_code=heartbeat_stale`) — unlike lease recovery this fires even under the same owner with a valid lease. New `src/job-worker.ts` closes the execution loop: a `kind`→handler registry plus `runJobWorkerOnce` that dispatches, executes each running job's handler (heartbeating throughout, never holding the scheduler lock across a handler), and finalizes via `complete_job`. New MCP tools `heartbeat_job` and `reap_stale_jobs` (full surface now 115 tools). Prerequisite for the WS-F Goal Engine.
|
|
65
|
+
|
|
66
|
+
## [2.4.4] - 2026-06-25
|
|
67
|
+
|
|
68
|
+
### Fixed
|
|
69
|
+
|
|
70
|
+
- Fixed the Hermes bridge session manager dropping `final`/`error` frame semantics when the final NDJSON frame arrived without a trailing newline (recovered only by the post-close tail-flush). A newline-less `final` no longer reports `turns=0` with an empty summary, and a newline-less `error` frame is no longer silently reported as `completed`. The per-frame extraction is now shared by the live stream handler and the close-flush path so they cannot drift.
|
|
71
|
+
|
|
3
72
|
## [2.4.3] - 2026-05-23
|
|
4
73
|
|
|
5
74
|
### Changed
|