@agent-native/core 0.14.8 → 0.15.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/README.md +1 -1
- package/dist/agent/engine/builder-engine.d.ts.map +1 -1
- package/dist/agent/engine/builder-engine.js +30 -9
- package/dist/agent/engine/builder-engine.js.map +1 -1
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +14 -4
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +71 -4
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/types.d.ts +9 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/appearance/actions/change-appearance.d.ts +3 -0
- package/dist/appearance/actions/change-appearance.d.ts.map +1 -0
- package/dist/appearance/actions/change-appearance.js +29 -0
- package/dist/appearance/actions/change-appearance.js.map +1 -0
- package/dist/chat-threads/store.d.ts +53 -2
- package/dist/chat-threads/store.d.ts.map +1 -1
- package/dist/chat-threads/store.js +172 -12
- package/dist/chat-threads/store.js.map +1 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +114 -37
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +30 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/workspace-dev.d.ts +25 -1
- package/dist/cli/workspace-dev.d.ts.map +1 -1
- package/dist/cli/workspace-dev.js +275 -49
- package/dist/cli/workspace-dev.js.map +1 -1
- package/dist/client/AgentPanel.d.ts +23 -4
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +276 -53
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AppearancePicker.d.ts +11 -0
- package/dist/client/AppearancePicker.d.ts.map +1 -0
- package/dist/client/AppearancePicker.js +16 -0
- package/dist/client/AppearancePicker.js.map +1 -0
- package/dist/client/AssistantChat.d.ts +35 -0
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +315 -32
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/ConnectBuilderCard.d.ts.map +1 -1
- package/dist/client/ConnectBuilderCard.js +5 -2
- package/dist/client/ConnectBuilderCard.js.map +1 -1
- package/dist/client/ErrorBoundary.d.ts.map +1 -1
- package/dist/client/ErrorBoundary.js +8 -10
- package/dist/client/ErrorBoundary.js.map +1 -1
- package/dist/client/FeedbackButton.d.ts.map +1 -1
- package/dist/client/FeedbackButton.js +1 -1
- package/dist/client/FeedbackButton.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts +13 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +217 -38
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.d.ts.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.js +37 -14
- package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
- package/dist/client/agent-chat-adapter.d.ts +5 -0
- package/dist/client/agent-chat-adapter.d.ts.map +1 -1
- package/dist/client/agent-chat-adapter.js +4 -0
- package/dist/client/agent-chat-adapter.js.map +1 -1
- package/dist/client/agent-sidebar-state.d.ts +12 -0
- package/dist/client/agent-sidebar-state.d.ts.map +1 -1
- package/dist/client/agent-sidebar-state.js +8 -0
- package/dist/client/agent-sidebar-state.js.map +1 -1
- package/dist/client/analytics.d.ts.map +1 -1
- package/dist/client/analytics.js +175 -3
- package/dist/client/analytics.js.map +1 -1
- package/dist/client/appearance.d.ts +40 -0
- package/dist/client/appearance.d.ts.map +1 -0
- package/dist/client/appearance.js +114 -0
- package/dist/client/appearance.js.map +1 -0
- package/dist/client/builder-frame.d.ts +1 -0
- package/dist/client/builder-frame.d.ts.map +1 -1
- package/dist/client/builder-frame.js +19 -9
- package/dist/client/builder-frame.js.map +1 -1
- package/dist/client/components/CodeRequiredDialog.d.ts.map +1 -1
- package/dist/client/components/CodeRequiredDialog.js +10 -2
- package/dist/client/components/CodeRequiredDialog.js.map +1 -1
- package/dist/client/components/ui/dropdown-menu.js +2 -2
- package/dist/client/components/ui/dropdown-menu.js.map +1 -1
- package/dist/client/components/ui/hover-card.js +1 -1
- package/dist/client/components/ui/hover-card.js.map +1 -1
- package/dist/client/components/ui/popover.js +1 -1
- package/dist/client/components/ui/popover.js.map +1 -1
- package/dist/client/composer/PromptComposer.d.ts +7 -0
- package/dist/client/composer/PromptComposer.d.ts.map +1 -1
- package/dist/client/composer/PromptComposer.js +63 -32
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +5 -0
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +36 -6
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/useVoiceDictation.d.ts.map +1 -1
- package/dist/client/composer/useVoiceDictation.js +13 -1
- package/dist/client/composer/useVoiceDictation.js.map +1 -1
- package/dist/client/dev-mode.d.ts +14 -0
- package/dist/client/dev-mode.d.ts.map +1 -0
- package/dist/client/dev-mode.js +14 -0
- package/dist/client/dev-mode.js.map +1 -0
- package/dist/client/error-format.d.ts +3 -2
- package/dist/client/error-format.d.ts.map +1 -1
- package/dist/client/error-format.js +9 -2
- package/dist/client/error-format.js.map +1 -1
- package/dist/client/extensions/EmbeddedTool.d.ts +20 -0
- package/dist/client/extensions/EmbeddedTool.d.ts.map +1 -0
- package/dist/client/extensions/EmbeddedTool.js +199 -0
- package/dist/client/extensions/EmbeddedTool.js.map +1 -0
- package/dist/client/extensions/ExtensionViewer.d.ts.map +1 -1
- package/dist/client/extensions/ExtensionViewer.js +24 -2
- package/dist/client/extensions/ExtensionViewer.js.map +1 -1
- package/dist/client/extensions/ToolEditor.d.ts +5 -0
- package/dist/client/extensions/ToolEditor.d.ts.map +1 -0
- package/dist/client/extensions/ToolEditor.js +129 -0
- package/dist/client/extensions/ToolEditor.js.map +1 -0
- package/dist/client/extensions/ToolViewer.d.ts +5 -0
- package/dist/client/extensions/ToolViewer.d.ts.map +1 -0
- package/dist/client/extensions/ToolViewer.js +400 -0
- package/dist/client/extensions/ToolViewer.js.map +1 -0
- package/dist/client/extensions/ToolViewerPage.d.ts +2 -0
- package/dist/client/extensions/ToolViewerPage.d.ts.map +1 -0
- package/dist/client/extensions/ToolViewerPage.js +24 -0
- package/dist/client/extensions/ToolViewerPage.js.map +1 -0
- package/dist/client/extensions/ToolsListPage.d.ts +2 -0
- package/dist/client/extensions/ToolsListPage.d.ts.map +1 -0
- package/dist/client/extensions/ToolsListPage.js +67 -0
- package/dist/client/extensions/ToolsListPage.js.map +1 -0
- package/dist/client/extensions/ToolsSidebarSection.d.ts +2 -0
- package/dist/client/extensions/ToolsSidebarSection.d.ts.map +1 -0
- package/dist/client/extensions/ToolsSidebarSection.js +236 -0
- package/dist/client/extensions/ToolsSidebarSection.js.map +1 -0
- package/dist/client/extensions/tool-order.d.ts +7 -0
- package/dist/client/extensions/tool-order.d.ts.map +1 -0
- package/dist/client/extensions/tool-order.js +47 -0
- package/dist/client/extensions/tool-order.js.map +1 -0
- package/dist/client/index.d.ts +8 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +7 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/onboarding/OnboardingPanel.js +1 -0
- package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
- package/dist/client/org/InvitationBanner.d.ts.map +1 -1
- package/dist/client/org/InvitationBanner.js +23 -2
- package/dist/client/org/InvitationBanner.js.map +1 -1
- package/dist/client/org/OrgSwitcher.d.ts +5 -4
- package/dist/client/org/OrgSwitcher.d.ts.map +1 -1
- package/dist/client/org/OrgSwitcher.js +57 -9
- package/dist/client/org/OrgSwitcher.js.map +1 -1
- package/dist/client/org/hooks.d.ts.map +1 -1
- package/dist/client/org/hooks.js +10 -6
- package/dist/client/org/hooks.js.map +1 -1
- package/dist/client/org/workspace-app-links.d.ts +31 -0
- package/dist/client/org/workspace-app-links.d.ts.map +1 -0
- package/dist/client/org/workspace-app-links.js +268 -0
- package/dist/client/org/workspace-app-links.js.map +1 -0
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +18 -5
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/resources/use-resources.d.ts +18 -13
- package/dist/client/resources/use-resources.d.ts.map +1 -1
- package/dist/client/resources/use-resources.js +24 -6
- package/dist/client/resources/use-resources.js.map +1 -1
- package/dist/client/settings/BackgroundAgentSection.d.ts.map +1 -1
- package/dist/client/settings/BackgroundAgentSection.js +9 -1
- package/dist/client/settings/BackgroundAgentSection.js.map +1 -1
- package/dist/client/settings/BrowserSection.d.ts.map +1 -1
- package/dist/client/settings/BrowserSection.js +16 -1
- package/dist/client/settings/BrowserSection.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +4 -1
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.d.ts.map +1 -1
- package/dist/client/settings/VoiceTranscriptionSection.js +5 -5
- package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.d.ts +8 -0
- package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
- package/dist/client/settings/useBuilderStatus.js +50 -13
- package/dist/client/settings/useBuilderStatus.js.map +1 -1
- package/dist/client/settings/useBuilderStatus.spec.d.ts +2 -0
- package/dist/client/settings/useBuilderStatus.spec.d.ts.map +1 -0
- package/dist/client/settings/useBuilderStatus.spec.js +64 -0
- package/dist/client/settings/useBuilderStatus.spec.js.map +1 -0
- package/dist/client/sharing/ShareButton.d.ts +5 -0
- package/dist/client/sharing/ShareButton.d.ts.map +1 -1
- package/dist/client/sharing/ShareButton.js +60 -6
- package/dist/client/sharing/ShareButton.js.map +1 -1
- package/dist/client/theme.js +1 -1
- package/dist/client/theme.js.map +1 -1
- package/dist/client/tools/EmbeddedTool.d.ts +20 -0
- package/dist/client/tools/EmbeddedTool.d.ts.map +1 -0
- package/dist/client/tools/EmbeddedTool.js +199 -0
- package/dist/client/tools/EmbeddedTool.js.map +1 -0
- package/dist/client/tools/ExtensionSlot.d.ts +27 -0
- package/dist/client/tools/ExtensionSlot.d.ts.map +1 -0
- package/dist/client/tools/ExtensionSlot.js +96 -0
- package/dist/client/tools/ExtensionSlot.js.map +1 -0
- package/dist/client/tools/ToolEditor.d.ts +5 -0
- package/dist/client/tools/ToolEditor.d.ts.map +1 -0
- package/dist/client/tools/ToolEditor.js +129 -0
- package/dist/client/tools/ToolEditor.js.map +1 -0
- package/dist/client/tools/ToolViewer.d.ts +5 -0
- package/dist/client/tools/ToolViewer.d.ts.map +1 -0
- package/dist/client/tools/ToolViewer.js +400 -0
- package/dist/client/tools/ToolViewer.js.map +1 -0
- package/dist/client/tools/ToolViewerPage.d.ts +2 -0
- package/dist/client/tools/ToolViewerPage.d.ts.map +1 -0
- package/dist/client/tools/ToolViewerPage.js +24 -0
- package/dist/client/tools/ToolViewerPage.js.map +1 -0
- package/dist/client/tools/ToolsListPage.d.ts +2 -0
- package/dist/client/tools/ToolsListPage.d.ts.map +1 -0
- package/dist/client/tools/ToolsListPage.js +67 -0
- package/dist/client/tools/ToolsListPage.js.map +1 -0
- package/dist/client/tools/ToolsSidebarSection.d.ts +2 -0
- package/dist/client/tools/ToolsSidebarSection.d.ts.map +1 -0
- package/dist/client/tools/ToolsSidebarSection.js +236 -0
- package/dist/client/tools/ToolsSidebarSection.js.map +1 -0
- package/dist/client/tools/iframe-bridge.d.ts +38 -0
- package/dist/client/tools/iframe-bridge.d.ts.map +1 -0
- package/dist/client/tools/iframe-bridge.js +207 -0
- package/dist/client/tools/iframe-bridge.js.map +1 -0
- package/dist/client/tools/index.d.ts +8 -0
- package/dist/client/tools/index.d.ts.map +1 -0
- package/dist/client/tools/index.js +8 -0
- package/dist/client/tools/index.js.map +1 -0
- package/dist/client/tools/tool-order.d.ts +7 -0
- package/dist/client/tools/tool-order.d.ts.map +1 -0
- package/dist/client/tools/tool-order.js +47 -0
- package/dist/client/tools/tool-order.js.map +1 -0
- package/dist/client/transcription/BuilderTranscriptionCta.d.ts.map +1 -1
- package/dist/client/transcription/BuilderTranscriptionCta.js +2 -3
- package/dist/client/transcription/BuilderTranscriptionCta.js.map +1 -1
- package/dist/client/use-change-version.d.ts +46 -0
- package/dist/client/use-change-version.d.ts.map +1 -0
- package/dist/client/use-change-version.js +135 -0
- package/dist/client/use-change-version.js.map +1 -0
- package/dist/client/use-chat-threads.d.ts +16 -2
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +87 -12
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/client/use-chat-threads.spec.d.ts +2 -0
- package/dist/client/use-chat-threads.spec.d.ts.map +1 -0
- package/dist/client/use-chat-threads.spec.js +85 -0
- package/dist/client/use-chat-threads.spec.js.map +1 -0
- package/dist/client/use-db-sync.d.ts +5 -2
- package/dist/client/use-db-sync.d.ts.map +1 -1
- package/dist/client/use-db-sync.js +41 -16
- package/dist/client/use-db-sync.js.map +1 -1
- package/dist/client/use-pinch-zoom.d.ts +35 -0
- package/dist/client/use-pinch-zoom.d.ts.map +1 -0
- package/dist/client/use-pinch-zoom.js +105 -0
- package/dist/client/use-pinch-zoom.js.map +1 -0
- package/dist/deploy/workspace-deploy.d.ts.map +1 -1
- package/dist/deploy/workspace-deploy.js +99 -5
- package/dist/deploy/workspace-deploy.js.map +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +3 -0
- package/dist/extensions/actions.js.map +1 -1
- package/dist/extensions/store.d.ts +5 -0
- package/dist/extensions/store.d.ts.map +1 -1
- package/dist/extensions/store.js +16 -1
- package/dist/extensions/store.js.map +1 -1
- package/dist/file-upload/actions/upload-image.d.ts +3 -0
- package/dist/file-upload/actions/upload-image.d.ts.map +1 -0
- package/dist/file-upload/actions/upload-image.js +145 -0
- package/dist/file-upload/actions/upload-image.js.map +1 -0
- package/dist/file-upload/builder.d.ts.map +1 -1
- package/dist/file-upload/builder.js +31 -11
- package/dist/file-upload/builder.js.map +1 -1
- package/dist/file-upload/index.d.ts +1 -0
- package/dist/file-upload/index.d.ts.map +1 -1
- package/dist/file-upload/index.js +1 -0
- package/dist/file-upload/index.js.map +1 -1
- package/dist/file-upload/pre-upload-attachments.d.ts +39 -0
- package/dist/file-upload/pre-upload-attachments.d.ts.map +1 -0
- package/dist/file-upload/pre-upload-attachments.js +110 -0
- package/dist/file-upload/pre-upload-attachments.js.map +1 -0
- package/dist/file-upload/registry.d.ts.map +1 -1
- package/dist/file-upload/registry.js +8 -7
- package/dist/file-upload/registry.js.map +1 -1
- package/dist/onboarding/default-steps.js +1 -1
- package/dist/onboarding/default-steps.js.map +1 -1
- package/dist/org/context.d.ts +15 -1
- package/dist/org/context.d.ts.map +1 -1
- package/dist/org/context.js +25 -0
- package/dist/org/context.js.map +1 -1
- package/dist/org/handlers.d.ts +2 -2
- package/dist/org/handlers.d.ts.map +1 -1
- package/dist/org/handlers.js +3 -17
- package/dist/org/handlers.js.map +1 -1
- package/dist/org/index.d.ts +1 -1
- package/dist/org/index.d.ts.map +1 -1
- package/dist/org/index.js +1 -1
- package/dist/org/index.js.map +1 -1
- package/dist/resources/handlers.d.ts +6 -0
- package/dist/resources/handlers.d.ts.map +1 -1
- package/dist/resources/handlers.js +30 -6
- package/dist/resources/handlers.js.map +1 -1
- package/dist/resources/script-helpers.d.ts +11 -2
- package/dist/resources/script-helpers.d.ts.map +1 -1
- package/dist/resources/script-helpers.js +20 -3
- package/dist/resources/script-helpers.js.map +1 -1
- package/dist/resources/store.d.ts +28 -3
- package/dist/resources/store.d.ts.map +1 -1
- package/dist/resources/store.js +170 -20
- package/dist/resources/store.js.map +1 -1
- package/dist/scripts/resources/list.d.ts +1 -1
- package/dist/scripts/resources/list.d.ts.map +1 -1
- package/dist/scripts/resources/list.js +16 -4
- package/dist/scripts/resources/list.js.map +1 -1
- package/dist/scripts/resources/write.d.ts +1 -1
- package/dist/scripts/resources/write.d.ts.map +1 -1
- package/dist/scripts/resources/write.js +47 -3
- package/dist/scripts/resources/write.js.map +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +8 -3
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +214 -25
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/agent-discovery.d.ts +35 -0
- package/dist/server/agent-discovery.d.ts.map +1 -1
- package/dist/server/agent-discovery.js +139 -8
- package/dist/server/agent-discovery.js.map +1 -1
- package/dist/server/app-url.d.ts +12 -6
- package/dist/server/app-url.d.ts.map +1 -1
- package/dist/server/app-url.js +58 -11
- package/dist/server/app-url.js.map +1 -1
- package/dist/server/auth.d.ts +22 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +316 -65
- package/dist/server/auth.js.map +1 -1
- package/dist/server/better-auth-instance.d.ts +0 -4
- package/dist/server/better-auth-instance.d.ts.map +1 -1
- package/dist/server/better-auth-instance.js +0 -3
- package/dist/server/better-auth-instance.js.map +1 -1
- package/dist/server/builder-browser.d.ts.map +1 -1
- package/dist/server/builder-browser.js +23 -0
- package/dist/server/builder-browser.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +29 -14
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/credential-provider.d.ts +14 -0
- package/dist/server/credential-provider.d.ts.map +1 -1
- package/dist/server/credential-provider.js +88 -11
- package/dist/server/credential-provider.js.map +1 -1
- package/dist/server/google-auth-plugin.d.ts.map +1 -1
- package/dist/server/google-auth-plugin.js +65 -17
- package/dist/server/google-auth-plugin.js.map +1 -1
- package/dist/server/google-oauth.d.ts.map +1 -1
- package/dist/server/google-oauth.js +47 -17
- package/dist/server/google-oauth.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/local-migration.d.ts +41 -0
- package/dist/server/local-migration.d.ts.map +1 -0
- package/dist/server/local-migration.js +235 -0
- package/dist/server/local-migration.js.map +1 -0
- package/dist/server/oauth-public-origin.d.ts.map +1 -1
- package/dist/server/oauth-public-origin.js +19 -1
- package/dist/server/oauth-public-origin.js.map +1 -1
- package/dist/server/onboarding-html.d.ts.map +1 -1
- package/dist/server/onboarding-html.js +74 -19
- package/dist/server/onboarding-html.js.map +1 -1
- package/dist/server/poll.d.ts.map +1 -1
- package/dist/server/poll.js +20 -5
- package/dist/server/poll.js.map +1 -1
- package/dist/server/request-context.d.ts +8 -0
- package/dist/server/request-context.d.ts.map +1 -1
- package/dist/server/request-context.js.map +1 -1
- package/dist/shared/index.d.ts +2 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +2 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/llm-connection.d.ts +10 -0
- package/dist/shared/llm-connection.d.ts.map +1 -0
- package/dist/shared/llm-connection.js +29 -0
- package/dist/shared/llm-connection.js.map +1 -0
- package/dist/shared/workspace-app-audience.d.ts +25 -0
- package/dist/shared/workspace-app-audience.d.ts.map +1 -0
- package/dist/shared/workspace-app-audience.js +126 -0
- package/dist/shared/workspace-app-audience.js.map +1 -0
- package/dist/shared/workspace-app-id.d.ts +1 -1
- package/dist/shared/workspace-app-id.d.ts.map +1 -1
- package/dist/shared/workspace-app-id.js +1 -0
- package/dist/shared/workspace-app-id.js.map +1 -1
- package/dist/sharing/access.d.ts.map +1 -1
- package/dist/sharing/access.js +46 -5
- package/dist/sharing/access.js.map +1 -1
- package/dist/sharing/actions/list-resource-shares.d.ts.map +1 -1
- package/dist/sharing/actions/list-resource-shares.js +8 -1
- package/dist/sharing/actions/list-resource-shares.js.map +1 -1
- package/dist/sharing/actions/set-resource-visibility.d.ts.map +1 -1
- package/dist/sharing/actions/set-resource-visibility.js +12 -3
- package/dist/sharing/actions/set-resource-visibility.js.map +1 -1
- package/dist/sharing/actions/share-resource.d.ts.map +1 -1
- package/dist/sharing/actions/share-resource.js +50 -1
- package/dist/sharing/actions/share-resource.js.map +1 -1
- package/dist/sharing/registry.d.ts +26 -0
- package/dist/sharing/registry.d.ts.map +1 -1
- package/dist/sharing/registry.js.map +1 -1
- package/dist/styles/agent-native.css +91 -0
- package/dist/templates/default/.agents/skills/adding-a-feature/SKILL.md +72 -0
- package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +60 -37
- package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +28 -17
- package/dist/templates/default/.agents/skills/shadcn-ui/SKILL.md +79 -0
- package/dist/templates/default/AGENTS.md +22 -19
- package/dist/templates/default/actions/navigate.ts +3 -0
- package/dist/templates/default/app/hooks/use-navigation-state.ts +29 -5
- package/dist/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +251 -0
- package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +264 -0
- package/dist/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +130 -0
- package/dist/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +112 -0
- package/dist/templates/workspace-core/.agents/skills/authentication/SKILL.md +88 -0
- package/dist/templates/workspace-core/.agents/skills/automations/SKILL.md +191 -0
- package/dist/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +74 -0
- package/dist/templates/workspace-core/.agents/skills/client-side-routing/SKILL.md +75 -0
- package/dist/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +190 -0
- package/dist/templates/workspace-core/.agents/skills/create-skill/SKILL.md +168 -0
- package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +163 -0
- package/dist/templates/workspace-core/.agents/skills/extension-points/SKILL.md +205 -0
- package/dist/templates/workspace-core/.agents/skills/extensions/SKILL.md +720 -0
- package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +92 -0
- package/dist/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +285 -0
- package/dist/templates/workspace-core/.agents/skills/observability/SKILL.md +192 -0
- package/dist/templates/workspace-core/.agents/skills/onboarding/SKILL.md +43 -0
- package/dist/templates/workspace-core/.agents/skills/portability/SKILL.md +84 -0
- package/dist/templates/workspace-core/.agents/skills/qa/SKILL.md +313 -0
- package/dist/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +112 -0
- package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +165 -0
- package/dist/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +41 -0
- package/dist/templates/workspace-core/.agents/skills/secrets/SKILL.md +239 -0
- package/dist/templates/workspace-core/.agents/skills/security/SKILL.md +191 -0
- package/dist/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +79 -0
- package/dist/templates/workspace-core/.agents/skills/server-plugins/SKILL.md +73 -0
- package/dist/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +79 -0
- package/dist/templates/workspace-core/.agents/skills/sharing/SKILL.md +217 -0
- package/dist/templates/workspace-core/.agents/skills/storing-data/SKILL.md +132 -0
- package/dist/templates/workspace-core/.agents/skills/tracking/SKILL.md +150 -0
- package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +124 -0
- package/dist/templates/workspace-core/AGENTS.md +16 -1
- package/dist/templates/workspace-root/AGENTS.md +35 -0
- package/dist/templates/workspace-root/README.md +7 -0
- package/dist/tools/actions.d.ts +3 -0
- package/dist/tools/actions.d.ts.map +1 -0
- package/dist/tools/actions.js +272 -0
- package/dist/tools/actions.js.map +1 -0
- package/dist/tools/fetch-tool.d.ts +23 -0
- package/dist/tools/fetch-tool.d.ts.map +1 -0
- package/dist/tools/fetch-tool.js +178 -0
- package/dist/tools/fetch-tool.js.map +1 -0
- package/dist/tools/html-shell.d.ts +45 -0
- package/dist/tools/html-shell.d.ts.map +1 -0
- package/dist/tools/html-shell.js +514 -0
- package/dist/tools/html-shell.js.map +1 -0
- package/dist/tools/proxy-security.d.ts +12 -0
- package/dist/tools/proxy-security.d.ts.map +1 -0
- package/dist/tools/proxy-security.js +158 -0
- package/dist/tools/proxy-security.js.map +1 -0
- package/dist/tools/routes.d.ts +2 -0
- package/dist/tools/routes.d.ts.map +1 -0
- package/dist/tools/routes.js +627 -0
- package/dist/tools/routes.js.map +1 -0
- package/dist/tools/schema.d.ts +664 -0
- package/dist/tools/schema.d.ts.map +1 -0
- package/dist/tools/schema.js +146 -0
- package/dist/tools/schema.js.map +1 -0
- package/dist/tools/slots/routes.d.ts +15 -0
- package/dist/tools/slots/routes.d.ts.map +1 -0
- package/dist/tools/slots/routes.js +94 -0
- package/dist/tools/slots/routes.js.map +1 -0
- package/dist/tools/slots/schema.d.ts +303 -0
- package/dist/tools/slots/schema.d.ts.map +1 -0
- package/dist/tools/slots/schema.js +76 -0
- package/dist/tools/slots/schema.js.map +1 -0
- package/dist/tools/slots/store.d.ts +66 -0
- package/dist/tools/slots/store.d.ts.map +1 -0
- package/dist/tools/slots/store.js +227 -0
- package/dist/tools/slots/store.js.map +1 -0
- package/dist/tools/store.d.ts +40 -0
- package/dist/tools/store.d.ts.map +1 -0
- package/dist/tools/store.js +193 -0
- package/dist/tools/store.js.map +1 -0
- package/dist/tools/theme.d.ts +2 -0
- package/dist/tools/theme.d.ts.map +1 -0
- package/dist/tools/theme.js +67 -0
- package/dist/tools/theme.js.map +1 -0
- package/dist/tools/url-safety.d.ts +24 -0
- package/dist/tools/url-safety.d.ts.map +1 -0
- package/dist/tools/url-safety.js +224 -0
- package/dist/tools/url-safety.js.map +1 -0
- package/dist/vite/action-types-plugin.d.ts.map +1 -1
- package/dist/vite/action-types-plugin.js +4 -0
- package/dist/vite/action-types-plugin.js.map +1 -1
- package/docs/content/authentication.md +36 -0
- package/docs/content/creating-templates.md +15 -0
- package/docs/content/dispatch.md +3 -3
- package/docs/content/multi-app-workspace.md +5 -0
- package/docs/content/tracking.md +12 -0
- package/docs/content/workspace-management.md +39 -4
- package/package.json +15 -12
- package/src/templates/default/.agents/skills/adding-a-feature/SKILL.md +72 -0
- package/src/templates/default/.agents/skills/frontend-design/SKILL.md +60 -37
- package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +28 -17
- package/src/templates/default/.agents/skills/shadcn-ui/SKILL.md +79 -0
- package/src/templates/default/AGENTS.md +22 -19
- package/src/templates/default/actions/navigate.ts +3 -0
- package/src/templates/default/app/hooks/use-navigation-state.ts +29 -5
- package/src/templates/workspace-core/.agents/skills/a2a-protocol/SKILL.md +251 -0
- package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +264 -0
- package/src/templates/workspace-core/.agents/skills/adding-a-feature/SKILL.md +130 -0
- package/src/templates/workspace-core/.agents/skills/address-feedback/SKILL.md +112 -0
- package/src/templates/workspace-core/.agents/skills/authentication/SKILL.md +88 -0
- package/src/templates/workspace-core/.agents/skills/automations/SKILL.md +191 -0
- package/src/templates/workspace-core/.agents/skills/capture-learnings/SKILL.md +74 -0
- package/src/templates/workspace-core/.agents/skills/client-side-routing/SKILL.md +75 -0
- package/src/templates/workspace-core/.agents/skills/context-awareness/SKILL.md +190 -0
- package/src/templates/workspace-core/.agents/skills/create-skill/SKILL.md +168 -0
- package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +163 -0
- package/src/templates/workspace-core/.agents/skills/extension-points/SKILL.md +205 -0
- package/src/templates/workspace-core/.agents/skills/extensions/SKILL.md +720 -0
- package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +92 -0
- package/src/templates/workspace-core/.agents/skills/integration-webhooks/SKILL.md +285 -0
- package/src/templates/workspace-core/.agents/skills/observability/SKILL.md +192 -0
- package/src/templates/workspace-core/.agents/skills/onboarding/SKILL.md +43 -0
- package/src/templates/workspace-core/.agents/skills/portability/SKILL.md +84 -0
- package/src/templates/workspace-core/.agents/skills/qa/SKILL.md +313 -0
- package/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +112 -0
- package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +165 -0
- package/src/templates/workspace-core/.agents/skills/recurring-jobs/SKILL.md +41 -0
- package/src/templates/workspace-core/.agents/skills/secrets/SKILL.md +239 -0
- package/src/templates/workspace-core/.agents/skills/security/SKILL.md +191 -0
- package/src/templates/workspace-core/.agents/skills/self-modifying-code/SKILL.md +79 -0
- package/src/templates/workspace-core/.agents/skills/server-plugins/SKILL.md +73 -0
- package/src/templates/workspace-core/.agents/skills/shadcn-ui/SKILL.md +79 -0
- package/src/templates/workspace-core/.agents/skills/sharing/SKILL.md +217 -0
- package/src/templates/workspace-core/.agents/skills/storing-data/SKILL.md +132 -0
- package/src/templates/workspace-core/.agents/skills/tracking/SKILL.md +150 -0
- package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +124 -0
- package/src/templates/workspace-core/AGENTS.md +16 -1
- package/src/templates/workspace-root/AGENTS.md +35 -0
- package/src/templates/workspace-root/README.md +7 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: recurring-jobs
|
|
3
|
+
description: >-
|
|
4
|
+
Scheduled tasks the agent runs on a cron schedule. Use when a user asks for
|
|
5
|
+
something recurring ("every morning", "daily", "weekly"), when creating or
|
|
6
|
+
updating jobs, or when debugging the job scheduler.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Recurring Jobs
|
|
10
|
+
|
|
11
|
+
## Rule
|
|
12
|
+
|
|
13
|
+
Recurring jobs are scheduled tasks the agent executes automatically on a cron schedule. Jobs live as resource files under `jobs/` with YAML frontmatter for scheduling metadata.
|
|
14
|
+
|
|
15
|
+
## How It Works
|
|
16
|
+
|
|
17
|
+
1. User asks for something recurring via the agent chat
|
|
18
|
+
2. Agent uses `manage-jobs` tool (action: "create") to write a job file at `jobs/<name>.md`
|
|
19
|
+
3. A scheduler polls every 60 seconds, finds due jobs, and executes them via `runAgentLoop`
|
|
20
|
+
4. Job results are saved as chat threads
|
|
21
|
+
|
|
22
|
+
## Job Tool (built in)
|
|
23
|
+
|
|
24
|
+
| Tool | Action | Purpose |
|
|
25
|
+
| ------------- | ---------- | ---------------------------------------------------------- |
|
|
26
|
+
| `manage-jobs` | `create` | Create a recurring job (name, cron schedule, instructions) |
|
|
27
|
+
| `manage-jobs` | `list` | List all jobs and their status |
|
|
28
|
+
| `manage-jobs` | `update` | Update schedule, instructions, or toggle enabled |
|
|
29
|
+
|
|
30
|
+
## Key Files
|
|
31
|
+
|
|
32
|
+
| File | Purpose |
|
|
33
|
+
| ------------------------------------- | -------------------------------------------------------- |
|
|
34
|
+
| `packages/core/src/jobs/cron.ts` | Cron parsing (`nextOccurrence`, `isValidCron`, `describeCron`) |
|
|
35
|
+
| `packages/core/src/jobs/scheduler.ts` | Job execution engine (`processRecurringJobs`) |
|
|
36
|
+
| `packages/core/src/jobs/tools.ts` | Agent tool (`manage-jobs` with create/list/update actions) |
|
|
37
|
+
|
|
38
|
+
## Related Skills
|
|
39
|
+
|
|
40
|
+
- `actions` — How tools and actions work
|
|
41
|
+
- `delegate-to-agent` — How jobs invoke the agent loop
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: secrets
|
|
3
|
+
description: >-
|
|
4
|
+
Declaratively register API keys and service credentials a template needs so
|
|
5
|
+
they appear in the agent sidebar settings UI and the onboarding checklist.
|
|
6
|
+
Use for any third-party API key (OpenAI, Stripe, Twilio, etc.) and for
|
|
7
|
+
surfacing OAuth connections in the unified settings UI.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Secrets Registry
|
|
11
|
+
|
|
12
|
+
## When to use
|
|
13
|
+
|
|
14
|
+
Use this for any external credential your template needs: API keys, service
|
|
15
|
+
tokens, webhook secrets. It gives you:
|
|
16
|
+
|
|
17
|
+
- A sidebar UI entry for each credential (masked input, rotate, test, delete).
|
|
18
|
+
- Automatic onboarding-checklist items for `required: true` secrets.
|
|
19
|
+
- A stable server-side read API (`readAppSecret`) that decrypts values on
|
|
20
|
+
demand.
|
|
21
|
+
- Validator hooks for health-checking keys before save and from a Test button.
|
|
22
|
+
|
|
23
|
+
## When NOT to use
|
|
24
|
+
|
|
25
|
+
- OAuth flows that need to run the full authorization code exchange — use
|
|
26
|
+
`@agent-native/core/oauth-tokens` directly to save/refresh tokens. The
|
|
27
|
+
registry can still surface the OAuth connection in the sidebar by
|
|
28
|
+
registering a secret with `kind: "oauth"` — that just delegates status
|
|
29
|
+
lookup to oauth-tokens and renders a Connect button, no `app_secrets` row
|
|
30
|
+
is written.
|
|
31
|
+
- Purely process-level env vars that are never user-facing (e.g. `NODE_ENV`,
|
|
32
|
+
deployment flags). Those belong in the onboarding `form` method or the
|
|
33
|
+
`envKeys` list in `core-routes-plugin`.
|
|
34
|
+
|
|
35
|
+
## Registering a secret
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
// server/plugins/register-secrets.ts
|
|
39
|
+
import { defineNitroPlugin } from "@agent-native/core/server";
|
|
40
|
+
import { registerRequiredSecret } from "@agent-native/core/secrets";
|
|
41
|
+
|
|
42
|
+
export default defineNitroPlugin(() => {
|
|
43
|
+
registerRequiredSecret({
|
|
44
|
+
key: "OPENAI_API_KEY",
|
|
45
|
+
label: "OpenAI API Key",
|
|
46
|
+
description: "Used for Whisper transcription of your recordings.",
|
|
47
|
+
docsUrl: "https://platform.openai.com/api-keys",
|
|
48
|
+
scope: "user",
|
|
49
|
+
kind: "api-key",
|
|
50
|
+
required: true,
|
|
51
|
+
validator: async (value) => {
|
|
52
|
+
const res = await fetch("https://api.openai.com/v1/models", {
|
|
53
|
+
headers: { Authorization: `Bearer ${value}` },
|
|
54
|
+
});
|
|
55
|
+
return res.ok
|
|
56
|
+
? { ok: true }
|
|
57
|
+
: { ok: false, error: `OpenAI rejected the key (HTTP ${res.status})` };
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### OAuth in the unified UI
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
registerRequiredSecret({
|
|
67
|
+
key: "GOOGLE_CONNECTED",
|
|
68
|
+
label: "Google account",
|
|
69
|
+
description: "Grants access to Gmail / Calendar APIs.",
|
|
70
|
+
scope: "user",
|
|
71
|
+
kind: "oauth",
|
|
72
|
+
required: true,
|
|
73
|
+
oauthProvider: "google", // must match the provider id in oauth-tokens
|
|
74
|
+
oauthConnectUrl: "/_agent-native/google/auth-url",
|
|
75
|
+
});
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The sidebar shows a Connect button instead of a text input; no `app_secrets`
|
|
79
|
+
row is written — status is derived from `hasOAuthTokens("google")`.
|
|
80
|
+
|
|
81
|
+
## Registered options
|
|
82
|
+
|
|
83
|
+
| Field | Type | Purpose |
|
|
84
|
+
| ------------------ | --------------------------------------- | ------------------------------------------------------------------------ |
|
|
85
|
+
| `key` | `string` | Env-var style name (`OPENAI_API_KEY`). Also the storage key. |
|
|
86
|
+
| `label` | `string` | Human-readable title in the sidebar. |
|
|
87
|
+
| `description` | `string?` | Subtitle under the label. |
|
|
88
|
+
| `docsUrl` | `string?` | "Get key" link rendered on the card. |
|
|
89
|
+
| `scope` | `"user" \| "workspace"` | Per-user or shared across the active org. |
|
|
90
|
+
| `kind` | `"api-key" \| "oauth"` | Drives UI and storage behavior. |
|
|
91
|
+
| `required` | `boolean?` | When true, an onboarding step is auto-injected. |
|
|
92
|
+
| `validator` | `(v) => Promise<boolean \| {ok,error}>` | Runs on save and from the Test button. Never log `v`. |
|
|
93
|
+
| `oauthProvider` | `string?` (oauth-kind only) | Provider id in `oauth-tokens` that backs this entry. |
|
|
94
|
+
| `oauthConnectUrl` | `string?` (oauth-kind only) | URL the Connect button points at. |
|
|
95
|
+
|
|
96
|
+
## Reading a secret from an action
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
import { defineAction } from "@agent-native/core";
|
|
100
|
+
import { readAppSecret } from "@agent-native/core/secrets";
|
|
101
|
+
import { getSession } from "@agent-native/core/server";
|
|
102
|
+
|
|
103
|
+
export default defineAction({
|
|
104
|
+
name: "transcribe-audio",
|
|
105
|
+
description: "Transcribe an audio file with Whisper",
|
|
106
|
+
input: { fileUrl: "string" },
|
|
107
|
+
handler: async ({ fileUrl }, ctx) => {
|
|
108
|
+
const session = await getSession(ctx.event);
|
|
109
|
+
if (!session?.email) throw new Error("Not signed in");
|
|
110
|
+
|
|
111
|
+
const stored = await readAppSecret({
|
|
112
|
+
key: "OPENAI_API_KEY",
|
|
113
|
+
scope: "user",
|
|
114
|
+
scopeId: session.email,
|
|
115
|
+
});
|
|
116
|
+
// Env var wins if set (useful for hosted deployments).
|
|
117
|
+
const apiKey = process.env.OPENAI_API_KEY ?? stored?.value;
|
|
118
|
+
if (!apiKey) {
|
|
119
|
+
throw new Error(
|
|
120
|
+
"OPENAI_API_KEY is not set. Configure it in the sidebar settings.",
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// …call OpenAI. NEVER log the key or include it in error messages.
|
|
125
|
+
},
|
|
126
|
+
});
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Rules:
|
|
130
|
+
|
|
131
|
+
- **Never log the value.** The read layer enforces this server-side; your
|
|
132
|
+
code must do the same.
|
|
133
|
+
- **Check `process.env[key]` first.** Env vars win so ops teams can set keys
|
|
134
|
+
via deploy configuration without the user ever visiting the sidebar.
|
|
135
|
+
- **Scope matches the registration.** `scope: "user"` → pass the user email.
|
|
136
|
+
`scope: "workspace"` → pass the active `orgId` from
|
|
137
|
+
`getOrgContext(event).orgId`.
|
|
138
|
+
|
|
139
|
+
## HTTP routes
|
|
140
|
+
|
|
141
|
+
Core routes plugin mounts these under `/_agent-native/secrets/` automatically:
|
|
142
|
+
|
|
143
|
+
- `GET /_agent-native/secrets` — list registered secrets with status (`set`
|
|
144
|
+
/ `unset` / `invalid`), metadata, and — for set api-keys — the last 4
|
|
145
|
+
characters. Values are never returned.
|
|
146
|
+
- `POST /_agent-native/secrets/:key` — body `{ value, scope?, scopeId? }`.
|
|
147
|
+
Runs the registered validator; returns 400 with the error on failure.
|
|
148
|
+
- `DELETE /_agent-native/secrets/:key` — remove the stored value.
|
|
149
|
+
- `POST /_agent-native/secrets/:key/test` — re-run the validator against the
|
|
150
|
+
currently stored value.
|
|
151
|
+
|
|
152
|
+
## Storage & encryption
|
|
153
|
+
|
|
154
|
+
- Values are stored in `app_secrets` (created on-demand; no migration
|
|
155
|
+
needed).
|
|
156
|
+
- Encrypted at rest with AES-256-GCM. Key material is derived from
|
|
157
|
+
`SECRETS_ENCRYPTION_KEY` (preferred) or `BETTER_AUTH_SECRET` (fallback).
|
|
158
|
+
If neither is set, the framework uses a machine-local fallback and logs a
|
|
159
|
+
one-time warning — set `SECRETS_ENCRYPTION_KEY` in production.
|
|
160
|
+
|
|
161
|
+
## Ad-hoc Keys
|
|
162
|
+
|
|
163
|
+
Ad-hoc keys are user-created secrets that are not declared by the template.
|
|
164
|
+
Users create them through the settings UI or the agent chat to use with
|
|
165
|
+
automations and the `web-request` tool. They support `${keys.NAME}`
|
|
166
|
+
substitution in outbound HTTP requests.
|
|
167
|
+
|
|
168
|
+
### Ad-hoc API
|
|
169
|
+
|
|
170
|
+
Core routes plugin mounts these under `/_agent-native/secrets/adhoc`:
|
|
171
|
+
|
|
172
|
+
- `GET /_agent-native/secrets/adhoc` — list all ad-hoc keys (name, last 4
|
|
173
|
+
chars, URL allowlist). Values are never returned.
|
|
174
|
+
- `POST /_agent-native/secrets/adhoc` — body `{ name, value, urlAllowlist? }`.
|
|
175
|
+
Creates or updates an ad-hoc key.
|
|
176
|
+
- `DELETE /_agent-native/secrets/adhoc/:name` — remove an ad-hoc key.
|
|
177
|
+
|
|
178
|
+
### URL Allowlists
|
|
179
|
+
|
|
180
|
+
Each ad-hoc key can have a URL allowlist — an array of origin URLs that
|
|
181
|
+
restrict where the key's value can be sent. The check is origin-level
|
|
182
|
+
(scheme + host + port). If no allowlist is configured, the key can be used
|
|
183
|
+
with any URL.
|
|
184
|
+
|
|
185
|
+
```ts
|
|
186
|
+
// Creating a key with an allowlist
|
|
187
|
+
POST /_agent-native/secrets/adhoc
|
|
188
|
+
{
|
|
189
|
+
"name": "SLACK_WEBHOOK",
|
|
190
|
+
"value": "https://hooks.slack.com/services/T00/B00/xxxx",
|
|
191
|
+
"urlAllowlist": ["https://hooks.slack.com"]
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
### `${keys.NAME}` Substitution
|
|
196
|
+
|
|
197
|
+
The `web-request` tool supports `${keys.NAME}` placeholders in the URL,
|
|
198
|
+
headers, and body. Substitution happens server-side after the agent emits
|
|
199
|
+
the tool call — the raw secret value never enters the agent's context.
|
|
200
|
+
|
|
201
|
+
```ts
|
|
202
|
+
import {
|
|
203
|
+
resolveKeyReferences,
|
|
204
|
+
validateUrlAllowlist,
|
|
205
|
+
} from "@agent-native/core/secrets/substitution";
|
|
206
|
+
|
|
207
|
+
// Resolve all ${keys.NAME} references in a string
|
|
208
|
+
const { resolved, usedKeys } = await resolveKeyReferences(
|
|
209
|
+
"Bearer ${keys.API_TOKEN}",
|
|
210
|
+
"user",
|
|
211
|
+
"owner@example.com",
|
|
212
|
+
);
|
|
213
|
+
|
|
214
|
+
// Validate a URL against a key's allowlist
|
|
215
|
+
const allowed = validateUrlAllowlist(
|
|
216
|
+
"https://hooks.slack.com/services/T00/B00/xxxx",
|
|
217
|
+
["https://hooks.slack.com"],
|
|
218
|
+
);
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Key resolution falls back from user scope to workspace scope, so users can
|
|
222
|
+
override shared keys without breaking automations that reference workspace
|
|
223
|
+
defaults.
|
|
224
|
+
|
|
225
|
+
### Key Files (ad-hoc)
|
|
226
|
+
|
|
227
|
+
| File | Purpose |
|
|
228
|
+
| ---------------------------------------------- | ------------------------------------------- |
|
|
229
|
+
| `packages/core/src/secrets/substitution.ts` | `resolveKeyReferences()`, `validateUrlAllowlist()` |
|
|
230
|
+
| `packages/core/src/tools/fetch-tool.ts` | `web-request` tool consuming key references |
|
|
231
|
+
|
|
232
|
+
## Related skills
|
|
233
|
+
|
|
234
|
+
- `onboarding` — the setup checklist that required secrets show up in.
|
|
235
|
+
- `actions` — where you'll read secrets when calling third-party APIs.
|
|
236
|
+
- `authentication` — session scoping; `scope: "user"` uses the session
|
|
237
|
+
email.
|
|
238
|
+
- `security` — input validation and never logging secrets.
|
|
239
|
+
- `automations` — ad-hoc keys power `${keys.NAME}` in automation web requests.
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security
|
|
3
|
+
description: >-
|
|
4
|
+
Secure coding practices for agent-native apps: input validation, SQL
|
|
5
|
+
injection, XSS, secrets, data scoping, and auth. Use when writing any action,
|
|
6
|
+
route, or component that touches user data or external input.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Security
|
|
10
|
+
|
|
11
|
+
## Rule
|
|
12
|
+
|
|
13
|
+
Use the framework's security primitives everywhere. Never bypass them.
|
|
14
|
+
|
|
15
|
+
## Input Validation
|
|
16
|
+
|
|
17
|
+
Use `defineAction` with a Zod `schema:` for every action. The framework validates input automatically and returns clear 400 errors for HTTP callers and structured error results for agent tool calls.
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
export default defineAction({
|
|
21
|
+
schema: z.object({
|
|
22
|
+
email: z.string().email(),
|
|
23
|
+
role: z.enum(["admin", "member"]),
|
|
24
|
+
limit: z.coerce.number().int().min(1).max(100).default(25),
|
|
25
|
+
}),
|
|
26
|
+
run: async (args) => { /* args is fully typed and validated */ },
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
The legacy `parameters:` field (plain JSON Schema) has no runtime validation — do not use it for new code.
|
|
31
|
+
|
|
32
|
+
## SQL Injection
|
|
33
|
+
|
|
34
|
+
Never concatenate user input into SQL strings. Use Drizzle ORM's query builder (always safe) or parameterized queries:
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
// Safe — Drizzle ORM
|
|
38
|
+
await db.select().from(users).where(eq(users.email, args.email));
|
|
39
|
+
|
|
40
|
+
// Safe — parameterized raw SQL
|
|
41
|
+
await client.execute({ sql: "SELECT * FROM users WHERE id = ?", args: [id] });
|
|
42
|
+
|
|
43
|
+
// NEVER do this
|
|
44
|
+
await client.execute(`SELECT * FROM users WHERE id = '${id}'`);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## XSS
|
|
48
|
+
|
|
49
|
+
- React auto-escapes JSX content — trust it.
|
|
50
|
+
- Never use `dangerouslySetInnerHTML`, `innerHTML`, `eval()`, or `document.write()` with user-controlled content.
|
|
51
|
+
- For rich text editing, use TipTap (framework dependency).
|
|
52
|
+
- For rendering markdown, use `react-markdown`.
|
|
53
|
+
|
|
54
|
+
## Secrets
|
|
55
|
+
|
|
56
|
+
- OAuth tokens go in the `oauth_tokens` store via `saveOAuthTokens()`.
|
|
57
|
+
- Never store secrets in `settings`, `application_state`, source code, or action responses sent to the client.
|
|
58
|
+
|
|
59
|
+
## User Credentials Are Per-User Data — Never `process.env`
|
|
60
|
+
|
|
61
|
+
User credentials (API keys, third-party tokens) are per-user (or per-org) data. They MUST live in SQL, scoped per-user (`u:<email>:credential:KEY`) or per-org (`o:<orgId>:credential:KEY`). Always read with the request context:
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import { resolveCredential } from "@agent-native/core/credentials";
|
|
65
|
+
const apiKey = await resolveCredential("OPENAI_API_KEY", { userEmail, orgId });
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
On 2026-04-29 the previous one-arg `resolveCredential(key)` form fell back to `process.env[key]` and an unscoped global `settings` row, so every signed-in user inherited the deployment's credentials. Two guards now block this in CI (`pnpm prep`):
|
|
69
|
+
|
|
70
|
+
- `scripts/guard-no-env-credentials.mjs` — bans `process.env.<KEY>` reads in `packages/core/src/credentials/`, `secrets/`, `vault/`, and `templates/*/server/{lib,routes/api}/credential*` paths, except for an explicit allowlist of deploy-level vars (`DATABASE_URL`, `BETTER_AUTH_SECRET`, `NETLIFY_*`, etc.). Per-line opt-out: `// guard:allow-env-credential — <reason>`.
|
|
71
|
+
- `scripts/guard-no-unscoped-credentials.mjs` — bans one-arg calls to `resolveCredential` / `hasCredential` / `saveCredential` / `deleteCredential`. Per-line opt-out: `// guard:allow-unscoped-credential — <reason>`.
|
|
72
|
+
|
|
73
|
+
If a deploy-level value genuinely needs an env var (CI-set token, host secret), it's not a user credential — keep it out of the credentials/ secrets/ vault/ paths and the env-credentials guard won't see it.
|
|
74
|
+
|
|
75
|
+
## Guards
|
|
76
|
+
|
|
77
|
+
Two more CI guards (also wired into `pnpm prep`) target the 2026-04 cross-tenant leak class — request-state escaping into shared process state, and dev-mode sentinel identities used as production fallbacks.
|
|
78
|
+
|
|
79
|
+
- `scripts/guard-no-env-mutation.mjs` — bans `process.env.<KEY> = …` (and bracket / compound forms) anywhere in production code. On serverless, every warm container handles many concurrent requests in one Node process, so `process.env` mutation leaks across in-flight requests (the "restore" line at the end of a handler races and never helps — most recently the Zoom webhook). Use `runWithRequestContext({ userEmail, orgId, timezone }, fn)` from `@agent-native/core/server` instead — it's AsyncLocalStorage-backed and per-request safe. Allowlisted paths: `scripts/`, `*.spec.ts` / `*.test.ts`, `packages/core/src/dev**`, `templates/*/test/`, anything under `/cli/` or `/scaffold/`. Per-line opt-out: `process.env.X = y // guard:allow-env-mutation — <reason>`.
|
|
80
|
+
- `scripts/guard-no-localhost-fallback.mjs` — bans the literal `"local@localhost"` / `'local@localhost'` / `` `local@localhost` `` in production code. The bug class: `getRequestUserEmail() ?? "local@localhost"` silently pools every unauthenticated request into a single shared tenant, leaking credentials, tools, and `application_state` rows between accounts. The right behavior is to throw / 401 when there's no session. Allowlisted paths: the dev-mode auth shim (`packages/core/src/server/auth.ts`), `packages/core/src/dev**`, tests, `scripts/`, `seed/` / `seeds/`, plus a few framework helpers that intentionally inspect or migrate the dev identity. SQL DDL `DEFAULT 'local@localhost'` and the Drizzle helper `.default('local@localhost')` are skipped per-line — schema column defaults are intentional dev fixtures, not the dangerous fallback pattern. Per-line opt-out: `email ?? "local@localhost" // guard:allow-localhost-fallback — <reason>`.
|
|
81
|
+
|
|
82
|
+
## Auth
|
|
83
|
+
|
|
84
|
+
- All actions are protected by the auth guard automatically.
|
|
85
|
+
- If you must create custom `/api/` routes, always call `getSession(event)` and reject requests without a session:
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
import { getSession } from "@agent-native/core/server";
|
|
89
|
+
|
|
90
|
+
export default defineEventHandler(async (event) => {
|
|
91
|
+
const session = await getSession(event);
|
|
92
|
+
if (!session) throw createError({ statusCode: 401 });
|
|
93
|
+
// ...
|
|
94
|
+
});
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- Never create unprotected routes that modify data.
|
|
98
|
+
|
|
99
|
+
## Custom HTTP Routes Must Apply Access Control Themselves
|
|
100
|
+
|
|
101
|
+
This is the single most-failed rule in the codebase. Auto-mounted action routes (`/_agent-native/actions/...`) get a request context wired up automatically. **Hand-written `/api/*` Nitro routes do not.** If your handler queries an ownable resource (any table with `...ownableColumns()`), you MUST:
|
|
102
|
+
|
|
103
|
+
1. Read the session: `const session = await getSession(event).catch(() => null)`.
|
|
104
|
+
2. Run the work inside `runWithRequestContext({ userEmail: session?.email, orgId: session?.orgId }, fn)` from `@agent-native/core/server`.
|
|
105
|
+
3. Inside `fn`, query through one of:
|
|
106
|
+
- `accessFilter(table, sharesTable)` in the WHERE clause for list/read-many.
|
|
107
|
+
- `resolveAccess("<type>", id)` for read-by-id (returns null if no access — return 404, not 403, so existence isn't leaked).
|
|
108
|
+
- `assertAccess("<type>", id, "viewer"|"editor"|"admin")` for write/delete-by-id.
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
// Bad — Brent's signup leaked every other user's decks because of this exact shape.
|
|
112
|
+
export default defineEventHandler(async () => {
|
|
113
|
+
const db = getDb();
|
|
114
|
+
return db.select().from(schema.decks); // no access filter!
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// Good
|
|
118
|
+
import { getSession, runWithRequestContext } from "@agent-native/core/server";
|
|
119
|
+
import { accessFilter } from "@agent-native/core/sharing";
|
|
120
|
+
export default defineEventHandler(async (event) => {
|
|
121
|
+
const session = await getSession(event).catch(() => null);
|
|
122
|
+
return runWithRequestContext(
|
|
123
|
+
{ userEmail: session?.email, orgId: session?.orgId },
|
|
124
|
+
async () => {
|
|
125
|
+
const db = getDb();
|
|
126
|
+
return db
|
|
127
|
+
.select()
|
|
128
|
+
.from(schema.decks)
|
|
129
|
+
.where(accessFilter(schema.decks, schema.deckShares));
|
|
130
|
+
},
|
|
131
|
+
);
|
|
132
|
+
});
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
`scripts/guard-no-unscoped-queries.mjs` runs in `pnpm prep` and fails the build if any file in `templates/*/server/`, `templates/*/actions/`, or `packages/*/src/` queries an ownable table without one of the access helpers. Last-resort opt-out is the marker comment `// guard:allow-unscoped — <reason>` — only use it for cases like the sharing primitives themselves or share-token-public viewer endpoints, and always include a reviewer-readable reason.
|
|
136
|
+
|
|
137
|
+
## Data Scoping
|
|
138
|
+
|
|
139
|
+
In production, the framework automatically restricts all agent SQL queries to the current user's data using temporary views. This is enforced at the SQL level — the agent cannot bypass it.
|
|
140
|
+
|
|
141
|
+
### Per-User Scoping (`owner_email`)
|
|
142
|
+
|
|
143
|
+
Every template table with user data **must** have an `owner_email` text column:
|
|
144
|
+
|
|
145
|
+
1. Framework detects `owner_email` via schema introspection
|
|
146
|
+
2. Creates temp views `WHERE owner_email = <current user>` before each query
|
|
147
|
+
3. Auto-injects `owner_email` into INSERT statements
|
|
148
|
+
|
|
149
|
+
The current user is resolved from `AGENT_USER_EMAIL` (set automatically from the session).
|
|
150
|
+
|
|
151
|
+
### Per-Org Scoping (`org_id`)
|
|
152
|
+
|
|
153
|
+
For multi-org apps, tables also need `org_id`:
|
|
154
|
+
|
|
155
|
+
1. `WHERE org_id = <current org>` is added (in addition to `owner_email` if present)
|
|
156
|
+
2. `org_id` is auto-injected into INSERT statements
|
|
157
|
+
|
|
158
|
+
Enable org scoping in the agent-chat plugin:
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
createAgentChatPlugin({
|
|
162
|
+
resolveOrgId: async (event) => {
|
|
163
|
+
const ctx = await getOrgContext(event);
|
|
164
|
+
return ctx.orgId;
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Column Conventions
|
|
170
|
+
|
|
171
|
+
| Column | Purpose | Required |
|
|
172
|
+
| ------------- | ----------------------- | ------------------------------- |
|
|
173
|
+
| `owner_email` | Per-user data isolation | Yes, for all user-facing tables |
|
|
174
|
+
| `org_id` | Per-org data isolation | Yes, for multi-org apps |
|
|
175
|
+
|
|
176
|
+
Run `pnpm action db-check-scoping` to verify. Use `--require-org` for multi-org apps.
|
|
177
|
+
|
|
178
|
+
## Checklist
|
|
179
|
+
|
|
180
|
+
- [ ] New action uses `defineAction` with a Zod `schema:`
|
|
181
|
+
- [ ] No SQL string concatenation with user input
|
|
182
|
+
- [ ] No `dangerouslySetInnerHTML` with user content
|
|
183
|
+
- [ ] New env vars in `.env` only, not committed
|
|
184
|
+
- [ ] New user-data tables have `owner_email` column
|
|
185
|
+
- [ ] Custom routes call `getSession` and reject unauthenticated requests
|
|
186
|
+
|
|
187
|
+
## Related Skills
|
|
188
|
+
|
|
189
|
+
- `storing-data` — SQL patterns and the agent's db tools
|
|
190
|
+
- `actions` — `defineAction` with Zod schema validation
|
|
191
|
+
- `authentication` — Auth modes, sessions, and org context
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: self-modifying-code
|
|
3
|
+
description: >-
|
|
4
|
+
How the agent can modify the app's own source code. Use when the agent needs
|
|
5
|
+
to edit components, routes, styles, or scripts, when designing UI for agent
|
|
6
|
+
editability, or when deciding what the agent should and shouldn't modify.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Self-Modifying Code
|
|
10
|
+
|
|
11
|
+
## Rule
|
|
12
|
+
|
|
13
|
+
The agent can edit the app's own source code — components, routes, styles, scripts. This is a feature, not a bug. Design your app expecting this.
|
|
14
|
+
|
|
15
|
+
## Why
|
|
16
|
+
|
|
17
|
+
An agent-native app isn't just an app the agent can _use_ — it's an app the agent can _change_. The agent can fix bugs, add features, adjust styles, and restructure code. This makes the agent a true collaborator, not just an operator.
|
|
18
|
+
|
|
19
|
+
## Modification Taxonomy
|
|
20
|
+
|
|
21
|
+
Not all modifications are equal. Use this to decide what level of care is needed:
|
|
22
|
+
|
|
23
|
+
| Tier | What | Examples | After modifying |
|
|
24
|
+
| ------------- | --------------------- | ------------------------------------------------ | --------------------------------- |
|
|
25
|
+
| 1: Data | Files in `data/` | JSON state, generated content, markdown | Nothing — these are routine |
|
|
26
|
+
| 2: Source | App code | Components, routes, styles, scripts | Run `pnpm typecheck && pnpm lint` |
|
|
27
|
+
| 3: Config | Project config | `package.json`, `tsconfig.json`, `vite.config.*` | Ask for explicit approval first |
|
|
28
|
+
| 4: Off limits | Secrets and framework | `.env`, `@agent-native/core` internals | Never modify these |
|
|
29
|
+
|
|
30
|
+
## Git Checkpoint Pattern
|
|
31
|
+
|
|
32
|
+
Before modifying source code (Tier 2+), create a rollback point:
|
|
33
|
+
|
|
34
|
+
1. Commit or stash current state
|
|
35
|
+
2. Make the edit
|
|
36
|
+
3. Run `pnpm typecheck && pnpm lint`
|
|
37
|
+
4. If verification fails → revert with `git checkout -- <file>`
|
|
38
|
+
5. If verification passes → continue
|
|
39
|
+
|
|
40
|
+
This ensures the agent can experiment without breaking the app.
|
|
41
|
+
|
|
42
|
+
## Designing for Agent Editability
|
|
43
|
+
|
|
44
|
+
Make your app easy for the agent to understand and modify:
|
|
45
|
+
|
|
46
|
+
**Expose UI state via `data-*` attributes** so the agent knows what's selected:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
const el = document.documentElement;
|
|
50
|
+
el.dataset.currentView = view;
|
|
51
|
+
el.dataset.selectedId = selectedItem?.id || "";
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Expose richer context via `window.__appState`** for complex state:
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
(window as any).__appState = {
|
|
58
|
+
selectedId: id,
|
|
59
|
+
currentLayout: layout,
|
|
60
|
+
itemCount: items.length,
|
|
61
|
+
};
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Use configuration-driven rendering** — Extract visual decisions (colors, layouts, sizes) into JSON config files in `data/`. The agent can modify the config (Tier 1) instead of the component source (Tier 2).
|
|
65
|
+
|
|
66
|
+
## Don't
|
|
67
|
+
|
|
68
|
+
- Don't modify `.env` files or files containing secrets
|
|
69
|
+
- Don't modify `@agent-native/core` package internals
|
|
70
|
+
- Don't modify `.agents/skills/` or `AGENTS.md` unless explicitly requested
|
|
71
|
+
- Don't skip the typecheck/lint step after editing source code
|
|
72
|
+
- Don't make source changes without a git checkpoint to roll back to
|
|
73
|
+
|
|
74
|
+
## Related Skills
|
|
75
|
+
|
|
76
|
+
- **storing-data** — Tier 1 modifications (data files) are the safest and most common
|
|
77
|
+
- **scripts** — The agent can create or modify scripts to add new capabilities
|
|
78
|
+
- **delegate-to-agent** — Self-modification requests come through the agent chat
|
|
79
|
+
- **real-time-sync** — Database writes trigger poll events to update the UI
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: server-plugins
|
|
3
|
+
description: >-
|
|
4
|
+
Framework server plugins and the `/_agent-native/` route namespace. Use when
|
|
5
|
+
adding a custom server plugin, deciding whether to create an `/api/` route vs
|
|
6
|
+
an action, or debugging auto-mounted framework routes.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Server Plugins & Framework Routes
|
|
10
|
+
|
|
11
|
+
## Default Plugins (auto-mount)
|
|
12
|
+
|
|
13
|
+
Five default plugins auto-mount when your app doesn't have a custom version in `server/plugins/`:
|
|
14
|
+
|
|
15
|
+
| Plugin | Default behavior | Customize when |
|
|
16
|
+
| ------------- | ------------------------------------------------- | ------------------------------------------- |
|
|
17
|
+
| `agent-chat` | Agent chat endpoints | Custom `mentionProviders` or `systemPrompt` |
|
|
18
|
+
| `auth` | Auth middleware | Custom `publicPaths` or Google OAuth config |
|
|
19
|
+
| `core-routes` | `/_agent-native/poll`, `/_agent-native/ping`, etc | Custom `envKeys` or `sseRoute` |
|
|
20
|
+
| `resources` | Resource CRUD | Rarely |
|
|
21
|
+
| `terminal` | Terminal emulator | Rarely |
|
|
22
|
+
|
|
23
|
+
**Only create plugin files for plugins you need to customize.** Let defaults auto-mount.
|
|
24
|
+
|
|
25
|
+
## Framework Route Namespace: `/_agent-native/`
|
|
26
|
+
|
|
27
|
+
All framework-level routes live under `/_agent-native/` to avoid collisions with template-specific `/api/*` routes.
|
|
28
|
+
|
|
29
|
+
### Hard rule
|
|
30
|
+
|
|
31
|
+
- **ALL framework routes go under `/_agent-native/`.**
|
|
32
|
+
- Templates own `/api/*` for their domain routes.
|
|
33
|
+
- Never put framework routes under `/api/`.
|
|
34
|
+
- Never put template routes under `/_agent-native/` — that namespace is reserved.
|
|
35
|
+
|
|
36
|
+
### Auto-mounted framework routes
|
|
37
|
+
|
|
38
|
+
| Route | Purpose |
|
|
39
|
+
| ------------------------------------------------------------- | ---------------------------------------- |
|
|
40
|
+
| `GET /_agent-native/poll` | Polling endpoint for DB change detection |
|
|
41
|
+
| `GET /_agent-native/events` | SSE endpoint for real-time sync |
|
|
42
|
+
| `GET /_agent-native/ping` | Health check |
|
|
43
|
+
| `GET/PUT/DELETE /_agent-native/application-state/:key` | Application state CRUD |
|
|
44
|
+
| `GET/PUT/DELETE /_agent-native/application-state/compose/:id` | Compose draft CRUD |
|
|
45
|
+
| `POST /_agent-native/agent-chat` | Agent chat SSE endpoint |
|
|
46
|
+
| `GET /_agent-native/agent-chat/mentions` | Mention search for @-tagging |
|
|
47
|
+
| `GET /_agent-native/env-status` | Env key configuration status |
|
|
48
|
+
| `POST /_agent-native/env-vars` | Save env vars |
|
|
49
|
+
| `/_agent-native/auth/*` | Authentication (login, session, logout) |
|
|
50
|
+
| `/_agent-native/google/*` | Google OAuth (callback, auth-url, etc.) |
|
|
51
|
+
| `/_agent-native/resources/*` | Resource CRUD |
|
|
52
|
+
| `/_agent-native/actions/:name` | Auto-mounted action endpoints |
|
|
53
|
+
| `/_agent-native/available-clis` | Available CLI tools |
|
|
54
|
+
| `/_agent-native/agent-terminal-info` | Terminal connection info |
|
|
55
|
+
| `/_agent-native/collab/*` | Real-time collaboration (see `real-time-collab`) |
|
|
56
|
+
| `/_agent-native/a2a` | A2A JSON-RPC endpoint (see `a2a-protocol`) |
|
|
57
|
+
|
|
58
|
+
## Actions-First Approach
|
|
59
|
+
|
|
60
|
+
For standard CRUD and data operations, use `defineAction` in `actions/` — the framework auto-mounts them as HTTP endpoints at `/_agent-native/actions/:name`. Only create custom `/api/*` routes for things actions can't do:
|
|
61
|
+
|
|
62
|
+
- File uploads with multipart form data
|
|
63
|
+
- Streaming responses
|
|
64
|
+
- Webhooks from external services
|
|
65
|
+
- OAuth callbacks
|
|
66
|
+
|
|
67
|
+
The Nitro Vite plugin handles both `/api/` and `/_agent-native/` prefixes via file-based routing in `server/routes/`.
|
|
68
|
+
|
|
69
|
+
## Related Skills
|
|
70
|
+
|
|
71
|
+
- `actions` — Prefer actions over custom `/api/` routes
|
|
72
|
+
- `authentication` — Auth middleware and session handling
|
|
73
|
+
- `portability` — Use H3 (not Express) for all routes
|