@agent-native/core 0.80.4 → 0.80.6

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 (341) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +28 -2
  3. package/corpus/core/docs/content/locales/ar-SA/real-time-collaboration.mdx +2 -2
  4. package/corpus/core/docs/content/locales/ar-SA/template-design.mdx +1 -1
  5. package/corpus/core/docs/content/locales/de-DE/real-time-collaboration.mdx +3 -3
  6. package/corpus/core/docs/content/locales/de-DE/template-design.mdx +1 -1
  7. package/corpus/core/docs/content/locales/es-ES/real-time-collaboration.mdx +2 -2
  8. package/corpus/core/docs/content/locales/es-ES/template-design.mdx +1 -1
  9. package/corpus/core/docs/content/locales/fr-FR/real-time-collaboration.mdx +2 -2
  10. package/corpus/core/docs/content/locales/fr-FR/template-design.mdx +1 -1
  11. package/corpus/core/docs/content/locales/hi-IN/template-design.mdx +1 -1
  12. package/corpus/core/docs/content/locales/ja-JP/real-time-collaboration.mdx +2 -2
  13. package/corpus/core/docs/content/locales/ja-JP/template-design.mdx +1 -1
  14. package/corpus/core/docs/content/locales/ko-KR/real-time-collaboration.mdx +2 -2
  15. package/corpus/core/docs/content/locales/ko-KR/template-design.mdx +1 -1
  16. package/corpus/core/docs/content/locales/pt-BR/real-time-collaboration.mdx +2 -2
  17. package/corpus/core/docs/content/locales/pt-BR/template-design.mdx +1 -1
  18. package/corpus/core/docs/content/locales/zh-CN/real-time-collaboration.mdx +2 -2
  19. package/corpus/core/docs/content/locales/zh-CN/template-design.mdx +1 -1
  20. package/corpus/core/docs/content/locales/zh-TW/real-time-collaboration.mdx +2 -2
  21. package/corpus/core/docs/content/locales/zh-TW/template-design.mdx +1 -1
  22. package/corpus/core/docs/content/real-time-collaboration.mdx +2 -2
  23. package/corpus/core/docs/content/template-design.mdx +1 -1
  24. package/corpus/core/package.json +3 -7
  25. package/corpus/core/src/action.ts +21 -0
  26. package/corpus/core/src/agent/durable-background.ts +32 -11
  27. package/corpus/core/src/agent/production-agent.ts +11 -1
  28. package/corpus/core/src/agent/run-loop-with-resume.ts +3 -1
  29. package/corpus/core/src/brand-kit/fig/index.ts +17 -37
  30. package/corpus/core/src/cli/create.ts +1 -0
  31. package/corpus/core/src/cli/index.ts +1 -1
  32. package/corpus/core/src/cli/mcp-config-writers.ts +187 -51
  33. package/corpus/core/src/cli/skills.ts +18 -3
  34. package/corpus/core/src/client/AssistantChat.tsx +11 -1
  35. package/corpus/core/src/client/agent-chat.ts +12 -1
  36. package/corpus/core/src/client/composer/PromptComposer.tsx +100 -41
  37. package/corpus/core/src/client/org/OrgSwitcher.tsx +1 -1
  38. package/corpus/core/src/client/sharing/ShareButton.tsx +3 -27
  39. package/corpus/core/src/collab/presence.ts +1 -1
  40. package/corpus/core/src/mcp/connect-route.ts +34 -5
  41. package/corpus/core/src/server/action-discovery.ts +4 -0
  42. package/corpus/core/src/server/agent-chat-plugin.ts +20 -0
  43. package/corpus/core/src/sharing/registry.ts +17 -0
  44. package/corpus/core/src/templates/default/pnpm-workspace.yaml +1 -0
  45. package/corpus/core/src/templates/workspace-root/pnpm-workspace.yaml +1 -0
  46. package/corpus/templates/analytics/actions/dashboard-mutation-api.ts +2 -0
  47. package/corpus/templates/analytics/actions/update-dashboard.ts +8 -0
  48. package/corpus/templates/analytics/app/components/layout/Layout.tsx +1 -1
  49. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +117 -33
  50. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +4 -0
  51. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/types.ts +7 -0
  52. package/corpus/templates/analytics/changelog/2026-06-27-dashboards-can-now-nest-under-a-parent-in-the-sidebar-via-a-.md +6 -0
  53. package/corpus/templates/analytics/changelog/2026-06-29-analytics-pages-now-sit-closer-under-the-header-with-tighter.md +6 -0
  54. package/corpus/templates/assets/actions/generate-image-batch.ts +3 -0
  55. package/corpus/templates/assets/actions/generate-image.ts +3 -0
  56. package/corpus/templates/assets/changelog/2026-06-29-longer-agent-generation-window.md +6 -0
  57. package/corpus/templates/assets/netlify.toml +3 -3
  58. package/corpus/templates/assets/server/plugins/agent-chat.ts +4 -1
  59. package/corpus/templates/clips/app/components/capture-install-options.tsx +7 -8
  60. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +1 -1
  61. package/corpus/templates/content/AGENTS.md +57 -44
  62. package/corpus/templates/content/README.md +16 -0
  63. package/corpus/templates/content/actions/_builder-cms-read-client.ts +125 -0
  64. package/corpus/templates/content/actions/_builder-cms-source-adapter.ts +28 -6
  65. package/corpus/templates/content/actions/_builder-cms-write-adapter.ts +238 -69
  66. package/corpus/templates/content/actions/_builder-cms-write-settings.ts +125 -43
  67. package/corpus/templates/content/actions/_database-source-utils.ts +746 -97
  68. package/corpus/templates/content/actions/_database-utils.ts +17 -14
  69. package/corpus/templates/content/actions/_federation-join.ts +14 -2
  70. package/corpus/templates/content/actions/_join-suggestion.ts +89 -14
  71. package/corpus/templates/content/actions/_local-file-documents.ts +2 -1
  72. package/corpus/templates/content/actions/attach-content-database-source.ts +124 -5
  73. package/corpus/templates/content/actions/bind-content-database-source-field.ts +256 -0
  74. package/corpus/templates/content/actions/change-content-database-source-role.ts +420 -0
  75. package/corpus/templates/content/actions/create-document.ts +8 -0
  76. package/corpus/templates/content/actions/execute-builder-source-batch.ts +282 -0
  77. package/corpus/templates/content/actions/execute-builder-source-execution.ts +220 -8
  78. package/corpus/templates/content/actions/get-content-database.ts +10 -2
  79. package/corpus/templates/content/actions/prepare-builder-source-execution.ts +19 -2
  80. package/corpus/templates/content/actions/prepare-builder-source-review.ts +47 -15
  81. package/corpus/templates/content/actions/refresh-content-database-source.ts +11 -4
  82. package/corpus/templates/content/actions/review-content-database-source-change-set.ts +6 -2
  83. package/corpus/templates/content/actions/set-content-database-source-write-mode.ts +32 -12
  84. package/corpus/templates/content/actions/stage-builder-revision.ts +14 -10
  85. package/corpus/templates/content/actions/validate-builder-source-execution.ts +25 -3
  86. package/corpus/templates/content/app/blocks/BuilderDocsBlocks.tsx +10 -0
  87. package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +1 -0
  88. package/corpus/templates/content/app/components/editor/ContentReferencePreview.tsx +185 -0
  89. package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +1520 -553
  90. package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +3 -0
  91. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +150 -1
  92. package/corpus/templates/content/app/components/editor/VisualEditor.tsx +19 -0
  93. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +647 -66
  94. package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +543 -204
  95. package/corpus/templates/content/app/components/editor/extensions/ContentReferenceNode.tsx +82 -0
  96. package/corpus/templates/content/app/global.css +9 -0
  97. package/corpus/templates/content/app/hooks/use-content-database.ts +62 -0
  98. package/corpus/templates/content/app/i18n/zh-TW.ts +76 -0
  99. package/corpus/templates/content/app/i18n-data.ts +924 -0
  100. package/corpus/templates/content/changelog/2026-06-29-builder-review-checks-now-preserve-publish-and-unpublish-cho.md +6 -0
  101. package/corpus/templates/content/changelog/2026-06-29-database-sources-can-now-be-added-as-more-rows-or-matched.md +6 -0
  102. package/corpus/templates/content/changelog/2026-06-29-fixed-loading-the-final-rows-in-larger-databases-without-bre.md +6 -0
  103. package/corpus/templates/content/changelog/2026-06-29-reusable-mdx-references-now-preview-linked-local-documents-i.md +6 -0
  104. package/corpus/templates/content/shared/api.ts +91 -1
  105. package/corpus/templates/content/shared/builder-docs-blocks.ts +8 -0
  106. package/corpus/templates/content/shared/builder-mdx.ts +141 -4
  107. package/corpus/templates/content/shared/nfm.ts +62 -0
  108. package/corpus/templates/content/vite.config.ts +14 -7
  109. package/corpus/templates/design/.agents/skills/design-systems/SKILL.md +10 -11
  110. package/corpus/templates/design/AGENTS.md +5 -0
  111. package/corpus/templates/design/_gitignore +7 -0
  112. package/corpus/templates/design/actions/apply-visual-edit.ts +22 -12
  113. package/corpus/templates/design/actions/create-design-system.ts +15 -4
  114. package/corpus/templates/design/actions/create-file.ts +20 -1
  115. package/corpus/templates/design/actions/delete-design-system.ts +2 -2
  116. package/corpus/templates/design/actions/duplicate-design.ts +35 -9
  117. package/corpus/templates/design/actions/generate-design.ts +146 -69
  118. package/corpus/templates/design/actions/generate-screens.ts +51 -19
  119. package/corpus/templates/design/actions/get-design-snapshot.ts +5 -1
  120. package/corpus/templates/design/actions/get-design.ts +2 -0
  121. package/corpus/templates/design/actions/import-design-project.ts +28 -9
  122. package/corpus/templates/design/actions/import-document.ts +22 -8
  123. package/corpus/templates/design/actions/index-design-system-with-builder.ts +6 -153
  124. package/corpus/templates/design/actions/navigate.ts +105 -54
  125. package/corpus/templates/design/actions/set-default-design-system.ts +17 -3
  126. package/corpus/templates/design/actions/show-design-questions.ts +2 -0
  127. package/corpus/templates/design/actions/update-design.ts +2 -1
  128. package/corpus/templates/design/actions/view-screen.ts +12 -6
  129. package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +4 -4
  130. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +159 -41
  131. package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +8 -4
  132. package/corpus/templates/design/app/components/design/DrawOverlay.tsx +37 -42
  133. package/corpus/templates/design/app/components/design/EditPanel.tsx +336 -183
  134. package/corpus/templates/design/app/components/design/LayersPanel.tsx +153 -34
  135. package/corpus/templates/design/app/components/design/MultiScreenCanvas.tsx +135 -33
  136. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +6 -0
  137. package/corpus/templates/design/app/components/design/TweaksPanel.tsx +2 -1
  138. package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +4 -10
  139. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +84 -43
  140. package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +4 -4
  141. package/corpus/templates/design/app/components/design/inspector/{FigmaColorPicker.tsx → DesignColorPicker.tsx} +89 -62
  142. package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +14 -26
  143. package/corpus/templates/design/app/components/design/inspector/GradientEditor.tsx +40 -12
  144. package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +13 -4
  145. package/corpus/templates/design/app/components/design/inspector/SHADER_INTEGRATION.md +13 -13
  146. package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +13 -9
  147. package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +13 -4
  148. package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +6 -6
  149. package/corpus/templates/design/app/components/design/inspector/{figma-icons.tsx → design-icons.tsx} +2 -2
  150. package/corpus/templates/design/app/components/design/inspector/index.ts +12 -12
  151. package/corpus/templates/design/app/components/design/inspector/scrub-input-utils.ts +5 -2
  152. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +3 -3
  153. package/corpus/templates/design/app/components/layout/Layout.tsx +5 -2
  154. package/corpus/templates/design/app/components/layout/Sidebar.tsx +1 -1
  155. package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +167 -91
  156. package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +16 -3
  157. package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +15 -0
  158. package/corpus/templates/design/app/global.css +4 -0
  159. package/corpus/templates/design/app/hooks/use-design-system.ts +4 -1
  160. package/corpus/templates/design/app/hooks/use-navigation-state.ts +38 -3
  161. package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +9 -2
  162. package/corpus/templates/design/app/i18n/zh-TW.ts +22 -0
  163. package/corpus/templates/design/app/i18n-data.ts +527 -0
  164. package/corpus/templates/design/app/lib/design-systems.ts +6 -4
  165. package/corpus/templates/design/app/lib/design-templates.ts +15 -3
  166. package/corpus/templates/design/app/pages/DesignEditor.tsx +641 -158
  167. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +42 -34
  168. package/corpus/templates/design/app/pages/VisualEdit.tsx +100 -0
  169. package/corpus/templates/design/app/root.tsx +42 -9
  170. package/corpus/templates/design/app/routes/visual-edit.tsx +7 -0
  171. package/corpus/templates/design/changelog/2026-06-28-live-cursors-now-keep-names-beside-a-cleaner-pointer-marker.md +1 -1
  172. package/corpus/templates/design/changelog/2026-06-28-mode-switching-now-lives-in-a-compact-bottom-right-icon-dock.md +1 -1
  173. package/corpus/templates/design/changelog/2026-06-28-visual-code-design-mode.md +6 -0
  174. package/corpus/templates/design/changelog/2026-06-29-design-generation-prompts-now-show-connect-ai-before-sending.md +6 -0
  175. package/corpus/templates/design/changelog/2026-06-29-design-mode-top-chrome-now-groups-collaborators-preview-shar.md +1 -1
  176. package/corpus/templates/design/changelog/2026-06-29-fixed-design-editor-exports-and-gradient-edits-so-multi-scre.md +6 -0
  177. package/corpus/templates/design/changelog/2026-06-29-longer-hosted-agent-turns.md +6 -0
  178. package/corpus/templates/design/changelog/2026-06-29-png-export-handles-modern-css-color-functions-more-reliably.md +6 -0
  179. package/corpus/templates/design/changelog/2026-06-29-png-export-now-ignores-duplicate-clicks-while-a-download-is-.md +6 -0
  180. package/corpus/templates/design/changelog/2026-06-29-public-visual-edit-and-shared-design-links-now-invite-visito.md +6 -0
  181. package/corpus/templates/design/changelog/2026-06-29-visual-edit-actions-now-reject-missing-design-targets-before.md +6 -0
  182. package/corpus/templates/design/e2e/README.md +71 -0
  183. package/corpus/templates/design/e2e/global-setup.ts +157 -0
  184. package/corpus/templates/design/e2e/helpers.ts +148 -0
  185. package/corpus/templates/design/netlify.toml +3 -4
  186. package/corpus/templates/design/package.json +5 -1
  187. package/corpus/templates/design/playwright.config.ts +51 -0
  188. package/corpus/templates/design/server/handlers/index-design-system-with-builder.ts +121 -0
  189. package/corpus/templates/design/server/handlers/uploads.ts +89 -38
  190. package/corpus/templates/design/server/lib/builder-design-system-proxy.ts +181 -0
  191. package/corpus/templates/design/server/lib/coding-handoff.ts +33 -4
  192. package/corpus/templates/design/server/lib/design-export.ts +35 -8
  193. package/corpus/templates/design/server/plugins/agent-chat.ts +4 -0
  194. package/corpus/templates/design/server/plugins/auth.ts +10 -1
  195. package/corpus/templates/design/server/routes/api/index-design-system-with-builder.post.ts +1 -0
  196. package/corpus/templates/design/shared/api.ts +2 -0
  197. package/corpus/templates/design/shared/apply-edits.ts +12 -8
  198. package/corpus/templates/design/shared/canvas-math.ts +19 -1
  199. package/corpus/templates/design/shared/code-layer.ts +87 -28
  200. package/corpus/templates/design/shared/generation-session.ts +1 -0
  201. package/corpus/templates/design/shared/resolve-tweaks.ts +4 -3
  202. package/corpus/templates/design/shared/shader-presets.ts +10 -0
  203. package/corpus/templates/design/shared/source-mode.ts +9 -0
  204. package/corpus/templates/design/vitest.config.ts +2 -1
  205. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +1 -1
  206. package/corpus/templates/plan/.agents/skills/visual-plan/references/canvas.md +1 -1
  207. package/corpus/templates/plan/AGENTS.md +1 -1
  208. package/corpus/templates/plan/actions/create-plan-design.ts +1 -1
  209. package/corpus/templates/plan/actions/validate-local-plan-source.ts +2 -10
  210. package/corpus/templates/plan/app/pages/PlansPage.tsx +1 -0
  211. package/corpus/templates/plan/docs/commenting-ux-plan.md +2 -2
  212. package/corpus/templates/plan/server/plan-content.ts +1 -1
  213. package/corpus/templates/plan/server/ui-plan-html.ts +2 -2
  214. package/corpus/templates/slides/actions/index-design-system-with-builder.ts +6 -153
  215. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +53 -38
  216. package/corpus/templates/slides/app/components/design-system/{fig-import-response.ts → builder-index-response.ts} +9 -6
  217. package/corpus/templates/slides/app/components/visual-editor/MultiSelectChip.tsx +1 -1
  218. package/corpus/templates/slides/changelog/2026-06-29-design-system-setup-now-indexes-uploaded-design-files-throug.md +6 -0
  219. package/corpus/templates/slides/changelog/2026-06-29-longer-hosted-agent-turns.md +6 -0
  220. package/corpus/templates/slides/netlify.toml +3 -6
  221. package/corpus/templates/slides/server/handlers/index-design-system-with-builder.ts +116 -0
  222. package/corpus/templates/slides/server/lib/builder-design-system-proxy.ts +179 -0
  223. package/corpus/templates/slides/server/plugins/agent-chat.ts +4 -1
  224. package/corpus/templates/slides/server/routes/api/index-design-system-with-builder.post.ts +1 -0
  225. package/dist/action.d.ts +15 -0
  226. package/dist/action.d.ts.map +1 -1
  227. package/dist/action.js +6 -0
  228. package/dist/action.js.map +1 -1
  229. package/dist/agent/durable-background.d.ts +9 -7
  230. package/dist/agent/durable-background.d.ts.map +1 -1
  231. package/dist/agent/durable-background.js +27 -11
  232. package/dist/agent/durable-background.js.map +1 -1
  233. package/dist/agent/production-agent.d.ts +7 -0
  234. package/dist/agent/production-agent.d.ts.map +1 -1
  235. package/dist/agent/production-agent.js +4 -1
  236. package/dist/agent/production-agent.js.map +1 -1
  237. package/dist/agent/run-loop-with-resume.d.ts +2 -1
  238. package/dist/agent/run-loop-with-resume.d.ts.map +1 -1
  239. package/dist/agent/run-loop-with-resume.js +2 -2
  240. package/dist/agent/run-loop-with-resume.js.map +1 -1
  241. package/dist/brand-kit/fig/index.d.ts +4 -4
  242. package/dist/brand-kit/fig/index.d.ts.map +1 -1
  243. package/dist/brand-kit/fig/index.js +14 -27
  244. package/dist/brand-kit/fig/index.js.map +1 -1
  245. package/dist/cli/create.d.ts.map +1 -1
  246. package/dist/cli/create.js +1 -0
  247. package/dist/cli/create.js.map +1 -1
  248. package/dist/cli/index.js +1 -1
  249. package/dist/cli/index.js.map +1 -1
  250. package/dist/cli/mcp-config-writers.d.ts +15 -7
  251. package/dist/cli/mcp-config-writers.d.ts.map +1 -1
  252. package/dist/cli/mcp-config-writers.js +198 -45
  253. package/dist/cli/mcp-config-writers.js.map +1 -1
  254. package/dist/cli/skills.d.ts +1 -1
  255. package/dist/cli/skills.d.ts.map +1 -1
  256. package/dist/cli/skills.js +18 -3
  257. package/dist/cli/skills.js.map +1 -1
  258. package/dist/client/AssistantChat.d.ts.map +1 -1
  259. package/dist/client/AssistantChat.js +11 -1
  260. package/dist/client/AssistantChat.js.map +1 -1
  261. package/dist/client/agent-chat.d.ts.map +1 -1
  262. package/dist/client/agent-chat.js +15 -2
  263. package/dist/client/agent-chat.js.map +1 -1
  264. package/dist/client/composer/PromptComposer.d.ts.map +1 -1
  265. package/dist/client/composer/PromptComposer.js +35 -1
  266. package/dist/client/composer/PromptComposer.js.map +1 -1
  267. package/dist/client/org/OrgSwitcher.js +1 -1
  268. package/dist/client/org/OrgSwitcher.js.map +1 -1
  269. package/dist/client/sharing/ShareButton.d.ts +1 -1
  270. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  271. package/dist/client/sharing/ShareButton.js +2 -15
  272. package/dist/client/sharing/ShareButton.js.map +1 -1
  273. package/dist/collab/presence.d.ts +1 -1
  274. package/dist/collab/presence.js +1 -1
  275. package/dist/collab/presence.js.map +1 -1
  276. package/dist/collab/routes.d.ts +1 -1
  277. package/dist/file-upload/actions/upload-image.d.ts +2 -2
  278. package/dist/mcp/connect-route.d.ts.map +1 -1
  279. package/dist/mcp/connect-route.js +34 -5
  280. package/dist/mcp/connect-route.js.map +1 -1
  281. package/dist/notifications/routes.d.ts +2 -2
  282. package/dist/observability/routes.d.ts +8 -8
  283. package/dist/resources/handlers.d.ts +1 -1
  284. package/dist/server/action-discovery.d.ts.map +1 -1
  285. package/dist/server/action-discovery.js +5 -0
  286. package/dist/server/action-discovery.js.map +1 -1
  287. package/dist/server/agent-chat-plugin.d.ts +6 -0
  288. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  289. package/dist/server/agent-chat-plugin.js +12 -3
  290. package/dist/server/agent-chat-plugin.js.map +1 -1
  291. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  292. package/dist/sharing/registry.d.ts.map +1 -1
  293. package/dist/sharing/registry.js +11 -0
  294. package/dist/sharing/registry.js.map +1 -1
  295. package/dist/templates/default/pnpm-workspace.yaml +1 -0
  296. package/dist/templates/workspace-root/pnpm-workspace.yaml +1 -0
  297. package/docs/content/locales/ar-SA/real-time-collaboration.mdx +2 -2
  298. package/docs/content/locales/ar-SA/template-design.mdx +1 -1
  299. package/docs/content/locales/de-DE/real-time-collaboration.mdx +3 -3
  300. package/docs/content/locales/de-DE/template-design.mdx +1 -1
  301. package/docs/content/locales/es-ES/real-time-collaboration.mdx +2 -2
  302. package/docs/content/locales/es-ES/template-design.mdx +1 -1
  303. package/docs/content/locales/fr-FR/real-time-collaboration.mdx +2 -2
  304. package/docs/content/locales/fr-FR/template-design.mdx +1 -1
  305. package/docs/content/locales/hi-IN/template-design.mdx +1 -1
  306. package/docs/content/locales/ja-JP/real-time-collaboration.mdx +2 -2
  307. package/docs/content/locales/ja-JP/template-design.mdx +1 -1
  308. package/docs/content/locales/ko-KR/real-time-collaboration.mdx +2 -2
  309. package/docs/content/locales/ko-KR/template-design.mdx +1 -1
  310. package/docs/content/locales/pt-BR/real-time-collaboration.mdx +2 -2
  311. package/docs/content/locales/pt-BR/template-design.mdx +1 -1
  312. package/docs/content/locales/zh-CN/real-time-collaboration.mdx +2 -2
  313. package/docs/content/locales/zh-CN/template-design.mdx +1 -1
  314. package/docs/content/locales/zh-TW/real-time-collaboration.mdx +2 -2
  315. package/docs/content/locales/zh-TW/template-design.mdx +1 -1
  316. package/docs/content/real-time-collaboration.mdx +2 -2
  317. package/docs/content/template-design.mdx +1 -1
  318. package/package.json +3 -7
  319. package/src/templates/default/pnpm-workspace.yaml +1 -0
  320. package/src/templates/workspace-root/pnpm-workspace.yaml +1 -0
  321. package/corpus/core/src/brand-kit/fig/decode.ts +0 -410
  322. package/corpus/core/src/brand-kit/fig/extract-design-system.ts +0 -947
  323. package/corpus/core/src/brand-kit/fig/fig-to-html.ts +0 -1906
  324. package/corpus/templates/design/actions/import-figma.ts +0 -55
  325. package/corpus/templates/design/changelog/2026-06-28-figma-style-code-design-mode.md +0 -6
  326. package/corpus/templates/design/server/handlers/import-figma-system.ts +0 -86
  327. package/corpus/templates/design/server/routes/api/import-figma-system.post.ts +0 -1
  328. package/corpus/templates/slides/server/handlers/import-figma-system.ts +0 -101
  329. package/corpus/templates/slides/server/routes/api/import-figma-system.post.ts +0 -1
  330. package/dist/brand-kit/fig/decode.d.ts +0 -33
  331. package/dist/brand-kit/fig/decode.d.ts.map +0 -1
  332. package/dist/brand-kit/fig/decode.js +0 -358
  333. package/dist/brand-kit/fig/decode.js.map +0 -1
  334. package/dist/brand-kit/fig/extract-design-system.d.ts +0 -44
  335. package/dist/brand-kit/fig/extract-design-system.d.ts.map +0 -1
  336. package/dist/brand-kit/fig/extract-design-system.js +0 -752
  337. package/dist/brand-kit/fig/extract-design-system.js.map +0 -1
  338. package/dist/brand-kit/fig/fig-to-html.d.ts +0 -246
  339. package/dist/brand-kit/fig/fig-to-html.d.ts.map +0 -1
  340. package/dist/brand-kit/fig/fig-to-html.js +0 -1506
  341. package/dist/brand-kit/fig/fig-to-html.js.map +0 -1
