@desplega.ai/agent-swarm 1.49.0 → 1.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (547) hide show
  1. package/README.md +1 -1
  2. package/openapi.json +2070 -728
  3. package/package.json +10 -1
  4. package/src/agentmail/handlers.ts +65 -10
  5. package/src/agentmail/templates.ts +111 -0
  6. package/src/be/db.ts +1233 -7
  7. package/src/be/migrations/014_prompt_templates.sql +33 -0
  8. package/src/be/migrations/015_workflow_workspace.sql +3 -0
  9. package/src/be/migrations/016_active_session_runner_session.sql +4 -0
  10. package/src/be/migrations/017_channel_activity_cursors.sql +6 -0
  11. package/src/be/migrations/018_fix_seed_double_version.sql +30 -0
  12. package/src/be/migrations/019_skills.sql +65 -0
  13. package/src/be/migrations/020_approval_requests.sql +41 -0
  14. package/src/be/seed.ts +62 -0
  15. package/src/be/skill-parser.ts +70 -0
  16. package/src/be/skill-sync.ts +106 -0
  17. package/src/commands/runner.ts +320 -132
  18. package/src/commands/templates.ts +172 -0
  19. package/src/github/handlers.ts +292 -77
  20. package/src/github/mentions-aliases.test.ts +73 -0
  21. package/src/github/mentions.test.ts +3 -3
  22. package/src/github/mentions.ts +32 -6
  23. package/src/github/templates.ts +398 -0
  24. package/src/gitlab/handlers.ts +63 -22
  25. package/src/gitlab/templates.ts +140 -0
  26. package/src/heartbeat/heartbeat.ts +19 -10
  27. package/src/heartbeat/templates.ts +30 -0
  28. package/src/http/active-sessions.ts +27 -0
  29. package/src/http/approval-requests.ts +247 -0
  30. package/src/http/config.ts +3 -3
  31. package/src/http/index.ts +9 -2
  32. package/src/http/poll.ts +135 -14
  33. package/src/http/prompt-templates.ts +412 -0
  34. package/src/http/schedules.ts +35 -0
  35. package/src/http/skills.ts +479 -0
  36. package/src/http/workflows.ts +8 -0
  37. package/src/linear/sync.ts +28 -4
  38. package/src/linear/templates.ts +47 -0
  39. package/src/prompts/base-prompt.ts +41 -490
  40. package/src/prompts/registry.ts +57 -0
  41. package/src/prompts/resolver.ts +296 -0
  42. package/src/prompts/session-templates.ts +604 -0
  43. package/src/providers/claude-adapter.ts +15 -2
  44. package/src/providers/pi-mono-extension.ts +5 -1
  45. package/src/scheduler/scheduler.ts +125 -91
  46. package/src/server.ts +44 -0
  47. package/src/slack/assistant.ts +7 -4
  48. package/src/slack/channel-activity.ts +177 -0
  49. package/src/slack/handlers.ts +21 -6
  50. package/src/slack/templates.ts +55 -0
  51. package/src/tests/approval-requests.test.ts +735 -0
  52. package/src/tests/artifact-sdk.test.ts +12 -12
  53. package/src/tests/base-prompt.test.ts +49 -49
  54. package/src/tests/channel-activity.test.ts +363 -0
  55. package/src/tests/heartbeat.test.ts +1 -0
  56. package/src/tests/linear-webhook.test.ts +7 -3
  57. package/src/tests/pool-session-logs.test.ts +199 -0
  58. package/src/tests/prompt-template-github.test.ts +682 -0
  59. package/src/tests/prompt-template-remaining.test.ts +504 -0
  60. package/src/tests/prompt-template-resolver.test.ts +621 -0
  61. package/src/tests/prompt-template-session.test.ts +363 -0
  62. package/src/tests/prompt-templates-db.test.ts +616 -0
  63. package/src/tests/self-improvement.test.ts +8 -7
  64. package/src/tests/skill-parser.test.ts +178 -0
  65. package/src/tests/skill-sync.test.ts +171 -0
  66. package/src/tests/slack-metadata-inheritance.test.ts +1 -1
  67. package/src/tests/slack-thread-followups.test.ts +1 -1
  68. package/src/tests/structured-output.test.ts +0 -4
  69. package/src/tests/tool-annotations.test.ts +2 -1
  70. package/src/tests/update-profile-agentid.test.ts +248 -0
  71. package/src/tests/update-profile-auth.test.ts +195 -0
  72. package/src/tests/workflow-async-v2.test.ts +126 -4
  73. package/src/tests/workflow-definition-validation.test.ts +76 -0
  74. package/src/tests/workflow-executors.test.ts +4 -2
  75. package/src/tests/workflow-retry-v2.test.ts +1 -1
  76. package/src/tests/workflow-schedule-trigger.test.ts +104 -0
  77. package/src/tests/workflow-workspace.test.ts +272 -0
  78. package/src/tools/prompt-templates/delete.ts +86 -0
  79. package/src/tools/prompt-templates/get.ts +89 -0
  80. package/src/tools/prompt-templates/index.ts +5 -0
  81. package/src/tools/prompt-templates/list.ts +95 -0
  82. package/src/tools/prompt-templates/preview.ts +84 -0
  83. package/src/tools/prompt-templates/set.ts +117 -0
  84. package/src/tools/request-human-input.ts +106 -0
  85. package/src/tools/skills/index.ts +11 -0
  86. package/src/tools/skills/skill-create.ts +105 -0
  87. package/src/tools/skills/skill-delete.ts +67 -0
  88. package/src/tools/skills/skill-get.ts +75 -0
  89. package/src/tools/skills/skill-install-remote.ts +152 -0
  90. package/src/tools/skills/skill-install.ts +101 -0
  91. package/src/tools/skills/skill-list.ts +77 -0
  92. package/src/tools/skills/skill-publish.ts +123 -0
  93. package/src/tools/skills/skill-search.ts +43 -0
  94. package/src/tools/skills/skill-sync-remote.ts +128 -0
  95. package/src/tools/skills/skill-uninstall.ts +60 -0
  96. package/src/tools/skills/skill-update.ts +128 -0
  97. package/src/tools/store-progress.ts +22 -4
  98. package/src/tools/task-action.ts +20 -0
  99. package/src/tools/templates.ts +53 -0
  100. package/src/tools/tool-config.ts +23 -0
  101. package/src/tools/update-profile.ts +106 -34
  102. package/src/tools/workflows/create-workflow.ts +19 -1
  103. package/src/tools/workflows/update-workflow.ts +16 -1
  104. package/src/types.ts +109 -2
  105. package/src/workflows/definition.ts +30 -12
  106. package/src/workflows/engine.ts +40 -14
  107. package/src/workflows/executors/agent-task.ts +14 -3
  108. package/src/workflows/executors/human-in-the-loop.ts +160 -0
  109. package/src/workflows/executors/registry.ts +2 -0
  110. package/src/workflows/index.ts +1 -1
  111. package/src/workflows/recovery.ts +72 -0
  112. package/src/workflows/resume.ts +162 -12
  113. package/src/workflows/triggers.ts +31 -2
  114. package/src/workflows/version.ts +2 -0
  115. package/.claude/settings.json +0 -84
  116. package/.claude/settings.local.json +0 -117
  117. package/.dockerignore +0 -61
  118. package/.editorconfig +0 -15
  119. package/.entire/settings.json +0 -4
  120. package/.env.docker.example +0 -56
  121. package/.env.example +0 -78
  122. package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -78
  123. package/.github/ISSUE_TEMPLATE/community-template.yml +0 -77
  124. package/.github/ISSUE_TEMPLATE/config.yml +0 -8
  125. package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -60
  126. package/.github/PULL_REQUEST_TEMPLATE/community-template.md +0 -29
  127. package/.github/workflows/ci.yml +0 -52
  128. package/.github/workflows/docker-and-deploy.yml +0 -132
  129. package/.github/workflows/merge-gate.yml +0 -233
  130. package/.opencode/plugins/entire.ts +0 -133
  131. package/.superset/config.json +0 -6
  132. package/.wts-config.json +0 -4
  133. package/.wts-setup.ts +0 -171
  134. package/CHANGELOG.md +0 -447
  135. package/CLAUDE.md +0 -521
  136. package/CONTRIBUTING.md +0 -315
  137. package/DEPLOYMENT.md +0 -622
  138. package/Dockerfile +0 -65
  139. package/Dockerfile.worker +0 -189
  140. package/MCP.md +0 -841
  141. package/UI.md +0 -40
  142. package/api-entrypoint.sh +0 -56
  143. package/assets/agent-swarm-logo-orange.png +0 -0
  144. package/assets/agent-swarm-logo.png +0 -0
  145. package/assets/agent-swarm.mp4 +0 -0
  146. package/assets/agent-swarm.png +0 -0
  147. package/biome.json +0 -39
  148. package/deploy/DEPLOY.md +0 -60
  149. package/deploy/agent-swarm.service +0 -17
  150. package/deploy/docker-push.ts +0 -30
  151. package/deploy/install.ts +0 -85
  152. package/deploy/prod-db.ts +0 -42
  153. package/deploy/uninstall.ts +0 -12
  154. package/deploy/update.ts +0 -21
  155. package/depot.json +0 -1
  156. package/docker-compose.example.yml +0 -350
  157. package/docker-compose.local.yml +0 -119
  158. package/docker-entrypoint.sh +0 -632
  159. package/docs-site/app/api/search/route.ts +0 -4
  160. package/docs-site/app/docs/[[...slug]]/page.tsx +0 -87
  161. package/docs-site/app/docs/layout.tsx +0 -12
  162. package/docs-site/app/globals.css +0 -24
  163. package/docs-site/app/layout.config.tsx +0 -34
  164. package/docs-site/app/layout.tsx +0 -119
  165. package/docs-site/app/llms-full.txt/route.ts +0 -11
  166. package/docs-site/app/llms.mdx/docs/[[...slug]]/route.ts +0 -24
  167. package/docs-site/app/llms.txt/route.ts +0 -8
  168. package/docs-site/app/page.tsx +0 -5
  169. package/docs-site/app/robots.ts +0 -13
  170. package/docs-site/app/sitemap.ts +0 -37
  171. package/docs-site/components/api-page.client.tsx +0 -4
  172. package/docs-site/components/api-page.tsx +0 -7
  173. package/docs-site/components/mdx/mermaid.tsx +0 -55
  174. package/docs-site/content/docs/(documentation)/architecture/agents.mdx +0 -117
  175. package/docs-site/content/docs/(documentation)/architecture/hooks.mdx +0 -77
  176. package/docs-site/content/docs/(documentation)/architecture/memory.mdx +0 -96
  177. package/docs-site/content/docs/(documentation)/architecture/meta.json +0 -4
  178. package/docs-site/content/docs/(documentation)/architecture/overview.mdx +0 -172
  179. package/docs-site/content/docs/(documentation)/concepts/epics.mdx +0 -98
  180. package/docs-site/content/docs/(documentation)/concepts/meta.json +0 -4
  181. package/docs-site/content/docs/(documentation)/concepts/scheduling.mdx +0 -136
  182. package/docs-site/content/docs/(documentation)/concepts/services.mdx +0 -104
  183. package/docs-site/content/docs/(documentation)/concepts/task-lifecycle.mdx +0 -148
  184. package/docs-site/content/docs/(documentation)/concepts/workflows.mdx +0 -209
  185. package/docs-site/content/docs/(documentation)/contributing.mdx +0 -158
  186. package/docs-site/content/docs/(documentation)/getting-started.mdx +0 -157
  187. package/docs-site/content/docs/(documentation)/guides/agentmail-integration.mdx +0 -79
  188. package/docs-site/content/docs/(documentation)/guides/deployment.mdx +0 -171
  189. package/docs-site/content/docs/(documentation)/guides/github-integration.mdx +0 -81
  190. package/docs-site/content/docs/(documentation)/guides/gitlab-integration.mdx +0 -93
  191. package/docs-site/content/docs/(documentation)/guides/linear-integration.mdx +0 -98
  192. package/docs-site/content/docs/(documentation)/guides/meta.json +0 -13
  193. package/docs-site/content/docs/(documentation)/guides/sentry-integration.mdx +0 -52
  194. package/docs-site/content/docs/(documentation)/guides/slack-integration.mdx +0 -179
  195. package/docs-site/content/docs/(documentation)/guides/x402-payments.mdx +0 -154
  196. package/docs-site/content/docs/(documentation)/index.mdx +0 -65
  197. package/docs-site/content/docs/(documentation)/meta.json +0 -19
  198. package/docs-site/content/docs/(documentation)/reference/cli.mdx +0 -241
  199. package/docs-site/content/docs/(documentation)/reference/environment-variables.mdx +0 -205
  200. package/docs-site/content/docs/(documentation)/reference/mcp-tools.mdx +0 -449
  201. package/docs-site/content/docs/(documentation)/reference/meta.json +0 -4
  202. package/docs-site/content/docs/api-reference/active-sessions.mdx +0 -9
  203. package/docs-site/content/docs/api-reference/agents.mdx +0 -9
  204. package/docs-site/content/docs/api-reference/channels.mdx +0 -9
  205. package/docs-site/content/docs/api-reference/config.mdx +0 -9
  206. package/docs-site/content/docs/api-reference/debug.mdx +0 -9
  207. package/docs-site/content/docs/api-reference/ecosystem.mdx +0 -9
  208. package/docs-site/content/docs/api-reference/epics.mdx +0 -9
  209. package/docs-site/content/docs/api-reference/index.mdx +0 -32
  210. package/docs-site/content/docs/api-reference/memory.mdx +0 -9
  211. package/docs-site/content/docs/api-reference/meta.json +0 -25
  212. package/docs-site/content/docs/api-reference/poll.mdx +0 -9
  213. package/docs-site/content/docs/api-reference/repos.mdx +0 -9
  214. package/docs-site/content/docs/api-reference/schedules.mdx +0 -9
  215. package/docs-site/content/docs/api-reference/session-data.mdx +0 -9
  216. package/docs-site/content/docs/api-reference/stats.mdx +0 -9
  217. package/docs-site/content/docs/api-reference/tasks.mdx +0 -9
  218. package/docs-site/content/docs/api-reference/trackers.mdx +0 -9
  219. package/docs-site/content/docs/api-reference/webhooks.mdx +0 -9
  220. package/docs-site/content/docs/api-reference/workflows.mdx +0 -9
  221. package/docs-site/content/docs/meta.json +0 -3
  222. package/docs-site/lib/get-llm-text.ts +0 -10
  223. package/docs-site/lib/openapi.ts +0 -23
  224. package/docs-site/lib/source.ts +0 -8
  225. package/docs-site/mdx-components.tsx +0 -13
  226. package/docs-site/next.config.mjs +0 -29
  227. package/docs-site/package.json +0 -35
  228. package/docs-site/pnpm-lock.yaml +0 -5407
  229. package/docs-site/postcss.config.mjs +0 -8
  230. package/docs-site/public/logo.png +0 -0
  231. package/docs-site/scripts/generate-docs.ts +0 -171
  232. package/docs-site/source.config.ts +0 -17
  233. package/docs-site/tsconfig.json +0 -46
  234. package/ecosystem.config.cjs +0 -66
  235. package/landing/next.config.ts +0 -14
  236. package/landing/package.json +0 -31
  237. package/landing/pnpm-lock.yaml +0 -1091
  238. package/landing/postcss.config.mjs +0 -8
  239. package/landing/public/apple-touch-icon.png +0 -0
  240. package/landing/public/favicon.ico +0 -0
  241. package/landing/public/logo.png +0 -0
  242. package/landing/public/og-image.png +0 -0
  243. package/landing/public/omghost-desplega.svg +0 -30
  244. package/landing/public/omghost-openfort.svg +0 -9
  245. package/landing/src/app/actions/waitlist.ts +0 -25
  246. package/landing/src/app/blog/openfort-hackathon/page.tsx +0 -863
  247. package/landing/src/app/blog/page.tsx +0 -162
  248. package/landing/src/app/blog/swarm-metrics/page.tsx +0 -685
  249. package/landing/src/app/examples/page.tsx +0 -174
  250. package/landing/src/app/examples/x402/page.tsx +0 -456
  251. package/landing/src/app/globals.css +0 -122
  252. package/landing/src/app/layout.tsx +0 -134
  253. package/landing/src/app/page.tsx +0 -27
  254. package/landing/src/app/robots.ts +0 -13
  255. package/landing/src/app/sitemap.ts +0 -44
  256. package/landing/src/components/architecture.tsx +0 -163
  257. package/landing/src/components/cta.tsx +0 -52
  258. package/landing/src/components/features.tsx +0 -160
  259. package/landing/src/components/footer.tsx +0 -100
  260. package/landing/src/components/hero.tsx +0 -217
  261. package/landing/src/components/how-it-works.tsx +0 -165
  262. package/landing/src/components/navbar.tsx +0 -147
  263. package/landing/src/components/waitlist.tsx +0 -110
  264. package/landing/src/components/why-choose.tsx +0 -149
  265. package/landing/src/components/workshops.tsx +0 -328
  266. package/landing/src/lib/utils.ts +0 -6
  267. package/landing/tsconfig.json +0 -41
  268. package/misc/transcripts/2026-03-09-pi-mono-e2e-verification.md +0 -154
  269. package/new-ui/CLAUDE.md +0 -92
  270. package/new-ui/README.md +0 -73
  271. package/new-ui/biome.json +0 -42
  272. package/new-ui/components.json +0 -21
  273. package/new-ui/index.html +0 -25
  274. package/new-ui/package.json +0 -49
  275. package/new-ui/pnpm-lock.yaml +0 -4845
  276. package/new-ui/public/logo.png +0 -0
  277. package/new-ui/src/api/client.ts +0 -814
  278. package/new-ui/src/api/hooks/index.ts +0 -64
  279. package/new-ui/src/api/hooks/use-agents.ts +0 -58
  280. package/new-ui/src/api/hooks/use-channels.ts +0 -115
  281. package/new-ui/src/api/hooks/use-config-api.ts +0 -46
  282. package/new-ui/src/api/hooks/use-costs.ts +0 -122
  283. package/new-ui/src/api/hooks/use-db-query.ts +0 -29
  284. package/new-ui/src/api/hooks/use-epics.ts +0 -75
  285. package/new-ui/src/api/hooks/use-repos.ts +0 -61
  286. package/new-ui/src/api/hooks/use-schedules.ts +0 -81
  287. package/new-ui/src/api/hooks/use-services.ts +0 -16
  288. package/new-ui/src/api/hooks/use-stats.ts +0 -27
  289. package/new-ui/src/api/hooks/use-tasks.ts +0 -89
  290. package/new-ui/src/api/hooks/use-workflows.ts +0 -109
  291. package/new-ui/src/api/types.ts +0 -549
  292. package/new-ui/src/app/App.tsx +0 -13
  293. package/new-ui/src/app/providers.tsx +0 -32
  294. package/new-ui/src/app/router.tsx +0 -52
  295. package/new-ui/src/components/layout/app-header.tsx +0 -47
  296. package/new-ui/src/components/layout/app-sidebar.tsx +0 -128
  297. package/new-ui/src/components/layout/breadcrumbs.tsx +0 -57
  298. package/new-ui/src/components/layout/config-guard.tsx +0 -22
  299. package/new-ui/src/components/layout/root-layout.tsx +0 -40
  300. package/new-ui/src/components/layout/swarm-switcher.tsx +0 -85
  301. package/new-ui/src/components/shared/command-menu.tsx +0 -131
  302. package/new-ui/src/components/shared/data-grid.tsx +0 -141
  303. package/new-ui/src/components/shared/empty-state.tsx +0 -24
  304. package/new-ui/src/components/shared/error-boundary.tsx +0 -72
  305. package/new-ui/src/components/shared/json-viewer.tsx +0 -47
  306. package/new-ui/src/components/shared/name-connection-modal.tsx +0 -99
  307. package/new-ui/src/components/shared/page-skeleton.tsx +0 -16
  308. package/new-ui/src/components/shared/session-log-viewer.tsx +0 -364
  309. package/new-ui/src/components/shared/stats-bar.tsx +0 -132
  310. package/new-ui/src/components/shared/status-badge.tsx +0 -131
  311. package/new-ui/src/components/shared/usage-summary.tsx +0 -179
  312. package/new-ui/src/components/ui/alert-dialog.tsx +0 -176
  313. package/new-ui/src/components/ui/alert.tsx +0 -60
  314. package/new-ui/src/components/ui/avatar.tsx +0 -96
  315. package/new-ui/src/components/ui/badge.tsx +0 -46
  316. package/new-ui/src/components/ui/button.tsx +0 -62
  317. package/new-ui/src/components/ui/card.tsx +0 -75
  318. package/new-ui/src/components/ui/command.tsx +0 -160
  319. package/new-ui/src/components/ui/dialog.tsx +0 -143
  320. package/new-ui/src/components/ui/dropdown-menu.tsx +0 -226
  321. package/new-ui/src/components/ui/input.tsx +0 -21
  322. package/new-ui/src/components/ui/label.tsx +0 -19
  323. package/new-ui/src/components/ui/progress.tsx +0 -26
  324. package/new-ui/src/components/ui/scroll-area.tsx +0 -54
  325. package/new-ui/src/components/ui/select.tsx +0 -175
  326. package/new-ui/src/components/ui/separator.tsx +0 -28
  327. package/new-ui/src/components/ui/sheet.tsx +0 -132
  328. package/new-ui/src/components/ui/sidebar.tsx +0 -691
  329. package/new-ui/src/components/ui/skeleton.tsx +0 -13
  330. package/new-ui/src/components/ui/sonner.tsx +0 -35
  331. package/new-ui/src/components/ui/switch.tsx +0 -33
  332. package/new-ui/src/components/ui/table.tsx +0 -92
  333. package/new-ui/src/components/ui/tabs.tsx +0 -79
  334. package/new-ui/src/components/ui/textarea.tsx +0 -18
  335. package/new-ui/src/components/ui/tooltip.tsx +0 -51
  336. package/new-ui/src/components/workflows/action-node.tsx +0 -53
  337. package/new-ui/src/components/workflows/condition-node.tsx +0 -50
  338. package/new-ui/src/components/workflows/graph-utils.ts +0 -124
  339. package/new-ui/src/components/workflows/json-tree.tsx +0 -189
  340. package/new-ui/src/components/workflows/node-styles.ts +0 -10
  341. package/new-ui/src/components/workflows/step-detail-sheet.tsx +0 -87
  342. package/new-ui/src/components/workflows/trigger-node.tsx +0 -41
  343. package/new-ui/src/components/workflows/workflow-graph.tsx +0 -65
  344. package/new-ui/src/hooks/use-auto-scroll.ts +0 -82
  345. package/new-ui/src/hooks/use-config.ts +0 -203
  346. package/new-ui/src/hooks/use-keyboard-shortcuts.ts +0 -41
  347. package/new-ui/src/hooks/use-mobile.ts +0 -19
  348. package/new-ui/src/hooks/use-theme.ts +0 -60
  349. package/new-ui/src/lib/config.ts +0 -188
  350. package/new-ui/src/lib/slugs.ts +0 -71
  351. package/new-ui/src/lib/utils.ts +0 -120
  352. package/new-ui/src/main.tsx +0 -11
  353. package/new-ui/src/pages/agents/[id]/page.tsx +0 -492
  354. package/new-ui/src/pages/agents/page.tsx +0 -134
  355. package/new-ui/src/pages/chat/page.tsx +0 -674
  356. package/new-ui/src/pages/config/page.tsx +0 -1109
  357. package/new-ui/src/pages/dashboard/page.tsx +0 -454
  358. package/new-ui/src/pages/debug/page.tsx +0 -275
  359. package/new-ui/src/pages/epics/[id]/page.tsx +0 -809
  360. package/new-ui/src/pages/epics/page.tsx +0 -321
  361. package/new-ui/src/pages/not-found/page.tsx +0 -18
  362. package/new-ui/src/pages/repos/page.tsx +0 -369
  363. package/new-ui/src/pages/schedules/[id]/page.tsx +0 -664
  364. package/new-ui/src/pages/schedules/page.tsx +0 -477
  365. package/new-ui/src/pages/services/page.tsx +0 -128
  366. package/new-ui/src/pages/tasks/[id]/page.tsx +0 -670
  367. package/new-ui/src/pages/tasks/page.tsx +0 -592
  368. package/new-ui/src/pages/usage/page.tsx +0 -195
  369. package/new-ui/src/pages/workflow-runs/[id]/page.tsx +0 -363
  370. package/new-ui/src/pages/workflows/[id]/page.tsx +0 -417
  371. package/new-ui/src/pages/workflows/page.tsx +0 -266
  372. package/new-ui/src/styles/ag-grid.css +0 -36
  373. package/new-ui/src/styles/globals.css +0 -213
  374. package/new-ui/test-results/.last-run.json +0 -4
  375. package/new-ui/tsconfig.app.json +0 -34
  376. package/new-ui/tsconfig.json +0 -4
  377. package/new-ui/tsconfig.node.json +0 -26
  378. package/new-ui/vercel.json +0 -4
  379. package/new-ui/vite.config.ts +0 -28
  380. package/plugin/README.md +0 -1
  381. package/plugin/build-pi-skills.ts +0 -233
  382. package/plugin/hooks/hooks.json +0 -71
  383. package/prek.toml +0 -75
  384. package/pyproject.toml +0 -9
  385. package/scripts/check-db-boundary.sh +0 -60
  386. package/scripts/e2e-docker-provider.ts +0 -820
  387. package/scripts/e2e-io-schemas-test.ts +0 -807
  388. package/scripts/e2e-provider-test.ts +0 -220
  389. package/scripts/e2e-workflow-redesign.sh +0 -229
  390. package/scripts/e2e-workflow-test.sh +0 -285
  391. package/scripts/e2e-workflow-test.ts +0 -857
  392. package/scripts/generate-mcp-docs.ts +0 -415
  393. package/scripts/generate-openapi.ts +0 -26
  394. package/scripts/measure-tool-tokens.ts +0 -118
  395. package/scripts/x402-e2e-test.ts +0 -195
  396. package/scripts/x402-test-server.ts +0 -236
  397. package/scripts/x402-testnet-e2e.ts +0 -668
  398. package/slack-manifest.json +0 -88
  399. package/templates-ui/README.md +0 -46
  400. package/templates-ui/components.json +0 -17
  401. package/templates-ui/eslint.config.mjs +0 -18
  402. package/templates-ui/next.config.ts +0 -7
  403. package/templates-ui/package.json +0 -35
  404. package/templates-ui/pnpm-lock.yaml +0 -4571
  405. package/templates-ui/postcss.config.mjs +0 -7
  406. package/templates-ui/public/file.svg +0 -1
  407. package/templates-ui/public/globe.svg +0 -1
  408. package/templates-ui/public/logo.png +0 -0
  409. package/templates-ui/public/next.svg +0 -1
  410. package/templates-ui/public/vercel.svg +0 -1
  411. package/templates-ui/public/window.svg +0 -1
  412. package/templates-ui/src/app/[category]/[name]/page.tsx +0 -89
  413. package/templates-ui/src/app/api/templates/[...slug]/route.ts +0 -52
  414. package/templates-ui/src/app/api/templates/route.ts +0 -18
  415. package/templates-ui/src/app/builder/page.tsx +0 -37
  416. package/templates-ui/src/app/globals.css +0 -94
  417. package/templates-ui/src/app/layout.tsx +0 -79
  418. package/templates-ui/src/app/page.tsx +0 -38
  419. package/templates-ui/src/app/robots.ts +0 -11
  420. package/templates-ui/src/app/sitemap.ts +0 -31
  421. package/templates-ui/src/components/compose-builder.tsx +0 -442
  422. package/templates-ui/src/components/compose-preview.tsx +0 -117
  423. package/templates-ui/src/components/file-preview.tsx +0 -77
  424. package/templates-ui/src/components/footer.tsx +0 -40
  425. package/templates-ui/src/components/header.tsx +0 -41
  426. package/templates-ui/src/components/template-card.tsx +0 -87
  427. package/templates-ui/src/components/template-detail.tsx +0 -125
  428. package/templates-ui/src/components/template-gallery.tsx +0 -263
  429. package/templates-ui/src/components/ui/badge.tsx +0 -36
  430. package/templates-ui/src/components/ui/button.tsx +0 -57
  431. package/templates-ui/src/components/ui/card.tsx +0 -76
  432. package/templates-ui/src/components/ui/separator.tsx +0 -31
  433. package/templates-ui/src/components/ui/tooltip.tsx +0 -32
  434. package/templates-ui/src/lib/compose-generator.ts +0 -241
  435. package/templates-ui/src/lib/templates.ts +0 -137
  436. package/templates-ui/src/lib/utils.ts +0 -6
  437. package/templates-ui/tsconfig.json +0 -34
  438. package/thoughts/research/2026-02-28-openfort-viem-x402-research.md +0 -679
  439. package/thoughts/research/2026-02-28-x402-payments-research.md +0 -686
  440. package/thoughts/researcher/plans/2026-02-20-agent-self-improvement-plan.md +0 -282
  441. package/thoughts/researcher/research/2026-02-20-agent-self-improvement.md +0 -492
  442. package/thoughts/shared/plans/.gitkeep +0 -0
  443. package/thoughts/shared/plans/2025-12-18-slack-integration.md +0 -1195
  444. package/thoughts/shared/plans/2025-12-19-agent-log-streaming.md +0 -732
  445. package/thoughts/shared/plans/2025-12-19-role-based-swarm-plugin.md +0 -361
  446. package/thoughts/shared/plans/2025-12-20-mobile-responsive-ui.md +0 -501
  447. package/thoughts/shared/plans/2025-12-20-startup-team-swarm.md +0 -560
  448. package/thoughts/shared/plans/2025-12-23-runner-level-polling.md +0 -934
  449. package/thoughts/shared/plans/2025-12-23-runner-session-logs.md +0 -1000
  450. package/thoughts/shared/plans/2025-12-23-worker-lead-spawn-triggers.md +0 -568
  451. package/thoughts/shared/plans/2026-01-09-inverse-teleport.md +0 -1516
  452. package/thoughts/shared/plans/2026-01-12-agent-rename-pm2-control.md +0 -1133
  453. package/thoughts/shared/plans/2026-01-12-github-app-integration.md +0 -380
  454. package/thoughts/shared/plans/2026-01-12-lead-inbox-model.md +0 -876
  455. package/thoughts/shared/plans/2026-01-12-ralph-wiggum-integration.md +0 -463
  456. package/thoughts/shared/plans/2026-01-13-agent-concurrency.md +0 -691
  457. package/thoughts/shared/plans/2026-01-13-github-assignment-handling.md +0 -690
  458. package/thoughts/shared/plans/2026-01-13-prevent-duplicate-trigger-processing.md +0 -1071
  459. package/thoughts/shared/plans/2026-01-14-fix-slack-thread-context.md +0 -507
  460. package/thoughts/shared/plans/2026-01-15-scheduled-tasks-implementation.md +0 -565
  461. package/thoughts/shared/plans/2026-01-15-usage-cost-tracking-ui.md +0 -1479
  462. package/thoughts/shared/plans/2026-01-16-epics-feature-implementation.md +0 -1230
  463. package/thoughts/shared/plans/2026-02-26-mcp-tool-context-reduction.md +0 -282
  464. package/thoughts/shared/plans/2026-03-02-claude-context-mode-integration.md +0 -328
  465. package/thoughts/shared/plans/2026-03-02-code-level-heartbeat.md +0 -224
  466. package/thoughts/shared/research/.gitkeep +0 -0
  467. package/thoughts/shared/research/2025-01-09-inverse-teleport-plan-review.md +0 -420
  468. package/thoughts/shared/research/2025-12-18-slack-integration.md +0 -442
  469. package/thoughts/shared/research/2025-12-19-agent-log-streaming.md +0 -339
  470. package/thoughts/shared/research/2025-12-19-agent-secrets-cli-research.md +0 -390
  471. package/thoughts/shared/research/2025-12-21-gemini-cli-integration.md +0 -376
  472. package/thoughts/shared/research/2025-12-22-runner-loop-architecture.md +0 -582
  473. package/thoughts/shared/research/2025-12-22-setup-experience-improvements.md +0 -264
  474. package/thoughts/shared/research/2026-01-13-lead-duplicate-trigger-processing.md +0 -223
  475. package/thoughts/shared/research/2026-01-14-lead-slack-thread-context.md +0 -277
  476. package/thoughts/shared/research/2026-01-15-ai-tracker-agent-swarm-integration.md +0 -376
  477. package/thoughts/shared/research/2026-01-15-auto-starting-processes-in-worker-containers.md +0 -787
  478. package/thoughts/shared/research/2026-01-15-scheduled-tasks.md +0 -390
  479. package/thoughts/shared/research/2026-01-16-epics-feature-research.md +0 -437
  480. package/thoughts/shared/research/2026-02-26-cliffy-mcp-tools.md +0 -159
  481. package/thoughts/shared/research/2026-03-03-database-migration-system-refactor.md +0 -337
  482. package/thoughts/swarm-researcher/plans/2026-02-23-openclaw-improvements-plan.md +0 -778
  483. package/thoughts/swarm-researcher/plans/2026-02-26-artifacts-localtunnel-plan.md +0 -1269
  484. package/thoughts/swarm-researcher/research/2026-02-23-openclaw-vs-agent-swarm-comparison.md +0 -411
  485. package/thoughts/swarm-researcher/research/2026-02-26-artifacts-localtunnel.md +0 -724
  486. package/thoughts/taras/brainstorms/2026-03-20-prompt-template-registry.md +0 -443
  487. package/thoughts/taras/brainstorms/2026-03-20-setup-cli-onboarding.md +0 -307
  488. package/thoughts/taras/plans/2026-01-22-agent-swarm-schemas.md +0 -98
  489. package/thoughts/taras/plans/2026-01-28-per-worker-claude-md.md +0 -617
  490. package/thoughts/taras/plans/2026-01-28-sentry-cli-integration.md +0 -214
  491. package/thoughts/taras/plans/2026-02-20-auto-improvement.md +0 -803
  492. package/thoughts/taras/plans/2026-02-20-env-management.md +0 -538
  493. package/thoughts/taras/plans/2026-02-20-memory-system.md +0 -882
  494. package/thoughts/taras/plans/2026-02-20-repos-knowledge.md +0 -806
  495. package/thoughts/taras/plans/2026-02-20-session-attach.md +0 -647
  496. package/thoughts/taras/plans/2026-02-20-worker-identity.md +0 -820
  497. package/thoughts/taras/plans/2026-02-25-feat-new-ui-visual-redesign-plan.md +0 -768
  498. package/thoughts/taras/plans/2026-03-04-fix-buildSystemPrompt-missing-fields.md +0 -77
  499. package/thoughts/taras/plans/2026-03-04-new-ui-missing-actions.md +0 -543
  500. package/thoughts/taras/plans/2026-03-06-one-time-scheduled-tasks.md +0 -373
  501. package/thoughts/taras/plans/2026-03-08-memory-self-improvement-enhancements.md +0 -512
  502. package/thoughts/taras/plans/2026-03-08-pi-mono-provider-implementation.md +0 -919
  503. package/thoughts/taras/plans/2026-03-09-templates-registry.md +0 -723
  504. package/thoughts/taras/plans/2026-03-10-task-working-directory.md +0 -371
  505. package/thoughts/taras/plans/2026-03-11-archil-per-agent-write-strategy.md +0 -621
  506. package/thoughts/taras/plans/2026-03-12-eliminate-inbox-route-to-tasks.md +0 -61
  507. package/thoughts/taras/plans/2026-03-12-slack-thread-followup-additive.md +0 -488
  508. package/thoughts/taras/plans/2026-03-13-slack-ai-improvements.md +0 -644
  509. package/thoughts/taras/plans/2026-03-16-route-wrapper-openapi.md +0 -636
  510. package/thoughts/taras/plans/2026-03-17-multi-api-config.md +0 -444
  511. package/thoughts/taras/plans/2026-03-18-agent-fs-integration.md +0 -591
  512. package/thoughts/taras/plans/2026-03-18-debug-db-explorer.md +0 -446
  513. package/thoughts/taras/plans/2026-03-18-workflow-redesign.md +0 -987
  514. package/thoughts/taras/plans/2026-03-19-compound-learnings.md +0 -403
  515. package/thoughts/taras/plans/2026-03-19-ticket-tracker-linear-integration.md +0 -860
  516. package/thoughts/taras/plans/2026-03-19-workflow-io-schemas-and-bugs.md +0 -899
  517. package/thoughts/taras/plans/2026-03-20-setup-cli-onboarding.md +0 -874
  518. package/thoughts/taras/plans/2026-03-20-workflow-structured-output-validation-workspace.md +0 -723
  519. package/thoughts/taras/research/2026-01-22-vercel-cli-integration.md +0 -287
  520. package/thoughts/taras/research/2026-01-27-excessive-polling-issue.md +0 -311
  521. package/thoughts/taras/research/2026-01-28-per-worker-claude-md.md +0 -383
  522. package/thoughts/taras/research/2026-01-28-sentry-cli-integration.md +0 -240
  523. package/thoughts/taras/research/2026-02-19-agent-native-swarm-architecture.md +0 -390
  524. package/thoughts/taras/research/2026-02-19-swarm-gaps-implementation.md +0 -594
  525. package/thoughts/taras/research/2026-02-25-dashboard-ui-design-best-practices.md +0 -825
  526. package/thoughts/taras/research/2026-02-26-task-detail-page-redesign.md +0 -393
  527. package/thoughts/taras/research/2026-03-03-new-ui-missing-actions.md +0 -168
  528. package/thoughts/taras/research/2026-03-05-pi-mono-provider-research.md +0 -230
  529. package/thoughts/taras/research/2026-03-06-workflow-engine-design.md +0 -445
  530. package/thoughts/taras/research/2026-03-08-drive-loop-concept.md +0 -375
  531. package/thoughts/taras/research/2026-03-08-pi-mono-deep-dive.md +0 -869
  532. package/thoughts/taras/research/2026-03-09-templates-registry.md +0 -373
  533. package/thoughts/taras/research/2026-03-10-agent-working-directory.md +0 -223
  534. package/thoughts/taras/research/2026-03-10-configurable-event-prompts.md +0 -339
  535. package/thoughts/taras/research/2026-03-11-archil-production-setup.md +0 -181
  536. package/thoughts/taras/research/2026-03-11-archil-shared-disk-write-strategies.md +0 -437
  537. package/thoughts/taras/research/2026-03-13-slack-ai-features.md +0 -258
  538. package/thoughts/taras/research/2026-03-16-openapi-docs-generation.md +0 -335
  539. package/thoughts/taras/research/2026-03-16-route-wrapper-openapi.md +0 -670
  540. package/thoughts/taras/research/2026-03-16-slack-thread-followups-e2e.md +0 -54
  541. package/thoughts/taras/research/2026-03-18-agent-fs-integration.md +0 -558
  542. package/thoughts/taras/research/2026-03-18-linear-integration-finalization.md +0 -526
  543. package/thoughts/taras/research/2026-03-18-workflow-redesign.md +0 -797
  544. package/thoughts/taras/research/2026-03-19-workflow-node-io-schemas-and-bugs.md +0 -563
  545. package/thoughts/taras/research/2026-03-19-workflow-structured-output-validation-workspace.md +0 -486
  546. package/thoughts/taras/research/2026-03-20-prompt-template-registry.md +0 -469
  547. package/tsconfig.json +0 -37
