@linnlabs/linnkit 0.41.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/cli.cjs +17 -202
  3. package/dist/cli.cjs.map +1 -1
  4. package/dist/cli.js +17 -202
  5. package/dist/cli.js.map +1 -1
  6. package/dist/context-manager.cjs +0 -1
  7. package/dist/context-manager.cjs.map +1 -1
  8. package/dist/context-manager.js +0 -1
  9. package/dist/context-manager.js.map +1 -1
  10. package/dist/contracts/agentSpec.d.cts +5 -5
  11. package/dist/contracts/agentSpec.d.ts +5 -5
  12. package/dist/contracts/audit.d.cts +10 -10
  13. package/dist/contracts/audit.d.ts +10 -10
  14. package/dist/contracts/contextPolicy.d.cts +14 -14
  15. package/dist/contracts/contextPolicy.d.ts +14 -14
  16. package/dist/contracts/events.d.cts +117 -117
  17. package/dist/contracts/events.d.ts +117 -117
  18. package/dist/contracts/execution.d.cts +2 -2
  19. package/dist/contracts/execution.d.ts +2 -2
  20. package/dist/contracts/llm-retry.d.cts +2 -2
  21. package/dist/contracts/llm-retry.d.ts +2 -2
  22. package/dist/contracts/messages.d.cts +32 -32
  23. package/dist/contracts/messages.d.ts +32 -32
  24. package/dist/contracts/sse.d.cts +97 -97
  25. package/dist/contracts/sse.d.ts +97 -97
  26. package/dist/contracts/sub-run-trace-payload.d.cts +8 -8
  27. package/dist/contracts/sub-run-trace-payload.d.ts +8 -8
  28. package/dist/contracts/token-accounting.d.cts +12 -12
  29. package/dist/contracts/token-accounting.d.ts +12 -12
  30. package/dist/index.cjs +18 -212
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.js +18 -212
  33. package/dist/index.js.map +1 -1
  34. package/dist/quickstart.cjs +17 -202
  35. package/dist/quickstart.cjs.map +1 -1
  36. package/dist/quickstart.js +17 -202
  37. package/dist/quickstart.js.map +1 -1
  38. package/dist/runtime-kernel/child-runs/childRunInvoker.d.cts +1 -3
  39. package/dist/runtime-kernel/child-runs/childRunInvoker.d.ts +1 -3
  40. package/dist/runtime-kernel/events/agentEvents.d.cts +2 -2
  41. package/dist/runtime-kernel/events/agentEvents.d.ts +2 -2
  42. package/dist/runtime-kernel/graph-engine/engine.d.cts +1 -0
  43. package/dist/runtime-kernel/graph-engine/engine.d.ts +1 -0
  44. package/dist/runtime-kernel/graph-engine/nodes/toolNode.d.cts +1 -3
  45. package/dist/runtime-kernel/graph-engine/nodes/toolNode.d.ts +1 -3
  46. package/dist/runtime-kernel/testkit/defaultGraphExecutor.d.cts +1 -2
  47. package/dist/runtime-kernel/testkit/defaultGraphExecutor.d.ts +1 -2
  48. package/dist/runtime-kernel/testkit/graphLoopHarness.d.cts +1 -2
  49. package/dist/runtime-kernel/testkit/graphLoopHarness.d.ts +1 -2
  50. package/dist/runtime-kernel/tools/index.d.cts +1 -2
  51. package/dist/runtime-kernel/tools/index.d.ts +1 -2
  52. package/dist/runtime-kernel/tools/model-input/orchestration/resolveToolModelInput.d.cts +4 -3
  53. package/dist/runtime-kernel/tools/model-input/orchestration/resolveToolModelInput.d.ts +4 -3
  54. package/dist/runtime-kernel/tools/ports.d.cts +1 -28
  55. package/dist/runtime-kernel/tools/ports.d.ts +1 -28
  56. package/dist/runtime-kernel/tools/toolContextRuntime.d.cts +1 -1
  57. package/dist/runtime-kernel/tools/toolContextRuntime.d.ts +1 -1
  58. package/dist/runtime-kernel/tools/toolContracts.d.cts +0 -6
  59. package/dist/runtime-kernel/tools/toolContracts.d.ts +0 -6
  60. package/dist/runtime-kernel/tools/toolExecutionContext.d.cts +0 -7
  61. package/dist/runtime-kernel/tools/toolExecutionContext.d.ts +0 -7
  62. package/dist/runtime-kernel.cjs +17 -207
  63. package/dist/runtime-kernel.cjs.map +1 -1
  64. package/dist/runtime-kernel.d.cts +1 -2
  65. package/dist/runtime-kernel.d.ts +1 -2
  66. package/dist/runtime-kernel.js +17 -207
  67. package/dist/runtime-kernel.js.map +1 -1
  68. package/dist/testkit/agent-harness/scriptedInferenceHarness.d.cts +1 -1
  69. package/dist/testkit/agent-harness/scriptedInferenceHarness.d.ts +1 -1
  70. package/dist/testkit.cjs +17 -207
  71. package/dist/testkit.cjs.map +1 -1
  72. package/dist/testkit.js +17 -207
  73. package/dist/testkit.js.map +1 -1
  74. package/docs/integration/tool-development-guide.md +8 -23
  75. package/docs/integration/tools.md +2 -5
  76. package/package.json +2 -2
  77. package/dist/runtime-kernel/tools/model-input/definitions/toolModelInputPolicy.d.cts +0 -17
  78. package/dist/runtime-kernel/tools/model-input/definitions/toolModelInputPolicy.d.ts +0 -17
@@ -8,25 +8,25 @@ declare const RuntimeRunLane: z.ZodEnum<{
8
8
  }>;
9
9
  type RuntimeRunLane = z.infer<typeof RuntimeRunLane>;
10
10
  declare const RuntimeEventVisibility: z.ZodEnum<{
11
+ none: "none";
11
12
  conversation: "conversation";
12
13
  "parent-trace": "parent-trace";
13
- none: "none";
14
14
  }>;
