@zhivex-ai/harness 1.2.0 → 1.3.0-rc.7

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.
Files changed (164) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +9 -10
  3. package/contracts/engine-api.json +2921 -0
  4. package/contracts/public-api.json +267 -1
  5. package/contracts/stable-api-signatures.json +43 -43
  6. package/dist/acp-cli.js +137 -15002
  7. package/dist/approvals/approval-history.d.ts +22 -0
  8. package/dist/approvals/explicit-review.d.ts +24 -0
  9. package/dist/approvals/host-policy-identity.d.ts +3 -0
  10. package/dist/cli/arguments.d.ts +6 -2
  11. package/dist/cli/checkpoints.d.ts +230 -0
  12. package/dist/cli/cli-options.d.ts +2 -41
  13. package/dist/cli/cli-profiles.d.ts +4 -2
  14. package/dist/cli/cli-stream.d.ts +2 -167
  15. package/dist/cli/governance-report.d.ts +5 -0
  16. package/dist/cli/policy-decisions.d.ts +9 -0
  17. package/dist/cli/policy.d.ts +5 -0
  18. package/dist/cli/presentation.d.ts +3 -1
  19. package/dist/cli/run-document.d.ts +2 -91
  20. package/dist/cli/terminal/terminal-continuation.d.ts +2 -3
  21. package/dist/cli/terminal/terminal-ui.d.ts +4 -0
  22. package/dist/{cli-entry-c2f58zj2.js → cli-entry-ae7x44d4.js} +14969 -10731
  23. package/dist/{cli-entry-427869g9.js → cli-entry-d5788aay.js} +388 -47
  24. package/dist/cli-entry-ev76ezcd.js +656 -0
  25. package/dist/{cli-3jmy4h5h.js → cli-t7hrhayq.js} +918 -2223
  26. package/dist/cli.js +3 -5
  27. package/dist/client/acp-mcp-admission.d.ts +32 -0
  28. package/dist/client/acp-mcp-host.d.ts +19 -0
  29. package/dist/client/acp-mcp-session.d.ts +14 -0
  30. package/dist/client/acp-stdio.d.ts +2 -0
  31. package/dist/client/acp.d.ts +4 -1
  32. package/dist/client/adapter.d.ts +13 -1
  33. package/dist/client/continuation.d.ts +3 -0
  34. package/dist/client/json-contracts.d.ts +107 -4
  35. package/dist/client/local-service.d.ts +2 -0
  36. package/dist/client/protocol.d.ts +127 -1
  37. package/dist/client/run-document.d.ts +91 -0
  38. package/dist/client/service-events.d.ts +4 -0
  39. package/dist/client/stream.d.ts +167 -0
  40. package/dist/compat/cli-options.d.ts +53 -0
  41. package/dist/compat/code-support.d.ts +22 -0
  42. package/dist/compat/code-support.js +74 -0
  43. package/dist/{config-1k9t4jhh.js → config-c002f06f.js} +1 -1
  44. package/dist/config-j3jga5wh.js +61 -0
  45. package/dist/context/adaptive-compaction.d.ts +1 -0
  46. package/dist/context/compaction.d.ts +1 -1
  47. package/dist/context/request-measurements.d.ts +17 -0
  48. package/dist/context/request-projection.d.ts +10 -0
  49. package/dist/context/task-memory.d.ts +1 -0
  50. package/dist/engine/acp.d.ts +6 -0
  51. package/dist/engine/acp.js +205 -0
  52. package/dist/engine/client.d.ts +6 -0
  53. package/dist/engine/client.js +28 -0
  54. package/dist/engine/desktop-providers-v1.d.ts +4 -0
  55. package/dist/engine/desktop-providers-v1.js +18 -0
  56. package/dist/engine/desktop-state-v1.d.ts +10 -0
  57. package/dist/engine/desktop-state-v1.js +168 -0
  58. package/dist/engine/index.d.ts +73 -0
  59. package/dist/engine/index.js +977 -0
  60. package/dist/engine/mcp-stdio-v1.d.ts +11 -0
  61. package/dist/engine/mcp-stdio-v1.js +108 -0
  62. package/dist/engine/models.d.ts +3 -0
  63. package/dist/engine/models.js +894 -0
  64. package/dist/engine/protocol.d.ts +7 -0
  65. package/dist/engine/protocol.js +182 -0
  66. package/dist/engine/service.d.ts +5 -0
  67. package/dist/engine/service.js +28 -0
  68. package/dist/execution/acceptance-snapshot.d.ts +2 -0
  69. package/dist/execution/execution-environment.d.ts +10 -0
  70. package/dist/execution/mcp-oci-channel.d.ts +11 -0
  71. package/dist/execution/mcp-oci-server.d.ts +38 -0
  72. package/dist/execution/mcp-oci-workspace.d.ts +23 -0
  73. package/dist/execution/mcp-resource-recovery.d.ts +19 -0
  74. package/dist/execution/mcp-workspace-snapshot.d.ts +20 -0
  75. package/dist/hostile-repository-demo.js +3368 -1304
  76. package/dist/index-1bx83sw4.js +4 -0
  77. package/dist/index-2gz7jv7g.js +549 -0
  78. package/dist/{cli-entry-b1mfvmxe.js → index-2jrdcj6b.js} +72 -115
  79. package/dist/index-3ah1f369.js +356 -0
  80. package/dist/index-42gp2hy8.js +1555 -0
  81. package/dist/index-4jw3tvy8.js +301 -0
  82. package/dist/index-8705zxpr.js +145 -0
  83. package/dist/index-8vm2m34s.js +2080 -0
  84. package/dist/index-8zzhggxv.js +477 -0
  85. package/dist/index-a97bezbz.js +1073 -0
  86. package/dist/index-gq9xagx2.js +1343 -0
  87. package/dist/index-h0mqx2ed.js +1373 -0
  88. package/dist/index-jgrx804e.js +5589 -0
  89. package/dist/index-qfpz5y2v.js +174 -0
  90. package/dist/index-t60rva31.js +1004 -0
  91. package/dist/index-wg1sd3at.js +80 -0
  92. package/dist/index-xqxeypt5.js +888 -0
  93. package/dist/index-yb239ghk.js +961 -0
  94. package/dist/index-z0qxmkm2.js +3389 -0
  95. package/dist/index-z4e8d0ph.js +1768 -0
  96. package/dist/index.js +251 -18649
  97. package/dist/integrations/mcp-host-session.d.ts +26 -0
  98. package/dist/integrations/mcp-stdio-admission.d.ts +54 -0
  99. package/dist/integrations/mcp-stdio-client.d.ts +44 -0
  100. package/dist/integrations/mcp-stdio-framing.d.ts +18 -0
  101. package/dist/integrations/mcp-stdio-launch.d.ts +20 -0
  102. package/dist/integrations/mcp-stdio-session.d.ts +7 -0
  103. package/dist/integrations/mcp-stdio-tools.d.ts +12 -0
  104. package/dist/internal/desktop/catalog.d.ts +2 -0
  105. package/dist/internal/desktop/persistence.d.ts +2 -3
  106. package/dist/internal/desktop/providers.d.ts +1 -0
  107. package/dist/models/catalog.d.ts +2 -0
  108. package/dist/persistence/governance-context.d.ts +126 -0
  109. package/dist/persistence/governance-report.d.ts +299 -0
  110. package/dist/persistence/host-database-backup.d.ts +28 -0
  111. package/dist/persistence/mcp-execution-journal.d.ts +19 -0
  112. package/dist/persistence/mcp-reconciliation.d.ts +33 -0
  113. package/dist/persistence/mcp-resource-journal.d.ts +54 -0
  114. package/dist/persistence/workspace-checkpoints.d.ts +138 -0
  115. package/dist/providers/anthropic-continuation.d.ts +5 -0
  116. package/dist/providers/providers.d.ts +1 -1
  117. package/dist/providers/vertex-auth.d.ts +27 -0
  118. package/dist/runtime/delegation-contracts.d.ts +9 -0
  119. package/dist/runtime/delegation-correction.d.ts +9 -0
  120. package/dist/runtime/delegation-result.d.ts +73 -0
  121. package/dist/runtime/error-diagnostics.d.ts +86 -0
  122. package/dist/runtime/harness.d.ts +11 -1
  123. package/dist/runtime/policy-decisions.d.ts +66 -0
  124. package/dist/runtime/policy-inspection.d.ts +52 -0
  125. package/dist/runtime/provider-diagnostics.d.ts +1 -0
  126. package/dist/runtime/runtime-instructions.d.ts +8 -0
  127. package/dist/runtime/task-acceptance-checks.d.ts +103 -0
  128. package/dist/runtime/task-acceptance-delivery.d.ts +107 -0
  129. package/dist/runtime/task-acceptance-host.d.ts +20 -0
  130. package/dist/runtime/task-acceptance-record.d.ts +107 -0
  131. package/dist/runtime/task-acceptance-validation.d.ts +25 -0
  132. package/dist/runtime/task-acceptance.d.ts +47 -0
  133. package/dist/runtime/time-to-safe-fix.d.ts +83 -0
  134. package/dist/runtime/tool-policy-file.d.ts +23 -0
  135. package/dist/runtime/tool-policy-paths.d.ts +5 -0
  136. package/dist/runtime/tool-policy.d.ts +6 -0
  137. package/dist/service-cli.js +19 -14504
  138. package/dist/{service-client-cli-yx56n0hc.js → service-client-cli-kns4mf57.js} +307 -248
  139. package/dist/verify-historical-migrations.js +3314 -1251
  140. package/dist/workspace/path-policy.d.ts +4 -0
  141. package/dist/zhx.js +3 -5
  142. package/docs/ACP.md +14 -2
  143. package/docs/ANTHROPIC.md +33 -0
  144. package/docs/CLI.md +132 -0
  145. package/docs/CLIENT_PROTOCOL.md +45 -0
  146. package/docs/CODE_RELEASE.md +93 -0
  147. package/docs/ENGINE_API.md +319 -0
  148. package/docs/EXTENSIBILITY.md +46 -3
  149. package/docs/FIRST_USE.md +6 -6
  150. package/docs/LOCAL_SERVICE.md +13 -0
  151. package/docs/MCP_STDIO.md +20 -0
  152. package/docs/README.md +6 -0
  153. package/docs/STABILITY.md +9 -1
  154. package/docs/SUPPORT_MATRIX.md +1 -1
  155. package/docs/TOOL_POLICY.md +81 -0
  156. package/docs/VERTEX.md +50 -0
  157. package/docs/adr/0002-isolated-mcp-stdio.md +135 -0
  158. package/docs/fixtures/mcp-stdio-contract-v1.json +189 -0
  159. package/docs/support-matrix.json +2 -0
  160. package/evaluations/representative-assembly-matrix.json +64 -1
  161. package/evaluations/task-acceptance-routes.json +7 -0
  162. package/examples/README.md +1 -1
  163. package/package.json +74 -12
  164. package/dist/cli-entry-64pdp3k5.js +0 -17
