@sorbetai/runtime 0.1.0-alpha.17 → 0.1.0-alpha.18

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.
@@ -1,7 +1,7 @@
1
1
  import * as s from "@earendil-works/pi-schema";
2
- import * as _sorbetai_schema32 from "@sorbetai/schema";
3
- import * as _sorbetai_context3 from "@sorbetai/context";
2
+ import * as _sorbetai_context4 from "@sorbetai/context";
4
3
  import { JsonValue as JsonValue$1, JsonValueSchema, ToolDeclaration } from "@sorbetai/context";
4
+ import * as _sorbetai_schema56 from "@sorbetai/schema";
5
5
  import { PreparedToolHooks } from "@sorbetai/plugins/model";
6
6
 
7
7
  //#region src/journal/contracts.d.ts
@@ -53,7 +53,7 @@ declare const CompleteModelInputSchema: s.Schema<{
53
53
  type: "toolCall";
54
54
  id: string;
55
55
  name: string;
56
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
56
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
57
57
  thoughtSignature?: string | undefined;
58
58
  argumentsError?: string | undefined;
59
59
  })[];
@@ -90,7 +90,7 @@ declare const CompleteModelInputSchema: s.Schema<{
90
90
  stack?: string | undefined;
91
91
  code?: string | number | undefined;
92
92
  } | undefined;
93
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
93
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
94
94
  }[] | undefined;
95
95
  deferred?: {
96
96
  provider: string;
@@ -99,7 +99,7 @@ declare const CompleteModelInputSchema: s.Schema<{
99
99
  id: string;
100
100
  expiresAt?: number | undefined;
101
101
  pollAfterMs?: number | undefined;
102
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
102
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
103
103
  } | undefined;
104
104
  errorMessage?: string | undefined;
105
105
  rawStopReason?: string | undefined;
@@ -122,7 +122,7 @@ declare const CompleteModelInputSchema: s.Schema<{
122
122
  })[];
123
123
  isError: boolean;
124
124
  timestamp: number;
125
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
125
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
126
126
  usage?: {
127
127
  input: number;
128
128
  output: number;
@@ -156,7 +156,7 @@ declare const CompleteModelInputSchema: s.Schema<{
156
156
  }>;
157
157
  declare const SessionInputSourceSchema: s.Schema<{
158
158
  kind: string;
159
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
159
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
160
160
  }>;
161
161
  /** Durable admission provenance and optional non-secret correlation data. */
162
162
  type SessionInputSource = Readonly<s.Static<typeof SessionInputSourceSchema>>;
@@ -171,7 +171,7 @@ declare const CompletedToolResultSchema: s.Schema<{
171
171
  data: string;
172
172
  mimeType: string;
173
173
  })[];
174
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
174
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
175
175
  usage?: {
176
176
  input: number;
177
177
  output: number;
@@ -191,7 +191,7 @@ declare const CompletedToolResultSchema: s.Schema<{
191
191
  } | undefined;
192
192
  terminate?: boolean | undefined;
193
193
  isError?: boolean | undefined;
194
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
194
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
195
195
  }>;
196
196
  declare const ToolOutputArchiveRecordSchema: s.Schema<{
197
197
  encoding: "utf-8";
@@ -227,7 +227,7 @@ declare const SessionForkedPayloadSchema: s.Schema<{
227
227
  };
228
228
  source: {
229
229
  kind: string;
230
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
230
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
231
231
  };
232
232
  } | {
233
233
  runId: string;
@@ -248,7 +248,7 @@ declare const SessionForkedPayloadSchema: s.Schema<{
248
248
  type: "toolCall";
249
249
  id: string;
250
250
  name: string;
251
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
251
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
252
252
  thoughtSignature?: string | undefined;
253
253
  argumentsError?: string | undefined;
254
254
  })[];
@@ -285,7 +285,7 @@ declare const SessionForkedPayloadSchema: s.Schema<{
285
285
  stack?: string | undefined;
286
286
  code?: string | number | undefined;
287
287
  } | undefined;
288
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
288
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
289
289
  }[] | undefined;
290
290
  deferred?: {
291
291
  provider: string;
@@ -294,7 +294,7 @@ declare const SessionForkedPayloadSchema: s.Schema<{
294
294
  id: string;
295
295
  expiresAt?: number | undefined;
296
296
  pollAfterMs?: number | undefined;
297
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
297
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
298
298
  } | undefined;
299
299
  errorMessage?: string | undefined;
300
300
  rawStopReason?: string | undefined;
@@ -317,7 +317,7 @@ declare const SessionForkedPayloadSchema: s.Schema<{
317
317
  })[];
318
318
  isError: boolean;
319
319
  timestamp: number;
320
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
320
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
321
321
  usage?: {
322
322
  input: number;
323
323
  output: number;
@@ -347,6 +347,20 @@ declare const SessionForkedPayloadSchema: s.Schema<{
347
347
  };
348
348
  }[] | undefined;
349
349
  }>;
