@zhivex-ai/harness 1.1.0-rc.3 → 1.1.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 (54) hide show
  1. package/CHANGELOG.md +99 -2
  2. package/README.md +6 -3
  3. package/contracts/public-api.json +7 -0
  4. package/contracts/stable-api-signatures.json +29 -29
  5. package/dist/cli/arguments.d.ts +2 -0
  6. package/dist/cli/cli-credentials.d.ts +12 -0
  7. package/dist/cli/cli-options.d.ts +1 -1
  8. package/dist/cli/cli-profiles.d.ts +16 -0
  9. package/dist/cli/console/console-model-catalog.d.ts +4 -21
  10. package/dist/cli/console/console-navigation.d.ts +3 -1
  11. package/dist/cli/doctor.d.ts +3 -1
  12. package/dist/cli/errors.d.ts +1 -0
  13. package/dist/cli/setup.d.ts +3 -9
  14. package/dist/cli/task-input.d.ts +6 -0
  15. package/dist/cli.d.ts +0 -1
  16. package/dist/cli.js +7503 -6420
  17. package/dist/client/json-contracts.d.ts +6 -0
  18. package/dist/context/adaptive-compaction.d.ts +16 -0
  19. package/dist/context/compaction.d.ts +1 -1
  20. package/dist/context/context-metrics.d.ts +2 -0
  21. package/dist/hostile-repository-demo.js +1110 -294
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.js +1831 -867
  24. package/dist/internal/desktop/providers.d.ts +3 -0
  25. package/dist/models/catalog-store.d.ts +15 -0
  26. package/dist/models/catalog.d.ts +74 -0
  27. package/dist/persistence/operations.d.ts +1 -0
  28. package/dist/providers/meta-continuation.d.ts +1 -0
  29. package/dist/providers/providers.d.ts +4 -0
  30. package/dist/runtime/config.d.ts +4 -0
  31. package/dist/runtime/delegation-contracts.d.ts +23 -0
  32. package/dist/runtime/error-diagnostics.d.ts +186 -0
  33. package/dist/runtime/harness.d.ts +4 -0
  34. package/dist/runtime/orchestration.d.ts +2 -0
  35. package/dist/runtime/runtime-diagnostics.d.ts +1 -0
  36. package/dist/runtime/runtime-policy.d.ts +16 -0
  37. package/dist/runtime/time-to-safe-fix.d.ts +149 -0
  38. package/dist/service-cli.js +1226 -377
  39. package/dist/verify-historical-migrations.js +1275 -459
  40. package/dist/zhx.js +7503 -6420
  41. package/docs/CLI.md +41 -2
  42. package/docs/CONTEXT_ENGINEERING.md +29 -2
  43. package/docs/CREDENTIALS.md +16 -6
  44. package/docs/DURABLE_OPERATIONS.md +6 -0
  45. package/docs/EXTENSIBILITY.md +58 -1
  46. package/docs/FIRST_USE.md +25 -12
  47. package/docs/MODEL_CATALOG.md +48 -0
  48. package/docs/README.md +1 -0
  49. package/docs/THREAT_MODEL.md +1 -1
  50. package/docs/TIME_TO_SAFE_FIX.md +2 -0
  51. package/docs/USAGE.md +3 -3
  52. package/evaluations/representative-assembly-matrix.json +82 -1
  53. package/examples/README.md +3 -3
  54. package/package.json +13 -9