package/corpus/README.md CHANGED
@@ -27,5 +27,5 @@ rg -n "defineAction|useActionQuery" node_modules/@agent-native/core/corpus
27
27
 
28
28
  ## Generated Counts
29
29
 
30
- - core files: 2044
31
- - template files: 4559
30
+ - core files: 2041
31
+ - template files: 4587
@@ -1,5 +1,31 @@
1
1
  # @agent-native/core
2
2
 
3
+ ## 0.80.6
4
+
5
+ ### Patch Changes
6
+
7
+ - f52eeb1: Pin the scaffolded workspace Nitro tracer dependency so fresh installs keep building reliably.
8
+ - f52eeb1: Ignore shareable resource registrations that originate from test modules during app runtime.
9
+
10
+ ## 0.80.5
11
+
12
+ ### Patch Changes
13
+
14
+ - 8a43376: Allow app-level opt-in to durable background agent chat runs, let direct loop callers use that timeout regime, and expose per-action tool timeouts from `defineAction`.
15
+ - 8a43376: Route Figma/code design-system indexing through Builder and keep the legacy fig subpath as a compatibility shim.
16
+ - 8a43376: Expose the Design visual-edit skill in repo-local skill sync and generated app plugin bundles.
17
+ - 8a43376: Defer agent chat context subscriber updates so embedded chat rendering does not trigger render-phase updates in host apps.
18
+ - 8a43376: Make MCP install/connect idempotent for Codex `config.toml`. The writer now
19
+ recognizes a server's sub-tables (`[mcp_servers.<name>.http_headers]`,
20
+ `[mcp_servers.<name>.env]`, …) as part of its footprint, so re-installing or
21
+ reconnecting a server clears stale sub-tables instead of leaving one behind as a
22
+ duplicate TOML key. Same-URL alias cleanup removes the whole footprint too, and
23
+ the AGENTS.md / CLAUDE.md managed-instruction writers collapse any pre-existing
24
+ duplicate blocks into a single block.
25
+ - 8a43376: Show a clear loading state while authorizing MCP device codes.
26
+ - 8a43376: Render label share buttons without a leading visibility icon.
27
+ - 8a43376: Show the Connect AI setup card and block submits from standalone prompt composers when no LLM is connected.
28
+
3
29
  ## 0.80.4