package/openapi.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "Agent Swarm API",
5
- "version": "1.49.0",
5
+ "version": "1.52.0",
6
6
  "description": "Multi-agent orchestration API for Claude Code, Codex, and Gemini CLI. Enables task distribution, agent communication, and service discovery.\n\nMCP tools are documented separately in [MCP.md](./MCP.md)."
7
7
  },
8
8
  "servers": [
@@ -89,6 +89,9 @@
89
89
  },
90
90
  "taskDescription": {
91
91
  "type": "string"
92
+ },
93
+ "runnerSessionId": {
94
+ "type": "string"
92
95
  }
93
96
  },
94
97
  "required": [
@@ -193,6 +196,52 @@
193
196
  }
194
197
  }
195
198
  },
199
+ "/api/active-sessions/provider-session/{taskId}": {
200
+ "put": {
201
+ "summary": "Update provider session ID on an active session",
202
+ "tags": [
203
+ "Active Sessions"
204
+ ],
205
+ "security": [
206
+ {
207
+ "bearerAuth": []
208
+ }
209
+ ],
210
+ "parameters": [
211
+ {
212
+ "schema": {
213
+ "type": "string"
214
+ },
215
+ "required": true,
216
+ "name": "taskId",
217
+ "in": "path"
218
+ }
219
+ ],
220
+ "requestBody": {
221
+ "content": {
222
+ "application/json": {
223
+ "schema": {
224
+ "type": "object",
225
+ "properties": {
226
+ "providerSessionId": {
227
+ "type": "string",
228
+ "minLength": 1
229
+ }
230
+ },
231
+ "required": [
232
+ "providerSessionId"
233
+ ]
234
+ }
235
+ }
236
+ }
237
+ },
238
+ "responses": {
239
+ "200": {
240
+ "description": "Provider session ID updated"
241
+ }
242
+ }
243
+ }
244
+ },
196
245
  "/api/active-sessions/cleanup": {
197
246
  "post": {
198
247
  "summary": "Clean up stale sessions",
@@ -557,11 +606,210 @@
557
606
  }
558
607
  }