package/CHANGELOG.md CHANGED
@@ -4,10 +4,107 @@ 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.1.1 - 2026-09-23
8
+
9
+ - Update the RC.10 SDK batch to its stable releases: Agents 1.9.0, Core 1.23.0, Gemini 0.12.2, Meta 0.2.7, OpenAI 0.13.5 and Qwen 0.15.1. Preserve approvals and exactly-once host effects across resume; the updated artifact still requires release certification.
10
+ - Include bounded approval-denial evidence in benchmark and release diagnostics: tool, rejection rule, approval round and preceding compactions, without raw arguments or model text. Distinguish lexical command matches from direct protected-test edits.
11
+ - Publish directly to `latest` after fresh exact-artifact certification. Preserve the failed `v1.1.0` tag and its evidence.
12
+ - Archive superseded audit reports and intermediate diagnostic plans in Git history.
13
+
14
+ ## 1.1.0 - 2026-09-23
15
+
16
+ Compatible minor release of the Node CLI and TypeScript library. The separate
17
+ Desktop application remains private alpha; Gemini remains provisional.
18
+
19
+ - Simplify first-use provider/model selection, credential setup, command help and recovery. Add UTF-8 task input, atomic profile updates and a shared searchable model catalog.
20
+ - Improve conversation activity, context estimates and compaction while preserving working plans. Add explicit unlimited cumulative-token mode without disabling per-request limits, accounting or other execution controls.
21
+ - Add authenticated local service transport, durable redacted event replay and application-owned read delegation with file scope and acceptance checks.
22
+ - Integrate the SDK prerelease batch certified by RC.10, including redaction, failed-child accounting and OpenAI function receipt fixes. Preserve approvals and exactly-once host effects across resume.
23
+ - Use Muse Spark 1.3, Qwen 3.8 Max and GPT-6 Luna for new selections and release certification. Add bounded Meta receipt-continuation recovery; preserve saved model selections and historical certification mappings.
24
+ - Preserve Stable 1.x contracts and state format 1. Existing installations need no state migration; review new default models when creating profiles.
25
+
26
+ RC.10 passed the full artifact, live and representative gates. Publication of this
27
+ stable artifact requires its own protected certification and provenance verification.
28
+
29
+ ## 1.1.0-rc.10 - 2026-09-23
30
+
31
+ - Restore `qwen3.8-max` as the default for new CLI/Desktop selections and RC.10 certification. Keep saved models and historical release mappings unchanged.
32
+ - Remove transient provider/SDK investigation reports and their local trial evidence; retain them in Git history.
33
+
34
+ - Recover once when Meta Responses rejects a function receipt continuation because its response ID is unavailable. Replay the identical request after a bounded delay, preserve cancellation, and exclude hosted tools and unrelated HTTP errors. Host tools are not executed again.
35
+ - Bind the new Meta transport policy to durable run identity. Use Qwen 3.8 Max, OpenAI Luna 6 and Muse Spark 1.3 release models; full release certification remains required.
36
+
37
+ ## 1.1.0-rc.9 - 2026-09-23
38
+
39
+ - Upgrade Core to 1.23.0-next.2 and Agents to 1.9.0-next.2. All eight consumer redaction cases pass, including later rejection and file-store reopen. Qwen Flash orchestration remains intermittent, so RC certification is still blocked.
40
+
41
+ - Default new Meta selections to Muse Spark 1.3 and use Responses for built-in Meta agent tool loops. Bind the transport migration to durable run identity; preserve saved model IDs and historical evidence. Certification remains pending.
42
+
43
+ - Add application-owned read delegation contracts: models select task IDs while Harness preserves task text, enforces file scope and validates acceptance. Keep durable SDK execution and budgets; expose finite error classifications without logging task content.
44
+ - Allow trusted strict-mode applications to select a fingerprint-bound tool catalog and render only relevant tool instructions. Use scoped contracts/catalogs in live certification without weakening effect, approval, journal or marker checks.
45
+ - Integrate the published SDK next batch with failed-child linkage/accounting and OpenAI function receipt fixes. Update native-tool fixtures to the consistent metadata contract.
46
+ - Publication remains blocked: governed Flash orchestration passed three local executions, but the scoped base campaign failed one of three cases on exact approval arguments before mutation. These are local validation results, not a new RC certification.
47
+
48
+ ## 1.1.0-rc.8 - 2026-09-22
49
+
50
+ - Preserve OpenAI function tool receipts through approval resume using SDK result envelopes. Prevent function names such as `apply_patch` from being mistaken for native Responses tools and losing their output. Keep release assertions and fail-fast gates unchanged.
51
+
52
+ ## 1.1.0-rc.7 - 2026-09-22
53
+
54
+ - Select `gpt-6-luna` as the OpenAI default for new CLI/Desktop choices and pin it in RC7 release certification. Preserve explicitly saved models and historical certification mappings.
55
+ - Identify failed base live-smoke checkpoints with allowlisted labels and assertion kinds, without retaining raw assertion values or model responses.
56
+
57
+ ## 1.1.0-rc.6 - 2026-09-22
58
+
59
+ - Stop release gates and remaining providers after a confirmed failure while retaining exhaustive manual diagnostics.
60
+ - Preserve completed certification cases across report failures and record bounded, sanitized error structure and finalization phases.
61
+
62
+ ## 1.1.0-rc.5 - 2026-09-22
63
+
64
+ Unpublished candidate targeting npm `next`, superseding the tagged but unpublished RC.4.
65
+
66
+ - Use `qwen3.8-flash` as the default Qwen model in CLI/Desktop and the new release certification matrix. Keep Max selectable and preserve explicitly saved model choices and historical certification pins. Flash requires fresh release-bound certification.
67
+
68
+ ## 1.1.0-rc.4 - 2026-09-22
69
+
70
+ - Align the SDK batch with the latest stable packages verified on 2026-09-22:
71
+ Agents 1.8.0, Core 1.22.0, Gemini 0.12.1, Meta 0.2.6, OpenAI 0.13.4 and
72
+ Qwen 0.15.0. Keep the compatible TypeScript 6.0.3 compiler API for architecture
73
+ and Stable signature checks while building with TypeScript 7.0.2.
74
+
75
+ - Use searchable provider/model selection during first use, detect a lone environment
76
+ provider, recover failed keychain setup with explicit temporary use or retry, and
77
+ show one ready screen with credential source and approval policy.
78
+ - Make `doctor` follow conversation defaults and inspect the selected environment
79
+ or keychain credential without contacting the provider. Human diagnostics focus
80
+ on the selected provider; JSON retains the full provider inventory. One-shot
81
+ execution continues to require explicit profiles and environment credentials.
82
+
83
+ - Retain recent conversation groups by estimated tokens, adapt repair compaction
84
+ to remaining input allowance, and preserve structured working plans across
85
+ repeated summaries. Keep SDK approval/checkpoint ownership and explicit overrides.
86
+ - Unify context estimates, reuse transport measurements and cache tool-schema
87
+ serialization. Default discovery to ten search matches and path-only listings;
88
+ callers can explicitly request larger results and digests.
89
+
90
+ - Add `--no-token-budget` / `unlimitedTokens: true` to disable cumulative token
91
+ budgets for main runs and subagents while preserving usage accounting,
92
+ compaction, per-request limits, and non-token execution controls.
93
+
94
+ Unpublished release candidate targeting npm `next`, following published RC.3.
95
+ Fresh protected certification is required before publication. Stable `latest`
96
+ remains 1.0.0.
97
+
98
+ - Make appended command help independent of task/configuration validation, group options with examples, and accept `--name=value` for value options.
99
+ - Add explicit UTF-8 task input through `zhx run -` and `zhx review -`, bounded to 1 MiB and retaining approval requirements.
100
+ - Add atomic personal profile updates with `zhx init --update`, reopen provider/model selection after declining the default profile, and give actionable usage/configuration recovery messages.
101
+ - Share the curated model catalog across CLI and Desktop, with primary/other groups, explicit lifecycle and validation metadata, custom model IDs, and optional HTTPS catalog distribution with cached fallback.
102
+ - Improve the separate Desktop alpha with rendered Markdown, file diffs, conversation navigation and local preferences, accessible panels and controlled external links. Desktop retains its independent private alpha version.
103
+
7
104
  ## 1.1.0-rc.3 - 2026-09-22
