@zhivex-ai/harness 0.5.0 → 0.6.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,38 @@ 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.0 - 2026-08-17
8
+
9
+ ### Added
10
+
11
+ - An SDK-native enforced execution environment backed by Docker or Podman, with an adapter boundary for future remote workers.
12
+ - 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.
13
+ - 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.
14
+ - 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.
15
+ - An execution-environment guide and OCI diagnostics in `doctor`.
16
+
17
+ ### Changed
18
+
19
+ - Resolved configuration uses schema version `4` and adds a discriminated `execution` policy. The default remains `none`, where generic shell is unavailable.
20
+ - 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.
21
+ - 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`.
22
+ - Environment patches compare, review, bind, import, and roll back file permission modes, including mode-only changes and newly created executable files.
23
+ - The Zhivex SDK dependency batch now resolves one `@zhivex-ai/core@1.6.0` runtime; OpenAI is updated to `0.9.5`.
24
+ - The release workflow is OIDC-only and runs the enforced OCI gate before packaging or live-provider certification.
25
+
26
+ ### Migration
27
+
28
+ - Replace schema-version-pinned `schemaVersion: 3` configuration with `4`. Existing scoped SQLite data needs no database rewrite.
29
+ - Existing behavior remains available with `executionBackend: "none"` or `ZHIVEX_HARNESS_EXECUTION=none`; this does not expose shell-class tools.
30
+ - 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.
31
+ - 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.
32
+
33
+ ### Security
34
+
35
+ - Host credentials and arbitrary environment variables are not inherited by container processes; hard secret exclusions apply before snapshot creation.
36
+ - The harness never pulls images implicitly, never uses a shell to interpret model commands, and cleans only containers or volumes carrying its ownership label.
37
+ - 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.
38
+
7
39
  ## 0.5.0 - 2026-08-17
8
40
 
9
41
  ### Added
package/README.md CHANGED
@@ -4,9 +4,9 @@ Zhivex Harness is a Bun-first coding-agent harness portable across Meta, Qwen, a
4
4
 
5
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.
6
6
 
7
- Version `0.5.0` is a publication-ready extensibility-and-orchestration candidate. The package manifest and protected release workflow are ready, but the immutable npm publication has not been executed. Public availability begins only after the repository and npm prerequisites in the [release guide](./docs/RELEASE.md) are completed and a maintainer explicitly dispatches the workflow. See [ROADMAP.md](./ROADMAP.md), [CHANGELOG.md](./CHANGELOG.md), the [extensibility guide](./docs/EXTENSIBILITY.md), the [durable-operations guide](./docs/DURABLE_OPERATIONS.md), and the [trusted-editing contract](./docs/REPOSITORY_EDITING.md).
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).
8
8
 
9
- ## What 0.5 includes
9
+ ## What 0.6 includes
10
10
 
11
11
  - one-shot execution and interactive chat;
12
12
  - provider and model selection through the CLI;
@@ -26,27 +26,29 @@ Version `0.5.0` is a publication-ready extensibility-and-orchestration candidate
26
26
  - governed MCP over bounded HTTPS/loopback HTTP with explicit server/tool allowlists, permissions, timeouts, approvals, output limits, and environment-backed credentials;
27
27
  - named explorer, implementer, tester, and reviewer subagents with independent durable budgets and promoted approvals;
28
28
  - deterministic application-owned parallel read-only review groups with child progress, hierarchy, usage, and cost evidence;
29
+ - 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;
30
+ - argv-only allowlisted environment commands, isolated package checks, deterministic patch inspection, and a separate durable approval before importing changes into the host workspace;
31
+ - environment/image/policy fingerprint binding, cancellation cleanup, labeled orphan cleanup, retained audit artifacts, and installed-package plus real-runtime smoke gates;
29
32
  - protection against path traversal, symlink escapes, unsafe state targets, secret-file reads, special files, concurrent non-overwrite races, and unbounded output;
30
33
  - Linux/macOS CI, installed-tarball smoke coverage, and opt-in live-provider certification.
31
34
 
32
- It does not include arbitrary shell access, `stdio` MCP, permanent deletion, Git writes, a desktop UI, OS isolation, or a managed sandbox. Tools and subagents run inside the workspace with the permissions of the local process.
35
+ 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
36
 
34
37
  ## Requirements
35
38
 
36
39
  - Bun 1.3.7 or newer.
37
40
  - Git for repository status and diff inspection.
38
41
  - At least one supported provider credential for real model execution.
42
+ - Docker or Podman plus a preloaded image when `--execution oci` is requested.
39
43
 
40
44
  ## Installation
41
45
 
42
- After `0.5.0` is published to npm:
43
-
44
46
  ```bash
