@zhivex-ai/harness 0.6.1 → 0.8.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,49 @@ 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.8.0 - 2026-08-20
8
+
9
+ ### Changed
10
+
11
+ - The coordinated SDK dependency batch now resolves one `@zhivex-ai/core@1.7.0` runtime with Agents `1.2.0`, Meta `0.2.2`, Qwen `0.10.2`, OpenAI `0.9.6`, and Gemini `0.10.5`.
12
+ - Approval instructions now tell models to call the gated tool with reviewed arguments so the runtime can pause, instead of asking the operator for approval in prose before emitting the tool call.
13
+ - OpenAI is now GPT-5.6-first, defaults to `gpt-5.6-luna`, and exposes `gpt-5.6-terra` and `gpt-5.6-sol` as explicit model choices. All three passed the local base certification gate, while unpublished worktree evidence remains separate from release certification.
14
+
15
+ ### Migration from 0.7.x
16
+
17
+ - OpenAI runs without an explicit `--model` now resolve to `gpt-5.6-luna` instead of `gpt-5.4`. Pin the prior model explicitly before upgrading if a workflow depends on it; GPT-5.6 availability remains organization-dependent during limited preview.
18
+ - Resolve or deny paused `0.7.x` approvals with the matching `0.7.x` artifact before upgrading. Harness-version binding intentionally rejects those resumes under `0.8.x`.
19
+
20
+ ## 0.7.0 - 2026-08-20
21
+
22
+ ### Added
23
+
24
+ - The short `zhx` executable while retaining `zhivex-harness` for command compatibility.
25
+ - 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.
26
+ - 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.
27
+ - Repeatable per-role model routes for explorer, implementer, tester, and reviewer subagents.
28
+ - A redacted, sequence-numbered JSON Lines stream contract through `--jsonl`.
29
+
30
+ ### Changed
31
+
32
+ - Provider/model changes in the console create a new immutable run and compact/redact portable context rather than rebinding an old provider state.
33
+ - Durable harness fingerprints now include a non-secret hash of provider endpoint/region/workspace transport configuration.
34
+ - Provider diagnostics are registry-driven and continue to expose only declared variable names and booleans.
35
+ - The final JSON schema and resolved configuration schema remain at version `1` and `4` respectively.
36
+
37
+ ### Migration from 0.6.x
38
+
39
+ - Prefer `zhx` for interactive use; existing `zhivex-harness` commands continue to work.
40
+ - 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`.
41
+ - Gemini is integrated but provisional until all credentialed harness live gates pass. Local tests, adapter evidence, and credential detection do not certify it.
42
+ - `--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.
43
+
44
+ ### Security
45
+
46
+ - Session metadata excludes prompts/messages/tool payloads and is isolated by canonical workspace and durable scope with bounded storage and optimistic SQLite transactions.
47
+ - JSONL projection omits tool inputs/outputs, approval arguments, provider payloads, images, raw errors, and full durable states.
48
+ - Provider/model handoff is blocked while an approval is pending and strips provider-specific tool payloads from future context.
49
+
7
50
  ## 0.6.1 - 2026-08-17
8
51
 
9
52
  ### Added
package/README.md CHANGED
@@ -9,11 +9,11 @@
9
9
 
10
10
  ![Zhivex Harness: Let agents work. Control every change.](https://raw.githubusercontent.com/Zhivex/zhivex-harness/main/assets/social-preview.png)
11
11
 
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.
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.
13
13
 
14
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
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).
16
+ Version `0.8.0` is the source release candidate for the coordinated SDK refresh and GPT-5.6-first OpenAI integration. The latest public npm release is `0.7.0`; local validation does not imply that `0.8.0` has been published or release-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
17
 
18
18
  ## Why Zhivex Harness
19
19
 
@@ -40,10 +40,18 @@ bun run demo:hostile
40
40
 
41
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
42
 