8
105
 
9
- Release candidate targeting npm `next`; fresh protected certification is required
10
- before publication. Stable `latest` remains 1.0.0.
106
+ Published release candidate on npm `next`. The changes below describe RC.3;
107
+ subsequent work belongs to RC.4. Stable `latest` remains 1.0.0.
11
108
 
12
109
  - Group interactive tool activity into a bounded live line and summaries between assistant messages. Preserve individual failures, check receipts and approval requests; `/verbose` restores event detail.
13
110
  - Identify token-budget and step-limit failures without mislabeling them as provider stream failures or exposing arbitrary provider error payloads.
package/README.md CHANGED
@@ -6,15 +6,18 @@ Zhivex Harness is a local terminal assistant and TypeScript library. It supports
6
6
  OpenAI, Qwen and Meta, with provisional Gemini support. Conversations and pending
7
7
  approvals survive restarts.
8
8
 
9
- This development branch prepares `1.1.0-rc.3` (unpublished), with console, local
10
- service and Desktop preview improvements. The commands below install stable 1.0.0.
9
+ Version `1.1.1` is prepared for stable publication, with console, local service
10
+ and governed delegation improvements. Publication remains pending until the
11
+ [repository release status](https://raw.githubusercontent.com/Zhivex/zhivex-harness/main/release-status.json)
12
+ records its verified artifact. The installation commands below target 1.1.1 once
13
+ published. Desktop retains its separate private alpha status.
11
14
 
12
15
  ## Quick start
13
16
 
14
17
  Requires Node.js 22.13.0 or newer, Git and a provider API key.
15
18
 
16
19
  ```sh
17
- npm install -g @zhivex-ai/harness@1.0.0
20
+ npm install -g @zhivex-ai/harness@1.1.1
18
21
  cd /path/to/your/project
19
22
  zhx
20
23
  ```
@@ -540,6 +540,7 @@
540
540
  "HarnessContextManifestIdentity",
541
541
  "HarnessContextSource",
542
542
  "HarnessCostBudget",
543
+ "HarnessDelegationContract",
543
544
  "HarnessEnvironmentStatus",
544
545
  "HarnessErrorCategory",
545
546
  "HarnessErrorCode",
@@ -738,6 +739,7 @@
738
739
  "HarnessContextConfiguration",
739
740
  "HarnessContextManifestIdentity",
740
741
  "HarnessContextSource",
742
+ "HarnessDelegationContract",
741
743
  "HarnessEnvironmentStatus",
742
744
  "HarnessErrorOptions",
743
745
  "HarnessExecutionIoMetrics",
@@ -904,6 +906,7 @@
904
906
  "--provider",
905
907
  "--model",
906
908
  "--profile",
909
+ "--update",
907
910
  "--json"
908
911
  ],
909
912
  "required": [],
@@ -943,6 +946,7 @@
943
946
  "--oci-max-workspace-bytes",
944
947
  "--oci-max-file-write-bytes",
945
948
  "--oci-tmpfs-mb",
949
+ "--no-token-budget",
946
950
  "--max-steps",
947
951
  "--timeout-ms",
948
952
  "--max-tool-calls",
@@ -1015,6 +1019,7 @@
1015
1019
  "--namespace",
1016
1020
  "--context-config",
1017
1021
  "--no-project-context",
1022
+ "--no-token-budget",
1018
1023
  "--subagent-max-steps",
1019
1024
  "--subagent-max-tool-calls",
1020
1025
  "--subagent-max-tool-errors",
@@ -1067,6 +1072,7 @@
1067
1072
  "--oci-max-workspace-bytes",
1068
1073
  "--oci-max-file-write-bytes",
1069
1074
  "--oci-tmpfs-mb",
1075
+ "--no-token-budget",
1070
1076
  "--max-steps",
1071
1077
  "--timeout-ms",
1072
1078
  "--max-tool-calls",
