@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
package/dist/vite/client.js
CHANGED
|
@@ -2,10 +2,11 @@ import { EventEmitter } from "events";
|
|
|
2
2
|
import fs from "fs";
|
|
3
3
|
import { createRequire, syncBuiltinESMExports } from "module";
|
|
4
4
|
import path from "path";
|
|
5
|
-
import { fileURLToPath } from "url";
|
|
5
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
6
6
|
import { renderDesignSystemThemeCss, } from "@agent-native/toolkit/design-system/theme";
|
|
7
7
|
import { mergePendingChangelog, parsePendingEntry, } from "../changelog/parse.js";
|
|
8
8
|
import { getViteDevRecoveryScript } from "../client/vite-dev-recovery-script.js";
|
|
9
|
+
import { mergeAgentNativeConfigs, normalizeAgentNativeConfig, resolveAgentNativeConfig, } from "../config.js";
|
|
9
10
|
import { writeAgentNativeNitroPresetMarker } from "../deploy/nitro-preset.js";
|
|
10
11
|
import { findWorkspaceRoot } from "../scripts/utils.js";
|
|
11
12
|
import { verifyEmbedSessionToken } from "../server/embed-session.js";
|
|
@@ -820,8 +821,8 @@ function getReactRouterAliases(cwd) {
|
|
|
820
821
|
function getAssistantUiAliases(cwd) {
|
|
821
822
|
try {
|
|
822
823
|
const appRequire = createRequire(path.join(cwd, "package.json"));
|
|
823
|
-
const
|
|
824
|
-
const
|
|
824
|
+
const assistantUiEntry = appRequire.resolve("@assistant-ui/react");
|
|
825
|
+
const assistantUiRequire = createRequire(assistantUiEntry);
|
|
825
826
|
return [
|
|
826
827
|
// A linked framework checkout can otherwise resolve the assistant-ui
|
|
827
828
|
// imports in core's source graph from the checkout's React 19.2.7 peer
|
|
@@ -830,27 +831,27 @@ function getAssistantUiAliases(cwd) {
|
|
|
830
831
|
// to the consuming app's installed peer graph explicitly.
|
|
831
832
|
{
|
|
832
833
|
find: /^@assistant-ui\/react$/,
|
|
833
|
-
replacement:
|
|
834
|
+
replacement: assistantUiRequire.resolve("@assistant-ui/react"),
|
|
834
835
|
},
|
|
835
836
|
{
|
|
836
837
|
find: /^@assistant-ui\/core$/,
|
|
837
|
-
replacement:
|
|
838
|
+
replacement: assistantUiRequire.resolve("@assistant-ui/core"),
|
|
838
839
|
},
|
|
839
840
|
{
|
|
840
841
|
find: /^@assistant-ui\/store$/,
|
|
841
|
-
replacement:
|
|
842
|
+
replacement: assistantUiRequire.resolve("@assistant-ui/store"),
|
|
842
843
|
},
|
|
843
844
|
{
|
|
844
845
|
find: /^@assistant-ui\/tap$/,
|
|
845
|
-
replacement:
|
|
846
|
+
replacement: assistantUiRequire.resolve("@assistant-ui/tap"),
|
|
846
847
|
},
|
|
847
848
|
{
|
|
848
849
|
find: /^assistant-stream$/,
|
|
849
|
-
replacement:
|
|
850
|
+
replacement: assistantUiRequire.resolve("assistant-stream"),
|
|
850
851
|
},
|
|
851
852
|
{
|
|
852
853
|
find: /^assistant-stream\/utils$/,
|
|
853
|
-
replacement:
|
|
854
|
+
replacement: assistantUiRequire.resolve("assistant-stream/utils"),
|
|
854
855
|
},
|
|
855
856
|
];
|
|
856
857
|
}
|
|
@@ -2608,8 +2609,54 @@ function resolveAgentNativeTemplate(cwd) {
|
|
|
2608
2609
|
?.trim()
|
|
2609
2610
|
.toLowerCase() ?? "");
|
|
2610
2611
|
}
|
|
2611
|
-
function
|
|
2612
|
+
function createAgentNativeConfigContext(command, mode) {
|
|
2613
|
+
const resolvedCommand = command === "build" ? "build" : "serve";
|
|
2614
|
+
return {
|
|
2615
|
+
command: resolvedCommand,
|
|
2616
|
+
mode,
|
|
2617
|
+
isDev: resolvedCommand === "serve",
|
|
2618
|
+
isBuild: resolvedCommand === "build",
|
|
2619
|
+
};
|
|
2620
|
+
}
|
|
2621
|
+
function readAgentNativeJsonConfig(cwd) {
|
|
2622
|
+
const configPath = path.join(cwd, "agent-native.json");
|
|
2623
|
+
if (!fs.existsSync(configPath))
|
|
2624
|
+
return {};
|
|
2625
|
+
let parsed;
|
|
2626
|
+
try {
|
|
2627
|
+
parsed = JSON.parse(fs.readFileSync(configPath, "utf8"));
|
|
2628
|
+
}
|
|
2629
|
+
catch (error) {
|
|
2630
|
+
throw new Error(`Could not read ${configPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
2631
|
+
}
|
|
2632
|
+
return normalizeAgentNativeConfig(parsed, configPath);
|
|
2633
|
+
}
|
|
2634
|
+
async function loadAgentNativeConfigFile(cwd) {
|
|
2635
|
+
const candidates = ["agent-native.config.ts", "agent-native.config.mts"];
|
|
2636
|
+
const configPath = candidates
|
|
2637
|
+
.map((filename) => path.join(cwd, filename))
|
|
2638
|
+
.find((candidate) => fs.existsSync(candidate));
|
|
2639
|
+
if (!configPath)
|
|
2640
|
+
return undefined;
|
|
2641
|
+
try {
|
|
2642
|
+
const module = (await import(pathToFileURL(configPath).href));
|
|
2643
|
+
const config = module.default ?? module.agentNativeConfig;
|
|
2644
|
+
if (typeof config !== "object" && typeof config !== "function") {
|
|
2645
|
+
throw new Error("the default export must be an object or function");
|
|
2646
|
+
}
|
|
2647
|
+
return config;
|
|
2648
|
+
}
|
|
2649
|
+
catch (error) {
|
|
2650
|
+
throw new Error(`Could not load ${configPath}: ${error instanceof Error ? error.message : String(error)}`);
|
|
2651
|
+
}
|
|
2652
|
+
}
|
|
2653
|
+
function createAgentNativeConfig(options = {}, command, userConfig = {}, mode = process.env.NODE_ENV === "production" ? "production" : "development", projectConfig) {
|
|
2612
2654
|
const cwd = process.cwd();
|
|
2655
|
+
const configContext = createAgentNativeConfigContext(command, mode);
|
|
2656
|
+
const projectConfigInput = projectConfig ?? options.agentNativeConfig;
|
|
2657
|
+
const appConfig = resolveAgentNativeConfig(mergeAgentNativeConfigs(readAgentNativeJsonConfig(cwd), projectConfigInput
|
|
2658
|
+
? resolveAgentNativeConfig(projectConfigInput, configContext)
|
|
2659
|
+
: {}), configContext);
|
|
2613
2660
|
const buildId = process.env.DEPLOY_ID?.trim() ||
|
|
2614
2661
|
process.env.COMMIT_REF?.trim() ||
|
|
2615
2662
|
process.env.VERCEL_GIT_COMMIT_SHA?.trim() ||
|
|
@@ -2688,6 +2735,7 @@ function createAgentNativeConfig(options = {}, command, userConfig = {}) {
|
|
|
2688
2735
|
...(options.define ?? {}),
|
|
2689
2736
|
__AGENT_NATIVE_BUILD_ID__: JSON.stringify(buildId),
|
|
2690
2737
|
__AGENT_NATIVE_CLIENT_COMPATIBILITY_VERSION__: JSON.stringify(options.clientCompatibilityVersion?.trim() || ""),
|
|
2738
|
+
__AGENT_NATIVE_APP_CONFIG__: JSON.stringify(appConfig),
|
|
2691
2739
|
__AGENT_NATIVE_BUILD_GA_MEASUREMENT_ID__: JSON.stringify(process.env.GA_MEASUREMENT_ID?.trim() || ""),
|
|
2692
2740
|
"process.env.AGENT_NATIVE_BUILD_GA_MEASUREMENT_ID": JSON.stringify(process.env.GA_MEASUREMENT_ID?.trim() || ""),
|
|
2693
2741
|
__AGENT_NATIVE_BUILD_GTM_CONTAINER_ID__: JSON.stringify(process.env.GTM_CONTAINER_ID?.trim() || ""),
|
|
@@ -2917,8 +2965,11 @@ export function agentNative(options = {}) {
|
|
|
2917
2965
|
{
|
|
2918
2966
|
name: "agent-native-config",
|
|
2919
2967
|
enforce: "pre",
|
|
2920
|
-
config(config, env) {
|
|
2921
|
-
|
|
2968
|
+
async config(config, env) {
|
|
2969
|
+
const projectConfig = options.agentNativeConfig === undefined
|
|
2970
|
+
? await loadAgentNativeConfigFile(process.cwd())
|
|
2971
|
+
: undefined;
|
|
2972
|
+
return createAgentNativeConfig(options, env.command, config, env.mode, projectConfig);
|
|
2922
2973
|
},
|
|
2923
2974
|
},
|
|
2924
2975
|
...createAgentNativePlugins(options, {
|
package/dist/vite/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { agentNative, defineConfig, type AgentNativeVitePluginOptions, type ClientConfigOptions, type NitroOptions, } from "./client.js";
|
|
2
|
+
export { defineAgentNativeConfig, type AgentNativeConfig, type AgentNativeConfigContext, type AgentNativeConfigFactory, type AgentNativeConfigInput, type AgentNativeFirstRunOnboardingMode, type AgentNativeFirstRunOnboardingSetting, } from "../config.js";
|
|
2
3
|
export type { AgentNativeRouteWarmupConfigInput, AgentNativeRouteWarmupResolvedConfig, AgentNativeRouteWarmupStrategy, } from "../shared/route-warmup-config.js";
|
|
3
4
|
export { actionTypesPlugin, generateActionRegistryForProject, } from "./action-types-plugin.js";
|
|
4
5
|
export { agentsBundlePlugin } from "./agents-bundle-plugin.js";
|
package/dist/vite/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { agentNative, defineConfig, } from "./client.js";
|
|
2
|
+
export { defineAgentNativeConfig, } from "../config.js";
|
|
2
3
|
export { actionTypesPlugin, generateActionRegistryForProject, } from "./action-types-plugin.js";
|
|
3
4
|
export { agentsBundlePlugin } from "./agents-bundle-plugin.js";
|
|
4
5
|
export { createAgentWebVitePlugin, } from "./agent-web-plugin.js";
|
package/docs/AGENTS.md
CHANGED
|
@@ -21,6 +21,9 @@ version installed in the app.
|
|
|
21
21
|
From a generated app root:
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
+
pnpm action framework-search --pattern "defineAction"
|
|
25
|
+
pnpm action framework-search --pattern "templates/*/actions/*.ts" --mode glob --scope source
|
|
26
|
+
pnpm action framework-search --pattern "Agent(?:Panel|Sidebar)" --mode regex --scope source
|
|
24
27
|
pnpm action docs-search --list
|
|
25
28
|
pnpm action docs-search --query "actions"
|
|
26
29
|
pnpm action docs-search --slug actions
|
|
@@ -30,8 +33,10 @@ pnpm action source-search --path templates/plan/AGENTS.md
|
|
|
30
33
|
pnpm action source-search --path templates/chat/actions/hello.ts
|
|
31
34
|
```
|
|
32
35
|
|
|
33
|
-
The built-in app agent also has read-only `
|
|
34
|
-
|
|
36
|
+
The built-in app agent also has a read-only `framework-search` tool for one
|
|
37
|
+
bounded search across docs and readable Core, Toolkit, and first-party
|
|
38
|
+
template source. Use `docs-search` and `source-search` for focused reads after
|
|
39
|
+
it identifies the relevant page or file.
|
|
35
40
|
|
|
36
41
|
If the action runner is unavailable, search the package files directly:
|
|
37
42
|
|
package/docs/SKILL.md
CHANGED
|
@@ -14,14 +14,16 @@ examples or template patterns matter, inspect the packaged source corpus too.
|
|
|
14
14
|
## How
|
|
15
15
|
|
|
16
16
|
1. Start from the generated app root.
|
|
17
|
-
2.
|
|
18
|
-
3.
|
|
19
|
-
|
|
17
|
+
2. Start cross-corpus discovery with `pnpm action framework-search --pattern "<feature>"`.
|
|
18
|
+
3. Use `--scope docs` or `--scope source` and `--mode glob`, `--mode sql-like`,
|
|
19
|
+
or `--mode regex` when the question needs a narrower pattern.
|
|
20
|
+
4. Read a specific page with `pnpm action docs-search --slug <slug>`.
|
|
21
|
+
5. Search source examples with `pnpm action source-search --query "<pattern>"`
|
|
20
22
|
or read a file with `pnpm action source-search --path <path>`.
|
|
21
|
-
|
|
23
|
+
6. If the action runner is unavailable, search
|
|
22
24
|
`node_modules/@agent-native/core/docs` directly with `rg`.
|
|
23
25
|
Search `node_modules/@agent-native/core/corpus` for source examples.
|
|
24
|
-
|
|
26
|
+
7. For app-specific rules, also read the app's own `AGENTS.md` and any relevant
|
|
25
27
|
`.agents/skills/<name>/SKILL.md`.
|
|
26
28
|
|
|
27
29
|
## Useful Slugs
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Agent-Native app configuration"
|
|
3
|
+
description: "Configure public app defaults with agent-native.json or a typed agent-native.config.ts file."
|
|
4
|
+
search: "agent-native.json agent-native.config.ts onboarding first-run Builder BYOK integrations configuration"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agent-Native app configuration
|
|
8
|
+
|
|
9
|
+
Use app configuration for committed, non-secret defaults that should travel
|
|
10
|
+
with the app. Use environment variables for deployment values, credentials,
|
|
11
|
+
and local machine controls. The framework reads `agent-native.json` from the
|
|
12
|
+
app root when the `agentNative()` Vite preset runs.
|
|
13
|
+
|
|
14
|
+
The file is an additive app manifest. Existing feature-owned sections such as
|
|
15
|
+
`doctor`, `apps`, and local-file declarations can stay in the same file; the
|
|
16
|
+
onboarding reader only consumes the `version` and `onboarding` fields described
|
|
17
|
+
here.
|
|
18
|
+
|
|
19
|
+
## The onboarding contract
|
|
20
|
+
|
|
21
|
+
The shared first-run surface has three supported modes:
|
|
22
|
+
|
|
23
|
+
| Mode | Local or hosted result |
|
|
24
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
25
|
+
| `off` | No shared first-run surface. This is the default for ordinary apps. |
|
|
26
|
+
| `connect` | Show Connect Builder or Add your own keys, then go straight to the app. The generic integrations catalog is omitted. |
|
|
27
|
+
| `connect-and-integrations` | Show Connect Builder or Add your own keys, followed by the generic integrations catalog. Use this for a hosted app that should expose its integration setup. |
|
|
28
|
+
|
|
29
|
+
A turn-into-app result normally commits a mode map so `pnpm dev` is useful
|
|
30
|
+
immediately while a production build has the hosted setup path:
|
|
31
|
+
|
|
32
|
+
```json filename="agent-native.json"
|
|
33
|
+
{
|
|
34
|
+
"version": 1,
|
|
35
|
+
"onboarding": {
|
|
36
|
+
"firstRun": {
|
|
37
|
+
"development": "connect",
|
|
38
|
+
"production": "connect-and-integrations"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
An ordinary app can omit `onboarding` or make the default explicit:
|
|
45
|
+
|
|
46
|
+
```json filename="agent-native.json"
|
|
47
|
+
{
|
|
48
|
+
"version": 1,
|
|
49
|
+
"onboarding": {
|
|
50
|
+
"firstRun": "off"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
First-party templates use `off` while running locally and
|
|
56
|
+
`connect-and-integrations` for a production build. The
|
|
57
|
+
`/turn-into-app` skill deliberately changes only the local value to `connect`
|
|
58
|
+
so a newly generated workflow is immediately testable without putting the
|
|
59
|
+
hosted integration catalog in front of the user.
|
|
60
|
+
|
|
61
|
+
The environment map uses the exact Vite `mode` first, then falls back to
|
|
62
|
+
`development` for `vite dev`, `production` for `vite build`, and finally
|
|
63
|
+
`default` or `off`. This lets a project add a named mode such as `staging`
|
|
64
|
+
without making the app depend on a new environment variable.
|
|
65
|
+
|
|
66
|
+
## Typed dynamic configuration
|
|
67
|
+
|
|
68
|
+
When a static JSON map is not enough, add `agent-native.config.ts`. It returns
|
|
69
|
+
the same serializable shape and can use the Vite command and mode:
|
|
70
|
+
|
|
71
|
+
```ts filename="agent-native.config.ts"
|
|
72
|
+
import { defineAgentNativeConfig } from "@agent-native/core/config";
|
|
73
|
+
|
|
74
|
+
export default defineAgentNativeConfig(({ command, mode }) => ({
|
|
75
|
+
version: 1,
|
|
76
|
+
onboarding: {
|
|
77
|
+
firstRun:
|
|
78
|
+
command === "serve" || mode === "preview"
|
|
79
|
+
? "connect"
|
|
80
|
+
: "connect-and-integrations",
|
|
81
|
+
},
|
|
82
|
+
}));
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The preset loads `agent-native.config.ts` or `agent-native.config.mts`
|
|
86
|
+
automatically on the supported Node runtime. The TypeScript file takes
|
|
87
|
+
precedence over the JSON app defaults. An explicit `agentNative({
|
|
88
|
+
agentNativeConfig })` option takes precedence over both when an app needs to
|
|
89
|
+
compose configuration in its Vite config.
|
|
90
|
+
|
|
91
|
+
The resolved config is serialized into the browser bundle. Keep it public:
|
|
92
|
+
never put API keys, tokens, database URLs, auth secrets, `AUTH_DISABLED`, or
|
|
93
|
+
other credentials in either config file.
|
|
94
|
+
|
|
95
|
+
## Precedence and compatibility
|
|
96
|
+
|
|
97
|
+
For a Vite app, the effective value is resolved in this order:
|
|
98
|
+
|
|
99
|
+
1. An explicit `agentNativeConfig` passed to `agentNative()` or `defineConfig()`.
|
|
100
|
+
2. The optional typed `agent-native.config.ts` or `.mts` file.
|
|
101
|
+
3. `agent-native.json`.
|
|
102
|
+
4. Framework defaults, which are `off` for first-run onboarding.
|
|
103
|
+
5. The legacy `VITE_AGENT_NATIVE_FIRST_RUN_ONBOARDING` flags can still
|
|
104
|
+
override the resolved public config for older apps, but new apps should not
|
|
105
|
+
add them. They are public browser flags and remain documented only for
|
|
106
|
+
migration.
|
|
107
|
+
|
|
108
|
+
The development Connect Builder card explains the deployment-level
|
|
109
|
+
`ANTHROPIC_API_KEY` and `OPENAI_API_KEY` fallback and links to the
|
|
110
|
+
[environment-variable reference](/docs/environment-variables). A key in the
|
|
111
|
+
deployment environment is not a substitute for user- or organization-scoped
|
|
112
|
+
credentials in a hosted multi-user app. See [Onboarding & API Keys](/docs/onboarding)
|
|
113
|
+
and [Security](/docs/security) for the credential boundary.
|
|
114
|
+
|
|
115
|
+
## What belongs in config versus `.env`
|
|
116
|
+
|
|
117
|
+
Good config candidates are public defaults that describe the product's shape:
|
|
118
|
+
|
|
119
|
+
- first-run onboarding mode and other setup presentation defaults;
|
|
120
|
+
- the app's default MCP catalog visibility or preset filters, once expressed
|
|
121
|
+
through the shared config contract;
|
|
122
|
+
- route warmup, public design tokens, and other build-time UX choices already
|
|
123
|
+
passed to the `agentNative()` Vite preset;
|
|
124
|
+
- non-secret app identity and default navigation metadata, if the framework
|
|
125
|
+
later gives those values a shared runtime consumer.
|
|
126
|
+
|
|
127
|
+
Keep these in environment variables or the secret store:
|
|
128
|
+
|
|
129
|
+
- API keys, OAuth secrets, signing keys, database URLs, and provider tokens;
|
|
130
|
+
- `APP_URL`, `APP_BASE_PATH`, deployment preset, port, and host-specific
|
|
131
|
+
values that change between deploy targets;
|
|
132
|
+
- `AUTH_DISABLED`, test switches, CI controls, and local machine paths;
|
|
133
|
+
- runtime flags whose safe value depends on the hosting environment rather than
|
|
134
|
+
the app's product contract.
|
|
135
|
+
|
|
136
|
+
The complete inventory is [Environment Variables](/docs/environment-variables).
|
|
137
|
+
That reference is intentionally broader than the config surface and is the
|
|
138
|
+
source to consult before adding a new environment variable.
|
|
139
|
+
|
|
140
|
+
## Environment audit and next candidates
|
|
141
|
+
|
|
142
|
+
The current config surface intentionally starts with onboarding, where a
|
|
143
|
+
committed app default is more useful than a deployment flag. The next good
|
|
144
|
+
public candidates are:
|
|
145
|
+
|
|
146
|
+
| Candidate | Why it belongs in app config | Status |
|
|
147
|
+
| ----------------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
148
|
+
| MCP catalog visibility and preset filters | Describes which setup choices the app offers, not a secret or host policy. | A good next addition; currently keep using the `agentNative()` option. |
|
|
149
|
+
| Route warmup strategy | A product-level loading preference that can be reviewed with the app. | A good next addition; currently keep using the `agentNative()` option. |
|
|
150
|
+
| Default navigation or app identity | Makes generated apps open on the right domain route and name. | Add only after a shared runtime consumer exists. |
|
|
151
|
+
| Design-system theme | Can vary intentionally per app, but is a larger structured object. | Keep in `vite.config.ts` or app code until the schema is stable. |
|
|
152
|
+
|
|
153
|
+
Do not move `DATABASE_URL`, `APP_URL`, `PORT`, `NITRO_PRESET`, auth switches,
|
|
154
|
+
provider keys, OAuth secrets, signing keys, telemetry endpoints, or security
|
|
155
|
+
flags into this file. They vary by deploy target, affect trust boundaries, or
|
|
156
|
+
must remain outside the browser bundle. This split keeps config useful for
|
|
157
|
+
scaffolders without turning it into a second environment-variable system.
|
|
158
|
+
|
|
159
|
+
## Why there are two formats
|
|
160
|
+
|
|
161
|
+
`agent-native.json` is portable, inspectable, and easy for scaffolders and
|
|
162
|
+
other tools to write. `agent-native.config.ts` follows the typed-config pattern
|
|
163
|
+
used by frameworks such as Next.js while keeping the browser contract
|
|
164
|
+
serializable. Prefer JSON for a fixed app default and TypeScript when the
|
|
165
|
+
default genuinely depends on the Vite command or mode.
|
|
@@ -97,7 +97,7 @@ directly without adopting Toolkit or a template.
|
|
|
97
97
|
| [Collaboration](/docs/toolkit-collaboration) | Realtime editing, presence, live cursors, recent-edit highlights, collaborative undo. |
|
|
98
98
|
| [Settings](/docs/toolkit-settings) | Standard settings pages and tabs so app settings and agent/provider settings live in one predictable place. |
|
|
99
99
|
| [Org & Team](/docs/toolkit-org-team) | Team pages, org switching, invites, org domains, roles, and app switching. |
|
|
100
|
-
| [Setup & Connections](/docs/toolkit-setup-connections) | Onboarding, secrets, workspace connections, OAuth/provider readiness, and Builder connect.
|
|
100
|
+
| [Setup & Connections](/docs/toolkit-setup-connections) | Onboarding, secrets, workspace connections, OAuth/provider readiness, and Builder connect (free tier available). |
|
|
101
101
|
| [Command & Navigation](/docs/toolkit-command-navigation) | Command menu, deep links, standard app routes, sidebar and shell patterns. |
|
|
102
102
|
| [Resources](/docs/toolkit-resources) | Resource trees, editors, file picker/search, attachments, and local file mode. |
|
|
103
103
|
| [Agent UX](/docs/toolkit-agent-ux) | Composer, model picker, context chips, approvals, run recovery, and the runs tray. |
|
|
@@ -517,6 +517,11 @@ Three things to keep in mind:
|
|
|
517
517
|
|
|
518
518
|
## Environment Variables {#environment-variables}
|
|
519
519
|
|
|
520
|
+
For the repository-wide reference, including template, provider, local, and CI
|
|
521
|
+
variables, see [Environment Variables](/docs/environment-variables). The tables
|
|
522
|
+
below remain the authoritative deployment guide for production values and
|
|
523
|
+
hosting behavior.
|
|
524
|
+
|
|
520
525
|
### Build / Runtime {#env-runtime}
|
|
521
526
|
|
|
522
527
|
| Variable | Description |
|
|
@@ -640,11 +645,11 @@ In a standard production deployment with [production code execution](#production
|
|
|
640
645
|
|
|
641
646
|
### Builder.io: Visual Editing in Production {#builderio}
|
|
642
647
|
|
|
643
|
-
[Builder.io](https://www.builder.io?utm_source=agent-native&utm_medium=docs&utm_campaign=framework&utm_content=deployment) is a separate managed code-capable workflow where an agent can modify your app's UI in production. Connect your repo to Builder.io and prompt for UI changes directly — no redeploy needed.
|
|
648
|
+
[Builder.io](https://www.builder.io?utm_source=agent-native&utm_medium=docs&utm_campaign=framework&utm_content=deployment) is a separate managed code-capable workflow where an agent can modify your app's UI in production. Connect your repo to Builder.io (free tier available) and prompt for UI changes directly — no redeploy needed.
|
|
644
649
|
|
|
645
650
|
**How it works:**
|
|
646
651
|
|
|
647
|
-
1. Connect your agent-native repo to Builder.io
|
|
652
|
+
1. Connect your agent-native repo to Builder.io (free tier available)
|
|
648
653
|
2. Builder.io provides a cloud frame with the agent, visual editing, and real-time collaboration
|
|
649
654
|
3. Prompt the agent to make UI changes — it edits your components, routes, and styles live
|
|
650
655
|
4. Changes are committed back to your repo
|
package/docs/content/doctor.mdx
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Doctor (Code Checks)"
|
|
3
|
-
description: "agent-native doctor scans
|
|
3
|
+
description: "agent-native doctor scans generated app and workspace source for the framework's security and architecture invariants — the portable code-safety guards shared outside the monorepo CI suite."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Doctor (Code Checks)
|
|
7
7
|
|
|
8
|
-
Generated apps contain source code that can be changed through the repository's
|
|
8
|
+
Generated apps and workspaces contain source code that can be changed through the repository's
|
|
9
9
|
development workflow, including by an agent frame intentionally granted
|
|
10
10
|
workspace and write tooling. `agent-native doctor` is the automated check for that: it
|
|
11
11
|
scans app source for the framework's security-critical code-safety invariants —
|
|
12
12
|
the same class of check that lives in this framework's own CI as
|
|
13
|
-
`scripts/guard-*.mjs` — ported to run against
|
|
14
|
-
the framework's multi-template monorepo layout.
|
|
15
|
-
|
|
13
|
+
`scripts/guard-*.mjs` — ported to run against generated projects instead of
|
|
14
|
+
the framework's multi-template monorepo layout. A workspace-root run scans each
|
|
15
|
+
`apps/<name>` project and the workspace's `packages/shared` package when present,
|
|
16
|
+
prefixing findings with the project path. It's read-only: doctor never edits
|
|
17
|
+
your code, it only reports.
|
|
16
18
|
|
|
17
19
|
## Quick start {#quick-start}
|
|
18
20
|
|
|
@@ -20,12 +22,17 @@ edits your code, it only reports.
|
|
|
20
22
|
agent-native doctor
|
|
21
23
|
```
|
|
22
24
|
|
|
23
|
-
Every scaffolded app
|
|
25
|
+
Every scaffolded app and workspace gets the collision-free
|
|
26
|
+
`pnpm agent-native:doctor` command. When a template does not already define its
|
|
27
|
+
own `doctor` script, the CLI also adds the shorter `pnpm doctor` alias:
|
|
24
28
|
|
|
25
29
|
```bash
|
|
26
30
|
pnpm doctor
|
|
27
31
|
```
|
|
28
32
|
|
|
33
|
+
The full framework-repository `pnpm guards` suite remains a monorepo check;
|
|
34
|
+
generated projects use this version-matched portable Doctor surface instead.
|
|
35
|
+
|
|
29
36
|
A clean run:
|
|
30
37
|
|
|
31
38
|
```
|
|
@@ -83,7 +90,7 @@ installed.
|
|
|
83
90
|
agent-native doctor Scan app source for security-critical guard violations
|
|
84
91
|
agent-native doctor --json Machine-readable report: { ok, findings, guardsRun, strict }
|
|
85
92
|
agent-native doctor --only <guard,guard> Run only the named guard(s)
|
|
86
|
-
agent-native doctor --strict
|
|
93
|
+
agent-native doctor --strict Keep the build gate explicit when invoked by `agent-native build`
|
|
87
94
|
agent-native doctor --cwd <dir> Run against a project root other than the current directory
|
|
88
95
|
agent-native doctor --fix Not implemented in this version
|
|
89
96
|
agent-native doctor --help Show this help
|
|
@@ -97,16 +104,16 @@ Exit codes: **`0`** clean, **`1`** findings present, **`2`** usage or execution
|
|
|
97
104
|
|
|
98
105
|
## The build hook {#build-hook}
|
|
99
106
|
|
|
100
|
-
`agent-native build` always runs doctor as a pre-step before the real build. It
|
|
107
|
+
`agent-native build` always runs doctor as a pre-step before the real build. It is a **hard gate by default**: findings print to stderr prefixed `[doctor]`, and the build exits before publishing. A project using `agent-native build` can explicitly opt out with `failOnBuild: false`, but `--strict` always keeps the gate enabled. Community templates that use another build command receive a strict `prebuild` hook instead:
|
|
101
108
|
|
|
102
|
-
- `agent-native
|
|
103
|
-
- `agent-native.json` sets `{ "doctor": { "failOnBuild": true } }`.
|
|
109
|
+
- `agent-native.json` sets `{ "doctor": { "failOnBuild": false } }` only when that exception has been reviewed.
|
|
104
110
|
|
|
105
|
-
If the doctor pre-step itself throws —
|
|
111
|
+
If the doctor pre-step itself throws — for example, because a source file is unreadable or a guard crashes — the build is blocked. A partial security scan must never look like a clean result.
|
|
106
112
|
|
|
107
113
|
## Per-app configuration {#config}
|
|
108
114
|
|
|
109
|
-
`agent-native.json`'s optional `"doctor"` key.
|
|
115
|
+
`agent-native.json`'s optional `"doctor"` key. A fresh app runs every v1 guard
|
|
116
|
+
with zero config and fails builds on findings by default:
|
|
110
117
|
|
|
111
118
|
```json
|
|
112
119
|
{
|
|
@@ -124,7 +131,7 @@ If the doctor pre-step itself throws — an unreadable file, a bug in a guard
|
|
|
124
131
|
| ----------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
125
132
|
| `disabledGuards` | `string[]` | Guard names (from the table above) to skip — excluded from the default run and from the build hook. An explicit `--only` list overrides this and runs even a disabled guard. |
|
|
126
133
|
| `dbToolScopingDenylist` | `Record<table, reason>` | Bare table name (the SQL name, not template-prefixed) → reviewer-readable reason. Used only by `db-tool-scoping`. A denylist entry with no matching table in `server/db/schema.ts` itself becomes a finding — "stale … entry — remove it." |
|
|
127
|
-
| `failOnBuild` | `boolean` | See [The build hook](#build-hook). Default `false
|
|
134
|
+
| `failOnBuild` | `boolean` | See [The build hook](#build-hook). Default `true`; set `false` only for a reviewed exception. |
|
|
128
135
|
|
|
129
136
|
## Opt-out markers {#opt-out}
|
|
130
137
|
|
|
@@ -174,6 +181,7 @@ The actual `--json` payload also carries a `strict` field reflecting whether `--
|
|
|
174
181
|
"explicit-collab-access",
|
|
175
182
|
"migration-manifest"
|
|
176
183
|
],
|
|
184
|
+
"workspaceApps": ["apps/mail", "apps/tasks"],
|
|
177
185
|
"strict": false
|
|
178
186
|
}
|
|
179
187
|
```
|