@agent-native/core 0.106.3 → 0.107.1

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 (292) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +23 -0
  3. package/corpus/core/docs/content/integrations.mdx +597 -0
  4. package/corpus/core/docs/content/locales/ar-SA/mcp-clients.mdx +19 -1
  5. package/corpus/core/docs/content/locales/de-DE/mcp-clients.mdx +22 -1
  6. package/corpus/core/docs/content/locales/es-ES/mcp-clients.mdx +23 -1
  7. package/corpus/core/docs/content/locales/fr-FR/mcp-clients.mdx +23 -1
  8. package/corpus/core/docs/content/locales/hi-IN/mcp-clients.mdx +22 -1
  9. package/corpus/core/docs/content/locales/ja-JP/mcp-clients.mdx +21 -1
  10. package/corpus/core/docs/content/locales/ko-KR/mcp-clients.mdx +20 -1
  11. package/corpus/core/docs/content/locales/pt-BR/mcp-clients.mdx +22 -1
  12. package/corpus/core/docs/content/locales/zh-CN/mcp-clients.mdx +17 -1
  13. package/corpus/core/docs/content/locales/zh-TW/mcp-clients.mdx +17 -1
  14. package/corpus/core/docs/content/mcp-clients.mdx +51 -1
  15. package/corpus/core/docs/content/organizations-teams-permissions.mdx +413 -0
  16. package/corpus/core/package.json +1 -1
  17. package/corpus/core/src/agent/production-agent.ts +19 -0
  18. package/corpus/core/src/agent/run-store.ts +98 -2
  19. package/corpus/core/src/client/AssistantChat.tsx +26 -1
  20. package/corpus/core/src/client/CommandMenu.tsx +5 -0
  21. package/corpus/core/src/client/active-run-state.ts +34 -0
  22. package/corpus/core/src/client/agent-chat-adapter.ts +4 -0
  23. package/corpus/core/src/client/chat/message-components.tsx +41 -0
  24. package/corpus/core/src/client/composer/TiptapComposer.tsx +45 -8
  25. package/corpus/core/src/client/integrations/IntegrationsPanel.tsx +30 -11
  26. package/corpus/core/src/client/resources/McpConnectionSuggestion.tsx +270 -0
  27. package/corpus/core/src/client/resources/McpIntegrationDialog.tsx +177 -40
  28. package/corpus/core/src/client/resources/mcp-integration-catalog.ts +478 -4
  29. package/corpus/core/src/client/resources/mcp-integration-logos.ts +108 -0
  30. package/corpus/core/src/client/sharing/ShareButton.tsx +30 -9
  31. package/corpus/core/src/client/use-agent-chat-home-handoff.ts +2 -2
  32. package/corpus/core/src/deploy/build.ts +32 -0
  33. package/corpus/core/src/extensions/html-shell.ts +33 -1
  34. package/corpus/core/src/ingestion/office.ts +1 -2
  35. package/corpus/core/src/ingestion/pptx.ts +2 -4
  36. package/corpus/core/src/localization/default-messages.ts +129 -1
  37. package/corpus/core/src/mcp/actions/call-mcp-tool.ts +1 -0
  38. package/corpus/core/src/secrets/register-framework-secrets.ts +28 -0
  39. package/corpus/core/src/server/agent-chat-plugin.ts +29 -1
  40. package/corpus/core/src/server/index.ts +4 -0
  41. package/corpus/core/src/server/org-admin.ts +28 -0
  42. package/corpus/core/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +9 -0
  43. package/corpus/core/src/templates/workspace-core/.agents/skills/extensions/references/api.md +31 -0
  44. package/corpus/core/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +9 -0
  45. package/corpus/core/src/vite/client.ts +24 -0
  46. package/corpus/templates/analytics/.agents/skills/creative-context/SKILL.md +64 -0
  47. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +29 -21
  48. package/corpus/templates/analytics/AGENTS.md +13 -0
  49. package/corpus/templates/analytics/actions/clone-creative-context-dashboard.ts +86 -0
  50. package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +1 -1
  51. package/corpus/templates/analytics/actions/update-dashboard.ts +6 -2
  52. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +35 -7
  53. package/corpus/templates/analytics/app/components/layout/Layout.tsx +3 -3
  54. package/corpus/templates/analytics/app/i18n/zh-TW.ts +1 -0
  55. package/corpus/templates/analytics/app/i18n-data.ts +1 -0
  56. package/corpus/templates/analytics/app/pages/Ask.tsx +8 -4
  57. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +11 -1
  58. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/extension-slot.ts +11 -0
  59. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +86 -0
  60. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +6 -0
  61. package/corpus/templates/analytics/app/routes/agent.tsx +7 -1
  62. package/corpus/templates/analytics/changelog/2026-07-17-dashboard-extension-boxes.md +6 -0
  63. package/corpus/templates/analytics/changelog/2026-07-17-library-now-flags-published-dashboards-with-newer-versions-a.md +6 -0
  64. package/corpus/templates/analytics/changelog/2026-07-17-resources-can-be-added-to-creative-context-from-their-action.md +6 -0
  65. package/corpus/templates/analytics/changelog/2026-07-17-you-can-add-exact-approved-artifact-versions-to-governed-cre.md +6 -0
  66. package/corpus/templates/analytics/package.json +1 -0
  67. package/corpus/templates/analytics/server/lib/agent-readable-resource-context.ts +8 -0
  68. package/corpus/templates/analytics/server/lib/native-creative-context.ts +158 -0
  69. package/corpus/templates/analytics/server/plugins/agent-chat.ts +1 -0
  70. package/corpus/templates/analytics/server/plugins/creative-context.ts +10 -0
  71. package/corpus/templates/assets/.agents/skills/creative-context/SKILL.md +12 -3
  72. package/corpus/templates/assets/AGENTS.md +5 -0
  73. package/corpus/templates/assets/actions/clone-creative-context-asset.ts +74 -0
  74. package/corpus/templates/assets/app/hooks/use-navigation-state.ts +2 -1
  75. package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +308 -178
  76. package/corpus/templates/assets/app/routes/library.tsx +5 -11
  77. package/corpus/templates/assets/changelog/2026-07-17-library-now-flags-published-assets-with-newer-versions-and-l.md +6 -0
  78. package/corpus/templates/assets/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  79. package/corpus/templates/assets/changelog/2026-07-17-you-can-add-exact-approved-artifact-versions-to-governed-cre.md +6 -0
  80. package/corpus/templates/assets/server/lib/native-creative-context.ts +198 -0
  81. package/corpus/templates/assets/server/plugins/creative-context.ts +4 -0
  82. package/corpus/templates/brain/actions/provider-api-request.ts +1 -0
  83. package/corpus/templates/brain/app/hooks/use-navigation-state.ts +6 -1
  84. package/corpus/templates/brain/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  85. package/corpus/templates/calendar/actions/provider-api-request.ts +1 -0
  86. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +1 -1
  87. package/corpus/templates/calendar/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  88. package/corpus/templates/chat/app/hooks/use-navigation-state.ts +4 -1
  89. package/corpus/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  90. package/corpus/templates/clips/actions/get-recording-insights.ts +7 -4
  91. package/corpus/templates/clips/actions/list-recordings.ts +48 -0
  92. package/corpus/templates/clips/actions/list-viewers.ts +2 -1
  93. package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +3 -1
  94. package/corpus/templates/clips/app/components/library/library-layout.tsx +1 -1
  95. package/corpus/templates/clips/app/components/player/share-dialog.tsx +1 -3
  96. package/corpus/templates/clips/app/hooks/use-desktop-promo.ts +11 -6
  97. package/corpus/templates/clips/app/hooks/use-view-tracking.ts +6 -1
  98. package/corpus/templates/clips/app/lib/ffmpeg-export.ts +4 -2
  99. package/corpus/templates/clips/app/routes/share.$shareId.tsx +21 -3
  100. package/corpus/templates/clips/changelog/2026-07-17-dictation-keeps-sentence-spacing-and-no-longer-crashes-when-.md +6 -0
  101. package/corpus/templates/clips/changelog/2026-07-17-shared-clips-now-preserve-editor-access-and-show-editor-insi.md +6 -0
  102. package/corpus/templates/clips/changelog/2026-07-17-stitching-clips-no-longer-fails-when-editor-media-metadata-i.md +6 -0
  103. package/corpus/templates/clips/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  104. package/corpus/templates/clips/server/routes/api/public-recording.get.ts +14 -8
  105. package/corpus/templates/clips/shared/view-analytics.ts +4 -0
  106. package/corpus/templates/content/.agents/skills/creative-context/SKILL.md +12 -3
  107. package/corpus/templates/content/AGENTS.md +5 -0
  108. package/corpus/templates/content/actions/_content-space-access.ts +45 -2
  109. package/corpus/templates/content/actions/clone-creative-context-document.ts +61 -0
  110. package/corpus/templates/content/actions/create-content-database.ts +41 -7
  111. package/corpus/templates/content/actions/provider-api-request.ts +1 -0
  112. package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +21 -0
  113. package/corpus/templates/content/app/components/layout/Layout.tsx +1 -1
  114. package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +29 -0
  115. package/corpus/templates/content/app/root.tsx +1 -10
  116. package/corpus/templates/content/changelog/2026-07-17-creating-a-database-now-completes-reliably-in-hosted-workspa.md +6 -0
  117. package/corpus/templates/content/changelog/2026-07-17-library-now-flags-published-documents-with-newer-versions-an.md +6 -0
  118. package/corpus/templates/content/changelog/2026-07-17-resources-can-be-added-to-creative-context-from-their-action.md +6 -0
  119. package/corpus/templates/content/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  120. package/corpus/templates/content/changelog/2026-07-17-you-can-add-exact-approved-artifact-versions-to-governed-cre.md +6 -0
  121. package/corpus/templates/content/parity/matrix.md +1 -1
  122. package/corpus/templates/content/parity/matrix.ts +1 -0
  123. package/corpus/templates/content/server/lib/native-creative-context.ts +191 -0
  124. package/corpus/templates/content/server/plugins/creative-context.ts +8 -1
  125. package/corpus/templates/design/.agents/skills/creative-context/SKILL.md +11 -3
  126. package/corpus/templates/design/AGENTS.md +5 -0
  127. package/corpus/templates/design/actions/clone-creative-context-design-native.ts +111 -0
  128. package/corpus/templates/design/actions/provider-api-request.ts +1 -0
  129. package/corpus/templates/design/app/pages/Index.tsx +44 -0
  130. package/corpus/templates/design/app/pages/design-editor/types.ts +1 -0
  131. package/corpus/templates/design/changelog/2026-07-17-library-now-flags-published-designs-with-newer-versions-and-.md +6 -0
  132. package/corpus/templates/design/changelog/2026-07-17-resources-can-be-added-to-creative-context-from-their-action.md +6 -0
  133. package/corpus/templates/design/changelog/2026-07-17-you-can-add-exact-approved-artifact-versions-to-governed-cre.md +6 -0
  134. package/corpus/templates/design/server/lib/native-creative-context.ts +265 -0
  135. package/corpus/templates/design/server/plugins/creative-context.ts +8 -1
  136. package/corpus/templates/dispatch/actions/provider-api-request.ts +1 -0
  137. package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +4 -1
  138. package/corpus/templates/dispatch/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  139. package/corpus/templates/forms/app/components/layout/Layout.tsx +2 -4
  140. package/corpus/templates/forms/app/components/ui/popover.tsx +25 -1
  141. package/corpus/templates/forms/app/hooks/use-navigation-state.ts +6 -1
  142. package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +13 -10
  143. package/corpus/templates/forms/app/root.tsx +6 -1
  144. package/corpus/templates/forms/changelog/2026-07-17-form-builder-popovers-stay-within-the-viewport.md +6 -0
  145. package/corpus/templates/forms/changelog/2026-07-17-form-editor-loading-matches-current-sidebar-free-layout.md +6 -0
  146. package/corpus/templates/forms/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  147. package/corpus/templates/mail/actions/provider-api-request.ts +1 -0
  148. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +1 -1
  149. package/corpus/templates/mail/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  150. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +14 -3
  151. package/corpus/templates/plan/app/hooks/use-navigation-state.ts +8 -1
  152. package/corpus/templates/plan/app/root.tsx +0 -2
  153. package/corpus/templates/plan/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  154. package/corpus/templates/slides/.agents/skills/creative-context/SKILL.md +11 -3
  155. package/corpus/templates/slides/AGENTS.md +5 -0
  156. package/corpus/templates/slides/actions/clone-creative-context-deck.ts +96 -0
  157. package/corpus/templates/slides/actions/extract-pdf.ts +3 -2
  158. package/corpus/templates/slides/actions/import-file.ts +3 -2
  159. package/corpus/templates/slides/actions/provider-api-request.ts +1 -0
  160. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +27 -0
  161. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +21 -0
  162. package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -1
  163. package/corpus/templates/slides/app/context/DeckContext.tsx +23 -23
  164. package/corpus/templates/slides/changelog/2026-07-17-duplicated-slides-now-stay-in-the-deck.md +6 -0
  165. package/corpus/templates/slides/changelog/2026-07-17-library-now-flags-published-decks-with-newer-versions-and-le.md +6 -0
  166. package/corpus/templates/slides/changelog/2026-07-17-pdf-and-powerpoint-imports-now-work-reliably-in-hosted-decks.md +6 -0
  167. package/corpus/templates/slides/changelog/2026-07-17-resources-can-be-added-to-creative-context-from-their-action.md +6 -0
  168. package/corpus/templates/slides/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  169. package/corpus/templates/slides/changelog/2026-07-17-you-can-add-exact-approved-artifact-versions-to-governed-cre.md +6 -0
  170. package/corpus/templates/slides/server/lib/native-creative-context.ts +288 -0
  171. package/corpus/templates/slides/server/plugins/creative-context.ts +4 -0
  172. package/corpus/templates/tasks/app/components/layout/Layout.tsx +2 -13
  173. package/corpus/templates/tasks/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it.md +6 -0
  174. package/dist/agent/production-agent.d.ts.map +1 -1
  175. package/dist/agent/production-agent.js +13 -1
  176. package/dist/agent/production-agent.js.map +1 -1
  177. package/dist/agent/run-store.d.ts +17 -0
  178. package/dist/agent/run-store.d.ts.map +1 -1
  179. package/dist/agent/run-store.js +84 -2
  180. package/dist/agent/run-store.js.map +1 -1
  181. package/dist/client/AssistantChat.d.ts.map +1 -1
  182. package/dist/client/AssistantChat.js +18 -3
  183. package/dist/client/AssistantChat.js.map +1 -1
  184. package/dist/client/CommandMenu.d.ts.map +1 -1
  185. package/dist/client/CommandMenu.js +4 -0
  186. package/dist/client/CommandMenu.js.map +1 -1
  187. package/dist/client/active-run-state.d.ts +7 -0
  188. package/dist/client/active-run-state.d.ts.map +1 -1
  189. package/dist/client/active-run-state.js +28 -0
  190. package/dist/client/active-run-state.js.map +1 -1
  191. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  192. package/dist/client/agent-chat-adapter.js +4 -1
  193. package/dist/client/agent-chat-adapter.js.map +1 -1
  194. package/dist/client/chat/message-components.d.ts.map +1 -1
  195. package/dist/client/chat/message-components.js +35 -1
  196. package/dist/client/chat/message-components.js.map +1 -1
  197. package/dist/client/composer/TiptapComposer.d.ts +7 -0
  198. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  199. package/dist/client/composer/TiptapComposer.js +37 -8
  200. package/dist/client/composer/TiptapComposer.js.map +1 -1
  201. package/dist/client/integrations/IntegrationsPanel.d.ts.map +1 -1
  202. package/dist/client/integrations/IntegrationsPanel.js +3 -2
  203. package/dist/client/integrations/IntegrationsPanel.js.map +1 -1
  204. package/dist/client/resources/McpConnectionSuggestion.d.ts +9 -0
  205. package/dist/client/resources/McpConnectionSuggestion.d.ts.map +1 -0
  206. package/dist/client/resources/McpConnectionSuggestion.js +134 -0
  207. package/dist/client/resources/McpConnectionSuggestion.js.map +1 -0
  208. package/dist/client/resources/McpIntegrationDialog.d.ts +2 -1
  209. package/dist/client/resources/McpIntegrationDialog.d.ts.map +1 -1
  210. package/dist/client/resources/McpIntegrationDialog.js +51 -21
  211. package/dist/client/resources/McpIntegrationDialog.js.map +1 -1
  212. package/dist/client/resources/mcp-integration-catalog.d.ts +15 -0
  213. package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
  214. package/dist/client/resources/mcp-integration-catalog.js +420 -4
  215. package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
  216. package/dist/client/resources/mcp-integration-logos.d.ts +2 -0
  217. package/dist/client/resources/mcp-integration-logos.d.ts.map +1 -0
  218. package/dist/client/resources/mcp-integration-logos.js +109 -0
  219. package/dist/client/resources/mcp-integration-logos.js.map +1 -0
  220. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  221. package/dist/client/sharing/ShareButton.js +15 -12
  222. package/dist/client/sharing/ShareButton.js.map +1 -1
  223. package/dist/client/use-agent-chat-home-handoff.d.ts +1 -1
  224. package/dist/client/use-agent-chat-home-handoff.d.ts.map +1 -1
  225. package/dist/client/use-agent-chat-home-handoff.js +1 -1
  226. package/dist/client/use-agent-chat-home-handoff.js.map +1 -1
  227. package/dist/collab/routes.d.ts +1 -1
  228. package/dist/collab/struct-routes.d.ts +1 -1
  229. package/dist/deploy/build.d.ts.map +1 -1
  230. package/dist/deploy/build.js +23 -0
  231. package/dist/deploy/build.js.map +1 -1
  232. package/dist/extensions/html-shell.d.ts.map +1 -1
  233. package/dist/extensions/html-shell.js +33 -1
  234. package/dist/extensions/html-shell.js.map +1 -1
  235. package/dist/ingestion/office.d.ts.map +1 -1
  236. package/dist/ingestion/office.js +1 -2
  237. package/dist/ingestion/office.js.map +1 -1
  238. package/dist/ingestion/pptx.js +2 -4
  239. package/dist/ingestion/pptx.js.map +1 -1
  240. package/dist/localization/default-messages.d.ts +100 -0
  241. package/dist/localization/default-messages.d.ts.map +1 -1
  242. package/dist/localization/default-messages.js +101 -1
  243. package/dist/localization/default-messages.js.map +1 -1
  244. package/dist/mcp/actions/call-mcp-tool.js +1 -0
  245. package/dist/mcp/actions/call-mcp-tool.js.map +1 -1
  246. package/dist/notifications/routes.d.ts +1 -1
  247. package/dist/observability/routes.d.ts +5 -5
  248. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  249. package/dist/resources/handlers.d.ts +1 -1
  250. package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
  251. package/dist/secrets/register-framework-secrets.js +25 -0
  252. package/dist/secrets/register-framework-secrets.js.map +1 -1
  253. package/dist/secrets/routes.d.ts +9 -9
  254. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  255. package/dist/server/agent-chat-plugin.js +23 -1
  256. package/dist/server/agent-chat-plugin.js.map +1 -1
  257. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  258. package/dist/server/index.d.ts +1 -0
  259. package/dist/server/index.d.ts.map +1 -1
  260. package/dist/server/index.js +1 -0
  261. package/dist/server/index.js.map +1 -1
  262. package/dist/server/org-admin.d.ts +3 -0
  263. package/dist/server/org-admin.d.ts.map +1 -0
  264. package/dist/server/org-admin.js +24 -0
  265. package/dist/server/org-admin.js.map +1 -0
  266. package/dist/templates/chat/app/hooks/use-navigation-state.ts +4 -1
  267. package/dist/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  268. package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +9 -0
  269. package/dist/templates/workspace-core/.agents/skills/extensions/references/api.md +31 -0
  270. package/dist/templates/workspace-core/.agents/skills/external-agents/SKILL.md +9 -0
  271. package/dist/vite/client.d.ts.map +1 -1
  272. package/dist/vite/client.js +20 -0
  273. package/dist/vite/client.js.map +1 -1
  274. package/docs/content/integrations.mdx +597 -0
  275. package/docs/content/locales/ar-SA/mcp-clients.mdx +19 -1
  276. package/docs/content/locales/de-DE/mcp-clients.mdx +22 -1
  277. package/docs/content/locales/es-ES/mcp-clients.mdx +23 -1
  278. package/docs/content/locales/fr-FR/mcp-clients.mdx +23 -1
  279. package/docs/content/locales/hi-IN/mcp-clients.mdx +22 -1
  280. package/docs/content/locales/ja-JP/mcp-clients.mdx +21 -1
  281. package/docs/content/locales/ko-KR/mcp-clients.mdx +20 -1
  282. package/docs/content/locales/pt-BR/mcp-clients.mdx +22 -1
  283. package/docs/content/locales/zh-CN/mcp-clients.mdx +17 -1
  284. package/docs/content/locales/zh-TW/mcp-clients.mdx +17 -1
  285. package/docs/content/mcp-clients.mdx +51 -1
  286. package/docs/content/organizations-teams-permissions.mdx +413 -0
  287. package/package.json +1 -1
  288. package/src/templates/chat/app/hooks/use-navigation-state.ts +4 -1
  289. package/src/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +6 -0
  290. package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +9 -0
  291. package/src/templates/workspace-core/.agents/skills/extensions/references/api.md +31 -0
  292. package/src/templates/workspace-core/.agents/skills/external-agents/SKILL.md +9 -0
