@nocobase/app-plugin-projects 0.1.0-beta.1 → 0.1.0-beta.11

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 (666) hide show
  1. package/CHANGELOG.md +276 -0
  2. package/README.md +78 -105
  3. package/dist/client/api/changed-issues.d.ts +12 -0
  4. package/dist/client/api/changed-issues.d.ts.map +1 -0
  5. package/dist/client/api/changed-issues.js +30 -0
  6. package/dist/client/api/changed-issues.js.map +1 -0
  7. package/dist/client/api/client.d.ts +8 -25
  8. package/dist/client/api/client.d.ts.map +1 -1
  9. package/dist/client/api/client.js +12 -51
  10. package/dist/client/api/client.js.map +1 -1
  11. package/dist/client/api/keys.d.ts +2 -8
  12. package/dist/client/api/keys.d.ts.map +1 -1
  13. package/dist/client/api/keys.js +2 -17
  14. package/dist/client/api/keys.js.map +1 -1
  15. package/dist/client/components/attachment-list.d.ts +77 -0
  16. package/dist/client/components/attachment-list.d.ts.map +1 -0
  17. package/dist/client/components/attachment-list.js +147 -0
  18. package/dist/client/components/attachment-list.js.map +1 -0
  19. package/dist/client/components/pm-badges.d.ts +1 -1
  20. package/dist/client/components/pm-badges.d.ts.map +1 -1
  21. package/dist/client/components/pm-description-image.d.ts +4 -0
  22. package/dist/client/components/pm-description-image.d.ts.map +1 -0
  23. package/dist/client/components/pm-description-image.js +61 -0
  24. package/dist/client/components/pm-description-image.js.map +1 -0
  25. package/dist/client/components/pm-executor-select.d.ts +2 -0
  26. package/dist/client/components/pm-executor-select.d.ts.map +1 -1
  27. package/dist/client/components/pm-executor-select.js.map +1 -1
  28. package/dist/client/components/pm-rich-text-editor.d.ts +4 -1
  29. package/dist/client/components/pm-rich-text-editor.d.ts.map +1 -1
  30. package/dist/client/components/pm-rich-text-editor.js +44 -4
  31. package/dist/client/components/pm-rich-text-editor.js.map +1 -1
  32. package/dist/client/components/pm-rich-text-extensions.d.ts +1 -0
  33. package/dist/client/components/pm-rich-text-extensions.d.ts.map +1 -1
  34. package/dist/client/components/pm-rich-text-extensions.js +2 -0
  35. package/dist/client/components/pm-rich-text-extensions.js.map +1 -1
  36. package/dist/client/components/ui/radio-group.d.ts +7 -0
  37. package/dist/client/components/ui/radio-group.d.ts.map +1 -0
  38. package/dist/client/components/ui/radio-group.js +12 -0
  39. package/dist/client/components/ui/radio-group.js.map +1 -0
  40. package/dist/client/config.d.ts +0 -2
  41. package/dist/client/config.d.ts.map +1 -1
  42. package/dist/client/config.js +1 -5
  43. package/dist/client/config.js.map +1 -1
  44. package/dist/client/hooks/use-attachment-uploads.d.ts +2 -2
  45. package/dist/client/hooks/use-attachment-uploads.d.ts.map +1 -1
  46. package/dist/client/hooks/use-attachment-uploads.js +28 -13
  47. package/dist/client/hooks/use-attachment-uploads.js.map +1 -1
  48. package/dist/client/issues.d.ts +3 -5
  49. package/dist/client/issues.d.ts.map +1 -1
  50. package/dist/client/issues.js +3 -4
  51. package/dist/client/issues.js.map +1 -1
  52. package/dist/client/kit/intake-draft.d.ts +21 -0
  53. package/dist/client/kit/intake-draft.d.ts.map +1 -0
  54. package/dist/client/kit/intake-draft.js +20 -0
  55. package/dist/client/kit/intake-draft.js.map +1 -0
  56. package/dist/client/kit/plans/lookup.d.ts +2 -2
  57. package/dist/client/kit/plans/lookup.js +3 -3
  58. package/dist/client/kit/plans/lookup.js.map +1 -1
  59. package/dist/client/kit/plans/plan-confirm.d.ts.map +1 -1
  60. package/dist/client/kit/plans/plan-confirm.js +2 -2
  61. package/dist/client/kit/plans/plan-confirm.js.map +1 -1
  62. package/dist/client/kit/plans/plan-row.js +2 -2
  63. package/dist/client/kit/plans/plan-row.js.map +1 -1
  64. package/dist/client/kit.d.ts +7 -9
  65. package/dist/client/kit.d.ts.map +1 -1
  66. package/dist/client/kit.js +7 -9
  67. package/dist/client/kit.js.map +1 -1
  68. package/dist/client/lib/intake-wait.d.ts +16 -0
  69. package/dist/client/lib/intake-wait.d.ts.map +1 -0
  70. package/dist/client/lib/intake-wait.js +12 -0
  71. package/dist/client/lib/intake-wait.js.map +1 -0
  72. package/dist/client/lib/kinds.d.ts +3 -29
  73. package/dist/client/lib/kinds.d.ts.map +1 -1
  74. package/dist/client/lib/kinds.js +7 -46
  75. package/dist/client/lib/kinds.js.map +1 -1
  76. package/dist/client/lib/status-events.d.ts +21 -0
  77. package/dist/client/lib/status-events.d.ts.map +1 -0
  78. package/dist/client/lib/status-events.js +31 -0
  79. package/dist/client/lib/status-events.js.map +1 -0
  80. package/dist/client/lib/status.d.ts +5 -7
  81. package/dist/client/lib/status.d.ts.map +1 -1
  82. package/dist/client/lib/status.js +5 -7
  83. package/dist/client/lib/status.js.map +1 -1
  84. package/dist/client/locales/en-US.d.ts +17 -252
  85. package/dist/client/locales/en-US.d.ts.map +1 -1
  86. package/dist/client/locales/en-US.js +21 -252
  87. package/dist/client/locales/en-US.js.map +1 -1
  88. package/dist/client/locales/plans.en-US.d.ts +1 -8
  89. package/dist/client/locales/plans.en-US.d.ts.map +1 -1
  90. package/dist/client/locales/plans.en-US.js +2 -9
  91. package/dist/client/locales/plans.en-US.js.map +1 -1
  92. package/dist/client/locales/plans.zh-CN.d.ts.map +1 -1
  93. package/dist/client/locales/plans.zh-CN.js +2 -9
  94. package/dist/client/locales/plans.zh-CN.js.map +1 -1
  95. package/dist/client/locales/zh-CN.d.ts.map +1 -1
  96. package/dist/client/locales/zh-CN.js +22 -245
  97. package/dist/client/locales/zh-CN.js.map +1 -1
  98. package/dist/client/pages/config/members/invitations-section.d.ts.map +1 -1
  99. package/dist/client/pages/config/members/invitations-section.js +34 -12
  100. package/dist/client/pages/config/members/invitations-section.js.map +1 -1
  101. package/dist/client/pages/config/members/invite-dialog.d.ts +5 -4
  102. package/dist/client/pages/config/members/invite-dialog.d.ts.map +1 -1
  103. package/dist/client/pages/config/members/invite-dialog.js +14 -9
  104. package/dist/client/pages/config/members/invite-dialog.js.map +1 -1
  105. package/dist/client/pages/intake/intake-ai-progress.d.ts.map +1 -1
  106. package/dist/client/pages/intake/intake-ai-progress.js +10 -13
  107. package/dist/client/pages/intake/intake-ai-progress.js.map +1 -1
  108. package/dist/client/pages/intake/intake-files.d.ts.map +1 -1
  109. package/dist/client/pages/intake/intake-files.js +38 -2
  110. package/dist/client/pages/intake/intake-files.js.map +1 -1
  111. package/dist/client/pages/intake/intake-panel.d.ts.map +1 -1
  112. package/dist/client/pages/intake/intake-panel.js +15 -5
  113. package/dist/client/pages/intake/intake-panel.js.map +1 -1
  114. package/dist/client/pages/intake/use-intake-uploads.d.ts.map +1 -1
  115. package/dist/client/pages/intake/use-intake-uploads.js +9 -3
  116. package/dist/client/pages/intake/use-intake-uploads.js.map +1 -1
  117. package/dist/client/pages/issues/board/board-model.d.ts +1 -1
  118. package/dist/client/pages/issues/board/board-model.js +1 -1
  119. package/dist/client/pages/issues/board/use-board-move.d.ts +2 -8
  120. package/dist/client/pages/issues/board/use-board-move.d.ts.map +1 -1
  121. package/dist/client/pages/issues/board/use-board-move.js +5 -42
  122. package/dist/client/pages/issues/board/use-board-move.js.map +1 -1
  123. package/dist/client/pages/issues/detail/new-subtask.d.ts.map +1 -1
  124. package/dist/client/pages/issues/detail/new-subtask.js +6 -28
  125. package/dist/client/pages/issues/detail/new-subtask.js.map +1 -1
  126. package/dist/client/pages/issues/detail/subtask-model.d.ts +1 -1
  127. package/dist/client/pages/issues/detail/subtask-model.js +1 -1
  128. package/dist/client/pages/issues/detail/use-confirmed-update.d.ts +6 -8
  129. package/dist/client/pages/issues/detail/use-confirmed-update.d.ts.map +1 -1
  130. package/dist/client/pages/issues/detail/use-confirmed-update.js +9 -42
  131. package/dist/client/pages/issues/detail/use-confirmed-update.js.map +1 -1
  132. package/dist/client/pages/issues/detail/use-issue-page.d.ts +0 -4
  133. package/dist/client/pages/issues/detail/use-issue-page.d.ts.map +1 -1
  134. package/dist/client/pages/issues/detail/use-issue-page.js +0 -14
  135. package/dist/client/pages/issues/detail/use-issue-page.js.map +1 -1
  136. package/dist/client/pages/issues/detail/use-issue-update.d.ts +2 -2
  137. package/dist/client/pages/issues/detail/use-issue-update.d.ts.map +1 -1
  138. package/dist/client/pages/issues/detail/use-issue-update.js +8 -8
  139. package/dist/client/pages/issues/detail/use-issue-update.js.map +1 -1
  140. package/dist/client/pages/issues/filters.d.ts +1 -1
  141. package/dist/client/pages/issues/filters.d.ts.map +1 -1
  142. package/dist/client/pages/issues/filters.js +2 -0
  143. package/dist/client/pages/issues/filters.js.map +1 -1
  144. package/dist/client/pages/issues/new-issue-button.d.ts.map +1 -1
  145. package/dist/client/pages/issues/new-issue-button.js +1 -1
  146. package/dist/client/pages/issues/new-issue-button.js.map +1 -1
  147. package/dist/client/pages/issues/new-issue-form.d.ts +13 -8
  148. package/dist/client/pages/issues/new-issue-form.d.ts.map +1 -1
  149. package/dist/client/pages/issues/new-issue-form.js +87 -83
  150. package/dist/client/pages/issues/new-issue-form.js.map +1 -1
  151. package/dist/client/pages/issues/new.d.ts.map +1 -1
  152. package/dist/client/pages/issues/new.js +3 -1
  153. package/dist/client/pages/issues/new.js.map +1 -1
  154. package/dist/client/pages/issues/use-executor-options.d.ts +3 -2
  155. package/dist/client/pages/issues/use-executor-options.d.ts.map +1 -1
  156. package/dist/client/pages/issues/use-executor-options.js +5 -23
  157. package/dist/client/pages/issues/use-executor-options.js.map +1 -1
  158. package/dist/client/pages/my-issues/my-issues-model.d.ts +2 -5
  159. package/dist/client/pages/my-issues/my-issues-model.d.ts.map +1 -1
  160. package/dist/client/pages/my-issues/my-issues-model.js +6 -7
  161. package/dist/client/pages/my-issues/my-issues-model.js.map +1 -1
  162. package/dist/client/pages/projects/detail/use-project-page.d.ts +4 -26
  163. package/dist/client/pages/projects/detail/use-project-page.d.ts.map +1 -1
  164. package/dist/client/pages/projects/detail/use-project-page.js +7 -53
  165. package/dist/client/pages/projects/detail/use-project-page.js.map +1 -1
  166. package/dist/client/pages/projects/new.d.ts +1 -1
  167. package/dist/client/pages/projects/new.d.ts.map +1 -1
  168. package/dist/client/pages/projects/new.js +3 -7
  169. package/dist/client/pages/projects/new.js.map +1 -1
  170. package/dist/client/plugin.d.ts +3 -0
  171. package/dist/client/plugin.d.ts.map +1 -1
  172. package/dist/client/plugin.js +8 -1
  173. package/dist/client/plugin.js.map +1 -1
  174. package/dist/client/projects.d.ts +2 -2
  175. package/dist/client/projects.d.ts.map +1 -1
  176. package/dist/client/projects.js +2 -2
  177. package/dist/client/projects.js.map +1 -1
  178. package/dist/client/providers/query-provider.d.ts.map +1 -1
  179. package/dist/client/providers/query-provider.js +15 -11
  180. package/dist/client/providers/query-provider.js.map +1 -1
  181. package/dist/database/migrations/.manifest.json +16 -0
  182. package/dist/database/migrations/202610110001_pm_issue_graph_revision.d.ts +4 -0
  183. package/dist/database/migrations/202610110001_pm_issue_graph_revision.d.ts.map +1 -0
  184. package/dist/database/migrations/202610110001_pm_issue_graph_revision.js +20 -0
  185. package/dist/database/migrations/202610110001_pm_issue_graph_revision.js.map +1 -0
  186. package/dist/database/migrations/202610240010_pm_fixed_statuses.d.ts +4 -0
  187. package/dist/database/migrations/202610240010_pm_fixed_statuses.d.ts.map +1 -0
  188. package/dist/database/migrations/202610240010_pm_fixed_statuses.js +189 -0
  189. package/dist/database/migrations/202610240010_pm_fixed_statuses.js.map +1 -0
  190. package/dist/database/migrations/202610240011_pm_issue_progress.d.ts +4 -0
  191. package/dist/database/migrations/202610240011_pm_issue_progress.d.ts.map +1 -0
  192. package/dist/database/migrations/202610240011_pm_issue_progress.js +19 -0
  193. package/dist/database/migrations/202610240011_pm_issue_progress.js.map +1 -0
  194. package/dist/database/migrations/202610240012_pm_issue_acceptance.d.ts +4 -0
  195. package/dist/database/migrations/202610240012_pm_issue_acceptance.d.ts.map +1 -0
  196. package/dist/database/migrations/202610240012_pm_issue_acceptance.js +17 -0
  197. package/dist/database/migrations/202610240012_pm_issue_acceptance.js.map +1 -0
  198. package/dist/server/access/viewer.d.ts +3 -0
  199. package/dist/server/access/viewer.d.ts.map +1 -1
  200. package/dist/server/access/viewer.js.map +1 -1
  201. package/dist/server/composition.d.ts +11 -17
  202. package/dist/server/composition.d.ts.map +1 -1
  203. package/dist/server/composition.js +15 -58
  204. package/dist/server/composition.js.map +1 -1
  205. package/dist/server/domains/attachments/attachment.routes.d.ts.map +1 -1
  206. package/dist/server/domains/attachments/attachment.routes.js +13 -1
  207. package/dist/server/domains/attachments/attachment.routes.js.map +1 -1
  208. package/dist/server/domains/attachments/attachment.service.d.ts +3 -1
  209. package/dist/server/domains/attachments/attachment.service.d.ts.map +1 -1
  210. package/dist/server/domains/attachments/attachment.service.js +36 -2
  211. package/dist/server/domains/attachments/attachment.service.js.map +1 -1
  212. package/dist/server/domains/attachments/attachment.store.d.ts +5 -0
  213. package/dist/server/domains/attachments/attachment.store.d.ts.map +1 -1
  214. package/dist/server/domains/attachments/attachment.store.js +27 -0
  215. package/dist/server/domains/attachments/attachment.store.js.map +1 -1
  216. package/dist/server/domains/comments/comment.queries.d.ts +42 -8
  217. package/dist/server/domains/comments/comment.queries.d.ts.map +1 -1
  218. package/dist/server/domains/comments/comment.queries.js +69 -8
  219. package/dist/server/domains/comments/comment.queries.js.map +1 -1
  220. package/dist/server/domains/comments/comment.routes.d.ts +1 -1
  221. package/dist/server/domains/comments/comment.routes.js +4 -4
  222. package/dist/server/domains/comments/comment.routes.js.map +1 -1
  223. package/dist/server/domains/comments/comment.service.d.ts +2 -2
  224. package/dist/server/domains/comments/comment.service.d.ts.map +1 -1
  225. package/dist/server/domains/comments/comment.service.js +18 -10
  226. package/dist/server/domains/comments/comment.service.js.map +1 -1
  227. package/dist/server/domains/comments/comment.store.d.ts +22 -1
  228. package/dist/server/domains/comments/comment.store.d.ts.map +1 -1
  229. package/dist/server/domains/comments/comment.store.js +65 -2
  230. package/dist/server/domains/comments/comment.store.js.map +1 -1
  231. package/dist/server/domains/comments/index.d.ts +1 -1
  232. package/dist/server/domains/comments/index.d.ts.map +1 -1
  233. package/dist/server/domains/comments/index.js.map +1 -1
  234. package/dist/server/domains/comments/ports.d.ts +7 -2
  235. package/dist/server/domains/comments/ports.d.ts.map +1 -1
  236. package/dist/server/domains/invitations/invitation.routes.d.ts +2 -1
  237. package/dist/server/domains/invitations/invitation.routes.d.ts.map +1 -1
  238. package/dist/server/domains/invitations/invitation.routes.js +27 -10
  239. package/dist/server/domains/invitations/invitation.routes.js.map +1 -1
  240. package/dist/server/domains/invitations/invitation.service.d.ts +1 -1
  241. package/dist/server/domains/invitations/invitation.service.d.ts.map +1 -1
  242. package/dist/server/domains/invitations/invitation.service.js +19 -3
  243. package/dist/server/domains/invitations/invitation.service.js.map +1 -1
  244. package/dist/server/domains/issues/index.d.ts +3 -3
  245. package/dist/server/domains/issues/index.d.ts.map +1 -1
  246. package/dist/server/domains/issues/index.js +2 -2
  247. package/dist/server/domains/issues/index.js.map +1 -1
  248. package/dist/server/domains/issues/issue.context.d.ts +6 -22
  249. package/dist/server/domains/issues/issue.context.d.ts.map +1 -1
  250. package/dist/server/domains/issues/issue.context.js +88 -105
  251. package/dist/server/domains/issues/issue.context.js.map +1 -1
  252. package/dist/server/domains/issues/issue.events.d.ts +5 -1
  253. package/dist/server/domains/issues/issue.events.d.ts.map +1 -1
  254. package/dist/server/domains/issues/issue.fields.d.ts +5 -3
  255. package/dist/server/domains/issues/issue.fields.d.ts.map +1 -1
  256. package/dist/server/domains/issues/issue.fields.js +50 -16
  257. package/dist/server/domains/issues/issue.fields.js.map +1 -1
  258. package/dist/server/domains/issues/issue.projects.d.ts +2 -2
  259. package/dist/server/domains/issues/issue.projects.d.ts.map +1 -1
  260. package/dist/server/domains/issues/issue.projects.js +1 -2
  261. package/dist/server/domains/issues/issue.projects.js.map +1 -1
  262. package/dist/server/domains/issues/issue.queries.d.ts +26 -7
  263. package/dist/server/domains/issues/issue.queries.d.ts.map +1 -1
  264. package/dist/server/domains/issues/issue.queries.js +137 -58
  265. package/dist/server/domains/issues/issue.queries.js.map +1 -1
  266. package/dist/server/domains/issues/issue.routes.d.ts +3 -1
  267. package/dist/server/domains/issues/issue.routes.d.ts.map +1 -1
  268. package/dist/server/domains/issues/issue.routes.js +74 -46
  269. package/dist/server/domains/issues/issue.routes.js.map +1 -1
  270. package/dist/server/domains/issues/issue.service.d.ts +22 -44
  271. package/dist/server/domains/issues/issue.service.d.ts.map +1 -1
  272. package/dist/server/domains/issues/issue.service.js +68 -82
  273. package/dist/server/domains/issues/issue.service.js.map +1 -1
  274. package/dist/server/domains/issues/issue.status.d.ts +7 -10
  275. package/dist/server/domains/issues/issue.status.d.ts.map +1 -1
  276. package/dist/server/domains/issues/issue.status.js +6 -22
  277. package/dist/server/domains/issues/issue.status.js.map +1 -1
  278. package/dist/server/domains/issues/issue.store.d.ts +11 -0
  279. package/dist/server/domains/issues/issue.store.d.ts.map +1 -1
  280. package/dist/server/domains/issues/issue.store.js +37 -0
  281. package/dist/server/domains/issues/issue.store.js.map +1 -1
  282. package/dist/server/domains/issues/ports.d.ts +35 -36
  283. package/dist/server/domains/issues/ports.d.ts.map +1 -1
  284. package/dist/server/domains/issues/ports.js +1 -5
  285. package/dist/server/domains/issues/ports.js.map +1 -1
  286. package/dist/server/domains/notices/notice.planner.d.ts +2 -1
  287. package/dist/server/domains/notices/notice.planner.d.ts.map +1 -1
  288. package/dist/server/domains/notices/notice.planner.js +2 -1
  289. package/dist/server/domains/notices/notice.planner.js.map +1 -1
  290. package/dist/server/domains/notices/notice.rules.d.ts +1 -4
  291. package/dist/server/domains/notices/notice.rules.d.ts.map +1 -1
  292. package/dist/server/domains/notices/notice.rules.js +4 -5
  293. package/dist/server/domains/notices/notice.rules.js.map +1 -1
  294. package/dist/server/domains/plans/intake/intake.service.d.ts +2 -0
  295. package/dist/server/domains/plans/intake/intake.service.d.ts.map +1 -1
  296. package/dist/server/domains/plans/intake/intake.service.js +14 -0
  297. package/dist/server/domains/plans/intake/intake.service.js.map +1 -1
  298. package/dist/server/domains/plans/intake/intake.text.d.ts +5 -6
  299. package/dist/server/domains/plans/intake/intake.text.d.ts.map +1 -1
  300. package/dist/server/domains/plans/intake/intake.text.js +5 -6
  301. package/dist/server/domains/plans/intake/intake.text.js.map +1 -1
  302. package/dist/server/domains/plans/plan.engine.d.ts.map +1 -1
  303. package/dist/server/domains/plans/plan.engine.js +6 -0
  304. package/dist/server/domains/plans/plan.engine.js.map +1 -1
  305. package/dist/server/domains/plans/plan.ops.d.ts +3 -3
  306. package/dist/server/domains/plans/plan.ops.d.ts.map +1 -1
  307. package/dist/server/domains/plans/plan.ops.js +23 -13
  308. package/dist/server/domains/plans/plan.ops.js.map +1 -1
  309. package/dist/server/domains/plans/plan.schemas.d.ts.map +1 -1
  310. package/dist/server/domains/plans/plan.schemas.js +26 -10
  311. package/dist/server/domains/plans/plan.schemas.js.map +1 -1
  312. package/dist/server/domains/projects/index.d.ts +1 -1
  313. package/dist/server/domains/projects/index.d.ts.map +1 -1
  314. package/dist/server/domains/projects/index.js.map +1 -1
  315. package/dist/server/domains/projects/project-resources.d.ts +5 -0
  316. package/dist/server/domains/projects/project-resources.d.ts.map +1 -1
  317. package/dist/server/domains/projects/project-resources.js +43 -1
  318. package/dist/server/domains/projects/project-resources.js.map +1 -1
  319. package/dist/server/domains/projects/project.events.d.ts +10 -0
  320. package/dist/server/domains/projects/project.events.d.ts.map +1 -0
  321. package/dist/server/domains/projects/project.events.js +2 -0
  322. package/dist/server/domains/projects/project.events.js.map +1 -0
  323. package/dist/server/domains/projects/project.routes.d.ts.map +1 -1
  324. package/dist/server/domains/projects/project.routes.js +1 -3
  325. package/dist/server/domains/projects/project.routes.js.map +1 -1
  326. package/dist/server/domains/projects/project.service.d.ts +1 -7
  327. package/dist/server/domains/projects/project.service.d.ts.map +1 -1
  328. package/dist/server/domains/projects/project.service.js +2 -17
  329. package/dist/server/domains/projects/project.service.js.map +1 -1
  330. package/dist/server/domains/projects/project.store.d.ts +0 -1
  331. package/dist/server/domains/projects/project.store.d.ts.map +1 -1
  332. package/dist/server/domains/projects/project.store.js +0 -1
  333. package/dist/server/domains/projects/project.store.js.map +1 -1
  334. package/dist/server/domains/reports/report.service.d.ts +1 -12
  335. package/dist/server/domains/reports/report.service.d.ts.map +1 -1
  336. package/dist/server/domains/reports/report.service.js +92 -136
  337. package/dist/server/domains/reports/report.service.js.map +1 -1
  338. package/dist/server/domains/settings/settings.store.d.ts +4 -4
  339. package/dist/server/domains/settings/settings.store.js +2 -2
  340. package/dist/server/domains/statuses/event-types.d.ts +16 -0
  341. package/dist/server/domains/statuses/event-types.d.ts.map +1 -0
  342. package/dist/server/domains/statuses/event-types.js +31 -0
  343. package/dist/server/domains/statuses/event-types.js.map +1 -0
  344. package/dist/server/domains/statuses/index.d.ts +4 -0
  345. package/dist/server/domains/statuses/index.d.ts.map +1 -0
  346. package/dist/server/domains/statuses/index.js +4 -0
  347. package/dist/server/domains/statuses/index.js.map +1 -0
  348. package/dist/server/domains/statuses/status.catalog.d.ts +15 -0
  349. package/dist/server/domains/statuses/status.catalog.d.ts.map +1 -0
  350. package/dist/server/domains/statuses/status.catalog.js +119 -0
  351. package/dist/server/domains/statuses/status.catalog.js.map +1 -0
  352. package/dist/server/domains/statuses/status.events.d.ts +15 -0
  353. package/dist/server/domains/statuses/status.events.d.ts.map +1 -0
  354. package/dist/server/domains/statuses/status.events.js +2 -0
  355. package/dist/server/domains/statuses/status.events.js.map +1 -0
  356. package/dist/server/domains/statuses/status.fire.d.ts +48 -0
  357. package/dist/server/domains/statuses/status.fire.d.ts.map +1 -0
  358. package/dist/server/domains/statuses/status.fire.js +38 -0
  359. package/dist/server/domains/statuses/status.fire.js.map +1 -0
  360. package/dist/server/domains/subscriptions/subscription.routes.d.ts.map +1 -1
  361. package/dist/server/domains/subscriptions/subscription.routes.js +4 -2
  362. package/dist/server/domains/subscriptions/subscription.routes.js.map +1 -1
  363. package/dist/server/domains/subtasks/index.d.ts +1 -0
  364. package/dist/server/domains/subtasks/index.d.ts.map +1 -1
  365. package/dist/server/domains/subtasks/index.js +1 -0
  366. package/dist/server/domains/subtasks/index.js.map +1 -1
  367. package/dist/server/domains/subtasks/subtask.blocking.d.ts +10 -5
  368. package/dist/server/domains/subtasks/subtask.blocking.d.ts.map +1 -1
  369. package/dist/server/domains/subtasks/subtask.blocking.js +35 -15
  370. package/dist/server/domains/subtasks/subtask.blocking.js.map +1 -1
  371. package/dist/server/domains/subtasks/subtask.guard.d.ts +12 -0
  372. package/dist/server/domains/subtasks/subtask.guard.d.ts.map +1 -0
  373. package/dist/server/domains/subtasks/subtask.guard.js +23 -0
  374. package/dist/server/domains/subtasks/subtask.guard.js.map +1 -0
  375. package/dist/server/domains/subtasks/subtask.release.d.ts +7 -11
  376. package/dist/server/domains/subtasks/subtask.release.d.ts.map +1 -1
  377. package/dist/server/domains/subtasks/subtask.release.js +9 -7
  378. package/dist/server/domains/subtasks/subtask.release.js.map +1 -1
  379. package/dist/server/domains/subtasks/subtask.routes.d.ts +1 -0
  380. package/dist/server/domains/subtasks/subtask.routes.d.ts.map +1 -1
  381. package/dist/server/domains/subtasks/subtask.routes.js +31 -3
  382. package/dist/server/domains/subtasks/subtask.routes.js.map +1 -1
  383. package/dist/server/domains/subtasks/subtask.service.d.ts +5 -5
  384. package/dist/server/domains/subtasks/subtask.service.d.ts.map +1 -1
  385. package/dist/server/domains/subtasks/subtask.service.js +98 -20
  386. package/dist/server/domains/subtasks/subtask.service.js.map +1 -1
  387. package/dist/server/domains/subtasks/subtask.store.d.ts +7 -0
  388. package/dist/server/domains/subtasks/subtask.store.d.ts.map +1 -1
  389. package/dist/server/domains/subtasks/subtask.store.js +34 -0
  390. package/dist/server/domains/subtasks/subtask.store.js.map +1 -1
  391. package/dist/server/index.d.ts +1 -0
  392. package/dist/server/index.d.ts.map +1 -1
  393. package/dist/server/index.js +1 -0
  394. package/dist/server/index.js.map +1 -1
  395. package/dist/server/kernel/activity.d.ts +5 -2
  396. package/dist/server/kernel/activity.d.ts.map +1 -1
  397. package/dist/server/kernel/activity.js +28 -1
  398. package/dist/server/kernel/activity.js.map +1 -1
  399. package/dist/server/kernel/actor.d.ts +2 -0
  400. package/dist/server/kernel/actor.d.ts.map +1 -1
  401. package/dist/server/kernel/actor.js.map +1 -1
  402. package/dist/server/kernel/http.d.ts.map +1 -1
  403. package/dist/server/kernel/http.js +2 -3
  404. package/dist/server/kernel/http.js.map +1 -1
  405. package/dist/server/kernel/kinds.d.ts +24 -6
  406. package/dist/server/kernel/kinds.d.ts.map +1 -1
  407. package/dist/server/kernel/kinds.js +21 -1
  408. package/dist/server/kernel/kinds.js.map +1 -1
  409. package/dist/server/kernel/transaction-read.d.ts +4 -0
  410. package/dist/server/kernel/transaction-read.d.ts.map +1 -0
  411. package/dist/server/kernel/transaction-read.js +30 -0
  412. package/dist/server/kernel/transaction-read.js.map +1 -0
  413. package/dist/server/kernel/work.d.ts +16 -6
  414. package/dist/server/kernel/work.d.ts.map +1 -1
  415. package/dist/server/kernel/work.js +33 -14
  416. package/dist/server/kernel/work.js.map +1 -1
  417. package/dist/server/lifecycle/move.d.ts +1 -0
  418. package/dist/server/lifecycle/move.d.ts.map +1 -1
  419. package/dist/server/lifecycle/move.js +2 -0
  420. package/dist/server/lifecycle/move.js.map +1 -1
  421. package/dist/server/lifecycle/registry.d.ts +5 -0
  422. package/dist/server/lifecycle/registry.d.ts.map +1 -1
  423. package/dist/server/lifecycle/registry.js.map +1 -1
  424. package/dist/server/locales/en-US.d.ts +0 -9
  425. package/dist/server/locales/en-US.d.ts.map +1 -1
  426. package/dist/server/locales/en-US.js +0 -9
  427. package/dist/server/locales/en-US.js.map +1 -1
  428. package/dist/server/locales/zh-CN.d.ts.map +1 -1
  429. package/dist/server/locales/zh-CN.js +2 -11
  430. package/dist/server/locales/zh-CN.js.map +1 -1
  431. package/dist/server/providers/change-announcer.d.ts +28 -0
  432. package/dist/server/providers/change-announcer.d.ts.map +1 -0
  433. package/dist/server/providers/change-announcer.js +75 -0
  434. package/dist/server/providers/change-announcer.js.map +1 -0
  435. package/dist/server/providers/notifications.d.ts +1 -0
  436. package/dist/server/providers/notifications.d.ts.map +1 -1
  437. package/dist/server/providers/notifications.js +6 -120
  438. package/dist/server/providers/notifications.js.map +1 -1
  439. package/dist/server/providers/projects.d.ts +3 -8
  440. package/dist/server/providers/projects.d.ts.map +1 -1
  441. package/dist/server/providers/projects.js +14 -37
  442. package/dist/server/providers/projects.js.map +1 -1
  443. package/dist/server/routes/api.d.ts.map +1 -1
  444. package/dist/server/routes/api.js +5 -8
  445. package/dist/server/routes/api.js.map +1 -1
  446. package/dist/server/routes/schemas.d.ts +20 -29
  447. package/dist/server/routes/schemas.d.ts.map +1 -1
  448. package/dist/server/routes/schemas.js +405 -289
  449. package/dist/server/routes/schemas.js.map +1 -1
  450. package/dist/server/tokens.d.ts +22 -35
  451. package/dist/server/tokens.d.ts.map +1 -1
  452. package/dist/server/tokens.js +5 -16
  453. package/dist/server/tokens.js.map +1 -1
  454. package/dist/shared/access.d.ts +0 -1
  455. package/dist/shared/access.d.ts.map +1 -1
  456. package/dist/shared/access.js +2 -11
  457. package/dist/shared/access.js.map +1 -1
  458. package/dist/shared/attachments.d.ts +29 -0
  459. package/dist/shared/attachments.d.ts.map +1 -1
  460. package/dist/shared/attachments.js +7 -0
  461. package/dist/shared/attachments.js.map +1 -1
  462. package/dist/shared/comments.d.ts +3 -0
  463. package/dist/shared/comments.d.ts.map +1 -1
  464. package/dist/shared/comments.js.map +1 -1
  465. package/dist/shared/intake-ai.d.ts +3 -1
  466. package/dist/shared/intake-ai.d.ts.map +1 -1
  467. package/dist/shared/intake-ai.js.map +1 -1
  468. package/dist/shared/invitations.d.ts +1 -1
  469. package/dist/shared/invitations.d.ts.map +1 -1
  470. package/dist/shared/issues.d.ts +32 -36
  471. package/dist/shared/issues.d.ts.map +1 -1
  472. package/dist/shared/issues.js +5 -0
  473. package/dist/shared/issues.js.map +1 -1
  474. package/dist/shared/kinds.d.ts +3 -1
  475. package/dist/shared/kinds.d.ts.map +1 -1
  476. package/dist/shared/kinds.js +1 -1
  477. package/dist/shared/locales/access.en-US.d.ts +0 -1
  478. package/dist/shared/locales/access.en-US.d.ts.map +1 -1
  479. package/dist/shared/locales/access.en-US.js +1 -2
  480. package/dist/shared/locales/access.en-US.js.map +1 -1
  481. package/dist/shared/locales/access.zh-CN.d.ts.map +1 -1
  482. package/dist/shared/locales/access.zh-CN.js +1 -2
  483. package/dist/shared/locales/access.zh-CN.js.map +1 -1
  484. package/dist/shared/plans.d.ts +28 -10
  485. package/dist/shared/plans.d.ts.map +1 -1
  486. package/dist/shared/plans.js +2 -1
  487. package/dist/shared/plans.js.map +1 -1
  488. package/dist/shared/projects.d.ts +0 -4
  489. package/dist/shared/projects.d.ts.map +1 -1
  490. package/dist/shared/projects.js.map +1 -1
  491. package/dist/shared/realtime.d.ts +10 -3
  492. package/dist/shared/realtime.d.ts.map +1 -1
  493. package/dist/shared/realtime.js +3 -2
  494. package/dist/shared/realtime.js.map +1 -1
  495. package/dist/shared/statuses.d.ts +42 -0
  496. package/dist/shared/statuses.d.ts.map +1 -0
  497. package/dist/shared/statuses.js +73 -0
  498. package/dist/shared/statuses.js.map +1 -0
  499. package/dist/shared/subtasks.d.ts +8 -3
  500. package/dist/shared/subtasks.d.ts.map +1 -1
  501. package/package.json +21 -29
  502. package/skills/nocobase-app-plugin-projects/SKILL.md +34 -57
  503. package/dist/client/lib/built-in-rule-editors.d.ts +0 -13
  504. package/dist/client/lib/built-in-rule-editors.d.ts.map +0 -1
  505. package/dist/client/lib/built-in-rule-editors.js +0 -86
  506. package/dist/client/lib/built-in-rule-editors.js.map +0 -1
  507. package/dist/client/lib/built-in-rule-types.d.ts +0 -3
  508. package/dist/client/lib/built-in-rule-types.d.ts.map +0 -1
  509. package/dist/client/lib/built-in-rule-types.js +0 -63
  510. package/dist/client/lib/built-in-rule-types.js.map +0 -1
  511. package/dist/client/lib/status-rule-types.d.ts +0 -60
  512. package/dist/client/lib/status-rule-types.d.ts.map +0 -1
  513. package/dist/client/lib/status-rule-types.js +0 -38
  514. package/dist/client/lib/status-rule-types.js.map +0 -1
  515. package/dist/client/lib/workflow-events.d.ts +0 -25
  516. package/dist/client/lib/workflow-events.d.ts.map +0 -1
  517. package/dist/client/lib/workflow-events.js +0 -30
  518. package/dist/client/lib/workflow-events.js.map +0 -1
  519. package/dist/client/pages/config/workflow-detail.d.ts +0 -10
  520. package/dist/client/pages/config/workflow-detail.d.ts.map +0 -1
  521. package/dist/client/pages/config/workflow-detail.js +0 -182
  522. package/dist/client/pages/config/workflow-detail.js.map +0 -1
  523. package/dist/client/pages/config/workflows/flow-editor.d.ts +0 -15
  524. package/dist/client/pages/config/workflows/flow-editor.d.ts.map +0 -1
  525. package/dist/client/pages/config/workflows/flow-editor.js +0 -76
  526. package/dist/client/pages/config/workflows/flow-editor.js.map +0 -1
  527. package/dist/client/pages/config/workflows/status-rules.d.ts +0 -21
  528. package/dist/client/pages/config/workflows/status-rules.d.ts.map +0 -1
  529. package/dist/client/pages/config/workflows/status-rules.js +0 -203
  530. package/dist/client/pages/config/workflows/status-rules.js.map +0 -1
  531. package/dist/client/pages/config/workflows/transitions-matrix.d.ts +0 -20
  532. package/dist/client/pages/config/workflows/transitions-matrix.d.ts.map +0 -1
  533. package/dist/client/pages/config/workflows/transitions-matrix.js +0 -114
  534. package/dist/client/pages/config/workflows/transitions-matrix.js.map +0 -1
  535. package/dist/client/pages/config/workflows/use-status-name.d.ts +0 -4
  536. package/dist/client/pages/config/workflows/use-status-name.d.ts.map +0 -1
  537. package/dist/client/pages/config/workflows/use-status-name.js +0 -17
  538. package/dist/client/pages/config/workflows/use-status-name.js.map +0 -1
  539. package/dist/client/pages/config/workflows/workflow-diagram.d.ts +0 -17
  540. package/dist/client/pages/config/workflows/workflow-diagram.d.ts.map +0 -1
  541. package/dist/client/pages/config/workflows/workflow-diagram.js +0 -298
  542. package/dist/client/pages/config/workflows/workflow-diagram.js.map +0 -1
  543. package/dist/client/pages/config/workflows/workflow-model.d.ts +0 -157
  544. package/dist/client/pages/config/workflows/workflow-model.d.ts.map +0 -1
  545. package/dist/client/pages/config/workflows/workflow-model.js +0 -403
  546. package/dist/client/pages/config/workflows/workflow-model.js.map +0 -1
  547. package/dist/client/pages/config/workflows/workflow-views.d.ts +0 -31
  548. package/dist/client/pages/config/workflows/workflow-views.d.ts.map +0 -1
  549. package/dist/client/pages/config/workflows/workflow-views.js +0 -76
  550. package/dist/client/pages/config/workflows/workflow-views.js.map +0 -1
  551. package/dist/client/pages/config/workflows.d.ts +0 -8
  552. package/dist/client/pages/config/workflows.d.ts.map +0 -1
  553. package/dist/client/pages/config/workflows.js +0 -139
  554. package/dist/client/pages/config/workflows.js.map +0 -1
  555. package/dist/client/pages/issues/detail/start-dialog.d.ts +0 -20
  556. package/dist/client/pages/issues/detail/start-dialog.d.ts.map +0 -1
  557. package/dist/client/pages/issues/detail/start-dialog.js +0 -31
  558. package/dist/client/pages/issues/detail/start-dialog.js.map +0 -1
  559. package/dist/client/pages/projects/workflow-select.d.ts +0 -14
  560. package/dist/client/pages/projects/workflow-select.d.ts.map +0 -1
  561. package/dist/client/pages/projects/workflow-select.js +0 -34
  562. package/dist/client/pages/projects/workflow-select.js.map +0 -1
  563. package/dist/server/domains/approvals/approval.events.d.ts +0 -47
  564. package/dist/server/domains/approvals/approval.events.d.ts.map +0 -1
  565. package/dist/server/domains/approvals/approval.events.js +0 -2
  566. package/dist/server/domains/approvals/approval.events.js.map +0 -1
  567. package/dist/server/domains/approvals/approval.lifecycle.d.ts +0 -8
  568. package/dist/server/domains/approvals/approval.lifecycle.d.ts.map +0 -1
  569. package/dist/server/domains/approvals/approval.lifecycle.js +0 -54
  570. package/dist/server/domains/approvals/approval.lifecycle.js.map +0 -1
  571. package/dist/server/domains/approvals/approval.routes.d.ts +0 -10
  572. package/dist/server/domains/approvals/approval.routes.d.ts.map +0 -1
  573. package/dist/server/domains/approvals/approval.routes.js +0 -86
  574. package/dist/server/domains/approvals/approval.routes.js.map +0 -1
  575. package/dist/server/domains/approvals/approval.service.d.ts +0 -72
  576. package/dist/server/domains/approvals/approval.service.d.ts.map +0 -1
  577. package/dist/server/domains/approvals/approval.service.js +0 -261
  578. package/dist/server/domains/approvals/approval.service.js.map +0 -1
  579. package/dist/server/domains/approvals/approval.store.d.ts +0 -42
  580. package/dist/server/domains/approvals/approval.store.d.ts.map +0 -1
  581. package/dist/server/domains/approvals/approval.store.js +0 -66
  582. package/dist/server/domains/approvals/approval.store.js.map +0 -1
  583. package/dist/server/domains/approvals/index.d.ts +0 -4
  584. package/dist/server/domains/approvals/index.d.ts.map +0 -1
  585. package/dist/server/domains/approvals/index.js +0 -3
  586. package/dist/server/domains/approvals/index.js.map +0 -1
  587. package/dist/server/domains/checklists/checklist.routes.d.ts +0 -9
  588. package/dist/server/domains/checklists/checklist.routes.d.ts.map +0 -1
  589. package/dist/server/domains/checklists/checklist.routes.js +0 -62
  590. package/dist/server/domains/checklists/checklist.routes.js.map +0 -1
  591. package/dist/server/domains/checklists/checklist.service.d.ts +0 -26
  592. package/dist/server/domains/checklists/checklist.service.d.ts.map +0 -1
  593. package/dist/server/domains/checklists/checklist.service.js +0 -80
  594. package/dist/server/domains/checklists/checklist.service.js.map +0 -1
  595. package/dist/server/domains/checklists/checklist.store.d.ts +0 -32
  596. package/dist/server/domains/checklists/checklist.store.d.ts.map +0 -1
  597. package/dist/server/domains/checklists/checklist.store.js +0 -66
  598. package/dist/server/domains/checklists/checklist.store.js.map +0 -1
  599. package/dist/server/domains/checklists/index.d.ts +0 -4
  600. package/dist/server/domains/checklists/index.d.ts.map +0 -1
  601. package/dist/server/domains/checklists/index.js +0 -4
  602. package/dist/server/domains/checklists/index.js.map +0 -1
  603. package/dist/server/domains/workflows/built-in-rule-types.d.ts +0 -40
  604. package/dist/server/domains/workflows/built-in-rule-types.d.ts.map +0 -1
  605. package/dist/server/domains/workflows/built-in-rule-types.js +0 -260
  606. package/dist/server/domains/workflows/built-in-rule-types.js.map +0 -1
  607. package/dist/server/domains/workflows/event-types.d.ts +0 -21
  608. package/dist/server/domains/workflows/event-types.d.ts.map +0 -1
  609. package/dist/server/domains/workflows/event-types.js +0 -31
  610. package/dist/server/domains/workflows/event-types.js.map +0 -1
  611. package/dist/server/domains/workflows/index.d.ts +0 -10
  612. package/dist/server/domains/workflows/index.d.ts.map +0 -1
  613. package/dist/server/domains/workflows/index.js +0 -10
  614. package/dist/server/domains/workflows/index.js.map +0 -1
  615. package/dist/server/domains/workflows/rule-types.d.ts +0 -125
  616. package/dist/server/domains/workflows/rule-types.d.ts.map +0 -1
  617. package/dist/server/domains/workflows/rule-types.js +0 -33
  618. package/dist/server/domains/workflows/rule-types.js.map +0 -1
  619. package/dist/server/domains/workflows/templates.d.ts +0 -62
  620. package/dist/server/domains/workflows/templates.d.ts.map +0 -1
  621. package/dist/server/domains/workflows/templates.js +0 -63
  622. package/dist/server/domains/workflows/templates.js.map +0 -1
  623. package/dist/server/domains/workflows/workflow.diff.d.ts +0 -14
  624. package/dist/server/domains/workflows/workflow.diff.d.ts.map +0 -1
  625. package/dist/server/domains/workflows/workflow.diff.js +0 -80
  626. package/dist/server/domains/workflows/workflow.diff.js.map +0 -1
  627. package/dist/server/domains/workflows/workflow.events.d.ts +0 -26
  628. package/dist/server/domains/workflows/workflow.events.d.ts.map +0 -1
  629. package/dist/server/domains/workflows/workflow.events.js +0 -2
  630. package/dist/server/domains/workflows/workflow.events.js.map +0 -1
  631. package/dist/server/domains/workflows/workflow.fire.d.ts +0 -38
  632. package/dist/server/domains/workflows/workflow.fire.d.ts.map +0 -1
  633. package/dist/server/domains/workflows/workflow.fire.js +0 -57
  634. package/dist/server/domains/workflows/workflow.fire.js.map +0 -1
  635. package/dist/server/domains/workflows/workflow.registry.d.ts +0 -27
  636. package/dist/server/domains/workflows/workflow.registry.d.ts.map +0 -1
  637. package/dist/server/domains/workflows/workflow.registry.js +0 -130
  638. package/dist/server/domains/workflows/workflow.registry.js.map +0 -1
  639. package/dist/server/domains/workflows/workflow.routes.d.ts +0 -6
  640. package/dist/server/domains/workflows/workflow.routes.d.ts.map +0 -1
  641. package/dist/server/domains/workflows/workflow.routes.js +0 -148
  642. package/dist/server/domains/workflows/workflow.routes.js.map +0 -1
  643. package/dist/server/domains/workflows/workflow.rules.d.ts +0 -14
  644. package/dist/server/domains/workflows/workflow.rules.d.ts.map +0 -1
  645. package/dist/server/domains/workflows/workflow.rules.js +0 -190
  646. package/dist/server/domains/workflows/workflow.rules.js.map +0 -1
  647. package/dist/server/domains/workflows/workflow.service.d.ts +0 -71
  648. package/dist/server/domains/workflows/workflow.service.d.ts.map +0 -1
  649. package/dist/server/domains/workflows/workflow.service.js +0 -365
  650. package/dist/server/domains/workflows/workflow.service.js.map +0 -1
  651. package/dist/server/domains/workflows/workflow.store.d.ts +0 -33
  652. package/dist/server/domains/workflows/workflow.store.d.ts.map +0 -1
  653. package/dist/server/domains/workflows/workflow.store.js +0 -148
  654. package/dist/server/domains/workflows/workflow.store.js.map +0 -1
  655. package/dist/shared/approvals.d.ts +0 -37
  656. package/dist/shared/approvals.d.ts.map +0 -1
  657. package/dist/shared/approvals.js +0 -4
  658. package/dist/shared/approvals.js.map +0 -1
  659. package/dist/shared/checklists.d.ts +0 -27
  660. package/dist/shared/checklists.d.ts.map +0 -1
  661. package/dist/shared/checklists.js +0 -7
  662. package/dist/shared/checklists.js.map +0 -1
  663. package/dist/shared/workflows.d.ts +0 -267
  664. package/dist/shared/workflows.d.ts.map +0 -1
  665. package/dist/shared/workflows.js +0 -149
  666. package/dist/shared/workflows.js.map +0 -1
