@mastra/factory 0.29.0-alpha.3 → 0.29.0-alpha.5

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 (399) hide show
  1. package/README.md +123 -64
  2. package/dist/boards/board-events.d.ts +89 -9
  3. package/dist/boards/board-events.d.ts.map +1 -1
  4. package/dist/boards/board-events.js +176 -13
  5. package/dist/boards/board-events.js.map +1 -1
  6. package/dist/boards/board-writes.d.ts.map +1 -1
  7. package/dist/boards/board-writes.js +14 -1
  8. package/dist/boards/board-writes.js.map +1 -1
  9. package/dist/boards/busy-card.d.ts +11 -0
  10. package/dist/boards/busy-card.d.ts.map +1 -0
  11. package/dist/boards/busy-card.js +15 -0
  12. package/dist/boards/busy-card.js.map +1 -0
  13. package/dist/boards/card-facts.d.ts.map +1 -1
  14. package/dist/boards/card-facts.js +18 -4
  15. package/dist/boards/card-facts.js.map +1 -1
  16. package/dist/boards/index.d.ts +2 -1
  17. package/dist/boards/index.d.ts.map +1 -1
  18. package/dist/boards/index.js +3 -2
  19. package/dist/boards/intake-dry-run.d.ts +109 -0
  20. package/dist/boards/intake-dry-run.d.ts.map +1 -0
  21. package/dist/boards/intake-dry-run.js +158 -0
  22. package/dist/boards/intake-dry-run.js.map +1 -0
  23. package/dist/boards/intake-lookup.d.ts +32 -0
  24. package/dist/boards/intake-lookup.d.ts.map +1 -0
  25. package/dist/boards/intake-lookup.js +12 -0
  26. package/dist/boards/intake-lookup.js.map +1 -0
  27. package/dist/boards/intake-order.d.ts +32 -0
  28. package/dist/boards/intake-order.d.ts.map +1 -0
  29. package/dist/boards/intake-order.js +60 -0
  30. package/dist/boards/intake-order.js.map +1 -0
  31. package/dist/boards/intake-routing.d.ts +246 -35
  32. package/dist/boards/intake-routing.d.ts.map +1 -1
  33. package/dist/boards/intake-routing.js +437 -52
  34. package/dist/boards/intake-routing.js.map +1 -1
  35. package/dist/boards/reroute.d.ts +7 -3
  36. package/dist/boards/reroute.d.ts.map +1 -1
  37. package/dist/boards/reroute.js +21 -4
  38. package/dist/boards/reroute.js.map +1 -1
  39. package/dist/boards/semantics.d.ts +8 -28
  40. package/dist/boards/semantics.d.ts.map +1 -1
  41. package/dist/boards/semantics.js +7 -39
  42. package/dist/boards/semantics.js.map +1 -1
  43. package/dist/boards/work-routes.d.ts +31 -11
  44. package/dist/boards/work-routes.d.ts.map +1 -1
  45. package/dist/boards/work-routes.js +104 -20
  46. package/dist/boards/work-routes.js.map +1 -1
  47. package/dist/factory.d.ts +27 -1
  48. package/dist/factory.d.ts.map +1 -1
  49. package/dist/factory.js +32 -18
  50. package/dist/factory.js.map +1 -1
  51. package/dist/index.d.ts +0 -1
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +1 -2
  54. package/dist/integrations/base.d.ts +9 -0
  55. package/dist/integrations/base.d.ts.map +1 -1
  56. package/dist/integrations/dependabot/rules.d.ts.map +1 -1
  57. package/dist/integrations/dependabot/rules.js +2 -6
  58. package/dist/integrations/dependabot/rules.js.map +1 -1
  59. package/dist/integrations/github/commits.d.ts +0 -21
  60. package/dist/integrations/github/commits.d.ts.map +1 -1
  61. package/dist/integrations/github/commits.js +1 -24
  62. package/dist/integrations/github/commits.js.map +1 -1
  63. package/dist/integrations/github/default-rules.d.ts +22 -1
  64. package/dist/integrations/github/default-rules.d.ts.map +1 -1
  65. package/dist/integrations/github/default-rules.js +23 -5
  66. package/dist/integrations/github/default-rules.js.map +1 -1
  67. package/dist/integrations/github/intake-lookup.d.ts +16 -0
  68. package/dist/integrations/github/intake-lookup.d.ts.map +1 -0
  69. package/dist/integrations/github/intake-lookup.js +76 -0
  70. package/dist/integrations/github/intake-lookup.js.map +1 -0
  71. package/dist/integrations/github/integration.d.ts +20 -6
  72. package/dist/integrations/github/integration.d.ts.map +1 -1
  73. package/dist/integrations/github/integration.js +23 -12
  74. package/dist/integrations/github/integration.js.map +1 -1
  75. package/dist/integrations/github/review-status-reporter.js +1 -1
  76. package/dist/integrations/github/routes.d.ts +1 -11
  77. package/dist/integrations/github/routes.d.ts.map +1 -1
  78. package/dist/integrations/github/routes.js +20 -517
  79. package/dist/integrations/github/routes.js.map +1 -1
  80. package/dist/integrations/github/rules.d.ts +12 -1
  81. package/dist/integrations/github/rules.d.ts.map +1 -1
  82. package/dist/integrations/github/rules.js +275 -38
  83. package/dist/integrations/github/rules.js.map +1 -1
  84. package/dist/integrations/github/sandbox.d.ts.map +1 -1
  85. package/dist/integrations/github/sandbox.js +30 -4
  86. package/dist/integrations/github/sandbox.js.map +1 -1
  87. package/dist/integrations/gitlab/default-rules.d.ts.map +1 -1
  88. package/dist/integrations/gitlab/default-rules.js +19 -3
  89. package/dist/integrations/gitlab/default-rules.js.map +1 -1
  90. package/dist/integrations/gitlab/discovery.d.ts +1 -1
  91. package/dist/integrations/gitlab/discovery.js +1 -1
  92. package/dist/integrations/gitlab/discovery.js.map +1 -1
  93. package/dist/integrations/gitlab/intake-lookup.d.ts +17 -0
  94. package/dist/integrations/gitlab/intake-lookup.d.ts.map +1 -0
  95. package/dist/integrations/gitlab/intake-lookup.js +85 -0
  96. package/dist/integrations/gitlab/intake-lookup.js.map +1 -0
  97. package/dist/integrations/gitlab/integration.d.ts +5 -0
  98. package/dist/integrations/gitlab/integration.d.ts.map +1 -1
  99. package/dist/integrations/gitlab/integration.js +21 -2
  100. package/dist/integrations/gitlab/integration.js.map +1 -1
  101. package/dist/integrations/gitlab/routes.d.ts +0 -2
  102. package/dist/integrations/gitlab/routes.d.ts.map +1 -1
  103. package/dist/integrations/gitlab/routes.js +49 -165
  104. package/dist/integrations/gitlab/routes.js.map +1 -1
  105. package/dist/integrations/gitlab/rules.d.ts +20 -0
  106. package/dist/integrations/gitlab/rules.d.ts.map +1 -1
  107. package/dist/integrations/gitlab/rules.js +128 -19
  108. package/dist/integrations/gitlab/rules.js.map +1 -1
  109. package/dist/integrations/incidentio/routes.d.ts +5 -5
  110. package/dist/integrations/incidentio/routes.d.ts.map +1 -1
  111. package/dist/integrations/incidentio/routes.js +3 -59
  112. package/dist/integrations/incidentio/routes.js.map +1 -1
  113. package/dist/integrations/incidentio/rules.d.ts.map +1 -1
  114. package/dist/integrations/incidentio/rules.js +15 -9
  115. package/dist/integrations/incidentio/rules.js.map +1 -1
  116. package/dist/integrations/jira/issue-reconciler.d.ts +1 -1
  117. package/dist/integrations/jira/issue-reconciler.d.ts.map +1 -1
  118. package/dist/integrations/jira/issue-reconciler.js.map +1 -1
  119. package/dist/integrations/jira/routes.d.ts +2 -2
  120. package/dist/integrations/jira/routes.d.ts.map +1 -1
  121. package/dist/integrations/jira/routes.js +0 -68
  122. package/dist/integrations/jira/routes.js.map +1 -1
  123. package/dist/integrations/jira/rules.d.ts.map +1 -1
  124. package/dist/integrations/jira/rules.js +13 -7
  125. package/dist/integrations/jira/rules.js.map +1 -1
  126. package/dist/integrations/linear/routes.d.ts +2 -2
  127. package/dist/integrations/linear/routes.d.ts.map +1 -1
  128. package/dist/integrations/linear/routes.js +0 -83
  129. package/dist/integrations/linear/routes.js.map +1 -1
  130. package/dist/integrations/linear/rules.d.ts.map +1 -1
  131. package/dist/integrations/linear/rules.js +14 -7
  132. package/dist/integrations/linear/rules.js.map +1 -1
  133. package/dist/integrations/platform/github/event-worker.js +9 -1
  134. package/dist/integrations/platform/github/event-worker.js.map +1 -1
  135. package/dist/integrations/platform/github/integration.d.ts +6 -6
  136. package/dist/integrations/platform/github/integration.d.ts.map +1 -1
  137. package/dist/integrations/platform/github/integration.js +23 -6
  138. package/dist/integrations/platform/github/integration.js.map +1 -1
  139. package/dist/integrations/platform/jira/routes.d.ts +2 -2
  140. package/dist/integrations/platform/jira/routes.d.ts.map +1 -1
  141. package/dist/integrations/platform/jira/routes.js +0 -69
  142. package/dist/integrations/platform/jira/routes.js.map +1 -1
  143. package/dist/integrations/pull-request-head.d.ts +1 -1
  144. package/dist/integrations/pull-request-head.d.ts.map +1 -1
  145. package/dist/integrations/pull-request-head.js +5 -0
  146. package/dist/integrations/pull-request-head.js.map +1 -1
  147. package/dist/integrations/vanta/rules.d.ts.map +1 -1
  148. package/dist/integrations/vanta/rules.js +2 -6
  149. package/dist/integrations/vanta/rules.js.map +1 -1
  150. package/dist/packages/_internals/workspace/dist/index.js.map +1 -1
  151. package/dist/routes/automation-runs.d.ts +0 -2
  152. package/dist/routes/automation-runs.d.ts.map +1 -1
  153. package/dist/routes/automation-runs.js +2 -6
  154. package/dist/routes/automation-runs.js.map +1 -1
  155. package/dist/routes/board-snapshot.d.ts +8 -1
  156. package/dist/routes/board-snapshot.d.ts.map +1 -1
  157. package/dist/routes/board-snapshot.js +33 -7
  158. package/dist/routes/board-snapshot.js.map +1 -1
  159. package/dist/routes/boards.js.map +1 -1
  160. package/dist/routes/config.d.ts +6 -0
  161. package/dist/routes/config.d.ts.map +1 -1
  162. package/dist/routes/config.js +5 -2
  163. package/dist/routes/config.js.map +1 -1
  164. package/dist/routes/contracts.d.ts +1258 -5
  165. package/dist/routes/contracts.d.ts.map +1 -1
  166. package/dist/routes/contracts.js +588 -17
  167. package/dist/routes/contracts.js.map +1 -1
  168. package/dist/routes/fs.d.ts +10 -0
  169. package/dist/routes/fs.d.ts.map +1 -1
  170. package/dist/routes/fs.js +184 -11
  171. package/dist/routes/fs.js.map +1 -1
  172. package/dist/routes/intake-check.d.ts +92 -0
  173. package/dist/routes/intake-check.d.ts.map +1 -0
  174. package/dist/routes/intake-check.js +322 -0
  175. package/dist/routes/intake-check.js.map +1 -0
  176. package/dist/routes/intake-routes.d.ts +10 -2
  177. package/dist/routes/intake-routes.d.ts.map +1 -1
  178. package/dist/routes/intake-routes.js +292 -11
  179. package/dist/routes/intake-routes.js.map +1 -1
  180. package/dist/routes/mastra-gateway.d.ts.map +1 -1
  181. package/dist/routes/mastra-gateway.js +3 -2
  182. package/dist/routes/mastra-gateway.js.map +1 -1
  183. package/dist/routes/project-sessions.d.ts +49 -0
  184. package/dist/routes/project-sessions.d.ts.map +1 -0
  185. package/dist/routes/project-sessions.js +93 -0
  186. package/dist/routes/project-sessions.js.map +1 -0
  187. package/dist/routes/projects.d.ts.map +1 -1
  188. package/dist/routes/projects.js +4 -17
  189. package/dist/routes/projects.js.map +1 -1
  190. package/dist/routes/run-queue.d.ts +6 -6
  191. package/dist/routes/run-queue.d.ts.map +1 -1
  192. package/dist/routes/run-queue.js +28 -8
  193. package/dist/routes/run-queue.js.map +1 -1
  194. package/dist/routes/session-rows.d.ts +30 -0
  195. package/dist/routes/session-rows.d.ts.map +1 -0
  196. package/dist/routes/session-rows.js +98 -0
  197. package/dist/routes/session-rows.js.map +1 -0
  198. package/dist/routes/source-control-sessions.d.ts +4 -8
  199. package/dist/routes/source-control-sessions.d.ts.map +1 -1
  200. package/dist/routes/source-control-sessions.js +8 -106
  201. package/dist/routes/source-control-sessions.js.map +1 -1
  202. package/dist/routes/surface.d.ts +13 -3
  203. package/dist/routes/surface.d.ts.map +1 -1
  204. package/dist/routes/surface.js +25 -38
  205. package/dist/routes/surface.js.map +1 -1
  206. package/dist/routes/work-item-starters.d.ts +1 -0
  207. package/dist/routes/work-item-starters.d.ts.map +1 -1
  208. package/dist/routes/work-item-starters.js +14 -2
  209. package/dist/routes/work-item-starters.js.map +1 -1
  210. package/dist/routes/work-items.d.ts +13 -0
  211. package/dist/routes/work-items.d.ts.map +1 -1
  212. package/dist/routes/work-items.js +87 -34
  213. package/dist/routes/work-items.js.map +1 -1
  214. package/dist/rules/dispatch-errors.js +1 -1
  215. package/dist/rules/dispatch-errors.js.map +1 -1
  216. package/dist/rules/dispatcher.d.ts +39 -7
  217. package/dist/rules/dispatcher.d.ts.map +1 -1
  218. package/dist/rules/dispatcher.js +362 -127
  219. package/dist/rules/dispatcher.js.map +1 -1
  220. package/dist/rules/event-rules.d.ts +69 -1
  221. package/dist/rules/event-rules.d.ts.map +1 -1
  222. package/dist/rules/event-rules.js +151 -5
  223. package/dist/rules/event-rules.js.map +1 -1
  224. package/dist/rules/processor.d.ts.map +1 -1
  225. package/dist/rules/processor.js +1 -6
  226. package/dist/rules/processor.js.map +1 -1
  227. package/dist/rules/review-source-tool.js +1 -1
  228. package/dist/rules/rule-group.d.ts +18 -1
  229. package/dist/rules/rule-group.d.ts.map +1 -1
  230. package/dist/rules/rule-group.js +52 -8
  231. package/dist/rules/rule-group.js.map +1 -1
  232. package/dist/rules/run-bearing.d.ts +8 -0
  233. package/dist/rules/run-bearing.d.ts.map +1 -0
  234. package/dist/rules/run-bearing.js +11 -0
  235. package/dist/rules/run-bearing.js.map +1 -0
  236. package/dist/rules/start-coordinator.d.ts +2 -3
  237. package/dist/rules/start-coordinator.d.ts.map +1 -1
  238. package/dist/rules/start-coordinator.js +27 -35
  239. package/dist/rules/start-coordinator.js.map +1 -1
  240. package/dist/rules/tools.js +2 -1
  241. package/dist/rules/tools.js.map +1 -1
  242. package/dist/rules/transition-service.d.ts +16 -0
  243. package/dist/rules/transition-service.d.ts.map +1 -1
  244. package/dist/rules/transition-service.js +34 -12
  245. package/dist/rules/transition-service.js.map +1 -1
  246. package/dist/rules/types.d.ts +18 -5
  247. package/dist/rules/types.d.ts.map +1 -1
  248. package/dist/rules/types.js +2 -1
  249. package/dist/rules/types.js.map +1 -1
  250. package/dist/rules/update-fold.d.ts +32 -0
  251. package/dist/rules/update-fold.d.ts.map +1 -0
  252. package/dist/rules/update-fold.js +60 -0
  253. package/dist/rules/update-fold.js.map +1 -0
  254. package/dist/rules/validation.d.ts.map +1 -1
  255. package/dist/rules/validation.js +54 -6
  256. package/dist/rules/validation.js.map +1 -1
  257. package/dist/session/resource-migration.d.ts.map +1 -1
  258. package/dist/session/resource-migration.js +2 -3
  259. package/dist/session/resource-migration.js.map +1 -1
  260. package/dist/session/run-audit.d.ts +9 -0
  261. package/dist/session/run-audit.d.ts.map +1 -1
  262. package/dist/session/run-audit.js +9 -1
  263. package/dist/session/run-audit.js.map +1 -1
  264. package/dist/session/self-review-gate.d.ts +26 -2
  265. package/dist/session/self-review-gate.d.ts.map +1 -1
  266. package/dist/session/self-review-gate.js +60 -10
  267. package/dist/session/self-review-gate.js.map +1 -1
  268. package/dist/session/session-row-query.d.ts +25 -0
  269. package/dist/session/session-row-query.d.ts.map +1 -0
  270. package/dist/session/session-row-query.js +47 -0
  271. package/dist/session/session-row-query.js.map +1 -0
  272. package/dist/session/session-row-status.d.ts +16 -0
  273. package/dist/session/session-row-status.d.ts.map +1 -0
  274. package/dist/session/session-row-status.js +14 -0
  275. package/dist/session/session-row-status.js.map +1 -0
  276. package/dist/session/session-row-view.d.ts +14 -0
  277. package/dist/session/session-row-view.d.ts.map +1 -0
  278. package/dist/session/session-row-view.js +125 -0
  279. package/dist/session/session-row-view.js.map +1 -0
  280. package/dist/session/session-rows.d.ts +46 -0
  281. package/dist/session/session-rows.d.ts.map +1 -0
  282. package/dist/session/session-rows.js +232 -0
  283. package/dist/session/session-rows.js.map +1 -0
  284. package/dist/session/session-threads.d.ts.map +1 -1
  285. package/dist/session/session-threads.js +1 -0
  286. package/dist/session/session-threads.js.map +1 -1
  287. package/dist/session/source-control-tools.d.ts +14 -7
  288. package/dist/session/source-control-tools.d.ts.map +1 -1
  289. package/dist/session/source-control-tools.js +10 -2
  290. package/dist/session/source-control-tools.js.map +1 -1
  291. package/dist/session/work-item-repository.d.ts +44 -0
  292. package/dist/session/work-item-repository.d.ts.map +1 -1
  293. package/dist/session/work-item-repository.js +80 -1
  294. package/dist/session/work-item-repository.js.map +1 -1
  295. package/dist/session/work-item-state-processor.d.ts.map +1 -1
  296. package/dist/session/work-item-state-processor.js +44 -8
  297. package/dist/session/work-item-state-processor.js.map +1 -1
  298. package/dist/storage/domains/audit/actions.d.ts +2 -1
  299. package/dist/storage/domains/audit/actions.d.ts.map +1 -1
  300. package/dist/storage/domains/audit/actions.js +3 -1
  301. package/dist/storage/domains/audit/actions.js.map +1 -1
  302. package/dist/storage/domains/boards/base.d.ts +162 -14
  303. package/dist/storage/domains/boards/base.d.ts.map +1 -1
  304. package/dist/storage/domains/boards/base.js +415 -41
  305. package/dist/storage/domains/boards/base.js.map +1 -1
  306. package/dist/storage/domains/boards/schemas.d.ts +6 -0
  307. package/dist/storage/domains/boards/schemas.d.ts.map +1 -1
  308. package/dist/storage/domains/boards/schemas.js +93 -3
  309. package/dist/storage/domains/boards/schemas.js.map +1 -1
  310. package/dist/storage/domains/intake/base.d.ts +11 -10
  311. package/dist/storage/domains/intake/base.d.ts.map +1 -1
  312. package/dist/storage/domains/intake/base.js +30 -65
  313. package/dist/storage/domains/intake/base.js.map +1 -1
  314. package/dist/storage/domains/integrations/base.d.ts +0 -2
  315. package/dist/storage/domains/integrations/base.d.ts.map +1 -1
  316. package/dist/storage/domains/integrations/base.js +0 -6
  317. package/dist/storage/domains/integrations/base.js.map +1 -1
  318. package/dist/storage/domains/projects/base.d.ts.map +1 -1
  319. package/dist/storage/domains/projects/base.js +19 -22
  320. package/dist/storage/domains/projects/base.js.map +1 -1
  321. package/dist/storage/domains/source-control/base.d.ts +0 -10
  322. package/dist/storage/domains/source-control/base.d.ts.map +1 -1
  323. package/dist/storage/domains/source-control/base.js +6 -21
  324. package/dist/storage/domains/source-control/base.js.map +1 -1
  325. package/dist/storage/domains/source-control/inmemory.d.ts +1 -1
  326. package/dist/storage/domains/source-control/inmemory.d.ts.map +1 -1
  327. package/dist/storage/domains/source-control/inmemory.js +1 -6
  328. package/dist/storage/domains/source-control/inmemory.js.map +1 -1
  329. package/dist/storage/domains/work-items/base.d.ts +49 -53
  330. package/dist/storage/domains/work-items/base.d.ts.map +1 -1
  331. package/dist/storage/domains/work-items/base.js +152 -156
  332. package/dist/storage/domains/work-items/base.js.map +1 -1
  333. package/dist/storage/domains/work-items/cards.d.ts +3 -2
  334. package/dist/storage/domains/work-items/cards.d.ts.map +1 -1
  335. package/dist/storage/domains/work-items/cards.js +4 -2
  336. package/dist/storage/domains/work-items/cards.js.map +1 -1
  337. package/dist/storage/domains/work-items/work-item-schema.d.ts +12 -3
  338. package/dist/storage/domains/work-items/work-item-schema.d.ts.map +1 -1
  339. package/dist/storage/domains/work-items/work-item-schema.js +12 -3
  340. package/dist/storage/domains/work-items/work-item-schema.js.map +1 -1
  341. package/dist/storage/legacy-collections.d.ts +9 -0
  342. package/dist/storage/legacy-collections.d.ts.map +1 -0
  343. package/dist/storage/legacy-collections.js +17 -0
  344. package/dist/storage/legacy-collections.js.map +1 -0
  345. package/dist/storage/probed-list.d.ts +11 -0
  346. package/dist/storage/probed-list.d.ts.map +1 -0
  347. package/dist/storage/probed-list.js +52 -0
  348. package/dist/storage/probed-list.js.map +1 -0
  349. package/dist/tools/audit-events-tool.d.ts +2 -2
  350. package/dist/tools/read-tools.d.ts +0 -3
  351. package/dist/tools/read-tools.d.ts.map +1 -1
  352. package/dist/tools/read-tools.js +4 -42
  353. package/dist/tools/read-tools.js.map +1 -1
  354. package/dist/tools/session-tools.d.ts.map +1 -1
  355. package/dist/tools/session-tools.js +5 -9
  356. package/dist/tools/session-tools.js.map +1 -1
  357. package/dist/tools/work-item-tools.d.ts +3 -0
  358. package/dist/tools/work-item-tools.d.ts.map +1 -1
  359. package/dist/tools/work-item-tools.js +8 -4
  360. package/dist/tools/work-item-tools.js.map +1 -1
  361. package/dist/work-item-branch.d.ts +4 -0
  362. package/dist/work-item-branch.d.ts.map +1 -1
  363. package/dist/work-item-branch.js +7 -1
  364. package/dist/work-item-branch.js.map +1 -1
  365. package/dist/work-items/card-context-sessions.d.ts +50 -0
  366. package/dist/work-items/card-context-sessions.d.ts.map +1 -0
  367. package/dist/work-items/card-context-sessions.js +84 -0
  368. package/dist/work-items/card-context-sessions.js.map +1 -0
  369. package/dist/work-items/change-requests.d.ts +87 -0
  370. package/dist/work-items/change-requests.d.ts.map +1 -0
  371. package/dist/work-items/change-requests.js +134 -0
  372. package/dist/work-items/change-requests.js.map +1 -0
  373. package/dist/work-items/create-work-item.d.ts +7 -2
  374. package/dist/work-items/create-work-item.d.ts.map +1 -1
  375. package/dist/work-items/create-work-item.js +44 -13
  376. package/dist/work-items/create-work-item.js.map +1 -1
  377. package/dist/work-items/list-related-cards.d.ts.map +1 -1
  378. package/dist/work-items/list-related-cards.js +1 -1
  379. package/dist/work-items/list-related-cards.js.map +1 -1
  380. package/dist/work-items/providers/github.d.ts.map +1 -1
  381. package/dist/work-items/providers/github.js +1 -0
  382. package/dist/work-items/providers/github.js.map +1 -1
  383. package/dist/workspace.d.ts.map +1 -1
  384. package/dist/workspace.js +1 -3
  385. package/dist/workspace.js.map +1 -1
  386. package/factory-skills/configure-factory-rules/SKILL.md +2 -2
  387. package/factory-skills/factory-build/SKILL.md +1 -1
  388. package/factory-skills/factory-plan/SKILL.md +5 -3
  389. package/factory-skills/factory-self-review/SKILL.md +2 -0
  390. package/factory-skills/factory-triage/SKILL.md +1 -1
  391. package/package.json +10 -10
  392. package/dist/session/filesystem-capture.d.ts +0 -50
  393. package/dist/session/filesystem-capture.d.ts.map +0 -1
  394. package/dist/session/filesystem-capture.js +0 -229
  395. package/dist/session/filesystem-capture.js.map +0 -1
  396. package/dist/storage/domains/filesystem/base.d.ts +0 -30
  397. package/dist/storage/domains/filesystem/base.d.ts.map +0 -1
  398. package/dist/storage/domains/filesystem/base.js +0 -78
  399. package/dist/storage/domains/filesystem/base.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.js","names":[],"sources":["../../src/routes/contracts.ts"],"sourcesContent":["import { THINKING_LEVEL_VALUES } from '@mastra/code-sdk/thinking';\nimport type { ThinkingLevelSetting } from '@mastra/code-sdk/thinking';\nimport { validateSkillContent } from '@mastra/core/skills';\nimport { z } from 'zod';\n\nimport { INTAKE_ROUTE_RULE_FIELDS, routeEventsProblem, STATUS_EVENTS } from '../boards/board-events.js';\nimport { storedBoardDefinitionSchema, storedBoardInputSchema, storedPhaseInputSchema } from '../boards/stored-board.js';\nimport { cardRuleGroupSchema, ruleGroupSchema } from '../rules/rule-group.js';\nimport { BOARD_IDENTIFIER_RE, MAX_BOARD_IDENTIFIER_LENGTH } from '../rules/validation.js';\nimport { MAX_INTAKE_ROUTES } from '../storage/domains/boards/base.js';\nimport { FACTORY_MODEL_SCOPES } from '../storage/domains/projects/base.js';\n\nexport const THINKING_LEVELS = THINKING_LEVEL_VALUES as [ThinkingLevelSetting, ...ThinkingLevelSetting[]];\n\nexport type FactoryRouteContract = {\n method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';\n path: string;\n description: string;\n pathSchema?: z.ZodType;\n querySchema?: z.ZodType;\n bodySchema?: z.ZodType;\n responseSchema: z.ZodType;\n};\n\nexport const UUID_PATTERN = '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$';\nconst uuidSchema = z.string().regex(new RegExp(UUID_PATTERN));\nconst entitySchema = z.record(z.string(), z.unknown());\nconst nonEmptyTrimmed = (max: number) => z.string().trim().min(1).max(max);\nconst rawBoundedTrimmed = (max: number) =>\n z\n .string()\n .max(max)\n .transform(value => value.trim())\n .pipe(z.string().min(1));\n/** Card description: trimmed, and blank clears it. */\nconst descriptionSchema = z\n .string()\n .max(8000)\n .transform(value => value.trim() || null)\n .nullable();\nconst trimmedUuidSchema = z.string().trim().regex(new RegExp(UUID_PATTERN));\nconst nullableTrimmed = (max: number) =>\n z.union([\n z\n .string()\n .trim()\n .max(max)\n .transform(value => value || null),\n z.null(),\n ]);\nconst projectPathSchema = z.object({ id: uuidSchema });\nconst projectDecisionPathSchema = z.object({ id: uuidSchema, decisionId: uuidSchema });\nconst boardPathSchema = z.object({ id: uuidSchema, boardKey: z.string().min(1).max(MAX_BOARD_IDENTIFIER_LENGTH) });\nconst boardRevisionSchema = z.number().int().min(1);\n/** Send the `revision` you read so a concurrent edit is not overwritten. */\nexport const boardResetBodySchema = z.object({ expectedRevision: boardRevisionSchema });\n/** A board's definition; send the `revision` you read so a concurrent edit is not overwritten. */\nexport const replaceBoardBodySchema = storedBoardDefinitionSchema.extend({ expectedRevision: boardRevisionSchema });\nexport const boardDeleteQuerySchema = z.object({ expectedRevision: z.coerce.number().int().min(1) });\nconst storedBoardResponseSchema = z.object({\n board: z.object({\n key: z.string(),\n name: z.string(),\n description: z.string().nullable(),\n /** In order; the first phase is where cards start. */\n phases: z.array(storedPhaseInputSchema),\n /**\n * Send it back as `expectedRevision` when editing or resetting. Null for the legacy Review\n * board, which is read-only and not stored.\n */\n revision: z.number().int().nullable(),\n source: z.enum(['builtin', 'app', 'stored']),\n /**\n * True for every board: the boards the project created, the built-in Work board and app boards,\n * whose code behaviour stays attached. Only the retired Review board was read-only.\n */\n editable: z.boolean(),\n /**\n * For a built-in or app board, what its code behaviour holds fixed on each code phase: the\n * phase stays with its kind and the moves code makes from it stay in nextPhases. Null for\n * stored boards.\n */\n codeBehaviour: z\n .record(z.string(), z.object({ requiredNextPhases: z.array(z.string()) }))\n .nullable()\n .optional(),\n /** Problems that do not stop the board from loading, such as a review skill outside the review context. */\n problems: z.array(z.string()),\n }),\n /** Whether the caller may edit or reset this board: organization admins, or anyone with auth disabled. */\n canEdit: z.boolean().optional(),\n});\nconst intakeRoutePathSchema = z.object({ id: uuidSchema, routeId: uuidSchema });\nconst boardIdentifierSchema = z.string().max(MAX_BOARD_IDENTIFIER_LENGTH).regex(BOARD_IDENTIFIER_RE);\nconst intakeRouteTargetSchema = z\n .object({\n boardKey: boardIdentifierSchema,\n /** Unset lands the card in the board's first phase. */\n phaseKey: boardIdentifierSchema.nullable().optional(),\n /**\n * File a pull request on the card of the issue it closes (on `boardKey`) instead of a new card;\n * that card moves to `phaseKey` when its board allows it. Matches no other arrival.\n */\n joinClosedIssue: z.boolean().optional(),\n })\n .strict();\nconst intakeRouteWhenSchema = ruleGroupSchema(INTAKE_ROUTE_RULE_FIELDS);\nconst intakeRouteFields = {\n name: nonEmptyTrimmed(120),\n enabled: z.boolean(),\n /** Which cards the route applies to; null matches every card. Event routes can test `event.type` and `event.reason`. */\n when: intakeRouteWhenSchema.nullable(),\n /** Where matching cards land. */\n target: intakeRouteTargetSchema,\n /** The status events the route handles. `work_item.created` places new cards; the others move existing ones. */\n on: z\n .array(z.enum(STATUS_EVENTS, { error: issue => routeEventsProblem([String(issue.input)], null) ?? undefined }))\n .superRefine((on, ctx) => {\n const problem = routeEventsProblem(on, null);\n if (problem) ctx.addIssue({ code: 'custom', message: problem });\n }),\n};\nexport const intakeRouteInputSchema = z\n .object({\n name: intakeRouteFields.name,\n enabled: intakeRouteFields.enabled.default(true),\n when: intakeRouteFields.when.default(null),\n target: intakeRouteFields.target,\n on: intakeRouteFields.on.optional(),\n })\n .strict();\n/** Changes the named fields; send the `revision` you read so a concurrent edit is not overwritten. */\nexport const intakeRoutePatchSchema = z\n .object({\n name: intakeRouteFields.name.optional(),\n enabled: intakeRouteFields.enabled.optional(),\n when: intakeRouteFields.when.optional(),\n target: intakeRouteFields.target.optional(),\n on: intakeRouteFields.on.optional(),\n expectedRevision: boardRevisionSchema,\n })\n .strict()\n .refine(({ expectedRevision: _revision, ...fields }) => Object.values(fields).some(value => value !== undefined), {\n message: 'Change at least one field.',\n });\nexport const intakeRouteReorderBodySchema = z\n .object({\n /** Every route of the project, once each, in the new order. */\n ids: z\n .array(uuidSchema)\n .min(1)\n .max(MAX_INTAKE_ROUTES)\n .refine(ids => new Set(ids).size === ids.length, { message: 'Each route may appear only once.' }),\n })\n .strict();\nconst intakeRouteSchema = z.object({\n id: z.string(),\n name: z.string(),\n enabled: z.boolean(),\n /** 0 is evaluated first. */\n position: z.number().int(),\n when: intakeRouteWhenSchema.nullable(),\n target: z.object({ boardKey: z.string(), phaseKey: z.string().nullable(), joinClosedIssue: z.boolean() }),\n on: z.array(z.enum(STATUS_EVENTS)),\n /** Send it back as `expectedRevision` when editing or deleting. */\n revision: z.number().int(),\n createdBy: z.string(),\n createdAt: z.string(),\n updatedBy: z.string(),\n updatedAt: z.string(),\n /** Why the route's target can't take cards right now, such as a deleted board; such a route is skipped. */\n problems: z.array(z.string()),\n});\nconst intakeRouteResponseSchema = z.object({ intakeRoute: intakeRouteSchema });\nconst intakeRouteListResponseSchema = z.object({\n intakeRoutes: z.array(intakeRouteSchema),\n /** Whether the caller may add, edit, reorder, or delete routes. */\n canEdit: z.boolean(),\n});\nconst intakeRerouteResponseSchema = z.object({\n total: z.number().int(),\n moves: z.array(z.object({ fromBoard: z.string(), toBoard: z.string(), count: z.number().int() })),\n});\nconst intakeRerouteApplyResponseSchema = z.object({ moved: z.number().int(), skipped: z.number().int() });\nconst workItemPathSchema = z.object({ id: uuidSchema });\nconst transitionPathSchema = z.object({ id: uuidSchema, workItemId: uuidSchema });\n\nconst projectSchema = entitySchema;\nconst projectResponseSchema = z.object({ project: projectSchema });\n\n/**\n * A repository linked to a project, as the project list returns it: fields of the link and of the repository\n * only, never the installation behind the connection.\n */\nexport const projectListRepositorySchema = z.object({\n projectRepositoryId: z.string(),\n connectionId: z.string(),\n integrationId: z.string(),\n repositoryId: z.string(),\n // These three are null when the repository row behind the link is missing.\n externalId: z.string().nullable(),\n slug: z.string().nullable(),\n defaultBranch: z.string().nullable(),\n /** The branch set on the link; null means the repository's default branch. */\n branch: z.string().nullable(),\n sandboxWorkdir: z.string(),\n});\nexport type ProjectListRepository = z.infer<typeof projectListRepositorySchema>;\n\nconst projectListItemSchema = projectSchema.and(z.object({ repositories: z.array(projectListRepositorySchema) }));\nconst cardSchema = z\n .object({\n workItem: z\n .object({\n provider: z.string(),\n key: z.string().nullable(),\n url: z.string().nullable(),\n title: z.string(),\n state: z.string().nullable(),\n labels: z.array(z.string()),\n author: z.string().nullable(),\n })\n .passthrough()\n .optional(),\n })\n .passthrough();\nconst workItemResponseSchema = z.object({ workItem: cardSchema });\nconst decisionResponseSchema = z.object({ decision: entitySchema });\n\nconst runQueueEntrySchema = z.object({\n decisionId: z.string(),\n /** `waiting`: no slot yet. `claimed`: a server holds a slot for it, starting or running the run. */\n state: z.enum(['waiting', 'claimed']),\n type: z.enum(['invokeSkill', 'sendMessage', 'signalActivity']),\n role: z.string().nullable(),\n /** The skill an `invokeSkill` run starts; `null` for a prompt run and for messages and activity. */\n skillName: z.string().nullable(),\n /** When it became claimable for `waiting`, when it was claimed for `claimed`. */\n queuedSince: z.string(),\n workItem: z\n .object({\n id: z.string(),\n key: z.string().nullable(),\n title: z.string(),\n board: z.string().nullable(),\n phase: z.string().nullable(),\n })\n .nullable(),\n});\n\nexport const runQueueResponseSchema = z.object({\n /** This server process's run slots; `null` when it runs no dispatcher. Other servers keep their own. */\n slots: z.object({ scope: z.literal('server'), inUse: z.number().int(), cap: z.number().int() }).nullable(),\n /** The project's runs holding a slot on any server. */\n running: z.number().int(),\n claimed: z.array(runQueueEntrySchema),\n /** Every waiting run, though `queued` lists at most the oldest 50. */\n queuedCount: z.number().int(),\n queued: z.array(runQueueEntrySchema.extend({ position: z.number().int().positive() })),\n});\nexport type RunQueueResponse = z.infer<typeof runQueueResponseSchema>;\n\nexport const createProjectBodySchema = z.object({\n name: nonEmptyTrimmed(200),\n description: nullableTrimmed(2_000).optional().default(null),\n modelScope: z.enum(FACTORY_MODEL_SCOPES).optional(),\n});\n\nexport const updateProjectBodySchema = z\n .object({\n name: nonEmptyTrimmed(200).optional(),\n description: nullableTrimmed(2_000).optional(),\n defaultModelId: nullableTrimmed(200).optional(),\n modelScope: z.enum(FACTORY_MODEL_SCOPES).optional(),\n defaultThinkingLevel: z.enum(THINKING_LEVELS).optional(),\n /** @deprecated Ignored. Each board phase starts its own runs with `autoStart` and `autoStartWhen`. */\n autoRunEnabled: z.boolean().optional(),\n /** @deprecated Ignored. Plans are approved per board with `exitTool.autoApprove`; Work's always wait for a person. */\n autoApprovePlans: z.boolean().optional(),\n /** @deprecated Ignored. The review skill decides whether to publish its test check. */\n reviewTestChecksEnabled: z.boolean().optional(),\n /** @deprecated Ignored. A card is self-reviewed when its board has a self-review phase. */\n selfReviewEnabled: z.boolean().optional(),\n })\n .refine(input => Object.keys(input).length > 0, { message: 'At least one project field is required' });\n\nconst environmentRepositorySchema = z.object({\n projectRepositoryId: z.string(),\n connectionId: z.string(),\n repositoryId: z.string(),\n // Null when the repository row behind the link is missing.\n slug: z.string().nullable(),\n defaultBranch: z.string().nullable(),\n position: z.number().int(),\n inEnvironment: z.boolean(),\n setupCommand: z.string().nullable(),\n teardownCommand: z.string().nullable(),\n lastBuildStatus: z.enum(['unbuilt', 'configured', 'failed']),\n lastBuildError: z.string().nullable(),\n lastBuiltAt: z.string().nullable(),\n});\n\n/** The configured FactorySandbox as factory describes it: provider id, JSON Schema of its settings, capabilities. */\nexport const environmentSandboxSchema = z.object({\n provider: z.string(),\n settingsSchema: z.record(z.string(), z.unknown()),\n capabilities: z.object({\n template: z.boolean(),\n builds: z.object({ available: z.boolean(), history: z.boolean() }),\n }),\n});\n\n/** When the environment builds on its own; present only when the sandbox can build. */\nexport const environmentBuildTriggersSchema = z.object({\n schedule: z.object({\n enabled: z.boolean(),\n cron: z.string().nullable(),\n timezone: z.string().nullable(),\n /** False when the host's storage has no schedules domain; the cron trigger cannot be enabled then. */\n scheduleAvailable: z.boolean(),\n }),\n push: z.object({ enabled: z.boolean(), debounceMinutes: z.number().int() }),\n});\n\n/** The last build factory asked the provider for, from the project row only; status is read live. */\nexport const environmentLastBuildSchema = z.object({ buildId: z.string(), attemptedAt: z.string().nullable() });\n\n/**\n * Names Factory or a sandbox provider injects into the same environment maps.\n * A variable with one of these names would swap a credential or be dropped.\n */\nexport const RESERVED_SANDBOX_ENV_NAMES: readonly RegExp[] = [\n /^GH_TOKEN(_\\d+)?$/,\n /^MASTRA_REPOSITORY_ACCESS_TOKEN(_\\d+)?$/,\n /^MASTRA_BUILD_ENV_REVISION$/,\n];\nexport const MAX_SANDBOX_ENV_VALUE_LENGTH = 32 * 1024;\nexport const sandboxEnvNameSchema = z\n .string()\n .max(128, 'Use at most 128 characters.')\n .regex(/^[A-Za-z_][A-Za-z0-9_]*$/, 'Use letters, digits and underscores, not starting with a digit.')\n .refine(name => !RESERVED_SANDBOX_ENV_NAMES.some(pattern => pattern.test(name)), {\n message: 'This name is reserved by Factory.',\n })\n // Names like `__proto__` or `toString` collide with object built-ins and would be dropped or stick around.\n .refine(name => !(name in Object.prototype), { message: \"This name can't be used.\" });\nexport const sandboxEnvAppliesToSchema = z.enum(['build', 'runtime', 'both']);\nconst sandboxEnvPathSchema = z.object({ id: uuidSchema, name: sandboxEnvNameSchema });\nexport const sandboxEnvSetBodySchema = z.object({\n value: z\n .string()\n .max(MAX_SANDBOX_ENV_VALUE_LENGTH)\n // A NUL byte in an env value makes every spawn fail.\n .refine(value => !value.includes('\\0'), { message: \"Values can't contain NUL characters.\" }),\n appliesTo: sandboxEnvAppliesToSchema,\n});\nexport const sandboxEnvUpdateBodySchema = z.object({ appliesTo: sandboxEnvAppliesToSchema });\n/** A variable as routes return it. There is deliberately no value field. */\nconst sandboxEnvSchema = z.object({\n name: z.string(),\n appliesTo: sandboxEnvAppliesToSchema,\n updatedAt: z.string(),\n updatedBy: z.string(),\n});\nconst sandboxEnvsListResponseSchema = z.object({\n envs: z.array(sandboxEnvSchema),\n /** False when values can't be stored encrypted, so writes are refused. */\n writable: z.boolean(),\n});\nconst sandboxEnvResponseSchema = z.object({ env: sandboxEnvSchema });\n\nexport const projectEnvironmentResponseSchema = z.object({\n environment: z.object({\n sandbox: environmentSandboxSchema,\n /** The stored settings document; only keys the user set. */\n settings: z.record(z.string(), z.unknown()),\n sandboxWorkingDirectory: z.string().nullable(),\n workspaceSetupCommand: z.string().nullable(),\n activeTemplateId: z.string().nullable(),\n activeTemplateHeads: z.record(z.string(), z.string()).nullable(),\n repositories: z.array(environmentRepositorySchema),\n buildTriggers: environmentBuildTriggersSchema.optional(),\n build: environmentLastBuildSchema.nullable().optional(),\n }),\n});\n\nconst environmentBuildStatusSchema = z.enum(['pending', 'building', 'ready', 'failed', 'unknown']);\n\nexport const environmentBuildStartResponseSchema = z.object({\n outcome: z.enum(['started', 'skipped', 'unavailable', 'failed']),\n buildId: z.string().optional(),\n templateId: z.string().optional(),\n reason: z.string().optional(),\n});\n\nexport const environmentBuildSchema = z.object({\n buildId: z.string(),\n status: environmentBuildStatusSchema,\n templateId: z.string().optional(),\n startedAt: z.string().optional(),\n finishedAt: z.string().optional(),\n error: z.string().optional(),\n logs: z.array(z.string()).optional(),\n});\n\nexport const environmentBuildsResponseSchema = z.object({ builds: z.array(environmentBuildSchema) });\nexport const environmentBuildResponseSchema = z.object({ build: environmentBuildSchema });\n\nconst buildPathSchema = projectPathSchema.extend({ buildId: z.string().min(1) });\n\nconst environmentRepositoryPatchSchema = z.object({\n projectRepositoryId: uuidSchema,\n position: z.number().int().min(1).optional(),\n inEnvironment: z.boolean().optional(),\n setupCommand: nullableTrimmed(2_000).optional(),\n teardownCommand: nullableTrimmed(2_000).optional(),\n});\n\nexport const updateProjectEnvironmentBodySchema = z\n .object({\n sandboxWorkingDirectory: nullableTrimmed(1_000)\n .refine(value => value === null || value.startsWith('/'), {\n message: 'sandboxWorkingDirectory must be absolute',\n })\n .optional(),\n /** Partial settings merged onto the stored document; null removes a key. Validated by the FactorySandbox. */\n settings: z.record(z.string(), z.unknown().nullable()).optional(),\n workspaceSetupCommand: nullableTrimmed(2_000).optional(),\n /** Build triggers; only accepted when the sandbox can build. */\n buildTriggers: z\n .object({\n schedule: z\n .object({\n enabled: z.boolean(),\n cron: z.string().trim().min(1).max(100).optional(),\n timezone: z.string().trim().min(1).max(100).optional(),\n })\n .optional(),\n push: z\n .object({\n enabled: z.boolean().optional(),\n debounceMinutes: z.number().int().min(0).max(1_440).optional(),\n })\n .optional(),\n })\n .optional(),\n repositories: z\n .array(environmentRepositoryPatchSchema)\n .max(100)\n .superRefine((entries, ctx) => {\n const ids = new Set(entries.map(entry => entry.projectRepositoryId));\n if (ids.size !== entries.length) {\n ctx.addIssue({ code: 'custom', message: 'Each repository may be listed once' });\n }\n const positions = entries.flatMap(entry => (entry.position === undefined ? [] : [entry.position]));\n if (positions.length === 0) return;\n const expected = Array.from({ length: entries.length }, (_, index) => index + 1);\n if (\n positions.length !== entries.length ||\n [...positions].sort((a, b) => a - b).some((p, i) => p !== expected[i])\n ) {\n ctx.addIssue({\n code: 'custom',\n message: 'Positions must be a permutation of 1..n over the listed repositories',\n });\n }\n })\n .optional(),\n })\n .refine(input => Object.keys(input).length > 0, { message: 'At least one environment field is required' });\n\nconst stagesSchema = z\n .array(\n z\n .string()\n .max(64)\n .regex(/^[a-z0-9][a-z0-9_-]*$/i),\n )\n .min(1)\n .max(16)\n .refine(stages => new Set(stages).size === stages.length, { message: 'Stages must be unique' });\n\nconst externalSourceSchema = z\n .object({\n integrationId: z.string().min(1).max(128),\n type: z.string().min(1).max(128),\n externalId: z.string().min(1).max(512),\n url: z.string().max(2_048).optional(),\n })\n .nullable();\n\nconst sessionSchema = z.object({\n sessionId: z.string().min(1).max(512),\n branch: z.string().min(1).max(512),\n threadId: z.string().min(1).max(512),\n});\n\nconst boundedLimitSchema = (defaultValue: number, max: number) =>\n z\n .string()\n .optional()\n .transform(value => {\n const parsed = value ? Number.parseInt(value, 10) : defaultValue;\n return Number.isFinite(parsed) ? Math.max(1, Math.min(max, parsed)) : defaultValue;\n });\n/** Without `sessionId`, `scope`, `started`, `source` or `workItemId`, the list is the whole board. */\nconst workItemListQuerySchema = z\n .object({\n /** Repeatable. Narrows the list to the cards that hold these sessions and the cards related to them. */\n sessionId: z.array(sessionSchema.shape.sessionId).optional(),\n /** `sessions` narrows the list to the cards that hold any session and the cards related to them. */\n scope: z.enum(['sessions']).optional(),\n /** `false` narrows the list to the cards that hold no session, most recently updated first. */\n started: z.enum(['false']).optional(),\n /** With `started=false`: words that must all be in the card's title, key, number or source id. */\n q: z.string().max(200).optional(),\n /** With `started=false`: how many cards to send. */\n limit: boundedLimitSchema(20, 50),\n /** Repeatable. Narrows the list to the cards filed from these sources, each named by its id or its URL. */\n source: z.array(z.string().min(1).max(512)).min(1).max(100).optional(),\n /**\n * Repeatable. Narrows the list to the cards with these ids; an id no card has lists nothing.\n * Each card comes with the `version` the phases read names it by.\n */\n workItemId: z.array(uuidSchema).min(1).max(100).optional(),\n /**\n * The `cursor` of the whole board this reader holds: the answer is then what moved since. One\n * this server did not issue reads as none, and the board answers whole.\n */\n since: z\n .string()\n .regex(/^\\d{1,15}$/)\n .optional()\n .catch(undefined),\n })\n .refine(query => !(query.scope && query.sessionId), {\n path: ['scope'],\n message: 'Send scope or sessionId, not both',\n })\n .refine(query => !(query.started && (query.scope || query.sessionId)), {\n path: ['started'],\n message: 'Send started without scope or sessionId',\n })\n .refine(query => query.q === undefined || query.started !== undefined, {\n path: ['q'],\n message: 'Send q only with started=false',\n })\n .refine(query => !(query.source && (query.started || query.scope || query.sessionId)), {\n path: ['source'],\n message: 'Send source without started, scope or sessionId',\n })\n .refine(query => !(query.workItemId && (query.source || query.started || query.scope || query.sessionId)), {\n path: ['workItemId'],\n message: 'Send workItemId without source, started, scope or sessionId',\n })\n // A narrowed list is not the board a cursor names, so it answers as it does without one.\n .transform(query =>\n query.sessionId || query.scope || query.started || query.source || query.workItemId\n ? { ...query, since: undefined }\n : query,\n );\n\nconst countSchema = z.number().int().nonnegative();\n\n/** What the draft page's starter buttons count on the project's default board. */\nexport const workItemStartersResponseSchema = z.object({\n failed: countSchema,\n changesRequested: countSchema,\n review: z.object({ count: countSchema, oldestOpenedAt: z.string().optional() }),\n undecided: countSchema,\n untriaged: countSchema,\n unplannedBugs: countSchema,\n sweep: z.object({ area: z.string(), count: countSchema }).optional(),\n stale: countSchema,\n});\n\nexport const workItemActivityQuerySchema = z.object({\n since: z.iso.datetime({ offset: true }).transform(since => Date.parse(since)),\n});\n\n/** When the project's cards were created and completed since an instant, and how many cards it has in all. */\nexport const workItemActivityResponseSchema = z.object({\n total: countSchema,\n createdAt: z.array(z.string()),\n doneAt: z.array(z.string()),\n});\n\nexport const BOARD_PHASES_SORTS = ['recent', 'recent-mine', 'created-newest', 'created-oldest'] as const;\n\n/** Repeatable. The values picked for one filter: a card matches on any of them, and none picks every card. */\nconst pickedValuesSchema = z\n .array(z.string().min(1).max(512))\n .max(100)\n .default([])\n .transform(values => new Set(values));\n\n/** `<phase>:<count>`: how many cards of one phase to list. */\nconst phaseWindowSchema = z\n .string()\n .transform((entry): [phase: string, count: string] => {\n const colon = entry.lastIndexOf(':');\n return [entry.slice(0, Math.max(colon, 0)), entry.slice(colon + 1)];\n })\n .pipe(\n z.tuple([\n boardIdentifierSchema,\n z\n .string()\n .regex(/^[1-9]\\d{0,5}$/)\n .transform(Number),\n ]),\n );\n\n/** One view of a board: its order, its search and filters, and how deep each phase is listed. */\nexport const boardPhasesQuerySchema = z.object({\n /** `recent-mine` puts the cards the signed-in user last moved into the phase before the others. */\n sort: z.enum(BOARD_PHASES_SORTS).default('recent'),\n /** Words that must all be in the card's title, key, number or source id. */\n q: z.string().max(200).optional(),\n /** A provider (`github`, `linear`, `manual`…), or `pull-request` for every card that has one. */\n source: pickedValuesSchema,\n /** Linear project ids. Picked without `source`, they keep Linear cards only. */\n linearProject: pickedValuesSchema,\n /** A card matches when it carries every one of them. */\n label: pickedValuesSchema,\n /** Participant ids (`github:octocat`, `factory:<user id>`) related to the card in any way. */\n teammate: pickedValuesSchema,\n author: pickedValuesSchema,\n assignee: pickedValuesSchema,\n reviewer: pickedValuesSchema,\n /** Factory users who created the card, moved it or started a session on it. */\n worked: pickedValuesSchema,\n /** How many cards each phase lists. */\n limit: boundedLimitSchema(50, 200),\n /**\n * Repeatable `<phase>:<count>`: lists that phase's first `count` cards instead of `limit`.\n * One for a phase the board does not have is ignored.\n */\n window: z\n .array(phaseWindowSchema)\n .max(64)\n .default([])\n .refine(windows => new Set(windows.map(([phase]) => phase)).size === windows.length, {\n message: 'Send one window per phase',\n })\n .transform(windows => new Map(windows)),\n /**\n * A card to answer for wherever it lies: the answer names it with its place in each phase, and\n * `cards=true` sends its body. No phase is listed deeper for it.\n */\n item: uuidSchema.optional(),\n /** `true` also sends the body of every card the answer names. */\n cards: z.enum(['true']).optional(),\n});\n\n/**\n * Names a card and the body the answer was read from. `version` is another value whenever any of\n * the body is, so a reader that holds the card at this version holds this body.\n */\nconst cardStampSchema = z.object({ id: z.string(), version: z.string() });\n\nexport const boardPhasesResponseSchema = z.object({\n /** The board's phases in declaration order. */\n phases: z.array(\n z.object({\n phase: z.string(),\n /** Cards of this phase that match the view. */\n total: countSchema,\n /** The first of them in the view's order: what the reader shows. */\n cards: z.array(cardStampSchema),\n }),\n ),\n /** With `item`: the asked card, when the board holds it. */\n item: cardStampSchema\n .extend({\n /**\n * Each phase the view lists the card under, and how many cards it lists before it there.\n * Empty when the search or filters leave the card out.\n */\n places: z.array(z.object({ phase: z.string(), position: countSchema })),\n })\n .optional(),\n /**\n * Cards related to a listed card or to the asked one that no phase lists: the first `limit` of\n * each card's, in the board's order.\n */\n related: z.array(cardStampSchema),\n /** How many such cards there are, named in `related` or not. */\n relatedTotal: countSchema,\n /** Cards of the board, whatever the search and filters. */\n boardTotal: countSchema,\n /** Cards of the board that match the view, each counted once: a card in two phases is one. */\n matchingTotal: countSchema,\n /** With `cards=true`: the body of every card named in `phases`, `item` and `related`, each with its `version`. */\n workItems: z.array(cardSchema.extend({ version: z.string() })).optional(),\n /** Among the named cards. */\n runningSessionIds: z.array(z.string()),\n parkedSessionIds: z.array(z.string()),\n});\n\n/** What the board's filter menus offer, read over every card of the project. */\nexport const workItemFilterOptionsResponseSchema = z.object({\n /** Every label on a card, sorted. */\n labels: z.array(z.string()),\n /** The people the cards' sources name, sorted by name. `id` is what a people filter sends. */\n people: z.array(\n z.object({\n id: z.string(),\n name: z.string(),\n source: z.enum(['github', 'gitlab', 'linear', 'jira', 'incidentio']),\n }),\n ),\n /** The Factory users who created a card, moved one or started a session on one, sorted. */\n actorIds: z.array(z.string()),\n});\n\nexport type BoardPhasesQuery = z.output<typeof boardPhasesQuerySchema>;\nexport type BoardPhasesResponse = z.infer<typeof boardPhasesResponseSchema>;\nexport type WorkItemFilterOptionsResponse = z.infer<typeof workItemFilterOptionsResponseSchema>;\n\nconst sessionsSchema = z.record(z.string().min(1).max(64), sessionSchema);\nconst metadataSchema = z\n .union([z.record(z.string(), z.unknown()), z.null()])\n .refine(value => {\n try {\n return JSON.stringify(value).length <= 16 * 1024;\n } catch {\n return false;\n }\n }, 'Metadata exceeds 16 KiB')\n .transform(value => {\n if (value === null) return null;\n const {\n factoryRuleMaterializationKey: _materialization,\n factoryPullRequestReconciliation: _reconciliation,\n externalSourceMissingAt: _externalSourceMissingAt,\n ...metadata\n } = value;\n return metadata;\n });\n\nexport const createWorkItemBodySchema = z.object({\n title: rawBoundedTrimmed(500),\n description: descriptionSchema.optional(),\n board: z.string().min(1).max(128).optional(),\n externalSource: externalSourceSchema.optional(),\n parentWorkItemId: uuidSchema.nullable().optional(),\n stages: stagesSchema.optional(),\n sessions: sessionsSchema.optional(),\n metadata: metadataSchema.optional(),\n});\n\nexport const updateWorkItemBodySchema = z\n .object({\n title: rawBoundedTrimmed(500).optional(),\n description: descriptionSchema.optional(),\n board: z.string().min(1).max(128).optional(),\n parentWorkItemId: uuidSchema.nullable().optional(),\n stages: stagesSchema.optional(),\n sessions: sessionsSchema.optional(),\n metadata: metadataSchema.optional(),\n })\n .refine(input => Object.keys(input).length > 0, { message: 'At least one work-item field is required' });\n\nexport const transitionBodySchema = z\n .object({\n board: z.string().max(MAX_BOARD_IDENTIFIER_LENGTH).regex(BOARD_IDENTIFIER_RE),\n stage: z.string().max(MAX_BOARD_IDENTIFIER_LENGTH).regex(BOARD_IDENTIFIER_RE),\n expectedRevision: z.number().int().min(1),\n requestId: trimmedUuidSchema,\n cause: nonEmptyTrimmed(256),\n reenter: z.unknown().optional(),\n })\n .transform(input => ({\n board: input.board,\n stage: input.stage,\n expectedRevision: input.expectedRevision,\n ingress: { type: 'human' as const, identity: input.requestId },\n cause: input.cause,\n ...(input.reenter === true ? { reenter: true } : {}),\n }));\n\nexport const startWorkItemBodySchema = z.object({\n sessionId: trimmedUuidSchema,\n threadTitle: nonEmptyTrimmed(512),\n kickoffKey: trimmedUuidSchema,\n workItem: z.object({\n id: trimmedUuidSchema,\n role: nonEmptyTrimmed(32),\n input: createWorkItemBodySchema,\n }),\n});\n\nexport const automationRunStartBodySchema = z\n .object({\n requestId: trimmedUuidSchema,\n expectedRevision: z.number().int().min(1),\n // Checked against the card's board when the request arrives.\n role: nonEmptyTrimmed(32),\n skillName: nonEmptyTrimmed(128),\n arguments: nonEmptyTrimmed(4_096).optional(),\n })\n .strict();\n\nexport const metricsQuerySchema = z.object({\n from: z.string().optional(),\n to: z.string().optional(),\n});\n\nconst decisionStatusSchema = z.enum([\n 'pending',\n 'proposed',\n 'dismissed',\n 'superseded',\n 'leased',\n 'retry',\n 'succeeded',\n 'failed',\n]);\nconst decisionCursorSchema = z\n .string()\n .optional()\n .transform((value, context) => {\n if (!value) return undefined;\n try {\n const decoded = JSON.parse(Buffer.from(value, 'base64url').toString('utf8')) as unknown;\n if (\n !Array.isArray(decoded) ||\n decoded.length !== 2 ||\n typeof decoded[0] !== 'string' ||\n typeof decoded[1] !== 'string'\n ) {\n throw new Error('invalid cursor');\n }\n const createdAt = new Date(decoded[0]);\n if (Number.isNaN(createdAt.getTime()) || !new RegExp(UUID_PATTERN).test(decoded[1])) {\n throw new Error('invalid cursor');\n }\n return { createdAt, id: decoded[1] };\n } catch {\n context.addIssue({ code: 'custom', message: 'Invalid cursor' });\n return z.NEVER;\n }\n });\n\nexport const decisionQuerySchema = z.object({\n statuses: z\n .string()\n .optional()\n .transform(value => {\n if (!value) return undefined;\n const statuses = [...new Set(value.split(',').map(status => status.trim()))].filter(\n status => decisionStatusSchema.safeParse(status).success,\n ) as Array<z.infer<typeof decisionStatusSchema>>;\n return statuses.length > 0 ? statuses : undefined;\n }),\n before: decisionCursorSchema,\n limit: boundedLimitSchema(25, 50),\n});\n\nconst attentionKindSchema = z.enum(['automation-failed', 'automation-proposed', 'agent-waiting']);\ntype AttentionKind = z.infer<typeof attentionKindSchema>;\ntype AttentionStreamPosition = { occurredAt: Date; id: string };\ntype AttentionCursorMap = Map<AttentionKind, AttentionStreamPosition | undefined>;\n\nfunction parseAttentionStreamPosition(value: unknown): AttentionStreamPosition | undefined {\n if (!Array.isArray(value) || value.length !== 2 || typeof value[0] !== 'string' || typeof value[1] !== 'string') {\n return undefined;\n }\n const occurredAt = new Date(value[0]);\n if (Number.isNaN(occurredAt.getTime()) || !new RegExp(UUID_PATTERN).test(value[1])) return undefined;\n return { occurredAt, id: value[1] };\n}\n\nconst attentionCursorSchema = z\n .string()\n .optional()\n .transform((value, context) => {\n if (!value) return undefined;\n try {\n const decoded: unknown = JSON.parse(Buffer.from(value, 'base64url').toString('utf8'));\n if (Array.isArray(decoded)) {\n const legacy = parseAttentionStreamPosition(decoded);\n if (!legacy) throw new Error('invalid cursor');\n return new Map<AttentionKind, AttentionStreamPosition | undefined>([['automation-failed', legacy]]);\n }\n if (!decoded || typeof decoded !== 'object') throw new Error('invalid cursor');\n const cursors: AttentionCursorMap = new Map();\n for (const [kind, positionValue] of Object.entries(decoded)) {\n const parsedKind = attentionKindSchema.safeParse(kind);\n if (!parsedKind.success) throw new Error('invalid cursor');\n if (positionValue === null) {\n cursors.set(parsedKind.data, undefined);\n continue;\n }\n const position = parseAttentionStreamPosition(positionValue);\n if (!position) throw new Error('invalid cursor');\n cursors.set(parsedKind.data, position);\n }\n if (cursors.size === 0) throw new Error('invalid cursor');\n return cursors;\n } catch {\n context.addIssue({ code: 'custom', message: 'Invalid cursor' });\n return z.NEVER;\n }\n });\n\nexport const attentionQuerySchema = z.object({\n view: z.enum(['open', 'unread', 'archived']).optional().default('open'),\n kind: z.array(attentionKindSchema).optional(),\n before: attentionCursorSchema,\n limit: boundedLimitSchema(25, 50),\n search: z\n .string()\n .optional()\n .transform(value => value?.trim().toLowerCase().slice(0, 200) || undefined),\n});\n\nconst attentionActionPathSchema = z\n .object({\n id: uuidSchema,\n kind: attentionKindSchema,\n sourceId: z.string().min(1).max(256),\n occurrence: z\n .string()\n .regex(/^(0|[1-9]\\d*)$/)\n .transform((value, context) => {\n const occurrence = Number(value);\n if (Number.isSafeInteger(occurrence)) return occurrence;\n context.addIssue({ code: 'custom', message: 'Invalid occurrence' });\n return z.NEVER;\n }),\n })\n .refine(input => new RegExp(UUID_PATTERN).test(input.sourceId), {\n message: 'Invalid attention source id',\n path: ['sourceId'],\n });\n\n/** Largest SKILL.md a project may save as an edit. */\nexport const MAX_SKILL_OVERRIDE_LENGTH = 200_000;\n\nconst skillNameSchema = z\n .string()\n .max(64)\n .regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\nconst skillPathSchema = z.object({ id: uuidSchema, name: skillNameSchema });\nconst skillResponseSchema = z.object({ skill: entitySchema });\n\n/** Adds the runtime's SKILL.md validation errors, checking the frontmatter name against `directoryName` when given. */\nfunction refineSkillContent(content: string, context: z.RefinementCtx, directoryName?: string) {\n const result = validateSkillContent({ content, directoryName });\n for (const message of result.errors) context.addIssue({ code: 'custom', message, path: ['content'] });\n}\n\nconst skillContentSchema = z.string().min(1).max(MAX_SKILL_OVERRIDE_LENGTH);\n\nexport const skillOverrideBodySchema = z\n .object({ content: skillContentSchema })\n .strict()\n .superRefine((input, context) => refineSkillContent(input.content, context));\n\n/**\n * The full save request: the edited SKILL.md must load under the skill's own\n * name, exactly as the runtime validates it.\n */\nexport const skillOverrideSaveRequestSchema = skillPathSchema\n .extend({ content: skillContentSchema })\n .superRefine((input, context) => refineSkillContent(input.content, context, input.name));\n\nexport const FACTORY_ROUTE_CONTRACTS = {\n projectList: {\n method: 'GET',\n path: '/web/factory/projects',\n description: 'List Factory projects for the current organization, each with its linked repositories',\n responseSchema: z.object({ projects: z.array(projectListItemSchema) }),\n },\n projectCreate: {\n method: 'POST',\n path: '/web/factory/projects',\n description: 'Create a Factory project',\n bodySchema: createProjectBodySchema,\n responseSchema: projectResponseSchema,\n },\n projectGet: {\n method: 'GET',\n path: '/web/factory/projects/:id',\n description: 'Get a Factory project',\n pathSchema: projectPathSchema,\n responseSchema: projectResponseSchema,\n },\n projectUpdate: {\n method: 'PATCH',\n path: '/web/factory/projects/:id',\n description: 'Update a Factory project',\n pathSchema: projectPathSchema,\n bodySchema: updateProjectBodySchema,\n responseSchema: projectResponseSchema,\n },\n projectEnvironmentGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/environment',\n description: 'Get the sandbox environment of a Factory project: provider settings and its repositories in order',\n pathSchema: projectPathSchema,\n responseSchema: projectEnvironmentResponseSchema,\n },\n projectEnvironmentUpdate: {\n method: 'PATCH',\n path: '/web/factory/projects/:id/environment',\n description: 'Update the sandbox environment of a Factory project: provider settings, repository order and setup',\n pathSchema: projectPathSchema,\n bodySchema: updateProjectEnvironmentBodySchema,\n responseSchema: projectEnvironmentResponseSchema,\n },\n projectEnvironmentBuild: {\n method: 'POST',\n path: '/web/factory/projects/:id/environment/build',\n description: 'Build the sandbox environment template of a Factory project now',\n pathSchema: projectPathSchema,\n responseSchema: environmentBuildStartResponseSchema,\n },\n projectEnvironmentBuilds: {\n method: 'GET',\n path: '/web/factory/projects/:id/environment/builds',\n description:\n 'List the environment template builds of a Factory project, newest first, when the provider keeps history',\n pathSchema: projectPathSchema,\n responseSchema: environmentBuildsResponseSchema,\n },\n projectEnvironmentBuildGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/environment/builds/:buildId',\n description: 'Get the live status of one environment template build of a Factory project',\n pathSchema: buildPathSchema,\n responseSchema: environmentBuildResponseSchema,\n },\n projectSandboxEnvsList: {\n method: 'GET',\n path: '/web/factory/projects/:id/sandbox-envs',\n description:\n 'List the sandbox environment variables of a Factory project: names and where they apply, never values',\n pathSchema: projectPathSchema,\n responseSchema: sandboxEnvsListResponseSchema,\n },\n projectSandboxEnvSet: {\n method: 'PUT',\n path: '/web/factory/projects/:id/sandbox-envs/:name',\n description: 'Create or replace a sandbox environment variable of a Factory project',\n pathSchema: sandboxEnvPathSchema,\n bodySchema: sandboxEnvSetBodySchema,\n responseSchema: sandboxEnvResponseSchema,\n },\n projectSandboxEnvUpdate: {\n method: 'PATCH',\n path: '/web/factory/projects/:id/sandbox-envs/:name',\n description: 'Change where a sandbox environment variable of a Factory project applies',\n pathSchema: sandboxEnvPathSchema,\n bodySchema: sandboxEnvUpdateBodySchema,\n responseSchema: sandboxEnvResponseSchema,\n },\n projectSandboxEnvDelete: {\n method: 'DELETE',\n path: '/web/factory/projects/:id/sandbox-envs/:name',\n description: 'Delete a sandbox environment variable of a Factory project',\n pathSchema: sandboxEnvPathSchema,\n responseSchema: z.null(),\n },\n projectApplyDefaultModel: {\n method: 'POST',\n path: '/web/factory/projects/:id/apply-default-model',\n description: 'Start applying the Factory default model to running work and review threads in the background',\n pathSchema: projectPathSchema,\n responseSchema: z.object({ modelId: z.string(), status: z.literal('started') }),\n },\n projectDelete: {\n method: 'DELETE',\n path: '/web/factory/projects/:id',\n description: 'Delete a Factory project',\n pathSchema: projectPathSchema,\n responseSchema: z.null(),\n },\n metricsGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/metrics',\n description: 'Get Factory project metrics',\n pathSchema: projectPathSchema,\n querySchema: metricsQuerySchema,\n responseSchema: z.object({ metrics: entitySchema }),\n },\n healthThresholdsGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/health/thresholds',\n description: 'Get queue-health thresholds',\n pathSchema: projectPathSchema,\n responseSchema: z.object({ thresholds: z.array(z.number().finite()) }),\n },\n boardCatalog: {\n method: 'GET',\n path: '/web/factory/projects/:id/boards',\n description: 'List installed Factory boards',\n pathSchema: projectPathSchema,\n responseSchema: z.object({\n boards: z.array(\n z.object({\n id: z.string(),\n /** Absent from servers older than the phase fields. */\n name: z.string().optional(),\n /** @deprecated Use `name`. */\n title: z.string(),\n description: z.string().optional(),\n /** Where the board came from: Factory's built-ins, the app's code, or created through the API. */\n source: z.enum(['builtin', 'app', 'stored']).optional(),\n /** True for every board; only the retired Review board was read-only. */\n editable: z.boolean().optional(),\n /** Problems with the board, such as a runner skill that does not exist. */\n problems: z.array(z.string()).optional(),\n initialPhase: z.string(),\n /**\n * Which phase plays each part of the pull request loop, read from what the phases declare.\n * A part the board has no phase for is absent. Absent from servers older than the loop.\n */\n flow: z\n .object({\n triage: z.string().optional(),\n build: z.string().optional(),\n selfReview: z.string().optional(),\n pullRequestReview: z.string().optional(),\n completed: z.string().optional(),\n canceled: z.string().optional(),\n })\n .optional(),\n phases: z.array(\n z.object({\n id: z.string(),\n name: z.string().optional(),\n /** @deprecated Use `name`. */\n title: z.string(),\n description: z.string().optional(),\n kind: z.enum(['resting', 'working', 'terminal']),\n nextPhases: z.array(z.string()).optional(),\n /** The session context a working phase runs in. */\n context: z.string().optional(),\n /** @deprecated Use `context`. */\n role: z.string().optional(),\n /** The skill the phase's runner starts when a card enters it (`runner.skill`). */\n skill: z.string().optional(),\n /** The objective the phase's runs pursue as a goal (`runner.goal`). */\n goal: z.object({ objective: z.string(), maxRuns: z.number().optional() }).optional(),\n autoStart: z.boolean().optional(),\n /** Cards the phase starts on its own for; absent means every card. */\n autoStartWhen: cardRuleGroupSchema.optional(),\n exitTool: z\n .object({\n id: z.string(),\n autoApprove: z.boolean(),\n /** Cards the exit tool is approved for; absent means every card. */\n autoApproveWhen: cardRuleGroupSchema.optional(),\n })\n .optional(),\n /** Factory tools the phase grants the session working the card there. */\n tools: z.array(z.string()).optional(),\n transitions: z.array(z.object({ outcome: z.string().nullable(), to: z.string() })),\n }),\n ),\n }),\n ),\n /** Stored boards that could not be loaded or that a code board serves in their place, and why. */\n problems: z.array(z.string()).optional(),\n }),\n },\n boardGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/boards/:boardKey',\n description: \"Get a project board's definition\",\n pathSchema: boardPathSchema,\n responseSchema: storedBoardResponseSchema,\n },\n boardPhases: {\n method: 'GET',\n path: '/web/factory/projects/:id/boards/:boardKey/phases',\n description: 'List the cards under each phase of a board view, in order, with how many match',\n pathSchema: boardPathSchema,\n querySchema: boardPhasesQuerySchema,\n responseSchema: boardPhasesResponseSchema,\n },\n boardCreate: {\n method: 'POST',\n path: '/web/factory/projects/:id/boards',\n description: 'Create a board in a Factory project',\n pathSchema: projectPathSchema,\n bodySchema: storedBoardInputSchema,\n responseSchema: storedBoardResponseSchema,\n },\n boardReplace: {\n method: 'PATCH',\n path: '/web/factory/projects/:id/boards/:boardKey',\n description: \"Replace a project board's definition\",\n pathSchema: boardPathSchema,\n bodySchema: replaceBoardBodySchema,\n responseSchema: storedBoardResponseSchema,\n },\n boardReset: {\n method: 'POST',\n path: '/web/factory/projects/:id/boards/:boardKey/reset',\n description: 'Reset a built-in or app board to its code definition',\n pathSchema: boardPathSchema,\n bodySchema: boardResetBodySchema,\n responseSchema: storedBoardResponseSchema,\n },\n boardDelete: {\n method: 'DELETE',\n path: '/web/factory/projects/:id/boards/:boardKey',\n description: 'Delete a board from a Factory project',\n pathSchema: boardPathSchema,\n querySchema: boardDeleteQuerySchema,\n responseSchema: z.null(),\n },\n intakeRouteList: {\n method: 'GET',\n path: '/web/factory/projects/:id/intake-routes',\n description: \"List a Factory project's intake routes in evaluation order\",\n pathSchema: projectPathSchema,\n responseSchema: intakeRouteListResponseSchema,\n },\n intakeRouteGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/intake-routes/:routeId',\n description: 'Get a Factory intake route',\n pathSchema: intakeRoutePathSchema,\n responseSchema: intakeRouteResponseSchema,\n },\n intakeRouteCreate: {\n method: 'POST',\n path: '/web/factory/projects/:id/intake-routes',\n description:\n 'Add an intake route to a Factory project, after its routes; a route that places new cards goes ahead of the first route that takes every new card',\n pathSchema: projectPathSchema,\n bodySchema: intakeRouteInputSchema,\n responseSchema: intakeRouteResponseSchema,\n },\n intakeRouteUpdate: {\n method: 'PATCH',\n path: '/web/factory/projects/:id/intake-routes/:routeId',\n description: 'Change a Factory intake route',\n pathSchema: intakeRoutePathSchema,\n bodySchema: intakeRoutePatchSchema,\n responseSchema: intakeRouteResponseSchema,\n },\n intakeRouteDelete: {\n method: 'DELETE',\n path: '/web/factory/projects/:id/intake-routes/:routeId',\n description: 'Delete a Factory intake route',\n pathSchema: intakeRoutePathSchema,\n querySchema: boardDeleteQuerySchema,\n responseSchema: z.null(),\n },\n intakeRouteReroutePreview: {\n method: 'GET',\n path: '/web/factory/projects/:id/intake-routes/reroute',\n description: \"Untouched cards the project's intake routes would now file on a different board\",\n pathSchema: projectPathSchema,\n responseSchema: intakeRerouteResponseSchema,\n },\n intakeRouteRerouteApply: {\n method: 'POST',\n path: '/web/factory/projects/:id/intake-routes/reroute',\n description: \"Move untouched cards to the start of the board the project's intake routes now file them on\",\n pathSchema: projectPathSchema,\n responseSchema: intakeRerouteApplyResponseSchema,\n },\n intakeRouteReorder: {\n method: 'POST',\n path: '/web/factory/projects/:id/intake-routes/reorder',\n description: \"Reorder a Factory project's intake routes\",\n pathSchema: projectPathSchema,\n bodySchema: intakeRouteReorderBodySchema,\n responseSchema: intakeRouteListResponseSchema,\n },\n workItemList: {\n method: 'GET',\n path: '/web/factory/projects/:id/work-items',\n description: 'List Factory work items and running sessions',\n pathSchema: projectPathSchema,\n querySchema: workItemListQuerySchema,\n responseSchema: z.object({\n /** Every listed card, or with `removedIds` only the cards changed since the `since` sent. */\n workItems: z.array(cardSchema),\n runningSessionIds: z.array(z.string()),\n parkedSessionIds: z.array(z.string()),\n /** With `started=false`: how many cards matched, of which `workItems` holds the first `limit`. */\n total: z.number().int().nonnegative().optional(),\n /** Names this read of the whole board. Absent when the next read must list it whole again. */\n cursor: z.string().optional(),\n /** Cards gone since the `since` sent. Its presence marks an answer that holds only what moved. */\n removedIds: z.array(z.string()).optional(),\n /** With `removedIds`: `boardCheck` of the whole board, for a reader to check its merged copy against. */\n check: z.string().optional(),\n }),\n },\n workItemStarters: {\n method: 'GET',\n path: '/web/factory/projects/:id/work-items/starters',\n description: 'Count the cards behind each new-session starter on the default board',\n pathSchema: projectPathSchema,\n responseSchema: workItemStartersResponseSchema,\n },\n workItemActivity: {\n method: 'GET',\n path: '/web/factory/projects/:id/work-items/activity',\n description: 'List when cards were created and completed since an instant',\n pathSchema: projectPathSchema,\n querySchema: workItemActivityQuerySchema,\n responseSchema: workItemActivityResponseSchema,\n },\n workItemFilterOptions: {\n method: 'GET',\n path: '/web/factory/projects/:id/work-items/filter-options',\n description: 'List the labels and people the cards of a project can be filtered by',\n pathSchema: projectPathSchema,\n responseSchema: workItemFilterOptionsResponseSchema,\n },\n workItemCreate: {\n method: 'POST',\n path: '/web/factory/projects/:id/work-items',\n description: 'Create a work item in Intake',\n pathSchema: projectPathSchema,\n bodySchema: createWorkItemBodySchema,\n responseSchema: workItemResponseSchema,\n },\n workItemUpdate: {\n method: 'PATCH',\n path: '/web/factory/work-items/:id',\n description: 'Update non-stage work-item fields',\n pathSchema: workItemPathSchema,\n bodySchema: updateWorkItemBodySchema,\n responseSchema: workItemResponseSchema,\n },\n workItemDelete: {\n method: 'DELETE',\n path: '/web/factory/work-items/:id',\n description: 'Delete a Factory work item',\n pathSchema: workItemPathSchema,\n responseSchema: z.object({ ok: z.literal(true) }),\n },\n workItemTransition: {\n method: 'POST',\n path: '/web/factory/projects/:id/work-items/:workItemId/transition',\n description: 'Transition a work item with its expected revision',\n pathSchema: transitionPathSchema,\n bodySchema: transitionBodySchema,\n responseSchema: entitySchema,\n },\n workItemStart: {\n method: 'POST',\n path: '/web/factory/projects/:id/runs/start',\n description: 'Explicitly start a Factory work-item run',\n pathSchema: projectPathSchema,\n bodySchema: startWorkItemBodySchema,\n responseSchema: entitySchema,\n },\n workItemAutomationRun: {\n method: 'POST',\n path: '/web/factory/projects/:id/work-items/:workItemId/automation-runs',\n description: 'Enqueue an idempotent deferred skill dispatch for a trusted external orchestrator',\n pathSchema: transitionPathSchema,\n bodySchema: automationRunStartBodySchema,\n responseSchema: entitySchema,\n },\n decisionList: {\n method: 'GET',\n path: '/web/factory/projects/:id/decisions',\n description: 'List Factory decisions',\n pathSchema: projectPathSchema,\n querySchema: decisionQuerySchema,\n responseSchema: z.object({ decisions: z.array(entitySchema), nextCursor: z.string().optional() }),\n },\n runQueue: {\n method: 'GET',\n path: '/web/factory/projects/:id/run-queue',\n description:\n \"List the project's automated runs waiting for a run slot, oldest first, and the runs holding one. The cap is per server process; manual starts are claimed ahead of this queue.\",\n pathSchema: projectPathSchema,\n responseSchema: runQueueResponseSchema,\n },\n decisionApprove: {\n method: 'POST',\n path: '/web/factory/projects/:id/decisions/:decisionId/approve',\n description: 'Approve a proposed Factory decision',\n pathSchema: projectDecisionPathSchema,\n responseSchema: decisionResponseSchema,\n },\n decisionDismiss: {\n method: 'POST',\n path: '/web/factory/projects/:id/decisions/:decisionId/dismiss',\n description: 'Dismiss a proposed Factory decision',\n pathSchema: projectDecisionPathSchema,\n responseSchema: decisionResponseSchema,\n },\n decisionRetry: {\n method: 'POST',\n path: '/web/factory/projects/:id/decisions/:decisionId/retry',\n description: 'Retry a failed retryable Factory decision',\n pathSchema: projectDecisionPathSchema,\n responseSchema: decisionResponseSchema,\n },\n attentionList: {\n method: 'GET',\n path: '/web/factory/projects/:id/attention',\n description: 'List the Factory attention inbox',\n pathSchema: projectPathSchema,\n querySchema: attentionQuerySchema,\n responseSchema: z.object({\n items: z.array(entitySchema),\n kinds: z.record(\n attentionKindSchema,\n z.object({\n open: z.number(),\n unread: z.number(),\n latest: z.object({ key: z.string(), at: z.string(), unread: z.boolean() }).nullable(),\n }),\n ),\n hasMore: z.boolean(),\n nextCursor: z.string().optional(),\n }),\n },\n attentionReadAll: {\n method: 'POST',\n path: '/web/factory/projects/:id/attention/read-all',\n description: 'Mark all Factory attention as read',\n pathSchema: projectPathSchema,\n querySchema: z.object({ before: attentionCursorSchema }),\n responseSchema: z.object({ ok: z.literal(true), hasMore: z.boolean(), nextCursor: z.string().optional() }),\n },\n attentionRead: {\n method: 'POST',\n path: '/web/factory/projects/:id/attention/:kind/:sourceId/:occurrence/read',\n description: 'Mark a Factory attention receipt as read',\n pathSchema: attentionActionPathSchema,\n responseSchema: z.object({ receipt: entitySchema }),\n },\n attentionArchive: {\n method: 'POST',\n path: '/web/factory/projects/:id/attention/:kind/:sourceId/:occurrence/archive',\n description: 'Archive a Factory attention receipt',\n pathSchema: attentionActionPathSchema,\n responseSchema: z.object({ receipt: entitySchema }),\n },\n attentionRestore: {\n method: 'POST',\n path: '/web/factory/projects/:id/attention/:kind/:sourceId/:occurrence/restore',\n description: 'Restore an archived Factory attention receipt',\n pathSchema: attentionActionPathSchema,\n responseSchema: z.object({ receipt: entitySchema }),\n },\n skillList: {\n method: 'GET',\n path: '/web/factory/skills',\n description: \"List Factory skills, with a project's edits when a project is given\",\n querySchema: z.object({ projectId: uuidSchema.optional() }),\n responseSchema: z.object({ skills: z.array(entitySchema), canEdit: z.boolean().optional() }),\n },\n skillOverrideSave: {\n method: 'PUT',\n path: '/web/factory/projects/:id/skills/:name',\n description: \"Save a project's edited SKILL.md for a Factory skill\",\n pathSchema: skillPathSchema,\n bodySchema: skillOverrideBodySchema,\n responseSchema: skillResponseSchema,\n },\n skillOverrideRevert: {\n method: 'DELETE',\n path: '/web/factory/projects/:id/skills/:name',\n description: \"Revert a project's edited Factory skill to its original SKILL.md\",\n pathSchema: skillPathSchema,\n responseSchema: skillResponseSchema,\n },\n} as const satisfies Record<string, FactoryRouteContract>;\n\nexport type FactoryRouteContractKey = keyof typeof FACTORY_ROUTE_CONTRACTS;\n"],"mappings":";;;;;;;;;;AAYA,MAAa,kBAAkB;AAY/B,MAAa,eAAe;AAC5B,MAAM,aAAa,EAAE,OAAO,CAAC,CAAC,MAAM,IAAI,OAAO,YAAY,CAAC;AAC5D,MAAM,eAAe,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC;AACrD,MAAM,mBAAmB,QAAgB,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;AACzE,MAAM,qBAAqB,QACzB,EACG,OAAO,CAAC,CACR,IAAI,GAAG,CAAC,CACR,WAAU,UAAS,MAAM,KAAK,CAAC,CAAC,CAChC,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;;AAE3B,MAAM,oBAAoB,EACvB,OAAO,CAAC,CACR,IAAI,GAAI,CAAC,CACT,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;EACR,MAAM;EACN,aAAa;EACb,YAAY;EACZ,gBAAgB,EAAE,OAAO,EAAE,SAAS,aAAa,CAAC;CACpD;CACA,kBAAkB;EAChB,QAAQ;EACR,MAAM;EACN,aAAa;EACb,YAAY;EACZ,gBAAgB,EAAE,OAAO,EAAE,SAAS,aAAa,CAAC;CACpD;CACA,WAAW;EACT,QAAQ;EACR,MAAM;EACN,aAAa;EACb,aAAa,EAAE,OAAO,EAAE,WAAW,WAAW,SAAS,EAAE,CAAC;EAC1D,gBAAgB,EAAE,OAAO;GAAE,QAAQ,EAAE,MAAM,YAAY;GAAG,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS;EAAE,CAAC;CAC7F;CACA,mBAAmB;EACjB,QAAQ;EACR,MAAM;EACN,aAAa;EACb,YAAY;EACZ,YAAY;EACZ,gBAAgB;CAClB;CACA,qBAAqB;EACnB,QAAQ;EACR,MAAM;EACN,aAAa;EACb,YAAY;EACZ,gBAAgB;CAClB;AACF"}
1
+ {"version":3,"file":"contracts.js","names":[],"sources":["../../src/routes/contracts.ts"],"sourcesContent":["import { THINKING_LEVEL_VALUES } from '@mastra/code-sdk/thinking';\nimport type { ThinkingLevelSetting } from '@mastra/code-sdk/thinking';\nimport { validateSkillContent } from '@mastra/core/skills';\nimport { z } from 'zod';\n\nimport {\n CLOSE_REASONS,\n INTAKE_ROUTE_RULE_FIELDS,\n routeEventsProblem,\n ROUTE_EVENTS,\n STATUS_EVENTS,\n} from '../boards/board-events.js';\nimport { storedBoardDefinitionSchema, storedBoardInputSchema, storedPhaseInputSchema } from '../boards/stored-board.js';\nimport { cardRuleGroupSchema, ruleGroupSchema } from '../rules/rule-group.js';\nimport { BOARD_IDENTIFIER_RE, MAX_BOARD_IDENTIFIER_LENGTH } from '../rules/validation.js';\nimport {\n SESSION_ROW_ALL_OWNERS,\n SESSION_ROW_GROUP_BYS,\n SESSION_ROW_PINS_MAX,\n SESSION_ROW_SORTS,\n SESSION_ROW_STATUSES,\n SESSION_ROW_UPDATED_WITHIN,\n SESSION_ROW_WINDOW_MAX,\n SESSION_ROW_WINDOWS_MAX,\n sessionRowOwnerSchema,\n} from '../session/session-row-query.js';\nimport { MAX_INTAKE_ROUTES_PER_BOARD } from '../storage/domains/boards/base.js';\nimport { FACTORY_MODEL_SCOPES } from '../storage/domains/projects/base.js';\nimport { PULL_REQUEST_STATUSES } from '../work-items/change-requests.js';\nimport type { CardChangeRequest } from '../work-items/change-requests.js';\n\nexport const THINKING_LEVELS = THINKING_LEVEL_VALUES as [ThinkingLevelSetting, ...ThinkingLevelSetting[]];\n\nexport type FactoryRouteContract = {\n method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';\n path: string;\n description: string;\n pathSchema?: z.ZodType;\n querySchema?: z.ZodType;\n bodySchema?: z.ZodType;\n responseSchema: z.ZodType;\n};\n\nexport const UUID_PATTERN = '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$';\nconst uuidSchema = z.string().regex(new RegExp(UUID_PATTERN));\nconst entitySchema = z.record(z.string(), z.unknown());\nconst nonEmptyTrimmed = (max: number) => z.string().trim().min(1).max(max);\nconst rawBoundedTrimmed = (max: number) =>\n z\n .string()\n .max(max)\n .transform(value => value.trim())\n .pipe(z.string().min(1));\n/** Card description: trimmed, and blank clears it. */\nconst descriptionSchema = z\n .string()\n .max(8000)\n .transform(value => value.trim() || null)\n .nullable();\nconst trimmedUuidSchema = z.string().trim().regex(new RegExp(UUID_PATTERN));\nconst nullableTrimmed = (max: number) =>\n z.union([\n z\n .string()\n .trim()\n .max(max)\n .transform(value => value || null),\n z.null(),\n ]);\nconst projectPathSchema = z.object({ id: uuidSchema });\nconst projectDecisionPathSchema = z.object({ id: uuidSchema, decisionId: uuidSchema });\nconst boardPathSchema = z.object({ id: uuidSchema, boardKey: z.string().min(1).max(MAX_BOARD_IDENTIFIER_LENGTH) });\nconst boardRevisionSchema = z.number().int().min(1);\n/** Send the `revision` you read so a concurrent edit is not overwritten. */\nexport const boardResetBodySchema = z.object({ expectedRevision: boardRevisionSchema });\n/** A board's definition; send the `revision` you read so a concurrent edit is not overwritten. */\nexport const replaceBoardBodySchema = storedBoardDefinitionSchema.extend({ expectedRevision: boardRevisionSchema });\nexport const boardDeleteQuerySchema = z.object({ expectedRevision: z.coerce.number().int().min(1) });\nconst storedBoardResponseSchema = z.object({\n board: z.object({\n key: z.string(),\n name: z.string(),\n description: z.string().nullable(),\n /** In order; the first phase is where cards start. */\n phases: z.array(storedPhaseInputSchema),\n /**\n * Send it back as `expectedRevision` when editing or resetting. Null for the legacy Review\n * board, which is read-only and not stored.\n */\n revision: z.number().int().nullable(),\n source: z.enum(['builtin', 'app', 'stored']),\n /**\n * True for every board: the boards the project created, the built-in Work board and app boards,\n * whose code behaviour stays attached. Only the retired Review board was read-only.\n */\n editable: z.boolean(),\n /**\n * For a built-in or app board, what its code behaviour holds fixed on each code phase: the\n * phase stays with its kind and the moves code makes from it stay in nextPhases. Null for\n * stored boards.\n */\n codeBehaviour: z\n .record(z.string(), z.object({ requiredNextPhases: z.array(z.string()) }))\n .nullable()\n .optional(),\n /** Problems that do not stop the board from loading, such as a review skill outside the review context. */\n problems: z.array(z.string()),\n }),\n /** Whether the caller may edit or reset this board: organization admins, or anyone with auth disabled. */\n canEdit: z.boolean().optional(),\n});\nconst intakeRoutePathSchema = z.object({ id: uuidSchema, routeId: uuidSchema });\nconst boardIdentifierSchema = z.string().max(MAX_BOARD_IDENTIFIER_LENGTH).regex(BOARD_IDENTIFIER_RE);\nconst intakeRouteTargetSchema = z\n .object({\n boardKey: boardIdentifierSchema,\n /** Unset lands the card in the board's first phase. */\n phaseKey: boardIdentifierSchema.nullable().optional(),\n /**\n * File a pull request on the card of the issue it closes (on `boardKey`) instead of a new card;\n * that card moves to `phaseKey` when its board allows it. Matches no other arrival.\n */\n joinClosedIssue: z.boolean().optional(),\n /**\n * On a route moving existing cards on later events, the board the card moves to, at `phaseKey`;\n * `boardKey` stays the board whose cards the route moves. Unset keeps the card on `boardKey`.\n */\n moveToBoardKey: boardIdentifierSchema.nullable().optional(),\n })\n .strict();\nconst intakeRouteWhenSchema = ruleGroupSchema(INTAKE_ROUTE_RULE_FIELDS);\nconst intakeRouteFields = {\n name: nonEmptyTrimmed(120),\n enabled: z.boolean(),\n /** Which cards the route applies to; null matches every card. Event routes can test `event.type` and `event.reason`. */\n when: intakeRouteWhenSchema.nullable(),\n /** Where matching cards land. */\n target: intakeRouteTargetSchema,\n /**\n * The events the route handles. `work_item.opened` files new issues and `pull_request.opened` new\n * pull requests with no card (and moves the card of an issue whose pull request opens); the others\n * move existing cards. `work_item.created`, the legacy event, files both and is kept as written.\n */\n on: z\n .array(z.enum(ROUTE_EVENTS, { error: issue => routeEventsProblem([String(issue.input)], null) ?? undefined }))\n .superRefine((on, ctx) => {\n const problem = routeEventsProblem(on, null);\n if (problem) ctx.addIssue({ code: 'custom', message: problem });\n }),\n};\nexport const intakeRouteInputSchema = z\n .object({\n name: intakeRouteFields.name,\n enabled: intakeRouteFields.enabled.default(true),\n when: intakeRouteFields.when.default(null),\n target: intakeRouteFields.target,\n on: intakeRouteFields.on.optional(),\n /** Restores a route read with `pullRequestOpenedMovesOnly` as it was: moving cards on `pull_request.opened`, filing none. */\n pullRequestOpenedMovesOnly: z.literal(true).optional(),\n })\n .strict();\n/** Changes the named fields; send the `revision` you read so a concurrent edit is not overwritten. */\nexport const intakeRoutePatchSchema = z\n .object({\n name: intakeRouteFields.name.optional(),\n enabled: intakeRouteFields.enabled.optional(),\n when: intakeRouteFields.when.optional(),\n target: intakeRouteFields.target.optional(),\n on: intakeRouteFields.on.optional(),\n expectedRevision: boardRevisionSchema,\n })\n .strict()\n .refine(({ expectedRevision: _revision, ...fields }) => Object.values(fields).some(value => value !== undefined), {\n message: 'Change at least one field.',\n });\n/** Bounds a whole-project reorder, which names every rule of every board. */\nconst MAX_PROJECT_INTAKE_ROUTES = 10_000;\nexport const intakeRouteReorderBodySchema = z\n .object({\n /** Reorders only this board's rules, within the places they hold; omitted, the whole project's. */\n boardKey: z.string().min(1).max(MAX_BOARD_IDENTIFIER_LENGTH).optional(),\n /** Every rule of the board (or of the project), once each, in the new order. */\n ids: z\n .array(uuidSchema)\n .min(1)\n .max(MAX_PROJECT_INTAKE_ROUTES)\n .refine(ids => new Set(ids).size === ids.length, { message: 'Each route may appear only once.' }),\n })\n .strict()\n .refine(({ boardKey, ids }) => boardKey === undefined || ids.length <= MAX_INTAKE_ROUTES_PER_BOARD, {\n message: `A board has at most ${MAX_INTAKE_ROUTES_PER_BOARD} intake rules.`,\n path: ['ids'],\n });\nconst intakeRouteSchema = z.object({\n id: z.string(),\n name: z.string(),\n enabled: z.boolean(),\n /** 0 is evaluated first. */\n position: z.number().int(),\n when: intakeRouteWhenSchema.nullable(),\n target: z.object({\n boardKey: z.string(),\n phaseKey: z.string().nullable(),\n joinClosedIssue: z.boolean(),\n moveToBoardKey: z.string().nullable(),\n }),\n on: z.array(z.enum(ROUTE_EVENTS)),\n /**\n * True on a route stored by 0.28 naming `pull_request.opened`: there it only moves a card, and\n * files no pull request, through every edit. Add a route to file pull requests.\n */\n pullRequestOpenedMovesOnly: z.literal(true).optional(),\n /** Send it back as `expectedRevision` when editing or deleting. */\n revision: z.number().int(),\n createdBy: z.string(),\n createdAt: z.string(),\n updatedBy: z.string(),\n updatedAt: z.string(),\n /** Why the route's target can't take cards right now, such as a deleted board; such a route is skipped. */\n problems: z.array(z.string()),\n});\nconst intakeRouteResponseSchema = z.object({ intakeRoute: intakeRouteSchema });\nconst intakeRouteListResponseSchema = z.object({\n intakeRoutes: z.array(intakeRouteSchema),\n /** Whether the caller may add, edit, reorder, or delete routes. */\n canEdit: z.boolean(),\n});\nconst intakeRerouteResponseSchema = z.object({\n total: z.number().int(),\n moves: z.array(z.object({ fromBoard: z.string(), toBoard: z.string(), count: z.number().int() })),\n});\nconst intakeRerouteApplyResponseSchema = z.object({ moved: z.number().int(), skipped: z.number().int() });\nconst intakeRouteListQuerySchema = z\n .object({\n /** Lists only this board's rules, in their order. */\n boardKey: z.string().min(1).max(MAX_BOARD_IDENTIFIER_LENGTH).optional(),\n })\n .strict();\nconst intakeOrderResponseSchema = z.object({\n /** Every board of the project, in the order intake asks them. */\n boards: z.array(z.object({ boardKey: z.string(), name: z.string() })),\n /**\n * `derived` follows the rule list until an admin sets the order; then it is `explicit`. A project\n * created with intake order has its own order from the start, so it is `explicit` from the start.\n */\n origin: z.enum(['derived', 'explicit']),\n /** Which evaluator places the project's new items now: `route-list` (the old one) or `intake-order`. */\n evaluator: z.enum(['route-list', 'intake-order']),\n /**\n * What decided `evaluator`: the Factory's `intake.evaluator` option or `FACTORY_INTAKE_EVALUATOR`\n * (forced on every project), the project's own setting, or none (a project from before the\n * setting, on `route-list`).\n */\n evaluatorSource: z.enum(['option', 'env', 'project', 'legacy']),\n /** The project's own setting, used unless one is forced; null for a project from before the setting. */\n projectEvaluator: z.enum(['route-list', 'intake-order']).nullable(),\n /** Both evaluators run over the project's newest 200 items against this order, worked out on each read. */\n comparison: z.object({\n compared: z.number().int(),\n differing: z.number().int(),\n notRouted: z.number().int(),\n }),\n /** Whether the caller may change the order. */\n canEdit: z.boolean(),\n});\nexport const intakeOrderBodySchema = z\n .object({\n /** Every board of the project, once each, in the new order. */\n boardKeys: z\n .array(z.string().min(1).max(MAX_BOARD_IDENTIFIER_LENGTH))\n .min(1)\n .max(MAX_PROJECT_INTAKE_ROUTES)\n .refine(keys => new Set(keys).size === keys.length, { message: 'Each board may appear only once.' })\n .optional(),\n /** Switches the project's evaluator; a forced one still wins until it is unset. */\n evaluator: z.enum(['route-list', 'intake-order']).optional(),\n })\n .strict()\n .refine(body => body.boardKeys !== undefined || body.evaluator !== undefined, {\n message: 'Name the boardKeys, the evaluator, or both.',\n });\nconst intakeDecisionSchema = z.object({\n id: z.string(),\n outcome: z.enum(['placed', 'not_routed', 'rule_skipped', 'rule_retired']),\n evaluator: z.enum(['route-list', 'intake-order']),\n boardKey: z.string().nullable(),\n routeId: z.string().nullable(),\n /** Why no board took it. */\n reason: z.string().nullable(),\n sourceKey: z.string().nullable(),\n title: z.string(),\n url: z.string().nullable(),\n decidedAt: z.string(),\n});\nconst intakeNotRoutedQuerySchema = z\n .object({\n limit: z.coerce.number().int().min(1).max(100).optional(),\n /** The `nextCursor` of the page before. */\n cursor: z.string().min(1).max(200).optional(),\n })\n .strict();\nconst intakeNotRoutedResponseSchema = z.object({\n /** Oldest first. */\n notRouted: z.array(intakeDecisionSchema),\n /** Pass as `cursor` for the next page; null on the last. */\n nextCursor: z.string().nullable(),\n /** Whether the caller may route an item again. */\n canEdit: z.boolean(),\n});\nconst intakeSkippedResponseSchema = z.object({\n /** Card-move rules that matched but whose target couldn't take the card, in the last 30 days. */\n skipped: z.array(z.object({ routeId: z.string(), count: z.number().int(), latest: intakeDecisionSchema })),\n});\nconst intakeDecisionPathSchema = z.object({ id: uuidSchema, decisionId: uuidSchema });\nconst intakeRouteAgainResponseSchema = z.object({\n /** The item is queued to be filed here; the card appears once the dispatcher files it. */\n status: z.literal('queued'),\n boardKey: z.string(),\n phaseKey: z.string(),\n routeId: z.string(),\n});\n/** A board's rules as edited, not saved yet: they stand in for all of that board's rules. */\nconst intakeDraftBoardSchema = z\n .object({\n boardKey: z.string().min(1).max(MAX_BOARD_IDENTIFIER_LENGTH),\n routes: z\n .array(\n z\n .object({\n /** The saved rule this edits, so its counts line up; omitted for a new rule. */\n id: uuidSchema.optional(),\n name: intakeRouteFields.name,\n enabled: intakeRouteFields.enabled.default(true),\n when: intakeRouteFields.when.default(null),\n target: z\n .object({\n phaseKey: z.string().min(1).max(MAX_BOARD_IDENTIFIER_LENGTH).nullable().optional(),\n /** On a card-move rule: the board the card moves to; unset keeps it on this board. */\n moveToBoardKey: intakeRouteTargetSchema.shape.moveToBoardKey,\n /** On a pull request rule: join the card of the issue it closes, as the saved rule does. */\n joinClosedIssue: z.boolean().optional(),\n })\n .strict(),\n on: intakeRouteFields.on.optional(),\n })\n .strict(),\n )\n .max(MAX_INTAKE_ROUTES_PER_BOARD),\n })\n .strict();\nconst intakeDraftFields = {\n /** Unsaved rules, board by board; boards not named run their saved rules. */\n boards: z\n .array(intakeDraftBoardSchema)\n .max(MAX_PROJECT_INTAKE_ROUTES)\n .refine(boards => new Set(boards.map(board => board.boardKey)).size === boards.length, {\n message: 'Each board may appear only once.',\n })\n .optional(),\n /** An unsaved intake order; omitted, the saved one. */\n order: intakeOrderBodySchema.shape.boardKeys.optional(),\n};\nexport const intakeDryRunBodySchema = z.object(intakeDraftFields).strict();\nconst intakePlacementSchema = z.object({ boardKey: z.string(), routeId: z.string(), phase: z.string() });\nconst intakeKeysByBoardSchema = z.array(z.object({ boardKey: z.string(), keys: z.array(z.string()) }));\nconst intakeDryRunResponseSchema = z.object({\n /**\n * The evaluator that files this project's items. Both endpoints always answer as `intake-order`;\n * under `route-list` filing can land items elsewhere, such as on the default board.\n */\n evaluator: z.enum(['route-list', 'intake-order']),\n /** How many of the project's newest items (at most 200) were decided, from their stored facts. */\n sampled: z.number().int(),\n /** Every board in intake order, with what it and each of its rules would take. */\n boards: z.array(\n z.object({\n boardKey: z.string(),\n name: z.string(),\n /** Keys of the items the board would take. */\n takes: z.array(z.string()),\n /** Items its rules matched that another board took first, by that board. */\n lostTo: intakeKeysByBoardSchema,\n rules: z.array(\n z.object({\n /** A rule not saved yet reads `draft:<boardKey>:<index>`. */\n routeId: z.string(),\n name: z.string().nullable(),\n enabled: z.boolean(),\n takes: z.array(z.string()),\n /** Items it matched but an earlier rule took, by the board that took them. */\n lost: intakeKeysByBoardSchema,\n /** Cards it actually filed in the last 30 days. */\n filed: z.number().int(),\n }),\n ),\n }),\n ),\n /** Keys of the items no board would take. */\n notRouted: z.array(z.string()),\n /** With unsaved rules or order: how many items land somewhere other than the saved ones put them. */\n changed: z.number().int().optional(),\n items: z.array(\n z.object({\n key: z.string(),\n /** The card's id, or the Not routed decision's. */\n id: z.string(),\n kind: z.enum(['card', 'not_routed']),\n title: z.string(),\n url: z.string().nullable(),\n placement: intakePlacementSchema.nullable(),\n /** Every rule that matched and could take it, in the order intake asked them; the first won. */\n matched: z.array(z.object({ boardKey: z.string(), routeId: z.string() })),\n /** With unsaved rules or order: where the saved ones put it. */\n before: intakePlacementSchema.nullable().optional(),\n }),\n ),\n /** Whether the caller may run unsaved rules or order. */\n canEdit: z.boolean(),\n});\n/** The most labels or assignees one test event may name on each side. */\nconst MAX_TEST_EVENT_NAMES = 100;\nconst itemChangeSchema = z\n .object({\n added: z.array(z.string().min(1).max(500)).max(MAX_TEST_EVENT_NAMES).default([]),\n removed: z.array(z.string().min(1).max(500)).max(MAX_TEST_EVENT_NAMES).default([]),\n })\n .strict();\n/** A status event as card-move rules read it. */\nconst intakeTestEventSchema = z\n .object({\n type: z.enum(STATUS_EVENTS),\n /** On `work_item.closed`. */\n reason: z.enum(CLOSE_REASONS).optional(),\n /** On an update: the labels and assignees it changed. */\n labels: itemChangeSchema.optional(),\n assignees: itemChangeSchema.optional(),\n /** On a pull request event: whether that pull request's author is trusted. */\n pullRequestTrusted: z.boolean().optional(),\n })\n .strict();\nexport const intakeTestBodySchema = z\n .object({\n ...intakeDraftFields,\n /** An issue or pull request URL; one the Factory has never seen is fetched once, read-only, from a linked source. */\n url: z.string().trim().url().max(2000).optional(),\n /** A recent item: a card's id, or a Not routed decision's. */\n itemId: uuidSchema.optional(),\n /** A status event to try on the item's card, as if it had just happened; its recent events are replayed either way. */\n event: intakeTestEventSchema.optional(),\n })\n .strict()\n .refine(body => (body.url === undefined) !== (body.itemId === undefined), {\n message: 'Send either a url or an itemId.',\n });\nconst failedConditionSchema = z.object({\n field: z.string(),\n operator: z.string(),\n value: z.unknown().optional(),\n /** The item's value for the field; null when it has none. */\n actual: z.unknown(),\n});\nconst intakeTestResponseSchema = z.object({\n item: z.object({\n title: z.string(),\n url: z.string().nullable(),\n /** `card` and `not_routed` are items the Factory has; `fetched` was read from its provider for this test. */\n kind: z.enum(['card', 'not_routed', 'fetched']),\n id: z.string().nullable(),\n }),\n placement: intakePlacementSchema.nullable(),\n /** Why no board takes it. */\n reason: z.string().nullable(),\n /** What this answer leaves out, such as a fetched pull request joining an existing card instead. */\n note: z.string().nullable(),\n /**\n * The evaluator that files this project's items. Both endpoints always answer as `intake-order`;\n * under `route-list` filing can land items elsewhere, such as on the default board.\n */\n evaluator: z.enum(['route-list', 'intake-order']),\n /** Every board in intake order and every placing rule on it, with what it answered. */\n boards: z.array(\n z.object({\n boardKey: z.string(),\n name: z.string(),\n rules: z.array(\n z.object({\n routeId: z.string(),\n name: z.string().nullable(),\n phase: z.string(),\n /** `took` decides; `lost` matched after the rule that took it; `phase_refuses` matched but its phase can't hold the item. */\n outcome: z.enum(['took', 'lost', 'no_match', 'phase_refuses', 'disabled']),\n /** With `no_match`: the conditions it failed on. */\n failed: z.array(failedConditionSchema).optional(),\n /** With `lost`: the rule that took it. */\n to: z.object({ boardKey: z.string(), routeId: z.string() }).optional(),\n }),\n ),\n }),\n ),\n /** On a card: where it is now, and the intake rule that filed it, if one did. */\n current: z.object({ boardKey: z.string(), phase: z.string().nullable(), routeId: z.string().nullable() }).nullable(),\n /**\n * On a card: the event sent in the request, then its recent status events newest first, each\n * replayed against today's rules (or the draft) and the card as it is now.\n */\n moves: z.array(\n z.object({\n /** The stored event's decision; null for the event sent in the request. */\n decisionId: z.string().nullable(),\n at: z.string().nullable(),\n event: z.object({\n type: z.enum(STATUS_EVENTS),\n reason: z.enum(CLOSE_REASONS).optional(),\n labels: z.object({ added: z.array(z.string()), removed: z.array(z.string()) }).optional(),\n assignees: z.object({ added: z.array(z.string()), removed: z.array(z.string()) }).optional(),\n pullRequestTrusted: z.boolean().optional(),\n }),\n /**\n * `moves` to `to`; `stays` where it is; `rule_default` leaves it to the integration's own move\n * (to `phase`, when there is one) because no rule takes it; `ignored` when the event can't move\n * a card in its state, with `reason`; `unknown` when an update burst reaches back past the\n * history read, with `reason`.\n */\n outcome: z.enum(['moves', 'stays', 'rule_default', 'ignored', 'unknown']),\n to: z.object({ boardKey: z.string(), phase: z.string(), routeId: z.string() }).nullable(),\n phase: z.string().nullable(),\n reason: z.string().nullable(),\n /** Every rule on the card's board that handles the event, top to bottom. */\n rules: z.array(\n z.object({\n routeId: z.string(),\n name: z.string().nullable(),\n /** `skipped` matched but its target board or phase can't take the card, with `reason`. */\n outcome: z.enum(['took', 'lost', 'no_match', 'skipped', 'disabled']),\n failed: z.array(failedConditionSchema).optional(),\n to: z.object({ boardKey: z.string(), routeId: z.string() }).optional(),\n reason: z.string().optional(),\n }),\n ),\n }),\n ),\n});\nconst workItemPathSchema = z.object({ id: uuidSchema });\nconst transitionPathSchema = z.object({ id: uuidSchema, workItemId: uuidSchema });\n\nconst projectSchema = entitySchema;\nconst projectResponseSchema = z.object({ project: projectSchema });\n\n/**\n * A repository linked to a project, as the project list returns it: fields of the link and of the repository\n * only, never the installation behind the connection.\n */\nexport const projectListRepositorySchema = z.object({\n projectRepositoryId: z.string(),\n connectionId: z.string(),\n integrationId: z.string(),\n repositoryId: z.string(),\n // These three are null when the repository row behind the link is missing.\n externalId: z.string().nullable(),\n slug: z.string().nullable(),\n defaultBranch: z.string().nullable(),\n /** The branch set on the link; null means the repository's default branch. */\n branch: z.string().nullable(),\n});\nexport type ProjectListRepository = z.infer<typeof projectListRepositorySchema>;\n\nconst projectListItemSchema = projectSchema.and(z.object({ repositories: z.array(projectListRepositorySchema) }));\nconst cardSchema = z\n .object({\n workItem: z\n .object({\n provider: z.string(),\n key: z.string().nullable(),\n url: z.string().nullable(),\n title: z.string(),\n state: z.string().nullable(),\n labels: z.array(z.string()),\n author: z.string().nullable(),\n })\n .passthrough()\n .optional(),\n })\n .passthrough();\nconst workItemResponseSchema = z.object({ workItem: cardSchema });\nconst decisionResponseSchema = z.object({ decision: entitySchema });\n\nconst runQueueEntrySchema = z.object({\n decisionId: z.string(),\n /** `waiting`: no slot yet. `claimed`: a server holds a slot for it, starting or running the run. */\n state: z.enum(['waiting', 'claimed']),\n type: z.enum(['invokeSkill', 'sendMessage', 'signalActivity']),\n /**\n * `interactive`: a reply a person sent on the card's pull request or issue,\n * claimed ahead of automated runs into its own reserve of slots.\n * `automated`: everything else.\n */\n lane: z.enum(['automated', 'interactive']),\n role: z.string().nullable(),\n /** The skill an `invokeSkill` run starts; `null` for a prompt run and for messages and activity. */\n skillName: z.string().nullable(),\n /** When it became claimable for `waiting`, when it was claimed for `claimed`. */\n queuedSince: z.string(),\n workItem: z\n .object({\n id: z.string(),\n key: z.string().nullable(),\n title: z.string(),\n board: z.string().nullable(),\n phase: z.string().nullable(),\n })\n .nullable(),\n});\n\nexport const runQueueResponseSchema = z.object({\n /** This server process's run slots; `null` when it runs no dispatcher. Other servers keep their own. */\n slots: z\n .object({\n scope: z.literal('server'),\n /** Automated run slots, including any a person's reply borrowed once its reserve was full. */\n inUse: z.number().int(),\n cap: z.number().int(),\n /** Slots kept for people's replies, on top of `cap`. */\n interactive: z.object({ inUse: z.number().int(), cap: z.number().int() }),\n })\n .nullable(),\n /** The project's runs holding a slot on any server. */\n running: z.number().int(),\n claimed: z.array(runQueueEntrySchema),\n /** Every waiting run, though `queued` lists at most 50. */\n queuedCount: z.number().int(),\n /** `queuedCount` split by lane. */\n queuedByLane: z.object({ automated: z.number().int(), interactive: z.number().int() }),\n /**\n * Waiting replies, then automated runs, each oldest first: interactive runs are claimed before\n * automated ones. `position` counts within the run's lane.\n */\n queued: z.array(runQueueEntrySchema.extend({ position: z.number().int().positive() })),\n});\nexport type RunQueueResponse = z.infer<typeof runQueueResponseSchema>;\n\nexport const createProjectBodySchema = z.object({\n name: nonEmptyTrimmed(200),\n description: nullableTrimmed(2_000).optional().default(null),\n modelScope: z.enum(FACTORY_MODEL_SCOPES).optional(),\n});\n\nexport const updateProjectBodySchema = z\n .object({\n name: nonEmptyTrimmed(200).optional(),\n description: nullableTrimmed(2_000).optional(),\n defaultModelId: nullableTrimmed(200).optional(),\n modelScope: z.enum(FACTORY_MODEL_SCOPES).optional(),\n defaultThinkingLevel: z.enum(THINKING_LEVELS).optional(),\n /** @deprecated Ignored. Each board phase starts its own runs with `autoStart` and `autoStartWhen`. */\n autoRunEnabled: z.boolean().optional(),\n /** @deprecated Ignored. Plans are approved per board with `exitTool.autoApprove`; Work's always wait for a person. */\n autoApprovePlans: z.boolean().optional(),\n /** @deprecated Ignored. The review skill decides whether to publish its test check. */\n reviewTestChecksEnabled: z.boolean().optional(),\n /** @deprecated Ignored. A card is self-reviewed when its board has a self-review phase. */\n selfReviewEnabled: z.boolean().optional(),\n })\n .refine(input => Object.keys(input).length > 0, { message: 'At least one project field is required' });\n\nconst environmentRepositorySchema = z.object({\n projectRepositoryId: z.string(),\n connectionId: z.string(),\n repositoryId: z.string(),\n // Null when the repository row behind the link is missing.\n slug: z.string().nullable(),\n defaultBranch: z.string().nullable(),\n position: z.number().int(),\n inEnvironment: z.boolean(),\n setupCommand: z.string().nullable(),\n teardownCommand: z.string().nullable(),\n lastBuildStatus: z.enum(['unbuilt', 'configured', 'failed']),\n lastBuildError: z.string().nullable(),\n});\n\n/** The configured FactorySandbox as factory describes it: provider id, JSON Schema of its settings, capabilities. */\nexport const environmentSandboxSchema = z.object({\n provider: z.string(),\n settingsSchema: z.record(z.string(), z.unknown()),\n capabilities: z.object({\n template: z.boolean(),\n builds: z.object({ available: z.boolean(), history: z.boolean() }),\n }),\n});\n\n/** When the environment builds on its own; present only when the sandbox can build. */\nexport const environmentBuildTriggersSchema = z.object({\n schedule: z.object({\n enabled: z.boolean(),\n cron: z.string().nullable(),\n timezone: z.string().nullable(),\n /** False when the host's storage has no schedules domain; the cron trigger cannot be enabled then. */\n scheduleAvailable: z.boolean(),\n }),\n push: z.object({ enabled: z.boolean(), debounceMinutes: z.number().int() }),\n});\n\n/** The last build factory asked the provider for, from the project row only; status is read live. */\nexport const environmentLastBuildSchema = z.object({ buildId: z.string(), attemptedAt: z.string().nullable() });\n\n/**\n * Names Factory or a sandbox provider injects into the same environment maps.\n * A variable with one of these names would swap a credential or be dropped.\n */\nexport const RESERVED_SANDBOX_ENV_NAMES: readonly RegExp[] = [\n /^GH_TOKEN(_\\d+)?$/,\n /^MASTRA_REPOSITORY_ACCESS_TOKEN(_\\d+)?$/,\n /^MASTRA_BUILD_ENV_REVISION$/,\n];\nexport const MAX_SANDBOX_ENV_VALUE_LENGTH = 32 * 1024;\nexport const sandboxEnvNameSchema = z\n .string()\n .max(128, 'Use at most 128 characters.')\n .regex(/^[A-Za-z_][A-Za-z0-9_]*$/, 'Use letters, digits and underscores, not starting with a digit.')\n .refine(name => !RESERVED_SANDBOX_ENV_NAMES.some(pattern => pattern.test(name)), {\n message: 'This name is reserved by Factory.',\n })\n // Names like `__proto__` or `toString` collide with object built-ins and would be dropped or stick around.\n .refine(name => !(name in Object.prototype), { message: \"This name can't be used.\" });\nexport const sandboxEnvAppliesToSchema = z.enum(['build', 'runtime', 'both']);\nconst sandboxEnvPathSchema = z.object({ id: uuidSchema, name: sandboxEnvNameSchema });\nexport const sandboxEnvSetBodySchema = z.object({\n value: z\n .string()\n .max(MAX_SANDBOX_ENV_VALUE_LENGTH)\n // A NUL byte in an env value makes every spawn fail.\n .refine(value => !value.includes('\\0'), { message: \"Values can't contain NUL characters.\" }),\n appliesTo: sandboxEnvAppliesToSchema,\n});\nexport const sandboxEnvUpdateBodySchema = z.object({ appliesTo: sandboxEnvAppliesToSchema });\n/** A variable as routes return it. There is deliberately no value field. */\nconst sandboxEnvSchema = z.object({\n name: z.string(),\n appliesTo: sandboxEnvAppliesToSchema,\n updatedAt: z.string(),\n updatedBy: z.string(),\n});\nconst sandboxEnvsListResponseSchema = z.object({\n envs: z.array(sandboxEnvSchema),\n /** False when values can't be stored encrypted, so writes are refused. */\n writable: z.boolean(),\n});\nconst sandboxEnvResponseSchema = z.object({ env: sandboxEnvSchema });\n\nexport const projectEnvironmentResponseSchema = z.object({\n environment: z.object({\n sandbox: environmentSandboxSchema,\n /** The stored settings document; only keys the user set. */\n settings: z.record(z.string(), z.unknown()),\n sandboxWorkingDirectory: z.string().nullable(),\n workspaceSetupCommand: z.string().nullable(),\n activeTemplateId: z.string().nullable(),\n activeTemplateHeads: z.record(z.string(), z.string()).nullable(),\n repositories: z.array(environmentRepositorySchema),\n buildTriggers: environmentBuildTriggersSchema.optional(),\n build: environmentLastBuildSchema.nullable().optional(),\n }),\n});\n\nconst environmentBuildStatusSchema = z.enum(['pending', 'building', 'ready', 'failed', 'unknown']);\n\nexport const environmentBuildStartResponseSchema = z.object({\n outcome: z.enum(['started', 'skipped', 'unavailable', 'failed']),\n buildId: z.string().optional(),\n templateId: z.string().optional(),\n reason: z.string().optional(),\n});\n\nexport const environmentBuildSchema = z.object({\n buildId: z.string(),\n status: environmentBuildStatusSchema,\n templateId: z.string().optional(),\n startedAt: z.string().optional(),\n finishedAt: z.string().optional(),\n error: z.string().optional(),\n logs: z.array(z.string()).optional(),\n});\n\nexport const environmentBuildsResponseSchema = z.object({ builds: z.array(environmentBuildSchema) });\nexport const environmentBuildResponseSchema = z.object({ build: environmentBuildSchema });\n\nconst buildPathSchema = projectPathSchema.extend({ buildId: z.string().min(1) });\n\nconst environmentRepositoryPatchSchema = z.object({\n projectRepositoryId: uuidSchema,\n position: z.number().int().min(1).optional(),\n inEnvironment: z.boolean().optional(),\n setupCommand: nullableTrimmed(2_000).optional(),\n teardownCommand: nullableTrimmed(2_000).optional(),\n});\n\nexport const updateProjectEnvironmentBodySchema = z\n .object({\n sandboxWorkingDirectory: nullableTrimmed(1_000)\n .refine(value => value === null || value.startsWith('/'), {\n message: 'sandboxWorkingDirectory must be absolute',\n })\n .optional(),\n /** Partial settings merged onto the stored document; null removes a key. Validated by the FactorySandbox. */\n settings: z.record(z.string(), z.unknown().nullable()).optional(),\n workspaceSetupCommand: nullableTrimmed(2_000).optional(),\n /** Build triggers; only accepted when the sandbox can build. */\n buildTriggers: z\n .object({\n schedule: z\n .object({\n enabled: z.boolean(),\n cron: z.string().trim().min(1).max(100).optional(),\n timezone: z.string().trim().min(1).max(100).optional(),\n })\n .optional(),\n push: z\n .object({\n enabled: z.boolean().optional(),\n debounceMinutes: z.number().int().min(0).max(1_440).optional(),\n })\n .optional(),\n })\n .optional(),\n repositories: z\n .array(environmentRepositoryPatchSchema)\n .max(100)\n .superRefine((entries, ctx) => {\n const ids = new Set(entries.map(entry => entry.projectRepositoryId));\n if (ids.size !== entries.length) {\n ctx.addIssue({ code: 'custom', message: 'Each repository may be listed once' });\n }\n const positions = entries.flatMap(entry => (entry.position === undefined ? [] : [entry.position]));\n if (positions.length === 0) return;\n const expected = Array.from({ length: entries.length }, (_, index) => index + 1);\n if (\n positions.length !== entries.length ||\n [...positions].sort((a, b) => a - b).some((p, i) => p !== expected[i])\n ) {\n ctx.addIssue({\n code: 'custom',\n message: 'Positions must be a permutation of 1..n over the listed repositories',\n });\n }\n })\n .optional(),\n })\n .refine(input => Object.keys(input).length > 0, { message: 'At least one environment field is required' });\n\nconst stagesSchema = z\n .array(\n z\n .string()\n .max(64)\n .regex(/^[a-z0-9][a-z0-9_-]*$/i),\n )\n .min(1)\n .max(16)\n .refine(stages => new Set(stages).size === stages.length, { message: 'Stages must be unique' });\n\nconst externalSourceSchema = z\n .object({\n integrationId: z.string().min(1).max(128),\n type: z.string().min(1).max(128),\n externalId: z.string().min(1).max(512),\n url: z.string().max(2_048).optional(),\n })\n .nullable();\n\nconst sessionSchema = z.object({\n sessionId: z.string().min(1).max(512),\n branch: z.string().min(1).max(512),\n threadId: z.string().min(1).max(512),\n});\n\nconst boundedLimitSchema = (defaultValue: number, max: number) =>\n z\n .string()\n .optional()\n .transform(value => {\n const parsed = value ? Number.parseInt(value, 10) : defaultValue;\n return Number.isFinite(parsed) ? Math.max(1, Math.min(max, parsed)) : defaultValue;\n });\n/** Without `sessionId`, `scope`, `started`, `source` or `workItemId`, the list is the whole board. */\nconst workItemListQuerySchema = z\n .object({\n /** Repeatable. Narrows the list to the cards that hold these sessions and the cards related to them. */\n sessionId: z.array(sessionSchema.shape.sessionId).optional(),\n /** `sessions` narrows the list to the cards that hold any session and the cards related to them. */\n scope: z.enum(['sessions']).optional(),\n /** `false` narrows the list to the cards that hold no session, most recently updated first. */\n started: z.enum(['false']).optional(),\n /** With `started=false`: words that must all be in the card's title, key, number or source id. */\n q: z.string().max(200).optional(),\n /** With `started=false`: how many cards to send. */\n limit: boundedLimitSchema(20, 50),\n /** Repeatable. Narrows the list to the cards filed from these sources, each named by its id or its URL. */\n source: z.array(z.string().min(1).max(512)).min(1).max(100).optional(),\n /**\n * Repeatable. Narrows the list to the cards with these ids; an id no card has lists nothing.\n * Each card comes with the `version` the phases read names it by.\n */\n workItemId: z.array(uuidSchema).min(1).max(100).optional(),\n /**\n * The `cursor` of the whole board this reader holds: the answer is then what moved since. One\n * this server did not issue reads as none, and the board answers whole.\n */\n since: z\n .string()\n .regex(/^\\d{1,15}$/)\n .optional()\n .catch(undefined),\n })\n .refine(query => !(query.scope && query.sessionId), {\n path: ['scope'],\n message: 'Send scope or sessionId, not both',\n })\n .refine(query => !(query.started && (query.scope || query.sessionId)), {\n path: ['started'],\n message: 'Send started without scope or sessionId',\n })\n .refine(query => query.q === undefined || query.started !== undefined, {\n path: ['q'],\n message: 'Send q only with started=false',\n })\n .refine(query => !(query.source && (query.started || query.scope || query.sessionId)), {\n path: ['source'],\n message: 'Send source without started, scope or sessionId',\n })\n .refine(query => !(query.workItemId && (query.source || query.started || query.scope || query.sessionId)), {\n path: ['workItemId'],\n message: 'Send workItemId without source, started, scope or sessionId',\n })\n // A narrowed list is not the board a cursor names, so it answers as it does without one.\n .transform(query =>\n query.sessionId || query.scope || query.started || query.source || query.workItemId\n ? { ...query, since: undefined }\n : query,\n );\n\nconst countSchema = z.number().int().nonnegative();\n\n/** What the draft page's starter buttons count on the project's default board. */\nexport const workItemStartersResponseSchema = z.object({\n failed: countSchema,\n changesRequested: countSchema,\n review: z.object({ count: countSchema, oldestOpenedAt: z.string().optional() }),\n undecided: countSchema,\n untriaged: countSchema,\n unplannedBugs: countSchema,\n sweep: z.object({ area: z.string(), count: countSchema }).optional(),\n stale: countSchema,\n});\n\nexport const workItemActivityQuerySchema = z.object({\n since: z.iso.datetime({ offset: true }).transform(since => Date.parse(since)),\n});\n\n/** When the project's cards were created and completed since an instant, and how many cards it has in all. */\nexport const workItemActivityResponseSchema = z.object({\n total: countSchema,\n createdAt: z.array(z.string()),\n doneAt: z.array(z.string()),\n});\n\nexport const BOARD_PHASES_SORTS = ['recent', 'recent-mine', 'created-newest', 'created-oldest'] as const;\n\n/** Repeatable. The values picked for one filter: a card matches on any of them, and none picks every card. */\nconst pickedValuesSchema = z\n .array(z.string().min(1).max(512))\n .max(100)\n .default([])\n .transform(values => new Set(values));\n\n/** `<phase>:<count>`: how many cards of one phase to list. */\nconst phaseWindowSchema = z\n .string()\n .transform((entry): [phase: string, count: string] => {\n const colon = entry.lastIndexOf(':');\n return [entry.slice(0, Math.max(colon, 0)), entry.slice(colon + 1)];\n })\n .pipe(\n z.tuple([\n boardIdentifierSchema,\n z\n .string()\n .regex(/^[1-9]\\d{0,5}$/)\n .transform(Number),\n ]),\n );\n\n/** One view of a board: its order, its search and filters, and how deep each phase is listed. */\nexport const boardPhasesQuerySchema = z.object({\n /** `recent-mine` puts the cards the signed-in user last moved into the phase before the others. */\n sort: z.enum(BOARD_PHASES_SORTS).default('recent'),\n /** Words that must all be in the card's title, key, number or source id. */\n q: z.string().max(200).optional(),\n /** A provider (`github`, `linear`, `manual`…), or `pull-request` for every card that has one. */\n source: pickedValuesSchema,\n /** Linear project ids. Picked without `source`, they keep Linear cards only. */\n linearProject: pickedValuesSchema,\n /** A card matches when it carries every one of them. */\n label: pickedValuesSchema,\n /** Participant ids (`github:octocat`, `factory:<user id>`) related to the card in any way. */\n teammate: pickedValuesSchema,\n author: pickedValuesSchema,\n assignee: pickedValuesSchema,\n reviewer: pickedValuesSchema,\n /** Factory users who created the card, moved it or started a session on it. */\n worked: pickedValuesSchema,\n /** How many cards each phase lists. */\n limit: boundedLimitSchema(50, 200),\n /**\n * Repeatable `<phase>:<count>`: lists that phase's first `count` cards instead of `limit`.\n * One for a phase the board does not have is ignored.\n */\n window: z\n .array(phaseWindowSchema)\n .max(64)\n .default([])\n .refine(windows => new Set(windows.map(([phase]) => phase)).size === windows.length, {\n message: 'Send one window per phase',\n })\n .transform(windows => new Map(windows)),\n /**\n * A card to answer for wherever it lies: the answer names it with its place in each phase, and\n * `cards=true` sends its body. No phase is listed deeper for it.\n */\n item: uuidSchema.optional(),\n /** `true` also sends the body of every card the answer names. */\n cards: z.enum(['true']).optional(),\n});\n\n/**\n * Names a card and the body the answer was read from. `version` is another value whenever any of\n * the body is, so a reader that holds the card at this version holds this body.\n */\nconst cardStampSchema = z.object({ id: z.string(), version: z.string() });\n\nexport const boardPhasesResponseSchema = z.object({\n /** The board's phases in declaration order. */\n phases: z.array(\n z.object({\n phase: z.string(),\n /** Cards of this phase that match the view. */\n total: countSchema,\n /** The first of them in the view's order: what the reader shows. */\n cards: z.array(cardStampSchema),\n }),\n ),\n /** With `item`: the asked card, when the board holds it. */\n item: cardStampSchema\n .extend({\n /**\n * Each phase the view lists the card under, and how many cards it lists before it there.\n * Empty when the search or filters leave the card out.\n */\n places: z.array(z.object({ phase: z.string(), position: countSchema })),\n })\n .optional(),\n /**\n * Cards related to a listed card or to the asked one that no phase lists: the first `limit` of\n * each card's, in the board's order.\n */\n related: z.array(cardStampSchema),\n /** How many such cards there are, named in `related` or not. */\n relatedTotal: countSchema,\n /** Cards of the board, whatever the search and filters. */\n boardTotal: countSchema,\n /** Cards of the board that match the view, each counted once: a card in two phases is one. */\n matchingTotal: countSchema,\n /** With `cards=true`: the body of every card named in `phases`, `item` and `related`, each with its `version`. */\n workItems: z.array(cardSchema.extend({ version: z.string() })).optional(),\n /** Among the named cards. */\n runningSessionIds: z.array(z.string()),\n parkedSessionIds: z.array(z.string()),\n});\n\n/** What the board's filter menus offer, read over every card of the project. */\nexport const workItemFilterOptionsResponseSchema = z.object({\n /** Every label on a card, sorted. */\n labels: z.array(z.string()),\n /** The people the cards' sources name, sorted by name. `id` is what a people filter sends. */\n people: z.array(\n z.object({\n id: z.string(),\n name: z.string(),\n source: z.enum(['github', 'gitlab', 'linear', 'jira', 'incidentio']),\n }),\n ),\n /** The Factory users who created a card, moved one or started a session on one, sorted. */\n actorIds: z.array(z.string()),\n});\n\nexport type BoardPhasesQuery = z.output<typeof boardPhasesQuerySchema>;\nexport type BoardPhasesResponse = z.infer<typeof boardPhasesResponseSchema>;\nexport type WorkItemFilterOptionsResponse = z.infer<typeof workItemFilterOptionsResponseSchema>;\n\n/** `<group key>:<count>`: how many rows of one group to list. Group keys hold colons, so the count follows the last. */\nconst sessionRowWindowSchema = z\n .string()\n .transform((entry): [group: string, count: string] => {\n const colon = entry.lastIndexOf(':');\n return [entry.slice(0, Math.max(colon, 0)), entry.slice(colon + 1)];\n })\n .pipe(\n z.tuple([\n z.string().min(1).max(512),\n z\n .string()\n .regex(/^[1-9]\\d{0,2}$/)\n .transform(Number)\n .pipe(z.number().max(SESSION_ROW_WINDOW_MAX)),\n ]),\n );\n\nconst sessionIdQuerySchema = z.string().min(1).max(512);\n\nexport const sessionRowsQuerySchema = z.object({\n sort: z.enum(SESSION_ROW_SORTS).default('activity'),\n groupBy: z.enum(SESSION_ROW_GROUP_BYS).default('none'),\n /** `all`, `mine`, or `owner:<user id>`. */\n owner: sessionRowOwnerSchema.default(SESSION_ROW_ALL_OWNERS),\n status: z.enum(SESSION_ROW_STATUSES).optional(),\n updated: z.enum(SESSION_ROW_UPDATED_WITHIN).optional(),\n /** `true` lists a card's other sessions under its row. */\n children: z.enum(['true']).optional(),\n /** Repeatable. Sessions listed before every other one of their group. */\n pin: z\n .array(sessionIdQuerySchema)\n .max(SESSION_ROW_PINS_MAX)\n .default([])\n .transform(ids => new Set(ids)),\n /** The session the reader has open: its group lists it however deep it lies. */\n open: sessionIdQuerySchema.optional(),\n /** Repeatable `<group key>:<count>`: lists that group's first `count` rows instead of `SESSION_ROW_WINDOW`. */\n window: z\n .array(sessionRowWindowSchema)\n .max(SESSION_ROW_WINDOWS_MAX)\n .default([])\n .refine(windows => new Set(windows.map(([group]) => group)).size === windows.length, {\n message: 'Send one window per group',\n })\n .transform(windows => new Map(windows)),\n});\n\nconst sessionRowStatusSchema = z.enum(SESSION_ROW_STATUSES);\n\nconst changeRequestSchema = z.object({\n url: z.string().optional(),\n provider: z.enum(['github', 'gitlab']),\n number: z.number().optional(),\n status: z.enum(PULL_REQUEST_STATUSES).optional(),\n draft: z.boolean(),\n syncedAt: z.number().optional(),\n}) satisfies z.ZodType<CardChangeRequest>;\n\nconst sessionRowFields = {\n session: z.object({\n id: z.string(),\n sessionId: z.string(),\n projectRepositoryId: z.string().nullable(),\n userId: z.string(),\n branch: z.string(),\n title: z.string().nullable(),\n visibility: z.enum(['org', 'private']),\n createdAt: z.string(),\n owner: z.object({ id: z.string(), name: z.string(), avatarUrl: z.string().optional() }).optional(),\n }),\n /** `factory` for a session the Factory runs on a card's branch, `user` for one a person or Slack started. */\n origin: z.enum(['factory', 'user']),\n board: z.string().optional(),\n status: sessionRowStatusSchema,\n /** The status of the card's whole row: its most urgent session's. */\n cardStatus: sessionRowStatusSchema.optional(),\n pinned: z.boolean(),\n /** The card's last change for a card's session, else the session's. */\n updatedAt: z.string(),\n card: z\n .object({\n id: z.string(),\n title: z.string(),\n workItemUrl: z.string().nullable(),\n externalSource: z\n .object({\n integrationId: z.string(),\n type: z.string(),\n externalId: z.string(),\n workspaceId: z.string().optional(),\n url: z.string().optional(),\n })\n .nullable(),\n })\n .optional(),\n itemId: z.string().optional(),\n threadId: z.string().optional(),\n pullRequest: changeRequestSchema.optional(),\n cardSessionIds: z.array(z.string()).optional(),\n phaseLabel: z.string().optional(),\n runByFactory: z.literal(true).optional(),\n /** A followed card's session waiting on a person. */\n waitingSessionId: z.string().optional(),\n};\n\nconst sessionRowSchema = z.object({\n ...sessionRowFields,\n /** With `children=true`: the card's other sessions. */\n childRows: z.array(z.object(sessionRowFields)).optional(),\n});\n\nexport const sessionRowsResponseSchema = z.object({\n /** Rows of the project, whatever the filters. */\n total: countSchema,\n matching: countSchema,\n groups: z.array(\n z.object({\n /** `board:<id>`, `user`, `slack`, `status:<status>`, `owner:<user id>` or `all`. */\n key: z.string(),\n /** Rows of this group that match the filters. */\n total: countSchema,\n openIndex: countSchema.optional(),\n /** The first of them in the view's order, keeping the open session. */\n rows: z.array(sessionRowSchema),\n }),\n ),\n /** Boards some row belongs to, whatever the filters. */\n boards: z.array(z.string()),\n /** People who own some row, whatever the filters. */\n owners: z.array(z.object({ userId: z.string(), name: z.string().optional(), avatarUrl: z.string().optional() })),\n /** Some session is still coming up: the answer changes without anything else telling the reader. */\n settling: z.boolean(),\n});\n\nexport const sessionActivityResponseSchema = z.object({\n runningSessionIds: z.array(z.string()),\n /** Sessions of a card whose run waits on a person's answer. */\n parkedSessionIds: z.array(z.string()),\n initializingSessionIds: z.array(z.string()),\n /** Cards with a session working, and with one waiting on a person. */\n cards: z.object({ working: countSchema, waiting: countSchema }),\n settling: z.boolean(),\n});\n\nexport type SessionRowsQuery = z.output<typeof sessionRowsQuerySchema>;\nexport type SessionRow = z.infer<typeof sessionRowSchema>;\nexport type SessionRowsResponse = z.infer<typeof sessionRowsResponseSchema>;\nexport type SessionActivityResponse = z.infer<typeof sessionActivityResponseSchema>;\n\nconst sessionsSchema = z.record(z.string().min(1).max(64), sessionSchema);\nconst metadataSchema = z\n .union([z.record(z.string(), z.unknown()), z.null()])\n .refine(value => {\n try {\n return JSON.stringify(value).length <= 16 * 1024;\n } catch {\n return false;\n }\n }, 'Metadata exceeds 16 KiB')\n .transform(value => {\n if (value === null) return null;\n const {\n factoryRuleMaterializationKey: _materialization,\n factoryPullRequestReconciliation: _reconciliation,\n externalSourceMissingAt: _externalSourceMissingAt,\n ...metadata\n } = value;\n return metadata;\n });\n\nexport const createWorkItemBodySchema = z.object({\n title: rawBoundedTrimmed(500),\n description: descriptionSchema.optional(),\n board: z.string().min(1).max(128).optional(),\n externalSource: externalSourceSchema.optional(),\n parentWorkItemId: uuidSchema.nullable().optional(),\n stages: stagesSchema.optional(),\n sessions: sessionsSchema.optional(),\n metadata: metadataSchema.optional(),\n});\n\nexport const updateWorkItemBodySchema = z\n .object({\n title: rawBoundedTrimmed(500).optional(),\n description: descriptionSchema.optional(),\n board: z.string().min(1).max(128).optional(),\n parentWorkItemId: uuidSchema.nullable().optional(),\n stages: stagesSchema.optional(),\n sessions: sessionsSchema.optional(),\n metadata: metadataSchema.optional(),\n })\n .refine(input => Object.keys(input).length > 0, { message: 'At least one work-item field is required' });\n\nexport const transitionBodySchema = z\n .object({\n board: z.string().max(MAX_BOARD_IDENTIFIER_LENGTH).regex(BOARD_IDENTIFIER_RE),\n stage: z.string().max(MAX_BOARD_IDENTIFIER_LENGTH).regex(BOARD_IDENTIFIER_RE),\n expectedRevision: z.number().int().min(1),\n requestId: trimmedUuidSchema,\n cause: nonEmptyTrimmed(256),\n reenter: z.unknown().optional(),\n })\n .transform(input => ({\n board: input.board,\n stage: input.stage,\n expectedRevision: input.expectedRevision,\n ingress: { type: 'human' as const, identity: input.requestId },\n cause: input.cause,\n ...(input.reenter === true ? { reenter: true } : {}),\n }));\n\nexport const startWorkItemBodySchema = z.object({\n sessionId: trimmedUuidSchema,\n threadTitle: nonEmptyTrimmed(512),\n kickoffKey: trimmedUuidSchema,\n workItem: z.object({\n id: trimmedUuidSchema,\n role: nonEmptyTrimmed(32),\n input: createWorkItemBodySchema,\n }),\n});\n\nexport const automationRunStartBodySchema = z\n .object({\n requestId: trimmedUuidSchema,\n expectedRevision: z.number().int().min(1),\n // Checked against the card's board when the request arrives.\n role: nonEmptyTrimmed(32),\n skillName: nonEmptyTrimmed(128),\n arguments: nonEmptyTrimmed(4_096).optional(),\n })\n .strict();\n\nexport const metricsQuerySchema = z.object({\n from: z.string().optional(),\n to: z.string().optional(),\n});\n\nconst decisionStatusSchema = z.enum([\n 'pending',\n 'proposed',\n 'dismissed',\n 'superseded',\n 'leased',\n 'retry',\n 'succeeded',\n 'failed',\n]);\nconst decisionCursorSchema = z\n .string()\n .optional()\n .transform((value, context) => {\n if (!value) return undefined;\n try {\n const decoded = JSON.parse(Buffer.from(value, 'base64url').toString('utf8')) as unknown;\n if (\n !Array.isArray(decoded) ||\n decoded.length !== 2 ||\n typeof decoded[0] !== 'string' ||\n typeof decoded[1] !== 'string'\n ) {\n throw new Error('invalid cursor');\n }\n const createdAt = new Date(decoded[0]);\n if (Number.isNaN(createdAt.getTime()) || !new RegExp(UUID_PATTERN).test(decoded[1])) {\n throw new Error('invalid cursor');\n }\n return { createdAt, id: decoded[1] };\n } catch {\n context.addIssue({ code: 'custom', message: 'Invalid cursor' });\n return z.NEVER;\n }\n });\n\nexport const decisionQuerySchema = z.object({\n statuses: z\n .string()\n .optional()\n .transform(value => {\n if (!value) return undefined;\n const statuses = [...new Set(value.split(',').map(status => status.trim()))].filter(\n status => decisionStatusSchema.safeParse(status).success,\n ) as Array<z.infer<typeof decisionStatusSchema>>;\n return statuses.length > 0 ? statuses : undefined;\n }),\n before: decisionCursorSchema,\n limit: boundedLimitSchema(25, 50),\n});\n\nconst attentionKindSchema = z.enum(['automation-failed', 'automation-proposed', 'agent-waiting']);\ntype AttentionKind = z.infer<typeof attentionKindSchema>;\ntype AttentionStreamPosition = { occurredAt: Date; id: string };\ntype AttentionCursorMap = Map<AttentionKind, AttentionStreamPosition | undefined>;\n\nfunction parseAttentionStreamPosition(value: unknown): AttentionStreamPosition | undefined {\n if (!Array.isArray(value) || value.length !== 2 || typeof value[0] !== 'string' || typeof value[1] !== 'string') {\n return undefined;\n }\n const occurredAt = new Date(value[0]);\n if (Number.isNaN(occurredAt.getTime()) || !new RegExp(UUID_PATTERN).test(value[1])) return undefined;\n return { occurredAt, id: value[1] };\n}\n\nconst attentionCursorSchema = z\n .string()\n .optional()\n .transform((value, context) => {\n if (!value) return undefined;\n try {\n const decoded: unknown = JSON.parse(Buffer.from(value, 'base64url').toString('utf8'));\n if (Array.isArray(decoded)) {\n const legacy = parseAttentionStreamPosition(decoded);\n if (!legacy) throw new Error('invalid cursor');\n return new Map<AttentionKind, AttentionStreamPosition | undefined>([['automation-failed', legacy]]);\n }\n if (!decoded || typeof decoded !== 'object') throw new Error('invalid cursor');\n const cursors: AttentionCursorMap = new Map();\n for (const [kind, positionValue] of Object.entries(decoded)) {\n const parsedKind = attentionKindSchema.safeParse(kind);\n if (!parsedKind.success) throw new Error('invalid cursor');\n if (positionValue === null) {\n cursors.set(parsedKind.data, undefined);\n continue;\n }\n const position = parseAttentionStreamPosition(positionValue);\n if (!position) throw new Error('invalid cursor');\n cursors.set(parsedKind.data, position);\n }\n if (cursors.size === 0) throw new Error('invalid cursor');\n return cursors;\n } catch {\n context.addIssue({ code: 'custom', message: 'Invalid cursor' });\n return z.NEVER;\n }\n });\n\nexport const attentionQuerySchema = z.object({\n view: z.enum(['open', 'unread', 'archived']).optional().default('open'),\n kind: z.array(attentionKindSchema).optional(),\n before: attentionCursorSchema,\n limit: boundedLimitSchema(25, 50),\n search: z\n .string()\n .optional()\n .transform(value => value?.trim().toLowerCase().slice(0, 200) || undefined),\n});\n\nconst attentionActionPathSchema = z\n .object({\n id: uuidSchema,\n kind: attentionKindSchema,\n sourceId: z.string().min(1).max(256),\n occurrence: z\n .string()\n .regex(/^(0|[1-9]\\d*)$/)\n .transform((value, context) => {\n const occurrence = Number(value);\n if (Number.isSafeInteger(occurrence)) return occurrence;\n context.addIssue({ code: 'custom', message: 'Invalid occurrence' });\n return z.NEVER;\n }),\n })\n .refine(input => new RegExp(UUID_PATTERN).test(input.sourceId), {\n message: 'Invalid attention source id',\n path: ['sourceId'],\n });\n\n/** Largest SKILL.md a project may save as an edit. */\nexport const MAX_SKILL_OVERRIDE_LENGTH = 200_000;\n\nconst skillNameSchema = z\n .string()\n .max(64)\n .regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\nconst skillPathSchema = z.object({ id: uuidSchema, name: skillNameSchema });\nconst skillResponseSchema = z.object({ skill: entitySchema });\n\n/** Adds the runtime's SKILL.md validation errors, checking the frontmatter name against `directoryName` when given. */\nfunction refineSkillContent(content: string, context: z.RefinementCtx, directoryName?: string) {\n const result = validateSkillContent({ content, directoryName });\n for (const message of result.errors) context.addIssue({ code: 'custom', message, path: ['content'] });\n}\n\nconst skillContentSchema = z.string().min(1).max(MAX_SKILL_OVERRIDE_LENGTH);\n\nexport const skillOverrideBodySchema = z\n .object({ content: skillContentSchema })\n .strict()\n .superRefine((input, context) => refineSkillContent(input.content, context));\n\n/**\n * The full save request: the edited SKILL.md must load under the skill's own\n * name, exactly as the runtime validates it.\n */\nexport const skillOverrideSaveRequestSchema = skillPathSchema\n .extend({ content: skillContentSchema })\n .superRefine((input, context) => refineSkillContent(input.content, context, input.name));\n\nexport const FACTORY_ROUTE_CONTRACTS = {\n projectList: {\n method: 'GET',\n path: '/web/factory/projects',\n description: 'List Factory projects for the current organization, each with its linked repositories',\n responseSchema: z.object({ projects: z.array(projectListItemSchema) }),\n },\n projectCreate: {\n method: 'POST',\n path: '/web/factory/projects',\n description: 'Create a Factory project',\n bodySchema: createProjectBodySchema,\n responseSchema: projectResponseSchema,\n },\n projectGet: {\n method: 'GET',\n path: '/web/factory/projects/:id',\n description: 'Get a Factory project',\n pathSchema: projectPathSchema,\n responseSchema: projectResponseSchema,\n },\n projectUpdate: {\n method: 'PATCH',\n path: '/web/factory/projects/:id',\n description: 'Update a Factory project',\n pathSchema: projectPathSchema,\n bodySchema: updateProjectBodySchema,\n responseSchema: projectResponseSchema,\n },\n projectEnvironmentGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/environment',\n description: 'Get the sandbox environment of a Factory project: provider settings and its repositories in order',\n pathSchema: projectPathSchema,\n responseSchema: projectEnvironmentResponseSchema,\n },\n projectEnvironmentUpdate: {\n method: 'PATCH',\n path: '/web/factory/projects/:id/environment',\n description: 'Update the sandbox environment of a Factory project: provider settings, repository order and setup',\n pathSchema: projectPathSchema,\n bodySchema: updateProjectEnvironmentBodySchema,\n responseSchema: projectEnvironmentResponseSchema,\n },\n projectEnvironmentBuild: {\n method: 'POST',\n path: '/web/factory/projects/:id/environment/build',\n description: 'Build the sandbox environment template of a Factory project now',\n pathSchema: projectPathSchema,\n responseSchema: environmentBuildStartResponseSchema,\n },\n projectEnvironmentBuilds: {\n method: 'GET',\n path: '/web/factory/projects/:id/environment/builds',\n description:\n 'List the environment template builds of a Factory project, newest first, when the provider keeps history',\n pathSchema: projectPathSchema,\n responseSchema: environmentBuildsResponseSchema,\n },\n projectEnvironmentBuildGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/environment/builds/:buildId',\n description: 'Get the live status of one environment template build of a Factory project',\n pathSchema: buildPathSchema,\n responseSchema: environmentBuildResponseSchema,\n },\n projectSandboxEnvsList: {\n method: 'GET',\n path: '/web/factory/projects/:id/sandbox-envs',\n description:\n 'List the sandbox environment variables of a Factory project: names and where they apply, never values',\n pathSchema: projectPathSchema,\n responseSchema: sandboxEnvsListResponseSchema,\n },\n projectSandboxEnvSet: {\n method: 'PUT',\n path: '/web/factory/projects/:id/sandbox-envs/:name',\n description: 'Create or replace a sandbox environment variable of a Factory project',\n pathSchema: sandboxEnvPathSchema,\n bodySchema: sandboxEnvSetBodySchema,\n responseSchema: sandboxEnvResponseSchema,\n },\n projectSandboxEnvUpdate: {\n method: 'PATCH',\n path: '/web/factory/projects/:id/sandbox-envs/:name',\n description: 'Change where a sandbox environment variable of a Factory project applies',\n pathSchema: sandboxEnvPathSchema,\n bodySchema: sandboxEnvUpdateBodySchema,\n responseSchema: sandboxEnvResponseSchema,\n },\n projectSandboxEnvDelete: {\n method: 'DELETE',\n path: '/web/factory/projects/:id/sandbox-envs/:name',\n description: 'Delete a sandbox environment variable of a Factory project',\n pathSchema: sandboxEnvPathSchema,\n responseSchema: z.null(),\n },\n projectApplyDefaultModel: {\n method: 'POST',\n path: '/web/factory/projects/:id/apply-default-model',\n description: 'Start applying the Factory default model to running work and review threads in the background',\n pathSchema: projectPathSchema,\n responseSchema: z.object({ modelId: z.string(), status: z.literal('started') }),\n },\n projectDelete: {\n method: 'DELETE',\n path: '/web/factory/projects/:id',\n description: 'Delete a Factory project',\n pathSchema: projectPathSchema,\n responseSchema: z.null(),\n },\n metricsGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/metrics',\n description: 'Get Factory project metrics',\n pathSchema: projectPathSchema,\n querySchema: metricsQuerySchema,\n responseSchema: z.object({ metrics: entitySchema }),\n },\n healthThresholdsGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/health/thresholds',\n description: 'Get queue-health thresholds',\n pathSchema: projectPathSchema,\n responseSchema: z.object({ thresholds: z.array(z.number().finite()) }),\n },\n boardCatalog: {\n method: 'GET',\n path: '/web/factory/projects/:id/boards',\n description: 'List installed Factory boards',\n pathSchema: projectPathSchema,\n responseSchema: z.object({\n boards: z.array(\n z.object({\n id: z.string(),\n /** Absent from servers older than the phase fields. */\n name: z.string().optional(),\n /** @deprecated Use `name`. */\n title: z.string(),\n description: z.string().optional(),\n /** Where the board came from: Factory's built-ins, the app's code, or created through the API. */\n source: z.enum(['builtin', 'app', 'stored']).optional(),\n /** True for every board; only the retired Review board was read-only. */\n editable: z.boolean().optional(),\n /** Problems with the board, such as a runner skill that does not exist. */\n problems: z.array(z.string()).optional(),\n initialPhase: z.string(),\n /**\n * Which phase plays each part of the pull request loop, read from what the phases declare.\n * A part the board has no phase for is absent. Absent from servers older than the loop.\n */\n flow: z\n .object({\n triage: z.string().optional(),\n build: z.string().optional(),\n selfReview: z.string().optional(),\n pullRequestReview: z.string().optional(),\n completed: z.string().optional(),\n canceled: z.string().optional(),\n })\n .optional(),\n phases: z.array(\n z.object({\n id: z.string(),\n name: z.string().optional(),\n /** @deprecated Use `name`. */\n title: z.string(),\n description: z.string().optional(),\n kind: z.enum(['resting', 'working', 'terminal']),\n nextPhases: z.array(z.string()).optional(),\n /** The session context a working phase runs in. */\n context: z.string().optional(),\n /** @deprecated Use `context`. */\n role: z.string().optional(),\n /** The skill the phase's runner starts when a card enters it (`runner.skill`). */\n skill: z.string().optional(),\n /** The objective the phase's runs pursue as a goal (`runner.goal`). */\n goal: z.object({ objective: z.string(), maxRuns: z.number().optional() }).optional(),\n autoStart: z.boolean().optional(),\n /** Cards the phase starts on its own for; absent means every card. */\n autoStartWhen: cardRuleGroupSchema.optional(),\n exitTool: z\n .object({\n id: z.string(),\n autoApprove: z.boolean(),\n /** Cards the exit tool is approved for; absent means every card. */\n autoApproveWhen: cardRuleGroupSchema.optional(),\n })\n .optional(),\n /** Factory tools the phase grants the session working the card there. */\n tools: z.array(z.string()).optional(),\n transitions: z.array(z.object({ outcome: z.string().nullable(), to: z.string() })),\n }),\n ),\n }),\n ),\n /** Stored boards that could not be loaded or that a code board serves in their place, and why. */\n problems: z.array(z.string()).optional(),\n }),\n },\n boardGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/boards/:boardKey',\n description: \"Get a project board's definition\",\n pathSchema: boardPathSchema,\n responseSchema: storedBoardResponseSchema,\n },\n boardPhases: {\n method: 'GET',\n path: '/web/factory/projects/:id/boards/:boardKey/phases',\n description: 'List the cards under each phase of a board view, in order, with how many match',\n pathSchema: boardPathSchema,\n querySchema: boardPhasesQuerySchema,\n responseSchema: boardPhasesResponseSchema,\n },\n boardCreate: {\n method: 'POST',\n path: '/web/factory/projects/:id/boards',\n description: 'Create a board in a Factory project',\n pathSchema: projectPathSchema,\n bodySchema: storedBoardInputSchema,\n responseSchema: storedBoardResponseSchema,\n },\n boardReplace: {\n method: 'PATCH',\n path: '/web/factory/projects/:id/boards/:boardKey',\n description: \"Replace a project board's definition\",\n pathSchema: boardPathSchema,\n bodySchema: replaceBoardBodySchema,\n responseSchema: storedBoardResponseSchema,\n },\n boardReset: {\n method: 'POST',\n path: '/web/factory/projects/:id/boards/:boardKey/reset',\n description: 'Reset a built-in or app board to its code definition',\n pathSchema: boardPathSchema,\n bodySchema: boardResetBodySchema,\n responseSchema: storedBoardResponseSchema,\n },\n boardDelete: {\n method: 'DELETE',\n path: '/web/factory/projects/:id/boards/:boardKey',\n description: 'Delete a board from a Factory project',\n pathSchema: boardPathSchema,\n querySchema: boardDeleteQuerySchema,\n responseSchema: z.null(),\n },\n intakeRouteList: {\n method: 'GET',\n path: '/web/factory/projects/:id/intake-routes',\n description: \"List a Factory project's intake routes in evaluation order\",\n pathSchema: projectPathSchema,\n querySchema: intakeRouteListQuerySchema,\n responseSchema: intakeRouteListResponseSchema,\n },\n intakeRouteGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/intake-routes/:routeId',\n description: 'Get a Factory intake route',\n pathSchema: intakeRoutePathSchema,\n responseSchema: intakeRouteResponseSchema,\n },\n intakeRouteCreate: {\n method: 'POST',\n path: '/web/factory/projects/:id/intake-routes',\n description:\n 'Add an intake route to a Factory project, after its routes; a route that places new cards goes ahead of the first route that takes every new card',\n pathSchema: projectPathSchema,\n bodySchema: intakeRouteInputSchema,\n responseSchema: intakeRouteResponseSchema,\n },\n intakeRouteUpdate: {\n method: 'PATCH',\n path: '/web/factory/projects/:id/intake-routes/:routeId',\n description: 'Change a Factory intake route',\n pathSchema: intakeRoutePathSchema,\n bodySchema: intakeRoutePatchSchema,\n responseSchema: intakeRouteResponseSchema,\n },\n intakeRouteDelete: {\n method: 'DELETE',\n path: '/web/factory/projects/:id/intake-routes/:routeId',\n description: 'Delete a Factory intake route',\n pathSchema: intakeRoutePathSchema,\n querySchema: boardDeleteQuerySchema,\n responseSchema: z.null(),\n },\n intakeRouteReroutePreview: {\n method: 'GET',\n path: '/web/factory/projects/:id/intake-routes/reroute',\n description: \"Untouched cards the project's intake routes would now file on a different board\",\n pathSchema: projectPathSchema,\n responseSchema: intakeRerouteResponseSchema,\n },\n intakeRouteRerouteApply: {\n method: 'POST',\n path: '/web/factory/projects/:id/intake-routes/reroute',\n description: \"Move untouched cards to the start of the board the project's intake routes now file them on\",\n pathSchema: projectPathSchema,\n responseSchema: intakeRerouteApplyResponseSchema,\n },\n intakeRouteReorder: {\n method: 'POST',\n path: '/web/factory/projects/:id/intake-routes/reorder',\n description: \"Reorder a Factory project's intake routes\",\n pathSchema: projectPathSchema,\n bodySchema: intakeRouteReorderBodySchema,\n responseSchema: intakeRouteListResponseSchema,\n },\n intakeOrderGet: {\n method: 'GET',\n path: '/web/factory/projects/:id/intake-order',\n description: \"The order a Factory project's boards are asked to take a new item, and the evaluator in use\",\n pathSchema: projectPathSchema,\n responseSchema: intakeOrderResponseSchema,\n },\n intakeOrderUpdate: {\n method: 'PUT',\n path: '/web/factory/projects/:id/intake-order',\n description: \"Set the order a Factory project's boards are asked to take a new item, or its evaluator\",\n pathSchema: projectPathSchema,\n bodySchema: intakeOrderBodySchema,\n responseSchema: intakeOrderResponseSchema,\n },\n intakeNotRoutedList: {\n method: 'GET',\n path: '/web/factory/projects/:id/intake/not-routed',\n description: \"Items no board's intake rules took, oldest first, a page at a time\",\n pathSchema: projectPathSchema,\n querySchema: intakeNotRoutedQuerySchema,\n responseSchema: intakeNotRoutedResponseSchema,\n },\n intakeRouteAgain: {\n method: 'POST',\n path: '/web/factory/projects/:id/intake/not-routed/:decisionId/route-again',\n description: 'Run intake again for an item no board took, filing it where the rules now say',\n pathSchema: intakeDecisionPathSchema,\n responseSchema: intakeRouteAgainResponseSchema,\n },\n intakeSkippedList: {\n method: 'GET',\n path: '/web/factory/projects/:id/intake/skipped',\n description: 'How often each card-move rule was skipped in the last 30 days, with its newest skip',\n pathSchema: projectPathSchema,\n responseSchema: intakeSkippedResponseSchema,\n },\n intakeDryRun: {\n method: 'POST',\n path: '/web/factory/projects/:id/intake/dry-run',\n description:\n \"Run a Factory project's intake rules, saved or unsaved, over its newest 200 items without filing anything\",\n pathSchema: projectPathSchema,\n bodySchema: intakeDryRunBodySchema,\n responseSchema: intakeDryRunResponseSchema,\n },\n intakeTest: {\n method: 'POST',\n path: '/web/factory/projects/:id/intake/test',\n description: 'Show where intake would file one item, and what every rule answered, without filing it',\n pathSchema: projectPathSchema,\n bodySchema: intakeTestBodySchema,\n responseSchema: intakeTestResponseSchema,\n },\n workItemList: {\n method: 'GET',\n path: '/web/factory/projects/:id/work-items',\n description: 'List Factory work items and running sessions',\n pathSchema: projectPathSchema,\n querySchema: workItemListQuerySchema,\n responseSchema: z.object({\n /** Every listed card, or with `removedIds` only the cards changed since the `since` sent. */\n workItems: z.array(cardSchema),\n runningSessionIds: z.array(z.string()),\n parkedSessionIds: z.array(z.string()),\n /** With `started=false`: how many cards matched, of which `workItems` holds the first `limit`. */\n total: z.number().int().nonnegative().optional(),\n /** Names this read of the whole board. Absent when the next read must list it whole again. */\n cursor: z.string().optional(),\n /** Cards gone since the `since` sent. Its presence marks an answer that holds only what moved. */\n removedIds: z.array(z.string()).optional(),\n /** With `removedIds`: `boardCheck` of the whole board, for a reader to check its merged copy against. */\n check: z.string().optional(),\n }),\n },\n workItemStarters: {\n method: 'GET',\n path: '/web/factory/projects/:id/work-items/starters',\n description: 'Count the cards behind each new-session starter on the default board',\n pathSchema: projectPathSchema,\n responseSchema: workItemStartersResponseSchema,\n },\n workItemActivity: {\n method: 'GET',\n path: '/web/factory/projects/:id/work-items/activity',\n description: 'List when cards were created and completed since an instant',\n pathSchema: projectPathSchema,\n querySchema: workItemActivityQuerySchema,\n responseSchema: workItemActivityResponseSchema,\n },\n workItemFilterOptions: {\n method: 'GET',\n path: '/web/factory/projects/:id/work-items/filter-options',\n description: 'List the labels and people the cards of a project can be filtered by',\n pathSchema: projectPathSchema,\n responseSchema: workItemFilterOptionsResponseSchema,\n },\n sessionRows: {\n method: 'GET',\n path: '/web/factory/projects/:id/session-rows',\n description: \"List the sidebar's session rows of a view, grouped and in order, with how many match\",\n pathSchema: projectPathSchema,\n querySchema: sessionRowsQuerySchema,\n responseSchema: sessionRowsResponseSchema,\n },\n sessionActivity: {\n method: 'GET',\n path: '/web/factory/projects/:id/session-activity',\n description: \"List which of a project's sessions are running, waiting on a person or coming up\",\n pathSchema: projectPathSchema,\n responseSchema: sessionActivityResponseSchema,\n },\n workItemCreate: {\n method: 'POST',\n path: '/web/factory/projects/:id/work-items',\n description: 'Create a work item in Intake',\n pathSchema: projectPathSchema,\n bodySchema: createWorkItemBodySchema,\n responseSchema: workItemResponseSchema,\n },\n workItemUpdate: {\n method: 'PATCH',\n path: '/web/factory/work-items/:id',\n description: 'Update non-stage work-item fields',\n pathSchema: workItemPathSchema,\n bodySchema: updateWorkItemBodySchema,\n responseSchema: workItemResponseSchema,\n },\n workItemDelete: {\n method: 'DELETE',\n path: '/web/factory/work-items/:id',\n description: 'Delete a Factory work item',\n pathSchema: workItemPathSchema,\n responseSchema: z.object({ ok: z.literal(true) }),\n },\n workItemTransition: {\n method: 'POST',\n path: '/web/factory/projects/:id/work-items/:workItemId/transition',\n description: 'Transition a work item with its expected revision',\n pathSchema: transitionPathSchema,\n bodySchema: transitionBodySchema,\n responseSchema: entitySchema,\n },\n workItemWorkingPullRequest: {\n method: 'PUT',\n path: '/web/factory/projects/:id/work-items/:workItemId/working-pull-request',\n description:\n \"Make one of the pull requests linked to a card the one its sessions work on. The only way an outside author's pull request becomes a card's working pull request.\",\n pathSchema: transitionPathSchema,\n bodySchema: z.object({\n pullRequest: z.number().int().positive(),\n expectedRevision: z.number().int().nonnegative(),\n }),\n responseSchema: workItemResponseSchema,\n },\n workItemStart: {\n method: 'POST',\n path: '/web/factory/projects/:id/runs/start',\n description: 'Explicitly start a Factory work-item run',\n pathSchema: projectPathSchema,\n bodySchema: startWorkItemBodySchema,\n responseSchema: entitySchema,\n },\n workItemAutomationRun: {\n method: 'POST',\n path: '/web/factory/projects/:id/work-items/:workItemId/automation-runs',\n description: 'Enqueue an idempotent deferred skill dispatch for a trusted external orchestrator',\n pathSchema: transitionPathSchema,\n bodySchema: automationRunStartBodySchema,\n responseSchema: entitySchema,\n },\n decisionList: {\n method: 'GET',\n path: '/web/factory/projects/:id/decisions',\n description: 'List Factory decisions',\n pathSchema: projectPathSchema,\n querySchema: decisionQuerySchema,\n responseSchema: z.object({ decisions: z.array(entitySchema), nextCursor: z.string().optional() }),\n },\n runQueue: {\n method: 'GET',\n path: '/web/factory/projects/:id/run-queue',\n description:\n \"List the project's automated runs waiting for a run slot, oldest first, and the runs holding one. The cap is per server process; manual starts are claimed ahead of this queue.\",\n pathSchema: projectPathSchema,\n responseSchema: runQueueResponseSchema,\n },\n decisionApprove: {\n method: 'POST',\n path: '/web/factory/projects/:id/decisions/:decisionId/approve',\n description: 'Approve a proposed Factory decision',\n pathSchema: projectDecisionPathSchema,\n responseSchema: decisionResponseSchema,\n },\n decisionDismiss: {\n method: 'POST',\n path: '/web/factory/projects/:id/decisions/:decisionId/dismiss',\n description: 'Dismiss a proposed Factory decision',\n pathSchema: projectDecisionPathSchema,\n responseSchema: decisionResponseSchema,\n },\n decisionRetry: {\n method: 'POST',\n path: '/web/factory/projects/:id/decisions/:decisionId/retry',\n description: 'Retry a failed retryable Factory decision',\n pathSchema: projectDecisionPathSchema,\n responseSchema: decisionResponseSchema,\n },\n attentionList: {\n method: 'GET',\n path: '/web/factory/projects/:id/attention',\n description: 'List the Factory attention inbox',\n pathSchema: projectPathSchema,\n querySchema: attentionQuerySchema,\n responseSchema: z.object({\n items: z.array(entitySchema),\n kinds: z.record(\n attentionKindSchema,\n z.object({\n open: z.number(),\n unread: z.number(),\n latest: z.object({ key: z.string(), at: z.string(), unread: z.boolean() }).nullable(),\n }),\n ),\n hasMore: z.boolean(),\n nextCursor: z.string().optional(),\n }),\n },\n attentionReadAll: {\n method: 'POST',\n path: '/web/factory/projects/:id/attention/read-all',\n description: 'Mark all Factory attention as read',\n pathSchema: projectPathSchema,\n querySchema: z.object({ before: attentionCursorSchema }),\n responseSchema: z.object({ ok: z.literal(true), hasMore: z.boolean(), nextCursor: z.string().optional() }),\n },\n attentionRead: {\n method: 'POST',\n path: '/web/factory/projects/:id/attention/:kind/:sourceId/:occurrence/read',\n description: 'Mark a Factory attention receipt as read',\n pathSchema: attentionActionPathSchema,\n responseSchema: z.object({ receipt: entitySchema }),\n },\n attentionArchive: {\n method: 'POST',\n path: '/web/factory/projects/:id/attention/:kind/:sourceId/:occurrence/archive',\n description: 'Archive a Factory attention receipt',\n pathSchema: attentionActionPathSchema,\n responseSchema: z.object({ receipt: entitySchema }),\n },\n attentionRestore: {\n method: 'POST',\n path: '/web/factory/projects/:id/attention/:kind/:sourceId/:occurrence/restore',\n description: 'Restore an archived Factory attention receipt',\n pathSchema: attentionActionPathSchema,\n responseSchema: z.object({ receipt: entitySchema }),\n },\n skillList: {\n method: 'GET',\n path: '/web/factory/skills',\n description: \"List Factory skills, with a project's edits when a project is given\",\n querySchema: z.object({ projectId: uuidSchema.optional() }),\n responseSchema: z.object({ skills: z.array(entitySchema), canEdit: z.boolean().optional() }),\n },\n skillOverrideSave: {\n method: 'PUT',\n path: '/web/factory/projects/:id/skills/:name',\n description: \"Save a project's edited SKILL.md for a Factory skill\",\n pathSchema: skillPathSchema,\n bodySchema: skillOverrideBodySchema,\n responseSchema: skillResponseSchema,\n },\n skillOverrideRevert: {\n method: 'DELETE',\n path: '/web/factory/projects/:id/skills/:name',\n description: \"Revert a project's edited Factory skill to its original SKILL.md\",\n pathSchema: skillPathSchema,\n responseSchema: skillResponseSchema,\n },\n} as const satisfies Record<string, FactoryRouteContract>;\n\nexport type FactoryRouteContractKey = keyof typeof FACTORY_ROUTE_CONTRACTS;\n"],"mappings":";;;;;;;;;;;;AA+BA,MAAa,kBAAkB;AAY/B,MAAa,eAAe;AAC5B,MAAM,aAAa,EAAE,OAAO,CAAC,CAAC,MAAM,IAAI,OAAO,YAAY,CAAC;AAC5D,MAAM,eAAe,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC;AACrD,MAAM,mBAAmB,QAAgB,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;AACzE,MAAM,qBAAqB,QACzB,EACG,OAAO,CAAC,CACR,IAAI,GAAG,CAAC,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ACb,YAAY;EACZ,aAAa,EAAE,OAAO,EAAE,QAAQ,sBAAsB,CAAC;EACvD,gBAAgB,EAAE,OAAO;GAAE,IAAI,EAAE,QAAQ,IAAI;GAAG,SAAS,EAAE,QAAQ;GAAG,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS;EAAE,CAAC;CAC3G;CACA,eAAe;EACb,QAAQ;EACR,MAAM;EACN,aAAa;EACb,YAAY;EACZ,gBAAgB,EAAE,OAAO,EAAE,SAAS,aAAa,CAAC;CACpD;CACA,kBAAkB;EAChB,QAAQ;EACR,MAAM;EACN,aAAa;EACb,YAAY;EACZ,gBAAgB,EAAE,OAAO,EAAE,SAAS,aAAa,CAAC;CACpD;CACA,kBAAkB;EAChB,QAAQ;EACR,MAAM;EACN,aAAa;EACb,YAAY;EACZ,gBAAgB,EAAE,OAAO,EAAE,SAAS,aAAa,CAAC;CACpD;CACA,WAAW;EACT,QAAQ;EACR,MAAM;EACN,aAAa;EACb,aAAa,EAAE,OAAO,EAAE,WAAW,WAAW,SAAS,EAAE,CAAC;EAC1D,gBAAgB,EAAE,OAAO;GAAE,QAAQ,EAAE,MAAM,YAAY;GAAG,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS;EAAE,CAAC;CAC7F;CACA,mBAAmB;EACjB,QAAQ;EACR,MAAM;EACN,aAAa;EACb,YAAY;EACZ,YAAY;EACZ,gBAAgB;CAClB;CACA,qBAAqB;EACnB,QAAQ;EACR,MAAM;EACN,aAAa;EACb,YAAY;EACZ,gBAAgB;CAClB;AACF"}
@@ -78,6 +78,15 @@ export interface WorkspaceTreeListing {
78
78
  available: boolean;
79
79
  entries: WorkspaceTreeEntry[];
80
80
  }
81
+ export interface WorkspaceFileIndex {
82
+ workspacePath: string;
83
+ /** False when this process holds no sandbox for the session, so nothing was read. */
84
+ available: boolean;
85
+ /** Tracked and untracked files git doesn't ignore, workspace-relative, in each checkout's order. */
86
+ paths: string[];
87
+ /** Files are left out: a checkout's list hit the size cap, or a checkout couldn't be listed. */
88
+ truncated: boolean;
89
+ }
81
90
  export type WorkspaceChangeStatus = 'modified' | 'added' | 'deleted' | 'renamed' | 'copied' | 'untracked' | 'conflicted';
82
91
  export interface WorkspaceChange {
83
92
  path: string;
@@ -159,6 +168,7 @@ export declare function listSessionRenderedPath(session: SourceControlSession, r
159
168
  * `available: false` instead of starting one.
160
169
  */
161
170
  export declare function listSessionWorkspaceTree(session: SourceControlSession, path?: string): Promise<WorkspaceTreeListing>;
171
+ export declare function listSessionWorkspaceFiles(session: SourceControlSession): Promise<WorkspaceFileIndex>;
162
172
  /**
163
173
  * Read a file inside a session's sandbox: anything under an approved rendered
164
174
  * root, or anything the tree would list (not git internals, not ignored by its
@@ -1 +1 @@
1
- {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/routes/fs.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AASpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAC7F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEtF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAG5C;;;;;;;;;;;GAWG;AAEH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,4EAA4E;IAC5E,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb,IA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