350
+ /**
351
+ * The named-state element delivered to the model as of a compaction cut. Reconstruction
352
+ * re-emits it without replaying pre-cut context frames; frames after the cut apply on top.
353
+ */
354
+ declare const CompactionStateBaselineEntrySchema: s.Schema<{
355
+ stateName: string;
356
+ revision: number;
357
+ value: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
358
+ frame: {
359
+ role: "user";
360
+ content: string;
361
+ };
362
+ itemKey?: string | undefined;
363
+ }>;
350
364
  declare const ModelRequestBaseCommittedPayloadSchema: s.Schema<{
351
365
  requestBaseId: string;
352
366
  pluginBindings: {
@@ -356,9 +370,9 @@ declare const ModelRequestBaseCommittedPayloadSchema: s.Schema<{
356
370
  contributionId: string;
357
371
  name: string;
358
372
  description: string;
359
- parameters: Record<string, _sorbetai_schema32.JsonValue>;
373
+ parameters: Record<string, _sorbetai_schema56.JsonValue>;
360
374
  label?: string | undefined;
361
- outputSchema?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
375
+ outputSchema?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
362
376
  discovery?: {
363
377
  exposure?: "direct" | "deferred" | "hidden" | undefined;
364
378
  namespace?: {
@@ -366,7 +380,7 @@ declare const ModelRequestBaseCommittedPayloadSchema: s.Schema<{
366
380
  description?: string | undefined;
367
381
  } | undefined;
368
382
  } | undefined;
369
- metadata?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
383
+ metadata?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
370
384
  }[];
371
385
  runYield?: {
372
386
  bindingId: string;
@@ -384,7 +398,7 @@ declare const ModelRequestBaseCommittedPayloadSchema: s.Schema<{
384
398
  namedStates?: {
385
399
  contributionId: string;
386
400
  stateName: string;
387
- schema: Record<string, _sorbetai_schema32.JsonValue>;
401
+ schema: Record<string, _sorbetai_schema56.JsonValue>;
388
402
  itemKey?: string | undefined;
389
403
  }[] | undefined;
390
404
  prefixes?: {
@@ -401,11 +415,11 @@ declare const ModelRequestBaseCommittedPayloadSchema: s.Schema<{
401
415
  contributionId: string;
402
416
  name: string;
403
417
  title: string;
404
- stateSchema: Record<string, _sorbetai_schema32.JsonValue>;
405
- initialState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
418
+ stateSchema: Record<string, _sorbetai_schema56.JsonValue>;
419
+ initialState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
406
420
  initialView?: {
407
421
  active: boolean;
408
- contextState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
422
+ contextState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
409
423
  constraints?: {
410
424
  toolNames: string[];
411
425
  workspace?: "read-only" | undefined;
@@ -522,7 +536,7 @@ declare const ModelRequestContextSnapshotSchema: s.Schema<{
522
536
  };
523
537
  namedStates: ({
524
538
  present: true;
525
- value: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
539
+ value: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
526
540
  stateName: string;
527
541
  revision: number;
528
542
  delivery: {
@@ -601,7 +615,7 @@ declare const ModelRequestContextSnapshotSchema: s.Schema<{
601
615
  kind: "container";
602
616
  name: string;
603
617
  attributes?: Record<string, string | number>;
604
- children: _sorbetai_context3.ContextXmlElement[];
618
+ children: _sorbetai_context4.ContextXmlElement[];
605
619
  };
606
620
  sourceId: string;
607
621
  provenance: {
@@ -609,7 +623,7 @@ declare const ModelRequestContextSnapshotSchema: s.Schema<{
609
623
  label: string;
610
624
  location?: string | undefined;
611
625
  };
612
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
626
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
613
627
  })[];
614
628
  delivery: {
615
629
  kind: "append";
@@ -666,7 +680,7 @@ declare const ModelRequestContextSnapshotSchema: s.Schema<{
666
680
  location?: string | undefined;
667
681
  };
668
682
  placement?: "before-conversation" | undefined;
669
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
683
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
670
684
  }[];
671
685
  afterMessageCount: number;
672
686
  modelView?: {
@@ -724,7 +738,7 @@ declare const ModelRequestContextSnapshotSchema: s.Schema<{
724
738
  type: "toolCall";
725
739
  id: string;
726
740
  name: string;
727
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
741
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
728
742
  thoughtSignature?: string | undefined;
729
743
  argumentsError?: string | undefined;
730
744
  })[];
@@ -761,7 +775,7 @@ declare const ModelRequestContextSnapshotSchema: s.Schema<{
761
775
  stack?: string | undefined;
762
776
  code?: string | number | undefined;
763
777
  } | undefined;
764
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
778
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
765
779
  }[] | undefined;
766
780
  deferred?: {
767
781
  provider: string;
@@ -770,7 +784,7 @@ declare const ModelRequestContextSnapshotSchema: s.Schema<{
770
784
  id: string;
771
785
  expiresAt?: number | undefined;
772
786
  pollAfterMs?: number | undefined;
773
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
787
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
774
788
  } | undefined;
775
789
  errorMessage?: string | undefined;
776
790
  rawStopReason?: string | undefined;
@@ -793,7 +807,7 @@ declare const ModelRequestContextSnapshotSchema: s.Schema<{
793
807
  })[];
794
808
  isError: boolean;
795
809
  timestamp: number;
796
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
810
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
797
811
  usage?: {
798
812
  input: number;
799
813
  output: number;
@@ -815,7 +829,7 @@ declare const ModelRequestContextSnapshotSchema: s.Schema<{
815
829
  })[] | undefined;
816
830
  } | undefined;
817
831
  }>;
818
- declare const RunFailureCodeSchema: s.Schema<"harness_interrupted" | "journal_error" | "model_aborted" | "model_unavailable" | "model_error" | "model_invalid_response" | "runtime_error" | "tool_boundary_error">;
832
+ declare const RunFailureCodeSchema: s.Schema<"model_error" | "harness_interrupted" | "journal_error" | "model_aborted" | "model_unavailable" | "model_invalid_response" | "runtime_error" | "tool_boundary_error">;
819
833
  declare const ContextForkSeedSchema: s.Schema<{
820
834
  schemaVersion: 2;
821
835
  source: {
@@ -899,7 +913,7 @@ declare const ContextForkSeedSchema: s.Schema<{
899
913
  type: "toolCall";
900
914
  id: string;
901
915
  name: string;
902
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
916
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
903
917
  thoughtSignature?: string | undefined;
904
918
  argumentsError?: string | undefined;
905
919
  })[];
@@ -936,7 +950,7 @@ declare const ContextForkSeedSchema: s.Schema<{
936
950
  stack?: string | undefined;
937
951
  code?: string | number | undefined;
938
952
  } | undefined;
939
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
953
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
940
954
  }[] | undefined;
941
955
  deferred?: {
942
956
  provider: string;
@@ -945,7 +959,7 @@ declare const ContextForkSeedSchema: s.Schema<{
945
959
  id: string;
946
960
  expiresAt?: number | undefined;
947
961
  pollAfterMs?: number | undefined;
948
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
962
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
949
963
  } | undefined;
950
964
  errorMessage?: string | undefined;
951
965
  rawStopReason?: string | undefined;
@@ -968,7 +982,7 @@ declare const ContextForkSeedSchema: s.Schema<{
968
982
  })[];
969
983
  isError: boolean;
970
984
  timestamp: number;
971
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
985
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
972
986
  usage?: {
973
987
  input: number;
974
988
  output: number;
@@ -1014,7 +1028,7 @@ declare const EffectUnknownPayloadSchema: s.Schema<{
1014
1028
  text: string;
1015
1029
  textSignature?: string | undefined;
1016
1030
  }[];
1017
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1031
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1018
1032
  } | undefined;
1019
1033
  outputArchive?: {
1020
1034
  encoding: "utf-8";
@@ -1058,7 +1072,7 @@ declare const ToolResultMessageCommittedPayloadSchema: s.Schema<{
1058
1072
  })[];
1059
1073
  isError: boolean;
1060
1074
  timestamp: number;
1061
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1075
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1062
1076
  usage?: {
1063
1077
  input: number;
1064
1078
  output: number;
@@ -1116,7 +1130,7 @@ declare const ToolResultMessageCommittedPayloadSchema: s.Schema<{
1116
1130
  })[];
1117
1131
  isError: boolean;
1118
1132
  timestamp: number;
1119
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1133
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1120
1134
  usage?: {
1121
1135
  input: number;
1122
1136
  output: number;
@@ -1163,7 +1177,7 @@ declare const SendSessionInputVariants: readonly [s.Schema<{
1163
1177
  })[];
1164
1178
  source: {
1165
1179
  kind: string;
1166
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1180
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1167
1181
  };
1168
1182
  }>, s.Schema<{
1169
1183
  kind: "context-event";
@@ -1215,7 +1229,7 @@ declare const SendSessionInputVariants: readonly [s.Schema<{
1215
1229
  kind: "container";
1216
1230
  name: string;
1217
1231
  attributes?: Record<string, string | number>;
1218
- children: _sorbetai_context3.ContextXmlElement[];
1232
+ children: _sorbetai_context4.ContextXmlElement[];
1219
1233
  };
1220
1234
  sourceId: string;
1221
1235
  provenance: {
@@ -1223,11 +1237,11 @@ declare const SendSessionInputVariants: readonly [s.Schema<{
1223
1237
  label: string;
1224
1238
  location?: string | undefined;
1225
1239
  };
1226
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1240
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1227
1241
  })[];
1228
1242
  source: {
1229
1243
  kind: string;
1230
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1244
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1231
1245
  };
1232
1246
  }>];
1233
1247
  declare const SendSessionInputSchema: s.Schema<{
@@ -1244,7 +1258,7 @@ declare const SendSessionInputSchema: s.Schema<{
1244
1258
  })[];
1245
1259
  source: {
1246
1260
  kind: string;
1247
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1261
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1248
1262
  };
1249
1263
  } | {
1250
1264
  kind: "context-event";
@@ -1296,7 +1310,7 @@ declare const SendSessionInputSchema: s.Schema<{
1296
1310
  kind: "container";
1297
1311
  name: string;
1298
1312
  attributes?: Record<string, string | number>;
1299
- children: _sorbetai_context3.ContextXmlElement[];
1313
+ children: _sorbetai_context4.ContextXmlElement[];
1300
1314
  };
1301
1315
  sourceId: string;
1302
1316
  provenance: {
@@ -1304,11 +1318,11 @@ declare const SendSessionInputSchema: s.Schema<{
1304
1318
  label: string;
1305
1319
  location?: string | undefined;
1306
1320
  };
1307
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1321
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1308
1322
  })[];
1309
1323
  source: {
1310
1324
  kind: string;
1311
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1325
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1312
1326
  };
1313
1327
  }>;
1314
1328
  declare const SubmissionControlInputSchema: s.Schema<{
@@ -1317,14 +1331,14 @@ declare const SubmissionControlInputSchema: s.Schema<{
1317
1331
  text: string;
1318
1332
  source: {
1319
1333
  kind: string;
1320
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1334
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1321
1335
  };
1322
1336
  } | {
1323
1337
  kind: "reset";
1324
1338
  deliveryId: string;
1325
1339
  source: {
1326
1340
  kind: string;
1327
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1341
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1328
1342
  };
1329
1343
  }>;
1330
1344
  declare const SubmissionInputSchema: s.Schema<{
@@ -1341,7 +1355,7 @@ declare const SubmissionInputSchema: s.Schema<{
1341
1355
  })[];
1342
1356
  source: {
1343
1357
  kind: string;
1344
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1358
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1345
1359
  };
1346
1360
  } | {
1347
1361
  kind: "context-event";
@@ -1393,7 +1407,7 @@ declare const SubmissionInputSchema: s.Schema<{
1393
1407
  kind: "container";
1394
1408
  name: string;
1395
1409
  attributes?: Record<string, string | number>;
1396
- children: _sorbetai_context3.ContextXmlElement[];
1410
+ children: _sorbetai_context4.ContextXmlElement[];
1397
1411
  };
1398
1412
  sourceId: string;
1399
1413
  provenance: {
@@ -1401,11 +1415,11 @@ declare const SubmissionInputSchema: s.Schema<{
1401
1415
  label: string;
1402
1416
  location?: string | undefined;
1403
1417
  };
1404
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1418
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1405
1419
  })[];
1406
1420
  source: {
1407
1421
  kind: string;
1408
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1422
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1409
1423
  };
1410
1424
  } | {
1411
1425
  kind: "write";
@@ -1413,14 +1427,14 @@ declare const SubmissionInputSchema: s.Schema<{
1413
1427
  text: string;
1414
1428
  source: {
1415
1429
  kind: string;
1416
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1430
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1417
1431
  };
1418
1432
  } | {
1419
1433
  kind: "reset";
1420
1434
  deliveryId: string;
1421
1435
  source: {
1422
1436
  kind: string;
1423
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1437
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1424
1438
  };
1425
1439
  }>;
1426
1440
  declare const SessionFactDefinitions: readonly [{
@@ -1440,7 +1454,7 @@ declare const SessionFactDefinitions: readonly [{
1440
1454
  })[];
1441
1455
  source: {
1442
1456
  kind: string;
1443
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1457
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1444
1458
  };
1445
1459
  } | {
1446
1460
  kind: "context-event";
@@ -1492,7 +1506,7 @@ declare const SessionFactDefinitions: readonly [{
1492
1506
  kind: "container";
1493
1507
  name: string;
1494
1508
  attributes?: Record<string, string | number>;
1495
- children: _sorbetai_context3.ContextXmlElement[];
1509
+ children: _sorbetai_context4.ContextXmlElement[];
1496
1510
  };
1497
1511
  sourceId: string;
1498
1512
  provenance: {
@@ -1500,11 +1514,11 @@ declare const SessionFactDefinitions: readonly [{
1500
1514
  label: string;
1501
1515
  location?: string | undefined;
1502
1516
  };
1503
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1517
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1504
1518
  })[];
1505
1519
  source: {
1506
1520
  kind: string;
1507
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1521
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1508
1522
  };
1509
1523
  } | {
1510
1524
  kind: "write";
@@ -1512,14 +1526,14 @@ declare const SessionFactDefinitions: readonly [{
1512
1526
  text: string;
1513
1527
  source: {
1514
1528
  kind: string;
1515
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1529
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1516
1530
  };
1517
1531
  } | {
1518
1532
  kind: "reset";
1519
1533
  deliveryId: string;
1520
1534
  source: {
1521
1535
  kind: string;
1522
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1536
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1523
1537
  };
1524
1538
  };
1525
1539
  whenBusy: "followUp" | "steer";
@@ -1654,7 +1668,7 @@ declare const SessionFactDefinitions: readonly [{
1654
1668
  type: "toolCall";
1655
1669
  id: string;
1656
1670
  name: string;
1657
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
1671
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
1658
1672
  thoughtSignature?: string | undefined;
1659
1673
  argumentsError?: string | undefined;
1660
1674
  })[];
@@ -1691,7 +1705,7 @@ declare const SessionFactDefinitions: readonly [{
1691
1705
  stack?: string | undefined;
1692
1706
  code?: string | number | undefined;
1693
1707
  } | undefined;
1694
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
1708
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
1695
1709
  }[] | undefined;
1696
1710
  deferred?: {
1697
1711
  provider: string;
@@ -1700,7 +1714,7 @@ declare const SessionFactDefinitions: readonly [{
1700
1714
  id: string;
1701
1715
  expiresAt?: number | undefined;
1702
1716
  pollAfterMs?: number | undefined;
1703
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1717
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1704
1718
  } | undefined;
1705
1719
  errorMessage?: string | undefined;
1706
1720
  rawStopReason?: string | undefined;
@@ -1723,7 +1737,7 @@ declare const SessionFactDefinitions: readonly [{
1723
1737
  })[];
1724
1738
  isError: boolean;
1725
1739
  timestamp: number;
1726
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1740
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1727
1741
  usage?: {
1728
1742
  input: number;
1729
1743
  output: number;
@@ -1774,7 +1788,7 @@ declare const SessionFactDefinitions: readonly [{
1774
1788
  })[];
1775
1789
  source: {
1776
1790
  kind: string;
1777
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1791
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1778
1792
  };
1779
1793
  } | {
1780
1794
  kind: "context-event";
@@ -1826,7 +1840,7 @@ declare const SessionFactDefinitions: readonly [{
1826
1840
  kind: "container";
1827
1841
  name: string;
1828
1842
  attributes?: Record<string, string | number>;
1829
- children: _sorbetai_context3.ContextXmlElement[];
1843
+ children: _sorbetai_context4.ContextXmlElement[];
1830
1844
  };
1831
1845
  sourceId: string;
1832
1846
  provenance: {
@@ -1834,11 +1848,11 @@ declare const SessionFactDefinitions: readonly [{
1834
1848
  label: string;
1835
1849
  location?: string | undefined;
1836
1850
  };
1837
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1851
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1838
1852
  })[];
1839
1853
  source: {
1840
1854
  kind: string;
1841
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1855
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1842
1856
  };
1843
1857
  } | {
1844
1858
  kind: "write";
@@ -1846,14 +1860,14 @@ declare const SessionFactDefinitions: readonly [{
1846
1860
  text: string;
1847
1861
  source: {
1848
1862
  kind: string;
1849
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1863
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1850
1864
  };
1851
1865
  } | {
1852
1866
  kind: "reset";
1853
1867
  deliveryId: string;
1854
1868
  source: {
1855
1869
  kind: string;
1856
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
1870
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
1857
1871
  };
1858
1872
  };
1859
1873
  whenBusy: "followUp" | "steer";
@@ -1988,7 +2002,7 @@ declare const SessionFactDefinitions: readonly [{
1988
2002
  type: "toolCall";
1989
2003
  id: string;
1990
2004
  name: string;
1991
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
2005
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
1992
2006
  thoughtSignature?: string | undefined;
1993
2007
  argumentsError?: string | undefined;
1994
2008
  })[];
@@ -2025,7 +2039,7 @@ declare const SessionFactDefinitions: readonly [{
2025
2039
  stack?: string | undefined;
2026
2040
  code?: string | number | undefined;
2027
2041
  } | undefined;
2028
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
2042
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
2029
2043
  }[] | undefined;
2030
2044
  deferred?: {
2031
2045
  provider: string;
@@ -2034,7 +2048,7 @@ declare const SessionFactDefinitions: readonly [{
2034
2048
  id: string;
2035
2049
  expiresAt?: number | undefined;
2036
2050
  pollAfterMs?: number | undefined;
2037
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2051
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2038
2052
  } | undefined;
2039
2053
  errorMessage?: string | undefined;
2040
2054
  rawStopReason?: string | undefined;
@@ -2057,7 +2071,7 @@ declare const SessionFactDefinitions: readonly [{
2057
2071
  })[];
2058
2072
  isError: boolean;
2059
2073
  timestamp: number;
2060
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2074
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2061
2075
  usage?: {
2062
2076
  input: number;
2063
2077
  output: number;
@@ -2094,7 +2108,7 @@ declare const SessionFactDefinitions: readonly [{
2094
2108
  kind: "submission.applied";
2095
2109
  payload: s.Schema<{
2096
2110
  kind: "write" | "reset";
2097
- boundary: "final" | "immediate";
2111
+ boundary: "immediate" | "final";
2098
2112
  order: number;
2099
2113
  }>;
2100
2114
  schema: s.Schema<{
@@ -2103,7 +2117,7 @@ declare const SessionFactDefinitions: readonly [{
2103
2117
  kind: "submission.applied";
2104
2118
  payload: {
2105
2119
  kind: "write" | "reset";
2106
- boundary: "final" | "immediate";
2120
+ boundary: "immediate" | "final";
2107
2121
  order: number;
2108
2122
  };
2109
2123
  }>;
@@ -2149,7 +2163,7 @@ declare const SessionFactDefinitions: readonly [{
2149
2163
  } | {
2150
2164
  runId: string;
2151
2165
  outcome: "unanswered";
2152
- reason: "failed" | "cancelled" | "interrupted" | "model_error";
2166
+ reason: "failed" | "model_error" | "cancelled" | "interrupted";
2153
2167
  }>;
2154
2168
  schema: s.Schema<{
2155
2169
  sessionId: string;
@@ -2161,7 +2175,7 @@ declare const SessionFactDefinitions: readonly [{
2161
2175
  } | {
2162
2176
  runId: string;
2163
2177
  outcome: "unanswered";
2164
- reason: "failed" | "cancelled" | "interrupted" | "model_error";
2178
+ reason: "failed" | "model_error" | "cancelled" | "interrupted";
2165
2179
  };
2166
2180
  }>;
2167
2181
  }, {
@@ -2170,7 +2184,7 @@ declare const SessionFactDefinitions: readonly [{
2170
2184
  requestId: string;
2171
2185
  source: {
2172
2186
  kind: string;
2173
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2187
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2174
2188
  };
2175
2189
  model: {
2176
2190
  provider: string;
@@ -2224,7 +2238,7 @@ declare const SessionFactDefinitions: readonly [{
2224
2238
  type: "toolCall";
2225
2239
  id: string;
2226
2240
  name: string;
2227
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
2241
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
2228
2242
  thoughtSignature?: string | undefined;
2229
2243
  argumentsError?: string | undefined;
2230
2244
  })[];
@@ -2261,7 +2275,7 @@ declare const SessionFactDefinitions: readonly [{
2261
2275
  stack?: string | undefined;
2262
2276
  code?: string | number | undefined;
2263
2277
  } | undefined;
2264
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
2278
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
2265
2279
  }[] | undefined;
2266
2280
  deferred?: {
2267
2281
  provider: string;
@@ -2270,7 +2284,7 @@ declare const SessionFactDefinitions: readonly [{
2270
2284
  id: string;
2271
2285
  expiresAt?: number | undefined;
2272
2286
  pollAfterMs?: number | undefined;
2273
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2287
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2274
2288
  } | undefined;
2275
2289
  errorMessage?: string | undefined;
2276
2290
  rawStopReason?: string | undefined;
@@ -2293,7 +2307,7 @@ declare const SessionFactDefinitions: readonly [{
2293
2307
  })[];
2294
2308
  isError: boolean;
2295
2309
  timestamp: number;
2296
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2310
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2297
2311
  usage?: {
2298
2312
  input: number;
2299
2313
  output: number;
@@ -2329,7 +2343,7 @@ declare const SessionFactDefinitions: readonly [{
2329
2343
  requestId: string;
2330
2344
  source: {
2331
2345
  kind: string;
2332
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2346
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2333
2347
  };
2334
2348
  model: {
2335
2349
  provider: string;
@@ -2383,7 +2397,7 @@ declare const SessionFactDefinitions: readonly [{
2383
2397
  type: "toolCall";
2384
2398
  id: string;
2385
2399
  name: string;
2386
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
2400
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
2387
2401
  thoughtSignature?: string | undefined;
2388
2402
  argumentsError?: string | undefined;
2389
2403
  })[];
@@ -2420,7 +2434,7 @@ declare const SessionFactDefinitions: readonly [{
2420
2434
  stack?: string | undefined;
2421
2435
  code?: string | number | undefined;
2422
2436
  } | undefined;
2423
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
2437
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
2424
2438
  }[] | undefined;
2425
2439
  deferred?: {
2426
2440
  provider: string;
@@ -2429,7 +2443,7 @@ declare const SessionFactDefinitions: readonly [{
2429
2443
  id: string;
2430
2444
  expiresAt?: number | undefined;
2431
2445
  pollAfterMs?: number | undefined;
2432
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2446
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2433
2447
  } | undefined;
2434
2448
  errorMessage?: string | undefined;
2435
2449
  rawStopReason?: string | undefined;
@@ -2452,7 +2466,7 @@ declare const SessionFactDefinitions: readonly [{
2452
2466
  })[];
2453
2467
  isError: boolean;
2454
2468
  timestamp: number;
2455
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2469
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2456
2470
  usage?: {
2457
2471
  input: number;
2458
2472
  output: number;
@@ -2500,7 +2514,7 @@ declare const SessionFactDefinitions: readonly [{
2500
2514
  type: "toolCall";
2501
2515
  id: string;
2502
2516
  name: string;
2503
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
2517
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
2504
2518
  thoughtSignature?: string | undefined;
2505
2519
  argumentsError?: string | undefined;
2506
2520
  })[];
@@ -2537,7 +2551,7 @@ declare const SessionFactDefinitions: readonly [{
2537
2551
  stack?: string | undefined;
2538
2552
  code?: string | number | undefined;
2539
2553
  } | undefined;
2540
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
2554
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
2541
2555
  }[] | undefined;
2542
2556
  deferred?: {
2543
2557
  provider: string;
@@ -2546,7 +2560,7 @@ declare const SessionFactDefinitions: readonly [{
2546
2560
  id: string;
2547
2561
  expiresAt?: number | undefined;
2548
2562
  pollAfterMs?: number | undefined;
2549
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2563
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2550
2564
  } | undefined;
2551
2565
  errorMessage?: string | undefined;
2552
2566
  rawStopReason?: string | undefined;
@@ -2577,7 +2591,7 @@ declare const SessionFactDefinitions: readonly [{
2577
2591
  type: "toolCall";
2578
2592
  id: string;
2579
2593
  name: string;
2580
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
2594
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
2581
2595
  thoughtSignature?: string | undefined;
2582
2596
  argumentsError?: string | undefined;
2583
2597
  })[];
@@ -2614,7 +2628,7 @@ declare const SessionFactDefinitions: readonly [{
2614
2628
  stack?: string | undefined;
2615
2629
  code?: string | number | undefined;
2616
2630
  } | undefined;
2617
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
2631
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
2618
2632
  }[] | undefined;
2619
2633
  deferred?: {
2620
2634
  provider: string;
@@ -2623,7 +2637,7 @@ declare const SessionFactDefinitions: readonly [{
2623
2637
  id: string;
2624
2638
  expiresAt?: number | undefined;
2625
2639
  pollAfterMs?: number | undefined;
2626
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2640
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2627
2641
  } | undefined;
2628
2642
  errorMessage?: string | undefined;
2629
2643
  rawStopReason?: string | undefined;
@@ -2657,10 +2671,10 @@ declare const SessionFactDefinitions: readonly [{
2657
2671
  activationId?: string | undefined;
2658
2672
  };
2659
2673
  revision: number;
2660
- data: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
2661
- sourceSequence: number;
2674
+ data: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
2662
2675
  recordType: string;
2663
2676
  recordVersion: number;
2677
+ sourceSequence: number;
2664
2678
  idempotencyKey?: string | undefined;
2665
2679
  }>;
2666
2680
  schema: s.Schema<{
@@ -2673,10 +2687,10 @@ declare const SessionFactDefinitions: readonly [{
2673
2687
  activationId?: string | undefined;
2674
2688
  };
2675
2689
  revision: number;
2676
- data: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
2677
- sourceSequence: number;
2690
+ data: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
2678
2691
  recordType: string;
2679
2692
  recordVersion: number;
2693
+ sourceSequence: number;
2680
2694
  idempotencyKey?: string | undefined;
2681
2695
  };
2682
2696
  }>;
@@ -2685,15 +2699,15 @@ declare const SessionFactDefinitions: readonly [{
2685
2699
  payload: s.Schema<{
2686
2700
  toolCallId: string;
2687
2701
  name: string;
2688
- arguments: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
2702
+ arguments: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
2689
2703
  source: {
2690
2704
  kind: string;
2691
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2705
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2692
2706
  };
2693
2707
  binding?: {
2694
2708
  leaseId: string;
2695
2709
  bindingId: string;
2696
- descriptor: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
2710
+ descriptor: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
2697
2711
  } | undefined;
2698
2712
  }>;
2699
2713
  schema: s.Schema<{
@@ -2703,15 +2717,15 @@ declare const SessionFactDefinitions: readonly [{
2703
2717
  payload: {
2704
2718
  toolCallId: string;
2705
2719
  name: string;
2706
- arguments: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
2720
+ arguments: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
2707
2721
  source: {
2708
2722
  kind: string;
2709
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2723
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2710
2724
  };
2711
2725
  binding?: {
2712
2726
  leaseId: string;
2713
2727
  bindingId: string;
2714
- descriptor: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
2728
+ descriptor: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
2715
2729
  } | undefined;
2716
2730
  };
2717
2731
  }>;
@@ -2722,7 +2736,7 @@ declare const SessionFactDefinitions: readonly [{
2722
2736
  toolCallId: string;
2723
2737
  toolName: string;
2724
2738
  reason: string;
2725
- parameters: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
2739
+ parameters: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
2726
2740
  taskId?: string | undefined;
2727
2741
  parentToolCallId?: string | undefined;
2728
2742
  }>;
@@ -2735,7 +2749,7 @@ declare const SessionFactDefinitions: readonly [{
2735
2749
  toolCallId: string;
2736
2750
  toolName: string;
2737
2751
  reason: string;
2738
- parameters: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
2752
+ parameters: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
2739
2753
  taskId?: string | undefined;
2740
2754
  parentToolCallId?: string | undefined;
2741
2755
  };
@@ -2855,7 +2869,7 @@ declare const SessionFactDefinitions: readonly [{
2855
2869
  recovery?: "unsafe" | "safe" | undefined;
2856
2870
  toolName?: string | undefined;
2857
2871
  bindingId?: string | undefined;
2858
- parameters?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2872
+ parameters?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2859
2873
  hookInput?: {
2860
2874
  leaseId: string;
2861
2875
  } | undefined;
@@ -2876,7 +2890,7 @@ declare const SessionFactDefinitions: readonly [{
2876
2890
  recovery?: "unsafe" | "safe" | undefined;
2877
2891
  toolName?: string | undefined;
2878
2892
  bindingId?: string | undefined;
2879
- parameters?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2893
+ parameters?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2880
2894
  hookInput?: {
2881
2895
  leaseId: string;
2882
2896
  } | undefined;
@@ -2900,7 +2914,7 @@ declare const SessionFactDefinitions: readonly [{
2900
2914
  data: string;
2901
2915
  mimeType: string;
2902
2916
  })[];
2903
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2917
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2904
2918
  usage?: {
2905
2919
  input: number;
2906
2920
  output: number;
@@ -2920,7 +2934,7 @@ declare const SessionFactDefinitions: readonly [{
2920
2934
  } | undefined;
2921
2935
  terminate?: boolean | undefined;
2922
2936
  isError?: boolean | undefined;
2923
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2937
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2924
2938
  };
2925
2939
  outputArchive?: {
2926
2940
  encoding: "utf-8";
@@ -2947,7 +2961,7 @@ declare const SessionFactDefinitions: readonly [{
2947
2961
  data: string;
2948
2962
  mimeType: string;
2949
2963
  })[];
2950
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2964
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2951
2965
  usage?: {
2952
2966
  input: number;
2953
2967
  output: number;
@@ -2967,7 +2981,7 @@ declare const SessionFactDefinitions: readonly [{
2967
2981
  } | undefined;
2968
2982
  terminate?: boolean | undefined;
2969
2983
  isError?: boolean | undefined;
2970
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
2984
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2971
2985
  };
2972
2986
  outputArchive?: {
2973
2987
  encoding: "utf-8";
@@ -2993,7 +3007,7 @@ declare const SessionFactDefinitions: readonly [{
2993
3007
  data: string;
2994
3008
  mimeType: string;
2995
3009
  })[];
2996
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3010
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
2997
3011
  usage?: {
2998
3012
  input: number;
2999
3013
  output: number;
@@ -3013,7 +3027,7 @@ declare const SessionFactDefinitions: readonly [{
3013
3027
  } | undefined;
3014
3028
  terminate?: boolean | undefined;
3015
3029
  isError?: boolean | undefined;
3016
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3030
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3017
3031
  };
3018
3032
  cancelled: boolean;
3019
3033
  outputArchive?: {
@@ -3041,7 +3055,7 @@ declare const SessionFactDefinitions: readonly [{
3041
3055
  data: string;
3042
3056
  mimeType: string;
3043
3057
  })[];
3044
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3058
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3045
3059
  usage?: {
3046
3060
  input: number;
3047
3061
  output: number;
@@ -3061,7 +3075,7 @@ declare const SessionFactDefinitions: readonly [{
3061
3075
  } | undefined;
3062
3076
  terminate?: boolean | undefined;
3063
3077
  isError?: boolean | undefined;
3064
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3078
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3065
3079
  };
3066
3080
  cancelled: boolean;
3067
3081
  outputArchive?: {
@@ -3086,7 +3100,7 @@ declare const SessionFactDefinitions: readonly [{
3086
3100
  text: string;
3087
3101
  textSignature?: string | undefined;
3088
3102
  }[];
3089
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3103
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3090
3104
  } | undefined;
3091
3105
  outputArchive?: {
3092
3106
  encoding: "utf-8";
@@ -3111,7 +3125,7 @@ declare const SessionFactDefinitions: readonly [{
3111
3125
  text: string;
3112
3126
  textSignature?: string | undefined;
3113
3127
  }[];
3114
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3128
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3115
3129
  } | undefined;
3116
3130
  outputArchive?: {
3117
3131
  encoding: "utf-8";
@@ -3137,7 +3151,7 @@ declare const SessionFactDefinitions: readonly [{
3137
3151
  data: string;
3138
3152
  mimeType: string;
3139
3153
  })[];
3140
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3154
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3141
3155
  usage?: {
3142
3156
  input: number;
3143
3157
  output: number;
@@ -3157,7 +3171,7 @@ declare const SessionFactDefinitions: readonly [{
3157
3171
  } | undefined;
3158
3172
  terminate?: boolean | undefined;
3159
3173
  isError?: boolean | undefined;
3160
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3174
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3161
3175
  } | undefined;
3162
3176
  message?: string | undefined;
3163
3177
  }>;
@@ -3177,7 +3191,7 @@ declare const SessionFactDefinitions: readonly [{
3177
3191
  data: string;
3178
3192
  mimeType: string;
3179
3193
  })[];
3180
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3194
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3181
3195
  usage?: {
3182
3196
  input: number;
3183
3197
  output: number;
@@ -3197,7 +3211,7 @@ declare const SessionFactDefinitions: readonly [{
3197
3211
  } | undefined;
3198
3212
  terminate?: boolean | undefined;
3199
3213
  isError?: boolean | undefined;
3200
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3214
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3201
3215
  } | undefined;
3202
3216
  message?: string | undefined;
3203
3217
  };
@@ -3243,7 +3257,7 @@ declare const SessionFactDefinitions: readonly [{
3243
3257
  };
3244
3258
  source: {
3245
3259
  kind: string;
3246
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3260
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3247
3261
  };
3248
3262
  } | {
3249
3263
  runId: string;
@@ -3264,7 +3278,7 @@ declare const SessionFactDefinitions: readonly [{
3264
3278
  type: "toolCall";
3265
3279
  id: string;
3266
3280
  name: string;
3267
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
3281
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
3268
3282
  thoughtSignature?: string | undefined;
3269
3283
  argumentsError?: string | undefined;
3270
3284
  })[];
@@ -3301,7 +3315,7 @@ declare const SessionFactDefinitions: readonly [{
3301
3315
  stack?: string | undefined;
3302
3316
  code?: string | number | undefined;
3303
3317
  } | undefined;
3304
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
3318
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
3305
3319
  }[] | undefined;
3306
3320
  deferred?: {
3307
3321
  provider: string;
@@ -3310,7 +3324,7 @@ declare const SessionFactDefinitions: readonly [{
3310
3324
  id: string;
3311
3325
  expiresAt?: number | undefined;
3312
3326
  pollAfterMs?: number | undefined;
3313
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3327
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3314
3328
  } | undefined;
3315
3329
  errorMessage?: string | undefined;
3316
3330
  rawStopReason?: string | undefined;
@@ -3333,7 +3347,7 @@ declare const SessionFactDefinitions: readonly [{
3333
3347
  })[];
3334
3348
  isError: boolean;
3335
3349
  timestamp: number;
3336
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3350
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3337
3351
  usage?: {
3338
3352
  input: number;
3339
3353
  output: number;
@@ -3393,7 +3407,7 @@ declare const SessionFactDefinitions: readonly [{
3393
3407
  };
3394
3408
  source: {
3395
3409
  kind: string;
3396
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3410
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3397
3411
  };
3398
3412
  } | {
3399
3413
  runId: string;
@@ -3414,7 +3428,7 @@ declare const SessionFactDefinitions: readonly [{
3414
3428
  type: "toolCall";
3415
3429
  id: string;
3416
3430
  name: string;
3417
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
3431
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
3418
3432
  thoughtSignature?: string | undefined;
3419
3433
  argumentsError?: string | undefined;
3420
3434
  })[];
@@ -3451,7 +3465,7 @@ declare const SessionFactDefinitions: readonly [{
3451
3465
  stack?: string | undefined;
3452
3466
  code?: string | number | undefined;
3453
3467
  } | undefined;
3454
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
3468
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
3455
3469
  }[] | undefined;
3456
3470
  deferred?: {
3457
3471
  provider: string;
@@ -3460,7 +3474,7 @@ declare const SessionFactDefinitions: readonly [{
3460
3474
  id: string;
3461
3475
  expiresAt?: number | undefined;
3462
3476
  pollAfterMs?: number | undefined;
3463
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3477
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3464
3478
  } | undefined;
3465
3479
  errorMessage?: string | undefined;
3466
3480
  rawStopReason?: string | undefined;
@@ -3483,7 +3497,7 @@ declare const SessionFactDefinitions: readonly [{
3483
3497
  })[];
3484
3498
  isError: boolean;
3485
3499
  timestamp: number;
3486
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3500
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3487
3501
  usage?: {
3488
3502
  input: number;
3489
3503
  output: number;
@@ -3525,9 +3539,9 @@ declare const SessionFactDefinitions: readonly [{
3525
3539
  contributionId: string;
3526
3540
  name: string;
3527
3541
  description: string;
3528
- parameters: Record<string, _sorbetai_schema32.JsonValue>;
3542
+ parameters: Record<string, _sorbetai_schema56.JsonValue>;
3529
3543
  label?: string | undefined;
3530
- outputSchema?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
3544
+ outputSchema?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
3531
3545
  discovery?: {
3532
3546
  exposure?: "direct" | "deferred" | "hidden" | undefined;
3533
3547
  namespace?: {
@@ -3535,7 +3549,7 @@ declare const SessionFactDefinitions: readonly [{
3535
3549
  description?: string | undefined;
3536
3550
  } | undefined;
3537
3551
  } | undefined;
3538
- metadata?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
3552
+ metadata?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
3539
3553
  }[];
3540
3554
  runYield?: {
3541
3555
  bindingId: string;
@@ -3553,7 +3567,7 @@ declare const SessionFactDefinitions: readonly [{
3553
3567
  namedStates?: {
3554
3568
  contributionId: string;
3555
3569
  stateName: string;
3556
- schema: Record<string, _sorbetai_schema32.JsonValue>;
3570
+ schema: Record<string, _sorbetai_schema56.JsonValue>;
3557
3571
  itemKey?: string | undefined;
3558
3572
  }[] | undefined;
3559
3573
  prefixes?: {
@@ -3570,11 +3584,11 @@ declare const SessionFactDefinitions: readonly [{
3570
3584
  contributionId: string;
3571
3585
  name: string;
3572
3586
  title: string;
3573
- stateSchema: Record<string, _sorbetai_schema32.JsonValue>;
3574
- initialState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3587
+ stateSchema: Record<string, _sorbetai_schema56.JsonValue>;
3588
+ initialState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3575
3589
  initialView?: {
3576
3590
  active: boolean;
3577
- contextState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3591
+ contextState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3578
3592
  constraints?: {
3579
3593
  toolNames: string[];
3580
3594
  workspace?: "read-only" | undefined;
@@ -3695,9 +3709,9 @@ declare const SessionFactDefinitions: readonly [{
3695
3709
  contributionId: string;
3696
3710
  name: string;
3697
3711
  description: string;
3698
- parameters: Record<string, _sorbetai_schema32.JsonValue>;
3712
+ parameters: Record<string, _sorbetai_schema56.JsonValue>;
3699
3713
  label?: string | undefined;
3700
- outputSchema?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
3714
+ outputSchema?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
3701
3715
  discovery?: {
3702
3716
  exposure?: "direct" | "deferred" | "hidden" | undefined;
3703
3717
  namespace?: {
@@ -3705,7 +3719,7 @@ declare const SessionFactDefinitions: readonly [{
3705
3719
  description?: string | undefined;
3706
3720
  } | undefined;
3707
3721
  } | undefined;
3708
- metadata?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
3722
+ metadata?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
3709
3723
  }[];
3710
3724
  runYield?: {
3711
3725
  bindingId: string;
@@ -3723,7 +3737,7 @@ declare const SessionFactDefinitions: readonly [{
3723
3737
  namedStates?: {
3724
3738
  contributionId: string;
3725
3739
  stateName: string;
3726
- schema: Record<string, _sorbetai_schema32.JsonValue>;
3740
+ schema: Record<string, _sorbetai_schema56.JsonValue>;
3727
3741
  itemKey?: string | undefined;
3728
3742
  }[] | undefined;
3729
3743
  prefixes?: {
@@ -3740,11 +3754,11 @@ declare const SessionFactDefinitions: readonly [{
3740
3754
  contributionId: string;
3741
3755
  name: string;
3742
3756
  title: string;
3743
- stateSchema: Record<string, _sorbetai_schema32.JsonValue>;
3744
- initialState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3757
+ stateSchema: Record<string, _sorbetai_schema56.JsonValue>;
3758
+ initialState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3745
3759
  initialView?: {
3746
3760
  active: boolean;
3747
- contextState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3761
+ contextState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3748
3762
  constraints?: {
3749
3763
  toolNames: string[];
3750
3764
  workspace?: "read-only" | undefined;
@@ -3916,16 +3930,16 @@ declare const SessionFactDefinitions: readonly [{
3916
3930
  payload: s.Schema<{
3917
3931
  command: {
3918
3932
  name: string;
3919
- input: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
3933
+ input: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
3920
3934
  };
3921
3935
  name: string;
3922
3936
  title: string;
3923
3937
  contributionId: string;
3924
3938
  version: number;
3925
- state: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
3939
+ state: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
3926
3940
  view: {
3927
3941
  active: boolean;
3928
- contextState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3942
+ contextState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3929
3943
  constraints?: {
3930
3944
  toolNames: string[];
3931
3945
  workspace?: "read-only" | undefined;
@@ -3956,11 +3970,11 @@ declare const SessionFactDefinitions: readonly [{
3956
3970
  contributionId: string;
3957
3971
  name: string;
3958
3972
  title: string;
3959
- stateSchema: Record<string, _sorbetai_schema32.JsonValue>;
3960
- initialState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3973
+ stateSchema: Record<string, _sorbetai_schema56.JsonValue>;
3974
+ initialState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3961
3975
  initialView?: {
3962
3976
  active: boolean;
3963
- contextState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
3977
+ contextState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
3964
3978
  constraints?: {
3965
3979
  toolNames: string[];
3966
3980
  workspace?: "read-only" | undefined;
@@ -3995,16 +4009,16 @@ declare const SessionFactDefinitions: readonly [{
3995
4009
  payload: {
3996
4010
  command: {
3997
4011
  name: string;
3998
- input: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
4012
+ input: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
3999
4013
  };
4000
4014
  name: string;
4001
4015
  title: string;
4002
4016
  contributionId: string;
4003
4017
  version: number;
4004
- state: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
4018
+ state: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
4005
4019
  view: {
4006
4020
  active: boolean;
4007
- contextState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
4021
+ contextState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
4008
4022
  constraints?: {
4009
4023
  toolNames: string[];
4010
4024
  workspace?: "read-only" | undefined;
@@ -4035,11 +4049,11 @@ declare const SessionFactDefinitions: readonly [{
4035
4049
  contributionId: string;
4036
4050
  name: string;
4037
4051
  title: string;
4038
- stateSchema: Record<string, _sorbetai_schema32.JsonValue>;
4039
- initialState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
4052
+ stateSchema: Record<string, _sorbetai_schema56.JsonValue>;
4053
+ initialState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
4040
4054
  initialView?: {
4041
4055
  active: boolean;
4042
- contextState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
4056
+ contextState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
4043
4057
  constraints?: {
4044
4058
  toolNames: string[];
4045
4059
  workspace?: "read-only" | undefined;
@@ -4117,6 +4131,17 @@ declare const SessionFactDefinitions: readonly [{
4117
4131
  summaryMaxOutputTokens?: number | undefined;
4118
4132
  };
4119
4133
  sourceRunId?: string | undefined;
4134
+ stateBaseline?: {
4135
+ stateName: string;
4136
+ revision: number;
4137
+ value: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
4138
+ frame: {
4139
+ role: "user";
4140
+ content: string;
4141
+ };
4142
+ itemKey?: string | undefined;
4143
+ }[] | undefined;
4144
+ observerSummary?: string | undefined;
4120
4145
  mode?: "model" | "deterministic" | "observer" | undefined;
4121
4146
  compiler?: {
4122
4147
  entryId: string;
@@ -4194,6 +4219,17 @@ declare const SessionFactDefinitions: readonly [{
4194
4219
  summaryMaxOutputTokens?: number | undefined;
4195
4220
  };
4196
4221
  sourceRunId?: string | undefined;
4222
+ stateBaseline?: {
4223
+ stateName: string;
4224
+ revision: number;
4225
+ value: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
4226
+ frame: {
4227
+ role: "user";
4228
+ content: string;
4229
+ };
4230
+ itemKey?: string | undefined;
4231
+ }[] | undefined;
4232
+ observerSummary?: string | undefined;
4197
4233
  mode?: "model" | "deterministic" | "observer" | undefined;
4198
4234
  compiler?: {
4199
4235
  entryId: string;
@@ -4225,7 +4261,7 @@ declare const SessionFactDefinitions: readonly [{
4225
4261
  kind: "compaction.model.requested";
4226
4262
  payload: s.Schema<{
4227
4263
  attemptId: string;
4228
- phase: "direct" | "chunk" | "merge" | "final" | "empty-retry" | "provider-reduction";
4264
+ phase: "final" | "direct" | "chunk" | "merge" | "empty-retry" | "provider-reduction";
4229
4265
  route: "direct" | "skeleton";
4230
4266
  depth: number;
4231
4267
  partIndex: number;
@@ -4245,7 +4281,7 @@ declare const SessionFactDefinitions: readonly [{
4245
4281
  kind: "compaction.model.requested";
4246
4282
  payload: {
4247
4283
  attemptId: string;
4248
- phase: "direct" | "chunk" | "merge" | "final" | "empty-retry" | "provider-reduction";
4284
+ phase: "final" | "direct" | "chunk" | "merge" | "empty-retry" | "provider-reduction";
4249
4285
  route: "direct" | "skeleton";
4250
4286
  depth: number;
4251
4287
  partIndex: number;
@@ -4279,7 +4315,7 @@ declare const SessionFactDefinitions: readonly [{
4279
4315
  type: "toolCall";
4280
4316
  id: string;
4281
4317
  name: string;
4282
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
4318
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
4283
4319
  thoughtSignature?: string | undefined;
4284
4320
  argumentsError?: string | undefined;
4285
4321
  })[];
@@ -4316,7 +4352,7 @@ declare const SessionFactDefinitions: readonly [{
4316
4352
  stack?: string | undefined;
4317
4353
  code?: string | number | undefined;
4318
4354
  } | undefined;
4319
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
4355
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
4320
4356
  }[] | undefined;
4321
4357
  deferred?: {
4322
4358
  provider: string;
@@ -4325,7 +4361,7 @@ declare const SessionFactDefinitions: readonly [{
4325
4361
  id: string;
4326
4362
  expiresAt?: number | undefined;
4327
4363
  pollAfterMs?: number | undefined;
4328
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
4364
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
4329
4365
  } | undefined;
4330
4366
  errorMessage?: string | undefined;
4331
4367
  rawStopReason?: string | undefined;
@@ -4356,7 +4392,7 @@ declare const SessionFactDefinitions: readonly [{
4356
4392
  type: "toolCall";
4357
4393
  id: string;
4358
4394
  name: string;
4359
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
4395
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
4360
4396
  thoughtSignature?: string | undefined;
4361
4397
  argumentsError?: string | undefined;
4362
4398
  })[];
@@ -4393,7 +4429,7 @@ declare const SessionFactDefinitions: readonly [{
4393
4429
  stack?: string | undefined;
4394
4430
  code?: string | number | undefined;
4395
4431
  } | undefined;
4396
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
4432
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
4397
4433
  }[] | undefined;
4398
4434
  deferred?: {
4399
4435
  provider: string;
@@ -4402,7 +4438,7 @@ declare const SessionFactDefinitions: readonly [{
4402
4438
  id: string;
4403
4439
  expiresAt?: number | undefined;
4404
4440
  pollAfterMs?: number | undefined;
4405
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
4441
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
4406
4442
  } | undefined;
4407
4443
  errorMessage?: string | undefined;
4408
4444
  rawStopReason?: string | undefined;
@@ -4459,6 +4495,16 @@ declare const SessionFactDefinitions: readonly [{
4459
4495
  mode?: "model" | "deterministic" | "observer" | undefined;
4460
4496
  finalAttemptId?: string | undefined;
4461
4497
  attemptIds?: string[] | undefined;
4498
+ stateBaseline?: {
4499
+ stateName: string;
4500
+ revision: number;
4501
+ value: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
4502
+ frame: {
4503
+ role: "user";
4504
+ content: string;
4505
+ };
4506
+ itemKey?: string | undefined;
4507
+ }[] | undefined;
4462
4508
  }>;
4463
4509
  schema: s.Schema<{
4464
4510
  sessionId: string;
@@ -4491,6 +4537,16 @@ declare const SessionFactDefinitions: readonly [{
4491
4537
  mode?: "model" | "deterministic" | "observer" | undefined;
4492
4538
  finalAttemptId?: string | undefined;
4493
4539
  attemptIds?: string[] | undefined;
4540
+ stateBaseline?: {
4541
+ stateName: string;
4542
+ revision: number;
4543
+ value: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
4544
+ frame: {
4545
+ role: "user";
4546
+ content: string;
4547
+ };
4548
+ itemKey?: string | undefined;
4549
+ }[] | undefined;
4494
4550
  };
4495
4551
  }>;
4496
4552
  }, {
@@ -4545,7 +4601,7 @@ declare const RunFactDefinitions: readonly [{
4545
4601
  messageId: string;
4546
4602
  source: {
4547
4603
  kind: string;
4548
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
4604
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
4549
4605
  };
4550
4606
  message: {
4551
4607
  role: "user";
@@ -4640,7 +4696,7 @@ declare const RunFactDefinitions: readonly [{
4640
4696
  kind: "container";
4641
4697
  name: string;
4642
4698
  attributes?: Record<string, string | number>;
4643
- children: _sorbetai_context3.ContextXmlElement[];
4699
+ children: _sorbetai_context4.ContextXmlElement[];
4644
4700
  };
4645
4701
  sourceId: string;
4646
4702
  provenance: {
@@ -4648,7 +4704,7 @@ declare const RunFactDefinitions: readonly [{
4648
4704
  label: string;
4649
4705
  location?: string | undefined;
4650
4706
  };
4651
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
4707
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
4652
4708
  })[];
4653
4709
  yieldUsageLimit?: number | undefined;
4654
4710
  model?: {
@@ -4738,7 +4794,7 @@ declare const RunFactDefinitions: readonly [{
4738
4794
  kind: "container";
4739
4795
  name: string;
4740
4796
  attributes?: Record<string, string | number>;
4741
- children: _sorbetai_context3.ContextXmlElement[];
4797
+ children: _sorbetai_context4.ContextXmlElement[];
4742
4798
  };
4743
4799
  sourceId: string;
4744
4800
  provenance: {
@@ -4746,7 +4802,7 @@ declare const RunFactDefinitions: readonly [{
4746
4802
  label: string;
4747
4803
  location?: string | undefined;
4748
4804
  };
4749
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
4805
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
4750
4806
  })[] | undefined;
4751
4807
  toolPermissionPolicy?: {
4752
4808
  fallback: {
@@ -4796,7 +4852,7 @@ declare const RunFactDefinitions: readonly [{
4796
4852
  deliveryId: string;
4797
4853
  source: {
4798
4854
  kind: string;
4799
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
4855
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
4800
4856
  };
4801
4857
  contextSources: ({
4802
4858
  lifecycle: "session";
@@ -4878,7 +4934,7 @@ declare const RunFactDefinitions: readonly [{
4878
4934
  kind: "container";
4879
4935
  name: string;
4880
4936
  attributes?: Record<string, string | number>;
4881
- children: _sorbetai_context3.ContextXmlElement[];
4937
+ children: _sorbetai_context4.ContextXmlElement[];
4882
4938
  };
4883
4939
  sourceId: string;
4884
4940
  provenance: {
@@ -4886,7 +4942,7 @@ declare const RunFactDefinitions: readonly [{
4886
4942
  label: string;
4887
4943
  location?: string | undefined;
4888
4944
  };
4889
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
4945
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
4890
4946
  })[];
4891
4947
  yieldUsageLimit?: number | undefined;
4892
4948
  model?: {
@@ -4973,7 +5029,7 @@ declare const RunFactDefinitions: readonly [{
4973
5029
  kind: "container";
4974
5030
  name: string;
4975
5031
  attributes?: Record<string, string | number>;
4976
- children: _sorbetai_context3.ContextXmlElement[];
5032
+ children: _sorbetai_context4.ContextXmlElement[];
4977
5033
  };
4978
5034
  sourceId: string;
4979
5035
  provenance: {
@@ -4981,7 +5037,7 @@ declare const RunFactDefinitions: readonly [{
4981
5037
  label: string;
4982
5038
  location?: string | undefined;
4983
5039
  };
4984
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5040
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
4985
5041
  })[] | undefined;
4986
5042
  toolPermissionPolicy?: {
4987
5043
  fallback: {
@@ -5030,7 +5086,7 @@ declare const RunFactDefinitions: readonly [{
5030
5086
  messageId: string;
5031
5087
  source: {
5032
5088
  kind: string;
5033
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5089
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5034
5090
  };
5035
5091
  message: {
5036
5092
  role: "user";
@@ -5125,7 +5181,7 @@ declare const RunFactDefinitions: readonly [{
5125
5181
  kind: "container";
5126
5182
  name: string;
5127
5183
  attributes?: Record<string, string | number>;
5128
- children: _sorbetai_context3.ContextXmlElement[];
5184
+ children: _sorbetai_context4.ContextXmlElement[];
5129
5185
  };
5130
5186
  sourceId: string;
5131
5187
  provenance: {
@@ -5133,7 +5189,7 @@ declare const RunFactDefinitions: readonly [{
5133
5189
  label: string;
5134
5190
  location?: string | undefined;
5135
5191
  };
5136
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5192
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5137
5193
  })[];
5138
5194
  yieldUsageLimit?: number | undefined;
5139
5195
  model?: {
@@ -5223,7 +5279,7 @@ declare const RunFactDefinitions: readonly [{
5223
5279
  kind: "container";
5224
5280
  name: string;
5225
5281
  attributes?: Record<string, string | number>;
5226
- children: _sorbetai_context3.ContextXmlElement[];
5282
+ children: _sorbetai_context4.ContextXmlElement[];
5227
5283
  };
5228
5284
  sourceId: string;
5229
5285
  provenance: {
@@ -5231,7 +5287,7 @@ declare const RunFactDefinitions: readonly [{
5231
5287
  label: string;
5232
5288
  location?: string | undefined;
5233
5289
  };
5234
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5290
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5235
5291
  })[] | undefined;
5236
5292
  toolPermissionPolicy?: {
5237
5293
  fallback: {
@@ -5281,7 +5337,7 @@ declare const RunFactDefinitions: readonly [{
5281
5337
  deliveryId: string;
5282
5338
  source: {
5283
5339
  kind: string;
5284
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5340
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5285
5341
  };
5286
5342
  contextSources: ({
5287
5343
  lifecycle: "session";
@@ -5363,7 +5419,7 @@ declare const RunFactDefinitions: readonly [{
5363
5419
  kind: "container";
5364
5420
  name: string;
5365
5421
  attributes?: Record<string, string | number>;
5366
- children: _sorbetai_context3.ContextXmlElement[];
5422
+ children: _sorbetai_context4.ContextXmlElement[];
5367
5423
  };
5368
5424
  sourceId: string;
5369
5425
  provenance: {
@@ -5371,7 +5427,7 @@ declare const RunFactDefinitions: readonly [{
5371
5427
  label: string;
5372
5428
  location?: string | undefined;
5373
5429
  };
5374
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5430
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5375
5431
  })[];
5376
5432
  yieldUsageLimit?: number | undefined;
5377
5433
  model?: {
@@ -5458,7 +5514,7 @@ declare const RunFactDefinitions: readonly [{
5458
5514
  kind: "container";
5459
5515
  name: string;
5460
5516
  attributes?: Record<string, string | number>;
5461
- children: _sorbetai_context3.ContextXmlElement[];
5517
+ children: _sorbetai_context4.ContextXmlElement[];
5462
5518
  };
5463
5519
  sourceId: string;
5464
5520
  provenance: {
@@ -5466,7 +5522,7 @@ declare const RunFactDefinitions: readonly [{
5466
5522
  label: string;
5467
5523
  location?: string | undefined;
5468
5524
  };
5469
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5525
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5470
5526
  })[] | undefined;
5471
5527
  toolPermissionPolicy?: {
5472
5528
  fallback: {
@@ -5585,7 +5641,7 @@ declare const RunFactDefinitions: readonly [{
5585
5641
  };
5586
5642
  source: {
5587
5643
  kind: string;
5588
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5644
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5589
5645
  };
5590
5646
  deliveryId?: string | undefined;
5591
5647
  } | {
@@ -5672,7 +5728,7 @@ declare const RunFactDefinitions: readonly [{
5672
5728
  kind: "container";
5673
5729
  name: string;
5674
5730
  attributes?: Record<string, string | number>;
5675
- children: _sorbetai_context3.ContextXmlElement[];
5731
+ children: _sorbetai_context4.ContextXmlElement[];
5676
5732
  };
5677
5733
  sourceId: string;
5678
5734
  provenance: {
@@ -5680,12 +5736,12 @@ declare const RunFactDefinitions: readonly [{
5680
5736
  label: string;
5681
5737
  location?: string | undefined;
5682
5738
  };
5683
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5739
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5684
5740
  })[];
5685
5741
  deliveryId: string;
5686
5742
  source: {
5687
5743
  kind: string;
5688
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5744
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5689
5745
  };
5690
5746
  }>;
5691
5747
  schema: s.Schema<{
@@ -5711,7 +5767,7 @@ declare const RunFactDefinitions: readonly [{
5711
5767
  };
5712
5768
  source: {
5713
5769
  kind: string;
5714
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5770
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5715
5771
  };
5716
5772
  deliveryId?: string | undefined;
5717
5773
  } | {
@@ -5798,7 +5854,7 @@ declare const RunFactDefinitions: readonly [{
5798
5854
  kind: "container";
5799
5855
  name: string;
5800
5856
  attributes?: Record<string, string | number>;
5801
- children: _sorbetai_context3.ContextXmlElement[];
5857
+ children: _sorbetai_context4.ContextXmlElement[];
5802
5858
  };
5803
5859
  sourceId: string;
5804
5860
  provenance: {
@@ -5806,12 +5862,12 @@ declare const RunFactDefinitions: readonly [{
5806
5862
  label: string;
5807
5863
  location?: string | undefined;
5808
5864
  };
5809
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5865
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5810
5866
  })[];
5811
5867
  deliveryId: string;
5812
5868
  source: {
5813
5869
  kind: string;
5814
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
5870
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5815
5871
  };
5816
5872
  };
5817
5873
  }>;
@@ -5904,7 +5960,7 @@ declare const RunFactDefinitions: readonly [{
5904
5960
  };
5905
5961
  namedStates: ({
5906
5962
  present: true;
5907
- value: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
5963
+ value: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
5908
5964
  stateName: string;
5909
5965
  revision: number;
5910
5966
  delivery: {
@@ -5983,7 +6039,7 @@ declare const RunFactDefinitions: readonly [{
5983
6039
  kind: "container";
5984
6040
  name: string;
5985
6041
  attributes?: Record<string, string | number>;
5986
- children: _sorbetai_context3.ContextXmlElement[];
6042
+ children: _sorbetai_context4.ContextXmlElement[];
5987
6043
  };
5988
6044
  sourceId: string;
5989
6045
  provenance: {
@@ -5991,7 +6047,7 @@ declare const RunFactDefinitions: readonly [{
5991
6047
  label: string;
5992
6048
  location?: string | undefined;
5993
6049
  };
5994
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
6050
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
5995
6051
  })[];
5996
6052
  delivery: {
5997
6053
  kind: "append";
@@ -6048,7 +6104,7 @@ declare const RunFactDefinitions: readonly [{
6048
6104
  location?: string | undefined;
6049
6105
  };
6050
6106
  placement?: "before-conversation" | undefined;
6051
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
6107
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
6052
6108
  }[];
6053
6109
  afterMessageCount: number;
6054
6110
  modelView?: {
@@ -6106,7 +6162,7 @@ declare const RunFactDefinitions: readonly [{
6106
6162
  type: "toolCall";
6107
6163
  id: string;
6108
6164
  name: string;
6109
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
6165
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
6110
6166
  thoughtSignature?: string | undefined;
6111
6167
  argumentsError?: string | undefined;
6112
6168
  })[];
@@ -6143,7 +6199,7 @@ declare const RunFactDefinitions: readonly [{
6143
6199
  stack?: string | undefined;
6144
6200
  code?: string | number | undefined;
6145
6201
  } | undefined;
6146
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
6202
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
6147
6203
  }[] | undefined;
6148
6204
  deferred?: {
6149
6205
  provider: string;
@@ -6152,7 +6208,7 @@ declare const RunFactDefinitions: readonly [{
6152
6208
  id: string;
6153
6209
  expiresAt?: number | undefined;
6154
6210
  pollAfterMs?: number | undefined;
6155
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
6211
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
6156
6212
  } | undefined;
6157
6213
  errorMessage?: string | undefined;
6158
6214
  rawStopReason?: string | undefined;
@@ -6175,7 +6231,7 @@ declare const RunFactDefinitions: readonly [{
6175
6231
  })[];
6176
6232
  isError: boolean;
6177
6233
  timestamp: number;
6178
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
6234
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
6179
6235
  usage?: {
6180
6236
  input: number;
6181
6237
  output: number;
@@ -6222,18 +6278,6 @@ declare const RunFactDefinitions: readonly [{
6222
6278
  } | {
6223
6279
  kind: "inline";
6224
6280
  message: {
6225
- role: "user";
6226
- content: string | ({
6227
- type: "text";
6228
- text: string;
6229
- textSignature?: string | undefined;
6230
- } | {
6231
- type: "image";
6232
- data: string;
6233
- mimeType: string;
6234
- })[];
6235
- timestamp: number;
6236
- } | {
6237
6281
  role: "assistant";
6238
6282
  content: ({
6239
6283
  type: "text";
@@ -6248,7 +6292,7 @@ declare const RunFactDefinitions: readonly [{
6248
6292
  type: "toolCall";
6249
6293
  id: string;
6250
6294
  name: string;
6251
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
6295
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
6252
6296
  thoughtSignature?: string | undefined;
6253
6297
  argumentsError?: string | undefined;
6254
6298
  })[];
@@ -6285,7 +6329,7 @@ declare const RunFactDefinitions: readonly [{
6285
6329
  stack?: string | undefined;
6286
6330
  code?: string | number | undefined;
6287
6331
  } | undefined;
6288
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
6332
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
6289
6333
  }[] | undefined;
6290
6334
  deferred?: {
6291
6335
  provider: string;
@@ -6294,7 +6338,7 @@ declare const RunFactDefinitions: readonly [{
6294
6338
  id: string;
6295
6339
  expiresAt?: number | undefined;
6296
6340
  pollAfterMs?: number | undefined;
6297
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
6341
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
6298
6342
  } | undefined;
6299
6343
  errorMessage?: string | undefined;
6300
6344
  rawStopReason?: string | undefined;
@@ -6302,6 +6346,18 @@ declare const RunFactDefinitions: readonly [{
6302
6346
  providerThinkingLevel?: string | undefined;
6303
6347
  endTurn?: boolean | undefined;
6304
6348
  durationMs?: number | undefined;
6349
+ } | {
6350
+ role: "user";
6351
+ content: string | ({
6352
+ type: "text";
6353
+ text: string;
6354
+ textSignature?: string | undefined;
6355
+ } | {
6356
+ type: "image";
6357
+ data: string;
6358
+ mimeType: string;
6359
+ })[];
6360
+ timestamp: number;
6305
6361
  } | {
6306
6362
  role: "toolResult";
6307
6363
  toolCallId: string;
@@ -6317,7 +6373,7 @@ declare const RunFactDefinitions: readonly [{
6317
6373
  })[];
6318
6374
  isError: boolean;
6319
6375
  timestamp: number;
6320
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
6376
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
6321
6377
  usage?: {
6322
6378
  input: number;
6323
6379
  output: number;
@@ -6360,7 +6416,7 @@ declare const RunFactDefinitions: readonly [{
6360
6416
  };
6361
6417
  namedStates: ({
6362
6418
  present: true;
6363
- value: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
6419
+ value: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
6364
6420
  stateName: string;
6365
6421
  revision: number;
6366
6422
  delivery: {
@@ -6439,7 +6495,7 @@ declare const RunFactDefinitions: readonly [{
6439
6495
  kind: "container";
6440
6496
  name: string;
6441
6497
  attributes?: Record<string, string | number>;
6442
- children: _sorbetai_context3.ContextXmlElement[];
6498
+ children: _sorbetai_context4.ContextXmlElement[];
6443
6499
  };
6444
6500
  sourceId: string;
6445
6501
  provenance: {
@@ -6447,7 +6503,7 @@ declare const RunFactDefinitions: readonly [{
6447
6503
  label: string;
6448
6504
  location?: string | undefined;
6449
6505
  };
6450
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
6506
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
6451
6507
  })[];
6452
6508
  delivery: {
6453
6509
  kind: "append";
@@ -6504,7 +6560,7 @@ declare const RunFactDefinitions: readonly [{
6504
6560
  location?: string | undefined;
6505
6561
  };
6506
6562
  placement?: "before-conversation" | undefined;
6507
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
6563
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
6508
6564
  }[];
6509
6565
  afterMessageCount: number;
6510
6566
  modelView?: {
@@ -6562,7 +6618,7 @@ declare const RunFactDefinitions: readonly [{
6562
6618
  type: "toolCall";
6563
6619
  id: string;
6564
6620
  name: string;
6565
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
6621
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
6566
6622
  thoughtSignature?: string | undefined;
6567
6623
  argumentsError?: string | undefined;
6568
6624
  })[];
@@ -6599,7 +6655,7 @@ declare const RunFactDefinitions: readonly [{
6599
6655
  stack?: string | undefined;
6600
6656
  code?: string | number | undefined;
6601
6657
  } | undefined;
6602
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
6658
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
6603
6659
  }[] | undefined;
6604
6660
  deferred?: {
6605
6661
  provider: string;
@@ -6608,7 +6664,7 @@ declare const RunFactDefinitions: readonly [{
6608
6664
  id: string;
6609
6665
  expiresAt?: number | undefined;
6610
6666
  pollAfterMs?: number | undefined;
6611
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
6667
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
6612
6668
  } | undefined;
6613
6669
  errorMessage?: string | undefined;
6614
6670
  rawStopReason?: string | undefined;
@@ -6631,7 +6687,7 @@ declare const RunFactDefinitions: readonly [{
6631
6687
  })[];
6632
6688
  isError: boolean;
6633
6689
  timestamp: number;
6634
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
6690
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
6635
6691
  usage?: {
6636
6692
  input: number;
6637
6693
  output: number;
@@ -6678,18 +6734,6 @@ declare const RunFactDefinitions: readonly [{
6678
6734
  } | {
6679
6735
  kind: "inline";
6680
6736
  message: {
6681
- role: "user";
6682
- content: string | ({
6683
- type: "text";
6684
- text: string;
6685
- textSignature?: string | undefined;
6686
- } | {
6687
- type: "image";
6688
- data: string;
6689
- mimeType: string;
6690
- })[];
6691
- timestamp: number;
6692
- } | {
6693
6737
  role: "assistant";
6694
6738
  content: ({
6695
6739
  type: "text";
@@ -6704,7 +6748,7 @@ declare const RunFactDefinitions: readonly [{
6704
6748
  type: "toolCall";
6705
6749
  id: string;
6706
6750
  name: string;
6707
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
6751
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
6708
6752
  thoughtSignature?: string | undefined;
6709
6753
  argumentsError?: string | undefined;
6710
6754
  })[];
@@ -6741,7 +6785,7 @@ declare const RunFactDefinitions: readonly [{
6741
6785
  stack?: string | undefined;
6742
6786
  code?: string | number | undefined;
6743
6787
  } | undefined;
6744
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
6788
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
6745
6789
  }[] | undefined;
6746
6790
  deferred?: {
6747
6791
  provider: string;
@@ -6750,7 +6794,7 @@ declare const RunFactDefinitions: readonly [{
6750
6794
  id: string;
6751
6795
  expiresAt?: number | undefined;
6752
6796
  pollAfterMs?: number | undefined;
6753
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
6797
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
6754
6798
  } | undefined;
6755
6799
  errorMessage?: string | undefined;
6756
6800
  rawStopReason?: string | undefined;
@@ -6758,6 +6802,18 @@ declare const RunFactDefinitions: readonly [{
6758
6802
  providerThinkingLevel?: string | undefined;
6759
6803
  endTurn?: boolean | undefined;
6760
6804
  durationMs?: number | undefined;
6805
+ } | {
6806
+ role: "user";
6807
+ content: string | ({
6808
+ type: "text";
6809
+ text: string;
6810
+ textSignature?: string | undefined;
6811
+ } | {
6812
+ type: "image";
6813
+ data: string;
6814
+ mimeType: string;
6815
+ })[];
6816
+ timestamp: number;
6761
6817
  } | {
6762
6818
  role: "toolResult";
6763
6819
  toolCallId: string;
@@ -6773,7 +6829,7 @@ declare const RunFactDefinitions: readonly [{
6773
6829
  })[];
6774
6830
  isError: boolean;
6775
6831
  timestamp: number;
6776
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
6832
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
6777
6833
  usage?: {
6778
6834
  input: number;
6779
6835
  output: number;
@@ -6886,7 +6942,7 @@ declare const RunFactDefinitions: readonly [{
6886
6942
  toolCallId: string;
6887
6943
  toolName: string;
6888
6944
  reason: string;
6889
- parameters: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
6945
+ parameters: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
6890
6946
  taskId?: string | undefined;
6891
6947
  parentToolCallId?: string | undefined;
6892
6948
  }>;
@@ -6899,7 +6955,7 @@ declare const RunFactDefinitions: readonly [{
6899
6955
  toolCallId: string;
6900
6956
  toolName: string;
6901
6957
  reason: string;
6902
- parameters: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
6958
+ parameters: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
6903
6959
  taskId?: string | undefined;
6904
6960
  parentToolCallId?: string | undefined;
6905
6961
  };
@@ -7034,7 +7090,7 @@ declare const RunFactDefinitions: readonly [{
7034
7090
  recovery?: "unsafe" | "safe" | undefined;
7035
7091
  toolName?: string | undefined;
7036
7092
  bindingId?: string | undefined;
7037
- parameters?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7093
+ parameters?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7038
7094
  hookInput?: {
7039
7095
  leaseId: string;
7040
7096
  } | undefined;
@@ -7055,7 +7111,7 @@ declare const RunFactDefinitions: readonly [{
7055
7111
  recovery?: "unsafe" | "safe" | undefined;
7056
7112
  toolName?: string | undefined;
7057
7113
  bindingId?: string | undefined;
7058
- parameters?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7114
+ parameters?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7059
7115
  hookInput?: {
7060
7116
  leaseId: string;
7061
7117
  } | undefined;
@@ -7079,7 +7135,7 @@ declare const RunFactDefinitions: readonly [{
7079
7135
  data: string;
7080
7136
  mimeType: string;
7081
7137
  })[];
7082
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7138
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7083
7139
  usage?: {
7084
7140
  input: number;
7085
7141
  output: number;
@@ -7099,7 +7155,7 @@ declare const RunFactDefinitions: readonly [{
7099
7155
  } | undefined;
7100
7156
  terminate?: boolean | undefined;
7101
7157
  isError?: boolean | undefined;
7102
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7158
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7103
7159
  };
7104
7160
  outputArchive?: {
7105
7161
  encoding: "utf-8";
@@ -7126,7 +7182,7 @@ declare const RunFactDefinitions: readonly [{
7126
7182
  data: string;
7127
7183
  mimeType: string;
7128
7184
  })[];
7129
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7185
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7130
7186
  usage?: {
7131
7187
  input: number;
7132
7188
  output: number;
@@ -7146,7 +7202,7 @@ declare const RunFactDefinitions: readonly [{
7146
7202
  } | undefined;
7147
7203
  terminate?: boolean | undefined;
7148
7204
  isError?: boolean | undefined;
7149
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7205
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7150
7206
  };
7151
7207
  outputArchive?: {
7152
7208
  encoding: "utf-8";
@@ -7172,7 +7228,7 @@ declare const RunFactDefinitions: readonly [{
7172
7228
  data: string;
7173
7229
  mimeType: string;
7174
7230
  })[];
7175
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7231
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7176
7232
  usage?: {
7177
7233
  input: number;
7178
7234
  output: number;
@@ -7192,7 +7248,7 @@ declare const RunFactDefinitions: readonly [{
7192
7248
  } | undefined;
7193
7249
  terminate?: boolean | undefined;
7194
7250
  isError?: boolean | undefined;
7195
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7251
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7196
7252
  };
7197
7253
  cancelled: boolean;
7198
7254
  outputArchive?: {
@@ -7220,7 +7276,7 @@ declare const RunFactDefinitions: readonly [{
7220
7276
  data: string;
7221
7277
  mimeType: string;
7222
7278
  })[];
7223
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7279
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7224
7280
  usage?: {
7225
7281
  input: number;
7226
7282
  output: number;
@@ -7240,7 +7296,7 @@ declare const RunFactDefinitions: readonly [{
7240
7296
  } | undefined;
7241
7297
  terminate?: boolean | undefined;
7242
7298
  isError?: boolean | undefined;
7243
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7299
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7244
7300
  };
7245
7301
  cancelled: boolean;
7246
7302
  outputArchive?: {
@@ -7265,7 +7321,7 @@ declare const RunFactDefinitions: readonly [{
7265
7321
  text: string;
7266
7322
  textSignature?: string | undefined;
7267
7323
  }[];
7268
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7324
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7269
7325
  } | undefined;
7270
7326
  outputArchive?: {
7271
7327
  encoding: "utf-8";
@@ -7290,7 +7346,7 @@ declare const RunFactDefinitions: readonly [{
7290
7346
  text: string;
7291
7347
  textSignature?: string | undefined;
7292
7348
  }[];
7293
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7349
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7294
7350
  } | undefined;
7295
7351
  outputArchive?: {
7296
7352
  encoding: "utf-8";
@@ -7322,7 +7378,7 @@ declare const RunFactDefinitions: readonly [{
7322
7378
  type: "toolCall";
7323
7379
  id: string;
7324
7380
  name: string;
7325
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
7381
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
7326
7382
  thoughtSignature?: string | undefined;
7327
7383
  argumentsError?: string | undefined;
7328
7384
  })[];
@@ -7359,7 +7415,7 @@ declare const RunFactDefinitions: readonly [{
7359
7415
  stack?: string | undefined;
7360
7416
  code?: string | number | undefined;
7361
7417
  } | undefined;
7362
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
7418
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
7363
7419
  }[] | undefined;
7364
7420
  deferred?: {
7365
7421
  provider: string;
@@ -7368,7 +7424,7 @@ declare const RunFactDefinitions: readonly [{
7368
7424
  id: string;
7369
7425
  expiresAt?: number | undefined;
7370
7426
  pollAfterMs?: number | undefined;
7371
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7427
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7372
7428
  } | undefined;
7373
7429
  errorMessage?: string | undefined;
7374
7430
  rawStopReason?: string | undefined;
@@ -7400,7 +7456,7 @@ declare const RunFactDefinitions: readonly [{
7400
7456
  type: "toolCall";
7401
7457
  id: string;
7402
7458
  name: string;
7403
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
7459
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
7404
7460
  thoughtSignature?: string | undefined;
7405
7461
  argumentsError?: string | undefined;
7406
7462
  })[];
@@ -7437,7 +7493,7 @@ declare const RunFactDefinitions: readonly [{
7437
7493
  stack?: string | undefined;
7438
7494
  code?: string | number | undefined;
7439
7495
  } | undefined;
7440
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
7496
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
7441
7497
  }[] | undefined;
7442
7498
  deferred?: {
7443
7499
  provider: string;
@@ -7446,7 +7502,7 @@ declare const RunFactDefinitions: readonly [{
7446
7502
  id: string;
7447
7503
  expiresAt?: number | undefined;
7448
7504
  pollAfterMs?: number | undefined;
7449
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7505
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7450
7506
  } | undefined;
7451
7507
  errorMessage?: string | undefined;
7452
7508
  rawStopReason?: string | undefined;
@@ -7478,7 +7534,7 @@ declare const RunFactDefinitions: readonly [{
7478
7534
  })[];
7479
7535
  isError: boolean;
7480
7536
  timestamp: number;
7481
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7537
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7482
7538
  usage?: {
7483
7539
  input: number;
7484
7540
  output: number;
@@ -7536,7 +7592,7 @@ declare const RunFactDefinitions: readonly [{
7536
7592
  })[];
7537
7593
  isError: boolean;
7538
7594
  timestamp: number;
7539
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7595
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7540
7596
  usage?: {
7541
7597
  input: number;
7542
7598
  output: number;
@@ -7582,7 +7638,7 @@ declare const RunFactDefinitions: readonly [{
7582
7638
  })[];
7583
7639
  isError: boolean;
7584
7640
  timestamp: number;
7585
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7641
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7586
7642
  usage?: {
7587
7643
  input: number;
7588
7644
  output: number;
@@ -7640,7 +7696,7 @@ declare const RunFactDefinitions: readonly [{
7640
7696
  })[];
7641
7697
  isError: boolean;
7642
7698
  timestamp: number;
7643
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7699
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7644
7700
  usage?: {
7645
7701
  input: number;
7646
7702
  output: number;
@@ -7749,7 +7805,7 @@ declare const RunFactDefinitions: readonly [{
7749
7805
  }, {
7750
7806
  kind: "run.failed";
7751
7807
  payload: s.Schema<{
7752
- errorCode: "harness_interrupted" | "journal_error" | "model_aborted" | "model_unavailable" | "model_error" | "model_invalid_response" | "runtime_error" | "tool_boundary_error";
7808
+ errorCode: "model_error" | "harness_interrupted" | "journal_error" | "model_aborted" | "model_unavailable" | "model_invalid_response" | "runtime_error" | "tool_boundary_error";
7753
7809
  message: string;
7754
7810
  modelError?: {
7755
7811
  retryable: boolean;
@@ -7761,7 +7817,7 @@ declare const RunFactDefinitions: readonly [{
7761
7817
  runId: string;
7762
7818
  kind: "run.failed";
7763
7819
  payload: {
7764
- errorCode: "harness_interrupted" | "journal_error" | "model_aborted" | "model_unavailable" | "model_error" | "model_invalid_response" | "runtime_error" | "tool_boundary_error";
7820
+ errorCode: "model_error" | "harness_interrupted" | "journal_error" | "model_aborted" | "model_unavailable" | "model_invalid_response" | "runtime_error" | "tool_boundary_error";
7765
7821
  message: string;
7766
7822
  modelError?: {
7767
7823
  retryable: boolean;
@@ -7802,7 +7858,7 @@ declare const NewJournalFactSchema: s.Schema<{
7802
7858
  })[];
7803
7859
  source: {
7804
7860
  kind: string;
7805
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7861
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7806
7862
  };
7807
7863
  } | {
7808
7864
  kind: "context-event";
@@ -7854,7 +7910,7 @@ declare const NewJournalFactSchema: s.Schema<{
7854
7910
  kind: "container";
7855
7911
  name: string;
7856
7912
  attributes?: Record<string, string | number>;
7857
- children: _sorbetai_context3.ContextXmlElement[];
7913
+ children: _sorbetai_context4.ContextXmlElement[];
7858
7914
  };
7859
7915
  sourceId: string;
7860
7916
  provenance: {
@@ -7862,11 +7918,11 @@ declare const NewJournalFactSchema: s.Schema<{
7862
7918
  label: string;
7863
7919
  location?: string | undefined;
7864
7920
  };
7865
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7921
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7866
7922
  })[];
7867
7923
  source: {
7868
7924
  kind: string;
7869
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7925
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7870
7926
  };
7871
7927
  } | {
7872
7928
  kind: "write";
@@ -7874,14 +7930,14 @@ declare const NewJournalFactSchema: s.Schema<{
7874
7930
  text: string;
7875
7931
  source: {
7876
7932
  kind: string;
7877
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7933
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7878
7934
  };
7879
7935
  } | {
7880
7936
  kind: "reset";
7881
7937
  deliveryId: string;
7882
7938
  source: {
7883
7939
  kind: string;
7884
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
7940
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
7885
7941
  };
7886
7942
  };
7887
7943
  whenBusy: "followUp" | "steer";
@@ -8016,7 +8072,7 @@ declare const NewJournalFactSchema: s.Schema<{
8016
8072
  type: "toolCall";
8017
8073
  id: string;
8018
8074
  name: string;
8019
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
8075
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
8020
8076
  thoughtSignature?: string | undefined;
8021
8077
  argumentsError?: string | undefined;
8022
8078
  })[];
@@ -8053,7 +8109,7 @@ declare const NewJournalFactSchema: s.Schema<{
8053
8109
  stack?: string | undefined;
8054
8110
  code?: string | number | undefined;
8055
8111
  } | undefined;
8056
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
8112
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
8057
8113
  }[] | undefined;
8058
8114
  deferred?: {
8059
8115
  provider: string;
@@ -8062,7 +8118,7 @@ declare const NewJournalFactSchema: s.Schema<{
8062
8118
  id: string;
8063
8119
  expiresAt?: number | undefined;
8064
8120
  pollAfterMs?: number | undefined;
8065
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8121
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8066
8122
  } | undefined;
8067
8123
  errorMessage?: string | undefined;
8068
8124
  rawStopReason?: string | undefined;
@@ -8085,7 +8141,7 @@ declare const NewJournalFactSchema: s.Schema<{
8085
8141
  })[];
8086
8142
  isError: boolean;
8087
8143
  timestamp: number;
8088
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8144
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8089
8145
  usage?: {
8090
8146
  input: number;
8091
8147
  output: number;
@@ -8123,7 +8179,7 @@ declare const NewJournalFactSchema: s.Schema<{
8123
8179
  kind: "submission.applied";
8124
8180
  payload: {
8125
8181
  kind: "write" | "reset";
8126
- boundary: "final" | "immediate";
8182
+ boundary: "immediate" | "final";
8127
8183
  order: number;
8128
8184
  };
8129
8185
  } | {
@@ -8154,7 +8210,7 @@ declare const NewJournalFactSchema: s.Schema<{
8154
8210
  } | {
8155
8211
  runId: string;
8156
8212
  outcome: "unanswered";
8157
- reason: "failed" | "cancelled" | "interrupted" | "model_error";
8213
+ reason: "failed" | "model_error" | "cancelled" | "interrupted";
8158
8214
  };
8159
8215
  } | {
8160
8216
  sessionId: string;
@@ -8164,7 +8220,7 @@ declare const NewJournalFactSchema: s.Schema<{
8164
8220
  requestId: string;
8165
8221
  source: {
8166
8222
  kind: string;
8167
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8223
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8168
8224
  };
8169
8225
  model: {
8170
8226
  provider: string;
@@ -8218,7 +8274,7 @@ declare const NewJournalFactSchema: s.Schema<{
8218
8274
  type: "toolCall";
8219
8275
  id: string;
8220
8276
  name: string;
8221
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
8277
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
8222
8278
  thoughtSignature?: string | undefined;
8223
8279
  argumentsError?: string | undefined;
8224
8280
  })[];
@@ -8255,7 +8311,7 @@ declare const NewJournalFactSchema: s.Schema<{
8255
8311
  stack?: string | undefined;
8256
8312
  code?: string | number | undefined;
8257
8313
  } | undefined;
8258
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
8314
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
8259
8315
  }[] | undefined;
8260
8316
  deferred?: {
8261
8317
  provider: string;
@@ -8264,7 +8320,7 @@ declare const NewJournalFactSchema: s.Schema<{
8264
8320
  id: string;
8265
8321
  expiresAt?: number | undefined;
8266
8322
  pollAfterMs?: number | undefined;
8267
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8323
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8268
8324
  } | undefined;
8269
8325
  errorMessage?: string | undefined;
8270
8326
  rawStopReason?: string | undefined;
@@ -8287,7 +8343,7 @@ declare const NewJournalFactSchema: s.Schema<{
8287
8343
  })[];
8288
8344
  isError: boolean;
8289
8345
  timestamp: number;
8290
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8346
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8291
8347
  usage?: {
8292
8348
  input: number;
8293
8349
  output: number;
@@ -8336,7 +8392,7 @@ declare const NewJournalFactSchema: s.Schema<{
8336
8392
  type: "toolCall";
8337
8393
  id: string;
8338
8394
  name: string;
8339
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
8395
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
8340
8396
  thoughtSignature?: string | undefined;
8341
8397
  argumentsError?: string | undefined;
8342
8398
  })[];
@@ -8373,7 +8429,7 @@ declare const NewJournalFactSchema: s.Schema<{
8373
8429
  stack?: string | undefined;
8374
8430
  code?: string | number | undefined;
8375
8431
  } | undefined;
8376
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
8432
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
8377
8433
  }[] | undefined;
8378
8434
  deferred?: {
8379
8435
  provider: string;
@@ -8382,7 +8438,7 @@ declare const NewJournalFactSchema: s.Schema<{
8382
8438
  id: string;
8383
8439
  expiresAt?: number | undefined;
8384
8440
  pollAfterMs?: number | undefined;
8385
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8441
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8386
8442
  } | undefined;
8387
8443
  errorMessage?: string | undefined;
8388
8444
  rawStopReason?: string | undefined;
@@ -8410,10 +8466,10 @@ declare const NewJournalFactSchema: s.Schema<{
8410
8466
  activationId?: string | undefined;
8411
8467
  };
8412
8468
  revision: number;
8413
- data: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
8414
- sourceSequence: number;
8469
+ data: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
8415
8470
  recordType: string;
8416
8471
  recordVersion: number;
8472
+ sourceSequence: number;
8417
8473
  idempotencyKey?: string | undefined;
8418
8474
  };
8419
8475
  } | {
@@ -8423,15 +8479,15 @@ declare const NewJournalFactSchema: s.Schema<{
8423
8479
  payload: {
8424
8480
  toolCallId: string;
8425
8481
  name: string;
8426
- arguments: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
8482
+ arguments: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
8427
8483
  source: {
8428
8484
  kind: string;
8429
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8485
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8430
8486
  };
8431
8487
  binding?: {
8432
8488
  leaseId: string;
8433
8489
  bindingId: string;
8434
- descriptor: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
8490
+ descriptor: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
8435
8491
  } | undefined;
8436
8492
  };
8437
8493
  } | {
@@ -8443,7 +8499,7 @@ declare const NewJournalFactSchema: s.Schema<{
8443
8499
  toolCallId: string;
8444
8500
  toolName: string;
8445
8501
  reason: string;
8446
- parameters: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
8502
+ parameters: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
8447
8503
  taskId?: string | undefined;
8448
8504
  parentToolCallId?: string | undefined;
8449
8505
  };
@@ -8513,7 +8569,7 @@ declare const NewJournalFactSchema: s.Schema<{
8513
8569
  recovery?: "unsafe" | "safe" | undefined;
8514
8570
  toolName?: string | undefined;
8515
8571
  bindingId?: string | undefined;
8516
- parameters?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8572
+ parameters?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8517
8573
  hookInput?: {
8518
8574
  leaseId: string;
8519
8575
  } | undefined;
@@ -8538,7 +8594,7 @@ declare const NewJournalFactSchema: s.Schema<{
8538
8594
  data: string;
8539
8595
  mimeType: string;
8540
8596
  })[];
8541
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8597
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8542
8598
  usage?: {
8543
8599
  input: number;
8544
8600
  output: number;
@@ -8558,7 +8614,7 @@ declare const NewJournalFactSchema: s.Schema<{
8558
8614
  } | undefined;
8559
8615
  terminate?: boolean | undefined;
8560
8616
  isError?: boolean | undefined;
8561
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8617
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8562
8618
  };
8563
8619
  outputArchive?: {
8564
8620
  encoding: "utf-8";
@@ -8585,7 +8641,7 @@ declare const NewJournalFactSchema: s.Schema<{
8585
8641
  data: string;
8586
8642
  mimeType: string;
8587
8643
  })[];
8588
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8644
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8589
8645
  usage?: {
8590
8646
  input: number;
8591
8647
  output: number;
@@ -8605,7 +8661,7 @@ declare const NewJournalFactSchema: s.Schema<{
8605
8661
  } | undefined;
8606
8662
  terminate?: boolean | undefined;
8607
8663
  isError?: boolean | undefined;
8608
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8664
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8609
8665
  };
8610
8666
  cancelled: boolean;
8611
8667
  outputArchive?: {
@@ -8631,7 +8687,7 @@ declare const NewJournalFactSchema: s.Schema<{
8631
8687
  text: string;
8632
8688
  textSignature?: string | undefined;
8633
8689
  }[];
8634
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8690
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8635
8691
  } | undefined;
8636
8692
  outputArchive?: {
8637
8693
  encoding: "utf-8";
@@ -8658,7 +8714,7 @@ declare const NewJournalFactSchema: s.Schema<{
8658
8714
  data: string;
8659
8715
  mimeType: string;
8660
8716
  })[];
8661
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8717
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8662
8718
  usage?: {
8663
8719
  input: number;
8664
8720
  output: number;
@@ -8678,7 +8734,7 @@ declare const NewJournalFactSchema: s.Schema<{
8678
8734
  } | undefined;
8679
8735
  terminate?: boolean | undefined;
8680
8736
  isError?: boolean | undefined;
8681
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8737
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8682
8738
  } | undefined;
8683
8739
  message?: string | undefined;
8684
8740
  };
@@ -8719,7 +8775,7 @@ declare const NewJournalFactSchema: s.Schema<{
8719
8775
  };
8720
8776
  source: {
8721
8777
  kind: string;
8722
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8778
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8723
8779
  };
8724
8780
  } | {
8725
8781
  runId: string;
@@ -8740,7 +8796,7 @@ declare const NewJournalFactSchema: s.Schema<{
8740
8796
  type: "toolCall";
8741
8797
  id: string;
8742
8798
  name: string;
8743
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
8799
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
8744
8800
  thoughtSignature?: string | undefined;
8745
8801
  argumentsError?: string | undefined;
8746
8802
  })[];
@@ -8777,7 +8833,7 @@ declare const NewJournalFactSchema: s.Schema<{
8777
8833
  stack?: string | undefined;
8778
8834
  code?: string | number | undefined;
8779
8835
  } | undefined;
8780
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
8836
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
8781
8837
  }[] | undefined;
8782
8838
  deferred?: {
8783
8839
  provider: string;
@@ -8786,7 +8842,7 @@ declare const NewJournalFactSchema: s.Schema<{
8786
8842
  id: string;
8787
8843
  expiresAt?: number | undefined;
8788
8844
  pollAfterMs?: number | undefined;
8789
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8845
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8790
8846
  } | undefined;
8791
8847
  errorMessage?: string | undefined;
8792
8848
  rawStopReason?: string | undefined;
@@ -8809,7 +8865,7 @@ declare const NewJournalFactSchema: s.Schema<{
8809
8865
  })[];
8810
8866
  isError: boolean;
8811
8867
  timestamp: number;
8812
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8868
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8813
8869
  usage?: {
8814
8870
  input: number;
8815
8871
  output: number;
@@ -8852,9 +8908,9 @@ declare const NewJournalFactSchema: s.Schema<{
8852
8908
  contributionId: string;
8853
8909
  name: string;
8854
8910
  description: string;
8855
- parameters: Record<string, _sorbetai_schema32.JsonValue>;
8911
+ parameters: Record<string, _sorbetai_schema56.JsonValue>;
8856
8912
  label?: string | undefined;
8857
- outputSchema?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
8913
+ outputSchema?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
8858
8914
  discovery?: {
8859
8915
  exposure?: "direct" | "deferred" | "hidden" | undefined;
8860
8916
  namespace?: {
@@ -8862,7 +8918,7 @@ declare const NewJournalFactSchema: s.Schema<{
8862
8918
  description?: string | undefined;
8863
8919
  } | undefined;
8864
8920
  } | undefined;
8865
- metadata?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
8921
+ metadata?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
8866
8922
  }[];
8867
8923
  runYield?: {
8868
8924
  bindingId: string;
@@ -8880,7 +8936,7 @@ declare const NewJournalFactSchema: s.Schema<{
8880
8936
  namedStates?: {
8881
8937
  contributionId: string;
8882
8938
  stateName: string;
8883
- schema: Record<string, _sorbetai_schema32.JsonValue>;
8939
+ schema: Record<string, _sorbetai_schema56.JsonValue>;
8884
8940
  itemKey?: string | undefined;
8885
8941
  }[] | undefined;
8886
8942
  prefixes?: {
@@ -8897,11 +8953,11 @@ declare const NewJournalFactSchema: s.Schema<{
8897
8953
  contributionId: string;
8898
8954
  name: string;
8899
8955
  title: string;
8900
- stateSchema: Record<string, _sorbetai_schema32.JsonValue>;
8901
- initialState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8956
+ stateSchema: Record<string, _sorbetai_schema56.JsonValue>;
8957
+ initialState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8902
8958
  initialView?: {
8903
8959
  active: boolean;
8904
- contextState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
8960
+ contextState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
8905
8961
  constraints?: {
8906
8962
  toolNames: string[];
8907
8963
  workspace?: "read-only" | undefined;
@@ -9047,16 +9103,16 @@ declare const NewJournalFactSchema: s.Schema<{
9047
9103
  payload: {
9048
9104
  command: {
9049
9105
  name: string;
9050
- input: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
9106
+ input: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
9051
9107
  };
9052
9108
  name: string;
9053
9109
  title: string;
9054
9110
  contributionId: string;
9055
9111
  version: number;
9056
- state: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
9112
+ state: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
9057
9113
  view: {
9058
9114
  active: boolean;
9059
- contextState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
9115
+ contextState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9060
9116
  constraints?: {
9061
9117
  toolNames: string[];
9062
9118
  workspace?: "read-only" | undefined;
@@ -9087,11 +9143,11 @@ declare const NewJournalFactSchema: s.Schema<{
9087
9143
  contributionId: string;
9088
9144
  name: string;
9089
9145
  title: string;
9090
- stateSchema: Record<string, _sorbetai_schema32.JsonValue>;
9091
- initialState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
9146
+ stateSchema: Record<string, _sorbetai_schema56.JsonValue>;
9147
+ initialState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9092
9148
  initialView?: {
9093
9149
  active: boolean;
9094
- contextState?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
9150
+ contextState?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9095
9151
  constraints?: {
9096
9152
  toolNames: string[];
9097
9153
  workspace?: "read-only" | undefined;
@@ -9170,6 +9226,17 @@ declare const NewJournalFactSchema: s.Schema<{
9170
9226
  summaryMaxOutputTokens?: number | undefined;
9171
9227
  };
9172
9228
  sourceRunId?: string | undefined;
9229
+ stateBaseline?: {
9230
+ stateName: string;
9231
+ revision: number;
9232
+ value: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
9233
+ frame: {
9234
+ role: "user";
9235
+ content: string;
9236
+ };
9237
+ itemKey?: string | undefined;
9238
+ }[] | undefined;
9239
+ observerSummary?: string | undefined;
9173
9240
  mode?: "model" | "deterministic" | "observer" | undefined;
9174
9241
  compiler?: {
9175
9242
  entryId: string;
@@ -9202,7 +9269,7 @@ declare const NewJournalFactSchema: s.Schema<{
9202
9269
  kind: "compaction.model.requested";
9203
9270
  payload: {
9204
9271
  attemptId: string;
9205
- phase: "direct" | "chunk" | "merge" | "final" | "empty-retry" | "provider-reduction";
9272
+ phase: "final" | "direct" | "chunk" | "merge" | "empty-retry" | "provider-reduction";
9206
9273
  route: "direct" | "skeleton";
9207
9274
  depth: number;
9208
9275
  partIndex: number;
@@ -9237,7 +9304,7 @@ declare const NewJournalFactSchema: s.Schema<{
9237
9304
  type: "toolCall";
9238
9305
  id: string;
9239
9306
  name: string;
9240
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
9307
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
9241
9308
  thoughtSignature?: string | undefined;
9242
9309
  argumentsError?: string | undefined;
9243
9310
  })[];
@@ -9274,7 +9341,7 @@ declare const NewJournalFactSchema: s.Schema<{
9274
9341
  stack?: string | undefined;
9275
9342
  code?: string | number | undefined;
9276
9343
  } | undefined;
9277
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
9344
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
9278
9345
  }[] | undefined;
9279
9346
  deferred?: {
9280
9347
  provider: string;
@@ -9283,7 +9350,7 @@ declare const NewJournalFactSchema: s.Schema<{
9283
9350
  id: string;
9284
9351
  expiresAt?: number | undefined;
9285
9352
  pollAfterMs?: number | undefined;
9286
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
9353
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9287
9354
  } | undefined;
9288
9355
  errorMessage?: string | undefined;
9289
9356
  rawStopReason?: string | undefined;
@@ -9333,6 +9400,16 @@ declare const NewJournalFactSchema: s.Schema<{
9333
9400
  mode?: "model" | "deterministic" | "observer" | undefined;
9334
9401
  finalAttemptId?: string | undefined;
9335
9402
  attemptIds?: string[] | undefined;
9403
+ stateBaseline?: {
9404
+ stateName: string;
9405
+ revision: number;
9406
+ value: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
9407
+ frame: {
9408
+ role: "user";
9409
+ content: string;
9410
+ };
9411
+ itemKey?: string | undefined;
9412
+ }[] | undefined;
9336
9413
  };
9337
9414
  } | {
9338
9415
  sessionId: string;
@@ -9362,7 +9439,7 @@ declare const NewJournalFactSchema: s.Schema<{
9362
9439
  messageId: string;
9363
9440
  source: {
9364
9441
  kind: string;
9365
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
9442
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9366
9443
  };
9367
9444
  message: {
9368
9445
  role: "user";
@@ -9457,7 +9534,7 @@ declare const NewJournalFactSchema: s.Schema<{
9457
9534
  kind: "container";
9458
9535
  name: string;
9459
9536
  attributes?: Record<string, string | number>;
9460
- children: _sorbetai_context3.ContextXmlElement[];
9537
+ children: _sorbetai_context4.ContextXmlElement[];
9461
9538
  };
9462
9539
  sourceId: string;
9463
9540
  provenance: {
@@ -9465,7 +9542,7 @@ declare const NewJournalFactSchema: s.Schema<{
9465
9542
  label: string;
9466
9543
  location?: string | undefined;
9467
9544
  };
9468
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
9545
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9469
9546
  })[];
9470
9547
  yieldUsageLimit?: number | undefined;
9471
9548
  model?: {
@@ -9555,7 +9632,7 @@ declare const NewJournalFactSchema: s.Schema<{
9555
9632
  kind: "container";
9556
9633
  name: string;
9557
9634
  attributes?: Record<string, string | number>;
9558
- children: _sorbetai_context3.ContextXmlElement[];
9635
+ children: _sorbetai_context4.ContextXmlElement[];
9559
9636
  };
9560
9637
  sourceId: string;
9561
9638
  provenance: {
@@ -9563,7 +9640,7 @@ declare const NewJournalFactSchema: s.Schema<{
9563
9640
  label: string;
9564
9641
  location?: string | undefined;
9565
9642
  };
9566
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
9643
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9567
9644
  })[] | undefined;
9568
9645
  toolPermissionPolicy?: {
9569
9646
  fallback: {
@@ -9613,7 +9690,7 @@ declare const NewJournalFactSchema: s.Schema<{
9613
9690
  deliveryId: string;
9614
9691
  source: {
9615
9692
  kind: string;
9616
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
9693
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9617
9694
  };
9618
9695
  contextSources: ({
9619
9696
  lifecycle: "session";
@@ -9695,7 +9772,7 @@ declare const NewJournalFactSchema: s.Schema<{
9695
9772
  kind: "container";
9696
9773
  name: string;
9697
9774
  attributes?: Record<string, string | number>;
9698
- children: _sorbetai_context3.ContextXmlElement[];
9775
+ children: _sorbetai_context4.ContextXmlElement[];
9699
9776
  };
9700
9777
  sourceId: string;
9701
9778
  provenance: {
@@ -9703,7 +9780,7 @@ declare const NewJournalFactSchema: s.Schema<{
9703
9780
  label: string;
9704
9781
  location?: string | undefined;
9705
9782
  };
9706
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
9783
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9707
9784
  })[];
9708
9785
  yieldUsageLimit?: number | undefined;
9709
9786
  model?: {
@@ -9790,7 +9867,7 @@ declare const NewJournalFactSchema: s.Schema<{
9790
9867
  kind: "container";
9791
9868
  name: string;
9792
9869
  attributes?: Record<string, string | number>;
9793
- children: _sorbetai_context3.ContextXmlElement[];
9870
+ children: _sorbetai_context4.ContextXmlElement[];
9794
9871
  };
9795
9872
  sourceId: string;
9796
9873
  provenance: {
@@ -9798,7 +9875,7 @@ declare const NewJournalFactSchema: s.Schema<{
9798
9875
  label: string;
9799
9876
  location?: string | undefined;
9800
9877
  };
9801
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
9878
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9802
9879
  })[] | undefined;
9803
9880
  toolPermissionPolicy?: {
9804
9881
  fallback: {
@@ -9891,7 +9968,7 @@ declare const NewJournalFactSchema: s.Schema<{
9891
9968
  };
9892
9969
  source: {
9893
9970
  kind: string;
9894
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
9971
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9895
9972
  };
9896
9973
  deliveryId?: string | undefined;
9897
9974
  } | {
@@ -9978,7 +10055,7 @@ declare const NewJournalFactSchema: s.Schema<{
9978
10055
  kind: "container";
9979
10056
  name: string;
9980
10057
  attributes?: Record<string, string | number>;
9981
- children: _sorbetai_context3.ContextXmlElement[];
10058
+ children: _sorbetai_context4.ContextXmlElement[];
9982
10059
  };
9983
10060
  sourceId: string;
9984
10061
  provenance: {
@@ -9986,12 +10063,12 @@ declare const NewJournalFactSchema: s.Schema<{
9986
10063
  label: string;
9987
10064
  location?: string | undefined;
9988
10065
  };
9989
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10066
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9990
10067
  })[];
9991
10068
  deliveryId: string;
9992
10069
  source: {
9993
10070
  kind: string;
9994
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10071
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
9995
10072
  };
9996
10073
  };
9997
10074
  } | {
@@ -10050,7 +10127,7 @@ declare const NewJournalFactSchema: s.Schema<{
10050
10127
  };
10051
10128
  namedStates: ({
10052
10129
  present: true;
10053
- value: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
10130
+ value: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
10054
10131
  stateName: string;
10055
10132
  revision: number;
10056
10133
  delivery: {
@@ -10129,7 +10206,7 @@ declare const NewJournalFactSchema: s.Schema<{
10129
10206
  kind: "container";
10130
10207
  name: string;
10131
10208
  attributes?: Record<string, string | number>;
10132
- children: _sorbetai_context3.ContextXmlElement[];
10209
+ children: _sorbetai_context4.ContextXmlElement[];
10133
10210
  };
10134
10211
  sourceId: string;
10135
10212
  provenance: {
@@ -10137,7 +10214,7 @@ declare const NewJournalFactSchema: s.Schema<{
10137
10214
  label: string;
10138
10215
  location?: string | undefined;
10139
10216
  };
10140
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10217
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10141
10218
  })[];
10142
10219
  delivery: {
10143
10220
  kind: "append";
@@ -10194,7 +10271,7 @@ declare const NewJournalFactSchema: s.Schema<{
10194
10271
  location?: string | undefined;
10195
10272
  };
10196
10273
  placement?: "before-conversation" | undefined;
10197
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10274
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10198
10275
  }[];
10199
10276
  afterMessageCount: number;
10200
10277
  modelView?: {
@@ -10252,7 +10329,7 @@ declare const NewJournalFactSchema: s.Schema<{
10252
10329
  type: "toolCall";
10253
10330
  id: string;
10254
10331
  name: string;
10255
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
10332
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
10256
10333
  thoughtSignature?: string | undefined;
10257
10334
  argumentsError?: string | undefined;
10258
10335
  })[];
@@ -10289,7 +10366,7 @@ declare const NewJournalFactSchema: s.Schema<{
10289
10366
  stack?: string | undefined;
10290
10367
  code?: string | number | undefined;
10291
10368
  } | undefined;
10292
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
10369
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
10293
10370
  }[] | undefined;
10294
10371
  deferred?: {
10295
10372
  provider: string;
@@ -10298,7 +10375,7 @@ declare const NewJournalFactSchema: s.Schema<{
10298
10375
  id: string;
10299
10376
  expiresAt?: number | undefined;
10300
10377
  pollAfterMs?: number | undefined;
10301
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10378
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10302
10379
  } | undefined;
10303
10380
  errorMessage?: string | undefined;
10304
10381
  rawStopReason?: string | undefined;
@@ -10321,7 +10398,7 @@ declare const NewJournalFactSchema: s.Schema<{
10321
10398
  })[];
10322
10399
  isError: boolean;
10323
10400
  timestamp: number;
10324
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10401
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10325
10402
  usage?: {
10326
10403
  input: number;
10327
10404
  output: number;
@@ -10368,18 +10445,6 @@ declare const NewJournalFactSchema: s.Schema<{
10368
10445
  } | {
10369
10446
  kind: "inline";
10370
10447
  message: {
10371
- role: "user";
10372
- content: string | ({
10373
- type: "text";
10374
- text: string;
10375
- textSignature?: string | undefined;
10376
- } | {
10377
- type: "image";
10378
- data: string;
10379
- mimeType: string;
10380
- })[];
10381
- timestamp: number;
10382
- } | {
10383
10448
  role: "assistant";
10384
10449
  content: ({
10385
10450
  type: "text";
@@ -10394,7 +10459,7 @@ declare const NewJournalFactSchema: s.Schema<{
10394
10459
  type: "toolCall";
10395
10460
  id: string;
10396
10461
  name: string;
10397
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
10462
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
10398
10463
  thoughtSignature?: string | undefined;
10399
10464
  argumentsError?: string | undefined;
10400
10465
  })[];
@@ -10431,7 +10496,7 @@ declare const NewJournalFactSchema: s.Schema<{
10431
10496
  stack?: string | undefined;
10432
10497
  code?: string | number | undefined;
10433
10498
  } | undefined;
10434
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
10499
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
10435
10500
  }[] | undefined;
10436
10501
  deferred?: {
10437
10502
  provider: string;
@@ -10440,7 +10505,7 @@ declare const NewJournalFactSchema: s.Schema<{
10440
10505
  id: string;
10441
10506
  expiresAt?: number | undefined;
10442
10507
  pollAfterMs?: number | undefined;
10443
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10508
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10444
10509
  } | undefined;
10445
10510
  errorMessage?: string | undefined;
10446
10511
  rawStopReason?: string | undefined;
@@ -10448,6 +10513,18 @@ declare const NewJournalFactSchema: s.Schema<{
10448
10513
  providerThinkingLevel?: string | undefined;
10449
10514
  endTurn?: boolean | undefined;
10450
10515
  durationMs?: number | undefined;
10516
+ } | {
10517
+ role: "user";
10518
+ content: string | ({
10519
+ type: "text";
10520
+ text: string;
10521
+ textSignature?: string | undefined;
10522
+ } | {
10523
+ type: "image";
10524
+ data: string;
10525
+ mimeType: string;
10526
+ })[];
10527
+ timestamp: number;
10451
10528
  } | {
10452
10529
  role: "toolResult";
10453
10530
  toolCallId: string;
@@ -10463,7 +10540,7 @@ declare const NewJournalFactSchema: s.Schema<{
10463
10540
  })[];
10464
10541
  isError: boolean;
10465
10542
  timestamp: number;
10466
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10543
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10467
10544
  usage?: {
10468
10545
  input: number;
10469
10546
  output: number;
@@ -10539,7 +10616,7 @@ declare const NewJournalFactSchema: s.Schema<{
10539
10616
  toolCallId: string;
10540
10617
  toolName: string;
10541
10618
  reason: string;
10542
- parameters: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
10619
+ parameters: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
10543
10620
  taskId?: string | undefined;
10544
10621
  parentToolCallId?: string | undefined;
10545
10622
  };
@@ -10616,7 +10693,7 @@ declare const NewJournalFactSchema: s.Schema<{
10616
10693
  recovery?: "unsafe" | "safe" | undefined;
10617
10694
  toolName?: string | undefined;
10618
10695
  bindingId?: string | undefined;
10619
- parameters?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10696
+ parameters?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10620
10697
  hookInput?: {
10621
10698
  leaseId: string;
10622
10699
  } | undefined;
@@ -10641,7 +10718,7 @@ declare const NewJournalFactSchema: s.Schema<{
10641
10718
  data: string;
10642
10719
  mimeType: string;
10643
10720
  })[];
10644
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10721
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10645
10722
  usage?: {
10646
10723
  input: number;
10647
10724
  output: number;
@@ -10661,7 +10738,7 @@ declare const NewJournalFactSchema: s.Schema<{
10661
10738
  } | undefined;
10662
10739
  terminate?: boolean | undefined;
10663
10740
  isError?: boolean | undefined;
10664
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10741
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10665
10742
  };
10666
10743
  outputArchive?: {
10667
10744
  encoding: "utf-8";
@@ -10688,7 +10765,7 @@ declare const NewJournalFactSchema: s.Schema<{
10688
10765
  data: string;
10689
10766
  mimeType: string;
10690
10767
  })[];
10691
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10768
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10692
10769
  usage?: {
10693
10770
  input: number;
10694
10771
  output: number;
@@ -10708,7 +10785,7 @@ declare const NewJournalFactSchema: s.Schema<{
10708
10785
  } | undefined;
10709
10786
  terminate?: boolean | undefined;
10710
10787
  isError?: boolean | undefined;
10711
- structuredContent?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10788
+ structuredContent?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10712
10789
  };
10713
10790
  cancelled: boolean;
10714
10791
  outputArchive?: {
@@ -10734,7 +10811,7 @@ declare const NewJournalFactSchema: s.Schema<{
10734
10811
  text: string;
10735
10812
  textSignature?: string | undefined;
10736
10813
  }[];
10737
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10814
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10738
10815
  } | undefined;
10739
10816
  outputArchive?: {
10740
10817
  encoding: "utf-8";
@@ -10767,7 +10844,7 @@ declare const NewJournalFactSchema: s.Schema<{
10767
10844
  type: "toolCall";
10768
10845
  id: string;
10769
10846
  name: string;
10770
- arguments: Record<string, _sorbetai_schema32.JsonValue>;
10847
+ arguments: Record<string, _sorbetai_schema56.JsonValue>;
10771
10848
  thoughtSignature?: string | undefined;
10772
10849
  argumentsError?: string | undefined;
10773
10850
  })[];
@@ -10804,7 +10881,7 @@ declare const NewJournalFactSchema: s.Schema<{
10804
10881
  stack?: string | undefined;
10805
10882
  code?: string | number | undefined;
10806
10883
  } | undefined;
10807
- details?: Record<string, _sorbetai_schema32.JsonValue> | undefined;
10884
+ details?: Record<string, _sorbetai_schema56.JsonValue> | undefined;
10808
10885
  }[] | undefined;
10809
10886
  deferred?: {
10810
10887
  provider: string;
@@ -10813,7 +10890,7 @@ declare const NewJournalFactSchema: s.Schema<{
10813
10890
  id: string;
10814
10891
  expiresAt?: number | undefined;
10815
10892
  pollAfterMs?: number | undefined;
10816
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10893
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10817
10894
  } | undefined;
10818
10895
  errorMessage?: string | undefined;
10819
10896
  rawStopReason?: string | undefined;
@@ -10846,7 +10923,7 @@ declare const NewJournalFactSchema: s.Schema<{
10846
10923
  })[];
10847
10924
  isError: boolean;
10848
10925
  timestamp: number;
10849
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10926
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10850
10927
  usage?: {
10851
10928
  input: number;
10852
10929
  output: number;
@@ -10904,7 +10981,7 @@ declare const NewJournalFactSchema: s.Schema<{
10904
10981
  })[];
10905
10982
  isError: boolean;
10906
10983
  timestamp: number;
10907
- details?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
10984
+ details?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
10908
10985
  usage?: {
10909
10986
  input: number;
10910
10987
  output: number;
@@ -10974,7 +11051,7 @@ declare const NewJournalFactSchema: s.Schema<{
10974
11051
  runId: string;
10975
11052
  kind: "run.failed";
10976
11053
  payload: {
10977
- errorCode: "harness_interrupted" | "journal_error" | "model_aborted" | "model_unavailable" | "model_error" | "model_invalid_response" | "runtime_error" | "tool_boundary_error";
11054
+ errorCode: "model_error" | "harness_interrupted" | "journal_error" | "model_aborted" | "model_unavailable" | "model_invalid_response" | "runtime_error" | "tool_boundary_error";
10978
11055
  message: string;
10979
11056
  modelError?: {
10980
11057
  retryable: boolean;
@@ -10992,6 +11069,7 @@ declare const NewJournalFactSchema: s.Schema<{
10992
11069
  declare const JournalFactSchema: s.Schema<JournalFact>;
10993
11070
  type SessionForkedPayload = s.Static<typeof SessionForkedPayloadSchema>;
10994
11071
  type ModelRequestBaseCommittedPayload = s.Static<typeof ModelRequestBaseCommittedPayloadSchema>;
11072
+ type CompactionStateBaselineEntry = s.Static<typeof CompactionStateBaselineEntrySchema>;
10995
11073
  type ModelRequestContextSnapshot = s.Static<typeof ModelRequestContextSnapshotSchema>;
10996
11074
  type EffectUnknownPayload = s.Static<typeof EffectUnknownPayloadSchema>;
10997
11075
  type ToolOutputArchiveRecord = s.Static<typeof ToolOutputArchiveRecordSchema>;
@@ -11141,144 +11219,598 @@ type JournalRecoveryFact = { [Kind in JournalFactKind]: Pick<Extract<JournalFact
11141
11219
  };
11142
11220
  } : object) }[JournalFactKind];
11143
11221
  //#endregion
11144
- //#region src/journal/unit/contracts.d.ts
11145
- declare const UnitFactSchema: s.Schema<{
11146
- id: string;
11147
- recordedAt: string;
11148
- schemaVersion: 1;
11149
- taskId: string;
11150
- kind: "task.created";
11151
- payload: {
11152
- kind: string;
11153
- version: number;
11154
- owner: {
11155
- session: string;
11156
- } | {
11157
- task: string;
11158
- };
11159
- background: boolean;
11160
- creationKey: string;
11161
- input: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
11162
- checkpoint: Record<string, _sorbetai_schema32.JsonValue> & {
11163
- phase: string;
11164
- };
11165
- };
11166
- } | {
11167
- id: string;
11168
- recordedAt: string;
11169
- schemaVersion: 1;
11170
- taskId: string;
11171
- kind: "task.imported";
11172
- payload: {
11173
- owner: {
11174
- session: string;
11175
- };
11176
- result: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
11177
- kind: string;
11178
- version: number;
11179
- background: boolean;
11180
- creationKey: string;
11181
- input: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
11182
- checkpoint: Record<string, _sorbetai_schema32.JsonValue> & {
11183
- phase: string;
11184
- };
11185
- };
11186
- } | {
11187
- id: string;
11188
- recordedAt: string;
11189
- schemaVersion: 1;
11190
- taskId: string;
11191
- kind: "task.reserved";
11192
- payload: {
11193
- epochId: string;
11194
- phase: string;
11195
- invocationId: string;
11196
- mode: "phase" | "abort";
11197
- definitionSource?: {
11198
- package: string;
11199
- version: string;
11200
- } | undefined;
11201
- };
11202
- } | {
11203
- id: string;
11204
- recordedAt: string;
11205
- schemaVersion: 1;
11206
- taskId: string;
11207
- kind: "task.transitioned";
11208
- payload: {
11209
- status: "pending";
11210
- checkpoint: Record<string, _sorbetai_schema32.JsonValue> & {
11211
- phase: string;
11212
- };
11213
- fromPhase: string;
11214
- invocationId?: string | undefined;
11215
- } | {
11216
- status: "waiting";
11217
- on: ({
11218
- task: string;
11219
- } | {
11220
- signal: string;
11221
- } | {
11222
- run: string;
11223
- } | {
11224
- submission: string;
11225
- })[];
11226
- policy: "allSettled" | "firstSettled";
11227
- checkpoint: Record<string, _sorbetai_schema32.JsonValue> & {
11228
- phase: string;
11229
- };
11230
- fromPhase: string;
11231
- invocationId?: string | undefined;
11232
- } | {
11233
- status: "sleeping";
11234
- until: number;
11235
- checkpoint: Record<string, _sorbetai_schema32.JsonValue> & {
11236
- phase: string;
11237
- };
11238
- fromPhase: string;
11239
- invocationId?: string | undefined;
11240
- };
11241
- } | {
11242
- id: string;
11243
- recordedAt: string;
11244
- schemaVersion: 1;
11245
- taskId: string;
11246
- kind: "task.recovered";
11247
- payload: {
11248
- epochId: string;
11249
- priorState: "pending" | "running";
11250
- restarts: number;
11251
- };
11252
- } | {
11253
- id: string;
11254
- recordedAt: string;
11255
- schemaVersion: 1;
11256
- taskId: string;
11257
- kind: "task.suspended";
11258
- payload: {
11259
- invocationId: string;
11260
- };
11261
- } | {
11262
- id: string;
11263
- recordedAt: string;
11264
- schemaVersion: 1;
11265
- taskId: string;
11266
- kind: "task.parked";
11267
- payload: {
11268
- restarts: number;
11269
- reason: "restart_limit";
11270
- };
11271
- } | {
11272
- id: string;
11273
- recordedAt: string;
11274
- schemaVersion: 1;
11275
- taskId: string;
11276
- kind: "task.retried";
11277
- payload: {
11278
- commandId: string;
11279
- };
11280
- } | {
11281
- id: string;
11222
+ //#region src/observation/contracts.d.ts
11223
+ interface ObservationTraceContext {
11224
+ readonly traceparent: string;
11225
+ readonly tracestate?: string;
11226
+ }
11227
+ interface RunIdentity {
11228
+ readonly sessionId: string;
11229
+ readonly runId: string;
11230
+ }
11231
+ interface DurableEvidence {
11232
+ readonly factId: string;
11233
+ readonly cursor: string;
11234
+ readonly sequence: number;
11235
+ }
11236
+ interface ObservationTiming {
11237
+ /** Wall-clock span anchors for presentation; durationSeconds alone measures elapsed time. */
11238
+ readonly startedAtUnixMs?: number;
11239
+ readonly endedAtUnixMs?: number;
11240
+ }
11241
+ interface RunAdmittedObservation extends RunIdentity, DurableEvidence {
11242
+ readonly cause: 'user-message' | 'context-event';
11243
+ }
11244
+ interface RunSettledObservation extends RunIdentity, DurableEvidence, ObservationTiming {
11245
+ readonly outcome: 'completed' | 'failed' | 'cancelled';
11246
+ readonly failureCode?: string;
11247
+ /** Admission through durable terminal within this process; absent for recovered admissions. */
11248
+ readonly durationSeconds?: number;
11249
+ }
11250
+ interface ContextPreparationObservation extends RunIdentity, ObservationTiming {
11251
+ readonly logicalModelCallId: string;
11252
+ readonly durationSeconds: number;
11253
+ readonly outcome: 'prepared' | 'failed' | 'cancelled';
11254
+ readonly mode: 'prepare' | 'rebase';
11255
+ readonly contextEpoch?: number;
11256
+ }
11257
+ interface ContextCapacityObservation extends RunIdentity {
11258
+ readonly reason: 'input_limit' | 'compaction_ineffective' | 'provider_overflow';
11259
+ readonly estimatedContextTokens?: number;
11260
+ readonly inputLimit: number;
11261
+ readonly contextWindow: number;
11262
+ }
11263
+ interface ModelAttemptObservation extends RunIdentity, DurableEvidence, ObservationTiming {
11264
+ /** Complete response Tool identities for causal correlation; no arguments or content. */
11265
+ readonly toolCallIds?: readonly string[];
11266
+ readonly logicalModelCallId: string;
11267
+ readonly modelRequestId: string;
11268
+ readonly provider: string;
11269
+ /** Correlation detail; exporters must map this to a bounded model vocabulary. */
11270
+ readonly modelId: string;
11271
+ readonly outcome: 'pending' | 'stop' | 'length' | 'toolUse' | 'deferred' | 'error' | 'aborted';
11272
+ /** Provider dispatch through Pi's complete response, excluding durable response commit. */
11273
+ readonly durationSeconds: number;
11274
+ /** Dispatch to the first nonempty Pi text_delta. Thinking and tool arguments are excluded. */
11275
+ readonly firstTokenSeconds?: number;
11276
+ readonly firstTokenUnavailableReason?: 'no_text_delta';
11277
+ readonly streamDurationSeconds?: number;
11278
+ readonly responseCommitSeconds: number;
11279
+ /** Pi uses zero-filled defaults when usage was not obtained; all-zero usage has no proven provenance. */
11280
+ readonly usageQuality: 'reported' | 'unavailable';
11281
+ readonly usageUnavailableReason?: 'pi_zero_usage_without_provenance';
11282
+ readonly inputTokens: number;
11283
+ readonly outputTokens: number;
11284
+ readonly cacheReadTokens: number;
11285
+ readonly cacheWriteTokens: number;
11286
+ readonly reasoningTokens?: number;
11287
+ readonly costUsd: number;
11288
+ /** Pi's completed-response Context anchor, including output; distinct from dispatched input. */
11289
+ readonly contextTokens?: number;
11290
+ readonly contextWindow: number;
11291
+ }
11292
+ /**
11293
+ * Volatile settlement of a physical Pi dispatch, emitted before response persistence.
11294
+ * Durable evidence references model.requested; it does not establish a committed response.
11295
+ */
11296
+ interface ModelProviderObservation extends RunIdentity, DurableEvidence, ObservationTiming {
11297
+ readonly logicalModelCallId: string;
11298
+ readonly modelRequestId: string;
11299
+ readonly provider: string;
11300
+ /** Correlation detail; exporters must map this to a bounded model vocabulary. */
11301
+ readonly modelId: string;
11302
+ readonly outcome: ModelAttemptObservation['outcome'];
11303
+ /** Pi supplied a complete response; false for a raw dispatch throw before that boundary. */
11304
+ readonly responseAvailable: boolean;
11305
+ readonly cancellationRequested: boolean;
11306
+ /** Pi dispatch through complete response or dispatch throw, excluding response persistence. */
11307
+ readonly durationSeconds: number;
11308
+ /** Dispatch to the first nonempty Pi text_delta. Thinking and tool arguments are excluded. */
11309
+ readonly firstTokenSeconds?: number;
11310
+ readonly firstTokenUnavailableReason?: 'no_text_delta';
11311
+ readonly streamDurationSeconds?: number;
11312
+ }
11313
+ /** Pi dispatch attempt after durable write-ahead; this does not prove the Provider received it. */
11314
+ interface ModelDispatchObservation extends RunIdentity, DurableEvidence {
11315
+ readonly logicalModelCallId: string;
11316
+ readonly modelRequestId: string;
11317
+ readonly provider: string;
11318
+ /** Correlation detail; exporters must map this to a bounded model vocabulary. */
11319
+ readonly modelId: string;
11320
+ readonly estimatedContextTokens: number;
11321
+ readonly contextWindow: number;
11322
+ readonly dispatchedAtUnixMs: number;
11323
+ }
11324
+ interface ModelUnknownObservation extends RunIdentity, DurableEvidence {
11325
+ readonly modelRequestId: string;
11326
+ }
11327
+ interface ModelRetryObservation extends RunIdentity {
11328
+ readonly logicalModelCallId: string;
11329
+ readonly failedModelRequestId: string;
11330
+ readonly attempt: number;
11331
+ readonly delaySeconds: number;
11332
+ }
11333
+ interface ModelRetryWaitObservation extends RunIdentity, ObservationTiming {
11334
+ readonly logicalModelCallId: string;
11335
+ readonly failedModelRequestId: string;
11336
+ readonly attempt: number;
11337
+ readonly scheduledDelaySeconds: number;
11338
+ readonly durationSeconds: number;
11339
+ readonly outcome: 'elapsed' | 'cancelled' | 'interrupted';
11340
+ }
11341
+ interface RunExecutionObservation extends RunIdentity {
11342
+ readonly startedAtUnixMs: number;
11343
+ }
11344
+ interface RunDrainObservation extends RunIdentity {
11345
+ readonly outcome: 'drained' | 'failed';
11346
+ readonly endedAtUnixMs: number;
11347
+ readonly cancelToDrainSeconds?: number;
11348
+ }
11349
+ interface WaitIdentityObservation extends RunIdentity {
11350
+ readonly reason: 'resource' | 'permission' | 'approval' | 'approval_review';
11351
+ readonly toolCallId?: string;
11352
+ readonly approvalRequestId?: string;
11353
+ }
11354
+ interface WaitStartedObservation extends WaitIdentityObservation {
11355
+ readonly startedAtUnixMs: number;
11356
+ /** Current-process monotonic origin only; never a durable or cross-process clock. */
11357
+ readonly startedAtMonoMs: number;
11358
+ }
11359
+ interface WaitSettledObservation extends WaitIdentityObservation {
11360
+ readonly endedAtUnixMs: number;
11361
+ readonly endedAtMonoMs: number;
11362
+ }
11363
+ interface RunResourceWaitObservation extends RunIdentity, ObservationTiming {
11364
+ readonly outcome: 'acquired' | 'cancelled' | 'failed';
11365
+ readonly durationSeconds: number;
11366
+ }
11367
+ interface ToolExecutionObservation extends RunIdentity, ObservationTiming {
11368
+ readonly toolCallId: string;
11369
+ readonly effectAttemptId: string;
11370
+ /** Correlation detail; exporters must map this to a bounded tool class. */
11371
+ readonly toolName: string;
11372
+ readonly durationSeconds: number;
11373
+ readonly outcome: 'succeeded' | 'failed' | 'cancelled';
11374
+ }
11375
+ interface ToolExecutionStartedObservation extends RunIdentity {
11376
+ readonly toolCallId: string;
11377
+ readonly effectAttemptId: string;
11378
+ readonly toolName: string;
11379
+ readonly startedAtUnixMs: number;
11380
+ }
11381
+ interface ToolPermissionObservation extends RunIdentity, DurableEvidence, ObservationTiming {
11382
+ readonly toolCallId: string;
11383
+ readonly durationSeconds: number;
11384
+ readonly outcome: 'allowed' | 'denied' | 'failed';
11385
+ }
11386
+ interface EffectObservation extends RunIdentity, DurableEvidence {
11387
+ readonly effectAttemptId: string;
11388
+ readonly outcome: 'succeeded' | 'failed' | 'unknown';
11389
+ }
11390
+ interface JournalBatchObservation extends ObservationTiming {
11391
+ readonly sessionId: string;
11392
+ readonly durationSeconds: number;
11393
+ readonly outcome: 'committed' | 'failed';
11394
+ readonly backend: 'jsonl';
11395
+ readonly factCount: number;
11396
+ /** Physical encoded frame size; absent when encoding fails. */
11397
+ readonly bytes?: number;
11398
+ readonly throughSequence?: number;
11399
+ }
11400
+ interface JournalReopenObservation extends ObservationTiming {
11401
+ readonly sessionId?: string;
11402
+ readonly durationSeconds: number;
11403
+ readonly outcome: 'opened' | 'failed';
11404
+ readonly backend: 'jsonl';
11405
+ readonly factCount?: number;
11406
+ readonly fileBytes?: number;
11407
+ }
11408
+ interface JournalQueueObservation {
11409
+ readonly sessionId: string;
11410
+ /** Outstanding prepared facts, including a batch waiting for durable storage. */
11411
+ readonly pendingFacts: number;
11412
+ /** Already-encoded UTF-8 fact bytes; storage framing and Artifact offload are excluded. */
11413
+ readonly pendingBytes: number;
11414
+ }
11415
+ interface JournalProjectionObservation extends ObservationTiming {
11416
+ readonly sessionId: string;
11417
+ readonly view: 'usage' | 'inspector';
11418
+ readonly outcome: 'projected' | 'failed';
11419
+ /** In-memory projection only; Journal IO and queued-reader wait are excluded. */
11420
+ readonly durationSeconds: number;
11421
+ readonly throughSequence?: number;
11422
+ }
11423
+ interface CompactionObservation extends ObservationTiming {
11424
+ readonly sessionId: string;
11425
+ readonly runId?: string;
11426
+ readonly compactionId?: string;
11427
+ readonly reason: 'manual' | 'threshold' | 'overflow';
11428
+ readonly outcome: 'not-needed' | 'suppressed' | 'compacted' | 'failed' | 'cancelled';
11429
+ readonly durationSeconds: number;
11430
+ /** Comparable complete-request projections using the compactor's existing token estimator. */
11431
+ readonly contextTokensBefore?: number;
11432
+ readonly projectedContextTokensAfter?: number;
11433
+ readonly measurement: 'estimated';
11434
+ readonly attemptCount?: number;
11435
+ }
11436
+ /**
11437
+ * An epoch-scoped compaction computation needed an older fact and was repeated over the
11438
+ * whole Journal. The answer is unchanged; a recurring fallback means the epoch scope is
11439
+ * missing evidence and every compaction pays for a full Journal read.
11440
+ */
11441
+ interface CompactionSourceFallbackObservation {
11442
+ readonly sessionId: string;
11443
+ /** Error class name of the scoped failure; bounded vocabulary. */
11444
+ readonly errorName: string;
11445
+ /** Internal projection error text; carries identities, never Context content. */
11446
+ readonly errorMessage: string;
11447
+ }
11448
+ type ModelUsageScalars = Pick<ModelAttemptObservation, 'usageQuality' | 'inputTokens' | 'outputTokens' | 'cacheReadTokens' | 'cacheWriteTokens' | 'reasoningTokens' | 'costUsd'>;
11449
+ interface CompactionModelObservation extends DurableEvidence, ObservationTiming, ModelUsageScalars {
11450
+ readonly sessionId: string;
11451
+ readonly runId?: string;
11452
+ readonly compactionId: string;
11453
+ readonly attemptId: string;
11454
+ readonly phase: 'direct' | 'chunk' | 'merge' | 'final' | 'empty-retry' | 'provider-reduction';
11455
+ readonly provider: string;
11456
+ readonly modelId: string;
11457
+ readonly outcome: ModelAttemptObservation['outcome'] | 'failed';
11458
+ readonly estimatedInputTokens: number;
11459
+ readonly durationSeconds: number;
11460
+ readonly responseCommitSeconds: number;
11461
+ readonly usageSource: 'provider_reported';
11462
+ readonly firstTokenUnavailableReason: 'complete_api_no_stream';
11463
+ }
11464
+ /** Volatile physical summary settlement; evidence references compaction.model.requested. */
11465
+ interface CompactionProviderObservation extends DurableEvidence, ObservationTiming {
11466
+ readonly sessionId: string;
11467
+ readonly runId?: string;
11468
+ readonly compactionId: string;
11469
+ readonly attemptId: string;
11470
+ readonly phase: CompactionModelObservation['phase'];
11471
+ readonly provider: string;
11472
+ readonly modelId: string;
11473
+ readonly outcome: ModelAttemptObservation['outcome'];
11474
+ /** Pi supplied a complete response; false when the summary call threw instead. */
11475
+ readonly responseAvailable: boolean;
11476
+ readonly cancellationRequested: boolean;
11477
+ readonly durationSeconds: number;
11478
+ readonly firstTokenUnavailableReason: 'complete_api_no_stream';
11479
+ }
11480
+ interface ApprovalReviewObservation extends RunIdentity, DurableEvidence, ObservationTiming, ModelUsageScalars {
11481
+ readonly reviewId: string;
11482
+ readonly toolCallId: string;
11483
+ readonly provider: string;
11484
+ readonly modelId: string;
11485
+ readonly outcome: 'allow' | 'ask';
11486
+ readonly failureCode?: string;
11487
+ readonly completionDispatched: boolean;
11488
+ /** Caller wait for opaque Host completion, including timeout/cancel; no Provider, TTFT or drain claim. */
11489
+ readonly completionDurationSeconds?: number;
11490
+ readonly durationSeconds: number;
11491
+ readonly usageSource: 'reviewer_reported';
11492
+ }
11493
+ type ContextAttributionSection = 'system' | 'conversation' | 'tools' | 'state' | 'turn' | 'request' | 'other';
11494
+ interface ContextSectionEstimate {
11495
+ readonly section: ContextAttributionSection;
11496
+ readonly estimatedTokens: number;
11497
+ }
11498
+ interface ContextAttributionObservation extends RunIdentity, DurableEvidence {
11499
+ readonly modelRequestId: string;
11500
+ readonly logicalModelCallId: string;
11501
+ readonly provider: string;
11502
+ readonly modelId: string;
11503
+ readonly tokenizer: 'sorbet-character-estimate-v1';
11504
+ readonly measurement: 'estimated';
11505
+ readonly evidenceOrigin: 'compiled_request';
11506
+ readonly contextEpoch: number;
11507
+ readonly prefixRevision: number;
11508
+ readonly sections: readonly ContextSectionEstimate[];
11509
+ readonly estimatedTotalTokens: number;
11510
+ readonly multimodal: boolean;
11511
+ readonly delta?: {
11512
+ readonly previousModelRequestId: string;
11513
+ readonly comparable: boolean;
11514
+ readonly reason?: 'model_changed' | 'multimodal' | 'context_epoch_changed';
11515
+ readonly sections?: readonly ContextSectionEstimate[];
11516
+ };
11517
+ }
11518
+ interface SessionRecoveryObservation {
11519
+ readonly sessionId: string;
11520
+ readonly cursor?: string;
11521
+ readonly throughSequence: number;
11522
+ readonly evidenceOrigin: 'journal_derived';
11523
+ readonly openRuns: number;
11524
+ readonly openModelRequests: number;
11525
+ readonly openEffects: number;
11526
+ readonly openCompactions: number;
11527
+ readonly unknownModelRequests: number;
11528
+ readonly unknownEffects: number;
11529
+ }
11530
+ interface ToolOutputMeasurement {
11531
+ /** Measured UTF-8 text bytes only; image/base64 payloads are counted separately as imageCount. */
11532
+ readonly beforeLimitBytes: number;
11533
+ readonly afterLimitBytes: number;
11534
+ readonly beforeLimitEstimatedTokens: number;
11535
+ readonly afterLimitEstimatedTokens: number;
11536
+ readonly offloadedBytes: number;
11537
+ readonly imageCount: number;
11538
+ readonly measurement: 'estimated';
11539
+ readonly tokenizer: 'sorbet-tool-text-character-estimate-v1';
11540
+ }
11541
+ interface ToolOutputObservation extends RunIdentity, DurableEvidence, ToolOutputMeasurement {
11542
+ readonly toolCallId: string;
11543
+ readonly effectAttemptId?: string;
11544
+ readonly toolName: string;
11545
+ /** Distinct output layers; a Hook may replace feedback without executing an Effect. */
11546
+ readonly origin: 'effect' | 'hook';
11547
+ }
11548
+ /**
11549
+ * Optional borrowed observation callbacks. Owners supply fresh metadata at existing
11550
+ * boundaries, without prompts, Tool content, credentials or Pi mutable objects.
11551
+ * Callbacks must return promptly and must not mutate execution or perform network IO.
11552
+ * Throws and accidental rejected promises are isolated; promises are never awaited.
11553
+ * Durable observations are emitted only for newly committed facts, never during replay.
11554
+ * Timing uses the current process's monotonic clock and has no restart continuity.
11555
+ */
11556
+ interface RuntimeObservationPort {
11557
+ /** Passive lookup for downstream tracing only. Missing/invalid/throwing adapters disable propagation. */
11558
+ traceContext?(identity: RunIdentity & {
11559
+ readonly toolCallId?: string;
11560
+ readonly modelRequestId?: string;
11561
+ }): ObservationTraceContext | undefined;
11562
+ runAdmitted?(data: RunAdmittedObservation): void;
11563
+ runSettled?(data: RunSettledObservation): void;
11564
+ contextPrepared?(data: ContextPreparationObservation): void;
11565
+ contextCapacityFailed?(data: ContextCapacityObservation): void;
11566
+ modelProviderSettled?(data: ModelProviderObservation): void;
11567
+ modelRequestSettled?(data: ModelAttemptObservation): void;
11568
+ modelRequestDispatched?(data: ModelDispatchObservation): void;
11569
+ modelRequestUnknown?(data: ModelUnknownObservation): void;
11570
+ modelRetryScheduled?(data: ModelRetryObservation): void;
11571
+ modelRetryWaitSettled?(data: ModelRetryWaitObservation): void;
11572
+ runExecutionStarted?(data: RunExecutionObservation): void;
11573
+ runDrained?(data: RunDrainObservation): void;
11574
+ waitStarted?(data: WaitStartedObservation): void;
11575
+ waitSettled?(data: WaitSettledObservation): void;
11576
+ runResourceWaitSettled?(data: RunResourceWaitObservation): void;
11577
+ toolExecutionSettled?(data: ToolExecutionObservation): void;
11578
+ toolExecutionStarted?(data: ToolExecutionStartedObservation): void;
11579
+ toolPermissionSettled?(data: ToolPermissionObservation): void;
11580
+ effectSettled?(data: EffectObservation): void;
11581
+ journalBatchCompleted?(data: JournalBatchObservation): void;
11582
+ journalReopened?(data: JournalReopenObservation): void;
11583
+ journalQueueChanged?(data: JournalQueueObservation): void;
11584
+ journalProjectionCompleted?(data: JournalProjectionObservation): void;
11585
+ compactionSettled?(data: CompactionObservation): void;
11586
+ compactionSourceFallback?(data: CompactionSourceFallbackObservation): void;
11587
+ compactionProviderSettled?(data: CompactionProviderObservation): void;
11588
+ compactionModelSettled?(data: CompactionModelObservation): void;
11589
+ approvalReviewSettled?(data: ApprovalReviewObservation): void;
11590
+ contextAttribution?(data: ContextAttributionObservation): void;
11591
+ recoveryObserved?(data: SessionRecoveryObservation): void;
11592
+ toolOutputShaped?(data: ToolOutputObservation): void;
11593
+ }
11594
+ //#endregion
11595
+ //#region src/journal/message-routing.d.ts
11596
+ declare const MessageRoutingSchema: s.Schema<{
11597
+ messageId: string;
11598
+ sourceUnitId: string;
11599
+ targetUnitId: string;
11600
+ targetSessionId: string;
11601
+ replyTo?: {
11602
+ unitId: string;
11603
+ sessionId: string;
11604
+ } | undefined;
11605
+ inReplyTo?: string | undefined;
11606
+ }>;
11607
+ type MessageRouting = s.Static<typeof MessageRoutingSchema>;
11608
+ declare const MessageReceiptSchema: s.Schema<{
11609
+ status: "accepted";
11610
+ acceptanceId: string;
11611
+ messageId: string;
11612
+ sourceUnitId: string;
11613
+ targetUnitId: string;
11614
+ targetSessionId: string;
11615
+ }>;
11616
+ declare const MessageRejectionSchema: s.Schema<{
11617
+ status: "rejected";
11618
+ code: string;
11619
+ message: string;
11620
+ messageId: string;
11621
+ sourceUnitId: string;
11622
+ targetUnitId: string;
11623
+ targetSessionId: string;
11624
+ }>;
11625
+ declare const MessageDeliveryResultSchema: s.Schema<{
11626
+ status: "accepted";
11627
+ acceptanceId: string;
11628
+ messageId: string;
11629
+ sourceUnitId: string;
11630
+ targetUnitId: string;
11631
+ targetSessionId: string;
11632
+ } | {
11633
+ status: "rejected";
11634
+ code: string;
11635
+ message: string;
11636
+ messageId: string;
11637
+ sourceUnitId: string;
11638
+ targetUnitId: string;
11639
+ targetSessionId: string;
11640
+ } | {
11641
+ status: "unavailable";
11642
+ code: string;
11643
+ }>;
11644
+ type MessageReceipt = s.Static<typeof MessageReceiptSchema>;
11645
+ type MessageRejection = s.Static<typeof MessageRejectionSchema>;
11646
+ type MessageDeliveryResult = s.Static<typeof MessageDeliveryResultSchema>;
11647
+ //#endregion
11648
+ //#region src/journal/unit/snapshot.d.ts
11649
+ /**
11650
+ * A persisted accelerator next to the Journal (`<journal>.snapshot`). It is never a
11651
+ * second authority: the log decides whether it applies. `interpreter` binds the
11652
+ * payloads to the projection code that produced them; a changed projection writes
11653
+ * a fresh tag and the stale file folds out on the next open. `sealed` records that
11654
+ * the file was generated from a sealed archive: it can restore an open pass over
11655
+ * that archive, but an unsealed Journal replays instead of trusting bytes that can
11656
+ * no longer be re-validated cheaply.
11657
+ */
11658
+ declare const UnitSnapshotFileSchema: s.Schema<{
11659
+ format: "sorbet.unit.snapshot";
11660
+ storageVersion: 1;
11661
+ unitId: string;
11662
+ interpreter: string;
11663
+ sealed: boolean;
11664
+ anchor: {
11665
+ unitSequence: number;
11666
+ factId: string;
11667
+ epochId: string;
11668
+ commitId: string;
11669
+ offset?: number | undefined;
11670
+ frames?: [number, number, number][] | undefined;
11671
+ };
11672
+ payloads: Record<string, JsonValue$1>;
11673
+ }>;
11674
+ type UnitSnapshotFile = s.Static<typeof UnitSnapshotFileSchema>;
11675
+ //#endregion
11676
+ //#region src/journal/unit/contracts.d.ts
11677
+ declare const UnitFactSchema: s.Schema<{
11678
+ id: string;
11679
+ recordedAt: string;
11680
+ schemaVersion: 1;
11681
+ taskId: string;
11682
+ kind: "task.created";
11683
+ payload: {
11684
+ kind: string;
11685
+ version: number;
11686
+ owner: {
11687
+ session: string;
11688
+ } | {
11689
+ task: string;
11690
+ };
11691
+ background: boolean;
11692
+ creationKey: string;
11693
+ input: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
11694
+ checkpoint: Record<string, JsonValue$1> & {
11695
+ phase: string;
11696
+ };
11697
+ };
11698
+ } | {
11699
+ id: string;
11700
+ recordedAt: string;
11701
+ schemaVersion: 1;
11702
+ taskId: string;
11703
+ kind: "task.imported";
11704
+ payload: {
11705
+ owner: {
11706
+ session: string;
11707
+ };
11708
+ result: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
11709
+ kind: string;
11710
+ version: number;
11711
+ background: boolean;
11712
+ creationKey: string;
11713
+ input: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
11714
+ checkpoint: Record<string, JsonValue$1> & {
11715
+ phase: string;
11716
+ };
11717
+ };
11718
+ } | {
11719
+ id: string;
11720
+ recordedAt: string;
11721
+ schemaVersion: 1;
11722
+ taskId: string;
11723
+ kind: "task.reserved";
11724
+ payload: {
11725
+ epochId: string;
11726
+ phase: string;
11727
+ invocationId: string;
11728
+ mode: "phase" | "abort";
11729
+ definitionSource?: {
11730
+ package: string;
11731
+ version: string;
11732
+ } | undefined;
11733
+ };
11734
+ } | {
11735
+ id: string;
11736
+ recordedAt: string;
11737
+ schemaVersion: 1;
11738
+ taskId: string;
11739
+ kind: "task.transitioned";
11740
+ payload: {
11741
+ status: "pending";
11742
+ checkpoint: Record<string, JsonValue$1> & {
11743
+ phase: string;
11744
+ };
11745
+ fromPhase: string;
11746
+ invocationId?: string | undefined;
11747
+ } | {
11748
+ status: "waiting";
11749
+ on: ({
11750
+ task: string;
11751
+ } | {
11752
+ signal: string;
11753
+ } | {
11754
+ run: string;
11755
+ } | {
11756
+ submission: string;
11757
+ })[];
11758
+ policy: "allSettled" | "firstSettled";
11759
+ checkpoint: Record<string, JsonValue$1> & {
11760
+ phase: string;
11761
+ };
11762
+ fromPhase: string;
11763
+ invocationId?: string | undefined;
11764
+ } | {
11765
+ status: "sleeping";
11766
+ until: number;
11767
+ checkpoint: Record<string, JsonValue$1> & {
11768
+ phase: string;
11769
+ };
11770
+ fromPhase: string;
11771
+ invocationId?: string | undefined;
11772
+ };
11773
+ } | {
11774
+ id: string;
11775
+ recordedAt: string;
11776
+ schemaVersion: 1;
11777
+ taskId: string;
11778
+ kind: "task.recovered";
11779
+ payload: {
11780
+ epochId: string;
11781
+ priorState: "pending" | "running";
11782
+ restarts: number;
11783
+ };
11784
+ } | {
11785
+ id: string;
11786
+ recordedAt: string;
11787
+ schemaVersion: 1;
11788
+ taskId: string;
11789
+ kind: "task.suspended";
11790
+ payload: {
11791
+ invocationId: string;
11792
+ };
11793
+ } | {
11794
+ id: string;
11795
+ recordedAt: string;
11796
+ schemaVersion: 1;
11797
+ taskId: string;
11798
+ kind: "task.parked";
11799
+ payload: {
11800
+ restarts: number;
11801
+ reason: "restart_limit";
11802
+ };
11803
+ } | {
11804
+ id: string;
11805
+ recordedAt: string;
11806
+ schemaVersion: 1;
11807
+ taskId: string;
11808
+ kind: "task.retried";
11809
+ payload: {
11810
+ commandId: string;
11811
+ };
11812
+ } | {
11813
+ id: string;
11282
11814
  recordedAt: string;
11283
11815
  schemaVersion: 1;
11284
11816
  taskId: string;
@@ -11297,7 +11829,7 @@ declare const UnitFactSchema: s.Schema<{
11297
11829
  invocationId: string;
11298
11830
  outcome: {
11299
11831
  status: "completed";
11300
- result: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
11832
+ result: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
11301
11833
  } | {
11302
11834
  status: "failed";
11303
11835
  error: {
@@ -11327,7 +11859,7 @@ declare const UnitFactSchema: s.Schema<{
11327
11859
  payload: {
11328
11860
  outcome: {
11329
11861
  status: "completed";
11330
- result: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
11862
+ result: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
11331
11863
  } | {
11332
11864
  status: "failed";
11333
11865
  error: {
@@ -11359,7 +11891,7 @@ declare const UnitFactSchema: s.Schema<{
11359
11891
  signalId: string;
11360
11892
  creationKey: string;
11361
11893
  type: "host-command" | "elicitation" | "message-reply";
11362
- payload: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
11894
+ payload: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
11363
11895
  invocationId: string;
11364
11896
  };
11365
11897
  } | {
@@ -11370,7 +11902,7 @@ declare const UnitFactSchema: s.Schema<{
11370
11902
  kind: "signal.resolved";
11371
11903
  payload: {
11372
11904
  signalId: string;
11373
- result: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
11905
+ result: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
11374
11906
  commandId: string;
11375
11907
  };
11376
11908
  } | {
@@ -11402,7 +11934,7 @@ declare const UnitFactSchema: s.Schema<{
11402
11934
  id: string;
11403
11935
  closed: boolean;
11404
11936
  } | null;
11405
- durability: "memory" | "sync";
11937
+ durability: "sync" | "memory";
11406
11938
  };
11407
11939
  } | {
11408
11940
  id: string;
@@ -11425,7 +11957,7 @@ declare const UnitFactSchema: s.Schema<{
11425
11957
  };
11426
11958
  creationKey: string;
11427
11959
  origin: "created" | "migrated";
11428
- metadata: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
11960
+ metadata: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
11429
11961
  };
11430
11962
  } | {
11431
11963
  id: string;
@@ -11434,7 +11966,7 @@ declare const UnitFactSchema: s.Schema<{
11434
11966
  kind: "session.metadata.changed";
11435
11967
  payload: {
11436
11968
  sessionId: string;
11437
- metadata: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null;
11969
+ metadata: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null;
11438
11970
  };
11439
11971
  } | {
11440
11972
  id: string;
@@ -11480,7 +12012,7 @@ declare const UnitFactSchema: s.Schema<{
11480
12012
  })[];
11481
12013
  source: {
11482
12014
  kind: string;
11483
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
12015
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
11484
12016
  };
11485
12017
  } | {
11486
12018
  kind: "context-event";
@@ -11532,7 +12064,7 @@ declare const UnitFactSchema: s.Schema<{
11532
12064
  kind: "container";
11533
12065
  name: string;
11534
12066
  attributes?: Record<string, string | number>;
11535
- children: _sorbetai_context3.ContextXmlElement[];
12067
+ children: _sorbetai_context4.ContextXmlElement[];
11536
12068
  };
11537
12069
  sourceId: string;
11538
12070
  provenance: {
@@ -11540,11 +12072,11 @@ declare const UnitFactSchema: s.Schema<{
11540
12072
  label: string;
11541
12073
  location?: string | undefined;
11542
12074
  };
11543
- metadata?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
12075
+ metadata?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
11544
12076
  })[];
11545
12077
  source: {
11546
12078
  kind: string;
11547
- data?: string | number | boolean | _sorbetai_schema32.JsonArray | _sorbetai_schema32.JsonObject | null | undefined;
12079
+ data?: string | number | boolean | _sorbetai_schema56.JsonArray | _sorbetai_schema56.JsonObject | null | undefined;
11548
12080
  };
11549
12081
  };
11550
12082
  whenBusy: "followUp" | "steer";
@@ -11579,10 +12111,10 @@ declare const UnitFactSchema: s.Schema<{
11579
12111
  payload: {
11580
12112
  status: "accepted";
11581
12113
  acceptanceId: string;
11582
- targetUnitId: string;
11583
- targetSessionId: string;
11584
12114
  messageId: string;
11585
12115
  sourceUnitId: string;
12116
+ targetUnitId: string;
12117
+ targetSessionId: string;
11586
12118
  };
11587
12119
  } | {
11588
12120
  id: string;
@@ -11591,519 +12123,284 @@ declare const UnitFactSchema: s.Schema<{
11591
12123
  messageId: string;
11592
12124
  kind: "message.outbox.rejected";
11593
12125
  payload: {
11594
- status: "rejected";
11595
- code: string;
11596
- message: string;
11597
- targetUnitId: string;
11598
- targetSessionId: string;
11599
- messageId: string;
11600
- sourceUnitId: string;
11601
- };
11602
- }>;
11603
- type UnitFact = s.Static<typeof UnitFactSchema>;
11604
- type UnitEntry = {
11605
- readonly scope: 'session';
11606
- readonly fact: JournalFact;
11607
- } | {
11608
- readonly scope: 'unit';
11609
- readonly fact: UnitFact;
11610
- };
11611
- /** The staging owner transfers a fact and its matching JSON representation together. */
11612
- interface UnitWrite {
11613
- readonly entry: UnitEntry;
11614
- /** Encodes entry.fact, without the scope or storage envelope. */
11615
- readonly json: string;
11616
- }
11617
- /** Storage metadata wraps, and never renumbers, the original Session fact. */
11618
- interface UnitRecord {
11619
- readonly unitId: string;
11620
- readonly unitSequence: number;
11621
- readonly commitId: string;
11622
- readonly epochId: string;
11623
- readonly entry: UnitEntry;
11624
- }
11625
- interface UnitReadOptions {
11626
- /** Omit for the unit-wide stream. A Session scope retains its original Journal cursors. */
11627
- readonly sessionId?: string;
11628
- readonly after?: JournalCursor;
11629
- readonly limit?: number;
11630
- }
11631
- interface UnitPage {
11632
- readonly records: readonly UnitRecord[];
11633
- readonly cursor?: JournalCursor;
11634
- readonly hasMore: boolean;
11635
- }
11636
- interface UnitSubscription extends AsyncIterable<UnitRecord> {
11637
- close(): void;
11638
- }
11639
- declare class UnitStoreError extends Error {
11640
- readonly code: 'unit_locked' | 'unit_closed' | 'unit_failed' | 'unit_corrupt' | 'unit_conflict' | 'unit_inspection_capacity' | 'unit_sealed';
11641
- constructor(code: 'unit_locked' | 'unit_closed' | 'unit_failed' | 'unit_corrupt' | 'unit_conflict' | 'unit_inspection_capacity' | 'unit_sealed', message: string, options?: ErrorOptions);
11642
- }
11643
- /** Why a unit frame does not fit the durable history of its unit. */
11644
- type UnitHistoryErrorCode = 'session_closing' | 'empty_commit' | 'commit_reused' | 'unit_mismatch' | 'sequence_mismatch' | 'frame_split' | 'duplicate_fact' | 'session_unknown' | 'session_cursor_invalid' | 'session_sequence_invalid' | 'session_exists' | 'owner_mismatch' | 'parent_missing' | 'parent_closed' | 'creation_key_conflict' | 'root_identity' | 'epoch_reused' | 'epoch_predecessor' | 'epoch_inactive' | 'epoch_missing' | 'epoch_closed' | 'creation_missing' | 'task_exists' | 'task_unknown' | 'task_terminal' | 'signal_exists' | 'signal_unknown' | 'signal_settled' | 'submission_exists' | 'message_invalid' | 'message_exists' | 'message_unknown' | 'message_settled';
11645
- /** A unit frame that the durable history of its unit rejects. */
11646
- declare class UnitHistoryError extends Error {
11647
- readonly code: UnitHistoryErrorCode;
11648
- constructor(code: UnitHistoryErrorCode, message: string, options?: ErrorOptions);
11649
- }
11650
- type UnitCommitOutcome = {
11651
- readonly status: 'committed';
11652
- } | {
11653
- readonly status: 'not-committed' | 'conflict' | 'unknown';
11654
- readonly error: Error;
11655
- };
11656
- interface UnitEpoch {
11657
- readonly id: string;
11658
- readonly closed: boolean;
11659
- }
11660
- interface UnitReader {
11661
- /** A partial frame follows the readable prefix. Readers never repair or expose it as committed. */
11662
- readonly incompleteTail?: boolean;
11663
- readonly unitId: string;
11664
- readonly tail: number;
11665
- read(options?: UnitReadOptions): Promise<UnitPage>;
11666
- close(): Promise<void>;
11667
- }
11668
- /** Lifecycle pages validate ordering and identities, not Session payload or Artifact health. */
11669
- interface UnitInspectionPage {
11670
- readonly unitFacts: readonly UnitFact[];
11671
- readonly sessionFacts: readonly JournalRecoveryFact[];
11672
- readonly incompleteTail: boolean;
11673
- /** Committed byte boundary after this frame; a tail scan resumes from it. */
11674
- readonly endOffset?: number;
11675
- }
11676
- /** One exclusive ownership epoch. Closing drains accepted commits and releases the lease. */
11677
- interface OpenedUnitStore extends UnitReader {
11678
- readonly epochId: string;
11679
- readonly previousEpoch?: UnitEpoch;
11680
- readonly durability: 'sync' | 'memory';
11681
- /**
11682
- * The staging writer validates each fact and encodes its matching JSON once.
11683
- * Neither may change after handoff; the store enforces only ordering and history
11684
- * invariants. A committed batch is wholly readable and meets the declared
11685
- * durability. Not-committed leaves its identities reusable. Conflict or unknown
11686
- * isolates this handle; close and reopen to inspect the durable prefix.
11687
- */
11688
- commit(writes: readonly UnitWrite[], options: {
11689
- readonly expectedSequence: number;
11690
- }): Promise<UnitCommitOutcome>;
11691
- subscribe(options?: Omit<UnitReadOptions, 'limit'>): UnitSubscription;
11692
- rebuildIndexes(): Promise<void>;
11693
- }
11694
- interface UnitOpenOptions {
11695
- /**
11696
- * Receives every committed batch exactly once, in commit order, while open indexes it.
11697
- * Openers fold history here instead of paging it back after open, so the Journal is
11698
- * decoded once. The receiver owns the records. A throw fails the open.
11699
- */
11700
- readonly replay?: (records: readonly UnitRecord[]) => void;
11701
- }
11702
- /** A reusable factory. The caller owns each opened handle, not the factory. */
11703
- interface UnitStore {
11704
- open(options?: UnitOpenOptions): Promise<OpenedUnitStore>;
11705
- }
11706
- //#endregion
11707
- //#region src/journal/unit/opened.d.ts
11708
- interface UnitStorageWrite {
11709
- readonly record: UnitRecord;
11710
- /** Encodes record.entry.fact, without the scope or storage envelope. */
11711
- readonly json: string;
11712
- }
12126
+ status: "rejected";
12127
+ code: string;
12128
+ message: string;
12129
+ messageId: string;
12130
+ sourceUnitId: string;
12131
+ targetUnitId: string;
12132
+ targetSessionId: string;
12133
+ };
12134
+ }>;
12135
+ type UnitFact = s.Static<typeof UnitFactSchema>;
12136
+ type UnitEntry = {
12137
+ readonly scope: 'session';
12138
+ readonly fact: JournalFact;
12139
+ } | {
12140
+ readonly scope: 'unit';
12141
+ readonly fact: UnitFact;
12142
+ };
11713
12143
  /**
11714
- * The backend port of a Unit Store. The handle from `openUnitStorage` owns history
11715
- * validation, ordering, epochs, and subscriptions; a backend only persists whole batches.
11716
- * Exclusive ownership is the backend's: refuse a second concurrent open.
12144
+ * The durable record a persisted projection folded through. Validation on reopen
12145
+ * compares these identity fields with the frame actually at `position`; they
12146
+ * already exist in storage, so no digest is computed (project policy bans
12147
+ * SHA-256-family constructs here).
11717
12148
  */
11718
- interface UnitStorage {
11719
- readonly unitId: string;
11720
- readonly durability: 'sync' | 'memory';
11721
- /** Visits every committed batch in commit order. Visited records belong to the visitor. */
11722
- load(visit: (records: readonly UnitRecord[]) => void): Promise<void>;
11723
- /** Positions are ascending zero-based unit offsets (`unitSequence - 1`). Returned records belong to the caller. */
11724
- read(positions: readonly number[]): Promise<readonly UnitRecord[]>;
12149
+ interface UnitSnapshotAnchor {
11725
12150
  /**
11726
- * Persists one batch atomically. Return not-committed only when nothing was persisted.
11727
- * A throw means the outcome is unknown and isolates the handle until reopen.
12151
+ * Byte offset of the frame containing the anchor record; validation reads it directly
12152
+ * and the fold resumes after it. Only a backend that writes byte-framed commits
12153
+ * (JSONL) produces it; other backends leave snapshots unwritten.
11728
12154
  */
11729
- append(writes: readonly UnitStorageWrite[]): Promise<UnitCommitOutcome>;
11730
- close(): Promise<void>;
11731
- }
11732
- /** Opens a backend as a Unit writer. A failed open closes the backend. */
11733
- declare function openUnitStorage(storage: UnitStorage, options?: UnitOpenOptions): Promise<OpenedUnitStore>;
11734
- //#endregion
11735
- //#region src/observation/contracts.d.ts
11736
- interface ObservationTraceContext {
11737
- readonly traceparent: string;
11738
- readonly tracestate?: string;
11739
- }
11740
- interface RunIdentity {
11741
- readonly sessionId: string;
11742
- readonly runId: string;
11743
- }
11744
- interface DurableEvidence {
12155
+ readonly offset?: number;
12156
+ /**
12157
+ * Frame locators covering the skipped prefix, in order: byte offset, byte length
12158
+ * (without its newline) and record count. Reads into the prefix resolve through these;
12159
+ * the last locator's frame is the anchor frame.
12160
+ */
12161
+ readonly frames?: readonly (readonly [number, number, number])[];
12162
+ /** The anchor record's committed sequence, equal to its one-based position. */
12163
+ readonly unitSequence: number;
11745
12164
  readonly factId: string;
11746
- readonly cursor: string;
11747
- readonly sequence: number;
11748
- }
11749
- interface ObservationTiming {
11750
- /** Wall-clock span anchors for presentation; durationSeconds alone measures elapsed time. */
11751
- readonly startedAtUnixMs?: number;
11752
- readonly endedAtUnixMs?: number;
11753
- }
11754
- interface RunAdmittedObservation extends RunIdentity, DurableEvidence {
11755
- readonly cause: 'user-message' | 'context-event';
11756
- }
11757
- interface RunSettledObservation extends RunIdentity, DurableEvidence, ObservationTiming {
11758
- readonly outcome: 'completed' | 'failed' | 'cancelled';
11759
- readonly failureCode?: string;
11760
- /** Admission through durable terminal within this process; absent for recovered admissions. */
11761
- readonly durationSeconds?: number;
11762
- }
11763
- interface ContextPreparationObservation extends RunIdentity, ObservationTiming {
11764
- readonly logicalModelCallId: string;
11765
- readonly durationSeconds: number;
11766
- readonly outcome: 'prepared' | 'failed' | 'cancelled';
11767
- readonly mode: 'prepare' | 'rebase';
11768
- readonly contextEpoch?: number;
11769
- }
11770
- interface ContextCapacityObservation extends RunIdentity {
11771
- readonly reason: 'input_limit' | 'compaction_ineffective' | 'provider_overflow';
11772
- readonly estimatedContextTokens?: number;
11773
- readonly inputLimit: number;
11774
- readonly contextWindow: number;
11775
- }
11776
- interface ModelAttemptObservation extends RunIdentity, DurableEvidence, ObservationTiming {
11777
- /** Complete response Tool identities for causal correlation; no arguments or content. */
11778
- readonly toolCallIds?: readonly string[];
11779
- readonly logicalModelCallId: string;
11780
- readonly modelRequestId: string;
11781
- readonly provider: string;
11782
- /** Correlation detail; exporters must map this to a bounded model vocabulary. */
11783
- readonly modelId: string;
11784
- readonly outcome: 'pending' | 'stop' | 'length' | 'toolUse' | 'deferred' | 'error' | 'aborted';
11785
- /** Provider dispatch through Pi's complete response, excluding durable response commit. */
11786
- readonly durationSeconds: number;
11787
- /** Dispatch to the first nonempty Pi text_delta. Thinking and tool arguments are excluded. */
11788
- readonly firstTokenSeconds?: number;
11789
- readonly firstTokenUnavailableReason?: 'no_text_delta';
11790
- readonly streamDurationSeconds?: number;
11791
- readonly responseCommitSeconds: number;
11792
- /** Pi uses zero-filled defaults when usage was not obtained; all-zero usage has no proven provenance. */
11793
- readonly usageQuality: 'reported' | 'unavailable';
11794
- readonly usageUnavailableReason?: 'pi_zero_usage_without_provenance';
11795
- readonly inputTokens: number;
11796
- readonly outputTokens: number;
11797
- readonly cacheReadTokens: number;
11798
- readonly cacheWriteTokens: number;
11799
- readonly reasoningTokens?: number;
11800
- readonly costUsd: number;
11801
- /** Pi's completed-response Context anchor, including output; distinct from dispatched input. */
11802
- readonly contextTokens?: number;
11803
- readonly contextWindow: number;
11804
- }
11805
- /**
11806
- * Volatile settlement of a physical Pi dispatch, emitted before response persistence.
11807
- * Durable evidence references model.requested; it does not establish a committed response.
11808
- */
11809
- interface ModelProviderObservation extends RunIdentity, DurableEvidence, ObservationTiming {
11810
- readonly logicalModelCallId: string;
11811
- readonly modelRequestId: string;
11812
- readonly provider: string;
11813
- /** Correlation detail; exporters must map this to a bounded model vocabulary. */
11814
- readonly modelId: string;
11815
- readonly outcome: ModelAttemptObservation['outcome'];
11816
- /** Pi supplied a complete response; false for a raw dispatch throw before that boundary. */
11817
- readonly responseAvailable: boolean;
11818
- readonly cancellationRequested: boolean;
11819
- /** Pi dispatch through complete response or dispatch throw, excluding response persistence. */
11820
- readonly durationSeconds: number;
11821
- /** Dispatch to the first nonempty Pi text_delta. Thinking and tool arguments are excluded. */
11822
- readonly firstTokenSeconds?: number;
11823
- readonly firstTokenUnavailableReason?: 'no_text_delta';
11824
- readonly streamDurationSeconds?: number;
11825
- }
11826
- /** Pi dispatch attempt after durable write-ahead; this does not prove the Provider received it. */
11827
- interface ModelDispatchObservation extends RunIdentity, DurableEvidence {
11828
- readonly logicalModelCallId: string;
11829
- readonly modelRequestId: string;
11830
- readonly provider: string;
11831
- /** Correlation detail; exporters must map this to a bounded model vocabulary. */
11832
- readonly modelId: string;
11833
- readonly estimatedContextTokens: number;
11834
- readonly contextWindow: number;
11835
- readonly dispatchedAtUnixMs: number;
11836
- }
11837
- interface ModelUnknownObservation extends RunIdentity, DurableEvidence {
11838
- readonly modelRequestId: string;
11839
- }
11840
- interface ModelRetryObservation extends RunIdentity {
11841
- readonly logicalModelCallId: string;
11842
- readonly failedModelRequestId: string;
11843
- readonly attempt: number;
11844
- readonly delaySeconds: number;
11845
- }
11846
- interface ModelRetryWaitObservation extends RunIdentity, ObservationTiming {
11847
- readonly logicalModelCallId: string;
11848
- readonly failedModelRequestId: string;
11849
- readonly attempt: number;
11850
- readonly scheduledDelaySeconds: number;
11851
- readonly durationSeconds: number;
11852
- readonly outcome: 'elapsed' | 'cancelled' | 'interrupted';
11853
- }
11854
- interface RunExecutionObservation extends RunIdentity {
11855
- readonly startedAtUnixMs: number;
11856
- }
11857
- interface RunDrainObservation extends RunIdentity {
11858
- readonly outcome: 'drained' | 'failed';
11859
- readonly endedAtUnixMs: number;
11860
- readonly cancelToDrainSeconds?: number;
11861
- }
11862
- interface WaitIdentityObservation extends RunIdentity {
11863
- readonly reason: 'resource' | 'permission' | 'approval' | 'approval_review';
11864
- readonly toolCallId?: string;
11865
- readonly approvalRequestId?: string;
11866
- }
11867
- interface WaitStartedObservation extends WaitIdentityObservation {
11868
- readonly startedAtUnixMs: number;
11869
- /** Current-process monotonic origin only; never a durable or cross-process clock. */
11870
- readonly startedAtMonoMs: number;
11871
- }
11872
- interface WaitSettledObservation extends WaitIdentityObservation {
11873
- readonly endedAtUnixMs: number;
11874
- readonly endedAtMonoMs: number;
12165
+ readonly epochId: string;
12166
+ readonly commitId: string;
11875
12167
  }
11876
- interface RunResourceWaitObservation extends RunIdentity, ObservationTiming {
11877
- readonly outcome: 'acquired' | 'cancelled' | 'failed';
11878
- readonly durationSeconds: number;
12168
+ /** The staging owner transfers a fact and its matching JSON representation together. */
12169
+ interface UnitWrite {
12170
+ readonly entry: UnitEntry;
12171
+ /** Encodes entry.fact, without the scope or storage envelope. */
12172
+ readonly json: string;
11879
12173
  }
11880
- interface ToolExecutionObservation extends RunIdentity, ObservationTiming {
11881
- readonly toolCallId: string;
11882
- readonly effectAttemptId: string;
11883
- /** Correlation detail; exporters must map this to a bounded tool class. */
11884
- readonly toolName: string;
11885
- readonly durationSeconds: number;
11886
- readonly outcome: 'succeeded' | 'failed' | 'cancelled';
12174
+ /** Storage metadata wraps, and never renumbers, the original Session fact. */
12175
+ interface UnitRecord {
12176
+ readonly unitId: string;
12177
+ readonly unitSequence: number;
12178
+ readonly commitId: string;
12179
+ readonly epochId: string;
12180
+ readonly entry: UnitEntry;
11887
12181
  }
11888
- interface ToolExecutionStartedObservation extends RunIdentity {
11889
- readonly toolCallId: string;
11890
- readonly effectAttemptId: string;
11891
- readonly toolName: string;
11892
- readonly startedAtUnixMs: number;
12182
+ interface UnitReadOptions {
12183
+ /** Omit for the unit-wide stream. A Session scope retains its original Journal cursors. */
12184
+ readonly sessionId?: string;
12185
+ readonly after?: JournalCursor;
12186
+ readonly limit?: number;
11893
12187
  }
11894
- interface ToolPermissionObservation extends RunIdentity, DurableEvidence, ObservationTiming {
11895
- readonly toolCallId: string;
11896
- readonly durationSeconds: number;
11897
- readonly outcome: 'allowed' | 'denied' | 'failed';
12188
+ interface UnitPage {
12189
+ readonly records: readonly UnitRecord[];
12190
+ readonly cursor?: JournalCursor;
12191
+ readonly hasMore: boolean;
11898
12192
  }
11899
- interface EffectObservation extends RunIdentity, DurableEvidence {
11900
- readonly effectAttemptId: string;
11901
- readonly outcome: 'succeeded' | 'failed' | 'unknown';
12193
+ interface UnitSubscription extends AsyncIterable<UnitRecord> {
12194
+ close(): void;
11902
12195
  }
11903
- interface JournalBatchObservation extends ObservationTiming {
11904
- readonly sessionId: string;
11905
- readonly durationSeconds: number;
11906
- readonly outcome: 'committed' | 'failed';
11907
- readonly backend: 'jsonl';
11908
- readonly factCount: number;
11909
- /** Physical encoded frame size; absent when encoding fails. */
11910
- readonly bytes?: number;
11911
- readonly throughSequence?: number;
12196
+ declare class UnitStoreError extends Error {
12197
+ readonly code: 'unit_locked' | 'unit_closed' | 'unit_failed' | 'unit_corrupt' | 'unit_conflict' | 'unit_inspection_capacity' | 'unit_sealed';
12198
+ constructor(code: 'unit_locked' | 'unit_closed' | 'unit_failed' | 'unit_corrupt' | 'unit_conflict' | 'unit_inspection_capacity' | 'unit_sealed', message: string, options?: ErrorOptions);
11912
12199
  }
11913
- interface JournalReopenObservation extends ObservationTiming {
11914
- readonly sessionId?: string;
11915
- readonly durationSeconds: number;
11916
- readonly outcome: 'opened' | 'failed';
11917
- readonly backend: 'jsonl';
11918
- readonly factCount?: number;
11919
- readonly fileBytes?: number;
12200
+ /** Why a unit frame does not fit the durable history of its unit. */
12201
+ type UnitHistoryErrorCode = 'session_closing' | 'empty_commit' | 'commit_reused' | 'unit_mismatch' | 'sequence_mismatch' | 'frame_split' | 'duplicate_fact' | 'session_unknown' | 'session_cursor_invalid' | 'session_sequence_invalid' | 'session_exists' | 'owner_mismatch' | 'parent_missing' | 'parent_closed' | 'creation_key_conflict' | 'root_identity' | 'epoch_reused' | 'epoch_predecessor' | 'epoch_inactive' | 'epoch_missing' | 'epoch_closed' | 'creation_missing' | 'task_exists' | 'task_unknown' | 'task_terminal' | 'signal_exists' | 'signal_unknown' | 'signal_settled' | 'submission_exists' | 'message_invalid' | 'message_exists' | 'message_unknown' | 'message_settled';
12202
+ /** A unit frame that the durable history of its unit rejects. */
12203
+ declare class UnitHistoryError extends Error {
12204
+ readonly code: UnitHistoryErrorCode;
12205
+ constructor(code: UnitHistoryErrorCode, message: string, options?: ErrorOptions);
11920
12206
  }
11921
- interface JournalQueueObservation {
11922
- readonly sessionId: string;
11923
- /** Outstanding prepared facts, including a batch waiting for durable storage. */
11924
- readonly pendingFacts: number;
11925
- /** Already-encoded UTF-8 fact bytes; storage framing and Artifact offload are excluded. */
11926
- readonly pendingBytes: number;
12207
+ type UnitCommitOutcome = {
12208
+ readonly status: 'committed';
12209
+ /** Byte offset of the appended frame; byte-framed backends report it, others omit it. */
12210
+ readonly offset?: number;
12211
+ } | {
12212
+ readonly status: 'not-committed' | 'conflict' | 'unknown';
12213
+ readonly error: Error;
12214
+ };
12215
+ interface UnitEpoch {
12216
+ readonly id: string;
12217
+ readonly closed: boolean;
11927
12218
  }
11928
- interface JournalProjectionObservation extends ObservationTiming {
11929
- readonly sessionId: string;
11930
- readonly view: 'usage' | 'inspector';
11931
- readonly outcome: 'projected' | 'failed';
11932
- /** In-memory projection only; Journal IO and queued-reader wait are excluded. */
11933
- readonly durationSeconds: number;
11934
- readonly throughSequence?: number;
12219
+ interface UnitReader {
12220
+ /** A partial frame follows the readable prefix. Readers never repair or expose it as committed. */
12221
+ readonly incompleteTail?: boolean;
12222
+ readonly unitId: string;
12223
+ readonly tail: number;
12224
+ read(options?: UnitReadOptions): Promise<UnitPage>;
12225
+ close(): Promise<void>;
11935
12226
  }
11936
- interface CompactionObservation extends ObservationTiming {
11937
- readonly sessionId: string;
11938
- readonly runId?: string;
11939
- readonly compactionId?: string;
11940
- readonly reason: 'manual' | 'threshold' | 'overflow';
11941
- readonly outcome: 'not-needed' | 'suppressed' | 'compacted' | 'failed' | 'cancelled';
11942
- readonly durationSeconds: number;
11943
- /** Comparable complete-request projections using the compactor's existing token estimator. */
11944
- readonly contextTokensBefore?: number;
11945
- readonly projectedContextTokensAfter?: number;
11946
- readonly measurement: 'estimated';
11947
- readonly attemptCount?: number;
12227
+ /** Lifecycle pages validate ordering and identities, not Session payload or Artifact health. */
12228
+ interface UnitInspectionPage {
12229
+ readonly unitFacts: readonly UnitFact[];
12230
+ readonly sessionFacts: readonly JournalRecoveryFact[];
12231
+ readonly incompleteTail: boolean;
12232
+ /** Committed byte boundary after this frame; a tail scan resumes from it. */
12233
+ readonly endOffset?: number;
11948
12234
  }
11949
- /**
11950
- * An epoch-scoped compaction computation needed an older fact and was repeated over the
11951
- * whole Journal. The answer is unchanged; a recurring fallback means the epoch scope is
11952
- * missing evidence and every compaction pays for a full Journal read.
11953
- */
11954
- interface CompactionSourceFallbackObservation {
11955
- readonly sessionId: string;
11956
- /** Error class name of the scoped failure; bounded vocabulary. */
11957
- readonly errorName: string;
11958
- /** Internal projection error text; carries identities, never Context content. */
11959
- readonly errorMessage: string;
12235
+ /** One exclusive ownership epoch. Closing drains accepted commits and releases the lease. */
12236
+ interface OpenedUnitStore extends UnitReader {
12237
+ readonly epochId: string;
12238
+ readonly previousEpoch?: UnitEpoch;
12239
+ readonly durability: 'sync' | 'memory';
12240
+ /**
12241
+ * The staging writer validates each fact and encodes its matching JSON once.
12242
+ * Neither may change after handoff; the store enforces only ordering and history
12243
+ * invariants. A committed batch is wholly readable and meets the declared
12244
+ * durability. Not-committed leaves its identities reusable. Conflict or unknown
12245
+ * isolates this handle; close and reopen to inspect the durable prefix.
12246
+ */
12247
+ commit(writes: readonly UnitWrite[], options: {
12248
+ readonly expectedSequence: number;
12249
+ }): Promise<UnitCommitOutcome>;
12250
+ subscribe(options?: Omit<UnitReadOptions, 'limit'>): UnitSubscription;
12251
+ rebuildIndexes(): Promise<void>;
12252
+ /**
12253
+ * The folded index state, serializable. A snapshot stores it so a reopen can install
12254
+ * it at the anchor instead of re-folding the prefix.
12255
+ */
12256
+ exportState(): UnitHistoryExport;
12257
+ /**
12258
+ * Byte-framed backends expose their frame locators for snapshot anchoring; other
12259
+ * backends return undefined and leave anchor.frames unset.
12260
+ */
12261
+ frameLocators(): readonly (readonly [number, number, number])[] | undefined;
12262
+ /**
12263
+ * The last record the replay visitor saw and the backend offset of its commit.
12264
+ * Snapshot writers anchor to it; a store that does not replay leaves it undefined
12265
+ * and snapshots stay unwritten.
12266
+ */
12267
+ readonly lastReplayed?: {
12268
+ readonly record: UnitRecord;
12269
+ readonly offset?: number;
12270
+ };
11960
12271
  }
11961
- type ModelUsageScalars = Pick<ModelAttemptObservation, 'usageQuality' | 'inputTokens' | 'outputTokens' | 'cacheReadTokens' | 'cacheWriteTokens' | 'reasoningTokens' | 'costUsd'>;
11962
- interface CompactionModelObservation extends DurableEvidence, ObservationTiming, ModelUsageScalars {
11963
- readonly sessionId: string;
11964
- readonly runId?: string;
11965
- readonly compactionId: string;
11966
- readonly attemptId: string;
11967
- readonly phase: 'direct' | 'chunk' | 'merge' | 'final' | 'empty-retry' | 'provider-reduction';
11968
- readonly provider: string;
11969
- readonly modelId: string;
11970
- readonly outcome: ModelAttemptObservation['outcome'] | 'failed';
11971
- readonly estimatedInputTokens: number;
11972
- readonly durationSeconds: number;
11973
- readonly responseCommitSeconds: number;
11974
- readonly usageSource: 'provider_reported';
11975
- readonly firstTokenUnavailableReason: 'complete_api_no_stream';
12272
+ interface UnitOpenOptions {
12273
+ /**
12274
+ * Receives every committed batch exactly once, in commit order, while open indexes it.
12275
+ * Openers fold history here instead of paging it back after open, so the Journal is
12276
+ * decoded once. The receiver owns the records. A throw fails the open.
12277
+ */
12278
+ readonly replay?: (records: readonly UnitRecord[]) => void;
12279
+ /**
12280
+ * Skip batches at or before this committed unit sequence. The caller has already
12281
+ * proven those batches' contents (via a snapshot anchor) and only needs the tail.
12282
+ * `offset`/`frames` are the anchor's backend locators so a byte-framed backend
12283
+ * resumes the scan there instead of re-reading the prefix. `history` is the
12284
+ * serialized index the prefix folded into; it installs before the tail folds.
12285
+ */
12286
+ readonly replayFrom?: {
12287
+ readonly unitSequence: number;
12288
+ /** Byte offset where scanning resumes: the first byte after the anchor frame. */
12289
+ readonly offset?: number;
12290
+ /** `[offset, length, count]` locators of the skipped frames, anchor frame last. */
12291
+ readonly frames?: readonly (readonly [number, number, number])[];
12292
+ readonly history?: UnitHistoryExport;
12293
+ };
11976
12294
  }
11977
- /** Volatile physical summary settlement; evidence references compaction.model.requested. */
11978
- interface CompactionProviderObservation extends DurableEvidence, ObservationTiming {
11979
- readonly sessionId: string;
11980
- readonly runId?: string;
11981
- readonly compactionId: string;
11982
- readonly attemptId: string;
11983
- readonly phase: CompactionModelObservation['phase'];
11984
- readonly provider: string;
11985
- readonly modelId: string;
11986
- readonly outcome: ModelAttemptObservation['outcome'];
11987
- /** Pi supplied a complete response; false when the summary call threw instead. */
11988
- readonly responseAvailable: boolean;
11989
- readonly cancellationRequested: boolean;
11990
- readonly durationSeconds: number;
11991
- readonly firstTokenUnavailableReason: 'complete_api_no_stream';
12295
+ interface UnitSessionRecord extends Pick<Extract<UnitFact, {
12296
+ kind: 'session.created';
12297
+ }>['payload'], 'sessionId' | 'owner' | 'creationKey'> {
12298
+ readonly closing: boolean;
12299
+ readonly closed: boolean;
12300
+ readonly sequence: number;
11992
12301
  }
11993
- interface ApprovalReviewObservation extends RunIdentity, DurableEvidence, ObservationTiming, ModelUsageScalars {
11994
- readonly reviewId: string;
11995
- readonly toolCallId: string;
11996
- readonly provider: string;
11997
- readonly modelId: string;
11998
- readonly outcome: 'allow' | 'ask';
11999
- readonly failureCode?: string;
12000
- readonly completionDispatched: boolean;
12001
- /** Caller wait for opaque Host completion, including timeout/cancel; no Provider, TTFT or drain claim. */
12002
- readonly completionDurationSeconds?: number;
12003
- readonly durationSeconds: number;
12004
- readonly usageSource: 'reviewer_reported';
12302
+ /** The durable membership and creation-key index of one Unit, as a snapshot persists it. */
12303
+ interface UnitMembershipExport {
12304
+ readonly sessions: readonly UnitSessionRecord[];
12305
+ readonly keys: readonly string[];
12306
+ readonly tasks: readonly (readonly [string, boolean])[];
12307
+ readonly signals: readonly (readonly [string, {
12308
+ taskId: string;
12309
+ settled: boolean;
12310
+ }])[];
12311
+ readonly messages: readonly (readonly [string, {
12312
+ routing: MessageRouting;
12313
+ terminal: boolean;
12314
+ }])[];
12315
+ readonly submissions: readonly string[];
12005
12316
  }
12006
- type ContextAttributionSection = 'system' | 'conversation' | 'tools' | 'state' | 'turn' | 'request' | 'other';
12007
- interface ContextSectionEstimate {
12008
- readonly section: ContextAttributionSection;
12009
- readonly estimatedTokens: number;
12317
+ /** The folded Unit-history index a snapshot carries; bulk identity arrays, never payloads. */
12318
+ interface UnitHistoryExport {
12319
+ readonly tail: number;
12320
+ readonly created: boolean;
12321
+ readonly epoch: UnitEpoch | undefined;
12322
+ readonly epochs: readonly string[];
12323
+ readonly frames: number;
12324
+ readonly ids: readonly (readonly [string, number])[];
12325
+ readonly commits: readonly (readonly [string, number])[];
12326
+ readonly sessionPositions: readonly (readonly [string, readonly number[]])[];
12327
+ readonly members: UnitMembershipExport;
12010
12328
  }
12011
- interface ContextAttributionObservation extends RunIdentity, DurableEvidence {
12012
- readonly modelRequestId: string;
12013
- readonly logicalModelCallId: string;
12014
- readonly provider: string;
12015
- readonly modelId: string;
12016
- readonly tokenizer: 'sorbet-character-estimate-v1';
12017
- readonly measurement: 'estimated';
12018
- readonly evidenceOrigin: 'compiled_request';
12019
- readonly contextEpoch: number;
12020
- readonly prefixRevision: number;
12021
- readonly sections: readonly ContextSectionEstimate[];
12022
- readonly estimatedTotalTokens: number;
12023
- readonly multimodal: boolean;
12024
- readonly delta?: {
12025
- readonly previousModelRequestId: string;
12026
- readonly comparable: boolean;
12027
- readonly reason?: 'model_changed' | 'multimodal' | 'context_epoch_changed';
12028
- readonly sections?: readonly ContextSectionEstimate[];
12029
- };
12329
+ /**
12330
+ * A persisted projection accelerator beside the Journal. It is never consulted for
12331
+ * correctness: the open path restores it only after `validate` proves the anchor
12332
+ * frame sits inside the committed prefix with identical identity, and any doubt
12333
+ * silently falls back to folding the whole prefix.
12334
+ */
12335
+ interface UnitSnapshot {
12336
+ readonly file: UnitSnapshotFile;
12337
+ /**
12338
+ * Proves the stored anchor: the frame at `anchor.offset` must exist inside the
12339
+ * committed prefix with the same sequence, fact identity, Epoch and commit.
12340
+ */
12341
+ validate(): Promise<boolean>;
12030
12342
  }
12031
- interface SessionRecoveryObservation {
12032
- readonly sessionId: string;
12033
- readonly cursor?: string;
12034
- readonly throughSequence: number;
12035
- readonly evidenceOrigin: 'journal_derived';
12036
- readonly openRuns: number;
12037
- readonly openModelRequests: number;
12038
- readonly openEffects: number;
12039
- readonly openCompactions: number;
12040
- readonly unknownModelRequests: number;
12041
- readonly unknownEffects: number;
12343
+ interface UnitSnapshotWrite {
12344
+ readonly interpreter: string;
12345
+ readonly anchor: UnitSnapshotAnchor;
12346
+ /** Named projection payloads; a reversioned projection cannot inherit a foreign slot. */
12347
+ readonly payloads: Readonly<Record<string, JsonValue$1>>;
12042
12348
  }
12043
- interface ToolOutputMeasurement {
12044
- /** Measured UTF-8 text bytes only; image/base64 payloads are counted separately as imageCount. */
12045
- readonly beforeLimitBytes: number;
12046
- readonly afterLimitBytes: number;
12047
- readonly beforeLimitEstimatedTokens: number;
12048
- readonly afterLimitEstimatedTokens: number;
12049
- readonly offloadedBytes: number;
12050
- readonly imageCount: number;
12051
- readonly measurement: 'estimated';
12052
- readonly tokenizer: 'sorbet-tool-text-character-estimate-v1';
12349
+ /** A reusable factory. The caller owns each opened handle, not the factory. */
12350
+ interface UnitStore {
12351
+ open(options?: UnitOpenOptions): Promise<OpenedUnitStore>;
12352
+ /** The persisted projection accelerator, if any. Absent or foreign returns undefined. */
12353
+ readSnapshot?(): Promise<UnitSnapshot | undefined>;
12354
+ /** Replaces the accelerator. Best-effort by contract; callers invoke only after the anchor's commit is durable. */
12355
+ writeSnapshot?(write: UnitSnapshotWrite): Promise<void>;
12356
+ /** Removes the accelerator. Snapshots are disposable; deleting one is always legal. */
12357
+ discardSnapshot?(): Promise<void>;
12053
12358
  }
12054
- interface ToolOutputObservation extends RunIdentity, DurableEvidence, ToolOutputMeasurement {
12055
- readonly toolCallId: string;
12056
- readonly effectAttemptId?: string;
12057
- readonly toolName: string;
12058
- /** Distinct output layers; a Hook may replace feedback without executing an Effect. */
12059
- readonly origin: 'effect' | 'hook';
12359
+ //#endregion
12360
+ //#region src/journal/unit/opened.d.ts
12361
+ interface UnitStorageWrite {
12362
+ readonly record: UnitRecord;
12363
+ /** Encodes record.entry.fact, without the scope or storage envelope. */
12364
+ readonly json: string;
12060
12365
  }
12061
12366
  /**
12062
- * Optional borrowed observation callbacks. Owners supply fresh metadata at existing
12063
- * boundaries, without prompts, Tool content, credentials or Pi mutable objects.
12064
- * Callbacks must return promptly and must not mutate execution or perform network IO.
12065
- * Throws and accidental rejected promises are isolated; promises are never awaited.
12066
- * Durable observations are emitted only for newly committed facts, never during replay.
12067
- * Timing uses the current process's monotonic clock and has no restart continuity.
12367
+ * The backend port of a Unit Store. The handle from `openUnitStorage` owns history
12368
+ * validation, ordering, epochs, and subscriptions; a backend only persists whole batches.
12369
+ * Exclusive ownership is the backend's: refuse a second concurrent open.
12068
12370
  */
12069
- interface RuntimeObservationPort {
12070
- /** Passive lookup for downstream tracing only. Missing/invalid/throwing adapters disable propagation. */
12071
- traceContext?(identity: RunIdentity & {
12072
- readonly toolCallId?: string;
12073
- readonly modelRequestId?: string;
12074
- }): ObservationTraceContext | undefined;
12075
- runAdmitted?(data: RunAdmittedObservation): void;
12076
- runSettled?(data: RunSettledObservation): void;
12077
- contextPrepared?(data: ContextPreparationObservation): void;
12078
- contextCapacityFailed?(data: ContextCapacityObservation): void;
12079
- modelProviderSettled?(data: ModelProviderObservation): void;
12080
- modelRequestSettled?(data: ModelAttemptObservation): void;
12081
- modelRequestDispatched?(data: ModelDispatchObservation): void;
12082
- modelRequestUnknown?(data: ModelUnknownObservation): void;
12083
- modelRetryScheduled?(data: ModelRetryObservation): void;
12084
- modelRetryWaitSettled?(data: ModelRetryWaitObservation): void;
12085
- runExecutionStarted?(data: RunExecutionObservation): void;
12086
- runDrained?(data: RunDrainObservation): void;
12087
- waitStarted?(data: WaitStartedObservation): void;
12088
- waitSettled?(data: WaitSettledObservation): void;
12089
- runResourceWaitSettled?(data: RunResourceWaitObservation): void;
12090
- toolExecutionSettled?(data: ToolExecutionObservation): void;
12091
- toolExecutionStarted?(data: ToolExecutionStartedObservation): void;
12092
- toolPermissionSettled?(data: ToolPermissionObservation): void;
12093
- effectSettled?(data: EffectObservation): void;
12094
- journalBatchCompleted?(data: JournalBatchObservation): void;
12095
- journalReopened?(data: JournalReopenObservation): void;
12096
- journalQueueChanged?(data: JournalQueueObservation): void;
12097
- journalProjectionCompleted?(data: JournalProjectionObservation): void;
12098
- compactionSettled?(data: CompactionObservation): void;
12099
- compactionSourceFallback?(data: CompactionSourceFallbackObservation): void;
12100
- compactionProviderSettled?(data: CompactionProviderObservation): void;
12101
- compactionModelSettled?(data: CompactionModelObservation): void;
12102
- approvalReviewSettled?(data: ApprovalReviewObservation): void;
12103
- contextAttribution?(data: ContextAttributionObservation): void;
12104
- recoveryObserved?(data: SessionRecoveryObservation): void;
12105
- toolOutputShaped?(data: ToolOutputObservation): void;
12371
+ interface UnitStorage {
12372
+ readonly unitId: string;
12373
+ readonly durability: 'sync' | 'memory';
12374
+ /**
12375
+ * Visits every committed batch in commit order. Visited records belong to the visitor.
12376
+ * `frame` locates the batch in its backend (the JSONL byte offset); a snapshot anchor
12377
+ * stores it so validation can re-read the frame without scanning the prefix.
12378
+ * `options` mirrors `UnitOpenOptions.replayFrom`: it starts after the proven prefix.
12379
+ */
12380
+ load(visit: (records: readonly UnitRecord[], frame?: {
12381
+ readonly offset: number;
12382
+ }) => void, options?: UnitOpenOptions['replayFrom']): Promise<void>;
12383
+ /** Positions are ascending zero-based unit offsets (`unitSequence - 1`). Returned records belong to the caller. */
12384
+ read(positions: readonly number[]): Promise<readonly UnitRecord[]>;
12385
+ /**
12386
+ * Persists one batch atomically. Return not-committed only when nothing was persisted.
12387
+ * A throw means the outcome is unknown and isolates the handle until reopen.
12388
+ */
12389
+ append(writes: readonly UnitStorageWrite[]): Promise<UnitCommitOutcome>;
12390
+ /** Byte-framed backends expose locators for snapshot anchors; others omit it. */
12391
+ frameLocators?(): readonly (readonly [number, number, number])[];
12392
+ close(): Promise<void>;
12106
12393
  }
12394
+ /** Opens a backend as a Unit writer. A failed open closes the backend. */
12395
+ declare function openUnitStorage(storage: UnitStorage, options?: UnitOpenOptions): Promise<OpenedUnitStore>;
12396
+ //#endregion
12397
+ //#region src/units/catalog.d.ts
12398
+ type UnitSession = Extract<UnitFact, {
12399
+ kind: 'session.created';
12400
+ }>['payload'] & {
12401
+ readonly closing: boolean;
12402
+ readonly closed: boolean;
12403
+ };
12107
12404
  //#endregion
12108
- export { UnitReader as $, JsonValueSchema as $t, ToolExecutionObservation as A, JournalWrite as At, openUnitStorage as B, SessionForkedPayload as Bt, RunAdmittedObservation as C, JournalPage as Ct, RunSettledObservation as D, JournalStoreFaultError as Dt, RunResourceWaitObservation as E, JournalStore as Et, WaitIdentityObservation as F, RunFailureCodeSchema as Ft, UnitFact as G, SubmissionControlInputSchema as Gt, UnitCommitOutcome as H, SessionInputSourceSchema as Ht, WaitSettledObservation as I, RunJournalFact as It, UnitHistoryErrorCode as J, ToolOutputArchiveRecord as Jt, UnitFactSchema as K, SubmissionInputSchema as Kt, WaitStartedObservation as L, RunJournalFactKind as Lt, ToolOutputMeasurement as M, ModelRequestContextSnapshot as Mt, ToolOutputObservation as N, NewJournalFact as Nt, RuntimeObservationPort as O, JournalSubscription as Ot, ToolPermissionObservation as P, RunFailureCode as Pt, UnitReadOptions as Q, JsonValue$1 as Qt, UnitStorage as R, SendSessionInputSchema as Rt, ObservationTraceContext as S, JournalFactSchema as St, RunExecutionObservation as T, JournalReadOptions as Tt, UnitEntry as U, SessionJournalFact as Ut, OpenedUnitStore as V, SessionInputSource as Vt, UnitEpoch as W, SessionJournalFactKind as Wt, UnitOpenOptions as X, ToolResultMessageCommittedPayload as Xt, UnitInspectionPage as Y, ToolOutputArchiveRecordSchema as Yt, UnitPage as Z, UserPromptSchema as Zt, ModelDispatchObservation as _, JournalCursor as _t, CompactionSourceFallbackObservation as a, JournalRecoveryFact as at, ModelRetryWaitObservation as b, JournalFact as bt, ContextCapacityObservation as c, JournalReaderResetRequiredError as ct, EffectObservation as d, CompletedToolResultSchema as dt, UnitRecord as et, JournalBatchObservation as f, ContextForkSeedSchema as ft, ModelAttemptObservation as g, JournalConflictError as gt, JournalReopenObservation as h, JournalAppendOptions as ht, CompactionProviderObservation as i, UnitWrite as it, ToolExecutionStartedObservation as j, ModelRequestBaseCommittedPayload as jt, SessionRecoveryObservation as k, JournalSubscriptionOptions as kt, ContextPreparationObservation as l, JournalWriterBusyError as lt, JournalQueueObservation as m, JOURNAL_FACT_SCHEMA_VERSION as mt, CompactionModelObservation as n, UnitStoreError as nt, ContextAttributionObservation as o, JournalCorruptionError as ot, JournalProjectionObservation as p, EffectUnknownPayload as pt, UnitHistoryError as q, ToolHookEvidenceSchema as qt, CompactionObservation as r, UnitSubscription as rt, ContextAttributionSection as s, JournalReaderCapacityError as st, ApprovalReviewObservation as t, UnitStore as tt, ContextSectionEstimate as u, CompleteModelInputSchema as ut, ModelProviderObservation as v, JournalCursorGapError as vt, RunDrainObservation as w, JournalPayloadMap as wt, ModelUnknownObservation as x, JournalFactKind as xt, ModelRetryObservation as y, JournalCursorSchema as yt, UnitStorageWrite as z, SendSessionInputVariants as zt };
12109
- //# sourceMappingURL=contracts-D0cczmsb.d.ts.map
12405
+ export { RunExecutionObservation as $, SessionJournalFactKind as $t, CompactionModelObservation as A, JournalFactKind as At, JournalBatchObservation as B, ModelRequestBaseCommittedPayload as Bt, UnitSubscription as C, JOURNAL_FACT_SCHEMA_VERSION as Ct, MessageReceipt as D, JournalCursorGapError as Dt, MessageDeliveryResult as E, JournalCursor as Et, ContextAttributionSection as F, JournalStore as Ft, ModelDispatchObservation as G, RunJournalFact as Gt, JournalQueueObservation as H, NewJournalFact as Ht, ContextCapacityObservation as I, JournalStoreFaultError as It, ModelRetryWaitObservation as J, SendSessionInputVariants as Jt, ModelProviderObservation as K, RunJournalFactKind as Kt, ContextPreparationObservation as L, JournalSubscription as Lt, CompactionProviderObservation as M, JournalPage as Mt, CompactionSourceFallbackObservation as N, JournalPayloadMap as Nt, MessageRejection as O, JournalCursorSchema as Ot, ContextAttributionObservation as P, JournalReadOptions as Pt, RunDrainObservation as Q, SessionJournalFact as Qt, ContextSectionEstimate as R, JournalSubscriptionOptions as Rt, UnitStoreError as S, EffectUnknownPayload as St, UnitSnapshotFile as T, JournalConflictError as Tt, JournalReopenObservation as U, RunFailureCode as Ut, JournalProjectionObservation as V, ModelRequestContextSnapshot as Vt, ModelAttemptObservation as W, RunFailureCodeSchema as Wt, ObservationTraceContext as X, SessionInputSource as Xt, ModelUnknownObservation as Y, SessionForkedPayload as Yt, RunAdmittedObservation as Z, SessionInputSourceSchema as Zt, UnitReader as _, CompactionStateBaselineEntry as _t, OpenedUnitStore as a, ToolResultMessageCommittedPayload as an, ToolExecutionStartedObservation as at, UnitSnapshotWrite as b, CompletedToolResultSchema as bt, UnitEpoch as c, JsonValueSchema as cn, ToolPermissionObservation as ct, UnitHistoryError as d, WaitStartedObservation as dt, SubmissionControlInputSchema as en, RunResourceWaitObservation as et, UnitHistoryErrorCode as f, JournalRecoveryFact as ft, UnitReadOptions as g, JournalWriterBusyError as gt, UnitPage as h, JournalReaderResetRequiredError as ht, openUnitStorage as i, ToolOutputArchiveRecordSchema as in, ToolExecutionObservation as it, CompactionObservation as j, JournalFactSchema as jt, ApprovalReviewObservation as k, JournalFact as kt, UnitFact as l, WaitIdentityObservation as lt, UnitOpenOptions as m, JournalReaderCapacityError as mt, UnitStorage as n, ToolHookEvidenceSchema as nn, RuntimeObservationPort as nt, UnitCommitOutcome as o, UserPromptSchema as on, ToolOutputMeasurement as ot, UnitInspectionPage as p, JournalCorruptionError as pt, ModelRetryObservation as q, SendSessionInputSchema as qt, UnitStorageWrite as r, ToolOutputArchiveRecord as rn, SessionRecoveryObservation as rt, UnitEntry as s, JsonValue$1 as sn, ToolOutputObservation as st, UnitSession as t, SubmissionInputSchema as tn, RunSettledObservation as tt, UnitFactSchema as u, WaitSettledObservation as ut, UnitRecord as v, CompactionStateBaselineEntrySchema as vt, UnitWrite as w, JournalAppendOptions as wt, UnitStore as x, ContextForkSeedSchema as xt, UnitSnapshot as y, CompleteModelInputSchema as yt, EffectObservation as z, JournalWrite as zt };
12406
+ //# sourceMappingURL=catalog-BePaQpKY.d.ts.map