559
608
  },
560
- "/api/config/resolved": {
609
+ "/api/approval-requests": {
610
+ "post": {
611
+ "summary": "Create a new approval request",
612
+ "tags": [
613
+ "ApprovalRequests"
614
+ ],
615
+ "security": [
616
+ {
617
+ "bearerAuth": []
618
+ }
619
+ ],
620
+ "requestBody": {
621
+ "content": {
622
+ "application/json": {
623
+ "schema": {
624
+ "type": "object",
625
+ "properties": {
626
+ "title": {
627
+ "type": "string",
628
+ "minLength": 1
629
+ },
630
+ "questions": {
631
+ "type": "array",
632
+ "items": {
633
+ "type": "object",
634
+ "properties": {
635
+ "id": {
636
+ "type": "string"
637
+ },
638
+ "type": {
639
+ "type": "string",
640
+ "enum": [
641
+ "approval",
642
+ "text",
643
+ "single-select",
644
+ "multi-select",
645
+ "boolean"
646
+ ]
647
+ },
648
+ "label": {
649
+ "type": "string"
650
+ },
651
+ "required": {
652
+ "type": "boolean"
653
+ },
654
+ "description": {
655
+ "type": "string"
656
+ },
657
+ "placeholder": {
658
+ "type": "string"
659
+ },
660
+ "multiline": {
661
+ "type": "boolean"
662
+ },
663
+ "options": {
664
+ "type": "array",
665
+ "items": {
666
+ "type": "object",
667
+ "properties": {
668
+ "value": {
669
+ "type": "string"
670
+ },
671
+ "label": {
672
+ "type": "string"
673
+ },
674
+ "description": {
675
+ "type": "string"
676
+ }
677
+ },
678
+ "required": [
679
+ "value",
680
+ "label"
681
+ ]
682
+ }
683
+ },
684
+ "minSelections": {
685
+ "type": "integer",
686
+ "minimum": 0
687
+ },
688
+ "maxSelections": {
689
+ "type": "integer",
690
+ "minimum": 1
691
+ },
692
+ "defaultValue": {
693
+ "type": "boolean"
694
+ }
695
+ },
696
+ "required": [
697
+ "id",
698
+ "type",
699
+ "label"
700
+ ]
701
+ },
702
+ "minItems": 1
703
+ },
704
+ "approvers": {
705
+ "type": "object",
706
+ "properties": {
707
+ "users": {
708
+ "type": "array",
709
+ "items": {
710
+ "type": "string"
711
+ }
712
+ },
713
+ "roles": {
714
+ "type": "array",
715
+ "items": {
716
+ "type": "string"
717
+ }
718
+ },
719
+ "policy": {
720
+ "anyOf": [
721
+ {
722
+ "type": "string",
723
+ "enum": [
724
+ "any"
725
+ ]
726
+ },
727
+ {
728
+ "type": "string",
729
+ "enum": [
730
+ "all"
731
+ ]
732
+ },
733
+ {
734
+ "type": "object",
735
+ "properties": {
736
+ "min": {
737
+ "type": "integer",
738
+ "minimum": 1
739
+ }
740
+ },
741
+ "required": [
742
+ "min"
743
+ ]
744
+ }
745
+ ]
746
+ }
747
+ },
748
+ "required": [
749
+ "policy"
750
+ ]
751
+ },
752
+ "workflowRunId": {
753
+ "type": "string",
754
+ "format": "uuid"
755
+ },
756
+ "workflowRunStepId": {
757
+ "type": "string",
758
+ "format": "uuid"
759
+ },
760
+ "sourceTaskId": {
761
+ "type": "string",
762
+ "format": "uuid"
763
+ },
764
+ "timeoutSeconds": {
765
+ "type": "integer",
766
+ "minimum": 1
767
+ },
768
+ "notifications": {
769
+ "type": "array",
770
+ "items": {
771
+ "type": "object",
772
+ "properties": {
773
+ "channel": {
774
+ "type": "string",
775
+ "enum": [
776
+ "slack",
777
+ "email"
778
+ ]
779
+ },
780
+ "target": {
781
+ "type": "string"
782
+ }
783
+ },
784
+ "required": [
785
+ "channel",
786
+ "target"
787
+ ]
788
+ }
789
+ }
790
+ },
791
+ "required": [
792
+ "title",
793
+ "questions",
794
+ "approvers"
795
+ ]
796
+ }
797
+ }
798
+ }
799
+ },
800
+ "responses": {
801
+ "201": {
802
+ "description": "Approval request created"
803
+ },
804
+ "400": {
805
+ "description": "Validation error"
806
+ }
807
+ }
808
+ },
561
809
  "get": {
562
- "summary": "Get resolved config (merged global + agent + repo scopes)",
810
+ "summary": "List approval requests with optional filters",
563
811
  "tags": [
564
- "Config"
812
+ "ApprovalRequests"
565
813
  ],
566
814
  "security": [
567
815
  {
@@ -574,7 +822,7 @@
574
822
  "type": "string"
575
823
  },
576
824
  "required": false,
577
- "name": "agentId",
825
+ "name": "status",
578
826
  "in": "query"
579
827
  },
580
828
  {
@@ -582,34 +830,33 @@
582
830
  "type": "string"
583
831
  },
584
832
  "required": false,
585
- "name": "repoId",
833
+ "name": "workflowRunId",
586
834
  "in": "query"
587
835
  },
588
836
  {
589
837
  "schema": {
590
- "type": "string",
591
- "enum": [
592
- "true",
593
- "false"
838
+ "type": [
839
+ "number",
840
+ "null"
594
841
  ]
595
842
  },
596
843
  "required": false,
597
- "name": "includeSecrets",
844
+ "name": "limit",
598
845
  "in": "query"
599
846
  }
600
847
  ],
601
848
  "responses": {
602
849
  "200": {
603
- "description": "Resolved config entries"
850
+ "description": "List of approval requests"
604
851
  }
605
852
  }
606
853
  }
607
854
  },
