@zhivex-ai/harness 1.4.1 → 1.5.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 +3 -0
- package/README.md +1 -1
- package/SUPPORT.md +1 -1
- package/contracts/stable-api-signatures.json +7 -7
- package/dist/acp-cli.js +10 -10
- package/dist/approvals/approval-diff.d.ts +2 -1
- package/dist/approvals/approval-preview.d.ts +1 -1
- package/dist/audit/index.js +6 -6
- package/dist/{audit-pack-e4vaq7np.js → audit-pack-kvw7ng34.js} +3 -3
- package/dist/{cli-entry-rgs6bxmy.js → cli-entry-75j3r49b.js} +2 -2
- package/dist/{cli-entry-7f0cen32.js → cli-entry-928p8h41.js} +135 -58
- package/dist/{cli-entry-a890x3kq.js → cli-entry-h2yc9x37.js} +7 -5
- package/dist/{cli-entry-3s63zn4w.js → cli-entry-q8bgkn9m.js} +1 -1
- package/dist/{cli-1cf4dcnj.js → cli-vyrytn3m.js} +14 -8
- package/dist/cli.js +2 -2
- package/dist/compat/code-support.js +8 -8
- package/dist/engine/acp.js +11 -11
- package/dist/engine/client.js +10 -10
- package/dist/engine/desktop-state-v1.js +6 -6
- package/dist/engine/index.js +15 -15
- package/dist/engine/mcp-stdio-v1.js +5 -5
- package/dist/engine/service.js +11 -11
- package/dist/hostile-repository-demo.js +138 -60
- package/dist/{index-dtb2c6ds.js → index-5zbq9ztj.js} +2 -2
- package/dist/{index-6599mpmy.js → index-63gbp0cz.js} +3 -3
- package/dist/{index-xdbkcccf.js → index-6dxrbnxm.js} +2 -2
- package/dist/{index-0zs2dz26.js → index-6fp7kdpx.js} +10 -9
- package/dist/{index-mv8sb1ns.js → index-96ezrvg2.js} +55 -13
- package/dist/{index-wm9xeq1n.js → index-bt2p8x7r.js} +1 -1
- package/dist/{index-sk3cap35.js → index-eps3c3g6.js} +1 -1
- package/dist/{index-zxg4ve4j.js → index-fqqz1yt8.js} +77 -4
- package/dist/{index-d9zkmhz3.js → index-ggstwr0v.js} +53 -18
- package/dist/{index-j6zxnc8m.js → index-jpdvn09j.js} +5 -5
- package/dist/{index-4fx5f3k5.js → index-pq3kz1r8.js} +1 -1
- package/dist/{index-02pqtbbg.js → index-vc7yxz50.js} +10 -10
- package/dist/{index-crta5wzv.js → index-vvzc5ezz.js} +4 -4
- package/dist/{index-f6mqa5gk.js → index-wwthv10a.js} +11 -39
- package/dist/{index-74kkpyqk.js → index-xfedewpt.js} +12 -6
- package/dist/{index-sstgcsr0.js → index-yx52bt4a.js} +1 -1
- package/dist/index.js +14 -14
- package/dist/integrations/mcp-stdio-tools.d.ts +4 -1
- package/dist/runtime/budget-ledger-scope.d.ts +14 -0
- package/dist/service-cli.js +11 -11
- package/dist/{service-client-cli-eqrdc9zq.js → service-client-cli-v6qptg9x.js} +4 -4
- package/dist/tools/workspace.d.ts +2 -2
- package/dist/verify-historical-migrations.js +143 -62
- package/dist/workspace/edit-contracts.d.ts +2 -2
- package/dist/workspace/path-policy.d.ts +2 -1
- package/dist/workspace/workspace.d.ts +13 -0
- package/dist/zhx.js +2 -2
- package/docs/CODE_RELEASE.md +28 -6
- package/docs/CODE_WEB_TASKS.md +1 -1
- package/docs/ENGINE_API.md +1 -1
- package/docs/EXTENSIBILITY.md +6 -2
- package/docs/FIRST_USE.md +6 -6
- package/docs/PROJECT_MEMORY.md +1 -1
- package/docs/PUBLIC_SECURITY.md +14 -1
- package/docs/REPOSITORY_EDITING.md +1 -1
- package/docs/TOOL_POLICY.md +4 -1
- package/docs/adr/0002-isolated-mcp-stdio.md +1 -1
- package/evaluations/representative-assembly-matrix.json +10 -1
- package/examples/README.md +3 -3
- package/package.json +1 -1
package/docs/PROJECT_MEMORY.md
CHANGED
|
@@ -7,7 +7,7 @@ generated automatically; hosts may submit a suggestion for operator review.
|
|
|
7
7
|
|
|
8
8
|
## CLI
|
|
9
9
|
|
|
10
|
-
Use `zhx` or `zhivex-code` with Harness 1.
|
|
10
|
+
Use `zhx` or `zhivex-code` with Harness 1.5.0 (Code 0.4.0), pending publication. Commands
|
|
11
11
|
print bounded JSON, including the selected workspace/scope hashes. Quote content
|
|
12
12
|
as one argument. Memory commands do not start a model or read credentials.
|
|
13
13
|
|
package/docs/PUBLIC_SECURITY.md
CHANGED
|
@@ -13,7 +13,9 @@ The repository is public. GitHub documents the following controls as available w
|
|
|
13
13
|
- CodeQL code scanning on standard GitHub-hosted runners; and
|
|
14
14
|
- standard GitHub-hosted Actions runners.
|
|
15
15
|
|
|
16
|
-
The repository additionally uses a `main` ruleset with pull-request review, review-thread resolution, linear history, and required CI checks. Repository Actions default to read-only permissions; individual jobs must request any narrower write capability explicitly.
|
|
16
|
+
The repository additionally uses a `main` ruleset with pull-request review, review-thread resolution, linear history, and required CI checks. Repository Actions default to read-only permissions; individual jobs must request any narrower write capability explicitly. CI lints `.github/workflows` with actionlint 1.7.12 and shellcheck. The checksum and the shellcheck exceptions for quoted node/bun programs are pinned in `.github/workflows/ci.yml`.
|
|
17
|
+
|
|
18
|
+
Harness release, Code release, and live certification each call `.github/workflows/resolve-protected-release-ref.yml` from a job with empty permissions and no secrets. The call uses a relative `./` path, so GitHub loads that file from the same commit as the dispatched workflow. An off-main tag or branch can rewrite the resolver or omit the call. The resolver is defense in depth, not the trust boundary. The boundary is external: the `npm` and `live-certification` environments accept deployments only from the selected tag patterns below, and a tag ruleset lets only maintainers create matching tags and blocks updates and deletions. When the dispatched workflow still contains the resolver, it requires `GITHUB_REF` to be exactly `refs/tags/<tag>` for both Harness and Code. It then accepts only an annotated `vX.Y.Z`, `vX.Y.Z-rc.N`, `code-vX.Y.Z`, or `code-vX.Y.Z-rc.N` tag, peels it to a full commit SHA, and continues only when that commit is the workflow commit and an ancestor of `main`. Later jobs check out that SHA. `id-token: write` is requested only on those later jobs: Harness and Code publication on the `npm` environment, Code provenance generation, and Vertex workload identity on the `live-certification` environment. The environment still withholds that token unless the workflow ref is an allowed deployment tag. npm provenance, the Rekor HTTP 409 reuse for an identical DSSE entry, and the registry verification step are unchanged. Pinning `uses:` to a commit SHA in this repository or in another repository does not replace the environment rules or the tag ruleset: the workflow file selected by the dispatched ref still chooses the `uses:` value and can delete the call.
|
|
17
19
|
|
|
18
20
|
References:
|
|
19
21
|
|
|
@@ -37,3 +39,14 @@ If the repository becomes private or internal, treat every security feature and
|
|
|
37
39
|
The `live-certification` GitHub environment is the only workflow scope authorized to hold provider credentials. Whether credentials are currently configured is mutable repository state and is intentionally not asserted by this document; maintainers must verify it at dispatch time. Adding or rotating credentials transfers sensitive provider keys into GitHub and requires an explicit maintainer decision.
|
|
38
40
|
|
|
39
41
|
The release workflow fails closed when those credentials are absent: npm publication depends on the base, orchestration, routing, and model-directed OCI live gates running against the exact annotated release tag and source commit. When credentials are configured, they are exposed only to the final provider-call step; checkout, runtime setup, dependency installation, tag verification, and deterministic OCI validation do not receive them. Local credentials are never copied to GitHub automatically.
|
|
42
|
+
|
|
43
|
+
## Environment protection to confirm manually
|
|
44
|
+
|
|
45
|
+
The workflow file cannot create GitHub environment rules or rulesets. Before the next npm publication or live certification, set these repository settings. They are the trust boundary.
|
|
46
|
+
|
|
47
|
+
- `npm`: required reviewers. Deployment branches and tags must be **Selected tags** with patterns `v*` and `code-v*` only. Do not include `main`, all branches, or any other pattern. This environment remains the Trusted Publishing environment for `release.yml` and `release-code.yml`.
|
|
48
|
+
- `live-certification`: required reviewers. Deployment branches and tags must be **Selected tags** with pattern `v*` only. Do not include `main`, any branch, or `code-v*`. Provider secrets and Vertex variables stay in this environment.
|
|
49
|
+
- Tag ruleset for patterns `v*` and `code-v*`: enable **Restrict creations**, **Restrict updates**, and **Restrict deletions**. Put only the Maintain role on the bypass list, so only maintainers can create matching tags and nobody can update or delete them. Repository admins can still bypass a ruleset unless the organization disables bypass; do not add a broader bypass list.
|
|
50
|
+
- Dispatch Harness release, Code release, and live certification from the exact tag ref (`refs/tags/vX.Y.Z`, `refs/tags/vX.Y.Z-rc.N`, `refs/tags/code-vX.Y.Z`, or `refs/tags/code-vX.Y.Z-rc.N`). A dispatch from `main` or any other ref is not a deployment tag, so these environments do not grant secrets or `id-token: write`. The resolver rejects that ref as well when the dispatched workflow still contains the check, including when the branch commit equals the tag.
|
|
51
|
+
- Approve a deployment only after the resolve job log shows `resolved <tag> to <sha>` and that SHA equals the workflow commit (`github.sha`).
|
|
52
|
+
- Environment patterns are coarse `fnmatch` globs. The resolver's regular expression is stricter, but it runs only when the workflow file on the dispatched ref still calls it. A ref the ruleset and the environment exclude never receives secrets or `id-token: write`, even if its workflow omits the resolver.
|
|
@@ -72,7 +72,7 @@ The terminal prints the complete `apply_patch` approval arguments rather than tr
|
|
|
72
72
|
|
|
73
73
|
`quarantine_file` requires the current digest and moves the file into harness-owned state. The result includes a `quarantineId` used for recovery. The model has no permanent-delete tool.
|
|
74
74
|
|
|
75
|
-
`restore_file`
|
|
75
|
+
`restore_file` requires a quarantine identifier, the destination path, and the expected digest of the quarantined bytes. It does not fall back to the original path or restore bytes the operator did not pin. Restore is conflict-safe: it never overwrites an existing destination. The approval preview shows that destination and the quarantined text for the pinned digest. A successful restore is recorded independently from the quarantine operation.
|
|
76
76
|
|
|
77
77
|
Quarantine is a recovery boundary, not a backup system. Retention and permanent cleanup remain operator responsibilities. Do not manually edit quarantine manifests or payloads while a run is active.
|
|
78
78
|
|
package/docs/TOOL_POLICY.md
CHANGED
|
@@ -62,7 +62,10 @@ channels without compatible review evidence receive EXPLICIT_REVIEW_REQUIRED and
|
|
|
62
62
|
leave the operation pending. The local CLI in ask mode displays a complete bounded
|
|
63
63
|
payload and issues host evidence after explicit confirmation, without cached session
|
|
64
64
|
grants. With this policy, `resume --approve` also requires interactive review;
|
|
65
|
-
noninteractive invocation remains pending.
|
|
65
|
+
noninteractive invocation remains pending. `zhivex-code web --tool-policy` applies that file only when a single
|
|
66
|
+
`--workspace` is set. More than one workspace with a shared policy is a usage
|
|
67
|
+
error, so projects cannot inherit each other's approvals. `zhivex-code project add
|
|
68
|
+
--tool-policy <path>` records a policy for that folder alone. Desktop accepts the operator-owned
|
|
66
69
|
policy through its `--tool-policy` startup argument. Its main process consumes a
|
|
67
70
|
bounded, expiring review ticket and sends the exact decision to the runtime through
|
|
68
71
|
their private process channel. The renderer cannot issue review evidence, and the
|
|
@@ -120,7 +120,7 @@ host spawn from `createHarnessMcpTools` or by buffering a never-ending `run`.
|
|
|
120
120
|
| --- | --- |
|
|
121
121
|
| Client commands run during session creation | Reject before admission; zero host/container processes and zero discovery calls. |
|
|
122
122
|
| TOCTOU, swapped image/argv or replayed admission | Digest/identity recheck at launch; receipt scope/expiry/single-use tests. |
|
|
123
|
-
| Secret/environment exfiltration | Empty inherited environment, restricted references, network denial, redacted audit
|
|
123
|
+
| Secret/environment exfiltration | Empty inherited environment, restricted references, network denial, redacted audit, and optional flagging of high-entropy or encoded strings from credential-bearing servers. Output stays untrusted data. Canary checks inside and outside the boundary. |
|
|
124
124
|
| Filesystem escape and host mutation | No bind mounts, no-follow snapshot/import rules, resource limits and reviewed publication; symlink/traversal fixtures. |
|
|
125
125
|
| Tool metadata or prompt injection escalates authority | Independent host policy and per-call approvals; untrusted descriptions/results remain data. |
|
|
126
126
|
| Hung/forking/noisy process | Absolute deadlines, frame/queue/stderr/resource bounds and whole-boundary cleanup. |
|
|
@@ -63,7 +63,8 @@
|
|
|
63
63
|
"v1.4.0-rc.7",
|
|
64
64
|
"v1.4.0-rc.8",
|
|
65
65
|
"v1.4.0",
|
|
66
|
-
"v1.4.1"
|
|
66
|
+
"v1.4.1",
|
|
67
|
+
"v1.5.0"
|
|
67
68
|
],
|
|
68
69
|
"expectedModels": [
|
|
69
70
|
{
|
|
@@ -561,6 +562,14 @@
|
|
|
561
562
|
"qwen": "qwen3.8-flash",
|
|
562
563
|
"openai": "gpt-6-luna"
|
|
563
564
|
}
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"releaseTag": "v1.5.0",
|
|
568
|
+
"models": {
|
|
569
|
+
"meta": "muse-spark-1.3-contributor",
|
|
570
|
+
"qwen": "qwen3.8-flash",
|
|
571
|
+
"openai": "gpt-6-luna"
|
|
572
|
+
}
|
|
564
573
|
}
|
|
565
574
|
],
|
|
566
575
|
"expectedCases": [
|
package/examples/README.md
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
## Isolated Bun installation
|
|
4
4
|
|
|
5
|
-
Requirements: Bun 1.4.0+, Node.js 22.13.0+, and Git on macOS or Linux. After protected stable publication, this installs the 1.
|
|
5
|
+
Requirements: Bun 1.4.0+, Node.js 22.13.0+, and Git on macOS or Linux. After protected stable publication, this installs the 1.5.0 artifact in a temporary consumer, without building the source checkout or changing global tools:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
harness_demo_dir=$(mktemp -d)
|
|
9
9
|
cd "$harness_demo_dir"
|
|
10
10
|
printf '{"name":"harness-first-run","private":true}\n' > package.json
|
|
11
|
-
bun add --exact --ignore-scripts @zhivex-ai/harness@1.
|
|
11
|
+
bun add --exact --ignore-scripts @zhivex-ai/harness@1.5.0
|
|
12
12
|
./node_modules/.bin/zhx --version
|
|
13
13
|
./node_modules/.bin/zhx --help
|
|
14
14
|
./node_modules/.bin/zhx doctor --provider openai --json
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Version must print `1.
|
|
17
|
+
Version must print `1.5.0`; help lists commands. Doctor does not contact a provider. Without `OPENAI_API_KEY`, it reports the missing credential and exits with code `3`; inspect the JSON checks before proceeding. A directory without Git initialization can also produce a diagnostic warning. No paid model call is required for these checks. Both `zhx` and `zhivex-harness` are installed aliases; Bun manages installation, and their shebang runs Node.
|
|
18
18
|
|
|
19
19
|
To continue in your actual project, use the [global installation and credential setup](../README.md#quick-start), then `zhx init --profile daily --provider openai` and `zhx doctor --profile daily`. Real tasks require the selected provider credential in the process environment. Profiles store provider/model choices, never credentials. See [CLI](../docs/CLI.md) and [support](../SUPPORT.md).
|
|
20
20
|
|
package/package.json
CHANGED