botmux 2.93.1 → 2.95.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/dist/adapters/backend/tmux-backend.d.ts +18 -2
  2. package/dist/adapters/backend/tmux-backend.d.ts.map +1 -1
  3. package/dist/adapters/backend/tmux-backend.js +45 -3
  4. package/dist/adapters/backend/tmux-backend.js.map +1 -1
  5. package/dist/adapters/backend/tmux-pipe-backend.js +1 -1
  6. package/dist/adapters/backend/tmux-pipe-backend.js.map +1 -1
  7. package/dist/adapters/backend/types.d.ts +8 -0
  8. package/dist/adapters/backend/types.d.ts.map +1 -1
  9. package/dist/adapters/backend/types.js.map +1 -1
  10. package/dist/adapters/backend/zellij-backend.js +1 -1
  11. package/dist/adapters/backend/zellij-backend.js.map +1 -1
  12. package/dist/adapters/cli/claude-code.d.ts.map +1 -1
  13. package/dist/adapters/cli/claude-code.js +6 -1
  14. package/dist/adapters/cli/claude-code.js.map +1 -1
  15. package/dist/bot-registry.d.ts +50 -1
  16. package/dist/bot-registry.d.ts.map +1 -1
  17. package/dist/bot-registry.js +30 -0
  18. package/dist/bot-registry.js.map +1 -1
  19. package/dist/cli/workflow.d.ts.map +1 -1
  20. package/dist/cli/workflow.js +11 -4
  21. package/dist/cli/workflow.js.map +1 -1
  22. package/dist/cli.d.ts.map +1 -1
  23. package/dist/cli.js +146 -1
  24. package/dist/cli.js.map +1 -1
  25. package/dist/core/command-handler.d.ts.map +1 -1
  26. package/dist/core/command-handler.js +28 -3
  27. package/dist/core/command-handler.js.map +1 -1
  28. package/dist/core/dashboard-ipc-server.d.ts.map +1 -1
  29. package/dist/core/dashboard-ipc-server.js +92 -0
  30. package/dist/core/dashboard-ipc-server.js.map +1 -1
  31. package/dist/core/inherit-peer.d.ts +5 -0
  32. package/dist/core/inherit-peer.d.ts.map +1 -1
  33. package/dist/core/inherit-peer.js +3 -0
  34. package/dist/core/inherit-peer.js.map +1 -1
  35. package/dist/core/session-discovery.d.ts +9 -0
  36. package/dist/core/session-discovery.d.ts.map +1 -1
  37. package/dist/core/session-discovery.js +24 -0
  38. package/dist/core/session-discovery.js.map +1 -1
  39. package/dist/core/session-manager.d.ts.map +1 -1
  40. package/dist/core/session-manager.js +7 -6
  41. package/dist/core/session-manager.js.map +1 -1
  42. package/dist/core/terminal-url.d.ts.map +1 -1
  43. package/dist/core/terminal-url.js +15 -0
  44. package/dist/core/terminal-url.js.map +1 -1
  45. package/dist/core/trigger-session.js +2 -2
  46. package/dist/core/trigger-session.js.map +1 -1
  47. package/dist/core/worker-pool.d.ts.map +1 -1
  48. package/dist/core/worker-pool.js +30 -0
  49. package/dist/core/worker-pool.js.map +1 -1
  50. package/dist/daemon.d.ts.map +1 -1
  51. package/dist/daemon.js +296 -23
  52. package/dist/daemon.js.map +1 -1
  53. package/dist/dashboard/aggregator.d.ts +5 -0
  54. package/dist/dashboard/aggregator.d.ts.map +1 -1
  55. package/dist/dashboard/aggregator.js +7 -0
  56. package/dist/dashboard/aggregator.js.map +1 -1
  57. package/dist/dashboard/auth.d.ts.map +1 -1
  58. package/dist/dashboard/auth.js +7 -1
  59. package/dist/dashboard/auth.js.map +1 -1
  60. package/dist/dashboard/bot-payload.d.ts +2 -0
  61. package/dist/dashboard/bot-payload.d.ts.map +1 -1
  62. package/dist/dashboard/bot-payload.js +2 -0
  63. package/dist/dashboard/bot-payload.js.map +1 -1
  64. package/dist/dashboard/connector-api.d.ts.map +1 -1
  65. package/dist/dashboard/connector-api.js +14 -3
  66. package/dist/dashboard/connector-api.js.map +1 -1
  67. package/dist/dashboard/settings-write-applier.d.ts +2 -1
  68. package/dist/dashboard/settings-write-applier.d.ts.map +1 -1
  69. package/dist/dashboard/settings-write-applier.js +7 -0
  70. package/dist/dashboard/settings-write-applier.js.map +1 -1
  71. package/dist/dashboard/v3-runs-api.d.ts +26 -0
  72. package/dist/dashboard/v3-runs-api.d.ts.map +1 -0
  73. package/dist/dashboard/v3-runs-api.js +67 -0
  74. package/dist/dashboard/v3-runs-api.js.map +1 -0
  75. package/dist/dashboard/web/app.js +21 -9
  76. package/dist/dashboard/web/app.js.map +1 -1
  77. package/dist/dashboard/web/bot-defaults.d.ts.map +1 -1
  78. package/dist/dashboard/web/bot-defaults.js +128 -33
  79. package/dist/dashboard/web/bot-defaults.js.map +1 -1
  80. package/dist/dashboard/web/i18n.d.ts.map +1 -1
  81. package/dist/dashboard/web/i18n.js +42 -6
  82. package/dist/dashboard/web/i18n.js.map +1 -1
  83. package/dist/dashboard/web/legacy-workflow-link.d.ts +2 -0
  84. package/dist/dashboard/web/legacy-workflow-link.d.ts.map +1 -0
  85. package/dist/dashboard/web/legacy-workflow-link.js +12 -0
  86. package/dist/dashboard/web/legacy-workflow-link.js.map +1 -0
  87. package/dist/dashboard/web/settings.d.ts.map +1 -1
  88. package/dist/dashboard/web/settings.js +11 -0
  89. package/dist/dashboard/web/settings.js.map +1 -1
  90. package/dist/dashboard/web/v3-terminal.d.ts +11 -0
  91. package/dist/dashboard/web/v3-terminal.d.ts.map +1 -0
  92. package/dist/dashboard/web/v3-terminal.js +143 -0
  93. package/dist/dashboard/web/v3-terminal.js.map +1 -0
  94. package/dist/dashboard/web/v3.d.ts +2 -0
  95. package/dist/dashboard/web/v3.d.ts.map +1 -0
  96. package/dist/dashboard/web/v3.js +564 -0
  97. package/dist/dashboard/web/v3.js.map +1 -0
  98. package/dist/dashboard/web/whiteboards.d.ts.map +1 -1
  99. package/dist/dashboard/web/whiteboards.js +14 -5
  100. package/dist/dashboard/web/whiteboards.js.map +1 -1
  101. package/dist/dashboard/web/workflows.d.ts.map +1 -1
  102. package/dist/dashboard/web/workflows.js +12 -8
  103. package/dist/dashboard/web/workflows.js.map +1 -1
  104. package/dist/dashboard-web/app.js +834 -724
  105. package/dist/dashboard-web/apple-touch-icon.png +0 -0
  106. package/dist/dashboard-web/favicon.png +0 -0
  107. package/dist/dashboard-web/index.html +3 -1
  108. package/dist/dashboard-web/style.css +223 -0
  109. package/dist/dashboard.js +170 -10
  110. package/dist/dashboard.js.map +1 -1
  111. package/dist/global-config.d.ts +10 -0
  112. package/dist/global-config.d.ts.map +1 -1
  113. package/dist/global-config.js +8 -0
  114. package/dist/global-config.js.map +1 -1
  115. package/dist/i18n/en.d.ts.map +1 -1
  116. package/dist/i18n/en.js +23 -3
  117. package/dist/i18n/en.js.map +1 -1
  118. package/dist/i18n/zh.d.ts.map +1 -1
  119. package/dist/i18n/zh.js +23 -3
  120. package/dist/i18n/zh.js.map +1 -1
  121. package/dist/im/lark/card-handler.d.ts +12 -0
  122. package/dist/im/lark/card-handler.d.ts.map +1 -1
  123. package/dist/im/lark/card-handler.js +28 -0
  124. package/dist/im/lark/card-handler.js.map +1 -1
  125. package/dist/im/lark/client.d.ts.map +1 -1
  126. package/dist/im/lark/client.js +3 -12
  127. package/dist/im/lark/client.js.map +1 -1
  128. package/dist/im/lark/event-dispatcher.d.ts +2 -1
  129. package/dist/im/lark/event-dispatcher.d.ts.map +1 -1
  130. package/dist/im/lark/event-dispatcher.js +20 -6
  131. package/dist/im/lark/event-dispatcher.js.map +1 -1
  132. package/dist/im/lark/grant-command.js +4 -4
  133. package/dist/im/lark/grant-command.js.map +1 -1
  134. package/dist/im/lark/message-parser.d.ts +29 -1
  135. package/dist/im/lark/message-parser.d.ts.map +1 -1
  136. package/dist/im/lark/message-parser.js +35 -1
  137. package/dist/im/lark/message-parser.js.map +1 -1
  138. package/dist/im/lark/v3-blocked-card-handler.d.ts +28 -0
  139. package/dist/im/lark/v3-blocked-card-handler.d.ts.map +1 -0
  140. package/dist/im/lark/v3-blocked-card-handler.js +134 -0
  141. package/dist/im/lark/v3-blocked-card-handler.js.map +1 -0
  142. package/dist/im/lark/v3-blocked-card.d.ts +75 -0
  143. package/dist/im/lark/v3-blocked-card.d.ts.map +1 -0
  144. package/dist/im/lark/v3-blocked-card.js +206 -0
  145. package/dist/im/lark/v3-blocked-card.js.map +1 -0
  146. package/dist/im/lark/v3-gate-card-handler.d.ts +31 -0
  147. package/dist/im/lark/v3-gate-card-handler.d.ts.map +1 -0
  148. package/dist/im/lark/v3-gate-card-handler.js +110 -0
  149. package/dist/im/lark/v3-gate-card-handler.js.map +1 -0
  150. package/dist/im/lark/v3-gate-card.d.ts +47 -0
  151. package/dist/im/lark/v3-gate-card.d.ts.map +1 -0
  152. package/dist/im/lark/v3-gate-card.js +119 -0
  153. package/dist/im/lark/v3-gate-card.js.map +1 -0
  154. package/dist/im/lark/v3-loop-grant-card-handler.d.ts +28 -0
  155. package/dist/im/lark/v3-loop-grant-card-handler.d.ts.map +1 -0
  156. package/dist/im/lark/v3-loop-grant-card-handler.js +90 -0
  157. package/dist/im/lark/v3-loop-grant-card-handler.js.map +1 -0
  158. package/dist/im/lark/v3-loop-grant-card.d.ts +46 -0
  159. package/dist/im/lark/v3-loop-grant-card.d.ts.map +1 -0
  160. package/dist/im/lark/v3-loop-grant-card.js +119 -0
  161. package/dist/im/lark/v3-loop-grant-card.js.map +1 -0
  162. package/dist/im/lark/v3-revisit-grant-card-handler.d.ts +29 -0
  163. package/dist/im/lark/v3-revisit-grant-card-handler.d.ts.map +1 -0
  164. package/dist/im/lark/v3-revisit-grant-card-handler.js +96 -0
  165. package/dist/im/lark/v3-revisit-grant-card-handler.js.map +1 -0
  166. package/dist/im/lark/v3-revisit-grant-card.d.ts +52 -0
  167. package/dist/im/lark/v3-revisit-grant-card.d.ts.map +1 -0
  168. package/dist/im/lark/v3-revisit-grant-card.js +123 -0
  169. package/dist/im/lark/v3-revisit-grant-card.js.map +1 -0
  170. package/dist/im/lark/workflow-cards.d.ts.map +1 -1
  171. package/dist/im/lark/workflow-cards.js +5 -1
  172. package/dist/im/lark/workflow-cards.js.map +1 -1
  173. package/dist/im/lark/workflow-progress-card.d.ts +1 -1
  174. package/dist/im/lark/workflow-progress-card.js +1 -1
  175. package/dist/im/lark/workflow-slash-command.d.ts +28 -0
  176. package/dist/im/lark/workflow-slash-command.d.ts.map +1 -1
  177. package/dist/im/lark/workflow-slash-command.js +61 -5
  178. package/dist/im/lark/workflow-slash-command.js.map +1 -1
  179. package/dist/platform/binding.d.ts +6 -0
  180. package/dist/platform/binding.d.ts.map +1 -1
  181. package/dist/platform/binding.js +17 -0
  182. package/dist/platform/binding.js.map +1 -1
  183. package/dist/platform/tunnel-client.d.ts +2 -0
  184. package/dist/platform/tunnel-client.d.ts.map +1 -1
  185. package/dist/platform/tunnel-client.js.map +1 -1
  186. package/dist/services/bot-config-store.d.ts.map +1 -1
  187. package/dist/services/bot-config-store.js +1 -0
  188. package/dist/services/bot-config-store.js.map +1 -1
  189. package/dist/services/card-prefs-store.d.ts +4 -0
  190. package/dist/services/card-prefs-store.d.ts.map +1 -1
  191. package/dist/services/card-prefs-store.js +19 -0
  192. package/dist/services/card-prefs-store.js.map +1 -1
  193. package/dist/services/oncall-store.d.ts +25 -0
  194. package/dist/services/oncall-store.d.ts.map +1 -1
  195. package/dist/services/oncall-store.js +56 -0
  196. package/dist/services/oncall-store.js.map +1 -1
  197. package/dist/services/transcript-resolver.d.ts.map +1 -1
  198. package/dist/services/transcript-resolver.js +21 -4
  199. package/dist/services/transcript-resolver.js.map +1 -1
  200. package/dist/setup/bot-config-editor.d.ts +7 -0
  201. package/dist/setup/bot-config-editor.d.ts.map +1 -1
  202. package/dist/setup/bot-config-editor.js +33 -0
  203. package/dist/setup/bot-config-editor.js.map +1 -1
  204. package/dist/skills/definitions.d.ts.map +1 -1
  205. package/dist/skills/definitions.js +208 -4
  206. package/dist/skills/definitions.js.map +1 -1
  207. package/dist/types.d.ts +1 -0
  208. package/dist/types.d.ts.map +1 -1
  209. package/dist/utils/terminal-favicon.d.ts +2 -0
  210. package/dist/utils/terminal-favicon.d.ts.map +1 -0
  211. package/dist/utils/terminal-favicon.js +5 -0
  212. package/dist/utils/terminal-favicon.js.map +1 -0
  213. package/dist/worker.js +152 -8
  214. package/dist/worker.js.map +1 -1
  215. package/dist/workflows/definition.d.ts +80 -80
  216. package/dist/workflows/events/payloads.d.ts +4 -4
  217. package/dist/workflows/events/schema.d.ts +16 -16
  218. package/dist/workflows/v3/architect.d.ts +37 -0
  219. package/dist/workflows/v3/architect.d.ts.map +1 -0
  220. package/dist/workflows/v3/architect.js +226 -0
  221. package/dist/workflows/v3/architect.js.map +1 -0
  222. package/dist/workflows/v3/bot-resolve.d.ts +21 -0
  223. package/dist/workflows/v3/bot-resolve.d.ts.map +1 -0
  224. package/dist/workflows/v3/bot-resolve.js +48 -0
  225. package/dist/workflows/v3/bot-resolve.js.map +1 -0
  226. package/dist/workflows/v3/cli-run.d.ts +24 -0
  227. package/dist/workflows/v3/cli-run.d.ts.map +1 -0
  228. package/dist/workflows/v3/cli-run.js +265 -0
  229. package/dist/workflows/v3/cli-run.js.map +1 -0
  230. package/dist/workflows/v3/contract.d.ts +302 -0
  231. package/dist/workflows/v3/contract.d.ts.map +1 -0
  232. package/dist/workflows/v3/contract.js +91 -0
  233. package/dist/workflows/v3/contract.js.map +1 -0
  234. package/dist/workflows/v3/daemon-run.d.ts +311 -0
  235. package/dist/workflows/v3/daemon-run.d.ts.map +1 -0
  236. package/dist/workflows/v3/daemon-run.js +775 -0
  237. package/dist/workflows/v3/daemon-run.js.map +1 -0
  238. package/dist/workflows/v3/dag.d.ts +332 -0
  239. package/dist/workflows/v3/dag.d.ts.map +1 -0
  240. package/dist/workflows/v3/dag.js +1040 -0
  241. package/dist/workflows/v3/dag.js.map +1 -0
  242. package/dist/workflows/v3/ephemeral-pool.d.ts +29 -0
  243. package/dist/workflows/v3/ephemeral-pool.d.ts.map +1 -0
  244. package/dist/workflows/v3/ephemeral-pool.js +331 -0
  245. package/dist/workflows/v3/ephemeral-pool.js.map +1 -0
  246. package/dist/workflows/v3/grill-state.d.ts +92 -0
  247. package/dist/workflows/v3/grill-state.d.ts.map +1 -0
  248. package/dist/workflows/v3/grill-state.js +151 -0
  249. package/dist/workflows/v3/grill-state.js.map +1 -0
  250. package/dist/workflows/v3/host.d.ts +88 -0
  251. package/dist/workflows/v3/host.d.ts.map +1 -0
  252. package/dist/workflows/v3/host.js +349 -0
  253. package/dist/workflows/v3/host.js.map +1 -0
  254. package/dist/workflows/v3/human-gate.d.ts +85 -0
  255. package/dist/workflows/v3/human-gate.d.ts.map +1 -0
  256. package/dist/workflows/v3/human-gate.js +153 -0
  257. package/dist/workflows/v3/human-gate.js.map +1 -0
  258. package/dist/workflows/v3/journal.d.ts +207 -0
  259. package/dist/workflows/v3/journal.d.ts.map +1 -0
  260. package/dist/workflows/v3/journal.js +74 -0
  261. package/dist/workflows/v3/journal.js.map +1 -0
  262. package/dist/workflows/v3/manifest.d.ts +17 -0
  263. package/dist/workflows/v3/manifest.d.ts.map +1 -0
  264. package/dist/workflows/v3/manifest.js +266 -0
  265. package/dist/workflows/v3/manifest.js.map +1 -0
  266. package/dist/workflows/v3/ops-projection.d.ts +110 -0
  267. package/dist/workflows/v3/ops-projection.d.ts.map +1 -0
  268. package/dist/workflows/v3/ops-projection.js +0 -0
  269. package/dist/workflows/v3/ops-projection.js.map +1 -0
  270. package/dist/workflows/v3/orchestrator.d.ts +168 -0
  271. package/dist/workflows/v3/orchestrator.d.ts.map +1 -0
  272. package/dist/workflows/v3/orchestrator.js +417 -0
  273. package/dist/workflows/v3/orchestrator.js.map +1 -0
  274. package/dist/workflows/v3/runtime.d.ts +193 -0
  275. package/dist/workflows/v3/runtime.d.ts.map +1 -0
  276. package/dist/workflows/v3/runtime.js +1284 -0
  277. package/dist/workflows/v3/runtime.js.map +1 -0
  278. package/dist/workflows/v3/spec.d.ts +32 -0
  279. package/dist/workflows/v3/spec.d.ts.map +1 -0
  280. package/dist/workflows/v3/spec.js +173 -0
  281. package/dist/workflows/v3/spec.js.map +1 -0
  282. package/dist/workflows/v3/state.d.ts +74 -0
  283. package/dist/workflows/v3/state.d.ts.map +1 -0
  284. package/dist/workflows/v3/state.js +353 -0
  285. package/dist/workflows/v3/state.js.map +1 -0
  286. package/package.json +2 -2
  287. package/dist/dashboard/web/workflow-catalog.d.ts +0 -2
  288. package/dist/dashboard/web/workflow-catalog.d.ts.map +0 -1
  289. package/dist/dashboard/web/workflow-catalog.js +0 -323
  290. package/dist/dashboard/web/workflow-catalog.js.map +0 -1
