botmux 2.33.0 → 2.33.1

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 (281) hide show
  1. package/README.en.md +12 -1
  2. package/README.md +45 -1
  3. package/dist/adapters/cli/claude-code.d.ts.map +1 -1
  4. package/dist/adapters/cli/claude-code.js +11 -0
  5. package/dist/adapters/cli/claude-code.js.map +1 -1
  6. package/dist/cli/bots-list-output.d.ts +21 -0
  7. package/dist/cli/bots-list-output.d.ts.map +1 -0
  8. package/dist/cli/bots-list-output.js +23 -0
  9. package/dist/cli/bots-list-output.js.map +1 -0
  10. package/dist/cli/workflow.d.ts +13 -0
  11. package/dist/cli/workflow.d.ts.map +1 -0
  12. package/dist/cli/workflow.js +781 -0
  13. package/dist/cli/workflow.js.map +1 -0
  14. package/dist/cli.js +69 -14
  15. package/dist/cli.js.map +1 -1
  16. package/dist/core/command-handler.d.ts.map +1 -1
  17. package/dist/core/command-handler.js +211 -4
  18. package/dist/core/command-handler.js.map +1 -1
  19. package/dist/core/session-manager.d.ts +6 -1
  20. package/dist/core/session-manager.d.ts.map +1 -1
  21. package/dist/core/session-manager.js +22 -12
  22. package/dist/core/session-manager.js.map +1 -1
  23. package/dist/core/worker-pool.d.ts +13 -0
  24. package/dist/core/worker-pool.d.ts.map +1 -1
  25. package/dist/core/worker-pool.js +100 -6
  26. package/dist/core/worker-pool.js.map +1 -1
  27. package/dist/daemon.d.ts +3 -0
  28. package/dist/daemon.d.ts.map +1 -1
  29. package/dist/daemon.js +884 -3
  30. package/dist/daemon.js.map +1 -1
  31. package/dist/dashboard/auth.d.ts +36 -0
  32. package/dist/dashboard/auth.d.ts.map +1 -1
  33. package/dist/dashboard/auth.js +22 -0
  34. package/dist/dashboard/auth.js.map +1 -1
  35. package/dist/dashboard/web/app.js +20 -1
  36. package/dist/dashboard/web/app.js.map +1 -1
  37. package/dist/dashboard/web/i18n.d.ts.map +1 -1
  38. package/dist/dashboard/web/i18n.js +356 -0
  39. package/dist/dashboard/web/i18n.js.map +1 -1
  40. package/dist/dashboard/web/workflow-catalog.d.ts +2 -0
  41. package/dist/dashboard/web/workflow-catalog.d.ts.map +1 -0
  42. package/dist/dashboard/web/workflow-catalog.js +323 -0
  43. package/dist/dashboard/web/workflow-catalog.js.map +1 -0
  44. package/dist/dashboard/web/workflows.d.ts +2 -0
  45. package/dist/dashboard/web/workflows.d.ts.map +1 -0
  46. package/dist/dashboard/web/workflows.js +1618 -0
  47. package/dist/dashboard/web/workflows.js.map +1 -0
  48. package/dist/dashboard/workflow-api.d.ts +23 -0
  49. package/dist/dashboard/workflow-api.d.ts.map +1 -0
  50. package/dist/dashboard/workflow-api.js +463 -0
  51. package/dist/dashboard/workflow-api.js.map +1 -0
  52. package/dist/dashboard-web/app.js +494 -199
  53. package/dist/dashboard-web/index.html +1 -0
  54. package/dist/dashboard-web/style.css +160 -6
  55. package/dist/dashboard-web/terminal-replay.html +227 -0
  56. package/dist/dashboard.js +29 -12
  57. package/dist/dashboard.js.map +1 -1
  58. package/dist/i18n/en.d.ts.map +1 -1
  59. package/dist/i18n/en.js +12 -0
  60. package/dist/i18n/en.js.map +1 -1
  61. package/dist/i18n/zh.d.ts.map +1 -1
  62. package/dist/i18n/zh.js +12 -0
  63. package/dist/i18n/zh.js.map +1 -1
  64. package/dist/im/lark/card-handler.d.ts +3 -0
  65. package/dist/im/lark/card-handler.d.ts.map +1 -1
  66. package/dist/im/lark/card-handler.js +27 -1
  67. package/dist/im/lark/card-handler.js.map +1 -1
  68. package/dist/im/lark/client.d.ts +19 -2
  69. package/dist/im/lark/client.d.ts.map +1 -1
  70. package/dist/im/lark/client.js +21 -2
  71. package/dist/im/lark/client.js.map +1 -1
  72. package/dist/im/lark/workflow-card-handler.d.ts +50 -0
  73. package/dist/im/lark/workflow-card-handler.d.ts.map +1 -0
  74. package/dist/im/lark/workflow-card-handler.js +152 -0
  75. package/dist/im/lark/workflow-card-handler.js.map +1 -0
  76. package/dist/im/lark/workflow-cards.d.ts +46 -0
  77. package/dist/im/lark/workflow-cards.d.ts.map +1 -0
  78. package/dist/im/lark/workflow-cards.js +226 -0
  79. package/dist/im/lark/workflow-cards.js.map +1 -0
  80. package/dist/im/lark/workflow-progress-card.d.ts +76 -0
  81. package/dist/im/lark/workflow-progress-card.d.ts.map +1 -0
  82. package/dist/im/lark/workflow-progress-card.js +279 -0
  83. package/dist/im/lark/workflow-progress-card.js.map +1 -0
  84. package/dist/im/lark/workflow-slash-command.d.ts +92 -0
  85. package/dist/im/lark/workflow-slash-command.d.ts.map +1 -0
  86. package/dist/im/lark/workflow-slash-command.js +185 -0
  87. package/dist/im/lark/workflow-slash-command.js.map +1 -0
  88. package/dist/services/group-creator.d.ts.map +1 -1
  89. package/dist/services/group-creator.js +17 -4
  90. package/dist/services/group-creator.js.map +1 -1
  91. package/dist/services/groups-store.d.ts +11 -0
  92. package/dist/services/groups-store.d.ts.map +1 -1
  93. package/dist/services/groups-store.js +26 -0
  94. package/dist/services/groups-store.js.map +1 -1
  95. package/dist/services/jsonl-cursor.d.ts +12 -0
  96. package/dist/services/jsonl-cursor.d.ts.map +1 -0
  97. package/dist/services/jsonl-cursor.js +45 -0
  98. package/dist/services/jsonl-cursor.js.map +1 -0
  99. package/dist/services/schedule-store.d.ts +35 -0
  100. package/dist/services/schedule-store.d.ts.map +1 -1
  101. package/dist/services/schedule-store.js +108 -1
  102. package/dist/services/schedule-store.js.map +1 -1
  103. package/dist/skills/definitions.d.ts.map +1 -1
  104. package/dist/skills/definitions.js +399 -0
  105. package/dist/skills/definitions.js.map +1 -1
  106. package/dist/types.d.ts +4 -0
  107. package/dist/types.d.ts.map +1 -1
  108. package/dist/utils/cli-usage-limit.d.ts.map +1 -1
  109. package/dist/utils/cli-usage-limit.js +4 -0
  110. package/dist/utils/cli-usage-limit.js.map +1 -1
  111. package/dist/worker.js +118 -14
  112. package/dist/worker.js.map +1 -1
  113. package/dist/workflows/attempt-resume.d.ts +114 -0
  114. package/dist/workflows/attempt-resume.d.ts.map +1 -0
  115. package/dist/workflows/attempt-resume.js +385 -0
  116. package/dist/workflows/attempt-resume.js.map +1 -0
  117. package/dist/workflows/attempt-terminal.d.ts +21 -0
  118. package/dist/workflows/attempt-terminal.d.ts.map +1 -0
  119. package/dist/workflows/attempt-terminal.js +7 -0
  120. package/dist/workflows/attempt-terminal.js.map +1 -0
  121. package/dist/workflows/blob.d.ts +27 -0
  122. package/dist/workflows/blob.d.ts.map +1 -0
  123. package/dist/workflows/blob.js +39 -0
  124. package/dist/workflows/blob.js.map +1 -0
  125. package/dist/workflows/cancel-run.d.ts +45 -0
  126. package/dist/workflows/cancel-run.d.ts.map +1 -0
  127. package/dist/workflows/cancel-run.js +99 -0
  128. package/dist/workflows/cancel-run.js.map +1 -0
  129. package/dist/workflows/cancel.d.ts +111 -0
  130. package/dist/workflows/cancel.d.ts.map +1 -0
  131. package/dist/workflows/cancel.js +120 -0
  132. package/dist/workflows/cancel.js.map +1 -0
  133. package/dist/workflows/catalog.d.ts +60 -0
  134. package/dist/workflows/catalog.d.ts.map +1 -0
  135. package/dist/workflows/catalog.js +119 -0
  136. package/dist/workflows/catalog.js.map +1 -0
  137. package/dist/workflows/cold-attach.d.ts +30 -0
  138. package/dist/workflows/cold-attach.d.ts.map +1 -0
  139. package/dist/workflows/cold-attach.js +40 -0
  140. package/dist/workflows/cold-attach.js.map +1 -0
  141. package/dist/workflows/cold-scan.d.ts +21 -0
  142. package/dist/workflows/cold-scan.d.ts.map +1 -0
  143. package/dist/workflows/cold-scan.js +70 -0
  144. package/dist/workflows/cold-scan.js.map +1 -0
  145. package/dist/workflows/daemon-spawn.d.ts +117 -0
  146. package/dist/workflows/daemon-spawn.d.ts.map +1 -0
  147. package/dist/workflows/daemon-spawn.js +551 -0
  148. package/dist/workflows/daemon-spawn.js.map +1 -0
  149. package/dist/workflows/definition.d.ts +1309 -0
  150. package/dist/workflows/definition.d.ts.map +1 -0
  151. package/dist/workflows/definition.js +334 -0
  152. package/dist/workflows/definition.js.map +1 -0
  153. package/dist/workflows/effect-input.d.ts +4 -0
  154. package/dist/workflows/effect-input.d.ts.map +1 -0
  155. package/dist/workflows/effect-input.js +18 -0
  156. package/dist/workflows/effect-input.js.map +1 -0
  157. package/dist/workflows/events/append.d.ts +77 -0
  158. package/dist/workflows/events/append.d.ts.map +1 -0
  159. package/dist/workflows/events/append.js +214 -0
  160. package/dist/workflows/events/append.js.map +1 -0
  161. package/dist/workflows/events/idempotency.d.ts +77 -0
  162. package/dist/workflows/events/idempotency.d.ts.map +1 -0
  163. package/dist/workflows/events/idempotency.js +116 -0
  164. package/dist/workflows/events/idempotency.js.map +1 -0
  165. package/dist/workflows/events/index.d.ts +7 -0
  166. package/dist/workflows/events/index.d.ts.map +1 -0
  167. package/dist/workflows/events/index.js +7 -0
  168. package/dist/workflows/events/index.js.map +1 -0
  169. package/dist/workflows/events/payloads.d.ts +917 -0
  170. package/dist/workflows/events/payloads.d.ts.map +1 -0
  171. package/dist/workflows/events/payloads.js +337 -0
  172. package/dist/workflows/events/payloads.js.map +1 -0
  173. package/dist/workflows/events/replay.d.ts +238 -0
  174. package/dist/workflows/events/replay.d.ts.map +1 -0
  175. package/dist/workflows/events/replay.js +608 -0
  176. package/dist/workflows/events/replay.js.map +1 -0
  177. package/dist/workflows/events/schema.d.ts +5242 -0
  178. package/dist/workflows/events/schema.d.ts.map +1 -0
  179. package/dist/workflows/events/schema.js +295 -0
  180. package/dist/workflows/events/schema.js.map +1 -0
  181. package/dist/workflows/events/types.d.ts +34 -0
  182. package/dist/workflows/events/types.d.ts.map +1 -0
  183. package/dist/workflows/events/types.js +2 -0
  184. package/dist/workflows/events/types.js.map +1 -0
  185. package/dist/workflows/fanout.d.ts +36 -0
  186. package/dist/workflows/fanout.d.ts.map +1 -0
  187. package/dist/workflows/fanout.js +114 -0
  188. package/dist/workflows/fanout.js.map +1 -0
  189. package/dist/workflows/hostExecutors/botmux-schedule.d.ts +41 -0
  190. package/dist/workflows/hostExecutors/botmux-schedule.d.ts.map +1 -0
  191. package/dist/workflows/hostExecutors/botmux-schedule.js +121 -0
  192. package/dist/workflows/hostExecutors/botmux-schedule.js.map +1 -0
  193. package/dist/workflows/hostExecutors/feishu-im.d.ts +12 -0
  194. package/dist/workflows/hostExecutors/feishu-im.d.ts.map +1 -0
  195. package/dist/workflows/hostExecutors/feishu-im.js +49 -0
  196. package/dist/workflows/hostExecutors/feishu-im.js.map +1 -0
  197. package/dist/workflows/hostExecutors/feishu-reply.d.ts +24 -0
  198. package/dist/workflows/hostExecutors/feishu-reply.d.ts.map +1 -0
  199. package/dist/workflows/hostExecutors/feishu-reply.js +88 -0
  200. package/dist/workflows/hostExecutors/feishu-reply.js.map +1 -0
  201. package/dist/workflows/hostExecutors/feishu-send.d.ts +23 -0
  202. package/dist/workflows/hostExecutors/feishu-send.d.ts.map +1 -0
  203. package/dist/workflows/hostExecutors/feishu-send.js +124 -0
  204. package/dist/workflows/hostExecutors/feishu-send.js.map +1 -0
  205. package/dist/workflows/hostExecutors/index.d.ts +8 -0
  206. package/dist/workflows/hostExecutors/index.d.ts.map +1 -0
  207. package/dist/workflows/hostExecutors/index.js +8 -0
  208. package/dist/workflows/hostExecutors/index.js.map +1 -0
  209. package/dist/workflows/hostExecutors/protocol.d.ts +42 -0
  210. package/dist/workflows/hostExecutors/protocol.d.ts.map +1 -0
  211. package/dist/workflows/hostExecutors/protocol.js +181 -0
  212. package/dist/workflows/hostExecutors/protocol.js.map +1 -0
  213. package/dist/workflows/hostExecutors/registry.d.ts +10 -0
  214. package/dist/workflows/hostExecutors/registry.d.ts.map +1 -0
  215. package/dist/workflows/hostExecutors/registry.js +36 -0
  216. package/dist/workflows/hostExecutors/registry.js.map +1 -0
  217. package/dist/workflows/hostExecutors/types.d.ts +78 -0
  218. package/dist/workflows/hostExecutors/types.d.ts.map +1 -0
  219. package/dist/workflows/hostExecutors/types.js +2 -0
  220. package/dist/workflows/hostExecutors/types.js.map +1 -0
  221. package/dist/workflows/loader.d.ts +16 -0
  222. package/dist/workflows/loader.d.ts.map +1 -0
  223. package/dist/workflows/loader.js +56 -0
  224. package/dist/workflows/loader.js.map +1 -0
  225. package/dist/workflows/loop.d.ts +50 -0
  226. package/dist/workflows/loop.d.ts.map +1 -0
  227. package/dist/workflows/loop.js +350 -0
  228. package/dist/workflows/loop.js.map +1 -0
  229. package/dist/workflows/ops-projection.d.ts +168 -0
  230. package/dist/workflows/ops-projection.d.ts.map +1 -0
  231. package/dist/workflows/ops-projection.js +707 -0
  232. package/dist/workflows/ops-projection.js.map +1 -0
  233. package/dist/workflows/orchestrator.d.ts +107 -0
  234. package/dist/workflows/orchestrator.d.ts.map +1 -0
  235. package/dist/workflows/orchestrator.js +197 -0
  236. package/dist/workflows/orchestrator.js.map +1 -0
  237. package/dist/workflows/output-binding.d.ts +70 -0
  238. package/dist/workflows/output-binding.d.ts.map +1 -0
  239. package/dist/workflows/output-binding.js +265 -0
  240. package/dist/workflows/output-binding.js.map +1 -0
  241. package/dist/workflows/params.d.ts +61 -0
  242. package/dist/workflows/params.d.ts.map +1 -0
  243. package/dist/workflows/params.js +195 -0
  244. package/dist/workflows/params.js.map +1 -0
  245. package/dist/workflows/resume.d.ts +263 -0
  246. package/dist/workflows/resume.d.ts.map +1 -0
  247. package/dist/workflows/resume.js +808 -0
  248. package/dist/workflows/resume.js.map +1 -0
  249. package/dist/workflows/run-id.d.ts +2 -0
  250. package/dist/workflows/run-id.d.ts.map +1 -0
  251. package/dist/workflows/run-id.js +7 -0
  252. package/dist/workflows/run-id.js.map +1 -0
  253. package/dist/workflows/run-init.d.ts +48 -0
  254. package/dist/workflows/run-init.d.ts.map +1 -0
  255. package/dist/workflows/run-init.js +99 -0
  256. package/dist/workflows/run-init.js.map +1 -0
  257. package/dist/workflows/runs-dir.d.ts +4 -0
  258. package/dist/workflows/runs-dir.d.ts.map +1 -0
  259. package/dist/workflows/runs-dir.js +15 -0
  260. package/dist/workflows/runs-dir.js.map +1 -0
  261. package/dist/workflows/runtime.d.ts +211 -0
  262. package/dist/workflows/runtime.d.ts.map +1 -0
  263. package/dist/workflows/runtime.js +594 -0
  264. package/dist/workflows/runtime.js.map +1 -0
  265. package/dist/workflows/spawn-bot.d.ts +165 -0
  266. package/dist/workflows/spawn-bot.d.ts.map +1 -0
  267. package/dist/workflows/spawn-bot.js +215 -0
  268. package/dist/workflows/spawn-bot.js.map +1 -0
  269. package/dist/workflows/system.d.ts +49 -0
  270. package/dist/workflows/system.d.ts.map +1 -0
  271. package/dist/workflows/system.js +48 -0
  272. package/dist/workflows/system.js.map +1 -0
  273. package/dist/workflows/trigger-run.d.ts +70 -0
  274. package/dist/workflows/trigger-run.d.ts.map +1 -0
  275. package/dist/workflows/trigger-run.js +88 -0
  276. package/dist/workflows/trigger-run.js.map +1 -0
  277. package/dist/workflows/wait.d.ts +120 -0
  278. package/dist/workflows/wait.d.ts.map +1 -0
  279. package/dist/workflows/wait.js +181 -0
  280. package/dist/workflows/wait.js.map +1 -0
  281. package/package.json +3 -3
