@agent-native/core 0.137.8 → 0.139.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent-native.eject.json +2 -0
- package/corpus/README.md +1 -1
- package/corpus/templates/analytics/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +15 -0
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/analytics/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/analytics/AGENTS.md +2 -2
- package/corpus/templates/analytics/actions/get-first-party-analytics-health.ts +65 -0
- package/corpus/templates/analytics/actions/provider-api-catalog.ts +3 -6
- package/corpus/templates/analytics/actions/provider-api-docs.ts +3 -6
- package/corpus/templates/analytics/actions/provider-api-request.ts +3 -6
- package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +3 -3
- package/corpus/templates/analytics/agent-native.json +12 -0
- package/corpus/templates/analytics/app/i18n-data.ts +162 -0
- package/corpus/templates/analytics/app/pages/DataSources.tsx +126 -1
- package/corpus/templates/analytics/changelog/2026-08-05-analytics-now-flags-neon-pressure-and-guides-high-volume-tra.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-05-first-party-analytics-uses-compact-rollups-for-faster-usage-.md +6 -0
- package/corpus/templates/analytics/server/db/schema.ts +52 -0
- package/corpus/templates/analytics/server/lib/credential-keys.ts +3 -0
- package/corpus/templates/analytics/server/lib/dashboard-report.ts +2 -0
- package/corpus/templates/analytics/server/lib/emails.ts +51 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics-health.ts +397 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +182 -0
- package/corpus/templates/analytics/server/lib/first-party-analytics.ts +86 -15
- package/corpus/templates/analytics/server/lib/provider-api.ts +20 -1
- package/corpus/templates/analytics/server/lib/replay-storage.ts +1 -1
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +1 -0
- package/corpus/templates/analytics/server/plugins/db.ts +60 -0
- package/corpus/templates/analytics/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/assets/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/assets/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/assets/agent-native.json +12 -0
- package/corpus/templates/assets/server/lib/generation.ts +8 -8
- package/corpus/templates/assets/server/lib/storage.ts +1 -1
- package/corpus/templates/assets/server/plugins/onboarding.ts +1 -1
- package/corpus/templates/brain/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/brain/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/brain/agent-native.json +12 -0
- package/corpus/templates/calendar/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/calendar/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/calendar/agent-native.json +12 -0
- package/corpus/templates/calendar/server/lib/booking-emails.ts +154 -70
- package/corpus/templates/calendar/server/lib/emails.ts +167 -0
- package/corpus/templates/calendar/server/lib/event-guest-notifications.ts +64 -28
- package/corpus/templates/calendar/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/chat/AGENTS.md +3 -0
- package/corpus/templates/chat/DESIGN.md +28 -0
- package/corpus/templates/chat/agent-native.json +12 -0
- package/corpus/templates/clips/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/clips/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/clips/actions/cleanup-transcript.ts +2 -2
- package/corpus/templates/clips/actions/delete-recording-permanent.ts +3 -0
- package/corpus/templates/clips/actions/get-playback-position.ts +68 -0
- package/corpus/templates/clips/actions/import-loom-recording.ts +2 -2
- package/corpus/templates/clips/actions/invite-member.ts +39 -15
- package/corpus/templates/clips/actions/save-playback-position.ts +80 -0
- package/corpus/templates/clips/actions/set-thumbnail.ts +1 -1
- package/corpus/templates/clips/agent-native.json +12 -0
- package/corpus/templates/clips/app/components/player/video-player.tsx +54 -5
- package/corpus/templates/clips/app/hooks/use-playback-position.ts +188 -0
- package/corpus/templates/clips/app/hooks/use-view-tracking.ts +6 -24
- package/corpus/templates/clips/app/lib/playback-position.ts +99 -0
- package/corpus/templates/clips/app/lib/viewer-session.ts +29 -0
- package/corpus/templates/clips/changelog/2026-08-05-clip-buffering-now-uses-buffering-copy-after-playback.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-05-clips-remembers-your-playback-position-when-you-reopen-a-cli.md +6 -0
- package/corpus/templates/clips/learnings.defaults.md +1 -1
- package/corpus/templates/clips/server/db/schema.ts +18 -0
- package/corpus/templates/clips/server/lib/emails.ts +256 -0
- package/corpus/templates/clips/server/lib/public-agent-context.ts +1 -1
- package/corpus/templates/clips/server/lib/transactional-email-templates.ts +24 -0
- package/corpus/templates/clips/server/lib/video-storage.ts +1 -1
- package/corpus/templates/clips/server/plugins/db.ts +15 -0
- package/corpus/templates/clips/server/plugins/transactional-email-catalog.ts +5 -0
- package/corpus/templates/clips/server/routes/api/media/index.post.ts +1 -1
- package/corpus/templates/content/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/content/.agents/skills/document-editing/references/databases.md +13 -0
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/content/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/content/AGENTS.md +1 -0
- package/corpus/templates/content/actions/_content-database-mutation-lock.ts +41 -0
- package/corpus/templates/content/actions/_content-database-row-migration.ts +569 -0
- package/corpus/templates/content/actions/_database-source-utils.ts +82 -36
- package/corpus/templates/content/actions/_database-utils.ts +5 -0
- package/corpus/templates/content/actions/_delete-content-space.ts +25 -11
- package/corpus/templates/content/actions/add-database-item.ts +60 -42
- package/corpus/templates/content/actions/attach-content-database-source.ts +2 -0
- package/corpus/templates/content/actions/configure-document-property.ts +99 -104
- package/corpus/templates/content/actions/delete-content-database.ts +19 -7
- package/corpus/templates/content/actions/delete-document-property.ts +47 -58
- package/corpus/templates/content/actions/delete-document.ts +390 -167
- package/corpus/templates/content/actions/disconnect-content-database-source.ts +41 -24
- package/corpus/templates/content/actions/duplicate-database-item.ts +63 -31
- package/corpus/templates/content/actions/duplicate-database-items.ts +86 -43
- package/corpus/templates/content/actions/duplicate-document-property.ts +37 -14
- package/corpus/templates/content/actions/migrate-content-database-rows.ts +830 -0
- package/corpus/templates/content/actions/move-database-item.ts +14 -0
- package/corpus/templates/content/actions/permanently-delete-document.ts +27 -6
- package/corpus/templates/content/actions/remove-database-items.ts +13 -0
- package/corpus/templates/content/actions/reorder-document-property.ts +45 -46
- package/corpus/templates/content/actions/set-document-property.ts +68 -28
- package/corpus/templates/content/actions/submit-content-database-form.ts +49 -0
- package/corpus/templates/content/actions/transcribe-media.ts +1 -1
- package/corpus/templates/content/agent-native.json +12 -0
- package/corpus/templates/content/app/components/editor/image-upload.ts +2 -2
- package/corpus/templates/content/app/i18n-data.ts +1 -1
- package/corpus/templates/content/changelog/2026-08-01-content-can-reorganize-every-row-in-an-existing-database-as-.md +6 -0
- package/corpus/templates/content/parity/matrix.md +1 -1
- package/corpus/templates/content/parity/matrix.ts +4 -2
- package/corpus/templates/content/server/db/schema.ts +30 -0
- package/corpus/templates/content/server/lib/comment-notifications.ts +57 -26
- package/corpus/templates/content/server/lib/emails.ts +70 -0
- package/corpus/templates/content/server/plugins/db.ts +24 -0
- package/corpus/templates/content/server/plugins/onboarding.ts +2 -2
- package/corpus/templates/content/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/crm/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/crm/agent-native.json +12 -0
- package/corpus/templates/design/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/design/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/design/CODE_NATIVE_DESIGN_STUDIO_IMPLEMENTATION_PLAN.md +2 -2
- package/corpus/templates/design/DESIGN-STUDIO-PLAN.md +2 -2
- package/corpus/templates/design/actions/apply-design-token-edit.ts +1 -1
- package/corpus/templates/design/actions/capture-design-state.ts +1 -1
- package/corpus/templates/design/actions/connect-builder-app.ts +2 -2
- package/corpus/templates/design/actions/create-design-branch.ts +1 -1
- package/corpus/templates/design/actions/create-fusion-app.ts +3 -3
- package/corpus/templates/design/actions/deploy-design-preview.ts +1 -1
- package/corpus/templates/design/actions/get-component-details.ts +1 -1
- package/corpus/templates/design/actions/get-design-branch-diff.ts +1 -1
- package/corpus/templates/design/actions/index-components.ts +3 -3
- package/corpus/templates/design/actions/index-design-system-with-builder.ts +1 -1
- package/corpus/templates/design/actions/migrate-inline-design-to-app.ts +3 -3
- package/corpus/templates/design/actions/open-component-source.ts +1 -1
- package/corpus/templates/design/actions/update-design.ts +61 -0
- package/corpus/templates/design/agent-native.json +12 -0
- package/corpus/templates/design/app/components/design/edit-panel/component-section.tsx +1 -1
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +1 -1
- package/corpus/templates/design/scripts/qa-figma-stress-import.ts +1 -1
- package/corpus/templates/design/server/lib/figma-node-import.ts +1 -1
- package/corpus/templates/design/shared/design-source-capabilities.ts +25 -9
- package/corpus/templates/dispatch/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/dispatch/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/dispatch/agent-native.json +12 -0
- package/corpus/templates/dispatch/app/routes/transactional-email.$appId.$id.tsx +4 -0
- package/corpus/templates/dispatch/app/routes/transactional-email.tsx +4 -0
- package/corpus/templates/factory/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/factory/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/factory/agent-native.json +12 -0
- package/corpus/templates/forms/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/forms/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/forms/actions/export-responses.ts +1 -1
- package/corpus/templates/forms/agent-native.json +12 -0
- package/corpus/templates/forms/server/lib/emails.ts +52 -0
- package/corpus/templates/forms/server/lib/response-email.ts +2 -0
- package/corpus/templates/forms/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/macros/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/macros/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/macros/agent-native.json +12 -0
- package/corpus/templates/mail/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/mail/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/mail/agent-native.json +12 -0
- package/corpus/templates/mail/app/i18n/en-US.ts +1 -1
- package/corpus/templates/mail/server/lib/media-upload.ts +1 -1
- package/corpus/templates/plan/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/plan/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/plan/actions/request-plan-access.ts +33 -12
- package/corpus/templates/plan/agent-native.json +12 -0
- package/corpus/templates/plan/server/lib/comment-notifications.ts +53 -27
- package/corpus/templates/plan/server/lib/emails.ts +67 -0
- package/corpus/templates/plan/server/lib/plan-assets.ts +1 -1
- package/corpus/templates/plan/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/slides/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/slides/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/slides/actions/generate-image-api.ts +1 -1
- package/corpus/templates/slides/actions/generate-slides-ai.ts +1 -1
- package/corpus/templates/slides/actions/import-file.ts +2 -2
- package/corpus/templates/slides/actions/index-design-system-with-builder.ts +1 -1
- package/corpus/templates/slides/agent-native.json +12 -0
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +1 -1
- package/corpus/templates/slides/app/i18n/en-US.ts +2 -2
- package/corpus/templates/slides/app/lib/deck-sorting.ts +19 -0
- package/corpus/templates/slides/app/lib/image-drop-to-agent.ts +1 -1
- package/corpus/templates/slides/app/pages/Index.tsx +7 -2
- package/corpus/templates/slides/changelog/2026-08-05-decks-are-now-sorted-by-most-recently-updated.md +6 -0
- package/corpus/templates/slides/server/handlers/assets.ts +1 -1
- package/corpus/templates/slides/server/handlers/uploads.ts +1 -1
- package/corpus/templates/slides/server/lib/comment-notifications.ts +44 -21
- package/corpus/templates/slides/server/lib/emails.ts +40 -0
- package/corpus/templates/slides/server/plugins/transactional-emails.ts +5 -0
- package/corpus/templates/tasks/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +23 -2
- package/corpus/templates/tasks/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/corpus/templates/tasks/agent-native.json +12 -0
- package/dist/action.d.ts +6 -0
- package/dist/agent/engine/builder-engine.js +2 -2
- package/dist/agent/engine/credential-errors.d.ts +1 -1
- package/dist/agent/engine/credential-errors.js +2 -2
- package/dist/agent/production-agent.js +3 -2
- package/dist/brand-kit/fig/index.js +1 -1
- package/dist/cli/agent.js +45 -3
- package/dist/cli/code-agent-executor.js +2 -1
- package/dist/cli/create.d.ts +9 -1
- package/dist/cli/create.js +94 -1
- package/dist/cli/doctor.d.ts +8 -11
- package/dist/cli/doctor.js +92 -24
- package/dist/cli/index.js +6 -5
- package/dist/client/AgentAskPopover.d.ts +3 -1
- package/dist/client/AgentAskPopover.js +2 -2
- package/dist/client/AgentPanel.js +9 -3
- package/dist/client/AssistantChat.js +54 -33
- package/dist/client/MultiTabAssistantChat.js +1 -1
- package/dist/client/RouteTransitionIndicator.d.ts +7 -0
- package/dist/client/RouteTransitionIndicator.js +31 -0
- package/dist/client/agent-engine-key.js +1 -1
- package/dist/client/app-providers.js +11 -2
- package/dist/client/chat/message-components.js +1 -1
- package/dist/client/chat/run-recovery.js +1 -1
- package/dist/client/chat/tool-call-display.d.ts +3 -1
- package/dist/client/chat/tool-call-display.js +4 -3
- package/dist/client/chat-model-groups.d.ts +6 -0
- package/dist/client/chat-model-groups.js +11 -0
- package/dist/client/error-format.js +1 -1
- package/dist/client/i18n.js +1 -1
- package/dist/client/onboarding/FirstRunOnboarding.d.ts +5 -1
- package/dist/client/onboarding/FirstRunOnboarding.js +29 -13
- package/dist/client/onboarding/first-run-enabled.d.ts +6 -1
- package/dist/client/onboarding/first-run-enabled.js +33 -3
- package/dist/client/onboarding/use-onboarding.js +16 -11
- package/dist/client/resources/mcp-integration-catalog.js +26 -0
- package/dist/client/resources/mcp-integration-logos.js +4 -0
- package/dist/client/route-warmup.js +56 -10
- package/dist/client/settings/AccountSettingsCard.js +78 -3
- package/dist/client/settings/SettingsPanel.js +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.js +2 -2
- package/dist/client/settings/useBuilderStatus.js +1 -1
- package/dist/client/setup-connections/useBuilderConnectCardController.js +1 -1
- package/dist/client/ui/index.d.ts +1 -0
- package/dist/client/ui/index.js +1 -0
- package/dist/client/uploads/upload-editor-image.js +1 -1
- package/dist/client/use-chat-threads.js +3 -0
- package/dist/collab/routes.d.ts +1 -1
- package/dist/config.d.ts +48 -0
- package/dist/config.js +111 -0
- package/dist/db/migrations.js +5 -0
- package/dist/eject/provider-api-definitions.d.ts +1 -1
- package/dist/eject/provider-api-definitions.js +1 -0
- package/dist/eject/remote-mcp-presets.js +1 -0
- package/dist/email-catalog/actions/list-email-activity.d.ts +6 -0
- package/dist/email-catalog/actions/list-email-activity.js +15 -0
- package/dist/email-catalog/actions/list-email-engagement.d.ts +6 -0
- package/dist/email-catalog/actions/list-email-engagement.js +15 -0
- package/dist/email-catalog/actions/list-email-log.d.ts +8 -0
- package/dist/email-catalog/actions/list-email-log.js +22 -0
- package/dist/email-catalog/actions/list-transactional-emails.d.ts +23 -0
- package/dist/email-catalog/actions/list-transactional-emails.js +61 -0
- package/dist/email-catalog/actions/render-transactional-email-preview.d.ts +10 -0
- package/dist/email-catalog/actions/render-transactional-email-preview.js +24 -0
- package/dist/email-catalog/authorize.d.ts +2 -0
- package/dist/email-catalog/authorize.js +10 -0
- package/dist/email-catalog/log.d.ts +57 -0
- package/dist/email-catalog/log.js +117 -0
- package/dist/email-catalog/provider-metrics.d.ts +34 -0
- package/dist/email-catalog/provider-metrics.js +165 -0
- package/dist/email-catalog/registry.d.ts +79 -0
- package/dist/email-catalog/registry.js +71 -0
- package/dist/email-catalog/schema.d.ts +212 -0
- package/dist/email-catalog/schema.js +49 -0
- package/dist/email-catalog/system-emails.d.ts +14 -0
- package/dist/email-catalog/system-emails.js +68 -0
- package/dist/extensions/web-search-tool.js +2 -2
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/file-upload/actions/upload-image.js +1 -1
- package/dist/file-upload/registry.js +1 -1
- package/dist/guards/index.d.ts +3 -0
- package/dist/guards/index.js +2 -0
- package/dist/guards/no-empty-migrations.d.ts +14 -0
- package/dist/guards/no-empty-migrations.js +126 -0
- package/dist/index.browser.d.ts +1 -0
- package/dist/index.browser.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/localization/default-messages.d.ts +69 -0
- package/dist/localization/default-messages.js +71 -2
- package/dist/notifications/routes.d.ts +2 -2
- package/dist/onboarding/app-profile.js +1 -1
- package/dist/onboarding/plugin.d.ts +2 -0
- package/dist/onboarding/plugin.js +29 -2
- package/dist/org/handlers.js +8 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +11 -11
- package/dist/provider-api/actions/provider-api.d.ts +13 -13
- package/dist/provider-api/index.d.ts +4 -4
- package/dist/provider-api/index.js +35 -0
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/resources/handlers.js +1 -1
- package/dist/scripts/docs/framework-search.d.ts +9 -0
- package/dist/scripts/docs/framework-search.js +239 -0
- package/dist/scripts/docs/index.js +1 -0
- package/dist/scripts/docs/search.d.ts +10 -0
- package/dist/scripts/docs/search.js +1 -1
- package/dist/scripts/docs/source-search.d.ts +10 -2
- package/dist/scripts/docs/source-search.js +108 -41
- package/dist/search-utils/index.d.ts +11 -0
- package/dist/search-utils/index.js +72 -0
- package/dist/server/action-change.d.ts +6 -0
- package/dist/server/action-change.js +28 -14
- package/dist/server/action-discovery.js +31 -0
- package/dist/server/action-routes.js +1 -0
- package/dist/server/agent-chat/browser-team-tools.js +1 -1
- package/dist/server/agent-chat/script-entries.js +43 -2
- package/dist/server/auth-login-mode.d.ts +8 -0
- package/dist/server/auth-login-mode.js +17 -0
- package/dist/server/auth.js +100 -15
- package/dist/server/better-auth-instance.d.ts +36 -0
- package/dist/server/better-auth-instance.js +42 -5
- package/dist/server/builder-design-systems.js +1 -1
- package/dist/server/core-routes-plugin.js +17 -14
- package/dist/server/credential-provider.js +3 -3
- package/dist/server/email-templates.d.ts +7 -0
- package/dist/server/email-templates.js +24 -0
- package/dist/server/email.d.ts +26 -0
- package/dist/server/email.js +66 -4
- package/dist/server/framework-request-handler.js +6 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +1 -0
- package/dist/server/onboarding-html.d.ts +2 -0
- package/dist/server/onboarding-html.js +169 -8
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/server/realtime-voice.js +1 -1
- package/dist/server/sentry.d.ts +1 -1
- package/dist/server/transcribe-voice.js +3 -3
- package/dist/shared/first-run-onboarding.d.ts +1 -0
- package/dist/shared/first-run-onboarding.js +1 -0
- package/dist/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
- package/dist/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/dist/templates/chat/AGENTS.md +3 -0
- package/dist/templates/chat/DESIGN.md +28 -0
- package/dist/templates/chat/agent-native.json +12 -0
- package/dist/templates/default/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +23 -2
- package/dist/templates/default/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/dist/templates/default/AGENTS.md +4 -0
- package/dist/templates/default/DESIGN.md +30 -0
- package/dist/templates/default/agent-native.json +9 -0
- package/dist/templates/default/app/i18n/ar-SA.ts +2 -2
- package/dist/templates/default/app/i18n/de-DE.ts +2 -2
- package/dist/templates/default/app/i18n/en-US.ts +2 -2
- package/dist/templates/default/app/i18n/es-ES.ts +2 -2
- package/dist/templates/default/app/i18n/fr-FR.ts +2 -2
- package/dist/templates/default/app/i18n/hi-IN.ts +2 -2
- package/dist/templates/default/app/i18n/ja-JP.ts +2 -2
- package/dist/templates/default/app/i18n/ko-KR.ts +2 -2
- package/dist/templates/default/app/i18n/pt-BR.ts +2 -2
- package/dist/templates/default/app/i18n/zh-CN.ts +2 -2
- package/dist/templates/default/app/i18n/zh-TW.ts +1 -1
- package/dist/templates/default/package.json +1 -0
- package/dist/templates/headless/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/dist/templates/headless/agent-native.json +9 -0
- package/dist/templates/headless/package.json +2 -0
- package/dist/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +23 -2
- package/dist/templates/workspace-core/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/dist/templates/workspace-core/AGENTS.md +3 -0
- package/dist/templates/workspace-core/DESIGN.md +35 -0
- package/dist/templates/workspace-root/AGENTS.md +3 -0
- package/dist/templates/workspace-root/DESIGN.md +35 -0
- package/dist/templates/workspace-root/agent-native.json +9 -0
- package/dist/templates/workspace-root/package.json +3 -0
- package/dist/transcription/builder-transcription.js +1 -1
- package/dist/user-profile/actions/change-password.d.ts +8 -0
- package/dist/user-profile/actions/change-password.js +24 -0
- package/dist/user-profile/actions/get-auth-methods.d.ts +6 -0
- package/dist/user-profile/actions/get-auth-methods.js +23 -0
- package/dist/user-profile/actions/set-password.d.ts +7 -0
- package/dist/user-profile/actions/set-password.js +23 -0
- package/dist/vite/client.d.ts +8 -1
- package/dist/vite/client.js +63 -12
- package/dist/vite/index.d.ts +1 -0
- package/dist/vite/index.js +1 -0
- package/docs/AGENTS.md +7 -2
- package/docs/SKILL.md +7 -5
- package/docs/content/agent-native-config.mdx +165 -0
- package/docs/content/agent-native-toolkit.mdx +1 -1
- package/docs/content/deployment.mdx +7 -2
- package/docs/content/doctor.mdx +21 -13
- package/docs/content/environment-variables.mdx +158 -0
- package/docs/content/file-uploads.mdx +1 -1
- package/docs/content/getting-started.mdx +1 -1
- package/docs/content/key-concepts.mdx +1 -1
- package/docs/content/multi-app-workspace.mdx +1 -1
- package/docs/content/template-clips-ai-and-editing.mdx +6 -6
- package/docs/content/template-clips-developers.mdx +3 -3
- package/docs/content/toolkit-settings.mdx +1 -1
- package/docs/content/voice-input.mdx +4 -4
- package/package.json +7 -2
- package/src/eject/provider-api-definitions.ts +1 -0
- package/src/eject/remote-mcp-presets.ts +1 -0
- package/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +23 -2
- package/src/templates/chat/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/src/templates/chat/AGENTS.md +3 -0
- package/src/templates/chat/DESIGN.md +28 -0
- package/src/templates/chat/agent-native.json +12 -0
- package/src/templates/default/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +23 -2
- package/src/templates/default/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/src/templates/default/AGENTS.md +4 -0
- package/src/templates/default/DESIGN.md +30 -0
- package/src/templates/default/agent-native.json +9 -0
- package/src/templates/default/app/i18n/ar-SA.ts +2 -2
- package/src/templates/default/app/i18n/de-DE.ts +2 -2
- package/src/templates/default/app/i18n/en-US.ts +2 -2
- package/src/templates/default/app/i18n/es-ES.ts +2 -2
- package/src/templates/default/app/i18n/fr-FR.ts +2 -2
- package/src/templates/default/app/i18n/hi-IN.ts +2 -2
- package/src/templates/default/app/i18n/ja-JP.ts +2 -2
- package/src/templates/default/app/i18n/ko-KR.ts +2 -2
- package/src/templates/default/app/i18n/pt-BR.ts +2 -2
- package/src/templates/default/app/i18n/zh-CN.ts +2 -2
- package/src/templates/default/app/i18n/zh-TW.ts +1 -1
- package/src/templates/default/package.json +1 -0
- package/src/templates/headless/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/src/templates/headless/agent-native.json +9 -0
- package/src/templates/headless/package.json +2 -0
- package/src/templates/workspace-core/.agents/skills/agent-native-docs/SKILL.md +23 -3
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +16 -0
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +23 -2
- package/src/templates/workspace-core/.agents/skills/frontend-design/references/visual-direction.md +99 -0
- package/src/templates/workspace-core/AGENTS.md +3 -0
- package/src/templates/workspace-core/DESIGN.md +35 -0
- package/src/templates/workspace-root/AGENTS.md +3 -0
- package/src/templates/workspace-root/DESIGN.md +35 -0
- package/src/templates/workspace-root/agent-native.json +9 -0
- package/src/templates/workspace-root/package.json +3 -0
|
@@ -1,9 +1,39 @@
|
|
|
1
1
|
const FIRST_RUN_ONBOARDING_ENV_KEY = "VITE_AGENT_NATIVE_FIRST_RUN_ONBOARDING";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const value = env[FIRST_RUN_ONBOARDING_ENV_KEY];
|
|
2
|
+
const FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS_ENV_KEY = "VITE_AGENT_NATIVE_FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS";
|
|
3
|
+
function isEnabled(value) {
|
|
5
4
|
return (value === true ||
|
|
6
5
|
(typeof value === "string" &&
|
|
7
6
|
["1", "true"].includes(value.trim().toLowerCase())));
|
|
8
7
|
}
|
|
8
|
+
export function isFirstRunOnboardingEnabled(env = (import.meta.env ?? {}), config = injectedAgentNativeConfig()) {
|
|
9
|
+
return resolveFirstRunOnboardingMode(env, config) !== "off";
|
|
10
|
+
}
|
|
11
|
+
export function shouldSkipFirstRunIntegrations(env = (import.meta.env ?? {}), config = injectedAgentNativeConfig()) {
|
|
12
|
+
if (env[FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS_ENV_KEY] !== undefined) {
|
|
13
|
+
return isEnabled(env[FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS_ENV_KEY]);
|
|
14
|
+
}
|
|
15
|
+
return resolveFirstRunOnboardingMode(env, config) === "connect";
|
|
16
|
+
}
|
|
17
|
+
export function resolveFirstRunOnboardingMode(env = (import.meta.env ?? {}), config = injectedAgentNativeConfig()) {
|
|
18
|
+
const envOnboarding = env[FIRST_RUN_ONBOARDING_ENV_KEY];
|
|
19
|
+
if (envOnboarding !== undefined) {
|
|
20
|
+
if (!isEnabled(envOnboarding))
|
|
21
|
+
return "off";
|
|
22
|
+
return isEnabled(env[FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS_ENV_KEY])
|
|
23
|
+
? "connect"
|
|
24
|
+
: "connect-and-integrations";
|
|
25
|
+
}
|
|
26
|
+
const configured = config.onboarding?.firstRun;
|
|
27
|
+
if (configured === "connect" || configured === "connect-and-integrations") {
|
|
28
|
+
return isEnabled(env[FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS_ENV_KEY])
|
|
29
|
+
? "connect"
|
|
30
|
+
: configured;
|
|
31
|
+
}
|
|
32
|
+
return "off";
|
|
33
|
+
}
|
|
34
|
+
function injectedAgentNativeConfig() {
|
|
35
|
+
return typeof __AGENT_NATIVE_APP_CONFIG__ === "undefined"
|
|
36
|
+
? {}
|
|
37
|
+
: __AGENT_NATIVE_APP_CONFIG__;
|
|
38
|
+
}
|
|
9
39
|
//# sourceMappingURL=first-run-enabled.js.map
|
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
2
|
-
import { FIRST_RUN_ONBOARDING_COOKIE } from "../../shared/first-run-onboarding.js";
|
|
3
2
|
import { agentNativePath } from "../api-path.js";
|
|
4
|
-
function hasFirstRunCookie() {
|
|
5
|
-
if (typeof document === "undefined")
|
|
6
|
-
return false;
|
|
7
|
-
return document.cookie
|
|
8
|
-
.split(";")
|
|
9
|
-
.some((part) => part.trim().startsWith(`${FIRST_RUN_ONBOARDING_COOKIE}=`));
|
|
10
|
-
}
|
|
11
3
|
export function useOnboarding(options = {}) {
|
|
12
4
|
const preview = options.preview === true;
|
|
13
5
|
const [steps, setSteps] = useState([]);
|
|
@@ -15,20 +7,23 @@ export function useOnboarding(options = {}) {
|
|
|
15
7
|
const [loading, setLoading] = useState(true);
|
|
16
8
|
const [error, setError] = useState(null);
|
|
17
9
|
const [dismissed, setDismissed] = useState(false);
|
|
18
|
-
const [firstRun, setFirstRun] = useState(
|
|
10
|
+
const [firstRun, setFirstRun] = useState(preview);
|
|
19
11
|
const mountedRef = useRef(true);
|
|
20
12
|
useEffect(() => {
|
|
21
|
-
setFirstRun(preview
|
|
13
|
+
setFirstRun(preview);
|
|
22
14
|
}, [preview]);
|
|
23
15
|
const fetchAll = useCallback(async () => {
|
|
24
16
|
try {
|
|
25
17
|
const stepsUrl = agentNativePath(preview
|
|
26
18
|
? "/_agent-native/onboarding/steps?preview=1"
|
|
27
19
|
: "/_agent-native/onboarding/steps");
|
|
28
|
-
const [stepsRes, dismissRes, profileRes] = await Promise.all([
|
|
20
|
+
const [stepsRes, dismissRes, profileRes, firstRunRes] = await Promise.all([
|
|
29
21
|
fetch(stepsUrl),
|
|
30
22
|
fetch(agentNativePath("/_agent-native/onboarding/dismissed")),
|
|
31
23
|
fetch(agentNativePath("/_agent-native/onboarding/profile")),
|
|
24
|
+
preview
|
|
25
|
+
? Promise.resolve(null)
|
|
26
|
+
: fetch(agentNativePath("/_agent-native/onboarding/first-run/status")),
|
|
32
27
|
]);
|
|
33
28
|
if (!mountedRef.current)
|
|
34
29
|
return;
|
|
@@ -41,6 +36,16 @@ export function useOnboarding(options = {}) {
|
|
|
41
36
|
throw new Error(`profile: ${profileRes.status}`);
|
|
42
37
|
}
|
|
43
38
|
setProfile((await profileRes.json()));
|
|
39
|
+
if (preview) {
|
|
40
|
+
setFirstRun(true);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
if (!firstRunRes || !firstRunRes.ok) {
|
|
44
|
+
throw new Error(`first-run status: ${firstRunRes?.status ?? 500}`);
|
|
45
|
+
}
|
|
46
|
+
const firstRunData = (await firstRunRes.json());
|
|
47
|
+
setFirstRun(firstRunData.firstRun === true);
|
|
48
|
+
}
|
|
44
49
|
if (dismissRes.ok) {
|
|
45
50
|
const d = (await dismissRes.json());
|
|
46
51
|
setDismissed(!!d.dismissed);
|
|
@@ -37,6 +37,32 @@ export const DEFAULT_MCP_INTEGRATIONS = [
|
|
|
37
37
|
headerPlaceholder: "Authorization: Bearer <sentry-token>",
|
|
38
38
|
keywords: ["errors", "monitoring", "debugging", "issues"],
|
|
39
39
|
},
|
|
40
|
+
{
|
|
41
|
+
id: "fullstory",
|
|
42
|
+
name: "FullStory",
|
|
43
|
+
provider: "fullstory",
|
|
44
|
+
description: "Read behavioral analytics and inspect session replays.",
|
|
45
|
+
descriptionKey: "mcpIntegrations.catalog.fullstory.description",
|
|
46
|
+
useCase: "product analytics, session replay, qualitative behavior, user research",
|
|
47
|
+
useCaseKey: "mcpIntegrations.catalog.fullstory.useCase",
|
|
48
|
+
url: "https://api.fullstory.com/mcp/fullstory",
|
|
49
|
+
authMode: "oauth",
|
|
50
|
+
connectionMode: "oauth",
|
|
51
|
+
availability: "ready",
|
|
52
|
+
verification: "preflight-only",
|
|
53
|
+
logoUrl: mcpIntegrationLogo("fullstory"),
|
|
54
|
+
docsUrl: "https://developer.fullstory.com/mcp/introduction/",
|
|
55
|
+
setupNoteKey: "mcpIntegrations.catalog.fullstory.setupNote",
|
|
56
|
+
keywords: [
|
|
57
|
+
"product analytics",
|
|
58
|
+
"session replay",
|
|
59
|
+
"behavior",
|
|
60
|
+
"user research",
|
|
61
|
+
"sessions",
|
|
62
|
+
"prompts",
|
|
63
|
+
"screenshots",
|
|
64
|
+
],
|
|
65
|
+
},
|
|
40
66
|
{
|
|
41
67
|
id: "notion",
|
|
42
68
|
name: "Notion",
|
|
@@ -19,6 +19,10 @@ const LOGOS = {
|
|
|
19
19
|
mime: "image/svg+xml",
|
|
20
20
|
data: "PHN2ZyBmaWxsPSIjMzYyRDU5IiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+U2VudHJ5PC90aXRsZT48cGF0aCBkPSJNMTMuOTEgMi41MDVjLS44NzMtMS40NDgtMi45NzItMS40NDgtMy44NDQgMEw2LjkwNCA3LjkyYTE1LjQ3OCAxNS40NzggMCAwIDEgOC41MyAxMi44MTFoLTIuMjIxQTEzLjMwMSAxMy4zMDEgMCAwIDAgNS43ODQgOS44MTRsLTIuOTI2IDUuMDZhNy42NSA3LjY1IDAgMCAxIDQuNDM1IDUuODQ4SDIuMTk0YS4zNjUuMzY1IDAgMCAxLS4yOTgtLjUzNGwxLjQxMy0yLjQwMmE1LjE2IDUuMTYgMCAwIDAtMS42MTQtLjkxM0wuMjk2IDE5LjI3NWEyLjE4MiAyLjE4MiAwIDAgMCAuODEyIDIuOTk5IDIuMjQgMi4yNCAwIDAgMCAxLjA4Ni4yODhoNi45ODNhOS4zMjIgOS4zMjIgMCAwIDAtMy44NDUtOC4zMThsMS4xMS0xLjkyMmExMS40NyAxMS40NyAwIDAgMSA0Ljk1IDEwLjI0aDUuOTE1YTE3LjI0MiAxNy4yNDIgMCAwIDAtNy44ODUtMTUuMjhsMi4yNDQtMy44NDVhLjM3LjM3IDAgMCAxIC41MDQtLjEzYy4yNTUuMTQgOS43NSAxNi43MDggOS45MjggMTYuOWEuMzY1LjM2NSAwIDAgMS0uMzI3LjU0M2gtMi4yODdjLjAyOS42MTIuMDI5IDEuMjIzIDAgMS44MzFoMi4yOTdhMi4yMDYgMi4yMDYgMCAwIDAgMS45MjItMy4zMXoiLz48L3N2Zz4=",
|
|
21
21
|
},
|
|
22
|
+
fullstory: {
|
|
23
|
+
mime: "image/svg+xml",
|
|
24
|
+
data: "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTAiIGZpbGw9IiMyZjgwZWQiLz48cGF0aCBkPSJNNyAxMmMxLjgtMyA0LTQuNSA1LTQuNXMzLjIgMS41IDUgNC41Yy0xLjggMy00IDQuNS01IDQuNVM4LjggMTUgNyAxMloiIGZpbGw9IiNmZmYiLz48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIyIiBmaWxsPSIjMmY4MGVkIi8+PC9zdmc+",
|
|
25
|
+
},
|
|
22
26
|
notion: {
|
|
23
27
|
mime: "image/svg+xml",
|
|
24
28
|
data: "PHN2ZyBmaWxsPSIjMDAwMDAwIiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+Tm90aW9uPC90aXRsZT48cGF0aCBkPSJNNC40NTkgNC4yMDhjLjc0Ni42MDYgMS4wMjYuNTYgMi40MjguNDY2bDEzLjIxNS0uNzkzYy4yOCAwIC4wNDctLjI4LS4wNDYtLjMyNkwxNy44NiAxLjk2OGMtLjQyLS4zMjYtLjk4MS0uNy0yLjA1NS0uNjA3TDMuMDEgMi4yOTVjLS40NjYuMDQ2LS41Ni4yOC0uMzc0LjQ2NnptLjc5MyAzLjA4djEzLjkwNGMwIC43NDcuMzczIDEuMDI3IDEuMjE0Ljk4bDE0LjUyMy0uODRjLjg0MS0uMDQ2LjkzNS0uNTYuOTM1LTEuMTY3VjYuMzU0YzAtLjYwNi0uMjMzLS45MzMtLjc0OC0uODg3bC0xNS4xNzcuODg3Yy0uNTYuMDQ3LS43NDcuMzI3LS43NDcuOTMzem0xNC4zMzcuNzQ1Yy4wOTMuNDIgMCAuODQtLjQyLjg4OGwtLjcuMTR2MTAuMjY0Yy0uNjA4LjMyNy0xLjE2OC41MTQtMS42MzUuNTE0LS43NDggMC0uOTM1LS4yMzQtMS40OTUtLjkzM2wtNC41NzctNy4xODZ2Ni45NTJMMTIuMjEgMTlzMCAuODQtMS4xNjguODRsLTMuMjIyLjE4NmMtLjA5My0uMTg2IDAtLjY1My4zMjctLjc0NmwuODQtLjIzM1Y5Ljg1NEw3LjgyMiA5Ljc2Yy0uMDk0LS40Mi4xNC0xLjAyNi43OTMtMS4wNzNsMy40NTYtLjIzMyA0Ljc2NCA3LjI3OXYtNi40NGwtMS4yMTUtLjEzOWMtLjA5My0uNTE0LjI4LS44ODcuNzQ3LS45MzN6TTEuOTM2IDEuMDM1bDEzLjMxLS45OGMxLjYzNC0uMTQgMi4wNTUtLjA0NyAzLjA4Mi43bDQuMjQ5IDIuOTg2Yy43LjUxMy45MzQuNjUzLjkzNCAxLjIxM3YxNi4zNzhjMCAxLjAyNi0uMzczIDEuNjM0LTEuNjggMS43MjZsLTE1LjQ1OC45MzRjLS45OC4wNDctMS40NDgtLjA5My0xLjk2Mi0uNzQ3bC0zLjEyOS00LjA2Yy0uNTYtLjc0Ny0uNzkzLTEuMzA2LS43OTMtMS45NlYyLjY2N2MwLS44MzkuMzc0LTEuNTQgMS40NDctMS42MzJ6Ii8+PC9zdmc+",
|
|
@@ -292,7 +292,7 @@ export function AgentNativeRouteWarmup({ config, }) {
|
|
|
292
292
|
if (resolved.strategy === "off") {
|
|
293
293
|
return;
|
|
294
294
|
}
|
|
295
|
-
// Legacy SPA builds still mount
|
|
295
|
+
// Legacy SPA builds still mount AppProviders but do not expose React
|
|
296
296
|
// Router framework `.data` endpoints or a route asset manifest. Only warm
|
|
297
297
|
// route data/modules when that manifest is present; otherwise this would
|
|
298
298
|
// generate noisy `/<path>.data` 404s for apps that cannot serve them.
|
|
@@ -314,28 +314,69 @@ export function AgentNativeRouteWarmup({ config, }) {
|
|
|
314
314
|
seedExistingModulepreloads();
|
|
315
315
|
const queue = [];
|
|
316
316
|
const queuedDataRoutes = new Set();
|
|
317
|
+
const dataRetryAttempts = new Map();
|
|
318
|
+
const retryTimers = new Set();
|
|
317
319
|
const observedLinks = new WeakSet();
|
|
318
320
|
let active = 0;
|
|
319
321
|
let stopped = false;
|
|
320
322
|
let scheduleTimer;
|
|
323
|
+
const scheduleDataRetry = (dataUrl, href) => {
|
|
324
|
+
if (stopped)
|
|
325
|
+
return;
|
|
326
|
+
const attempt = (dataRetryAttempts.get(dataUrl) ?? 0) + 1;
|
|
327
|
+
if (attempt > 3) {
|
|
328
|
+
queuedDataRoutes.delete(dataUrl);
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
dataRetryAttempts.set(dataUrl, attempt);
|
|
332
|
+
const timer = window.setTimeout(() => {
|
|
333
|
+
retryTimers.delete(timer);
|
|
334
|
+
if (stopped)
|
|
335
|
+
return;
|
|
336
|
+
queuedDataRoutes.delete(dataUrl);
|
|
337
|
+
warmedDataRoutes.delete(dataUrl);
|
|
338
|
+
warmHref(href);
|
|
339
|
+
}, 500 * 2 ** (attempt - 1));
|
|
340
|
+
retryTimers.add(timer);
|
|
341
|
+
};
|
|
321
342
|
const pump = () => {
|
|
322
343
|
if (stopped || !warmData)
|
|
323
344
|
return;
|
|
324
345
|
while (active < resolved.maxConcurrent && queue.length > 0) {
|
|
325
|
-
const
|
|
326
|
-
if (!
|
|
346
|
+
const item = queue.shift();
|
|
347
|
+
if (!item)
|
|
327
348
|
continue;
|
|
328
349
|
active += 1;
|
|
329
350
|
window
|
|
330
|
-
.fetch(
|
|
331
|
-
|
|
351
|
+
.fetch(item.dataUrl, {
|
|
352
|
+
credentials: "same-origin",
|
|
353
|
+
cache: "force-cache",
|
|
354
|
+
})
|
|
355
|
+
.then((response) => {
|
|
356
|
+
if (response.ok) {
|
|
357
|
+
dataRetryAttempts.delete(item.dataUrl);
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
warmedDataRoutes.delete(item.dataUrl);
|
|
361
|
+
if (response.status >= 500 || response.status === 429) {
|
|
362
|
+
scheduleDataRetry(item.dataUrl, item.href);
|
|
363
|
+
}
|
|
364
|
+
else {
|
|
365
|
+
queuedDataRoutes.delete(item.dataUrl);
|
|
366
|
+
dataRetryAttempts.delete(item.dataUrl);
|
|
367
|
+
}
|
|
368
|
+
})
|
|
369
|
+
.catch(() => {
|
|
370
|
+
warmedDataRoutes.delete(item.dataUrl);
|
|
371
|
+
scheduleDataRetry(item.dataUrl, item.href);
|
|
372
|
+
})
|
|
332
373
|
.finally(() => {
|
|
333
374
|
active -= 1;
|
|
334
375
|
window.setTimeout(pump, 50);
|
|
335
376
|
});
|
|
336
377
|
}
|
|
337
378
|
};
|
|
338
|
-
|
|
379
|
+
function warmHref(href) {
|
|
339
380
|
if (warmModules)
|
|
340
381
|
warmRouteAssetsForHref(href);
|
|
341
382
|
if (!warmData)
|
|
@@ -347,9 +388,9 @@ export function AgentNativeRouteWarmup({ config, }) {
|
|
|
347
388
|
if (queuedDataRoutes.has(dataUrl))
|
|
348
389
|
return;
|
|
349
390
|
queuedDataRoutes.add(dataUrl);
|
|
350
|
-
queue.push(dataUrl);
|
|
391
|
+
queue.push({ dataUrl, href });
|
|
351
392
|
pump();
|
|
352
|
-
}
|
|
393
|
+
}
|
|
353
394
|
const viewportObserver = typeof IntersectionObserver === "undefined"
|
|
354
395
|
? null
|
|
355
396
|
: new IntersectionObserver((entries) => {
|
|
@@ -415,12 +456,14 @@ export function AgentNativeRouteWarmup({ config, }) {
|
|
|
415
456
|
};
|
|
416
457
|
schedule();
|
|
417
458
|
const observer = new MutationObserver(schedule);
|
|
418
|
-
//
|
|
419
|
-
//
|
|
459
|
+
// Route links are added by hydration/navigation and can opt into a mode
|
|
460
|
+
// after render. Avoid watching every attribute: scroll-driven style/class
|
|
461
|
+
// changes otherwise rescan the entire document while a page is settling.
|
|
420
462
|
observer.observe(document.documentElement, {
|
|
421
463
|
subtree: true,
|
|
422
464
|
childList: true,
|
|
423
465
|
attributes: true,
|
|
466
|
+
attributeFilter: [PREFETCH_ATTR, "href"],
|
|
424
467
|
});
|
|
425
468
|
document.addEventListener("pointerover", warmFromIntent, {
|
|
426
469
|
capture: true,
|
|
@@ -435,6 +478,9 @@ export function AgentNativeRouteWarmup({ config, }) {
|
|
|
435
478
|
stopped = true;
|
|
436
479
|
if (scheduleTimer !== undefined)
|
|
437
480
|
window.clearTimeout(scheduleTimer);
|
|
481
|
+
for (const timer of retryTimers)
|
|
482
|
+
window.clearTimeout(timer);
|
|
483
|
+
retryTimers.clear();
|
|
438
484
|
observer.disconnect();
|
|
439
485
|
viewportObserver?.disconnect();
|
|
440
486
|
document.removeEventListener("pointerover", warmFromIntent, true);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ActionButton, Avatar, Surface, TextField, } from "@agent-native/toolkit/design-system";
|
|
3
|
-
import { IconCamera, IconCheck } from "@tabler/icons-react";
|
|
3
|
+
import { IconCamera, IconCheck, IconLock } from "@tabler/icons-react";
|
|
4
4
|
import { useEffect, useRef, useState } from "react";
|
|
5
5
|
import { useT } from "../i18n.js";
|
|
6
6
|
import { useActionMutation, useActionQuery } from "../use-action.js";
|
|
@@ -16,6 +16,81 @@ function profileInitials(name) {
|
|
|
16
16
|
.map((part) => part[0]?.toUpperCase())
|
|
17
17
|
.join("") || "?");
|
|
18
18
|
}
|
|
19
|
+
function PasswordSettings() {
|
|
20
|
+
const t = useT();
|
|
21
|
+
const { session } = useSession();
|
|
22
|
+
const authMethods = useActionQuery("get-auth-methods", undefined, { enabled: !!session?.email });
|
|
23
|
+
const setPassword = useActionMutation("set-password");
|
|
24
|
+
const changePassword = useActionMutation("change-password");
|
|
25
|
+
const [currentPassword, setCurrentPassword] = useState("");
|
|
26
|
+
const [newPassword, setNewPassword] = useState("");
|
|
27
|
+
const [confirmPassword, setConfirmPassword] = useState("");
|
|
28
|
+
const [validationError, setValidationError] = useState(null);
|
|
29
|
+
const [saved, setSaved] = useState(false);
|
|
30
|
+
const mutation = authMethods.data?.hasPassword ? changePassword : setPassword;
|
|
31
|
+
const error = validationError
|
|
32
|
+
? validationError === "length"
|
|
33
|
+
? t("settings.passwordMinLength")
|
|
34
|
+
: t("settings.passwordMismatch")
|
|
35
|
+
: mutation.error
|
|
36
|
+
? t("settings.passwordSaveError")
|
|
37
|
+
: undefined;
|
|
38
|
+
const clearStatus = () => {
|
|
39
|
+
setSaved(false);
|
|
40
|
+
setValidationError(null);
|
|
41
|
+
setPassword.reset();
|
|
42
|
+
changePassword.reset();
|
|
43
|
+
};
|
|
44
|
+
const submit = () => {
|
|
45
|
+
setSaved(false);
|
|
46
|
+
setValidationError(null);
|
|
47
|
+
if (newPassword.length < 8) {
|
|
48
|
+
setValidationError("length");
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (newPassword !== confirmPassword) {
|
|
52
|
+
setValidationError("mismatch");
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
const onSuccess = () => {
|
|
56
|
+
setCurrentPassword("");
|
|
57
|
+
setNewPassword("");
|
|
58
|
+
setConfirmPassword("");
|
|
59
|
+
setSaved(true);
|
|
60
|
+
void authMethods.refetch();
|
|
61
|
+
};
|
|
62
|
+
if (authMethods.data?.hasPassword) {
|
|
63
|
+
changePassword.mutate({ currentPassword, newPassword }, { onSuccess });
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
setPassword.mutate({ newPassword }, { onSuccess });
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const isPending = setPassword.isPending || changePassword.isPending;
|
|
70
|
+
const isLoading = authMethods.isLoading;
|
|
71
|
+
const hasPassword = authMethods.data?.hasPassword ?? false;
|
|
72
|
+
if (!session?.email)
|
|
73
|
+
return null;
|
|
74
|
+
return (_jsxs("div", { className: "space-y-3 border-t border-border/60 pt-3", children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsx(IconLock, { className: "mt-0.5 size-4 text-muted-foreground" }), _jsxs("div", { children: [_jsx("h3", { className: "text-sm font-medium", children: hasPassword
|
|
75
|
+
? t("settings.passwordChange")
|
|
76
|
+
: t("settings.passwordTitle") }), _jsx("p", { className: "text-xs leading-5 text-muted-foreground", children: t("settings.passwordDescription") })] })] }), isLoading ? (_jsx("p", { className: "text-xs text-muted-foreground", children: t("settings.passwordStatusLoading") })) : authMethods.error ? (_jsx("p", { className: "text-xs text-destructive", children: t("settings.passwordSaveError") })) : (_jsxs(_Fragment, { children: [hasPassword && (_jsx(TextField, { id: "agent-native-current-password", type: "password", label: t("settings.passwordCurrentLabel"), value: currentPassword, onChange: (value) => {
|
|
77
|
+
clearStatus();
|
|
78
|
+
setCurrentPassword(value);
|
|
79
|
+
}, placeholder: t("settings.passwordPlaceholder"), autoComplete: "current-password", disabled: isPending })), _jsx(TextField, { id: "agent-native-new-password", type: "password", label: t("settings.passwordNewLabel"), value: newPassword, onChange: (value) => {
|
|
80
|
+
clearStatus();
|
|
81
|
+
setNewPassword(value);
|
|
82
|
+
}, placeholder: t("settings.passwordPlaceholder"), autoComplete: hasPassword ? "new-password" : "new-password", disabled: isPending, invalid: !!error }), _jsx(TextField, { id: "agent-native-confirm-password", type: "password", label: t("settings.passwordConfirmLabel"), value: confirmPassword, onChange: (value) => {
|
|
83
|
+
clearStatus();
|
|
84
|
+
setConfirmPassword(value);
|
|
85
|
+
}, placeholder: t("settings.passwordPlaceholder"), autoComplete: "new-password", disabled: isPending, invalid: !!error, errorMessage: error }), _jsxs("div", { className: "flex items-center justify-between gap-3", children: [_jsx("div", { className: "min-h-4 text-xs", children: saved && (_jsxs("p", { className: "flex items-center gap-1 text-primary", children: [_jsx(IconCheck, { className: "size-3" }), t("settings.passwordSaved")] })) }), _jsx(ActionButton, { type: "button", intent: "primary", emphasis: "solid", size: "compact", pending: isPending, disabled: isPending ||
|
|
86
|
+
!newPassword ||
|
|
87
|
+
!confirmPassword ||
|
|
88
|
+
(hasPassword && !currentPassword), onPress: submit, children: isPending
|
|
89
|
+
? t("settings.passwordSaving")
|
|
90
|
+
: hasPassword
|
|
91
|
+
? t("settings.passwordChange")
|
|
92
|
+
: t("settings.passwordAdd") })] })] }))] }));
|
|
93
|
+
}
|
|
19
94
|
export function AccountSettingsForm({ compact = false, }) {
|
|
20
95
|
const t = useT();
|
|
21
96
|
const { session, isLoading } = useSession();
|
|
@@ -74,6 +149,6 @@ export function AccountSettingsForm({ compact = false, }) {
|
|
|
74
149
|
}
|
|
75
150
|
export function AccountSettingsCard({ className }) {
|
|
76
151
|
const t = useT();
|
|
77
|
-
return (_jsxs(Surface, { as: "section", id: "account", elevation: "low", padding: "none", className: cn("mx-auto w-full max-w-2xl scroll-mt-4 rounded-lg border border-border bg-card p-5 text-card-foreground shadow-sm", className), children: [_jsxs("div", { className: "space-y-1", children: [_jsx("h2", { className: "text-base font-semibold", children: t("settings.profileTitle") }), _jsx("p", { className: "text-sm leading-6 text-muted-foreground", children: t("settings.profileDescription") })] }),
|
|
152
|
+
return (_jsxs(Surface, { as: "section", id: "account", elevation: "low", padding: "none", className: cn("mx-auto w-full max-w-2xl scroll-mt-4 rounded-lg border border-border bg-card p-5 text-card-foreground shadow-sm", className), children: [_jsxs("div", { className: "space-y-1", children: [_jsx("h2", { className: "text-base font-semibold", children: t("settings.profileTitle") }), _jsx("p", { className: "text-sm leading-6 text-muted-foreground", children: t("settings.profileDescription") })] }), _jsxs("div", { className: "mt-5", children: [_jsx(AccountSettingsForm, {}), _jsx(PasswordSettings, {})] })] }));
|
|
78
153
|
}
|
|
79
154
|
//# sourceMappingURL=AccountSettingsCard.js.map
|
|
@@ -31,7 +31,7 @@ import { settingsSectionDomId, useSettingsPanelController, } from "./useSettings
|
|
|
31
31
|
import { VoiceTranscriptionSection } from "./VoiceTranscriptionSection.js";
|
|
32
32
|
const Button = React.forwardRef(({ className, ...props }, ref) => (_jsx(ToolkitButton, { ref: ref, variant: "ghost", className: cn("h-auto p-0 hover:bg-transparent hover:text-inherit active:scale-100 [&_svg]:!size-auto", className), ...props })));
|
|
33
33
|
Button.displayName = "SettingsPrimitiveButton";
|
|
34
|
-
const ManageButton = React.forwardRef(({ children = "Manage", className, ...props }, ref) => (
|
|
34
|
+
const ManageButton = React.forwardRef(({ children = "Manage", className, ...props }, ref) => (_jsx(Button, { ref: ref, type: "button", intent: "neutral", emphasis: "outline", className: cn("inline-flex items-center gap-1 rounded-md border border-border px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent/40", className), ...props, children: children })));
|
|
35
35
|
ManageButton.displayName = "SettingsManageButton";
|
|
36
36
|
const IntegrationsPanel = lazy(() => import("../integrations/IntegrationsPanel.js").then((m) => ({
|
|
37
37
|
default: m.IntegrationsPanel,
|
|
@@ -282,7 +282,7 @@ export function VoiceTranscriptionSection({ compact = false, } = {}) {
|
|
|
282
282
|
return (_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "rounded-md border border-border bg-background p-2", children: [_jsx("div", { className: "mb-2 flex items-start justify-between gap-3 px-0.5", children: _jsxs("div", { children: [_jsx("div", { className: "text-[11px] font-medium text-foreground", children: "Live transcription" }), _jsx("p", { className: "mt-0.5 text-[10px] text-muted-foreground", children: "Choose where real-time words come from. Batch still runs after recording stops." })] }) }), _jsxs("div", { className: "space-y-2", children: [_jsx(ProviderOption, { id: "mac-native", selected: transcriptionMode === "mac-native", onSelect: () => chooseSource("mac-native"), title: "Mac Native", subtitle: "Free and fast in the macOS Tauri app. Web clients use the existing browser-native path when available.", rightSlot: _jsx("span", { className: "text-[10px] text-muted-foreground", children: "Tauri default" }) }), _jsx(ProviderOption, { id: "google-realtime", selected: transcriptionMode === "google-realtime", onSelect: () => chooseSource("google-realtime"), disabled: !googleRealtimeReady, title: "Google Realtime", subtitle: googleRealtimeReady
|
|
283
283
|
? "BYOK only for v1. Streams live partials and finals through Google Speech-to-Text."
|
|
284
284
|
: googleRealtimeConfigured
|
|
285
|
-
? "Google credentials are set. Connect Builder completely to mint the managed realtime session."
|
|
285
|
+
? "Google credentials are set. Connect Builder completely (free tier available) to mint the managed realtime session."
|
|
286
286
|
: "BYOK only for v1. Configure Google service account before selecting this source.", rightSlot: googleRealtimeReady ? (_jsxs("span", { className: "flex items-center gap-1 text-[10px] text-green-500", children: [_jsx(IconCheck, { size: 10 }), "Ready"] })) : googleRealtimeConfigured ? (_jsx("button", { type: "button", onClick: (e) => {
|
|
287
287
|
e.stopPropagation();
|
|
288
288
|
openBuilderConnect();
|
|
@@ -295,7 +295,7 @@ export function VoiceTranscriptionSection({ compact = false, } = {}) {
|
|
|
295
295
|
: geminiConfigured
|
|
296
296
|
? "Gemini key set"
|
|
297
297
|
: "Needs key" }))] })] }), _jsxs("div", { className: "rounded-md border border-border bg-background", children: [_jsxs("button", { type: "button", onClick: () => setShowAdvanced((v) => !v), className: "w-full flex items-center justify-between gap-2 px-2.5 py-2 cursor-pointer", children: [_jsxs("span", { className: "text-[11px] font-medium text-foreground inline-flex items-center gap-1", children: [showAdvanced ? (_jsx(IconChevronDown, { size: 12 })) : (_jsx(IconChevronRight, { size: 12, className: "rtl:-scale-x-100" })), "Add API keys"] }), _jsx("span", { className: "text-[10px] text-muted-foreground", children: "Google STT \u00B7 Gemini \u00B7 Groq \u00B7 OpenAI" })] }), showAdvanced && (_jsxs("div", { className: "px-2 pb-2 space-y-2", children: [_jsx(ProviderOption, { id: "google-service-account", selected: transcriptionMode === "google-realtime", onSelect: () => chooseSource("google-realtime"), disabled: !googleRealtimeReady, title: "Google Speech-to-Text service account", subtitle: googleRealtimeConfigured
|
|
298
|
-
? "Service-account JSON is set. Connect Builder to mint the managed realtime WebSocket session."
|
|
298
|
+
? "Service-account JSON is set. Connect Builder (free tier available) to mint the managed realtime WebSocket session."
|
|
299
299
|
: "Service-account JSON for the dedicated realtime WebSocket to Google StreamingRecognize.", rightSlot: googleRealtimeConfigured ===
|
|
300
300
|
null ? null : googleRealtimeReady ? (_jsxs("span", { className: "flex items-center gap-1 text-[10px] text-green-500", children: [_jsx(IconCheck, { size: 10 }), "Ready"] })) : googleRealtimeConfigured ? (_jsx("button", { type: "button", onClick: (e) => {
|
|
301
301
|
e.stopPropagation();
|
|
@@ -583,7 +583,7 @@ export function useBuilderConnectFlow(opts = {}) {
|
|
|
583
583
|
stopPoll();
|
|
584
584
|
connectStartedAtRef.current = null;
|
|
585
585
|
setConnecting(false);
|
|
586
|
-
setError("Couldn't open Builder from this chat host. Open this app in a browser tab and try Connect Builder again.");
|
|
586
|
+
setError("Couldn't open Builder from this chat host. Open this app in a browser tab and try Connect Builder (free tier available) again.");
|
|
587
587
|
})();
|
|
588
588
|
}
|
|
589
589
|
else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useCallback } from "react";
|
|
2
2
|
import { useBuilderConnectFlow } from "../settings/useBuilderStatus.js";
|
|
3
3
|
const DEFAULT_TITLE = "Builder connect";
|
|
4
|
-
const DEFAULT_DESCRIPTION = "Connect Builder for managed model access, browser automation, and workspace identity.";
|
|
4
|
+
const DEFAULT_DESCRIPTION = "Connect Builder for managed model access, browser automation, and workspace identity. Free tier available.";
|
|
5
5
|
const DEFAULT_TRACKING_SOURCE = "setup_connections_page";
|
|
6
6
|
export function useBuilderConnectCardController({ title = DEFAULT_TITLE, description = DEFAULT_DESCRIPTION, trackingSource = DEFAULT_TRACKING_SOURCE, onConnected, } = {}) {
|
|
7
7
|
const handleConnected = useCallback(({ orgName }) => onConnected?.(orgName), [onConnected]);
|
|
@@ -11,6 +11,7 @@ export { getClientSurface, type ClientSurface } from "../client-surface.js";
|
|
|
11
11
|
export { ErrorBoundary } from "../ErrorBoundary.js";
|
|
12
12
|
export { ClientOnly } from "../ClientOnly.js";
|
|
13
13
|
export { DefaultSpinner } from "../DefaultSpinner.js";
|
|
14
|
+
export { RouteTransitionIndicator, ROUTE_TRANSITION_INDICATOR_DELAY_MS, } from "../RouteTransitionIndicator.js";
|
|
14
15
|
export { getThemeInitScript, themeInitScript, type ThemePreference, } from "../theme.js";
|
|
15
16
|
export { APPEARANCE_PRESETS, applyAppearance, getStoredAppearance, useAppearance, useAppearanceSync, type AppearancePresetId, } from "../appearance.js";
|
|
16
17
|
export { AppearancePicker, type AppearancePickerProps, } from "../AppearancePicker.js";
|
package/dist/client/ui/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export { getClientSurface } from "../client-surface.js";
|
|
|
11
11
|
export { ErrorBoundary } from "../ErrorBoundary.js";
|
|
12
12
|
export { ClientOnly } from "../ClientOnly.js";
|
|
13
13
|
export { DefaultSpinner } from "../DefaultSpinner.js";
|
|
14
|
+
export { RouteTransitionIndicator, ROUTE_TRANSITION_INDICATOR_DELAY_MS, } from "../RouteTransitionIndicator.js";
|
|
14
15
|
export { getThemeInitScript, themeInitScript, } from "../theme.js";
|
|
15
16
|
export { APPEARANCE_PRESETS, applyAppearance, getStoredAppearance, useAppearance, useAppearanceSync, } from "../appearance.js";
|
|
16
17
|
export { AppearancePicker, } from "../AppearancePicker.js";
|
|
@@ -48,7 +48,7 @@ export const uploadEditorImage = async (file) => {
|
|
|
48
48
|
});
|
|
49
49
|
if (!result || typeof result.url !== "string" || !result.url) {
|
|
50
50
|
throw new Error(result?.error ||
|
|
51
|
-
"Image upload failed. Connect Builder.io in Settings → File uploads, then try again.");
|
|
51
|
+
"Image upload failed. Connect Builder.io (free tier available) in Settings → File uploads, then try again.");
|
|
52
52
|
}
|
|
53
53
|
// Use the filename (sans extension) as a reasonable default alt text.
|
|
54
54
|
const alt = file.name ? file.name.replace(/\.[^./\\]+$/, "") : "";
|
|
@@ -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;
|
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;
|
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
|