@linnlabs/linnkit 0.32.0 → 0.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (488) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/cli.cjs +35 -14
  3. package/dist/cli.cjs.map +1 -1
  4. package/dist/cli.js +35 -14
  5. package/dist/cli.js.map +1 -1
  6. package/dist/context-manager/features/context-compaction/definitions/contextCheckpointFormat.d.cts +3 -0
  7. package/dist/context-manager/features/context-compaction/definitions/contextCheckpointFormat.d.ts +3 -0
  8. package/dist/context-manager/features/context-compaction/definitions/historySummaryDraft.d.cts +22 -0
  9. package/dist/context-manager/features/context-compaction/definitions/historySummaryDraft.d.ts +22 -0
  10. package/dist/context-manager/profiles/agent/config.d.cts +33 -0
  11. package/dist/context-manager/profiles/agent/config.d.ts +33 -0
  12. package/dist/context-manager/profiles/agent/context/AgentContextManager.d.cts +132 -0
  13. package/dist/context-manager/profiles/agent/context/AgentContextManager.d.ts +132 -0
  14. package/dist/context-manager/profiles/agent/context/ConversationSession.d.cts +131 -0
  15. package/dist/context-manager/profiles/agent/context/ConversationSession.d.ts +131 -0
  16. package/dist/context-manager/profiles/agent/context/config.d.cts +191 -0
  17. package/dist/context-manager/profiles/agent/context/config.d.ts +191 -0
  18. package/dist/context-manager/profiles/agent/context/index.d.cts +8 -0
  19. package/dist/context-manager/profiles/agent/context/index.d.ts +8 -0
  20. package/dist/context-manager/profiles/agent/context/providers/AgentCoreContextProvider.d.cts +52 -0
  21. package/dist/context-manager/profiles/agent/context/providers/AgentCoreContextProvider.d.ts +52 -0
  22. package/dist/context-manager/profiles/agent/context/providers/AgentWorkingMemoryProvider.d.cts +50 -0
  23. package/dist/context-manager/profiles/agent/context/providers/AgentWorkingMemoryProvider.d.ts +50 -0
  24. package/dist/context-manager/profiles/agent/context/providers/base.d.cts +11 -0
  25. package/dist/context-manager/profiles/agent/context/providers/base.d.ts +11 -0
  26. package/dist/context-manager/profiles/agent/context/providers/index.d.cts +12 -0
  27. package/dist/context-manager/profiles/agent/context/providers/index.d.ts +12 -0
  28. package/dist/context-manager/profiles/agent/contracts.d.cts +27 -0
  29. package/dist/context-manager/profiles/agent/contracts.d.ts +27 -0
  30. package/dist/context-manager/profiles/agent/orchestration/AgentMessageOrchestrator.d.cts +140 -0
  31. package/dist/context-manager/profiles/agent/orchestration/AgentMessageOrchestrator.d.ts +140 -0
  32. package/dist/context-manager/profiles/agent/orchestration/index.d.cts +1 -0
  33. package/dist/context-manager/profiles/agent/orchestration/index.d.ts +1 -0
  34. package/dist/context-manager/profiles/agent/preprocessors/base.d.cts +17 -0
  35. package/dist/context-manager/profiles/agent/preprocessors/base.d.ts +17 -0
  36. package/dist/context-manager/profiles/agent/preprocessors/index.d.cts +117 -0
  37. package/dist/context-manager/profiles/agent/preprocessors/index.d.ts +117 -0
  38. package/dist/context-manager/profiles/agent/preprocessors/toolHistoryCompressor.d.cts +47 -0
  39. package/dist/context-manager/profiles/agent/preprocessors/toolHistoryCompressor.d.ts +47 -0
  40. package/dist/context-manager/profiles/agent/preprocessors/toolReplayProtocolGuard.d.cts +27 -0
  41. package/dist/context-manager/profiles/agent/preprocessors/toolReplayProtocolGuard.d.ts +27 -0
  42. package/dist/context-manager/profiles/agent/tasks/BaseAgentTask.d.cts +43 -0
  43. package/dist/context-manager/profiles/agent/tasks/BaseAgentTask.d.ts +43 -0
  44. package/dist/context-manager/profiles/agent/tasks/base.d.cts +18 -0
  45. package/dist/context-manager/profiles/agent/tasks/base.d.ts +18 -0
  46. package/dist/context-manager/profiles/agent/tasks/index.d.cts +2 -0
  47. package/dist/context-manager/profiles/agent/tasks/index.d.ts +2 -0
  48. package/dist/context-manager/profiles/agent/tools/ToolManager.d.cts +27 -0
  49. package/dist/context-manager/profiles/agent/tools/ToolManager.d.ts +27 -0
  50. package/dist/context-manager/profiles/agent/tools/index.d.cts +1 -0
  51. package/dist/context-manager/profiles/agent/tools/index.d.ts +1 -0
  52. package/dist/context-manager/profiles/agent/utils/eventConverter.d.cts +15 -0
  53. package/dist/context-manager/profiles/agent/utils/eventConverter.d.ts +15 -0
  54. package/dist/context-manager/profiles/agent/utils/index.d.cts +2 -0
  55. package/dist/context-manager/profiles/agent/utils/index.d.ts +2 -0
  56. package/dist/context-manager/profiles/agent/utils/toolOutputSummarizer.d.cts +26 -0
  57. package/dist/context-manager/profiles/agent/utils/toolOutputSummarizer.d.ts +26 -0
  58. package/dist/context-manager/shared/MessageFormatter.d.cts +55 -0
  59. package/dist/context-manager/shared/MessageFormatter.d.ts +55 -0
  60. package/dist/context-manager/shared/agentSpecAdapter.d.cts +63 -0
  61. package/dist/context-manager/shared/agentSpecAdapter.d.ts +63 -0
  62. package/dist/context-manager/shared/context-manager-base.d.cts +102 -0
  63. package/dist/context-manager/shared/context-manager-base.d.ts +102 -0
  64. package/dist/context-manager/shared/context-pipeline.d.cts +42 -0
  65. package/dist/context-manager/shared/context-pipeline.d.ts +42 -0
  66. package/dist/context-manager/shared/context-trace.d.cts +102 -0
  67. package/dist/context-manager/shared/context-trace.d.ts +102 -0
  68. package/dist/context-manager/shared/contextPolicyMerge.d.cts +19 -0
  69. package/dist/context-manager/shared/contextPolicyMerge.d.ts +19 -0
  70. package/dist/context-manager/shared/contracts/chatLineMessage.d.cts +15 -0
  71. package/dist/context-manager/shared/contracts/chatLineMessage.d.ts +15 -0
  72. package/dist/context-manager/shared/fences/FenceRegistry.d.cts +24 -0
  73. package/dist/context-manager/shared/fences/FenceRegistry.d.ts +24 -0
  74. package/dist/context-manager/shared/image-input-estimation.d.cts +16 -0
  75. package/dist/context-manager/shared/image-input-estimation.d.ts +16 -0
  76. package/dist/context-manager/shared/policies/MustKeepPolicy.d.cts +19 -0
  77. package/dist/context-manager/shared/policies/MustKeepPolicy.d.ts +19 -0
  78. package/dist/context-manager/shared/preprocessors/base.d.cts +43 -0
  79. package/dist/context-manager/shared/preprocessors/base.d.ts +43 -0
  80. package/dist/context-manager/shared/preprocessors/currentTurnMessageAssembler.d.cts +26 -0
  81. package/dist/context-manager/shared/preprocessors/currentTurnMessageAssembler.d.ts +26 -0
  82. package/dist/context-manager/shared/preprocessors/fenceLifetimeManager.d.cts +18 -0
  83. package/dist/context-manager/shared/preprocessors/fenceLifetimeManager.d.ts +18 -0
  84. package/dist/context-manager/shared/preprocessors/historyPurification.d.cts +19 -0
  85. package/dist/context-manager/shared/preprocessors/historyPurification.d.ts +19 -0
  86. package/dist/context-manager/shared/preprocessors/priority.d.cts +17 -0
  87. package/dist/context-manager/shared/preprocessors/priority.d.ts +17 -0
  88. package/dist/context-manager/shared/providers/base.d.cts +106 -0
  89. package/dist/context-manager/shared/providers/base.d.ts +106 -0
  90. package/dist/context-manager/shared/providers/registry.d.cts +11 -0
  91. package/dist/context-manager/shared/providers/registry.d.ts +11 -0
  92. package/dist/context-manager/shared/token-calibration.d.cts +25 -0
  93. package/dist/context-manager/shared/token-calibration.d.ts +25 -0
  94. package/dist/context-manager.d.cts +34 -1559
  95. package/dist/context-manager.d.ts +34 -1559
  96. package/dist/contracts/agentSpec.d.cts +869 -0
  97. package/dist/contracts/agentSpec.d.ts +869 -0
  98. package/dist/{audit-XsNMTt0-.d.cts → contracts/audit.d.cts} +7 -7
  99. package/dist/{audit-XsNMTt0-.d.ts → contracts/audit.d.ts} +7 -7
  100. package/dist/contracts/constants.d.cts +3 -0
  101. package/dist/contracts/constants.d.ts +3 -0
  102. package/dist/contracts/contextCompaction.d.cts +43 -0
  103. package/dist/contracts/contextCompaction.d.ts +43 -0
  104. package/dist/contracts/contextPolicy.d.cts +1121 -0
  105. package/dist/contracts/contextPolicy.d.ts +1121 -0
  106. package/dist/{final-answer-B0_kx5_U.d.cts → contracts/events.d.cts} +422 -425
  107. package/dist/{final-answer-oOQ_7nPt.d.ts → contracts/events.d.ts} +422 -425
  108. package/dist/{execution-B7e01ZjW.d.cts → contracts/execution.d.cts} +13 -13
  109. package/dist/{execution-B7e01ZjW.d.ts → contracts/execution.d.ts} +13 -13
  110. package/dist/contracts/final-answer.d.cts +7 -0
  111. package/dist/contracts/final-answer.d.ts +7 -0
  112. package/dist/contracts/identity/definitions.d.cts +70 -0
  113. package/dist/contracts/identity/definitions.d.ts +70 -0
  114. package/dist/contracts/identity/generators.d.cts +33 -0
  115. package/dist/contracts/identity/generators.d.ts +33 -0
  116. package/dist/contracts/identity/invariants.d.cts +24 -0
  117. package/dist/contracts/identity/invariants.d.ts +24 -0
  118. package/dist/contracts/json.d.cts +12 -0
  119. package/dist/contracts/json.d.ts +12 -0
  120. package/dist/{provider-continuation-CTZdCB--.d.cts → contracts/messages.d.cts} +11 -758
  121. package/dist/{provider-continuation-CTZdCB--.d.ts → contracts/messages.d.ts} +11 -758
  122. package/dist/contracts/provider-continuation.d.cts +609 -0
  123. package/dist/contracts/provider-continuation.d.ts +609 -0
  124. package/dist/contracts/reasoning.d.cts +77 -0
  125. package/dist/contracts/reasoning.d.ts +77 -0
  126. package/dist/contracts/resource-ref.d.cts +73 -0
  127. package/dist/contracts/resource-ref.d.ts +73 -0
  128. package/dist/contracts/runtime-status.d.cts +8 -0
  129. package/dist/contracts/runtime-status.d.ts +8 -0
  130. package/dist/contracts/sse-framing.d.cts +28 -0
  131. package/dist/contracts/sse-framing.d.ts +28 -0
  132. package/dist/{index-Cp1_oUj0.d.ts → contracts/sse.d.cts} +455 -811
  133. package/dist/{index-JYf6n2Ik.d.cts → contracts/sse.d.ts} +455 -811
  134. package/dist/contracts/sub-run-trace-payload.d.cts +187 -0
  135. package/dist/contracts/sub-run-trace-payload.d.ts +187 -0
  136. package/dist/{summarization-CMMLhaCe.d.ts → contracts/summarization.d.cts} +2 -2
  137. package/dist/{summarization-kLeweZ5-.d.cts → contracts/summarization.d.ts} +2 -2
  138. package/dist/contracts/token-accounting.d.cts +1177 -0
  139. package/dist/contracts/token-accounting.d.ts +1177 -0
  140. package/dist/{token-calibration-GtFyMJtM.d.cts → contracts/token-calibration.d.cts} +1 -42
  141. package/dist/{token-calibration-GtFyMJtM.d.ts → contracts/token-calibration.d.ts} +1 -42
  142. package/dist/{reasoning-bffu9R2B.d.cts → contracts/token-usage.d.cts} +9 -84
  143. package/dist/{reasoning-bffu9R2B.d.ts → contracts/token-usage.d.ts} +9 -84
  144. package/dist/contracts.d.cts +24 -10
  145. package/dist/contracts.d.ts +24 -10
  146. package/dist/index.cjs +35 -14
  147. package/dist/index.cjs.map +1 -1
  148. package/dist/index.d.cts +14 -77
  149. package/dist/index.d.ts +14 -77
  150. package/dist/index.js +35 -14
  151. package/dist/index.js.map +1 -1
  152. package/dist/ports/agent-invocation.d.cts +42 -0
  153. package/dist/ports/agent-invocation.d.ts +42 -0
  154. package/dist/{audit-DnuOSwWE.d.ts → ports/audit.d.cts} +2 -2
  155. package/dist/{audit-C9LPbPib.d.cts → ports/audit.d.ts} +2 -2
  156. package/dist/ports/canonical-inference.d.cts +135 -0
  157. package/dist/ports/canonical-inference.d.ts +135 -0
  158. package/dist/ports/llm-call.d.cts +109 -0
  159. package/dist/ports/llm-call.d.ts +109 -0
  160. package/dist/ports/llm-input-materialization.d.cts +69 -0
  161. package/dist/ports/llm-input-materialization.d.ts +69 -0
  162. package/dist/{token-counter-BjiHQEJ-.d.ts → ports/token-counter.d.cts} +3 -3
  163. package/dist/{token-counter-DiGIoaq2.d.cts → ports/token-counter.d.ts} +3 -3
  164. package/dist/{tokenizer-yIFTTc-W.d.ts → ports/tokenizer.d.cts} +2 -2
  165. package/dist/{tokenizer-Dz5Y3KT0.d.cts → ports/tokenizer.d.ts} +2 -2
  166. package/dist/ports/tool-schema.d.cts +30 -0
  167. package/dist/ports/tool-schema.d.ts +30 -0
  168. package/dist/ports/usage-normalizer.d.cts +16 -0
  169. package/dist/ports/usage-normalizer.d.ts +16 -0
  170. package/dist/ports.d.cts +10 -9
  171. package/dist/ports.d.ts +10 -9
  172. package/dist/quickstart/defineAgent.d.cts +12 -0
  173. package/dist/quickstart/defineAgent.d.ts +12 -0
  174. package/dist/quickstart/defineConfig.d.cts +7 -0
  175. package/dist/quickstart/defineConfig.d.ts +7 -0
  176. package/dist/quickstart/runAgent.d.cts +12 -0
  177. package/dist/quickstart/runAgent.d.ts +12 -0
  178. package/dist/quickstart/toolRuntime.d.cts +14 -0
  179. package/dist/quickstart/toolRuntime.d.ts +14 -0
  180. package/dist/{runAgent-jxZ0uNto.d.ts → quickstart/types.d.cts} +10 -28
  181. package/dist/{runAgent-QiBiFXHR.d.cts → quickstart/types.d.ts} +10 -28
  182. package/dist/quickstart.cjs +35 -14
  183. package/dist/quickstart.cjs.map +1 -1
  184. package/dist/quickstart.d.cts +5 -23
  185. package/dist/quickstart.d.ts +5 -23
  186. package/dist/quickstart.js +35 -14
  187. package/dist/quickstart.js.map +1 -1
  188. package/dist/runtime-kernel/audit/compositeAudit.d.cts +23 -0
  189. package/dist/runtime-kernel/audit/compositeAudit.d.ts +23 -0
  190. package/dist/runtime-kernel/audit/consoleAudit.d.cts +10 -0
  191. package/dist/runtime-kernel/audit/consoleAudit.d.ts +10 -0
  192. package/dist/runtime-kernel/audit/emitAudit.d.cts +31 -0
  193. package/dist/runtime-kernel/audit/emitAudit.d.ts +31 -0
  194. package/dist/runtime-kernel/audit/eventStoreAudit.d.cts +27 -0
  195. package/dist/runtime-kernel/audit/eventStoreAudit.d.ts +27 -0
  196. package/dist/runtime-kernel/audit/fileAudit.d.cts +22 -0
  197. package/dist/runtime-kernel/audit/fileAudit.d.ts +22 -0
  198. package/dist/runtime-kernel/audit/index.d.cts +6 -0
  199. package/dist/runtime-kernel/audit/index.d.ts +6 -0
  200. package/dist/runtime-kernel/audit/noopAudit.d.cts +5 -0
  201. package/dist/runtime-kernel/audit/noopAudit.d.ts +5 -0
  202. package/dist/runtime-kernel/child-run-trace/childRunParentTraceProjection.d.cts +26 -0
  203. package/dist/runtime-kernel/child-run-trace/childRunParentTraceProjection.d.ts +26 -0
  204. package/dist/runtime-kernel/child-run-trace/index.d.cts +4 -0
  205. package/dist/runtime-kernel/child-run-trace/index.d.ts +4 -0
  206. package/dist/runtime-kernel/child-run-trace/projectChildRuntimeEventToSubRunTrace.d.cts +10 -0
  207. package/dist/runtime-kernel/child-run-trace/projectChildRuntimeEventToSubRunTrace.d.ts +10 -0
  208. package/dist/runtime-kernel/child-run-trace/runtimeEventSubRunTracePublisher.d.cts +47 -0
  209. package/dist/runtime-kernel/child-run-trace/runtimeEventSubRunTracePublisher.d.ts +47 -0
  210. package/dist/runtime-kernel/child-run-trace/subrunTrace.types.d.cts +81 -0
  211. package/dist/runtime-kernel/child-run-trace/subrunTrace.types.d.ts +81 -0
  212. package/dist/runtime-kernel/child-runs/childRunInvoker.d.cts +101 -0
  213. package/dist/runtime-kernel/child-runs/childRunInvoker.d.ts +101 -0
  214. package/dist/runtime-kernel/child-runs/historyPolicy.d.cts +9 -0
  215. package/dist/runtime-kernel/child-runs/historyPolicy.d.ts +9 -0
  216. package/dist/runtime-kernel/child-runs/index.d.cts +3 -0
  217. package/dist/runtime-kernel/child-runs/index.d.ts +3 -0
  218. package/dist/runtime-kernel/child-runs/types.d.cts +82 -0
  219. package/dist/runtime-kernel/child-runs/types.d.ts +82 -0
  220. package/dist/runtime-kernel/enrichment/index.d.cts +2 -0
  221. package/dist/runtime-kernel/enrichment/index.d.ts +2 -0
  222. package/dist/runtime-kernel/enrichment/registry.d.cts +25 -0
  223. package/dist/runtime-kernel/enrichment/registry.d.ts +25 -0
  224. package/dist/runtime-kernel/enrichment/types.d.cts +83 -0
  225. package/dist/runtime-kernel/enrichment/types.d.ts +83 -0
  226. package/dist/runtime-kernel/events/agent-to-runtime.d.cts +6 -0
  227. package/dist/runtime-kernel/events/agent-to-runtime.d.ts +6 -0
  228. package/dist/{agentEvents-yvamy9xt.d.cts → runtime-kernel/events/agentEvents.d.cts} +33 -32
  229. package/dist/{agentEvents-DhXdKeXD.d.ts → runtime-kernel/events/agentEvents.d.ts} +33 -32
  230. package/dist/runtime-kernel/events/eventGovernance.d.cts +47 -0
  231. package/dist/runtime-kernel/events/eventGovernance.d.ts +47 -0
  232. package/dist/runtime-kernel/events/eventMappers.d.cts +41 -0
  233. package/dist/runtime-kernel/events/eventMappers.d.ts +41 -0
  234. package/dist/runtime-kernel/events/finalAnswerAssembler.d.cts +27 -0
  235. package/dist/runtime-kernel/events/finalAnswerAssembler.d.ts +27 -0
  236. package/dist/runtime-kernel/events/finalAnswerCompletion.d.cts +6 -0
  237. package/dist/runtime-kernel/events/finalAnswerCompletion.d.ts +6 -0
  238. package/dist/runtime-kernel/events/provider-sidecar.d.cts +33 -0
  239. package/dist/runtime-kernel/events/provider-sidecar.d.ts +33 -0
  240. package/dist/runtime-kernel/events/runtime-to-ai-message.d.cts +14 -0
  241. package/dist/runtime-kernel/events/runtime-to-ai-message.d.ts +14 -0
  242. package/dist/runtime-kernel/events.d.cts +7 -5
  243. package/dist/runtime-kernel/events.d.ts +7 -5
  244. package/dist/runtime-kernel/execution/event-bus.d.cts +52 -0
  245. package/dist/runtime-kernel/execution/event-bus.d.ts +52 -0
  246. package/dist/runtime-kernel/execution/eventBusEventPersistence.d.cts +40 -0
  247. package/dist/runtime-kernel/execution/eventBusEventPersistence.d.ts +40 -0
  248. package/dist/runtime-kernel/execution/index.d.cts +5 -0
  249. package/dist/runtime-kernel/execution/index.d.ts +5 -0
  250. package/dist/runtime-kernel/execution/runtimeErrorEventFactory.d.cts +46 -0
  251. package/dist/runtime-kernel/execution/runtimeErrorEventFactory.d.ts +46 -0
  252. package/dist/runtime-kernel/execution/runtimeEventPublisher.d.cts +34 -0
  253. package/dist/runtime-kernel/execution/runtimeEventPublisher.d.ts +34 -0
  254. package/dist/runtime-kernel/execution/sequencer.d.cts +69 -0
  255. package/dist/runtime-kernel/execution/sequencer.d.ts +69 -0
  256. package/dist/runtime-kernel/graph-engine/checkpointer/base.d.cts +59 -0
  257. package/dist/runtime-kernel/graph-engine/checkpointer/base.d.ts +59 -0
  258. package/dist/runtime-kernel/graph-engine/checkpointer/memoryCheckpointer.d.cts +14 -0
  259. package/dist/runtime-kernel/graph-engine/checkpointer/memoryCheckpointer.d.ts +14 -0
  260. package/dist/runtime-kernel/graph-engine/definitions/primaryPromptCapacityError.d.cts +22 -0
  261. package/dist/runtime-kernel/graph-engine/definitions/primaryPromptCapacityError.d.ts +22 -0
  262. package/dist/runtime-kernel/graph-engine/engine.d.cts +64 -0
  263. package/dist/runtime-kernel/graph-engine/engine.d.ts +64 -0
  264. package/dist/runtime-kernel/graph-engine/event-store/base.d.cts +26 -0
  265. package/dist/runtime-kernel/graph-engine/event-store/base.d.ts +26 -0
  266. package/dist/runtime-kernel/graph-engine/event-store/memoryEventStore.d.cts +14 -0
  267. package/dist/runtime-kernel/graph-engine/event-store/memoryEventStore.d.ts +14 -0
  268. package/dist/runtime-kernel/graph-engine/executor.d.cts +59 -0
  269. package/dist/runtime-kernel/graph-engine/executor.d.ts +59 -0
  270. package/dist/runtime-kernel/graph-engine/executorContextBuilder.d.cts +104 -0
  271. package/dist/runtime-kernel/graph-engine/executorContextBuilder.d.ts +104 -0
  272. package/dist/runtime-kernel/graph-engine/functions/createHostToolCallBootstrap.d.cts +41 -0
  273. package/dist/runtime-kernel/graph-engine/functions/createHostToolCallBootstrap.d.ts +41 -0
  274. package/dist/runtime-kernel/graph-engine/functions/engineStateSnapshot.d.cts +23 -0
  275. package/dist/runtime-kernel/graph-engine/functions/engineStateSnapshot.d.ts +23 -0
  276. package/dist/runtime-kernel/graph-engine/functions/evaluatePrimaryPromptCapacity.d.cts +15 -0
  277. package/dist/runtime-kernel/graph-engine/functions/evaluatePrimaryPromptCapacity.d.ts +15 -0
  278. package/dist/runtime-kernel/graph-engine/functions/runtimeFailureFact.d.cts +7 -0
  279. package/dist/runtime-kernel/graph-engine/functions/runtimeFailureFact.d.ts +7 -0
  280. package/dist/runtime-kernel/graph-engine/index.d.cts +18 -0
  281. package/dist/runtime-kernel/graph-engine/index.d.ts +18 -0
  282. package/dist/runtime-kernel/graph-engine/nodes/llmNode.d.cts +26 -0
  283. package/dist/runtime-kernel/graph-engine/nodes/llmNode.d.ts +26 -0
  284. package/dist/runtime-kernel/graph-engine/nodes/llmNode.eventBridge.d.cts +6 -0
  285. package/dist/runtime-kernel/graph-engine/nodes/llmNode.eventBridge.d.ts +6 -0
  286. package/dist/runtime-kernel/graph-engine/nodes/toolNode.d.cts +44 -0
  287. package/dist/runtime-kernel/graph-engine/nodes/toolNode.d.ts +44 -0
  288. package/dist/runtime-kernel/graph-engine/nodes/userNode.d.cts +8 -0
  289. package/dist/runtime-kernel/graph-engine/nodes/userNode.d.ts +8 -0
  290. package/dist/runtime-kernel/graph-engine/nodes/waitUserNode.d.cts +15 -0
  291. package/dist/runtime-kernel/graph-engine/nodes/waitUserNode.d.ts +15 -0
  292. package/dist/runtime-kernel/graph-engine/tick-pipeline/types.d.cts +57 -0
  293. package/dist/runtime-kernel/graph-engine/tick-pipeline/types.d.ts +57 -0
  294. package/dist/runtime-kernel/graph-engine/types.d.cts +143 -0
  295. package/dist/runtime-kernel/graph-engine/types.d.ts +143 -0
  296. package/dist/runtime-kernel/llm/caller.d.cts +50 -0
  297. package/dist/runtime-kernel/llm/caller.d.ts +50 -0
  298. package/dist/runtime-kernel/llm/canonical-inference/definitions/canonicalInferenceStreamState.d.cts +28 -0
  299. package/dist/runtime-kernel/llm/canonical-inference/definitions/canonicalInferenceStreamState.d.ts +28 -0
  300. package/dist/runtime-kernel/llm/canonical-inference/functions/advanceCanonicalInferenceStreamState.d.cts +6 -0
  301. package/dist/runtime-kernel/llm/canonical-inference/functions/advanceCanonicalInferenceStreamState.d.ts +6 -0
  302. package/dist/runtime-kernel/llm/canonical-inference/orchestration/consumeCanonicalInferenceStream.d.cts +6 -0
  303. package/dist/runtime-kernel/llm/canonical-inference/orchestration/consumeCanonicalInferenceStream.d.ts +6 -0
  304. package/dist/runtime-kernel/llm/definitions/llmCallInvocationContext.d.cts +29 -0
  305. package/dist/runtime-kernel/llm/definitions/llmCallInvocationContext.d.ts +29 -0
  306. package/dist/runtime-kernel/llm/definitions/llmFallbackObserver.d.cts +26 -0
  307. package/dist/runtime-kernel/llm/definitions/llmFallbackObserver.d.ts +26 -0
  308. package/dist/runtime-kernel/llm/functions/evaluateFallbackPromptCapacity.d.cts +9 -0
  309. package/dist/runtime-kernel/llm/functions/evaluateFallbackPromptCapacity.d.ts +9 -0
  310. package/dist/runtime-kernel/llm/index.d.cts +22 -0
  311. package/dist/runtime-kernel/llm/index.d.ts +22 -0
  312. package/dist/runtime-kernel/llm/input-capabilities/definitions/modelInputCapability.d.cts +24 -0
  313. package/dist/runtime-kernel/llm/input-capabilities/definitions/modelInputCapability.d.ts +24 -0
  314. package/dist/runtime-kernel/llm/input-capabilities/definitions/modelInputCapabilityError.d.cts +31 -0
  315. package/dist/runtime-kernel/llm/input-capabilities/definitions/modelInputCapabilityError.d.ts +31 -0
  316. package/dist/runtime-kernel/llm/input-capabilities/functions/createModelInputCompatibilityError.d.cts +13 -0
  317. package/dist/runtime-kernel/llm/input-capabilities/functions/createModelInputCompatibilityError.d.ts +13 -0
  318. package/dist/runtime-kernel/llm/input-capabilities/functions/deriveModelInputRequirement.d.cts +6 -0
  319. package/dist/runtime-kernel/llm/input-capabilities/functions/deriveModelInputRequirement.d.ts +6 -0
  320. package/dist/runtime-kernel/llm/input-capabilities/functions/evaluateModelInputCompatibility.d.cts +7 -0
  321. package/dist/runtime-kernel/llm/input-capabilities/functions/evaluateModelInputCompatibility.d.ts +7 -0
  322. package/dist/runtime-kernel/llm/input-capabilities/orchestration/assertModelInputCompatibility.d.cts +10 -0
  323. package/dist/runtime-kernel/llm/input-capabilities/orchestration/assertModelInputCompatibility.d.ts +10 -0
  324. package/dist/runtime-kernel/llm/modelCatalog.d.cts +62 -0
  325. package/dist/runtime-kernel/llm/modelCatalog.d.ts +62 -0
  326. package/dist/runtime-kernel/llm/modelResolver.d.cts +40 -0
  327. package/dist/runtime-kernel/llm/modelResolver.d.ts +40 -0
  328. package/dist/runtime-kernel/llm/policies/defaultPolicyEngine.d.cts +15 -0
  329. package/dist/runtime-kernel/llm/policies/defaultPolicyEngine.d.ts +15 -0
  330. package/dist/runtime-kernel/llm/policies/policyEngine.d.cts +18 -0
  331. package/dist/runtime-kernel/llm/policies/policyEngine.d.ts +18 -0
  332. package/dist/runtime-kernel/llm/policies/types.d.cts +27 -0
  333. package/dist/runtime-kernel/llm/policies/types.d.ts +27 -0
  334. package/dist/runtime-kernel/llm/request-builder.d.cts +22 -0
  335. package/dist/runtime-kernel/llm/request-builder.d.ts +22 -0
  336. package/dist/runtime-kernel/llm/usage-telemetry.d.cts +17 -0
  337. package/dist/runtime-kernel/llm/usage-telemetry.d.ts +17 -0
  338. package/dist/runtime-kernel/run-context/index.d.cts +1 -0
  339. package/dist/runtime-kernel/run-context/index.d.ts +1 -0
  340. package/dist/runtime-kernel/run-context/types.d.cts +44 -0
  341. package/dist/runtime-kernel/run-context/types.d.ts +44 -0
  342. package/dist/runtime-kernel/run-supervisor/definitions/runSupervisorContracts.d.cts +131 -0
  343. package/dist/runtime-kernel/run-supervisor/definitions/runSupervisorContracts.d.ts +131 -0
  344. package/dist/runtime-kernel/run-supervisor/index.d.cts +6 -0
  345. package/dist/runtime-kernel/run-supervisor/index.d.ts +6 -0
  346. package/dist/runtime-kernel/run-supervisor/memoryRunRegistryStore.d.cts +15 -0
  347. package/dist/runtime-kernel/run-supervisor/memoryRunRegistryStore.d.ts +15 -0
  348. package/dist/runtime-kernel/run-supervisor/runErrors.d.cts +24 -0
  349. package/dist/runtime-kernel/run-supervisor/runErrors.d.ts +24 -0
  350. package/dist/runtime-kernel/run-supervisor/runHandle.d.cts +155 -0
  351. package/dist/runtime-kernel/run-supervisor/runHandle.d.ts +155 -0
  352. package/dist/runtime-kernel/run-supervisor/runRegistryStorePort.d.cts +47 -0
  353. package/dist/runtime-kernel/run-supervisor/runRegistryStorePort.d.ts +47 -0
  354. package/dist/runtime-kernel/run-supervisor/runSupervisor.d.cts +57 -0
  355. package/dist/runtime-kernel/run-supervisor/runSupervisor.d.ts +57 -0
  356. package/dist/runtime-kernel/system-reminder/apply.d.cts +38 -0
  357. package/dist/runtime-kernel/system-reminder/apply.d.ts +38 -0
  358. package/dist/runtime-kernel/system-reminder/helpers.d.cts +11 -0
  359. package/dist/runtime-kernel/system-reminder/helpers.d.ts +11 -0
  360. package/dist/runtime-kernel/system-reminder/index.d.cts +7 -0
  361. package/dist/runtime-kernel/system-reminder/index.d.ts +7 -0
  362. package/dist/runtime-kernel/system-reminder/registry.d.cts +17 -0
  363. package/dist/runtime-kernel/system-reminder/registry.d.ts +17 -0
  364. package/dist/runtime-kernel/system-reminder/rules.d.cts +20 -0
  365. package/dist/runtime-kernel/system-reminder/rules.d.ts +20 -0
  366. package/dist/runtime-kernel/system-reminder/templates.d.cts +10 -0
  367. package/dist/runtime-kernel/system-reminder/templates.d.ts +10 -0
  368. package/dist/runtime-kernel/system-reminder/triggers.d.cts +10 -0
  369. package/dist/runtime-kernel/system-reminder/triggers.d.ts +10 -0
  370. package/dist/runtime-kernel/system-reminder/types.d.cts +46 -0
  371. package/dist/runtime-kernel/system-reminder/types.d.ts +46 -0
  372. package/dist/runtime-kernel/telemetry/index.d.cts +3 -0
  373. package/dist/runtime-kernel/telemetry/index.d.ts +3 -0
  374. package/dist/runtime-kernel/telemetry/noopTelemetry.d.cts +5 -0
  375. package/dist/runtime-kernel/telemetry/noopTelemetry.d.ts +5 -0
  376. package/dist/runtime-kernel/telemetry/telemetryEvents.d.cts +5 -0
  377. package/dist/runtime-kernel/telemetry/telemetryEvents.d.ts +5 -0
  378. package/dist/runtime-kernel/telemetry/telemetryPort.d.cts +95 -0
  379. package/dist/runtime-kernel/telemetry/telemetryPort.d.ts +95 -0
  380. package/dist/runtime-kernel/testkit/defaultGraphExecutor.d.cts +23 -0
  381. package/dist/runtime-kernel/testkit/defaultGraphExecutor.d.ts +23 -0
  382. package/dist/runtime-kernel/testkit/graphLoopHarness.d.cts +49 -0
  383. package/dist/runtime-kernel/testkit/graphLoopHarness.d.ts +49 -0
  384. package/dist/runtime-kernel/token-accounting/functions.d.cts +27 -0
  385. package/dist/runtime-kernel/token-accounting/functions.d.ts +27 -0
  386. package/dist/runtime-kernel/token-accounting/index.d.cts +1 -0
  387. package/dist/runtime-kernel/token-accounting/index.d.ts +1 -0
  388. package/dist/runtime-kernel/tools/argNormalizer.d.cts +10 -0
  389. package/dist/runtime-kernel/tools/argNormalizer.d.ts +10 -0
  390. package/dist/runtime-kernel/tools/conversationView.d.cts +22 -0
  391. package/dist/runtime-kernel/tools/conversationView.d.ts +22 -0
  392. package/dist/runtime-kernel/tools/idempotency/toolIdempotency.d.cts +25 -0
  393. package/dist/runtime-kernel/tools/idempotency/toolIdempotency.d.ts +25 -0
  394. package/dist/runtime-kernel/tools/index.d.cts +15 -0
  395. package/dist/runtime-kernel/tools/index.d.ts +15 -0
  396. package/dist/runtime-kernel/tools/model-input/definitions/toolModelInput.d.cts +51 -0
  397. package/dist/runtime-kernel/tools/model-input/definitions/toolModelInput.d.ts +51 -0
  398. package/dist/runtime-kernel/tools/model-input/definitions/toolModelInputPolicy.d.cts +17 -0
  399. package/dist/runtime-kernel/tools/model-input/definitions/toolModelInputPolicy.d.ts +17 -0
  400. package/dist/runtime-kernel/tools/model-input/functions/parseToolModelInputDeclaration.d.cts +17 -0
  401. package/dist/runtime-kernel/tools/model-input/functions/parseToolModelInputDeclaration.d.ts +17 -0
  402. package/dist/runtime-kernel/tools/model-input/orchestration/resolveToolModelInput.d.cts +16 -0
  403. package/dist/runtime-kernel/tools/model-input/orchestration/resolveToolModelInput.d.ts +16 -0
  404. package/dist/runtime-kernel/tools/ports.d.cts +119 -0
  405. package/dist/runtime-kernel/tools/ports.d.ts +119 -0
  406. package/dist/runtime-kernel/tools/schema/functions/assertToolParameterSchema.d.cts +15 -0
  407. package/dist/runtime-kernel/tools/schema/functions/assertToolParameterSchema.d.ts +15 -0
  408. package/dist/runtime-kernel/tools/toolContextPatch.d.cts +14 -0
  409. package/dist/runtime-kernel/tools/toolContextPatch.d.ts +14 -0
  410. package/dist/runtime-kernel/tools/toolContextRuntime.d.cts +37 -0
  411. package/dist/runtime-kernel/tools/toolContextRuntime.d.ts +37 -0
  412. package/dist/runtime-kernel/tools/toolContracts.d.cts +109 -0
  413. package/dist/runtime-kernel/tools/toolContracts.d.ts +109 -0
  414. package/dist/runtime-kernel/tools/toolExecutionContext.d.cts +104 -0
  415. package/dist/runtime-kernel/tools/toolExecutionContext.d.ts +104 -0
  416. package/dist/runtime-kernel/tools/ui-types.d.cts +72 -0
  417. package/dist/runtime-kernel/tools/ui-types.d.ts +72 -0
  418. package/dist/runtime-kernel.cjs +35 -14
  419. package/dist/runtime-kernel.cjs.map +1 -1
  420. package/dist/runtime-kernel.d.cts +106 -20
  421. package/dist/runtime-kernel.d.ts +106 -20
  422. package/dist/runtime-kernel.js +35 -14
  423. package/dist/runtime-kernel.js.map +1 -1
  424. package/dist/shared/defaultTokenizerPort.d.cts +29 -0
  425. package/dist/shared/defaultTokenizerPort.d.ts +29 -0
  426. package/dist/shared/errorClassifier.d.cts +42 -0
  427. package/dist/shared/errorClassifier.d.ts +42 -0
  428. package/dist/shared/llmAuditProjection.d.cts +11 -0
  429. package/dist/shared/llmAuditProjection.d.ts +11 -0
  430. package/dist/shared/llmAuditRecorder.d.cts +44 -0
  431. package/dist/shared/llmAuditRecorder.d.ts +44 -0
  432. package/dist/shared/llmImageInputError.d.cts +34 -0
  433. package/dist/shared/llmImageInputError.d.ts +34 -0
  434. package/dist/shared/llmTelemetryContext.d.cts +52 -0
  435. package/dist/shared/llmTelemetryContext.d.ts +52 -0
  436. package/dist/shared/logger.d.cts +12 -0
  437. package/dist/shared/logger.d.ts +12 -0
  438. package/dist/{prompt-budget-yciFkC9U.d.cts → shared/prompt-budget.d.cts} +2 -1
  439. package/dist/{prompt-budget-yciFkC9U.d.ts → shared/prompt-budget.d.ts} +2 -1
  440. package/dist/testkit/agent-harness/assertions.d.cts +10 -0
  441. package/dist/testkit/agent-harness/assertions.d.ts +10 -0
  442. package/dist/testkit/agent-harness/scriptedInferenceHarness.d.cts +52 -0
  443. package/dist/testkit/agent-harness/scriptedInferenceHarness.d.ts +52 -0
  444. package/dist/testkit/context-harness/invariants/index.d.cts +7 -0
  445. package/dist/testkit/context-harness/invariants/index.d.ts +7 -0
  446. package/dist/testkit/context-harness/invariants/types.d.cts +32 -0
  447. package/dist/testkit/context-harness/invariants/types.d.ts +32 -0
  448. package/dist/testkit/context-harness/replayHarness.d.cts +18 -0
  449. package/dist/testkit/context-harness/replayHarness.d.ts +18 -0
  450. package/dist/testkit/mocks/tokenizerPort.d.cts +17 -0
  451. package/dist/testkit/mocks/tokenizerPort.d.ts +17 -0
  452. package/dist/testkit/run-harness/collectingAuditPort.d.cts +21 -0
  453. package/dist/testkit/run-harness/collectingAuditPort.d.ts +21 -0
  454. package/dist/testkit/run-harness/invariants/index.d.cts +7 -0
  455. package/dist/testkit/run-harness/invariants/index.d.ts +7 -0
  456. package/dist/testkit/run-harness/invariants/types.d.cts +48 -0
  457. package/dist/testkit/run-harness/invariants/types.d.ts +48 -0
  458. package/dist/testkit/run-harness/mockTelemetryPort.d.cts +35 -0
  459. package/dist/testkit/run-harness/mockTelemetryPort.d.ts +35 -0
  460. package/dist/testkit/run-harness/runSupervisorHarness.d.cts +60 -0
  461. package/dist/testkit/run-harness/runSupervisorHarness.d.ts +60 -0
  462. package/dist/testkit/tool-fixtures/toolContext.d.cts +19 -0
  463. package/dist/testkit/tool-fixtures/toolContext.d.ts +19 -0
  464. package/dist/testkit.cjs +35 -14
  465. package/dist/testkit.cjs.map +1 -1
  466. package/dist/testkit.d.cts +17 -277
  467. package/dist/testkit.d.ts +17 -277
  468. package/dist/testkit.js +35 -14
  469. package/dist/testkit.js.map +1 -1
  470. package/package.json +6 -4
  471. package/dist/base-DRRrRhxS.d.cts +0 -216
  472. package/dist/base-DVyQIl_d.d.ts +0 -216
  473. package/dist/defaultGraphExecutor-Chr16eYO.d.cts +0 -914
  474. package/dist/defaultGraphExecutor-hT7dchpC.d.ts +0 -914
  475. package/dist/index-1pE6gSpV.d.cts +0 -172
  476. package/dist/index-C2PSqU1I.d.cts +0 -1971
  477. package/dist/index-CZMXtw4h.d.ts +0 -1971
  478. package/dist/index-D_csW7Zl.d.ts +0 -172
  479. package/dist/index-DpSWZ1L6.d.ts +0 -67
  480. package/dist/index-oCM3XEu2.d.cts +0 -67
  481. package/dist/llm-input-materialization-Vce5Swvc.d.ts +0 -366
  482. package/dist/llm-input-materialization-r-V3n9U-.d.cts +0 -366
  483. package/dist/runHandle--l0kE205.d.cts +0 -490
  484. package/dist/runHandle-ouLd6Tgp.d.ts +0 -490
  485. package/dist/token-accounting-19cXG7hM.d.cts +0 -3342
  486. package/dist/token-accounting-CVW37Uri.d.ts +0 -3342
  487. package/dist/toolContracts--KrHHNCY.d.cts +0 -424
  488. package/dist/toolContracts-BQ4kIso_.d.ts +0 -424
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { g as SerializableJsonValue } from './provider-continuation-CTZdCB--.cjs';
2
+ import { SerializableJsonValue } from './json.cjs';
3
3
 
