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

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 (655) hide show
  1. package/CHANGELOG.md +266 -0
  2. package/README.md +77 -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 +7 -7
  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/comments/comment.queries.d.ts +42 -8
  206. package/dist/server/domains/comments/comment.queries.d.ts.map +1 -1
  207. package/dist/server/domains/comments/comment.queries.js +69 -8
  208. package/dist/server/domains/comments/comment.queries.js.map +1 -1
  209. package/dist/server/domains/comments/comment.routes.d.ts +1 -1
  210. package/dist/server/domains/comments/comment.routes.js +4 -4
  211. package/dist/server/domains/comments/comment.routes.js.map +1 -1
  212. package/dist/server/domains/comments/comment.service.d.ts +2 -2
  213. package/dist/server/domains/comments/comment.service.d.ts.map +1 -1
  214. package/dist/server/domains/comments/comment.service.js +18 -10
  215. package/dist/server/domains/comments/comment.service.js.map +1 -1
  216. package/dist/server/domains/comments/comment.store.d.ts +22 -1
  217. package/dist/server/domains/comments/comment.store.d.ts.map +1 -1
  218. package/dist/server/domains/comments/comment.store.js +65 -2
  219. package/dist/server/domains/comments/comment.store.js.map +1 -1
  220. package/dist/server/domains/comments/index.d.ts +1 -1
  221. package/dist/server/domains/comments/index.d.ts.map +1 -1
  222. package/dist/server/domains/comments/index.js.map +1 -1
  223. package/dist/server/domains/comments/ports.d.ts +7 -2
  224. package/dist/server/domains/comments/ports.d.ts.map +1 -1
  225. package/dist/server/domains/invitations/invitation.routes.d.ts +2 -1
  226. package/dist/server/domains/invitations/invitation.routes.d.ts.map +1 -1
  227. package/dist/server/domains/invitations/invitation.routes.js +27 -10
  228. package/dist/server/domains/invitations/invitation.routes.js.map +1 -1
  229. package/dist/server/domains/invitations/invitation.service.d.ts +1 -1
  230. package/dist/server/domains/invitations/invitation.service.d.ts.map +1 -1
  231. package/dist/server/domains/invitations/invitation.service.js +19 -3
  232. package/dist/server/domains/invitations/invitation.service.js.map +1 -1
  233. package/dist/server/domains/issues/index.d.ts +3 -3
  234. package/dist/server/domains/issues/index.d.ts.map +1 -1
  235. package/dist/server/domains/issues/index.js +2 -2
  236. package/dist/server/domains/issues/index.js.map +1 -1
  237. package/dist/server/domains/issues/issue.context.d.ts +6 -22
  238. package/dist/server/domains/issues/issue.context.d.ts.map +1 -1
  239. package/dist/server/domains/issues/issue.context.js +88 -105
  240. package/dist/server/domains/issues/issue.context.js.map +1 -1
  241. package/dist/server/domains/issues/issue.events.d.ts +5 -1
  242. package/dist/server/domains/issues/issue.events.d.ts.map +1 -1
  243. package/dist/server/domains/issues/issue.fields.d.ts +5 -3
  244. package/dist/server/domains/issues/issue.fields.d.ts.map +1 -1
  245. package/dist/server/domains/issues/issue.fields.js +50 -16
  246. package/dist/server/domains/issues/issue.fields.js.map +1 -1
  247. package/dist/server/domains/issues/issue.projects.d.ts +2 -2
  248. package/dist/server/domains/issues/issue.projects.d.ts.map +1 -1
  249. package/dist/server/domains/issues/issue.projects.js +1 -2
  250. package/dist/server/domains/issues/issue.projects.js.map +1 -1
  251. package/dist/server/domains/issues/issue.queries.d.ts +26 -7
  252. package/dist/server/domains/issues/issue.queries.d.ts.map +1 -1
  253. package/dist/server/domains/issues/issue.queries.js +137 -58
  254. package/dist/server/domains/issues/issue.queries.js.map +1 -1
  255. package/dist/server/domains/issues/issue.routes.d.ts +3 -1
  256. package/dist/server/domains/issues/issue.routes.d.ts.map +1 -1
  257. package/dist/server/domains/issues/issue.routes.js +74 -46
  258. package/dist/server/domains/issues/issue.routes.js.map +1 -1
  259. package/dist/server/domains/issues/issue.service.d.ts +22 -44
  260. package/dist/server/domains/issues/issue.service.d.ts.map +1 -1
  261. package/dist/server/domains/issues/issue.service.js +68 -82
  262. package/dist/server/domains/issues/issue.service.js.map +1 -1
  263. package/dist/server/domains/issues/issue.status.d.ts +7 -10
  264. package/dist/server/domains/issues/issue.status.d.ts.map +1 -1
  265. package/dist/server/domains/issues/issue.status.js +6 -22
  266. package/dist/server/domains/issues/issue.status.js.map +1 -1
  267. package/dist/server/domains/issues/issue.store.d.ts +11 -0
  268. package/dist/server/domains/issues/issue.store.d.ts.map +1 -1
  269. package/dist/server/domains/issues/issue.store.js +37 -0
  270. package/dist/server/domains/issues/issue.store.js.map +1 -1
  271. package/dist/server/domains/issues/ports.d.ts +35 -36
  272. package/dist/server/domains/issues/ports.d.ts.map +1 -1
  273. package/dist/server/domains/issues/ports.js +1 -5
  274. package/dist/server/domains/issues/ports.js.map +1 -1
  275. package/dist/server/domains/notices/notice.planner.d.ts +2 -1
  276. package/dist/server/domains/notices/notice.planner.d.ts.map +1 -1
  277. package/dist/server/domains/notices/notice.planner.js +2 -1
  278. package/dist/server/domains/notices/notice.planner.js.map +1 -1
  279. package/dist/server/domains/notices/notice.rules.d.ts +1 -4
  280. package/dist/server/domains/notices/notice.rules.d.ts.map +1 -1
  281. package/dist/server/domains/notices/notice.rules.js +4 -5
  282. package/dist/server/domains/notices/notice.rules.js.map +1 -1
  283. package/dist/server/domains/plans/intake/intake.service.d.ts +2 -0
  284. package/dist/server/domains/plans/intake/intake.service.d.ts.map +1 -1
  285. package/dist/server/domains/plans/intake/intake.service.js +14 -0
  286. package/dist/server/domains/plans/intake/intake.service.js.map +1 -1
  287. package/dist/server/domains/plans/intake/intake.text.d.ts +5 -6
  288. package/dist/server/domains/plans/intake/intake.text.d.ts.map +1 -1
  289. package/dist/server/domains/plans/intake/intake.text.js +5 -6
  290. package/dist/server/domains/plans/intake/intake.text.js.map +1 -1
  291. package/dist/server/domains/plans/plan.engine.d.ts.map +1 -1
  292. package/dist/server/domains/plans/plan.engine.js +6 -0
  293. package/dist/server/domains/plans/plan.engine.js.map +1 -1
  294. package/dist/server/domains/plans/plan.ops.d.ts +3 -3
  295. package/dist/server/domains/plans/plan.ops.d.ts.map +1 -1
  296. package/dist/server/domains/plans/plan.ops.js +23 -13
  297. package/dist/server/domains/plans/plan.ops.js.map +1 -1
  298. package/dist/server/domains/plans/plan.schemas.d.ts.map +1 -1
  299. package/dist/server/domains/plans/plan.schemas.js +26 -10
  300. package/dist/server/domains/plans/plan.schemas.js.map +1 -1
  301. package/dist/server/domains/projects/index.d.ts +1 -1
  302. package/dist/server/domains/projects/index.d.ts.map +1 -1
  303. package/dist/server/domains/projects/index.js.map +1 -1
  304. package/dist/server/domains/projects/project-resources.d.ts +5 -0
  305. package/dist/server/domains/projects/project-resources.d.ts.map +1 -1
  306. package/dist/server/domains/projects/project-resources.js +43 -1
  307. package/dist/server/domains/projects/project-resources.js.map +1 -1
  308. package/dist/server/domains/projects/project.events.d.ts +10 -0
  309. package/dist/server/domains/projects/project.events.d.ts.map +1 -0
  310. package/dist/server/domains/projects/project.events.js +2 -0
  311. package/dist/server/domains/projects/project.events.js.map +1 -0
  312. package/dist/server/domains/projects/project.routes.d.ts.map +1 -1
  313. package/dist/server/domains/projects/project.routes.js +1 -3
  314. package/dist/server/domains/projects/project.routes.js.map +1 -1
  315. package/dist/server/domains/projects/project.service.d.ts +1 -7
  316. package/dist/server/domains/projects/project.service.d.ts.map +1 -1
  317. package/dist/server/domains/projects/project.service.js +2 -17
  318. package/dist/server/domains/projects/project.service.js.map +1 -1
  319. package/dist/server/domains/projects/project.store.d.ts +0 -1
  320. package/dist/server/domains/projects/project.store.d.ts.map +1 -1
  321. package/dist/server/domains/projects/project.store.js +0 -1
  322. package/dist/server/domains/projects/project.store.js.map +1 -1
  323. package/dist/server/domains/reports/report.service.d.ts +1 -12
  324. package/dist/server/domains/reports/report.service.d.ts.map +1 -1
  325. package/dist/server/domains/reports/report.service.js +92 -136
  326. package/dist/server/domains/reports/report.service.js.map +1 -1
  327. package/dist/server/domains/settings/settings.store.d.ts +4 -4
  328. package/dist/server/domains/settings/settings.store.js +2 -2
  329. package/dist/server/domains/statuses/event-types.d.ts +16 -0
  330. package/dist/server/domains/statuses/event-types.d.ts.map +1 -0
  331. package/dist/server/domains/statuses/event-types.js +31 -0
  332. package/dist/server/domains/statuses/event-types.js.map +1 -0
  333. package/dist/server/domains/statuses/index.d.ts +4 -0
  334. package/dist/server/domains/statuses/index.d.ts.map +1 -0
  335. package/dist/server/domains/statuses/index.js +4 -0
  336. package/dist/server/domains/statuses/index.js.map +1 -0
  337. package/dist/server/domains/statuses/status.catalog.d.ts +15 -0
  338. package/dist/server/domains/statuses/status.catalog.d.ts.map +1 -0
  339. package/dist/server/domains/statuses/status.catalog.js +119 -0
  340. package/dist/server/domains/statuses/status.catalog.js.map +1 -0
  341. package/dist/server/domains/statuses/status.events.d.ts +15 -0
  342. package/dist/server/domains/statuses/status.events.d.ts.map +1 -0
  343. package/dist/server/domains/statuses/status.events.js +2 -0
  344. package/dist/server/domains/statuses/status.events.js.map +1 -0
  345. package/dist/server/domains/statuses/status.fire.d.ts +48 -0
  346. package/dist/server/domains/statuses/status.fire.d.ts.map +1 -0
  347. package/dist/server/domains/statuses/status.fire.js +38 -0
  348. package/dist/server/domains/statuses/status.fire.js.map +1 -0
  349. package/dist/server/domains/subscriptions/subscription.routes.d.ts.map +1 -1
  350. package/dist/server/domains/subscriptions/subscription.routes.js +4 -2
  351. package/dist/server/domains/subscriptions/subscription.routes.js.map +1 -1
  352. package/dist/server/domains/subtasks/index.d.ts +1 -0
  353. package/dist/server/domains/subtasks/index.d.ts.map +1 -1
  354. package/dist/server/domains/subtasks/index.js +1 -0
  355. package/dist/server/domains/subtasks/index.js.map +1 -1
  356. package/dist/server/domains/subtasks/subtask.blocking.d.ts +10 -5
  357. package/dist/server/domains/subtasks/subtask.blocking.d.ts.map +1 -1
  358. package/dist/server/domains/subtasks/subtask.blocking.js +35 -15
  359. package/dist/server/domains/subtasks/subtask.blocking.js.map +1 -1
  360. package/dist/server/domains/subtasks/subtask.guard.d.ts +12 -0
  361. package/dist/server/domains/subtasks/subtask.guard.d.ts.map +1 -0
  362. package/dist/server/domains/subtasks/subtask.guard.js +23 -0
  363. package/dist/server/domains/subtasks/subtask.guard.js.map +1 -0
  364. package/dist/server/domains/subtasks/subtask.release.d.ts +7 -11
  365. package/dist/server/domains/subtasks/subtask.release.d.ts.map +1 -1
  366. package/dist/server/domains/subtasks/subtask.release.js +9 -7
  367. package/dist/server/domains/subtasks/subtask.release.js.map +1 -1
  368. package/dist/server/domains/subtasks/subtask.routes.d.ts +1 -0
  369. package/dist/server/domains/subtasks/subtask.routes.d.ts.map +1 -1
  370. package/dist/server/domains/subtasks/subtask.routes.js +31 -3
  371. package/dist/server/domains/subtasks/subtask.routes.js.map +1 -1
  372. package/dist/server/domains/subtasks/subtask.service.d.ts +5 -5
  373. package/dist/server/domains/subtasks/subtask.service.d.ts.map +1 -1
  374. package/dist/server/domains/subtasks/subtask.service.js +98 -20
  375. package/dist/server/domains/subtasks/subtask.service.js.map +1 -1
  376. package/dist/server/domains/subtasks/subtask.store.d.ts +7 -0
  377. package/dist/server/domains/subtasks/subtask.store.d.ts.map +1 -1
  378. package/dist/server/domains/subtasks/subtask.store.js +34 -0
  379. package/dist/server/domains/subtasks/subtask.store.js.map +1 -1
  380. package/dist/server/index.d.ts +1 -0
  381. package/dist/server/index.d.ts.map +1 -1
  382. package/dist/server/index.js +1 -0
  383. package/dist/server/index.js.map +1 -1
  384. package/dist/server/kernel/activity.d.ts +5 -2
  385. package/dist/server/kernel/activity.d.ts.map +1 -1
  386. package/dist/server/kernel/activity.js +28 -1
  387. package/dist/server/kernel/activity.js.map +1 -1
  388. package/dist/server/kernel/actor.d.ts +2 -0
  389. package/dist/server/kernel/actor.d.ts.map +1 -1
  390. package/dist/server/kernel/actor.js.map +1 -1
  391. package/dist/server/kernel/http.d.ts.map +1 -1
  392. package/dist/server/kernel/http.js +2 -3
  393. package/dist/server/kernel/http.js.map +1 -1
  394. package/dist/server/kernel/kinds.d.ts +24 -6
  395. package/dist/server/kernel/kinds.d.ts.map +1 -1
  396. package/dist/server/kernel/kinds.js +21 -1
  397. package/dist/server/kernel/kinds.js.map +1 -1
  398. package/dist/server/kernel/transaction-read.d.ts +4 -0
  399. package/dist/server/kernel/transaction-read.d.ts.map +1 -0
  400. package/dist/server/kernel/transaction-read.js +30 -0
  401. package/dist/server/kernel/transaction-read.js.map +1 -0
  402. package/dist/server/kernel/work.d.ts +16 -6
  403. package/dist/server/kernel/work.d.ts.map +1 -1
  404. package/dist/server/kernel/work.js +33 -14
  405. package/dist/server/kernel/work.js.map +1 -1
  406. package/dist/server/lifecycle/move.d.ts +1 -0
  407. package/dist/server/lifecycle/move.d.ts.map +1 -1
  408. package/dist/server/lifecycle/move.js +2 -0
  409. package/dist/server/lifecycle/move.js.map +1 -1
  410. package/dist/server/lifecycle/registry.d.ts +5 -0
  411. package/dist/server/lifecycle/registry.d.ts.map +1 -1
  412. package/dist/server/lifecycle/registry.js.map +1 -1
  413. package/dist/server/locales/en-US.d.ts +0 -9
  414. package/dist/server/locales/en-US.d.ts.map +1 -1
  415. package/dist/server/locales/en-US.js +0 -9
  416. package/dist/server/locales/en-US.js.map +1 -1
  417. package/dist/server/locales/zh-CN.d.ts.map +1 -1
  418. package/dist/server/locales/zh-CN.js +2 -11
  419. package/dist/server/locales/zh-CN.js.map +1 -1
  420. package/dist/server/providers/change-announcer.d.ts +28 -0
  421. package/dist/server/providers/change-announcer.d.ts.map +1 -0
  422. package/dist/server/providers/change-announcer.js +75 -0
  423. package/dist/server/providers/change-announcer.js.map +1 -0
  424. package/dist/server/providers/notifications.d.ts +1 -0
  425. package/dist/server/providers/notifications.d.ts.map +1 -1
  426. package/dist/server/providers/notifications.js +6 -120
  427. package/dist/server/providers/notifications.js.map +1 -1
  428. package/dist/server/providers/projects.d.ts +3 -8
  429. package/dist/server/providers/projects.d.ts.map +1 -1
  430. package/dist/server/providers/projects.js +14 -37
  431. package/dist/server/providers/projects.js.map +1 -1
  432. package/dist/server/routes/api.d.ts.map +1 -1
  433. package/dist/server/routes/api.js +5 -8
  434. package/dist/server/routes/api.js.map +1 -1
  435. package/dist/server/routes/schemas.d.ts +17 -28
  436. package/dist/server/routes/schemas.d.ts.map +1 -1
  437. package/dist/server/routes/schemas.js +382 -292
  438. package/dist/server/routes/schemas.js.map +1 -1
  439. package/dist/server/tokens.d.ts +22 -35
  440. package/dist/server/tokens.d.ts.map +1 -1
  441. package/dist/server/tokens.js +5 -16
  442. package/dist/server/tokens.js.map +1 -1
  443. package/dist/shared/access.d.ts +0 -1
  444. package/dist/shared/access.d.ts.map +1 -1
  445. package/dist/shared/access.js +2 -11
  446. package/dist/shared/access.js.map +1 -1
  447. package/dist/shared/attachments.d.ts +4 -0
  448. package/dist/shared/attachments.d.ts.map +1 -1
  449. package/dist/shared/attachments.js +4 -0
  450. package/dist/shared/attachments.js.map +1 -1
  451. package/dist/shared/comments.d.ts +3 -0
  452. package/dist/shared/comments.d.ts.map +1 -1
  453. package/dist/shared/comments.js.map +1 -1
  454. package/dist/shared/intake-ai.d.ts +3 -1
  455. package/dist/shared/intake-ai.d.ts.map +1 -1
  456. package/dist/shared/intake-ai.js.map +1 -1
  457. package/dist/shared/invitations.d.ts +1 -1
  458. package/dist/shared/invitations.d.ts.map +1 -1
  459. package/dist/shared/issues.d.ts +32 -36
  460. package/dist/shared/issues.d.ts.map +1 -1
  461. package/dist/shared/issues.js +5 -0
  462. package/dist/shared/issues.js.map +1 -1
  463. package/dist/shared/kinds.d.ts +3 -1
  464. package/dist/shared/kinds.d.ts.map +1 -1
  465. package/dist/shared/kinds.js +1 -1
  466. package/dist/shared/locales/access.en-US.d.ts +0 -1
  467. package/dist/shared/locales/access.en-US.d.ts.map +1 -1
  468. package/dist/shared/locales/access.en-US.js +1 -2
  469. package/dist/shared/locales/access.en-US.js.map +1 -1
  470. package/dist/shared/locales/access.zh-CN.d.ts.map +1 -1
  471. package/dist/shared/locales/access.zh-CN.js +1 -2
  472. package/dist/shared/locales/access.zh-CN.js.map +1 -1
  473. package/dist/shared/plans.d.ts +28 -10
  474. package/dist/shared/plans.d.ts.map +1 -1
  475. package/dist/shared/plans.js +2 -1
  476. package/dist/shared/plans.js.map +1 -1
  477. package/dist/shared/projects.d.ts +0 -4
  478. package/dist/shared/projects.d.ts.map +1 -1
  479. package/dist/shared/projects.js.map +1 -1
  480. package/dist/shared/realtime.d.ts +10 -3
  481. package/dist/shared/realtime.d.ts.map +1 -1
  482. package/dist/shared/realtime.js +3 -2
  483. package/dist/shared/realtime.js.map +1 -1
  484. package/dist/shared/statuses.d.ts +42 -0
  485. package/dist/shared/statuses.d.ts.map +1 -0
  486. package/dist/shared/statuses.js +73 -0
  487. package/dist/shared/statuses.js.map +1 -0
  488. package/dist/shared/subtasks.d.ts +8 -3
  489. package/dist/shared/subtasks.d.ts.map +1 -1
  490. package/package.json +21 -29
  491. package/skills/nocobase-app-plugin-projects/SKILL.md +33 -57
  492. package/dist/client/lib/built-in-rule-editors.d.ts +0 -13
  493. package/dist/client/lib/built-in-rule-editors.d.ts.map +0 -1
  494. package/dist/client/lib/built-in-rule-editors.js +0 -86
  495. package/dist/client/lib/built-in-rule-editors.js.map +0 -1
  496. package/dist/client/lib/built-in-rule-types.d.ts +0 -3
  497. package/dist/client/lib/built-in-rule-types.d.ts.map +0 -1
  498. package/dist/client/lib/built-in-rule-types.js +0 -63
  499. package/dist/client/lib/built-in-rule-types.js.map +0 -1
  500. package/dist/client/lib/status-rule-types.d.ts +0 -60
  501. package/dist/client/lib/status-rule-types.d.ts.map +0 -1
  502. package/dist/client/lib/status-rule-types.js +0 -38
  503. package/dist/client/lib/status-rule-types.js.map +0 -1
  504. package/dist/client/lib/workflow-events.d.ts +0 -25
  505. package/dist/client/lib/workflow-events.d.ts.map +0 -1
  506. package/dist/client/lib/workflow-events.js +0 -30
  507. package/dist/client/lib/workflow-events.js.map +0 -1
  508. package/dist/client/pages/config/workflow-detail.d.ts +0 -10
  509. package/dist/client/pages/config/workflow-detail.d.ts.map +0 -1
  510. package/dist/client/pages/config/workflow-detail.js +0 -182
  511. package/dist/client/pages/config/workflow-detail.js.map +0 -1
  512. package/dist/client/pages/config/workflows/flow-editor.d.ts +0 -15
  513. package/dist/client/pages/config/workflows/flow-editor.d.ts.map +0 -1
  514. package/dist/client/pages/config/workflows/flow-editor.js +0 -76
  515. package/dist/client/pages/config/workflows/flow-editor.js.map +0 -1
  516. package/dist/client/pages/config/workflows/status-rules.d.ts +0 -21
  517. package/dist/client/pages/config/workflows/status-rules.d.ts.map +0 -1
  518. package/dist/client/pages/config/workflows/status-rules.js +0 -203
  519. package/dist/client/pages/config/workflows/status-rules.js.map +0 -1
  520. package/dist/client/pages/config/workflows/transitions-matrix.d.ts +0 -20
  521. package/dist/client/pages/config/workflows/transitions-matrix.d.ts.map +0 -1
  522. package/dist/client/pages/config/workflows/transitions-matrix.js +0 -114
  523. package/dist/client/pages/config/workflows/transitions-matrix.js.map +0 -1
  524. package/dist/client/pages/config/workflows/use-status-name.d.ts +0 -4
  525. package/dist/client/pages/config/workflows/use-status-name.d.ts.map +0 -1
  526. package/dist/client/pages/config/workflows/use-status-name.js +0 -17
  527. package/dist/client/pages/config/workflows/use-status-name.js.map +0 -1
  528. package/dist/client/pages/config/workflows/workflow-diagram.d.ts +0 -17
  529. package/dist/client/pages/config/workflows/workflow-diagram.d.ts.map +0 -1
  530. package/dist/client/pages/config/workflows/workflow-diagram.js +0 -298
  531. package/dist/client/pages/config/workflows/workflow-diagram.js.map +0 -1
  532. package/dist/client/pages/config/workflows/workflow-model.d.ts +0 -157
  533. package/dist/client/pages/config/workflows/workflow-model.d.ts.map +0 -1
  534. package/dist/client/pages/config/workflows/workflow-model.js +0 -403
  535. package/dist/client/pages/config/workflows/workflow-model.js.map +0 -1
  536. package/dist/client/pages/config/workflows/workflow-views.d.ts +0 -31
  537. package/dist/client/pages/config/workflows/workflow-views.d.ts.map +0 -1
  538. package/dist/client/pages/config/workflows/workflow-views.js +0 -76
  539. package/dist/client/pages/config/workflows/workflow-views.js.map +0 -1
  540. package/dist/client/pages/config/workflows.d.ts +0 -8
  541. package/dist/client/pages/config/workflows.d.ts.map +0 -1
  542. package/dist/client/pages/config/workflows.js +0 -139
  543. package/dist/client/pages/config/workflows.js.map +0 -1
  544. package/dist/client/pages/issues/detail/start-dialog.d.ts +0 -20
  545. package/dist/client/pages/issues/detail/start-dialog.d.ts.map +0 -1
  546. package/dist/client/pages/issues/detail/start-dialog.js +0 -31
  547. package/dist/client/pages/issues/detail/start-dialog.js.map +0 -1
  548. package/dist/client/pages/projects/workflow-select.d.ts +0 -14
  549. package/dist/client/pages/projects/workflow-select.d.ts.map +0 -1
  550. package/dist/client/pages/projects/workflow-select.js +0 -34
  551. package/dist/client/pages/projects/workflow-select.js.map +0 -1
  552. package/dist/server/domains/approvals/approval.events.d.ts +0 -47
  553. package/dist/server/domains/approvals/approval.events.d.ts.map +0 -1
  554. package/dist/server/domains/approvals/approval.events.js +0 -2
  555. package/dist/server/domains/approvals/approval.events.js.map +0 -1
  556. package/dist/server/domains/approvals/approval.lifecycle.d.ts +0 -8
  557. package/dist/server/domains/approvals/approval.lifecycle.d.ts.map +0 -1
  558. package/dist/server/domains/approvals/approval.lifecycle.js +0 -54
  559. package/dist/server/domains/approvals/approval.lifecycle.js.map +0 -1
  560. package/dist/server/domains/approvals/approval.routes.d.ts +0 -10
  561. package/dist/server/domains/approvals/approval.routes.d.ts.map +0 -1
  562. package/dist/server/domains/approvals/approval.routes.js +0 -86
  563. package/dist/server/domains/approvals/approval.routes.js.map +0 -1
  564. package/dist/server/domains/approvals/approval.service.d.ts +0 -72
  565. package/dist/server/domains/approvals/approval.service.d.ts.map +0 -1
  566. package/dist/server/domains/approvals/approval.service.js +0 -261
  567. package/dist/server/domains/approvals/approval.service.js.map +0 -1
  568. package/dist/server/domains/approvals/approval.store.d.ts +0 -42
  569. package/dist/server/domains/approvals/approval.store.d.ts.map +0 -1
  570. package/dist/server/domains/approvals/approval.store.js +0 -66
  571. package/dist/server/domains/approvals/approval.store.js.map +0 -1
  572. package/dist/server/domains/approvals/index.d.ts +0 -4
  573. package/dist/server/domains/approvals/index.d.ts.map +0 -1
  574. package/dist/server/domains/approvals/index.js +0 -3
  575. package/dist/server/domains/approvals/index.js.map +0 -1
  576. package/dist/server/domains/checklists/checklist.routes.d.ts +0 -9
  577. package/dist/server/domains/checklists/checklist.routes.d.ts.map +0 -1
  578. package/dist/server/domains/checklists/checklist.routes.js +0 -62
  579. package/dist/server/domains/checklists/checklist.routes.js.map +0 -1
  580. package/dist/server/domains/checklists/checklist.service.d.ts +0 -26
  581. package/dist/server/domains/checklists/checklist.service.d.ts.map +0 -1
  582. package/dist/server/domains/checklists/checklist.service.js +0 -80
  583. package/dist/server/domains/checklists/checklist.service.js.map +0 -1
  584. package/dist/server/domains/checklists/checklist.store.d.ts +0 -32
  585. package/dist/server/domains/checklists/checklist.store.d.ts.map +0 -1
  586. package/dist/server/domains/checklists/checklist.store.js +0 -66
  587. package/dist/server/domains/checklists/checklist.store.js.map +0 -1
  588. package/dist/server/domains/checklists/index.d.ts +0 -4
  589. package/dist/server/domains/checklists/index.d.ts.map +0 -1
  590. package/dist/server/domains/checklists/index.js +0 -4
  591. package/dist/server/domains/checklists/index.js.map +0 -1
  592. package/dist/server/domains/workflows/built-in-rule-types.d.ts +0 -40
  593. package/dist/server/domains/workflows/built-in-rule-types.d.ts.map +0 -1
  594. package/dist/server/domains/workflows/built-in-rule-types.js +0 -260
  595. package/dist/server/domains/workflows/built-in-rule-types.js.map +0 -1
  596. package/dist/server/domains/workflows/event-types.d.ts +0 -21
  597. package/dist/server/domains/workflows/event-types.d.ts.map +0 -1
  598. package/dist/server/domains/workflows/event-types.js +0 -31
  599. package/dist/server/domains/workflows/event-types.js.map +0 -1
  600. package/dist/server/domains/workflows/index.d.ts +0 -10
  601. package/dist/server/domains/workflows/index.d.ts.map +0 -1
  602. package/dist/server/domains/workflows/index.js +0 -10
  603. package/dist/server/domains/workflows/index.js.map +0 -1
  604. package/dist/server/domains/workflows/rule-types.d.ts +0 -125
  605. package/dist/server/domains/workflows/rule-types.d.ts.map +0 -1
  606. package/dist/server/domains/workflows/rule-types.js +0 -33
  607. package/dist/server/domains/workflows/rule-types.js.map +0 -1
  608. package/dist/server/domains/workflows/templates.d.ts +0 -62
  609. package/dist/server/domains/workflows/templates.d.ts.map +0 -1
  610. package/dist/server/domains/workflows/templates.js +0 -63
  611. package/dist/server/domains/workflows/templates.js.map +0 -1
  612. package/dist/server/domains/workflows/workflow.diff.d.ts +0 -14
  613. package/dist/server/domains/workflows/workflow.diff.d.ts.map +0 -1
  614. package/dist/server/domains/workflows/workflow.diff.js +0 -80
  615. package/dist/server/domains/workflows/workflow.diff.js.map +0 -1
  616. package/dist/server/domains/workflows/workflow.events.d.ts +0 -26
  617. package/dist/server/domains/workflows/workflow.events.d.ts.map +0 -1
  618. package/dist/server/domains/workflows/workflow.events.js +0 -2
  619. package/dist/server/domains/workflows/workflow.events.js.map +0 -1
  620. package/dist/server/domains/workflows/workflow.fire.d.ts +0 -38
  621. package/dist/server/domains/workflows/workflow.fire.d.ts.map +0 -1
  622. package/dist/server/domains/workflows/workflow.fire.js +0 -57
  623. package/dist/server/domains/workflows/workflow.fire.js.map +0 -1
  624. package/dist/server/domains/workflows/workflow.registry.d.ts +0 -27
  625. package/dist/server/domains/workflows/workflow.registry.d.ts.map +0 -1
  626. package/dist/server/domains/workflows/workflow.registry.js +0 -130
  627. package/dist/server/domains/workflows/workflow.registry.js.map +0 -1
  628. package/dist/server/domains/workflows/workflow.routes.d.ts +0 -6
  629. package/dist/server/domains/workflows/workflow.routes.d.ts.map +0 -1
  630. package/dist/server/domains/workflows/workflow.routes.js +0 -148
  631. package/dist/server/domains/workflows/workflow.routes.js.map +0 -1
  632. package/dist/server/domains/workflows/workflow.rules.d.ts +0 -14
  633. package/dist/server/domains/workflows/workflow.rules.d.ts.map +0 -1
  634. package/dist/server/domains/workflows/workflow.rules.js +0 -190
  635. package/dist/server/domains/workflows/workflow.rules.js.map +0 -1
  636. package/dist/server/domains/workflows/workflow.service.d.ts +0 -71
  637. package/dist/server/domains/workflows/workflow.service.d.ts.map +0 -1
  638. package/dist/server/domains/workflows/workflow.service.js +0 -365
  639. package/dist/server/domains/workflows/workflow.service.js.map +0 -1
  640. package/dist/server/domains/workflows/workflow.store.d.ts +0 -33
  641. package/dist/server/domains/workflows/workflow.store.d.ts.map +0 -1
  642. package/dist/server/domains/workflows/workflow.store.js +0 -148
  643. package/dist/server/domains/workflows/workflow.store.js.map +0 -1
  644. package/dist/shared/approvals.d.ts +0 -37
  645. package/dist/shared/approvals.d.ts.map +0 -1
  646. package/dist/shared/approvals.js +0 -4
  647. package/dist/shared/approvals.js.map +0 -1
  648. package/dist/shared/checklists.d.ts +0 -27
  649. package/dist/shared/checklists.d.ts.map +0 -1
  650. package/dist/shared/checklists.js +0 -7
  651. package/dist/shared/checklists.js.map +0 -1
  652. package/dist/shared/workflows.d.ts +0 -267
  653. package/dist/shared/workflows.d.ts.map +0 -1
  654. package/dist/shared/workflows.js +0 -149
  655. 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(),