43
- ## What 0.6 includes
43
+ ## What 0.8 changes
44
44
 
45
- - one-shot execution and interactive chat;
46
- - provider and model selection through the CLI;
45
+ - updates the coordinated Zhivex SDK batch while retaining a single Core runtime identity;
46
+ - makes `gpt-5.6-luna` the OpenAI default, with Terra and Sol available through explicit model selection; and
47
+ - clarifies that calling an approval-gated tool is the model's approval request, so the runtime can persist and resume it.
48
+
49
+ ## What 0.7 introduced
50
+
51
+ - the short `zhx` command, with `zhivex-harness` retained as a compatible alias;
52
+ - one-shot execution plus a durable interactive console with named sessions, fork/archive operations, safe resume, status, diff, review, and explicit context compaction;
53
+ - an extensible provider registry, provider/model selection, provisional native Gemini support, and repeatable per-role routes such as `--route reviewer=gemini`;
54
+ - redacted, sequence-numbered `--jsonl` events for automation, while `--json` keeps the final-document contract;
47
55
  - versioned configuration and JSON output contracts;
48
56
  - a local `doctor` command that diagnoses Bun, workspace, Git, scripts, state, credentials, endpoints, and provider capabilities without making provider requests or exposing secret values;
49
57
  - deterministic, cursor-paginated workspace listing and search with SHA-256 content digests;
@@ -79,10 +87,10 @@ It does not include arbitrary host shell access, `stdio` MCP, permanent deletion
79
87
 
80
88
  ```bash
81
89
  bun add @zhivex-ai/harness
82
- bunx zhivex-harness --version
90
+ bunx --package @zhivex-ai/harness zhx --version
83
91
  ```
84
92
 
85
- To exercise the `0.6.1` source checkout:
93
+ To exercise the `0.8.0` source checkout:
86
94
 
87
95
  ```bash
88
96
  bun install --frozen-lockfile
@@ -96,28 +104,39 @@ Configure only the providers you plan to use:
96
104
  OPENAI_API_KEY=...
97
105
  MODEL_API_KEY=...
98
106
  DASHSCOPE_API_KEY=...
107
+ GEMINI_API_KEY=...
99
108
  ```
100
109
 
101
- `MODEL_API_KEY` is used by the Meta Model API. Qwen also accepts `QWEN_API_KEY`; `DASHSCOPE_API_KEY` takes precedence.
110
+ `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`.
102
111
 
103
112
  ## Diagnose the environment
104
113
 
105
114
  `doctor` is local and does not contact provider endpoints:
106
115
 
107
116
  ```bash
108
- zhivex-harness doctor
109
- zhivex-harness doctor --provider qwen --json
117
+ zhx doctor
118
+ zhx doctor --provider qwen --json
110
119
  ```
111
120
 
112
121
  For a source checkout, replace `zhivex-harness` with `bun run dev`.
113
122
 
114
123
  ## Usage
115
124
 
125
+ Start the durable console with the ergonomic command, or use the long alias in existing scripts:
126
+
127
+ ```bash
128
+ zhx
129
+ zhx chat --continue
130
+ zhivex-harness --version
131
+ ```
132
+
133
+ Inside the console, `/help` lists `/provider`, `/model`, `/route`, `/status`, `/diff`, `/review`, `/resume`, `/compact`, `/new`, `/rename`, and `/exit`.
134
+
116
135
  Show providers and detected configuration without printing secrets:
117
136
 
118
137
  ```bash
119
- zhivex-harness providers
120
- zhivex-harness providers --json
138
+ zhx providers
139
+ zhx providers --json
121
140
  ```
122
141
 
123
142
  Run a task against the current directory:
@@ -126,6 +145,7 @@ Run a task against the current directory:
126
145
  zhivex-harness run --provider openai "review the repository and fix the tests"
127
146
  zhivex-harness run --provider meta "document the current architecture"
