@agent-native/core 0.137.7 → 0.138.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/agent-native.eject.json +2 -0
  2. package/corpus/README.md +1 -1
  3. package/corpus/templates/analytics/.agents/skills/agent-native-docs/SKILL.md +23 -3
  4. package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  5. package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +15 -0
  6. package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +23 -2
  7. package/corpus/templates/analytics/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  8. package/corpus/templates/analytics/AGENTS.md +2 -2
  9. package/corpus/templates/analytics/actions/get-first-party-analytics-health.ts +65 -0
  10. package/corpus/templates/analytics/actions/provider-api-catalog.ts +3 -6
  11. package/corpus/templates/analytics/actions/provider-api-docs.ts +3 -6
  12. package/corpus/templates/analytics/actions/provider-api-request.ts +3 -6
  13. package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +3 -3
  14. package/corpus/templates/analytics/agent-native.json +12 -0
  15. package/corpus/templates/analytics/app/i18n-data.ts +162 -0
  16. package/corpus/templates/analytics/app/pages/DataSources.tsx +126 -1
  17. package/corpus/templates/analytics/changelog/2026-08-05-analytics-now-flags-neon-pressure-and-guides-high-volume-tra.md +6 -0
  18. package/corpus/templates/analytics/changelog/2026-08-05-first-party-analytics-uses-compact-rollups-for-faster-usage-.md +6 -0
  19. package/corpus/templates/analytics/server/db/schema.ts +52 -0
  20. package/corpus/templates/analytics/server/lib/credential-keys.ts +3 -0
  21. package/corpus/templates/analytics/server/lib/first-party-analytics-health.ts +397 -0
  22. package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +182 -0
  23. package/corpus/templates/analytics/server/lib/first-party-analytics.ts +86 -15
  24. package/corpus/templates/analytics/server/lib/provider-api.ts +20 -1
  25. package/corpus/templates/analytics/server/lib/replay-storage.ts +1 -1
  26. package/corpus/templates/analytics/server/plugins/agent-chat.ts +1 -0
  27. package/corpus/templates/analytics/server/plugins/db.ts +60 -0
  28. package/corpus/templates/assets/.agents/skills/agent-native-docs/SKILL.md +23 -3
  29. package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  30. package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +23 -2
  31. package/corpus/templates/assets/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  32. package/corpus/templates/assets/agent-native.json +12 -0
  33. package/corpus/templates/assets/server/lib/generation.ts +8 -8
  34. package/corpus/templates/assets/server/lib/storage.ts +1 -1
  35. package/corpus/templates/assets/server/plugins/onboarding.ts +1 -1
  36. package/corpus/templates/brain/.agents/skills/agent-native-docs/SKILL.md +23 -3
  37. package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  38. package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +23 -2
  39. package/corpus/templates/brain/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  40. package/corpus/templates/brain/agent-native.json +12 -0
  41. package/corpus/templates/calendar/.agents/skills/agent-native-docs/SKILL.md +23 -3
  42. package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  43. package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +23 -2
  44. package/corpus/templates/calendar/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  45. package/corpus/templates/calendar/agent-native.json +12 -0
  46. package/corpus/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
  47. package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  48. package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
  49. package/corpus/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  50. package/corpus/templates/chat/AGENTS.md +3 -0
  51. package/corpus/templates/chat/DESIGN.md +28 -0
  52. package/corpus/templates/chat/agent-native.json +12 -0
  53. package/corpus/templates/clips/.agents/skills/agent-native-docs/SKILL.md +23 -3
  54. package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  55. package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +23 -2
  56. package/corpus/templates/clips/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  57. package/corpus/templates/clips/actions/cleanup-transcript.ts +2 -2
  58. package/corpus/templates/clips/actions/delete-recording-permanent.ts +3 -0
  59. package/corpus/templates/clips/actions/get-playback-position.ts +68 -0
  60. package/corpus/templates/clips/actions/import-loom-recording.ts +2 -2
  61. package/corpus/templates/clips/actions/save-playback-position.ts +80 -0
  62. package/corpus/templates/clips/actions/set-thumbnail.ts +1 -1
  63. package/corpus/templates/clips/agent-native.json +12 -0
  64. package/corpus/templates/clips/app/components/player/video-player.tsx +54 -5
  65. package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +65 -18
  66. package/corpus/templates/clips/app/hooks/use-playback-position.ts +188 -0
  67. package/corpus/templates/clips/app/hooks/use-view-tracking.ts +6 -24
  68. package/corpus/templates/clips/app/i18n/en-US.ts +4 -0
  69. package/corpus/templates/clips/app/lib/playback-position.ts +99 -0
  70. package/corpus/templates/clips/app/lib/viewer-session.ts +29 -0
  71. package/corpus/templates/clips/changelog/2026-08-05-clip-buffering-now-uses-buffering-copy-after-playback.md +6 -0
  72. package/corpus/templates/clips/changelog/2026-08-05-clips-remembers-your-playback-position-when-you-reopen-a-cli.md +6 -0
  73. package/corpus/templates/clips/desktop/package.json +1 -0
  74. package/corpus/templates/clips/desktop/src/app.tsx +70 -6
  75. package/corpus/templates/clips/desktop/src/components/AlertDialog.tsx +131 -0
  76. package/corpus/templates/clips/desktop/src/styles.css +129 -0
  77. package/corpus/templates/clips/learnings.defaults.md +1 -1
  78. package/corpus/templates/clips/server/db/schema.ts +18 -0
  79. package/corpus/templates/clips/server/lib/public-agent-context.ts +1 -1
  80. package/corpus/templates/clips/server/lib/video-storage.ts +1 -1
  81. package/corpus/templates/clips/server/plugins/db.ts +15 -0
  82. package/corpus/templates/clips/server/routes/api/media/index.post.ts +1 -1
  83. package/corpus/templates/content/.agents/skills/agent-native-docs/SKILL.md +23 -3
  84. package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  85. package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +13 -0
  86. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +23 -2
  87. package/corpus/templates/content/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  88. package/corpus/templates/content/AGENTS.md +1 -0
  89. package/corpus/templates/content/actions/_content-database-mutation-lock.ts +41 -0
  90. package/corpus/templates/content/actions/_content-database-row-migration.ts +569 -0
  91. package/corpus/templates/content/actions/_database-source-utils.ts +82 -36
  92. package/corpus/templates/content/actions/_database-utils.ts +5 -0
  93. package/corpus/templates/content/actions/_delete-content-space.ts +25 -11
  94. package/corpus/templates/content/actions/add-database-item.ts +60 -42
  95. package/corpus/templates/content/actions/attach-content-database-source.ts +2 -0
  96. package/corpus/templates/content/actions/configure-document-property.ts +99 -104
  97. package/corpus/templates/content/actions/delete-content-database.ts +19 -7
  98. package/corpus/templates/content/actions/delete-document-property.ts +47 -58
  99. package/corpus/templates/content/actions/delete-document.ts +390 -167
  100. package/corpus/templates/content/actions/disconnect-content-database-source.ts +41 -24
  101. package/corpus/templates/content/actions/duplicate-database-item.ts +63 -31
  102. package/corpus/templates/content/actions/duplicate-database-items.ts +86 -43
  103. package/corpus/templates/content/actions/duplicate-document-property.ts +37 -14
  104. package/corpus/templates/content/actions/migrate-content-database-rows.ts +830 -0
  105. package/corpus/templates/content/actions/move-database-item.ts +14 -0
  106. package/corpus/templates/content/actions/permanently-delete-document.ts +27 -6
  107. package/corpus/templates/content/actions/remove-database-items.ts +13 -0
  108. package/corpus/templates/content/actions/reorder-document-property.ts +45 -46
  109. package/corpus/templates/content/actions/set-document-property.ts +68 -28
  110. package/corpus/templates/content/actions/submit-content-database-form.ts +49 -0
  111. package/corpus/templates/content/actions/transcribe-media.ts +1 -1
  112. package/corpus/templates/content/agent-native.json +12 -0
  113. package/corpus/templates/content/app/components/editor/image-upload.ts +2 -2
  114. package/corpus/templates/content/app/i18n-data.ts +1 -1
  115. package/corpus/templates/content/changelog/2026-08-01-content-can-reorganize-every-row-in-an-existing-database-as-.md +6 -0
  116. package/corpus/templates/content/parity/matrix.md +1 -1
  117. package/corpus/templates/content/parity/matrix.ts +4 -2
  118. package/corpus/templates/content/server/db/schema.ts +30 -0
  119. package/corpus/templates/content/server/plugins/db.ts +24 -0
  120. package/corpus/templates/content/server/plugins/onboarding.ts +2 -2
  121. package/corpus/templates/crm/.agents/skills/agent-native-docs/SKILL.md +23 -3
  122. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  123. package/corpus/templates/crm/agent-native.json +12 -0
  124. package/corpus/templates/design/.agents/skills/agent-native-docs/SKILL.md +23 -3
  125. package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  126. package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +2 -0
  127. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +23 -2
  128. package/corpus/templates/design/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  129. package/corpus/templates/design/CODE_NATIVE_DESIGN_STUDIO_IMPLEMENTATION_PLAN.md +2 -2
  130. package/corpus/templates/design/DESIGN-STUDIO-PLAN.md +2 -2
  131. package/corpus/templates/design/actions/apply-design-token-edit.ts +1 -1
  132. package/corpus/templates/design/actions/capture-design-state.ts +1 -1
  133. package/corpus/templates/design/actions/connect-builder-app.ts +2 -2
  134. package/corpus/templates/design/actions/create-design-branch.ts +1 -1
  135. package/corpus/templates/design/actions/create-fusion-app.ts +3 -3
  136. package/corpus/templates/design/actions/deploy-design-preview.ts +1 -1
  137. package/corpus/templates/design/actions/generate-design.ts +3 -2
  138. package/corpus/templates/design/actions/get-component-details.ts +1 -1
  139. package/corpus/templates/design/actions/get-design-branch-diff.ts +1 -1
  140. package/corpus/templates/design/actions/index-components.ts +3 -3
  141. package/corpus/templates/design/actions/index-design-system-with-builder.ts +1 -1
  142. package/corpus/templates/design/actions/migrate-inline-design-to-app.ts +3 -3
  143. package/corpus/templates/design/actions/open-component-source.ts +1 -1
  144. package/corpus/templates/design/actions/update-design.ts +96 -14
  145. package/corpus/templates/design/agent-native.json +12 -0
  146. package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +7 -2
  147. package/corpus/templates/design/app/components/design/FigmaHydrationDialog.tsx +11 -2
  148. package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +1 -1
  149. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +8 -1
  150. package/corpus/templates/design/app/i18n-data.ts +53 -22
  151. package/corpus/templates/design/app/lib/design-file-upload.ts +2 -3
  152. package/corpus/templates/design/app/lib/upload-limits.ts +4 -0
  153. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +1 -1
  154. package/corpus/templates/design/changelog/2026-08-05-chat-attachments-now-warn-before-upload-when-they-exceed-the.md +6 -0
  155. package/corpus/templates/design/changelog/2026-08-05-figma-fig-uploads-now-show-a-clear-4-mb-limit-up-front-inste.md +6 -0
  156. package/corpus/templates/design/scripts/qa-figma-stress-import.ts +1 -1
  157. package/corpus/templates/design/server/handlers/import-design-file.ts +9 -5
  158. package/corpus/templates/design/server/handlers/uploads.ts +13 -9
  159. package/corpus/templates/design/server/lib/fig-file-limits.ts +2 -1
  160. package/corpus/templates/design/server/lib/figma-image-hydration.ts +1 -1
  161. package/corpus/templates/design/server/lib/figma-node-import.ts +1 -1
  162. package/corpus/templates/design/server/lib/request-body-limits.ts +11 -0
  163. package/corpus/templates/design/shared/canvas-frames.ts +81 -0
  164. package/corpus/templates/design/shared/design-source-capabilities.ts +25 -9
  165. package/corpus/templates/dispatch/.agents/skills/agent-native-docs/SKILL.md +23 -3
  166. package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  167. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +23 -2
  168. package/corpus/templates/dispatch/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  169. package/corpus/templates/dispatch/agent-native.json +12 -0
  170. package/corpus/templates/factory/.agents/skills/agent-native-docs/SKILL.md +23 -3
  171. package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  172. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +23 -2
  173. package/corpus/templates/factory/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  174. package/corpus/templates/factory/agent-native.json +12 -0
  175. package/corpus/templates/forms/.agents/skills/agent-native-docs/SKILL.md +23 -3
  176. package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  177. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +23 -2
  178. package/corpus/templates/forms/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  179. package/corpus/templates/forms/actions/export-responses.ts +1 -1
  180. package/corpus/templates/forms/agent-native.json +12 -0
  181. package/corpus/templates/macros/.agents/skills/agent-native-docs/SKILL.md +23 -3
  182. package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  183. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +23 -2
  184. package/corpus/templates/macros/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  185. package/corpus/templates/macros/agent-native.json +12 -0
  186. package/corpus/templates/mail/.agents/skills/agent-native-docs/SKILL.md +23 -3
  187. package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  188. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +23 -2
  189. package/corpus/templates/mail/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  190. package/corpus/templates/mail/agent-native.json +12 -0
  191. package/corpus/templates/mail/app/i18n/en-US.ts +1 -1
  192. package/corpus/templates/mail/server/lib/media-upload.ts +1 -1
  193. package/corpus/templates/plan/.agents/skills/agent-native-docs/SKILL.md +23 -3
  194. package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  195. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +23 -2
  196. package/corpus/templates/plan/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  197. package/corpus/templates/plan/agent-native.json +12 -0
  198. package/corpus/templates/plan/server/lib/plan-assets.ts +1 -1
  199. package/corpus/templates/slides/.agents/skills/agent-native-docs/SKILL.md +23 -3
  200. package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  201. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +23 -2
  202. package/corpus/templates/slides/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  203. package/corpus/templates/slides/actions/generate-image-api.ts +1 -1
  204. package/corpus/templates/slides/actions/generate-slides-ai.ts +1 -1
  205. package/corpus/templates/slides/actions/import-file.ts +2 -2
  206. package/corpus/templates/slides/actions/index-design-system-with-builder.ts +1 -1
  207. package/corpus/templates/slides/agent-native.json +12 -0
  208. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +1 -1
  209. package/corpus/templates/slides/app/i18n/en-US.ts +2 -2
  210. package/corpus/templates/slides/app/lib/deck-sorting.ts +19 -0
  211. package/corpus/templates/slides/app/lib/image-drop-to-agent.ts +1 -1
  212. package/corpus/templates/slides/app/pages/Index.tsx +7 -2
  213. package/corpus/templates/slides/changelog/2026-08-05-decks-are-now-sorted-by-most-recently-updated.md +6 -0
  214. package/corpus/templates/slides/server/handlers/assets.ts +1 -1
  215. package/corpus/templates/slides/server/handlers/uploads.ts +1 -1
  216. package/corpus/templates/tasks/.agents/skills/agent-native-docs/SKILL.md +23 -3
  217. package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  218. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +23 -2
  219. package/corpus/templates/tasks/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  220. package/corpus/templates/tasks/agent-native.json +12 -0
  221. package/dist/action.d.ts +6 -0
  222. package/dist/agent/engine/builder-engine.js +2 -2
  223. package/dist/agent/engine/credential-errors.d.ts +1 -1
  224. package/dist/agent/engine/credential-errors.js +2 -2
  225. package/dist/agent/production-agent.js +3 -2
  226. package/dist/brand-kit/fig/index.js +1 -1
  227. package/dist/cli/agent.js +45 -3
  228. package/dist/cli/code-agent-executor.js +2 -1
  229. package/dist/cli/create.d.ts +9 -1
  230. package/dist/cli/create.js +94 -1
  231. package/dist/cli/doctor.d.ts +8 -11
  232. package/dist/cli/doctor.js +92 -24
  233. package/dist/cli/index.js +6 -5
  234. package/dist/client/AgentAskPopover.d.ts +3 -1
  235. package/dist/client/AgentAskPopover.js +2 -2
  236. package/dist/client/AgentPanel.js +9 -3
  237. package/dist/client/AssistantChat.js +54 -33
  238. package/dist/client/MultiTabAssistantChat.js +1 -1
  239. package/dist/client/RouteTransitionIndicator.d.ts +7 -0
  240. package/dist/client/RouteTransitionIndicator.js +31 -0
  241. package/dist/client/agent-engine-key.js +1 -1
  242. package/dist/client/app-providers.js +11 -2
  243. package/dist/client/chat/message-components.js +1 -1
  244. package/dist/client/chat/run-recovery.js +1 -1
  245. package/dist/client/chat/tool-call-display.d.ts +3 -1
  246. package/dist/client/chat/tool-call-display.js +4 -3
  247. package/dist/client/chat-model-groups.d.ts +6 -0
  248. package/dist/client/chat-model-groups.js +11 -0
  249. package/dist/client/error-format.js +1 -1
  250. package/dist/client/i18n.js +1 -1
  251. package/dist/client/onboarding/FirstRunOnboarding.d.ts +5 -1
  252. package/dist/client/onboarding/FirstRunOnboarding.js +29 -13
  253. package/dist/client/onboarding/first-run-enabled.d.ts +6 -1
  254. package/dist/client/onboarding/first-run-enabled.js +33 -3
  255. package/dist/client/onboarding/use-onboarding.js +16 -11
  256. package/dist/client/require-session.js +13 -4
  257. package/dist/client/resources/mcp-integration-catalog.js +26 -0
  258. package/dist/client/resources/mcp-integration-logos.js +4 -0
  259. package/dist/client/route-warmup.js +56 -10
  260. package/dist/client/settings/AccountSettingsCard.js +78 -3
  261. package/dist/client/settings/SettingsPanel.js +1 -1
  262. package/dist/client/settings/VoiceTranscriptionSection.js +2 -2
  263. package/dist/client/settings/useBuilderStatus.js +1 -1
  264. package/dist/client/setup-connections/useBuilderConnectCardController.js +1 -1
  265. package/dist/client/ui/index.d.ts +1 -0
  266. package/dist/client/ui/index.js +1 -0
  267. package/dist/client/uploads/upload-editor-image.js +1 -1
  268. package/dist/client/use-chat-threads.js +3 -0
  269. package/dist/client/use-session.d.ts +11 -0
  270. package/dist/client/use-session.js +34 -6
  271. package/dist/collab/routes.d.ts +2 -2
  272. package/dist/config.d.ts +48 -0
  273. package/dist/config.js +111 -0
  274. package/dist/db/migrations.js +5 -0
  275. package/dist/eject/provider-api-definitions.d.ts +1 -1
  276. package/dist/eject/provider-api-definitions.js +1 -0
  277. package/dist/eject/remote-mcp-presets.js +1 -0
  278. package/dist/extensions/web-search-tool.js +2 -2
  279. package/dist/file-upload/actions/upload-image.js +1 -1
  280. package/dist/file-upload/registry.js +1 -1
  281. package/dist/guards/index.d.ts +3 -0
  282. package/dist/guards/index.js +2 -0
  283. package/dist/guards/no-empty-migrations.d.ts +14 -0
  284. package/dist/guards/no-empty-migrations.js +126 -0
  285. package/dist/index.browser.d.ts +1 -0
  286. package/dist/index.browser.js +3 -0
  287. package/dist/index.d.ts +1 -0
  288. package/dist/index.js +1 -0
  289. package/dist/localization/default-messages.d.ts +24 -0
  290. package/dist/localization/default-messages.js +26 -2
  291. package/dist/notifications/routes.d.ts +6 -6
  292. package/dist/onboarding/app-profile.js +1 -1
  293. package/dist/onboarding/plugin.d.ts +2 -0
  294. package/dist/onboarding/plugin.js +29 -2
  295. package/dist/progress/routes.d.ts +1 -1
  296. package/dist/provider-api/actions/custom-provider-registration.d.ts +16 -16
  297. package/dist/provider-api/actions/provider-api.d.ts +13 -13
  298. package/dist/provider-api/index.d.ts +4 -4
  299. package/dist/provider-api/index.js +35 -0
  300. package/dist/resources/handlers.d.ts +1 -1
  301. package/dist/resources/handlers.js +1 -1
  302. package/dist/scripts/docs/framework-search.d.ts +9 -0
  303. package/dist/scripts/docs/framework-search.js +239 -0
  304. package/dist/scripts/docs/index.js +1 -0
  305. package/dist/scripts/docs/search.d.ts +10 -0
  306. package/dist/scripts/docs/search.js +1 -1
  307. package/dist/scripts/docs/source-search.d.ts +10 -2
  308. package/dist/scripts/docs/source-search.js +108 -41
  309. package/dist/search-utils/index.d.ts +11 -0
  310. package/dist/search-utils/index.js +72 -0
  311. package/dist/server/action-change.d.ts +6 -0
  312. package/dist/server/action-change.js +28 -14
  313. package/dist/server/action-discovery.js +9 -0
  314. package/dist/server/action-routes.js +1 -0
  315. package/dist/server/agent-chat/browser-team-tools.js +1 -1
  316. package/dist/server/agent-chat/script-entries.js +43 -2
  317. package/dist/server/auth-login-mode.d.ts +8 -0
  318. package/dist/server/auth-login-mode.js +17 -0
  319. package/dist/server/auth.js +100 -15
  320. package/dist/server/better-auth-instance.d.ts +36 -0
  321. package/dist/server/better-auth-instance.js +25 -3
  322. package/dist/server/builder-design-systems.js +1 -1
  323. package/dist/server/core-routes-plugin.js +17 -14
  324. package/dist/server/credential-provider.js +3 -3
  325. package/dist/server/email-templates.d.ts +7 -0
  326. package/dist/server/email-templates.js +24 -0
  327. package/dist/server/email.d.ts +17 -0
  328. package/dist/server/email.js +22 -1
  329. package/dist/server/framework-request-handler.js +6 -0
  330. package/dist/server/onboarding-html.d.ts +2 -0
  331. package/dist/server/onboarding-html.js +169 -8
  332. package/dist/server/realtime-token.d.ts +1 -1
  333. package/dist/server/realtime-voice.js +1 -1
  334. package/dist/server/sentry.d.ts +1 -1
  335. package/dist/server/transcribe-voice.js +3 -3
  336. package/dist/shared/first-run-onboarding.d.ts +1 -0
  337. package/dist/shared/first-run-onboarding.js +1 -0
  338. package/dist/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
  339. package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  340. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
  341. package/dist/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  342. package/dist/templates/chat/AGENTS.md +3 -0
  343. package/dist/templates/chat/DESIGN.md +28 -0
  344. package/dist/templates/chat/agent-native.json +12 -0
  345. package/dist/templates/default/.agents/skills/agent-native-docs/SKILL.md +23 -3
  346. package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  347. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +23 -2
  348. package/dist/templates/default/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  349. package/dist/templates/default/AGENTS.md +4 -0
  350. package/dist/templates/default/DESIGN.md +30 -0
  351. package/dist/templates/default/agent-native.json +9 -0
  352. package/dist/templates/default/app/i18n/ar-SA.ts +2 -2
  353. package/dist/templates/default/app/i18n/de-DE.ts +2 -2
  354. package/dist/templates/default/app/i18n/en-US.ts +2 -2
  355. package/dist/templates/default/app/i18n/es-ES.ts +2 -2
  356. package/dist/templates/default/app/i18n/fr-FR.ts +2 -2
  357. package/dist/templates/default/app/i18n/hi-IN.ts +2 -2
  358. package/dist/templates/default/app/i18n/ja-JP.ts +2 -2
  359. package/dist/templates/default/app/i18n/ko-KR.ts +2 -2
  360. package/dist/templates/default/app/i18n/pt-BR.ts +2 -2
  361. package/dist/templates/default/app/i18n/zh-CN.ts +2 -2
  362. package/dist/templates/default/app/i18n/zh-TW.ts +1 -1
  363. package/dist/templates/default/package.json +1 -0
  364. package/dist/templates/headless/.agents/skills/agent-native-docs/SKILL.md +23 -3
  365. package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  366. package/dist/templates/headless/agent-native.json +9 -0
  367. package/dist/templates/headless/package.json +2 -0
  368. package/dist/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +23 -3
  369. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  370. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +23 -2
  371. package/dist/templates/workspace-core/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  372. package/dist/templates/workspace-core/AGENTS.md +3 -0
  373. package/dist/templates/workspace-core/DESIGN.md +35 -0
  374. package/dist/templates/workspace-root/AGENTS.md +3 -0
  375. package/dist/templates/workspace-root/DESIGN.md +35 -0
  376. package/dist/templates/workspace-root/agent-native.json +9 -0
  377. package/dist/templates/workspace-root/package.json +3 -0
  378. package/dist/transcription/builder-transcription.js +1 -1
  379. package/dist/user-profile/actions/change-password.d.ts +8 -0
  380. package/dist/user-profile/actions/change-password.js +24 -0
  381. package/dist/user-profile/actions/get-auth-methods.d.ts +6 -0
  382. package/dist/user-profile/actions/get-auth-methods.js +23 -0
  383. package/dist/user-profile/actions/set-password.d.ts +7 -0
  384. package/dist/user-profile/actions/set-password.js +23 -0
  385. package/dist/vite/client.d.ts +8 -1
  386. package/dist/vite/client.js +63 -12
  387. package/dist/vite/index.d.ts +1 -0
  388. package/dist/vite/index.js +1 -0
  389. package/docs/AGENTS.md +7 -2
  390. package/docs/SKILL.md +7 -5
  391. package/docs/content/agent-native-config.mdx +165 -0
  392. package/docs/content/agent-native-toolkit.mdx +1 -1
  393. package/docs/content/deployment.mdx +7 -2
  394. package/docs/content/doctor.mdx +21 -13
  395. package/docs/content/environment-variables.mdx +158 -0
  396. package/docs/content/file-uploads.mdx +1 -1
  397. package/docs/content/getting-started.mdx +1 -1
  398. package/docs/content/key-concepts.mdx +1 -1
  399. package/docs/content/multi-app-workspace.mdx +1 -1
  400. package/docs/content/template-clips-ai-and-editing.mdx +6 -6
  401. package/docs/content/template-clips-developers.mdx +3 -3
  402. package/docs/content/toolkit-settings.mdx +1 -1
  403. package/docs/content/voice-input.mdx +4 -4
  404. package/package.json +6 -2
  405. package/src/eject/provider-api-definitions.ts +1 -0
  406. package/src/eject/remote-mcp-presets.ts +1 -0
  407. package/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
  408. package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  409. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
  410. package/src/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  411. package/src/templates/chat/AGENTS.md +3 -0
  412. package/src/templates/chat/DESIGN.md +28 -0
  413. package/src/templates/chat/agent-native.json +12 -0
  414. package/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +23 -3
  415. package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  416. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +23 -2
  417. package/src/templates/default/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  418. package/src/templates/default/AGENTS.md +4 -0
  419. package/src/templates/default/DESIGN.md +30 -0
  420. package/src/templates/default/agent-native.json +9 -0
  421. package/src/templates/default/app/i18n/ar-SA.ts +2 -2
  422. package/src/templates/default/app/i18n/de-DE.ts +2 -2
  423. package/src/templates/default/app/i18n/en-US.ts +2 -2
  424. package/src/templates/default/app/i18n/es-ES.ts +2 -2
  425. package/src/templates/default/app/i18n/fr-FR.ts +2 -2
  426. package/src/templates/default/app/i18n/hi-IN.ts +2 -2
  427. package/src/templates/default/app/i18n/ja-JP.ts +2 -2
  428. package/src/templates/default/app/i18n/ko-KR.ts +2 -2
  429. package/src/templates/default/app/i18n/pt-BR.ts +2 -2
  430. package/src/templates/default/app/i18n/zh-CN.ts +2 -2
  431. package/src/templates/default/app/i18n/zh-TW.ts +1 -1
  432. package/src/templates/default/package.json +1 -0
  433. package/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +23 -3
  434. package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  435. package/src/templates/headless/agent-native.json +9 -0
  436. package/src/templates/headless/package.json +2 -0
  437. package/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +23 -3
  438. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  439. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +23 -2
  440. package/src/templates/workspace-core/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  441. package/src/templates/workspace-core/AGENTS.md +3 -0
  442. package/src/templates/workspace-core/DESIGN.md +35 -0
  443. package/src/templates/workspace-root/AGENTS.md +3 -0
  444. package/src/templates/workspace-root/DESIGN.md +35 -0
  445. package/src/templates/workspace-root/agent-native.json +9 -0
  446. package/src/templates/workspace-root/package.json +3 -0