@@ -0,0 +1,311 @@
1
+ /**
2
+ * Daemon-driven v3 run — the Feishu-product execution path (vs `cli-run.ts`'s
3
+ * dev/dogfood terminal path). Mirrors v0.2's `driveWorkflowRun`, but for the
4
+ * v3 engine and with **suspend-mode gates**:
5
+ *
6
+ * - `gateMode:'suspend'`: when a humanGate is reached the runtime writes the
7
+ * pending wait file + returns `awaitingGate` WITHOUT awaiting a decision —
8
+ * no in-memory promise to lose on a daemon restart.
9
+ * - This driver posts the approval card(s) for each pending gate and returns.
10
+ * It does NOT hold the run. A card click resolves the wait (+ appends
11
+ * `gateResolved`) and RE-INVOKES `driveV3Run` for a fresh replay that picks
12
+ * up the now-`gateCleared` node and continues.
13
+ *
14
+ * Stateless by design (recovery source = runDir dag/journal/wait/chatBinding).
15
+ * The daemon owns a lightweight per-runId in-flight guard around this so two
16
+ * concurrent clicks / start can't double-spawn.
17
+ */
18
+ import { type BotConfig } from '../../bot-registry.js';
19
+ import { type V3RuntimeDeps, type V3RunOutcome, type V3PendingGate } from './runtime.js';
20
+ import { type RunChatBinding } from './grill-state.js';
21
+ import { type GateWaitStatus } from './human-gate.js';
22
+ import { type StoredEvent, type V3ErrorClass } from './journal.js';
23
+ import { type GoalAsk, type ValidateManifest } from './contract.js';
24
+ /**
25
+ * runId → runDir with a path-traversal guard (codex review #2). runIds reach
26
+ * the daemon from outside (start IPC, card clicks) — never trust them into a
27
+ * `join` without the allowlist check, so the guard lives in core (not glue).
28
+ */
29
+ export declare function safeRunDir(baseDir: string, runId: string): string;
30
+ export type V3TerminalOutcome = Extract<V3RunOutcome, {
31
+ reason: 'terminal';
32
+ }>;
33
+ /** What the daemon needs to render a blocked-node retry card. */
34
+ export interface V3BlockedInfo {
35
+ nodeId: string;
36
+ attemptId: string;
37
+ errorClass?: V3ErrorClass;
38
+ errorCode?: string;
39
+ message?: string;
40
+ /** Present when the block is a runtime human-ask (errorCode === ASK_HUMAN):
41
+ * the agent's question → the daemon posts an ask card instead of a plain
42
+ * retry card. */
43
+ ask?: GoalAsk;
44
+ /** Present when errorCode === 'REVISIT_BUDGET_EXHAUSTED': the ancestor this
45
+ * node tried to revisit → the daemon posts a revisit-grant card. */
46
+ revisitTo?: string;
47
+ }
48
+ /** Latest `nodeBlocked` details for a node (card content). Falls back to a
49
+ * bare nodeId/attempt when the journal has no blocked event (shouldn't
50
+ * happen for a blocked run, but the card must still render). */
51
+ export declare function blockedInfoFor(events: StoredEvent[], nodeId: string): V3BlockedInfo;
52
+ /** What the daemon needs to render a revisit-budget grant card. Derived from
53
+ * the blocked event (source/target/attempt) + a re-run budget check (which tier
54
+ * is exhausted — the card must grant the RIGHT scope, 菲菲 review). Returns
55
+ * undefined when `nodeId` isn't actually blocked on REVISIT_BUDGET_EXHAUSTED. */
56
+ export interface V3RevisitBudgetBlockedInfo {
57
+ sourceNodeId: string;
58
+ toNodeId: string;
59
+ attemptId: string;
60
+ tier: 'pair' | 'run';
61
+ detail: string;
62
+ }
63
+ export declare function revisitBudgetBlockedInfoFor(events: StoredEvent[], nodeId: string): V3RevisitBudgetBlockedInfo | undefined;
64
+ /** What the daemon needs to render an exhausted-loop grant card. */
65
+ export interface V3LoopExhaustedInfo {
66
+ loopId: string;
67
+ /** The iteration the loop exhausted at (= the grant card's freshness key). */
68
+ iteration: number;
69
+ /** Authored bound — filled when the dag is loadable (display only). */
70
+ maxIterations?: number;
71
+ /** Extra iterations already granted. */
72
+ granted: number;
73
+ /** Last decision detail (e.g. `result.passed=false (iteration 3/3)`). */
74
+ detail?: string;
75
+ }
76
+ /** Fold the exhausted-loop card content from the journal. Pure. */
77
+ export declare function loopExhaustedInfoFor(events: StoredEvent[], loopId: string): V3LoopExhaustedInfo;
78
+ export interface V3DaemonRunDeps {
79
+ /** runs root (default ~/.botmux/v3-runs). */
80
+ baseDir?: string;
81
+ /** bot config source (default live bots.json) — injectable for tests. */
82
+ loadBots?: () => BotConfig[];
83
+ /** Build the ephemeral pool's runNode — injectable for tests. Default = real pool. */
84
+ makeRunNode?: (resolveLarkAppSecret: (larkAppId: string) => string | undefined) => V3RuntimeDeps['runNode'];
85
+ /** Manifest validator — injectable for tests. Default = real readAndValidateManifest wrapper. */
86
+ validateManifest?: ValidateManifest;
87
+ /** Post (or re-post) a humanGate approval card for a pending gate to the bound topic. */
88
+ postGateCard: (binding: RunChatBinding, gate: V3PendingGate, runId: string) => Promise<void>;
89
+ /** Post a blocked-node retry card. Optional — when absent (or no binding),
90
+ * a blocked outcome falls through to `onTerminal` like failed/succeeded. */
91
+ postBlockedCard?: (binding: RunChatBinding, info: V3BlockedInfo, runId: string) => Promise<void>;
92
+ /** Post an exhausted-loop grant card (+1 iteration). Optional — same
93
+ * fallthrough semantics as postBlockedCard. */
94
+ postLoopGrantCard?: (binding: RunChatBinding, info: V3LoopExhaustedInfo, runId: string) => Promise<void>;
95
+ /** Post a revisit-budget grant card (+1 revisit). Optional — same fallthrough
96
+ * semantics as postBlockedCard. Chosen over the plain blocked card when the
97
+ * block is a `REVISIT_BUDGET_EXHAUSTED`. */
98
+ postRevisitGrantCard?: (binding: RunChatBinding, info: V3RevisitBudgetBlockedInfo, runId: string) => Promise<void>;
99
+ /** Report a terminal run (final card / message). Optional. */
100
+ onTerminal?: (runId: string, outcome: V3TerminalOutcome, binding?: RunChatBinding) => Promise<void>;
101
+ maxParallel?: number;
102
+ }
103
+ /**
104
+ * Drive a daemon-side v3 run to its next suspension point (a gate) or terminal.
105
+ * Returns the runtime outcome. Throws on: missing grill state, no approved
106
+ * dag, or awaitingGate with no chatBinding (can't post a card).
107
+ */
108
+ export declare function driveV3Run(runId: string, deps: V3DaemonRunDeps): Promise<V3RunOutcome>;
109
+ export type V3GateClickOutcome = {
110
+ kind: 'resolved';
111
+ resolution: 'approved' | 'rejected';
112
+ } | {
113
+ kind: 'already-settled';
114
+ status: GateWaitStatus;
115
+ } | {
116
+ kind: 'unauthorized';
117
+ } | {
118
+ kind: 'stale-run';
119
+ reason: 'terminal' | 'missing' | 'no-wait' | 'stale-node';
120
+ };
121
+ /**
122
+ * Resolve a humanGate approval-card click. Idempotent + terminal-safe (codex
123
+ * review #5):
124
+ * 1. run terminal / journal missing → `stale-run` (caller toasts, does NOT
125
+ * redrive — a finished run must not be pulled back to life by a stale card).
126
+ * 2. wait missing / non-pending → `stale-run`(no-wait) / `already-settled`
127
+ * (caller toasts, no redrive — guards repeat clicks).
128
+ * 3. pending → `resolveWait` (atomic — THE idempotency guard) THEN append
129
+ * `gateResolved`. Returns `resolved` → caller redrives.
130
+ *
131
+ * Order is wait-first on purpose: a crash between the two leaves the wait
132
+ * settled (future clicks → already-settled, no double-resolve); the rare
133
+ * wait-resolved-but-journal-missing gap is healed by cold-attach reconcile.
134
+ * If the journal append throws, this throws — the caller must warn and NOT
135
+ * fake UI success (codex #5).
136
+ */
137
+ export declare function resolveV3GateClick(baseDir: string, runId: string, input: {
138
+ waitId: string;
139
+ selected: string;
140
+ by: string;
141
+ }): V3GateClickOutcome;
142
+ export type V3RetryOutcome = {
143
+ kind: 'requested';
144
+ nodeId: string;
145
+ previousAttemptId: string;
146
+ nextAttemptId: string;
147
+ } | {
148
+ kind: 'already-requested';
149
+ nodeId: string;
150
+ } | {
151
+ kind: 'stale-run';
152
+ reason: 'missing' | 'not-blocked' | 'stale-attempt' | 'loop-node' | 'invalid-answer';
153
+ };
154
+ type V3RetryAnswerInput = {
155
+ selected: string;
156
+ by: string;
157
+ } | {
158
+ text: string;
159
+ by: string;
160
+ };
161
+ /**
162
+ * Append a retry intent for a blocked node (the resume entrypoint — daemon
163
+ * card click and `botmux workflow retry` both land here). Recovery-first +
164
+ * idempotent (codex v2 of the blocked design):
165
+ * 1. fresh `materialize(readJournal)` — the journal is the recovery source;
166
+ * a node that already succeeded / re-dispatched is seen as such.
167
+ * 2. the target node must STILL be materialized `blocked`. A node already
168
+ * reset to pending by an unconsumed `nodeRetryRequested` → already-requested
169
+ * (no second append); anything else → stale.
170
+ * 3. `expectedAttemptId` (card clicks pass the card's attempt): the retry is
171
+ * only valid for the attempt that is CURRENTLY blocked — a stale card from
172
+ * attempt 001 must not advance attempt 002's blocked to 003 (codex
173
+ * blocker, slice-1 review). The card nonce alone only proves the card's
174
+ * own integrity, not freshness. CLI omits it ("retry whatever is blocked").
175
+ * 4. append `nodeRetryRequested` with the reserved nextAttemptId and the
176
+ * previous blocked event's errorClass/errorCode copied in for audit.
177
+ * The caller re-drives (materialize folds the retry into pending → orchestrator
178
+ * re-dispatches with the reserved attempt number).
179
+ */
180
+ export declare function requestV3Retry(baseDir: string, runId: string, input?: {
181
+ nodeId?: string;
182
+ expectedAttemptId?: string;
183
+ answer?: V3RetryAnswerInput;
184
+ }): V3RetryOutcome;
185
+ export type V3RevisitGrantOutcome = {
186
+ kind: 'granted';
187
+ scope: 'pair' | 'run';
188
+ retry: V3RetryOutcome;
189
+ } | {
190
+ kind: 'invalid';
191
+ reason: 'partial-pair' | 'pair-source-mismatch';
192
+ } | {
193
+ kind: 'stale-run';
194
+ reason: 'missing' | 'not-budget-blocked' | 'stale-attempt';
195
+ };
196
+ /** Grant +1 revisit budget after a run blocked on `REVISIT_BUDGET_EXHAUSTED`,
197
+ * then resume (the revisit analogue of a loop-iteration grant). Atomic
198
+ * "continue": append `revisitBudgetGranted` AND retry the blocked node so it
199
+ * re-attempts its revisit within the extended budget — one entry, like the
200
+ * card's one-click. Guards (菲菲 review):
201
+ * - the run MUST currently be blocked on a `REVISIT_BUDGET_EXHAUSTED` node
202
+ * (freshness + idempotency: after grant+retry the node is pending, so a
203
+ * repeat call is `not-budget-blocked` and adds NO further budget);
204
+ * - PAIR grant ⇒ both sourceNodeId+toNodeId, and sourceNodeId MUST be the
205
+ * blocked node; RUN grant ⇒ neither; a half-filled pair is rejected (never
206
+ * silently widened to a run grant);
207
+ * - `expectedAttemptId` (card passes it) must match the blocked attempt. */
208
+ export declare function requestRevisitGrant(baseDir: string, runId: string, input: {
209
+ sourceNodeId?: string;
210
+ toNodeId?: string;
211
+ by: string;
212
+ reason?: string;
213
+ expectedAttemptId?: string;
214
+ }): V3RevisitGrantOutcome;
215
+ export type V3LoopGrantOutcome = {
216
+ kind: 'granted';
217
+ loopId: string;
218
+ fromIteration: number;
219
+ nextIteration: number;
220
+ } | {
221
+ kind: 'already-granted';
222
+ loopId: string;
223
+ } | {
224
+ kind: 'stale-run';
225
+ reason: 'missing' | 'not-exhausted' | 'stale-iteration';
226
+ };
227
+ /**
228
+ * Grant ONE extra iteration to an exhausted-blocked loop (the loop analogue
229
+ * of `requestV3Retry` — daemon grant-card click and `botmux workflow grant`
230
+ * both land here). Same recovery-first discipline:
231
+ * 1. fresh `materialize(readJournal)` — the journal is the only truth.
232
+ * 2. the target loop must STILL be exhausted-blocked. An unconsumed grant
233
+ * (`pendingGrant`) → already-granted (idempotent, no second append).
234
+ * 3. `expectedIteration` (card clicks pass the card's iteration): the grant
235
+ * is only valid for the iteration the loop exhausted at — a stale card
236
+ * from an earlier exhaustion must not grant a second silent round
237
+ * (expectedAttemptId's lesson, ported). CLI omits it.
238
+ * 4. append `loopIterationGranted`; the caller re-drives (materialize folds
239
+ * the grant into a running loop → orchestrator starts iteration N+1).
240
+ */
241
+ export declare function requestV3LoopGrant(baseDir: string, runId: string, input?: {
242
+ loopId?: string;
243
+ expectedIteration?: number;
244
+ by?: string;
245
+ }): V3LoopGrantOutcome;
246
+ export interface V3GateRecovery {
247
+ runId: string;
248
+ runDir: string;
249
+ binding?: RunChatBinding;
250
+ /** pending gates whose approval card the daemon should (re)post. */
251
+ repost: V3PendingGate[];
252
+ /** blocked node whose retry card the daemon should (re)post — covers the
253
+ * crash window between the `runBlocked` append and the card send. */
254
+ repostBlocked?: V3BlockedInfo;
255
+ /** exhausted loop whose grant card the daemon should (re)post — the loop
256
+ * flavor of the same crash window. */
257
+ repostLoopGrant?: V3LoopExhaustedInfo;
258
+ /** revisit-budget-exhausted node whose grant card the daemon should (re)post —
259
+ * the revisit flavor of the same crash window. */
260
+ repostRevisitGrant?: V3RevisitBudgetBlockedInfo;
261
+ /** true when a resolved-but-unjournaled gate was healed → daemon should driveV3Run. */
262
+ resume: boolean;
263
+ }
264
+ export interface V3GateRunnerDeps {
265
+ baseDir?: string;
266
+ /** Post (or re-post) a gate's approval card to its topic. The daemon builds
267
+ * the card + sends via Lark (kept here so this module has no `im/` import). */
268
+ postCard: (binding: RunChatBinding, gate: V3PendingGate, runId: string) => Promise<void>;
269
+ /** Post (or re-post) a blocked node's retry card. */
270
+ postBlockedCard?: (binding: RunChatBinding, info: V3BlockedInfo, runId: string) => Promise<void>;
271
+ /** Post (or re-post) an exhausted loop's grant card. */
272
+ postLoopGrantCard?: (binding: RunChatBinding, info: V3LoopExhaustedInfo, runId: string) => Promise<void>;
273
+ /** Post (or re-post) a revisit-budget-exhausted node's grant card. */
274
+ postRevisitGrantCard?: (binding: RunChatBinding, info: V3RevisitBudgetBlockedInfo, runId: string) => Promise<void>;
275
+ /** Notify a terminal run (optional, daemon-supplied). */
276
+ notifyTerminal?: (binding: RunChatBinding | undefined, runId: string, outcome: V3TerminalOutcome) => Promise<void>;
277
+ /** runtime deps passthrough (tests inject; daemon uses real pool). */
278
+ loadBots?: V3DaemonRunDeps['loadBots'];
279
+ makeRunNode?: V3DaemonRunDeps['makeRunNode'];
280
+ validateManifest?: V3DaemonRunDeps['validateManifest'];
281
+ maxParallel?: number;
282
+ /** error sink (default: swallow). Daemon passes its logger.warn. */
283
+ onError?: (runId: string, err: unknown) => void;
284
+ }
285
+ /**
286
+ * The daemon's v3 gate run-controller: an in-flight-guarded `drive(runId)`
287
+ * (mirrors v0.2's driveWorkflowRun re-entry) + a `coldAttach()` that re-arms
288
+ * pending gates on startup. Stateless except the in-flight set — recovery
289
+ * source is always the runDir.
290
+ */
291
+ export declare function createV3GateRunner(deps: V3GateRunnerDeps): {
292
+ drive: (runId: string) => Promise<void>;
293
+ driveDetached: (runId: string) => void;
294
+ coldAttach: (ownerLarkAppId?: string) => Promise<void>;
295
+ };
296
+ /**
297
+ * Cold-attach reconcile (daemon startup, codex review #2/#3). Finds v3 runs
298
+ * suspended at a humanGate and reconciles the journal↔wait-file atomic window
299
+ * BOTH ways:
300
+ * - node `gateWaiting` + wait file MISSING (crash between the `gateDispatched`
301
+ * append and `writePendingWait`) → re-create the pending wait from the
302
+ * dag's `humanGate.prompt`, then repost a card.
303
+ * - node `gateWaiting` + wait RESOLVED (crash between `resolveWait` and the
304
+ * `gateResolved` append) → append the missing `gateResolved` → resume.
305
+ * - node `gateWaiting` + wait pending → just repost a card.
306
+ * Skips terminal runs. Pure file IO + journal append — the daemon decides what
307
+ * to post / drive from the returned list.
308
+ */
309
+ export declare function reconcileV3PendingGates(baseDir?: string, ownerLarkAppId?: string): V3GateRecovery[];
310
+ export {};
311
+ //# sourceMappingURL=daemon-run.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daemon-run.d.ts","sourceRoot":"","sources":["../../../src/workflows/v3/daemon-run.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,OAAO,EAAkB,KAAK,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAKL,KAAK,aAAa,EAElB,KAAK,YAAY,EACjB,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAOL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAA4B,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAG7F,OAAO,EAAqC,KAAK,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEvG;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,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