128
147
  zhivex-harness run --provider qwen "implement the pending endpoint"
148
+ zhx run --provider gemini "review the proposed implementation"
129
149
  ```
130
150
 
131
151
  Operate on another workspace:
@@ -137,9 +157,20 @@ zhivex-harness run --provider qwen --workspace ../my-app "fix the typecheck erro
137
157
  Interactive mode:
138
158
 
139
159
  ```bash
140
- zhivex-harness chat --provider meta
160
+ zhx chat --provider meta
161
+ zhx chat --continue
162
+ zhx sessions list
163
+ ```
164
+
165
+ Route only selected subagent roles; credentials are required only for providers actually instantiated:
166
+
167
+ ```bash
168
+ zhx run --provider openai --route explorer=qwen --route reviewer=gemini \
169
+ "implement the change, then review it independently"
141
170
  ```
142
171
 
172
+ Routing with `--max-cost-usd` is rejected in `0.8.0`: aggregate usage cannot yet be priced correctly when roles use different models.
173
+
143
174
  Writes and checks pause for approval. In a non-interactive execution, state is saved in `.zhivex-harness/runs/operations.sqlite`:
144
175
 
145
176
  ```bash
@@ -185,6 +216,7 @@ Structured automation output uses schema version `1`:
185
216
 
186
217
  ```bash
187
218
  zhivex-harness run --provider qwen --json "analyze the issue without modifying files"
219
+ zhx run --provider gemini --jsonl "analyze the issue without modifying files"
188
220
  ```
189
221
 
190
222
  The JSON shapes and exit codes are documented in [docs/CLI.md](./docs/CLI.md).
@@ -213,11 +245,12 @@ zhivex-harness run --execution oci --yes "inspect, implement, test, review the e
213
245
  | --- | --- | --- |
214
246
  | Meta | `muse-spark-1.2` | `MODEL_API_KEY` · 0.6 edit, delegation, and OCI execution certified |
215
247
  | 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 |
248
+ | OpenAI | `gpt-5.6-luna` | `OPENAI_API_KEY` · GPT-5.6 Luna, Terra, and Sol base workflow passed locally; release recertification pending |
249
+ | Gemini | `gemini-3.6-flash` | `GEMINI_API_KEY` or `GOOGLE_GENERATIVE_AI_API_KEY` · provisional until the harness live matrix passes |
217
250
 
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`.
251
+ 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.
219
252
 
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.
253
+ Meta and Qwen retain the published support conclusion for the unchanged approval/restart, delegation/persistence, and enforced-execution paths. OpenAI is GPT-5.6-first in `0.8.0`: Luna is the default, while Terra and Sol remain explicit `--model` selections. All three passed the local base approval/restart gate, but delegation, OCI execution, and release-artifact certification still require the release-candidate matrix. 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.
221
254
 
222
255
  ## Security boundaries
223
256
 
@@ -258,4 +291,5 @@ The live gate is opt-in and billable:
258
291
 
259
292
  ```bash
260
293
  ZHIVEX_HARNESS_LIVE=1 bun run scripts/live-provider-smoke.ts
294
+ ZHIVEX_HARNESS_LIVE=1 bun run smoke:live:routing
261
295
  ```
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, 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.
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` through `0.7.0` are published on npm. `0.8.0` is the source release candidate for the coordinated SDK refresh and GPT-5.6-first OpenAI integration; publication and release 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
 