15
15
  type RuntimeEventVisibility = z.infer<typeof RuntimeEventVisibility>;
16
16
  declare const RuntimeRunStatus: z.ZodEnum<{
17
+ completed: "completed";
17
18
  failed: "failed";
18
19
  cancelled: "cancelled";
19
- pending: "pending";
20
20
  paused: "paused";
21
- completed: "completed";
22
- awaiting_user: "awaiting_user";
21
+ pending: "pending";
23
22
  running: "running";
23
+ awaiting_user: "awaiting_user";
24
24
  }>;
25
25
  type RuntimeRunStatus = z.infer<typeof RuntimeRunStatus>;
26
26
  declare const RunExecutionOutcome: z.ZodEnum<{
27
+ completed: "completed";
27
28
  failed: "failed";
28
29
  cancelled: "cancelled";
29
- completed: "completed";
30
30
  awaiting_user: "awaiting_user";
31
31
  }>;
32
32
  type RunExecutionOutcome = z.infer<typeof RunExecutionOutcome>;
@@ -44,9 +44,9 @@ declare const RuntimeEventRoutingIdentity: z.ZodObject<{
44
44
  child: "child";
45
45
  }>;
46
46
  visibility: z.ZodEnum<{
47
+ none: "none";
47
48
  conversation: "conversation";
48
49
  "parent-trace": "parent-trace";
49
- none: "none";
50
50
  }>;
51
51
  }, z.core.$strict>;
52
52
  type RuntimeEventRoutingIdentity = z.infer<typeof RuntimeEventRoutingIdentity>;
@@ -66,9 +66,9 @@ declare const BaseEvent: z.ZodObject<{
66
66
  child: "child";
67
67
  }>>;
68
68
  visibility: z.ZodOptional<z.ZodEnum<{
69
+ none: "none";
69
70
  conversation: "conversation";
70
71
  "parent-trace": "parent-trace";
71
- none: "none";
72
72
  }>>;
73
73
  }, z.core.$strip>;
74
74
 
@@ -151,17 +151,17 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
151
151
  child: "child";
152
152
  }>>;
153
153
  visibility: z.ZodOptional<z.ZodEnum<{
154
+ none: "none";
154
155
  conversation: "conversation";
155
156
  "parent-trace": "parent-trace";
156
- none: "none";
157
157
  }>>;
158
158
  type: z.ZodLiteral<"user_input">;
159
159
  content: z.ZodString;
160
160
  raw_content: z.ZodOptional<z.ZodString>;
161
161
  source: z.ZodDefault<z.ZodEnum<{
162
+ system: "system";
162
163
  user: "user";
163
164
  editor: "editor";
164
- system: "system";
165
165
  }>>;
166
166
  attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
167
167
  id: z.ZodString;
@@ -195,9 +195,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
195
195
  child: "child";
196
196
  }>>;
197
197
  visibility: z.ZodOptional<z.ZodEnum<{
198
+ none: "none";
198
199
  conversation: "conversation";
199
200
  "parent-trace": "parent-trace";
200
- none: "none";
201
201
  }>>;
202
202
  type: z.ZodLiteral<"thought">;
203
203
  content: z.ZodString;
@@ -220,9 +220,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
220
220
  child: "child";
221
221
  }>>;
222
222
  visibility: z.ZodOptional<z.ZodEnum<{
223
+ none: "none";
223
224
  conversation: "conversation";
224
225
  "parent-trace": "parent-trace";
225
- none: "none";
226
226
  }>>;
227
227
  type: z.ZodLiteral<"tool_call_decision">;
228
228
  tool_name: z.ZodString;
@@ -319,9 +319,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
319
319
  child: "child";
320
320
  }>>;
321
321
  visibility: z.ZodOptional<z.ZodEnum<{
322
+ none: "none";
322
323
  conversation: "conversation";
323
324
  "parent-trace": "parent-trace";
324
- none: "none";
325
325
  }>>;
326
326
  type: z.ZodLiteral<"tool_process">;
327
327
  tool_name: z.ZodString;
@@ -357,9 +357,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
357
357
  child: "child";
358
358
  }>>;
359
359
  visibility: z.ZodOptional<z.ZodEnum<{
360
+ none: "none";
360
361
  conversation: "conversation";
361
362
  "parent-trace": "parent-trace";
362
- none: "none";
363
363
  }>>;
364
364
  type: z.ZodLiteral<"tool_output">;
365
365
  tool_name: z.ZodString;
@@ -404,9 +404,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
404
404
  child: "child";
405
405
  }>>;
406
406
  visibility: z.ZodOptional<z.ZodEnum<{
407
+ none: "none";
407
408
  conversation: "conversation";
408
409
  "parent-trace": "parent-trace";
409
- none: "none";
410
410
  }>>;
411
411
  parent_tool_call_id: z.core.$ZodBranded<z.ZodString, "ToolCallId", "out">;
412
412
  subrun_id: z.ZodString;
@@ -414,25 +414,25 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
414
414
  source_event_id: z.ZodString;
415
415
  kind: z.ZodEnum<{
416
416
  error: "error";
417
+ history_summary: "history_summary";
418
+ final_answer: "final_answer";
419
+ tool_output: "tool_output";
417
420
  tool_call_decision: "tool_call_decision";
418
421
  tool_process: "tool_process";
419
- tool_output: "tool_output";
420
422
  thought_delta: "thought_delta";
421
423
  thought_complete: "thought_complete";
422
424
  final_answer_chunk: "final_answer_chunk";
423
- final_answer: "final_answer";
424
- history_summary: "history_summary";
425
425
  llm_retry: "llm_retry";
426
426
  }>;