4
4
  declare const RuntimeRunLane: z.ZodEnum<["foreground", "auxiliary", "child"]>;
5
5
  type RuntimeRunLane = z.infer<typeof RuntimeRunLane>;
@@ -21,12 +21,12 @@ declare const RuntimeEventRoutingIdentity: z.ZodObject<{
21
21
  visibility: z.ZodEnum<["conversation", "parent-trace", "none"]>;
22
22
  }, "strict", z.ZodTypeAny, {
23
23
  run_id: string & z.BRAND<"RunId">;
24
- lane: "child" | "foreground" | "auxiliary";
24
+ lane: "foreground" | "auxiliary" | "child";
25
25
  visibility: "none" | "conversation" | "parent-trace";
26
26
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
27
27
  }, {
28
28
  run_id: string;
29
- lane: "child" | "foreground" | "auxiliary";
29
+ lane: "foreground" | "auxiliary" | "child";
30
30
  visibility: "none" | "conversation" | "parent-trace";
31
31
  parent_run_id?: string | undefined;
32
32
  }>;
@@ -52,7 +52,7 @@ declare const BaseEvent: z.ZodObject<{
52
52
  metadata?: Record<string, SerializableJsonValue> | undefined;
53
53
  run_id?: (string & z.BRAND<"RunId">) | undefined;
54
54
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
55
- lane?: "child" | "foreground" | "auxiliary" | undefined;
55
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
56
56
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
57
57
  ephemeral?: boolean | undefined;
58
58
  }, {
@@ -64,7 +64,7 @@ declare const BaseEvent: z.ZodObject<{
64
64
  version?: 1 | undefined;
65
65
  run_id?: string | undefined;
66
66
  parent_run_id?: string | undefined;
67
- lane?: "child" | "foreground" | "auxiliary" | undefined;
67
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
68
68
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
69
69
  ephemeral?: boolean | undefined;
70
70
  }>;
@@ -362,6 +362,7 @@ declare const ToolCallDecisionPayload: z.ZodObject<{
362
362
  }[] | undefined;
363
363
  }>]>, "many">>;