4
30
 
5
31
  ### Patch Changes
@@ -82,7 +108,7 @@
82
108
  ### Patch Changes
83
109
 
84
110
  - aa345cc: App shells use an outline-style raised surface ring and Dispatch left navigation can collapse to an animated icon rail.
85
- - aa345cc: Live cursors now use Figma-style pointer markers with adjacent participant labels.
111
+ - aa345cc: Live cursors now use compact pointer markers with adjacent participant labels.
86
112
  - aa345cc: Surface missing LLM provider connections before agent chat starts a run, including Builder and AI SDK engines.
87
113
  - aa345cc: Fix Chrome visual glitchiness (blank/stale regions on scroll, pan, and zoom) in
88
114
  plan documents and canvases by removing `backdrop-filter` (`backdrop-blur`) from
@@ -2961,7 +2987,7 @@ visual-plan` / `visual-recap` likewise install only the named skill, while the
2961
2987
  - Exponential backoff with jitter (cap ~15 s) on consecutive network errors.
2962
2988
  - SSE fast-path: wire collab events via the existing `/_agent-native/poll-events` EventSource stream; relax poll to ~12 s while SSE is healthy, fall back to 2 s when SSE drops.
2963
2989
 
2964
- - 66f8e32: Add Presence Kit: Liveblocks/Figma-grade live-cursor and selection primitives.
2990
+ - 66f8e32: Add Presence Kit: Liveblocks/collaboration-grade live-cursor and selection primitives.
2965
2991
  - **Fast awareness**: `useCollaborativeDoc` now POSTs awareness state changes within ~150ms (throttled trailing edge) instead of waiting for the 2s poll cycle. The `postAwareness` server handler emits an `AWARENESS_CHANGE_EVENT` that is forwarded through the `/_agent-native/poll-events` SSE stream to connected peers push-style. Polling-only deployments degrade gracefully to poll cadence.
2966
2992
  - **`usePresence(awareness, localClientId)`**: reactive hook that derives `OtherPresence[]` from awareness state. The agent (AGENT_CLIENT_ID) appears as a first-class participant with `isAgent: true`. Returns `setPresence(partial)` to publish arbitrary presence fields (cursor, selection, viewport).
2967
2993
  - **`LiveCursorOverlay`**: absolutely-positioned overlay that renders remote users' cursors from normalized 0–1 coordinates. The agent cursor uses a sparkle icon. Cursors fade out after 10s of inactivity with 120ms CSS transitions.
@@ -14,7 +14,7 @@ description: "تحرير تعاوني متعدد المستخدمين حيث ي
14
14
 
15
15
  ## الرؤية {#vision}
16
16
 
17
- يبدو التحرير جنبًا إلى جنب مع الوكيل وكأنه يعمل في Google Docs أو Figma مع
17
+ يبدو التحرير جنبًا إلى جنب مع الوكيل وكأنه يعمل في محرر تعاوني مع
18
18
  زميل عمل فوري ولا يكل:
19
19
 
20
20
  إذا كنت تحتاج فقط إلى تحديث UI عندما يكتب الوكيل أو مستخدم آخر إلى SQL، فلن تحتاج إلى أي من هذا — استخدم [`useDbSync`](/docs/client). هذه الصفحة مخصصة للتحرير المشترك على مستوى الأحرف لمستند نص منسق واحد (المؤشرات المشتركة، والدمج الخالي من الصراع). كلاهما يركبان نفس قناة `/_agent-native/poll`.
@@ -356,7 +356,7 @@ pnpm action edit-document --id doc123 --find "delete me" --replace ""
356
356
 
357
357
  ## مجموعة أدوات الحضور {#presence-kit}
358
358
 
359
- توفر مجموعة أدوات الحضور Liveblocks/مؤشر مباشر على مستوى Figma وأساسيات التحديد أعلى طبقة الوعي الحالية.
359
+ توفر مجموعة أدوات الحضور مؤشرات مباشرة وأساسيات تحديد على مستوى التعاون أعلى طبقة الوعي الحالية.
360
360
 
361
361
  استيراد التواجد من جانب العميل والمحرر UI من المسار الفرعي للمتصفح الذي يتم التركيز عليه:
362
362
 
@@ -340,7 +340,7 @@ pnpm dev
340
340
  - **التصميمات** — `create-design` (صدفة فارغة)، `generate-design` (كتابة محتوى HTML/JSX)، `update-design`، `get-design`، `list-designs`، `duplicate-design`، `delete-design`، و`apply-tweaks` لاستمرار مقبض القرص المباشر القيم (لون التمييز، والكثافة، وما إلى ذلك).
341
341
  - **الملفات** — `create-file`، `update-file`، `list-files`، `delete-file` للملفات الموجودة داخل مشروع التصميم.
342
342
  - **أنظمة التصميم** — `create-design-system`، و`update-design-system`، و`get-design-system`، و`list-design-systems`، و`delete-design-system`، و`set-default-design-system`، و`analyze-brand-assets` لجمع بيانات العلامة التجارية قبل التحليل.
343
- - **استيراد** — `index-design-system-with-builder` for Builder-backed code/GitHub design-system indexing, plus `import-figma`, `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
343
+ - **استيراد** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
344
344
  - **التصدير والتسليم** — `export-html`، و`export-pdf`، و`export-svg`، و`export-zip`، و`export-coding-handoff` لتحويل التصميم إلى تسليم لأداة البرمجة.
