@tangle-network/agent-interface 0.27.0 → 0.27.2

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.
@@ -0,0 +1,1918 @@
1
+ /**
2
+ * Backward-compatibility surface for the candidate outcome and receipt exports
3
+ * that were renamed or collapsed when the candidate contract was unified.
4
+ *
5
+ * Every symbol here is deprecated and exists only so published consumers that
6
+ * still import the pre-unification names keep resolving at ESM import time.
7
+ * Prefer the current names; these will be removed in a future major.
8
+ *
9
+ * Two shapes of compat live in this module:
10
+ * - Pure renames (shape-identical to a current export) are re-exported as
11
+ * deprecated aliases and remain reference-equal to their new counterpart.
12
+ * - Symbols whose shape changed (a different `schemaVersion` literal, a
13
+ * restructured field, or a union that no longer exists) are re-declared here
14
+ * verbatim from the last release that published them, so old data still
15
+ * parses against the old name instead of silently binding to a newer shape.
16
+ */
17
+ import { z } from "zod";
18
+ import type { AgentCandidateArtifactRef, AgentCandidateAttemptPolicy, AgentCandidateBenchmarkResultEvidence, AgentCandidateBenchmarkResultMaterial, AgentCandidateCode, AgentCandidateConfigValue, AgentCandidateDigestAlgorithm, AgentCandidateEffectiveMemory, AgentCandidateEntrypointReceipt, AgentCandidateExecution, AgentCandidateExecutionEnvironment, AgentCandidateExecutionLimits, AgentCandidateExecutionPlanEvidence, AgentCandidateFixedSpend, AgentCandidateInstructionDelivery, AgentCandidateKnowledge, AgentCandidateLineage, AgentCandidateMemoryPolicy, AgentCandidateMemoryReceipt, AgentCandidateModelAccessNetwork, AgentCandidateModelSettlementCall, AgentCandidateModelSettlementEvidence, AgentCandidateModelSettlementMaterial, AgentCandidateOciPlatform, AgentCandidateProfile, AgentCandidateProfileApplication, AgentCandidateProfilePlanEvidence, AgentCandidateProfilePlanMaterial, AgentCandidateResolvedModel, AgentCandidateSpend, AgentCandidateTaskOutcomeEvidence, AgentCandidateTermination, AgentCandidateTraceEvidence, AgentCandidateWorkingDirectory, AgentCandidateWorkspaceSnapshotEvidence, Sha256Digest } from "./agent-candidate.js";
19
+ import type { HarnessType } from "./harness.js";
20
+ /** @deprecated Renamed to {@link AgentCandidateProfilePlanMaterial}. */
21
+ export type AgentCandidateProfilePlanMaterialV1 = AgentCandidateProfilePlanMaterial;
22
+ /** @deprecated Renamed to {@link AgentCandidateBenchmarkResultMaterial}. */
23
+ export type AgentCandidateBenchmarkResultMaterialV1 = AgentCandidateBenchmarkResultMaterial;
24
+ /**
25
+ * @deprecated The router-authored call fields folded into
26
+ * {@link AgentCandidateModelSettlementCall}; this alias is shape-identical.
27
+ */
28
+ export type AgentCandidateModelSettlementCallV2 = AgentCandidateModelSettlementCall;
29
+ /**
30
+ * @deprecated The settlement material union collapsed to the single current
31
+ * {@link AgentCandidateModelSettlementMaterial}; this alias is shape-identical.
32
+ */
33
+ export type AgentCandidateModelSettlementMaterialV2 = AgentCandidateModelSettlementMaterial;
34
+ /**
35
+ * @deprecated Renamed to {@link agentCandidateModelSettlementCallSchema}.
36
+ * Reference-equal to the current export.
37
+ */
38
+ export declare const agentCandidateModelSettlementCallV2Schema: z.ZodObject<{
39
+ callId: z.ZodString;
40
+ generationId: z.ZodString;
41
+ traceSpanId: z.ZodString;
42
+ status: z.ZodEnum<{
43
+ succeeded: "succeeded";
44
+ failed: "failed";
45
+ }>;
46
+ model: z.ZodString;
47
+ startedAtMs: z.ZodNumber;
48
+ endedAtMs: z.ZodNumber;
49
+ inputTokens: z.ZodNumber;
50
+ outputTokens: z.ZodNumber;
51
+ cachedInputTokens: z.ZodNumber;
52
+ reasoningTokens: z.ZodNumber;
53
+ costUsdNanos: z.ZodNumber;
54
+ }, z.core.$strict>;
55
+ /**
56
+ * @deprecated Renamed to {@link agentCandidateModelSettlementMaterialSchema}.
57
+ * Reference-equal to the current export.
58
+ */
59
+ export declare const agentCandidateModelSettlementMaterialV2Schema: z.ZodObject<{
60
+ calls: z.ZodArray<z.ZodObject<{
61
+ callId: z.ZodString;
62
+ generationId: z.ZodString;
63
+ traceSpanId: z.ZodString;
64
+ status: z.ZodEnum<{
65
+ succeeded: "succeeded";
66
+ failed: "failed";
67
+ }>;
68
+ model: z.ZodString;
69
+ startedAtMs: z.ZodNumber;
70
+ endedAtMs: z.ZodNumber;
71
+ inputTokens: z.ZodNumber;
72
+ outputTokens: z.ZodNumber;
73
+ cachedInputTokens: z.ZodNumber;
74
+ reasoningTokens: z.ZodNumber;
75
+ costUsdNanos: z.ZodNumber;
76
+ }, z.core.$strict>>;
77
+ kind: z.ZodLiteral<"agent-candidate-model-settlement-material">;
78
+ executionPlanDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
79
+ preparationId: z.ZodString;
80
+ grantDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
81
+ closed: z.ZodLiteral<true>;
82
+ resolved: z.ZodObject<{
83
+ requested: z.ZodString;
84
+ provider: z.ZodString;
85
+ model: z.ZodString;
86
+ snapshot: z.ZodString;
87
+ reasoningEffort: z.ZodEnum<{
88
+ none: "none";
89
+ minimal: "minimal";
90
+ low: "low";
91
+ medium: "medium";
92
+ high: "high";
93
+ xhigh: "xhigh";
94
+ ultracode: "ultracode";
95
+ }>;
96
+ }, z.core.$strict>;
97
+ usage: z.ZodObject<{
98
+ inputTokens: z.ZodNumber;
99
+ outputTokens: z.ZodNumber;
100
+ cachedInputTokens: z.ZodNumber;
101
+ reasoningTokens: z.ZodNumber;
102
+ modelCalls: z.ZodNumber;
103
+ costUsdNanos: z.ZodNumber;
104
+ }, z.core.$strict>;
105
+ schemaVersion: z.ZodLiteral<2>;
106
+ }, z.core.$strict>;
107
+ /**
108
+ * @deprecated The bundle contract advanced to `schemaVersion: 2`
109
+ * ({@link AgentCandidateBundle}). This is the frozen `schemaVersion: 1` shape.
110
+ */
111
+ export interface AgentCandidateBundleV1 {
112
+ schemaVersion: 1;
113
+ kind: "agent-candidate-bundle";
114
+ digestAlgorithm: AgentCandidateDigestAlgorithm;
115
+ profile: AgentCandidateProfile;
116
+ code: AgentCandidateCode;
117
+ execution: AgentCandidateExecution;
118
+ knowledge?: AgentCandidateKnowledge;
119
+ memory: AgentCandidateMemoryPolicy;
120
+ lineage: AgentCandidateLineage;
121
+ digest: Sha256Digest;
122
+ }
123
+ /**
124
+ * @deprecated The workspace manifest advanced to `schemaVersion: 2` with an
125
+ * unconstrained numeric `mode` ({@link AgentCandidateWorkspaceManifestMaterial}).
126
+ * This is the frozen `schemaVersion: 1` shape.
127
+ */
128
+ export interface AgentCandidateWorkspaceManifestMaterialV1 {
129
+ schemaVersion: 1;
130
+ kind: "agent-candidate-workspace-manifest";
131
+ files: Array<{
132
+ path: string;
133
+ mode: 0o644 | 0o755;
134
+ sha256: Sha256Digest;
135
+ byteLength: number;
136
+ }>;
137
+ }
138
+ /**
139
+ * @deprecated The profile-plan material now carries `usage` (see
140
+ * {@link AgentCandidateModelUsage}'s successor). This is the original
141
+ * `resolved`/`usage` pairing kept for consumers of the old run receipt.
142
+ */
143
+ export interface AgentCandidateModelUsage {
144
+ resolved: AgentCandidateResolvedModel;
145
+ usage: AgentCandidateSpend;
146
+ }
147
+ /**
148
+ * @deprecated The execution-plan material advanced to `schemaVersion: 2` with a
149
+ * restructured `task` ({@link AgentCandidateExecutionPlanMaterial}). This is the
150
+ * frozen `schemaVersion: 1` shape.
151
+ */
152
+ export interface AgentCandidateExecutionPlanMaterialV1 {
153
+ schemaVersion: 1;
154
+ kind: "agent-candidate-execution-plan-material";
155
+ bundleDigest: Sha256Digest;
156
+ executionId: string;
157
+ attempt: AgentCandidateAttemptPolicy;
158
+ task: {
159
+ benchmark: string;
160
+ benchmarkVersion: string;
161
+ taskId: string;
162
+ splitDigest: Sha256Digest;
163
+ instruction: {
164
+ encoding: "utf8";
165
+ sha256: Sha256Digest;
166
+ byteLength: number;
167
+ delivery: AgentCandidateInstructionDelivery;
168
+ };
169
+ repository: {
170
+ identity: string;
171
+ rootIdentity: string;
172
+ baseCommit: string;
173
+ baseTree: string;
174
+ };
175
+ workspace: AgentCandidateWorkspaceSnapshotEvidence;
176
+ };
177
+ workspaces: {
178
+ taskRoot: string;
179
+ candidateRoot?: string;
180
+ };
181
+ codeKind: AgentCandidateCode["kind"];
182
+ candidateWorkspace?: AgentCandidateWorkspaceSnapshotEvidence;
183
+ profile: AgentCandidateProfileApplication;
184
+ harness: HarnessType;
185
+ harnessVersion: string;
186
+ container: {
187
+ source: AgentCandidateExecutionEnvironment["kind"];
188
+ image: string;
189
+ indexDigest: Sha256Digest;
190
+ manifestDigest: Sha256Digest;
191
+ platform: AgentCandidateOciPlatform;
192
+ };
193
+ model: {
194
+ policy: "single";
195
+ resolved: AgentCandidateResolvedModel;
196
+ access: {
197
+ kind: "evaluator-mediated";
198
+ grantDigest: Sha256Digest;
199
+ network: AgentCandidateModelAccessNetwork;
200
+ };
201
+ routes: Array<{
202
+ kind: "primary";
203
+ requested?: string;
204
+ } | {
205
+ kind: "small";
206
+ requested: string;
207
+ } | {
208
+ kind: "mode";
209
+ name: string;
210
+ requested: string;
211
+ } | {
212
+ kind: "subagent";
213
+ name: string;
214
+ requested: string;
215
+ }>;
216
+ };
217
+ grader: {
218
+ name: string;
219
+ version: string;
220
+ artifact: AgentCandidateArtifactRef;
221
+ };
222
+ launch: {
223
+ executable: string;
224
+ args: AgentCandidateConfigValue[];
225
+ env: Record<string, AgentCandidateConfigValue>;
226
+ cwd: AgentCandidateWorkingDirectory;
227
+ };
228
+ knowledgeManifestDigest?: Sha256Digest;
229
+ memory: AgentCandidateEffectiveMemory;
230
+ limits: AgentCandidateExecutionLimits;
231
+ network: {
232
+ mode: "disabled";
233
+ };
234
+ }
235
+ /**
236
+ * @deprecated The materialization receipt advanced to `schemaVersion: 2`
237
+ * ({@link AgentCandidateMaterializationReceipt}). This is the frozen
238
+ * `schemaVersion: 1` shape.
239
+ */
240
+ export interface AgentCandidateMaterializationReceiptV1 {
241
+ schemaVersion: 1;
242
+ kind: "agent-candidate-materialization";
243
+ digestAlgorithm: AgentCandidateDigestAlgorithm;
244
+ bundleDigest: Sha256Digest;
245
+ profilePlan: AgentCandidateProfilePlanEvidence;
246
+ executionPlan: AgentCandidateExecutionPlanEvidence;
247
+ candidateWorkspace?: AgentCandidateWorkspaceSnapshotEvidence;
248
+ codeKind: AgentCandidateCode["kind"];
249
+ materializedTree?: string;
250
+ harness: HarnessType;
251
+ harnessVersion: string;
252
+ container: {
253
+ source: AgentCandidateExecutionEnvironment["kind"];
254
+ image: string;
255
+ indexDigest: Sha256Digest;
256
+ manifestDigest: Sha256Digest;
257
+ platform: AgentCandidateOciPlatform;
258
+ };
259
+ resolvedModel: AgentCandidateResolvedModel;
260
+ knowledgeManifestDigest?: Sha256Digest;
261
+ entrypoint?: AgentCandidateEntrypointReceipt;
262
+ digest: Sha256Digest;
263
+ }
264
+ /**
265
+ * @deprecated The run receipt advanced to `schemaVersion: 3`
266
+ * ({@link AgentCandidateRunReceipt}). This is the frozen `schemaVersion: 1`
267
+ * shape with its aggregate `usage`/`modelUsage` accounting.
268
+ */
269
+ export interface AgentCandidateRunReceiptV1 {
270
+ schemaVersion: 1;
271
+ kind: "agent-candidate-run";
272
+ digestAlgorithm: AgentCandidateDigestAlgorithm;
273
+ bundleDigest: Sha256Digest;
274
+ materializationReceiptDigest: Sha256Digest;
275
+ executionPlanDigest: Sha256Digest;
276
+ memory: AgentCandidateMemoryReceipt;
277
+ usage: AgentCandidateSpend;
278
+ modelUsage: AgentCandidateModelUsage;
279
+ trace: AgentCandidateTraceEvidence;
280
+ termination: AgentCandidateTermination;
281
+ digest: Sha256Digest;
282
+ }
283
+ /**
284
+ * @deprecated The run receipt advanced to `schemaVersion: 3`
285
+ * ({@link AgentCandidateRunReceipt}). This is the frozen `schemaVersion: 2`
286
+ * shape that layered fixed-point spend and evidence over the V1 receipt.
287
+ */
288
+ export interface AgentCandidateRunReceiptV2 extends Omit<AgentCandidateRunReceiptV1, "schemaVersion"> {
289
+ schemaVersion: 2;
290
+ fixedUsage: AgentCandidateFixedSpend;
291
+ modelSettlement: AgentCandidateModelSettlementEvidence;
292
+ taskOutcome: AgentCandidateTaskOutcomeEvidence;
293
+ benchmarkResult: AgentCandidateBenchmarkResultEvidence;
294
+ }
295
+ /**
296
+ * @deprecated The V1/V2 run receipt generations collapsed into the single
297
+ * current {@link AgentCandidateRunReceipt}. This union no longer has a current
298
+ * counterpart.
299
+ */
300
+ export type AgentCandidateRunReceiptAnyVersion = AgentCandidateRunReceiptV1 | AgentCandidateRunReceiptV2;
301
+ /**
302
+ * Canonical model-access ledger written with the pre-router base call shape,
303
+ * before per-call generation identity and terminal status were required.
304
+ *
305
+ * @deprecated The settlement material collapsed to the single current
306
+ * {@link AgentCandidateModelSettlementMaterial} (`schemaVersion: 2`). This is
307
+ * the frozen `schemaVersion: 1` shape.
308
+ */
309
+ export interface AgentCandidateModelSettlementMaterialV1 {
310
+ schemaVersion: 1;
311
+ kind: "agent-candidate-model-settlement-material";
312
+ executionPlanDigest: Sha256Digest;
313
+ preparationId: string;
314
+ grantDigest: Sha256Digest;
315
+ closed: true;
316
+ resolved: AgentCandidateResolvedModel;
317
+ calls: LegacyModelSettlementCallV1[];
318
+ usage: AgentCandidateFixedSpend;
319
+ }
320
+ /** Pre-router settlement call shape used only by {@link AgentCandidateModelSettlementMaterialV1}. */
321
+ interface LegacyModelSettlementCallV1 {
322
+ callId: string;
323
+ traceSpanId: string;
324
+ model: string;
325
+ inputTokens: number;
326
+ outputTokens: number;
327
+ cachedInputTokens: number;
328
+ reasoningTokens: number;
329
+ costUsdNanos: number;
330
+ }
331
+ /**
332
+ * @deprecated The run receipt no longer carries a standalone model-usage block.
333
+ * Restored `resolved`/`usage` schema for consumers of the V1/V2 run receipt.
334
+ */
335
+ export declare const agentCandidateModelUsageSchema: z.ZodObject<{
336
+ resolved: z.ZodObject<{
337
+ requested: z.ZodString;
338
+ provider: z.ZodString;
339
+ model: z.ZodString;
340
+ snapshot: z.ZodString;
341
+ reasoningEffort: z.ZodEnum<{
342
+ none: "none";
343
+ minimal: "minimal";
344
+ low: "low";
345
+ medium: "medium";
346
+ high: "high";
347
+ xhigh: "xhigh";
348
+ ultracode: "ultracode";
349
+ }>;
350
+ }, z.core.$strict>;
351
+ usage: z.ZodObject<{
352
+ costUsd: z.ZodNumber;
353
+ inputTokens: z.ZodNumber;
354
+ outputTokens: z.ZodNumber;
355
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
356
+ modelCalls: z.ZodNumber;
357
+ }, z.core.$strict>;
358
+ }, z.core.$strict>;
359
+ /**
360
+ * @deprecated The settlement material collapsed to
361
+ * {@link agentCandidateModelSettlementMaterialSchema} (`schemaVersion: 2`).
362
+ * Restored `schemaVersion: 1` parser for the pre-router base call shape.
363
+ */
364
+ export declare const agentCandidateModelSettlementMaterialV1Schema: z.ZodObject<{
365
+ schemaVersion: z.ZodLiteral<1>;
366
+ kind: z.ZodLiteral<"agent-candidate-model-settlement-material">;
367
+ executionPlanDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
368
+ preparationId: z.ZodString;
369
+ grantDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
370
+ closed: z.ZodLiteral<true>;
371
+ resolved: z.ZodObject<{
372
+ requested: z.ZodString;
373
+ provider: z.ZodString;
374
+ model: z.ZodString;
375
+ snapshot: z.ZodString;
376
+ reasoningEffort: z.ZodEnum<{
377
+ none: "none";
378
+ minimal: "minimal";
379
+ low: "low";
380
+ medium: "medium";
381
+ high: "high";
382
+ xhigh: "xhigh";
383
+ ultracode: "ultracode";
384
+ }>;
385
+ }, z.core.$strict>;
386
+ usage: z.ZodObject<{
387
+ inputTokens: z.ZodNumber;
388
+ outputTokens: z.ZodNumber;
389
+ cachedInputTokens: z.ZodNumber;
390
+ reasoningTokens: z.ZodNumber;
391
+ modelCalls: z.ZodNumber;
392
+ costUsdNanos: z.ZodNumber;
393
+ }, z.core.$strict>;
394
+ calls: z.ZodArray<z.ZodObject<{
395
+ callId: z.ZodString;
396
+ traceSpanId: z.ZodString;
397
+ model: z.ZodString;
398
+ inputTokens: z.ZodNumber;
399
+ outputTokens: z.ZodNumber;
400
+ cachedInputTokens: z.ZodNumber;
401
+ reasoningTokens: z.ZodNumber;
402
+ costUsdNanos: z.ZodNumber;
403
+ }, z.core.$strict>>;
404
+ }, z.core.$strict>;
405
+ /**
406
+ * @deprecated The run receipt collapsed to
407
+ * {@link agentCandidateRunReceiptSchema} (`schemaVersion: 3`). Restored
408
+ * `schemaVersion: 1` parser with aggregate usage accounting.
409
+ */
410
+ export declare const agentCandidateRunReceiptV1Schema: z.ZodObject<{
411
+ schemaVersion: z.ZodLiteral<1>;
412
+ kind: z.ZodLiteral<"agent-candidate-run">;
413
+ digestAlgorithm: z.ZodLiteral<"rfc8785-sha256">;
414
+ bundleDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
415
+ materializationReceiptDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
416
+ executionPlanDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
417
+ memory: z.ZodDiscriminatedUnion<[z.ZodObject<{
418
+ mode: z.ZodLiteral<"disabled">;
419
+ }, z.core.$strict>, z.ZodObject<{
420
+ mode: z.ZodLiteral<"isolated">;
421
+ scope: z.ZodLiteral<"task">;
422
+ effectiveNamespace: z.ZodString;
423
+ resetEvidenceDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
424
+ beforeStateDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
425
+ afterState: z.ZodObject<{
426
+ schemaVersion: z.ZodLiteral<2>;
427
+ kind: z.ZodLiteral<"agent-candidate-workspace-snapshot">;
428
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
429
+ material: z.ZodObject<{
430
+ schemaVersion: z.ZodLiteral<2>;
431
+ kind: z.ZodLiteral<"agent-candidate-workspace-manifest">;
432
+ files: z.ZodArray<z.ZodObject<{
433
+ path: z.ZodString;
434
+ mode: z.ZodNumber;
435
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
436
+ byteLength: z.ZodNumber;
437
+ }, z.core.$strict>>;
438
+ }, z.core.$strict>;
439
+ manifest: z.ZodUnion<readonly [z.ZodObject<{
440
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
441
+ kind: z.ZodLiteral<"s3">;
442
+ bucket: z.ZodString;
443
+ key: z.ZodString;
444
+ region: z.ZodOptional<z.ZodString>;
445
+ }, z.core.$strict>, z.ZodObject<{
446
+ kind: z.ZodLiteral<"ipfs">;
447
+ cid: z.ZodString;
448
+ path: z.ZodOptional<z.ZodString>;
449
+ }, z.core.$strict>], "kind">;
450
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
451
+ byteLength: z.ZodNumber;
452
+ }, z.core.$strict>, z.ZodObject<{
453
+ encoding: z.ZodLiteral<"base64">;
454
+ content: z.ZodString;
455
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
456
+ byteLength: z.ZodNumber;
457
+ }, z.core.$strict>]>;
458
+ archive: z.ZodUnion<readonly [z.ZodObject<{
459
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
460
+ kind: z.ZodLiteral<"s3">;
461
+ bucket: z.ZodString;
462
+ key: z.ZodString;
463
+ region: z.ZodOptional<z.ZodString>;
464
+ }, z.core.$strict>, z.ZodObject<{
465
+ kind: z.ZodLiteral<"ipfs">;
466
+ cid: z.ZodString;
467
+ path: z.ZodOptional<z.ZodString>;
468
+ }, z.core.$strict>], "kind">;
469
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
470
+ byteLength: z.ZodNumber;
471
+ }, z.core.$strict>, z.ZodObject<{
472
+ encoding: z.ZodLiteral<"base64">;
473
+ content: z.ZodString;
474
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
475
+ byteLength: z.ZodNumber;
476
+ }, z.core.$strict>]>;
477
+ }, z.core.$strict>;
478
+ }, z.core.$strict>], "mode">;
479
+ usage: z.ZodObject<{
480
+ costUsd: z.ZodNumber;
481
+ inputTokens: z.ZodNumber;
482
+ outputTokens: z.ZodNumber;
483
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
484
+ modelCalls: z.ZodNumber;
485
+ }, z.core.$strict>;
486
+ modelUsage: z.ZodObject<{
487
+ resolved: z.ZodObject<{
488
+ requested: z.ZodString;
489
+ provider: z.ZodString;
490
+ model: z.ZodString;
491
+ snapshot: z.ZodString;
492
+ reasoningEffort: z.ZodEnum<{
493
+ none: "none";
494
+ minimal: "minimal";
495
+ low: "low";
496
+ medium: "medium";
497
+ high: "high";
498
+ xhigh: "xhigh";
499
+ ultracode: "ultracode";
500
+ }>;
501
+ }, z.core.$strict>;
502
+ usage: z.ZodObject<{
503
+ costUsd: z.ZodNumber;
504
+ inputTokens: z.ZodNumber;
505
+ outputTokens: z.ZodNumber;
506
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
507
+ modelCalls: z.ZodNumber;
508
+ }, z.core.$strict>;
509
+ }, z.core.$strict>;
510
+ trace: z.ZodObject<{
511
+ schemaVersion: z.ZodLiteral<1>;
512
+ artifact: z.ZodUnion<readonly [z.ZodObject<{
513
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
514
+ kind: z.ZodLiteral<"s3">;
515
+ bucket: z.ZodString;
516
+ key: z.ZodString;
517
+ region: z.ZodOptional<z.ZodString>;
518
+ }, z.core.$strict>, z.ZodObject<{
519
+ kind: z.ZodLiteral<"ipfs">;
520
+ cid: z.ZodString;
521
+ path: z.ZodOptional<z.ZodString>;
522
+ }, z.core.$strict>], "kind">;
523
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
524
+ byteLength: z.ZodNumber;
525
+ }, z.core.$strict>, z.ZodObject<{
526
+ encoding: z.ZodLiteral<"base64">;
527
+ content: z.ZodString;
528
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
529
+ byteLength: z.ZodNumber;
530
+ }, z.core.$strict>]>;
531
+ eventCount: z.ZodNumber;
532
+ modelCallCount: z.ZodNumber;
533
+ }, z.core.$strict>;
534
+ termination: z.ZodDiscriminatedUnion<[z.ZodObject<{
535
+ kind: z.ZodLiteral<"exit">;
536
+ exitCode: z.ZodNumber;
537
+ }, z.core.$strict>, z.ZodObject<{
538
+ kind: z.ZodLiteral<"timeout">;
539
+ timeoutMs: z.ZodNumber;
540
+ }, z.core.$strict>, z.ZodObject<{
541
+ kind: z.ZodLiteral<"signal">;
542
+ signal: z.ZodString;
543
+ }, z.core.$strict>, z.ZodObject<{
544
+ kind: z.ZodLiteral<"cancelled">;
545
+ }, z.core.$strict>], "kind">;
546
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
547
+ }, z.core.$strict>;
548
+ /**
549
+ * @deprecated The run receipt collapsed to
550
+ * {@link agentCandidateRunReceiptSchema} (`schemaVersion: 3`). Restored
551
+ * `schemaVersion: 2` parser. Its evidence members bind the current settlement,
552
+ * task-outcome, and benchmark-result schemas.
553
+ */
554
+ export declare const agentCandidateRunReceiptV2Schema: z.ZodObject<{
555
+ schemaVersion: z.ZodLiteral<2>;
556
+ kind: z.ZodLiteral<"agent-candidate-run">;
557
+ digestAlgorithm: z.ZodLiteral<"rfc8785-sha256">;
558
+ bundleDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
559
+ materializationReceiptDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
560
+ executionPlanDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
561
+ memory: z.ZodDiscriminatedUnion<[z.ZodObject<{
562
+ mode: z.ZodLiteral<"disabled">;
563
+ }, z.core.$strict>, z.ZodObject<{
564
+ mode: z.ZodLiteral<"isolated">;
565
+ scope: z.ZodLiteral<"task">;
566
+ effectiveNamespace: z.ZodString;
567
+ resetEvidenceDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
568
+ beforeStateDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
569
+ afterState: z.ZodObject<{
570
+ schemaVersion: z.ZodLiteral<2>;
571
+ kind: z.ZodLiteral<"agent-candidate-workspace-snapshot">;
572
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
573
+ material: z.ZodObject<{
574
+ schemaVersion: z.ZodLiteral<2>;
575
+ kind: z.ZodLiteral<"agent-candidate-workspace-manifest">;
576
+ files: z.ZodArray<z.ZodObject<{
577
+ path: z.ZodString;
578
+ mode: z.ZodNumber;
579
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
580
+ byteLength: z.ZodNumber;
581
+ }, z.core.$strict>>;
582
+ }, z.core.$strict>;
583
+ manifest: z.ZodUnion<readonly [z.ZodObject<{
584
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
585
+ kind: z.ZodLiteral<"s3">;
586
+ bucket: z.ZodString;
587
+ key: z.ZodString;
588
+ region: z.ZodOptional<z.ZodString>;
589
+ }, z.core.$strict>, z.ZodObject<{
590
+ kind: z.ZodLiteral<"ipfs">;
591
+ cid: z.ZodString;
592
+ path: z.ZodOptional<z.ZodString>;
593
+ }, z.core.$strict>], "kind">;
594
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
595
+ byteLength: z.ZodNumber;
596
+ }, z.core.$strict>, z.ZodObject<{
597
+ encoding: z.ZodLiteral<"base64">;
598
+ content: z.ZodString;
599
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
600
+ byteLength: z.ZodNumber;
601
+ }, z.core.$strict>]>;
602
+ archive: z.ZodUnion<readonly [z.ZodObject<{
603
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
604
+ kind: z.ZodLiteral<"s3">;
605
+ bucket: z.ZodString;
606
+ key: z.ZodString;
607
+ region: z.ZodOptional<z.ZodString>;
608
+ }, z.core.$strict>, z.ZodObject<{
609
+ kind: z.ZodLiteral<"ipfs">;
610
+ cid: z.ZodString;
611
+ path: z.ZodOptional<z.ZodString>;
612
+ }, z.core.$strict>], "kind">;
613
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
614
+ byteLength: z.ZodNumber;
615
+ }, z.core.$strict>, z.ZodObject<{
616
+ encoding: z.ZodLiteral<"base64">;
617
+ content: z.ZodString;
618
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
619
+ byteLength: z.ZodNumber;
620
+ }, z.core.$strict>]>;
621
+ }, z.core.$strict>;
622
+ }, z.core.$strict>], "mode">;
623
+ usage: z.ZodObject<{
624
+ costUsd: z.ZodNumber;
625
+ inputTokens: z.ZodNumber;
626
+ outputTokens: z.ZodNumber;
627
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
628
+ modelCalls: z.ZodNumber;
629
+ }, z.core.$strict>;
630
+ modelUsage: z.ZodObject<{
631
+ resolved: z.ZodObject<{
632
+ requested: z.ZodString;
633
+ provider: z.ZodString;
634
+ model: z.ZodString;
635
+ snapshot: z.ZodString;
636
+ reasoningEffort: z.ZodEnum<{
637
+ none: "none";
638
+ minimal: "minimal";
639
+ low: "low";
640
+ medium: "medium";
641
+ high: "high";
642
+ xhigh: "xhigh";
643
+ ultracode: "ultracode";
644
+ }>;
645
+ }, z.core.$strict>;
646
+ usage: z.ZodObject<{
647
+ costUsd: z.ZodNumber;
648
+ inputTokens: z.ZodNumber;
649
+ outputTokens: z.ZodNumber;
650
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
651
+ modelCalls: z.ZodNumber;
652
+ }, z.core.$strict>;
653
+ }, z.core.$strict>;
654
+ trace: z.ZodObject<{
655
+ schemaVersion: z.ZodLiteral<1>;
656
+ artifact: z.ZodUnion<readonly [z.ZodObject<{
657
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
658
+ kind: z.ZodLiteral<"s3">;
659
+ bucket: z.ZodString;
660
+ key: z.ZodString;
661
+ region: z.ZodOptional<z.ZodString>;
662
+ }, z.core.$strict>, z.ZodObject<{
663
+ kind: z.ZodLiteral<"ipfs">;
664
+ cid: z.ZodString;
665
+ path: z.ZodOptional<z.ZodString>;
666
+ }, z.core.$strict>], "kind">;
667
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
668
+ byteLength: z.ZodNumber;
669
+ }, z.core.$strict>, z.ZodObject<{
670
+ encoding: z.ZodLiteral<"base64">;
671
+ content: z.ZodString;
672
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
673
+ byteLength: z.ZodNumber;
674
+ }, z.core.$strict>]>;
675
+ eventCount: z.ZodNumber;
676
+ modelCallCount: z.ZodNumber;
677
+ }, z.core.$strict>;
678
+ termination: z.ZodDiscriminatedUnion<[z.ZodObject<{
679
+ kind: z.ZodLiteral<"exit">;
680
+ exitCode: z.ZodNumber;
681
+ }, z.core.$strict>, z.ZodObject<{
682
+ kind: z.ZodLiteral<"timeout">;
683
+ timeoutMs: z.ZodNumber;
684
+ }, z.core.$strict>, z.ZodObject<{
685
+ kind: z.ZodLiteral<"signal">;
686
+ signal: z.ZodString;
687
+ }, z.core.$strict>, z.ZodObject<{
688
+ kind: z.ZodLiteral<"cancelled">;
689
+ }, z.core.$strict>], "kind">;
690
+ fixedUsage: z.ZodObject<{
691
+ inputTokens: z.ZodNumber;
692
+ outputTokens: z.ZodNumber;
693
+ cachedInputTokens: z.ZodNumber;
694
+ reasoningTokens: z.ZodNumber;
695
+ modelCalls: z.ZodNumber;
696
+ costUsdNanos: z.ZodNumber;
697
+ }, z.core.$strict>;
698
+ modelSettlement: z.ZodObject<{
699
+ schemaVersion: z.ZodLiteral<2>;
700
+ kind: z.ZodLiteral<"agent-candidate-model-settlement">;
701
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
702
+ material: z.ZodType<{
703
+ calls: {
704
+ callId: string;
705
+ generationId: string;
706
+ traceSpanId: string;
707
+ status: "succeeded" | "failed";
708
+ model: string;
709
+ startedAtMs: number;
710
+ endedAtMs: number;
711
+ inputTokens: number;
712
+ outputTokens: number;
713
+ cachedInputTokens: number;
714
+ reasoningTokens: number;
715
+ costUsdNanos: number;
716
+ }[];
717
+ kind: "agent-candidate-model-settlement-material";
718
+ executionPlanDigest: `sha256:${string}`;
719
+ preparationId: string;
720
+ grantDigest: `sha256:${string}`;
721
+ closed: true;
722
+ resolved: {
723
+ requested: string;
724
+ provider: string;
725
+ model: string;
726
+ snapshot: string;
727
+ reasoningEffort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "ultracode";
728
+ };
729
+ usage: {
730
+ inputTokens: number;
731
+ outputTokens: number;
732
+ cachedInputTokens: number;
733
+ reasoningTokens: number;
734
+ modelCalls: number;
735
+ costUsdNanos: number;
736
+ };
737
+ schemaVersion: 2;
738
+ }, unknown, z.core.$ZodTypeInternals<{
739
+ calls: {
740
+ callId: string;
741
+ generationId: string;
742
+ traceSpanId: string;
743
+ status: "succeeded" | "failed";
744
+ model: string;
745
+ startedAtMs: number;
746
+ endedAtMs: number;
747
+ inputTokens: number;
748
+ outputTokens: number;
749
+ cachedInputTokens: number;
750
+ reasoningTokens: number;
751
+ costUsdNanos: number;
752
+ }[];
753
+ kind: "agent-candidate-model-settlement-material";
754
+ executionPlanDigest: `sha256:${string}`;
755
+ preparationId: string;
756
+ grantDigest: `sha256:${string}`;
757
+ closed: true;
758
+ resolved: {
759
+ requested: string;
760
+ provider: string;
761
+ model: string;
762
+ snapshot: string;
763
+ reasoningEffort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "ultracode";
764
+ };
765
+ usage: {
766
+ inputTokens: number;
767
+ outputTokens: number;
768
+ cachedInputTokens: number;
769
+ reasoningTokens: number;
770
+ modelCalls: number;
771
+ costUsdNanos: number;
772
+ };
773
+ schemaVersion: 2;
774
+ }, unknown>>;
775
+ artifact: z.ZodUnion<readonly [z.ZodObject<{
776
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
777
+ kind: z.ZodLiteral<"s3">;
778
+ bucket: z.ZodString;
779
+ key: z.ZodString;
780
+ region: z.ZodOptional<z.ZodString>;
781
+ }, z.core.$strict>, z.ZodObject<{
782
+ kind: z.ZodLiteral<"ipfs">;
783
+ cid: z.ZodString;
784
+ path: z.ZodOptional<z.ZodString>;
785
+ }, z.core.$strict>], "kind">;
786
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
787
+ byteLength: z.ZodNumber;
788
+ }, z.core.$strict>, z.ZodObject<{
789
+ encoding: z.ZodLiteral<"base64">;
790
+ content: z.ZodString;
791
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
792
+ byteLength: z.ZodNumber;
793
+ }, z.core.$strict>]>;
794
+ }, z.core.$strict>;
795
+ taskOutcome: z.ZodObject<{
796
+ schemaVersion: z.ZodLiteral<2>;
797
+ kind: z.ZodLiteral<"agent-candidate-task-outcome">;
798
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
799
+ material: z.ZodType<{
800
+ schemaVersion: 2;
801
+ kind: "agent-candidate-task-outcome-material";
802
+ executionPlanDigest: `sha256:${string}`;
803
+ outcome: {
804
+ kind: "workspace";
805
+ baseRepository: {
806
+ identity: string;
807
+ rootIdentity: string;
808
+ commit: string;
809
+ tree: string;
810
+ };
811
+ resultRepository: {
812
+ identity: string;
813
+ rootIdentity: string;
814
+ commit: string;
815
+ tree: string;
816
+ };
817
+ afterState: {
818
+ schemaVersion: 2;
819
+ kind: "agent-candidate-workspace-snapshot";
820
+ digest: `sha256:${string}`;
821
+ material: {
822
+ schemaVersion: 2;
823
+ kind: "agent-candidate-workspace-manifest";
824
+ files: {
825
+ path: string;
826
+ mode: number;
827
+ sha256: `sha256:${string}`;
828
+ byteLength: number;
829
+ }[];
830
+ };
831
+ manifest: {
832
+ locator: {
833
+ kind: "s3";
834
+ bucket: string;
835
+ key: string;
836
+ region?: string | undefined;
837
+ } | {
838
+ kind: "ipfs";
839
+ cid: string;
840
+ path?: string | undefined;
841
+ };
842
+ sha256: `sha256:${string}`;
843
+ byteLength: number;
844
+ } | {
845
+ encoding: "base64";
846
+ content: string;
847
+ sha256: `sha256:${string}`;
848
+ byteLength: number;
849
+ };
850
+ archive: {
851
+ locator: {
852
+ kind: "s3";
853
+ bucket: string;
854
+ key: string;
855
+ region?: string | undefined;
856
+ } | {
857
+ kind: "ipfs";
858
+ cid: string;
859
+ path?: string | undefined;
860
+ };
861
+ sha256: `sha256:${string}`;
862
+ byteLength: number;
863
+ } | {
864
+ encoding: "base64";
865
+ content: string;
866
+ sha256: `sha256:${string}`;
867
+ byteLength: number;
868
+ };
869
+ };
870
+ gitDiff: {
871
+ format: "git-diff-binary";
872
+ artifact: {
873
+ locator: {
874
+ kind: "s3";
875
+ bucket: string;
876
+ key: string;
877
+ region?: string | undefined;
878
+ } | {
879
+ kind: "ipfs";
880
+ cid: string;
881
+ path?: string | undefined;
882
+ };
883
+ sha256: `sha256:${string}`;
884
+ byteLength: number;
885
+ };
886
+ };
887
+ } | {
888
+ kind: "output";
889
+ spec: {
890
+ mediaType: string;
891
+ maxBytes: number;
892
+ };
893
+ artifact: {
894
+ locator: {
895
+ kind: "s3";
896
+ bucket: string;
897
+ key: string;
898
+ region?: string | undefined;
899
+ } | {
900
+ kind: "ipfs";
901
+ cid: string;
902
+ path?: string | undefined;
903
+ };
904
+ sha256: `sha256:${string}`;
905
+ byteLength: number;
906
+ };
907
+ };
908
+ }, unknown, z.core.$ZodTypeInternals<{
909
+ schemaVersion: 2;
910
+ kind: "agent-candidate-task-outcome-material";
911
+ executionPlanDigest: `sha256:${string}`;
912
+ outcome: {
913
+ kind: "workspace";
914
+ baseRepository: {
915
+ identity: string;
916
+ rootIdentity: string;
917
+ commit: string;
918
+ tree: string;
919
+ };
920
+ resultRepository: {
921
+ identity: string;
922
+ rootIdentity: string;
923
+ commit: string;
924
+ tree: string;
925
+ };
926
+ afterState: {
927
+ schemaVersion: 2;
928
+ kind: "agent-candidate-workspace-snapshot";
929
+ digest: `sha256:${string}`;
930
+ material: {
931
+ schemaVersion: 2;
932
+ kind: "agent-candidate-workspace-manifest";
933
+ files: {
934
+ path: string;
935
+ mode: number;
936
+ sha256: `sha256:${string}`;
937
+ byteLength: number;
938
+ }[];
939
+ };
940
+ manifest: {
941
+ locator: {
942
+ kind: "s3";
943
+ bucket: string;
944
+ key: string;
945
+ region?: string | undefined;
946
+ } | {
947
+ kind: "ipfs";
948
+ cid: string;
949
+ path?: string | undefined;
950
+ };
951
+ sha256: `sha256:${string}`;
952
+ byteLength: number;
953
+ } | {
954
+ encoding: "base64";
955
+ content: string;
956
+ sha256: `sha256:${string}`;
957
+ byteLength: number;
958
+ };
959
+ archive: {
960
+ locator: {
961
+ kind: "s3";
962
+ bucket: string;
963
+ key: string;
964
+ region?: string | undefined;
965
+ } | {
966
+ kind: "ipfs";
967
+ cid: string;
968
+ path?: string | undefined;
969
+ };
970
+ sha256: `sha256:${string}`;
971
+ byteLength: number;
972
+ } | {
973
+ encoding: "base64";
974
+ content: string;
975
+ sha256: `sha256:${string}`;
976
+ byteLength: number;
977
+ };
978
+ };
979
+ gitDiff: {
980
+ format: "git-diff-binary";
981
+ artifact: {
982
+ locator: {
983
+ kind: "s3";
984
+ bucket: string;
985
+ key: string;
986
+ region?: string | undefined;
987
+ } | {
988
+ kind: "ipfs";
989
+ cid: string;
990
+ path?: string | undefined;
991
+ };
992
+ sha256: `sha256:${string}`;
993
+ byteLength: number;
994
+ };
995
+ };
996
+ } | {
997
+ kind: "output";
998
+ spec: {
999
+ mediaType: string;
1000
+ maxBytes: number;
1001
+ };
1002
+ artifact: {
1003
+ locator: {
1004
+ kind: "s3";
1005
+ bucket: string;
1006
+ key: string;
1007
+ region?: string | undefined;
1008
+ } | {
1009
+ kind: "ipfs";
1010
+ cid: string;
1011
+ path?: string | undefined;
1012
+ };
1013
+ sha256: `sha256:${string}`;
1014
+ byteLength: number;
1015
+ };
1016
+ };
1017
+ }, unknown>>;
1018
+ artifact: z.ZodUnion<readonly [z.ZodObject<{
1019
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1020
+ kind: z.ZodLiteral<"s3">;
1021
+ bucket: z.ZodString;
1022
+ key: z.ZodString;
1023
+ region: z.ZodOptional<z.ZodString>;
1024
+ }, z.core.$strict>, z.ZodObject<{
1025
+ kind: z.ZodLiteral<"ipfs">;
1026
+ cid: z.ZodString;
1027
+ path: z.ZodOptional<z.ZodString>;
1028
+ }, z.core.$strict>], "kind">;
1029
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1030
+ byteLength: z.ZodNumber;
1031
+ }, z.core.$strict>, z.ZodObject<{
1032
+ encoding: z.ZodLiteral<"base64">;
1033
+ content: z.ZodString;
1034
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1035
+ byteLength: z.ZodNumber;
1036
+ }, z.core.$strict>]>;
1037
+ }, z.core.$strict>;
1038
+ benchmarkResult: z.ZodObject<{
1039
+ schemaVersion: z.ZodLiteral<1>;
1040
+ kind: z.ZodLiteral<"agent-candidate-benchmark-result">;
1041
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1042
+ material: z.ZodType<{
1043
+ schemaVersion: 1;
1044
+ kind: "agent-candidate-benchmark-result-material";
1045
+ executionPlanDigest: `sha256:${string}`;
1046
+ taskOutcomeDigest: `sha256:${string}`;
1047
+ benchmark: {
1048
+ name: string;
1049
+ version: string;
1050
+ taskId: string;
1051
+ splitDigest: `sha256:${string}`;
1052
+ };
1053
+ grader: {
1054
+ name: string;
1055
+ version: string;
1056
+ artifact: {
1057
+ locator: {
1058
+ kind: "s3";
1059
+ bucket: string;
1060
+ key: string;
1061
+ region?: string | undefined;
1062
+ } | {
1063
+ kind: "ipfs";
1064
+ cid: string;
1065
+ path?: string | undefined;
1066
+ };
1067
+ sha256: `sha256:${string}`;
1068
+ byteLength: number;
1069
+ };
1070
+ };
1071
+ evidence: {
1072
+ locator: {
1073
+ kind: "s3";
1074
+ bucket: string;
1075
+ key: string;
1076
+ region?: string | undefined;
1077
+ } | {
1078
+ kind: "ipfs";
1079
+ cid: string;
1080
+ path?: string | undefined;
1081
+ };
1082
+ sha256: `sha256:${string}`;
1083
+ byteLength: number;
1084
+ };
1085
+ score: number;
1086
+ passed: boolean;
1087
+ dimensions: {
1088
+ name: string;
1089
+ score: number;
1090
+ }[];
1091
+ }, unknown, z.core.$ZodTypeInternals<{
1092
+ schemaVersion: 1;
1093
+ kind: "agent-candidate-benchmark-result-material";
1094
+ executionPlanDigest: `sha256:${string}`;
1095
+ taskOutcomeDigest: `sha256:${string}`;
1096
+ benchmark: {
1097
+ name: string;
1098
+ version: string;
1099
+ taskId: string;
1100
+ splitDigest: `sha256:${string}`;
1101
+ };
1102
+ grader: {
1103
+ name: string;
1104
+ version: string;
1105
+ artifact: {
1106
+ locator: {
1107
+ kind: "s3";
1108
+ bucket: string;
1109
+ key: string;
1110
+ region?: string | undefined;
1111
+ } | {
1112
+ kind: "ipfs";
1113
+ cid: string;
1114
+ path?: string | undefined;
1115
+ };
1116
+ sha256: `sha256:${string}`;
1117
+ byteLength: number;
1118
+ };
1119
+ };
1120
+ evidence: {
1121
+ locator: {
1122
+ kind: "s3";
1123
+ bucket: string;
1124
+ key: string;
1125
+ region?: string | undefined;
1126
+ } | {
1127
+ kind: "ipfs";
1128
+ cid: string;
1129
+ path?: string | undefined;
1130
+ };
1131
+ sha256: `sha256:${string}`;
1132
+ byteLength: number;
1133
+ };
1134
+ score: number;
1135
+ passed: boolean;
1136
+ dimensions: {
1137
+ name: string;
1138
+ score: number;
1139
+ }[];
1140
+ }, unknown>>;
1141
+ artifact: z.ZodUnion<readonly [z.ZodObject<{
1142
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1143
+ kind: z.ZodLiteral<"s3">;
1144
+ bucket: z.ZodString;
1145
+ key: z.ZodString;
1146
+ region: z.ZodOptional<z.ZodString>;
1147
+ }, z.core.$strict>, z.ZodObject<{
1148
+ kind: z.ZodLiteral<"ipfs">;
1149
+ cid: z.ZodString;
1150
+ path: z.ZodOptional<z.ZodString>;
1151
+ }, z.core.$strict>], "kind">;
1152
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1153
+ byteLength: z.ZodNumber;
1154
+ }, z.core.$strict>, z.ZodObject<{
1155
+ encoding: z.ZodLiteral<"base64">;
1156
+ content: z.ZodString;
1157
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1158
+ byteLength: z.ZodNumber;
1159
+ }, z.core.$strict>]>;
1160
+ }, z.core.$strict>;
1161
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1162
+ }, z.core.$strict>;
1163
+ /**
1164
+ * @deprecated The run receipt generations collapsed into a single current
1165
+ * schema. Restored union parser for consumers that accepted both generations.
1166
+ */
1167
+ export declare const agentCandidateRunReceiptAnyVersionSchema: z.ZodUnion<readonly [z.ZodObject<{
1168
+ schemaVersion: z.ZodLiteral<1>;
1169
+ kind: z.ZodLiteral<"agent-candidate-run">;
1170
+ digestAlgorithm: z.ZodLiteral<"rfc8785-sha256">;
1171
+ bundleDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1172
+ materializationReceiptDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1173
+ executionPlanDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1174
+ memory: z.ZodDiscriminatedUnion<[z.ZodObject<{
1175
+ mode: z.ZodLiteral<"disabled">;
1176
+ }, z.core.$strict>, z.ZodObject<{
1177
+ mode: z.ZodLiteral<"isolated">;
1178
+ scope: z.ZodLiteral<"task">;
1179
+ effectiveNamespace: z.ZodString;
1180
+ resetEvidenceDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1181
+ beforeStateDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1182
+ afterState: z.ZodObject<{
1183
+ schemaVersion: z.ZodLiteral<2>;
1184
+ kind: z.ZodLiteral<"agent-candidate-workspace-snapshot">;
1185
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1186
+ material: z.ZodObject<{
1187
+ schemaVersion: z.ZodLiteral<2>;
1188
+ kind: z.ZodLiteral<"agent-candidate-workspace-manifest">;
1189
+ files: z.ZodArray<z.ZodObject<{
1190
+ path: z.ZodString;
1191
+ mode: z.ZodNumber;
1192
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1193
+ byteLength: z.ZodNumber;
1194
+ }, z.core.$strict>>;
1195
+ }, z.core.$strict>;
1196
+ manifest: z.ZodUnion<readonly [z.ZodObject<{
1197
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1198
+ kind: z.ZodLiteral<"s3">;
1199
+ bucket: z.ZodString;
1200
+ key: z.ZodString;
1201
+ region: z.ZodOptional<z.ZodString>;
1202
+ }, z.core.$strict>, z.ZodObject<{
1203
+ kind: z.ZodLiteral<"ipfs">;
1204
+ cid: z.ZodString;
1205
+ path: z.ZodOptional<z.ZodString>;
1206
+ }, z.core.$strict>], "kind">;
1207
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1208
+ byteLength: z.ZodNumber;
1209
+ }, z.core.$strict>, z.ZodObject<{
1210
+ encoding: z.ZodLiteral<"base64">;
1211
+ content: z.ZodString;
1212
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1213
+ byteLength: z.ZodNumber;
1214
+ }, z.core.$strict>]>;
1215
+ archive: z.ZodUnion<readonly [z.ZodObject<{
1216
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1217
+ kind: z.ZodLiteral<"s3">;
1218
+ bucket: z.ZodString;
1219
+ key: z.ZodString;
1220
+ region: z.ZodOptional<z.ZodString>;
1221
+ }, z.core.$strict>, z.ZodObject<{
1222
+ kind: z.ZodLiteral<"ipfs">;
1223
+ cid: z.ZodString;
1224
+ path: z.ZodOptional<z.ZodString>;
1225
+ }, z.core.$strict>], "kind">;
1226
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1227
+ byteLength: z.ZodNumber;
1228
+ }, z.core.$strict>, z.ZodObject<{
1229
+ encoding: z.ZodLiteral<"base64">;
1230
+ content: z.ZodString;
1231
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1232
+ byteLength: z.ZodNumber;
1233
+ }, z.core.$strict>]>;
1234
+ }, z.core.$strict>;
1235
+ }, z.core.$strict>], "mode">;
1236
+ usage: z.ZodObject<{
1237
+ costUsd: z.ZodNumber;
1238
+ inputTokens: z.ZodNumber;
1239
+ outputTokens: z.ZodNumber;
1240
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
1241
+ modelCalls: z.ZodNumber;
1242
+ }, z.core.$strict>;
1243
+ modelUsage: z.ZodObject<{
1244
+ resolved: z.ZodObject<{
1245
+ requested: z.ZodString;
1246
+ provider: z.ZodString;
1247
+ model: z.ZodString;
1248
+ snapshot: z.ZodString;
1249
+ reasoningEffort: z.ZodEnum<{
1250
+ none: "none";
1251
+ minimal: "minimal";
1252
+ low: "low";
1253
+ medium: "medium";
1254
+ high: "high";
1255
+ xhigh: "xhigh";
1256
+ ultracode: "ultracode";
1257
+ }>;
1258
+ }, z.core.$strict>;
1259
+ usage: z.ZodObject<{
1260
+ costUsd: z.ZodNumber;
1261
+ inputTokens: z.ZodNumber;
1262
+ outputTokens: z.ZodNumber;
1263
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
1264
+ modelCalls: z.ZodNumber;
1265
+ }, z.core.$strict>;
1266
+ }, z.core.$strict>;
1267
+ trace: z.ZodObject<{
1268
+ schemaVersion: z.ZodLiteral<1>;
1269
+ artifact: z.ZodUnion<readonly [z.ZodObject<{
1270
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1271
+ kind: z.ZodLiteral<"s3">;
1272
+ bucket: z.ZodString;
1273
+ key: z.ZodString;
1274
+ region: z.ZodOptional<z.ZodString>;
1275
+ }, z.core.$strict>, z.ZodObject<{
1276
+ kind: z.ZodLiteral<"ipfs">;
1277
+ cid: z.ZodString;
1278
+ path: z.ZodOptional<z.ZodString>;
1279
+ }, z.core.$strict>], "kind">;
1280
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1281
+ byteLength: z.ZodNumber;
1282
+ }, z.core.$strict>, z.ZodObject<{
1283
+ encoding: z.ZodLiteral<"base64">;
1284
+ content: z.ZodString;
1285
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1286
+ byteLength: z.ZodNumber;
1287
+ }, z.core.$strict>]>;
1288
+ eventCount: z.ZodNumber;
1289
+ modelCallCount: z.ZodNumber;
1290
+ }, z.core.$strict>;
1291
+ termination: z.ZodDiscriminatedUnion<[z.ZodObject<{
1292
+ kind: z.ZodLiteral<"exit">;
1293
+ exitCode: z.ZodNumber;
1294
+ }, z.core.$strict>, z.ZodObject<{
1295
+ kind: z.ZodLiteral<"timeout">;
1296
+ timeoutMs: z.ZodNumber;
1297
+ }, z.core.$strict>, z.ZodObject<{
1298
+ kind: z.ZodLiteral<"signal">;
1299
+ signal: z.ZodString;
1300
+ }, z.core.$strict>, z.ZodObject<{
1301
+ kind: z.ZodLiteral<"cancelled">;
1302
+ }, z.core.$strict>], "kind">;
1303
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1304
+ }, z.core.$strict>, z.ZodObject<{
1305
+ schemaVersion: z.ZodLiteral<2>;
1306
+ kind: z.ZodLiteral<"agent-candidate-run">;
1307
+ digestAlgorithm: z.ZodLiteral<"rfc8785-sha256">;
1308
+ bundleDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1309
+ materializationReceiptDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1310
+ executionPlanDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1311
+ memory: z.ZodDiscriminatedUnion<[z.ZodObject<{
1312
+ mode: z.ZodLiteral<"disabled">;
1313
+ }, z.core.$strict>, z.ZodObject<{
1314
+ mode: z.ZodLiteral<"isolated">;
1315
+ scope: z.ZodLiteral<"task">;
1316
+ effectiveNamespace: z.ZodString;
1317
+ resetEvidenceDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1318
+ beforeStateDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1319
+ afterState: z.ZodObject<{
1320
+ schemaVersion: z.ZodLiteral<2>;
1321
+ kind: z.ZodLiteral<"agent-candidate-workspace-snapshot">;
1322
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1323
+ material: z.ZodObject<{
1324
+ schemaVersion: z.ZodLiteral<2>;
1325
+ kind: z.ZodLiteral<"agent-candidate-workspace-manifest">;
1326
+ files: z.ZodArray<z.ZodObject<{
1327
+ path: z.ZodString;
1328
+ mode: z.ZodNumber;
1329
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1330
+ byteLength: z.ZodNumber;
1331
+ }, z.core.$strict>>;
1332
+ }, z.core.$strict>;
1333
+ manifest: z.ZodUnion<readonly [z.ZodObject<{
1334
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1335
+ kind: z.ZodLiteral<"s3">;
1336
+ bucket: z.ZodString;
1337
+ key: z.ZodString;
1338
+ region: z.ZodOptional<z.ZodString>;
1339
+ }, z.core.$strict>, z.ZodObject<{
1340
+ kind: z.ZodLiteral<"ipfs">;
1341
+ cid: z.ZodString;
1342
+ path: z.ZodOptional<z.ZodString>;
1343
+ }, z.core.$strict>], "kind">;
1344
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1345
+ byteLength: z.ZodNumber;
1346
+ }, z.core.$strict>, z.ZodObject<{
1347
+ encoding: z.ZodLiteral<"base64">;
1348
+ content: z.ZodString;
1349
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1350
+ byteLength: z.ZodNumber;
1351
+ }, z.core.$strict>]>;
1352
+ archive: z.ZodUnion<readonly [z.ZodObject<{
1353
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1354
+ kind: z.ZodLiteral<"s3">;
1355
+ bucket: z.ZodString;
1356
+ key: z.ZodString;
1357
+ region: z.ZodOptional<z.ZodString>;
1358
+ }, z.core.$strict>, z.ZodObject<{
1359
+ kind: z.ZodLiteral<"ipfs">;
1360
+ cid: z.ZodString;
1361
+ path: z.ZodOptional<z.ZodString>;
1362
+ }, z.core.$strict>], "kind">;
1363
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1364
+ byteLength: z.ZodNumber;
1365
+ }, z.core.$strict>, z.ZodObject<{
1366
+ encoding: z.ZodLiteral<"base64">;
1367
+ content: z.ZodString;
1368
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1369
+ byteLength: z.ZodNumber;
1370
+ }, z.core.$strict>]>;
1371
+ }, z.core.$strict>;
1372
+ }, z.core.$strict>], "mode">;
1373
+ usage: z.ZodObject<{
1374
+ costUsd: z.ZodNumber;
1375
+ inputTokens: z.ZodNumber;
1376
+ outputTokens: z.ZodNumber;
1377
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
1378
+ modelCalls: z.ZodNumber;
1379
+ }, z.core.$strict>;
1380
+ modelUsage: z.ZodObject<{
1381
+ resolved: z.ZodObject<{
1382
+ requested: z.ZodString;
1383
+ provider: z.ZodString;
1384
+ model: z.ZodString;
1385
+ snapshot: z.ZodString;
1386
+ reasoningEffort: z.ZodEnum<{
1387
+ none: "none";
1388
+ minimal: "minimal";
1389
+ low: "low";
1390
+ medium: "medium";
1391
+ high: "high";
1392
+ xhigh: "xhigh";
1393
+ ultracode: "ultracode";
1394
+ }>;
1395
+ }, z.core.$strict>;
1396
+ usage: z.ZodObject<{
1397
+ costUsd: z.ZodNumber;
1398
+ inputTokens: z.ZodNumber;
1399
+ outputTokens: z.ZodNumber;
1400
+ cachedInputTokens: z.ZodOptional<z.ZodNumber>;
1401
+ modelCalls: z.ZodNumber;
1402
+ }, z.core.$strict>;
1403
+ }, z.core.$strict>;
1404
+ trace: z.ZodObject<{
1405
+ schemaVersion: z.ZodLiteral<1>;
1406
+ artifact: z.ZodUnion<readonly [z.ZodObject<{
1407
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1408
+ kind: z.ZodLiteral<"s3">;
1409
+ bucket: z.ZodString;
1410
+ key: z.ZodString;
1411
+ region: z.ZodOptional<z.ZodString>;
1412
+ }, z.core.$strict>, z.ZodObject<{
1413
+ kind: z.ZodLiteral<"ipfs">;
1414
+ cid: z.ZodString;
1415
+ path: z.ZodOptional<z.ZodString>;
1416
+ }, z.core.$strict>], "kind">;
1417
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1418
+ byteLength: z.ZodNumber;
1419
+ }, z.core.$strict>, z.ZodObject<{
1420
+ encoding: z.ZodLiteral<"base64">;
1421
+ content: z.ZodString;
1422
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1423
+ byteLength: z.ZodNumber;
1424
+ }, z.core.$strict>]>;
1425
+ eventCount: z.ZodNumber;
1426
+ modelCallCount: z.ZodNumber;
1427
+ }, z.core.$strict>;
1428
+ termination: z.ZodDiscriminatedUnion<[z.ZodObject<{
1429
+ kind: z.ZodLiteral<"exit">;
1430
+ exitCode: z.ZodNumber;
1431
+ }, z.core.$strict>, z.ZodObject<{
1432
+ kind: z.ZodLiteral<"timeout">;
1433
+ timeoutMs: z.ZodNumber;
1434
+ }, z.core.$strict>, z.ZodObject<{
1435
+ kind: z.ZodLiteral<"signal">;
1436
+ signal: z.ZodString;
1437
+ }, z.core.$strict>, z.ZodObject<{
1438
+ kind: z.ZodLiteral<"cancelled">;
1439
+ }, z.core.$strict>], "kind">;
1440
+ fixedUsage: z.ZodObject<{
1441
+ inputTokens: z.ZodNumber;
1442
+ outputTokens: z.ZodNumber;
1443
+ cachedInputTokens: z.ZodNumber;
1444
+ reasoningTokens: z.ZodNumber;
1445
+ modelCalls: z.ZodNumber;
1446
+ costUsdNanos: z.ZodNumber;
1447
+ }, z.core.$strict>;
1448
+ modelSettlement: z.ZodObject<{
1449
+ schemaVersion: z.ZodLiteral<2>;
1450
+ kind: z.ZodLiteral<"agent-candidate-model-settlement">;
1451
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1452
+ material: z.ZodType<{
1453
+ calls: {
1454
+ callId: string;
1455
+ generationId: string;
1456
+ traceSpanId: string;
1457
+ status: "succeeded" | "failed";
1458
+ model: string;
1459
+ startedAtMs: number;
1460
+ endedAtMs: number;
1461
+ inputTokens: number;
1462
+ outputTokens: number;
1463
+ cachedInputTokens: number;
1464
+ reasoningTokens: number;
1465
+ costUsdNanos: number;
1466
+ }[];
1467
+ kind: "agent-candidate-model-settlement-material";
1468
+ executionPlanDigest: `sha256:${string}`;
1469
+ preparationId: string;
1470
+ grantDigest: `sha256:${string}`;
1471
+ closed: true;
1472
+ resolved: {
1473
+ requested: string;
1474
+ provider: string;
1475
+ model: string;
1476
+ snapshot: string;
1477
+ reasoningEffort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "ultracode";
1478
+ };
1479
+ usage: {
1480
+ inputTokens: number;
1481
+ outputTokens: number;
1482
+ cachedInputTokens: number;
1483
+ reasoningTokens: number;
1484
+ modelCalls: number;
1485
+ costUsdNanos: number;
1486
+ };
1487
+ schemaVersion: 2;
1488
+ }, unknown, z.core.$ZodTypeInternals<{
1489
+ calls: {
1490
+ callId: string;
1491
+ generationId: string;
1492
+ traceSpanId: string;
1493
+ status: "succeeded" | "failed";
1494
+ model: string;
1495
+ startedAtMs: number;
1496
+ endedAtMs: number;
1497
+ inputTokens: number;
1498
+ outputTokens: number;
1499
+ cachedInputTokens: number;
1500
+ reasoningTokens: number;
1501
+ costUsdNanos: number;
1502
+ }[];
1503
+ kind: "agent-candidate-model-settlement-material";
1504
+ executionPlanDigest: `sha256:${string}`;
1505
+ preparationId: string;
1506
+ grantDigest: `sha256:${string}`;
1507
+ closed: true;
1508
+ resolved: {
1509
+ requested: string;
1510
+ provider: string;
1511
+ model: string;
1512
+ snapshot: string;
1513
+ reasoningEffort: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | "ultracode";
1514
+ };
1515
+ usage: {
1516
+ inputTokens: number;
1517
+ outputTokens: number;
1518
+ cachedInputTokens: number;
1519
+ reasoningTokens: number;
1520
+ modelCalls: number;
1521
+ costUsdNanos: number;
1522
+ };
1523
+ schemaVersion: 2;
1524
+ }, unknown>>;
1525
+ artifact: z.ZodUnion<readonly [z.ZodObject<{
1526
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1527
+ kind: z.ZodLiteral<"s3">;
1528
+ bucket: z.ZodString;
1529
+ key: z.ZodString;
1530
+ region: z.ZodOptional<z.ZodString>;
1531
+ }, z.core.$strict>, z.ZodObject<{
1532
+ kind: z.ZodLiteral<"ipfs">;
1533
+ cid: z.ZodString;
1534
+ path: z.ZodOptional<z.ZodString>;
1535
+ }, z.core.$strict>], "kind">;
1536
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1537
+ byteLength: z.ZodNumber;
1538
+ }, z.core.$strict>, z.ZodObject<{
1539
+ encoding: z.ZodLiteral<"base64">;
1540
+ content: z.ZodString;
1541
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1542
+ byteLength: z.ZodNumber;
1543
+ }, z.core.$strict>]>;
1544
+ }, z.core.$strict>;
1545
+ taskOutcome: z.ZodObject<{
1546
+ schemaVersion: z.ZodLiteral<2>;
1547
+ kind: z.ZodLiteral<"agent-candidate-task-outcome">;
1548
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1549
+ material: z.ZodType<{
1550
+ schemaVersion: 2;
1551
+ kind: "agent-candidate-task-outcome-material";
1552
+ executionPlanDigest: `sha256:${string}`;
1553
+ outcome: {
1554
+ kind: "workspace";
1555
+ baseRepository: {
1556
+ identity: string;
1557
+ rootIdentity: string;
1558
+ commit: string;
1559
+ tree: string;
1560
+ };
1561
+ resultRepository: {
1562
+ identity: string;
1563
+ rootIdentity: string;
1564
+ commit: string;
1565
+ tree: string;
1566
+ };
1567
+ afterState: {
1568
+ schemaVersion: 2;
1569
+ kind: "agent-candidate-workspace-snapshot";
1570
+ digest: `sha256:${string}`;
1571
+ material: {
1572
+ schemaVersion: 2;
1573
+ kind: "agent-candidate-workspace-manifest";
1574
+ files: {
1575
+ path: string;
1576
+ mode: number;
1577
+ sha256: `sha256:${string}`;
1578
+ byteLength: number;
1579
+ }[];
1580
+ };
1581
+ manifest: {
1582
+ locator: {
1583
+ kind: "s3";
1584
+ bucket: string;
1585
+ key: string;
1586
+ region?: string | undefined;
1587
+ } | {
1588
+ kind: "ipfs";
1589
+ cid: string;
1590
+ path?: string | undefined;
1591
+ };
1592
+ sha256: `sha256:${string}`;
1593
+ byteLength: number;
1594
+ } | {
1595
+ encoding: "base64";
1596
+ content: string;
1597
+ sha256: `sha256:${string}`;
1598
+ byteLength: number;
1599
+ };
1600
+ archive: {
1601
+ locator: {
1602
+ kind: "s3";
1603
+ bucket: string;
1604
+ key: string;
1605
+ region?: string | undefined;
1606
+ } | {
1607
+ kind: "ipfs";
1608
+ cid: string;
1609
+ path?: string | undefined;
1610
+ };
1611
+ sha256: `sha256:${string}`;
1612
+ byteLength: number;
1613
+ } | {
1614
+ encoding: "base64";
1615
+ content: string;
1616
+ sha256: `sha256:${string}`;
1617
+ byteLength: number;
1618
+ };
1619
+ };
1620
+ gitDiff: {
1621
+ format: "git-diff-binary";
1622
+ artifact: {
1623
+ locator: {
1624
+ kind: "s3";
1625
+ bucket: string;
1626
+ key: string;
1627
+ region?: string | undefined;
1628
+ } | {
1629
+ kind: "ipfs";
1630
+ cid: string;
1631
+ path?: string | undefined;
1632
+ };
1633
+ sha256: `sha256:${string}`;
1634
+ byteLength: number;
1635
+ };
1636
+ };
1637
+ } | {
1638
+ kind: "output";
1639
+ spec: {
1640
+ mediaType: string;
1641
+ maxBytes: number;
1642
+ };
1643
+ artifact: {
1644
+ locator: {
1645
+ kind: "s3";
1646
+ bucket: string;
1647
+ key: string;
1648
+ region?: string | undefined;
1649
+ } | {
1650
+ kind: "ipfs";
1651
+ cid: string;
1652
+ path?: string | undefined;
1653
+ };
1654
+ sha256: `sha256:${string}`;
1655
+ byteLength: number;
1656
+ };
1657
+ };
1658
+ }, unknown, z.core.$ZodTypeInternals<{
1659
+ schemaVersion: 2;
1660
+ kind: "agent-candidate-task-outcome-material";
1661
+ executionPlanDigest: `sha256:${string}`;
1662
+ outcome: {
1663
+ kind: "workspace";
1664
+ baseRepository: {
1665
+ identity: string;
1666
+ rootIdentity: string;
1667
+ commit: string;
1668
+ tree: string;
1669
+ };
1670
+ resultRepository: {
1671
+ identity: string;
1672
+ rootIdentity: string;
1673
+ commit: string;
1674
+ tree: string;
1675
+ };
1676
+ afterState: {
1677
+ schemaVersion: 2;
1678
+ kind: "agent-candidate-workspace-snapshot";
1679
+ digest: `sha256:${string}`;
1680
+ material: {
1681
+ schemaVersion: 2;
1682
+ kind: "agent-candidate-workspace-manifest";
1683
+ files: {
1684
+ path: string;
1685
+ mode: number;
1686
+ sha256: `sha256:${string}`;
1687
+ byteLength: number;
1688
+ }[];
1689
+ };
1690
+ manifest: {
1691
+ locator: {
1692
+ kind: "s3";
1693
+ bucket: string;
1694
+ key: string;
1695
+ region?: string | undefined;
1696
+ } | {
1697
+ kind: "ipfs";
1698
+ cid: string;
1699
+ path?: string | undefined;
1700
+ };
1701
+ sha256: `sha256:${string}`;
1702
+ byteLength: number;
1703
+ } | {
1704
+ encoding: "base64";
1705
+ content: string;
1706
+ sha256: `sha256:${string}`;
1707
+ byteLength: number;
1708
+ };
1709
+ archive: {
1710
+ locator: {
1711
+ kind: "s3";
1712
+ bucket: string;
1713
+ key: string;
1714
+ region?: string | undefined;
1715
+ } | {
1716
+ kind: "ipfs";
1717
+ cid: string;
1718
+ path?: string | undefined;
1719
+ };
1720
+ sha256: `sha256:${string}`;
1721
+ byteLength: number;
1722
+ } | {
1723
+ encoding: "base64";
1724
+ content: string;
1725
+ sha256: `sha256:${string}`;
1726
+ byteLength: number;
1727
+ };
1728
+ };
1729
+ gitDiff: {
1730
+ format: "git-diff-binary";
1731
+ artifact: {
1732
+ locator: {
1733
+ kind: "s3";
1734
+ bucket: string;
1735
+ key: string;
1736
+ region?: string | undefined;
1737
+ } | {
1738
+ kind: "ipfs";
1739
+ cid: string;
1740
+ path?: string | undefined;
1741
+ };
1742
+ sha256: `sha256:${string}`;
1743
+ byteLength: number;
1744
+ };
1745
+ };
1746
+ } | {
1747
+ kind: "output";
1748
+ spec: {
1749
+ mediaType: string;
1750
+ maxBytes: number;
1751
+ };
1752
+ artifact: {
1753
+ locator: {
1754
+ kind: "s3";
1755
+ bucket: string;
1756
+ key: string;
1757
+ region?: string | undefined;
1758
+ } | {
1759
+ kind: "ipfs";
1760
+ cid: string;
1761
+ path?: string | undefined;
1762
+ };
1763
+ sha256: `sha256:${string}`;
1764
+ byteLength: number;
1765
+ };
1766
+ };
1767
+ }, unknown>>;
1768
+ artifact: z.ZodUnion<readonly [z.ZodObject<{
1769
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1770
+ kind: z.ZodLiteral<"s3">;
1771
+ bucket: z.ZodString;
1772
+ key: z.ZodString;
1773
+ region: z.ZodOptional<z.ZodString>;
1774
+ }, z.core.$strict>, z.ZodObject<{
1775
+ kind: z.ZodLiteral<"ipfs">;
1776
+ cid: z.ZodString;
1777
+ path: z.ZodOptional<z.ZodString>;
1778
+ }, z.core.$strict>], "kind">;
1779
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1780
+ byteLength: z.ZodNumber;
1781
+ }, z.core.$strict>, z.ZodObject<{
1782
+ encoding: z.ZodLiteral<"base64">;
1783
+ content: z.ZodString;
1784
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1785
+ byteLength: z.ZodNumber;
1786
+ }, z.core.$strict>]>;
1787
+ }, z.core.$strict>;
1788
+ benchmarkResult: z.ZodObject<{
1789
+ schemaVersion: z.ZodLiteral<1>;
1790
+ kind: z.ZodLiteral<"agent-candidate-benchmark-result">;
1791
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1792
+ material: z.ZodType<{
1793
+ schemaVersion: 1;
1794
+ kind: "agent-candidate-benchmark-result-material";
1795
+ executionPlanDigest: `sha256:${string}`;
1796
+ taskOutcomeDigest: `sha256:${string}`;
1797
+ benchmark: {
1798
+ name: string;
1799
+ version: string;
1800
+ taskId: string;
1801
+ splitDigest: `sha256:${string}`;
1802
+ };
1803
+ grader: {
1804
+ name: string;
1805
+ version: string;
1806
+ artifact: {
1807
+ locator: {
1808
+ kind: "s3";
1809
+ bucket: string;
1810
+ key: string;
1811
+ region?: string | undefined;
1812
+ } | {
1813
+ kind: "ipfs";
1814
+ cid: string;
1815
+ path?: string | undefined;
1816
+ };
1817
+ sha256: `sha256:${string}`;
1818
+ byteLength: number;
1819
+ };
1820
+ };
1821
+ evidence: {
1822
+ locator: {
1823
+ kind: "s3";
1824
+ bucket: string;
1825
+ key: string;
1826
+ region?: string | undefined;
1827
+ } | {
1828
+ kind: "ipfs";
1829
+ cid: string;
1830
+ path?: string | undefined;
1831
+ };
1832
+ sha256: `sha256:${string}`;
1833
+ byteLength: number;
1834
+ };
1835
+ score: number;
1836
+ passed: boolean;
1837
+ dimensions: {
1838
+ name: string;
1839
+ score: number;
1840
+ }[];
1841
+ }, unknown, z.core.$ZodTypeInternals<{
1842
+ schemaVersion: 1;
1843
+ kind: "agent-candidate-benchmark-result-material";
1844
+ executionPlanDigest: `sha256:${string}`;
1845
+ taskOutcomeDigest: `sha256:${string}`;
1846
+ benchmark: {
1847
+ name: string;
1848
+ version: string;
1849
+ taskId: string;
1850
+ splitDigest: `sha256:${string}`;
1851
+ };
1852
+ grader: {
1853
+ name: string;
1854
+ version: string;
1855
+ artifact: {
1856
+ locator: {
1857
+ kind: "s3";
1858
+ bucket: string;
1859
+ key: string;
1860
+ region?: string | undefined;
1861
+ } | {
1862
+ kind: "ipfs";
1863
+ cid: string;
1864
+ path?: string | undefined;
1865
+ };
1866
+ sha256: `sha256:${string}`;
1867
+ byteLength: number;
1868
+ };
1869
+ };
1870
+ evidence: {
1871
+ locator: {
1872
+ kind: "s3";
1873
+ bucket: string;
1874
+ key: string;
1875
+ region?: string | undefined;
1876
+ } | {
1877
+ kind: "ipfs";
1878
+ cid: string;
1879
+ path?: string | undefined;
1880
+ };
1881
+ sha256: `sha256:${string}`;
1882
+ byteLength: number;
1883
+ };
1884
+ score: number;
1885
+ passed: boolean;
1886
+ dimensions: {
1887
+ name: string;
1888
+ score: number;
1889
+ }[];
1890
+ }, unknown>>;
1891
+ artifact: z.ZodUnion<readonly [z.ZodObject<{
1892
+ locator: z.ZodDiscriminatedUnion<[z.ZodObject<{
1893
+ kind: z.ZodLiteral<"s3">;
1894
+ bucket: z.ZodString;
1895
+ key: z.ZodString;
1896
+ region: z.ZodOptional<z.ZodString>;
1897
+ }, z.core.$strict>, z.ZodObject<{
1898
+ kind: z.ZodLiteral<"ipfs">;
1899
+ cid: z.ZodString;
1900
+ path: z.ZodOptional<z.ZodString>;
1901
+ }, z.core.$strict>], "kind">;
1902
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1903
+ byteLength: z.ZodNumber;
1904
+ }, z.core.$strict>, z.ZodObject<{
1905
+ encoding: z.ZodLiteral<"base64">;
1906
+ content: z.ZodString;
1907
+ sha256: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1908
+ byteLength: z.ZodNumber;
1909
+ }, z.core.$strict>]>;
1910
+ }, z.core.$strict>;
1911
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
1912
+ }, z.core.$strict>]>;
1913
+ /**
1914
+ * @deprecated No longer exported from the outcome module. Restored spend-equality
1915
+ * helper for consumers that compared fixed-point usage totals.
1916
+ */
1917
+ export declare function sameFixedSpend(left: AgentCandidateFixedSpend, right: AgentCandidateFixedSpend): boolean;
1918
+ export {};