package/CHANGELOG.md CHANGED
@@ -4,6 +4,70 @@ 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
+ ## 1.3.0-rc.7 - 2026-10-01
8
+
9
+ - Pin Qwen contract certification to zero sampling temperature in approval and conversation continuity smokes, preserving all approval, compaction, effect and context assertions. Application model defaults remain unchanged.
10
+ - Distinguish approval resume status, compaction and private continuation failures; retain sanitized run counters and typed provider causes without publishing model output or messages.
11
+ - Prepare RC7 with exact Code/Desktop pins and historical representative mappings preserved. Prior failed RC6 evidence remains historical; RC7 requires its own exact-artifact and protected release gates.
12
+
13
+ ## 1.3.0-rc.6 - 2026-09-30
14
+
15
+ - Make protected OCI execution certification use a host-owned Node fixture while retaining exact command, patch, approval and journal checks.
16
+ - Align manual certification with all six protected provider routes and preserve typed, sanitized continuity failures in the aggregate release diagnostics.
17
+ - Admit future canonical release tags through the reviewed Vertex WIF identity condition, retaining repository, owner, environment, event and workflow bindings.
18
+ - Prepare RC6 metadata, representative model mapping and exact Harness pins for Code and Desktop. Publication requires new release-bound artifact, live and representative evidence.
19
+
20
+ ## 1.3.0-rc.5 - 2026-09-30
21
+
22
+ - Use the explicit Anthropic default endpoint when `ANTHROPIC_BASE_URL` is empty or whitespace-only, including empty optional workflow secrets. Preserve host environment isolation and rejection of unsafe custom endpoints.
23
+
24
+ - Restore Qwen `qwen3.8-flash` and Meta `muse-spark-1.3-contributor` for protected certification, representative evidence and task acceptance. Preserve historical model mappings and CLI/Desktop/registry defaults; retain Gemini API 3.6 Flash and Vertex 3.7 Flash.
25
+ - Prepare RC5 metadata and exact Harness pins for Code and Desktop, with regressions against certification model drift. Paid live certification and publication require separate approval; this preparation does not certify the new artifact.
26
+
27
+ ## 1.3.0-rc.4 - 2026-09-29
28
+
29
+ - Add experimental trusted tool policies, explicit review receipts, policy inspection, durable task acceptance with exact-byte OCI delivery, structured delegation validation, and sanitized portable governance reports.
30
+ - Add reviewed CLI/Desktop checkpoint restoration and bounded capture/retention.
31
+ - Prepare Code 0.1.0-rc.2 with an exact RC4 dependency; require all six provider routes, approval compaction, structured delegation, continuity and four mixed-provider edges in protected certification. Include consumer documentation and isolate Desktop candidate provisioning from public registry availability.
32
+
33
+ - Reduce repeated request context with concise host instructions, progressive tool schemas and recoverable excerpts of durable tool evidence. Preserve host policy, approval and explicit catalogs; add bounded numeric request measurements and a same-budget Sonnet 5.5 follow-up pilot.
34
+
35
+ - Add experimental host-only `/mcp/stdio/v1`: explicit OCI admission, private snapshots, bounded stdio lifecycle, durable tool approvals, scoped resource recovery and host-authorized reconciliation. Verify a real MCP server from an installed candidate on Node 22/24 and Bun; workspace JSON still cannot enable stdio.
36
+
37
+ - Expand independent Harness/Code acceptance to both installation orders across local/global managers, historical session and approval boundaries, and Node/Bun runtime checks. Retain exact candidate identity through a read-only acceptance registry and preserve failed default-registry attempts separately.
38
+
39
+ - Migrate Desktop to an installed Harness tarball through declared package exports, including the versioned host provider contract. Verify artifact identity during build/package, remove source rewriting, and validate packaged conversation, approval, restart and persisted diff behavior.
40
+
41
+ - Move Desktop whole-database snapshot/validation logic into Harness persistence and add the narrow, versioned `/desktop/v1/state` host contract. Keep raw SQL and `SqliteDatabase` private; preserve recovery errors, permissions and cooperative lease checks.
42
+
43
+ - Add the explicit beta `/models` package entrypoint for browser-safe catalog data, schemas and display helpers, with clean-consumer Node/type/browser verification.
44
+
45
+ - Add provisional Vertex through Google Cloud ADC with refresh, explicit project/location, shared CLI/Desktop selection and sanitized diagnostics. Route changes invalidate durable approvals. Keep renderer catalog metadata separate from host authentication and transport dependencies.
46
+
47
+ - Classify provider HTTP 402 as `payment_required` without leaking response data; add Gemini creation/update, nullable-digest, signed-continuation and durable approval regressions. Preserve the earlier Gemini 3.7 HTTP 402 reproduction; subsequent Gemini API 3.6 Flash candidate gates passed. Certification remains bound to each model and artifact.
48
+
49
+ - Add provisional Anthropic direct API support via SDK 0.12.4, shared CLI/Desktop models, secret-store credentials and presence-only diagnostics. Preserve existing default transport fingerprints; signed provider data, tool IDs and usage remain intact.
50
+ - Add a versioned common task acceptance suite with seven fixtures, protected independent checks, durable approval/restart/cancellation, explicit model/route/artifact/budgets and append-only attempt evidence. Failed first attempts remain failed when a later retry recovers. No live certification or publication is implied.
51
+
52
+ ## 1.3.0-rc.3 - 2026-09-28
53
+
54
+ - Release Meta stream deadlines after HTTP setup errors, stream completion, cancellation and early iterator closure; retain the original provider error and natural process exit.
55
+ - Certify valid approval recovery using persisted pre-approval validation receipts without accepting additional executions, new errors or mismatched approved calls.
56
+ - Bound Desktop smoke renderer diagnostics and retain phase timing without extending the watchdog or weakening lease/approval checks.
57
+ - Pin the independent Code RC to Harness RC3. Local corrected-artifact acceptance reached 41/42: OpenAI and Qwen 14/14, Meta 13/14 with one HTTP 504. The operator authorized proceeding with RC preparation despite this provider failure; protected certification remains separate and is not recorded as passed.
58
+
59
+ ## 1.3.0-rc.2 - 2026-09-28
60
+
61
+ - Reject a mismatched `apply_patch` proposal digest during input validation, before requesting operator approval. Invalid calls remain non-mutating and can be corrected by the model; valid calls still require the original approval.
62
+ - Preserve the exact provider certification assertions after the failed RC1 attempt; no historical tag or artifact is changed.
63
+ - Prepare the independent Code RC with an exact Harness RC2 dependency and protected artifact/provenance publication workflow.
64
+
65
+ ## 1.3.0-rc.1 - 2026-09-28
66
+
67
+ - Add explicit terminal-independent Harness engine, protocol, client, local-service and ACP entrypoints while preserving historical root exports and stable signatures.
68
+ - Extract the Code terminal product into its own unpublished package with the distinct `zhivex-code` binary; Harness 1.x keeps its existing binaries and state contracts.
69
+ - Add transitive architecture checks and installed candidate acceptance for engine approvals/recovery and Code execution/cancellation across npm, pnpm, Yarn and Bun. The new APIs target the future Harness 1.3 line; RC1 targets npm `next` and does not claim completion of the provider roadmap.
70
+
7
71
  ## 1.2.0 - 2026-09-27
