@mastra/factory 0.28.0-alpha.2 → 0.28.0-alpha.4

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 (455) hide show
  1. package/README.md +329 -154
  2. package/dist/boards/board-events.d.ts +23 -3
  3. package/dist/boards/board-events.d.ts.map +1 -1
  4. package/dist/boards/board-events.js +44 -7
  5. package/dist/boards/board-events.js.map +1 -1
  6. package/dist/boards/board-writes.d.ts +1 -1
  7. package/dist/boards/board-writes.d.ts.map +1 -1
  8. package/dist/boards/board-writes.js +16 -1
  9. package/dist/boards/board-writes.js.map +1 -1
  10. package/dist/boards/card-facts.d.ts +3 -1
  11. package/dist/boards/card-facts.d.ts.map +1 -1
  12. package/dist/boards/card-facts.js +30 -4
  13. package/dist/boards/card-facts.js.map +1 -1
  14. package/dist/boards/default-board.d.ts +7 -0
  15. package/dist/boards/default-board.d.ts.map +1 -0
  16. package/dist/boards/default-board.js +10 -0
  17. package/dist/boards/default-board.js.map +1 -0
  18. package/dist/boards/define-board.d.ts +40 -18
  19. package/dist/boards/define-board.d.ts.map +1 -1
  20. package/dist/boards/define-board.js +64 -42
  21. package/dist/boards/define-board.js.map +1 -1
  22. package/dist/boards/index.d.ts +5 -8
  23. package/dist/boards/index.d.ts.map +1 -1
  24. package/dist/boards/index.js +5 -19
  25. package/dist/boards/intake-routing.d.ts +29 -9
  26. package/dist/boards/intake-routing.d.ts.map +1 -1
  27. package/dist/boards/intake-routing.js +72 -20
  28. package/dist/boards/intake-routing.js.map +1 -1
  29. package/dist/boards/legacy-plan-role.d.ts.map +1 -1
  30. package/dist/boards/legacy-plan-role.js +7 -2
  31. package/dist/boards/legacy-plan-role.js.map +1 -1
  32. package/dist/boards/phase-automation.d.ts +7 -0
  33. package/dist/boards/phase-automation.d.ts.map +1 -1
  34. package/dist/boards/phase-automation.js +16 -5
  35. package/dist/boards/phase-automation.js.map +1 -1
  36. package/dist/boards/phase-runner.d.ts +18 -10
  37. package/dist/boards/phase-runner.d.ts.map +1 -1
  38. package/dist/boards/phase-runner.js +39 -34
  39. package/dist/boards/phase-runner.js.map +1 -1
  40. package/dist/boards/project-boards.d.ts +27 -7
  41. package/dist/boards/project-boards.d.ts.map +1 -1
  42. package/dist/boards/project-boards.js +94 -19
  43. package/dist/boards/project-boards.js.map +1 -1
  44. package/dist/boards/registry.d.ts.map +1 -1
  45. package/dist/boards/registry.js +3 -1
  46. package/dist/boards/registry.js.map +1 -1
  47. package/dist/boards/relocate.d.ts +1 -1
  48. package/dist/boards/relocate.d.ts.map +1 -1
  49. package/dist/boards/relocate.js +3 -2
  50. package/dist/boards/relocate.js.map +1 -1
  51. package/dist/boards/review.d.ts +5 -2
  52. package/dist/boards/review.d.ts.map +1 -1
  53. package/dist/boards/review.js +12 -11
  54. package/dist/boards/review.js.map +1 -1
  55. package/dist/boards/semantics.d.ts +159 -20
  56. package/dist/boards/semantics.d.ts.map +1 -1
  57. package/dist/boards/semantics.js +254 -23
  58. package/dist/boards/semantics.js.map +1 -1
  59. package/dist/boards/stored-board.d.ts +32 -18
  60. package/dist/boards/stored-board.d.ts.map +1 -1
  61. package/dist/boards/stored-board.js +31 -97
  62. package/dist/boards/stored-board.js.map +1 -1
  63. package/dist/boards/work-migrations.d.ts +42 -0
  64. package/dist/boards/work-migrations.d.ts.map +1 -0
  65. package/dist/boards/work-migrations.js +352 -0
  66. package/dist/boards/work-migrations.js.map +1 -0
  67. package/dist/boards/work-routes.d.ts +58 -0
  68. package/dist/boards/work-routes.d.ts.map +1 -0
  69. package/dist/boards/work-routes.js +270 -0
  70. package/dist/boards/work-routes.js.map +1 -0
  71. package/dist/boards/work.d.ts +8 -19
  72. package/dist/boards/work.d.ts.map +1 -1
  73. package/dist/boards/work.js +38 -270
  74. package/dist/boards/work.js.map +1 -1
  75. package/dist/factory.d.ts +26 -3
  76. package/dist/factory.d.ts.map +1 -1
  77. package/dist/factory.js +105 -62
  78. package/dist/factory.js.map +1 -1
  79. package/dist/index.d.ts +5 -2
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +3 -3
  82. package/dist/integrations/base.d.ts +6 -2
  83. package/dist/integrations/base.d.ts.map +1 -1
  84. package/dist/integrations/closing-references.d.ts +15 -0
  85. package/dist/integrations/closing-references.d.ts.map +1 -0
  86. package/dist/integrations/closing-references.js +69 -0
  87. package/dist/integrations/closing-references.js.map +1 -0
  88. package/dist/integrations/github/default-rules.d.ts +15 -66
  89. package/dist/integrations/github/default-rules.d.ts.map +1 -1
  90. package/dist/integrations/github/default-rules.js +129 -73
  91. package/dist/integrations/github/default-rules.js.map +1 -1
  92. package/dist/integrations/github/issue-reconciler.d.ts.map +1 -1
  93. package/dist/integrations/github/issue-reconciler.js +3 -1
  94. package/dist/integrations/github/issue-reconciler.js.map +1 -1
  95. package/dist/integrations/github/pull-request-source.d.ts +8 -0
  96. package/dist/integrations/github/pull-request-source.d.ts.map +1 -0
  97. package/dist/integrations/github/pull-request-source.js +17 -0
  98. package/dist/integrations/github/pull-request-source.js.map +1 -0
  99. package/dist/integrations/github/review-status-reporter.d.ts.map +1 -1
  100. package/dist/integrations/github/review-status-reporter.js +7 -3
  101. package/dist/integrations/github/review-status-reporter.js.map +1 -1
  102. package/dist/integrations/github/routes.js +1 -1
  103. package/dist/integrations/github/rules.d.ts +12 -7
  104. package/dist/integrations/github/rules.d.ts.map +1 -1
  105. package/dist/integrations/github/rules.js +214 -93
  106. package/dist/integrations/github/rules.js.map +1 -1
  107. package/dist/integrations/github/session-subscriptions.js +2 -2
  108. package/dist/integrations/github/session-subscriptions.js.map +1 -1
  109. package/dist/integrations/github/token-refresh.d.ts +2 -1
  110. package/dist/integrations/github/token-refresh.d.ts.map +1 -1
  111. package/dist/integrations/github/token-refresh.js.map +1 -1
  112. package/dist/integrations/gitlab/agent-tools.js +1 -1
  113. package/dist/integrations/gitlab/default-rules.d.ts +73 -31
  114. package/dist/integrations/gitlab/default-rules.d.ts.map +1 -1
  115. package/dist/integrations/gitlab/default-rules.js +106 -43
  116. package/dist/integrations/gitlab/default-rules.js.map +1 -1
  117. package/dist/integrations/gitlab/issue-reconciler.d.ts.map +1 -1
  118. package/dist/integrations/gitlab/issue-reconciler.js +2 -1
  119. package/dist/integrations/gitlab/issue-reconciler.js.map +1 -1
  120. package/dist/integrations/gitlab/merge-request-reconciler.d.ts.map +1 -1
  121. package/dist/integrations/gitlab/merge-request-reconciler.js +11 -4
  122. package/dist/integrations/gitlab/merge-request-reconciler.js.map +1 -1
  123. package/dist/integrations/gitlab/routes.d.ts.map +1 -1
  124. package/dist/integrations/gitlab/routes.js +1 -3
  125. package/dist/integrations/gitlab/routes.js.map +1 -1
  126. package/dist/integrations/gitlab/rules.d.ts +6 -1
  127. package/dist/integrations/gitlab/rules.d.ts.map +1 -1
  128. package/dist/integrations/gitlab/rules.js +115 -27
  129. package/dist/integrations/gitlab/rules.js.map +1 -1
  130. package/dist/integrations/gitlab/session-subscriptions.js +1 -1
  131. package/dist/integrations/incidentio/agent-tools.js +6 -6
  132. package/dist/integrations/incidentio/agent-tools.js.map +1 -1
  133. package/dist/integrations/incidentio/default-rules.d.ts.map +1 -1
  134. package/dist/integrations/incidentio/default-rules.js +3 -3
  135. package/dist/integrations/incidentio/default-rules.js.map +1 -1
  136. package/dist/integrations/incidentio/issue-reconciler.d.ts.map +1 -1
  137. package/dist/integrations/incidentio/issue-reconciler.js +2 -1
  138. package/dist/integrations/incidentio/issue-reconciler.js.map +1 -1
  139. package/dist/integrations/incidentio/routes.d.ts +2 -2
  140. package/dist/integrations/incidentio/routes.d.ts.map +1 -1
  141. package/dist/integrations/incidentio/routes.js +10 -13
  142. package/dist/integrations/incidentio/routes.js.map +1 -1
  143. package/dist/integrations/incidentio/rules.d.ts +4 -4
  144. package/dist/integrations/incidentio/rules.d.ts.map +1 -1
  145. package/dist/integrations/incidentio/rules.js +13 -12
  146. package/dist/integrations/incidentio/rules.js.map +1 -1
  147. package/dist/integrations/jira/agent-tools.js +1 -1
  148. package/dist/integrations/jira/binding-scope.d.ts +5 -6
  149. package/dist/integrations/jira/binding-scope.d.ts.map +1 -1
  150. package/dist/integrations/jira/binding-scope.js +9 -11
  151. package/dist/integrations/jira/binding-scope.js.map +1 -1
  152. package/dist/integrations/jira/default-rules.d.ts.map +1 -1
  153. package/dist/integrations/jira/default-rules.js +3 -3
  154. package/dist/integrations/jira/default-rules.js.map +1 -1
  155. package/dist/integrations/jira/issue-reconciler.d.ts.map +1 -1
  156. package/dist/integrations/jira/issue-reconciler.js +2 -1
  157. package/dist/integrations/jira/issue-reconciler.js.map +1 -1
  158. package/dist/integrations/jira/routes.d.ts.map +1 -1
  159. package/dist/integrations/jira/routes.js +3 -5
  160. package/dist/integrations/jira/routes.js.map +1 -1
  161. package/dist/integrations/jira/rules.d.ts +4 -4
  162. package/dist/integrations/jira/rules.d.ts.map +1 -1
  163. package/dist/integrations/jira/rules.js +13 -12
  164. package/dist/integrations/jira/rules.js.map +1 -1
  165. package/dist/integrations/linear/agent-tools.d.ts +9 -1
  166. package/dist/integrations/linear/agent-tools.d.ts.map +1 -1
  167. package/dist/integrations/linear/agent-tools.js +80 -2
  168. package/dist/integrations/linear/agent-tools.js.map +1 -1
  169. package/dist/integrations/linear/default-rules.d.ts.map +1 -1
  170. package/dist/integrations/linear/default-rules.js +3 -3
  171. package/dist/integrations/linear/default-rules.js.map +1 -1
  172. package/dist/integrations/linear/integration.d.ts +4 -1
  173. package/dist/integrations/linear/integration.d.ts.map +1 -1
  174. package/dist/integrations/linear/integration.js +21 -1
  175. package/dist/integrations/linear/integration.js.map +1 -1
  176. package/dist/integrations/linear/issue-reconciler.d.ts.map +1 -1
  177. package/dist/integrations/linear/issue-reconciler.js +2 -1
  178. package/dist/integrations/linear/issue-reconciler.js.map +1 -1
  179. package/dist/integrations/linear/routes.d.ts +2 -1
  180. package/dist/integrations/linear/routes.d.ts.map +1 -1
  181. package/dist/integrations/linear/routes.js +15 -17
  182. package/dist/integrations/linear/routes.js.map +1 -1
  183. package/dist/integrations/linear/rules.d.ts +4 -4
  184. package/dist/integrations/linear/rules.d.ts.map +1 -1
  185. package/dist/integrations/linear/rules.js +14 -13
  186. package/dist/integrations/linear/rules.js.map +1 -1
  187. package/dist/integrations/platform/connect/session-tools.d.ts +5 -0
  188. package/dist/integrations/platform/connect/session-tools.d.ts.map +1 -1
  189. package/dist/integrations/platform/connect/session-tools.js +5 -0
  190. package/dist/integrations/platform/connect/session-tools.js.map +1 -1
  191. package/dist/integrations/platform/github/integration.d.ts.map +1 -1
  192. package/dist/integrations/platform/github/integration.js +33 -21
  193. package/dist/integrations/platform/github/integration.js.map +1 -1
  194. package/dist/integrations/platform/jira/agent-tools.js +1 -1
  195. package/dist/integrations/platform/jira/routes.d.ts.map +1 -1
  196. package/dist/integrations/platform/jira/routes.js +3 -5
  197. package/dist/integrations/platform/jira/routes.js.map +1 -1
  198. package/dist/integrations/platform/linear/integration.d.ts +1 -1
  199. package/dist/integrations/platform/linear/integration.d.ts.map +1 -1
  200. package/dist/integrations/platform/linear/integration.js +6 -5
  201. package/dist/integrations/platform/linear/integration.js.map +1 -1
  202. package/dist/integrations/slack/chat-tools.js +1 -1
  203. package/dist/integrations/slack/reply-tool.js +1 -1
  204. package/dist/integrations/slack/share-file-tool.js +1 -1
  205. package/dist/integrations/slack/slack.d.ts +10 -4
  206. package/dist/integrations/slack/slack.d.ts.map +1 -1
  207. package/dist/integrations/slack/slack.js +19 -9
  208. package/dist/integrations/slack/slack.js.map +1 -1
  209. package/dist/links.d.ts.map +1 -1
  210. package/dist/links.js +3 -2
  211. package/dist/links.js.map +1 -1
  212. package/dist/mcp/routes.js +2 -2
  213. package/dist/routes/attention-parked.d.ts +1 -0
  214. package/dist/routes/attention-parked.d.ts.map +1 -1
  215. package/dist/routes/attention-parked.js +1 -1
  216. package/dist/routes/attention-parked.js.map +1 -1
  217. package/dist/routes/automation-runs.d.ts +5 -1
  218. package/dist/routes/automation-runs.d.ts.map +1 -1
  219. package/dist/routes/automation-runs.js +15 -0
  220. package/dist/routes/automation-runs.js.map +1 -1
  221. package/dist/routes/boards.d.ts +1 -1
  222. package/dist/routes/boards.d.ts.map +1 -1
  223. package/dist/routes/boards.js +1 -17
  224. package/dist/routes/boards.js.map +1 -1
  225. package/dist/routes/config.d.ts +4 -0
  226. package/dist/routes/config.d.ts.map +1 -1
  227. package/dist/routes/config.js +15 -0
  228. package/dist/routes/config.js.map +1 -1
  229. package/dist/routes/contracts.d.ts +128 -24
  230. package/dist/routes/contracts.d.ts.map +1 -1
  231. package/dist/routes/contracts.js +45 -24
  232. package/dist/routes/contracts.js.map +1 -1
  233. package/dist/routes/fs.d.ts +4 -0
  234. package/dist/routes/fs.d.ts.map +1 -1
  235. package/dist/routes/fs.js +8 -4
  236. package/dist/routes/fs.js.map +1 -1
  237. package/dist/routes/intake-routes.d.ts.map +1 -1
  238. package/dist/routes/intake-routes.js +6 -1
  239. package/dist/routes/intake-routes.js.map +1 -1
  240. package/dist/routes/intake.d.ts +0 -23
  241. package/dist/routes/intake.d.ts.map +1 -1
  242. package/dist/routes/intake.js +13 -309
  243. package/dist/routes/intake.js.map +1 -1
  244. package/dist/routes/projects.d.ts.map +1 -1
  245. package/dist/routes/projects.js +9 -3
  246. package/dist/routes/projects.js.map +1 -1
  247. package/dist/routes/provider-credentials.d.ts.map +1 -1
  248. package/dist/routes/provider-credentials.js +10 -5
  249. package/dist/routes/provider-credentials.js.map +1 -1
  250. package/dist/routes/running-packages.d.ts +13 -0
  251. package/dist/routes/running-packages.d.ts.map +1 -0
  252. package/dist/routes/running-packages.js +45 -0
  253. package/dist/routes/running-packages.js.map +1 -0
  254. package/dist/routes/surface.d.ts +10 -1
  255. package/dist/routes/surface.d.ts.map +1 -1
  256. package/dist/routes/surface.js +104 -37
  257. package/dist/routes/surface.js.map +1 -1
  258. package/dist/routes/work-items.d.ts.map +1 -1
  259. package/dist/routes/work-items.js +23 -3
  260. package/dist/routes/work-items.js.map +1 -1
  261. package/dist/rules/binding-context.d.ts.map +1 -1
  262. package/dist/rules/binding-context.js +1 -0
  263. package/dist/rules/binding-context.js.map +1 -1
  264. package/dist/rules/dispatcher.d.ts +0 -6
  265. package/dist/rules/dispatcher.d.ts.map +1 -1
  266. package/dist/rules/dispatcher.js +354 -60
  267. package/dist/rules/dispatcher.js.map +1 -1
  268. package/dist/rules/event-rules.d.ts +33 -2
  269. package/dist/rules/event-rules.d.ts.map +1 -1
  270. package/dist/rules/event-rules.js +46 -11
  271. package/dist/rules/event-rules.js.map +1 -1
  272. package/dist/rules/index.d.ts +2 -4
  273. package/dist/rules/index.d.ts.map +1 -1
  274. package/dist/rules/index.js +2 -3
  275. package/dist/rules/phase-goal.d.ts +54 -0
  276. package/dist/rules/phase-goal.d.ts.map +1 -0
  277. package/dist/rules/phase-goal.js +70 -0
  278. package/dist/rules/phase-goal.js.map +1 -0
  279. package/dist/rules/phase-tools.d.ts +11 -0
  280. package/dist/rules/phase-tools.d.ts.map +1 -0
  281. package/dist/rules/phase-tools.js +19 -0
  282. package/dist/rules/phase-tools.js.map +1 -0
  283. package/dist/rules/processor.d.ts.map +1 -1
  284. package/dist/rules/processor.js +112 -11
  285. package/dist/rules/processor.js.map +1 -1
  286. package/dist/rules/review-source-tool.d.ts +4 -1
  287. package/dist/rules/review-source-tool.d.ts.map +1 -1
  288. package/dist/rules/review-source-tool.js +24 -4
  289. package/dist/rules/review-source-tool.js.map +1 -1
  290. package/dist/rules/rule-group.d.ts +1 -1
  291. package/dist/rules/rule-group.d.ts.map +1 -1
  292. package/dist/rules/rule-group.js +15 -6
  293. package/dist/rules/rule-group.js.map +1 -1
  294. package/dist/rules/start-coordinator.d.ts +5 -1
  295. package/dist/rules/start-coordinator.d.ts.map +1 -1
  296. package/dist/rules/start-coordinator.js +9 -3
  297. package/dist/rules/start-coordinator.js.map +1 -1
  298. package/dist/rules/tools.d.ts.map +1 -1
  299. package/dist/rules/tools.js +39 -28
  300. package/dist/rules/tools.js.map +1 -1
  301. package/dist/rules/transition-service.d.ts +4 -10
  302. package/dist/rules/transition-service.d.ts.map +1 -1
  303. package/dist/rules/transition-service.js +61 -55
  304. package/dist/rules/transition-service.js.map +1 -1
  305. package/dist/rules/types.d.ts +86 -36
  306. package/dist/rules/types.d.ts.map +1 -1
  307. package/dist/rules/types.js +5 -41
  308. package/dist/rules/types.js.map +1 -1
  309. package/dist/rules/validation.d.ts.map +1 -1
  310. package/dist/rules/validation.js +32 -2
  311. package/dist/rules/validation.js.map +1 -1
  312. package/dist/secret-encryption.d.ts +21 -0
  313. package/dist/secret-encryption.d.ts.map +1 -1
  314. package/dist/secret-encryption.js +31 -4
  315. package/dist/secret-encryption.js.map +1 -1
  316. package/dist/session/self-review-gate.d.ts +6 -4
  317. package/dist/session/self-review-gate.d.ts.map +1 -1
  318. package/dist/session/self-review-gate.js +9 -12
  319. package/dist/session/self-review-gate.js.map +1 -1
  320. package/dist/session/session-threads.d.ts +2 -3
  321. package/dist/session/session-threads.d.ts.map +1 -1
  322. package/dist/session/session-threads.js.map +1 -1
  323. package/dist/session/source-control-tools.d.ts +39 -13
  324. package/dist/session/source-control-tools.d.ts.map +1 -1
  325. package/dist/session/source-control-tools.js +55 -61
  326. package/dist/session/source-control-tools.js.map +1 -1
  327. package/dist/session/work-item-state-processor.d.ts +24 -0
  328. package/dist/session/work-item-state-processor.d.ts.map +1 -0
  329. package/dist/session/work-item-state-processor.js +275 -0
  330. package/dist/session/work-item-state-processor.js.map +1 -0
  331. package/dist/storage/domains/boards/base.d.ts +70 -31
  332. package/dist/storage/domains/boards/base.d.ts.map +1 -1
  333. package/dist/storage/domains/boards/base.js +99 -126
  334. package/dist/storage/domains/boards/base.js.map +1 -1
  335. package/dist/storage/domains/boards/schemas.d.ts.map +1 -1
  336. package/dist/storage/domains/boards/schemas.js +12 -0
  337. package/dist/storage/domains/boards/schemas.js.map +1 -1
  338. package/dist/storage/domains/intake/base.d.ts +5 -45
  339. package/dist/storage/domains/intake/base.d.ts.map +1 -1
  340. package/dist/storage/domains/intake/base.js +11 -89
  341. package/dist/storage/domains/intake/base.js.map +1 -1
  342. package/dist/storage/domains/projects/base.d.ts +17 -9
  343. package/dist/storage/domains/projects/base.d.ts.map +1 -1
  344. package/dist/storage/domains/projects/base.js +15 -7
  345. package/dist/storage/domains/projects/base.js.map +1 -1
  346. package/dist/storage/domains/work-items/base.d.ts +39 -4
  347. package/dist/storage/domains/work-items/base.d.ts.map +1 -1
  348. package/dist/storage/domains/work-items/base.js +113 -26
  349. package/dist/storage/domains/work-items/base.js.map +1 -1
  350. package/dist/storage/domains/work-items/cards.d.ts +24 -2
  351. package/dist/storage/domains/work-items/cards.d.ts.map +1 -1
  352. package/dist/storage/domains/work-items/cards.js +118 -8
  353. package/dist/storage/domains/work-items/cards.js.map +1 -1
  354. package/dist/storage/domains/work-items/legacy-review.d.ts +63 -0
  355. package/dist/storage/domains/work-items/legacy-review.d.ts.map +1 -0
  356. package/dist/storage/domains/work-items/legacy-review.js +95 -0
  357. package/dist/storage/domains/work-items/legacy-review.js.map +1 -0
  358. package/dist/storage/domains/work-items/metrics.d.ts +12 -4
  359. package/dist/storage/domains/work-items/metrics.d.ts.map +1 -1
  360. package/dist/storage/domains/work-items/metrics.js +14 -32
  361. package/dist/storage/domains/work-items/metrics.js.map +1 -1
  362. package/dist/storage/domains/work-items/work-item-schema.d.ts +2 -0
  363. package/dist/storage/domains/work-items/work-item-schema.d.ts.map +1 -1
  364. package/dist/storage/domains/work-items/work-item-schema.js +5 -0
  365. package/dist/storage/domains/work-items/work-item-schema.js.map +1 -1
  366. package/dist/tools/approval-tools.d.ts.map +1 -1
  367. package/dist/tools/approval-tools.js +28 -9
  368. package/dist/tools/approval-tools.js.map +1 -1
  369. package/dist/tools/index.d.ts +1 -1
  370. package/dist/tools/index.js +1 -1
  371. package/dist/tools/index.js.map +1 -1
  372. package/dist/tools/messaging-tools.d.ts +3 -0
  373. package/dist/tools/messaging-tools.d.ts.map +1 -1
  374. package/dist/tools/messaging-tools.js +2 -1
  375. package/dist/tools/messaging-tools.js.map +1 -1
  376. package/dist/tools/read-tools.d.ts +8 -2
  377. package/dist/tools/read-tools.d.ts.map +1 -1
  378. package/dist/tools/read-tools.js +83 -23
  379. package/dist/tools/read-tools.js.map +1 -1
  380. package/dist/tools/reports.d.ts +1 -0
  381. package/dist/tools/reports.d.ts.map +1 -1
  382. package/dist/tools/reports.js +2 -1
  383. package/dist/tools/reports.js.map +1 -1
  384. package/dist/tools/run-watch.d.ts +1 -1
  385. package/dist/tools/run-watch.d.ts.map +1 -1
  386. package/dist/tools/run-watch.js +1 -0
  387. package/dist/tools/run-watch.js.map +1 -1
  388. package/dist/tools/sandbox-tools.js +1 -1
  389. package/dist/tools/session-tools.js +1 -1
  390. package/dist/tools/sessions-state-processor.d.ts +2 -0
  391. package/dist/tools/sessions-state-processor.d.ts.map +1 -1
  392. package/dist/tools/sessions-state-processor.js +4 -2
  393. package/dist/tools/sessions-state-processor.js.map +1 -1
  394. package/dist/tools/side-sessions.d.ts +2 -0
  395. package/dist/tools/side-sessions.d.ts.map +1 -1
  396. package/dist/tools/side-sessions.js +2 -1
  397. package/dist/tools/side-sessions.js.map +1 -1
  398. package/dist/tools/work-item-tools.js +3 -3
  399. package/dist/tools/work-item-tools.js.map +1 -1
  400. package/dist/work-item-branch.d.ts +13 -0
  401. package/dist/work-item-branch.d.ts.map +1 -1
  402. package/dist/work-item-branch.js +16 -1
  403. package/dist/work-item-branch.js.map +1 -1
  404. package/dist/work-items/create-work-item.d.ts +6 -0
  405. package/dist/work-items/create-work-item.d.ts.map +1 -1
  406. package/dist/work-items/create-work-item.js +25 -1
  407. package/dist/work-items/create-work-item.js.map +1 -1
  408. package/dist/work-items/providers/base.d.ts +4 -1
  409. package/dist/work-items/providers/base.d.ts.map +1 -1
  410. package/dist/work-items/providers/base.js +6 -1
  411. package/dist/work-items/providers/base.js.map +1 -1
  412. package/dist/work-items/providers/github.d.ts.map +1 -1
  413. package/dist/work-items/providers/github.js +2 -1
  414. package/dist/work-items/providers/github.js.map +1 -1
  415. package/dist/work-items/providers/gitlab.d.ts.map +1 -1
  416. package/dist/work-items/providers/gitlab.js +2 -1
  417. package/dist/work-items/providers/gitlab.js.map +1 -1
  418. package/dist/work-items/providers/jira.d.ts.map +1 -1
  419. package/dist/work-items/providers/jira.js +3 -2
  420. package/dist/work-items/providers/jira.js.map +1 -1
  421. package/dist/work-items/providers/linear.d.ts.map +1 -1
  422. package/dist/work-items/providers/linear.js +3 -2
  423. package/dist/work-items/providers/linear.js.map +1 -1
  424. package/dist/work-items/providers/types.d.ts +6 -0
  425. package/dist/work-items/providers/types.d.ts.map +1 -1
  426. package/dist/work-items/split-migration.d.ts.map +1 -1
  427. package/dist/work-items/split-migration.js +1 -0
  428. package/dist/work-items/split-migration.js.map +1 -1
  429. package/dist/workspace.d.ts.map +1 -1
  430. package/dist/workspace.js +53 -10
  431. package/dist/workspace.js.map +1 -1
  432. package/factory-skills/configure-factory-rules/SKILL.md +12 -10
  433. package/factory-skills/factory-build/SKILL.md +64 -0
  434. package/factory-skills/factory-gitlab-rereview/SKILL.md +2 -2
  435. package/factory-skills/factory-gitlab-review/SKILL.md +3 -3
  436. package/factory-skills/factory-plan/SKILL.md +8 -10
  437. package/factory-skills/factory-rereview/SKILL.md +5 -5
  438. package/factory-skills/factory-review/SKILL.md +16 -6
  439. package/factory-skills/factory-self-review/SKILL.md +31 -11
  440. package/factory-skills/factory-triage/SKILL.md +25 -10
  441. package/package.json +11 -11
  442. package/dist/boards/index.js.map +0 -1
  443. package/dist/boards/pull-request-review.d.ts +0 -14
  444. package/dist/boards/pull-request-review.d.ts.map +0 -1
  445. package/dist/boards/pull-request-review.js +0 -81
  446. package/dist/boards/pull-request-review.js.map +0 -1
  447. package/dist/boards/work-tool-rules.d.ts +0 -8
  448. package/dist/boards/work-tool-rules.d.ts.map +0 -1
  449. package/dist/boards/work-tool-rules.js +0 -19
  450. package/dist/boards/work-tool-rules.js.map +0 -1
  451. package/dist/rules/resolve.d.ts +0 -15
  452. package/dist/rules/resolve.d.ts.map +0 -1
  453. package/dist/rules/resolve.js +0 -22
  454. package/dist/rules/resolve.js.map +0 -1
  455. package/factory-skills/factory-complete-issue/SKILL.md +0 -24
