@zhivex-ai/harness 0.6.0 → 0.6.1

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.
@@ -0,0 +1,97 @@
1
+ # Hostile repository demonstration
2
+
3
+ The hostile-repository demo is a reproducible product proof for the governed change path in Zhivex Harness `0.6.x`. It uses a disposable repository with malicious instructions and a decoy `.env`; it never targets the checkout from which the command is launched.
4
+
5
+ ## What it proves
6
+
7
+ One run exercises the real harness contracts in this order:
8
+
9
+ 1. create a secret-bearing hostile fixture under the operating-system temporary directory;
10
+ 2. request one allowlisted Bun command and stop at a durable `run_environment_command` approval;
11
+ 3. close and reopen the SQLite-backed harness before approving the command;
12
+ 4. verify from inside OCI that `.env` is absent and outbound network is denied;
13
+ 5. modify only the ephemeral snapshot and inspect the content- and run-bound patch;
14
+ 6. stop at a different durable `apply_environment_patch` approval while the host remains unchanged;
15
+ 7. reopen again, approve the exact patch, import it once, and inspect the redacted ledger; and
16
+ 8. create another reviewed patch, change its host target concurrently, and prove that import fails closed without overwriting the developer edit.
17
+
18
+ The model in this demo is deterministic and scripted. That keeps the proof focused on control-plane behavior rather than model quality, latency, cost, or prompt-following variance.
19
+
20
+ ## Prerequisites
21
+
22
+ - Bun 1.3.7 or newer;
23
+ - Docker or Podman running locally; and
24
+ - the configured image already present locally.
25
+
26
+ The default command uses Docker and `oven/bun:1.3.7-slim`:
27
+
28
+ ```bash
29
+ bun install --frozen-lockfile
30
+ docker pull oven/bun:1.3.7-slim
31
+ bun run build
32
+ bun run demo:hostile
33
+ ```
34
+
35
+ Use the existing OCI environment variables to select Podman, a different preloaded image, or narrower limits. The harness never pulls an image implicitly.
36
+
37
+ ## Expected evidence
38
+
39
+ Progress is written to stderr. A successful run writes one JSON document to stdout:
40
+
41
+ ```json
42
+ {
43
+ "schemaVersion": 1,
44
+ "kind": "hostile-repository-demo",
45
+ "ok": true,
46
+ "runId": "hostile-demo-approved",
47
+ "approvals": [
48
+ "run_environment_command",
49
+ "apply_environment_patch"
50
+ ],
51
+ "persistenceReopens": 2,
52
+ "secretExcluded": true,
53
+ "networkDenied": true,
54
+ "hostUnchangedUntilApprovedImport": true,
55
+ "exactlyOnceJournal": true,
56
+ "staleHostImportBlocked": true,
57
+ "redactedLedger": true
58
+ }
59
+ ```
60
+
61
+ The output also includes the immutable image digest used for the proof. Pass `--keep` to retain the disposable workspace and print its location:
62
+
63
+ ```bash
64
+ bun run demo:hostile --keep
65
+ ```
66
+
67
+ The kept directory contains only fixture data and harness-owned evidence. Remove it when inspection is complete.
68
+
69
+ ## Ninety-second recording outline
70
+
71
+ 1. Show the hostile README and decoy `.env` fixture description.
72
+ 2. Run `bun run demo:hostile`.
73
+ 3. Highlight the first command approval and SQLite reopen.
74
+ 4. Highlight `secretExcluded` and `networkDenied` from the OCI result.
75
+ 5. Show that the host file stays unchanged until the separate import approval.
76
+ 6. Highlight the completed exactly-once journal and redacted ledger.
77
+ 7. End on the rejected stale-host import and the final JSON proof.
78
+
79
+ Suggested title: **Can your coding agent survive a hostile repository?**
80
+
81
+ ## Live provider follow-up
82
+
83
+ The deterministic demo does not certify model-directed tool use. The billable live gate separately requires Meta, Qwen, and OpenAI to choose the exact OCI command, inspect the resulting patch, preserve both approvals, and import it:
84
+
85
+ ```bash
86
+ ZHIVEX_HARNESS_LIVE=1 bun run smoke:live:execution
87
+ ```
88
+
89
+ Provider evidence is date-, model-, endpoint-, account-, and credential-dependent. See [LIVE_CERTIFICATION.md](./LIVE_CERTIFICATION.md).
90
+
91
+ ## Evidence limits
92
+
93
+ - Docker/Podman containers are not virtual machines or a managed hostile-code sandbox.
94
+ - The demo proves the documented policy against its exact fixture, runtime, image, and platform; it does not prove that arbitrary untrusted code is harmless.
95
+ - A redacted operational export is a defensive boundary, not a substitute for controlling prompts, repository eligibility, or operator access.
96
+ - The demo auto-approves only after asserting the expected pending operation inside a disposable fixture. Production operators should review each approval or use `--yes` only in an intentionally disposable environment.
97
+ - Coding quality and broad task success belong to separate evaluation and live-provider gates.
@@ -127,9 +127,11 @@ The complete Meta/Qwen/OpenAI enforced-execution matrix passed together against
127
127
  | Qwen | `qwen3.8-max` | Certified | One approved OCI command, one patch inspection, one separately approved import, exact host contents, and environment binding. |
