@zhivex-ai/harness 0.6.0 → 0.7.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 CHANGED
@@ -4,6 +4,59 @@ 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.7.0 - 2026-08-20
8
+
9
+ ### Added
10
+
11
+ - The short `zhx` executable while retaining `zhivex-harness` for command compatibility.
12
+ - A durable interactive console backed by a scoped SQLite session index, including session list/inspect/rename/fork/archive and `/provider`, `/model`, `/route`, `/status`, `/diff`, `/review`, `/resume`, `/compact`, `/new`, and `/rename` commands.
13
+ - A public, validated, injectable provider registry with built-in Meta, Qwen, OpenAI, and provisional Gemini registrations. Gemini uses `@zhivex-ai/gemini@0.10.4` and `gemini-3.6-flash` by default.
14
+ - Repeatable per-role model routes for explorer, implementer, tester, and reviewer subagents.
15
+ - A redacted, sequence-numbered JSON Lines stream contract through `--jsonl`.
16
+
17
+ ### Changed
18
+
19
+ - Provider/model changes in the console create a new immutable run and compact/redact portable context rather than rebinding an old provider state.
20
+ - Durable harness fingerprints now include a non-secret hash of provider endpoint/region/workspace transport configuration.
21
+ - Provider diagnostics are registry-driven and continue to expose only declared variable names and booleans.
22
+ - The final JSON schema and resolved configuration schema remain at version `1` and `4` respectively.
23
+
24
+ ### Migration from 0.6.x
25
+
26
+ - Prefer `zhx` for interactive use; existing `zhivex-harness` commands continue to work.
27
+ - Resolve or deny paused `0.6.x` approvals with the matching `0.6.x` artifact before upgrading. Harness-version binding intentionally rejects those resumes under `0.7.x`.
28
+ - Gemini is integrated but provisional until all credentialed harness live gates pass. Local tests, adapter evidence, and credential detection do not certify it.
29
+ - `--max-cost-usd` cannot be combined with per-role routes in `0.7.x`; pricing remains one operator-supplied pair and would misprice heterogeneous usage.
30
+
31
+ ### Security
32
+
33
+ - Session metadata excludes prompts/messages/tool payloads and is isolated by canonical workspace and durable scope with bounded storage and optimistic SQLite transactions.
34
+ - JSONL projection omits tool inputs/outputs, approval arguments, provider payloads, images, raw errors, and full durable states.
35
+ - Provider/model handoff is blocked while an approval is pending and strips provider-specific tool payloads from future context.
36
+
37
+ ## 0.6.1 - 2026-08-17
38
+
39
+ ### Added
40
+
41
+ - 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.
42
+ - A deterministic social-preview asset and a launch-oriented README path centered on governed repository change control.
43
+ - Structured GitHub issue forms for reproducible bugs and bounded feature requests.
44
+
45
+ ### Changed
46
+
47
+ - Repositioned the package as a governed, provider-portable runtime for coding agents instead of a generic coding-agent harness.
48
+ - Expanded npm discovery metadata and documented the verified public `0.6.0` registry/provenance baseline.
49
+ - Updated support, security, roadmap, release, and certification documentation to reflect that `0.6.0` is published.
50
+
51
+ ### Migration
52
+
53
+ - No runtime, CLI, configuration, persisted-state, or public-library contract changes are required from `0.6.0`.
54
+
55
+ ### Security
56
+
57
+ - The demo uses a disposable fixture and a decoy secret; it never reads or prints operator credentials.
58
+ - The scripted proof does not weaken approvals: environment execution and host import remain separate interruptible operations.
59
+
7
60
  ## 0.6.0 - 2026-08-17
8
61
 
9
62
  ### Added
package/README.md CHANGED
@@ -1,15 +1,51 @@
1
1
  # Zhivex Harness
2
2
 
3
- Zhivex Harness is a Bun-first coding-agent harness portable across Meta, Qwen, and OpenAI, built on the Stable `@zhivex-ai/agents` runtime.
3
+ **Governed execution for coding agents.**
4
4
 
