@zhivex-ai/harness 1.0.0-rc.11 → 1.0.0-rc.13
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 +43 -2
- package/README.md +19 -1
- package/ROADMAP.md +4 -2
- package/SECURITY.md +1 -1
- package/contracts/public-api.json +20 -0
- package/contracts/security-controls.json +3 -2
- package/contracts/stable-api-signatures.json +14 -10
- package/dist/cli-options.d.ts +2 -1
- package/dist/cli-profiles.d.ts +39 -0
- package/dist/cli.d.ts +2 -1
- package/dist/cli.js +1344 -526
- package/dist/console-context.d.ts +25 -0
- package/dist/console-input.d.ts +28 -0
- package/dist/harness.d.ts +2 -2
- package/dist/hostile-repository-demo.js +193 -22
- package/dist/index.d.ts +2 -2
- package/dist/index.js +244 -47
- package/dist/json-contracts.d.ts +48 -0
- package/dist/run-interruption.d.ts +4 -0
- package/dist/terminal-markdown.d.ts +12 -0
- package/dist/verify-historical-migrations.js +190 -19
- package/dist/zhx.js +1344 -526
- package/docs/CLI.md +70 -3
- package/docs/GA_READINESS.md +6 -4
- package/docs/LIVE_CERTIFICATION.md +8 -0
- package/docs/RELEASE.md +1 -1
- package/docs/SECURITY_REVIEW_EVIDENCE.md +2 -2
- package/docs/THREAT_MODEL.md +3 -3
- package/docs/ga-readiness.json +38 -1
- package/evaluations/representative-assembly-matrix.json +18 -0
- package/evaluations/representative-matrix.json +881 -1
- package/fixtures/contracts/v1/init.json +19 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,7 +4,47 @@ 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.0.0-rc.
|
|
7
|
+
## 1.0.0-rc.13 - 2026-09-03
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Add console command completion, previewed multiline drafts, active project-context inspection, and bounded digest-checked file attachments for the next task.
|
|
12
|
+
- Keep interactive sessions open after command/provider failures and pass Ctrl+C cancellation to active turns and review groups while preserving unresolved approval batches.
|
|
13
|
+
- Render terminal-safe model text and optionally colored diffs; discard unsolicited input lines instead of replaying them into approval prompts.
|
|
14
|
+
- Add `zhx init` with interactive terminal prompts and deterministic non-interactive flags, plus explicit `--profile <name>` selection for `run`, `chat`, `review`, and `doctor`.
|
|
15
|
+
- Store one provider/model pair per schema-versioned personal profile outside the repository with owner-only directories/files, descriptor-bound no-follow reads, strict size/link/permission checks, and no credential or authority-bearing fields.
|
|
16
|
+
- Add a versioned `init` JSON document and installed-tarball smoke coverage for initialization, profile reuse, precedence, permissions, and secret-free output.
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
|
|
20
|
+
- Persist externally interrupted ordinary turns as cancelled after runtime cleanup, without replacing completed work, pending approvals, or genuine timeouts.
|
|
21
|
+
- Accept explicit null first-page cursors for listing/search tools, keeping opaque cursor validation for subsequent pages.
|
|
22
|
+
- Add bounded in-memory task history, Alt+Enter multiline input, and terminal-safe Markdown presentation.
|
|
23
|
+
- Treat a valid SQLite database created only by `sessions list` as an uninitialized operations store in `doctor`, while continuing to reject partially initialized or incompatible operational schemas.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Preserve the published RC.12 tag, artifact, complete Meta/Qwen/OpenAI representative matrix, npm SHA-512 integrity, and SLSA provenance as immutable historical evidence. The onboarding and diagnostics changes are authorized only for a distinct pending RC.13 artifact.
|
|
28
|
+
- Keep profiles explicit rather than active-by-default. Precedence is CLI flags, selected profile, environment, then built-in defaults; `resume` never accepts a profile and continues to restore the original durable policy.
|
|
29
|
+
|
|
30
|
+
### Migration from RC.12
|
|
31
|
+
|
|
32
|
+
No Harness configuration, run-store, session-store, change-envelope, or execution-policy migration is required. Existing invocations behave as before unless they opt into `zhx init` and `--profile`. Profiles contain only schema version, provider, and model; API keys remain environment-owned.
|
|
33
|
+
|
|
34
|
+
## 1.0.0-rc.12 - 2026-09-02
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- Keep `git_diff` read-only even under hostile repository configuration: disable repository-controlled filesystem monitors, external diffs, text conversion, and submodule processing; discover changed paths with NUL-safe output; and render only paths permitted by the Harness hard-ignore and sensitive-name policy.
|
|
39
|
+
- Bind MCP configuration loading to one regular, single-link file descriptor with `O_NOFOLLOW`, a 1 MiB limit, canonical-parent containment, and inode continuity from initial inspection through the stable read.
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- Expand the security-review inventory from mutation/execution tools to all 28 model-facing tool classes, including repository reads, inspection, skill loading, delegation, and dynamic MCP tools, with a regression that rejects future inventory drift.
|
|
44
|
+
- Require direct mitigation, regression evidence, residual risk, and passing status for every reviewed trust boundary and authority-bearing tool. Non-informational findings now require an owner, disposition, rationale, and HTTPS follow-up; critical/high findings cannot be accepted without mitigation.
|
|
45
|
+
- Preserve published RC.11 as immutable historical evidence while authorizing RC.12 as the new pending candidate required by HAR-HU-03 remediation. No RC.12 artifact, live certification, registry integrity, or provenance is claimed before the exact tag completes the protected workflow.
|
|
46
|
+
|
|
47
|
+
## 1.0.0-rc.11 - 2026-09-02
|
|
8
48
|
|
|
9
49
|
### Fixed
|
|
10
50
|
|
|
@@ -13,7 +53,8 @@ The project follows Semantic Versioning. During `0.x`, minor releases may change
|
|
|
13
53
|
### Changed
|
|
14
54
|
|
|
15
55
|
- Record the immutable, unpublished RC.10 attempt as failed after its exact tarball passed artifact binding: Meta completed 14/14 representative cases, Qwen completed 13/14, and an OpenAI account-funding issue surfaced as retryable HTTP 500 failures across live and representative gates; npm publication remained skipped.
|
|
16
|
-
-
|
|
56
|
+
- Record the protected RC.11 workflow's fail-closed first attempt, where one Qwen representative case returned `EXECUTION_FAILED`, Meta and OpenAI completed 14/14, Qwen completed 13/14, no unauthorized effects were observed, and npm publication remained skipped for that attempt.
|
|
57
|
+
- Publish the complete second RC.11 attempt to `next` only after every deterministic, exact-artifact, OCI, live-provider, and representative gate passed from scratch; Meta, Qwen, and OpenAI each completed 14/14, and the registry artifact passed exact SHA-512 integrity plus SLSA provenance verification.
|
|
17
58
|
|
|
18
59
|
## 1.0.0-rc.10 - 2026-09-01
|
|
19
60
|
|
package/README.md
CHANGED
|
@@ -112,7 +112,7 @@ It does not include arbitrary host shell access, `stdio` MCP, permanent deletion
|
|
|
112
112
|
Install the Node-first `0.11.1` artifact with an exact version:
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
|
|
115
|
+
bunx @zhivex-ai/harness@0.11.1 --version
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
To exercise the source checkout, contributors use Bun for deterministic repository tooling while the built CLI itself runs on Node:
|
|
@@ -123,6 +123,16 @@ cp .env.example .env
|
|
|
123
123
|
bun run dev --version
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
+
The 1.0 source candidate adds a first-run setup that stores only a provider and model in an explicit personal profile:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
bun run dev init --profile daily --provider openai
|
|
130
|
+
bun run dev doctor --profile daily
|
|
131
|
+
bun run dev --profile daily "inspect this repository"
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Installed builds expose the same flow as `zhx init`. Profiles are private user configuration outside the repository, use owner-only permissions, contain no credentials, and are never selected implicitly. CLI flags override the selected profile; the selected profile overrides environment variables; environment variables override built-in defaults.
|
|
135
|
+
|
|
126
136
|
Configure only the providers you plan to use:
|
|
127
137
|
|
|
128
138
|
```dotenv
|
|
@@ -140,6 +150,7 @@ GEMINI_API_KEY=...
|
|
|
140
150
|
|
|
141
151
|
```bash
|
|
142
152
|
zhx doctor
|
|
153
|
+
zhx doctor --profile daily
|
|
143
154
|
zhx doctor --provider qwen --json
|
|
144
155
|
```
|
|
145
156
|
|
|
@@ -157,6 +168,13 @@ zhivex-harness --version
|
|
|
157
168
|
|
|
158
169
|
Inside the console, `/help` lists `/provider`, `/model`, `/route`, `/status`, `/diff`, `/review`, `/resume`, `/pending`, `/approve`, `/deny`, `/compact`, `/new`, `/rename`, and `/exit`. Tool and step activity is rendered without tool payloads; approval cards sanitize terminal controls and keep governed edit/command payloads fully reviewable.
|
|
159
170
|
|
|
171
|
+
The pending RC.13 source also adds Tab command completion, `/paste` for previewed
|
|
172
|
+
multiline tasks, `/context` for active project rules/skills, and `/attach <path>` for
|
|
173
|
+
bounded file excerpts. Ctrl+C interrupts active work while retaining the session;
|
|
174
|
+
errors return to the prompt. See the [interactive workflow](./docs/CLI.md#interactive-daily-workflow)
|
|
175
|
+
for attachment limits, approval behavior, and recovery. These source additions are
|
|
176
|
+
not yet published or live-certified.
|
|
177
|
+
|
|
160
178
|
Project context engineering is enabled by default. A root `AGENTS.md` plus an optional `.zhivex/harness.json` can declare bounded context files, rule files, and progressively loaded `SKILL.md` directories. Disable discovery with `--no-project-context` or select another manifest with `--context-config`.
|
|
161
179
|
|
|
162
180
|
Show providers and detected configuration without printing secrets:
|
package/ROADMAP.md
CHANGED
|
@@ -355,7 +355,9 @@ Exit criteria:
|
|
|
355
355
|
|
|
356
356
|
Goal: freeze a supportable public contract after the pre-1.0 safety and operational surfaces have been exercised in real repositories.
|
|
357
357
|
|
|
358
|
-
|
|
358
|
+
Release evidence checkpoint: RC.12 was published to npm `next` only after its exact protected workflow passed; RC.13 remains pending.
|
|
359
|
+
|
|
360
|
+
Status: RC.1 through RC.6 did not complete every protected gate, so every publication was skipped. RC.6 passed release-bound live certification and Meta's complete representative matrix, then failed closed at Qwen with 12/14 safe resolutions in both the original run and one retry. RC.7 retained the Core, Agents, and OpenAI corrections, restored Qwen to the last adapter certified by this matrix, passed exact-artifact, live-provider, and all three 14-case representative gates, and was published to npm `next` with verified SHA-512 integrity and SLSA provenance. RC.8 carried the coordinated Core `1.11.0`, Qwen `0.11.1`, and Gemini `0.11.0` refresh and passed exact-tag readiness, but its manual protected workflow packed before building `dist/`; artifact binding failed, OCI and provider gates were skipped, and npm publication was not dispatched. RC.9 corrected that workflow and passed manual protected certification, but its release-bound deterministic job exposed an environment-sensitive early-diagnostic test before packing; no release tarball was created and every downstream job was skipped. RC.10 isolated that fixture and produced a valid exact tarball, then failed closed because an OpenAI account-funding issue surfaced as retryable HTTP 500 failures and Qwen resolved 13/14 representative cases; npm publication was skipped. RC.11 preserved its fail-closed first attempt, then reran every protected gate from scratch; Meta, Qwen, and OpenAI each completed 14/14 representative cases, and the exact validated artifact was published to npm `next` with verified SHA-512 integrity and SLSA provenance. RC.12 then passed the complete deterministic, installed-artifact, OCI, live-provider, and three-provider representative matrix and was published to `next` with verified integrity and provenance. RC.13 is the distinct pending candidate for explicit first-run profiles and the session-only `doctor` correction; it has no release evidence until its exact tag completes the protected workflow. Public API/CLI/schema baselines, config `4 → 5` migration, historical tarball fixtures, support/security/rollback policy, RC channel enforcement, representative-evaluation generation, and evidence requirements remain machine-checked. The required historical passing candidates are recorded; GA remains blocked on a current security review of the final candidate in [`docs/ga-readiness.json`](./docs/ga-readiness.json).
|
|
359
361
|
|
|
360
362
|
Scope:
|
|
361
363
|
|
|
@@ -401,6 +403,6 @@ These can become separate post-1.0 tracks after the CLI/runtime contract and sec
|
|
|
401
403
|
1. Preserve RC.7's published exact-artifact, live-provider, representative-matrix, registry-integrity, and SLSA provenance evidence.
|
|
402
404
|
2. Preserve RC.8 as an immutable failed attempt bound to its source-only tarball and protected run; do not move or reuse its tag.
|
|
403
405
|
3. Preserve RC.9 and RC.10 as failed, unpublished attempts with their distinct failure evidence; do not move or reuse either tag.
|
|
404
|
-
4.
|
|
406
|
+
4. Preserve RC.11's published exact-artifact, live-provider, representative-matrix, registry-integrity, and SLSA provenance evidence, including its separate fail-closed first attempt.
|
|
405
407
|
5. Complete the named security review against the final passing candidate and close every critical/high finding.
|
|
406
408
|
6. Promote a separately tagged and verified `1.0.0` artifact to `latest` only after the release-mode readiness gate passes with two passing candidates.
|
package/SECURITY.md
CHANGED
|
@@ -20,7 +20,7 @@ The enabled no-cost public controls and the explicitly cost-gated features left
|
|
|
20
20
|
|
|
21
21
|
## Scope
|
|
22
22
|
|
|
23
|
-
Reports are in scope when they affect packaged runtime code, workspace or state isolation, approval enforcement, secret handling, MCP boundaries, provider communication, dependency integrity, or the build and release pipeline.
|
|
23
|
+
Reports are in scope when they affect packaged runtime code, personal-profile isolation, workspace or state isolation, approval enforcement, secret handling, MCP boundaries, provider communication, dependency integrity, or the build and release pipeline.
|
|
24
24
|
|
|
25
25
|
The absence of an OS sandbox is a documented product boundary rather than a vulnerability by itself. The harness does not expose generic host shell or permanent-delete model tools.
|
|
26
26
|
|
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
"cliChangeEnvelopeVerificationDocumentSchema",
|
|
106
106
|
"cliDoctorDocumentSchema",
|
|
107
107
|
"cliErrorDocumentSchema",
|
|
108
|
+
"cliInitDocumentSchema",
|
|
108
109
|
"cliJsonDocumentSchema",
|
|
109
110
|
"cliJsonLineDocumentSchema",
|
|
110
111
|
"cliProviderDocumentSchema",
|
|
@@ -371,6 +372,7 @@
|
|
|
371
372
|
"cliChangeEnvelopeVerificationDocumentSchema",
|
|
372
373
|
"cliDoctorDocumentSchema",
|
|
373
374
|
"cliErrorDocumentSchema",
|
|
375
|
+
"cliInitDocumentSchema",
|
|
374
376
|
"cliProviderDocumentSchema",
|
|
375
377
|
"cliReviewGroupDocumentSchema",
|
|
376
378
|
"cliRunCancellationDocumentSchema",
|
|
@@ -459,6 +461,7 @@
|
|
|
459
461
|
"CliChangeEnvelopeVerificationDocument",
|
|
460
462
|
"CliCommandOptionContract",
|
|
461
463
|
"CliCommandOptionContractKey",
|
|
464
|
+
"CliInitDocument",
|
|
462
465
|
"CliJsonDocument",
|
|
463
466
|
"CliJsonLineDocument",
|
|
464
467
|
"CliOptionDefinition",
|
|
@@ -616,6 +619,7 @@
|
|
|
616
619
|
"CliChangeEnvelopeVerificationDocument",
|
|
617
620
|
"CliCommandOptionContract",
|
|
618
621
|
"CliCommandOptionContractKey",
|
|
622
|
+
"CliInitDocument",
|
|
619
623
|
"CliJsonDocument",
|
|
620
624
|
"CliJsonLineDocument",
|
|
621
625
|
"CliOptionDefinition",
|
|
@@ -787,6 +791,7 @@
|
|
|
787
791
|
],
|
|
788
792
|
"cli": {
|
|
789
793
|
"commands": [
|
|
794
|
+
"init",
|
|
790
795
|
"run",
|
|
791
796
|
"review",
|
|
792
797
|
"chat",
|
|
@@ -836,10 +841,22 @@
|
|
|
836
841
|
"doctorFailed": 3
|
|
837
842
|
},
|
|
838
843
|
"commandOptions": {
|
|
844
|
+
"init": {
|
|
845
|
+
"allowed": [
|
|
846
|
+
"--provider",
|
|
847
|
+
"--model",
|
|
848
|
+
"--profile",
|
|
849
|
+
"--json"
|
|
850
|
+
],
|
|
851
|
+
"required": [],
|
|
852
|
+
"repeatable": [],
|
|
853
|
+
"conflicts": {}
|
|
854
|
+
},
|
|
839
855
|
"run": {
|
|
840
856
|
"allowed": [
|
|
841
857
|
"--provider",
|
|
842
858
|
"--model",
|
|
859
|
+
"--profile",
|
|
843
860
|
"--route",
|
|
844
861
|
"--workspace",
|
|
845
862
|
"--state-dir",
|
|
@@ -909,6 +926,7 @@
|
|
|
909
926
|
"allowed": [
|
|
910
927
|
"--provider",
|
|
911
928
|
"--model",
|
|
929
|
+
"--profile",
|
|
912
930
|
"--route",
|
|
913
931
|
"--workspace",
|
|
914
932
|
"--state-dir",
|
|
@@ -942,6 +960,7 @@
|
|
|
942
960
|
"allowed": [
|
|
943
961
|
"--provider",
|
|
944
962
|
"--model",
|
|
963
|
+
"--profile",
|
|
945
964
|
"--route",
|
|
946
965
|
"--workspace",
|
|
947
966
|
"--state-dir",
|
|
@@ -1018,6 +1037,7 @@
|
|
|
1018
1037
|
"allowed": [
|
|
1019
1038
|
"--provider",
|
|
1020
1039
|
"--model",
|
|
1040
|
+
"--profile",
|
|
1021
1041
|
"--workspace",
|
|
1022
1042
|
"--state-dir",
|
|
1023
1043
|
"--store",
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"targetVersion": "1.0.0",
|
|
4
4
|
"controls": [
|
|
5
|
-
{ "threat": "malicious-repository-context", "mitigations": ["bounded context files", "progressive skill loading", "digest-bound edits"], "evidence": ["tests/context-engineering.test.ts", "tests/edit-contracts.test.ts"], "residualRisk": "Trusted project instructions may influence model behavior within granted tool authority." },
|
|
6
|
-
{ "threat": "compromised-model-or-provider", "mitigations": ["application-owned tools", "approval gates", "budgets", "redaction"], "evidence": ["tests/harness.test.ts", "tests/cli-stream.test.ts"], "residualRisk": "Provider receives prompts and may return adversarial content; operators must scope data and review approvals." },
|
|
5
|
+
{ "threat": "malicious-repository-context", "mitigations": ["bounded context files", "progressive skill loading", "digest-bound edits", "descriptor-bound configuration reads"], "evidence": ["tests/context-engineering.test.ts", "tests/edit-contracts.test.ts", "tests/mcp.test.ts"], "residualRisk": "Trusted project instructions may influence model behavior within granted tool authority." },
|
|
6
|
+
{ "threat": "compromised-model-or-provider", "mitigations": ["application-owned tools", "approval gates", "budgets", "redaction", "sensitive-path Git filtering"], "evidence": ["tests/harness.test.ts", "tests/cli-stream.test.ts", "tests/security.test.ts"], "residualRisk": "Provider receives prompts and may return adversarial content; operators must scope data and review approvals." },
|
|
7
7
|
{ "threat": "hostile-mcp-server", "mitigations": ["HTTPS or allowlisted loopback", "tool allowlists", "permissions", "bounded payloads"], "evidence": ["tests/mcp.test.ts", "scripts/mcp-interoperability-smoke.ts"], "residualRisk": "An approved remote MCP service can observe the inputs explicitly sent to it." },
|
|
8
8
|
{ "threat": "approval-replay-or-substitution", "mitigations": ["fingerprints", "exact proposal digests", "durable approval identity"], "evidence": ["tests/harness.test.ts", "tests/edit-contracts.test.ts"], "residualRisk": "Paused approvals require the original artifact and cannot be rebound across incompatible policy versions." },
|
|
9
9
|
{ "threat": "cross-scope-state-access", "mitigations": ["tenant/user/namespace scope", "workspace binding", "scoped hierarchy reads"], "evidence": ["tests/operations.test.ts", "tests/sessions.test.ts"], "residualRisk": "A process with direct filesystem access to the local state directory remains inside the trust boundary." },
|
|
10
|
+
{ "threat": "tampered-personal-profile", "mitigations": ["explicit profile selection", "external user configuration", "owner-only permissions", "strict provider/model-only schema", "descriptor-bound no-follow reads"], "evidence": ["tests/cli-profiles.test.ts", "tests/cli.test.ts", "scripts/package-smoke.ts"], "residualRisk": "A compromised operator account or host filesystem can still replace the selected provider/model configuration." },
|
|
10
11
|
{ "threat": "hostile-subprocess", "mitigations": ["no-network OCI", "resource ceilings", "argv allowlist", "separate host import approval"], "evidence": ["tests/execution-environment.test.ts", "scripts/oci-execution-smoke.ts"], "residualRisk": "Containers are not VMs; the host kernel and OCI daemon are trusted." },
|
|
11
12
|
{ "threat": "crash-or-concurrent-writer", "mitigations": ["SQLite WAL", "optimistic revisions", "leases", "interrupted cleanup recovery"], "evidence": ["tests/operations.test.ts", "tests/execution-environment.test.ts"], "residualRisk": "Power loss and external filesystem corruption still require operator backup and recovery." },
|
|
12
13
|
{ "threat": "supply-chain-substitution", "mitigations": ["annotated tag", "immutable tarball", "SHA-512", "OIDC provenance", "pinned workflow actions"], "evidence": ["tests/release-workflow.test.ts", "scripts/check-release-artifact.ts", "scripts/release-provenance.ts"], "residualRisk": "Registry, GitHub, npm, and maintainer identities remain external trust dependencies." },
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "CLI_COMMAND_OPTION_CONTRACTS",
|
|
16
|
-
"sha256": "sha256:
|
|
16
|
+
"sha256": "sha256:aa09f2e5e3dc2061fa8171f78428b077f666776d49e78cddfbfc5d3e14ea3cf0"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"name": "CLI_EVENT_SCHEMA_VERSION",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"name": "CLI_OPTION_DEFINITIONS",
|
|
28
|
-
"sha256": "sha256:
|
|
28
|
+
"sha256": "sha256:80643d92df0424a8c5ecd67900b658a5fc67cda7bc857bdd36583f37eb33f508"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
"name": "CLI_OPTION_NAMES",
|
|
32
|
-
"sha256": "sha256:
|
|
32
|
+
"sha256": "sha256:ff63e6dcc9cff7b9d369457d2d5f40021e7ab05f59eb7ea8bf512cf165fafe12"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"name": "DEFAULT_ALLOWED_CHECKS",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
"name": "cliJsonDocumentSchema",
|
|
148
|
-
"sha256": "sha256:
|
|
148
|
+
"sha256": "sha256:6d6d32f289af541f437c6632f82360be9a6cae43faa16942505aedb8ca602c37"
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
"name": "cliJsonLineDocumentSchema",
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
},
|
|
246
246
|
{
|
|
247
247
|
"name": "parseCliJsonDocument",
|
|
248
|
-
"sha256": "sha256:
|
|
248
|
+
"sha256": "sha256:88171752f13fd7f031d27152eaa7c49048a78fd3f857f31565bff62a251b8537"
|
|
249
249
|
},
|
|
250
250
|
{
|
|
251
251
|
"name": "parseCliJsonLineDocument",
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
291
|
"name": "validateCliCommandOptions",
|
|
292
|
-
"sha256": "sha256:
|
|
292
|
+
"sha256": "sha256:0ecaa9569b797d3a26c23b9473b80a98e5d94925e8ecae4aef937e96be357fb8"
|
|
293
293
|
},
|
|
294
294
|
{
|
|
295
295
|
"name": "verifyChangeEnvelope",
|
|
@@ -311,11 +311,15 @@
|
|
|
311
311
|
},
|
|
312
312
|
{
|
|
313
313
|
"name": "CliCommandOptionContractKey",
|
|
314
|
-
"sha256": "sha256:
|
|
314
|
+
"sha256": "sha256:e69ffd0ea0af23a143a85b6d596d710bbdf607e9474657547dfb83fa69c78cbd"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "CliInitDocument",
|
|
318
|
+
"sha256": "sha256:bd8de48830fffc5a4479974bbba6ccf36911a84de41d858e50d2d9cee056489c"
|
|
315
319
|
},
|
|
316
320
|
{
|
|
317
321
|
"name": "CliJsonDocument",
|
|
318
|
-
"sha256": "sha256:
|
|
322
|
+
"sha256": "sha256:69d773fc769a1a3c0e4657dd18e486feb6a42c999c9b490874841e4330ddf0e5"
|
|
319
323
|
},
|
|
320
324
|
{
|
|
321
325
|
"name": "CliJsonLineDocument",
|
|
@@ -327,7 +331,7 @@
|
|
|
327
331
|
},
|
|
328
332
|
{
|
|
329
333
|
"name": "CliOptionName",
|
|
330
|
-
"sha256": "sha256:
|
|
334
|
+
"sha256": "sha256:6af106bfbfd758333ef524ef32e44f29429651bfc837bbaad647609a93a1e6ca"
|
|
331
335
|
},
|
|
332
336
|
{
|
|
333
337
|
"name": "CliReviewGroupDocument",
|
|
@@ -486,5 +490,5 @@
|
|
|
486
490
|
"sha256": "sha256:b165b5eb63b24371c7ab1ca83b95a9c553e7200aa89e94306ca4a7434eb1bb39"
|
|
487
491
|
}
|
|
488
492
|
],
|
|
489
|
-
"digest": "sha256:
|
|
493
|
+
"digest": "sha256:b89e3786cd87b50506c3dc75dc8cf332a7c266974dc1a76611757531d8c49840"
|
|
490
494
|
}
|
package/dist/cli-options.d.ts
CHANGED
|
@@ -8,10 +8,11 @@ export interface CliCommandOptionContract {
|
|
|
8
8
|
repeatable: readonly string[];
|
|
9
9
|
conflicts: Readonly<Record<string, readonly string[]>>;
|
|
10
10
|
}
|
|
11
|
-
export declare const CLI_OPTION_NAMES: readonly ["--provider", "--model", "--route", "--workspace", "--state-dir", "--mcp-config", "--context-config", "--no-project-context", "--patch", "--preconditions", "--now", "--execution", "--oci-runtime", "--oci-image", "--oci-allow-command", "--oci-shell", "--oci-max-process-runtime-ms", "--oci-max-process-output-bytes", "--oci-max-memory-mb", "--oci-max-pids", "--oci-max-cpus", "--oci-max-workspace-bytes", "--oci-max-file-write-bytes", "--oci-tmpfs-mb", "--store", "--tenant", "--user", "--namespace", "--idempotency-key", "--max-steps", "--timeout-ms", "--max-tool-calls", "--max-tool-errors", "--max-input-tokens", "--max-output-tokens", "--max-total-tokens", "--subagent-max-steps", "--subagent-max-tool-calls", "--subagent-max-tool-errors", "--subagent-max-input-tokens", "--subagent-max-output-tokens", "--subagent-max-total-tokens", "--subagent-timeout-ms", "--max-parallel-reviews", "--max-cost-usd", "--input-cost-per-million", "--output-cost-per-million", "--allow-check", "--require-capability", "--subagent", "--reviewer", "--yes", "--approve", "--deny", "--json", "--jsonl", "--session", "--continue", "--status", "--limit", "--cursor", "--before", "--reason", "--cascade", "--final", "--apply", "--help", "--version"];
|
|
11
|
+
export declare const CLI_OPTION_NAMES: readonly ["--provider", "--model", "--profile", "--route", "--workspace", "--state-dir", "--mcp-config", "--context-config", "--no-project-context", "--patch", "--preconditions", "--now", "--execution", "--oci-runtime", "--oci-image", "--oci-allow-command", "--oci-shell", "--oci-max-process-runtime-ms", "--oci-max-process-output-bytes", "--oci-max-memory-mb", "--oci-max-pids", "--oci-max-cpus", "--oci-max-workspace-bytes", "--oci-max-file-write-bytes", "--oci-tmpfs-mb", "--store", "--tenant", "--user", "--namespace", "--idempotency-key", "--max-steps", "--timeout-ms", "--max-tool-calls", "--max-tool-errors", "--max-input-tokens", "--max-output-tokens", "--max-total-tokens", "--subagent-max-steps", "--subagent-max-tool-calls", "--subagent-max-tool-errors", "--subagent-max-input-tokens", "--subagent-max-output-tokens", "--subagent-max-total-tokens", "--subagent-timeout-ms", "--max-parallel-reviews", "--max-cost-usd", "--input-cost-per-million", "--output-cost-per-million", "--allow-check", "--require-capability", "--subagent", "--reviewer", "--yes", "--approve", "--deny", "--json", "--jsonl", "--session", "--continue", "--status", "--limit", "--cursor", "--before", "--reason", "--cascade", "--final", "--apply", "--help", "--version"];
|
|
12
12
|
export type CliOptionName = (typeof CLI_OPTION_NAMES)[number];
|
|
13
13
|
export declare const CLI_OPTION_DEFINITIONS: Readonly<Record<CliOptionName, CliOptionDefinition>>;
|
|
14
14
|
export declare const CLI_COMMAND_OPTION_CONTRACTS: {
|
|
15
|
+
readonly init: CliCommandOptionContract;
|
|
15
16
|
readonly run: CliCommandOptionContract;
|
|
16
17
|
readonly review: CliCommandOptionContract;
|
|
17
18
|
readonly chat: CliCommandOptionContract;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type HarnessConfigInput, type HarnessProvider } from "./config.js";
|
|
3
|
+
export declare const CLI_PROFILE_SCHEMA_VERSION: 1;
|
|
4
|
+
export declare const CLI_PROFILE_CONFIG_DIRECTORY_ENV: "ZHIVEX_HARNESS_CONFIG_DIR";
|
|
5
|
+
export declare const MAX_CLI_PROFILE_BYTES: number;
|
|
6
|
+
export declare const cliProfileSchema: z.ZodObject<{
|
|
7
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
8
|
+
provider: z.ZodEnum<{
|
|
9
|
+
meta: "meta";
|
|
10
|
+
qwen: "qwen";
|
|
11
|
+
openai: "openai";
|
|
12
|
+
gemini: "gemini";
|
|
13
|
+
}>;
|
|
14
|
+
model: z.ZodString;
|
|
15
|
+
}, z.core.$strict>;
|
|
16
|
+
export type CliProfile = z.infer<typeof cliProfileSchema>;
|
|
17
|
+
export interface CliProfilePathContext {
|
|
18
|
+
env?: NodeJS.ProcessEnv;
|
|
19
|
+
homeDirectory?: string;
|
|
20
|
+
platform?: NodeJS.Platform;
|
|
21
|
+
}
|
|
22
|
+
export declare const validateCliProfileName: (name: string) => string;
|
|
23
|
+
export declare const resolveCliProfileConfigDirectory: (context?: CliProfilePathContext) => string;
|
|
24
|
+
export declare const resolveCliProfilePath: (name: string, context?: CliProfilePathContext) => string;
|
|
25
|
+
export declare const loadCliProfile: (name: string, context?: CliProfilePathContext) => Promise<CliProfile>;
|
|
26
|
+
export declare const createCliProfile: (name: string, input: {
|
|
27
|
+
provider: HarnessProvider;
|
|
28
|
+
model: string;
|
|
29
|
+
}, context?: CliProfilePathContext) => Promise<{
|
|
30
|
+
path: string;
|
|
31
|
+
profile: {
|
|
32
|
+
schemaVersion: 1;
|
|
33
|
+
provider: "meta" | "qwen" | "openai" | "gemini";
|
|
34
|
+
model: string;
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
export declare const applyCliProfile: <T extends HarnessConfigInput & {
|
|
38
|
+
profile?: string;
|
|
39
|
+
}>(options: T, context?: CliProfilePathContext) => Promise<T>;
|
package/dist/cli.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare const CLI_EXIT_CODES: {
|
|
|
18
18
|
export declare const annotateCliStreamError: (error: unknown, lastSequence: number | undefined) => Error;
|
|
19
19
|
export declare const cliStreamErrorSequence: (error: unknown) => number;
|
|
20
20
|
export declare const terminalErrorMessage: (error: unknown) => string;
|
|
21
|
-
export declare const CLI_COMMANDS: readonly ["run", "review", "chat", "providers", "doctor", "resume", "runs", "sessions", "changes", "state", "help", "version"];
|
|
21
|
+
export declare const CLI_COMMANDS: readonly ["init", "run", "review", "chat", "providers", "doctor", "resume", "runs", "sessions", "changes", "state", "help", "version"];
|
|
22
22
|
export declare const CLI_RUNS_COMMANDS: readonly ["list", "inspect", "cancel", "cleanup", "export"];
|
|
23
23
|
export declare const CLI_SESSIONS_COMMANDS: readonly ["list", "inspect", "rename", "fork", "archive"];
|
|
24
24
|
export declare const CLI_CHANGES_COMMANDS: readonly ["create", "verify"];
|
|
@@ -30,6 +30,7 @@ type ChangesCommand = (typeof CLI_CHANGES_COMMANDS)[number];
|
|
|
30
30
|
type StateCommand = (typeof CLI_STATE_COMMANDS)[number];
|
|
31
31
|
export interface CliOptions {
|
|
32
32
|
command: Command;
|
|
33
|
+
profile?: string;
|
|
33
34
|
provider?: string;
|
|
34
35
|
model?: string;
|
|
35
36
|
workspace?: string;
|