@@ -3,6 +3,7 @@ import { BUSINESS_KEYS, SETTINGS_KEYS, } from '../../shared/access.js';
3
3
  import { REACTION_EMOJIS, } from '../../shared/comments.js';
4
4
  import { COLORS, PRIORITIES } from '../../shared/common.js';
5
5
  import { INTAKE_AI_MODES, INTAKE_AI_STATUSES, } from '../../shared/intake-ai.js';
6
+ import { ISSUE_IDS_MAX, } from '../../shared/issues.js';
6
7
  import { PLAN_OPS, PLAN_RISK_FLAGS, PLAN_STATUSES, PLAN_UNDO_OPS, } from '../../shared/plans.js';
7
8
  import { PROJECT_RESOURCE_TYPES, PROJECT_STATUSES, PROJECT_VISIBILITIES, } from '../../shared/projects.js';
8
9
  import { SUBSCRIPTION_REASONS, } from '../../shared/subscriptions.js';
@@ -26,48 +27,56 @@ const executor = z.strictObject({ type: id, id }).nullable();
26
27
  const isObject = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
27
28
  // Path parameters
28
29
  export const ProjectParams = z.object({
29
- projectId: id,
30
+ projectId: id.describe('The project identifier.'),
31
+ });
32
+ export const ProjectMemberParams = z.object({
33
+ projectId: id.describe('The project identifier.'),
34
+ userId: id.describe('The user identifier.'),
35
+ });
36
+ export const ProjectResourceParams = z.object({
37
+ projectId: id.describe('The project identifier.'),
38
+ resourceId: id.describe('The resource identifier.'),
30
39
  });