@@ -1158,6 +1164,7 @@
1158
1164
  "--oci-max-workspace-bytes",
1159
1165
  "--oci-max-file-write-bytes",
1160
1166
  "--oci-tmpfs-mb",
1167
+ "--no-token-budget",
1161
1168
  "--max-steps",
1162
1169
  "--timeout-ms",
1163
1170
  "--max-tool-calls",
@@ -25,11 +25,11 @@
25
25
  },
26
26
  {
27
27
  "name": "CLI_OPTION_DEFINITIONS",
28
- "sha256": "sha256:ac981aadf7a89313aa9744aca63c61d700797f6356bd43cf92be4984ea5e8d80"
28
+ "sha256": "sha256:4da95d4f23e38f79e7506efb7ad4a937e58bf8ab85ea5e256b05c6f3446fb037"
29
29
  },
30
30
  {
31
31
  "name": "CLI_OPTION_NAMES",
32
- "sha256": "sha256:2c94006a4fcb5a7df4e5d24fe57533b436f630bf656ffae864f7e461f0c694ac"
32
+ "sha256": "sha256:103709e32bffb3b601aa4a5dafdb31da57fb671377ae27eee211636c31ac93ab"
33
33
  },
34
34
  {
35
35
  "name": "DEFAULT_ALLOWED_CHECKS",
@@ -133,7 +133,7 @@
133
133
  },
134
134
  {
135
135
  "name": "cancelHarnessRun",
136
- "sha256": "sha256:5dff05d25e725c488d5a644205321410fa0c1e08518f6c632152ba695151e699"
136
+ "sha256": "sha256:823fd43f826d587b0b3147c844dfd47f7392a74632cc2bd45c3058d661e173c2"
137
137
  },
138
138
  {
139
139
  "name": "canonicalizeChangeEnvelope",
@@ -141,11 +141,11 @@
141
141
  },
142
142
  {
143
143
  "name": "cleanupHarnessRuns",
144
- "sha256": "sha256:18508c3118bed4230333e8062dc263aa732d7cfe655517df4d4da9aae01cff4f"
144
+ "sha256": "sha256:cbc2c34f94bd783b6934706ed874f85bd96575b38be3984093bad39f4dc5d2f1"
145
145
  },
146
146
  {
147
147
  "name": "cliJsonDocumentSchema",
148
- "sha256": "sha256:4ff4562c29617f921add72f71bc045a5580c1444c2df3e8e29c853f6d6e0332f"
148
+ "sha256": "sha256:ea42dc40b4af3974defe2e12e4d7ee9e34b0720bac927f6ea3c34659bb77c0ea"
149
149
  },
150
150
  {
151
151
  "name": "cliJsonLineDocumentSchema",
@@ -165,7 +165,7 @@
165
165
  },
166
166
  {
167
167
  "name": "createHarness",
168
- "sha256": "sha256:7cea05d51dff835bef5f3205e917273797af3ce09084ab99b608671c2812ccfb"
168
+ "sha256": "sha256:52818969fa1527136a5b2759e385b3627390d66a6224703e7652481abbc9b5cf"
169
169
  },
170
170
  {
171
171
  "name": "createHarnessMcpTools",
@@ -177,7 +177,7 @@
177
177
  },
178
178
  {
179
179
  "name": "createHarnessStateBackup",
180
- "sha256": "sha256:e27ff63ef8f5a1789d85c277403e25c73fd9a9ff56a6e6f29fbd9cde69c446e4"
180
+ "sha256": "sha256:c8dd18aac2d97b68b5397f5eb934253e7f27a572538f5ced999bcc35aa0f1745"
181
181
  },
182
182
  {
183
183
  "name": "createHttpMcpClient",
@@ -185,7 +185,7 @@
185
185
  },
186
186
  {
187
187
  "name": "createProviderModel",
188
- "sha256": "sha256:b2adb6e40c2ca68fc445afd3c22f230289e94f6eca193ac382a332451f3b533b"
188
+ "sha256": "sha256:8786fb1b47fdfb31136a08b83112942ccfbfcacb2532f6aea5d39eeabef48b1b"
189
189
  },
190
190
  {
191
191
  "name": "digestChangeEnvelopeArtifact",
@@ -193,7 +193,7 @@
193
193
  },
194
194
  {
195
195
  "name": "exportHarnessStateBackup",
196
- "sha256": "sha256:cd1117475aac1011b98bf68a29fc2c1daf59e9c98ea6470e2fff6ec5ba21d779"
196
+ "sha256": "sha256:39809fa355443c69e4b601cf9f695a514ceff82cfd769eb754cc865815066291"
197
197
  },
198
198
  {
199
199
  "name": "harnessErrorDocument",
@@ -201,23 +201,23 @@
201
201
  },
202
202
  {
203
203
  "name": "importHarnessStateBackup",
204
- "sha256": "sha256:3005bfd712e481929ee1a9ec47c28e33b10f128c64e5e24d4b326f4404d87ccc"
204
+ "sha256": "sha256:ce72b186c9e4f22662ebde0f9db2d7c5529ce641355862a872107e237ed2876a"
205
205
  },