128
128
  | OpenAI | `gpt-5.4` | Certified | Responses mode persisted across both approval continuations; exact OCI tool order, host import, journal, and binding passed. |
129
129
 
130
- The base proposal/approval/process-restart matrix passed again for all three providers at `2026-08-17T16:22:34.885Z`. The reviewer-delegation/child-persistence/SQLite-reopen/hierarchy/aggregate-budget matrix passed again at `2026-08-17T16:24:14.381Z`. These refreshes cover the `0.6.0` dependency and harness candidate; they do not prove registry publication.
130
+ The base proposal/approval/process-restart matrix passed again for all three providers at `2026-08-17T16:22:34.885Z`. The reviewer-delegation/child-persistence/SQLite-reopen/hierarchy/aggregate-budget matrix passed again at `2026-08-17T16:24:14.381Z`. These refreshes cover the `0.6.0` dependency and harness artifact; registry publication is proved separately.
131
131
 
132
- The full deterministic gate then passed with 99 tests, 468 assertions, seven golden evaluations, both MCP implementations, real OCI, and installed-package smoke. The exact local 31-file tarball also passed SHA-512 inspection and isolated consumer execution. npm still reports `0.5.0` as latest and no `0.6.0` version; registry publication/provenance remain deliberately unclaimed.
132
+ The full deterministic gate then passed with 99 tests, 468 assertions, seven golden evaluations, both MCP implementations, real OCI, and installed-package smoke. The exact 31-file tarball passed SHA-512 inspection and isolated consumer execution. `@zhivex-ai/harness@0.6.0` was subsequently published through the protected OIDC workflow; on 2026-08-17 America/Argentina/Buenos_Aires, the downloaded registry tarball, `latest` tag, integrity, SLSA subject, repository, workflow, branch, and source commit were verified against `fd420f7560b2`.
133
+
134
+ `0.6.1` does not change provider, tool, approval, execution, or streaming behavior, so it inherits this date-bound provider evidence subject to the normal exact-artifact and registry release gates. Its new hostile-repository demo is deterministic control-plane evidence, not a substitute for the billable provider matrix.
133
135
 
134
136
  ## 0.3.0 private-milestone evidence
135
137
 
package/docs/RELEASE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Release process
2
2
 
3
- `@zhivex-ai/harness@0.5.0` is public on npm. `0.6.0` is implemented as the next source candidate, but publication is never performed from a development checkout. The confirmation-gated `.github/workflows/release.yml` workflow builds, inspects, transfers, and publishes one exact tarball through npm Trusted Publishing/OIDC. Creating a tag alone does not publish anything.
3
+ `@zhivex-ai/harness@0.6.0` is public on npm with exact registry integrity and SLSA workflow provenance verified against source tag `v0.6.0`. `0.6.1` is the next source candidate, but publication is never performed from a development checkout. The confirmation-gated `.github/workflows/release.yml` workflow builds, inspects, transfers, and publishes one exact tarball through npm Trusted Publishing/OIDC. Creating a tag alone does not publish anything.
4
4
 
5
5
  ## Deterministic gates
6
6
 
@@ -48,16 +48,16 @@ For a local artifact rehearsal after the source gate:
48
48
 
49
49
  ```bash
50
50
  mkdir -p release-artifacts
51
- bun pm pack --filename release-artifacts/zhivex-ai-harness-0.6.0.tgz --ignore-scripts
52
- bun run artifact:check -- release-artifacts/zhivex-ai-harness-0.6.0.tgz
53
- bun run smoke:artifact -- release-artifacts/zhivex-ai-harness-0.6.0.tgz
51
+ bun pm pack --filename release-artifacts/zhivex-ai-harness-0.6.1.tgz --ignore-scripts
52
+ bun run artifact:check -- release-artifacts/zhivex-ai-harness-0.6.1.tgz
53
+ bun run smoke:artifact -- release-artifacts/zhivex-ai-harness-0.6.1.tgz
54
54
  ```
55
55
 
56
56
  `release-artifacts/`, `.npmrc`, `.env`, source tests, Git metadata, and local run state are excluded from the package.
57
57
 
58
58
  ## External prerequisites
59
59
 