31
- export const ProjectMemberParams = z.object({ projectId: id, userId: id });
32
- export const ProjectResourceParams = z.object({ projectId: id, resourceId: id });
33
40
  export const IssueParams = z.object({
34
- issueId: id,
41
+ issueId: id.describe('The issue identifier.'),
42
+ });
43
+ export const DependencyParams = z.object({
44
+ issueId: id.describe('The issue identifier.'),
45
+ dependencyId: id.describe('The dependency identifier.'),
35
46
  });
36
- export const DependencyParams = z.object({ issueId: id, dependencyId: id });
37
- export const ChecklistItemParams = z.object({ issueId: id, statusKey: id, itemKey: id });
38
47
  export const CommentParams = z.object({
39
- commentId: id,
48
+ commentId: id.describe('The comment identifier.'),
40
49
  });
41
50
  export const LabelParams = z.object({
42
- labelId: id,
43
- });
44
- export const WorkflowParams = z.object({
45
- workflowId: id,
51
+ labelId: id.describe('The label identifier.'),
46
52
  });
47
53
  export const InvitationParams = z.object({
48
- invitationId: id,
49
- });
50
- export const ApprovalParams = z.object({
51
- approvalId: id,
54
+ invitationId: id.describe('The invitation identifier.'),
52
55
  });