@@ -39,7 +39,9 @@ The `0.6.0` dependency batch pins and overrides `@zhivex-ai/core@1.6.0`, retaini
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
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
+ | `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 | Published on npm | L |
44
+ | `0.8.0` | SDK refresh and GPT-5.6 | One Core runtime, current adapters, and a GPT-5.6-first OpenAI path | Source release candidate | M |
43
45
  | `1.0.0` | Stable contract | Supported compatibility and release guarantees | Planned | L |
44
46
 
45
47
  Relative size is for sequencing only; dates require a capacity decision.
@@ -99,7 +101,7 @@ Required release evidence:
99
101
  - migration and safety boundaries are documented without claiming host isolation or permanent deletion;
100
102
  - `0.3.0` remains private until an explicit publication decision is made.
101
103
 
102
- Validation snapshot (2026-08-16):
104
+ Validation summary:
103
105
 
104
106
  - the trusted-editing implementation is merged into `main`;
105
107
  - deterministic, installed-package, and package-inspection CI gates pass on Linux and macOS;
@@ -130,7 +132,7 @@ Exit criteria:
130
132
  - Golden fixtures are deterministic and the regression gate runs in CI.
131
133
  - Exported operational artifacts are redacted by default and schema-versioned.
132
134
 
133
- Validation snapshot (2026-08-17):
135
+ Validation summary:
134
136
 
135
137
  - deterministic tests, the five-case golden evaluation gate, typecheck, docs, build, and installed-tarball smoke pass;
136
138
  - migration, idempotency, concurrent ownership, expired-lease recovery, cancellation, retention, Qwen token enforcement, and export redaction have regression coverage;
@@ -160,13 +162,12 @@ Exit criteria:
160
162
  - MCP prompt injection and oversized/malformed result tests fail safely.
161
163
  - Provider-specific limitations are recorded in a live support matrix.
162
164
 
163
- Validation snapshot (2026-08-17 UTC):
165
+ Validation summary:
164
166
 
165
167
  - deterministic tests, the seven-case golden evaluation gate, typecheck, docs, build, dependency audit, dry-run package inspection, and installed-tarball smoke pass;
166
168
  - 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;
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`;
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`;
169
+ - controlled and official-SDK Streamable HTTP MCP interoperability passed over real loopback transports with session negotiation, bounded execution, and forced network approval;
170
+ - the certified provider cohort passed the separate model-directed reviewer delegation, child persistence, SQLite reopen, hierarchy, and aggregate-usage matrix;
170
171
  - 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`.
171
172
 
172
173
  ## 0.6.0 — Enforced execution environments
@@ -192,26 +193,75 @@ Exit criteria:
192
193
  - Installed-artifact and live-provider tests exercise the enforced backend.
193
194
  - The product is described as a local enforced runner, not a managed sandbox service.
194
195
 
195
- Implementation snapshot (2026-08-17):
196
+ Implementation summary:
196
197
 
197
198
  - 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
199
  - 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
200
  - 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
201
  - 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
202
  - 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 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;
203
204
  - the installed-package smoke passed with the public execution-environment API and snapshot/import flow;
204
205
  - 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;