206
206
  {
207
207
  "name": "importHarnessStateBackupFile",
208
- "sha256": "sha256:6f0d7e51644ba349752c7e5bb15ff98516a583b9565d949af7b6ec068c43401a"
208
+ "sha256": "sha256:033e94a7eb08cff52e52524cb1b745b45f001645bd9c881916f51cd0bfc06fdc"
209
209
  },
210
210
  {
211
211
  "name": "inspectHarnessRun",
212
- "sha256": "sha256:cc09fcb2817b6796298ee5646f4e3da859e2dfd5535be14c524c6632a1dba4fd"
212
+ "sha256": "sha256:a6cfd6fa9adc33ee9f8e11c2055c9add421143866718511634fd1b923c718366"
213
213
  },
214
214
  {
215
215
  "name": "inspectHarnessState",
216
- "sha256": "sha256:8e77932f9779560c559c8ef8f54a663b99dfda4f398541f1db131db0551f09c3"
216
+ "sha256": "sha256:db2caf84f86749f44f738fa2e838c81014dd44a69c00fdd12457107cc13ed644"
217
217
  },
218
218
  {
219
219
  "name": "listHarnessRuns",
220
- "sha256": "sha256:b34cbed127d5466c46b741b09cd1ab3f3db960db34038630aa6f0ced6dba09de"
220
+ "sha256": "sha256:f5e2aaf8d3a7703743982dc78824e8ea37b09e84aa6f30fa02549a3258e49581"
221
221
  },
222
222
  {
223
223
  "name": "loadHarnessMcpConfiguration",
@@ -225,7 +225,7 @@
225
225
  },
226
226
  {
227
227
  "name": "migrateHarnessConfigInput",
228
- "sha256": "sha256:d3d19574d6aa34e42a734473d2e50e819a90937974e1260d9648e455d48c7f1f"
228
+ "sha256": "sha256:03b462e72c9c2caf7a730b0fb8b3d0c7d6377c666e01a69a38f74da98387a07e"
229
229
  },
230
230
  {
231
231
  "name": "normalizeHarnessError",
@@ -241,11 +241,11 @@
241
241
  },
242
242
  {
243
243
  "name": "openHarnessPersistence",
244
- "sha256": "sha256:c175d40b073968ceed5c6cae89c775b2adb86e51f44fffbe720424e034391689"
244
+ "sha256": "sha256:8e8a5e30d452b06b52e4ef7ee62790e3b07751d61f3641a3ff08d546f2c3dd8d"
245
245
  },
246
246
  {
247
247
  "name": "parseCliJsonDocument",
248
- "sha256": "sha256:6eaea717eb3322d23199635b3f8001857d454fff19c74ffa240168372e69151a"
248
+ "sha256": "sha256:ccd4fcd5c2d462d0e583a4ba35c6c7d3e8dc463a461be981ee3cf6a9172ba53c"
249
249
  },
250
250
  {
251
251
  "name": "parseCliJsonLineDocument",
@@ -269,11 +269,11 @@
269
269
  },
270
270
  {
271
271
  "name": "resolveHarnessConfig",
272
- "sha256": "sha256:6206f7bcb149c2952ac4ef6b07677f06a5e37b99ce72cb804c3010e61f56858b"
272
+ "sha256": "sha256:026cbbe3f5491a96e5bbb115692c47eb8128c51e2a2c8584eef2e8ebade1a85c"
273
273
  },
274
274
  {
275
275
  "name": "runHarness",
276
- "sha256": "sha256:584ffc9c7bfbdfc556226907d97d68d7e5d82ec67e39688b6bb79c03b8e1361a"
276
+ "sha256": "sha256:0804b28280524cb6ef0e465987138a201da5d5c65e2406271ac329c096b7d98e"
277
277
  },
278
278
  {
279
279
  "name": "serializeStreamEvent",
@@ -319,7 +319,7 @@
319
319
  },
320
320
  {
321
321
  "name": "CliJsonDocument",
322
- "sha256": "sha256:02694a1a27ba9e44f24b9663628f6dc3f93cb165e1acb99ce15ce5223ad4022b"
322
+ "sha256": "sha256:4883ded187c36153df00c29064b9ceff2dea7b529087d6901655d94fb9d42819"
323
323
  },
324
324
  {
325
325
  "name": "CliJsonLineDocument",
@@ -331,7 +331,7 @@
331
331
  },
332
332
  {
333
333
  "name": "CliOptionName",
334
- "sha256": "sha256:9628cdc1bd1d28ff1ecb4e29091a04a6cfdff48c4b9da2d49c1d64ca003f7a76"
334
+ "sha256": "sha256:43987e98d1dc505e7348b59155334fea559a202e94941fc77528a5aa727ec471"
335
335
  },
336
336
  {
337
337
  "name": "CliReviewGroupDocument",
@@ -351,7 +351,7 @@
351
351
  },
352
352
  {
353
353
  "name": "CliRunResultDocument",
354
- "sha256": "sha256:dc066ac7f7aed6b7deabd0975503eff16a31c142ba892c97521a1a1374701196"
354
+ "sha256": "sha256:31efc5f7914df25f60ebec8408242b54bcae290d2bb0306869fc2fddcf357390"
355
355
  },
356
356
  {
357
357
  "name": "CliSession",
@@ -375,23 +375,23 @@
375
375
  },