364
364
  }, "strict", z.ZodTypeAny, {
365
+ tool_calls?: SerializableJsonValue[] | undefined;
365
366
  provider_continuations?: {
366
367
  kind: string;
367
368
  schema_version: 2;
@@ -374,7 +375,6 @@ declare const ToolCallDecisionPayload: z.ZodObject<{
374
375
  };
375
376
  payload: SerializableJsonValue;
376
377
  }[] | undefined;
377
- tool_calls?: SerializableJsonValue[] | undefined;
378
378
  assistant_replay_parts?: ({
379
379
  type: "text";
380
380
  text: string;
@@ -423,6 +423,7 @@ declare const ToolCallDecisionPayload: z.ZodObject<{
423
423
  })[] | undefined;
424
424
  args?: Record<string, SerializableJsonValue> | undefined;
425
425
  }, {
426
+ tool_calls?: SerializableJsonValue[] | undefined;
426
427
  provider_continuations?: {
427
428
  kind: string;
428
429
  schema_version: 2;
@@ -435,7 +436,6 @@ declare const ToolCallDecisionPayload: z.ZodObject<{
435
436
  };
436
437
  payload: SerializableJsonValue;
437
438
  }[] | undefined;
438
- tool_calls?: SerializableJsonValue[] | undefined;
439
439
  assistant_replay_parts?: ({
440
440
  type: "text";
441
441
  text: string;
@@ -542,9 +542,9 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
542
542
  content: string;
543
543
  timestamp: number;
544
544
  version: 1;
545
- source: "system" | "user" | "editor";
546
545
  conversation_id: string;
547
546
  turn_id: string;
547
+ source: "system" | "user" | "editor";
548
548
  metadata?: Record<string, SerializableJsonValue> | undefined;
549
549
  attachments?: {
550
550
  id: string;
@@ -560,7 +560,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
560
560
  }[] | undefined;
561
561
  run_id?: (string & z.BRAND<"RunId">) | undefined;
562
562
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
563
- lane?: "child" | "foreground" | "auxiliary" | undefined;
563
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
564
564
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
565
565
  ephemeral?: boolean | undefined;
566
566
  raw_content?: string | undefined;
@@ -585,13 +585,13 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
585
585
  label?: string | undefined;
586
586
  }[] | undefined;
587
587
  version?: 1 | undefined;
588
- source?: "system" | "user" | "editor" | undefined;
589
588
  run_id?: string | undefined;
590
589
  parent_run_id?: string | undefined;
591
- lane?: "child" | "foreground" | "auxiliary" | undefined;
590
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
592
591
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
593
592
  ephemeral?: boolean | undefined;
594
593
  raw_content?: string | undefined;
594
+ source?: "system" | "user" | "editor" | undefined;
595
595
  }>, z.ZodObject<{
596
596
  id: z.ZodEffects<z.ZodString, string, string>;
597
597
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -620,13 +620,13 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
620
620
  turn_id: string;
621
621
  is_complete: boolean;
622
622
  metadata?: Record<string, SerializableJsonValue> | undefined;
623
- delta?: string | undefined;
624
623
  run_id?: (string & z.BRAND<"RunId">) | undefined;
625
624
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
626
- lane?: "child" | "foreground" | "auxiliary" | undefined;
625
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
627
626
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
628
627
  ephemeral?: boolean | undefined;
629
628
  thought_message_id?: string | undefined;
629
+ delta?: string | undefined;
630
630
  }, {
631
631
  id: string;
632
632
  type: "thought";
@@ -636,13 +636,13 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
636
636
  turn_id: string;
637
637
  metadata?: Record<string, SerializableJsonValue> | undefined;
638
638
  version?: 1 | undefined;
639
- delta?: string | undefined;
640
639
  run_id?: string | undefined;
641
640
  parent_run_id?: string | undefined;
642
- lane?: "child" | "foreground" | "auxiliary" | undefined;
641
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
643
642
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
644
643
  ephemeral?: boolean | undefined;
645
644
  thought_message_id?: string | undefined;
645
+ delta?: string | undefined;
646
646
  is_complete?: boolean | undefined;
647
647
  }>, z.ZodObject<{
648
648
  id: z.ZodEffects<z.ZodString, string, string>;
@@ -956,6 +956,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
956
956
  }[] | undefined;
957
957
  }>]>, "many">>;
958
958
  }, "strict", z.ZodTypeAny, {
959
+ tool_calls?: SerializableJsonValue[] | undefined;
959
960
  provider_continuations?: {
960
961
  kind: string;
961
962
  schema_version: 2;
@@ -968,7 +969,6 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
968
969
  };
969
970
  payload: SerializableJsonValue;
970
971
  }[] | undefined;
971
- tool_calls?: SerializableJsonValue[] | undefined;
972
972
  assistant_replay_parts?: ({
973
973
  type: "text";
974
974
  text: string;
@@ -1017,6 +1017,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1017
1017
  })[] | undefined;
1018
1018
  args?: Record<string, SerializableJsonValue> | undefined;
1019
1019
  }, {
1020
+ tool_calls?: SerializableJsonValue[] | undefined;
1020
1021
  provider_continuations?: {
1021
1022
  kind: string;
1022
1023
  schema_version: 2;
@@ -1029,7 +1030,6 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1029
1030
  };
1030
1031
  payload: SerializableJsonValue;
1031
1032
  }[] | undefined;
1032
- tool_calls?: SerializableJsonValue[] | undefined;
1033
1033
  assistant_replay_parts?: ({
1034
1034
  type: "text";
1035
1035
  text: string;
@@ -1088,10 +1088,11 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1088
1088
  tool_name: string;
1089
1089
  timestamp: number;
1090
1090
  version: 1;
1091
- phase: "error" | "start" | "update" | "complete";
1092
1091
  conversation_id: string;
1093
1092
  turn_id: string;
1093
+ phase: "error" | "start" | "update" | "complete";
1094
1094
  payload?: {
1095
+ tool_calls?: SerializableJsonValue[] | undefined;
1095
1096
  provider_continuations?: {
1096
1097
  kind: string;
1097
1098
  schema_version: 2;
@@ -1104,7 +1105,6 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1104
1105
  };
1105
1106
  payload: SerializableJsonValue;
1106
1107
  }[] | undefined;
1107
- tool_calls?: SerializableJsonValue[] | undefined;
1108
1108
  assistant_replay_parts?: ({
1109
1109
  type: "text";
1110
1110
  text: string;
@@ -1155,13 +1155,13 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1155
1155
  } | undefined;
1156
1156
  args?: Record<string, SerializableJsonValue> | undefined;
1157
1157
  metadata?: Record<string, SerializableJsonValue> | undefined;
1158
- parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
1159
- meta?: Record<string, SerializableJsonValue> | undefined;
1160
1158
  run_id?: (string & z.BRAND<"RunId">) | undefined;
1161
1159
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
1162
- lane?: "child" | "foreground" | "auxiliary" | undefined;
1160
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
1163
1161
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
1164
1162
  ephemeral?: boolean | undefined;
1163
+ parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
1164
+ meta?: Record<string, SerializableJsonValue> | undefined;
1165
1165
  }, {
1166
1166
  id: string;
1167
1167
  status: "error" | "loading" | "success";
@@ -1169,10 +1169,11 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1169
1169
  tool_call_id: string;
1170
1170
  tool_name: string;
1171
1171
  timestamp: number;
1172
- phase: "error" | "start" | "update" | "complete";
1173
1172
  conversation_id: string;
1174
1173
  turn_id: string;
1174
+ phase: "error" | "start" | "update" | "complete";
1175
1175
  payload?: {
1176
+ tool_calls?: SerializableJsonValue[] | undefined;
1176
1177
  provider_continuations?: {
1177
1178
  kind: string;
1178
1179
  schema_version: 2;
@@ -1185,7 +1186,6 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1185
1186
  };
1186
1187
  payload: SerializableJsonValue;
1187
1188
  }[] | undefined;
1188
- tool_calls?: SerializableJsonValue[] | undefined;
1189
1189
  assistant_replay_parts?: ({
1190
1190
  type: "text";
1191
1191
  text: string;
@@ -1237,13 +1237,13 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1237
1237
  args?: Record<string, SerializableJsonValue> | undefined;
1238
1238
  metadata?: Record<string, SerializableJsonValue> | undefined;
1239
1239
  version?: 1 | undefined;
1240
- parent_tool_call_id?: string | undefined;
1241
- meta?: Record<string, SerializableJsonValue> | undefined;
1242
1240
  run_id?: string | undefined;
1243
1241
  parent_run_id?: string | undefined;
1244
- lane?: "child" | "foreground" | "auxiliary" | undefined;
1242
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
1245
1243
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
1246
1244
  ephemeral?: boolean | undefined;
1245
+ parent_tool_call_id?: string | undefined;
1246
+ meta?: Record<string, SerializableJsonValue> | undefined;
1247
1247
  }>, z.ZodObject<{
1248
1248
  id: z.ZodEffects<z.ZodString, string, string>;
1249
1249
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -1274,19 +1274,19 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1274
1274
  tool_name: string;
1275
1275
  timestamp: number;
1276
1276
  version: 1;
1277
- phase: "error" | "start" | "update" | "complete";
1278
1277
  conversation_id: string;
1279
1278
  turn_id: string;
1279
+ phase: "error" | "start" | "update" | "complete";
1280
1280
  payload?: Record<string, SerializableJsonValue> | undefined;
1281
1281
  args?: Record<string, SerializableJsonValue> | undefined;
1282
1282
  metadata?: Record<string, SerializableJsonValue> | undefined;
1283
- parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
1284
- meta?: Record<string, SerializableJsonValue> | undefined;
1285
1283
  run_id?: (string & z.BRAND<"RunId">) | undefined;
1286
1284
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
1287
- lane?: "child" | "foreground" | "auxiliary" | undefined;
1285
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
1288
1286
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
1289
1287
  ephemeral?: boolean | undefined;
1288
+ parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
1289
+ meta?: Record<string, SerializableJsonValue> | undefined;
1290
1290
  }, {
1291
1291
  id: string;
1292
1292
  status: "error" | "loading" | "success";
@@ -1294,20 +1294,20 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1294
1294
  tool_call_id: string;
1295
1295
  tool_name: string;
1296
1296
  timestamp: number;
1297
- phase: "error" | "start" | "update" | "complete";
1298
1297
  conversation_id: string;
1299
1298
  turn_id: string;
1299
+ phase: "error" | "start" | "update" | "complete";
1300
1300
  payload?: Record<string, SerializableJsonValue> | undefined;
1301
1301
  args?: Record<string, SerializableJsonValue> | undefined;
1302
1302
  metadata?: Record<string, SerializableJsonValue> | undefined;
1303
1303
  version?: 1 | undefined;
1304
- parent_tool_call_id?: string | undefined;
1305
- meta?: Record<string, SerializableJsonValue> | undefined;
1306
1304
  run_id?: string | undefined;
1307
1305
  parent_run_id?: string | undefined;
1308
- lane?: "child" | "foreground" | "auxiliary" | undefined;
1306
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
1309
1307
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
1310
1308
  ephemeral?: boolean | undefined;
1309
+ parent_tool_call_id?: string | undefined;
1310
+ meta?: Record<string, SerializableJsonValue> | undefined;
1311
1311
  }>, z.ZodObject<{
1312
1312
  id: z.ZodEffects<z.ZodString, string, string>;
1313
1313
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -1390,13 +1390,13 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1390
1390
  fileName?: string | undefined;
1391
1391
  label?: string | undefined;
1392
1392
  }[] | undefined;
1393
- duration_ms?: number | undefined;
1394
1393
  run_id?: (string & z.BRAND<"RunId">) | undefined;
1395
1394
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
1396
- lane?: "child" | "foreground" | "auxiliary" | undefined;
1395
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
1397
1396
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
1398
1397
  ephemeral?: boolean | undefined;
1399
1398
  error_code?: string | undefined;
1399
+ duration_ms?: number | undefined;
1400
1400
  }, {
1401
1401
  id: string;
1402
1402
  status: "error" | "success";
@@ -1423,13 +1423,13 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1423
1423
  label?: string | undefined;
1424
1424
  }[] | undefined;
1425
1425
  version?: 1 | undefined;
1426
- duration_ms?: number | undefined;
1427
1426
  run_id?: string | undefined;
1428
1427
  parent_run_id?: string | undefined;
1429
- lane?: "child" | "foreground" | "auxiliary" | undefined;
1428
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
1430
1429
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
1431
1430
  ephemeral?: boolean | undefined;
1432
1431
  error_code?: string | undefined;
1432
+ duration_ms?: number | undefined;
1433
1433
  }>, z.ZodObject<{
1434
1434
  id: z.ZodEffects<z.ZodString, string, string>;
1435
1435
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -1516,24 +1516,24 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1516
1516
  ephemeral: z.ZodLiteral<true>;
1517
1517
  }, "strip", z.ZodTypeAny, {
1518
1518
  id: string;
1519
- kind: "history_summary" | "final_answer" | "tool_output" | "thought_delta" | "thought_complete" | "tool_call_decision" | "tool_process" | "final_answer_chunk";
1519
+ kind: "history_summary" | "final_answer" | "tool_output" | "tool_call_decision" | "tool_process" | "thought_delta" | "thought_complete" | "final_answer_chunk";
1520
1520
  type: "subrun_trace";
1521
1521
  timestamp: number;
1522
1522
  version: 1;
1523
- parent_tool_call_id: string & z.BRAND<"ToolCallId">;
1524
- subrun_id: string;
1525
- source_event_id: string;
1526
1523
  conversation_id: string;
1527
1524
  turn_id: string;
1528
1525
  ephemeral: true;
1526
+ parent_tool_call_id: string & z.BRAND<"ToolCallId">;
1527
+ subrun_id: string;
1528
+ source_event_id: string;
1529
1529
  status?: "error" | "loading" | "success" | undefined;
1530
- tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
1531
1530
  tool_calls?: {
1532
1531
  tool_call_id: string & z.BRAND<"ToolCallId">;
1533
1532
  tool_name: string;
1534
1533
  args: Record<string, SerializableJsonValue>;
1535
1534
  }[] | undefined;
1536
- completion_reason?: "terminal" | "tool_call" | "interrupted" | undefined;
1535
+ tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
1536
+ completion_reason?: "tool_call" | "terminal" | "interrupted" | undefined;
1537
1537
  tool_name?: string | undefined;
1538
1538
  args?: Record<string, SerializableJsonValue> | undefined;
1539
1539
  content?: string | undefined;
@@ -1550,42 +1550,42 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1550
1550
  fileName?: string | undefined;
1551
1551
  label?: string | undefined;
1552
1552
  }[] | undefined;
1553
- subrun_parent_id?: string | undefined;
1553
+ run_id?: (string & z.BRAND<"RunId">) | undefined;
1554
+ parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
1555
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
1556
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
1554
1557
  delta?: string | undefined;
1558
+ phase?: "error" | "start" | "update" | "complete" | undefined;
1559
+ meta?: Record<string, SerializableJsonValue> | undefined;
1560
+ duration_ms?: number | undefined;
1561
+ subrun_parent_id?: string | undefined;
1555
1562
  answer_id?: string | undefined;
1556
1563
  seq?: number | undefined;
1557
1564
  is_last?: boolean | undefined;
1558
- phase?: "error" | "start" | "update" | "complete" | undefined;
1559
1565
  output?: SerializableJsonValue | undefined;
1560
- duration_ms?: number | undefined;
1561
1566
  original_message_count?: number | undefined;
1562
1567
  compression_ratio?: number | undefined;
1563
1568
  included_old_summary?: boolean | undefined;
1564
1569
  replaced_message_ids?: string[] | undefined;
1565
- meta?: Record<string, SerializableJsonValue> | undefined;
1566
- run_id?: (string & z.BRAND<"RunId">) | undefined;
1567
- parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
1568
- lane?: "child" | "foreground" | "auxiliary" | undefined;
1569
- visibility?: "none" | "conversation" | "parent-trace" | undefined;
1570
1570
  }, {
1571
1571
  id: string;
1572
- kind: "history_summary" | "final_answer" | "tool_output" | "thought_delta" | "thought_complete" | "tool_call_decision" | "tool_process" | "final_answer_chunk";
1572
+ kind: "history_summary" | "final_answer" | "tool_output" | "tool_call_decision" | "tool_process" | "thought_delta" | "thought_complete" | "final_answer_chunk";
1573
1573
  type: "subrun_trace";
1574
1574
  timestamp: number;
1575
- parent_tool_call_id: string;
1576
- subrun_id: string;
1577
- source_event_id: string;
1578
1575
  conversation_id: string;
1579
1576
  turn_id: string;
1580
1577
  ephemeral: true;
1578
+ parent_tool_call_id: string;
1579
+ subrun_id: string;
1580
+ source_event_id: string;
1581
1581
  status?: "error" | "loading" | "success" | undefined;
1582
- tool_call_id?: string | undefined;
1583
1582
  tool_calls?: {
1584
1583
  tool_call_id: string;
1585
1584
  tool_name: string;
1586
1585
  args: Record<string, SerializableJsonValue>;
1587
1586
  }[] | undefined;
1588
- completion_reason?: "terminal" | "tool_call" | "interrupted" | undefined;
1587
+ tool_call_id?: string | undefined;
1588
+ completion_reason?: "tool_call" | "terminal" | "interrupted" | undefined;
1589
1589
  tool_name?: string | undefined;
1590
1590
  args?: Record<string, SerializableJsonValue> | undefined;
1591
1591
  content?: string | undefined;
@@ -1603,23 +1603,23 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1603
1603
  label?: string | undefined;
1604
1604
  }[] | undefined;
1605
1605
  version?: 1 | undefined;
1606
- subrun_parent_id?: string | undefined;
1606
+ run_id?: string | undefined;
1607
+ parent_run_id?: string | undefined;
1608
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
1609
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
1607
1610
  delta?: string | undefined;
1611
+ phase?: "error" | "start" | "update" | "complete" | undefined;
1612
+ meta?: Record<string, SerializableJsonValue> | undefined;
1613
+ duration_ms?: number | undefined;
1614
+ subrun_parent_id?: string | undefined;
1608
1615
  answer_id?: string | undefined;
1609
1616
  seq?: number | undefined;
1610
1617
  is_last?: boolean | undefined;
1611
- phase?: "error" | "start" | "update" | "complete" | undefined;
1612
1618
  output?: SerializableJsonValue | undefined;
1613
- duration_ms?: number | undefined;
1614
1619
  original_message_count?: number | undefined;
1615
1620
  compression_ratio?: number | undefined;
1616
1621
  included_old_summary?: boolean | undefined;
1617
1622
  replaced_message_ids?: string[] | undefined;
1618
- meta?: Record<string, SerializableJsonValue> | undefined;
1619
- run_id?: string | undefined;
1620
- parent_run_id?: string | undefined;
1621
- lane?: "child" | "foreground" | "auxiliary" | undefined;
1622
- visibility?: "none" | "conversation" | "parent-trace" | undefined;
1623
1623
  }>, z.ZodObject<{
1624
1624
  id: z.ZodEffects<z.ZodString, string, string>;
1625
1625
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -1657,7 +1657,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1657
1657
  interaction_status: "pending";
1658
1658
  metadata?: Record<string, SerializableJsonValue> | undefined;
1659
1659
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
1660
- lane?: "child" | "foreground" | "auxiliary" | undefined;
1660
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
1661
1661
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
1662
1662
  ephemeral?: boolean | undefined;
1663
1663
  form?: SerializableJsonValue | undefined;
@@ -1678,7 +1678,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1678
1678
  metadata?: Record<string, SerializableJsonValue> | undefined;
1679
1679
  version?: 1 | undefined;
1680
1680
  parent_run_id?: string | undefined;
1681
- lane?: "child" | "foreground" | "auxiliary" | undefined;
1681
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
1682
1682
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
1683
1683
  ephemeral?: boolean | undefined;
1684
1684
  form?: SerializableJsonValue | undefined;
@@ -1708,11 +1708,11 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1708
1708
  id: z.ZodOptional<z.ZodString>;
1709
1709
  name: z.ZodOptional<z.ZodString>;
1710
1710
  }, "strip", z.ZodTypeAny, {
1711
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
1711
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
1712
1712
  id?: string | undefined;
1713
1713
  name?: string | undefined;
1714
1714
  }, {
1715
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
1715
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
1716
1716
  id?: string | undefined;
1717
1717
  name?: string | undefined;
1718
1718
  }>;
@@ -1807,7 +1807,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1807
1807
  envelopeId: string;
1808
1808
  ts: number;
1809
1809
  actor: {
1810
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
1810
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
1811
1811
  id?: string | undefined;
1812
1812
  name?: string | undefined;
1813
1813
  };
@@ -1849,7 +1849,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1849
1849
  envelopeId: string;
1850
1850
  ts: number;
1851
1851
  actor: {
1852
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
1852
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
1853
1853
  id?: string | undefined;
1854
1854
  name?: string | undefined;
1855
1855
  };
@@ -1899,7 +1899,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1899
1899
  envelopeId: string;
1900
1900
  ts: number;
1901
1901
  actor: {
1902
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
1902
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
1903
1903
  id?: string | undefined;
1904
1904
  name?: string | undefined;
1905
1905
  };