427
427
  retry: z.ZodOptional<z.ZodObject<{
428
428
  retry_id: z.ZodString;
429
429
  status: z.ZodEnum<{
430
+ failed: "failed";
431
+ cancelled: "cancelled";
430
432
  waiting: "waiting";
431
433
  retrying: "retrying";
432
434
  succeeded: "succeeded";
433
435
  exhausted: "exhausted";
434
- failed: "failed";
435
- cancelled: "cancelled";
436
436
  }>;
437
437
  category: z.ZodEnum<{
438
438
  output: "output";
@@ -525,9 +525,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
525
525
  child: "child";
526
526
  }>>;
527
527
  visibility: z.ZodOptional<z.ZodEnum<{
528
+ none: "none";
528
529
  conversation: "conversation";
529
530
  "parent-trace": "parent-trace";
530
- none: "none";
531
531
  }>>;
532
532
  type: z.ZodLiteral<"requires_user_interaction">;
533
533
  form: z.ZodOptional<z.ZodType<SerializableJsonValue, SerializableJsonValue, z.core.$ZodTypeInternals<SerializableJsonValue, SerializableJsonValue>>>;
@@ -555,9 +555,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
555
555
  child: "child";
556
556
  }>>;
557
557
  visibility: z.ZodOptional<z.ZodEnum<{
558
+ none: "none";
558
559
  conversation: "conversation";
559
560
  "parent-trace": "parent-trace";
560
- none: "none";
561
561
  }>>;
562
562
  type: z.ZodLiteral<"audit_envelope">;
563
563
  envelope: z.ZodObject<{
@@ -567,12 +567,12 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
567
567
  ts: z.ZodNumber;
568
568
  actor: z.ZodObject<{
569
569
  kind: z.ZodEnum<{
570
- user: "user";
571
570
  system: "system";
571
+ user: "user";
572
+ tool: "tool";
572
573
  host: "host";
573
574
  agent: "agent";
574
575
  model: "model";
575
- tool: "tool";
576
576
  }>;
577
577
  id: z.ZodOptional<z.ZodString>;
578
578
  name: z.ZodOptional<z.ZodString>;
@@ -580,14 +580,14 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
580
580
  action: z.ZodString;
581
581
  decision: z.ZodOptional<z.ZodObject<{
582
582
  outcome: z.ZodEnum<{
583
- cancelled: "cancelled";
584
- retry: "retry";
583
+ requested: "requested";
585
584
  allowed: "allowed";
586
585
  denied: "denied";
587
586
  fallback: "fallback";
587
+ retry: "retry";
588
+ cancelled: "cancelled";
588
589
  paused: "paused";
589
590
  resumed: "resumed";
590
- requested: "requested";
591
591
  recorded: "recorded";
592
592
  }>;
593
593
  reason: z.ZodOptional<z.ZodString>;
@@ -636,9 +636,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
636
636
  child: "child";
637
637
  }>>;
638
638
  visibility: z.ZodOptional<z.ZodEnum<{
639
+ none: "none";
639
640
  conversation: "conversation";
640
641
  "parent-trace": "parent-trace";
641
- none: "none";
642
642
  }>>;
643
643
  type: z.ZodLiteral<"final_answer">;
644
644
  answer_id: z.ZodString;
@@ -724,9 +724,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
724
724
  child: "child";
725
725
  }>>;
726
726
  visibility: z.ZodOptional<z.ZodEnum<{
727
+ none: "none";
727
728
  conversation: "conversation";
728
729
  "parent-trace": "parent-trace";
729
- none: "none";
730
730
  }>>;
731
731
  type: z.ZodLiteral<"final_answer_chunk">;
732
732
  answer_id: z.ZodString;
@@ -749,9 +749,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
749
749
  child: "child";
750
750
  }>>;
751
751
  visibility: z.ZodOptional<z.ZodEnum<{
752
+ none: "none";
752
753
  conversation: "conversation";
753
754
  "parent-trace": "parent-trace";
754
- none: "none";
755
755
  }>>;
756
756
  type: z.ZodLiteral<"final_answer_reset">;
757
757
  answer_id: z.ZodOptional<z.ZodString>;
@@ -772,9 +772,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
772
772
  child: "child";
773
773
  }>>;
774
774
  visibility: z.ZodOptional<z.ZodEnum<{
775
+ none: "none";
775
776
  conversation: "conversation";
776
777
  "parent-trace": "parent-trace";
777
- none: "none";
778
778
  }>>;
779
779
  type: z.ZodLiteral<"history_summary">;
780
780
  content: z.ZodString;
@@ -799,18 +799,18 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
799
799
  child: "child";
800
800
  }>>;
801
801
  visibility: z.ZodOptional<z.ZodEnum<{
802
+ none: "none";
802
803
  conversation: "conversation";
803
804
  "parent-trace": "parent-trace";
804
- none: "none";
805
805
  }>>;
806
806
  retry_id: z.ZodString;
807
807
  status: z.ZodEnum<{
808
+ failed: "failed";
809
+ cancelled: "cancelled";
808
810
  waiting: "waiting";
809
811
  retrying: "retrying";
810
812
  succeeded: "succeeded";
811
813
  exhausted: "exhausted";
812
- failed: "failed";
813
- cancelled: "cancelled";
814
814
  }>;
815
815
  category: z.ZodEnum<{
816
816
  output: "output";
@@ -843,9 +843,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
843
843
  child: "child";
844
844
  }>>;
845
845
  visibility: z.ZodOptional<z.ZodEnum<{
846
+ none: "none";
846
847
  conversation: "conversation";
847
848
  "parent-trace": "parent-trace";
848
- none: "none";
849
849
  }>>;
850
850
  error: z.ZodString;
851
851
  error_code: z.ZodOptional<z.ZodString>;
@@ -869,9 +869,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
869
869
  child: "child";
870
870
  }>>;
871
871
  visibility: z.ZodOptional<z.ZodEnum<{
872
+ none: "none";
872
873
  conversation: "conversation";
873
874
  "parent-trace": "parent-trace";
874
- none: "none";
875
875
  }>>;
876
876
  type: z.ZodLiteral<"control">;
877
877
  op: z.ZodEnum<{
@@ -898,9 +898,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
898
898
  child: "child";
899
899
  }>>;