@@ -174,5 +174,30 @@ export function registerFrameworkSecrets() {
174
174
  required: false,
175
175
  });
176
176
  }
177
+ if (!getRequiredSecret("FIGMA_ACCESS_TOKEN")) {
178
+ registerRequiredSecret({
179
+ key: "FIGMA_ACCESS_TOKEN",
180
+ label: "Figma access token",
181
+ description: "Optional fallback for reading Figma file and node context when the hosted Figma MCP server is unavailable. Generate a personal access token with current_user:read and file_content:read.",
182
+ docsUrl: "https://developers.figma.com/docs/rest-api/personal-access-tokens/",
183
+ scope: "user",
184
+ kind: "api-key",
185
+ required: false,
186
+ validator: async (value) => {
187
+ const response = await fetch("https://api.figma.com/v1/me", {
188
+ headers: {
189
+ "X-Figma-Token": value,
190
+ "User-Agent": "AgentNative/1.0",
191
+ },
192
+ });
193
+ return response.ok
194
+ ? { ok: true }
195
+ : {
196
+ ok: false,
197
+ error: `Figma rejected the token (HTTP ${response.status}).`,
198
+ };
199
+ },
200
+ });
201
+ }
177
202
  }
178
203
  //# sourceMappingURL=register-framework-secrets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"register-framework-secrets.js","sourceRoot":"","sources":["../../src/secrets/register-framework-secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE1E,MAAM,UAAU,wBAAwB;IACtC,MAAM,uBAAuB,GAAG;QAC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WAAW;gBAClB,IAAI,EAAE,SAAS;gBACf,QAAQ,EAAE,KAAK;aAChB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC,EAAE,CAAC;QACvC,sBAAsB,CAAC;YACrB,GAAG,EAAE,cAAc;YACnB,KAAK,EAAE,cAAc;YACrB,WAAW,EACT,0FAA0F;YAC5F,OAAO,EACL,kHAAkH;YACpH,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAC;IACL,CAAC;AACH,CAAC","sourcesContent":["/**\n * Framework-level secret registrations.\n *\n * Side-effect module — imported by the core-routes plugin at boot so the\n * sidebar settings UI and the `/_agent-native/secrets` list route surface the\n * relevant keys in every template.\n *\n * Each call uses a `getRequiredSecret` guard so a template that has already\n * registered the same key (often with stricter settings like `required: true`)\n * wins — the framework registration is a fallback, not an override.\n *\n * OPENAI_API_KEY is optional framework-wide because it enables the shared\n * realtime speech-to-speech agent mode. Templates can pre-register the same\n * key with stricter requirements; the guard below preserves their definition.\n */\n\nimport { getRequiredSecret, registerRequiredSecret } from \"./register.js\";\n\nexport function registerFrameworkSecrets(): void {\n const workspaceOAuthProviders = [\n {\n id: \"figma\",\n credentialPrefix: \"FIGMA\",\n oauthProvider: \"figma\",\n label: \"Figma\",\n docsUrl: \"https://developers.figma.com/docs/rest-api/oauth-apps/\",\n },\n {\n id: \"google_drive\",\n credentialPrefix: \"GOOGLE\",\n oauthProvider: \"google\",\n label: \"Google Drive\",\n docsUrl:\n \"https://developers.google.com/identity/protocols/oauth2/web-server\",\n },\n {\n id: \"github\",\n credentialPrefix: \"GITHUB\",\n oauthProvider: \"github\",\n label: \"GitHub\",\n docsUrl: \"https://docs.github.com/apps/oauth-apps/building-oauth-apps\",\n },\n {\n id: \"hubspot\",\n credentialPrefix: \"HUBSPOT\",\n oauthProvider: \"hubspot\",\n label: \"HubSpot\",\n docsUrl:\n \"https://developers.hubspot.com/docs/apps/developer-platform/build-apps/authentication/oauth/oauth-quickstart-guide\",\n },\n {\n id: \"jira\",\n credentialPrefix: \"JIRA\",\n oauthProvider: \"jira\",\n label: \"Jira Cloud\",\n docsUrl:\n \"https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/\",\n },\n {\n id: \"sentry\",\n credentialPrefix: \"SENTRY\",\n oauthProvider: \"sentry\",\n label: \"Sentry\",\n docsUrl: \"https://docs.sentry.io/api/auth/\",\n },\n {\n id: \"notion\",\n credentialPrefix: \"NOTION\",\n oauthProvider: \"notion\",\n label: \"Notion\",\n docsUrl: \"https://developers.notion.com/docs/authorization\",\n },\n ] as const;\n\n for (const provider of workspaceOAuthProviders) {\n const prefix = provider.credentialPrefix;\n for (const credential of [\n { suffix: \"CLIENT_ID\", label: \"OAuth client ID\" },\n { suffix: \"CLIENT_SECRET\", label: \"OAuth client secret\" },\n ] as const) {\n const key = `${prefix}_${credential.suffix}`;\n if (!getRequiredSecret(key)) {\n registerRequiredSecret({\n key,\n label: `${provider.label} ${credential.label}`,\n description: `Workspace-owned ${provider.label} OAuth application credential. Tokens granted by users are stored separately and encrypted.`,\n docsUrl: provider.docsUrl,\n scope: \"workspace\",\n kind: \"api-key\",\n required: false,\n });\n }\n }\n\n const connectionKey = `${prefix}_CONNECTED`;\n if (!getRequiredSecret(connectionKey)) {\n registerRequiredSecret({\n key: connectionKey,\n label: `${provider.label} account`,\n description: `Connect a ${provider.label} account for scoped workspace imports.`,\n docsUrl: provider.docsUrl,\n scope: \"user\",\n kind: \"oauth\",\n required: false,\n oauthProvider: provider.oauthProvider,\n oauthConnectUrl: `/_agent-native/connections/oauth/${provider.id}/start`,\n });\n }\n }\n\n if (!getRequiredSecret(\"OPENAI_API_KEY\")) {\n registerRequiredSecret({\n key: \"OPENAI_API_KEY\",\n label: \"OpenAI API key\",\n description:\n \"Optional fallback for realtime voice when Builder is not connected, and for OpenAI transcription.\",\n docsUrl: \"https://platform.openai.com/api-keys\",\n scope: \"user\",\n kind: \"api-key\",\n required: false,\n validator: async (value) => {\n const response = await fetch(\"https://api.openai.com/v1/models\", {\n headers: { Authorization: `Bearer ${value}` },\n });\n return response.ok\n ? { ok: true }\n : {\n ok: false,\n error: `OpenAI rejected the key (HTTP ${response.status}).`,\n };\n },\n });\n }\n\n // Web-search tool backends — optional; the tool selects the first\n // configured manual key at call time, then falls back to Builder Connect.\n const webSearchKeys: Array<{\n key: string;\n label: string;\n description: string;\n docsUrl: string;\n }> = [\n {\n key: \"BRAVE_SEARCH_API_KEY\",\n label: \"Brave Search API Key\",\n description:\n \"Enables the web-search agent tool via Brave Search. Optional when Builder.io is connected for managed web search.\",\n docsUrl: \"https://brave.com/search/api/\",\n },\n {\n key: \"TAVILY_API_KEY\",\n label: \"Tavily API Key\",\n description:\n \"Enables the web-search agent tool via Tavily. Used as fallback when BRAVE_SEARCH_API_KEY is not set and before Builder-managed search.\",\n docsUrl: \"https://tavily.com/\",\n },\n {\n key: \"EXA_API_KEY\",\n label: \"Exa API Key\",\n description:\n \"Enables the web-search agent tool via Exa. Used as fallback when Brave and Tavily are not set and before Builder-managed search.\",\n docsUrl: \"https://exa.ai/\",\n },\n {\n key: \"FIRECRAWL_API_KEY\",\n label: \"Firecrawl API Key\",\n description:\n \"Enables the web-search agent tool via Firecrawl. Used as fallback when Brave, Tavily, and Exa are not set and before Builder-managed search.\",\n docsUrl: \"https://firecrawl.dev/\",\n },\n ];\n\n for (const entry of webSearchKeys) {\n if (!getRequiredSecret(entry.key)) {\n registerRequiredSecret({\n key: entry.key,\n label: entry.label,\n description: entry.description,\n docsUrl: entry.docsUrl,\n scope: \"workspace\",\n kind: \"api-key\",\n required: false,\n });\n }\n }\n\n if (!getRequiredSecret(\"GITHUB_TOKEN\")) {\n registerRequiredSecret({\n key: \"GITHUB_TOKEN\",\n label: \"GitHub token\",\n description:\n \"Enables connector-scoped repository file reads and writes for headless/cloud agent runs.\",\n docsUrl:\n \"https://docs.github.com/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens\",\n scope: \"workspace\",\n kind: \"api-key\",\n required: false,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"register-framework-secrets.js","sourceRoot":"","sources":["../../src/secrets/register-framework-secrets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE1E,MAAM,UAAU,wBAAwB;IACtC,MAAM,uBAAuB,GAAG;QAC9B;YACE,EAAE,EAAE,OAAO;YACX,gBAAgB,EAAE,OAAO;YACzB,aAAa,EAAE,OAAO;YACtB,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,wDAAwD;SAClE;QACD;YACE,EAAE,EAAE,cAAc;YAClB,gBAAgB,EAAE,QAAQ;YAC1B,aAAa,EAAE,QAAQ;YACvB,KAAK,EAAE,cAAc;YACrB,OAAO,EACL,oEAAoE;SACvE;QACD;YACE,EAAE,EAAE,QAAQ;YACZ,gBAAgB,EAAE,QAAQ;YAC1B,aAAa,EAAE,QAAQ;YACvB,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE,6DAA6D;SACvE;QACD;YACE,EAAE,EAAE,SAAS;YACb,gBAAgB,EAAE,SAAS;YAC3B,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,SAAS;YAChB,OAAO,EACL,oHAAoH;SACvH;QACD;YACE,EAAE,EAAE,MAAM;YACV,gBAAgB,EAAE,MAAM;YACxB,aAAa,EAAE,MAAM;YACrB,KAAK,EAAE,YAAY;YACnB,OAAO,EACL,uEAAuE;SAC1E;QACD;YACE,EAAE,EAAE,QAAQ;YACZ,gBAAgB,EAAE,QAAQ;YAC1B,aAAa,EAAE,QAAQ;YACvB,KAAK,EAAE,QAAQ;YACf,OAAO,EAAE,kCAAkC;SAC5C;QACD;YACE,EAAE,EAAE,QAAQ;YACZ,gBAAgB,EAAE,QAAQ;YAC1B,aAAa,EAAE,QAAQ;YACvB,K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,EAAE;oBACd,CAAC,CAAC;wBACE,EAAE,EAAE,KAAK;wBACT,KAAK,EAAE,kCAAkC,QAAQ,CAAC,MAAM,IAAI;qBAC7D,CAAC;YACR,CAAC;SACF,CAAC,CAAC;IACL,CAAC;AACH,CAAC","sourcesContent":["/**\n * Framework-level secret registrations.\n *\n * Side-effect module — imported by the core-routes plugin at boot so the\n * sidebar settings UI and the `/_agent-native/secrets` list route surface the\n * relevant keys in every template.\n *\n * Each call uses a `getRequiredSecret` guard so a template that has already\n * registered the same key (often with stricter settings like `required: true`)\n * wins — the framework registration is a fallback, not an override.\n *\n * OPENAI_API_KEY is optional framework-wide because it enables the shared\n * realtime speech-to-speech agent mode. Templates can pre-register the same\n * key with stricter requirements; the guard below preserves their definition.\n */\n\nimport { getRequiredSecret, registerRequiredSecret } from \"./register.js\";\n\nexport function registerFrameworkSecrets(): void {\n const workspaceOAuthProviders = [\n {\n id: \"figma\",\n credentialPrefix: \"FIGMA\",\n oauthProvider: \"figma\",\n label: \"Figma\",\n docsUrl: \"https://developers.figma.com/docs/rest-api/oauth-apps/\",\n },\n {\n id: \"google_drive\",\n credentialPrefix: \"GOOGLE\",\n oauthProvider: \"google\",\n label: \"Google Drive\",\n docsUrl:\n \"https://developers.google.com/identity/protocols/oauth2/web-server\",\n },\n {\n id: \"github\",\n credentialPrefix: \"GITHUB\",\n oauthProvider: \"github\",\n label: \"GitHub\",\n docsUrl: \"https://docs.github.com/apps/oauth-apps/building-oauth-apps\",\n },\n {\n id: \"hubspot\",\n credentialPrefix: \"HUBSPOT\",\n oauthProvider: \"hubspot\",\n label: \"HubSpot\",\n docsUrl:\n \"https://developers.hubspot.com/docs/apps/developer-platform/build-apps/authentication/oauth/oauth-quickstart-guide\",\n },\n {\n id: \"jira\",\n credentialPrefix: \"JIRA\",\n oauthProvider: \"jira\",\n label: \"Jira Cloud\",\n docsUrl:\n \"https://developer.atlassian.com/cloud/jira/platform/oauth-2-3lo-apps/\",\n },\n {\n id: \"sentry\",\n credentialPrefix: \"SENTRY\",\n oauthProvider: \"sentry\",\n label: \"Sentry\",\n docsUrl: \"https://docs.sentry.io/api/auth/\",\n },\n {\n id: \"notion\",\n credentialPrefix: \"NOTION\",\n oauthProvider: \"notion\",\n label: \"Notion\",\n docsUrl: \"https://developers.notion.com/docs/authorization\",\n },\n ] as const;\n\n for (const provider of workspaceOAuthProviders) {\n const prefix = provider.credentialPrefix;\n for (const credential of [\n { suffix: \"CLIENT_ID\", label: \"OAuth client ID\" },\n { suffix: \"CLIENT_SECRET\", label: \"OAuth client secret\" },\n ] as const) {\n const key = `${prefix}_${credential.suffix}`;\n if (!getRequiredSecret(key)) {\n registerRequiredSecret({\n key,\n label: `${provider.label} ${credential.label}`,\n description: `Workspace-owned ${provider.label} OAuth application credential. Tokens granted by users are stored separately and encrypted.`,\n docsUrl: provider.docsUrl,\n scope: \"workspace\",\n kind: \"api-key\",\n required: false,\n });\n }\n }\n\n const connectionKey = `${prefix}_CONNECTED`;\n if (!getRequiredSecret(connectionKey)) {\n registerRequiredSecret({\n key: connectionKey,\n label: `${provider.label} account`,\n description: `Connect a ${provider.label} account for scoped workspace imports.`,\n docsUrl: provider.docsUrl,\n scope: \"user\",\n kind: \"oauth\",\n required: false,\n oauthProvider: provider.oauthProvider,\n oauthConnectUrl: `/_agent-native/connections/oauth/${provider.id}/start`,\n });\n }\n }\n\n if (!getRequiredSecret(\"OPENAI_API_KEY\")) {\n registerRequiredSecret({\n key: \"OPENAI_API_KEY\",\n label: \"OpenAI API key\",\n description:\n \"Optional fallback for realtime voice when Builder is not connected, and for OpenAI transcription.\",\n docsUrl: \"https://platform.openai.com/api-keys\",\n scope: \"user\",\n kind: \"api-key\",\n required: false,\n validator: async (value) => {\n const response = await fetch(\"https://api.openai.com/v1/models\", {\n headers: { Authorization: `Bearer ${value}` },\n });\n return response.ok\n ? { ok: true }\n : {\n ok: false,\n error: `OpenAI rejected the key (HTTP ${response.status}).`,\n };\n },\n });\n }\n\n // Web-search tool backends — optional; the tool selects the first\n // configured manual key at call time, then falls back to Builder Connect.\n const webSearchKeys: Array<{\n key: string;\n label: string;\n description: string;\n docsUrl: string;\n }> = [\n {\n key: \"BRAVE_SEARCH_API_KEY\",\n label: \"Brave Search API Key\",\n description:\n \"Enables the web-search agent tool via Brave Search. Optional when Builder.io is connected for managed web search.\",\n docsUrl: \"https://brave.com/search/api/\",\n },\n {\n key: \"TAVILY_API_KEY\",\n label: \"Tavily API Key\",\n description:\n \"Enables the web-search agent tool via Tavily. Used as fallback when BRAVE_SEARCH_API_KEY is not set and before Builder-managed search.\",\n docsUrl: \"https://tavily.com/\",\n },\n {\n key: \"EXA_API_KEY\",\n label: \"Exa API Key\",\n description:\n \"Enables the web-search agent tool via Exa. Used as fallback when Brave and Tavily are not set and before Builder-managed search.\",\n docsUrl: \"https://exa.ai/\",\n },\n {\n key: \"FIRECRAWL_API_KEY\",\n label: \"Firecrawl API Key\",\n description:\n \"Enables the web-search agent tool via Firecrawl. Used as fallback when Brave, Tavily, and Exa are not set and before Builder-managed search.\",\n docsUrl: \"https://firecrawl.dev/\",\n },\n ];\n\n for (const entry of webSearchKeys) {\n if (!getRequiredSecret(entry.key)) {\n registerRequiredSecret({\n key: entry.key,\n label: entry.label,\n description: entry.description,\n docsUrl: entry.docsUrl,\n scope: \"workspace\",\n kind: \"api-key\",\n required: false,\n });\n }\n }\n\n if (!getRequiredSecret(\"GITHUB_TOKEN\")) {\n registerRequiredSecret({\n key: \"GITHUB_TOKEN\",\n label: \"GitHub token\",\n description:\n \"Enables connector-scoped repository file reads and writes for headless/cloud agent runs.\",\n docsUrl:\n \"https://docs.github.com/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens\",\n scope: \"workspace\",\n kind: \"api-key\",\n required: false,\n });\n }\n\n if (!getRequiredSecret(\"FIGMA_ACCESS_TOKEN\")) {\n registerRequiredSecret({\n key: \"FIGMA_ACCESS_TOKEN\",\n label: \"Figma access token\",\n description:\n \"Optional fallback for reading Figma file and node context when the hosted Figma MCP server is unavailable. Generate a personal access token with current_user:read and file_content:read.\",\n docsUrl:\n \"https://developers.figma.com/docs/rest-api/personal-access-tokens/\",\n scope: \"user\",\n kind: \"api-key\",\n required: false,\n validator: async (value) => {\n const response = await fetch(\"https://api.figma.com/v1/me\", {\n headers: {\n \"X-Figma-Token\": value,\n \"User-Agent\": \"AgentNative/1.0\",\n },\n });\n return response.ok\n ? { ok: true }\n : {\n ok: false,\n error: `Figma rejected the token (HTTP ${response.status}).`,\n };\n },\n });\n }\n}\n"]}
