@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
|
@@ -143,6 +143,9 @@ export function useChatThreads(apiUrl = agentNativePath("/_agent-native/agent-ch
|
|
|
143
143
|
id = null;
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
+
// Route-owned create mode still needs a local target immediately. The
|
|
147
|
+
// URL owns which server thread is open, but an empty new chat is not a
|
|
148
|
+
// server row yet and must not wait for the thread-list request to paint.
|
|
146
149
|
if (!id && autoCreate) {
|
|
147
150
|
id = createLocalThreadId();
|
|
148
151
|
isNew = true;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import type { AuthSession } from "../server/auth.js";
|
|
2
2
|
export type { AuthSession };
|
|
3
|
+
/**
|
|
4
|
+
* `"unavailable"` is the session endpoint being unreadable — a 5xx, a network
|
|
5
|
+
* failure, or a timeout. It is NOT the visitor being signed out, and a caller
|
|
6
|
+
* that collapses the two either strands the user on a spinner forever or
|
|
7
|
+
* bounces a signed-in user to the sign-in page over a transient blip.
|
|
8
|
+
*/
|
|
9
|
+
export type SessionStatus = "loading" | "authenticated" | "unauthenticated" | "unavailable";
|
|
3
10
|
interface UseSessionResult {
|
|
4
11
|
session: AuthSession | null;
|
|
5
12
|
isLoading: boolean;
|
|
13
|
+
status: SessionStatus;
|
|
14
|
+
error: Error | null;
|
|
15
|
+
/** Restart the resolve loop, e.g. from a "Try again" control. */
|
|
16
|
+
retry: () => void;
|
|
6
17
|
}
|
|
7
18
|
/**
|
|
8
19
|
* Client-side hook to get the current auth session.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
1
|
+
import { useCallback, useEffect, useState } from "react";
|
|
2
2
|
import { setSentryUser, trackSessionStatus } from "./analytics.js";
|
|
3
3
|
import { fetchAuthSessionStatus } from "./client-status-requests.js";
|
|
4
4
|
const SESSION_CACHE_TTL_MS = 30_000;
|
|
5
5
|
const SESSION_RETRY_DELAY_MS = 1_000;
|
|
6
|
+
const SESSION_MAX_ATTEMPTS = 4;
|
|
6
7
|
let cachedSession;
|
|
7
8
|
let cachedSessionAt = 0;
|
|
8
9
|
let sessionRequest;
|
|
@@ -65,22 +66,41 @@ function fetchSharedSession() {
|
|
|
65
66
|
export function useSession() {
|
|
66
67
|
const cached = hasFreshSessionCache() ? (cachedSession ?? null) : null;
|
|
67
68
|
const [session, setSession] = useState(cached);
|
|
68
|
-
const [
|
|
69
|
+
const [status, setStatus] = useState(() => {
|
|
70
|
+
if (!hasFreshSessionCache())
|
|
71
|
+
return "loading";
|
|
72
|
+
return cached ? "authenticated" : "unauthenticated";
|
|
73
|
+
});
|
|
74
|
+
const [error, setError] = useState(null);
|
|
75
|
+
const [retryToken, setRetryToken] = useState(0);
|
|
76
|
+
const retry = useCallback(() => {
|
|
77
|
+
setError(null);
|
|
78
|
+
setStatus("loading");
|
|
79
|
+
setRetryToken((token) => token + 1);
|
|
80
|
+
}, []);
|
|
69
81
|
useEffect(() => {
|
|
70
82
|
let cancelled = false;
|
|
71
83
|
let retryTimer;
|
|
84
|
+
let attempts = 0;
|
|
72
85
|
const resolveSession = async () => {
|
|
73
86
|
const resolved = await fetchSharedSession();
|
|
74
87
|
if (cancelled)
|
|
75
88
|
return;
|
|
76
89
|
if (resolved === undefined) {
|
|
90
|
+
attempts += 1;
|
|
91
|
+
if (attempts >= SESSION_MAX_ATTEMPTS) {
|
|
92
|
+
setError(new Error(`Could not read the session after ${attempts} attempts.`));
|
|
93
|
+
setStatus("unavailable");
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
77
96
|
retryTimer = setTimeout(() => {
|
|
78
97
|
void resolveSession();
|
|
79
|
-
}, SESSION_RETRY_DELAY_MS);
|
|
98
|
+
}, SESSION_RETRY_DELAY_MS * attempts);
|
|
80
99
|
return;
|
|
81
100
|
}
|
|
82
101
|
setSession(resolved);
|
|
83
|
-
|
|
102
|
+
setError(null);
|
|
103
|
+
setStatus(resolved ? "authenticated" : "unauthenticated");
|
|
84
104
|
};
|
|
85
105
|
void resolveSession();
|
|
86
106
|
return () => {
|
|
@@ -88,7 +108,15 @@ export function useSession() {
|
|
|
88
108
|
if (retryTimer)
|
|
89
109
|
clearTimeout(retryTimer);
|
|
90
110
|
};
|
|
91
|
-
}, []);
|
|
92
|
-
|
|
111
|
+
}, [retryToken]);
|
|
112
|
+
// Callers that only read `isLoading`/`session` (most of the codebase, not
|
|
113
|
+
// yet migrated to `status`) must not see "unavailable" as "signed out" —
|
|
114
|
+
// that bounces an authenticated user through sign-in-only UI over a
|
|
115
|
+
// transient blip. Keeping `isLoading` true here reproduces this hook's
|
|
116
|
+
// pre-existing behavior for those callers (an indefinite "still resolving"
|
|
117
|
+
// instead of a wrong answer); only `status`-aware callers get the distinct
|
|
118
|
+
// "unavailable" treatment with a retry affordance.
|
|
119
|
+
const isLoading = status === "loading" || status === "unavailable";
|
|
120
|
+
return { session, isLoading, status, error, retry };
|
|
93
121
|
}
|
|
94
122
|
//# sourceMappingURL=use-session.js.map
|
package/dist/collab/routes.d.ts
CHANGED
|
@@ -26,8 +26,8 @@ export declare const getCollabState: import("h3").EventHandlerWithFetch<import("
|
|
|
26
26
|
* Body: { update: string (base64), requestSource?: string }
|
|
27
27
|
*/
|
|
28
28
|
export declare const postCollabUpdate: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
29
|
-
ok?: undefined;
|
|
30
29
|
error: string;
|
|
30
|
+
ok?: undefined;
|
|
31
31
|
} | {
|
|
32
32
|
error?: undefined;
|
|
33
33
|
ok: boolean;
|
|
@@ -41,9 +41,9 @@ export declare const postCollabUpdate: import("h3").EventHandlerWithFetch<import
|
|
|
41
41
|
* Body: { text: string, fieldName?: string, requestSource?: string }
|
|
42
42
|
*/
|
|
43
43
|
export declare const postCollabText: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
|
|
44
|
+
text?: undefined;
|
|
44
45
|
ok?: undefined;
|
|
45
46
|
error: string;
|
|
46
|
-
text?: undefined;
|
|
47
47
|
} | {
|
|
48
48
|
error?: undefined;
|
|
49
49
|
ok: boolean;
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public, non-secret configuration for an Agent-Native app.
|
|
3
|
+
*
|
|
4
|
+
* This module is intentionally free of Node and framework imports so it can be
|
|
5
|
+
* used from a typed `agent-native.config.ts` file and from browser code after
|
|
6
|
+
* Vite serializes the resolved config into the client bundle.
|
|
7
|
+
*/
|
|
8
|
+
export declare const AGENT_NATIVE_CONFIG_VERSION: 1;
|
|
9
|
+
export type AgentNativeFirstRunOnboardingMode = "off" | "connect" | "connect-and-integrations";
|
|
10
|
+
export type AgentNativeFirstRunOnboardingSetting = AgentNativeFirstRunOnboardingMode | (Partial<Record<string, AgentNativeFirstRunOnboardingMode>> & {
|
|
11
|
+
default?: AgentNativeFirstRunOnboardingMode;
|
|
12
|
+
});
|
|
13
|
+
export interface AgentNativeOnboardingConfig {
|
|
14
|
+
/**
|
|
15
|
+
* First-run setup shown by the shared Agent Sidebar.
|
|
16
|
+
*
|
|
17
|
+
* `connect` shows Builder/BYOK setup and skips the generic integrations
|
|
18
|
+
* catalog. `connect-and-integrations` includes that catalog. A per-Vite-mode
|
|
19
|
+
* object is useful when local development and hosted builds need different
|
|
20
|
+
* defaults.
|
|
21
|
+
*/
|
|
22
|
+
firstRun?: AgentNativeFirstRunOnboardingSetting;
|
|
23
|
+
}
|
|
24
|
+
export interface AgentNativeConfig {
|
|
25
|
+
version?: typeof AGENT_NATIVE_CONFIG_VERSION;
|
|
26
|
+
onboarding?: AgentNativeOnboardingConfig;
|
|
27
|
+
}
|
|
28
|
+
export interface AgentNativeConfigContext {
|
|
29
|
+
command: "serve" | "build";
|
|
30
|
+
mode: string;
|
|
31
|
+
isDev: boolean;
|
|
32
|
+
isBuild: boolean;
|
|
33
|
+
}
|
|
34
|
+
export type AgentNativeConfigFactory = (context: AgentNativeConfigContext) => AgentNativeConfig;
|
|
35
|
+
export type AgentNativeConfigInput = AgentNativeConfig | AgentNativeConfigFactory;
|
|
36
|
+
/**
|
|
37
|
+
* Type-safe authoring helper for `agent-native.config.ts`.
|
|
38
|
+
*
|
|
39
|
+
* Like Next's typed config file, this is deliberately identity-like: the
|
|
40
|
+
* framework evaluates the exported object or factory in the Vite config
|
|
41
|
+
* phase, while the browser only receives the resolved serializable result.
|
|
42
|
+
*/
|
|
43
|
+
export declare function defineAgentNativeConfig(config: AgentNativeConfigInput): AgentNativeConfigInput;
|
|
44
|
+
export declare function normalizeAgentNativeConfig(input: unknown, source?: string): AgentNativeConfig;
|
|
45
|
+
export declare function mergeAgentNativeConfigs(base: AgentNativeConfig, override: AgentNativeConfig): AgentNativeConfig;
|
|
46
|
+
export declare function resolveAgentNativeConfig(input: AgentNativeConfigInput | undefined, context: AgentNativeConfigContext): AgentNativeConfig;
|
|
47
|
+
export declare function resolveFirstRunOnboardingMode(setting: AgentNativeFirstRunOnboardingSetting, context: AgentNativeConfigContext): AgentNativeFirstRunOnboardingMode;
|
|
48
|
+
//# sourceMappingURL=config.d.ts.map
|
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;
|