345
345
  - **السياق والتنقل** — `view-screen` (التصميم الحالي، ملف مفتوح، عرض، سؤال معلق أو شبكة متغيرة)، `get-design-snapshot` (الحالة الحالية للوكيل الخارجي للمتابعة منها)، و`navigate`.
346
346
 
@@ -14,8 +14,8 @@ Agent-natives Kollaborationsmodell.
14
14
 
15
15
  ## Vision {#vision}
16
16
 
17
- Das Bearbeiten zusammen mit dem Agenten fühlt sich an, als würde man mit Google Docs oder Figma arbeiten
18
- ein Kollege, der sowohl spontan als auch unermüdlich ist:
17
+ Das Bearbeiten zusammen mit dem Agenten fühlt sich an wie die Arbeit in einem kollaborativen Editor mit
18
+ einem Kollegen, der sowohl spontan als auch unermüdlich ist:
19
19
 
20
20
  Wenn Sie UI nur zum Aktualisieren benötigen, wenn der Agent oder ein anderer Benutzer in SQL schreibt, brauchen Sie nichts davon – verwenden Sie [`useDbSync`](/docs/client). Diese Seite dient der gemeinsamen Bearbeitung eines einzelnen Rich-Text-Dokuments auf Zeichenebene (gemeinsame Cursor, konfliktfreies Zusammenführen). Beide nutzen denselben `/_agent-native/poll`-Kanal.
21
21
 
@@ -358,7 +358,7 @@ pnpm action edit-document --id doc123 --find "delete me" --replace ""
358
358
 
359
359
  ## Präsenzset {#presence-kit}
360
360
 
361
- Das Presence-Kit bietet Live-Cursor- und Auswahlprimitive in Liveblocks/Figma-Qualität auf der vorhandenen Awareness-Ebene.
361
+ Das Presence-Kit bietet Live-Cursor- und Auswahlprimitive in Kollaborationsqualität auf der vorhandenen Awareness-Ebene.
362
362
 
363
363
  Clientseitige Präsenz und Editor UI aus dem fokussierten Browser-Unterpfad importieren:
364
364
 