@@ -0,0 +1,917 @@
1
+ import { z } from 'zod';
2
+ export declare const Sha256Pattern: RegExp;
3
+ export declare const Sha256Schema: z.ZodString;
4
+ export declare const ActorEnum: z.ZodEnum<["scheduler", "worker", "hostExecutor", "human", "supervisor", "system"]>;
5
+ export type Actor = z.infer<typeof ActorEnum>;
6
+ export declare const ErrorClassEnum: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
7
+ export type ErrorClass = z.infer<typeof ErrorClassEnum>;
8
+ export declare const ErrorCodeEnum: z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog"]>;
9
+ export type ErrorCode = z.infer<typeof ErrorCodeEnum>;
10
+ export declare const ErrorPayloadSchema: z.ZodObject<{
11
+ errorCode: z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog"]>;
12
+ errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
13
+ errorMessage: z.ZodString;
14
+ stackRef: z.ZodOptional<z.ZodString>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
17
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
18
+ errorMessage: string;
19
+ stackRef?: string | undefined;
20
+ }, {
21
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
22
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
23
+ errorMessage: string;
24
+ stackRef?: string | undefined;
25
+ }>;
26
+ export type ErrorPayload = z.infer<typeof ErrorPayloadSchema>;
27
+ export declare const OutputRefSchema: z.ZodObject<{
28
+ outputHash: z.ZodString;
29
+ outputPath: z.ZodOptional<z.ZodString>;
30
+ outputBytes: z.ZodNumber;
31
+ outputSchemaVersion: z.ZodNumber;
32
+ contentType: z.ZodOptional<z.ZodString>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ outputHash: string;
35
+ outputBytes: number;
36
+ outputSchemaVersion: number;
37
+ outputPath?: string | undefined;
38
+ contentType?: string | undefined;
39
+ }, {
40
+ outputHash: string;
41
+ outputBytes: number;
42
+ outputSchemaVersion: number;
43
+ outputPath?: string | undefined;
44
+ contentType?: string | undefined;
45
+ }>;
46
+ export type OutputRef = z.infer<typeof OutputRefSchema>;
47
+ export declare const ReconcileCapabilityEnum: z.ZodEnum<["readOnlyLookup", "idempotentSubmit", "none"]>;
48
+ export declare const ReconcileDecisionEnum: z.ZodEnum<["replayed", "completedByIdempotentSubmit", "manual", "freshRetry"]>;
49
+ export declare const WaitKindEnum: z.ZodEnum<["human-gate", "time", "condition"]>;
50
+ export declare const WaitResolutionEnum: z.ZodEnum<["approved", "rejected", "external"]>;
51
+ export declare const CancelTargetSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
52
+ kind: z.ZodLiteral<"run">;
53
+ runId: z.ZodString;
54
+ }, "strip", z.ZodTypeAny, {
55
+ runId: string;
56
+ kind: "run";
57
+ }, {
58
+ runId: string;
59
+ kind: "run";
60
+ }>, z.ZodObject<{
61
+ kind: z.ZodLiteral<"node">;
62
+ nodeId: z.ZodString;
63
+ }, "strip", z.ZodTypeAny, {
64
+ nodeId: string;
65
+ kind: "node";
66
+ }, {
67
+ nodeId: string;
68
+ kind: "node";
69
+ }>, z.ZodObject<{
70
+ kind: z.ZodLiteral<"activity">;
71
+ activityId: z.ZodString;
72
+ }, "strip", z.ZodTypeAny, {
73
+ kind: "activity";
74
+ activityId: string;
75
+ }, {
76
+ kind: "activity";
77
+ activityId: string;
78
+ }>]>;
79
+ export declare const BackoffPolicySchema: z.ZodObject<{
80
+ kind: z.ZodEnum<["fixed", "exponential"]>;
81
+ baseMs: z.ZodNumber;
82
+ factor: z.ZodOptional<z.ZodNumber>;
83
+ jitter: z.ZodOptional<z.ZodBoolean>;
84
+ }, "strip", z.ZodTypeAny, {
85
+ kind: "fixed" | "exponential";
86
+ baseMs: number;
87
+ factor?: number | undefined;
88
+ jitter?: boolean | undefined;
89
+ }, {
90
+ kind: "fixed" | "exponential";
91
+ baseMs: number;
92
+ factor?: number | undefined;
93
+ jitter?: boolean | undefined;
94
+ }>;
95
+ /**
96
+ * Immutable identity snapshot of a workflow bot at run-creation time.
97
+ * Frozen here so subsequent rename / re-wire in bots.json doesn't drift
98
+ * the historical run view (UI doc §3.4). All fields optional so a bot
99
+ * with partial registry data still serializes cleanly.
100
+ */
101
+ export declare const BotSnapshotSchema: z.ZodObject<{
102
+ larkAppId: z.ZodOptional<z.ZodString>;
103
+ cliId: z.ZodOptional<z.ZodString>;
104
+ displayName: z.ZodOptional<z.ZodString>;
105
+ workingDir: z.ZodOptional<z.ZodString>;
106
+ }, "strip", z.ZodTypeAny, {
107
+ larkAppId?: string | undefined;
108
+ cliId?: string | undefined;
109
+ workingDir?: string | undefined;
110
+ displayName?: string | undefined;
111
+ }, {
112
+ larkAppId?: string | undefined;
113
+ cliId?: string | undefined;
114
+ workingDir?: string | undefined;
115
+ displayName?: string | undefined;
116
+ }>;
117
+ export type BotSnapshot = z.infer<typeof BotSnapshotSchema>;
118
+ export declare const RunCreatedPayload: z.ZodObject<{
119
+ workflowId: z.ZodString;
120
+ revisionId: z.ZodString;
121
+ inputRef: z.ZodObject<{
122
+ outputHash: z.ZodString;
123
+ outputPath: z.ZodOptional<z.ZodString>;
124
+ outputBytes: z.ZodNumber;
125
+ outputSchemaVersion: z.ZodNumber;
126
+ contentType: z.ZodOptional<z.ZodString>;
127
+ }, "strip", z.ZodTypeAny, {
128
+ outputHash: string;
129
+ outputBytes: number;
130
+ outputSchemaVersion: number;
131
+ outputPath?: string | undefined;
132
+ contentType?: string | undefined;
133
+ }, {
134
+ outputHash: string;
135
+ outputBytes: number;
136
+ outputSchemaVersion: number;
137
+ outputPath?: string | undefined;
138
+ contentType?: string | undefined;
139
+ }>;
140
+ initiator: z.ZodString;
141
+ botSnapshots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
142
+ larkAppId: z.ZodOptional<z.ZodString>;
143
+ cliId: z.ZodOptional<z.ZodString>;
144
+ displayName: z.ZodOptional<z.ZodString>;
145
+ workingDir: z.ZodOptional<z.ZodString>;
146
+ }, "strip", z.ZodTypeAny, {
147
+ larkAppId?: string | undefined;
148
+ cliId?: string | undefined;
149
+ workingDir?: string | undefined;
150
+ displayName?: string | undefined;
151
+ }, {
152
+ larkAppId?: string | undefined;
153
+ cliId?: string | undefined;
154
+ workingDir?: string | undefined;
155
+ displayName?: string | undefined;
156
+ }>>>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ workflowId: string;
159
+ revisionId: string;
160
+ inputRef: {
161
+ outputHash: string;
162
+ outputBytes: number;
163
+ outputSchemaVersion: number;
164
+ outputPath?: string | undefined;
165
+ contentType?: string | undefined;
166
+ };
167
+ initiator: string;
168
+ botSnapshots?: Record<string, {
169
+ larkAppId?: string | undefined;
170
+ cliId?: string | undefined;
171
+ workingDir?: string | undefined;
172
+ displayName?: string | undefined;
173
+ }> | undefined;
174
+ }, {
175
+ workflowId: string;
176
+ revisionId: string;
177
+ inputRef: {
178
+ outputHash: string;
179
+ outputBytes: number;
180
+ outputSchemaVersion: number;
181
+ outputPath?: string | undefined;
182
+ contentType?: string | undefined;
183
+ };
184
+ initiator: string;
185
+ botSnapshots?: Record<string, {
186
+ larkAppId?: string | undefined;
187
+ cliId?: string | undefined;
188
+ workingDir?: string | undefined;
189
+ displayName?: string | undefined;
190
+ }> | undefined;
191
+ }>;
192
+ export declare const RunStartedPayload: z.ZodObject<{}, "strict", z.ZodTypeAny, {}, {}>;
193
+ export declare const RunSucceededPayload: z.ZodObject<{
194
+ outputRef: z.ZodObject<{
195
+ outputHash: z.ZodString;
196
+ outputPath: z.ZodOptional<z.ZodString>;
197
+ outputBytes: z.ZodNumber;
198
+ outputSchemaVersion: z.ZodNumber;
199
+ contentType: z.ZodOptional<z.ZodString>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ outputHash: string;
202
+ outputBytes: number;
203
+ outputSchemaVersion: number;
204
+ outputPath?: string | undefined;
205
+ contentType?: string | undefined;
206
+ }, {
207
+ outputHash: string;
208
+ outputBytes: number;
209
+ outputSchemaVersion: number;
210
+ outputPath?: string | undefined;
211
+ contentType?: string | undefined;
212
+ }>;
213
+ }, "strip", z.ZodTypeAny, {
214
+ outputRef: {
215
+ outputHash: string;
216
+ outputBytes: number;
217
+ outputSchemaVersion: number;
218
+ outputPath?: string | undefined;
219
+ contentType?: string | undefined;
220
+ };
221
+ }, {
222
+ outputRef: {
223
+ outputHash: string;
224
+ outputBytes: number;
225
+ outputSchemaVersion: number;
226
+ outputPath?: string | undefined;
227
+ contentType?: string | undefined;
228
+ };
229
+ }>;
230
+ export declare const RunFailedPayload: z.ZodObject<{
231
+ failedNodeId: z.ZodString;
232
+ rootCauseEventId: z.ZodString;
233
+ }, "strip", z.ZodTypeAny, {
234
+ failedNodeId: string;
235
+ rootCauseEventId: string;
236
+ }, {
237
+ failedNodeId: string;
238
+ rootCauseEventId: string;
239
+ }>;
240
+ export declare const RunCanceledPayload: z.ZodObject<{
241
+ cancelOriginEventId: z.ZodString;
242
+ }, "strip", z.ZodTypeAny, {
243
+ cancelOriginEventId: string;
244
+ }, {
245
+ cancelOriginEventId: string;
246
+ }>;
247
+ export declare const NodeWaitingPayload: z.ZodObject<{
248
+ nodeId: z.ZodString;
249
+ waitReason: z.ZodString;
250
+ deadlineAt: z.ZodOptional<z.ZodNumber>;
251
+ }, "strip", z.ZodTypeAny, {
252
+ nodeId: string;
253
+ waitReason: string;
254
+ deadlineAt?: number | undefined;
255
+ }, {
256
+ nodeId: string;
257
+ waitReason: string;
258
+ deadlineAt?: number | undefined;
259
+ }>;
260
+ export declare const NodeRetryingPayload: z.ZodObject<{
261
+ nodeId: z.ZodString;
262
+ lastAttemptId: z.ZodString;
263
+ nextBackoffMs: z.ZodNumber;
264
+ }, "strip", z.ZodTypeAny, {
265
+ nodeId: string;
266
+ lastAttemptId: string;
267
+ nextBackoffMs: number;
268
+ }, {
269
+ nodeId: string;
270
+ lastAttemptId: string;
271
+ nextBackoffMs: number;
272
+ }>;
273
+ export declare const NodeSucceededPayload: z.ZodObject<{
274
+ nodeId: z.ZodString;
275
+ lastActivityId: z.ZodString;
276
+ }, "strip", z.ZodTypeAny, {
277
+ nodeId: string;
278
+ lastActivityId: string;
279
+ }, {
280
+ nodeId: string;
281
+ lastActivityId: string;
282
+ }>;
283
+ export declare const NodeFailedPayload: z.ZodObject<{
284
+ nodeId: z.ZodString;
285
+ lastActivityId: z.ZodString;
286
+ errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
287
+ }, "strip", z.ZodTypeAny, {
288
+ nodeId: string;
289
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
290
+ lastActivityId: string;
291
+ }, {
292
+ nodeId: string;
293
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
294
+ lastActivityId: string;
295
+ }>;
296
+ export declare const NodeSkippedPayload: z.ZodObject<{
297
+ nodeId: z.ZodString;
298
+ conditionEventId: z.ZodString;
299
+ }, "strip", z.ZodTypeAny, {
300
+ nodeId: string;
301
+ conditionEventId: string;
302
+ }, {
303
+ nodeId: string;
304
+ conditionEventId: string;
305
+ }>;
306
+ export declare const NodeCanceledPayload: z.ZodObject<{
307
+ nodeId: z.ZodString;
308
+ cancelOriginEventId: z.ZodString;
309
+ }, "strip", z.ZodTypeAny, {
310
+ nodeId: string;
311
+ cancelOriginEventId: string;
312
+ }, {
313
+ nodeId: string;
314
+ cancelOriginEventId: string;
315
+ }>;
316
+ export declare const ActivityRunningPayload: z.ZodObject<{
317
+ activityId: z.ZodString;
318
+ attemptId: z.ZodString;
319
+ leaseId: z.ZodString;
320
+ }, "strip", z.ZodTypeAny, {
321
+ attemptId: string;
322
+ activityId: string;
323
+ leaseId: string;
324
+ }, {
325
+ attemptId: string;
326
+ activityId: string;
327
+ leaseId: string;
328
+ }>;
329
+ export declare const ActivityWaitingPayload: z.ZodObject<{
330
+ activityId: z.ZodString;
331
+ reason: z.ZodString;
332
+ }, "strip", z.ZodTypeAny, {
333
+ reason: string;
334
+ activityId: string;
335
+ }, {
336
+ reason: string;
337
+ activityId: string;
338
+ }>;
339
+ export declare const ActivityTimedOutPayload: z.ZodObject<{
340
+ activityId: z.ZodString;
341
+ attemptId: z.ZodString;
342
+ runningMs: z.ZodNumber;
343
+ reason: z.ZodLiteral<"LeaseExpired">;
344
+ errorClass: z.ZodLiteral<"retryable">;
345
+ }, "strip", z.ZodTypeAny, {
346
+ reason: "LeaseExpired";
347
+ attemptId: string;
348
+ errorClass: "retryable";
349
+ activityId: string;
350
+ runningMs: number;
351
+ }, {
352
+ reason: "LeaseExpired";
353
+ attemptId: string;
354
+ errorClass: "retryable";
355
+ activityId: string;
356
+ runningMs: number;
357
+ }>;
358
+ export declare const ConditionEvaluatedPayload: z.ZodObject<{
359
+ nodeId: z.ZodString;
360
+ conditionExpr: z.ZodString;
361
+ resultTrue: z.ZodBoolean;
362
+ evaluatedInputs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
363
+ }, "strip", z.ZodTypeAny, {
364
+ nodeId: string;
365
+ conditionExpr: string;
366
+ resultTrue: boolean;
367
+ evaluatedInputs?: Record<string, unknown> | undefined;
368
+ }, {
369
+ nodeId: string;
370
+ conditionExpr: string;
371
+ resultTrue: boolean;
372
+ evaluatedInputs?: Record<string, unknown> | undefined;
373
+ }>;
374
+ export declare const LeaseSignedPayload: z.ZodObject<{
375
+ activityId: z.ZodString;
376
+ attemptId: z.ZodString;
377
+ leaseId: z.ZodString;
378
+ timeoutMs: z.ZodNumber;
379
+ maxOutputBytes: z.ZodNumber;
380
+ }, "strip", z.ZodTypeAny, {
381
+ attemptId: string;
382
+ activityId: string;
383
+ leaseId: string;
384
+ timeoutMs: number;
385
+ maxOutputBytes: number;
386
+ }, {
387
+ attemptId: string;
388
+ activityId: string;
389
+ leaseId: string;
390
+ timeoutMs: number;
391
+ maxOutputBytes: number;
392
+ }>;
393
+ export declare const AttemptCreatedPayload: z.ZodObject<{
394
+ nodeId: z.ZodString;
395
+ activityId: z.ZodString;
396
+ attemptId: z.ZodString;
397
+ attemptNumber: z.ZodNumber;
398
+ inputRef: z.ZodObject<{
399
+ outputHash: z.ZodString;
400
+ outputPath: z.ZodOptional<z.ZodString>;
401
+ outputBytes: z.ZodNumber;
402
+ outputSchemaVersion: z.ZodNumber;
403
+ contentType: z.ZodOptional<z.ZodString>;
404
+ }, "strip", z.ZodTypeAny, {
405
+ outputHash: string;
406
+ outputBytes: number;
407
+ outputSchemaVersion: number;
408
+ outputPath?: string | undefined;
409
+ contentType?: string | undefined;
410
+ }, {
411
+ outputHash: string;
412
+ outputBytes: number;
413
+ outputSchemaVersion: number;
414
+ outputPath?: string | undefined;
415
+ contentType?: string | undefined;
416
+ }>;
417
+ }, "strip", z.ZodTypeAny, {
418
+ nodeId: string;
419
+ attemptId: string;
420
+ activityId: string;
421
+ inputRef: {
422
+ outputHash: string;
423
+ outputBytes: number;
424
+ outputSchemaVersion: number;
425
+ outputPath?: string | undefined;
426
+ contentType?: string | undefined;
427
+ };
428
+ attemptNumber: number;
429
+ }, {
430
+ nodeId: string;
431
+ attemptId: string;
432
+ activityId: string;
433
+ inputRef: {
434
+ outputHash: string;
435
+ outputBytes: number;
436
+ outputSchemaVersion: number;
437
+ outputPath?: string | undefined;
438
+ contentType?: string | undefined;
439
+ };
440
+ attemptNumber: number;
441
+ }>;
442
+ export declare const BackoffScheduledPayload: z.ZodObject<{
443
+ nodeId: z.ZodString;
444
+ lastAttemptId: z.ZodString;
445
+ nextAttemptAt: z.ZodNumber;
446
+ backoffPolicy: z.ZodObject<{
447
+ kind: z.ZodEnum<["fixed", "exponential"]>;
448
+ baseMs: z.ZodNumber;
449
+ factor: z.ZodOptional<z.ZodNumber>;
450
+ jitter: z.ZodOptional<z.ZodBoolean>;
451
+ }, "strip", z.ZodTypeAny, {
452
+ kind: "fixed" | "exponential";
453
+ baseMs: number;
454
+ factor?: number | undefined;
455
+ jitter?: boolean | undefined;
456
+ }, {
457
+ kind: "fixed" | "exponential";
458
+ baseMs: number;
459
+ factor?: number | undefined;
460
+ jitter?: boolean | undefined;
461
+ }>;
462
+ }, "strip", z.ZodTypeAny, {
463
+ nodeId: string;
464
+ lastAttemptId: string;
465
+ nextAttemptAt: number;
466
+ backoffPolicy: {
467
+ kind: "fixed" | "exponential";
468
+ baseMs: number;
469
+ factor?: number | undefined;
470
+ jitter?: boolean | undefined;
471
+ };
472
+ }, {
473
+ nodeId: string;
474
+ lastAttemptId: string;
475
+ nextAttemptAt: number;
476
+ backoffPolicy: {
477
+ kind: "fixed" | "exponential";
478
+ baseMs: number;
479
+ factor?: number | undefined;
480
+ jitter?: boolean | undefined;
481
+ };
482
+ }>;
483
+ export declare const BackoffElapsedPayload: z.ZodObject<{
484
+ nodeId: z.ZodString;
485
+ scheduledAttemptId: z.ZodString;
486
+ }, "strip", z.ZodTypeAny, {
487
+ nodeId: string;
488
+ scheduledAttemptId: string;
489
+ }, {
490
+ nodeId: string;
491
+ scheduledAttemptId: string;
492
+ }>;
493
+ export declare const EffectAttemptedPayload: z.ZodObject<{
494
+ activityId: z.ZodString;
495
+ attemptId: z.ZodString;
496
+ idempotencyKey: z.ZodString;
497
+ inputHash: z.ZodString;
498
+ idempotencyTtlMs: z.ZodNumber;
499
+ provider: z.ZodString;
500
+ }, "strip", z.ZodTypeAny, {
501
+ attemptId: string;
502
+ activityId: string;
503
+ idempotencyKey: string;
504
+ inputHash: string;
505
+ idempotencyTtlMs: number;
506
+ provider: string;
507
+ }, {
508
+ attemptId: string;
509
+ activityId: string;
510
+ idempotencyKey: string;
511
+ inputHash: string;
512
+ idempotencyTtlMs: number;
513
+ provider: string;
514
+ }>;
515
+ export declare const ActivitySucceededPayload: z.ZodObject<{
516
+ activityId: z.ZodString;
517
+ attemptId: z.ZodString;
518
+ outputRef: z.ZodObject<{
519
+ outputHash: z.ZodString;
520
+ outputPath: z.ZodOptional<z.ZodString>;
521
+ outputBytes: z.ZodNumber;
522
+ outputSchemaVersion: z.ZodNumber;
523
+ contentType: z.ZodOptional<z.ZodString>;
524
+ }, "strip", z.ZodTypeAny, {
525
+ outputHash: string;
526
+ outputBytes: number;
527
+ outputSchemaVersion: number;
528
+ outputPath?: string | undefined;
529
+ contentType?: string | undefined;
530
+ }, {
531
+ outputHash: string;
532
+ outputBytes: number;
533
+ outputSchemaVersion: number;
534
+ outputPath?: string | undefined;
535
+ contentType?: string | undefined;
536
+ }>;
537
+ externalRefs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
538
+ }, "strip", z.ZodTypeAny, {
539
+ attemptId: string;
540
+ activityId: string;
541
+ outputRef: {
542
+ outputHash: string;
543
+ outputBytes: number;
544
+ outputSchemaVersion: number;
545
+ outputPath?: string | undefined;
546
+ contentType?: string | undefined;
547
+ };
548
+ externalRefs?: Record<string, unknown> | undefined;
549
+ }, {
550
+ attemptId: string;
551
+ activityId: string;
552
+ outputRef: {
553
+ outputHash: string;
554
+ outputBytes: number;
555
+ outputSchemaVersion: number;
556
+ outputPath?: string | undefined;
557
+ contentType?: string | undefined;
558
+ };
559
+ externalRefs?: Record<string, unknown> | undefined;
560
+ }>;
561
+ export declare const ActivityFailedPayload: z.ZodObject<{
562
+ activityId: z.ZodString;
563
+ attemptId: z.ZodString;
564
+ error: z.ZodObject<{
565
+ errorCode: z.ZodEnum<["LeaseExpired", "WorkerCrashed", "NetworkError", "ProviderRateLimited", "IdempotencyInputMismatch", "IdempotencyConflict", "InputValidationFailed", "InputBindingFailed", "OutputSchemaViolation", "WaitDeadlineExceeded", "TtlExpired", "UnknownProviderError", "InputUnrecoverable", "CorruptLog"]>;
566
+ errorClass: z.ZodEnum<["retryable", "fatal", "userFault", "manual"]>;
567
+ errorMessage: z.ZodString;
568
+ stackRef: z.ZodOptional<z.ZodString>;
569
+ }, "strip", z.ZodTypeAny, {
570
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
571
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
572
+ errorMessage: string;
573
+ stackRef?: string | undefined;
574
+ }, {
575
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
576
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
577
+ errorMessage: string;
578
+ stackRef?: string | undefined;
579
+ }>;
580
+ }, "strip", z.ZodTypeAny, {
581
+ error: {
582
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
583
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
584
+ errorMessage: string;
585
+ stackRef?: string | undefined;
586
+ };
587
+ attemptId: string;
588
+ activityId: string;
589
+ }, {
590
+ error: {
591
+ errorCode: "LeaseExpired" | "WorkerCrashed" | "NetworkError" | "ProviderRateLimited" | "IdempotencyInputMismatch" | "IdempotencyConflict" | "InputValidationFailed" | "InputBindingFailed" | "OutputSchemaViolation" | "WaitDeadlineExceeded" | "TtlExpired" | "UnknownProviderError" | "InputUnrecoverable" | "CorruptLog";
592
+ errorClass: "retryable" | "fatal" | "userFault" | "manual";
593
+ errorMessage: string;
594
+ stackRef?: string | undefined;
595
+ };
596
+ attemptId: string;
597
+ activityId: string;
598
+ }>;
599
+ /**
600
+ * Spec §6 open question #7 resolved at Step 8: `onTimeout` is part of
601
+ * the wait creation payload, not external node IR. Recording it on the
602
+ * event lets resume materialize the right terminal for a dangling
603
+ * `waitDeadlineExceeded` without consulting external workflow state.
604
+ * Default is `fail` at the consumer (matches spec default behavior).
605
+ */
606
+ export declare const WaitOnTimeoutEnum: z.ZodEnum<["fail", "success"]>;
607
+ export declare const WaitCreatedPayload: z.ZodObject<{
608
+ activityId: z.ZodString;
609
+ nodeId: z.ZodString;
610
+ waitKind: z.ZodEnum<["human-gate", "time", "condition"]>;
611
+ deadlineAt: z.ZodOptional<z.ZodNumber>;
612
+ prompt: z.ZodOptional<z.ZodString>;
613
+ promptRef: z.ZodOptional<z.ZodObject<{
614
+ outputHash: z.ZodString;
615
+ outputPath: z.ZodOptional<z.ZodString>;
616
+ outputBytes: z.ZodNumber;
617
+ outputSchemaVersion: z.ZodNumber;
618
+ contentType: z.ZodOptional<z.ZodString>;
619
+ }, "strip", z.ZodTypeAny, {
620
+ outputHash: string;
621
+ outputBytes: number;
622
+ outputSchemaVersion: number;
623
+ outputPath?: string | undefined;
624
+ contentType?: string | undefined;
625
+ }, {
626
+ outputHash: string;
627
+ outputBytes: number;
628
+ outputSchemaVersion: number;
629
+ outputPath?: string | undefined;
630
+ contentType?: string | undefined;
631
+ }>>;
632
+ promptPreview: z.ZodOptional<z.ZodString>;
633
+ approvers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
634
+ onTimeout: z.ZodOptional<z.ZodEnum<["fail", "success"]>>;
635
+ }, "strip", z.ZodTypeAny, {
636
+ nodeId: string;
637
+ activityId: string;
638
+ waitKind: "human-gate" | "time" | "condition";
639
+ prompt?: string | undefined;
640
+ deadlineAt?: number | undefined;
641
+ promptRef?: {
642
+ outputHash: string;
643
+ outputBytes: number;
644
+ outputSchemaVersion: number;
645
+ outputPath?: string | undefined;
646
+ contentType?: string | undefined;
647
+ } | undefined;
648
+ promptPreview?: string | undefined;
649
+ approvers?: string[] | undefined;
650
+ onTimeout?: "fail" | "success" | undefined;
651
+ }, {
652
+ nodeId: string;
653
+ activityId: string;
654
+ waitKind: "human-gate" | "time" | "condition";
655
+ prompt?: string | undefined;
656
+ deadlineAt?: number | undefined;
657
+ promptRef?: {
658
+ outputHash: string;
659
+ outputBytes: number;
660
+ outputSchemaVersion: number;
661
+ outputPath?: string | undefined;
662
+ contentType?: string | undefined;
663
+ } | undefined;
664
+ promptPreview?: string | undefined;
665
+ approvers?: string[] | undefined;
666
+ onTimeout?: "fail" | "success" | undefined;
667
+ }>;
668
+ export declare const WaitResolvedPayload: z.ZodObject<{
669
+ activityId: z.ZodString;
670
+ resolution: z.ZodEnum<["approved", "rejected", "external"]>;
671
+ by: z.ZodString;
672
+ comment: z.ZodOptional<z.ZodString>;
673
+ }, "strip", z.ZodTypeAny, {
674
+ activityId: string;
675
+ resolution: "approved" | "rejected" | "external";
676
+ by: string;
677
+ comment?: string | undefined;
678
+ }, {
679
+ activityId: string;
680
+ resolution: "approved" | "rejected" | "external";
681
+ by: string;
682
+ comment?: string | undefined;
683
+ }>;
684
+ export declare const WaitDeadlineExceededPayload: z.ZodObject<{
685
+ activityId: z.ZodString;
686
+ deadlineAt: z.ZodNumber;
687
+ exceededAtMs: z.ZodNumber;
688
+ }, "strip", z.ZodTypeAny, {
689
+ activityId: string;
690
+ deadlineAt: number;
691
+ exceededAtMs: number;
692
+ }, {
693
+ activityId: string;
694
+ deadlineAt: number;
695
+ exceededAtMs: number;
696
+ }>;
697
+ export declare const CancelRequestedPayload: z.ZodObject<{
698
+ target: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
699
+ kind: z.ZodLiteral<"run">;
700
+ runId: z.ZodString;
701
+ }, "strip", z.ZodTypeAny, {
702
+ runId: string;
703
+ kind: "run";
704
+ }, {
705
+ runId: string;
706
+ kind: "run";
707
+ }>, z.ZodObject<{
708
+ kind: z.ZodLiteral<"node">;
709
+ nodeId: z.ZodString;
710
+ }, "strip", z.ZodTypeAny, {
711
+ nodeId: string;
712
+ kind: "node";
713
+ }, {
714
+ nodeId: string;
715
+ kind: "node";
716
+ }>, z.ZodObject<{
717
+ kind: z.ZodLiteral<"activity">;
718
+ activityId: z.ZodString;
719
+ }, "strip", z.ZodTypeAny, {
720
+ kind: "activity";
721
+ activityId: string;
722
+ }, {
723
+ kind: "activity";
724
+ activityId: string;
725
+ }>]>;
726
+ reason: z.ZodString;
727
+ by: z.ZodString;
728
+ }, "strip", z.ZodTypeAny, {
729
+ reason: string;
730
+ by: string;
731
+ target: {
732
+ runId: string;
733
+ kind: "run";
734
+ } | {
735
+ nodeId: string;
736
+ kind: "node";
737
+ } | {
738
+ kind: "activity";
739
+ activityId: string;
740
+ };
741
+ }, {
742
+ reason: string;
743
+ by: string;
744
+ target: {
745
+ runId: string;
746
+ kind: "run";
747
+ } | {
748
+ nodeId: string;
749
+ kind: "node";
750
+ } | {
751
+ kind: "activity";
752
+ activityId: string;
753
+ };
754
+ }>;
755
+ export declare const CancelDeliveredPayload: z.ZodObject<{
756
+ target: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
757
+ kind: z.ZodLiteral<"run">;
758
+ runId: z.ZodString;
759
+ }, "strip", z.ZodTypeAny, {
760
+ runId: string;
761
+ kind: "run";
762
+ }, {
763
+ runId: string;
764
+ kind: "run";
765
+ }>, z.ZodObject<{
766
+ kind: z.ZodLiteral<"node">;
767
+ nodeId: z.ZodString;
768
+ }, "strip", z.ZodTypeAny, {
769
+ nodeId: string;
770
+ kind: "node";
771
+ }, {
772
+ nodeId: string;
773
+ kind: "node";
774
+ }>, z.ZodObject<{
775
+ kind: z.ZodLiteral<"activity">;
776
+ activityId: z.ZodString;
777
+ }, "strip", z.ZodTypeAny, {
778
+ kind: "activity";
779
+ activityId: string;
780
+ }, {
781
+ kind: "activity";
782
+ activityId: string;
783
+ }>]>;
784
+ activityId: z.ZodString;
785
+ }, "strip", z.ZodTypeAny, {
786
+ activityId: string;
787
+ target: {
788
+ runId: string;
789
+ kind: "run";
790
+ } | {
791
+ nodeId: string;
792
+ kind: "node";
793
+ } | {
794
+ kind: "activity";
795
+ activityId: string;
796
+ };
797
+ }, {
798
+ activityId: string;
799
+ target: {
800
+ runId: string;
801
+ kind: "run";
802
+ } | {
803
+ nodeId: string;
804
+ kind: "node";
805
+ } | {
806
+ kind: "activity";
807
+ activityId: string;
808
+ };
809
+ }>;
810
+ export declare const ActivityCanceledPayload: z.ZodObject<{
811
+ activityId: z.ZodString;
812
+ attemptId: z.ZodString;
813
+ cancelOriginEventId: z.ZodString;
814
+ }, "strip", z.ZodTypeAny, {
815
+ attemptId: string;
816
+ activityId: string;
817
+ cancelOriginEventId: string;
818
+ }, {
819
+ attemptId: string;
820
+ activityId: string;
821
+ cancelOriginEventId: string;
822
+ }>;
823
+ export declare const WorkerLostPayload: z.ZodObject<{
824
+ workerId: z.ZodString;
825
+ lostActivityIds: z.ZodArray<z.ZodString, "many">;
826
+ }, "strip", z.ZodTypeAny, {
827
+ workerId: string;
828
+ lostActivityIds: string[];
829
+ }, {
830
+ workerId: string;
831
+ lostActivityIds: string[];
832
+ }>;
833
+ export declare const ResumeStartedPayload: z.ZodObject<{
834
+ daemonId: z.ZodString;
835
+ lastSeenEventId: z.ZodString;
836
+ }, "strip", z.ZodTypeAny, {
837
+ daemonId: string;
838
+ lastSeenEventId: string;
839
+ }, {
840
+ daemonId: string;
841
+ lastSeenEventId: string;
842
+ }>;
843
+ /**
844
+ * `reconcileResult.evidence` v0 convention (spec §6 Q4 — standardization
845
+ * deferred to v0.x+, but the per-provider shape used by the v0 runtime
846
+ * is fixed here so dashboards and resume recovery can parse it without
847
+ * provider-specific knowledge).
848
+ *
849
+ * Common keys (any provider, any decision):
850
+ * - `externalRefs`?: Record<string, unknown>
851
+ * Provider-returned ref (messageId / taskId / ...) — required
852
+ * for `completedByIdempotentSubmit` decisions, recovery uses it
853
+ * to materialize `activitySucceeded.payload.externalRefs`.
854
+ * - `errorCode`?: string
855
+ * Recorded errorCode for `manual` decisions — recovery uses it
856
+ * to materialize `activityFailed.payload.error.errorCode`.
857
+ *
858
+ * Manual-only keys (decision='manual'):
859
+ * - `reason`?: 'ttl_expired' | 'no_reconciler' | 'no_capability'
860
+ * | 'input_unrecoverable' | 'missing_external_refs'
861
+ * - `attemptedAtMs`, `nowMs`, `idempotencyTtlMs`?: number
862
+ * Populated when reason='ttl_expired' for forensics.
863
+ * - `originalDecision`?: ReconcileDecision
864
+ * When recovery escalates from a corrupt prior decision (e.g.
865
+ * replayed/manual without terminal), the original decision the
866
+ * prior reconcile wrote is preserved here.
867
+ * - `corruptReason`?: 'missing_external_refs'
868
+ * - `reconcileEventId`?: string
869
+ * eventId of the originating reconcileResult (recovery cross-ref).
870
+ *
871
+ * Cancel-coupled keys (Step 9 round 2 — when reconcile fires under
872
+ * cancel, any decision):
873
+ * - `cancelOriginEventId`?: string — eventId of the originating
874
+ * `cancelRequested` so dashboard / forensics can correlate the
875
+ * cancel × reconcile pair structurally instead of parsing
876
+ * `activityFailed.errorMessage`.
877
+ * - `cancelReason`?: string — `cancelRequested.payload.reason`
878
+ * - `cancelRequestedBy`?: string — `cancelRequested.payload.by`
879
+ *
880
+ * These keys are written ONLY by `recoverCancelWithReconcile`'s fresh
881
+ * reconcile cycle; they are absent on regular reconciles and on F1
882
+ * recovery (the prior reconcileResult was written before cancel
883
+ * landed and is immutable).
884
+ *
885
+ * `freshRetry` evidence is provider-specific; v0 puts whatever the
886
+ * reconciler returned from `readOnlyLookup({ found: false })` here.
887
+ *
888
+ * Per-provider conventions (v0):
889
+ * - `botmux-schedule` readOnlyLookup: `{ source: 'getTask',
890
+ * returned: 'task' | 'undefined' }`
891
+ * - `feishu-im` idempotentSubmit: `{ source: 'create-or-reply' }` or
892
+ * similar; provider just returns externalRefs on success.
893
+ *
894
+ * Future work: lock these per-provider shapes via discriminated
895
+ * schemas keyed on `(decision, capability, provider)`. Tracked in
896
+ * spec §6 Q4.
897
+ */
898
+ export declare const ReconcileResultPayload: z.ZodObject<{
899
+ activityId: z.ZodString;
900
+ idempotencyKey: z.ZodString;
901
+ capability: z.ZodEnum<["readOnlyLookup", "idempotentSubmit", "none"]>;
902
+ decision: z.ZodEnum<["replayed", "completedByIdempotentSubmit", "manual", "freshRetry"]>;
903
+ evidence: z.ZodRecord<z.ZodString, z.ZodUnknown>;
904
+ }, "strip", z.ZodTypeAny, {
905
+ activityId: string;
906
+ idempotencyKey: string;
907
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
908
+ decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
909
+ evidence: Record<string, unknown>;
910
+ }, {
911
+ activityId: string;
912
+ idempotencyKey: string;
913
+ capability: "none" | "readOnlyLookup" | "idempotentSubmit";
914
+ decision: "manual" | "replayed" | "completedByIdempotentSubmit" | "freshRetry";
915
+ evidence: Record<string, unknown>;
916
+ }>;
917
+ //# sourceMappingURL=payloads.d.ts.map