206
+ - the certified provider cohort passed the model-directed OCI command, patch review, separate import approval, journal, host-content, and binding matrix;
207
+ - the base approval/restart and bounded reviewer-delegation/persistence/hierarchy matrices passed against the release artifact;
207
208
  - `@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
+ - the annotated tag, protected publication, registry integrity, distribution tag, and SLSA workflow provenance agree with the release source.
209
210
 
210
211
  ### 0.6.1 positioning patch
211
212
 
212
213
  `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
 
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
+ 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.
216
+
217
+ ## 0.7.0 — Multi-provider agent console
218
+
219
+ Status: published on npm. Gemini and mixed-provider routing remain provisional until their required live validation is recorded in a later release artifact.
220
+
221
+ Goal: turn the harness from a collection of one-shot commands into an ergonomic local agent console while preserving immutable runs and provider portability.
222
+
223
+ Scope:
224
+
225
+ - Publish the short `zhx` command while retaining `zhivex-harness` for scripts.
226
+ - Add a durable SQLite session index that links immutable runs without duplicating prompts, messages, tool payloads, or provider data.
227
+ - Add a public validated provider registry and native Gemini integration without aliasing an OpenAI-compatible transport.
228
+ - Route explorer, implementer, tester, and reviewer roles to explicit provider/model pairs.
229
+ - Add safe console commands for provider/model/routes, status, diff, review, session resume/new/rename, and deterministic redacted compaction.
230
+ - Add sequence-numbered redacted JSONL events for automation.
231
+ - Bind non-secret provider transport configuration into durable resume fingerprints.
232
+
233
+ Exit criteria:
234
+
235
+ - Registry, Gemini factory/diagnostics, sessions/reopen/fork/archive, routing, approval restart, JSONL redaction, and both CLI aliases pass deterministic and installed-package tests.
236
+ - Cross-provider handoff always starts a new run, is blocked by pending approvals, and carries no raw tool/provider payload.
237
+ - Existing `run`, `review`, `resume`, `runs`, final JSON, configuration schema, and `zhivex-harness` commands remain compatible.
238
+ - Gemini passes the base edit/restart, delegation, and OCI matrices before moving from provisional to certified.
239
+ - The exact tarball, release tag, registry integrity, and provenance are verified separately; source readiness is not publication.
240
+
241
+ Deferred after `0.7.0`:
242
+
243
+ - Per-provider/per-role cost pricing and evidence-backed routing presets.
244
+ - Additional hosted and local providers, added one by one through the same registry and certification contract.
245
+ - Remote workers or microVM backends; the current console stays local and Bun-first.
246
+
247
+ ## 0.8.0 — SDK refresh and GPT-5.6-first OpenAI
248
+
249
+ Status: source release candidate. Deterministic, installed-artifact, live-provider, and publication evidence remain separate gates.
250
+
251
+ Goal: adopt the coordinated SDK release batch without duplicating Core contracts, make the current GPT-5.6 family the primary OpenAI experience, and keep approval pauses reliable across provider behavior changes.
252
+
253
+ Scope:
254
+
255
+ - Pin Core `1.7.0`, Agents `1.2.0`, Meta `0.2.2`, Qwen `0.10.2`, OpenAI `0.9.6`, and Gemini `0.10.5`, with one overridden Core runtime.
256
+ - Default OpenAI to `gpt-5.6-luna`, with explicit Terra and Sol selection.
257
+ - Tell models to emit the reviewed approval-gated tool call so the runtime, rather than prose, owns the pause and restart boundary.
258
+ - Document migration from the `0.7.x` OpenAI default and durable version binding.
259
+
260
+ Exit criteria:
261
+
262
+ - Frozen install, dependency deduplication, documentation, typecheck, tests, evaluation, build, package inspection, and installed-tarball smoke pass.
263
+ - Luna, Terra, and Sol pass the base proposal/approval/restart/exactly-once live gate with date-bound evidence.
264
+ - The exact release artifact, annotated tag, registry integrity, and provenance are verified independently before claiming publication.
215
265
 
216
266
  ## 1.0.0 — Stable CLI and library contract
217
267
 
@@ -258,7 +308,7 @@ These can become separate post-1.0 tracks after the CLI/runtime contract and sec
258
308
 
259
309
  ## Immediate next actions
260
310
 
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.
311
+ 1. Finish the `0.8.0` deterministic, real-OCI, and installed-artifact gates from a clean release commit.
312
+ 2. Complete the remaining GPT-5.6 and provisional-provider live matrices; keep uncertified paths provisional on any failure or missing evidence.
313
+ 3. Dogfood the GPT-5.6 default, durable `zhx` sessions, provider handoff, role routing, and JSONL consumption on representative repositories.
314
+ 4. Only after those gates, complete the reviewed release workflow and verify registry integrity and provenance against the exact artifact.
package/SUPPORT.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Support
2
2
 
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).
3
+ Zhivex Harness `0.8.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.6.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.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).
13
+ Only the most recent published patch receives routine fixes. Meta and Qwen retain their date-bound certification, OpenAI GPT-5.6 has local `0.8.0` base-gate evidence, and Gemini remains 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;