@agent-native/core 0.137.7 → 0.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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/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/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/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/components/recorder/pre-record-panel.tsx +65 -18
- 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/i18n/en-US.ts +4 -0
- 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/desktop/package.json +1 -0
- package/corpus/templates/clips/desktop/src/app.tsx +70 -6
- package/corpus/templates/clips/desktop/src/components/AlertDialog.tsx +131 -0
- package/corpus/templates/clips/desktop/src/styles.css +129 -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/public-agent-context.ts +1 -1
- 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/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/plugins/db.ts +24 -0
- package/corpus/templates/content/server/plugins/onboarding.ts +2 -2
- 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/design-generation/SKILL.md +2 -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/generate-design.ts +3 -2
- 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 +96 -14
- package/corpus/templates/design/agent-native.json +12 -0
- package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +7 -2
- package/corpus/templates/design/app/components/design/FigmaHydrationDialog.tsx +11 -2
- package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +1 -1
- package/corpus/templates/design/app/components/editor/PromptDialog.tsx +8 -1
- package/corpus/templates/design/app/i18n-data.ts +53 -22
- package/corpus/templates/design/app/lib/design-file-upload.ts +2 -3
- package/corpus/templates/design/app/lib/upload-limits.ts +4 -0
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +1 -1
- package/corpus/templates/design/changelog/2026-08-05-chat-attachments-now-warn-before-upload-when-they-exceed-the.md +6 -0
- package/corpus/templates/design/changelog/2026-08-05-figma-fig-uploads-now-show-a-clear-4-mb-limit-up-front-inste.md +6 -0
- package/corpus/templates/design/scripts/qa-figma-stress-import.ts +1 -1
- package/corpus/templates/design/server/handlers/import-design-file.ts +9 -5
- package/corpus/templates/design/server/handlers/uploads.ts +13 -9
- package/corpus/templates/design/server/lib/fig-file-limits.ts +2 -1
- package/corpus/templates/design/server/lib/figma-image-hydration.ts +1 -1
- package/corpus/templates/design/server/lib/figma-node-import.ts +1 -1
- package/corpus/templates/design/server/lib/request-body-limits.ts +11 -0
- package/corpus/templates/design/shared/canvas-frames.ts +81 -0
- 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/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/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/agent-native.json +12 -0
- package/corpus/templates/plan/server/lib/plan-assets.ts +1 -1
- 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/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/require-session.js +13 -4
- 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/client/use-session.d.ts +11 -0
- package/dist/client/use-session.js +34 -6
- package/dist/collab/routes.d.ts +2 -2
- 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/extensions/web-search-tool.js +2 -2
- 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 +24 -0
- package/dist/localization/default-messages.js +26 -2
- package/dist/notifications/routes.d.ts +6 -6
- 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/progress/routes.d.ts +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +16 -16
- 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 +9 -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 +25 -3
- 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 +17 -0
- package/dist/server/email.js +22 -1
- package/dist/server/framework-request-handler.js +6 -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 +6 -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
|
@@ -26,4 +26,10 @@ export interface NotifyActionChangeOptions {
|
|
|
26
26
|
}
|
|
27
27
|
export declare function writeActionChangeMarker(options: NotifyActionChangeOptions): Promise<void>;
|
|
28
28
|
export declare function notifyActionChange(options: NotifyActionChangeOptions): Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Publish the fast in-memory invalidation without holding a user-visible run
|
|
31
|
+
* on the durable marker write. The marker remains scheduled for other
|
|
32
|
+
* processes and its failure is logged instead of becoming an invisible gap.
|
|
33
|
+
*/
|
|
34
|
+
export declare function notifyActionChangeInBackground(options: NotifyActionChangeOptions): void;
|
|
29
35
|
//# sourceMappingURL=action-change.d.ts.map
|
|
@@ -40,6 +40,23 @@ function actionChangeTarget(options) {
|
|
|
40
40
|
requestSource: options.requestSource,
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
+
function recordActionChange(options) {
|
|
44
|
+
const target = actionChangeTarget(options);
|
|
45
|
+
recordChange({
|
|
46
|
+
source: "action",
|
|
47
|
+
type: "change",
|
|
48
|
+
key: target.actionName,
|
|
49
|
+
...(target.owner ? { owner: target.owner } : {}),
|
|
50
|
+
...(target.orgId ? { orgId: target.orgId } : {}),
|
|
51
|
+
...(target.requestSource ? { requestSource: target.requestSource } : {}),
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
actionName: options.actionName,
|
|
55
|
+
...(target.owner ? { owner: target.owner } : {}),
|
|
56
|
+
...(target.orgId ? { orgId: target.orgId } : {}),
|
|
57
|
+
...(target.requestSource ? { requestSource: target.requestSource } : {}),
|
|
58
|
+
};
|
|
59
|
+
}
|
|
43
60
|
export async function writeActionChangeMarker(options) {
|
|
44
61
|
const target = actionChangeTarget(options);
|
|
45
62
|
const sessionId = actionChangeMarkerSession(target);
|
|
@@ -51,20 +68,17 @@ export async function writeActionChangeMarker(options) {
|
|
|
51
68
|
}, { requestSource: options.requestSource ?? "agent" });
|
|
52
69
|
}
|
|
53
70
|
export async function notifyActionChange(options) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
...(target.owner ? { owner: target.owner } : {}),
|
|
66
|
-
...(target.orgId ? { orgId: target.orgId } : {}),
|
|
67
|
-
...(options.requestSource ? { requestSource: options.requestSource } : {}),
|
|
71
|
+
await writeActionChangeMarker(recordActionChange(options));
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Publish the fast in-memory invalidation without holding a user-visible run
|
|
75
|
+
* on the durable marker write. The marker remains scheduled for other
|
|
76
|
+
* processes and its failure is logged instead of becoming an invisible gap.
|
|
77
|
+
*/
|
|
78
|
+
export function notifyActionChangeInBackground(options) {
|
|
79
|
+
const normalizedOptions = recordActionChange(options);
|
|
80
|
+
void writeActionChangeMarker(normalizedOptions).catch((error) => {
|
|
81
|
+
console.warn("[action-change] durable marker write failed:", error instanceof Error ? error.message : String(error));
|
|
68
82
|
});
|
|
69
83
|
}
|
|
70
84
|
//# sourceMappingURL=action-change.js.map
|
|
@@ -596,6 +596,15 @@ export async function mergeCoreSharingActions(registry) {
|
|
|
596
596
|
"update-user-profile",
|
|
597
597
|
() => import("../user-profile/actions/update-user-profile.js"),
|
|
598
598
|
],
|
|
599
|
+
[
|
|
600
|
+
"get-auth-methods",
|
|
601
|
+
() => import("../user-profile/actions/get-auth-methods.js"),
|
|
602
|
+
],
|
|
603
|
+
["set-password", () => import("../user-profile/actions/set-password.js")],
|
|
604
|
+
[
|
|
605
|
+
"change-password",
|
|
606
|
+
() => import("../user-profile/actions/change-password.js"),
|
|
607
|
+
],
|
|
599
608
|
[
|
|
600
609
|
"change-appearance",
|
|
601
610
|
() => import("../appearance/actions/change-appearance.js"),
|
|
@@ -228,7 +228,7 @@ export function createBuilderBrowserTool(deps) {
|
|
|
228
228
|
},
|
|
229
229
|
"activate-browser": {
|
|
230
230
|
tool: {
|
|
231
|
-
description: "Activate browser automation tools. Call this when you need to interact with a real browser — e.g. to extract design tokens from a rendered page, take screenshots, read computed styles from JS-heavy sites, or test a live URL. After activation, chrome-devtools MCP tools (navigate, click, evaluate_script, take_screenshot, etc.) become available on your next action. Requires Builder.io connection.",
|
|
231
|
+
description: "Activate browser automation tools. Call this when you need to interact with a real browser — e.g. to extract design tokens from a rendered page, take screenshots, read computed styles from JS-heavy sites, or test a live URL. After activation, chrome-devtools MCP tools (navigate, click, evaluate_script, take_screenshot, etc.) become available on your next action. Requires a Builder.io connection (free tier available).",
|
|
232
232
|
parameters: {
|
|
233
233
|
type: "object",
|
|
234
234
|
properties: {
|
|
@@ -3,7 +3,7 @@ import { dbExecToolParameters } from "../../scripts/db/tool-schemas.js";
|
|
|
3
3
|
import { captureCliOutput } from "../cli-capture.js";
|
|
4
4
|
import { getAmbientUserEmail, getRequestOrgId, getRequestRunContext, getRequestUserEmail, } from "../request-context.js";
|
|
5
5
|
// ---------------------------------------------------------------------------
|
|
6
|
-
// CLI-script-backed action entries: db-*, docs-search/source-search,
|
|
6
|
+
// CLI-script-backed action entries: db-*, framework-search/docs-search/source-search,
|
|
7
7
|
// resources/save-memory/delete-memory, chat-history, manage-agent-engine,
|
|
8
8
|
// manage-agent-loop-settings, and call-agent. Each wraps a core CLI script
|
|
9
9
|
// (that writes to console.log) as an ActionEntry via `wrapCliScript`.
|
|
@@ -174,6 +174,47 @@ export async function createDbScriptEntries(mode = "read", options = {}) {
|
|
|
174
174
|
*/
|
|
175
175
|
export async function createDocsScriptEntries() {
|
|
176
176
|
const entries = {};
|
|
177
|
+
try {
|
|
178
|
+
const mod = await import("../../scripts/docs/framework-search.js");
|
|
179
|
+
entries["framework-search"] = wrapCliScript({
|
|
180
|
+
description: "Search the version-matched Agent Native docs and readable Core, Toolkit, and first-party template source in one bounded read-only call. Use this first when a docs answer may require implementation evidence.",
|
|
181
|
+
parameters: {
|
|
182
|
+
type: "object",
|
|
183
|
+
properties: {
|
|
184
|
+
pattern: {
|
|
185
|
+
type: "string",
|
|
186
|
+
description: "Text pattern to search across docs and source. Use normal text by default, or use glob (* and ?) / SQL-like (% and _) / regex mode for broader or more precise matching.",
|
|
187
|
+
},
|
|
188
|
+
scope: {
|
|
189
|
+
type: "string",
|
|
190
|
+
description: "Search corpus: all, docs, or source (default: all).",
|
|
191
|
+
enum: ["all", "docs", "source"],
|
|
192
|
+
},
|
|
193
|
+
mode: {
|
|
194
|
+
type: "string",
|
|
195
|
+
description: "Match mode: substring, glob, sql-like, or safe regex (default: substring).",
|
|
196
|
+
enum: ["substring", "glob", "sql-like", "regex"],
|
|
197
|
+
},
|
|
198
|
+
path: {
|
|
199
|
+
type: "string",
|
|
200
|
+
description: "Optional glob path filter such as templates/*/actions/*.ts or core/src/server/*.",
|
|
201
|
+
},
|
|
202
|
+
limit: {
|
|
203
|
+
type: "string",
|
|
204
|
+
description: "Maximum matching files to return, from 1 to 50.",
|
|
205
|
+
},
|
|
206
|
+
list: {
|
|
207
|
+
type: "string",
|
|
208
|
+
description: 'Set to "true" to list searchable docs and source roots.',
|
|
209
|
+
enum: ["true"],
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
}, mod.default, { readOnly: true });
|
|
214
|
+
}
|
|
215
|
+
catch (error) {
|
|
216
|
+
console.warn("[agent-chat] framework-search unavailable; keeping the older lookup tools:", error instanceof Error ? error.message : String(error));
|
|
217
|
+
}
|
|
177
218
|
try {
|
|
178
219
|
const mod = await import("../../scripts/docs/search.js");
|
|
179
220
|
entries["docs-search"] = wrapCliScript({
|
|
@@ -207,7 +248,7 @@ export async function createDocsScriptEntries() {
|
|
|
207
248
|
return entries;
|
|
208
249
|
}
|
|
209
250
|
entries["source-search"] = wrapCliScript({
|
|
210
|
-
description: "Search and read
|
|
251
|
+
description: "Search and read readable version-matched Core, Toolkit, and first-party template source. Use framework-search for one combined docs/source search with glob, SQL-like, or regex matching; use --list, --query, or --path for focused source lookup.",
|
|
211
252
|
parameters: {
|
|
212
253
|
type: "object",
|
|
213
254
|
properties: {
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type EmailReadiness } from "./email.js";
|
|
2
|
+
export type AuthLoginMode = "magic-link" | "password";
|
|
3
|
+
/** Magic link is the frictionless default only when outbound email is ready. */
|
|
4
|
+
export declare function resolveAuthLoginMode(emailReady: boolean): AuthLoginMode;
|
|
5
|
+
export declare function resolveAuthLoginModeFromReadiness(emailReadiness: EmailReadiness): AuthLoginMode;
|
|
6
|
+
/** Resolve the browser mode from the same scoped email transport used to send. */
|
|
7
|
+
export declare function getAuthLoginMode(): Promise<AuthLoginMode>;
|
|
8
|
+
//# sourceMappingURL=auth-login-mode.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { getEmailReadiness } from "./email.js";
|
|
2
|
+
/** Magic link is the frictionless default only when outbound email is ready. */
|
|
3
|
+
export function resolveAuthLoginMode(emailReady) {
|
|
4
|
+
const optOut = process.env.AUTH_MAGIC_LINK?.trim().toLowerCase();
|
|
5
|
+
if (optOut === "0" || optOut === "false" || optOut === "off") {
|
|
6
|
+
return "password";
|
|
7
|
+
}
|
|
8
|
+
return emailReady ? "magic-link" : "password";
|
|
9
|
+
}
|
|
10
|
+
export function resolveAuthLoginModeFromReadiness(emailReadiness) {
|
|
11
|
+
return resolveAuthLoginMode(emailReadiness.status === "ready");
|
|
12
|
+
}
|
|
13
|
+
/** Resolve the browser mode from the same scoped email transport used to send. */
|
|
14
|
+
export async function getAuthLoginMode() {
|
|
15
|
+
return resolveAuthLoginModeFromReadiness(await getEmailReadiness());
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=auth-login-mode.js.map
|
package/dist/server/auth.js
CHANGED
|
@@ -54,6 +54,7 @@ import { normalizeWorkspaceAppAudience, workspaceAppAudienceFromEnv, workspaceAp
|
|
|
54
54
|
import { isValidWorkspaceAppIdFormat } from "../shared/workspace-app-id.js";
|
|
55
55
|
import { injectAnalyticsIntoHtml } from "./analytics.js";
|
|
56
56
|
import { readAnalyticsAnonymousId, signupAttributionFromCookieHeader, } from "./attribution.js";
|
|
57
|
+
import { getAuthLoginMode } from "./auth-login-mode.js";
|
|
57
58
|
import { ensureGoogleAuthIdentity, getBetterAuth, getBetterAuthSync, } from "./better-auth-instance.js";
|
|
58
59
|
import { BUILDER_CONNECT_OWNER_COOKIE, BUILDER_CONNECT_PARAM, BUILDER_RELAY_PATH, BUILDER_RELAY_STATE_PARAM, BUILDER_STATE_PARAM, verifyBuilderCallbackStateAndGetOwner, verifyBuilderConnectTokenAndGetOwner, verifyBuilderPreviewRelayStateForCallback, } from "./builder-browser.js";
|
|
59
60
|
import { resolveAuthCookieNamespace } from "./cookie-namespace.js";
|
|
@@ -791,8 +792,9 @@ function getRequestHost(event) {
|
|
|
791
792
|
getHeader(event, "host") ??
|
|
792
793
|
undefined);
|
|
793
794
|
}
|
|
794
|
-
function getOnboardingHtmlOptions(options, event, rawPath) {
|
|
795
|
+
function getOnboardingHtmlOptions(options, event, rawPath, authMode) {
|
|
795
796
|
return {
|
|
797
|
+
authMode,
|
|
796
798
|
googleOnly: options.googleOnly,
|
|
797
799
|
marketing: options.marketing,
|
|
798
800
|
googleSignInNotice: options.googleSignInNotice,
|
|
@@ -803,15 +805,16 @@ function getOnboardingHtmlOptions(options, event, rawPath) {
|
|
|
803
805
|
requestOrigin: event ? getOrigin(event) : undefined,
|
|
804
806
|
};
|
|
805
807
|
}
|
|
806
|
-
function getAuthOnboardingHtml(options, event, rawPath) {
|
|
807
|
-
return getOnboardingHtml(getOnboardingHtmlOptions(options, event, rawPath));
|
|
808
|
+
function getAuthOnboardingHtml(options, event, rawPath, authMode) {
|
|
809
|
+
return getOnboardingHtml(getOnboardingHtmlOptions(options, event, rawPath, authMode));
|
|
808
810
|
}
|
|
809
|
-
function getOnboardingLoginHtmlConfig(options) {
|
|
811
|
+
function getOnboardingLoginHtmlConfig(options, authMode) {
|
|
810
812
|
if (options.loginHtml)
|
|
811
|
-
return { loginHtml: options.loginHtml };
|
|
813
|
+
return { loginHtml: options.loginHtml, authMode };
|
|
812
814
|
return {
|
|
813
|
-
|
|
814
|
-
|
|
815
|
+
authMode,
|
|
816
|
+
loginHtml: getAuthOnboardingHtml(options, undefined, undefined, authMode),
|
|
817
|
+
getLoginHtml: (event, rawPath) => getAuthOnboardingHtml(options, event, rawPath, authMode),
|
|
815
818
|
};
|
|
816
819
|
}
|
|
817
820
|
function resolveWorkspaceAppAudience(options = {}) {
|
|
@@ -1899,6 +1902,12 @@ function setFirstRunOnboardingCookie(event) {
|
|
|
1899
1902
|
maxAge: FIRST_RUN_ONBOARDING_MAX_AGE,
|
|
1900
1903
|
});
|
|
1901
1904
|
}
|
|
1905
|
+
function clearFirstRunOnboardingCookie(event) {
|
|
1906
|
+
deleteCookie(event, FIRST_RUN_ONBOARDING_COOKIE, {
|
|
1907
|
+
...crossSiteCookieAttrs(event),
|
|
1908
|
+
path: "/",
|
|
1909
|
+
});
|
|
1910
|
+
}
|
|
1902
1911
|
export function setFrameworkSessionCookie(event, token) {
|
|
1903
1912
|
clearFrameworkSessionCookies(event);
|
|
1904
1913
|
setCookie(event, COOKIE_NAME, token, {
|
|
@@ -2456,12 +2465,16 @@ async function mountBetterAuthRoutes(app, options) {
|
|
|
2456
2465
|
...(options.googleScopes ? { googleScopes: options.googleScopes } : {}),
|
|
2457
2466
|
};
|
|
2458
2467
|
const auth = await getBetterAuth(betterAuthConfig);
|
|
2468
|
+
const authLoginMode = typeof getAuthLoginMode === "function"
|
|
2469
|
+
? await getAuthLoginMode()
|
|
2470
|
+
: "password";
|
|
2459
2471
|
// Mount Better Auth catch-all handler at /_agent-native/auth/ba/*
|
|
2460
2472
|
app.use("/_agent-native/auth/ba", defineEventHandler(async (event) => {
|
|
2461
2473
|
const reqPath = event.url?.pathname ?? event.path ?? "";
|
|
2462
2474
|
const isResetPassword = reqPath.includes("reset-password") && getMethod(event) === "POST";
|
|
2463
2475
|
const isSendVerificationEmail = reqPath.includes("send-verification-email") &&
|
|
2464
2476
|
getMethod(event) === "POST";
|
|
2477
|
+
const isMagicLinkRequest = reqPath.includes("/sign-in/magic-link") && getMethod(event) === "POST";
|
|
2465
2478
|
const isSignOut = reqPath.includes("sign-out") && getMethod(event) === "POST";
|
|
2466
2479
|
if (isSignOut)
|
|
2467
2480
|
optOutOfAuthDisabledSession(event);
|
|
@@ -2471,7 +2484,8 @@ async function mountBetterAuthRoutes(app, options) {
|
|
|
2471
2484
|
// wrapper. Check its password endpoints before handing the request to
|
|
2472
2485
|
// Better Auth so an org policy cannot be bypassed through the raw API.
|
|
2473
2486
|
if (reqPath.includes("/sign-in/email") ||
|
|
2474
|
-
reqPath.includes("/sign-up/email")
|
|
2487
|
+
reqPath.includes("/sign-up/email") ||
|
|
2488
|
+
isMagicLinkRequest) {
|
|
2475
2489
|
const body = (await authRequest
|
|
2476
2490
|
.clone()
|
|
2477
2491
|
.json()
|
|
@@ -2525,22 +2539,35 @@ async function mountBetterAuthRoutes(app, options) {
|
|
|
2525
2539
|
// but the resend endpoint is exposed directly so users can request a
|
|
2526
2540
|
// fresh link while unauthenticated. Keep that path equally strict:
|
|
2527
2541
|
// only same-origin relative return paths survive into the email.
|
|
2528
|
-
if (isSendVerificationEmail) {
|
|
2542
|
+
if (isSendVerificationEmail || isMagicLinkRequest) {
|
|
2529
2543
|
try {
|
|
2530
2544
|
const body = (await authRequest
|
|
2531
2545
|
.clone()
|
|
2532
2546
|
.json()
|
|
2533
2547
|
.catch(() => undefined));
|
|
2534
|
-
if (body
|
|
2535
|
-
const
|
|
2536
|
-
|
|
2548
|
+
if (body) {
|
|
2549
|
+
const callbackKeys = isMagicLinkRequest
|
|
2550
|
+
? ["callbackURL", "newUserCallbackURL", "errorCallbackURL"]
|
|
2551
|
+
: ["callbackURL"];
|
|
2552
|
+
const sanitizedBody = { ...body };
|
|
2553
|
+
let changed = false;
|
|
2554
|
+
for (const key of callbackKeys) {
|
|
2555
|
+
if (typeof body[key] !== "string")
|
|
2556
|
+
continue;
|
|
2557
|
+
const callbackURL = safeReturnPath(body[key]);
|
|
2558
|
+
if (callbackURL !== body[key]) {
|
|
2559
|
+
sanitizedBody[key] = callbackURL;
|
|
2560
|
+
changed = true;
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
if (changed) {
|
|
2537
2564
|
const headers = new Headers(authRequest.headers);
|
|
2538
2565
|
headers.delete("content-length");
|
|
2539
2566
|
headers.set("content-type", "application/json");
|
|
2540
2567
|
requestForAuth = new Request(authRequest.url, {
|
|
2541
2568
|
method: authRequest.method,
|
|
2542
2569
|
headers,
|
|
2543
|
-
body: JSON.stringify(
|
|
2570
|
+
body: JSON.stringify(sanitizedBody),
|
|
2544
2571
|
duplex: "half",
|
|
2545
2572
|
});
|
|
2546
2573
|
}
|
|
@@ -2719,6 +2746,46 @@ async function mountBetterAuthRoutes(app, options) {
|
|
|
2719
2746
|
return { error: authError.message };
|
|
2720
2747
|
}
|
|
2721
2748
|
}));
|
|
2749
|
+
// Passwordless login via Better Auth's rate-limited magic-link plugin.
|
|
2750
|
+
app.use("/_agent-native/auth/magic-link", defineEventHandler(async (event) => {
|
|
2751
|
+
if (getMethod(event) !== "POST") {
|
|
2752
|
+
setResponseStatus(event, 405);
|
|
2753
|
+
return { error: "Method not allowed" };
|
|
2754
|
+
}
|
|
2755
|
+
const body = await readBody(event);
|
|
2756
|
+
const rawEmail = typeof body?.email === "string" ? body.email : "";
|
|
2757
|
+
const email = normalizeAuthEmail(rawEmail);
|
|
2758
|
+
const callbackURL = typeof body?.callbackURL === "string"
|
|
2759
|
+
? safeReturnPath(body.callbackURL)
|
|
2760
|
+
: "/";
|
|
2761
|
+
if (!email) {
|
|
2762
|
+
setResponseStatus(event, 400);
|
|
2763
|
+
return { error: VALID_AUTH_EMAIL_MESSAGE };
|
|
2764
|
+
}
|
|
2765
|
+
if (await isGoogleSignInRequiredForEmail(email)) {
|
|
2766
|
+
setResponseStatus(event, 403);
|
|
2767
|
+
return { error: GOOGLE_AUTH_REQUIRED_MESSAGE };
|
|
2768
|
+
}
|
|
2769
|
+
try {
|
|
2770
|
+
await auth.api.signInMagicLink({
|
|
2771
|
+
body: {
|
|
2772
|
+
email,
|
|
2773
|
+
callbackURL,
|
|
2774
|
+
newUserCallbackURL: `${getAppBasePath()}/_agent-native/auth/magic-link/new-user?return=${encodeURIComponent(callbackURL)}`,
|
|
2775
|
+
},
|
|
2776
|
+
headers: event.headers,
|
|
2777
|
+
});
|
|
2778
|
+
return { ok: true };
|
|
2779
|
+
}
|
|
2780
|
+
catch (e) {
|
|
2781
|
+
if (!isExpectedAuthFailure(e)) {
|
|
2782
|
+
captureAuthError(e, { route: "magic-link", email });
|
|
2783
|
+
}
|
|
2784
|
+
const authError = publicAuthError(e, "Unable to send sign-in link");
|
|
2785
|
+
setResponseStatus(event, authError.statusCode ?? 400);
|
|
2786
|
+
return { error: authError.message };
|
|
2787
|
+
}
|
|
2788
|
+
}));
|
|
2722
2789
|
// Backward-compat: POST /_agent-native/auth/register
|
|
2723
2790
|
app.use("/_agent-native/auth/register", defineEventHandler(async (event) => {
|
|
2724
2791
|
if (getMethod(event) !== "POST") {
|
|
@@ -2770,6 +2837,7 @@ async function mountBetterAuthRoutes(app, options) {
|
|
|
2770
2837
|
if (bearerToken)
|
|
2771
2838
|
await removeSession(bearerToken);
|
|
2772
2839
|
clearFrameworkSessionCookies(event);
|
|
2840
|
+
clearFirstRunOnboardingCookie(event);
|
|
2773
2841
|
optOutOfAuthDisabledSession(event);
|
|
2774
2842
|
try {
|
|
2775
2843
|
const result = await auth.api.signOut({
|
|
@@ -2838,6 +2906,7 @@ async function mountBetterAuthRoutes(app, options) {
|
|
|
2838
2906
|
// 3. Drop the current request's cookie and best-effort sign out
|
|
2839
2907
|
// of Better Auth (so the response sets the proper expiry header).
|
|
2840
2908
|
clearFrameworkSessionCookies(event);
|
|
2909
|
+
clearFirstRunOnboardingCookie(event);
|
|
2841
2910
|
optOutOfAuthDisabledSession(event);
|
|
2842
2911
|
try {
|
|
2843
2912
|
const result = await auth.api.signOut({
|
|
@@ -2879,9 +2948,23 @@ async function mountBetterAuthRoutes(app, options) {
|
|
|
2879
2948
|
headers: { "Content-Type": "text/html; charset=utf-8" },
|
|
2880
2949
|
});
|
|
2881
2950
|
}));
|
|
2951
|
+
// Better Auth redirects new magic-link users through this small public
|
|
2952
|
+
// callback so first-run onboarding is marked only for newly created users.
|
|
2953
|
+
app.use("/_agent-native/auth/magic-link/new-user", defineEventHandler(async (event) => {
|
|
2954
|
+
if (!isReadMethod(event)) {
|
|
2955
|
+
setResponseStatus(event, 405);
|
|
2956
|
+
return { error: "Method not allowed" };
|
|
2957
|
+
}
|
|
2958
|
+
const query = getQuery(event);
|
|
2959
|
+
const rawReturn = Array.isArray(query.return)
|
|
2960
|
+
? query.return[0]
|
|
2961
|
+
: query.return;
|
|
2962
|
+
setFirstRunOnboardingCookie(event);
|
|
2963
|
+
return redirectWithStagedCookies(event, safeReturnPath(rawReturn), 302);
|
|
2964
|
+
}));
|
|
2882
2965
|
// Auth guard — stored both in framework middleware registry AND in
|
|
2883
2966
|
// _authGuardFn so the server middleware can enforce it on ALL routes.
|
|
2884
|
-
const loginHtmlConfig = getOnboardingLoginHtmlConfig(options);
|
|
2967
|
+
const loginHtmlConfig = getOnboardingLoginHtmlConfig(options, authLoginMode);
|
|
2885
2968
|
_authGuardConfig = {
|
|
2886
2969
|
...loginHtmlConfig,
|
|
2887
2970
|
publicPaths,
|
|
@@ -2996,6 +3079,7 @@ function mountAuthFallbackRoutes(app) {
|
|
|
2996
3079
|
if (bearerToken)
|
|
2997
3080
|
await removeSession(bearerToken);
|
|
2998
3081
|
clearFrameworkSessionCookies(event);
|
|
3082
|
+
clearFirstRunOnboardingCookie(event);
|
|
2999
3083
|
optOutOfAuthDisabledSession(event);
|
|
3000
3084
|
try {
|
|
3001
3085
|
const auth = await getBetterAuth();
|
|
@@ -3064,7 +3148,7 @@ export async function autoMountAuth(app, options = {}) {
|
|
|
3064
3148
|
options.loginHtml ||
|
|
3065
3149
|
options.marketing ||
|
|
3066
3150
|
options.googleSignInNotice) {
|
|
3067
|
-
const loginHtmlConfig = getOnboardingLoginHtmlConfig(options);
|
|
3151
|
+
const loginHtmlConfig = getOnboardingLoginHtmlConfig(options, _authGuardConfig.authMode);
|
|
3068
3152
|
_authGuardConfig.loginHtml = loginHtmlConfig.loginHtml;
|
|
3069
3153
|
_authGuardConfig.getLoginHtml = loginHtmlConfig.getLoginHtml;
|
|
3070
3154
|
}
|
|
@@ -3130,6 +3214,7 @@ export async function autoMountAuth(app, options = {}) {
|
|
|
3130
3214
|
if (bearerToken)
|
|
3131
3215
|
await removeSession(bearerToken);
|
|
3132
3216
|
clearFrameworkSessionCookies(event);
|
|
3217
|
+
clearFirstRunOnboardingCookie(event);
|
|
3133
3218
|
optOutOfAuthDisabledSession(event);
|
|
3134
3219
|
if (isElectronRequest(event))
|
|
3135
3220
|
await clearDesktopSso();
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* implementation detail behind those interfaces.
|
|
7
7
|
*/
|
|
8
8
|
import { type BetterAuthOptions } from "better-auth";
|
|
9
|
+
export { getAuthLoginMode, resolveAuthLoginMode, resolveAuthLoginModeFromReadiness, type AuthLoginMode, } from "./auth-login-mode.js";
|
|
9
10
|
export declare function hasBetterAuthUserEmail(email: string): Promise<boolean>;
|
|
10
11
|
export declare function trackSignupEvent({ authProvider, authUserId, email, name, attribution, anonymousId, }: {
|
|
11
12
|
authProvider: string;
|
|
@@ -64,6 +65,41 @@ export interface BetterAuthInstance {
|
|
|
64
65
|
token?: string;
|
|
65
66
|
user?: any;
|
|
66
67
|
} | null>;
|
|
68
|
+
signInMagicLink: (opts: {
|
|
69
|
+
body: {
|
|
70
|
+
email: string;
|
|
71
|
+
name?: string;
|
|
72
|
+
callbackURL?: string;
|
|
73
|
+
newUserCallbackURL?: string;
|
|
74
|
+
errorCallbackURL?: string;
|
|
75
|
+
metadata?: Record<string, unknown>;
|
|
76
|
+
};
|
|
77
|
+
headers: Headers;
|
|
78
|
+
}) => Promise<{
|
|
79
|
+
status: boolean;
|
|
80
|
+
}>;
|
|
81
|
+
listUserAccounts: (opts: {
|
|
82
|
+
headers: Headers;
|
|
83
|
+
}) => Promise<Array<{
|
|
84
|
+
providerId: string;
|
|
85
|
+
}>>;
|
|
86
|
+
setPassword: (opts: {
|
|
87
|
+
body: {
|
|
88
|
+
newPassword: string;
|
|
89
|
+
};
|
|
90
|
+
headers: Headers;
|
|
91
|
+
}) => Promise<{
|
|
92
|
+
status: boolean;
|
|
93
|
+
}>;
|
|
94
|
+
changePassword: (opts: {
|
|
95
|
+
body: {
|
|
96
|
+
currentPassword: string;
|
|
97
|
+
newPassword: string;
|
|
98
|
+
};
|
|
99
|
+
headers: Headers;
|
|
100
|
+
}) => Promise<{
|
|
101
|
+
status: boolean;
|
|
102
|
+
}>;
|
|
67
103
|
signUpEmail: (opts: {
|
|
68
104
|
body: {
|
|
69
105
|
email: string;
|
|
@@ -11,6 +11,7 @@ import path from "node:path";
|
|
|
11
11
|
import { betterAuth } from "better-auth";
|
|
12
12
|
import { bearer } from "better-auth/plugins/bearer";
|
|
13
13
|
import { jwt } from "better-auth/plugins/jwt";
|
|
14
|
+
import { magicLink } from "better-auth/plugins/magic-link";
|
|
14
15
|
import { pgTable, text as pgText, timestamp as pgTimestamp, boolean as pgBoolean, } from "drizzle-orm/pg-core";
|
|
15
16
|
import { sqliteTable, text as sqliteText, integer as sqliteInteger, } from "drizzle-orm/sqlite-core";
|
|
16
17
|
import { TEMPLATES } from "../cli/templates-meta.js";
|
|
@@ -26,9 +27,10 @@ import { getAppProductionUrl } from "./app-url.js";
|
|
|
26
27
|
import { readAnalyticsAnonymousId, signupAttributionFromCookieHeader, } from "./attribution.js";
|
|
27
28
|
import { resolveAuthCookieNamespace } from "./cookie-namespace.js";
|
|
28
29
|
import { getWorkspaceA2ADerivedSecret } from "./derived-secret.js";
|
|
29
|
-
import { renderResetPasswordEmail, renderVerifySignupEmail, } from "./email-templates.js";
|
|
30
|
-
import {
|
|
30
|
+
import { renderMagicLinkEmail, renderResetPasswordEmail, renderVerifySignupEmail, } from "./email-templates.js";
|
|
31
|
+
import { getEmailReadiness, sendEmail } from "./email.js";
|
|
31
32
|
import { resolveGoogleSignInCredentials } from "./google-oauth-credentials.js";
|
|
33
|
+
export { getAuthLoginMode, resolveAuthLoginMode, resolveAuthLoginModeFromReadiness, } from "./auth-login-mode.js";
|
|
32
34
|
async function flushSignupTracking() {
|
|
33
35
|
try {
|
|
34
36
|
await Promise.race([
|
|
@@ -889,7 +891,8 @@ async function createBetterAuthInstance(config) {
|
|
|
889
891
|
const secret = resolveAuthSecret();
|
|
890
892
|
const appUrl = getAppProductionUrl();
|
|
891
893
|
const cookieNamespace = resolveAuthCookieNamespace();
|
|
892
|
-
const
|
|
894
|
+
const emailReadiness = await getEmailReadiness();
|
|
895
|
+
const { requireEmailVerification, disableSignUp } = resolveEmailPasswordAuthPolicy(emailReadiness.status === "ready");
|
|
893
896
|
const shouldMirrorGoogleAccountTokens = (config?.googleScopes?.length ?? 0) > 0;
|
|
894
897
|
const auth = betterAuth({
|
|
895
898
|
basePath,
|
|
@@ -1111,6 +1114,25 @@ async function createBetterAuthInstance(config) {
|
|
|
1111
1114
|
: {}),
|
|
1112
1115
|
},
|
|
1113
1116
|
plugins: [
|
|
1117
|
+
magicLink({
|
|
1118
|
+
expiresIn: 60 * 5,
|
|
1119
|
+
storeToken: "hashed",
|
|
1120
|
+
rateLimit: { window: 60, max: 5 },
|
|
1121
|
+
disableSignUp,
|
|
1122
|
+
sendMagicLink: async ({ email, url }) => {
|
|
1123
|
+
const appBasePath = (process.env.VITE_APP_BASE_PATH ||
|
|
1124
|
+
process.env.APP_BASE_PATH ||
|
|
1125
|
+
"").replace(/\/$/, "");
|
|
1126
|
+
const magicLinkUrl = appBasePath
|
|
1127
|
+
? url.replace(/(\/\/[^/]+)(\/)/, `$1${appBasePath}$2`)
|
|
1128
|
+
: url;
|
|
1129
|
+
const { subject, html, text, appSender } = renderMagicLinkEmail({
|
|
1130
|
+
email,
|
|
1131
|
+
magicLinkUrl,
|
|
1132
|
+
});
|
|
1133
|
+
await sendEmail({ to: email, subject, html, text, appSender });
|
|
1134
|
+
},
|
|
1135
|
+
}),
|
|
1114
1136
|
// JWT: issue tokens for A2A calls, JWKS endpoint for verification
|
|
1115
1137
|
jwt({
|
|
1116
1138
|
jwt: {
|
|
@@ -112,7 +112,7 @@ async function resolveBuilderDesignSystemCredentials() {
|
|
|
112
112
|
if (!credentials.privateKey || !credentials.publicKey) {
|
|
113
113
|
throw new FeatureNotConfiguredError({
|
|
114
114
|
requiredCredential: "BUILDER_PRIVATE_KEY",
|
|
115
|
-
message: "Connect Builder.io before indexing a design system from Figma or code.",
|
|
115
|
+
message: "Connect Builder.io (free tier available) before indexing a design system from Figma or code.",
|
|
116
116
|
builderConnectUrl: "/_agent-native/builder/connect",
|
|
117
117
|
});
|
|
118
118
|
}
|
|
@@ -856,6 +856,21 @@ export function createCoreRoutesPlugin(options = {}) {
|
|
|
856
856
|
paths: [FRAMEWORK_ROUTE_PREFIX, "/mcp", "/.well-known"],
|
|
857
857
|
});
|
|
858
858
|
try {
|
|
859
|
+
const P = FRAMEWORK_ROUTE_PREFIX;
|
|
860
|
+
// This response is a side-effect-free static contract used by the SSR
|
|
861
|
+
// shell. Mount it before optional default-plugin/bootstrap work so a
|
|
862
|
+
// browser's automatic rules fetch cannot inherit the cold-start wait.
|
|
863
|
+
getH3App(nitroApp).use(`${P}/speculation-rules.json`, defineEventHandler((event) => {
|
|
864
|
+
// `createH3SSRHandler` points the Speculation-Rules response header
|
|
865
|
+
// here to prevent Cloudflare Speed Brain from injecting its own
|
|
866
|
+
// edge prefetch rules. Keep this route public and side-effect free:
|
|
867
|
+
// browsers may request it while parsing any SSR HTML document.
|
|
868
|
+
setResponseHeader(event, "content-type", "application/speculationrules+json; charset=utf-8");
|
|
869
|
+
for (const [name, value] of Object.entries(resolveSsrCacheHeaders())) {
|
|
870
|
+
setResponseHeader(event, name, value);
|
|
871
|
+
}
|
|
872
|
+
return EMPTY_SPECULATION_RULES;
|
|
873
|
+
}));
|
|
859
874
|
await awaitBootstrap(nitroApp);
|
|
860
875
|
const { persistedEnvVars, builderDisconnected } = await readLegacyCoreRouteInitSettings();
|
|
861
876
|
// Legacy cleanup: key saves now go to scoped app_secrets rows. Do not
|
|
@@ -959,7 +974,6 @@ export function createCoreRoutesPlugin(options = {}) {
|
|
|
959
974
|
catch {
|
|
960
975
|
// Audit module not available — skip
|
|
961
976
|
}
|
|
962
|
-
const P = FRAMEWORK_ROUTE_PREFIX;
|
|
963
977
|
for (const provider of [
|
|
964
978
|
"figma",
|
|
965
979
|
"google_drive",
|
|
@@ -1281,17 +1295,6 @@ export function createCoreRoutesPlugin(options = {}) {
|
|
|
1281
1295
|
schema,
|
|
1282
1296
|
};
|
|
1283
1297
|
}));
|
|
1284
|
-
getH3App(nitroApp).use(`${P}/speculation-rules.json`, defineEventHandler((event) => {
|
|
1285
|
-
// `createH3SSRHandler` points the Speculation-Rules response header
|
|
1286
|
-
// here to prevent Cloudflare Speed Brain from injecting its own
|
|
1287
|
-
// edge prefetch rules. Keep this route public and side-effect free:
|
|
1288
|
-
// browsers may request it while parsing any SSR HTML document.
|
|
1289
|
-
setResponseHeader(event, "content-type", "application/speculationrules+json; charset=utf-8");
|
|
1290
|
-
for (const [name, value] of Object.entries(resolveSsrCacheHeaders())) {
|
|
1291
|
-
setResponseHeader(event, name, value);
|
|
1292
|
-
}
|
|
1293
|
-
return EMPTY_SPECULATION_RULES;
|
|
1294
|
-
}));
|
|
1295
1298
|
{
|
|
1296
1299
|
const { createAgentNativeOgImageHandler } = await import("./social-og-image.js");
|
|
1297
1300
|
getH3App(nitroApp).use(`${P}/og-image.png`, createAgentNativeOgImageHandler());
|
|
@@ -2339,7 +2342,7 @@ export function createCoreRoutesPlugin(options = {}) {
|
|
|
2339
2342
|
if (!creds.privateKey || !creds.publicKey) {
|
|
2340
2343
|
setResponseStatus(event, 400);
|
|
2341
2344
|
return {
|
|
2342
|
-
error: "Builder not connected. Connect Builder in Setup to use background agent.",
|
|
2345
|
+
error: "Builder not connected. Connect Builder (free tier available) in Setup to use background agent.",
|
|
2343
2346
|
};
|
|
2344
2347
|
}
|
|
2345
2348
|
const body = (await readBody(event));
|
|
@@ -2743,7 +2746,7 @@ export function createCoreRoutesPlugin(options = {}) {
|
|
|
2743
2746
|
}
|
|
2744
2747
|
setResponseStatus(event, 503);
|
|
2745
2748
|
return {
|
|
2746
|
-
error: "No file upload provider configured. Connect Builder.io in Settings → File uploads, or register a provider.",
|
|
2749
|
+
error: "No file upload provider configured. Connect Builder.io (free tier available) in Settings → File uploads, or register a provider.",
|
|
2747
2750
|
};
|
|
2748
2751
|
}));
|
|
2749
2752
|
// ─── Voice transcription (Whisper) ───────────────────────────────
|
|
@@ -42,7 +42,7 @@ export class FeatureNotConfiguredError extends Error {
|
|
|
42
42
|
byokDocsUrl;
|
|
43
43
|
constructor(opts) {
|
|
44
44
|
super(opts.message ??
|
|
45
|
-
`Feature requires credential "${opts.requiredCredential}". Connect Builder or set your own key.`);
|
|
45
|
+
`Feature requires credential "${opts.requiredCredential}". Connect Builder (free tier available) or set your own key.`);
|
|
46
46
|
this.name = "FeatureNotConfiguredError";
|
|
47
47
|
this.requiredCredential = opts.requiredCredential;
|
|
48
48
|
this.builderConnectUrl = opts.builderConnectUrl;
|
|
@@ -692,7 +692,7 @@ export async function getBuilderCredentialAuthFailure(creds = {}) {
|
|
|
692
692
|
fingerprint,
|
|
693
693
|
message: typeof row.message === "string" && row.message
|
|
694
694
|
? row.message
|
|
695
|
-
: "Builder rejected the connected credentials. Reconnect Builder.io.",
|
|
695
|
+
: "Builder rejected the connected credentials. Reconnect Builder.io (free tier available).",
|
|
696
696
|
status: typeof row.status === "number" ? row.status : undefined,
|
|
697
697
|
code: typeof row.code === "string" ? row.code : undefined,
|
|
698
698
|
at,
|
|
@@ -714,7 +714,7 @@ export async function recordBuilderCredentialAuthFailure(details) {
|
|
|
714
714
|
await putSetting(builderAuthFailureSettingKey(fingerprint), {
|
|
715
715
|
fingerprint,
|
|
716
716
|
message: details?.message ||
|
|
717
|
-
"Builder rejected the connected credentials. Reconnect Builder.io.",
|
|
717
|
+
"Builder rejected the connected credentials. Reconnect Builder.io (free tier available).",
|
|
718
718
|
...(typeof details?.status === "number" && { status: details.status }),
|
|
719
719
|
...(details?.code && { code: details.code }),
|
|
720
720
|
at: Date.now(),
|