53
56
  export const PlanParams = z.object({
54
- planId: id,
57
+ planId: id.describe('The plan identifier.'),
55
58
  });
56
59
  export const IntakeFileParams = z.object({
57
- fileId: id,
60
+ fileId: id.describe('The file identifier.'),
58
61
  });
59
62
  export const IntakeJobParams = z.object({
60
- jobId: id,
63
+ jobId: id.describe('The job identifier.'),
61
64
  });
62
65
  export const AttachmentParams = z.object({
63
- attachmentId: id,
66
+ attachmentId: id.describe('The attachment identifier.'),
64
67
  });
65
68
  /** `GET /projects/mentionCandidates`: one short page of the `@` list, at most 20. */
66
69
  export const MentionCandidatesQuery = z
67
70
  .object({
68
- q: text,
69
- issueId: text,
70
- pageSize: z.coerce.number().int().min(1).max(20).default(8),
71
+ q: text.describe('Text to search for.'),
72
+ issueId: text.describe('The issue identifier.'),
73
+ pageSize: z.coerce
74
+ .number()
75
+ .int()
76
+ .min(1)
77
+ .max(20)
78
+ .default(8)
79
+ .describe('The maximum number of records to return.'),
71
80
  })
72
81
  .transform(({ q, issueId, pageSize: limit }) => ({
73
82
  ...(q ? { q } : {}),
@@ -75,47 +84,56 @@ export const MentionCandidatesQuery = z
75
84
  limit,
76
85
  }));