60
- Before a `0.6.0` dispatch, reverify rather than assuming the previous release state:
60
+ Before a `0.6.1` dispatch, reverify rather than assuming the previous release state:
61
61
 
62
62
  - confirm `Zhivex/zhivex-harness` remains public; npm cannot generate public provenance from a private repository;
63
63
  - enable GitHub private vulnerability reporting;
@@ -65,7 +65,7 @@ Before a `0.6.0` dispatch, reverify rather than assuming the previous release st
65
65
  - verify an npm account with 2FA still administers the public `@zhivex-ai/harness` package; and
66
66
  - confirm the npm Trusted Publisher is organization `Zhivex`, repository `zhivex-harness`, workflow `release.yml`, environment `npm`, allowed action `npm publish`.
67
67
 
68
- The one-time `0.5.0` bootstrap is complete: the package exists, Trusted Publishing is configured, and the temporary token was removed/revoked. The release workflow intentionally supplies no `NODE_AUTH_TOKEN` or npm token. Do not reintroduce one as a fallback; a failed OIDC assertion is a stop condition to diagnose.
68
+ The one-time `0.5.0` bootstrap and the protected `0.6.0` publication are complete: the package exists, Trusted Publishing is configured, and the temporary token was removed/revoked. The release workflow intentionally supplies no `NODE_AUTH_TOKEN` or npm token. Do not reintroduce one as a fallback; a failed OIDC assertion is a stop condition to diagnose.
69
69
 
70
70
  Trusted Publishing currently requires npm CLI `11.5.1` or newer and Node `22.14.0` or newer. The workflow follows npm's current Node 24 guidance and uses npm only for the OIDC/provenance-aware registry transaction; dependency management, build, tests, packing, and artifact installation remain Bun-first.
71
71
 
@@ -74,10 +74,10 @@ Trusted Publishing currently requires npm CLI `11.5.1` or newer and Node `22.14.
74
74
  After the release commit is reviewed, merged, and pushed to `main`:
75
75
 
76
76
  ```bash
77
- git tag -a v0.6.0 -m "Release v0.6.0"
78
- git push origin v0.6.0
77
+ git tag -a v0.6.1 -m "Release v0.6.1"
78
+ git push origin v0.6.1
79
79
  gh workflow run release.yml \
80
- -f tag=v0.6.0 \
80
+ -f tag=v0.6.1 \
81
81
  -f channel=latest \
82
82
  -f confirm_publication=true
83
83
  ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zhivex-ai/harness",
3
- "version": "0.6.0",
4
- "description": "Provider-portable coding agent harness powered by Zhivex AI SDK.",
3
+ "version": "0.6.1",
4
+ "description": "Governed, provider-portable runtime for coding agents with durable approvals and isolated repository execution.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -21,6 +21,14 @@
21
21
  "ai",
22
22
  "agents",
23
23
  "coding-agent",
24
+ "agent-runtime",
25
+ "agent-governance",
26
+ "sandbox",
27
+ "durable-workflows",
28
+ "mcp",
29
+ "docker",
30
+ "typescript",
31
+ "bun",
24
32
  "harness",
25
33
  "zhivex"
26
34
  ],
@@ -48,7 +56,7 @@
48
56
  "scripts": {
49
57
  "dev": "bun run src/cli.ts",
50
58
  "start": "bun run dist/cli.js",
51
- "build": "bun build ./src/index.ts ./src/cli.ts --outdir ./dist --target bun --packages external && tsc --emitDeclarationOnly",
59
+ "build": "bun build ./src/index.ts ./src/cli.ts --outdir ./dist --target bun --packages external && bun build ./scripts/hostile-repository-demo.ts --outfile ./dist/hostile-repository-demo.js --target bun --packages external && tsc --emitDeclarationOnly",
52
60
  "prepack": "bun run build",
53
61
  "docs:check": "bun run scripts/check-docs.ts",
54
62
  "typecheck": "tsc --noEmit",
@@ -62,6 +70,7 @@
62
70
  "smoke:live": "bun --env-file=.env run scripts/live-provider-smoke.ts",
63
71
  "smoke:live:orchestration": "bun --env-file=.env run scripts/live-orchestration-smoke.ts",
64
72
  "smoke:live:execution": "bun --env-file=.env run scripts/live-execution-smoke.ts",
73
+ "demo:hostile": "bun run dist/hostile-repository-demo.js",
65
74
  "artifact:check": "bun run scripts/check-release-artifact.ts",
66
75
  "pack:inspect": "bun run build && bun pm pack --dry-run --ignore-scripts",
67
76
  "check": "bun run docs:check && bun run typecheck && bun test && bun run evaluate && bun run smoke:mcp && bun run smoke:mcp:official && bun run smoke:oci && bun run smoke:package",