608
- "/api/config/{id}": {
855
+ "/api/approval-requests/{id}": {
609
856
  "get": {
610
- "summary": "Get a single config entry by ID",
857
+ "summary": "Get approval request details",
611
858
  "tags": [
612
- "Config"
859
+ "ApprovalRequests"
613
860
  ],
614
861
  "security": [
615
862
  {
@@ -619,38 +866,29 @@
619
866
  "parameters": [
620
867
  {
621
868
  "schema": {
622
- "type": "string"
869
+ "type": "string",
870
+ "format": "uuid"
623
871
  },
624
872
  "required": true,
625
873
  "name": "id",
626
874
  "in": "path"
627
- },
628
- {
629
- "schema": {
630
- "type": "string",
631
- "enum": [
632
- "true",
633
- "false"
634
- ]
635
- },
636
- "required": false,
637
- "name": "includeSecrets",
638
- "in": "query"
639
875
  }
640
876
  ],
641
877
  "responses": {
642
878
  "200": {
643
- "description": "Config entry"
879
+ "description": "Approval request details"
644
880
  },
645
881
  "404": {
646
- "description": "Config not found"
882
+ "description": "Not found"
647
883
  }
648
884
  }
649
- },
650
- "delete": {
651
- "summary": "Delete a config entry",
885
+ }
886
+ },
887
+ "/api/approval-requests/{id}/respond": {
888
+ "post": {
889
+ "summary": "Submit a response to an approval request",
652
890
  "tags": [
653
- "Config"
891
+ "ApprovalRequests"
654
892
  ],
655
893
  "security": [
656
894
  {
@@ -660,26 +898,54 @@
660
898
  "parameters": [
661
899
  {
662
900
  "schema": {
663
- "type": "string"
901
+ "type": "string",
902
+ "format": "uuid"
664
903
  },
665
904
  "required": true,
666
905
  "name": "id",
667
906
  "in": "path"
668
907
  }
669
908
  ],
909
+ "requestBody": {
910
+ "content": {
911
+ "application/json": {
912
+ "schema": {
913
+ "type": "object",
914
+ "properties": {
915
+ "responses": {
916
+ "type": "object",
917
+ "additionalProperties": {}
918
+ },
919
+ "respondedBy": {
920
+ "type": "string"
921
+ }
922
+ },
923
+ "required": [
924
+ "responses"
925
+ ]
926
+ }
927
+ }
928
+ }
929
+ },
670
930
  "responses": {
671
931
  "200": {
672
- "description": "Config deleted"
932
+ "description": "Response recorded"
933
+ },
934
+ "400": {
935
+ "description": "Validation error"
673
936
  },
674
937
  "404": {
675
- "description": "Config not found"
938
+ "description": "Not found"
939
+ },
940
+ "409": {
941
+ "description": "Already resolved"
676
942
  }
677
943
  }
678
944
  }
679
945
  },
680
- "/api/config": {
946
+ "/api/config/resolved": {
681
947
  "get": {
682
- "summary": "List config entries with optional filters",
948
+ "summary": "Get resolved config (merged global + agent + repo scopes)",
683
949
  "tags": [
684
950
  "Config"
685
951
  ],
@@ -694,7 +960,7 @@
694
960
  "type": "string"
695
961
  },
696
962
  "required": false,
697
- "name": "scope",
963
+ "name": "agentId",
698
964
  "in": "query"
699
965
  },
700
966
  {
@@ -702,7 +968,7 @@
702
968
  "type": "string"
703
969
  },
704
970
  "required": false,
705
- "name": "scopeId",
971
+ "name": "repoId",
706
972
  "in": "query"
707
973
  },
708
974
  {
@@ -720,12 +986,14 @@
720
986
  ],
721
987
  "responses": {
722
988
  "200": {
723
- "description": "List of config entries"
989
+ "description": "Resolved config entries"
724
990
  }
725
991
  }
726
- },
727
- "put": {
728
- "summary": "Create or update a config entry",
992
+ }
993
+ },
994
+ "/api/config/{id}": {
995
+ "get": {
996
+ "summary": "Get a single config entry by ID",
729
997
  "tags": [
730
998
  "Config"
731
999
  ],
@@ -734,22 +1002,143 @@
734
1002
  "bearerAuth": []
735
1003
  }
736
1004
  ],
737
- "requestBody": {
738
- "content": {
739
- "application/json": {
740
- "schema": {
741
- "type": "object",
742
- "properties": {
743
- "scope": {
744
- "type": "string",
745
- "enum": [
746
- "global",
747
- "agent",
748
- "repo"
1005
+ "parameters": [
1006
+ {
1007
+ "schema": {
1008
+ "type": "string"
1009
+ },
1010
+ "required": true,
1011
+ "name": "id",
1012
+ "in": "path"
1013
+ },
1014
+ {
1015
+ "schema": {
1016
+ "type": "string",
1017
+ "enum": [
1018
+ "true",
1019
+ "false"
1020
+ ]
1021
+ },
1022
+ "required": false,
1023
+ "name": "includeSecrets",
1024
+ "in": "query"
1025
+ }
1026
+ ],
1027
+ "responses": {
1028
+ "200": {
1029
+ "description": "Config entry"
1030
+ },
1031
+ "404": {
1032
+ "description": "Config not found"
1033
+ }
1034
+ }
1035
+ },
1036
+ "delete": {
1037
+ "summary": "Delete a config entry",
1038
+ "tags": [
1039
+ "Config"
1040
+ ],
1041
+ "security": [
1042
+ {
1043
+ "bearerAuth": []
1044
+ }
1045
+ ],
1046
+ "parameters": [
1047
+ {
1048
+ "schema": {
1049
+ "type": "string"
1050
+ },
1051
+ "required": true,
1052
+ "name": "id",
1053
+ "in": "path"
1054
+ }
1055
+ ],
1056
+ "responses": {
1057
+ "200": {
1058
+ "description": "Config deleted"
1059
+ },
1060
+ "404": {
1061
+ "description": "Config not found"
1062
+ }
1063
+ }
1064
+ }
1065
+ },
1066
+ "/api/config": {
1067
+ "get": {
1068
+ "summary": "List config entries with optional filters",
1069
+ "tags": [
1070
+ "Config"
1071
+ ],
1072
+ "security": [
1073
+ {
1074
+ "bearerAuth": []
1075
+ }
1076
+ ],
1077
+ "parameters": [
1078
+ {
1079
+ "schema": {
1080
+ "type": "string"
1081
+ },
1082
+ "required": false,
1083
+ "name": "scope",
1084
+ "in": "query"
1085
+ },
1086
+ {
1087
+ "schema": {
1088
+ "type": "string"
1089
+ },
1090
+ "required": false,
1091
+ "name": "scopeId",
1092
+ "in": "query"
1093
+ },
1094
+ {
1095
+ "schema": {
1096
+ "type": "string",
1097
+ "enum": [
1098
+ "true",
1099
+ "false"
1100
+ ]
1101
+ },
1102
+ "required": false,
1103
+ "name": "includeSecrets",
1104
+ "in": "query"
1105
+ }
1106
+ ],
1107
+ "responses": {
1108
+ "200": {
1109
+ "description": "List of config entries"
1110
+ }
1111
+ }
1112
+ },
1113
+ "put": {
1114
+ "summary": "Create or update a config entry",
1115
+ "tags": [
1116
+ "Config"
1117
+ ],
1118
+ "security": [
1119
+ {
1120
+ "bearerAuth": []
1121
+ }
1122
+ ],
1123
+ "requestBody": {
1124
+ "content": {
1125
+ "application/json": {
1126
+ "schema": {
1127
+ "type": "object",
1128
+ "properties": {
1129
+ "scope": {
1130
+ "type": "string",
1131
+ "enum": [
1132
+ "global",
1133
+ "agent",
1134
+ "repo"
749
1135
  ]
750
1136
  },
751
1137
  "scopeId": {
752
- "type": "string"
1138
+ "type": [
1139
+ "string",
1140
+ "null"
1141
+ ]
753
1142
  },
754
1143
  "key": {
755
1144
  "type": "string",
@@ -760,10 +1149,16 @@
760
1149
  "type": "boolean"
761
1150
  },
762
1151
  "envPath": {
763
- "type": "string"
1152
+ "type": [
1153
+ "string",
1154
+ "null"
1155
+ ]
764
1156
  },
765
1157
  "description": {
766
- "type": "string"
1158
+ "type": [
1159
+ "string",
1160
+ "null"
1161
+ ]
767
1162
  }
768
1163
  },
769
1164
  "required": [
@@ -1542,128 +1937,169 @@
1542
1937
  }
1543
1938
  }
1544
1939
  },
1545
- "/api/poll": {
1940
+ "/api/prompt-templates/resolved": {
1546
1941
  "get": {
1547
- "summary": "Poll for triggers (tasks, mentions, epic updates)",
1942
+ "summary": "Resolve a prompt template for a given event type and scope chain",
1548
1943
  "tags": [
1549
- "Poll"
1944
+ "PromptTemplates"
1550
1945
  ],
1551
1946
  "security": [
1552
1947
  {
1553
1948
  "bearerAuth": []
1554
1949
  }
1555
1950
  ],
1951
+ "parameters": [
1952
+ {
1953
+ "schema": {
1954
+ "type": "string"
1955
+ },
1956
+ "required": true,
1957
+ "name": "eventType",
1958
+ "in": "query"
1959
+ },
1960
+ {
1961
+ "schema": {
1962
+ "type": "string"
1963
+ },
1964
+ "required": false,
1965
+ "name": "agentId",
1966
+ "in": "query"
1967
+ },
1968
+ {
1969
+ "schema": {
1970
+ "type": "string"
1971
+ },
1972
+ "required": false,
1973
+ "name": "repoId",
1974
+ "in": "query"
1975
+ }
1976
+ ],
1556
1977
  "responses": {
1557
1978
  "200": {
1558
- "description": "Trigger data or null"
1979
+ "description": "Resolved template info"
1559
1980
  },
1560
1981
  "400": {
1561
- "description": "Missing X-Agent-ID"
1562
- },
1563
- "404": {
1564
- "description": "Agent not found"
1982
+ "description": "Missing eventType"
1565
1983
  }
1566
1984
  }
1567
1985
  }
1568
1986
  },
1569
- "/api/repos/{id}": {
1987
+ "/api/prompt-templates/events": {
1570
1988
  "get": {
1571
- "summary": "Get a repo by ID",
1989
+ "summary": "List all registered event types with their available variables",
1572
1990
  "tags": [
1573
- "Repos"
1991
+ "PromptTemplates"
1574
1992
  ],
1575
1993
  "security": [
1576
1994
  {
1577
1995
  "bearerAuth": []
1578
1996
  }
1579
1997
  ],
1580
- "parameters": [
1998
+ "responses": {
1999
+ "200": {
2000
+ "description": "List of event template definitions"
2001
+ }
2002
+ }
2003
+ }
2004
+ },
2005
+ "/api/prompt-templates/preview": {
2006
+ "post": {
2007
+ "summary": "Dry-run render a template with provided variables",
2008
+ "tags": [
2009
+ "PromptTemplates"
2010
+ ],
2011
+ "security": [
1581
2012
  {
1582
- "schema": {
1583
- "type": "string",
1584
- "format": "uuid"
1585
- },
1586
- "required": true,
1587
- "name": "id",
1588
- "in": "path"
2013
+ "bearerAuth": []
1589
2014
  }
1590
2015
  ],
2016
+ "requestBody": {
2017
+ "content": {
2018
+ "application/json": {
2019
+ "schema": {
2020
+ "type": "object",
2021
+ "properties": {
2022
+ "eventType": {
2023
+ "type": "string"
2024
+ },
2025
+ "body": {
2026
+ "type": "string"
2027
+ },
2028
+ "variables": {
2029
+ "type": "object",
2030
+ "additionalProperties": {}
2031
+ }
2032
+ },
2033
+ "required": [
2034
+ "eventType"
2035
+ ]
2036
+ }
2037
+ }
2038
+ }
2039
+ },
1591
2040
  "responses": {
1592
2041
  "200": {
1593
- "description": "Repo details",
1594
- "content": {
1595
- "application/json": {
1596
- "schema": {
1597
- "type": "object",
1598
- "properties": {
1599
- "id": {
1600
- "type": "string",
1601
- "format": "uuid"
1602
- },
1603
- "url": {
1604
- "type": "string",
1605
- "minLength": 1
1606
- },
1607
- "name": {
1608
- "type": "string",
1609
- "minLength": 1,
1610
- "maxLength": 100
1611
- },
1612
- "clonePath": {
1613
- "type": "string",
1614
- "minLength": 1
1615
- },
1616
- "defaultBranch": {
1617
- "type": "string",
1618
- "default": "main"
1619
- },
1620
- "autoClone": {
1621
- "type": "boolean",
1622
- "default": true
1623
- },
1624
- "createdAt": {
1625
- "type": "string"
1626
- },
1627
- "lastUpdatedAt": {
1628
- "type": "string"
1629
- }
1630
- },
1631
- "required": [
1632
- "id",
1633
- "url",
1634
- "name",
1635
- "clonePath",
1636
- "createdAt",
1637
- "lastUpdatedAt"
1638
- ]
1639
- }
1640
- }
1641
- }
2042
+ "description": "Rendered template preview"
1642
2043
  },
1643
- "404": {
1644
- "description": "Repo not found",
1645
- "content": {
1646
- "application/json": {
1647
- "schema": {
1648
- "type": "object",
1649
- "properties": {
1650
- "error": {
1651
- "type": "string"
1652
- }
2044
+ "400": {
2045
+ "description": "Validation error"
2046
+ }
2047
+ }
2048
+ }
2049
+ },
2050
+ "/api/prompt-templates/render": {
2051
+ "post": {
2052
+ "summary": "Full scope-aware template resolution with interpolation (used by workers via HTTP)",
2053
+ "tags": [
2054
+ "PromptTemplates"
2055
+ ],
2056
+ "security": [
2057
+ {
2058
+ "bearerAuth": []
2059
+ }
2060
+ ],
2061
+ "requestBody": {
2062
+ "content": {
2063
+ "application/json": {
2064
+ "schema": {
2065
+ "type": "object",
2066
+ "properties": {
2067
+ "eventType": {
2068
+ "type": "string"
1653
2069
  },
1654
- "required": [
1655
- "error"
1656
- ]
1657
- }
2070
+ "variables": {
2071
+ "type": "object",
2072
+ "additionalProperties": {}
2073
+ },
2074
+ "agentId": {
2075
+ "type": "string"
2076
+ },
2077
+ "repoId": {
2078
+ "type": "string"
2079
+ }
2080
+ },
2081
+ "required": [
2082
+ "eventType"
2083
+ ]
1658
2084
  }
1659
2085
  }
1660
2086
  }
2087
+ },
2088
+ "responses": {
2089
+ "200": {
2090
+ "description": "Fully resolved and interpolated template"
2091
+ },
2092
+ "400": {
2093
+ "description": "Validation error"
2094
+ }
1661
2095
  }
1662
- },
1663
- "put": {
1664
- "summary": "Update a repo",
2096
+ }
2097
+ },
2098
+ "/api/prompt-templates/{id}/checkout": {
2099
+ "post": {
2100
+ "summary": "Checkout a specific version of a prompt template from history",
1665
2101
  "tags": [
1666
- "Repos"
2102
+ "PromptTemplates"
1667
2103
  ],
1668
2104
  "security": [
1669
2105
  {
@@ -1673,8 +2109,7 @@
1673
2109
  "parameters": [
1674
2110
  {
1675
2111
  "schema": {
1676
- "type": "string",
1677
- "format": "uuid"
2112
+ "type": "string"
1678
2113
  },
1679
2114
  "required": true,
1680
2115
  "name": "id",
@@ -1687,120 +2122,35 @@
1687
2122
  "schema": {
1688
2123
  "type": "object",
1689
2124
  "properties": {
1690
- "url": {
1691
- "type": "string"
1692
- },
1693
- "name": {
1694
- "type": "string"
1695
- },
1696
- "clonePath": {
1697
- "type": "string"
1698
- },
1699
- "defaultBranch": {
1700
- "type": "string"
1701
- },
1702
- "autoClone": {
1703
- "type": "boolean"
2125
+ "version": {
2126
+ "type": "number"
1704
2127
  }
1705
- }
2128
+ },
2129
+ "required": [
2130
+ "version"
2131
+ ]
1706
2132
  }
1707
2133
  }
1708
2134
  }
1709
2135
  },
1710
2136
  "responses": {
1711
2137
  "200": {
1712
- "description": "Repo updated",
1713
- "content": {
1714
- "application/json": {
1715
- "schema": {
1716
- "type": "object",
1717
- "properties": {
1718
- "id": {
1719
- "type": "string",
1720
- "format": "uuid"
1721
- },
1722
- "url": {
1723
- "type": "string",
1724
- "minLength": 1
1725
- },
1726
- "name": {
1727
- "type": "string",
1728
- "minLength": 1,
1729
- "maxLength": 100
1730
- },
1731
- "clonePath": {
1732
- "type": "string",
1733
- "minLength": 1
1734
- },
1735
- "defaultBranch": {
1736
- "type": "string",
1737
- "default": "main"
1738
- },
1739
- "autoClone": {
1740
- "type": "boolean",
1741
- "default": true
1742
- },
1743
- "createdAt": {
1744
- "type": "string"
1745
- },
1746
- "lastUpdatedAt": {
1747
- "type": "string"
1748
- }
1749
- },
1750
- "required": [
1751
- "id",
1752
- "url",
1753
- "name",
1754
- "clonePath",
1755
- "createdAt",
1756
- "lastUpdatedAt"
1757
- ]
1758
- }
1759
- }
1760
- }
2138
+ "description": "Checked-out template"
1761
2139
  },
1762
- "404": {
1763
- "description": "Repo not found",
1764
- "content": {
1765
- "application/json": {
1766
- "schema": {
1767
- "type": "object",
1768
- "properties": {
1769
- "error": {
1770
- "type": "string"
1771
- }
1772
- },
1773
- "required": [
1774
- "error"
1775
- ]
1776
- }
1777
- }
1778
- }
2140
+ "400": {
2141
+ "description": "Validation error"
1779
2142
  },
1780
- "409": {
1781
- "description": "Duplicate repo",
1782
- "content": {
1783
- "application/json": {
1784
- "schema": {
1785
- "type": "object",
1786
- "properties": {
1787
- "error": {
1788
- "type": "string"
1789
- }
1790
- },
1791
- "required": [
1792
- "error"
1793
- ]
1794
- }
1795
- }
1796
- }
2143
+ "404": {
2144
+ "description": "Template or version not found"
1797
2145
  }
1798
2146
  }
1799
- },
1800
- "delete": {
1801
- "summary": "Delete a repo",
2147
+ }
2148
+ },
2149
+ "/api/prompt-templates/{id}/reset": {
2150
+ "post": {
2151
+ "summary": "Reset a prompt template to its code-defined default",
1802
2152
  "tags": [
1803
- "Repos"
2153
+ "PromptTemplates"
1804
2154
  ],
1805
2155
  "security": [
1806
2156
  {
@@ -1810,8 +2160,7 @@
1810
2160
  "parameters": [
1811
2161
  {
1812
2162
  "schema": {
1813
- "type": "string",
1814
- "format": "uuid"
2163
+ "type": "string"
1815
2164
  },
1816
2165
  "required": true,
1817
2166
  "name": "id",
@@ -1820,49 +2169,19 @@
1820
2169
  ],
1821
2170
  "responses": {
1822
2171
  "200": {
1823
- "description": "Repo deleted",
1824
- "content": {
1825
- "application/json": {
1826
- "schema": {
1827
- "type": "object",
1828
- "properties": {
1829
- "success": {
1830
- "type": "boolean"
1831
- }
1832
- },
1833
- "required": [
1834
- "success"
1835
- ]
1836
- }
1837
- }
1838
- }
2172
+ "description": "Reset template"
1839
2173
  },
1840
2174
  "404": {
1841
- "description": "Repo not found",
1842
- "content": {
1843
- "application/json": {
1844
- "schema": {
1845
- "type": "object",
1846
- "properties": {
1847
- "error": {
1848
- "type": "string"
1849
- }
1850
- },
1851
- "required": [
1852
- "error"
1853
- ]
1854
- }
1855
- }
1856
- }
2175
+ "description": "Template not found or no code default available"
1857
2176
  }
1858
2177
  }
1859
2178
  }
1860
2179
  },
1861
- "/api/repos": {
2180
+ "/api/prompt-templates/{id}": {
1862
2181
  "get": {
1863
- "summary": "List repos with optional filters",
2182
+ "summary": "Get a single prompt template with its version history",
1864
2183
  "tags": [
1865
- "Repos"
2184
+ "PromptTemplates"
1866
2185
  ],
1867
2186
  "security": [
1868
2187
  {
@@ -1870,96 +2189,116 @@
1870
2189
  }
1871
2190
  ],
1872
2191
  "parameters": [
1873
- {
1874
- "schema": {
1875
- "type": "string",
1876
- "enum": [
1877
- "true",
1878
- "false"
1879
- ]
1880
- },
1881
- "required": false,
1882
- "name": "autoClone",
1883
- "in": "query"
1884
- },
1885
2192
  {
1886
2193
  "schema": {
1887
2194
  "type": "string"
1888
2195
  },
1889
- "required": false,
1890
- "name": "name",
1891
- "in": "query"
2196
+ "required": true,
2197
+ "name": "id",
2198
+ "in": "path"
1892
2199
  }
1893
2200
  ],
1894
2201
  "responses": {
1895
2202
  "200": {
1896
- "description": "List of repos",
1897
- "content": {
1898
- "application/json": {
1899
- "schema": {
1900
- "type": "object",
1901
- "properties": {
1902
- "repos": {
1903
- "type": "array",
1904
- "items": {
1905
- "type": "object",
1906
- "properties": {
1907
- "id": {
1908
- "type": "string",
1909
- "format": "uuid"
1910
- },
1911
- "url": {
1912
- "type": "string",
1913
- "minLength": 1
1914
- },
1915
- "name": {
1916
- "type": "string",
1917
- "minLength": 1,
1918
- "maxLength": 100
1919
- },
1920
- "clonePath": {
1921
- "type": "string",
1922
- "minLength": 1
1923
- },
1924
- "defaultBranch": {
1925
- "type": "string",
1926
- "default": "main"
1927
- },
1928
- "autoClone": {
1929
- "type": "boolean",
1930
- "default": true
1931
- },
1932
- "createdAt": {
1933
- "type": "string"
1934
- },
1935
- "lastUpdatedAt": {
1936
- "type": "string"
1937
- }
1938
- },
1939
- "required": [
1940
- "id",
1941
- "url",
1942
- "name",
1943
- "clonePath",
1944
- "createdAt",
1945
- "lastUpdatedAt"
1946
- ]
1947
- }
1948
- }
1949
- },
1950
- "required": [
1951
- "repos"
1952
- ]
1953
- }
1954
- }
1955
- }
2203
+ "description": "Template with history"
2204
+ },
2205
+ "404": {
2206
+ "description": "Template not found"
1956
2207
  }
1957
2208
  }
1958
2209
  },
1959
- "post": {
1960
- "summary": "Create a new repo",
2210
+ "delete": {
2211
+ "summary": "Delete a prompt template override",
1961
2212
  "tags": [
1962
- "Repos"
2213
+ "PromptTemplates"
2214
+ ],
2215
+ "security": [
2216
+ {
2217
+ "bearerAuth": []
2218
+ }
2219
+ ],
2220
+ "parameters": [
2221
+ {
2222
+ "schema": {
2223
+ "type": "string"
2224
+ },
2225
+ "required": true,
2226
+ "name": "id",
2227
+ "in": "path"
2228
+ }
2229
+ ],
2230
+ "responses": {
2231
+ "200": {
2232
+ "description": "Template deleted"
2233
+ },
2234
+ "400": {
2235
+ "description": "Cannot delete default template"
2236
+ },
2237
+ "404": {
2238
+ "description": "Template not found"
2239
+ }
2240
+ }
2241
+ }
2242
+ },
2243
+ "/api/prompt-templates": {
2244
+ "get": {
2245
+ "summary": "List prompt templates with optional filters",
2246
+ "tags": [
2247
+ "PromptTemplates"
2248
+ ],
2249
+ "security": [
2250
+ {
2251
+ "bearerAuth": []
2252
+ }
2253
+ ],
2254
+ "parameters": [
2255
+ {
2256
+ "schema": {
2257
+ "type": "string"
2258
+ },
2259
+ "required": false,
2260
+ "name": "eventType",
2261
+ "in": "query"
2262
+ },
2263
+ {
2264
+ "schema": {
2265
+ "type": "string"
2266
+ },
2267
+ "required": false,
2268
+ "name": "scope",
2269
+ "in": "query"
2270
+ },
2271
+ {
2272
+ "schema": {
2273
+ "type": "string"
2274
+ },
2275
+ "required": false,
2276
+ "name": "scopeId",
2277
+ "in": "query"
2278
+ },
2279
+ {
2280
+ "schema": {
2281
+ "type": "string",
2282
+ "enum": [
2283
+ "true",
2284
+ "false"
2285
+ ]
2286
+ },
2287
+ "required": false,
2288
+ "name": "isDefault",
2289
+ "in": "query"
2290
+ }
2291
+ ],
2292
+ "responses": {
2293
+ "200": {
2294
+ "description": "List of prompt templates"
2295
+ }
2296
+ }
2297
+ },
2298
+ "put": {
2299
+ "summary": "Create or update a prompt template override",
2300
+ "tags": [
2301
+ "PromptTemplates"
1963
2302
  ],
1964
2303
  "security": [
1965
2304
  {
@@ -1972,35 +2311,159 @@
1972
2311
  "schema": {
1973
2312
  "type": "object",
1974
2313
  "properties": {
1975
- "url": {
2314
+ "eventType": {
1976
2315
  "type": "string",
1977
2316
  "minLength": 1
1978
2317
  },
1979
- "name": {
2318
+ "scope": {
1980
2319
  "type": "string",
1981
- "minLength": 1
2320
+ "enum": [
2321
+ "global",
2322
+ "agent",
2323
+ "repo"
2324
+ ]
1982
2325
  },
1983
- "clonePath": {
2326
+ "scopeId": {
1984
2327
  "type": "string"
1985
2328
  },
1986
- "defaultBranch": {
2329
+ "state": {
2330
+ "type": "string",
2331
+ "enum": [
2332
+ "enabled",
2333
+ "default_prompt_fallback",
2334
+ "skip_event"
2335
+ ]
2336
+ },
2337
+ "body": {
1987
2338
  "type": "string"
1988
2339
  },
1989
- "autoClone": {
1990
- "type": "boolean"
2340
+ "changedBy": {
2341
+ "type": "string"
2342
+ },
2343
+ "changeReason": {
2344
+ "type": "string"
1991
2345
  }
1992
2346
  },
1993
2347
  "required": [
1994
- "url",
1995
- "name"
2348
+ "eventType",
2349
+ "body"
1996
2350
  ]
1997
2351
  }
1998
2352
  }
1999
2353
  }
2000
2354
  },
2001
2355
  "responses": {
2002
- "201": {
2003
- "description": "Repo created",
2356
+ "200": {
2357
+ "description": "Upserted template"
2358
+ },
2359
+ "400": {
2360
+ "description": "Validation error"
2361
+ }
2362
+ }
2363
+ }
2364
+ },
2365
+ "/api/poll": {
2366
+ "get": {
2367
+ "summary": "Poll for triggers (tasks, mentions, epic updates)",
2368
+ "tags": [
2369
+ "Poll"
2370
+ ],
2371
+ "security": [
2372
+ {
2373
+ "bearerAuth": []
2374
+ }
2375
+ ],
2376
+ "responses": {
2377
+ "200": {
2378
+ "description": "Trigger data or null"
2379
+ },
2380
+ "400": {
2381
+ "description": "Missing X-Agent-ID"
2382
+ },
2383
+ "404": {
2384
+ "description": "Agent not found"
2385
+ }
2386
+ }
2387
+ }
2388
+ },
2389
+ "/api/channel-activity/commit-cursors": {
2390
+ "post": {
2391
+ "summary": "Commit channel activity cursors after successful processing",
2392
+ "tags": [
2393
+ "Poll"
2394
+ ],
2395
+ "security": [
2396
+ {
2397
+ "bearerAuth": []
2398
+ }
2399
+ ],
2400
+ "requestBody": {
2401
+ "content": {
2402
+ "application/json": {
2403
+ "schema": {
2404
+ "type": "object",
2405
+ "properties": {
2406
+ "cursorUpdates": {
2407
+ "type": "array",
2408
+ "items": {
2409
+ "type": "object",
2410
+ "properties": {
2411
+ "channelId": {
2412
+ "type": "string"
2413
+ },
2414
+ "ts": {
2415
+ "type": "string"
2416
+ }
2417
+ },
2418
+ "required": [
2419
+ "channelId",
2420
+ "ts"
2421
+ ]
2422
+ }
2423
+ }
2424
+ },
2425
+ "required": [
2426
+ "cursorUpdates"
2427
+ ]
2428
+ }
2429
+ }
2430
+ }
2431
+ },
2432
+ "responses": {
2433
+ "200": {
2434
+ "description": "Cursors committed"
2435
+ },
2436
+ "400": {
2437
+ "description": "Invalid request"
2438
+ }
2439
+ }
2440
+ }
2441
+ },
2442
+ "/api/repos/{id}": {
2443
+ "get": {
2444
+ "summary": "Get a repo by ID",
2445
+ "tags": [
2446
+ "Repos"
2447
+ ],
2448
+ "security": [
2449
+ {
2450
+ "bearerAuth": []
2451
+ }
2452
+ ],
2453
+ "parameters": [
2454
+ {
2455
+ "schema": {
2456
+ "type": "string",
2457
+ "format": "uuid"
2458
+ },
2459
+ "required": true,
2460
+ "name": "id",
2461
+ "in": "path"
2462
+ }
2463
+ ],
2464
+ "responses": {
2465
+ "200": {
2466
+ "description": "Repo details",
2004
2467
  "content": {
2005
2468
  "application/json": {
2006
2469
  "schema": {
@@ -2050,8 +2513,205 @@
2050
2513
  }
2051
2514
  }
2052
2515
  },
2053
- "400": {
2054
- "description": "Validation error",
2516
+ "404": {
2517
+ "description": "Repo not found",
2518
+ "content": {
2519
+ "application/json": {
2520
+ "schema": {
2521
+ "type": "object",
2522
+ "properties": {
2523
+ "error": {
2524
+ "type": "string"
2525
+ }
2526
+ },
2527
+ "required": [
2528
+ "error"
2529
+ ]
2530
+ }
2531
+ }
2532
+ }
2533
+ }
2534
+ }
2535
+ },
2536
+ "put": {
2537
+ "summary": "Update a repo",
2538
+ "tags": [
2539
+ "Repos"
2540
+ ],
2541
+ "security": [
2542
+ {
2543
+ "bearerAuth": []
2544
+ }
2545
+ ],
2546
+ "parameters": [
2547
+ {
2548
+ "schema": {
2549
+ "type": "string",
2550
+ "format": "uuid"
2551
+ },
2552
+ "required": true,
2553
+ "name": "id",
2554
+ "in": "path"
2555
+ }
2556
+ ],
2557
+ "requestBody": {
2558
+ "content": {
2559
+ "application/json": {
2560
+ "schema": {
2561
+ "type": "object",
2562
+ "properties": {
2563
+ "url": {
2564
+ "type": "string"
2565
+ },
2566
+ "name": {
2567
+ "type": "string"
2568
+ },
2569
+ "clonePath": {
2570
+ "type": "string"
2571
+ },
2572
+ "defaultBranch": {
2573
+ "type": "string"
2574
+ },
2575
+ "autoClone": {
2576
+ "type": "boolean"
2577
+ }
2578
+ }
2579
+ }
2580
+ }
2581
+ }
2582
+ },
2583
+ "responses": {
2584
+ "200": {
2585
+ "description": "Repo updated",
2586
+ "content": {
2587
+ "application/json": {
2588
+ "schema": {
2589
+ "type": "object",
2590
+ "properties": {
2591
+ "id": {
2592
+ "type": "string",
2593
+ "format": "uuid"
2594
+ },
2595
+ "url": {
2596
+ "type": "string",
2597
+ "minLength": 1
2598
+ },
2599
+ "name": {
2600
+ "type": "string",
2601
+ "minLength": 1,
2602
+ "maxLength": 100
2603
+ },
2604
+ "clonePath": {
2605
+ "type": "string",
2606
+ "minLength": 1
2607
+ },
2608
+ "defaultBranch": {
2609
+ "type": "string",
2610
+ "default": "main"
2611
+ },
2612
+ "autoClone": {
2613
+ "type": "boolean",
2614
+ "default": true
2615
+ },
2616
+ "createdAt": {
2617
+ "type": "string"
2618
+ },
2619
+ "lastUpdatedAt": {
2620
+ "type": "string"
2621
+ }
2622
+ },
2623
+ "required": [
2624
+ "id",
2625
+ "url",
2626
+ "name",
2627
+ "clonePath",
2628
+ "createdAt",
2629
+ "lastUpdatedAt"
2630
+ ]
2631
+ }
2632
+ }
2633
+ }
2634
+ },
2635
+ "404": {
2636
+ "description": "Repo not found",
2637
+ "content": {
2638
+ "application/json": {
2639
+ "schema": {
2640
+ "type": "object",
2641
+ "properties": {
2642
+ "error": {
2643
+ "type": "string"
2644
+ }
2645
+ },
2646
+ "required": [
2647
+ "error"
2648
+ ]
2649
+ }
2650
+ }
2651
+ }
2652
+ },
2653
+ "409": {
2654
+ "description": "Duplicate repo",
2655
+ "content": {
2656
+ "application/json": {
2657
+ "schema": {
2658
+ "type": "object",
2659
+ "properties": {
2660
+ "error": {
2661
+ "type": "string"
2662
+ }
2663
+ },
2664
+ "required": [
2665
+ "error"
2666
+ ]
2667
+ }
2668
+ }
2669
+ }
2670
+ }
2671
+ }
2672
+ },
2673
+ "delete": {
2674
+ "summary": "Delete a repo",
2675
+ "tags": [
2676
+ "Repos"
2677
+ ],
2678
+ "security": [
2679
+ {
2680
+ "bearerAuth": []
2681
+ }
2682
+ ],
2683
+ "parameters": [
2684
+ {
2685
+ "schema": {
2686
+ "type": "string",
2687
+ "format": "uuid"
2688
+ },
2689
+ "required": true,
2690
+ "name": "id",
2691
+ "in": "path"
2692
+ }
2693
+ ],
2694
+ "responses": {
2695
+ "200": {
2696
+ "description": "Repo deleted",
2697
+ "content": {
2698
+ "application/json": {
2699
+ "schema": {
2700
+ "type": "object",
2701
+ "properties": {
2702
+ "success": {
2703
+ "type": "boolean"
2704
+ }
2705
+ },
2706
+ "required": [
2707
+ "success"
2708
+ ]
2709
+ }
2710
+ }
2711
+ }
2712
+ },
2713
+ "404": {
2714
+ "description": "Repo not found",
2055
2715
  "content": {
2056
2716
  "application/json": {
2057
2717
  "schema": {
@@ -2067,33 +2727,885 @@
2067
2727
  }
2068
2728
  }
2069
2729
  }
2730
+ }
2731
+ }
2732
+ }
2733
+ },
2734
+ "/api/repos": {
2735
+ "get": {
2736
+ "summary": "List repos with optional filters",
2737
+ "tags": [
2738
+ "Repos"
2739
+ ],
2740
+ "security": [
2741
+ {
2742
+ "bearerAuth": []
2743
+ }
2744
+ ],
2745
+ "parameters": [
2746
+ {
2747
+ "schema": {
2748
+ "type": "string",
2749
+ "enum": [
2750
+ "true",
2751
+ "false"
2752
+ ]
2753
+ },
2754
+ "required": false,
2755
+ "name": "autoClone",
2756
+ "in": "query"
2757
+ },
2758
+ {
2759
+ "schema": {
2760
+ "type": "string"
2761
+ },
2762
+ "required": false,
2763
+ "name": "name",
2764
+ "in": "query"
2765
+ }
2766
+ ],
2767
+ "responses": {
2768
+ "200": {
2769
+ "description": "List of repos",
2770
+ "content": {
2771
+ "application/json": {
2772
+ "schema": {
2773
+ "type": "object",
2774
+ "properties": {
2775
+ "repos": {
2776
+ "type": "array",
2777
+ "items": {
2778
+ "type": "object",
2779
+ "properties": {
2780
+ "id": {
2781
+ "type": "string",
2782
+ "format": "uuid"
2783
+ },
2784
+ "url": {
2785
+ "type": "string",
2786
+ "minLength": 1
2787
+ },
2788
+ "name": {
2789
+ "type": "string",
2790
+ "minLength": 1,
2791
+ "maxLength": 100
2792
+ },
2793
+ "clonePath": {
2794
+ "type": "string",
2795
+ "minLength": 1
2796
+ },
2797
+ "defaultBranch": {
2798
+ "type": "string",
2799
+ "default": "main"
2800
+ },
2801
+ "autoClone": {
2802
+ "type": "boolean",
2803
+ "default": true
2804
+ },
2805
+ "createdAt": {
2806
+ "type": "string"
2807
+ },
2808
+ "lastUpdatedAt": {
2809
+ "type": "string"
2810
+ }
2811
+ },
2812
+ "required": [
2813
+ "id",
2814
+ "url",
2815
+ "name",
2816
+ "clonePath",
2817
+ "createdAt",
2818
+ "lastUpdatedAt"
2819
+ ]
2820
+ }
2821
+ }
2822
+ },
2823
+ "required": [
2824
+ "repos"
2825
+ ]
2826
+ }
2827
+ }
2828
+ }
2829
+ }
2830
+ }
2831
+ },
2832
+ "post": {
2833
+ "summary": "Create a new repo",
2834
+ "tags": [
2835
+ "Repos"
2836
+ ],
2837
+ "security": [
2838
+ {
2839
+ "bearerAuth": []
2840
+ }
2841
+ ],
2842
+ "requestBody": {
2843
+ "content": {
2844
+ "application/json": {
2845
+ "schema": {
2846
+ "type": "object",
2847
+ "properties": {
2848
+ "url": {
2849
+ "type": "string",
2850
+ "minLength": 1
2851
+ },
2852
+ "name": {
2853
+ "type": "string",
2854
+ "minLength": 1
2855
+ },
2856
+ "clonePath": {
2857
+ "type": "string"
2858
+ },
2859
+ "defaultBranch": {
2860
+ "type": "string"
2861
+ },
2862
+ "autoClone": {
2863
+ "type": "boolean"
2864
+ }
2865
+ },
2866
+ "required": [
2867
+ "url",
2868
+ "name"
2869
+ ]
2870
+ }
2871
+ }
2872
+ }
2873
+ },
2874
+ "responses": {
2875
+ "201": {
2876
+ "description": "Repo created",
2877
+ "content": {
2878
+ "application/json": {
2879
+ "schema": {
2880
+ "type": "object",
2881
+ "properties": {
2882
+ "id": {
2883
+ "type": "string",
2884
+ "format": "uuid"
2885
+ },
2886
+ "url": {
2887
+ "type": "string",
2888
+ "minLength": 1
2889
+ },
2890
+ "name": {
2891
+ "type": "string",
2892
+ "minLength": 1,
2893
+ "maxLength": 100
2894
+ },
2895
+ "clonePath": {
2896
+ "type": "string",
2897
+ "minLength": 1
2898
+ },
2899
+ "defaultBranch": {
2900
+ "type": "string",
2901
+ "default": "main"
2902
+ },
2903
+ "autoClone": {
2904
+ "type": "boolean",
2905
+ "default": true
2906
+ },
2907
+ "createdAt": {
2908
+ "type": "string"
2909
+ },
2910
+ "lastUpdatedAt": {
2911
+ "type": "string"
2912
+ }
2913
+ },
2914
+ "required": [
2915
+ "id",
2916
+ "url",
2917
+ "name",
2918
+ "clonePath",
2919
+ "createdAt",
2920
+ "lastUpdatedAt"
2921
+ ]
2922
+ }
2923
+ }
2924
+ }
2925
+ },
2926
+ "400": {
2927
+ "description": "Validation error",
2928
+ "content": {
2929
+ "application/json": {
2930
+ "schema": {
2931
+ "type": "object",
2932
+ "properties": {
2933
+ "error": {
2934
+ "type": "string"
2935
+ }
2936
+ },
2937
+ "required": [
2938
+ "error"
2939
+ ]
2940
+ }
2941
+ }
2942
+ }
2943
+ },
2944
+ "409": {
2945
+ "description": "Duplicate repo",
2946
+ "content": {
2947
+ "application/json": {
2948
+ "schema": {
2949
+ "type": "object",
2950
+ "properties": {
2951
+ "error": {
2952
+ "type": "string"
2953
+ }
2954
+ },
2955
+ "required": [
2956
+ "error"
2957
+ ]
2958
+ }
2959
+ }
2960
+ }
2961
+ }
2962
+ }
2963
+ }
2964
+ },
2965
+ "/api/schedules": {
2966
+ "post": {
2967
+ "summary": "Create a new schedule",
2968
+ "tags": [
2969
+ "Schedules"
2970
+ ],
2971
+ "security": [
2972
+ {
2973
+ "bearerAuth": []
2974
+ }
2975
+ ],
2976
+ "requestBody": {
2977
+ "content": {
2978
+ "application/json": {
2979
+ "schema": {
2980
+ "type": "object",
2981
+ "properties": {
2982
+ "name": {
2983
+ "type": "string",
2984
+ "minLength": 1
2985
+ },
2986
+ "description": {
2987
+ "type": "string"
2988
+ },
2989
+ "cronExpression": {
2990
+ "type": "string"
2991
+ },
2992
+ "intervalMs": {
2993
+ "type": "integer"
2994
+ },
2995
+ "taskTemplate": {
2996
+ "type": "string",
2997
+ "minLength": 1
2998
+ },
2999
+ "taskType": {
3000
+ "type": "string"
3001
+ },
3002
+ "tags": {
3003
+ "type": "array",
3004
+ "items": {
3005
+ "type": "string"
3006
+ }
3007
+ },
3008
+ "priority": {
3009
+ "type": "integer"
3010
+ },
3011
+ "targetAgentId": {
3012
+ "type": "string",
3013
+ "format": "uuid"
3014
+ },
3015
+ "enabled": {
3016
+ "type": "boolean"
3017
+ },
3018
+ "timezone": {
3019
+ "type": "string"
3020
+ },
3021
+ "model": {
3022
+ "type": "string"
3023
+ },
3024
+ "scheduleType": {
3025
+ "type": "string",
3026
+ "enum": [
3027
+ "recurring",
3028
+ "one_time"
3029
+ ]
3030
+ },
3031
+ "delayMs": {
3032
+ "type": "integer"
3033
+ },
3034
+ "runAt": {
3035
+ "type": "string"
3036
+ }
3037
+ },
3038
+ "required": [
3039
+ "name",
3040
+ "taskTemplate"
3041
+ ]
3042
+ }
3043
+ }
3044
+ }
3045
+ },
3046
+ "responses": {
3047
+ "201": {
3048
+ "description": "Schedule created"
3049
+ },
3050
+ "400": {
3051
+ "description": "Validation error"
3052
+ },
3053
+ "409": {
3054
+ "description": "Duplicate name"
3055
+ }
3056
+ }
3057
+ }
3058
+ },
3059
+ "/api/schedules/{id}/run": {
3060
+ "post": {
3061
+ "summary": "Run a schedule immediately",
3062
+ "tags": [
3063
+ "Schedules"
3064
+ ],
3065
+ "security": [
3066
+ {
3067
+ "bearerAuth": []
3068
+ }
3069
+ ],
3070
+ "parameters": [
3071
+ {
3072
+ "schema": {
3073
+ "type": "string"
3074
+ },
3075
+ "required": true,
3076
+ "name": "id",
3077
+ "in": "path"
3078
+ }
3079
+ ],
3080
+ "responses": {
3081
+ "200": {
3082
+ "description": "Schedule run triggered"
3083
+ },
3084
+ "400": {
3085
+ "description": "Schedule is disabled"
3086
+ },
3087
+ "404": {
3088
+ "description": "Schedule not found"
3089
+ }
3090
+ }
3091
+ }
3092
+ },
3093
+ "/api/schedules/{id}": {
3094
+ "get": {
3095
+ "summary": "Get a schedule by ID",
3096
+ "tags": [
3097
+ "Schedules"
3098
+ ],
3099
+ "security": [
3100
+ {
3101
+ "bearerAuth": []
3102
+ }
3103
+ ],
3104
+ "parameters": [
3105
+ {
3106
+ "schema": {
3107
+ "type": "string"
3108
+ },
3109
+ "required": true,
3110
+ "name": "id",
3111
+ "in": "path"
3112
+ }
3113
+ ],
3114
+ "responses": {
3115
+ "200": {
3116
+ "description": "Schedule details"
3117
+ },
3118
+ "404": {
3119
+ "description": "Schedule not found"
3120
+ }
3121
+ }
3122
+ },
3123
+ "put": {
3124
+ "summary": "Update a schedule",
3125
+ "tags": [
3126
+ "Schedules"
3127
+ ],
3128
+ "security": [
3129
+ {
3130
+ "bearerAuth": []
3131
+ }
3132
+ ],
3133
+ "parameters": [
3134
+ {
3135
+ "schema": {
3136
+ "type": "string"
3137
+ },
3138
+ "required": true,
3139
+ "name": "id",
3140
+ "in": "path"
3141
+ }
3142
+ ],
3143
+ "requestBody": {
3144
+ "content": {
3145
+ "application/json": {
3146
+ "schema": {
3147
+ "type": "object",
3148
+ "properties": {
3149
+ "name": {
3150
+ "type": "string"
3151
+ },
3152
+ "description": {
3153
+ "type": "string"
3154
+ },
3155
+ "cronExpression": {
3156
+ "type": "string"
3157
+ },
3158
+ "intervalMs": {
3159
+ "type": "integer"
3160
+ },
3161
+ "taskTemplate": {
3162
+ "type": "string"
3163
+ },
3164
+ "taskType": {
3165
+ "type": "string"
3166
+ },
3167
+ "tags": {
3168
+ "type": "array",
3169
+ "items": {
3170
+ "type": "string"
3171
+ }
3172
+ },
3173
+ "priority": {
3174
+ "type": "integer"
3175
+ },
3176
+ "targetAgentId": {
3177
+ "type": "string",
3178
+ "format": "uuid"
3179
+ },
3180
+ "enabled": {
3181
+ "type": "boolean"
3182
+ },
3183
+ "timezone": {
3184
+ "type": "string"
3185
+ },
3186
+ "model": {
3187
+ "type": "string"
3188
+ },
3189
+ "nextRunAt": {
3190
+ "type": [
3191
+ "string",
3192
+ "null"
3193
+ ]
3194
+ }
3195
+ }
3196
+ }
3197
+ }
3198
+ }
3199
+ },
3200
+ "responses": {
3201
+ "200": {
3202
+ "description": "Schedule updated"
3203
+ },
3204
+ "400": {
3205
+ "description": "Validation error"
3206
+ },
3207
+ "404": {
3208
+ "description": "Schedule not found"
3209
+ },
3210
+ "409": {
3211
+ "description": "Duplicate name"
3212
+ }
3213
+ }
3214
+ },
3215
+ "delete": {
3216
+ "summary": "Delete a schedule",
3217
+ "tags": [
3218
+ "Schedules"
3219
+ ],
3220
+ "security": [
3221
+ {
3222
+ "bearerAuth": []
3223
+ }
3224
+ ],
3225
+ "parameters": [
3226
+ {
3227
+ "schema": {
3228
+ "type": "string"
3229
+ },
3230
+ "required": true,
3231
+ "name": "id",
3232
+ "in": "path"
3233
+ }
3234
+ ],
3235
+ "responses": {
3236
+ "200": {
3237
+ "description": "Schedule deleted"
3238
+ },
3239
+ "404": {
3240
+ "description": "Schedule not found"
3241
+ }
3242
+ }
3243
+ }
3244
+ },
3245
+ "/api/session-logs": {
3246
+ "post": {
3247
+ "summary": "Store session logs",
3248
+ "tags": [
3249
+ "Session Data"
3250
+ ],
3251
+ "security": [
3252
+ {
3253
+ "bearerAuth": []
3254
+ }
3255
+ ],
3256
+ "requestBody": {
3257
+ "content": {
3258
+ "application/json": {
3259
+ "schema": {
3260
+ "type": "object",
3261
+ "properties": {
3262
+ "sessionId": {
3263
+ "type": "string",
3264
+ "minLength": 1
3265
+ },
3266
+ "iteration": {
3267
+ "type": "integer",
3268
+ "minimum": 1
3269
+ },
3270
+ "lines": {
3271
+ "type": "array",
3272
+ "items": {
3273
+ "type": "string"
3274
+ },
3275
+ "minItems": 1
3276
+ },
3277
+ "taskId": {
3278
+ "type": "string"
3279
+ },
3280
+ "cli": {
3281
+ "type": "string"
3282
+ }
3283
+ },
3284
+ "required": [
3285
+ "sessionId",
3286
+ "iteration",
3287
+ "lines"
3288
+ ]
3289
+ }
3290
+ }
3291
+ }
3292
+ },
3293
+ "responses": {
3294
+ "201": {
3295
+ "description": "Logs stored"
3296
+ },
3297
+ "400": {
3298
+ "description": "Validation error"
3299
+ }
3300
+ }
3301
+ }
3302
+ },
3303
+ "/api/tasks/{taskId}/session-logs": {
3304
+ "get": {
3305
+ "summary": "Get session logs for a task",
3306
+ "tags": [
3307
+ "Session Data"
3308
+ ],
3309
+ "security": [
3310
+ {
3311
+ "bearerAuth": []
3312
+ }
3313
+ ],
3314
+ "parameters": [
3315
+ {
3316
+ "schema": {
3317
+ "type": "string"
3318
+ },
3319
+ "required": true,
3320
+ "name": "taskId",
3321
+ "in": "path"
3322
+ }
3323
+ ],
3324
+ "responses": {
3325
+ "200": {
3326
+ "description": "Session logs"
3327
+ },
3328
+ "404": {
3329
+ "description": "Task not found"
3330
+ }
3331
+ }
3332
+ }
3333
+ },
3334
+ "/api/session-costs": {
3335
+ "post": {
3336
+ "summary": "Store session cost record",
3337
+ "tags": [
3338
+ "Session Data"
3339
+ ],
3340
+ "security": [
3341
+ {
3342
+ "bearerAuth": []
3343
+ }
3344
+ ],
3345
+ "requestBody": {
3346
+ "content": {
3347
+ "application/json": {
3348
+ "schema": {
3349
+ "type": "object",
3350
+ "properties": {
3351
+ "sessionId": {
3352
+ "type": "string",
3353
+ "minLength": 1
3354
+ },
3355
+ "agentId": {
3356
+ "type": "string",
3357
+ "minLength": 1
3358
+ },
3359
+ "totalCostUsd": {
3360
+ "type": "number"
3361
+ },
3362
+ "taskId": {
3363
+ "type": "string"
3364
+ },
3365
+ "inputTokens": {
3366
+ "type": "integer"
3367
+ },
3368
+ "outputTokens": {
3369
+ "type": "integer"
3370
+ },
3371
+ "cacheReadTokens": {
3372
+ "type": "integer"
3373
+ },
3374
+ "cacheWriteTokens": {
3375
+ "type": "integer"
3376
+ },
3377
+ "durationMs": {
3378
+ "type": "integer"
3379
+ },
3380
+ "numTurns": {
3381
+ "type": "integer"
3382
+ },
3383
+ "model": {
3384
+ "type": "string"
3385
+ },
3386
+ "isError": {
3387
+ "type": "boolean"
3388
+ }
3389
+ },
3390
+ "required": [
3391
+ "sessionId",
3392
+ "agentId",
3393
+ "totalCostUsd"
3394
+ ]
3395
+ }
3396
+ }
3397
+ }
3398
+ },
3399
+ "responses": {
3400
+ "201": {
3401
+ "description": "Cost record stored"
3402
+ },
3403
+ "400": {
3404
+ "description": "Validation error"
3405
+ }
3406
+ }
3407
+ },
3408
+ "get": {
3409
+ "summary": "Query session costs with filters",
3410
+ "tags": [
3411
+ "Session Data"
3412
+ ],
3413
+ "security": [
3414
+ {
3415
+ "bearerAuth": []
3416
+ }
3417
+ ],
3418
+ "parameters": [
3419
+ {
3420
+ "schema": {
3421
+ "type": "string"
3422
+ },
3423
+ "required": false,
3424
+ "name": "agentId",
3425
+ "in": "query"
3426
+ },
3427
+ {
3428
+ "schema": {
3429
+ "type": "string"
3430
+ },
3431
+ "required": false,
3432
+ "name": "taskId",
3433
+ "in": "query"
3434
+ },
3435
+ {
3436
+ "schema": {
3437
+ "type": "string"
3438
+ },
3439
+ "required": false,
3440
+ "name": "startDate",
3441
+ "in": "query"
3442
+ },
3443
+ {
3444
+ "schema": {
3445
+ "type": "string"
3446
+ },
3447
+ "required": false,
3448
+ "name": "endDate",
3449
+ "in": "query"
3450
+ },
3451
+ {
3452
+ "schema": {
3453
+ "type": "integer",
3454
+ "minimum": 1
3455
+ },
3456
+ "required": false,
3457
+ "name": "limit",
3458
+ "in": "query"
3459
+ }
3460
+ ],
3461
+ "responses": {
3462
+ "200": {
3463
+ "description": "Session costs"
3464
+ }
3465
+ }
3466
+ }
3467
+ },
3468
+ "/api/session-costs/summary": {
3469
+ "get": {
3470
+ "summary": "Aggregated session cost summary",
3471
+ "tags": [
3472
+ "Session Data"
3473
+ ],
3474
+ "security": [
3475
+ {
3476
+ "bearerAuth": []
3477
+ }
3478
+ ],
3479
+ "parameters": [
3480
+ {
3481
+ "schema": {
3482
+ "type": "string",
3483
+ "enum": [
3484
+ "day",
3485
+ "agent",
3486
+ "both"
3487
+ ]
3488
+ },
3489
+ "required": false,
3490
+ "name": "groupBy",
3491
+ "in": "query"
3492
+ },
3493
+ {
3494
+ "schema": {
3495
+ "type": "string"
3496
+ },
3497
+ "required": false,
3498
+ "name": "startDate",
3499
+ "in": "query"
3500
+ },
3501
+ {
3502
+ "schema": {
3503
+ "type": "string"
3504
+ },
3505
+ "required": false,
3506
+ "name": "endDate",
3507
+ "in": "query"
3508
+ },
3509
+ {
3510
+ "schema": {
3511
+ "type": "string"
3512
+ },
3513
+ "required": false,
3514
+ "name": "agentId",
3515
+ "in": "query"
3516
+ }
3517
+ ],
3518
+ "responses": {
3519
+ "200": {
3520
+ "description": "Cost summary"
2070
3521
  },
2071
- "409": {
2072
- "description": "Duplicate repo",
2073
- "content": {
2074
- "application/json": {
2075
- "schema": {
2076
- "type": "object",
2077
- "properties": {
2078
- "error": {
2079
- "type": "string"
2080
- }
2081
- },
2082
- "required": [
2083
- "error"
2084
- ]
2085
- }
2086
- }
2087
- }
3522
+ "400": {
3523
+ "description": "Invalid groupBy"
2088
3524
  }
2089
3525
  }
2090
3526
  }
2091
3527
  },
2092
- "/api/schedules": {
3528
+ "/api/session-costs/dashboard": {
3529
+ "get": {
3530
+ "summary": "Cost today and month-to-date for dashboard",
3531
+ "tags": [
3532
+ "Session Data"
3533
+ ],
3534
+ "security": [
3535
+ {
3536
+ "bearerAuth": []
3537
+ }
3538
+ ],
3539
+ "responses": {
3540
+ "200": {
3541
+ "description": "Dashboard cost data"
3542
+ }
3543
+ }
3544
+ }
3545
+ },
3546
+ "/api/skills": {
3547
+ "get": {
3548
+ "summary": "List skills with optional filters",
3549
+ "tags": [
3550
+ "Skills"
3551
+ ],
3552
+ "security": [
3553
+ {
3554
+ "bearerAuth": []
3555
+ }
3556
+ ],
3557
+ "parameters": [
3558
+ {
3559
+ "schema": {
3560
+ "type": "string"
3561
+ },
3562
+ "required": false,
3563
+ "name": "type",
3564
+ "in": "query"
3565
+ },
3566
+ {
3567
+ "schema": {
3568
+ "type": "string"
3569
+ },
3570
+ "required": false,
3571
+ "name": "scope",
3572
+ "in": "query"
3573
+ },
3574
+ {
3575
+ "schema": {
3576
+ "type": "string"
3577
+ },
3578
+ "required": false,
3579
+ "name": "agentId",
3580
+ "in": "query"
3581
+ },
3582
+ {
3583
+ "schema": {
3584
+ "type": "string"
3585
+ },
3586
+ "required": false,
3587
+ "name": "enabled",
3588
+ "in": "query"
3589
+ },
3590
+ {
3591
+ "schema": {
3592
+ "type": "string"
3593
+ },
3594
+ "required": false,
3595
+ "name": "search",
3596
+ "in": "query"
3597
+ }
3598
+ ],
3599
+ "responses": {
3600
+ "200": {
3601
+ "description": "Skill list"
3602
+ }
3603
+ }
3604
+ },
2093
3605
  "post": {
2094
- "summary": "Create a new schedule",
3606
+ "summary": "Create a new skill",
2095
3607
  "tags": [
2096
- "Schedules"
3608
+ "Skills"
2097
3609
  ],
2098
3610
  "security": [
2099
3611
  {
@@ -2106,65 +3618,22 @@
2106
3618
  "schema": {
2107
3619
  "type": "object",
2108
3620
  "properties": {
2109
- "name": {
2110
- "type": "string",
2111
- "minLength": 1
2112
- },
2113
- "description": {
2114
- "type": "string"
2115
- },
2116
- "cronExpression": {
2117
- "type": "string"
2118
- },
2119
- "intervalMs": {
2120
- "type": "integer"
2121
- },
2122
- "taskTemplate": {
3621
+ "content": {
2123
3622
  "type": "string",
2124
3623
  "minLength": 1
2125
3624
  },
2126
- "taskType": {
2127
- "type": "string"
2128
- },
2129
- "tags": {
2130
- "type": "array",
2131
- "items": {
2132
- "type": "string"
2133
- }
2134
- },
2135
- "priority": {
2136
- "type": "integer"
2137
- },
2138
- "targetAgentId": {
2139
- "type": "string",
2140
- "format": "uuid"
2141
- },
2142
- "enabled": {
2143
- "type": "boolean"
2144
- },
2145
- "timezone": {
3625
+ "type": {
2146
3626
  "type": "string"
2147
3627
  },
2148
- "model": {
3628
+ "scope": {
2149
3629
  "type": "string"
2150
3630
  },
2151
- "scheduleType": {
2152
- "type": "string",
2153
- "enum": [
2154
- "recurring",
2155
- "one_time"
2156
- ]
2157
- },
2158
- "delayMs": {
2159
- "type": "integer"
2160
- },
2161
- "runAt": {
3631
+ "ownerAgentId": {
2162
3632
  "type": "string"
2163
3633
  }
2164
3634
  },
2165
3635
  "required": [
2166
- "name",
2167
- "taskTemplate"
3636
+ "content"
2168
3637
  ]
2169
3638
  }
2170
3639
  }
@@ -2172,56 +3641,19 @@
2172
3641
  },
2173
3642
  "responses": {
2174
3643
  "201": {
2175
- "description": "Schedule created"
3644
+ "description": "Skill created"
2176
3645
  },
2177
3646
  "400": {
2178
3647
  "description": "Validation error"
2179
- },
2180
- "409": {
2181
- "description": "Duplicate name"
2182
- }
2183
- }
2184
- }
2185
- },
2186
- "/api/schedules/{id}/run": {
2187
- "post": {
2188
- "summary": "Run a schedule immediately",
2189
- "tags": [
2190
- "Schedules"
2191
- ],
2192
- "security": [
2193
- {
2194
- "bearerAuth": []
2195
- }
2196
- ],
2197
- "parameters": [
2198
- {
2199
- "schema": {
2200
- "type": "string"
2201
- },
2202
- "required": true,
2203
- "name": "id",
2204
- "in": "path"
2205
- }
2206
- ],
2207
- "responses": {
2208
- "200": {
2209
- "description": "Schedule run triggered"
2210
- },
2211
- "400": {
2212
- "description": "Schedule is disabled"
2213
- },
2214
- "404": {
2215
- "description": "Schedule not found"
2216
3648
  }
2217
3649
  }
2218
3650
  }
2219
3651
  },
2220
- "/api/schedules/{id}": {
3652
+ "/api/skills/{id}": {
2221
3653
  "get": {
2222
- "summary": "Get a schedule by ID",
3654
+ "summary": "Get skill by ID",
2223
3655
  "tags": [
2224
- "Schedules"
3656
+ "Skills"
2225
3657
  ],
2226
3658
  "security": [
2227
3659
  {
@@ -2240,17 +3672,17 @@
2240
3672
  ],
2241
3673
  "responses": {
2242
3674
  "200": {
2243
- "description": "Schedule details"
3675
+ "description": "Skill details"
2244
3676
  },
2245
3677
  "404": {
2246
- "description": "Schedule not found"
3678
+ "description": "Skill not found"
2247
3679
  }
2248
3680
  }
2249
3681
  },
2250
3682
  "put": {
2251
- "summary": "Update a schedule",
3683
+ "summary": "Update a skill",
2252
3684
  "tags": [
2253
- "Schedules"
3685
+ "Skills"
2254
3686
  ],
2255
3687
  "security": [
2256
3688
  {
@@ -2272,77 +3704,24 @@
2272
3704
  "application/json": {
2273
3705
  "schema": {
2274
3706
  "type": "object",
2275
- "properties": {
2276
- "name": {
2277
- "type": "string"
2278
- },
2279
- "description": {
2280
- "type": "string"
2281
- },
2282
- "cronExpression": {
2283
- "type": "string"
2284
- },
2285
- "intervalMs": {
2286
- "type": "integer"
2287
- },
2288
- "taskTemplate": {
2289
- "type": "string"
2290
- },
2291
- "taskType": {
2292
- "type": "string"
2293
- },
2294
- "tags": {
2295
- "type": "array",
2296
- "items": {
2297
- "type": "string"
2298
- }
2299
- },
2300
- "priority": {
2301
- "type": "integer"
2302
- },
2303
- "targetAgentId": {
2304
- "type": "string",
2305
- "format": "uuid"
2306
- },
2307
- "enabled": {
2308
- "type": "boolean"
2309
- },
2310
- "timezone": {
2311
- "type": "string"
2312
- },
2313
- "model": {
2314
- "type": "string"
2315
- },
2316
- "nextRunAt": {
2317
- "type": [
2318
- "string",
2319
- "null"
2320
- ]
2321
- }
2322
- }
3707
+ "additionalProperties": {}
2323
3708
  }
2324
3709
  }
2325
3710
  }
2326
3711
  },
2327
3712
  "responses": {
2328
3713
  "200": {
2329
- "description": "Schedule updated"
2330
- },
2331
- "400": {
2332
- "description": "Validation error"
3714
+ "description": "Skill updated"
2333
3715
  },
2334
3716
  "404": {
2335
- "description": "Schedule not found"
2336
- },
2337
- "409": {
2338
- "description": "Duplicate name"
3717
+ "description": "Skill not found"
2339
3718
  }
2340
3719
  }
2341
3720
  },
2342
3721
  "delete": {
2343
- "summary": "Delete a schedule",
3722
+ "summary": "Delete a skill",
2344
3723
  "tags": [
2345
- "Schedules"
3724
+ "Skills"
2346
3725
  ],
2347
3726
  "security": [
2348
3727
  {
@@ -2361,77 +3740,67 @@
2361
3740
  ],
2362
3741
  "responses": {
2363
3742
  "200": {
2364
- "description": "Schedule deleted"
3743
+ "description": "Skill deleted"
2365
3744
  },
2366
3745
  "404": {
2367
- "description": "Schedule not found"
3746
+ "description": "Skill not found"
2368
3747
  }
2369
3748
  }
2370
3749
  }
2371
3750
  },
2372
- "/api/session-logs": {
3751
+ "/api/skills/{id}/install": {
2373
3752
  "post": {
2374
- "summary": "Store session logs",
3753
+ "summary": "Install skill for an agent",
2375
3754
  "tags": [
2376
- "Session Data"
3755
+ "Skills"
2377
3756
  ],
2378
3757
  "security": [
2379
3758
  {
2380
3759
  "bearerAuth": []
2381
3760
  }
2382
3761
  ],
3762
+ "parameters": [
3763
+ {
3764
+ "schema": {
3765
+ "type": "string"
3766
+ },
3767
+ "required": true,
3768
+ "name": "id",
3769
+ "in": "path"
3770
+ }
3771
+ ],
2383
3772
  "requestBody": {
2384
3773
  "content": {
2385
3774
  "application/json": {
2386
3775
  "schema": {
2387
3776
  "type": "object",
2388
3777
  "properties": {
2389
- "sessionId": {
2390
- "type": "string",
2391
- "minLength": 1
2392
- },
2393
- "iteration": {
2394
- "type": "integer",
2395
- "minimum": 1
2396
- },
2397
- "lines": {
2398
- "type": "array",
2399
- "items": {
2400
- "type": "string"
2401
- },
2402
- "minItems": 1
2403
- },
2404
- "taskId": {
2405
- "type": "string"
2406
- },
2407
- "cli": {
3778
+ "agentId": {
2408
3779
  "type": "string"
2409
3780
  }
2410
3781
  },
2411
3782
  "required": [
2412
- "sessionId",
2413
- "iteration",
2414
- "lines"
3783
+ "agentId"
2415
3784
  ]
2416
3785
  }
2417
3786
  }
2418
3787
  }
2419
3788
  },
2420
3789
  "responses": {
2421
- "201": {
2422
- "description": "Logs stored"
3790
+ "200": {
3791
+ "description": "Skill installed"
2423
3792
  },
2424
- "400": {
2425
- "description": "Validation error"
3793
+ "404": {
3794
+ "description": "Skill not found"
2426
3795
  }
2427
3796
  }
2428
3797
  }
2429
3798
  },
2430
- "/api/tasks/{taskId}/session-logs": {
2431
- "get": {
2432
- "summary": "Get session logs for a task",
3799
+ "/api/skills/{id}/install/{agentId}": {
3800
+ "delete": {
3801
+ "summary": "Uninstall skill for an agent",
2433
3802
  "tags": [
2434
- "Session Data"
3803
+ "Skills"
2435
3804
  ],
2436
3805
  "security": [
2437
3806
  {
@@ -2444,25 +3813,30 @@
2444
3813
  "type": "string"
2445
3814
  },
2446
3815
  "required": true,
2447
- "name": "taskId",
3816
+ "name": "id",
3817
+ "in": "path"
3818
+ },
3819
+ {
3820
+ "schema": {
3821
+ "type": "string"
3822
+ },
3823
+ "required": true,
3824
+ "name": "agentId",
2448
3825
  "in": "path"
2449
3826
  }
2450
3827
  ],
2451
3828
  "responses": {
2452
3829
  "200": {
2453
- "description": "Session logs"
2454
- },
2455
- "404": {
2456
- "description": "Task not found"
3830
+ "description": "Skill uninstalled"
2457
3831
  }
2458
3832
  }
2459
3833
  }
2460
3834
  },
2461
- "/api/session-costs": {
3835
+ "/api/skills/install-remote": {
2462
3836
  "post": {
2463
- "summary": "Store session cost record",
3837
+ "summary": "Install a remote skill from GitHub",
2464
3838
  "tags": [
2465
- "Session Data"
3839
+ "Skills"
2466
3840
  ],
2467
3841
  "security": [
2468
3842
  {
@@ -2475,49 +3849,21 @@
2475
3849
  "schema": {
2476
3850
  "type": "object",
2477
3851
  "properties": {
2478
- "sessionId": {
2479
- "type": "string",
2480
- "minLength": 1
2481
- },
2482
- "agentId": {
2483
- "type": "string",
2484
- "minLength": 1
2485
- },
2486
- "totalCostUsd": {
2487
- "type": "number"
2488
- },
2489
- "taskId": {
3852
+ "sourceRepo": {
2490
3853
  "type": "string"
2491
3854
  },
2492
- "inputTokens": {
2493
- "type": "integer"
2494
- },
2495
- "outputTokens": {
2496
- "type": "integer"
2497
- },
2498
- "cacheReadTokens": {
2499
- "type": "integer"
2500
- },
2501
- "cacheWriteTokens": {
2502
- "type": "integer"
2503
- },
2504
- "durationMs": {
2505
- "type": "integer"
2506
- },
2507
- "numTurns": {
2508
- "type": "integer"
3855
+ "sourcePath": {
3856
+ "type": "string"
2509
3857
  },
2510
- "model": {
3858
+ "scope": {
2511
3859
  "type": "string"
2512
3860
  },
2513
- "isError": {
3861
+ "isComplex": {
2514
3862
  "type": "boolean"
2515
3863
  }
2516
3864
  },
2517
3865
  "required": [
2518
- "sessionId",
2519
- "agentId",
2520
- "totalCostUsd"
3866
+ "sourceRepo"
2521
3867
  ]
2522
3868
  }
2523
3869
  }
@@ -2525,147 +3871,91 @@
2525
3871
  },
2526
3872
  "responses": {
2527
3873
  "201": {
2528
- "description": "Cost record stored"
3874
+ "description": "Remote skill installed"
2529
3875
  },
2530
3876
  "400": {
2531
- "description": "Validation error"
3877
+ "description": "Fetch failed"
2532
3878
  }
2533
3879
  }
2534
- },
2535
- "get": {
2536
- "summary": "Query session costs with filters",
3880
+ }
3881
+ },
3882
+ "/api/skills/sync-remote": {
3883
+ "post": {
3884
+ "summary": "Trigger remote skill sync",
2537
3885
  "tags": [
2538
- "Session Data"
3886
+ "Skills"
2539
3887
  ],
2540
3888
  "security": [
2541
3889
  {
2542
3890
  "bearerAuth": []
2543
3891
  }
2544
3892
  ],
2545
- "parameters": [
2546
- {
2547
- "schema": {
2548
- "type": "string"
2549
- },
2550
- "required": false,
2551
- "name": "agentId",
2552
- "in": "query"
2553
- },
2554
- {
2555
- "schema": {
2556
- "type": "string"
2557
- },
2558
- "required": false,
2559
- "name": "taskId",
2560
- "in": "query"
2561
- },
2562
- {
2563
- "schema": {
2564
- "type": "string"
2565
- },
2566
- "required": false,
2567
- "name": "startDate",
2568
- "in": "query"
2569
- },
2570
- {
2571
- "schema": {
2572
- "type": "string"
2573
- },
2574
- "required": false,
2575
- "name": "endDate",
2576
- "in": "query"
2577
- },
2578
- {
2579
- "schema": {
2580
- "type": "integer",
2581
- "minimum": 1
2582
- },
2583
- "required": false,
2584
- "name": "limit",
2585
- "in": "query"
3893
+ "requestBody": {
3894
+ "content": {
3895
+ "application/json": {
3896
+ "schema": {
3897
+ "type": "object",
3898
+ "properties": {
3899
+ "skillId": {
3900
+ "type": "string"
3901
+ },
3902
+ "force": {
3903
+ "type": "boolean"
3904
+ }
3905
+ }
3906
+ }
3907
+ }
2586
3908
  }
2587
- ],
3909
+ },
2588
3910
  "responses": {
2589
3911
  "200": {
2590
- "description": "Session costs"
3912
+ "description": "Sync results"
2591
3913
  }
2592
3914
  }
2593
3915
  }
2594
3916
  },
2595
- "/api/session-costs/summary": {
2596
- "get": {
2597
- "summary": "Aggregated session cost summary",
3917
+ "/api/skills/sync-filesystem": {
3918
+ "post": {
3919
+ "summary": "Sync installed skills to agent filesystem",
2598
3920
  "tags": [
2599
- "Session Data"
3921
+ "Skills"
2600
3922
  ],
2601
3923
  "security": [
2602
3924
  {
2603
3925
  "bearerAuth": []
2604
3926
  }
2605
3927
  ],
2606
- "parameters": [
2607
- {
2608
- "schema": {
2609
- "type": "string",
2610
- "enum": [
2611
- "day",
2612
- "agent",
2613
- "both"
2614
- ]
2615
- },
2616
- "required": false,
2617
- "name": "groupBy",
2618
- "in": "query"
2619
- },
2620
- {
2621
- "schema": {
2622
- "type": "string"
2623
- },
2624
- "required": false,
2625
- "name": "startDate",
2626
- "in": "query"
2627
- },
2628
- {
2629
- "schema": {
2630
- "type": "string"
2631
- },
2632
- "required": false,
2633
- "name": "endDate",
2634
- "in": "query"
2635
- },
2636
- {
2637
- "schema": {
2638
- "type": "string"
2639
- },
2640
- "required": false,
2641
- "name": "agentId",
2642
- "in": "query"
2643
- }
2644
- ],
2645
3928
  "responses": {
2646
3929
  "200": {
2647
- "description": "Cost summary"
2648
- },
2649
- "400": {
2650
- "description": "Invalid groupBy"
3930
+ "description": "Filesystem sync results"
2651
3931
  }
2652
3932
  }
2653
3933
  }
2654
3934
  },
2655
- "/api/session-costs/dashboard": {
3935
+ "/api/agents/{id}/skills": {
2656
3936
  "get": {
2657
- "summary": "Cost today and month-to-date for dashboard",
3937
+ "summary": "Get all skills installed for an agent",
2658
3938
  "tags": [
2659
- "Session Data"
3939
+ "Skills"
2660
3940
  ],
2661
3941
  "security": [
2662
3942
  {
2663
3943
  "bearerAuth": []
2664
3944
  }
2665
3945
  ],
3946
+ "parameters": [
3947
+ {
3948
+ "schema": {
3949
+ "type": "string"
3950
+ },
3951
+ "required": true,
3952
+ "name": "id",
3953
+ "in": "path"
3954
+ }
3955
+ ],
2666
3956
  "responses": {
2667
3957
  "200": {
2668
- "description": "Dashboard cost data"
3958
+ "description": "Agent skills list"
2669
3959
  }
2670
3960
  }
2671
3961
  }
@@ -3562,6 +4852,12 @@
3562
4852
  {
3563
4853
  "type": "string"
3564
4854
  },
4855
+ {
4856
+ "type": "array",
4857
+ "items": {
4858
+ "type": "string"
4859
+ }
4860
+ },
3565
4861
  {
3566
4862
  "type": "object",
3567
4863
  "additionalProperties": {
@@ -3569,7 +4865,7 @@
3569
4865
  }
3570
4866
  }
3571
4867
  ],
3572
- "description": "Next node(s): string for simple chaining, or record for port-based routing ({pass: 'a', fail: 'b'})"
4868
+ "description": "Next node(s): string for simple chaining, string[] for fan-out to parallel nodes, or record for port-based routing ({pass: 'a', fail: 'b'})"
3573
4869
  },
3574
4870
  "validation": {
3575
4871
  "type": "object",
@@ -3674,6 +4970,15 @@
3674
4970
  ]
3675
4971
  },
3676
4972
  "minItems": 1
4973
+ },
4974
+ "onNodeFailure": {
4975
+ "type": "string",
4976
+ "enum": [
4977
+ "fail",
4978
+ "continue"
4979
+ ],
4980
+ "default": "fail",
4981
+ "description": "Behavior when a node's task fails or is cancelled. 'fail' (default): mark the entire run as failed. 'continue': treat the failed node as completed with error output and proceed — downstream convergence nodes receive '[FAILED: reason]' and can handle partial results."
3677
4982
  }
3678
4983
  },
3679
4984
  "required": [
@@ -3765,6 +5070,14 @@
3765
5070
  "triggerSchema": {
3766
5071
  "type": "object",
3767
5072
  "additionalProperties": {}
5073
+ },
5074
+ "dir": {
5075
+ "type": "string",
5076
+ "minLength": 1
5077
+ },
5078
+ "vcsRepo": {
5079
+ "type": "string",
5080
+ "minLength": 1
3768
5081
  }
3769
5082
  },
3770
5083
  "required": [
@@ -3877,6 +5190,12 @@
3877
5190
  {
3878
5191
  "type": "string"
3879
5192
  },
5193
+ {
5194
+ "type": "array",
5195
+ "items": {
5196
+ "type": "string"
5197
+ }
5198
+ },
3880
5199
  {
3881
5200
  "type": "object",
3882
5201
  "additionalProperties": {
@@ -3884,7 +5203,7 @@
3884
5203
  }
3885
5204
  }
3886
5205
  ],
3887
- "description": "Next node(s): string for simple chaining, or record for port-based routing ({pass: 'a', fail: 'b'})"
5206
+ "description": "Next node(s): string for simple chaining, string[] for fan-out to parallel nodes, or record for port-based routing ({pass: 'a', fail: 'b'})"
3888
5207
  },
3889
5208
  "validation": {
3890
5209
  "type": "object",
@@ -3989,6 +5308,15 @@
3989
5308
  ]
3990
5309
  },
3991
5310
  "minItems": 1
5311
+ },
5312
+ "onNodeFailure": {
5313
+ "type": "string",
5314
+ "enum": [
5315
+ "fail",
5316
+ "continue"
5317
+ ],
5318
+ "default": "fail",
5319
+ "description": "Behavior when a node's task fails or is cancelled. 'fail' (default): mark the entire run as failed. 'continue': treat the failed node as completed with error output and proceed — downstream convergence nodes receive '[FAILED: reason]' and can handle partial results."
3992
5320
  }
3993
5321
  },
3994
5322
  "required": [
@@ -4090,6 +5418,20 @@
4090
5418
  ],
4091
5419
  "additionalProperties": {}
4092
5420
  },
5421
+ "dir": {
5422
+ "type": [
5423
+ "string",
5424
+ "null"
5425
+ ],
5426
+ "minLength": 1
5427
+ },
5428
+ "vcsRepo": {
5429
+ "type": [
5430
+ "string",
5431
+ "null"
5432
+ ],
5433
+ "minLength": 1
5434
+ },
4093
5435
  "enabled": {
4094
5436
  "type": "boolean"
4095
5437
  }