botmux 2.46.1 → 2.47.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (468) hide show
  1. package/README.en.md +5 -10
  2. package/README.md +5 -10
  3. package/dist/adapters/backend/tmux-backend.d.ts.map +1 -1
  4. package/dist/adapters/backend/tmux-backend.js +0 -11
  5. package/dist/adapters/backend/tmux-backend.js.map +1 -1
  6. package/dist/adapters/cli/claude-code.d.ts.map +1 -1
  7. package/dist/adapters/cli/claude-code.js +9 -36
  8. package/dist/adapters/cli/claude-code.js.map +1 -1
  9. package/dist/adapters/cli/coco.d.ts.map +1 -1
  10. package/dist/adapters/cli/coco.js +1 -26
  11. package/dist/adapters/cli/coco.js.map +1 -1
  12. package/dist/adapters/cli/codex.d.ts.map +1 -1
  13. package/dist/adapters/cli/codex.js +1 -6
  14. package/dist/adapters/cli/codex.js.map +1 -1
  15. package/dist/adapters/cli/cursor.d.ts.map +1 -1
  16. package/dist/adapters/cli/cursor.js +12 -58
  17. package/dist/adapters/cli/cursor.js.map +1 -1
  18. package/dist/adapters/cli/gemini.d.ts.map +1 -1
  19. package/dist/adapters/cli/gemini.js +1 -5
  20. package/dist/adapters/cli/gemini.js.map +1 -1
  21. package/dist/adapters/cli/opencode.d.ts.map +1 -1
  22. package/dist/adapters/cli/opencode.js +1 -19
  23. package/dist/adapters/cli/opencode.js.map +1 -1
  24. package/dist/adapters/cli/registry.d.ts +1 -5
  25. package/dist/adapters/cli/registry.d.ts.map +1 -1
  26. package/dist/adapters/cli/registry.js +2 -22
  27. package/dist/adapters/cli/registry.js.map +1 -1
  28. package/dist/adapters/cli/shared-hints.d.ts +1 -1
  29. package/dist/adapters/cli/shared-hints.d.ts.map +1 -1
  30. package/dist/adapters/cli/shared-hints.js +1 -2
  31. package/dist/adapters/cli/shared-hints.js.map +1 -1
  32. package/dist/adapters/cli/types.d.ts +2 -35
  33. package/dist/adapters/cli/types.d.ts.map +1 -1
  34. package/dist/bot-registry.d.ts +0 -59
  35. package/dist/bot-registry.d.ts.map +1 -1
  36. package/dist/bot-registry.js +0 -67
  37. package/dist/bot-registry.js.map +1 -1
  38. package/dist/cli/bots-list-output.d.ts +0 -8
  39. package/dist/cli/bots-list-output.d.ts.map +1 -1
  40. package/dist/cli/bots-list-output.js +0 -9
  41. package/dist/cli/bots-list-output.js.map +1 -1
  42. package/dist/cli.d.ts +1 -15
  43. package/dist/cli.d.ts.map +1 -1
  44. package/dist/cli.js +106 -603
  45. package/dist/cli.js.map +1 -1
  46. package/dist/config.d.ts +2 -11
  47. package/dist/config.d.ts.map +1 -1
  48. package/dist/config.js +4 -17
  49. package/dist/config.js.map +1 -1
  50. package/dist/core/command-handler.d.ts +0 -20
  51. package/dist/core/command-handler.d.ts.map +1 -1
  52. package/dist/core/command-handler.js +313 -762
  53. package/dist/core/command-handler.js.map +1 -1
  54. package/dist/core/dashboard-ipc-server.d.ts +0 -2
  55. package/dist/core/dashboard-ipc-server.d.ts.map +1 -1
  56. package/dist/core/dashboard-ipc-server.js +2 -222
  57. package/dist/core/dashboard-ipc-server.js.map +1 -1
  58. package/dist/core/role-resolver.d.ts +1 -17
  59. package/dist/core/role-resolver.d.ts.map +1 -1
  60. package/dist/core/role-resolver.js +10 -64
  61. package/dist/core/role-resolver.js.map +1 -1
  62. package/dist/core/session-discovery.d.ts.map +1 -1
  63. package/dist/core/session-discovery.js +5 -19
  64. package/dist/core/session-discovery.js.map +1 -1
  65. package/dist/core/session-manager.d.ts +1 -1
  66. package/dist/core/session-manager.d.ts.map +1 -1
  67. package/dist/core/session-manager.js +20 -37
  68. package/dist/core/session-manager.js.map +1 -1
  69. package/dist/core/types.d.ts +0 -5
  70. package/dist/core/types.d.ts.map +1 -1
  71. package/dist/core/types.js.map +1 -1
  72. package/dist/core/worker-pool.d.ts +0 -141
  73. package/dist/core/worker-pool.d.ts.map +1 -1
  74. package/dist/core/worker-pool.js +24 -543
  75. package/dist/core/worker-pool.js.map +1 -1
  76. package/dist/daemon.d.ts.map +1 -1
  77. package/dist/daemon.js +58 -213
  78. package/dist/daemon.js.map +1 -1
  79. package/dist/dashboard/auth.d.ts +1 -6
  80. package/dist/dashboard/auth.d.ts.map +1 -1
  81. package/dist/dashboard/auth.js +1 -9
  82. package/dist/dashboard/auth.js.map +1 -1
  83. package/dist/dashboard/web/app.js +0 -8
  84. package/dist/dashboard/web/app.js.map +1 -1
  85. package/dist/dashboard/web/bot-defaults.d.ts.map +1 -1
  86. package/dist/dashboard/web/bot-defaults.js +21 -205
  87. package/dist/dashboard/web/bot-defaults.js.map +1 -1
  88. package/dist/dashboard/web/i18n.d.ts.map +1 -1
  89. package/dist/dashboard/web/i18n.js +5 -43
  90. package/dist/dashboard/web/i18n.js.map +1 -1
  91. package/dist/dashboard/web/sessions.d.ts.map +1 -1
  92. package/dist/dashboard/web/sessions.js +0 -4
  93. package/dist/dashboard/web/sessions.js.map +1 -1
  94. package/dist/dashboard/web/workflows.js +3 -3
  95. package/dist/dashboard/web/workflows.js.map +1 -1
  96. package/dist/dashboard/workflow-api.d.ts +1 -8
  97. package/dist/dashboard/workflow-api.d.ts.map +1 -1
  98. package/dist/dashboard/workflow-api.js +4 -19
  99. package/dist/dashboard/workflow-api.js.map +1 -1
  100. package/dist/dashboard-web/app.js +375 -539
  101. package/dist/dashboard-web/index.html +1 -3
  102. package/dist/dashboard-web/style.css +0 -22
  103. package/dist/dashboard.js +2 -199
  104. package/dist/dashboard.js.map +1 -1
  105. package/dist/i18n/en.d.ts.map +1 -1
  106. package/dist/i18n/en.js +11 -104
  107. package/dist/i18n/en.js.map +1 -1
  108. package/dist/i18n/zh.d.ts.map +1 -1
  109. package/dist/i18n/zh.js +11 -104
  110. package/dist/i18n/zh.js.map +1 -1
  111. package/dist/im/lark/card-builder.d.ts +3 -108
  112. package/dist/im/lark/card-builder.d.ts.map +1 -1
  113. package/dist/im/lark/card-builder.js +50 -480
  114. package/dist/im/lark/card-builder.js.map +1 -1
  115. package/dist/im/lark/card-handler.d.ts.map +1 -1
  116. package/dist/im/lark/card-handler.js +18 -241
  117. package/dist/im/lark/card-handler.js.map +1 -1
  118. package/dist/im/lark/client.d.ts +0 -83
  119. package/dist/im/lark/client.d.ts.map +1 -1
  120. package/dist/im/lark/client.js +70 -286
  121. package/dist/im/lark/client.js.map +1 -1
  122. package/dist/im/lark/event-dispatcher.d.ts.map +1 -1
  123. package/dist/im/lark/event-dispatcher.js +4 -29
  124. package/dist/im/lark/event-dispatcher.js.map +1 -1
  125. package/dist/im/lark/grant-command.d.ts +1 -2
  126. package/dist/im/lark/grant-command.d.ts.map +1 -1
  127. package/dist/im/lark/grant-command.js +2 -3
  128. package/dist/im/lark/grant-command.js.map +1 -1
  129. package/dist/im/lark/identity-cache.d.ts.map +1 -1
  130. package/dist/im/lark/identity-cache.js +3 -3
  131. package/dist/im/lark/identity-cache.js.map +1 -1
  132. package/dist/im/lark/md-card.d.ts +2 -20
  133. package/dist/im/lark/md-card.d.ts.map +1 -1
  134. package/dist/im/lark/md-card.js +17 -49
  135. package/dist/im/lark/md-card.js.map +1 -1
  136. package/dist/im/lark/message-parser.d.ts.map +1 -1
  137. package/dist/im/lark/message-parser.js +31 -87
  138. package/dist/im/lark/message-parser.js.map +1 -1
  139. package/dist/im/lark/workflow-card-handler.d.ts +2 -2
  140. package/dist/im/lark/workflow-card-handler.d.ts.map +1 -1
  141. package/dist/im/lark/workflow-card-handler.js +1 -12
  142. package/dist/im/lark/workflow-card-handler.js.map +1 -1
  143. package/dist/im/lark/workflow-progress-card.d.ts.map +1 -1
  144. package/dist/im/lark/workflow-progress-card.js +0 -53
  145. package/dist/im/lark/workflow-progress-card.js.map +1 -1
  146. package/dist/services/codex-bridge-queue.d.ts +0 -1
  147. package/dist/services/codex-bridge-queue.d.ts.map +1 -1
  148. package/dist/services/codex-bridge-queue.js +0 -23
  149. package/dist/services/codex-bridge-queue.js.map +1 -1
  150. package/dist/services/codex-transcript.d.ts +0 -1
  151. package/dist/services/codex-transcript.d.ts.map +1 -1
  152. package/dist/services/codex-transcript.js.map +1 -1
  153. package/dist/services/feishu-task-client.d.ts +28 -0
  154. package/dist/services/feishu-task-client.d.ts.map +1 -0
  155. package/dist/services/feishu-task-client.js +123 -0
  156. package/dist/services/feishu-task-client.js.map +1 -0
  157. package/dist/services/grant-store.d.ts +2 -12
  158. package/dist/services/grant-store.d.ts.map +1 -1
  159. package/dist/services/grant-store.js +4 -51
  160. package/dist/services/grant-store.js.map +1 -1
  161. package/dist/services/group-creator.d.ts +0 -10
  162. package/dist/services/group-creator.d.ts.map +1 -1
  163. package/dist/services/group-creator.js +1 -26
  164. package/dist/services/group-creator.js.map +1 -1
  165. package/dist/services/groups-store.d.ts +0 -30
  166. package/dist/services/groups-store.d.ts.map +1 -1
  167. package/dist/services/groups-store.js +12 -85
  168. package/dist/services/groups-store.js.map +1 -1
  169. package/dist/services/project-scanner.d.ts +0 -10
  170. package/dist/services/project-scanner.d.ts.map +1 -1
  171. package/dist/services/project-scanner.js +0 -11
  172. package/dist/services/project-scanner.js.map +1 -1
  173. package/dist/services/session-store.js +1 -1
  174. package/dist/services/session-store.js.map +1 -1
  175. package/dist/services/task-store.d.ts +37 -0
  176. package/dist/services/task-store.d.ts.map +1 -0
  177. package/dist/services/task-store.js +115 -0
  178. package/dist/services/task-store.js.map +1 -0
  179. package/dist/setup/bot-config-editor.d.ts +1 -8
  180. package/dist/setup/bot-config-editor.d.ts.map +1 -1
  181. package/dist/setup/bot-config-editor.js +2 -20
  182. package/dist/setup/bot-config-editor.js.map +1 -1
  183. package/dist/setup/ensure-tmux.d.ts +22 -0
  184. package/dist/setup/ensure-tmux.d.ts.map +1 -1
  185. package/dist/setup/ensure-tmux.js +1 -25
  186. package/dist/setup/ensure-tmux.js.map +1 -1
  187. package/dist/setup/verify-permissions.d.ts.map +1 -1
  188. package/dist/setup/verify-permissions.js +1 -15
  189. package/dist/setup/verify-permissions.js.map +1 -1
  190. package/dist/skills/definitions.d.ts +0 -2
  191. package/dist/skills/definitions.d.ts.map +1 -1
  192. package/dist/skills/definitions.js +12 -178
  193. package/dist/skills/definitions.js.map +1 -1
  194. package/dist/skills/installer.d.ts +0 -34
  195. package/dist/skills/installer.d.ts.map +1 -1
  196. package/dist/skills/installer.js +2 -119
  197. package/dist/skills/installer.js.map +1 -1
  198. package/dist/types.d.ts +0 -25
  199. package/dist/types.d.ts.map +1 -1
  200. package/dist/utils/bot-routing.d.ts +0 -50
  201. package/dist/utils/bot-routing.d.ts.map +1 -1
  202. package/dist/utils/bot-routing.js +0 -83
  203. package/dist/utils/bot-routing.js.map +1 -1
  204. package/dist/utils/user-token.d.ts.map +1 -1
  205. package/dist/utils/user-token.js +2 -0
  206. package/dist/utils/user-token.js.map +1 -1
  207. package/dist/worker.js +27 -198
  208. package/dist/worker.js.map +1 -1
  209. package/dist/workflows/attempt-resume.d.ts.map +1 -1
  210. package/dist/workflows/attempt-resume.js +2 -2
  211. package/dist/workflows/attempt-resume.js.map +1 -1
  212. package/dist/workflows/definition.d.ts +9 -412
  213. package/dist/workflows/definition.d.ts.map +1 -1
  214. package/dist/workflows/definition.js +3 -238
  215. package/dist/workflows/definition.js.map +1 -1
  216. package/dist/workflows/events/payloads.d.ts +11 -114
  217. package/dist/workflows/events/payloads.d.ts.map +1 -1
  218. package/dist/workflows/events/payloads.js +0 -46
  219. package/dist/workflows/events/payloads.js.map +1 -1
  220. package/dist/workflows/events/replay.d.ts +0 -21
  221. package/dist/workflows/events/replay.d.ts.map +1 -1
  222. package/dist/workflows/events/replay.js +0 -103
  223. package/dist/workflows/events/replay.js.map +1 -1
  224. package/dist/workflows/events/schema.d.ts +1017 -1712
  225. package/dist/workflows/events/schema.d.ts.map +1 -1
  226. package/dist/workflows/events/schema.js +1 -37
  227. package/dist/workflows/events/schema.js.map +1 -1
  228. package/dist/workflows/events/types.d.ts +1 -5
  229. package/dist/workflows/events/types.d.ts.map +1 -1
  230. package/dist/workflows/loader.d.ts +0 -14
  231. package/dist/workflows/loader.d.ts.map +1 -1
  232. package/dist/workflows/loader.js +0 -27
  233. package/dist/workflows/loader.js.map +1 -1
  234. package/dist/workflows/loop.js +0 -58
  235. package/dist/workflows/loop.js.map +1 -1
  236. package/dist/workflows/ops-projection.d.ts +0 -58
  237. package/dist/workflows/ops-projection.d.ts.map +1 -1
  238. package/dist/workflows/ops-projection.js +0 -74
  239. package/dist/workflows/ops-projection.js.map +1 -1
  240. package/dist/workflows/orchestrator.d.ts +1 -65
  241. package/dist/workflows/orchestrator.d.ts.map +1 -1
  242. package/dist/workflows/orchestrator.js +74 -486
  243. package/dist/workflows/orchestrator.js.map +1 -1
  244. package/dist/workflows/output-binding.d.ts +1 -8
  245. package/dist/workflows/output-binding.d.ts.map +1 -1
  246. package/dist/workflows/output-binding.js +11 -75
  247. package/dist/workflows/output-binding.js.map +1 -1
  248. package/dist/workflows/runtime.d.ts +1 -1
  249. package/dist/workflows/runtime.d.ts.map +1 -1
  250. package/dist/workflows/runtime.js +4 -39
  251. package/dist/workflows/runtime.js.map +1 -1
  252. package/dist/workflows/wait.d.ts +2 -23
  253. package/dist/workflows/wait.d.ts.map +1 -1
  254. package/dist/workflows/wait.js +17 -39
  255. package/dist/workflows/wait.js.map +1 -1
  256. package/package.json +1 -1
  257. package/dist/adapters/adopt-route.d.ts +0 -63
  258. package/dist/adapters/adopt-route.d.ts.map +0 -1
  259. package/dist/adapters/adopt-route.js +0 -195
  260. package/dist/adapters/adopt-route.js.map +0 -1
  261. package/dist/adapters/cli/codex-app.d.ts +0 -4
  262. package/dist/adapters/cli/codex-app.d.ts.map +0 -1
  263. package/dist/adapters/cli/codex-app.js +0 -72
  264. package/dist/adapters/cli/codex-app.js.map +0 -1
  265. package/dist/adapters/cli/hermes.d.ts +0 -4
  266. package/dist/adapters/cli/hermes.d.ts.map +0 -1
  267. package/dist/adapters/cli/hermes.js +0 -40
  268. package/dist/adapters/cli/hermes.js.map +0 -1
  269. package/dist/adapters/cli/mira.d.ts +0 -4
  270. package/dist/adapters/cli/mira.d.ts.map +0 -1
  271. package/dist/adapters/cli/mira.js +0 -67
  272. package/dist/adapters/cli/mira.js.map +0 -1
  273. package/dist/adapters/cli/mtr.d.ts +0 -5
  274. package/dist/adapters/cli/mtr.d.ts.map +0 -1
  275. package/dist/adapters/cli/mtr.js +0 -62
  276. package/dist/adapters/cli/mtr.js.map +0 -1
  277. package/dist/adapters/hook-command.d.ts +0 -18
  278. package/dist/adapters/hook-command.d.ts.map +0 -1
  279. package/dist/adapters/hook-command.js +0 -38
  280. package/dist/adapters/hook-command.js.map +0 -1
  281. package/dist/adapters/hook-installer.d.ts +0 -14
  282. package/dist/adapters/hook-installer.d.ts.map +0 -1
  283. package/dist/adapters/hook-installer.js +0 -192
  284. package/dist/adapters/hook-installer.js.map +0 -1
  285. package/dist/codex-app-runner.d.ts +0 -3
  286. package/dist/codex-app-runner.d.ts.map +0 -1
  287. package/dist/codex-app-runner.js +0 -512
  288. package/dist/codex-app-runner.js.map +0 -1
  289. package/dist/core/ask-api.d.ts +0 -47
  290. package/dist/core/ask-api.d.ts.map +0 -1
  291. package/dist/core/ask-api.js +0 -139
  292. package/dist/core/ask-api.js.map +0 -1
  293. package/dist/core/ask-args.d.ts +0 -53
  294. package/dist/core/ask-args.d.ts.map +0 -1
  295. package/dist/core/ask-args.js +0 -122
  296. package/dist/core/ask-args.js.map +0 -1
  297. package/dist/core/ask-broker.d.ts +0 -98
  298. package/dist/core/ask-broker.d.ts.map +0 -1
  299. package/dist/core/ask-broker.js +0 -329
  300. package/dist/core/ask-broker.js.map +0 -1
  301. package/dist/core/ask-hook/claude-code.d.ts +0 -50
  302. package/dist/core/ask-hook/claude-code.d.ts.map +0 -1
  303. package/dist/core/ask-hook/claude-code.js +0 -145
  304. package/dist/core/ask-hook/claude-code.js.map +0 -1
  305. package/dist/core/ask-hook/codex.d.ts +0 -43
  306. package/dist/core/ask-hook/codex.d.ts.map +0 -1
  307. package/dist/core/ask-hook/codex.js +0 -69
  308. package/dist/core/ask-hook/codex.js.map +0 -1
  309. package/dist/core/ask-hook/opencode.d.ts +0 -41
  310. package/dist/core/ask-hook/opencode.d.ts.map +0 -1
  311. package/dist/core/ask-hook/opencode.js +0 -108
  312. package/dist/core/ask-hook/opencode.js.map +0 -1
  313. package/dist/core/ask-hook/registry.d.ts +0 -3
  314. package/dist/core/ask-hook/registry.d.ts.map +0 -1
  315. package/dist/core/ask-hook/registry.js +0 -12
  316. package/dist/core/ask-hook/registry.js.map +0 -1
  317. package/dist/core/ask-hook/types.d.ts +0 -26
  318. package/dist/core/ask-hook/types.d.ts.map +0 -1
  319. package/dist/core/ask-hook/types.js +0 -2
  320. package/dist/core/ask-hook/types.js.map +0 -1
  321. package/dist/core/ask-types.d.ts +0 -146
  322. package/dist/core/ask-types.d.ts.map +0 -1
  323. package/dist/core/ask-types.js +0 -18
  324. package/dist/core/ask-types.js.map +0 -1
  325. package/dist/core/trigger-session.d.ts +0 -9
  326. package/dist/core/trigger-session.d.ts.map +0 -1
  327. package/dist/core/trigger-session.js +0 -158
  328. package/dist/core/trigger-session.js.map +0 -1
  329. package/dist/dashboard/connector-api.d.ts +0 -3
  330. package/dist/dashboard/connector-api.d.ts.map +0 -1
  331. package/dist/dashboard/connector-api.js +0 -351
  332. package/dist/dashboard/connector-api.js.map +0 -1
  333. package/dist/dashboard/federated-group-core.d.ts +0 -54
  334. package/dist/dashboard/federated-group-core.d.ts.map +0 -1
  335. package/dist/dashboard/federated-group-core.js +0 -165
  336. package/dist/dashboard/federated-group-core.js.map +0 -1
  337. package/dist/dashboard/federation-api.d.ts +0 -42
  338. package/dist/dashboard/federation-api.d.ts.map +0 -1
  339. package/dist/dashboard/federation-api.js +0 -408
  340. package/dist/dashboard/federation-api.js.map +0 -1
  341. package/dist/dashboard/federation-spoke-api.d.ts +0 -76
  342. package/dist/dashboard/federation-spoke-api.d.ts.map +0 -1
  343. package/dist/dashboard/federation-spoke-api.js +0 -618
  344. package/dist/dashboard/federation-spoke-api.js.map +0 -1
  345. package/dist/dashboard/team-group.d.ts +0 -18
  346. package/dist/dashboard/team-group.d.ts.map +0 -1
  347. package/dist/dashboard/team-group.js +0 -7
  348. package/dist/dashboard/team-group.js.map +0 -1
  349. package/dist/dashboard/trigger-api.d.ts +0 -13
  350. package/dist/dashboard/trigger-api.d.ts.map +0 -1
  351. package/dist/dashboard/trigger-api.js +0 -77
  352. package/dist/dashboard/trigger-api.js.map +0 -1
  353. package/dist/dashboard/web/connectors.d.ts +0 -2
  354. package/dist/dashboard/web/connectors.d.ts.map +0 -1
  355. package/dist/dashboard/web/connectors.js +0 -187
  356. package/dist/dashboard/web/connectors.js.map +0 -1
  357. package/dist/dashboard/web/team-federation.d.ts +0 -3
  358. package/dist/dashboard/web/team-federation.d.ts.map +0 -1
  359. package/dist/dashboard/web/team-federation.js +0 -487
  360. package/dist/dashboard/web/team-federation.js.map +0 -1
  361. package/dist/dashboard/webhook-routes.d.ts +0 -19
  362. package/dist/dashboard/webhook-routes.d.ts.map +0 -1
  363. package/dist/dashboard/webhook-routes.js +0 -321
  364. package/dist/dashboard/webhook-routes.js.map +0 -1
  365. package/dist/im/lark/ask-card.d.ts +0 -55
  366. package/dist/im/lark/ask-card.d.ts.map +0 -1
  367. package/dist/im/lark/ask-card.js +0 -328
  368. package/dist/im/lark/ask-card.js.map +0 -1
  369. package/dist/mira-output.d.ts +0 -3
  370. package/dist/mira-output.d.ts.map +0 -1
  371. package/dist/mira-output.js +0 -136
  372. package/dist/mira-output.js.map +0 -1
  373. package/dist/mira-runner.d.ts +0 -3
  374. package/dist/mira-runner.d.ts.map +0 -1
  375. package/dist/mira-runner.js +0 -534
  376. package/dist/mira-runner.js.map +0 -1
  377. package/dist/services/bot-owner-store.d.ts +0 -28
  378. package/dist/services/bot-owner-store.d.ts.map +0 -1
  379. package/dist/services/bot-owner-store.js +0 -82
  380. package/dist/services/bot-owner-store.js.map +0 -1
  381. package/dist/services/bot-profile-store.d.ts +0 -16
  382. package/dist/services/bot-profile-store.d.ts.map +0 -1
  383. package/dist/services/bot-profile-store.js +0 -98
  384. package/dist/services/bot-profile-store.js.map +0 -1
  385. package/dist/services/brand-store.d.ts +0 -15
  386. package/dist/services/brand-store.d.ts.map +0 -1
  387. package/dist/services/brand-store.js +0 -47
  388. package/dist/services/brand-store.js.map +0 -1
  389. package/dist/services/card-prefs-store.d.ts +0 -20
  390. package/dist/services/card-prefs-store.d.ts.map +0 -1
  391. package/dist/services/card-prefs-store.js +0 -82
  392. package/dist/services/card-prefs-store.js.map +0 -1
  393. package/dist/services/connector-store.d.ts +0 -58
  394. package/dist/services/connector-store.d.ts.map +0 -1
  395. package/dist/services/connector-store.js +0 -79
  396. package/dist/services/connector-store.js.map +0 -1
  397. package/dist/services/deployment-identity.d.ts +0 -22
  398. package/dist/services/deployment-identity.d.ts.map +0 -1
  399. package/dist/services/deployment-identity.js +0 -67
  400. package/dist/services/deployment-identity.js.map +0 -1
  401. package/dist/services/federation-membership-store.d.ts +0 -23
  402. package/dist/services/federation-membership-store.d.ts.map +0 -1
  403. package/dist/services/federation-membership-store.js +0 -66
  404. package/dist/services/federation-membership-store.js.map +0 -1
  405. package/dist/services/federation-roster.d.ts +0 -54
  406. package/dist/services/federation-roster.d.ts.map +0 -1
  407. package/dist/services/federation-roster.js +0 -51
  408. package/dist/services/federation-roster.js.map +0 -1
  409. package/dist/services/federation-store.d.ts +0 -76
  410. package/dist/services/federation-store.d.ts.map +0 -1
  411. package/dist/services/federation-store.js +0 -133
  412. package/dist/services/federation-store.js.map +0 -1
  413. package/dist/services/hermes-transcript.d.ts +0 -7
  414. package/dist/services/hermes-transcript.d.ts.map +0 -1
  415. package/dist/services/hermes-transcript.js +0 -117
  416. package/dist/services/hermes-transcript.js.map +0 -1
  417. package/dist/services/invite-store.d.ts +0 -28
  418. package/dist/services/invite-store.d.ts.map +0 -1
  419. package/dist/services/invite-store.js +0 -85
  420. package/dist/services/invite-store.js.map +0 -1
  421. package/dist/services/pairing-store.d.ts +0 -47
  422. package/dist/services/pairing-store.d.ts.map +0 -1
  423. package/dist/services/pairing-store.js +0 -132
  424. package/dist/services/pairing-store.js.map +0 -1
  425. package/dist/services/relay-picker.d.ts +0 -22
  426. package/dist/services/relay-picker.d.ts.map +0 -1
  427. package/dist/services/relay-picker.js +0 -62
  428. package/dist/services/relay-picker.js.map +0 -1
  429. package/dist/services/send-policy.d.ts +0 -55
  430. package/dist/services/send-policy.d.ts.map +0 -1
  431. package/dist/services/send-policy.js +0 -47
  432. package/dist/services/send-policy.js.map +0 -1
  433. package/dist/services/team-roster.d.ts +0 -38
  434. package/dist/services/team-roster.d.ts.map +0 -1
  435. package/dist/services/team-roster.js +0 -82
  436. package/dist/services/team-roster.js.map +0 -1
  437. package/dist/services/team-store.d.ts +0 -54
  438. package/dist/services/team-store.d.ts.map +0 -1
  439. package/dist/services/team-store.js +0 -156
  440. package/dist/services/team-store.js.map +0 -1
  441. package/dist/services/trigger-log-store.d.ts +0 -46
  442. package/dist/services/trigger-log-store.d.ts.map +0 -1
  443. package/dist/services/trigger-log-store.js +0 -132
  444. package/dist/services/trigger-log-store.js.map +0 -1
  445. package/dist/services/trigger-types.d.ts +0 -57
  446. package/dist/services/trigger-types.d.ts.map +0 -1
  447. package/dist/services/trigger-types.js +0 -28
  448. package/dist/services/trigger-types.js.map +0 -1
  449. package/dist/services/webhook-key.d.ts +0 -16
  450. package/dist/services/webhook-key.d.ts.map +0 -1
  451. package/dist/services/webhook-key.js +0 -123
  452. package/dist/services/webhook-key.js.map +0 -1
  453. package/dist/services/webhook-lifecycle-extractors.d.ts +0 -15
  454. package/dist/services/webhook-lifecycle-extractors.d.ts.map +0 -1
  455. package/dist/services/webhook-lifecycle-extractors.js +0 -59
  456. package/dist/services/webhook-lifecycle-extractors.js.map +0 -1
  457. package/dist/services/webhook-lifecycle-store.d.ts +0 -45
  458. package/dist/services/webhook-lifecycle-store.d.ts.map +0 -1
  459. package/dist/services/webhook-lifecycle-store.js +0 -159
  460. package/dist/services/webhook-lifecycle-store.js.map +0 -1
  461. package/dist/utils/daemon-discovery.d.ts +0 -11
  462. package/dist/utils/daemon-discovery.d.ts.map +0 -1
  463. package/dist/utils/daemon-discovery.js +0 -59
  464. package/dist/utils/daemon-discovery.js.map +0 -1
  465. package/dist/workflows/trigger-from-envelope.d.ts +0 -13
  466. package/dist/workflows/trigger-from-envelope.d.ts.map +0 -1
  467. package/dist/workflows/trigger-from-envelope.js +0 -67
  468. package/dist/workflows/trigger-from-envelope.js.map +0 -1
