@agent-native/core 0.137.8 → 0.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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/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/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/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/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 +2 -2
- package/dist/collab/struct-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/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 +3 -3
- 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/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/agent-engine-api-key-route.d.ts +1 -1
- 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
package/dist/config.js
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public, non-secret configuration for an Agent-Native app.
|
|
3
|
+
*
|
|
4
|
+
* This module is intentionally free of Node and framework imports so it can be
|
|
5
|
+
* used from a typed `agent-native.config.ts` file and from browser code after
|
|
6
|
+
* Vite serializes the resolved config into the client bundle.
|
|
7
|
+
*/
|
|
8
|
+
export const AGENT_NATIVE_CONFIG_VERSION = 1;
|
|
9
|
+
/**
|
|
10
|
+
* Type-safe authoring helper for `agent-native.config.ts`.
|
|
11
|
+
*
|
|
12
|
+
* Like Next's typed config file, this is deliberately identity-like: the
|
|
13
|
+
* framework evaluates the exported object or factory in the Vite config
|
|
14
|
+
* phase, while the browser only receives the resolved serializable result.
|
|
15
|
+
*/
|
|
16
|
+
export function defineAgentNativeConfig(config) {
|
|
17
|
+
return config;
|
|
18
|
+
}
|
|
19
|
+
export function normalizeAgentNativeConfig(input, source = "agent-native config") {
|
|
20
|
+
if (!isRecord(input)) {
|
|
21
|
+
throw new Error(`${source} must export an object`);
|
|
22
|
+
}
|
|
23
|
+
if (input.version !== undefined &&
|
|
24
|
+
input.version !== AGENT_NATIVE_CONFIG_VERSION) {
|
|
25
|
+
throw new Error(`${source}.version must be ${AGENT_NATIVE_CONFIG_VERSION} when provided`);
|
|
26
|
+
}
|
|
27
|
+
const onboardingValue = input.onboarding;
|
|
28
|
+
if (onboardingValue === undefined) {
|
|
29
|
+
return input.version === undefined
|
|
30
|
+
? {}
|
|
31
|
+
: { version: AGENT_NATIVE_CONFIG_VERSION };
|
|
32
|
+
}
|
|
33
|
+
if (!isRecord(onboardingValue)) {
|
|
34
|
+
throw new Error(`${source}.onboarding must be an object`);
|
|
35
|
+
}
|
|
36
|
+
const firstRun = normalizeFirstRunSetting(onboardingValue.firstRun, `${source}.onboarding.firstRun`);
|
|
37
|
+
return {
|
|
38
|
+
...(input.version === undefined
|
|
39
|
+
? {}
|
|
40
|
+
: { version: AGENT_NATIVE_CONFIG_VERSION }),
|
|
41
|
+
onboarding: firstRun === undefined ? {} : { firstRun },
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export function mergeAgentNativeConfigs(base, override) {
|
|
45
|
+
return {
|
|
46
|
+
...(base.version === undefined && override.version === undefined
|
|
47
|
+
? {}
|
|
48
|
+
: {
|
|
49
|
+
version: override.version ?? base.version ?? AGENT_NATIVE_CONFIG_VERSION,
|
|
50
|
+
}),
|
|
51
|
+
onboarding: base.onboarding || override.onboarding
|
|
52
|
+
? {
|
|
53
|
+
...base.onboarding,
|
|
54
|
+
...override.onboarding,
|
|
55
|
+
}
|
|
56
|
+
: undefined,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export function resolveAgentNativeConfig(input, context) {
|
|
60
|
+
const value = typeof input === "function" ? input(context) : (input ?? {});
|
|
61
|
+
const normalized = normalizeAgentNativeConfig(value);
|
|
62
|
+
const firstRun = normalized.onboarding?.firstRun;
|
|
63
|
+
if (firstRun === undefined)
|
|
64
|
+
return normalized;
|
|
65
|
+
return {
|
|
66
|
+
...normalized,
|
|
67
|
+
onboarding: {
|
|
68
|
+
...normalized.onboarding,
|
|
69
|
+
firstRun: resolveFirstRunOnboardingMode(firstRun, context),
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
export function resolveFirstRunOnboardingMode(setting, context) {
|
|
74
|
+
if (typeof setting === "string")
|
|
75
|
+
return setting;
|
|
76
|
+
const modeValue = setting[context.mode];
|
|
77
|
+
if (modeValue !== undefined)
|
|
78
|
+
return modeValue;
|
|
79
|
+
const environmentValue = setting[context.command === "serve" ? "development" : "production"];
|
|
80
|
+
return environmentValue ?? setting.default ?? "off";
|
|
81
|
+
}
|
|
82
|
+
function normalizeFirstRunSetting(value, source) {
|
|
83
|
+
if (value === undefined)
|
|
84
|
+
return undefined;
|
|
85
|
+
if (typeof value === "string") {
|
|
86
|
+
if (!isFirstRunMode(value)) {
|
|
87
|
+
throw new Error(`${source} must be "off", "connect", or "connect-and-integrations"`);
|
|
88
|
+
}
|
|
89
|
+
return value;
|
|
90
|
+
}
|
|
91
|
+
if (!isRecord(value)) {
|
|
92
|
+
throw new Error(`${source} must be a mode string or a mode map`);
|
|
93
|
+
}
|
|
94
|
+
const result = {};
|
|
95
|
+
for (const [key, mode] of Object.entries(value)) {
|
|
96
|
+
if (!isFirstRunMode(mode)) {
|
|
97
|
+
throw new Error(`${source}.${key} must be "off", "connect", or "connect-and-integrations"`);
|
|
98
|
+
}
|
|
99
|
+
result[key] = mode;
|
|
100
|
+
}
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
function isFirstRunMode(value) {
|
|
104
|
+
return (value === "off" ||
|
|
105
|
+
value === "connect" ||
|
|
106
|
+
value === "connect-and-integrations");
|
|
107
|
+
}
|
|
108
|
+
function isRecord(value) {
|
|
109
|
+
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=config.js.map
|
package/dist/db/migrations.js
CHANGED
|
@@ -240,6 +240,11 @@ export function runMigrations(migrations, options) {
|
|
|
240
240
|
seenNames.add(m.name);
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
+
// A plugin with no migrations is intentionally a no-op. Creating or reading
|
|
244
|
+
// a bookkeeping table here turns an empty app plugin into a database cold
|
|
245
|
+
// start on every serverless boot.
|
|
246
|
+
if (migrations.length === 0)
|
|
247
|
+
return async () => { };
|
|
243
248
|
const namedTable = `${table}_named`;
|
|
244
249
|
return async () => {
|
|
245
250
|
try {
|
|
@@ -6,7 +6,7 @@ export declare function mergeProviderApiConfigs(overrides?: readonly ProviderApi
|
|
|
6
6
|
export declare function getProviderApiConfig(providerId: ProviderApiId | string, overrides?: readonly ProviderApiConfig[]): ProviderApiConfig;
|
|
7
7
|
export declare function listProviderApiIdsForTemplateUse(templateUse: WorkspaceConnectionTemplateUse, overrides?: readonly ProviderApiConfig[]): ProviderApiId[];
|
|
8
8
|
export declare function listProviderApiCatalog(providerId?: ProviderApiId | string, options?: Parameters<typeof listRuntimeProviderApiCatalog>[1]): {
|
|
9
|
-
id: "amplitude" | "apollo" | "bigquery" | "clay" | "commonroom" | "dataforseo" | "figma" | "ga4" | "gcloud" | "github" | "gmail" | "gong" | "google_calendar" | "google_drive" | "google_slides" | "grafana" | "granola" | "hubspot" | "jira" | "mixpanel" | "notion" | "posthog" | "prometheus" | "pylon" | "salesforce" | "sentry" | "slack" | "stripe" | "twitter";
|
|
9
|
+
id: "amplitude" | "apollo" | "bigquery" | "clay" | "commonroom" | "dataforseo" | "figma" | "fullstory" | "ga4" | "gcloud" | "github" | "gmail" | "gong" | "google_calendar" | "google_drive" | "google_slides" | "grafana" | "granola" | "hubspot" | "jira" | "mixpanel" | "notion" | "posthog" | "prometheus" | "pylon" | "salesforce" | "sentry" | "slack" | "stripe" | "twitter";
|
|
10
10
|
label: string;
|
|
11
11
|
defaultBaseUrl: string;
|
|
12
12
|
requiresConnectionId: boolean;
|
|
@@ -209,7 +209,7 @@ export function createWebSearchToolEntry(opts = {}) {
|
|
|
209
209
|
return {
|
|
210
210
|
"web-search": {
|
|
211
211
|
tool: {
|
|
212
|
-
description: "Search the public web. Use to find API documentation, endpoints, current information, or any topic. Returns ranked results from BYOK providers or a grounded Builder-managed summary. Follow up with web-request or provider-api-docs using responseMode:'markdown' or responseMode:'matches' to fetch clean text, links, or compact snippets from promising URLs. Requires either Connect Builder.io or one of: BRAVE_SEARCH_API_KEY, TAVILY_API_KEY, EXA_API_KEY, or FIRECRAWL_API_KEY.",
|
|
212
|
+
description: "Search the public web. Use to find API documentation, endpoints, current information, or any topic. Returns ranked results from BYOK providers or a grounded Builder-managed summary. Follow up with web-request or provider-api-docs using responseMode:'markdown' or responseMode:'matches' to fetch clean text, links, or compact snippets from promising URLs. Requires either Connect Builder.io (free tier available) or one of: BRAVE_SEARCH_API_KEY, TAVILY_API_KEY, EXA_API_KEY, or FIRECRAWL_API_KEY.",
|
|
213
213
|
parameters: {
|
|
214
214
|
type: "object",
|
|
215
215
|
properties: {
|
|
@@ -267,7 +267,7 @@ export function createWebSearchToolEntry(opts = {}) {
|
|
|
267
267
|
else {
|
|
268
268
|
return [
|
|
269
269
|
"No web-search backend configured.",
|
|
270
|
-
"Connect Builder.io in Settings, or add one of the following keys via app settings or environment variables:",
|
|
270
|
+
"Connect Builder.io (free tier available) in Settings, or add one of the following keys via app settings or environment variables:",
|
|
271
271
|
" • BRAVE_SEARCH_API_KEY — https://brave.com/search/api/",
|
|
272
272
|
" • TAVILY_API_KEY — https://tavily.com/",
|
|
273
273
|
" • EXA_API_KEY — https://exa.ai/",
|
|
@@ -117,7 +117,7 @@ async function fetchRemote(url) {
|
|
|
117
117
|
function uploadNotConfiguredError() {
|
|
118
118
|
return [
|
|
119
119
|
"Image uploads are not configured for this app.",
|
|
120
|
-
"Connect or reconnect Builder.io in Settings → File uploads, or register a custom provider (S3, R2, GCS, etc.) via registerFileUploadProvider().",
|
|
120
|
+
"Connect or reconnect Builder.io (free tier available) in Settings → File uploads, or register a custom provider (S3, R2, GCS, etc.) via registerFileUploadProvider().",
|
|
121
121
|
].join(" ");
|
|
122
122
|
}
|
|
123
123
|
export default defineAction({
|
|
@@ -96,7 +96,7 @@ export async function uploadFile(input) {
|
|
|
96
96
|
if (!warnedFallbackRef.value) {
|
|
97
97
|
warnedFallbackRef.value = true;
|
|
98
98
|
console.warn("[agent-native] No file upload provider configured. " +
|
|
99
|
-
"Connect or reconnect Builder.io in Settings → File uploads, " +
|
|
99
|
+
"Connect or reconnect Builder.io (free tier available) in Settings → File uploads, " +
|
|
100
100
|
"or register a custom provider (S3, R2, GCS, …) via registerFileUploadProvider().");
|
|
101
101
|
}
|
|
102
102
|
return null;
|
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
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Refuse empty `runMigrations([])` plugins. The migration runner itself is
|
|
3
|
+
* safe for an empty list, but an empty plugin usually means a serverless boot
|
|
4
|
+
* is still paying for a database migration check that has no work to do.
|
|
5
|
+
*/
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
import { lineColForOffset, readFileSafe, relPosix, walk, } from "./scan-utils.js";
|
|
8
|
+
const EMPTY_MIGRATIONS_RE = /\brunMigrations\s*\(\s*\[\s*\]/g;
|
|
9
|
+
const ALLOW_MARKER_RE = /guard:allow-empty-migrations\s*[—-]\s*\S/;
|
|
10
|
+
const SOURCE_EXTENSIONS = /\.(?:ts|tsx|mts|cts|js|jsx|mjs|cjs)$/i;
|
|
11
|
+
const TEST_FILE = /\.(?:spec|test)\.(?:ts|tsx|mts|cts|js|jsx|mjs|cjs)$/i;
|
|
12
|
+
/** Mask comments and string literals while preserving offsets and newlines. */
|
|
13
|
+
function maskNonCode(source) {
|
|
14
|
+
const output = source.split("");
|
|
15
|
+
let state = "code";
|
|
16
|
+
let escaped = false;
|
|
17
|
+
for (let index = 0; index < source.length; index += 1) {
|
|
18
|
+
const char = source[index] ?? "";
|
|
19
|
+
const next = source[index + 1] ?? "";
|
|
20
|
+
if (state === "code") {
|
|
21
|
+
if (char === "/" && next === "/") {
|
|
22
|
+
output[index] = output[index + 1] = " ";
|
|
23
|
+
state = "line";
|
|
24
|
+
index += 1;
|
|
25
|
+
}
|
|
26
|
+
else if (char === "/" && next === "*") {
|
|
27
|
+
output[index] = output[index + 1] = " ";
|
|
28
|
+
state = "block";
|
|
29
|
+
index += 1;
|
|
30
|
+
}
|
|
31
|
+
else if (char === "'") {
|
|
32
|
+
output[index] = " ";
|
|
33
|
+
state = "single";
|
|
34
|
+
}
|
|
35
|
+
else if (char === '"') {
|
|
36
|
+
output[index] = " ";
|
|
37
|
+
state = "double";
|
|
38
|
+
}
|
|
39
|
+
else if (char === "`") {
|
|
40
|
+
output[index] = " ";
|
|
41
|
+
state = "template";
|
|
42
|
+
}
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (char !== "\n" && char !== "\r")
|
|
46
|
+
output[index] = " ";
|
|
47
|
+
if (state === "line") {
|
|
48
|
+
if (char === "\n")
|
|
49
|
+
state = "code";
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
if (state === "block") {
|
|
53
|
+
if (char === "*" && next === "/") {
|
|
54
|
+
output[index + 1] = " ";
|
|
55
|
+
state = "code";
|
|
56
|
+
index += 1;
|
|
57
|
+
}
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
if (escaped) {
|
|
61
|
+
escaped = false;
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
if (char === "\\") {
|
|
65
|
+
escaped = true;
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
if ((state === "single" && char === "'") ||
|
|
69
|
+
(state === "double" && char === '"') ||
|
|
70
|
+
(state === "template" && char === "`")) {
|
|
71
|
+
state = "code";
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return output.join("");
|
|
75
|
+
}
|
|
76
|
+
function hasAdjacentAllow(source, line) {
|
|
77
|
+
const lines = source.split(/\r?\n/);
|
|
78
|
+
const current = line - 1;
|
|
79
|
+
for (let index = current; index >= Math.max(0, current - 2); index -= 1) {
|
|
80
|
+
const text = lines[index] ?? "";
|
|
81
|
+
if (ALLOW_MARKER_RE.test(text))
|
|
82
|
+
return true;
|
|
83
|
+
if (index < current && text.trim() && !/^\s*(?:\/\/|\/\*|\*)/.test(text)) {
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
export function analyzeEmptyMigrationsSource({ file, source, }) {
|
|
90
|
+
const findings = [];
|
|
91
|
+
const code = maskNonCode(source);
|
|
92
|
+
for (const match of code.matchAll(EMPTY_MIGRATIONS_RE)) {
|
|
93
|
+
const line = lineColForOffset(source, match.index ?? 0).line;
|
|
94
|
+
if (hasAdjacentAllow(source, line))
|
|
95
|
+
continue;
|
|
96
|
+
findings.push({
|
|
97
|
+
file,
|
|
98
|
+
line,
|
|
99
|
+
message: "empty runMigrations list performs needless migration startup work; remove the call or provide real migrations",
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
return findings;
|
|
103
|
+
}
|
|
104
|
+
export function shouldScanEmptyMigrationsFile(relativeFile) {
|
|
105
|
+
const normalized = relativeFile.split(path.sep).join("/");
|
|
106
|
+
if (!SOURCE_EXTENSIONS.test(normalized) || TEST_FILE.test(normalized)) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
return !normalized
|
|
110
|
+
.split("/")
|
|
111
|
+
.some((segment) => segment === "node_modules" || segment === "vendor");
|
|
112
|
+
}
|
|
113
|
+
export function scanEmptyMigrations({ root }) {
|
|
114
|
+
const findings = [];
|
|
115
|
+
for (const file of walk(root)) {
|
|
116
|
+
const relativeFile = relPosix(root, file);
|
|
117
|
+
if (!shouldScanEmptyMigrationsFile(relativeFile))
|
|
118
|
+
continue;
|
|
119
|
+
const source = readFileSafe(file);
|
|
120
|
+
if (source === null)
|
|
121
|
+
continue;
|
|
122
|
+
findings.push(...analyzeEmptyMigrationsSource({ file: relativeFile, source }));
|
|
123
|
+
}
|
|
124
|
+
return { name: "no-empty-migrations", findings };
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=no-empty-migrations.js.map
|
package/dist/index.browser.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./config.js";
|
|
1
2
|
export { addContextToAgentChat, appendAgentChatContextToMessage, clearAgentChatContext, formatAgentChatContextItemsForPrompt, listAgentChatContext, refreshAgentChatContext, removeAgentChatContextItem, sendToAgentChat, sendToAgentChatAndConfirm, setAgentChatContextItem, setContextToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatContext, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, sendMcpAppHostMessage, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, AgentNativeI18nProvider, LanguagePicker, getLocaleInitScript, localeDirection, normalizeLocaleCode, normalizeLocalePreference, normalizeLocalizationPreference, resolveLocaleFromCandidates, resolveLocaleFromPreference, useFormatters, useLocale, useT, DEFAULT_LOCALE, LOCALE_HYDRATION_GLOBAL, LOCALE_METADATA, LOCALE_STORAGE_KEY, SUPPORTED_LOCALES, useDbSync, useFileWatcher, useSession, cn, ApiKeySettings, type AgentChatContextItem, type AgentChatContextMessage, type AgentChatContextMutationOptions, type AgentChatContextRemoveOptions, type AgentChatContextSetOptions, type AgentChatContextState, type AgentChatMessage, type AgentNativeMcpAppHostMessageType, type McpAppDisplayMode, type McpAppHostChatMessage, type McpAppHostCapabilities, type McpAppHostContext, type McpAppHostContextSnapshot, type McpAppModelContextContentPart, type McpAppModelContextUpdate, type CodeRequiredDialogProps, type AuthSession, type UseAgentChatContextResult, type AgentNativeI18nCatalog, type AgentNativeI18nProviderProps, type LocaleCode, type LocaleHydrationPayload, type LocaleMessages, type LocaleMetadata, type LocalePreference, type LocalizationPreference, } from "./client/index.js";
|
|
2
3
|
export { agentChat } from "./shared/index.js";
|
|
3
4
|
export { parseArgs, camelCaseArgs } from "./scripts/parse-args.js";
|
package/dist/index.browser.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
// Browser-safe entry — only client & shared exports (no Node/Express/chokidar).
|
|
2
|
+
// Public app configuration is serializable and safe to expose to browser
|
|
3
|
+
// consumers alongside the resolved config injected by the Vite preset.
|
|
4
|
+
export * from "./config.js";
|
|
2
5
|
// Client
|
|
3
6
|
export { addContextToAgentChat, appendAgentChatContextToMessage, clearAgentChatContext, formatAgentChatContextItemsForPrompt, listAgentChatContext, refreshAgentChatContext, removeAgentChatContextItem, sendToAgentChat, sendToAgentChatAndConfirm, setAgentChatContextItem, setContextToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatContext, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, sendMcpAppHostMessage, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, AgentNativeI18nProvider, LanguagePicker, getLocaleInitScript, localeDirection, normalizeLocaleCode, normalizeLocalePreference, normalizeLocalizationPreference, resolveLocaleFromCandidates, resolveLocaleFromPreference, useFormatters, useLocale, useT, DEFAULT_LOCALE, LOCALE_HYDRATION_GLOBAL, LOCALE_METADATA, LOCALE_STORAGE_KEY, SUPPORTED_LOCALES, useDbSync, useFileWatcher, useSession, cn, ApiKeySettings, } from "./client/index.js";
|
|
4
7
|
// Shared (isomorphic)
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from "./config.js";
|
|
1
2
|
export { createProductionAgentHandler, type ActionEntry, type ScriptEntry, type ProductionAgentOptions, type ActionTool, type ScriptTool, type AgentMessage, type AgentChatRequest, type AgentChatEvent, type AgentChatAttachment, DEFAULT_MODEL, TripWire, type Processor, type ProcessorState, type ProcessorAbort, } from "./agent/index.js";
|
|
2
3
|
export { defineAction, AgentActionStopError, isAgentActionStopError, type ActionDefinition, type ActionHttpConfig, type AgentActionStopOptions, type PublicAgentActionConfig, type ActionDeepLink, type ActionLinkBuilder, MCP_APP_EXTENSION_ID, MCP_APP_MIME_TYPE, MCP_APP_RESOURCE_URI_META_KEY, type ActionMcpAppConfig, type ActionMcpAppCsp, type ActionMcpAppCspBuilder, type ActionMcpAppHtmlBuilder, type ActionMcpAppPermissions, type ActionMcpAppResourceConfig, type ActionMcpAppResourceMeta, } from "./action.js";
|
|
3
4
|
export * from "./user-profile/index.js";
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,10 @@ declare const messages: {
|
|
|
2
2
|
workspaceFile: {
|
|
3
3
|
download: string;
|
|
4
4
|
};
|
|
5
|
+
composer: {
|
|
6
|
+
sendMessage: string;
|
|
7
|
+
queueMessage: string;
|
|
8
|
+
};
|
|
5
9
|
home: {
|
|
6
10
|
settingsTitle: string;
|
|
7
11
|
settingsDescription: string;
|
|
@@ -47,6 +51,21 @@ declare const messages: {
|
|
|
47
51
|
profileSaving: string;
|
|
48
52
|
profileSaved: string;
|
|
49
53
|
profileSaveError: string;
|
|
54
|
+
passwordTitle: string;
|
|
55
|
+
passwordDescription: string;
|
|
56
|
+
passwordStatusLoading: string;
|
|
57
|
+
passwordAdd: string;
|
|
58
|
+
passwordChange: string;
|
|
59
|
+
passwordCurrentLabel: string;
|
|
60
|
+
passwordNewLabel: string;
|
|
61
|
+
passwordConfirmLabel: string;
|
|
62
|
+
passwordPlaceholder: string;
|
|
63
|
+
passwordMinLength: string;
|
|
64
|
+
passwordMismatch: string;
|
|
65
|
+
passwordSave: string;
|
|
66
|
+
passwordSaving: string;
|
|
67
|
+
passwordSaved: string;
|
|
68
|
+
passwordSaveError: string;
|
|
50
69
|
profileMenuItem: string;
|
|
51
70
|
manageAgentMenuItem: string;
|
|
52
71
|
timezoneLabel: string;
|
|
@@ -881,6 +900,11 @@ declare const messages: {
|
|
|
881
900
|
description: string;
|
|
882
901
|
useCase: string;
|
|
883
902
|
};
|
|
903
|
+
fullstory: {
|
|
904
|
+
description: string;
|
|
905
|
+
useCase: string;
|
|
906
|
+
setupNote: string;
|
|
907
|
+
};
|
|
884
908
|
notion: {
|
|
885
909
|
description: string;
|
|
886
910
|
useCase: string;
|
|
@@ -7,6 +7,10 @@ const messages = {
|
|
|
7
7
|
workspaceFile: {
|
|
8
8
|
download: "Download",
|
|
9
9
|
},
|
|
10
|
+
composer: {
|
|
11
|
+
sendMessage: "Send message",
|
|
12
|
+
queueMessage: "Queue message",
|
|
13
|
+
},
|
|
10
14
|
home: {
|
|
11
15
|
settingsTitle: "Settings",
|
|
12
16
|
settingsDescription: "Language and agent preferences",
|
|
@@ -52,6 +56,21 @@ const messages = {
|
|
|
52
56
|
profileSaving: "Saving...",
|
|
53
57
|
profileSaved: "Profile updated",
|
|
54
58
|
profileSaveError: "Could not update profile",
|
|
59
|
+
passwordTitle: "Password",
|
|
60
|
+
passwordDescription: "Add a password for an alternative way to sign in to your account.",
|
|
61
|
+
passwordStatusLoading: "Checking password settings...",
|
|
62
|
+
passwordAdd: "Add password",
|
|
63
|
+
passwordChange: "Change password",
|
|
64
|
+
passwordCurrentLabel: "Current password",
|
|
65
|
+
passwordNewLabel: "New password",
|
|
66
|
+
passwordConfirmLabel: "Confirm new password",
|
|
67
|
+
passwordPlaceholder: "Enter password",
|
|
68
|
+
passwordMinLength: "Password must be at least 8 characters",
|
|
69
|
+
passwordMismatch: "Passwords do not match",
|
|
70
|
+
passwordSave: "Save password",
|
|
71
|
+
passwordSaving: "Saving...",
|
|
72
|
+
passwordSaved: "Password updated",
|
|
73
|
+
passwordSaveError: "Could not update password",
|
|
55
74
|
profileMenuItem: "Profile",
|
|
56
75
|
manageAgentMenuItem: "Manage agent",
|
|
57
76
|
timezoneLabel: "Timezone",
|
|
@@ -669,7 +688,7 @@ const messages = {
|
|
|
669
688
|
codeChangeTitle: "This requires a code change",
|
|
670
689
|
codeChangeBadge: "Code change",
|
|
671
690
|
connectBuilderTitle: "Connect Builder.io",
|
|
672
|
-
connectBuilderDescription: "Connect Builder to enable cloud-based code changes from this app.",
|
|
691
|
+
connectBuilderDescription: "Connect Builder (free tier available) to enable cloud-based code changes from this app.",
|
|
673
692
|
setupRequired: "Setup required",
|
|
674
693
|
branchCreated: "Branch created",
|
|
675
694
|
close: "Close",
|
|
@@ -819,7 +838,7 @@ const messages = {
|
|
|
819
838
|
networkError: "Network error reaching the server",
|
|
820
839
|
back: "Back",
|
|
821
840
|
agentEngineRequired: "Agent engine required",
|
|
822
|
-
agentEngineDescription: "Connect Builder.io or an LLM key before {{platform}} can answer.",
|
|
841
|
+
agentEngineDescription: "Connect Builder.io (free tier available) or an LLM key before {{platform}} can answer.",
|
|
823
842
|
openLlm: "Open LLM",
|
|
824
843
|
setup: "Setup",
|
|
825
844
|
shareDocumentsWith: "Share documents with",
|
|
@@ -886,6 +905,11 @@ const messages = {
|
|
|
886
905
|
description: "Inspect issues, events, and debugging data.",
|
|
887
906
|
useCase: "Error monitoring, debugging, performance, crash reports",
|
|
888
907
|
},
|
|
908
|
+
fullstory: {
|
|
909
|
+
description: "Read behavioral analytics and inspect session replays.",
|
|
910
|
+
useCase: "Product analytics, session replay, qualitative behavior, user research",
|
|
911
|
+
setupNote: "FullStory MCP is currently beta and requires StoryAI features plus the Model Context Protocol toggle to be enabled by a FullStory organization admin.",
|
|
912
|
+
},
|
|
889
913
|
notion: {
|
|
890
914
|
description: "Search pages and team knowledge.",
|
|
891
915
|
useCase: "Documentation, knowledge management, notes, content creation",
|
|
@@ -16,19 +16,19 @@ export declare function createNotificationsHandler(): import("h3").EventHandlerW
|
|
|
16
16
|
ok?: undefined;
|
|
17
17
|
error?: undefined;
|
|
18
18
|
} | {
|
|
19
|
-
count?: undefined;
|
|
20
19
|
updated: number;
|
|
21
20
|
ok?: undefined;
|
|
22
21
|
error?: undefined;
|
|
23
|
-
} | {
|
|
24
22
|
count?: undefined;
|
|
23
|
+
} | {
|
|
25
24
|
updated?: undefined;
|
|
26
25
|
error: string;
|
|
27
26
|
ok?: undefined;
|
|
28
|
-
} | {
|
|
29
27
|
count?: undefined;
|
|
28
|
+
} | {
|
|
30
29
|
updated?: undefined;
|
|
31
30
|
ok: boolean;
|
|
32
31
|
error?: undefined;
|
|
32
|
+
count?: undefined;
|
|
33
33
|
}>>;
|
|
34
34
|
//# sourceMappingURL=routes.d.ts.map
|
|
@@ -219,7 +219,7 @@ const PROFILES = {
|
|
|
219
219
|
label: "Builder executor",
|
|
220
220
|
required: true,
|
|
221
221
|
builderIncluded: true,
|
|
222
|
-
keySummary: "Connect Builder for managed agent runs",
|
|
222
|
+
keySummary: "Connect Builder for managed agent runs (free tier available)",
|
|
223
223
|
why: "The executor runs approved code and review workflows for Factory items.",
|
|
224
224
|
},
|
|
225
225
|
{
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
* POST /_agent-native/onboarding/steps/:id/complete — manual override (marks complete)
|
|
7
7
|
* POST /_agent-native/onboarding/dismiss — dismiss the banner
|
|
8
8
|
* GET /_agent-native/onboarding/dismissed — dismissed flag + allComplete
|
|
9
|
+
* GET /_agent-native/onboarding/first-run/status — post-signup flow status
|
|
10
|
+
* POST /_agent-native/onboarding/first-run/complete — permanently complete it
|
|
9
11
|
*/
|
|
10
12
|
type NitroPluginDef = (nitroApp: any) => void | Promise<void>;
|
|
11
13
|
export interface OnboardingPluginOptions {
|
|
@@ -6,13 +6,15 @@
|
|
|
6
6
|
* POST /_agent-native/onboarding/steps/:id/complete — manual override (marks complete)
|
|
7
7
|
* POST /_agent-native/onboarding/dismiss — dismiss the banner
|
|
8
8
|
* GET /_agent-native/onboarding/dismissed — dismissed flag + allComplete
|
|
9
|
+
* GET /_agent-native/onboarding/first-run/status — post-signup flow status
|
|
10
|
+
* POST /_agent-native/onboarding/first-run/complete — permanently complete it
|
|
9
11
|
*/
|
|
10
|
-
import { deleteCookie, defineEventHandler, getMethod, getQuery, setResponseStatus, } from "h3";
|
|
12
|
+
import { deleteCookie, defineEventHandler, getCookie, getMethod, getQuery, setResponseStatus, } from "h3";
|
|
11
13
|
import { appStateGet, appStatePut } from "../application-state/store.js";
|
|
12
14
|
import { getSession } from "../server/auth.js";
|
|
13
15
|
import { awaitBootstrap, getH3App, markDefaultPluginProvided, } from "../server/framework-request-handler.js";
|
|
14
16
|
import { runWithRequestContext } from "../server/request-context.js";
|
|
15
|
-
import { FIRST_RUN_ONBOARDING_COOKIE } from "../shared/first-run-onboarding.js";
|
|
17
|
+
import { FIRST_RUN_ONBOARDING_COMPLETED_KEY, FIRST_RUN_ONBOARDING_COOKIE, } from "../shared/first-run-onboarding.js";
|
|
16
18
|
import { getOnboardingAppProfile } from "./app-profile.js";
|
|
17
19
|
import { registerDefaultOnboardingSteps } from "./default-steps.js";
|
|
18
20
|
import { listOnboardingSteps } from "./registry.js";
|
|
@@ -189,12 +191,37 @@ export function createOnboardingPlugin(options = {}) {
|
|
|
189
191
|
}
|
|
190
192
|
return appProfile;
|
|
191
193
|
}));
|
|
194
|
+
// GET /_agent-native/onboarding/first-run/status
|
|
195
|
+
getH3App(nitroApp).use(`${ONBOARDING_PREFIX}/first-run/status`, defineEventHandler(async (event) => {
|
|
196
|
+
if (getMethod(event) !== "GET") {
|
|
197
|
+
setResponseStatus(event, 405);
|
|
198
|
+
return { error: "Method not allowed" };
|
|
199
|
+
}
|
|
200
|
+
if (getCookie(event, FIRST_RUN_ONBOARDING_COOKIE) !== "1") {
|
|
201
|
+
return { firstRun: false };
|
|
202
|
+
}
|
|
203
|
+
const context = await resolveOnboardingContext(event);
|
|
204
|
+
if (!context.userEmail)
|
|
205
|
+
return { firstRun: false };
|
|
206
|
+
return withOnboardingRequestContext(context, async () => {
|
|
207
|
+
const completed = await appStateGet(context.sessionId, FIRST_RUN_ONBOARDING_COMPLETED_KEY);
|
|
208
|
+
return {
|
|
209
|
+
firstRun: completed?.completed !== true,
|
|
210
|
+
};
|
|
211
|
+
});
|
|
212
|
+
}));
|
|
192
213
|
// POST /_agent-native/onboarding/first-run/complete
|
|
193
214
|
getH3App(nitroApp).use(`${ONBOARDING_PREFIX}/first-run/complete`, defineEventHandler(async (event) => {
|
|
194
215
|
if (getMethod(event) !== "POST") {
|
|
195
216
|
setResponseStatus(event, 405);
|
|
196
217
|
return { error: "Method not allowed" };
|
|
197
218
|
}
|
|
219
|
+
const context = await resolveOnboardingContext(event);
|
|
220
|
+
if (!context.userEmail) {
|
|
221
|
+
setResponseStatus(event, 401);
|
|
222
|
+
return { error: "Authentication required" };
|
|
223
|
+
}
|
|
224
|
+
await appStatePut(context.sessionId, FIRST_RUN_ONBOARDING_COMPLETED_KEY, { completed: true, at: new Date().toISOString() }, { requestSource: "agent" });
|
|
198
225
|
deleteCookie(event, FIRST_RUN_ONBOARDING_COOKIE, { path: "/" });
|
|
199
226
|
return { ok: true };
|
|
200
227
|
}));
|