@@ -5,11 +5,13 @@ export type WorkItemSource = 'github-issue' | 'github-pr' | 'gitlab-issue' | 'gi
5
5
  export declare function externalSourceForWorkItem(source: WorkItemSource, sourceKey: string, url?: string): ExternalWorkItemSource;
6
6
  /** The source label that holds an issue at rest until a maintainer decides; compared lowercased. */
7
7
  export declare const NEEDS_APPROVAL_LABEL = "status: needs approval";
8
+ /** Request-changes rounds from self-review before the card parks in Intake for a person. */
9
+ export declare const SELF_REVIEW_ROUND_LIMIT = 3;
8
10
  export declare const AUTO_TRIAGED_LABEL = "status: auto-triaged";
9
11
  export declare function needsApproval(item: {
10
12
  workItem: Pick<WorkItemRow, 'labels'>;
11
13
  stages?: readonly string[];
12
- }): boolean;
14
+ }, awaitsAcceptance: (stage: string) => boolean): boolean;
13
15
  export declare function workItemSource(source: ExternalWorkItemSource | null): WorkItemSource;
14
16
  /** The card's author is inside the write-access circle, or the card is Factory's own PR. */
15
17
  export declare function authorTrusted(metadata: Record<string, unknown> | null | undefined): boolean;