@@ -143,6 +143,9 @@ export function useChatThreads(apiUrl = agentNativePath("/_agent-native/agent-ch
143
143
  id = null;
144
144
  }
145
145
  }
146
+ // Route-owned create mode still needs a local target immediately. The
147
+ // URL owns which server thread is open, but an empty new chat is not a
148
+ // server row yet and must not wait for the thread-list request to paint.
146
149
  if (!id && autoCreate) {
147
150
  id = createLocalThreadId();
148
151
  isNew = true;
@@ -1,8 +1,19 @@
1
1
  import type { AuthSession } from "../server/auth.js";
2
2
  export type { AuthSession };
3
+ /**
4
+ * `"unavailable"` is the session endpoint being unreadable — a 5xx, a network
5
+ * failure, or a timeout. It is NOT the visitor being signed out, and a caller
6
+ * that collapses the two either strands the user on a spinner forever or
7
+ * bounces a signed-in user to the sign-in page over a transient blip.
8
+ */
9
+ export type SessionStatus = "loading" | "authenticated" | "unauthenticated" | "unavailable";
3
10
  interface UseSessionResult {
4
11
  session: AuthSession | null;
5
12
  isLoading: boolean;
13
+ status: SessionStatus;
14
+ error: Error | null;
15
+ /** Restart the resolve loop, e.g. from a "Try again" control. */
16
+ retry: () => void;
6
17
  }
7
18
  /**
8
19
  * Client-side hook to get the current auth session.
@@ -1,8 +1,9 @@
1
- import { useEffect, useState } from "react";
1
+ import { useCallback, useEffect, useState } from "react";
2
2
  import { setSentryUser, trackSessionStatus } from "./analytics.js";
3
3
  import { fetchAuthSessionStatus } from "./client-status-requests.js";
4
4
  const SESSION_CACHE_TTL_MS = 30_000;
5
5
  const SESSION_RETRY_DELAY_MS = 1_000;
6
+ const SESSION_MAX_ATTEMPTS = 4;
6
7
  let cachedSession;
7
8
  let cachedSessionAt = 0;
8
9
  let sessionRequest;
@@ -65,22 +66,41 @@ function fetchSharedSession() {
65
66
  export function useSession() {
66
67
  const cached = hasFreshSessionCache() ? (cachedSession ?? null) : null;
67
68
  const [session, setSession] = useState(cached);
68
- const [isLoading, setIsLoading] = useState(!hasFreshSessionCache());
69
+ const [status, setStatus] = useState(() => {
70
+ if (!hasFreshSessionCache())
71
+ return "loading";
72
+ return cached ? "authenticated" : "unauthenticated";
73
+ });
74
+ const [error, setError] = useState(null);
75
+ const [retryToken, setRetryToken] = useState(0);
76
+ const retry = useCallback(() => {
77
+ setError(null);
78
+ setStatus("loading");
79
+ setRetryToken((token) => token + 1);
80
+ }, []);
69
81
  useEffect(() => {
70
82
  let cancelled = false;
71
83
  let retryTimer;
84
+ let attempts = 0;
72
85
  const resolveSession = async () => {
73
86
  const resolved = await fetchSharedSession();
74
87
  if (cancelled)
75
88
  return;
76
89
  if (resolved === undefined) {
90
+ attempts += 1;
91
+ if (attempts >= SESSION_MAX_ATTEMPTS) {
92
+ setError(new Error(`Could not read the session after ${attempts} attempts.`));
93
+ setStatus("unavailable");
94
+ return;
95
+ }
77
96
  retryTimer = setTimeout(() => {
78
97
  void resolveSession();
79
- }, SESSION_RETRY_DELAY_MS);
98
+ }, SESSION_RETRY_DELAY_MS * attempts);
80
99
  return;
81
100
  }
82
101
  setSession(resolved);
83
- setIsLoading(false);
102
+ setError(null);
103
+ setStatus(resolved ? "authenticated" : "unauthenticated");
84
104
  };
85
105
  void resolveSession();
86
106
  return () => {
@@ -88,7 +108,15 @@ export function useSession() {
88
108
  if (retryTimer)
89
109
  clearTimeout(retryTimer);
90
110
  };
91
- }, []);
92
- return { session, isLoading };
111
+ }, [retryToken]);
112
+ // Callers that only read `isLoading`/`session` (most of the codebase, not
113
+ // yet migrated to `status`) must not see "unavailable" as "signed out" —
114
+ // that bounces an authenticated user through sign-in-only UI over a
115
+ // transient blip. Keeping `isLoading` true here reproduces this hook's
116
+ // pre-existing behavior for those callers (an indefinite "still resolving"
117
+ // instead of a wrong answer); only `status`-aware callers get the distinct
118
+ // "unavailable" treatment with a retry affordance.
119
+ const isLoading = status === "loading" || status === "unavailable";
120
+ return { session, isLoading, status, error, retry };
93
121
  }
94
122
  //# sourceMappingURL=use-session.js.map
@@ -26,8 +26,8 @@ export declare const getCollabState: import("h3").EventHandlerWithFetch<import("
26
26
  * Body: { update: string (base64), requestSource?: string }
27
27
  */
28
28
  export declare const postCollabUpdate: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
29
- ok?: undefined;
30
29
  error: string;
30
+ ok?: undefined;
31
31
  } | {
32
32
  error?: undefined;
33
33
  ok: boolean;
@@ -41,9 +41,9 @@ export declare const postCollabUpdate: import("h3").EventHandlerWithFetch<import
41
41
  * Body: { text: string, fieldName?: string, requestSource?: string }
42
42
  */
43
43
  export declare const postCollabText: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
44
+ text?: undefined;
44
45
  ok?: undefined;
45
46
  error: string;
46
- text?: undefined;
47
47
  } | {
48
48
  error?: undefined;
49
49
  ok: boolean;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Public, non-secret configuration for an Agent-Native app.
3
+ *
4
+ * This module is intentionally free of Node and framework imports so it can be
5
+ * used from a typed `agent-native.config.ts` file and from browser code after
6
+ * Vite serializes the resolved config into the client bundle.
7
+ */
8
+ export declare const AGENT_NATIVE_CONFIG_VERSION: 1;
9
+ export type AgentNativeFirstRunOnboardingMode = "off" | "connect" | "connect-and-integrations";
10
+ export type AgentNativeFirstRunOnboardingSetting = AgentNativeFirstRunOnboardingMode | (Partial<Record<string, AgentNativeFirstRunOnboardingMode>> & {
11
+ default?: AgentNativeFirstRunOnboardingMode;
12
+ });
13
+ export interface AgentNativeOnboardingConfig {
14
+ /**
15
+ * First-run setup shown by the shared Agent Sidebar.
16
+ *
17
+ * `connect` shows Builder/BYOK setup and skips the generic integrations
18
+ * catalog. `connect-and-integrations` includes that catalog. A per-Vite-mode
19
+ * object is useful when local development and hosted builds need different
20
+ * defaults.
21
+ */
22
+ firstRun?: AgentNativeFirstRunOnboardingSetting;
23
+ }
24
+ export interface AgentNativeConfig {
25
+ version?: typeof AGENT_NATIVE_CONFIG_VERSION;
26
+ onboarding?: AgentNativeOnboardingConfig;
27
+ }
28
+ export interface AgentNativeConfigContext {
29
+ command: "serve" | "build";
30
+ mode: string;
31
+ isDev: boolean;
32
+ isBuild: boolean;
33
+ }
34
+ export type AgentNativeConfigFactory = (context: AgentNativeConfigContext) => AgentNativeConfig;
35
+ export type AgentNativeConfigInput = AgentNativeConfig | AgentNativeConfigFactory;
36
+ /**
37
+ * Type-safe authoring helper for `agent-native.config.ts`.
38
+ *
39
+ * Like Next's typed config file, this is deliberately identity-like: the
40
+ * framework evaluates the exported object or factory in the Vite config
41
+ * phase, while the browser only receives the resolved serializable result.
42
+ */
43
+ export declare function defineAgentNativeConfig(config: AgentNativeConfigInput): AgentNativeConfigInput;
44
+ export declare function normalizeAgentNativeConfig(input: unknown, source?: string): AgentNativeConfig;
45
+ export declare function mergeAgentNativeConfigs(base: AgentNativeConfig, override: AgentNativeConfig): AgentNativeConfig;
46
+ export declare function resolveAgentNativeConfig(input: AgentNativeConfigInput | undefined, context: AgentNativeConfigContext): AgentNativeConfig;
47
+ export declare function resolveFirstRunOnboardingMode(setting: AgentNativeFirstRunOnboardingSetting, context: AgentNativeConfigContext): AgentNativeFirstRunOnboardingMode;
48
+ //# sourceMappingURL=config.d.ts.map
package/dist/config.js ADDED
@@ -0,0 +1,111 @@
1
+ /**
2
+ * Public, non-secret configuration for an Agent-Native app.
3
+ *
4
+ * This module is intentionally free of Node and framework imports so it can be
5
+ * used from a typed `agent-native.config.ts` file and from browser code after
6
+ * Vite serializes the resolved config into the client bundle.
7
+ */
8
+ export const AGENT_NATIVE_CONFIG_VERSION = 1;
9
+ /**
10
+ * Type-safe authoring helper for `agent-native.config.ts`.
11
+ *
12
+ * Like Next's typed config file, this is deliberately identity-like: the
13
+ * framework evaluates the exported object or factory in the Vite config
14
+ * phase, while the browser only receives the resolved serializable result.
15
+ */
16
+ export function defineAgentNativeConfig(config) {
17
+ return config;
18
+ }
19
+ export function normalizeAgentNativeConfig(input, source = "agent-native config") {
20
+ if (!isRecord(input)) {
21
+ throw new Error(`${source} must export an object`);
22
+ }
23
+ if (input.version !== undefined &&
24
+ input.version !== AGENT_NATIVE_CONFIG_VERSION) {
25
+ throw new Error(`${source}.version must be ${AGENT_NATIVE_CONFIG_VERSION} when provided`);
26
+ }
27
+ const onboardingValue = input.onboarding;
28
+ if (onboardingValue === undefined) {
29
+ return input.version === undefined
30
+ ? {}
31
+ : { version: AGENT_NATIVE_CONFIG_VERSION };
32
+ }
33
+ if (!isRecord(onboardingValue)) {
34
+ throw new Error(`${source}.onboarding must be an object`);
35
+ }
36
+ const firstRun = normalizeFirstRunSetting(onboardingValue.firstRun, `${source}.onboarding.firstRun`);
37
+ return {
38
+ ...(input.version === undefined
39
+ ? {}
40
+ : { version: AGENT_NATIVE_CONFIG_VERSION }),
41
+ onboarding: firstRun === undefined ? {} : { firstRun },
42
+ };
43
+ }
44
+ export function mergeAgentNativeConfigs(base, override) {
45
+ return {
46
+ ...(base.version === undefined && override.version === undefined
47
+ ? {}
48
+ : {
49
+ version: override.version ?? base.version ?? AGENT_NATIVE_CONFIG_VERSION,
50
+ }),
51
+ onboarding: base.onboarding || override.onboarding
52
+ ? {
53
+ ...base.onboarding,
54
+ ...override.onboarding,
55
+ }
56
+ : undefined,
57
+ };
58
+ }
59
+ export function resolveAgentNativeConfig(input, context) {
60
+ const value = typeof input === "function" ? input(context) : (input ?? {});
61
+ const normalized = normalizeAgentNativeConfig(value);
62
+ const firstRun = normalized.onboarding?.firstRun;
63
+ if (firstRun === undefined)
64
+ return normalized;
65
+ return {
66
+ ...normalized,
67
+ onboarding: {
68
+ ...normalized.onboarding,
69
+ firstRun: resolveFirstRunOnboardingMode(firstRun, context),
70
+ },
71
+ };
72
+ }
73
+ export function resolveFirstRunOnboardingMode(setting, context) {
74
+ if (typeof setting === "string")
75
+ return setting;
76
+ const modeValue = setting[context.mode];
77
+ if (modeValue !== undefined)
78
+ return modeValue;
79
+ const environmentValue = setting[context.command === "serve" ? "development" : "production"];
80
+ return environmentValue ?? setting.default ?? "off";
81
+ }
82
+ function normalizeFirstRunSetting(value, source) {
83
+ if (value === undefined)
84
+ return undefined;
85
+ if (typeof value === "string") {
86
+ if (!isFirstRunMode(value)) {
87
+ throw new Error(`${source} must be "off", "connect", or "connect-and-integrations"`);
88
+ }
89
+ return value;
90
+ }
91
+ if (!isRecord(value)) {
92
+ throw new Error(`${source} must be a mode string or a mode map`);
93
+ }
94
+ const result = {};
95
+ for (const [key, mode] of Object.entries(value)) {
96
+ if (!isFirstRunMode(mode)) {
97
+ throw new Error(`${source}.${key} must be "off", "connect", or "connect-and-integrations"`);
98
+ }
99
+ result[key] = mode;
100
+ }
101
+ return result;
102
+ }
103
+ function isFirstRunMode(value) {
104
+ return (value === "off" ||
105
+ value === "connect" ||
106
+ value === "connect-and-integrations");
107
+ }
108
+ function isRecord(value) {
109
+ return !!value && typeof value === "object" && !Array.isArray(value);
110
+ }
111
+ //# sourceMappingURL=config.js.map
@@ -240,6 +240,11 @@ export function runMigrations(migrations, options) {
240
240
  seenNames.add(m.name);
241
241
  }
242
242
  }