@@ -1940,7 +1940,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1940
1940
  metadata?: Record<string, SerializableJsonValue> | undefined;
1941
1941
  run_id?: (string & z.BRAND<"RunId">) | undefined;
1942
1942
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
1943
- lane?: "child" | "foreground" | "auxiliary" | undefined;
1943
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
1944
1944
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
1945
1945
  ephemeral?: boolean | undefined;
1946
1946
  }, {
@@ -1954,7 +1954,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1954
1954
  envelopeId: string;
1955
1955
  ts: number;
1956
1956
  actor: {
1957
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
1957
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
1958
1958
  id?: string | undefined;
1959
1959
  name?: string | undefined;
1960
1960
  };
@@ -1996,7 +1996,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1996
1996
  version?: 1 | undefined;
1997
1997
  run_id?: string | undefined;
1998
1998
  parent_run_id?: string | undefined;
1999
- lane?: "child" | "foreground" | "auxiliary" | undefined;
1999
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2000
2000
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2001
2001
  ephemeral?: boolean | undefined;
2002
2002
  }>, z.ZodObject<{
@@ -2306,14 +2306,14 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2306
2306
  }, "strip", z.ZodTypeAny, {
2307
2307
  id: string;
2308
2308
  type: "final_answer";
2309
- completion_reason: "terminal" | "tool_call" | "interrupted";
2309
+ completion_reason: "tool_call" | "terminal" | "interrupted";
2310
2310
  content: string;
2311
2311
  timestamp: number;
2312
2312
  version: 1;
2313
- answer_id: string;
2314
2313
  conversation_id: string;
2315
2314
  turn_id: string;
2316
2315
  is_complete: boolean;
2316
+ answer_id: string;
2317
2317
  provider_continuations?: {
2318
2318
  kind: string;
2319
2319
  schema_version: 2;
@@ -2373,21 +2373,21 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2373
2373
  }[] | undefined;
2374
2374
  })[] | undefined;
2375
2375
  metadata?: Record<string, SerializableJsonValue> | undefined;
2376
- meta?: Record<string, SerializableJsonValue> | undefined;
2377
2376
  run_id?: (string & z.BRAND<"RunId">) | undefined;
2378
2377
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
2379
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2378
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2380
2379
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2381
2380
  ephemeral?: boolean | undefined;
2381
+ meta?: Record<string, SerializableJsonValue> | undefined;
2382
2382
  }, {
2383
2383
  id: string;
2384
2384
  type: "final_answer";
2385
- completion_reason: "terminal" | "tool_call" | "interrupted";
2385
+ completion_reason: "tool_call" | "terminal" | "interrupted";
2386
2386
  content: string;
2387
2387
  timestamp: number;
2388
- answer_id: string;
2389
2388
  conversation_id: string;
2390
2389
  turn_id: string;
2390
+ answer_id: string;
2391
2391
  provider_continuations?: {
2392
2392
  kind: string;
2393
2393
  schema_version: 2;
@@ -2448,13 +2448,13 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2448
2448
  })[] | undefined;
2449
2449
  metadata?: Record<string, SerializableJsonValue> | undefined;
2450
2450
  version?: 1 | undefined;
2451
- meta?: Record<string, SerializableJsonValue> | undefined;
2452
2451
  run_id?: string | undefined;
2453
2452
  parent_run_id?: string | undefined;
2454
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2453
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2455
2454
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2456
2455
  ephemeral?: boolean | undefined;
2457
2456
  is_complete?: boolean | undefined;
2457
+ meta?: Record<string, SerializableJsonValue> | undefined;
2458
2458
  }>, z.ZodObject<{
2459
2459
  id: z.ZodEffects<z.ZodString, string, string>;
2460
2460
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -2479,34 +2479,34 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2479
2479
  content: string;
2480
2480
  timestamp: number;
2481
2481
  version: 1;
2482
- answer_id: string;
2483
- seq: number;
2484
2482
  conversation_id: string;
2485
2483
  turn_id: string;
2484
+ answer_id: string;
2485
+ seq: number;
2486
2486
  metadata?: Record<string, SerializableJsonValue> | undefined;
2487
- is_last?: boolean | undefined;
2488
2487
  run_id?: (string & z.BRAND<"RunId">) | undefined;
2489
2488
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
2490
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2489
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2491
2490
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2492
2491
  ephemeral?: boolean | undefined;
2492
+ is_last?: boolean | undefined;
2493
2493
  }, {
2494
2494
  id: string;
2495
2495
  type: "final_answer_chunk";
2496
2496
  content: string;
2497
2497
  timestamp: number;
2498
- answer_id: string;
2499
- seq: number;
2500
2498
  conversation_id: string;
2501
2499
  turn_id: string;
2500
+ answer_id: string;
2501
+ seq: number;
2502
2502
  metadata?: Record<string, SerializableJsonValue> | undefined;
2503
2503
  version?: 1 | undefined;
2504
- is_last?: boolean | undefined;
2505
2504
  run_id?: string | undefined;
2506
2505
  parent_run_id?: string | undefined;
2507
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2506
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2508
2507
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2509
2508
  ephemeral?: boolean | undefined;
2509
+ is_last?: boolean | undefined;
2510
2510
  }>, z.ZodObject<{
2511
2511
  id: z.ZodEffects<z.ZodString, string, string>;
2512
2512
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -2531,12 +2531,12 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2531
2531
  conversation_id: string;
2532
2532
  turn_id: string;
2533
2533
  metadata?: Record<string, SerializableJsonValue> | undefined;
2534
- answer_id?: string | undefined;
2535
2534
  run_id?: (string & z.BRAND<"RunId">) | undefined;
2536
2535
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
2537
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2536
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2538
2537
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2539
2538
  ephemeral?: boolean | undefined;
2539
+ answer_id?: string | undefined;
2540
2540
  thought_message_ids?: string[] | undefined;
2541
2541
  }, {
2542
2542
  id: string;
@@ -2546,12 +2546,12 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2546
2546
  turn_id: string;
2547
2547
  metadata?: Record<string, SerializableJsonValue> | undefined;
2548
2548
  version?: 1 | undefined;
2549
- answer_id?: string | undefined;
2550
2549
  run_id?: string | undefined;
2551
2550
  parent_run_id?: string | undefined;
2552
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2551
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2553
2552
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2554
2553
  ephemeral?: boolean | undefined;
2554
+ answer_id?: string | undefined;
2555
2555
  thought_message_ids?: string[] | undefined;
2556
2556
  }>, z.ZodObject<{
2557
2557
  id: z.ZodEffects<z.ZodString, string, string>;
@@ -2579,38 +2579,38 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2579
2579
  content: string;
2580
2580
  timestamp: number;
2581
2581
  version: 1;
2582
- original_message_count: number;
2583
- replaced_message_ids: string[];
2584
2582
  conversation_id: string;
2585
2583
  turn_id: string;
2584
+ original_message_count: number;
2585
+ replaced_message_ids: string[];
2586
2586
  summary_seq: number;
2587
2587
  metadata?: Record<string, SerializableJsonValue> | undefined;
2588
- compression_ratio?: number | undefined;
2589
- included_old_summary?: boolean | undefined;
2590
2588
  run_id?: (string & z.BRAND<"RunId">) | undefined;
2591
2589
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
2592
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2590
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2593
2591
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2594
2592
  ephemeral?: boolean | undefined;
2593
+ compression_ratio?: number | undefined;
2594
+ included_old_summary?: boolean | undefined;
2595
2595
  }, {
2596
2596
  id: string;
2597
2597
  type: "history_summary";
2598
2598
  content: string;
2599
2599
  timestamp: number;
2600
- original_message_count: number;
2601
- replaced_message_ids: string[];
2602
2600
  conversation_id: string;
2603
2601
  turn_id: string;
2602
+ original_message_count: number;
2603
+ replaced_message_ids: string[];
2604
2604
  summary_seq: number;
2605
2605
  metadata?: Record<string, SerializableJsonValue> | undefined;
2606
2606
  version?: 1 | undefined;
2607
- compression_ratio?: number | undefined;
2608
- included_old_summary?: boolean | undefined;
2609
2607
  run_id?: string | undefined;
2610
2608
  parent_run_id?: string | undefined;
2611
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2609
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2612
2610
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2613
2611
  ephemeral?: boolean | undefined;
2612
+ compression_ratio?: number | undefined;
2613
+ included_old_summary?: boolean | undefined;
2614
2614
  }>, z.ZodObject<{
2615
2615
  id: z.ZodEffects<z.ZodString, string, string>;
2616
2616
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -2640,7 +2640,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2640
2640
  metadata?: Record<string, SerializableJsonValue> | undefined;
2641
2641
  run_id?: (string & z.BRAND<"RunId">) | undefined;
2642
2642
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
2643
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2643
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2644
2644
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2645
2645
  ephemeral?: boolean | undefined;
2646
2646
  error_code?: string | undefined;
@@ -2657,7 +2657,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2657
2657
  version?: 1 | undefined;
2658
2658
  run_id?: string | undefined;
2659
2659
  parent_run_id?: string | undefined;
2660
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2660
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2661
2661
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2662
2662
  ephemeral?: boolean | undefined;
2663
2663
  error_code?: string | undefined;
@@ -2691,12 +2691,12 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2691
2691
  op: "truncate_after" | "replace" | "redo" | "branch";
2692
2692
  metadata?: Record<string, SerializableJsonValue> | undefined;
2693
2693
  reason?: string | undefined;
2694
- meta?: SerializableJsonValue | undefined;
2695
2694
  run_id?: (string & z.BRAND<"RunId">) | undefined;
2696
2695
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
2697
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2696
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2698
2697
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2699
2698
  ephemeral?: boolean | undefined;
2699
+ meta?: SerializableJsonValue | undefined;
2700
2700
  target_id?: string | undefined;
2701
2701
  }, {
2702
2702
  id: string;
@@ -2708,12 +2708,12 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2708
2708
  metadata?: Record<string, SerializableJsonValue> | undefined;
2709
2709
  version?: 1 | undefined;
2710
2710
  reason?: string | undefined;
2711
- meta?: SerializableJsonValue | undefined;
2712
2711
  run_id?: string | undefined;
2713
2712
  parent_run_id?: string | undefined;
2714
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2713
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2715
2714
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2716
2715
  ephemeral?: boolean | undefined;
2716
+ meta?: SerializableJsonValue | undefined;
2717
2717
  target_id?: string | undefined;
2718
2718
  }>, z.ZodObject<{
2719
2719
  id: z.ZodEffects<z.ZodString, string, string>;
@@ -2757,7 +2757,6 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2757
2757
  measured_at: z.ZodNumber;
2758
2758
  }, "strict", z.ZodTypeAny, {
2759
2759
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
2760
- confidence: "estimate" | "provider-estimate" | "actual";
2761
2760
  basis: "last_completed_llm_prompt";
2762
2761
  budget_model_id: string;
2763
2762
  used_tokens: number;
@@ -2770,11 +2769,11 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2770
2769
  input_budget_tokens: number;
2771
2770
  remaining_tokens: number;
2772
2771
  output_limit_tokens: number;
2772
+ confidence: "estimate" | "provider-estimate" | "actual";
2773
2773
  measured_at: number;
2774
2774
  served_model_id?: string | undefined;
2775
2775
  }, {
2776
2776
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
2777
- confidence: "estimate" | "provider-estimate" | "actual";
2778
2777
  basis: "last_completed_llm_prompt";
2779
2778
  budget_model_id: string;
2780
2779
  used_tokens: number;
@@ -2787,11 +2786,11 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2787
2786
  input_budget_tokens: number;
2788
2787
  remaining_tokens: number;
2789
2788
  output_limit_tokens: number;
2789
+ confidence: "estimate" | "provider-estimate" | "actual";
2790
2790
  measured_at: number;
2791
2791
  served_model_id?: string | undefined;
2792
2792
  }>, {
2793
2793
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
2794
- confidence: "estimate" | "provider-estimate" | "actual";
2795
2794
  basis: "last_completed_llm_prompt";
2796
2795
  budget_model_id: string;
2797
2796
  used_tokens: number;
@@ -2804,11 +2803,11 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2804
2803
  input_budget_tokens: number;
2805
2804
  remaining_tokens: number;
2806
2805
  output_limit_tokens: number;
2806
+ confidence: "estimate" | "provider-estimate" | "actual";
2807
2807
  measured_at: number;
2808
2808
  served_model_id?: string | undefined;
2809
2809
  }, {
2810
2810
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
2811
- confidence: "estimate" | "provider-estimate" | "actual";
2812
2811
  basis: "last_completed_llm_prompt";
2813
2812
  budget_model_id: string;
2814
2813
  used_tokens: number;
@@ -2821,6 +2820,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2821
2820
  input_budget_tokens: number;
2822
2821
  remaining_tokens: number;
2823
2822
  output_limit_tokens: number;
2823
+ confidence: "estimate" | "provider-estimate" | "actual";
2824
2824
  measured_at: number;
2825
2825
  served_model_id?: string | undefined;
2826
2826
  }>;
@@ -2834,7 +2834,6 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2834
2834
  ephemeral: true;
2835
2835
  context_usage: {
2836
2836
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
2837
- confidence: "estimate" | "provider-estimate" | "actual";
2838
2837
  basis: "last_completed_llm_prompt";
2839
2838
  budget_model_id: string;
2840
2839
  used_tokens: number;
@@ -2847,13 +2846,14 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2847
2846
  input_budget_tokens: number;
2848
2847
  remaining_tokens: number;
2849
2848
  output_limit_tokens: number;
2849
+ confidence: "estimate" | "provider-estimate" | "actual";
2850
2850
  measured_at: number;
2851
2851
  served_model_id?: string | undefined;
2852
2852
  };
2853
2853
  metadata?: Record<string, SerializableJsonValue> | undefined;
2854
2854
  run_id?: (string & z.BRAND<"RunId">) | undefined;
2855
2855
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
2856
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2856
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2857
2857
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2858
2858
  user_message_id?: string | undefined;
2859
2859
  }, {
@@ -2865,7 +2865,6 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2865
2865
  ephemeral: true;
2866
2866
  context_usage: {
2867
2867
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
2868
- confidence: "estimate" | "provider-estimate" | "actual";
2869
2868
  basis: "last_completed_llm_prompt";
2870
2869
  budget_model_id: string;
2871
2870
  used_tokens: number;
@@ -2878,6 +2877,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2878
2877
  input_budget_tokens: number;
2879
2878
  remaining_tokens: number;
2880
2879
  output_limit_tokens: number;
2880
+ confidence: "estimate" | "provider-estimate" | "actual";
2881
2881
  measured_at: number;
2882
2882
  served_model_id?: string | undefined;
2883
2883
  };
@@ -2885,7 +2885,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2885
2885
  version?: 1 | undefined;
2886
2886
  run_id?: string | undefined;
2887
2887
  parent_run_id?: string | undefined;
2888
- lane?: "child" | "foreground" | "auxiliary" | undefined;
2888
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
2889
2889
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
2890
2890
  user_message_id?: string | undefined;
2891
2891
  }>, z.ZodObject<{
@@ -2933,7 +2933,6 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2933
2933
  measured_at: z.ZodNumber;
2934
2934
  }, "strict", z.ZodTypeAny, {
2935
2935
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
2936
- confidence: "estimate" | "provider-estimate" | "actual";
2937
2936
  basis: "last_completed_llm_prompt";
2938
2937
  budget_model_id: string;
2939
2938
  used_tokens: number;
@@ -2946,11 +2945,11 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2946
2945
  input_budget_tokens: number;
2947
2946
  remaining_tokens: number;
2948
2947
  output_limit_tokens: number;
2948
+ confidence: "estimate" | "provider-estimate" | "actual";
2949
2949
  measured_at: number;
2950
2950
  served_model_id?: string | undefined;
2951
2951
  }, {
2952
2952
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
2953
- confidence: "estimate" | "provider-estimate" | "actual";
2954
2953
  basis: "last_completed_llm_prompt";
2955
2954
  budget_model_id: string;
2956
2955
  used_tokens: number;
@@ -2963,11 +2962,11 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2963
2962
  input_budget_tokens: number;
2964
2963
  remaining_tokens: number;
2965
2964
  output_limit_tokens: number;
2965
+ confidence: "estimate" | "provider-estimate" | "actual";
2966
2966
  measured_at: number;
2967
2967
  served_model_id?: string | undefined;
2968
2968
  }>, {
2969
2969
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
2970
- confidence: "estimate" | "provider-estimate" | "actual";
2971
2970
  basis: "last_completed_llm_prompt";
2972
2971
  budget_model_id: string;
2973
2972
  used_tokens: number;
@@ -2980,11 +2979,11 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2980
2979
  input_budget_tokens: number;
2981
2980
  remaining_tokens: number;
2982
2981
  output_limit_tokens: number;
2982
+ confidence: "estimate" | "provider-estimate" | "actual";
2983
2983
  measured_at: number;
2984
2984
  served_model_id?: string | undefined;
2985
2985
  }, {
2986
2986
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
2987
- confidence: "estimate" | "provider-estimate" | "actual";
2988
2987
  basis: "last_completed_llm_prompt";
2989
2988
  budget_model_id: string;
2990
2989
  used_tokens: number;
@@ -2997,6 +2996,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2997
2996
  input_budget_tokens: number;
2998
2997
  remaining_tokens: number;
2999
2998
  output_limit_tokens: number;
2999
+ confidence: "estimate" | "provider-estimate" | "actual";
3000
3000
  measured_at: number;
3001
3001
  served_model_id?: string | undefined;
3002
3002
  }>>;
@@ -3006,20 +3006,19 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3006
3006
  timestamp: number;
3007
3007
  version: 1;
3008
3008
  outcome: "completed" | "failed" | "cancelled" | "awaiting_user";
3009
- duration_ms: number;
3010
3009
  conversation_id: string;
3011
3010
  turn_id: string;
3011
+ duration_ms: number;
3012
3012
  execution_id: string;
3013
3013
  metadata?: Record<string, SerializableJsonValue> | undefined;
3014
3014
  run_id?: (string & z.BRAND<"RunId">) | undefined;
3015
3015
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
3016
- lane?: "child" | "foreground" | "auxiliary" | undefined;
3016
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
3017
3017
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
3018
3018
  ephemeral?: boolean | undefined;
3019
3019
  user_message_id?: string | undefined;
3020
3020
  context_usage?: {
3021
3021
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
3022
- confidence: "estimate" | "provider-estimate" | "actual";
3023
3022
  basis: "last_completed_llm_prompt";
3024
3023
  budget_model_id: string;
3025
3024
  used_tokens: number;
@@ -3032,6 +3031,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3032
3031
  input_budget_tokens: number;
3033
3032
  remaining_tokens: number;
3034
3033
  output_limit_tokens: number;
3034
+ confidence: "estimate" | "provider-estimate" | "actual";
3035
3035
  measured_at: number;
3036
3036
  served_model_id?: string | undefined;
3037
3037
  } | undefined;
@@ -3040,21 +3040,20 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3040
3040
  type: "run_execution_metrics";
3041
3041
  timestamp: number;
3042
3042
  outcome: "completed" | "failed" | "cancelled" | "awaiting_user";
3043
- duration_ms: number;
3044
3043
  conversation_id: string;
3045
3044
  turn_id: string;
3045
+ duration_ms: number;
3046
3046
  execution_id: string;
3047
3047
  metadata?: Record<string, SerializableJsonValue> | undefined;
3048
3048
  version?: 1 | undefined;
3049
3049
  run_id?: string | undefined;
3050
3050
  parent_run_id?: string | undefined;
3051
- lane?: "child" | "foreground" | "auxiliary" | undefined;
3051
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
3052
3052
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
3053
3053
  ephemeral?: boolean | undefined;
3054
3054
  user_message_id?: string | undefined;
3055
3055
  context_usage?: {
3056
3056
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
3057
- confidence: "estimate" | "provider-estimate" | "actual";
3058
3057
  basis: "last_completed_llm_prompt";
3059
3058
  budget_model_id: string;
3060
3059
  used_tokens: number;
@@ -3067,6 +3066,7 @@ declare const RuntimeEventShape: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3067
3066
  input_budget_tokens: number;
3068
3067
  remaining_tokens: number;
3069
3068
  output_limit_tokens: number;
3069
+ confidence: "estimate" | "provider-estimate" | "actual";
3070
3070
  measured_at: number;
3071
3071
  served_model_id?: string | undefined;
3072
3072
  } | undefined;
@@ -3128,9 +3128,9 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3128
3128
  content: string;
3129
3129
  timestamp: number;
3130
3130
  version: 1;
3131
- source: "system" | "user" | "editor";
3132
3131
  conversation_id: string;
3133
3132
  turn_id: string;
3133
+ source: "system" | "user" | "editor";
3134
3134
  metadata?: Record<string, SerializableJsonValue> | undefined;
3135
3135
  attachments?: {
3136
3136
  id: string;
@@ -3146,7 +3146,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3146
3146
  }[] | undefined;
3147
3147
  run_id?: (string & z.BRAND<"RunId">) | undefined;
3148
3148
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
3149
- lane?: "child" | "foreground" | "auxiliary" | undefined;
3149
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
3150
3150
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
3151
3151
  ephemeral?: boolean | undefined;
3152
3152
  raw_content?: string | undefined;
@@ -3171,13 +3171,13 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3171
3171
  label?: string | undefined;
3172
3172
  }[] | undefined;
3173
3173
  version?: 1 | undefined;
3174
- source?: "system" | "user" | "editor" | undefined;
3175
3174
  run_id?: string | undefined;
3176
3175
  parent_run_id?: string | undefined;
3177
- lane?: "child" | "foreground" | "auxiliary" | undefined;
3176
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
3178
3177
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
3179
3178
  ephemeral?: boolean | undefined;
3180
3179
  raw_content?: string | undefined;
