@agent-native/core 0.145.5 → 0.145.6
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/corpus/README.md +1 -1
- package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +17 -1
- package/corpus/templates/analytics/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +22 -3
- package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/analytics/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/analytics/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/analytics/AGENTS.md +2 -1
- package/corpus/templates/analytics/actions/account-deep-dive.ts +83 -47
- package/corpus/templates/analytics/actions/create-dashboard-folder.ts +27 -0
- package/corpus/templates/analytics/actions/gong-calls.ts +3 -3
- package/corpus/templates/analytics/actions/list-dashboard-folders.ts +26 -0
- package/corpus/templates/analytics/actions/list-sql-dashboards.ts +1 -0
- package/corpus/templates/analytics/actions/set-dashboard-folder.ts +26 -0
- package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +18 -3
- package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +6 -4
- package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -0
- package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +12 -2
- package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +35 -20
- package/corpus/templates/analytics/app/global.css +17 -0
- package/corpus/templates/analytics/app/hooks/use-dashboard-revisions.ts +29 -15
- package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +15 -3
- package/corpus/templates/analytics/app/i18n-data.ts +296 -0
- package/corpus/templates/analytics/app/lib/prefetch-keys.ts +23 -2
- package/corpus/templates/analytics/app/pages/DashboardOverview.tsx +642 -0
- package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +66 -31
- package/corpus/templates/analytics/app/root.tsx +4 -0
- package/corpus/templates/analytics/app/routes/dashboards._index.tsx +5 -1
- package/corpus/templates/analytics/changelog/2026-08-07-added-a-dashboards-overview-with-personal-and-shared-folders.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-07-analytics-tracking-and-chat-startup-no-longer-emit-avoidable.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-07-dashboard-panels-now-load-custom-api-data-programs-reliably.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-07-gong-searches-conserve-api-quota-and-report-incomplete-coverage.md +6 -0
- package/corpus/templates/analytics/changelog/2026-08-07-searchable-dashboards-make-personal-and-shared-folders-easie.md +6 -0
- package/corpus/templates/analytics/netlify.toml +3 -0
- package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +112 -0
- package/corpus/templates/analytics/server/db/index.ts +12 -0
- package/corpus/templates/analytics/server/db/schema.ts +14 -0
- package/corpus/templates/analytics/server/jobs/analytics-rollup-backfill.ts +4 -0
- package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +1 -0
- package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +85 -15
- package/corpus/templates/analytics/server/lib/dashboard-folders-store.ts +168 -0
- package/corpus/templates/analytics/server/lib/dashboard-panel-query.ts +9 -4
- package/corpus/templates/analytics/server/lib/dashboards-store.ts +116 -1
- package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +4 -8
- package/corpus/templates/analytics/server/lib/gong.ts +139 -78
- package/corpus/templates/analytics/server/plugins/db.ts +55 -15
- package/corpus/templates/analytics/server/plugins/session-replay-retention-jobs.ts +6 -2
- package/corpus/templates/analytics/server/routes/api/session-replay/retention.post.ts +65 -0
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/assets/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/assets/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/assets/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/brain/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/brain/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/brain/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/calendar/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/calendar/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/calendar/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/chat/.env.example +3 -0
- package/corpus/templates/chat/AGENTS.md +4 -0
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/clips/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/clips/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/clips/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/clips/actions/lib/audio-only-transcription.ts +4 -0
- package/corpus/templates/clips/actions/request-transcript.ts +52 -3
- package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +3 -10
- package/corpus/templates/clips/app/routes/r.$recordingId.tsx +1 -0
- package/corpus/templates/clips/changelog/2026-08-07-screen-recordings-now-capture-tab-and-system-audio-even-when.md +6 -0
- package/corpus/templates/clips/changelog/2026-08-07-transcription-now-retries-transient-cloud-failures-automatic.md +6 -0
- package/corpus/templates/clips/server/db/schema.ts +7 -0
- package/corpus/templates/clips/server/plugins/db.ts +8 -0
- package/corpus/templates/clips/shared/recording-capture.ts +38 -0
- package/corpus/templates/clips/shared/transcript-failure.ts +89 -0
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/content/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/content/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/content/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/content/.env.example +9 -3
- package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +1 -0
- package/corpus/templates/content/changelog/2026-08-07-collapsed-sidebar-utility-buttons-stay-anchored-at-the-botto.md +6 -0
- package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/crm/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/crm/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/design/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/design/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/design/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/dispatch/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/dispatch/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/factory/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/factory/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/factory/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/factory/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/factory/actions/babysit-agent-native-pull-request.ts +279 -0
- package/corpus/templates/factory/actions/get-factory-automation-health.ts +23 -4
- package/corpus/templates/factory/app/components/factory/FactoryCanvas.tsx +1 -1
- package/corpus/templates/factory/app/routes/factory.tsx +21 -3
- package/corpus/templates/factory/changelog/2026-08-07-factory-can-keep-builder-bot-pull-requests-moving-by-request.md +6 -0
- package/corpus/templates/factory/server/lib/require-factory-automation.ts +1 -0
- package/corpus/templates/factory/server/plugins/agent-chat.ts +4 -1
- package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +81 -12
- package/corpus/templates/factory/server/triage/github-client.ts +31 -0
- package/corpus/templates/factory/server/triage/pr-babysit.ts +75 -1
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/forms/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/forms/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/forms/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/macros/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/macros/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/mail/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/mail/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/mail/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/plan/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/plan/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/plan/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/plan/app/pages/PlansPage.tsx +2 -1
- package/corpus/templates/plan/changelog/2026-08-07-inline-help-icons-now-stay-visually-balanced-with-nearby-tex.md +6 -0
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/slides/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/slides/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/slides/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/slides/.env.example +5 -0
- package/corpus/templates/slides/changelog/2026-08-07-fixed-generated-slides-briefly-disappearing-while-they-are-b.md +6 -0
- package/corpus/templates/slides/server/plugins/collab.ts +20 -8
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +18 -0
- package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/corpus/templates/tasks/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +1 -0
- package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/corpus/templates/tasks/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/corpus/templates/tasks/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/corpus/templates/tasks/.env.example +3 -0
- package/dist/agent/production-agent.js +24 -3
- package/dist/client/AgentPanel.d.ts +6 -0
- package/dist/client/AgentPanel.js +176 -30
- package/dist/client/AssistantChat.d.ts +2 -0
- package/dist/client/AssistantChat.js +4 -1
- package/dist/client/ConnectBuilderCard.js +6 -11
- package/dist/client/MultiTabAssistantChat.js +1 -1
- package/dist/client/RuntimeConfigNotice.d.ts +1 -0
- package/dist/client/RuntimeConfigNotice.js +94 -0
- package/dist/client/agent-chat/index.d.ts +1 -1
- package/dist/client/agent-chat/index.js +1 -1
- package/dist/client/agent-chat-adapter.js +85 -4
- package/dist/client/agent-page/AgentTabsPage.js +1 -1
- package/dist/client/agent-sidebar-state.d.ts +6 -0
- package/dist/client/agent-sidebar-state.js +25 -0
- package/dist/client/app-providers.js +2 -1
- package/dist/client/assistant-ui-recovery.js +1 -1
- package/dist/client/chat/index.d.ts +1 -1
- package/dist/client/chat/index.js +1 -1
- package/dist/client/chat/markdown-renderer.d.ts +2 -1
- package/dist/client/chat/markdown-renderer.js +48 -2
- package/dist/client/chat/message-components.d.ts +6 -0
- package/dist/client/chat/message-components.js +182 -53
- package/dist/client/chat/tool-call-display.d.ts +16 -4
- package/dist/client/chat/tool-call-display.js +225 -18
- package/dist/client/extensions/ExtensionsSidebarSection.js +1 -1
- package/dist/client/frame-protocol.d.ts +4 -0
- package/dist/client/i18n.js +9 -0
- package/dist/client/integrations/IntegrationsPanel.js +2 -5
- package/dist/client/onboarding/FirstRunOnboarding.js +2 -3
- package/dist/client/org/TeamPage.js +49 -6
- package/dist/client/org/hooks.d.ts +7 -2
- package/dist/client/org/hooks.js +11 -4
- package/dist/client/resources/McpConnectionSuggestion.js +2 -3
- package/dist/client/resources/McpIntegrationDialog.js +2 -16
- package/dist/client/resources/McpIntegrationLogo.d.ts +11 -0
- package/dist/client/resources/McpIntegrationLogo.js +14 -0
- package/dist/client/resources/ResourceTree.js +1 -1
- package/dist/client/resources/mcp-integration-logos.d.ts +1 -0
- package/dist/client/resources/mcp-integration-logos.js +47 -18
- package/dist/client/settings/useBuilderStatus.js +6 -0
- package/dist/client/ui/index.d.ts +1 -0
- package/dist/client/ui/index.js +1 -0
- package/dist/collab/routes.d.ts +1 -1
- package/dist/config.d.ts +26 -3
- package/dist/config.js +106 -14
- package/dist/db/ddl-guard.d.ts +15 -2
- package/dist/db/ddl-guard.js +53 -5
- package/dist/jobs/scheduler.js +7 -0
- package/dist/localization/default-messages.d.ts +17 -0
- package/dist/localization/default-messages.js +17 -0
- package/dist/mcp/oauth-client-metadata.js +5 -1
- package/dist/mcp/oauth-route.d.ts +5 -4
- package/dist/mcp/oauth-route.js +25 -9
- package/dist/mcp/screen-memory-stdio.d.ts +7 -7
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/server.js +9 -10
- package/dist/notifications/routes.d.ts +3 -3
- package/dist/org/handlers.d.ts +1 -0
- package/dist/org/handlers.js +17 -2
- package/dist/provider-api/actions/custom-provider-registration.d.ts +5 -5
- package/dist/provider-api/actions/provider-api.d.ts +7 -7
- package/dist/provider-api/corpus-jobs.d.ts +12 -2
- package/dist/provider-api/corpus-jobs.js +31 -1
- package/dist/provider-api/index.d.ts +2 -0
- package/dist/provider-api/index.js +7 -1
- package/dist/resources/handlers.d.ts +1 -1
- package/dist/secrets/routes.d.ts +3 -3
- package/dist/server/agent-chat/recurring-jobs-runtime.d.ts +1 -1
- package/dist/server/agent-chat/recurring-jobs-runtime.js +14 -2
- package/dist/server/agent-chat/script-entries.js +12 -1
- package/dist/server/agent-chat-plugin.js +2 -2
- package/dist/server/agent-engine-api-key-route.d.ts +1 -1
- package/dist/server/auth.d.ts +1 -0
- package/dist/server/auth.js +85 -1
- package/dist/server/better-auth-instance.d.ts +9 -0
- package/dist/server/better-auth-instance.js +25 -11
- package/dist/server/core-routes-plugin.d.ts +7 -0
- package/dist/server/core-routes-plugin.js +51 -5
- package/dist/server/create-server.js +23 -2
- package/dist/server/db-pressure.d.ts +38 -0
- package/dist/server/db-pressure.js +147 -0
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +1 -0
- package/dist/server/legacy-auth-migration.d.ts +10 -0
- package/dist/server/legacy-auth-migration.js +37 -0
- package/dist/server/onboarding-html.js +206 -2
- package/dist/server/poll.d.ts +26 -0
- package/dist/server/poll.js +108 -13
- package/dist/server/ssr-handler.js +4 -1
- package/dist/shared/index.d.ts +1 -0
- package/dist/shared/index.js +1 -0
- package/dist/shared/runtime-config.d.ts +44 -0
- package/dist/shared/runtime-config.js +284 -0
- package/dist/styles/agent-native.css +48 -1
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +18 -0
- package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/dist/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +1 -0
- package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/dist/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/dist/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/dist/templates/chat/.env.example +3 -0
- package/dist/templates/chat/AGENTS.md +4 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +18 -0
- package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/dist/templates/default/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +1 -0
- package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/dist/templates/default/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/dist/templates/default/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/dist/templates/default/AGENTS.md +6 -1
- package/dist/templates/default/app/i18n/ar-SA.ts +6 -0
- package/dist/templates/default/app/i18n/de-DE.ts +6 -0
- package/dist/templates/default/app/i18n/en-US.ts +6 -0
- package/dist/templates/default/app/i18n/es-ES.ts +6 -0
- package/dist/templates/default/app/i18n/fr-FR.ts +6 -0
- package/dist/templates/default/app/i18n/hi-IN.ts +6 -0
- package/dist/templates/default/app/i18n/ja-JP.ts +6 -0
- package/dist/templates/default/app/i18n/ko-KR.ts +6 -0
- package/dist/templates/default/app/i18n/pt-BR.ts +6 -0
- package/dist/templates/default/app/i18n/zh-CN.ts +6 -0
- package/dist/templates/default/app/i18n/zh-TW.ts +6 -0
- package/dist/templates/headless/.agents/skills/actions/SKILL.md +18 -0
- package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/dist/templates/headless/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/dist/templates/headless/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +18 -0
- package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -0
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/dist/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -0
- package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +8 -0
- package/dist/templates/workspace-core/AGENTS.md +7 -2
- package/dist/templates/workspace-root/AGENTS.md +5 -0
- package/dist/vite/client.d.ts +3 -3
- package/dist/vite/client.js +47 -1
- package/dist/vite/index.d.ts +1 -1
- package/docs/content/agent-native-config.mdx +240 -139
- package/docs/content/authentication.mdx +17 -0
- package/docs/content/deployment.mdx +19 -14
- package/docs/content/drop-in-agent.mdx +19 -2
- package/docs/content/environment-variables.mdx +63 -38
- package/docs/content/getting-started-actions.mdx +15 -6
- package/docs/content/getting-started-database.mdx +14 -10
- package/docs/content/getting-started-pages.mdx +32 -35
- package/docs/content/getting-started.mdx +7 -6
- package/package.json +1 -1
- package/src/templates/chat/.agents/skills/actions/SKILL.md +18 -0
- package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +1 -0
- package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/src/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/src/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/src/templates/chat/.env.example +3 -0
- package/src/templates/chat/AGENTS.md +4 -0
- package/src/templates/default/.agents/skills/actions/SKILL.md +18 -0
- package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +1 -0
- package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/src/templates/default/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/src/templates/default/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/src/templates/default/AGENTS.md +6 -1
- package/src/templates/default/app/i18n/ar-SA.ts +6 -0
- package/src/templates/default/app/i18n/de-DE.ts +6 -0
- package/src/templates/default/app/i18n/en-US.ts +6 -0
- package/src/templates/default/app/i18n/es-ES.ts +6 -0
- package/src/templates/default/app/i18n/fr-FR.ts +6 -0
- package/src/templates/default/app/i18n/hi-IN.ts +6 -0
- package/src/templates/default/app/i18n/ja-JP.ts +6 -0
- package/src/templates/default/app/i18n/ko-KR.ts +6 -0
- package/src/templates/default/app/i18n/pt-BR.ts +6 -0
- package/src/templates/default/app/i18n/zh-CN.ts +6 -0
- package/src/templates/default/app/i18n/zh-TW.ts +6 -0
- package/src/templates/headless/.agents/skills/actions/SKILL.md +18 -0
- package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/src/templates/headless/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/src/templates/headless/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +18 -0
- package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
- package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +45 -47
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -0
- package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +76 -23
- package/src/templates/workspace-core/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
- package/src/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
- package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -0
- package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +8 -0
- package/src/templates/workspace-core/AGENTS.md +7 -2
- package/src/templates/workspace-root/AGENTS.md +5 -0
- package/corpus/templates/dispatch/app/routes/admin.apps.$appId.tsx +0 -1
- package/corpus/templates/dispatch/app/routes/admin.apps.tsx +0 -1
|
@@ -1,165 +1,266 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Agent-Native app configuration"
|
|
3
|
-
description: "Configure public app defaults with agent-native.
|
|
4
|
-
search: "agent-native.
|
|
3
|
+
description: "Configure public Agent-Native app defaults with agent-native.ts, its typed aliases, or agent-native.json compatibility."
|
|
4
|
+
search: "agent-native.ts agent-native.config.ts agent-native.config.mts agent-native.json onboarding runtime readiness configuration"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Agent-Native app configuration
|
|
8
8
|
|
|
9
|
-
Use
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
Use `agent-native.ts` for new shared Agent-Native configuration. It is a typed,
|
|
10
|
+
mode-aware source for committed, non-secret app defaults. The framework also
|
|
11
|
+
accepts `agent-native.mts`, `agent-native.config.ts`, and
|
|
12
|
+
`agent-native.config.mts` as filename aliases, and continues to read
|
|
13
|
+
`agent-native.json` for compatibility.
|
|
13
14
|
|
|
14
|
-
The
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
here.
|
|
15
|
+
The resolved configuration is serialized into the browser bundle. Treat every
|
|
16
|
+
value in these files as public. Put credentials and deployment-specific values
|
|
17
|
+
in the environment or the scoped secret store instead.
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## File location and loading
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Put one configuration file at the app root, alongside `package.json` and the
|
|
22
|
+
app's Vite configuration. In a workspace, each app has its own root and its own
|
|
23
|
+
configuration file. The Vite preset reads from the current app root, not from
|
|
24
|
+
`server/plugins/` or a workspace-wide directory.
|
|
22
25
|
|
|
23
|
-
|
|
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. |
|
|
26
|
+
For new apps, create `agent-native.ts`:
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
```ts filename="agent-native.ts"
|
|
29
|
+
import { defineAgentNativeConfig } from "@agent-native/core/config";
|
|
31
30
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
export default defineAgentNativeConfig(({ command, mode, isBuild }) => {
|
|
32
|
+
const hosted = mode === "production";
|
|
33
|
+
|
|
34
|
+
return {
|
|
35
|
+
version: 1,
|
|
36
|
+
onboarding: {
|
|
37
|
+
firstRun:
|
|
38
|
+
command === "serve"
|
|
39
|
+
? "connect"
|
|
40
|
+
: hosted
|
|
41
|
+
? "connect-and-integrations"
|
|
42
|
+
: "connect",
|
|
43
|
+
},
|
|
44
|
+
runtime: {
|
|
45
|
+
auth: { enabled: true },
|
|
46
|
+
database: { required: hosted },
|
|
47
|
+
environment: {
|
|
48
|
+
required: ["PUBLIC_API_ORIGIN"],
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
diagnostics: {
|
|
52
|
+
failOnBuild: isBuild && hosted,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
});
|
|
42
56
|
```
|
|
43
57
|
|
|
44
|
-
|
|
58
|
+
This example shows the complete shared option surface. Local `vite serve`
|
|
59
|
+
uses the Connect setup path, a production build includes the integrations
|
|
60
|
+
catalog, production requires auth and a persistent database, and the app
|
|
61
|
+
declares an additional environment variable by name. Replace
|
|
62
|
+
`PUBLIC_API_ORIGIN` with a real non-secret requirement for the app, or remove
|
|
63
|
+
the `required` list when there is no such requirement.
|
|
64
|
+
|
|
65
|
+
The factory receives this context:
|
|
66
|
+
|
|
67
|
+
| Property | Values or meaning |
|
|
68
|
+
| --------- | ----------------------------------------------------------------------- |
|
|
69
|
+
| `command` | Vite's `"serve"` or `"build"` command. |
|
|
70
|
+
| `mode` | The exact Vite mode, such as `development`, `production`, or `staging`. |
|
|
71
|
+
| `isDev` | `true` for `serve`. |
|
|
72
|
+
| `isBuild` | `true` for `build`. |
|
|
73
|
+
|
|
74
|
+
Export the config as the default export. The loader also accepts a named
|
|
75
|
+
`agentNativeConfig` export for compatibility, but the default export is the
|
|
76
|
+
recommended form.
|
|
77
|
+
|
|
78
|
+
## Supported options
|
|
79
|
+
|
|
80
|
+
These are the only shared options read from the typed config and the shared
|
|
81
|
+
configuration portion of `agent-native.json`:
|
|
82
|
+
|
|
83
|
+
| Option | Type | Effect |
|
|
84
|
+
| ------------------------------ | ----------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
85
|
+
| `version` | `1` | Optional schema version. If provided, it must be `1`. |
|
|
86
|
+
| `onboarding.firstRun` | `"off"`, `"connect"`, `"connect-and-integrations"`, or a mode map | Chooses the first-run Agent Sidebar setup. `off` hides it. `connect` shows Builder/BYOK setup without the generic integrations catalog. `connect-and-integrations` includes that catalog. |
|
|
87
|
+
| `runtime.auth.enabled` | `boolean` | Declares whether the app expects the framework or a custom authentication layer. |
|
|
88
|
+
| `runtime.database.required` | `boolean` | Declares whether production needs a persistent remote SQL database. |
|
|
89
|
+
| `runtime.environment.required` | `string[]` | Declares additional required environment variable names. Names must match `[A-Za-z_][A-Za-z0-9_]*`; values do not belong in the config. |
|
|
90
|
+
| `diagnostics.failOnBuild` | `boolean` | When `true`, a production Vite build throws on runtime configuration issues. When absent or `false`, it reports them without failing the build. |
|
|
91
|
+
|
|
92
|
+
### Mode maps for onboarding
|
|
93
|
+
|
|
94
|
+
`firstRun` can be one mode string, or a
|
|
95
|
+
`Partial<Record<string, "off" | "connect" | "connect-and-integrations">> &
|
|
96
|
+
{ default?: "off" | "connect" | "connect-and-integrations" }` map keyed by
|
|
97
|
+
exact Vite modes. The resolver checks the exact `mode` first. If there is no
|
|
98
|
+
exact match, it checks `development` for `serve` or `production` for `build`,
|
|
99
|
+
then `default`, and finally falls back to `off`:
|
|
100
|
+
|
|
101
|
+
```ts filename="agent-native.ts"
|
|
102
|
+
import { defineAgentNativeConfig } from "@agent-native/core/config";
|
|
45
103
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
104
|
+
export default defineAgentNativeConfig({
|
|
105
|
+
version: 1,
|
|
106
|
+
onboarding: {
|
|
107
|
+
firstRun: {
|
|
108
|
+
development: "connect",
|
|
109
|
+
staging: "connect",
|
|
110
|
+
production: "connect-and-integrations",
|
|
111
|
+
default: "off",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
});
|
|
53
115
|
```
|
|
54
116
|
|
|
55
|
-
|
|
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.
|
|
117
|
+
## Runtime readiness defaults
|
|
60
118
|
|
|
61
|
-
The
|
|
62
|
-
|
|
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.
|
|
119
|
+
The runtime diagnostics check runs for production configuration. If an option
|
|
120
|
+
is absent, the framework uses these defaults:
|
|
65
121
|
|
|
66
|
-
|
|
122
|
+
| Omitted option | Default | Production behavior |
|
|
123
|
+
| ------------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
124
|
+
| `runtime.auth.enabled` | `true` | Checks that authentication is usable. `AUTH_DISABLED` is treated as false when unset. A standalone deployment needs `BETTER_AUTH_SECRET`; a workspace runtime can derive it from its existing `A2A_SECRET`. |
|
|
125
|
+
| `runtime.database.required` | `true` | Requires a persistent remote SQL URL. Local SQLite and other local database fallbacks are reported as unsuitable for production. |
|
|
126
|
+
| `runtime.environment.required` | `[]` | No app-specific environment names are checked unless the app declares them. |
|
|
127
|
+
| `diagnostics.failOnBuild` | `false` | Production build diagnostics warn instead of throwing. Set `true` for a deliberate build gate. |
|
|
67
128
|
|
|
68
|
-
|
|
69
|
-
|
|
129
|
+
`BETTER_AUTH_URL` is optional when the public origin can be inferred from
|
|
130
|
+
`APP_URL`, known template or request context, or hosting metadata such as
|
|
131
|
+
Netlify or Vercel. Set it when that inference is not correct. The database
|
|
132
|
+
check accepts the app-prefixed database URL, `DATABASE_URL`, or
|
|
133
|
+
`NETLIFY_DATABASE_URL`, according to the runtime environment.
|
|
70
134
|
|
|
71
|
-
|
|
135
|
+
Local development keeps its zero-setup fallbacks. Production diagnostics
|
|
136
|
+
report missing or weak auth secrets, auth disabled in production, invalid
|
|
137
|
+
public auth URLs, missing or local database URLs, and missing app-declared
|
|
138
|
+
environment variables. The redacted report is available at
|
|
139
|
+
`/_agent-native/ping?configuration=1`. The shared shell can show the report and
|
|
140
|
+
offer a **Copy prompt for AI** action; that prompt includes variable names and
|
|
141
|
+
guidance, never secret values.
|
|
142
|
+
|
|
143
|
+
For example, this is a useful readiness declaration when an app uses the
|
|
144
|
+
framework's normal auth and database contracts:
|
|
145
|
+
|
|
146
|
+
```ts filename="agent-native.ts"
|
|
72
147
|
import { defineAgentNativeConfig } from "@agent-native/core/config";
|
|
73
148
|
|
|
74
|
-
export default defineAgentNativeConfig(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
149
|
+
export default defineAgentNativeConfig({
|
|
150
|
+
runtime: {
|
|
151
|
+
auth: { enabled: true },
|
|
152
|
+
database: { required: true },
|
|
153
|
+
environment: { required: ["PUBLIC_API_ORIGIN"] },
|
|
154
|
+
},
|
|
155
|
+
diagnostics: { failOnBuild: true },
|
|
156
|
+
});
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Set the actual deployment values outside the repository. For example, provide
|
|
160
|
+
`BETTER_AUTH_SECRET`, `DATABASE_URL`, and `PUBLIC_API_ORIGIN` in Netlify,
|
|
161
|
+
Vercel, another deployment environment, or the appropriate scoped secret
|
|
162
|
+
store. Do not replace those placeholders with literal values in
|
|
163
|
+
`agent-native.ts`.
|
|
164
|
+
|
|
165
|
+
`diagnostics.failOnBuild` is for runtime configuration diagnostics. It is not
|
|
166
|
+
the same setting as the separate `doctor.failOnBuild` option documented in the
|
|
167
|
+
[Doctor guide](/docs/doctor).
|
|
168
|
+
|
|
169
|
+
## Precedence and merge behavior
|
|
170
|
+
|
|
171
|
+
For a Vite app, the effective shared configuration follows this order:
|
|
172
|
+
|
|
173
|
+
1. Framework defaults. First-run onboarding defaults to `off`; auth and a
|
|
174
|
+
persistent database default to required in production diagnostics.
|
|
175
|
+
2. `agent-native.json` at the app root.
|
|
176
|
+
3. The automatically loaded typed file, if present. The loader checks these
|
|
177
|
+
candidates in order: `agent-native.ts`, `agent-native.mts`,
|
|
178
|
+
`agent-native.config.ts`, `agent-native.config.mts`.
|
|
179
|
+
4. An explicit `agentNativeConfig` passed to `agentNative()` or the legacy
|
|
180
|
+
`defineConfig()` wrapper. Supplying this option skips automatic typed-file
|
|
181
|
+
loading, while the explicit value still overlays `agent-native.json`.
|
|
182
|
+
5. For onboarding only, the legacy public Vite variables
|
|
183
|
+
`VITE_AGENT_NATIVE_FIRST_RUN_ONBOARDING` and
|
|
184
|
+
`VITE_AGENT_NATIVE_FIRST_RUN_ONBOARDING_SKIP_INTEGRATIONS` can override the
|
|
185
|
+
resolved onboarding mode. Use the config file for new work.
|
|
186
|
+
|
|
187
|
+
Use only one of the four typed filenames. If more than one exists, the first
|
|
188
|
+
candidate in the loader's order wins, with `agent-native.ts` preferred for new
|
|
189
|
+
apps. The names are aliases, not four layers that are merged together.
|
|
190
|
+
|
|
191
|
+
The JSON and typed sources are merged by supported nested section:
|
|
192
|
+
|
|
193
|
+
- Nested objects such as `runtime.auth`, `runtime.database`,
|
|
194
|
+
`runtime.environment`, and `diagnostics` are deep-merged.
|
|
195
|
+
- Scalar values from the higher-precedence source replace lower-precedence
|
|
196
|
+
values.
|
|
197
|
+
- `runtime.environment.required` arrays are combined in base-then-override
|
|
198
|
+
order and de-duplicated.
|
|
199
|
+
- `onboarding.firstRun` is one setting. If the higher-precedence source
|
|
200
|
+
supplies it, it replaces the lower-precedence string or mode map as a whole.
|
|
201
|
+
|
|
202
|
+
For example, JSON can provide `runtime.auth.enabled` and
|
|
203
|
+
`NOTION_API_KEY`, while `agent-native.ts` adds `runtime.database.required` and
|
|
204
|
+
`GOOGLE_CLIENT_ID`. The result keeps the auth setting, adds the database
|
|
205
|
+
setting, and checks both environment names.
|
|
206
|
+
|
|
207
|
+
## What is safe to commit
|
|
208
|
+
|
|
209
|
+
Safe committed values are public product defaults:
|
|
210
|
+
|
|
211
|
+
- `version`, onboarding modes, and mode names;
|
|
212
|
+
- `true`/`false` readiness and diagnostics decisions;
|
|
213
|
+
- environment variable names in `runtime.environment.required`;
|
|
214
|
+
- deterministic logic based on the Vite context.
|
|
215
|
+
|
|
216
|
+
Do not commit these values to either config format:
|
|
217
|
+
|
|
218
|
+
- API keys, OAuth client secrets, access tokens, signing keys, or passwords;
|
|
219
|
+
- `BETTER_AUTH_SECRET`, `A2A_SECRET`, database URLs, or credential-bearing
|
|
220
|
+
connection strings;
|
|
221
|
+
- secret values read from `.env` and copied into source;
|
|
222
|
+
- deployment-specific host, port, base-path, or auth-bypass values when they
|
|
223
|
+
vary by environment.
|
|
224
|
+
|
|
225
|
+
Even a value that is not a secret should stay in deployment configuration when
|
|
226
|
+
it changes between targets. `agent-native.ts` should describe the app's
|
|
227
|
+
public shape, not become a second environment-variable file.
|
|
228
|
+
|
|
229
|
+
## `agent-native.json` compatibility
|
|
230
|
+
|
|
231
|
+
`agent-native.json` remains supported for fixed JSON configuration and for
|
|
232
|
+
other app-manifest sections already owned by the framework, such as `doctor`,
|
|
233
|
+
`apps`, and local-file declarations. Do not delete those sections just to add
|
|
234
|
+
typed shared configuration.
|
|
235
|
+
|
|
236
|
+
Use JSON when a scaffold, editor, or other tool needs a portable file that it
|
|
237
|
+
can read and write without evaluating TypeScript, or when the value is a fixed
|
|
238
|
+
default that never depends on the Vite command or mode:
|
|
239
|
+
|
|
240
|
+
```json filename="agent-native.json"
|
|
241
|
+
{
|
|
242
|
+
"version": 1,
|
|
243
|
+
"onboarding": {
|
|
244
|
+
"firstRun": "connect"
|
|
81
245
|
},
|
|
82
|
-
|
|
246
|
+
"runtime": {
|
|
247
|
+
"auth": { "enabled": true },
|
|
248
|
+
"database": { "required": true },
|
|
249
|
+
"environment": { "required": ["PUBLIC_API_ORIGIN"] }
|
|
250
|
+
},
|
|
251
|
+
"diagnostics": {
|
|
252
|
+
"failOnBuild": true
|
|
253
|
+
}
|
|
254
|
+
}
|
|
83
255
|
```
|
|
84
256
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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.
|
|
257
|
+
For new app-owned configuration, prefer `agent-native.ts` when the app needs
|
|
258
|
+
types, a mode-aware factory, or a clear place to evolve public defaults. Keep
|
|
259
|
+
`agent-native.json` when portability or existing manifest sections are the
|
|
260
|
+
reason to use it. Both formats accept the same shared options shown above.
|
|
261
|
+
|
|
262
|
+
For deployment variables, credentials, and the exhaustive variable inventory,
|
|
263
|
+
see [Environment Variables](/docs/environment-variables). A deployment-level
|
|
264
|
+
key is not a substitute for user- or organization-scoped credentials in a
|
|
265
|
+
hosted multi-user app. See [Authentication](/docs/authentication) and
|
|
266
|
+
[Security](/docs/security) for those boundaries.
|
|
@@ -102,6 +102,23 @@ A few flags tune this; full details are in the [Environment Variables](#environm
|
|
|
102
102
|
|
|
103
103
|
</Callout>
|
|
104
104
|
|
|
105
|
+
## Local development sign-in {#local-development-sign-in}
|
|
106
|
+
|
|
107
|
+
On a loopback development server, the shared sign-in page puts **Continue as
|
|
108
|
+
local dev** first. It creates or reuses the real Better Auth development
|
|
109
|
+
account and session, so this is the same authenticated path used elsewhere.
|
|
110
|
+
|
|
111
|
+
Choose **Show full sign in options** to reveal normal signup, password, magic
|
|
112
|
+
link, and social-provider options. If the local session cannot be created, the
|
|
113
|
+
page reveals those options automatically so you can continue with standard
|
|
114
|
+
authentication.
|
|
115
|
+
|
|
116
|
+
This convenience is available only when the browser connects through
|
|
117
|
+
`localhost`, `127.0.0.0/8`, or `::1` in development or test. It is disabled for
|
|
118
|
+
deploy previews and hosted production. It is not an authentication bypass.
|
|
119
|
+
Set `AGENT_NATIVE_DISABLE_AUTO_DEV_ACCOUNT=1` to opt out and show the normal
|
|
120
|
+
sign-in page in local development.
|
|
121
|
+
|
|
105
122
|
## Better Auth (Default) {#better-auth}
|
|
106
123
|
|
|
107
124
|
By default, Better Auth powers authentication. When outbound email is ready,
|
|
@@ -585,20 +585,25 @@ hosting behavior.
|
|
|
585
585
|
|
|
586
586
|
Database connection variables (`DATABASE_URL`, `DATABASE_AUTH_TOKEN`, per-app `<APP_NAME>_DATABASE_URL`) live in [Database](/docs/database#production).
|
|
587
587
|
|
|
588
|
-
###
|
|
589
|
-
|
|
590
|
-
These
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
|
598
|
-
|
|
|
599
|
-
| `
|
|
600
|
-
| `
|
|
601
|
-
| `
|
|
588
|
+
### Production-sensitive configuration {#env-required-prod}
|
|
589
|
+
|
|
590
|
+
These settings cover production-sensitive behavior. A standalone app using the
|
|
591
|
+
framework auth needs a stable `BETTER_AUTH_SECRET` and a persistent database;
|
|
592
|
+
the public auth URL is inferred from the request, known template, or hosting
|
|
593
|
+
platform when it is unset. Workspace and A2A settings are conditional on those
|
|
594
|
+
features. Missing values either fail-closed or fall back to weaker behavior
|
|
595
|
+
with a loud warning.
|
|
596
|
+
|
|
597
|
+
| Variable | Description |
|
|
598
|
+
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
599
|
+
| `BETTER_AUTH_SECRET` | 32+ char random string. Signs session cookies and is the fallback for `OAUTH_STATE_SECRET` and app-local encrypted values. It is also a legacy read candidate for existing shared vault ciphertext. Hard-required: the framework throws on startup if missing in production. |
|
|
600
|
+
| `BETTER_AUTH_URL` | Optional public origin override for this app (e.g. `https://mail.example.com`). The framework infers it from request, known-template, and hosting-platform context when unset. |
|
|
601
|
+
| `ANTHROPIC_API_KEY` | API key for the embedded production agent. **In multi-tenant deploys**, the framework refuses to fall back to this when the user has no per-user key — bring-your-own-key is required. Single-tenant self-hosted installs use it as a global key. |
|
|
602
|
+
| `OAUTH_STATE_SECRET` | Dedicated HMAC key for OAuth state envelopes (Google, Atlassian, Zoom). Falls back to `BETTER_AUTH_SECRET` when unset, but a dedicated value is recommended so rotating one doesn't invalidate the other. Generate via `openssl rand -hex 32`. |
|
|
603
|
+
| `A2A_SECRET` | Shared HMAC for inter-app A2A JSON-RPC and signed background handoffs. Required for hosted workspace deploys and A2A features; without it, those endpoints fail closed in production. When no dedicated workspace vault key is set, shared vault ciphertext uses a purpose-derived key from this value, so rotating it also rotates the vault key. |
|
|
604
|
+
| `WORKSPACE_SECRETS_ENCRYPTION_KEY` | Preferred stable AES-256-GCM key for the shared encrypted-at-rest secrets vault. Set the same value in every app that reads the vault. It is separate from app-local OAuth/credential encryption, so A2A trust can rotate without stranding vault rows. Existing A2A-, Better Auth-, and app-key ciphertext is migrated on successful reads. |
|
|
605
|
+
| `WORKSPACE_SECRETS_ENCRYPTION_KEY_PREVIOUS` | Optional previous workspace vault key used only during a rotation window. Deploy it alongside the new `WORKSPACE_SECRETS_ENCRYPTION_KEY`, let successful reads re-encrypt rows, then remove it after migration. |
|
|
606
|
+
| `SECRETS_ENCRYPTION_KEY` | Legacy combined key for app-local encryption and the shared vault. It remains supported, but new multi-app deployments should use `WORKSPACE_SECRETS_ENCRYPTION_KEY` for the shared vault so changing workspace encryption does not change app-local OAuth ciphertext. |
|
|
602
607
|
|
|
603
608
|
### Auth & Identity {#env-auth}
|
|
604
609
|
|
|
@@ -184,7 +184,7 @@ Full props: `AgentPanelProps` in `@agent-native/core/client`.
|
|
|
184
184
|
|
|
185
185
|
## Programmatic messages: `sendToAgentChat()` {#send}
|
|
186
186
|
|
|
187
|
-
A button that hands work off to the agent (instead of running an inline `llm()` call — the anti-pattern from the [ladder](/docs/what-is-agent-native#the-ladder)):
|
|
187
|
+
A button that hands work off to the agent (instead of running an inline `llm()` call — the anti-pattern from the [ladder](/docs/what-is-agent-native#the-ladder)). For visible, user-initiated AI work, open the sidebar explicitly so the user can see, steer, and continue the same thread:
|
|
188
188
|
|
|
189
189
|
```tsx
|
|
190
190
|
import { sendToAgentChat } from "@agent-native/core/client/agent-chat";
|
|
@@ -194,6 +194,7 @@ import { sendToAgentChat } from "@agent-native/core/client/agent-chat";
|
|
|
194
194
|
message: "Generate a chart showing signups by source",
|
|
195
195
|
context: `Dashboard ID: ${dashboardId}, date range: last 30 days`,
|
|
196
196
|
submit: true,
|
|
197
|
+
openSidebar: true,
|
|
197
198
|
})
|
|
198
199
|
}
|
|
199
200
|
>
|
|
@@ -208,7 +209,7 @@ import { sendToAgentChat } from "@agent-native/core/client/agent-chat";
|
|
|
208
209
|
- **`submit`** — `true` to auto-run, `false` to prefill but wait. Omit to use the project default.
|
|
209
210
|
- **`newTab`** — create a separate chat thread for this prompt.
|
|
210
211
|
- **`background`** — with `newTab`, run without focusing the new thread. The hidden run is tracked in `RunsTray`.
|
|
211
|
-
- **`openSidebar`** —
|
|
212
|
+
- **`openSidebar`** — use `true` for visible user-initiated AI work. Set to `false` only for explicitly silent background or system-initiated sends. The default opens the sidebar so the user sees the response.
|
|
212
213
|
- **`type`** — `"content"` (default) keeps the work in the embedded app agent, which operates through app tools unless its frame is intentionally granted workspace and write tooling. `"code"` routes to a separate code-capable frame (for repository source changes, see [Frames](/docs/frames)).
|
|
213
214
|
|
|
214
215
|
`sendToAgentChat` returns a stable `tabId` you can use to track the chat run.
|
|
@@ -229,6 +230,11 @@ sendToAgentChat({
|
|
|
229
230
|
This is still a full agent run with tools, actions, thread state, and run
|
|
230
231
|
tracking. It simply does not steal focus from the user's current sidebar state.
|
|
231
232
|
|
|
233
|
+
Keep follow-up and revision prompts in the existing sidebar thread. Do not add
|
|
234
|
+
a second freeform input beside the generated result. A small local form or
|
|
235
|
+
popover is appropriate for structured values the UI must validate, but the
|
|
236
|
+
conversation itself belongs in the AgentSidebar composer.
|
|
237
|
+
|
|
232
238
|
When the same route is embedded as an MCP App, submitted
|
|
233
239
|
`sendToAgentChat()` calls are forwarded to the host chat where supported; see
|
|
234
240
|
[Client](/docs/client#sendtoagentchat) for the MCP App bridge behavior.
|
|
@@ -265,6 +271,16 @@ and avoid posting directly to `/_agent-native/agent-chat` from product UI. If a
|
|
|
265
271
|
named helper is missing for a real custom surface, add that helper first so
|
|
266
272
|
client code does not learn a second, ad hoc transport.
|
|
267
273
|
|
|
274
|
+
## Choosing agent chat versus an action {#agent-or-action}
|
|
275
|
+
|
|
276
|
+
Use `useActionQuery` or `useActionMutation` directly for deterministic local
|
|
277
|
+
operations such as CRUD, validation, provider reads, and persistence. If the
|
|
278
|
+
user experiences the workflow as research, analysis, generation,
|
|
279
|
+
recommendation, synthesis, or other multi-step reasoning, start it with
|
|
280
|
+
`sendToAgentChat({ openSidebar: true })` and let the agent orchestrate focused
|
|
281
|
+
actions. Deterministic implementation alone is not a reason to hide an
|
|
282
|
+
AI-shaped workflow inside one opaque action.
|
|
283
|
+
|
|
268
284
|
## Typesafe actions from the UI: `useActionMutation()` {#use-action-mutation}
|
|
269
285
|
|
|
270
286
|
When the UI needs to run the same operation an agent tool would run — rung 3 of the [ladder](/docs/what-is-agent-native#rung-three) — use `useActionMutation`:
|
|
@@ -324,6 +340,7 @@ export default function Root() {
|
|
|
324
340
|
message: "Summarize this thread",
|
|
325
341
|
context: `Thread id: ${threadId}`,
|
|
326
342
|
submit: true,
|
|
343
|
+
openSidebar: true,
|
|
327
344
|
})
|
|
328
345
|
}
|
|
329
346
|
>
|