@zhivex-ai/harness 0.5.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.
- package/CHANGELOG.md +55 -0
- package/README.md +63 -13
- package/ROADMAP.md +38 -13
- package/SECURITY.md +1 -1
- package/SUPPORT.md +2 -2
- package/dist/cli.d.ts +32 -3
- package/dist/cli.js +1486 -47
- package/dist/config.d.ts +49 -1
- package/dist/execution-environment.d.ts +132 -0
- package/dist/harness.d.ts +15 -1
- package/dist/hostile-repository-demo.js +3981 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.js +2606 -1389
- package/dist/workspace.d.ts +10 -0
- package/docs/CLI.md +25 -4
- package/docs/DURABLE_OPERATIONS.md +16 -2
- package/docs/EXECUTION_ENVIRONMENTS.md +130 -0
- package/docs/EXTENSIBILITY.md +2 -2
- package/docs/HOSTILE_REPOSITORY_DEMO.md +97 -0
- package/docs/LIVE_CERTIFICATION.md +45 -2
- package/docs/RELEASE.md +17 -22
- package/docs/REPOSITORY_EDITING.md +3 -1
- package/package.json +22 -6
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,61 @@ 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
|
+
## 0.6.1 - 2026-08-17
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- A reproducible hostile-repository demonstration that exercises two durable approval boundaries, SQLite reopen, secret-free OCI execution, denied outbound network, separate host patch import, exactly-once journal evidence, ledger redaction, and stale-host rejection.
|
|
12
|
+
- A deterministic social-preview asset and a launch-oriented README path centered on governed repository change control.
|
|
13
|
+
- Structured GitHub issue forms for reproducible bugs and bounded feature requests.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Repositioned the package as a governed, provider-portable runtime for coding agents instead of a generic coding-agent harness.
|
|
18
|
+
- Expanded npm discovery metadata and documented the verified public `0.6.0` registry/provenance baseline.
|
|
19
|
+
- Updated support, security, roadmap, release, and certification documentation to reflect that `0.6.0` is published.
|
|
20
|
+
|
|
21
|
+
### Migration
|
|
22
|
+
|
|
23
|
+
- No runtime, CLI, configuration, persisted-state, or public-library contract changes are required from `0.6.0`.
|
|
24
|
+
|
|
25
|
+
### Security
|
|
26
|
+
|
|
27
|
+
- The demo uses a disposable fixture and a decoy secret; it never reads or prints operator credentials.
|
|
28
|
+
- The scripted proof does not weaken approvals: environment execution and host import remain separate interruptible operations.
|
|
29
|
+
|
|
30
|
+
## 0.6.0 - 2026-08-17
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- An SDK-native enforced execution environment backed by Docker or Podman, with an adapter boundary for future remote workers.
|
|
35
|
+
- Secret-free ephemeral workspace snapshots, no container network, a read-only root filesystem, non-root execution, dropped capabilities, `no-new-privileges`, bounded CPU, memory, PIDs, time, output, workspace, file, and tmpfs usage. Commands run on a quota-backed tmpfs volume and publish successful results through a frozen, validated staging copy rather than a writable host bind mount.
|
|
36
|
+
- Approved argv-only `run_environment_command`, isolated `run_check`, read-only environment status and patch inspection, and a distinct approved patch-import tool for host mutations.
|
|
37
|
+
- Image/policy/workspace/run fingerprint binding, labeled container and volume ownership, cancellation cleanup, orphan cleanup, retained audit metadata, and installed-artifact plus real-runtime smoke coverage.
|
|
38
|
+
- An execution-environment guide and OCI diagnostics in `doctor`.
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
|
|
42
|
+
- Resolved configuration uses schema version `4` and adds a discriminated `execution` policy. The default remains `none`, where generic shell is unavailable.
|
|
43
|
+
- Repository tools and subagents use the acquired snapshot while OCI execution is active. Host `git_diff` is omitted from the model tool set, and MCP is rejected before discovery rather than executing undeclared operations outside the no-network environment boundary.
|
|
44
|
+
- CLI runs persist their resolved non-secret configuration so a locator-only `resume --approve|--deny` restores the original OCI policy instead of falling back to `execution=none`.
|
|
45
|
+
- Environment patches compare, review, bind, import, and roll back file permission modes, including mode-only changes and newly created executable files.
|
|
46
|
+
- The Zhivex SDK dependency batch now resolves one `@zhivex-ai/core@1.6.0` runtime; OpenAI is updated to `0.9.5`.
|
|
47
|
+
- The release workflow is OIDC-only and runs the enforced OCI gate before packaging or live-provider certification.
|
|
48
|
+
|
|
49
|
+
### Migration
|
|
50
|
+
|
|
51
|
+
- Replace schema-version-pinned `schemaVersion: 3` configuration with `4`. Existing scoped SQLite data needs no database rewrite.
|
|
52
|
+
- Existing behavior remains available with `executionBackend: "none"` or `ZHIVEX_HARNESS_EXECUTION=none`; this does not expose shell-class tools.
|
|
53
|
+
- To enable OCI, preload the configured image and set `executionBackend: "oci"` (or `--execution oci`). Paused `0.5.x` runs cannot be silently rebound because the tool and execution fingerprints changed.
|
|
54
|
+
- Do not combine the enforced no-network OCI policy with network MCP in one run. Perform governed MCP discovery separately, or define a future policy/backend that can enforce the intended network boundary.
|
|
55
|
+
|
|
56
|
+
### Security
|
|
57
|
+
|
|
58
|
+
- Host credentials and arbitrary environment variables are not inherited by container processes; hard secret exclusions apply before snapshot creation.
|
|
59
|
+
- The harness never pulls images implicitly, never uses a shell to interpret model commands, and cleans only containers or volumes carrying its ownership label.
|
|
60
|
+
- Host changes require a content- and run-bound patch identifier plus a separate interrupt approval; stale host digests fail closed and deletions remain recoverable through quarantine.
|
|
61
|
+
|
|
7
62
|
## 0.5.0 - 2026-08-17
|
|
8
63
|
|
|
9
64
|
### Added
|
package/README.md
CHANGED
|
@@ -1,12 +1,46 @@
|
|
|
1
1
|
# Zhivex Harness
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Governed execution for coding agents.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@zhivex-ai/harness)
|
|
6
|
+
[](https://github.com/Zhivex/zhivex-harness/actions/workflows/ci.yml)
|
|
7
|
+
[](https://bun.sh/)
|
|
8
|
+
[](./LICENSE)
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+

|
|
8
11
|
|
|
9
|
-
|
|
12
|
+
Zhivex Harness runs coding agents against real repositories with conflict-safe edits, durable approvals, isolated execution, and redacted operational evidence. It is a Bun-first local CLI and TypeScript library portable across Meta, Qwen, and OpenAI, built on the Stable `@zhivex-ai/agents` runtime.
|
|
13
|
+
|
|
14
|
+
The model provides capability. The harness controls what it may inspect, execute, change, resume, and prove. Every provider uses the same bounded tool and approval contract.
|
|
15
|
+
|
|
16
|
+
Version `0.6.1` is the positioning and hostile-repository proof patch for the `0.6.x` enforced-execution line. `0.6.0` is public on npm; its exact tarball, `latest` tag, and SLSA workflow provenance were verified against source tag `v0.6.0`. See [ROADMAP.md](./ROADMAP.md), [CHANGELOG.md](./CHANGELOG.md), the [execution-environment guide](./docs/EXECUTION_ENVIRONMENTS.md), the [extensibility guide](./docs/EXTENSIBILITY.md), the [durable-operations guide](./docs/DURABLE_OPERATIONS.md), and the [trusted-editing contract](./docs/REPOSITORY_EDITING.md).
|
|
17
|
+
|
|
18
|
+
## Why Zhivex Harness
|
|
19
|
+
|
|
20
|
+
Provider choice, MCP, subagents, and containers are useful building blocks. Zhivex Harness focuses on the change-control path that connects them:
|
|
21
|
+
|
|
22
|
+
1. copy an eligible, secret-free repository snapshot into an enforced OCI environment;
|
|
23
|
+
2. execute only approved, allowlisted argv commands without host shell interpolation or container network;
|
|
24
|
+
3. inspect a content- and run-bound patch while the host workspace remains unchanged;
|
|
25
|
+
4. require a separate durable approval before importing that exact patch; and
|
|
26
|
+
5. reject the import if either the reviewed patch or the host preconditions changed.
|
|
27
|
+
|
|
28
|
+
Approvals, leases, idempotency claims, execution bindings, and exactly-once tool journals survive process restarts. Host deletions remain recoverable through quarantine, and operator exports are redacted by default.
|
|
29
|
+
|
|
30
|
+
## Prove the boundary in five minutes
|
|
31
|
+
|
|
32
|
+
The hostile-repository demo creates a disposable fixture containing malicious instructions and a decoy `.env`, then exercises the real OCI, approval, restart, patch-import, ledger, and stale-host boundaries:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
bun install --frozen-lockfile
|
|
36
|
+
docker pull oven/bun:1.3.7-slim
|
|
37
|
+
bun run build
|
|
38
|
+
bun run demo:hostile
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The expected result is a schema-versioned JSON proof with `secretExcluded`, `networkDenied`, `exactlyOnceJournal`, and `staleHostImportBlocked` all set to `true`. Pass `--keep` to retain the disposable workspace for inspection. The complete scenario and evidence limits are documented in [docs/HOSTILE_REPOSITORY_DEMO.md](./docs/HOSTILE_REPOSITORY_DEMO.md).
|
|
42
|
+
|
|
43
|
+
## What 0.6 includes
|
|
10
44
|
|
|
11
45
|
- one-shot execution and interactive chat;
|
|
12
46
|
- provider and model selection through the CLI;
|
|
@@ -26,27 +60,29 @@ Version `0.5.0` is a publication-ready extensibility-and-orchestration candidate
|
|
|
26
60
|
- governed MCP over bounded HTTPS/loopback HTTP with explicit server/tool allowlists, permissions, timeouts, approvals, output limits, and environment-backed credentials;
|
|
27
61
|
- named explorer, implementer, tester, and reviewer subagents with independent durable budgets and promoted approvals;
|
|
28
62
|
- deterministic application-owned parallel read-only review groups with child progress, hierarchy, usage, and cost evidence;
|
|
63
|
+
- optional enforced Docker/Podman execution with no container network, a read-only root filesystem, non-root execution, dropped capabilities, bounded CPU/memory/PIDs/time/output, and an ephemeral secret-free workspace snapshot;
|
|
64
|
+
- argv-only allowlisted environment commands, isolated package checks, deterministic patch inspection, and a separate durable approval before importing changes into the host workspace;
|
|
65
|
+
- environment/image/policy fingerprint binding, cancellation cleanup, labeled orphan cleanup, retained audit artifacts, and installed-package plus real-runtime smoke gates;
|
|
29
66
|
- protection against path traversal, symlink escapes, unsafe state targets, secret-file reads, special files, concurrent non-overwrite races, and unbounded output;
|
|
30
67
|
- Linux/macOS CI, installed-tarball smoke coverage, and opt-in live-provider certification.
|
|
31
68
|
|
|
32
|
-
It does not include arbitrary shell access, `stdio` MCP, permanent deletion, Git writes, a desktop UI,
|
|
69
|
+
It does not include arbitrary host shell access, `stdio` MCP, permanent deletion, Git writes, a desktop UI, a remote worker, or a managed sandbox service. Without `--execution oci`, shell-class tools remain unavailable. With OCI enabled, repository tools, checks, and enabled subagents share the acquired snapshot; network MCP is rejected because it cannot truthfully satisfy the no-network execution policy.
|
|
33
70
|
|
|
34
71
|
## Requirements
|
|
35
72
|
|
|
36
73
|
- Bun 1.3.7 or newer.
|
|
37
74
|
- Git for repository status and diff inspection.
|
|
38
75
|
- At least one supported provider credential for real model execution.
|
|
76
|
+
- Docker or Podman plus a preloaded image when `--execution oci` is requested.
|
|
39
77
|
|
|
40
78
|
## Installation
|
|
41
79
|
|
|
42
|
-
After `0.5.0` is published to npm:
|
|
43
|
-
|
|
44
80
|
```bash
|
|
45
81
|
bun add @zhivex-ai/harness
|
|
46
82
|
bunx zhivex-harness --version
|
|
47
83
|
```
|
|
48
84
|
|
|
49
|
-
|
|
85
|
+
To exercise the `0.6.1` source checkout:
|
|
50
86
|
|
|
51
87
|
```bash
|
|
52
88
|
bun install --frozen-lockfile
|
|
@@ -161,17 +197,27 @@ The default check allowlist is `test`, `typecheck`, `lint`, and `build`. Replace
|
|
|
161
197
|
zhivex-harness run --allow-check test:unit --allow-check format "apply the fix and validate it"
|
|
162
198
|
```
|
|
163
199
|
|
|
200
|
+
Enable enforced local execution explicitly. The image must already exist locally; the harness never pulls it implicitly:
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
docker pull oven/bun:1.3.7-slim
|
|
204
|
+
zhivex-harness doctor --execution oci
|
|
205
|
+
zhivex-harness run --execution oci --yes "inspect, implement, test, review the environment patch, and import it"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
`--yes` approves both command execution and the distinct host patch import. Omit it when a human should review each durable approval. Configuration, threat boundary, cleanup, and certification details are in [docs/EXECUTION_ENVIRONMENTS.md](./docs/EXECUTION_ENVIRONMENTS.md).
|
|
209
|
+
|
|
164
210
|
## Providers and defaults
|
|
165
211
|
|
|
166
212
|
| Provider | Default model | Current support |
|
|
167
213
|
| --- | --- | --- |
|
|
168
|
-
| Meta | `muse-spark-1.2` | `MODEL_API_KEY` · 0.
|
|
169
|
-
| Qwen | `qwen3.8-max` | `DASHSCOPE_API_KEY` or `QWEN_API_KEY` · 0.
|
|
170
|
-
| OpenAI | `gpt-5.4` | `OPENAI_API_KEY` · 0.
|
|
214
|
+
| Meta | `muse-spark-1.2` | `MODEL_API_KEY` · 0.6 edit, delegation, and OCI execution certified |
|
|
215
|
+
| Qwen | `qwen3.8-max` | `DASHSCOPE_API_KEY` or `QWEN_API_KEY` · 0.6 edit, delegation, and OCI execution certified |
|
|
216
|
+
| OpenAI | `gpt-5.4` | `OPENAI_API_KEY` · 0.6 edit, delegation, and OCI execution certified |
|
|
171
217
|
|
|
172
218
|
Override any model with `--model`. Optional provider overrides are `META_BASE_URL`, `QWEN_BASE_URL`, `QWEN_WORKSPACE_ID`, `QWEN_REGION`, and `OPENAI_BASE_URL`.
|
|
173
219
|
|
|
174
|
-
Meta, Qwen, and OpenAI completed the 0.
|
|
220
|
+
Meta, Qwen, and OpenAI completed the final `0.6.0` model-directed OCI command/review/import matrix together at `2026-08-17T16:49:12.975Z`, the proposal/approval/restart refresh at `2026-08-17T16:22:34.885Z`, and the delegation/persistence/hierarchy refresh at `2026-08-17T16:24:14.381Z`. Controlled Streamable HTTP MCP interoperability over a real loopback server passed at `2026-08-17T16:48:09.043Z`; independent interoperability with `@modelcontextprotocol/server@2.0.0` passed at `2026-08-17T16:48:09.141Z` in its legacy-stateless compatibility mode. These results do not imply compatibility with every server or protocol feature. Provider capability claims are date-bound by the [live certification gate](./docs/LIVE_CERTIFICATION.md); credential detection and deterministic tests do not replace real provider evidence.
|
|
175
221
|
|
|
176
222
|
## Security boundaries
|
|
177
223
|
|
|
@@ -189,8 +235,12 @@ Meta, Qwen, and OpenAI completed the 0.4 proposal, scoped-SQLite approval, proce
|
|
|
189
235
|
- Remote MCP output is bounded, schema-checked, treated as untrusted, and rejected on common prompt-injection directives.
|
|
190
236
|
- Network MCP always pauses for approval; custom read-only annotation trust must be explicit and injected by the host application.
|
|
191
237
|
- Subagent children inherit scope, workspace, cancellation, approval, and store policy while retaining independent budgets and fingerprints.
|
|
238
|
+
- OCI execution binds the durable run to the resolved image identity and enforced policy; resume fails if either changes.
|
|
239
|
+
- Snapshot discovery excludes secrets, Git internals, harness state, dependency trees, and build output. Dependencies may be mounted separately read-only.
|
|
240
|
+
- Untrusted commands receive a quota-backed tmpfs workspace, never a writable host bind; only successful, frozen, validated snapshots replace durable environment state.
|
|
241
|
+
- Container processes receive no provider credentials or arbitrary host environment values, and host changes require a separately approved digest-bound patch import.
|
|
192
242
|
|
|
193
|
-
|
|
243
|
+
The default `none` backend provides governance but no OS isolation and therefore exposes no shell-class tool. The local OCI backend enforces the documented container boundary, but it is not a VM or a managed hostile-code sandbox; use a dedicated host or microVM when the container runtime itself is outside the threat model.
|
|
194
244
|
|
|
195
245
|
## Development
|
|
196
246
|
|
package/ROADMAP.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Zhivex Harness Roadmap
|
|
2
2
|
|
|
3
3
|
- Status: active
|
|
4
|
-
- Baseline date: 2026-08-
|
|
4
|
+
- Baseline date: 2026-08-17
|
|
5
5
|
|
|
6
|
-
This roadmap takes the harness from its `0.1.0` MVP to a stable CLI and library contract. The `0.2.0` source baseline is tagged locally, `0.3.0` and `0.4.0` are private checkpoints, and `0.5.0` is
|
|
6
|
+
This roadmap takes the harness from its `0.1.0` MVP to a stable CLI and library contract. The `0.2.0` source baseline is tagged locally, `0.3.0` and `0.4.0` are private checkpoints, and `0.5.0` plus `0.6.0` are published on npm. `0.6.1` is the local positioning and hostile-repository proof patch; publishing it remains a separate explicit operation. Releases are ordered by dependency and safety risk, not by calendar date. A version ships only when its exit criteria are satisfied.
|
|
7
7
|
|
|
8
8
|
## Planning principles
|
|
9
9
|
|
|
@@ -26,9 +26,9 @@ The tagged source baseline provides:
|
|
|
26
26
|
- durable file-backed runs and approval resume;
|
|
27
27
|
- path traversal, external symlink, secret-file, size, output, step, and timeout guards.
|
|
28
28
|
|
|
29
|
-
The deterministic baseline, TypeScript typechecking, dependency-externalized build, package inspection, and installed-tarball smoke are implemented. The package
|
|
29
|
+
The deterministic baseline, TypeScript typechecking, dependency-externalized build, package inspection, and installed-tarball smoke are implemented. The package has public MIT metadata, CI, changelog, CLI/config schema versioning, `doctor`, and negative security regressions. All three provider credentials are configured locally without being exposed by diagnostics. Live certification is date-bound and recorded separately; each later publication and provenance verification remains an external release operation.
|
|
30
30
|
|
|
31
|
-
The
|
|
31
|
+
The `0.6.0` dependency batch pins and overrides `@zhivex-ai/core@1.6.0`, retaining `@zhivex-ai/agents@1.2.0`, Meta `0.2.1`, Qwen `0.10.1`, and updating OpenAI to `0.9.5`. The Bun lockfile resolves one core runtime rather than duplicating SDK contract identities.
|
|
32
32
|
|
|
33
33
|
## Release sequence
|
|
34
34
|
|
|
@@ -37,8 +37,9 @@ The release candidate keeps `@zhivex-ai/core@1.5.0`. Although `1.6.0` is publish
|
|
|
37
37
|
| `0.2.0` | Releasable foundation | A versioned, installable, diagnosable CLI | Local release baseline | M |
|
|
38
38
|
| `0.3.0` | Trusted repository editing | Reviewable and recoverable multi-file changes | Private checkpoint | M |
|
|
39
39
|
| `0.4.0` | Durable operations | Inspectable, budgeted, cancellable, evaluable runs | Private checkpoint | L |
|
|
40
|
-
| `0.5.0` | Extensibility and orchestration | Governed MCP and bounded multi-agent work |
|
|
41
|
-
| `0.6.0` | Enforced execution | Shell and checks inside a real isolation boundary |
|
|
40
|
+
| `0.5.0` | Extensibility and orchestration | Governed MCP and bounded multi-agent work | Published on npm | L |
|
|
41
|
+
| `0.6.0` | Enforced execution | Shell and checks inside a real isolation boundary | Published on npm | XL |
|
|
42
|
+
| `0.6.1` | Positioning and proof | Reproducible hostile-repository control evidence | Implemented locally | S |
|
|
42
43
|
| `1.0.0` | Stable contract | Supported compatibility and release guarantees | Planned | L |
|
|
43
44
|
|
|
44
45
|
Relative size is for sequencing only; dates require a capacity decision.
|
|
@@ -140,7 +141,7 @@ Validation snapshot (2026-08-17):
|
|
|
140
141
|
|
|
141
142
|
Goal: support larger tasks through governed external tools and bounded delegation without weakening workspace policy.
|
|
142
143
|
|
|
143
|
-
Status:
|
|
144
|
+
Status: published on npm. Configuration, migration, MCP, and orchestration contracts live in [docs/EXTENSIBILITY.md](./docs/EXTENSIBILITY.md). Its Trusted Publisher/OIDC release path is the baseline for later immutable versions.
|
|
144
145
|
|
|
145
146
|
Scope:
|
|
146
147
|
|
|
@@ -163,14 +164,17 @@ Validation snapshot (2026-08-17 UTC):
|
|
|
163
164
|
|
|
164
165
|
- deterministic tests, the seven-case golden evaluation gate, typecheck, docs, build, dependency audit, dry-run package inspection, and installed-tarball smoke pass;
|
|
165
166
|
- malformed MCP, HTTP handshake/session, injection/output bounds, approval/restart, child mutation exactly-once, cancellation, scoped hierarchy, aggregate budget, and parallel review have regression coverage;
|
|
166
|
-
- controlled Streamable HTTP MCP interoperability passed over a real loopback server with session negotiation, JSON and SSE responses, tool discovery, bounded execution, and forced network approval at `2026-08-
|
|
167
|
+
- controlled Streamable HTTP MCP interoperability passed over a real loopback server with session negotiation, JSON and SSE responses, tool discovery, bounded execution, and forced network approval at `2026-08-17T16:48:09.043Z`;
|
|
168
|
+
- independent interoperability with `@modelcontextprotocol/server@2.0.0` passed over loopback in its documented `2025-06-18` legacy-stateless compatibility mode at `2026-08-17T16:48:09.141Z`;
|
|
167
169
|
- Meta `muse-spark-1.2`, Qwen `qwen3.8-max`, and OpenAI `gpt-5.4` passed the separate model-directed reviewer delegation, child persistence, SQLite reopen, hierarchy, and aggregate-usage matrix at `2026-08-17T02:21:45.553Z`;
|
|
168
|
-
- exact
|
|
170
|
+
- the exact `0.5.0` artifact was published and its post-publication registry/provenance verification completed; that evidence does not pre-certify `0.6.0`.
|
|
169
171
|
|
|
170
172
|
## 0.6.0 — Enforced execution environments
|
|
171
173
|
|
|
172
174
|
Goal: introduce shell-class capabilities only when the declared filesystem, process, network, and resource controls are real.
|
|
173
175
|
|
|
176
|
+
Status: 0.6.0 is published on npm. Deterministic, exact installed-artifact, real-OCI, MCP-interoperability, all-provider live, registry-integrity, and SLSA provenance gates passed.
|
|
177
|
+
|
|
174
178
|
Scope:
|
|
175
179
|
|
|
176
180
|
- Implement the SDK execution-environment contract for a local OCI/container backend, with an adapter boundary for future remote workers.
|
|
@@ -188,6 +192,27 @@ Exit criteria:
|
|
|
188
192
|
- Installed-artifact and live-provider tests exercise the enforced backend.
|
|
189
193
|
- The product is described as a local enforced runner, not a managed sandbox service.
|
|
190
194
|
|
|
195
|
+
Implementation snapshot (2026-08-17):
|
|
196
|
+
|
|
197
|
+
- the SDK execution-environment contract is implemented with a Docker/Podman adapter, immutable image identity, per-tool-call isolation, manifest authorization, and run fingerprint binding;
|
|
198
|
+
- the enforced policy denies network and undeclared tools, uses a non-root identity, read-only root, dropped capabilities, no-new-privileges, and bounded memory, CPU, PIDs, time, output, snapshot, imported-file, and tmpfs resources;
|
|
199
|
+
- repository tools and subagents share an ephemeral secret-free snapshot; package checks and argv-only commands run inside OCI, while network MCP fails closed under the no-network policy;
|
|
200
|
+
- content- and run-bound patch inspection plus a separate durable import approval are the only environment-to-host mutation path; deletes remain recoverable through quarantine;
|
|
201
|
+
- lifecycle metadata, cancellation removal, run-labeled container and quota-volume cleanup, terminal artifact retention cleanup, deterministic regression tests, installed-package smoke, and required Linux OCI workflow gates are implemented;
|
|
202
|
+
- the real Docker smoke passed again at `2026-08-17T16:48Z` against Docker `29.7.2` and the pinned Bun image digest, covering network/root/secret boundaries, total-workspace and per-file capacity, read-only dependency reuse, memory/PID/output limits, cancellation, transactional snapshot synchronization, patch import, and zero labeled orphans;
|
|
203
|
+
- the installed-package smoke passed with the public execution-environment API and snapshot/import flow;
|
|
204
|
+
- the exact local `0.6.0` tarball passed the 31-file allowlist, SHA-512 generation, isolated consumer install, binary, public API, durability, and execution-environment smoke;
|
|
205
|
+
- Meta, Qwen, and OpenAI passed the final model-directed OCI command, patch review, separate import approval, journal, host-content, and binding matrix together at `2026-08-17T16:49:12.975Z`;
|
|
206
|
+
- the base approval/restart matrix and bounded reviewer-delegation/persistence/hierarchy matrix passed again at `2026-08-17T16:22:34.885Z` and `2026-08-17T16:24:14.381Z` respectively;
|
|
207
|
+
- `@zhivex-ai/core@1.6.0` resolves as one runtime through the aligned dependency batch;
|
|
208
|
+
- annotated tag `v0.6.0`, push, protected OIDC publication, exact registry integrity, the `latest` distribution tag, and SLSA workflow provenance agree with source commit `fd420f7560b2`.
|
|
209
|
+
|
|
210
|
+
### 0.6.1 positioning patch
|
|
211
|
+
|
|
212
|
+
`0.6.1` keeps the `0.6.0` runtime, CLI, configuration, state, and library contracts unchanged. It adds a launch-oriented package description, expanded discovery metadata, a deterministic social card, structured issue forms, and a hostile-repository demo that exposes the existing safety chain as one reproducible product proof.
|
|
213
|
+
|
|
214
|
+
Its deterministic demo test uses an injected OCI adapter. The public `bun run demo:hostile` command uses a real preloaded Docker/Podman image and proves secret exclusion, network denial, two durable approvals across persistence reopen, host immutability before import, exactly-once journal evidence, redacted inspection, and stale-host rejection. Publication, a `v0.6.1` tag, registry integrity, and provenance are not claimed until the normal protected release workflow completes.
|
|
215
|
+
|
|
191
216
|
## 1.0.0 — Stable CLI and library contract
|
|
192
217
|
|
|
193
218
|
Goal: freeze a supportable public contract after the pre-1.0 safety and operational surfaces have been exercised in real repositories.
|
|
@@ -233,7 +258,7 @@ These can become separate post-1.0 tracks after the CLI/runtime contract and sec
|
|
|
233
258
|
|
|
234
259
|
## Immediate next actions
|
|
235
260
|
|
|
236
|
-
1.
|
|
237
|
-
2.
|
|
238
|
-
3.
|
|
239
|
-
4.
|
|
261
|
+
1. Review the `0.6.1` positioning/demo diff and run the full deterministic, real-OCI, and installed-artifact gates.
|
|
262
|
+
2. Record the hostile-repository demo and publish the exact evidence output with the release notes.
|
|
263
|
+
3. Merge/push the reviewed release commit, create the annotated `v0.6.1` tag, then dispatch the protected OIDC workflow and verify registry integrity/provenance against the exact tagged artifact.
|
|
264
|
+
4. Continue governed MCP/delegation dogfood on representative repositories beyond the controlled and official-SDK interoperability gates.
|
package/SECURITY.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Supported versions
|
|
4
4
|
|
|
5
|
-
Security fixes are provided for the latest published `0.
|
|
5
|
+
Security fixes are provided for the latest published `0.6.x` version. Pre-release source snapshots and older private checkpoints are not supported release channels.
|
|
6
6
|
|
|
7
7
|
## Reporting a vulnerability
|
|
8
8
|
|
package/SUPPORT.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Support
|
|
2
2
|
|
|
3
|
-
Zhivex Harness `0.
|
|
3
|
+
Zhivex Harness `0.6.x` is a pre-1.0 CLI and TypeScript library for Bun. Observable contracts may change in a later minor release when the change and migration path are documented in [CHANGELOG.md](./CHANGELOG.md).
|
|
4
4
|
|
|
5
5
|
## Supported baseline
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ Zhivex Harness `0.5.x` is a pre-1.0 CLI and TypeScript library for Bun. Observab
|
|
|
10
10
|
- the provider/model combinations marked certified in the package documentation; and
|
|
11
11
|
- HTTPS or explicitly allowed loopback-HTTP MCP endpoints using the documented bounded JSON-RPC subset.
|
|
12
12
|
|
|
13
|
-
Only the most recent published `0.
|
|
13
|
+
Only the most recent published `0.6.x` patch receives routine fixes. Live provider evidence is account-, model-, endpoint-, and date-dependent; see [docs/LIVE_CERTIFICATION.md](./docs/LIVE_CERTIFICATION.md).
|
|
14
14
|
|
|
15
15
|
## Support channels
|
|
16
16
|
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import { type AgentApprovalRequest, type AgentRunOutput, type AgentStatus } from "@zhivex-ai/agents";
|
|
3
|
-
import { providerAvailability, resolveHarnessConfig, type HarnessProvider, type HarnessSubagentProfile } from "./config.js";
|
|
2
|
+
import { type AgentApprovalRequest, type AgentRunInput, type AgentRunOutput, type AgentRunState, type AgentStatus } from "@zhivex-ai/agents";
|
|
3
|
+
import { providerAvailability, resolveHarnessConfig, type HarnessConfig, type HarnessConfigInput, type HarnessProvider, type HarnessSubagentProfile } from "./config.js";
|
|
4
4
|
import { type ZhivexHarness } from "./harness.js";
|
|
5
|
+
import { type HarnessOciRuntimeAdapter } from "./execution-environment.js";
|
|
5
6
|
export declare const CLI_JSON_SCHEMA_VERSION: 1;
|
|
7
|
+
export declare const HARNESS_RESUME_METADATA_KEY: "zhivexHarnessResume";
|
|
8
|
+
export declare const HARNESS_RESUME_METADATA_SCHEMA_VERSION: 1;
|
|
6
9
|
export declare const CLI_EXIT_CODES: {
|
|
7
10
|
readonly success: 0;
|
|
8
11
|
readonly runtimeError: 1;
|
|
@@ -43,6 +46,18 @@ export interface CliOptions {
|
|
|
43
46
|
subagentMaxTotalTokens?: number;
|
|
44
47
|
subagentTimeoutMs?: number;
|
|
45
48
|
maxParallelReviews?: number;
|
|
49
|
+
executionBackend?: string;
|
|
50
|
+
ociRuntime?: string;
|
|
51
|
+
ociImage?: string;
|
|
52
|
+
ociAllowedCommands?: string[];
|
|
53
|
+
ociMaxProcessRuntimeMs?: number;
|
|
54
|
+
ociMaxProcessOutputBytes?: number;
|
|
55
|
+
ociMaxMemoryMb?: number;
|
|
56
|
+
ociMaxPids?: number;
|
|
57
|
+
ociMaxCpus?: number;
|
|
58
|
+
ociMaxWorkspaceBytes?: number;
|
|
59
|
+
ociMaxFileWriteBytes?: number;
|
|
60
|
+
ociTmpfsMb?: number;
|
|
46
61
|
mcpConfigPath?: string;
|
|
47
62
|
prompt?: string;
|
|
48
63
|
runId?: string;
|
|
@@ -62,6 +77,9 @@ export interface CliOptions {
|
|
|
62
77
|
export declare class CliUsageError extends Error {
|
|
63
78
|
constructor(message: string);
|
|
64
79
|
}
|
|
80
|
+
export declare const createHarnessResumeMetadata: (config: HarnessConfig) => NonNullable<AgentRunInput["metadata"]>;
|
|
81
|
+
export declare const readHarnessResumeConfig: (state: Pick<AgentRunState, "metadata">) => HarnessConfigInput | undefined;
|
|
82
|
+
export declare const resumeCommand: (runId: string, config: HarnessConfig, approve?: boolean) => string;
|
|
65
83
|
export declare const parseCliArgs: (argv: string[]) => CliOptions;
|
|
66
84
|
export declare const summarizeApproval: (approval: AgentApprovalRequest) => string;
|
|
67
85
|
export declare const runResultDocument: (result: AgentRunOutput, harness: ZhivexHarness) => {
|
|
@@ -72,6 +90,15 @@ export declare const runResultDocument: (result: AgentRunOutput, harness: Zhivex
|
|
|
72
90
|
childBudget: import("./config.js").HarnessBudget;
|
|
73
91
|
mcpServers: string[];
|
|
74
92
|
};
|
|
93
|
+
execution: {
|
|
94
|
+
backend: "oci";
|
|
95
|
+
binding: import("@zhivex-ai/core").AgentExecutionEnvironmentBinding | undefined;
|
|
96
|
+
image: import("./execution-environment.js").OciImageInspection;
|
|
97
|
+
} | {
|
|
98
|
+
backend: "none";
|
|
99
|
+
binding?: never;
|
|
100
|
+
image?: never;
|
|
101
|
+
};
|
|
75
102
|
store: {
|
|
76
103
|
backend: "sqlite" | "file";
|
|
77
104
|
stateDirectory: string;
|
|
@@ -175,6 +202,7 @@ export interface DoctorReport {
|
|
|
175
202
|
allowedChecks: readonly string[];
|
|
176
203
|
requiredCapabilities: ReturnType<typeof resolveHarnessConfig>["requiredCapabilities"];
|
|
177
204
|
orchestration: ReturnType<typeof resolveHarnessConfig>["orchestration"];
|
|
205
|
+
execution: ReturnType<typeof resolveHarnessConfig>["execution"];
|
|
178
206
|
mcpConfigPath?: string;
|
|
179
207
|
};
|
|
180
208
|
checks: DoctorCheck[];
|
|
@@ -183,8 +211,9 @@ export interface DoctorReport {
|
|
|
183
211
|
export interface DoctorContext {
|
|
184
212
|
env?: NodeJS.ProcessEnv;
|
|
185
213
|
bunVersion?: string;
|
|
214
|
+
ociRuntimeAdapter?: HarnessOciRuntimeAdapter;
|
|
186
215
|
}
|
|
187
|
-
export declare const createDoctorReport: (options?: Pick<CliOptions, "provider" | "model" | "workspace" | "stateDirectory" | "storeBackend" | "tenantId" | "userId" | "namespace" | "maxSteps" | "timeoutMs" | "maxToolCalls" | "maxToolErrors" | "maxInputTokens" | "maxOutputTokens" | "maxTotalTokens" | "maxCostUsd" | "inputCostPerMillion" | "outputCostPerMillion" | "allowedChecks" | "requiredCapabilities" | "subagentProfiles" | "subagentMaxSteps" | "subagentMaxToolCalls" | "subagentMaxToolErrors" | "subagentMaxInputTokens" | "subagentMaxOutputTokens" | "subagentMaxTotalTokens" | "subagentTimeoutMs" | "maxParallelReviews" | "mcpConfigPath">, context?: DoctorContext) => Promise<DoctorReport>;
|
|
216
|
+
export declare const createDoctorReport: (options?: Pick<CliOptions, "provider" | "model" | "workspace" | "stateDirectory" | "storeBackend" | "tenantId" | "userId" | "namespace" | "maxSteps" | "timeoutMs" | "maxToolCalls" | "maxToolErrors" | "maxInputTokens" | "maxOutputTokens" | "maxTotalTokens" | "maxCostUsd" | "inputCostPerMillion" | "outputCostPerMillion" | "allowedChecks" | "requiredCapabilities" | "subagentProfiles" | "subagentMaxSteps" | "subagentMaxToolCalls" | "subagentMaxToolErrors" | "subagentMaxInputTokens" | "subagentMaxOutputTokens" | "subagentMaxTotalTokens" | "subagentTimeoutMs" | "maxParallelReviews" | "executionBackend" | "ociRuntime" | "ociImage" | "ociAllowedCommands" | "ociMaxProcessRuntimeMs" | "ociMaxProcessOutputBytes" | "ociMaxMemoryMb" | "ociMaxPids" | "ociMaxCpus" | "ociMaxWorkspaceBytes" | "ociMaxFileWriteBytes" | "ociTmpfsMb" | "mcpConfigPath">, context?: DoctorContext) => Promise<DoctorReport>;
|
|
188
217
|
export declare const formatDoctorReport: (report: DoctorReport) => string;
|
|
189
218
|
export declare const cliExitCodeForError: (error: unknown) => 2 | 1;
|
|
190
219
|
export declare const main: (argv?: string[]) => Promise<void>;
|