botmux 2.47.0 → 2.47.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (472) hide show
  1. package/README.en.md +10 -5
  2. package/README.md +10 -5
  3. package/dist/adapters/adopt-route.d.ts +63 -0
  4. package/dist/adapters/adopt-route.d.ts.map +1 -0
  5. package/dist/adapters/adopt-route.js +195 -0
  6. package/dist/adapters/adopt-route.js.map +1 -0
  7. package/dist/adapters/backend/tmux-backend.d.ts.map +1 -1
  8. package/dist/adapters/backend/tmux-backend.js +11 -0
  9. package/dist/adapters/backend/tmux-backend.js.map +1 -1
  10. package/dist/adapters/backend/tmux-pipe-backend.d.ts +11 -0
  11. package/dist/adapters/backend/tmux-pipe-backend.d.ts.map +1 -1
  12. package/dist/adapters/backend/tmux-pipe-backend.js +17 -1
  13. package/dist/adapters/backend/tmux-pipe-backend.js.map +1 -1
  14. package/dist/adapters/cli/claude-code.d.ts.map +1 -1
  15. package/dist/adapters/cli/claude-code.js +36 -9
  16. package/dist/adapters/cli/claude-code.js.map +1 -1
  17. package/dist/adapters/cli/coco.d.ts.map +1 -1
  18. package/dist/adapters/cli/coco.js +26 -1
  19. package/dist/adapters/cli/coco.js.map +1 -1
  20. package/dist/adapters/cli/codex-app.d.ts +4 -0
  21. package/dist/adapters/cli/codex-app.d.ts.map +1 -0
  22. package/dist/adapters/cli/codex-app.js +72 -0
  23. package/dist/adapters/cli/codex-app.js.map +1 -0
  24. package/dist/adapters/cli/codex.d.ts.map +1 -1
  25. package/dist/adapters/cli/codex.js +34 -17
  26. package/dist/adapters/cli/codex.js.map +1 -1
  27. package/dist/adapters/cli/cursor.d.ts.map +1 -1
  28. package/dist/adapters/cli/cursor.js +58 -12
  29. package/dist/adapters/cli/cursor.js.map +1 -1
  30. package/dist/adapters/cli/gemini.d.ts.map +1 -1
  31. package/dist/adapters/cli/gemini.js +5 -1
  32. package/dist/adapters/cli/gemini.js.map +1 -1
  33. package/dist/adapters/cli/hermes.d.ts +4 -0
  34. package/dist/adapters/cli/hermes.d.ts.map +1 -0
  35. package/dist/adapters/cli/hermes.js +40 -0
  36. package/dist/adapters/cli/hermes.js.map +1 -0
  37. package/dist/adapters/cli/mira.d.ts +4 -0
  38. package/dist/adapters/cli/mira.d.ts.map +1 -0
  39. package/dist/adapters/cli/mira.js +67 -0
  40. package/dist/adapters/cli/mira.js.map +1 -0
  41. package/dist/adapters/cli/mtr.d.ts +5 -0
  42. package/dist/adapters/cli/mtr.d.ts.map +1 -0
  43. package/dist/adapters/cli/mtr.js +62 -0
  44. package/dist/adapters/cli/mtr.js.map +1 -0
  45. package/dist/adapters/cli/opencode.d.ts.map +1 -1
  46. package/dist/adapters/cli/opencode.js +19 -1
  47. package/dist/adapters/cli/opencode.js.map +1 -1
  48. package/dist/adapters/cli/registry.d.ts +5 -1
  49. package/dist/adapters/cli/registry.d.ts.map +1 -1
  50. package/dist/adapters/cli/registry.js +22 -2
  51. package/dist/adapters/cli/registry.js.map +1 -1
  52. package/dist/adapters/cli/shared-hints.d.ts +1 -1
  53. package/dist/adapters/cli/shared-hints.d.ts.map +1 -1
  54. package/dist/adapters/cli/shared-hints.js +2 -1
  55. package/dist/adapters/cli/shared-hints.js.map +1 -1
  56. package/dist/adapters/cli/types.d.ts +35 -2
  57. package/dist/adapters/cli/types.d.ts.map +1 -1
  58. package/dist/adapters/hook-command.d.ts +18 -0
  59. package/dist/adapters/hook-command.d.ts.map +1 -0
  60. package/dist/adapters/hook-command.js +38 -0
  61. package/dist/adapters/hook-command.js.map +1 -0
  62. package/dist/adapters/hook-installer.d.ts +14 -0
  63. package/dist/adapters/hook-installer.d.ts.map +1 -0
  64. package/dist/adapters/hook-installer.js +192 -0
  65. package/dist/adapters/hook-installer.js.map +1 -0
  66. package/dist/bot-registry.d.ts +59 -0
  67. package/dist/bot-registry.d.ts.map +1 -1
  68. package/dist/bot-registry.js +67 -0
  69. package/dist/bot-registry.js.map +1 -1
  70. package/dist/cli/bots-list-output.d.ts +8 -0
  71. package/dist/cli/bots-list-output.d.ts.map +1 -1
  72. package/dist/cli/bots-list-output.js +9 -0
  73. package/dist/cli/bots-list-output.js.map +1 -1
  74. package/dist/cli.d.ts +15 -1
  75. package/dist/cli.d.ts.map +1 -1
  76. package/dist/cli.js +603 -106
  77. package/dist/cli.js.map +1 -1
  78. package/dist/codex-app-runner.d.ts +3 -0
  79. package/dist/codex-app-runner.d.ts.map +1 -0
  80. package/dist/codex-app-runner.js +512 -0
  81. package/dist/codex-app-runner.js.map +1 -0
  82. package/dist/config.d.ts +11 -2
  83. package/dist/config.d.ts.map +1 -1
  84. package/dist/config.js +17 -4
  85. package/dist/config.js.map +1 -1
  86. package/dist/core/ask-api.d.ts +47 -0
  87. package/dist/core/ask-api.d.ts.map +1 -0
  88. package/dist/core/ask-api.js +139 -0
  89. package/dist/core/ask-api.js.map +1 -0
  90. package/dist/core/ask-args.d.ts +53 -0
  91. package/dist/core/ask-args.d.ts.map +1 -0
  92. package/dist/core/ask-args.js +122 -0
  93. package/dist/core/ask-args.js.map +1 -0
  94. package/dist/core/ask-broker.d.ts +98 -0
  95. package/dist/core/ask-broker.d.ts.map +1 -0
  96. package/dist/core/ask-broker.js +329 -0
  97. package/dist/core/ask-broker.js.map +1 -0
  98. package/dist/core/ask-hook/claude-code.d.ts +50 -0
  99. package/dist/core/ask-hook/claude-code.d.ts.map +1 -0
  100. package/dist/core/ask-hook/claude-code.js +145 -0
  101. package/dist/core/ask-hook/claude-code.js.map +1 -0
  102. package/dist/core/ask-hook/codex.d.ts +43 -0
  103. package/dist/core/ask-hook/codex.d.ts.map +1 -0
  104. package/dist/core/ask-hook/codex.js +69 -0
  105. package/dist/core/ask-hook/codex.js.map +1 -0
  106. package/dist/core/ask-hook/opencode.d.ts +41 -0
  107. package/dist/core/ask-hook/opencode.d.ts.map +1 -0
  108. package/dist/core/ask-hook/opencode.js +108 -0
  109. package/dist/core/ask-hook/opencode.js.map +1 -0
  110. package/dist/core/ask-hook/registry.d.ts +3 -0
  111. package/dist/core/ask-hook/registry.d.ts.map +1 -0
  112. package/dist/core/ask-hook/registry.js +12 -0
  113. package/dist/core/ask-hook/registry.js.map +1 -0
  114. package/dist/core/ask-hook/types.d.ts +26 -0
  115. package/dist/core/ask-hook/types.d.ts.map +1 -0
  116. package/dist/core/ask-hook/types.js +2 -0
  117. package/dist/core/ask-hook/types.js.map +1 -0
  118. package/dist/core/ask-types.d.ts +146 -0
  119. package/dist/core/ask-types.d.ts.map +1 -0
  120. package/dist/core/ask-types.js +18 -0
  121. package/dist/core/ask-types.js.map +1 -0
  122. package/dist/core/command-handler.d.ts +29 -0
  123. package/dist/core/command-handler.d.ts.map +1 -1
  124. package/dist/core/command-handler.js +787 -312
  125. package/dist/core/command-handler.js.map +1 -1
  126. package/dist/core/dashboard-ipc-server.d.ts +2 -0
  127. package/dist/core/dashboard-ipc-server.d.ts.map +1 -1
  128. package/dist/core/dashboard-ipc-server.js +222 -2
  129. package/dist/core/dashboard-ipc-server.js.map +1 -1
  130. package/dist/core/role-resolver.d.ts +17 -1
  131. package/dist/core/role-resolver.d.ts.map +1 -1
  132. package/dist/core/role-resolver.js +64 -10
  133. package/dist/core/role-resolver.js.map +1 -1
  134. package/dist/core/session-discovery.d.ts.map +1 -1
  135. package/dist/core/session-discovery.js +19 -5
  136. package/dist/core/session-discovery.js.map +1 -1
  137. package/dist/core/session-manager.d.ts +1 -1
  138. package/dist/core/session-manager.d.ts.map +1 -1
  139. package/dist/core/session-manager.js +37 -20
  140. package/dist/core/session-manager.js.map +1 -1
  141. package/dist/core/trigger-session.d.ts +9 -0
  142. package/dist/core/trigger-session.d.ts.map +1 -0
  143. package/dist/core/trigger-session.js +158 -0
  144. package/dist/core/trigger-session.js.map +1 -0
  145. package/dist/core/types.d.ts +5 -0
  146. package/dist/core/types.d.ts.map +1 -1
  147. package/dist/core/types.js.map +1 -1
  148. package/dist/core/worker-pool.d.ts +141 -0
  149. package/dist/core/worker-pool.d.ts.map +1 -1
  150. package/dist/core/worker-pool.js +543 -24
  151. package/dist/core/worker-pool.js.map +1 -1
  152. package/dist/daemon.d.ts.map +1 -1
  153. package/dist/daemon.js +224 -60
  154. package/dist/daemon.js.map +1 -1
  155. package/dist/dashboard/auth.d.ts +6 -1
  156. package/dist/dashboard/auth.d.ts.map +1 -1
  157. package/dist/dashboard/auth.js +9 -1
  158. package/dist/dashboard/auth.js.map +1 -1
  159. package/dist/dashboard/connector-api.d.ts +3 -0
  160. package/dist/dashboard/connector-api.d.ts.map +1 -0
  161. package/dist/dashboard/connector-api.js +351 -0
  162. package/dist/dashboard/connector-api.js.map +1 -0
  163. package/dist/dashboard/federated-group-core.d.ts +54 -0
  164. package/dist/dashboard/federated-group-core.d.ts.map +1 -0
  165. package/dist/dashboard/federated-group-core.js +165 -0
  166. package/dist/dashboard/federated-group-core.js.map +1 -0
  167. package/dist/dashboard/federation-api.d.ts +42 -0
  168. package/dist/dashboard/federation-api.d.ts.map +1 -0
  169. package/dist/dashboard/federation-api.js +408 -0
  170. package/dist/dashboard/federation-api.js.map +1 -0
  171. package/dist/dashboard/federation-spoke-api.d.ts +76 -0
  172. package/dist/dashboard/federation-spoke-api.d.ts.map +1 -0
  173. package/dist/dashboard/federation-spoke-api.js +618 -0
  174. package/dist/dashboard/federation-spoke-api.js.map +1 -0
  175. package/dist/dashboard/team-group.d.ts +18 -0
  176. package/dist/dashboard/team-group.d.ts.map +1 -0
  177. package/dist/dashboard/team-group.js +7 -0
  178. package/dist/dashboard/team-group.js.map +1 -0
  179. package/dist/dashboard/trigger-api.d.ts +13 -0
  180. package/dist/dashboard/trigger-api.d.ts.map +1 -0
  181. package/dist/dashboard/trigger-api.js +77 -0
  182. package/dist/dashboard/trigger-api.js.map +1 -0
  183. package/dist/dashboard/web/app.js +8 -0
  184. package/dist/dashboard/web/app.js.map +1 -1
  185. package/dist/dashboard/web/bot-defaults.d.ts.map +1 -1
  186. package/dist/dashboard/web/bot-defaults.js +205 -21
  187. package/dist/dashboard/web/bot-defaults.js.map +1 -1
  188. package/dist/dashboard/web/connectors.d.ts +2 -0
  189. package/dist/dashboard/web/connectors.d.ts.map +1 -0
  190. package/dist/dashboard/web/connectors.js +187 -0
  191. package/dist/dashboard/web/connectors.js.map +1 -0
  192. package/dist/dashboard/web/i18n.d.ts.map +1 -1
  193. package/dist/dashboard/web/i18n.js +43 -5
  194. package/dist/dashboard/web/i18n.js.map +1 -1
  195. package/dist/dashboard/web/sessions.d.ts.map +1 -1
  196. package/dist/dashboard/web/sessions.js +4 -0
  197. package/dist/dashboard/web/sessions.js.map +1 -1
  198. package/dist/dashboard/web/team-federation.d.ts +3 -0
  199. package/dist/dashboard/web/team-federation.d.ts.map +1 -0
  200. package/dist/dashboard/web/team-federation.js +487 -0
  201. package/dist/dashboard/web/team-federation.js.map +1 -0
  202. package/dist/dashboard/web/workflows.js +3 -3
  203. package/dist/dashboard/web/workflows.js.map +1 -1
  204. package/dist/dashboard/webhook-routes.d.ts +19 -0
  205. package/dist/dashboard/webhook-routes.d.ts.map +1 -0
  206. package/dist/dashboard/webhook-routes.js +321 -0
  207. package/dist/dashboard/webhook-routes.js.map +1 -0
  208. package/dist/dashboard/workflow-api.d.ts +8 -1
  209. package/dist/dashboard/workflow-api.d.ts.map +1 -1
  210. package/dist/dashboard/workflow-api.js +19 -4
  211. package/dist/dashboard/workflow-api.js.map +1 -1
  212. package/dist/dashboard-web/app.js +539 -375
  213. package/dist/dashboard-web/index.html +3 -1
  214. package/dist/dashboard-web/style.css +22 -0
  215. package/dist/dashboard.js +199 -2
  216. package/dist/dashboard.js.map +1 -1
  217. package/dist/i18n/en.d.ts.map +1 -1
  218. package/dist/i18n/en.js +104 -11
  219. package/dist/i18n/en.js.map +1 -1
  220. package/dist/i18n/zh.d.ts.map +1 -1
  221. package/dist/i18n/zh.js +104 -11
  222. package/dist/i18n/zh.js.map +1 -1
  223. package/dist/im/lark/ask-card.d.ts +55 -0
  224. package/dist/im/lark/ask-card.d.ts.map +1 -0
  225. package/dist/im/lark/ask-card.js +328 -0
  226. package/dist/im/lark/ask-card.js.map +1 -0
  227. package/dist/im/lark/card-builder.d.ts +108 -3
  228. package/dist/im/lark/card-builder.d.ts.map +1 -1
  229. package/dist/im/lark/card-builder.js +480 -50
  230. package/dist/im/lark/card-builder.js.map +1 -1
  231. package/dist/im/lark/card-handler.d.ts.map +1 -1
  232. package/dist/im/lark/card-handler.js +241 -18
  233. package/dist/im/lark/card-handler.js.map +1 -1
  234. package/dist/im/lark/client.d.ts +83 -0
  235. package/dist/im/lark/client.d.ts.map +1 -1
  236. package/dist/im/lark/client.js +286 -70
  237. package/dist/im/lark/client.js.map +1 -1
  238. package/dist/im/lark/event-dispatcher.d.ts.map +1 -1
  239. package/dist/im/lark/event-dispatcher.js +29 -4
  240. package/dist/im/lark/event-dispatcher.js.map +1 -1
  241. package/dist/im/lark/grant-command.d.ts +2 -1
  242. package/dist/im/lark/grant-command.d.ts.map +1 -1
  243. package/dist/im/lark/grant-command.js +3 -2
  244. package/dist/im/lark/grant-command.js.map +1 -1
  245. package/dist/im/lark/identity-cache.d.ts.map +1 -1
  246. package/dist/im/lark/identity-cache.js +3 -3
  247. package/dist/im/lark/identity-cache.js.map +1 -1
  248. package/dist/im/lark/md-card.d.ts +20 -2
  249. package/dist/im/lark/md-card.d.ts.map +1 -1
  250. package/dist/im/lark/md-card.js +49 -17
  251. package/dist/im/lark/md-card.js.map +1 -1
  252. package/dist/im/lark/message-parser.d.ts.map +1 -1
  253. package/dist/im/lark/message-parser.js +87 -31
  254. package/dist/im/lark/message-parser.js.map +1 -1
  255. package/dist/im/lark/workflow-card-handler.d.ts +2 -2
  256. package/dist/im/lark/workflow-card-handler.d.ts.map +1 -1
  257. package/dist/im/lark/workflow-card-handler.js +12 -1
  258. package/dist/im/lark/workflow-card-handler.js.map +1 -1
  259. package/dist/im/lark/workflow-progress-card.d.ts.map +1 -1
  260. package/dist/im/lark/workflow-progress-card.js +53 -0
  261. package/dist/im/lark/workflow-progress-card.js.map +1 -1
  262. package/dist/mira-output.d.ts +3 -0
  263. package/dist/mira-output.d.ts.map +1 -0
  264. package/dist/mira-output.js +136 -0
  265. package/dist/mira-output.js.map +1 -0
  266. package/dist/mira-runner.d.ts +3 -0
  267. package/dist/mira-runner.d.ts.map +1 -0
  268. package/dist/mira-runner.js +534 -0
  269. package/dist/mira-runner.js.map +1 -0
  270. package/dist/services/bot-owner-store.d.ts +28 -0
  271. package/dist/services/bot-owner-store.d.ts.map +1 -0
  272. package/dist/services/bot-owner-store.js +82 -0
  273. package/dist/services/bot-owner-store.js.map +1 -0
  274. package/dist/services/bot-profile-store.d.ts +16 -0
  275. package/dist/services/bot-profile-store.d.ts.map +1 -0
  276. package/dist/services/bot-profile-store.js +98 -0
  277. package/dist/services/bot-profile-store.js.map +1 -0
  278. package/dist/services/brand-store.d.ts +15 -0
  279. package/dist/services/brand-store.d.ts.map +1 -0
  280. package/dist/services/brand-store.js +47 -0
  281. package/dist/services/brand-store.js.map +1 -0
  282. package/dist/services/card-prefs-store.d.ts +20 -0
  283. package/dist/services/card-prefs-store.d.ts.map +1 -0
  284. package/dist/services/card-prefs-store.js +82 -0
  285. package/dist/services/card-prefs-store.js.map +1 -0
  286. package/dist/services/codex-bridge-queue.d.ts +1 -0
  287. package/dist/services/codex-bridge-queue.d.ts.map +1 -1
  288. package/dist/services/codex-bridge-queue.js +23 -0
  289. package/dist/services/codex-bridge-queue.js.map +1 -1
  290. package/dist/services/codex-transcript.d.ts +1 -0
  291. package/dist/services/codex-transcript.d.ts.map +1 -1
  292. package/dist/services/codex-transcript.js.map +1 -1
  293. package/dist/services/connector-store.d.ts +58 -0
  294. package/dist/services/connector-store.d.ts.map +1 -0
  295. package/dist/services/connector-store.js +79 -0
  296. package/dist/services/connector-store.js.map +1 -0
  297. package/dist/services/deployment-identity.d.ts +22 -0
  298. package/dist/services/deployment-identity.d.ts.map +1 -0
  299. package/dist/services/deployment-identity.js +67 -0
  300. package/dist/services/deployment-identity.js.map +1 -0
  301. package/dist/services/federation-membership-store.d.ts +23 -0
  302. package/dist/services/federation-membership-store.d.ts.map +1 -0
  303. package/dist/services/federation-membership-store.js +66 -0
  304. package/dist/services/federation-membership-store.js.map +1 -0
  305. package/dist/services/federation-roster.d.ts +54 -0
  306. package/dist/services/federation-roster.d.ts.map +1 -0
  307. package/dist/services/federation-roster.js +51 -0
  308. package/dist/services/federation-roster.js.map +1 -0
  309. package/dist/services/federation-store.d.ts +76 -0
  310. package/dist/services/federation-store.d.ts.map +1 -0
  311. package/dist/services/federation-store.js +133 -0
  312. package/dist/services/federation-store.js.map +1 -0
  313. package/dist/services/grant-store.d.ts +12 -2
  314. package/dist/services/grant-store.d.ts.map +1 -1
  315. package/dist/services/grant-store.js +51 -4
  316. package/dist/services/grant-store.js.map +1 -1
  317. package/dist/services/group-creator.d.ts +10 -0
  318. package/dist/services/group-creator.d.ts.map +1 -1
  319. package/dist/services/group-creator.js +26 -1
  320. package/dist/services/group-creator.js.map +1 -1
  321. package/dist/services/groups-store.d.ts +30 -0
  322. package/dist/services/groups-store.d.ts.map +1 -1
  323. package/dist/services/groups-store.js +85 -12
  324. package/dist/services/groups-store.js.map +1 -1
  325. package/dist/services/hermes-transcript.d.ts +7 -0
  326. package/dist/services/hermes-transcript.d.ts.map +1 -0
  327. package/dist/services/hermes-transcript.js +117 -0
  328. package/dist/services/hermes-transcript.js.map +1 -0
  329. package/dist/services/invite-store.d.ts +28 -0
  330. package/dist/services/invite-store.d.ts.map +1 -0
  331. package/dist/services/invite-store.js +85 -0
  332. package/dist/services/invite-store.js.map +1 -0
  333. package/dist/services/pairing-store.d.ts +47 -0
  334. package/dist/services/pairing-store.d.ts.map +1 -0
  335. package/dist/services/pairing-store.js +132 -0
  336. package/dist/services/pairing-store.js.map +1 -0
  337. package/dist/services/project-scanner.d.ts +10 -0
  338. package/dist/services/project-scanner.d.ts.map +1 -1
  339. package/dist/services/project-scanner.js +11 -0
  340. package/dist/services/project-scanner.js.map +1 -1
  341. package/dist/services/relay-picker.d.ts +22 -0
  342. package/dist/services/relay-picker.d.ts.map +1 -0
  343. package/dist/services/relay-picker.js +62 -0
  344. package/dist/services/relay-picker.js.map +1 -0
  345. package/dist/services/send-policy.d.ts +55 -0
  346. package/dist/services/send-policy.d.ts.map +1 -0
  347. package/dist/services/send-policy.js +47 -0
  348. package/dist/services/send-policy.js.map +1 -0
  349. package/dist/services/session-store.js +1 -1
  350. package/dist/services/session-store.js.map +1 -1
  351. package/dist/services/team-roster.d.ts +38 -0
  352. package/dist/services/team-roster.d.ts.map +1 -0
  353. package/dist/services/team-roster.js +82 -0
  354. package/dist/services/team-roster.js.map +1 -0
  355. package/dist/services/team-store.d.ts +54 -0
  356. package/dist/services/team-store.d.ts.map +1 -0
  357. package/dist/services/team-store.js +156 -0
  358. package/dist/services/team-store.js.map +1 -0
  359. package/dist/services/trigger-log-store.d.ts +46 -0
  360. package/dist/services/trigger-log-store.d.ts.map +1 -0
  361. package/dist/services/trigger-log-store.js +132 -0
  362. package/dist/services/trigger-log-store.js.map +1 -0
  363. package/dist/services/trigger-types.d.ts +57 -0
  364. package/dist/services/trigger-types.d.ts.map +1 -0
  365. package/dist/services/trigger-types.js +28 -0
  366. package/dist/services/trigger-types.js.map +1 -0
  367. package/dist/services/webhook-key.d.ts +16 -0
  368. package/dist/services/webhook-key.d.ts.map +1 -0
  369. package/dist/services/webhook-key.js +123 -0
  370. package/dist/services/webhook-key.js.map +1 -0
  371. package/dist/services/webhook-lifecycle-extractors.d.ts +15 -0
  372. package/dist/services/webhook-lifecycle-extractors.d.ts.map +1 -0
  373. package/dist/services/webhook-lifecycle-extractors.js +59 -0
  374. package/dist/services/webhook-lifecycle-extractors.js.map +1 -0
  375. package/dist/services/webhook-lifecycle-store.d.ts +45 -0
  376. package/dist/services/webhook-lifecycle-store.d.ts.map +1 -0
  377. package/dist/services/webhook-lifecycle-store.js +159 -0
  378. package/dist/services/webhook-lifecycle-store.js.map +1 -0
  379. package/dist/setup/bot-config-editor.d.ts +8 -1
  380. package/dist/setup/bot-config-editor.d.ts.map +1 -1
  381. package/dist/setup/bot-config-editor.js +20 -2
  382. package/dist/setup/bot-config-editor.js.map +1 -1
  383. package/dist/setup/ensure-tmux.d.ts +0 -22
  384. package/dist/setup/ensure-tmux.d.ts.map +1 -1
  385. package/dist/setup/ensure-tmux.js +25 -1
  386. package/dist/setup/ensure-tmux.js.map +1 -1
  387. package/dist/setup/verify-permissions.d.ts.map +1 -1
  388. package/dist/setup/verify-permissions.js +15 -1
  389. package/dist/setup/verify-permissions.js.map +1 -1
  390. package/dist/skills/definitions.d.ts +2 -0
  391. package/dist/skills/definitions.d.ts.map +1 -1
  392. package/dist/skills/definitions.js +178 -12
  393. package/dist/skills/definitions.js.map +1 -1
  394. package/dist/skills/installer.d.ts +34 -0
  395. package/dist/skills/installer.d.ts.map +1 -1
  396. package/dist/skills/installer.js +119 -2
  397. package/dist/skills/installer.js.map +1 -1
  398. package/dist/types.d.ts +29 -0
  399. package/dist/types.d.ts.map +1 -1
  400. package/dist/utils/bot-routing.d.ts +50 -0
  401. package/dist/utils/bot-routing.d.ts.map +1 -1
  402. package/dist/utils/bot-routing.js +83 -0
  403. package/dist/utils/bot-routing.js.map +1 -1
  404. package/dist/utils/daemon-discovery.d.ts +11 -0
  405. package/dist/utils/daemon-discovery.d.ts.map +1 -0
  406. package/dist/utils/daemon-discovery.js +59 -0
  407. package/dist/utils/daemon-discovery.js.map +1 -0
  408. package/dist/utils/user-token.d.ts.map +1 -1
  409. package/dist/utils/user-token.js +0 -2
  410. package/dist/utils/user-token.js.map +1 -1
  411. package/dist/worker.js +233 -51
  412. package/dist/worker.js.map +1 -1
  413. package/dist/workflows/attempt-resume.d.ts.map +1 -1
  414. package/dist/workflows/attempt-resume.js +2 -2
  415. package/dist/workflows/attempt-resume.js.map +1 -1
  416. package/dist/workflows/definition.d.ts +412 -9
  417. package/dist/workflows/definition.d.ts.map +1 -1
  418. package/dist/workflows/definition.js +238 -3
  419. package/dist/workflows/definition.js.map +1 -1
  420. package/dist/workflows/events/payloads.d.ts +114 -11
  421. package/dist/workflows/events/payloads.d.ts.map +1 -1
  422. package/dist/workflows/events/payloads.js +46 -0
  423. package/dist/workflows/events/payloads.js.map +1 -1
  424. package/dist/workflows/events/replay.d.ts +21 -0
  425. package/dist/workflows/events/replay.d.ts.map +1 -1
  426. package/dist/workflows/events/replay.js +103 -0
  427. package/dist/workflows/events/replay.js.map +1 -1
  428. package/dist/workflows/events/schema.d.ts +1301 -606
  429. package/dist/workflows/events/schema.d.ts.map +1 -1
  430. package/dist/workflows/events/schema.js +37 -1
  431. package/dist/workflows/events/schema.js.map +1 -1
  432. package/dist/workflows/events/types.d.ts +5 -1
  433. package/dist/workflows/events/types.d.ts.map +1 -1
  434. package/dist/workflows/loader.d.ts +14 -0
  435. package/dist/workflows/loader.d.ts.map +1 -1
  436. package/dist/workflows/loader.js +27 -0
  437. package/dist/workflows/loader.js.map +1 -1
  438. package/dist/workflows/loop.js +58 -0
  439. package/dist/workflows/loop.js.map +1 -1
  440. package/dist/workflows/ops-projection.d.ts +58 -0
  441. package/dist/workflows/ops-projection.d.ts.map +1 -1
  442. package/dist/workflows/ops-projection.js +74 -0
  443. package/dist/workflows/ops-projection.js.map +1 -1
  444. package/dist/workflows/orchestrator.d.ts +65 -1
  445. package/dist/workflows/orchestrator.d.ts.map +1 -1
  446. package/dist/workflows/orchestrator.js +486 -74
  447. package/dist/workflows/orchestrator.js.map +1 -1
  448. package/dist/workflows/output-binding.d.ts +8 -1
  449. package/dist/workflows/output-binding.d.ts.map +1 -1
  450. package/dist/workflows/output-binding.js +75 -11
  451. package/dist/workflows/output-binding.js.map +1 -1
  452. package/dist/workflows/runtime.d.ts +1 -1
  453. package/dist/workflows/runtime.d.ts.map +1 -1
  454. package/dist/workflows/runtime.js +39 -4
  455. package/dist/workflows/runtime.js.map +1 -1
  456. package/dist/workflows/trigger-from-envelope.d.ts +13 -0
  457. package/dist/workflows/trigger-from-envelope.d.ts.map +1 -0
  458. package/dist/workflows/trigger-from-envelope.js +67 -0
  459. package/dist/workflows/trigger-from-envelope.js.map +1 -0
  460. package/dist/workflows/wait.d.ts +23 -2
  461. package/dist/workflows/wait.d.ts.map +1 -1
  462. package/dist/workflows/wait.js +39 -17
  463. package/dist/workflows/wait.js.map +1 -1
  464. package/package.json +1 -1
  465. package/dist/services/feishu-task-client.d.ts +0 -28
  466. package/dist/services/feishu-task-client.d.ts.map +0 -1
  467. package/dist/services/feishu-task-client.js +0 -123
  468. package/dist/services/feishu-task-client.js.map +0 -1
  469. package/dist/services/task-store.d.ts +0 -37
  470. package/dist/services/task-store.d.ts.map +0 -1
  471. package/dist/services/task-store.js +0 -115
  472. package/dist/services/task-store.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
