@agent-native/core 0.137.8 → 0.139.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 (472) 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/dashboard-report.ts +2 -0
  22. package/corpus/templates/analytics/server/lib/emails.ts +51 -0
  23. package/corpus/templates/analytics/server/lib/first-party-analytics-health.ts +397 -0
  24. package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +182 -0
  25. package/corpus/templates/analytics/server/lib/first-party-analytics.ts +86 -15
  26. package/corpus/templates/analytics/server/lib/provider-api.ts +20 -1
  27. package/corpus/templates/analytics/server/lib/replay-storage.ts +1 -1
  28. package/corpus/templates/analytics/server/plugins/agent-chat.ts +1 -0
  29. package/corpus/templates/analytics/server/plugins/db.ts +60 -0
  30. package/corpus/templates/analytics/server/plugins/transactional-emails.ts +5 -0
  31. package/corpus/templates/assets/.agents/skills/agent-native-docs/SKILL.md +23 -3
  32. package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  33. package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +23 -2
  34. package/corpus/templates/assets/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  35. package/corpus/templates/assets/agent-native.json +12 -0
  36. package/corpus/templates/assets/server/lib/generation.ts +8 -8
  37. package/corpus/templates/assets/server/lib/storage.ts +1 -1
  38. package/corpus/templates/assets/server/plugins/onboarding.ts +1 -1
  39. package/corpus/templates/brain/.agents/skills/agent-native-docs/SKILL.md +23 -3
  40. package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  41. package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +23 -2
  42. package/corpus/templates/brain/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  43. package/corpus/templates/brain/agent-native.json +12 -0
  44. package/corpus/templates/calendar/.agents/skills/agent-native-docs/SKILL.md +23 -3
  45. package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  46. package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +23 -2
  47. package/corpus/templates/calendar/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  48. package/corpus/templates/calendar/agent-native.json +12 -0
  49. package/corpus/templates/calendar/server/lib/booking-emails.ts +154 -70
  50. package/corpus/templates/calendar/server/lib/emails.ts +167 -0
  51. package/corpus/templates/calendar/server/lib/event-guest-notifications.ts +64 -28
  52. package/corpus/templates/calendar/server/plugins/transactional-emails.ts +5 -0
  53. package/corpus/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
  54. package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  55. package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
  56. package/corpus/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  57. package/corpus/templates/chat/AGENTS.md +3 -0
  58. package/corpus/templates/chat/DESIGN.md +28 -0
  59. package/corpus/templates/chat/agent-native.json +12 -0
  60. package/corpus/templates/clips/.agents/skills/agent-native-docs/SKILL.md +23 -3
  61. package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  62. package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +23 -2
  63. package/corpus/templates/clips/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  64. package/corpus/templates/clips/actions/cleanup-transcript.ts +2 -2
  65. package/corpus/templates/clips/actions/delete-recording-permanent.ts +3 -0
  66. package/corpus/templates/clips/actions/get-playback-position.ts +68 -0
  67. package/corpus/templates/clips/actions/import-loom-recording.ts +2 -2
  68. package/corpus/templates/clips/actions/invite-member.ts +39 -15
  69. package/corpus/templates/clips/actions/save-playback-position.ts +80 -0
  70. package/corpus/templates/clips/actions/set-thumbnail.ts +1 -1
  71. package/corpus/templates/clips/agent-native.json +12 -0
  72. package/corpus/templates/clips/app/components/player/video-player.tsx +54 -5
  73. package/corpus/templates/clips/app/hooks/use-playback-position.ts +188 -0
  74. package/corpus/templates/clips/app/hooks/use-view-tracking.ts +6 -24
  75. package/corpus/templates/clips/app/lib/playback-position.ts +99 -0
  76. package/corpus/templates/clips/app/lib/viewer-session.ts +29 -0
  77. package/corpus/templates/clips/changelog/2026-08-05-clip-buffering-now-uses-buffering-copy-after-playback.md +6 -0
  78. package/corpus/templates/clips/changelog/2026-08-05-clips-remembers-your-playback-position-when-you-reopen-a-cli.md +6 -0
  79. package/corpus/templates/clips/learnings.defaults.md +1 -1
  80. package/corpus/templates/clips/server/db/schema.ts +18 -0
  81. package/corpus/templates/clips/server/lib/emails.ts +256 -0
  82. package/corpus/templates/clips/server/lib/public-agent-context.ts +1 -1
  83. package/corpus/templates/clips/server/lib/transactional-email-templates.ts +24 -0
  84. package/corpus/templates/clips/server/lib/video-storage.ts +1 -1
  85. package/corpus/templates/clips/server/plugins/db.ts +15 -0
  86. package/corpus/templates/clips/server/plugins/transactional-email-catalog.ts +5 -0
  87. package/corpus/templates/clips/server/routes/api/media/index.post.ts +1 -1
  88. package/corpus/templates/content/.agents/skills/agent-native-docs/SKILL.md +23 -3
  89. package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  90. package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +13 -0
  91. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +23 -2
  92. package/corpus/templates/content/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  93. package/corpus/templates/content/AGENTS.md +1 -0
  94. package/corpus/templates/content/actions/_content-database-mutation-lock.ts +41 -0
  95. package/corpus/templates/content/actions/_content-database-row-migration.ts +569 -0
  96. package/corpus/templates/content/actions/_database-source-utils.ts +82 -36
  97. package/corpus/templates/content/actions/_database-utils.ts +5 -0
  98. package/corpus/templates/content/actions/_delete-content-space.ts +25 -11
  99. package/corpus/templates/content/actions/add-database-item.ts +60 -42
  100. package/corpus/templates/content/actions/attach-content-database-source.ts +2 -0
  101. package/corpus/templates/content/actions/configure-document-property.ts +99 -104
  102. package/corpus/templates/content/actions/delete-content-database.ts +19 -7
  103. package/corpus/templates/content/actions/delete-document-property.ts +47 -58
  104. package/corpus/templates/content/actions/delete-document.ts +390 -167
  105. package/corpus/templates/content/actions/disconnect-content-database-source.ts +41 -24
  106. package/corpus/templates/content/actions/duplicate-database-item.ts +63 -31
  107. package/corpus/templates/content/actions/duplicate-database-items.ts +86 -43
  108. package/corpus/templates/content/actions/duplicate-document-property.ts +37 -14
  109. package/corpus/templates/content/actions/migrate-content-database-rows.ts +830 -0
  110. package/corpus/templates/content/actions/move-database-item.ts +14 -0
  111. package/corpus/templates/content/actions/permanently-delete-document.ts +27 -6
  112. package/corpus/templates/content/actions/remove-database-items.ts +13 -0
  113. package/corpus/templates/content/actions/reorder-document-property.ts +45 -46
  114. package/corpus/templates/content/actions/set-document-property.ts +68 -28
  115. package/corpus/templates/content/actions/submit-content-database-form.ts +49 -0
  116. package/corpus/templates/content/actions/transcribe-media.ts +1 -1
  117. package/corpus/templates/content/agent-native.json +12 -0
  118. package/corpus/templates/content/app/components/editor/image-upload.ts +2 -2
  119. package/corpus/templates/content/app/i18n-data.ts +1 -1
  120. package/corpus/templates/content/changelog/2026-08-01-content-can-reorganize-every-row-in-an-existing-database-as-.md +6 -0
  121. package/corpus/templates/content/parity/matrix.md +1 -1
  122. package/corpus/templates/content/parity/matrix.ts +4 -2
  123. package/corpus/templates/content/server/db/schema.ts +30 -0
  124. package/corpus/templates/content/server/lib/comment-notifications.ts +57 -26
  125. package/corpus/templates/content/server/lib/emails.ts +70 -0
  126. package/corpus/templates/content/server/plugins/db.ts +24 -0
  127. package/corpus/templates/content/server/plugins/onboarding.ts +2 -2
  128. package/corpus/templates/content/server/plugins/transactional-emails.ts +5 -0
  129. package/corpus/templates/crm/.agents/skills/agent-native-docs/SKILL.md +23 -3
  130. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  131. package/corpus/templates/crm/agent-native.json +12 -0
  132. package/corpus/templates/design/.agents/skills/agent-native-docs/SKILL.md +23 -3
  133. package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  134. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +23 -2
  135. package/corpus/templates/design/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  136. package/corpus/templates/design/CODE_NATIVE_DESIGN_STUDIO_IMPLEMENTATION_PLAN.md +2 -2
  137. package/corpus/templates/design/DESIGN-STUDIO-PLAN.md +2 -2
  138. package/corpus/templates/design/actions/apply-design-token-edit.ts +1 -1
  139. package/corpus/templates/design/actions/capture-design-state.ts +1 -1
  140. package/corpus/templates/design/actions/connect-builder-app.ts +2 -2
  141. package/corpus/templates/design/actions/create-design-branch.ts +1 -1
  142. package/corpus/templates/design/actions/create-fusion-app.ts +3 -3
  143. package/corpus/templates/design/actions/deploy-design-preview.ts +1 -1
  144. package/corpus/templates/design/actions/get-component-details.ts +1 -1
  145. package/corpus/templates/design/actions/get-design-branch-diff.ts +1 -1
  146. package/corpus/templates/design/actions/index-components.ts +3 -3
  147. package/corpus/templates/design/actions/index-design-system-with-builder.ts +1 -1
  148. package/corpus/templates/design/actions/migrate-inline-design-to-app.ts +3 -3
  149. package/corpus/templates/design/actions/open-component-source.ts +1 -1
  150. package/corpus/templates/design/actions/update-design.ts +61 -0
  151. package/corpus/templates/design/agent-native.json +12 -0
  152. package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +1 -1
  153. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +1 -1
  154. package/corpus/templates/design/scripts/qa-figma-stress-import.ts +1 -1
  155. package/corpus/templates/design/server/lib/figma-node-import.ts +1 -1
  156. package/corpus/templates/design/shared/design-source-capabilities.ts +25 -9
  157. package/corpus/templates/dispatch/.agents/skills/agent-native-docs/SKILL.md +23 -3
  158. package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  159. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +23 -2
  160. package/corpus/templates/dispatch/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  161. package/corpus/templates/dispatch/agent-native.json +12 -0
  162. package/corpus/templates/dispatch/app/routes/transactional-email.$appId.$id.tsx +4 -0
  163. package/corpus/templates/dispatch/app/routes/transactional-email.tsx +4 -0
  164. package/corpus/templates/factory/.agents/skills/agent-native-docs/SKILL.md +23 -3
  165. package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  166. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +23 -2
  167. package/corpus/templates/factory/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  168. package/corpus/templates/factory/agent-native.json +12 -0
  169. package/corpus/templates/forms/.agents/skills/agent-native-docs/SKILL.md +23 -3
  170. package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  171. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +23 -2
  172. package/corpus/templates/forms/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  173. package/corpus/templates/forms/actions/export-responses.ts +1 -1
  174. package/corpus/templates/forms/agent-native.json +12 -0
  175. package/corpus/templates/forms/server/lib/emails.ts +52 -0
  176. package/corpus/templates/forms/server/lib/response-email.ts +2 -0
  177. package/corpus/templates/forms/server/plugins/transactional-emails.ts +5 -0
  178. package/corpus/templates/macros/.agents/skills/agent-native-docs/SKILL.md +23 -3
  179. package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  180. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +23 -2
  181. package/corpus/templates/macros/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  182. package/corpus/templates/macros/agent-native.json +12 -0
  183. package/corpus/templates/mail/.agents/skills/agent-native-docs/SKILL.md +23 -3
  184. package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  185. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +23 -2
  186. package/corpus/templates/mail/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  187. package/corpus/templates/mail/agent-native.json +12 -0
  188. package/corpus/templates/mail/app/i18n/en-US.ts +1 -1
  189. package/corpus/templates/mail/server/lib/media-upload.ts +1 -1
  190. package/corpus/templates/plan/.agents/skills/agent-native-docs/SKILL.md +23 -3
  191. package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  192. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +23 -2
  193. package/corpus/templates/plan/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  194. package/corpus/templates/plan/actions/request-plan-access.ts +33 -12
  195. package/corpus/templates/plan/agent-native.json +12 -0
  196. package/corpus/templates/plan/server/lib/comment-notifications.ts +53 -27
  197. package/corpus/templates/plan/server/lib/emails.ts +67 -0
  198. package/corpus/templates/plan/server/lib/plan-assets.ts +1 -1
  199. package/corpus/templates/plan/server/plugins/transactional-emails.ts +5 -0
  200. package/corpus/templates/slides/.agents/skills/agent-native-docs/SKILL.md +23 -3
  201. package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  202. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +23 -2
  203. package/corpus/templates/slides/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  204. package/corpus/templates/slides/actions/generate-image-api.ts +1 -1
  205. package/corpus/templates/slides/actions/generate-slides-ai.ts +1 -1
  206. package/corpus/templates/slides/actions/import-file.ts +2 -2
  207. package/corpus/templates/slides/actions/index-design-system-with-builder.ts +1 -1
  208. package/corpus/templates/slides/agent-native.json +12 -0
  209. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +1 -1
  210. package/corpus/templates/slides/app/i18n/en-US.ts +2 -2
  211. package/corpus/templates/slides/app/lib/deck-sorting.ts +19 -0
  212. package/corpus/templates/slides/app/lib/image-drop-to-agent.ts +1 -1
  213. package/corpus/templates/slides/app/pages/Index.tsx +7 -2
  214. package/corpus/templates/slides/changelog/2026-08-05-decks-are-now-sorted-by-most-recently-updated.md +6 -0
  215. package/corpus/templates/slides/server/handlers/assets.ts +1 -1
  216. package/corpus/templates/slides/server/handlers/uploads.ts +1 -1
  217. package/corpus/templates/slides/server/lib/comment-notifications.ts +44 -21
  218. package/corpus/templates/slides/server/lib/emails.ts +40 -0
  219. package/corpus/templates/slides/server/plugins/transactional-emails.ts +5 -0
  220. package/corpus/templates/tasks/.agents/skills/agent-native-docs/SKILL.md +23 -3
  221. package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  222. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +23 -2
  223. package/corpus/templates/tasks/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  224. package/corpus/templates/tasks/agent-native.json +12 -0
  225. package/dist/action.d.ts +6 -0
  226. package/dist/agent/engine/builder-engine.js +2 -2
  227. package/dist/agent/engine/credential-errors.d.ts +1 -1
  228. package/dist/agent/engine/credential-errors.js +2 -2
  229. package/dist/agent/production-agent.js +3 -2
  230. package/dist/brand-kit/fig/index.js +1 -1
  231. package/dist/cli/agent.js +45 -3
  232. package/dist/cli/code-agent-executor.js +2 -1
  233. package/dist/cli/create.d.ts +9 -1
  234. package/dist/cli/create.js +94 -1
  235. package/dist/cli/doctor.d.ts +8 -11
  236. package/dist/cli/doctor.js +92 -24
  237. package/dist/cli/index.js +6 -5
  238. package/dist/client/AgentAskPopover.d.ts +3 -1
  239. package/dist/client/AgentAskPopover.js +2 -2
  240. package/dist/client/AgentPanel.js +9 -3
  241. package/dist/client/AssistantChat.js +54 -33
  242. package/dist/client/MultiTabAssistantChat.js +1 -1
  243. package/dist/client/RouteTransitionIndicator.d.ts +7 -0
  244. package/dist/client/RouteTransitionIndicator.js +31 -0
  245. package/dist/client/agent-engine-key.js +1 -1
  246. package/dist/client/app-providers.js +11 -2
  247. package/dist/client/chat/message-components.js +1 -1
  248. package/dist/client/chat/run-recovery.js +1 -1
  249. package/dist/client/chat/tool-call-display.d.ts +3 -1
  250. package/dist/client/chat/tool-call-display.js +4 -3
  251. package/dist/client/chat-model-groups.d.ts +6 -0
  252. package/dist/client/chat-model-groups.js +11 -0
  253. package/dist/client/error-format.js +1 -1
  254. package/dist/client/i18n.js +1 -1
  255. package/dist/client/onboarding/FirstRunOnboarding.d.ts +5 -1
  256. package/dist/client/onboarding/FirstRunOnboarding.js +29 -13
  257. package/dist/client/onboarding/first-run-enabled.d.ts +6 -1
  258. package/dist/client/onboarding/first-run-enabled.js +33 -3
  259. package/dist/client/onboarding/use-onboarding.js +16 -11
  260. package/dist/client/resources/mcp-integration-catalog.js +26 -0
  261. package/dist/client/resources/mcp-integration-logos.js +4 -0
  262. package/dist/client/route-warmup.js +56 -10
  263. package/dist/client/settings/AccountSettingsCard.js +78 -3
  264. package/dist/client/settings/SettingsPanel.js +1 -1
  265. package/dist/client/settings/VoiceTranscriptionSection.js +2 -2
  266. package/dist/client/settings/useBuilderStatus.js +1 -1
  267. package/dist/client/setup-connections/useBuilderConnectCardController.js +1 -1
  268. package/dist/client/ui/index.d.ts +1 -0
  269. package/dist/client/ui/index.js +1 -0
  270. package/dist/client/uploads/upload-editor-image.js +1 -1
  271. package/dist/client/use-chat-threads.js +3 -0
  272. package/dist/collab/routes.d.ts +1 -1
  273. package/dist/config.d.ts +48 -0
  274. package/dist/config.js +111 -0
  275. package/dist/db/migrations.js +5 -0
  276. package/dist/eject/provider-api-definitions.d.ts +1 -1
  277. package/dist/eject/provider-api-definitions.js +1 -0
  278. package/dist/eject/remote-mcp-presets.js +1 -0
  279. package/dist/email-catalog/actions/list-email-activity.d.ts +6 -0
  280. package/dist/email-catalog/actions/list-email-activity.js +15 -0
  281. package/dist/email-catalog/actions/list-email-engagement.d.ts +6 -0
  282. package/dist/email-catalog/actions/list-email-engagement.js +15 -0
  283. package/dist/email-catalog/actions/list-email-log.d.ts +8 -0
  284. package/dist/email-catalog/actions/list-email-log.js +22 -0
  285. package/dist/email-catalog/actions/list-transactional-emails.d.ts +23 -0
  286. package/dist/email-catalog/actions/list-transactional-emails.js +61 -0
  287. package/dist/email-catalog/actions/render-transactional-email-preview.d.ts +10 -0
  288. package/dist/email-catalog/actions/render-transactional-email-preview.js +24 -0
  289. package/dist/email-catalog/authorize.d.ts +2 -0
  290. package/dist/email-catalog/authorize.js +10 -0
  291. package/dist/email-catalog/log.d.ts +57 -0
  292. package/dist/email-catalog/log.js +117 -0
  293. package/dist/email-catalog/provider-metrics.d.ts +34 -0
  294. package/dist/email-catalog/provider-metrics.js +165 -0
  295. package/dist/email-catalog/registry.d.ts +79 -0
  296. package/dist/email-catalog/registry.js +71 -0
  297. package/dist/email-catalog/schema.d.ts +212 -0
  298. package/dist/email-catalog/schema.js +49 -0
  299. package/dist/email-catalog/system-emails.d.ts +14 -0
  300. package/dist/email-catalog/system-emails.js +68 -0
  301. package/dist/extensions/web-search-tool.js +2 -2
  302. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  303. package/dist/file-upload/actions/upload-image.js +1 -1
  304. package/dist/file-upload/registry.js +1 -1
  305. package/dist/guards/index.d.ts +3 -0
  306. package/dist/guards/index.js +2 -0
  307. package/dist/guards/no-empty-migrations.d.ts +14 -0
  308. package/dist/guards/no-empty-migrations.js +126 -0
  309. package/dist/index.browser.d.ts +1 -0
  310. package/dist/index.browser.js +3 -0
  311. package/dist/index.d.ts +1 -0
  312. package/dist/index.js +1 -0
  313. package/dist/localization/default-messages.d.ts +69 -0
  314. package/dist/localization/default-messages.js +71 -2
  315. package/dist/notifications/routes.d.ts +2 -2
  316. package/dist/onboarding/app-profile.js +1 -1
  317. package/dist/onboarding/plugin.d.ts +2 -0
  318. package/dist/onboarding/plugin.js +29 -2
  319. package/dist/org/handlers.js +8 -1
  320. package/dist/provider-api/actions/custom-provider-registration.d.ts +11 -11
  321. package/dist/provider-api/actions/provider-api.d.ts +13 -13
  322. package/dist/provider-api/index.d.ts +4 -4
  323. package/dist/provider-api/index.js +35 -0
  324. package/dist/resources/handlers.d.ts +1 -1
  325. package/dist/resources/handlers.js +1 -1
  326. package/dist/scripts/docs/framework-search.d.ts +9 -0
  327. package/dist/scripts/docs/framework-search.js +239 -0
  328. package/dist/scripts/docs/index.js +1 -0
  329. package/dist/scripts/docs/search.d.ts +10 -0
  330. package/dist/scripts/docs/search.js +1 -1
  331. package/dist/scripts/docs/source-search.d.ts +10 -2
  332. package/dist/scripts/docs/source-search.js +108 -41
  333. package/dist/search-utils/index.d.ts +11 -0
  334. package/dist/search-utils/index.js +72 -0
  335. package/dist/server/action-change.d.ts +6 -0
  336. package/dist/server/action-change.js +28 -14
  337. package/dist/server/action-discovery.js +31 -0
  338. package/dist/server/action-routes.js +1 -0
  339. package/dist/server/agent-chat/browser-team-tools.js +1 -1
  340. package/dist/server/agent-chat/script-entries.js +43 -2
  341. package/dist/server/auth-login-mode.d.ts +8 -0
  342. package/dist/server/auth-login-mode.js +17 -0
  343. package/dist/server/auth.js +100 -15
  344. package/dist/server/better-auth-instance.d.ts +36 -0
  345. package/dist/server/better-auth-instance.js +42 -5
  346. package/dist/server/builder-design-systems.js +1 -1
  347. package/dist/server/core-routes-plugin.js +17 -14
  348. package/dist/server/credential-provider.js +3 -3
  349. package/dist/server/email-templates.d.ts +7 -0
  350. package/dist/server/email-templates.js +24 -0
  351. package/dist/server/email.d.ts +26 -0
  352. package/dist/server/email.js +66 -4
  353. package/dist/server/framework-request-handler.js +6 -0
  354. package/dist/server/index.d.ts +1 -0
  355. package/dist/server/index.js +1 -0
  356. package/dist/server/onboarding-html.d.ts +2 -0
  357. package/dist/server/onboarding-html.js +169 -8
  358. package/dist/server/realtime-token.d.ts +1 -1
  359. package/dist/server/realtime-voice.js +1 -1
  360. package/dist/server/sentry.d.ts +1 -1
  361. package/dist/server/transcribe-voice.js +3 -3
  362. package/dist/shared/first-run-onboarding.d.ts +1 -0
  363. package/dist/shared/first-run-onboarding.js +1 -0
  364. package/dist/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
  365. package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  366. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
  367. package/dist/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  368. package/dist/templates/chat/AGENTS.md +3 -0
  369. package/dist/templates/chat/DESIGN.md +28 -0
  370. package/dist/templates/chat/agent-native.json +12 -0
  371. package/dist/templates/default/.agents/skills/agent-native-docs/SKILL.md +23 -3
  372. package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  373. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +23 -2
  374. package/dist/templates/default/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  375. package/dist/templates/default/AGENTS.md +4 -0
  376. package/dist/templates/default/DESIGN.md +30 -0
  377. package/dist/templates/default/agent-native.json +9 -0
  378. package/dist/templates/default/app/i18n/ar-SA.ts +2 -2
  379. package/dist/templates/default/app/i18n/de-DE.ts +2 -2
  380. package/dist/templates/default/app/i18n/en-US.ts +2 -2
  381. package/dist/templates/default/app/i18n/es-ES.ts +2 -2
  382. package/dist/templates/default/app/i18n/fr-FR.ts +2 -2
  383. package/dist/templates/default/app/i18n/hi-IN.ts +2 -2
  384. package/dist/templates/default/app/i18n/ja-JP.ts +2 -2
  385. package/dist/templates/default/app/i18n/ko-KR.ts +2 -2
  386. package/dist/templates/default/app/i18n/pt-BR.ts +2 -2
  387. package/dist/templates/default/app/i18n/zh-CN.ts +2 -2
  388. package/dist/templates/default/app/i18n/zh-TW.ts +1 -1
  389. package/dist/templates/default/package.json +1 -0
  390. package/dist/templates/headless/.agents/skills/agent-native-docs/SKILL.md +23 -3
  391. package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  392. package/dist/templates/headless/agent-native.json +9 -0
  393. package/dist/templates/headless/package.json +2 -0
  394. package/dist/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +23 -3
  395. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  396. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +23 -2
  397. package/dist/templates/workspace-core/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  398. package/dist/templates/workspace-core/AGENTS.md +3 -0
  399. package/dist/templates/workspace-core/DESIGN.md +35 -0
  400. package/dist/templates/workspace-root/AGENTS.md +3 -0
  401. package/dist/templates/workspace-root/DESIGN.md +35 -0
  402. package/dist/templates/workspace-root/agent-native.json +9 -0
  403. package/dist/templates/workspace-root/package.json +3 -0
  404. package/dist/transcription/builder-transcription.js +1 -1
  405. package/dist/user-profile/actions/change-password.d.ts +8 -0
  406. package/dist/user-profile/actions/change-password.js +24 -0
  407. package/dist/user-profile/actions/get-auth-methods.d.ts +6 -0
  408. package/dist/user-profile/actions/get-auth-methods.js +23 -0
  409. package/dist/user-profile/actions/set-password.d.ts +7 -0
  410. package/dist/user-profile/actions/set-password.js +23 -0
  411. package/dist/vite/client.d.ts +8 -1
  412. package/dist/vite/client.js +63 -12
  413. package/dist/vite/index.d.ts +1 -0
  414. package/dist/vite/index.js +1 -0
  415. package/docs/AGENTS.md +7 -2
  416. package/docs/SKILL.md +7 -5
  417. package/docs/content/agent-native-config.mdx +165 -0
  418. package/docs/content/agent-native-toolkit.mdx +1 -1
  419. package/docs/content/deployment.mdx +7 -2
  420. package/docs/content/doctor.mdx +21 -13
  421. package/docs/content/environment-variables.mdx +158 -0
  422. package/docs/content/file-uploads.mdx +1 -1
  423. package/docs/content/getting-started.mdx +1 -1
  424. package/docs/content/key-concepts.mdx +1 -1
  425. package/docs/content/multi-app-workspace.mdx +1 -1
  426. package/docs/content/template-clips-ai-and-editing.mdx +6 -6
  427. package/docs/content/template-clips-developers.mdx +3 -3
  428. package/docs/content/toolkit-settings.mdx +1 -1
  429. package/docs/content/voice-input.mdx +4 -4
  430. package/package.json +7 -2
  431. package/src/eject/provider-api-definitions.ts +1 -0
  432. package/src/eject/remote-mcp-presets.ts +1 -0
  433. package/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
  434. package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  435. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
  436. package/src/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  437. package/src/templates/chat/AGENTS.md +3 -0
  438. package/src/templates/chat/DESIGN.md +28 -0
  439. package/src/templates/chat/agent-native.json +12 -0
  440. package/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +23 -3
  441. package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  442. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +23 -2
  443. package/src/templates/default/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  444. package/src/templates/default/AGENTS.md +4 -0
  445. package/src/templates/default/DESIGN.md +30 -0
  446. package/src/templates/default/agent-native.json +9 -0
  447. package/src/templates/default/app/i18n/ar-SA.ts +2 -2
  448. package/src/templates/default/app/i18n/de-DE.ts +2 -2
  449. package/src/templates/default/app/i18n/en-US.ts +2 -2
  450. package/src/templates/default/app/i18n/es-ES.ts +2 -2
  451. package/src/templates/default/app/i18n/fr-FR.ts +2 -2
  452. package/src/templates/default/app/i18n/hi-IN.ts +2 -2
  453. package/src/templates/default/app/i18n/ja-JP.ts +2 -2
  454. package/src/templates/default/app/i18n/ko-KR.ts +2 -2
  455. package/src/templates/default/app/i18n/pt-BR.ts +2 -2
  456. package/src/templates/default/app/i18n/zh-CN.ts +2 -2
  457. package/src/templates/default/app/i18n/zh-TW.ts +1 -1
  458. package/src/templates/default/package.json +1 -0
  459. package/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +23 -3
  460. package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  461. package/src/templates/headless/agent-native.json +9 -0
  462. package/src/templates/headless/package.json +2 -0
  463. package/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +23 -3
  464. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
  465. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +23 -2
  466. package/src/templates/workspace-core/.agents/skills/frontend-design/references/visual-direction.md +99 -0
  467. package/src/templates/workspace-core/AGENTS.md +3 -0
  468. package/src/templates/workspace-core/DESIGN.md +35 -0
  469. package/src/templates/workspace-root/AGENTS.md +3 -0
  470. package/src/templates/workspace-root/DESIGN.md +35 -0
  471. package/src/templates/workspace-root/agent-native.json +9 -0
  472. package/src/templates/workspace-root/package.json +3 -0
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Registry of the transactional emails an app can send.
3
+ *
4
+ * An app declares each email it sends here so the workspace can answer, without
5
+ * reading the app's source: what emails exist, what makes one send, who it goes
6
+ * to, who it comes from, and what it looks like. Dispatch aggregates these
7
+ * across every mounted app via the `list-transactional-emails` action.
8
+ *
9
+ * Declare emails next to the code that sends them, then import that module from
10
+ * a server plugin so registration happens at startup:
11
+ *
12
+ * defineTransactionalEmail({
13
+ * id: "calendar.booking-confirmed",
14
+ * name: "Booking confirmed",
15
+ * trigger: "A guest completes a booking on a public scheduling page.",
16
+ * recipient: "The guest email captured on the booking form.",
17
+ * sender: "EMAIL_FROM, with reply-to set to the event host.",
18
+ * preview: () => renderBookingConfirmedEmail(SAMPLE_BOOKING),
19
+ * });
20
+ *
21
+ * The `id` doubles as the SendGrid category `sendEmail` tags the message with,
22
+ * which is how per-email delivery and open metrics are attributed later.
23
+ */
24
+ import type { RenderedEmailMessage } from "../server/email-templates.js";
25
+ export interface TransactionalEmailDefinition {
26
+ /**
27
+ * Stable, globally unique id in `<app>.<email>` form, e.g.
28
+ * `calendar.booking-confirmed`. Used as the SendGrid category, so changing it
29
+ * orphans historical metrics for this email.
30
+ */
31
+ id: string;
32
+ /** Human-readable name, e.g. "Booking confirmed". */
33
+ name: string;
34
+ /**
35
+ * App slug this email belongs to. Defaults to the running app, which is
36
+ * correct for every app-declared email; core system emails set it explicitly.
37
+ */
38
+ app?: string;
39
+ /** Plain-language description of the condition that causes a send. */
40
+ trigger: string;
41
+ /** Plain-language description of how the recipient address is chosen. */
42
+ recipient: string;
43
+ /**
44
+ * Two-to-four word summary of the recipient for table cells, e.g.
45
+ * "Booking guest". The full `recipient` sentence is shown on the detail view.
46
+ */
47
+ recipientLabel: string;
48
+ /** Plain-language description of how From and Reply-To are chosen. */
49
+ sender: string;
50
+ /** Two-to-four word summary of the sender, e.g. "Default, reply-to host". */
51
+ senderLabel: string;
52
+ /**
53
+ * Render the email with representative dummy data. Must not read from the
54
+ * database or touch the network — previews are rendered on demand from
55
+ * Dispatch, for apps whose data the caller may not be able to see.
56
+ */
57
+ preview: () => RenderedEmailMessage;
58
+ }
59
+ /** A definition with its app resolved, as returned to callers. */
60
+ export type RegisteredTransactionalEmail = TransactionalEmailDefinition & {
61
+ app: string;
62
+ };
63
+ /**
64
+ * Register a transactional email. Returns the definition so the call site can
65
+ * export it and reuse `id` when sending.
66
+ */
67
+ export declare function defineTransactionalEmail(definition: TransactionalEmailDefinition): RegisteredTransactionalEmail;
68
+ /** Every registered email, sorted by app then name. */
69
+ export declare function listTransactionalEmails(): RegisteredTransactionalEmail[];
70
+ export declare function getTransactionalEmail(id: string): RegisteredTransactionalEmail | undefined;
71
+ /**
72
+ * Render one email's preview. Throws when the id is unknown or the renderer
73
+ * fails — a preview that silently returns an empty body would look like an
74
+ * email that legitimately renders blank.
75
+ */
76
+ export declare function renderTransactionalEmailPreview(id: string): RenderedEmailMessage;
77
+ /** Test seam — drops all registrations. */
78
+ export declare function resetTransactionalEmailRegistry(): void;
79
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Registry of the transactional emails an app can send.
3
+ *
4
+ * An app declares each email it sends here so the workspace can answer, without
5
+ * reading the app's source: what emails exist, what makes one send, who it goes
6
+ * to, who it comes from, and what it looks like. Dispatch aggregates these
7
+ * across every mounted app via the `list-transactional-emails` action.
8
+ *
9
+ * Declare emails next to the code that sends them, then import that module from
10
+ * a server plugin so registration happens at startup:
11
+ *
12
+ * defineTransactionalEmail({
13
+ * id: "calendar.booking-confirmed",
14
+ * name: "Booking confirmed",
15
+ * trigger: "A guest completes a booking on a public scheduling page.",
16
+ * recipient: "The guest email captured on the booking form.",
17
+ * sender: "EMAIL_FROM, with reply-to set to the event host.",
18
+ * preview: () => renderBookingConfirmedEmail(SAMPLE_BOOKING),
19
+ * });
20
+ *
21
+ * The `id` doubles as the SendGrid category `sendEmail` tags the message with,
22
+ * which is how per-email delivery and open metrics are attributed later.
23
+ */
24
+ import { getAppSlug } from "../server/app-name.js";
25
+ const registry = new Map();
26
+ /** Source definitions, so re-registering the same one is a no-op rather than a clash. */
27
+ const sources = new Map();
28
+ /**
29
+ * Register a transactional email. Returns the definition so the call site can
30
+ * export it and reuse `id` when sending.
31
+ */
32
+ export function defineTransactionalEmail(definition) {
33
+ const existing = sources.get(definition.id);
34
+ if (existing && existing !== definition) {
35
+ // Two emails sharing an id would silently merge their metrics and make the
36
+ // catalog claim one exists when the other actually sent.
37
+ throw new Error(`Duplicate transactional email id "${definition.id}". Ids must be unique across the app.`);
38
+ }
39
+ const resolved = {
40
+ ...definition,
41
+ app: definition.app ?? getAppSlug() ?? "unknown",
42
+ };
43
+ registry.set(definition.id, resolved);
44
+ sources.set(definition.id, definition);
45
+ return resolved;
46
+ }
47
+ /** Every registered email, sorted by app then name. */
48
+ export function listTransactionalEmails() {
49
+ return [...registry.values()].sort((a, b) => a.app.localeCompare(b.app) || a.name.localeCompare(b.name));
50
+ }
51
+ export function getTransactionalEmail(id) {
52
+ return registry.get(id);
53
+ }
54
+ /**
55
+ * Render one email's preview. Throws when the id is unknown or the renderer
56
+ * fails — a preview that silently returns an empty body would look like an
57
+ * email that legitimately renders blank.
58
+ */
59
+ export function renderTransactionalEmailPreview(id) {
60
+ const definition = registry.get(id);
61
+ if (!definition) {
62
+ throw new Error(`Unknown transactional email "${id}".`);
63
+ }
64
+ return definition.preview();
65
+ }
66
+ /** Test seam — drops all registrations. */
67
+ export function resetTransactionalEmailRegistry() {
68
+ registry.clear();
69
+ sources.clear();
70
+ }
71
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1,212 @@
1
+ /**
2
+ * Drizzle schema for the transactional email send log.
3
+ *
4
+ * One row per `sendEmail` attempt, written by the transport itself so every
5
+ * send is recorded regardless of which app or code path triggered it. This is
6
+ * the durable record of "did we send it": the provider's own activity feed ages
7
+ * out (SendGrid keeps 3 days without the extended-retention add-on), so send
8
+ * counts and last-sent must not depend on it.
9
+ *
10
+ * Engagement (opens, clicks, bounces) is deliberately NOT stored here. Only the
11
+ * provider knows it, and mirroring it would go stale the moment a recipient
12
+ * opens an old message. Dispatch reads engagement live from the provider and
13
+ * joins on `template_id`.
14
+ */
15
+ export declare const emailLog: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
16
+ name: "email_log";
17
+ schema: undefined;
18
+ columns: {
19
+ id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
20
+ name: "id";
21
+ tableName: "email_log";
22
+ dataType: "string";
23
+ columnType: "SQLiteText";
24
+ data: string;
25
+ driverParam: string;
26
+ notNull: true;
27
+ hasDefault: false;
28
+ isPrimaryKey: true;
29
+ isAutoincrement: false;
30
+ hasRuntimeDefault: false;
31
+ enumValues: [string, ...string[]];
32
+ baseColumn: never;
33
+ identity: undefined;
34
+ generated: undefined;
35
+ }, {}, {
36
+ length: number;
37
+ }>;
38
+ templateId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
39
+ name: "template_id";
40
+ tableName: "email_log";
41
+ dataType: "string";
42
+ columnType: "SQLiteText";
43
+ data: string;
44
+ driverParam: string;
45
+ notNull: false;
46
+ hasDefault: false;
47
+ isPrimaryKey: false;
48
+ isAutoincrement: false;
49
+ hasRuntimeDefault: false;
50
+ enumValues: [string, ...string[]];
51
+ baseColumn: never;
52
+ identity: undefined;
53
+ generated: undefined;
54
+ }, {}, {
55
+ length: number;
56
+ }>;
57
+ app: import("drizzle-orm/sqlite-core").SQLiteColumn<{
58
+ name: "app";
59
+ tableName: "email_log";
60
+ dataType: "string";
61
+ columnType: "SQLiteText";
62
+ data: string;
63
+ driverParam: string;
64
+ notNull: false;
65
+ hasDefault: false;
66
+ isPrimaryKey: false;
67
+ isAutoincrement: false;
68
+ hasRuntimeDefault: false;
69
+ enumValues: [string, ...string[]];
70
+ baseColumn: never;
71
+ identity: undefined;
72
+ generated: undefined;
73
+ }, {}, {
74
+ length: number;
75
+ }>;
76
+ recipient: import("drizzle-orm/sqlite-core").SQLiteColumn<{
77
+ name: "recipient";
78
+ tableName: "email_log";
79
+ dataType: "string";
80
+ columnType: "SQLiteText";
81
+ data: string;
82
+ driverParam: string;
83
+ notNull: true;
84
+ hasDefault: false;
85
+ isPrimaryKey: false;
86
+ isAutoincrement: false;
87
+ hasRuntimeDefault: false;
88
+ enumValues: [string, ...string[]];
89
+ baseColumn: never;
90
+ identity: undefined;
91
+ generated: undefined;
92
+ }, {}, {
93
+ length: number;
94
+ }>;
95
+ sender: import("drizzle-orm/sqlite-core").SQLiteColumn<{
96
+ name: "sender";
97
+ tableName: "email_log";
98
+ dataType: "string";
99
+ columnType: "SQLiteText";
100
+ data: string;
101
+ driverParam: string;
102
+ notNull: true;
103
+ hasDefault: false;
104
+ isPrimaryKey: false;
105
+ isAutoincrement: false;
106
+ hasRuntimeDefault: false;
107
+ enumValues: [string, ...string[]];
108
+ baseColumn: never;
109
+ identity: undefined;
110
+ generated: undefined;
111
+ }, {}, {
112
+ length: number;
113
+ }>;
114
+ subject: import("drizzle-orm/sqlite-core").SQLiteColumn<{
115
+ name: "subject";
116
+ tableName: "email_log";
117
+ dataType: "string";
118
+ columnType: "SQLiteText";
119
+ data: string;
120
+ driverParam: string;
121
+ notNull: true;
122
+ hasDefault: false;
123
+ isPrimaryKey: false;
124
+ isAutoincrement: false;
125
+ hasRuntimeDefault: false;
126
+ enumValues: [string, ...string[]];
127
+ baseColumn: never;
128
+ identity: undefined;
129
+ generated: undefined;
130
+ }, {}, {
131
+ length: number;
132
+ }>;
133
+ status: import("drizzle-orm/sqlite-core").SQLiteColumn<{
134
+ name: "status";
135
+ tableName: "email_log";
136
+ dataType: "string";
137
+ columnType: "SQLiteText";
138
+ data: "failed" | "sent";
139
+ driverParam: string;
140
+ notNull: true;
141
+ hasDefault: false;
142
+ isPrimaryKey: false;
143
+ isAutoincrement: false;
144
+ hasRuntimeDefault: false;
145
+ enumValues: ["sent", "failed"];
146
+ baseColumn: never;
147
+ identity: undefined;
148
+ generated: undefined;
149
+ }, {}, {
150
+ length: number;
151
+ }>;
152
+ error: import("drizzle-orm/sqlite-core").SQLiteColumn<{
153
+ name: "error";
154
+ tableName: "email_log";
155
+ dataType: "string";
156
+ columnType: "SQLiteText";
157
+ data: string;
158
+ driverParam: string;
159
+ notNull: false;
160
+ hasDefault: false;
161
+ isPrimaryKey: false;
162
+ isAutoincrement: false;
163
+ hasRuntimeDefault: false;
164
+ enumValues: [string, ...string[]];
165
+ baseColumn: never;
166
+ identity: undefined;
167
+ generated: undefined;
168
+ }, {}, {
169
+ length: number;
170
+ }>;
171
+ provider: import("drizzle-orm/sqlite-core").SQLiteColumn<{
172
+ name: "provider";
173
+ tableName: "email_log";
174
+ dataType: "string";
175
+ columnType: "SQLiteText";
176
+ data: string;
177
+ driverParam: string;
178
+ notNull: true;
179
+ hasDefault: false;
180
+ isPrimaryKey: false;
181
+ isAutoincrement: false;
182
+ hasRuntimeDefault: false;
183
+ enumValues: [string, ...string[]];
184
+ baseColumn: never;
185
+ identity: undefined;
186
+ generated: undefined;
187
+ }, {}, {
188
+ length: number;
189
+ }>;
190
+ createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
191
+ name: "created_at";
192
+ tableName: "email_log";
193
+ dataType: "number";
194
+ columnType: "SQLiteInteger";
195
+ data: number;
196
+ driverParam: number;
197
+ notNull: true;
198
+ hasDefault: false;
199
+ isPrimaryKey: false;
200
+ isAutoincrement: false;
201
+ hasRuntimeDefault: false;
202
+ enumValues: undefined;
203
+ baseColumn: never;
204
+ identity: undefined;
205
+ generated: undefined;
206
+ }, {}, {}>;
207
+ };
208
+ dialect: 'sqlite';
209
+ }>;
210
+ export declare const EMAIL_LOG_CREATE_SQL = "CREATE TABLE IF NOT EXISTS email_log (\n id TEXT PRIMARY KEY,\n template_id TEXT,\n app TEXT,\n recipient TEXT NOT NULL,\n sender TEXT NOT NULL,\n subject TEXT NOT NULL,\n status TEXT NOT NULL,\n error TEXT,\n provider TEXT NOT NULL,\n created_at INTEGER NOT NULL\n)";
211
+ export declare const EMAIL_LOG_TEMPLATE_INDEX_SQL = "CREATE INDEX IF NOT EXISTS email_log_template_created_idx\n ON email_log (template_id, created_at)";
212
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Drizzle schema for the transactional email send log.
3
+ *
4
+ * One row per `sendEmail` attempt, written by the transport itself so every
5
+ * send is recorded regardless of which app or code path triggered it. This is
6
+ * the durable record of "did we send it": the provider's own activity feed ages
7
+ * out (SendGrid keeps 3 days without the extended-retention add-on), so send
8
+ * counts and last-sent must not depend on it.
9
+ *
10
+ * Engagement (opens, clicks, bounces) is deliberately NOT stored here. Only the
11
+ * provider knows it, and mirroring it would go stale the moment a recipient
12
+ * opens an old message. Dispatch reads engagement live from the provider and
13
+ * joins on `template_id`.
14
+ */
15
+ import { table, text, integer } from "../db/schema.js";
16
+ export const emailLog = table("email_log", {
17
+ id: text("id").primaryKey(),
18
+ /** Registered transactional email id, e.g. "calendar.booking-confirmed". */
19
+ templateId: text("template_id"),
20
+ /** App slug that sent it. */
21
+ app: text("app"),
22
+ /** Recipient address. */
23
+ recipient: text("recipient").notNull(),
24
+ /** Resolved From address, after app-sender branding is applied. */
25
+ sender: text("sender").notNull(),
26
+ subject: text("subject").notNull(),
27
+ /** "sent" once the provider accepted it, or "failed". Never optimistic. */
28
+ status: text("status", { enum: ["sent", "failed"] }).notNull(),
29
+ /** Provider error text when status is "failed". */
30
+ error: text("error"),
31
+ /** "resend" | "sendgrid" | "dev". */
32
+ provider: text("provider").notNull(),
33
+ createdAt: integer("created_at").notNull(),
34
+ });
35
+ export const EMAIL_LOG_CREATE_SQL = `CREATE TABLE IF NOT EXISTS email_log (
36
+ id TEXT PRIMARY KEY,
37
+ template_id TEXT,
38
+ app TEXT,
39
+ recipient TEXT NOT NULL,
40
+ sender TEXT NOT NULL,
41
+ subject TEXT NOT NULL,
42
+ status TEXT NOT NULL,
43
+ error TEXT,
44
+ provider TEXT NOT NULL,
45
+ created_at INTEGER NOT NULL
46
+ )`;
47
+ export const EMAIL_LOG_TEMPLATE_INDEX_SQL = `CREATE INDEX IF NOT EXISTS email_log_template_created_idx
48
+ ON email_log (template_id, created_at)`;
49
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Catalog entries for the framework's own system emails.
3
+ *
4
+ * These ship with every app rather than belonging to one, so they register
5
+ * under the `core` app instead of the running app's slug. Importing this module
6
+ * performs the registration; `register-system-emails.ts` is the single import
7
+ * site so the emails appear in every app's catalog without each template
8
+ * remembering to opt in.
9
+ */
10
+ export declare const CORE_INVITE_EMAIL_ID = "core.organization-invite";
11
+ export declare const CORE_VERIFY_SIGNUP_EMAIL_ID = "core.verify-signup";
12
+ export declare const CORE_RESET_PASSWORD_EMAIL_ID = "core.reset-password";
13
+ export declare function registerCoreSystemEmails(): void;
14
+ //# sourceMappingURL=system-emails.d.ts.map
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Catalog entries for the framework's own system emails.
3
+ *
4
+ * These ship with every app rather than belonging to one, so they register
5
+ * under the `core` app instead of the running app's slug. Importing this module
6
+ * performs the registration; `register-system-emails.ts` is the single import
7
+ * site so the emails appear in every app's catalog without each template
8
+ * remembering to opt in.
9
+ */
10
+ import { renderInviteEmail, renderResetPasswordEmail, renderVerifySignupEmail, } from "../server/email-templates.js";
11
+ import { defineTransactionalEmail } from "./registry.js";
12
+ /** Obviously-fake sample data — these render in a preview pane, never send. */
13
+ const SAMPLE_URL = "https://example.com/accept/sample-token";
14
+ const SAMPLE_EMAIL = "sam.rivera@example.com";
15
+ export const CORE_INVITE_EMAIL_ID = "core.organization-invite";
16
+ export const CORE_VERIFY_SIGNUP_EMAIL_ID = "core.verify-signup";
17
+ export const CORE_RESET_PASSWORD_EMAIL_ID = "core.reset-password";
18
+ let registered = false;
19
+ export function registerCoreSystemEmails() {
20
+ if (registered)
21
+ return;
22
+ registered = true;
23
+ defineTransactionalEmail({
24
+ id: CORE_INVITE_EMAIL_ID,
25
+ app: "core",
26
+ name: "Organization invitation",
27
+ trigger: "A member invites someone to their organization from the team settings page.",
28
+ recipientLabel: "Invited address",
29
+ recipient: "The address typed into the invite form. One email per invited address.",
30
+ senderLabel: "Default, app-branded",
31
+ sender: "The configured EMAIL_FROM. On first-party agent-native.com deployments the display name becomes the app's own, with reply-to agent-native@builder.io.",
32
+ preview: () => renderInviteEmail({
33
+ invitee: SAMPLE_EMAIL,
34
+ orgName: "Northwind Design",
35
+ acceptUrl: SAMPLE_URL,
36
+ inviter: "alex.chen@example.com",
37
+ }),
38
+ });
39
+ defineTransactionalEmail({
40
+ id: CORE_VERIFY_SIGNUP_EMAIL_ID,
41
+ app: "core",
42
+ name: "Verify signup",
43
+ trigger: "A new account is created with email and password, before the account can be used.",
44
+ recipientLabel: "New account address",
45
+ recipient: "The address the account was registered with.",
46
+ senderLabel: "Default, app-branded",
47
+ sender: "The configured EMAIL_FROM, branded with the app name the signup happened in.",
48
+ preview: () => renderVerifySignupEmail({
49
+ email: SAMPLE_EMAIL,
50
+ verifyUrl: SAMPLE_URL,
51
+ }),
52
+ });
53
+ defineTransactionalEmail({
54
+ id: CORE_RESET_PASSWORD_EMAIL_ID,
55
+ app: "core",
56
+ name: "Reset password",
57
+ trigger: "A user requests a password reset from the sign-in screen. The link expires after one hour.",
58
+ recipientLabel: "Account address",
59
+ recipient: "The account address the reset was requested for, never an address supplied in the request body.",
60
+ senderLabel: "Default, app-branded",
61
+ sender: "The configured EMAIL_FROM, branded with the app name the reset was requested from.",
62
+ preview: () => renderResetPasswordEmail({
63
+ email: SAMPLE_EMAIL,
64
+ resetUrl: SAMPLE_URL,
65
+ }),
66
+ });
67
+ }
68
+ //# sourceMappingURL=system-emails.js.map
@@ -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/",
@@ -17,12 +17,12 @@ declare const _default: import("../../action.js").ActionDefinition<{
17
17
  id?: undefined;
18
18
  provider?: undefined;
19
19
  } | {
20
- error?: undefined;
21
20
  configured?: undefined;
22
21
  connectPath?: undefined;
23
22
  url: string;
24
23
  id: string;
25
24
  provider: string;
25
+ error?: undefined;
26
26
  }>;
27
27
  export default _default;
28
28
  //# sourceMappingURL=upload-image.d.ts.map
@@ -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