@zhivex-ai/harness 1.4.0 → 1.4.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.
- package/CHANGELOG.md +29 -10
- package/README.md +7 -5
- package/SUPPORT.md +2 -2
- package/contracts/client-protocol-v1.schema.json +593 -0
- package/contracts/engine-api.json +156 -0
- package/contracts/public-api.json +12 -0
- package/contracts/stable-api-signatures.json +33 -33
- package/dist/acp-cli.js +54 -20
- package/dist/audit/index.d.ts +3 -0
- package/dist/audit/index.js +482 -0
- package/dist/audit/pack.d.ts +72 -0
- package/dist/audit-pack-e4vaq7np.js +532 -0
- package/dist/cli/arguments.d.ts +3 -1
- package/dist/cli/audit-pack.d.ts +24 -0
- package/dist/cli/cli-credentials.d.ts +6 -0
- package/dist/cli/cli-profiles.d.ts +4 -2
- package/dist/cli/node-engine.d.ts +2 -0
- package/dist/{cli-2h37qyvg.js → cli-1cf4dcnj.js} +245 -642
- package/dist/{cli-entry-w0hterjs.js → cli-entry-3s63zn4w.js} +40 -13
- package/dist/cli-entry-7f0cen32.js +9990 -0
- package/dist/cli-entry-a890x3kq.js +10348 -0
- package/dist/{cli-entry-20w6nh0k.js → cli-entry-hdtfef27.js} +439 -19
- package/dist/cli-entry-rgs6bxmy.js +484 -0
- package/dist/cli.js +27 -2
- package/dist/client/json-contracts.d.ts +4 -0
- package/dist/client/protocol.d.ts +133 -0
- package/dist/client/task-control-host.d.ts +400 -0
- package/dist/client/task-projection-host.d.ts +12 -0
- package/dist/client/task-projection.d.ts +168 -0
- package/dist/compat/code-support.js +28 -22
- package/dist/{config-qt69hkqj.js → config-r9fdhce6.js} +3 -3
- package/dist/{config-j9624t6t.js → config-vyajmksy.js} +1 -1
- package/dist/engine/acp.js +15 -11
- package/dist/engine/client.js +14 -10
- package/dist/engine/desktop-providers-v1.d.ts +2 -0
- package/dist/engine/desktop-providers-v1.js +23 -3
- package/dist/engine/desktop-state-v1.js +11 -8
- package/dist/engine/index.d.ts +3 -0
- package/dist/engine/index.js +101 -554
- package/dist/engine/mcp-stdio-v1.js +8 -6
- package/dist/engine/models.js +76 -4
- package/dist/engine/protocol.d.ts +2 -0
- package/dist/engine/protocol.js +110 -0
- package/dist/engine/service.js +15 -11
- package/dist/hostile-repository-demo.js +1095 -505
- package/dist/{index-937cb7y8.js → index-02pqtbbg.js} +559 -33
- package/dist/{index-pp474137.js → index-0zs2dz26.js} +766 -931
- package/dist/{index-8zjmnyw5.js → index-1265j7t2.js} +73 -6
- package/dist/index-4fx5f3k5.js +269 -0
- package/dist/{index-nmjdwd4p.js → index-4gt045j0.js} +109 -1
- package/dist/{index-6dft2vev.js → index-6599mpmy.js} +5 -3
- package/dist/{index-tfzta544.js → index-74kkpyqk.js} +9 -7
- package/dist/{index-61gthdz6.js → index-8sm2a1wa.js} +1 -1
- package/dist/index-c39197wq.js +552 -0
- package/dist/{index-5jhgatga.js → index-crta5wzv.js} +7 -6
- package/dist/{index-m34q25jj.js → index-d9zkmhz3.js} +143 -824
- package/dist/{index-pdmevfxv.js → index-dtb2c6ds.js} +5 -259
- package/dist/index-f6mqa5gk.js +1535 -0
- package/dist/index-j6zxnc8m.js +490 -0
- package/dist/{index-rkbf7dqg.js → index-mv8sb1ns.js} +5 -3
- package/dist/{index-xqxeypt5.js → index-mzydbzp8.js} +76 -4
- package/dist/{index-wg1sd3at.js → index-qfsrrnz6.js} +1 -1
- package/dist/{index-m82cfspw.js → index-sk3cap35.js} +877 -963
- package/dist/index-sstgcsr0.js +511 -0
- package/dist/index-wm9xeq1n.js +329 -0
- package/dist/index-xdbkcccf.js +719 -0
- package/dist/{index-s2k2edts.js → index-zxg4ve4j.js} +41 -1548
- package/dist/index.d.ts +3 -0
- package/dist/index.js +93 -77
- package/dist/internal/desktop/providers.d.ts +2 -0
- package/dist/models/catalog.d.ts +2 -0
- package/dist/persistence/sqlite-database.d.ts +1 -0
- package/dist/providers/azure-openai.d.ts +14 -0
- package/dist/providers/bedrock.d.ts +23 -0
- package/dist/providers/providers.d.ts +1 -1
- package/dist/runtime/durable-review-group.d.ts +33 -0
- package/dist/runtime/harness.d.ts +11 -0
- package/dist/runtime/run-interruption.d.ts +7 -0
- package/dist/runtime/shared-budget.d.ts +30 -0
- package/dist/runtime/task-continuity.d.ts +300 -77
- package/dist/service-cli.js +15 -11
- package/dist/{service-client-cli-fn54ev6w.js → service-client-cli-eqrdc9zq.js} +400 -305
- package/dist/verify-historical-migrations.js +1095 -505
- package/dist/zhx.js +27 -2
- package/docs/AUDIT_PACK.md +99 -0
- package/docs/AZURE_OPENAI.md +53 -0
- package/docs/BEDROCK.md +56 -0
- package/docs/CLI.md +15 -0
- package/docs/CLIENT_PROTOCOL.md +178 -0
- package/docs/CODE_RELEASE.md +31 -1
- package/docs/CODE_WEB_TASKS.md +116 -0
- package/docs/CONTEXT_ENGINEERING.md +59 -0
- package/docs/CREDENTIALS.md +21 -0
- package/docs/DURABLE_OPERATIONS.md +93 -1
- package/docs/ENGINE_API.md +5 -2
- package/docs/EXTENSIBILITY.md +2 -2
- package/docs/FIRST_USE.md +6 -6
- package/docs/MINIMUM_TASK_AUTHORITY.md +3 -3
- package/docs/PROJECT_MEMORY.md +1 -1
- package/docs/README.md +6 -1
- package/docs/STABILITY.md +3 -1
- package/docs/SUPPORT_MATRIX.md +1 -1
- package/docs/SUPPORT_MATRIX_1_1.md +1 -1
- package/docs/USAGE.md +3 -1
- package/docs/VERTEX.md +2 -2
- package/docs/WEB_LIMITS.md +4 -3
- package/docs/adr/0002-isolated-mcp-stdio.md +6 -3
- package/docs/support-matrix-1.1.json +3 -1
- package/docs/support-matrix.json +6 -4
- package/evaluations/code-task-ui.json +20 -0
- package/evaluations/representative-assembly-matrix.json +10 -1
- package/evaluations/task-projection.json +10 -0
- package/evaluations/task-recovery-lab.json +60 -0
- package/examples/README.md +3 -3
- package/package.json +23 -13
- package/dist/cli-entry-4ngptr62.js +0 -19900
- package/dist/index-m49jx72n.js +0 -220
package/dist/index.d.ts
CHANGED
|
@@ -60,3 +60,6 @@ export { serveAcpStdio } from "./client/acp-stdio.js";
|
|
|
60
60
|
export { openWorkspaceCheckpointStore } from "./persistence/workspace-checkpoints.js";
|
|
61
61
|
export type { WorkspaceCheckpoint, WorkspaceRestoreOperation } from "./persistence/workspace-checkpoints.js";
|
|
62
62
|
export type { HarnessMcpResourceClient } from "./integrations/mcp.js";
|
|
63
|
+
export { runHarnessDurableReviewGroup, inspectHarnessReviewGroup, cancelHarnessReviewGroup } from "./runtime/durable-review-group.js";
|
|
64
|
+
export type { HarnessDurableReviewGroupResult } from "./runtime/durable-review-group.js";
|
|
65
|
+
export type { HarnessSharedBudgetOptions } from "./runtime/shared-budget.js";
|
package/dist/index.js
CHANGED
|
@@ -8,13 +8,7 @@ import {
|
|
|
8
8
|
terminalSupportsColor
|
|
9
9
|
} from "./index-4jw3tvy8.js";
|
|
10
10
|
import {
|
|
11
|
-
CHANGE_ENVELOPE_DIGEST_ALGORITHM,
|
|
12
|
-
CHANGE_ENVELOPE_SCHEMA_VERSION,
|
|
13
11
|
DEFAULT_TIME_TO_SAFE_FIX_GOAL,
|
|
14
|
-
MAX_CHANGE_ENVELOPE_APPROVALS,
|
|
15
|
-
MAX_CHANGE_ENVELOPE_APPROVAL_SCOPES,
|
|
16
|
-
MAX_CHANGE_ENVELOPE_ATTESTATIONS,
|
|
17
|
-
MAX_CHANGE_ENVELOPE_CHECKS,
|
|
18
12
|
TIME_TO_SAFE_FIX_CARRIERS,
|
|
19
13
|
TIME_TO_SAFE_FIX_DIAGNOSTIC_CODES,
|
|
20
14
|
TIME_TO_SAFE_FIX_FAILURE_ORIGINS,
|
|
@@ -22,16 +16,7 @@ import {
|
|
|
22
16
|
TIME_TO_SAFE_FIX_GOALS,
|
|
23
17
|
TIME_TO_SAFE_FIX_PROFILES,
|
|
24
18
|
TIME_TO_SAFE_FIX_SCHEMA_VERSION,
|
|
25
|
-
|
|
26
|
-
changeEnvelopeApprovalSchema,
|
|
27
|
-
changeEnvelopeBaseSchema,
|
|
28
|
-
changeEnvelopeCheckSchema,
|
|
29
|
-
changeEnvelopeEvidenceSchema,
|
|
30
|
-
changeEnvelopeFingerprintsSchema,
|
|
31
|
-
changeEnvelopeInputSchema,
|
|
32
|
-
changeEnvelopePatchSchema,
|
|
33
|
-
changeEnvelopePreconditionsSchema,
|
|
34
|
-
changeEnvelopeSchema,
|
|
19
|
+
cancelHarnessReviewGroup,
|
|
35
20
|
classifyTimeToSafeFixFailure,
|
|
36
21
|
cliChangeEnvelopeVerificationDocumentSchema,
|
|
37
22
|
cliDoctorDocumentSchema,
|
|
@@ -55,23 +40,19 @@ import {
|
|
|
55
40
|
cliStateStatusDocumentSchema,
|
|
56
41
|
cliStreamErrorDocumentSchema,
|
|
57
42
|
cliStreamResultDocumentSchema,
|
|
58
|
-
computeChangeEnvelopeDigest,
|
|
59
|
-
computeChangeEnvelopeEvidenceDigest,
|
|
60
|
-
createChangeEnvelope,
|
|
61
43
|
createTimeToSafeFixCases,
|
|
62
44
|
createTimeToSafeFixReport,
|
|
63
45
|
createTimeToSafeFixSample,
|
|
64
|
-
digestChangeEnvelopeArtifact,
|
|
65
|
-
externalAttestationReferenceSchema,
|
|
66
46
|
injectTimeToSafeFixAttack,
|
|
47
|
+
inspectHarnessReviewGroup,
|
|
67
48
|
parseCliJsonDocument,
|
|
68
49
|
parseCliJsonLineDocument,
|
|
69
50
|
recommendCompactionModels,
|
|
51
|
+
runHarnessDurableReviewGroup,
|
|
70
52
|
timeToSafeFixDriverResultSchema,
|
|
71
53
|
timeToSafeFixLatencyStatistics,
|
|
72
|
-
timeToSafeFixTaskSchema
|
|
73
|
-
|
|
74
|
-
} from "./index-m82cfspw.js";
|
|
54
|
+
timeToSafeFixTaskSchema
|
|
55
|
+
} from "./index-sk3cap35.js";
|
|
75
56
|
import {
|
|
76
57
|
HARNESS_STATE_BACKUP_MAX_BYTES,
|
|
77
58
|
HARNESS_STATE_BACKUP_SCHEMA_VERSION,
|
|
@@ -82,7 +63,7 @@ import {
|
|
|
82
63
|
inspectHarnessState,
|
|
83
64
|
readHarnessStateBackup,
|
|
84
65
|
stateBackupBundleSchema
|
|
85
|
-
} from "./index-
|
|
66
|
+
} from "./index-74kkpyqk.js";
|
|
86
67
|
import {
|
|
87
68
|
CLI_COMMAND_OPTION_CONTRACTS,
|
|
88
69
|
CLI_OPTION_DEFINITIONS,
|
|
@@ -92,7 +73,35 @@ import {
|
|
|
92
73
|
resolveHarnessModelRoutes,
|
|
93
74
|
serializeHarnessModelRoutes,
|
|
94
75
|
validateCliCommandOptions
|
|
95
|
-
} from "./index-
|
|
76
|
+
} from "./index-8sm2a1wa.js";
|
|
77
|
+
import {
|
|
78
|
+
createAcpConnection,
|
|
79
|
+
serveAcpStdio
|
|
80
|
+
} from "./index-3ah1f369.js";
|
|
81
|
+
import {
|
|
82
|
+
CHANGE_ENVELOPE_DIGEST_ALGORITHM,
|
|
83
|
+
CHANGE_ENVELOPE_SCHEMA_VERSION,
|
|
84
|
+
MAX_CHANGE_ENVELOPE_APPROVALS,
|
|
85
|
+
MAX_CHANGE_ENVELOPE_APPROVAL_SCOPES,
|
|
86
|
+
MAX_CHANGE_ENVELOPE_ATTESTATIONS,
|
|
87
|
+
MAX_CHANGE_ENVELOPE_CHECKS,
|
|
88
|
+
canonicalizeChangeEnvelope,
|
|
89
|
+
changeEnvelopeApprovalSchema,
|
|
90
|
+
changeEnvelopeBaseSchema,
|
|
91
|
+
changeEnvelopeCheckSchema,
|
|
92
|
+
changeEnvelopeEvidenceSchema,
|
|
93
|
+
changeEnvelopeFingerprintsSchema,
|
|
94
|
+
changeEnvelopeInputSchema,
|
|
95
|
+
changeEnvelopePatchSchema,
|
|
96
|
+
changeEnvelopePreconditionsSchema,
|
|
97
|
+
changeEnvelopeSchema,
|
|
98
|
+
computeChangeEnvelopeDigest,
|
|
99
|
+
computeChangeEnvelopeEvidenceDigest,
|
|
100
|
+
createChangeEnvelope,
|
|
101
|
+
digestChangeEnvelopeArtifact,
|
|
102
|
+
externalAttestationReferenceSchema,
|
|
103
|
+
verifyChangeEnvelope
|
|
104
|
+
} from "./index-sstgcsr0.js";
|
|
96
105
|
import {
|
|
97
106
|
harnessLocalCredentialsSchema,
|
|
98
107
|
openHarnessActivityStore,
|
|
@@ -100,17 +109,13 @@ import {
|
|
|
100
109
|
recoverHarnessLocalService,
|
|
101
110
|
requestHarnessLocalService,
|
|
102
111
|
startHarnessLocalService
|
|
103
|
-
} from "./index-
|
|
104
|
-
import {
|
|
105
|
-
createAcpConnection,
|
|
106
|
-
serveAcpStdio
|
|
107
|
-
} from "./index-3ah1f369.js";
|
|
112
|
+
} from "./index-crta5wzv.js";
|
|
108
113
|
import {
|
|
109
114
|
createHarnessClientAdapter
|
|
110
|
-
} from "./index-
|
|
115
|
+
} from "./index-02pqtbbg.js";
|
|
111
116
|
import {
|
|
112
117
|
openWorkspaceCheckpointStore
|
|
113
|
-
} from "./index-
|
|
118
|
+
} from "./index-6599mpmy.js";
|
|
114
119
|
import {
|
|
115
120
|
DEFAULT_HARNESS_CONTEXT_MANIFEST,
|
|
116
121
|
DEFAULT_HARNESS_PROJECT_INSTRUCTIONS,
|
|
@@ -127,7 +132,6 @@ import {
|
|
|
127
132
|
MAX_HARNESS_SKILL_FILE_BYTES,
|
|
128
133
|
SEMANTIC_COMPACTION_VERSION,
|
|
129
134
|
appendUserMessage,
|
|
130
|
-
applyHarnessToolPolicy,
|
|
131
135
|
assertHarnessModelCapabilities,
|
|
132
136
|
compactHarnessMessages,
|
|
133
137
|
createEmptyHarnessContextBundle,
|
|
@@ -135,7 +139,6 @@ import {
|
|
|
135
139
|
createHarness,
|
|
136
140
|
createHarnessLifecycleDispatcher,
|
|
137
141
|
createHarnessSubagents,
|
|
138
|
-
createHarnessToolPolicy,
|
|
139
142
|
createProgressMonitor,
|
|
140
143
|
createSemanticCompactor,
|
|
141
144
|
estimateMessageTokens,
|
|
@@ -143,7 +146,6 @@ import {
|
|
|
143
146
|
harnessContextFingerprintInput,
|
|
144
147
|
harnessLifecycleFingerprintInput,
|
|
145
148
|
harnessSkillLoadInputSchema,
|
|
146
|
-
harnessToolPolicySchema,
|
|
147
149
|
inspectHarnessModelCapabilities,
|
|
148
150
|
isHarnessContextDigest,
|
|
149
151
|
loadHarnessProjectContext,
|
|
@@ -152,69 +154,38 @@ import {
|
|
|
152
154
|
runHarness,
|
|
153
155
|
runHarnessReviewGroup,
|
|
154
156
|
selectHarnessModel
|
|
155
|
-
} from "./index-
|
|
157
|
+
} from "./index-0zs2dz26.js";
|
|
156
158
|
import {
|
|
157
159
|
HARNESS_OPERATIONS_SCHEMA_VERSION,
|
|
158
|
-
HARNESS_SESSION_INDEX_FILE,
|
|
159
|
-
HARNESS_SESSION_SCHEMA_VERSION,
|
|
160
160
|
HARNESS_SQLITE_FILE,
|
|
161
|
-
SESSION_RUN_STATUSES,
|
|
162
161
|
TERMINAL_RUN_STATUSES,
|
|
163
|
-
TERMINAL_SESSION_RUN_STATUSES,
|
|
164
162
|
cancelHarnessRun,
|
|
165
163
|
cleanupHarnessRuns,
|
|
166
164
|
inspectHarnessRun,
|
|
167
165
|
listHarnessRuns,
|
|
168
166
|
migrateLegacyFileRuns,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
openSessionStore,
|
|
172
|
-
validateStateDirectory
|
|
173
|
-
} from "./index-s2k2edts.js";
|
|
167
|
+
openHarnessPersistence
|
|
168
|
+
} from "./index-f6mqa5gk.js";
|
|
174
169
|
import {
|
|
175
|
-
BUN_ENGINE_RANGE,
|
|
176
170
|
HARNESS_MCP_CONFIG_SCHEMA_VERSION,
|
|
177
171
|
HARNESS_MCP_PERMISSIONS,
|
|
178
|
-
HARNESS_VERSION,
|
|
179
|
-
NODE_ENGINE_RANGE,
|
|
180
172
|
createHarnessMcpTools,
|
|
181
173
|
createHttpMcpClient,
|
|
182
174
|
loadHarnessMcpConfiguration,
|
|
183
175
|
normalizeHarnessMcpConfiguration
|
|
184
|
-
} from "./index-
|
|
176
|
+
} from "./index-dtb2c6ds.js";
|
|
185
177
|
import {
|
|
186
178
|
CliOciRuntimeAdapter,
|
|
187
|
-
EDIT_CONTRACT_SCHEMA_VERSION,
|
|
188
|
-
EDIT_DIGEST_ALGORITHM,
|
|
189
179
|
HARNESS_EXECUTION_ARTIFACT_SCHEMA_VERSION,
|
|
190
180
|
HARNESS_OCI_LABEL,
|
|
191
181
|
HARNESS_OCI_LABEL_VALUE,
|
|
192
|
-
MAX_EDIT_CHANGES,
|
|
193
|
-
MAX_EDIT_FILE_BYTES,
|
|
194
|
-
MAX_EDIT_PROPOSAL_BYTES,
|
|
195
182
|
Workspace,
|
|
196
|
-
applyEditProposalInputSchema,
|
|
197
183
|
cleanupHarnessExecutionArtifacts,
|
|
198
|
-
createEditProposal,
|
|
199
184
|
createHarnessOciExecutionEnvironment,
|
|
200
185
|
describeOciCommand,
|
|
201
|
-
editChangeSchema,
|
|
202
|
-
editChangesSchema,
|
|
203
|
-
editContractDocument,
|
|
204
|
-
editProposalChangeSchema,
|
|
205
|
-
editProposalInputSchema,
|
|
206
|
-
editProposalSchema,
|
|
207
186
|
executionFingerprintInput,
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
moveFileInputSchema,
|
|
211
|
-
mutationAuditEntrySchema,
|
|
212
|
-
mutationOperationSchema,
|
|
213
|
-
quarantineFileInputSchema,
|
|
214
|
-
restoreFileInputSchema,
|
|
215
|
-
validateEditProposal,
|
|
216
|
-
workspaceFilePathSchema
|
|
217
|
-
} from "./index-m34q25jj.js";
|
|
187
|
+
harnessExecutionSession
|
|
188
|
+
} from "./index-d9zkmhz3.js";
|
|
218
189
|
import {
|
|
219
190
|
BUILTIN_PROVIDER_REGISTRATIONS,
|
|
220
191
|
DEFAULT_ALLOWED_CHECKS,
|
|
@@ -239,9 +210,51 @@ import {
|
|
|
239
210
|
providerAvailability,
|
|
240
211
|
providerDescriptor,
|
|
241
212
|
resolveHarnessConfig
|
|
242
|
-
} from "./index-
|
|
243
|
-
import"./index-
|
|
244
|
-
import"./index-
|
|
213
|
+
} from "./index-1265j7t2.js";
|
|
214
|
+
import"./index-c39197wq.js";
|
|
215
|
+
import"./index-mzydbzp8.js";
|
|
216
|
+
import {
|
|
217
|
+
applyHarnessToolPolicy,
|
|
218
|
+
createHarnessToolPolicy,
|
|
219
|
+
harnessToolPolicySchema
|
|
220
|
+
} from "./index-wm9xeq1n.js";
|
|
221
|
+
import {
|
|
222
|
+
HARNESS_SESSION_INDEX_FILE,
|
|
223
|
+
HARNESS_SESSION_SCHEMA_VERSION,
|
|
224
|
+
SESSION_RUN_STATUSES,
|
|
225
|
+
TERMINAL_SESSION_RUN_STATUSES,
|
|
226
|
+
openCliSessionStore,
|
|
227
|
+
openSessionStore,
|
|
228
|
+
validateStateDirectory
|
|
229
|
+
} from "./index-zxg4ve4j.js";
|
|
230
|
+
import {
|
|
231
|
+
BUN_ENGINE_RANGE,
|
|
232
|
+
HARNESS_VERSION,
|
|
233
|
+
NODE_ENGINE_RANGE
|
|
234
|
+
} from "./index-4fx5f3k5.js";
|
|
235
|
+
import {
|
|
236
|
+
EDIT_CONTRACT_SCHEMA_VERSION,
|
|
237
|
+
EDIT_DIGEST_ALGORITHM,
|
|
238
|
+
MAX_EDIT_CHANGES,
|
|
239
|
+
MAX_EDIT_FILE_BYTES,
|
|
240
|
+
MAX_EDIT_PROPOSAL_BYTES,
|
|
241
|
+
applyEditProposalInputSchema,
|
|
242
|
+
createEditProposal,
|
|
243
|
+
editChangeSchema,
|
|
244
|
+
editChangesSchema,
|
|
245
|
+
editContractDocument,
|
|
246
|
+
editProposalChangeSchema,
|
|
247
|
+
editProposalInputSchema,
|
|
248
|
+
editProposalSchema,
|
|
249
|
+
fileDigestSchema,
|
|
250
|
+
moveFileInputSchema,
|
|
251
|
+
mutationAuditEntrySchema,
|
|
252
|
+
mutationOperationSchema,
|
|
253
|
+
quarantineFileInputSchema,
|
|
254
|
+
restoreFileInputSchema,
|
|
255
|
+
validateEditProposal,
|
|
256
|
+
workspaceFilePathSchema
|
|
257
|
+
} from "./index-xdbkcccf.js";
|
|
245
258
|
import {
|
|
246
259
|
CLI_EVENT_SCHEMA_VERSION,
|
|
247
260
|
CLI_JSON_SCHEMA_VERSION,
|
|
@@ -252,7 +265,7 @@ import {
|
|
|
252
265
|
serializeStreamResult,
|
|
253
266
|
streamEventDocument,
|
|
254
267
|
streamResultDocument
|
|
255
|
-
} from "./index-
|
|
268
|
+
} from "./index-4gt045j0.js";
|
|
256
269
|
import {
|
|
257
270
|
HARNESS_ERROR_CODES,
|
|
258
271
|
HARNESS_ERROR_SCHEMA_VERSION,
|
|
@@ -356,6 +369,7 @@ export {
|
|
|
356
369
|
applyEditProposalInputSchema,
|
|
357
370
|
applyHarnessToolPolicy,
|
|
358
371
|
assertHarnessModelCapabilities,
|
|
372
|
+
cancelHarnessReviewGroup,
|
|
359
373
|
cancelHarnessRun,
|
|
360
374
|
canonicalizeChangeEnvelope,
|
|
361
375
|
changeEnvelopeApprovalSchema,
|
|
@@ -448,6 +462,7 @@ export {
|
|
|
448
462
|
importHarnessStateBackupFile,
|
|
449
463
|
injectTimeToSafeFixAttack,
|
|
450
464
|
inspectHarnessModelCapabilities,
|
|
465
|
+
inspectHarnessReviewGroup,
|
|
451
466
|
inspectHarnessRun,
|
|
452
467
|
inspectHarnessState,
|
|
453
468
|
isHarnessContextDigest,
|
|
@@ -485,6 +500,7 @@ export {
|
|
|
485
500
|
resolveTerminalApprovals,
|
|
486
501
|
restoreFileInputSchema,
|
|
487
502
|
runHarness,
|
|
503
|
+
runHarnessDurableReviewGroup,
|
|
488
504
|
runHarnessReviewGroup,
|
|
489
505
|
sanitizeTerminalText,
|
|
490
506
|
selectHarnessModel,
|
|
@@ -5,6 +5,8 @@ export { resolveHarnessConfig } from "../../runtime/config.js";
|
|
|
5
5
|
export { DEFAULT_PROVIDER_REGISTRY } from "../../providers/providers.js";
|
|
6
6
|
export { PROVIDERS } from "../../providers/providers.js";
|
|
7
7
|
export { vertexConfigured, vertexEnvironment, vertexTokenSource, vertexRoute } from "../../providers/vertex-auth.js";
|
|
8
|
+
export { bedrockConfigured, bedrockEnvironment, bedrockOpenAIBaseURL, bedrockRegion, bedrockRuntime } from "../../providers/bedrock.js";
|
|
9
|
+
export { azureOpenAIConfigured, azureOpenAIEnvironment, azureOpenAIEndpoint, azureOpenAIApiVersion, azureOpenAIDeployments } from "../../providers/azure-openai.js";
|
|
8
10
|
export { bundledModelCatalog, catalogModels, modelDescription } from "../../models/catalog.js";
|
|
9
11
|
export type { CatalogModel, ModelCatalog } from "../../models/catalog.js";
|
|
10
12
|
export { loadModelCatalog } from "../../models/catalog-store.js";
|
package/dist/models/catalog.d.ts
CHANGED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type LanguageModel } from "@zhivex-ai/core";
|
|
2
|
+
/** Transport settings hashed into durable resumes. The API key is not included. */
|
|
3
|
+
export declare const AZURE_OPENAI_TRANSPORT_ENVIRONMENT: readonly ["AZURE_OPENAI_ENDPOINT", "AZURE_OPENAI_API_VERSION", "AZURE_OPENAI_DEPLOYMENTS"];
|
|
4
|
+
export interface AzureOpenAIDeployment {
|
|
5
|
+
readonly model: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function azureOpenAIEndpoint(env: NodeJS.ProcessEnv): string;
|
|
8
|
+
export declare function azureOpenAIApiVersion(env: NodeJS.ProcessEnv): string | undefined;
|
|
9
|
+
/** Accepts `{"deployment":"gpt-5.4"}` and `{"deployment":{"model":"gpt-5.4"}}`. */
|
|
10
|
+
export declare function azureOpenAIDeployments(env: NodeJS.ProcessEnv): Readonly<Record<string, AzureOpenAIDeployment>>;
|
|
11
|
+
/** Presence only. Does not contact Azure or check the key's account access. */
|
|
12
|
+
export declare function azureOpenAIConfigured(env: NodeJS.ProcessEnv): boolean;
|
|
13
|
+
export declare function azureOpenAIEnvironment(env: NodeJS.ProcessEnv, secret?: string): NodeJS.ProcessEnv;
|
|
14
|
+
export declare function createAzureOpenAIModel(model: string, env: NodeJS.ProcessEnv): LanguageModel;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type LanguageModel } from "@zhivex-ai/core";
|
|
2
|
+
/** Transport settings hashed into durable resumes. Secrets stay out of this list. */
|
|
3
|
+
export declare const BEDROCK_TRANSPORT_ENVIRONMENT: readonly ["AWS_REGION", "AWS_DEFAULT_REGION", "AWS_PROFILE", "BEDROCK_RUNTIME", "BEDROCK_OPENAI_BASE_URL"];
|
|
4
|
+
export declare const BEDROCK_CREDENTIAL_ENVIRONMENT: readonly ["BEDROCK_API_KEY", "AWS_BEARER_TOKEN_BEDROCK"];
|
|
5
|
+
/**
|
|
6
|
+
* SDK matrix: Converse is Tier B and `runtime: "openai"` is Tier A.
|
|
7
|
+
* Published `@zhivex-ai/bedrock@2.0.7` reports those labels. Converse includes
|
|
8
|
+
* reasoning and `toolChoiceNone`. Harness reports the installed label and
|
|
9
|
+
* does not relabel the model.
|
|
10
|
+
*/
|
|
11
|
+
export declare const BEDROCK_MATRIX_TIER: {
|
|
12
|
+
readonly converse: "tier-b";
|
|
13
|
+
readonly openai: "tier-a";
|
|
14
|
+
};
|
|
15
|
+
export type BedrockRuntime = "converse" | "openai";
|
|
16
|
+
export declare function bedrockRuntime(env: NodeJS.ProcessEnv): BedrockRuntime;
|
|
17
|
+
/** Region only. Does not contact AWS or read the credential chain. */
|
|
18
|
+
export declare function bedrockRegion(env: NodeJS.ProcessEnv): string;
|
|
19
|
+
export declare function bedrockOpenAIBaseURL(env: NodeJS.ProcessEnv): string;
|
|
20
|
+
/** Presence only. The AWS credential chain is not resolved and no request is sent. */
|
|
21
|
+
export declare function bedrockConfigured(env: NodeJS.ProcessEnv): boolean;
|
|
22
|
+
export declare function bedrockEnvironment(env: NodeJS.ProcessEnv, secret?: string): NodeJS.ProcessEnv;
|
|
23
|
+
export declare function createBedrockModel(model: string, env: NodeJS.ProcessEnv): LanguageModel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { LanguageModel } from "@zhivex-ai/agents";
|
|
2
2
|
import { type ModelGenerateInput, type ToolCall } from "@zhivex-ai/core";
|
|
3
|
-
export declare const PROVIDERS: readonly ["meta", "qwen", "openai", "gemini", "anthropic", "vertex"];
|
|
3
|
+
export declare const PROVIDERS: readonly ["meta", "qwen", "openai", "gemini", "anthropic", "vertex", "bedrock", "azure-openai"];
|
|
4
4
|
export type BuiltInHarnessProvider = (typeof PROVIDERS)[number];
|
|
5
5
|
export type HarnessProvider = BuiltInHarnessProvider | (string & {});
|
|
6
6
|
export type ProviderCapability = "streaming" | "tool-calling" | "approval-resume";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type AgentRunOutput, type AgentDefinition, type LanguageModel } from "@zhivex-ai/agents";
|
|
2
|
+
import type { AgentRunStore } from "@zhivex-ai/agents/ops";
|
|
3
|
+
import type { UsageLedger } from "./usage-ledger.js";
|
|
4
|
+
import type { HarnessConfig, HarnessSubagentProfile } from "./config.js";
|
|
5
|
+
type Runtime = {
|
|
6
|
+
usageLedger?: UsageLedger;
|
|
7
|
+
config: HarnessConfig;
|
|
8
|
+
store: AgentRunStore;
|
|
9
|
+
subagents: ReadonlyMap<HarnessSubagentProfile, AgentDefinition<LanguageModel>>;
|
|
10
|
+
};
|
|
11
|
+
export interface HarnessDurableReviewGroupResult {
|
|
12
|
+
schemaVersion: 1;
|
|
13
|
+
kind: "durable-review-group";
|
|
14
|
+
groupId: string;
|
|
15
|
+
cancellationRequested: boolean;
|
|
16
|
+
status: "queued" | "running" | "blocked" | "waiting_approval" | "suspended" | "completed" | "partial" | "failed" | "timed_out" | "cancel_requested" | "cancelled";
|
|
17
|
+
members: {
|
|
18
|
+
profile: "explorer" | "reviewer";
|
|
19
|
+
runId: string;
|
|
20
|
+
output?: AgentRunOutput;
|
|
21
|
+
}[];
|
|
22
|
+
}
|
|
23
|
+
/** Read-only reconstruction; no model calls and no new child identities. */
|
|
24
|
+
export declare function inspectHarnessReviewGroup(runtime: Runtime, groupId: string): Promise<HarnessDurableReviewGroupResult>;
|
|
25
|
+
/** Opt-in durable counterpart to the legacy, ephemeral runHarnessReviewGroup. */
|
|
26
|
+
export declare function runHarnessDurableReviewGroup(runtime: Runtime, input: {
|
|
27
|
+
groupId: string;
|
|
28
|
+
prompt: string;
|
|
29
|
+
abortSignal?: AbortSignal;
|
|
30
|
+
}, profiles?: readonly HarnessSubagentProfile[]): Promise<HarnessDurableReviewGroupResult>;
|
|
31
|
+
/** Persist intention before traversal. Never change a terminal child. */
|
|
32
|
+
export declare function cancelHarnessReviewGroup(runtime: Runtime, groupId: string): Promise<HarnessDurableReviewGroupResult>;
|
|
33
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type TaskTelemetrySnapshot } from './task-telemetry.js';
|
|
2
|
+
import { type HarnessSharedBudgetOptions } from "./shared-budget.js";
|
|
2
3
|
import { createRequestMeasurements } from '../context/request-measurements.js';
|
|
3
4
|
import { type HarnessIsolatedMcpSession } from '../integrations/mcp-host-session.js';
|
|
4
5
|
import { type HarnessDelegationContract } from "./delegation-contracts.js";
|
|
@@ -84,6 +85,8 @@ export interface HarnessRunDiagnostics {
|
|
|
84
85
|
progress?: ReturnType<typeof createRepairProgress>["stats"];
|
|
85
86
|
}
|
|
86
87
|
export interface HarnessRunOptions {
|
|
88
|
+
/** Opt-in host-owned shared SDK token reservations across primary, children and compaction. */
|
|
89
|
+
sharedBudget?: HarnessSharedBudgetOptions;
|
|
87
90
|
/** Experimental, application-owned requirements for a new run. */
|
|
88
91
|
taskAcceptance?: TaskAcceptanceContract;
|
|
89
92
|
onDiagnostics?: (diagnostics: HarnessRunDiagnostics) => void;
|
|
@@ -109,6 +112,14 @@ export interface HarnessRunOptions {
|
|
|
109
112
|
export interface HarnessTaskRunOptions extends HarnessRunOptions {
|
|
110
113
|
taskBudgetExisting?: boolean;
|
|
111
114
|
taskBudgetContinue?: boolean;
|
|
115
|
+
/** Trusted host consent binding, rechecked during durable admission. Never metadata or model input. */
|
|
116
|
+
taskAdmissionReview?: {
|
|
117
|
+
runId: string;
|
|
118
|
+
runRevision: number;
|
|
119
|
+
contractDigest: string;
|
|
120
|
+
snapshotDigest: string | null;
|
|
121
|
+
budgetRevision: number;
|
|
122
|
+
};
|
|
112
123
|
telemetryTemperature?: 'cold' | 'warm' | 'unknown';
|
|
113
124
|
onTaskTelemetry?: (telemetry: TaskTelemetrySnapshot) => void;
|
|
114
125
|
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import type { AgentRunOutput, AgentStoreScope } from "@zhivex-ai/core";
|
|
2
2
|
import type { AgentRunStore } from "@zhivex-ai/agents/ops";
|
|
3
|
+
/** Capture the winning source before relaying its abort. Nested AbortSignal.any
|
|
4
|
+
* trees can propagate a different ancestor's reason on supported Node versions. */
|
|
5
|
+
export declare const composeRunInterruption: (caller: AbortSignal | undefined, deadline: AbortSignal | undefined, failure: AbortSignal) => {
|
|
6
|
+
signal: AbortSignal;
|
|
7
|
+
kind: () => "cancelled" | "timed_out" | undefined;
|
|
8
|
+
dispose: () => void;
|
|
9
|
+
};
|
|
3
10
|
/** Called only after the interrupted runtime has settled and released its lease. */
|
|
4
11
|
export declare const settleInterruptedRun: (store: AgentRunStore, runId: string, scope?: AgentStoreScope, kind?: 'cancelled' | 'timed_out') => Promise<AgentRunOutput | undefined>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type AgentTokenReservation, type LanguageModel } from "@zhivex-ai/core";
|
|
2
|
+
import { Agent, type AgentRunInput } from "@zhivex-ai/agents";
|
|
3
|
+
import type { ZhivexHarness } from "./harness.js";
|
|
4
|
+
export interface HarnessSharedBudgetOptions {
|
|
5
|
+
/** Host-supplied conservative bound for each primary model call. */
|
|
6
|
+
modelReservation: AgentTokenReservation;
|
|
7
|
+
/** Defaults to modelReservation. Must fit the child's narrowed allocation. */
|
|
8
|
+
childModelReservation?: AgentTokenReservation;
|
|
9
|
+
}
|
|
10
|
+
/** Reuse SDK atomic reservations; never create a second token ledger. */
|
|
11
|
+
export declare function withSharedBudget(harness: ZhivexHarness, runId: string, input: AgentRunInput<LanguageModel>, options: HarnessSharedBudgetOptions): Promise<{
|
|
12
|
+
harness: {
|
|
13
|
+
agent: Agent<LanguageModel<import("@zhivex-ai/core").ProviderOptions>, unknown, unknown, unknown>;
|
|
14
|
+
compactionModel?: LanguageModel;
|
|
15
|
+
usageLedger?: import("./usage-ledger.js").UsageLedger;
|
|
16
|
+
config: import("./config.js").HarnessConfig;
|
|
17
|
+
workspace: import("../index.js").Workspace;
|
|
18
|
+
store: import("@zhivex-ai/core").AgentRunStore;
|
|
19
|
+
traceCollector: import("@zhivex-ai/core").AgentTraceCollector;
|
|
20
|
+
capabilities: import("../index.js").HarnessModelCapabilityReport;
|
|
21
|
+
context: import("../index.js").HarnessContextBundle;
|
|
22
|
+
mcpConfiguration: import("../index.js").HarnessMcpConfiguration;
|
|
23
|
+
subagents: import("./orchestration.js").HarnessSubagentRuntime["agents"];
|
|
24
|
+
executionEnvironment?: import("../index.js").HarnessOciExecutionEnvironment;
|
|
25
|
+
persistence?: import("../index.js").HarnessPersistence;
|
|
26
|
+
dispatchLifecycle(event: import("../index.js").HarnessLifecycleEvent): Promise<readonly import("../index.js").HarnessLifecycleHookFailure[]>;
|
|
27
|
+
close(): Promise<void>;
|
|
28
|
+
};
|
|
29
|
+
input: AgentRunInput<LanguageModel>;
|
|
30
|
+
}>;
|