@zhivex-ai/harness 1.4.0-rc.8 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +126 -72
  3. package/SECURITY.md +1 -1
  4. package/SUPPORT.md +2 -2
  5. package/contracts/client-protocol-v1.schema.json +593 -0
  6. package/contracts/engine-api.json +156 -0
  7. package/contracts/public-api.json +12 -0
  8. package/contracts/stable-api-signatures.json +33 -33
  9. package/dist/acp-cli.js +56 -21
  10. package/dist/audit/index.d.ts +3 -0
  11. package/dist/audit/index.js +482 -0
  12. package/dist/audit/pack.d.ts +72 -0
  13. package/dist/audit-pack-e4vaq7np.js +532 -0
  14. package/dist/cli/arguments.d.ts +3 -1
  15. package/dist/cli/audit-pack.d.ts +24 -0
  16. package/dist/cli/cli-credentials.d.ts +6 -0
  17. package/dist/cli/cli-profiles.d.ts +4 -2
  18. package/dist/cli/node-engine.d.ts +2 -0
  19. package/dist/{cli-3bzvq594.js → cli-1cf4dcnj.js} +245 -642
  20. package/dist/{cli-entry-qav71mxw.js → cli-entry-3s63zn4w.js} +40 -13
  21. package/dist/cli-entry-7f0cen32.js +9990 -0
  22. package/dist/cli-entry-a890x3kq.js +10348 -0
  23. package/dist/{cli-entry-yqwa1943.js → cli-entry-hdtfef27.js} +760 -35
  24. package/dist/cli-entry-rgs6bxmy.js +484 -0
  25. package/dist/cli.js +27 -2
  26. package/dist/client/json-contracts.d.ts +4 -0
  27. package/dist/client/protocol.d.ts +133 -0
  28. package/dist/client/task-control-host.d.ts +400 -0
  29. package/dist/client/task-projection-host.d.ts +12 -0
  30. package/dist/client/task-projection.d.ts +168 -0
  31. package/dist/compat/code-support.js +30 -23
  32. package/dist/{config-depqpsae.js → config-r9fdhce6.js} +5 -4
  33. package/dist/{config-pwbnze4g.js → config-vyajmksy.js} +1 -1
  34. package/dist/engine/acp.js +17 -12
  35. package/dist/engine/client.js +16 -11
  36. package/dist/engine/desktop-providers-v1.d.ts +2 -0
  37. package/dist/engine/desktop-providers-v1.js +24 -3
  38. package/dist/engine/desktop-state-v1.js +13 -9
  39. package/dist/engine/index.d.ts +3 -0
  40. package/dist/engine/index.js +103 -555
  41. package/dist/engine/mcp-stdio-v1.js +10 -7
  42. package/dist/engine/models.js +76 -4
  43. package/dist/engine/protocol.d.ts +2 -0
  44. package/dist/engine/protocol.js +122 -0
  45. package/dist/engine/service.js +17 -12
  46. package/dist/hostile-repository-demo.js +1416 -521
  47. package/dist/{index-txrqqd2r.js → index-02pqtbbg.js} +560 -34
  48. package/dist/{index-nqhnh1hz.js → index-0zs2dz26.js} +767 -932
  49. package/dist/{index-09zphhwt.js → index-1265j7t2.js} +74 -7
  50. package/dist/index-4fx5f3k5.js +269 -0
  51. package/dist/{index-ngg2168h.js → index-4gt045j0.js} +110 -2
  52. package/dist/{index-sbzvrpm7.js → index-6599mpmy.js} +5 -3
  53. package/dist/{index-7y6b4yjx.js → index-74kkpyqk.js} +10 -8
  54. package/dist/{index-pcn2bk8j.js → index-8sm2a1wa.js} +1 -1
  55. package/dist/{index-jdb1q8yn.js → index-bpc596v3.js} +15 -10
  56. package/dist/index-c39197wq.js +552 -0
  57. package/dist/{index-1k248k0w.js → index-crta5wzv.js} +7 -6
  58. package/dist/{index-zmx264xy.js → index-d9zkmhz3.js} +144 -825
  59. package/dist/{index-w9pjt7td.js → index-dtb2c6ds.js} +6 -260
  60. package/dist/index-f6mqa5gk.js +1535 -0
  61. package/dist/index-fm84men1.js +239 -0
  62. package/dist/index-j6zxnc8m.js +490 -0
  63. package/dist/{index-vga76vmb.js → index-mv8sb1ns.js} +5 -3
  64. package/dist/{index-xqxeypt5.js → index-mzydbzp8.js} +76 -4
  65. package/dist/{index-wg1sd3at.js → index-qfsrrnz6.js} +1 -1
  66. package/dist/{index-9v72fpya.js → index-sk3cap35.js} +889 -969
  67. package/dist/index-sstgcsr0.js +511 -0
  68. package/dist/index-wm9xeq1n.js +329 -0
  69. package/dist/index-xdbkcccf.js +719 -0
  70. package/dist/{index-fny13znr.js → index-zxg4ve4j.js} +42 -1549
  71. package/dist/index.d.ts +3 -0
  72. package/dist/index.js +95 -78
  73. package/dist/internal/desktop/providers.d.ts +2 -0
  74. package/dist/models/catalog.d.ts +2 -0
  75. package/dist/persistence/sqlite-database.d.ts +1 -0
  76. package/dist/providers/azure-openai.d.ts +14 -0
  77. package/dist/providers/bedrock.d.ts +23 -0
  78. package/dist/providers/providers.d.ts +1 -1
  79. package/dist/providers/vertex-auth.d.ts +5 -1
  80. package/dist/runtime/durable-review-group.d.ts +33 -0
  81. package/dist/runtime/error-diagnostics.d.ts +8 -0
  82. package/dist/runtime/harness.d.ts +11 -0
  83. package/dist/runtime/provider-transient.d.ts +33 -0
  84. package/dist/runtime/run-interruption.d.ts +7 -0
  85. package/dist/runtime/shared-budget.d.ts +30 -0
  86. package/dist/runtime/task-continuity.d.ts +300 -77
  87. package/dist/runtime/time-to-safe-fix.d.ts +8 -0
  88. package/dist/service-cli.js +17 -12
  89. package/dist/{service-client-cli-ra3yzvjg.js → service-client-cli-eqrdc9zq.js} +400 -305
  90. package/dist/verify-historical-migrations.js +1416 -521
  91. package/dist/zhx.js +27 -2
  92. package/docs/AUDIT_PACK.md +99 -0
  93. package/docs/AZURE_OPENAI.md +53 -0
  94. package/docs/BEDROCK.md +56 -0
  95. package/docs/CLI.md +16 -1
  96. package/docs/CLIENT_PROTOCOL.md +178 -0
  97. package/docs/CODE_RELEASE.md +68 -1
  98. package/docs/CODE_WEB_TASKS.md +116 -0
  99. package/docs/CONTEXT_ENGINEERING.md +59 -0
  100. package/docs/CREDENTIALS.md +21 -0
  101. package/docs/DURABLE_OPERATIONS.md +93 -1
  102. package/docs/ENGINE_API.md +5 -2
  103. package/docs/EXTENSIBILITY.md +2 -2
  104. package/docs/FIRST_USE.md +6 -6
  105. package/docs/MINIMUM_TASK_AUTHORITY.md +3 -3
  106. package/docs/PROJECT_MEMORY.md +1 -1
  107. package/docs/README.md +6 -1
  108. package/docs/STABILITY.md +3 -1
  109. package/docs/SUPPORT_MATRIX.md +1 -1
  110. package/docs/SUPPORT_MATRIX_1_1.md +1 -1
  111. package/docs/USAGE.md +3 -1
  112. package/docs/VERTEX.md +2 -2
  113. package/docs/WEB_LIMITS.md +4 -3
  114. package/docs/adr/0002-isolated-mcp-stdio.md +6 -3
  115. package/docs/support-matrix-1.1.json +3 -1
  116. package/docs/support-matrix.json +6 -4
  117. package/evaluations/code-task-ui.json +20 -0
  118. package/evaluations/representative-assembly-matrix.json +19 -1
  119. package/evaluations/task-projection.json +10 -0
  120. package/evaluations/task-recovery-lab.json +60 -0
  121. package/examples/README.md +5 -5
  122. package/package.json +23 -13
  123. package/dist/cli-entry-25xefnws.js +0 -19900
  124. package/dist/index-8705zxpr.js +0 -145
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
+ ## Unreleased
8
+
9
+ - Add provisional Amazon Bedrock and Azure OpenAI routes. Bedrock pins `@zhivex-ai/bedrock@2.0.7` (Converse uses the AWS credential chain and region and reports Tier B; `BEDROCK_RUNTIME=openai` is the Tier A path). Azure OpenAI pins `@zhivex-ai/azure-openai@0.7.8` (https endpoint, API key, optional API version and deployments map). Core is `@zhivex-ai/core@1.34.0`, which those adapters require. An incomplete Bedrock or Azure environment stays out of the durable transport fingerprint. Desktop forwards the selected route's environment credentials through the worker bootstrap. These routes are uncertified: no live calls, no default certification cohort, and no publish or tags.
10
+ - Add an experimental audit pack on `@zhivex-ai/harness/audit`. `zhx export-audit <task-id> --out <directory>` writes one directory per run, or one directory containing every run on a guided task account. The pack reuses the governance report, every approval decision page up to 512 records, the durable redacted activity journal as JSONL, and the usage ledger projection plus transport summary. Approvals, usage, and the governance report come from one captured run snapshot. A change to that run, its journal, or the task account before signing fails with `AUDIT_PACK_STATE_CHANGED` and writes nothing. The 32 MiB limit includes `manifest.json`. `zhx verify-audit --out <directory>` checks the manifest hashes and an HMAC-SHA256 seal without resolving provider, store, or budget configuration. The signing key is `ZHIVEX_AUDIT_SIGNING_KEY` or `--signing-key-file` and is not stored in the pack. Stable root exports, stable declaration signatures, and existing command option contracts are unchanged. This note does not publish a release.
11
+ - Add experimental Code web task definition, bounded exact delivery review, explicit human acceptance, requirement correction, and budgeted continuation through additive host-owned client commands. Keep check verification, human decisions, and provider usage uncertainty distinct. Failed pre-admission continuations retain scoped previous evidence without inventing budget admissions; ordinary chat cannot bypass a governed task's budget.
12
+ - Migration: negotiate `task.control.v1`; existing chat and task projection v1 remain supported. Use matched Code and Harness builds. Native governed tasks require a clean Git baseline, existing bounded tracked files, declared package checks, and explicit token limits. Human acceptance records operator acknowledgement, not measured semantic quality. No store migration, default cap, automatic retry, or release is introduced. See [Code web tasks](docs/CODE_WEB_TASKS.md).
13
+ - Add experimental versioned `task.get` snapshots over the existing client/service protocol. Project deterministic contract, byte, and check evidence separately from semantic and human acceptance, retain authoritative budget uncertainty, and prohibit automatic effect replay. Negotiate `task.projection.v1`; legacy commands and opt-in budget behavior remain compatible. No new store.
14
+
15
+ ## 1.4.1 - 2026-10-15
16
+
17
+ - Retry a local web reconnect when a command finishes during the durable read, so reconciliation can enable the next session.
18
+ - Keep the Code composer footer readable below 48 columns: model, approval mode and status stay separate clauses and wrap on words.
19
+ - Show a rejected operation as "rejected by you" instead of "operation failed", without echoing the tool name.
20
+ - Show the local web limits dialog, its load and save failures, and the run summary in English, including singular step, tool-call and token counts.
21
+ - Hide the Node 22 ExperimentalWarning for built-in SQLite before the first product line. Other warnings still print.
22
+ - Refuse to start the Harness and Code CLIs when Node is older than engines.node (>=22.13.0), including --help and --version. Bun keeps its own engine check.
23
+ - Describe command reviews as a command that does not run, in the Code terminal and the local web review scope.
24
+ - Pin @zhivex-ai/core 1.33.0 so provider base URLs use the private-host and metadata SSRF checks.
25
+ - Update Anthropic 0.13.2 to 0.14.0, OpenAI 0.14.1 to 0.16.0, and Vertex 1.2.4 to 1.2.7. Vertex 1.2.7 requires those OpenAI and Anthropic ranges. Harness does not call the new experimental Decisions or GPT-Live entrypoints, and provider/API tiers stay unchanged. The development MCP server package moves from 2.2.0 to 2.3.1. Optional `@napi-rs/keyring` moves from 2.1.0 to 2.1.1 in Harness and Code; a missing entry still reads as absent.
26
+ - Prepare Harness 1.4.1 and Code 0.3.1 for npm `latest`, with the exact Code engine pin, private Desktop binding and an additive representative mapping for `v1.4.1` using the unchanged Meta, Qwen and OpenAI models. Retain Agents 1.11.0, Qwen 0.16.4, Meta 0.2.9 and Gemini 0.13.0. Update the ACP development SDK to 1.8.0 and `@types/node` to 26.6.5, and refresh the CodeQL, setup-node, upload-artifact and download-artifact workflow pins. Pause Dependabot updates for private Desktop. Published `latest` is Harness 1.4.0 and Code 0.3.0. Published `next` is Harness 1.4.0-rc.8 and Code 0.3.0-rc.8. `release-status.json` records the verified 1.4.0 publication. The Vertex transient-failure retry and explicit output caps above 2,048 shipped in 1.4.0. This patch does not add them.
27
+ - This preparation creates no tags and dispatches no release.
28
+
29
+ ## 1.4.0 - 2026-10-14
30
+
31
+ - Published to npm `latest` from annotated `v1.4.0` (`53cdfd338cd33f4786629a30ca7f7a8782ba0ac8`), with Code `0.3.0`. Registry integrity is `sha512-kK8m2jcjwXzbvOQOkf1Uvca/ywJVGsc4dSesGZAui1kskQuTsQg3428RHgHdW9q0ZcQtotMHEsuDp3HucLx8bw==`. The protected release workflow [38633520032](https://github.com/Zhivex/zhivex-harness/actions/runs/38633520032) passed exact-artifact validation and live certification.
32
+ - Classify Vertex and Google transient failures as retryable `PROVIDER_UNAVAILABLE` instead of a generic `EXECUTION_FAILED`. The covered cases are HTTP 409 ABORTED, 429 RESOURCE_EXHAUSTED, 500/502/503/504, UNAVAILABLE, DEADLINE_EXCEEDED, and stream resets. Sanitized diagnostics keep the HTTP status and the closed provider status category, and still omit provider messages, resource names, and credentials. That class, and an empty model turn with no text and no tool call, retries up to three times with jittered backoff in the Vertex driver.
33
+ - Explicit positive integer output caps under a monetary limit, including caps above 2,048, were already in 1.4.0-rc.7 and remain in this release. The ledger reserves 2,048 only when the request omits a cap.
34
+ - Prepare stable Harness 1.4.0 and Code 0.3.0 for npm `latest`, with the exact Code engine pin, private Desktop binding and an additive representative mapping for `v1.4.0` using the unchanged Meta, Qwen and OpenAI models. At preparation time the SDK pins were Core 1.31.0 and Agents 1.11.0. Published `next` stays Harness 1.4.0-rc.8 and Code 0.3.0-rc.8.
35
+ - The published tag is not identical to annotated `v1.4.0-rc.8` (`5bba06c86fc82b34b67cec607053948f8e00d0d1`): `src/` includes the Vertex retry above. Before that retry, engine runtime source matched the rc.8 tag. Code (`packages/code`), web (`packages/web`) and desktop (`desktop`) were already not identical to that tag.
36
+ - Carry the reviewed product changes on main after that tag: the same Code review screen for shell `--continue` and `/pending` ([PR201](https://github.com/Zhivex/zhivex-harness/pull/201)); removal of the desktop fixture waiting button ([PR203](https://github.com/Zhivex/zhivex-harness/pull/203)); B-lite review scope on web and desktop ([PR211](https://github.com/Zhivex/zhivex-harness/pull/211)); the Code status line, one-line summary and 48×24 first-welcome logo ([PR210](https://github.com/Zhivex/zhivex-harness/pull/210)); and the public README ([PR200](https://github.com/Zhivex/zhivex-harness/pull/200)). Packaged Harness docs `README.md` and `docs/CLI.md` differ from the rc.8 tag. `docs/CLI_UX.md` and `docs/images/approval-survives-restart.gif` also differ and are outside the Harness `files` list.
37
+ - Require fresh exact-source/artifact validation and separate explicit approval before any paid campaign, annotated tag or publication. Provider/API tiers remain unchanged. This preparation creates no tags and dispatches no release.
38
+
7
39
  ## 1.4.0-rc.8 - 2026-10-08
8
40
 
9
41
  - Prepare matched Harness 1.4.0-rc.8 and Code 0.3.0-rc.8 for npm `next`, with the exact Code engine pin, private Desktop binding and an additive representative mapping using unchanged models. Retain the SDK pins already on main (Core 1.31.0, Agents 1.11.0 and the existing provider packages). Stable `latest` stays Harness 1.3.0 and Code 0.2.0.
package/README.md CHANGED
@@ -1,110 +1,164 @@
1
- # Zhivex Harness
1
+ # Zhivex Code
2
2
 
3
- **Work on your code with an agent. Review consequential actions before approving them.**
3
+ [![npm @zhivex-ai/code](https://img.shields.io/npm/v/@zhivex-ai/code?label=npm%20%40zhivex-ai%2Fcode)](https://www.npmjs.com/package/@zhivex-ai/code)
4
+ [![CI](https://github.com/Zhivex/zhivex-harness/actions/workflows/ci.yml/badge.svg)](https://github.com/Zhivex/zhivex-harness/actions/workflows/ci.yml)
5
+ [![License: MIT](https://img.shields.io/github/license/Zhivex/zhivex-harness)](LICENSE)
4
6
 
5
- Zhivex Harness is a local terminal assistant and TypeScript library. It supports
6
- OpenAI, Qwen and Meta, with provisional Gemini, Anthropic and Vertex support. Conversations and pending
7
- approvals survive restarts.
7
+ An open-source coding agent for your terminal. It asks before it edits or runs a check, and a pending approval is still there after you quit.
8
8
 
9
- Use it to understand a repository, discuss a design, investigate a failure or
10
- implement a change. Conversation context retains decisions, hypotheses and bounded
11
- diagnostic excerpts across compaction. Edits and command execution keep their
12
- own permission checks; a conversational summary never grants approval.
9
+ **Zhivex Code** ([`@zhivex-ai/code`](https://www.npmjs.com/package/@zhivex-ai/code)) is the product you install and run. **Zhivex Harness** ([`@zhivex-ai/harness`](https://www.npmjs.com/package/@zhivex-ai/harness)) is the engine underneath: a governed, provider-portable TypeScript runtime with durable approvals and isolated execution. MIT licensed.
13
10
 
14
- For the developer-facing terminal product, install
15
- `npm install -g @zhivex-ai/code@0.2.0` and run `zhivex-code` in your project.
16
- See [Code installation and first use](https://github.com/Zhivex/zhivex-harness/blob/main/packages/code/README.md). Harness remains
17
- the reusable engine and its compatibility CLI. The `/task` delivery workflow in
18
- this checkout is an unreleased experimental Code addition, not a published feature.
11
+ ## Approval survives a restart
19
12
 
20
- Version `1.3.0` is the current public npm release on `latest`, with terminal-independent engine
21
- entrypoints and the separately published Code CLI `0.2.0` on `latest`. Harness publication passed registry integrity and provenance verification. Harness `1.4.0-rc.6` and
22
- Code `0.3.0-rc.6` are published on `next`. Annotated `v1.4.0-rc.7` was tagged but
23
- not published after live certification failed. The RC.8 versions prepared in this
24
- checkout remain unpublished. Stable package numbering does
25
- not change API stability tiers: beta and experimental APIs retain their policies,
26
- Gemini/Anthropic/Vertex remain provisional, and Desktop remains a private alpha.
13
+ <!-- Recorded with zhivex-code. Scene: ask for a change, review the diff, leave the approval pending, quit,
14
+ then run `zhivex-code --continue` and show the same approval.
15
+ Inside the session, `/continue` starts a new run from an interrupted task;
16
+ the reopen step in this GIF is the `--continue` flag.
17
+ The file is docs/images/approval-survives-restart.gif. Do not add it to either package `files` list.
18
+ npm shows the absolute raw URL below. That URL resolves from main. -->
27
19
 
28
- ## Quick start
20
+ ![Approval survives a restart](https://raw.githubusercontent.com/Zhivex/zhivex-harness/main/docs/images/approval-survives-restart.gif)
21
+
22
+ ## Why it works this way
23
+
24
+ - **You approve the exact change.** Edits and checks wait for an explicit decision bound to that diff. A conversational summary leaves the change unapproved. If the file changed on your side, import fails closed.
25
+ - **The pending decision survives a restart.** Conversations and approvals are stored in SQLite. Quit the terminal, or reboot, and the same approval is waiting.
26
+ - **Your keys, your provider.** OpenAI, Qwen, and Meta pass the release gate. Gemini, Anthropic, Vertex, Amazon Bedrock, and Azure OpenAI are provisional. The same CLI talks to each of them.
29
27
 
30
- Requires Node.js 22.13.0 or newer, Git and a provider API key.
28
+ ## Quick start
31
29
 
32
- Install the stable npm release (`latest`, currently `1.3.0`):
30
+ You need Node.js 22.13 or newer, Git, and a provider API key. Linux and macOS are supported. Windows is unsupported.
33
31
 
34
32
  ```sh
35
- npm install -g @zhivex-ai/harness@latest
33
+ npm install -g @zhivex-ai/code
36
34
  cd /path/to/your/project
37
- zhx
35
+ zhivex-code
38
36
  ```
39
37
 
40
- On first use, choose a provider and model, then enter your API key in the hidden
41
- prompt. Save it in the system keychain (macOS/Linux) or use it only for the current
42
- CLI session. Existing environment keys take precedence. See [First use](docs/FIRST_USE.md)
43
- and [Credentials](docs/CREDENTIALS.md) for setup and automation.
38
+ On first launch, choose a provider and model. If no key is already available, enter one in the hidden prompt and save it in the system keychain, or keep it for this session only. An existing environment variable takes precedence. The same prompts are documented for the engine command `zhx` in [First use](docs/FIRST_USE.md) and [Credentials](docs/CREDENTIALS.md).
44
39
 
45
40
  Try: “Explain this repository and suggest a small improvement.”
46
41
 
47
- Type `/` for common actions. `/model` changes the model, `/sessions` finds previous
48
- conversations, and `/diff` shows changes. Review requested actions before approving
49
- them. Ctrl+C stops active work; it does not undo completed changes.
42
+ Type `/` for common actions. `/model` changes the model, `/sessions` finds earlier conversations, and `/diff` shows workspace changes. Review each requested action before you approve it. Ctrl+C stops the active run. It leaves completed work in place.
43
+
44
+ | Command | Purpose |
45
+ | --- | --- |
46
+ | `zhivex-code` | Open the conversation |
47
+ | `zhivex-code --continue` | Reopen the latest conversation. A pending approval opens the review screen |
48
+ | `zhivex-code run "task"` | Run one task for a script |
49
+ | `zhivex-code doctor` | Check local configuration |
50
+ | `zhivex-code --help` | Short guide |
51
+ | `zhivex-code help all` | Full command reference |
52
+
53
+ `zhivex-code <command> --help` shows one command. Inside the session, `/help` lists everyday actions and `/help all` lists the rest.
54
+
55
+ ### Command names
56
+
57
+ Each package owns its own commands. Installing both leaves each command in place. Nothing here adds or renames a command.
58
+
59
+ | Package | Commands |
60
+ | --- | --- |
61
+ | `@zhivex-ai/code` | `zhivex-code` |
62
+ | `@zhivex-ai/harness` | `zhx` and `zhivex-harness` (the same engine CLI), plus `zhx-acp` for the experimental editor protocol |
50
63
 
51
- ## Release candidates
64
+ `zhx chat` remains a supported way to open the engine console.
52
65
 
53
- This checkout prepares Harness `1.4.0-rc.8` and Code `0.3.0-rc.8` for `next`, with an exact engine pin. Project memory, compact terminal review and the local browser workspace ship together after protected validation. See the [release procedure](https://github.com/Zhivex/zhivex-harness/blob/main/docs/RELEASE.md). RC.8 publication is pending. It includes the reviewed duplicate-delegation fix on main after RC.7. Published npm `next` is Harness `1.4.0-rc.6` and Code `0.3.0-rc.6`. Annotated `v1.4.0-rc.7` was tagged but not published after Qwen live certification failed; that source and tag cannot certify RC.8. The held RC.5 campaign and failed RC.4 attempt remain preserved. These prerelease candidates are separate from the stable `latest` channel.
66
+ ### A pending approval is still there
54
67
 
55
- Use candidates only for prerelease validation. Check [npm versions](https://www.npmjs.com/package/@zhivex-ai/harness?activeTab=versions)
56
- and the [release procedure](https://github.com/Zhivex/zhivex-harness/blob/main/docs/RELEASE.md)
57
- before installing a candidate; `next` can still point to an earlier RC.
68
+ Two different actions share the word “continue”:
58
69
 
59
- After publication of this exact candidate:
70
+ | Where | What you type | What happens |
71
+ | --- | --- | --- |
72
+ | Shell, after you quit | `zhivex-code --continue` | Reopens the latest conversation. A pending approval opens the review screen. |
73
+ | Inside the session | `/continue` | Starts a new run from an interrupted task and keeps the earlier results. |
74
+
75
+ `/continue` is the in-session command. The shell flag that reopens the latest conversation is `--continue`, on `zhivex-code` and on `zhx`. On `zhivex-code`, that screen is `r` Reject, `a` Approve N file(s), `d` Details, and Esc to decide later. A check uses `Approve 1 command` instead of the file label. `/pending` opens the same screen. A new turn waits until you decide. On `zhx`, `--continue` reopens and prints the pending approval; `/pending`, then `/approve` or `/deny`, decides it. `/continue` inside that session starts a new run.
76
+
77
+ ### Try it with no API key
78
+
79
+ The Code package includes an offline tutorial. It needs an interactive terminal. It makes no provider calls. Responses, token counts, and prices are synthetic.
60
80
 
61
81
  ```sh
62
- npm install -g @zhivex-ai/harness@1.4.0-rc.8
82
+ node "$(npm root -g)/@zhivex-ai/code/examples/first-use.mjs"
63
83
  ```
64
84
 
65
- ## A few commands are enough
85
+ The script prints the guided sequence and a command to reopen the same temporary workspace.
66
86
 
67
- | Command | Purpose |
87
+ ### Credentials
88
+
89
+ | Provider | What the CLI accepts |
68
90
  | --- | --- |
69
- | `zhx` | Open the conversation |
70
- | `zhx --continue` | Continue the latest conversation |
71
- | `zhx run "task"` | Run one task for automation |
72
- | `zhx doctor` | Diagnose local configuration |
73
- | `zhx --help` | Show the short guide |
91
+ | OpenAI | `OPENAI_API_KEY` |
92
+ | Qwen | `DASHSCOPE_API_KEY` or `QWEN_API_KEY` |
93
+ | Meta | `MODEL_API_KEY` |
94
+ | Gemini (provisional) | `GEMINI_API_KEY` or `GOOGLE_GENERATIVE_AI_API_KEY` |
95
+ | Anthropic (provisional) | `ANTHROPIC_API_KEY` |
96
+ | Vertex (provisional) | Application Default Credentials, plus `GOOGLE_CLOUD_PROJECT` and `VERTEX_LOCATION`. Code does not ask for a Vertex API key. |
97
+ | Amazon Bedrock (provisional) | AWS credential chain plus `AWS_REGION` or `AWS_DEFAULT_REGION`. `BEDROCK_RUNTIME=openai` also needs `BEDROCK_OPENAI_BASE_URL` and `BEDROCK_API_KEY` or `AWS_BEARER_TOKEN_BEDROCK`. |
98
+ | Azure OpenAI (provisional) | `AZURE_OPENAI_API_KEY` and https `AZURE_OPENAI_ENDPOINT`. Optional `AZURE_OPENAI_API_VERSION` and `AZURE_OPENAI_DEPLOYMENTS`. |
74
99
 
75
- Use `zhx <command> --help` for command-specific options, or `zhx help all` for the
76
- complete reference. Existing `zhx chat` and `zhivex-harness` commands remain supported.
100
+ Use `/credentials` later to replace or remove a saved key. `zhivex-code doctor` reports whether a credential is present. It does not call the provider.
77
101
 
78
- ## CLI, library or Desktop?
102
+ ## What you can count on
79
103
 
80
- The npm package includes the CLI and TypeScript library. [Desktop](https://github.com/Zhivex/zhivex-harness/blob/main/desktop/README.md)
81
- is a separate Electron application, currently alpha for macOS Apple Silicon.
82
- It is not included in npm and has its own build and distribution process. Its local
83
- package is unsigned and unnotarized; automatic updates are disabled pending production trust setup and validation.
104
+ | | |
105
+ | --- | --- |
106
+ | Approval | Explicit, bound to the exact diff. Per-file changed regions are shown when a preview is available. |
107
+ | Durability | SQLite keeps the conversation and any pending approval across quit and reboot. |
108
+ | Secrets | `.env`, private keys, Git internals, and dependency directories stay out of model exploration. |
109
+ | Commands | The default runtime exposes no shell tools. Isolated commands need an explicitly configured Docker or Podman environment. |
110
+ | Where it runs | On your machine. Linux and macOS. |
84
111
 
85
- ## Permissions and limits
112
+ From a source checkout, `bun run demo:hostile` runs a reproducible hostile-repository demo (a malicious README and a decoy `.env`, with network denied). See [Hostile repository demonstration](docs/HOSTILE_REPOSITORY_DEMO.md). That demo needs a local build, Docker or Podman, and a preloaded image.
86
113
 
87
- Edits and checks require approval by default. Files such as `.env`, private keys,
88
- Git internals and dependency directories are excluded from model exploration.
89
- The default runtime has no OS isolation and exposes no shell-class tools. Running
90
- commands in isolation requires an explicitly configured Docker or Podman environment;
91
- see [Execution environments](docs/EXECUTION_ENVIRONMENTS.md).
114
+ ## Providers and platforms
92
115
 
93
- Gemini, [Anthropic](docs/ANTHROPIC.md) and [Vertex](docs/VERTEX.md) remain provisional. See the [support matrix](docs/SUPPORT_MATRIX.md) and
94
- [security policy](SECURITY.md) for supported configurations and reporting concerns.
116
+ Release-gated providers are OpenAI, Qwen, and Meta. **Gemini, Anthropic, Vertex, Amazon Bedrock, and Azure OpenAI are provisional**: the integrations exist, and they do not yet have the same end-to-end release evidence. Details: [support matrix](docs/SUPPORT_MATRIX.md), [Anthropic](docs/ANTHROPIC.md), [Vertex](docs/VERTEX.md), [Bedrock](docs/BEDROCK.md), [Azure OpenAI](docs/AZURE_OPENAI.md).
117
+
118
+ | Area | Status |
119
+ | --- | --- |
120
+ | Operating systems | Linux and macOS. Windows is unsupported. |
121
+ | Runtime | Node.js 22.13 or newer. Bun is contributor tooling. |
122
+ | MCP | Bounded Streamable HTTP is supported. stdio is outside the default CLI. An experimental host-only path can launch stdio servers in Docker; see [Isolated MCP stdio](docs/MCP_STDIO.md). |
123
+ | Editor protocol | `zhx-acp` is an experimental ACP subset: text sessions, one-time permissions, and cancellation. Output is buffered until the run finishes. ACP cannot load or resume a session. See [ACP](docs/ACP.md). |
124
+ | Isolated commands | Docker on Linux is supported. Podman is provisional. See [Execution environments](docs/EXECUTION_ENVIRONMENTS.md). |
125
+ | Desktop | Separate private alpha for macOS Apple Silicon. Unsigned, and not part of the npm package. See [Desktop](https://github.com/Zhivex/zhivex-harness/blob/main/desktop/README.md). |
126
+
127
+ ## Use the engine as a library
128
+
129
+ Code is the terminal product and has no public library API. Harness is the embeddable runtime. Hosts construct it, supply credentials, and resolve approvals:
130
+
131
+ ```ts
132
+ import { createHarness } from "@zhivex-ai/harness/engine";
133
+ import { createHarnessClientAdapter } from "@zhivex-ai/harness/client";
134
+
135
+ const harness = await createHarness({
136
+ workspace: "/absolute/path/to/project",
137
+ provider: "openai",
138
+ model: "your-supported-model"
139
+ });
140
+ const client = await createHarnessClientAdapter(harness);
141
+ try {
142
+ // Dispatch with the client protocol. Approve each consequential action explicitly.
143
+ } finally {
144
+ client.close();
145
+ await harness.close();
146
+ }
147
+ ```
148
+
149
+ Contracts, stability tiers, and the experimental ACP and MCP entry points are in the [engine API](docs/ENGINE_API.md).
95
150
 
96
151
  ## Documentation
97
152
 
98
- - **Users:** [First use](docs/FIRST_USE.md), [daily workflow](docs/CLI.md#interactive-daily-workflow), [usage reference](docs/USAGE.md).
99
- - **Integrators:** [CLI contracts](docs/CLI.md), [extensibility](docs/EXTENSIBILITY.md), [API stability](docs/STABILITY.md).
100
- - **Contributors:** [Development](https://github.com/Zhivex/zhivex-harness/blob/main/CONTRIBUTING.md) and [maintenance](https://github.com/Zhivex/zhivex-harness/blob/main/docs/MAINTENANCE.md).
153
+ - **Using Code:** [Code package notes](https://github.com/Zhivex/zhivex-harness/blob/main/packages/code/README.md), [first use](docs/FIRST_USE.md), [daily workflow](docs/CLI.md#interactive-daily-workflow), [usage reference](docs/USAGE.md), [Code web tasks](docs/CODE_WEB_TASKS.md).
154
+ - **Integrating Harness:** [engine API](docs/ENGINE_API.md), [CLI contracts](docs/CLI.md), [experimental task projection](docs/CLIENT_PROTOCOL.md#task-projection-v1-har-hu-73), [extensibility](docs/EXTENSIBILITY.md), [API stability](docs/STABILITY.md).
155
+ - **Limits:** [support matrix](docs/SUPPORT_MATRIX.md), [security policy](SECURITY.md).
156
+ - **Contributing:** [development](https://github.com/Zhivex/zhivex-harness/blob/main/CONTRIBUTING.md) and [maintenance](https://github.com/Zhivex/zhivex-harness/blob/main/docs/MAINTENANCE.md).
157
+
158
+ [Browse the documentation index](docs/README.md).
101
159
 
102
- [Browse documentation](docs/README.md).
160
+ ## Releases
103
161
 
104
- Version `1.3.0` is the current public npm release. Source checkout changes can be
105
- newer than the published package. Consult the [changelog](CHANGELOG.md) and
106
- [repository release status](https://raw.githubusercontent.com/Zhivex/zhivex-harness/main/release-status.json)
107
- for the verified 1.3.0 publication; [release evidence](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md)
108
- records validation scope and limitations.
162
+ Version `1.4.0` is the current public npm release. The paired Code package on npm `latest` is `0.3.0`. This checkout prepares Version `1.4.1` and Code `0.3.1` for `latest`. That publication is pending, so the quick start above follows the published `latest` tag. npm `next` is Harness `1.4.0-rc.8` and Code `0.3.0-rc.8`. Confirm dist-tags on the [Code versions](https://www.npmjs.com/package/@zhivex-ai/code?activeTab=versions) and [Harness versions](https://www.npmjs.com/package/@zhivex-ai/harness?activeTab=versions) pages before you install a prerelease.
109
163
 
110
- Experimental next-version work includes [project memory](docs/PROJECT_MEMORY.md): explicit, reviewable notes scoped to one project, with bounded retrieval and deletion controls.
164
+ Release channels, publication, and certification records are in the [release procedure](https://github.com/Zhivex/zhivex-harness/blob/main/docs/RELEASE.md). Releases are verified with npm provenance. Source in this checkout can be newer than the public package. See the [changelog](CHANGELOG.md) and the [repository release status](https://raw.githubusercontent.com/Zhivex/zhivex-harness/main/release-status.json).
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 `1.3.x` patch of Harness and the latest stable Code `0.1.x` patch. RCs on `next` are validation candidates; older minors and private checkpoints are not supported release channels. Desktop remains a separate private alpha. Beta and experimental features retain their documented limitations. Registry integrity and provenance do not substitute for the separate provider and execution evidence recorded in [docs/LIVE_CERTIFICATION.md](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md).
5
+ Security fixes are provided for the latest published `1.3.x` patch of Harness and the latest stable Code `0.2.x` patch. Harness `1.4.x` and Code `0.3.x` are supported only after verified publication. RCs on `next` are validation candidates; older minors and private checkpoints are not supported release channels. Desktop remains a separate private alpha. Beta and experimental features retain their documented limitations. Registry integrity and provenance do not substitute for the separate provider and execution evidence recorded in [docs/LIVE_CERTIFICATION.md](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md).
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 `1.3.x` is the latest supported Node-first CLI and TypeScript library. Stable 1.x contracts follow [the stability policy](./docs/STABILITY.md); incompatible changes require a major release except documented urgent security corrections. Beta and experimental surfaces retain their declared policies. The mutable machine-readable `release-status.json` record records the verified 1.3.0 publication. Harness 1.3.0 and Code 0.1.0 are published and verified on latest through their protected workflows.
3
+ Zhivex Harness `1.3.x` is the latest supported Node-first CLI and TypeScript library. Stable 1.x contracts follow [the stability policy](./docs/STABILITY.md); incompatible changes require a major release except documented urgent security corrections. Beta and experimental surfaces retain their declared policies. The mutable machine-readable `release-status.json` record records the verified 1.3.0 publication. Harness 1.4.1 and Code 0.3.1 are prepared for latest but remain pending their protected workflows. Harness 1.3.0 and Code 0.2.0 stay the published latest packages.
4
4
 
5
5
  The 1.1 support scope is tracked in the [machine-readable support matrix](./docs/support-matrix-1.1.json) and its [human-readable view](./docs/SUPPORT_MATRIX_1_1.md). The [1.0 matrix](./docs/SUPPORT_MATRIX.md) remains historical. Compatibility and removals follow [DEPRECATIONS.md](./docs/DEPRECATIONS.md) for the published 1.x line.
6
6
 
@@ -13,7 +13,7 @@ The 1.1 support scope is tracked in the [machine-readable support matrix](./docs
13
13
  - the provider/model combinations marked certified in the package documentation; and
14
14
  - HTTPS or explicitly allowed loopback-HTTP MCP endpoints using the documented bounded JSON-RPC subset.
15
15
 
16
- Only the most recent published stable minor receives routine fixes. The exact `v1.3.0` tag passed the protected artifact, six-provider live and 42-case representative release jobs. Harness 1.3.x and Code 0.1.x are the supported stable lines. Gemini, Anthropic and Vertex remain provisional despite the release-bound live gates; the representative repository matrix covers only Meta, Qwen and OpenAI. Live provider evidence is account-, model-, endpoint-, artifact-, and date-dependent; see [docs/LIVE_CERTIFICATION.md](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md).
16
+ Only the most recent published stable minor receives routine fixes. The exact `v1.3.0` tag passed the protected artifact, six-provider live and 42-case representative release jobs. Harness 1.3.x and Code 0.2.x are the supported stable lines until 1.4.1 and Code 0.3.1 complete verified publication. Gemini, Anthropic and Vertex remain provisional despite the release-bound live gates; the representative repository matrix covers only Meta, Qwen and OpenAI. Live provider evidence is account-, model-, endpoint-, artifact-, and date-dependent; see [docs/LIVE_CERTIFICATION.md](https://github.com/Zhivex/zhivex-harness/blob/main/docs/LIVE_CERTIFICATION.md).
17
17
 
18
18
  ## Installation diagnostics
19
19