243
+ // A plugin with no migrations is intentionally a no-op. Creating or reading
244
+ // a bookkeeping table here turns an empty app plugin into a database cold
245
+ // start on every serverless boot.
246
+ if (migrations.length === 0)
247
+ return async () => { };
243
248
  const namedTable = `${table}_named`;
244
249
  return async () => {
245
250
  try {
@@ -6,7 +6,7 @@ export declare function mergeProviderApiConfigs(overrides?: readonly ProviderApi
6
6
  export declare function getProviderApiConfig(providerId: ProviderApiId | string, overrides?: readonly ProviderApiConfig[]): ProviderApiConfig;
7
7
  export declare function listProviderApiIdsForTemplateUse(templateUse: WorkspaceConnectionTemplateUse, overrides?: readonly ProviderApiConfig[]): ProviderApiId[];
8
8
  export declare function listProviderApiCatalog(providerId?: ProviderApiId | string, options?: Parameters<typeof listRuntimeProviderApiCatalog>[1]): {
9
- id: "amplitude" | "apollo" | "bigquery" | "clay" | "commonroom" | "dataforseo" | "figma" | "ga4" | "gcloud" | "github" | "gmail" | "gong" | "google_calendar" | "google_drive" | "google_slides" | "grafana" | "granola" | "hubspot" | "jira" | "mixpanel" | "notion" | "posthog" | "prometheus" | "pylon" | "salesforce" | "sentry" | "slack" | "stripe" | "twitter";
9
+ id: "amplitude" | "apollo" | "bigquery" | "clay" | "commonroom" | "dataforseo" | "figma" | "fullstory" | "ga4" | "gcloud" | "github" | "gmail" | "gong" | "google_calendar" | "google_drive" | "google_slides" | "grafana" | "granola" | "hubspot" | "jira" | "mixpanel" | "notion" | "posthog" | "prometheus" | "pylon" | "salesforce" | "sentry" | "slack" | "stripe" | "twitter";
10
10
  label: string;
11
11
  defaultBaseUrl: string;
12
12
  requiresConnectionId: boolean;
@@ -14,6 +14,7 @@ export const providerApiOverrides = [
14
14
  provider("gcloud"),
15
15
  provider("github"),
16
16
  provider("figma"),
17
+ provider("fullstory"),
17
18
  provider("gmail"),
18
19
  provider("gong"),
19
20
  provider("google_calendar"),
@@ -38,6 +38,7 @@ function preset(id) {
38
38
  export const DEFAULT_MCP_INTEGRATIONS = [
39
39
  preset("context7"),
40
40
  preset("sentry"),
41
+ preset("fullstory"),
41
42
  preset("notion"),
42
43
  preset("granola"),
43
44
  preset("semgrep"),
@@ -209,7 +209,7 @@ export function createWebSearchToolEntry(opts = {}) {
209
209
  return {
210
210
  "web-search": {
211
211
  tool: {
212
- description: "Search the public web. Use to find API documentation, endpoints, current information, or any topic. Returns ranked results from BYOK providers or a grounded Builder-managed summary. Follow up with web-request or provider-api-docs using responseMode:'markdown' or responseMode:'matches' to fetch clean text, links, or compact snippets from promising URLs. Requires either Connect Builder.io or one of: BRAVE_SEARCH_API_KEY, TAVILY_API_KEY, EXA_API_KEY, or FIRECRAWL_API_KEY.",
212
+ description: "Search the public web. Use to find API documentation, endpoints, current information, or any topic. Returns ranked results from BYOK providers or a grounded Builder-managed summary. Follow up with web-request or provider-api-docs using responseMode:'markdown' or responseMode:'matches' to fetch clean text, links, or compact snippets from promising URLs. Requires either Connect Builder.io (free tier available) or one of: BRAVE_SEARCH_API_KEY, TAVILY_API_KEY, EXA_API_KEY, or FIRECRAWL_API_KEY.",
213
213
  parameters: {
214
214
  type: "object",
215
215
  properties: {
@@ -267,7 +267,7 @@ export function createWebSearchToolEntry(opts = {}) {
267
267
  else {
268
268
  return [
269
269
  "No web-search backend configured.",
270
- "Connect Builder.io in Settings, or add one of the following keys via app settings or environment variables:",
270
+ "Connect Builder.io (free tier available) in Settings, or add one of the following keys via app settings or environment variables:",
271
271
  " • BRAVE_SEARCH_API_KEY — https://brave.com/search/api/",
272
272
  " • TAVILY_API_KEY — https://tavily.com/",
273
273
  " • EXA_API_KEY — https://exa.ai/",
@@ -117,7 +117,7 @@ async function fetchRemote(url) {
117
117
  function uploadNotConfiguredError() {
118
118
  return [
119
119
  "Image uploads are not configured for this app.",
120
- "Connect or reconnect Builder.io in Settings → File uploads, or register a custom provider (S3, R2, GCS, etc.) via registerFileUploadProvider().",
120
+ "Connect or reconnect Builder.io (free tier available) in Settings → File uploads, or register a custom provider (S3, R2, GCS, etc.) via registerFileUploadProvider().",
121
121
  ].join(" ");
122
122
  }
123
123
  export default defineAction({
@@ -96,7 +96,7 @@ export async function uploadFile(input) {
96
96
  if (!warnedFallbackRef.value) {
97
97
  warnedFallbackRef.value = true;
98
98
  console.warn("[agent-native] No file upload provider configured. " +
99
- "Connect or reconnect Builder.io in Settings → File uploads, " +
99
+ "Connect or reconnect Builder.io (free tier available) in Settings → File uploads, " +
100
100
  "or register a custom provider (S3, R2, GCS, …) via registerFileUploadProvider().");
101
101
  }
102
102
  return null;
@@ -13,6 +13,9 @@ export { scanDbToolScoping } from "./db-tool-scoping.js";
13
13
  export type { DbToolScopingOptions } from "./db-tool-scoping.js";
14
14
  export { scanExplicitCollabAccess } from "./explicit-collab-access.js";
15
15
  export { scanDrizzlePush } from "./no-drizzle-push.js";
16
+ export { scanEmptyMigrations } from "./no-empty-migrations.js";
17
+ export type { EmptyMigrationsSourceOptions } from "./no-empty-migrations.js";
18
+ export { analyzeEmptyMigrationsSource, shouldScanEmptyMigrationsFile, } from "./no-empty-migrations.js";
16
19
  export { scanEnvCredentials } from "./no-env-credentials.js";
17
20
  export { scanEnvMutation } from "./no-env-mutation.js";
18
21
  export { scanLocalhostFallback } from "./no-localhost-fallback.js";
@@ -12,6 +12,8 @@
12
12
  export { scanDbToolScoping } from "./db-tool-scoping.js";
13
13
  export { scanExplicitCollabAccess } from "./explicit-collab-access.js";
14
14
  export { scanDrizzlePush } from "./no-drizzle-push.js";
15
+ export { scanEmptyMigrations } from "./no-empty-migrations.js";
16
+ export { analyzeEmptyMigrationsSource, shouldScanEmptyMigrationsFile, } from "./no-empty-migrations.js";
15
17
  export { scanEnvCredentials } from "./no-env-credentials.js";
16
18
  export { scanEnvMutation } from "./no-env-mutation.js";
17
19
  export { scanLocalhostFallback } from "./no-localhost-fallback.js";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Refuse empty `runMigrations([])` plugins. The migration runner itself is
3
+ * safe for an empty list, but an empty plugin usually means a serverless boot
4
+ * is still paying for a database migration check that has no work to do.
5
+ */
6
+ import type { GuardFinding, GuardResult, GuardScanOptions } from "./types.js";
7
+ export interface EmptyMigrationsSourceOptions {
8
+ file: string;
9
+ source: string;
10
+ }
11
+ export declare function analyzeEmptyMigrationsSource({ file, source, }: EmptyMigrationsSourceOptions): GuardFinding[];
12
+ export declare function shouldScanEmptyMigrationsFile(relativeFile: string): boolean;
13
+ export declare function scanEmptyMigrations({ root }: GuardScanOptions): GuardResult;
14
+ //# sourceMappingURL=no-empty-migrations.d.ts.map
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Refuse empty `runMigrations([])` plugins. The migration runner itself is
3
+ * safe for an empty list, but an empty plugin usually means a serverless boot
4
+ * is still paying for a database migration check that has no work to do.
5
+ */
6
+ import path from "node:path";
7
+ import { lineColForOffset, readFileSafe, relPosix, walk, } from "./scan-utils.js";
8
+ const EMPTY_MIGRATIONS_RE = /\brunMigrations\s*\(\s*\[\s*\]/g;
9
+ const ALLOW_MARKER_RE = /guard:allow-empty-migrations\s*[—-]\s*\S/;
10
+ const SOURCE_EXTENSIONS = /\.(?:ts|tsx|mts|cts|js|jsx|mjs|cjs)$/i;
11
+ const TEST_FILE = /\.(?:spec|test)\.(?:ts|tsx|mts|cts|js|jsx|mjs|cjs)$/i;
12
+ /** Mask comments and string literals while preserving offsets and newlines. */
13
+ function maskNonCode(source) {
14
+ const output = source.split("");
15
+ let state = "code";
16
+ let escaped = false;
17
+ for (let index = 0; index < source.length; index += 1) {
18
+ const char = source[index] ?? "";
19
+ const next = source[index + 1] ?? "";
20
+ if (state === "code") {
21
+ if (char === "/" && next === "/") {
22
+ output[index] = output[index + 1] = " ";
23
+ state = "line";
24
+ index += 1;
25
+ }
26
+ else if (char === "/" && next === "*") {
27
+ output[index] = output[index + 1] = " ";
28
+ state = "block";
29
+ index += 1;
30
+ }
31
+ else if (char === "'") {
32
+ output[index] = " ";
33
+ state = "single";
34
+ }
35
+ else if (char === '"') {
36
+ output[index] = " ";
37
+ state = "double";
38
+ }
39
+ else if (char === "`") {
40
+ output[index] = " ";
41
+ state = "template";
42
+ }
43
+ continue;
44
+ }
45
+ if (char !== "\n" && char !== "\r")
46
+ output[index] = " ";
47
+ if (state === "line") {
48
+ if (char === "\n")
49
+ state = "code";
50
+ continue;
51
+ }
52
+ if (state === "block") {
53
+ if (char === "*" && next === "/") {
54
+ output[index + 1] = " ";
55
+ state = "code";
56
+ index += 1;
57
+ }
58
+ continue;
59
+ }
60
+ if (escaped) {
61
+ escaped = false;
62
+ continue;
63
+ }
64
+ if (char === "\\") {
65
+ escaped = true;
66
+ continue;
67
+ }
68
+ if ((state === "single" && char === "'") ||
69
+ (state === "double" && char === '"') ||
70
+ (state === "template" && char === "`")) {
71
+ state = "code";
72
+ }
73
+ }
74
+ return output.join("");
75
+ }
76
+ function hasAdjacentAllow(source, line) {
77
+ const lines = source.split(/\r?\n/);
78
+ const current = line - 1;
79
+ for (let index = current; index >= Math.max(0, current - 2); index -= 1) {
80
+ const text = lines[index] ?? "";
81
+ if (ALLOW_MARKER_RE.test(text))
82
+ return true;
83
+ if (index < current && text.trim() && !/^\s*(?:\/\/|\/\*|\*)/.test(text)) {
84
+ break;
85
+ }
86
+ }
87
+ return false;
88
+ }
89
+ export function analyzeEmptyMigrationsSource({ file, source, }) {
90
+ const findings = [];
91
+ const code = maskNonCode(source);
92
+ for (const match of code.matchAll(EMPTY_MIGRATIONS_RE)) {
93
+ const line = lineColForOffset(source, match.index ?? 0).line;
94
+ if (hasAdjacentAllow(source, line))
95
+ continue;
96
+ findings.push({
97
+ file,
98
+ line,
99
+ message: "empty runMigrations list performs needless migration startup work; remove the call or provide real migrations",
100
+ });
101
+ }
102
+ return findings;
103
+ }
104
+ export function shouldScanEmptyMigrationsFile(relativeFile) {
105
+ const normalized = relativeFile.split(path.sep).join("/");
106
+ if (!SOURCE_EXTENSIONS.test(normalized) || TEST_FILE.test(normalized)) {
107
+ return false;
108
+ }
109
+ return !normalized
110
+ .split("/")
111
+ .some((segment) => segment === "node_modules" || segment === "vendor");
112
+ }
113
+ export function scanEmptyMigrations({ root }) {
114
+ const findings = [];
115
+ for (const file of walk(root)) {
116
+ const relativeFile = relPosix(root, file);
117
+ if (!shouldScanEmptyMigrationsFile(relativeFile))
118
+ continue;
119
+ const source = readFileSafe(file);
120
+ if (source === null)
121
+ continue;
122
+ findings.push(...analyzeEmptyMigrationsSource({ file: relativeFile, source }));
123
+ }
124
+ return { name: "no-empty-migrations", findings };
125
+ }
126
+ //# sourceMappingURL=no-empty-migrations.js.map
@@ -1,3 +1,4 @@
1
+ export * from "./config.js";
1
2
  export { addContextToAgentChat, appendAgentChatContextToMessage, clearAgentChatContext, formatAgentChatContextItemsForPrompt, listAgentChatContext, refreshAgentChatContext, removeAgentChatContextItem, sendToAgentChat, sendToAgentChatAndConfirm, setAgentChatContextItem, setContextToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatContext, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, sendMcpAppHostMessage, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, AgentNativeI18nProvider, LanguagePicker, getLocaleInitScript, localeDirection, normalizeLocaleCode, normalizeLocalePreference, normalizeLocalizationPreference, resolveLocaleFromCandidates, resolveLocaleFromPreference, useFormatters, useLocale, useT, DEFAULT_LOCALE, LOCALE_HYDRATION_GLOBAL, LOCALE_METADATA, LOCALE_STORAGE_KEY, SUPPORTED_LOCALES, useDbSync, useFileWatcher, useSession, cn, ApiKeySettings, type AgentChatContextItem, type AgentChatContextMessage, type AgentChatContextMutationOptions, type AgentChatContextRemoveOptions, type AgentChatContextSetOptions, type AgentChatContextState, type AgentChatMessage, type AgentNativeMcpAppHostMessageType, type McpAppDisplayMode, type McpAppHostChatMessage, type McpAppHostCapabilities, type McpAppHostContext, type McpAppHostContextSnapshot, type McpAppModelContextContentPart, type McpAppModelContextUpdate, type CodeRequiredDialogProps, type AuthSession, type UseAgentChatContextResult, type AgentNativeI18nCatalog, type AgentNativeI18nProviderProps, type LocaleCode, type LocaleHydrationPayload, type LocaleMessages, type LocaleMetadata, type LocalePreference, type LocalizationPreference, } from "./client/index.js";
2
3
  export { agentChat } from "./shared/index.js";
3
4
  export { parseArgs, camelCaseArgs } from "./scripts/parse-args.js";
@@ -1,4 +1,7 @@
1
1
  // Browser-safe entry — only client & shared exports (no Node/Express/chokidar).
2
+ // Public app configuration is serializable and safe to expose to browser
3
+ // consumers alongside the resolved config injected by the Vite preset.
4
+ export * from "./config.js";
2
5
  // Client
3
6
  export { addContextToAgentChat, appendAgentChatContextToMessage, clearAgentChatContext, formatAgentChatContextItemsForPrompt, listAgentChatContext, refreshAgentChatContext, removeAgentChatContextItem, sendToAgentChat, sendToAgentChatAndConfirm, setAgentChatContextItem, setContextToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatContext, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, sendMcpAppHostMessage, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, AgentNativeI18nProvider, LanguagePicker, getLocaleInitScript, localeDirection, normalizeLocaleCode, normalizeLocalePreference, normalizeLocalizationPreference, resolveLocaleFromCandidates, resolveLocaleFromPreference, useFormatters, useLocale, useT, DEFAULT_LOCALE, LOCALE_HYDRATION_GLOBAL, LOCALE_METADATA, LOCALE_STORAGE_KEY, SUPPORTED_LOCALES, useDbSync, useFileWatcher, useSession, cn, ApiKeySettings, } from "./client/index.js";
4
7
  // Shared (isomorphic)
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from "./config.js";
1
2
  export { createProductionAgentHandler, type ActionEntry, type ScriptEntry, type ProductionAgentOptions, type ActionTool, type ScriptTool, type AgentMessage, type AgentChatRequest, type AgentChatEvent, type AgentChatAttachment, DEFAULT_MODEL, TripWire, type Processor, type ProcessorState, type ProcessorAbort, } from "./agent/index.js";
2
3
  export { defineAction, AgentActionStopError, isAgentActionStopError, type ActionDefinition, type ActionHttpConfig, type AgentActionStopOptions, type PublicAgentActionConfig, type ActionDeepLink, type ActionLinkBuilder, MCP_APP_EXTENSION_ID, MCP_APP_MIME_TYPE, MCP_APP_RESOURCE_URI_META_KEY, type ActionMcpAppConfig, type ActionMcpAppCsp, type ActionMcpAppCspBuilder, type ActionMcpAppHtmlBuilder, type ActionMcpAppPermissions, type ActionMcpAppResourceConfig, type ActionMcpAppResourceMeta, } from "./action.js";
3
4
  export * from "./user-profile/index.js";
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  // Framework for agent-native apps.
2
2
  // Import everything from "@agent-native/core".
3
+ export * from "./config.js";
3
4
  // Agent (production mode)
4
5
  export { createProductionAgentHandler, DEFAULT_MODEL,
5
6
  // In-loop processors (observers/guardrails for runAgentLoop)
@@ -2,6 +2,10 @@ declare const messages: {
2
2
  workspaceFile: {
3
3
  download: string;
4
4
  };
5
+ composer: {
6
+ sendMessage: string;
7
+ queueMessage: string;
8
+ };
5
9
  home: {
6
10
  settingsTitle: string;
7
11
  settingsDescription: string;
@@ -47,6 +51,21 @@ declare const messages: {
47
51
  profileSaving: string;
48
52
  profileSaved: string;
49
53
  profileSaveError: string;
54
+ passwordTitle: string;
55
+ passwordDescription: string;
56
+ passwordStatusLoading: string;
57
+ passwordAdd: string;
58
+ passwordChange: string;
59
+ passwordCurrentLabel: string;
60
+ passwordNewLabel: string;
61
+ passwordConfirmLabel: string;
62
+ passwordPlaceholder: string;
63
+ passwordMinLength: string;
64
+ passwordMismatch: string;
65
+ passwordSave: string;
66
+ passwordSaving: string;
67
+ passwordSaved: string;
68
+ passwordSaveError: string;
50
69
  profileMenuItem: string;
51
70
  manageAgentMenuItem: string;
52
71
  timezoneLabel: string;
@@ -881,6 +900,11 @@ declare const messages: {
881
900
  description: string;
882
901
  useCase: string;
883
902
  };
903
+ fullstory: {
904
+ description: string;
905
+ useCase: string;
906
+ setupNote: string;
907
+ };
884
908
  notion: {
885
909
  description: string;
886
910
  useCase: string;