3180
+ source?: "system" | "user" | "editor" | undefined;
3181
3181
  }>, z.ZodObject<{
3182
3182
  id: z.ZodEffects<z.ZodString, string, string>;
3183
3183
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -3206,13 +3206,13 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3206
3206
  turn_id: string;
3207
3207
  is_complete: boolean;
3208
3208
  metadata?: Record<string, SerializableJsonValue> | undefined;
3209
- delta?: string | undefined;
3210
3209
  run_id?: (string & z.BRAND<"RunId">) | undefined;
3211
3210
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
3212
- lane?: "child" | "foreground" | "auxiliary" | undefined;
3211
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
3213
3212
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
3214
3213
  ephemeral?: boolean | undefined;
3215
3214
  thought_message_id?: string | undefined;
3215
+ delta?: string | undefined;
3216
3216
  }, {
3217
3217
  id: string;
3218
3218
  type: "thought";
@@ -3222,13 +3222,13 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3222
3222
  turn_id: string;
3223
3223
  metadata?: Record<string, SerializableJsonValue> | undefined;
3224
3224
  version?: 1 | undefined;
3225
- delta?: string | undefined;
3226
3225
  run_id?: string | undefined;
3227
3226
  parent_run_id?: string | undefined;
3228
- lane?: "child" | "foreground" | "auxiliary" | undefined;
3227
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
3229
3228
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
3230
3229
  ephemeral?: boolean | undefined;
3231
3230
  thought_message_id?: string | undefined;
3231
+ delta?: string | undefined;
3232
3232
  is_complete?: boolean | undefined;
3233
3233
  }>, z.ZodObject<{
3234
3234
  id: z.ZodEffects<z.ZodString, string, string>;
@@ -3542,6 +3542,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3542
3542
  }[] | undefined;
3543
3543
  }>]>, "many">>;
3544
3544
  }, "strict", z.ZodTypeAny, {
3545
+ tool_calls?: SerializableJsonValue[] | undefined;
3545
3546
  provider_continuations?: {
3546
3547
  kind: string;
3547
3548
  schema_version: 2;
@@ -3554,7 +3555,6 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3554
3555
  };
3555
3556
  payload: SerializableJsonValue;
3556
3557
  }[] | undefined;
3557
- tool_calls?: SerializableJsonValue[] | undefined;
3558
3558
  assistant_replay_parts?: ({
3559
3559
  type: "text";
3560
3560
  text: string;
@@ -3603,6 +3603,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3603
3603
  })[] | undefined;
3604
3604
  args?: Record<string, SerializableJsonValue> | undefined;
3605
3605
  }, {
3606
+ tool_calls?: SerializableJsonValue[] | undefined;
3606
3607
  provider_continuations?: {
3607
3608
  kind: string;
3608
3609
  schema_version: 2;
@@ -3615,7 +3616,6 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3615
3616
  };
3616
3617
  payload: SerializableJsonValue;
3617
3618
  }[] | undefined;
3618
- tool_calls?: SerializableJsonValue[] | undefined;
3619
3619
  assistant_replay_parts?: ({
3620
3620
  type: "text";
3621
3621
  text: string;
@@ -3674,10 +3674,11 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3674
3674
  tool_name: string;
3675
3675
  timestamp: number;
3676
3676
  version: 1;
3677
- phase: "error" | "start" | "update" | "complete";
3678
3677
  conversation_id: string;
3679
3678
  turn_id: string;
3679
+ phase: "error" | "start" | "update" | "complete";
3680
3680
  payload?: {
3681
+ tool_calls?: SerializableJsonValue[] | undefined;
3681
3682
  provider_continuations?: {
3682
3683
  kind: string;
3683
3684
  schema_version: 2;
@@ -3690,7 +3691,6 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3690
3691
  };
3691
3692
  payload: SerializableJsonValue;
3692
3693
  }[] | undefined;
3693
- tool_calls?: SerializableJsonValue[] | undefined;
3694
3694
  assistant_replay_parts?: ({
3695
3695
  type: "text";
3696
3696
  text: string;
@@ -3741,13 +3741,13 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3741
3741
  } | undefined;
3742
3742
  args?: Record<string, SerializableJsonValue> | undefined;
3743
3743
  metadata?: Record<string, SerializableJsonValue> | undefined;
3744
- parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
3745
- meta?: Record<string, SerializableJsonValue> | undefined;
3746
3744
  run_id?: (string & z.BRAND<"RunId">) | undefined;
3747
3745
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
3748
- lane?: "child" | "foreground" | "auxiliary" | undefined;
3746
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
3749
3747
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
3750
3748
  ephemeral?: boolean | undefined;
3749
+ parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
3750
+ meta?: Record<string, SerializableJsonValue> | undefined;
3751
3751
  }, {
3752
3752
  id: string;
3753
3753
  status: "error" | "loading" | "success";
@@ -3755,10 +3755,11 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3755
3755
  tool_call_id: string;
3756
3756
  tool_name: string;
3757
3757
  timestamp: number;
3758
- phase: "error" | "start" | "update" | "complete";
3759
3758
  conversation_id: string;
3760
3759
  turn_id: string;
3760
+ phase: "error" | "start" | "update" | "complete";
3761
3761
  payload?: {
3762
+ tool_calls?: SerializableJsonValue[] | undefined;
3762
3763
  provider_continuations?: {
3763
3764
  kind: string;
3764
3765
  schema_version: 2;
@@ -3771,7 +3772,6 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3771
3772
  };
3772
3773
  payload: SerializableJsonValue;
3773
3774
  }[] | undefined;
3774
- tool_calls?: SerializableJsonValue[] | undefined;
3775
3775
  assistant_replay_parts?: ({
3776
3776
  type: "text";
3777
3777
  text: string;
@@ -3823,13 +3823,13 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3823
3823
  args?: Record<string, SerializableJsonValue> | undefined;
3824
3824
  metadata?: Record<string, SerializableJsonValue> | undefined;
3825
3825
  version?: 1 | undefined;
3826
- parent_tool_call_id?: string | undefined;
3827
- meta?: Record<string, SerializableJsonValue> | undefined;
3828
3826
  run_id?: string | undefined;
3829
3827
  parent_run_id?: string | undefined;
3830
- lane?: "child" | "foreground" | "auxiliary" | undefined;
3828
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
3831
3829
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
3832
3830
  ephemeral?: boolean | undefined;
3831
+ parent_tool_call_id?: string | undefined;
3832
+ meta?: Record<string, SerializableJsonValue> | undefined;
3833
3833
  }>, z.ZodObject<{
3834
3834
  id: z.ZodEffects<z.ZodString, string, string>;
3835
3835
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -3860,19 +3860,19 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3860
3860
  tool_name: string;
3861
3861
  timestamp: number;
3862
3862
  version: 1;
3863
- phase: "error" | "start" | "update" | "complete";
3864
3863
  conversation_id: string;
3865
3864
  turn_id: string;
3865
+ phase: "error" | "start" | "update" | "complete";
3866
3866
  payload?: Record<string, SerializableJsonValue> | undefined;
3867
3867
  args?: Record<string, SerializableJsonValue> | undefined;
3868
3868
  metadata?: Record<string, SerializableJsonValue> | undefined;
3869
- parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
3870
- meta?: Record<string, SerializableJsonValue> | undefined;
3871
3869
  run_id?: (string & z.BRAND<"RunId">) | undefined;
3872
3870
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
3873
- lane?: "child" | "foreground" | "auxiliary" | undefined;
3871
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
3874
3872
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
3875
3873
  ephemeral?: boolean | undefined;
3874
+ parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
3875
+ meta?: Record<string, SerializableJsonValue> | undefined;
3876
3876
  }, {
3877
3877
  id: string;
3878
3878
  status: "error" | "loading" | "success";
@@ -3880,20 +3880,20 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3880
3880
  tool_call_id: string;
3881
3881
  tool_name: string;
3882
3882
  timestamp: number;
3883
- phase: "error" | "start" | "update" | "complete";
3884
3883
  conversation_id: string;
3885
3884
  turn_id: string;
3885
+ phase: "error" | "start" | "update" | "complete";
3886
3886
  payload?: Record<string, SerializableJsonValue> | undefined;
3887
3887
  args?: Record<string, SerializableJsonValue> | undefined;
3888
3888
  metadata?: Record<string, SerializableJsonValue> | undefined;
3889
3889
  version?: 1 | undefined;
3890
- parent_tool_call_id?: string | undefined;
3891
- meta?: Record<string, SerializableJsonValue> | undefined;
3892
3890
  run_id?: string | undefined;
3893
3891
  parent_run_id?: string | undefined;
3894
- lane?: "child" | "foreground" | "auxiliary" | undefined;
3892
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
3895
3893
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
3896
3894
  ephemeral?: boolean | undefined;
3895
+ parent_tool_call_id?: string | undefined;
3896
+ meta?: Record<string, SerializableJsonValue> | undefined;
3897
3897
  }>, z.ZodObject<{
3898
3898
  id: z.ZodEffects<z.ZodString, string, string>;
3899
3899
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -3976,13 +3976,13 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
3976
3976
  fileName?: string | undefined;
3977
3977
  label?: string | undefined;
3978
3978
  }[] | undefined;
3979
- duration_ms?: number | undefined;
3980
3979
  run_id?: (string & z.BRAND<"RunId">) | undefined;
3981
3980
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
3982
- lane?: "child" | "foreground" | "auxiliary" | undefined;
3981
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
3983
3982
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
3984
3983
  ephemeral?: boolean | undefined;
3985
3984
  error_code?: string | undefined;
3985
+ duration_ms?: number | undefined;
3986
3986
  }, {
3987
3987
  id: string;
3988
3988
  status: "error" | "success";
@@ -4009,13 +4009,13 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4009
4009
  label?: string | undefined;
4010
4010
  }[] | undefined;
4011
4011
  version?: 1 | undefined;
4012
- duration_ms?: number | undefined;
4013
4012
  run_id?: string | undefined;
4014
4013
  parent_run_id?: string | undefined;
4015
- lane?: "child" | "foreground" | "auxiliary" | undefined;
4014
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
4016
4015
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
4017
4016
  ephemeral?: boolean | undefined;
4018
4017
  error_code?: string | undefined;
4018
+ duration_ms?: number | undefined;
4019
4019
  }>, z.ZodObject<{
4020
4020
  id: z.ZodEffects<z.ZodString, string, string>;
4021
4021
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -4102,24 +4102,24 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4102
4102
  ephemeral: z.ZodLiteral<true>;
4103
4103
  }, "strip", z.ZodTypeAny, {
4104
4104
  id: string;
4105
- kind: "history_summary" | "final_answer" | "tool_output" | "thought_delta" | "thought_complete" | "tool_call_decision" | "tool_process" | "final_answer_chunk";
4105
+ kind: "history_summary" | "final_answer" | "tool_output" | "tool_call_decision" | "tool_process" | "thought_delta" | "thought_complete" | "final_answer_chunk";
4106
4106
  type: "subrun_trace";
4107
4107
  timestamp: number;
4108
4108
  version: 1;
4109
- parent_tool_call_id: string & z.BRAND<"ToolCallId">;
4110
- subrun_id: string;
4111
- source_event_id: string;
4112
4109
  conversation_id: string;
4113
4110
  turn_id: string;
4114
4111
  ephemeral: true;
4112
+ parent_tool_call_id: string & z.BRAND<"ToolCallId">;
4113
+ subrun_id: string;
4114
+ source_event_id: string;
4115
4115
  status?: "error" | "loading" | "success" | undefined;
4116
- tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
4117
4116
  tool_calls?: {
4118
4117
  tool_call_id: string & z.BRAND<"ToolCallId">;
4119
4118
  tool_name: string;
4120
4119
  args: Record<string, SerializableJsonValue>;
4121
4120
  }[] | undefined;
4122
- completion_reason?: "terminal" | "tool_call" | "interrupted" | undefined;
4121
+ tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
4122
+ completion_reason?: "tool_call" | "terminal" | "interrupted" | undefined;
4123
4123
  tool_name?: string | undefined;
4124
4124
  args?: Record<string, SerializableJsonValue> | undefined;
4125
4125
  content?: string | undefined;
@@ -4136,42 +4136,42 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4136
4136
  fileName?: string | undefined;
4137
4137
  label?: string | undefined;
4138
4138
  }[] | undefined;
4139
- subrun_parent_id?: string | undefined;
4139
+ run_id?: (string & z.BRAND<"RunId">) | undefined;
4140
+ parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
4141
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
4142
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
4140
4143
  delta?: string | undefined;
4144
+ phase?: "error" | "start" | "update" | "complete" | undefined;
4145
+ meta?: Record<string, SerializableJsonValue> | undefined;
4146
+ duration_ms?: number | undefined;
4147
+ subrun_parent_id?: string | undefined;
4141
4148
  answer_id?: string | undefined;
4142
4149
  seq?: number | undefined;
4143
4150
  is_last?: boolean | undefined;
4144
- phase?: "error" | "start" | "update" | "complete" | undefined;
4145
4151
  output?: SerializableJsonValue | undefined;
4146
- duration_ms?: number | undefined;
4147
4152
  original_message_count?: number | undefined;
4148
4153
  compression_ratio?: number | undefined;
4149
4154
  included_old_summary?: boolean | undefined;
4150
4155
  replaced_message_ids?: string[] | undefined;
4151
- meta?: Record<string, SerializableJsonValue> | undefined;
4152
- run_id?: (string & z.BRAND<"RunId">) | undefined;
4153
- parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
4154
- lane?: "child" | "foreground" | "auxiliary" | undefined;
4155
- visibility?: "none" | "conversation" | "parent-trace" | undefined;
4156
4156
  }, {
4157
4157
  id: string;
4158
- kind: "history_summary" | "final_answer" | "tool_output" | "thought_delta" | "thought_complete" | "tool_call_decision" | "tool_process" | "final_answer_chunk";
4158
+ kind: "history_summary" | "final_answer" | "tool_output" | "tool_call_decision" | "tool_process" | "thought_delta" | "thought_complete" | "final_answer_chunk";
4159
4159
  type: "subrun_trace";
4160
4160
  timestamp: number;
4161
- parent_tool_call_id: string;
4162
- subrun_id: string;
4163
- source_event_id: string;
4164
4161
  conversation_id: string;
4165
4162
  turn_id: string;
4166
4163
  ephemeral: true;
4164
+ parent_tool_call_id: string;
4165
+ subrun_id: string;
4166
+ source_event_id: string;
4167
4167
  status?: "error" | "loading" | "success" | undefined;
4168
- tool_call_id?: string | undefined;
4169
4168
  tool_calls?: {
4170
4169
  tool_call_id: string;
4171
4170
  tool_name: string;
4172
4171
  args: Record<string, SerializableJsonValue>;
4173
4172
  }[] | undefined;
4174
- completion_reason?: "terminal" | "tool_call" | "interrupted" | undefined;
4173
+ tool_call_id?: string | undefined;
4174
+ completion_reason?: "tool_call" | "terminal" | "interrupted" | undefined;
4175
4175
  tool_name?: string | undefined;
4176
4176
  args?: Record<string, SerializableJsonValue> | undefined;
4177
4177
  content?: string | undefined;
@@ -4189,23 +4189,23 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4189
4189
  label?: string | undefined;
4190
4190
  }[] | undefined;
4191
4191
  version?: 1 | undefined;
4192
- subrun_parent_id?: string | undefined;
4192
+ run_id?: string | undefined;
4193
+ parent_run_id?: string | undefined;
4194
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
4195
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
4193
4196
  delta?: string | undefined;
4197
+ phase?: "error" | "start" | "update" | "complete" | undefined;
4198
+ meta?: Record<string, SerializableJsonValue> | undefined;
4199
+ duration_ms?: number | undefined;
4200
+ subrun_parent_id?: string | undefined;
4194
4201
  answer_id?: string | undefined;
4195
4202
  seq?: number | undefined;
4196
4203
  is_last?: boolean | undefined;
4197
- phase?: "error" | "start" | "update" | "complete" | undefined;
4198
4204
  output?: SerializableJsonValue | undefined;
4199
- duration_ms?: number | undefined;
4200
4205
  original_message_count?: number | undefined;
4201
4206
  compression_ratio?: number | undefined;
4202
4207
  included_old_summary?: boolean | undefined;
4203
4208
  replaced_message_ids?: string[] | undefined;
4204
- meta?: Record<string, SerializableJsonValue> | undefined;
4205
- run_id?: string | undefined;
4206
- parent_run_id?: string | undefined;
4207
- lane?: "child" | "foreground" | "auxiliary" | undefined;
4208
- visibility?: "none" | "conversation" | "parent-trace" | undefined;
4209
4209
  }>, z.ZodObject<{
4210
4210
  id: z.ZodEffects<z.ZodString, string, string>;
4211
4211
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -4243,7 +4243,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4243
4243
  interaction_status: "pending";
4244
4244
  metadata?: Record<string, SerializableJsonValue> | undefined;
4245
4245
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
4246
- lane?: "child" | "foreground" | "auxiliary" | undefined;
4246
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
4247
4247
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
4248
4248
  ephemeral?: boolean | undefined;
4249
4249
  form?: SerializableJsonValue | undefined;
@@ -4264,7 +4264,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4264
4264
  metadata?: Record<string, SerializableJsonValue> | undefined;
4265
4265
  version?: 1 | undefined;
4266
4266
  parent_run_id?: string | undefined;
4267
- lane?: "child" | "foreground" | "auxiliary" | undefined;
4267
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
4268
4268
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
4269
4269
  ephemeral?: boolean | undefined;
4270
4270
  form?: SerializableJsonValue | undefined;
@@ -4294,11 +4294,11 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4294
4294
  id: z.ZodOptional<z.ZodString>;
4295
4295
  name: z.ZodOptional<z.ZodString>;
4296
4296
  }, "strip", z.ZodTypeAny, {
4297
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
4297
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
4298
4298
  id?: string | undefined;
4299
4299
  name?: string | undefined;
4300
4300
  }, {
4301
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
4301
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
4302
4302
  id?: string | undefined;
4303
4303
  name?: string | undefined;
4304
4304
  }>;
@@ -4393,7 +4393,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4393
4393
  envelopeId: string;
4394
4394
  ts: number;
4395
4395
  actor: {
4396
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
4396
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
4397
4397
  id?: string | undefined;
4398
4398
  name?: string | undefined;
4399
4399
  };
@@ -4435,7 +4435,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4435
4435
  envelopeId: string;
4436
4436
  ts: number;
4437
4437
  actor: {
4438
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
4438
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
4439
4439
  id?: string | undefined;
4440
4440
  name?: string | undefined;
4441
4441
  };
@@ -4485,7 +4485,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4485
4485
  envelopeId: string;
4486
4486
  ts: number;
4487
4487
  actor: {
4488
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
4488
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
4489
4489
  id?: string | undefined;
4490
4490
  name?: string | undefined;
4491
4491
  };
@@ -4526,7 +4526,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4526
4526
  metadata?: Record<string, SerializableJsonValue> | undefined;
4527
4527
  run_id?: (string & z.BRAND<"RunId">) | undefined;
4528
4528
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
4529
- lane?: "child" | "foreground" | "auxiliary" | undefined;
4529
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
4530
4530
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
4531
4531
  ephemeral?: boolean | undefined;
4532
4532
  }, {
@@ -4540,7 +4540,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4540
4540
  envelopeId: string;
4541
4541
  ts: number;
4542
4542
  actor: {
4543
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
4543
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
4544
4544
  id?: string | undefined;
4545
4545
  name?: string | undefined;
4546
4546
  };
@@ -4582,7 +4582,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4582
4582
  version?: 1 | undefined;
4583
4583
  run_id?: string | undefined;
4584
4584
  parent_run_id?: string | undefined;
4585
- lane?: "child" | "foreground" | "auxiliary" | undefined;
4585
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
4586
4586
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
4587
4587
  ephemeral?: boolean | undefined;
4588
4588
  }>, z.ZodObject<{
@@ -4892,14 +4892,14 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4892
4892
  }, "strip", z.ZodTypeAny, {
4893
4893
  id: string;
4894
4894
  type: "final_answer";
4895
- completion_reason: "terminal" | "tool_call" | "interrupted";
4895
+ completion_reason: "tool_call" | "terminal" | "interrupted";
4896
4896
  content: string;
4897
4897
  timestamp: number;
4898
4898
  version: 1;
4899
- answer_id: string;
4900
4899
  conversation_id: string;
4901
4900
  turn_id: string;
4902
4901
  is_complete: boolean;
4902
+ answer_id: string;
4903
4903
  provider_continuations?: {
4904
4904
  kind: string;
4905
4905
  schema_version: 2;
@@ -4959,21 +4959,21 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
4959
4959
  }[] | undefined;
4960
4960
  })[] | undefined;
4961
4961
  metadata?: Record<string, SerializableJsonValue> | undefined;
4962
- meta?: Record<string, SerializableJsonValue> | undefined;
4963
4962
  run_id?: (string & z.BRAND<"RunId">) | undefined;
4964
4963
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
4965
- lane?: "child" | "foreground" | "auxiliary" | undefined;
4964
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
4966
4965
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
4967
4966
  ephemeral?: boolean | undefined;
4967
+ meta?: Record<string, SerializableJsonValue> | undefined;
4968
4968
  }, {
4969
4969
  id: string;
4970
4970
  type: "final_answer";
4971
- completion_reason: "terminal" | "tool_call" | "interrupted";
4971
+ completion_reason: "tool_call" | "terminal" | "interrupted";
4972
4972
  content: string;
4973
4973
  timestamp: number;
4974
- answer_id: string;
4975
4974
  conversation_id: string;
4976
4975
  turn_id: string;
4976
+ answer_id: string;
4977
4977
  provider_continuations?: {
4978
4978
  kind: string;
4979
4979
  schema_version: 2;
@@ -5034,13 +5034,13 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5034
5034
  })[] | undefined;
5035
5035
  metadata?: Record<string, SerializableJsonValue> | undefined;
5036
5036
  version?: 1 | undefined;
5037
- meta?: Record<string, SerializableJsonValue> | undefined;
5038
5037
  run_id?: string | undefined;
5039
5038
  parent_run_id?: string | undefined;
5040
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5039
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5041
5040
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5042
5041
  ephemeral?: boolean | undefined;
5043
5042
  is_complete?: boolean | undefined;