376
376
  {
377
377
  "name": "CreateHarnessOptions",
378
- "sha256": "sha256:d519d636d27673caaf1307f60094a67fb6791009f4c05dd61d6c64559940c207"
378
+ "sha256": "sha256:d8e0ac53e4adf68e3b69ad916720b1149fb9d6bddf28d2862513071c65a2c384"
379
379
  },
380
380
  {
381
381
  "name": "HarnessBudget",
382
- "sha256": "sha256:5824301ecd5e057bb1d84f3de75fffc5307d36a2f64b949796c2077ae4ebd8d3"
382
+ "sha256": "sha256:86935e2a5d85184a15af839900cff28f8f46f58df68e62114327be88e287a249"
383
383
  },
384
384
  {
385
385
  "name": "HarnessConfig",
386
- "sha256": "sha256:d25060b2beb3a10723f8eb2fe415293bb1576884bbb208399aded2773eece4b9"
386
+ "sha256": "sha256:79a3e06319c96a8f1f22e79268ba69fb197e36239c416d71be4da6f0fa3fcc34"
387
387
  },
388
388
  {
389
389
  "name": "HarnessConfigInput",
390
- "sha256": "sha256:8319db71eaca723ff9988f5ccd54a5dab47745ac4e89fd6d9e472a97ec3dc591"
390
+ "sha256": "sha256:df1e5958a465f308ca8a3fe6acb57fdcd4b8cf8abd4568aac729a8b82909a799"
391
391
  },
392
392
  {
393
393
  "name": "HarnessConfigMigrationResult",
394
- "sha256": "sha256:9658f4d2497c409fd4dfb1f59f06ca9713f37b10b80b497a9a5390577014910b"
394
+ "sha256": "sha256:6a0786f1ca26a837dcdff1a06190e3b3b0805796134e48314f9e4d033a5e75d3"
395
395
  },
396
396
  {
397
397
  "name": "HarnessContextBundle",
@@ -487,8 +487,8 @@
487
487
  },
488
488
  {
489
489
  "name": "ZhivexHarness",
490
- "sha256": "sha256:984c1171cdd88a8138de73523aca11f384d6bcedefdd9c688b346e60c56ee7fb"
490
+ "sha256": "sha256:4d1be5f38915422cedcc86e52d04daab55d91b9141aec6a0239ce8d1cbeaaf5e"
491
491
  }
492
492
  ],
493
- "digest": "sha256:9a4abc106a3713d3295e440c42f5a3a75f40719c630d2800317e1e9e30ca5ece"
493
+ "digest": "sha256:d64051c5fff1b9b20576aebff01ca1a8451730850efbe79570cb2a0fddab1d7c"
494
494
  }