@@ -21,27 +23,13 @@ export declare function externallyAuthoredWorkItem(item: {
21
23
  externalSource: ExternalWorkItemSource | null;
22
24
  metadata: Record<string, unknown> | null;
23
25
  }): boolean;
24
- export declare const FACTORY_RULE_STAGES: readonly ['intake', 'triage', 'planning', 'execute', 'review', 'pr-review', 'done', 'canceled'];
25
- export type FactoryRuleStage = (typeof FACTORY_RULE_STAGES)[number] | (string & {});
26
- export declare const FACTORY_ROLE_STAGES: {
27
- readonly triage: 'triage';
28
- readonly plan: 'planning';
29
- readonly work: 'execute';
30
- readonly review: 'review';
31
- };
32
- export type FactoryRole = keyof typeof FACTORY_ROLE_STAGES;
33
- export declare function isFactoryRole(value: string): value is FactoryRole;
26
+ /** A phase key on the card's board. Boards name their own phases; Factory reads none of them by name. */
27
+ export type FactoryRuleStage = string;
34
28
  export declare const FACTORY_TRIAGE_TYPES: readonly ['bug', 'feature request', 'docs', 'question/support', 'maintenance', 'duplicate', 'resolved', 'invalid', 'spam', 'out-of-scope', 'other'];
35
29
  export type FactoryTriageType = (typeof FACTORY_TRIAGE_TYPES)[number];
36
30
  export declare function isFactoryTriageType(value: unknown): value is FactoryTriageType;
37
- export declare function isFactoryRuleStage(value: unknown): value is FactoryRuleStage;
38
- export declare function factoryRuleStage(stages: readonly string[]): FactoryRuleStage | undefined;
39
- export declare function isTerminalFactoryRuleStage(stages: readonly string[]): boolean;
40
- /** Working lanes hold cards with a seat engaged; Intake, Done and Canceled rest them. */
41
- export declare function isWorkingFactoryRuleStage(stage: FactoryRuleStage): boolean;
42
- export declare function factoryLaneForRole(role: string): FactoryRuleStage | undefined;
43
- export declare const FACTORY_RULE_BOARDS: readonly ['work', 'review'];
44
- export type FactoryRuleBoard = (typeof FACTORY_RULE_BOARDS)[number] | (string & {});
31
+ /** A board id. */
32
+ export type FactoryRuleBoard = string;
45
33
  export declare const FACTORY_RULE_SOURCES: readonly ['issue', 'pullRequest', 'gitlabIssue', 'gitlabPullRequest', 'linearIssue', 'jiraIssue', 'incidentioFollowUp', 'manual'];
46
34
  export type FactoryRuleSource = (typeof FACTORY_RULE_SOURCES)[number];
47
35
  export declare const FACTORY_GITHUB_EVENTS: readonly ['issueOpened', 'issueEdited', 'issueClosed', 'issueReopened', 'issueCommentCreated', 'issueCommentEdited', 'issueCommentDeleted', 'pullRequestOpened', 'pullRequestUpdated', 'pullRequestCommentCreated', 'pullRequestReviewRequested', 'pullRequestReviewSubmitted', 'pullRequestMerged', 'pullRequestClosed'];
@@ -113,8 +101,6 @@ export interface FactoryRulePhaseContext {
113
101
  role?: string;
114
102
  /** Phases the card may move to from here. */
115
103
  nextPhases: readonly string[];
116
- /** Outcome names the phase declares, e.g. `approved` or `canceled`; empty when it declares none. */
117
- outcomes: readonly string[];
118
104
  }
