@agent-native/core 0.137.8 → 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 (422) 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/hooks/use-playback-position.ts +188 -0
  66. package/corpus/templates/clips/app/hooks/use-view-tracking.ts +6 -24
  67. package/corpus/templates/clips/app/lib/playback-position.ts +99 -0
  68. package/corpus/templates/clips/app/lib/viewer-session.ts +29 -0
  69. package/corpus/templates/clips/changelog/2026-08-05-clip-buffering-now-uses-buffering-copy-after-playback.md +6 -0
  70. package/corpus/templates/clips/changelog/2026-08-05-clips-remembers-your-playback-position-when-you-reopen-a-cli.md +6 -0
  71. package/corpus/templates/clips/learnings.defaults.md +1 -1
  72. package/corpus/templates/clips/server/db/schema.ts +18 -0
  73. package/corpus/templates/clips/server/lib/public-agent-context.ts +1 -1
  74. package/corpus/templates/clips/server/lib/video-storage.ts +1 -1
  75. package/corpus/templates/clips/server/plugins/db.ts +15 -0
  76. package/corpus/templates/clips/server/routes/api/media/index.post.ts +1 -1
  77. package/corpus/templates/content/.agents/skills/agent-native-docs/SKILL.md +23 -3
  78. package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  79. package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +13 -0
  80. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +23 -2
  81. package/corpus/templates/content/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  82. package/corpus/templates/content/AGENTS.md +1 -0
  83. package/corpus/templates/content/actions/_content-database-mutation-lock.ts +41 -0
  84. package/corpus/templates/content/actions/_content-database-row-migration.ts +569 -0
  85. package/corpus/templates/content/actions/_database-source-utils.ts +82 -36
  86. package/corpus/templates/content/actions/_database-utils.ts +5 -0
  87. package/corpus/templates/content/actions/_delete-content-space.ts +25 -11
  88. package/corpus/templates/content/actions/add-database-item.ts +60 -42
  89. package/corpus/templates/content/actions/attach-content-database-source.ts +2 -0
  90. package/corpus/templates/content/actions/configure-document-property.ts +99 -104
  91. package/corpus/templates/content/actions/delete-content-database.ts +19 -7
  92. package/corpus/templates/content/actions/delete-document-property.ts +47 -58
  93. package/corpus/templates/content/actions/delete-document.ts +390 -167
  94. package/corpus/templates/content/actions/disconnect-content-database-source.ts +41 -24
  95. package/corpus/templates/content/actions/duplicate-database-item.ts +63 -31
  96. package/corpus/templates/content/actions/duplicate-database-items.ts +86 -43
  97. package/corpus/templates/content/actions/duplicate-document-property.ts +37 -14
  98. package/corpus/templates/content/actions/migrate-content-database-rows.ts +830 -0
  99. package/corpus/templates/content/actions/move-database-item.ts +14 -0
  100. package/corpus/templates/content/actions/permanently-delete-document.ts +27 -6
  101. package/corpus/templates/content/actions/remove-database-items.ts +13 -0
  102. package/corpus/templates/content/actions/reorder-document-property.ts +45 -46
  103. package/corpus/templates/content/actions/set-document-property.ts +68 -28
  104. package/corpus/templates/content/actions/submit-content-database-form.ts +49 -0
  105. package/corpus/templates/content/actions/transcribe-media.ts +1 -1
  106. package/corpus/templates/content/agent-native.json +12 -0
  107. package/corpus/templates/content/app/components/editor/image-upload.ts +2 -2
  108. package/corpus/templates/content/app/i18n-data.ts +1 -1
  109. package/corpus/templates/content/changelog/2026-08-01-content-can-reorganize-every-row-in-an-existing-database-as-.md +6 -0
  110. package/corpus/templates/content/parity/matrix.md +1 -1
  111. package/corpus/templates/content/parity/matrix.ts +4 -2
  112. package/corpus/templates/content/server/db/schema.ts +30 -0
  113. package/corpus/templates/content/server/plugins/db.ts +24 -0
  114. package/corpus/templates/content/server/plugins/onboarding.ts +2 -2
  115. package/corpus/templates/crm/.agents/skills/agent-native-docs/SKILL.md +23 -3
  116. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  117. package/corpus/templates/crm/agent-native.json +12 -0
  118. package/corpus/templates/design/.agents/skills/agent-native-docs/SKILL.md +23 -3
  119. package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  120. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +23 -2
  121. package/corpus/templates/design/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  122. package/corpus/templates/design/CODE_NATIVE_DESIGN_STUDIO_IMPLEMENTATION_PLAN.md +2 -2
  123. package/corpus/templates/design/DESIGN-STUDIO-PLAN.md +2 -2
  124. package/corpus/templates/design/actions/apply-design-token-edit.ts +1 -1
  125. package/corpus/templates/design/actions/capture-design-state.ts +1 -1
  126. package/corpus/templates/design/actions/connect-builder-app.ts +2 -2
  127. package/corpus/templates/design/actions/create-design-branch.ts +1 -1
  128. package/corpus/templates/design/actions/create-fusion-app.ts +3 -3
  129. package/corpus/templates/design/actions/deploy-design-preview.ts +1 -1
  130. package/corpus/templates/design/actions/get-component-details.ts +1 -1
  131. package/corpus/templates/design/actions/get-design-branch-diff.ts +1 -1
  132. package/corpus/templates/design/actions/index-components.ts +3 -3
  133. package/corpus/templates/design/actions/index-design-system-with-builder.ts +1 -1
  134. package/corpus/templates/design/actions/migrate-inline-design-to-app.ts +3 -3
  135. package/corpus/templates/design/actions/open-component-source.ts +1 -1
  136. package/corpus/templates/design/actions/update-design.ts +61 -0
  137. package/corpus/templates/design/agent-native.json +12 -0
  138. package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +1 -1
  139. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +1 -1
  140. package/corpus/templates/design/scripts/qa-figma-stress-import.ts +1 -1
  141. package/corpus/templates/design/server/lib/figma-node-import.ts +1 -1
  142. package/corpus/templates/design/shared/design-source-capabilities.ts +25 -9
  143. package/corpus/templates/dispatch/.agents/skills/agent-native-docs/SKILL.md +23 -3
  144. package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  145. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +23 -2
  146. package/corpus/templates/dispatch/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  147. package/corpus/templates/dispatch/agent-native.json +12 -0
  148. package/corpus/templates/factory/.agents/skills/agent-native-docs/SKILL.md +23 -3
  149. package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  150. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +23 -2
  151. package/corpus/templates/factory/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  152. package/corpus/templates/factory/agent-native.json +12 -0
  153. package/corpus/templates/forms/.agents/skills/agent-native-docs/SKILL.md +23 -3
  154. package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  155. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +23 -2
  156. package/corpus/templates/forms/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  157. package/corpus/templates/forms/actions/export-responses.ts +1 -1
  158. package/corpus/templates/forms/agent-native.json +12 -0
  159. package/corpus/templates/macros/.agents/skills/agent-native-docs/SKILL.md +23 -3
  160. package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  161. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +23 -2
  162. package/corpus/templates/macros/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  163. package/corpus/templates/macros/agent-native.json +12 -0
  164. package/corpus/templates/mail/.agents/skills/agent-native-docs/SKILL.md +23 -3
  165. package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  166. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +23 -2
  167. package/corpus/templates/mail/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  168. package/corpus/templates/mail/agent-native.json +12 -0
  169. package/corpus/templates/mail/app/i18n/en-US.ts +1 -1
  170. package/corpus/templates/mail/server/lib/media-upload.ts +1 -1
  171. package/corpus/templates/plan/.agents/skills/agent-native-docs/SKILL.md +23 -3
  172. package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  173. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +23 -2
  174. package/corpus/templates/plan/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  175. package/corpus/templates/plan/agent-native.json +12 -0
  176. package/corpus/templates/plan/server/lib/plan-assets.ts +1 -1
  177. package/corpus/templates/slides/.agents/skills/agent-native-docs/SKILL.md +23 -3
  178. package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  179. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +23 -2
  180. package/corpus/templates/slides/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  181. package/corpus/templates/slides/actions/generate-image-api.ts +1 -1
  182. package/corpus/templates/slides/actions/generate-slides-ai.ts +1 -1
  183. package/corpus/templates/slides/actions/import-file.ts +2 -2
  184. package/corpus/templates/slides/actions/index-design-system-with-builder.ts +1 -1
  185. package/corpus/templates/slides/agent-native.json +12 -0
  186. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +1 -1
  187. package/corpus/templates/slides/app/i18n/en-US.ts +2 -2
  188. package/corpus/templates/slides/app/lib/deck-sorting.ts +19 -0
  189. package/corpus/templates/slides/app/lib/image-drop-to-agent.ts +1 -1
  190. package/corpus/templates/slides/app/pages/Index.tsx +7 -2
  191. package/corpus/templates/slides/changelog/2026-08-05-decks-are-now-sorted-by-most-recently-updated.md +6 -0
  192. package/corpus/templates/slides/server/handlers/assets.ts +1 -1
  193. package/corpus/templates/slides/server/handlers/uploads.ts +1 -1
  194. package/corpus/templates/tasks/.agents/skills/agent-native-docs/SKILL.md +23 -3
  195. package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  196. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +23 -2
  197. package/corpus/templates/tasks/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  198. package/corpus/templates/tasks/agent-native.json +12 -0
  199. package/dist/action.d.ts +6 -0
  200. package/dist/agent/engine/builder-engine.js +2 -2
  201. package/dist/agent/engine/credential-errors.d.ts +1 -1
  202. package/dist/agent/engine/credential-errors.js +2 -2
  203. package/dist/agent/production-agent.js +3 -2
  204. package/dist/brand-kit/fig/index.js +1 -1
  205. package/dist/cli/agent.js +45 -3
  206. package/dist/cli/code-agent-executor.js +2 -1
  207. package/dist/cli/create.d.ts +9 -1
  208. package/dist/cli/create.js +94 -1
  209. package/dist/cli/doctor.d.ts +8 -11
  210. package/dist/cli/doctor.js +92 -24
  211. package/dist/cli/index.js +6 -5
  212. package/dist/client/AgentAskPopover.d.ts +3 -1
  213. package/dist/client/AgentAskPopover.js +2 -2
  214. package/dist/client/AgentPanel.js +9 -3
  215. package/dist/client/AssistantChat.js +54 -33
  216. package/dist/client/MultiTabAssistantChat.js +1 -1
  217. package/dist/client/RouteTransitionIndicator.d.ts +7 -0
  218. package/dist/client/RouteTransitionIndicator.js +31 -0
  219. package/dist/client/agent-engine-key.js +1 -1
  220. package/dist/client/app-providers.js +11 -2
  221. package/dist/client/chat/message-components.js +1 -1
  222. package/dist/client/chat/run-recovery.js +1 -1
  223. package/dist/client/chat/tool-call-display.d.ts +3 -1
  224. package/dist/client/chat/tool-call-display.js +4 -3
  225. package/dist/client/chat-model-groups.d.ts +6 -0
  226. package/dist/client/chat-model-groups.js +11 -0
  227. package/dist/client/error-format.js +1 -1
  228. package/dist/client/i18n.js +1 -1
  229. package/dist/client/onboarding/FirstRunOnboarding.d.ts +5 -1
  230. package/dist/client/onboarding/FirstRunOnboarding.js +29 -13
  231. package/dist/client/onboarding/first-run-enabled.d.ts +6 -1
  232. package/dist/client/onboarding/first-run-enabled.js +33 -3
  233. package/dist/client/onboarding/use-onboarding.js +16 -11
  234. package/dist/client/resources/mcp-integration-catalog.js +26 -0
  235. package/dist/client/resources/mcp-integration-logos.js +4 -0
  236. package/dist/client/route-warmup.js +56 -10
  237. package/dist/client/settings/AccountSettingsCard.js +78 -3
  238. package/dist/client/settings/SettingsPanel.js +1 -1
  239. package/dist/client/settings/VoiceTranscriptionSection.js +2 -2
  240. package/dist/client/settings/useBuilderStatus.js +1 -1
  241. package/dist/client/setup-connections/useBuilderConnectCardController.js +1 -1
  242. package/dist/client/ui/index.d.ts +1 -0
  243. package/dist/client/ui/index.js +1 -0
  244. package/dist/client/uploads/upload-editor-image.js +1 -1
  245. package/dist/client/use-chat-threads.js +3 -0
  246. package/dist/collab/routes.d.ts +2 -2
  247. package/dist/collab/struct-routes.d.ts +1 -1
  248. package/dist/config.d.ts +48 -0
  249. package/dist/config.js +111 -0
  250. package/dist/db/migrations.js +5 -0
  251. package/dist/eject/provider-api-definitions.d.ts +1 -1
  252. package/dist/eject/provider-api-definitions.js +1 -0
  253. package/dist/eject/remote-mcp-presets.js +1 -0
  254. package/dist/extensions/web-search-tool.js +2 -2
  255. package/dist/file-upload/actions/upload-image.js +1 -1
  256. package/dist/file-upload/registry.js +1 -1
  257. package/dist/guards/index.d.ts +3 -0
  258. package/dist/guards/index.js +2 -0
  259. package/dist/guards/no-empty-migrations.d.ts +14 -0
  260. package/dist/guards/no-empty-migrations.js +126 -0
  261. package/dist/index.browser.d.ts +1 -0
  262. package/dist/index.browser.js +3 -0
  263. package/dist/index.d.ts +1 -0
  264. package/dist/index.js +1 -0
  265. package/dist/localization/default-messages.d.ts +24 -0
  266. package/dist/localization/default-messages.js +26 -2
  267. package/dist/notifications/routes.d.ts +3 -3
  268. package/dist/onboarding/app-profile.js +1 -1
  269. package/dist/onboarding/plugin.d.ts +2 -0
  270. package/dist/onboarding/plugin.js +29 -2
  271. package/dist/provider-api/actions/custom-provider-registration.d.ts +16 -16
  272. package/dist/provider-api/actions/provider-api.d.ts +13 -13
  273. package/dist/provider-api/index.d.ts +4 -4
  274. package/dist/provider-api/index.js +35 -0
  275. package/dist/resources/handlers.d.ts +1 -1
  276. package/dist/resources/handlers.js +1 -1
  277. package/dist/scripts/docs/framework-search.d.ts +9 -0
  278. package/dist/scripts/docs/framework-search.js +239 -0
  279. package/dist/scripts/docs/index.js +1 -0
  280. package/dist/scripts/docs/search.d.ts +10 -0
  281. package/dist/scripts/docs/search.js +1 -1
  282. package/dist/scripts/docs/source-search.d.ts +10 -2
  283. package/dist/scripts/docs/source-search.js +108 -41
  284. package/dist/search-utils/index.d.ts +11 -0
  285. package/dist/search-utils/index.js +72 -0
  286. package/dist/server/action-change.d.ts +6 -0
  287. package/dist/server/action-change.js +28 -14
  288. package/dist/server/action-discovery.js +9 -0
  289. package/dist/server/action-routes.js +1 -0
  290. package/dist/server/agent-chat/browser-team-tools.js +1 -1
  291. package/dist/server/agent-chat/script-entries.js +43 -2
  292. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  293. package/dist/server/auth-login-mode.d.ts +8 -0
  294. package/dist/server/auth-login-mode.js +17 -0
  295. package/dist/server/auth.js +100 -15
  296. package/dist/server/better-auth-instance.d.ts +36 -0
  297. package/dist/server/better-auth-instance.js +25 -3
  298. package/dist/server/builder-design-systems.js +1 -1
  299. package/dist/server/core-routes-plugin.js +17 -14
  300. package/dist/server/credential-provider.js +3 -3
  301. package/dist/server/email-templates.d.ts +7 -0
  302. package/dist/server/email-templates.js +24 -0
  303. package/dist/server/email.d.ts +17 -0
  304. package/dist/server/email.js +22 -1
  305. package/dist/server/framework-request-handler.js +6 -0
  306. package/dist/server/onboarding-html.d.ts +2 -0
  307. package/dist/server/onboarding-html.js +169 -8
  308. package/dist/server/realtime-token.d.ts +1 -1
  309. package/dist/server/realtime-voice.js +1 -1
  310. package/dist/server/sentry.d.ts +1 -1
  311. package/dist/server/transcribe-voice.js +3 -3
  312. package/dist/shared/first-run-onboarding.d.ts +1 -0
  313. package/dist/shared/first-run-onboarding.js +1 -0
  314. package/dist/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
  315. package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  316. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
  317. package/dist/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  318. package/dist/templates/chat/AGENTS.md +3 -0
  319. package/dist/templates/chat/DESIGN.md +28 -0
  320. package/dist/templates/chat/agent-native.json +12 -0
  321. package/dist/templates/default/.agents/skills/agent-native-docs/SKILL.md +23 -3
  322. package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  323. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +23 -2
  324. package/dist/templates/default/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  325. package/dist/templates/default/AGENTS.md +4 -0
  326. package/dist/templates/default/DESIGN.md +30 -0
  327. package/dist/templates/default/agent-native.json +9 -0
  328. package/dist/templates/default/app/i18n/ar-SA.ts +2 -2
  329. package/dist/templates/default/app/i18n/de-DE.ts +2 -2
  330. package/dist/templates/default/app/i18n/en-US.ts +2 -2
  331. package/dist/templates/default/app/i18n/es-ES.ts +2 -2
  332. package/dist/templates/default/app/i18n/fr-FR.ts +2 -2
  333. package/dist/templates/default/app/i18n/hi-IN.ts +2 -2
  334. package/dist/templates/default/app/i18n/ja-JP.ts +2 -2
  335. package/dist/templates/default/app/i18n/ko-KR.ts +2 -2
  336. package/dist/templates/default/app/i18n/pt-BR.ts +2 -2
  337. package/dist/templates/default/app/i18n/zh-CN.ts +2 -2
  338. package/dist/templates/default/app/i18n/zh-TW.ts +1 -1
  339. package/dist/templates/default/package.json +1 -0
  340. package/dist/templates/headless/.agents/skills/agent-native-docs/SKILL.md +23 -3
  341. package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  342. package/dist/templates/headless/agent-native.json +9 -0
  343. package/dist/templates/headless/package.json +2 -0
  344. package/dist/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +23 -3
  345. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  346. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +23 -2
  347. package/dist/templates/workspace-core/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  348. package/dist/templates/workspace-core/AGENTS.md +3 -0
  349. package/dist/templates/workspace-core/DESIGN.md +35 -0
  350. package/dist/templates/workspace-root/AGENTS.md +3 -0
  351. package/dist/templates/workspace-root/DESIGN.md +35 -0
  352. package/dist/templates/workspace-root/agent-native.json +9 -0
  353. package/dist/templates/workspace-root/package.json +3 -0
  354. package/dist/transcription/builder-transcription.js +1 -1
  355. package/dist/user-profile/actions/change-password.d.ts +8 -0
  356. package/dist/user-profile/actions/change-password.js +24 -0
  357. package/dist/user-profile/actions/get-auth-methods.d.ts +6 -0
  358. package/dist/user-profile/actions/get-auth-methods.js +23 -0
  359. package/dist/user-profile/actions/set-password.d.ts +7 -0
  360. package/dist/user-profile/actions/set-password.js +23 -0
  361. package/dist/vite/client.d.ts +8 -1
  362. package/dist/vite/client.js +63 -12
  363. package/dist/vite/index.d.ts +1 -0
  364. package/dist/vite/index.js +1 -0
  365. package/docs/AGENTS.md +7 -2
  366. package/docs/SKILL.md +7 -5
  367. package/docs/content/agent-native-config.mdx +165 -0
  368. package/docs/content/agent-native-toolkit.mdx +1 -1
  369. package/docs/content/deployment.mdx +7 -2
  370. package/docs/content/doctor.mdx +21 -13
  371. package/docs/content/environment-variables.mdx +158 -0
  372. package/docs/content/file-uploads.mdx +1 -1
  373. package/docs/content/getting-started.mdx +1 -1
  374. package/docs/content/key-concepts.mdx +1 -1
  375. package/docs/content/multi-app-workspace.mdx +1 -1
  376. package/docs/content/template-clips-ai-and-editing.mdx +6 -6
  377. package/docs/content/template-clips-developers.mdx +3 -3
  378. package/docs/content/toolkit-settings.mdx +1 -1
  379. package/docs/content/voice-input.mdx +4 -4
  380. package/package.json +6 -2
  381. package/src/eject/provider-api-definitions.ts +1 -0
  382. package/src/eject/remote-mcp-presets.ts +1 -0
  383. package/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
  384. package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  385. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
  386. package/src/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  387. package/src/templates/chat/AGENTS.md +3 -0
  388. package/src/templates/chat/DESIGN.md +28 -0
  389. package/src/templates/chat/agent-native.json +12 -0
  390. package/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +23 -3
  391. package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  392. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +23 -2
  393. package/src/templates/default/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  394. package/src/templates/default/AGENTS.md +4 -0
  395. package/src/templates/default/DESIGN.md +30 -0
  396. package/src/templates/default/agent-native.json +9 -0
  397. package/src/templates/default/app/i18n/ar-SA.ts +2 -2
  398. package/src/templates/default/app/i18n/de-DE.ts +2 -2
  399. package/src/templates/default/app/i18n/en-US.ts +2 -2
  400. package/src/templates/default/app/i18n/es-ES.ts +2 -2
  401. package/src/templates/default/app/i18n/fr-FR.ts +2 -2
  402. package/src/templates/default/app/i18n/hi-IN.ts +2 -2
  403. package/src/templates/default/app/i18n/ja-JP.ts +2 -2
  404. package/src/templates/default/app/i18n/ko-KR.ts +2 -2
  405. package/src/templates/default/app/i18n/pt-BR.ts +2 -2
  406. package/src/templates/default/app/i18n/zh-CN.ts +2 -2
  407. package/src/templates/default/app/i18n/zh-TW.ts +1 -1
  408. package/src/templates/default/package.json +1 -0
  409. package/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +23 -3
  410. package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  411. package/src/templates/headless/agent-native.json +9 -0
  412. package/src/templates/headless/package.json +2 -0
  413. package/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +23 -3
  414. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  415. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +23 -2
  416. package/src/templates/workspace-core/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  417. package/src/templates/workspace-core/AGENTS.md +3 -0
  418. package/src/templates/workspace-core/DESIGN.md +35 -0
  419. package/src/templates/workspace-root/AGENTS.md +3 -0
  420. package/src/templates/workspace-root/DESIGN.md +35 -0
  421. package/src/templates/workspace-root/agent-native.json +9 -0
  422. package/src/templates/workspace-root/package.json +3 -0