900
900
  visibility: z.ZodOptional<z.ZodEnum<{
901
+ none: "none";
901
902
  conversation: "conversation";
902
903
  "parent-trace": "parent-trace";
903
- none: "none";
904
904
  }>>;
905
905
  type: z.ZodLiteral<"context_usage_snapshot">;
906
906
  ephemeral: z.ZodLiteral<true>;
@@ -949,16 +949,16 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<[z.ZodObject<{
949
949
  child: "child";
950
950
  }>>;
951
951
  visibility: z.ZodOptional<z.ZodEnum<{
952
+ none: "none";
952
953
  conversation: "conversation";
953
954
  "parent-trace": "parent-trace";
954
- none: "none";
955
955
  }>>;
956
956
  type: z.ZodLiteral<"run_execution_metrics">;
957
957
  execution_id: z.ZodString;
958
958
  outcome: z.ZodEnum<{
959
+ completed: "completed";
959
960
  failed: "failed";
960
961
  cancelled: "cancelled";
961
- completed: "completed";
962
962
  awaiting_user: "awaiting_user";
963
963
  }>;
964
964
  duration_ms: z.ZodNumber;
@@ -1008,17 +1008,17 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1008
1008
  child: "child";
1009
1009
  }>>;
1010
1010
  visibility: z.ZodOptional<z.ZodEnum<{
1011
+ none: "none";
1011
1012
  conversation: "conversation";
1012
1013
  "parent-trace": "parent-trace";
1013
- none: "none";
1014
1014
  }>>;
1015
1015
  type: z.ZodLiteral<"user_input">;
1016
1016
  content: z.ZodString;
1017
1017
  raw_content: z.ZodOptional<z.ZodString>;
1018
1018
  source: z.ZodDefault<z.ZodEnum<{
1019
+ system: "system";
1019
1020
  user: "user";
1020
1021
  editor: "editor";
1021
- system: "system";
1022
1022
  }>>;
1023
1023
  attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
1024
1024
  id: z.ZodString;
@@ -1052,9 +1052,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1052
1052
  child: "child";
1053
1053
  }>>;
1054
1054
  visibility: z.ZodOptional<z.ZodEnum<{
1055
+ none: "none";
1055
1056
  conversation: "conversation";
1056
1057
  "parent-trace": "parent-trace";
1057
- none: "none";
1058
1058
  }>>;
1059
1059
  type: z.ZodLiteral<"thought">;
1060
1060
  content: z.ZodString;
@@ -1077,9 +1077,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1077
1077
  child: "child";
1078
1078
  }>>;
1079
1079
  visibility: z.ZodOptional<z.ZodEnum<{
1080
+ none: "none";
1080
1081
  conversation: "conversation";
1081
1082
  "parent-trace": "parent-trace";
1082
- none: "none";
1083
1083
  }>>;
1084
1084
  type: z.ZodLiteral<"tool_call_decision">;
1085
1085
  tool_name: z.ZodString;
@@ -1176,9 +1176,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1176
1176
  child: "child";
1177
1177
  }>>;
1178
1178
  visibility: z.ZodOptional<z.ZodEnum<{
1179
+ none: "none";
1179
1180
  conversation: "conversation";
1180
1181
  "parent-trace": "parent-trace";
1181
- none: "none";
1182
1182
  }>>;
1183
1183
  type: z.ZodLiteral<"tool_process">;
1184
1184
  tool_name: z.ZodString;
@@ -1214,9 +1214,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1214
1214
  child: "child";
1215
1215
  }>>;
1216
1216
  visibility: z.ZodOptional<z.ZodEnum<{
1217
+ none: "none";
1217
1218
  conversation: "conversation";
1218
1219
  "parent-trace": "parent-trace";
1219
- none: "none";
1220
1220
  }>>;
1221
1221
  type: z.ZodLiteral<"tool_output">;
1222
1222
  tool_name: z.ZodString;
@@ -1261,9 +1261,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1261
1261
  child: "child";
1262
1262
  }>>;
1263
1263
  visibility: z.ZodOptional<z.ZodEnum<{
1264
+ none: "none";
1264
1265
  conversation: "conversation";
1265
1266
  "parent-trace": "parent-trace";
1266
- none: "none";
1267
1267
  }>>;
1268
1268
  parent_tool_call_id: z.core.$ZodBranded<z.ZodString, "ToolCallId", "out">;
1269
1269
  subrun_id: z.ZodString;
@@ -1271,25 +1271,25 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1271
1271
  source_event_id: z.ZodString;
1272
1272
  kind: z.ZodEnum<{
1273
1273
  error: "error";
1274
+ history_summary: "history_summary";
1275
+ final_answer: "final_answer";
1276
+ tool_output: "tool_output";
1274
1277
  tool_call_decision: "tool_call_decision";
1275
1278
  tool_process: "tool_process";
1276
- tool_output: "tool_output";
1277
1279
  thought_delta: "thought_delta";
1278
1280
  thought_complete: "thought_complete";
1279
1281
  final_answer_chunk: "final_answer_chunk";
1280
- final_answer: "final_answer";
1281
- history_summary: "history_summary";
1282
1282
  llm_retry: "llm_retry";
1283
1283
  }>;
1284
1284
  retry: z.ZodOptional<z.ZodObject<{
1285
1285
  retry_id: z.ZodString;
1286
1286
  status: z.ZodEnum<{
1287
+ failed: "failed";
1288
+ cancelled: "cancelled";
1287
1289
  waiting: "waiting";
1288
1290
  retrying: "retrying";
1289
1291
  succeeded: "succeeded";
1290
1292
  exhausted: "exhausted";
1291
- failed: "failed";
1292
- cancelled: "cancelled";
1293
1293
  }>;
1294
1294
  category: z.ZodEnum<{
1295
1295
  output: "output";
@@ -1382,9 +1382,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1382
1382
  child: "child";
1383
1383
  }>>;
1384
1384
  visibility: z.ZodOptional<z.ZodEnum<{
1385
+ none: "none";
1385
1386
  conversation: "conversation";
1386
1387
  "parent-trace": "parent-trace";
1387
- none: "none";
1388
1388
  }>>;
1389
1389
  type: z.ZodLiteral<"requires_user_interaction">;
1390
1390
  form: z.ZodOptional<z.ZodType<SerializableJsonValue, SerializableJsonValue, z.core.$ZodTypeInternals<SerializableJsonValue, SerializableJsonValue>>>;
@@ -1412,9 +1412,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1412
1412
  child: "child";
1413
1413
  }>>;
