@zhivex-ai/harness 1.2.0 → 1.3.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/README.md +9 -10
- package/contracts/engine-api.json +2921 -0
- package/contracts/public-api.json +267 -1
- package/contracts/stable-api-signatures.json +43 -43
- package/dist/acp-cli.js +137 -15002
- package/dist/approvals/approval-history.d.ts +22 -0
- package/dist/approvals/explicit-review.d.ts +24 -0
- package/dist/approvals/host-policy-identity.d.ts +3 -0
- package/dist/cli/arguments.d.ts +6 -2
- package/dist/cli/checkpoints.d.ts +230 -0
- package/dist/cli/cli-options.d.ts +2 -41
- package/dist/cli/cli-profiles.d.ts +4 -2
- package/dist/cli/cli-stream.d.ts +2 -167
- package/dist/cli/governance-report.d.ts +5 -0
- package/dist/cli/policy-decisions.d.ts +9 -0
- package/dist/cli/policy.d.ts +5 -0
- package/dist/cli/presentation.d.ts +3 -1
- package/dist/cli/run-document.d.ts +2 -91
- package/dist/cli/terminal/terminal-continuation.d.ts +2 -3
- package/dist/cli/terminal/terminal-ui.d.ts +4 -0
- package/dist/{cli-entry-c2f58zj2.js → cli-entry-ae7x44d4.js} +14969 -10731
- package/dist/{cli-entry-427869g9.js → cli-entry-d5788aay.js} +388 -47
- package/dist/cli-entry-ev76ezcd.js +656 -0
- package/dist/{cli-3jmy4h5h.js → cli-t7hrhayq.js} +918 -2223
- package/dist/cli.js +3 -5
- package/dist/client/acp-mcp-admission.d.ts +32 -0
- package/dist/client/acp-mcp-host.d.ts +19 -0
- package/dist/client/acp-mcp-session.d.ts +14 -0
- package/dist/client/acp-stdio.d.ts +2 -0
- package/dist/client/acp.d.ts +4 -1
- package/dist/client/adapter.d.ts +13 -1
- package/dist/client/continuation.d.ts +3 -0
- package/dist/client/json-contracts.d.ts +107 -4
- package/dist/client/local-service.d.ts +2 -0
- package/dist/client/protocol.d.ts +127 -1
- package/dist/client/run-document.d.ts +91 -0
- package/dist/client/service-events.d.ts +4 -0
- package/dist/client/stream.d.ts +167 -0
- package/dist/compat/cli-options.d.ts +53 -0
- package/dist/compat/code-support.d.ts +22 -0
- package/dist/compat/code-support.js +74 -0
- package/dist/{config-1k9t4jhh.js → config-c002f06f.js} +1 -1
- package/dist/config-j3jga5wh.js +61 -0
- package/dist/context/adaptive-compaction.d.ts +1 -0
- package/dist/context/compaction.d.ts +1 -1
- package/dist/context/request-measurements.d.ts +17 -0
- package/dist/context/request-projection.d.ts +10 -0
- package/dist/context/task-memory.d.ts +1 -0
- package/dist/engine/acp.d.ts +6 -0
- package/dist/engine/acp.js +205 -0
- package/dist/engine/client.d.ts +6 -0
- package/dist/engine/client.js +28 -0
- package/dist/engine/desktop-providers-v1.d.ts +4 -0
- package/dist/engine/desktop-providers-v1.js +18 -0
- package/dist/engine/desktop-state-v1.d.ts +10 -0
- package/dist/engine/desktop-state-v1.js +168 -0
- package/dist/engine/index.d.ts +73 -0
- package/dist/engine/index.js +977 -0
- package/dist/engine/mcp-stdio-v1.d.ts +11 -0
- package/dist/engine/mcp-stdio-v1.js +108 -0
- package/dist/engine/models.d.ts +3 -0
- package/dist/engine/models.js +894 -0
- package/dist/engine/protocol.d.ts +7 -0
- package/dist/engine/protocol.js +182 -0
- package/dist/engine/service.d.ts +5 -0
- package/dist/engine/service.js +28 -0
- package/dist/execution/acceptance-snapshot.d.ts +2 -0
- package/dist/execution/execution-environment.d.ts +10 -0
- package/dist/execution/mcp-oci-channel.d.ts +11 -0
- package/dist/execution/mcp-oci-server.d.ts +38 -0
- package/dist/execution/mcp-oci-workspace.d.ts +23 -0
- package/dist/execution/mcp-resource-recovery.d.ts +19 -0
- package/dist/execution/mcp-workspace-snapshot.d.ts +20 -0
- package/dist/hostile-repository-demo.js +3368 -1304
- package/dist/index-1bx83sw4.js +4 -0
- package/dist/index-2gz7jv7g.js +549 -0
- package/dist/{cli-entry-b1mfvmxe.js → index-2jrdcj6b.js} +72 -115
- package/dist/index-3ah1f369.js +356 -0
- package/dist/index-42gp2hy8.js +1555 -0
- package/dist/index-4jw3tvy8.js +301 -0
- package/dist/index-8705zxpr.js +145 -0
- package/dist/index-8vm2m34s.js +2080 -0
- package/dist/index-8zzhggxv.js +477 -0
- package/dist/index-a97bezbz.js +1073 -0
- package/dist/index-gq9xagx2.js +1343 -0
- package/dist/index-h0mqx2ed.js +1373 -0
- package/dist/index-jgrx804e.js +5589 -0
- package/dist/index-qfpz5y2v.js +174 -0
- package/dist/index-t60rva31.js +1004 -0
- package/dist/index-wg1sd3at.js +80 -0
- package/dist/index-xqxeypt5.js +888 -0
- package/dist/index-yb239ghk.js +961 -0
- package/dist/index-z0qxmkm2.js +3389 -0
- package/dist/index-z4e8d0ph.js +1768 -0
- package/dist/index.js +251 -18649
- package/dist/integrations/mcp-host-session.d.ts +26 -0
- package/dist/integrations/mcp-stdio-admission.d.ts +54 -0
- package/dist/integrations/mcp-stdio-client.d.ts +44 -0
- package/dist/integrations/mcp-stdio-framing.d.ts +18 -0
- package/dist/integrations/mcp-stdio-launch.d.ts +20 -0
- package/dist/integrations/mcp-stdio-session.d.ts +7 -0
- package/dist/integrations/mcp-stdio-tools.d.ts +12 -0
- package/dist/internal/desktop/catalog.d.ts +2 -0
- package/dist/internal/desktop/persistence.d.ts +2 -3
- package/dist/internal/desktop/providers.d.ts +1 -0
- package/dist/models/catalog.d.ts +2 -0
- package/dist/persistence/governance-context.d.ts +126 -0
- package/dist/persistence/governance-report.d.ts +299 -0
- package/dist/persistence/host-database-backup.d.ts +28 -0
- package/dist/persistence/mcp-execution-journal.d.ts +19 -0
- package/dist/persistence/mcp-reconciliation.d.ts +33 -0
- package/dist/persistence/mcp-resource-journal.d.ts +54 -0
- package/dist/persistence/workspace-checkpoints.d.ts +138 -0
- package/dist/providers/anthropic-continuation.d.ts +5 -0
- package/dist/providers/providers.d.ts +1 -1
- package/dist/providers/vertex-auth.d.ts +27 -0
- package/dist/runtime/delegation-contracts.d.ts +9 -0
- package/dist/runtime/delegation-correction.d.ts +9 -0
- package/dist/runtime/delegation-result.d.ts +73 -0
- package/dist/runtime/error-diagnostics.d.ts +86 -0
- package/dist/runtime/harness.d.ts +11 -1
- package/dist/runtime/policy-decisions.d.ts +66 -0
- package/dist/runtime/policy-inspection.d.ts +52 -0
- package/dist/runtime/provider-diagnostics.d.ts +1 -0
- package/dist/runtime/runtime-instructions.d.ts +8 -0
- package/dist/runtime/task-acceptance-checks.d.ts +103 -0
- package/dist/runtime/task-acceptance-delivery.d.ts +107 -0
- package/dist/runtime/task-acceptance-host.d.ts +20 -0
- package/dist/runtime/task-acceptance-record.d.ts +107 -0
- package/dist/runtime/task-acceptance-validation.d.ts +25 -0
- package/dist/runtime/task-acceptance.d.ts +47 -0
- package/dist/runtime/time-to-safe-fix.d.ts +83 -0
- package/dist/runtime/tool-policy-file.d.ts +23 -0
- package/dist/runtime/tool-policy-paths.d.ts +5 -0
- package/dist/runtime/tool-policy.d.ts +6 -0
- package/dist/service-cli.js +19 -14504
- package/dist/{service-client-cli-yx56n0hc.js → service-client-cli-kns4mf57.js} +307 -248
- package/dist/verify-historical-migrations.js +3314 -1251
- package/dist/workspace/path-policy.d.ts +4 -0
- package/dist/zhx.js +3 -5
- package/docs/ACP.md +14 -2
- package/docs/ANTHROPIC.md +33 -0
- package/docs/CLI.md +132 -0
- package/docs/CLIENT_PROTOCOL.md +45 -0
- package/docs/CODE_RELEASE.md +93 -0
- package/docs/ENGINE_API.md +319 -0
- package/docs/EXTENSIBILITY.md +46 -3
- package/docs/FIRST_USE.md +6 -6
- package/docs/LOCAL_SERVICE.md +13 -0
- package/docs/MCP_STDIO.md +20 -0
- package/docs/README.md +6 -0
- package/docs/STABILITY.md +9 -1
- package/docs/SUPPORT_MATRIX.md +1 -1
- package/docs/TOOL_POLICY.md +81 -0
- package/docs/VERTEX.md +50 -0
- package/docs/adr/0002-isolated-mcp-stdio.md +135 -0
- package/docs/fixtures/mcp-stdio-contract-v1.json +189 -0
- package/docs/support-matrix.json +2 -0
- package/evaluations/representative-assembly-matrix.json +64 -1
- package/evaluations/task-acceptance-routes.json +7 -0
- package/examples/README.md +1 -1
- package/package.json +74 -12
- package/dist/cli-entry-64pdp3k5.js +0 -17
|
@@ -0,0 +1,656 @@
|
|
|
1
|
+
// src/compat/cli-options.ts
|
|
2
|
+
var repeatableOptions = new Set([
|
|
3
|
+
"--route",
|
|
4
|
+
"--oci-allow-command",
|
|
5
|
+
"--allow-check",
|
|
6
|
+
"--require-capability",
|
|
7
|
+
"--subagent",
|
|
8
|
+
"--reviewer",
|
|
9
|
+
"--status"
|
|
10
|
+
]);
|
|
11
|
+
var conflicts = {
|
|
12
|
+
"--approval-mode": ["--yes"],
|
|
13
|
+
"--yes": ["--approval-mode"],
|
|
14
|
+
"--token-budget": ["--no-token-budget"],
|
|
15
|
+
"--no-token-budget": ["--token-budget"],
|
|
16
|
+
"--usage-limit-usd": ["--max-cost-usd", "--input-cost-per-million", "--output-cost-per-million"],
|
|
17
|
+
"--max-cost-usd": ["--usage-limit-usd"],
|
|
18
|
+
"--input-cost-per-million": ["--usage-limit-usd"],
|
|
19
|
+
"--output-cost-per-million": ["--usage-limit-usd"],
|
|
20
|
+
"--json": ["--jsonl"],
|
|
21
|
+
"--jsonl": ["--json"],
|
|
22
|
+
"--session": ["--continue"],
|
|
23
|
+
"--continue": ["--session"],
|
|
24
|
+
"--approve": ["--deny"],
|
|
25
|
+
"--deny": ["--approve"]
|
|
26
|
+
};
|
|
27
|
+
var CLI_OPTION_NAMES = [
|
|
28
|
+
"--compaction-model",
|
|
29
|
+
"--compaction-provider",
|
|
30
|
+
"--provider",
|
|
31
|
+
"--model",
|
|
32
|
+
"--reasoning",
|
|
33
|
+
"--profile",
|
|
34
|
+
"--route",
|
|
35
|
+
"--workspace",
|
|
36
|
+
"--state-dir",
|
|
37
|
+
"--mcp-config",
|
|
38
|
+
"--context-config",
|
|
39
|
+
"--no-project-context",
|
|
40
|
+
"--patch",
|
|
41
|
+
"--preconditions",
|
|
42
|
+
"--now",
|
|
43
|
+
"--require-verified-delivery",
|
|
44
|
+
"--execution",
|
|
45
|
+
"--oci-runtime",
|
|
46
|
+
"--oci-image",
|
|
47
|
+
"--oci-allow-command",
|
|
48
|
+
"--oci-shell",
|
|
49
|
+
"--oci-max-process-runtime-ms",
|
|
50
|
+
"--oci-max-process-output-bytes",
|
|
51
|
+
"--oci-max-memory-mb",
|
|
52
|
+
"--oci-max-pids",
|
|
53
|
+
"--oci-max-cpus",
|
|
54
|
+
"--oci-max-workspace-bytes",
|
|
55
|
+
"--oci-max-file-write-bytes",
|
|
56
|
+
"--oci-tmpfs-mb",
|
|
57
|
+
"--store",
|
|
58
|
+
"--tenant",
|
|
59
|
+
"--user",
|
|
60
|
+
"--namespace",
|
|
61
|
+
"--idempotency-key",
|
|
62
|
+
"--token-budget",
|
|
63
|
+
"--context-tokens",
|
|
64
|
+
"--no-token-budget",
|
|
65
|
+
"--max-steps",
|
|
66
|
+
"--timeout-ms",
|
|
67
|
+
"--max-tool-calls",
|
|
68
|
+
"--max-tool-errors",
|
|
69
|
+
"--max-input-tokens",
|
|
70
|
+
"--max-output-tokens",
|
|
71
|
+
"--max-total-tokens",
|
|
72
|
+
"--subagent-max-steps",
|
|
73
|
+
"--subagent-max-tool-calls",
|
|
74
|
+
"--subagent-max-tool-errors",
|
|
75
|
+
"--subagent-max-input-tokens",
|
|
76
|
+
"--subagent-max-output-tokens",
|
|
77
|
+
"--subagent-max-total-tokens",
|
|
78
|
+
"--subagent-timeout-ms",
|
|
79
|
+
"--max-parallel-reviews",
|
|
80
|
+
"--max-cost-usd",
|
|
81
|
+
"--input-cost-per-million",
|
|
82
|
+
"--output-cost-per-million",
|
|
83
|
+
"--allow-check",
|
|
84
|
+
"--require-capability",
|
|
85
|
+
"--subagent",
|
|
86
|
+
"--reviewer",
|
|
87
|
+
"--approval-mode",
|
|
88
|
+
"--yes",
|
|
89
|
+
"--approve",
|
|
90
|
+
"--deny",
|
|
91
|
+
"--json",
|
|
92
|
+
"--jsonl",
|
|
93
|
+
"--session",
|
|
94
|
+
"--continue",
|
|
95
|
+
"--update",
|
|
96
|
+
"--status",
|
|
97
|
+
"--limit",
|
|
98
|
+
"--cursor",
|
|
99
|
+
"--before",
|
|
100
|
+
"--reason",
|
|
101
|
+
"--cascade",
|
|
102
|
+
"--final",
|
|
103
|
+
"--service",
|
|
104
|
+
"--apply",
|
|
105
|
+
"--help",
|
|
106
|
+
"--version",
|
|
107
|
+
"--search",
|
|
108
|
+
"--tool-policy",
|
|
109
|
+
"--pricing-file",
|
|
110
|
+
"--usage-limit-usd"
|
|
111
|
+
];
|
|
112
|
+
var CLI_OPTION_DEFINITIONS = Object.fromEntries(CLI_OPTION_NAMES.map((name) => [name, {
|
|
113
|
+
repeatable: repeatableOptions.has(name),
|
|
114
|
+
conflictsWith: conflicts[name] ?? []
|
|
115
|
+
}]));
|
|
116
|
+
var locator = ["--workspace", "--state-dir", "--store", "--tenant", "--user", "--namespace"];
|
|
117
|
+
var provider = ["--provider", "--model", "--reasoning"];
|
|
118
|
+
var profile = ["--profile"];
|
|
119
|
+
var project = ["--mcp-config", "--context-config", "--no-project-context"];
|
|
120
|
+
var execution = [
|
|
121
|
+
"--require-verified-delivery",
|
|
122
|
+
"--execution",
|
|
123
|
+
"--oci-runtime",
|
|
124
|
+
"--oci-image",
|
|
125
|
+
"--oci-allow-command",
|
|
126
|
+
"--oci-shell",
|
|
127
|
+
"--oci-max-process-runtime-ms",
|
|
128
|
+
"--oci-max-process-output-bytes",
|
|
129
|
+
"--oci-max-memory-mb",
|
|
130
|
+
"--oci-max-pids",
|
|
131
|
+
"--oci-max-cpus",
|
|
132
|
+
"--oci-max-workspace-bytes",
|
|
133
|
+
"--oci-max-file-write-bytes",
|
|
134
|
+
"--oci-tmpfs-mb"
|
|
135
|
+
];
|
|
136
|
+
var budgets = [
|
|
137
|
+
"--token-budget",
|
|
138
|
+
"--context-tokens",
|
|
139
|
+
"--no-token-budget",
|
|
140
|
+
"--max-steps",
|
|
141
|
+
"--timeout-ms",
|
|
142
|
+
"--max-tool-calls",
|
|
143
|
+
"--max-tool-errors",
|
|
144
|
+
"--max-input-tokens",
|
|
145
|
+
"--max-output-tokens",
|
|
146
|
+
"--max-total-tokens",
|
|
147
|
+
"--max-cost-usd",
|
|
148
|
+
"--input-cost-per-million",
|
|
149
|
+
"--output-cost-per-million",
|
|
150
|
+
"--subagent-max-steps",
|
|
151
|
+
"--subagent-max-tool-calls",
|
|
152
|
+
"--subagent-max-tool-errors",
|
|
153
|
+
"--subagent-max-input-tokens",
|
|
154
|
+
"--subagent-max-output-tokens",
|
|
155
|
+
"--subagent-max-total-tokens",
|
|
156
|
+
"--subagent-timeout-ms"
|
|
157
|
+
];
|
|
158
|
+
var childBudgets = [
|
|
159
|
+
"--no-token-budget",
|
|
160
|
+
"--subagent-max-steps",
|
|
161
|
+
"--subagent-max-tool-calls",
|
|
162
|
+
"--subagent-max-tool-errors",
|
|
163
|
+
"--subagent-max-input-tokens",
|
|
164
|
+
"--subagent-max-output-tokens",
|
|
165
|
+
"--subagent-max-total-tokens",
|
|
166
|
+
"--subagent-timeout-ms"
|
|
167
|
+
];
|
|
168
|
+
var agent = [
|
|
169
|
+
"--compaction-model",
|
|
170
|
+
"--compaction-provider",
|
|
171
|
+
"--tool-policy",
|
|
172
|
+
"--pricing-file",
|
|
173
|
+
"--usage-limit-usd",
|
|
174
|
+
...provider,
|
|
175
|
+
...profile,
|
|
176
|
+
"--route",
|
|
177
|
+
...locator,
|
|
178
|
+
...project,
|
|
179
|
+
...execution,
|
|
180
|
+
...budgets,
|
|
181
|
+
"--allow-check",
|
|
182
|
+
"--require-capability",
|
|
183
|
+
"--subagent"
|
|
184
|
+
];
|
|
185
|
+
var contract = (allowed, required = []) => {
|
|
186
|
+
const allowedSet = new Set(allowed);
|
|
187
|
+
return {
|
|
188
|
+
allowed,
|
|
189
|
+
required,
|
|
190
|
+
repeatable: allowed.filter((name) => repeatableOptions.has(name)),
|
|
191
|
+
conflicts: Object.fromEntries(allowed.flatMap((name) => {
|
|
192
|
+
const relevant = conflicts[name]?.filter((other) => allowedSet.has(other)) ?? [];
|
|
193
|
+
return relevant.length > 0 ? [[name, relevant]] : [];
|
|
194
|
+
}))
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
var CLI_COMMAND_OPTION_CONTRACTS = {
|
|
198
|
+
init: contract([...provider, ...profile, "--update", "--json"]),
|
|
199
|
+
run: contract(["--service", "--session", ...agent, "--idempotency-key", "--approval-mode", "--yes", "--json", "--jsonl"]),
|
|
200
|
+
review: contract([
|
|
201
|
+
"--tool-policy",
|
|
202
|
+
"--pricing-file",
|
|
203
|
+
"--usage-limit-usd",
|
|
204
|
+
...provider,
|
|
205
|
+
...profile,
|
|
206
|
+
"--route",
|
|
207
|
+
...locator,
|
|
208
|
+
"--context-config",
|
|
209
|
+
"--no-project-context",
|
|
210
|
+
...childBudgets,
|
|
211
|
+
"--max-parallel-reviews",
|
|
212
|
+
"--require-capability",
|
|
213
|
+
"--reviewer",
|
|
214
|
+
"--json"
|
|
215
|
+
]),
|
|
216
|
+
chat: contract(["--service", ...agent, "--approval-mode", "--yes", "--session", "--continue"]),
|
|
217
|
+
providers: contract(["--json"]),
|
|
218
|
+
policy: contract(["--service", ...agent, "--json"]),
|
|
219
|
+
doctor: contract([...provider, ...profile, ...locator, ...project, ...execution, ...budgets, "--allow-check", "--require-capability", "--subagent", "--json"]),
|
|
220
|
+
resume: contract(["--tool-policy", "--service", "--session", ...locator, "--approve", "--deny", "--json", "--jsonl"], [["--approve", "--deny"]]),
|
|
221
|
+
"runs:list": contract([...locator, "--status", "--limit", "--cursor", "--json"]),
|
|
222
|
+
"runs:inspect": contract([...locator, "--json"]),
|
|
223
|
+
"runs:cancel": contract([...locator, "--reason", "--cascade", "--final", "--json"]),
|
|
224
|
+
"runs:cleanup": contract([...locator, "--before", "--status", "--limit", "--json"], ["--before"]),
|
|
225
|
+
"runs:export": contract([...locator, "--json"]),
|
|
226
|
+
"runs:report": contract([...locator, "--json", "--session"]),
|
|
227
|
+
"sessions:list": contract(["--service", ...locator, "--limit", "--json", "--search"]),
|
|
228
|
+
"sessions:inspect": contract(["--service", ...locator, "--json"]),
|
|
229
|
+
"sessions:rename": contract(["--service", ...locator, "--json"]),
|
|
230
|
+
"sessions:fork": contract([...locator, "--json"]),
|
|
231
|
+
"sessions:archive": contract([...locator, "--json"]),
|
|
232
|
+
"checkpoints:storage": contract([...locator, "--json"]),
|
|
233
|
+
"checkpoints:prune-review": contract([...locator, "--json"]),
|
|
234
|
+
"checkpoints:prune-apply": contract([...locator, "--json"]),
|
|
235
|
+
"checkpoints:list": contract([...locator, "--json"]),
|
|
236
|
+
"checkpoints:capture": contract([...locator, "--json"]),
|
|
237
|
+
"checkpoints:inspect": contract([...locator, "--json"]),
|
|
238
|
+
"checkpoints:prepare": contract([...locator, "--json"]),
|
|
239
|
+
"checkpoints:review": contract([...locator, "--json"]),
|
|
240
|
+
"checkpoints:apply": contract([...locator, "--json"]),
|
|
241
|
+
"checkpoints:recover": contract([...locator, "--json"]),
|
|
242
|
+
"changes:create": contract(["--patch"], ["--patch"]),
|
|
243
|
+
"changes:verify": contract(["--patch", "--preconditions", "--now"], ["--patch"]),
|
|
244
|
+
"state:status": contract([...locator, "--json"]),
|
|
245
|
+
"state:export": contract([...locator, "--json"]),
|
|
246
|
+
"state:import": contract([...locator, "--apply", "--json"]),
|
|
247
|
+
help: contract(["--help"]),
|
|
248
|
+
version: contract(["--version"])
|
|
249
|
+
};
|
|
250
|
+
var validateCliCommandOptions = (commandKey, counts) => {
|
|
251
|
+
const commandContract = CLI_COMMAND_OPTION_CONTRACTS[commandKey];
|
|
252
|
+
const allowed = new Set(commandContract.allowed);
|
|
253
|
+
for (const [name, count] of counts) {
|
|
254
|
+
if (!allowed.has(name)) {
|
|
255
|
+
throw new Error(`${name} is not supported by ${commandKey.replace(":", " ")}.`);
|
|
256
|
+
}
|
|
257
|
+
if (count > 1 && !commandContract.repeatable.includes(name)) {
|
|
258
|
+
throw new Error(`${name} cannot be repeated for ${commandKey.replace(":", " ")}.`);
|
|
259
|
+
}
|
|
260
|
+
for (const conflicting of commandContract.conflicts[name] ?? []) {
|
|
261
|
+
if (counts.has(conflicting)) {
|
|
262
|
+
throw new Error(`${name} cannot be combined with ${conflicting}.`);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
for (const requirement of commandContract.required) {
|
|
267
|
+
if (typeof requirement === "string") {
|
|
268
|
+
if (!counts.has(requirement)) {
|
|
269
|
+
throw new Error(`${requirement} is required by ${commandKey.replace(":", " ")}.`);
|
|
270
|
+
}
|
|
271
|
+
continue;
|
|
272
|
+
}
|
|
273
|
+
if (!requirement.some((name) => counts.has(name))) {
|
|
274
|
+
throw new Error(`${requirement.join(" or ")} is required by ${commandKey.replace(":", " ")}.`);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
// src/cli/cli-help.ts
|
|
279
|
+
var usage = {
|
|
280
|
+
"checkpoints:storage": "zhx checkpoints storage",
|
|
281
|
+
"checkpoints:prune-review": "zhx checkpoints prune-review <checkpoint:id|restore:id> [...]",
|
|
282
|
+
"checkpoints:prune-apply": "zhx checkpoints prune-apply <reviewedPlanId> <checkpoint:id|restore:id> [...]",
|
|
283
|
+
"checkpoints:list": "zhx checkpoints list <sessionId>",
|
|
284
|
+
"checkpoints:capture": "zhx checkpoints capture <sessionId> <turnId> <path> [paths...]",
|
|
285
|
+
"checkpoints:inspect": "zhx checkpoints inspect <checkpointId>",
|
|
286
|
+
"checkpoints:prepare": "zhx checkpoints prepare <checkpointId>",
|
|
287
|
+
"checkpoints:review": "zhx checkpoints review <operationId>",
|
|
288
|
+
"checkpoints:apply": "zhx checkpoints apply <operationId> <reviewedProposalId>",
|
|
289
|
+
"checkpoints:recover": "zhx checkpoints recover <operationId> <existingForkSessionId>",
|
|
290
|
+
init: "zhx init [--provider <id>] [--model <id>] [--profile <name>] [--update]",
|
|
291
|
+
run: 'zhx run [options] "task" | zhx run [options] -',
|
|
292
|
+
review: 'zhx review [options] "review task" | zhx review [options] -',
|
|
293
|
+
chat: "zhx [--continue | --session <id>]",
|
|
294
|
+
providers: "zhx providers [--json]",
|
|
295
|
+
policy: "zhx policy [options] [--json]",
|
|
296
|
+
doctor: "zhx doctor [options]",
|
|
297
|
+
resume: "zhx resume <runId> --approve|--deny",
|
|
298
|
+
"runs:list": "zhx runs list [options]",
|
|
299
|
+
"runs:inspect": "zhx runs inspect <runId>",
|
|
300
|
+
"runs:cancel": "zhx runs cancel <runId> [options]",
|
|
301
|
+
"runs:cleanup": "zhx runs cleanup --before <date> [options]",
|
|
302
|
+
"runs:export": "zhx runs export <runId>",
|
|
303
|
+
"runs:report": "zhx runs report <runId> [envelope.json] [--session <sessionId>] [--json]",
|
|
304
|
+
"sessions:list": "zhx sessions list [--search <text>]",
|
|
305
|
+
"sessions:inspect": "zhx sessions inspect <sessionId>",
|
|
306
|
+
"sessions:rename": 'zhx sessions rename <sessionId> "title"',
|
|
307
|
+
"sessions:fork": "zhx sessions fork <sessionId>",
|
|
308
|
+
"sessions:archive": "zhx sessions archive <sessionId>",
|
|
309
|
+
"changes:create": "zhx changes create <input.json> --patch <artifact>",
|
|
310
|
+
"changes:verify": "zhx changes verify <envelope.json> --patch <artifact> [options]",
|
|
311
|
+
"state:status": "zhx state status",
|
|
312
|
+
"state:export": "zhx state export <backup.json>",
|
|
313
|
+
"state:import": "zhx state import <backup.json> [--apply]",
|
|
314
|
+
version: "zhx --version"
|
|
315
|
+
};
|
|
316
|
+
var shortCliHelp = (version) => `Zhivex Harness v${version}
|
|
317
|
+
|
|
318
|
+
Start in your project:
|
|
319
|
+
zhx Open the conversation (first-use setup if needed)
|
|
320
|
+
zhx --continue Reopen the latest conversation
|
|
321
|
+
zhx run "task" Run one task for a script or automation
|
|
322
|
+
zhx doctor Check local configuration
|
|
323
|
+
|
|
324
|
+
Inside the console, type / for common actions or /help for guidance.
|
|
325
|
+
zhx init Configure a provider/model profile explicitly
|
|
326
|
+
zhx <command> --help Show help for one command
|
|
327
|
+
zhx help all Show every command and advanced option
|
|
328
|
+
zhx --version Show the installed version
|
|
329
|
+
|
|
330
|
+
Requires Node >=22.13. The console guides API key setup; automation uses environment keys.
|
|
331
|
+
zhx chat and zhivex-harness remain supported aliases.`;
|
|
332
|
+
function resolveHelpTopic(parts, explicit) {
|
|
333
|
+
if (!explicit || !parts.length)
|
|
334
|
+
return;
|
|
335
|
+
const topic = parts.join(":");
|
|
336
|
+
if (topic === "all" || Object.hasOwn(usage, topic) || Object.keys(usage).some((key) => key.startsWith(`${topic}:`)))
|
|
337
|
+
return topic;
|
|
338
|
+
throw new Error(`Unknown help topic: ${parts.join(" ")}. Use zhx help all.`);
|
|
339
|
+
}
|
|
340
|
+
function formatCliHelp(topic, version, full) {
|
|
341
|
+
if (!topic)
|
|
342
|
+
return shortCliHelp(version);
|
|
343
|
+
if (topic === "all")
|
|
344
|
+
return full;
|
|
345
|
+
const contract2 = CLI_COMMAND_OPTION_CONTRACTS[topic];
|
|
346
|
+
if (!contract2) {
|
|
347
|
+
return `Zhivex Harness — ${topic}
|
|
348
|
+
|
|
349
|
+
` + Object.entries(usage).filter(([key]) => key.startsWith(`${topic}:`)).map(([, command]) => ` ${command}`).join(`
|
|
350
|
+
`) + `
|
|
351
|
+
|
|
352
|
+
Use zhx ${topic} <subcommand> --help for its options.`;
|
|
353
|
+
}
|
|
354
|
+
const descriptions = new Map;
|
|
355
|
+
for (const line of full.split(`
|
|
356
|
+
`)) {
|
|
357
|
+
const match = line.match(/^ (--[\w-]+)(?:\s|$)/);
|
|
358
|
+
if (match)
|
|
359
|
+
descriptions.set(match[1], line);
|
|
360
|
+
}
|
|
361
|
+
const extra = {
|
|
362
|
+
"--approve": " --approve Approve the pending batch",
|
|
363
|
+
"--deny": " --deny Deny the pending batch",
|
|
364
|
+
"--status": " --status <status> Filter by run status; repeatable",
|
|
365
|
+
"--limit": " --limit <n> Maximum number of results",
|
|
366
|
+
"--search": " --search <text> Literal conversation title or ID filter",
|
|
367
|
+
"--pricing-file": " --pricing-file <file.json> Operator-supplied price estimates",
|
|
368
|
+
"--tool-policy": " --tool-policy <absolute.json> Host-owned tool policy outside the repository",
|
|
369
|
+
"--usage-limit-usd": " --usage-limit-usd <amount> Per-run monetary limit; requires pricing",
|
|
370
|
+
"--version": " --version Show the installed version"
|
|
371
|
+
};
|
|
372
|
+
const examples = {
|
|
373
|
+
run: ['zhx run "Explain this repository"', 'zhx run --profile daily --json "Review the parser"', "git diff | zhx run -"],
|
|
374
|
+
review: ['zhx review "Review error handling"', "zhx review - < review-task.txt"],
|
|
375
|
+
init: ["zhx init --profile daily", "zhx init --profile daily --update --model <id>"],
|
|
376
|
+
doctor: ["zhx doctor --profile daily", "zhx doctor --workspace /path/to/project"]
|
|
377
|
+
};
|
|
378
|
+
const groups = new Map;
|
|
379
|
+
for (const name of contract2.allowed) {
|
|
380
|
+
const group = name.startsWith("--oci-") || ["--execution", "--require-verified-delivery", "--allow-check", "--yes"].includes(name) ? "Execution and approvals" : /subagent|reviewer|parallel-reviews|^--route$/.test(name) ? "Specialist agents" : /cost|pricing|usage-limit|^--max-|^--timeout/.test(name) ? "Budgets and limits" : ["--state-dir", "--store", "--tenant", "--user", "--namespace", "--idempotency-key"].includes(name) ? "State and scope" : ["--mcp-config", "--context-config", "--no-project-context", "--require-capability"].includes(name) ? "Context and capabilities" : "Common options";
|
|
381
|
+
const lines = groups.get(group) ?? [];
|
|
382
|
+
lines.push(descriptions.get(name) ?? extra[name] ?? ` ${name}`);
|
|
383
|
+
groups.set(group, lines);
|
|
384
|
+
}
|
|
385
|
+
const sections = ["Common options", "Execution and approvals", "Budgets and limits", "Specialist agents", "Context and capabilities", "State and scope"].filter((group) => groups.has(group)).map((group) => `${group}:
|
|
386
|
+
${groups.get(group).join(`
|
|
387
|
+
`)}`);
|
|
388
|
+
return `Zhivex Harness — ${topic.replace(":", " ")}
|
|
389
|
+
|
|
390
|
+
Usage: ${usage[topic]}
|
|
391
|
+
` + (examples[topic] ? `
|
|
392
|
+
Examples:
|
|
393
|
+
${examples[topic].map((example) => ` ${example}`).join(`
|
|
394
|
+
`)}
|
|
395
|
+
` : "") + `
|
|
396
|
+
${sections.join(`
|
|
397
|
+
|
|
398
|
+
`)}
|
|
399
|
+
|
|
400
|
+
Use zhx help all for the full reference and exit codes.`;
|
|
401
|
+
}
|
|
402
|
+
// package.json
|
|
403
|
+
var package_default = {
|
|
404
|
+
name: "@zhivex-ai/harness",
|
|
405
|
+
version: "1.3.0-rc.7",
|
|
406
|
+
description: "Governed, provider-portable runtime for coding agents with durable approvals and isolated repository execution.",
|
|
407
|
+
type: "module",
|
|
408
|
+
license: "MIT",
|
|
409
|
+
repository: {
|
|
410
|
+
type: "git",
|
|
411
|
+
url: "git+https://github.com/Zhivex/zhivex-harness.git"
|
|
412
|
+
},
|
|
413
|
+
bugs: {
|
|
414
|
+
url: "https://github.com/Zhivex/zhivex-harness/issues"
|
|
415
|
+
},
|
|
416
|
+
homepage: "https://github.com/Zhivex/zhivex-harness#readme",
|
|
417
|
+
publishConfig: {
|
|
418
|
+
access: "public",
|
|
419
|
+
provenance: true,
|
|
420
|
+
registry: "https://registry.npmjs.org/"
|
|
421
|
+
},
|
|
422
|
+
keywords: [
|
|
423
|
+
"ai",
|
|
424
|
+
"agents",
|
|
425
|
+
"coding-agent",
|
|
426
|
+
"agent-runtime",
|
|
427
|
+
"agent-governance",
|
|
428
|
+
"change-control",
|
|
429
|
+
"policy-as-code",
|
|
430
|
+
"software-supply-chain",
|
|
431
|
+
"sandbox",
|
|
432
|
+
"durable-workflows",
|
|
433
|
+
"mcp",
|
|
434
|
+
"docker",
|
|
435
|
+
"typescript",
|
|
436
|
+
"node",
|
|
437
|
+
"bun",
|
|
438
|
+
"harness",
|
|
439
|
+
"zhivex"
|
|
440
|
+
],
|
|
441
|
+
bin: {
|
|
442
|
+
"zhivex-harness": "./dist/cli.js",
|
|
443
|
+
zhx: "./dist/zhx.js",
|
|
444
|
+
"zhx-acp": "./dist/acp-cli.js"
|
|
445
|
+
},
|
|
446
|
+
exports: {
|
|
447
|
+
".": {
|
|
448
|
+
types: "./dist/index.d.ts",
|
|
449
|
+
import: "./dist/index.js"
|
|
450
|
+
},
|
|
451
|
+
"./engine": {
|
|
452
|
+
types: "./dist/engine/index.d.ts",
|
|
453
|
+
import: "./dist/engine/index.js"
|
|
454
|
+
},
|
|
455
|
+
"./protocol": {
|
|
456
|
+
types: "./dist/engine/protocol.d.ts",
|
|
457
|
+
import: "./dist/engine/protocol.js"
|
|
458
|
+
},
|
|
459
|
+
"./client": {
|
|
460
|
+
types: "./dist/engine/client.d.ts",
|
|
461
|
+
import: "./dist/engine/client.js"
|
|
462
|
+
},
|
|
463
|
+
"./service": {
|
|
464
|
+
types: "./dist/engine/service.d.ts",
|
|
465
|
+
import: "./dist/engine/service.js"
|
|
466
|
+
},
|
|
467
|
+
"./acp": {
|
|
468
|
+
types: "./dist/engine/acp.d.ts",
|
|
469
|
+
import: "./dist/engine/acp.js"
|
|
470
|
+
},
|
|
471
|
+
"./code-support": {
|
|
472
|
+
types: "./dist/compat/code-support.d.ts",
|
|
473
|
+
import: "./dist/compat/code-support.js"
|
|
474
|
+
},
|
|
475
|
+
"./models": {
|
|
476
|
+
types: "./dist/engine/models.d.ts",
|
|
477
|
+
import: "./dist/engine/models.js"
|
|
478
|
+
},
|
|
479
|
+
"./desktop/v1/state": {
|
|
480
|
+
types: "./dist/engine/desktop-state-v1.d.ts",
|
|
481
|
+
import: "./dist/engine/desktop-state-v1.js"
|
|
482
|
+
},
|
|
483
|
+
"./desktop/v1/providers": {
|
|
484
|
+
types: "./dist/engine/desktop-providers-v1.d.ts",
|
|
485
|
+
import: "./dist/engine/desktop-providers-v1.js"
|
|
486
|
+
},
|
|
487
|
+
"./mcp/stdio/v1": {
|
|
488
|
+
types: "./dist/engine/mcp-stdio-v1.d.ts",
|
|
489
|
+
import: "./dist/engine/mcp-stdio-v1.js"
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
files: [
|
|
493
|
+
"dist",
|
|
494
|
+
"README.md",
|
|
495
|
+
"CHANGELOG.md",
|
|
496
|
+
"SECURITY.md",
|
|
497
|
+
"SUPPORT.md",
|
|
498
|
+
"LICENSE",
|
|
499
|
+
"docs/CHANGE_ENVELOPES.md",
|
|
500
|
+
"docs/CLI.md",
|
|
501
|
+
"docs/CODE_RELEASE.md",
|
|
502
|
+
"docs/images/cli-conversation.png",
|
|
503
|
+
"docs/CLIENT_PROTOCOL.md",
|
|
504
|
+
"docs/CONTEXT_ENGINEERING.md",
|
|
505
|
+
"docs/CREDENTIALS.md",
|
|
506
|
+
"docs/MODEL_CATALOG.md",
|
|
507
|
+
"docs/DEPRECATIONS.md",
|
|
508
|
+
"docs/DURABLE_OPERATIONS.md",
|
|
509
|
+
"docs/EXECUTION_ENVIRONMENTS.md",
|
|
510
|
+
"docs/EXTENSIBILITY.md",
|
|
511
|
+
"docs/FIRST_USE.md",
|
|
512
|
+
"docs/FIRST_USE_EXAMPLE.md",
|
|
513
|
+
"docs/HOSTILE_REPOSITORY_DEMO.md",
|
|
514
|
+
"docs/LOCAL_SERVICE.md",
|
|
515
|
+
"docs/PUBLIC_SECURITY.md",
|
|
516
|
+
"docs/README.md",
|
|
517
|
+
"docs/REPOSITORY_EDITING.md",
|
|
518
|
+
"docs/STABILITY.md",
|
|
519
|
+
"docs/SUPPORT_MATRIX.md",
|
|
520
|
+
"docs/SUPPORT_MATRIX_1_1.md",
|
|
521
|
+
"docs/THREAT_MODEL.md",
|
|
522
|
+
"docs/TIME_TO_SAFE_FIX.md",
|
|
523
|
+
"docs/USAGE.md",
|
|
524
|
+
"docs/support-matrix.json",
|
|
525
|
+
"docs/support-matrix-1.1.json",
|
|
526
|
+
"contracts",
|
|
527
|
+
"examples",
|
|
528
|
+
"fixtures",
|
|
529
|
+
"evaluations/*.json",
|
|
530
|
+
"evaluations/*.jsonl",
|
|
531
|
+
"benchmarks/README.md",
|
|
532
|
+
"docs/ACP.md",
|
|
533
|
+
"docs/WORKSPACE_CHECKPOINTS.md",
|
|
534
|
+
"docs/ENGINE_API.md",
|
|
535
|
+
"docs/ANTHROPIC.md",
|
|
536
|
+
"docs/MCP_STDIO.md",
|
|
537
|
+
"docs/adr/0002-isolated-mcp-stdio.md",
|
|
538
|
+
"docs/VERTEX.md",
|
|
539
|
+
"docs/TOOL_POLICY.md",
|
|
540
|
+
"docs/fixtures/mcp-stdio-contract-v1.json"
|
|
541
|
+
],
|
|
542
|
+
scripts: {
|
|
543
|
+
"models:check": "bun run scripts/validate-model-catalog.ts",
|
|
544
|
+
"models:import": "bun run scripts/generate-console-models.ts",
|
|
545
|
+
dev: "bun run build && node --env-file-if-exists=.env dist/cli.js",
|
|
546
|
+
start: "node dist/cli.js",
|
|
547
|
+
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/engine/models.ts ./src/engine/desktop-state-v1.ts ./src/engine/desktop-providers-v1.ts ./src/compat/code-support.ts ./src/engine/mcp-stdio-v1.ts --root ./src --outdir ./dist --target node --packages external --splitting && bun build ./src/engine/protocol.ts ./src/engine/models.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",
|
|
548
|
+
prepack: "bun run build",
|
|
549
|
+
"architecture:check": "bun run scripts/check-architecture.ts",
|
|
550
|
+
"docs:check": "bun run scripts/check-docs.ts",
|
|
551
|
+
"contract:check": "bun run scripts/check-1-0-readiness.ts",
|
|
552
|
+
"contract:signatures:update": "bun run scripts/generate-stable-api-signatures.ts --write",
|
|
553
|
+
"migration:check": "bun run scripts/verify-historical-migrations.ts",
|
|
554
|
+
"readiness:1.0": "bun run scripts/check-1-0-readiness.ts",
|
|
555
|
+
"readiness:1.0:release": "bun run scripts/check-1-0-readiness.ts --release",
|
|
556
|
+
typecheck: "tsc --noEmit",
|
|
557
|
+
test: "bun test ./tests ./desktop/tests",
|
|
558
|
+
evaluate: "bun run scripts/evaluate.ts",
|
|
559
|
+
"benchmark:workspace": "bun run scripts/benchmark-workspace.ts",
|
|
560
|
+
"benchmark:workspace:ci": "bun run scripts/benchmark-workspace.ts --files 1000 --page-size 100 --repetitions 3 --warmups 0",
|
|
561
|
+
"benchmark:oci": "bun run scripts/benchmark-oci.ts",
|
|
562
|
+
"benchmark:safe-fix": "bun run scripts/benchmark-time-to-safe-fix.ts",
|
|
563
|
+
"benchmark:safe-fix:ci": "bun run scripts/benchmark-time-to-safe-fix.ts --tasks 2 --repetitions 1 --profiles direct,governed,optimized --carriers rule_file --summary",
|
|
564
|
+
"benchmark:safe-fix:live": "bun --env-file=.env run scripts/benchmark-time-to-safe-fix.ts --driver-zhivex",
|
|
565
|
+
"benchmark:safe-fix:live:smoke": "bun --env-file=.env run scripts/benchmark-time-to-safe-fix.ts --tasks 2 --repetitions 1 --profiles direct,governed,optimized --carriers rule_file --driver-zhivex --summary",
|
|
566
|
+
"benchmark:safe-fix:live:expanded": "bun --env-file=.env run scripts/benchmark-time-to-safe-fix.ts --dataset evaluations/time-to-safe-fix-expanded.jsonl --dataset-name zhivex-time-to-safe-fix-expanded --tasks 12 --repetitions 3 --profiles direct,governed,optimized --carriers rule_file --driver-zhivex --driver-timeout-ms 300000 --summary",
|
|
567
|
+
"benchmark:safe-fix:baseline": "bun run scripts/create-time-to-safe-fix-baseline.ts",
|
|
568
|
+
"benchmark:safe-fix:image:check": "bun run scripts/build-time-to-safe-fix-image.ts --validate-only",
|
|
569
|
+
"benchmark:safe-fix:image:build": "bun run scripts/build-time-to-safe-fix-image.ts",
|
|
570
|
+
"smoke:package": "bun run build && bun run scripts/package-smoke.ts",
|
|
571
|
+
"smoke:artifact": "bun run scripts/package-smoke.ts",
|
|
572
|
+
"smoke:mcp": "bun run scripts/mcp-interoperability-smoke.ts",
|
|
573
|
+
"smoke:mcp:official": "bun run scripts/mcp-official-sdk-smoke.ts",
|
|
574
|
+
"smoke:oci": "bun run scripts/oci-execution-smoke.ts",
|
|
575
|
+
"smoke:live": "bun --env-file=.env run scripts/live-provider-smoke.ts",
|
|
576
|
+
"smoke:live:orchestration": "bun --env-file=.env run scripts/live-orchestration-smoke.ts",
|
|
577
|
+
"smoke:live:routing": "bun --env-file=.env run scripts/live-routing-smoke.ts",
|
|
578
|
+
"smoke:live:execution": "bun --env-file=.env run scripts/live-execution-smoke.ts",
|
|
579
|
+
"demo:hostile": "bun run dist/hostile-repository-demo.js",
|
|
580
|
+
"artifact:check": "bun run scripts/check-release-artifact.ts",
|
|
581
|
+
"pack:inspect": "bun run build && bun pm pack --dry-run --ignore-scripts",
|
|
582
|
+
check: "bun run architecture:check && bun run docs:check && bun run contract:check && bun run typecheck && bun run typecheck:tooling && bun run test && bun run migration:check && bun run evaluate && bun run benchmark:workspace:ci && bun run benchmark:safe-fix:image:check && bun run benchmark:safe-fix:ci && bun run smoke:mcp && bun run smoke:mcp:official && bun run smoke:oci && bun run smoke:package",
|
|
583
|
+
"check:sdk-redaction": "bun run scripts/diagnostics/reproduce-redaction-state-divergence.ts --require-fixed",
|
|
584
|
+
"release:check": "bun run release:preflight && bun run check:sdk-redaction && bun run check && bun run scripts/audit-dependencies.ts && bun pm untrusted && bun run pack:inspect && bun run scripts/check-release-readiness.ts",
|
|
585
|
+
"release:status": "bun run scripts/check-registry-release-status.ts",
|
|
586
|
+
"release:verify": "bun run scripts/verify-registry-release.ts",
|
|
587
|
+
"benchmark:workspace:scale": "bun run scripts/benchmark-workspace.ts --files 10000 --directories 100 --file-bytes 4096 --page-size 100 --repetitions 5 --warmups 1",
|
|
588
|
+
"evaluate:continuity": "bun test tests/compaction.test.ts tests/harness.test.ts",
|
|
589
|
+
"benchmark:swebench": "bun run scripts/benchmark-swebench.ts",
|
|
590
|
+
"benchmark:swebench:test": "bun test tests/swebench.test.ts",
|
|
591
|
+
"typecheck:tooling": "tsc -p tsconfig.tooling.json",
|
|
592
|
+
service: "node dist/service-cli.js",
|
|
593
|
+
"smoke:console": "bun run build && python3 scripts/console-pty-smoke.py && python3 scripts/console-entry-smoke.py",
|
|
594
|
+
"smoke:credentials": "node --experimental-strip-types scripts/credential-store-smoke.ts",
|
|
595
|
+
"release:preflight": "bun run scripts/release-preflight.ts",
|
|
596
|
+
"release:prepare": "bun run scripts/prepare-release.ts",
|
|
597
|
+
"build:code": "bun run --cwd packages/code build",
|
|
598
|
+
"test:code": "bun run --cwd packages/code test",
|
|
599
|
+
"smoke:engine-code": "bun run scripts/smoke-engine-code.ts",
|
|
600
|
+
"smoke:state-upgrade": "bun run scripts/smoke-state-upgrade.ts",
|
|
601
|
+
"smoke:global-code": "node scripts/smoke-global-code.mjs",
|
|
602
|
+
"dev:code": "bun run build && bun run packages/code/scripts/link-local-engine.ts && bun run build:code",
|
|
603
|
+
"typecheck:code": "bun run --cwd packages/code typecheck",
|
|
604
|
+
"evaluate:tasks": "bun run scripts/task-acceptance.ts",
|
|
605
|
+
"prepare:desktop": "bun run build && bun pm pack --ignore-scripts --quiet --filename desktop/.harness-candidate.tgz && bun run desktop/scripts/prepare-harness.ts desktop/.harness-candidate.tgz",
|
|
606
|
+
"smoke:mcp:installed": "bun run build && bun scripts/mcp-installed-smoke.ts"
|
|
607
|
+
},
|
|
608
|
+
dependencies: {
|
|
609
|
+
"@zhivex-ai/agents": "1.10.2",
|
|
610
|
+
"@zhivex-ai/anthropic": "0.13.1",
|
|
611
|
+
"@zhivex-ai/core": "1.28.0",
|
|
612
|
+
"@zhivex-ai/gemini": "0.13.0",
|
|
613
|
+
"@zhivex-ai/meta": "0.2.8",
|
|
614
|
+
"@zhivex-ai/openai": "0.13.7",
|
|
615
|
+
"@zhivex-ai/qwen": "0.16.3",
|
|
616
|
+
"@zhivex-ai/vertex": "1.2.2",
|
|
617
|
+
"google-auth-library": "11.1.0",
|
|
618
|
+
zod: "4.6.5"
|
|
619
|
+
},
|
|
620
|
+
overrides: {
|
|
621
|
+
"@zhivex-ai/core": "1.28.0"
|
|
622
|
+
},
|
|
623
|
+
devDependencies: {
|
|
624
|
+
"@agentclientprotocol/sdk": "1.5.1",
|
|
625
|
+
"@modelcontextprotocol/server": "2.2.0",
|
|
626
|
+
"@types/bun": "1.4.2",
|
|
627
|
+
"@types/node": "^26.6.3",
|
|
628
|
+
typescript: "7.0.2",
|
|
629
|
+
"typescript-compiler-api": "npm:typescript@6.0.3"
|
|
630
|
+
},
|
|
631
|
+
engines: {
|
|
632
|
+
node: ">=22.13.0",
|
|
633
|
+
bun: ">=1.4.0"
|
|
634
|
+
},
|
|
635
|
+
packageManager: "bun@1.4.0",
|
|
636
|
+
optionalDependencies: {
|
|
637
|
+
"@napi-rs/keyring": "2.1.0"
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
|
|
641
|
+
// src/version.ts
|
|
642
|
+
var packageMetadata = package_default;
|
|
643
|
+
if (typeof packageMetadata.version !== "string" || packageMetadata.version.length === 0) {
|
|
644
|
+
throw new Error("package.json must contain a non-empty version.");
|
|
645
|
+
}
|
|
646
|
+
if (typeof packageMetadata.engines?.node !== "string" || packageMetadata.engines.node.length === 0) {
|
|
647
|
+
throw new Error("package.json must contain a non-empty engines.node requirement.");
|
|
648
|
+
}
|
|
649
|
+
if (typeof packageMetadata.engines?.bun !== "string" || packageMetadata.engines.bun.length === 0) {
|
|
650
|
+
throw new Error("package.json must contain a non-empty engines.bun requirement.");
|
|
651
|
+
}
|
|
652
|
+
var HARNESS_VERSION = packageMetadata.version;
|
|
653
|
+
var NODE_ENGINE_RANGE = packageMetadata.engines.node;
|
|
654
|
+
var BUN_ENGINE_RANGE = packageMetadata.engines.bun;
|
|
655
|
+
|
|
656
|
+
export { CLI_OPTION_DEFINITIONS, validateCliCommandOptions, shortCliHelp, resolveHelpTopic, formatCliHelp, HARNESS_VERSION, NODE_ENGINE_RANGE, BUN_ENGINE_RANGE };
|