5043
+ meta?: Record<string, SerializableJsonValue> | undefined;
5044
5044
  }>, z.ZodObject<{
5045
5045
  id: z.ZodEffects<z.ZodString, string, string>;
5046
5046
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -5065,34 +5065,34 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5065
5065
  content: string;
5066
5066
  timestamp: number;
5067
5067
  version: 1;
5068
- answer_id: string;
5069
- seq: number;
5070
5068
  conversation_id: string;
5071
5069
  turn_id: string;
5070
+ answer_id: string;
5071
+ seq: number;
5072
5072
  metadata?: Record<string, SerializableJsonValue> | undefined;
5073
- is_last?: boolean | undefined;
5074
5073
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5075
5074
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5076
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5075
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5077
5076
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5078
5077
  ephemeral?: boolean | undefined;
5078
+ is_last?: boolean | undefined;
5079
5079
  }, {
5080
5080
  id: string;
5081
5081
  type: "final_answer_chunk";
5082
5082
  content: string;
5083
5083
  timestamp: number;
5084
- answer_id: string;
5085
- seq: number;
5086
5084
  conversation_id: string;
5087
5085
  turn_id: string;
5086
+ answer_id: string;
5087
+ seq: number;
5088
5088
  metadata?: Record<string, SerializableJsonValue> | undefined;
5089
5089
  version?: 1 | undefined;
5090
- is_last?: boolean | undefined;
5091
5090
  run_id?: string | undefined;
5092
5091
  parent_run_id?: string | undefined;
5093
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5092
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5094
5093
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5095
5094
  ephemeral?: boolean | undefined;
5095
+ is_last?: boolean | undefined;
5096
5096
  }>, z.ZodObject<{
5097
5097
  id: z.ZodEffects<z.ZodString, string, string>;
5098
5098
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -5117,12 +5117,12 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5117
5117
  conversation_id: string;
5118
5118
  turn_id: string;
5119
5119
  metadata?: Record<string, SerializableJsonValue> | undefined;
5120
- answer_id?: string | undefined;
5121
5120
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5122
5121
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5123
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5122
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5124
5123
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5125
5124
  ephemeral?: boolean | undefined;
5125
+ answer_id?: string | undefined;
5126
5126
  thought_message_ids?: string[] | undefined;
5127
5127
  }, {
5128
5128
  id: string;
@@ -5132,12 +5132,12 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5132
5132
  turn_id: string;
5133
5133
  metadata?: Record<string, SerializableJsonValue> | undefined;
5134
5134
  version?: 1 | undefined;
5135
- answer_id?: string | undefined;
5136
5135
  run_id?: string | undefined;
5137
5136
  parent_run_id?: string | undefined;
5138
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5137
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5139
5138
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5140
5139
  ephemeral?: boolean | undefined;
5140
+ answer_id?: string | undefined;
5141
5141
  thought_message_ids?: string[] | undefined;
5142
5142
  }>, z.ZodObject<{
5143
5143
  id: z.ZodEffects<z.ZodString, string, string>;
@@ -5165,38 +5165,38 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5165
5165
  content: string;
5166
5166
  timestamp: number;
5167
5167
  version: 1;
5168
- original_message_count: number;
5169
- replaced_message_ids: string[];
5170
5168
  conversation_id: string;
5171
5169
  turn_id: string;
5170
+ original_message_count: number;
5171
+ replaced_message_ids: string[];
5172
5172
  summary_seq: number;
5173
5173
  metadata?: Record<string, SerializableJsonValue> | undefined;
5174
- compression_ratio?: number | undefined;
5175
- included_old_summary?: boolean | undefined;
5176
5174
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5177
5175
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5178
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5176
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5179
5177
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5180
5178
  ephemeral?: boolean | undefined;
5179
+ compression_ratio?: number | undefined;
5180
+ included_old_summary?: boolean | undefined;
5181
5181
  }, {
5182
5182
  id: string;
5183
5183
  type: "history_summary";
5184
5184
  content: string;
5185
5185
  timestamp: number;
5186
- original_message_count: number;
5187
- replaced_message_ids: string[];
5188
5186
  conversation_id: string;
5189
5187
  turn_id: string;
5188
+ original_message_count: number;
5189
+ replaced_message_ids: string[];
5190
5190
  summary_seq: number;
5191
5191
  metadata?: Record<string, SerializableJsonValue> | undefined;
5192
5192
  version?: 1 | undefined;
5193
- compression_ratio?: number | undefined;
5194
- included_old_summary?: boolean | undefined;
5195
5193
  run_id?: string | undefined;
5196
5194
  parent_run_id?: string | undefined;
5197
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5195
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5198
5196
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5199
5197
  ephemeral?: boolean | undefined;
5198
+ compression_ratio?: number | undefined;
5199
+ included_old_summary?: boolean | undefined;
5200
5200
  }>, z.ZodObject<{
5201
5201
  id: z.ZodEffects<z.ZodString, string, string>;
5202
5202
  conversation_id: z.ZodEffects<z.ZodString, string, string>;
@@ -5226,7 +5226,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5226
5226
  metadata?: Record<string, SerializableJsonValue> | undefined;
5227
5227
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5228
5228
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5229
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5229
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5230
5230
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5231
5231
  ephemeral?: boolean | undefined;
5232
5232
  error_code?: string | undefined;
@@ -5243,7 +5243,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5243
5243
  version?: 1 | undefined;
5244
5244
  run_id?: string | undefined;
5245
5245
  parent_run_id?: string | undefined;
5246
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5246
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5247
5247
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5248
5248
  ephemeral?: boolean | undefined;
5249
5249
  error_code?: string | undefined;
@@ -5277,12 +5277,12 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5277
5277
  op: "truncate_after" | "replace" | "redo" | "branch";
5278
5278
  metadata?: Record<string, SerializableJsonValue> | undefined;
5279
5279
  reason?: string | undefined;
5280
- meta?: SerializableJsonValue | undefined;
5281
5280
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5282
5281
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5283
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5282
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5284
5283
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5285
5284
  ephemeral?: boolean | undefined;
5285
+ meta?: SerializableJsonValue | undefined;
5286
5286
  target_id?: string | undefined;
5287
5287
  }, {
5288
5288
  id: string;
@@ -5294,12 +5294,12 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5294
5294
  metadata?: Record<string, SerializableJsonValue> | undefined;
5295
5295
  version?: 1 | undefined;
5296
5296
  reason?: string | undefined;
5297
- meta?: SerializableJsonValue | undefined;
5298
5297
  run_id?: string | undefined;
5299
5298
  parent_run_id?: string | undefined;
5300
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5299
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5301
5300
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5302
5301
  ephemeral?: boolean | undefined;
5302
+ meta?: SerializableJsonValue | undefined;
5303
5303
  target_id?: string | undefined;
5304
5304
  }>, z.ZodObject<{
5305
5305
  id: z.ZodEffects<z.ZodString, string, string>;
@@ -5343,7 +5343,6 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5343
5343
  measured_at: z.ZodNumber;
5344
5344
  }, "strict", z.ZodTypeAny, {
5345
5345
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
5346
- confidence: "estimate" | "provider-estimate" | "actual";
5347
5346
  basis: "last_completed_llm_prompt";
5348
5347
  budget_model_id: string;
5349
5348
  used_tokens: number;
@@ -5356,11 +5355,11 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5356
5355
  input_budget_tokens: number;
5357
5356
  remaining_tokens: number;
5358
5357
  output_limit_tokens: number;
5358
+ confidence: "estimate" | "provider-estimate" | "actual";
5359
5359
  measured_at: number;
5360
5360
  served_model_id?: string | undefined;
5361
5361
  }, {
5362
5362
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
5363
- confidence: "estimate" | "provider-estimate" | "actual";
5364
5363
  basis: "last_completed_llm_prompt";
5365
5364
  budget_model_id: string;
5366
5365
  used_tokens: number;
@@ -5373,11 +5372,11 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5373
5372
  input_budget_tokens: number;
5374
5373
  remaining_tokens: number;
5375
5374
  output_limit_tokens: number;
5375
+ confidence: "estimate" | "provider-estimate" | "actual";
5376
5376
  measured_at: number;
5377
5377
  served_model_id?: string | undefined;
5378
5378
  }>, {
5379
5379
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
5380
- confidence: "estimate" | "provider-estimate" | "actual";
5381
5380
  basis: "last_completed_llm_prompt";
5382
5381
  budget_model_id: string;
5383
5382
  used_tokens: number;
@@ -5390,11 +5389,11 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5390
5389
  input_budget_tokens: number;
5391
5390
  remaining_tokens: number;
5392
5391
  output_limit_tokens: number;
5392
+ confidence: "estimate" | "provider-estimate" | "actual";
5393
5393
  measured_at: number;
5394
5394
  served_model_id?: string | undefined;
5395
5395
  }, {
5396
5396
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
5397
- confidence: "estimate" | "provider-estimate" | "actual";
5398
5397
  basis: "last_completed_llm_prompt";
5399
5398
  budget_model_id: string;
5400
5399
  used_tokens: number;
@@ -5407,6 +5406,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5407
5406
  input_budget_tokens: number;
5408
5407
  remaining_tokens: number;
5409
5408
  output_limit_tokens: number;
5409
+ confidence: "estimate" | "provider-estimate" | "actual";
5410
5410
  measured_at: number;
5411
5411
  served_model_id?: string | undefined;
5412
5412
  }>;
@@ -5420,7 +5420,6 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5420
5420
  ephemeral: true;
5421
5421
  context_usage: {
5422
5422
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
5423
- confidence: "estimate" | "provider-estimate" | "actual";
5424
5423
  basis: "last_completed_llm_prompt";
5425
5424
  budget_model_id: string;
5426
5425
  used_tokens: number;
@@ -5433,13 +5432,14 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5433
5432
  input_budget_tokens: number;
5434
5433
  remaining_tokens: number;
5435
5434
  output_limit_tokens: number;
5435
+ confidence: "estimate" | "provider-estimate" | "actual";
5436
5436
  measured_at: number;
5437
5437
  served_model_id?: string | undefined;
5438
5438
  };
5439
5439
  metadata?: Record<string, SerializableJsonValue> | undefined;
5440
5440
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5441
5441
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5442
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5442
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5443
5443
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5444
5444
  user_message_id?: string | undefined;
5445
5445
  }, {
@@ -5451,7 +5451,6 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5451
5451
  ephemeral: true;
5452
5452
  context_usage: {
5453
5453
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
5454
- confidence: "estimate" | "provider-estimate" | "actual";
5455
5454
  basis: "last_completed_llm_prompt";
5456
5455
  budget_model_id: string;
5457
5456
  used_tokens: number;
@@ -5464,6 +5463,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5464
5463
  input_budget_tokens: number;
5465
5464
  remaining_tokens: number;
5466
5465
  output_limit_tokens: number;
5466
+ confidence: "estimate" | "provider-estimate" | "actual";
5467
5467
  measured_at: number;
5468
5468
  served_model_id?: string | undefined;
5469
5469
  };
@@ -5471,7 +5471,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5471
5471
  version?: 1 | undefined;
5472
5472
  run_id?: string | undefined;
5473
5473
  parent_run_id?: string | undefined;
5474
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5474
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5475
5475
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5476
5476
  user_message_id?: string | undefined;
5477
5477
  }>, z.ZodObject<{
@@ -5519,7 +5519,6 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5519
5519
  measured_at: z.ZodNumber;
5520
5520
  }, "strict", z.ZodTypeAny, {
5521
5521
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
5522
- confidence: "estimate" | "provider-estimate" | "actual";
5523
5522
  basis: "last_completed_llm_prompt";
5524
5523
  budget_model_id: string;
5525
5524
  used_tokens: number;
@@ -5532,11 +5531,11 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5532
5531
  input_budget_tokens: number;
5533
5532
  remaining_tokens: number;
5534
5533
  output_limit_tokens: number;
5534
+ confidence: "estimate" | "provider-estimate" | "actual";
5535
5535
  measured_at: number;
5536
5536
  served_model_id?: string | undefined;
5537
5537
  }, {
5538
5538
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
5539
- confidence: "estimate" | "provider-estimate" | "actual";
5540
5539
  basis: "last_completed_llm_prompt";
5541
5540
  budget_model_id: string;
5542
5541
  used_tokens: number;
@@ -5549,11 +5548,11 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5549
5548
  input_budget_tokens: number;
5550
5549
  remaining_tokens: number;
5551
5550
  output_limit_tokens: number;
5551
+ confidence: "estimate" | "provider-estimate" | "actual";
5552
5552
  measured_at: number;
5553
5553
  served_model_id?: string | undefined;
5554
5554
  }>, {
5555
5555
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
5556
- confidence: "estimate" | "provider-estimate" | "actual";
5557
5556
  basis: "last_completed_llm_prompt";
5558
5557
  budget_model_id: string;
5559
5558
  used_tokens: number;
@@ -5566,11 +5565,11 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5566
5565
  input_budget_tokens: number;
5567
5566
  remaining_tokens: number;
5568
5567
  output_limit_tokens: number;
5568
+ confidence: "estimate" | "provider-estimate" | "actual";
5569
5569
  measured_at: number;
5570
5570
  served_model_id?: string | undefined;
5571
5571
  }, {
5572
5572
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
5573
- confidence: "estimate" | "provider-estimate" | "actual";
5574
5573
  basis: "last_completed_llm_prompt";
5575
5574
  budget_model_id: string;
5576
5575
  used_tokens: number;
@@ -5583,6 +5582,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5583
5582
  input_budget_tokens: number;
5584
5583
  remaining_tokens: number;
5585
5584
  output_limit_tokens: number;
5585
+ confidence: "estimate" | "provider-estimate" | "actual";
5586
5586
  measured_at: number;
5587
5587
  served_model_id?: string | undefined;
5588
5588
  }>>;
@@ -5592,20 +5592,19 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5592
5592
  timestamp: number;
5593
5593
  version: 1;
5594
5594
  outcome: "completed" | "failed" | "cancelled" | "awaiting_user";
5595
- duration_ms: number;
5596
5595
  conversation_id: string;
5597
5596
  turn_id: string;
5597
+ duration_ms: number;
5598
5598
  execution_id: string;
5599
5599
  metadata?: Record<string, SerializableJsonValue> | undefined;
5600
5600
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5601
5601
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5602
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5602
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5603
5603
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5604
5604
  ephemeral?: boolean | undefined;
5605
5605
  user_message_id?: string | undefined;
5606
5606
  context_usage?: {
5607
5607
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
5608
- confidence: "estimate" | "provider-estimate" | "actual";
5609
5608
  basis: "last_completed_llm_prompt";
5610
5609
  budget_model_id: string;
5611
5610
  used_tokens: number;
@@ -5618,6 +5617,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5618
5617
  input_budget_tokens: number;
5619
5618
  remaining_tokens: number;
5620
5619
  output_limit_tokens: number;
5620
+ confidence: "estimate" | "provider-estimate" | "actual";
5621
5621
  measured_at: number;
5622
5622
  served_model_id?: string | undefined;
5623
5623
  } | undefined;
@@ -5626,21 +5626,20 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5626
5626
  type: "run_execution_metrics";
5627
5627
  timestamp: number;
5628
5628
  outcome: "completed" | "failed" | "cancelled" | "awaiting_user";
5629
- duration_ms: number;
5630
5629
  conversation_id: string;
5631
5630
  turn_id: string;
5631
+ duration_ms: number;
5632
5632
  execution_id: string;
5633
5633
  metadata?: Record<string, SerializableJsonValue> | undefined;
5634
5634
  version?: 1 | undefined;
5635
5635
  run_id?: string | undefined;
5636
5636
  parent_run_id?: string | undefined;
5637
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5637
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5638
5638
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5639
5639
  ephemeral?: boolean | undefined;
5640
5640
  user_message_id?: string | undefined;
5641
5641
  context_usage?: {
5642
5642
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
5643
- confidence: "estimate" | "provider-estimate" | "actual";
5644
5643
  basis: "last_completed_llm_prompt";
5645
5644
  budget_model_id: string;
5646
5645
  used_tokens: number;
@@ -5653,6 +5652,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5653
5652
  input_budget_tokens: number;
5654
5653
  remaining_tokens: number;
5655
5654
  output_limit_tokens: number;
5655
+ confidence: "estimate" | "provider-estimate" | "actual";
5656
5656
  measured_at: number;
5657
5657
  served_model_id?: string | undefined;
5658
5658
  } | undefined;
@@ -5662,9 +5662,9 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5662
5662
  content: string;
5663
5663
  timestamp: number;
5664
5664
  version: 1;
5665
- source: "system" | "user" | "editor";
5666
5665
  conversation_id: string;
5667
5666
  turn_id: string;
5667
+ source: "system" | "user" | "editor";
5668
5668
  metadata?: Record<string, SerializableJsonValue> | undefined;
5669
5669
  attachments?: {
5670
5670
  id: string;
@@ -5680,7 +5680,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5680
5680
  }[] | undefined;
5681
5681
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5682
5682
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5683
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5683
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5684
5684
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5685
5685
  ephemeral?: boolean | undefined;
5686
5686
  raw_content?: string | undefined;
@@ -5694,13 +5694,13 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5694
5694
  turn_id: string;
5695
5695
  is_complete: boolean;
5696
5696
  metadata?: Record<string, SerializableJsonValue> | undefined;
5697
- delta?: string | undefined;
5698
5697
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5699
5698
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5700
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5699
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5701
5700
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5702
5701
  ephemeral?: boolean | undefined;
5703
5702
  thought_message_id?: string | undefined;
5703
+ delta?: string | undefined;
5704
5704
  } | {
5705
5705
  id: string;
5706
5706
  status: "error" | "loading" | "success";
@@ -5709,10 +5709,11 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5709
5709
  tool_name: string;
5710
5710
  timestamp: number;
5711
5711
  version: 1;
5712
- phase: "error" | "start" | "update" | "complete";
5713
5712
  conversation_id: string;
5714
5713
  turn_id: string;
5714
+ phase: "error" | "start" | "update" | "complete";
5715
5715
  payload?: {
5716
+ tool_calls?: SerializableJsonValue[] | undefined;
5716
5717
  provider_continuations?: {
5717
5718
  kind: string;
5718
5719
  schema_version: 2;
@@ -5725,7 +5726,6 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5725
5726
  };
5726
5727
  payload: SerializableJsonValue;
5727
5728
  }[] | undefined;
5728
- tool_calls?: SerializableJsonValue[] | undefined;
5729
5729
  assistant_replay_parts?: ({
5730
5730
  type: "text";
5731
5731
  text: string;
@@ -5776,13 +5776,13 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5776
5776
  } | undefined;
5777
5777
  args?: Record<string, SerializableJsonValue> | undefined;
5778
5778
  metadata?: Record<string, SerializableJsonValue> | undefined;
5779
- parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
5780
- meta?: Record<string, SerializableJsonValue> | undefined;
5781
5779
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5782
5780
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5783
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5781
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5784
5782
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5785
5783
  ephemeral?: boolean | undefined;
5784
+ parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
5785
+ meta?: Record<string, SerializableJsonValue> | undefined;
5786
5786
  } | {
5787
5787
  id: string;
5788
5788
  status: "error" | "loading" | "success";
@@ -5791,19 +5791,19 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5791
5791
  tool_name: string;
5792
5792
  timestamp: number;
5793
5793
  version: 1;
5794
- phase: "error" | "start" | "update" | "complete";
5795
5794
  conversation_id: string;
5796
5795
  turn_id: string;
5796
+ phase: "error" | "start" | "update" | "complete";
5797
5797
  payload?: Record<string, SerializableJsonValue> | undefined;
5798
5798
  args?: Record<string, SerializableJsonValue> | undefined;
5799
5799
  metadata?: Record<string, SerializableJsonValue> | undefined;
5800
- parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
5801
- meta?: Record<string, SerializableJsonValue> | undefined;
5802
5800
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5803
5801
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5804
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5802
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5805
5803
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5806
5804
  ephemeral?: boolean | undefined;
5805
+ parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
5806
+ meta?: Record<string, SerializableJsonValue> | undefined;
5807
5807
  } | {
5808
5808
  id: string;
5809
5809
  status: "error" | "success";
@@ -5830,33 +5830,33 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5830
5830
  fileName?: string | undefined;
5831
5831
  label?: string | undefined;
5832
5832
  }[] | undefined;
5833
- duration_ms?: number | undefined;
5834
5833
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5835
5834
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5836
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5835
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5837
5836
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5838
5837
  ephemeral?: boolean | undefined;
5839
5838
  error_code?: string | undefined;
5839
+ duration_ms?: number | undefined;
5840
5840
  } | {
5841
5841
  id: string;
5842
- kind: "history_summary" | "final_answer" | "tool_output" | "thought_delta" | "thought_complete" | "tool_call_decision" | "tool_process" | "final_answer_chunk";
5842
+ kind: "history_summary" | "final_answer" | "tool_output" | "tool_call_decision" | "tool_process" | "thought_delta" | "thought_complete" | "final_answer_chunk";
5843
5843
  type: "subrun_trace";
5844
5844
  timestamp: number;
5845
5845
  version: 1;
5846
- parent_tool_call_id: string & z.BRAND<"ToolCallId">;
5847
- subrun_id: string;
5848
- source_event_id: string;
5849
5846
  conversation_id: string;
5850
5847
  turn_id: string;
5851
5848
  ephemeral: true;
5849
+ parent_tool_call_id: string & z.BRAND<"ToolCallId">;
5850
+ subrun_id: string;
5851
+ source_event_id: string;
5852
5852
  status?: "error" | "loading" | "success" | undefined;
5853
- tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
5854
5853
  tool_calls?: {
5855
5854
  tool_call_id: string & z.BRAND<"ToolCallId">;
5856
5855
  tool_name: string;
5857
5856
  args: Record<string, SerializableJsonValue>;
5858
5857
  }[] | undefined;
5859
- completion_reason?: "terminal" | "tool_call" | "interrupted" | undefined;
5858
+ tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
5859
+ completion_reason?: "tool_call" | "terminal" | "interrupted" | undefined;
5860
5860
  tool_name?: string | undefined;
5861
5861
  args?: Record<string, SerializableJsonValue> | undefined;
5862
5862
  content?: string | undefined;
@@ -5873,23 +5873,23 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5873
5873
  fileName?: string | undefined;
5874
5874
  label?: string | undefined;
5875
5875
  }[] | undefined;
5876
- subrun_parent_id?: string | undefined;
5876
+ run_id?: (string & z.BRAND<"RunId">) | undefined;
5877
+ parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5878
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5879
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
5877
5880
  delta?: string | undefined;