@@ -34,37 +34,37 @@ export declare function createListSecretsHandler(): import("h3").EventHandlerWit
34
34
  /** POST /_agent-native/secrets/:key — write a secret. */
35
35
  export declare function createWriteSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
36
36
  error: string;
37
- ok?: undefined;
38
37
  status?: undefined;
38
+ ok?: undefined;
39
39
  } | {
40
- error?: undefined;
41
40
  ok: boolean;
42
41
  status: string;
42
+ error?: undefined;
43
43
  } | {
44
- ok?: undefined;
45
44
  error: string;
46
45
  removed?: undefined;
46
+ ok?: undefined;
47
47
  } | {
48
- error?: undefined;
49
48
  ok: boolean;
50
49
  removed: boolean;
50
+ error?: undefined;
51
51
  }>>;
52
52
  /**
53
53
  * POST /_agent-native/secrets/:key/test — re-run the validator against the
54
54
  * current stored value without changing anything. Useful for the "Test" button.
55
55
  */
56
56
  export declare function createTestSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
57
- ok?: undefined;
58
57
  error: string;
59
58
  note?: undefined;
59
+ ok?: undefined;
60
60
  } | {
61
- error?: undefined;
62
61
  ok: boolean;
63
62
  note?: undefined;
64
- } | {
65
63
  error?: undefined;
64
+ } | {
66
65
  ok: boolean;
67
66
  note: string;
67
+ error?: undefined;
68
68
  } | {
69
69
  note?: undefined;
70
70
  ok: boolean;
@@ -95,12 +95,12 @@ export interface AdHocSecretPayload {
95
95
  export declare function createAdHocSecretHandler(): import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<AdHocSecretPayload[] | {
96
96
  error: string;
97
97
  } | {
98
- error?: undefined;
99
98
  ok: boolean;
100
99
  key: string;
101
- } | {
102
100
  error?: undefined;
101
+ } | {
103
102
  ok: boolean;
104
103
  removed: boolean;
104
+ error?: undefined;
105
105
  }>>;
106
106
  //# sourceMappingURL=routes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-chat-plugin.d.ts","sourceRoot":"","sources":["../../src/server/agent-chat-plugin.ts"],"names":[],"mappings":"AA+IA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EACL,yBAAyB,EACzB,KAAK,6BAA6B,EACnC,MAAM,+BAA+B,CAAC;AAkCvC,OAAO,EAAE,yBAAyB,EAAE,CAAC;AACrC,YAAY,EAAE,6BAA6B,EAAE,CAAC;AAuB9C,OAAO,EACL,0BAA0B,EAK1B,eAAe,EACf,eAAe,EACf,wBAAwB,EACxB,yBAAyB,EAE1B,MAAM,oCAAoC,CAAC;AAW5C,OAAO,EACL,gCAAgC,EAOjC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,yCAAyC,EAAE,MAAM,qCAAqC,CAAC;AAChG,OAAO,EACL,sBAAsB,EAGvB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAEL,sCAAsC,EACvC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAYxE,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAClC,OAAO,EAAE,gCAAgC,EAAE,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAAE,CAAC;AACpC,YAAY,EAA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sB,EAAE,MAAM,GAC7B,MAAM,CAER;AAaD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,oBAAoB,EAAE,GAAG,SAAS,EAChD,KAAK,EAAE,MAAM,EACb,IAAI,EAAE;IACJ,eAAe,EAAE,CACf,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;IAC9B,uBAAuB,EAAE,CACvB,GAAG,EAAE,oBAAoB,KACtB,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC;CAC/B,GACA,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,CAI1B;AAED,wBAAgB,qBAAqB,CACnC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,cAAc,CAkvKhB;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,cAAwC,CAAC;AAE9E,OAAO,EAEL,mBAAmB,EACnB,uBAAuB,EAGxB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,CAAC"}
@@ -11,7 +11,7 @@ import { AGENT_CHAT_BACKGROUND_RUN_FIELD, AGENT_CHAT_PROCESS_RUN_PATH, backgroun
11
11
  import { resolveEngine, createAnthropicEngine, getStoredModelForEngine, normalizeModelForEngine, getAgentEngineEntry, isAgentEnginePackageInstalled, isStoredEngineUsableForRequest, listAgentEngines, registerBuiltinEngines, } from "../agent/engine/index.js";
12
12
  import { createProductionAgentHandler, actionsToEngineTools, executeAgentToolCall, toolCallCacheKey, getActiveRunForThreadAsync, abortRunDurably, subscribeToRun, } from "../agent/production-agent.js";
13
13
  import { callerHasRunAccess, callerHasThreadAccess, } from "../agent/run-ownership.js";
14
- import { readBackgroundRunClaim } from "../agent/run-store.js";
14
+ import { markTurnAborted, readBackgroundRunClaim } from "../agent/run-store.js";
15
15
  import { buildCurrentTimeUserContext, buildRuntimeContextPrompt, } from "../agent/runtime-context.js";
16
16
  import { buildAssistantMessage, buildUserMessage, extractThreadMeta, foldAssistantTurn, mergeThreadDataForClientSave, upsertUserMessage, } from "../agent/thread-data-builder.js";
17
17
  import { attachToolSearch } from "../agent/tool-search.js";
@@ -3293,6 +3293,25 @@ Non-code requests are still fine on this surface: read data, navigate the UI, su
3293
3293
  const canViewThread = (threadId) => callerHasThreadAccess(owner, threadId, "viewer", { orgId });
3294
3294
  const canViewRun = (runId) => callerHasRunAccess(owner, runId, "viewer", { orgId });
3295
3295
  const canEditRun = (runId) => callerHasRunAccess(owner, runId, "editor", { orgId });
3296
+ const canEditThread = (threadId) => callerHasThreadAccess(owner, threadId, "editor", { orgId });
3297
+ // Route: POST /runs/turn/:turnId/abort
3298
+ // Covers the short window where the client has sent a turn but the
3299
+ // server has not yet created its background run id.
3300
+ const turnAbortMatch = url.match(/\/runs\/turn\/([^/?]+)\/abort/) ||
3301
+ url.match(/^\/turn\/([^/?]+)\/abort/);
3302
+ if (turnAbortMatch && method === "POST") {
3303
+ const turnId = decodeURIComponent(turnAbortMatch[1]);
3304
+ const body = await readBody(event).catch(() => null);
3305
+ const threadId = typeof body?.threadId === "string" ? body.threadId : "";
3306
+ if (!/^[a-zA-Z0-9_-]{1,160}$/.test(turnId) ||
3307
+ !threadId ||
3308
+ !(await canEditThread(threadId))) {
3309
+ setResponseStatus(event, 404);
3310
+ return { error: "Run not found" };
3311
+ }
3312
+ await markTurnAborted(threadId, turnId);
3313
+ return { ok: true };
3314
+ }
3296
3315
  // Route: GET /runs/list?goalId=agent-team|agent-harness
3297
3316
  // Returns background agents in the Code hub-compatible run shape.
3298
3317
  const listMatch = url.match(/\/runs\/list(?:[/?]|$)/) ||
@@ -4143,6 +4162,9 @@ Non-code requests are still fine on this surface: read data, navigate the UI, su
4143
4162
  }
4144
4163
  workerBody = {
4145
4164
  ...parsedPayload,
4165
+ ...(prepared.body.internalContinuation === true
4166
+ ? { internalContinuation: true }
4167
+ : {}),
4146
4168
  [AGENT_CHAT_BACKGROUND_RUN_FIELD]: preparedMarker,
4147
4169
  };
4148
4170
  }