77
86
  export const CreateInvitationsBody = z.strictObject({
78
- emails: z.array(z.string()),
79
- projectIds: z.array(id).optional(),
87
+ emails: z.array(z.string()).describe('The email addresses to invite.'),
88
+ projectIds: z
89
+ .array(id)
90
+ .optional()
91
+ .describe('Projects the invited members may join.'),
92
+ });
93
+ export const UpdateSettingsBody = z.strictObject({
94
+ issuePrefix: z
95
+ .string()
96
+ .optional()
97
+ .describe('The prefix used for new issue identifiers.'),
80
98
  });
81
- export const UpdateSettingsBody = z.strictObject({ issuePrefix: z.string().optional() });
82
- // Labels and workflows
99
+ // Labels
83
100
  export const CreateLabelBody = z.strictObject({
84
- name: z.string(),
85
- color: z.enum(COLORS).optional(),
101
+ name: z.string().describe('The name to display.'),
102
+ color: z.enum(COLORS).optional().describe('The label color.'),
86
103
  });
87
104
  export const UpdateLabelBody = z.strictObject({
88
- name: z.string().optional(),
89
- color: z.enum(COLORS).optional(),
90
- });
91
- /** The definition's structure is checked by the workflow service, which reports every problem at its path. */
92
- const definition = z
93
- .custom(isObject, 'definition must be an object.')
94
- .meta({
95
- description: 'A workflow definition, shaped as `ProjectsWorkflowDefinition`: `{ states, transitions }`.',
96
- });
97
- export const CreateWorkflowBody = z.strictObject({ name: z.string(), copyFrom: id.nullable() });
98
- export const UpdateWorkflowBody = z.strictObject({
99
- revision: z.number().int(),
100
- name: z.string().optional(),
101
- description: z.string().nullable().optional(),
102
- definition: definition.optional(),
105
+ name: z.string().optional().describe('The name to display.'),
106
+ color: z.enum(COLORS).optional().describe('The label color.'),
103
107
  });
104
- export const PreviewWorkflowBody = z.strictObject({ definition });
105
108
  // Projects
106
109
  const projectFields = {
107
- description: z.string().nullable().optional(),
108
- visibility: z.enum(PROJECT_VISIBILITIES).optional(),
109
- status: z.enum(PROJECT_STATUSES).optional(),
110
- priority: priority.optional(),
111
- leadUserId: id.nullable().optional(),
112
- startDate: date.optional(),
113
- dueDate: date.optional(),
114
- workflowId: id.nullable().optional(),
110
+ description: z
111
+ .string()
112
+ .nullable()
113
+ .optional()
114
+ .describe('A description of the record.'),
115
+ visibility: z
116
+ .enum(PROJECT_VISIBILITIES)
117
+ .optional()
118
+ .describe('Who may see this project.'),
119
+ status: z
120
+ .enum(PROJECT_STATUSES)
121
+ .optional()
122
+ .describe('The status to set or filter by.'),
123
+ priority: priority.optional().describe('The priority to assign.'),
124
+ leadUserId: id.nullable().optional().describe('The lead user identifier.'),
125
+ startDate: date.optional().describe('The planned start date.'),
126
+ dueDate: date.optional().describe('The planned due date.'),
115
127
  };
116
- export const CreateProjectBody = z.strictObject({ name: z.string(), ...projectFields });
117
- export const UpdateProjectBody = z.strictObject({ name: z.string().optional(), ...projectFields });
118
- export const AddProjectMemberBody = z.strictObject({ userId: id });
128
+ export const CreateProjectBody = z.strictObject({
129
+ name: z.string().describe('The name to display.'),
130
+ ...projectFields,
131
+ });
132
+ export const UpdateProjectBody = z.strictObject({
133
+ name: z.string().optional().describe('The name to display.'),
134
+ ...projectFields,
135
+ });
136
+ export const AddProjectMemberBody = z.strictObject({ userId: id.describe('The user identifier.') });
119
137
  const binding = z
120
138
  .strictObject({
121
139
  provider: id,
@@ -125,24 +143,58 @@ const binding = z
125
143
  })
126
144
  .nullable();
127
145
  export const CreateProjectResourceBody = z.strictObject({
128
- type: z.enum(PROJECT_RESOURCE_TYPES),
129
- url: z.string().nullable().optional(),
130
- defaultRef: z.string().nullable().optional(),
131
- binding: binding.optional(),
132
- runnerId: z.string().nullable().optional(),
133
- path: z.string().nullable().optional(),
134
- label: z.string().nullable().optional(),
135
- initPrompt: z.string().nullable().optional(),
146
+ type: z
147
+ .enum(PROJECT_RESOURCE_TYPES)
148
+ .describe('The type of relationship or record.'),
149
+ url: z.string().nullable().optional().describe('The resource URL.'),
150
+ defaultRef: z
151
+ .string()
152
+ .nullable()
153
+ .optional()
154
+ .describe('The default Git branch or revision.'),
155
+ binding: binding.optional().describe('The resource binding configuration.'),
156
+ runnerId: z
157
+ .string()
158
+ .nullable()
159
+ .optional()
160
+ .describe('The runner identifier.'),
161
+ path: z.string().nullable().optional().describe('The path on the runner.'),
162
+ label: z
163
+ .string()
164
+ .nullable()
165
+ .optional()
166
+ .describe('A label for this resource.'),
167
+ initPrompt: z
168
+ .string()
169
+ .nullable()
170
+ .optional()
171
+ .describe('Instructions for initializing the project.'),
136
172
  });