5881
+ phase?: "error" | "start" | "update" | "complete" | undefined;
5882
+ meta?: Record<string, SerializableJsonValue> | undefined;
5883
+ duration_ms?: number | undefined;
5884
+ subrun_parent_id?: string | undefined;
5878
5885
  answer_id?: string | undefined;
5879
5886
  seq?: number | undefined;
5880
5887
  is_last?: boolean | undefined;
5881
- phase?: "error" | "start" | "update" | "complete" | undefined;
5882
5888
  output?: SerializableJsonValue | undefined;
5883
- duration_ms?: number | undefined;
5884
5889
  original_message_count?: number | undefined;
5885
5890
  compression_ratio?: number | undefined;
5886
5891
  included_old_summary?: boolean | undefined;
5887
5892
  replaced_message_ids?: string[] | undefined;
5888
- meta?: Record<string, SerializableJsonValue> | undefined;
5889
- run_id?: (string & z.BRAND<"RunId">) | undefined;
5890
- parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5891
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5892
- visibility?: "none" | "conversation" | "parent-trace" | undefined;
5893
5893
  } | {
5894
5894
  id: string;
5895
5895
  type: "requires_user_interaction";
@@ -5905,7 +5905,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5905
5905
  interaction_status: "pending";
5906
5906
  metadata?: Record<string, SerializableJsonValue> | undefined;
5907
5907
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5908
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5908
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5909
5909
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5910
5910
  ephemeral?: boolean | undefined;
5911
5911
  form?: SerializableJsonValue | undefined;
@@ -5923,7 +5923,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5923
5923
  envelopeId: string;
5924
5924
  ts: number;
5925
5925
  actor: {
5926
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
5926
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
5927
5927
  id?: string | undefined;
5928
5928
  name?: string | undefined;
5929
5929
  };
@@ -5964,20 +5964,20 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
5964
5964
  metadata?: Record<string, SerializableJsonValue> | undefined;
5965
5965
  run_id?: (string & z.BRAND<"RunId">) | undefined;
5966
5966
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
5967
- lane?: "child" | "foreground" | "auxiliary" | undefined;
5967
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
5968
5968
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
5969
5969
  ephemeral?: boolean | undefined;
5970
5970
  } | {
5971
5971
  id: string;
5972
5972
  type: "final_answer";
5973
- completion_reason: "terminal" | "tool_call" | "interrupted";
5973
+ completion_reason: "tool_call" | "terminal" | "interrupted";
5974
5974
  content: string;
5975
5975
  timestamp: number;
5976
5976
  version: 1;
5977
- answer_id: string;
5978
5977
  conversation_id: string;
5979
5978
  turn_id: string;
5980
5979
  is_complete: boolean;
5980
+ answer_id: string;
5981
5981
  provider_continuations?: {
5982
5982
  kind: string;
5983
5983
  schema_version: 2;
@@ -6037,29 +6037,29 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
6037
6037
  }[] | undefined;
6038
6038
  })[] | undefined;
6039
6039
  metadata?: Record<string, SerializableJsonValue> | undefined;
6040
- meta?: Record<string, SerializableJsonValue> | undefined;
6041
6040
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6042
6041
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6043
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6042
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6044
6043
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6045
6044
  ephemeral?: boolean | undefined;
6045
+ meta?: Record<string, SerializableJsonValue> | undefined;
6046
6046
  } | {
6047
6047
  id: string;
6048
6048
  type: "final_answer_chunk";
6049
6049
  content: string;
6050
6050
  timestamp: number;
6051
6051
  version: 1;
6052
- answer_id: string;
6053
- seq: number;
6054
6052
  conversation_id: string;
6055
6053
  turn_id: string;
6054
+ answer_id: string;
6055
+ seq: number;
6056
6056
  metadata?: Record<string, SerializableJsonValue> | undefined;
6057
- is_last?: boolean | undefined;
6058
6057
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6059
6058
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6060
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6059
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6061
6060
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6062
6061
  ephemeral?: boolean | undefined;
6062
+ is_last?: boolean | undefined;
6063
6063
  } | {
6064
6064
  id: string;
6065
6065
  type: "final_answer_reset";
@@ -6068,12 +6068,12 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
6068
6068
  conversation_id: string;
6069
6069
  turn_id: string;
6070
6070
  metadata?: Record<string, SerializableJsonValue> | undefined;
6071
- answer_id?: string | undefined;
6072
6071
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6073
6072
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6074
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6073
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6075
6074
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6076
6075
  ephemeral?: boolean | undefined;
6076
+ answer_id?: string | undefined;
6077
6077
  thought_message_ids?: string[] | undefined;
6078
6078
  } | {
6079
6079
  id: string;
@@ -6081,19 +6081,19 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
6081
6081
  content: string;
6082
6082
  timestamp: number;
6083
6083
  version: 1;
6084
- original_message_count: number;
6085
- replaced_message_ids: string[];
6086
6084
  conversation_id: string;
6087
6085
  turn_id: string;
6086
+ original_message_count: number;
6087
+ replaced_message_ids: string[];
6088
6088
  summary_seq: number;
6089
6089
  metadata?: Record<string, SerializableJsonValue> | undefined;
6090
- compression_ratio?: number | undefined;
6091
- included_old_summary?: boolean | undefined;
6092
6090
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6093
6091
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6094
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6092
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6095
6093
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6096
6094
  ephemeral?: boolean | undefined;
6095
+ compression_ratio?: number | undefined;
6096
+ included_old_summary?: boolean | undefined;
6097
6097
  } | {
6098
6098
  id: string;
6099
6099
  type: "error";
@@ -6105,7 +6105,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
6105
6105
  metadata?: Record<string, SerializableJsonValue> | undefined;
6106
6106
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6107
6107
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6108
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6108
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6109
6109
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6110
6110
  ephemeral?: boolean | undefined;
6111
6111
  error_code?: string | undefined;
@@ -6121,12 +6121,12 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
6121
6121
  op: "truncate_after" | "replace" | "redo" | "branch";
6122
6122
  metadata?: Record<string, SerializableJsonValue> | undefined;
6123
6123
  reason?: string | undefined;
6124
- meta?: SerializableJsonValue | undefined;
6125
6124
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6126
6125
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6127
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6126
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6128
6127
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6129
6128
  ephemeral?: boolean | undefined;
6129
+ meta?: SerializableJsonValue | undefined;
6130
6130
  target_id?: string | undefined;
6131
6131
  } | {
6132
6132
  id: string;
@@ -6138,7 +6138,6 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
6138
6138
  ephemeral: true;
6139
6139
  context_usage: {
6140
6140
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
6141
- confidence: "estimate" | "provider-estimate" | "actual";
6142
6141
  basis: "last_completed_llm_prompt";
6143
6142
  budget_model_id: string;
6144
6143
  used_tokens: number;
@@ -6151,13 +6150,14 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
6151
6150
  input_budget_tokens: number;
6152
6151
  remaining_tokens: number;
6153
6152
  output_limit_tokens: number;
6153
+ confidence: "estimate" | "provider-estimate" | "actual";
6154
6154
  measured_at: number;
6155
6155
  served_model_id?: string | undefined;
6156
6156
  };
6157
6157
  metadata?: Record<string, SerializableJsonValue> | undefined;
6158
6158
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6159
6159
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6160
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6160
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6161
6161
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6162
6162
  user_message_id?: string | undefined;
6163
6163
  } | {
@@ -6166,20 +6166,19 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
6166
6166
  timestamp: number;
6167
6167
  version: 1;
6168
6168
  outcome: "completed" | "failed" | "cancelled" | "awaiting_user";
6169
- duration_ms: number;
6170
6169
  conversation_id: string;
6171
6170
  turn_id: string;
6171
+ duration_ms: number;
6172
6172
  execution_id: string;
6173
6173
  metadata?: Record<string, SerializableJsonValue> | undefined;
6174
6174
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6175
6175
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6176
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6176
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6177
6177
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6178
6178
  ephemeral?: boolean | undefined;
6179
6179
  user_message_id?: string | undefined;
6180
6180
  context_usage?: {
6181
6181
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
6182
- confidence: "estimate" | "provider-estimate" | "actual";
6183
6182
  basis: "last_completed_llm_prompt";
6184
6183
  budget_model_id: string;
6185
6184
  used_tokens: number;
@@ -6192,6 +6191,7 @@ declare const RuntimeEvent: z.ZodEffects<z.ZodPipeline<z.ZodEffects<z.ZodUnknown
6192
6191
  input_budget_tokens: number;
6193
6192
  remaining_tokens: number;
6194
6193
  output_limit_tokens: number;
6194
+ confidence: "estimate" | "provider-estimate" | "actual";
6195
6195
  measured_at: number;
6196
6196
  served_model_id?: string | undefined;
6197
6197
  } | undefined;
@@ -6265,9 +6265,9 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6265
6265
  content: string;
6266
6266
  timestamp: number;
6267
6267
  version: 1;
6268
- source: "system" | "user" | "editor";
6269
6268
  conversation_id: string;
6270
6269
  turn_id: string;
6270
+ source: "system" | "user" | "editor";
6271
6271
  metadata?: Record<string, SerializableJsonValue> | undefined;
6272
6272
  attachments?: {
6273
6273
  id: string;
@@ -6283,7 +6283,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6283
6283
  }[] | undefined;
6284
6284
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6285
6285
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6286
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6286
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6287
6287
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6288
6288
  ephemeral?: boolean | undefined;
6289
6289
  raw_content?: string | undefined;
@@ -6297,13 +6297,13 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6297
6297
  turn_id: string;
6298
6298
  is_complete: boolean;
6299
6299
  metadata?: Record<string, SerializableJsonValue> | undefined;
6300
- delta?: string | undefined;
6301
6300
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6302
6301
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6303
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6302
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6304
6303
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6305
6304
  ephemeral?: boolean | undefined;
6306
6305
  thought_message_id?: string | undefined;
6306
+ delta?: string | undefined;
6307
6307
  } | {
6308
6308
  id: string;
6309
6309
  status: "error" | "loading" | "success";
@@ -6312,10 +6312,11 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6312
6312
  tool_name: string;
6313
6313
  timestamp: number;
6314
6314
  version: 1;
6315
- phase: "error" | "start" | "update" | "complete";
6316
6315
  conversation_id: string;
6317
6316
  turn_id: string;
6317
+ phase: "error" | "start" | "update" | "complete";
6318
6318
  payload?: {
6319
+ tool_calls?: SerializableJsonValue[] | undefined;
6319
6320
  provider_continuations?: {
6320
6321
  kind: string;
6321
6322
  schema_version: 2;
@@ -6328,7 +6329,6 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6328
6329
  };
6329
6330
  payload: SerializableJsonValue;
6330
6331
  }[] | undefined;
6331
- tool_calls?: SerializableJsonValue[] | undefined;
6332
6332
  assistant_replay_parts?: ({
6333
6333
  type: "text";
6334
6334
  text: string;
@@ -6379,13 +6379,13 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6379
6379
  } | undefined;
6380
6380
  args?: Record<string, SerializableJsonValue> | undefined;
6381
6381
  metadata?: Record<string, SerializableJsonValue> | undefined;
6382
- parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
6383
- meta?: Record<string, SerializableJsonValue> | undefined;
6384
6382
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6385
6383
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6386
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6384
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6387
6385
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6388
6386
  ephemeral?: boolean | undefined;
6387
+ parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
6388
+ meta?: Record<string, SerializableJsonValue> | undefined;
6389
6389
  } | {
6390
6390
  id: string;
6391
6391
  status: "error" | "loading" | "success";
@@ -6394,19 +6394,19 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6394
6394
  tool_name: string;
6395
6395
  timestamp: number;
6396
6396
  version: 1;
6397
- phase: "error" | "start" | "update" | "complete";
6398
6397
  conversation_id: string;
6399
6398
  turn_id: string;
6399
+ phase: "error" | "start" | "update" | "complete";
6400
6400
  payload?: Record<string, SerializableJsonValue> | undefined;
6401
6401
  args?: Record<string, SerializableJsonValue> | undefined;
6402
6402
  metadata?: Record<string, SerializableJsonValue> | undefined;
6403
- parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
6404
- meta?: Record<string, SerializableJsonValue> | undefined;
6405
6403
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6406
6404
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6407
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6405
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6408
6406
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6409
6407
  ephemeral?: boolean | undefined;
6408
+ parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
6409
+ meta?: Record<string, SerializableJsonValue> | undefined;
6410
6410
  } | {
6411
6411
  id: string;
6412
6412
  status: "error" | "success";
@@ -6433,33 +6433,33 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6433
6433
  fileName?: string | undefined;
6434
6434
  label?: string | undefined;
6435
6435
  }[] | undefined;
6436
- duration_ms?: number | undefined;
6437
6436
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6438
6437
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6439
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6438
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6440
6439
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6441
6440
  ephemeral?: boolean | undefined;
6442
6441
  error_code?: string | undefined;
6442
+ duration_ms?: number | undefined;
6443
6443
  } | {
6444
6444
  id: string;
6445
- kind: "history_summary" | "final_answer" | "tool_output" | "thought_delta" | "thought_complete" | "tool_call_decision" | "tool_process" | "final_answer_chunk";
6445
+ kind: "history_summary" | "final_answer" | "tool_output" | "tool_call_decision" | "tool_process" | "thought_delta" | "thought_complete" | "final_answer_chunk";
6446
6446
  type: "subrun_trace";
6447
6447
  timestamp: number;
6448
6448
  version: 1;
6449
- parent_tool_call_id: string & z.BRAND<"ToolCallId">;
6450
- subrun_id: string;
6451
- source_event_id: string;
6452
6449
  conversation_id: string;
6453
6450
  turn_id: string;
6454
6451
  ephemeral: true;
6452
+ parent_tool_call_id: string & z.BRAND<"ToolCallId">;
6453
+ subrun_id: string;
6454
+ source_event_id: string;
6455
6455
  status?: "error" | "loading" | "success" | undefined;
6456
- tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
6457
6456
  tool_calls?: {
6458
6457
  tool_call_id: string & z.BRAND<"ToolCallId">;
6459
6458
  tool_name: string;
6460
6459
  args: Record<string, SerializableJsonValue>;
6461
6460
  }[] | undefined;
6462
- completion_reason?: "terminal" | "tool_call" | "interrupted" | undefined;
6461
+ tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
6462
+ completion_reason?: "tool_call" | "terminal" | "interrupted" | undefined;
6463
6463
  tool_name?: string | undefined;
6464
6464
  args?: Record<string, SerializableJsonValue> | undefined;
6465
6465
  content?: string | undefined;
@@ -6476,23 +6476,23 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6476
6476
  fileName?: string | undefined;
6477
6477
  label?: string | undefined;
6478
6478
  }[] | undefined;
6479
- subrun_parent_id?: string | undefined;
6479
+ run_id?: (string & z.BRAND<"RunId">) | undefined;
6480
+ parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6481
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6482
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
6480
6483
  delta?: string | undefined;
6484
+ phase?: "error" | "start" | "update" | "complete" | undefined;
6485
+ meta?: Record<string, SerializableJsonValue> | undefined;
6486
+ duration_ms?: number | undefined;
6487
+ subrun_parent_id?: string | undefined;
6481
6488
  answer_id?: string | undefined;
6482
6489
  seq?: number | undefined;
6483
6490
  is_last?: boolean | undefined;
6484
- phase?: "error" | "start" | "update" | "complete" | undefined;
6485
6491
  output?: SerializableJsonValue | undefined;
6486
- duration_ms?: number | undefined;
6487
6492
  original_message_count?: number | undefined;
6488
6493
  compression_ratio?: number | undefined;
6489
6494
  included_old_summary?: boolean | undefined;
6490
6495
  replaced_message_ids?: string[] | undefined;
6491
- meta?: Record<string, SerializableJsonValue> | undefined;
6492
- run_id?: (string & z.BRAND<"RunId">) | undefined;
6493
- parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6494
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6495
- visibility?: "none" | "conversation" | "parent-trace" | undefined;
6496
6496
  } | {
6497
6497
  id: string;
6498
6498
  type: "requires_user_interaction";
@@ -6508,7 +6508,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6508
6508
  interaction_status: "pending";
6509
6509
  metadata?: Record<string, SerializableJsonValue> | undefined;
6510
6510
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6511
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6511
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6512
6512
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6513
6513
  ephemeral?: boolean | undefined;
6514
6514
  form?: SerializableJsonValue | undefined;
@@ -6526,7 +6526,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6526
6526
  envelopeId: string;
6527
6527
  ts: number;
6528
6528
  actor: {
6529
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
6529
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
6530
6530
  id?: string | undefined;
6531
6531
  name?: string | undefined;
6532
6532
  };
@@ -6567,20 +6567,20 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6567
6567
  metadata?: Record<string, SerializableJsonValue> | undefined;
6568
6568
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6569
6569
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6570
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6570
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6571
6571
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6572
6572
  ephemeral?: boolean | undefined;
6573
6573
  } | {
6574
6574
  id: string;
6575
6575
  type: "final_answer";
6576
- completion_reason: "terminal" | "tool_call" | "interrupted";
6576
+ completion_reason: "tool_call" | "terminal" | "interrupted";
6577
6577
  content: string;
6578
6578
  timestamp: number;
6579
6579
  version: 1;
6580
- answer_id: string;
6581
6580
  conversation_id: string;
6582
6581
  turn_id: string;
6583
6582
  is_complete: boolean;
6583
+ answer_id: string;
6584
6584
  provider_continuations?: {
6585
6585
  kind: string;
6586
6586
  schema_version: 2;
@@ -6640,29 +6640,29 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6640
6640
  }[] | undefined;
6641
6641
  })[] | undefined;
6642
6642
  metadata?: Record<string, SerializableJsonValue> | undefined;
6643
- meta?: Record<string, SerializableJsonValue> | undefined;
6644
6643
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6645
6644
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6646
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6645
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6647
6646
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6648
6647
  ephemeral?: boolean | undefined;