@@ -338,7 +338,7 @@ Jeder vom Agenten aufrufbare Vorgang ist eine TypeScript-Datei in `templates/des
338
338
  - **Designs** – `create-design` (leere Shell), `generate-design` (generierten HTML/JSX-Inhalt schreiben), `update-design`, `get-design`, `list-designs`, `duplicate-design`, `delete-design` und `apply-tweaks` zum Beibehalten von Live-Tweak-Knopf-Werten (Akzentfarbe, Dichte, usw.).
339
339
  - **Dateien** – `create-file`, `update-file`, `list-files`, `delete-file` für die Dateien in einem Designprojekt.
340
340
  - **Designsysteme** – `create-design-system`, `update-design-system`, `get-design-system`, `list-design-systems`, `delete-design-system`, `set-default-design-system` und `analyze-brand-assets` zum Sammeln von Markendaten vor der Analyse.
341
- - **Importieren** — `index-design-system-with-builder` for Builder-backed code/GitHub design-system indexing, plus `import-figma`, `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
341
+ - **Importieren** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **Export & Übergabe** – `export-html`, `export-pdf`, `export-svg`, `export-zip` und `export-coding-handoff`, um ein Design in eine Codierungstool-Übergabe umzuwandeln.
343
343
  - **Kontext und Navigation** – `view-screen` (aktuelles Design, offene Datei, Ansicht, ausstehende Frage oder Variantenraster), `get-design-snapshot` (aktueller Status, von dem aus ein externer Agent fortfahren kann) und `navigate`.
344
344
 
@@ -14,7 +14,7 @@ modelo de colaboración nativo del agente.
14
14
 
15
15
  ## Visión {#vision}
16
16
 
17
- Editar junto al agente es como trabajar en Google Docs o Figma con
17
+ Editar junto al agente es como trabajar en un editor colaborativo con
18
18
  un compañero de trabajo instantáneo e incansable:
19
19
 
20
20
  Si solo necesita que el UI se actualice cuando el agente u otro usuario escribe en SQL, no necesita nada de esto: use [`useDbSync`](/docs/client). Esta página es para la coedición a nivel de carácter de un único documento de texto enriquecido (cursores compartidos, fusión sin conflictos). Ambos utilizan el mismo canal `/_agent-native/poll`.
@@ -363,7 +363,7 @@ pnpm action edit-document --id doc123 --find "delete me" --replace ""
363
363
 
364
364
  ## Kit de presencia {#presence-kit}
365
365
 
366
- El kit de presencia proporciona primitivas de selección y cursor en vivo de nivel Liveblocks/Figma además de la capa de conciencia existente.
366
+ El kit de presencia proporciona primitivas de selección y cursor en vivo de nivel colaborativo además de la capa de conciencia existente.
367
367
 
368
368
  Importar presencia del lado del cliente y editor UI desde la subruta del navegador enfocada:
369
369
 
@@ -338,7 +338,7 @@ Cada operación invocable por el agente es un archivo TypeScript en `templates/d
338
338
  - **Diseños**: `create-design` (cáscara vacía), `generate-design` (contenido de HTML/JSX generado por escritura), `update-design`, `get-design`, `list-designs`, `duplicate-design`, `delete-design` y `apply-tweaks` para conservar los valores de las perillas de ajuste en vivo (color de acento, densidad, etc.).
339
339
  - **Archivos**: `create-file`, `update-file`, `list-files`, `delete-file` para los archivos dentro de un proyecto de diseño.
340
340
  - **Sistemas de diseño**: `create-design-system`, `update-design-system`, `get-design-system`, `list-design-systems`, `delete-design-system`, `set-default-design-system` y `analyze-brand-assets` para recopilar datos de marca antes del análisis.
341
- - **Importar** — `index-design-system-with-builder` for Builder-backed code/GitHub design-system indexing, plus `import-figma`, `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
341
+ - **Importar** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **Exportación y transferencia**: `export-html`, `export-pdf`, `export-svg`, `export-zip` y `export-coding-handoff` para convertir un diseño en una transferencia de herramienta de codificación.
343
343
  - **Contexto y navegación**: `view-screen` (diseño actual, archivo abierto, vista, pregunta pendiente o cuadrícula de variantes), `get-design-snapshot` (estado actual desde el cual un agente externo puede continuar) y `navigate`.
344
344
 
@@ -14,7 +14,7 @@ modèle de collaboration agent-natif.
14
14
 
15
15
  ## Vision {#vision}
16
16
 
17
- Modifier aux côtés de l'agent, c'est comme travailler dans Google Docs ou Figma avec
17
+ Modifier aux côtés de l'agent, c'est comme travailler dans un éditeur collaboratif avec
18
18
  un collègue à la fois instantané et infatigable :
19
19
 
20
20
  Si vous avez simplement besoin d'actualiser le UI lorsque l'agent ou un autre utilisateur écrit sur SQL, vous n'avez pas besoin de tout cela : utilisez [`useDbSync`](/docs/client). Cette page est destinée à la co-édition au niveau des caractères d'un seul document en texte enrichi (curseurs partagés, fusion sans conflit). Les deux utilisent le même canal `/_agent-native/poll`.
@@ -361,7 +361,7 @@ pnpm action edit-document --id doc123 --find "delete me" --replace ""
361
361
 
362
362
  ## Kit de Présence {#presence-kit}
363
363
 
364
- Le kit de présence fournit des primitives de curseur et de sélection Liveblocks/Figma-grade au-dessus de la couche de sensibilisation existante.
364
+ Le kit de présence fournit des primitives de curseur et de sélection de niveau collaboratif au-dessus de la couche de sensibilisation existante.
365
365
 
366
366
  Importer la présence côté client et l'éditeur UI à partir du sous-chemin du navigateur ciblé :
367
367
 
@@ -338,7 +338,7 @@ Chaque opération appelable par un agent est un fichier TypeScript dans `templat
338
338
  - **Designs** — `create-design` (coque vide), `generate-design` (contenu HTML/JSX généré par écriture), `update-design`, `get-design`, `list-designs`, `duplicate-design`, `delete-design` et `apply-tweaks` pour conserver les valeurs du bouton de réglage en direct (couleur d'accent, densité, etc.).
339
339
  - **Fichiers** — `create-file`, `update-file`, `list-files`, `delete-file` pour les fichiers contenus dans un projet de conception.
340
340
  - **Systèmes de conception** : `create-design-system`, `update-design-system`, `get-design-system`, `list-design-systems`, `delete-design-system`, `set-default-design-system` et `analyze-brand-assets` pour collecter des données de marque avant l'analyse.
341
- - **Importer** — `index-design-system-with-builder` for Builder-backed code/GitHub design-system indexing, plus `import-figma`, `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
341
+ - **Importer** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **Exportation et transfert** : `export-html`, `export-pdf`, `export-svg`, `export-zip` et `export-coding-handoff` pour transformer une conception en transfert d'outil de codage.
343
343
  - **Contexte et navigation** – `view-screen` (conception actuelle, fichier ouvert, vue, question en attente ou grille de variantes), `get-design-snapshot` (état actuel à partir duquel un agent externe peut continuer) et `navigate`.
344
344
 
@@ -338,7 +338,7 @@ UI में रूट `templates/design/app/routes/` के अंतर्ग
338
338
  - **डिज़ाइन** - `create-design` (खाली शेल), `generate-design` (लाइव बनाए रखने के लिए HTML/JSX सामग्री लिखें), `update-design`, `get-design`, `list-designs`, `duplicate-design`, `delete-design`, और `apply-tweaks` ट्विक-नॉब मान (उच्चारण रंग, घनत्व, आदि)।
339
339
  - **फ़ाइलें** - एक डिज़ाइन प्रोजेक्ट के अंदर फ़ाइलों के लिए `create-file`, `update-file`, `list-files`, `delete-file`।
340
340
  - **डिज़ाइन सिस्टम** - विश्लेषण से पहले ब्रांड डेटा इकट्ठा करने के लिए `create-design-system`, `update-design-system`, `get-design-system`, `list-design-systems`, `delete-design-system`, `set-default-design-system`, और `analyze-brand-assets`।
341
- - **आयात** — `index-design-system-with-builder` for Builder-backed code/GitHub design-system indexing, plus `import-figma`, `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
341
+ - **आयात** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **निर्यात और हैंडऑफ़** - किसी डिज़ाइन को कोडिंग-टूल हैंडऑफ़ में बदलने के लिए `export-html`, `export-pdf`, `export-svg`, `export-zip`, और `export-coding-handoff`।
343
343
  - **संदर्भ और नेविगेशन** - `view-screen` (वर्तमान डिज़ाइन, खुली फ़ाइल, दृश्य, लंबित प्रश्न या भिन्न ग्रिड), `get-design-snapshot` (बाहरी एजेंट के लिए वर्तमान स्थिति जारी रखने के लिए), और `navigate`।
344
344
 
@@ -14,7 +14,7 @@ description: "AI エージェントがファーストクラスのピアである
14
14
 
15
15
  ## ビジョン {#vision}
16
16
 
17
- エージェントと一緒に編集すると、Google ドキュメントや Figma で作業しているような気分になります
17
+ エージェントと一緒に編集すると、共同編集エディターで作業しているような気分になります
18
18
  即席で疲れを知らない同僚:
19
19
 
20
20
  エージェントまたは別のユーザーが SQL に書き込むときに UI を更新するだけの場合は、これは必要ありません。[`useDbSync`](/docs/client) を使用してください。このページは、単一のリッチ テキスト ドキュメントを文字レベルで共同編集するためのものです (共有カーソル、競合のない結合)。どちらも同じ `/_agent-native/poll` チャネルに乗ります。
@@ -360,7 +360,7 @@ pnpm action edit-document --id doc123 --find "delete me" --replace ""
360
360
 
361
361
  ## プレゼンス キット {#presence-kit}
362
362
 
363
- プレゼンス キットは、既存のアウェアネス レイヤーの上に Liveblocks/Figma グレードのライブ カーソルと選択プリミティブを提供します。
363
+ プレゼンス キットは、既存のアウェアネス レイヤーの上に共同編集グレードのライブ カーソルと選択プリミティブを提供します。
364
364
 
365
365
  フォーカスされたブラウザのサブパスからクライアント側のプレゼンスとエディタ UI をインポートします:
366
366
 
@@ -340,7 +340,7 @@ UI のルートは `templates/design/app/routes/` の下にあります: `_index
340
340
  - **デザイン** — `create-design` (空のシェル)、`generate-design` (生成された HTML/JSX コンテンツを書き込む)、`update-design`、`get-design`、`list-designs`、`duplicate-design`、`delete-design`、および `apply-tweaks` (ライブ永続化用)ノブの値を調整します (アクセントカラー、濃度など)。