137
173
  export const UpdateProjectResourceBody = z.strictObject({
138
- url: z.string().optional(),
139
- defaultRef: z.string().nullable().optional(),
140
- binding: binding.optional(),
141
- runnerId: z.string().optional(),
142
- path: z.string().optional(),
143
- label: z.string().nullable().optional(),
144
- initPrompt: z.string().nullable().optional(),
145
- position: z.number().int().optional(),
174
+ url: z.string().optional().describe('The resource URL.'),
175
+ defaultRef: z
176
+ .string()
177
+ .nullable()
178
+ .optional()
179
+ .describe('The default Git branch or revision.'),
180
+ binding: binding.optional().describe('The resource binding configuration.'),
181
+ runnerId: z.string().optional().describe('The runner identifier.'),
182
+ path: z.string().optional().describe('The path on the runner.'),
183
+ label: z
184
+ .string()
185
+ .nullable()
186
+ .optional()
187
+ .describe('A label for this resource.'),
188
+ initPrompt: z
189
+ .string()
190
+ .nullable()
191
+ .optional()
192
+ .describe('Instructions for initializing the project.'),
193
+ position: z
194
+ .number()
195
+ .int()
196
+ .optional()
197
+ .describe('The resource’s position in the ordered list.'),
146
198
  });
147
199
  // Issues
148
200
  const ORDER_FIELDS = {
@@ -169,16 +221,34 @@ function sortOf(value) {
169
221
  };
170
222
  }
171
223
  const issueFilters = {
172
- statusKey: text,
173
- projectId: text,
174
- ownerUserId: text,
175
- executorId: text,
176
- labelId: text,
224
+ issueIds: z
225
+ .string()
226
+ .optional()
227
+ .transform((value) => value === undefined
228
+ ? undefined
229
+ : [
230
+ ...new Set(value
231
+ .split(',')
232
+ .map((id) => id.trim())
233
+ .filter(Boolean)),
234
+ ])
235
+ .pipe(z.array(z.string().max(64)).max(ISSUE_IDS_MAX).optional())
236
+ .meta({
237
+ description: `Only these issues, comma-separated ids, at most ${ISSUE_IDS_MAX}; the other filters still apply.`,
238
+ }),
239
+ involvesUserId: text.meta({
240
+ description: 'Owned by this user or executed by them as a person, each issue once.',
241
+ }),
242
+ statusKey: text.describe('Filter by issue status key.'),
243
+ projectId: text.describe('The project identifier.'),
244
+ ownerUserId: text.describe('The owner user identifier.'),
245
+ executorId: text.describe('The executor identifier.'),
246
+ labelId: text.describe('The label identifier.'),
177
247
  /** An issue id, or `none` for top-level issues only. */
178
- parentIssueId: text,
179
- q: text,
180
- deleted: boolean,
181
- orderBy,
248
+ parentIssueId: text.describe('The parent issue identifier.'),
249
+ q: text.describe('Text to search for.'),
250
+ deleted: boolean.describe('Whether to include deleted records.'),
251
+ orderBy: orderBy.describe('The field and direction to sort by.'),
182
252
  };
183
253
  function issueQueryOf(input) {
184
254
  const { deleted, orderBy: order, ...filters } = input;
@@ -190,7 +260,11 @@ function issueQueryOf(input) {
190
260
  }
191
261
  /** `GET /projects/issues`: a cursor-paged list. */
192
262
  export const IssueListQuerySchema = z
193
- .object({ ...issueFilters, pageSize: pageSize(), pageToken })
263
+ .object({
264
+ ...issueFilters,
265
+ pageSize: pageSize().describe('The maximum number of records to return.'),
266
+ pageToken: pageToken.describe('The continuation token returned by the previous page.'),
267
+ })
194
268
  .transform(({ pageSize: limit, pageToken: cursor, ...filters }) => ({
195
269
  ...issueQueryOf(filters),
196
270
  limit,
@@ -198,68 +272,129 @@ export const IssueListQuerySchema = z
198
272
  }));
199
273
  /** `GET /projects/issues/board`: the list's filters; `pageSize` issues per column. */
200
274
  export const IssueBoardQuery = z
201
- .object({ ...issueFilters, pageSize: pageSize() })
275
+ .object({
276
+ ...issueFilters,
277
+ pageSize: pageSize().describe('The maximum number of records to return.'),
278
+ })
202
279
  .transform(({ pageSize: limit, ...filters }) => ({
203
280
  ...issueQueryOf(filters),
204
281
  limit,
205
282
  }));
206
283
  export const ProjectFilterQuery = z
207
- .object({ projectId: text })
284
+ .object({ projectId: text.describe('The project identifier.') })
208
285
  .transform(({ projectId }) => ({ projectId: projectId ?? null }));
209
286
  /** Older activities or comment threads of an issue. */
210
287
  export const CursorPageQuery = z
211
- .object({ pageSize: pageSize(), pageToken })
288
+ .object({
289
+ pageSize: pageSize().describe('The maximum number of records to return.'),
290
+ pageToken: pageToken.describe('The continuation token returned by the previous page.'),
291
+ })
212
292
  .transform(({ pageSize: limit, pageToken: cursor }) => ({
213
293
  limit,
214
294
  ...(cursor ? { cursor } : {}),
215
295
  }));
296
+ /** An issue's comment threads, optionally only what was written after a time. */
297
+ export const CommentThreadsQuery = z
298
+ .object({
299
+ pageSize: pageSize().describe('The maximum number of records to return.'),
300
+ pageToken: pageToken.describe('The continuation token returned by the previous page.'),
301
+ since: z.iso.datetime({ offset: true }).optional().meta({
302
+ description: 'RFC 3339. Only threads with a comment written after it, each with its root and only the replies written after it.',
303
+ }),
304
+ })
305
+ .transform(({ pageSize: limit, pageToken: cursor, since }) => ({
306
+ limit,
307
+ ...(cursor ? { cursor } : {}),
308
+ ...(since ? { since } : {}),
309
+ }));
216
310
  const issueFields = {
217
- description: z.string().optional(),
218
- statusKey: z.string().optional(),
219
- priority: priority.optional(),
220
- ownerUserId: id.optional(),
221
- executor: executor.optional(),
222
- parentIssueId: id.nullable().optional(),
223
- stage: z.number().int().nullable().optional(),
224
- projectId: id.nullable().optional(),
225
- startDate: date.optional(),
226
- dueDate: date.optional(),
227
- labelIds: z.array(id).optional(),
228
- start: z.boolean().optional(),
311
+ description: z.string().optional().describe('A description of the record.'),
312
+ statusKey: z.string().optional().describe('Filter by issue status key.'),
313
+ priority: priority.optional().describe('The priority to assign.'),
314
+ ownerUserId: id.optional().describe('The owner user identifier.'),
315
+ executor: executor
316
+ .optional()
317
+ .describe('The executor identity, with type and id; null clears it.'),
318
+ parentIssueId: id
319
+ .nullable()
320
+ .optional()
321
+ .describe('The parent issue identifier.'),
322
+ stage: z
323
+ .number()
324
+ .int()
325
+ .nullable()
326
+ .optional()
327
+ .describe('The workflow stage to assign.'),
328
+ projectId: id.nullable().optional().describe('The project identifier.'),
329
+ startDate: date.optional().describe('The planned start date.'),
330
+ dueDate: date.optional().describe('The planned due date.'),
331
+ labelIds: z.array(id).optional().describe('Label identifiers to assign.'),
332
+ start: z.boolean().optional().describe('Start work after saving the issue.'),
229
333
  };
230
334
  export const CreateIssueBody = z.strictObject({
231
- title: z.string(),
335
+ title: z.string().describe('The display title.'),
336
+ attachmentIds: z.array(id).optional().meta({
337
+ description: "The caller's unattached uploads; requires attachment upload permission. Bound before work starts.",
338
+ }),
232
339
  ...issueFields,
233
- blockedBy: z.array(id).optional(),
234
- projectSetup: z.boolean().optional(),
340
+ start: z
341
+ .boolean()
342
+ .optional()
343
+ .describe('Start work after saving. Requires --status in_progress (statusKey: in_progress in JSON); explicit true with backlog or no status is rejected before saving.'),
344
+ blockedBy: z
345
+ .array(id)
346
+ .optional()
347
+ .describe('Identifiers of issues that must finish first.'),
348
+ projectSetup: z
349
+ .boolean()
350
+ .optional()
351
+ .describe('Project setup to create when starting this issue.'),
235
352
  });
236
353
  export const UpdateIssueBody = z.strictObject({
354
+ needsYou: z.string().nullable().optional().meta({
355
+ description: 'Optional decision or input for the owner. Omit to retain; null or whitespace clears it. Cleared outside blocked or in_review. Studio requires nonblank input only for authenticated project-manager direct status updates.',
356
+ }),
357
+ next: z.string().nullable().optional().meta({
358
+ description: 'The next step. Omit to retain; null or whitespace clears it. Terminal statuses clear it.',
359
+ }),
360
+ acceptance: z.string().nullable().optional().meta({
361
+ description: "The issue's delivery report, Markdown: how it was, the agreed approach, what changed, how it was checked, open issues and details, ending with the acceptance criteria the owner checks and where. Kept across status changes; the next delivery replaces it. Omit to retain; null or whitespace clears it.",
362
+ }),
237
363
  revision: z.number().int().optional().meta({
238
364
  description: 'The revision the change is based on; left out, the change applies to the issue as it is now.',
239
365
  }),
240
- title: z.string().optional(),
366
+ title: z.string().optional().describe('The display title.'),
241
367
  ...issueFields,
242
368
  });
243
- export const UpdateChecklistItemBody = z.strictObject({ checked: z.boolean() });
244
369
  export const AddDependencyBody = z.strictObject({
245
- dependsOnIssueId: id,
370
+ dependsOnIssueId: id.describe('The depends on issue identifier.'),
246
371
  type: z
247
372
  .enum(DEPENDENCY_TYPES)
248
- .optional(),
373
+ .optional()
374
+ .describe('The type of relationship or record.'),
249
375
  });
250
376
  /** `POST /projects/issues/{issueId}/removeDependency`: the link to another issue, by that issue and the type. */
251
377
  export const RemoveDependencyBody = AddDependencyBody;
252
- // Comments and approvals
378
+ export const UpdateDependencyBody = z.strictObject({
379
+ type: z
380
+ .enum(['blockedBy', 'relatedTo'])
381
+ .describe('The type of relationship or record.'),
382
+ expectedType: z.enum(['blockedBy', 'relatedTo']).meta({
383
+ description: 'The relationship type the caller read; a stale value is a conflict.',
384
+ }),
385
+ });
386
+ // Comments
253
387
  export const CreateCommentBody = z.strictObject({
254
- content: z.string(),
255
- parentId: id.nullable().optional(),
388
+ content: z.string().describe('The Markdown content.'),
389
+ parentId: id.nullable().optional().describe('The parent identifier.'),
256
390
  attachmentIds: z.array(id).optional(),
257
391
  });
258
- export const UpdateCommentBody = z.strictObject({ content: z.string() });
392
+ export const UpdateCommentBody = z.strictObject({ content: z.string().describe('The Markdown content.') });
259
393
  export const ReactionBody = z.strictObject({
260
- emoji: z.enum(REACTION_EMOJIS),
394
+ emoji: z
395
+ .enum(REACTION_EMOJIS)
396
+ .describe('The emoji reaction to add or remove.'),
261
397
  });
262
- export const DecideApprovalBody = z.strictObject({ comment: z.string().optional() });
263
398
  // Plans and intake
264
399
  /** A row's `params` are checked per operation by the plan engine, which reports each row's problems (`PLAN_INVALID`). */
265
400
  const planRow = z
@@ -269,15 +404,17 @@ const planRow = z
269
404
  description: 'A row shaped as `ProjectsPlanRowInput`: `{ op, params, ref? }`, `op` one of `issue.create`, `issue.update`, `comment.create`, `dependency` and `project.create`.',
270
405
  });