5
- The model provides capability; the harness provides repository context, narrow tools, limits, approvals, durable state, diagnostics, and verification. Every provider uses the same agent loop and local-tool contract.
5
+ [![npm](https://img.shields.io/npm/v/%40zhivex-ai%2Fharness?logo=npm)](https://www.npmjs.com/package/@zhivex-ai/harness)
6
+ [![CI](https://github.com/Zhivex/zhivex-harness/actions/workflows/ci.yml/badge.svg)](https://github.com/Zhivex/zhivex-harness/actions/workflows/ci.yml)
7
+ [![Bun](https://img.shields.io/badge/Bun-%3E%3D1.3.7-fbf0df?logo=bun)](https://bun.sh/)
8
+ [![License](https://img.shields.io/badge/license-MIT-22c55e.svg)](./LICENSE)
6
9
 
7
- Version `0.6.0` is the enforced-execution release candidate. `0.5.0` is already public on npm; `0.6.0` remains a source candidate until its exact artifact, live-provider, tag, provenance, and registry gates complete. 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).
10
+ ![Zhivex Harness: Let agents work. Control every change.](https://raw.githubusercontent.com/Zhivex/zhivex-harness/main/assets/social-preview.png)
8
11
 
9
- ## What 0.6 includes
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, OpenAI, and provisional Gemini support, built on the Stable `@zhivex-ai/agents` runtime.
10
13
 
11
- - one-shot execution and interactive chat;
12
- - provider and model selection through the CLI;
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.7.0` is the source release candidate for the multi-provider agent console. The currently verified public npm release remains `0.6.1`; local validation does not imply that `0.7.0` has been published or live-certified. See [ROADMAP.md](./ROADMAP.md), [CHANGELOG.md](./CHANGELOG.md), the [CLI contract](./docs/CLI.md), the [extensibility guide](./docs/EXTENSIBILITY.md), and the [durable-operations guide](./docs/DURABLE_OPERATIONS.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.7 includes
44
+
45
+ - the short `zhx` command, with `zhivex-harness` retained as a compatible alias;
46
+ - one-shot execution plus a durable interactive console with named sessions, fork/archive operations, safe resume, status, diff, review, and explicit context compaction;
47
+ - an extensible provider registry, provider/model selection, provisional native Gemini support, and repeatable per-role routes such as `--route reviewer=gemini`;
48
+ - redacted, sequence-numbered `--jsonl` events for automation, while `--json` keeps the final-document contract;
13
49
  - versioned configuration and JSON output contracts;
14
50
  - a local `doctor` command that diagnoses Bun, workspace, Git, scripts, state, credentials, endpoints, and provider capabilities without making provider requests or exposing secret values;
15
51
  - deterministic, cursor-paginated workspace listing and search with SHA-256 content digests;
@@ -45,10 +81,10 @@ It does not include arbitrary host shell access, `stdio` MCP, permanent deletion
45
81
 
46
82
  ```bash
47
83
  bun add @zhivex-ai/harness
48
- bunx zhivex-harness --version
84
+ bunx --package @zhivex-ai/harness zhx --version
49
85
  ```
50
86
 
51
- To exercise the unpublished `0.6.0` source candidate:
87
+ To exercise the `0.7.0` source checkout:
52
88
 
53
89
  ```bash
54
90
  bun install --frozen-lockfile
@@ -62,28 +98,39 @@ Configure only the providers you plan to use:
62
98
  OPENAI_API_KEY=...
63
99
  MODEL_API_KEY=...
64
100
  DASHSCOPE_API_KEY=...
101
+ GEMINI_API_KEY=...
65
102
  ```
66
103
 
67
- `MODEL_API_KEY` is used by the Meta Model API. Qwen also accepts `QWEN_API_KEY`; `DASHSCOPE_API_KEY` takes precedence.
104
+ `MODEL_API_KEY` is used by the Meta Model API. Qwen also accepts `QWEN_API_KEY`; `DASHSCOPE_API_KEY` takes precedence. Gemini also accepts `GOOGLE_GENERATIVE_AI_API_KEY`.
68
105
 
69
106
  ## Diagnose the environment
70
107
 
71
108
  `doctor` is local and does not contact provider endpoints:
72
109
 
73
110
  ```bash
74
- zhivex-harness doctor
75
- zhivex-harness doctor --provider qwen --json
111
+ zhx doctor
112
+ zhx doctor --provider qwen --json
76
113
  ```
77
114
 
78
115
  For a source checkout, replace `zhivex-harness` with `bun run dev`.
79
116
 
80
117
  ## Usage
81
118
 
119
+ Start the durable console with the ergonomic command, or use the long alias in existing scripts:
120
+
121
+ ```bash
122
+ zhx
123
+ zhx chat --continue
124
+ zhivex-harness --version
125
+ ```
126
+
127
+ Inside the console, `/help` lists `/provider`, `/model`, `/route`, `/status`, `/diff`, `/review`, `/resume`, `/compact`, `/new`, `/rename`, and `/exit`.
128
+
82
129
  Show providers and detected configuration without printing secrets:
83
130
 
84
131
  ```bash
85
- zhivex-harness providers
86
- zhivex-harness providers --json
132
+ zhx providers
133
+ zhx providers --json
87
134
  ```
88
135
 
89
136
  Run a task against the current directory:
@@ -92,6 +139,7 @@ Run a task against the current directory:
92
139
  zhivex-harness run --provider openai "review the repository and fix the tests"
93
140
  zhivex-harness run --provider meta "document the current architecture"
94
141
  zhivex-harness run --provider qwen "implement the pending endpoint"
142
+ zhx run --provider gemini "review the proposed implementation"
95
143
  ```
96
144
 
97
145
  Operate on another workspace:
@@ -103,9 +151,20 @@ zhivex-harness run --provider qwen --workspace ../my-app "fix the typecheck erro
103
151
  Interactive mode:
104
152
 
105
153
  ```bash
106
- zhivex-harness chat --provider meta
154
+ zhx chat --provider meta
155
+ zhx chat --continue
156
+ zhx sessions list
157
+ ```
158
+
159
+ Route only selected subagent roles; credentials are required only for providers actually instantiated:
160
+
161
+ ```bash
162
+ zhx run --provider openai --route explorer=qwen --route reviewer=gemini \
163
+ "implement the change, then review it independently"
107
164
  ```
108
165
 
166
+ Routing with `--max-cost-usd` is rejected in `0.7.0`: aggregate usage cannot yet be priced correctly when roles use different models.
167
+
109
168
  Writes and checks pause for approval. In a non-interactive execution, state is saved in `.zhivex-harness/runs/operations.sqlite`:
110
169
 
111
170
  ```bash
@@ -151,6 +210,7 @@ Structured automation output uses schema version `1`:
151
210
 
152
211
  ```bash
153
212
  zhivex-harness run --provider qwen --json "analyze the issue without modifying files"
213
+ zhx run --provider gemini --jsonl "analyze the issue without modifying files"
154
214
  ```
155
215
 
156
216
  The JSON shapes and exit codes are documented in [docs/CLI.md](./docs/CLI.md).
@@ -180,10 +240,11 @@ zhivex-harness run --execution oci --yes "inspect, implement, test, review the e
180
240
  | Meta | `muse-spark-1.2` | `MODEL_API_KEY` · 0.6 edit, delegation, and OCI execution certified |
181
241
  | Qwen | `qwen3.8-max` | `DASHSCOPE_API_KEY` or `QWEN_API_KEY` · 0.6 edit, delegation, and OCI execution certified |
182
242
  | OpenAI | `gpt-5.4` | `OPENAI_API_KEY` · 0.6 edit, delegation, and OCI execution certified |
243
+ | Gemini | `gemini-3.6-flash` | `GEMINI_API_KEY` or `GOOGLE_GENERATIVE_AI_API_KEY` · provisional until the harness live matrix passes |
183
244
 
184
- Override any model with `--model`. Optional provider overrides are `META_BASE_URL`, `QWEN_BASE_URL`, `QWEN_WORKSPACE_ID`, `QWEN_REGION`, and `OPENAI_BASE_URL`.
245
+ Override any model with `--model`. Optional provider overrides are `META_BASE_URL`, `QWEN_BASE_URL`, `QWEN_WORKSPACE_ID`, `QWEN_REGION`, `OPENAI_BASE_URL`, and `GEMINI_BASE_URL`. Non-credential transport settings are hash-bound to durable resumes without persisting their values.
185
246
 
186
- 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.
247
+ Meta, Qwen, and OpenAI retain the published `0.6.x` support conclusion for the unchanged approval/restart, delegation/persistence, and enforced-execution paths. Controlled and official-SDK MCP interoperability are verified separately and do not imply compatibility with every server or protocol feature. Provider capability claims remain artifact- and date-bound under the [live certification contract](./docs/LIVE_CERTIFICATION.md); credential detection and deterministic tests do not replace real provider evidence.
187
248
 
188
249
  ## Security boundaries
189
250
 
@@ -224,4 +285,5 @@ The live gate is opt-in and billable:
224
285
 
225
286
  ```bash
226
287
  ZHIVEX_HARNESS_LIVE=1 bun run scripts/live-provider-smoke.ts
288
+ ZHIVEX_HARNESS_LIVE=1 bun run smoke:live:routing
227
289
  ```
package/ROADMAP.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Zhivex Harness Roadmap
2
2
 
3
3
  - Status: active
4
- - Baseline date: 2026-08-17
4
+ - Baseline date: 2026-08-20
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, `0.5.0` is published on npm, and `0.6.0` is implemented locally as the enforced-execution candidate. Publishing another immutable registry version 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.
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`, `0.6.0`, and `0.6.1` are published on npm. `0.7.0` is the source release candidate for the multi-provider agent console; publication and live certification remain separate operations. 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
 
@@ -38,7 +38,9 @@ The `0.6.0` dependency batch pins and overrides `@zhivex-ai/core@1.6.0`, retaini
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
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 | Implemented locally; certification pending | XL |
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 | Published on npm | S |
43
+ | `0.7.0` | Multi-provider agent console | Durable sessions, extensible providers, safe role routing, and automation events | Source release candidate | L |
42
44
  | `1.0.0` | Stable contract | Supported compatibility and release guarantees | Planned | L |
43
45
 
44
46
  Relative size is for sequencing only; dates require a capacity decision.
@@ -98,7 +100,7 @@ Required release evidence:
98
100
  - migration and safety boundaries are documented without claiming host isolation or permanent deletion;
99
101
  - `0.3.0` remains private until an explicit publication decision is made.
100
102
 
101
- Validation snapshot (2026-08-16):
103
+ Validation summary:
102
104
 
103
105
  - the trusted-editing implementation is merged into `main`;
104
106
  - deterministic, installed-package, and package-inspection CI gates pass on Linux and macOS;
@@ -129,7 +131,7 @@ Exit criteria:
129
131
  - Golden fixtures are deterministic and the regression gate runs in CI.
130
132
  - Exported operational artifacts are redacted by default and schema-versioned.
131
133
 
132
- Validation snapshot (2026-08-17):
134
+ Validation summary:
133
135
 
134
136
  - deterministic tests, the five-case golden evaluation gate, typecheck, docs, build, and installed-tarball smoke pass;
135
137
  - migration, idempotency, concurrent ownership, expired-lease recovery, cancellation, retention, Qwen token enforcement, and export redaction have regression coverage;
@@ -159,20 +161,19 @@ Exit criteria:
159
161
  - MCP prompt injection and oversized/malformed result tests fail safely.
160
162
  - Provider-specific limitations are recorded in a live support matrix.
161
163
 
162
- Validation snapshot (2026-08-17 UTC):
164
+ Validation summary:
163
165
 
164
166
  - deterministic tests, the seven-case golden evaluation gate, typecheck, docs, build, dependency audit, dry-run package inspection, and installed-tarball smoke pass;
165
167
  - 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-17T16:48:09.043Z`;
167
- - 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`;
168
- - 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
+ - controlled and official-SDK Streamable HTTP MCP interoperability passed over real loopback transports with session negotiation, bounded execution, and forced network approval;
169
+ - the certified provider cohort passed the separate model-directed reviewer delegation, child persistence, SQLite reopen, hierarchy, and aggregate-usage matrix;
169
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`.
170
171
 
171
172
  ## 0.6.0 — Enforced execution environments
172
173
 
173
174
  Goal: introduce shell-class capabilities only when the declared filesystem, process, network, and resource controls are real.
174
175
 
175
- Status: 0.6.0 is implemented locally. Deterministic, exact installed-artifact, real-OCI, MCP-interoperability, and all-provider live gates pass. Publication remains distinct and has not been requested or claimed.
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.
176
177
 
177
178
  Scope:
178
179
 
@@ -191,20 +192,56 @@ Exit criteria:
191
192
  - Installed-artifact and live-provider tests exercise the enforced backend.
192
193
  - The product is described as a local enforced runner, not a managed sandbox service.
193
194
 
194
- Implementation snapshot (2026-08-17):
195
+ Implementation summary:
195
196
 
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;
197
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;
198
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;
199
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;
200
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;
201
- - 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;
202
+ - the real Docker smoke passed against the pinned image identity, covering network/root/secret boundaries, capacity and resource limits, cancellation, transactional snapshot synchronization, patch import, and zero labeled orphans;
202
203
  - the installed-package smoke passed with the public execution-environment API and snapshot/import flow;
203
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;
204
- - 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`;
205
- - 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;
205
+ - the certified provider cohort passed the model-directed OCI command, patch review, separate import approval, journal, host-content, and binding matrix;
206
+ - the base approval/restart and bounded reviewer-delegation/persistence/hierarchy matrices passed against the release artifact;
206
207
  - `@zhivex-ai/core@1.6.0` resolves as one runtime through the aligned dependency batch;
207
- - publication, tag, push, provenance, and registry proof for `0.6.0` remain pending the explicit release operation.
208
+ - the annotated tag, protected publication, registry integrity, distribution tag, and SLSA workflow provenance agree with the release source.
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. The annotated `v0.6.1` tag, npm artifact, registry integrity, and provenance were subsequently verified through the protected workflow.
215
+
216
+ ## 0.7.0 — Multi-provider agent console
217
+
218
+ Status: 0.7.0 release candidate implemented in source. Deterministic and installed-artifact gates must pass before a release commit; Gemini and mixed-provider routing remain provisional until the required live validation is recorded.
219
+
220
+ Goal: turn the harness from a collection of one-shot commands into an ergonomic local agent console while preserving immutable runs and provider portability.
221
+
222
+ Scope:
223
+
224
+ - Publish the short `zhx` command while retaining `zhivex-harness` for scripts.
225
+ - Add a durable SQLite session index that links immutable runs without duplicating prompts, messages, tool payloads, or provider data.
226
+ - Add a public validated provider registry and native Gemini integration without aliasing an OpenAI-compatible transport.
227
+ - Route explorer, implementer, tester, and reviewer roles to explicit provider/model pairs.
228
+ - Add safe console commands for provider/model/routes, status, diff, review, session resume/new/rename, and deterministic redacted compaction.
229
+ - Add sequence-numbered redacted JSONL events for automation.
230
+ - Bind non-secret provider transport configuration into durable resume fingerprints.
231
+
232
+ Exit criteria:
233
+
234
+ - Registry, Gemini factory/diagnostics, sessions/reopen/fork/archive, routing, approval restart, JSONL redaction, and both CLI aliases pass deterministic and installed-package tests.
235
+ - Cross-provider handoff always starts a new run, is blocked by pending approvals, and carries no raw tool/provider payload.
236
+ - Existing `run`, `review`, `resume`, `runs`, final JSON, configuration schema, and `zhivex-harness` commands remain compatible.
237
+ - Gemini passes the base edit/restart, delegation, and OCI matrices before moving from provisional to certified.
238
+ - The exact tarball, release tag, registry integrity, and provenance are verified separately; source readiness is not publication.
239
+
240
+ Deferred after `0.7.0`:
241
+
242
+ - Per-provider/per-role cost pricing and evidence-backed routing presets.
243
+ - Additional hosted and local providers, added one by one through the same registry and certification contract.
244
+ - Remote workers or microVM backends; the current console stays local and Bun-first.
208
245
 
209
246
  ## 1.0.0 — Stable CLI and library contract
210
247
 
@@ -251,6 +288,7 @@ These can become separate post-1.0 tracks after the CLI/runtime contract and sec
251
288
 
252
289
  ## Immediate next actions
253
290
 
254
- 1. Review the diff and create a clean release commit; the readiness checker currently blocks only on the intentionally dirty worktree.
255
- 2. Continue governed MCP/delegation dogfood on representative repositories beyond the controlled and official-SDK interoperability gates.
256
- 3. Merge/push the reviewed release commit, create the annotated `v0.6.0` tag, then dispatch the protected OIDC workflow and verify registry integrity/provenance against the exact tagged artifact.
291
+ 1. Finish the `0.7.0` deterministic, real-OCI, and installed-artifact gates from a clean release commit.
292
+ 2. Complete the required live provider and mixed-routing certification; keep provisional paths provisional on any failure or missing evidence.
293
+ 3. Dogfood durable `zhx` sessions, provider handoff, role routing, and JSONL consumption on representative repositories.
294
+ 4. Only after those gates, complete the reviewed release workflow and verify registry integrity and provenance against the exact artifact.
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.x` version. Pre-release source snapshots and older private checkpoints are not supported release channels.
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.5.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).
3
+ Zhivex Harness `0.7.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). The source checkout may be a release candidate newer than the latest public npm artifact.
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.5.x` patch receives routine fixes. Live provider evidence is account-, model-, endpoint-, and date-dependent; see [docs/LIVE_CERTIFICATION.md](./docs/LIVE_CERTIFICATION.md).
13
+ Only the most recent published patch receives routine fixes. Meta, Qwen, and OpenAI retain their date-bound `0.6.x` certification; Gemini in `0.7.0` is provisional until the complete harness live matrix passes. 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
 
@@ -0,0 +1,167 @@
1
+ import type { AgentStreamEvent } from "@zhivex-ai/agents";
2
+ export declare const CLI_JSON_SCHEMA_VERSION: 1;
3
+ export declare const CLI_EVENT_SCHEMA_VERSION: 1;
4
+ export interface StreamRunResultSource {
5
+ runId: string;
6
+ status: string;
7
+ provider: string;
8
+ model: string;
9
+ steps: number;
10
+ toolCalls: number;
11
+ pendingApprovals?: readonly ({
12
+ id: string;
13
+ kind: string;
14
+ name: string;
15
+ childRunId?: string;
16
+ childAgentId?: string;
17
+ [key: string]: unknown;
18
+ })[];
19
+ children?: readonly ({
20
+ runId: string;
21
+ status: string;
22
+ [key: string]: unknown;
23
+ })[];
24
+ [key: string]: unknown;
25
+ }
26
+ /**
27
+ * Convert runtime events into a stable, line-oriented CLI contract.
28
+ *
29
+ * Tool inputs, tool outputs, provider payloads, model messages, and error text
30
+ * are deliberately omitted: they can contain repository content or secrets.
31
+ */
32
+ export declare const streamEventDocument: (event: AgentStreamEvent, sequence?: number) => {
33
+ textDelta: string;
34
+ schemaVersion: 1;
35
+ kind: "run-event";
36
+ sequence: number;
37
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
38
+ } | {
39
+ toolCallId: string;
40
+ toolName: string;
41
+ schemaVersion: 1;
42
+ kind: "run-event";
43
+ sequence: number;
44
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
45
+ } | {
46
+ toolCallId: string;
47
+ toolName: string;
48
+ isError: boolean;
49
+ schemaVersion: 1;
50
+ kind: "run-event";
51
+ sequence: number;
52
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
53
+ } | {
54
+ approvalRequestId: string;
55
+ approvalKind: "provider" | "local-tool" | "subagent";
56
+ toolName: string;
57
+ schemaVersion: 1;
58
+ kind: "run-event";
59
+ sequence: number;
60
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
61
+ } | {
62
+ approvalRequestId: string;
63
+ approved: boolean;
64
+ schemaVersion: 1;
65
+ kind: "run-event";
66
+ sequence: number;
67
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
68
+ } | {
69
+ provider: string;
70
+ schemaVersion: 1;
71
+ kind: "run-event";
72
+ sequence: number;
73
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
74
+ } | {
75
+ index?: number;
76
+ id?: string;
77
+ provider: string;
78
+ partial: boolean;
79
+ schemaVersion: 1;
80
+ kind: "run-event";
81
+ sequence: number;
82
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
83
+ } | {
84
+ usage?: import("@zhivex-ai/core").TokenUsage;
85
+ finishReason?: import("@zhivex-ai/core").FinishReason;
86
+ schemaVersion: 1;
87
+ kind: "run-event";
88
+ sequence: number;
89
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
90
+ } | {
91
+ error: string;
92
+ schemaVersion: 1;
93
+ kind: "run-event";
94
+ sequence: number;
95
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
96
+ } | {
97
+ currentStep: number;
98
+ maxSteps: number;
99
+ schemaVersion: 1;
100
+ kind: "run-event";
101
+ sequence: number;
102
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
103
+ } | {
104
+ stepIndex: number;
105
+ schemaVersion: 1;
106
+ kind: "run-event";
107
+ sequence: number;
108
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
109
+ } | {
110
+ stepIndex: number;
111
+ status: import("@zhivex-ai/core").AgentStepStatus;
112
+ toolCalls: number;
113
+ schemaVersion: 1;
114
+ kind: "run-event";
115
+ sequence: number;
116
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
117
+ } | {
118
+ compactionId: string;
119
+ reasons: import("@zhivex-ai/core").AgentCompactionReason[];
120
+ messageCountBefore: number;
121
+ messageCountAfter: number;
122
+ schemaVersion: 1;
123
+ kind: "run-event";
124
+ sequence: number;
125
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
126
+ } | {
127
+ runId: string;
128
+ status: import("@zhivex-ai/core").AgentStatus;
129
+ provider: string;
130
+ model: string;
131
+ schemaVersion: 1;
132
+ kind: "run-event";
133
+ sequence: number;
134
+ type: "text-delta" | "tool-call" | "tool-result" | "tool-approval-request" | "provider-data" | "image-generation" | "finish" | "error" | "agent-run-start" | "agent-step-start" | "agent-step-finish" | "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish";
135
+ };
136
+ export declare const serializeStreamEvent: (event: AgentStreamEvent, sequence?: number) => string;
137
+ /**
138
+ * Project the rich final JSON document onto the redacted JSONL contract.
139
+ *
140
+ * This is deliberately a whitelist. Output text, mutations, approval
141
+ * arguments, scope, paths, provider payloads, and configuration bindings can
142
+ * contain repository or operator data and must remain exclusive to the
143
+ * separate final-document contract.
144
+ */
145
+ export declare const streamResultDocument: (result: StreamRunResultSource, sequence?: number) => {
146
+ schemaVersion: 1;
147
+ kind: "run-result";
148
+ sequence: number;
149
+ runId: string;
150
+ status: string;
151
+ provider: string;
152
+ model: string;
153
+ steps: number;
154
+ toolCalls: number;
155
+ pendingApprovals: {
156
+ childAgentId?: string;
157
+ childRunId?: string;
158
+ id: string;
159
+ kind: string;
160
+ name: string;
161
+ }[];
162
+ children: {
163
+ runId: string;
164
+ status: string;
165
+ }[];
166
+ };
167
+ export declare const serializeStreamResult: (result: StreamRunResultSource, sequence?: number) => string;