6648
+ meta?: Record<string, SerializableJsonValue> | undefined;
6649
6649
  } | {
6650
6650
  id: string;
6651
6651
  type: "final_answer_chunk";
6652
6652
  content: string;
6653
6653
  timestamp: number;
6654
6654
  version: 1;
6655
- answer_id: string;
6656
- seq: number;
6657
6655
  conversation_id: string;
6658
6656
  turn_id: string;
6657
+ answer_id: string;
6658
+ seq: number;
6659
6659
  metadata?: Record<string, SerializableJsonValue> | undefined;
6660
- is_last?: boolean | undefined;
6661
6660
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6662
6661
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6663
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6662
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6664
6663
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6665
6664
  ephemeral?: boolean | undefined;
6665
+ is_last?: boolean | undefined;
6666
6666
  } | {
6667
6667
  id: string;
6668
6668
  type: "final_answer_reset";
@@ -6671,12 +6671,12 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6671
6671
  conversation_id: string;
6672
6672
  turn_id: string;
6673
6673
  metadata?: Record<string, SerializableJsonValue> | undefined;
6674
- answer_id?: string | undefined;
6675
6674
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6676
6675
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6677
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6676
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6678
6677
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6679
6678
  ephemeral?: boolean | undefined;
6679
+ answer_id?: string | undefined;
6680
6680
  thought_message_ids?: string[] | undefined;
6681
6681
  } | {
6682
6682
  id: string;
@@ -6684,19 +6684,19 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6684
6684
  content: string;
6685
6685
  timestamp: number;
6686
6686
  version: 1;
6687
- original_message_count: number;
6688
- replaced_message_ids: string[];
6689
6687
  conversation_id: string;
6690
6688
  turn_id: string;
6689
+ original_message_count: number;
6690
+ replaced_message_ids: string[];
6691
6691
  summary_seq: number;
6692
6692
  metadata?: Record<string, SerializableJsonValue> | undefined;
6693
- compression_ratio?: number | undefined;
6694
- included_old_summary?: boolean | undefined;
6695
6693
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6696
6694
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6697
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6695
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6698
6696
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6699
6697
  ephemeral?: boolean | undefined;
6698
+ compression_ratio?: number | undefined;
6699
+ included_old_summary?: boolean | undefined;
6700
6700
  } | {
6701
6701
  id: string;
6702
6702
  type: "error";
@@ -6708,7 +6708,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6708
6708
  metadata?: Record<string, SerializableJsonValue> | undefined;
6709
6709
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6710
6710
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6711
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6711
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6712
6712
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6713
6713
  ephemeral?: boolean | undefined;
6714
6714
  error_code?: string | undefined;
@@ -6724,12 +6724,12 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6724
6724
  op: "truncate_after" | "replace" | "redo" | "branch";
6725
6725
  metadata?: Record<string, SerializableJsonValue> | undefined;
6726
6726
  reason?: string | undefined;
6727
- meta?: SerializableJsonValue | undefined;
6728
6727
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6729
6728
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6730
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6729
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6731
6730
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6732
6731
  ephemeral?: boolean | undefined;
6732
+ meta?: SerializableJsonValue | undefined;
6733
6733
  target_id?: string | undefined;
6734
6734
  } | {
6735
6735
  id: string;
@@ -6741,7 +6741,6 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6741
6741
  ephemeral: true;
6742
6742
  context_usage: {
6743
6743
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
6744
- confidence: "estimate" | "provider-estimate" | "actual";
6745
6744
  basis: "last_completed_llm_prompt";
6746
6745
  budget_model_id: string;
6747
6746
  used_tokens: number;
@@ -6754,13 +6753,14 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6754
6753
  input_budget_tokens: number;
6755
6754
  remaining_tokens: number;
6756
6755
  output_limit_tokens: number;
6756
+ confidence: "estimate" | "provider-estimate" | "actual";
6757
6757
  measured_at: number;
6758
6758
  served_model_id?: string | undefined;
6759
6759
  };
6760
6760
  metadata?: Record<string, SerializableJsonValue> | undefined;
6761
6761
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6762
6762
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6763
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6763
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6764
6764
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6765
6765
  user_message_id?: string | undefined;
6766
6766
  } | {
@@ -6769,20 +6769,19 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6769
6769
  timestamp: number;
6770
6770
  version: 1;
6771
6771
  outcome: "completed" | "failed" | "cancelled" | "awaiting_user";
6772
- duration_ms: number;
6773
6772
  conversation_id: string;
6774
6773
  turn_id: string;
6774
+ duration_ms: number;
6775
6775
  execution_id: string;
6776
6776
  metadata?: Record<string, SerializableJsonValue> | undefined;
6777
6777
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6778
6778
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6779
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6779
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6780
6780
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6781
6781
  ephemeral?: boolean | undefined;
6782
6782
  user_message_id?: string | undefined;
6783
6783
  context_usage?: {
6784
6784
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
6785
- confidence: "estimate" | "provider-estimate" | "actual";
6786
6785
  basis: "last_completed_llm_prompt";
6787
6786
  budget_model_id: string;
6788
6787
  used_tokens: number;
@@ -6795,6 +6794,7 @@ declare const validateRuntimeEvent: (event: unknown) => z.SafeParseReturnType<un
6795
6794
  input_budget_tokens: number;
6796
6795
  remaining_tokens: number;
6797
6796
  output_limit_tokens: number;
6797
+ confidence: "estimate" | "provider-estimate" | "actual";
6798
6798
  measured_at: number;
6799
6799
  served_model_id?: string | undefined;
6800
6800
  } | undefined;
@@ -6805,9 +6805,9 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
6805
6805
  content: string;
6806
6806
  timestamp: number;
6807
6807
  version: 1;
6808
- source: "system" | "user" | "editor";
6809
6808
  conversation_id: string;
6810
6809
  turn_id: string;
6810
+ source: "system" | "user" | "editor";
6811
6811
  metadata?: Record<string, SerializableJsonValue> | undefined;
6812
6812
  attachments?: {
6813
6813
  id: string;
@@ -6823,7 +6823,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
6823
6823
  }[] | undefined;
6824
6824
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6825
6825
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6826
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6826
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6827
6827
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6828
6828
  ephemeral?: boolean | undefined;
6829
6829
  raw_content?: string | undefined;
@@ -6837,13 +6837,13 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
6837
6837
  turn_id: string;
6838
6838
  is_complete: boolean;
6839
6839
  metadata?: Record<string, SerializableJsonValue> | undefined;
6840
- delta?: string | undefined;
6841
6840
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6842
6841
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6843
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6842
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6844
6843
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6845
6844
  ephemeral?: boolean | undefined;
6846
6845
  thought_message_id?: string | undefined;
6846
+ delta?: string | undefined;
6847
6847
  } | {
6848
6848
  id: string;
6849
6849
  status: "error" | "loading" | "success";
@@ -6852,10 +6852,11 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
6852
6852
  tool_name: string;
6853
6853
  timestamp: number;
6854
6854
  version: 1;
6855
- phase: "error" | "start" | "update" | "complete";
6856
6855
  conversation_id: string;
6857
6856
  turn_id: string;
6857
+ phase: "error" | "start" | "update" | "complete";
6858
6858
  payload?: {
6859
+ tool_calls?: SerializableJsonValue[] | undefined;
6859
6860
  provider_continuations?: {
6860
6861
  kind: string;
6861
6862
  schema_version: 2;
@@ -6868,7 +6869,6 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
6868
6869
  };
6869
6870
  payload: SerializableJsonValue;
6870
6871
  }[] | undefined;
6871
- tool_calls?: SerializableJsonValue[] | undefined;
6872
6872
  assistant_replay_parts?: ({
6873
6873
  type: "text";
6874
6874
  text: string;
@@ -6919,13 +6919,13 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
6919
6919
  } | undefined;
6920
6920
  args?: Record<string, SerializableJsonValue> | undefined;
6921
6921
  metadata?: Record<string, SerializableJsonValue> | undefined;
6922
- parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
6923
- meta?: Record<string, SerializableJsonValue> | undefined;
6924
6922
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6925
6923
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6926
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6924
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6927
6925
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6928
6926
  ephemeral?: boolean | undefined;
6927
+ parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
6928
+ meta?: Record<string, SerializableJsonValue> | undefined;
6929
6929
  } | {
6930
6930
  id: string;
6931
6931
  status: "error" | "loading" | "success";
@@ -6934,19 +6934,19 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
6934
6934
  tool_name: string;
6935
6935
  timestamp: number;
6936
6936
  version: 1;
6937
- phase: "error" | "start" | "update" | "complete";
6938
6937
  conversation_id: string;
6939
6938
  turn_id: string;
6939
+ phase: "error" | "start" | "update" | "complete";
6940
6940
  payload?: Record<string, SerializableJsonValue> | undefined;
6941
6941
  args?: Record<string, SerializableJsonValue> | undefined;
6942
6942
  metadata?: Record<string, SerializableJsonValue> | undefined;
6943
- parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
6944
- meta?: Record<string, SerializableJsonValue> | undefined;
6945
6943
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6946
6944
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6947
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6945
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6948
6946
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6949
6947
  ephemeral?: boolean | undefined;
6948
+ parent_tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
6949
+ meta?: Record<string, SerializableJsonValue> | undefined;
6950
6950
  } | {
6951
6951
  id: string;
6952
6952
  status: "error" | "success";
@@ -6973,33 +6973,33 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
6973
6973
  fileName?: string | undefined;
6974
6974
  label?: string | undefined;
6975
6975
  }[] | undefined;
6976
- duration_ms?: number | undefined;
6977
6976
  run_id?: (string & z.BRAND<"RunId">) | undefined;
6978
6977
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
6979
- lane?: "child" | "foreground" | "auxiliary" | undefined;
6978
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
6980
6979
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
6981
6980
  ephemeral?: boolean | undefined;
6982
6981
  error_code?: string | undefined;
6982
+ duration_ms?: number | undefined;
6983
6983
  } | {
6984
6984
  id: string;
6985
- kind: "history_summary" | "final_answer" | "tool_output" | "thought_delta" | "thought_complete" | "tool_call_decision" | "tool_process" | "final_answer_chunk";
6985
+ kind: "history_summary" | "final_answer" | "tool_output" | "tool_call_decision" | "tool_process" | "thought_delta" | "thought_complete" | "final_answer_chunk";
6986
6986
  type: "subrun_trace";
6987
6987
  timestamp: number;
6988
6988
  version: 1;
6989
- parent_tool_call_id: string & z.BRAND<"ToolCallId">;
6990
- subrun_id: string;
6991
- source_event_id: string;
6992
6989
  conversation_id: string;
6993
6990
  turn_id: string;
6994
6991
  ephemeral: true;
6992
+ parent_tool_call_id: string & z.BRAND<"ToolCallId">;
6993
+ subrun_id: string;
6994
+ source_event_id: string;
6995
6995
  status?: "error" | "loading" | "success" | undefined;
6996
- tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
6997
6996
  tool_calls?: {
6998
6997
  tool_call_id: string & z.BRAND<"ToolCallId">;
6999
6998
  tool_name: string;
7000
6999
  args: Record<string, SerializableJsonValue>;
7001
7000
  }[] | undefined;
7002
- completion_reason?: "terminal" | "tool_call" | "interrupted" | undefined;
7001
+ tool_call_id?: (string & z.BRAND<"ToolCallId">) | undefined;
7002
+ completion_reason?: "tool_call" | "terminal" | "interrupted" | undefined;
7003
7003
  tool_name?: string | undefined;
7004
7004
  args?: Record<string, SerializableJsonValue> | undefined;
7005
7005
  content?: string | undefined;
@@ -7016,23 +7016,23 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7016
7016
  fileName?: string | undefined;
7017
7017
  label?: string | undefined;
7018
7018
  }[] | undefined;
7019
- subrun_parent_id?: string | undefined;
7019
+ run_id?: (string & z.BRAND<"RunId">) | undefined;
7020
+ parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
7021
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
7022
+ visibility?: "none" | "conversation" | "parent-trace" | undefined;
7020
7023
  delta?: string | undefined;
7024
+ phase?: "error" | "start" | "update" | "complete" | undefined;
7025
+ meta?: Record<string, SerializableJsonValue> | undefined;
7026
+ duration_ms?: number | undefined;
7027
+ subrun_parent_id?: string | undefined;
7021
7028
  answer_id?: string | undefined;
7022
7029
  seq?: number | undefined;
7023
7030
  is_last?: boolean | undefined;
7024
- phase?: "error" | "start" | "update" | "complete" | undefined;
7025
7031
  output?: SerializableJsonValue | undefined;
7026
- duration_ms?: number | undefined;
7027
7032
  original_message_count?: number | undefined;
7028
7033
  compression_ratio?: number | undefined;
7029
7034
  included_old_summary?: boolean | undefined;
7030
7035
  replaced_message_ids?: string[] | undefined;
7031
- meta?: Record<string, SerializableJsonValue> | undefined;
7032
- run_id?: (string & z.BRAND<"RunId">) | undefined;
7033
- parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
7034
- lane?: "child" | "foreground" | "auxiliary" | undefined;
7035
- visibility?: "none" | "conversation" | "parent-trace" | undefined;
7036
7036
  } | {
7037
7037
  id: string;
7038
7038
  type: "requires_user_interaction";
@@ -7048,7 +7048,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7048
7048
  interaction_status: "pending";
7049
7049
  metadata?: Record<string, SerializableJsonValue> | undefined;
7050
7050
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
7051
- lane?: "child" | "foreground" | "auxiliary" | undefined;
7051
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
7052
7052
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
7053
7053
  ephemeral?: boolean | undefined;
7054
7054
  form?: SerializableJsonValue | undefined;
@@ -7066,7 +7066,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7066
7066
  envelopeId: string;
7067
7067
  ts: number;
7068
7068
  actor: {
7069
- kind: "system" | "user" | "tool" | "agent" | "host" | "model";
7069
+ kind: "system" | "user" | "tool" | "host" | "agent" | "model";
7070
7070
  id?: string | undefined;
7071
7071
  name?: string | undefined;
7072
7072
  };
@@ -7107,20 +7107,20 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7107
7107
  metadata?: Record<string, SerializableJsonValue> | undefined;
7108
7108
  run_id?: (string & z.BRAND<"RunId">) | undefined;
7109
7109
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
7110
- lane?: "child" | "foreground" | "auxiliary" | undefined;
7110
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
7111
7111
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
7112
7112
  ephemeral?: boolean | undefined;
7113
7113
  } | {
7114
7114
  id: string;
7115
7115
  type: "final_answer";
7116
- completion_reason: "terminal" | "tool_call" | "interrupted";
7116
+ completion_reason: "tool_call" | "terminal" | "interrupted";
7117
7117
  content: string;
7118
7118
  timestamp: number;
7119
7119
  version: 1;
7120
- answer_id: string;
7121
7120
  conversation_id: string;
7122
7121
  turn_id: string;
7123
7122
  is_complete: boolean;
7123
+ answer_id: string;
7124
7124
  provider_continuations?: {
7125
7125
  kind: string;
7126
7126
  schema_version: 2;
@@ -7180,29 +7180,29 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7180
7180
  }[] | undefined;
7181
7181
  })[] | undefined;
7182
7182
  metadata?: Record<string, SerializableJsonValue> | undefined;
7183
- meta?: Record<string, SerializableJsonValue> | undefined;
7184
7183
  run_id?: (string & z.BRAND<"RunId">) | undefined;
7185
7184
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
7186
- lane?: "child" | "foreground" | "auxiliary" | undefined;
7185
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
7187
7186
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
7188
7187
  ephemeral?: boolean | undefined;
7188
+ meta?: Record<string, SerializableJsonValue> | undefined;
7189
7189
  } | {
7190
7190
  id: string;
7191
7191
  type: "final_answer_chunk";
7192
7192
  content: string;
7193
7193
  timestamp: number;
7194
7194
  version: 1;
7195
- answer_id: string;
7196
- seq: number;
7197
7195
  conversation_id: string;
7198
7196
  turn_id: string;
7197
+ answer_id: string;
7198
+ seq: number;
7199
7199
  metadata?: Record<string, SerializableJsonValue> | undefined;
7200
- is_last?: boolean | undefined;
7201
7200
  run_id?: (string & z.BRAND<"RunId">) | undefined;
7202
7201
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
7203
- lane?: "child" | "foreground" | "auxiliary" | undefined;
7202
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
7204
7203
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
7205
7204
  ephemeral?: boolean | undefined;
7205
+ is_last?: boolean | undefined;
7206
7206
  } | {
7207
7207
  id: string;
7208
7208
  type: "final_answer_reset";
@@ -7211,12 +7211,12 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7211
7211
  conversation_id: string;
7212
7212
  turn_id: string;
7213
7213
  metadata?: Record<string, SerializableJsonValue> | undefined;
7214
- answer_id?: string | undefined;
7215
7214
  run_id?: (string & z.BRAND<"RunId">) | undefined;
7216
7215
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
7217
- lane?: "child" | "foreground" | "auxiliary" | undefined;
7216
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
7218
7217
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
7219
7218
  ephemeral?: boolean | undefined;
7219
+ answer_id?: string | undefined;
7220
7220
  thought_message_ids?: string[] | undefined;
7221
7221
  } | {
7222
7222
  id: string;
@@ -7224,19 +7224,19 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7224
7224
  content: string;
7225
7225
  timestamp: number;
7226
7226
  version: 1;
7227
- original_message_count: number;
7228
- replaced_message_ids: string[];
7229
7227
  conversation_id: string;
7230
7228
  turn_id: string;
7229
+ original_message_count: number;
7230
+ replaced_message_ids: string[];
7231
7231
  summary_seq: number;
7232
7232
  metadata?: Record<string, SerializableJsonValue> | undefined;
7233
- compression_ratio?: number | undefined;
7234
- included_old_summary?: boolean | undefined;
7235
7233
  run_id?: (string & z.BRAND<"RunId">) | undefined;
7236
7234
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
7237
- lane?: "child" | "foreground" | "auxiliary" | undefined;
7235
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
7238
7236
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
7239
7237
  ephemeral?: boolean | undefined;
7238
+ compression_ratio?: number | undefined;
7239
+ included_old_summary?: boolean | undefined;
7240
7240
  } | {
7241
7241
  id: string;
7242
7242
  type: "error";
@@ -7248,7 +7248,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7248
7248
  metadata?: Record<string, SerializableJsonValue> | undefined;
7249
7249
  run_id?: (string & z.BRAND<"RunId">) | undefined;
7250
7250
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
7251
- lane?: "child" | "foreground" | "auxiliary" | undefined;
7251
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
7252
7252
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
7253
7253
  ephemeral?: boolean | undefined;
7254
7254
  error_code?: string | undefined;
@@ -7264,12 +7264,12 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7264
7264
  op: "truncate_after" | "replace" | "redo" | "branch";
7265
7265
  metadata?: Record<string, SerializableJsonValue> | undefined;
7266
7266
  reason?: string | undefined;
7267
- meta?: SerializableJsonValue | undefined;
7268
7267
  run_id?: (string & z.BRAND<"RunId">) | undefined;
7269
7268
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
7270
- lane?: "child" | "foreground" | "auxiliary" | undefined;
7269
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
7271
7270
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
7272
7271
  ephemeral?: boolean | undefined;
7272
+ meta?: SerializableJsonValue | undefined;
7273
7273
  target_id?: string | undefined;
7274
7274
  } | {
7275
7275
  id: string;
@@ -7281,7 +7281,6 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7281
7281
  ephemeral: true;
7282
7282
  context_usage: {
7283
7283
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
7284
- confidence: "estimate" | "provider-estimate" | "actual";
7285
7284
  basis: "last_completed_llm_prompt";
7286
7285
  budget_model_id: string;
7287
7286
  used_tokens: number;
@@ -7294,13 +7293,14 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7294
7293
  input_budget_tokens: number;
7295
7294
  remaining_tokens: number;
7296
7295
  output_limit_tokens: number;
7296
+ confidence: "estimate" | "provider-estimate" | "actual";
7297
7297
  measured_at: number;
7298
7298
  served_model_id?: string | undefined;
7299
7299
  };
7300
7300
  metadata?: Record<string, SerializableJsonValue> | undefined;
7301
7301
  run_id?: (string & z.BRAND<"RunId">) | undefined;
7302
7302
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
7303
- lane?: "child" | "foreground" | "auxiliary" | undefined;
7303
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
7304
7304
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
7305
7305
  user_message_id?: string | undefined;
7306
7306
  } | {
@@ -7309,20 +7309,19 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7309
7309
  timestamp: number;
7310
7310
  version: 1;
7311
7311
  outcome: "completed" | "failed" | "cancelled" | "awaiting_user";
7312
- duration_ms: number;
7313
7312
  conversation_id: string;
7314
7313
  turn_id: string;
7314
+ duration_ms: number;
7315
7315
  execution_id: string;
7316
7316
  metadata?: Record<string, SerializableJsonValue> | undefined;
7317
7317
  run_id?: (string & z.BRAND<"RunId">) | undefined;
7318
7318
  parent_run_id?: (string & z.BRAND<"RunId">) | undefined;
7319
- lane?: "child" | "foreground" | "auxiliary" | undefined;
7319
+ lane?: "foreground" | "auxiliary" | "child" | undefined;
7320
7320
  visibility?: "none" | "conversation" | "parent-trace" | undefined;
7321
7321
  ephemeral?: boolean | undefined;
7322
7322
  user_message_id?: string | undefined;
7323
7323
  context_usage?: {
7324
7324
  source: "local-estimate" | "provider-preflight-count" | "provider-response-usage" | "host-supplied" | "test-fixture";
7325
- confidence: "estimate" | "provider-estimate" | "actual";
7326
7325
  basis: "last_completed_llm_prompt";
7327
7326
  budget_model_id: string;
7328
7327
  used_tokens: number;
@@ -7335,6 +7334,7 @@ declare const validateRuntimeEvents: (events: unknown[]) => z.SafeParseReturnTyp
7335
7334
  input_budget_tokens: number;
7336
7335
  remaining_tokens: number;
7337
7336
  output_limit_tokens: number;
7337
+ confidence: "estimate" | "provider-estimate" | "actual";
7338
7338
  measured_at: number;
7339
7339
  served_model_id?: string | undefined;
7340
7340
  } | undefined;
@@ -7384,8 +7384,5 @@ declare const createErrorEvent: (id: string, conversationId: string, turnId: str
7384
7384
  declare const createContextUsageSnapshotEvent: (id: string, conversationId: string, turnId: string, contextUsage: ContextUsageSnapshotEvent["context_usage"], options?: RuntimeEventCreatorOptions<ContextUsageSnapshotEvent, "context_usage">) => ContextUsageSnapshotEvent;
7385
7385
  declare const createRunExecutionMetricsEvent: (id: string, conversationId: string, turnId: string, options: RuntimeEventCreatorOptions<RunExecutionMetricsEvent> & Pick<RunExecutionMetricsEvent, "execution_id" | "outcome" | "duration_ms">) => RunExecutionMetricsEvent;
7386
7386
 
7387
- /** answer segment 被封口的业务原因。 */
7388
- declare const FinalAnswerCompletionReason: z.ZodEnum<["terminal", "tool_call", "interrupted"]>;
7389
- type FinalAnswerCompletionReason = z.infer<typeof FinalAnswerCompletionReason>;
7390
-
7391
- export { type AuditEnvelopeEvent as A, BaseEvent as B, type ContextUsageSnapshotEvent as C, createRunExecutionMetricsEvent as D, type ErrorEvent as E, type FinalAnswerChunkEvent as F, createSubRunTraceEvent as G, type HistorySummaryEvent as H, createThoughtEvent as I, createToolCallDecisionEvent as J, createToolOutputEvent as K, createToolProcessEvent as L, createUserInputEvent as M, isRoutedRuntimeEvent as N, parseRoutedRuntimeEvent as O, parseRuntimeEventRoutingIdentity as P, parseRuntimeEvents as Q, RuntimeEvent as R, type SubRunTraceEvent as S, type ToolOutputEventResult as T, type UserInputEvent as U, routeRuntimeEvent as V, validateRuntimeEvent as W, validateRuntimeEvents as X, type ControlEvent as a, FinalAnswerCompletionReason as b, type FinalAnswerEvent as c, type FinalAnswerResetEvent as d, type RequiresUserInteractionEvent as e, type RoutedRuntimeEvent as f, type RunExecutionMetricsEvent as g, RunExecutionOutcome as h, type RuntimeEventInput as i, RuntimeEventRoutingIdentity as j, RuntimeEventVisibility as k, RuntimeRunLane as l, RuntimeRunStatus as m, type ThoughtEvent as n, type ToolCallDecisionEvent as o, ToolCallDecisionPayload as p, type ToolOutputEvent as q, type ToolProcessEvent as r, createAuditEnvelopeEvent as s, createContextUsageSnapshotEvent as t, createErrorEvent as u, createFinalAnswerChunkEvent as v, createFinalAnswerEvent as w, createFinalAnswerResetEvent as x, createHistorySummaryEvent as y, createRequiresUserInteractionEvent as z };
7387
+ export { BaseEvent, RunExecutionOutcome, RuntimeEvent, RuntimeEventRoutingIdentity, RuntimeEventVisibility, RuntimeRunLane, RuntimeRunStatus, ToolCallDecisionPayload, createAuditEnvelopeEvent, createContextUsageSnapshotEvent, createErrorEvent, createFinalAnswerChunkEvent, createFinalAnswerEvent, createFinalAnswerResetEvent, createHistorySummaryEvent, createRequiresUserInteractionEvent, createRunExecutionMetricsEvent, createSubRunTraceEvent, createThoughtEvent, createToolCallDecisionEvent, createToolOutputEvent, createToolProcessEvent, createUserInputEvent, isRoutedRuntimeEvent, parseRoutedRuntimeEvent, parseRuntimeEventRoutingIdentity, parseRuntimeEvents, routeRuntimeEvent, validateRuntimeEvent, validateRuntimeEvents };
7388
+ export type { AuditEnvelopeEvent, ContextUsageSnapshotEvent, ControlEvent, ErrorEvent, FinalAnswerChunkEvent, FinalAnswerEvent, FinalAnswerResetEvent, HistorySummaryEvent, RequiresUserInteractionEvent, RoutedRuntimeEvent, RunExecutionMetricsEvent, RuntimeEventInput, SubRunTraceEvent, ThoughtEvent, ToolCallDecisionEvent, ToolOutputEvent, ToolOutputEventResult, ToolProcessEvent, UserInputEvent };