@@ -1,9 +1,39 @@
1
1
  const FIRST_RUN_ONBOARDING_ENV_KEY = "VITE_AGENT_NATIVE_FIRST_RUN_ONBOARDING";
2
- export function isFirstRunOnboardingEnabled(env = (import.meta.env ??
3
- {})) {
4
- const value = env[FIRST_RUN_ONBOARDING_ENV_KEY];
2
+ const FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS_ENV_KEY = "VITE_AGENT_NATIVE_FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS";
3
+ function isEnabled(value) {
5
4
  return (value === true ||
6
5
  (typeof value === "string" &&
7
6
  ["1", "true"].includes(value.trim().toLowerCase())));
8
7
  }
8
+ export function isFirstRunOnboardingEnabled(env = (import.meta.env ?? {}), config = injectedAgentNativeConfig()) {
9
+ return resolveFirstRunOnboardingMode(env, config) !== "off";
10
+ }
11
+ export function shouldSkipFirstRunIntegrations(env = (import.meta.env ?? {}), config = injectedAgentNativeConfig()) {
12
+ if (env[FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS_ENV_KEY] !== undefined) {
13
+ return isEnabled(env[FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS_ENV_KEY]);
14
+ }
15
+ return resolveFirstRunOnboardingMode(env, config) === "connect";
16
+ }
17
+ export function resolveFirstRunOnboardingMode(env = (import.meta.env ?? {}), config = injectedAgentNativeConfig()) {
18
+ const envOnboarding = env[FIRST_RUN_ONBOARDING_ENV_KEY];
19
+ if (envOnboarding !== undefined) {
20
+ if (!isEnabled(envOnboarding))
21
+ return "off";
22
+ return isEnabled(env[FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS_ENV_KEY])
23
+ ? "connect"
24
+ : "connect-and-integrations";
25
+ }
26
+ const configured = config.onboarding?.firstRun;
27
+ if (configured === "connect" || configured === "connect-and-integrations") {
28
+ return isEnabled(env[FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS_ENV_KEY])
29
+ ? "connect"
30
+ : configured;
31
+ }
32
+ return "off";
33
+ }
34
+ function injectedAgentNativeConfig() {
35
+ return typeof __AGENT_NATIVE_APP_CONFIG__ === "undefined"
36
+ ? {}
37
+ : __AGENT_NATIVE_APP_CONFIG__;
38
+ }
9
39
  //# sourceMappingURL=first-run-enabled.js.map
@@ -1,13 +1,5 @@
1
1
  import { useCallback, useEffect, useRef, useState } from "react";
2
- import { FIRST_RUN_ONBOARDING_COOKIE } from "../../shared/first-run-onboarding.js";
3
2
  import { agentNativePath } from "../api-path.js";
4
- function hasFirstRunCookie() {
5
- if (typeof document === "undefined")
6
- return false;
7
- return document.cookie
8
- .split(";")
9
- .some((part) => part.trim().startsWith(`${FIRST_RUN_ONBOARDING_COOKIE}=`));
10
- }
11
3
  export function useOnboarding(options = {}) {
12
4
  const preview = options.preview === true;
13
5
  const [steps, setSteps] = useState([]);
@@ -15,20 +7,23 @@ export function useOnboarding(options = {}) {
15
7
  const [loading, setLoading] = useState(true);
16
8
  const [error, setError] = useState(null);
17
9
  const [dismissed, setDismissed] = useState(false);
18
- const [firstRun, setFirstRun] = useState(() => preview || hasFirstRunCookie());
10
+ const [firstRun, setFirstRun] = useState(preview);
19
11
  const mountedRef = useRef(true);
20
12
  useEffect(() => {
21
- setFirstRun(preview || hasFirstRunCookie());
13
+ setFirstRun(preview);
22
14
  }, [preview]);
23
15
  const fetchAll = useCallback(async () => {
24
16
  try {
25
17
  const stepsUrl = agentNativePath(preview
26
18
  ? "/_agent-native/onboarding/steps?preview=1"
27
19
  : "/_agent-native/onboarding/steps");
28
- const [stepsRes, dismissRes, profileRes] = await Promise.all([
20
+ const [stepsRes, dismissRes, profileRes, firstRunRes] = await Promise.all([
29
21
  fetch(stepsUrl),
30
22
  fetch(agentNativePath("/_agent-native/onboarding/dismissed")),
31
23
  fetch(agentNativePath("/_agent-native/onboarding/profile")),
24
+ preview
25
+ ? Promise.resolve(null)
26
+ : fetch(agentNativePath("/_agent-native/onboarding/first-run/status")),
32
27
  ]);
33
28
  if (!mountedRef.current)
34
29
  return;
@@ -41,6 +36,16 @@ export function useOnboarding(options = {}) {
41
36
  throw new Error(`profile: ${profileRes.status}`);
42
37
  }
43
38
  setProfile((await profileRes.json()));
39
+ if (preview) {
40
+ setFirstRun(true);
41
+ }
42
+ else {
43
+ if (!firstRunRes || !firstRunRes.ok) {
44
+ throw new Error(`first-run status: ${firstRunRes?.status ?? 500}`);
45
+ }
46
+ const firstRunData = (await firstRunRes.json());
47
+ setFirstRun(firstRunData.firstRun === true);
48
+ }
44
49
  if (dismissRes.ok) {
45
50
  const d = (await dismissRes.json());
46
51
  setDismissed(!!d.dismissed);
@@ -37,6 +37,32 @@ export const DEFAULT_MCP_INTEGRATIONS = [
37
37
  headerPlaceholder: "Authorization: Bearer <sentry-token>",
38
38
  keywords: ["errors", "monitoring", "debugging", "issues"],
39
39
  },
40
+ {
41
+ id: "fullstory",
42
+ name: "FullStory",
43
+ provider: "fullstory",
44
+ description: "Read behavioral analytics and inspect session replays.",
45
+ descriptionKey: "mcpIntegrations.catalog.fullstory.description",
46
+ useCase: "product analytics, session replay, qualitative behavior, user research",
47
+ useCaseKey: "mcpIntegrations.catalog.fullstory.useCase",
48
+ url: "https://api.fullstory.com/mcp/fullstory",
49
+ authMode: "oauth",
50
+ connectionMode: "oauth",
51
+ availability: "ready",
52
+ verification: "preflight-only",
53
+ logoUrl: mcpIntegrationLogo("fullstory"),
54
+ docsUrl: "https://developer.fullstory.com/mcp/introduction/",
55
+ setupNoteKey: "mcpIntegrations.catalog.fullstory.setupNote",
56
+ keywords: [
57
+ "product analytics",
58
+ "session replay",
59
+ "behavior",
60
+ "user research",
61
+ "sessions",
62
+ "prompts",
63
+ "screenshots",
64
+ ],
65
+ },
40
66
  {
41
67
  id: "notion",
42
68
  name: "Notion",
@@ -19,6 +19,10 @@ const LOGOS = {
19
19
  mime: "image/svg+xml",
20
20
  data: "PHN2ZyBmaWxsPSIjMzYyRDU5IiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+U2VudHJ5PC90aXRsZT48cGF0aCBkPSJNMTMuOTEgMi41MDVjLS44NzMtMS40NDgtMi45NzItMS40NDgtMy44NDQgMEw2LjkwNCA3LjkyYTE1LjQ3OCAxNS40NzggMCAwIDEgOC41MyAxMi44MTFoLTIuMjIxQTEzLjMwMSAxMy4zMDEgMCAwIDAgNS43ODQgOS44MTRsLTIuOTI2IDUuMDZhNy42NSA3LjY1IDAgMCAxIDQuNDM1IDUuODQ4SDIuMTk0YS4zNjUuMzY1IDAgMCAxLS4yOTgtLjUzNGwxLjQxMy0yLjQwMmE1LjE2IDUuMTYgMCAwIDAtMS42MTQtLjkxM0wuMjk2IDE5LjI3NWEyLjE4MiAyLjE4MiAwIDAgMCAuODEyIDIuOTk5IDIuMjQgMi4yNCAwIDAgMCAxLjA4Ni4yODhoNi45ODNhOS4zMjIgOS4zMjIgMCAwIDAtMy44NDUtOC4zMThsMS4xMS0xLjkyMmExMS40NyAxMS40NyAwIDAgMSA0Ljk1IDEwLjI0aDUuOTE1YTE3LjI0MiAxNy4yNDIgMCAwIDAtNy44ODUtMTUuMjhsMi4yNDQtMy44NDVhLjM3LjM3IDAgMCAxIC41MDQtLjEzYy4yNTUuMTQgOS43NSAxNi43MDggOS45MjggMTYuOWEuMzY1LjM2NSAwIDAgMS0uMzI3LjU0M2gtMi4yODdjLjAyOS42MTIuMDI5IDEuMjIzIDAgMS44MzFoMi4yOTdhMi4yMDYgMi4yMDYgMCAwIDAgMS45MjItMy4zMXoiLz48L3N2Zz4=",
21
21
  },
22
+ fullstory: {
23
+ mime: "image/svg+xml",
24
+ data: "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTAiIGZpbGw9IiMyZjgwZWQiLz48cGF0aCBkPSJNNyAxMmMxLjgtMyA0LTQuNSA1LTQuNXMzLjIgMS41IDUgNC41Yy0xLjggMy00IDQuNS01IDQuNVM4LjggMTUgNyAxMloiIGZpbGw9IiNmZmYiLz48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIyIiBmaWxsPSIjMmY4MGVkIi8+PC9zdmc+",
25
+ },
22
26
  notion: {
23
27
  mime: "image/svg+xml",
24
28
  data: "PHN2ZyBmaWxsPSIjMDAwMDAwIiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+Tm90aW9uPC90aXRsZT48cGF0aCBkPSJNNC40NTkgNC4yMDhjLjc0Ni42MDYgMS4wMjYuNTYgMi40MjguNDY2bDEzLjIxNS0uNzkzYy4yOCAwIC4wNDctLjI4LS4wNDYtLjMyNkwxNy44NiAxLjk2OGMtLjQyLS4zMjYtLjk4MS0uNy0yLjA1NS0uNjA3TDMuMDEgMi4yOTVjLS40NjYuMDQ2LS41Ni4yOC0uMzc0LjQ2NnptLjc5MyAzLjA4djEzLjkwNGMwIC43NDcuMzczIDEuMDI3IDEuMjE0Ljk4bDE0LjUyMy0uODRjLjg0MS0uMDQ2LjkzNS0uNTYuOTM1LTEuMTY3VjYuMzU0YzAtLjYwNi0uMjMzLS45MzMtLjc0OC0uODg3bC0xNS4xNzcuODg3Yy0uNTYuMDQ3LS43NDcuMzI3LS43NDcuOTMzem0xNC4zMzcuNzQ1Yy4wOTMuNDIgMCAuODQtLjQyLjg4OGwtLjcuMTR2MTAuMjY0Yy0uNjA4LjMyNy0xLjE2OC41MTQtMS42MzUuNTE0LS43NDggMC0uOTM1LS4yMzQtMS40OTUtLjkzM2wtNC41NzctNy4xODZ2Ni45NTJMMTIuMjEgMTlzMCAuODQtMS4xNjguODRsLTMuMjIyLjE4NmMtLjA5My0uMTg2IDAtLjY1My4zMjctLjc0NmwuODQtLjIzM1Y5Ljg1NEw3LjgyMiA5Ljc2Yy0uMDk0LS40Mi4xNC0xLjAyNi43OTMtMS4wNzNsMy40NTYtLjIzMyA0Ljc2NCA3LjI3OXYtNi40NGwtMS4yMTUtLjEzOWMtLjA5My0uNTE0LjI4LS44ODcuNzQ3LS45MzN6TTEuOTM2IDEuMDM1bDEzLjMxLS45OGMxLjYzNC0uMTQgMi4wNTUtLjA0NyAzLjA4Mi43bDQuMjQ5IDIuOTg2Yy43LjUxMy45MzQuNjUzLjkzNCAxLjIxM3YxNi4zNzhjMCAxLjAyNi0uMzczIDEuNjM0LTEuNjggMS43MjZsLTE1LjQ1OC45MzRjLS45OC4wNDctMS40NDgtLjA5My0xLjk2Mi0uNzQ3bC0zLjEyOS00LjA2Yy0uNTYtLjc0Ny0uNzkzLTEuMzA2LS43OTMtMS45NlYyLjY2N2MwLS44MzkuMzc0LTEuNTQgMS40NDctMS42MzJ6Ii8+PC9zdmc+",
@@ -292,7 +292,7 @@ export function AgentNativeRouteWarmup({ config, }) {
292
292
  if (resolved.strategy === "off") {
293
293
  return;
294
294
  }
295
- // Legacy SPA builds still mount the AgentPanel but do not expose React
295
+ // Legacy SPA builds still mount AppProviders but do not expose React
296
296
  // Router framework `.data` endpoints or a route asset manifest. Only warm
297
297
  // route data/modules when that manifest is present; otherwise this would
298
298
  // generate noisy `/<path>.data` 404s for apps that cannot serve them.
@@ -314,28 +314,69 @@ export function AgentNativeRouteWarmup({ config, }) {
314
314
  seedExistingModulepreloads();
315
315
  const queue = [];
316
316
  const queuedDataRoutes = new Set();
317
+ const dataRetryAttempts = new Map();
318
+ const retryTimers = new Set();
317
319
  const observedLinks = new WeakSet();
318
320
  let active = 0;
319
321
  let stopped = false;
320
322
  let scheduleTimer;
323
+ const scheduleDataRetry = (dataUrl, href) => {
324
+ if (stopped)
325
+ return;
326
+ const attempt = (dataRetryAttempts.get(dataUrl) ?? 0) + 1;
327
+ if (attempt > 3) {
328
+ queuedDataRoutes.delete(dataUrl);
329
+ return;
330
+ }
331
+ dataRetryAttempts.set(dataUrl, attempt);
332
+ const timer = window.setTimeout(() => {
333
+ retryTimers.delete(timer);
334
+ if (stopped)
335
+ return;
336
+ queuedDataRoutes.delete(dataUrl);
337
+ warmedDataRoutes.delete(dataUrl);
338
+ warmHref(href);
339
+ }, 500 * 2 ** (attempt - 1));
340
+ retryTimers.add(timer);
341
+ };
321
342
  const pump = () => {
322
343
  if (stopped || !warmData)
323
344
  return;
324
345
  while (active < resolved.maxConcurrent && queue.length > 0) {
325
- const href = queue.shift();
326
- if (!href)
346
+ const item = queue.shift();
347
+ if (!item)
327
348
  continue;
328
349
  active += 1;
329
350
  window
330
- .fetch(href, { credentials: "same-origin", cache: "force-cache" })
331
- .catch(() => { })
351
+ .fetch(item.dataUrl, {
352
+ credentials: "same-origin",
353
+ cache: "force-cache",
354
+ })
355
+ .then((response) => {
356
+ if (response.ok) {
357
+ dataRetryAttempts.delete(item.dataUrl);
358
+ return;
359
+ }
360
+ warmedDataRoutes.delete(item.dataUrl);
361
+ if (response.status >= 500 || response.status === 429) {
362
+ scheduleDataRetry(item.dataUrl, item.href);
363
+ }
364
+ else {
365
+ queuedDataRoutes.delete(item.dataUrl);
366
+ dataRetryAttempts.delete(item.dataUrl);
367
+ }
368
+ })
369
+ .catch(() => {
370
+ warmedDataRoutes.delete(item.dataUrl);
371
+ scheduleDataRetry(item.dataUrl, item.href);
372
+ })
332
373
  .finally(() => {
333
374
  active -= 1;
334
375
  window.setTimeout(pump, 50);
335
376
  });
336
377
  }
337
378
  };
338
- const warmHref = (href) => {
379
+ function warmHref(href) {
339
380
  if (warmModules)
340
381
  warmRouteAssetsForHref(href);
341
382
  if (!warmData)
@@ -347,9 +388,9 @@ export function AgentNativeRouteWarmup({ config, }) {
347
388
  if (queuedDataRoutes.has(dataUrl))
348
389
  return;
349
390
  queuedDataRoutes.add(dataUrl);
350
- queue.push(dataUrl);
391
+ queue.push({ dataUrl, href });
351
392
  pump();
352
- };
393
+ }
353
394
  const viewportObserver = typeof IntersectionObserver === "undefined"
354
395
  ? null
355
396
  : new IntersectionObserver((entries) => {
@@ -415,12 +456,14 @@ export function AgentNativeRouteWarmup({ config, }) {
415
456
  };
416
457
  schedule();
417
458
  const observer = new MutationObserver(schedule);
418
- // The render-warmup selector is configurable, so it may depend on class or
419
- // custom data attributes. Watch all attribute changes and debounce rescans.
459
+ // Route links are added by hydration/navigation and can opt into a mode
460
+ // after render. Avoid watching every attribute: scroll-driven style/class
461
+ // changes otherwise rescan the entire document while a page is settling.
420
462
  observer.observe(document.documentElement, {
421
463
  subtree: true,
422
464
  childList: true,
423
465
  attributes: true,
466
+ attributeFilter: [PREFETCH_ATTR, "href"],
424
467
  });
425
468
  document.addEventListener("pointerover", warmFromIntent, {
426
469
  capture: true,
@@ -435,6 +478,9 @@ export function AgentNativeRouteWarmup({ config, }) {
435
478
  stopped = true;
436
479
  if (scheduleTimer !== undefined)
437
480
  window.clearTimeout(scheduleTimer);
481
+ for (const timer of retryTimers)
482
+ window.clearTimeout(timer);
483
+ retryTimers.clear();
438
484
  observer.disconnect();
439
485
  viewportObserver?.disconnect();
440
486
  document.removeEventListener("pointerover", warmFromIntent, true);
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ActionButton, Avatar, Surface, TextField, } from "@agent-native/toolkit/design-system";
3
- import { IconCamera, IconCheck } from "@tabler/icons-react";
3
+ import { IconCamera, IconCheck, IconLock } from "@tabler/icons-react";
4
4
  import { useEffect, useRef, useState } from "react";
5
5
  import { useT } from "../i18n.js";
6
6
  import { useActionMutation, useActionQuery } from "../use-action.js";
@@ -16,6 +16,81 @@ function profileInitials(name) {
16
16
  .map((part) => part[0]?.toUpperCase())
17
17
  .join("") || "?");
18
18
  }
19
+ function PasswordSettings() {
20
+ const t = useT();
21
+ const { session } = useSession();
22
+ const authMethods = useActionQuery("get-auth-methods", undefined, { enabled: !!session?.email });
23
+ const setPassword = useActionMutation("set-password");
24
+ const changePassword = useActionMutation("change-password");
25
+ const [currentPassword, setCurrentPassword] = useState("");
26
+ const [newPassword, setNewPassword] = useState("");
27
+ const [confirmPassword, setConfirmPassword] = useState("");
28
+ const [validationError, setValidationError] = useState(null);
29
+ const [saved, setSaved] = useState(false);
30
+ const mutation = authMethods.data?.hasPassword ? changePassword : setPassword;
31
+ const error = validationError
32
+ ? validationError === "length"
33
+ ? t("settings.passwordMinLength")
34
+ : t("settings.passwordMismatch")
35
+ : mutation.error
36
+ ? t("settings.passwordSaveError")
37
+ : undefined;
38
+ const clearStatus = () => {
39
+ setSaved(false);
40
+ setValidationError(null);
41
+ setPassword.reset();
42
+ changePassword.reset();
43
+ };
44
+ const submit = () => {
45
+ setSaved(false);
46
+ setValidationError(null);
47
+ if (newPassword.length < 8) {
48
+ setValidationError("length");
49
+ return;
50
+ }
51
+ if (newPassword !== confirmPassword) {
52
+ setValidationError("mismatch");
53
+ return;
54
+ }
55
+ const onSuccess = () => {
56
+ setCurrentPassword("");
57
+ setNewPassword("");
58
+ setConfirmPassword("");
59
+ setSaved(true);
60
+ void authMethods.refetch();
61
+ };
62
+ if (authMethods.data?.hasPassword) {
63
+ changePassword.mutate({ currentPassword, newPassword }, { onSuccess });
64
+ }
65
+ else {
66
+ setPassword.mutate({ newPassword }, { onSuccess });
67
+ }
68
+ };
69
+ const isPending = setPassword.isPending || changePassword.isPending;
70
+ const isLoading = authMethods.isLoading;
71
+ const hasPassword = authMethods.data?.hasPassword ?? false;
72
+ if (!session?.email)
73
+ return null;
74
+ return (_jsxs("div", { className: "space-y-3 border-t border-border/60 pt-3", children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsx(IconLock, { className: "mt-0.5 size-4 text-muted-foreground" }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm font-medium", children: hasPassword
75
+ ? t("settings.passwordChange")
76
+ : t("settings.passwordTitle") }), _jsx("p", { className: "text-xs leading-5 text-muted-foreground", children: t("settings.passwordDescription") })] })] }), isLoading ? (_jsx("p", { className: "text-xs text-muted-foreground", children: t("settings.passwordStatusLoading") })) : authMethods.error ? (_jsx("p", { className: "text-xs text-destructive", children: t("settings.passwordSaveError") })) : (_jsxs(_Fragment, { children: [hasPassword && (_jsx(TextField, { id: "agent-native-current-password", type: "password", label: t("settings.passwordCurrentLabel"), value: currentPassword, onChange: (value) => {
77
+ clearStatus();
78
+ setCurrentPassword(value);
79
+ }, placeholder: t("settings.passwordPlaceholder"), autoComplete: "current-password", disabled: isPending })), _jsx(TextField, { id: "agent-native-new-password", type: "password", label: t("settings.passwordNewLabel"), value: newPassword, onChange: (value) => {
80
+ clearStatus();
81
+ setNewPassword(value);
82
+ }, placeholder: t("settings.passwordPlaceholder"), autoComplete: hasPassword ? "new-password" : "new-password", disabled: isPending, invalid: !!error }), _jsx(TextField, { id: "agent-native-confirm-password", type: "password", label: t("settings.passwordConfirmLabel"), value: confirmPassword, onChange: (value) => {
83
+ clearStatus();
84
+ setConfirmPassword(value);
85
+ }, placeholder: t("settings.passwordPlaceholder"), autoComplete: "new-password", disabled: isPending, invalid: !!error, errorMessage: error }), _jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("div", { className: "min-h-4 text-xs", children: saved && (_jsxs("p", { className: "flex items-center gap-1 text-primary", children: [_jsx(IconCheck, { className: "size-3" }), t("settings.passwordSaved")] })) }), _jsx(ActionButton, { type: "button", intent: "primary", emphasis: "solid", size: "compact", pending: isPending, disabled: isPending ||
86
+ !newPassword ||
87
+ !confirmPassword ||
88
+ (hasPassword && !currentPassword), onPress: submit, children: isPending
89
+ ? t("settings.passwordSaving")
90
+ : hasPassword
91
+ ? t("settings.passwordChange")
92
+ : t("settings.passwordAdd") })] })] }))] }));
93
+ }
19
94
  export function AccountSettingsForm({ compact = false, }) {
20
95
  const t = useT();
21
96
  const { session, isLoading } = useSession();
@@ -74,6 +149,6 @@ export function AccountSettingsForm({ compact = false, }) {
74
149
  }
75
150
  export function AccountSettingsCard({ className }) {
76
151
  const t = useT();
77
- return (_jsxs(Surface, { as: "section", id: "account", elevation: "low", padding: "none", className: cn("mx-auto w-full max-w-2xl scroll-mt-4 rounded-lg border border-border bg-card p-5 text-card-foreground shadow-sm", className), children: [_jsxs("div", { className: "space-y-1", children: [_jsx("h2", { className: "text-base font-semibold", children: t("settings.profileTitle") }), _jsx("p", { className: "text-sm leading-6 text-muted-foreground", children: t("settings.profileDescription") })] }), _jsx("div", { className: "mt-5", children: _jsx(AccountSettingsForm, {}) })] }));
152
+ return (_jsxs(Surface, { as: "section", id: "account", elevation: "low", padding: "none", className: cn("mx-auto w-full max-w-2xl scroll-mt-4 rounded-lg border border-border bg-card p-5 text-card-foreground shadow-sm", className), children: [_jsxs("div", { className: "space-y-1", children: [_jsx("h2", { className: "text-base font-semibold", children: t("settings.profileTitle") }), _jsx("p", { className: "text-sm leading-6 text-muted-foreground", children: t("settings.profileDescription") })] }), _jsxs("div", { className: "mt-5", children: [_jsx(AccountSettingsForm, {}), _jsx(PasswordSettings, {})] })] }));
78
153
  }
79
154
  //# sourceMappingURL=AccountSettingsCard.js.map
@@ -31,7 +31,7 @@ import { settingsSectionDomId, useSettingsPanelController, } from "./useSettings
31
31
  import { VoiceTranscriptionSection } from "./VoiceTranscriptionSection.js";
32
32
  const Button = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToolkitButton, { ref: ref, variant: "ghost", className: cn("h-auto p-0 hover:bg-transparent hover:text-inherit active:scale-100 [&_svg]:!size-auto", className), ...props })));
33
33
  Button.displayName = "SettingsPrimitiveButton";
34
- const ManageButton = React.forwardRef(({ children = "Manage", className, ...props }, ref) => (_jsxs(Button, { ref: ref, type: "button", intent: "neutral", emphasis: "outline", className: cn("inline-flex items-center gap-1 rounded-md border border-border px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent/40", className), ...props, children: [children, _jsx(IconChevronDown, { size: 14 })] })));
34
+ const ManageButton = React.forwardRef(({ children = "Manage", className, ...props }, ref) => (_jsx(Button, { ref: ref, type: "button", intent: "neutral", emphasis: "outline", className: cn("inline-flex items-center gap-1 rounded-md border border-border px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent/40", className), ...props, children: children })));
35
35
  ManageButton.displayName = "SettingsManageButton";
36
36
  const IntegrationsPanel = lazy(() => import("../integrations/IntegrationsPanel.js").then((m) => ({
37
37
  default: m.IntegrationsPanel,
@@ -282,7 +282,7 @@ export function VoiceTranscriptionSection({ compact = false, } = {}) {
282
282
  return (_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "rounded-md border border-border bg-background p-2", children: [_jsx("div", { className: "mb-2 flex items-start justify-between gap-3 px-0.5", children: _jsxs("div", { children: [_jsx("div", { className: "text-[11px] font-medium text-foreground", children: "Live transcription" }), _jsx("p", { className: "mt-0.5 text-[10px] text-muted-foreground", children: "Choose where real-time words come from. Batch still runs after recording stops." })] }) }), _jsxs("div", { className: "space-y-2", children: [_jsx(ProviderOption, { id: "mac-native", selected: transcriptionMode === "mac-native", onSelect: () => chooseSource("mac-native"), title: "Mac Native", subtitle: "Free and fast in the macOS Tauri app. Web clients use the existing browser-native path when available.", rightSlot: _jsx("span", { className: "text-[10px] text-muted-foreground", children: "Tauri default" }) }), _jsx(ProviderOption, { id: "google-realtime", selected: transcriptionMode === "google-realtime", onSelect: () => chooseSource("google-realtime"), disabled: !googleRealtimeReady, title: "Google Realtime", subtitle: googleRealtimeReady
283
283
  ? "BYOK only for v1. Streams live partials and finals through Google Speech-to-Text."
284
284
  : googleRealtimeConfigured
285
- ? "Google credentials are set. Connect Builder completely to mint the managed realtime session."
285
+ ? "Google credentials are set. Connect Builder completely (free tier available) to mint the managed realtime session."
286
286
  : "BYOK only for v1. Configure Google service account before selecting this source.", rightSlot: googleRealtimeReady ? (_jsxs("span", { className: "flex items-center gap-1 text-[10px] text-green-500", children: [_jsx(IconCheck, { size: 10 }), "Ready"] })) : googleRealtimeConfigured ? (_jsx("button", { type: "button", onClick: (e) => {
287
287
  e.stopPropagation();
288
288
  openBuilderConnect();
@@ -295,7 +295,7 @@ export function VoiceTranscriptionSection({ compact = false, } = {}) {
295
295
  : geminiConfigured
296
296
  ? "Gemini key set"
297
297
  : "Needs key" }))] })] }), _jsxs("div", { className: "rounded-md border border-border bg-background", children: [_jsxs("button", { type: "button", onClick: () => setShowAdvanced((v) => !v), className: "w-full flex items-center justify-between gap-2 px-2.5 py-2 cursor-pointer", children: [_jsxs("span", { className: "text-[11px] font-medium text-foreground inline-flex items-center gap-1", children: [showAdvanced ? (_jsx(IconChevronDown, { size: 12 })) : (_jsx(IconChevronRight, { size: 12, className: "rtl:-scale-x-100" })), "Add API keys"] }), _jsx("span", { className: "text-[10px] text-muted-foreground", children: "Google STT \u00B7 Gemini \u00B7 Groq \u00B7 OpenAI" })] }), showAdvanced && (_jsxs("div", { className: "px-2 pb-2 space-y-2", children: [_jsx(ProviderOption, { id: "google-service-account", selected: transcriptionMode === "google-realtime", onSelect: () => chooseSource("google-realtime"), disabled: !googleRealtimeReady, title: "Google Speech-to-Text service account", subtitle: googleRealtimeConfigured
298
- ? "Service-account JSON is set. Connect Builder to mint the managed realtime WebSocket session."
298
+ ? "Service-account JSON is set. Connect Builder (free tier available) to mint the managed realtime WebSocket session."
299
299
  : "Service-account JSON for the dedicated realtime WebSocket to Google StreamingRecognize.", rightSlot: googleRealtimeConfigured ===
300
300
  null ? null : googleRealtimeReady ? (_jsxs("span", { className: "flex items-center gap-1 text-[10px] text-green-500", children: [_jsx(IconCheck, { size: 10 }), "Ready"] })) : googleRealtimeConfigured ? (_jsx("button", { type: "button", onClick: (e) => {
301
301
  e.stopPropagation();
@@ -583,7 +583,7 @@ export function useBuilderConnectFlow(opts = {}) {
583
583
  stopPoll();
584
584
  connectStartedAtRef.current = null;
585
585
  setConnecting(false);
586
- setError("Couldn't open Builder from this chat host. Open this app in a browser tab and try Connect Builder again.");
586
+ setError("Couldn't open Builder from this chat host. Open this app in a browser tab and try Connect Builder (free tier available) again.");
587
587
  })();
588
588
  }
589
589
  else {
@@ -1,7 +1,7 @@
1
1
  import { useCallback } from "react";
2
2
  import { useBuilderConnectFlow } from "../settings/useBuilderStatus.js";
3
3
  const DEFAULT_TITLE = "Builder connect";
4
- const DEFAULT_DESCRIPTION = "Connect Builder for managed model access, browser automation, and workspace identity.";
4
+ const DEFAULT_DESCRIPTION = "Connect Builder for managed model access, browser automation, and workspace identity. Free tier available.";
5
5
  const DEFAULT_TRACKING_SOURCE = "setup_connections_page";
6
6
  export function useBuilderConnectCardController({ title = DEFAULT_TITLE, description = DEFAULT_DESCRIPTION, trackingSource = DEFAULT_TRACKING_SOURCE, onConnected, } = {}) {
7
7
  const handleConnected = useCallback(({ orgName }) => onConnected?.(orgName), [onConnected]);
@@ -11,6 +11,7 @@ export { getClientSurface, type ClientSurface } from "../client-surface.js";
11
11
  export { ErrorBoundary } from "../ErrorBoundary.js";
12
12
  export { ClientOnly } from "../ClientOnly.js";
13
13
  export { DefaultSpinner } from "../DefaultSpinner.js";
14
+ export { RouteTransitionIndicator, ROUTE_TRANSITION_INDICATOR_DELAY_MS, } from "../RouteTransitionIndicator.js";
14
15
  export { getThemeInitScript, themeInitScript, type ThemePreference, } from "../theme.js";
15
16
  export { APPEARANCE_PRESETS, applyAppearance, getStoredAppearance, useAppearance, useAppearanceSync, type AppearancePresetId, } from "../appearance.js";
16
17
  export { AppearancePicker, type AppearancePickerProps, } from "../AppearancePicker.js";
@@ -11,6 +11,7 @@ export { getClientSurface } from "../client-surface.js";
11
11
  export { ErrorBoundary } from "../ErrorBoundary.js";
12
12
  export { ClientOnly } from "../ClientOnly.js";
13
13
  export { DefaultSpinner } from "../DefaultSpinner.js";
14
+ export { RouteTransitionIndicator, ROUTE_TRANSITION_INDICATOR_DELAY_MS, } from "../RouteTransitionIndicator.js";
14
15
  export { getThemeInitScript, themeInitScript, } from "../theme.js";
15
16
  export { APPEARANCE_PRESETS, applyAppearance, getStoredAppearance, useAppearance, useAppearanceSync, } from "../appearance.js";
16
17
  export { AppearancePicker, } from "../AppearancePicker.js";
@@ -48,7 +48,7 @@ export const uploadEditorImage = async (file) => {
48
48
  });
49
49
  if (!result || typeof result.url !== "string" || !result.url) {
50
50
  throw new Error(result?.error ||
51
- "Image upload failed. Connect Builder.io in Settings → File uploads, then try again.");
51
+ "Image upload failed. Connect Builder.io (free tier available) in Settings → File uploads, then try again.");
52
52
  }
53
53
  // Use the filename (sans extension) as a reasonable default alt text.
54
54
  const alt = file.name ? file.name.replace(/\.[^./\\]+$/, "") : "";
@@ -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;
@@ -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;
@@ -13,8 +13,8 @@
13
13
  * Body: { json: any, fieldName?: string, type?: "map"|"array", requestSource?: string }
14
14
  */
15
15
  export declare const postCollabJson: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
16
- error: string;
17
16
  ok?: undefined;
17
+ error: string;
18
18
  } | {
19
19
  error?: undefined;
20
20
  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