341
341
  - **ファイル** — 設計プロジェクト内のファイルの `create-file`、`update-file`、`list-files`、`delete-file`。
342
342
  - **デザイン システム** — 分析に先立ってブランド データを収集するための `create-design-system`、`update-design-system`、`get-design-system`、`list-design-systems`、`delete-design-system`、`set-default-design-system`、および `analyze-brand-assets`。
343
- - **インポート** — `index-design-system-with-builder` for Builder-backed code/GitHub design-system indexing, plus `import-figma`, `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
343
+ - **インポート** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
344
344
  - **エクスポートとハンドオフ** — デザインをコーディング ツールのハンドオフに変換するための `export-html`、`export-pdf`、`export-svg`、`export-zip`、および `export-coding-handoff`。
345
345
  - **コンテキストとナビゲーション** — `view-screen` (現在のデザイン、開いているファイル、ビュー、保留中の質問またはバリアント グリッド)、`get-design-snapshot` (外部エージェントが続行する現在の状態)、および `navigate`。
346
346
 
@@ -14,7 +14,7 @@ description: "AI 에이전트가 최고 수준의 피어인 다중 사용자 공
14
14
 
15
15
  ## 비전 {#vision}
16
16
 
17
- 에이전트와 함께 편집하는 것은 Google Docs나 Figma에서 작업하는 것과 같습니다.
17
+ 에이전트와 함께 편집하는 것은 협업 편집기에서 작업하는 것과 같습니다.
18
18
  즉각적이고 지치지 않는 동료:
19
19
 
20
20
  상담원이나 다른 사용자가 SQL에 쓸 때 새로 고치기 위해 UI만 필요한 경우에는 이 중 어떤 것도 필요하지 않습니다. [`useDbSync`](/docs/client)를 사용하세요. 이 페이지는 단일 서식 있는 텍스트 문서의 문자 수준 공동 편집을 위한 것입니다(공유 커서, 충돌 없는 병합). 둘 다 동일한 `/_agent-native/poll` 채널을 타고 있습니다.
@@ -358,7 +358,7 @@ pnpm action edit-document --id doc123 --find "delete me" --replace ""
358
358
 
359
359
  ## 프레즌스 키트 {#presence-kit}
360
360
 
361
- 프레즌스 키트는 기존 인식 레이어 위에 Liveblocks/Figma급 라이브 커서 및 선택 프리미티브를 제공합니다.
361
+ 프레즌스 키트는 기존 인식 레이어 위에 협업 수준의 라이브 커서 및 선택 프리미티브를 제공합니다.
362
362
 
363
363
  선택한 브라우저 하위 경로에서 클라이언트측 상태 및 편집기 UI 가져오기:
364
364
 
@@ -338,7 +338,7 @@ UI의 경로는 `templates/design/app/routes/` 아래에 있습니다: `_index.t
338
338
  - **설계** — `create-design`(빈 셸), `generate-design`(생성된 HTML/JSX 콘텐츠 쓰기), `update-design`, `get-design`, `list-designs`, `duplicate-design`, `delete-design` 및 `apply-tweaks` - 실시간 조정 손잡이 값 유지 (악센트 색상, 밀도 등).
339
339
  - **파일** — 디자인 프로젝트 내부 파일의 경우 `create-file`, `update-file`, `list-files`, `delete-file`.
340
340
  - **디자인 시스템** — 분석에 앞서 브랜드 데이터를 수집하기 위한 `create-design-system`, `update-design-system`, `get-design-system`, `list-design-systems`, `delete-design-system`, `set-default-design-system` 및 `analyze-brand-assets`.
341
- - **가져오기** — `index-design-system-with-builder` for Builder-backed code/GitHub design-system indexing, plus `import-figma`, `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
341
+ - **가져오기** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **내보내기 및 핸드오프** — `export-html`, `export-pdf`, `export-svg`, `export-zip` 및 `export-coding-handoff` - 설계를 코딩 도구 핸드오프로 전환합니다.
343
343
  - **컨텍스트 및 탐색** — `view-screen`(현재 디자인, 열린 파일, 보기, 보류 중인 질문 또는 변형 그리드), `get-design-snapshot`(계속할 외부 에이전트의 현재 상태) 및 `navigate`.
344
344
 
@@ -14,7 +14,7 @@ modelo de colaboração nativo do agente.
14
14
 
15
15
  ## Visão {#vision}
16
16
 
17
- Editar junto com o agente é como trabalhar no Google Docs ou no Figma com
17
+ Editar junto com o agente é como trabalhar em um editor colaborativo com
18
18
  um colega de trabalho instantâneo e incansável:
19
19
 
20
20
  Se você só precisa que UI seja atualizado quando o agente ou outro usuário grava em SQL, você não precisa de nada disso - use [`useDbSync`](/docs/client). Esta página é para coedição em nível de caractere de um único documento rich text (cursores compartilhados, mesclagem sem conflitos). Ambos utilizam o mesmo canal `/_agent-native/poll`.
@@ -361,7 +361,7 @@ pnpm action edit-document --id doc123 --find "delete me" --replace ""
361
361
 
362
362
  ## Kit de presença {#presence-kit}
363
363
 
364
- O kit de presença fornece cursor ao vivo de nível Liveblocks/Figma e primitivas de seleção na parte superior da camada de reconhecimento existente.
364
+ O kit de presença fornece cursor ao vivo e primitivas de seleção de nível colaborativo sobre a camada de reconhecimento existente.
365
365
 
366
366
  Importe a presença e o editor do lado do cliente UI do subcaminho do navegador em foco:
367
367
 
@@ -338,7 +338,7 @@ Cada operação que pode ser chamada pelo agente é um arquivo TypeScript em `te
338
338
  - **Designs** — `create-design` (shell vazio), `generate-design` (gravação de conteúdo HTML/JSX gerado), `update-design`, `get-design`, `list-designs`, `duplicate-design`, `delete-design` e `apply-tweaks` para valores de botão de ajuste ao vivo persistentes (cor de destaque, densidade, etc.).
339
339
  - **Arquivos** — `create-file`, `update-file`, `list-files`, `delete-file` para os arquivos dentro de um projeto de design.
340
340
  - **Sistemas de design** — `create-design-system`, `update-design-system`, `get-design-system`, `list-design-systems`, `delete-design-system`, `set-default-design-system` e `analyze-brand-assets` para coletar dados da marca antes da análise.
341
- - **Importar** — `index-design-system-with-builder` for Builder-backed code/GitHub design-system indexing, plus `import-figma`, `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
341
+ - **Importar** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **Exportação e transferência** — `export-html`, `export-pdf`, `export-svg`, `export-zip` e `export-coding-handoff` para transformar um design em uma transferência de ferramenta de codificação.
343
343
  - **Contexto e navegação** — `view-screen` (design atual, arquivo aberto, visualização, pergunta pendente ou grade de variantes), `get-design-snapshot` (estado atual para um agente externo continuar) e `navigate`.
344
344
 
@@ -14,7 +14,7 @@ description: "多用户协作编辑,其中 AI 代理是一流的同行:CRDT
14
14
 
15
15
  ## 愿景 {#vision}
16
16
 
17
- 与代理一起编辑感觉就像在 Google Docs 或 Figma 中工作
17
+ 与代理一起编辑感觉就像在协作编辑器中工作
18
18
  一位既快速又不知疲倦的同事:
19
19
 
20
20
  如果您只需要在代理或其他用户写入 SQL 时刷新 UI,则不需要任何这些 — 使用 [`useDbSync`](/docs/client)。此页面用于对单个富文本文档进行字符级共同编辑(共享光标、无冲突合并)。两者都使用相同的 `/_agent-native/poll` 通道。
@@ -352,7 +352,7 @@ pnpm action edit-document --id doc123 --find "delete me" --replace ""
352
352
 
353
353
  ## 存在套件 {#presence-kit}
354
354
 
355
- 存在套件在现有感知层之上提供 Liveblocks/Figma 级实时光标和选择基元。
355
+ 存在套件在现有感知层之上提供协作级实时光标和选择基元。
356
356
 
357
357
  从焦点浏览器子路径导入客户端状态和编辑器 UI:
358
358
 
@@ -338,7 +338,7 @@ UI 中的路由位于 `templates/design/app/routes/` 下:`_index.tsx`(列表
338
338
  - **设计** - `create-design`(空壳)、`generate-design`(写入生成的 HTML/JSX 内容)、`update-design`、`get-design`、`list-designs`、`duplicate-design`、`delete-design` 和 `apply-tweaks` 用于持久保存实时调整旋钮值(强调色、密度等)。
339
339
  - **文件** - `create-file`、`update-file`、`list-files`、`delete-file` 用于设计项目内的文件。
340
340
  - **设计系统** - `create-design-system`、`update-design-system`、`get-design-system`、`list-design-systems`、`delete-design-system`、`set-default-design-system` 和 `analyze-brand-assets` 用于在分析之前收集品牌数据。
341
- - **导入** — `index-design-system-with-builder` for Builder-backed code/GitHub design-system indexing, plus `import-figma`, `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
341
+ - **导入** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **导出和移交** - `export-html`、`export-pdf`、`export-svg`、`export-zip` 和 `export-coding-handoff` 将设计转变为编码工具移交。
343
343
  - **上下文和导航** - `view-screen`(当前设计、打开的文件、视图、待决问题或变体网格)、`get-design-snapshot`(外部代理继续的当前状态)和 `navigate`。