@@ -16,6 +16,7 @@ export interface CliOptions {
16
16
  command: Command;
17
17
  helpTopic?: string;
18
18
  profile?: string;
19
+ updateProfile?: boolean;
19
20
  provider?: string;
20
21
  model?: string;
21
22
  workspace?: string;
@@ -28,6 +29,7 @@ export interface CliOptions {
28
29
  timeoutMs?: number;
29
30
  maxToolCalls?: number;
30
31
  maxToolErrors?: number;
32
+ unlimitedTokens?: boolean;
31
33
  maxInputTokens?: number;
32
34
  maxOutputTokens?: number;
33
35
  maxTotalTokens?: number;
@@ -13,6 +13,12 @@ export interface CredentialInput {
13
13
  secret(prompt: string): Promise<string>;
14
14
  }
15
15
  export type EntryFactory = (provider: string) => Promise<SecretEntry>;
16
+ export type CredentialStatus = {
17
+ source: "environment" | "temporary" | "keychain" | "missing" | "unavailable" | "blocked";
18
+ configured: boolean;
19
+ };
20
+ export declare class CredentialSetupError extends Error {
21
+ }
16
22
  export declare const credentialService = "ai.zhivex.harness.cli";
17
23
  export declare const validCredential: (value: string) => boolean;
18
24
  export declare const nativeCredentialEntry: EntryFactory;
@@ -27,7 +33,13 @@ export declare class CliCredentials {
27
33
  private environmentKey;
28
34
  private validate;
29
35
  private saved;
36
+ private readonly sources;
37
+ source(provider: HarnessProvider): "blocked" | "environment" | "keychain" | "missing" | "temporary" | "unavailable";
38
+ private endpointOverride;
39
+ /** Presence only: never contacts a provider or returns a secret. */
40
+ inspect(provider: HarnessProvider): Promise<CredentialStatus>;
30
41
  configure(provider: HarnessProvider, input: CredentialInput): Promise<boolean>;
42
+ private configureOnce;
31
43
  providerEnvironment(provider: HarnessProvider, input: CredentialInput): Promise<NodeJS.ProcessEnv>;
32
44
  clear(): void;
33
45
  }
@@ -8,7 +8,7 @@ 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", "--profile", "--route", "--workspace", "--state-dir", "--mcp-config", "--context-config", "--no-project-context", "--patch", "--preconditions", "--now", "--agent-profile", "--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", "--service", "--apply", "--help", "--version", "--search", "--pricing-file", "--usage-limit-usd"];
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", "--agent-profile", "--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", "--no-token-budget", "--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", "--update", "--status", "--limit", "--cursor", "--before", "--reason", "--cascade", "--final", "--service", "--apply", "--help", "--version", "--search", "--pricing-file", "--usage-limit-usd"];
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: {
@@ -34,6 +34,22 @@ export declare const createCliProfile: (name: string, input: {
34
34
  model: string;
35
35
  };
36
36
  }>;
37
+ /** Publish a complete, private replacement without truncating the current profile. */
38
+ export declare const updateCliProfile: (name: string, input: {
39
+ provider: HarnessProvider;
40
+ model: string;
41
+ }, context?: CliProfilePathContext) => Promise<{
42
+ path: string;
43
+ profile: {
44
+ schemaVersion: 1;
45
+ provider: "gemini" | "meta" | "openai" | "qwen";
46
+ model: string;
47
+ };
48
+ }>;
37
49
  export declare const applyCliProfile: <T extends HarnessConfigInput & {
38
50
  profile?: string;
39
51
  }>(options: T, context?: CliProfilePathContext) => Promise<T>;
52
+ /** Shared defaults for the conversation and its diagnostic command. */
53
+ export declare const resolveCliDefaults: <T extends HarnessConfigInput & {
54
+ profile?: string;
55
+ }>(options: T, context?: CliProfilePathContext) => Promise<T>;
@@ -1,25 +1,8 @@
1
1
  export declare const CONSOLE_MODEL_CATALOG: {
2
- readonly sdkVersion: "1.25.1";
3
- readonly providers: {
4
- readonly openai: {
5
- readonly revision: "2026-09-12";
6
- readonly sourceSha256: "af33783afbf76d7fd12776a2a19244663c286a0f7bc6f05549e2ffe8a3e41900";
7
- readonly models: readonly ["gpt-6-astra", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5", "gpt-5.4", "gpt-5.4-mini", "gpt-4o-mini"];
8
- };
9
- readonly qwen: {
10
- readonly revision: "2026-09-20";
11
- readonly sourceSha256: "f52a311095ad69f94bdfdbb71f7011ec7e19d24a5c7d7a116f53d7d13c8c6008";
12
- readonly models: readonly ["qwen3.8-omni-flash", "qwen3.8-max-0902", "qwen3.8-max", "qwen3.8-flash", "qwen3.8-max-preview", "qwen3.7-max", "qwen3.7-plus", "qwen3.6-flash", "qwen3.5-omni-plus", "qwen-plus"];
13
- };
14
- readonly gemini: {
15
- readonly revision: "2026-09-16";
16
- readonly sourceSha256: "ef26943ffd54a786e06f232adf06585ccfdddb6450dd090b2e7bc01d668153b4";
17
- readonly models: readonly ["gemini-3.8-flash", "gemini-3.7-flash", "gemini-3.6-flash", "gemini-3.5-flash-lite", "gemini-3.5-flash", "gemini-3.1-pro-preview", "gemini-3.1-pro-preview-customtools", "gemini-3-flash-preview", "gemini-3.1-flash-lite"];
18
- };
19
- readonly meta: {
20
- readonly revision: "2026-09-04";
21
- readonly sourceSha256: "0e655bb5cee4dd5430336bec10d1a9cfb08a4fdc5902c211d91599f6f92492f6";
22
- readonly models: readonly ["muse-spark-1.3", "muse-spark-1.2", "muse-spark-1.2-contributor", "muse-spark-1.1"];
2
+ providers: {
3
+ [k: string]: {
4
+ revision: string;
5
+ models: string[];
23
6
  };
24
7
  };
25
8
  };
@@ -1,8 +1,10 @@
1
1
  import type { ConsoleInput } from "./console-input.js";
2
+ import { type ModelCatalog } from "../../models/catalog.js";
2
3
  import type { ProviderAvailability } from "../../providers/providers.js";
3
- export declare const consoleModelChoices: (provider: string, defaultModel: string, current?: string) => {
4
+ export declare const consoleModelChoices: (provider: string, defaultModel: string, current?: string, catalog?: ModelCatalog) => {
4
5
  value: string;
5
6
  label: string;
7
+ group: "other" | "primary";
6
8
  detail: string;
7
9
  }[];
8
10
  export type ConsoleNavigationResult = {
@@ -1,3 +1,4 @@
1
+ import { type CredentialStatus } from "./cli-credentials.js";
1
2
  import { providerAvailability, resolveHarnessConfig, type HarnessProvider } from "../runtime/config.js";
2
3
  import { type HarnessOciRuntimeAdapter } from "../execution/execution-environment.js";
3
4
  import { CLI_JSON_SCHEMA_VERSION } from "./cli-stream.js";
@@ -40,11 +41,12 @@ export interface DoctorReport {
40
41
  }
41
42
  export interface DoctorContext {
42
43
  env?: NodeJS.ProcessEnv;
44
+ credentialStatus?: CredentialStatus;
43
45
  nodeVersion?: string;
44
46
  /** @deprecated Test-only compatibility injection for the secondary Bun runtime. */
45
47
  bunVersion?: string;
46
48
  ociRuntimeAdapter?: HarnessOciRuntimeAdapter;
47
49
  }
48
- export declare const createDoctorReport: (options?: Pick<CliOptions, "provider" | "model" | "workspace" | "stateDirectory" | "storeBackend" | "tenantId" | "userId" | "namespace" | "maxSteps" | "agentProfile" | "timeoutMs" | "maxToolCalls" | "maxToolErrors" | "maxInputTokens" | "maxOutputTokens" | "maxTotalTokens" | "maxCostUsd" | "inputCostPerMillion" | "outputCostPerMillion" | "allowedChecks" | "requiredCapabilities" | "subagentProfiles" | "subagentMaxSteps" | "subagentMaxToolCalls" | "subagentMaxToolErrors" | "subagentMaxInputTokens" | "subagentMaxOutputTokens" | "subagentMaxTotalTokens" | "subagentTimeoutMs" | "maxParallelReviews" | "executionBackend" | "ociRuntime" | "ociImage" | "ociAllowedCommands" | "ociShellMode" | "ociMaxProcessRuntimeMs" | "ociMaxProcessOutputBytes" | "ociMaxMemoryMb" | "ociMaxPids" | "ociMaxCpus" | "ociMaxWorkspaceBytes" | "ociMaxFileWriteBytes" | "ociTmpfsMb" | "mcpConfigPath" | "contextConfigPath" | "projectContext">, context?: DoctorContext) => Promise<DoctorReport>;
50
+ export declare const createDoctorReport: (options?: Pick<CliOptions, "provider" | "model" | "workspace" | "stateDirectory" | "storeBackend" | "tenantId" | "userId" | "namespace" | "maxSteps" | "agentProfile" | "timeoutMs" | "maxToolCalls" | "maxToolErrors" | "unlimitedTokens" | "maxInputTokens" | "maxOutputTokens" | "maxTotalTokens" | "maxCostUsd" | "inputCostPerMillion" | "outputCostPerMillion" | "allowedChecks" | "requiredCapabilities" | "subagentProfiles" | "subagentMaxSteps" | "subagentMaxToolCalls" | "subagentMaxToolErrors" | "subagentMaxInputTokens" | "subagentMaxOutputTokens" | "subagentMaxTotalTokens" | "subagentTimeoutMs" | "maxParallelReviews" | "executionBackend" | "ociRuntime" | "ociImage" | "ociAllowedCommands" | "ociShellMode" | "ociMaxProcessRuntimeMs" | "ociMaxProcessOutputBytes" | "ociMaxMemoryMb" | "ociMaxPids" | "ociMaxCpus" | "ociMaxWorkspaceBytes" | "ociMaxFileWriteBytes" | "ociTmpfsMb" | "mcpConfigPath" | "contextConfigPath" | "projectContext">, context?: DoctorContext) => Promise<DoctorReport>;
49
51
  export declare const formatDoctorReport: (report: DoctorReport) => string;
50
52
  export declare const doctor: (options: CliOptions) => Promise<void>;
@@ -1,3 +1,4 @@
1
+ export declare const cliRecoveryHint: (error: unknown, argv: string[]) => string;
1
2
  export declare const CLI_EXIT_CODES: {
2
3
  readonly success: 0;
3
4
  readonly runtimeError: 1;
@@ -1,16 +1,10 @@
1
- import { type HarnessProvider } from "../runtime/config.js";
2
1
  import { type CliOptions } from "./arguments.js";
3
2
  export declare const providersDocument: (env?: NodeJS.ProcessEnv) => {
4
3
  schemaVersion: 1;
5
4
  kind: "providers";
6
5
  providers: readonly import("../index.js").ProviderAvailability[];
7
6
  };
8
- export declare const confirmDefaultProfileSelection: (profile: {
9
- provider: HarnessProvider;
10
- model: string;
11
- }, ask: (prompt: string) => Promise<string>) => Promise<{
12
- provider: HarnessProvider;
13
- model: string;
14
- } | undefined>;
15
- export declare const initializeCli: (options: CliOptions) => Promise<void>;
7
+ export declare const initializeCli: (options: CliOptions, context?: {
8
+ onboarding?: boolean;
9
+ }) => Promise<boolean>;
16
10
  export declare const listProviders: (json: boolean) => void;
@@ -0,0 +1,6 @@
1
+ import type { Readable } from "node:stream";
2
+ export declare const MAX_STDIN_TASK_BYTES: number;
3
+ /** Stdin is opt-in and is consumed before constructing a provider or opening state. */
4
+ export declare function readStdinTask(input?: Readable & {
5
+ isTTY?: boolean;
6
+ }): Promise<string>;
package/dist/cli.d.ts CHANGED
@@ -25,7 +25,6 @@ export { CLI_FULL_HELP_TEXT } from "./cli/help-text.js";
25
25
  export { summarizeApproval } from "./cli/presentation.js";
26
26
  export { withTemporaryHarnessProfiles } from "./cli/routing.js";
27
27
  export { providersDocument } from "./cli/setup.js";
28
- export { confirmDefaultProfileSelection } from "./cli/setup.js";
29
28
  export type { DoctorCheckStatus } from "./cli/doctor.js";
30
29
  export type { DoctorCheck } from "./cli/doctor.js";
31
30
  export type { DoctorReport } from "./cli/doctor.js";