1414
1414
  visibility: z.ZodOptional<z.ZodEnum<{
1415
+ none: "none";
1415
1416
  conversation: "conversation";
1416
1417
  "parent-trace": "parent-trace";
1417
- none: "none";
1418
1418
  }>>;
1419
1419
  type: z.ZodLiteral<"audit_envelope">;
1420
1420
  envelope: z.ZodObject<{
@@ -1424,12 +1424,12 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1424
1424
  ts: z.ZodNumber;
1425
1425
  actor: z.ZodObject<{
1426
1426
  kind: z.ZodEnum<{
1427
- user: "user";
1428
1427
  system: "system";
1428
+ user: "user";
1429
+ tool: "tool";
1429
1430
  host: "host";
1430
1431
  agent: "agent";
1431
1432
  model: "model";
1432
- tool: "tool";
1433
1433
  }>;
1434
1434
  id: z.ZodOptional<z.ZodString>;
1435
1435
  name: z.ZodOptional<z.ZodString>;
@@ -1437,14 +1437,14 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1437
1437
  action: z.ZodString;
1438
1438
  decision: z.ZodOptional<z.ZodObject<{
1439
1439
  outcome: z.ZodEnum<{
1440
- cancelled: "cancelled";
1441
- retry: "retry";
1440
+ requested: "requested";
1442
1441
  allowed: "allowed";
1443
1442
  denied: "denied";
1444
1443
  fallback: "fallback";
1444
+ retry: "retry";
1445
+ cancelled: "cancelled";
1445
1446
  paused: "paused";
1446
1447
  resumed: "resumed";
1447
- requested: "requested";
1448
1448
  recorded: "recorded";
1449
1449
  }>;
1450
1450
  reason: z.ZodOptional<z.ZodString>;
@@ -1493,9 +1493,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1493
1493
  child: "child";
1494
1494
  }>>;
1495
1495
  visibility: z.ZodOptional<z.ZodEnum<{
1496
+ none: "none";
1496
1497
  conversation: "conversation";
1497
1498
  "parent-trace": "parent-trace";
1498
- none: "none";
1499
1499
  }>>;
1500
1500
  type: z.ZodLiteral<"final_answer">;
1501
1501
  answer_id: z.ZodString;
@@ -1581,9 +1581,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1581
1581
  child: "child";
1582
1582
  }>>;
1583
1583
  visibility: z.ZodOptional<z.ZodEnum<{
1584
+ none: "none";
1584
1585
  conversation: "conversation";
1585
1586
  "parent-trace": "parent-trace";
1586
- none: "none";
1587
1587
  }>>;
1588
1588
  type: z.ZodLiteral<"final_answer_chunk">;
1589
1589
  answer_id: z.ZodString;
@@ -1606,9 +1606,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1606
1606
  child: "child";
1607
1607
  }>>;
1608
1608
  visibility: z.ZodOptional<z.ZodEnum<{
1609
+ none: "none";
1609
1610
  conversation: "conversation";
1610
1611
  "parent-trace": "parent-trace";
1611
- none: "none";
1612
1612
  }>>;
1613
1613
  type: z.ZodLiteral<"final_answer_reset">;
1614
1614
  answer_id: z.ZodOptional<z.ZodString>;
@@ -1629,9 +1629,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1629
1629
  child: "child";
1630
1630
  }>>;
1631
1631
  visibility: z.ZodOptional<z.ZodEnum<{
1632
+ none: "none";
1632
1633
  conversation: "conversation";
1633
1634
  "parent-trace": "parent-trace";
1634
- none: "none";
1635
1635
  }>>;
1636
1636
  type: z.ZodLiteral<"history_summary">;
1637
1637
  content: z.ZodString;
@@ -1656,18 +1656,18 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1656
1656
  child: "child";
1657
1657
  }>>;
1658
1658
  visibility: z.ZodOptional<z.ZodEnum<{
1659
+ none: "none";
1659
1660
  conversation: "conversation";
1660
1661
  "parent-trace": "parent-trace";
1661
- none: "none";
1662
1662
  }>>;
1663
1663
  retry_id: z.ZodString;
1664
1664
  status: z.ZodEnum<{
1665
+ failed: "failed";
1666
+ cancelled: "cancelled";
1665
1667
  waiting: "waiting";
1666
1668
  retrying: "retrying";
1667
1669
  succeeded: "succeeded";
1668
1670
  exhausted: "exhausted";
1669
- failed: "failed";
1670
- cancelled: "cancelled";
1671
1671
  }>;
1672
1672
  category: z.ZodEnum<{
1673
1673
  output: "output";
@@ -1700,9 +1700,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1700
1700
  child: "child";
1701
1701
  }>>;
1702
1702
  visibility: z.ZodOptional<z.ZodEnum<{
1703
+ none: "none";
1703
1704
  conversation: "conversation";
1704
1705
  "parent-trace": "parent-trace";
1705
- none: "none";
1706
1706
  }>>;
1707
1707
  error: z.ZodString;
1708
1708
  error_code: z.ZodOptional<z.ZodString>;
@@ -1726,9 +1726,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1726
1726
  child: "child";
1727
1727
  }>>;
1728
1728
  visibility: z.ZodOptional<z.ZodEnum<{
1729
+ none: "none";
1729
1730
  conversation: "conversation";
1730
1731
  "parent-trace": "parent-trace";
1731
- none: "none";
1732
1732
  }>>;
1733
1733
  type: z.ZodLiteral<"control">;