- runId: string;
115
114
  type: "runCreated";
115
+ runId: string;
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
- runId: string;
145
144
  type: "runCreated";
145
+ runId: string;
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
- runId: string;
197
196
  type: "runStarted";
197
+ runId: string;
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
- runId: string;
210
209
  type: "runStarted";
210
+ runId: string;
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
- runId: string;
281
280
  type: "runSucceeded";
281
+ runId: string;
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
- runId: string;
302
301
  type: "runSucceeded";
302
+ runId: string;
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
- runId: string;
354
353
  type: "runFailed";
354
+ runId: string;
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
- runId: string;
370
369
  type: "runFailed";
370
+ runId: string;
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
- runId: string;
414
413
  type: "runCanceled";
414
+ runId: string;
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
- runId: string;
429
428
  type: "runCanceled";
429
+ runId: string;
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
- runId: string;
478
477
  type: "nodeWaiting";
478
+ runId: string;
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
- runId: string;
495
494
  type: "nodeWaiting";
495
+ runId: string;
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
- runId: string;
546
545
  type: "nodeRetrying";
546
+ runId: string;
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
- runId: string;
563
562
  type: "nodeRetrying";
563
+ runId: string;
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
- runId: string;
611
610
  type: "nodeSucceeded";
611
+ runId: string;
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
- runId: string;
627
626
  type: "nodeSucceeded";
627
+ runId: string;
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
- runId: string;
677
676
  type: "nodeFailed";
677
+ runId: string;
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
- runId: string;
694
693
  type: "nodeFailed";
694
+ runId: string;
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
- runId: string;
742
741
  type: "nodeSkipped";
742
+ runId: string;
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
- runId: string;
758
757
  type: "nodeSkipped";
758
+ runId: string;
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
- runId: string;
805
804
  type: "nodeCanceled";
805
+ runId: string;
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
- runId: string;
821
820
  type: "nodeCanceled";
821
+ runId: string;
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
- runId: string;
871
870
  type: "activityRunning";
871
+ runId: string;
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
- runId: string;
888
887
  type: "activityRunning";
888
+ runId: string;
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
- runId: string;
936
935
  type: "activityWaiting";
936
+ runId: string;
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
- runId: string;
952
951
  type: "activityWaiting";
952
+ runId: string;
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
- runId: string;
1008
1007
  type: "activityTimedOut";
1008
+ runId: string;
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
- runId: string;
1027
1026
  type: "activityTimedOut";
1027
+ runId: string;
1028
1028
  schemaVersion: 1;
1029
1029
  eventId: string;
