@zhivex-ai/harness 1.3.0 → 1.4.0-rc.6
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 +56 -0
- package/README.md +30 -8
- package/SECURITY.md +1 -1
- package/SUPPORT.md +2 -2
- package/contracts/engine-api.json +70 -0
- package/contracts/public-api.json +162 -0
- package/contracts/stable-api-signatures.json +9 -9
- package/dist/acp-cli.js +38 -12
- package/dist/cli/arguments.d.ts +5 -1
- package/dist/cli/memory.d.ts +2 -0
- package/dist/{cli-entry-bx3vjw7h.js → cli-entry-4k1cf0m3.js} +38 -12
- package/dist/{cli-entry-1gfg3brj.js → cli-entry-9c2k0zwz.js} +1086 -446
- package/dist/{cli-etsmtst3.js → cli-s1rs15vv.js} +136 -24
- package/dist/cli.js +2 -2
- package/dist/client/check-evidence.d.ts +17 -0
- package/dist/client/run-document.d.ts +12 -0
- package/dist/compat/cli-options.d.ts +12 -1
- package/dist/compat/code-support.d.ts +4 -0
- package/dist/compat/code-support.js +12 -4
- package/dist/context/compaction.d.ts +5 -0
- package/dist/context/project-memory-context.d.ts +6 -0
- package/dist/context/task-memory.d.ts +33 -1
- package/dist/engine/acp.js +8 -8
- package/dist/engine/client.js +7 -7
- package/dist/engine/desktop-state-v1.js +5 -5
- package/dist/engine/index.d.ts +4 -0
- package/dist/engine/index.js +88 -11
- package/dist/engine/mcp-stdio-v1.js +4 -4
- package/dist/engine/service.js +8 -8
- package/dist/hostile-repository-demo.js +1260 -712
- package/dist/{index-azmwjp95.js → index-0g939pfs.js} +13 -12
- package/dist/{index-6m08wvab.js → index-2tgb2b4e.js} +3 -3
- package/dist/{index-w2sj0wkw.js → index-49ys3s4q.js} +64 -14
- package/dist/{index-hnaxfpb5.js → index-4j1h4j8c.js} +137 -42
- package/dist/{index-8zzhggxv.js → index-a1q355va.js} +125 -2
- package/dist/{index-8vm2m34s.js → index-dj5z774k.js} +18 -2
- package/dist/{index-z0qxmkm2.js → index-e6r04a18.js} +1 -1
- package/dist/{index-yb239ghk.js → index-r0tdj04h.js} +21 -6
- package/dist/{index-h0mqx2ed.js → index-rd0s3gqj.js} +300 -4
- package/dist/{index-42gp2hy8.js → index-vtqfjnab.js} +98 -27
- package/dist/{index-2jrdcj6b.js → index-wq2tax80.js} +15 -1
- package/dist/{index-a97bezbz.js → index-z6br6qdn.js} +44 -23
- package/dist/index.js +11 -11
- package/dist/persistence/project-memory-command.d.ts +11 -0
- package/dist/persistence/project-memory.d.ts +109 -0
- package/dist/persistence/sdk-store-identity.d.ts +4 -0
- package/dist/persistence/sessions.d.ts +4 -0
- package/dist/runtime/error-diagnostics.d.ts +35 -0
- package/dist/runtime/harness.d.ts +5 -1
- package/dist/runtime/run-interruption.d.ts +1 -1
- package/dist/runtime/runtime-checkpoints.d.ts +3 -0
- package/dist/runtime/task-acceptance-native.d.ts +10 -0
- package/dist/runtime/time-to-safe-fix.d.ts +35 -0
- package/dist/service-cli.js +8 -8
- package/dist/{service-client-cli-3365rfav.js → service-client-cli-b52c67hx.js} +2 -2
- package/dist/verify-historical-migrations.js +1021 -456
- package/dist/zhx.js +2 -2
- package/docs/CLI.md +4 -0
- package/docs/CLIENT_PROTOCOL.md +10 -0
- package/docs/CODE_RELEASE.md +136 -19
- package/docs/CONTEXT_ENGINEERING.md +25 -0
- package/docs/DURABLE_OPERATIONS.md +60 -1
- package/docs/ENGINE_API.md +23 -9
- package/docs/EXTENSIBILITY.md +1 -1
- package/docs/FIRST_USE.md +6 -6
- package/docs/LOCAL_SERVICE.md +10 -4
- package/docs/PROJECT_MEMORY.md +157 -0
- package/docs/README.md +2 -0
- package/docs/STABILITY.md +1 -1
- package/docs/WORKSPACE_CHECKPOINTS.md +11 -1
- package/evaluations/representative-assembly-matrix.json +55 -1
- package/examples/README.md +4 -4
- package/package.json +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,62 @@ All notable changes to Zhivex Harness are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The project follows Semantic Versioning. During `0.x`, minor releases may change user-facing contracts when the change is documented with a migration note. Patch releases remain backwards compatible bug fixes.
|
|
6
6
|
|
|
7
|
+
## 1.4.0-rc.6 - 2026-10-05
|
|
8
|
+
|
|
9
|
+
- Prepare matched Harness 1.4.0-rc.6 and Code 0.3.0-rc.6 for npm `next`, with the exact Code engine pin, private Desktop binding and an additive representative mapping using unchanged models and SDK pins.
|
|
10
|
+
- Include the reviewed activity projection fix from PR185: compact bounded UI snapshot previews without failing valid runs, preserve run identities/statuses and truncation markers, and split already-redacted streamed text into bounded Unicode-safe events. Durable policy/event journals, retention limits and approval authority are unchanged.
|
|
11
|
+
- Preserve the held RC.5 campaign and immutable tag/source. Its passing offline, live and 42/42 representative evidence belongs to the older artifact and does not certify RC.6. Keep the RC.4 failure history and SDK store migration requirements.
|
|
12
|
+
- Require fresh exact-source/artifact validation and separate explicit approval before any paid campaign, annotated tag or publication. Stable `latest` channels and provider/API tiers remain unchanged.
|
|
13
|
+
|
|
14
|
+
## 1.4.0-rc.5 - 2026-10-05
|
|
15
|
+
|
|
16
|
+
- Prepare matched Harness 1.4.0-rc.5 and Code 0.3.0-rc.5 for npm `next`, with the exact engine pin, Desktop binding and a new representative mapping using unchanged models and SDK pins.
|
|
17
|
+
- Include the reviewed inherited-pipe termination regression correction: account for the existing cleanup grace and verify that the descendant heartbeat stops. Production termination protections are unchanged.
|
|
18
|
+
- Carry the reviewed Desktop lucide-react 1.50.0 update from main. Keep Desktop private alpha and retain all provider and API tiers.
|
|
19
|
+
- Preserve the immutable RC.4 tag and its failed offline campaign. Require a new exact artifact, unchanged protected gates and separate approval for any new paid campaign or publication.
|
|
20
|
+
|
|
21
|
+
The RC.4 SDK store migration requirements below still apply.
|
|
22
|
+
|
|
23
|
+
## 1.4.0-rc.4 - 2026-10-05
|
|
24
|
+
|
|
25
|
+
- Integrate published Core 1.30.1, Agents 1.10.3, Anthropic 0.13.2, OpenAI 0.14.1, Qwen 0.16.4 and Vertex 1.2.4. Keep Meta 0.2.9 and Gemini 0.13.0; align Code and browser contributor pins and retain a single Core runtime in Harness.
|
|
26
|
+
- Prepare matched Harness 1.4.0-rc.4 and Code 0.3.0-rc.4 for npm `next`, with an exact engine pin, Desktop binding and a new representative mapping using unchanged models. Retain immutable RC.2/RC.3 evidence and all protected gates.
|
|
27
|
+
- Preserve Core 1.30.1 canonical identities and memory envelopes through backup/import, retaining verified legacy runs and rejecting mismatched identities. Finalize cooperative cancellation after the worker drains so session reads do not strand at `cancel_requested`.
|
|
28
|
+
- Record bounded continuity response shape, streamed event counts and usage for the next failed phase without retaining provider text. This does not identify or resolve the historical RC.3 Meta cause.
|
|
29
|
+
|
|
30
|
+
- Extend experimental task acceptance to bounded native reviewed edits and declared package-script checks, tying receipts to selected/protected file digests and the manifest. Block other effect tools and delegation for native task runs. Preserve the separate SDK run status and pending human review.
|
|
31
|
+
- Add a redacted recorded-check projection to beta run-result JSON and experimental Code host helpers. Stable declaration snapshots and Harness run/session/backup schemas are unchanged.
|
|
32
|
+
- Carry forward Meta SDK 0.2.9 reasoning usage as a subset of output tokens, without adding it again to totals.
|
|
33
|
+
|
|
34
|
+
Migration: stop all workers sharing an SDK store and upgrade them together, keeping a complete backup. Core 1.30.1 uses canonical identities for new runs; verified legacy runs retain their physical keys. Older workers cannot resolve new identities. Legacy default SDK memory without verified ownership requires explicit offline migration; do not rewrite IDs/scopes to bypass validation. See [SDK store migration](https://github.com/Zhivex/zhivex-ai-sdk/blob/4a93004395a80c183b1257bb1d02fb3a3d4050e1/docs/maintainers/AGENT_STORE_MIGRATION.md). Runs without a task contract retain their behavior. Native task contracts now enforce their edit/check tool scope and may report `pending_review`/`verified` when their watched-file requirements pass; they do not receive OCI sandbox, whole-snapshot or import guarantees. Check evidence remains invalid after watched-file drift or uncertain journal recovery.
|
|
35
|
+
|
|
36
|
+
## 1.4.0-rc.3 - 2026-10-04
|
|
37
|
+
|
|
38
|
+
- Retain finite stage, assertion and provider-route identities in mixed-routing release diagnostics, preserve typed operational causes across artifact class boundaries, and keep cleanup failures from masking the original gate failure. Add offline fault coverage; historical release evidence remains unchanged.
|
|
39
|
+
|
|
40
|
+
- Prepare matched Harness 1.4.0-rc.3 and Code 0.3.0-rc.3 for npm `next`, preserving the complete certification workflow, model pins and provider support tiers. Keep RC.2 tags, retained artifacts and failed evidence immutable; RC.3 requires fresh source-bound artifact, OCI, live and representative gates.
|
|
41
|
+
|
|
42
|
+
## 1.4.0-rc.2 - 2026-10-04
|
|
43
|
+
|
|
44
|
+
- Recover bounded prior assistant reports and plans through `read_task` after local session compaction, including immediate manual compaction of the first report and continued sessions after reconnect or host restart. Keep recovered text untrusted and separate from operator requests, approvals and acceptance evidence.
|
|
45
|
+
|
|
46
|
+
- Prepare the matched Harness 1.4.0-rc.2 and Code 0.3.0-rc.2 for npm `next`, retaining exact engine pins, historical model mappings and provider support tiers. Publication requires new release-bound artifact, OCI, live and representative gates.
|
|
47
|
+
|
|
48
|
+
## 1.4.0-rc.1 - 2026-10-04
|
|
49
|
+
|
|
50
|
+
- Add experimental, project-scoped operator memory in the existing SQLite memory table, with explicit corrections/deletion, reviewed suggestions, provenance, freshness and bounded per-request retrieval.
|
|
51
|
+
- Add local `memory` commands and `--no-memory` to Harness/Code without terminal layout changes. Curated mode stops automatic last-assistant capture; the stable engine default and explicit SDK memory integrations remain supported.
|
|
52
|
+
- Preserve old state and import compatibility; document active deletion versus separately retained histories/backups and next-release engine pairing. See [Project memory](docs/PROJECT_MEMORY.md). Published to npm `next` on 2026-10-04.
|
|
53
|
+
|
|
54
|
+
- Pair with Code 0.3.0-rc.1 for compact terminal flow, pageable approval review and the local browser workspace with packaged assets. Publish Harness first to `next`; preserve stable `latest`.
|
|
55
|
+
|
|
56
|
+
## Code 0.2.0 - 2026-10-03
|
|
57
|
+
|
|
58
|
+
- Prepare the independent Code package at 0.2.0, pinned to published Harness 1.3.0. Harness stays at 1.3.0.
|
|
59
|
+
- Include guided approval diffs, reviewed checkpoints, per-run estimated budgets and a Node-only offline tutorial from PR158; estimates are not guaranteed financial caps.
|
|
60
|
+
- Fix exact Code payload inspection, add deterministic packaging regressions, require exact-main installed journeys, and validate the retained release tarball with offline PTY acceptance.
|
|
61
|
+
- See [Code changelog](https://github.com/Zhivex/zhivex-harness/blob/main/packages/code/CHANGELOG.md) for migration notes and publication status.
|
|
62
|
+
|
|
7
63
|
## 1.3.0 - 2026-10-02
|
|
8
64
|
|
|
9
65
|
- Prepare Harness 1.3.0 and the independent Code CLI 0.1.0 for protected publication to npm `latest`; Code pins exactly Harness 1.3.0 and must publish after its verified engine dependency.
|
package/README.md
CHANGED
|
@@ -11,10 +11,16 @@ implement a change. Conversation context retains decisions, hypotheses and bound
|
|
|
11
11
|
diagnostic excerpts across compaction. Edits and command execution keep their
|
|
12
12
|
own permission checks; a conversational summary never grants approval.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
For the developer-facing terminal product, install
|
|
15
|
+
`npm install -g @zhivex-ai/code@0.2.0` and run `zhivex-code` in your project.
|
|
16
|
+
See [Code installation and first use](https://github.com/Zhivex/zhivex-harness/blob/main/packages/code/README.md). Harness remains
|
|
17
|
+
the reusable engine and its compatibility CLI. The `/task` delivery workflow in
|
|
18
|
+
this checkout is an unreleased experimental Code addition, not a published feature.
|
|
19
|
+
|
|
20
|
+
Version `1.3.0` is the current public npm release on `latest`, with terminal-independent engine
|
|
21
|
+
entrypoints and the separately published Code CLI `0.2.0` on `latest`. Harness publication passed registry integrity and provenance verification. Harness `1.4.0-rc.1` and
|
|
22
|
+
Code `0.3.0-rc.1` are published on `next`. The RC.6 versions prepared in this
|
|
23
|
+
checkout remain unpublished. Stable package numbering does
|
|
18
24
|
not change API stability tiers: beta and experimental APIs retain their policies,
|
|
19
25
|
Gemini/Anthropic/Vertex remain provisional, and Desktop remains a private alpha.
|
|
20
26
|
|
|
@@ -22,10 +28,10 @@ Gemini/Anthropic/Vertex remain provisional, and Desktop remains a private alpha.
|
|
|
22
28
|
|
|
23
29
|
Requires Node.js 22.13.0 or newer, Git and a provider API key.
|
|
24
30
|
|
|
25
|
-
|
|
31
|
+
Install the stable npm release (`latest`, currently `1.3.0`):
|
|
26
32
|
|
|
27
33
|
```sh
|
|
28
|
-
npm install -g @zhivex-ai/harness@
|
|
34
|
+
npm install -g @zhivex-ai/harness@latest
|
|
29
35
|
cd /path/to/your/project
|
|
30
36
|
zhx
|
|
31
37
|
```
|
|
@@ -41,6 +47,20 @@ Type `/` for common actions. `/model` changes the model, `/sessions` finds previ
|
|
|
41
47
|
conversations, and `/diff` shows changes. Review requested actions before approving
|
|
42
48
|
them. Ctrl+C stops active work; it does not undo completed changes.
|
|
43
49
|
|
|
50
|
+
## Release candidates
|
|
51
|
+
|
|
52
|
+
This checkout prepares Harness `1.4.0-rc.6` and Code `0.3.0-rc.6` for `next`, with an exact engine pin. Project memory, compact terminal review and the local browser workspace ship together after protected validation. See the [release procedure](https://github.com/Zhivex/zhivex-harness/blob/main/docs/RELEASE.md). RC.6 publication is pending. It includes the reviewed bounded activity snapshot fix; RC.5 remains held and its source/tag cannot be reused for this fix. The failed RC.4 attempt and immutable source are preserved; npm `next` currently points to Harness `1.4.0-rc.1` and Code `0.3.0-rc.1`. These prerelease candidates are separate from the stable `latest` channel.
|
|
53
|
+
|
|
54
|
+
Use candidates only for prerelease validation. Check [npm versions](https://www.npmjs.com/package/@zhivex-ai/harness?activeTab=versions)
|
|
55
|
+
and the [release procedure](https://github.com/Zhivex/zhivex-harness/blob/main/docs/RELEASE.md)
|
|
56
|
+
before installing a candidate; `next` can still point to an earlier RC.
|
|
57
|
+
|
|
58
|
+
After publication of this exact candidate:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
npm install -g @zhivex-ai/harness@1.4.0-rc.6
|
|
62
|
+
```
|
|
63
|
+
|
|
44
64
|
## A few commands are enough
|
|
45
65
|
|
|
46
66
|
| Command | Purpose |
|
|
@@ -80,8 +100,10 @@ Gemini, [Anthropic](docs/ANTHROPIC.md) and [Vertex](docs/VERTEX.md) remain provi
|
|
|
80
100
|
|
|
81
101
|
[Browse documentation](docs/README.md).
|
|
82
102
|
|
|
83
|
-
Version `1.
|
|
103
|
+
Version `1.3.0` is the current public npm release. Source checkout changes can be
|
|
84
104
|
newer than the published package. Consult the [changelog](CHANGELOG.md) and
|
|
85
105
|
[repository release status](https://raw.githubusercontent.com/Zhivex/zhivex-harness/main/release-status.json)
|
|
86
|
-
for the verified 1.
|
|
106
|
+
for the verified 1.3.0 publication; [release evidence](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md)
|
|
87
107
|
records validation scope and limitations.
|
|
108
|
+
|
|
109
|
+
Experimental next-version work includes [project memory](docs/PROJECT_MEMORY.md): explicit, reviewable notes scoped to one project, with bounded retrieval and deletion controls.
|
package/SECURITY.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Supported versions
|
|
4
4
|
|
|
5
|
-
Security fixes are provided for the latest published
|
|
5
|
+
Security fixes are provided for the latest published `1.3.x` patch of Harness and the latest stable Code `0.1.x` patch. RCs on `next` are validation candidates; older minors and private checkpoints are not supported release channels. Desktop remains a separate private alpha. Beta and experimental features retain their documented limitations. Registry integrity and provenance do not substitute for the separate provider and execution evidence recorded in [docs/LIVE_CERTIFICATION.md](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md).
|
|
6
6
|
|
|
7
7
|
## Reporting a vulnerability
|
|
8
8
|
|
package/SUPPORT.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Support
|
|
2
2
|
|
|
3
|
-
Zhivex Harness `1.
|
|
3
|
+
Zhivex Harness `1.3.x` is the latest supported Node-first CLI and TypeScript library. Stable 1.x contracts follow [the stability policy](./docs/STABILITY.md); incompatible changes require a major release except documented urgent security corrections. Beta and experimental surfaces retain their declared policies. The mutable machine-readable `release-status.json` record records the verified 1.3.0 publication. Harness 1.3.0 and Code 0.1.0 are published and verified on latest through their protected workflows.
|
|
4
4
|
|
|
5
5
|
The 1.1 support scope is tracked in the [machine-readable support matrix](./docs/support-matrix-1.1.json) and its [human-readable view](./docs/SUPPORT_MATRIX_1_1.md). The [1.0 matrix](./docs/SUPPORT_MATRIX.md) remains historical. Compatibility and removals follow [DEPRECATIONS.md](./docs/DEPRECATIONS.md) for the published 1.x line.
|
|
6
6
|
|
|
@@ -13,7 +13,7 @@ The 1.1 support scope is tracked in the [machine-readable support matrix](./docs
|
|
|
13
13
|
- the provider/model combinations marked certified in the package documentation; and
|
|
14
14
|
- HTTPS or explicitly allowed loopback-HTTP MCP endpoints using the documented bounded JSON-RPC subset.
|
|
15
15
|
|
|
16
|
-
Only the most recent published stable minor receives routine fixes. The exact `v1.
|
|
16
|
+
Only the most recent published stable minor receives routine fixes. The exact `v1.3.0` tag passed the protected artifact, six-provider live and 42-case representative release jobs. Harness 1.3.x and Code 0.1.x are the supported stable lines. Gemini, Anthropic and Vertex remain provisional despite the release-bound live gates; the representative repository matrix covers only Meta, Qwen and OpenAI. Live provider evidence is account-, model-, endpoint-, artifact-, and date-dependent; see [docs/LIVE_CERTIFICATION.md](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md).
|
|
17
17
|
|
|
18
18
|
## Installation diagnostics
|
|
19
19
|
|
|
@@ -6,6 +6,56 @@
|
|
|
6
6
|
"source": "src/engine/index.ts",
|
|
7
7
|
"environment": "node",
|
|
8
8
|
"exports": [
|
|
9
|
+
{
|
|
10
|
+
"name": "HARNESS_PROJECT_MEMORY_SCHEMA_VERSION",
|
|
11
|
+
"kind": "runtime",
|
|
12
|
+
"tier": "experimental"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"name": "HARNESS_PROJECT_MEMORY_LIMITS",
|
|
16
|
+
"kind": "runtime",
|
|
17
|
+
"tier": "experimental"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "openHarnessProjectMemory",
|
|
21
|
+
"kind": "runtime",
|
|
22
|
+
"tier": "experimental"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "HarnessProjectMemory",
|
|
26
|
+
"kind": "type",
|
|
27
|
+
"tier": "experimental"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"name": "HarnessProjectMemoryEntry",
|
|
31
|
+
"kind": "type",
|
|
32
|
+
"tier": "experimental"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "HarnessProjectMemoryInput",
|
|
36
|
+
"kind": "type",
|
|
37
|
+
"tier": "experimental"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "HarnessProjectMemoryOptions",
|
|
41
|
+
"kind": "type",
|
|
42
|
+
"tier": "experimental"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "HarnessProjectMemoryView",
|
|
46
|
+
"kind": "type",
|
|
47
|
+
"tier": "experimental"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "HARNESS_MEMORY_COMMANDS",
|
|
51
|
+
"kind": "runtime",
|
|
52
|
+
"tier": "experimental"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "executeHarnessMemoryCommand",
|
|
56
|
+
"kind": "runtime",
|
|
57
|
+
"tier": "experimental"
|
|
58
|
+
},
|
|
9
59
|
{
|
|
10
60
|
"name": "DEFAULT_ALLOWED_CHECKS",
|
|
11
61
|
"kind": "runtime",
|
|
@@ -2665,6 +2715,26 @@
|
|
|
2665
2715
|
"name": "readRegularFileNoFollow",
|
|
2666
2716
|
"kind": "runtime",
|
|
2667
2717
|
"tier": "experimental"
|
|
2718
|
+
},
|
|
2719
|
+
{
|
|
2720
|
+
"name": "resolvePackageCheckCommand",
|
|
2721
|
+
"kind": "runtime",
|
|
2722
|
+
"tier": "experimental"
|
|
2723
|
+
},
|
|
2724
|
+
{
|
|
2725
|
+
"name": "nativeTaskSnapshot",
|
|
2726
|
+
"kind": "runtime",
|
|
2727
|
+
"tier": "experimental"
|
|
2728
|
+
},
|
|
2729
|
+
{
|
|
2730
|
+
"name": "TASK_ACCEPTANCE_EVIDENCE_KEY",
|
|
2731
|
+
"kind": "runtime",
|
|
2732
|
+
"tier": "experimental"
|
|
2733
|
+
},
|
|
2734
|
+
{
|
|
2735
|
+
"name": "checkEvidence",
|
|
2736
|
+
"kind": "runtime",
|
|
2737
|
+
"tier": "experimental"
|
|
2668
2738
|
}
|
|
2669
2739
|
]
|
|
2670
2740
|
},
|
|
@@ -906,6 +906,7 @@
|
|
|
906
906
|
"checkpoints",
|
|
907
907
|
"changes",
|
|
908
908
|
"state",
|
|
909
|
+
"memory",
|
|
909
910
|
"help",
|
|
910
911
|
"version"
|
|
911
912
|
],
|
|
@@ -975,6 +976,7 @@
|
|
|
975
976
|
"allowed": [
|
|
976
977
|
"--service",
|
|
977
978
|
"--session",
|
|
979
|
+
"--no-memory",
|
|
978
980
|
"--compaction-model",
|
|
979
981
|
"--compaction-provider",
|
|
980
982
|
"--tool-policy",
|
|
@@ -1122,6 +1124,7 @@
|
|
|
1122
1124
|
"chat": {
|
|
1123
1125
|
"allowed": [
|
|
1124
1126
|
"--service",
|
|
1127
|
+
"--no-memory",
|
|
1125
1128
|
"--compaction-model",
|
|
1126
1129
|
"--compaction-provider",
|
|
1127
1130
|
"--tool-policy",
|
|
@@ -1237,6 +1240,7 @@
|
|
|
1237
1240
|
"policy": {
|
|
1238
1241
|
"allowed": [
|
|
1239
1242
|
"--service",
|
|
1243
|
+
"--no-memory",
|
|
1240
1244
|
"--compaction-model",
|
|
1241
1245
|
"--compaction-provider",
|
|
1242
1246
|
"--tool-policy",
|
|
@@ -1398,6 +1402,7 @@
|
|
|
1398
1402
|
},
|
|
1399
1403
|
"resume": {
|
|
1400
1404
|
"allowed": [
|
|
1405
|
+
"--no-memory",
|
|
1401
1406
|
"--tool-policy",
|
|
1402
1407
|
"--service",
|
|
1403
1408
|
"--session",
|
|
@@ -1771,6 +1776,163 @@
|
|
|
1771
1776
|
"repeatable": [],
|
|
1772
1777
|
"conflicts": {}
|
|
1773
1778
|
},
|
|
1779
|
+
"memory:remember": {
|
|
1780
|
+
"allowed": [
|
|
1781
|
+
"--workspace",
|
|
1782
|
+
"--state-dir",
|
|
1783
|
+
"--store",
|
|
1784
|
+
"--tenant",
|
|
1785
|
+
"--user",
|
|
1786
|
+
"--namespace",
|
|
1787
|
+
"--json",
|
|
1788
|
+
"--source"
|
|
1789
|
+
],
|
|
1790
|
+
"required": [],
|
|
1791
|
+
"repeatable": [],
|
|
1792
|
+
"conflicts": {}
|
|
1793
|
+
},
|
|
1794
|
+
"memory:suggest": {
|
|
1795
|
+
"allowed": [
|
|
1796
|
+
"--workspace",
|
|
1797
|
+
"--state-dir",
|
|
1798
|
+
"--store",
|
|
1799
|
+
"--tenant",
|
|
1800
|
+
"--user",
|
|
1801
|
+
"--namespace",
|
|
1802
|
+
"--json",
|
|
1803
|
+
"--source"
|
|
1804
|
+
],
|
|
1805
|
+
"required": [],
|
|
1806
|
+
"repeatable": [],
|
|
1807
|
+
"conflicts": {}
|
|
1808
|
+
},
|
|
1809
|
+
"memory:list": {
|
|
1810
|
+
"allowed": [
|
|
1811
|
+
"--workspace",
|
|
1812
|
+
"--state-dir",
|
|
1813
|
+
"--store",
|
|
1814
|
+
"--tenant",
|
|
1815
|
+
"--user",
|
|
1816
|
+
"--namespace",
|
|
1817
|
+
"--json"
|
|
1818
|
+
],
|
|
1819
|
+
"required": [],
|
|
1820
|
+
"repeatable": [],
|
|
1821
|
+
"conflicts": {}
|
|
1822
|
+
},
|
|
1823
|
+
"memory:read": {
|
|
1824
|
+
"allowed": [
|
|
1825
|
+
"--workspace",
|
|
1826
|
+
"--state-dir",
|
|
1827
|
+
"--store",
|
|
1828
|
+
"--tenant",
|
|
1829
|
+
"--user",
|
|
1830
|
+
"--namespace",
|
|
1831
|
+
"--json"
|
|
1832
|
+
],
|
|
1833
|
+
"required": [],
|
|
1834
|
+
"repeatable": [],
|
|
1835
|
+
"conflicts": {}
|
|
1836
|
+
},
|
|
1837
|
+
"memory:update": {
|
|
1838
|
+
"allowed": [
|
|
1839
|
+
"--workspace",
|
|
1840
|
+
"--state-dir",
|
|
1841
|
+
"--store",
|
|
1842
|
+
"--tenant",
|
|
1843
|
+
"--user",
|
|
1844
|
+
"--namespace",
|
|
1845
|
+
"--json",
|
|
1846
|
+
"--source"
|
|
1847
|
+
],
|
|
1848
|
+
"required": [],
|
|
1849
|
+
"repeatable": [],
|
|
1850
|
+
"conflicts": {}
|
|
1851
|
+
},
|
|
1852
|
+
"memory:forget": {
|
|
1853
|
+
"allowed": [
|
|
1854
|
+
"--workspace",
|
|
1855
|
+
"--state-dir",
|
|
1856
|
+
"--store",
|
|
1857
|
+
"--tenant",
|
|
1858
|
+
"--user",
|
|
1859
|
+
"--namespace",
|
|
1860
|
+
"--json"
|
|
1861
|
+
],
|
|
1862
|
+
"required": [],
|
|
1863
|
+
"repeatable": [],
|
|
1864
|
+
"conflicts": {}
|
|
1865
|
+
},
|
|
1866
|
+
"memory:accept": {
|
|
1867
|
+
"allowed": [
|
|
1868
|
+
"--workspace",
|
|
1869
|
+
"--state-dir",
|
|
1870
|
+
"--store",
|
|
1871
|
+
"--tenant",
|
|
1872
|
+
"--user",
|
|
1873
|
+
"--namespace",
|
|
1874
|
+
"--json"
|
|
1875
|
+
],
|
|
1876
|
+
"required": [],
|
|
1877
|
+
"repeatable": [],
|
|
1878
|
+
"conflicts": {}
|
|
1879
|
+
},
|
|
1880
|
+
"memory:clear": {
|
|
1881
|
+
"allowed": [
|
|
1882
|
+
"--workspace",
|
|
1883
|
+
"--state-dir",
|
|
1884
|
+
"--store",
|
|
1885
|
+
"--tenant",
|
|
1886
|
+
"--user",
|
|
1887
|
+
"--namespace",
|
|
1888
|
+
"--json"
|
|
1889
|
+
],
|
|
1890
|
+
"required": [],
|
|
1891
|
+
"repeatable": [],
|
|
1892
|
+
"conflicts": {}
|
|
1893
|
+
},
|
|
1894
|
+
"memory:enable": {
|
|
1895
|
+
"allowed": [
|
|
1896
|
+
"--workspace",
|
|
1897
|
+
"--state-dir",
|
|
1898
|
+
"--store",
|
|
1899
|
+
"--tenant",
|
|
1900
|
+
"--user",
|
|
1901
|
+
"--namespace",
|
|
1902
|
+
"--json"
|
|
1903
|
+
],
|
|
1904
|
+
"required": [],
|
|
1905
|
+
"repeatable": [],
|
|
1906
|
+
"conflicts": {}
|
|
1907
|
+
},
|
|
1908
|
+
"memory:disable": {
|
|
1909
|
+
"allowed": [
|
|
1910
|
+
"--workspace",
|
|
1911
|
+
"--state-dir",
|
|
1912
|
+
"--store",
|
|
1913
|
+
"--tenant",
|
|
1914
|
+
"--user",
|
|
1915
|
+
"--namespace",
|
|
1916
|
+
"--json"
|
|
1917
|
+
],
|
|
1918
|
+
"required": [],
|
|
1919
|
+
"repeatable": [],
|
|
1920
|
+
"conflicts": {}
|
|
1921
|
+
},
|
|
1922
|
+
"memory:context": {
|
|
1923
|
+
"allowed": [
|
|
1924
|
+
"--workspace",
|
|
1925
|
+
"--state-dir",
|
|
1926
|
+
"--store",
|
|
1927
|
+
"--tenant",
|
|
1928
|
+
"--user",
|
|
1929
|
+
"--namespace",
|
|
1930
|
+
"--json"
|
|
1931
|
+
],
|
|
1932
|
+
"required": [],
|
|
1933
|
+
"repeatable": [],
|
|
1934
|
+
"conflicts": {}
|
|
1935
|
+
},
|
|
1774
1936
|
"state:status": {
|
|
1775
1937
|
"allowed": [
|
|
1776
1938
|
"--workspace",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "CLI_COMMAND_OPTION_CONTRACTS",
|
|
16
|
-
"sha256": "sha256:
|
|
16
|
+
"sha256": "sha256:0ea9c36f10d66fa7f4b5dc3c1d500d12f1e2f80c14d65125d3349980a1f2e192"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"name": "CLI_EVENT_SCHEMA_VERSION",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"name": "CLI_OPTION_DEFINITIONS",
|
|
28
|
-
"sha256": "sha256:
|
|
28
|
+
"sha256": "sha256:369aa10cdaaab6721aacb248c99fa0f33d6b47a2135b7f7b64312fa2da4e5e59"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"name": "CLI_OPTION_NAMES",
|
|
32
|
-
"sha256": "sha256:
|
|
32
|
+
"sha256": "sha256:7dd7e64d26a693a5aff7366a9c3a0197eee33cda5da93ff2e5c1a577d00d4bb8"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"name": "DEFAULT_ALLOWED_CHECKS",
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
"name": "createHarness",
|
|
168
|
-
"sha256": "sha256:
|
|
168
|
+
"sha256": "sha256:b237f9c2a28c01dbc7e929afd2195af7082bb5533020bf151eba16a5626eba61"
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
"name": "createHarnessMcpTools",
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
291
|
"name": "validateCliCommandOptions",
|
|
292
|
-
"sha256": "sha256:
|
|
292
|
+
"sha256": "sha256:db01336efeae394b41ff8585f9c8a496f4dc2a0b98a2b7c581435773939186ed"
|
|
293
293
|
},
|
|
294
294
|
{
|
|
295
295
|
"name": "verifyChangeEnvelope",
|
|
@@ -311,7 +311,7 @@
|
|
|
311
311
|
},
|
|
312
312
|
{
|
|
313
313
|
"name": "CliCommandOptionContractKey",
|
|
314
|
-
"sha256": "sha256:
|
|
314
|
+
"sha256": "sha256:f8d27a7efeac758dea77cde2c92806815db92d91ac18a1173f67f2e2062875d6"
|
|
315
315
|
},
|
|
316
316
|
{
|
|
317
317
|
"name": "CliInitDocument",
|
|
@@ -331,7 +331,7 @@
|
|
|
331
331
|
},
|
|
332
332
|
{
|
|
333
333
|
"name": "CliOptionName",
|
|
334
|
-
"sha256": "sha256:
|
|
334
|
+
"sha256": "sha256:70faf9b4c1b10264dd8ac85a87aef4d66871eae592118a29469c79addd024d22"
|
|
335
335
|
},
|
|
336
336
|
{
|
|
337
337
|
"name": "CliReviewGroupDocument",
|
|
@@ -375,7 +375,7 @@
|
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
377
|
"name": "CreateHarnessOptions",
|
|
378
|
-
"sha256": "sha256:
|
|
378
|
+
"sha256": "sha256:596b95a410a0bd84feb53ae0188177c934b1f7432c155684f7d33e9d49fff898"
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
381
|
"name": "HarnessBudget",
|
|
@@ -490,5 +490,5 @@
|
|
|
490
490
|
"sha256": "sha256:76de0209fbf835d1427b6ab2764a919e8e814237a1be7b15c9bc0dc002f8fd6e"
|
|
491
491
|
}
|
|
492
492
|
],
|
|
493
|
-
"digest": "sha256:
|
|
493
|
+
"digest": "sha256:0c2cec6bd1dd8de467e8619c18b25e48d56416dec1866ff5a124798525b1a52b"
|
|
494
494
|
}
|
package/dist/acp-cli.js
CHANGED
|
@@ -5,27 +5,27 @@ import {
|
|
|
5
5
|
parseHarnessModelRoute,
|
|
6
6
|
resolveHarnessModelRoutes,
|
|
7
7
|
validateCliCommandOptions
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-wq2tax80.js";
|
|
9
9
|
import {
|
|
10
10
|
serveAcpStdio
|
|
11
11
|
} from "./index-3ah1f369.js";
|
|
12
12
|
import {
|
|
13
13
|
createHarness,
|
|
14
14
|
createHarnessClientAdapter
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
15
|
+
} from "./index-4j1h4j8c.js";
|
|
16
|
+
import"./index-rd0s3gqj.js";
|
|
17
|
+
import"./index-a1q355va.js";
|
|
18
18
|
import {
|
|
19
19
|
usagePricingSchema
|
|
20
|
-
} from "./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
20
|
+
} from "./index-vtqfjnab.js";
|
|
21
|
+
import"./index-0g939pfs.js";
|
|
22
|
+
import"./index-e6r04a18.js";
|
|
23
23
|
import {
|
|
24
24
|
FileChangedWhileReadingError,
|
|
25
25
|
FileSizeLimitError,
|
|
26
26
|
UnsafeFileTypeError,
|
|
27
27
|
readRegularFileNoFollow
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-r0tdj04h.js";
|
|
29
29
|
import {
|
|
30
30
|
HARNESS_REQUIRED_CAPABILITIES,
|
|
31
31
|
HARNESS_SUBAGENT_PROFILES,
|
|
@@ -51,6 +51,17 @@ import { fileURLToPath } from "node:url";
|
|
|
51
51
|
|
|
52
52
|
// src/cli/cli-help.ts
|
|
53
53
|
var usage = {
|
|
54
|
+
"memory:remember": 'zhx memory remember "content" [--source "provenance"]',
|
|
55
|
+
"memory:suggest": 'zhx memory suggest "content" [--source "provenance"]',
|
|
56
|
+
"memory:list": "zhx memory list",
|
|
57
|
+
"memory:read": "zhx memory read <id>",
|
|
58
|
+
"memory:update": 'zhx memory update <id> <revision> "content" [--source "provenance"]',
|
|
59
|
+
"memory:forget": "zhx memory forget <id> <revision>",
|
|
60
|
+
"memory:accept": "zhx memory accept <id> <reviewedRevision>",
|
|
61
|
+
"memory:clear": "zhx memory clear",
|
|
62
|
+
"memory:enable": "zhx memory enable",
|
|
63
|
+
"memory:disable": "zhx memory disable",
|
|
64
|
+
"memory:context": 'zhx memory context "query"',
|
|
54
65
|
"checkpoints:storage": "zhx checkpoints storage",
|
|
55
66
|
"checkpoints:prune-review": "zhx checkpoints prune-review <checkpoint:id|restore:id> [...]",
|
|
56
67
|
"checkpoints:prune-apply": "zhx checkpoints prune-apply <reviewedPlanId> <checkpoint:id|restore:id> [...]",
|
|
@@ -217,7 +228,7 @@ var applyCliProfile = async (options, context = {}) => {
|
|
|
217
228
|
};
|
|
218
229
|
|
|
219
230
|
// src/cli/arguments.ts
|
|
220
|
-
var CLI_COMMANDS = ["init", "run", "review", "chat", "providers", "doctor", "policy", "resume", "runs", "sessions", "checkpoints", "changes", "state", "help", "version"];
|
|
231
|
+
var CLI_COMMANDS = ["init", "run", "review", "chat", "providers", "doctor", "policy", "resume", "runs", "sessions", "checkpoints", "changes", "state", "memory", "help", "version"];
|
|
221
232
|
var CLI_RUNS_COMMANDS = ["list", "inspect", "cancel", "cleanup", "export", "report"];
|
|
222
233
|
var CLI_SESSIONS_COMMANDS = ["list", "inspect", "rename", "fork", "archive"];
|
|
223
234
|
var CLI_CHANGES_COMMANDS = ["create", "verify"];
|
|
@@ -254,7 +265,7 @@ var optionValue = (argv, index, name) => {
|
|
|
254
265
|
return value;
|
|
255
266
|
};
|
|
256
267
|
var parseCliArgs = (argv) => {
|
|
257
|
-
const booleanOptions = new Set(["--token-budget", "--no-token-budget", "--yes", "--approve", "--deny", "--json", "--jsonl", "--continue", "--cascade", "--final", "--apply", "--help", "--version", "--no-project-context", "--update"]);
|
|
268
|
+
const booleanOptions = new Set(["--token-budget", "--no-token-budget", "--yes", "--approve", "--deny", "--json", "--jsonl", "--continue", "--cascade", "--final", "--apply", "--help", "--version", "--no-project-context", "--no-memory", "--update"]);
|
|
258
269
|
const separator = argv.indexOf("--");
|
|
259
270
|
argv = argv.flatMap((arg, index) => {
|
|
260
271
|
const equals = arg.indexOf("=");
|
|
@@ -289,7 +300,7 @@ var parseCliArgs = (argv) => {
|
|
|
289
300
|
words.push(arg);
|
|
290
301
|
}
|
|
291
302
|
const first = words[0];
|
|
292
|
-
const parts = first === "help" ? words.slice(1) : first && COMMANDS.has(first) ? words.slice(0, ["runs", "sessions", "checkpoints", "changes", "state"].includes(first) ? 2 : 1) : [];
|
|
303
|
+
const parts = first === "help" ? words.slice(1) : first && COMMANDS.has(first) ? words.slice(0, ["runs", "sessions", "checkpoints", "changes", "state", "memory"].includes(first) ? 2 : 1) : [];
|
|
293
304
|
try {
|
|
294
305
|
const topic = resolveHelpTopic(parts, parts.length > 0);
|
|
295
306
|
return { ...options, command: "help", ...topic ? { helpTopic: topic } : {} };
|
|
@@ -321,6 +332,13 @@ var parseCliArgs = (argv) => {
|
|
|
321
332
|
continue;
|
|
322
333
|
}
|
|
323
334
|
switch (argument) {
|
|
335
|
+
case "--no-memory":
|
|
336
|
+
options.projectMemory = false;
|
|
337
|
+
break;
|
|
338
|
+
case "--source":
|
|
339
|
+
options.memorySource = optionValue(argv, index, argument);
|
|
340
|
+
index += 1;
|
|
341
|
+
break;
|
|
324
342
|
case "--update":
|
|
325
343
|
options.updateProfile = true;
|
|
326
344
|
break;
|
|
@@ -846,6 +864,13 @@ var parseCliArgs = (argv) => {
|
|
|
846
864
|
if (positional.length > 0) {
|
|
847
865
|
throw new CliUsageError(`changes ${changesCommand} received unexpected positional arguments.`);
|
|
848
866
|
}
|
|
867
|
+
} else if (options.command === "memory") {
|
|
868
|
+
const subcommand = positional.shift();
|
|
869
|
+
const counts = { remember: 1, list: 0, read: 1, update: 3, forget: 2, suggest: 1, accept: 2, clear: 0, enable: 0, disable: 0, context: 1 };
|
|
870
|
+
if (!subcommand || !Object.hasOwn(counts, subcommand) || positional.length !== counts[subcommand])
|
|
871
|
+
throw new CliUsageError("Invalid memory arguments. Use memory --help; quote content as one argument.");
|
|
872
|
+
options.memoryCommand = subcommand;
|
|
873
|
+
options.memoryArguments = positional.splice(0);
|
|
849
874
|
} else if (options.command === "state") {
|
|
850
875
|
const stateCommand = positional.shift();
|
|
851
876
|
if (!stateCommand || !STATE_COMMANDS.has(stateCommand)) {
|
|
@@ -882,7 +907,7 @@ var parseCliArgs = (argv) => {
|
|
|
882
907
|
} else if (["run", "resume"].includes(options.command) && optionCounts.has("--session")) {
|
|
883
908
|
throw new CliUsageError("--session for run/resume requires --service.");
|
|
884
909
|
}
|
|
885
|
-
const commandKey = options.command === "checkpoints" ? `checkpoints:${options.checkpointsCommand}` : options.command === "runs" ? `runs:${options.runsCommand}` : options.command === "sessions" ? `sessions:${options.sessionsCommand}` : options.command === "changes" ? `changes:${options.changesCommand}` : options.command === "state" ? `state:${options.stateCommand}` : options.command;
|
|
910
|
+
const commandKey = options.command === "checkpoints" ? `checkpoints:${options.checkpointsCommand}` : options.command === "runs" ? `runs:${options.runsCommand}` : options.command === "sessions" ? `sessions:${options.sessionsCommand}` : options.command === "changes" ? `changes:${options.changesCommand}` : options.command === "memory" ? `memory:${options.memoryCommand}` : options.command === "state" ? `state:${options.stateCommand}` : options.command;
|
|
886
911
|
try {
|
|
887
912
|
validateCliCommandOptions(commandKey, optionCounts);
|
|
888
913
|
} catch (error) {
|
|
@@ -1020,6 +1045,7 @@ var createConfiguredHarness = async (options, extraProfiles = [], persistedRoute
|
|
|
1020
1045
|
const compactionModelInstance = resolvedConfig.compaction.model && compactionEnv ? await credentialModel(resolvedConfig.compaction.model, compactionEnv) : undefined;
|
|
1021
1046
|
const harness = await createHarness({
|
|
1022
1047
|
...options,
|
|
1048
|
+
...{ projectMemory: options.projectMemory ?? true },
|
|
1023
1049
|
usageAccounting: {
|
|
1024
1050
|
...options.pricingFile ? { pricing: usagePricingSchema.parse(JSON.parse((await readRegularFileNoFollow(path2.resolve(options.pricingFile), { maxBytes: 128 * 1024, label: "Usage pricing" })).contents.toString("utf8"))) } : {},
|
|
1025
1051
|
...options.usageLimitUsd !== undefined ? { limitUsd: options.usageLimitUsd } : {}
|