@kynetic-ai/spec 0.11.0 → 0.12.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 (501) hide show
  1. package/README.md +55 -455
  2. package/dist/agent-runtime/bootstrap.d.ts +31 -0
  3. package/dist/agent-runtime/bootstrap.d.ts.map +1 -0
  4. package/dist/agent-runtime/bootstrap.js +302 -0
  5. package/dist/agent-runtime/bootstrap.js.map +1 -0
  6. package/dist/agent-runtime/dispatch.d.ts +119 -10
  7. package/dist/agent-runtime/dispatch.d.ts.map +1 -1
  8. package/dist/agent-runtime/dispatch.js +1154 -219
  9. package/dist/agent-runtime/dispatch.js.map +1 -1
  10. package/dist/agent-runtime/invocation.d.ts +28 -1
  11. package/dist/agent-runtime/invocation.d.ts.map +1 -1
  12. package/dist/agent-runtime/invocation.js +171 -59
  13. package/dist/agent-runtime/invocation.js.map +1 -1
  14. package/dist/agent-runtime/prompts.d.ts +9 -0
  15. package/dist/agent-runtime/prompts.d.ts.map +1 -1
  16. package/dist/agent-runtime/prompts.js +42 -7
  17. package/dist/agent-runtime/prompts.js.map +1 -1
  18. package/dist/agent-runtime/session-event-accumulator.d.ts +83 -0
  19. package/dist/agent-runtime/session-event-accumulator.d.ts.map +1 -0
  20. package/dist/agent-runtime/session-event-accumulator.js +203 -0
  21. package/dist/agent-runtime/session-event-accumulator.js.map +1 -0
  22. package/dist/agent-runtime/session-event-types.d.ts +67 -0
  23. package/dist/agent-runtime/session-event-types.d.ts.map +1 -0
  24. package/dist/agent-runtime/session-event-types.js +13 -0
  25. package/dist/agent-runtime/session-event-types.js.map +1 -0
  26. package/dist/agent-runtime/workspace.d.ts +244 -0
  27. package/dist/agent-runtime/workspace.d.ts.map +1 -0
  28. package/dist/agent-runtime/workspace.js +2025 -0
  29. package/dist/agent-runtime/workspace.js.map +1 -0
  30. package/dist/agents/adapters.d.ts.map +1 -1
  31. package/dist/agents/adapters.js +58 -13
  32. package/dist/agents/adapters.js.map +1 -1
  33. package/dist/agents/spawner.d.ts +8 -0
  34. package/dist/agents/spawner.d.ts.map +1 -1
  35. package/dist/agents/spawner.js +25 -3
  36. package/dist/agents/spawner.js.map +1 -1
  37. package/dist/cli/batch-exec.js +1 -1
  38. package/dist/cli/batch-exec.js.map +1 -1
  39. package/dist/cli/command-annotations.d.ts +15 -3
  40. package/dist/cli/command-annotations.d.ts.map +1 -1
  41. package/dist/cli/command-annotations.js +23 -3
  42. package/dist/cli/command-annotations.js.map +1 -1
  43. package/dist/cli/commands/agent.d.ts +2 -0
  44. package/dist/cli/commands/agent.d.ts.map +1 -1
  45. package/dist/cli/commands/agent.js +144 -27
  46. package/dist/cli/commands/agent.js.map +1 -1
  47. package/dist/cli/commands/agents.d.ts.map +1 -1
  48. package/dist/cli/commands/agents.js +5 -5
  49. package/dist/cli/commands/agents.js.map +1 -1
  50. package/dist/cli/commands/derive.d.ts.map +1 -1
  51. package/dist/cli/commands/derive.js +118 -3
  52. package/dist/cli/commands/derive.js.map +1 -1
  53. package/dist/cli/commands/guard.d.ts.map +1 -1
  54. package/dist/cli/commands/guard.js +8 -6
  55. package/dist/cli/commands/guard.js.map +1 -1
  56. package/dist/cli/commands/index.d.ts +1 -0
  57. package/dist/cli/commands/index.d.ts.map +1 -1
  58. package/dist/cli/commands/index.js +1 -0
  59. package/dist/cli/commands/index.js.map +1 -1
  60. package/dist/cli/commands/init.d.ts.map +1 -1
  61. package/dist/cli/commands/init.js +20 -0
  62. package/dist/cli/commands/init.js.map +1 -1
  63. package/dist/cli/commands/item.d.ts.map +1 -1
  64. package/dist/cli/commands/item.js +205 -47
  65. package/dist/cli/commands/item.js.map +1 -1
  66. package/dist/cli/commands/log.d.ts.map +1 -1
  67. package/dist/cli/commands/log.js +24 -10
  68. package/dist/cli/commands/log.js.map +1 -1
  69. package/dist/cli/commands/plan-import.d.ts +3 -3
  70. package/dist/cli/commands/plan-import.d.ts.map +1 -1
  71. package/dist/cli/commands/plan-import.js +213 -528
  72. package/dist/cli/commands/plan-import.js.map +1 -1
  73. package/dist/cli/commands/plan.d.ts.map +1 -1
  74. package/dist/cli/commands/plan.js +533 -83
  75. package/dist/cli/commands/plan.js.map +1 -1
  76. package/dist/cli/commands/review.d.ts +14 -0
  77. package/dist/cli/commands/review.d.ts.map +1 -0
  78. package/dist/cli/commands/review.js +1142 -0
  79. package/dist/cli/commands/review.js.map +1 -0
  80. package/dist/cli/commands/serve.d.ts +1 -0
  81. package/dist/cli/commands/serve.d.ts.map +1 -1
  82. package/dist/cli/commands/serve.js +33 -10
  83. package/dist/cli/commands/serve.js.map +1 -1
  84. package/dist/cli/commands/session/checkpoint.d.ts +2 -4
  85. package/dist/cli/commands/session/checkpoint.d.ts.map +1 -1
  86. package/dist/cli/commands/session/checkpoint.js +6 -107
  87. package/dist/cli/commands/session/checkpoint.js.map +1 -1
  88. package/dist/cli/commands/session/commands.d.ts.map +1 -1
  89. package/dist/cli/commands/session/commands.js +33 -23
  90. package/dist/cli/commands/session/commands.js.map +1 -1
  91. package/dist/cli/commands/session/compact.js +4 -4
  92. package/dist/cli/commands/session/compact.js.map +1 -1
  93. package/dist/cli/commands/session/create.js +2 -2
  94. package/dist/cli/commands/session/create.js.map +1 -1
  95. package/dist/cli/commands/session/format.d.ts.map +1 -1
  96. package/dist/cli/commands/session/format.js +1 -6
  97. package/dist/cli/commands/session/format.js.map +1 -1
  98. package/dist/cli/commands/session/log.d.ts +32 -7
  99. package/dist/cli/commands/session/log.d.ts.map +1 -1
  100. package/dist/cli/commands/session/log.js +166 -60
  101. package/dist/cli/commands/session/log.js.map +1 -1
  102. package/dist/cli/commands/session/migrate.d.ts +9 -0
  103. package/dist/cli/commands/session/migrate.d.ts.map +1 -0
  104. package/dist/cli/commands/session/migrate.js +46 -0
  105. package/dist/cli/commands/session/migrate.js.map +1 -0
  106. package/dist/cli/commands/session/stale-close.d.ts.map +1 -1
  107. package/dist/cli/commands/session/stale-close.js +5 -8
  108. package/dist/cli/commands/session/stale-close.js.map +1 -1
  109. package/dist/cli/commands/session/types.d.ts +1 -1
  110. package/dist/cli/commands/session/types.d.ts.map +1 -1
  111. package/dist/cli/commands/setup.d.ts +2 -2
  112. package/dist/cli/commands/setup.d.ts.map +1 -1
  113. package/dist/cli/commands/setup.js +287 -257
  114. package/dist/cli/commands/setup.js.map +1 -1
  115. package/dist/cli/commands/shadow.d.ts.map +1 -1
  116. package/dist/cli/commands/shadow.js +147 -31
  117. package/dist/cli/commands/shadow.js.map +1 -1
  118. package/dist/cli/commands/skill-crud.d.ts +7 -0
  119. package/dist/cli/commands/skill-crud.d.ts.map +1 -1
  120. package/dist/cli/commands/skill-crud.js +41 -18
  121. package/dist/cli/commands/skill-crud.js.map +1 -1
  122. package/dist/cli/commands/skill-diff.d.ts.map +1 -1
  123. package/dist/cli/commands/skill-diff.js +29 -3
  124. package/dist/cli/commands/skill-diff.js.map +1 -1
  125. package/dist/cli/commands/skill-install.d.ts.map +1 -1
  126. package/dist/cli/commands/skill-install.js +5 -4
  127. package/dist/cli/commands/skill-install.js.map +1 -1
  128. package/dist/cli/commands/task.d.ts.map +1 -1
  129. package/dist/cli/commands/task.js +359 -49
  130. package/dist/cli/commands/task.js.map +1 -1
  131. package/dist/cli/commands/trait.d.ts.map +1 -1
  132. package/dist/cli/commands/trait.js +5 -27
  133. package/dist/cli/commands/trait.js.map +1 -1
  134. package/dist/cli/commands/validate.d.ts.map +1 -1
  135. package/dist/cli/commands/validate.js +113 -52
  136. package/dist/cli/commands/validate.js.map +1 -1
  137. package/dist/cli/index.d.ts.map +1 -1
  138. package/dist/cli/index.js +69 -2
  139. package/dist/cli/index.js.map +1 -1
  140. package/dist/cli/output.d.ts +26 -0
  141. package/dist/cli/output.d.ts.map +1 -1
  142. package/dist/cli/output.js +108 -1
  143. package/dist/cli/output.js.map +1 -1
  144. package/dist/cli/sync-mode.d.ts +44 -0
  145. package/dist/cli/sync-mode.d.ts.map +1 -0
  146. package/dist/cli/sync-mode.js +64 -0
  147. package/dist/cli/sync-mode.js.map +1 -0
  148. package/dist/daemon/middleware/project-context.ts +25 -7
  149. package/dist/daemon/project-context.ts +18 -0
  150. package/dist/daemon/routes/agent-dispatch.ts +99 -22
  151. package/dist/daemon/routes/aggregation.ts +184 -0
  152. package/dist/daemon/routes/inbox.ts +5 -0
  153. package/dist/daemon/routes/items.ts +145 -0
  154. package/dist/daemon/routes/meta.ts +1 -1
  155. package/dist/daemon/routes/projects.ts +28 -6
  156. package/dist/daemon/routes/ref-resolution.ts +119 -0
  157. package/dist/daemon/routes/refs.ts +42 -0
  158. package/dist/daemon/routes/session-related.ts +140 -0
  159. package/dist/daemon/routes/sessions.ts +420 -19
  160. package/dist/daemon/routes/tasks.ts +62 -5
  161. package/dist/daemon/routes/triage.ts +40 -1
  162. package/dist/daemon/server.ts +143 -49
  163. package/dist/daemon/session-sync.ts +11 -0
  164. package/dist/daemon/shadow-sync.ts +11 -0
  165. package/dist/daemon/watcher.ts +56 -5
  166. package/dist/daemon/websocket/project-resolution.ts +77 -0
  167. package/dist/export/json.d.ts.map +1 -1
  168. package/dist/export/json.js +104 -1
  169. package/dist/export/json.js.map +1 -1
  170. package/dist/export/types.d.ts +52 -1
  171. package/dist/export/types.d.ts.map +1 -1
  172. package/dist/index.d.ts +1 -0
  173. package/dist/index.d.ts.map +1 -1
  174. package/dist/index.js +1 -0
  175. package/dist/index.js.map +1 -1
  176. package/dist/parser/agent-detection.d.ts +1 -1
  177. package/dist/parser/agent-detection.d.ts.map +1 -1
  178. package/dist/parser/agent-detection.js +10 -0
  179. package/dist/parser/agent-detection.js.map +1 -1
  180. package/dist/parser/config.d.ts +397 -2
  181. package/dist/parser/config.d.ts.map +1 -1
  182. package/dist/parser/config.js +125 -3
  183. package/dist/parser/config.js.map +1 -1
  184. package/dist/parser/dispatch-workspaces.d.ts +18 -0
  185. package/dist/parser/dispatch-workspaces.d.ts.map +1 -0
  186. package/dist/parser/dispatch-workspaces.js +209 -0
  187. package/dist/parser/dispatch-workspaces.js.map +1 -0
  188. package/dist/parser/doctor.d.ts.map +1 -1
  189. package/dist/parser/doctor.js +27 -8
  190. package/dist/parser/doctor.js.map +1 -1
  191. package/dist/parser/file-lock.d.ts.map +1 -1
  192. package/dist/parser/file-lock.js +9 -2
  193. package/dist/parser/file-lock.js.map +1 -1
  194. package/dist/parser/index.d.ts +6 -0
  195. package/dist/parser/index.d.ts.map +1 -1
  196. package/dist/parser/index.js +6 -0
  197. package/dist/parser/index.js.map +1 -1
  198. package/dist/parser/plans.d.ts.map +1 -1
  199. package/dist/parser/plans.js +1 -0
  200. package/dist/parser/plans.js.map +1 -1
  201. package/dist/parser/refs.d.ts +8 -1
  202. package/dist/parser/refs.d.ts.map +1 -1
  203. package/dist/parser/refs.js +27 -1
  204. package/dist/parser/refs.js.map +1 -1
  205. package/dist/parser/review-operations.d.ts +72 -0
  206. package/dist/parser/review-operations.d.ts.map +1 -0
  207. package/dist/parser/review-operations.js +185 -0
  208. package/dist/parser/review-operations.js.map +1 -0
  209. package/dist/parser/review-task-integration.d.ts +78 -0
  210. package/dist/parser/review-task-integration.d.ts.map +1 -0
  211. package/dist/parser/review-task-integration.js +173 -0
  212. package/dist/parser/review-task-integration.js.map +1 -0
  213. package/dist/parser/review-threads.d.ts +101 -0
  214. package/dist/parser/review-threads.d.ts.map +1 -0
  215. package/dist/parser/review-threads.js +222 -0
  216. package/dist/parser/review-threads.js.map +1 -0
  217. package/dist/parser/review-validation.d.ts +69 -0
  218. package/dist/parser/review-validation.d.ts.map +1 -0
  219. package/dist/parser/review-validation.js +207 -0
  220. package/dist/parser/review-validation.js.map +1 -0
  221. package/dist/parser/reviews.d.ts +58 -0
  222. package/dist/parser/reviews.d.ts.map +1 -0
  223. package/dist/parser/reviews.js +230 -0
  224. package/dist/parser/reviews.js.map +1 -0
  225. package/dist/parser/session-branch.d.ts +91 -0
  226. package/dist/parser/session-branch.d.ts.map +1 -0
  227. package/dist/parser/session-branch.js +565 -0
  228. package/dist/parser/session-branch.js.map +1 -0
  229. package/dist/parser/session-sync-scheduler.d.ts +53 -0
  230. package/dist/parser/session-sync-scheduler.d.ts.map +1 -0
  231. package/dist/parser/session-sync-scheduler.js +100 -0
  232. package/dist/parser/session-sync-scheduler.js.map +1 -0
  233. package/dist/parser/setup-status.d.ts +7 -1
  234. package/dist/parser/setup-status.d.ts.map +1 -1
  235. package/dist/parser/setup-status.js +104 -39
  236. package/dist/parser/setup-status.js.map +1 -1
  237. package/dist/parser/shadow-sync-scheduler.d.ts +71 -0
  238. package/dist/parser/shadow-sync-scheduler.d.ts.map +1 -0
  239. package/dist/parser/shadow-sync-scheduler.js +139 -0
  240. package/dist/parser/shadow-sync-scheduler.js.map +1 -0
  241. package/dist/parser/shadow.d.ts +121 -14
  242. package/dist/parser/shadow.d.ts.map +1 -1
  243. package/dist/parser/shadow.js +752 -27
  244. package/dist/parser/shadow.js.map +1 -1
  245. package/dist/parser/skill-render.d.ts +24 -0
  246. package/dist/parser/skill-render.d.ts.map +1 -1
  247. package/dist/parser/skill-render.js +98 -26
  248. package/dist/parser/skill-render.js.map +1 -1
  249. package/dist/parser/validate.d.ts +43 -3
  250. package/dist/parser/validate.d.ts.map +1 -1
  251. package/dist/parser/validate.js +204 -30
  252. package/dist/parser/validate.js.map +1 -1
  253. package/dist/parser/yaml.d.ts +47 -11
  254. package/dist/parser/yaml.d.ts.map +1 -1
  255. package/dist/parser/yaml.js +329 -149
  256. package/dist/parser/yaml.js.map +1 -1
  257. package/dist/review/checks.d.ts +97 -0
  258. package/dist/review/checks.d.ts.map +1 -0
  259. package/dist/review/checks.js +175 -0
  260. package/dist/review/checks.js.map +1 -0
  261. package/dist/review/index.d.ts +3 -0
  262. package/dist/review/index.d.ts.map +1 -0
  263. package/dist/review/index.js +3 -0
  264. package/dist/review/index.js.map +1 -0
  265. package/dist/review/subject-bindings.d.ts +83 -0
  266. package/dist/review/subject-bindings.d.ts.map +1 -0
  267. package/dist/review/subject-bindings.js +175 -0
  268. package/dist/review/subject-bindings.js.map +1 -0
  269. package/dist/schema/common.d.ts +26 -0
  270. package/dist/schema/common.d.ts.map +1 -1
  271. package/dist/schema/common.js +13 -0
  272. package/dist/schema/common.js.map +1 -1
  273. package/dist/schema/dispatch-workspace.d.ts +2643 -0
  274. package/dist/schema/dispatch-workspace.d.ts.map +1 -0
  275. package/dist/schema/dispatch-workspace.js +187 -0
  276. package/dist/schema/dispatch-workspace.js.map +1 -0
  277. package/dist/schema/inbox.d.ts +8 -8
  278. package/dist/schema/index.d.ts +2 -0
  279. package/dist/schema/index.d.ts.map +1 -1
  280. package/dist/schema/index.js +2 -0
  281. package/dist/schema/index.js.map +1 -1
  282. package/dist/schema/meta.d.ts +648 -116
  283. package/dist/schema/meta.d.ts.map +1 -1
  284. package/dist/schema/meta.js +27 -0
  285. package/dist/schema/meta.js.map +1 -1
  286. package/dist/schema/plan.d.ts +30 -19
  287. package/dist/schema/plan.d.ts.map +1 -1
  288. package/dist/schema/plan.js +3 -1
  289. package/dist/schema/plan.js.map +1 -1
  290. package/dist/schema/review-records.d.ts +2676 -0
  291. package/dist/schema/review-records.d.ts.map +1 -0
  292. package/dist/schema/review-records.js +232 -0
  293. package/dist/schema/review-records.js.map +1 -0
  294. package/dist/schema/spec.d.ts +32 -14
  295. package/dist/schema/spec.d.ts.map +1 -1
  296. package/dist/schema/spec.js +5 -0
  297. package/dist/schema/spec.js.map +1 -1
  298. package/dist/schema/task.d.ts +187 -29
  299. package/dist/schema/task.d.ts.map +1 -1
  300. package/dist/schema/task.js +12 -2
  301. package/dist/schema/task.js.map +1 -1
  302. package/dist/schema/triage.d.ts +22 -22
  303. package/dist/sessions/cache.d.ts +119 -0
  304. package/dist/sessions/cache.d.ts.map +1 -0
  305. package/dist/sessions/cache.js +284 -0
  306. package/dist/sessions/cache.js.map +1 -0
  307. package/dist/sessions/index.d.ts +1 -0
  308. package/dist/sessions/index.d.ts.map +1 -1
  309. package/dist/sessions/index.js +2 -0
  310. package/dist/sessions/index.js.map +1 -1
  311. package/dist/sessions/legacy.d.ts +77 -0
  312. package/dist/sessions/legacy.d.ts.map +1 -0
  313. package/dist/sessions/legacy.js +146 -0
  314. package/dist/sessions/legacy.js.map +1 -0
  315. package/dist/sessions/store.d.ts +103 -73
  316. package/dist/sessions/store.d.ts.map +1 -1
  317. package/dist/sessions/store.js +335 -186
  318. package/dist/sessions/store.js.map +1 -1
  319. package/dist/sessions/types.d.ts +44 -16
  320. package/dist/sessions/types.d.ts.map +1 -1
  321. package/dist/sessions/types.js +11 -2
  322. package/dist/sessions/types.js.map +1 -1
  323. package/dist/strings/errors.d.ts +32 -0
  324. package/dist/strings/errors.d.ts.map +1 -1
  325. package/dist/strings/errors.js +17 -0
  326. package/dist/strings/errors.js.map +1 -1
  327. package/dist/strings/labels.d.ts +1 -0
  328. package/dist/strings/labels.d.ts.map +1 -1
  329. package/dist/strings/labels.js +1 -0
  330. package/dist/strings/labels.js.map +1 -1
  331. package/dist/utils/activity.d.ts +101 -0
  332. package/dist/utils/activity.d.ts.map +1 -0
  333. package/dist/utils/activity.js +408 -0
  334. package/dist/utils/activity.js.map +1 -0
  335. package/dist/utils/git.d.ts +31 -0
  336. package/dist/utils/git.d.ts.map +1 -1
  337. package/dist/utils/git.js +87 -0
  338. package/dist/utils/git.js.map +1 -1
  339. package/dist/utils/index.d.ts +2 -0
  340. package/dist/utils/index.d.ts.map +1 -1
  341. package/dist/utils/index.js +1 -0
  342. package/dist/utils/index.js.map +1 -1
  343. package/dist/web-ui/_app/immutable/assets/0.tmlwn-Ih.css +1 -0
  344. package/dist/web-ui/_app/immutable/assets/9.BwwJybWx.css +1 -0
  345. package/dist/web-ui/_app/immutable/chunks/2KqE8gtn.js +1 -0
  346. package/dist/web-ui/_app/immutable/chunks/70-t_QvE.js +1 -0
  347. package/dist/web-ui/_app/immutable/chunks/AiWQj974.js +1 -0
  348. package/dist/web-ui/_app/immutable/chunks/{CPPfDSei.js → B25nWFyA.js} +4 -4
  349. package/dist/web-ui/_app/immutable/chunks/{DBYE9jOd.js → B2bcA_Q_.js} +1 -1
  350. package/dist/web-ui/_app/immutable/chunks/B5e5HYyB.js +1 -0
  351. package/dist/web-ui/_app/immutable/chunks/B7-5z6eA.js +1 -0
  352. package/dist/web-ui/_app/immutable/chunks/B7bGmhK0.js +1 -0
  353. package/dist/web-ui/_app/immutable/chunks/{DzO4hlg9.js → B8tYZKAE.js} +1 -1
  354. package/dist/web-ui/_app/immutable/chunks/{B5LJFxqa.js → BFGAyJjD.js} +1 -1
  355. package/dist/web-ui/_app/immutable/chunks/BG0850zf.js +1 -0
  356. package/dist/web-ui/_app/immutable/chunks/{DAMmvwn4.js → BG8eSzAd.js} +1 -1
  357. package/dist/web-ui/_app/immutable/chunks/BIMxXS8I.js +1 -0
  358. package/dist/web-ui/_app/immutable/chunks/BSzL1fpU.js +1 -0
  359. package/dist/web-ui/_app/immutable/chunks/BYtjHfeq.js +1 -0
  360. package/dist/web-ui/_app/immutable/chunks/{DxCk-KHc.js → Bp5pFYXL.js} +1 -1
  361. package/dist/web-ui/_app/immutable/chunks/{B8a0xDxR.js → BsJFsuAT.js} +1 -1
  362. package/dist/web-ui/_app/immutable/chunks/BvpNHcD6.js +1 -0
  363. package/dist/web-ui/_app/immutable/chunks/BypqA25-.js +1 -0
  364. package/dist/web-ui/_app/immutable/chunks/{BVA9Exy-.js → C0w6WDm5.js} +1 -1
  365. package/dist/web-ui/_app/immutable/chunks/C5_PAZ0y.js +1 -0
  366. package/dist/web-ui/_app/immutable/chunks/CDRO15Iv.js +1 -0
  367. package/dist/web-ui/_app/immutable/chunks/CF1CoqD5.js +1 -0
  368. package/dist/web-ui/_app/immutable/chunks/CS2sa4_m.js +1 -0
  369. package/dist/web-ui/_app/immutable/chunks/{BJ0JX3ea.js → CWUQwB9H.js} +1 -1
  370. package/dist/web-ui/_app/immutable/chunks/CY5FDdSU.js +1 -0
  371. package/dist/web-ui/_app/immutable/chunks/C_7MTDoj.js +1 -0
  372. package/dist/web-ui/_app/immutable/chunks/{D3vxvonu.js → CaAJD3dl.js} +1 -1
  373. package/dist/web-ui/_app/immutable/chunks/{BP352uRn.js → ChB5iyEL.js} +1 -1
  374. package/dist/web-ui/_app/immutable/chunks/{pE6cYWlS.js → ChQD-6N8.js} +1 -1
  375. package/dist/web-ui/_app/immutable/chunks/{Eo4gF7ih.js → CqbsoCwA.js} +1 -1
  376. package/dist/web-ui/_app/immutable/chunks/DCeJW50p.js +1 -0
  377. package/dist/web-ui/_app/immutable/chunks/{Cncwi6fQ.js → DJtZNgcs.js} +1 -1
  378. package/dist/web-ui/_app/immutable/chunks/DKIeaprD.js +1 -0
  379. package/dist/web-ui/_app/immutable/chunks/DLd2uVIA.js +1 -0
  380. package/dist/web-ui/_app/immutable/chunks/{DjcCz-PU.js → DW_subyT.js} +2 -2
  381. package/dist/web-ui/_app/immutable/chunks/DbU6lVn0.js +1 -0
  382. package/dist/web-ui/_app/immutable/chunks/Dc7ZCC5m.js +1 -0
  383. package/dist/web-ui/_app/immutable/chunks/Dd5umPsk.js +2 -0
  384. package/dist/web-ui/_app/immutable/chunks/{BysXJlZb.js → Dg_zDpDS.js} +1 -1
  385. package/dist/web-ui/_app/immutable/chunks/Dgqu8Yuc.js +1 -0
  386. package/dist/web-ui/_app/immutable/chunks/DmxsPZTB.js +1 -0
  387. package/dist/web-ui/_app/immutable/chunks/DphTaFUB.js +1 -0
  388. package/dist/web-ui/_app/immutable/chunks/DqK4iHp0.js +1 -0
  389. package/dist/web-ui/_app/immutable/chunks/{D9QNBZM2.js → DqT6OH_u.js} +2 -2
  390. package/dist/web-ui/_app/immutable/chunks/Ds9I9wQb.js +1 -0
  391. package/dist/web-ui/_app/immutable/chunks/Du5ng3u4.js +1 -0
  392. package/dist/web-ui/_app/immutable/chunks/DxJw79Wi.js +1 -0
  393. package/dist/web-ui/_app/immutable/chunks/GFTX8GgV.js +1 -0
  394. package/dist/web-ui/_app/immutable/chunks/{C076q4JN.js → HNjs76Zz.js} +1 -1
  395. package/dist/web-ui/_app/immutable/chunks/HVMjDi4_.js +1 -0
  396. package/dist/web-ui/_app/immutable/chunks/{BkOJ8DkV.js → P0A_fJvS.js} +1 -1
  397. package/dist/web-ui/_app/immutable/chunks/T3vGWjIL.js +1 -0
  398. package/dist/web-ui/_app/immutable/chunks/VTmrX9Qu.js +1 -0
  399. package/dist/web-ui/_app/immutable/chunks/{k_Qegko0.js → Xvwhx_F1.js} +1 -1
  400. package/dist/web-ui/_app/immutable/chunks/Yyz1XMQA.js +1 -0
  401. package/dist/web-ui/_app/immutable/chunks/{62JVKtnb.js → dh5HeqUr.js} +1 -1
  402. package/dist/web-ui/_app/immutable/chunks/fZMteyca.js +62 -0
  403. package/dist/web-ui/_app/immutable/chunks/{D82RulSH.js → gPrj-hqC.js} +1 -1
  404. package/dist/web-ui/_app/immutable/chunks/htcWMiYN.js +1 -0
  405. package/dist/web-ui/_app/immutable/chunks/{CwELQvbx.js → oTsvd9y4.js} +1 -1
  406. package/dist/web-ui/_app/immutable/chunks/qJfLUwU4.js +1 -0
  407. package/dist/web-ui/_app/immutable/chunks/xCtiO_JE.js +1 -0
  408. package/dist/web-ui/_app/immutable/chunks/{DvA-KON-.js → y4GeEH6k.js} +1 -1
  409. package/dist/web-ui/_app/immutable/entry/app.C4h_eOn6.js +2 -0
  410. package/dist/web-ui/_app/immutable/entry/start.CQFTf9ep.js +1 -0
  411. package/dist/web-ui/_app/immutable/nodes/0.Dh1xO970.js +1 -0
  412. package/dist/web-ui/_app/immutable/nodes/1.l75D3Opx.js +1 -0
  413. package/dist/web-ui/_app/immutable/nodes/10.DBidBPc-.js +1 -0
  414. package/dist/web-ui/_app/immutable/nodes/11.Ab0gUKWe.js +1 -0
  415. package/dist/web-ui/_app/immutable/nodes/12.CMsnoxfs.js +1 -0
  416. package/dist/web-ui/_app/immutable/nodes/13.D8YKuknB.js +1 -0
  417. package/dist/web-ui/_app/immutable/nodes/14.DZ0aan7y.js +1 -0
  418. package/dist/web-ui/_app/immutable/nodes/15.CUIKreDL.js +2 -0
  419. package/dist/web-ui/_app/immutable/nodes/16.BWc8--BO.js +1 -0
  420. package/dist/web-ui/_app/immutable/nodes/2.CDUonbuh.js +1 -0
  421. package/dist/web-ui/_app/immutable/nodes/3.Ctg3M00i.js +1 -0
  422. package/dist/web-ui/_app/immutable/nodes/4.Ci-JDwbA.js +2 -0
  423. package/dist/web-ui/_app/immutable/nodes/5.CTyEDAq0.js +1 -0
  424. package/dist/web-ui/_app/immutable/nodes/6.BTZZqsAb.js +1 -0
  425. package/dist/web-ui/_app/immutable/nodes/7.BI52g_Jo.js +137 -0
  426. package/dist/web-ui/_app/immutable/nodes/8.3hZPaB9x.js +1 -0
  427. package/dist/web-ui/_app/immutable/nodes/9.DS49kvwl.js +29 -0
  428. package/dist/web-ui/_app/version.json +1 -1
  429. package/dist/web-ui/favicon-192.png +0 -0
  430. package/dist/web-ui/favicon-32.png +0 -0
  431. package/dist/web-ui/favicon.ico +0 -0
  432. package/dist/web-ui/index.html +14 -14
  433. package/package.json +12 -6
  434. package/plugin/.claude-plugin/marketplace.json +1 -1
  435. package/plugin/.claude-plugin/plugin.json +1 -1
  436. package/plugin/plugins/kspec/skills/merge/SKILL.md +127 -0
  437. package/plugin/plugins/kspec/skills/plan/SKILL.md +55 -26
  438. package/plugin/plugins/kspec/skills/review/SKILL.md +350 -133
  439. package/plugin/plugins/kspec/skills/task-work/SKILL.md +96 -106
  440. package/templates/agents-sections/04-pr-workflow.md +15 -12
  441. package/templates/agents-sections/06-ralph-loop.md +15 -10
  442. package/templates/skills/manifest.yaml +25 -7
  443. package/templates/skills/merge/SKILL.md +120 -0
  444. package/templates/skills/plan/SKILL.md +55 -26
  445. package/templates/skills/review/SKILL.md +346 -130
  446. package/templates/skills/task-work/SKILL.md +93 -103
  447. package/dist/web-ui/_app/immutable/assets/0.BJaYkGW2.css +0 -1
  448. package/dist/web-ui/_app/immutable/assets/9.SzGLxi4x.css +0 -1
  449. package/dist/web-ui/_app/immutable/chunks/-lc0BifF.js +0 -1
  450. package/dist/web-ui/_app/immutable/chunks/8RBjHMN1.js +0 -1
  451. package/dist/web-ui/_app/immutable/chunks/B5wTVqxm.js +0 -1
  452. package/dist/web-ui/_app/immutable/chunks/B6VSmczZ.js +0 -1
  453. package/dist/web-ui/_app/immutable/chunks/BEOQc37C.js +0 -1
  454. package/dist/web-ui/_app/immutable/chunks/BHtYorjv.js +0 -1
  455. package/dist/web-ui/_app/immutable/chunks/BMuCqDX8.js +0 -1
  456. package/dist/web-ui/_app/immutable/chunks/BUZujXJ2.js +0 -1
  457. package/dist/web-ui/_app/immutable/chunks/BWET-efb.js +0 -1
  458. package/dist/web-ui/_app/immutable/chunks/BXkNecpt.js +0 -1
  459. package/dist/web-ui/_app/immutable/chunks/BYzrIfX8.js +0 -1
  460. package/dist/web-ui/_app/immutable/chunks/BpuwufMc.js +0 -1
  461. package/dist/web-ui/_app/immutable/chunks/BwMO4RrG.js +0 -1
  462. package/dist/web-ui/_app/immutable/chunks/C33JaVbg.js +0 -1
  463. package/dist/web-ui/_app/immutable/chunks/CGtqifKp.js +0 -1
  464. package/dist/web-ui/_app/immutable/chunks/CHDZZ7OG.js +0 -1
  465. package/dist/web-ui/_app/immutable/chunks/CUir3f4J.js +0 -60
  466. package/dist/web-ui/_app/immutable/chunks/CrCIbn0C.js +0 -1
  467. package/dist/web-ui/_app/immutable/chunks/D6TVmR9T.js +0 -1
  468. package/dist/web-ui/_app/immutable/chunks/D7LTux4W.js +0 -1
  469. package/dist/web-ui/_app/immutable/chunks/DAh4Wfku.js +0 -1
  470. package/dist/web-ui/_app/immutable/chunks/DAx07bEQ.js +0 -1
  471. package/dist/web-ui/_app/immutable/chunks/DOno4cA2.js +0 -1
  472. package/dist/web-ui/_app/immutable/chunks/DQA8NZIH.js +0 -2
  473. package/dist/web-ui/_app/immutable/chunks/DRfPm2bo.js +0 -1
  474. package/dist/web-ui/_app/immutable/chunks/DhQhksaB.js +0 -1
  475. package/dist/web-ui/_app/immutable/chunks/DjG7s6hm.js +0 -1
  476. package/dist/web-ui/_app/immutable/chunks/DkltRNvh.js +0 -1
  477. package/dist/web-ui/_app/immutable/chunks/DlaTnPKL.js +0 -1
  478. package/dist/web-ui/_app/immutable/chunks/ExCq5swK.js +0 -1
  479. package/dist/web-ui/_app/immutable/chunks/T3zZGv51.js +0 -1
  480. package/dist/web-ui/_app/immutable/chunks/XZumBYeP.js +0 -1
  481. package/dist/web-ui/_app/immutable/chunks/_ySfNjkF.js +0 -1
  482. package/dist/web-ui/_app/immutable/chunks/iEtR5cV6.js +0 -1
  483. package/dist/web-ui/_app/immutable/entry/app.Cgu6uKeS.js +0 -2
  484. package/dist/web-ui/_app/immutable/entry/start.9XifnLoB.js +0 -1
  485. package/dist/web-ui/_app/immutable/nodes/0.DISwcKSK.js +0 -1
  486. package/dist/web-ui/_app/immutable/nodes/1.Cx2Ufqp1.js +0 -1
  487. package/dist/web-ui/_app/immutable/nodes/10.C3z8ijXL.js +0 -1
  488. package/dist/web-ui/_app/immutable/nodes/11.DZdIjZmM.js +0 -1
  489. package/dist/web-ui/_app/immutable/nodes/12.FsIGfAOa.js +0 -1
  490. package/dist/web-ui/_app/immutable/nodes/13.DZoFwagf.js +0 -1
  491. package/dist/web-ui/_app/immutable/nodes/14.DaIzDKbQ.js +0 -1
  492. package/dist/web-ui/_app/immutable/nodes/15.BYyt4XWF.js +0 -2
  493. package/dist/web-ui/_app/immutable/nodes/16.CQkSqpOe.js +0 -1
  494. package/dist/web-ui/_app/immutable/nodes/2.Bkf_j2UJ.js +0 -1
  495. package/dist/web-ui/_app/immutable/nodes/3.kaMCurJG.js +0 -1
  496. package/dist/web-ui/_app/immutable/nodes/4.BSsFPTHG.js +0 -2
  497. package/dist/web-ui/_app/immutable/nodes/5.CpPlcCEZ.js +0 -1
  498. package/dist/web-ui/_app/immutable/nodes/6.BN4FqQmY.js +0 -1
  499. package/dist/web-ui/_app/immutable/nodes/7.9kBYIZik.js +0 -1
  500. package/dist/web-ui/_app/immutable/nodes/8.BuijtZ6B.js +0 -1
  501. package/dist/web-ui/_app/immutable/nodes/9.C-Weba8R.js +0 -1
