@zhivex-ai/harness 1.4.0-rc.6 → 1.4.0
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 +31 -0
- package/README.md +124 -71
- package/SECURITY.md +1 -1
- package/SUPPORT.md +2 -2
- package/contracts/engine-api.json +55 -0
- package/contracts/stable-api-signatures.json +33 -33
- package/dist/acp-cli.js +18 -15
- package/dist/cli/arguments.d.ts +3 -0
- package/dist/cli/console/console-budget.d.ts +8 -2
- package/dist/{cli-s1rs15vv.js → cli-2h37qyvg.js} +34 -15
- package/dist/{cli-entry-d5788aay.js → cli-entry-20w6nh0k.js} +359 -21
- package/dist/{cli-entry-9c2k0zwz.js → cli-entry-4ngptr62.js} +2902 -1482
- package/dist/{cli-entry-4k1cf0m3.js → cli-entry-w0hterjs.js} +8 -5
- package/dist/cli.js +2 -2
- package/dist/client/json-contracts.d.ts +95 -2
- package/dist/client/local-service.d.ts +2 -2
- package/dist/client/protocol.d.ts +3 -0
- package/dist/client/stream.d.ts +2 -1
- package/dist/compat/code-support.d.ts +6 -0
- package/dist/compat/code-support.js +29 -6
- package/dist/{config-c002f06f.js → config-j9624t6t.js} +1 -1
- package/dist/{config-j3jga5wh.js → config-qt69hkqj.js} +4 -2
- package/dist/engine/acp.js +14 -12
- package/dist/engine/client.js +11 -10
- package/dist/engine/desktop-providers-v1.js +2 -1
- package/dist/engine/desktop-state-v1.js +9 -9
- package/dist/engine/index.js +48 -46
- package/dist/engine/mcp-stdio-v1.js +7 -6
- package/dist/engine/protocol.js +30 -2
- package/dist/engine/service.js +12 -11
- package/dist/hostile-repository-demo.js +4773 -3027
- package/dist/{index-49ys3s4q.js → index-5jhgatga.js} +35 -16
- package/dist/{index-wq2tax80.js → index-61gthdz6.js} +1 -1
- package/dist/index-6dft2vev.js +343 -0
- package/dist/{index-gq9xagx2.js → index-8zjmnyw5.js} +25 -138
- package/dist/index-937cb7y8.js +705 -0
- package/dist/index-bpc596v3.js +154 -0
- package/dist/index-fm84men1.js +239 -0
- package/dist/{index-e6r04a18.js → index-m34q25jj.js} +1127 -170
- package/dist/index-m49jx72n.js +220 -0
- package/dist/{index-dj5z774k.js → index-m82cfspw.js} +35 -16
- package/dist/{index-qfpz5y2v.js → index-nmjdwd4p.js} +8 -2
- package/dist/{index-0g939pfs.js → index-pdmevfxv.js} +10 -7
- package/dist/{index-4j1h4j8c.js → index-pp474137.js} +1598 -973
- package/dist/{index-2tgb2b4e.js → index-rkbf7dqg.js} +3 -5
- package/dist/index-s2k2edts.js +3778 -0
- package/dist/{index-z6br6qdn.js → index-tfzta544.js} +28 -11
- package/dist/index.js +44 -42
- package/dist/persistence/operations.d.ts +3 -0
- package/dist/providers/vertex-auth.d.ts +5 -1
- package/dist/runtime/config.d.ts +8 -0
- package/dist/runtime/context-runtime.d.ts +1 -0
- package/dist/runtime/error-diagnostics.d.ts +8 -0
- package/dist/runtime/errors.d.ts +10 -0
- package/dist/runtime/harness.d.ts +9 -0
- package/dist/runtime/policy-inspection.d.ts +1 -0
- package/dist/runtime/provider-transient.d.ts +33 -0
- package/dist/runtime/runtime-diagnostics.d.ts +3 -0
- package/dist/runtime/runtime-policy.d.ts +8 -10
- package/dist/runtime/task-acceptance-host.d.ts +1 -1
- package/dist/runtime/task-budget-host.d.ts +217 -0
- package/dist/runtime/task-budget.d.ts +147 -0
- package/dist/runtime/task-continuity.d.ts +434 -0
- package/dist/runtime/task-telemetry.d.ts +63 -0
- package/dist/runtime/task-transport.d.ts +3 -0
- package/dist/runtime/task-usage-context.d.ts +13 -0
- package/dist/runtime/time-to-safe-fix.d.ts +8 -0
- package/dist/runtime/usage-ledger.d.ts +17 -0
- package/dist/service-cli.js +12 -11
- package/dist/{service-client-cli-b52c67hx.js → service-client-cli-fn54ev6w.js} +18 -7
- package/dist/verify-historical-migrations.js +2426 -652
- package/dist/zhx.js +2 -2
- package/docs/CLI.md +38 -8
- package/docs/CLIENT_PROTOCOL.md +9 -1
- package/docs/CODE_RELEASE.md +118 -1
- package/docs/DURABLE_OPERATIONS.md +1 -1
- package/docs/EXTENSIBILITY.md +1 -1
- package/docs/FIRST_USE.md +6 -6
- package/docs/MINIMUM_OFFLINE_EVALS.md +31 -0
- package/docs/MINIMUM_TASK_AUTHORITY.md +395 -0
- package/docs/PROJECT_MEMORY.md +1 -1
- package/docs/README.md +2 -0
- package/docs/STABILITY.md +1 -1
- package/docs/WEB_LIMITS.md +117 -0
- package/evaluations/representative-assembly-matrix.json +28 -1
- package/examples/README.md +5 -5
- package/package.json +8 -5
- package/dist/index-8705zxpr.js +0 -145
- package/dist/index-a1q355va.js +0 -600
- package/dist/index-r0tdj04h.js +0 -976
- package/dist/index-rd0s3gqj.js +0 -1669
- package/dist/index-vtqfjnab.js +0 -1626
|
@@ -427,7 +427,7 @@ Use zhx help all for the full reference and exit codes.`;
|
|
|
427
427
|
// package.json
|
|
428
428
|
var package_default = {
|
|
429
429
|
name: "@zhivex-ai/harness",
|
|
430
|
-
version: "1.4.0
|
|
430
|
+
version: "1.4.0",
|
|
431
431
|
description: "Governed, provider-portable runtime for coding agents with durable approvals and isolated repository execution.",
|
|
432
432
|
type: "module",
|
|
433
433
|
license: "MIT",
|
|
@@ -523,6 +523,7 @@ var package_default = {
|
|
|
523
523
|
"LICENSE",
|
|
524
524
|
"docs/CHANGE_ENVELOPES.md",
|
|
525
525
|
"docs/CLI.md",
|
|
526
|
+
"docs/WEB_LIMITS.md",
|
|
526
527
|
"docs/CODE_RELEASE.md",
|
|
527
528
|
"docs/images/cli-conversation.png",
|
|
528
529
|
"docs/CLIENT_PROTOCOL.md",
|
|
@@ -563,7 +564,9 @@ var package_default = {
|
|
|
563
564
|
"docs/VERTEX.md",
|
|
564
565
|
"docs/TOOL_POLICY.md",
|
|
565
566
|
"docs/fixtures/mcp-stdio-contract-v1.json",
|
|
566
|
-
"docs/PROJECT_MEMORY.md"
|
|
567
|
+
"docs/PROJECT_MEMORY.md",
|
|
568
|
+
"docs/MINIMUM_TASK_AUTHORITY.md",
|
|
569
|
+
"docs/MINIMUM_OFFLINE_EVALS.md"
|
|
567
570
|
],
|
|
568
571
|
scripts: {
|
|
569
572
|
"models:check": "bun run scripts/validate-model-catalog.ts",
|
|
@@ -632,9 +635,9 @@ var package_default = {
|
|
|
632
635
|
"smoke:mcp:installed": "bun run build && bun scripts/mcp-installed-smoke.ts"
|
|
633
636
|
},
|
|
634
637
|
dependencies: {
|
|
635
|
-
"@zhivex-ai/agents": "1.
|
|
638
|
+
"@zhivex-ai/agents": "1.11.0",
|
|
636
639
|
"@zhivex-ai/anthropic": "0.13.2",
|
|
637
|
-
"@zhivex-ai/core": "1.
|
|
640
|
+
"@zhivex-ai/core": "1.31.0",
|
|
638
641
|
"@zhivex-ai/gemini": "0.13.0",
|
|
639
642
|
"@zhivex-ai/meta": "0.2.9",
|
|
640
643
|
"@zhivex-ai/openai": "0.14.1",
|
|
@@ -644,7 +647,7 @@ var package_default = {
|
|
|
644
647
|
zod: "4.6.5"
|
|
645
648
|
},
|
|
646
649
|
overrides: {
|
|
647
|
-
"@zhivex-ai/core": "1.
|
|
650
|
+
"@zhivex-ai/core": "1.31.0"
|
|
648
651
|
},
|
|
649
652
|
devDependencies: {
|
|
650
653
|
"@agentclientprotocol/sdk": "1.7.0",
|
package/dist/cli.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
HARNESS_VERSION,
|
|
4
4
|
shortCliHelp
|
|
5
|
-
} from "./cli-entry-
|
|
5
|
+
} from "./cli-entry-w0hterjs.js";
|
|
6
6
|
import {
|
|
7
7
|
__require
|
|
8
8
|
} from "./cli-entry-1bx83sw4.js";
|
|
@@ -16,6 +16,6 @@ if (argv.length === 1 && ["--version", "-v", "version"].includes(argv[0])) {
|
|
|
16
16
|
process.stdout.write(`${shortCliHelp(HARNESS_VERSION)}
|
|
17
17
|
`);
|
|
18
18
|
} else {
|
|
19
|
-
const { runCli } = await import("./cli-
|
|
19
|
+
const { runCli } = await import("./cli-2h37qyvg.js");
|
|
20
20
|
await runCli(argv);
|
|
21
21
|
}
|
|
@@ -133,6 +133,8 @@ export declare const cliRunResultDocumentSchema: z.ZodObject<{
|
|
|
133
133
|
}>>;
|
|
134
134
|
childBudget: z.ZodObject<{
|
|
135
135
|
unlimitedTokens: z.ZodOptional<z.ZodBoolean>;
|
|
136
|
+
unlimitedSteps: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
unlimitedToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
136
138
|
maxSteps: z.ZodNumber;
|
|
137
139
|
maxToolCalls: z.ZodNumber;
|
|
138
140
|
maxToolErrors: z.ZodNumber;
|
|
@@ -266,8 +268,11 @@ export declare const cliDoctorDocumentSchema: z.ZodObject<{
|
|
|
266
268
|
}, z.core.$loose>;
|
|
267
269
|
maxSteps: z.ZodNumber;
|
|
268
270
|
timeoutMs: z.ZodNumber;
|
|
271
|
+
unlimitedDuration: z.ZodOptional<z.ZodBoolean>;
|
|
269
272
|
budget: z.ZodObject<{
|
|
270
273
|
unlimitedTokens: z.ZodOptional<z.ZodBoolean>;
|
|
274
|
+
unlimitedSteps: z.ZodOptional<z.ZodBoolean>;
|
|
275
|
+
unlimitedToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
271
276
|
maxSteps: z.ZodNumber;
|
|
272
277
|
maxToolCalls: z.ZodNumber;
|
|
273
278
|
maxToolErrors: z.ZodNumber;
|
|
@@ -304,6 +309,8 @@ export declare const cliDoctorDocumentSchema: z.ZodObject<{
|
|
|
304
309
|
}>>;
|
|
305
310
|
childBudget: z.ZodObject<{
|
|
306
311
|
unlimitedTokens: z.ZodOptional<z.ZodBoolean>;
|
|
312
|
+
unlimitedSteps: z.ZodOptional<z.ZodBoolean>;
|
|
313
|
+
unlimitedToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
307
314
|
maxSteps: z.ZodNumber;
|
|
308
315
|
maxToolCalls: z.ZodNumber;
|
|
309
316
|
maxToolErrors: z.ZodNumber;
|
|
@@ -701,6 +708,19 @@ export declare const cliErrorDocumentSchema: z.ZodObject<{
|
|
|
701
708
|
workspace: "workspace";
|
|
702
709
|
}>;
|
|
703
710
|
retryable: z.ZodBoolean;
|
|
711
|
+
providerDiagnostic: z.ZodOptional<z.ZodObject<{
|
|
712
|
+
provider: z.ZodLiteral<"qwen">;
|
|
713
|
+
transport: z.ZodEnum<{
|
|
714
|
+
chat: "chat";
|
|
715
|
+
responses: "responses";
|
|
716
|
+
}>;
|
|
717
|
+
diagnosticCode: z.ZodLiteral<"QWEN_SSE_EVENT_INVALID">;
|
|
718
|
+
reason: z.ZodEnum<{
|
|
719
|
+
invalid_event: "invalid_event";
|
|
720
|
+
invalid_json: "invalid_json";
|
|
721
|
+
}>;
|
|
722
|
+
retryable: z.ZodLiteral<false>;
|
|
723
|
+
}, z.core.$strict>>;
|
|
704
724
|
}, z.core.$loose>;
|
|
705
725
|
}, z.core.$loose>;
|
|
706
726
|
export declare const cliJsonDocumentSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
@@ -742,6 +762,7 @@ export declare const cliJsonDocumentSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
742
762
|
limits: z.ZodObject<{
|
|
743
763
|
maxSteps: z.ZodNumber;
|
|
744
764
|
timeoutMs: z.ZodNumber;
|
|
765
|
+
unlimitedDuration: z.ZodOptional<z.ZodBoolean>;
|
|
745
766
|
budget: z.ZodObject<{}, z.core.$loose>;
|
|
746
767
|
}, z.core.$loose>;
|
|
747
768
|
}, z.core.$loose>, z.ZodObject<{
|
|
@@ -878,6 +899,8 @@ export declare const cliJsonDocumentSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
878
899
|
}>>;
|
|
879
900
|
childBudget: z.ZodObject<{
|
|
880
901
|
unlimitedTokens: z.ZodOptional<z.ZodBoolean>;
|
|
902
|
+
unlimitedSteps: z.ZodOptional<z.ZodBoolean>;
|
|
903
|
+
unlimitedToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
881
904
|
maxSteps: z.ZodNumber;
|
|
882
905
|
maxToolCalls: z.ZodNumber;
|
|
883
906
|
maxToolErrors: z.ZodNumber;
|
|
@@ -1008,8 +1031,11 @@ export declare const cliJsonDocumentSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1008
1031
|
}, z.core.$loose>;
|
|
1009
1032
|
maxSteps: z.ZodNumber;
|
|
1010
1033
|
timeoutMs: z.ZodNumber;
|
|
1034
|
+
unlimitedDuration: z.ZodOptional<z.ZodBoolean>;
|
|
1011
1035
|
budget: z.ZodObject<{
|
|
1012
1036
|
unlimitedTokens: z.ZodOptional<z.ZodBoolean>;
|
|
1037
|
+
unlimitedSteps: z.ZodOptional<z.ZodBoolean>;
|
|
1038
|
+
unlimitedToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
1013
1039
|
maxSteps: z.ZodNumber;
|
|
1014
1040
|
maxToolCalls: z.ZodNumber;
|
|
1015
1041
|
maxToolErrors: z.ZodNumber;
|
|
@@ -1046,6 +1072,8 @@ export declare const cliJsonDocumentSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1046
1072
|
}>>;
|
|
1047
1073
|
childBudget: z.ZodObject<{
|
|
1048
1074
|
unlimitedTokens: z.ZodOptional<z.ZodBoolean>;
|
|
1075
|
+
unlimitedSteps: z.ZodOptional<z.ZodBoolean>;
|
|
1076
|
+
unlimitedToolCalls: z.ZodOptional<z.ZodBoolean>;
|
|
1049
1077
|
maxSteps: z.ZodNumber;
|
|
1050
1078
|
maxToolCalls: z.ZodNumber;
|
|
1051
1079
|
maxToolErrors: z.ZodNumber;
|
|
@@ -1430,6 +1458,19 @@ export declare const cliJsonDocumentSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1430
1458
|
workspace: "workspace";
|
|
1431
1459
|
}>;
|
|
1432
1460
|
retryable: z.ZodBoolean;
|
|
1461
|
+
providerDiagnostic: z.ZodOptional<z.ZodObject<{
|
|
1462
|
+
provider: z.ZodLiteral<"qwen">;
|
|
1463
|
+
transport: z.ZodEnum<{
|
|
1464
|
+
chat: "chat";
|
|
1465
|
+
responses: "responses";
|
|
1466
|
+
}>;
|
|
1467
|
+
diagnosticCode: z.ZodLiteral<"QWEN_SSE_EVENT_INVALID">;
|
|
1468
|
+
reason: z.ZodEnum<{
|
|
1469
|
+
invalid_event: "invalid_event";
|
|
1470
|
+
invalid_json: "invalid_json";
|
|
1471
|
+
}>;
|
|
1472
|
+
retryable: z.ZodLiteral<false>;
|
|
1473
|
+
}, z.core.$strict>>;
|
|
1433
1474
|
}, z.core.$loose>;
|
|
1434
1475
|
}, z.core.$loose>, z.ZodObject<{
|
|
1435
1476
|
schemaVersion: z.ZodLiteral<1>;
|
|
@@ -1592,13 +1633,26 @@ export declare const cliRunEventDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodOb
|
|
|
1592
1633
|
kind: z.ZodLiteral<"run-event">;
|
|
1593
1634
|
type: z.ZodLiteral<"error">;
|
|
1594
1635
|
error: z.ZodLiteral<"Provider stream failed.">;
|
|
1636
|
+
providerDiagnostic: z.ZodOptional<z.ZodObject<{
|
|
1637
|
+
provider: z.ZodLiteral<"qwen">;
|
|
1638
|
+
transport: z.ZodEnum<{
|
|
1639
|
+
chat: "chat";
|
|
1640
|
+
responses: "responses";
|
|
1641
|
+
}>;
|
|
1642
|
+
diagnosticCode: z.ZodLiteral<"QWEN_SSE_EVENT_INVALID">;
|
|
1643
|
+
reason: z.ZodEnum<{
|
|
1644
|
+
invalid_event: "invalid_event";
|
|
1645
|
+
invalid_json: "invalid_json";
|
|
1646
|
+
}>;
|
|
1647
|
+
retryable: z.ZodLiteral<false>;
|
|
1648
|
+
}, z.core.$strict>>;
|
|
1595
1649
|
}, z.core.$loose>, z.ZodObject<{
|
|
1596
1650
|
schemaVersion: z.ZodLiteral<1>;
|
|
1597
1651
|
sequence: z.ZodNumber;
|
|
1598
1652
|
kind: z.ZodLiteral<"run-event">;
|
|
1599
1653
|
type: z.ZodLiteral<"agent-run-start">;
|
|
1600
1654
|
currentStep: z.ZodNumber;
|
|
1601
|
-
maxSteps: z.ZodNumber
|
|
1655
|
+
maxSteps: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
|
|
1602
1656
|
}, z.core.$loose>, z.ZodObject<{
|
|
1603
1657
|
schemaVersion: z.ZodLiteral<1>;
|
|
1604
1658
|
sequence: z.ZodNumber;
|
|
@@ -1678,6 +1732,19 @@ export declare const cliStreamErrorDocumentSchema: z.ZodObject<{
|
|
|
1678
1732
|
workspace: "workspace";
|
|
1679
1733
|
}>;
|
|
1680
1734
|
retryable: z.ZodBoolean;
|
|
1735
|
+
providerDiagnostic: z.ZodOptional<z.ZodObject<{
|
|
1736
|
+
provider: z.ZodLiteral<"qwen">;
|
|
1737
|
+
transport: z.ZodEnum<{
|
|
1738
|
+
chat: "chat";
|
|
1739
|
+
responses: "responses";
|
|
1740
|
+
}>;
|
|
1741
|
+
diagnosticCode: z.ZodLiteral<"QWEN_SSE_EVENT_INVALID">;
|
|
1742
|
+
reason: z.ZodEnum<{
|
|
1743
|
+
invalid_event: "invalid_event";
|
|
1744
|
+
invalid_json: "invalid_json";
|
|
1745
|
+
}>;
|
|
1746
|
+
retryable: z.ZodLiteral<false>;
|
|
1747
|
+
}, z.core.$strict>>;
|
|
1681
1748
|
}, z.core.$loose>;
|
|
1682
1749
|
}, z.core.$loose>;
|
|
1683
1750
|
/** Stable parser for one JSONL record. Every record kind is unambiguous. */
|
|
@@ -1784,13 +1851,26 @@ export declare const cliJsonLineDocumentSchema: z.ZodUnion<readonly [z.ZodDiscri
|
|
|
1784
1851
|
kind: z.ZodLiteral<"run-event">;
|
|
1785
1852
|
type: z.ZodLiteral<"error">;
|
|
1786
1853
|
error: z.ZodLiteral<"Provider stream failed.">;
|
|
1854
|
+
providerDiagnostic: z.ZodOptional<z.ZodObject<{
|
|
1855
|
+
provider: z.ZodLiteral<"qwen">;
|
|
1856
|
+
transport: z.ZodEnum<{
|
|
1857
|
+
chat: "chat";
|
|
1858
|
+
responses: "responses";
|
|
1859
|
+
}>;
|
|
1860
|
+
diagnosticCode: z.ZodLiteral<"QWEN_SSE_EVENT_INVALID">;
|
|
1861
|
+
reason: z.ZodEnum<{
|
|
1862
|
+
invalid_event: "invalid_event";
|
|
1863
|
+
invalid_json: "invalid_json";
|
|
1864
|
+
}>;
|
|
1865
|
+
retryable: z.ZodLiteral<false>;
|
|
1866
|
+
}, z.core.$strict>>;
|
|
1787
1867
|
}, z.core.$loose>, z.ZodObject<{
|
|
1788
1868
|
schemaVersion: z.ZodLiteral<1>;
|
|
1789
1869
|
sequence: z.ZodNumber;
|
|
1790
1870
|
kind: z.ZodLiteral<"run-event">;
|
|
1791
1871
|
type: z.ZodLiteral<"agent-run-start">;
|
|
1792
1872
|
currentStep: z.ZodNumber;
|
|
1793
|
-
maxSteps: z.ZodNumber
|
|
1873
|
+
maxSteps: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"unlimited">]>;
|
|
1794
1874
|
}, z.core.$loose>, z.ZodObject<{
|
|
1795
1875
|
schemaVersion: z.ZodLiteral<1>;
|
|
1796
1876
|
sequence: z.ZodNumber;
|
|
@@ -1868,6 +1948,19 @@ export declare const cliJsonLineDocumentSchema: z.ZodUnion<readonly [z.ZodDiscri
|
|
|
1868
1948
|
workspace: "workspace";
|
|
1869
1949
|
}>;
|
|
1870
1950
|
retryable: z.ZodBoolean;
|
|
1951
|
+
providerDiagnostic: z.ZodOptional<z.ZodObject<{
|
|
1952
|
+
provider: z.ZodLiteral<"qwen">;
|
|
1953
|
+
transport: z.ZodEnum<{
|
|
1954
|
+
chat: "chat";
|
|
1955
|
+
responses: "responses";
|
|
1956
|
+
}>;
|
|
1957
|
+
diagnosticCode: z.ZodLiteral<"QWEN_SSE_EVENT_INVALID">;
|
|
1958
|
+
reason: z.ZodEnum<{
|
|
1959
|
+
invalid_event: "invalid_event";
|
|
1960
|
+
invalid_json: "invalid_json";
|
|
1961
|
+
}>;
|
|
1962
|
+
retryable: z.ZodLiteral<false>;
|
|
1963
|
+
}, z.core.$strict>>;
|
|
1871
1964
|
}, z.core.$loose>;
|
|
1872
1965
|
}, z.core.$loose>]>;
|
|
1873
1966
|
export type CliJsonDocument = z.infer<typeof cliJsonDocumentSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { type HarnessClientResponse, type HarnessClientNegotiation } from "./protocol.js";
|
|
2
|
+
import { type HarnessClientResponse, type HarnessClientNegotiation, type HarnessClientAdapterOptions } from "./protocol.js";
|
|
3
3
|
import { type HarnessActivityPage } from "./service-events.js";
|
|
4
4
|
import type { ZhivexHarness } from "../runtime/harness.js";
|
|
5
5
|
export interface HarnessLocalService {
|
|
@@ -15,7 +15,7 @@ export interface HarnessLocalService {
|
|
|
15
15
|
/** Stops admission, drains accepted commands, closes adapter and host runtime. */
|
|
16
16
|
close(): Promise<void>;
|
|
17
17
|
}
|
|
18
|
-
export interface HarnessLocalServiceOptions {
|
|
18
|
+
export interface HarnessLocalServiceOptions extends Pick<HarnessClientAdapterOptions, "onPrompt" | "onEvent" | "onCheckpoint"> {
|
|
19
19
|
directory: string;
|
|
20
20
|
approvalNow?: () => number;
|
|
21
21
|
sensitiveValues?: readonly string[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { HarnessErrorDocument, ProviderStreamDiagnostic } from "../runtime/errors.js";
|
|
1
2
|
import type { HarnessPolicyDecisionEvent } from "../runtime/policy-decisions.js";
|
|
2
3
|
import type { HarnessPolicyInspection } from "../runtime/policy-inspection.js";
|
|
3
4
|
import { type ApprovalDecisionView } from "../approvals/approval-history.js";
|
|
@@ -238,6 +239,7 @@ export interface HarnessClientRun {
|
|
|
238
239
|
revision: number;
|
|
239
240
|
status: string;
|
|
240
241
|
output: string;
|
|
242
|
+
error?: HarnessErrorDocument["error"];
|
|
241
243
|
cliResult?: unknown;
|
|
242
244
|
decisions?: ApprovalDecisionView[];
|
|
243
245
|
decisionTotal?: number;
|
|
@@ -296,6 +298,7 @@ export type HarnessClientResponse = {
|
|
|
296
298
|
ok: false;
|
|
297
299
|
error: {
|
|
298
300
|
code: HarnessClientErrorCode;
|
|
301
|
+
providerDiagnostic?: ProviderStreamDiagnostic;
|
|
299
302
|
};
|
|
300
303
|
});
|
|
301
304
|
export type HarnessClientNegotiation = {
|
package/dist/client/stream.d.ts
CHANGED
|
@@ -93,13 +93,14 @@ export declare const streamEventDocument: (event: AgentStreamEvent, sequence?: n
|
|
|
93
93
|
sequence: number;
|
|
94
94
|
type: "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish" | "agent-run-start" | "agent-run-update" | "agent-step-finish" | "agent-step-start" | "error" | "finish" | "image-generation" | "provider-data" | "text-delta" | "tool-approval-request" | "tool-call" | "tool-result";
|
|
95
95
|
error: string;
|
|
96
|
+
providerDiagnostic?: import("../runtime/errors.js").ProviderStreamDiagnostic;
|
|
96
97
|
} | {
|
|
97
98
|
schemaVersion: 1;
|
|
98
99
|
kind: "run-event";
|
|
99
100
|
sequence: number;
|
|
100
101
|
type: "agent-approval-request" | "agent-approval-resolved" | "agent-compaction" | "agent-run-finish" | "agent-run-start" | "agent-run-update" | "agent-step-finish" | "agent-step-start" | "error" | "finish" | "image-generation" | "provider-data" | "text-delta" | "tool-approval-request" | "tool-call" | "tool-result";
|
|
101
102
|
currentStep: number;
|
|
102
|
-
maxSteps: number;
|
|
103
|
+
maxSteps: number | "unlimited";
|
|
103
104
|
} | {
|
|
104
105
|
schemaVersion: 1;
|
|
105
106
|
kind: "run-event";
|
|
@@ -24,3 +24,9 @@ export { resolvePackageCheckCommand } from "../execution/package-manager.js";
|
|
|
24
24
|
export { nativeTaskSnapshot } from "../runtime/task-acceptance-native.js";
|
|
25
25
|
export { TASK_ACCEPTANCE_EVIDENCE_KEY } from "../runtime/task-acceptance-record.js";
|
|
26
26
|
export { checkEvidence } from "../client/check-evidence.js";
|
|
27
|
+
export { initializeHarnessTaskBudget, inspectHarnessTaskBudget, requestHarnessTaskCancellation, persistHarnessTaskDraft, readHarnessTaskDraft } from "../runtime/task-budget-host.js";
|
|
28
|
+
export { TASK_BUDGET_KEY, inspectTaskBudgetSummary } from "../runtime/task-budget.js";
|
|
29
|
+
export { inspectHarnessTaskContinuity } from '../runtime/task-continuity.js';
|
|
30
|
+
export { createTaskTelemetry } from '../runtime/task-telemetry.js';
|
|
31
|
+
export { runHarnessTask } from '../runtime/harness.js';
|
|
32
|
+
export type { HarnessTaskRunOptions } from '../runtime/harness.js';
|
|
@@ -3,20 +3,31 @@ import {
|
|
|
3
3
|
} from "../index-wg1sd3at.js";
|
|
4
4
|
import {
|
|
5
5
|
checkEvidence,
|
|
6
|
+
createTaskTelemetry,
|
|
6
7
|
estimateMessages,
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
initializeHarnessTaskBudget,
|
|
9
|
+
inspectHarnessTaskBudget,
|
|
10
|
+
inspectHarnessTaskContinuity,
|
|
11
|
+
nativeTaskSnapshot,
|
|
12
|
+
persistHarnessTaskDraft,
|
|
13
|
+
readHarnessTaskDraft,
|
|
14
|
+
requestHarnessTaskCancellation,
|
|
15
|
+
runHarnessTask
|
|
16
|
+
} from "../index-pp474137.js";
|
|
9
17
|
import {
|
|
10
18
|
TASK_ACCEPTANCE_EVIDENCE_KEY,
|
|
19
|
+
TASK_BUDGET_KEY,
|
|
11
20
|
TASK_SOURCE_KEY,
|
|
12
21
|
USAGE_LEDGER_KEY,
|
|
13
22
|
formatUsageLedger,
|
|
14
23
|
harnessToolExecution,
|
|
15
24
|
inspectRuntimeDiagnostics,
|
|
25
|
+
inspectTaskBudgetSummary,
|
|
16
26
|
inspectUsageLedger,
|
|
17
27
|
taskSources,
|
|
18
28
|
usagePricingSchema
|
|
19
|
-
} from "../index-
|
|
29
|
+
} from "../index-s2k2edts.js";
|
|
30
|
+
import"../index-pdmevfxv.js";
|
|
20
31
|
import {
|
|
21
32
|
FileChangedWhileReadingError,
|
|
22
33
|
FileSizeLimitError,
|
|
@@ -26,18 +37,20 @@ import {
|
|
|
26
37
|
resolvePackageCheckCommand,
|
|
27
38
|
resolvePackageManager,
|
|
28
39
|
runPortableProcess
|
|
29
|
-
} from "../index-
|
|
40
|
+
} from "../index-m34q25jj.js";
|
|
30
41
|
import {
|
|
31
42
|
DEFAULT_HARNESS_MAX_STEPS,
|
|
32
43
|
modelReasoningEfforts,
|
|
33
44
|
reasoningEffortSchema
|
|
34
|
-
} from "../index-
|
|
35
|
-
import"../index-
|
|
45
|
+
} from "../index-8zjmnyw5.js";
|
|
46
|
+
import"../index-m49jx72n.js";
|
|
36
47
|
import {
|
|
37
48
|
bundledModelCatalog,
|
|
38
49
|
catalogModels,
|
|
39
50
|
modelDescription
|
|
40
51
|
} from "../index-xqxeypt5.js";
|
|
52
|
+
import"../index-bpc596v3.js";
|
|
53
|
+
import"../index-fm84men1.js";
|
|
41
54
|
import"../index-1bx83sw4.js";
|
|
42
55
|
// src/compat/code-support.ts
|
|
43
56
|
var inspectCodeStateDatabase = (databasePath) => {
|
|
@@ -56,26 +69,36 @@ export {
|
|
|
56
69
|
FileChangedWhileReadingError,
|
|
57
70
|
FileSizeLimitError,
|
|
58
71
|
TASK_ACCEPTANCE_EVIDENCE_KEY,
|
|
72
|
+
TASK_BUDGET_KEY,
|
|
59
73
|
TASK_SOURCE_KEY,
|
|
60
74
|
USAGE_LEDGER_KEY,
|
|
61
75
|
UnsafeFileTypeError,
|
|
62
76
|
bundledModelCatalog,
|
|
63
77
|
catalogModels,
|
|
64
78
|
checkEvidence,
|
|
79
|
+
createTaskTelemetry,
|
|
65
80
|
estimateMessages,
|
|
66
81
|
formatUsageLedger,
|
|
67
82
|
harnessToolExecution,
|
|
83
|
+
initializeHarnessTaskBudget,
|
|
68
84
|
inspectCodeStateDatabase,
|
|
85
|
+
inspectHarnessTaskBudget,
|
|
86
|
+
inspectHarnessTaskContinuity,
|
|
69
87
|
inspectRuntimeDiagnostics,
|
|
88
|
+
inspectTaskBudgetSummary,
|
|
70
89
|
inspectUsageLedger,
|
|
71
90
|
loadModelCatalog,
|
|
72
91
|
modelDescription,
|
|
73
92
|
modelReasoningEfforts,
|
|
74
93
|
nativeTaskSnapshot,
|
|
94
|
+
persistHarnessTaskDraft,
|
|
95
|
+
readHarnessTaskDraft,
|
|
75
96
|
readRegularFileNoFollow,
|
|
76
97
|
reasoningEffortSchema,
|
|
98
|
+
requestHarnessTaskCancellation,
|
|
77
99
|
resolvePackageCheckCommand,
|
|
78
100
|
resolvePackageManager,
|
|
101
|
+
runHarnessTask,
|
|
79
102
|
runPortableProcess,
|
|
80
103
|
taskSources,
|
|
81
104
|
usagePricingSchema
|
|
@@ -26,9 +26,11 @@ import {
|
|
|
26
26
|
providerAvailability,
|
|
27
27
|
providerDescriptor,
|
|
28
28
|
resolveHarnessConfig
|
|
29
|
-
} from "./index-
|
|
30
|
-
import"./index-
|
|
29
|
+
} from "./index-8zjmnyw5.js";
|
|
30
|
+
import"./index-m49jx72n.js";
|
|
31
31
|
import"./index-xqxeypt5.js";
|
|
32
|
+
import"./index-bpc596v3.js";
|
|
33
|
+
import"./index-fm84men1.js";
|
|
32
34
|
import"./index-1bx83sw4.js";
|
|
33
35
|
export {
|
|
34
36
|
BUILTIN_PROVIDER_REGISTRATIONS,
|
package/dist/engine/acp.js
CHANGED
|
@@ -2,26 +2,28 @@ import {
|
|
|
2
2
|
discardMcpWorkspaceSnapshot,
|
|
3
3
|
launchDockerMcpGroup,
|
|
4
4
|
prepareMcpWorkspaceSnapshot
|
|
5
|
-
} from "../index-
|
|
5
|
+
} from "../index-rkbf7dqg.js";
|
|
6
6
|
import {
|
|
7
7
|
createAcpConnection,
|
|
8
8
|
issueAcpMcpSessionProvider,
|
|
9
9
|
serveAcpStdio
|
|
10
10
|
} from "../index-3ah1f369.js";
|
|
11
11
|
import {
|
|
12
|
-
createHarness,
|
|
13
12
|
createHarnessClientAdapter
|
|
14
|
-
} from "../index-
|
|
15
|
-
import"../index-
|
|
16
|
-
import
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import"../index-
|
|
20
|
-
import"../index-
|
|
21
|
-
import"../index-
|
|
22
|
-
import"../index-
|
|
13
|
+
} from "../index-937cb7y8.js";
|
|
14
|
+
import"../index-6dft2vev.js";
|
|
15
|
+
import {
|
|
16
|
+
createHarness
|
|
17
|
+
} from "../index-pp474137.js";
|
|
18
|
+
import"../index-s2k2edts.js";
|
|
19
|
+
import"../index-pdmevfxv.js";
|
|
20
|
+
import"../index-m34q25jj.js";
|
|
21
|
+
import"../index-8zjmnyw5.js";
|
|
22
|
+
import"../index-m49jx72n.js";
|
|
23
23
|
import"../index-xqxeypt5.js";
|
|
24
|
-
import"../index-
|
|
24
|
+
import"../index-nmjdwd4p.js";
|
|
25
|
+
import"../index-bpc596v3.js";
|
|
26
|
+
import"../index-fm84men1.js";
|
|
25
27
|
import"../index-1bx83sw4.js";
|
|
26
28
|
// src/client/acp-mcp-host.ts
|
|
27
29
|
import { createHash } from "node:crypto";
|
package/dist/engine/client.js
CHANGED
|
@@ -2,21 +2,22 @@ import {
|
|
|
2
2
|
createHarnessClientAdapter,
|
|
3
3
|
runResultDocument,
|
|
4
4
|
terminalContinuationMessages
|
|
5
|
-
} from "../index-
|
|
6
|
-
import"../index-
|
|
7
|
-
import"../index-
|
|
8
|
-
import"../index-
|
|
9
|
-
import"../index-
|
|
10
|
-
import"../index-
|
|
11
|
-
import"../index-
|
|
12
|
-
import"../index-
|
|
13
|
-
import"../index-8705zxpr.js";
|
|
5
|
+
} from "../index-937cb7y8.js";
|
|
6
|
+
import"../index-6dft2vev.js";
|
|
7
|
+
import"../index-pp474137.js";
|
|
8
|
+
import"../index-s2k2edts.js";
|
|
9
|
+
import"../index-pdmevfxv.js";
|
|
10
|
+
import"../index-m34q25jj.js";
|
|
11
|
+
import"../index-8zjmnyw5.js";
|
|
12
|
+
import"../index-m49jx72n.js";
|
|
14
13
|
import"../index-xqxeypt5.js";
|
|
15
14
|
import {
|
|
16
15
|
HARNESS_CLIENT_PROTOCOL_VERSION,
|
|
17
16
|
harnessClientCommandSchema,
|
|
18
17
|
harnessClientRequestSchema
|
|
19
|
-
} from "../index-
|
|
18
|
+
} from "../index-nmjdwd4p.js";
|
|
19
|
+
import"../index-bpc596v3.js";
|
|
20
|
+
import"../index-fm84men1.js";
|
|
20
21
|
import"../index-1bx83sw4.js";
|
|
21
22
|
export {
|
|
22
23
|
HARNESS_CLIENT_PROTOCOL_VERSION,
|
|
@@ -6,8 +6,9 @@ import {
|
|
|
6
6
|
vertexEnvironment,
|
|
7
7
|
vertexRoute,
|
|
8
8
|
vertexTokenSource
|
|
9
|
-
} from "../index-
|
|
9
|
+
} from "../index-m49jx72n.js";
|
|
10
10
|
import"../index-xqxeypt5.js";
|
|
11
|
+
import"../index-fm84men1.js";
|
|
11
12
|
import"../index-1bx83sw4.js";
|
|
12
13
|
export {
|
|
13
14
|
loadModelCatalog,
|
|
@@ -2,14 +2,12 @@ import {
|
|
|
2
2
|
createArchivedHarnessStateBackup,
|
|
3
3
|
createHarnessStateBackup,
|
|
4
4
|
validateRecordedWorkspace
|
|
5
|
-
} from "../index-
|
|
6
|
-
import
|
|
7
|
-
HARNESS_SQLITE_FILE
|
|
8
|
-
} from "../index-rd0s3gqj.js";
|
|
5
|
+
} from "../index-tfzta544.js";
|
|
6
|
+
import"../index-6dft2vev.js";
|
|
9
7
|
import {
|
|
8
|
+
HARNESS_SQLITE_FILE,
|
|
10
9
|
validateStateDirectory
|
|
11
|
-
} from "../index-
|
|
12
|
-
import"../index-e6r04a18.js";
|
|
10
|
+
} from "../index-s2k2edts.js";
|
|
13
11
|
import {
|
|
14
12
|
SqliteDatabase,
|
|
15
13
|
acquireSqliteAccess,
|
|
@@ -18,10 +16,12 @@ import {
|
|
|
18
16
|
protectPersistenceSecret,
|
|
19
17
|
readRegularFileNoFollow,
|
|
20
18
|
statRegularFileNoFollow
|
|
21
|
-
} from "../index-
|
|
22
|
-
import"../index-
|
|
23
|
-
import"../index-
|
|
19
|
+
} from "../index-m34q25jj.js";
|
|
20
|
+
import"../index-8zjmnyw5.js";
|
|
21
|
+
import"../index-m49jx72n.js";
|
|
24
22
|
import"../index-xqxeypt5.js";
|
|
23
|
+
import"../index-bpc596v3.js";
|
|
24
|
+
import"../index-fm84men1.js";
|
|
25
25
|
import"../index-1bx83sw4.js";
|
|
26
26
|
|
|
27
27
|
// src/persistence/host-database-backup.ts
|