271
406
  const planBody = z.strictObject({
272
- title: z.string(),
273
- description: z.string().optional(),
274
- source: z.strictObject({
407
+ title: z.string().describe('The display title.'),
408
+ description: z.string().optional().describe('A description of the record.'),
409
+ source: z
410
+ .strictObject({
275
411
  kind: z.string().min(1),
276
412
  key: z.string().nullable().optional(),
277
413
  issueId: id.nullable().optional(),
278
414
  // Opaque JSON the proposer gets back untouched (`PlanSource.data`).
279
415
  data: z.unknown().optional(),
280
- }),
416
+ })
417
+ .describe('The source context associated with this record.'),
281
418
  proposer: z
282
419
  .strictObject({
283
420
  agentId: id,
@@ -286,36 +423,52 @@ const planBody = z.strictObject({
286
423
  })
287
424
  .nullable()
288
425
  .optional(),
289
- deciderUserId: id.optional(),
290
- rows: z.array(planRow),
426
+ deciderUserId: id.optional().describe('The decider user identifier.'),
427
+ rows: z
428
+ .array(planRow)
429
+ .describe('The operations in the plan, in execution order.'),
291
430
  });
292
431
  export const CreatePlanBody = planBody;
293
432
  export const EditPlanBody = z.strictObject({
294
- revision: z.number().int(),
295
- title: z.string().optional(),
296
- description: z.string().optional(),
297
- rows: z.array(z.strictObject({
433
+ revision: z
434
+ .number()
435
+ .int()
436
+ .describe('The revision last read; reject if the record has changed.'),
437
+ title: z.string().optional().describe('The display title.'),
438
+ description: z.string().optional().describe('A description of the record.'),
439
+ rows: z
440
+ .array(z.strictObject({
298
441
  id,
299
442
  // Replaces the row's params, checked by the plan engine as on creation.
300
443
  params: z.unknown().optional(),
301
444
  remove: z.boolean().optional(),
302
- })),
445
+ }))
446
+ .describe('The operations in the plan, in execution order.'),
303
447
  });
304
448
  export const PlanActionBody = z.strictObject({
305
- revision: z.number().int(),
449
+ revision: z
450
+ .number()
451
+ .int()
452
+ .describe('The revision last read; reject if the record has changed.'),
306
453
  });
307
454
  export const PlanUndoBody = z.strictObject({
308
- dryRun: z.boolean().optional(),
455
+ dryRun: z
456
+ .boolean()
457
+ .optional()
458
+ .describe('Preview the changes without applying them.'),
309
459
  });
310
460
  /** `GET /projects/plans`: a cursor-paged list, newest first. */
311
461
  export const PlanListQuerySchema = z
312
462
  .object({
313
- status: z.enum(['open', ...PLAN_STATUSES]).optional(),
314
- sourceKind: text,
315
- sourceKey: text,
316
- issueId: text,
317
- pageSize: pageSize(50),
318
- pageToken,
463
+ status: z
464
+ .enum(['open', ...PLAN_STATUSES])
465
+ .optional()
466
+ .describe('The status to set or filter by.'),
467
+ sourceKind: text.describe('The kind of source to filter by.'),
468
+ sourceKey: text.describe('The source identifier to filter by.'),
469
+ issueId: text.describe('The issue identifier.'),
470
+ pageSize: pageSize(50).describe('The maximum number of records to return.'),
471
+ pageToken: pageToken.describe('The continuation token returned by the previous page.'),
319
472
  })
320
473
  .transform(({ pageSize: limit, pageToken: cursor, ...filters }) => ({
321
474
  ...Object.fromEntries(Object.entries(filters).filter(([, value]) => value !== undefined)),
@@ -323,21 +476,24 @@ export const PlanListQuerySchema = z
323
476
  ...(cursor ? { cursor } : {}),
324
477
  }));
325
478
  export const IntakeSplitBody = z.strictObject({
326
- text: z.string().optional(),
479
+ text: z.string().optional().describe('The source text to process.'),
327
480
  fileIds: z.array(id).optional(),
328
- projectId: id.nullable().optional(),
481
+ projectId: id.nullable().optional().describe('The project identifier.'),
329
482
  });
330
483
  export const IntakeTextsBody = z.strictObject({
331
484
  fileIds: z.array(id),
332
485
  });
333
486
  export const IntakeAiStartBody = z.strictObject({
334
- mode: z.enum(INTAKE_AI_MODES),
335
- text: z.string().optional(),
487
+ mode: z.enum(INTAKE_AI_MODES).describe('The processing mode to use.'),
488
+ text: z.string().optional().describe('The source text to process.'),
336
489
  fileIds: z.array(id).optional(),
337
- projectId: id.nullable().optional(),
338
- planId: id.nullable().optional(),
339
- instruction: z.string().optional(),
340
- issueId: id.optional(),
490
+ projectId: id.nullable().optional().describe('The project identifier.'),
491
+ planId: id.nullable().optional().describe('The plan identifier.'),
492
+ instruction: z
493
+ .string()
494
+ .optional()
495
+ .describe('Instructions for organizing the source text.'),
496
+ issueId: id.optional().describe('The issue identifier.'),
341
497
  });
342
498
  export const IssueAttachmentsQuery = z.object({
343
499
  comments: z.enum(['true', 'false']).optional().meta({
@@ -421,6 +577,9 @@ export const ExecutorCandidateSchema = z.object({
421
577
  nameText: NameTextSchema.optional(),
422
578
  online: z.boolean().optional(),
423
579
  busy: z.number().int().optional(),
580
+ isDefault: z.boolean().optional().meta({
581
+ description: 'A new issue gets this executor when it names none, so a form preselects it.',
582
+ }),
424
583
  });
425
584
  export const MentionCandidateSchema = z.object({
426
585
  kind: z.string(),
@@ -450,13 +609,18 @@ export const InvitationSchema = z.object({
450
609
  sentAt: dateTime.nullable(),
451
610
  createdAt: dateTime,
452
611
  });
612
+ export const ResendInvitationQuery = z.object({
613
+ sendEmail: z.enum(['true', 'false']).optional().meta({
614
+ description: 'Defaults to true. Set false to generate a new link without sending email. The previous link stops working.',
615
+ }),
616
+ });
453
617
  export const InvitationResultSchema = z
454
618
  .object({
455
619
  email: z.string(),
456
620
  outcome: z.enum(['invited', 'added', 'alreadyMember']),
457
621
  emailSent: z.boolean().optional(),
458
622
  inviteUrl: z.string().optional().meta({
459
- description: 'When sending failed, the link, once, for the inviter to forward.',
623
+ description: 'The new shareable invitation link, returned to an authorized original inviter using an unscoped person credential, regardless of email delivery.',
460
624
  }),
461
625
  })
462
626
  .meta({ ref: 'ProjectsInvitationResult' });
@@ -464,128 +628,33 @@ export const InvitationResultsSchema = z.object({ results: z.array(InvitationRes
464
628
  export const WorkspaceSettingsSchema = z.object({
465
629
  issuePrefix: z.string(),
466
630
  });
467
- // Workflows
468
- const ruleMessage = z
469
- .union([
470
- z.string(),
471
- z.object({
472
- key: z.string(),
473
- ns: z.string().optional(),
474
- defaultValue: z.string().optional(),
475
- }),
476
- ])
477
- .meta({
478
- ref: 'ProjectsRuleMessage',
479
- description: 'Plain text, or an i18n key with its namespace and default.',
480
- });
481
- const statusRule = z
482
- .object({
483
- type: z.string(),
484
- config: record.optional(),
485
- })
486
- .meta({
487
- ref: 'ProjectsWorkflowStatusRule',
488
- description: 'What entering a status does. Built in: `checklist` (`config.items`: `{ key, label, required }[]`), `notifyOwner` (`config.message`), `subtasksDone`, `blockersDone` and `startOption` (`config.label`, `config.hint`); other plugins contribute their own types.',
489
- });
490
- const WorkflowDefinitionSchema = z
491
- .object({
492
- states: z.array(z.object({
493
- key: z.string(),
494
- name: z.string(),
495
- category: statusCategory,
496
- color,
497
- builtIn: z.boolean().optional(),
498
- rules: z.array(statusRule).optional(),
499
- })),
500
- transitions: z.array(z.object({
501
- from: z.string().meta({ description: 'A status key, or `*`.' }),
502
- to: z.string().meta({ description: 'A status key, or `*`.' }),
503
- actors: z.array(z.string()),
504
- approval: z
505
- .object({
506
- approvers: z.array(z.enum(['owner', 'projectLead', 'admin'])),
507
- })
508
- .optional(),
509
- on: z.string().optional().meta({
510
- description: 'An event the system takes the transition on, such as `subtasks.done`.',
511
- }),
512
- })),
513
- })
514
- .meta({ ref: 'ProjectsWorkflowDefinition' });
515
- export const WorkflowSchema = z
631
+ // Attachments and comments
632
+ export const IssueScreenshotSchema = z
516
633
  .object({
517
634
  id: z.string(),
518
- name: z.string(),
519
- description: z.string().nullable(),
520
- isDefault: z.boolean(),
521
- builtInKey: z.string().nullable(),
522
- definition: WorkflowDefinitionSchema,
523
- revision: z.number().int(),
524
- createdAt: dateTime,
525
- updatedAt: dateTime,
526
- projectCount: z.number().int(),
527
- title: i18nKey.optional(),
528
- descriptionTitle: i18nKey.optional(),
635
+ filename: z.string(),
636
+ ext: z.string(),
637
+ mimeType: z.string(),
638
+ size: z.number().int(),
639
+ contentUrl: z.string(),
640
+ downloadUrl: z.string(),
641
+ comment: z.object({
642
+ id: z.string(),
643
+ createdAt: dateTime,
644
+ author: z.object({
645
+ type: z.string(),
646
+ id: z.string(),
647
+ name: z.string().nullable(),
648
+ }),
649
+ }),
529
650
  })
530
- .meta({ ref: 'ProjectsWorkflow' });
531
- export const WorkflowPreviewSchema = z.object({
532
- rules: z.array(z.object({
533
- statusKey: z.string(),
534
- change: z.enum(['added', 'removed']),
535
- rule: statusRule,
536
- available: z.boolean(),
537
- summary: z.string().nullable(),
538
- attention: z.boolean(),
539
- })),
540
- attention: z.array(z.object({
541
- statusKey: z.string(),
542
- rule: statusRule,
543
- summary: z.string(),
544
- isNew: z.boolean(),
545
- })),
651
+ .meta({ ref: 'ProjectsIssueScreenshot' });
652
+ export const IssueScreenshotsMeta = z.object({
653
+ limit: z.number().int(),
654
+ truncated: z.boolean().meta({
655
+ description: 'More images exist. All counts describe only the returned batch.',
656
+ }),
546
657
  });
547
- // Approvals and checklists
548
- export const ApprovalRequestSchema = z
549
- .object({
550
- id: z.string(),
551
- issueId: z.string(),
552
- issueIdentifier: z.string().nullable(),
553
- issueTitle: z.string().nullable(),
554
- fromStatus: z.string(),
555
- toStatus: z.string(),
556
- requestedByType: z.string(),
557
- requestedById: z.string(),
558
- requestedByName: z.string().nullable(),
559
- approvers: z.array(z.enum(['owner', 'projectLead', 'admin'])),
560
- approverUserIds: z.array(z.string()),
561
- approverNames: z.array(z.string()),
562
- status: z.enum(['pending', 'approved', 'rejected', 'withdrawn', 'stale']),
563
- decidedById: z.string().nullable(),
564
- decidedByName: z.string().nullable(),
565
- decidedAt: dateTime.nullable(),
566
- comment: z.string().nullable(),
567
- createdAt: dateTime,
568
- updatedAt: dateTime,
569
- })
570
- .meta({ ref: 'ProjectsApprovalRequest' });
571
- export const IssueChecklistSchema = z
572
- .object({
573
- statusKey: z.string(),
574
- current: z.boolean(),
575
- complete: z.boolean(),
576
- items: z.array(z.object({
577
- itemKey: z.string(),
578
- label: z.string(),
579
- required: z.boolean(),
580
- checked: z.boolean(),
581
- checkedByType: z.string().nullable(),
582
- checkedById: z.string().nullable(),
583
- checkedByName: z.string().nullable(),
584
- checkedAt: dateTime.nullable(),
585
- })),
586
- })
587
- .meta({ ref: 'ProjectsIssueChecklist' });
588
- // Attachments and comments
589
658
  export const AttachmentSchema = z
590
659
  .object({
591
660
  id: z.string(),
@@ -620,6 +689,36 @@ const MentionRefSchema = z.object({
620
689
  kind: z.string(),
621
690
  id: z.string(),
622
691
  });
692
+ const ActivityExecutionSchema = z
693
+ .object({
694
+ attempt: z.number().int(),
695
+ runnerId: z.string(),
696
+ runnerName: z.string().nullable().optional(),
697
+ runnerOwnerUserId: z.string().nullable().optional(),
698
+ runnerOwnerName: z.string().nullable().optional(),
699
+ runnerTrust: z.enum(['team', 'ownerOnly']).nullable().optional(),
700
+ machineHidden: z.boolean().optional(),
701
+ tool: z.string().nullable().optional(),
702
+ toolVersion: z.string().nullable().optional(),
703
+ model: z.string().nullable().optional(),
704
+ actualModels: z.array(z.string()).optional(),
705
+ effort: z.string().nullable().optional(),
706
+ actualEffort: z.string().nullable().optional(),
707
+ actualEffortSource: z.string().nullable().optional(),
708
+ actualEffortAt: dateTime.nullable().optional(),
709
+ })
710
+ .meta({ ref: 'ProjectsActivityExecution' });
711
+ const ActivityViaSchema = z
712
+ .object({
713
+ type: z.enum(['cli', 'api_key', 'agent', 'plan']),
714
+ agentId: z.string().optional(),
715
+ agentName: z.string().nullable().optional(),
716
+ runId: z.string().optional(),
717
+ execution: ActivityExecutionSchema.optional(),
718
+ conversationId: z.string().optional(),
719
+ planId: z.string().optional(),
720
+ })
721
+ .meta({ ref: 'ProjectsActivityVia' });
623
722
  export const IssueCommentSchema = z
624
723
  .object({
625
724
  id: z.string(),
@@ -633,6 +732,7 @@ export const IssueCommentSchema = z
633
732
  parentId: z.string().nullable(),
634
733
  rootId: z.string(),
635
734
  via: z.enum(['cli', 'api_key', 'agent']).nullable(),
735
+ source: ActivityViaSchema.nullable().optional(),
636
736
  createdAt: dateTime,
637
737
  editedAt: dateTime.nullable(),
638
738
  deleted: z.boolean(),
@@ -667,16 +767,6 @@ export const SubscriptionStateSchema = z.object({
667
767
  subscribed: z.boolean(),
668
768
  });
669
769
  // Issues
670
- const ActivityViaSchema = z
671
- .object({
672
- type: z.enum(['cli', 'api_key', 'agent', 'plan']),
673
- agentId: z.string().optional(),
674
- agentName: z.string().nullable().optional(),
675
- runId: z.string().optional(),
676
- conversationId: z.string().optional(),
677
- planId: z.string().optional(),
678
- })
679
- .meta({ ref: 'ProjectsActivityVia' });
680
770
  export const ActivitySchema = z
681
771
  .object({
682
772
  id: z.string(),
@@ -694,10 +784,19 @@ const issueShape = {
694
784
  number: z.number().int(),
695
785
  identifier: z
696
786
  .string()
697
- .meta({ description: '`PREFIX-number`, such as `PM-12`.' }),
787
+ .meta({ description: '`PREFIX-number`, such as `PM-1`.' }),
698
788
  title: z.string(),
699
789
  description: z.string().meta({ description: 'Markdown.' }),
700
790
  statusKey: z.string(),
791
+ needsYou: z.string().nullable().meta({
792
+ description: 'The decision or input required from the owner; null outside Blocked and In review, or on historical issues.',
793
+ }),
794
+ acceptance: z.string().nullable().meta({
795
+ description: "The issue's delivery report, Markdown, ending with the acceptance criteria; kept across status changes until the next delivery replaces it, null when none was written.",
796
+ }),
797
+ next: z.string().nullable().meta({
798
+ description: 'The next step; null when none is recorded or the issue is Done or Cancelled.',
799
+ }),
701
800
  priority: z.enum(PRIORITIES),
702
801
  ownerUserId: z.string(),
703
802
  executor: ExecutorSchema.nullable(),
@@ -747,6 +846,7 @@ export const IssueDependencySchema = z
747
846
  })
748
847
  .meta({ ref: 'ProjectsIssueDependency' });
749
848
  export const IssueDetailSchema = z.object({
849
+ progress: z.record(z.string(), z.unknown()).nullable().optional(),
750
850
  ...issueListItemShape,
751
851
  parent: z
752
852
  .object({ id: z.string(), identifier: z.string(), title: z.string() })
@@ -762,9 +862,6 @@ export const IssueDetailSchema = z.object({
762
862
  reason: z.enum(SUBSCRIPTION_REASONS),
763
863
  })),
764
864
  attachments: z.array(AttachmentSchema),
765
- checklist: IssueChecklistSchema.nullable(),
766
- pendingApproval: ApprovalRequestSchema.nullable(),
767
- recentApprovals: z.array(ApprovalRequestSchema),
768
865
  subtasks: z.array(z.object({
769
866
  id: z.string(),
770
867
  identifier: z.string(),
@@ -790,9 +887,6 @@ export const IssueDetailSchema = z.object({
790
887
  });
791
888
  export const UpdateIssueResultSchema = z.object({
792
889
  issue: IssueSchema,
793
- pendingApproval: ApprovalRequestSchema.nullable().meta({
794
- description: 'With 202: the request holding the status change for approval; the issue is unchanged.',
795
- }),
796
890
  });
797
891
  export const IssueBoardSchema = z.object({
798
892
  columns: z.array(z.object({
@@ -803,14 +897,6 @@ export const IssueBoardSchema = z.object({
803
897
  }),
804
898
  })),
805
899
  });
806
- export const IssueStartsSchema = z.object({
807
- initialStatus: z.string(),
808
- options: z.array(z.object({
809
- status: StatusDefinitionSchema,
810
- label: ruleMessage.nullable(),
811
- hint: ruleMessage.nullable(),
812
- })),
813
- });
814
900
  // Projects
815
901
  const projectShape = {
816
902
  id: z.string(),
@@ -822,7 +908,6 @@ const projectShape = {
822
908
  leadUserId: z.string().nullable(),
823
909
  startDate: day.nullable(),
824
910
  dueDate: day.nullable(),
825
- workflowId: z.string().nullable(),
826
911
  setupIssueId: z.string().nullable(),
827
912
  createdAt: dateTime,
828
913
  updatedAt: dateTime,
@@ -895,7 +980,10 @@ const PlanRowInputSchema = z
895
980
  .discriminatedUnion('op', [
896
981
  z.object({
897
982
  op: z.literal('issue.create'),
898
- ref: z.string().optional(),
983
+ ref: z
984
+ .string()
985
+ .optional()
986
+ .describe('A local reference name for this plan row.'),
899
987
  params: z.object({
900
988
  title: z.string(),
901
989
  ...issueFieldChanges,
@@ -905,16 +993,27 @@ const PlanRowInputSchema = z
905
993
  }),
906
994
  z.object({
907
995
  op: z.literal('issue.update'),
908
- ref: z.string().optional(),
996
+ ref: z
997
+ .string()
998
+ .optional()
999
+ .describe('A local reference name for this plan row.'),
909
1000
  params: z.object({
910
1001
  issue: issueTarget,
911
- set: z.object({ title: z.string().optional(), ...issueFieldChanges }),
1002
+ set: z.object({
1003
+ title: z.string().optional(),
1004
+ ...issueFieldChanges,
1005
+ needsYou: z.string().nullable().optional(),
1006
+ next: z.string().nullable().optional(),
1007
+ }),
912
1008
  start: z.boolean().optional(),
913
1009
  }),
914
1010
  }),
915
1011
  z.object({
916
1012
  op: z.literal('comment.create'),
917
- ref: z.string().optional(),
1013
+ ref: z
1014
+ .string()
1015
+ .optional()
1016
+ .describe('A local reference name for this plan row.'),
918
1017
  params: z.object({
919
1018
  issue: issueTarget,
920
1019
  content: z.string(),
@@ -924,7 +1023,10 @@ const PlanRowInputSchema = z
924
1023
  }),
925
1024
  z.object({
926
1025
  op: z.literal('dependency'),
927
- ref: z.string().optional(),
1026
+ ref: z
1027
+ .string()
1028
+ .optional()
1029
+ .describe('A local reference name for this plan row.'),
928
1030
  params: z.object({
929
1031
  action: z.enum(['add', 'remove']),
930
1032
  issue: issueTarget,
@@ -934,7 +1036,10 @@ const PlanRowInputSchema = z
934
1036
  }),
935
1037
  z.object({
936
1038
  op: z.literal('project.create'),
937
- ref: z.string().optional(),
1039
+ ref: z
1040
+ .string()
1041
+ .optional()
1042
+ .describe('A local reference name for this plan row.'),
938
1043
  params: z.object({
939
1044
  name: z.string(),
940
1045
  description: z.string().nullable().optional(),
@@ -943,7 +1048,6 @@ const PlanRowInputSchema = z
943
1048
  leadUserId: z.string().nullable().optional(),
944
1049
  startDate: z.string().nullable().optional(),
945
1050
  dueDate: z.string().nullable().optional(),
946
- workflowId: z.string().nullable().optional(),
947
1051
  }),
948
1052
  }),
949
1053
  ])
@@ -1155,6 +1259,10 @@ export const IntakeAiJobSchema = z
1155
1259
  phase: z.enum(['queued', 'working']),
1156
1260
  by: z.string().nullable(),
1157
1261
  waitReason: z.string().nullable(),
1262
+ waitParams: z
1263
+ .record(z.string(), z.union([z.string(), z.number(), z.array(z.string())]))
1264
+ .nullable()
1265
+ .optional(),
1158
1266
  activity: z.string().nullable(),
1159
1267
  since: dateTime.nullable(),
1160
1268
  })
@@ -1172,10 +1280,18 @@ export const singleFileBody = {
1172
1280
  type: 'object',
1173
1281
  required: ['file'],
1174
1282
  properties: {
1175
- file: { type: 'string', format: 'binary' },
1283
+ file: {
1284
+ type: 'string',
1285
+ format: 'binary',
1286
+ description: 'The file to upload.',
1287
+ },
1176
1288
  },
1177
1289
  },
1178
1290
  },
1179
1291
  },
1180
1292
  };
1293
+ /** Context supplied by the session bridge, never an authentication credential. */
1294
+ export const IssueSessionHeader = z.object({
1295
+ 'x-nb-agent-session': z.string().min(1).max(200).optional(),
1296
+ });
1181
1297
  //# sourceMappingURL=schemas.js.map