119
105
  export interface FactoryRuleContextBase {
120
106
  tenant: {
@@ -137,8 +123,6 @@ export interface FactoryStageRuleContext extends FactoryBoundRuleContext {
137
123
  stage: FactoryRuleStage;
138
124
  fromStage: FactoryRuleStage;
139
125
  toStage: FactoryRuleStage;
140
- /** Project switch: Work items get an independent self-review before the change request opens. Unset means off. */
141
- selfReviewEnabled?: boolean;
142
126
  }
143
127
  export interface FactoryToolResultRuleContext extends FactoryBoundRuleContext {
144
128
  toolName: string;
@@ -158,12 +142,11 @@ export interface FactoryGithubRuleContext extends FactoryRuleContextBase {
158
142
  itemRevision?: number;
159
143
  /** Where the card's board sends it when its tracked source closes. */
160
144
  boardClosure?: FactoryRuleBoardClosure;
145
+ /** The phases the card's board runs its pull request loop through; absent without a card. */
146
+ flow?: FactoryRuleBoardFlow;
161
147
  /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */
162
148
  phase?: FactoryRulePhaseContext;
163
- /**
164
- * Board an issue's labels route it to, when the project has a matching label route and that board
165
- * is installed. Absent for pull requests and for issues whose labels select nothing.
166
- */
149
+ /** Where a new card is filed before the project's intake routes place it. */
167
150
  intake?: FactoryRuleIntakeTarget;
168
151
  /**
169
152
  * Set on the one evaluation per pull request delivery that files the pull
@@ -175,6 +158,13 @@ export interface FactoryGithubRuleContext extends FactoryRuleContextBase {
175
158
  * leaves the flag unset.
176
159
  */
177
160
  pullRequestIntake?: boolean;
161
+ /**
162
+ * Set on both evaluations of a pull request's first sighting when it belongs on an existing
163
+ * card: the Work card that authored it (`authored`), or the card of the issue a trusted author's
164
+ * pull request says it closes (`closes`). The pull request is filed on that card as one more
165
+ * source rather than on a card of its own.
166
+ */
167
+ pullRequestHome?: FactoryPullRequestHome;
178
168
  event: FactoryGithubEventName;
179
169
  deliveryId: string;
180
170
  factory: {
@@ -226,6 +216,8 @@ export interface FactoryGithubRuleContext extends FactoryRuleContextBase {
226
216
  author?: string;
227
217
  factoryAuthored: boolean;
228
218
  headBranch: string;
219
+ /** Lowercase head commit SHA, when the delivery carries one. */
220
+ headSha?: string;
229
221
  baseBranch: string;
230
222
  };
231
223
  /** Present on `pullRequestReviewRequested`: who review was (re-)requested from. */
@@ -251,8 +243,9 @@ export interface FactoryGithubRuleContext extends FactoryRuleContextBase {
251
243
  };
252
244
  }
253
245
  /**
254
- * Where an intake source binding says new items from this source should land.
255
- * Absent when the source is unbound or bound without a board (built-in routing).
246
+ * Where an integration files a new card: the default board's initial phase. The project's intake
247
+ * routes then decide where the card goes; the board and phase a rule names don't. Absent when the
248
+ * default board is not installed.
256
249
  */
257
250
  export interface FactoryRuleIntakeTarget {
258
251
  board: string;
@@ -276,6 +269,28 @@ export interface FactoryRuleBoardClosurePhase {
276
269
  phase: string;
277
270
  title: string;
278
271
  }
272
+ /**
273
+ * The phases a card's board runs its pull request loop through, read from what each phase declares
274
+ * (see `boardFlow`). Every field is absent when the board has no such phase.
275
+ */
276
+ export interface FactoryRuleBoardFlow {
277
+ /** Where a card on the board rests before work starts and goes back to when its pull request is abandoned. */
278
+ readonly initialPhase?: string;
279
+ /** Phase that takes pull requests: reviews them, records verdicts on them, and re-reviews pushes. */
280
+ readonly pullRequestReview?: string;
281
+ /** Working phase that sorts new cards before anyone accepts them: on a board that builds, the first one that neither builds nor reviews. */
282
+ readonly triage?: string;
283
+ /** Working phase that reviews the builder's branch before a pull request opens. */
284
+ readonly selfReview?: string;
285
+ /** Working phase that builds the change and opens the pull request. */
286
+ readonly build?: string;
287
+ /** Seat that runs {@link build}; pull request feedback wakes it. */
288
+ readonly buildRole?: string;
289
+ /** Terminal phase a merge finishes the card in: the board's `sourceClosed.completed`, else its first terminal phase. */
290
+ readonly completed?: Readonly<FactoryRuleBoardClosurePhase>;
291
+ /** Terminal phase a pull request closed unmerged ends its own card in: `sourceClosed.canceled`, else the next terminal phase. */
292
+ readonly canceled?: Readonly<FactoryRuleBoardClosurePhase>;
293
+ }
279
294
  export interface FactoryGitLabRuleContext extends FactoryRuleContextBase {
280
295
  /** The status change this delivery reports, named the same for every provider; absent for other events. */
281
296
  boardEvent?: BoardEventFacts;
@@ -284,9 +299,13 @@ export interface FactoryGitLabRuleContext extends FactoryRuleContextBase {
284
299
  itemRevision?: number;
285
300
  /** Where the card's board sends it when its tracked source closes. */
286
301
  boardClosure?: FactoryRuleBoardClosure;
302
+ /** The phases the card's board runs its pull request loop through; absent without a card. */
303
+ flow?: FactoryRuleBoardFlow;
287
304
  /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */
288
305
  phase?: FactoryRulePhaseContext;
289
306
  intake?: FactoryRuleIntakeTarget;
307
+ /** Set on a merge request's first sighting when it is filed on an existing card instead of its own. */
308
+ pullRequestHome?: FactoryPullRequestHome;
290
309
  event: FactoryGitLabEventName;
291
310
  deliveryId: string;
292
311
  factory: {
@@ -347,9 +366,11 @@ export interface FactoryLinearRuleContext extends FactoryRuleContextBase {
347
366
  itemRevision?: number;
348
367
  /** Where the card's board sends it when its tracked source closes. */
349
368
  boardClosure?: FactoryRuleBoardClosure;
369
+ /** The phases the card's board runs its pull request loop through; absent without a card. */
370
+ flow?: FactoryRuleBoardFlow;
350
371
  /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */
351
372
  phase?: FactoryRulePhaseContext;
352
- /** Bound board for the source this issue came from, when one is configured and installed. */
373
+ /** Where a new card is filed before the project's intake routes place it. */
353
374
  intake?: FactoryRuleIntakeTarget;
354
375
  event: FactoryLinearEventName;
355
376
  issue: {
@@ -378,9 +399,11 @@ export interface FactoryJiraRuleContext extends FactoryRuleContextBase {
378
399
  itemRevision?: number;
379
400
  /** Where the card's board sends it when its tracked source closes. */
380
401
  boardClosure?: FactoryRuleBoardClosure;
402
+ /** The phases the card's board runs its pull request loop through; absent without a card. */
403
+ flow?: FactoryRuleBoardFlow;
381
404
  /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */
382
405
  phase?: FactoryRulePhaseContext;
383
- /** Bound board for the source this issue came from, when one is configured and installed. */
406
+ /** Where a new card is filed before the project's intake routes place it. */
384
407
  intake?: FactoryRuleIntakeTarget;
385
408
  event: FactoryJiraEventName;
386
409
  issue: {
@@ -409,9 +432,11 @@ export interface FactoryIncidentioRuleContext extends FactoryRuleContextBase {
409
432
  itemRevision?: number;
410
433
  /** Where the card's board sends it when its tracked source closes. */
411
434
  boardClosure?: FactoryRuleBoardClosure;
435
+ /** The phases the card's board runs its pull request loop through; absent without a card. */
436
+ flow?: FactoryRuleBoardFlow;
412
437
  /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */
413
438
  phase?: FactoryRulePhaseContext;
414
- /** Bound board for the source this follow-up came from, when one is configured and installed. */
439
+ /** Where a new card is filed before the project's intake routes place it. */
415
440
  intake?: FactoryRuleIntakeTarget;
416
441
  event: FactoryIncidentioEventName;
417
442
  issue: {
@@ -433,10 +458,6 @@ export interface FactoryIncidentioRuleContext extends FactoryRuleContextBase {
433
458
  };
434
459
  }
435
460
  export type FactoryRuleHandler<TContext> = (context: Readonly<TContext>) => FactoryRuleDecision | void | Promise<FactoryRuleDecision | void>;
436
- export interface FactoryBoardRuleLeaf {
437
- onEnter?: FactoryRuleHandler<FactoryStageRuleContext>;
438
- onExit?: FactoryRuleHandler<FactoryStageRuleContext>;
439
- }
440
461
  export type FactoryRuleRejectionCode = 'forbidden' | 'invalid_transition' | 'missing_binding' | 'stale' | 'timeout' | 'rule_error' | 'causal_depth_exceeded' | 'repeated_transition' | 'approval_required';
441
462
  export interface FactoryRuleRejectDecision {
442
463
  type: 'reject';
@@ -508,6 +529,11 @@ export interface FactorySignalActivityDecision extends FactoryCommitDecisionBase
508
529
  */
509
530
  idleBehavior?: 'wake' | 'persist';
510
531
  }
532
+ /** The existing card a pull or merge request is filed on; see `pullRequestHome`. */
533
+ export interface FactoryPullRequestHome {
534
+ workItemId: string;
535
+ reason: 'authored' | 'closes';
536
+ }
511
537
  export interface FactoryUpsertLinkedWorkItemDecision extends FactoryCommitDecisionBase {
512
538
  type: 'upsertLinkedWorkItem';
513
539
  board: FactoryRuleBoard;
@@ -528,6 +554,22 @@ export interface FactoryUpsertLinkedWorkItemDecision extends FactoryCommitDecisi
528
554
  * metadata is left alone.
529
555
  */
530
556
  skipRules?: boolean;
557
+ /**
558
+ * File the pull or merge request on this existing card, the one that authored it, as one more
559
+ * source instead of on a card of its own. Applies only when no card holds the record yet and
560
+ * the card is still open on Work; otherwise the record is filed as usual.
561
+ */
562
+ attachTo?: {
563
+ workItemId: string;
564
+ };
565
+ /**
566
+ * The card of the issue this pull or merge request closes. When no card holds the record yet,
567
+ * the project's intake routes can test that card and join the record to it (see
568
+ * `IntakeRouteTarget.joinClosedIssue`); otherwise it is filed as usual.
569
+ */
570
+ closesIssue?: {
571
+ workItemId: string;
572
+ };
531
573
  metadata?: Record<string, FactoryRuleJsonValue>;
532
574
  }
533
575
  interface FactoryInvokeSkillDecisionBase extends FactoryCommitDecisionBase {
@@ -543,6 +585,14 @@ interface FactoryInvokeSkillDecisionBase extends FactoryCommitDecisionBase {
543
585
  * Without it, an agent's own move into a phase of its role starts nothing.
544
586
  */
545
587
  startsAfterOwnMove?: boolean;
588
+ /**
589
+ * Pursue the run's work as a goal: the session's thread holds `objective` until the card
590
+ * leaves the phase, and the agent's goal judge keeps the run going until it is met.
591
+ */
592
+ goal?: {
593
+ objective: string;
594
+ maxRuns?: number;
595
+ };
546
596
  }
547
597
  /**
548
598
  * Starting an agent run. Most runs activate a skill, because the skill carries
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/rules/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AAErF,MAAM,MAAM,cAAc,GACtB,cAAc,GACd,WAAW,GACX,cAAc,GACd,WAAW,GACX,cAAc,GACd,YAAY,GACZ,sBAAsB,GACtB,QAAQ,CAAC;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;;;;GAIG;AACH,MAAM,WAAW,kCAAmC,SAAQ,yBAAyB;IACnF,IAAI,EAAE,qBAAqB,CAAC;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,qBAAqB,GAC7B,yBAAyB,GACzB,yBAAyB,GACzB,6BAA6B,GAC7B,kCAAkC,GAClC,mCAAmC,GACnC,0BAA0B,GAC1B,0BAA0B,GAC1B,qBAAqB,CAAC;AAE1B,MAAM,MAAM,mBAAmB,GAAG,yBAAyB,GAAG,qBAAqB,CAAC;AAEpF,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,gBAAgB,CAAC;IACxB,SAAS,EAAE,qBAAqB,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,+BAA+B;IAC9C,MAAM,EAAE,UAAU,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,wBAAwB,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,uBAAuB,GAAG,+BAA+B,GAAG,+BAA+B,CAAC;AAExG,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,cAAc,GAAG,iBAAiB,CAmBtF"}
@@ -10,11 +10,13 @@ function externalSourceForWorkItem(source, sourceKey, url) {
10
10
  }
11
11
  /** The source label that holds an issue at rest until a maintainer decides; compared lowercased. */
12
12
  const NEEDS_APPROVAL_LABEL = "status: needs approval";
13
+ /** Request-changes rounds from self-review before the card parks in Intake for a person. */
14
+ const SELF_REVIEW_ROUND_LIMIT = 3;
13
15
  const AUTO_TRIAGED_LABEL = "status: auto-triaged";
14
- function needsApproval(item) {
16
+ function needsApproval(item, awaitsAcceptance) {
15
17
  const labels = item.workItem.labels;
16
18
  if (!Array.isArray(labels)) return false;
17
- return labels.some((label) => typeof label === "string" && label.toLowerCase() === "status: needs approval") && (item.stages ?? ["intake"]).every((stage) => stage === "intake" || stage === "triage");
19
+ return labels.some((label) => typeof label === "string" && label.toLowerCase() === "status: needs approval") && (item.stages ?? []).every(awaitsAcceptance);
18
20
  }
19
21
  function workItemSource(source) {
20
22
  if (!source) return "manual";
@@ -44,25 +46,6 @@ function externallyAuthoredWorkItem(item) {
44
46
  metadata: item.metadata
45
47
  });
46
48
  }
47
- const FACTORY_RULE_STAGES = [
48
- "intake",
49
- "triage",
50
- "planning",
51
- "execute",
52
- "review",
53
- "pr-review",
54
- "done",
55
- "canceled"
56
- ];
57
- const FACTORY_ROLE_STAGES = {
58
- triage: "triage",
59
- plan: "planning",
60
- work: "execute",
61
- review: "review"
62
- };
63
- function isFactoryRole(value) {
64
- return value in FACTORY_ROLE_STAGES;
65
- }
66
49
  const FACTORY_TRIAGE_TYPES = [
67
50
  "bug",
68
51
  "feature request",
@@ -79,25 +62,6 @@ const FACTORY_TRIAGE_TYPES = [
79
62
  function isFactoryTriageType(value) {
80
63
  return typeof value === "string" && FACTORY_TRIAGE_TYPES.some((type) => type === value);
81
64
  }
82
- function isFactoryRuleStage(value) {
83
- return typeof value === "string" && FACTORY_RULE_STAGES.some((stage) => stage === value);
84
- }
85
- function factoryRuleStage(stages) {
86
- const stage = stages.length === 1 ? stages[0] : void 0;
87
- return typeof stage === "string" && stage.length > 0 ? stage : void 0;
88
- }
89
- function isTerminalFactoryRuleStage(stages) {
90
- const stage = factoryRuleStage(stages);
91
- return stage === "done" || stage === "canceled";
92
- }
93
- /** Working lanes hold cards with a seat engaged; Intake, Done and Canceled rest them. */
94
- function isWorkingFactoryRuleStage(stage) {
95
- return stage !== "intake" && !isTerminalFactoryRuleStage([stage]);
96
- }
97
- function factoryLaneForRole(role) {
98
- return isFactoryRole(role) ? FACTORY_ROLE_STAGES[role] : void 0;
99
- }
100
- const FACTORY_RULE_BOARDS = ["work", "review"];
101
65
  const FACTORY_RULE_SOURCES = [
102
66
  "issue",
103
67
  "pullRequest",
@@ -151,6 +115,6 @@ function factoryRuleSourceForWorkItem(source) {
151
115
  case "manual": return "manual";
152
116
  }
153
117
  }
154
- export { AUTO_TRIAGED_LABEL, FACTORY_GITHUB_EVENTS, FACTORY_GITLAB_EVENTS, FACTORY_INCIDENTIO_EVENTS, FACTORY_JIRA_EVENTS, FACTORY_LINEAR_EVENTS, FACTORY_ROLE_STAGES, FACTORY_RULE_BOARDS, FACTORY_RULE_SOURCES, FACTORY_RULE_STAGES, FACTORY_TRIAGE_TYPES, NEEDS_APPROVAL_LABEL, authorTrusted, externalSourceForWorkItem, externallyAuthored, externallyAuthoredWorkItem, factoryLaneForRole, factoryRuleSourceForWorkItem, factoryRuleStage, isFactoryRole, isFactoryRuleStage, isFactoryTriageType, isTerminalFactoryRuleStage, isWorkingFactoryRuleStage, needsApproval, workItemSource };
118
+ export { AUTO_TRIAGED_LABEL, FACTORY_GITHUB_EVENTS, FACTORY_GITLAB_EVENTS, FACTORY_INCIDENTIO_EVENTS, FACTORY_JIRA_EVENTS, FACTORY_LINEAR_EVENTS, FACTORY_RULE_SOURCES, FACTORY_TRIAGE_TYPES, NEEDS_APPROVAL_LABEL, SELF_REVIEW_ROUND_LIMIT, authorTrusted, externalSourceForWorkItem, externallyAuthored, externallyAuthoredWorkItem, factoryRuleSourceForWorkItem, isFactoryTriageType, needsApproval, workItemSource };
155
119
 
156
120
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../src/rules/types.ts"],"sourcesContent":["import type { ActivityEvent, BoardEventFacts } from '../boards/board-events.js';\nimport type { ExternalWorkItemSource } from '../storage/domains/work-items/base.js';\nimport type { WorkItemRow } from '../storage/domains/work-items/work-item-schema.js';\n\nexport type WorkItemSource =\n | 'github-issue'\n | 'github-pr'\n | 'gitlab-issue'\n | 'gitlab-pr'\n | 'linear-issue'\n | 'jira-issue'\n | 'incidentio-follow-up'\n | 'manual';\n\nexport function externalSourceForWorkItem(\n source: WorkItemSource,\n sourceKey: string,\n url?: string,\n): ExternalWorkItemSource {\n const [integrationId, type] =\n source === 'github-pr'\n ? ['github', 'pull-request']\n : source === 'github-issue'\n ? ['github', 'issue']\n : source === 'gitlab-pr'\n ? ['gitlab', 'pull-request']\n : source === 'gitlab-issue'\n ? ['gitlab', 'issue']\n : source === 'linear-issue'\n ? ['linear', 'issue']\n : source === 'jira-issue'\n ? ['jira', 'issue']\n : source === 'incidentio-follow-up'\n ? ['incidentio', 'issue']\n : ['factory', 'manual'];\n return { integrationId, type, externalId: sourceKey, ...(url ? { url } : {}) };\n}\n\n/** The source label that holds an issue at rest until a maintainer decides; compared lowercased. */\nexport const NEEDS_APPROVAL_LABEL = 'status: needs approval';\nexport const AUTO_TRIAGED_LABEL = 'status: auto-triaged';\n\n// The label only holds a card at rest: once a person moves it into a working lane, the\n// label is stale until the source catches up (Factory removes it on that move).\nexport function needsApproval(item: { workItem: Pick<WorkItemRow, 'labels'>; stages?: readonly string[] }): boolean {\n const labels = item.workItem.labels;\n if (!Array.isArray(labels)) return false;\n return (\n labels.some(label => typeof label === 'string' && label.toLowerCase() === NEEDS_APPROVAL_LABEL) &&\n (item.stages ?? ['intake']).every(stage => stage === 'intake' || stage === 'triage')\n );\n}\n\nexport function workItemSource(source: ExternalWorkItemSource | null): WorkItemSource {\n if (!source) return 'manual';\n if (source.integrationId === 'linear') return 'linear-issue';\n if (source.integrationId === 'gitlab') return source.type === 'pull-request' ? 'gitlab-pr' : 'gitlab-issue';\n if (source.integrationId === 'jira') return 'jira-issue';\n if (source.integrationId === 'incidentio') return 'incidentio-follow-up';\n // Only GitHub, GitLab, Linear, Jira, and incident.io have provider-specific\n // rules; anything else (a Slack thread, say) is a plain work item, not a\n // mislabeled GitHub issue.\n if (source.integrationId !== 'github') return 'manual';\n return source.type === 'pull-request' ? 'github-pr' : 'github-issue';\n}\n\n/** The card's author is inside the write-access circle, or the card is Factory's own PR. */\nexport function authorTrusted(metadata: Record<string, unknown> | null | undefined): boolean {\n return metadata?.authorTrusted === true || metadata?.factoryAuthored === true;\n}\n\n// Authored outside the write-access circle: a missing trust stamp fails closed until\n// the reconcile sweep backfills it, and Factory's own PRs pass through `factoryAuthored`.\nexport function externallyAuthored(item: { source: string; metadata: Record<string, unknown> | null }): boolean {\n if (!['github-pr', 'github-issue', 'gitlab-pr', 'gitlab-issue'].includes(item.source)) return false;\n return !authorTrusted(item.metadata);\n}\n\nexport function externallyAuthoredWorkItem(item: {\n externalSource: ExternalWorkItemSource | null;\n metadata: Record<string, unknown> | null;\n}): boolean {\n return externallyAuthored({ source: workItemSource(item.externalSource), metadata: item.metadata });\n}\n\nexport const FACTORY_RULE_STAGES = [\n 'intake',\n 'triage',\n 'planning',\n 'execute',\n 'review',\n 'pr-review',\n 'done',\n 'canceled',\n] as const;\nexport type FactoryRuleStage = (typeof FACTORY_RULE_STAGES)[number] | (string & {});\n\n// Each role and the working stage its run holds the card in. Key order is the\n// seat pipeline order — Resume depth derives from it.\nexport const FACTORY_ROLE_STAGES = {\n triage: 'triage',\n plan: 'planning',\n work: 'execute',\n review: 'review',\n} as const satisfies Record<string, FactoryRuleStage>;\nexport type FactoryRole = keyof typeof FACTORY_ROLE_STAGES;\n\nexport function isFactoryRole(value: string): value is FactoryRole {\n return value in FACTORY_ROLE_STAGES;\n}\n\nexport const FACTORY_TRIAGE_TYPES = [\n 'bug',\n 'feature request',\n 'docs',\n 'question/support',\n 'maintenance',\n 'duplicate',\n 'resolved',\n 'invalid',\n 'spam',\n 'out-of-scope',\n 'other',\n] as const;\nexport type FactoryTriageType = (typeof FACTORY_TRIAGE_TYPES)[number];\n\nexport function isFactoryTriageType(value: unknown): value is FactoryTriageType {\n return typeof value === 'string' && FACTORY_TRIAGE_TYPES.some(type => type === value);\n}\n\nexport function isFactoryRuleStage(value: unknown): value is FactoryRuleStage {\n return typeof value === 'string' && FACTORY_RULE_STAGES.some(stage => stage === value);\n}\n\nexport function factoryRuleStage(stages: readonly string[]): FactoryRuleStage | undefined {\n const stage = stages.length === 1 ? stages[0] : undefined;\n return typeof stage === 'string' && stage.length > 0 ? stage : undefined;\n}\n\nexport function isTerminalFactoryRuleStage(stages: readonly string[]): boolean {\n const stage = factoryRuleStage(stages);\n return stage === 'done' || stage === 'canceled';\n}\n\n/** Working lanes hold cards with a seat engaged; Intake, Done and Canceled rest them. */\nexport function isWorkingFactoryRuleStage(stage: FactoryRuleStage): boolean {\n return stage !== 'intake' && !isTerminalFactoryRuleStage([stage]);\n}\n\n// Consulted only for the Intake exit: roles don't own lanes, so a card already\n// in a working or terminal lane stays put when a run starts.\nexport function factoryLaneForRole(role: string): FactoryRuleStage | undefined {\n return isFactoryRole(role) ? FACTORY_ROLE_STAGES[role] : undefined;\n}\n\nexport const FACTORY_RULE_BOARDS = ['work', 'review'] as const;\nexport type FactoryRuleBoard = (typeof FACTORY_RULE_BOARDS)[number] | (string & {});\n\nexport const FACTORY_RULE_SOURCES = [\n 'issue',\n 'pullRequest',\n 'gitlabIssue',\n 'gitlabPullRequest',\n 'linearIssue',\n 'jiraIssue',\n 'incidentioFollowUp',\n 'manual',\n] as const;\nexport type FactoryRuleSource = (typeof FACTORY_RULE_SOURCES)[number];\n\nexport const FACTORY_GITHUB_EVENTS = [\n 'issueOpened',\n 'issueEdited',\n 'issueClosed',\n 'issueReopened',\n 'issueCommentCreated',\n 'issueCommentEdited',\n 'issueCommentDeleted',\n 'pullRequestOpened',\n 'pullRequestUpdated',\n 'pullRequestCommentCreated',\n 'pullRequestReviewRequested',\n 'pullRequestReviewSubmitted',\n 'pullRequestMerged',\n 'pullRequestClosed',\n] as const;\nexport type FactoryGithubEventName = (typeof FACTORY_GITHUB_EVENTS)[number];\n\nexport const FACTORY_GITLAB_EVENTS = [\n 'issueOpened',\n 'issueUpdated',\n 'issueClosed',\n 'issueReopened',\n 'issueCommented',\n 'mergeRequestOpened',\n 'mergeRequestUpdated',\n 'mergeRequestCommented',\n 'mergeRequestMerged',\n 'mergeRequestClosed',\n] as const;\nexport type FactoryGitLabEventName = (typeof FACTORY_GITLAB_EVENTS)[number];\n\nexport const FACTORY_LINEAR_EVENTS = ['issueObserved', 'issueClosed'] as const;\nexport type FactoryLinearEventName = (typeof FACTORY_LINEAR_EVENTS)[number];\n\nexport const FACTORY_JIRA_EVENTS = ['issueObserved', 'issueClosed'] as const;\nexport type FactoryJiraEventName = (typeof FACTORY_JIRA_EVENTS)[number];\n\nexport const FACTORY_INCIDENTIO_EVENTS = ['followUpObserved', 'followUpClosed'] as const;\nexport type FactoryIncidentioEventName = (typeof FACTORY_INCIDENTIO_EVENTS)[number];\n\nexport type FactoryRuleJsonValue =\n | null\n | boolean\n | number\n | string\n | FactoryRuleJsonValue[]\n | { [key: string]: FactoryRuleJsonValue };\n\nexport interface FactoryRuleItemContext {\n workItem: WorkItemRow;\n id: string;\n source: WorkItemSource;\n sourceKey: string | null;\n parentWorkItemId: string | null;\n title: string;\n url: string | null;\n stages: readonly string[];\n /**\n * @deprecated Factory no longer records triage acceptance; this is the value stamped on older\n * cards, and `null` for every card since. A person moving the card on is the approval.\n */\n acceptedAt: Date | null;\n /** Factory-owned process state and trust stamps. */\n metadata: Record<string, unknown> | null;\n}\n\nexport type FactoryRuleActor =\n | { type: 'human'; id: string }\n | { type: 'agent'; bindingId: string; role: string }\n | { type: 'github'; login: string; trusted: boolean; factoryAuthored: boolean }\n | { type: 'gitlab'; username: string; trusted: boolean; factoryAuthored: boolean }\n | { type: 'system'; id: string };\n\nexport interface FactoryRuleIngressIdentity {\n type: 'human' | 'agent' | 'toolResult' | 'github' | 'gitlab' | 'linear' | 'jira' | 'incidentio' | 'rule';\n id: string;\n}\n\nexport interface FactoryRuleCausalEntry {\n ingressId: string;\n decisionType: FactoryCommitDecision['type'];\n}\n\n/** The phase a card sits in, as its board declares it. */\nexport interface FactoryRulePhaseContext {\n id: string;\n kind: 'resting' | 'working' | 'terminal';\n /** Session context a working phase runs in; absent for resting and terminal phases. */\n context?: string;\n /** @deprecated Use `context`. */\n role?: string;\n /** Phases the card may move to from here. */\n nextPhases: readonly string[];\n /** Outcome names the phase declares, e.g. `approved` or `canceled`; empty when it declares none. */\n outcomes: readonly string[];\n}\n\nexport interface FactoryRuleContextBase {\n tenant: { orgId: string; projectId: string };\n actor: FactoryRuleActor;\n ingress: FactoryRuleIngressIdentity;\n cause: string;\n causalChain: readonly FactoryRuleCausalEntry[];\n configVersion: string;\n}\n\nexport interface FactoryBoundRuleContext extends FactoryRuleContextBase {\n item: FactoryRuleItemContext;\n board: FactoryRuleBoard;\n itemRevision: number;\n}\n\nexport interface FactoryStageRuleContext extends FactoryBoundRuleContext {\n source: FactoryRuleSource;\n stage: FactoryRuleStage;\n fromStage: FactoryRuleStage;\n toStage: FactoryRuleStage;\n /** Project switch: Work items get an independent self-review before the change request opens. Unset means off. */\n selfReviewEnabled?: boolean;\n}\n\nexport interface FactoryToolResultRuleContext extends FactoryBoundRuleContext {\n toolName: string;\n threadId: string;\n assistantMessageId: string;\n toolCallId: string;\n result: {\n status: 'success' | 'error';\n value: FactoryRuleJsonValue;\n };\n}\n\nexport interface FactoryGithubRuleContext extends FactoryRuleContextBase {\n /** The status change this delivery reports, named the same for every provider; absent for other events. */\n boardEvent?: BoardEventFacts;\n item?: FactoryRuleItemContext;\n board?: FactoryRuleBoard;\n itemRevision?: number;\n /** Where the card's board sends it when its tracked source closes. */\n boardClosure?: FactoryRuleBoardClosure;\n /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */\n phase?: FactoryRulePhaseContext;\n /**\n * Board an issue's labels route it to, when the project has a matching label route and that board\n * is installed. Absent for pull requests and for issues whose labels select nothing.\n */\n intake?: FactoryRuleIntakeTarget;\n /**\n * Set on the one evaluation per pull request delivery that files the pull\n * request's own Review card. Opening a pull request concerns two cards — that\n * Review card and the Work item that authored the pull request — so the rule\n * answers for the two separately: the arrival carries this flag and is\n * committed against the authoring item when resolution found one, which is\n * what links the new card to it, while the authoring item's own evaluation\n * leaves the flag unset.\n */\n pullRequestIntake?: boolean;\n event: FactoryGithubEventName;\n deliveryId: string;\n factory: { createdAt: string };\n /** `installationId` is the GitHub App installation the delivery arrived through. */\n repository: { id: number; fullName: string; installationId?: number };\n issue?: {\n number: number;\n title: string;\n url: string;\n createdAt?: string;\n updatedAt?: string;\n assignees?: string[];\n labels?: string[];\n state?: 'open' | 'closed';\n author?: string;\n /** GitHub close reason: `completed`, `not_planned`, or `duplicate`. */\n stateReason?: string;\n };\n issueChange?: { title: boolean; body: boolean };\n issueComment?: {\n id: number;\n body?: string;\n url?: string;\n author?: string;\n authorType?: string;\n createdAt?: string;\n updatedAt?: string;\n };\n pullRequest?: {\n number: number;\n title: string;\n url: string;\n createdAt?: string;\n state: 'open' | 'closed';\n draft: boolean;\n merged: boolean;\n assignees?: string[];\n requestedReviewers?: string[];\n labels?: string[];\n author?: string;\n factoryAuthored: boolean;\n headBranch: string;\n baseBranch: string;\n };\n /** Present on `pullRequestReviewRequested`: who review was (re-)requested from. */\n reviewRequest?: { reviewer: string; factoryReviewer: boolean };\n /** Present when a PR comment uses Factory's exact review command. */\n reviewCommand?: { command: 'review' | 're-review'; target: string };\n /**\n * Present on `pullRequestReviewSubmitted`: the review that was just posted, or a\n * request-changes review whose body was edited to a new Factory verdict.\n */\n review?: { id: number; state: string; url: string; author?: string; body?: string };\n}\n\n/**\n * Where an intake source binding says new items from this source should land.\n * Absent when the source is unbound or bound without a board (built-in routing).\n */\nexport interface FactoryRuleIntakeTarget {\n board: string;\n initialPhase: string;\n}\n\n/**\n * Where a source-closed rule moves the card, from the `sourceClosed` mapping its installed board\n * declares. Absent when the card's board is not installed or declares no mapping.\n */\nexport interface FactoryRuleBoardClosure {\n /** Title of the card's board, for messages. */\n boardTitle: string;\n /** Terminal phase for a source that was completed. */\n completed: FactoryRuleBoardClosurePhase;\n /** Terminal phase for a source that was canceled or not planned. */\n canceled: FactoryRuleBoardClosurePhase;\n /** Whether the card already sits in a terminal phase of its board. */\n itemTerminal: boolean;\n}\n\nexport interface FactoryRuleBoardClosurePhase {\n phase: string;\n title: string;\n}\n\nexport interface FactoryGitLabRuleContext extends FactoryRuleContextBase {\n /** The status change this delivery reports, named the same for every provider; absent for other events. */\n boardEvent?: BoardEventFacts;\n item?: FactoryRuleItemContext;\n board?: FactoryRuleBoard;\n itemRevision?: number;\n /** Where the card's board sends it when its tracked source closes. */\n boardClosure?: FactoryRuleBoardClosure;\n /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */\n phase?: FactoryRulePhaseContext;\n intake?: FactoryRuleIntakeTarget;\n event: FactoryGitLabEventName;\n deliveryId: string;\n factory: { createdAt: string };\n repository: { id: number; fullName: string; host: string };\n issue?: {\n number: number;\n sourceKey: string;\n title: string;\n url: string;\n createdAt?: string;\n updatedAt?: string;\n assignees?: string[];\n labels?: string[];\n labelColors?: Record<string, string>;\n state?: 'open' | 'closed';\n author?: string;\n authorTrusted: boolean;\n };\n note?: {\n id: number;\n body?: string;\n url?: string;\n author?: string;\n createdAt?: string;\n updatedAt?: string;\n };\n mergeRequest?: {\n number: number;\n sourceKey: string;\n title: string;\n url: string;\n createdAt?: string;\n state: 'open' | 'closed';\n draft: boolean;\n merged: boolean;\n assignees?: string[];\n reviewers?: string[];\n labels?: string[];\n labelColors?: Record<string, string>;\n author?: string;\n authorTrusted: boolean;\n factoryAuthored: boolean;\n headBranch: string;\n baseBranch: string;\n };\n}\n\nexport interface FactoryLinearRuleContext extends FactoryRuleContextBase {\n /** The status change this delivery reports, named the same for every provider; absent for other events. */\n boardEvent?: BoardEventFacts;\n item?: FactoryRuleItemContext;\n board?: FactoryRuleBoard;\n itemRevision?: number;\n /** Where the card's board sends it when its tracked source closes. */\n boardClosure?: FactoryRuleBoardClosure;\n /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */\n phase?: FactoryRulePhaseContext;\n /** Bound board for the source this issue came from, when one is configured and installed. */\n intake?: FactoryRuleIntakeTarget;\n event: FactoryLinearEventName;\n issue: {\n id: string;\n identifier: string;\n title: string;\n url: string;\n state: string;\n stateType: string;\n priorityLabel: string;\n assignee: string | null;\n creator: string | null;\n team: string | null;\n labels: readonly string[];\n createdAt: string;\n updatedAt: string;\n sourceId?: string | null;\n projectId?: string | null;\n };\n}\n\nexport interface FactoryJiraRuleContext extends FactoryRuleContextBase {\n /** The status change this delivery reports, named the same for every provider; absent for other events. */\n boardEvent?: BoardEventFacts;\n item?: FactoryRuleItemContext;\n board?: FactoryRuleBoard;\n itemRevision?: number;\n /** Where the card's board sends it when its tracked source closes. */\n boardClosure?: FactoryRuleBoardClosure;\n /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */\n phase?: FactoryRulePhaseContext;\n /** Bound board for the source this issue came from, when one is configured and installed. */\n intake?: FactoryRuleIntakeTarget;\n event: FactoryJiraEventName;\n issue: {\n /** Stable issue reference — the direct integration's Jira id or the Platform-encoded issue reference. */\n id: string;\n identifier: string;\n title: string;\n url: string;\n state: string;\n stateType: string;\n priorityLabel: string;\n assignee: string | null;\n author: string | null;\n project: string | null;\n site: string | null;\n labels: readonly string[];\n createdAt: string;\n updatedAt: string;\n };\n}\n\nexport interface FactoryIncidentioRuleContext extends FactoryRuleContextBase {\n /** The status change this delivery reports, named the same for every provider; absent for other events. */\n boardEvent?: BoardEventFacts;\n item?: FactoryRuleItemContext;\n board?: FactoryRuleBoard;\n itemRevision?: number;\n /** Where the card's board sends it when its tracked source closes. */\n boardClosure?: FactoryRuleBoardClosure;\n /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */\n phase?: FactoryRulePhaseContext;\n /** Bound board for the source this follow-up came from, when one is configured and installed. */\n intake?: FactoryRuleIntakeTarget;\n event: FactoryIncidentioEventName;\n issue: {\n /** Stable item reference — the prefixed incident.io follow-up id the intake feed serves as `id`. */\n id: string;\n identifier: string;\n title: string;\n url: string;\n state: string;\n stateType: string;\n priorityLabel: string;\n assignee: string | null;\n author: string | null;\n /** Reference of the incident this follow-up belongs to, when available. */\n incident: string | null;\n labels: readonly string[];\n createdAt: string;\n updatedAt: string;\n };\n}\n\nexport type FactoryRuleHandler<TContext> = (\n context: Readonly<TContext>,\n) => FactoryRuleDecision | void | Promise<FactoryRuleDecision | void>;\n\nexport interface FactoryBoardRuleLeaf {\n onEnter?: FactoryRuleHandler<FactoryStageRuleContext>;\n onExit?: FactoryRuleHandler<FactoryStageRuleContext>;\n}\n\nexport type FactoryRuleRejectionCode =\n | 'forbidden'\n | 'invalid_transition'\n | 'missing_binding'\n | 'stale'\n | 'timeout'\n | 'rule_error'\n | 'causal_depth_exceeded'\n | 'repeated_transition'\n | 'approval_required';\n\nexport interface FactoryRuleRejectDecision {\n type: 'reject';\n code: FactoryRuleRejectionCode;\n reason: string;\n}\n\ninterface FactoryCommitDecisionBase {\n idempotencyKey: string;\n}\n\nexport interface FactoryTransitionDecision extends FactoryCommitDecisionBase {\n type: 'transition';\n board: FactoryRuleBoard;\n stage: FactoryRuleStage;\n /**\n * Delivered to the item's active session (waking it if idle) after the\n * transition commits. Skipped when the item has no active run binding, so\n * informational messages never fail the transition.\n */\n message?: { text: string; role?: string };\n /**\n * Runs the stage's entry rules even when the item is already in that stage.\n * A transition to the current stage is normally inert, because most callers\n * are correcting a board into a state it already holds. Re-entry is for the\n * opposite case: the stage's work is in flight and has been invalidated, so\n * it has to start over.\n */\n reenter?: boolean;\n /**\n * The status event this move answers. The project's intake routes on the card's board then\n * decide where the card goes instead, and this move applies only when no route on the board\n * handles the event; a route that does, even a disabled one, owns it. Factory drops the tag\n * from a decision returned by an explicit override on the integration's `rules`, so that\n * override's move always applies; a board handler's tagged move still goes to the routes.\n */\n event?: BoardEventFacts;\n}\n\n/**\n * Hands a status event on an existing card to the project's intake routes: the first enabled\n * route on the card's board whose `on` names the event and whose `when` matches moves the card.\n * Integrations add it when no rule decided anything for the delivery; nothing moves when no\n * route matches.\n */\nexport interface FactoryRouteEventDecision extends FactoryCommitDecisionBase {\n type: 'routeEvent';\n event: BoardEventFacts;\n}\n\n/**\n * Tells the card's live session that its source saw activity, such as a new\n * comment or an edit. It carries pointers only: the dispatcher writes the\n * message from these fields, so no provider text (a comment body, a title)\n * ever reaches the session through it. Without a live session it is dropped.\n */\nexport interface FactorySignalActivityDecision extends FactoryCommitDecisionBase {\n type: 'signalActivity';\n event: ActivityEvent;\n /** The source's own reference, such as `acme/app#12`. */\n reference: string;\n url: string;\n author?: string;\n authorTrusted: boolean;\n /**\n * What an idle session does with it. Defaults to `wake`; `persist` leaves it\n * in the session's notifications without starting a run, for sources whose\n * own comments Factory cannot tell apart from other people's. Activity from an\n * untrusted author always persists.\n */\n idleBehavior?: 'wake' | 'persist';\n}\n\nexport interface FactoryUpsertLinkedWorkItemDecision extends FactoryCommitDecisionBase {\n type: 'upsertLinkedWorkItem';\n board: FactoryRuleBoard;\n source: WorkItemSource;\n sourceKey: string;\n title: string;\n url: string | null;\n stage: FactoryRuleStage;\n /**\n * File the card at `stage` as its first entry and run none of the board's\n * phase rules for it — no arrival, no destination entry. The card is filed\n * (or, if it already exists, moved) and left parked for a person; nothing is\n * started for it. For external records that arrive already past the board's\n * first step: a GitHub issue whose triage is already recorded, for instance.\n *\n * Placement is the whole decision. An existing card it reaches is moved to\n * that stage through the same relocation the label routes use, and its\n * metadata is left alone.\n */\n skipRules?: boolean;\n metadata?: Record<string, FactoryRuleJsonValue>;\n}\n\ninterface FactoryInvokeSkillDecisionBase extends FactoryCommitDecisionBase {\n type: 'invokeSkill';\n role: string;\n arguments?: string;\n precedingMessage?: string;\n cancelInFlight?: boolean;\n /**\n * Start this run even when the card was moved by the agent already running in\n * this role's session. The prompt is queued onto that agent's run, so a phase\n * that shares its context with the one before it still gets its own work.\n * Without it, an agent's own move into a phase of its role starts nothing.\n */\n startsAfterOwnMove?: boolean;\n}\n\n/**\n * Starting an agent run. Most runs activate a skill, because the skill carries\n * the handoff contract later rules match on. A run whose completion is already\n * signalled some other way — Building finishes by opening a pull request, which\n * arrives as its own event — needs no contract, so it can carry a plain prompt\n * instead of an otherwise empty skill.\n */\nexport type FactoryInvokeSkillDecision = FactoryInvokeSkillDecisionBase &\n (\n | {\n skillName: string;\n prompt?: never;\n /**\n * Same-stage re-entry: the skill is already active in the card's live session,\n * so deliver a compact continuation that references it by name and carries only\n * the fresh arguments, instead of re-pasting the whole skill document. Only valid\n * for named-skill decisions — a plain prompt run has no active skill to resume.\n */\n resume?: boolean;\n }\n | { prompt: string; skillName?: never; resume?: never }\n );\n\nexport interface FactorySendMessageDecision extends FactoryCommitDecisionBase {\n type: 'sendMessage';\n /** Omitted: the card's live session, whichever seat holds it. Required with `prepareBinding`. */\n role?: string;\n message: string;\n priority?: 'medium' | 'high' | 'urgent';\n idleBehavior?: 'persist' | 'wake';\n prepareBinding?: boolean;\n}\n\nexport interface FactoryNotifyDecision extends FactoryCommitDecisionBase {\n type: 'notify';\n title: string;\n body?: string;\n level?: 'info' | 'warning' | 'error';\n}\n\n/**\n * Dismisses Factory change requests an approval has superseded on a GitHub\n * pull request. Only reviews carrying Factory's `Verdict: request changes`\n * marker from an identity other than the approving one are dismissed.\n */\nexport interface FactoryDismissStaleReviewsDecision extends FactoryCommitDecisionBase {\n type: 'dismissStaleReviews';\n installationId: number;\n repository: string;\n pullRequestNumber: number;\n approvingReviewId: string;\n approvingAuthor: string;\n}\n\nexport type FactoryCommitDecision =\n | FactoryTransitionDecision\n | FactoryRouteEventDecision\n | FactorySignalActivityDecision\n | FactoryDismissStaleReviewsDecision\n | FactoryUpsertLinkedWorkItemDecision\n | FactoryInvokeSkillDecision\n | FactorySendMessageDecision\n | FactoryNotifyDecision;\n\nexport type FactoryRuleDecision = FactoryRuleRejectDecision | FactoryCommitDecision;\n\nexport interface FactoryTransitionResultAccepted {\n status: 'accepted';\n transitionId: string;\n itemId: string;\n revision: number;\n stage: FactoryRuleStage;\n decisions: FactoryCommitDecision[];\n}\n\nexport interface FactoryTransitionResultRejected {\n status: 'rejected';\n transitionId: string;\n itemId: string;\n code: FactoryRuleRejectionCode;\n reason: string;\n}\n\nexport type FactoryTransitionResult = FactoryTransitionResultAccepted | FactoryTransitionResultRejected;\n\nexport function factoryRuleSourceForWorkItem(source: WorkItemSource): FactoryRuleSource {\n switch (source) {\n case 'github-issue':\n return 'issue';\n case 'github-pr':\n return 'pullRequest';\n case 'gitlab-issue':\n return 'gitlabIssue';\n case 'gitlab-pr':\n return 'gitlabPullRequest';\n case 'linear-issue':\n return 'linearIssue';\n case 'jira-issue':\n return 'jiraIssue';\n case 'incidentio-follow-up':\n return 'incidentioFollowUp';\n case 'manual':\n return 'manual';\n }\n}\n"],"mappings":";AAcA,SAAgB,0BACd,QACA,WACA,KACwB;CACxB,MAAM,CAAC,eAAe,QACpB,WAAW,cACP,CAAC,UAAU,cAAc,IACzB,WAAW,iBACT,CAAC,UAAU,OAAO,IAClB,WAAW,cACT,CAAC,UAAU,cAAc,IACzB,WAAW,iBACT,CAAC,UAAU,OAAO,IAClB,WAAW,iBACT,CAAC,UAAU,OAAO,IAClB,WAAW,eACT,CAAC,QAAQ,OAAO,IAChB,WAAW,yBACT,CAAC,cAAc,OAAO,IACtB,CAAC,WAAW,QAAQ;CACtC,OAAO;EAAE;EAAe;EAAM,YAAY;EAAW,GAAI,MAAM,EAAE,IAAI,IAAI,CAAC;CAAG;AAC/E;;AAGA,MAAa,uBAAuB;AACpC,MAAa,qBAAqB;AAIlC,SAAgB,cAAc,MAAsF;CAClH,MAAM,SAAS,KAAK,SAAS;CAC7B,IAAI,CAAC,MAAM,QAAQ,MAAM,GAAG,OAAO;CACnC,OACE,OAAO,MAAK,UAAS,OAAO,UAAU,YAAY,MAAM,YAAY,MAAA,wBAA0B,MAC7F,KAAK,UAAU,CAAC,QAAQ,EAAA,CAAG,OAAM,UAAS,UAAU,YAAY,UAAU,QAAQ;AAEvF;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KAAK,KAAA;CAChD,OAAO,OAAO,UAAU,YAAY,MAAM,SAAS,IAAI,QAAQ,KAAA;AACjE;AAEA,SAAgB,2BAA2B,QAAoC;CAC7E,MAAM,QAAQ,iBAAiB,MAAM;CACrC,OAAO,UAAU,UAAU,UAAU;AACvC;;AAGA,SAAgB,0BAA0B,OAAkC;CAC1E,OAAO,UAAU,YAAY,CAAC,2BAA2B,CAAC,KAAK,CAAC;AAClE;AAIA,SAAgB,mBAAmB,MAA4C;CAC7E,OAAO,cAAc,IAAI,IAAI,oBAAoB,QAAQ,KAAA;AAC3D;AAEA,MAAa,sBAAsB,CAAC,QAAQ,QAAQ;AAGpD,MAAa,uBAAuB;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,wBAAwB,CAAC,iBAAiB,aAAa;AAGpE,MAAa,sBAAsB,CAAC,iBAAiB,aAAa;AAGlE,MAAa,4BAA4B,CAAC,oBAAoB,gBAAgB;AA6jB9E,SAAgB,6BAA6B,QAA2C;CACtF,QAAQ,QAAR;EACE,KAAK,gBACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,KAAK,gBACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,KAAK,gBACH,OAAO;EACT,KAAK,cACH,OAAO;EACT,KAAK,wBACH,OAAO;EACT,KAAK,UACH,OAAO;CACX;AACF"}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../src/rules/types.ts"],"sourcesContent":["import type { ActivityEvent, BoardEventFacts } from '../boards/board-events.js';\nimport type { ExternalWorkItemSource } from '../storage/domains/work-items/base.js';\nimport type { WorkItemRow } from '../storage/domains/work-items/work-item-schema.js';\n\nexport type WorkItemSource =\n | 'github-issue'\n | 'github-pr'\n | 'gitlab-issue'\n | 'gitlab-pr'\n | 'linear-issue'\n | 'jira-issue'\n | 'incidentio-follow-up'\n | 'manual';\n\nexport function externalSourceForWorkItem(\n source: WorkItemSource,\n sourceKey: string,\n url?: string,\n): ExternalWorkItemSource {\n const [integrationId, type] =\n source === 'github-pr'\n ? ['github', 'pull-request']\n : source === 'github-issue'\n ? ['github', 'issue']\n : source === 'gitlab-pr'\n ? ['gitlab', 'pull-request']\n : source === 'gitlab-issue'\n ? ['gitlab', 'issue']\n : source === 'linear-issue'\n ? ['linear', 'issue']\n : source === 'jira-issue'\n ? ['jira', 'issue']\n : source === 'incidentio-follow-up'\n ? ['incidentio', 'issue']\n : ['factory', 'manual'];\n return { integrationId, type, externalId: sourceKey, ...(url ? { url } : {}) };\n}\n\n/** The source label that holds an issue at rest until a maintainer decides; compared lowercased. */\nexport const NEEDS_APPROVAL_LABEL = 'status: needs approval';\n\n/** Request-changes rounds from self-review before the card parks in Intake for a person. */\nexport const SELF_REVIEW_ROUND_LIMIT = 3;\nexport const AUTO_TRIAGED_LABEL = 'status: auto-triaged';\n\n// The label only holds a card nobody accepted yet (`awaitsAcceptance`, see the boards'\n// `awaitsAcceptance`): once a person moves it into a working lane, the label is stale until the\n// source catches up (Factory removes it on that move).\nexport function needsApproval(\n item: { workItem: Pick<WorkItemRow, 'labels'>; stages?: readonly string[] },\n awaitsAcceptance: (stage: string) => boolean,\n): boolean {\n const labels = item.workItem.labels;\n if (!Array.isArray(labels)) return false;\n return (\n labels.some(label => typeof label === 'string' && label.toLowerCase() === NEEDS_APPROVAL_LABEL) &&\n (item.stages ?? []).every(awaitsAcceptance)\n );\n}\n\nexport function workItemSource(source: ExternalWorkItemSource | null): WorkItemSource {\n if (!source) return 'manual';\n if (source.integrationId === 'linear') return 'linear-issue';\n if (source.integrationId === 'gitlab') return source.type === 'pull-request' ? 'gitlab-pr' : 'gitlab-issue';\n if (source.integrationId === 'jira') return 'jira-issue';\n if (source.integrationId === 'incidentio') return 'incidentio-follow-up';\n // Only GitHub, GitLab, Linear, Jira, and incident.io have provider-specific\n // rules; anything else (a Slack thread, say) is a plain work item, not a\n // mislabeled GitHub issue.\n if (source.integrationId !== 'github') return 'manual';\n return source.type === 'pull-request' ? 'github-pr' : 'github-issue';\n}\n\n/** The card's author is inside the write-access circle, or the card is Factory's own PR. */\nexport function authorTrusted(metadata: Record<string, unknown> | null | undefined): boolean {\n return metadata?.authorTrusted === true || metadata?.factoryAuthored === true;\n}\n\n// Authored outside the write-access circle: a missing trust stamp fails closed until\n// the reconcile sweep backfills it, and Factory's own PRs pass through `factoryAuthored`.\nexport function externallyAuthored(item: { source: string; metadata: Record<string, unknown> | null }): boolean {\n if (!['github-pr', 'github-issue', 'gitlab-pr', 'gitlab-issue'].includes(item.source)) return false;\n return !authorTrusted(item.metadata);\n}\n\nexport function externallyAuthoredWorkItem(item: {\n externalSource: ExternalWorkItemSource | null;\n metadata: Record<string, unknown> | null;\n}): boolean {\n return externallyAuthored({ source: workItemSource(item.externalSource), metadata: item.metadata });\n}\n\n/** A phase key on the card's board. Boards name their own phases; Factory reads none of them by name. */\nexport type FactoryRuleStage = string;\n\nexport const FACTORY_TRIAGE_TYPES = [\n 'bug',\n 'feature request',\n 'docs',\n 'question/support',\n 'maintenance',\n 'duplicate',\n 'resolved',\n 'invalid',\n 'spam',\n 'out-of-scope',\n 'other',\n] as const;\nexport type FactoryTriageType = (typeof FACTORY_TRIAGE_TYPES)[number];\n\nexport function isFactoryTriageType(value: unknown): value is FactoryTriageType {\n return typeof value === 'string' && FACTORY_TRIAGE_TYPES.some(type => type === value);\n}\n\n/** A board id. */\nexport type FactoryRuleBoard = string;\n\nexport const FACTORY_RULE_SOURCES = [\n 'issue',\n 'pullRequest',\n 'gitlabIssue',\n 'gitlabPullRequest',\n 'linearIssue',\n 'jiraIssue',\n 'incidentioFollowUp',\n 'manual',\n] as const;\nexport type FactoryRuleSource = (typeof FACTORY_RULE_SOURCES)[number];\n\nexport const FACTORY_GITHUB_EVENTS = [\n 'issueOpened',\n 'issueEdited',\n 'issueClosed',\n 'issueReopened',\n 'issueCommentCreated',\n 'issueCommentEdited',\n 'issueCommentDeleted',\n 'pullRequestOpened',\n 'pullRequestUpdated',\n 'pullRequestCommentCreated',\n 'pullRequestReviewRequested',\n 'pullRequestReviewSubmitted',\n 'pullRequestMerged',\n 'pullRequestClosed',\n] as const;\nexport type FactoryGithubEventName = (typeof FACTORY_GITHUB_EVENTS)[number];\n\nexport const FACTORY_GITLAB_EVENTS = [\n 'issueOpened',\n 'issueUpdated',\n 'issueClosed',\n 'issueReopened',\n 'issueCommented',\n 'mergeRequestOpened',\n 'mergeRequestUpdated',\n 'mergeRequestCommented',\n 'mergeRequestMerged',\n 'mergeRequestClosed',\n] as const;\nexport type FactoryGitLabEventName = (typeof FACTORY_GITLAB_EVENTS)[number];\n\nexport const FACTORY_LINEAR_EVENTS = ['issueObserved', 'issueClosed'] as const;\nexport type FactoryLinearEventName = (typeof FACTORY_LINEAR_EVENTS)[number];\n\nexport const FACTORY_JIRA_EVENTS = ['issueObserved', 'issueClosed'] as const;\nexport type FactoryJiraEventName = (typeof FACTORY_JIRA_EVENTS)[number];\n\nexport const FACTORY_INCIDENTIO_EVENTS = ['followUpObserved', 'followUpClosed'] as const;\nexport type FactoryIncidentioEventName = (typeof FACTORY_INCIDENTIO_EVENTS)[number];\n\nexport type FactoryRuleJsonValue =\n | null\n | boolean\n | number\n | string\n | FactoryRuleJsonValue[]\n | { [key: string]: FactoryRuleJsonValue };\n\nexport interface FactoryRuleItemContext {\n workItem: WorkItemRow;\n id: string;\n source: WorkItemSource;\n sourceKey: string | null;\n parentWorkItemId: string | null;\n title: string;\n url: string | null;\n stages: readonly string[];\n /**\n * @deprecated Factory no longer records triage acceptance; this is the value stamped on older\n * cards, and `null` for every card since. A person moving the card on is the approval.\n */\n acceptedAt: Date | null;\n /** Factory-owned process state and trust stamps. */\n metadata: Record<string, unknown> | null;\n}\n\nexport type FactoryRuleActor =\n | { type: 'human'; id: string }\n | { type: 'agent'; bindingId: string; role: string }\n | { type: 'github'; login: string; trusted: boolean; factoryAuthored: boolean }\n | { type: 'gitlab'; username: string; trusted: boolean; factoryAuthored: boolean }\n | { type: 'system'; id: string };\n\nexport interface FactoryRuleIngressIdentity {\n type: 'human' | 'agent' | 'toolResult' | 'github' | 'gitlab' | 'linear' | 'jira' | 'incidentio' | 'rule';\n id: string;\n}\n\nexport interface FactoryRuleCausalEntry {\n ingressId: string;\n decisionType: FactoryCommitDecision['type'];\n}\n\n/** The phase a card sits in, as its board declares it. */\nexport interface FactoryRulePhaseContext {\n id: string;\n kind: 'resting' | 'working' | 'terminal';\n /** Session context a working phase runs in; absent for resting and terminal phases. */\n context?: string;\n /** @deprecated Use `context`. */\n role?: string;\n /** Phases the card may move to from here. */\n nextPhases: readonly string[];\n}\n\nexport interface FactoryRuleContextBase {\n tenant: { orgId: string; projectId: string };\n actor: FactoryRuleActor;\n ingress: FactoryRuleIngressIdentity;\n cause: string;\n causalChain: readonly FactoryRuleCausalEntry[];\n configVersion: string;\n}\n\nexport interface FactoryBoundRuleContext extends FactoryRuleContextBase {\n item: FactoryRuleItemContext;\n board: FactoryRuleBoard;\n itemRevision: number;\n}\n\nexport interface FactoryStageRuleContext extends FactoryBoundRuleContext {\n source: FactoryRuleSource;\n stage: FactoryRuleStage;\n fromStage: FactoryRuleStage;\n toStage: FactoryRuleStage;\n}\n\nexport interface FactoryToolResultRuleContext extends FactoryBoundRuleContext {\n toolName: string;\n threadId: string;\n assistantMessageId: string;\n toolCallId: string;\n result: {\n status: 'success' | 'error';\n value: FactoryRuleJsonValue;\n };\n}\n\nexport interface FactoryGithubRuleContext extends FactoryRuleContextBase {\n /** The status change this delivery reports, named the same for every provider; absent for other events. */\n boardEvent?: BoardEventFacts;\n item?: FactoryRuleItemContext;\n board?: FactoryRuleBoard;\n itemRevision?: number;\n /** Where the card's board sends it when its tracked source closes. */\n boardClosure?: FactoryRuleBoardClosure;\n /** The phases the card's board runs its pull request loop through; absent without a card. */\n flow?: FactoryRuleBoardFlow;\n /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */\n phase?: FactoryRulePhaseContext;\n /** Where a new card is filed before the project's intake routes place it. */\n intake?: FactoryRuleIntakeTarget;\n /**\n * Set on the one evaluation per pull request delivery that files the pull\n * request's own Review card. Opening a pull request concerns two cards — that\n * Review card and the Work item that authored the pull request — so the rule\n * answers for the two separately: the arrival carries this flag and is\n * committed against the authoring item when resolution found one, which is\n * what links the new card to it, while the authoring item's own evaluation\n * leaves the flag unset.\n */\n pullRequestIntake?: boolean;\n /**\n * Set on both evaluations of a pull request's first sighting when it belongs on an existing\n * card: the Work card that authored it (`authored`), or the card of the issue a trusted author's\n * pull request says it closes (`closes`). The pull request is filed on that card as one more\n * source rather than on a card of its own.\n */\n pullRequestHome?: FactoryPullRequestHome;\n event: FactoryGithubEventName;\n deliveryId: string;\n factory: { createdAt: string };\n /** `installationId` is the GitHub App installation the delivery arrived through. */\n repository: { id: number; fullName: string; installationId?: number };\n issue?: {\n number: number;\n title: string;\n url: string;\n createdAt?: string;\n updatedAt?: string;\n assignees?: string[];\n labels?: string[];\n state?: 'open' | 'closed';\n author?: string;\n /** GitHub close reason: `completed`, `not_planned`, or `duplicate`. */\n stateReason?: string;\n };\n issueChange?: { title: boolean; body: boolean };\n issueComment?: {\n id: number;\n body?: string;\n url?: string;\n author?: string;\n authorType?: string;\n createdAt?: string;\n updatedAt?: string;\n };\n pullRequest?: {\n number: number;\n title: string;\n url: string;\n createdAt?: string;\n state: 'open' | 'closed';\n draft: boolean;\n merged: boolean;\n assignees?: string[];\n requestedReviewers?: string[];\n labels?: string[];\n author?: string;\n factoryAuthored: boolean;\n headBranch: string;\n /** Lowercase head commit SHA, when the delivery carries one. */\n headSha?: string;\n baseBranch: string;\n };\n /** Present on `pullRequestReviewRequested`: who review was (re-)requested from. */\n reviewRequest?: { reviewer: string; factoryReviewer: boolean };\n /** Present when a PR comment uses Factory's exact review command. */\n reviewCommand?: { command: 'review' | 're-review'; target: string };\n /**\n * Present on `pullRequestReviewSubmitted`: the review that was just posted, or a\n * request-changes review whose body was edited to a new Factory verdict.\n */\n review?: { id: number; state: string; url: string; author?: string; body?: string };\n}\n\n/**\n * Where an integration files a new card: the default board's initial phase. The project's intake\n * routes then decide where the card goes; the board and phase a rule names don't. Absent when the\n * default board is not installed.\n */\nexport interface FactoryRuleIntakeTarget {\n board: string;\n initialPhase: string;\n}\n\n/**\n * Where a source-closed rule moves the card, from the `sourceClosed` mapping its installed board\n * declares. Absent when the card's board is not installed or declares no mapping.\n */\nexport interface FactoryRuleBoardClosure {\n /** Title of the card's board, for messages. */\n boardTitle: string;\n /** Terminal phase for a source that was completed. */\n completed: FactoryRuleBoardClosurePhase;\n /** Terminal phase for a source that was canceled or not planned. */\n canceled: FactoryRuleBoardClosurePhase;\n /** Whether the card already sits in a terminal phase of its board. */\n itemTerminal: boolean;\n}\n\nexport interface FactoryRuleBoardClosurePhase {\n phase: string;\n title: string;\n}\n\n/**\n * The phases a card's board runs its pull request loop through, read from what each phase declares\n * (see `boardFlow`). Every field is absent when the board has no such phase.\n */\nexport interface FactoryRuleBoardFlow {\n /** Where a card on the board rests before work starts and goes back to when its pull request is abandoned. */\n readonly initialPhase?: string;\n /** Phase that takes pull requests: reviews them, records verdicts on them, and re-reviews pushes. */\n readonly pullRequestReview?: string;\n /** Working phase that sorts new cards before anyone accepts them: on a board that builds, the first one that neither builds nor reviews. */\n readonly triage?: string;\n /** Working phase that reviews the builder's branch before a pull request opens. */\n readonly selfReview?: string;\n /** Working phase that builds the change and opens the pull request. */\n readonly build?: string;\n /** Seat that runs {@link build}; pull request feedback wakes it. */\n readonly buildRole?: string;\n /** Terminal phase a merge finishes the card in: the board's `sourceClosed.completed`, else its first terminal phase. */\n readonly completed?: Readonly<FactoryRuleBoardClosurePhase>;\n /** Terminal phase a pull request closed unmerged ends its own card in: `sourceClosed.canceled`, else the next terminal phase. */\n readonly canceled?: Readonly<FactoryRuleBoardClosurePhase>;\n}\n\nexport interface FactoryGitLabRuleContext extends FactoryRuleContextBase {\n /** The status change this delivery reports, named the same for every provider; absent for other events. */\n boardEvent?: BoardEventFacts;\n item?: FactoryRuleItemContext;\n board?: FactoryRuleBoard;\n itemRevision?: number;\n /** Where the card's board sends it when its tracked source closes. */\n boardClosure?: FactoryRuleBoardClosure;\n /** The phases the card's board runs its pull request loop through; absent without a card. */\n flow?: FactoryRuleBoardFlow;\n /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */\n phase?: FactoryRulePhaseContext;\n intake?: FactoryRuleIntakeTarget;\n /** Set on a merge request's first sighting when it is filed on an existing card instead of its own. */\n pullRequestHome?: FactoryPullRequestHome;\n event: FactoryGitLabEventName;\n deliveryId: string;\n factory: { createdAt: string };\n repository: { id: number; fullName: string; host: string };\n issue?: {\n number: number;\n sourceKey: string;\n title: string;\n url: string;\n createdAt?: string;\n updatedAt?: string;\n assignees?: string[];\n labels?: string[];\n labelColors?: Record<string, string>;\n state?: 'open' | 'closed';\n author?: string;\n authorTrusted: boolean;\n };\n note?: {\n id: number;\n body?: string;\n url?: string;\n author?: string;\n createdAt?: string;\n updatedAt?: string;\n };\n mergeRequest?: {\n number: number;\n sourceKey: string;\n title: string;\n url: string;\n createdAt?: string;\n state: 'open' | 'closed';\n draft: boolean;\n merged: boolean;\n assignees?: string[];\n reviewers?: string[];\n labels?: string[];\n labelColors?: Record<string, string>;\n author?: string;\n authorTrusted: boolean;\n factoryAuthored: boolean;\n headBranch: string;\n baseBranch: string;\n };\n}\n\nexport interface FactoryLinearRuleContext extends FactoryRuleContextBase {\n /** The status change this delivery reports, named the same for every provider; absent for other events. */\n boardEvent?: BoardEventFacts;\n item?: FactoryRuleItemContext;\n board?: FactoryRuleBoard;\n itemRevision?: number;\n /** Where the card's board sends it when its tracked source closes. */\n boardClosure?: FactoryRuleBoardClosure;\n /** The phases the card's board runs its pull request loop through; absent without a card. */\n flow?: FactoryRuleBoardFlow;\n /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */\n phase?: FactoryRulePhaseContext;\n /** Where a new card is filed before the project's intake routes place it. */\n intake?: FactoryRuleIntakeTarget;\n event: FactoryLinearEventName;\n issue: {\n id: string;\n identifier: string;\n title: string;\n url: string;\n state: string;\n stateType: string;\n priorityLabel: string;\n assignee: string | null;\n creator: string | null;\n team: string | null;\n labels: readonly string[];\n createdAt: string;\n updatedAt: string;\n sourceId?: string | null;\n projectId?: string | null;\n };\n}\n\nexport interface FactoryJiraRuleContext extends FactoryRuleContextBase {\n /** The status change this delivery reports, named the same for every provider; absent for other events. */\n boardEvent?: BoardEventFacts;\n item?: FactoryRuleItemContext;\n board?: FactoryRuleBoard;\n itemRevision?: number;\n /** Where the card's board sends it when its tracked source closes. */\n boardClosure?: FactoryRuleBoardClosure;\n /** The phases the card's board runs its pull request loop through; absent without a card. */\n flow?: FactoryRuleBoardFlow;\n /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */\n phase?: FactoryRulePhaseContext;\n /** Where a new card is filed before the project's intake routes place it. */\n intake?: FactoryRuleIntakeTarget;\n event: FactoryJiraEventName;\n issue: {\n /** Stable issue reference — the direct integration's Jira id or the Platform-encoded issue reference. */\n id: string;\n identifier: string;\n title: string;\n url: string;\n state: string;\n stateType: string;\n priorityLabel: string;\n assignee: string | null;\n author: string | null;\n project: string | null;\n site: string | null;\n labels: readonly string[];\n createdAt: string;\n updatedAt: string;\n };\n}\n\nexport interface FactoryIncidentioRuleContext extends FactoryRuleContextBase {\n /** The status change this delivery reports, named the same for every provider; absent for other events. */\n boardEvent?: BoardEventFacts;\n item?: FactoryRuleItemContext;\n board?: FactoryRuleBoard;\n itemRevision?: number;\n /** Where the card's board sends it when its tracked source closes. */\n boardClosure?: FactoryRuleBoardClosure;\n /** The phases the card's board runs its pull request loop through; absent without a card. */\n flow?: FactoryRuleBoardFlow;\n /** What the card's current phase means on its board; absent without a card or when the board does not declare the phase. */\n phase?: FactoryRulePhaseContext;\n /** Where a new card is filed before the project's intake routes place it. */\n intake?: FactoryRuleIntakeTarget;\n event: FactoryIncidentioEventName;\n issue: {\n /** Stable item reference — the prefixed incident.io follow-up id the intake feed serves as `id`. */\n id: string;\n identifier: string;\n title: string;\n url: string;\n state: string;\n stateType: string;\n priorityLabel: string;\n assignee: string | null;\n author: string | null;\n /** Reference of the incident this follow-up belongs to, when available. */\n incident: string | null;\n labels: readonly string[];\n createdAt: string;\n updatedAt: string;\n };\n}\n\nexport type FactoryRuleHandler<TContext> = (\n context: Readonly<TContext>,\n) => FactoryRuleDecision | void | Promise<FactoryRuleDecision | void>;\n\nexport type FactoryRuleRejectionCode =\n | 'forbidden'\n | 'invalid_transition'\n | 'missing_binding'\n | 'stale'\n | 'timeout'\n | 'rule_error'\n | 'causal_depth_exceeded'\n | 'repeated_transition'\n | 'approval_required';\n\nexport interface FactoryRuleRejectDecision {\n type: 'reject';\n code: FactoryRuleRejectionCode;\n reason: string;\n}\n\ninterface FactoryCommitDecisionBase {\n idempotencyKey: string;\n}\n\nexport interface FactoryTransitionDecision extends FactoryCommitDecisionBase {\n type: 'transition';\n board: FactoryRuleBoard;\n stage: FactoryRuleStage;\n /**\n * Delivered to the item's active session (waking it if idle) after the\n * transition commits. Skipped when the item has no active run binding, so\n * informational messages never fail the transition.\n */\n message?: { text: string; role?: string };\n /**\n * Runs the stage's entry rules even when the item is already in that stage.\n * A transition to the current stage is normally inert, because most callers\n * are correcting a board into a state it already holds. Re-entry is for the\n * opposite case: the stage's work is in flight and has been invalidated, so\n * it has to start over.\n */\n reenter?: boolean;\n /**\n * The status event this move answers. The project's intake routes on the card's board then\n * decide where the card goes instead, and this move applies only when no route on the board\n * handles the event; a route that does, even a disabled one, owns it. Factory drops the tag\n * from a decision returned by an explicit override on the integration's `rules`, so that\n * override's move always applies; a board handler's tagged move still goes to the routes.\n */\n event?: BoardEventFacts;\n}\n\n/**\n * Hands a status event on an existing card to the project's intake routes: the first enabled\n * route on the card's board whose `on` names the event and whose `when` matches moves the card.\n * Integrations add it when no rule decided anything for the delivery; nothing moves when no\n * route matches.\n */\nexport interface FactoryRouteEventDecision extends FactoryCommitDecisionBase {\n type: 'routeEvent';\n event: BoardEventFacts;\n}\n\n/**\n * Tells the card's live session that its source saw activity, such as a new\n * comment or an edit. It carries pointers only: the dispatcher writes the\n * message from these fields, so no provider text (a comment body, a title)\n * ever reaches the session through it. Without a live session it is dropped.\n */\nexport interface FactorySignalActivityDecision extends FactoryCommitDecisionBase {\n type: 'signalActivity';\n event: ActivityEvent;\n /** The source's own reference, such as `acme/app#12`. */\n reference: string;\n url: string;\n author?: string;\n authorTrusted: boolean;\n /**\n * What an idle session does with it. Defaults to `wake`; `persist` leaves it\n * in the session's notifications without starting a run, for sources whose\n * own comments Factory cannot tell apart from other people's. Activity from an\n * untrusted author always persists.\n */\n idleBehavior?: 'wake' | 'persist';\n}\n\n/** The existing card a pull or merge request is filed on; see `pullRequestHome`. */\nexport interface FactoryPullRequestHome {\n workItemId: string;\n reason: 'authored' | 'closes';\n}\n\nexport interface FactoryUpsertLinkedWorkItemDecision extends FactoryCommitDecisionBase {\n type: 'upsertLinkedWorkItem';\n board: FactoryRuleBoard;\n source: WorkItemSource;\n sourceKey: string;\n title: string;\n url: string | null;\n stage: FactoryRuleStage;\n /**\n * File the card at `stage` as its first entry and run none of the board's\n * phase rules for it — no arrival, no destination entry. The card is filed\n * (or, if it already exists, moved) and left parked for a person; nothing is\n * started for it. For external records that arrive already past the board's\n * first step: a GitHub issue whose triage is already recorded, for instance.\n *\n * Placement is the whole decision. An existing card it reaches is moved to\n * that stage through the same relocation the label routes use, and its\n * metadata is left alone.\n */\n skipRules?: boolean;\n /**\n * File the pull or merge request on this existing card, the one that authored it, as one more\n * source instead of on a card of its own. Applies only when no card holds the record yet and\n * the card is still open on Work; otherwise the record is filed as usual.\n */\n attachTo?: { workItemId: string };\n /**\n * The card of the issue this pull or merge request closes. When no card holds the record yet,\n * the project's intake routes can test that card and join the record to it (see\n * `IntakeRouteTarget.joinClosedIssue`); otherwise it is filed as usual.\n */\n closesIssue?: { workItemId: string };\n metadata?: Record<string, FactoryRuleJsonValue>;\n}\n\ninterface FactoryInvokeSkillDecisionBase extends FactoryCommitDecisionBase {\n type: 'invokeSkill';\n role: string;\n arguments?: string;\n precedingMessage?: string;\n cancelInFlight?: boolean;\n /**\n * Start this run even when the card was moved by the agent already running in\n * this role's session. The prompt is queued onto that agent's run, so a phase\n * that shares its context with the one before it still gets its own work.\n * Without it, an agent's own move into a phase of its role starts nothing.\n */\n startsAfterOwnMove?: boolean;\n /**\n * Pursue the run's work as a goal: the session's thread holds `objective` until the card\n * leaves the phase, and the agent's goal judge keeps the run going until it is met.\n */\n goal?: { objective: string; maxRuns?: number };\n}\n\n/**\n * Starting an agent run. Most runs activate a skill, because the skill carries\n * the handoff contract later rules match on. A run whose completion is already\n * signalled some other way — Building finishes by opening a pull request, which\n * arrives as its own event — needs no contract, so it can carry a plain prompt\n * instead of an otherwise empty skill.\n */\nexport type FactoryInvokeSkillDecision = FactoryInvokeSkillDecisionBase &\n (\n | {\n skillName: string;\n prompt?: never;\n /**\n * Same-stage re-entry: the skill is already active in the card's live session,\n * so deliver a compact continuation that references it by name and carries only\n * the fresh arguments, instead of re-pasting the whole skill document. Only valid\n * for named-skill decisions — a plain prompt run has no active skill to resume.\n */\n resume?: boolean;\n }\n | { prompt: string; skillName?: never; resume?: never }\n );\n\nexport interface FactorySendMessageDecision extends FactoryCommitDecisionBase {\n type: 'sendMessage';\n /** Omitted: the card's live session, whichever seat holds it. Required with `prepareBinding`. */\n role?: string;\n message: string;\n priority?: 'medium' | 'high' | 'urgent';\n idleBehavior?: 'persist' | 'wake';\n prepareBinding?: boolean;\n}\n\nexport interface FactoryNotifyDecision extends FactoryCommitDecisionBase {\n type: 'notify';\n title: string;\n body?: string;\n level?: 'info' | 'warning' | 'error';\n}\n\n/**\n * Dismisses Factory change requests an approval has superseded on a GitHub\n * pull request. Only reviews carrying Factory's `Verdict: request changes`\n * marker from an identity other than the approving one are dismissed.\n */\nexport interface FactoryDismissStaleReviewsDecision extends FactoryCommitDecisionBase {\n type: 'dismissStaleReviews';\n installationId: number;\n repository: string;\n pullRequestNumber: number;\n approvingReviewId: string;\n approvingAuthor: string;\n}\n\nexport type FactoryCommitDecision =\n | FactoryTransitionDecision\n | FactoryRouteEventDecision\n | FactorySignalActivityDecision\n | FactoryDismissStaleReviewsDecision\n | FactoryUpsertLinkedWorkItemDecision\n | FactoryInvokeSkillDecision\n | FactorySendMessageDecision\n | FactoryNotifyDecision;\n\nexport type FactoryRuleDecision = FactoryRuleRejectDecision | FactoryCommitDecision;\n\nexport interface FactoryTransitionResultAccepted {\n status: 'accepted';\n transitionId: string;\n itemId: string;\n revision: number;\n stage: FactoryRuleStage;\n decisions: FactoryCommitDecision[];\n}\n\nexport interface FactoryTransitionResultRejected {\n status: 'rejected';\n transitionId: string;\n itemId: string;\n code: FactoryRuleRejectionCode;\n reason: string;\n}\n\nexport type FactoryTransitionResult = FactoryTransitionResultAccepted | FactoryTransitionResultRejected;\n\nexport function factoryRuleSourceForWorkItem(source: WorkItemSource): FactoryRuleSource {\n switch (source) {\n case 'github-issue':\n return 'issue';\n case 'github-pr':\n return 'pullRequest';\n case 'gitlab-issue':\n return 'gitlabIssue';\n case 'gitlab-pr':\n return 'gitlabPullRequest';\n case 'linear-issue':\n return 'linearIssue';\n case 'jira-issue':\n return 'jiraIssue';\n case 'incidentio-follow-up':\n return 'incidentioFollowUp';\n case 'manual':\n return 'manual';\n }\n}\n"],"mappings":";AAcA,SAAgB,0BACd,QACA,WACA,KACwB;CACxB,MAAM,CAAC,eAAe,QACpB,WAAW,cACP,CAAC,UAAU,cAAc,IACzB,WAAW,iBACT,CAAC,UAAU,OAAO,IAClB,WAAW,cACT,CAAC,UAAU,cAAc,IACzB,WAAW,iBACT,CAAC,UAAU,OAAO,IAClB,WAAW,iBACT,CAAC,UAAU,OAAO,IAClB,WAAW,eACT,CAAC,QAAQ,OAAO,I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AAGA,SAAgB,oBAAoB,OAA4C;CAC9E,OAAO,OAAO,UAAU,YAAY,qBAAqB,MAAK,SAAQ,SAAS,KAAK;AACtF;AAKA,MAAa,uBAAuB;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAGA,MAAa,wBAAwB,CAAC,iBAAiB,aAAa;AAGpE,MAAa,sBAAsB,CAAC,iBAAiB,aAAa;AAGlE,MAAa,4BAA4B,CAAC,oBAAoB,gBAAgB;AAqnB9E,SAAgB,6BAA6B,QAA2C;CACtF,QAAQ,QAAR;EACE,KAAK,gBACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,KAAK,gBACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,KAAK,gBACH,OAAO;EACT,KAAK,cACH,OAAO;EACT,KAAK,wBACH,OAAO;EACT,KAAK,UACH,OAAO;CACX;AACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/rules/validation.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EAKrB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAQ/C,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAOzC,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAM/C,eAAO,MAAM,aAAa,QAA2B,CAAC;AACtD,eAAO,MAAM,mBAAmB,QAAgB,CAAC;AACjD,eAAO,MAAM,aAAa,QAA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