105
+ name: z.string().optional().describe('The name to display.'),
106
+ color: z.enum(COLORS).optional().describe('The label color.'),
90
107
  });
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(),
103
- });
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,127 +628,6 @@ 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
516
- .object({
517
- 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(),
529
- })
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
- })),
546
- });
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
631
  // Attachments and comments
589
632
  export const AttachmentSchema = z
590
633
  .object({
@@ -620,6 +663,36 @@ const MentionRefSchema = z.object({
620
663
  kind: z.string(),
621
664
  id: z.string(),
622
665
  });
666
+ const ActivityExecutionSchema = z
667
+ .object({
668
+ attempt: z.number().int(),
669
+ runnerId: z.string(),
670
+ runnerName: z.string().nullable().optional(),
671
+ runnerOwnerUserId: z.string().nullable().optional(),
672
+ runnerOwnerName: z.string().nullable().optional(),
673
+ runnerTrust: z.enum(['team', 'ownerOnly']).nullable().optional(),
674
+ machineHidden: z.boolean().optional(),
675
+ tool: z.string().nullable().optional(),
676
+ toolVersion: z.string().nullable().optional(),
677
+ model: z.string().nullable().optional(),
678
+ actualModels: z.array(z.string()).optional(),
679
+ effort: z.string().nullable().optional(),
680
+ actualEffort: z.string().nullable().optional(),
681
+ actualEffortSource: z.string().nullable().optional(),
682
+ actualEffortAt: dateTime.nullable().optional(),
683
+ })
684
+ .meta({ ref: 'ProjectsActivityExecution' });
685
+ const ActivityViaSchema = z
686
+ .object({
687
+ type: z.enum(['cli', 'api_key', 'agent', 'plan']),
688
+ agentId: z.string().optional(),
689
+ agentName: z.string().nullable().optional(),
690
+ runId: z.string().optional(),
691
+ execution: ActivityExecutionSchema.optional(),
692
+ conversationId: z.string().optional(),
693
+ planId: z.string().optional(),
694
+ })
695
+ .meta({ ref: 'ProjectsActivityVia' });
623
696
  export const IssueCommentSchema = z
624
697
  .object({
625
698
  id: z.string(),
@@ -633,6 +706,7 @@ export const IssueCommentSchema = z
633
706
  parentId: z.string().nullable(),
634
707
  rootId: z.string(),
635
708
  via: z.enum(['cli', 'api_key', 'agent']).nullable(),
709
+ source: ActivityViaSchema.nullable().optional(),
636
710
  createdAt: dateTime,
637
711
  editedAt: dateTime.nullable(),
638
712
  deleted: z.boolean(),
@@ -667,16 +741,6 @@ export const SubscriptionStateSchema = z.object({
667
741
  subscribed: z.boolean(),
668
742
  });
669
743
  // 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
744
  export const ActivitySchema = z
681
745
  .object({
682
746
  id: z.string(),
@@ -694,10 +758,19 @@ const issueShape = {
694
758
  number: z.number().int(),
695
759
  identifier: z
696
760
  .string()
697
- .meta({ description: '`PREFIX-number`, such as `PM-12`.' }),
761
+ .meta({ description: '`PREFIX-number`, such as `PM-1`.' }),
698
762
  title: z.string(),
699
763
  description: z.string().meta({ description: 'Markdown.' }),
700
764
  statusKey: z.string(),
765
+ needsYou: z.string().nullable().meta({
766
+ description: 'The decision or input required from the owner; null outside Blocked and In review, or on historical issues.',
767
+ }),
768
+ acceptance: z.string().nullable().meta({
769
+ 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.",
770
+ }),
771
+ next: z.string().nullable().meta({
772
+ description: 'The next step; null when none is recorded or the issue is Done or Cancelled.',
773
+ }),
701
774
  priority: z.enum(PRIORITIES),
702
775
  ownerUserId: z.string(),
703
776
  executor: ExecutorSchema.nullable(),
@@ -747,6 +820,7 @@ export const IssueDependencySchema = z
747
820
  })
748
821
  .meta({ ref: 'ProjectsIssueDependency' });
749
822
  export const IssueDetailSchema = z.object({
823
+ progress: z.record(z.string(), z.unknown()).nullable().optional(),
750
824
  ...issueListItemShape,
751
825
  parent: z
752
826
  .object({ id: z.string(), identifier: z.string(), title: z.string() })
@@ -762,9 +836,6 @@ export const IssueDetailSchema = z.object({
762
836
  reason: z.enum(SUBSCRIPTION_REASONS),
763
837
  })),
764
838
  attachments: z.array(AttachmentSchema),
765
- checklist: IssueChecklistSchema.nullable(),
766
- pendingApproval: ApprovalRequestSchema.nullable(),
767
- recentApprovals: z.array(ApprovalRequestSchema),
768
839
  subtasks: z.array(z.object({
769
840
  id: z.string(),
770
841
  identifier: z.string(),
@@ -790,9 +861,6 @@ export const IssueDetailSchema = z.object({
790
861
  });
791
862
  export const UpdateIssueResultSchema = z.object({
792
863
  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
864
  });
797
865
  export const IssueBoardSchema = z.object({
798
866
  columns: z.array(z.object({
@@ -803,14 +871,6 @@ export const IssueBoardSchema = z.object({
803
871
  }),
804
872
  })),
805
873
  });
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
874
  // Projects
815
875
  const projectShape = {
816
876
  id: z.string(),
@@ -822,7 +882,6 @@ const projectShape = {
822
882
  leadUserId: z.string().nullable(),
823
883
  startDate: day.nullable(),
824
884
  dueDate: day.nullable(),
825
- workflowId: z.string().nullable(),
826
885
  setupIssueId: z.string().nullable(),
827
886
  createdAt: dateTime,
828
887
  updatedAt: dateTime,
@@ -895,7 +954,10 @@ const PlanRowInputSchema = z
895
954
  .discriminatedUnion('op', [
896
955
  z.object({
897
956
  op: z.literal('issue.create'),
898
- ref: z.string().optional(),
957
+ ref: z
958
+ .string()
959
+ .optional()
960
+ .describe('A local reference name for this plan row.'),
899
961
  params: z.object({
900
962
  title: z.string(),
901
963
  ...issueFieldChanges,
@@ -905,16 +967,27 @@ const PlanRowInputSchema = z
905
967
  }),
906
968
  z.object({
907
969
  op: z.literal('issue.update'),
908
- ref: z.string().optional(),
970
+ ref: z
971
+ .string()
972
+ .optional()
973
+ .describe('A local reference name for this plan row.'),
909
974
  params: z.object({
910
975
  issue: issueTarget,
911
- set: z.object({ title: z.string().optional(), ...issueFieldChanges }),
976
+ set: z.object({
977
+ title: z.string().optional(),
978
+ ...issueFieldChanges,
979
+ needsYou: z.string().nullable().optional(),
980
+ next: z.string().nullable().optional(),
981
+ }),
912
982
  start: z.boolean().optional(),
913
983
  }),
914
984
  }),
915
985
  z.object({
916
986
  op: z.literal('comment.create'),
917
- ref: z.string().optional(),
987
+ ref: z
988
+ .string()
989
+ .optional()
990
+ .describe('A local reference name for this plan row.'),
918
991
  params: z.object({
919
992
  issue: issueTarget,
920
993
  content: z.string(),
@@ -924,7 +997,10 @@ const PlanRowInputSchema = z
924
997
  }),
925
998
  z.object({
926
999
  op: z.literal('dependency'),
927
- ref: z.string().optional(),
1000
+ ref: z
1001
+ .string()
1002
+ .optional()
1003
+ .describe('A local reference name for this plan row.'),
928
1004
  params: z.object({
929
1005
  action: z.enum(['add', 'remove']),
930
1006
  issue: issueTarget,
@@ -934,7 +1010,10 @@ const PlanRowInputSchema = z
934
1010
  }),
935
1011
  z.object({
936
1012
  op: z.literal('project.create'),
937
- ref: z.string().optional(),
1013
+ ref: z
1014
+ .string()
1015
+ .optional()
1016
+ .describe('A local reference name for this plan row.'),
938
1017
  params: z.object({
939
1018
  name: z.string(),
940
1019
  description: z.string().nullable().optional(),
@@ -943,7 +1022,6 @@ const PlanRowInputSchema = z
943
1022
  leadUserId: z.string().nullable().optional(),
944
1023
  startDate: z.string().nullable().optional(),
945
1024
  dueDate: z.string().nullable().optional(),
946
- workflowId: z.string().nullable().optional(),
947
1025
  }),
948
1026
  }),
949
1027
  ])
@@ -1155,6 +1233,10 @@ export const IntakeAiJobSchema = z
1155
1233
  phase: z.enum(['queued', 'working']),
1156
1234
  by: z.string().nullable(),
1157
1235
  waitReason: z.string().nullable(),
1236
+ waitParams: z
1237
+ .record(z.string(), z.union([z.string(), z.number(), z.array(z.string())]))
1238
+ .nullable()
1239
+ .optional(),
1158
1240
  activity: z.string().nullable(),
1159
1241
  since: dateTime.nullable(),
1160
1242
  })
@@ -1172,10 +1254,18 @@ export const singleFileBody = {
1172
1254
  type: 'object',
1173
1255
  required: ['file'],
1174
1256
  properties: {
1175
- file: { type: 'string', format: 'binary' },
1257
+ file: {
1258
+ type: 'string',
1259
+ format: 'binary',
1260
+ description: 'The file to upload.',
1261
+ },
1176
1262
  },
1177
1263
  },
1178
1264
  },
1179
1265
  },
1180
1266
  };
1267
+ /** Context supplied by the session bridge, never an authentication credential. */
1268
+ export const IssueSessionHeader = z.object({
1269
+ 'x-nb-agent-session': z.string().min(1).max(200).optional(),
1270
+ });
1181
1271
  //# sourceMappingURL=schemas.js.map