@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.
- package/agent-native.eject.json +2 -0
- package/corpus/README.md +1 -1
- package/corpus/templates/analytics/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +15 -0
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/analytics/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/analytics/AGENTS.md +2 -2
- package/corpus/templates/analytics/actions/get-first-party-analytics-health.ts +65 -0
- package/corpus/templates/analytics/actions/provider-api-catalog.ts +3 -6
- package/corpus/templates/analytics/actions/provider-api-docs.ts +3 -6
- package/corpus/templates/analytics/actions/provider-api-request.ts +3 -6
- package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +3 -3
- package/corpus/templates/analytics/agent-native.json +12 -0
- package/corpus/templates/analytics/app/i18n-data.ts +162 -0
- package/corpus/templates/analytics/app/pages/DataSources.tsx +126 -1
- package/corpus/templates/analytics/changelog/2026-08-05-analytics-now-flags-neon-pressure-and-guides-high-volume-tra.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-05-first-party-analytics-uses-compact-rollups-for-faster-usage-.md +6 -0
- package/corpus/templates/analytics/server/db/schema.ts +52 -0
- package/corpus/templates/analytics/server/lib/credential-keys.ts +3 -0
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +2 -0
- package/corpus/templates/analytics/server/lib/emails.ts +51 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics-health.ts +397 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +182 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +86 -15
- package/corpus/templates/analytics/server/lib/provider-api.ts +20 -1
- package/corpus/templates/analytics/server/lib/replay-storage.ts +1 -1
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +1 -0
- package/corpus/templates/analytics/server/plugins/db.ts +60 -0
- package/corpus/templates/analytics/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/assets/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/assets/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/assets/agent-native.json +12 -0
- package/corpus/templates/assets/server/lib/generation.ts +8 -8
- package/corpus/templates/assets/server/lib/storage.ts +1 -1
- package/corpus/templates/assets/server/plugins/onboarding.ts +1 -1
- package/corpus/templates/brain/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/brain/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/brain/agent-native.json +12 -0
- package/corpus/templates/calendar/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/calendar/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/calendar/agent-native.json +12 -0
- package/corpus/templates/calendar/server/lib/booking-emails.ts +154 -70
- package/corpus/templates/calendar/server/lib/emails.ts +167 -0
- package/corpus/templates/calendar/server/lib/event-guest-notifications.ts +64 -28
- package/corpus/templates/calendar/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/chat/AGENTS.md +3 -0
- package/corpus/templates/chat/DESIGN.md +28 -0
- package/corpus/templates/chat/agent-native.json +12 -0
- package/corpus/templates/clips/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/clips/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/clips/actions/cleanup-transcript.ts +2 -2
- package/corpus/templates/clips/actions/delete-recording-permanent.ts +3 -0
- package/corpus/templates/clips/actions/get-playback-position.ts +68 -0
- package/corpus/templates/clips/actions/import-loom-recording.ts +2 -2
- package/corpus/templates/clips/actions/invite-member.ts +39 -15
- package/corpus/templates/clips/actions/save-playback-position.ts +80 -0
- package/corpus/templates/clips/actions/set-thumbnail.ts +1 -1
- package/corpus/templates/clips/agent-native.json +12 -0
- package/corpus/templates/clips/app/components/player/video-player.tsx +54 -5
- package/corpus/templates/clips/app/hooks/use-playback-position.ts +188 -0
- package/corpus/templates/clips/app/hooks/use-view-tracking.ts +6 -24
- package/corpus/templates/clips/app/lib/playback-position.ts +99 -0
- package/corpus/templates/clips/app/lib/viewer-session.ts +29 -0
- package/corpus/templates/clips/changelog/2026-08-05-clip-buffering-now-uses-buffering-copy-after-playback.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-05-clips-remembers-your-playback-position-when-you-reopen-a-cli.md +6 -0
- package/corpus/templates/clips/learnings.defaults.md +1 -1
- package/corpus/templates/clips/server/db/schema.ts +18 -0
- package/corpus/templates/clips/server/lib/emails.ts +256 -0
- package/corpus/templates/clips/server/lib/public-agent-context.ts +1 -1
- package/corpus/templates/clips/server/lib/transactional-email-templates.ts +24 -0
- package/corpus/templates/clips/server/lib/video-storage.ts +1 -1
- package/corpus/templates/clips/server/plugins/db.ts +15 -0
- package/corpus/templates/clips/server/plugins/transactional-email-catalog.ts +5 -0
- package/corpus/templates/clips/server/routes/api/media/index.post.ts +1 -1
- package/corpus/templates/content/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +13 -0
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/content/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/content/AGENTS.md +1 -0
- package/corpus/templates/content/actions/_content-database-mutation-lock.ts +41 -0
- package/corpus/templates/content/actions/_content-database-row-migration.ts +569 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +82 -36
- package/corpus/templates/content/actions/_database-utils.ts +5 -0
- package/corpus/templates/content/actions/_delete-content-space.ts +25 -11
- package/corpus/templates/content/actions/add-database-item.ts +60 -42
- package/corpus/templates/content/actions/attach-content-database-source.ts +2 -0
- package/corpus/templates/content/actions/configure-document-property.ts +99 -104
- package/corpus/templates/content/actions/delete-content-database.ts +19 -7
- package/corpus/templates/content/actions/delete-document-property.ts +47 -58
- package/corpus/templates/content/actions/delete-document.ts +390 -167
- package/corpus/templates/content/actions/disconnect-content-database-source.ts +41 -24
- package/corpus/templates/content/actions/duplicate-database-item.ts +63 -31
- package/corpus/templates/content/actions/duplicate-database-items.ts +86 -43
- package/corpus/templates/content/actions/duplicate-document-property.ts +37 -14
- package/corpus/templates/content/actions/migrate-content-database-rows.ts +830 -0
- package/corpus/templates/content/actions/move-database-item.ts +14 -0
- package/corpus/templates/content/actions/permanently-delete-document.ts +27 -6
- package/corpus/templates/content/actions/remove-database-items.ts +13 -0
- package/corpus/templates/content/actions/reorder-document-property.ts +45 -46
- package/corpus/templates/content/actions/set-document-property.ts +68 -28
- package/corpus/templates/content/actions/submit-content-database-form.ts +49 -0
- package/corpus/templates/content/actions/transcribe-media.ts +1 -1
- package/corpus/templates/content/agent-native.json +12 -0
- package/corpus/templates/content/app/components/editor/image-upload.ts +2 -2
- package/corpus/templates/content/app/i18n-data.ts +1 -1
- package/corpus/templates/content/changelog/2026-08-01-content-can-reorganize-every-row-in-an-existing-database-as-.md +6 -0
- package/corpus/templates/content/parity/matrix.md +1 -1
- package/corpus/templates/content/parity/matrix.ts +4 -2
- package/corpus/templates/content/server/db/schema.ts +30 -0
- package/corpus/templates/content/server/lib/comment-notifications.ts +57 -26
- package/corpus/templates/content/server/lib/emails.ts +70 -0
- package/corpus/templates/content/server/plugins/db.ts +24 -0
- package/corpus/templates/content/server/plugins/onboarding.ts +2 -2
- package/corpus/templates/content/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/crm/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/crm/agent-native.json +12 -0
- package/corpus/templates/design/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/design/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/design/CODE_NATIVE_DESIGN_STUDIO_IMPLEMENTATION_PLAN.md +2 -2
- package/corpus/templates/design/DESIGN-STUDIO-PLAN.md +2 -2
- package/corpus/templates/design/actions/apply-design-token-edit.ts +1 -1
- package/corpus/templates/design/actions/capture-design-state.ts +1 -1
- package/corpus/templates/design/actions/connect-builder-app.ts +2 -2
- package/corpus/templates/design/actions/create-design-branch.ts +1 -1
- package/corpus/templates/design/actions/create-fusion-app.ts +3 -3
- package/corpus/templates/design/actions/deploy-design-preview.ts +1 -1
- package/corpus/templates/design/actions/get-component-details.ts +1 -1
- package/corpus/templates/design/actions/get-design-branch-diff.ts +1 -1
- package/corpus/templates/design/actions/index-components.ts +3 -3
- package/corpus/templates/design/actions/index-design-system-with-builder.ts +1 -1
- package/corpus/templates/design/actions/migrate-inline-design-to-app.ts +3 -3
- package/corpus/templates/design/actions/open-component-source.ts +1 -1
- package/corpus/templates/design/actions/update-design.ts +61 -0
- package/corpus/templates/design/agent-native.json +12 -0
- package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +1 -1
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +1 -1
- package/corpus/templates/design/scripts/qa-figma-stress-import.ts +1 -1
- package/corpus/templates/design/server/lib/figma-node-import.ts +1 -1
- package/corpus/templates/design/shared/design-source-capabilities.ts +25 -9
- package/corpus/templates/dispatch/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/dispatch/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/dispatch/agent-native.json +12 -0
- package/corpus/templates/dispatch/app/routes/transactional-email.$appId.$id.tsx +4 -0
- package/corpus/templates/dispatch/app/routes/transactional-email.tsx +4 -0
- package/corpus/templates/factory/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/factory/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/factory/agent-native.json +12 -0
- package/corpus/templates/forms/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/forms/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/forms/actions/export-responses.ts +1 -1
- package/corpus/templates/forms/agent-native.json +12 -0
- package/corpus/templates/forms/server/lib/emails.ts +52 -0
- package/corpus/templates/forms/server/lib/response-email.ts +2 -0
- package/corpus/templates/forms/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/macros/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/macros/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/macros/agent-native.json +12 -0
- package/corpus/templates/mail/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/mail/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/mail/agent-native.json +12 -0
- package/corpus/templates/mail/app/i18n/en-US.ts +1 -1
- package/corpus/templates/mail/server/lib/media-upload.ts +1 -1
- package/corpus/templates/plan/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/plan/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/plan/actions/request-plan-access.ts +33 -12
- package/corpus/templates/plan/agent-native.json +12 -0
- package/corpus/templates/plan/server/lib/comment-notifications.ts +53 -27
- package/corpus/templates/plan/server/lib/emails.ts +67 -0
- package/corpus/templates/plan/server/lib/plan-assets.ts +1 -1
- package/corpus/templates/plan/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/slides/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/slides/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/slides/actions/generate-image-api.ts +1 -1
- package/corpus/templates/slides/actions/generate-slides-ai.ts +1 -1
- package/corpus/templates/slides/actions/import-file.ts +2 -2
- package/corpus/templates/slides/actions/index-design-system-with-builder.ts +1 -1
- package/corpus/templates/slides/agent-native.json +12 -0
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +1 -1
- package/corpus/templates/slides/app/i18n/en-US.ts +2 -2
- package/corpus/templates/slides/app/lib/deck-sorting.ts +19 -0
- package/corpus/templates/slides/app/lib/image-drop-to-agent.ts +1 -1
- package/corpus/templates/slides/app/pages/Index.tsx +7 -2
- package/corpus/templates/slides/changelog/2026-08-05-decks-are-now-sorted-by-most-recently-updated.md +6 -0
- package/corpus/templates/slides/server/handlers/assets.ts +1 -1
- package/corpus/templates/slides/server/handlers/uploads.ts +1 -1
- package/corpus/templates/slides/server/lib/comment-notifications.ts +44 -21
- package/corpus/templates/slides/server/lib/emails.ts +40 -0
- package/corpus/templates/slides/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/tasks/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/tasks/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/tasks/agent-native.json +12 -0
- package/dist/action.d.ts +6 -0
- package/dist/agent/engine/builder-engine.js +2 -2
- package/dist/agent/engine/credential-errors.d.ts +1 -1
- package/dist/agent/engine/credential-errors.js +2 -2
- package/dist/agent/production-agent.js +3 -2
- package/dist/brand-kit/fig/index.js +1 -1
- package/dist/cli/agent.js +45 -3
- package/dist/cli/code-agent-executor.js +2 -1
- package/dist/cli/create.d.ts +9 -1
- package/dist/cli/create.js +94 -1
- package/dist/cli/doctor.d.ts +8 -11
- package/dist/cli/doctor.js +92 -24
- package/dist/cli/index.js +6 -5
- package/dist/client/AgentAskPopover.d.ts +3 -1
- package/dist/client/AgentAskPopover.js +2 -2
- package/dist/client/AgentPanel.js +9 -3
- package/dist/client/AssistantChat.js +54 -33
- package/dist/client/MultiTabAssistantChat.js +1 -1
- package/dist/client/RouteTransitionIndicator.d.ts +7 -0
- package/dist/client/RouteTransitionIndicator.js +31 -0
- package/dist/client/agent-engine-key.js +1 -1
- package/dist/client/app-providers.js +11 -2
- package/dist/client/chat/message-components.js +1 -1
- package/dist/client/chat/run-recovery.js +1 -1
- package/dist/client/chat/tool-call-display.d.ts +3 -1
- package/dist/client/chat/tool-call-display.js +4 -3
- package/dist/client/chat-model-groups.d.ts +6 -0
- package/dist/client/chat-model-groups.js +11 -0
- package/dist/client/error-format.js +1 -1
- package/dist/client/i18n.js +1 -1
- package/dist/client/onboarding/FirstRunOnboarding.d.ts +5 -1
- package/dist/client/onboarding/FirstRunOnboarding.js +29 -13
- package/dist/client/onboarding/first-run-enabled.d.ts +6 -1
- package/dist/client/onboarding/first-run-enabled.js +33 -3
- package/dist/client/onboarding/use-onboarding.js +16 -11
- package/dist/client/resources/mcp-integration-catalog.js +26 -0
- package/dist/client/resources/mcp-integration-logos.js +4 -0
- package/dist/client/route-warmup.js +56 -10
- package/dist/client/settings/AccountSettingsCard.js +78 -3
- package/dist/client/settings/SettingsPanel.js +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.js +2 -2
- package/dist/client/settings/useBuilderStatus.js +1 -1
- package/dist/client/setup-connections/useBuilderConnectCardController.js +1 -1
- package/dist/client/ui/index.d.ts +1 -0
- package/dist/client/ui/index.js +1 -0
- package/dist/client/uploads/upload-editor-image.js +1 -1
- package/dist/client/use-chat-threads.js +3 -0
- package/dist/collab/routes.d.ts +1 -1
- package/dist/config.d.ts +48 -0
- package/dist/config.js +111 -0
- package/dist/db/migrations.js +5 -0
- package/dist/eject/provider-api-definitions.d.ts +1 -1
- package/dist/eject/provider-api-definitions.js +1 -0
- package/dist/eject/remote-mcp-presets.js +1 -0
- package/dist/email-catalog/actions/list-email-activity.d.ts +6 -0
- package/dist/email-catalog/actions/list-email-activity.js +15 -0
- package/dist/email-catalog/actions/list-email-engagement.d.ts +6 -0
- package/dist/email-catalog/actions/list-email-engagement.js +15 -0
- package/dist/email-catalog/actions/list-email-log.d.ts +8 -0
- package/dist/email-catalog/actions/list-email-log.js +22 -0
- package/dist/email-catalog/actions/list-transactional-emails.d.ts +23 -0
- package/dist/email-catalog/actions/list-transactional-emails.js +61 -0
- package/dist/email-catalog/actions/render-transactional-email-preview.d.ts +10 -0
- package/dist/email-catalog/actions/render-transactional-email-preview.js +24 -0
- package/dist/email-catalog/authorize.d.ts +2 -0
- package/dist/email-catalog/authorize.js +10 -0
- package/dist/email-catalog/log.d.ts +57 -0
- package/dist/email-catalog/log.js +117 -0
- package/dist/email-catalog/provider-metrics.d.ts +34 -0
- package/dist/email-catalog/provider-metrics.js +165 -0
- package/dist/email-catalog/registry.d.ts +79 -0
- package/dist/email-catalog/registry.js +71 -0
- package/dist/email-catalog/schema.d.ts +212 -0
- package/dist/email-catalog/schema.js +49 -0
- package/dist/email-catalog/system-emails.d.ts +14 -0
- package/dist/email-catalog/system-emails.js +68 -0
- package/dist/extensions/web-search-tool.js +2 -2
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.js +1 -1
- package/dist/file-upload/registry.js +1 -1
- package/dist/guards/index.d.ts +3 -0
- package/dist/guards/index.js +2 -0
- package/dist/guards/no-empty-migrations.d.ts +14 -0
- package/dist/guards/no-empty-migrations.js +126 -0
- package/dist/index.browser.d.ts +1 -0
- package/dist/index.browser.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/localization/default-messages.d.ts +69 -0
- package/dist/localization/default-messages.js +71 -2
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/onboarding/app-profile.js +1 -1
- package/dist/onboarding/plugin.d.ts +2 -0
- package/dist/onboarding/plugin.js +29 -2
- package/dist/org/handlers.js +8 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +11 -11
- package/dist/provider-api/actions/provider-api.d.ts +13 -13
- package/dist/provider-api/index.d.ts +4 -4
- package/dist/provider-api/index.js +35 -0
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/resources/handlers.js +1 -1
- package/dist/scripts/docs/framework-search.d.ts +9 -0
- package/dist/scripts/docs/framework-search.js +239 -0
- package/dist/scripts/docs/index.js +1 -0
- package/dist/scripts/docs/search.d.ts +10 -0
- package/dist/scripts/docs/search.js +1 -1
- package/dist/scripts/docs/source-search.d.ts +10 -2
- package/dist/scripts/docs/source-search.js +108 -41
- package/dist/search-utils/index.d.ts +11 -0
- package/dist/search-utils/index.js +72 -0
- package/dist/server/action-change.d.ts +6 -0
- package/dist/server/action-change.js +28 -14
- package/dist/server/action-discovery.js +31 -0
- package/dist/server/action-routes.js +1 -0
- package/dist/server/agent-chat/browser-team-tools.js +1 -1
- package/dist/server/agent-chat/script-entries.js +43 -2
- package/dist/server/auth-login-mode.d.ts +8 -0
- package/dist/server/auth-login-mode.js +17 -0
- package/dist/server/auth.js +100 -15
- package/dist/server/better-auth-instance.d.ts +36 -0
- package/dist/server/better-auth-instance.js +42 -5
- package/dist/server/builder-design-systems.js +1 -1
- package/dist/server/core-routes-plugin.js +17 -14
- package/dist/server/credential-provider.js +3 -3
- package/dist/server/email-templates.d.ts +7 -0
- package/dist/server/email-templates.js +24 -0
- package/dist/server/email.d.ts +26 -0
- package/dist/server/email.js +66 -4
- package/dist/server/framework-request-handler.js +6 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +1 -0
- package/dist/server/onboarding-html.d.ts +2 -0
- package/dist/server/onboarding-html.js +169 -8
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/realtime-voice.js +1 -1
- package/dist/server/sentry.d.ts +1 -1
- package/dist/server/transcribe-voice.js +3 -3
- package/dist/shared/first-run-onboarding.d.ts +1 -0
- package/dist/shared/first-run-onboarding.js +1 -0
- package/dist/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
- package/dist/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/dist/templates/chat/AGENTS.md +3 -0
- package/dist/templates/chat/DESIGN.md +28 -0
- package/dist/templates/chat/agent-native.json +12 -0
- package/dist/templates/default/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +23 -2
- package/dist/templates/default/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/dist/templates/default/AGENTS.md +4 -0
- package/dist/templates/default/DESIGN.md +30 -0
- package/dist/templates/default/agent-native.json +9 -0
- package/dist/templates/default/app/i18n/ar-SA.ts +2 -2
- package/dist/templates/default/app/i18n/de-DE.ts +2 -2
- package/dist/templates/default/app/i18n/en-US.ts +2 -2
- package/dist/templates/default/app/i18n/es-ES.ts +2 -2
- package/dist/templates/default/app/i18n/fr-FR.ts +2 -2
- package/dist/templates/default/app/i18n/hi-IN.ts +2 -2
- package/dist/templates/default/app/i18n/ja-JP.ts +2 -2
- package/dist/templates/default/app/i18n/ko-KR.ts +2 -2
- package/dist/templates/default/app/i18n/pt-BR.ts +2 -2
- package/dist/templates/default/app/i18n/zh-CN.ts +2 -2
- package/dist/templates/default/app/i18n/zh-TW.ts +1 -1
- package/dist/templates/default/package.json +1 -0
- package/dist/templates/headless/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/dist/templates/headless/agent-native.json +9 -0
- package/dist/templates/headless/package.json +2 -0
- package/dist/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +23 -2
- package/dist/templates/workspace-core/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/dist/templates/workspace-core/AGENTS.md +3 -0
- package/dist/templates/workspace-core/DESIGN.md +35 -0
- package/dist/templates/workspace-root/AGENTS.md +3 -0
- package/dist/templates/workspace-root/DESIGN.md +35 -0
- package/dist/templates/workspace-root/agent-native.json +9 -0
- package/dist/templates/workspace-root/package.json +3 -0
- package/dist/transcription/builder-transcription.js +1 -1
- package/dist/user-profile/actions/change-password.d.ts +8 -0
- package/dist/user-profile/actions/change-password.js +24 -0
- package/dist/user-profile/actions/get-auth-methods.d.ts +6 -0
- package/dist/user-profile/actions/get-auth-methods.js +23 -0
- package/dist/user-profile/actions/set-password.d.ts +7 -0
- package/dist/user-profile/actions/set-password.js +23 -0
- package/dist/vite/client.d.ts +8 -1
- package/dist/vite/client.js +63 -12
- package/dist/vite/index.d.ts +1 -0
- package/dist/vite/index.js +1 -0
- package/docs/AGENTS.md +7 -2
- package/docs/SKILL.md +7 -5
- package/docs/content/agent-native-config.mdx +165 -0
- package/docs/content/agent-native-toolkit.mdx +1 -1
- package/docs/content/deployment.mdx +7 -2
- package/docs/content/doctor.mdx +21 -13
- package/docs/content/environment-variables.mdx +158 -0
- package/docs/content/file-uploads.mdx +1 -1
- package/docs/content/getting-started.mdx +1 -1
- package/docs/content/key-concepts.mdx +1 -1
- package/docs/content/multi-app-workspace.mdx +1 -1
- package/docs/content/template-clips-ai-and-editing.mdx +6 -6
- package/docs/content/template-clips-developers.mdx +3 -3
- package/docs/content/toolkit-settings.mdx +1 -1
- package/docs/content/voice-input.mdx +4 -4
- package/package.json +7 -2
- package/src/eject/provider-api-definitions.ts +1 -0
- package/src/eject/remote-mcp-presets.ts +1 -0
- package/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
- package/src/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/src/templates/chat/AGENTS.md +3 -0
- package/src/templates/chat/DESIGN.md +28 -0
- package/src/templates/chat/agent-native.json +12 -0
- package/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +23 -2
- package/src/templates/default/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/src/templates/default/AGENTS.md +4 -0
- package/src/templates/default/DESIGN.md +30 -0
- package/src/templates/default/agent-native.json +9 -0
- package/src/templates/default/app/i18n/ar-SA.ts +2 -2
- package/src/templates/default/app/i18n/de-DE.ts +2 -2
- package/src/templates/default/app/i18n/en-US.ts +2 -2
- package/src/templates/default/app/i18n/es-ES.ts +2 -2
- package/src/templates/default/app/i18n/fr-FR.ts +2 -2
- package/src/templates/default/app/i18n/hi-IN.ts +2 -2
- package/src/templates/default/app/i18n/ja-JP.ts +2 -2
- package/src/templates/default/app/i18n/ko-KR.ts +2 -2
- package/src/templates/default/app/i18n/pt-BR.ts +2 -2
- package/src/templates/default/app/i18n/zh-CN.ts +2 -2
- package/src/templates/default/app/i18n/zh-TW.ts +1 -1
- package/src/templates/default/package.json +1 -0
- package/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/src/templates/headless/agent-native.json +9 -0
- package/src/templates/headless/package.json +2 -0
- package/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +23 -2
- package/src/templates/workspace-core/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/src/templates/workspace-core/AGENTS.md +3 -0
- package/src/templates/workspace-core/DESIGN.md +35 -0
- package/src/templates/workspace-root/AGENTS.md +3 -0
- package/src/templates/workspace-root/DESIGN.md +35 -0
- package/src/templates/workspace-root/agent-native.json +9 -0
- 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;
|
package/dist/guards/index.d.ts
CHANGED
|
@@ -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";
|
package/dist/guards/index.js
CHANGED
|
@@ -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
|