45
47
  bun add @zhivex-ai/harness
46
48
  bunx zhivex-harness --version
47
49
  ```
48
50
 
49
- Until then, run the source checkout:
51
+ To exercise the unpublished `0.6.0` source candidate:
50
52
 
51
53
  ```bash
52
54
  bun install --frozen-lockfile
@@ -161,17 +163,27 @@ The default check allowlist is `test`, `typecheck`, `lint`, and `build`. Replace
161
163
  zhivex-harness run --allow-check test:unit --allow-check format "apply the fix and validate it"
162
164
  ```
163
165
 
166
+ Enable enforced local execution explicitly. The image must already exist locally; the harness never pulls it implicitly:
167
+
168
+ ```bash
169
+ docker pull oven/bun:1.3.7-slim
170
+ zhivex-harness doctor --execution oci
171
+ zhivex-harness run --execution oci --yes "inspect, implement, test, review the environment patch, and import it"
172
+ ```
173
+
174
+ `--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).
175
+
164
176
  ## Providers and defaults
165
177
 
166
178
  | Provider | Default model | Current support |
167
179
  | --- | --- | --- |
168
- | Meta | `muse-spark-1.2` | `MODEL_API_KEY` · 0.4 runtime and 0.5 delegation certified |
169
- | Qwen | `qwen3.8-max` | `DASHSCOPE_API_KEY` or `QWEN_API_KEY` · 0.4 runtime and 0.5 delegation certified |
170
- | OpenAI | `gpt-5.4` | `OPENAI_API_KEY` · 0.4 runtime and 0.5 delegation certified |
180
+ | Meta | `muse-spark-1.2` | `MODEL_API_KEY` · 0.6 edit, delegation, and OCI execution certified |
181
+ | Qwen | `qwen3.8-max` | `DASHSCOPE_API_KEY` or `QWEN_API_KEY` · 0.6 edit, delegation, and OCI execution certified |
182
+ | OpenAI | `gpt-5.4` | `OPENAI_API_KEY` · 0.6 edit, delegation, and OCI execution certified |
171
183
 
172
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`.
173
185
 
174
- Meta, Qwen, and OpenAI completed the 0.4 proposal, scoped-SQLite approval, process restart, and exactly-once patch gate on 2026-08-17. They also completed the separate 0.5 model-directed reviewer-delegation, child persistence, SQLite reopen, hierarchy, and aggregate-usage gate at `2026-08-17T02:21:45.553Z`. Controlled Streamable HTTP MCP interoperability over a real loopback server passed at `2026-08-17T13:05:05.542Z`; third-party server compatibility is not implied. 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.
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.
175
187
 
176
188
  ## Security boundaries
177
189
 
@@ -189,8 +201,12 @@ Meta, Qwen, and OpenAI completed the 0.4 proposal, scoped-SQLite approval, proce
189
201
  - Remote MCP output is bounded, schema-checked, treated as untrusted, and rejected on common prompt-injection directives.
190
202
  - Network MCP always pauses for approval; custom read-only annotation trust must be explicit and injected by the host application.
191
203
  - Subagent children inherit scope, workspace, cancellation, approval, and store policy while retaining independent budgets and fingerprints.
204
+ - OCI execution binds the durable run to the resolved image identity and enforced policy; resume fails if either changes.
205
+ - Snapshot discovery excludes secrets, Git internals, harness state, dependency trees, and build output. Dependencies may be mounted separately read-only.
206
+ - Untrusted commands receive a quota-backed tmpfs workspace, never a writable host bind; only successful, frozen, validated snapshots replace durable environment state.
207
+ - Container processes receive no provider credentials or arbitrary host environment values, and host changes require a separately approved digest-bound patch import.
192
208
 
193
- These controls reduce risk but do not provide strong isolation. Use a dedicated container or microVM and a disposable workspace for autonomous execution.
209
+ 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
210
 
195
211
  ## Development
196
212
 
package/ROADMAP.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Zhivex Harness Roadmap
2
2
 
3
3
  - Status: active
4
- - Baseline date: 2026-08-16
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 a publication-ready extensibility-and-orchestration candidate. Registry publication 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, `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.
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 is configured for a first public release with 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; publication and provenance remain external release operations.
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 release candidate keeps `@zhivex-ai/core@1.5.0`. Although `1.6.0` is published, the installed `agents@1.2.0` and provider adapters still resolve their compatible runtime to `1.5.0`; upgrading only the direct dependency produced duplicate core types. The `1.6.0` move is deferred until the agents/providers batch can be installed and certified against one runtime version.
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,8 @@ 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 | Publication-ready candidate | L |
41
- | `0.6.0` | Enforced execution | Shell and checks inside a real isolation boundary | Planned | XL |
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 |
42
42
  | `1.0.0` | Stable contract | Supported compatibility and release guarantees | Planned | L |
