@tangle-network/agent-interface 0.34.0 → 0.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,6 +6,10 @@ export declare const agentCandidateFixedSpendSchema: z.ZodObject<{
6
6
  reasoningTokens: z.ZodNumber;
7
7
  modelCalls: z.ZodNumber;
8
8
  costUsdNanos: z.ZodNumber;
9
+ costProvenance: z.ZodEnum<{
10
+ observed: "observed";
11
+ estimated: "estimated";
12
+ }>;
9
13
  }, z.core.$strict>;
10
14
  export declare const agentCandidateModelSettlementCallSchema: z.ZodObject<{
11
15
  callId: z.ZodString;
@@ -23,6 +27,10 @@ export declare const agentCandidateModelSettlementCallSchema: z.ZodObject<{
23
27
  cachedInputTokens: z.ZodNumber;
24
28
  reasoningTokens: z.ZodNumber;
25
29
  costUsdNanos: z.ZodNumber;
30
+ costProvenance: z.ZodEnum<{
31
+ observed: "observed";
32
+ estimated: "estimated";
33
+ }>;
26
34
  }, z.core.$strict>;
27
35
  export declare const agentCandidateModelSettlementMaterialSchema: z.ZodObject<{
28
36
  calls: z.ZodArray<z.ZodObject<{
@@ -41,6 +49,10 @@ export declare const agentCandidateModelSettlementMaterialSchema: z.ZodObject<{
41
49
  cachedInputTokens: z.ZodNumber;
42
50
  reasoningTokens: z.ZodNumber;
43
51
  costUsdNanos: z.ZodNumber;
52
+ costProvenance: z.ZodEnum<{
53
+ observed: "observed";
54
+ estimated: "estimated";
55
+ }>;
44
56
  }, z.core.$strict>>;
45
57
  kind: z.ZodLiteral<"agent-candidate-model-settlement-material">;
46
58
  executionPlanDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
@@ -69,6 +81,10 @@ export declare const agentCandidateModelSettlementMaterialSchema: z.ZodObject<{
69
81
  reasoningTokens: z.ZodNumber;
70
82
  modelCalls: z.ZodNumber;
71
83
  costUsdNanos: z.ZodNumber;
84
+ costProvenance: z.ZodEnum<{
85
+ observed: "observed";
86
+ estimated: "estimated";
87
+ }>;
72
88
  }, z.core.$strict>;
73
89
  }, z.core.$strict>;
74
90
  export declare const agentCandidateModelSettlementEvidenceSchema: z.ZodObject<{
@@ -88,6 +104,7 @@ export declare const agentCandidateModelSettlementEvidenceSchema: z.ZodObject<{
88
104
  cachedInputTokens: number;
89
105
  reasoningTokens: number;
90
106
  costUsdNanos: number;
107
+ costProvenance: "observed" | "estimated";
91
108
  }[];
92
109
  kind: "agent-candidate-model-settlement-material";
93
110
  executionPlanDigest: `sha256:${string}`;
@@ -108,6 +125,7 @@ export declare const agentCandidateModelSettlementEvidenceSchema: z.ZodObject<{
108
125
  reasoningTokens: number;
109
126
  modelCalls: number;
110
127
  costUsdNanos: number;
128
+ costProvenance: "observed" | "estimated";
111
129
  };
112
130
  }, unknown, z.core.$ZodTypeInternals<{
113
131
  calls: {
@@ -123,6 +141,7 @@ export declare const agentCandidateModelSettlementEvidenceSchema: z.ZodObject<{
123
141
  cachedInputTokens: number;
124
142
  reasoningTokens: number;
125
143
  costUsdNanos: number;
144
+ costProvenance: "observed" | "estimated";
126
145
  }[];
127
146
  kind: "agent-candidate-model-settlement-material";
128
147
  executionPlanDigest: `sha256:${string}`;
@@ -143,6 +162,7 @@ export declare const agentCandidateModelSettlementEvidenceSchema: z.ZodObject<{
143
162
  reasoningTokens: number;
144
163
  modelCalls: number;
145
164
  costUsdNanos: number;
165
+ costProvenance: "observed" | "estimated";
146
166
  };
147
167
  }, unknown>>;
148
168
  artifact: z.ZodUnion<readonly [z.ZodObject<{
@@ -563,6 +583,10 @@ export declare const agentCandidateBenchmarkResultMaterialSchema: z.ZodObject<{
563
583
  reasoningTokens: z.ZodNumber;
564
584
  modelCalls: z.ZodNumber;
565
585
  costUsdNanos: z.ZodNumber;
586
+ costProvenance: z.ZodEnum<{
587
+ observed: "observed";
588
+ estimated: "estimated";
589
+ }>;
566
590
  }, z.core.$strict>;
567
591
  timing: z.ZodObject<{
568
592
  startedAtMs: z.ZodNumber;
@@ -625,6 +649,7 @@ export declare const agentCandidateBenchmarkResultEvidenceSchema: z.ZodObject<{
625
649
  reasoningTokens: number;
626
650
  modelCalls: number;
627
651
  costUsdNanos: number;
652
+ costProvenance: "observed" | "estimated";
628
653
  };
629
654
  timing: {
630
655
  startedAtMs: number;
@@ -683,6 +708,7 @@ export declare const agentCandidateBenchmarkResultEvidenceSchema: z.ZodObject<{
683
708
  reasoningTokens: number;
684
709
  modelCalls: number;
685
710
  costUsdNanos: number;
711
+ costProvenance: "observed" | "estimated";
686
712
  };
687
713
  timing: {
688
714
  startedAtMs: number;
@@ -21,6 +21,7 @@ export const agentCandidateFixedSpendSchema = z
21
21
  reasoningTokens: safeCountSchema,
22
22
  modelCalls: safeCountSchema,
23
23
  costUsdNanos: safeCountSchema,
24
+ costProvenance: z.enum(["observed", "estimated"]),
24
25
  })
25
26
  .strict();
26
27
  export const agentCandidateModelSettlementCallSchema = z
@@ -37,6 +38,7 @@ export const agentCandidateModelSettlementCallSchema = z
37
38
  cachedInputTokens: safeCountSchema,
38
39
  reasoningTokens: safeCountSchema,
39
40
  costUsdNanos: safeCountSchema,
41
+ costProvenance: z.enum(["observed", "estimated"]),
40
42
  })
41
43
  .strict()
42
44
  .superRefine((call, ctx) => {
@@ -82,6 +84,7 @@ function refineModelSettlementMaterial(material, ctx) {
82
84
  reasoningTokens: 0,
83
85
  modelCalls: material.calls.length,
84
86
  costUsdNanos: 0,
87
+ costProvenance: "observed",
85
88
  };
86
89
  for (const [index, call] of material.calls.entries()) {
87
90
  if (callIds.has(call.callId)) {
@@ -135,6 +138,9 @@ function refineModelSettlementMaterial(material, ctx) {
135
138
  }
136
139
  }
137
140
  }
141
+ if (material.calls.some((call) => call.costProvenance === "estimated")) {
142
+ totals.costProvenance = "estimated";
143
+ }
138
144
  if (!sameFixedSpend(totals, material.usage)) {
139
145
  ctx.addIssue({
140
146
  code: "custom",
@@ -328,7 +334,8 @@ function sameFixedSpend(left, right) {
328
334
  left.cachedInputTokens === right.cachedInputTokens &&
329
335
  left.reasoningTokens === right.reasoningTokens &&
330
336
  left.modelCalls === right.modelCalls &&
331
- left.costUsdNanos === right.costUsdNanos);
337
+ left.costUsdNanos === right.costUsdNanos &&
338
+ left.costProvenance === right.costProvenance);
332
339
  }
333
340
  function evidenceSchema(kind, material, label) {
334
341
  return z
@@ -2124,6 +2124,7 @@ export declare const candidateExecutionEvidenceSchema: z.ZodObject<{
2124
2124
  endedAtMs: z.ZodNumber;
2125
2125
  durationMs: z.ZodNumber;
2126
2126
  }, z.core.$strict>;
2127
+ steps: z.ZodNumber;
2127
2128
  memory: z.ZodDiscriminatedUnion<[z.ZodObject<{
2128
2129
  mode: z.ZodLiteral<"disabled">;
2129
2130
  }, z.core.$strict>, z.ZodObject<{
@@ -2250,6 +2251,7 @@ export declare const candidateExecutionEvidenceSchema: z.ZodObject<{
2250
2251
  cachedInputTokens: number;
2251
2252
  reasoningTokens: number;
2252
2253
  costUsdNanos: number;
2254
+ costProvenance: "observed" | "estimated";
2253
2255
  }[];
2254
2256
  kind: "agent-candidate-model-settlement-material";
2255
2257
  executionPlanDigest: `sha256:${string}`;
@@ -2270,6 +2272,7 @@ export declare const candidateExecutionEvidenceSchema: z.ZodObject<{
2270
2272
  reasoningTokens: number;
2271
2273
  modelCalls: number;
2272
2274
  costUsdNanos: number;
2275
+ costProvenance: "observed" | "estimated";
2273
2276
  };
2274
2277
  }, unknown, z.core.$ZodTypeInternals<{
2275
2278
  calls: {
@@ -2285,6 +2288,7 @@ export declare const candidateExecutionEvidenceSchema: z.ZodObject<{
2285
2288
  cachedInputTokens: number;
2286
2289
  reasoningTokens: number;
2287
2290
  costUsdNanos: number;
2291
+ costProvenance: "observed" | "estimated";
2288
2292
  }[];
2289
2293
  kind: "agent-candidate-model-settlement-material";
2290
2294
  executionPlanDigest: `sha256:${string}`;
@@ -2305,6 +2309,7 @@ export declare const candidateExecutionEvidenceSchema: z.ZodObject<{
2305
2309
  reasoningTokens: number;
2306
2310
  modelCalls: number;
2307
2311
  costUsdNanos: number;
2312
+ costProvenance: "observed" | "estimated";
2308
2313
  };
2309
2314
  }, unknown>>;
2310
2315
  artifact: z.ZodUnion<readonly [z.ZodObject<{
@@ -2611,6 +2616,7 @@ export declare const candidateExecutionEvidenceSchema: z.ZodObject<{
2611
2616
  reasoningTokens: number;
2612
2617
  modelCalls: number;
2613
2618
  costUsdNanos: number;
2619
+ costProvenance: "observed" | "estimated";
2614
2620
  };
2615
2621
  timing: {
2616
2622
  startedAtMs: number;
@@ -2669,6 +2675,7 @@ export declare const candidateExecutionEvidenceSchema: z.ZodObject<{
2669
2675
  reasoningTokens: number;
2670
2676
  modelCalls: number;
2671
2677
  costUsdNanos: number;
2678
+ costProvenance: "observed" | "estimated";
2672
2679
  };
2673
2680
  timing: {
2674
2681
  startedAtMs: number;
@@ -2852,12 +2859,37 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
2852
2859
  diff: z.ZodString;
2853
2860
  evaluation: z.ZodObject<{
2854
2861
  generationsExplored: z.ZodNumber;
2855
- searchDurationMs: z.ZodNumber;
2856
- executionDurationMs: z.ZodNumber;
2857
- durationMs: z.ZodNumber;
2858
- searchCostUsd: z.ZodNumber;
2859
- executionCostUsd: z.ZodNumber;
2860
- totalCostUsd: z.ZodNumber;
2862
+ preparation: z.ZodObject<{
2863
+ wallDurationMs: z.ZodNumber;
2864
+ cost: z.ZodObject<{
2865
+ usd: z.ZodNumber;
2866
+ provenance: z.ZodEnum<{
2867
+ observed: "observed";
2868
+ estimated: "estimated";
2869
+ }>;
2870
+ }, z.core.$strict>;
2871
+ }, z.core.$strict>;
2872
+ measurement: z.ZodObject<{
2873
+ wallDurationMs: z.ZodNumber;
2874
+ workDurationMs: z.ZodNumber;
2875
+ cost: z.ZodObject<{
2876
+ usd: z.ZodNumber;
2877
+ provenance: z.ZodEnum<{
2878
+ observed: "observed";
2879
+ estimated: "estimated";
2880
+ }>;
2881
+ }, z.core.$strict>;
2882
+ }, z.core.$strict>;
2883
+ total: z.ZodObject<{
2884
+ wallDurationMs: z.ZodNumber;
2885
+ cost: z.ZodObject<{
2886
+ usd: z.ZodNumber;
2887
+ provenance: z.ZodEnum<{
2888
+ observed: "observed";
2889
+ estimated: "estimated";
2890
+ }>;
2891
+ }, z.core.$strict>;
2892
+ }, z.core.$strict>;
2861
2893
  }, z.core.$strict>;
2862
2894
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<AgentCandidateJsonValue, AgentCandidateJsonValue>>>;
2863
2895
  kind: z.ZodLiteral<"agent-improvement-measured-comparison">;
@@ -4986,6 +5018,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
4986
5018
  endedAtMs: z.ZodNumber;
4987
5019
  durationMs: z.ZodNumber;
4988
5020
  }, z.core.$strict>;
5021
+ steps: z.ZodNumber;
4989
5022
  memory: z.ZodDiscriminatedUnion<[z.ZodObject<{
4990
5023
  mode: z.ZodLiteral<"disabled">;
4991
5024
  }, z.core.$strict>, z.ZodObject<{
@@ -5112,6 +5145,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
5112
5145
  cachedInputTokens: number;
5113
5146
  reasoningTokens: number;
5114
5147
  costUsdNanos: number;
5148
+ costProvenance: "observed" | "estimated";
5115
5149
  }[];
5116
5150
  kind: "agent-candidate-model-settlement-material";
5117
5151
  executionPlanDigest: `sha256:${string}`;
@@ -5132,6 +5166,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
5132
5166
  reasoningTokens: number;
5133
5167
  modelCalls: number;
5134
5168
  costUsdNanos: number;
5169
+ costProvenance: "observed" | "estimated";
5135
5170
  };
5136
5171
  }, unknown, z.core.$ZodTypeInternals<{
5137
5172
  calls: {
@@ -5147,6 +5182,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
5147
5182
  cachedInputTokens: number;
5148
5183
  reasoningTokens: number;
5149
5184
  costUsdNanos: number;
5185
+ costProvenance: "observed" | "estimated";
5150
5186
  }[];
5151
5187
  kind: "agent-candidate-model-settlement-material";
5152
5188
  executionPlanDigest: `sha256:${string}`;
@@ -5167,6 +5203,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
5167
5203
  reasoningTokens: number;
5168
5204
  modelCalls: number;
5169
5205
  costUsdNanos: number;
5206
+ costProvenance: "observed" | "estimated";
5170
5207
  };
5171
5208
  }, unknown>>;
5172
5209
  artifact: z.ZodUnion<readonly [z.ZodObject<{
@@ -5473,6 +5510,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
5473
5510
  reasoningTokens: number;
5474
5511
  modelCalls: number;
5475
5512
  costUsdNanos: number;
5513
+ costProvenance: "observed" | "estimated";
5476
5514
  };
5477
5515
  timing: {
5478
5516
  startedAtMs: number;
@@ -5531,6 +5569,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
5531
5569
  reasoningTokens: number;
5532
5570
  modelCalls: number;
5533
5571
  costUsdNanos: number;
5572
+ costProvenance: "observed" | "estimated";
5534
5573
  };
5535
5574
  timing: {
5536
5575
  startedAtMs: number;
@@ -6334,6 +6373,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
6334
6373
  endedAtMs: z.ZodNumber;
6335
6374
  durationMs: z.ZodNumber;
6336
6375
  }, z.core.$strict>;
6376
+ steps: z.ZodNumber;
6337
6377
  memory: z.ZodDiscriminatedUnion<[z.ZodObject<{
6338
6378
  mode: z.ZodLiteral<"disabled">;
6339
6379
  }, z.core.$strict>, z.ZodObject<{
@@ -6460,6 +6500,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
6460
6500
  cachedInputTokens: number;
6461
6501
  reasoningTokens: number;
6462
6502
  costUsdNanos: number;
6503
+ costProvenance: "observed" | "estimated";
6463
6504
  }[];
6464
6505
  kind: "agent-candidate-model-settlement-material";
6465
6506
  executionPlanDigest: `sha256:${string}`;
@@ -6480,6 +6521,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
6480
6521
  reasoningTokens: number;
6481
6522
  modelCalls: number;
6482
6523
  costUsdNanos: number;
6524
+ costProvenance: "observed" | "estimated";
6483
6525
  };
6484
6526
  }, unknown, z.core.$ZodTypeInternals<{
6485
6527
  calls: {
@@ -6495,6 +6537,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
6495
6537
  cachedInputTokens: number;
6496
6538
  reasoningTokens: number;
6497
6539
  costUsdNanos: number;
6540
+ costProvenance: "observed" | "estimated";
6498
6541
  }[];
6499
6542
  kind: "agent-candidate-model-settlement-material";
6500
6543
  executionPlanDigest: `sha256:${string}`;
@@ -6515,6 +6558,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
6515
6558
  reasoningTokens: number;
6516
6559
  modelCalls: number;
6517
6560
  costUsdNanos: number;
6561
+ costProvenance: "observed" | "estimated";
6518
6562
  };
6519
6563
  }, unknown>>;
6520
6564
  artifact: z.ZodUnion<readonly [z.ZodObject<{
@@ -6821,6 +6865,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
6821
6865
  reasoningTokens: number;
6822
6866
  modelCalls: number;
6823
6867
  costUsdNanos: number;
6868
+ costProvenance: "observed" | "estimated";
6824
6869
  };
6825
6870
  timing: {
6826
6871
  startedAtMs: number;
@@ -6879,6 +6924,7 @@ export declare const agentImprovementMeasuredComparisonSchema: z.ZodObject<{
6879
6924
  reasoningTokens: number;
6880
6925
  modelCalls: number;
6881
6926
  costUsdNanos: number;
6927
+ costProvenance: "observed" | "estimated";
6882
6928
  };
6883
6929
  timing: {
6884
6930
  startedAtMs: number;
@@ -7092,12 +7138,37 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
7092
7138
  diff: z.ZodString;
7093
7139
  evaluation: z.ZodObject<{
7094
7140
  generationsExplored: z.ZodNumber;
7095
- searchDurationMs: z.ZodNumber;
7096
- executionDurationMs: z.ZodNumber;
7097
- durationMs: z.ZodNumber;
7098
- searchCostUsd: z.ZodNumber;
7099
- executionCostUsd: z.ZodNumber;
7100
- totalCostUsd: z.ZodNumber;
7141
+ preparation: z.ZodObject<{
7142
+ wallDurationMs: z.ZodNumber;
7143
+ cost: z.ZodObject<{
7144
+ usd: z.ZodNumber;
7145
+ provenance: z.ZodEnum<{
7146
+ observed: "observed";
7147
+ estimated: "estimated";
7148
+ }>;
7149
+ }, z.core.$strict>;
7150
+ }, z.core.$strict>;
7151
+ measurement: z.ZodObject<{
7152
+ wallDurationMs: z.ZodNumber;
7153
+ workDurationMs: z.ZodNumber;
7154
+ cost: z.ZodObject<{
7155
+ usd: z.ZodNumber;
7156
+ provenance: z.ZodEnum<{
7157
+ observed: "observed";
7158
+ estimated: "estimated";
7159
+ }>;
7160
+ }, z.core.$strict>;
7161
+ }, z.core.$strict>;
7162
+ total: z.ZodObject<{
7163
+ wallDurationMs: z.ZodNumber;
7164
+ cost: z.ZodObject<{
7165
+ usd: z.ZodNumber;
7166
+ provenance: z.ZodEnum<{
7167
+ observed: "observed";
7168
+ estimated: "estimated";
7169
+ }>;
7170
+ }, z.core.$strict>;
7171
+ }, z.core.$strict>;
7101
7172
  }, z.core.$strict>;
7102
7173
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<AgentCandidateJsonValue, AgentCandidateJsonValue>>>;
7103
7174
  kind: z.ZodLiteral<"agent-improvement-measured-comparison">;
@@ -9226,6 +9297,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
9226
9297
  endedAtMs: z.ZodNumber;
9227
9298
  durationMs: z.ZodNumber;
9228
9299
  }, z.core.$strict>;
9300
+ steps: z.ZodNumber;
9229
9301
  memory: z.ZodDiscriminatedUnion<[z.ZodObject<{
9230
9302
  mode: z.ZodLiteral<"disabled">;
9231
9303
  }, z.core.$strict>, z.ZodObject<{
@@ -9352,6 +9424,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
9352
9424
  cachedInputTokens: number;
9353
9425
  reasoningTokens: number;
9354
9426
  costUsdNanos: number;
9427
+ costProvenance: "observed" | "estimated";
9355
9428
  }[];
9356
9429
  kind: "agent-candidate-model-settlement-material";
9357
9430
  executionPlanDigest: `sha256:${string}`;
@@ -9372,6 +9445,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
9372
9445
  reasoningTokens: number;
9373
9446
  modelCalls: number;
9374
9447
  costUsdNanos: number;
9448
+ costProvenance: "observed" | "estimated";
9375
9449
  };
9376
9450
  }, unknown, z.core.$ZodTypeInternals<{
9377
9451
  calls: {
@@ -9387,6 +9461,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
9387
9461
  cachedInputTokens: number;
9388
9462
  reasoningTokens: number;
9389
9463
  costUsdNanos: number;
9464
+ costProvenance: "observed" | "estimated";
9390
9465
  }[];
9391
9466
  kind: "agent-candidate-model-settlement-material";
9392
9467
  executionPlanDigest: `sha256:${string}`;
@@ -9407,6 +9482,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
9407
9482
  reasoningTokens: number;
9408
9483
  modelCalls: number;
9409
9484
  costUsdNanos: number;
9485
+ costProvenance: "observed" | "estimated";
9410
9486
  };
9411
9487
  }, unknown>>;
9412
9488
  artifact: z.ZodUnion<readonly [z.ZodObject<{
@@ -9713,6 +9789,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
9713
9789
  reasoningTokens: number;
9714
9790
  modelCalls: number;
9715
9791
  costUsdNanos: number;
9792
+ costProvenance: "observed" | "estimated";
9716
9793
  };
9717
9794
  timing: {
9718
9795
  startedAtMs: number;
@@ -9771,6 +9848,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
9771
9848
  reasoningTokens: number;
9772
9849
  modelCalls: number;
9773
9850
  costUsdNanos: number;
9851
+ costProvenance: "observed" | "estimated";
9774
9852
  };
9775
9853
  timing: {
9776
9854
  startedAtMs: number;
@@ -10574,6 +10652,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
10574
10652
  endedAtMs: z.ZodNumber;
10575
10653
  durationMs: z.ZodNumber;
10576
10654
  }, z.core.$strict>;
10655
+ steps: z.ZodNumber;
10577
10656
  memory: z.ZodDiscriminatedUnion<[z.ZodObject<{
10578
10657
  mode: z.ZodLiteral<"disabled">;
10579
10658
  }, z.core.$strict>, z.ZodObject<{
@@ -10700,6 +10779,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
10700
10779
  cachedInputTokens: number;
10701
10780
  reasoningTokens: number;
10702
10781
  costUsdNanos: number;
10782
+ costProvenance: "observed" | "estimated";
10703
10783
  }[];
10704
10784
  kind: "agent-candidate-model-settlement-material";
10705
10785
  executionPlanDigest: `sha256:${string}`;
@@ -10720,6 +10800,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
10720
10800
  reasoningTokens: number;
10721
10801
  modelCalls: number;
10722
10802
  costUsdNanos: number;
10803
+ costProvenance: "observed" | "estimated";
10723
10804
  };
10724
10805
  }, unknown, z.core.$ZodTypeInternals<{
10725
10806
  calls: {
@@ -10735,6 +10816,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
10735
10816
  cachedInputTokens: number;
10736
10817
  reasoningTokens: number;
10737
10818
  costUsdNanos: number;
10819
+ costProvenance: "observed" | "estimated";
10738
10820
  }[];
10739
10821
  kind: "agent-candidate-model-settlement-material";
10740
10822
  executionPlanDigest: `sha256:${string}`;
@@ -10755,6 +10837,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
10755
10837
  reasoningTokens: number;
10756
10838
  modelCalls: number;
10757
10839
  costUsdNanos: number;
10840
+ costProvenance: "observed" | "estimated";
10758
10841
  };
10759
10842
  }, unknown>>;
10760
10843
  artifact: z.ZodUnion<readonly [z.ZodObject<{
@@ -11061,6 +11144,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
11061
11144
  reasoningTokens: number;
11062
11145
  modelCalls: number;
11063
11146
  costUsdNanos: number;
11147
+ costProvenance: "observed" | "estimated";
11064
11148
  };
11065
11149
  timing: {
11066
11150
  startedAtMs: number;
@@ -11119,6 +11203,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
11119
11203
  reasoningTokens: number;
11120
11204
  modelCalls: number;
11121
11205
  costUsdNanos: number;
11206
+ costProvenance: "observed" | "estimated";
11122
11207
  };
11123
11208
  timing: {
11124
11209
  startedAtMs: number;
@@ -11303,12 +11388,37 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
11303
11388
  diff: z.ZodString;
11304
11389
  evaluation: z.ZodObject<{
11305
11390
  generationsExplored: z.ZodNumber;
11306
- searchDurationMs: z.ZodNumber;
11307
- executionDurationMs: z.ZodNumber;
11308
- durationMs: z.ZodNumber;
11309
- searchCostUsd: z.ZodNumber;
11310
- executionCostUsd: z.ZodNumber;
11311
- totalCostUsd: z.ZodNumber;
11391
+ preparation: z.ZodObject<{
11392
+ wallDurationMs: z.ZodNumber;
11393
+ cost: z.ZodObject<{
11394
+ usd: z.ZodNumber;
11395
+ provenance: z.ZodEnum<{
11396
+ observed: "observed";
11397
+ estimated: "estimated";
11398
+ }>;
11399
+ }, z.core.$strict>;
11400
+ }, z.core.$strict>;
11401
+ measurement: z.ZodObject<{
11402
+ wallDurationMs: z.ZodNumber;
11403
+ workDurationMs: z.ZodNumber;
11404
+ cost: z.ZodObject<{
11405
+ usd: z.ZodNumber;
11406
+ provenance: z.ZodEnum<{
11407
+ observed: "observed";
11408
+ estimated: "estimated";
11409
+ }>;
11410
+ }, z.core.$strict>;
11411
+ }, z.core.$strict>;
11412
+ total: z.ZodObject<{
11413
+ wallDurationMs: z.ZodNumber;
11414
+ cost: z.ZodObject<{
11415
+ usd: z.ZodNumber;
11416
+ provenance: z.ZodEnum<{
11417
+ observed: "observed";
11418
+ estimated: "estimated";
11419
+ }>;
11420
+ }, z.core.$strict>;
11421
+ }, z.core.$strict>;
11312
11422
  }, z.core.$strict>;
11313
11423
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodCustom<AgentCandidateJsonValue, AgentCandidateJsonValue>>>;
11314
11424
  kind: z.ZodLiteral<"agent-profile-improvement-measured-comparison">;
@@ -11321,6 +11431,11 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
11321
11431
  sourceDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
11322
11432
  sourceRevision: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
11323
11433
  }, z.core.$strict>;
11434
+ executionRef: z.ZodObject<{
11435
+ identity: z.ZodString;
11436
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
11437
+ kind: z.ZodLiteral<"agent-profile-improvement-execution-ref">;
11438
+ }, z.core.$strict>;
11324
11439
  baseline: z.ZodObject<{
11325
11440
  stateDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
11326
11441
  }, z.core.$strict>;
@@ -11472,6 +11587,11 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
11472
11587
  kind: z.ZodLiteral<"agent-profile-improvement-run">;
11473
11588
  digestAlgorithm: z.ZodLiteral<"rfc8785-sha256">;
11474
11589
  executionId: z.ZodString;
11590
+ executionRef: z.ZodObject<{
11591
+ identity: z.ZodString;
11592
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
11593
+ kind: z.ZodLiteral<"agent-profile-improvement-execution-ref">;
11594
+ }, z.core.$strict>;
11475
11595
  runCell: z.ZodObject<{
11476
11596
  kind: z.ZodLiteral<"agent-profile-improvement-run-cell">;
11477
11597
  experimentDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
@@ -11507,6 +11627,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
11507
11627
  endedAtMs: z.ZodNumber;
11508
11628
  durationMs: z.ZodNumber;
11509
11629
  }, z.core.$strict>;
11630
+ steps: z.ZodNumber;
11510
11631
  resolvedModel: z.ZodObject<{
11511
11632
  requested: z.ZodString;
11512
11633
  provider: z.ZodString;
@@ -11537,6 +11658,10 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
11537
11658
  reasoningTokens: z.ZodNumber;
11538
11659
  modelCalls: z.ZodNumber;
11539
11660
  costUsdNanos: z.ZodNumber;
11661
+ costProvenance: z.ZodEnum<{
11662
+ observed: "observed";
11663
+ estimated: "estimated";
11664
+ }>;
11540
11665
  }, z.core.$strict>;
11541
11666
  trace: z.ZodObject<{
11542
11667
  evidence: z.ZodObject<{
@@ -11596,6 +11721,10 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
11596
11721
  reasoningTokens: z.ZodNumber;
11597
11722
  modelCalls: z.ZodNumber;
11598
11723
  costUsdNanos: z.ZodNumber;
11724
+ costProvenance: z.ZodEnum<{
11725
+ observed: "observed";
11726
+ estimated: "estimated";
11727
+ }>;
11599
11728
  }, z.core.$strict>;
11600
11729
  score: z.ZodNumber;
11601
11730
  passed: z.ZodBoolean;
@@ -11610,6 +11739,11 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
11610
11739
  kind: z.ZodLiteral<"agent-profile-improvement-run">;
11611
11740
  digestAlgorithm: z.ZodLiteral<"rfc8785-sha256">;
11612
11741
  executionId: z.ZodString;
11742
+ executionRef: z.ZodObject<{
11743
+ identity: z.ZodString;
11744
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
11745
+ kind: z.ZodLiteral<"agent-profile-improvement-execution-ref">;
11746
+ }, z.core.$strict>;
11613
11747
  runCell: z.ZodObject<{
11614
11748
  kind: z.ZodLiteral<"agent-profile-improvement-run-cell">;
11615
11749
  experimentDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
@@ -11645,6 +11779,7 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
11645
11779
  endedAtMs: z.ZodNumber;
11646
11780
  durationMs: z.ZodNumber;
11647
11781
  }, z.core.$strict>;
11782
+ steps: z.ZodNumber;
11648
11783
  resolvedModel: z.ZodObject<{
11649
11784
  requested: z.ZodString;
11650
11785
  provider: z.ZodString;
@@ -11675,6 +11810,10 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
11675
11810
  reasoningTokens: z.ZodNumber;
11676
11811
  modelCalls: z.ZodNumber;
11677
11812
  costUsdNanos: z.ZodNumber;
11813
+ costProvenance: z.ZodEnum<{
11814
+ observed: "observed";
11815
+ estimated: "estimated";
11816
+ }>;
11678
11817
  }, z.core.$strict>;
11679
11818
  trace: z.ZodObject<{
11680
11819
  evidence: z.ZodObject<{
@@ -11734,6 +11873,10 @@ export declare const agentImprovementProposalSchema: z.ZodObject<{
11734
11873
  reasoningTokens: z.ZodNumber;
11735
11874
  modelCalls: z.ZodNumber;
11736
11875
  costUsdNanos: z.ZodNumber;
11876
+ costProvenance: z.ZodEnum<{
11877
+ observed: "observed";
11878
+ estimated: "estimated";
11879
+ }>;
11737
11880
  }, z.core.$strict>;
11738
11881
  score: z.ZodNumber;
11739
11882
  passed: z.ZodBoolean;
@@ -11768,6 +11911,11 @@ export declare const agentImprovementActivationSchema: z.ZodObject<{
11768
11911
  reviewDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
11769
11912
  experimentDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
11770
11913
  candidateDigest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
11914
+ executionRef: z.ZodOptional<z.ZodObject<{
11915
+ identity: z.ZodString;
11916
+ digest: z.ZodType<`sha256:${string}`, unknown, z.core.$ZodTypeInternals<`sha256:${string}`, unknown>>;
11917
+ kind: z.ZodLiteral<"agent-profile-improvement-execution-ref">;
11918
+ }, z.core.$strict>>;
11771
11919
  intent: z.ZodEnum<{
11772
11920
  "activate-candidate": "activate-candidate";
11773
11921
  "restore-baseline": "restore-baseline";