1030
1030
  payload: {
@@ -1042,23 +1042,17 @@ 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 ConditionEvaluatedEventSchema: z.ZodObject<{
1046
- type: z.ZodLiteral<"conditionEvaluated">;
1045
+ export declare const LoopStartedEventSchema: z.ZodObject<{
1046
+ type: z.ZodLiteral<"loopStarted">;
1047
1047
  payload: z.ZodUnion<[z.ZodObject<{
1048
- nodeId: z.ZodString;
1049
- conditionExpr: z.ZodString;
1050
- resultTrue: z.ZodBoolean;
1051
- evaluatedInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1048
+ loopId: z.ZodString;
1049
+ maxIterations: z.ZodNumber;
1052
1050
  }, "strip", z.ZodTypeAny, {
1053
- nodeId: string;
1054
- conditionExpr: string;
1055
- resultTrue: boolean;
1056
- evaluatedInputs?: Record<string, unknown> | undefined;
1051
+ loopId: string;
1052
+ maxIterations: number;
1057
1053
  }, {
1058
- nodeId: string;
1059
- conditionExpr: string;
1060
- resultTrue: boolean;
1061
- evaluatedInputs?: Record<string, unknown> | undefined;
1054
+ loopId: string;
1055
+ maxIterations: number;
1062
1056
  }>, z.ZodObject<{
1063
1057
  ref: z.ZodString;
1064
1058
  bytes: z.ZodNumber;
@@ -1079,15 +1073,13 @@ export declare const ConditionEvaluatedEventSchema: z.ZodObject<{
1079
1073
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1080
1074
  payloadHash: z.ZodOptional<z.ZodString>;
1081
1075
  }, "strip", z.ZodTypeAny, {
1076
+ type: "loopStarted";
1082
1077
  runId: string;
1083
- type: "conditionEvaluated";
1084
1078
  schemaVersion: 1;
1085
1079
  eventId: string;
1086
1080
  payload: {
1087
- nodeId: string;
1088
- conditionExpr: string;
1089
- resultTrue: boolean;
1090
- evaluatedInputs?: Record<string, unknown> | undefined;
1081
+ loopId: string;
1082
+ maxIterations: number;
1091
1083
  } | {
1092
1084
  ref: string;
1093
1085
  bytes: number;
@@ -1097,15 +1089,13 @@ export declare const ConditionEvaluatedEventSchema: z.ZodObject<{
1097
1089
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1098
1090
  payloadHash?: string | undefined;
1099
1091
  }, {
1092
+ type: "loopStarted";
1100
1093
  runId: string;
1101
- type: "conditionEvaluated";
1102
1094
  schemaVersion: 1;
1103
1095
  eventId: string;
1104
1096
  payload: {
1105
- nodeId: string;
1106
- conditionExpr: string;
1107
- resultTrue: boolean;
1108
- evaluatedInputs?: Record<string, unknown> | undefined;
1097
+ loopId: string;
1098
+ maxIterations: number;
1109
1099
  } | {
1110
1100
  ref: string;
1111
1101
  bytes: number;
@@ -1115,26 +1105,20 @@ export declare const ConditionEvaluatedEventSchema: z.ZodObject<{
1115
1105
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1116
1106
  payloadHash?: string | undefined;
1117
1107
  }>;
1118
- export declare const LeaseSignedEventSchema: z.ZodObject<{
1119
- type: z.ZodLiteral<"leaseSigned">;
1108
+ export declare const LoopIterationStartedEventSchema: z.ZodObject<{
1109
+ type: z.ZodLiteral<"loopIterationStarted">;
1120
1110
  payload: z.ZodUnion<[z.ZodObject<{
1121
- activityId: z.ZodString;
1122
- attemptId: z.ZodString;
1123
- leaseId: z.ZodString;
1124
- timeoutMs: z.ZodNumber;
1125
- maxOutputBytes: z.ZodNumber;
1111
+ loopId: z.ZodString;
1112
+ iteration: z.ZodNumber;
1113
+ prevResolution: z.ZodEnum<["initial", "rejected"]>;
1126
1114
  }, "strip", z.ZodTypeAny, {
1127
- attemptId: string;
1128
- activityId: string;
1129
- leaseId: string;
1130
- timeoutMs: number;
1131
- maxOutputBytes: number;
1115
+ loopId: string;
1116
+ iteration: number;
1117
+ prevResolution: "rejected" | "initial";
1132
1118
  }, {
1133
- attemptId: string;
1134
- activityId: string;
1135
- leaseId: string;
1136
- timeoutMs: number;
1137
- maxOutputBytes: number;
1119
+ loopId: string;
1120
+ iteration: number;
1121
+ prevResolution: "rejected" | "initial";
1138
1122
  }>, z.ZodObject<{
1139
1123
  ref: z.ZodString;
1140
1124
  bytes: z.ZodNumber;
@@ -1155,16 +1139,14 @@ export declare const LeaseSignedEventSchema: z.ZodObject<{
1155
1139
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1156
1140
  payloadHash: z.ZodOptional<z.ZodString>;
1157
1141
  }, "strip", z.ZodTypeAny, {
1142
+ type: "loopIterationStarted";
1158
1143
  runId: string;
1159
- type: "leaseSigned";
1160
1144
  schemaVersion: 1;
1161
1145
  eventId: string;
1162
1146
  payload: {
1163
- attemptId: string;
1164
- activityId: string;
1165
- leaseId: string;
1166
- timeoutMs: number;
1167
- maxOutputBytes: number;
1147
+ loopId: string;
1148
+ iteration: number;
1149
+ prevResolution: "rejected" | "initial";
1168
1150
  } | {
1169
1151
  ref: string;
1170
1152
  bytes: number;
@@ -1174,16 +1156,14 @@ export declare const LeaseSignedEventSchema: z.ZodObject<{
1174
1156
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1175
1157
  payloadHash?: string | undefined;
1176
1158
  }, {
1159
+ type: "loopIterationStarted";
1177
1160
  runId: string;
1178
- type: "leaseSigned";
1179
1161
  schemaVersion: 1;
1180
1162
  eventId: string;
1181
1163
  payload: {
1182
- attemptId: string;
1183
- activityId: string;
1184
- leaseId: string;
1185
- timeoutMs: number;
1186
- maxOutputBytes: number;
1164
+ loopId: string;
1165
+ iteration: number;
1166
+ prevResolution: "rejected" | "initial";
1187
1167
  } | {
1188
1168
  ref: string;
1189
1169
  bytes: number;
@@ -1193,14 +1173,106 @@ export declare const LeaseSignedEventSchema: z.ZodObject<{
1193
1173
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1194
1174
  payloadHash?: string | undefined;
1195
1175
  }>;
1196
- export declare const AttemptCreatedEventSchema: z.ZodObject<{
1197
- type: z.ZodLiteral<"attemptCreated">;
1176
+ export declare const LoopIterationFinishedEventSchema: z.ZodObject<{
1177
+ type: z.ZodLiteral<"loopIterationFinished">;
1198
1178
  payload: z.ZodUnion<[z.ZodObject<{
1199
- nodeId: z.ZodString;
1200
- activityId: z.ZodString;
1201
- attemptId: z.ZodString;
1202
- attemptNumber: z.ZodNumber;
1203
- inputRef: 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>;
1187
+ }, "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;
1196
+ }, {
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;
1205
+ }>, z.ZodObject<{
1206
+ ref: z.ZodString;
1207
+ bytes: z.ZodNumber;
1208
+ schemaVersion: z.ZodNumber;
1209
+ }, "strip", z.ZodTypeAny, {
1210
+ ref: string;
1211
+ bytes: number;
1212
+ schemaVersion: number;
1213
+ }, {
1214
+ ref: string;
1215
+ bytes: number;
1216
+ schemaVersion: number;
1217
+ }>]>;
1218
+ eventId: z.ZodString;
1219
+ runId: z.ZodString;
1220
+ timestamp: z.ZodNumber;
1221
+ schemaVersion: z.ZodLiteral<1>;
1222
+ actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1223
+ payloadHash: z.ZodOptional<z.ZodString>;
1224
+ }, "strip", z.ZodTypeAny, {
1225
+ type: "loopIterationFinished";
1226
+ runId: string;
1227
+ schemaVersion: 1;
1228
+ eventId: string;
1229
+ 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;
1238
+ } | {
1239
+ ref: string;
1240
+ bytes: number;
1241
+ schemaVersion: number;
1242
+ };
1243
+ timestamp: number;
1244
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1245
+ payloadHash?: string | undefined;
1246
+ }, {
1247
+ type: "loopIterationFinished";
1248
+ runId: string;
1249
+ schemaVersion: 1;
1250
+ eventId: string;
1251
+ 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;
1260
+ } | {
1261
+ ref: string;
1262
+ bytes: number;
1263
+ schemaVersion: number;
1264
+ };
1265
+ timestamp: number;
1266
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1267
+ payloadHash?: string | undefined;
1268
+ }>;
1269
+ export declare const LoopFinishedEventSchema: z.ZodObject<{
1270
+ type: z.ZodLiteral<"loopFinished">;
1271
+ 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<{
1204
1276
  outputHash: z.ZodString;
1205
1277
  outputPath: z.ZodOptional<z.ZodString>;
1206
1278
  outputBytes: z.ZodNumber;
@@ -1218,31 +1290,35 @@ export declare const AttemptCreatedEventSchema: z.ZodObject<{
1218
1290
  outputSchemaVersion: number;
1219
1291
  outputPath?: string | undefined;
1220
1292
  contentType?: string | undefined;
1221
- }>;
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"]>>;
1222
1296
  }, "strip", z.ZodTypeAny, {
1223
- nodeId: string;
1224
- attemptId: string;
1225
- activityId: string;
1226
- inputRef: {
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?: {
1227
1303
  outputHash: string;
1228
1304
  outputBytes: number;
1229
1305
  outputSchemaVersion: number;
1230
1306
  outputPath?: string | undefined;
1231
1307
  contentType?: string | undefined;
1232
- };
1233
- attemptNumber: number;
1308
+ } | undefined;
1234
1309
  }, {
1235
- nodeId: string;
1236
- attemptId: string;
1237
- activityId: string;
1238
- inputRef: {
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?: {
1239
1316
  outputHash: string;
1240
1317
  outputBytes: number;
1241
1318
  outputSchemaVersion: number;
1242
1319
  outputPath?: string | undefined;
1243
1320
  contentType?: string | undefined;
1244
- };
1245
- attemptNumber: number;
1321
+ } | undefined;
1246
1322
  }>, z.ZodObject<{
1247
1323
  ref: z.ZodString;
1248
1324
  bytes: z.ZodNumber;
@@ -1263,22 +1339,23 @@ export declare const AttemptCreatedEventSchema: z.ZodObject<{
1263
1339
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1264
1340
  payloadHash: z.ZodOptional<z.ZodString>;
1265
1341
  }, "strip", z.ZodTypeAny, {
1342
+ type: "loopFinished";
1266
1343
  runId: string;
1267
- type: "attemptCreated";
1268
1344
  schemaVersion: 1;
1269
1345
  eventId: string;
1270
1346
  payload: {
1271
- nodeId: string;
1272
- attemptId: string;
1273
- activityId: string;
1274
- inputRef: {
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?: {
1275
1353
  outputHash: string;
1276
1354
  outputBytes: number;
1277
1355
  outputSchemaVersion: number;
1278
1356
  outputPath?: string | undefined;
1279
1357
  contentType?: string | undefined;
1280
- };
1281
- attemptNumber: number;
1358
+ } | undefined;
1282
1359
  } | {
1283
1360
  ref: string;
1284
1361
  bytes: number;
@@ -1288,22 +1365,23 @@ export declare const AttemptCreatedEventSchema: z.ZodObject<{
1288
1365
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1289
1366
  payloadHash?: string | undefined;
1290
1367
  }, {
1368
+ type: "loopFinished";
1291
1369
  runId: string;
1292
- type: "attemptCreated";
1293
1370
  schemaVersion: 1;
1294
1371
  eventId: string;
1295
1372
  payload: {
1296
- nodeId: string;
1297
- attemptId: string;
1298
- activityId: string;
1299
- inputRef: {
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?: {
1300
1379
  outputHash: string;
1301
1380
  outputBytes: number;
1302
1381
  outputSchemaVersion: number;
1303
1382
  outputPath?: string | undefined;
1304
1383
  contentType?: string | undefined;
1305
- };
1306
- attemptNumber: number;
1384
+ } | undefined;
1307
1385
  } | {
1308
1386
  ref: string;
1309
1387
  bytes: number;
@@ -1313,48 +1391,23 @@ export declare const AttemptCreatedEventSchema: z.ZodObject<{
1313
1391
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1314
1392
  payloadHash?: string | undefined;
1315
1393
  }>;
1316
- export declare const BackoffScheduledEventSchema: z.ZodObject<{
1317
- type: z.ZodLiteral<"backoffScheduled">;
1394
+ export declare const ConditionEvaluatedEventSchema: z.ZodObject<{
1395
+ type: z.ZodLiteral<"conditionEvaluated">;
1318
1396
  payload: z.ZodUnion<[z.ZodObject<{
1319
1397
  nodeId: z.ZodString;
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
- }>;
1398
+ conditionExpr: z.ZodString;
1399
+ resultTrue: z.ZodBoolean;
1400
+ evaluatedInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1338
1401
  }, "strip", z.ZodTypeAny, {
1339
1402
  nodeId: string;
1340
- lastAttemptId: string;
1341
- nextAttemptAt: number;
1342
- backoffPolicy: {
1343
- kind: "fixed" | "exponential";
1344
- baseMs: number;
1345
- factor?: number | undefined;
1346
- jitter?: boolean | undefined;
1347
- };
1403
+ conditionExpr: string;
1404
+ resultTrue: boolean;
1405
+ evaluatedInputs?: Record<string, unknown> | undefined;
1348
1406
  }, {
1349
1407
  nodeId: string;
1350
- lastAttemptId: string;
1351
- nextAttemptAt: number;
1352
- backoffPolicy: {
1353
- kind: "fixed" | "exponential";
1354
- baseMs: number;
1355
- factor?: number | undefined;
1356
- jitter?: boolean | undefined;
1357
- };
1408
+ conditionExpr: string;
1409
+ resultTrue: boolean;
1410
+ evaluatedInputs?: Record<string, unknown> | undefined;
1358
1411
  }>, z.ZodObject<{
1359
1412
  ref: z.ZodString;
1360
1413
  bytes: z.ZodNumber;
@@ -1375,90 +1428,15 @@ export declare const BackoffScheduledEventSchema: z.ZodObject<{
1375
1428
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1376
1429
  payloadHash: z.ZodOptional<z.ZodString>;
1377
1430
  }, "strip", z.ZodTypeAny, {
1431
+ type: "conditionEvaluated";
1378
1432
  runId: string;
1379
- type: "backoffScheduled";
1380
1433
  schemaVersion: 1;
1381
1434
  eventId: string;
1382
1435
  payload: {
1383
1436
  nodeId: string;
1384
- lastAttemptId: string;
1385
- nextAttemptAt: number;
1386
- backoffPolicy: {
1387
- kind: "fixed" | "exponential";
1388
- baseMs: number;
1389
- factor?: number | undefined;
1390
- jitter?: boolean | undefined;
1391
- };
1392
- } | {
1393
- ref: string;
1394
- bytes: number;
1395
- schemaVersion: number;
1396
- };
1397
- timestamp: number;
1398
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1399
- payloadHash?: string | undefined;
1400
- }, {
1401
- runId: string;
1402
- type: "backoffScheduled";
1403
- schemaVersion: 1;
1404
- eventId: string;
1405
- payload: {
1406
- nodeId: string;
1407
- lastAttemptId: string;
1408
- nextAttemptAt: number;
1409
- backoffPolicy: {
1410
- kind: "fixed" | "exponential";
1411
- baseMs: number;
1412
- factor?: number | undefined;
1413
- jitter?: boolean | undefined;
1414
- };
1415
- } | {
1416
- ref: string;
1417
- bytes: number;
1418
- schemaVersion: number;
1419
- };
1420
- timestamp: number;
1421
- actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1422
- payloadHash?: string | undefined;
1423
- }>;
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;
1437
+ conditionExpr: string;
1438
+ resultTrue: boolean;
1439
+ evaluatedInputs?: Record<string, unknown> | undefined;
1462
1440
  } | {
1463
1441
  ref: string;
1464
1442
  bytes: number;
@@ -1468,13 +1446,15 @@ export declare const BackoffElapsedEventSchema: z.ZodObject<{
1468
1446
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1469
1447
  payloadHash?: string | undefined;
1470
1448
  }, {
1449
+ type: "conditionEvaluated";
1471
1450
  runId: string;
1472
- type: "backoffElapsed";
1473
1451
  schemaVersion: 1;
1474
1452
  eventId: string;
1475
1453
  payload: {
1476
1454
  nodeId: string;
1477
- scheduledAttemptId: string;
1455
+ conditionExpr: string;
1456
+ resultTrue: boolean;
1457
+ evaluatedInputs?: Record<string, unknown> | undefined;
1478
1458
  } | {
1479
1459
  ref: string;
1480
1460
  bytes: number;
@@ -1484,29 +1464,26 @@ export declare const BackoffElapsedEventSchema: z.ZodObject<{
1484
1464
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1485
1465
  payloadHash?: string | undefined;
1486
1466
  }>;
1487
- export declare const EffectAttemptedEventSchema: z.ZodObject<{
1488
- type: z.ZodLiteral<"effectAttempted">;
1467
+ export declare const LeaseSignedEventSchema: z.ZodObject<{
1468
+ type: z.ZodLiteral<"leaseSigned">;
1489
1469
  payload: z.ZodUnion<[z.ZodObject<{
1490
1470
  activityId: z.ZodString;
1491
1471
  attemptId: z.ZodString;
1492
- idempotencyKey: z.ZodString;
1493
- inputHash: z.ZodString;
1494
- idempotencyTtlMs: z.ZodNumber;
1495
- provider: z.ZodString;
1472
+ leaseId: z.ZodString;
1473
+ timeoutMs: z.ZodNumber;
1474
+ maxOutputBytes: z.ZodNumber;
1496
1475
  }, "strip", z.ZodTypeAny, {
1497
1476
  attemptId: string;
1498
1477
  activityId: string;
1499
- idempotencyKey: string;
1500
- inputHash: string;
1501
- idempotencyTtlMs: number;
1502
- provider: string;
1478
+ leaseId: string;
1479
+ timeoutMs: number;
1480
+ maxOutputBytes: number;
1503
1481
  }, {
1504
1482
  attemptId: string;
1505
1483
  activityId: string;
1506
- idempotencyKey: string;
1507
- inputHash: string;
1508
- idempotencyTtlMs: number;
1509
- provider: string;
1484
+ leaseId: string;
1485
+ timeoutMs: number;
1486
+ maxOutputBytes: number;
1510
1487
  }>, z.ZodObject<{
1511
1488
  ref: z.ZodString;
1512
1489
  bytes: z.ZodNumber;
@@ -1527,17 +1504,16 @@ export declare const EffectAttemptedEventSchema: z.ZodObject<{
1527
1504
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1528
1505
  payloadHash: z.ZodOptional<z.ZodString>;
1529
1506
  }, "strip", z.ZodTypeAny, {
1507
+ type: "leaseSigned";
1530
1508
  runId: string;
1531
- type: "effectAttempted";
1532
1509
  schemaVersion: 1;
1533
1510
  eventId: string;
1534
1511
  payload: {
1535
1512
  attemptId: string;
1536
1513
  activityId: string;
1537
- idempotencyKey: string;
1538
- inputHash: string;
1539
- idempotencyTtlMs: number;
1540
- provider: string;
1514
+ leaseId: string;
1515
+ timeoutMs: number;
1516
+ maxOutputBytes: number;
1541
1517
  } | {
1542
1518
  ref: string;
1543
1519
  bytes: number;
@@ -1547,17 +1523,16 @@ export declare const EffectAttemptedEventSchema: z.ZodObject<{
1547
1523
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1548
1524
  payloadHash?: string | undefined;
1549
1525
  }, {
1526
+ type: "leaseSigned";
1550
1527
  runId: string;
1551
- type: "effectAttempted";
1552
1528
  schemaVersion: 1;
1553
1529
  eventId: string;
1554
1530
  payload: {
1555
1531
  attemptId: string;
1556
1532
  activityId: string;
1557
- idempotencyKey: string;
1558
- inputHash: string;
1559
- idempotencyTtlMs: number;
1560
- provider: string;
1533
+ leaseId: string;
1534
+ timeoutMs: number;
1535
+ maxOutputBytes: number;
1561
1536
  } | {
1562
1537
  ref: string;
1563
1538
  bytes: number;
@@ -1567,12 +1542,14 @@ export declare const EffectAttemptedEventSchema: z.ZodObject<{
1567
1542
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1568
1543
  payloadHash?: string | undefined;
1569
1544
  }>;
1570
- export declare const ActivitySucceededEventSchema: z.ZodObject<{
1571
- type: z.ZodLiteral<"activitySucceeded">;
1545
+ export declare const AttemptCreatedEventSchema: z.ZodObject<{
1546
+ type: z.ZodLiteral<"attemptCreated">;
1572
1547
  payload: z.ZodUnion<[z.ZodObject<{
1548
+ nodeId: z.ZodString;
1573
1549
  activityId: z.ZodString;
1574
1550
  attemptId: z.ZodString;
1575
- outputRef: z.ZodObject<{
1551
+ attemptNumber: z.ZodNumber;
1552
+ inputRef: z.ZodObject<{
1576
1553
  outputHash: z.ZodString;
1577
1554
  outputPath: z.ZodOptional<z.ZodString>;
1578
1555
  outputBytes: z.ZodNumber;
@@ -1591,29 +1568,30 @@ export declare const ActivitySucceededEventSchema: z.ZodObject<{
1591
1568
  outputPath?: string | undefined;
1592
1569
  contentType?: string | undefined;
1593
1570
  }>;
1594
- externalRefs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1595
1571
  }, "strip", z.ZodTypeAny, {
1572
+ nodeId: string;
1596
1573
  attemptId: string;
1597
1574
  activityId: string;
1598
- outputRef: {
1575
+ inputRef: {
1599
1576
  outputHash: string;
1600
1577
  outputBytes: number;
1601
1578
  outputSchemaVersion: number;
1602
1579
  outputPath?: string | undefined;
1603
1580
  contentType?: string | undefined;
1604
1581
  };
1605
- externalRefs?: Record<string, unknown> | undefined;
1582
+ attemptNumber: number;
1606
1583
  }, {
1584
+ nodeId: string;
1607
1585
  attemptId: string;
1608
1586
  activityId: string;
1609
- outputRef: {
1587
+ inputRef: {
1610
1588
  outputHash: string;
1611
1589
  outputBytes: number;
1612
1590
  outputSchemaVersion: number;
1613
1591
  outputPath?: string | undefined;
1614
1592
  contentType?: string | undefined;
1615
1593
  };
1616
- externalRefs?: Record<string, unknown> | undefined;
1594
+ attemptNumber: number;
1617
1595
  }>, z.ZodObject<{
1618
1596
  ref: z.ZodString;
1619
1597
  bytes: z.ZodNumber;
@@ -1634,21 +1612,22 @@ export declare const ActivitySucceededEventSchema: z.ZodObject<{
1634
1612
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1635
1613
  payloadHash: z.ZodOptional<z.ZodString>;
1636
1614
  }, "strip", z.ZodTypeAny, {
1615
+ type: "attemptCreated";
1637
1616
  runId: string;
1638
- type: "activitySucceeded";
1639
1617
  schemaVersion: 1;
1640
1618
  eventId: string;
1641
1619
  payload: {
1620
+ nodeId: string;
1642
1621
  attemptId: string;
1643
1622
  activityId: string;
1644
- outputRef: {
1623
+ inputRef: {
1645
1624
  outputHash: string;
1646
1625
  outputBytes: number;
1647
1626
  outputSchemaVersion: number;
1648
1627
  outputPath?: string | undefined;
1649
1628
  contentType?: string | undefined;
1650
1629
  };
1651
- externalRefs?: Record<string, unknown> | undefined;
1630
+ attemptNumber: number;
1652
1631
  } | {
1653
1632
  ref: string;
1654
1633
  bytes: number;
@@ -1658,21 +1637,22 @@ export declare const ActivitySucceededEventSchema: z.ZodObject<{
1658
1637
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1659
1638
  payloadHash?: string | undefined;
1660
1639
  }, {
1640
+ type: "attemptCreated";
1661
1641
  runId: string;
1662
- type: "activitySucceeded";
1663
1642
  schemaVersion: 1;
1664
1643
  eventId: string;
1665
1644
  payload: {
1645
+ nodeId: string;
1666
1646
  attemptId: string;
1667
1647
  activityId: string;
1668
- outputRef: {
1648
+ inputRef: {
1669
1649
  outputHash: string;
1670
1650
  outputBytes: number;
1671
1651
  outputSchemaVersion: number;
1672
1652
  outputPath?: string | undefined;
1673
1653
  contentType?: string | undefined;
1674
1654
  };
1675
- externalRefs?: Record<string, unknown> | undefined;
1655
+ attemptNumber: number;
1676
1656
  } | {
1677
1657
  ref: string;
1678
1658
  bytes: number;
@@ -1682,45 +1662,48 @@ export declare const ActivitySucceededEventSchema: z.ZodObject<{
1682
1662
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1683
1663
  payloadHash?: string | undefined;
1684
1664
  }>;
1685
- export declare const ActivityFailedEventSchema: z.ZodObject<{
1686
- type: z.ZodLiteral<"activityFailed">;
1665
+ export declare const BackoffScheduledEventSchema: z.ZodObject<{
1666
+ type: z.ZodLiteral<"backoffScheduled">;
1687
1667
  payload: z.ZodUnion<[z.ZodObject<{
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>;
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>;
1695
1676
  }, "strip", z.ZodTypeAny, {
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;
1677
+ kind: "fixed" | "exponential";
1678
+ baseMs: number;
1679
+ factor?: number | undefined;
1680
+ jitter?: boolean | undefined;
1700
1681
  }, {
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;
1682
+ kind: "fixed" | "exponential";
1683
+ baseMs: number;
1684
+ factor?: number | undefined;
1685
+ jitter?: boolean | undefined;
1705
1686
  }>;
1706
1687
  }, "strip", z.ZodTypeAny, {
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;
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;
1712
1696
  };
1713
- attemptId: string;
1714
- activityId: string;
1715
1697
  }, {
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;
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;
1721
1706
  };
1722
- attemptId: string;
1723
- activityId: string;
1724
1707
  }>, z.ZodObject<{
1725
1708
  ref: z.ZodString;
1726
1709
  bytes: z.ZodNumber;
@@ -1741,19 +1724,20 @@ export declare const ActivityFailedEventSchema: z.ZodObject<{
1741
1724
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1742
1725
  payloadHash: z.ZodOptional<z.ZodString>;
1743
1726
  }, "strip", z.ZodTypeAny, {
1727
+ type: "backoffScheduled";
1744
1728
  runId: string;
1745
- type: "activityFailed";
1746
1729
  schemaVersion: 1;
1747
1730
  eventId: string;
1748
1731
  payload: {
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;
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;
1754
1740
  };
1755
- attemptId: string;
1756
- activityId: string;
1757
1741
  } | {
1758
1742
  ref: string;
1759
1743
  bytes: number;
@@ -1763,19 +1747,20 @@ export declare const ActivityFailedEventSchema: z.ZodObject<{
1763
1747
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1764
1748
  payloadHash?: string | undefined;
1765
1749
  }, {
1750
+ type: "backoffScheduled";
1766
1751
  runId: string;
1767
- type: "activityFailed";
1768
1752
  schemaVersion: 1;
1769
1753
  eventId: string;
1770
1754
  payload: {
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;
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;
1776
1763
  };
1777
- attemptId: string;
1778
- activityId: string;
1779
1764
  } | {
1780
1765
  ref: string;
1781
1766
  bytes: number;
@@ -1785,7 +1770,371 @@ export declare const ActivityFailedEventSchema: z.ZodObject<{
1785
1770
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1786
1771
  payloadHash?: string | undefined;
1787
1772
  }>;
1788
- export declare const WaitCreatedEventSchema: z.ZodObject<{
1773
+ export declare const BackoffElapsedEventSchema: z.ZodObject<{
1774
+ type: z.ZodLiteral<"backoffElapsed">;
1775
+ payload: z.ZodUnion<[z.ZodObject<{
1776
+ nodeId: z.ZodString;
1777
+ scheduledAttemptId: z.ZodString;
1778
+ }, "strip", z.ZodTypeAny, {
1779
+ nodeId: string;
1780
+ scheduledAttemptId: string;
1781
+ }, {
1782
+ nodeId: string;
1783
+ scheduledAttemptId: string;
1784
+ }>, z.ZodObject<{
1785
+ ref: z.ZodString;
1786
+ bytes: z.ZodNumber;
1787
+ schemaVersion: z.ZodNumber;
1788
+ }, "strip", z.ZodTypeAny, {
1789
+ ref: string;
1790
+ bytes: number;
1791
+ schemaVersion: number;
1792
+ }, {
1793
+ ref: string;
1794
+ bytes: number;
1795
+ schemaVersion: number;
1796
+ }>]>;
1797
+ eventId: z.ZodString;
1798
+ runId: z.ZodString;
1799
+ timestamp: z.ZodNumber;
1800
+ schemaVersion: z.ZodLiteral<1>;
1801
+ actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1802
+ payloadHash: z.ZodOptional<z.ZodString>;
1803
+ }, "strip", z.ZodTypeAny, {
1804
+ type: "backoffElapsed";
1805
+ runId: string;
1806
+ schemaVersion: 1;
1807
+ eventId: string;
1808
+ payload: {
1809
+ nodeId: string;
1810
+ scheduledAttemptId: string;
1811
+ } | {
1812
+ ref: string;
1813
+ bytes: number;
1814
+ schemaVersion: number;
1815
+ };
1816
+ timestamp: number;
1817
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1818
+ payloadHash?: string | undefined;
1819
+ }, {
1820
+ type: "backoffElapsed";
1821
+ runId: string;
1822
+ schemaVersion: 1;
1823
+ eventId: string;
1824
+ payload: {
1825
+ nodeId: string;
1826
+ scheduledAttemptId: string;
1827
+ } | {
1828
+ ref: string;
1829
+ bytes: number;
1830
+ schemaVersion: number;
1831
+ };
1832
+ timestamp: number;
1833
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1834
+ payloadHash?: string | undefined;
1835
+ }>;
1836
+ export declare const EffectAttemptedEventSchema: z.ZodObject<{
1837
+ type: z.ZodLiteral<"effectAttempted">;
1838
+ payload: z.ZodUnion<[z.ZodObject<{
1839
+ activityId: z.ZodString;
1840
+ attemptId: z.ZodString;
1841
+ idempotencyKey: z.ZodString;
1842
+ inputHash: z.ZodString;
1843
+ idempotencyTtlMs: z.ZodNumber;
1844
+ provider: z.ZodString;
1845
+ }, "strip", z.ZodTypeAny, {
1846
+ attemptId: string;
1847
+ activityId: string;
1848
+ idempotencyKey: string;
1849
+ inputHash: string;
1850
+ idempotencyTtlMs: number;
1851
+ provider: string;
1852
+ }, {
1853
+ attemptId: string;
1854
+ activityId: string;
1855
+ idempotencyKey: string;
1856
+ inputHash: string;
1857
+ idempotencyTtlMs: number;
1858
+ provider: string;
1859
+ }>, z.ZodObject<{
1860
+ ref: z.ZodString;
1861
+ bytes: z.ZodNumber;
1862
+ schemaVersion: z.ZodNumber;
1863
+ }, "strip", z.ZodTypeAny, {
1864
+ ref: string;
1865
+ bytes: number;
1866
+ schemaVersion: number;
1867
+ }, {
1868
+ ref: string;
1869
+ bytes: number;
1870
+ schemaVersion: number;
1871
+ }>]>;
1872
+ eventId: z.ZodString;
1873
+ runId: z.ZodString;
1874
+ timestamp: z.ZodNumber;
1875
+ schemaVersion: z.ZodLiteral<1>;
1876
+ actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1877
+ payloadHash: z.ZodOptional<z.ZodString>;
1878
+ }, "strip", z.ZodTypeAny, {
1879
+ type: "effectAttempted";
1880
+ runId: string;
1881
+ schemaVersion: 1;
1882
+ eventId: string;
1883
+ payload: {
1884
+ attemptId: string;
1885
+ activityId: string;
1886
+ idempotencyKey: string;
1887
+ inputHash: string;
1888
+ idempotencyTtlMs: number;
1889
+ provider: string;
1890
+ } | {
1891
+ ref: string;
1892
+ bytes: number;
1893
+ schemaVersion: number;
1894
+ };
1895
+ timestamp: number;
1896
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1897
+ payloadHash?: string | undefined;
1898
+ }, {
1899
+ type: "effectAttempted";
1900
+ runId: string;
1901
+ schemaVersion: 1;
1902
+ eventId: string;
1903
+ payload: {
1904
+ attemptId: string;
1905
+ activityId: string;
1906
+ idempotencyKey: string;
1907
+ inputHash: string;
1908
+ idempotencyTtlMs: number;
1909
+ provider: string;
1910
+ } | {
1911
+ ref: string;
1912
+ bytes: number;
1913
+ schemaVersion: number;
1914
+ };
1915
+ timestamp: number;
1916
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1917
+ payloadHash?: string | undefined;
1918
+ }>;
1919
+ export declare const ActivitySucceededEventSchema: z.ZodObject<{
1920
+ type: z.ZodLiteral<"activitySucceeded">;
1921
+ payload: z.ZodUnion<[z.ZodObject<{
1922
+ 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>>;
1944
+ }, "strip", z.ZodTypeAny, {
1945
+ attemptId: string;
1946
+ 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;
1955
+ }, {
1956
+ attemptId: string;
1957
+ 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;
1966
+ }>, z.ZodObject<{
1967
+ ref: z.ZodString;
1968
+ bytes: z.ZodNumber;
1969
+ schemaVersion: z.ZodNumber;
1970
+ }, "strip", z.ZodTypeAny, {
1971
+ ref: string;
1972
+ bytes: number;
1973
+ schemaVersion: number;
1974
+ }, {
1975
+ ref: string;
1976
+ bytes: number;
1977
+ schemaVersion: number;
1978
+ }>]>;
1979
+ eventId: z.ZodString;
1980
+ runId: z.ZodString;
1981
+ timestamp: z.ZodNumber;
1982
+ schemaVersion: z.ZodLiteral<1>;
1983
+ actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1984
+ payloadHash: z.ZodOptional<z.ZodString>;
1985
+ }, "strip", z.ZodTypeAny, {
1986
+ type: "activitySucceeded";
1987
+ runId: string;
1988
+ schemaVersion: 1;
1989
+ eventId: string;
1990
+ payload: {
1991
+ attemptId: string;
1992
+ 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;
2001
+ } | {
2002
+ ref: string;
2003
+ bytes: number;
2004
+ schemaVersion: number;
2005
+ };
2006
+ timestamp: number;
2007
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2008
+ payloadHash?: string | undefined;
2009
+ }, {
2010
+ type: "activitySucceeded";
2011
+ runId: string;
2012
+ schemaVersion: 1;
2013
+ eventId: string;
2014
+ payload: {
2015
+ attemptId: string;
2016
+ 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;
2025
+ } | {
2026
+ ref: string;
2027
+ bytes: number;
2028
+ schemaVersion: number;
2029
+ };
2030
+ timestamp: number;
2031
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2032
+ payloadHash?: string | undefined;
2033
+ }>;
2034
+ export declare const ActivityFailedEventSchema: z.ZodObject<{
2035
+ type: z.ZodLiteral<"activityFailed">;
2036
+ 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>;
2044
+ }, "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<{
1789
2138
  type: z.ZodLiteral<"waitCreated">;
1790
2139
  payload: z.ZodUnion<[z.ZodObject<{
1791
2140
  activityId: z.ZodString;
@@ -1867,8 +2216,8 @@ export declare const WaitCreatedEventSchema: z.ZodObject<{
1867
2216
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1868
2217
  payloadHash: z.ZodOptional<z.ZodString>;
1869
2218
  }, "strip", z.ZodTypeAny, {
1870
- runId: string;
1871
2219
  type: "waitCreated";
2220
+ runId: string;
1872
2221
  schemaVersion: 1;
1873
2222
  eventId: string;
1874
2223
  payload: {
@@ -1896,8 +2245,8 @@ export declare const WaitCreatedEventSchema: z.ZodObject<{
1896
2245
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1897
2246
  payloadHash?: string | undefined;
1898
2247
  }, {
1899
- runId: string;
1900
2248
  type: "waitCreated";
2249
+ runId: string;
1901
2250
  schemaVersion: 1;
1902
2251
  eventId: string;
1903
2252
  payload: {
@@ -1962,8 +2311,8 @@ export declare const WaitResolvedEventSchema: z.ZodObject<{
1962
2311
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
1963
2312
  payloadHash: z.ZodOptional<z.ZodString>;
1964
2313
  }, "strip", z.ZodTypeAny, {
1965
- runId: string;
1966
2314
  type: "waitResolved";
2315
+ runId: string;
1967
2316
  schemaVersion: 1;
1968
2317
  eventId: string;
1969
2318
  payload: {
@@ -1980,8 +2329,8 @@ export declare const WaitResolvedEventSchema: z.ZodObject<{
1980
2329
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
1981
2330
  payloadHash?: string | undefined;
1982
2331
  }, {
1983
- runId: string;
1984
2332
  type: "waitResolved";
2333
+ runId: string;
1985
2334
  schemaVersion: 1;
1986
2335
  eventId: string;
1987
2336
  payload: {
@@ -2032,8 +2381,8 @@ export declare const WaitDeadlineExceededEventSchema: z.ZodObject<{
2032
2381
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2033
2382
  payloadHash: z.ZodOptional<z.ZodString>;
2034
2383
  }, "strip", z.ZodTypeAny, {
2035
- runId: string;
2036
2384
  type: "waitDeadlineExceeded";
2385
+ runId: string;
2037
2386
  schemaVersion: 1;
2038
2387
  eventId: string;
2039
2388
  payload: {
@@ -2049,8 +2398,8 @@ export declare const WaitDeadlineExceededEventSchema: z.ZodObject<{
2049
2398
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2050
2399
  payloadHash?: string | undefined;
2051
2400
  }, {
2052
- runId: string;
2053
2401
  type: "waitDeadlineExceeded";
2402
+ runId: string;
2054
2403
  schemaVersion: 1;
2055
2404
  eventId: string;
2056
2405
  payload: {
@@ -2145,8 +2494,8 @@ export declare const CancelRequestedEventSchema: z.ZodObject<{
2145
2494
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2146
2495
  payloadHash: z.ZodOptional<z.ZodString>;
2147
2496
  }, "strip", z.ZodTypeAny, {
2148
- runId: string;
2149
2497
  type: "cancelRequested";
2498
+ runId: string;
2150
2499
  schemaVersion: 1;
2151
2500
  eventId: string;
2152
2501
  payload: {
@@ -2171,8 +2520,8 @@ export declare const CancelRequestedEventSchema: z.ZodObject<{
2171
2520
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2172
2521
  payloadHash?: string | undefined;
2173
2522
  }, {
2174
- runId: string;
2175
2523
  type: "cancelRequested";
2524
+ runId: string;
2176
2525
  schemaVersion: 1;
2177
2526
  eventId: string;
2178
2527
  payload: {
@@ -2273,8 +2622,8 @@ export declare const CancelDeliveredEventSchema: z.ZodObject<{
2273
2622
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2274
2623
  payloadHash: z.ZodOptional<z.ZodString>;
2275
2624
  }, "strip", z.ZodTypeAny, {
2276
- runId: string;
2277
2625
  type: "cancelDelivered";
2626
+ runId: string;
2278
2627
  schemaVersion: 1;
2279
2628
  eventId: string;
2280
2629
  payload: {
@@ -2298,8 +2647,8 @@ export declare const CancelDeliveredEventSchema: z.ZodObject<{
2298
2647
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2299
2648
  payloadHash?: string | undefined;
2300
2649
  }, {
2301
- runId: string;
2302
2650
  type: "cancelDelivered";
2651
+ runId: string;
2303
2652
  schemaVersion: 1;
2304
2653
  eventId: string;
2305
2654
  payload: {
@@ -2357,8 +2706,8 @@ export declare const ActivityCanceledEventSchema: z.ZodObject<{
2357
2706
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2358
2707
  payloadHash: z.ZodOptional<z.ZodString>;
2359
2708
  }, "strip", z.ZodTypeAny, {
2360
- runId: string;
2361
2709
  type: "activityCanceled";
2710
+ runId: string;
2362
2711
  schemaVersion: 1;
2363
2712
  eventId: string;
2364
2713
  payload: {
@@ -2374,8 +2723,8 @@ export declare const ActivityCanceledEventSchema: z.ZodObject<{
2374
2723
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2375
2724
  payloadHash?: string | undefined;
2376
2725
  }, {
2377
- runId: string;
2378
2726
  type: "activityCanceled";
2727
+ runId: string;
2379
2728
  schemaVersion: 1;
2380
2729
  eventId: string;
2381
2730
  payload: {
@@ -2422,8 +2771,8 @@ export declare const WorkerLostEventSchema: z.ZodObject<{
2422
2771
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2423
2772
  payloadHash: z.ZodOptional<z.ZodString>;
2424
2773
  }, "strip", z.ZodTypeAny, {
2425
- runId: string;
2426
2774
  type: "workerLost";
2775
+ runId: string;
2427
2776
  schemaVersion: 1;
2428
2777
  eventId: string;
2429
2778
  payload: {
@@ -2438,8 +2787,8 @@ export declare const WorkerLostEventSchema: z.ZodObject<{
2438
2787
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2439
2788
  payloadHash?: string | undefined;
2440
2789
  }, {
2441
- runId: string;
2442
2790
  type: "workerLost";
2791
+ runId: string;
2443
2792
  schemaVersion: 1;
2444
2793
  eventId: string;
2445
2794
  payload: {
@@ -2485,8 +2834,8 @@ export declare const ResumeStartedEventSchema: z.ZodObject<{
2485
2834
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2486
2835
  payloadHash: z.ZodOptional<z.ZodString>;
2487
2836
  }, "strip", z.ZodTypeAny, {
2488
- runId: string;
2489
2837
  type: "resumeStarted";
2838
+ runId: string;
2490
2839
  schemaVersion: 1;
2491
2840
  eventId: string;
2492
2841
  payload: {
@@ -2501,8 +2850,8 @@ export declare const ResumeStartedEventSchema: z.ZodObject<{
2501
2850
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2502
2851
  payloadHash?: string | undefined;
2503
2852
  }, {
2504
- runId: string;
2505
2853
  type: "resumeStarted";
2854
+ runId: string;
2506
2855
  schemaVersion: 1;
2507
2856
  eventId: string;
2508
2857
  payload: {
@@ -2526,15 +2875,15 @@ export declare const ReconcileResultEventSchema: z.ZodObject<{
2526
2875
  decision: z.ZodEnum<["replayed", "completedByIdempotentSubmit", "manual", "freshRetry"]>;
2527
2876
  evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2528
2877
  }, "strip", z.ZodTypeAny, {
2878
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2529
2879
  activityId: string;
2530
2880
  idempotencyKey: string;
2531
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2532
2881
  decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
2533
2882
  evidence: Record<string, unknown>;
2534
2883
  }, {
2884
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2535
2885
  activityId: string;
2536
2886
  idempotencyKey: string;
2537
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2538
2887
  decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
2539
2888
  evidence: Record<string, unknown>;
2540
2889
  }>, z.ZodObject<{
@@ -2557,14 +2906,14 @@ export declare const ReconcileResultEventSchema: z.ZodObject<{
2557
2906
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2558
2907
  payloadHash: z.ZodOptional<z.ZodString>;
2559
2908
  }, "strip", z.ZodTypeAny, {
2560
- runId: string;
2561
2909
  type: "reconcileResult";
2910
+ runId: string;
2562
2911
  schemaVersion: 1;
2563
2912
  eventId: string;
2564
2913
  payload: {
2914
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2565
2915
  activityId: string;
2566
2916
  idempotencyKey: string;
2567
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2568
2917
  decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
2569
2918
  evidence: Record<string, unknown>;
2570
2919
  } | {
@@ -2576,14 +2925,14 @@ export declare const ReconcileResultEventSchema: z.ZodObject<{
2576
2925
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2577
2926
  payloadHash?: string | undefined;
2578
2927
  }, {
2579
- runId: string;
2580
2928
  type: "reconcileResult";
2929
+ runId: string;
2581
2930
  schemaVersion: 1;
2582
2931
  eventId: string;
2583
2932
  payload: {
2933
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2584
2934
  activityId: string;
2585
2935
  idempotencyKey: string;
2586
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
2587
2936
  decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
2588
2937
  evidence: Record<string, unknown>;
2589
2938
  } | {
@@ -2699,8 +3048,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2699
3048
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2700
3049
  payloadHash: z.ZodOptional<z.ZodString>;
2701
3050
  }, "strip", z.ZodTypeAny, {
2702
- runId: string;
2703
3051
  type: "runCreated";
3052
+ runId: string;
2704
3053
  schemaVersion: 1;
2705
3054
  eventId: string;
2706
3055
  payload: {
@@ -2729,8 +3078,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2729
3078
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2730
3079
  payloadHash?: string | undefined;
2731
3080
  }, {
2732
- runId: string;
2733
3081
  type: "runCreated";
3082
+ runId: string;
2734
3083
  schemaVersion: 1;
2735
3084
  eventId: string;
2736
3085
  payload: {
@@ -2759,8 +3108,285 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2759
3108
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2760
3109
  payloadHash?: string | undefined;
2761
3110
  }>, z.ZodObject<{
2762
- type: z.ZodLiteral<"runStarted">;
2763
- payload: z.ZodUnion<[z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>, z.ZodObject<{
3111
+ type: z.ZodLiteral<"runStarted">;
3112
+ payload: z.ZodUnion<[z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>, z.ZodObject<{
3113
+ ref: z.ZodString;
3114
+ bytes: z.ZodNumber;
3115
+ schemaVersion: z.ZodNumber;
3116
+ }, "strip", z.ZodTypeAny, {
3117
+ ref: string;
3118
+ bytes: number;
3119
+ schemaVersion: number;
3120
+ }, {
3121
+ ref: string;
3122
+ bytes: number;
3123
+ schemaVersion: number;
3124
+ }>]>;
3125
+ eventId: z.ZodString;
3126
+ runId: z.ZodString;
3127
+ timestamp: z.ZodNumber;
3128
+ schemaVersion: z.ZodLiteral<1>;
3129
+ actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3130
+ payloadHash: z.ZodOptional<z.ZodString>;
3131
+ }, "strip", z.ZodTypeAny, {
3132
+ type: "runStarted";
3133
+ runId: string;
3134
+ schemaVersion: 1;
3135
+ eventId: string;
3136
+ payload: {} | {
3137
+ ref: string;
3138
+ bytes: number;
3139
+ schemaVersion: number;
3140
+ };
3141
+ timestamp: number;
3142
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3143
+ payloadHash?: string | undefined;
3144
+ }, {
3145
+ type: "runStarted";
3146
+ runId: string;
3147
+ schemaVersion: 1;
3148
+ eventId: string;
3149
+ payload: {} | {
3150
+ ref: string;
3151
+ bytes: number;
3152
+ schemaVersion: number;
3153
+ };
3154
+ timestamp: number;
3155
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3156
+ payloadHash?: string | undefined;
3157
+ }>, z.ZodObject<{
3158
+ type: z.ZodLiteral<"runSucceeded">;
3159
+ 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
+ }>;
3179
+ }, "strip", z.ZodTypeAny, {
3180
+ outputRef: {
3181
+ outputHash: string;
3182
+ outputBytes: number;
3183
+ outputSchemaVersion: number;
3184
+ outputPath?: string | undefined;
3185
+ contentType?: string | undefined;
3186
+ };
3187
+ }, {
3188
+ outputRef: {
3189
+ outputHash: string;
3190
+ outputBytes: number;
3191
+ outputSchemaVersion: number;
3192
+ outputPath?: string | undefined;
3193
+ contentType?: string | undefined;
3194
+ };
3195
+ }>, z.ZodObject<{
3196
+ ref: z.ZodString;
3197
+ bytes: z.ZodNumber;
3198
+ schemaVersion: z.ZodNumber;
3199
+ }, "strip", z.ZodTypeAny, {
3200
+ ref: string;
3201
+ bytes: number;
3202
+ schemaVersion: number;
3203
+ }, {
3204
+ ref: string;
3205
+ bytes: number;
3206
+ schemaVersion: number;
3207
+ }>]>;
3208
+ eventId: z.ZodString;
3209
+ runId: z.ZodString;
3210
+ timestamp: z.ZodNumber;
3211
+ schemaVersion: z.ZodLiteral<1>;
3212
+ actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3213
+ payloadHash: z.ZodOptional<z.ZodString>;
3214
+ }, "strip", z.ZodTypeAny, {
3215
+ type: "runSucceeded";
3216
+ runId: string;
3217
+ schemaVersion: 1;
3218
+ eventId: string;
3219
+ payload: {
3220
+ outputRef: {
3221
+ outputHash: string;
3222
+ outputBytes: number;
3223
+ outputSchemaVersion: number;
3224
+ outputPath?: string | undefined;
3225
+ contentType?: string | undefined;
3226
+ };
3227
+ } | {
3228
+ ref: string;
3229
+ bytes: number;
3230
+ schemaVersion: number;
3231
+ };
3232
+ timestamp: number;
3233
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3234
+ payloadHash?: string | undefined;
3235
+ }, {
3236
+ type: "runSucceeded";
3237
+ runId: string;
3238
+ schemaVersion: 1;
3239
+ eventId: string;
3240
+ payload: {
3241
+ outputRef: {
3242
+ outputHash: string;
3243
+ outputBytes: number;
3244
+ outputSchemaVersion: number;
3245
+ outputPath?: string | undefined;
3246
+ contentType?: string | undefined;
3247
+ };
3248
+ } | {
3249
+ ref: string;
3250
+ bytes: number;
3251
+ schemaVersion: number;
3252
+ };
3253
+ timestamp: number;
3254
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3255
+ payloadHash?: string | undefined;
3256
+ }>, z.ZodObject<{
3257
+ type: z.ZodLiteral<"runFailed">;
3258
+ payload: z.ZodUnion<[z.ZodObject<{
3259
+ failedNodeId: z.ZodString;
3260
+ rootCauseEventId: z.ZodString;
3261
+ }, "strip", z.ZodTypeAny, {
3262
+ failedNodeId: string;
3263
+ rootCauseEventId: string;
3264
+ }, {
3265
+ failedNodeId: string;
3266
+ rootCauseEventId: string;
3267
+ }>, z.ZodObject<{
3268
+ ref: z.ZodString;
3269
+ bytes: z.ZodNumber;
3270
+ schemaVersion: z.ZodNumber;
3271
+ }, "strip", z.ZodTypeAny, {
3272
+ ref: string;
3273
+ bytes: number;
3274
+ schemaVersion: number;
3275
+ }, {
3276
+ ref: string;
3277
+ bytes: number;
3278
+ schemaVersion: number;
3279
+ }>]>;
3280
+ eventId: z.ZodString;
3281
+ runId: z.ZodString;
3282
+ timestamp: z.ZodNumber;
3283
+ schemaVersion: z.ZodLiteral<1>;
3284
+ actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3285
+ payloadHash: z.ZodOptional<z.ZodString>;
3286
+ }, "strip", z.ZodTypeAny, {
3287
+ type: "runFailed";
3288
+ runId: string;
3289
+ schemaVersion: 1;
3290
+ eventId: string;
3291
+ payload: {
3292
+ failedNodeId: string;
3293
+ rootCauseEventId: string;
3294
+ } | {
3295
+ ref: string;
3296
+ bytes: number;
3297
+ schemaVersion: number;
3298
+ };
3299
+ timestamp: number;
3300
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3301
+ payloadHash?: string | undefined;
3302
+ }, {
3303
+ type: "runFailed";
3304
+ runId: string;
3305
+ schemaVersion: 1;
3306
+ eventId: string;
3307
+ payload: {
3308
+ failedNodeId: string;
3309
+ rootCauseEventId: string;
3310
+ } | {
3311
+ ref: string;
3312
+ bytes: number;
3313
+ schemaVersion: number;
3314
+ };
3315
+ timestamp: number;
3316
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3317
+ payloadHash?: string | undefined;
3318
+ }>, z.ZodObject<{
3319
+ type: z.ZodLiteral<"runCanceled">;
3320
+ payload: z.ZodUnion<[z.ZodObject<{
3321
+ cancelOriginEventId: z.ZodString;
3322
+ }, "strip", z.ZodTypeAny, {
3323
+ cancelOriginEventId: string;
3324
+ }, {
3325
+ cancelOriginEventId: string;
3326
+ }>, z.ZodObject<{
3327
+ ref: z.ZodString;
3328
+ bytes: z.ZodNumber;
3329
+ schemaVersion: z.ZodNumber;
3330
+ }, "strip", z.ZodTypeAny, {
3331
+ ref: string;
3332
+ bytes: number;
3333
+ schemaVersion: number;
3334
+ }, {
3335
+ ref: string;
3336
+ bytes: number;
3337
+ schemaVersion: number;
3338
+ }>]>;
3339
+ eventId: z.ZodString;
3340
+ runId: z.ZodString;
3341
+ timestamp: z.ZodNumber;
3342
+ schemaVersion: z.ZodLiteral<1>;
3343
+ actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3344
+ payloadHash: z.ZodOptional<z.ZodString>;
3345
+ }, "strip", z.ZodTypeAny, {
3346
+ type: "runCanceled";
3347
+ runId: string;
3348
+ schemaVersion: 1;
3349
+ eventId: string;
3350
+ payload: {
3351
+ cancelOriginEventId: string;
3352
+ } | {
3353
+ ref: string;
3354
+ bytes: number;
3355
+ schemaVersion: number;
3356
+ };
3357
+ timestamp: number;
3358
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3359
+ payloadHash?: string | undefined;
3360
+ }, {
3361
+ type: "runCanceled";
3362
+ runId: string;
3363
+ schemaVersion: 1;
3364
+ eventId: string;
3365
+ payload: {
3366
+ cancelOriginEventId: string;
3367
+ } | {
3368
+ ref: string;
3369
+ bytes: number;
3370
+ schemaVersion: number;
3371
+ };
3372
+ timestamp: number;
3373
+ actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3374
+ payloadHash?: string | undefined;
3375
+ }>, 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<{
2764
3390
  ref: z.ZodString;
2765
3391
  bytes: z.ZodNumber;
2766
3392
  schemaVersion: z.ZodNumber;
@@ -2780,11 +3406,15 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2780
3406
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2781
3407
  payloadHash: z.ZodOptional<z.ZodString>;
2782
3408
  }, "strip", z.ZodTypeAny, {
3409
+ type: "nodeWaiting";
2783
3410
  runId: string;
2784
- type: "runStarted";
2785
3411
  schemaVersion: 1;
2786
3412
  eventId: string;
2787
- payload: {} | {
3413
+ payload: {
3414
+ nodeId: string;
3415
+ waitReason: string;
3416
+ deadlineAt?: number | undefined;
3417
+ } | {
2788
3418
  ref: string;
2789
3419
  bytes: number;
2790
3420
  schemaVersion: number;
@@ -2793,11 +3423,15 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2793
3423
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2794
3424
  payloadHash?: string | undefined;
2795
3425
  }, {
3426
+ type: "nodeWaiting";
2796
3427
  runId: string;
2797
- type: "runStarted";
2798
3428
  schemaVersion: 1;
2799
3429
  eventId: string;
2800
- payload: {} | {
3430
+ payload: {
3431
+ nodeId: string;
3432
+ waitReason: string;
3433
+ deadlineAt?: number | undefined;
3434
+ } | {
2801
3435
  ref: string;
2802
3436
  bytes: number;
2803
3437
  schemaVersion: number;
@@ -2806,43 +3440,19 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2806
3440
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2807
3441
  payloadHash?: string | undefined;
2808
3442
  }>, z.ZodObject<{
2809
- type: z.ZodLiteral<"runSucceeded">;
3443
+ type: z.ZodLiteral<"nodeRetrying">;
2810
3444
  payload: z.ZodUnion<[z.ZodObject<{
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
- }>;
3445
+ nodeId: z.ZodString;
3446
+ lastAttemptId: z.ZodString;
3447
+ nextBackoffMs: z.ZodNumber;
2830
3448
  }, "strip", z.ZodTypeAny, {
2831
- outputRef: {
2832
- outputHash: string;
2833
- outputBytes: number;
2834
- outputSchemaVersion: number;
2835
- outputPath?: string | undefined;
2836
- contentType?: string | undefined;
2837
- };
3449
+ nodeId: string;
3450
+ lastAttemptId: string;
3451
+ nextBackoffMs: number;
2838
3452
  }, {
2839
- outputRef: {
2840
- outputHash: string;
2841
- outputBytes: number;
2842
- outputSchemaVersion: number;
2843
- outputPath?: string | undefined;
2844
- contentType?: string | undefined;
2845
- };
3453
+ nodeId: string;
3454
+ lastAttemptId: string;
3455
+ nextBackoffMs: number;
2846
3456
  }>, z.ZodObject<{
2847
3457
  ref: z.ZodString;
2848
3458
  bytes: z.ZodNumber;
@@ -2863,18 +3473,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2863
3473
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2864
3474
  payloadHash: z.ZodOptional<z.ZodString>;
2865
3475
  }, "strip", z.ZodTypeAny, {
3476
+ type: "nodeRetrying";
2866
3477
  runId: string;
2867
- type: "runSucceeded";
2868
3478
  schemaVersion: 1;
2869
3479
  eventId: string;
2870
3480
  payload: {
2871
- outputRef: {
2872
- outputHash: string;
2873
- outputBytes: number;
2874
- outputSchemaVersion: number;
2875
- outputPath?: string | undefined;
2876
- contentType?: string | undefined;
2877
- };
3481
+ nodeId: string;
3482
+ lastAttemptId: string;
3483
+ nextBackoffMs: number;
2878
3484
  } | {
2879
3485
  ref: string;
2880
3486
  bytes: number;
@@ -2884,18 +3490,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2884
3490
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2885
3491
  payloadHash?: string | undefined;
2886
3492
  }, {
3493
+ type: "nodeRetrying";
2887
3494
  runId: string;
2888
- type: "runSucceeded";
2889
3495
  schemaVersion: 1;
2890
3496
  eventId: string;
2891
3497
  payload: {
2892
- outputRef: {
2893
- outputHash: string;
2894
- outputBytes: number;
2895
- outputSchemaVersion: number;
2896
- outputPath?: string | undefined;
2897
- contentType?: string | undefined;
2898
- };
3498
+ nodeId: string;
3499
+ lastAttemptId: string;
3500
+ nextBackoffMs: number;
2899
3501
  } | {
2900
3502
  ref: string;
2901
3503
  bytes: number;
@@ -2905,16 +3507,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2905
3507
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2906
3508
  payloadHash?: string | undefined;
2907
3509
  }>, z.ZodObject<{
2908
- type: z.ZodLiteral<"runFailed">;
3510
+ type: z.ZodLiteral<"nodeSucceeded">;
2909
3511
  payload: z.ZodUnion<[z.ZodObject<{
2910
- failedNodeId: z.ZodString;
2911
- rootCauseEventId: z.ZodString;
3512
+ nodeId: z.ZodString;
3513
+ lastActivityId: z.ZodString;
2912
3514
  }, "strip", z.ZodTypeAny, {
2913
- failedNodeId: string;
2914
- rootCauseEventId: string;
3515
+ nodeId: string;
3516
+ lastActivityId: string;
2915
3517
  }, {
2916
- failedNodeId: string;
2917
- rootCauseEventId: string;
3518
+ nodeId: string;
3519
+ lastActivityId: string;
2918
3520
  }>, z.ZodObject<{
2919
3521
  ref: z.ZodString;
2920
3522
  bytes: z.ZodNumber;
@@ -2935,13 +3537,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2935
3537
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2936
3538
  payloadHash: z.ZodOptional<z.ZodString>;
2937
3539
  }, "strip", z.ZodTypeAny, {
3540
+ type: "nodeSucceeded";
2938
3541
  runId: string;
2939
- type: "runFailed";
2940
3542
  schemaVersion: 1;
2941
3543
  eventId: string;
2942
3544
  payload: {
2943
- failedNodeId: string;
2944
- rootCauseEventId: string;
3545
+ nodeId: string;
3546
+ lastActivityId: string;
2945
3547
  } | {
2946
3548
  ref: string;
2947
3549
  bytes: number;
@@ -2951,13 +3553,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2951
3553
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2952
3554
  payloadHash?: string | undefined;
2953
3555
  }, {
3556
+ type: "nodeSucceeded";
2954
3557
  runId: string;
2955
- type: "runFailed";
2956
3558
  schemaVersion: 1;
2957
3559
  eventId: string;
2958
3560
  payload: {
2959
- failedNodeId: string;
2960
- rootCauseEventId: string;
3561
+ nodeId: string;
3562
+ lastActivityId: string;
2961
3563
  } | {
2962
3564
  ref: string;
2963
3565
  bytes: number;
@@ -2967,13 +3569,19 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2967
3569
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
2968
3570
  payloadHash?: string | undefined;
2969
3571
  }>, z.ZodObject<{
2970
- type: z.ZodLiteral<"runCanceled">;
3572
+ type: z.ZodLiteral<"nodeFailed">;
2971
3573
  payload: z.ZodUnion<[z.ZodObject<{
2972
- cancelOriginEventId: z.ZodString;
3574
+ nodeId: z.ZodString;
3575
+ lastActivityId: z.ZodString;
3576
+ errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
2973
3577
  }, "strip", z.ZodTypeAny, {
2974
- cancelOriginEventId: string;
3578
+ nodeId: string;
3579
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
3580
+ lastActivityId: string;
2975
3581
  }, {
2976
- cancelOriginEventId: string;
3582
+ nodeId: string;
3583
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
3584
+ lastActivityId: string;
2977
3585
  }>, z.ZodObject<{
2978
3586
  ref: z.ZodString;
2979
3587
  bytes: z.ZodNumber;
@@ -2994,12 +3602,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2994
3602
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
2995
3603
  payloadHash: z.ZodOptional<z.ZodString>;
2996
3604
  }, "strip", z.ZodTypeAny, {
3605
+ type: "nodeFailed";
2997
3606
  runId: string;
2998
- type: "runCanceled";
2999
3607
  schemaVersion: 1;
3000
3608
  eventId: string;
3001
3609
  payload: {
3002
- cancelOriginEventId: string;
3610
+ nodeId: string;
3611
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
3612
+ lastActivityId: string;
3003
3613
  } | {
3004
3614
  ref: string;
3005
3615
  bytes: number;
@@ -3009,12 +3619,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3009
3619
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3010
3620
  payloadHash?: string | undefined;
3011
3621
  }, {
3622
+ type: "nodeFailed";
3012
3623
  runId: string;
3013
- type: "runCanceled";
3014
3624
  schemaVersion: 1;
3015
3625
  eventId: string;
3016
3626
  payload: {
3017
- cancelOriginEventId: string;
3627
+ nodeId: string;
3628
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
3629
+ lastActivityId: string;
3018
3630
  } | {
3019
3631
  ref: string;
3020
3632
  bytes: number;
@@ -3024,19 +3636,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3024
3636
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3025
3637
  payloadHash?: string | undefined;
3026
3638
  }>, z.ZodObject<{
3027
- type: z.ZodLiteral<"nodeWaiting">;
3639
+ type: z.ZodLiteral<"nodeSkipped">;
3028
3640
  payload: z.ZodUnion<[z.ZodObject<{
3029
3641
  nodeId: z.ZodString;
3030
- waitReason: z.ZodString;
3031
- deadlineAt: z.ZodOptional<z.ZodNumber>;
3642
+ conditionEventId: z.ZodString;
3032
3643
  }, "strip", z.ZodTypeAny, {
3033
3644
  nodeId: string;
3034
- waitReason: string;
3035
- deadlineAt?: number | undefined;
3645
+ conditionEventId: string;
3036
3646
  }, {
3037
3647
  nodeId: string;
3038
- waitReason: string;
3039
- deadlineAt?: number | undefined;
3648
+ conditionEventId: string;
3040
3649
  }>, z.ZodObject<{
3041
3650
  ref: z.ZodString;
3042
3651
  bytes: z.ZodNumber;
@@ -3057,14 +3666,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3057
3666
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3058
3667
  payloadHash: z.ZodOptional<z.ZodString>;
3059
3668
  }, "strip", z.ZodTypeAny, {
3669
+ type: "nodeSkipped";
3060
3670
  runId: string;
3061
- type: "nodeWaiting";
3062
3671
  schemaVersion: 1;
3063
3672
  eventId: string;
3064
3673
  payload: {
3065
3674
  nodeId: string;
3066
- waitReason: string;
3067
- deadlineAt?: number | undefined;
3675
+ conditionEventId: string;
3068
3676
  } | {
3069
3677
  ref: string;
3070
3678
  bytes: number;
@@ -3074,14 +3682,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3074
3682
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3075
3683
  payloadHash?: string | undefined;
3076
3684
  }, {
3685
+ type: "nodeSkipped";
3077
3686
  runId: string;
3078
- type: "nodeWaiting";
3079
3687
  schemaVersion: 1;
3080
3688
  eventId: string;
3081
3689
  payload: {
3082
3690
  nodeId: string;
3083
- waitReason: string;
3084
- deadlineAt?: number | undefined;
3691
+ conditionEventId: string;
3085
3692
  } | {
3086
3693
  ref: string;
3087
3694
  bytes: number;
@@ -3091,19 +3698,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3091
3698
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3092
3699
  payloadHash?: string | undefined;
3093
3700
  }>, z.ZodObject<{
3094
- type: z.ZodLiteral<"nodeRetrying">;
3701
+ type: z.ZodLiteral<"nodeCanceled">;
3095
3702
  payload: z.ZodUnion<[z.ZodObject<{
3096
3703
  nodeId: z.ZodString;
3097
- lastAttemptId: z.ZodString;
3098
- nextBackoffMs: z.ZodNumber;
3704
+ cancelOriginEventId: z.ZodString;
3099
3705
  }, "strip", z.ZodTypeAny, {
3100
3706
  nodeId: string;
3101
- lastAttemptId: string;
3102
- nextBackoffMs: number;
3707
+ cancelOriginEventId: string;
3103
3708
  }, {
3104
3709
  nodeId: string;
3105
- lastAttemptId: string;
3106
- nextBackoffMs: number;
3710
+ cancelOriginEventId: string;
3107
3711
  }>, z.ZodObject<{
3108
3712
  ref: z.ZodString;
3109
3713
  bytes: z.ZodNumber;
@@ -3124,14 +3728,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3124
3728
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3125
3729
  payloadHash: z.ZodOptional<z.ZodString>;
3126
3730
  }, "strip", z.ZodTypeAny, {
3731
+ type: "nodeCanceled";
3127
3732
  runId: string;
3128
- type: "nodeRetrying";
3129
3733
  schemaVersion: 1;
3130
3734
  eventId: string;
3131
3735
  payload: {
3132
3736
  nodeId: string;
3133
- lastAttemptId: string;
3134
- nextBackoffMs: number;
3737
+ cancelOriginEventId: string;
3135
3738
  } | {
3136
3739
  ref: string;
3137
3740
  bytes: number;
@@ -3141,14 +3744,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3141
3744
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3142
3745
  payloadHash?: string | undefined;
3143
3746
  }, {
3747
+ type: "nodeCanceled";
3144
3748
  runId: string;
3145
- type: "nodeRetrying";
3146
3749
  schemaVersion: 1;
3147
3750
  eventId: string;
3148
3751
  payload: {
3149
3752
  nodeId: string;
3150
- lastAttemptId: string;
3151
- nextBackoffMs: number;
3753
+ cancelOriginEventId: string;
3152
3754
  } | {
3153
3755
  ref: string;
3154
3756
  bytes: number;
@@ -3158,16 +3760,19 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3158
3760
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3159
3761
  payloadHash?: string | undefined;
3160
3762
  }>, z.ZodObject<{
3161
- type: z.ZodLiteral<"nodeSucceeded">;
3763
+ type: z.ZodLiteral<"activityRunning">;
3162
3764
  payload: z.ZodUnion<[z.ZodObject<{
3163
- nodeId: z.ZodString;
3164
- lastActivityId: z.ZodString;
3765
+ activityId: z.ZodString;
3766
+ attemptId: z.ZodString;
3767
+ leaseId: z.ZodString;
3165
3768
  }, "strip", z.ZodTypeAny, {
3166
- nodeId: string;
3167
- lastActivityId: string;
3769
+ attemptId: string;
3770
+ activityId: string;
3771
+ leaseId: string;
3168
3772
  }, {
3169
- nodeId: string;
3170
- lastActivityId: string;
3773
+ attemptId: string;
3774
+ activityId: string;
3775
+ leaseId: string;
3171
3776
  }>, z.ZodObject<{
3172
3777
  ref: z.ZodString;
3173
3778
  bytes: z.ZodNumber;
@@ -3188,13 +3793,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3188
3793
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3189
3794
  payloadHash: z.ZodOptional<z.ZodString>;
3190
3795
  }, "strip", z.ZodTypeAny, {
3796
+ type: "activityRunning";
3191
3797
  runId: string;
3192
- type: "nodeSucceeded";
3193
3798
  schemaVersion: 1;
3194
3799
  eventId: string;
3195
3800
  payload: {
3196
- nodeId: string;
3197
- lastActivityId: string;
3801
+ attemptId: string;
3802
+ activityId: string;
3803
+ leaseId: string;
3198
3804
  } | {
3199
3805
  ref: string;
3200
3806
  bytes: number;
@@ -3204,13 +3810,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3204
3810
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3205
3811
  payloadHash?: string | undefined;
3206
3812
  }, {
3813
+ type: "activityRunning";
3207
3814
  runId: string;
3208
- type: "nodeSucceeded";
3209
3815
  schemaVersion: 1;
3210
3816
  eventId: string;
3211
3817
  payload: {
3212
- nodeId: string;
3213
- lastActivityId: string;
3818
+ attemptId: string;
3819
+ activityId: string;
3820
+ leaseId: string;
3214
3821
  } | {
3215
3822
  ref: string;
3216
3823
  bytes: number;
@@ -3220,19 +3827,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3220
3827
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3221
3828
  payloadHash?: string | undefined;
3222
3829
  }>, z.ZodObject<{
3223
- type: z.ZodLiteral<"nodeFailed">;
3830
+ type: z.ZodLiteral<"activityWaiting">;
3224
3831
  payload: z.ZodUnion<[z.ZodObject<{
3225
- nodeId: z.ZodString;
3226
- lastActivityId: z.ZodString;
3227
- errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
3832
+ activityId: z.ZodString;
3833
+ reason: z.ZodString;
3228
3834
  }, "strip", z.ZodTypeAny, {
3229
- nodeId: string;
3230
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
3231
- lastActivityId: string;
3835
+ reason: string;
3836
+ activityId: string;
3232
3837
  }, {
3233
- nodeId: string;
3234
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
3235
- lastActivityId: string;
3838
+ reason: string;
3839
+ activityId: string;
3236
3840
  }>, z.ZodObject<{
3237
3841
  ref: z.ZodString;
3238
3842
  bytes: z.ZodNumber;
@@ -3253,14 +3857,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3253
3857
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3254
3858
  payloadHash: z.ZodOptional<z.ZodString>;
3255
3859
  }, "strip", z.ZodTypeAny, {
3860
+ type: "activityWaiting";
3256
3861
  runId: string;
3257
- type: "nodeFailed";
3258
3862
  schemaVersion: 1;
3259
3863
  eventId: string;
3260
3864
  payload: {
3261
- nodeId: string;
3262
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
3263
- lastActivityId: string;
3865
+ reason: string;
3866
+ activityId: string;
3264
3867
  } | {
3265
3868
  ref: string;
3266
3869
  bytes: number;
@@ -3270,14 +3873,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3270
3873
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3271
3874
  payloadHash?: string | undefined;
3272
3875
  }, {
3876
+ type: "activityWaiting";
3273
3877
  runId: string;
3274
- type: "nodeFailed";
3275
3878
  schemaVersion: 1;
3276
3879
  eventId: string;
3277
3880
  payload: {
3278
- nodeId: string;
3279
- errorClass: "retryable" | "fatal" | "userFault" | "manual";
3280
- lastActivityId: string;
3881
+ reason: string;
3882
+ activityId: string;
3281
3883
  } | {
3282
3884
  ref: string;
3283
3885
  bytes: number;
@@ -3287,16 +3889,25 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3287
3889
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3288
3890
  payloadHash?: string | undefined;
3289
3891
  }>, z.ZodObject<{
3290
- type: z.ZodLiteral<"nodeSkipped">;
3892
+ type: z.ZodLiteral<"activityTimedOut">;
3291
3893
  payload: z.ZodUnion<[z.ZodObject<{
3292
- nodeId: z.ZodString;
3293
- conditionEventId: z.ZodString;
3894
+ activityId: z.ZodString;
3895
+ attemptId: z.ZodString;
3896
+ runningMs: z.ZodNumber;
3897
+ reason: z.ZodLiteral<"LeaseExpired">;
3898
+ errorClass: z.ZodLiteral<"retryable">;
3294
3899
  }, "strip", z.ZodTypeAny, {
3295
- nodeId: string;
3296
- conditionEventId: string;
3900
+ reason: "LeaseExpired";
3901
+ attemptId: string;
3902
+ errorClass: "retryable";
3903
+ activityId: string;
3904
+ runningMs: number;
3297
3905
  }, {
3298
- nodeId: string;
3299
- conditionEventId: string;
3906
+ reason: "LeaseExpired";
3907
+ attemptId: string;
3908
+ errorClass: "retryable";
3909
+ activityId: string;
3910
+ runningMs: number;
3300
3911
  }>, z.ZodObject<{
3301
3912
  ref: z.ZodString;
3302
3913
  bytes: z.ZodNumber;
@@ -3317,13 +3928,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3317
3928
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3318
3929
  payloadHash: z.ZodOptional<z.ZodString>;
3319
3930
  }, "strip", z.ZodTypeAny, {
3931
+ type: "activityTimedOut";
3320
3932
  runId: string;
3321
- type: "nodeSkipped";
3322
3933
  schemaVersion: 1;
3323
3934
  eventId: string;
3324
3935
  payload: {
3325
- nodeId: string;
3326
- conditionEventId: string;
3936
+ reason: "LeaseExpired";
3937
+ attemptId: string;
3938
+ errorClass: "retryable";
3939
+ activityId: string;
3940
+ runningMs: number;
3327
3941
  } | {
3328
3942
  ref: string;
3329
3943
  bytes: number;
@@ -3333,13 +3947,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3333
3947
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3334
3948
  payloadHash?: string | undefined;
3335
3949
  }, {
3950
+ type: "activityTimedOut";
3336
3951
  runId: string;
3337
- type: "nodeSkipped";
3338
3952
  schemaVersion: 1;
3339
3953
  eventId: string;
3340
3954
  payload: {
3341
- nodeId: string;
3342
- conditionEventId: string;
3955
+ reason: "LeaseExpired";
3956
+ attemptId: string;
3957
+ errorClass: "retryable";
3958
+ activityId: string;
3959
+ runningMs: number;
3343
3960
  } | {
3344
3961
  ref: string;
3345
3962
  bytes: number;
@@ -3349,16 +3966,16 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3349
3966
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3350
3967
  payloadHash?: string | undefined;
3351
3968
  }>, z.ZodObject<{
3352
- type: z.ZodLiteral<"nodeCanceled">;
3969
+ type: z.ZodLiteral<"loopStarted">;
3353
3970
  payload: z.ZodUnion<[z.ZodObject<{
3354
- nodeId: z.ZodString;
3355
- cancelOriginEventId: z.ZodString;
3971
+ loopId: z.ZodString;
3972
+ maxIterations: z.ZodNumber;
3356
3973
  }, "strip", z.ZodTypeAny, {
3357
- nodeId: string;
3358
- cancelOriginEventId: string;
3974
+ loopId: string;
3975
+ maxIterations: number;
3359
3976
  }, {
3360
- nodeId: string;
3361
- cancelOriginEventId: string;
3977
+ loopId: string;
3978
+ maxIterations: number;
3362
3979
  }>, z.ZodObject<{
3363
3980
  ref: z.ZodString;
3364
3981
  bytes: z.ZodNumber;
@@ -3379,13 +3996,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3379
3996
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3380
3997
  payloadHash: z.ZodOptional<z.ZodString>;
3381
3998
  }, "strip", z.ZodTypeAny, {
3999
+ type: "loopStarted";
3382
4000
  runId: string;
3383
- type: "nodeCanceled";
3384
4001
  schemaVersion: 1;
3385
4002
  eventId: string;
3386
4003
  payload: {
3387
- nodeId: string;
3388
- cancelOriginEventId: string;
4004
+ loopId: string;
4005
+ maxIterations: number;
3389
4006
  } | {
3390
4007
  ref: string;
3391
4008
  bytes: number;
@@ -3395,13 +4012,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3395
4012
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3396
4013
  payloadHash?: string | undefined;
3397
4014
  }, {
4015
+ type: "loopStarted";
3398
4016
  runId: string;
3399
- type: "nodeCanceled";
3400
4017
  schemaVersion: 1;
3401
4018
  eventId: string;
3402
4019
  payload: {
3403
- nodeId: string;
3404
- cancelOriginEventId: string;
4020
+ loopId: string;
4021
+ maxIterations: number;
3405
4022
  } | {
3406
4023
  ref: string;
3407
4024
  bytes: number;
@@ -3411,19 +4028,19 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3411
4028
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3412
4029
  payloadHash?: string | undefined;
3413
4030
  }>, z.ZodObject<{
3414
- type: z.ZodLiteral<"activityRunning">;
4031
+ type: z.ZodLiteral<"loopIterationStarted">;
3415
4032
  payload: z.ZodUnion<[z.ZodObject<{
3416
- activityId: z.ZodString;
3417
- attemptId: z.ZodString;
3418
- leaseId: z.ZodString;
4033
+ loopId: z.ZodString;
4034
+ iteration: z.ZodNumber;
4035
+ prevResolution: z.ZodEnum<["initial", "rejected"]>;
3419
4036
  }, "strip", z.ZodTypeAny, {
3420
- attemptId: string;
3421
- activityId: string;
3422
- leaseId: string;
4037
+ loopId: string;
4038
+ iteration: number;
4039
+ prevResolution: "rejected" | "initial";
3423
4040
  }, {
3424
- attemptId: string;
3425
- activityId: string;
3426
- leaseId: string;
4041
+ loopId: string;
4042
+ iteration: number;
4043
+ prevResolution: "rejected" | "initial";
3427
4044
  }>, z.ZodObject<{
3428
4045
  ref: z.ZodString;
3429
4046
  bytes: z.ZodNumber;
@@ -3444,14 +4061,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3444
4061
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3445
4062
  payloadHash: z.ZodOptional<z.ZodString>;
3446
4063
  }, "strip", z.ZodTypeAny, {
4064
+ type: "loopIterationStarted";
3447
4065
  runId: string;
3448
- type: "activityRunning";
3449
4066
  schemaVersion: 1;
3450
4067
  eventId: string;
3451
4068
  payload: {
3452
- attemptId: string;
3453
- activityId: string;
3454
- leaseId: string;
4069
+ loopId: string;
4070
+ iteration: number;
4071
+ prevResolution: "rejected" | "initial";
3455
4072
  } | {
3456
4073
  ref: string;
3457
4074
  bytes: number;
@@ -3461,14 +4078,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3461
4078
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3462
4079
  payloadHash?: string | undefined;
3463
4080
  }, {
4081
+ type: "loopIterationStarted";
3464
4082
  runId: string;
3465
- type: "activityRunning";
3466
4083
  schemaVersion: 1;
3467
4084
  eventId: string;
3468
4085
  payload: {
3469
- attemptId: string;
3470
- activityId: string;
3471
- leaseId: string;
4086
+ loopId: string;
4087
+ iteration: number;
4088
+ prevResolution: "rejected" | "initial";
3472
4089
  } | {
3473
4090
  ref: string;
3474
4091
  bytes: number;
@@ -3478,16 +4095,34 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3478
4095
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3479
4096
  payloadHash?: string | undefined;
3480
4097
  }>, z.ZodObject<{
3481
- type: z.ZodLiteral<"activityWaiting">;
4098
+ type: z.ZodLiteral<"loopIterationFinished">;
3482
4099
  payload: z.ZodUnion<[z.ZodObject<{
3483
- activityId: z.ZodString;
3484
- reason: z.ZodString;
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>;
3485
4108
  }, "strip", z.ZodTypeAny, {
3486
- reason: string;
3487
- activityId: string;
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;
3488
4117
  }, {
3489
- reason: string;
3490
- activityId: string;
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;
3491
4126
  }>, z.ZodObject<{
3492
4127
  ref: z.ZodString;
3493
4128
  bytes: z.ZodNumber;
@@ -3508,13 +4143,19 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3508
4143
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3509
4144
  payloadHash: z.ZodOptional<z.ZodString>;
3510
4145
  }, "strip", z.ZodTypeAny, {
4146
+ type: "loopIterationFinished";
3511
4147
  runId: string;
3512
- type: "activityWaiting";
3513
4148
  schemaVersion: 1;
3514
4149
  eventId: string;
3515
4150
  payload: {
3516
- reason: string;
3517
- activityId: string;
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;
3518
4159
  } | {
3519
4160
  ref: string;
3520
4161
  bytes: number;
@@ -3524,13 +4165,19 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3524
4165
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3525
4166
  payloadHash?: string | undefined;
3526
4167
  }, {
4168
+ type: "loopIterationFinished";
3527
4169
  runId: string;
3528
- type: "activityWaiting";
3529
4170
  schemaVersion: 1;
3530
4171
  eventId: string;
3531
4172
  payload: {
3532
- reason: string;
3533
- activityId: string;
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;
3534
4181
  } | {
3535
4182
  ref: string;
3536
4183
  bytes: number;
@@ -3540,25 +4187,58 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3540
4187
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3541
4188
  payloadHash?: string | undefined;
3542
4189
  }>, z.ZodObject<{
3543
- type: z.ZodLiteral<"activityTimedOut">;
4190
+ type: z.ZodLiteral<"loopFinished">;
3544
4191
  payload: z.ZodUnion<[z.ZodObject<{
3545
- activityId: z.ZodString;
3546
- attemptId: z.ZodString;
3547
- runningMs: z.ZodNumber;
3548
- reason: z.ZodLiteral<"LeaseExpired">;
3549
- errorClass: z.ZodLiteral<"retryable">;
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"]>>;
3550
4216
  }, "strip", z.ZodTypeAny, {
3551
- reason: "LeaseExpired";
3552
- attemptId: string;
3553
- errorClass: "retryable";
3554
- activityId: string;
3555
- runningMs: number;
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;
3556
4229
  }, {
3557
- reason: "LeaseExpired";
3558
- attemptId: string;
3559
- errorClass: "retryable";
3560
- activityId: string;
3561
- runningMs: number;
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;
3562
4242
  }>, z.ZodObject<{
3563
4243
  ref: z.ZodString;
3564
4244
  bytes: z.ZodNumber;
@@ -3579,16 +4259,23 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3579
4259
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3580
4260
  payloadHash: z.ZodOptional<z.ZodString>;
3581
4261
  }, "strip", z.ZodTypeAny, {
4262
+ type: "loopFinished";
3582
4263
  runId: string;
3583
- type: "activityTimedOut";
3584
4264
  schemaVersion: 1;
3585
4265
  eventId: string;
3586
4266
  payload: {
3587
- reason: "LeaseExpired";
3588
- attemptId: string;
3589
- errorClass: "retryable";
3590
- activityId: string;
3591
- runningMs: number;
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;
3592
4279
  } | {
3593
4280
  ref: string;
3594
4281
  bytes: number;
@@ -3598,16 +4285,23 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3598
4285
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3599
4286
  payloadHash?: string | undefined;
3600
4287
  }, {
4288
+ type: "loopFinished";
3601
4289
  runId: string;
3602
- type: "activityTimedOut";
3603
4290
  schemaVersion: 1;
3604
4291
  eventId: string;
3605
4292
  payload: {
3606
- reason: "LeaseExpired";
3607
- attemptId: string;
3608
- errorClass: "retryable";
3609
- activityId: string;
3610
- runningMs: number;
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;
3611
4305
  } | {
3612
4306
  ref: string;
3613
4307
  bytes: number;
@@ -3653,8 +4347,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3653
4347
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3654
4348
  payloadHash: z.ZodOptional<z.ZodString>;
3655
4349
  }, "strip", z.ZodTypeAny, {
3656
- runId: string;
3657
4350
  type: "conditionEvaluated";
4351
+ runId: string;
3658
4352
  schemaVersion: 1;
3659
4353
  eventId: string;
3660
4354
  payload: {
@@ -3671,8 +4365,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3671
4365
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3672
4366
  payloadHash?: string | undefined;
3673
4367
  }, {
3674
- runId: string;
3675
4368
  type: "conditionEvaluated";
4369
+ runId: string;
3676
4370
  schemaVersion: 1;
3677
4371
  eventId: string;
3678
4372
  payload: {
@@ -3728,8 +4422,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3728
4422
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3729
4423
  payloadHash: z.ZodOptional<z.ZodString>;
3730
4424
  }, "strip", z.ZodTypeAny, {
3731
- runId: string;
3732
4425
  type: "leaseSigned";
4426
+ runId: string;
3733
4427
  schemaVersion: 1;
3734
4428
  eventId: string;
3735
4429
  payload: {
@@ -3747,8 +4441,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3747
4441
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3748
4442
  payloadHash?: string | undefined;
3749
4443
  }, {
3750
- runId: string;
3751
4444
  type: "leaseSigned";
4445
+ runId: string;
3752
4446
  schemaVersion: 1;
3753
4447
  eventId: string;
3754
4448
  payload: {
@@ -3835,8 +4529,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3835
4529
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3836
4530
  payloadHash: z.ZodOptional<z.ZodString>;
3837
4531
  }, "strip", z.ZodTypeAny, {
3838
- runId: string;
3839
4532
  type: "attemptCreated";
4533
+ runId: string;
3840
4534
  schemaVersion: 1;
3841
4535
  eventId: string;
3842
4536
  payload: {
@@ -3860,8 +4554,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3860
4554
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3861
4555
  payloadHash?: string | undefined;
3862
4556
  }, {
3863
- runId: string;
3864
4557
  type: "attemptCreated";
4558
+ runId: string;
3865
4559
  schemaVersion: 1;
3866
4560
  eventId: string;
3867
4561
  payload: {
@@ -3946,8 +4640,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3946
4640
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
3947
4641
  payloadHash: z.ZodOptional<z.ZodString>;
3948
4642
  }, "strip", z.ZodTypeAny, {
3949
- runId: string;
3950
4643
  type: "backoffScheduled";
4644
+ runId: string;
3951
4645
  schemaVersion: 1;
3952
4646
  eventId: string;
3953
4647
  payload: {
@@ -3969,8 +4663,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3969
4663
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
3970
4664
  payloadHash?: string | undefined;
3971
4665
  }, {
3972
- runId: string;
3973
4666
  type: "backoffScheduled";
4667
+ runId: string;
3974
4668
  schemaVersion: 1;
3975
4669
  eventId: string;
3976
4670
  payload: {
@@ -4022,8 +4716,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4022
4716
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4023
4717
  payloadHash: z.ZodOptional<z.ZodString>;
4024
4718
  }, "strip", z.ZodTypeAny, {
4025
- runId: string;
4026
4719
  type: "backoffElapsed";
4720
+ runId: string;
4027
4721
  schemaVersion: 1;
4028
4722
  eventId: string;
4029
4723
  payload: {
@@ -4038,8 +4732,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4038
4732
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4039
4733
  payloadHash?: string | undefined;
4040
4734
  }, {
4041
- runId: string;
4042
4735
  type: "backoffElapsed";
4736
+ runId: string;
4043
4737
  schemaVersion: 1;
4044
4738
  eventId: string;
4045
4739
  payload: {
@@ -4096,8 +4790,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4096
4790
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4097
4791
  payloadHash: z.ZodOptional<z.ZodString>;
4098
4792
  }, "strip", z.ZodTypeAny, {
4099
- runId: string;
4100
4793
  type: "effectAttempted";
4794
+ runId: string;
4101
4795
  schemaVersion: 1;
4102
4796
  eventId: string;
4103
4797
  payload: {
@@ -4116,8 +4810,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4116
4810
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4117
4811
  payloadHash?: string | undefined;
4118
4812
  }, {
4119
- runId: string;
4120
4813
  type: "effectAttempted";
4814
+ runId: string;
4121
4815
  schemaVersion: 1;
4122
4816
  eventId: string;
4123
4817
  payload: {
@@ -4202,8 +4896,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4202
4896
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4203
4897
  payloadHash: z.ZodOptional<z.ZodString>;
4204
4898
  }, "strip", z.ZodTypeAny, {
4205
- runId: string;
4206
4899
  type: "activitySucceeded";
4900
+ runId: string;
4207
4901
  schemaVersion: 1;
4208
4902
  eventId: string;
4209
4903
  payload: {
@@ -4226,8 +4920,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4226
4920
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4227
4921
  payloadHash?: string | undefined;
4228
4922
  }, {
4229
- runId: string;
4230
4923
  type: "activitySucceeded";
4924
+ runId: string;
4231
4925
  schemaVersion: 1;
4232
4926
  eventId: string;
4233
4927
  payload: {
@@ -4255,24 +4949,24 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4255
4949
  activityId: z.ZodString;
4256
4950
  attemptId: z.ZodString;
4257
4951
  error: z.ZodObject<{
4258
- errorCode: z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog"]>;
4952
+ errorCode: z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog", "LoopMaxIterationsExceeded", "LoopBodyFailed"]>;
4259
4953
  errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
4260
4954
  errorMessage: z.ZodString;
4261
4955
  stackRef: z.ZodOptional<z.ZodString>;
4262
4956
  }, "strip", z.ZodTypeAny, {
4263
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
4957
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
4264
4958
  errorClass: "retryable" | "fatal" | "userFault" | "manual";
4265
4959
  errorMessage: string;
4266
4960
  stackRef?: string | undefined;
4267
4961
  }, {
4268
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
4962
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
4269
4963
  errorClass: "retryable" | "fatal" | "userFault" | "manual";
4270
4964
  errorMessage: string;
4271
4965
  stackRef?: string | undefined;
4272
4966
  }>;
4273
4967
  }, "strip", z.ZodTypeAny, {
4274
4968
  error: {
4275
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
4969
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
4276
4970
  errorClass: "retryable" | "fatal" | "userFault" | "manual";
4277
4971
  errorMessage: string;
4278
4972
  stackRef?: string | undefined;
@@ -4281,7 +4975,7 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4281
4975
  activityId: string;
4282
4976
  }, {
4283
4977
  error: {
4284
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
4978
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
4285
4979
  errorClass: "retryable" | "fatal" | "userFault" | "manual";
4286
4980
  errorMessage: string;
4287
4981
  stackRef?: string | undefined;
@@ -4308,13 +5002,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4308
5002
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4309
5003
  payloadHash: z.ZodOptional<z.ZodString>;
4310
5004
  }, "strip", z.ZodTypeAny, {
4311
- runId: string;
4312
5005
  type: "activityFailed";
5006
+ runId: string;
4313
5007
  schemaVersion: 1;
4314
5008
  eventId: string;
4315
5009
  payload: {
4316
5010
  error: {
4317
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
5011
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
4318
5012
  errorClass: "retryable" | "fatal" | "userFault" | "manual";
4319
5013
  errorMessage: string;
4320
5014
  stackRef?: string | undefined;
@@ -4330,13 +5024,13 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4330
5024
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4331
5025
  payloadHash?: string | undefined;
4332
5026
  }, {
4333
- runId: string;
4334
5027
  type: "activityFailed";
5028
+ runId: string;
4335
5029
  schemaVersion: 1;
4336
5030
  eventId: string;
4337
5031
  payload: {
4338
5032
  error: {
4339
- errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
5033
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog" | "LoopMaxIterationsExceeded" | "LoopBodyFailed";
4340
5034
  errorClass: "retryable" | "fatal" | "userFault" | "manual";
4341
5035
  errorMessage: string;
4342
5036
  stackRef?: string | undefined;
@@ -4433,8 +5127,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4433
5127
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4434
5128
  payloadHash: z.ZodOptional<z.ZodString>;
4435
5129
  }, "strip", z.ZodTypeAny, {
4436
- runId: string;
4437
5130
  type: "waitCreated";
5131
+ runId: string;
4438
5132
  schemaVersion: 1;
4439
5133
  eventId: string;
4440
5134
  payload: {
@@ -4462,8 +5156,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4462
5156
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4463
5157
  payloadHash?: string | undefined;
4464
5158
  }, {
4465
- runId: string;
4466
5159
  type: "waitCreated";
5160
+ runId: string;
4467
5161
  schemaVersion: 1;
4468
5162
  eventId: string;
4469
5163
  payload: {
@@ -4527,8 +5221,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4527
5221
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4528
5222
  payloadHash: z.ZodOptional<z.ZodString>;
4529
5223
  }, "strip", z.ZodTypeAny, {
4530
- runId: string;
4531
5224
  type: "waitResolved";
5225
+ runId: string;
4532
5226
  schemaVersion: 1;
4533
5227
  eventId: string;
4534
5228
  payload: {
@@ -4545,8 +5239,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4545
5239
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4546
5240
  payloadHash?: string | undefined;
4547
5241
  }, {
4548
- runId: string;
4549
5242
  type: "waitResolved";
5243
+ runId: string;
4550
5244
  schemaVersion: 1;
4551
5245
  eventId: string;
4552
5246
  payload: {
@@ -4596,8 +5290,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4596
5290
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4597
5291
  payloadHash: z.ZodOptional<z.ZodString>;
4598
5292
  }, "strip", z.ZodTypeAny, {
4599
- runId: string;
4600
5293
  type: "waitDeadlineExceeded";
5294
+ runId: string;
4601
5295
  schemaVersion: 1;
4602
5296
  eventId: string;
4603
5297
  payload: {
@@ -4613,8 +5307,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4613
5307
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4614
5308
  payloadHash?: string | undefined;
4615
5309
  }, {
4616
- runId: string;
4617
5310
  type: "waitDeadlineExceeded";
5311
+ runId: string;
4618
5312
  schemaVersion: 1;
4619
5313
  eventId: string;
4620
5314
  payload: {
@@ -4708,8 +5402,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4708
5402
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4709
5403
  payloadHash: z.ZodOptional<z.ZodString>;
4710
5404
  }, "strip", z.ZodTypeAny, {
4711
- runId: string;
4712
5405
  type: "cancelRequested";
5406
+ runId: string;
4713
5407
  schemaVersion: 1;
4714
5408
  eventId: string;
4715
5409
  payload: {
@@ -4734,8 +5428,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4734
5428
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4735
5429
  payloadHash?: string | undefined;
4736
5430
  }, {
4737
- runId: string;
4738
5431
  type: "cancelRequested";
5432
+ runId: string;
4739
5433
  schemaVersion: 1;
4740
5434
  eventId: string;
4741
5435
  payload: {
@@ -4835,8 +5529,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4835
5529
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4836
5530
  payloadHash: z.ZodOptional<z.ZodString>;
4837
5531
  }, "strip", z.ZodTypeAny, {
4838
- runId: string;
4839
5532
  type: "cancelDelivered";
5533
+ runId: string;
4840
5534
  schemaVersion: 1;
4841
5535
  eventId: string;
4842
5536
  payload: {
@@ -4860,8 +5554,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4860
5554
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4861
5555
  payloadHash?: string | undefined;
4862
5556
  }, {
4863
- runId: string;
4864
5557
  type: "cancelDelivered";
5558
+ runId: string;
4865
5559
  schemaVersion: 1;
4866
5560
  eventId: string;
4867
5561
  payload: {
@@ -4918,8 +5612,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4918
5612
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4919
5613
  payloadHash: z.ZodOptional<z.ZodString>;
4920
5614
  }, "strip", z.ZodTypeAny, {
4921
- runId: string;
4922
5615
  type: "activityCanceled";
5616
+ runId: string;
4923
5617
  schemaVersion: 1;
4924
5618
  eventId: string;
4925
5619
  payload: {
@@ -4935,8 +5629,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4935
5629
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4936
5630
  payloadHash?: string | undefined;
4937
5631
  }, {
4938
- runId: string;
4939
5632
  type: "activityCanceled";
5633
+ runId: string;
4940
5634
  schemaVersion: 1;
4941
5635
  eventId: string;
4942
5636
  payload: {
@@ -4982,8 +5676,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4982
5676
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
4983
5677
  payloadHash: z.ZodOptional<z.ZodString>;
4984
5678
  }, "strip", z.ZodTypeAny, {
4985
- runId: string;
4986
5679
  type: "workerLost";
5680
+ runId: string;
4987
5681
  schemaVersion: 1;
4988
5682
  eventId: string;
4989
5683
  payload: {
@@ -4998,8 +5692,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4998
5692
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
4999
5693
  payloadHash?: string | undefined;
5000
5694
  }, {
5001
- runId: string;
5002
5695
  type: "workerLost";
5696
+ runId: string;
5003
5697
  schemaVersion: 1;
5004
5698
  eventId: string;
5005
5699
  payload: {
@@ -5044,8 +5738,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5044
5738
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5045
5739
  payloadHash: z.ZodOptional<z.ZodString>;
5046
5740
  }, "strip", z.ZodTypeAny, {
5047
- runId: string;
5048
5741
  type: "resumeStarted";
5742
+ runId: string;
5049
5743
  schemaVersion: 1;
5050
5744
  eventId: string;
5051
5745
  payload: {
@@ -5060,8 +5754,8 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5060
5754
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
5061
5755
  payloadHash?: string | undefined;
5062
5756
  }, {
5063
- runId: string;
5064
5757
  type: "resumeStarted";
5758
+ runId: string;
5065
5759
  schemaVersion: 1;
5066
5760
  eventId: string;
5067
5761
  payload: {
@@ -5084,15 +5778,15 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5084
5778
  decision: z.ZodEnum<["replayed", "completedByIdempotentSubmit", "manual", "freshRetry"]>;
5085
5779
  evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
5086
5780
  }, "strip", z.ZodTypeAny, {
5781
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5087
5782
  activityId: string;
5088
5783
  idempotencyKey: string;
5089
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5090
5784
  decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
5091
5785
  evidence: Record<string, unknown>;
5092
5786
  }, {
5787
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5093
5788
  activityId: string;
5094
5789
  idempotencyKey: string;
5095
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5096
5790
  decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
5097
5791
  evidence: Record<string, unknown>;
5098
5792
  }>, z.ZodObject<{
@@ -5115,14 +5809,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5115
5809
  actor: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5116
5810
  payloadHash: z.ZodOptional<z.ZodString>;
5117
5811
  }, "strip", z.ZodTypeAny, {
5118
- runId: string;
5119
5812
  type: "reconcileResult";
5813
+ runId: string;
5120
5814
  schemaVersion: 1;
5121
5815
  eventId: string;
5122
5816
  payload: {
5817
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5123
5818
  activityId: string;
5124
5819
  idempotencyKey: string;
5125
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5126
5820
  decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
5127
5821
  evidence: Record<string, unknown>;
5128
5822
  } | {
@@ -5134,14 +5828,14 @@ export declare const EventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5134
5828
  actor: "scheduler" | "worker" | "hostExecutor" | "human" | "supervisor" | "system";
5135
5829
  payloadHash?: string | undefined;
5136
5830
  }, {
5137
- runId: string;
5138
5831
  type: "reconcileResult";
5832
+ runId: string;
5139
5833
  schemaVersion: 1;
5140
5834
  eventId: string;
5141
5835
  payload: {
5836
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5142
5837
  activityId: string;
5143
5838
  idempotencyKey: string;
5144
- capability: "none" | "readOnlyLookup" | "idempotentSubmit";
5145
5839
  decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
5146
5840
  evidence: Record<string, unknown>;
5147
5841
  } | {
@@ -5207,6 +5901,7 @@ export declare function checkReconcileResultInvariant(event: WorkflowEvent): str
5207
5901
  * split policy.
5208
5902
  */
5209
5903
  export declare function checkWaitCreatedPromptInvariant(event: WorkflowEvent): string | null;
5904
+ export declare function checkLoopFinishedInvariant(event: WorkflowEvent): string | null;
5210
5905
  /**
5211
5906
  * Parse + validate an unknown value as a WorkflowEvent. Combines the
5212
5907
  * discriminated-union schema check with the post-parse invariants