43
43
 
44
44
  Relative size is for sequencing only; dates require a capacity decision.
@@ -140,7 +140,7 @@ Validation snapshot (2026-08-17):
140
140
 
141
141
  Goal: support larger tasks through governed external tools and bounded delegation without weakening workspace policy.
142
142
 
143
- Status: publication-ready candidate. Configuration, migration, MCP, and orchestration contracts live in [docs/EXTENSIBILITY.md](./docs/EXTENSIBILITY.md); registry publication remains pending an explicit maintainer dispatch and the external prerequisites in [docs/RELEASE.md](./docs/RELEASE.md).
143
+ 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
144
 
145
145
  Scope:
146
146
 
@@ -163,14 +163,17 @@ Validation snapshot (2026-08-17 UTC):
163
163
 
164
164
  - deterministic tests, the seven-case golden evaluation gate, typecheck, docs, build, dependency audit, dry-run package inspection, and installed-tarball smoke pass;
165
165
  - 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-17T13:05:05.542Z`;
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`;
167
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
- - exact-artifact and publication controls are prepared, while registry publication, provenance, tag creation, and push have not been attempted or claimed.
169
+ - 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
170
 
170
171
  ## 0.6.0 — Enforced execution environments
171
172
 
172
173
  Goal: introduce shell-class capabilities only when the declared filesystem, process, network, and resource controls are real.
173
174
 
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
+
174
177
  Scope:
175
178
 
176
179
  - Implement the SDK execution-environment contract for a local OCI/container backend, with an adapter boundary for future remote workers.
@@ -188,6 +191,21 @@ Exit criteria:
188
191
  - Installed-artifact and live-provider tests exercise the enforced backend.
189
192
  - The product is described as a local enforced runner, not a managed sandbox service.
190
193
 
194
+ Implementation snapshot (2026-08-17):
195
+
196
+ - 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
+ - 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
+ - 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
+ - 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
+ - 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 installed-package smoke passed with the public execution-environment API and snapshot/import flow;
203
+ - 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;
206
+ - `@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
+
191
209
  ## 1.0.0 — Stable CLI and library contract
192
210
 
193
211
  Goal: freeze a supportable public contract after the pre-1.0 safety and operational surfaces have been exercised in real repositories.
@@ -233,7 +251,6 @@ These can become separate post-1.0 tracks after the CLI/runtime contract and sec
233
251
 
234
252
  ## Immediate next actions
235
253
 
236
- 1. Dogfood governed MCP and bounded delegation on representative repositories before freezing the contract.
237
- 2. Validate additional third-party Streamable HTTP servers without broadening the transport or trust claims.
238
- 3. Make the repository public, enable private vulnerability reporting, protect the `npm` environment, and verify `@zhivex-ai` scope rights before dispatching publication.
239
- 4. Bootstrap the first npm version through the protected workflow, configure `release.yml` as the package Trusted Publisher, revoke the temporary bootstrap token, and verify registry integrity/provenance against the tagged commit.
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.
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>;