@zhivex-ai/harness 1.4.0-rc.6 → 1.4.0
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 +31 -0
- package/README.md +124 -71
- package/SECURITY.md +1 -1
- package/SUPPORT.md +2 -2
- package/contracts/engine-api.json +55 -0
- package/contracts/stable-api-signatures.json +33 -33
- package/dist/acp-cli.js +18 -15
- package/dist/cli/arguments.d.ts +3 -0
- package/dist/cli/console/console-budget.d.ts +8 -2
- package/dist/{cli-s1rs15vv.js → cli-2h37qyvg.js} +34 -15
- package/dist/{cli-entry-d5788aay.js → cli-entry-20w6nh0k.js} +359 -21
- package/dist/{cli-entry-9c2k0zwz.js → cli-entry-4ngptr62.js} +2902 -1482
- package/dist/{cli-entry-4k1cf0m3.js → cli-entry-w0hterjs.js} +8 -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 +29 -6
- package/dist/{config-c002f06f.js → config-j9624t6t.js} +1 -1
- package/dist/{config-j3jga5wh.js → config-qt69hkqj.js} +4 -2
- package/dist/engine/acp.js +14 -12
- package/dist/engine/client.js +11 -10
- package/dist/engine/desktop-providers-v1.js +2 -1
- package/dist/engine/desktop-state-v1.js +9 -9
- package/dist/engine/index.js +48 -46
- package/dist/engine/mcp-stdio-v1.js +7 -6
- package/dist/engine/protocol.js +30 -2
- package/dist/engine/service.js +12 -11
- package/dist/hostile-repository-demo.js +4773 -3027
- package/dist/{index-49ys3s4q.js → index-5jhgatga.js} +35 -16
- package/dist/{index-wq2tax80.js → index-61gthdz6.js} +1 -1
- package/dist/index-6dft2vev.js +343 -0
- package/dist/{index-gq9xagx2.js → index-8zjmnyw5.js} +25 -138
- package/dist/index-937cb7y8.js +705 -0
- package/dist/index-bpc596v3.js +154 -0
- package/dist/index-fm84men1.js +239 -0
- package/dist/{index-e6r04a18.js → index-m34q25jj.js} +1127 -170
- package/dist/index-m49jx72n.js +220 -0
- package/dist/{index-dj5z774k.js → index-m82cfspw.js} +35 -16
- package/dist/{index-qfpz5y2v.js → index-nmjdwd4p.js} +8 -2
- package/dist/{index-0g939pfs.js → index-pdmevfxv.js} +10 -7
- package/dist/{index-4j1h4j8c.js → index-pp474137.js} +1598 -973
- package/dist/{index-2tgb2b4e.js → index-rkbf7dqg.js} +3 -5
- package/dist/index-s2k2edts.js +3778 -0
- package/dist/{index-z6br6qdn.js → index-tfzta544.js} +28 -11
- package/dist/index.js +44 -42
- package/dist/persistence/operations.d.ts +3 -0
- package/dist/providers/vertex-auth.d.ts +5 -1
- package/dist/runtime/config.d.ts +8 -0
- package/dist/runtime/context-runtime.d.ts +1 -0
- package/dist/runtime/error-diagnostics.d.ts +8 -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/provider-transient.d.ts +33 -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/time-to-safe-fix.d.ts +8 -0
- package/dist/runtime/usage-ledger.d.ts +17 -0
- package/dist/service-cli.js +12 -11
- package/dist/{service-client-cli-b52c67hx.js → service-client-cli-fn54ev6w.js} +18 -7
- package/dist/verify-historical-migrations.js +2426 -652
- package/dist/zhx.js +2 -2
- package/docs/CLI.md +38 -8
- package/docs/CLIENT_PROTOCOL.md +9 -1
- package/docs/CODE_RELEASE.md +118 -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 +28 -1
- package/examples/README.md +5 -5
- package/package.json +8 -5
- package/dist/index-8705zxpr.js +0 -145
- 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/dist/zhx.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
HARNESS_VERSION,
|
|
4
4
|
shortCliHelp
|
|
5
|
-
} from "./cli-entry-
|
|
5
|
+
} from "./cli-entry-w0hterjs.js";
|
|
6
6
|
import {
|
|
7
7
|
__require
|
|
8
8
|
} from "./cli-entry-1bx83sw4.js";
|
|
@@ -16,6 +16,6 @@ if (argv.length === 1 && ["--version", "-v", "version"].includes(argv[0])) {
|
|
|
16
16
|
process.stdout.write(`${shortCliHelp(HARNESS_VERSION)}
|
|
17
17
|
`);
|
|
18
18
|
} else {
|
|
19
|
-
const { runCli } = await import("./cli-
|
|
19
|
+
const { runCli } = await import("./cli-2h37qyvg.js");
|
|
20
20
|
await runCli(argv);
|
|
21
21
|
}
|
package/docs/CLI.md
CHANGED
|
@@ -45,7 +45,8 @@ Console `/usage` and run JSON `usageLedger` expose usage by API provider/model.
|
|
|
45
45
|
Calls are recorded before transport in the private operations SQLite database;
|
|
46
46
|
SDK child rollups are not added a second time. Missing usage and interrupted calls
|
|
47
47
|
remain incomplete across restarts. A run's original price snapshot and cap survive
|
|
48
|
-
`resume`;
|
|
48
|
+
`resume`; ordinary chat turns start new run budgets. Code's opt-in guided `/task`
|
|
49
|
+
uses one established task owner across new turns, `/continue`, and revise.
|
|
49
50
|
|
|
50
51
|
Use `--pricing-file <file.json> --usage-limit-usd <amount>` for a per-run monetary
|
|
51
52
|
limit across parent and child routes. The file is a schemaVersion 1 object with a
|
|
@@ -54,6 +55,9 @@ limit across parent and child routes. The file is a schemaVersion 1 object with
|
|
|
54
55
|
Prices are operator-supplied estimates, never confirmed invoices. Missing/expired
|
|
55
56
|
prices or unresolved usage block new budgeted calls. The next request reserves
|
|
56
57
|
estimated input and capped output before transport; parallel calls share the cap.
|
|
58
|
+
Explicit positive integer output caps are preserved, including caps above 2,048;
|
|
59
|
+
the ledger uses 2,048 only when a request omits its cap. If the full reservation
|
|
60
|
+
does not fit, admission fails before transport instead of silently shrinking it.
|
|
57
61
|
Input prediction is heuristic; it is not a provider tokenizer or billing guarantee.
|
|
58
62
|
Actual usage above the estimate is retained and blocks further calls if exhausted.
|
|
59
63
|
Cache discounts and special billing tiers are not modeled; configure conservative
|
|
@@ -61,8 +65,34 @@ inclusive rates. Qwen routes without an explicit supported output cap are blocke
|
|
|
61
65
|
under this monetary policy. Unpriced non-budgeted runs report unknown cost.
|
|
62
66
|
Legacy `--max-cost-usd` pricing remains available with its existing homogeneous-route
|
|
63
67
|
restriction; do not combine the two monetary policies.
|
|
64
|
-
Resume of pre-ledger runs marks historical usage unknown.
|
|
65
|
-
|
|
68
|
+
Resume of pre-ledger runs marks historical usage unknown. Logical JSON state
|
|
69
|
+
exports do not include the transport monetary policy/call tables. Importing such
|
|
70
|
+
an export cannot restore a guided task's monetary authority and further execution
|
|
71
|
+
fails closed with `USAGE_LEDGER_MISSING`. Retain the original complete operations
|
|
72
|
+
SQLite database, or restore a consistent complete database copy including its
|
|
73
|
+
transport tables. Copy a quiescent database with its required SQLite journal
|
|
74
|
+
state; a run snapshot, logical export, or token-coordinator record cannot reset
|
|
75
|
+
spending. Unknown consumption also keeps reservations held and blocks admission.
|
|
76
|
+
|
|
77
|
+
Guided task authority currently requires the native single-writer SQLite host and
|
|
78
|
+
vetted built-in transports. Meta's internal continuation retries and arbitrary
|
|
79
|
+
injected/custom adapters are blocked for this path. Direct Code Qwen tasks are
|
|
80
|
+
blocked because this CLI has no explicit Chat-mode admission; a supported
|
|
81
|
+
explicit-Chat auxiliary adapter can be capped. Existing ordinary chat/provider retry behavior remains
|
|
82
|
+
available. New task transports disable internal SDK retries and allow one provider
|
|
83
|
+
request per reservation; retries or compaction must use the same owner. Thirty
|
|
84
|
+
percent of the token ceiling remains available for bounded closure. A local abort
|
|
85
|
+
closes new admission and requests cooperative stopping; it does not prove that a
|
|
86
|
+
provider stopped billing. Complete late usage receipts remain charged.
|
|
87
|
+
|
|
88
|
+
Older guided tasks without an established budget remain readable and reviewable.
|
|
89
|
+
Continuing them is blocked because historical consumption cannot be reconstructed
|
|
90
|
+
as zero. Create a separate new task explicitly when a new budget is intended.
|
|
91
|
+
Task control records and linked token ledgers are retained; SQLite rejects their
|
|
92
|
+
deletion through ordinary run cleanup. Downgrading to a version without this
|
|
93
|
+
task contract cannot safely continue it; preserve the complete database first.
|
|
94
|
+
See [minimum task authority](MINIMUM_TASK_AUTHORITY.md) for the transport matrix,
|
|
95
|
+
recovery boundaries and measured local evidence.
|
|
66
96
|
|
|
67
97
|
The Zhivex Harness `1.0` release is Node-first and exposes a durable agent console, explicit personal provider/model profiles, bounded project context, offline change-envelope operations, plus versioned JSON documents and JSON Lines events for automation. Bun remains a supported target-repository package manager and contributor tool.
|
|
68
98
|
|
|
@@ -78,7 +108,7 @@ An empty draft shows a muted task hint. Shortcuts sit below the complete draft,
|
|
|
78
108
|
adapt to terminal width, and give way to command and history searches. Sending or
|
|
79
109
|
cancelling removes these editor hints before model output or approval questions.
|
|
80
110
|
|
|
81
|
-
The console opens with the Zhivex logo and a compact welcome panel. Project/model context sits beside the logo when space permits. Before each task, the composer shows the model, approval mode, pending approval state and attachment count. Long labels are bounded to the terminal width; full configuration remains available through `/status`. Type `/` to open the command menu; keep typing to search names and descriptions, use Up/Down to select, Tab to insert, and Enter to submit. Escape dismisses the menu. Enter on a partial command inserts its selection; a separate Enter submits it, including approval commands. Only commands supported by the connected runtime appear. Narrow terminals use a compact logo; `NO_COLOR` disables logo color. The console completes slash-command prefixes with Tab. `/paste` captures a bounded
|
|
111
|
+
The console opens with the Zhivex logo and a compact welcome panel. Project/model context sits beside the logo when space permits. Before each task, the composer shows the model, approval mode, pending approval state and attachment count. Long labels are bounded to the terminal width; full configuration remains available through `/status`. Type `/` to open the command menu; keep typing to search names and descriptions, use Up/Down to select, Tab to insert, and Enter to submit. Escape dismisses the menu. Enter on a partial command inserts its selection; a separate Enter submits it, including approval commands. Only commands supported by the connected runtime appear. Narrow terminals use a compact logo; `NO_COLOR` disables logo color. `zhivex-code` shows the logo only on the first welcome of a new session, when stderr is a terminal, `TERM` is not `dumb`, and the size is at least 48 columns by 24 rows; otherwise it shows `( Z )`, and a restored session shows no logo. The console completes slash-command prefixes with Tab. `/paste` captures a bounded
|
|
82
112
|
multiline draft: finish with `.end` on a separate line, review the preview, then type
|
|
83
113
|
`send` at the separate confirmation prompt. Slash commands inside the draft remain
|
|
84
114
|
literal model input. Use this mode when the terminal does not support bracketed
|
|
@@ -410,8 +440,8 @@ subsequent model calls, rather than guaranteeing a pre-request input-token ceili
|
|
|
410
440
|
|
|
411
441
|
### Runs without cumulative token budgets
|
|
412
442
|
|
|
413
|
-
New local interactive sessions (`zhx` or `zhx chat`) have no
|
|
414
|
-
ceiling by default. Automatic compaction continues, and usage is measured and
|
|
443
|
+
New local interactive sessions (`zhx` or `zhx chat`) and Harness Web have no
|
|
444
|
+
cumulative token, step, tool-call or duration ceiling by default. Automatic compaction continues, and usage is measured and
|
|
415
445
|
persisted. This avoids ending a repository analysis solely because repeated
|
|
416
446
|
requests have consumed 100,000 input tokens.
|
|
417
447
|
|
|
@@ -424,8 +454,8 @@ start a new session to use the new default.
|
|
|
424
454
|
|
|
425
455
|
`--no-token-budget` disables cumulative input, output and total token ceilings for
|
|
426
456
|
the main run and children, including token closure reserves. Numeric settings remain
|
|
427
|
-
stored but inactive.
|
|
428
|
-
apply. Library callers use `unlimitedTokens: true`; `false` restores token limits.
|
|
457
|
+
stored but inactive. Explicit host ceilings, operation/model/state limits, anti-loop controls, monetary
|
|
458
|
+
policies and approvals still apply. Library callers use `unlimitedTokens: true`; `false` restores token limits.
|
|
429
459
|
|
|
430
460
|
`--context-tokens <n>` sets the estimated context compaction threshold independently
|
|
431
461
|
of cumulative usage. The default is 40,000. It can be adjusted for the selected model;
|
package/docs/CLIENT_PROTOCOL.md
CHANGED
|
@@ -68,7 +68,15 @@ Responses echo the request ID and use a discriminated result:
|
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
Malformed envelopes return INVALID_REQUEST with `requestId: null`. Exception text,
|
|
71
|
-
stack traces, credentials and provider
|
|
71
|
+
stack traces, credentials and provider payloads are never copied into error envelopes.
|
|
72
|
+
Known Qwen stream failures may include optional `providerDiagnostic` with
|
|
73
|
+
`provider: "qwen"`, `diagnosticCode: "QWEN_SSE_EVENT_INVALID"`, `transport`
|
|
74
|
+
(`chat` or `responses`), `reason` (`invalid_json` or `invalid_event`) and
|
|
75
|
+
`retryable: false`. Failed `run.get` results may include an `error` projection
|
|
76
|
+
with that same diagnostic. The client error code remains `EXECUTION_FAILED`;
|
|
77
|
+
the typed Harness error category is `provider`. Historical message-only errors
|
|
78
|
+
cannot recover missing fields. Newly caught failures retain only these safe
|
|
79
|
+
fields in run metadata when the installed SDK did not persist them itself.
|
|
72
80
|
Successful answers and exact approval actions are **sensitive workspace content**:
|
|
73
81
|
a future transport must authenticate access and must not log or render them as trusted
|
|
74
82
|
HTML/shell instructions. Hashes identify the exact action; they are not signatures
|
package/docs/CODE_RELEASE.md
CHANGED
|
@@ -1,6 +1,123 @@
|
|
|
1
1
|
# Code release procedure
|
|
2
2
|
|
|
3
|
-
## Current
|
|
3
|
+
## Current stable preparation: 2026-10-09
|
|
4
|
+
|
|
5
|
+
This checkout prepares Code `0.3.0`, pinned exactly to Harness `1.4.0`, for npm
|
|
6
|
+
`latest`. Published Code `0.2.0` and Harness `1.3.0` on `latest` remain
|
|
7
|
+
unchanged. Published npm `next` is Code `0.3.0-rc.8` and Harness `1.4.0-rc.8`.
|
|
8
|
+
|
|
9
|
+
Annotated tags `v1.4.0-rc.8` and `code-v0.3.0-rc.8` both resolve to
|
|
10
|
+
`5bba06c86fc82b34b67cec607053948f8e00d0d1`. Against that commit, engine runtime
|
|
11
|
+
source under `src/` is identical. This Code package is not: main includes the
|
|
12
|
+
shared review screen ([PR201](https://github.com/Zhivex/zhivex-harness/pull/201)),
|
|
13
|
+
the status line, summary and 48×24 logo
|
|
14
|
+
([PR210](https://github.com/Zhivex/zhivex-harness/pull/210)), and the public
|
|
15
|
+
README ([PR200](https://github.com/Zhivex/zhivex-harness/pull/200)). Web
|
|
16
|
+
([PR211](https://github.com/Zhivex/zhivex-harness/pull/211)) and desktop
|
|
17
|
+
([PR203](https://github.com/Zhivex/zhivex-harness/pull/203),
|
|
18
|
+
[PR211](https://github.com/Zhivex/zhivex-harness/pull/211)) are also not identical
|
|
19
|
+
to that tag. The authoritative file-level comparison is in the
|
|
20
|
+
[Harness release procedure](https://github.com/Zhivex/zhivex-harness/blob/main/docs/RELEASE.md).
|
|
21
|
+
|
|
22
|
+
The Code manifest dist-tag is `latest` because `0.3.0` is a stable version.
|
|
23
|
+
Desktop stays private alpha with the same engine binding. SDK pins, approval and
|
|
24
|
+
transport protections, and provider/API tiers stay as they are on main. The
|
|
25
|
+
RC.8 preparation snapshot below remains historical; its evidence and approvals
|
|
26
|
+
do not certify or authorize `0.3.0`.
|
|
27
|
+
|
|
28
|
+
This preparation creates no tags, paid calls, campaign dispatch or publication.
|
|
29
|
+
After review and user integration, require all four successful exact-main workflows
|
|
30
|
+
(`ci.yml`, `codeql.yml`, `code-journey.yml`, `web.yml`) and direct-main CodeQL.
|
|
31
|
+
New explicit campaign/publication authority is required before any Harness
|
|
32
|
+
`v1.4.0` or Code `code-v0.3.0` tag/dispatch. Harness must first pass its
|
|
33
|
+
unchanged protected exact-artifact, OCI, live and representative gates and actual
|
|
34
|
+
registry integrity/provenance verification. Code's protected OIDC workflow then
|
|
35
|
+
uses the matching reviewed SHA with `channel=latest`, `mode=oidc` and explicit
|
|
36
|
+
confirmation, resolving the actual published Harness dependency without overrides.
|
|
37
|
+
Retained-artifact terminal/web, four-manager acceptance and registry bytes with
|
|
38
|
+
source-bound provenance remain mandatory. Preserve published `next` and all history.
|
|
39
|
+
|
|
40
|
+
## Historical RC.8 preparation: 2026-10-08
|
|
41
|
+
|
|
42
|
+
This checkout prepares Code `0.3.0-rc.8`, pinned exactly to Harness
|
|
43
|
+
`1.4.0-rc.8`, for npm `next`. The matched engine includes the reviewed
|
|
44
|
+
duplicate-delegation fix on main after the RC.7 tag
|
|
45
|
+
([PR198](https://github.com/Zhivex/zhivex-harness/pull/198)): a second
|
|
46
|
+
`delegate_*` call for a task already accepted in the same model response stays
|
|
47
|
+
non-executable. Qwen live certification accepts `DASHSCOPE_API_KEY` alone.
|
|
48
|
+
Retain terminal/local browser contracts, the SDK pins already on main, approval
|
|
49
|
+
and transport protections, provider/API tiers and RC.4 migration requirements.
|
|
50
|
+
Desktop stays private alpha with the same engine binding. Stable Code `0.2.0`
|
|
51
|
+
and Harness `1.3.0` on `latest` remain unchanged. Published npm `next` is Code
|
|
52
|
+
`0.3.0-rc.6` and Harness `1.4.0-rc.6`.
|
|
53
|
+
|
|
54
|
+
Annotated Harness `v1.4.0-rc.7` (tag object
|
|
55
|
+
`fb08b8d37e7b95a134336d6c0cdc7efb922561ee` at
|
|
56
|
+
`1f986a0b044fa2827166fc934c712684971127b5`) was not published.
|
|
57
|
+
[Run 37819050020](https://github.com/Zhivex/zhivex-harness/actions/runs/37819050020)
|
|
58
|
+
passed exact-artifact validation and failed live certification on Qwen in the
|
|
59
|
+
bounded reviewer orchestration gate. Representative evaluation and publication
|
|
60
|
+
were skipped. No Code `code-v0.3.0-rc.7` tag was created. Do not rerun, replace
|
|
61
|
+
or retag that artifact as part of this preparation. See the authoritative
|
|
62
|
+
[Harness release procedure](https://github.com/Zhivex/zhivex-harness/blob/main/docs/RELEASE.md)
|
|
63
|
+
for exact immutable identities and preserved RC.6/RC.5/RC.4 history. The RC.7 and
|
|
64
|
+
older preparation snapshots below remain historical; their evidence and approvals
|
|
65
|
+
do not certify or authorize RC.8.
|
|
66
|
+
|
|
67
|
+
This preparation creates no tags, paid calls, campaign dispatch or publication.
|
|
68
|
+
After review and user integration, require all four successful exact-main workflows
|
|
69
|
+
(`ci.yml`, `codeql.yml`, `code-journey.yml`, `web.yml`) and direct-main CodeQL.
|
|
70
|
+
New explicit campaign/publication authority is required before any Harness
|
|
71
|
+
`v1.4.0-rc.8` or Code `code-v0.3.0-rc.8` tag/dispatch. Harness must first pass its
|
|
72
|
+
unchanged protected exact-artifact, OCI, live and representative gates and actual
|
|
73
|
+
registry integrity/provenance verification. Code's protected OIDC workflow then
|
|
74
|
+
uses the matching reviewed SHA with `channel=next`, `mode=oidc` and explicit
|
|
75
|
+
confirmation, resolving the actual published Harness dependency without overrides.
|
|
76
|
+
Retained-artifact terminal/web, four-manager acceptance and registry bytes with
|
|
77
|
+
source-bound provenance remain mandatory. Preserve stable `latest` and all history.
|
|
78
|
+
|
|
79
|
+
## Historical RC.7 preparation: 2026-10-08
|
|
80
|
+
|
|
81
|
+
This checkout prepares Code `0.3.0-rc.7`, pinned exactly to Harness
|
|
82
|
+
`1.4.0-rc.7`, for npm `next`. The matched engine includes the reviewed work on
|
|
83
|
+
main after published RC.6: optional Web task/project limits
|
|
84
|
+
([PR189](https://github.com/Zhivex/zhivex-harness/pull/189)), sanitized Qwen
|
|
85
|
+
stream diagnostics ([PR188](https://github.com/Zhivex/zhivex-harness/pull/188)),
|
|
86
|
+
bounded guided task authority ([PR187](https://github.com/Zhivex/zhivex-harness/pull/187)),
|
|
87
|
+
private Desktop Electron 44.5.1 ([PR180](https://github.com/Zhivex/zhivex-harness/pull/180)),
|
|
88
|
+
task cancellation persistence ([PR190](https://github.com/Zhivex/zhivex-harness/pull/190))
|
|
89
|
+
and task continuity from durable authority ([PR191](https://github.com/Zhivex/zhivex-harness/pull/191)).
|
|
90
|
+
Retain terminal/local browser contracts, the SDK pins already on main, approval
|
|
91
|
+
and transport protections, provider/API tiers and RC.4 migration requirements.
|
|
92
|
+
Desktop stays private alpha with the same engine binding. Stable Code `0.2.0`
|
|
93
|
+
and Harness `1.3.0` on `latest` remain unchanged. Published npm `next` is Code
|
|
94
|
+
`0.3.0-rc.6` and Harness `1.4.0-rc.6`.
|
|
95
|
+
|
|
96
|
+
Harness [RC.6](https://github.com/Zhivex/zhivex-harness/actions/runs/37395585612)
|
|
97
|
+
completed at annotated `v1.4.0-rc.6` on `0adf4e2e96380864ef4c697ea94df64ad7c18eec`.
|
|
98
|
+
Code [run 37399657231](https://github.com/Zhivex/zhivex-harness/actions/runs/37399657231)
|
|
99
|
+
accepted `code-v0.3.0-rc.6` and then failed its immediate registry identity
|
|
100
|
+
assertion while metadata still reported the version absent. The registry now
|
|
101
|
+
serves that Code version on `next`. Do not rerun, replace or retag it as part of
|
|
102
|
+
this preparation. See the authoritative
|
|
103
|
+
[Harness release procedure](https://github.com/Zhivex/zhivex-harness/blob/main/docs/RELEASE.md)
|
|
104
|
+
for exact immutable identities and preserved RC.5/RC.4 history. The RC.6 and
|
|
105
|
+
older preparation snapshots below remain historical; their evidence and approvals
|
|
106
|
+
do not certify or authorize RC.7.
|
|
107
|
+
|
|
108
|
+
This preparation creates no tags, paid calls, campaign dispatch or publication.
|
|
109
|
+
After review and user integration, require all four successful exact-main workflows
|
|
110
|
+
(`ci.yml`, `codeql.yml`, `code-journey.yml`, `web.yml`) and direct-main CodeQL.
|
|
111
|
+
New explicit campaign/publication authority is required before any Harness
|
|
112
|
+
`v1.4.0-rc.7` or Code `code-v0.3.0-rc.7` tag/dispatch. Harness must first pass its
|
|
113
|
+
unchanged protected exact-artifact, OCI, live and representative gates and actual
|
|
114
|
+
registry integrity/provenance verification. Code's protected OIDC workflow then
|
|
115
|
+
uses the matching reviewed SHA with `channel=next`, `mode=oidc` and explicit
|
|
116
|
+
confirmation, resolving the actual published Harness dependency without overrides.
|
|
117
|
+
Retained-artifact terminal/web, four-manager acceptance and registry bytes with
|
|
118
|
+
source-bound provenance remain mandatory. Preserve stable `latest` and all history.
|
|
119
|
+
|
|
120
|
+
## Historical RC.6 preparation: 2026-10-05
|
|
4
121
|
|
|
5
122
|
This checkout prepares Code `0.3.0-rc.6`, pinned exactly to Harness
|
|
6
123
|
`1.4.0-rc.6`, for npm `next`. The matched engine includes the reviewed bounded
|
|
@@ -70,7 +70,7 @@ Loading a run reconstructs its complete state for compatibility with approvals,
|
|
|
70
70
|
|
|
71
71
|
Logical backups contain hydrated history rather than database references, so restoration does not require the original artifact tables. Exports up to 64 MiB retain the legacy JSON format; larger exports use the versioned `ZHIVEX-STATE-SEGMENTS-1` transport with bounded frames, including split strings. RC13 reads both formats and verifies the same logical checksum before import. Older versions cannot read segmented exports. File I/O and checksum serialization are incremental; the public backup/import APIs still hydrate the complete logical bundle in memory. Segmented files have no aggregate 64 MiB ceiling. A state-limit failure records a bounded terminal diagnostic on the last durable checkpoint; the unsaved payload is not claimed as preserved. Use `/status` to inspect the failed run before `/continue`. Recovery retains tool journal receipts and never re-executes an operation itself.
|
|
72
72
|
|
|
73
|
-
The current candidate pins Core 1.
|
|
73
|
+
The current candidate pins Core 1.31.0 and Agents 1.11.0. New stores require no
|
|
74
74
|
conversion. Before upgrading an existing shared SDK store, stop its workers and
|
|
75
75
|
upgrade them together with a complete backup. Verified legacy runs retain their
|
|
76
76
|
physical keys and remain readable; new runs use canonical keys that distinguish
|
package/docs/EXTENSIBILITY.md
CHANGED
|
@@ -8,7 +8,7 @@ Built-in registrations are Meta, Qwen, OpenAI, and Gemini. Each registration own
|
|
|
8
8
|
|
|
9
9
|
Library callers can use `DEFAULT_PROVIDER_REGISTRY`, `BUILTIN_PROVIDER_REGISTRATIONS`, `createProviderRegistry`, or `DEFAULT_PROVIDER_REGISTRY.extend(...)`, then pass the registry to `resolveHarnessConfig`, `createProviderModel`, provider diagnostics, or `createHarness({ providerRegistry })`. Registration IDs, environment-variable names, defaults, diagnostics, and factories are validated before they become selectable.
|
|
10
10
|
|
|
11
|
-
The coordinated stable SDK batch pins `@zhivex-ai/agents@1.
|
|
11
|
+
The coordinated stable SDK batch pins `@zhivex-ai/agents@1.11.0`, `@zhivex-ai/core@1.31.0`, `@zhivex-ai/meta@0.2.9`, `@zhivex-ai/qwen@0.16.4`, `@zhivex-ai/openai@0.14.1`, `@zhivex-ai/gemini@0.13.0`, `@zhivex-ai/anthropic@0.13.2`, and `@zhivex-ai/vertex@1.2.4`. Qwen 0.16.2 types malformed Responses tool arguments and malformed SSE events; Core 1.31.0 satisfies the updated Agents, Anthropic, OpenAI and Vertex `^1.30.0` ranges and Qwen `^1.29.0` range. These exact versions are pinned in the lockfile. Stable SDK publication does not replace Harness release-bound certification. Qwen `0.11.x` normalizes missing, placeholder, and continuation tool-call identifiers inside the adapter; Harness retains its deterministic provider-boundary normalizer as defense in depth until the exact candidate passes the complete release-bound representative matrix. A Core override keeps one runtime contract identity across every adapter, while Core `1.13.0` corrects compaction usage accounting and interaction-group retention. OpenAI `0.11.2` preserves synthetic assistant history in Responses, so the harness no longer requires its compaction transport or accounting workarounds.
|
|
12
12
|
|
|
13
13
|
OpenAI is based on the GPT-5.6 family: `gpt-5.6-luna` is the default, with `gpt-5.6-terra` and `gpt-5.6-sol` available through `--model`. Availability remains organization-dependent while the upstream family is in limited preview, and the adapter uses the Responses API by default.
|
|
14
14
|
|
package/docs/FIRST_USE.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# First use
|
|
2
2
|
|
|
3
|
-
This guide targets
|
|
3
|
+
This guide targets stable `1.4.0`, pending publication to npm `latest`. The versioned install commands below become available only after protected publication. npm `latest` remains stable 1.3.0 until that publication.
|
|
4
4
|
|
|
5
5
|
## Install and start
|
|
6
6
|
|
|
7
7
|
Install Node.js 22.13.0 or newer and Git. Then:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npm install -g @zhivex-ai/harness@1.4.0
|
|
10
|
+
npm install -g @zhivex-ai/harness@1.4.0
|
|
11
11
|
cd /path/to/your/project
|
|
12
12
|
zhx
|
|
13
13
|
```
|
|
@@ -82,16 +82,16 @@ For command execution, configure [OCI isolation](EXECUTION_ENVIRONMENTS.md).
|
|
|
82
82
|
With Bun 1.4.0 or newer and a supported Node runtime:
|
|
83
83
|
|
|
84
84
|
```sh
|
|
85
|
-
bun add --global @zhivex-ai/harness@1.4.0
|
|
85
|
+
bun add --global @zhivex-ai/harness@1.4.0
|
|
86
86
|
zhx
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
For a disposable version/help/environment check without a global installation:
|
|
90
90
|
|
|
91
91
|
```sh
|
|
92
|
-
bunx @zhivex-ai/harness@1.4.0
|
|
93
|
-
bunx @zhivex-ai/harness@1.4.0
|
|
94
|
-
bunx @zhivex-ai/harness@1.4.0
|
|
92
|
+
bunx @zhivex-ai/harness@1.4.0 --version
|
|
93
|
+
bunx @zhivex-ai/harness@1.4.0 --help
|
|
94
|
+
bunx @zhivex-ai/harness@1.4.0 doctor
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
For source development, use the [contributor guide](https://github.com/Zhivex/zhivex-harness/blob/main/CONTRIBUTING.md).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Minimum offline evaluation preparation
|
|
2
|
+
|
|
3
|
+
This cohort prepares the approved next-version minimum's evaluation protocol. It contains **12 frozen synthetic JS/TS tasks across three repository templates** (four tasks each), and **two separate development tasks**. They are deterministic scaffolding, not real privately sourced holdout tasks. Scripted model results establish fixture validity and runtime behavior, never model quality or competitive performance. The later 12 × 3 × 2 paid campaign requires separate budget approval and real-task selection.
|
|
4
|
+
|
|
5
|
+
The frozen private catalog and reference/hidden acceptance bytes are a local-only deliverable outside this public Git checkout, at `../reference/private-minimum-evals/` (directory mode 0700, files mode 0600). Their SHA-256 is `e0b1f95bb96031a4d72907a8243c23529a1ef27332532e435f9681c5b004ca4e`. They must never be committed, pushed or included in npm artifacts. The runner has no private default: provide `--fixtures=<private-directory>` or `ZHIVEX_MINIMUM_EVAL_FIXTURES` explicitly. The checked SHA-256 freezes the complete cohort, including instructions, original files, reference solutions, oracle, constraints and rubric. Changes require a new revision and digest before execution. Do not tune prompts or thresholds against holdout outcomes. Use the separate development split for runner changes.
|
|
6
|
+
|
|
7
|
+
Public CI tests are self-contained. `scripts/minimum-evals/public-regression-fixtures.ts` contains only the two public development examples (whitespace normalization and numeric clamping); it generates twelve duplicate contract rows plus the two development rows in a temporary directory. These generated rows exercise schema, isolation, verification and restart contracts; they are not the twelve private holdout tasks. CI never reads the local private cohort.
|
|
8
|
+
|
|
9
|
+
Each private task materializes only its starter implementation, documentation, visible public check, package manifest and exact native `/task` acceptance contract. The oracle and reference solution never enter the task workspace or prompt. The offline script itself intentionally gives its synthetic model the reference patch; this is a regression double, not a withheld model exam. Production model evaluation must keep these verifier files outside every enabled filesystem/tool boundary. Local host execution here is not an adversarial process sandbox.
|
|
10
|
+
|
|
11
|
+
After closing the task session, the grader reads bounded regular files, rejects symlinks/hardlinks and extra or protected-file changes, and applies only allowlisted implementation changes to a clean copy. It runs the original visible check and the hidden oracle there, ignoring submitted check edits. The frozen public and hidden checks both fail for an empty patch and both pass for the reference. One task changes two files; the long-context task has archived notes and a separate authoritative contract; the continuation task closes/reopens at a durable approval before continuing the same run.
|
|
12
|
+
|
|
13
|
+
Run the public regression tests with `bun test tests/minimum-offline-evals.test.ts`. Run a local private cohort with Bun 1.4.0, serially, without credentials or provider calls:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
export ZHIVEX_MINIMUM_EVAL_FIXTURES="/private/path/to/private-minimum-evals"
|
|
17
|
+
bun scripts/minimum-task-evals.ts --validate
|
|
18
|
+
bun scripts/minimum-task-evals.ts --validate --split=development
|
|
19
|
+
bun scripts/minimum-task-evals.ts --plan --report=/tmp/minimum-unexecuted-plan.json
|
|
20
|
+
NODE_PATH="$PWD/node_modules" bun scripts/minimum-task-evals.ts --variant=candidate --report=/tmp/minimum-candidate.json
|
|
21
|
+
NODE_PATH="$PWD/node_modules" bun scripts/minimum-task-evals.ts --variant=rc6 --engine=/path/to/rc6/src/engine/index.ts --report=/tmp/minimum-rc6.json
|
|
22
|
+
bun scripts/minimum-task-evals.ts --mode=empty --report=/tmp/minimum-empty.json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Run RC6 and candidate with the same frozen cohort, machine, runtime, resource settings, scripted events and task ceiling. Reports include engine commit, module/diff digests, source dependency lock digest, explicit dependency-resolution mode, OS/CPU/runtime identity, cache qualifications and every attempt. When RC6 lacks installed dependencies, Bun can use `NODE_PATH` to the same installed dependency tree for both variants without editing either source checkout; verify both lock files are identical first. One task runs with one owner through approval resumes; fresh-run/revise scenarios where RC6 cannot enforce the same cumulative task ceiling belong to separate functional evidence, not cost A/B. The runner is offline-only and offers no live-provider execution switch.
|
|
26
|
+
|
|
27
|
+
Reports and durable per-attempt JSONL journals are created with mode 0600 and exclusive creation; no previous evidence is overwritten. Reports contain submitted patches and must stay private, outside npm artifacts and model context. Infrastructure failures and empty-patch failures remain recorded. Do not publish reference or hidden checks as benchmark tasks. The prepared seeded matrix has 72 **not-executed** entries, blocked by task with alternating variants and three fresh repetitions; retries are disabled. It records prerequisites rather than inventing a provider, pricing or approval.
|
|
28
|
+
|
|
29
|
+
Each attempt records `runCompleted`, `oraclePassed`, `scopePassed`, `protectedFilesUnchanged`, `publicCheckPassed`, `automatedPass`, failure class, usage completeness, calls, compactions, tool count, patch bytes, wall/active time, fixed model settings and budget. Unknown provider cost, repeated work, actual human minutes and interventions stay null. `acceptedChange` stays null until independent human review. Synthetic usage is explicitly not billing. Human review must be blinded to variant using a separate review projection and assess correctness, exact scope, readability and unnecessary complexity against the frozen rubric; do not send the experiment manifest to that reviewer.
|
|
30
|
+
|
|
31
|
+
Before a paid campaign, freeze immutable model/endpoint (or record its observation window), reasoning, temperature, effective caps, tools, policies, resources, known cache state and budget approval. Validate reference/empty checks again. Freeze decision thresholds after repeating RC6 and before looking at holdout outcomes. Report initial success separately from eventual success; retain all planned failures, retries and paid verifier cost. Cost per accepted result is total planned spend divided by accepted results, undefined with zero accepts, and incomplete whenever spend is unknown. Compare whole-campaign latency and latency in pairs where both pass. Twelve tasks do not support broad generalization or a stable p95 claim.
|