8
72
 
9
73
  - Promote the code validated in 1.2.0-rc.13 to the stable release line, targeting npm `latest` through the protected GitHub Actions workflow.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  **Work on your code with an agent. Review consequential actions before approving them.**
4
4
 
5
5
  Zhivex Harness is a local terminal assistant and TypeScript library. It supports
6
- OpenAI, Qwen and Meta, with provisional Gemini support. Conversations and pending
6
+ OpenAI, Qwen and Meta, with provisional Gemini, Anthropic and Vertex support. Conversations and pending
7
7
  approvals survive restarts.
8
8
 
9
9
  Use it to understand a repository, discuss a design, investigate a failure or
@@ -11,12 +11,11 @@ implement a change. Conversation context retains decisions, hypotheses and bound
11
11
  diagnostic excerpts across compaction. Edits and command execution keep their
12
12
  own permission checks; a conversational summary never grants approval.
13
13
 
14
- Version `1.2.0` is prepared for stable publication to npm `latest`, based on
15
- published RC13 and its successful protected release workflow. It includes incremental
16
- durable history and bounded active checkpoints for long conversations. Stable
17
- publication remains pending; the installation commands below target 1.2.0 once
18
- published. The [repository release status](https://raw.githubusercontent.com/Zhivex/zhivex-harness/main/release-status.json)
19
- preserves historical stable evidence.
14
+ Version `1.3.0-rc.7` prepares the terminal-independent engine API and the local
15
+ Code package for candidate validation on npm `next`. Publication remains pending
16
+ the protected release workflow. RC4 includes Anthropic, Gemini/Vertex, Desktop package migration, isolated MCP/ACP,
17
+ checkpoints and experimental governance controls. Code publication is independent.
18
+ Stable `1.2.0` remains available under npm `latest`.
20
19
  Desktop retains its separate private alpha status.
21
20
 
22
21
  ## Quick start
@@ -24,7 +23,7 @@ Desktop retains its separate private alpha status.
24
23
  Requires Node.js 22.13.0 or newer, Git and a provider API key.
25
24
 
26
25
  ```sh
27
- npm install -g @zhivex-ai/harness@1.2.0
26
+ npm install -g @zhivex-ai/harness@1.3.0-rc.7
28
27
  cd /path/to/your/project
29
28
  zhx
30
29
  ```
@@ -68,7 +67,7 @@ The default runtime has no OS isolation and exposes no shell-class tools. Runnin
68
67
  commands in isolation requires an explicitly configured Docker or Podman environment;
69
68
  see [Execution environments](docs/EXECUTION_ENVIRONMENTS.md).
70
69
 
71
- Gemini remains provisional. See the [support matrix](docs/SUPPORT_MATRIX.md) and
70
+ Gemini, [Anthropic](docs/ANTHROPIC.md) and [Vertex](docs/VERTEX.md) remain provisional. See the [support matrix](docs/SUPPORT_MATRIX.md) and
72
71
  [security policy](SECURITY.md) for supported configurations and reporting concerns.
73
72
 
74
73
  ## Documentation
@@ -79,7 +78,7 @@ Gemini remains provisional. See the [support matrix](docs/SUPPORT_MATRIX.md) and
79
78
 
80
79
  [Browse documentation](docs/README.md).
81
80
 
82
- Version `1.1.1` is the current public npm release. Source checkout changes can be
81
+ Version `1.2.0` is the current stable public npm release. Source checkout changes can be
83
82
  newer than the published package. Consult the [changelog](CHANGELOG.md) and
84
83
  [repository release status](https://raw.githubusercontent.com/Zhivex/zhivex-harness/main/release-status.json)
85
84
  for the recorded 1.0.0 release; [release evidence](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md)