@agent-native/core 0.127.3 → 0.128.1
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 +2 -2
- package/corpus/core/CHANGELOG.md +101 -0
- package/corpus/core/README.md +5 -26
- package/corpus/core/docs/content/actions.mdx +47 -4
- package/corpus/core/docs/content/native-chat-ui.mdx +7 -0
- package/corpus/core/docs/content/organizations-teams-permissions.mdx +109 -3
- package/corpus/core/docs/content/template-design-collaboration-and-full-apps.mdx +15 -0
- package/corpus/core/docs/content/toolkit-org-team.mdx +72 -12
- package/corpus/core/package.json +2 -1
- package/corpus/core/src/a2a/artifact-response.ts +36 -29
- package/corpus/core/src/action.ts +83 -2
- package/corpus/core/src/chat-threads/store.ts +48 -43
- package/corpus/core/src/cli/skills-content/design-visual-edit-skill.ts +46 -3
- package/corpus/core/src/client/AgentPanel.tsx +26 -6
- package/corpus/core/src/client/AssistantChat.tsx +63 -7
- package/corpus/core/src/client/DefaultSpinner.tsx +29 -0
- package/corpus/core/src/client/org/TeamPage.tsx +161 -6
- package/corpus/core/src/client/org/hooks.ts +67 -0
- package/corpus/core/src/client/org/index.ts +9 -0
- package/corpus/core/src/client/transcription/use-live-transcription.ts +62 -10
- package/corpus/core/src/db/client.ts +42 -3
- package/corpus/core/src/db/ensure-additive-columns.ts +60 -33
- package/corpus/core/src/deploy/build.ts +31 -2
- package/corpus/core/src/mcp-client/routes.ts +10 -1
- package/corpus/core/src/org/app-roles-handlers.ts +152 -0
- package/corpus/core/src/org/app-roles.ts +355 -0
- package/corpus/core/src/org/index.ts +27 -1
- package/corpus/core/src/org/migrations.ts +22 -0
- package/corpus/core/src/org/plugin.ts +27 -0
- package/corpus/core/src/org/schema.ts +15 -0
- package/corpus/core/src/scripts/docs/search.ts +17 -0
- package/corpus/core/src/scripts/docs/source-search.ts +10 -0
- package/corpus/core/src/server/agent-chat/script-entries.ts +3 -0
- package/corpus/core/src/server/agent-chat-plugin.ts +53 -52
- package/corpus/core/src/server/builder-design-systems.ts +299 -82
- package/corpus/core/src/server/core-routes-plugin.ts +6 -1
- package/corpus/core/src/server/framework-request-handler.ts +44 -6
- package/corpus/core/src/server/index.ts +8 -0
- package/corpus/core/src/templates/default/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/core/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/corpus/core/src/templates/default/.agents/skills/security/SKILL.md +31 -0
- package/corpus/core/src/templates/headless/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +40 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/security/SKILL.md +31 -0
- package/corpus/core/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/analytics/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/analytics/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/analytics/_gitignore +2 -0
- package/corpus/templates/analytics/actions/data-source-status.ts +21 -12
- package/corpus/templates/analytics/app/global.css +7 -7
- package/corpus/templates/analytics/app/i18n-data.ts +30 -0
- package/corpus/templates/analytics/app/lib/data-source-status.ts +2 -1
- package/corpus/templates/analytics/app/pages/DataSources.tsx +54 -10
- package/corpus/templates/analytics/changelog/2026-07-28-analytics-pages-load-reliably-with-large-dashboard-workspaces.md +6 -0
- package/corpus/templates/analytics/changelog/2026-07-28-dashboard-loading-shimmer-now-flows-smoothly-in-one-directi.md +6 -0
- package/corpus/templates/analytics/server/lib/first-party-dashboard-repair.ts +5 -4
- package/corpus/templates/analytics/server/plugins/agent-chat.ts +54 -42
- package/corpus/templates/analytics/server/plugins/db.ts +1 -18
- package/corpus/templates/assets/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/assets/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/assets/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/assets/_gitignore +2 -0
- package/corpus/templates/brain/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/brain/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/corpus/templates/brain/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/brain/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/calendar/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/calendar/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/calendar/_gitignore +2 -0
- package/corpus/templates/chat/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/chat/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/corpus/templates/chat/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/chat/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/clips/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/clips/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/clips/_gitignore +2 -0
- package/corpus/templates/clips/actions/request-transcript.ts +77 -11
- package/corpus/templates/clips/actions/save-browser-transcript.ts +28 -7
- package/corpus/templates/clips/app/routes/record.tsx +11 -3
- package/corpus/templates/clips/changelog/2026-07-28-browser-recordings-no-longer-save-a-truncated-transcript-as-.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-28-browser-recordings-no-longer-stop-transcribing-partway-throu.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-28-desktop-full-screen-clips-now-get-an-instant-local-transcrip.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-28-long-transcriptions-no-longer-show-a-false-transcription-sto.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-28-restarting-for-an-update-now-installs-the-newest-release-ins.md +6 -0
- package/corpus/templates/clips/changelog/2026-07-28-the-meeting-recording-pill-now-anchors-to-the-right-edge-of-.md +6 -0
- package/corpus/templates/clips/desktop/src/lib/audio-meter.ts +31 -2
- package/corpus/templates/clips/desktop/src/lib/recorder.ts +114 -13
- package/corpus/templates/clips/desktop/src/lib/updater.ts +12 -4
- package/corpus/templates/clips/desktop/src/overlays/live-audio-bars.tsx +40 -15
- package/corpus/templates/clips/desktop/src/styles.css +10 -7
- package/corpus/templates/clips/desktop/src-tauri/src/recording_indicator.rs +21 -14
- package/corpus/templates/clips/shared/transcript-status.ts +10 -0
- package/corpus/templates/content/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/content/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/content/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/content/_gitignore +2 -0
- package/corpus/templates/crm/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/design/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/design/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/design/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/design/.agents/skills/visual-edit/SKILL.md +46 -3
- package/corpus/templates/design/.generated/bridge/editor-chrome.generated.ts +7 -5
- package/corpus/templates/design/_gitignore +2 -0
- package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +2 -2
- package/corpus/templates/design/app/components/design/bridge/editor-chrome.bridge.ts +7 -4
- package/corpus/templates/design/app/components/design/keyboard-shortcuts.ts +1 -1
- package/corpus/templates/design/app/hooks/useDesignHotkeys.ts +10 -4
- package/corpus/templates/design/app/i18n-data.ts +10 -0
- package/corpus/templates/design/app/lib/builder-design-system-upload.ts +280 -0
- package/corpus/templates/design/app/lib/design-ui-events.ts +5 -0
- package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +90 -54
- package/corpus/templates/design/app/root.tsx +18 -1
- package/corpus/templates/design/changelog/2026-07-28-figma-fig-uploads-now-show-indexing-progress-and-an-open-in-.md +6 -0
- package/corpus/templates/design/changelog/2026-07-28-show-or-hide-design-editing-chrome-with-cmd-on-apple-devices.md +6 -0
- package/corpus/templates/design/server/handlers/design-system-decode-job-status.ts +49 -0
- package/corpus/templates/design/server/handlers/design-system-upload-start.ts +87 -0
- package/corpus/templates/design/server/handlers/index-design-system-sources.ts +82 -0
- package/corpus/templates/design/server/routes/api/design-system-decode-job-status.get.ts +1 -0
- package/corpus/templates/design/server/routes/api/design-system-upload-start.post.ts +1 -0
- package/corpus/templates/design/server/routes/api/index-design-system-sources.post.ts +1 -0
- package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/dispatch/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/dispatch/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/dispatch/_gitignore +2 -0
- package/corpus/templates/forms/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/forms/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/forms/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/forms/_gitignore +2 -0
- package/corpus/templates/macros/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/macros/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/macros/_gitignore +2 -0
- package/corpus/templates/mail/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/mail/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/mail/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/mail/_gitignore +2 -0
- package/corpus/templates/plan/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/plan/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/corpus/templates/plan/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/plan/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/plan/_gitignore +2 -0
- package/corpus/templates/slides/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/slides/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/slides/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/slides/_gitignore +2 -0
- package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +126 -53
- package/corpus/templates/slides/app/components/design-system/builder-design-system-upload.ts +271 -0
- package/corpus/templates/slides/app/components/design-system/builder-index-response.ts +1 -1
- package/corpus/templates/slides/app/i18n/en-US.ts +1 -0
- package/corpus/templates/slides/server/handlers/design-system-decode-job-status.ts +49 -0
- package/corpus/templates/slides/server/handlers/design-system-upload-start.ts +87 -0
- package/corpus/templates/slides/server/handlers/index-design-system-sources.ts +79 -0
- package/corpus/templates/slides/server/routes/api/design-system-decode-job-status.get.ts +1 -0
- package/corpus/templates/slides/server/routes/api/design-system-upload-start.post.ts +1 -0
- package/corpus/templates/slides/server/routes/api/index-design-system-sources.post.ts +1 -0
- package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +32 -0
- package/corpus/templates/tasks/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/corpus/templates/tasks/.agents/skills/security/SKILL.md +31 -0
- package/corpus/templates/tasks/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/templates/tasks/_gitignore +2 -0
- package/dist/a2a/artifact-response.d.ts.map +1 -1
- package/dist/a2a/artifact-response.js +30 -29
- package/dist/a2a/artifact-response.js.map +1 -1
- package/dist/action.d.ts +36 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +37 -2
- package/dist/action.js.map +1 -1
- package/dist/chat-threads/store.d.ts +12 -0
- package/dist/chat-threads/store.d.ts.map +1 -1
- package/dist/chat-threads/store.js +48 -42
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.d.ts.map +1 -1
- package/dist/cli/skills-content/design-visual-edit-skill.js +46 -3
- package/dist/cli/skills-content/design-visual-edit-skill.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +3 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +11 -9
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +57 -6
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/DefaultSpinner.d.ts +7 -0
- package/dist/client/DefaultSpinner.d.ts.map +1 -1
- package/dist/client/DefaultSpinner.js +25 -1
- package/dist/client/DefaultSpinner.js.map +1 -1
- package/dist/client/org/TeamPage.d.ts +13 -1
- package/dist/client/org/TeamPage.d.ts.map +1 -1
- package/dist/client/org/TeamPage.js +41 -11
- package/dist/client/org/TeamPage.js.map +1 -1
- package/dist/client/org/hooks.d.ts +37 -0
- package/dist/client/org/hooks.d.ts.map +1 -1
- package/dist/client/org/hooks.js +37 -0
- package/dist/client/org/hooks.js.map +1 -1
- package/dist/client/org/index.d.ts +3 -2
- package/dist/client/org/index.d.ts.map +1 -1
- package/dist/client/org/index.js +1 -1
- package/dist/client/org/index.js.map +1 -1
- package/dist/client/transcription/use-live-transcription.d.ts +8 -0
- package/dist/client/transcription/use-live-transcription.d.ts.map +1 -1
- package/dist/client/transcription/use-live-transcription.js +38 -11
- package/dist/client/transcription/use-live-transcription.js.map +1 -1
- package/dist/collab/routes.d.ts +1 -1
- package/dist/db/client.d.ts +12 -0
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +40 -3
- package/dist/db/client.js.map +1 -1
- package/dist/db/ensure-additive-columns.d.ts.map +1 -1
- package/dist/db/ensure-additive-columns.js +54 -32
- package/dist/db/ensure-additive-columns.js.map +1 -1
- package/dist/deploy/build.d.ts +1 -0
- package/dist/deploy/build.d.ts.map +1 -1
- package/dist/deploy/build.js +23 -2
- package/dist/deploy/build.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +1 -1
- package/dist/mcp-client/routes.d.ts +3 -1
- package/dist/mcp-client/routes.d.ts.map +1 -1
- package/dist/mcp-client/routes.js +8 -2
- package/dist/mcp-client/routes.js.map +1 -1
- package/dist/notifications/routes.d.ts +1 -1
- package/dist/org/app-roles-handlers.d.ts +27 -0
- package/dist/org/app-roles-handlers.d.ts.map +1 -0
- package/dist/org/app-roles-handlers.js +125 -0
- package/dist/org/app-roles-handlers.js.map +1 -0
- package/dist/org/app-roles.d.ts +136 -0
- package/dist/org/app-roles.d.ts.map +1 -0
- package/dist/org/app-roles.js +216 -0
- package/dist/org/app-roles.js.map +1 -0
- package/dist/org/index.d.ts +4 -1
- package/dist/org/index.d.ts.map +1 -1
- package/dist/org/index.js +3 -1
- package/dist/org/index.js.map +1 -1
- package/dist/org/migrations.d.ts.map +1 -1
- package/dist/org/migrations.js +22 -0
- package/dist/org/migrations.js.map +1 -1
- package/dist/org/plugin.d.ts +2 -0
- package/dist/org/plugin.d.ts.map +1 -1
- package/dist/org/plugin.js +20 -0
- package/dist/org/plugin.js.map +1 -1
- package/dist/org/schema.d.ts +143 -0
- package/dist/org/schema.d.ts.map +1 -1
- package/dist/org/schema.js +14 -0
- package/dist/org/schema.js.map +1 -1
- package/dist/provider-api/actions/custom-provider-registration.d.ts +8 -8
- package/dist/provider-api/actions/provider-api.d.ts +4 -4
- package/dist/scripts/docs/search.d.ts.map +1 -1
- package/dist/scripts/docs/search.js +15 -0
- package/dist/scripts/docs/search.js.map +1 -1
- package/dist/scripts/docs/source-search.d.ts +7 -0
- package/dist/scripts/docs/source-search.d.ts.map +1 -1
- package/dist/scripts/docs/source-search.js +9 -0
- package/dist/scripts/docs/source-search.js.map +1 -1
- package/dist/secrets/routes.d.ts +9 -9
- package/dist/server/agent-chat/script-entries.d.ts.map +1 -1
- package/dist/server/agent-chat/script-entries.js +3 -0
- package/dist/server/agent-chat/script-entries.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +46 -48
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/builder-design-systems.d.ts +49 -0
- package/dist/server/builder-design-systems.d.ts.map +1 -1
- package/dist/server/builder-design-systems.js +221 -69
- package/dist/server/builder-design-systems.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +6 -1
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/framework-request-handler.d.ts.map +1 -1
- package/dist/server/framework-request-handler.js +42 -6
- package/dist/server/framework-request-handler.js.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/realtime-token.d.ts +1 -1
- package/dist/templates/chat/.agents/skills/actions/SKILL.md +32 -0
- package/dist/templates/chat/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/dist/templates/chat/.agents/skills/security/SKILL.md +31 -0
- package/dist/templates/chat/.agents/skills/sharing/SKILL.md +4 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +32 -0
- package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/dist/templates/default/.agents/skills/security/SKILL.md +31 -0
- package/dist/templates/headless/.agents/skills/actions/SKILL.md +32 -0
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +32 -0
- package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +40 -0
- package/dist/templates/workspace-core/.agents/skills/security/SKILL.md +31 -0
- package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +4 -0
- package/docs/content/actions.mdx +47 -4
- package/docs/content/native-chat-ui.mdx +7 -0
- package/docs/content/organizations-teams-permissions.mdx +109 -3
- package/docs/content/template-design-collaboration-and-full-apps.mdx +15 -0
- package/docs/content/toolkit-org-team.mdx +72 -12
- package/package.json +2 -1
- package/src/a2a/artifact-response.ts +36 -29
- package/src/action.ts +83 -2
- package/src/chat-threads/store.ts +48 -43
- package/src/cli/skills-content/design-visual-edit-skill.ts +46 -3
- package/src/client/AgentPanel.tsx +26 -6
- package/src/client/AssistantChat.tsx +63 -7
- package/src/client/DefaultSpinner.tsx +29 -0
- package/src/client/org/TeamPage.tsx +161 -6
- package/src/client/org/hooks.ts +67 -0
- package/src/client/org/index.ts +9 -0
- package/src/client/transcription/use-live-transcription.ts +62 -10
- package/src/db/client.ts +42 -3
- package/src/db/ensure-additive-columns.ts +60 -33
- package/src/deploy/build.ts +31 -2
- package/src/mcp-client/routes.ts +10 -1
- package/src/org/app-roles-handlers.ts +152 -0
- package/src/org/app-roles.ts +355 -0
- package/src/org/index.ts +27 -1
- package/src/org/migrations.ts +22 -0
- package/src/org/plugin.ts +27 -0
- package/src/org/schema.ts +15 -0
- package/src/scripts/docs/search.ts +17 -0
- package/src/scripts/docs/source-search.ts +10 -0
- package/src/server/agent-chat/script-entries.ts +3 -0
- package/src/server/agent-chat-plugin.ts +53 -52
- package/src/server/builder-design-systems.ts +299 -82
- package/src/server/core-routes-plugin.ts +6 -1
- package/src/server/framework-request-handler.ts +44 -6
- package/src/server/index.ts +8 -0
- package/src/templates/chat/.agents/skills/actions/SKILL.md +32 -0
- package/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/src/templates/chat/.agents/skills/security/SKILL.md +31 -0
- package/src/templates/chat/.agents/skills/sharing/SKILL.md +4 -0
- package/src/templates/default/.agents/skills/actions/SKILL.md +32 -0
- package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/src/templates/default/.agents/skills/security/SKILL.md +31 -0
- package/src/templates/headless/.agents/skills/actions/SKILL.md +32 -0
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +32 -0
- package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +7 -0
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +40 -0
- package/src/templates/workspace-core/.agents/skills/security/SKILL.md +31 -0
- package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +4 -0
- package/corpus/core/src/templates/chat/.agents/skills/actions/SKILL.md +0 -530
- package/corpus/core/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +0 -191
- package/corpus/core/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +0 -115
- package/corpus/core/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +0 -177
- package/corpus/core/src/templates/chat/.agents/skills/capture-learnings/SKILL.md +0 -89
- package/corpus/core/src/templates/chat/.agents/skills/create-skill/SKILL.md +0 -221
- package/corpus/core/src/templates/chat/.agents/skills/customizing-agent-native/SKILL.md +0 -220
- package/corpus/core/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +0 -263
- package/corpus/core/src/templates/chat/.agents/skills/feature-flags/SKILL.md +0 -169
- package/corpus/core/src/templates/chat/.agents/skills/frontend-design/SKILL.md +0 -174
- package/corpus/core/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +0 -232
- package/corpus/core/src/templates/chat/.agents/skills/security/SKILL.md +0 -282
- package/corpus/core/src/templates/chat/.agents/skills/self-modifying-code/SKILL.md +0 -119
- package/corpus/core/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +0 -123
- package/corpus/core/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +0 -122
- package/corpus/core/src/templates/chat/.env.example +0 -5
- package/corpus/core/src/templates/chat/.ignore +0 -0
- package/corpus/core/src/templates/chat/.oxfmtrc.json +0 -8
- package/corpus/core/src/templates/chat/AGENTS.md +0 -77
- package/corpus/core/src/templates/chat/CHANGELOG.md +0 -10
- package/corpus/core/src/templates/chat/DEVELOPING.md +0 -185
- package/corpus/core/src/templates/chat/README.md +0 -32
- package/corpus/core/src/templates/chat/_gitignore +0 -46
- package/corpus/core/src/templates/chat/actions/hello.ts +0 -13
- package/corpus/core/src/templates/chat/actions/navigate.ts +0 -41
- package/corpus/core/src/templates/chat/actions/run.ts +0 -2
- package/corpus/core/src/templates/chat/actions/view-screen.ts +0 -31
- package/corpus/core/src/templates/chat/app/components/layout/Header.tsx +0 -60
- package/corpus/core/src/templates/chat/app/components/layout/Layout.tsx +0 -188
- package/corpus/core/src/templates/chat/app/components/layout/Sidebar.tsx +0 -505
- package/corpus/core/src/templates/chat/app/components/ui/button.tsx +0 -1
- package/corpus/core/src/templates/chat/app/components/ui/card.tsx +0 -1
- package/corpus/core/src/templates/chat/app/components/ui/dropdown-menu.tsx +0 -1
- package/corpus/core/src/templates/chat/app/components/ui/input.tsx +0 -1
- package/corpus/core/src/templates/chat/app/components/ui/label.tsx +0 -1
- package/corpus/core/src/templates/chat/app/components/ui/sheet.tsx +0 -1
- package/corpus/core/src/templates/chat/app/components/ui/toolkit-provider.tsx +0 -17
- package/corpus/core/src/templates/chat/app/components/ui/tooltip.tsx +0 -1
- package/corpus/core/src/templates/chat/app/design-system.ts +0 -3
- package/corpus/core/src/templates/chat/app/entry.client.tsx +0 -22
- package/corpus/core/src/templates/chat/app/entry.server.tsx +0 -10
- package/corpus/core/src/templates/chat/app/global.css +0 -93
- package/corpus/core/src/templates/chat/app/hooks/use-navigation-state.ts +0 -93
- package/corpus/core/src/templates/chat/app/i18n/ar-SA.ts +0 -68
- package/corpus/core/src/templates/chat/app/i18n/de-DE.ts +0 -71
- package/corpus/core/src/templates/chat/app/i18n/en-US.ts +0 -70
- package/corpus/core/src/templates/chat/app/i18n/es-ES.ts +0 -71
- package/corpus/core/src/templates/chat/app/i18n/fr-FR.ts +0 -71
- package/corpus/core/src/templates/chat/app/i18n/hi-IN.ts +0 -69
- package/corpus/core/src/templates/chat/app/i18n/index.ts +0 -34
- package/corpus/core/src/templates/chat/app/i18n/ja-JP.ts +0 -70
- package/corpus/core/src/templates/chat/app/i18n/ko-KR.ts +0 -70
- package/corpus/core/src/templates/chat/app/i18n/pt-BR.ts +0 -71
- package/corpus/core/src/templates/chat/app/i18n/zh-CN.ts +0 -66
- package/corpus/core/src/templates/chat/app/i18n/zh-TW.ts +0 -66
- package/corpus/core/src/templates/chat/app/i18n-data.ts +0 -556
- package/corpus/core/src/templates/chat/app/lib/agent-page.tsx +0 -49
- package/corpus/core/src/templates/chat/app/lib/app-config.ts +0 -11
- package/corpus/core/src/templates/chat/app/lib/tab-id.ts +0 -1
- package/corpus/core/src/templates/chat/app/lib/utils.ts +0 -1
- package/corpus/core/src/templates/chat/app/root.tsx +0 -173
- package/corpus/core/src/templates/chat/app/routes/_index.tsx +0 -94
- package/corpus/core/src/templates/chat/app/routes/agent.tsx +0 -24
- package/corpus/core/src/templates/chat/app/routes/chat.$threadId.tsx +0 -1
- package/corpus/core/src/templates/chat/app/routes/database.tsx +0 -17
- package/corpus/core/src/templates/chat/app/routes/extensions.$id.$slug.tsx +0 -2
- package/corpus/core/src/templates/chat/app/routes/extensions.$id.tsx +0 -11
- package/corpus/core/src/templates/chat/app/routes/extensions._index.tsx +0 -11
- package/corpus/core/src/templates/chat/app/routes/extensions.tsx +0 -5
- package/corpus/core/src/templates/chat/app/routes/observability.tsx +0 -19
- package/corpus/core/src/templates/chat/app/routes/settings.tsx +0 -89
- package/corpus/core/src/templates/chat/app/routes/team.tsx +0 -11
- package/corpus/core/src/templates/chat/app/routes.ts +0 -4
- package/corpus/core/src/templates/chat/app/vite-env.d.ts +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +0 -5
- package/corpus/core/src/templates/chat/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-17-the-agent-chat-sidebar-stays-closed-until-you-open-it-or-sta.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-22-compact-sidebar-footer.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-22-manage-agent-navigation-now-uses-the-connected-nodes-icon.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-22-recent-chats-are-easier-to-scan-and-expand.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-23-full-page-chat-is-better-centered-with-quieter-chat-history-.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-24-borderless-secondary-surfaces.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-24-sidebar-footer-controls-follow-a-consistent-order.md +0 -6
- package/corpus/core/src/templates/chat/changelog/2026-07-25-settings-navigation-now-keeps-manage-agent-as-a-dedicated-li.md +0 -6
- package/corpus/core/src/templates/chat/components.json +0 -20
- package/corpus/core/src/templates/chat/learnings.defaults.md +0 -5
- package/corpus/core/src/templates/chat/netlify.toml +0 -11
- package/corpus/core/src/templates/chat/package.json +0 -92
- package/corpus/core/src/templates/chat/public/agent-native-icon-dark.svg +0 -10
- package/corpus/core/src/templates/chat/public/agent-native-icon-light.svg +0 -10
- package/corpus/core/src/templates/chat/public/agent-native-logo-dark.svg +0 -21
- package/corpus/core/src/templates/chat/public/agent-native-logo-light.svg +0 -21
- package/corpus/core/src/templates/chat/public/favicon.svg +0 -1
- package/corpus/core/src/templates/chat/public/icon-180.svg +0 -1
- package/corpus/core/src/templates/chat/public/icon-192.svg +0 -1
- package/corpus/core/src/templates/chat/public/icon-512.svg +0 -1
- package/corpus/core/src/templates/chat/public/manifest.json +0 -21
- package/corpus/core/src/templates/chat/react-router.config.ts +0 -7
- package/corpus/core/src/templates/chat/server/middleware/auth.ts +0 -15
- package/corpus/core/src/templates/chat/server/plugins/agent-chat.ts +0 -21
- package/corpus/core/src/templates/chat/server/plugins/auth.ts +0 -17
- package/corpus/core/src/templates/chat/server/routes/[...page].get.ts +0 -5
- package/corpus/core/src/templates/chat/ssr-entry.ts +0 -15
- package/corpus/core/src/templates/chat/tsconfig.json +0 -21
- package/corpus/core/src/templates/chat/vite.config.ts +0 -19
- package/corpus/templates/design/server/handlers/index-design-system-with-builder.ts +0 -151
- package/corpus/templates/design/server/routes/api/index-design-system-with-builder.post.ts +0 -1
- package/corpus/templates/slides/server/handlers/index-design-system-with-builder.ts +0 -119
- package/corpus/templates/slides/server/routes/api/index-design-system-with-builder.post.ts +0 -1
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
# Chat — Agent Guide
|
|
2
|
-
|
|
3
|
-
Chat is the minimal chat-first agent-native app template. Keep chat as the
|
|
4
|
-
primary surface, add actions for real capabilities, and add screens only when a
|
|
5
|
-
workflow needs durable UI around the conversation.
|
|
6
|
-
|
|
7
|
-
## Core Rules
|
|
8
|
-
|
|
9
|
-
- Store large file/blob payloads in configured file/blob storage, not SQL: no
|
|
10
|
-
base64, `data:` URLs, images, video/audio, PDFs, ZIPs, screenshots,
|
|
11
|
-
thumbnails, or replay chunks in app tables, `application_state`, `settings`,
|
|
12
|
-
or `resources`; persist URLs, ids, or handles instead.
|
|
13
|
-
- Never hardcode API keys, tokens, webhook URLs, signing secrets, private Builder/internal data, customer data, or credential-looking literals. Use secrets/OAuth/runtime configuration and obvious placeholders in examples.
|
|
14
|
-
- Follow the root framework contract: data in SQL, actions first, application
|
|
15
|
-
state for navigation/selection, and shared agent chat for AI work.
|
|
16
|
-
- Scale effort to the task. A small, well-specified change is a short read, the
|
|
17
|
-
edit, and the app's existing checks (`pnpm typecheck`, formatter, existing
|
|
18
|
-
tests) — not a codebase survey, unrequested tests, or browser automation.
|
|
19
|
-
- Use actions for app operations and keep frontend/API parity.
|
|
20
|
-
- Do not add `/api/*` routes for app data. If you are about to create a file
|
|
21
|
-
under `server/routes/api/`, or middleware to guard one, stop and write a
|
|
22
|
-
`defineAction` instead. The only exceptions are uploads, streaming, inbound
|
|
23
|
-
webhooks, OAuth callbacks, public unauthenticated URLs, and non-JSON
|
|
24
|
-
responses — not auth, settings, search, or CRUD.
|
|
25
|
-
- Treat the chat as the default UI. When the user asks for a capability, prefer
|
|
26
|
-
adding or improving the action surface first, then add a page, table, form, or
|
|
27
|
-
widget only when the user needs to inspect, compare, approve, or share durable
|
|
28
|
-
objects.
|
|
29
|
-
- If the user wants to plug in their own agent backend, keep the app shell and
|
|
30
|
-
thread UI intact and adapt the chat through the framework's `AgentChatRuntime`
|
|
31
|
-
connector helpers instead of forking the transcript/composer UI.
|
|
32
|
-
- Keep the action surface small and orthogonal: every action is a tool in the
|
|
33
|
-
model's context window, so prefer one CRUD-style `update` (patch of fields)
|
|
34
|
-
over many per-field actions, reach for an existing generic query / escape
|
|
35
|
-
hatch (`provider-api-*`, dev `db-query`) before minting a new read action,
|
|
36
|
-
mark UI-only or programmatic actions `agentTool: false` to hide them from the
|
|
37
|
-
model (distinct from `toolCallable: false`, which only gates the extension
|
|
38
|
-
iframe), and delete or hide actions the UI no longer uses. See the `actions`
|
|
39
|
-
skill.
|
|
40
|
-
- Keep database code provider-agnostic and additive.
|
|
41
|
-
- Use `view-screen` or application state when the active page/selection is
|
|
42
|
-
unclear.
|
|
43
|
-
- For new features, update UI, actions, skills/instructions, and application
|
|
44
|
-
state when applicable.
|
|
45
|
-
|
|
46
|
-
## Application State
|
|
47
|
-
|
|
48
|
-
- `navigation` should describe the current view and selected entity ids. The
|
|
49
|
-
default chat view is `chat` at `/`.
|
|
50
|
-
- `navigate` may be used to move the UI when the app supports it.
|
|
51
|
-
- `view-screen` is the first tool to call when the user's visible context
|
|
52
|
-
matters.
|
|
53
|
-
|
|
54
|
-
## Framework Docs Lookup
|
|
55
|
-
|
|
56
|
-
- Before implementing or explaining non-trivial Agent Native behavior, use the
|
|
57
|
-
`agent-native-docs` skill and the built-in `docs-search` action/tool to read
|
|
58
|
-
the version-matched framework docs bundled with `@agent-native/core`.
|
|
59
|
-
- Use the built-in `source-search` action/tool, or search
|
|
60
|
-
`node_modules/@agent-native/core/corpus`, when you need current core or
|
|
61
|
-
first-party template implementation examples.
|
|
62
|
-
- Prefer those installed docs over memory or public docs when package APIs,
|
|
63
|
-
generated-app conventions, workspaces, actions, or agent surfaces are involved.
|
|
64
|
-
- Before building common workspace or agent UI, read `agent-native-toolkit` to
|
|
65
|
-
inventory existing public kits and installed package seams.
|
|
66
|
-
- Read `customizing-agent-native` before overriding the chat shell or shared UI.
|
|
67
|
-
Keep Core thread/runtime behavior and use the supported ladder: configure →
|
|
68
|
-
compose → eject the smallest presentation unit → propose a shared seam.
|
|
69
|
-
Preview before `--apply` and commit `agent-native.ejections.json`.
|
|
70
|
-
|
|
71
|
-
## Skills
|
|
72
|
-
|
|
73
|
-
Read the relevant root skill before implementation: `adding-a-feature`,
|
|
74
|
-
`actions`, `agent-native-docs`, `agent-native-toolkit`,
|
|
75
|
-
`customizing-agent-native`, `storing-data`,
|
|
76
|
-
`real-time-sync`, `security`, `delegate-to-agent`, `frontend-design`, `shadcn-ui`, and
|
|
77
|
-
`self-modifying-code`.
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable user-facing changes to Chat are documented here. Open it any
|
|
4
|
-
time from the command menu (Cmd+K → "What's new").
|
|
5
|
-
|
|
6
|
-
## 2026-06-23
|
|
7
|
-
|
|
8
|
-
### Added
|
|
9
|
-
|
|
10
|
-
- See what's new right inside Chat — a changelog now lives in the command menu (Cmd+K).
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
# {{APP_NAME}} — Development Guide
|
|
2
|
-
|
|
3
|
-
This guide is for development-mode agents editing this app's source code. For app operations and tools, see AGENTS.md.
|
|
4
|
-
|
|
5
|
-
## Tech Stack
|
|
6
|
-
|
|
7
|
-
- **Framework:** @agent-native/core + React Router v8 (framework mode)
|
|
8
|
-
- **Frontend:** React 19, Vite, TailwindCSS, shadcn/ui
|
|
9
|
-
- **Routing:** File-based via `flatRoutes()` — SSR shell + client rendering
|
|
10
|
-
- **Backend:** Nitro (via @agent-native/core) — file-based API routing, server plugins, deploy-anywhere presets
|
|
11
|
-
- **State:** SQL-backed (SSE for real-time updates)
|
|
12
|
-
|
|
13
|
-
## Commands
|
|
14
|
-
|
|
15
|
-
- **Dev:** `pnpm dev` (Vite dev server with both React Router + Nitro plugins)
|
|
16
|
-
- **Build:** `pnpm build` (React Router build — client + SSR + Nitro server)
|
|
17
|
-
- **Start:** `node .output/server/index.mjs` (production)
|
|
18
|
-
|
|
19
|
-
## Directory Structure
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
app/ # React frontend
|
|
23
|
-
root.tsx # HTML shell + global providers
|
|
24
|
-
entry.client.tsx # Client hydration entry
|
|
25
|
-
routes.ts # Route config — flatRoutes()
|
|
26
|
-
routes/ # File-based page routes (auto-discovered)
|
|
27
|
-
_index.tsx # / (chat page)
|
|
28
|
-
components/ # UI components
|
|
29
|
-
hooks/ # React hooks
|
|
30
|
-
lib/ # Utilities (cn, etc)
|
|
31
|
-
|
|
32
|
-
server/ # Nitro API server
|
|
33
|
-
routes/
|
|
34
|
-
api/ # Route-only endpoints (uploads, webhooks, OAuth, streaming)
|
|
35
|
-
[...page].get.ts # SSR catch-all (delegates to React Router)
|
|
36
|
-
plugins/ # Server plugins (startup logic)
|
|
37
|
-
lib/ # Shared server modules
|
|
38
|
-
|
|
39
|
-
shared/ # Isomorphic code (imported by both client & server)
|
|
40
|
-
|
|
41
|
-
actions/ # Shared app operations (defineAction; UI uses action hooks)
|
|
42
|
-
run.ts # Script dispatcher
|
|
43
|
-
*.ts # Individual actions (pnpm action <name>)
|
|
44
|
-
|
|
45
|
-
data/ # Local development database fallback
|
|
46
|
-
|
|
47
|
-
react-router.config.ts # React Router framework config
|
|
48
|
-
.agents/skills/ # Agent skills — detailed guidance for each rule
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Framework Basics
|
|
52
|
-
|
|
53
|
-
**SSR-first framework, CSR-by-default content:** This app uses React Router v8 framework mode with `ssr: true`. But virtually every route renders only an SSR shell (loading spinner + meta tags). Normal app data fetching happens on the client via action hooks. Server-side data fetching is the exception — only used for public pages that need SEO/OG tags.
|
|
54
|
-
|
|
55
|
-
## Chat-First Shape
|
|
56
|
-
|
|
57
|
-
The `/` route is the app's primary chat surface. Keep it on
|
|
58
|
-
`AgentChatSurface` unless you are intentionally replacing the whole chat
|
|
59
|
-
experience. The left sidebar owns the durable thread list through
|
|
60
|
-
`useChatThreads`; app-specific screens can be added alongside it as nav items
|
|
61
|
-
when they become useful.
|
|
62
|
-
|
|
63
|
-
For a headless app that later needs UI, this template is the intended landing
|
|
64
|
-
zone: bring the existing actions over, keep their names stable, and let the chat
|
|
65
|
-
call them before adding extra screens. For a custom agent backend, keep the app
|
|
66
|
-
shell and swap the chat runtime with an `AgentChatRuntime` connector instead of
|
|
67
|
-
rewriting the composer/transcript UI.
|
|
68
|
-
|
|
69
|
-
## Adding a Page
|
|
70
|
-
|
|
71
|
-
Create a file in `app/routes/`. The filename determines the URL path:
|
|
72
|
-
|
|
73
|
-
```
|
|
74
|
-
app/routes/_index.tsx → /
|
|
75
|
-
app/routes/settings.tsx → /settings
|
|
76
|
-
app/routes/inbox.tsx → /inbox
|
|
77
|
-
app/routes/inbox.$threadId.tsx → /inbox/:threadId
|
|
78
|
-
app/routes/$id.tsx → /:id (dynamic param)
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Each route file exports a default component, optional `meta()`, and optional `HydrateFallback()`:
|
|
82
|
-
|
|
83
|
-
```tsx
|
|
84
|
-
import MyPage from "@/pages/MyPage";
|
|
85
|
-
|
|
86
|
-
export function meta() {
|
|
87
|
-
return [{ title: "My Page" }];
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export function HydrateFallback() {
|
|
91
|
-
return (
|
|
92
|
-
<div className="flex items-center justify-center h-screen">
|
|
93
|
-
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-foreground" />
|
|
94
|
-
</div>
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export default function MyPageRoute() {
|
|
99
|
-
return <MyPage />;
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
**Do NOT fetch data server-side** in route loaders unless the page genuinely needs SEO/OG content. The standard pattern is: SSR renders the shell, client hydrates, and React reads/writes normal app data through actions with `useActionQuery` / `useActionMutation`.
|
|
104
|
-
|
|
105
|
-
## Adding App Data
|
|
106
|
-
|
|
107
|
-
Normal app data starts as an action, not a custom route. Add `actions/<verb>-<resource>.ts` with `defineAction`, mark reads with `http: { method: "GET" }`, and call reads/writes from React with `useActionQuery` / `useActionMutation` from `@agent-native/core/client`. This keeps the UI and agent on one contract and lets mutating actions refresh action-backed queries automatically.
|
|
108
|
-
|
|
109
|
-
## Adding a Route-Only Endpoint
|
|
110
|
-
|
|
111
|
-
Use `server/routes/api/` only for protocols that cannot be modeled as JSON actions: multipart uploads, streaming/SSE/WebSocket, webhooks, OAuth callbacks/redirects, public SEO/OG endpoints, or binary/static asset serving. Do not add `/api/*` routes for normal CRUD, data queries, or pass-through wrappers around actions; the action endpoint already exists at `/_agent-native/actions/:name`.
|
|
112
|
-
|
|
113
|
-
Each route-only endpoint still exports a default `defineEventHandler`, but keep shared app logic in actions or server libraries so agent and UI behavior do not fork.
|
|
114
|
-
|
|
115
|
-
## Adding a Server Plugin
|
|
116
|
-
|
|
117
|
-
Startup logic (auth, SSE, etc.) lives in `server/plugins/`. Use `defineNitroPlugin` from core:
|
|
118
|
-
|
|
119
|
-
```ts
|
|
120
|
-
import { defineNitroPlugin } from "@agent-native/core";
|
|
121
|
-
|
|
122
|
-
export default defineNitroPlugin(async (nitroApp) => {
|
|
123
|
-
// Runs once at server startup
|
|
124
|
-
});
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Key Imports from `@agent-native/core`
|
|
128
|
-
|
|
129
|
-
| Import | Purpose |
|
|
130
|
-
| -------------------------------------------- | -------------------------------------------------------------------------- |
|
|
131
|
-
| `defineNitroPlugin` | Define a server plugin (re-exported from Nitro) |
|
|
132
|
-
| `createDefaultSSEHandler` | Create SSE endpoint for DB change events (server) |
|
|
133
|
-
| `readAppState`, `writeAppState` | Read/write application state (from `@agent-native/core/application-state`) |
|
|
134
|
-
| `readSetting`, `writeSetting` | Read/write settings (from `@agent-native/core/settings`) |
|
|
135
|
-
| `defineEventHandler`, `readBody`, `getQuery` | H3 route handler utilities (re-exported) |
|
|
136
|
-
| `sendToAgentChat` | Send messages to agent from UI (client-side) |
|
|
137
|
-
| `agentChat` | Send messages to agent from scripts (server-side) |
|
|
138
|
-
|
|
139
|
-
## Adding an Action
|
|
140
|
-
|
|
141
|
-
Create `actions/<verb>-<resource>.ts` with `defineAction`. Run with `pnpm action <name> --id value`; React callers should use `useActionQuery` for GET actions and `useActionMutation` for mutating actions, not a matching `/api/*` wrapper.
|
|
142
|
-
|
|
143
|
-
**Sending to agent chat from UI:**
|
|
144
|
-
|
|
145
|
-
```ts
|
|
146
|
-
import { sendToAgentChat } from "@agent-native/core/client";
|
|
147
|
-
sendToAgentChat({
|
|
148
|
-
message: "Generate something",
|
|
149
|
-
context: "...",
|
|
150
|
-
submit: true,
|
|
151
|
-
});
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
**Sending to agent chat from scripts:**
|
|
155
|
-
|
|
156
|
-
```ts
|
|
157
|
-
import { agentChat } from "@agent-native/core";
|
|
158
|
-
agentChat.submit("Generate something");
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
## Database & Environment Variables
|
|
162
|
-
|
|
163
|
-
Local development defaults to a SQLite file at `data/app.db`. That local file is for development; containers, previews, and serverless deploys can reset their filesystem. For production/cloud deployment, set `DATABASE_URL` to point to a persistent SQL database. Turso is optional, not required; common choices include Neon, Supabase, Turso/libSQL, plain Postgres, durable SQLite, D1 bindings, and Builder.io-managed environments when available.
|
|
164
|
-
|
|
165
|
-
Real credential values belong only in local `.env` files, deployment configuration, or registered secrets/settings UI. Never commit, document, log, return, paste, or include real keys, tokens, webhook URLs, signing secrets, or private data in examples; use empty values or obvious placeholders.
|
|
166
|
-
|
|
167
|
-
When adding app data, define tables with `@agent-native/core/db/schema` helpers and use Drizzle's query builder for reads/writes. Do not import dialect-specific schema helpers from `drizzle-orm/sqlite-core` or `drizzle-orm/pg-core`, and do not write raw SQL in normal actions or handlers when Drizzle can express the query. Raw SQL belongs in additive migrations, health checks, or carefully scoped maintenance.
|
|
168
|
-
|
|
169
|
-
| Variable | Required | Description |
|
|
170
|
-
| --------------------- | ------------------------------- | -------------------------------------------------------------------------- |
|
|
171
|
-
| `DATABASE_URL` | Production yes, local dev no | Persistent SQL connection string (local dev default: `file:./data/app.db`) |
|
|
172
|
-
| `DATABASE_AUTH_TOKEN` | Only when the provider needs it | Auth token for providers such as Turso/libSQL |
|
|
173
|
-
| `AUTH_DISABLED` | Optional | Set to `true` or `1` to skip login/signup (local dev/preview only) |
|
|
174
|
-
|
|
175
|
-
## Extensions (Framework Feature)
|
|
176
|
-
|
|
177
|
-
The framework provides **Extensions** — mini sandboxed Alpine.js apps that run inside iframes. Extensions let users (or the agent) create interactive widgets, dashboards, and utilities without modifying the app's source code. They appear in the sidebar under an "Extensions" section. (Distinct from LLM tools — the function-calling primitives the agent invokes.)
|
|
178
|
-
|
|
179
|
-
- **Creating extensions**: Via the sidebar "+" button, agent chat, or `POST /_agent-native/extensions`
|
|
180
|
-
- **API calls**: Extensions use `extensionFetch()` (legacy alias `toolFetch`) which proxies requests through the server with `${keys.NAME}` secret injection
|
|
181
|
-
- **Styling**: Extensions inherit the main app's Tailwind v4 theme automatically
|
|
182
|
-
- **Sharing**: Private by default, shareable with org or specific users (same model as other ownable resources)
|
|
183
|
-
- **Security**: Iframe sandbox + CSP + SSRF protection on the proxy
|
|
184
|
-
|
|
185
|
-
See the `extensions` skill in `.agents/skills/extensions/SKILL.md` for full implementation details.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# Chat
|
|
2
|
-
|
|
3
|
-
The minimal agent-native starter app — a clean, ChatGPT-style shell with chat at
|
|
4
|
-
the center, durable threads, standard app navigation, auth, live sync, and
|
|
5
|
-
actions. Start here when you want a real browser app to build on without
|
|
6
|
-
committing to a domain template.
|
|
7
|
-
|
|
8
|
-
**Live app: [chat.agent-native.com](https://chat.agent-native.com)**
|
|
9
|
-
|
|
10
|
-
Chat is the basic agent-native app starting point. It gives you the app-agent
|
|
11
|
-
loop wired end to end and one example action, so you can add your own UI, data,
|
|
12
|
-
and actions on top.
|
|
13
|
-
|
|
14
|
-
## Features
|
|
15
|
-
|
|
16
|
-
- ChatGPT-style shell with a threads list and durable chat history.
|
|
17
|
-
- Auth, live sync, and application state wired out of the box.
|
|
18
|
-
- The action surface the agent and UI share, plus one example action to copy.
|
|
19
|
-
- A minimal, brandable base for any domain app.
|
|
20
|
-
|
|
21
|
-
## Develop locally
|
|
22
|
-
|
|
23
|
-
Scaffold your own copy and run it:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npx @agent-native/core@latest create my-app --standalone --template chat
|
|
27
|
-
cd my-app
|
|
28
|
-
pnpm install
|
|
29
|
-
pnpm dev
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Full docs: [agent-native.com/docs/template-chat](https://agent-native.com/docs/template-chat).
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# React Router generated types
|
|
2
|
-
.react-router/
|
|
3
|
-
.generated/
|
|
4
|
-
|
|
5
|
-
# Logs
|
|
6
|
-
logs
|
|
7
|
-
*.log
|
|
8
|
-
npm-debug.log*
|
|
9
|
-
pnpm-debug.log*
|
|
10
|
-
|
|
11
|
-
node_modules
|
|
12
|
-
build/
|
|
13
|
-
dist
|
|
14
|
-
dist-ssr
|
|
15
|
-
.output/
|
|
16
|
-
*.local
|
|
17
|
-
|
|
18
|
-
# Editor directories and files
|
|
19
|
-
.vscode/*
|
|
20
|
-
!.vscode/extensions.json
|
|
21
|
-
.idea
|
|
22
|
-
.DS_Store
|
|
23
|
-
*.suo
|
|
24
|
-
*.ntvs*
|
|
25
|
-
*.njsproj
|
|
26
|
-
*.sln
|
|
27
|
-
*.sw?
|
|
28
|
-
|
|
29
|
-
# Environment
|
|
30
|
-
.env
|
|
31
|
-
.env.*
|
|
32
|
-
!.env.example
|
|
33
|
-
|
|
34
|
-
# Data
|
|
35
|
-
data/*.db
|
|
36
|
-
data/*.db-shm
|
|
37
|
-
data/*.db-wal
|
|
38
|
-
data/uploads/
|
|
39
|
-
data/settings.json
|
|
40
|
-
data/.sessions.json
|
|
41
|
-
|
|
42
|
-
# Learnings (personal preferences and memory — use learnings.defaults.md for tracked defaults)
|
|
43
|
-
learnings.md
|
|
44
|
-
|
|
45
|
-
.vercel/
|
|
46
|
-
.agent-native/
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { defineAction } from "@agent-native/core/action";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
export default defineAction({
|
|
5
|
-
description: "Return a friendly greeting.",
|
|
6
|
-
schema: z.object({
|
|
7
|
-
name: z.string().default("world").describe("Name to greet"),
|
|
8
|
-
}),
|
|
9
|
-
http: { method: "GET" },
|
|
10
|
-
run: async ({ name }) => {
|
|
11
|
-
return { message: `Hello, ${name}!` };
|
|
12
|
-
},
|
|
13
|
-
});
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Navigate the UI to a view.
|
|
3
|
-
*
|
|
4
|
-
* Writes a navigate command to application state which the UI reads and auto-deletes.
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* pnpm action navigate --view=chat
|
|
8
|
-
* pnpm action navigate --path=/some/route
|
|
9
|
-
*
|
|
10
|
-
* Options:
|
|
11
|
-
* --view View name to navigate to
|
|
12
|
-
* --path URL path to navigate to
|
|
13
|
-
* --threadId Chat thread ID to open on the chat route
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
import { defineAction } from "@agent-native/core/action";
|
|
17
|
-
import { writeAppState } from "@agent-native/core/application-state";
|
|
18
|
-
import { z } from "zod";
|
|
19
|
-
|
|
20
|
-
export default defineAction({
|
|
21
|
-
description:
|
|
22
|
-
"Navigate the UI to a specific view or path. Writes a navigate command to application state which the UI reads and auto-deletes.",
|
|
23
|
-
schema: z.object({
|
|
24
|
-
view: z.string().optional().describe("View name to navigate to"),
|
|
25
|
-
path: z.string().optional().describe("URL path to navigate to"),
|
|
26
|
-
threadId: z.string().optional().describe("Chat thread ID to open"),
|
|
27
|
-
}),
|
|
28
|
-
http: false,
|
|
29
|
-
run: async (args) => {
|
|
30
|
-
if (!args.view && !args.path) {
|
|
31
|
-
throw new Error("At least --view or --path is required.");
|
|
32
|
-
}
|
|
33
|
-
const nav: Record<string, string> = {};
|
|
34
|
-
if (args.view) nav.view = args.view;
|
|
35
|
-
if (args.path) nav.path = args.path;
|
|
36
|
-
if (args.threadId) nav.threadId = args.threadId;
|
|
37
|
-
nav._writeId = `${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
38
|
-
await writeAppState("navigate", nav);
|
|
39
|
-
return `Navigating to ${args.view || args.path}`;
|
|
40
|
-
},
|
|
41
|
-
});
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* See what the user is currently looking at on screen.
|
|
3
|
-
*
|
|
4
|
-
* Reads and returns the current navigation state from application state.
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* pnpm action view-screen
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import { defineAction } from "@agent-native/core/action";
|
|
11
|
-
import { readAppState } from "@agent-native/core/application-state";
|
|
12
|
-
import { z } from "zod";
|
|
13
|
-
|
|
14
|
-
export default defineAction({
|
|
15
|
-
description:
|
|
16
|
-
"See what the user is currently looking at on screen. Returns the current navigation state for the chat-first app. Always call this first before taking any action.",
|
|
17
|
-
schema: z.object({}),
|
|
18
|
-
http: false,
|
|
19
|
-
readOnly: true,
|
|
20
|
-
run: async () => {
|
|
21
|
-
const navigation = await readAppState("navigation");
|
|
22
|
-
|
|
23
|
-
const screen: Record<string, unknown> = {};
|
|
24
|
-
if (navigation) screen.navigation = navigation;
|
|
25
|
-
|
|
26
|
-
if (Object.keys(screen).length === 0) {
|
|
27
|
-
return "No application state found. Is the app running?";
|
|
28
|
-
}
|
|
29
|
-
return screen;
|
|
30
|
-
},
|
|
31
|
-
});
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { AgentToggleButton } from "@agent-native/core/client/agent-chat";
|
|
2
|
-
import { useT } from "@agent-native/core/client/i18n";
|
|
3
|
-
import {
|
|
4
|
-
useHeaderTitle,
|
|
5
|
-
useHeaderActions,
|
|
6
|
-
} from "@agent-native/toolkit/app-shell";
|
|
7
|
-
import { IconMenu2 } from "@tabler/icons-react";
|
|
8
|
-
import { useLocation } from "react-router";
|
|
9
|
-
|
|
10
|
-
import { APP_TITLE } from "@/lib/app-config";
|
|
11
|
-
|
|
12
|
-
const pageTitleKeys: Record<string, string> = {
|
|
13
|
-
"/": "navigation.chat",
|
|
14
|
-
"/observability": "navigation.observability",
|
|
15
|
-
"/agent": "settings.agentTitle",
|
|
16
|
-
"/settings": "navigation.settings",
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
function resolveTitle(pathname: string, t: (key: string) => string): string {
|
|
20
|
-
if (pageTitleKeys[pathname]) return t(pageTitleKeys[pathname]);
|
|
21
|
-
if (pathname.startsWith("/extensions")) return t("navigation.extensions");
|
|
22
|
-
return APP_TITLE;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
interface HeaderProps {
|
|
26
|
-
onOpenMobileSidebar?: () => void;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function Header({ onOpenMobileSidebar }: HeaderProps) {
|
|
30
|
-
const location = useLocation();
|
|
31
|
-
const t = useT();
|
|
32
|
-
const title = useHeaderTitle();
|
|
33
|
-
const actions = useHeaderActions();
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<header className="flex h-12 items-center gap-3 border-b border-border bg-background px-4 lg:px-6 shrink-0">
|
|
37
|
-
{onOpenMobileSidebar && (
|
|
38
|
-
<button
|
|
39
|
-
type="button"
|
|
40
|
-
onClick={onOpenMobileSidebar}
|
|
41
|
-
aria-label={t("navigation.openNavigation")}
|
|
42
|
-
className="flex h-9 w-9 cursor-pointer items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-accent md:hidden"
|
|
43
|
-
>
|
|
44
|
-
<IconMenu2 className="h-4 w-4" />
|
|
45
|
-
</button>
|
|
46
|
-
)}
|
|
47
|
-
<div className="flex items-center gap-3 flex-1 min-w-0">
|
|
48
|
-
{title ?? (
|
|
49
|
-
<h1 className="text-lg font-semibold tracking-tight truncate">
|
|
50
|
-
{resolveTitle(location.pathname, t)}
|
|
51
|
-
</h1>
|
|
52
|
-
)}
|
|
53
|
-
</div>
|
|
54
|
-
<div className="flex items-center gap-2 shrink-0">
|
|
55
|
-
{actions}
|
|
56
|
-
<AgentToggleButton />
|
|
57
|
-
</div>
|
|
58
|
-
</header>
|
|
59
|
-
);
|
|
60
|
-
}
|