@zhivex-ai/harness 1.2.0 → 1.3.0-rc.3
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 +19 -0
- package/README.md +7 -8
- package/contracts/engine-api.json +2587 -0
- package/dist/acp-cli.js +95 -14996
- package/dist/cli/cli-options.d.ts +2 -41
- package/dist/cli/cli-stream.d.ts +2 -167
- package/dist/cli/run-document.d.ts +2 -91
- package/dist/cli/terminal/terminal-continuation.d.ts +2 -3
- package/dist/{cli-entry-427869g9.js → cli-entry-0mmeag20.js} +49 -1
- package/dist/{cli-entry-b1mfvmxe.js → cli-entry-7h9savv5.js} +1 -2
- package/dist/{cli-entry-c2f58zj2.js → cli-entry-xmf48p6a.js} +27 -18
- package/dist/{cli-3jmy4h5h.js → cli-qgwvtk0w.js} +5 -6
- package/dist/cli.js +2 -2
- package/dist/client/continuation.d.ts +3 -0
- package/dist/client/run-document.d.ts +91 -0
- package/dist/client/stream.d.ts +167 -0
- package/dist/compat/cli-options.d.ts +41 -0
- package/dist/compat/code-support.d.ts +22 -0
- package/dist/compat/code-support.js +138 -0
- package/dist/config-6gtpxvjv.js +59 -0
- package/dist/{config-1k9t4jhh.js → config-q32jm1e6.js} +1 -1
- package/dist/engine/acp.d.ts +4 -0
- package/dist/engine/acp.js +9 -0
- package/dist/engine/client.d.ts +6 -0
- package/dist/engine/client.js +21 -0
- package/dist/engine/index.d.ts +61 -0
- package/dist/engine/index.js +477 -0
- package/dist/engine/protocol.d.ts +6 -0
- package/dist/engine/protocol.js +158 -0
- package/dist/engine/service.d.ts +5 -0
- package/dist/engine/service.js +21 -0
- package/dist/hostile-repository-demo.js +59 -1
- package/dist/index-1bx83sw4.js +4 -0
- package/dist/index-2aymdsqc.js +150 -0
- package/dist/index-41fkzt91.js +293 -0
- package/dist/index-5wjwe91x.js +9434 -0
- package/dist/index-77h9qr5h.js +326 -0
- package/dist/index-d0wrghff.js +3271 -0
- package/dist/index-f4sb0e2q.js +318 -0
- package/dist/index-fvca1xea.js +2069 -0
- package/dist/index-kfgt9yqq.js +526 -0
- package/dist/index-pgqz45fj.js +2449 -0
- package/dist/index.js +238 -18649
- package/dist/service-cli.js +10 -14502
- package/dist/{service-client-cli-yx56n0hc.js → service-client-cli-gs78wrxe.js} +2 -2
- package/dist/verify-historical-migrations.js +59 -1
- package/dist/zhx.js +2 -2
- package/docs/CODE_RELEASE.md +93 -0
- package/docs/ENGINE_API.md +111 -0
- package/docs/FIRST_USE.md +6 -6
- package/docs/README.md +5 -0
- package/docs/STABILITY.md +6 -0
- package/evaluations/representative-assembly-matrix.json +28 -1
- package/examples/README.md +1 -1
- package/package.json +35 -4
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
navigateConsole,
|
|
12
12
|
sanitizeTerminalText,
|
|
13
13
|
serializeStreamResult
|
|
14
|
-
} from "./cli-entry-
|
|
14
|
+
} from "./cli-entry-xmf48p6a.js";
|
|
15
15
|
import {
|
|
16
16
|
HARNESS_VERSION
|
|
17
17
|
} from "./cli-entry-64pdp3k5.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
HarnessStateConflictError,
|
|
23
23
|
PROVIDERS,
|
|
24
24
|
reasoningEffortSchema
|
|
25
|
-
} from "./cli-entry-
|
|
25
|
+
} from "./cli-entry-0mmeag20.js";
|
|
26
26
|
import {
|
|
27
27
|
__require
|
|
28
28
|
} from "./cli-entry-1bx83sw4.js";
|
|
@@ -110,6 +110,7 @@ var createMetaContinuationFetch = (fetcher = fetch, backoff = [1000, 2000]) => {
|
|
|
110
110
|
|
|
111
111
|
// src/providers/meta-replay.ts
|
|
112
112
|
import { wrapLanguageModel as wrapLanguageModel2 } from "@zhivex-ai/core";
|
|
113
|
+
import { withTimeoutSignal } from "@zhivex-ai/core/provider";
|
|
113
114
|
import { createMeta } from "@zhivex-ai/meta";
|
|
114
115
|
var replayPlan = (messages) => {
|
|
115
116
|
let offset = 0;
|
|
@@ -183,7 +184,54 @@ var createMetaReplayModel = (options, modelId) => {
|
|
|
183
184
|
},
|
|
184
185
|
async wrapStream({ input }) {
|
|
185
186
|
const prepared = prepare(input);
|
|
186
|
-
|
|
187
|
+
const lifetime = withTimeoutSignal(prepared.input);
|
|
188
|
+
const { timeoutMs: _timeout, ...request } = prepared.input;
|
|
189
|
+
try {
|
|
190
|
+
const stream = await prepared.model.stream({ ...request, abortSignal: lifetime.signal });
|
|
191
|
+
const iterator = stream[Symbol.asyncIterator]();
|
|
192
|
+
const owned = {
|
|
193
|
+
[Symbol.asyncIterator]() {
|
|
194
|
+
return owned;
|
|
195
|
+
},
|
|
196
|
+
async next() {
|
|
197
|
+
try {
|
|
198
|
+
const result = await iterator.next();
|
|
199
|
+
if (result.done)
|
|
200
|
+
lifetime.cleanup();
|
|
201
|
+
return result;
|
|
202
|
+
} catch (error) {
|
|
203
|
+
lifetime.cleanup();
|
|
204
|
+
throw error;
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
async return() {
|
|
208
|
+
try {
|
|
209
|
+
return await iterator.return?.() ?? { done: true, value: undefined };
|
|
210
|
+
} finally {
|
|
211
|
+
lifetime.cleanup();
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
async throw(error) {
|
|
215
|
+
try {
|
|
216
|
+
if (iterator.throw) {
|
|
217
|
+
const result = await iterator.throw(error);
|
|
218
|
+
if (result.done)
|
|
219
|
+
lifetime.cleanup();
|
|
220
|
+
return result;
|
|
221
|
+
}
|
|
222
|
+
await iterator.return?.();
|
|
223
|
+
throw error;
|
|
224
|
+
} catch (failure) {
|
|
225
|
+
lifetime.cleanup();
|
|
226
|
+
throw failure;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
return owned;
|
|
231
|
+
} catch (error) {
|
|
232
|
+
lifetime.cleanup();
|
|
233
|
+
throw error;
|
|
234
|
+
}
|
|
187
235
|
}
|
|
188
236
|
}]);
|
|
189
237
|
};
|
|
@@ -4038,6 +4086,16 @@ var editProposalSchema = z8.strictObject({
|
|
|
4038
4086
|
var applyEditProposalInputSchema = z8.strictObject({
|
|
4039
4087
|
proposalId: fileDigestSchema,
|
|
4040
4088
|
changes: editChangesSchema
|
|
4089
|
+
}).superRefine((input, context) => {
|
|
4090
|
+
if (!editProposalInputSchema.safeParse({ changes: input.changes }).success)
|
|
4091
|
+
return;
|
|
4092
|
+
if (createEditProposal({ changes: input.changes }).proposalId !== input.proposalId) {
|
|
4093
|
+
context.addIssue({
|
|
4094
|
+
code: "custom",
|
|
4095
|
+
path: ["proposalId"],
|
|
4096
|
+
message: "proposalId does not match the supplied paths, preconditions, and content. Read proposalId from the matching propose_edits result; do not invent it."
|
|
4097
|
+
});
|
|
4098
|
+
}
|
|
4041
4099
|
});
|
|
4042
4100
|
var moveFileInputSchema = z8.strictObject({
|
|
4043
4101
|
source: workspaceFilePathSchema,
|
package/dist/zhx.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
shortCliHelp
|
|
4
|
-
} from "./cli-entry-
|
|
4
|
+
} from "./cli-entry-7h9savv5.js";
|
|
5
5
|
import {
|
|
6
6
|
HARNESS_VERSION
|
|
7
7
|
} from "./cli-entry-64pdp3k5.js";
|
|
@@ -18,6 +18,6 @@ if (argv.length === 1 && ["--version", "-v", "version"].includes(argv[0])) {
|
|
|
18
18
|
process.stdout.write(`${shortCliHelp(HARNESS_VERSION)}
|
|
19
19
|
`);
|
|
20
20
|
} else {
|
|
21
|
-
const { runCli } = await import("./cli-
|
|
21
|
+
const { runCli } = await import("./cli-qgwvtk0w.js");
|
|
22
22
|
await runCli(argv);
|
|
23
23
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Code release procedure
|
|
2
|
+
|
|
3
|
+
Code is released independently of Harness. The initial candidate is
|
|
4
|
+
`@zhivex-ai/code@0.1.0-rc.1`, with the sole binary `zhivex-code`, npm tag `next`,
|
|
5
|
+
and the exact dependency `@zhivex-ai/harness@1.3.0-rc.3`. Harness must first be
|
|
6
|
+
published and verified through its protected release workflow. This document
|
|
7
|
+
records preparation, not successful publication.
|
|
8
|
+
|
|
9
|
+
## Release preparation
|
|
10
|
+
|
|
11
|
+
1. Merge the Code release PR after required review and successful checks.
|
|
12
|
+
2. Wait for the latest `ci.yml` and `codeql.yml` **push runs on main** to succeed
|
|
13
|
+
for the exact commit. Keep the Code manifest, version and engine pin unchanged
|
|
14
|
+
after selecting that commit.
|
|
15
|
+
3. From a clean checkout of that main commit, create an annotated
|
|
16
|
+
`code-v0.1.0-rc.1` tag and push it. Never move or overwrite release tags.
|
|
17
|
+
4. Dispatch `release-code.yml` **at that tag**, with input `tag` matching it and
|
|
18
|
+
`mode=bootstrap`. Dispatching main while supplying a different tag is rejected.
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
gh workflow run release-code.yml --ref code-v0.1.0-rc.1 \
|
|
22
|
+
-f tag=code-v0.1.0-rc.1 -f mode=bootstrap -f confirm_publication=false
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The workflow validates tag identity, main ancestry, exact CI/CodeQL, Code source
|
|
26
|
+
and package boundaries. It downloads the pinned Harness version from npm and
|
|
27
|
+
verifies its integrity; missing publication or provenance stops the release.
|
|
28
|
+
It builds Code once, inspects package contents, installs it against the actual
|
|
29
|
+
registry dependency without overrides, and tests the retained Code and Harness
|
|
30
|
+
artifacts with npm, pnpm, Yarn and Bun. The paired matrix uses explicit engine
|
|
31
|
+
artifact overrides; the separate standalone installation proves npm resolution.
|
|
32
|
+
This does not claim every future engine version or installation order is certified.
|
|
33
|
+
|
|
34
|
+
The workflow generates genuine npm/Sigstore provenance using pinned npm 11.6.1
|
|
35
|
+
inside the GitHub-hosted build job. It retains `code.tgz`, `code.sigstore.json`,
|
|
36
|
+
`SHA512SUMS`, and installed acceptance in `code-release-<full-source-sha>`.
|
|
37
|
+
Bootstrap mode **does not publish**. No npm token is copied into GitHub.
|
|
38
|
+
|
|
39
|
+
## First publication
|
|
40
|
+
|
|
41
|
+
npm requires the package to exist before configuring its trusted publisher;
|
|
42
|
+
staged publishing also requires an existing package. An authenticated scope
|
|
43
|
+
owner performs the first publication using the successful workflow's retained
|
|
44
|
+
artifact and provenance bundle. Do not rebuild the tarball locally.
|
|
45
|
+
|
|
46
|
+
Download the artifact from the exact successful run, then verify it in a clean
|
|
47
|
+
checkout of its annotated Code tag. `CODE_EXPECTED_SHA` must be that tag's full
|
|
48
|
+
commit SHA. Install npm 11.6.1 into an isolated tools directory and set
|
|
49
|
+
`CODE_PROVENANCE_NPM_ROOT` to its `node_modules/npm` directory.
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
(cd release-code-artifacts && shasum -a 512 -c SHA512SUMS)
|
|
53
|
+
bun run scripts/code-release.ts inspect release-code-artifacts/code.tgz
|
|
54
|
+
CODE_EXPECTED_SHA="$(git rev-list -n 1 code-v0.1.0-rc.1)" \
|
|
55
|
+
node scripts/code-bootstrap-provenance.cjs verify \
|
|
56
|
+
release-code-artifacts/code.tgz release-code-artifacts/code.sigstore.json
|
|
57
|
+
node "$CODE_PROVENANCE_NPM_ROOT/bin/npm-cli.js" publish \
|
|
58
|
+
./release-code-artifacts/code.tgz --ignore-scripts --access public \
|
|
59
|
+
--tag next --provenance-file ./release-code-artifacts/code.sigstore.json
|
|
60
|
+
bun run scripts/code-release.ts verify release-code-artifacts/code.tgz
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The provenance verifier checks the Sigstore signature, GitHub issuer, exact
|
|
64
|
+
workflow/tag identity, source commit and tarball digest. Complete any npm 2FA
|
|
65
|
+
challenge directly; do not put a one-time code into documentation or logs. If npm
|
|
66
|
+
accepts publication but verification fails, inspect registry state and retry
|
|
67
|
+
verification with the same retained bytes. An existing different digest is a
|
|
68
|
+
hard failure; never attempt to replace that version.
|
|
69
|
+
|
|
70
|
+
## Subsequent releases with Trusted Publishing
|
|
71
|
+
|
|
72
|
+
In npm package settings, configure GitHub Actions with organization `Zhivex`,
|
|
73
|
+
repository `zhivex-harness`, workflow filename `release-code.yml`, and environment
|
|
74
|
+
`npm`. Enable the allowed action `npm publish`; the OIDC job uses direct
|
|
75
|
+
publishing after GitHub approval, not `npm stage publish`. Preserve the GitHub
|
|
76
|
+
environment's required human approval. Then prepare a
|
|
77
|
+
new Code RC/version and annotated tag through the same PR and main CI process.
|
|
78
|
+
Dispatch its tag with `mode=oidc` and `confirm_publication=true`.
|
|
79
|
+
|
|
80
|
+
All Code tags share one workflow concurrency group. Before publishing, the
|
|
81
|
+
registry gate also rejects moving `next` back to an older RC, including when
|
|
82
|
+
GitHub schedules queued workflows out of order.
|
|
83
|
+
|
|
84
|
+
The publish job downloads the validated artifact without rebuilding it,
|
|
85
|
+
rechecks identity and digest after protected approval, and uses npm OIDC plus
|
|
86
|
+
provenance. It verifies registry tarball bytes, the `next` distribution tag and
|
|
87
|
+
SLSA source/workflow identity. A successful dispatch or tag is not publication;
|
|
88
|
+
only successful registry verification confirms the release. When a run has
|
|
89
|
+
already published, rerun only the failed publish job to retain original bytes.
|
|
90
|
+
|
|
91
|
+
Official references: [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers/),
|
|
92
|
+
[npm provenance](https://docs.npmjs.com/generating-provenance-statements/), and
|
|
93
|
+
[npm staged publishing](https://docs.npmjs.com/staged-publishing/).
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Engine API and Code integration
|
|
2
|
+
|
|
3
|
+
This checkout adds terminal-independent package entrypoints for
|
|
4
|
+
Harness 1.3.0-rc.3. They are not present in the previously published Harness 1.2.0.
|
|
5
|
+
Publication is pending the protected workflow; use the documented
|
|
6
|
+
local candidate smoke to validate these bytes. Do not install registry 1.2.0 and
|
|
7
|
+
expect the new entrypoints to exist.
|
|
8
|
+
|
|
9
|
+
## Entry points
|
|
10
|
+
|
|
11
|
+
| Import | Use | Runtime |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| `@zhivex-ai/harness/engine` | Configuration, execution, policies, approvals, tools, stores, providers and historical non-terminal library APIs | Node |
|
|
14
|
+
| `@zhivex-ai/harness/protocol` | Wire request schemas, client types and JSON/event serialization | Browser or Node |
|
|
15
|
+
| `@zhivex-ai/harness/client` | In-process client adapter, result projection and durable continuation helpers | Node |
|
|
16
|
+
| `@zhivex-ai/harness/service` | Authenticated local service, recovery and activity events | Node |
|
|
17
|
+
| `@zhivex-ai/harness/acp` | Experimental text-session ACP adapter and stream transport | Node |
|
|
18
|
+
| `@zhivex-ai/harness/code-support` | Named host helpers used by Code, including a read-only SQLite diagnostic projection | Node |
|
|
19
|
+
|
|
20
|
+
[`contracts/engine-api.json`](../contracts/engine-api.json) enumerates every named
|
|
21
|
+
export and its stability tier. Existing aliases keep their root tier. New helpers
|
|
22
|
+
have their explicitly recorded tier; importing through a new subpath does not
|
|
23
|
+
upgrade an experimental API. The historical root export and its stable signature
|
|
24
|
+
baseline remain supported. Host-loading JSON document schemas are available from
|
|
25
|
+
`/engine`, not the browser protocol entrypoint.
|
|
26
|
+
|
|
27
|
+
Imports do not open a terminal, start a service, create a Harness instance or
|
|
28
|
+
prompt for credentials. Hosts explicitly construct and close the runtime, supply
|
|
29
|
+
credentials/model instances, resolve approvals and choose their storage policy.
|
|
30
|
+
Importing the engine does not itself execute a task or grant permissions.
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { createHarness } from "@zhivex-ai/harness/engine";
|
|
34
|
+
import { createHarnessClientAdapter } from "@zhivex-ai/harness/client";
|
|
35
|
+
|
|
36
|
+
const harness = await createHarness({
|
|
37
|
+
workspace: "/absolute/path/to/project",
|
|
38
|
+
provider: "openai",
|
|
39
|
+
model: "your-supported-model"
|
|
40
|
+
});
|
|
41
|
+
const client = await createHarnessClientAdapter(harness);
|
|
42
|
+
try {
|
|
43
|
+
// Dispatch requests using the documented client protocol and explicit approvals.
|
|
44
|
+
// Keep the host alive for the work it starts; close only when it is finished.
|
|
45
|
+
} finally {
|
|
46
|
+
client.close();
|
|
47
|
+
await harness.close();
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
See [the client protocol](CLIENT_PROTOCOL.md), [local service](LOCAL_SERVICE.md)
|
|
52
|
+
and [durable operations](DURABLE_OPERATIONS.md) for execution, approval and recovery
|
|
53
|
+
semantics. Persistence and approval fingerprints are shared across clients;
|
|
54
|
+
switching presentation does not migrate state or authorize new effects.
|
|
55
|
+
|
|
56
|
+
## Terminal product
|
|
57
|
+
|
|
58
|
+
`packages/code` is the independently built terminal product. Its current version
|
|
59
|
+
is `0.1.0-rc.1`, prepared for independent publication to `next` with the exact
|
|
60
|
+
engine dependency `@zhivex-ai/harness@1.3.0-rc.3`. Publication remains gated by
|
|
61
|
+
reviewed main, CI and registry evidence in the [Code release procedure](CODE_RELEASE.md).
|
|
62
|
+
Code imports declared package APIs, never Harness source paths. Its build leaves
|
|
63
|
+
Harness external.
|
|
64
|
+
|
|
65
|
+
Code owns `zhivex-code`. Harness 1.x continues to own `zhx`, `zhivex-harness` and
|
|
66
|
+
`zhx-acp`, preserving commands, flags, exit codes, JSON contracts and state paths.
|
|
67
|
+
The Code version/help identify the terminal product; engine diagnostics continue
|
|
68
|
+
to identify Harness. The historical CLI stays a Harness compatibility snapshot,
|
|
69
|
+
without a Harness dependency on Code. Desktop keeps its existing internal bridge
|
|
70
|
+
until HAR-HU-39 migrates it separately.
|
|
71
|
+
|
|
72
|
+
Node >=22.13.0 is the runtime requirement. Bun builds and tests the source but is
|
|
73
|
+
not required to install or run the JavaScript tarballs. Consumer projects retain
|
|
74
|
+
their own package manager and lockfile.
|
|
75
|
+
|
|
76
|
+
## Contributor validation
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
bun run dev:code
|
|
80
|
+
bun run typecheck:code
|
|
81
|
+
bun run test:code
|
|
82
|
+
bun run architecture:check
|
|
83
|
+
bun run contract:check
|
|
84
|
+
bun run smoke:engine-code
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The smoke packs the current Harness candidate without changing its version. The
|
|
88
|
+
release workflow supplies the exact tarball via `HARNESS_CODE_HARNESS_ARTIFACT`;
|
|
89
|
+
its bytes are copied, never repacked. The report identifies hashes, installed
|
|
90
|
+
versions and observed results. Node execution uses a restricted PATH excluding
|
|
91
|
+
Bun. Local fixtures exercise approval, persistence and restart, Code execution
|
|
92
|
+
and cancellation without live keys. This is deterministic installed evidence,
|
|
93
|
+
not provider certification or a registry release. Historical HU37/38 reports
|
|
94
|
+
used temporary 1.3.0-dev.0 metadata; those reports do not certify RC1.
|
|
95
|
+
|
|
96
|
+
`dev:code` explicitly links the built local Harness for contributor tests; it
|
|
97
|
+
preserves an existing dependency and is never run by package installation.
|
|
98
|
+
Installed acceptance uses tarballs instead of that link. The CI workflow defines
|
|
99
|
+
the same four-manager check on Node 22.13.0 and Node 24; a workflow definition is
|
|
100
|
+
not evidence that remote CI has run.
|
|
101
|
+
|
|
102
|
+
The architecture gate follows transitive imports, re-exports and type references
|
|
103
|
+
from the engine surfaces, rejecting CLI/Desktop/Code dependencies and computed
|
|
104
|
+
module loads. Code has separate checks for public-package imports and manifest/bin
|
|
105
|
+
ownership. Stable root declaration signatures are checked without regenerating
|
|
106
|
+
the baseline to accommodate this extraction.
|
|
107
|
+
|
|
108
|
+
Publishing Code requires a compatible Harness release, authenticated scope/name
|
|
109
|
+
verification and the release compatibility gates in
|
|
110
|
+
[ADR 0001](https://github.com/Zhivex/zhivex-harness/blob/main/docs/adr/0001-harness-code-public-boundary.md).
|
|
111
|
+
Local packing does not establish npm permissions or public availability.
|
package/docs/FIRST_USE.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# First use
|
|
2
2
|
|
|
3
|
-
This guide targets the prepared `1.
|
|
3
|
+
This guide targets the prepared `1.3.0-rc.3` candidate. Installation commands become available after protected publication to npm `next`; stable users can keep npm `latest`.
|
|
4
4
|
|
|
5
5
|
## Install and start
|
|
6
6
|
|
|
7
7
|
Install Node.js 22.13.0 or newer and Git. Then:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
|
-
npm install -g @zhivex-ai/harness@1.
|
|
10
|
+
npm install -g @zhivex-ai/harness@1.3.0-rc.3
|
|
11
11
|
cd /path/to/your/project
|
|
12
12
|
zhx
|
|
13
13
|
```
|
|
@@ -82,16 +82,16 @@ For command execution, configure [OCI isolation](EXECUTION_ENVIRONMENTS.md).
|
|
|
82
82
|
With Bun 1.4.0 or newer and a supported Node runtime:
|
|
83
83
|
|
|
84
84
|
```sh
|
|
85
|
-
bun add --global @zhivex-ai/harness@1.
|
|
85
|
+
bun add --global @zhivex-ai/harness@1.3.0-rc.3
|
|
86
86
|
zhx
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
For a disposable version/help/environment check without a global installation:
|
|
90
90
|
|
|
91
91
|
```sh
|
|
92
|
-
bunx @zhivex-ai/harness@1.
|
|
93
|
-
bunx @zhivex-ai/harness@1.
|
|
94
|
-
bunx @zhivex-ai/harness@1.
|
|
92
|
+
bunx @zhivex-ai/harness@1.3.0-rc.3 --version
|
|
93
|
+
bunx @zhivex-ai/harness@1.3.0-rc.3 --help
|
|
94
|
+
bunx @zhivex-ai/harness@1.3.0-rc.3 doctor
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
For source development, use the [contributor guide](https://github.com/Zhivex/zhivex-harness/blob/main/CONTRIBUTING.md).
|
package/docs/README.md
CHANGED
|
@@ -16,6 +16,9 @@ Start with [First use](FIRST_USE.md). You only need `zhx` for everyday conversat
|
|
|
16
16
|
|
|
17
17
|
## Integrate Harness
|
|
18
18
|
|
|
19
|
+
- [Engine API and Code integration](ENGINE_API.md): terminal-independent imports and local candidate validation.
|
|
20
|
+
- [Code release procedure](CODE_RELEASE.md): independent RC publication, exact artifact, bootstrap provenance and Trusted Publishing.
|
|
21
|
+
|
|
19
22
|
- [CLI reference](CLI.md): command options, JSON/JSONL and exit codes.
|
|
20
23
|
- [Extensibility](EXTENSIBILITY.md): providers, MCP, routing and subagents.
|
|
21
24
|
- [API stability](STABILITY.md) and [deprecations](DEPRECATIONS.md).
|
|
@@ -26,6 +29,8 @@ Start with [First use](FIRST_USE.md). You only need `zhx` for everyday conversat
|
|
|
26
29
|
|
|
27
30
|
## Contribute and maintain
|
|
28
31
|
|
|
32
|
+
- [Harness/Code boundary proposal (ADR 0001)](https://github.com/Zhivex/zhivex-harness/blob/main/docs/adr/0001-harness-code-public-boundary.md): ownership, public APIs and the proposed 1.x transition.
|
|
33
|
+
|
|
29
34
|
[Contributor guide](https://github.com/Zhivex/zhivex-harness/blob/main/CONTRIBUTING.md) ·
|
|
30
35
|
[Maintenance and release evidence](https://github.com/Zhivex/zhivex-harness/blob/main/docs/MAINTENANCE.md) ·
|
|
31
36
|
[Changelog](../CHANGELOG.md)
|
package/docs/STABILITY.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# API stability
|
|
2
2
|
|
|
3
|
+
The additive [engine entrypoints](ENGINE_API.md) are enumerated in
|
|
4
|
+
[`../contracts/engine-api.json`](../contracts/engine-api.json). Aliases preserve
|
|
5
|
+
their existing root tiers; newly exposed helpers have explicit tiers. The root
|
|
6
|
+
compatibility surface remains unchanged. These entrypoints are source changes
|
|
7
|
+
for the planned 1.3 line, not APIs available in the registry 1.2.0 package.
|
|
8
|
+
|
|
3
9
|
[`../contracts/public-api.json`](../contracts/public-api.json) is the machine-checked 1.0 baseline for the package root, binaries, CLI commands/subcommands, exit codes, and document schemas. Every runtime and type export is present in the snapshot and belongs to exactly one explicit tier. Exports listed as stable form the intended 1.x compatibility surface; Time-to-Safe-Fix exports are experimental; the explicitly listed beta exports may evolve under the policy below.
|
|
4
10
|
|
|
5
11
|
[`../contracts/stable-api-signatures.json`](../contracts/stable-api-signatures.json) binds every Stable runtime and type export to a reproducible SHA-256 signature derived from emitted TypeScript declarations. Each signature includes the local declaration dependency closure, so a Beta helper type cannot change the effective signature of a Stable API unnoticed. `bun run contract:check` regenerates declarations in a temporary directory and fails on drift; `bun run contract:signatures:update` is only for a reviewed compatible baseline update or the next major version. The installed-package smoke repeats the comparison against the exact tarball declarations.
|
|
@@ -45,7 +45,10 @@
|
|
|
45
45
|
"v1.2.0-rc.11",
|
|
46
46
|
"v1.2.0-rc.12",
|
|
47
47
|
"v1.2.0-rc.13",
|
|
48
|
-
"v1.2.0"
|
|
48
|
+
"v1.2.0",
|
|
49
|
+
"v1.3.0-rc.1",
|
|
50
|
+
"v1.3.0-rc.2",
|
|
51
|
+
"v1.3.0-rc.3"
|
|
49
52
|
],
|
|
50
53
|
"expectedModels": [
|
|
51
54
|
{
|
|
@@ -399,6 +402,30 @@
|
|
|
399
402
|
"qwen": "qwen3.8-flash",
|
|
400
403
|
"openai": "gpt-6-luna"
|
|
401
404
|
}
|
|
405
|
+
},
|
|
406
|
+
{
|
|
407
|
+
"releaseTag": "v1.3.0-rc.1",
|
|
408
|
+
"models": {
|
|
409
|
+
"meta": "muse-spark-1.3-contributor",
|
|
410
|
+
"qwen": "qwen3.8-flash",
|
|
411
|
+
"openai": "gpt-6-luna"
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"releaseTag": "v1.3.0-rc.2",
|
|
416
|
+
"models": {
|
|
417
|
+
"meta": "muse-spark-1.3-contributor",
|
|
418
|
+
"qwen": "qwen3.8-flash",
|
|
419
|
+
"openai": "gpt-6-luna"
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"releaseTag": "v1.3.0-rc.3",
|
|
424
|
+
"models": {
|
|
425
|
+
"meta": "muse-spark-1.3-contributor",
|
|
426
|
+
"qwen": "qwen3.8-flash",
|
|
427
|
+
"openai": "gpt-6-luna"
|
|
428
|
+
}
|
|
402
429
|
}
|
|
403
430
|
],
|
|
404
431
|
"expectedCases": [
|
package/examples/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Requirements: Bun 1.4.0+, Node.js 22.13.0+, and Git on macOS or Linux. After pro
|
|
|
8
8
|
harness_demo_dir=$(mktemp -d)
|
|
9
9
|
cd "$harness_demo_dir"
|
|
10
10
|
printf '{"name":"harness-first-run","private":true}\n' > package.json
|
|
11
|
-
bun add --exact --ignore-scripts @zhivex-ai/harness@1.
|
|
11
|
+
bun add --exact --ignore-scripts @zhivex-ai/harness@1.3.0-rc.3
|
|
12
12
|
./node_modules/.bin/zhx --version
|
|
13
13
|
./node_modules/.bin/zhx --help
|
|
14
14
|
./node_modules/.bin/zhx doctor --provider openai --json
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhivex-ai/harness",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0-rc.3",
|
|
4
4
|
"description": "Governed, provider-portable runtime for coding agents with durable approvals and isolated repository execution.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,6 +45,30 @@
|
|
|
45
45
|
".": {
|
|
46
46
|
"types": "./dist/index.d.ts",
|
|
47
47
|
"import": "./dist/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./engine": {
|
|
50
|
+
"types": "./dist/engine/index.d.ts",
|
|
51
|
+
"import": "./dist/engine/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./protocol": {
|
|
54
|
+
"types": "./dist/engine/protocol.d.ts",
|
|
55
|
+
"import": "./dist/engine/protocol.js"
|
|
56
|
+
},
|
|
57
|
+
"./client": {
|
|
58
|
+
"types": "./dist/engine/client.d.ts",
|
|
59
|
+
"import": "./dist/engine/client.js"
|
|
60
|
+
},
|
|
61
|
+
"./service": {
|
|
62
|
+
"types": "./dist/engine/service.d.ts",
|
|
63
|
+
"import": "./dist/engine/service.js"
|
|
64
|
+
},
|
|
65
|
+
"./acp": {
|
|
66
|
+
"types": "./dist/engine/acp.d.ts",
|
|
67
|
+
"import": "./dist/engine/acp.js"
|
|
68
|
+
},
|
|
69
|
+
"./code-support": {
|
|
70
|
+
"types": "./dist/compat/code-support.d.ts",
|
|
71
|
+
"import": "./dist/compat/code-support.js"
|
|
48
72
|
}
|
|
49
73
|
},
|
|
50
74
|
"files": [
|
|
@@ -56,6 +80,7 @@
|
|
|
56
80
|
"LICENSE",
|
|
57
81
|
"docs/CHANGE_ENVELOPES.md",
|
|
58
82
|
"docs/CLI.md",
|
|
83
|
+
"docs/CODE_RELEASE.md",
|
|
59
84
|
"docs/images/cli-conversation.png",
|
|
60
85
|
"docs/CLIENT_PROTOCOL.md",
|
|
61
86
|
"docs/CONTEXT_ENGINEERING.md",
|
|
@@ -87,14 +112,15 @@
|
|
|
87
112
|
"evaluations/*.jsonl",
|
|
88
113
|
"benchmarks/README.md",
|
|
89
114
|
"docs/ACP.md",
|
|
90
|
-
"docs/WORKSPACE_CHECKPOINTS.md"
|
|
115
|
+
"docs/WORKSPACE_CHECKPOINTS.md",
|
|
116
|
+
"docs/ENGINE_API.md"
|
|
91
117
|
],
|
|
92
118
|
"scripts": {
|
|
93
119
|
"models:check": "bun run scripts/validate-model-catalog.ts",
|
|
94
120
|
"models:import": "bun run scripts/generate-console-models.ts",
|
|
95
121
|
"dev": "bun run build && node --env-file-if-exists=.env dist/cli.js",
|
|
96
122
|
"start": "node dist/cli.js",
|
|
97
|
-
"build": "bun run scripts/clean-dist.ts && bun build ./src/index.ts ./src/service-cli.ts ./src/acp-cli.ts --outdir ./dist --target node --packages external && bun build ./src/cli-entry.ts --outdir ./dist --target node --packages external --splitting && mv ./dist/cli-entry.js ./dist/cli.js && cp ./dist/cli.js ./dist/zhx.js && bun build ./scripts/verify-historical-migrations.ts --outfile ./dist/verify-historical-migrations.js --target node --packages external && bun build ./scripts/hostile-repository-demo.ts --outfile ./dist/hostile-repository-demo.js --target node --packages external && tsc --emitDeclarationOnly",
|
|
123
|
+
"build": "bun run scripts/clean-dist.ts && bun build ./src/index.ts ./src/service-cli.ts ./src/acp-cli.ts ./src/engine/index.ts ./src/engine/protocol.ts ./src/engine/client.ts ./src/engine/service.ts ./src/engine/acp.ts ./src/compat/code-support.ts --root ./src --outdir ./dist --target node --packages external --splitting && bun build ./src/engine/protocol.ts --outdir ./dist/engine --target browser --packages external && bun build ./src/cli-entry.ts --outdir ./dist --target node --packages external --splitting && mv ./dist/cli-entry.js ./dist/cli.js && cp ./dist/cli.js ./dist/zhx.js && bun build ./scripts/verify-historical-migrations.ts --outfile ./dist/verify-historical-migrations.js --target node --packages external && bun build ./scripts/hostile-repository-demo.ts --outfile ./dist/hostile-repository-demo.js --target node --packages external && tsc --emitDeclarationOnly",
|
|
98
124
|
"prepack": "bun run build",
|
|
99
125
|
"architecture:check": "bun run scripts/check-architecture.ts",
|
|
100
126
|
"docs:check": "bun run scripts/check-docs.ts",
|
|
@@ -143,7 +169,12 @@
|
|
|
143
169
|
"smoke:console": "bun run build && python3 scripts/console-pty-smoke.py && python3 scripts/console-entry-smoke.py",
|
|
144
170
|
"smoke:credentials": "node --experimental-strip-types scripts/credential-store-smoke.ts",
|
|
145
171
|
"release:preflight": "bun run scripts/release-preflight.ts",
|
|
146
|
-
"release:prepare": "bun run scripts/prepare-release.ts"
|
|
172
|
+
"release:prepare": "bun run scripts/prepare-release.ts",
|
|
173
|
+
"build:code": "bun run --cwd packages/code build",
|
|
174
|
+
"test:code": "bun run --cwd packages/code test",
|
|
175
|
+
"smoke:engine-code": "bun run scripts/smoke-engine-code.ts",
|
|
176
|
+
"dev:code": "bun run build && bun run packages/code/scripts/link-local-engine.ts && bun run build:code",
|
|
177
|
+
"typecheck:code": "bun run --cwd packages/code typecheck"
|
|
147
178
|
},
|
|
148
179
|
"dependencies": {
|
|
149
180
|
"@zhivex-ai/agents": "1.10.1",
|