344
344
 
@@ -14,7 +14,7 @@ description: "多使用者協作編輯,其中 AI 代理是一流的同行:CR
14
14
 
15
15
  ## 願景 {#vision}
16
16
 
17
- 與代理一起編輯感覺就像在 Google Docs 或 Figma 中工作
17
+ 與代理一起編輯感覺就像在協作編輯器中工作
18
18
  一位既快速又不知疲倦的同事:
19
19
 
20
20
  如果您只需要在代理或其他使用者寫入 SQL 時重新整理 UI,則不需要任何這些 — 使用 [`useDbSync`](/docs/client)。此頁面用於對單一富文字檔案進行字符級共同編輯(共用游標、無衝突合併)。兩者都使用相同的 `/_agent-native/poll` 通道。
@@ -352,7 +352,7 @@ pnpm action edit-document --id doc123 --find "delete me" --replace ""
352
352
 
353
353
  ## 存在套件 {#presence-kit}
354
354
 
355
- 存在套件在現有感知層之上提供 Liveblocks/Figma 級即時游標和選取基元。
355
+ 存在套件在現有感知層之上提供協作級即時游標和選取基元。
356
356
 
357
357
  從焦點瀏覽器子路徑匯入用戶端狀態和編輯器 UI:
358
358
 
@@ -338,7 +338,7 @@ UI 中的路由位於 `templates/design/app/routes/` 下:`_index.tsx`(清單
338
338
  - **設計** - `create-design`(空殼)、`generate-design`(寫入產生的 HTML/JSX 內容)、`update-design`、`get-design`、`list-designs`、`duplicate-design`、`delete-design` 和 `apply-tweaks` 用於持久儲存即時調整旋鈕值(強調色、密度等)。
339
339
  - **檔案** - `create-file`、`update-file`、`list-files`、`delete-file` 用於設計專案內的檔案。
340
340
  - **設計系統** - `create-design-system`、`update-design-system`、`get-design-system`、`list-design-systems`、`delete-design-system`、`set-default-design-system` 和 `analyze-brand-assets` 用於在分析之前收集品牌資料。
341
- - **匯入** — `index-design-system-with-builder` for Builder-backed code/GitHub design-system indexing, plus `import-figma`, `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
341
+ - **匯入** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **匯出和移交** - `export-html`、`export-pdf`、`export-svg`、`export-zip` 和 `export-coding-handoff` 將設計轉變為編碼工具移交。
343
343
  - **脈絡和導覽** - `view-screen`(目前設計、開啟的檔案、檢視、待決問題或變體網格)、`get-design-snapshot`(外部代理繼續的目前狀態)和 `navigate`。
344
344
 
@@ -14,7 +14,7 @@ agent-native collaboration model.
14
14
 
15
15
  ## Vision {#vision}
16
16
 
17
- Editing alongside the agent feels like working in Google Docs or Figma with
17
+ Editing alongside the agent feels like working in a collaborative editor with
18
18
  a coworker who is both instant and tireless:
19
19
 
20
20
  If you just need the UI to refresh when the agent or another user writes to SQL, you don't need any of this — use [`useDbSync`](/docs/client). This page is for character-level co-editing of a single rich-text document (shared cursors, conflict-free merging). Both ride the same `/_agent-native/poll` channel.
@@ -358,7 +358,7 @@ pnpm action edit-document --id doc123 --find "delete me" --replace ""
358
358
 
359
359
  ## Presence Kit {#presence-kit}
360
360
 
361
- The presence kit provides Liveblocks/Figma-grade live-cursor and selection primitives on top of the existing awareness layer.
361
+ The presence kit provides Liveblocks/collaboration-grade live-cursor and selection primitives on top of the existing awareness layer.
362
362
 
363
363
  Import client-side presence and editor UI from the focused browser subpath:
364
364
 
@@ -338,7 +338,7 @@ Every agent-callable operation is a TypeScript file in `templates/design/actions
338
338
  - **Designs** — `create-design` (empty shell), `generate-design` (write generated HTML/JSX content), `update-design`, `get-design`, `list-designs`, `duplicate-design`, `delete-design`, and `apply-tweaks` for persisting live tweak-knob values (accent color, density, etc.).
339
339
  - **Files** — `create-file`, `update-file`, `list-files`, `delete-file` for the files inside a design project.
340
340
  - **Design systems** — `create-design-system`, `update-design-system`, `get-design-system`, `list-design-systems`, `delete-design-system`, `set-default-design-system`, and `analyze-brand-assets` for gathering brand data ahead of analysis.
341
- - **Import** — `index-design-system-with-builder` for Builder-backed code/GitHub design-system indexing, plus `import-figma`, `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
341
+ - **Import** — `index-design-system-with-builder` for Builder-backed code/GitHub/Figma file design-system indexing, plus `import-from-url`, `import-document` (DOCX/PPTX/PDF/XLSX), and `import-design-project` for other sources.
342
342
  - **Export & handoff** — `export-html`, `export-pdf`, `export-svg`, `export-zip`, and `export-coding-handoff` to turn a design into a coding-tool handoff.
343
343
  - **Context & navigation** — `view-screen` (current design, open file, view, pending question or variant grid), `get-design-snapshot` (current state for an external agent to continue from), and `navigate`.
344
344
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.80.4",
3
+ "version": "0.80.6",
4
4
  "description": "Framework for agent-native application development — where AI agents and UI share SQL state, actions, and context",
5
5
  "homepage": "https://github.com/BuilderIO/agent-native#readme",
6
6
  "bugs": {
@@ -246,14 +246,12 @@
246
246
  "diff-match-patch": "^1.0.5",
247
247
  "dotenv": "^17.2.1",
248
248
  "drizzle-orm": "^0.45.2",
249
- "fzstd": "^0.1.1",
250
249
  "h3": "^2.0.1-rc.20",
251
250
  "highlight.js": "^11.11.1",
252
251
  "i18next": "26.3.1",
253
252
  "isbot": "^5",
254
253
  "jiti": "^2.6.1",
255
254
  "jose": "^6.2.2",
256
- "kiwi-schema": "^0.5.0",
257
255
  "linkedom": "0.18.12",
258
256
  "lowlight": "^3.3.0",
259
257
  "minimatch": "^10.0.0",
@@ -261,7 +259,6 @@
261
259
  "next-themes": "^0.4.6",
262
260
  "nitro": "3.0.260415-beta",
263
261
  "p-limit": "^7.3.0",
264
- "pako": "^2.1.0",
265
262
  "prettier": "^3.8.3",
266
263
  "react-i18next": "17.0.8",
267
264
  "react-markdown": "^10.1.0",
@@ -301,7 +298,6 @@
301
298
  "@types/diff-match-patch": "^1.0.36",
302
299
  "@types/express": "^5.0.6",
303
300
  "@types/node": "^24.2.1",
304
- "@types/pako": "^2.0.4",
305
301
  "@types/react": "^19.2.14",
306
302
  "@types/react-dom": "^19.2.3",
307
303
  "@types/turndown": "5.0.6",
@@ -317,7 +313,7 @@
317
313
  "express": "^5.2.1",
318
314
  "mermaid": "11.15.0",
319
315
  "node-pty": "^1.1.0",
320
- "playwright": "^1.60.0",
316
+ "playwright": "^1.61.1",
321
317
  "react": "^19.2.7",
322
318
  "react-dom": "^19.2.7",
323
319
  "react-router": "^8.0.1",
@@ -452,7 +448,7 @@
452
448
  },
453
449
  "optionalDependencies": {
454
450
  "@opentelemetry/api": "^1.9.1",
455
- "playwright": "^1.60.0"
451
+ "playwright": "^1.61.1"
456
452
  },
457
453
  "engines": {
458
454
  "node": ">=22.22.0"
@@ -378,6 +378,13 @@ interface DefineActionWithSchema<
378
378
  /** Optional native Agent-Native chat renderer for this action's structured
379
379
  * result. This is first-party React UI, not arbitrary HTML/JS. */
380
380
  chatUI?: ActionChatUIConfig;
381
+ /**
382
+ * Per-tool timeout override in milliseconds for agent-loop tool calls. Use
383
+ * sparingly for actions that legitimately wait on slow provider work.
384
+ */
385
+ timeoutMs?: number;
386
+ /** Per-tool result truncation override for agent-loop tool calls. */
387
+ maxResultChars?: number;
381
388
  /**
382
389
  * Opt-in human-in-the-loop approval gate. **Default off** — the framework
383
390
  * intentionally keeps HITL approvals rare; almost every action should run
@@ -468,6 +475,10 @@ interface DefineActionWithParams<
468
475
  mcpApp?: ActionMcpAppConfig;
469
476
  /** Optional native Agent-Native chat renderer. See schema overload above. */
470
477
  chatUI?: ActionChatUIConfig;
478
+ /** Per-tool timeout override in milliseconds. See schema overload above. */
479
+ timeoutMs?: number;
480
+ /** Per-tool result truncation override. See schema overload above. */
481
+ maxResultChars?: number;
471
482
  /** Opt-in human-in-the-loop approval gate (default off). See the schema
472
483
  * overload above for full semantics. */
473
484
  needsApproval?:
@@ -520,6 +531,10 @@ export interface ActionDefinition<TInput, TReturn> {
520
531
  readonly link?: ActionLinkBuilder;
521
532
  readonly mcpApp?: ActionMcpAppConfig;
522
533
  readonly chatUI?: ActionChatUIConfig;
534
+ /** Per-tool timeout override in milliseconds for agent-loop tool calls. */
535
+ readonly timeoutMs?: number;
536
+ /** Per-tool result truncation override for agent-loop tool calls. */
537
+ readonly maxResultChars?: number;
523
538
  /** Standard Schema the action's RETURN value is validated against after
524
539
  * `run()` resolves. Present only when the caller passed `outputSchema`. */
525
540
  readonly outputSchema?: StandardSchemaV1;
@@ -743,6 +758,12 @@ export function defineAction(options: any) {
743
758
  ...(link ? { link } : {}),
744
759
  ...(mcpApp ? { mcpApp } : {}),
745
760
  ...(chatUI ? { chatUI } : {}),
761
+ ...(typeof options.timeoutMs === "number"
762
+ ? { timeoutMs: options.timeoutMs }
763
+ : {}),
764
+ ...(typeof options.maxResultChars === "number"
765
+ ? { maxResultChars: options.maxResultChars }
766
+ : {}),
746
767
  ...(hasOutputSchema
747
768
  ? {
748
769
  outputSchema: options.outputSchema,
@@ -18,9 +18,11 @@
18
18
  * GUARDRAIL: when `isAgentChatDurableBackgroundEnabled()` returns false, the
19
19
  * agent-chat handler must behave byte-for-byte like the current synchronous
20
20
  * path. The gate is true only when ALL of these hold:
21
- * 1. `AGENT_CHAT_DURABLE_BACKGROUND` env is explicitly enabled. It is
22
- * DEFAULT-OFF (opt-in): unset/empty/unknown counts as disabled; set it to a
23
- * truthy value (`true`/`1`/`yes`/`on`) to opt a specific app in.
21
+ * 1. `AGENT_CHAT_DURABLE_BACKGROUND` env is explicitly enabled, or a
22
+ * workspace app's agent-chat plugin opts in with `durableBackgroundRuns`
23
+ * where the workspace deploy emits a per-app background function by
24
+ * default. Single-template Netlify deploys must set the env flag because
25
+ * that same flag controls whether `server-agent-background` is emitted.
24
26
  * 2. The runtime is hosted/serverless (local dev keeps the inline path so SSE
25
27
  * stays a single live stream and no second function is needed).
26
28
  * 3. `A2A_SECRET` is configured (the HMAC handoff is required to authenticate
@@ -259,17 +261,36 @@ function isFlagEnabled(): boolean {
259
261
  );
260
262
  }
261
263
 
264
+ function isFlagExplicitlyDisabled(): boolean {
265
+ const raw = process.env.AGENT_CHAT_DURABLE_BACKGROUND;
266
+ if (raw == null) return false;
267
+ const normalized = raw.trim().toLowerCase();
268
+ return (
269
+ normalized === "0" ||
270
+ normalized === "false" ||
271
+ normalized === "no" ||
272
+ normalized === "off"
273
+ );
274
+ }
275
+
262
276
  /**
263
- * The single gate. True when the flag is explicitly enabled (opt-in/default-off)
264
- * AND the runtime is hosted AND A2A_SECRET is configured. False otherwise and
265
- * false means the current synchronous behavior is used, unchanged. So a local /
266
- * non-hosted / unconfigured app stays synchronous, and an app that has not opted
267
- * in stays synchronous; durable only engages where it is explicitly enabled and
268
- * the runtime actually supports it.
277
+ * The single gate. True when the env flag is explicitly enabled, or a workspace
278
+ * app opted in and has a per-app background-function target, AND the runtime is
279
+ * hosted AND A2A_SECRET is configured. False otherwise and false means the
280
+ * current synchronous behavior is used unchanged. Single-template Netlify app
281
+ * opt-ins deliberately require the env flag too because that flag controls
282
+ * whether the `server-agent-background` function exists in the deploy output.
269
283
  */
270
- export function isAgentChatDurableBackgroundEnabled(): boolean {
284
+ export function isAgentChatDurableBackgroundEnabled(options?: {
285
+ appOptIn?: boolean;
286
+ }): boolean {
287
+ const envOptIn = isFlagEnabled();
288
+ const workspaceAppOptIn =
289
+ options?.appOptIn === true &&
290
+ !isFlagExplicitlyDisabled() &&
291
+ resolveWorkspaceBackgroundFunctionUrlPath() !== null;
271
292
  return (
272
- isFlagEnabled() &&
293
+ (envOptIn || workspaceAppOptIn) &&
273
294
  isHostedRuntimeForDurableBackground() &&
274
295
  hasConfiguredA2ASecret()
275
296
  );
@@ -891,6 +891,13 @@ export interface ProductionAgentOptions {
891
891
  * timeout. When reached, the client receives an internal auto-continuation
892
892
  * signal instead of a user-facing warning. */
893
893
  runSoftTimeoutMs?: number;
894
+ /**
895
+ * Opt this app into durable Netlify background-function agent-chat runs. This
896
+ * is a runtime opt-in layered on top of the hosted-runtime + A2A_SECRET gates;
897
+ * single-template Netlify deploys must also enable the deploy-time
898
+ * `AGENT_CHAT_DURABLE_BACKGROUND` flag so the background function is emitted.
899
+ */
900
+ durableBackgroundRuns?: boolean;
894
901
  /** Called when a run starts, with the send function for emitting events and the threadId */
895
902
  onRunStart?: (
896
903
  send: (event: AgentChatEvent) => void,
@@ -3994,7 +4001,10 @@ export function createProductionAgentHandler(
3994
4001
  // The foreground POST decides whether to dispatch into a background
3995
4002
  // function. The background worker itself never re-dispatches.
3996
4003
  const dispatchToBackground =
3997
- !isBackgroundWorker && isAgentChatDurableBackgroundEnabled();
4004
+ !isBackgroundWorker &&
4005
+ isAgentChatDurableBackgroundEnabled({
4006
+ appOptIn: options.durableBackgroundRuns === true,
4007
+ });
3998
4008
  const requestBrowserTabId = normalizeBrowserTabId(browserTabId);
3999
4009
  const requestChatScope = normalizeChatScope(scope);
4000
4010
  const requestRunCtx = ensureRequestRunContext();
@@ -29,6 +29,7 @@ import {
29
29
  continuationReasonForResumableError,
30
30
  } from "./production-agent.js";
31
31
  import { resolveRunSoftTimeoutMs } from "./run-manager.js";
32
+ import type { ResolveRunSoftTimeoutOptions } from "./run-manager.js";
32
33
  import { getCurrentTurnEventsForThread } from "./run-store.js";
33
34
  import {
34
35
  classifyToolCallJournal,
@@ -120,8 +121,9 @@ export const RUN_BUDGET_EXHAUSTED_MESSAGE =
120
121
  export async function runAgentLoopDirectWithSoftTimeout(
121
122
  opts: Parameters<typeof runAgentLoop>[0],
122
123
  softTimeoutMs?: number,
124
+ timeoutOptions?: ResolveRunSoftTimeoutOptions,
123
125
  ): Promise<Awaited<ReturnType<typeof runAgentLoop>>> {
124
- const timeoutMs = resolveRunSoftTimeoutMs(softTimeoutMs);
126
+ const timeoutMs = resolveRunSoftTimeoutMs(softTimeoutMs, timeoutOptions);
125
127
  if (timeoutMs <= 0) return runAgentLoop(opts);
126
128
 
127
129
  const upstreamSignal = opts.signal;