1734
1734
  op: z.ZodEnum<{
@@ -1755,9 +1755,9 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1755
1755
  child: "child";
1756
1756
  }>>;
1757
1757
  visibility: z.ZodOptional<z.ZodEnum<{
1758
+ none: "none";
1758
1759
  conversation: "conversation";
1759
1760
  "parent-trace": "parent-trace";
1760
- none: "none";
1761
1761
  }>>;
1762
1762
  type: z.ZodLiteral<"context_usage_snapshot">;
1763
1763
  ephemeral: z.ZodLiteral<true>;
@@ -1806,16 +1806,16 @@ declare const RuntimeEvent: z.ZodPipe<z.ZodUnknown, z.ZodDiscriminatedUnion<[z.Z
1806
1806
  child: "child";
1807
1807
  }>>;
1808
1808
  visibility: z.ZodOptional<z.ZodEnum<{
1809
+ none: "none";
1809
1810
  conversation: "conversation";
1810
1811
  "parent-trace": "parent-trace";
1811
- none: "none";
1812
1812
  }>>;
1813
1813
  type: z.ZodLiteral<"run_execution_metrics">;
1814
1814
  execution_id: z.ZodString;
1815
1815
  outcome: z.ZodEnum<{
1816
+ completed: "completed";
1816
1817
  failed: "failed";
1817
1818
  cancelled: "cancelled";
1818
- completed: "completed";
1819
1819
  awaiting_user: "awaiting_user";
1820
1820
  }>;
1821
1821
  duration_ms: z.ZodNumber;
@@ -1923,13 +1923,13 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
1923
1923
  turn_id: string;
1924
1924
  type: "user_input";
1925
1925
  content: string;
1926
- source: "user" | "editor" | "system";
1926
+ source: "system" | "user" | "editor";
1927
1927
  metadata?: Record<string, SerializableJsonValue> | undefined;
1928
1928
  ephemeral?: boolean | undefined;
1929
1929
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
1930
1930
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
1931
1931
  lane?: "foreground" | "auxiliary" | "child" | undefined;
1932
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
1932
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
1933
1933
  raw_content?: string | undefined;