@@ -0,0 +1,2643 @@
1
+ import { z } from "zod";
2
+ export declare const DispatchWorkspaceBranchOwnershipSchema: z.ZodEnum<["dispatcher-managed", "adopted"]>;
3
+ export declare const DispatchWorkspaceBranchProvenanceSchema: z.ZodObject<{
4
+ ownership: z.ZodEnum<["dispatcher-managed", "adopted"]>;
5
+ source: z.ZodString;
6
+ remote_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ adopted_from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
+ adopted_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
9
+ rehydrated: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ ownership: "dispatcher-managed" | "adopted";
12
+ source: string;
13
+ remote_ref?: string | null | undefined;
14
+ adopted_from?: string | null | undefined;
15
+ adopted_at?: string | null | undefined;
16
+ rehydrated?: boolean | null | undefined;
17
+ }, {
18
+ ownership: "dispatcher-managed" | "adopted";
19
+ source: string;
20
+ remote_ref?: string | null | undefined;
21
+ adopted_from?: string | null | undefined;
22
+ adopted_at?: string | null | undefined;
23
+ rehydrated?: boolean | null | undefined;
24
+ }>;
25
+ export declare const DispatchWorkspaceLifecycleStateSchema: z.ZodEnum<["provisioning", "ready", "active", "stale", "integrating", "closing", "cleanup_blocked", "closed"]>;
26
+ export declare const DispatchWorkspaceHealthStatusSchema: z.ZodEnum<["healthy", "stale", "invalid"]>;
27
+ export declare const DispatchWorkspaceBootstrapStatusSchema: z.ZodEnum<["not_run", "succeeded", "failed"]>;
28
+ export declare const DispatchWorkspaceIntegrationStatusSchema: z.ZodEnum<["pending", "in_progress", "merged", "abandoned", "reset"]>;
29
+ export declare const DispatchWorkspaceCleanupStatusSchema: z.ZodEnum<["not_scheduled", "scheduled", "blocked", "completed"]>;
30
+ export declare const DispatchWorkspaceRoleSchema: z.ZodEnum<["worker", "reviewer"]>;
31
+ export declare const DispatchWorkspaceBranchModeSchema: z.ZodEnum<["branch", "detached"]>;
32
+ export declare const DispatchWorkspacePublicationModeSchema: z.ZodEnum<["pull_request", "manual_merge"]>;
33
+ export declare const DispatchWorkspaceIntegrationOutcomeSchema: z.ZodEnum<["pending", "pull_request", "manual_merge", "merged", "abandoned", "reset"]>;
34
+ export declare const DispatchWorkspaceIssueSchema: z.ZodObject<{
35
+ code: z.ZodString;
36
+ message: z.ZodString;
37
+ suggestion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ code: string;
40
+ message: string;
41
+ suggestion?: string | null | undefined;
42
+ }, {
43
+ code: string;
44
+ message: string;
45
+ suggestion?: string | null | undefined;
46
+ }>;
47
+ export declare const DispatchWorkspaceWorktreeSchema: z.ZodObject<{
48
+ path: z.ZodString;
49
+ branch_mode: z.ZodEnum<["branch", "detached"]>;
50
+ branch_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
51
+ head: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
+ last_seen_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ path: string;
55
+ branch_mode: "branch" | "detached";
56
+ branch_ref?: string | null | undefined;
57
+ head?: string | null | undefined;
58
+ last_seen_at?: string | null | undefined;
59
+ }, {
60
+ path: string;
61
+ branch_mode: "branch" | "detached";
62
+ branch_ref?: string | null | undefined;
63
+ head?: string | null | undefined;
64
+ last_seen_at?: string | null | undefined;
65
+ }>;
66
+ export declare const DispatchWorkspaceBootstrapStepResultSchema: z.ZodObject<{
67
+ source: z.ZodEnum<["dispatch", "agent"]>;
68
+ name: z.ZodString;
69
+ run: z.ZodString;
70
+ idempotent: z.ZodBoolean;
71
+ allowTrackedChanges: z.ZodBoolean;
72
+ reviewerRerunAllowed: z.ZodBoolean;
73
+ status: z.ZodEnum<["succeeded", "failed", "skipped"]>;
74
+ role: z.ZodEnum<["worker", "reviewer"]>;
75
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
76
+ }, "strip", z.ZodTypeAny, {
77
+ name: string;
78
+ status: "succeeded" | "failed" | "skipped";
79
+ source: "dispatch" | "agent";
80
+ run: string;
81
+ idempotent: boolean;
82
+ allowTrackedChanges: boolean;
83
+ reviewerRerunAllowed: boolean;
84
+ role: "worker" | "reviewer";
85
+ output?: string | null | undefined;
86
+ }, {
87
+ name: string;
88
+ status: "succeeded" | "failed" | "skipped";
89
+ source: "dispatch" | "agent";
90
+ run: string;
91
+ idempotent: boolean;
92
+ allowTrackedChanges: boolean;
93
+ reviewerRerunAllowed: boolean;
94
+ role: "worker" | "reviewer";
95
+ output?: string | null | undefined;
96
+ }>;
97
+ export declare const DispatchWorkspaceBootstrapRoleStateSchema: z.ZodObject<{
98
+ status: z.ZodDefault<z.ZodEnum<["not_run", "succeeded", "failed"]>>;
99
+ configHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
+ canonicalBranchHead: z.ZodOptional<z.ZodNullable<z.ZodString>>;
101
+ lastRunAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
102
+ invalidationReasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
103
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
104
+ source: z.ZodEnum<["dispatch", "agent"]>;
105
+ name: z.ZodString;
106
+ run: z.ZodString;
107
+ idempotent: z.ZodBoolean;
108
+ allowTrackedChanges: z.ZodBoolean;
109
+ reviewerRerunAllowed: z.ZodBoolean;
110
+ status: z.ZodEnum<["succeeded", "failed", "skipped"]>;
111
+ role: z.ZodEnum<["worker", "reviewer"]>;
112
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
113
+ }, "strip", z.ZodTypeAny, {
114
+ name: string;
115
+ status: "succeeded" | "failed" | "skipped";
116
+ source: "dispatch" | "agent";
117
+ run: string;
118
+ idempotent: boolean;
119
+ allowTrackedChanges: boolean;
120
+ reviewerRerunAllowed: boolean;
121
+ role: "worker" | "reviewer";
122
+ output?: string | null | undefined;
123
+ }, {
124
+ name: string;
125
+ status: "succeeded" | "failed" | "skipped";
126
+ source: "dispatch" | "agent";
127
+ run: string;
128
+ idempotent: boolean;
129
+ allowTrackedChanges: boolean;
130
+ reviewerRerunAllowed: boolean;
131
+ role: "worker" | "reviewer";
132
+ output?: string | null | undefined;
133
+ }>, "many">>;
134
+ failureMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ status: "not_run" | "succeeded" | "failed";
137
+ invalidationReasons: string[];
138
+ steps: {
139
+ name: string;
140
+ status: "succeeded" | "failed" | "skipped";
141
+ source: "dispatch" | "agent";
142
+ run: string;
143
+ idempotent: boolean;
144
+ allowTrackedChanges: boolean;
145
+ reviewerRerunAllowed: boolean;
146
+ role: "worker" | "reviewer";
147
+ output?: string | null | undefined;
148
+ }[];
149
+ configHash?: string | null | undefined;
150
+ canonicalBranchHead?: string | null | undefined;
151
+ lastRunAt?: string | null | undefined;
152
+ failureMessage?: string | null | undefined;
153
+ }, {
154
+ status?: "not_run" | "succeeded" | "failed" | undefined;
155
+ configHash?: string | null | undefined;
156
+ canonicalBranchHead?: string | null | undefined;
157
+ lastRunAt?: string | null | undefined;
158
+ invalidationReasons?: string[] | undefined;
159
+ steps?: {
160
+ name: string;
161
+ status: "succeeded" | "failed" | "skipped";
162
+ source: "dispatch" | "agent";
163
+ run: string;
164
+ idempotent: boolean;
165
+ allowTrackedChanges: boolean;
166
+ reviewerRerunAllowed: boolean;
167
+ role: "worker" | "reviewer";
168
+ output?: string | null | undefined;
169
+ }[] | undefined;
170
+ failureMessage?: string | null | undefined;
171
+ }>;
172
+ export declare const DispatchWorkspaceBootstrapStateSchema: z.ZodObject<{
173
+ status: z.ZodDefault<z.ZodEnum<["not_run", "succeeded", "failed"]>>;
174
+ configHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
175
+ canonicalBranchHead: z.ZodOptional<z.ZodNullable<z.ZodString>>;
176
+ lastRunAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
177
+ invalidationReasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
178
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
179
+ source: z.ZodEnum<["dispatch", "agent"]>;
180
+ name: z.ZodString;
181
+ run: z.ZodString;
182
+ idempotent: z.ZodBoolean;
183
+ allowTrackedChanges: z.ZodBoolean;
184
+ reviewerRerunAllowed: z.ZodBoolean;
185
+ status: z.ZodEnum<["succeeded", "failed", "skipped"]>;
186
+ role: z.ZodEnum<["worker", "reviewer"]>;
187
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
188
+ }, "strip", z.ZodTypeAny, {
189
+ name: string;
190
+ status: "succeeded" | "failed" | "skipped";
191
+ source: "dispatch" | "agent";
192
+ run: string;
193
+ idempotent: boolean;
194
+ allowTrackedChanges: boolean;
195
+ reviewerRerunAllowed: boolean;
196
+ role: "worker" | "reviewer";
197
+ output?: string | null | undefined;
198
+ }, {
199
+ name: string;
200
+ status: "succeeded" | "failed" | "skipped";
201
+ source: "dispatch" | "agent";
202
+ run: string;
203
+ idempotent: boolean;
204
+ allowTrackedChanges: boolean;
205
+ reviewerRerunAllowed: boolean;
206
+ role: "worker" | "reviewer";
207
+ output?: string | null | undefined;
208
+ }>, "many">>;
209
+ failureMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
210
+ } & {
211
+ lastRole: z.ZodOptional<z.ZodNullable<z.ZodEnum<["worker", "reviewer"]>>>;
212
+ roleStates: z.ZodDefault<z.ZodObject<{
213
+ worker: z.ZodObject<{
214
+ status: z.ZodDefault<z.ZodEnum<["not_run", "succeeded", "failed"]>>;
215
+ configHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
216
+ canonicalBranchHead: z.ZodOptional<z.ZodNullable<z.ZodString>>;
217
+ lastRunAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
218
+ invalidationReasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
219
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
220
+ source: z.ZodEnum<["dispatch", "agent"]>;
221
+ name: z.ZodString;
222
+ run: z.ZodString;
223
+ idempotent: z.ZodBoolean;
224
+ allowTrackedChanges: z.ZodBoolean;
225
+ reviewerRerunAllowed: z.ZodBoolean;
226
+ status: z.ZodEnum<["succeeded", "failed", "skipped"]>;
227
+ role: z.ZodEnum<["worker", "reviewer"]>;
228
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
229
+ }, "strip", z.ZodTypeAny, {
230
+ name: string;
231
+ status: "succeeded" | "failed" | "skipped";
232
+ source: "dispatch" | "agent";
233
+ run: string;
234
+ idempotent: boolean;
235
+ allowTrackedChanges: boolean;
236
+ reviewerRerunAllowed: boolean;
237
+ role: "worker" | "reviewer";
238
+ output?: string | null | undefined;
239
+ }, {
240
+ name: string;
241
+ status: "succeeded" | "failed" | "skipped";
242
+ source: "dispatch" | "agent";
243
+ run: string;
244
+ idempotent: boolean;
245
+ allowTrackedChanges: boolean;
246
+ reviewerRerunAllowed: boolean;
247
+ role: "worker" | "reviewer";
248
+ output?: string | null | undefined;
249
+ }>, "many">>;
250
+ failureMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
251
+ }, "strip", z.ZodTypeAny, {
252
+ status: "not_run" | "succeeded" | "failed";
253
+ invalidationReasons: string[];
254
+ steps: {
255
+ name: string;
256
+ status: "succeeded" | "failed" | "skipped";
257
+ source: "dispatch" | "agent";
258
+ run: string;
259
+ idempotent: boolean;
260
+ allowTrackedChanges: boolean;
261
+ reviewerRerunAllowed: boolean;
262
+ role: "worker" | "reviewer";
263
+ output?: string | null | undefined;
264
+ }[];
265
+ configHash?: string | null | undefined;
266
+ canonicalBranchHead?: string | null | undefined;
267
+ lastRunAt?: string | null | undefined;
268
+ failureMessage?: string | null | undefined;
269
+ }, {
270
+ status?: "not_run" | "succeeded" | "failed" | undefined;
271
+ configHash?: string | null | undefined;
272
+ canonicalBranchHead?: string | null | undefined;
273
+ lastRunAt?: string | null | undefined;
274
+ invalidationReasons?: string[] | undefined;
275
+ steps?: {
276
+ name: string;
277
+ status: "succeeded" | "failed" | "skipped";
278
+ source: "dispatch" | "agent";
279
+ run: string;
280
+ idempotent: boolean;
281
+ allowTrackedChanges: boolean;
282
+ reviewerRerunAllowed: boolean;
283
+ role: "worker" | "reviewer";
284
+ output?: string | null | undefined;
285
+ }[] | undefined;
286
+ failureMessage?: string | null | undefined;
287
+ }>;
288
+ reviewer: z.ZodObject<{
289
+ status: z.ZodDefault<z.ZodEnum<["not_run", "succeeded", "failed"]>>;
290
+ configHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
291
+ canonicalBranchHead: z.ZodOptional<z.ZodNullable<z.ZodString>>;
292
+ lastRunAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
293
+ invalidationReasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
294
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
295
+ source: z.ZodEnum<["dispatch", "agent"]>;
296
+ name: z.ZodString;
297
+ run: z.ZodString;
298
+ idempotent: z.ZodBoolean;
299
+ allowTrackedChanges: z.ZodBoolean;
300
+ reviewerRerunAllowed: z.ZodBoolean;
301
+ status: z.ZodEnum<["succeeded", "failed", "skipped"]>;
302
+ role: z.ZodEnum<["worker", "reviewer"]>;
303
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
304
+ }, "strip", z.ZodTypeAny, {
305
+ name: string;
306
+ status: "succeeded" | "failed" | "skipped";
307
+ source: "dispatch" | "agent";
308
+ run: string;
309
+ idempotent: boolean;
310
+ allowTrackedChanges: boolean;
311
+ reviewerRerunAllowed: boolean;
312
+ role: "worker" | "reviewer";
313
+ output?: string | null | undefined;
314
+ }, {
315
+ name: string;
316
+ status: "succeeded" | "failed" | "skipped";
317
+ source: "dispatch" | "agent";
318
+ run: string;
319
+ idempotent: boolean;
320
+ allowTrackedChanges: boolean;
321
+ reviewerRerunAllowed: boolean;
322
+ role: "worker" | "reviewer";
323
+ output?: string | null | undefined;
324
+ }>, "many">>;
325
+ failureMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
326
+ }, "strip", z.ZodTypeAny, {
327
+ status: "not_run" | "succeeded" | "failed";
328
+ invalidationReasons: string[];
329
+ steps: {
330
+ name: string;
331
+ status: "succeeded" | "failed" | "skipped";
332
+ source: "dispatch" | "agent";
333
+ run: string;
334
+ idempotent: boolean;
335
+ allowTrackedChanges: boolean;
336
+ reviewerRerunAllowed: boolean;
337
+ role: "worker" | "reviewer";
338
+ output?: string | null | undefined;
339
+ }[];
340
+ configHash?: string | null | undefined;
341
+ canonicalBranchHead?: string | null | undefined;
342
+ lastRunAt?: string | null | undefined;
343
+ failureMessage?: string | null | undefined;
344
+ }, {
345
+ status?: "not_run" | "succeeded" | "failed" | undefined;
346
+ configHash?: string | null | undefined;
347
+ canonicalBranchHead?: string | null | undefined;
348
+ lastRunAt?: string | null | undefined;
349
+ invalidationReasons?: string[] | undefined;
350
+ steps?: {
351
+ name: string;
352
+ status: "succeeded" | "failed" | "skipped";
353
+ source: "dispatch" | "agent";
354
+ run: string;
355
+ idempotent: boolean;
356
+ allowTrackedChanges: boolean;
357
+ reviewerRerunAllowed: boolean;
358
+ role: "worker" | "reviewer";
359
+ output?: string | null | undefined;
360
+ }[] | undefined;
361
+ failureMessage?: string | null | undefined;
362
+ }>;
363
+ }, "strip", z.ZodTypeAny, {
364
+ worker: {
365
+ status: "not_run" | "succeeded" | "failed";
366
+ invalidationReasons: string[];
367
+ steps: {
368
+ name: string;
369
+ status: "succeeded" | "failed" | "skipped";
370
+ source: "dispatch" | "agent";
371
+ run: string;
372
+ idempotent: boolean;
373
+ allowTrackedChanges: boolean;
374
+ reviewerRerunAllowed: boolean;
375
+ role: "worker" | "reviewer";
376
+ output?: string | null | undefined;
377
+ }[];
378
+ configHash?: string | null | undefined;
379
+ canonicalBranchHead?: string | null | undefined;
380
+ lastRunAt?: string | null | undefined;
381
+ failureMessage?: string | null | undefined;
382
+ };
383
+ reviewer: {
384
+ status: "not_run" | "succeeded" | "failed";
385
+ invalidationReasons: string[];
386
+ steps: {
387
+ name: string;
388
+ status: "succeeded" | "failed" | "skipped";
389
+ source: "dispatch" | "agent";
390
+ run: string;
391
+ idempotent: boolean;
392
+ allowTrackedChanges: boolean;
393
+ reviewerRerunAllowed: boolean;
394
+ role: "worker" | "reviewer";
395
+ output?: string | null | undefined;
396
+ }[];
397
+ configHash?: string | null | undefined;
398
+ canonicalBranchHead?: string | null | undefined;
399
+ lastRunAt?: string | null | undefined;
400
+ failureMessage?: string | null | undefined;
401
+ };
402
+ }, {
403
+ worker: {
404
+ status?: "not_run" | "succeeded" | "failed" | undefined;
405
+ configHash?: string | null | undefined;
406
+ canonicalBranchHead?: string | null | undefined;
407
+ lastRunAt?: string | null | undefined;
408
+ invalidationReasons?: string[] | undefined;
409
+ steps?: {
410
+ name: string;
411
+ status: "succeeded" | "failed" | "skipped";
412
+ source: "dispatch" | "agent";
413
+ run: string;
414
+ idempotent: boolean;
415
+ allowTrackedChanges: boolean;
416
+ reviewerRerunAllowed: boolean;
417
+ role: "worker" | "reviewer";
418
+ output?: string | null | undefined;
419
+ }[] | undefined;
420
+ failureMessage?: string | null | undefined;
421
+ };
422
+ reviewer: {
423
+ status?: "not_run" | "succeeded" | "failed" | undefined;
424
+ configHash?: string | null | undefined;
425
+ canonicalBranchHead?: string | null | undefined;
426
+ lastRunAt?: string | null | undefined;
427
+ invalidationReasons?: string[] | undefined;
428
+ steps?: {
429
+ name: string;
430
+ status: "succeeded" | "failed" | "skipped";
431
+ source: "dispatch" | "agent";
432
+ run: string;
433
+ idempotent: boolean;
434
+ allowTrackedChanges: boolean;
435
+ reviewerRerunAllowed: boolean;
436
+ role: "worker" | "reviewer";
437
+ output?: string | null | undefined;
438
+ }[] | undefined;
439
+ failureMessage?: string | null | undefined;
440
+ };
441
+ }>>;
442
+ }, "strip", z.ZodTypeAny, {
443
+ status: "not_run" | "succeeded" | "failed";
444
+ invalidationReasons: string[];
445
+ steps: {
446
+ name: string;
447
+ status: "succeeded" | "failed" | "skipped";
448
+ source: "dispatch" | "agent";
449
+ run: string;
450
+ idempotent: boolean;
451
+ allowTrackedChanges: boolean;
452
+ reviewerRerunAllowed: boolean;
453
+ role: "worker" | "reviewer";
454
+ output?: string | null | undefined;
455
+ }[];
456
+ roleStates: {
457
+ worker: {
458
+ status: "not_run" | "succeeded" | "failed";
459
+ invalidationReasons: string[];
460
+ steps: {
461
+ name: string;
462
+ status: "succeeded" | "failed" | "skipped";
463
+ source: "dispatch" | "agent";
464
+ run: string;
465
+ idempotent: boolean;
466
+ allowTrackedChanges: boolean;
467
+ reviewerRerunAllowed: boolean;
468
+ role: "worker" | "reviewer";
469
+ output?: string | null | undefined;
470
+ }[];
471
+ configHash?: string | null | undefined;
472
+ canonicalBranchHead?: string | null | undefined;
473
+ lastRunAt?: string | null | undefined;
474
+ failureMessage?: string | null | undefined;
475
+ };
476
+ reviewer: {
477
+ status: "not_run" | "succeeded" | "failed";
478
+ invalidationReasons: string[];
479
+ steps: {
480
+ name: string;
481
+ status: "succeeded" | "failed" | "skipped";
482
+ source: "dispatch" | "agent";
483
+ run: string;
484
+ idempotent: boolean;
485
+ allowTrackedChanges: boolean;
486
+ reviewerRerunAllowed: boolean;
487
+ role: "worker" | "reviewer";
488
+ output?: string | null | undefined;
489
+ }[];
490
+ configHash?: string | null | undefined;
491
+ canonicalBranchHead?: string | null | undefined;
492
+ lastRunAt?: string | null | undefined;
493
+ failureMessage?: string | null | undefined;
494
+ };
495
+ };
496
+ configHash?: string | null | undefined;
497
+ canonicalBranchHead?: string | null | undefined;
498
+ lastRunAt?: string | null | undefined;
499
+ failureMessage?: string | null | undefined;
500
+ lastRole?: "worker" | "reviewer" | null | undefined;
501
+ }, {
502
+ status?: "not_run" | "succeeded" | "failed" | undefined;
503
+ configHash?: string | null | undefined;
504
+ canonicalBranchHead?: string | null | undefined;
505
+ lastRunAt?: string | null | undefined;
506
+ invalidationReasons?: string[] | undefined;
507
+ steps?: {
508
+ name: string;
509
+ status: "succeeded" | "failed" | "skipped";
510
+ source: "dispatch" | "agent";
511
+ run: string;
512
+ idempotent: boolean;
513
+ allowTrackedChanges: boolean;
514
+ reviewerRerunAllowed: boolean;
515
+ role: "worker" | "reviewer";
516
+ output?: string | null | undefined;
517
+ }[] | undefined;
518
+ failureMessage?: string | null | undefined;
519
+ lastRole?: "worker" | "reviewer" | null | undefined;
520
+ roleStates?: {
521
+ worker: {
522
+ status?: "not_run" | "succeeded" | "failed" | undefined;
523
+ configHash?: string | null | undefined;
524
+ canonicalBranchHead?: string | null | undefined;
525
+ lastRunAt?: string | null | undefined;
526
+ invalidationReasons?: string[] | undefined;
527
+ steps?: {
528
+ name: string;
529
+ status: "succeeded" | "failed" | "skipped";
530
+ source: "dispatch" | "agent";
531
+ run: string;
532
+ idempotent: boolean;
533
+ allowTrackedChanges: boolean;
534
+ reviewerRerunAllowed: boolean;
535
+ role: "worker" | "reviewer";
536
+ output?: string | null | undefined;
537
+ }[] | undefined;
538
+ failureMessage?: string | null | undefined;
539
+ };
540
+ reviewer: {
541
+ status?: "not_run" | "succeeded" | "failed" | undefined;
542
+ configHash?: string | null | undefined;
543
+ canonicalBranchHead?: string | null | undefined;
544
+ lastRunAt?: string | null | undefined;
545
+ invalidationReasons?: string[] | undefined;
546
+ steps?: {
547
+ name: string;
548
+ status: "succeeded" | "failed" | "skipped";
549
+ source: "dispatch" | "agent";
550
+ run: string;
551
+ idempotent: boolean;
552
+ allowTrackedChanges: boolean;
553
+ reviewerRerunAllowed: boolean;
554
+ role: "worker" | "reviewer";
555
+ output?: string | null | undefined;
556
+ }[] | undefined;
557
+ failureMessage?: string | null | undefined;
558
+ };
559
+ } | undefined;
560
+ }>;
561
+ export declare const DispatchWorkspaceIntegrationStateSchema: z.ZodObject<{
562
+ status: z.ZodDefault<z.ZodEnum<["pending", "in_progress", "merged", "abandoned", "reset"]>>;
563
+ target_branch: z.ZodString;
564
+ target_commit: z.ZodString;
565
+ publication_mode: z.ZodEnum<["pull_request", "manual_merge"]>;
566
+ outcome: z.ZodEnum<["pending", "pull_request", "manual_merge", "merged", "abandoned", "reset"]>;
567
+ detail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
568
+ updated_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
569
+ }, "strip", z.ZodTypeAny, {
570
+ status: "in_progress" | "pending" | "merged" | "abandoned" | "reset";
571
+ target_branch: string;
572
+ target_commit: string;
573
+ publication_mode: "pull_request" | "manual_merge";
574
+ outcome: "pending" | "merged" | "abandoned" | "reset" | "pull_request" | "manual_merge";
575
+ updated_at: string;
576
+ detail?: string | null | undefined;
577
+ }, {
578
+ target_branch: string;
579
+ target_commit: string;
580
+ publication_mode: "pull_request" | "manual_merge";
581
+ outcome: "pending" | "merged" | "abandoned" | "reset" | "pull_request" | "manual_merge";
582
+ updated_at: string;
583
+ status?: "in_progress" | "pending" | "merged" | "abandoned" | "reset" | undefined;
584
+ detail?: string | null | undefined;
585
+ }>;
586
+ export declare const DispatchWorkspaceHealthStateSchema: z.ZodObject<{
587
+ status: z.ZodEnum<["healthy", "stale", "invalid"]>;
588
+ summary: z.ZodString;
589
+ issues: z.ZodDefault<z.ZodArray<z.ZodObject<{
590
+ code: z.ZodString;
591
+ message: z.ZodString;
592
+ suggestion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
593
+ }, "strip", z.ZodTypeAny, {
594
+ code: string;
595
+ message: string;
596
+ suggestion?: string | null | undefined;
597
+ }, {
598
+ code: string;
599
+ message: string;
600
+ suggestion?: string | null | undefined;
601
+ }>, "many">>;
602
+ updated_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
603
+ }, "strip", z.ZodTypeAny, {
604
+ status: "stale" | "healthy" | "invalid";
605
+ issues: {
606
+ code: string;
607
+ message: string;
608
+ suggestion?: string | null | undefined;
609
+ }[];
610
+ updated_at: string;
611
+ summary: string;
612
+ }, {
613
+ status: "stale" | "healthy" | "invalid";
614
+ updated_at: string;
615
+ summary: string;
616
+ issues?: {
617
+ code: string;
618
+ message: string;
619
+ suggestion?: string | null | undefined;
620
+ }[] | undefined;
621
+ }>;
622
+ export declare const DispatchWorkspaceCleanupStateSchema: z.ZodObject<{
623
+ status: z.ZodDefault<z.ZodEnum<["not_scheduled", "scheduled", "blocked", "completed"]>>;
624
+ eligible: z.ZodDefault<z.ZodBoolean>;
625
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
626
+ detail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
627
+ updated_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
628
+ }, "strip", z.ZodTypeAny, {
629
+ status: "blocked" | "completed" | "not_scheduled" | "scheduled";
630
+ updated_at: string;
631
+ eligible: boolean;
632
+ detail?: string | null | undefined;
633
+ reason?: string | null | undefined;
634
+ }, {
635
+ updated_at: string;
636
+ status?: "blocked" | "completed" | "not_scheduled" | "scheduled" | undefined;
637
+ detail?: string | null | undefined;
638
+ eligible?: boolean | undefined;
639
+ reason?: string | null | undefined;
640
+ }>;
641
+ export declare const DispatchWorkspaceTimestampsSchema: z.ZodObject<{
642
+ created_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
643
+ updated_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
644
+ last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
645
+ last_active_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
646
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
647
+ }, "strip", z.ZodTypeAny, {
648
+ updated_at: string;
649
+ created_at: string;
650
+ last_reconciled_at?: string | null | undefined;
651
+ last_active_at?: string | null | undefined;
652
+ closed_at?: string | null | undefined;
653
+ }, {
654
+ updated_at: string;
655
+ created_at: string;
656
+ last_reconciled_at?: string | null | undefined;
657
+ last_active_at?: string | null | undefined;
658
+ closed_at?: string | null | undefined;
659
+ }>;
660
+ export declare const DispatchWorkspaceRecordSchema: z.ZodObject<{
661
+ workspace_id: z.ZodString;
662
+ task_ref: z.ZodString;
663
+ task_slug: z.ZodString;
664
+ worktree_root: z.ZodString;
665
+ resolved_base_branch: z.ZodString;
666
+ base_branch_point: z.ZodString;
667
+ canonical_branch: z.ZodString;
668
+ canonical_branch_head: z.ZodString;
669
+ branch_provenance: z.ZodDefault<z.ZodOptional<z.ZodObject<{
670
+ ownership: z.ZodEnum<["dispatcher-managed", "adopted"]>;
671
+ source: z.ZodString;
672
+ remote_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
673
+ adopted_from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
674
+ adopted_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
675
+ rehydrated: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
676
+ }, "strip", z.ZodTypeAny, {
677
+ ownership: "dispatcher-managed" | "adopted";
678
+ source: string;
679
+ remote_ref?: string | null | undefined;
680
+ adopted_from?: string | null | undefined;
681
+ adopted_at?: string | null | undefined;
682
+ rehydrated?: boolean | null | undefined;
683
+ }, {
684
+ ownership: "dispatcher-managed" | "adopted";
685
+ source: string;
686
+ remote_ref?: string | null | undefined;
687
+ adopted_from?: string | null | undefined;
688
+ adopted_at?: string | null | undefined;
689
+ rehydrated?: boolean | null | undefined;
690
+ }>>>;
691
+ lifecycle_state: z.ZodEnum<["provisioning", "ready", "active", "stale", "integrating", "closing", "cleanup_blocked", "closed"]>;
692
+ active_role: z.ZodOptional<z.ZodNullable<z.ZodEnum<["worker", "reviewer"]>>>;
693
+ worktrees: z.ZodObject<{
694
+ worker: z.ZodObject<{
695
+ path: z.ZodString;
696
+ branch_mode: z.ZodEnum<["branch", "detached"]>;
697
+ branch_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
698
+ head: z.ZodOptional<z.ZodNullable<z.ZodString>>;
699
+ last_seen_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
700
+ }, "strip", z.ZodTypeAny, {
701
+ path: string;
702
+ branch_mode: "branch" | "detached";
703
+ branch_ref?: string | null | undefined;
704
+ head?: string | null | undefined;
705
+ last_seen_at?: string | null | undefined;
706
+ }, {
707
+ path: string;
708
+ branch_mode: "branch" | "detached";
709
+ branch_ref?: string | null | undefined;
710
+ head?: string | null | undefined;
711
+ last_seen_at?: string | null | undefined;
712
+ }>;
713
+ reviewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
714
+ path: z.ZodString;
715
+ branch_mode: z.ZodEnum<["branch", "detached"]>;
716
+ branch_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
717
+ head: z.ZodOptional<z.ZodNullable<z.ZodString>>;
718
+ last_seen_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
719
+ }, "strip", z.ZodTypeAny, {
720
+ path: string;
721
+ branch_mode: "branch" | "detached";
722
+ branch_ref?: string | null | undefined;
723
+ head?: string | null | undefined;
724
+ last_seen_at?: string | null | undefined;
725
+ }, {
726
+ path: string;
727
+ branch_mode: "branch" | "detached";
728
+ branch_ref?: string | null | undefined;
729
+ head?: string | null | undefined;
730
+ last_seen_at?: string | null | undefined;
731
+ }>>>;
732
+ }, "strip", z.ZodTypeAny, {
733
+ worker: {
734
+ path: string;
735
+ branch_mode: "branch" | "detached";
736
+ branch_ref?: string | null | undefined;
737
+ head?: string | null | undefined;
738
+ last_seen_at?: string | null | undefined;
739
+ };
740
+ reviewer?: {
741
+ path: string;
742
+ branch_mode: "branch" | "detached";
743
+ branch_ref?: string | null | undefined;
744
+ head?: string | null | undefined;
745
+ last_seen_at?: string | null | undefined;
746
+ } | null | undefined;
747
+ }, {
748
+ worker: {
749
+ path: string;
750
+ branch_mode: "branch" | "detached";
751
+ branch_ref?: string | null | undefined;
752
+ head?: string | null | undefined;
753
+ last_seen_at?: string | null | undefined;
754
+ };
755
+ reviewer?: {
756
+ path: string;
757
+ branch_mode: "branch" | "detached";
758
+ branch_ref?: string | null | undefined;
759
+ head?: string | null | undefined;
760
+ last_seen_at?: string | null | undefined;
761
+ } | null | undefined;
762
+ }>;
763
+ bootstrap: z.ZodObject<{
764
+ status: z.ZodDefault<z.ZodEnum<["not_run", "succeeded", "failed"]>>;
765
+ configHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
766
+ canonicalBranchHead: z.ZodOptional<z.ZodNullable<z.ZodString>>;
767
+ lastRunAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
768
+ invalidationReasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
769
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
770
+ source: z.ZodEnum<["dispatch", "agent"]>;
771
+ name: z.ZodString;
772
+ run: z.ZodString;
773
+ idempotent: z.ZodBoolean;
774
+ allowTrackedChanges: z.ZodBoolean;
775
+ reviewerRerunAllowed: z.ZodBoolean;
776
+ status: z.ZodEnum<["succeeded", "failed", "skipped"]>;
777
+ role: z.ZodEnum<["worker", "reviewer"]>;
778
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
779
+ }, "strip", z.ZodTypeAny, {
780
+ name: string;
781
+ status: "succeeded" | "failed" | "skipped";
782
+ source: "dispatch" | "agent";
783
+ run: string;
784
+ idempotent: boolean;
785
+ allowTrackedChanges: boolean;
786
+ reviewerRerunAllowed: boolean;
787
+ role: "worker" | "reviewer";
788
+ output?: string | null | undefined;
789
+ }, {
790
+ name: string;
791
+ status: "succeeded" | "failed" | "skipped";
792
+ source: "dispatch" | "agent";
793
+ run: string;
794
+ idempotent: boolean;
795
+ allowTrackedChanges: boolean;
796
+ reviewerRerunAllowed: boolean;
797
+ role: "worker" | "reviewer";
798
+ output?: string | null | undefined;
799
+ }>, "many">>;
800
+ failureMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
801
+ } & {
802
+ lastRole: z.ZodOptional<z.ZodNullable<z.ZodEnum<["worker", "reviewer"]>>>;
803
+ roleStates: z.ZodDefault<z.ZodObject<{
804
+ worker: z.ZodObject<{
805
+ status: z.ZodDefault<z.ZodEnum<["not_run", "succeeded", "failed"]>>;
806
+ configHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
807
+ canonicalBranchHead: z.ZodOptional<z.ZodNullable<z.ZodString>>;
808
+ lastRunAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
809
+ invalidationReasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
810
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
811
+ source: z.ZodEnum<["dispatch", "agent"]>;
812
+ name: z.ZodString;
813
+ run: z.ZodString;
814
+ idempotent: z.ZodBoolean;
815
+ allowTrackedChanges: z.ZodBoolean;
816
+ reviewerRerunAllowed: z.ZodBoolean;
817
+ status: z.ZodEnum<["succeeded", "failed", "skipped"]>;
818
+ role: z.ZodEnum<["worker", "reviewer"]>;
819
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
820
+ }, "strip", z.ZodTypeAny, {
821
+ name: string;
822
+ status: "succeeded" | "failed" | "skipped";
823
+ source: "dispatch" | "agent";
824
+ run: string;
825
+ idempotent: boolean;
826
+ allowTrackedChanges: boolean;
827
+ reviewerRerunAllowed: boolean;
828
+ role: "worker" | "reviewer";
829
+ output?: string | null | undefined;
830
+ }, {
831
+ name: string;
832
+ status: "succeeded" | "failed" | "skipped";
833
+ source: "dispatch" | "agent";
834
+ run: string;
835
+ idempotent: boolean;
836
+ allowTrackedChanges: boolean;
837
+ reviewerRerunAllowed: boolean;
838
+ role: "worker" | "reviewer";
839
+ output?: string | null | undefined;
840
+ }>, "many">>;
841
+ failureMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
842
+ }, "strip", z.ZodTypeAny, {
843
+ status: "not_run" | "succeeded" | "failed";
844
+ invalidationReasons: string[];
845
+ steps: {
846
+ name: string;
847
+ status: "succeeded" | "failed" | "skipped";
848
+ source: "dispatch" | "agent";
849
+ run: string;
850
+ idempotent: boolean;
851
+ allowTrackedChanges: boolean;
852
+ reviewerRerunAllowed: boolean;
853
+ role: "worker" | "reviewer";
854
+ output?: string | null | undefined;
855
+ }[];
856
+ configHash?: string | null | undefined;
857
+ canonicalBranchHead?: string | null | undefined;
858
+ lastRunAt?: string | null | undefined;
859
+ failureMessage?: string | null | undefined;
860
+ }, {
861
+ status?: "not_run" | "succeeded" | "failed" | undefined;
862
+ configHash?: string | null | undefined;
863
+ canonicalBranchHead?: string | null | undefined;
864
+ lastRunAt?: string | null | undefined;
865
+ invalidationReasons?: string[] | undefined;
866
+ steps?: {
867
+ name: string;
868
+ status: "succeeded" | "failed" | "skipped";
869
+ source: "dispatch" | "agent";
870
+ run: string;
871
+ idempotent: boolean;
872
+ allowTrackedChanges: boolean;
873
+ reviewerRerunAllowed: boolean;
874
+ role: "worker" | "reviewer";
875
+ output?: string | null | undefined;
876
+ }[] | undefined;
877
+ failureMessage?: string | null | undefined;
878
+ }>;
879
+ reviewer: z.ZodObject<{
880
+ status: z.ZodDefault<z.ZodEnum<["not_run", "succeeded", "failed"]>>;
881
+ configHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
882
+ canonicalBranchHead: z.ZodOptional<z.ZodNullable<z.ZodString>>;
883
+ lastRunAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
884
+ invalidationReasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
885
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
886
+ source: z.ZodEnum<["dispatch", "agent"]>;
887
+ name: z.ZodString;
888
+ run: z.ZodString;
889
+ idempotent: z.ZodBoolean;
890
+ allowTrackedChanges: z.ZodBoolean;
891
+ reviewerRerunAllowed: z.ZodBoolean;
892
+ status: z.ZodEnum<["succeeded", "failed", "skipped"]>;
893
+ role: z.ZodEnum<["worker", "reviewer"]>;
894
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
895
+ }, "strip", z.ZodTypeAny, {
896
+ name: string;
897
+ status: "succeeded" | "failed" | "skipped";
898
+ source: "dispatch" | "agent";
899
+ run: string;
900
+ idempotent: boolean;
901
+ allowTrackedChanges: boolean;
902
+ reviewerRerunAllowed: boolean;
903
+ role: "worker" | "reviewer";
904
+ output?: string | null | undefined;
905
+ }, {
906
+ name: string;
907
+ status: "succeeded" | "failed" | "skipped";
908
+ source: "dispatch" | "agent";
909
+ run: string;
910
+ idempotent: boolean;
911
+ allowTrackedChanges: boolean;
912
+ reviewerRerunAllowed: boolean;
913
+ role: "worker" | "reviewer";
914
+ output?: string | null | undefined;
915
+ }>, "many">>;
916
+ failureMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
917
+ }, "strip", z.ZodTypeAny, {
918
+ status: "not_run" | "succeeded" | "failed";
919
+ invalidationReasons: string[];
920
+ steps: {
921
+ name: string;
922
+ status: "succeeded" | "failed" | "skipped";
923
+ source: "dispatch" | "agent";
924
+ run: string;
925
+ idempotent: boolean;
926
+ allowTrackedChanges: boolean;
927
+ reviewerRerunAllowed: boolean;
928
+ role: "worker" | "reviewer";
929
+ output?: string | null | undefined;
930
+ }[];
931
+ configHash?: string | null | undefined;
932
+ canonicalBranchHead?: string | null | undefined;
933
+ lastRunAt?: string | null | undefined;
934
+ failureMessage?: string | null | undefined;
935
+ }, {
936
+ status?: "not_run" | "succeeded" | "failed" | undefined;
937
+ configHash?: string | null | undefined;
938
+ canonicalBranchHead?: string | null | undefined;
939
+ lastRunAt?: string | null | undefined;
940
+ invalidationReasons?: string[] | undefined;
941
+ steps?: {
942
+ name: string;
943
+ status: "succeeded" | "failed" | "skipped";
944
+ source: "dispatch" | "agent";
945
+ run: string;
946
+ idempotent: boolean;
947
+ allowTrackedChanges: boolean;
948
+ reviewerRerunAllowed: boolean;
949
+ role: "worker" | "reviewer";
950
+ output?: string | null | undefined;
951
+ }[] | undefined;
952
+ failureMessage?: string | null | undefined;
953
+ }>;
954
+ }, "strip", z.ZodTypeAny, {
955
+ worker: {
956
+ status: "not_run" | "succeeded" | "failed";
957
+ invalidationReasons: string[];
958
+ steps: {
959
+ name: string;
960
+ status: "succeeded" | "failed" | "skipped";
961
+ source: "dispatch" | "agent";
962
+ run: string;
963
+ idempotent: boolean;
964
+ allowTrackedChanges: boolean;
965
+ reviewerRerunAllowed: boolean;
966
+ role: "worker" | "reviewer";
967
+ output?: string | null | undefined;
968
+ }[];
969
+ configHash?: string | null | undefined;
970
+ canonicalBranchHead?: string | null | undefined;
971
+ lastRunAt?: string | null | undefined;
972
+ failureMessage?: string | null | undefined;
973
+ };
974
+ reviewer: {
975
+ status: "not_run" | "succeeded" | "failed";
976
+ invalidationReasons: string[];
977
+ steps: {
978
+ name: string;
979
+ status: "succeeded" | "failed" | "skipped";
980
+ source: "dispatch" | "agent";
981
+ run: string;
982
+ idempotent: boolean;
983
+ allowTrackedChanges: boolean;
984
+ reviewerRerunAllowed: boolean;
985
+ role: "worker" | "reviewer";
986
+ output?: string | null | undefined;
987
+ }[];
988
+ configHash?: string | null | undefined;
989
+ canonicalBranchHead?: string | null | undefined;
990
+ lastRunAt?: string | null | undefined;
991
+ failureMessage?: string | null | undefined;
992
+ };
993
+ }, {
994
+ worker: {
995
+ status?: "not_run" | "succeeded" | "failed" | undefined;
996
+ configHash?: string | null | undefined;
997
+ canonicalBranchHead?: string | null | undefined;
998
+ lastRunAt?: string | null | undefined;
999
+ invalidationReasons?: string[] | undefined;
1000
+ steps?: {
1001
+ name: string;
1002
+ status: "succeeded" | "failed" | "skipped";
1003
+ source: "dispatch" | "agent";
1004
+ run: string;
1005
+ idempotent: boolean;
1006
+ allowTrackedChanges: boolean;
1007
+ reviewerRerunAllowed: boolean;
1008
+ role: "worker" | "reviewer";
1009
+ output?: string | null | undefined;
1010
+ }[] | undefined;
1011
+ failureMessage?: string | null | undefined;
1012
+ };
1013
+ reviewer: {
1014
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1015
+ configHash?: string | null | undefined;
1016
+ canonicalBranchHead?: string | null | undefined;
1017
+ lastRunAt?: string | null | undefined;
1018
+ invalidationReasons?: string[] | undefined;
1019
+ steps?: {
1020
+ name: string;
1021
+ status: "succeeded" | "failed" | "skipped";
1022
+ source: "dispatch" | "agent";
1023
+ run: string;
1024
+ idempotent: boolean;
1025
+ allowTrackedChanges: boolean;
1026
+ reviewerRerunAllowed: boolean;
1027
+ role: "worker" | "reviewer";
1028
+ output?: string | null | undefined;
1029
+ }[] | undefined;
1030
+ failureMessage?: string | null | undefined;
1031
+ };
1032
+ }>>;
1033
+ }, "strip", z.ZodTypeAny, {
1034
+ status: "not_run" | "succeeded" | "failed";
1035
+ invalidationReasons: string[];
1036
+ steps: {
1037
+ name: string;
1038
+ status: "succeeded" | "failed" | "skipped";
1039
+ source: "dispatch" | "agent";
1040
+ run: string;
1041
+ idempotent: boolean;
1042
+ allowTrackedChanges: boolean;
1043
+ reviewerRerunAllowed: boolean;
1044
+ role: "worker" | "reviewer";
1045
+ output?: string | null | undefined;
1046
+ }[];
1047
+ roleStates: {
1048
+ worker: {
1049
+ status: "not_run" | "succeeded" | "failed";
1050
+ invalidationReasons: string[];
1051
+ steps: {
1052
+ name: string;
1053
+ status: "succeeded" | "failed" | "skipped";
1054
+ source: "dispatch" | "agent";
1055
+ run: string;
1056
+ idempotent: boolean;
1057
+ allowTrackedChanges: boolean;
1058
+ reviewerRerunAllowed: boolean;
1059
+ role: "worker" | "reviewer";
1060
+ output?: string | null | undefined;
1061
+ }[];
1062
+ configHash?: string | null | undefined;
1063
+ canonicalBranchHead?: string | null | undefined;
1064
+ lastRunAt?: string | null | undefined;
1065
+ failureMessage?: string | null | undefined;
1066
+ };
1067
+ reviewer: {
1068
+ status: "not_run" | "succeeded" | "failed";
1069
+ invalidationReasons: string[];
1070
+ steps: {
1071
+ name: string;
1072
+ status: "succeeded" | "failed" | "skipped";
1073
+ source: "dispatch" | "agent";
1074
+ run: string;
1075
+ idempotent: boolean;
1076
+ allowTrackedChanges: boolean;
1077
+ reviewerRerunAllowed: boolean;
1078
+ role: "worker" | "reviewer";
1079
+ output?: string | null | undefined;
1080
+ }[];
1081
+ configHash?: string | null | undefined;
1082
+ canonicalBranchHead?: string | null | undefined;
1083
+ lastRunAt?: string | null | undefined;
1084
+ failureMessage?: string | null | undefined;
1085
+ };
1086
+ };
1087
+ configHash?: string | null | undefined;
1088
+ canonicalBranchHead?: string | null | undefined;
1089
+ lastRunAt?: string | null | undefined;
1090
+ failureMessage?: string | null | undefined;
1091
+ lastRole?: "worker" | "reviewer" | null | undefined;
1092
+ }, {
1093
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1094
+ configHash?: string | null | undefined;
1095
+ canonicalBranchHead?: string | null | undefined;
1096
+ lastRunAt?: string | null | undefined;
1097
+ invalidationReasons?: string[] | undefined;
1098
+ steps?: {
1099
+ name: string;
1100
+ status: "succeeded" | "failed" | "skipped";
1101
+ source: "dispatch" | "agent";
1102
+ run: string;
1103
+ idempotent: boolean;
1104
+ allowTrackedChanges: boolean;
1105
+ reviewerRerunAllowed: boolean;
1106
+ role: "worker" | "reviewer";
1107
+ output?: string | null | undefined;
1108
+ }[] | undefined;
1109
+ failureMessage?: string | null | undefined;
1110
+ lastRole?: "worker" | "reviewer" | null | undefined;
1111
+ roleStates?: {
1112
+ worker: {
1113
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1114
+ configHash?: string | null | undefined;
1115
+ canonicalBranchHead?: string | null | undefined;
1116
+ lastRunAt?: string | null | undefined;
1117
+ invalidationReasons?: string[] | undefined;
1118
+ steps?: {
1119
+ name: string;
1120
+ status: "succeeded" | "failed" | "skipped";
1121
+ source: "dispatch" | "agent";
1122
+ run: string;
1123
+ idempotent: boolean;
1124
+ allowTrackedChanges: boolean;
1125
+ reviewerRerunAllowed: boolean;
1126
+ role: "worker" | "reviewer";
1127
+ output?: string | null | undefined;
1128
+ }[] | undefined;
1129
+ failureMessage?: string | null | undefined;
1130
+ };
1131
+ reviewer: {
1132
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1133
+ configHash?: string | null | undefined;
1134
+ canonicalBranchHead?: string | null | undefined;
1135
+ lastRunAt?: string | null | undefined;
1136
+ invalidationReasons?: string[] | undefined;
1137
+ steps?: {
1138
+ name: string;
1139
+ status: "succeeded" | "failed" | "skipped";
1140
+ source: "dispatch" | "agent";
1141
+ run: string;
1142
+ idempotent: boolean;
1143
+ allowTrackedChanges: boolean;
1144
+ reviewerRerunAllowed: boolean;
1145
+ role: "worker" | "reviewer";
1146
+ output?: string | null | undefined;
1147
+ }[] | undefined;
1148
+ failureMessage?: string | null | undefined;
1149
+ };
1150
+ } | undefined;
1151
+ }>;
1152
+ integration: z.ZodObject<{
1153
+ status: z.ZodDefault<z.ZodEnum<["pending", "in_progress", "merged", "abandoned", "reset"]>>;
1154
+ target_branch: z.ZodString;
1155
+ target_commit: z.ZodString;
1156
+ publication_mode: z.ZodEnum<["pull_request", "manual_merge"]>;
1157
+ outcome: z.ZodEnum<["pending", "pull_request", "manual_merge", "merged", "abandoned", "reset"]>;
1158
+ detail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1159
+ updated_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
1160
+ }, "strip", z.ZodTypeAny, {
1161
+ status: "in_progress" | "pending" | "merged" | "abandoned" | "reset";
1162
+ target_branch: string;
1163
+ target_commit: string;
1164
+ publication_mode: "pull_request" | "manual_merge";
1165
+ outcome: "pending" | "merged" | "abandoned" | "reset" | "pull_request" | "manual_merge";
1166
+ updated_at: string;
1167
+ detail?: string | null | undefined;
1168
+ }, {
1169
+ target_branch: string;
1170
+ target_commit: string;
1171
+ publication_mode: "pull_request" | "manual_merge";
1172
+ outcome: "pending" | "merged" | "abandoned" | "reset" | "pull_request" | "manual_merge";
1173
+ updated_at: string;
1174
+ status?: "in_progress" | "pending" | "merged" | "abandoned" | "reset" | undefined;
1175
+ detail?: string | null | undefined;
1176
+ }>;
1177
+ health: z.ZodObject<{
1178
+ status: z.ZodEnum<["healthy", "stale", "invalid"]>;
1179
+ summary: z.ZodString;
1180
+ issues: z.ZodDefault<z.ZodArray<z.ZodObject<{
1181
+ code: z.ZodString;
1182
+ message: z.ZodString;
1183
+ suggestion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1184
+ }, "strip", z.ZodTypeAny, {
1185
+ code: string;
1186
+ message: string;
1187
+ suggestion?: string | null | undefined;
1188
+ }, {
1189
+ code: string;
1190
+ message: string;
1191
+ suggestion?: string | null | undefined;
1192
+ }>, "many">>;
1193
+ updated_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
1194
+ }, "strip", z.ZodTypeAny, {
1195
+ status: "stale" | "healthy" | "invalid";
1196
+ issues: {
1197
+ code: string;
1198
+ message: string;
1199
+ suggestion?: string | null | undefined;
1200
+ }[];
1201
+ updated_at: string;
1202
+ summary: string;
1203
+ }, {
1204
+ status: "stale" | "healthy" | "invalid";
1205
+ updated_at: string;
1206
+ summary: string;
1207
+ issues?: {
1208
+ code: string;
1209
+ message: string;
1210
+ suggestion?: string | null | undefined;
1211
+ }[] | undefined;
1212
+ }>;
1213
+ cleanup: z.ZodObject<{
1214
+ status: z.ZodDefault<z.ZodEnum<["not_scheduled", "scheduled", "blocked", "completed"]>>;
1215
+ eligible: z.ZodDefault<z.ZodBoolean>;
1216
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1217
+ detail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1218
+ updated_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
1219
+ }, "strip", z.ZodTypeAny, {
1220
+ status: "blocked" | "completed" | "not_scheduled" | "scheduled";
1221
+ updated_at: string;
1222
+ eligible: boolean;
1223
+ detail?: string | null | undefined;
1224
+ reason?: string | null | undefined;
1225
+ }, {
1226
+ updated_at: string;
1227
+ status?: "blocked" | "completed" | "not_scheduled" | "scheduled" | undefined;
1228
+ detail?: string | null | undefined;
1229
+ eligible?: boolean | undefined;
1230
+ reason?: string | null | undefined;
1231
+ }>;
1232
+ timestamps: z.ZodObject<{
1233
+ created_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
1234
+ updated_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
1235
+ last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
1236
+ last_active_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
1237
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
1238
+ }, "strip", z.ZodTypeAny, {
1239
+ updated_at: string;
1240
+ created_at: string;
1241
+ last_reconciled_at?: string | null | undefined;
1242
+ last_active_at?: string | null | undefined;
1243
+ closed_at?: string | null | undefined;
1244
+ }, {
1245
+ updated_at: string;
1246
+ created_at: string;
1247
+ last_reconciled_at?: string | null | undefined;
1248
+ last_active_at?: string | null | undefined;
1249
+ closed_at?: string | null | undefined;
1250
+ }>;
1251
+ }, "strip", z.ZodTypeAny, {
1252
+ workspace_id: string;
1253
+ task_ref: string;
1254
+ task_slug: string;
1255
+ worktree_root: string;
1256
+ resolved_base_branch: string;
1257
+ base_branch_point: string;
1258
+ canonical_branch: string;
1259
+ canonical_branch_head: string;
1260
+ branch_provenance: {
1261
+ ownership: "dispatcher-managed" | "adopted";
1262
+ source: string;
1263
+ remote_ref?: string | null | undefined;
1264
+ adopted_from?: string | null | undefined;
1265
+ adopted_at?: string | null | undefined;
1266
+ rehydrated?: boolean | null | undefined;
1267
+ };
1268
+ lifecycle_state: "provisioning" | "ready" | "active" | "stale" | "integrating" | "closing" | "cleanup_blocked" | "closed";
1269
+ worktrees: {
1270
+ worker: {
1271
+ path: string;
1272
+ branch_mode: "branch" | "detached";
1273
+ branch_ref?: string | null | undefined;
1274
+ head?: string | null | undefined;
1275
+ last_seen_at?: string | null | undefined;
1276
+ };
1277
+ reviewer?: {
1278
+ path: string;
1279
+ branch_mode: "branch" | "detached";
1280
+ branch_ref?: string | null | undefined;
1281
+ head?: string | null | undefined;
1282
+ last_seen_at?: string | null | undefined;
1283
+ } | null | undefined;
1284
+ };
1285
+ bootstrap: {
1286
+ status: "not_run" | "succeeded" | "failed";
1287
+ invalidationReasons: string[];
1288
+ steps: {
1289
+ name: string;
1290
+ status: "succeeded" | "failed" | "skipped";
1291
+ source: "dispatch" | "agent";
1292
+ run: string;
1293
+ idempotent: boolean;
1294
+ allowTrackedChanges: boolean;
1295
+ reviewerRerunAllowed: boolean;
1296
+ role: "worker" | "reviewer";
1297
+ output?: string | null | undefined;
1298
+ }[];
1299
+ roleStates: {
1300
+ worker: {
1301
+ status: "not_run" | "succeeded" | "failed";
1302
+ invalidationReasons: string[];
1303
+ steps: {
1304
+ name: string;
1305
+ status: "succeeded" | "failed" | "skipped";
1306
+ source: "dispatch" | "agent";
1307
+ run: string;
1308
+ idempotent: boolean;
1309
+ allowTrackedChanges: boolean;
1310
+ reviewerRerunAllowed: boolean;
1311
+ role: "worker" | "reviewer";
1312
+ output?: string | null | undefined;
1313
+ }[];
1314
+ configHash?: string | null | undefined;
1315
+ canonicalBranchHead?: string | null | undefined;
1316
+ lastRunAt?: string | null | undefined;
1317
+ failureMessage?: string | null | undefined;
1318
+ };
1319
+ reviewer: {
1320
+ status: "not_run" | "succeeded" | "failed";
1321
+ invalidationReasons: string[];
1322
+ steps: {
1323
+ name: string;
1324
+ status: "succeeded" | "failed" | "skipped";
1325
+ source: "dispatch" | "agent";
1326
+ run: string;
1327
+ idempotent: boolean;
1328
+ allowTrackedChanges: boolean;
1329
+ reviewerRerunAllowed: boolean;
1330
+ role: "worker" | "reviewer";
1331
+ output?: string | null | undefined;
1332
+ }[];
1333
+ configHash?: string | null | undefined;
1334
+ canonicalBranchHead?: string | null | undefined;
1335
+ lastRunAt?: string | null | undefined;
1336
+ failureMessage?: string | null | undefined;
1337
+ };
1338
+ };
1339
+ configHash?: string | null | undefined;
1340
+ canonicalBranchHead?: string | null | undefined;
1341
+ lastRunAt?: string | null | undefined;
1342
+ failureMessage?: string | null | undefined;
1343
+ lastRole?: "worker" | "reviewer" | null | undefined;
1344
+ };
1345
+ integration: {
1346
+ status: "in_progress" | "pending" | "merged" | "abandoned" | "reset";
1347
+ target_branch: string;
1348
+ target_commit: string;
1349
+ publication_mode: "pull_request" | "manual_merge";
1350
+ outcome: "pending" | "merged" | "abandoned" | "reset" | "pull_request" | "manual_merge";
1351
+ updated_at: string;
1352
+ detail?: string | null | undefined;
1353
+ };
1354
+ health: {
1355
+ status: "stale" | "healthy" | "invalid";
1356
+ issues: {
1357
+ code: string;
1358
+ message: string;
1359
+ suggestion?: string | null | undefined;
1360
+ }[];
1361
+ updated_at: string;
1362
+ summary: string;
1363
+ };
1364
+ cleanup: {
1365
+ status: "blocked" | "completed" | "not_scheduled" | "scheduled";
1366
+ updated_at: string;
1367
+ eligible: boolean;
1368
+ detail?: string | null | undefined;
1369
+ reason?: string | null | undefined;
1370
+ };
1371
+ timestamps: {
1372
+ updated_at: string;
1373
+ created_at: string;
1374
+ last_reconciled_at?: string | null | undefined;
1375
+ last_active_at?: string | null | undefined;
1376
+ closed_at?: string | null | undefined;
1377
+ };
1378
+ active_role?: "worker" | "reviewer" | null | undefined;
1379
+ }, {
1380
+ workspace_id: string;
1381
+ task_ref: string;
1382
+ task_slug: string;
1383
+ worktree_root: string;
1384
+ resolved_base_branch: string;
1385
+ base_branch_point: string;
1386
+ canonical_branch: string;
1387
+ canonical_branch_head: string;
1388
+ lifecycle_state: "provisioning" | "ready" | "active" | "stale" | "integrating" | "closing" | "cleanup_blocked" | "closed";
1389
+ worktrees: {
1390
+ worker: {
1391
+ path: string;
1392
+ branch_mode: "branch" | "detached";
1393
+ branch_ref?: string | null | undefined;
1394
+ head?: string | null | undefined;
1395
+ last_seen_at?: string | null | undefined;
1396
+ };
1397
+ reviewer?: {
1398
+ path: string;
1399
+ branch_mode: "branch" | "detached";
1400
+ branch_ref?: string | null | undefined;
1401
+ head?: string | null | undefined;
1402
+ last_seen_at?: string | null | undefined;
1403
+ } | null | undefined;
1404
+ };
1405
+ bootstrap: {
1406
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1407
+ configHash?: string | null | undefined;
1408
+ canonicalBranchHead?: string | null | undefined;
1409
+ lastRunAt?: string | null | undefined;
1410
+ invalidationReasons?: string[] | undefined;
1411
+ steps?: {
1412
+ name: string;
1413
+ status: "succeeded" | "failed" | "skipped";
1414
+ source: "dispatch" | "agent";
1415
+ run: string;
1416
+ idempotent: boolean;
1417
+ allowTrackedChanges: boolean;
1418
+ reviewerRerunAllowed: boolean;
1419
+ role: "worker" | "reviewer";
1420
+ output?: string | null | undefined;
1421
+ }[] | undefined;
1422
+ failureMessage?: string | null | undefined;
1423
+ lastRole?: "worker" | "reviewer" | null | undefined;
1424
+ roleStates?: {
1425
+ worker: {
1426
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1427
+ configHash?: string | null | undefined;
1428
+ canonicalBranchHead?: string | null | undefined;
1429
+ lastRunAt?: string | null | undefined;
1430
+ invalidationReasons?: string[] | undefined;
1431
+ steps?: {
1432
+ name: string;
1433
+ status: "succeeded" | "failed" | "skipped";
1434
+ source: "dispatch" | "agent";
1435
+ run: string;
1436
+ idempotent: boolean;
1437
+ allowTrackedChanges: boolean;
1438
+ reviewerRerunAllowed: boolean;
1439
+ role: "worker" | "reviewer";
1440
+ output?: string | null | undefined;
1441
+ }[] | undefined;
1442
+ failureMessage?: string | null | undefined;
1443
+ };
1444
+ reviewer: {
1445
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1446
+ configHash?: string | null | undefined;
1447
+ canonicalBranchHead?: string | null | undefined;
1448
+ lastRunAt?: string | null | undefined;
1449
+ invalidationReasons?: string[] | undefined;
1450
+ steps?: {
1451
+ name: string;
1452
+ status: "succeeded" | "failed" | "skipped";
1453
+ source: "dispatch" | "agent";
1454
+ run: string;
1455
+ idempotent: boolean;
1456
+ allowTrackedChanges: boolean;
1457
+ reviewerRerunAllowed: boolean;
1458
+ role: "worker" | "reviewer";
1459
+ output?: string | null | undefined;
1460
+ }[] | undefined;
1461
+ failureMessage?: string | null | undefined;
1462
+ };
1463
+ } | undefined;
1464
+ };
1465
+ integration: {
1466
+ target_branch: string;
1467
+ target_commit: string;
1468
+ publication_mode: "pull_request" | "manual_merge";
1469
+ outcome: "pending" | "merged" | "abandoned" | "reset" | "pull_request" | "manual_merge";
1470
+ updated_at: string;
1471
+ status?: "in_progress" | "pending" | "merged" | "abandoned" | "reset" | undefined;
1472
+ detail?: string | null | undefined;
1473
+ };
1474
+ health: {
1475
+ status: "stale" | "healthy" | "invalid";
1476
+ updated_at: string;
1477
+ summary: string;
1478
+ issues?: {
1479
+ code: string;
1480
+ message: string;
1481
+ suggestion?: string | null | undefined;
1482
+ }[] | undefined;
1483
+ };
1484
+ cleanup: {
1485
+ updated_at: string;
1486
+ status?: "blocked" | "completed" | "not_scheduled" | "scheduled" | undefined;
1487
+ detail?: string | null | undefined;
1488
+ eligible?: boolean | undefined;
1489
+ reason?: string | null | undefined;
1490
+ };
1491
+ timestamps: {
1492
+ updated_at: string;
1493
+ created_at: string;
1494
+ last_reconciled_at?: string | null | undefined;
1495
+ last_active_at?: string | null | undefined;
1496
+ closed_at?: string | null | undefined;
1497
+ };
1498
+ branch_provenance?: {
1499
+ ownership: "dispatcher-managed" | "adopted";
1500
+ source: string;
1501
+ remote_ref?: string | null | undefined;
1502
+ adopted_from?: string | null | undefined;
1503
+ adopted_at?: string | null | undefined;
1504
+ rehydrated?: boolean | null | undefined;
1505
+ } | undefined;
1506
+ active_role?: "worker" | "reviewer" | null | undefined;
1507
+ }>;
1508
+ export declare const DispatchWorkspaceRegistryFileSchema: z.ZodObject<{
1509
+ kynetic_dispatch_workspaces: z.ZodDefault<z.ZodString>;
1510
+ workspaces: z.ZodDefault<z.ZodArray<z.ZodObject<{
1511
+ workspace_id: z.ZodString;
1512
+ task_ref: z.ZodString;
1513
+ task_slug: z.ZodString;
1514
+ worktree_root: z.ZodString;
1515
+ resolved_base_branch: z.ZodString;
1516
+ base_branch_point: z.ZodString;
1517
+ canonical_branch: z.ZodString;
1518
+ canonical_branch_head: z.ZodString;
1519
+ branch_provenance: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1520
+ ownership: z.ZodEnum<["dispatcher-managed", "adopted"]>;
1521
+ source: z.ZodString;
1522
+ remote_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1523
+ adopted_from: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1524
+ adopted_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
1525
+ rehydrated: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
1526
+ }, "strip", z.ZodTypeAny, {
1527
+ ownership: "dispatcher-managed" | "adopted";
1528
+ source: string;
1529
+ remote_ref?: string | null | undefined;
1530
+ adopted_from?: string | null | undefined;
1531
+ adopted_at?: string | null | undefined;
1532
+ rehydrated?: boolean | null | undefined;
1533
+ }, {
1534
+ ownership: "dispatcher-managed" | "adopted";
1535
+ source: string;
1536
+ remote_ref?: string | null | undefined;
1537
+ adopted_from?: string | null | undefined;
1538
+ adopted_at?: string | null | undefined;
1539
+ rehydrated?: boolean | null | undefined;
1540
+ }>>>;
1541
+ lifecycle_state: z.ZodEnum<["provisioning", "ready", "active", "stale", "integrating", "closing", "cleanup_blocked", "closed"]>;
1542
+ active_role: z.ZodOptional<z.ZodNullable<z.ZodEnum<["worker", "reviewer"]>>>;
1543
+ worktrees: z.ZodObject<{
1544
+ worker: z.ZodObject<{
1545
+ path: z.ZodString;
1546
+ branch_mode: z.ZodEnum<["branch", "detached"]>;
1547
+ branch_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1548
+ head: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1549
+ last_seen_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
1550
+ }, "strip", z.ZodTypeAny, {
1551
+ path: string;
1552
+ branch_mode: "branch" | "detached";
1553
+ branch_ref?: string | null | undefined;
1554
+ head?: string | null | undefined;
1555
+ last_seen_at?: string | null | undefined;
1556
+ }, {
1557
+ path: string;
1558
+ branch_mode: "branch" | "detached";
1559
+ branch_ref?: string | null | undefined;
1560
+ head?: string | null | undefined;
1561
+ last_seen_at?: string | null | undefined;
1562
+ }>;
1563
+ reviewer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1564
+ path: z.ZodString;
1565
+ branch_mode: z.ZodEnum<["branch", "detached"]>;
1566
+ branch_ref: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1567
+ head: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1568
+ last_seen_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
1569
+ }, "strip", z.ZodTypeAny, {
1570
+ path: string;
1571
+ branch_mode: "branch" | "detached";
1572
+ branch_ref?: string | null | undefined;
1573
+ head?: string | null | undefined;
1574
+ last_seen_at?: string | null | undefined;
1575
+ }, {
1576
+ path: string;
1577
+ branch_mode: "branch" | "detached";
1578
+ branch_ref?: string | null | undefined;
1579
+ head?: string | null | undefined;
1580
+ last_seen_at?: string | null | undefined;
1581
+ }>>>;
1582
+ }, "strip", z.ZodTypeAny, {
1583
+ worker: {
1584
+ path: string;
1585
+ branch_mode: "branch" | "detached";
1586
+ branch_ref?: string | null | undefined;
1587
+ head?: string | null | undefined;
1588
+ last_seen_at?: string | null | undefined;
1589
+ };
1590
+ reviewer?: {
1591
+ path: string;
1592
+ branch_mode: "branch" | "detached";
1593
+ branch_ref?: string | null | undefined;
1594
+ head?: string | null | undefined;
1595
+ last_seen_at?: string | null | undefined;
1596
+ } | null | undefined;
1597
+ }, {
1598
+ worker: {
1599
+ path: string;
1600
+ branch_mode: "branch" | "detached";
1601
+ branch_ref?: string | null | undefined;
1602
+ head?: string | null | undefined;
1603
+ last_seen_at?: string | null | undefined;
1604
+ };
1605
+ reviewer?: {
1606
+ path: string;
1607
+ branch_mode: "branch" | "detached";
1608
+ branch_ref?: string | null | undefined;
1609
+ head?: string | null | undefined;
1610
+ last_seen_at?: string | null | undefined;
1611
+ } | null | undefined;
1612
+ }>;
1613
+ bootstrap: z.ZodObject<{
1614
+ status: z.ZodDefault<z.ZodEnum<["not_run", "succeeded", "failed"]>>;
1615
+ configHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1616
+ canonicalBranchHead: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1617
+ lastRunAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
1618
+ invalidationReasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1619
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
1620
+ source: z.ZodEnum<["dispatch", "agent"]>;
1621
+ name: z.ZodString;
1622
+ run: z.ZodString;
1623
+ idempotent: z.ZodBoolean;
1624
+ allowTrackedChanges: z.ZodBoolean;
1625
+ reviewerRerunAllowed: z.ZodBoolean;
1626
+ status: z.ZodEnum<["succeeded", "failed", "skipped"]>;
1627
+ role: z.ZodEnum<["worker", "reviewer"]>;
1628
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1629
+ }, "strip", z.ZodTypeAny, {
1630
+ name: string;
1631
+ status: "succeeded" | "failed" | "skipped";
1632
+ source: "dispatch" | "agent";
1633
+ run: string;
1634
+ idempotent: boolean;
1635
+ allowTrackedChanges: boolean;
1636
+ reviewerRerunAllowed: boolean;
1637
+ role: "worker" | "reviewer";
1638
+ output?: string | null | undefined;
1639
+ }, {
1640
+ name: string;
1641
+ status: "succeeded" | "failed" | "skipped";
1642
+ source: "dispatch" | "agent";
1643
+ run: string;
1644
+ idempotent: boolean;
1645
+ allowTrackedChanges: boolean;
1646
+ reviewerRerunAllowed: boolean;
1647
+ role: "worker" | "reviewer";
1648
+ output?: string | null | undefined;
1649
+ }>, "many">>;
1650
+ failureMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1651
+ } & {
1652
+ lastRole: z.ZodOptional<z.ZodNullable<z.ZodEnum<["worker", "reviewer"]>>>;
1653
+ roleStates: z.ZodDefault<z.ZodObject<{
1654
+ worker: z.ZodObject<{
1655
+ status: z.ZodDefault<z.ZodEnum<["not_run", "succeeded", "failed"]>>;
1656
+ configHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1657
+ canonicalBranchHead: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1658
+ lastRunAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
1659
+ invalidationReasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1660
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
1661
+ source: z.ZodEnum<["dispatch", "agent"]>;
1662
+ name: z.ZodString;
1663
+ run: z.ZodString;
1664
+ idempotent: z.ZodBoolean;
1665
+ allowTrackedChanges: z.ZodBoolean;
1666
+ reviewerRerunAllowed: z.ZodBoolean;
1667
+ status: z.ZodEnum<["succeeded", "failed", "skipped"]>;
1668
+ role: z.ZodEnum<["worker", "reviewer"]>;
1669
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1670
+ }, "strip", z.ZodTypeAny, {
1671
+ name: string;
1672
+ status: "succeeded" | "failed" | "skipped";
1673
+ source: "dispatch" | "agent";
1674
+ run: string;
1675
+ idempotent: boolean;
1676
+ allowTrackedChanges: boolean;
1677
+ reviewerRerunAllowed: boolean;
1678
+ role: "worker" | "reviewer";
1679
+ output?: string | null | undefined;
1680
+ }, {
1681
+ name: string;
1682
+ status: "succeeded" | "failed" | "skipped";
1683
+ source: "dispatch" | "agent";
1684
+ run: string;
1685
+ idempotent: boolean;
1686
+ allowTrackedChanges: boolean;
1687
+ reviewerRerunAllowed: boolean;
1688
+ role: "worker" | "reviewer";
1689
+ output?: string | null | undefined;
1690
+ }>, "many">>;
1691
+ failureMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1692
+ }, "strip", z.ZodTypeAny, {
1693
+ status: "not_run" | "succeeded" | "failed";
1694
+ invalidationReasons: string[];
1695
+ steps: {
1696
+ name: string;
1697
+ status: "succeeded" | "failed" | "skipped";
1698
+ source: "dispatch" | "agent";
1699
+ run: string;
1700
+ idempotent: boolean;
1701
+ allowTrackedChanges: boolean;
1702
+ reviewerRerunAllowed: boolean;
1703
+ role: "worker" | "reviewer";
1704
+ output?: string | null | undefined;
1705
+ }[];
1706
+ configHash?: string | null | undefined;
1707
+ canonicalBranchHead?: string | null | undefined;
1708
+ lastRunAt?: string | null | undefined;
1709
+ failureMessage?: string | null | undefined;
1710
+ }, {
1711
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1712
+ configHash?: string | null | undefined;
1713
+ canonicalBranchHead?: string | null | undefined;
1714
+ lastRunAt?: string | null | undefined;
1715
+ invalidationReasons?: string[] | undefined;
1716
+ steps?: {
1717
+ name: string;
1718
+ status: "succeeded" | "failed" | "skipped";
1719
+ source: "dispatch" | "agent";
1720
+ run: string;
1721
+ idempotent: boolean;
1722
+ allowTrackedChanges: boolean;
1723
+ reviewerRerunAllowed: boolean;
1724
+ role: "worker" | "reviewer";
1725
+ output?: string | null | undefined;
1726
+ }[] | undefined;
1727
+ failureMessage?: string | null | undefined;
1728
+ }>;
1729
+ reviewer: z.ZodObject<{
1730
+ status: z.ZodDefault<z.ZodEnum<["not_run", "succeeded", "failed"]>>;
1731
+ configHash: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1732
+ canonicalBranchHead: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1733
+ lastRunAt: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
1734
+ invalidationReasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1735
+ steps: z.ZodDefault<z.ZodArray<z.ZodObject<{
1736
+ source: z.ZodEnum<["dispatch", "agent"]>;
1737
+ name: z.ZodString;
1738
+ run: z.ZodString;
1739
+ idempotent: z.ZodBoolean;
1740
+ allowTrackedChanges: z.ZodBoolean;
1741
+ reviewerRerunAllowed: z.ZodBoolean;
1742
+ status: z.ZodEnum<["succeeded", "failed", "skipped"]>;
1743
+ role: z.ZodEnum<["worker", "reviewer"]>;
1744
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1745
+ }, "strip", z.ZodTypeAny, {
1746
+ name: string;
1747
+ status: "succeeded" | "failed" | "skipped";
1748
+ source: "dispatch" | "agent";
1749
+ run: string;
1750
+ idempotent: boolean;
1751
+ allowTrackedChanges: boolean;
1752
+ reviewerRerunAllowed: boolean;
1753
+ role: "worker" | "reviewer";
1754
+ output?: string | null | undefined;
1755
+ }, {
1756
+ name: string;
1757
+ status: "succeeded" | "failed" | "skipped";
1758
+ source: "dispatch" | "agent";
1759
+ run: string;
1760
+ idempotent: boolean;
1761
+ allowTrackedChanges: boolean;
1762
+ reviewerRerunAllowed: boolean;
1763
+ role: "worker" | "reviewer";
1764
+ output?: string | null | undefined;
1765
+ }>, "many">>;
1766
+ failureMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1767
+ }, "strip", z.ZodTypeAny, {
1768
+ status: "not_run" | "succeeded" | "failed";
1769
+ invalidationReasons: string[];
1770
+ steps: {
1771
+ name: string;
1772
+ status: "succeeded" | "failed" | "skipped";
1773
+ source: "dispatch" | "agent";
1774
+ run: string;
1775
+ idempotent: boolean;
1776
+ allowTrackedChanges: boolean;
1777
+ reviewerRerunAllowed: boolean;
1778
+ role: "worker" | "reviewer";
1779
+ output?: string | null | undefined;
1780
+ }[];
1781
+ configHash?: string | null | undefined;
1782
+ canonicalBranchHead?: string | null | undefined;
1783
+ lastRunAt?: string | null | undefined;
1784
+ failureMessage?: string | null | undefined;
1785
+ }, {
1786
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1787
+ configHash?: string | null | undefined;
1788
+ canonicalBranchHead?: string | null | undefined;
1789
+ lastRunAt?: string | null | undefined;
1790
+ invalidationReasons?: string[] | undefined;
1791
+ steps?: {
1792
+ name: string;
1793
+ status: "succeeded" | "failed" | "skipped";
1794
+ source: "dispatch" | "agent";
1795
+ run: string;
1796
+ idempotent: boolean;
1797
+ allowTrackedChanges: boolean;
1798
+ reviewerRerunAllowed: boolean;
1799
+ role: "worker" | "reviewer";
1800
+ output?: string | null | undefined;
1801
+ }[] | undefined;
1802
+ failureMessage?: string | null | undefined;
1803
+ }>;
1804
+ }, "strip", z.ZodTypeAny, {
1805
+ worker: {
1806
+ status: "not_run" | "succeeded" | "failed";
1807
+ invalidationReasons: string[];
1808
+ steps: {
1809
+ name: string;
1810
+ status: "succeeded" | "failed" | "skipped";
1811
+ source: "dispatch" | "agent";
1812
+ run: string;
1813
+ idempotent: boolean;
1814
+ allowTrackedChanges: boolean;
1815
+ reviewerRerunAllowed: boolean;
1816
+ role: "worker" | "reviewer";
1817
+ output?: string | null | undefined;
1818
+ }[];
1819
+ configHash?: string | null | undefined;
1820
+ canonicalBranchHead?: string | null | undefined;
1821
+ lastRunAt?: string | null | undefined;
1822
+ failureMessage?: string | null | undefined;
1823
+ };
1824
+ reviewer: {
1825
+ status: "not_run" | "succeeded" | "failed";
1826
+ invalidationReasons: string[];
1827
+ steps: {
1828
+ name: string;
1829
+ status: "succeeded" | "failed" | "skipped";
1830
+ source: "dispatch" | "agent";
1831
+ run: string;
1832
+ idempotent: boolean;
1833
+ allowTrackedChanges: boolean;
1834
+ reviewerRerunAllowed: boolean;
1835
+ role: "worker" | "reviewer";
1836
+ output?: string | null | undefined;
1837
+ }[];
1838
+ configHash?: string | null | undefined;
1839
+ canonicalBranchHead?: string | null | undefined;
1840
+ lastRunAt?: string | null | undefined;
1841
+ failureMessage?: string | null | undefined;
1842
+ };
1843
+ }, {
1844
+ worker: {
1845
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1846
+ configHash?: string | null | undefined;
1847
+ canonicalBranchHead?: string | null | undefined;
1848
+ lastRunAt?: string | null | undefined;
1849
+ invalidationReasons?: string[] | undefined;
1850
+ steps?: {
1851
+ name: string;
1852
+ status: "succeeded" | "failed" | "skipped";
1853
+ source: "dispatch" | "agent";
1854
+ run: string;
1855
+ idempotent: boolean;
1856
+ allowTrackedChanges: boolean;
1857
+ reviewerRerunAllowed: boolean;
1858
+ role: "worker" | "reviewer";
1859
+ output?: string | null | undefined;
1860
+ }[] | undefined;
1861
+ failureMessage?: string | null | undefined;
1862
+ };
1863
+ reviewer: {
1864
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1865
+ configHash?: string | null | undefined;
1866
+ canonicalBranchHead?: string | null | undefined;
1867
+ lastRunAt?: string | null | undefined;
1868
+ invalidationReasons?: string[] | undefined;
1869
+ steps?: {
1870
+ name: string;
1871
+ status: "succeeded" | "failed" | "skipped";
1872
+ source: "dispatch" | "agent";
1873
+ run: string;
1874
+ idempotent: boolean;
1875
+ allowTrackedChanges: boolean;
1876
+ reviewerRerunAllowed: boolean;
1877
+ role: "worker" | "reviewer";
1878
+ output?: string | null | undefined;
1879
+ }[] | undefined;
1880
+ failureMessage?: string | null | undefined;
1881
+ };
1882
+ }>>;
1883
+ }, "strip", z.ZodTypeAny, {
1884
+ status: "not_run" | "succeeded" | "failed";
1885
+ invalidationReasons: string[];
1886
+ steps: {
1887
+ name: string;
1888
+ status: "succeeded" | "failed" | "skipped";
1889
+ source: "dispatch" | "agent";
1890
+ run: string;
1891
+ idempotent: boolean;
1892
+ allowTrackedChanges: boolean;
1893
+ reviewerRerunAllowed: boolean;
1894
+ role: "worker" | "reviewer";
1895
+ output?: string | null | undefined;
1896
+ }[];
1897
+ roleStates: {
1898
+ worker: {
1899
+ status: "not_run" | "succeeded" | "failed";
1900
+ invalidationReasons: string[];
1901
+ steps: {
1902
+ name: string;
1903
+ status: "succeeded" | "failed" | "skipped";
1904
+ source: "dispatch" | "agent";
1905
+ run: string;
1906
+ idempotent: boolean;
1907
+ allowTrackedChanges: boolean;
1908
+ reviewerRerunAllowed: boolean;
1909
+ role: "worker" | "reviewer";
1910
+ output?: string | null | undefined;
1911
+ }[];
1912
+ configHash?: string | null | undefined;
1913
+ canonicalBranchHead?: string | null | undefined;
1914
+ lastRunAt?: string | null | undefined;
1915
+ failureMessage?: string | null | undefined;
1916
+ };
1917
+ reviewer: {
1918
+ status: "not_run" | "succeeded" | "failed";
1919
+ invalidationReasons: string[];
1920
+ steps: {
1921
+ name: string;
1922
+ status: "succeeded" | "failed" | "skipped";
1923
+ source: "dispatch" | "agent";
1924
+ run: string;
1925
+ idempotent: boolean;
1926
+ allowTrackedChanges: boolean;
1927
+ reviewerRerunAllowed: boolean;
1928
+ role: "worker" | "reviewer";
1929
+ output?: string | null | undefined;
1930
+ }[];
1931
+ configHash?: string | null | undefined;
1932
+ canonicalBranchHead?: string | null | undefined;
1933
+ lastRunAt?: string | null | undefined;
1934
+ failureMessage?: string | null | undefined;
1935
+ };
1936
+ };
1937
+ configHash?: string | null | undefined;
1938
+ canonicalBranchHead?: string | null | undefined;
1939
+ lastRunAt?: string | null | undefined;
1940
+ failureMessage?: string | null | undefined;
1941
+ lastRole?: "worker" | "reviewer" | null | undefined;
1942
+ }, {
1943
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1944
+ configHash?: string | null | undefined;
1945
+ canonicalBranchHead?: string | null | undefined;
1946
+ lastRunAt?: string | null | undefined;
1947
+ invalidationReasons?: string[] | undefined;
1948
+ steps?: {
1949
+ name: string;
1950
+ status: "succeeded" | "failed" | "skipped";
1951
+ source: "dispatch" | "agent";
1952
+ run: string;
1953
+ idempotent: boolean;
1954
+ allowTrackedChanges: boolean;
1955
+ reviewerRerunAllowed: boolean;
1956
+ role: "worker" | "reviewer";
1957
+ output?: string | null | undefined;
1958
+ }[] | undefined;
1959
+ failureMessage?: string | null | undefined;
1960
+ lastRole?: "worker" | "reviewer" | null | undefined;
1961
+ roleStates?: {
1962
+ worker: {
1963
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1964
+ configHash?: string | null | undefined;
1965
+ canonicalBranchHead?: string | null | undefined;
1966
+ lastRunAt?: string | null | undefined;
1967
+ invalidationReasons?: string[] | undefined;
1968
+ steps?: {
1969
+ name: string;
1970
+ status: "succeeded" | "failed" | "skipped";
1971
+ source: "dispatch" | "agent";
1972
+ run: string;
1973
+ idempotent: boolean;
1974
+ allowTrackedChanges: boolean;
1975
+ reviewerRerunAllowed: boolean;
1976
+ role: "worker" | "reviewer";
1977
+ output?: string | null | undefined;
1978
+ }[] | undefined;
1979
+ failureMessage?: string | null | undefined;
1980
+ };
1981
+ reviewer: {
1982
+ status?: "not_run" | "succeeded" | "failed" | undefined;
1983
+ configHash?: string | null | undefined;
1984
+ canonicalBranchHead?: string | null | undefined;
1985
+ lastRunAt?: string | null | undefined;
1986
+ invalidationReasons?: string[] | undefined;
1987
+ steps?: {
1988
+ name: string;
1989
+ status: "succeeded" | "failed" | "skipped";
1990
+ source: "dispatch" | "agent";
1991
+ run: string;
1992
+ idempotent: boolean;
1993
+ allowTrackedChanges: boolean;
1994
+ reviewerRerunAllowed: boolean;
1995
+ role: "worker" | "reviewer";
1996
+ output?: string | null | undefined;
1997
+ }[] | undefined;
1998
+ failureMessage?: string | null | undefined;
1999
+ };
2000
+ } | undefined;
2001
+ }>;
2002
+ integration: z.ZodObject<{
2003
+ status: z.ZodDefault<z.ZodEnum<["pending", "in_progress", "merged", "abandoned", "reset"]>>;
2004
+ target_branch: z.ZodString;
2005
+ target_commit: z.ZodString;
2006
+ publication_mode: z.ZodEnum<["pull_request", "manual_merge"]>;
2007
+ outcome: z.ZodEnum<["pending", "pull_request", "manual_merge", "merged", "abandoned", "reset"]>;
2008
+ detail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2009
+ updated_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
2010
+ }, "strip", z.ZodTypeAny, {
2011
+ status: "in_progress" | "pending" | "merged" | "abandoned" | "reset";
2012
+ target_branch: string;
2013
+ target_commit: string;
2014
+ publication_mode: "pull_request" | "manual_merge";
2015
+ outcome: "pending" | "merged" | "abandoned" | "reset" | "pull_request" | "manual_merge";
2016
+ updated_at: string;
2017
+ detail?: string | null | undefined;
2018
+ }, {
2019
+ target_branch: string;
2020
+ target_commit: string;
2021
+ publication_mode: "pull_request" | "manual_merge";
2022
+ outcome: "pending" | "merged" | "abandoned" | "reset" | "pull_request" | "manual_merge";
2023
+ updated_at: string;
2024
+ status?: "in_progress" | "pending" | "merged" | "abandoned" | "reset" | undefined;
2025
+ detail?: string | null | undefined;
2026
+ }>;
2027
+ health: z.ZodObject<{
2028
+ status: z.ZodEnum<["healthy", "stale", "invalid"]>;
2029
+ summary: z.ZodString;
2030
+ issues: z.ZodDefault<z.ZodArray<z.ZodObject<{
2031
+ code: z.ZodString;
2032
+ message: z.ZodString;
2033
+ suggestion: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2034
+ }, "strip", z.ZodTypeAny, {
2035
+ code: string;
2036
+ message: string;
2037
+ suggestion?: string | null | undefined;
2038
+ }, {
2039
+ code: string;
2040
+ message: string;
2041
+ suggestion?: string | null | undefined;
2042
+ }>, "many">>;
2043
+ updated_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
2044
+ }, "strip", z.ZodTypeAny, {
2045
+ status: "stale" | "healthy" | "invalid";
2046
+ issues: {
2047
+ code: string;
2048
+ message: string;
2049
+ suggestion?: string | null | undefined;
2050
+ }[];
2051
+ updated_at: string;
2052
+ summary: string;
2053
+ }, {
2054
+ status: "stale" | "healthy" | "invalid";
2055
+ updated_at: string;
2056
+ summary: string;
2057
+ issues?: {
2058
+ code: string;
2059
+ message: string;
2060
+ suggestion?: string | null | undefined;
2061
+ }[] | undefined;
2062
+ }>;
2063
+ cleanup: z.ZodObject<{
2064
+ status: z.ZodDefault<z.ZodEnum<["not_scheduled", "scheduled", "blocked", "completed"]>>;
2065
+ eligible: z.ZodDefault<z.ZodBoolean>;
2066
+ reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2067
+ detail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2068
+ updated_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
2069
+ }, "strip", z.ZodTypeAny, {
2070
+ status: "blocked" | "completed" | "not_scheduled" | "scheduled";
2071
+ updated_at: string;
2072
+ eligible: boolean;
2073
+ detail?: string | null | undefined;
2074
+ reason?: string | null | undefined;
2075
+ }, {
2076
+ updated_at: string;
2077
+ status?: "blocked" | "completed" | "not_scheduled" | "scheduled" | undefined;
2078
+ detail?: string | null | undefined;
2079
+ eligible?: boolean | undefined;
2080
+ reason?: string | null | undefined;
2081
+ }>;
2082
+ timestamps: z.ZodObject<{
2083
+ created_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
2084
+ updated_at: z.ZodUnion<[z.ZodString, z.ZodString]>;
2085
+ last_reconciled_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
2086
+ last_active_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
2087
+ closed_at: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString]>>>;
2088
+ }, "strip", z.ZodTypeAny, {
2089
+ updated_at: string;
2090
+ created_at: string;
2091
+ last_reconciled_at?: string | null | undefined;
2092
+ last_active_at?: string | null | undefined;
2093
+ closed_at?: string | null | undefined;
2094
+ }, {
2095
+ updated_at: string;
2096
+ created_at: string;
2097
+ last_reconciled_at?: string | null | undefined;
2098
+ last_active_at?: string | null | undefined;
2099
+ closed_at?: string | null | undefined;
2100
+ }>;
2101
+ }, "strip", z.ZodTypeAny, {
2102
+ workspace_id: string;
2103
+ task_ref: string;
2104
+ task_slug: string;
2105
+ worktree_root: string;
2106
+ resolved_base_branch: string;
2107
+ base_branch_point: string;
2108
+ canonical_branch: string;
2109
+ canonical_branch_head: string;
2110
+ branch_provenance: {
2111
+ ownership: "dispatcher-managed" | "adopted";
2112
+ source: string;
2113
+ remote_ref?: string | null | undefined;
2114
+ adopted_from?: string | null | undefined;
2115
+ adopted_at?: string | null | undefined;
2116
+ rehydrated?: boolean | null | undefined;
2117
+ };
2118
+ lifecycle_state: "provisioning" | "ready" | "active" | "stale" | "integrating" | "closing" | "cleanup_blocked" | "closed";
2119
+ worktrees: {
2120
+ worker: {
2121
+ path: string;
2122
+ branch_mode: "branch" | "detached";
2123
+ branch_ref?: string | null | undefined;
2124
+ head?: string | null | undefined;
2125
+ last_seen_at?: string | null | undefined;
2126
+ };
2127
+ reviewer?: {
2128
+ path: string;
2129
+ branch_mode: "branch" | "detached";
2130
+ branch_ref?: string | null | undefined;
2131
+ head?: string | null | undefined;
2132
+ last_seen_at?: string | null | undefined;
2133
+ } | null | undefined;
2134
+ };
2135
+ bootstrap: {
2136
+ status: "not_run" | "succeeded" | "failed";
2137
+ invalidationReasons: string[];
2138
+ steps: {
2139
+ name: string;
2140
+ status: "succeeded" | "failed" | "skipped";
2141
+ source: "dispatch" | "agent";
2142
+ run: string;
2143
+ idempotent: boolean;
2144
+ allowTrackedChanges: boolean;
2145
+ reviewerRerunAllowed: boolean;
2146
+ role: "worker" | "reviewer";
2147
+ output?: string | null | undefined;
2148
+ }[];
2149
+ roleStates: {
2150
+ worker: {
2151
+ status: "not_run" | "succeeded" | "failed";
2152
+ invalidationReasons: string[];
2153
+ steps: {
2154
+ name: string;
2155
+ status: "succeeded" | "failed" | "skipped";
2156
+ source: "dispatch" | "agent";
2157
+ run: string;
2158
+ idempotent: boolean;
2159
+ allowTrackedChanges: boolean;
2160
+ reviewerRerunAllowed: boolean;
2161
+ role: "worker" | "reviewer";
2162
+ output?: string | null | undefined;
2163
+ }[];
2164
+ configHash?: string | null | undefined;
2165
+ canonicalBranchHead?: string | null | undefined;
2166
+ lastRunAt?: string | null | undefined;
2167
+ failureMessage?: string | null | undefined;
2168
+ };
2169
+ reviewer: {
2170
+ status: "not_run" | "succeeded" | "failed";
2171
+ invalidationReasons: string[];
2172
+ steps: {
2173
+ name: string;
2174
+ status: "succeeded" | "failed" | "skipped";
2175
+ source: "dispatch" | "agent";
2176
+ run: string;
2177
+ idempotent: boolean;
2178
+ allowTrackedChanges: boolean;
2179
+ reviewerRerunAllowed: boolean;
2180
+ role: "worker" | "reviewer";
2181
+ output?: string | null | undefined;
2182
+ }[];
2183
+ configHash?: string | null | undefined;
2184
+ canonicalBranchHead?: string | null | undefined;
2185
+ lastRunAt?: string | null | undefined;
2186
+ failureMessage?: string | null | undefined;
2187
+ };
2188
+ };
2189
+ configHash?: string | null | undefined;
2190
+ canonicalBranchHead?: string | null | undefined;
2191
+ lastRunAt?: string | null | undefined;
2192
+ failureMessage?: string | null | undefined;
2193
+ lastRole?: "worker" | "reviewer" | null | undefined;
2194
+ };
2195
+ integration: {
2196
+ status: "in_progress" | "pending" | "merged" | "abandoned" | "reset";
2197
+ target_branch: string;
2198
+ target_commit: string;
2199
+ publication_mode: "pull_request" | "manual_merge";
2200
+ outcome: "pending" | "merged" | "abandoned" | "reset" | "pull_request" | "manual_merge";
2201
+ updated_at: string;
2202
+ detail?: string | null | undefined;
2203
+ };
2204
+ health: {
2205
+ status: "stale" | "healthy" | "invalid";
2206
+ issues: {
2207
+ code: string;
2208
+ message: string;
2209
+ suggestion?: string | null | undefined;
2210
+ }[];
2211
+ updated_at: string;
2212
+ summary: string;
2213
+ };
2214
+ cleanup: {
2215
+ status: "blocked" | "completed" | "not_scheduled" | "scheduled";
2216
+ updated_at: string;
2217
+ eligible: boolean;
2218
+ detail?: string | null | undefined;
2219
+ reason?: string | null | undefined;
2220
+ };
2221
+ timestamps: {
2222
+ updated_at: string;
2223
+ created_at: string;
2224
+ last_reconciled_at?: string | null | undefined;
2225
+ last_active_at?: string | null | undefined;
2226
+ closed_at?: string | null | undefined;
2227
+ };
2228
+ active_role?: "worker" | "reviewer" | null | undefined;
2229
+ }, {
2230
+ workspace_id: string;
2231
+ task_ref: string;
2232
+ task_slug: string;
2233
+ worktree_root: string;
2234
+ resolved_base_branch: string;
2235
+ base_branch_point: string;
2236
+ canonical_branch: string;
2237
+ canonical_branch_head: string;
2238
+ lifecycle_state: "provisioning" | "ready" | "active" | "stale" | "integrating" | "closing" | "cleanup_blocked" | "closed";
2239
+ worktrees: {
2240
+ worker: {
2241
+ path: string;
2242
+ branch_mode: "branch" | "detached";
2243
+ branch_ref?: string | null | undefined;
2244
+ head?: string | null | undefined;
2245
+ last_seen_at?: string | null | undefined;
2246
+ };
2247
+ reviewer?: {
2248
+ path: string;
2249
+ branch_mode: "branch" | "detached";
2250
+ branch_ref?: string | null | undefined;
2251
+ head?: string | null | undefined;
2252
+ last_seen_at?: string | null | undefined;
2253
+ } | null | undefined;
2254
+ };
2255
+ bootstrap: {
2256
+ status?: "not_run" | "succeeded" | "failed" | undefined;
2257
+ configHash?: string | null | undefined;
2258
+ canonicalBranchHead?: string | null | undefined;
2259
+ lastRunAt?: string | null | undefined;
2260
+ invalidationReasons?: string[] | undefined;
2261
+ steps?: {
2262
+ name: string;
2263
+ status: "succeeded" | "failed" | "skipped";
2264
+ source: "dispatch" | "agent";
2265
+ run: string;
2266
+ idempotent: boolean;
2267
+ allowTrackedChanges: boolean;
2268
+ reviewerRerunAllowed: boolean;
2269
+ role: "worker" | "reviewer";
2270
+ output?: string | null | undefined;
2271
+ }[] | undefined;
2272
+ failureMessage?: string | null | undefined;
2273
+ lastRole?: "worker" | "reviewer" | null | undefined;
2274
+ roleStates?: {
2275
+ worker: {
2276
+ status?: "not_run" | "succeeded" | "failed" | undefined;
2277
+ configHash?: string | null | undefined;
2278
+ canonicalBranchHead?: string | null | undefined;
2279
+ lastRunAt?: string | null | undefined;
2280
+ invalidationReasons?: string[] | undefined;
2281
+ steps?: {
2282
+ name: string;
2283
+ status: "succeeded" | "failed" | "skipped";
2284
+ source: "dispatch" | "agent";
2285
+ run: string;
2286
+ idempotent: boolean;
2287
+ allowTrackedChanges: boolean;
2288
+ reviewerRerunAllowed: boolean;
2289
+ role: "worker" | "reviewer";
2290
+ output?: string | null | undefined;
2291
+ }[] | undefined;
2292
+ failureMessage?: string | null | undefined;
2293
+ };
2294
+ reviewer: {
2295
+ status?: "not_run" | "succeeded" | "failed" | undefined;
2296
+ configHash?: string | null | undefined;
2297
+ canonicalBranchHead?: string | null | undefined;
2298
+ lastRunAt?: string | null | undefined;
2299
+ invalidationReasons?: string[] | undefined;
2300
+ steps?: {
2301
+ name: string;
2302
+ status: "succeeded" | "failed" | "skipped";
2303
+ source: "dispatch" | "agent";
2304
+ run: string;
2305
+ idempotent: boolean;
2306
+ allowTrackedChanges: boolean;
2307
+ reviewerRerunAllowed: boolean;
2308
+ role: "worker" | "reviewer";
2309
+ output?: string | null | undefined;
2310
+ }[] | undefined;
2311
+ failureMessage?: string | null | undefined;
2312
+ };
2313
+ } | undefined;
2314
+ };
2315
+ integration: {
2316
+ target_branch: string;
2317
+ target_commit: string;
2318
+ publication_mode: "pull_request" | "manual_merge";
2319
+ outcome: "pending" | "merged" | "abandoned" | "reset" | "pull_request" | "manual_merge";
2320
+ updated_at: string;
2321
+ status?: "in_progress" | "pending" | "merged" | "abandoned" | "reset" | undefined;
2322
+ detail?: string | null | undefined;
2323
+ };
2324
+ health: {
2325
+ status: "stale" | "healthy" | "invalid";
2326
+ updated_at: string;
2327
+ summary: string;
2328
+ issues?: {
2329
+ code: string;
2330
+ message: string;
2331
+ suggestion?: string | null | undefined;
2332
+ }[] | undefined;
2333
+ };
2334
+ cleanup: {
2335
+ updated_at: string;
2336
+ status?: "blocked" | "completed" | "not_scheduled" | "scheduled" | undefined;
2337
+ detail?: string | null | undefined;
2338
+ eligible?: boolean | undefined;
2339
+ reason?: string | null | undefined;
2340
+ };
2341
+ timestamps: {
2342
+ updated_at: string;
2343
+ created_at: string;
2344
+ last_reconciled_at?: string | null | undefined;
2345
+ last_active_at?: string | null | undefined;
2346
+ closed_at?: string | null | undefined;
2347
+ };
2348
+ branch_provenance?: {
2349
+ ownership: "dispatcher-managed" | "adopted";
2350
+ source: string;
2351
+ remote_ref?: string | null | undefined;
2352
+ adopted_from?: string | null | undefined;
2353
+ adopted_at?: string | null | undefined;
2354
+ rehydrated?: boolean | null | undefined;
2355
+ } | undefined;
2356
+ active_role?: "worker" | "reviewer" | null | undefined;
2357
+ }>, "many">>;
2358
+ }, "strip", z.ZodTypeAny, {
2359
+ kynetic_dispatch_workspaces: string;
2360
+ workspaces: {
2361
+ workspace_id: string;
2362
+ task_ref: string;
2363
+ task_slug: string;
2364
+ worktree_root: string;
2365
+ resolved_base_branch: string;
2366
+ base_branch_point: string;
2367
+ canonical_branch: string;
2368
+ canonical_branch_head: string;
2369
+ branch_provenance: {
2370
+ ownership: "dispatcher-managed" | "adopted";
2371
+ source: string;
2372
+ remote_ref?: string | null | undefined;
2373
+ adopted_from?: string | null | undefined;
2374
+ adopted_at?: string | null | undefined;
2375
+ rehydrated?: boolean | null | undefined;
2376
+ };
2377
+ lifecycle_state: "provisioning" | "ready" | "active" | "stale" | "integrating" | "closing" | "cleanup_blocked" | "closed";
2378
+ worktrees: {
2379
+ worker: {
2380
+ path: string;
2381
+ branch_mode: "branch" | "detached";
2382
+ branch_ref?: string | null | undefined;
2383
+ head?: string | null | undefined;
2384
+ last_seen_at?: string | null | undefined;
2385
+ };
2386
+ reviewer?: {
2387
+ path: string;
2388
+ branch_mode: "branch" | "detached";
2389
+ branch_ref?: string | null | undefined;
2390
+ head?: string | null | undefined;
2391
+ last_seen_at?: string | null | undefined;
2392
+ } | null | undefined;
2393
+ };
2394
+ bootstrap: {
2395
+ status: "not_run" | "succeeded" | "failed";
2396
+ invalidationReasons: string[];
2397
+ steps: {
2398
+ name: string;
2399
+ status: "succeeded" | "failed" | "skipped";
2400
+ source: "dispatch" | "agent";
2401
+ run: string;
2402
+ idempotent: boolean;
2403
+ allowTrackedChanges: boolean;
2404
+ reviewerRerunAllowed: boolean;
2405
+ role: "worker" | "reviewer";
2406
+ output?: string | null | undefined;
2407
+ }[];
2408
+ roleStates: {
2409
+ worker: {
2410
+ status: "not_run" | "succeeded" | "failed";
2411
+ invalidationReasons: string[];
2412
+ steps: {
2413
+ name: string;
2414
+ status: "succeeded" | "failed" | "skipped";
2415
+ source: "dispatch" | "agent";
2416
+ run: string;
2417
+ idempotent: boolean;
2418
+ allowTrackedChanges: boolean;
2419
+ reviewerRerunAllowed: boolean;
2420
+ role: "worker" | "reviewer";
2421
+ output?: string | null | undefined;
2422
+ }[];
2423
+ configHash?: string | null | undefined;
2424
+ canonicalBranchHead?: string | null | undefined;
2425
+ lastRunAt?: string | null | undefined;
2426
+ failureMessage?: string | null | undefined;
2427
+ };
2428
+ reviewer: {
2429
+ status: "not_run" | "succeeded" | "failed";
2430
+ invalidationReasons: string[];
2431
+ steps: {
2432
+ name: string;
2433
+ status: "succeeded" | "failed" | "skipped";
2434
+ source: "dispatch" | "agent";
2435
+ run: string;
2436
+ idempotent: boolean;
2437
+ allowTrackedChanges: boolean;
2438
+ reviewerRerunAllowed: boolean;
2439
+ role: "worker" | "reviewer";
2440
+ output?: string | null | undefined;
2441
+ }[];
2442
+ configHash?: string | null | undefined;
2443
+ canonicalBranchHead?: string | null | undefined;
2444
+ lastRunAt?: string | null | undefined;
2445
+ failureMessage?: string | null | undefined;
2446
+ };
2447
+ };
2448
+ configHash?: string | null | undefined;
2449
+ canonicalBranchHead?: string | null | undefined;
2450
+ lastRunAt?: string | null | undefined;
2451
+ failureMessage?: string | null | undefined;
2452
+ lastRole?: "worker" | "reviewer" | null | undefined;
2453
+ };
2454
+ integration: {
2455
+ status: "in_progress" | "pending" | "merged" | "abandoned" | "reset";
2456
+ target_branch: string;
2457
+ target_commit: string;
2458
+ publication_mode: "pull_request" | "manual_merge";
2459
+ outcome: "pending" | "merged" | "abandoned" | "reset" | "pull_request" | "manual_merge";
2460
+ updated_at: string;
2461
+ detail?: string | null | undefined;
2462
+ };
2463
+ health: {
2464
+ status: "stale" | "healthy" | "invalid";
2465
+ issues: {
2466
+ code: string;
2467
+ message: string;
2468
+ suggestion?: string | null | undefined;
2469
+ }[];
2470
+ updated_at: string;
2471
+ summary: string;
2472
+ };
2473
+ cleanup: {
2474
+ status: "blocked" | "completed" | "not_scheduled" | "scheduled";
2475
+ updated_at: string;
2476
+ eligible: boolean;
2477
+ detail?: string | null | undefined;
2478
+ reason?: string | null | undefined;
2479
+ };
2480
+ timestamps: {
2481
+ updated_at: string;
2482
+ created_at: string;
2483
+ last_reconciled_at?: string | null | undefined;
2484
+ last_active_at?: string | null | undefined;
2485
+ closed_at?: string | null | undefined;
2486
+ };
2487
+ active_role?: "worker" | "reviewer" | null | undefined;
2488
+ }[];
2489
+ }, {
2490
+ kynetic_dispatch_workspaces?: string | undefined;
2491
+ workspaces?: {
2492
+ workspace_id: string;
2493
+ task_ref: string;
2494
+ task_slug: string;
2495
+ worktree_root: string;
2496
+ resolved_base_branch: string;
2497
+ base_branch_point: string;
2498
+ canonical_branch: string;
2499
+ canonical_branch_head: string;
2500
+ lifecycle_state: "provisioning" | "ready" | "active" | "stale" | "integrating" | "closing" | "cleanup_blocked" | "closed";
2501
+ worktrees: {
2502
+ worker: {
2503
+ path: string;
2504
+ branch_mode: "branch" | "detached";
2505
+ branch_ref?: string | null | undefined;
2506
+ head?: string | null | undefined;
2507
+ last_seen_at?: string | null | undefined;
2508
+ };
2509
+ reviewer?: {
2510
+ path: string;
2511
+ branch_mode: "branch" | "detached";
2512
+ branch_ref?: string | null | undefined;
2513
+ head?: string | null | undefined;
2514
+ last_seen_at?: string | null | undefined;
2515
+ } | null | undefined;
2516
+ };
2517
+ bootstrap: {
2518
+ status?: "not_run" | "succeeded" | "failed" | undefined;
2519
+ configHash?: string | null | undefined;
2520
+ canonicalBranchHead?: string | null | undefined;
2521
+ lastRunAt?: string | null | undefined;
2522
+ invalidationReasons?: string[] | undefined;
2523
+ steps?: {
2524
+ name: string;
2525
+ status: "succeeded" | "failed" | "skipped";
2526
+ source: "dispatch" | "agent";
2527
+ run: string;
2528
+ idempotent: boolean;
2529
+ allowTrackedChanges: boolean;
2530
+ reviewerRerunAllowed: boolean;
2531
+ role: "worker" | "reviewer";
2532
+ output?: string | null | undefined;
2533
+ }[] | undefined;
2534
+ failureMessage?: string | null | undefined;
2535
+ lastRole?: "worker" | "reviewer" | null | undefined;
2536
+ roleStates?: {
2537
+ worker: {
2538
+ status?: "not_run" | "succeeded" | "failed" | undefined;
2539
+ configHash?: string | null | undefined;
2540
+ canonicalBranchHead?: string | null | undefined;
2541
+ lastRunAt?: string | null | undefined;
2542
+ invalidationReasons?: string[] | undefined;
2543
+ steps?: {
2544
+ name: string;
2545
+ status: "succeeded" | "failed" | "skipped";
2546
+ source: "dispatch" | "agent";
2547
+ run: string;
2548
+ idempotent: boolean;
2549
+ allowTrackedChanges: boolean;
2550
+ reviewerRerunAllowed: boolean;
2551
+ role: "worker" | "reviewer";
2552
+ output?: string | null | undefined;
2553
+ }[] | undefined;
2554
+ failureMessage?: string | null | undefined;
2555
+ };
2556
+ reviewer: {
2557
+ status?: "not_run" | "succeeded" | "failed" | undefined;
2558
+ configHash?: string | null | undefined;
2559
+ canonicalBranchHead?: string | null | undefined;
2560
+ lastRunAt?: string | null | undefined;
2561
+ invalidationReasons?: string[] | undefined;
2562
+ steps?: {
2563
+ name: string;
2564
+ status: "succeeded" | "failed" | "skipped";
2565
+ source: "dispatch" | "agent";
2566
+ run: string;
2567
+ idempotent: boolean;
2568
+ allowTrackedChanges: boolean;
2569
+ reviewerRerunAllowed: boolean;
2570
+ role: "worker" | "reviewer";
2571
+ output?: string | null | undefined;
2572
+ }[] | undefined;
2573
+ failureMessage?: string | null | undefined;
2574
+ };
2575
+ } | undefined;
2576
+ };
2577
+ integration: {
2578
+ target_branch: string;
2579
+ target_commit: string;
2580
+ publication_mode: "pull_request" | "manual_merge";
2581
+ outcome: "pending" | "merged" | "abandoned" | "reset" | "pull_request" | "manual_merge";
2582
+ updated_at: string;
2583
+ status?: "in_progress" | "pending" | "merged" | "abandoned" | "reset" | undefined;
2584
+ detail?: string | null | undefined;
2585
+ };
2586
+ health: {
2587
+ status: "stale" | "healthy" | "invalid";
2588
+ updated_at: string;
2589
+ summary: string;
2590
+ issues?: {
2591
+ code: string;
2592
+ message: string;
2593
+ suggestion?: string | null | undefined;
2594
+ }[] | undefined;
2595
+ };
2596
+ cleanup: {
2597
+ updated_at: string;
2598
+ status?: "blocked" | "completed" | "not_scheduled" | "scheduled" | undefined;
2599
+ detail?: string | null | undefined;
2600
+ eligible?: boolean | undefined;
2601
+ reason?: string | null | undefined;
2602
+ };
2603
+ timestamps: {
2604
+ updated_at: string;
2605
+ created_at: string;
2606
+ last_reconciled_at?: string | null | undefined;
2607
+ last_active_at?: string | null | undefined;
2608
+ closed_at?: string | null | undefined;
2609
+ };
2610
+ branch_provenance?: {
2611
+ ownership: "dispatcher-managed" | "adopted";
2612
+ source: string;
2613
+ remote_ref?: string | null | undefined;
2614
+ adopted_from?: string | null | undefined;
2615
+ adopted_at?: string | null | undefined;
2616
+ rehydrated?: boolean | null | undefined;
2617
+ } | undefined;
2618
+ active_role?: "worker" | "reviewer" | null | undefined;
2619
+ }[] | undefined;
2620
+ }>;
2621
+ export type DispatchWorkspaceLifecycleState = z.infer<typeof DispatchWorkspaceLifecycleStateSchema>;
2622
+ export type DispatchWorkspaceHealthStatus = z.infer<typeof DispatchWorkspaceHealthStatusSchema>;
2623
+ export type DispatchWorkspaceBootstrapStatus = z.infer<typeof DispatchWorkspaceBootstrapStatusSchema>;
2624
+ export type DispatchWorkspaceIntegrationStatus = z.infer<typeof DispatchWorkspaceIntegrationStatusSchema>;
2625
+ export type DispatchWorkspaceCleanupStatus = z.infer<typeof DispatchWorkspaceCleanupStatusSchema>;
2626
+ export type DispatchWorkspaceRole = z.infer<typeof DispatchWorkspaceRoleSchema>;
2627
+ export type DispatchWorkspaceBranchMode = z.infer<typeof DispatchWorkspaceBranchModeSchema>;
2628
+ export type DispatchWorkspacePublicationMode = z.infer<typeof DispatchWorkspacePublicationModeSchema>;
2629
+ export type DispatchWorkspaceIntegrationOutcome = z.infer<typeof DispatchWorkspaceIntegrationOutcomeSchema>;
2630
+ export type DispatchWorkspaceBranchOwnership = z.infer<typeof DispatchWorkspaceBranchOwnershipSchema>;
2631
+ export type DispatchWorkspaceBranchProvenance = z.infer<typeof DispatchWorkspaceBranchProvenanceSchema>;
2632
+ export type DispatchWorkspaceIssue = z.infer<typeof DispatchWorkspaceIssueSchema>;
2633
+ export type DispatchWorkspaceWorktree = z.infer<typeof DispatchWorkspaceWorktreeSchema>;
2634
+ export type DispatchWorkspaceBootstrapStepResult = z.infer<typeof DispatchWorkspaceBootstrapStepResultSchema>;
2635
+ export type DispatchWorkspaceBootstrapRoleState = z.infer<typeof DispatchWorkspaceBootstrapRoleStateSchema>;
2636
+ export type DispatchWorkspaceBootstrapState = z.infer<typeof DispatchWorkspaceBootstrapStateSchema>;
2637
+ export type DispatchWorkspaceIntegrationState = z.infer<typeof DispatchWorkspaceIntegrationStateSchema>;
2638
+ export type DispatchWorkspaceHealthState = z.infer<typeof DispatchWorkspaceHealthStateSchema>;
2639
+ export type DispatchWorkspaceCleanupState = z.infer<typeof DispatchWorkspaceCleanupStateSchema>;
2640
+ export type DispatchWorkspaceTimestamps = z.infer<typeof DispatchWorkspaceTimestampsSchema>;
2641
+ export type DispatchWorkspaceRecord = z.infer<typeof DispatchWorkspaceRecordSchema>;
2642
+ export type DispatchWorkspaceRegistryFile = z.infer<typeof DispatchWorkspaceRegistryFileSchema>;
2643
+ //# sourceMappingURL=dispatch-workspace.d.ts.map