@@ -111,8 +111,8 @@ export declare const RunCreatedEventSchema: z.ZodObject<{
111
111
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
112
112
  payloadHash: z.ZodOptional<z.ZodString>;
113
113
  }, "strip", z.ZodTypeAny, {
114
- type: "runCreated";
115
114
  runId: string;
115
+ type: "runCreated";
116
116
  schemaVersion: 1;
117
117
  eventId: string;
118
118
  payload: {
@@ -141,8 +141,8 @@ export declare const RunCreatedEventSchema: z.ZodObject<{
141
141
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
142
142
  payloadHash?: string | undefined;
143
143
  }, {
144
- type: "runCreated";
145
144
  runId: string;
145
+ type: "runCreated";
146
146
  schemaVersion: 1;
147
147
  eventId: string;
148
148
  payload: {
@@ -193,8 +193,8 @@ export declare const RunStartedEventSchema: z.ZodObject<{
193
193
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
194
194
  payloadHash: z.ZodOptional<z.ZodString>;
195
195
  }, "strip", z.ZodTypeAny, {
196
- type: "runStarted";
197
196
  runId: string;
197
+ type: "runStarted";
198
198
  schemaVersion: 1;
199
199
  eventId: string;
200
200
  payload: {} | {
@@ -206,8 +206,8 @@ export declare const RunStartedEventSchema: z.ZodObject<{
206
206
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
207
207
  payloadHash?: string | undefined;
208
208
  }, {
209
- type: "runStarted";
210
209
  runId: string;
210
+ type: "runStarted";
211
211
  schemaVersion: 1;
212
212
  eventId: string;
213
213
  payload: {} | {
@@ -277,8 +277,8 @@ export declare const RunSucceededEventSchema: z.ZodObject<{
277
277
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
278
278
  payloadHash: z.ZodOptional<z.ZodString>;
279
279
  }, "strip", z.ZodTypeAny, {
280
- type: "runSucceeded";
281
280
  runId: string;
281
+ type: "runSucceeded";
282
282
  schemaVersion: 1;
283
283
  eventId: string;
284
284
  payload: {
@@ -298,8 +298,8 @@ export declare const RunSucceededEventSchema: z.ZodObject<{
298
298
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
299
299
  payloadHash?: string | undefined;
300
300
  }, {
301
- type: "runSucceeded";
302
301
  runId: string;
302
+ type: "runSucceeded";
303
303
  schemaVersion: 1;
304
304
  eventId: string;
305
305
  payload: {
@@ -350,8 +350,8 @@ export declare const RunFailedEventSchema: z.ZodObject<{
350
350
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
351
351
  payloadHash: z.ZodOptional<z.ZodString>;
352
352
  }, "strip", z.ZodTypeAny, {
353
- type: "runFailed";
354
353
  runId: string;
354
+ type: "runFailed";
355
355
  schemaVersion: 1;
356
356
  eventId: string;
357
357
  payload: {
@@ -366,8 +366,8 @@ export declare const RunFailedEventSchema: z.ZodObject<{
366
366
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
367
367
  payloadHash?: string | undefined;
368
368
  }, {
369
- type: "runFailed";
370
369
  runId: string;
370
+ type: "runFailed";
371
371
  schemaVersion: 1;
372
372
  eventId: string;
373
373
  payload: {
@@ -410,8 +410,8 @@ export declare const RunCanceledEventSchema: z.ZodObject<{
410
410
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
411
411
  payloadHash: z.ZodOptional<z.ZodString>;
412
412
  }, "strip", z.ZodTypeAny, {
413
- type: "runCanceled";
414
413
  runId: string;
414
+ type: "runCanceled";
415
415
  schemaVersion: 1;
416
416
  eventId: string;
417
417
  payload: {
@@ -425,8 +425,8 @@ export declare const RunCanceledEventSchema: z.ZodObject<{
425
425
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
426
426
  payloadHash?: string | undefined;
427
427
  }, {
428
- type: "runCanceled";
429
428
  runId: string;
429
+ type: "runCanceled";
430
430
  schemaVersion: 1;
431
431
  eventId: string;
432
432
  payload: {
@@ -474,8 +474,8 @@ export declare const NodeWaitingEventSchema: z.ZodObject<{
474
474
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
475
475
  payloadHash: z.ZodOptional<z.ZodString>;
476
476
  }, "strip", z.ZodTypeAny, {
477
- type: "nodeWaiting";
478
477
  runId: string;
478
+ type: "nodeWaiting";
479
479
  schemaVersion: 1;
480
480
  eventId: string;
481
481
  payload: {
@@ -491,8 +491,8 @@ export declare const NodeWaitingEventSchema: z.ZodObject<{
491
491
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
492
492
  payloadHash?: string | undefined;
493
493
  }, {
494
- type: "nodeWaiting";
495
494
  runId: string;
495
+ type: "nodeWaiting";
496
496
  schemaVersion: 1;
497
497
  eventId: string;
498
498
  payload: {
@@ -542,8 +542,8 @@ export declare const NodeRetryingEventSchema: z.ZodObject<{
542
542
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
543
543
  payloadHash: z.ZodOptional<z.ZodString>;
544
544
  }, "strip", z.ZodTypeAny, {
545
- type: "nodeRetrying";
546
545
  runId: string;
546
+ type: "nodeRetrying";
547
547
  schemaVersion: 1;
548
548
  eventId: string;
549
549
  payload: {
@@ -559,8 +559,8 @@ export declare const NodeRetryingEventSchema: z.ZodObject<{
559
559
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
560
560
  payloadHash?: string | undefined;
561
561
  }, {
562
- type: "nodeRetrying";
563
562
  runId: string;
563
+ type: "nodeRetrying";
564
564
  schemaVersion: 1;
565
565
  eventId: string;
566
566
  payload: {
@@ -607,8 +607,8 @@ export declare const NodeSucceededEventSchema: z.ZodObject<{
607
607
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
608
608
  payloadHash: z.ZodOptional<z.ZodString>;
609
609
  }, "strip", z.ZodTypeAny, {
610
- type: "nodeSucceeded";
611
610
  runId: string;
611
+ type: "nodeSucceeded";
612
612
  schemaVersion: 1;
613
613
  eventId: string;
614
614
  payload: {
@@ -623,8 +623,8 @@ export declare const NodeSucceededEventSchema: z.ZodObject<{
623
623
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
624
624
  payloadHash?: string | undefined;
625
625
  }, {
626
- type: "nodeSucceeded";
627
626
  runId: string;
627
+ type: "nodeSucceeded";
628
628
  schemaVersion: 1;
629
629
  eventId: string;
630
630
  payload: {
@@ -673,8 +673,8 @@ export declare const NodeFailedEventSchema: z.ZodObject<{
673
673
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
674
674
  payloadHash: z.ZodOptional<z.ZodString>;
675
675
  }, "strip", z.ZodTypeAny, {
676
- type: "nodeFailed";
677
676
  runId: string;
677
+ type: "nodeFailed";
678
678
  schemaVersion: 1;
679
679
  eventId: string;
680
680
  payload: {
@@ -690,8 +690,8 @@ export declare const NodeFailedEventSchema: z.ZodObject<{
690
690
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
691
691
  payloadHash?: string | undefined;
692
692
  }, {
693
- type: "nodeFailed";
694
693
  runId: string;
694
+ type: "nodeFailed";
695
695
  schemaVersion: 1;
696
696
  eventId: string;
697
697
  payload: {
@@ -738,8 +738,8 @@ export declare const NodeSkippedEventSchema: z.ZodObject<{
738
738
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
739
739
  payloadHash: z.ZodOptional<z.ZodString>;
740
740
  }, "strip", z.ZodTypeAny, {
741
- type: "nodeSkipped";
742
741
  runId: string;
742
+ type: "nodeSkipped";
743
743
  schemaVersion: 1;
744
744
  eventId: string;
745
745
  payload: {
@@ -754,8 +754,8 @@ export declare const NodeSkippedEventSchema: z.ZodObject<{
754
754
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
755
755
  payloadHash?: string | undefined;
756
756
  }, {
757
- type: "nodeSkipped";
758
757
  runId: string;
758
+ type: "nodeSkipped";
759
759
  schemaVersion: 1;
760
760
  eventId: string;
761
761
  payload: {
@@ -801,8 +801,8 @@ export declare const NodeCanceledEventSchema: z.ZodObject<{
801
801
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
802
802
  payloadHash: z.ZodOptional<z.ZodString>;
803
803
  }, "strip", z.ZodTypeAny, {
804
- type: "nodeCanceled";
805
804
  runId: string;
805
+ type: "nodeCanceled";
806
806
  schemaVersion: 1;
807
807
  eventId: string;
808
808
  payload: {
@@ -817,8 +817,8 @@ export declare const NodeCanceledEventSchema: z.ZodObject<{
817
817
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
818
818
  payloadHash?: string | undefined;
819
819
  }, {
820
- type: "nodeCanceled";
821
820
  runId: string;
821
+ type: "nodeCanceled";
822
822
  schemaVersion: 1;
823
823
  eventId: string;
824
824
  payload: {
@@ -867,8 +867,8 @@ export declare const ActivityRunningEventSchema: z.ZodObject<{
867
867
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
868
868
  payloadHash: z.ZodOptional<z.ZodString>;
869
869
  }, "strip", z.ZodTypeAny, {
870
- type: "activityRunning";
871
870
  runId: string;
871
+ type: "activityRunning";
872
872
  schemaVersion: 1;
873
873
  eventId: string;
874
874
  payload: {
@@ -884,8 +884,8 @@ export declare const ActivityRunningEventSchema: z.ZodObject<{
884
884
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
885
885
  payloadHash?: string | undefined;
886
886
  }, {
887
- type: "activityRunning";
888
887
  runId: string;
888
+ type: "activityRunning";
889
889
  schemaVersion: 1;
890
890
  eventId: string;
891
891
  payload: {
@@ -932,8 +932,8 @@ export declare const ActivityWaitingEventSchema: z.ZodObject<{
932
932
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
933
933
  payloadHash: z.ZodOptional<z.ZodString>;
934
934
  }, "strip", z.ZodTypeAny, {
935
- type: "activityWaiting";
936
935
  runId: string;
936
+ type: "activityWaiting";
937
937
  schemaVersion: 1;
938
938
  eventId: string;
939
939
  payload: {
@@ -948,8 +948,8 @@ export declare const ActivityWaitingEventSchema: z.ZodObject<{
948
948
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
949
949
  payloadHash?: string | undefined;
950
950
  }, {
951
- type: "activityWaiting";
952
951
  runId: string;
952
+ type: "activityWaiting";
953
953
  schemaVersion: 1;
954
954
  eventId: string;
955
955
  payload: {
@@ -1004,8 +1004,8 @@ export declare const ActivityTimedOutEventSchema: z.ZodObject<{
1004
1004
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1005
1005
  payloadHash: z.ZodOptional<z.ZodString>;
1006
1006
  }, "strip", z.ZodTypeAny, {
1007
- type: "activityTimedOut";
1008
1007
  runId: string;
1008
+ type: "activityTimedOut";
1009
1009
  schemaVersion: 1;
1010
1010
  eventId: string;
1011
1011
  payload: {
@@ -1023,8 +1023,8 @@ export declare const ActivityTimedOutEventSchema: z.ZodObject<{
1023
1023
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1024
1024
  payloadHash?: string | undefined;
1025
1025
  }, {
1026
- type: "activityTimedOut";
1027
1026
  runId: string;
1027
+ type: "activityTimedOut";
1028
1028
  schemaVersion: 1;
1029
1029
  eventId: string;
1030
1030
  payload: {
@@ -1042,83 +1042,23 @@ export declare const ActivityTimedOutEventSchema: z.ZodObject<{
1042
1042
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1043
1043
  payloadHash?: string | undefined;
1044
1044
  }>;
1045
- export declare const LoopStartedEventSchema: z.ZodObject<{
1046
- type: z.ZodLiteral<"loopStarted">;
1047
- payload: z.ZodUnion<[z.ZodObject<{
1048
- loopId: z.ZodString;
1049
- maxIterations: z.ZodNumber;
1050
- }, "strip", z.ZodTypeAny, {
1051
- loopId: string;
1052
- maxIterations: number;
1053
- }, {
1054
- loopId: string;
1055
- maxIterations: number;
1056
- }>, z.ZodObject<{
1057
- ref: z.ZodString;
1058
- bytes: z.ZodNumber;
1059
- schemaVersion: z.ZodNumber;
1060
- }, "strip", z.ZodTypeAny, {
1061
- ref: string;
1062
- bytes: number;
1063
- schemaVersion: number;
1064
- }, {
1065
- ref: string;
1066
- bytes: number;
1067
- schemaVersion: number;
1068
- }>]>;
1069
- eventId: z.ZodString;
1070
- runId: z.ZodString;
1071
- timestamp: z.ZodNumber;
1072
- schemaVersion: z.ZodLiteral<1>;
1073
- actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1074
- payloadHash: z.ZodOptional<z.ZodString>;
1075
- }, "strip", z.ZodTypeAny, {
1076
- type: "loopStarted";
1077
- runId: string;
1078
- schemaVersion: 1;
1079
- eventId: string;
1080
- payload: {
1081
- loopId: string;
1082
- maxIterations: number;
1083
- } | {
1084
- ref: string;
1085
- bytes: number;
1086
- schemaVersion: number;
1087
- };
1088
- timestamp: number;
1089
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1090
- payloadHash?: string | undefined;
1091
- }, {
1092
- type: "loopStarted";
1093
- runId: string;
1094
- schemaVersion: 1;
1095
- eventId: string;
1096
- payload: {
1097
- loopId: string;
1098
- maxIterations: number;
1099
- } | {
1100
- ref: string;
1101
- bytes: number;
1102
- schemaVersion: number;
1103
- };
1104
- timestamp: number;
1105
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1106
- payloadHash?: string | undefined;
1107
- }>;
1108
- export declare const LoopIterationStartedEventSchema: z.ZodObject<{
1109
- type: z.ZodLiteral<"loopIterationStarted">;
1045
+ export declare const ConditionEvaluatedEventSchema: z.ZodObject<{
1046
+ type: z.ZodLiteral<"conditionEvaluated">;
1110
1047
  payload: z.ZodUnion<[z.ZodObject<{
1111
- loopId: z.ZodString;
1112
- iteration: z.ZodNumber;
1113
- prevResolution: z.ZodEnum<["initial", "rejected"]>;
1048
+ nodeId: z.ZodString;
1049
+ conditionExpr: z.ZodString;
1050
+ resultTrue: z.ZodBoolean;
1051
+ evaluatedInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1114
1052
  }, "strip", z.ZodTypeAny, {
1115
- loopId: string;
1116
- iteration: number;
1117
- prevResolution: "rejected" | "initial";
1053
+ nodeId: string;
1054
+ conditionExpr: string;
1055
+ resultTrue: boolean;
1056
+ evaluatedInputs?: Record<string, unknown> | undefined;
1118
1057
  }, {
1119
- loopId: string;
1120
- iteration: number;
1121
- prevResolution: "rejected" | "initial";
1058
+ nodeId: string;
1059
+ conditionExpr: string;
1060
+ resultTrue: boolean;
1061
+ evaluatedInputs?: Record<string, unknown> | undefined;
1122
1062
  }>, z.ZodObject<{
1123
1063
  ref: z.ZodString;
1124
1064
  bytes: z.ZodNumber;
@@ -1139,14 +1079,15 @@ export declare const LoopIterationStartedEventSchema: z.ZodObject<{
1139
1079
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1140
1080
  payloadHash: z.ZodOptional<z.ZodString>;
1141
1081
  }, "strip", z.ZodTypeAny, {
1142
- type: "loopIterationStarted";
1143
1082
  runId: string;
1083
+ type: "conditionEvaluated";
1144
1084
  schemaVersion: 1;
1145
1085
  eventId: string;
1146
1086
  payload: {
1147
- loopId: string;
1148
- iteration: number;
1149
- prevResolution: "rejected" | "initial";
1087
+ nodeId: string;
1088
+ conditionExpr: string;
1089
+ resultTrue: boolean;
1090
+ evaluatedInputs?: Record<string, unknown> | undefined;
1150
1091
  } | {
1151
1092
  ref: string;
1152
1093
  bytes: number;
@@ -1156,14 +1097,15 @@ export declare const LoopIterationStartedEventSchema: z.ZodObject<{
1156
1097
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1157
1098
  payloadHash?: string | undefined;
1158
1099
  }, {
1159
- type: "loopIterationStarted";
1160
1100
  runId: string;
1101
+ type: "conditionEvaluated";
1161
1102
  schemaVersion: 1;
1162
1103
  eventId: string;
1163
1104
  payload: {
1164
- loopId: string;
1165
- iteration: number;
1166
- prevResolution: "rejected" | "initial";
1105
+ nodeId: string;
1106
+ conditionExpr: string;
1107
+ resultTrue: boolean;
1108
+ evaluatedInputs?: Record<string, unknown> | undefined;
1167
1109
  } | {
1168
1110
  ref: string;
1169
1111
  bytes: number;
@@ -1173,35 +1115,26 @@ export declare const LoopIterationStartedEventSchema: z.ZodObject<{
1173
1115
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1174
1116
  payloadHash?: string | undefined;
1175
1117
  }>;
1176
- export declare const LoopIterationFinishedEventSchema: z.ZodObject<{
1177
- type: z.ZodLiteral<"loopIterationFinished">;
1118
+ export declare const LeaseSignedEventSchema: z.ZodObject<{
1119
+ type: z.ZodLiteral<"leaseSigned">;
1178
1120
  payload: z.ZodUnion<[z.ZodObject<{
1179
- loopId: z.ZodString;
1180
- iteration: z.ZodNumber;
1181
- resolution: z.ZodEnum<["approved", "rejected"]>;
1182
- decisionActivityId: z.ZodString;
1183
- waitResolvedEventId: z.ZodString;
1184
- by: z.ZodString;
1185
- comment: z.ZodOptional<z.ZodString>;
1186
- timedOut: z.ZodOptional<z.ZodBoolean>;
1121
+ activityId: z.ZodString;
1122
+ attemptId: z.ZodString;
1123
+ leaseId: z.ZodString;
1124
+ timeoutMs: z.ZodNumber;
1125
+ maxOutputBytes: z.ZodNumber;
1187
1126
  }, "strip", z.ZodTypeAny, {
1188
- loopId: string;
1189
- iteration: number;
1190
- resolution: "approved" | "rejected";
1191
- decisionActivityId: string;
1192
- waitResolvedEventId: string;
1193
- by: string;
1194
- timedOut?: boolean | undefined;
1195
- comment?: string | undefined;
1127
+ attemptId: string;
1128
+ activityId: string;
1129
+ leaseId: string;
1130
+ timeoutMs: number;
1131
+ maxOutputBytes: number;
1196
1132
  }, {
1197
- loopId: string;
1198
- iteration: number;
1199
- resolution: "approved" | "rejected";
1200
- decisionActivityId: string;
1201
- waitResolvedEventId: string;
1202
- by: string;
1203
- timedOut?: boolean | undefined;
1204
- comment?: string | undefined;
1133
+ attemptId: string;
1134
+ activityId: string;
1135
+ leaseId: string;
1136
+ timeoutMs: number;
1137
+ maxOutputBytes: number;
1205
1138
  }>, z.ZodObject<{
1206
1139
  ref: z.ZodString;
1207
1140
  bytes: z.ZodNumber;
@@ -1222,19 +1155,16 @@ export declare const LoopIterationFinishedEventSchema: z.ZodObject<{
1222
1155
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1223
1156
  payloadHash: z.ZodOptional<z.ZodString>;
1224
1157
  }, "strip", z.ZodTypeAny, {
1225
- type: "loopIterationFinished";
1226
1158
  runId: string;
1159
+ type: "leaseSigned";
1227
1160
  schemaVersion: 1;
1228
1161
  eventId: string;
1229
1162
  payload: {
1230
- loopId: string;
1231
- iteration: number;
1232
- resolution: "approved" | "rejected";
1233
- decisionActivityId: string;
1234
- waitResolvedEventId: string;
1235
- by: string;
1236
- timedOut?: boolean | undefined;
1237
- comment?: string | undefined;
1163
+ attemptId: string;
1164
+ activityId: string;
1165
+ leaseId: string;
1166
+ timeoutMs: number;
1167
+ maxOutputBytes: number;
1238
1168
  } | {
1239
1169
  ref: string;
1240
1170
  bytes: number;
@@ -1244,19 +1174,16 @@ export declare const LoopIterationFinishedEventSchema: z.ZodObject<{
1244
1174
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1245
1175
  payloadHash?: string | undefined;
1246
1176
  }, {
1247
- type: "loopIterationFinished";
1248
1177
  runId: string;
1178
+ type: "leaseSigned";
1249
1179
  schemaVersion: 1;
1250
1180
  eventId: string;
1251
1181
  payload: {
1252
- loopId: string;
1253
- iteration: number;
1254
- resolution: "approved" | "rejected";
1255
- decisionActivityId: string;
1256
- waitResolvedEventId: string;
1257
- by: string;
1258
- timedOut?: boolean | undefined;
1259
- comment?: string | undefined;
1182
+ attemptId: string;
1183
+ activityId: string;
1184
+ leaseId: string;
1185
+ timeoutMs: number;
1186
+ maxOutputBytes: number;
1260
1187
  } | {
1261
1188
  ref: string;
1262
1189
  bytes: number;
@@ -1266,13 +1193,14 @@ export declare const LoopIterationFinishedEventSchema: z.ZodObject<{
1266
1193
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1267
1194
  payloadHash?: string | undefined;
1268
1195
  }>;
1269
- export declare const LoopFinishedEventSchema: z.ZodObject<{
1270
- type: z.ZodLiteral<"loopFinished">;
1196
+ export declare const AttemptCreatedEventSchema: z.ZodObject<{
1197
+ type: z.ZodLiteral<"attemptCreated">;
1271
1198
  payload: z.ZodUnion<[z.ZodObject<{
1272
- loopId: z.ZodString;
1273
- finalIteration: z.ZodNumber;
1274
- resolution: z.ZodEnum<["approved", "max-iterations-exceeded", "body-failed", "cancelled", "timeout"]>;
1275
- outputRef: z.ZodOptional<z.ZodObject<{
1199
+ nodeId: z.ZodString;
1200
+ activityId: z.ZodString;
1201
+ attemptId: z.ZodString;
1202
+ attemptNumber: z.ZodNumber;
1203
+ inputRef: z.ZodObject<{
1276
1204
  outputHash: z.ZodString;
1277
1205
  outputPath: z.ZodOptional<z.ZodString>;
1278
1206
  outputBytes: z.ZodNumber;
@@ -1290,35 +1218,31 @@ export declare const LoopFinishedEventSchema: z.ZodObject<{
1290
1218
  outputSchemaVersion: number;
1291
1219
  outputPath?: string | undefined;
1292
1220
  contentType?: string | undefined;
1293
- }>>;
1294
- errorCode: z.ZodOptional<z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog", "LoopMaxIterationsExceeded", "LoopBodyFailed"]>>;
1295
- errorClass: z.ZodOptional<z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>>;
1221
+ }>;
1296
1222
  }, "strip", z.ZodTypeAny, {
1297
- loopId: string;
1298
- resolution: "timeout" | "approved" | "max-iterations-exceeded" | "body-failed" | "cancelled";
1299
- finalIteration: number;
1300
- errorCode?: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed" | undefined;
1301
- errorClass?: "retryable" | "fatal" | "userFault" | "manual" | undefined;
1302
- outputRef?: {
1223
+ nodeId: string;
1224
+ attemptId: string;
1225
+ activityId: string;
1226
+ inputRef: {
1303
1227
  outputHash: string;
1304
1228
  outputBytes: number;
1305
1229
  outputSchemaVersion: number;
1306
1230
  outputPath?: string | undefined;
1307
1231
  contentType?: string | undefined;
1308
- } | undefined;
1232
+ };
1233
+ attemptNumber: number;
1309
1234
  }, {
1310
- loopId: string;
1311
- resolution: "timeout" | "approved" | "max-iterations-exceeded" | "body-failed" | "cancelled";
1312
- finalIteration: number;
1313
- errorCode?: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed" | undefined;
1314
- errorClass?: "retryable" | "fatal" | "userFault" | "manual" | undefined;
1315
- outputRef?: {
1235
+ nodeId: string;
1236
+ attemptId: string;
1237
+ activityId: string;
1238
+ inputRef: {
1316
1239
  outputHash: string;
1317
1240
  outputBytes: number;
1318
1241
  outputSchemaVersion: number;
1319
1242
  outputPath?: string | undefined;
1320
1243
  contentType?: string | undefined;
1321
- } | undefined;
1244
+ };
1245
+ attemptNumber: number;
1322
1246
  }>, z.ZodObject<{
1323
1247
  ref: z.ZodString;
1324
1248
  bytes: z.ZodNumber;
@@ -1339,23 +1263,22 @@ export declare const LoopFinishedEventSchema: z.ZodObject<{
1339
1263
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1340
1264
  payloadHash: z.ZodOptional<z.ZodString>;
1341
1265
  }, "strip", z.ZodTypeAny, {
1342
- type: "loopFinished";
1343
1266
  runId: string;
1267
+ type: "attemptCreated";
1344
1268
  schemaVersion: 1;
1345
1269
  eventId: string;
1346
1270
  payload: {
1347
- loopId: string;
1348
- resolution: "timeout" | "approved" | "max-iterations-exceeded" | "body-failed" | "cancelled";
1349
- finalIteration: number;
1350
- errorCode?: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed" | undefined;
1351
- errorClass?: "retryable" | "fatal" | "userFault" | "manual" | undefined;
1352
- outputRef?: {
1271
+ nodeId: string;
1272
+ attemptId: string;
1273
+ activityId: string;
1274
+ inputRef: {
1353
1275
  outputHash: string;
1354
1276
  outputBytes: number;
1355
1277
  outputSchemaVersion: number;
1356
1278
  outputPath?: string | undefined;
1357
1279
  contentType?: string | undefined;
1358
- } | undefined;
1280
+ };
1281
+ attemptNumber: number;
1359
1282
  } | {
1360
1283
  ref: string;
1361
1284
  bytes: number;
@@ -1365,23 +1288,22 @@ export declare const LoopFinishedEventSchema: z.ZodObject<{
1365
1288
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1366
1289
  payloadHash?: string | undefined;
1367
1290
  }, {
1368
- type: "loopFinished";
1369
1291
  runId: string;
1292
+ type: "attemptCreated";
1370
1293
  schemaVersion: 1;
1371
1294
  eventId: string;
1372
1295
  payload: {
1373
- loopId: string;
1374
- resolution: "timeout" | "approved" | "max-iterations-exceeded" | "body-failed" | "cancelled";
1375
- finalIteration: number;
1376
- errorCode?: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed" | undefined;
1377
- errorClass?: "retryable" | "fatal" | "userFault" | "manual" | undefined;
1378
- outputRef?: {
1296
+ nodeId: string;
1297
+ attemptId: string;
1298
+ activityId: string;
1299
+ inputRef: {
1379
1300
  outputHash: string;
1380
1301
  outputBytes: number;
1381
1302
  outputSchemaVersion: number;
1382
1303
  outputPath?: string | undefined;
1383
1304
  contentType?: string | undefined;
1384
- } | undefined;
1305
+ };
1306
+ attemptNumber: number;
1385
1307
  } | {
1386
1308
  ref: string;
1387
1309
  bytes: number;
@@ -1391,23 +1313,48 @@ export declare const LoopFinishedEventSchema: z.ZodObject<{
1391
1313
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1392
1314
  payloadHash?: string | undefined;
1393
1315
  }>;
1394
- export declare const ConditionEvaluatedEventSchema: z.ZodObject<{
1395
- type: z.ZodLiteral<"conditionEvaluated">;
1316
+ export declare const BackoffScheduledEventSchema: z.ZodObject<{
1317
+ type: z.ZodLiteral<"backoffScheduled">;
1396
1318
  payload: z.ZodUnion<[z.ZodObject<{
1397
1319
  nodeId: z.ZodString;
1398
- conditionExpr: z.ZodString;
1399
- resultTrue: z.ZodBoolean;
1400
- evaluatedInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1320
+ lastAttemptId: z.ZodString;
1321
+ nextAttemptAt: z.ZodNumber;
1322
+ backoffPolicy: z.ZodObject<{
1323
+ kind: z.ZodEnum<["fixed", "exponential"]>;
1324
+ baseMs: z.ZodNumber;
1325
+ factor: z.ZodOptional<z.ZodNumber>;
1326
+ jitter: z.ZodOptional<z.ZodBoolean>;
1327
+ }, "strip", z.ZodTypeAny, {
1328
+ kind: "fixed" | "exponential";
1329
+ baseMs: number;
1330
+ factor?: number | undefined;
1331
+ jitter?: boolean | undefined;
1332
+ }, {
1333
+ kind: "fixed" | "exponential";
1334
+ baseMs: number;
1335
+ factor?: number | undefined;
1336
+ jitter?: boolean | undefined;
1337
+ }>;
1401
1338
  }, "strip", z.ZodTypeAny, {
1402
1339
  nodeId: string;
1403
- conditionExpr: string;
1404
- resultTrue: boolean;
1405
- evaluatedInputs?: Record<string, unknown> | undefined;
1340
+ lastAttemptId: string;
1341
+ nextAttemptAt: number;
1342
+ backoffPolicy: {
1343
+ kind: "fixed" | "exponential";
1344
+ baseMs: number;
1345
+ factor?: number | undefined;
1346
+ jitter?: boolean | undefined;
1347
+ };
1406
1348
  }, {
1407
1349
  nodeId: string;
1408
- conditionExpr: string;
1409
- resultTrue: boolean;
1410
- evaluatedInputs?: Record<string, unknown> | undefined;
1350
+ lastAttemptId: string;
1351
+ nextAttemptAt: number;
1352
+ backoffPolicy: {
1353
+ kind: "fixed" | "exponential";
1354
+ baseMs: number;
1355
+ factor?: number | undefined;
1356
+ jitter?: boolean | undefined;
1357
+ };
1411
1358
  }>, z.ZodObject<{
1412
1359
  ref: z.ZodString;
1413
1360
  bytes: z.ZodNumber;
@@ -1428,15 +1375,20 @@ export declare const ConditionEvaluatedEventSchema: z.ZodObject<{
1428
1375
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1429
1376
  payloadHash: z.ZodOptional<z.ZodString>;
1430
1377
  }, "strip", z.ZodTypeAny, {
1431
- type: "conditionEvaluated";
1432
1378
  runId: string;
1379
+ type: "backoffScheduled";
1433
1380
  schemaVersion: 1;
1434
1381
  eventId: string;
1435
1382
  payload: {
1436
1383
  nodeId: string;
1437
- conditionExpr: string;
1438
- resultTrue: boolean;
1439
- evaluatedInputs?: Record<string, unknown> | undefined;
1384
+ lastAttemptId: string;
1385
+ nextAttemptAt: number;
1386
+ backoffPolicy: {
1387
+ kind: "fixed" | "exponential";
1388
+ baseMs: number;
1389
+ factor?: number | undefined;
1390
+ jitter?: boolean | undefined;
1391
+ };
1440
1392
  } | {
1441
1393
  ref: string;
1442
1394
  bytes: number;
@@ -1446,15 +1398,20 @@ export declare const ConditionEvaluatedEventSchema: z.ZodObject<{
1446
1398
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1447
1399
  payloadHash?: string | undefined;
1448
1400
  }, {
1449
- type: "conditionEvaluated";
1450
1401
  runId: string;
1402
+ type: "backoffScheduled";
1451
1403
  schemaVersion: 1;
1452
1404
  eventId: string;
1453
1405
  payload: {
1454
1406
  nodeId: string;
1455
- conditionExpr: string;
1456
- resultTrue: boolean;
1457
- evaluatedInputs?: Record<string, unknown> | undefined;
1407
+ lastAttemptId: string;
1408
+ nextAttemptAt: number;
1409
+ backoffPolicy: {
1410
+ kind: "fixed" | "exponential";
1411
+ baseMs: number;
1412
+ factor?: number | undefined;
1413
+ jitter?: boolean | undefined;
1414
+ };
1458
1415
  } | {
1459
1416
  ref: string;
1460
1417
  bytes: number;
@@ -1464,26 +1421,92 @@ export declare const ConditionEvaluatedEventSchema: z.ZodObject<{
1464
1421
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1465
1422
  payloadHash?: string | undefined;
1466
1423
  }>;
1467
- export declare const LeaseSignedEventSchema: z.ZodObject<{
1468
- type: z.ZodLiteral<"leaseSigned">;
1424
+ export declare const BackoffElapsedEventSchema: z.ZodObject<{
1425
+ type: z.ZodLiteral<"backoffElapsed">;
1426
+ payload: z.ZodUnion<[z.ZodObject<{
1427
+ nodeId: z.ZodString;
1428
+ scheduledAttemptId: z.ZodString;
1429
+ }, "strip", z.ZodTypeAny, {
1430
+ nodeId: string;
1431
+ scheduledAttemptId: string;
1432
+ }, {
1433
+ nodeId: string;
1434
+ scheduledAttemptId: string;
1435
+ }>, z.ZodObject<{
1436
+ ref: z.ZodString;
1437
+ bytes: z.ZodNumber;
1438
+ schemaVersion: z.ZodNumber;
1439
+ }, "strip", z.ZodTypeAny, {
1440
+ ref: string;
1441
+ bytes: number;
1442
+ schemaVersion: number;
1443
+ }, {
1444
+ ref: string;
1445
+ bytes: number;
1446
+ schemaVersion: number;
1447
+ }>]>;
1448
+ eventId: z.ZodString;
1449
+ runId: z.ZodString;
1450
+ timestamp: z.ZodNumber;
1451
+ schemaVersion: z.ZodLiteral<1>;
1452
+ actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1453
+ payloadHash: z.ZodOptional<z.ZodString>;
1454
+ }, "strip", z.ZodTypeAny, {
1455
+ runId: string;
1456
+ type: "backoffElapsed";
1457
+ schemaVersion: 1;
1458
+ eventId: string;
1459
+ payload: {
1460
+ nodeId: string;
1461
+ scheduledAttemptId: string;
1462
+ } | {
1463
+ ref: string;
1464
+ bytes: number;
1465
+ schemaVersion: number;
1466
+ };
1467
+ timestamp: number;
1468
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1469
+ payloadHash?: string | undefined;
1470
+ }, {
1471
+ runId: string;
1472
+ type: "backoffElapsed";
1473
+ schemaVersion: 1;
1474
+ eventId: string;
1475
+ payload: {
1476
+ nodeId: string;
1477
+ scheduledAttemptId: string;
1478
+ } | {
1479
+ ref: string;
1480
+ bytes: number;
1481
+ schemaVersion: number;
1482
+ };
1483
+ timestamp: number;
1484
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1485
+ payloadHash?: string | undefined;
1486
+ }>;
1487
+ export declare const EffectAttemptedEventSchema: z.ZodObject<{
1488
+ type: z.ZodLiteral<"effectAttempted">;
1469
1489
  payload: z.ZodUnion<[z.ZodObject<{
1470
1490
  activityId: z.ZodString;
1471
1491
  attemptId: z.ZodString;
1472
- leaseId: z.ZodString;
1473
- timeoutMs: z.ZodNumber;
1474
- maxOutputBytes: z.ZodNumber;
1492
+ idempotencyKey: z.ZodString;
1493
+ inputHash: z.ZodString;
1494
+ idempotencyTtlMs: z.ZodNumber;
1495
+ provider: z.ZodString;
1475
1496
  }, "strip", z.ZodTypeAny, {
1476
1497
  attemptId: string;
1477
1498
  activityId: string;
1478
- leaseId: string;
1479
- timeoutMs: number;
1480
- maxOutputBytes: number;
1499
+ idempotencyKey: string;
1500
+ inputHash: string;
1501
+ idempotencyTtlMs: number;
1502
+ provider: string;
1481
1503
  }, {
1482
1504
  attemptId: string;
1483
1505
  activityId: string;
1484
- leaseId: string;
1485
- timeoutMs: number;
1486
- maxOutputBytes: number;
1506
+ idempotencyKey: string;
1507
+ inputHash: string;
1508
+ idempotencyTtlMs: number;
1509
+ provider: string;
1487
1510
  }>, z.ZodObject<{
1488
1511
  ref: z.ZodString;
1489
1512
  bytes: z.ZodNumber;
@@ -1504,16 +1527,17 @@ export declare const LeaseSignedEventSchema: z.ZodObject<{
1504
1527
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1505
1528
  payloadHash: z.ZodOptional<z.ZodString>;
1506
1529
  }, "strip", z.ZodTypeAny, {
1507
- type: "leaseSigned";
1508
1530
  runId: string;
1531
+ type: "effectAttempted";
1509
1532
  schemaVersion: 1;
1510
1533
  eventId: string;
1511
1534
  payload: {
1512
1535
  attemptId: string;
1513
1536
  activityId: string;
1514
- leaseId: string;
1515
- timeoutMs: number;
1516
- maxOutputBytes: number;
1537
+ idempotencyKey: string;
1538
+ inputHash: string;
1539
+ idempotencyTtlMs: number;
1540
+ provider: string;
1517
1541
  } | {
1518
1542
  ref: string;
1519
1543
  bytes: number;
@@ -1523,16 +1547,17 @@ export declare const LeaseSignedEventSchema: z.ZodObject<{
1523
1547
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1524
1548
  payloadHash?: string | undefined;
1525
1549
  }, {
1526
- type: "leaseSigned";
1527
1550
  runId: string;
1551
+ type: "effectAttempted";
1528
1552
  schemaVersion: 1;
1529
1553
  eventId: string;
1530
1554
  payload: {
1531
1555
  attemptId: string;
1532
1556
  activityId: string;
1533
- leaseId: string;
1534
- timeoutMs: number;
1535
- maxOutputBytes: number;
1557
+ idempotencyKey: string;
1558
+ inputHash: string;
1559
+ idempotencyTtlMs: number;
1560
+ provider: string;
1536
1561
  } | {
1537
1562
  ref: string;
1538
1563
  bytes: number;
@@ -1542,14 +1567,12 @@ export declare const LeaseSignedEventSchema: z.ZodObject<{
1542
1567
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1543
1568
  payloadHash?: string | undefined;
1544
1569
  }>;
1545
- export declare const AttemptCreatedEventSchema: z.ZodObject<{
1546
- type: z.ZodLiteral<"attemptCreated">;
1570
+ export declare const ActivitySucceededEventSchema: z.ZodObject<{
1571
+ type: z.ZodLiteral<"activitySucceeded">;
1547
1572
  payload: z.ZodUnion<[z.ZodObject<{
1548
- nodeId: z.ZodString;
1549
1573
  activityId: z.ZodString;
1550
1574
  attemptId: z.ZodString;
1551
- attemptNumber: z.ZodNumber;
1552
- inputRef: z.ZodObject<{
1575
+ outputRef: z.ZodObject<{
1553
1576
  outputHash: z.ZodString;
1554
1577
  outputPath: z.ZodOptional<z.ZodString>;
1555
1578
  outputBytes: z.ZodNumber;
@@ -1568,30 +1591,29 @@ export declare const AttemptCreatedEventSchema: z.ZodObject<{
1568
1591
  outputPath?: string | undefined;
1569
1592
  contentType?: string | undefined;
1570
1593
  }>;
1594
+ externalRefs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1571
1595
  }, "strip", z.ZodTypeAny, {
1572
- nodeId: string;
1573
1596
  attemptId: string;
1574
1597
  activityId: string;
1575
- inputRef: {
1598
+ outputRef: {
1576
1599
  outputHash: string;
1577
1600
  outputBytes: number;
1578
1601
  outputSchemaVersion: number;
1579
1602
  outputPath?: string | undefined;
1580
1603
  contentType?: string | undefined;
1581
1604
  };
1582
- attemptNumber: number;
1605
+ externalRefs?: Record<string, unknown> | undefined;
1583
1606
  }, {
1584
- nodeId: string;
1585
1607
  attemptId: string;
1586
1608
  activityId: string;
1587
- inputRef: {
1609
+ outputRef: {
1588
1610
  outputHash: string;
1589
1611
  outputBytes: number;
1590
1612
  outputSchemaVersion: number;
1591
1613
  outputPath?: string | undefined;
1592
1614
  contentType?: string | undefined;
1593
1615
  };
1594
- attemptNumber: number;
1616
+ externalRefs?: Record<string, unknown> | undefined;
1595
1617
  }>, z.ZodObject<{
1596
1618
  ref: z.ZodString;
1597
1619
  bytes: z.ZodNumber;
@@ -1612,22 +1634,21 @@ export declare const AttemptCreatedEventSchema: z.ZodObject<{
1612
1634
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1613
1635
  payloadHash: z.ZodOptional<z.ZodString>;
1614
1636
  }, "strip", z.ZodTypeAny, {
1615
- type: "attemptCreated";
1616
1637
  runId: string;
1638
+ type: "activitySucceeded";
1617
1639
  schemaVersion: 1;
1618
1640
  eventId: string;
1619
1641
  payload: {
1620
- nodeId: string;
1621
1642
  attemptId: string;
1622
1643
  activityId: string;
1623
- inputRef: {
1644
+ outputRef: {
1624
1645
  outputHash: string;
1625
1646
  outputBytes: number;
1626
1647
  outputSchemaVersion: number;
1627
1648
  outputPath?: string | undefined;
1628
1649
  contentType?: string | undefined;
1629
1650
  };
1630
- attemptNumber: number;
1651
+ externalRefs?: Record<string, unknown> | undefined;
1631
1652
  } | {
1632
1653
  ref: string;
1633
1654
  bytes: number;
@@ -1637,22 +1658,21 @@ export declare const AttemptCreatedEventSchema: z.ZodObject<{
1637
1658
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1638
1659
  payloadHash?: string | undefined;
1639
1660
  }, {
1640
- type: "attemptCreated";
1641
1661
  runId: string;
1662
+ type: "activitySucceeded";
1642
1663
  schemaVersion: 1;
1643
1664
  eventId: string;
1644
1665
  payload: {
1645
- nodeId: string;
1646
1666
  attemptId: string;
1647
1667
  activityId: string;
1648
- inputRef: {
1668
+ outputRef: {
1649
1669
  outputHash: string;
1650
1670
  outputBytes: number;
1651
1671
  outputSchemaVersion: number;
1652
1672
  outputPath?: string | undefined;
1653
1673
  contentType?: string | undefined;
1654
1674
  };
1655
- attemptNumber: number;
1675
+ externalRefs?: Record<string, unknown> | undefined;
1656
1676
  } | {
1657
1677
  ref: string;
1658
1678
  bytes: number;
@@ -1662,48 +1682,45 @@ export declare const AttemptCreatedEventSchema: z.ZodObject<{
1662
1682
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1663
1683
  payloadHash?: string | undefined;
1664
1684
  }>;
1665
- export declare const BackoffScheduledEventSchema: z.ZodObject<{
1666
- type: z.ZodLiteral<"backoffScheduled">;
1685
+ export declare const ActivityFailedEventSchema: z.ZodObject<{
1686
+ type: z.ZodLiteral<"activityFailed">;
1667
1687
  payload: z.ZodUnion<[z.ZodObject<{
1668
- nodeId: z.ZodString;
1669
- lastAttemptId: z.ZodString;
1670
- nextAttemptAt: z.ZodNumber;
1671
- backoffPolicy: z.ZodObject<{
1672
- kind: z.ZodEnum<["fixed", "exponential"]>;
1673
- baseMs: z.ZodNumber;
1674
- factor: z.ZodOptional<z.ZodNumber>;
1675
- jitter: z.ZodOptional<z.ZodBoolean>;
1688
+ activityId: z.ZodString;
1689
+ attemptId: z.ZodString;
1690
+ error: z.ZodObject<{
1691
+ errorCode: z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog"]>;
1692
+ errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
1693
+ errorMessage: z.ZodString;
1694
+ stackRef: z.ZodOptional<z.ZodString>;
1676
1695
  }, "strip", z.ZodTypeAny, {
1677
- kind: "fixed" | "exponential";
1678
- baseMs: number;
1679
- factor?: number | undefined;
1680
- jitter?: boolean | undefined;
1696
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
1697
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
1698
+ errorMessage: string;
1699
+ stackRef?: string | undefined;
1681
1700
  }, {
1682
- kind: "fixed" | "exponential";
1683
- baseMs: number;
1684
- factor?: number | undefined;
1685
- jitter?: boolean | undefined;
1701
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
1702
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
1703
+ errorMessage: string;
1704
+ stackRef?: string | undefined;
1686
1705
  }>;
1687
1706
  }, "strip", z.ZodTypeAny, {
1688
- nodeId: string;
1689
- lastAttemptId: string;
1690
- nextAttemptAt: number;
1691
- backoffPolicy: {
1692
- kind: "fixed" | "exponential";
1693
- baseMs: number;
1694
- factor?: number | undefined;
1695
- jitter?: boolean | undefined;
1707
+ error: {
1708
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
1709
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
1710
+ errorMessage: string;
1711
+ stackRef?: string | undefined;
1696
1712
  };
1713
+ attemptId: string;
1714
+ activityId: string;
1697
1715
  }, {
1698
- nodeId: string;
1699
- lastAttemptId: string;
1700
- nextAttemptAt: number;
1701
- backoffPolicy: {
1702
- kind: "fixed" | "exponential";
1703
- baseMs: number;
1704
- factor?: number | undefined;
1705
- jitter?: boolean | undefined;
1716
+ error: {
1717
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
1718
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
1719
+ errorMessage: string;
1720
+ stackRef?: string | undefined;
1706
1721
  };
1722
+ attemptId: string;
1723
+ activityId: string;
1707
1724
  }>, z.ZodObject<{
1708
1725
  ref: z.ZodString;
1709
1726
  bytes: z.ZodNumber;
@@ -1724,20 +1741,19 @@ export declare const BackoffScheduledEventSchema: z.ZodObject<{
1724
1741
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1725
1742
  payloadHash: z.ZodOptional<z.ZodString>;
1726
1743
  }, "strip", z.ZodTypeAny, {
1727
- type: "backoffScheduled";
1728
1744
  runId: string;
1745
+ type: "activityFailed";
1729
1746
  schemaVersion: 1;
1730
1747
  eventId: string;
1731
1748
  payload: {
1732
- nodeId: string;
1733
- lastAttemptId: string;
1734
- nextAttemptAt: number;
1735
- backoffPolicy: {
1736
- kind: "fixed" | "exponential";
1737
- baseMs: number;
1738
- factor?: number | undefined;
1739
- jitter?: boolean | undefined;
1749
+ error: {
1750
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
1751
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
1752
+ errorMessage: string;
1753
+ stackRef?: string | undefined;
1740
1754
  };
1755
+ attemptId: string;
1756
+ activityId: string;
1741
1757
  } | {
1742
1758
  ref: string;
1743
1759
  bytes: number;
@@ -1747,20 +1763,19 @@ export declare const BackoffScheduledEventSchema: z.ZodObject<{
1747
1763
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1748
1764
  payloadHash?: string | undefined;
1749
1765
  }, {
1750
- type: "backoffScheduled";
1751
1766
  runId: string;
1767
+ type: "activityFailed";
1752
1768
  schemaVersion: 1;
1753
1769
  eventId: string;
1754
1770
  payload: {
1755
- nodeId: string;
1756
- lastAttemptId: string;
1757
- nextAttemptAt: number;
1758
- backoffPolicy: {
1759
- kind: "fixed" | "exponential";
1760
- baseMs: number;
1761
- factor?: number | undefined;
1762
- jitter?: boolean | undefined;
1771
+ error: {
1772
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
1773
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
1774
+ errorMessage: string;
1775
+ stackRef?: string | undefined;
1763
1776
  };
1777
+ attemptId: string;
1778
+ activityId: string;
1764
1779
  } | {
1765
1780
  ref: string;
1766
1781
  bytes: number;
@@ -1770,17 +1785,68 @@ export declare const BackoffScheduledEventSchema: z.ZodObject<{
1770
1785
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1771
1786
  payloadHash?: string | undefined;
1772
1787
  }>;
1773
- export declare const BackoffElapsedEventSchema: z.ZodObject<{
1774
- type: z.ZodLiteral<"backoffElapsed">;
1788
+ export declare const WaitCreatedEventSchema: z.ZodObject<{
1789
+ type: z.ZodLiteral<"waitCreated">;
1775
1790
  payload: z.ZodUnion<[z.ZodObject<{
1791
+ activityId: z.ZodString;
1776
1792
  nodeId: z.ZodString;
1777
- scheduledAttemptId: z.ZodString;
1793
+ waitKind: z.ZodEnum<["human-gate", "time", "condition"]>;
1794
+ deadlineAt: z.ZodOptional<z.ZodNumber>;
1795
+ prompt: z.ZodOptional<z.ZodString>;
1796
+ promptRef: z.ZodOptional<z.ZodObject<{
1797
+ outputHash: z.ZodString;
1798
+ outputPath: z.ZodOptional<z.ZodString>;
1799
+ outputBytes: z.ZodNumber;
1800
+ outputSchemaVersion: z.ZodNumber;
1801
+ contentType: z.ZodOptional<z.ZodString>;
1802
+ }, "strip", z.ZodTypeAny, {
1803
+ outputHash: string;
1804
+ outputBytes: number;
1805
+ outputSchemaVersion: number;
1806
+ outputPath?: string | undefined;
1807
+ contentType?: string | undefined;
1808
+ }, {
1809
+ outputHash: string;
1810
+ outputBytes: number;
1811
+ outputSchemaVersion: number;
1812
+ outputPath?: string | undefined;
1813
+ contentType?: string | undefined;
1814
+ }>>;
1815
+ promptPreview: z.ZodOptional<z.ZodString>;
1816
+ approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1817
+ onTimeout: z.ZodOptional<z.ZodEnum<["fail", "success"]>>;
1778
1818
  }, "strip", z.ZodTypeAny, {
1779
1819
  nodeId: string;
1780
- scheduledAttemptId: string;
1820
+ activityId: string;
1821
+ waitKind: "human-gate" | "time" | "condition";
1822
+ prompt?: string | undefined;
1823
+ deadlineAt?: number | undefined;
1824
+ promptRef?: {
1825
+ outputHash: string;
1826
+ outputBytes: number;
1827
+ outputSchemaVersion: number;
1828
+ outputPath?: string | undefined;
1829
+ contentType?: string | undefined;
1830
+ } | undefined;
1831
+ promptPreview?: string | undefined;
1832
+ approvers?: string[] | undefined;
1833
+ onTimeout?: "fail" | "success" | undefined;
1781
1834
  }, {
1782
1835
  nodeId: string;
1783
- scheduledAttemptId: string;
1836
+ activityId: string;
1837
+ waitKind: "human-gate" | "time" | "condition";
1838
+ prompt?: string | undefined;
1839
+ deadlineAt?: number | undefined;
1840
+ promptRef?: {
1841
+ outputHash: string;
1842
+ outputBytes: number;
1843
+ outputSchemaVersion: number;
1844
+ outputPath?: string | undefined;
1845
+ contentType?: string | undefined;
1846
+ } | undefined;
1847
+ promptPreview?: string | undefined;
1848
+ approvers?: string[] | undefined;
1849
+ onTimeout?: "fail" | "success" | undefined;
1784
1850
  }>, z.ZodObject<{
1785
1851
  ref: z.ZodString;
1786
1852
  bytes: z.ZodNumber;
@@ -1801,13 +1867,26 @@ export declare const BackoffElapsedEventSchema: z.ZodObject<{
1801
1867
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1802
1868
  payloadHash: z.ZodOptional<z.ZodString>;
1803
1869
  }, "strip", z.ZodTypeAny, {
1804
- type: "backoffElapsed";
1805
1870
  runId: string;
1871
+ type: "waitCreated";
1806
1872
  schemaVersion: 1;
1807
1873
  eventId: string;
1808
1874
  payload: {
1809
1875
  nodeId: string;
1810
- scheduledAttemptId: string;
1876
+ activityId: string;
1877
+ waitKind: "human-gate" | "time" | "condition";
1878
+ prompt?: string | undefined;
1879
+ deadlineAt?: number | undefined;
1880
+ promptRef?: {
1881
+ outputHash: string;
1882
+ outputBytes: number;
1883
+ outputSchemaVersion: number;
1884
+ outputPath?: string | undefined;
1885
+ contentType?: string | undefined;
1886
+ } | undefined;
1887
+ promptPreview?: string | undefined;
1888
+ approvers?: string[] | undefined;
1889
+ onTimeout?: "fail" | "success" | undefined;
1811
1890
  } | {
1812
1891
  ref: string;
1813
1892
  bytes: number;
@@ -1817,13 +1896,26 @@ export declare const BackoffElapsedEventSchema: z.ZodObject<{
1817
1896
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1818
1897
  payloadHash?: string | undefined;
1819
1898
  }, {
1820
- type: "backoffElapsed";
1821
1899
  runId: string;
1900
+ type: "waitCreated";
1822
1901
  schemaVersion: 1;
1823
1902
  eventId: string;
1824
1903
  payload: {
1825
1904
  nodeId: string;
1826
- scheduledAttemptId: string;
1905
+ activityId: string;
1906
+ waitKind: "human-gate" | "time" | "condition";
1907
+ prompt?: string | undefined;
1908
+ deadlineAt?: number | undefined;
1909
+ promptRef?: {
1910
+ outputHash: string;
1911
+ outputBytes: number;
1912
+ outputSchemaVersion: number;
1913
+ outputPath?: string | undefined;
1914
+ contentType?: string | undefined;
1915
+ } | undefined;
1916
+ promptPreview?: string | undefined;
1917
+ approvers?: string[] | undefined;
1918
+ onTimeout?: "fail" | "success" | undefined;
1827
1919
  } | {
1828
1920
  ref: string;
1829
1921
  bytes: number;
@@ -1833,29 +1925,23 @@ export declare const BackoffElapsedEventSchema: z.ZodObject<{
1833
1925
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1834
1926
  payloadHash?: string | undefined;
1835
1927
  }>;
1836
- export declare const EffectAttemptedEventSchema: z.ZodObject<{
1837
- type: z.ZodLiteral<"effectAttempted">;
1928
+ export declare const WaitResolvedEventSchema: z.ZodObject<{
1929
+ type: z.ZodLiteral<"waitResolved">;
1838
1930
  payload: z.ZodUnion<[z.ZodObject<{
1839
1931
  activityId: z.ZodString;
1840
- attemptId: z.ZodString;
1841
- idempotencyKey: z.ZodString;
1842
- inputHash: z.ZodString;
1843
- idempotencyTtlMs: z.ZodNumber;
1844
- provider: z.ZodString;
1932
+ resolution: z.ZodEnum<["approved", "rejected", "external"]>;
1933
+ by: z.ZodString;
1934
+ comment: z.ZodOptional<z.ZodString>;
1845
1935
  }, "strip", z.ZodTypeAny, {
1846
- attemptId: string;
1847
1936
  activityId: string;
1848
- idempotencyKey: string;
1849
- inputHash: string;
1850
- idempotencyTtlMs: number;
1851
- provider: string;
1937
+ resolution: "approved" | "rejected" | "external";
1938
+ by: string;
1939
+ comment?: string | undefined;
1852
1940
  }, {
1853
- attemptId: string;
1854
1941
  activityId: string;
1855
- idempotencyKey: string;
1856
- inputHash: string;
1857
- idempotencyTtlMs: number;
1858
- provider: string;
1942
+ resolution: "approved" | "rejected" | "external";
1943
+ by: string;
1944
+ comment?: string | undefined;
1859
1945
  }>, z.ZodObject<{
1860
1946
  ref: z.ZodString;
1861
1947
  bytes: z.ZodNumber;
@@ -1876,17 +1962,15 @@ export declare const EffectAttemptedEventSchema: z.ZodObject<{
1876
1962
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1877
1963
  payloadHash: z.ZodOptional<z.ZodString>;
1878
1964
  }, "strip", z.ZodTypeAny, {
1879
- type: "effectAttempted";
1880
1965
  runId: string;
1966
+ type: "waitResolved";
1881
1967
  schemaVersion: 1;
1882
1968
  eventId: string;
1883
1969
  payload: {
1884
- attemptId: string;
1885
1970
  activityId: string;
1886
- idempotencyKey: string;
1887
- inputHash: string;
1888
- idempotencyTtlMs: number;
1889
- provider: string;
1971
+ resolution: "approved" | "rejected" | "external";
1972
+ by: string;
1973
+ comment?: string | undefined;
1890
1974
  } | {
1891
1975
  ref: string;
1892
1976
  bytes: number;
@@ -1896,17 +1980,15 @@ export declare const EffectAttemptedEventSchema: z.ZodObject<{
1896
1980
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1897
1981
  payloadHash?: string | undefined;
1898
1982
  }, {
1899
- type: "effectAttempted";
1900
1983
  runId: string;
1984
+ type: "waitResolved";
1901
1985
  schemaVersion: 1;
1902
1986
  eventId: string;
1903
1987
  payload: {
1904
- attemptId: string;
1905
1988
  activityId: string;
1906
- idempotencyKey: string;
1907
- inputHash: string;
1908
- idempotencyTtlMs: number;
1909
- provider: string;
1989
+ resolution: "approved" | "rejected" | "external";
1990
+ by: string;
1991
+ comment?: string | undefined;
1910
1992
  } | {
1911
1993
  ref: string;
1912
1994
  bytes: number;
@@ -1916,53 +1998,20 @@ export declare const EffectAttemptedEventSchema: z.ZodObject<{
1916
1998
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1917
1999
  payloadHash?: string | undefined;
1918
2000
  }>;
1919
- export declare const ActivitySucceededEventSchema: z.ZodObject<{
1920
- type: z.ZodLiteral<"activitySucceeded">;
2001
+ export declare const WaitDeadlineExceededEventSchema: z.ZodObject<{
2002
+ type: z.ZodLiteral<"waitDeadlineExceeded">;
1921
2003
  payload: z.ZodUnion<[z.ZodObject<{
1922
2004
  activityId: z.ZodString;
1923
- attemptId: z.ZodString;
1924
- outputRef: z.ZodObject<{
1925
- outputHash: z.ZodString;
1926
- outputPath: z.ZodOptional<z.ZodString>;
1927
- outputBytes: z.ZodNumber;
1928
- outputSchemaVersion: z.ZodNumber;
1929
- contentType: z.ZodOptional<z.ZodString>;
1930
- }, "strip", z.ZodTypeAny, {
1931
- outputHash: string;
1932
- outputBytes: number;
1933
- outputSchemaVersion: number;
1934
- outputPath?: string | undefined;
1935
- contentType?: string | undefined;
1936
- }, {
1937
- outputHash: string;
1938
- outputBytes: number;
1939
- outputSchemaVersion: number;
1940
- outputPath?: string | undefined;
1941
- contentType?: string | undefined;
1942
- }>;
1943
- externalRefs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2005
+ deadlineAt: z.ZodNumber;
2006
+ exceededAtMs: z.ZodNumber;
1944
2007
  }, "strip", z.ZodTypeAny, {
1945
- attemptId: string;
1946
2008
  activityId: string;
1947
- outputRef: {
1948
- outputHash: string;
1949
- outputBytes: number;
1950
- outputSchemaVersion: number;
1951
- outputPath?: string | undefined;
1952
- contentType?: string | undefined;
1953
- };
1954
- externalRefs?: Record<string, unknown> | undefined;
2009
+ deadlineAt: number;
2010
+ exceededAtMs: number;
1955
2011
  }, {
1956
- attemptId: string;
1957
2012
  activityId: string;
1958
- outputRef: {
1959
- outputHash: string;
1960
- outputBytes: number;
1961
- outputSchemaVersion: number;
1962
- outputPath?: string | undefined;
1963
- contentType?: string | undefined;
1964
- };
1965
- externalRefs?: Record<string, unknown> | undefined;
2013
+ deadlineAt: number;
2014
+ exceededAtMs: number;
1966
2015
  }>, z.ZodObject<{
1967
2016
  ref: z.ZodString;
1968
2017
  bytes: z.ZodNumber;
@@ -1983,21 +2032,14 @@ export declare const ActivitySucceededEventSchema: z.ZodObject<{
1983
2032
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1984
2033
  payloadHash: z.ZodOptional<z.ZodString>;
1985
2034
  }, "strip", z.ZodTypeAny, {
1986
- type: "activitySucceeded";
1987
2035
  runId: string;
2036
+ type: "waitDeadlineExceeded";
1988
2037
  schemaVersion: 1;
1989
2038
  eventId: string;
1990
2039
  payload: {
1991
- attemptId: string;
1992
2040
  activityId: string;
1993
- outputRef: {
1994
- outputHash: string;
1995
- outputBytes: number;
1996
- outputSchemaVersion: number;
1997
- outputPath?: string | undefined;
1998
- contentType?: string | undefined;
1999
- };
2000
- externalRefs?: Record<string, unknown> | undefined;
2041
+ deadlineAt: number;
2042
+ exceededAtMs: number;
2001
2043
  } | {
2002
2044
  ref: string;
2003
2045
  bytes: number;
@@ -2007,21 +2049,14 @@ export declare const ActivitySucceededEventSchema: z.ZodObject<{
2007
2049
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2008
2050
  payloadHash?: string | undefined;
2009
2051
  }, {
2010
- type: "activitySucceeded";
2011
2052
  runId: string;
2053
+ type: "waitDeadlineExceeded";
2012
2054
  schemaVersion: 1;
2013
2055
  eventId: string;
2014
2056
  payload: {
2015
- attemptId: string;
2016
2057
  activityId: string;
2017
- outputRef: {
2018
- outputHash: string;
2019
- outputBytes: number;
2020
- outputSchemaVersion: number;
2021
- outputPath?: string | undefined;
2022
- contentType?: string | undefined;
2023
- };
2024
- externalRefs?: Record<string, unknown> | undefined;
2058
+ deadlineAt: number;
2059
+ exceededAtMs: number;
2025
2060
  } | {
2026
2061
  ref: string;
2027
2062
  bytes: number;
@@ -2031,530 +2066,15 @@ export declare const ActivitySucceededEventSchema: z.ZodObject<{
2031
2066
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2032
2067
  payloadHash?: string | undefined;
2033
2068
  }>;
2034
- export declare const ActivityFailedEventSchema: z.ZodObject<{
2035
- type: z.ZodLiteral<"activityFailed">;
2069
+ export declare const CancelRequestedEventSchema: z.ZodObject<{
2070
+ type: z.ZodLiteral<"cancelRequested">;
2036
2071
  payload: z.ZodUnion<[z.ZodObject<{
2037
- activityId: z.ZodString;
2038
- attemptId: z.ZodString;
2039
- error: z.ZodObject<{
2040
- errorCode: z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog", "LoopMaxIterationsExceeded", "LoopBodyFailed"]>;
2041
- errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
2042
- errorMessage: z.ZodString;
2043
- stackRef: z.ZodOptional<z.ZodString>;
2072
+ target: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2073
+ kind: z.ZodLiteral<"run">;
2074
+ runId: z.ZodString;
2044
2075
  }, "strip", z.ZodTypeAny, {
2045
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
2046
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
2047
- errorMessage: string;
2048
- stackRef?: string | undefined;
2049
- }, {
2050
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
2051
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
2052
- errorMessage: string;
2053
- stackRef?: string | undefined;
2054
- }>;
2055
- }, "strip", z.ZodTypeAny, {
2056
- error: {
2057
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
2058
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
2059
- errorMessage: string;
2060
- stackRef?: string | undefined;
2061
- };
2062
- attemptId: string;
2063
- activityId: string;
2064
- }, {
2065
- error: {
2066
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
2067
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
2068
- errorMessage: string;
2069
- stackRef?: string | undefined;
2070
- };
2071
- attemptId: string;
2072
- activityId: string;
2073
- }>, z.ZodObject<{
2074
- ref: z.ZodString;
2075
- bytes: z.ZodNumber;
2076
- schemaVersion: z.ZodNumber;
2077
- }, "strip", z.ZodTypeAny, {
2078
- ref: string;
2079
- bytes: number;
2080
- schemaVersion: number;
2081
- }, {
2082
- ref: string;
2083
- bytes: number;
2084
- schemaVersion: number;
2085
- }>]>;
2086
- eventId: z.ZodString;
2087
- runId: z.ZodString;
2088
- timestamp: z.ZodNumber;
2089
- schemaVersion: z.ZodLiteral<1>;
2090
- actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2091
- payloadHash: z.ZodOptional<z.ZodString>;
2092
- }, "strip", z.ZodTypeAny, {
2093
- type: "activityFailed";
2094
- runId: string;
2095
- schemaVersion: 1;
2096
- eventId: string;
2097
- payload: {
2098
- error: {
2099
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
2100
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
2101
- errorMessage: string;
2102
- stackRef?: string | undefined;
2103
- };
2104
- attemptId: string;
2105
- activityId: string;
2106
- } | {
2107
- ref: string;
2108
- bytes: number;
2109
- schemaVersion: number;
2110
- };
2111
- timestamp: number;
2112
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2113
- payloadHash?: string | undefined;
2114
- }, {
2115
- type: "activityFailed";
2116
- runId: string;
2117
- schemaVersion: 1;
2118
- eventId: string;
2119
- payload: {
2120
- error: {
2121
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
2122
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
2123
- errorMessage: string;
2124
- stackRef?: string | undefined;
2125
- };
2126
- attemptId: string;
2127
- activityId: string;
2128
- } | {
2129
- ref: string;
2130
- bytes: number;
2131
- schemaVersion: number;
2132
- };
2133
- timestamp: number;
2134
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2135
- payloadHash?: string | undefined;
2136
- }>;
2137
- export declare const WaitCreatedEventSchema: z.ZodObject<{
2138
- type: z.ZodLiteral<"waitCreated">;
2139
- payload: z.ZodUnion<[z.ZodObject<{
2140
- activityId: z.ZodString;
2141
- nodeId: z.ZodString;
2142
- waitKind: z.ZodEnum<["human-gate", "time", "condition"]>;
2143
- deadlineAt: z.ZodOptional<z.ZodNumber>;
2144
- prompt: z.ZodOptional<z.ZodString>;
2145
- promptRef: z.ZodOptional<z.ZodObject<{
2146
- outputHash: z.ZodString;
2147
- outputPath: z.ZodOptional<z.ZodString>;
2148
- outputBytes: z.ZodNumber;
2149
- outputSchemaVersion: z.ZodNumber;
2150
- contentType: z.ZodOptional<z.ZodString>;
2151
- }, "strip", z.ZodTypeAny, {
2152
- outputHash: string;
2153
- outputBytes: number;
2154
- outputSchemaVersion: number;
2155
- outputPath?: string | undefined;
2156
- contentType?: string | undefined;
2157
- }, {
2158
- outputHash: string;
2159
- outputBytes: number;
2160
- outputSchemaVersion: number;
2161
- outputPath?: string | undefined;
2162
- contentType?: string | undefined;
2163
- }>>;
2164
- promptPreview: z.ZodOptional<z.ZodString>;
2165
- approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2166
- onTimeout: z.ZodOptional<z.ZodEnum<["fail", "success"]>>;
2167
- }, "strip", z.ZodTypeAny, {
2168
- nodeId: string;
2169
- activityId: string;
2170
- waitKind: "human-gate" | "time" | "condition";
2171
- prompt?: string | undefined;
2172
- deadlineAt?: number | undefined;
2173
- promptRef?: {
2174
- outputHash: string;
2175
- outputBytes: number;
2176
- outputSchemaVersion: number;
2177
- outputPath?: string | undefined;
2178
- contentType?: string | undefined;
2179
- } | undefined;
2180
- promptPreview?: string | undefined;
2181
- approvers?: string[] | undefined;
2182
- onTimeout?: "fail" | "success" | undefined;
2183
- }, {
2184
- nodeId: string;
2185
- activityId: string;
2186
- waitKind: "human-gate" | "time" | "condition";
2187
- prompt?: string | undefined;
2188
- deadlineAt?: number | undefined;
2189
- promptRef?: {
2190
- outputHash: string;
2191
- outputBytes: number;
2192
- outputSchemaVersion: number;
2193
- outputPath?: string | undefined;
2194
- contentType?: string | undefined;
2195
- } | undefined;
2196
- promptPreview?: string | undefined;
2197
- approvers?: string[] | undefined;
2198
- onTimeout?: "fail" | "success" | undefined;
2199
- }>, z.ZodObject<{
2200
- ref: z.ZodString;
2201
- bytes: z.ZodNumber;
2202
- schemaVersion: z.ZodNumber;
2203
- }, "strip", z.ZodTypeAny, {
2204
- ref: string;
2205
- bytes: number;
2206
- schemaVersion: number;
2207
- }, {
2208
- ref: string;
2209
- bytes: number;
2210
- schemaVersion: number;
2211
- }>]>;
2212
- eventId: z.ZodString;
2213
- runId: z.ZodString;
2214
- timestamp: z.ZodNumber;
2215
- schemaVersion: z.ZodLiteral<1>;
2216
- actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2217
- payloadHash: z.ZodOptional<z.ZodString>;
2218
- }, "strip", z.ZodTypeAny, {
2219
- type: "waitCreated";
2220
- runId: string;
2221
- schemaVersion: 1;
2222
- eventId: string;
2223
- payload: {
2224
- nodeId: string;
2225
- activityId: string;
2226
- waitKind: "human-gate" | "time" | "condition";
2227
- prompt?: string | undefined;
2228
- deadlineAt?: number | undefined;
2229
- promptRef?: {
2230
- outputHash: string;
2231
- outputBytes: number;
2232
- outputSchemaVersion: number;
2233
- outputPath?: string | undefined;
2234
- contentType?: string | undefined;
2235
- } | undefined;
2236
- promptPreview?: string | undefined;
2237
- approvers?: string[] | undefined;
2238
- onTimeout?: "fail" | "success" | undefined;
2239
- } | {
2240
- ref: string;
2241
- bytes: number;
2242
- schemaVersion: number;
2243
- };
2244
- timestamp: number;
2245
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2246
- payloadHash?: string | undefined;
2247
- }, {
2248
- type: "waitCreated";
2249
- runId: string;
2250
- schemaVersion: 1;
2251
- eventId: string;
2252
- payload: {
2253
- nodeId: string;
2254
- activityId: string;
2255
- waitKind: "human-gate" | "time" | "condition";
2256
- prompt?: string | undefined;
2257
- deadlineAt?: number | undefined;
2258
- promptRef?: {
2259
- outputHash: string;
2260
- outputBytes: number;
2261
- outputSchemaVersion: number;
2262
- outputPath?: string | undefined;
2263
- contentType?: string | undefined;
2264
- } | undefined;
2265
- promptPreview?: string | undefined;
2266
- approvers?: string[] | undefined;
2267
- onTimeout?: "fail" | "success" | undefined;
2268
- } | {
2269
- ref: string;
2270
- bytes: number;
2271
- schemaVersion: number;
2272
- };
2273
- timestamp: number;
2274
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2275
- payloadHash?: string | undefined;
2276
- }>;
2277
- export declare const WaitResolvedEventSchema: z.ZodObject<{
2278
- type: z.ZodLiteral<"waitResolved">;
2279
- payload: z.ZodUnion<[z.ZodObject<{
2280
- activityId: z.ZodString;
2281
- resolution: z.ZodEnum<["approved", "rejected", "external"]>;
2282
- by: z.ZodString;
2283
- comment: z.ZodOptional<z.ZodString>;
2284
- }, "strip", z.ZodTypeAny, {
2285
- activityId: string;
2286
- resolution: "approved" | "rejected" | "external";
2287
- by: string;
2288
- comment?: string | undefined;
2289
- }, {
2290
- activityId: string;
2291
- resolution: "approved" | "rejected" | "external";
2292
- by: string;
2293
- comment?: string | undefined;
2294
- }>, z.ZodObject<{
2295
- ref: z.ZodString;
2296
- bytes: z.ZodNumber;
2297
- schemaVersion: z.ZodNumber;
2298
- }, "strip", z.ZodTypeAny, {
2299
- ref: string;
2300
- bytes: number;
2301
- schemaVersion: number;
2302
- }, {
2303
- ref: string;
2304
- bytes: number;
2305
- schemaVersion: number;
2306
- }>]>;
2307
- eventId: z.ZodString;
2308
- runId: z.ZodString;
2309
- timestamp: z.ZodNumber;
2310
- schemaVersion: z.ZodLiteral<1>;
2311
- actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2312
- payloadHash: z.ZodOptional<z.ZodString>;
2313
- }, "strip", z.ZodTypeAny, {
2314
- type: "waitResolved";
2315
- runId: string;
2316
- schemaVersion: 1;
2317
- eventId: string;
2318
- payload: {
2319
- activityId: string;
2320
- resolution: "approved" | "rejected" | "external";
2321
- by: string;
2322
- comment?: string | undefined;
2323
- } | {
2324
- ref: string;
2325
- bytes: number;
2326
- schemaVersion: number;
2327
- };
2328
- timestamp: number;
2329
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2330
- payloadHash?: string | undefined;
2331
- }, {
2332
- type: "waitResolved";
2333
- runId: string;
2334
- schemaVersion: 1;
2335
- eventId: string;
2336
- payload: {
2337
- activityId: string;
2338
- resolution: "approved" | "rejected" | "external";
2339
- by: string;
2340
- comment?: string | undefined;
2341
- } | {
2342
- ref: string;
2343
- bytes: number;
2344
- schemaVersion: number;
2345
- };
2346
- timestamp: number;
2347
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2348
- payloadHash?: string | undefined;
2349
- }>;
2350
- export declare const WaitDeadlineExceededEventSchema: z.ZodObject<{
2351
- type: z.ZodLiteral<"waitDeadlineExceeded">;
2352
- payload: z.ZodUnion<[z.ZodObject<{
2353
- activityId: z.ZodString;
2354
- deadlineAt: z.ZodNumber;
2355
- exceededAtMs: z.ZodNumber;
2356
- }, "strip", z.ZodTypeAny, {
2357
- activityId: string;
2358
- deadlineAt: number;
2359
- exceededAtMs: number;
2360
- }, {
2361
- activityId: string;
2362
- deadlineAt: number;
2363
- exceededAtMs: number;
2364
- }>, z.ZodObject<{
2365
- ref: z.ZodString;
2366
- bytes: z.ZodNumber;
2367
- schemaVersion: z.ZodNumber;
2368
- }, "strip", z.ZodTypeAny, {
2369
- ref: string;
2370
- bytes: number;
2371
- schemaVersion: number;
2372
- }, {
2373
- ref: string;
2374
- bytes: number;
2375
- schemaVersion: number;
2376
- }>]>;
2377
- eventId: z.ZodString;
2378
- runId: z.ZodString;
2379
- timestamp: z.ZodNumber;
2380
- schemaVersion: z.ZodLiteral<1>;
2381
- actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2382
- payloadHash: z.ZodOptional<z.ZodString>;
2383
- }, "strip", z.ZodTypeAny, {
2384
- type: "waitDeadlineExceeded";
2385
- runId: string;
2386
- schemaVersion: 1;
2387
- eventId: string;
2388
- payload: {
2389
- activityId: string;
2390
- deadlineAt: number;
2391
- exceededAtMs: number;
2392
- } | {
2393
- ref: string;
2394
- bytes: number;
2395
- schemaVersion: number;
2396
- };
2397
- timestamp: number;
2398
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2399
- payloadHash?: string | undefined;
2400
- }, {
2401
- type: "waitDeadlineExceeded";
2402
- runId: string;
2403
- schemaVersion: 1;
2404
- eventId: string;
2405
- payload: {
2406
- activityId: string;
2407
- deadlineAt: number;
2408
- exceededAtMs: number;
2409
- } | {
2410
- ref: string;
2411
- bytes: number;
2412
- schemaVersion: number;
2413
- };
2414
- timestamp: number;
2415
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2416
- payloadHash?: string | undefined;
2417
- }>;
2418
- export declare const CancelRequestedEventSchema: z.ZodObject<{
2419
- type: z.ZodLiteral<"cancelRequested">;
2420
- payload: z.ZodUnion<[z.ZodObject<{
2421
- target: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2422
- kind: z.ZodLiteral<"run">;
2423
- runId: z.ZodString;
2424
- }, "strip", z.ZodTypeAny, {
2425
- runId: string;
2426
- kind: "run";
2427
- }, {
2428
- runId: string;
2429
- kind: "run";
2430
- }>, z.ZodObject<{
2431
- kind: z.ZodLiteral<"node">;
2432
- nodeId: z.ZodString;
2433
- }, "strip", z.ZodTypeAny, {
2434
- nodeId: string;
2435
- kind: "node";
2436
- }, {
2437
- nodeId: string;
2438
- kind: "node";
2439
- }>, z.ZodObject<{
2440
- kind: z.ZodLiteral<"activity">;
2441
- activityId: z.ZodString;
2442
- }, "strip", z.ZodTypeAny, {
2443
- kind: "activity";
2444
- activityId: string;
2445
- }, {
2446
- kind: "activity";
2447
- activityId: string;
2448
- }>]>;
2449
- reason: z.ZodString;
2450
- by: z.ZodString;
2451
- }, "strip", z.ZodTypeAny, {
2452
- reason: string;
2453
- by: string;
2454
- target: {
2455
- runId: string;
2456
- kind: "run";
2457
- } | {
2458
- nodeId: string;
2459
- kind: "node";
2460
- } | {
2461
- kind: "activity";
2462
- activityId: string;
2463
- };
2464
- }, {
2465
- reason: string;
2466
- by: string;
2467
- target: {
2468
- runId: string;
2469
- kind: "run";
2470
- } | {
2471
- nodeId: string;
2472
- kind: "node";
2473
- } | {
2474
- kind: "activity";
2475
- activityId: string;
2476
- };
2477
- }>, z.ZodObject<{
2478
- ref: z.ZodString;
2479
- bytes: z.ZodNumber;
2480
- schemaVersion: z.ZodNumber;
2481
- }, "strip", z.ZodTypeAny, {
2482
- ref: string;
2483
- bytes: number;
2484
- schemaVersion: number;
2485
- }, {
2486
- ref: string;
2487
- bytes: number;
2488
- schemaVersion: number;
2489
- }>]>;
2490
- eventId: z.ZodString;
2491
- runId: z.ZodString;
2492
- timestamp: z.ZodNumber;
2493
- schemaVersion: z.ZodLiteral<1>;
2494
- actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2495
- payloadHash: z.ZodOptional<z.ZodString>;
2496
- }, "strip", z.ZodTypeAny, {
2497
- type: "cancelRequested";
2498
- runId: string;
2499
- schemaVersion: 1;
2500
- eventId: string;
2501
- payload: {
2502
- reason: string;
2503
- by: string;
2504
- target: {
2505
- runId: string;
2506
- kind: "run";
2507
- } | {
2508
- nodeId: string;
2509
- kind: "node";
2510
- } | {
2511
- kind: "activity";
2512
- activityId: string;
2513
- };
2514
- } | {
2515
- ref: string;
2516
- bytes: number;
2517
- schemaVersion: number;
2518
- };
2519
- timestamp: number;
2520
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2521
- payloadHash?: string | undefined;
2522
- }, {
2523
- type: "cancelRequested";
2524
- runId: string;
2525
- schemaVersion: 1;
2526
- eventId: string;
2527
- payload: {
2528
- reason: string;
2529
- by: string;
2530
- target: {
2531
- runId: string;
2532
- kind: "run";
2533
- } | {
2534
- nodeId: string;
2535
- kind: "node";
2536
- } | {
2537
- kind: "activity";
2538
- activityId: string;
2539
- };
2540
- } | {
2541
- ref: string;
2542
- bytes: number;
2543
- schemaVersion: number;
2544
- };
2545
- timestamp: number;
2546
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2547
- payloadHash?: string | undefined;
2548
- }>;
2549
- export declare const CancelDeliveredEventSchema: z.ZodObject<{
2550
- type: z.ZodLiteral<"cancelDelivered">;
2551
- payload: z.ZodUnion<[z.ZodObject<{
2552
- target: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2553
- kind: z.ZodLiteral<"run">;
2554
- runId: z.ZodString;
2555
- }, "strip", z.ZodTypeAny, {
2556
- runId: string;
2557
- kind: "run";
2076
+ runId: string;
2077
+ kind: "run";
2558
2078
  }, {
2559
2079
  runId: string;
2560
2080
  kind: "run";
@@ -2577,21 +2097,11 @@ export declare const CancelDeliveredEventSchema: z.ZodObject<{
2577
2097
  kind: "activity";
2578
2098
  activityId: string;
2579
2099
  }>]>;
2580
- activityId: z.ZodString;
2100
+ reason: z.ZodString;
2101
+ by: z.ZodString;
2581
2102
  }, "strip", z.ZodTypeAny, {
2582
- activityId: string;
2583
- target: {
2584
- runId: string;
2585
- kind: "run";
2586
- } | {
2587
- nodeId: string;
2588
- kind: "node";
2589
- } | {
2590
- kind: "activity";
2591
- activityId: string;
2592
- };
2593
- }, {
2594
- activityId: string;
2103
+ reason: string;
2104
+ by: string;
2595
2105
  target: {
2596
2106
  runId: string;
2597
2107
  kind: "run";
@@ -2602,57 +2112,9 @@ export declare const CancelDeliveredEventSchema: z.ZodObject<{
2602
2112
  kind: "activity";
2603
2113
  activityId: string;
2604
2114
  };
2605
- }>, z.ZodObject<{
2606
- ref: z.ZodString;
2607
- bytes: z.ZodNumber;
2608
- schemaVersion: z.ZodNumber;
2609
- }, "strip", z.ZodTypeAny, {
2610
- ref: string;
2611
- bytes: number;
2612
- schemaVersion: number;
2613
2115
  }, {
2614
- ref: string;
2615
- bytes: number;
2616
- schemaVersion: number;
2617
- }>]>;
2618
- eventId: z.ZodString;
2619
- runId: z.ZodString;
2620
- timestamp: z.ZodNumber;
2621
- schemaVersion: z.ZodLiteral<1>;
2622
- actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2623
- payloadHash: z.ZodOptional<z.ZodString>;
2624
- }, "strip", z.ZodTypeAny, {
2625
- type: "cancelDelivered";
2626
- runId: string;
2627
- schemaVersion: 1;
2628
- eventId: string;
2629
- payload: {
2630
- activityId: string;
2631
- target: {
2632
- runId: string;
2633
- kind: "run";
2634
- } | {
2635
- nodeId: string;
2636
- kind: "node";
2637
- } | {
2638
- kind: "activity";
2639
- activityId: string;
2640
- };
2641
- } | {
2642
- ref: string;
2643
- bytes: number;
2644
- schemaVersion: number;
2645
- };
2646
- timestamp: number;
2647
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2648
- payloadHash?: string | undefined;
2649
- }, {
2650
- type: "cancelDelivered";
2651
- runId: string;
2652
- schemaVersion: 1;
2653
- eventId: string;
2654
- payload: {
2655
- activityId: string;
2116
+ reason: string;
2117
+ by: string;
2656
2118
  target: {
2657
2119
  runId: string;
2658
2120
  kind: "run";
@@ -2663,157 +2125,6 @@ export declare const CancelDeliveredEventSchema: z.ZodObject<{
2663
2125
  kind: "activity";
2664
2126
  activityId: string;
2665
2127
  };
2666
- } | {
2667
- ref: string;
2668
- bytes: number;
2669
- schemaVersion: number;
2670
- };
2671
- timestamp: number;
2672
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2673
- payloadHash?: string | undefined;
2674
- }>;
2675
- export declare const ActivityCanceledEventSchema: z.ZodObject<{
2676
- type: z.ZodLiteral<"activityCanceled">;
2677
- payload: z.ZodUnion<[z.ZodObject<{
2678
- activityId: z.ZodString;
2679
- attemptId: z.ZodString;
2680
- cancelOriginEventId: z.ZodString;
2681
- }, "strip", z.ZodTypeAny, {
2682
- attemptId: string;
2683
- activityId: string;
2684
- cancelOriginEventId: string;
2685
- }, {
2686
- attemptId: string;
2687
- activityId: string;
2688
- cancelOriginEventId: string;
2689
- }>, z.ZodObject<{
2690
- ref: z.ZodString;
2691
- bytes: z.ZodNumber;
2692
- schemaVersion: z.ZodNumber;
2693
- }, "strip", z.ZodTypeAny, {
2694
- ref: string;
2695
- bytes: number;
2696
- schemaVersion: number;
2697
- }, {
2698
- ref: string;
2699
- bytes: number;
2700
- schemaVersion: number;
2701
- }>]>;
2702
- eventId: z.ZodString;
2703
- runId: z.ZodString;
2704
- timestamp: z.ZodNumber;
2705
- schemaVersion: z.ZodLiteral<1>;
2706
- actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2707
- payloadHash: z.ZodOptional<z.ZodString>;
2708
- }, "strip", z.ZodTypeAny, {
2709
- type: "activityCanceled";
2710
- runId: string;
2711
- schemaVersion: 1;
2712
- eventId: string;
2713
- payload: {
2714
- attemptId: string;
2715
- activityId: string;
2716
- cancelOriginEventId: string;
2717
- } | {
2718
- ref: string;
2719
- bytes: number;
2720
- schemaVersion: number;
2721
- };
2722
- timestamp: number;
2723
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2724
- payloadHash?: string | undefined;
2725
- }, {
2726
- type: "activityCanceled";
2727
- runId: string;
2728
- schemaVersion: 1;
2729
- eventId: string;
2730
- payload: {
2731
- attemptId: string;
2732
- activityId: string;
2733
- cancelOriginEventId: string;
2734
- } | {
2735
- ref: string;
2736
- bytes: number;
2737
- schemaVersion: number;
2738
- };
2739
- timestamp: number;
2740
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2741
- payloadHash?: string | undefined;
2742
- }>;
2743
- export declare const WorkerLostEventSchema: z.ZodObject<{
2744
- type: z.ZodLiteral<"workerLost">;
2745
- payload: z.ZodUnion<[z.ZodObject<{
2746
- workerId: z.ZodString;
2747
- lostActivityIds: z.ZodArray<z.ZodString, "many">;
2748
- }, "strip", z.ZodTypeAny, {
2749
- workerId: string;
2750
- lostActivityIds: string[];
2751
- }, {
2752
- workerId: string;
2753
- lostActivityIds: string[];
2754
- }>, z.ZodObject<{
2755
- ref: z.ZodString;
2756
- bytes: z.ZodNumber;
2757
- schemaVersion: z.ZodNumber;
2758
- }, "strip", z.ZodTypeAny, {
2759
- ref: string;
2760
- bytes: number;
2761
- schemaVersion: number;
2762
- }, {
2763
- ref: string;
2764
- bytes: number;
2765
- schemaVersion: number;
2766
- }>]>;
2767
- eventId: z.ZodString;
2768
- runId: z.ZodString;
2769
- timestamp: z.ZodNumber;
2770
- schemaVersion: z.ZodLiteral<1>;
2771
- actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2772
- payloadHash: z.ZodOptional<z.ZodString>;
2773
- }, "strip", z.ZodTypeAny, {
2774
- type: "workerLost";
2775
- runId: string;
2776
- schemaVersion: 1;
2777
- eventId: string;
2778
- payload: {
2779
- workerId: string;
2780
- lostActivityIds: string[];
2781
- } | {
2782
- ref: string;
2783
- bytes: number;
2784
- schemaVersion: number;
2785
- };
2786
- timestamp: number;
2787
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2788
- payloadHash?: string | undefined;
2789
- }, {
2790
- type: "workerLost";
2791
- runId: string;
2792
- schemaVersion: 1;
2793
- eventId: string;
2794
- payload: {
2795
- workerId: string;
2796
- lostActivityIds: string[];
2797
- } | {
2798
- ref: string;
2799
- bytes: number;
2800
- schemaVersion: number;
2801
- };
2802
- timestamp: number;
2803
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2804
- payloadHash?: string | undefined;
2805
- }>;
2806
- export declare const ResumeStartedEventSchema: z.ZodObject<{
2807
- type: z.ZodLiteral<"resumeStarted">;
2808
- payload: z.ZodUnion<[z.ZodObject<{
2809
- daemonId: z.ZodString;
2810
- lastSeenEventId: z.ZodString;
2811
- }, "strip", z.ZodTypeAny, {
2812
- daemonId: string;
2813
- lastSeenEventId: string;
2814
- }, {
2815
- daemonId: string;
2816
- lastSeenEventId: string;
2817
2128
  }>, z.ZodObject<{
2818
2129
  ref: z.ZodString;
2819
2130
  bytes: z.ZodNumber;
@@ -2834,13 +2145,23 @@ export declare const ResumeStartedEventSchema: z.ZodObject<{
2834
2145
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2835
2146
  payloadHash: z.ZodOptional<z.ZodString>;
2836
2147
  }, "strip", z.ZodTypeAny, {
2837
- type: "resumeStarted";
2838
2148
  runId: string;
2149
+ type: "cancelRequested";
2839
2150
  schemaVersion: 1;
2840
2151
  eventId: string;
2841
2152
  payload: {
2842
- daemonId: string;
2843
- lastSeenEventId: string;
2153
+ reason: string;
2154
+ by: string;
2155
+ target: {
2156
+ runId: string;
2157
+ kind: "run";
2158
+ } | {
2159
+ nodeId: string;
2160
+ kind: "node";
2161
+ } | {
2162
+ kind: "activity";
2163
+ activityId: string;
2164
+ };
2844
2165
  } | {
2845
2166
  ref: string;
2846
2167
  bytes: number;
@@ -2850,13 +2171,23 @@ export declare const ResumeStartedEventSchema: z.ZodObject<{
2850
2171
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2851
2172
  payloadHash?: string | undefined;
2852
2173
  }, {
2853
- type: "resumeStarted";
2854
2174
  runId: string;
2175
+ type: "cancelRequested";
2855
2176
  schemaVersion: 1;
2856
2177
  eventId: string;
2857
2178
  payload: {
2858
- daemonId: string;
2859
- lastSeenEventId: string;
2179
+ reason: string;
2180
+ by: string;
2181
+ target: {
2182
+ runId: string;
2183
+ kind: "run";
2184
+ } | {
2185
+ nodeId: string;
2186
+ kind: "node";
2187
+ } | {
2188
+ kind: "activity";
2189
+ activityId: string;
2190
+ };
2860
2191
  } | {
2861
2192
  ref: string;
2862
2193
  bytes: number;
@@ -2866,26 +2197,62 @@ export declare const ResumeStartedEventSchema: z.ZodObject<{
2866
2197
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2867
2198
  payloadHash?: string | undefined;
2868
2199
  }>;
2869
- export declare const ReconcileResultEventSchema: z.ZodObject<{
2870
- type: z.ZodLiteral<"reconcileResult">;
2200
+ export declare const CancelDeliveredEventSchema: z.ZodObject<{
2201
+ type: z.ZodLiteral<"cancelDelivered">;
2871
2202
  payload: z.ZodUnion<[z.ZodObject<{
2203
+ target: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
2204
+ kind: z.ZodLiteral<"run">;
2205
+ runId: z.ZodString;
2206
+ }, "strip", z.ZodTypeAny, {
2207
+ runId: string;
2208
+ kind: "run";
2209
+ }, {
2210
+ runId: string;
2211
+ kind: "run";
2212
+ }>, z.ZodObject<{
2213
+ kind: z.ZodLiteral<"node">;
2214
+ nodeId: z.ZodString;
2215
+ }, "strip", z.ZodTypeAny, {
2216
+ nodeId: string;
2217
+ kind: "node";
2218
+ }, {
2219
+ nodeId: string;
2220
+ kind: "node";
2221
+ }>, z.ZodObject<{
2222
+ kind: z.ZodLiteral<"activity">;
2223
+ activityId: z.ZodString;
2224
+ }, "strip", z.ZodTypeAny, {
2225
+ kind: "activity";
2226
+ activityId: string;
2227
+ }, {
2228
+ kind: "activity";
2229
+ activityId: string;
2230
+ }>]>;
2872
2231
  activityId: z.ZodString;
2873
- idempotencyKey: z.ZodString;
2874
- capability: z.ZodEnum<["readOnlyLookup", "idempotentSubmit", "none"]>;
2875
- decision: z.ZodEnum<["replayed", "completedByIdempotentSubmit", "manual", "freshRetry"]>;
2876
- evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2877
2232
  }, "strip", z.ZodTypeAny, {
2878
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2879
2233
  activityId: string;
2880
- idempotencyKey: string;
2881
- decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
2882
- evidence: Record<string, unknown>;
2234
+ target: {
2235
+ runId: string;
2236
+ kind: "run";
2237
+ } | {
2238
+ nodeId: string;
2239
+ kind: "node";
2240
+ } | {
2241
+ kind: "activity";
2242
+ activityId: string;
2243
+ };
2883
2244
  }, {
2884
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2885
2245
  activityId: string;
2886
- idempotencyKey: string;
2887
- decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
2888
- evidence: Record<string, unknown>;
2246
+ target: {
2247
+ runId: string;
2248
+ kind: "run";
2249
+ } | {
2250
+ nodeId: string;
2251
+ kind: "node";
2252
+ } | {
2253
+ kind: "activity";
2254
+ activityId: string;
2255
+ };
2889
2256
  }>, z.ZodObject<{
2890
2257
  ref: z.ZodString;
2891
2258
  bytes: z.ZodNumber;
@@ -2906,16 +2273,22 @@ export declare const ReconcileResultEventSchema: z.ZodObject<{
2906
2273
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2907
2274
  payloadHash: z.ZodOptional<z.ZodString>;
2908
2275
  }, "strip", z.ZodTypeAny, {
2909
- type: "reconcileResult";
2910
2276
  runId: string;
2277
+ type: "cancelDelivered";
2911
2278
  schemaVersion: 1;
2912
2279
  eventId: string;
2913
2280
  payload: {
2914
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2915
2281
  activityId: string;
2916
- idempotencyKey: string;
2917
- decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
2918
- evidence: Record<string, unknown>;
2282
+ target: {
2283
+ runId: string;
2284
+ kind: "run";
2285
+ } | {
2286
+ nodeId: string;
2287
+ kind: "node";
2288
+ } | {
2289
+ kind: "activity";
2290
+ activityId: string;
2291
+ };
2919
2292
  } | {
2920
2293
  ref: string;
2921
2294
  bytes: number;
@@ -2925,16 +2298,22 @@ export declare const ReconcileResultEventSchema: z.ZodObject<{
2925
2298
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2926
2299
  payloadHash?: string | undefined;
2927
2300
  }, {
2928
- type: "reconcileResult";
2929
2301
  runId: string;
2302
+ type: "cancelDelivered";
2930
2303
  schemaVersion: 1;
2931
2304
  eventId: string;
2932
2305
  payload: {
2933
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2934
2306
  activityId: string;
2935
- idempotencyKey: string;
2936
- decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
2937
- evidence: Record<string, unknown>;
2307
+ target: {
2308
+ runId: string;
2309
+ kind: "run";
2310
+ } | {
2311
+ nodeId: string;
2312
+ kind: "node";
2313
+ } | {
2314
+ kind: "activity";
2315
+ activityId: string;
2316
+ };
2938
2317
  } | {
2939
2318
  ref: string;
2940
2319
  bytes: number;
@@ -2944,90 +2323,20 @@ export declare const ReconcileResultEventSchema: z.ZodObject<{
2944
2323
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2945
2324
  payloadHash?: string | undefined;
2946
2325
  }>;
2947
- /**
2948
- * The discriminated union over all 31 event types — pure, no refinements.
2949
- *
2950
- * Why pure: zod's `.superRefine` wraps the union in `ZodEffects`, which
2951
- * breaks `z.infer<>` narrowing on the discriminator at compile time
2952
- * (`switch (e.type)` won't exhaustively narrow). The payloadHash
2953
- * invariant (events doc §1.1) lives in `parseEvent` / `safeParseEvent`
2954
- * instead, applied as a post-parse check.
2955
- */
2956
- export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2957
- type: z.ZodLiteral<"runCreated">;
2326
+ export declare const ActivityCanceledEventSchema: z.ZodObject<{
2327
+ type: z.ZodLiteral<"activityCanceled">;
2958
2328
  payload: z.ZodUnion<[z.ZodObject<{
2959
- workflowId: z.ZodString;
2960
- revisionId: z.ZodString;
2961
- inputRef: z.ZodObject<{
2962
- outputHash: z.ZodString;
2963
- outputPath: z.ZodOptional<z.ZodString>;
2964
- outputBytes: z.ZodNumber;
2965
- outputSchemaVersion: z.ZodNumber;
2966
- contentType: z.ZodOptional<z.ZodString>;
2967
- }, "strip", z.ZodTypeAny, {
2968
- outputHash: string;
2969
- outputBytes: number;
2970
- outputSchemaVersion: number;
2971
- outputPath?: string | undefined;
2972
- contentType?: string | undefined;
2973
- }, {
2974
- outputHash: string;
2975
- outputBytes: number;
2976
- outputSchemaVersion: number;
2977
- outputPath?: string | undefined;
2978
- contentType?: string | undefined;
2979
- }>;
2980
- initiator: z.ZodString;
2981
- botSnapshots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2982
- larkAppId: z.ZodOptional<z.ZodString>;
2983
- cliId: z.ZodOptional<z.ZodString>;
2984
- displayName: z.ZodOptional<z.ZodString>;
2985
- workingDir: z.ZodOptional<z.ZodString>;
2986
- }, "strip", z.ZodTypeAny, {
2987
- larkAppId?: string | undefined;
2988
- cliId?: string | undefined;
2989
- workingDir?: string | undefined;
2990
- displayName?: string | undefined;
2991
- }, {
2992
- larkAppId?: string | undefined;
2993
- cliId?: string | undefined;
2994
- workingDir?: string | undefined;
2995
- displayName?: string | undefined;
2996
- }>>>;
2329
+ activityId: z.ZodString;
2330
+ attemptId: z.ZodString;
2331
+ cancelOriginEventId: z.ZodString;
2997
2332
  }, "strip", z.ZodTypeAny, {
2998
- workflowId: string;
2999
- revisionId: string;
3000
- inputRef: {
3001
- outputHash: string;
3002
- outputBytes: number;
3003
- outputSchemaVersion: number;
3004
- outputPath?: string | undefined;
3005
- contentType?: string | undefined;
3006
- };
3007
- initiator: string;
3008
- botSnapshots?: Record<string, {
3009
- larkAppId?: string | undefined;
3010
- cliId?: string | undefined;
3011
- workingDir?: string | undefined;
3012
- displayName?: string | undefined;
3013
- }> | undefined;
2333
+ attemptId: string;
2334
+ activityId: string;
2335
+ cancelOriginEventId: string;
3014
2336
  }, {
3015
- workflowId: string;
3016
- revisionId: string;
3017
- inputRef: {
3018
- outputHash: string;
3019
- outputBytes: number;
3020
- outputSchemaVersion: number;
3021
- outputPath?: string | undefined;
3022
- contentType?: string | undefined;
3023
- };
3024
- initiator: string;
3025
- botSnapshots?: Record<string, {
3026
- larkAppId?: string | undefined;
3027
- cliId?: string | undefined;
3028
- workingDir?: string | undefined;
3029
- displayName?: string | undefined;
3030
- }> | undefined;
2337
+ attemptId: string;
2338
+ activityId: string;
2339
+ cancelOriginEventId: string;
3031
2340
  }>, z.ZodObject<{
3032
2341
  ref: z.ZodString;
3033
2342
  bytes: z.ZodNumber;
@@ -3048,27 +2357,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3048
2357
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3049
2358
  payloadHash: z.ZodOptional<z.ZodString>;
3050
2359
  }, "strip", z.ZodTypeAny, {
3051
- type: "runCreated";
3052
2360
  runId: string;
2361
+ type: "activityCanceled";
3053
2362
  schemaVersion: 1;
3054
2363
  eventId: string;
3055
2364
  payload: {
3056
- workflowId: string;
3057
- revisionId: string;
3058
- inputRef: {
3059
- outputHash: string;
3060
- outputBytes: number;
3061
- outputSchemaVersion: number;
3062
- outputPath?: string | undefined;
3063
- contentType?: string | undefined;
3064
- };
3065
- initiator: string;
3066
- botSnapshots?: Record<string, {
3067
- larkAppId?: string | undefined;
3068
- cliId?: string | undefined;
3069
- workingDir?: string | undefined;
3070
- displayName?: string | undefined;
3071
- }> | undefined;
2365
+ attemptId: string;
2366
+ activityId: string;
2367
+ cancelOriginEventId: string;
3072
2368
  } | {
3073
2369
  ref: string;
3074
2370
  bytes: number;
@@ -3078,27 +2374,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3078
2374
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3079
2375
  payloadHash?: string | undefined;
3080
2376
  }, {
3081
- type: "runCreated";
3082
2377
  runId: string;
3083
- schemaVersion: 1;
3084
- eventId: string;
3085
- payload: {
3086
- workflowId: string;
3087
- revisionId: string;
3088
- inputRef: {
3089
- outputHash: string;
3090
- outputBytes: number;
3091
- outputSchemaVersion: number;
3092
- outputPath?: string | undefined;
3093
- contentType?: string | undefined;
3094
- };
3095
- initiator: string;
3096
- botSnapshots?: Record<string, {
3097
- larkAppId?: string | undefined;
3098
- cliId?: string | undefined;
3099
- workingDir?: string | undefined;
3100
- displayName?: string | undefined;
3101
- }> | undefined;
2378
+ type: "activityCanceled";
2379
+ schemaVersion: 1;
2380
+ eventId: string;
2381
+ payload: {
2382
+ attemptId: string;
2383
+ activityId: string;
2384
+ cancelOriginEventId: string;
3102
2385
  } | {
3103
2386
  ref: string;
3104
2387
  bytes: number;
@@ -3107,9 +2390,19 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3107
2390
  timestamp: number;
3108
2391
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3109
2392
  payloadHash?: string | undefined;
3110
- }>, z.ZodObject<{
3111
- type: z.ZodLiteral<"runStarted">;
3112
- payload: z.ZodUnion<[z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>, z.ZodObject<{
2393
+ }>;
2394
+ export declare const WorkerLostEventSchema: z.ZodObject<{
2395
+ type: z.ZodLiteral<"workerLost">;
2396
+ payload: z.ZodUnion<[z.ZodObject<{
2397
+ workerId: z.ZodString;
2398
+ lostActivityIds: z.ZodArray<z.ZodString, "many">;
2399
+ }, "strip", z.ZodTypeAny, {
2400
+ workerId: string;
2401
+ lostActivityIds: string[];
2402
+ }, {
2403
+ workerId: string;
2404
+ lostActivityIds: string[];
2405
+ }>, z.ZodObject<{
3113
2406
  ref: z.ZodString;
3114
2407
  bytes: z.ZodNumber;
3115
2408
  schemaVersion: z.ZodNumber;
@@ -3129,11 +2422,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3129
2422
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3130
2423
  payloadHash: z.ZodOptional<z.ZodString>;
3131
2424
  }, "strip", z.ZodTypeAny, {
3132
- type: "runStarted";
3133
2425
  runId: string;
2426
+ type: "workerLost";
3134
2427
  schemaVersion: 1;
3135
2428
  eventId: string;
3136
- payload: {} | {
2429
+ payload: {
2430
+ workerId: string;
2431
+ lostActivityIds: string[];
2432
+ } | {
3137
2433
  ref: string;
3138
2434
  bytes: number;
3139
2435
  schemaVersion: number;
@@ -3142,11 +2438,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3142
2438
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3143
2439
  payloadHash?: string | undefined;
3144
2440
  }, {
3145
- type: "runStarted";
3146
2441
  runId: string;
2442
+ type: "workerLost";
3147
2443
  schemaVersion: 1;
3148
2444
  eventId: string;
3149
- payload: {} | {
2445
+ payload: {
2446
+ workerId: string;
2447
+ lostActivityIds: string[];
2448
+ } | {
3150
2449
  ref: string;
3151
2450
  bytes: number;
3152
2451
  schemaVersion: number;
@@ -3154,44 +2453,18 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3154
2453
  timestamp: number;
3155
2454
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3156
2455
  payloadHash?: string | undefined;
3157
- }>, z.ZodObject<{
3158
- type: z.ZodLiteral<"runSucceeded">;
2456
+ }>;
2457
+ export declare const ResumeStartedEventSchema: z.ZodObject<{
2458
+ type: z.ZodLiteral<"resumeStarted">;
3159
2459
  payload: z.ZodUnion<[z.ZodObject<{
3160
- outputRef: z.ZodObject<{
3161
- outputHash: z.ZodString;
3162
- outputPath: z.ZodOptional<z.ZodString>;
3163
- outputBytes: z.ZodNumber;
3164
- outputSchemaVersion: z.ZodNumber;
3165
- contentType: z.ZodOptional<z.ZodString>;
3166
- }, "strip", z.ZodTypeAny, {
3167
- outputHash: string;
3168
- outputBytes: number;
3169
- outputSchemaVersion: number;
3170
- outputPath?: string | undefined;
3171
- contentType?: string | undefined;
3172
- }, {
3173
- outputHash: string;
3174
- outputBytes: number;
3175
- outputSchemaVersion: number;
3176
- outputPath?: string | undefined;
3177
- contentType?: string | undefined;
3178
- }>;
2460
+ daemonId: z.ZodString;
2461
+ lastSeenEventId: z.ZodString;
3179
2462
  }, "strip", z.ZodTypeAny, {
3180
- outputRef: {
3181
- outputHash: string;
3182
- outputBytes: number;
3183
- outputSchemaVersion: number;
3184
- outputPath?: string | undefined;
3185
- contentType?: string | undefined;
3186
- };
2463
+ daemonId: string;
2464
+ lastSeenEventId: string;
3187
2465
  }, {
3188
- outputRef: {
3189
- outputHash: string;
3190
- outputBytes: number;
3191
- outputSchemaVersion: number;
3192
- outputPath?: string | undefined;
3193
- contentType?: string | undefined;
3194
- };
2466
+ daemonId: string;
2467
+ lastSeenEventId: string;
3195
2468
  }>, z.ZodObject<{
3196
2469
  ref: z.ZodString;
3197
2470
  bytes: z.ZodNumber;
@@ -3212,18 +2485,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3212
2485
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3213
2486
  payloadHash: z.ZodOptional<z.ZodString>;
3214
2487
  }, "strip", z.ZodTypeAny, {
3215
- type: "runSucceeded";
3216
2488
  runId: string;
2489
+ type: "resumeStarted";
3217
2490
  schemaVersion: 1;
3218
2491
  eventId: string;
3219
2492
  payload: {
3220
- outputRef: {
3221
- outputHash: string;
3222
- outputBytes: number;
3223
- outputSchemaVersion: number;
3224
- outputPath?: string | undefined;
3225
- contentType?: string | undefined;
3226
- };
2493
+ daemonId: string;
2494
+ lastSeenEventId: string;
3227
2495
  } | {
3228
2496
  ref: string;
3229
2497
  bytes: number;
@@ -3233,18 +2501,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3233
2501
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3234
2502
  payloadHash?: string | undefined;
3235
2503
  }, {
3236
- type: "runSucceeded";
3237
2504
  runId: string;
2505
+ type: "resumeStarted";
3238
2506
  schemaVersion: 1;
3239
2507
  eventId: string;
3240
2508
  payload: {
3241
- outputRef: {
3242
- outputHash: string;
3243
- outputBytes: number;
3244
- outputSchemaVersion: number;
3245
- outputPath?: string | undefined;
3246
- contentType?: string | undefined;
3247
- };
2509
+ daemonId: string;
2510
+ lastSeenEventId: string;
3248
2511
  } | {
3249
2512
  ref: string;
3250
2513
  bytes: number;
@@ -3253,17 +2516,27 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3253
2516
  timestamp: number;
3254
2517
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3255
2518
  payloadHash?: string | undefined;
3256
- }>, z.ZodObject<{
3257
- type: z.ZodLiteral<"runFailed">;
2519
+ }>;
2520
+ export declare const ReconcileResultEventSchema: z.ZodObject<{
2521
+ type: z.ZodLiteral<"reconcileResult">;
3258
2522
  payload: z.ZodUnion<[z.ZodObject<{
3259
- failedNodeId: z.ZodString;
3260
- rootCauseEventId: z.ZodString;
2523
+ activityId: z.ZodString;
2524
+ idempotencyKey: z.ZodString;
2525
+ capability: z.ZodEnum<["readOnlyLookup", "idempotentSubmit", "none"]>;
2526
+ decision: z.ZodEnum<["replayed", "completedByIdempotentSubmit", "manual", "freshRetry"]>;
2527
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3261
2528
  }, "strip", z.ZodTypeAny, {
3262
- failedNodeId: string;
3263
- rootCauseEventId: string;
2529
+ activityId: string;
2530
+ idempotencyKey: string;
2531
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2532
+ decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
2533
+ evidence: Record<string, unknown>;
3264
2534
  }, {
3265
- failedNodeId: string;
3266
- rootCauseEventId: string;
2535
+ activityId: string;
2536
+ idempotencyKey: string;
2537
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2538
+ decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
2539
+ evidence: Record<string, unknown>;
3267
2540
  }>, z.ZodObject<{
3268
2541
  ref: z.ZodString;
3269
2542
  bytes: z.ZodNumber;
@@ -3284,13 +2557,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3284
2557
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3285
2558
  payloadHash: z.ZodOptional<z.ZodString>;
3286
2559
  }, "strip", z.ZodTypeAny, {
3287
- type: "runFailed";
3288
2560
  runId: string;
2561
+ type: "reconcileResult";
3289
2562
  schemaVersion: 1;
3290
2563
  eventId: string;
3291
2564
  payload: {
3292
- failedNodeId: string;
3293
- rootCauseEventId: string;
2565
+ activityId: string;
2566
+ idempotencyKey: string;
2567
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2568
+ decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
2569
+ evidence: Record<string, unknown>;
3294
2570
  } | {
3295
2571
  ref: string;
3296
2572
  bytes: number;
@@ -3300,13 +2576,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3300
2576
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3301
2577
  payloadHash?: string | undefined;
3302
2578
  }, {
3303
- type: "runFailed";
3304
2579
  runId: string;
2580
+ type: "reconcileResult";
3305
2581
  schemaVersion: 1;
3306
2582
  eventId: string;
3307
2583
  payload: {
3308
- failedNodeId: string;
3309
- rootCauseEventId: string;
2584
+ activityId: string;
2585
+ idempotencyKey: string;
2586
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2587
+ decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
2588
+ evidence: Record<string, unknown>;
3310
2589
  } | {
3311
2590
  ref: string;
3312
2591
  bytes: number;
@@ -3315,14 +2594,91 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3315
2594
  timestamp: number;
3316
2595
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3317
2596
  payloadHash?: string | undefined;
3318
- }>, z.ZodObject<{
3319
- type: z.ZodLiteral<"runCanceled">;
2597
+ }>;
2598
+ /**
2599
+ * The discriminated union over all 31 event types — pure, no refinements.
2600
+ *
2601
+ * Why pure: zod's `.superRefine` wraps the union in `ZodEffects`, which
2602
+ * breaks `z.infer<>` narrowing on the discriminator at compile time
2603
+ * (`switch (e.type)` won't exhaustively narrow). The payloadHash
2604
+ * invariant (events doc §1.1) lives in `parseEvent` / `safeParseEvent`
2605
+ * instead, applied as a post-parse check.
2606
+ */
2607
+ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2608
+ type: z.ZodLiteral<"runCreated">;
3320
2609
  payload: z.ZodUnion<[z.ZodObject<{
3321
- cancelOriginEventId: z.ZodString;
2610
+ workflowId: z.ZodString;
2611
+ revisionId: z.ZodString;
2612
+ inputRef: z.ZodObject<{
2613
+ outputHash: z.ZodString;
2614
+ outputPath: z.ZodOptional<z.ZodString>;
2615
+ outputBytes: z.ZodNumber;
2616
+ outputSchemaVersion: z.ZodNumber;
2617
+ contentType: z.ZodOptional<z.ZodString>;
2618
+ }, "strip", z.ZodTypeAny, {
2619
+ outputHash: string;
2620
+ outputBytes: number;
2621
+ outputSchemaVersion: number;
2622
+ outputPath?: string | undefined;
2623
+ contentType?: string | undefined;
2624
+ }, {
2625
+ outputHash: string;
2626
+ outputBytes: number;
2627
+ outputSchemaVersion: number;
2628
+ outputPath?: string | undefined;
2629
+ contentType?: string | undefined;
2630
+ }>;
2631
+ initiator: z.ZodString;
2632
+ botSnapshots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
2633
+ larkAppId: z.ZodOptional<z.ZodString>;
2634
+ cliId: z.ZodOptional<z.ZodString>;
2635
+ displayName: z.ZodOptional<z.ZodString>;
2636
+ workingDir: z.ZodOptional<z.ZodString>;
2637
+ }, "strip", z.ZodTypeAny, {
2638
+ larkAppId?: string | undefined;
2639
+ cliId?: string | undefined;
2640
+ workingDir?: string | undefined;
2641
+ displayName?: string | undefined;
2642
+ }, {
2643
+ larkAppId?: string | undefined;
2644
+ cliId?: string | undefined;
2645
+ workingDir?: string | undefined;
2646
+ displayName?: string | undefined;
2647
+ }>>>;
3322
2648
  }, "strip", z.ZodTypeAny, {
3323
- cancelOriginEventId: string;
2649
+ workflowId: string;
2650
+ revisionId: string;
2651
+ inputRef: {
2652
+ outputHash: string;
2653
+ outputBytes: number;
2654
+ outputSchemaVersion: number;
2655
+ outputPath?: string | undefined;
2656
+ contentType?: string | undefined;
2657
+ };
2658
+ initiator: string;
2659
+ botSnapshots?: Record<string, {
2660
+ larkAppId?: string | undefined;
2661
+ cliId?: string | undefined;
2662
+ workingDir?: string | undefined;
2663
+ displayName?: string | undefined;
2664
+ }> | undefined;
3324
2665
  }, {
3325
- cancelOriginEventId: string;
2666
+ workflowId: string;
2667
+ revisionId: string;
2668
+ inputRef: {
2669
+ outputHash: string;
2670
+ outputBytes: number;
2671
+ outputSchemaVersion: number;
2672
+ outputPath?: string | undefined;
2673
+ contentType?: string | undefined;
2674
+ };
2675
+ initiator: string;
2676
+ botSnapshots?: Record<string, {
2677
+ larkAppId?: string | undefined;
2678
+ cliId?: string | undefined;
2679
+ workingDir?: string | undefined;
2680
+ displayName?: string | undefined;
2681
+ }> | undefined;
3326
2682
  }>, z.ZodObject<{
3327
2683
  ref: z.ZodString;
3328
2684
  bytes: z.ZodNumber;
@@ -3343,12 +2699,27 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3343
2699
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3344
2700
  payloadHash: z.ZodOptional<z.ZodString>;
3345
2701
  }, "strip", z.ZodTypeAny, {
3346
- type: "runCanceled";
3347
2702
  runId: string;
2703
+ type: "runCreated";
3348
2704
  schemaVersion: 1;
3349
2705
  eventId: string;
3350
2706
  payload: {
3351
- cancelOriginEventId: string;
2707
+ workflowId: string;
2708
+ revisionId: string;
2709
+ inputRef: {
2710
+ outputHash: string;
2711
+ outputBytes: number;
2712
+ outputSchemaVersion: number;
2713
+ outputPath?: string | undefined;
2714
+ contentType?: string | undefined;
2715
+ };
2716
+ initiator: string;
2717
+ botSnapshots?: Record<string, {
2718
+ larkAppId?: string | undefined;
2719
+ cliId?: string | undefined;
2720
+ workingDir?: string | undefined;
2721
+ displayName?: string | undefined;
2722
+ }> | undefined;
3352
2723
  } | {
3353
2724
  ref: string;
3354
2725
  bytes: number;
@@ -3358,12 +2729,27 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3358
2729
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3359
2730
  payloadHash?: string | undefined;
3360
2731
  }, {
3361
- type: "runCanceled";
3362
2732
  runId: string;
2733
+ type: "runCreated";
3363
2734
  schemaVersion: 1;
3364
2735
  eventId: string;
3365
2736
  payload: {
3366
- cancelOriginEventId: string;
2737
+ workflowId: string;
2738
+ revisionId: string;
2739
+ inputRef: {
2740
+ outputHash: string;
2741
+ outputBytes: number;
2742
+ outputSchemaVersion: number;
2743
+ outputPath?: string | undefined;
2744
+ contentType?: string | undefined;
2745
+ };
2746
+ initiator: string;
2747
+ botSnapshots?: Record<string, {
2748
+ larkAppId?: string | undefined;
2749
+ cliId?: string | undefined;
2750
+ workingDir?: string | undefined;
2751
+ displayName?: string | undefined;
2752
+ }> | undefined;
3367
2753
  } | {
3368
2754
  ref: string;
3369
2755
  bytes: number;
@@ -3373,20 +2759,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3373
2759
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3374
2760
  payloadHash?: string | undefined;
3375
2761
  }>, z.ZodObject<{
3376
- type: z.ZodLiteral<"nodeWaiting">;
3377
- payload: z.ZodUnion<[z.ZodObject<{
3378
- nodeId: z.ZodString;
3379
- waitReason: z.ZodString;
3380
- deadlineAt: z.ZodOptional<z.ZodNumber>;
3381
- }, "strip", z.ZodTypeAny, {
3382
- nodeId: string;
3383
- waitReason: string;
3384
- deadlineAt?: number | undefined;
3385
- }, {
3386
- nodeId: string;
3387
- waitReason: string;
3388
- deadlineAt?: number | undefined;
3389
- }>, z.ZodObject<{
2762
+ type: z.ZodLiteral<"runStarted">;
2763
+ payload: z.ZodUnion<[z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>, z.ZodObject<{
3390
2764
  ref: z.ZodString;
3391
2765
  bytes: z.ZodNumber;
3392
2766
  schemaVersion: z.ZodNumber;
@@ -3406,15 +2780,11 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3406
2780
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3407
2781
  payloadHash: z.ZodOptional<z.ZodString>;
3408
2782
  }, "strip", z.ZodTypeAny, {
3409
- type: "nodeWaiting";
3410
2783
  runId: string;
2784
+ type: "runStarted";
3411
2785
  schemaVersion: 1;
3412
2786
  eventId: string;
3413
- payload: {
3414
- nodeId: string;
3415
- waitReason: string;
3416
- deadlineAt?: number | undefined;
3417
- } | {
2787
+ payload: {} | {
3418
2788
  ref: string;
3419
2789
  bytes: number;
3420
2790
  schemaVersion: number;
@@ -3423,15 +2793,11 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3423
2793
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3424
2794
  payloadHash?: string | undefined;
3425
2795
  }, {
3426
- type: "nodeWaiting";
3427
2796
  runId: string;
2797
+ type: "runStarted";
3428
2798
  schemaVersion: 1;
3429
2799
  eventId: string;
3430
- payload: {
3431
- nodeId: string;
3432
- waitReason: string;
3433
- deadlineAt?: number | undefined;
3434
- } | {
2800
+ payload: {} | {
3435
2801
  ref: string;
3436
2802
  bytes: number;
3437
2803
  schemaVersion: number;
@@ -3440,19 +2806,43 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3440
2806
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3441
2807
  payloadHash?: string | undefined;
3442
2808
  }>, z.ZodObject<{
3443
- type: z.ZodLiteral<"nodeRetrying">;
2809
+ type: z.ZodLiteral<"runSucceeded">;
3444
2810
  payload: z.ZodUnion<[z.ZodObject<{
3445
- nodeId: z.ZodString;
3446
- lastAttemptId: z.ZodString;
3447
- nextBackoffMs: z.ZodNumber;
2811
+ outputRef: z.ZodObject<{
2812
+ outputHash: z.ZodString;
2813
+ outputPath: z.ZodOptional<z.ZodString>;
2814
+ outputBytes: z.ZodNumber;
2815
+ outputSchemaVersion: z.ZodNumber;
2816
+ contentType: z.ZodOptional<z.ZodString>;
2817
+ }, "strip", z.ZodTypeAny, {
2818
+ outputHash: string;
2819
+ outputBytes: number;
2820
+ outputSchemaVersion: number;
2821
+ outputPath?: string | undefined;
2822
+ contentType?: string | undefined;
2823
+ }, {
2824
+ outputHash: string;
2825
+ outputBytes: number;
2826
+ outputSchemaVersion: number;
2827
+ outputPath?: string | undefined;
2828
+ contentType?: string | undefined;
2829
+ }>;
3448
2830
  }, "strip", z.ZodTypeAny, {
3449
- nodeId: string;
3450
- lastAttemptId: string;
3451
- nextBackoffMs: number;
2831
+ outputRef: {
2832
+ outputHash: string;
2833
+ outputBytes: number;
2834
+ outputSchemaVersion: number;
2835
+ outputPath?: string | undefined;
2836
+ contentType?: string | undefined;
2837
+ };
3452
2838
  }, {
3453
- nodeId: string;
3454
- lastAttemptId: string;
3455
- nextBackoffMs: number;
2839
+ outputRef: {
2840
+ outputHash: string;
2841
+ outputBytes: number;
2842
+ outputSchemaVersion: number;
2843
+ outputPath?: string | undefined;
2844
+ contentType?: string | undefined;
2845
+ };
3456
2846
  }>, z.ZodObject<{
3457
2847
  ref: z.ZodString;
3458
2848
  bytes: z.ZodNumber;
@@ -3473,14 +2863,18 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3473
2863
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3474
2864
  payloadHash: z.ZodOptional<z.ZodString>;
3475
2865
  }, "strip", z.ZodTypeAny, {
3476
- type: "nodeRetrying";
3477
2866
  runId: string;
2867
+ type: "runSucceeded";
3478
2868
  schemaVersion: 1;
3479
2869
  eventId: string;
3480
2870
  payload: {
3481
- nodeId: string;
3482
- lastAttemptId: string;
3483
- nextBackoffMs: number;
2871
+ outputRef: {
2872
+ outputHash: string;
2873
+ outputBytes: number;
2874
+ outputSchemaVersion: number;
2875
+ outputPath?: string | undefined;
2876
+ contentType?: string | undefined;
2877
+ };
3484
2878
  } | {
3485
2879
  ref: string;
3486
2880
  bytes: number;
@@ -3490,14 +2884,18 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3490
2884
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3491
2885
  payloadHash?: string | undefined;
3492
2886
  }, {
3493
- type: "nodeRetrying";
3494
2887
  runId: string;
2888
+ type: "runSucceeded";
3495
2889
  schemaVersion: 1;
3496
2890
  eventId: string;
3497
2891
  payload: {
3498
- nodeId: string;
3499
- lastAttemptId: string;
3500
- nextBackoffMs: number;
2892
+ outputRef: {
2893
+ outputHash: string;
2894
+ outputBytes: number;
2895
+ outputSchemaVersion: number;
2896
+ outputPath?: string | undefined;
2897
+ contentType?: string | undefined;
2898
+ };
3501
2899
  } | {
3502
2900
  ref: string;
3503
2901
  bytes: number;
@@ -3507,16 +2905,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3507
2905
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3508
2906
  payloadHash?: string | undefined;
3509
2907
  }>, z.ZodObject<{
3510
- type: z.ZodLiteral<"nodeSucceeded">;
2908
+ type: z.ZodLiteral<"runFailed">;
3511
2909
  payload: z.ZodUnion<[z.ZodObject<{
3512
- nodeId: z.ZodString;
3513
- lastActivityId: z.ZodString;
2910
+ failedNodeId: z.ZodString;
2911
+ rootCauseEventId: z.ZodString;
3514
2912
  }, "strip", z.ZodTypeAny, {
3515
- nodeId: string;
3516
- lastActivityId: string;
2913
+ failedNodeId: string;
2914
+ rootCauseEventId: string;
3517
2915
  }, {
3518
- nodeId: string;
3519
- lastActivityId: string;
2916
+ failedNodeId: string;
2917
+ rootCauseEventId: string;
3520
2918
  }>, z.ZodObject<{
3521
2919
  ref: z.ZodString;
3522
2920
  bytes: z.ZodNumber;
@@ -3537,13 +2935,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3537
2935
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3538
2936
  payloadHash: z.ZodOptional<z.ZodString>;
3539
2937
  }, "strip", z.ZodTypeAny, {
3540
- type: "nodeSucceeded";
3541
2938
  runId: string;
2939
+ type: "runFailed";
3542
2940
  schemaVersion: 1;
3543
2941
  eventId: string;
3544
2942
  payload: {
3545
- nodeId: string;
3546
- lastActivityId: string;
2943
+ failedNodeId: string;
2944
+ rootCauseEventId: string;
3547
2945
  } | {
3548
2946
  ref: string;
3549
2947
  bytes: number;
@@ -3553,13 +2951,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3553
2951
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3554
2952
  payloadHash?: string | undefined;
3555
2953
  }, {
3556
- type: "nodeSucceeded";
3557
2954
  runId: string;
2955
+ type: "runFailed";
3558
2956
  schemaVersion: 1;
3559
2957
  eventId: string;
3560
2958
  payload: {
3561
- nodeId: string;
3562
- lastActivityId: string;
2959
+ failedNodeId: string;
2960
+ rootCauseEventId: string;
3563
2961
  } | {
3564
2962
  ref: string;
3565
2963
  bytes: number;
@@ -3569,19 +2967,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3569
2967
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3570
2968
  payloadHash?: string | undefined;
3571
2969
  }>, z.ZodObject<{
3572
- type: z.ZodLiteral<"nodeFailed">;
2970
+ type: z.ZodLiteral<"runCanceled">;
3573
2971
  payload: z.ZodUnion<[z.ZodObject<{
3574
- nodeId: z.ZodString;
3575
- lastActivityId: z.ZodString;
3576
- errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
2972
+ cancelOriginEventId: z.ZodString;
3577
2973
  }, "strip", z.ZodTypeAny, {
3578
- nodeId: string;
3579
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
3580
- lastActivityId: string;
2974
+ cancelOriginEventId: string;
3581
2975
  }, {
3582
- nodeId: string;
3583
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
3584
- lastActivityId: string;
2976
+ cancelOriginEventId: string;
3585
2977
  }>, z.ZodObject<{
3586
2978
  ref: z.ZodString;
3587
2979
  bytes: z.ZodNumber;
@@ -3602,14 +2994,12 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3602
2994
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3603
2995
  payloadHash: z.ZodOptional<z.ZodString>;
3604
2996
  }, "strip", z.ZodTypeAny, {
3605
- type: "nodeFailed";
3606
2997
  runId: string;
2998
+ type: "runCanceled";
3607
2999
  schemaVersion: 1;
3608
3000
  eventId: string;
3609
3001
  payload: {
3610
- nodeId: string;
3611
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
3612
- lastActivityId: string;
3002
+ cancelOriginEventId: string;
3613
3003
  } | {
3614
3004
  ref: string;
3615
3005
  bytes: number;
@@ -3619,14 +3009,12 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3619
3009
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3620
3010
  payloadHash?: string | undefined;
3621
3011
  }, {
3622
- type: "nodeFailed";
3623
3012
  runId: string;
3013
+ type: "runCanceled";
3624
3014
  schemaVersion: 1;
3625
3015
  eventId: string;
3626
3016
  payload: {
3627
- nodeId: string;
3628
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
3629
- lastActivityId: string;
3017
+ cancelOriginEventId: string;
3630
3018
  } | {
3631
3019
  ref: string;
3632
3020
  bytes: number;
@@ -3636,16 +3024,19 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3636
3024
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3637
3025
  payloadHash?: string | undefined;
3638
3026
  }>, z.ZodObject<{
3639
- type: z.ZodLiteral<"nodeSkipped">;
3027
+ type: z.ZodLiteral<"nodeWaiting">;
3640
3028
  payload: z.ZodUnion<[z.ZodObject<{
3641
3029
  nodeId: z.ZodString;
3642
- conditionEventId: z.ZodString;
3030
+ waitReason: z.ZodString;
3031
+ deadlineAt: z.ZodOptional<z.ZodNumber>;
3643
3032
  }, "strip", z.ZodTypeAny, {
3644
3033
  nodeId: string;
3645
- conditionEventId: string;
3034
+ waitReason: string;
3035
+ deadlineAt?: number | undefined;
3646
3036
  }, {
3647
3037
  nodeId: string;
3648
- conditionEventId: string;
3038
+ waitReason: string;
3039
+ deadlineAt?: number | undefined;
3649
3040
  }>, z.ZodObject<{
3650
3041
  ref: z.ZodString;
3651
3042
  bytes: z.ZodNumber;
@@ -3666,13 +3057,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3666
3057
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3667
3058
  payloadHash: z.ZodOptional<z.ZodString>;
3668
3059
  }, "strip", z.ZodTypeAny, {
3669
- type: "nodeSkipped";
3670
3060
  runId: string;
3061
+ type: "nodeWaiting";
3671
3062
  schemaVersion: 1;
3672
3063
  eventId: string;
3673
3064
  payload: {
3674
3065
  nodeId: string;
3675
- conditionEventId: string;
3066
+ waitReason: string;
3067
+ deadlineAt?: number | undefined;
3676
3068
  } | {
3677
3069
  ref: string;
3678
3070
  bytes: number;
@@ -3682,13 +3074,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3682
3074
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3683
3075
  payloadHash?: string | undefined;
3684
3076
  }, {
3685
- type: "nodeSkipped";
3686
3077
  runId: string;
3078
+ type: "nodeWaiting";
3687
3079
  schemaVersion: 1;
3688
3080
  eventId: string;
3689
3081
  payload: {
3690
3082
  nodeId: string;
3691
- conditionEventId: string;
3083
+ waitReason: string;
3084
+ deadlineAt?: number | undefined;
3692
3085
  } | {
3693
3086
  ref: string;
3694
3087
  bytes: number;
@@ -3698,16 +3091,19 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3698
3091
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3699
3092
  payloadHash?: string | undefined;
3700
3093
  }>, z.ZodObject<{
3701
- type: z.ZodLiteral<"nodeCanceled">;
3094
+ type: z.ZodLiteral<"nodeRetrying">;
3702
3095
  payload: z.ZodUnion<[z.ZodObject<{
3703
3096
  nodeId: z.ZodString;
3704
- cancelOriginEventId: z.ZodString;
3097
+ lastAttemptId: z.ZodString;
3098
+ nextBackoffMs: z.ZodNumber;
3705
3099
  }, "strip", z.ZodTypeAny, {
3706
3100
  nodeId: string;
3707
- cancelOriginEventId: string;
3101
+ lastAttemptId: string;
3102
+ nextBackoffMs: number;
3708
3103
  }, {
3709
3104
  nodeId: string;
3710
- cancelOriginEventId: string;
3105
+ lastAttemptId: string;
3106
+ nextBackoffMs: number;
3711
3107
  }>, z.ZodObject<{
3712
3108
  ref: z.ZodString;
3713
3109
  bytes: z.ZodNumber;
@@ -3728,13 +3124,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3728
3124
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3729
3125
  payloadHash: z.ZodOptional<z.ZodString>;
3730
3126
  }, "strip", z.ZodTypeAny, {
3731
- type: "nodeCanceled";
3732
3127
  runId: string;
3128
+ type: "nodeRetrying";
3733
3129
  schemaVersion: 1;
3734
3130
  eventId: string;
3735
3131
  payload: {
3736
3132
  nodeId: string;
3737
- cancelOriginEventId: string;
3133
+ lastAttemptId: string;
3134
+ nextBackoffMs: number;
3738
3135
  } | {
3739
3136
  ref: string;
3740
3137
  bytes: number;
@@ -3744,13 +3141,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3744
3141
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3745
3142
  payloadHash?: string | undefined;
3746
3143
  }, {
3747
- type: "nodeCanceled";
3748
3144
  runId: string;
3145
+ type: "nodeRetrying";
3749
3146
  schemaVersion: 1;
3750
3147
  eventId: string;
3751
3148
  payload: {
3752
3149
  nodeId: string;
3753
- cancelOriginEventId: string;
3150
+ lastAttemptId: string;
3151
+ nextBackoffMs: number;
3754
3152
  } | {
3755
3153
  ref: string;
3756
3154
  bytes: number;
@@ -3760,19 +3158,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3760
3158
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3761
3159
  payloadHash?: string | undefined;
3762
3160
  }>, z.ZodObject<{
3763
- type: z.ZodLiteral<"activityRunning">;
3161
+ type: z.ZodLiteral<"nodeSucceeded">;
3764
3162
  payload: z.ZodUnion<[z.ZodObject<{
3765
- activityId: z.ZodString;
3766
- attemptId: z.ZodString;
3767
- leaseId: z.ZodString;
3163
+ nodeId: z.ZodString;
3164
+ lastActivityId: z.ZodString;
3768
3165
  }, "strip", z.ZodTypeAny, {
3769
- attemptId: string;
3770
- activityId: string;
3771
- leaseId: string;
3166
+ nodeId: string;
3167
+ lastActivityId: string;
3772
3168
  }, {
3773
- attemptId: string;
3774
- activityId: string;
3775
- leaseId: string;
3169
+ nodeId: string;
3170
+ lastActivityId: string;
3776
3171
  }>, z.ZodObject<{
3777
3172
  ref: z.ZodString;
3778
3173
  bytes: z.ZodNumber;
@@ -3793,14 +3188,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3793
3188
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3794
3189
  payloadHash: z.ZodOptional<z.ZodString>;
3795
3190
  }, "strip", z.ZodTypeAny, {
3796
- type: "activityRunning";
3797
3191
  runId: string;
3192
+ type: "nodeSucceeded";
3798
3193
  schemaVersion: 1;
3799
3194
  eventId: string;
3800
3195
  payload: {
3801
- attemptId: string;
3802
- activityId: string;
3803
- leaseId: string;
3196
+ nodeId: string;
3197
+ lastActivityId: string;
3804
3198
  } | {
3805
3199
  ref: string;
3806
3200
  bytes: number;
@@ -3810,14 +3204,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3810
3204
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3811
3205
  payloadHash?: string | undefined;
3812
3206
  }, {
3813
- type: "activityRunning";
3814
3207
  runId: string;
3208
+ type: "nodeSucceeded";
3815
3209
  schemaVersion: 1;
3816
3210
  eventId: string;
3817
3211
  payload: {
3818
- attemptId: string;
3819
- activityId: string;
3820
- leaseId: string;
3212
+ nodeId: string;
3213
+ lastActivityId: string;
3821
3214
  } | {
3822
3215
  ref: string;
3823
3216
  bytes: number;
@@ -3827,16 +3220,19 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3827
3220
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3828
3221
  payloadHash?: string | undefined;
3829
3222
  }>, z.ZodObject<{
3830
- type: z.ZodLiteral<"activityWaiting">;
3223
+ type: z.ZodLiteral<"nodeFailed">;
3831
3224
  payload: z.ZodUnion<[z.ZodObject<{
3832
- activityId: z.ZodString;
3833
- reason: z.ZodString;
3225
+ nodeId: z.ZodString;
3226
+ lastActivityId: z.ZodString;
3227
+ errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
3834
3228
  }, "strip", z.ZodTypeAny, {
3835
- reason: string;
3836
- activityId: string;
3229
+ nodeId: string;
3230
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
3231
+ lastActivityId: string;
3837
3232
  }, {
3838
- reason: string;
3839
- activityId: string;
3233
+ nodeId: string;
3234
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
3235
+ lastActivityId: string;
3840
3236
  }>, z.ZodObject<{
3841
3237
  ref: z.ZodString;
3842
3238
  bytes: z.ZodNumber;
@@ -3857,13 +3253,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3857
3253
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3858
3254
  payloadHash: z.ZodOptional<z.ZodString>;
3859
3255
  }, "strip", z.ZodTypeAny, {
3860
- type: "activityWaiting";
3861
3256
  runId: string;
3257
+ type: "nodeFailed";
3862
3258
  schemaVersion: 1;
3863
3259
  eventId: string;
3864
3260
  payload: {
3865
- reason: string;
3866
- activityId: string;
3261
+ nodeId: string;
3262
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
3263
+ lastActivityId: string;
3867
3264
  } | {
3868
3265
  ref: string;
3869
3266
  bytes: number;
@@ -3873,13 +3270,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3873
3270
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3874
3271
  payloadHash?: string | undefined;
3875
3272
  }, {
3876
- type: "activityWaiting";
3877
3273
  runId: string;
3274
+ type: "nodeFailed";
3878
3275
  schemaVersion: 1;
3879
3276
  eventId: string;
3880
3277
  payload: {
3881
- reason: string;
3882
- activityId: string;
3278
+ nodeId: string;
3279
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
3280
+ lastActivityId: string;
3883
3281
  } | {
3884
3282
  ref: string;
3885
3283
  bytes: number;
@@ -3889,25 +3287,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3889
3287
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3890
3288
  payloadHash?: string | undefined;
3891
3289
  }>, z.ZodObject<{
3892
- type: z.ZodLiteral<"activityTimedOut">;
3290
+ type: z.ZodLiteral<"nodeSkipped">;
3893
3291
  payload: z.ZodUnion<[z.ZodObject<{
3894
- activityId: z.ZodString;
3895
- attemptId: z.ZodString;
3896
- runningMs: z.ZodNumber;
3897
- reason: z.ZodLiteral<"LeaseExpired">;
3898
- errorClass: z.ZodLiteral<"retryable">;
3292
+ nodeId: z.ZodString;
3293
+ conditionEventId: z.ZodString;
3899
3294
  }, "strip", z.ZodTypeAny, {
3900
- reason: "LeaseExpired";
3901
- attemptId: string;
3902
- errorClass: "retryable";
3903
- activityId: string;
3904
- runningMs: number;
3295
+ nodeId: string;
3296
+ conditionEventId: string;
3905
3297
  }, {
3906
- reason: "LeaseExpired";
3907
- attemptId: string;
3908
- errorClass: "retryable";
3909
- activityId: string;
3910
- runningMs: number;
3298
+ nodeId: string;
3299
+ conditionEventId: string;
3911
3300
  }>, z.ZodObject<{
3912
3301
  ref: z.ZodString;
3913
3302
  bytes: z.ZodNumber;
@@ -3928,16 +3317,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3928
3317
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3929
3318
  payloadHash: z.ZodOptional<z.ZodString>;
3930
3319
  }, "strip", z.ZodTypeAny, {
3931
- type: "activityTimedOut";
3932
3320
  runId: string;
3321
+ type: "nodeSkipped";
3933
3322
  schemaVersion: 1;
3934
3323
  eventId: string;
3935
3324
  payload: {
3936
- reason: "LeaseExpired";
3937
- attemptId: string;
3938
- errorClass: "retryable";
3939
- activityId: string;
3940
- runningMs: number;
3325
+ nodeId: string;
3326
+ conditionEventId: string;
3941
3327
  } | {
3942
3328
  ref: string;
3943
3329
  bytes: number;
@@ -3947,16 +3333,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3947
3333
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3948
3334
  payloadHash?: string | undefined;
3949
3335
  }, {
3950
- type: "activityTimedOut";
3951
3336
  runId: string;
3337
+ type: "nodeSkipped";
3952
3338
  schemaVersion: 1;
3953
3339
  eventId: string;
3954
3340
  payload: {
3955
- reason: "LeaseExpired";
3956
- attemptId: string;
3957
- errorClass: "retryable";
3958
- activityId: string;
3959
- runningMs: number;
3341
+ nodeId: string;
3342
+ conditionEventId: string;
3960
3343
  } | {
3961
3344
  ref: string;
3962
3345
  bytes: number;
@@ -3966,16 +3349,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3966
3349
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3967
3350
  payloadHash?: string | undefined;
3968
3351
  }>, z.ZodObject<{
3969
- type: z.ZodLiteral<"loopStarted">;
3352
+ type: z.ZodLiteral<"nodeCanceled">;
3970
3353
  payload: z.ZodUnion<[z.ZodObject<{
3971
- loopId: z.ZodString;
3972
- maxIterations: z.ZodNumber;
3354
+ nodeId: z.ZodString;
3355
+ cancelOriginEventId: z.ZodString;
3973
3356
  }, "strip", z.ZodTypeAny, {
3974
- loopId: string;
3975
- maxIterations: number;
3357
+ nodeId: string;
3358
+ cancelOriginEventId: string;
3976
3359
  }, {
3977
- loopId: string;
3978
- maxIterations: number;
3360
+ nodeId: string;
3361
+ cancelOriginEventId: string;
3979
3362
  }>, z.ZodObject<{
3980
3363
  ref: z.ZodString;
3981
3364
  bytes: z.ZodNumber;
@@ -3996,13 +3379,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3996
3379
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3997
3380
  payloadHash: z.ZodOptional<z.ZodString>;
3998
3381
  }, "strip", z.ZodTypeAny, {
3999
- type: "loopStarted";
4000
3382
  runId: string;
3383
+ type: "nodeCanceled";
4001
3384
  schemaVersion: 1;
4002
3385
  eventId: string;
4003
3386
  payload: {
4004
- loopId: string;
4005
- maxIterations: number;
3387
+ nodeId: string;
3388
+ cancelOriginEventId: string;
4006
3389
  } | {
4007
3390
  ref: string;
4008
3391
  bytes: number;
@@ -4012,13 +3395,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4012
3395
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4013
3396
  payloadHash?: string | undefined;
4014
3397
  }, {
4015
- type: "loopStarted";
4016
3398
  runId: string;
3399
+ type: "nodeCanceled";
4017
3400
  schemaVersion: 1;
4018
3401
  eventId: string;
4019
3402
  payload: {
4020
- loopId: string;
4021
- maxIterations: number;
3403
+ nodeId: string;
3404
+ cancelOriginEventId: string;
4022
3405
  } | {
4023
3406
  ref: string;
4024
3407
  bytes: number;
@@ -4028,19 +3411,19 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4028
3411
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4029
3412
  payloadHash?: string | undefined;
4030
3413
  }>, z.ZodObject<{
4031
- type: z.ZodLiteral<"loopIterationStarted">;
3414
+ type: z.ZodLiteral<"activityRunning">;
4032
3415
  payload: z.ZodUnion<[z.ZodObject<{
4033
- loopId: z.ZodString;
4034
- iteration: z.ZodNumber;
4035
- prevResolution: z.ZodEnum<["initial", "rejected"]>;
3416
+ activityId: z.ZodString;
3417
+ attemptId: z.ZodString;
3418
+ leaseId: z.ZodString;
4036
3419
  }, "strip", z.ZodTypeAny, {
4037
- loopId: string;
4038
- iteration: number;
4039
- prevResolution: "rejected" | "initial";
3420
+ attemptId: string;
3421
+ activityId: string;
3422
+ leaseId: string;
4040
3423
  }, {
4041
- loopId: string;
4042
- iteration: number;
4043
- prevResolution: "rejected" | "initial";
3424
+ attemptId: string;
3425
+ activityId: string;
3426
+ leaseId: string;
4044
3427
  }>, z.ZodObject<{
4045
3428
  ref: z.ZodString;
4046
3429
  bytes: z.ZodNumber;
@@ -4061,14 +3444,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4061
3444
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4062
3445
  payloadHash: z.ZodOptional<z.ZodString>;
4063
3446
  }, "strip", z.ZodTypeAny, {
4064
- type: "loopIterationStarted";
4065
3447
  runId: string;
3448
+ type: "activityRunning";
4066
3449
  schemaVersion: 1;
4067
3450
  eventId: string;
4068
3451
  payload: {
4069
- loopId: string;
4070
- iteration: number;
4071
- prevResolution: "rejected" | "initial";
3452
+ attemptId: string;
3453
+ activityId: string;
3454
+ leaseId: string;
4072
3455
  } | {
4073
3456
  ref: string;
4074
3457
  bytes: number;
@@ -4078,14 +3461,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4078
3461
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4079
3462
  payloadHash?: string | undefined;
4080
3463
  }, {
4081
- type: "loopIterationStarted";
4082
3464
  runId: string;
3465
+ type: "activityRunning";
4083
3466
  schemaVersion: 1;
4084
3467
  eventId: string;
4085
3468
  payload: {
4086
- loopId: string;
4087
- iteration: number;
4088
- prevResolution: "rejected" | "initial";
3469
+ attemptId: string;
3470
+ activityId: string;
3471
+ leaseId: string;
4089
3472
  } | {
4090
3473
  ref: string;
4091
3474
  bytes: number;
@@ -4095,34 +3478,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4095
3478
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4096
3479
  payloadHash?: string | undefined;
4097
3480
  }>, z.ZodObject<{
4098
- type: z.ZodLiteral<"loopIterationFinished">;
3481
+ type: z.ZodLiteral<"activityWaiting">;
4099
3482
  payload: z.ZodUnion<[z.ZodObject<{
4100
- loopId: z.ZodString;
4101
- iteration: z.ZodNumber;
4102
- resolution: z.ZodEnum<["approved", "rejected"]>;
4103
- decisionActivityId: z.ZodString;
4104
- waitResolvedEventId: z.ZodString;
4105
- by: z.ZodString;
4106
- comment: z.ZodOptional<z.ZodString>;
4107
- timedOut: z.ZodOptional<z.ZodBoolean>;
3483
+ activityId: z.ZodString;
3484
+ reason: z.ZodString;
4108
3485
  }, "strip", z.ZodTypeAny, {
4109
- loopId: string;
4110
- iteration: number;
4111
- resolution: "approved" | "rejected";
4112
- decisionActivityId: string;
4113
- waitResolvedEventId: string;
4114
- by: string;
4115
- timedOut?: boolean | undefined;
4116
- comment?: string | undefined;
3486
+ reason: string;
3487
+ activityId: string;
4117
3488
  }, {
4118
- loopId: string;
4119
- iteration: number;
4120
- resolution: "approved" | "rejected";
4121
- decisionActivityId: string;
4122
- waitResolvedEventId: string;
4123
- by: string;
4124
- timedOut?: boolean | undefined;
4125
- comment?: string | undefined;
3489
+ reason: string;
3490
+ activityId: string;
4126
3491
  }>, z.ZodObject<{
4127
3492
  ref: z.ZodString;
4128
3493
  bytes: z.ZodNumber;
@@ -4143,19 +3508,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4143
3508
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4144
3509
  payloadHash: z.ZodOptional<z.ZodString>;
4145
3510
  }, "strip", z.ZodTypeAny, {
4146
- type: "loopIterationFinished";
4147
3511
  runId: string;
3512
+ type: "activityWaiting";
4148
3513
  schemaVersion: 1;
4149
3514
  eventId: string;
4150
3515
  payload: {
4151
- loopId: string;
4152
- iteration: number;
4153
- resolution: "approved" | "rejected";
4154
- decisionActivityId: string;
4155
- waitResolvedEventId: string;
4156
- by: string;
4157
- timedOut?: boolean | undefined;
4158
- comment?: string | undefined;
3516
+ reason: string;
3517
+ activityId: string;
4159
3518
  } | {
4160
3519
  ref: string;
4161
3520
  bytes: number;
@@ -4165,19 +3524,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4165
3524
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4166
3525
  payloadHash?: string | undefined;
4167
3526
  }, {
4168
- type: "loopIterationFinished";
4169
3527
  runId: string;
3528
+ type: "activityWaiting";
4170
3529
  schemaVersion: 1;
4171
3530
  eventId: string;
4172
3531
  payload: {
4173
- loopId: string;
4174
- iteration: number;
4175
- resolution: "approved" | "rejected";
4176
- decisionActivityId: string;
4177
- waitResolvedEventId: string;
4178
- by: string;
4179
- timedOut?: boolean | undefined;
4180
- comment?: string | undefined;
3532
+ reason: string;
3533
+ activityId: string;
4181
3534
  } | {
4182
3535
  ref: string;
4183
3536
  bytes: number;
@@ -4187,58 +3540,25 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4187
3540
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4188
3541
  payloadHash?: string | undefined;
4189
3542
  }>, z.ZodObject<{
4190
- type: z.ZodLiteral<"loopFinished">;
3543
+ type: z.ZodLiteral<"activityTimedOut">;
4191
3544
  payload: z.ZodUnion<[z.ZodObject<{
4192
- loopId: z.ZodString;
4193
- finalIteration: z.ZodNumber;
4194
- resolution: z.ZodEnum<["approved", "max-iterations-exceeded", "body-failed", "cancelled", "timeout"]>;
4195
- outputRef: z.ZodOptional<z.ZodObject<{
4196
- outputHash: z.ZodString;
4197
- outputPath: z.ZodOptional<z.ZodString>;
4198
- outputBytes: z.ZodNumber;
4199
- outputSchemaVersion: z.ZodNumber;
4200
- contentType: z.ZodOptional<z.ZodString>;
4201
- }, "strip", z.ZodTypeAny, {
4202
- outputHash: string;
4203
- outputBytes: number;
4204
- outputSchemaVersion: number;
4205
- outputPath?: string | undefined;
4206
- contentType?: string | undefined;
4207
- }, {
4208
- outputHash: string;
4209
- outputBytes: number;
4210
- outputSchemaVersion: number;
4211
- outputPath?: string | undefined;
4212
- contentType?: string | undefined;
4213
- }>>;
4214
- errorCode: z.ZodOptional<z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog", "LoopMaxIterationsExceeded", "LoopBodyFailed"]>>;
4215
- errorClass: z.ZodOptional<z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>>;
3545
+ activityId: z.ZodString;
3546
+ attemptId: z.ZodString;
3547
+ runningMs: z.ZodNumber;
3548
+ reason: z.ZodLiteral<"LeaseExpired">;
3549
+ errorClass: z.ZodLiteral<"retryable">;
4216
3550
  }, "strip", z.ZodTypeAny, {
4217
- loopId: string;
4218
- resolution: "timeout" | "approved" | "max-iterations-exceeded" | "body-failed" | "cancelled";
4219
- finalIteration: number;
4220
- errorCode?: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed" | undefined;
4221
- errorClass?: "retryable" | "fatal" | "userFault" | "manual" | undefined;
4222
- outputRef?: {
4223
- outputHash: string;
4224
- outputBytes: number;
4225
- outputSchemaVersion: number;
4226
- outputPath?: string | undefined;
4227
- contentType?: string | undefined;
4228
- } | undefined;
3551
+ reason: "LeaseExpired";
3552
+ attemptId: string;
3553
+ errorClass: "retryable";
3554
+ activityId: string;
3555
+ runningMs: number;
4229
3556
  }, {
4230
- loopId: string;
4231
- resolution: "timeout" | "approved" | "max-iterations-exceeded" | "body-failed" | "cancelled";
4232
- finalIteration: number;
4233
- errorCode?: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed" | undefined;
4234
- errorClass?: "retryable" | "fatal" | "userFault" | "manual" | undefined;
4235
- outputRef?: {
4236
- outputHash: string;
4237
- outputBytes: number;
4238
- outputSchemaVersion: number;
4239
- outputPath?: string | undefined;
4240
- contentType?: string | undefined;
4241
- } | undefined;
3557
+ reason: "LeaseExpired";
3558
+ attemptId: string;
3559
+ errorClass: "retryable";
3560
+ activityId: string;
3561
+ runningMs: number;
4242
3562
  }>, z.ZodObject<{
4243
3563
  ref: z.ZodString;
4244
3564
  bytes: z.ZodNumber;
@@ -4259,23 +3579,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4259
3579
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4260
3580
  payloadHash: z.ZodOptional<z.ZodString>;
4261
3581
  }, "strip", z.ZodTypeAny, {
4262
- type: "loopFinished";
4263
3582
  runId: string;
3583
+ type: "activityTimedOut";
4264
3584
  schemaVersion: 1;
4265
3585
  eventId: string;
4266
3586
  payload: {
4267
- loopId: string;
4268
- resolution: "timeout" | "approved" | "max-iterations-exceeded" | "body-failed" | "cancelled";
4269
- finalIteration: number;
4270
- errorCode?: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed" | undefined;
4271
- errorClass?: "retryable" | "fatal" | "userFault" | "manual" | undefined;
4272
- outputRef?: {
4273
- outputHash: string;
4274
- outputBytes: number;
4275
- outputSchemaVersion: number;
4276
- outputPath?: string | undefined;
4277
- contentType?: string | undefined;
4278
- } | undefined;
3587
+ reason: "LeaseExpired";
3588
+ attemptId: string;
3589
+ errorClass: "retryable";
3590
+ activityId: string;
3591
+ runningMs: number;
4279
3592
  } | {
4280
3593
  ref: string;
4281
3594
  bytes: number;
@@ -4285,23 +3598,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4285
3598
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4286
3599
  payloadHash?: string | undefined;
4287
3600
  }, {
4288
- type: "loopFinished";
4289
3601
  runId: string;
3602
+ type: "activityTimedOut";
4290
3603
  schemaVersion: 1;
4291
3604
  eventId: string;
4292
3605
  payload: {
4293
- loopId: string;
4294
- resolution: "timeout" | "approved" | "max-iterations-exceeded" | "body-failed" | "cancelled";
4295
- finalIteration: number;
4296
- errorCode?: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed" | undefined;
4297
- errorClass?: "retryable" | "fatal" | "userFault" | "manual" | undefined;
4298
- outputRef?: {
4299
- outputHash: string;
4300
- outputBytes: number;
4301
- outputSchemaVersion: number;
4302
- outputPath?: string | undefined;
4303
- contentType?: string | undefined;
4304
- } | undefined;
3606
+ reason: "LeaseExpired";
3607
+ attemptId: string;
3608
+ errorClass: "retryable";
3609
+ activityId: string;
3610
+ runningMs: number;
4305
3611
  } | {
4306
3612
  ref: string;
4307
3613
  bytes: number;
@@ -4347,8 +3653,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4347
3653
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4348
3654
  payloadHash: z.ZodOptional<z.ZodString>;
4349
3655
  }, "strip", z.ZodTypeAny, {
4350
- type: "conditionEvaluated";
4351
3656
  runId: string;
3657
+ type: "conditionEvaluated";
4352
3658
  schemaVersion: 1;
4353
3659
  eventId: string;
4354
3660
  payload: {
@@ -4365,8 +3671,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4365
3671
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4366
3672
  payloadHash?: string | undefined;
4367
3673
  }, {
4368
- type: "conditionEvaluated";
4369
3674
  runId: string;
3675
+ type: "conditionEvaluated";
4370
3676
  schemaVersion: 1;
4371
3677
  eventId: string;
4372
3678
  payload: {
@@ -4422,8 +3728,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4422
3728
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4423
3729
  payloadHash: z.ZodOptional<z.ZodString>;
4424
3730
  }, "strip", z.ZodTypeAny, {
4425
- type: "leaseSigned";
4426
3731
  runId: string;
3732
+ type: "leaseSigned";
4427
3733
  schemaVersion: 1;
4428
3734
  eventId: string;
4429
3735
  payload: {
@@ -4441,8 +3747,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4441
3747
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4442
3748
  payloadHash?: string | undefined;
4443
3749
  }, {
4444
- type: "leaseSigned";
4445
3750
  runId: string;
3751
+ type: "leaseSigned";
4446
3752
  schemaVersion: 1;
4447
3753
  eventId: string;
4448
3754
  payload: {
@@ -4529,8 +3835,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4529
3835
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4530
3836
  payloadHash: z.ZodOptional<z.ZodString>;
4531
3837
  }, "strip", z.ZodTypeAny, {
4532
- type: "attemptCreated";
4533
3838
  runId: string;
3839
+ type: "attemptCreated";
4534
3840
  schemaVersion: 1;
4535
3841
  eventId: string;
4536
3842
  payload: {
@@ -4554,8 +3860,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4554
3860
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4555
3861
  payloadHash?: string | undefined;
4556
3862
  }, {
4557
- type: "attemptCreated";
4558
3863
  runId: string;
3864
+ type: "attemptCreated";
4559
3865
  schemaVersion: 1;
4560
3866
  eventId: string;
4561
3867
  payload: {
@@ -4640,8 +3946,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4640
3946
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4641
3947
  payloadHash: z.ZodOptional<z.ZodString>;
4642
3948
  }, "strip", z.ZodTypeAny, {
4643
- type: "backoffScheduled";
4644
3949
  runId: string;
3950
+ type: "backoffScheduled";
4645
3951
  schemaVersion: 1;
4646
3952
  eventId: string;
4647
3953
  payload: {
@@ -4663,8 +3969,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4663
3969
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4664
3970
  payloadHash?: string | undefined;
4665
3971
  }, {
4666
- type: "backoffScheduled";
4667
3972
  runId: string;
3973
+ type: "backoffScheduled";
4668
3974
  schemaVersion: 1;
4669
3975
  eventId: string;
4670
3976
  payload: {
@@ -4716,8 +4022,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4716
4022
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4717
4023
  payloadHash: z.ZodOptional<z.ZodString>;
4718
4024
  }, "strip", z.ZodTypeAny, {
4719
- type: "backoffElapsed";
4720
4025
  runId: string;
4026
+ type: "backoffElapsed";
4721
4027
  schemaVersion: 1;
4722
4028
  eventId: string;
4723
4029
  payload: {
@@ -4732,8 +4038,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4732
4038
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4733
4039
  payloadHash?: string | undefined;
4734
4040
  }, {
4735
- type: "backoffElapsed";
4736
4041
  runId: string;
4042
+ type: "backoffElapsed";
4737
4043
  schemaVersion: 1;
4738
4044
  eventId: string;
4739
4045
  payload: {
@@ -4790,8 +4096,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4790
4096
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4791
4097
  payloadHash: z.ZodOptional<z.ZodString>;
4792
4098
  }, "strip", z.ZodTypeAny, {
4793
- type: "effectAttempted";
4794
4099
  runId: string;
4100
+ type: "effectAttempted";
4795
4101
  schemaVersion: 1;
4796
4102
  eventId: string;
4797
4103
  payload: {
@@ -4810,8 +4116,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4810
4116
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4811
4117
  payloadHash?: string | undefined;
4812
4118
  }, {
4813
- type: "effectAttempted";
4814
4119
  runId: string;
4120
+ type: "effectAttempted";
4815
4121
  schemaVersion: 1;
4816
4122
  eventId: string;
4817
4123
  payload: {
@@ -4896,8 +4202,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4896
4202
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4897
4203
  payloadHash: z.ZodOptional<z.ZodString>;
4898
4204
  }, "strip", z.ZodTypeAny, {
4899
- type: "activitySucceeded";
4900
4205
  runId: string;
4206
+ type: "activitySucceeded";
4901
4207
  schemaVersion: 1;
4902
4208
  eventId: string;
4903
4209
  payload: {
@@ -4920,8 +4226,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4920
4226
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4921
4227
  payloadHash?: string | undefined;
4922
4228
  }, {
4923
- type: "activitySucceeded";
4924
4229
  runId: string;
4230
+ type: "activitySucceeded";
4925
4231
  schemaVersion: 1;
4926
4232
  eventId: string;
4927
4233
  payload: {
@@ -4949,24 +4255,24 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4949
4255
  activityId: z.ZodString;
4950
4256
  attemptId: z.ZodString;
4951
4257
  error: z.ZodObject<{
4952
- errorCode: z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog", "LoopMaxIterationsExceeded", "LoopBodyFailed"]>;
4258
+ errorCode: z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog"]>;
4953
4259
  errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
4954
4260
  errorMessage: z.ZodString;
4955
4261
  stackRef: z.ZodOptional<z.ZodString>;
4956
4262
  }, "strip", z.ZodTypeAny, {
4957
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
4263
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
4958
4264
  errorClass: "retryable" | "fatal" | "userFault" | "manual";
4959
4265
  errorMessage: string;
4960
4266
  stackRef?: string | undefined;
4961
4267
  }, {
4962
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
4268
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
4963
4269
  errorClass: "retryable" | "fatal" | "userFault" | "manual";
4964
4270
  errorMessage: string;
4965
4271
  stackRef?: string | undefined;
4966
4272
  }>;
4967
4273
  }, "strip", z.ZodTypeAny, {
4968
4274
  error: {
4969
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
4275
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
4970
4276
  errorClass: "retryable" | "fatal" | "userFault" | "manual";
4971
4277
  errorMessage: string;
4972
4278
  stackRef?: string | undefined;
@@ -4975,7 +4281,7 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4975
4281
  activityId: string;
4976
4282
  }, {
4977
4283
  error: {
4978
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
4284
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
4979
4285
  errorClass: "retryable" | "fatal" | "userFault" | "manual";
4980
4286
  errorMessage: string;
4981
4287
  stackRef?: string | undefined;
@@ -5002,13 +4308,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5002
4308
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5003
4309
  payloadHash: z.ZodOptional<z.ZodString>;
5004
4310
  }, "strip", z.ZodTypeAny, {
5005
- type: "activityFailed";
5006
4311
  runId: string;
4312
+ type: "activityFailed";
5007
4313
  schemaVersion: 1;
5008
4314
  eventId: string;
5009
4315
  payload: {
5010
4316
  error: {
5011
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
4317
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
5012
4318
  errorClass: "retryable" | "fatal" | "userFault" | "manual";
5013
4319
  errorMessage: string;
5014
4320
  stackRef?: string | undefined;
@@ -5024,13 +4330,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5024
4330
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
5025
4331
  payloadHash?: string | undefined;
5026
4332
  }, {
5027
- type: "activityFailed";
5028
4333
  runId: string;
4334
+ type: "activityFailed";
5029
4335
  schemaVersion: 1;
5030
4336
  eventId: string;
5031
4337
  payload: {
5032
4338
  error: {
5033
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
4339
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
5034
4340
  errorClass: "retryable" | "fatal" | "userFault" | "manual";
5035
4341
  errorMessage: string;
5036
4342
  stackRef?: string | undefined;
@@ -5127,8 +4433,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5127
4433
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5128
4434
  payloadHash: z.ZodOptional<z.ZodString>;
5129
4435
  }, "strip", z.ZodTypeAny, {
5130
- type: "waitCreated";
5131
4436
  runId: string;
4437
+ type: "waitCreated";
5132
4438
  schemaVersion: 1;
5133
4439
  eventId: string;
5134
4440
  payload: {
@@ -5156,8 +4462,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5156
4462
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
5157
4463
  payloadHash?: string | undefined;
5158
4464
  }, {
5159
- type: "waitCreated";
5160
4465
  runId: string;
4466
+ type: "waitCreated";
5161
4467
  schemaVersion: 1;
5162
4468
  eventId: string;
5163
4469
  payload: {
@@ -5221,8 +4527,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5221
4527
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5222
4528
  payloadHash: z.ZodOptional<z.ZodString>;
5223
4529
  }, "strip", z.ZodTypeAny, {
5224
- type: "waitResolved";
5225
4530
  runId: string;
4531
+ type: "waitResolved";
5226
4532
  schemaVersion: 1;
5227
4533
  eventId: string;
5228
4534
  payload: {
@@ -5239,8 +4545,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5239
4545
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
5240
4546
  payloadHash?: string | undefined;
5241
4547
  }, {
5242
- type: "waitResolved";
5243
4548
  runId: string;
4549
+ type: "waitResolved";
5244
4550
  schemaVersion: 1;
5245
4551
  eventId: string;
5246
4552
  payload: {
@@ -5290,8 +4596,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5290
4596
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5291
4597
  payloadHash: z.ZodOptional<z.ZodString>;
5292
4598
  }, "strip", z.ZodTypeAny, {
5293
- type: "waitDeadlineExceeded";
5294
4599
  runId: string;
4600
+ type: "waitDeadlineExceeded";
5295
4601
  schemaVersion: 1;
5296
4602
  eventId: string;
5297
4603
  payload: {
@@ -5307,8 +4613,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5307
4613
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
5308
4614
  payloadHash?: string | undefined;
5309
4615
  }, {
5310
- type: "waitDeadlineExceeded";
5311
4616
  runId: string;
4617
+ type: "waitDeadlineExceeded";
5312
4618
  schemaVersion: 1;
5313
4619
  eventId: string;
5314
4620
  payload: {
@@ -5402,8 +4708,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5402
4708
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5403
4709
  payloadHash: z.ZodOptional<z.ZodString>;
5404
4710
  }, "strip", z.ZodTypeAny, {
5405
- type: "cancelRequested";
5406
4711
  runId: string;
4712
+ type: "cancelRequested";
5407
4713
  schemaVersion: 1;
5408
4714
  eventId: string;
5409
4715
  payload: {
@@ -5428,8 +4734,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5428
4734
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
5429
4735
  payloadHash?: string | undefined;
5430
4736
  }, {
5431
- type: "cancelRequested";
5432
4737
  runId: string;
4738
+ type: "cancelRequested";
5433
4739
  schemaVersion: 1;
5434
4740
  eventId: string;
5435
4741
  payload: {
@@ -5529,8 +4835,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5529
4835
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5530
4836
  payloadHash: z.ZodOptional<z.ZodString>;
5531
4837
  }, "strip", z.ZodTypeAny, {
5532
- type: "cancelDelivered";
5533
4838
  runId: string;
4839
+ type: "cancelDelivered";
5534
4840
  schemaVersion: 1;
5535
4841
  eventId: string;
5536
4842
  payload: {
@@ -5554,8 +4860,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5554
4860
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
5555
4861
  payloadHash?: string | undefined;
5556
4862
  }, {
5557
- type: "cancelDelivered";
5558
4863
  runId: string;
4864
+ type: "cancelDelivered";
5559
4865
  schemaVersion: 1;
5560
4866
  eventId: string;
5561
4867
  payload: {
@@ -5612,8 +4918,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5612
4918
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5613
4919
  payloadHash: z.ZodOptional<z.ZodString>;
5614
4920
  }, "strip", z.ZodTypeAny, {
5615
- type: "activityCanceled";
5616
4921
  runId: string;
4922
+ type: "activityCanceled";
5617
4923
  schemaVersion: 1;
5618
4924
  eventId: string;
5619
4925
  payload: {
@@ -5629,8 +4935,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5629
4935
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
5630
4936
  payloadHash?: string | undefined;
5631
4937
  }, {
5632
- type: "activityCanceled";
5633
4938
  runId: string;
4939
+ type: "activityCanceled";
5634
4940
  schemaVersion: 1;
5635
4941
  eventId: string;
5636
4942
  payload: {
@@ -5676,8 +4982,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5676
4982
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5677
4983
  payloadHash: z.ZodOptional<z.ZodString>;
5678
4984
  }, "strip", z.ZodTypeAny, {
5679
- type: "workerLost";
5680
4985
  runId: string;
4986
+ type: "workerLost";
5681
4987
  schemaVersion: 1;
5682
4988
  eventId: string;
5683
4989
  payload: {
@@ -5692,8 +4998,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5692
4998
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
5693
4999
  payloadHash?: string | undefined;
5694
5000
  }, {
5695
- type: "workerLost";
5696
5001
  runId: string;
5002
+ type: "workerLost";
5697
5003
  schemaVersion: 1;
5698
5004
  eventId: string;
5699
5005
  payload: {
@@ -5738,8 +5044,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5738
5044
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5739
5045
  payloadHash: z.ZodOptional<z.ZodString>;
5740
5046
  }, "strip", z.ZodTypeAny, {
5741
- type: "resumeStarted";
5742
5047
  runId: string;
5048
+ type: "resumeStarted";
5743
5049
  schemaVersion: 1;
5744
5050
  eventId: string;
5745
5051
  payload: {
@@ -5754,8 +5060,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5754
5060
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
5755
5061
  payloadHash?: string | undefined;
5756
5062
  }, {
5757
- type: "resumeStarted";
5758
5063
  runId: string;
5064
+ type: "resumeStarted";
5759
5065
  schemaVersion: 1;
5760
5066
  eventId: string;
5761
5067
  payload: {
@@ -5778,15 +5084,15 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5778
5084
  decision: z.ZodEnum<["replayed", "completedByIdempotentSubmit", "manual", "freshRetry"]>;
5779
5085
  evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5780
5086
  }, "strip", z.ZodTypeAny, {
5781
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5782
5087
  activityId: string;
5783
5088
  idempotencyKey: string;
5089
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5784
5090
  decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
5785
5091
  evidence: Record<string, unknown>;
5786
5092
  }, {
5787
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5788
5093
  activityId: string;
5789
5094
  idempotencyKey: string;
5095
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5790
5096
  decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
5791
5097
  evidence: Record<string, unknown>;
5792
5098
  }>, z.ZodObject<{
@@ -5809,14 +5115,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5809
5115
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5810
5116
  payloadHash: z.ZodOptional<z.ZodString>;
5811
5117
  }, "strip", z.ZodTypeAny, {
5812
- type: "reconcileResult";
5813
5118
  runId: string;
5119
+ type: "reconcileResult";
5814
5120
  schemaVersion: 1;
5815
5121
  eventId: string;
5816
5122
  payload: {
5817
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5818
5123
  activityId: string;
5819
5124
  idempotencyKey: string;
5125
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5820
5126
  decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
5821
5127
  evidence: Record<string, unknown>;
5822
5128
  } | {
@@ -5828,14 +5134,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5828
5134
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
5829
5135
  payloadHash?: string | undefined;
5830
5136
  }, {
5831
- type: "reconcileResult";
5832
5137
  runId: string;
5138
+ type: "reconcileResult";
5833
5139
  schemaVersion: 1;
5834
5140
  eventId: string;
5835
5141
  payload: {
5836
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5837
5142
  activityId: string;
5838
5143
  idempotencyKey: string;
5144
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5839
5145
  decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
5840
5146
  evidence: Record<string, unknown>;
5841
5147
  } | {
@@ -5901,7 +5207,6 @@ export declare function checkReconcileResultInvariant(event: WorkflowEvent): str
5901
5207
  * split policy.
5902
5208
  */
5903
5209
  export declare function checkWaitCreatedPromptInvariant(event: WorkflowEvent): string | null;
5904
- export declare function checkLoopFinishedInvariant(event: WorkflowEvent): string | null;
5905
5210
  /**
5906
5211
  * Parse + validate an unknown value as a WorkflowEvent. Combines the
5907
5212
  * discriminated-union schema check with the post-parse invariants