1934
1934
  attachments?: {
1935
1935
  id: string;
@@ -1957,7 +1957,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
1957
1957
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
1958
1958
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
1959
1959
  lane?: "foreground" | "auxiliary" | "child" | undefined;
1960
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
1960
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
1961
1961
  thought_message_id?: string | undefined;
1962
1962
  delta?: string | undefined;
1963
1963
  } | {
@@ -1976,7 +1976,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
1976
1976
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
1977
1977
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
1978
1978
  lane?: "foreground" | "auxiliary" | "child" | undefined;
1979
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
1979
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
1980
1980
  args?: Record<string, SerializableJsonValue> | undefined;
1981
1981
  payload?: {
1982
1982
  args?: Record<string, SerializableJsonValue> | undefined;
@@ -2058,7 +2058,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2058
2058
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2059
2059
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2060
2060
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2061
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2061
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2062
2062
  args?: Record<string, SerializableJsonValue> | undefined;
2063
2063
  payload?: Record<string, SerializableJsonValue> | undefined;
2064
2064
  parent_tool_call_id?: (string & z.core.$brand<"ToolCallId">) | undefined;
@@ -2079,7 +2079,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2079
2079
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2080
2080
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2081
2081
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2082
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2082
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2083
2083
  data?: SerializableJsonValue | undefined;
2084
2084
  error?: string | undefined;
2085
2085
  error_code?: string | undefined;
@@ -2105,18 +2105,18 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2105
2105
  parent_tool_call_id: string & z.core.$brand<"ToolCallId">;
2106
2106
  subrun_id: string;
2107
2107
  source_event_id: string;
2108
- kind: "error" | "tool_call_decision" | "tool_process" | "tool_output" | "thought_delta" | "thought_complete" | "final_answer_chunk" | "final_answer" | "history_summary" | "llm_retry";
2108
+ kind: "error" | "history_summary" | "final_answer" | "tool_output" | "tool_call_decision" | "tool_process" | "thought_delta" | "thought_complete" | "final_answer_chunk" | "llm_retry";
2109
2109
  type: "subrun_trace";
2110
2110
  ephemeral: true;
2111
2111
  metadata?: Record<string, SerializableJsonValue> | undefined;
2112
2112
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2113
2113
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2114
2114
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2115
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2115
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2116
2116
  subrun_parent_id?: string | undefined;
2117
2117
  retry?: {
2118
2118
  retry_id: string;
2119
- status: "waiting" | "retrying" | "succeeded" | "exhausted" | "failed" | "cancelled";
2119
+ status: "failed" | "cancelled" | "waiting" | "retrying" | "succeeded" | "exhausted";
2120
2120
  category: "output" | "transport" | "rate_limit" | "other";
2121
2121
  attempt: number;
2122
2122
  max_retries: number;
@@ -2186,7 +2186,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2186
2186
  ephemeral?: boolean | undefined;
2187
2187
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2188
2188
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2189
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2189
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2190
2190
  form?: SerializableJsonValue | undefined;
2191
2191
  interaction_type?: string | undefined;
2192
2192
  prompt?: string | undefined;
@@ -2202,14 +2202,14 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2202
2202
  runId: string & z.core.$brand<"RunId">;
2203
2203
  ts: number;
2204
2204
  actor: {
2205
- kind: "user" | "system" | "host" | "agent" | "model" | "tool";
2205
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
2206
2206
  id?: string | undefined;
2207
2207
  name?: string | undefined;
2208
2208
  };
2209
2209
  action: string;
2210
2210
  parentRunId?: (string & z.core.$brand<"RunId">) | undefined;
2211
2211
  decision?: {
2212
- outcome: "cancelled" | "retry" | "allowed" | "denied" | "fallback" | "paused" | "resumed" | "requested" | "recorded";
2212
+ outcome: "requested" | "allowed" | "denied" | "fallback" | "retry" | "cancelled" | "paused" | "resumed" | "recorded";
2213
2213
  reason?: string | undefined;
2214
2214
  policy?: string | undefined;
2215
2215
  metadata?: Record<string, unknown> | undefined;
@@ -2245,7 +2245,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2245
2245
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2246
2246
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2247
2247
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2248
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2248
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2249
2249
  } | {
2250
2250
  id: string;
2251
2251
  conversation_id: string;
@@ -2262,7 +2262,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2262
2262
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2263
2263
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2264
2264
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2265
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2265
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2266
2266
  provider_continuations?: {
2267
2267
  schema_version: 2;
2268
2268
  producer: {
@@ -2337,7 +2337,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2337
2337
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2338
2338
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2339
2339
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2340
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2340
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2341
2341
  is_last?: boolean | undefined;
2342
2342
  } | {
2343
2343
  id: string;
@@ -2351,7 +2351,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2351
2351
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2352
2352
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2353
2353
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2354
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2354
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2355
2355
  answer_id?: string | undefined;
2356
2356
  thought_message_ids?: string[] | undefined;
2357
2357
  } | {
@@ -2370,7 +2370,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2370
2370
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2371
2371
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2372
2372
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2373
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2373
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2374
2374
  compression_ratio?: number | undefined;
2375
2375
  included_old_summary?: boolean | undefined;
2376
2376
  } | {
@@ -2380,7 +2380,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2380
2380
  version: 1;
2381
2381
  turn_id: string;
2382
2382
  retry_id: string;
2383
- status: "waiting" | "retrying" | "succeeded" | "exhausted" | "failed" | "cancelled";
2383
+ status: "failed" | "cancelled" | "waiting" | "retrying" | "succeeded" | "exhausted";
2384
2384
  category: "output" | "transport" | "rate_limit" | "other";
2385
2385
  attempt: number;
2386
2386
  max_retries: number;
@@ -2395,7 +2395,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2395
2395
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2396
2396
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2397
2397
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2398
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2398
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2399
2399
  next_retry_at?: number | undefined;
2400
2400
  } | {
2401
2401
  id: string;
@@ -2410,7 +2410,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2410
2410
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2411
2411
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2412
2412
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2413
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2413
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2414
2414
  error_code?: string | undefined;
2415
2415
  retryable?: boolean | undefined;
2416
2416
  retry_id?: string | undefined;
@@ -2428,7 +2428,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2428
2428
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2429
2429
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2430
2430
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2431
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2431
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2432
2432
  target_id?: string | undefined;
2433
2433
  reason?: string | undefined;
2434
2434
  meta?: SerializableJsonValue | undefined;
@@ -2462,7 +2462,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2462
2462
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2463
2463
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2464
2464
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2465
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2465
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2466
2466
  user_message_id?: string | undefined;
2467
2467
  } | {
2468
2468
  id: string;
@@ -2472,14 +2472,14 @@ declare const validateRuntimeEvent: (event: unknown) => z.ZodSafeParseResult<{
2472
2472
  turn_id: string;
2473
2473
  type: "run_execution_metrics";
2474
2474
  execution_id: string;
2475
- outcome: "failed" | "cancelled" | "completed" | "awaiting_user";
2475
+ outcome: "completed" | "failed" | "cancelled" | "awaiting_user";
2476
2476
  duration_ms: number;
2477
2477
  metadata?: Record<string, SerializableJsonValue> | undefined;
2478
2478
  ephemeral?: boolean | undefined;
2479
2479
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2480
2480
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2481
2481
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2482
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2482
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2483
2483
  user_message_id?: string | undefined;
2484
2484
  context_usage?: {
2485
2485
  basis: "last_completed_llm_prompt";
@@ -2508,13 +2508,13 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2508
2508
  turn_id: string;
2509
2509
  type: "user_input";
2510
2510
  content: string;
2511
- source: "user" | "editor" | "system";
2511
+ source: "system" | "user" | "editor";
2512
2512
  metadata?: Record<string, SerializableJsonValue> | undefined;
2513
2513
  ephemeral?: boolean | undefined;
2514
2514
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2515
2515
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2516
2516
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2517
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2517
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2518
2518
  raw_content?: string | undefined;
2519
2519
  attachments?: {
2520
2520
  id: string;
@@ -2542,7 +2542,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2542
2542
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2543
2543
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2544
2544
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2545
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2545
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2546
2546
  thought_message_id?: string | undefined;
2547
2547
  delta?: string | undefined;
2548
2548
  } | {
@@ -2561,7 +2561,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2561
2561
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2562
2562
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2563
2563
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2564
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2564
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2565
2565
  args?: Record<string, SerializableJsonValue> | undefined;
2566
2566
  payload?: {
2567
2567
  args?: Record<string, SerializableJsonValue> | undefined;
@@ -2643,7 +2643,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2643
2643
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2644
2644
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2645
2645
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2646
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2646
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2647
2647
  args?: Record<string, SerializableJsonValue> | undefined;
2648
2648
  payload?: Record<string, SerializableJsonValue> | undefined;
2649
2649
  parent_tool_call_id?: (string & z.core.$brand<"ToolCallId">) | undefined;
@@ -2664,7 +2664,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2664
2664
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2665
2665
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2666
2666
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2667
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2667
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2668
2668
  data?: SerializableJsonValue | undefined;
2669
2669
  error?: string | undefined;
2670
2670
  error_code?: string | undefined;
@@ -2690,18 +2690,18 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2690
2690
  parent_tool_call_id: string & z.core.$brand<"ToolCallId">;
2691
2691
  subrun_id: string;
2692
2692
  source_event_id: string;
2693
- kind: "error" | "tool_call_decision" | "tool_process" | "tool_output" | "thought_delta" | "thought_complete" | "final_answer_chunk" | "final_answer" | "history_summary" | "llm_retry";
2693
+ kind: "error" | "history_summary" | "final_answer" | "tool_output" | "tool_call_decision" | "tool_process" | "thought_delta" | "thought_complete" | "final_answer_chunk" | "llm_retry";
2694
2694
  type: "subrun_trace";
2695
2695
  ephemeral: true;
2696
2696
  metadata?: Record<string, SerializableJsonValue> | undefined;
2697
2697
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2698
2698
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2699
2699
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2700
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2700
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2701
2701
  subrun_parent_id?: string | undefined;
2702
2702
  retry?: {
2703
2703
  retry_id: string;
2704
- status: "waiting" | "retrying" | "succeeded" | "exhausted" | "failed" | "cancelled";
2704
+ status: "failed" | "cancelled" | "waiting" | "retrying" | "succeeded" | "exhausted";
2705
2705
  category: "output" | "transport" | "rate_limit" | "other";
2706
2706
  attempt: number;
2707
2707
  max_retries: number;
@@ -2771,7 +2771,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2771
2771
  ephemeral?: boolean | undefined;
2772
2772
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2773
2773
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2774
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2774
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2775
2775
  form?: SerializableJsonValue | undefined;
2776
2776
  interaction_type?: string | undefined;
2777
2777
  prompt?: string | undefined;
@@ -2787,14 +2787,14 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2787
2787
  runId: string & z.core.$brand<"RunId">;
2788
2788
  ts: number;
2789
2789
  actor: {
2790
- kind: "user" | "system" | "host" | "agent" | "model" | "tool";
2790
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
2791
2791
  id?: string | undefined;
2792
2792
  name?: string | undefined;
2793
2793
  };
2794
2794
  action: string;
2795
2795
  parentRunId?: (string & z.core.$brand<"RunId">) | undefined;
2796
2796
  decision?: {
2797
- outcome: "cancelled" | "retry" | "allowed" | "denied" | "fallback" | "paused" | "resumed" | "requested" | "recorded";
2797
+ outcome: "requested" | "allowed" | "denied" | "fallback" | "retry" | "cancelled" | "paused" | "resumed" | "recorded";
2798
2798
  reason?: string | undefined;
2799
2799
  policy?: string | undefined;
2800
2800
  metadata?: Record<string, unknown> | undefined;
@@ -2830,7 +2830,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2830
2830
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2831
2831
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2832
2832
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2833
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2833
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2834
2834
  } | {
2835
2835
  id: string;
2836
2836
  conversation_id: string;
@@ -2847,7 +2847,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2847
2847
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2848
2848
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2849
2849
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2850
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2850
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2851
2851
  provider_continuations?: {
2852
2852
  schema_version: 2;
2853
2853
  producer: {
@@ -2922,7 +2922,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2922
2922
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2923
2923
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2924
2924
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2925
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2925
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2926
2926
  is_last?: boolean | undefined;
2927
2927
  } | {
2928
2928
  id: string;
@@ -2936,7 +2936,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2936
2936
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2937
2937
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2938
2938
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2939
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2939
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2940
2940
  answer_id?: string | undefined;
2941
2941
  thought_message_ids?: string[] | undefined;
2942
2942
  } | {
@@ -2955,7 +2955,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2955
2955
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2956
2956
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2957
2957
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2958
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2958
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2959
2959
  compression_ratio?: number | undefined;
2960
2960
  included_old_summary?: boolean | undefined;
2961
2961
  } | {
@@ -2965,7 +2965,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2965
2965
  version: 1;
2966
2966
  turn_id: string;
2967
2967
  retry_id: string;
2968
- status: "waiting" | "retrying" | "succeeded" | "exhausted" | "failed" | "cancelled";
2968
+ status: "failed" | "cancelled" | "waiting" | "retrying" | "succeeded" | "exhausted";
2969
2969
  category: "output" | "transport" | "rate_limit" | "other";
2970
2970
  attempt: number;
2971
2971
  max_retries: number;
@@ -2980,7 +2980,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2980
2980
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2981
2981
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2982
2982
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2983
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2983
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2984
2984
  next_retry_at?: number | undefined;
2985
2985
  } | {
2986
2986
  id: string;
@@ -2995,7 +2995,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
2995
2995
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
2996
2996
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
2997
2997
  lane?: "foreground" | "auxiliary" | "child" | undefined;
2998
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
2998
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
2999
2999
  error_code?: string | undefined;
3000
3000
  retryable?: boolean | undefined;
3001
3001
  retry_id?: string | undefined;
@@ -3013,7 +3013,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
3013
3013
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
3014
3014
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
3015
3015
  lane?: "foreground" | "auxiliary" | "child" | undefined;
3016
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
3016
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
3017
3017
  target_id?: string | undefined;
3018
3018
  reason?: string | undefined;
3019
3019
  meta?: SerializableJsonValue | undefined;
@@ -3047,7 +3047,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
3047
3047
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
3048
3048
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
3049
3049
  lane?: "foreground" | "auxiliary" | "child" | undefined;
3050
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
3050
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
3051
3051
  user_message_id?: string | undefined;
3052
3052
  } | {
3053
3053
  id: string;
@@ -3057,14 +3057,14 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.ZodSafeParseResult
3057
3057
  turn_id: string;
3058
3058
  type: "run_execution_metrics";
3059
3059
  execution_id: string;
3060
- outcome: "failed" | "cancelled" | "completed" | "awaiting_user";
3060
+ outcome: "completed" | "failed" | "cancelled" | "awaiting_user";
3061
3061
  duration_ms: number;
3062
3062
  metadata?: Record<string, SerializableJsonValue> | undefined;
3063
3063
  ephemeral?: boolean | undefined;
3064
3064
  run_id?: (string & z.core.$brand<"RunId">) | undefined;
3065
3065
  parent_run_id?: (string & z.core.$brand<"RunId">) | undefined;
3066
3066
  lane?: "foreground" | "auxiliary" | "child" | undefined;
3067
- visibility?: "conversation" | "parent-trace" | "none" | undefined;
3067
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
3068
3068
  user_message_id?: string | undefined;
3069
3069
  context_usage?: {
3070
3070
  basis: "last_completed_llm_prompt";