@zhivex-ai/harness 1.4.0-rc.6 → 1.4.0-rc.8
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 +18 -0
- package/README.md +5 -4
- package/contracts/engine-api.json +55 -0
- package/contracts/stable-api-signatures.json +33 -33
- package/dist/acp-cli.js +16 -14
- package/dist/cli/arguments.d.ts +3 -0
- package/dist/cli/console/console-budget.d.ts +8 -2
- package/dist/{cli-s1rs15vv.js → cli-3bzvq594.js} +34 -15
- package/dist/{cli-entry-9c2k0zwz.js → cli-entry-25xefnws.js} +2902 -1482
- package/dist/{cli-entry-4k1cf0m3.js → cli-entry-qav71mxw.js} +8 -5
- package/dist/{cli-entry-d5788aay.js → cli-entry-yqwa1943.js} +38 -5
- package/dist/cli.js +2 -2
- package/dist/client/json-contracts.d.ts +95 -2
- package/dist/client/local-service.d.ts +2 -2
- package/dist/client/protocol.d.ts +3 -0
- package/dist/client/stream.d.ts +2 -1
- package/dist/compat/code-support.d.ts +6 -0
- package/dist/compat/code-support.js +27 -5
- package/dist/{config-j3jga5wh.js → config-depqpsae.js} +2 -1
- package/dist/{config-c002f06f.js → config-pwbnze4g.js} +1 -1
- package/dist/engine/acp.js +12 -11
- package/dist/engine/client.js +9 -9
- package/dist/engine/desktop-state-v1.js +7 -8
- package/dist/engine/index.js +46 -45
- package/dist/engine/mcp-stdio-v1.js +5 -5
- package/dist/engine/protocol.js +18 -2
- package/dist/engine/service.js +10 -10
- package/dist/hostile-repository-demo.js +4446 -3005
- package/dist/{index-gq9xagx2.js → index-09zphhwt.js} +24 -137
- package/dist/{index-49ys3s4q.js → index-1k248k0w.js} +35 -16
- package/dist/{index-z6br6qdn.js → index-7y6b4yjx.js} +28 -11
- package/dist/{index-dj5z774k.js → index-9v72fpya.js} +23 -10
- package/dist/index-fny13znr.js +3778 -0
- package/dist/index-jdb1q8yn.js +149 -0
- package/dist/{index-qfpz5y2v.js → index-ngg2168h.js} +8 -2
- package/dist/{index-4j1h4j8c.js → index-nqhnh1hz.js} +1598 -973
- package/dist/{index-wq2tax80.js → index-pcn2bk8j.js} +1 -1
- package/dist/index-sbzvrpm7.js +343 -0
- package/dist/index-txrqqd2r.js +705 -0
- package/dist/{index-2tgb2b4e.js → index-vga76vmb.js} +3 -5
- package/dist/{index-0g939pfs.js → index-w9pjt7td.js} +10 -7
- package/dist/{index-e6r04a18.js → index-zmx264xy.js} +1127 -170
- package/dist/index.js +42 -41
- package/dist/persistence/operations.d.ts +3 -0
- package/dist/runtime/config.d.ts +8 -0
- package/dist/runtime/context-runtime.d.ts +1 -0
- package/dist/runtime/errors.d.ts +10 -0
- package/dist/runtime/harness.d.ts +9 -0
- package/dist/runtime/policy-inspection.d.ts +1 -0
- package/dist/runtime/runtime-diagnostics.d.ts +3 -0
- package/dist/runtime/runtime-policy.d.ts +8 -10
- package/dist/runtime/task-acceptance-host.d.ts +1 -1
- package/dist/runtime/task-budget-host.d.ts +217 -0
- package/dist/runtime/task-budget.d.ts +147 -0
- package/dist/runtime/task-continuity.d.ts +434 -0
- package/dist/runtime/task-telemetry.d.ts +63 -0
- package/dist/runtime/task-transport.d.ts +3 -0
- package/dist/runtime/task-usage-context.d.ts +13 -0
- package/dist/runtime/usage-ledger.d.ts +17 -0
- package/dist/service-cli.js +10 -10
- package/dist/{service-client-cli-b52c67hx.js → service-client-cli-ra3yzvjg.js} +18 -7
- package/dist/verify-historical-migrations.js +2164 -695
- package/dist/zhx.js +2 -2
- package/docs/CLI.md +37 -7
- package/docs/CLIENT_PROTOCOL.md +9 -1
- package/docs/CODE_RELEASE.md +81 -1
- package/docs/DURABLE_OPERATIONS.md +1 -1
- package/docs/EXTENSIBILITY.md +1 -1
- package/docs/FIRST_USE.md +6 -6
- package/docs/MINIMUM_OFFLINE_EVALS.md +31 -0
- package/docs/MINIMUM_TASK_AUTHORITY.md +395 -0
- package/docs/PROJECT_MEMORY.md +1 -1
- package/docs/README.md +2 -0
- package/docs/STABILITY.md +1 -1
- package/docs/WEB_LIMITS.md +117 -0
- package/evaluations/representative-assembly-matrix.json +19 -1
- package/examples/README.md +3 -3
- package/package.json +8 -5
- package/dist/index-a1q355va.js +0 -600
- package/dist/index-r0tdj04h.js +0 -976
- package/dist/index-rd0s3gqj.js +0 -1669
- package/dist/index-vtqfjnab.js +0 -1626
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,24 @@ 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.8 - 2026-10-08
|
|
8
|
+
|
|
9
|
+
- Prepare matched Harness 1.4.0-rc.8 and Code 0.3.0-rc.8 for npm `next`, with the exact Code engine pin, private Desktop binding and an additive representative mapping using unchanged models. Retain the SDK pins already on main (Core 1.31.0, Agents 1.11.0 and the existing provider packages). Stable `latest` stays Harness 1.3.0 and Code 0.2.0.
|
|
10
|
+
- Refuse a second `delegate_*` call for a task that was already accepted in the same model response. The duplicate stays non-executable and the next turn tells the coordinator to use the completed result instead of retrying. A later model step can still recover from an invalid call that did not execute. Paused runs bound to the previous delegation fingerprint must be completed with the artifact that created them.
|
|
11
|
+
- Document that Qwen live certification accepts `DASHSCOPE_API_KEY` alone. `QWEN_API_KEY`, `QWEN_BASE_URL`, `QWEN_WORKSPACE_ID`, and `QWEN_REGION` remain optional overrides.
|
|
12
|
+
- Preserve annotated `v1.4.0-rc.7` at `1f986a0b044fa2827166fc934c712684971127b5`. It was tagged but not published because live certification failed on Qwen in the bounded reviewer orchestration gate. No Code RC.7 tag was created. Published npm `next` remains Harness 1.4.0-rc.6 and Code 0.3.0-rc.6. That evidence does not certify RC.8.
|
|
13
|
+
- Require fresh exact-source/artifact validation and separate explicit approval before any paid campaign, annotated tag or publication. Provider/API tiers remain unchanged.
|
|
14
|
+
|
|
15
|
+
## 1.4.0-rc.7 - 2026-10-08
|
|
16
|
+
|
|
17
|
+
- Prepare matched Harness 1.4.0-rc.7 and Code 0.3.0-rc.7 for npm `next`, with the exact Code engine pin, private Desktop binding and an additive representative mapping using unchanged models. Retain the SDK pins already on main (Core 1.31.0, Agents 1.11.0 and the existing provider packages). Stable `latest` stays Harness 1.3.0 and Code 0.2.0.
|
|
18
|
+
- Include reviewed main since published 1.4.0-rc.6: optional Web task/project limits and immediate composer consumption (PR189); sanitized Qwen SSE transport/parser diagnostics in CLI JSON/JSONL and failed client runs, including message-only installed SDK compatibility, while provider payloads, parser causes and arbitrary exception text stay excluded (PR188); experimental guided Code task budget authority across turns, correction and restart (PR187); private Desktop Electron 44.5.1 (PR180); persisted task cancellation that fences late admissions (PR190, HAR-HU-71); and host-only task continuity over existing SQLite task, contract, journal and budget records (PR191, HAR-HU-72).
|
|
19
|
+
- Keep one native SQLite writer and the SDK token coordinator. Reserve before primary and compaction dispatch, fence tools and checkpoints against the task lease, retain uncertain consumption and unknown exposure, and require explicit known-outcome continuation after cancellation. Preserve contract revisions, refuse stale approvals and missing or uncertain effect evidence, and revalidate receipts before Code keep. No automatic effect replay or new public web task projection.
|
|
20
|
+
- Show authoritative task limits, confirmed/reserved/unknown usage, fresh checks and human decisions in Code; retain drafts when admission fails before a run checkpoint. Ordinary non-task retry and no-cap chat stay unchanged, and unlimited hosts still require explicit task token limits. Index transport usage by scope/run without changing pruning, redaction or mandatory persistence errors. Preserve explicit monetary output caps above 2,048.
|
|
21
|
+
- Add numeric monotonic phase telemetry and a frozen synthetic offline evaluation scaffold. These fixtures validate runtime behavior, not real-task or model quality; real holdout selection, human review and any paid campaign remain pending. Logical JSON backups omit transport monetary tables and cannot restore task spending authority; incomplete restores fail closed.
|
|
22
|
+
- Preserve published Harness `v1.4.0-rc.6` and Code `code-v0.3.0-rc.6` at `0adf4e2e96380864ef4c697ea94df64ad7c18eec`, the held RC.5 campaign, and the RC.4 failure history and SDK store migration requirements. Their evidence does not certify RC.7.
|
|
23
|
+
- Require fresh exact-source/artifact validation and separate explicit approval before any paid campaign, annotated tag or publication. Provider/API tiers remain unchanged.
|
|
24
|
+
|
|
7
25
|
## 1.4.0-rc.6 - 2026-10-05
|
|
8
26
|
|
|
9
27
|
- 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.
|
package/README.md
CHANGED
|
@@ -18,8 +18,9 @@ the reusable engine and its compatibility CLI. The `/task` delivery workflow in
|
|
|
18
18
|
this checkout is an unreleased experimental Code addition, not a published feature.
|
|
19
19
|
|
|
20
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.
|
|
22
|
-
Code `0.3.0-rc.
|
|
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.6` and
|
|
22
|
+
Code `0.3.0-rc.6` are published on `next`. Annotated `v1.4.0-rc.7` was tagged but
|
|
23
|
+
not published after live certification failed. The RC.8 versions prepared in this
|
|
23
24
|
checkout remain unpublished. Stable package numbering does
|
|
24
25
|
not change API stability tiers: beta and experimental APIs retain their policies,
|
|
25
26
|
Gemini/Anthropic/Vertex remain provisional, and Desktop remains a private alpha.
|
|
@@ -49,7 +50,7 @@ them. Ctrl+C stops active work; it does not undo completed changes.
|
|
|
49
50
|
|
|
50
51
|
## Release candidates
|
|
51
52
|
|
|
52
|
-
This checkout prepares Harness `1.4.0-rc.
|
|
53
|
+
This checkout prepares Harness `1.4.0-rc.8` and Code `0.3.0-rc.8` 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.8 publication is pending. It includes the reviewed duplicate-delegation fix on main after RC.7. Published npm `next` is Harness `1.4.0-rc.6` and Code `0.3.0-rc.6`. Annotated `v1.4.0-rc.7` was tagged but not published after Qwen live certification failed; that source and tag cannot certify RC.8. The held RC.5 campaign and failed RC.4 attempt remain preserved. These prerelease candidates are separate from the stable `latest` channel.
|
|
53
54
|
|
|
54
55
|
Use candidates only for prerelease validation. Check [npm versions](https://www.npmjs.com/package/@zhivex-ai/harness?activeTab=versions)
|
|
55
56
|
and the [release procedure](https://github.com/Zhivex/zhivex-harness/blob/main/docs/RELEASE.md)
|
|
@@ -58,7 +59,7 @@ before installing a candidate; `next` can still point to an earlier RC.
|
|
|
58
59
|
After publication of this exact candidate:
|
|
59
60
|
|
|
60
61
|
```sh
|
|
61
|
-
npm install -g @zhivex-ai/harness@1.4.0-rc.
|
|
62
|
+
npm install -g @zhivex-ai/harness@1.4.0-rc.8
|
|
62
63
|
```
|
|
63
64
|
|
|
64
65
|
## A few commands are enough
|
|
@@ -2735,6 +2735,61 @@
|
|
|
2735
2735
|
"name": "checkEvidence",
|
|
2736
2736
|
"kind": "runtime",
|
|
2737
2737
|
"tier": "experimental"
|
|
2738
|
+
},
|
|
2739
|
+
{
|
|
2740
|
+
"name": "initializeHarnessTaskBudget",
|
|
2741
|
+
"kind": "runtime",
|
|
2742
|
+
"tier": "experimental"
|
|
2743
|
+
},
|
|
2744
|
+
{
|
|
2745
|
+
"name": "inspectHarnessTaskBudget",
|
|
2746
|
+
"kind": "runtime",
|
|
2747
|
+
"tier": "experimental"
|
|
2748
|
+
},
|
|
2749
|
+
{
|
|
2750
|
+
"name": "requestHarnessTaskCancellation",
|
|
2751
|
+
"kind": "runtime",
|
|
2752
|
+
"tier": "experimental"
|
|
2753
|
+
},
|
|
2754
|
+
{
|
|
2755
|
+
"name": "persistHarnessTaskDraft",
|
|
2756
|
+
"kind": "runtime",
|
|
2757
|
+
"tier": "experimental"
|
|
2758
|
+
},
|
|
2759
|
+
{
|
|
2760
|
+
"name": "readHarnessTaskDraft",
|
|
2761
|
+
"kind": "runtime",
|
|
2762
|
+
"tier": "experimental"
|
|
2763
|
+
},
|
|
2764
|
+
{
|
|
2765
|
+
"name": "TASK_BUDGET_KEY",
|
|
2766
|
+
"kind": "runtime",
|
|
2767
|
+
"tier": "experimental"
|
|
2768
|
+
},
|
|
2769
|
+
{
|
|
2770
|
+
"name": "inspectTaskBudgetSummary",
|
|
2771
|
+
"kind": "runtime",
|
|
2772
|
+
"tier": "experimental"
|
|
2773
|
+
},
|
|
2774
|
+
{
|
|
2775
|
+
"name": "inspectHarnessTaskContinuity",
|
|
2776
|
+
"kind": "runtime",
|
|
2777
|
+
"tier": "experimental"
|
|
2778
|
+
},
|
|
2779
|
+
{
|
|
2780
|
+
"name": "createTaskTelemetry",
|
|
2781
|
+
"kind": "runtime",
|
|
2782
|
+
"tier": "experimental"
|
|
2783
|
+
},
|
|
2784
|
+
{
|
|
2785
|
+
"name": "runHarnessTask",
|
|
2786
|
+
"kind": "runtime",
|
|
2787
|
+
"tier": "experimental"
|
|
2788
|
+
},
|
|
2789
|
+
{
|
|
2790
|
+
"name": "HarnessTaskRunOptions",
|
|
2791
|
+
"kind": "type",
|
|
2792
|
+
"tier": "experimental"
|
|
2738
2793
|
}
|
|
2739
2794
|
]
|
|
2740
2795
|
},
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
"name": "cancelHarnessRun",
|
|
136
|
-
"sha256": "sha256:
|
|
136
|
+
"sha256": "sha256:209632058366e3993cc22c7bdadde31dd00a3f533dcfb4d61c8f5124de9c3aed"
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
"name": "canonicalizeChangeEnvelope",
|
|
@@ -141,15 +141,15 @@
|
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
"name": "cleanupHarnessRuns",
|
|
144
|
-
"sha256": "sha256:
|
|
144
|
+
"sha256": "sha256:0d91a941627459e31098d8f7b0f5abbde1ec518705c61e8eb4cd54ac1a2da4f8"
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
"name": "cliJsonDocumentSchema",
|
|
148
|
-
"sha256": "sha256:
|
|
148
|
+
"sha256": "sha256:7e7a254c88c40eb537981b8e28cc9abeb1196e75d8ee025c12551cb8cfeab580"
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
"name": "cliJsonLineDocumentSchema",
|
|
152
|
-
"sha256": "sha256:
|
|
152
|
+
"sha256": "sha256:94a0815632f10a637cc889ed54ffb406b9253aab373fff3bb045be68aa071d91"
|
|
153
153
|
},
|
|
154
154
|
{
|
|
155
155
|
"name": "computeChangeEnvelopeDigest",
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
"name": "createHarness",
|
|
168
|
-
"sha256": "sha256:
|
|
168
|
+
"sha256": "sha256:8b682f88b2c92a5581a68f92dbd886b5dc6c8b49b04ca8e1214bed164708b9ea"
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
"name": "createHarnessMcpTools",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
179
|
"name": "createHarnessStateBackup",
|
|
180
|
-
"sha256": "sha256:
|
|
180
|
+
"sha256": "sha256:f1fa095f7b2db71d64f07ff23d8823fc1ba57729d3cfdb1188969c5ab2172332"
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
183
|
"name": "createHttpMcpClient",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
187
|
"name": "createProviderModel",
|
|
188
|
-
"sha256": "sha256:
|
|
188
|
+
"sha256": "sha256:482f0414ff0315198c7b1deaabf024ffdbb64b6c06e5e7d7832652931ec540bb"
|
|
189
189
|
},
|
|
190
190
|
{
|
|
191
191
|
"name": "digestChangeEnvelopeArtifact",
|
|
@@ -193,31 +193,31 @@
|
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
"name": "exportHarnessStateBackup",
|
|
196
|
-
"sha256": "sha256:
|
|
196
|
+
"sha256": "sha256:f6a581444669735dcc3998ec24b4e6f9f389d18f4680e9c956f6287738076a12"
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
"name": "harnessErrorDocument",
|
|
200
|
-
"sha256": "sha256:
|
|
200
|
+
"sha256": "sha256:5340a9d49948981bbaa3223ec63249351dbc6271b4caf717e34b0fcc05c8f1fd"
|
|
201
201
|
},
|
|
202
202
|
{
|
|
203
203
|
"name": "importHarnessStateBackup",
|
|
204
|
-
"sha256": "sha256:
|
|
204
|
+
"sha256": "sha256:1929d2a2ba7de06801dc7b6b961b74e92e7fb871ac4f01e0ba9d79d9dfb97d0f"
|
|
205
205
|
},
|
|
206
206
|
{
|
|
207
207
|
"name": "importHarnessStateBackupFile",
|
|
208
|
-
"sha256": "sha256:
|
|
208
|
+
"sha256": "sha256:07b707e8e8495a87972a075894c4ecf59161be6ac2cdce8f9a66bf71d1b51d40"
|
|
209
209
|
},
|
|
210
210
|
{
|
|
211
211
|
"name": "inspectHarnessRun",
|
|
212
|
-
"sha256": "sha256:
|
|
212
|
+
"sha256": "sha256:68e13aabfcd8974e92cebb7b06afdb5643c76d86b3473c2afeb127245329d4e5"
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
215
|
"name": "inspectHarnessState",
|
|
216
|
-
"sha256": "sha256:
|
|
216
|
+
"sha256": "sha256:529d9bf8c0528942793786c345030a98e88d219c34f41ea2c3e31724cca66837"
|
|
217
217
|
},
|
|
218
218
|
{
|
|
219
219
|
"name": "listHarnessRuns",
|
|
220
|
-
"sha256": "sha256:
|
|
220
|
+
"sha256": "sha256:2085baf7b5c69e79939dd8d13d6dbccb8166d163659823d93bd2eb10d6080acc"
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
223
|
"name": "loadHarnessMcpConfiguration",
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
},
|
|
226
226
|
{
|
|
227
227
|
"name": "migrateHarnessConfigInput",
|
|
228
|
-
"sha256": "sha256:
|
|
228
|
+
"sha256": "sha256:719fcc2bef2415d972f7f04f3970b9120e285a4b9abd5df0fd01727e05befa2f"
|
|
229
229
|
},
|
|
230
230
|
{
|
|
231
231
|
"name": "normalizeHarnessError",
|
|
@@ -241,15 +241,15 @@
|
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
243
|
"name": "openHarnessPersistence",
|
|
244
|
-
"sha256": "sha256:
|
|
244
|
+
"sha256": "sha256:91a4d79eb2c7a4e82cb1aa6ad199492538bd2d9599bd320eb603765fb6fca934"
|
|
245
245
|
},
|
|
246
246
|
{
|
|
247
247
|
"name": "parseCliJsonDocument",
|
|
248
|
-
"sha256": "sha256:
|
|
248
|
+
"sha256": "sha256:8d94b80ef3160b12119ce8b083937ef6beed2a1b068f46f94b5077e36d54a931"
|
|
249
249
|
},
|
|
250
250
|
{
|
|
251
251
|
"name": "parseCliJsonLineDocument",
|
|
252
|
-
"sha256": "sha256:
|
|
252
|
+
"sha256": "sha256:3f0c38ada9d89150fe2cedbb50380f8e170ad22dfb2d7a17690efc057be9bc3b"
|
|
253
253
|
},
|
|
254
254
|
{
|
|
255
255
|
"name": "parseHarnessModelRoute",
|
|
@@ -269,11 +269,11 @@
|
|
|
269
269
|
},
|
|
270
270
|
{
|
|
271
271
|
"name": "resolveHarnessConfig",
|
|
272
|
-
"sha256": "sha256:
|
|
272
|
+
"sha256": "sha256:92dd51056d4745eea346f9163f29b9748ac6e1b9f9d0e28a3191111093703804"
|
|
273
273
|
},
|
|
274
274
|
{
|
|
275
275
|
"name": "runHarness",
|
|
276
|
-
"sha256": "sha256:
|
|
276
|
+
"sha256": "sha256:aeed30705c782cb7af884a8d51abf9d47bf4a9b7010650c842209c5f608b6019"
|
|
277
277
|
},
|
|
278
278
|
{
|
|
279
279
|
"name": "serializeStreamEvent",
|
|
@@ -319,11 +319,11 @@
|
|
|
319
319
|
},
|
|
320
320
|
{
|
|
321
321
|
"name": "CliJsonDocument",
|
|
322
|
-
"sha256": "sha256:
|
|
322
|
+
"sha256": "sha256:613a0da81316ffd657d18427c28804a8f7dc51017aec2e6893d7b2d64a5ff96e"
|
|
323
323
|
},
|
|
324
324
|
{
|
|
325
325
|
"name": "CliJsonLineDocument",
|
|
326
|
-
"sha256": "sha256:
|
|
326
|
+
"sha256": "sha256:5dd40d8c335fd1e6e3414825e70fd4dd70117286e1bc0f5e96c53c45b6b6c91a"
|
|
327
327
|
},
|
|
328
328
|
{
|
|
329
329
|
"name": "CliOptionDefinition",
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
},
|
|
340
340
|
{
|
|
341
341
|
"name": "CliRunEventDocument",
|
|
342
|
-
"sha256": "sha256:
|
|
342
|
+
"sha256": "sha256:9ad681aea1b90debc0682dea6487f4098c50e5cd548e4694ae07db94b80279f0"
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
345
|
"name": "CliRunInspectionDocument",
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
},
|
|
352
352
|
{
|
|
353
353
|
"name": "CliRunResultDocument",
|
|
354
|
-
"sha256": "sha256:
|
|
354
|
+
"sha256": "sha256:1c14e0466d7e387aa80294d1271d9b2ff37fa4cbe41d9e1d7a1ad5faabe23318"
|
|
355
355
|
},
|
|
356
356
|
{
|
|
357
357
|
"name": "CliSession",
|
|
@@ -367,7 +367,7 @@
|
|
|
367
367
|
},
|
|
368
368
|
{
|
|
369
369
|
"name": "CliStreamErrorDocument",
|
|
370
|
-
"sha256": "sha256:
|
|
370
|
+
"sha256": "sha256:b9f92e4dc53013ec79690838dab8f5db19bdbba10a918549a914ddf41eb423b7"
|
|
371
371
|
},
|
|
372
372
|
{
|
|
373
373
|
"name": "CliStreamResultDocument",
|
|
@@ -375,23 +375,23 @@
|
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
377
|
"name": "CreateHarnessOptions",
|
|
378
|
-
"sha256": "sha256:
|
|
378
|
+
"sha256": "sha256:bf02d5a2b5cc10dfbc59a2dcceebe91d2a56add94f9912e8d73c61da4bb64a12"
|
|
379
379
|
},
|
|
380
380
|
{
|
|
381
381
|
"name": "HarnessBudget",
|
|
382
|
-
"sha256": "sha256:
|
|
382
|
+
"sha256": "sha256:d5ab8916582847c82fb2c86eface15f44af12a710926aa5eca2c59eac97638c0"
|
|
383
383
|
},
|
|
384
384
|
{
|
|
385
385
|
"name": "HarnessConfig",
|
|
386
|
-
"sha256": "sha256:
|
|
386
|
+
"sha256": "sha256:afd78cedcbe664b7decf1d11dd70a5bb7ad997ea090c9afaa894398f408cbd3d"
|
|
387
387
|
},
|
|
388
388
|
{
|
|
389
389
|
"name": "HarnessConfigInput",
|
|
390
|
-
"sha256": "sha256:
|
|
390
|
+
"sha256": "sha256:4679312a8a410043ee77890447460ac294b87dade7e2eb04e809295e3093b8c1"
|
|
391
391
|
},
|
|
392
392
|
{
|
|
393
393
|
"name": "HarnessConfigMigrationResult",
|
|
394
|
-
"sha256": "sha256:
|
|
394
|
+
"sha256": "sha256:4d9e7b61dd92f95be292571da2251ce8927c08fe488d7742d8c71cbc87e2eedb"
|
|
395
395
|
},
|
|
396
396
|
{
|
|
397
397
|
"name": "HarnessContextBundle",
|
|
@@ -415,7 +415,7 @@
|
|
|
415
415
|
},
|
|
416
416
|
{
|
|
417
417
|
"name": "HarnessErrorDocument",
|
|
418
|
-
"sha256": "sha256:
|
|
418
|
+
"sha256": "sha256:1bd889952a59431c2439a14e23b7dc1fd03ce63a4da4cdfa208da25d6f4c1c77"
|
|
419
419
|
},
|
|
420
420
|
{
|
|
421
421
|
"name": "HarnessExecutionBackend",
|
|
@@ -487,8 +487,8 @@
|
|
|
487
487
|
},
|
|
488
488
|
{
|
|
489
489
|
"name": "ZhivexHarness",
|
|
490
|
-
"sha256": "sha256:
|
|
490
|
+
"sha256": "sha256:4275565d750dbfd7d6dcaa7182f05d74136db32b057744446de24d6b69fe2061"
|
|
491
491
|
}
|
|
492
492
|
],
|
|
493
|
-
"digest": "sha256:
|
|
493
|
+
"digest": "sha256:e2ef392ba67e8a07f5d511c0274f8b4171888a1469205f541350fafb0b74f8cb"
|
|
494
494
|
}
|
package/dist/acp-cli.js
CHANGED
|
@@ -5,42 +5,44 @@ import {
|
|
|
5
5
|
parseHarnessModelRoute,
|
|
6
6
|
resolveHarnessModelRoutes,
|
|
7
7
|
validateCliCommandOptions
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-pcn2bk8j.js";
|
|
9
9
|
import {
|
|
10
10
|
serveAcpStdio
|
|
11
11
|
} from "./index-3ah1f369.js";
|
|
12
12
|
import {
|
|
13
|
-
createHarness,
|
|
14
13
|
createHarnessClientAdapter
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import
|
|
14
|
+
} from "./index-txrqqd2r.js";
|
|
15
|
+
import"./index-sbzvrpm7.js";
|
|
16
|
+
import {
|
|
17
|
+
createHarness
|
|
18
|
+
} from "./index-nqhnh1hz.js";
|
|
18
19
|
import {
|
|
19
20
|
usagePricingSchema
|
|
20
|
-
} from "./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-e6r04a18.js";
|
|
21
|
+
} from "./index-fny13znr.js";
|
|
22
|
+
import"./index-w9pjt7td.js";
|
|
23
23
|
import {
|
|
24
24
|
FileChangedWhileReadingError,
|
|
25
25
|
FileSizeLimitError,
|
|
26
26
|
UnsafeFileTypeError,
|
|
27
27
|
readRegularFileNoFollow
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-zmx264xy.js";
|
|
29
29
|
import {
|
|
30
30
|
HARNESS_REQUIRED_CAPABILITIES,
|
|
31
31
|
HARNESS_SUBAGENT_PROFILES,
|
|
32
|
-
HarnessConfigError,
|
|
33
|
-
HarnessError,
|
|
34
32
|
PROVIDERS,
|
|
35
33
|
createProviderModel,
|
|
36
34
|
parseProvider,
|
|
37
35
|
providerDescriptor,
|
|
38
36
|
reasoningEffortSchema,
|
|
39
37
|
resolveHarnessConfig
|
|
40
|
-
} from "./index-
|
|
38
|
+
} from "./index-09zphhwt.js";
|
|
41
39
|
import"./index-8705zxpr.js";
|
|
42
40
|
import"./index-xqxeypt5.js";
|
|
43
|
-
import"./index-
|
|
41
|
+
import"./index-ngg2168h.js";
|
|
42
|
+
import {
|
|
43
|
+
HarnessConfigError,
|
|
44
|
+
HarnessError
|
|
45
|
+
} from "./index-jdb1q8yn.js";
|
|
44
46
|
import {
|
|
45
47
|
__require
|
|
46
48
|
} from "./index-1bx83sw4.js";
|
|
@@ -924,7 +926,7 @@ var parseCliArgs = (argv) => {
|
|
|
924
926
|
|
|
925
927
|
// src/cli/cli-credentials.ts
|
|
926
928
|
async function credentialModel(config, env, modelFactory) {
|
|
927
|
-
const { createProviderModel: createProviderModel2 } = await import("./config-
|
|
929
|
+
const { createProviderModel: createProviderModel2 } = await import("./config-depqpsae.js");
|
|
928
930
|
const { wrapLanguageModel } = await import("@zhivex-ai/core");
|
|
929
931
|
const secrets = providerDescriptor(config.provider).credentialNames.map((name) => env[name]).filter((value) => !!value);
|
|
930
932
|
const safeError = (error) => {
|
package/dist/cli/arguments.d.ts
CHANGED
|
@@ -34,6 +34,9 @@ export interface CliOptions {
|
|
|
34
34
|
maxToolCalls?: number;
|
|
35
35
|
maxToolErrors?: number;
|
|
36
36
|
unlimitedTokens?: boolean;
|
|
37
|
+
unlimitedSteps?: boolean;
|
|
38
|
+
unlimitedToolCalls?: boolean;
|
|
39
|
+
unlimitedDuration?: boolean;
|
|
37
40
|
compactionMaxEstimatedInputTokens?: number;
|
|
38
41
|
maxInputTokens?: number;
|
|
39
42
|
maxOutputTokens?: number;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import type { CliOptions } from "../arguments.js";
|
|
2
|
-
import { type HarnessConfig } from "../../runtime/config.js";
|
|
2
|
+
import { type HarnessConfig, type HarnessConfigInput } from "../../runtime/config.js";
|
|
3
3
|
import type { TokenUsage } from "@zhivex-ai/core";
|
|
4
4
|
/** Only new local console sessions change defaults. Explicit limits always opt
|
|
5
5
|
* into bounded execution; SDK, service hosts and automation retain their policy. */
|
|
6
|
-
export declare const consoleBudgetOptions: (options:
|
|
6
|
+
export declare const consoleBudgetOptions: <T extends HarnessConfigInput>(options: T, env?: NodeJS.ProcessEnv) => T & {
|
|
7
|
+
maxToolErrors?: number;
|
|
8
|
+
unlimitedSteps: boolean;
|
|
9
|
+
unlimitedToolCalls: boolean;
|
|
10
|
+
unlimitedDuration: boolean;
|
|
11
|
+
unlimitedTokens: boolean;
|
|
12
|
+
};
|
|
7
13
|
/** A saved run owns its budget, including legacy runs without a mode flag. */
|
|
8
14
|
export declare const restoreConsoleOptions: (current: CliOptions, saved: Partial<CliOptions>) => CliOptions;
|
|
9
15
|
export declare const formatConsoleBudget: (config: HarnessConfig, usage?: TokenUsage) => string;
|
|
@@ -35,6 +35,7 @@ import {
|
|
|
35
35
|
approvalDecisionViews,
|
|
36
36
|
approvalResponses,
|
|
37
37
|
assertRoutePricingIsSafe,
|
|
38
|
+
assertTaskBudgetBackupLinks,
|
|
38
39
|
cancelHarnessRun,
|
|
39
40
|
canonicalizeChangeEnvelope,
|
|
40
41
|
changeEnvelopePreconditionsSchema,
|
|
@@ -123,16 +124,15 @@ import {
|
|
|
123
124
|
withTemporaryHarnessProfiles,
|
|
124
125
|
workspaceCheckpointSchema,
|
|
125
126
|
workspaceRestoreOperationSchema
|
|
126
|
-
} from "./cli-entry-
|
|
127
|
+
} from "./cli-entry-25xefnws.js";
|
|
127
128
|
import {
|
|
128
129
|
BUN_ENGINE_RANGE,
|
|
129
130
|
HARNESS_VERSION,
|
|
130
131
|
NODE_ENGINE_RANGE,
|
|
131
132
|
formatCliHelp,
|
|
132
133
|
shortCliHelp
|
|
133
|
-
} from "./cli-entry-
|
|
134
|
+
} from "./cli-entry-qav71mxw.js";
|
|
134
135
|
import {
|
|
135
|
-
DEFAULT_HARNESS_MAX_STEPS,
|
|
136
136
|
DEFAULT_PROVIDER_REGISTRY,
|
|
137
137
|
HARNESS_SUBAGENT_PROFILES,
|
|
138
138
|
HarnessConfigError,
|
|
@@ -147,7 +147,7 @@ import {
|
|
|
147
147
|
providerDescriptor,
|
|
148
148
|
reasoningEffortSchema,
|
|
149
149
|
resolveHarnessConfig
|
|
150
|
-
} from "./cli-entry-
|
|
150
|
+
} from "./cli-entry-yqwa1943.js";
|
|
151
151
|
import {
|
|
152
152
|
__require
|
|
153
153
|
} from "./cli-entry-1bx83sw4.js";
|
|
@@ -953,21 +953,24 @@ var tokenEnvironment = [
|
|
|
953
953
|
];
|
|
954
954
|
var consoleBudgetOptions = (options, env = process.env) => ({
|
|
955
955
|
...options,
|
|
956
|
-
...options.maxSteps === undefined && env.ZHIVEX_HARNESS_MAX_STEPS === undefined ? { maxSteps: DEFAULT_HARNESS_MAX_STEPS } : {},
|
|
957
|
-
...options.maxToolCalls === undefined && env.ZHIVEX_HARNESS_MAX_TOOL_CALLS === undefined ? { maxToolCalls: 200 } : {},
|
|
958
956
|
...options.maxToolErrors === undefined && env.ZHIVEX_HARNESS_MAX_TOOL_ERRORS === undefined ? { maxToolErrors: 20 } : {},
|
|
959
|
-
|
|
957
|
+
unlimitedSteps: options.unlimitedSteps ?? (options.maxSteps === undefined && env.ZHIVEX_HARNESS_MAX_STEPS === undefined),
|
|
958
|
+
unlimitedToolCalls: options.unlimitedToolCalls ?? (options.maxToolCalls === undefined && env.ZHIVEX_HARNESS_MAX_TOOL_CALLS === undefined),
|
|
959
|
+
unlimitedDuration: options.unlimitedDuration ?? (options.timeoutMs === undefined && env.ZHIVEX_HARNESS_TIMEOUT_MS === undefined),
|
|
960
960
|
unlimitedTokens: options.unlimitedTokens ?? !(tokenOptions.some((key) => options[key] !== undefined) || tokenEnvironment.some((key) => env[key] !== undefined))
|
|
961
961
|
});
|
|
962
962
|
var restoreConsoleOptions = (current, saved) => ({
|
|
963
963
|
...current,
|
|
964
964
|
...saved,
|
|
965
965
|
reasoningEffort: saved.reasoningEffort ?? "default",
|
|
966
|
-
unlimitedTokens: saved.unlimitedTokens ?? false
|
|
966
|
+
unlimitedTokens: saved.unlimitedTokens ?? false,
|
|
967
|
+
unlimitedSteps: saved.unlimitedSteps ?? false,
|
|
968
|
+
unlimitedToolCalls: saved.unlimitedToolCalls ?? false,
|
|
969
|
+
unlimitedDuration: saved.unlimitedDuration ?? false
|
|
967
970
|
});
|
|
968
971
|
var formatConsoleBudget = (config, usage) => {
|
|
969
|
-
const lines = [`Step limit: ${config.maxSteps} model iterations per turn.`, config.budget.unlimitedTokens ? "Cumulative token budget: unlimited
|
|
970
|
-
lines.push(`Tool limits: ${config.budget.maxToolCalls} calls / ${config.budget.maxToolErrors} errors; time: ${Math.round(config.timeoutMs / 60000)} minutes per run.`);
|
|
972
|
+
const lines = [`Step limit: ${config.budget.unlimitedSteps ? "none" : config.maxSteps} model iterations per turn.`, config.budget.unlimitedTokens ? "Cumulative token budget: unlimited; operation, model, state and safety controls still apply." : `Cumulative token limits per run: input ${config.budget.maxInputTokens}; output ${config.budget.maxOutputTokens}; total ${config.budget.maxTotalTokens}.`];
|
|
973
|
+
lines.push(`Tool limits: ${config.budget.unlimitedToolCalls ? "no cumulative cap on" : config.budget.maxToolCalls} calls / ${config.budget.maxToolErrors} errors; time: ${config.unlimitedDuration ? "no cumulative deadline" : `${Math.round(config.timeoutMs / 60000)} minutes per run`}.`);
|
|
971
974
|
if (!usage)
|
|
972
975
|
return [...lines, "Latest run usage: unavailable."].join(`
|
|
973
976
|
`);
|
|
@@ -1732,7 +1735,7 @@ ${summarizeApproval(approval)}
|
|
|
1732
1735
|
continue;
|
|
1733
1736
|
if (command === "/limits" || command.startsWith("/limits ")) {
|
|
1734
1737
|
const requested = command.slice("/limits".length).trim();
|
|
1735
|
-
process.stderr.write(`Step limit: ${harness.config.maxSteps} model iterations per turn.
|
|
1738
|
+
process.stderr.write(`Step limit: ${harness.config.budget.unlimitedSteps ? "none" : harness.config.maxSteps} model iterations per turn.
|
|
1736
1739
|
`);
|
|
1737
1740
|
if (await hasActiveTurn()) {
|
|
1738
1741
|
process.stderr.write(`Finish or deny pending work before changing limits.
|
|
@@ -1752,7 +1755,7 @@ ${summarizeApproval(approval)}
|
|
|
1752
1755
|
`);
|
|
1753
1756
|
continue;
|
|
1754
1757
|
}
|
|
1755
|
-
await replaceHarness({ ...runtimeOptions, maxSteps: Number(next) }, routes);
|
|
1758
|
+
await replaceHarness({ ...runtimeOptions, maxSteps: Number(next), unlimitedSteps: false }, routes);
|
|
1756
1759
|
process.stderr.write(`Step limit updated: ${harness.config.maxSteps} for next turns.
|
|
1757
1760
|
`);
|
|
1758
1761
|
continue;
|
|
@@ -3718,6 +3721,7 @@ var readPayload = async (config, recordedWorkspace, accessLease) => {
|
|
|
3718
3721
|
assertTerminalState(state, `Run ${row.run_id}`);
|
|
3719
3722
|
return { key: row.run_id, state, updatedAt: row.updated_at_ms };
|
|
3720
3723
|
});
|
|
3724
|
+
assertTaskBudgetBackupLinks(runs.map((run) => run.state));
|
|
3721
3725
|
const identities = coordinatorIds(runs);
|
|
3722
3726
|
const budgetLedgers = allRunRows.flatMap((row) => {
|
|
3723
3727
|
const state = parseJsonRecord(row.state_json, `Run ${row.run_id}`);
|
|
@@ -3975,6 +3979,7 @@ var validateBundleBinding = async (config, bundle) => {
|
|
|
3975
3979
|
throw new HarnessStateConflictError(`Run ${run.key} does not match its bound scope and runId.`);
|
|
3976
3980
|
}
|
|
3977
3981
|
}
|
|
3982
|
+
assertTaskBudgetBackupLinks(bundle.records.runs.map((run) => validatedRunState(run.state, `Run ${run.key}`)));
|
|
3978
3983
|
const identities = coordinatorIds(bundle.records.runs);
|
|
3979
3984
|
const ledgerIdentities = new Set;
|
|
3980
3985
|
const ledgerKeys = new Set;
|
|
@@ -4177,8 +4182,22 @@ var importHarnessStateBackup = async (config, bundle, options = {}) => {
|
|
|
4177
4182
|
if (destinationHasState && Object.keys(expectedKeys).some((name) => !setEquals(destinationKeys[name], expectedKeys[name]))) {
|
|
4178
4183
|
throw new HarnessStateConflictError("State import requires an empty destination or an exactly identical prior import.");
|
|
4179
4184
|
}
|
|
4180
|
-
for (const run of [...bundle.records.runs, ...bundle.records.budgetLedgers ?? []])
|
|
4181
|
-
|
|
4185
|
+
for (const run of [...bundle.records.runs, ...bundle.records.budgetLedgers ?? []]) {
|
|
4186
|
+
const metadata = run.state.metadata;
|
|
4187
|
+
const draftOwner = metadata?.zhivexTaskDraftV1 !== undefined ? metadata.taskDraftOwnerId : undefined;
|
|
4188
|
+
if (metadata?.zhivexTaskDraftV1 !== undefined && (typeof draftOwner !== "string" || !draftOwner))
|
|
4189
|
+
throw new HarnessStateConflictError("TASK_DRAFT_IMPORT_OWNER_REQUIRED");
|
|
4190
|
+
const importingDraft = !options.dryRun && typeof draftOwner === "string" && !database.query("SELECT run_id FROM zhivex_agent_runs WHERE run_id = ?").get(run.key);
|
|
4191
|
+
if (importingDraft)
|
|
4192
|
+
database.query(`INSERT INTO zhivex_agent_runs_leases (run_key, run_id, owner_id, expires_at_ms)
|
|
4193
|
+
VALUES (?, ?, ?, ?) ON CONFLICT(run_key) DO UPDATE SET owner_id=excluded.owner_id, expires_at_ms=excluded.expires_at_ms`).run(run.key, run.state.runId, draftOwner, Date.now() + 30000);
|
|
4194
|
+
try {
|
|
4195
|
+
insertOrCompare("zhivex_agent_runs", "run_id = ?", [run.key], "state_json, updated_at_ms", [JSON.stringify(run.state), run.updatedAt], "INSERT INTO zhivex_agent_runs (run_id, state_json, updated_at_ms) VALUES (?, ?, ?)", [run.key, JSON.stringify(run.state), run.updatedAt]);
|
|
4196
|
+
} finally {
|
|
4197
|
+
if (importingDraft)
|
|
4198
|
+
database.query("DELETE FROM zhivex_agent_runs_leases WHERE run_key = ? AND owner_id = ?").run(run.key, draftOwner);
|
|
4199
|
+
}
|
|
4200
|
+
}
|
|
4182
4201
|
for (const entry of bundle.records.idempotency)
|
|
4183
4202
|
insertOrCompare("zhivex_agent_runs_idempotency", "idempotency_key = ?", [entry.key], "run_id, updated_at_ms", [entry.runKey, entry.updatedAt], "INSERT INTO zhivex_agent_runs_idempotency (idempotency_key, run_id, updated_at_ms) VALUES (?, ?, ?)", [entry.key, entry.runKey, entry.updatedAt]);
|
|
4184
4203
|
for (const entry of bundle.records.parents)
|
|
@@ -4469,7 +4488,7 @@ var main = async (argv = process.argv.slice(2)) => {
|
|
|
4469
4488
|
parsedOptions = { ...parsedOptions, prompt: await readStdinTask() };
|
|
4470
4489
|
}
|
|
4471
4490
|
if (parsedOptions.serviceFile) {
|
|
4472
|
-
const { runServiceCli } = await import("./service-client-cli-
|
|
4491
|
+
const { runServiceCli } = await import("./service-client-cli-ra3yzvjg.js");
|
|
4473
4492
|
await runServiceCli(parsedOptions, annotateCliStreamError);
|
|
4474
4493
|
return;
|
|
4475
4494
|
}
|