@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,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-design
|
|
3
|
+
description: >-
|
|
4
|
+
Create distinctive, production-grade frontend interfaces with high design
|
|
5
|
+
quality. Use when building web components, pages, artifacts, posters, or
|
|
6
|
+
applications (websites, landing pages, dashboards, React components,
|
|
7
|
+
HTML/CSS layouts, or when styling/beautifying any web UI). Generates
|
|
8
|
+
creative, polished UI that avoids generic AI aesthetics.
|
|
9
|
+
license: Complete terms in LICENSE.txt
|
|
10
|
+
source: https://github.com/anthropics/skills/blob/main/skills/frontend-design/SKILL.md
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Frontend Design
|
|
14
|
+
|
|
15
|
+
This skill guides creation of distinctive, production-grade frontend interfaces. Implement real working code with strong product judgment, excellent accessibility, and a clear visual point of view.
|
|
16
|
+
|
|
17
|
+
The user may ask for a component, page, full app, dashboard, marketing surface, or restyle. Before coding, understand the audience and pick a direction that fits the product instead of defaulting to generic SaaS polish.
|
|
18
|
+
|
|
19
|
+
## Design Thinking
|
|
20
|
+
|
|
21
|
+
Before coding, decide:
|
|
22
|
+
|
|
23
|
+
- **Purpose**: What workflow does this surface make easier? What is the primary action?
|
|
24
|
+
- **Audience**: Who will use it repeatedly, and what should feel fast, calm, playful, premium, editorial, technical, or utilitarian?
|
|
25
|
+
- **Tone**: Choose a concrete aesthetic direction: refined minimal, dense operations console, editorial, playful, industrial, warm handmade, high-contrast data tool, etc.
|
|
26
|
+
- **Information hierarchy**: What must be visible in the first five seconds, and what should be progressively disclosed?
|
|
27
|
+
- **Differentiation**: What makes this feel designed for this exact domain?
|
|
28
|
+
|
|
29
|
+
Then implement working code that is cohesive, accessible, responsive, and polished in small details: typography, spacing, copy, motion, empty states, loading states, focus states, and error states.
|
|
30
|
+
|
|
31
|
+
## Aesthetic Guidelines
|
|
32
|
+
|
|
33
|
+
- **Typography**: Use the product's existing type system first. For net-new public pages, choose characterful but readable type and keep sizing appropriate to the surface.
|
|
34
|
+
- **Color and theme**: Use semantic tokens and CSS variables. Avoid one-note palettes and default purple/blue gradients unless the brand demands them.
|
|
35
|
+
- **Motion**: Prefer purposeful transitions and small state changes. Use CSS transitions/keyframes unless the app already uses a motion library.
|
|
36
|
+
- **Composition**: Match the workflow. Operational apps should be dense and scannable; marketing or portfolio pages can be more immersive.
|
|
37
|
+
- **Visual assets**: Websites, games, and object-focused pages need real or generated media when images help users understand the subject.
|
|
38
|
+
- **Responsive fit**: Text must not overflow buttons, cards, tabs, sidebars, or fixed-format tools. Use stable dimensions for boards, grids, toolbars, and counters.
|
|
39
|
+
|
|
40
|
+
## Agent-Native UI Rules
|
|
41
|
+
|
|
42
|
+
- Agent-native apps use React, Vite, Tailwind CSS, shadcn/ui, and `@tabler/icons-react`.
|
|
43
|
+
- **Use shadcn/ui primitives for standard UI**: `DropdownMenu`, `Popover`, `Dialog`, `AlertDialog`, `Sheet`, `Tabs`, `Tooltip`, `Select`, `Command`, `Sidebar`, `Table`, `Card`, `Badge`, `Skeleton`, and related primitives.
|
|
44
|
+
- **When touching shadcn/ui components, also read `shadcn-ui` if it exists.** That skill covers `components.json`, CLI docs, component composition, theming, and registry workflows.
|
|
45
|
+
- Check `app/components/ui/` before importing a shadcn component. If a primitive is missing, add it from the app root with `pnpm dlx shadcn@latest add <component>`, then review the generated file.
|
|
46
|
+
- Do not build custom dropdowns, menus, popovers, modals, or confirmations with manual absolute positioning and click-outside effects.
|
|
47
|
+
- Never use browser dialogs (`window.alert`, `window.confirm`, `window.prompt`). Use `AlertDialog`, `Dialog`, or app-specific confirmation UI.
|
|
48
|
+
- Use Tabler icons for all first-party UI icons. Do not add Lucide, Heroicons, inline SVG icon sets, or emoji icons.
|
|
49
|
+
- Use `useActionQuery` and `useActionMutation` from `@agent-native/core/client` for action-backed UI. Standard CRUD should go through actions, not custom `/api/` routes.
|
|
50
|
+
- Keep UI optimistic where possible: update cache and navigation immediately, then reconcile or roll back on mutation result.
|
|
51
|
+
- Custom styles belong in Tailwind classes, component CSS, or the existing global CSS theme file; avoid inline styles.
|
|
52
|
+
|
|
53
|
+
## shadcn/ui Design Rules
|
|
54
|
+
|
|
55
|
+
- Use built-in component variants first (`variant`, `size`) before overriding classes.
|
|
56
|
+
- Use semantic tokens (`bg-background`, `text-muted-foreground`, `border-border`, `bg-primary`) instead of raw Tailwind colors for app chrome and reusable components.
|
|
57
|
+
- Use `gap-*` in flex/grid layouts instead of `space-x-*` or `space-y-*`.
|
|
58
|
+
- Use `size-*` when width and height are equal, and `truncate` instead of spelling out overflow/ellipsis/nowrap.
|
|
59
|
+
- Use `cn()` from the local utils alias for conditional classes.
|
|
60
|
+
- Dialog, Sheet, Drawer, and AlertDialog content must have an accessible title. Use `sr-only` only when the visible design already communicates the title.
|
|
61
|
+
- Put menu/list items inside their group primitives: `SelectGroup`, `DropdownMenuGroup`, `CommandGroup`, and equivalents.
|
|
62
|
+
- Use full `Card` composition when the content has a title, description, content, or actions. Do not dump complex cards into a single `CardContent`.
|
|
63
|
+
- Use `ToggleGroup` for small option sets, `Switch` for binary settings, `Checkbox` for multi-select, `RadioGroup` for one-of-many, and `Slider`/inputs for numeric values.
|
|
64
|
+
- For forms, prefer the app's existing shadcn form pattern. If newer `Field`, `FieldGroup`, or `InputGroup` primitives are installed or appropriate to add, use them instead of raw layout divs.
|
|
65
|
+
- Loading states use `Skeleton`, `Progress`, `Spinner`, or the app's existing loading primitives. Empty states should have one clear next action.
|
|
66
|
+
|
|
67
|
+
## Anti-Patterns
|
|
68
|
+
|
|
69
|
+
Avoid:
|
|
70
|
+
|
|
71
|
+
- Generic AI aesthetics: purple gradients, glassy cards everywhere, vague sparkle language, decorative blobs, and context-free hero sections.
|
|
72
|
+
- Custom reimplementations of shadcn primitives.
|
|
73
|
+
- Raw color overrides on shared components when semantic tokens or variants would work.
|
|
74
|
+
- New always-visible controls for rare actions. Prefer menus, popovers, sheets, tabs, collapsibles, or advanced sections.
|
|
75
|
+
- UI cards nested inside other cards.
|
|
76
|
+
- Text or icons that resize or shift fixed-format UI on hover/loading.
|
|
77
|
+
|
|
78
|
+
## Verification
|
|
79
|
+
|
|
80
|
+
For substantial frontend work:
|
|
81
|
+
|
|
82
|
+
1. Run the relevant formatter/checks.
|
|
83
|
+
2. Start the dev server when the app needs one.
|
|
84
|
+
3. Verify with browser screenshots at desktop and mobile widths.
|
|
85
|
+
4. Check interactive states: hover, focus, loading, empty, error, and destructive confirmations.
|
|
86
|
+
|
|
87
|
+
## Related Skills
|
|
88
|
+
|
|
89
|
+
- **shadcn-ui** — shadcn CLI, component docs, composition rules, theming, and registries
|
|
90
|
+
- **self-modifying-code** — The agent can edit source code to apply design changes
|
|
91
|
+
- **storing-data** — All data lives in SQL; use actions for data access
|
|
92
|
+
- **actions** — `useActionQuery`/`useActionMutation` hooks for frontend data fetching
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: integration-webhooks
|
|
3
|
+
description: >-
|
|
4
|
+
Cross-platform pattern for handling messaging integration webhooks (Slack,
|
|
5
|
+
Telegram, WhatsApp, email, etc.) on serverless hosts. Use when adding a new
|
|
6
|
+
integration adapter, debugging dropped messages, or wiring long-running agent
|
|
7
|
+
work into a webhook handler.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Integration Webhooks
|
|
11
|
+
|
|
12
|
+
## Rule
|
|
13
|
+
|
|
14
|
+
Integration webhooks (Slack, Telegram, WhatsApp, email, Google Docs, etc.) must
|
|
15
|
+
**enqueue work to SQL and return 200 immediately**, then process the work in a
|
|
16
|
+
**separate fresh function execution** kicked off by a self-fired HTTP POST. A
|
|
17
|
+
recurring retry job sweeps anything that gets stuck. This pattern works on every
|
|
18
|
+
serverless host (Netlify, Vercel, Cloudflare Workers, Fly, Render, Node) without
|
|
19
|
+
relying on platform-specific background-execution features.
|
|
20
|
+
|
|
21
|
+
Do not run agent loops inside the webhook handler itself. Do not rely on
|
|
22
|
+
fire-and-forget `Promise`s after `return`ing from a serverless handler — they get
|
|
23
|
+
killed when the function freezes.
|
|
24
|
+
|
|
25
|
+
## Why
|
|
26
|
+
|
|
27
|
+
Messaging platforms expect a 200 response within a tight window — Slack will
|
|
28
|
+
retry after 3 seconds, and a retried event triggers duplicate agent runs. At the
|
|
29
|
+
same time, an agent loop replying to the message can take 30–60+ seconds because
|
|
30
|
+
it may make multiple LLM calls and tool calls.
|
|
31
|
+
|
|
32
|
+
Past attempts that don't work cross-host:
|
|
33
|
+
|
|
34
|
+
- **Fire-and-forget `Promise.then(...)` after returning** — Lambda/Vercel/CF
|
|
35
|
+
freeze the execution context the moment the response goes out. The promise
|
|
36
|
+
is silently killed, the user gets no reply, and there's no error in the
|
|
37
|
+
logs.
|
|
38
|
+
- **Netlify Background Functions** — Netlify-only, requires a `-background`
|
|
39
|
+
filename suffix, breaks on every other host.
|
|
40
|
+
- **Cloudflare `event.waitUntil()`** — CF Workers only, not portable.
|
|
41
|
+
- **Vercel Fluid / `after()`** — Vercel-only, gated behind specific runtimes.
|
|
42
|
+
- **A long-lived in-process queue** — fine on a single Node box, but on
|
|
43
|
+
serverless every cold start gets a fresh queue and any pending work is
|
|
44
|
+
lost.
|
|
45
|
+
|
|
46
|
+
The only universal answer: **persist the work, then trigger a brand new
|
|
47
|
+
function execution to do it.** SQL is the queue, a self-webhook is the trigger,
|
|
48
|
+
and a recurring job is the safety net.
|
|
49
|
+
|
|
50
|
+
## The Flow
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
┌──────────┐ 1. POST /integrations/:platform/webhook
|
|
54
|
+
│ Platform │────────────────────────────────────────────►┌──────────────────┐
|
|
55
|
+
└──────────┘ │ Webhook handler │
|
|
56
|
+
│ (function exec 1)│
|
|
57
|
+
└──────────────────┘
|
|
58
|
+
│
|
|
59
|
+
2. INSERT INTO integration_pending_tasks
|
|
60
|
+
(status='pending', payload=...)
|
|
61
|
+
│
|
|
62
|
+
3. fetch(POST /integrations/_process-task)
|
|
63
|
+
— fire-and-forget, NO await on body
|
|
64
|
+
│
|
|
65
|
+
4. return 200 to platform ◄───────────┘
|
|
66
|
+
|
|
67
|
+
┌──────────────────┐
|
|
68
|
+
5. POST arrives at processor │ Processor │
|
|
69
|
+
(separate fresh function) │ (function exec 2)│
|
|
70
|
+
└──────────────────┘
|
|
71
|
+
│
|
|
72
|
+
6. claimPendingTask(id) → status='processing'
|
|
73
|
+
7. runAgentLoop(...) — full timeout budget here
|
|
74
|
+
8. adapter.sendResponse(...) back to platform
|
|
75
|
+
9. markTaskCompleted(id)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
┌──────────────────────────────────────────────┐
|
|
79
|
+
│ Recurring job (every 60s) — safety net │
|
|
80
|
+
│ Re-fires processor for tasks stuck in │
|
|
81
|
+
│ 'pending' or 'processing' beyond timeout. │
|
|
82
|
+
│ Caps retries at 3 then marks 'failed'. │
|
|
83
|
+
└──────────────────────────────────────────────┘
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The webhook handler does as little as possible. The fresh function execution
|
|
87
|
+
that handles `_process-task` gets its own full timeout budget for the agent
|
|
88
|
+
loop.
|
|
89
|
+
|
|
90
|
+
## Key Files
|
|
91
|
+
|
|
92
|
+
| File | Purpose |
|
|
93
|
+
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------- |
|
|
94
|
+
| `packages/core/src/integrations/plugin.ts` | Mounts `/_agent-native/integrations/*` routes |
|
|
95
|
+
| `packages/core/src/integrations/webhook-handler.ts` | Verifies signature, parses, enqueues task, fires processor |
|
|
96
|
+
| `packages/core/src/integrations/pending-tasks-store.ts` | SQL queue: `insertPendingTask`, `claimPendingTask`, `markTaskCompleted`, `markTaskFailed` |
|
|
97
|
+
| `packages/core/src/integrations/pending-tasks-retry-job.ts` | Recurring retry sweep (`startPendingTasksRetryJob`, `retryStuckPendingTasks`) |
|
|
98
|
+
| `packages/core/src/integrations/types.ts` | `PlatformAdapter`, `IncomingMessage`, `OutgoingMessage` |
|
|
99
|
+
| `packages/core/src/integrations/adapters/{slack,telegram,whatsapp,email,google-docs}.ts` | One adapter per platform |
|
|
100
|
+
|
|
101
|
+
## Routes
|
|
102
|
+
|
|
103
|
+
All under `/_agent-native/integrations/`:
|
|
104
|
+
|
|
105
|
+
| Method | Path | Purpose |
|
|
106
|
+
| ------ | -------------------------- | ------------------------------------------------------------- |
|
|
107
|
+
| POST | `/:platform/webhook` | Platform pings this. Verifies, enqueues, returns 200 quickly. |
|
|
108
|
+
| POST | `/_process-task` | Self-webhook target. Claims a task and runs the agent loop. |
|
|
109
|
+
| GET | `/status` | All integrations status (settings UI). |
|
|
110
|
+
| GET | `/:platform/status` | One platform's status. |
|
|
111
|
+
| POST | `/:platform/enable` | Enable an integration. |
|
|
112
|
+
| POST | `/:platform/disable` | Disable an integration. |
|
|
113
|
+
| POST | `/:platform/setup` | Platform-specific setup (e.g. Telegram webhook registration). |
|
|
114
|
+
|
|
115
|
+
## SQL Schema
|
|
116
|
+
|
|
117
|
+
The pending-task queue lives in `integration_pending_tasks`:
|
|
118
|
+
|
|
119
|
+
```sql
|
|
120
|
+
CREATE TABLE IF NOT EXISTS integration_pending_tasks (
|
|
121
|
+
id TEXT PRIMARY KEY,
|
|
122
|
+
platform TEXT NOT NULL,
|
|
123
|
+
external_thread_id TEXT NOT NULL,
|
|
124
|
+
payload TEXT NOT NULL, -- JSON-serialized IncomingMessage
|
|
125
|
+
owner_email TEXT NOT NULL,
|
|
126
|
+
org_id TEXT,
|
|
127
|
+
status TEXT NOT NULL, -- pending | processing | completed | failed
|
|
128
|
+
attempts INTEGER NOT NULL DEFAULT 0,
|
|
129
|
+
error_message TEXT,
|
|
130
|
+
created_at INTEGER NOT NULL,
|
|
131
|
+
updated_at INTEGER NOT NULL,
|
|
132
|
+
completed_at INTEGER
|
|
133
|
+
);
|
|
134
|
+
CREATE INDEX IF NOT EXISTS idx_pending_tasks_status_created
|
|
135
|
+
ON integration_pending_tasks(status, created_at);
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
The store layer creates this lazily on first use via `ensureTable()` and uses
|
|
139
|
+
`intType()` from `db/client.ts` so it works on both SQLite and Postgres.
|
|
140
|
+
|
|
141
|
+
`claimPendingTask` is the critical concurrency primitive: it atomically flips
|
|
142
|
+
`pending` → `processing` and increments `attempts`, returning `null` if another
|
|
143
|
+
worker beat us to it. Both the initial fire-and-forget call and the retry job
|
|
144
|
+
funnel through the same processor endpoint, and `claimPendingTask` is what
|
|
145
|
+
prevents the same task from being processed twice.
|
|
146
|
+
|
|
147
|
+
## Adding a New Platform Adapter
|
|
148
|
+
|
|
149
|
+
1. **Implement `PlatformAdapter`** in `packages/core/src/integrations/adapters/<platform>.ts`:
|
|
150
|
+
|
|
151
|
+
```ts
|
|
152
|
+
export function myPlatformAdapter(): PlatformAdapter {
|
|
153
|
+
return {
|
|
154
|
+
platform: "myplatform",
|
|
155
|
+
label: "MyPlatform",
|
|
156
|
+
getRequiredEnvKeys: () => [
|
|
157
|
+
{ name: "MYPLATFORM_TOKEN", label: "MyPlatform Bot Token", scope: "global" },
|
|
158
|
+
],
|
|
159
|
+
async handleVerification(event) {
|
|
160
|
+
// Platform-specific challenge response, if any
|
|
161
|
+
return { handled: false };
|
|
162
|
+
},
|
|
163
|
+
async verifyWebhook(event) {
|
|
164
|
+
// HMAC / signing-secret check — return false on mismatch
|
|
165
|
+
return true;
|
|
166
|
+
},
|
|
167
|
+
async parseIncomingMessage(event) {
|
|
168
|
+
// Map raw payload → IncomingMessage, or null to ignore
|
|
169
|
+
return null;
|
|
170
|
+
},
|
|
171
|
+
async sendResponse(message, context) {
|
|
172
|
+
// POST back to the platform's API
|
|
173
|
+
},
|
|
174
|
+
formatAgentResponse(text) {
|
|
175
|
+
return { text, platformContext: {} };
|
|
176
|
+
},
|
|
177
|
+
async getStatus(baseUrl) {
|
|
178
|
+
return { platform: "myplatform", label: "MyPlatform", enabled: false, configured: false };
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
2. **Register it** in `getDefaultAdapters()` inside `plugin.ts`. The webhook,
|
|
185
|
+
queue, processor, and retry job are shared infrastructure — you do not
|
|
186
|
+
write any of that per-adapter.
|
|
187
|
+
|
|
188
|
+
3. **Declare required env keys** so the secrets/onboarding UI surfaces them.
|
|
189
|
+
See `secrets` and `onboarding` skills.
|
|
190
|
+
|
|
191
|
+
4. **Update the platform's webhook URL** to point at
|
|
192
|
+
`${baseUrl}/_agent-native/integrations/<platform>/webhook`. For platforms
|
|
193
|
+
with a registration API (Telegram), implement `POST /:platform/setup`.
|
|
194
|
+
|
|
195
|
+
The adapter is **only** responsible for:
|
|
196
|
+
|
|
197
|
+
- platform-specific verification (signatures, challenges)
|
|
198
|
+
- payload → `IncomingMessage` mapping
|
|
199
|
+
- agent text → platform format
|
|
200
|
+
- delivering the response back to the platform
|
|
201
|
+
|
|
202
|
+
It does **not** know about the queue, the processor, retries, or the agent
|
|
203
|
+
loop. Those are handled by the shared webhook handler.
|
|
204
|
+
|
|
205
|
+
## Long-Running Agent Work
|
|
206
|
+
|
|
207
|
+
The processor endpoint runs in a fresh function execution with its own full
|
|
208
|
+
timeout (typically 30–60s on Netlify/Vercel, longer on background-friendly
|
|
209
|
+
hosts). That budget is dedicated entirely to the agent loop — there is no
|
|
210
|
+
platform-side timer racing it.
|
|
211
|
+
|
|
212
|
+
If a single agent run might exceed the function timeout (large multi-step
|
|
213
|
+
plans, deep delegation chains), the agent should:
|
|
214
|
+
|
|
215
|
+
1. Send an interim acknowledgement back to the platform so the user knows the
|
|
216
|
+
request landed (`adapter.sendResponse({ text: "Working on it..." })`).
|
|
217
|
+
2. Persist intermediate state in chat-thread data, application state, or a
|
|
218
|
+
recurring job so the next invocation can pick up where this one left off.
|
|
219
|
+
|
|
220
|
+
The retry job will only re-fire tasks stuck in `processing` for over 5 minutes,
|
|
221
|
+
so a normal long-running reply is safe.
|
|
222
|
+
|
|
223
|
+
## Cross-Platform Considerations
|
|
224
|
+
|
|
225
|
+
- **No platform-specific background APIs.** No `waitUntil`, no
|
|
226
|
+
`-background.ts` filenames, no Vercel `after()`. The pattern works
|
|
227
|
+
identically on every host because it only uses `fetch()` and SQL.
|
|
228
|
+
- **No assumed runtime.** The processor endpoint is a normal H3 handler under
|
|
229
|
+
`/_agent-native/`. It runs wherever the rest of the framework runs.
|
|
230
|
+
- **No persistent in-memory state.** The dedup map in the webhook handler is
|
|
231
|
+
best-effort only; the SQL queue is the source of truth. Any cold start
|
|
232
|
+
loses the dedup map but the queue stays consistent.
|
|
233
|
+
- **Postgres + SQLite both supported.** `claimPendingTask` uses `RETURNING` on
|
|
234
|
+
Postgres and a re-read on SQLite. No platform-specific SQL.
|
|
235
|
+
- **Self-webhook URL resolution.** The processor URL is built from
|
|
236
|
+
`WEBHOOK_BASE_URL`, `APP_URL`, or `URL` env vars (with `localhost:3000` as
|
|
237
|
+
the dev fallback). Templates that change their public URL must keep one of
|
|
238
|
+
these set.
|
|
239
|
+
|
|
240
|
+
## Why Fire-and-Forget on Serverless Is Unreliable
|
|
241
|
+
|
|
242
|
+
Even though the webhook handler does `fetch(processorUrl, ...)` without
|
|
243
|
+
awaiting the response body, that initial dispatch is **not** guaranteed to
|
|
244
|
+
complete before the function freezes. In practice it usually does — the TCP
|
|
245
|
+
connect + write happens quickly — but the recurring retry job is the safety
|
|
246
|
+
net for the cases where:
|
|
247
|
+
|
|
248
|
+
- The serverless platform froze the handler before the outbound `fetch`
|
|
249
|
+
flushed its bytes.
|
|
250
|
+
- The processor function 502'd or cold-started slow enough to time out.
|
|
251
|
+
- The processor itself was killed mid-agent-loop (function timeout, container
|
|
252
|
+
shutdown, deploy mid-run).
|
|
253
|
+
|
|
254
|
+
Tasks stuck in `pending` for >90s or `processing` for >5min get re-fired up to
|
|
255
|
+
3 times. After 3 attempts they're marked `failed` permanently so we stop
|
|
256
|
+
spamming the processor.
|
|
257
|
+
|
|
258
|
+
**Never assume the initial fire-and-forget succeeded.** Always rely on the
|
|
259
|
+
queue + retry job for at-least-once delivery.
|
|
260
|
+
|
|
261
|
+
## Debugging Checklist
|
|
262
|
+
|
|
263
|
+
1. **Platform sent the webhook?** Check the platform's delivery logs (Slack
|
|
264
|
+
admin, Telegram `getWebhookInfo`).
|
|
265
|
+
2. **Webhook handler returned 200?** If not, the platform retries — look for
|
|
266
|
+
duplicate task rows. Signature failures return 401.
|
|
267
|
+
3. **Task in the queue?** `SELECT * FROM integration_pending_tasks WHERE
|
|
268
|
+
external_thread_id = '...' ORDER BY created_at DESC LIMIT 5`.
|
|
269
|
+
4. **Status?** `pending` means the processor never picked it up — check that
|
|
270
|
+
`_process-task` is reachable from the box itself (the self-fetch must work
|
|
271
|
+
over the public URL). `processing` for over 5 minutes means the processor
|
|
272
|
+
died mid-run — the retry job will pick it up.
|
|
273
|
+
5. **Failed?** Check `error_message` and `attempts`. After 3 attempts the row
|
|
274
|
+
is parked at `failed` and won't be retried.
|
|
275
|
+
6. **Reply not delivered?** The processor likely succeeded but
|
|
276
|
+
`adapter.sendResponse` failed — check the adapter's outbound logs.
|
|
277
|
+
|
|
278
|
+
## Related Skills
|
|
279
|
+
|
|
280
|
+
- `server-plugins` — How `/_agent-native/` routes get mounted
|
|
281
|
+
- `recurring-jobs` — Pattern the retry job follows
|
|
282
|
+
- `actions` — When to use an action vs a webhook
|
|
283
|
+
- `secrets` — Registering platform tokens
|
|
284
|
+
- `onboarding` — Surfacing setup steps for each platform
|
|
285
|
+
- `delegate-to-agent` — How the processor invokes the agent loop
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: observability
|
|
3
|
+
description: >-
|
|
4
|
+
Agent observability, evals, feedback, and experiments. Use when adding
|
|
5
|
+
observability dashboards, configuring trace capture, setting up evals,
|
|
6
|
+
creating A/B experiments, or collecting user feedback on agent responses.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Agent Observability
|
|
10
|
+
|
|
11
|
+
## Rule
|
|
12
|
+
|
|
13
|
+
The observability system auto-instruments every agent run with zero configuration. Traces, automated evals, and feedback collection work out of the box. All data lives in the app's own SQL database — no external services required. Templates can optionally export to Langfuse, Datadog, or any OTel-compatible platform.
|
|
14
|
+
|
|
15
|
+
## Five Pillars
|
|
16
|
+
|
|
17
|
+
### 1. Traces
|
|
18
|
+
|
|
19
|
+
Every `runAgentLoop()` call is automatically instrumented via `instrumentAgentLoop()` in `packages/core/src/observability/traces.ts`. It captures:
|
|
20
|
+
|
|
21
|
+
- **agent_run** span — top-level parent with total duration and cost
|
|
22
|
+
- **llm_call** span — model name, token counts (input, output, cache read/write), cost
|
|
23
|
+
- **tool_call** spans — one per action invocation, with duration and success/error
|
|
24
|
+
|
|
25
|
+
Content (prompts, tool args, tool results) is **redacted by default**. Opt in via the `observability-config` settings key:
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
await putSetting("observability-config", {
|
|
29
|
+
enabled: true,
|
|
30
|
+
capturePrompts: false,
|
|
31
|
+
captureToolArgs: true, // capture action input args
|
|
32
|
+
captureToolResults: false,
|
|
33
|
+
evalSampleRate: 0.05, // 5% of runs get LLM-as-judge eval
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### 2. Feedback
|
|
38
|
+
|
|
39
|
+
**Explicit** — `ThumbsFeedback` component renders inline thumbs up/down on every agent message in the chat UI. Thumbs down opens a category popover (Inaccurate, Not helpful, Wrong tool, Too slow). Already wired into `AssistantChat.tsx` via `React.lazy`.
|
|
40
|
+
|
|
41
|
+
**Implicit** — `computeSatisfactionScore(threadId)` computes a Frustration Index (0-100) from conversation signals:
|
|
42
|
+
- Rephrasing detection (weight 30): consecutive similar user messages
|
|
43
|
+
- Abandonment (weight 20): session ends shortly after agent response
|
|
44
|
+
- Sentiment (weight 15): negative language patterns
|
|
45
|
+
- Length trend (weight 15): declining message lengths
|
|
46
|
+
- Retry patterns (weight 20): "try again", "no that's wrong"
|
|
47
|
+
|
|
48
|
+
Score interpretation: 0-20 healthy, 20-40 friction, 40-60 dissatisfied, 60+ broken.
|
|
49
|
+
|
|
50
|
+
Satisfaction scoring fires automatically after each feedback POST with a threadId.
|
|
51
|
+
|
|
52
|
+
### 3. Evals
|
|
53
|
+
|
|
54
|
+
Three layers, configured via `evalSampleRate` in the observability config:
|
|
55
|
+
|
|
56
|
+
**Automated (every run):** Deterministic scorers that run after every traced run:
|
|
57
|
+
- `tool_success_rate` — % of tool calls without errors
|
|
58
|
+
- `step_efficiency` — 1.0 for no-tool runs; penalizes excessive LLM iterations for tool-using runs
|
|
59
|
+
- `latency_score` — normalized against 10s/tool baseline
|
|
60
|
+
- `cost_efficiency` — normalized against 50 centicents/tool baseline
|
|
61
|
+
- `error_recovery` — 1.0 if the run recovered from tool errors or had none
|
|
62
|
+
|
|
63
|
+
**LLM-as-judge (sampled):** Runs on `evalSampleRate` fraction of runs. Calls the configured engine with a judge prompt that scores against custom criteria.
|
|
64
|
+
|
|
65
|
+
**Dataset evaluation:** `runDatasetEval(datasetId)` runs a golden dataset through the agent and scores each case.
|
|
66
|
+
|
|
67
|
+
Custom criteria use natural language rubrics:
|
|
68
|
+
```ts
|
|
69
|
+
const criteria: EvalCriteria = {
|
|
70
|
+
name: "helpfulness",
|
|
71
|
+
description: "Was the response helpful and complete?",
|
|
72
|
+
rubric: "0.0 = completely unhelpful, 0.5 = partially helpful, 1.0 = fully resolved the user's need",
|
|
73
|
+
};
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### 4. Experiments
|
|
77
|
+
|
|
78
|
+
A/B testing with sticky user-level assignment:
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
import { createExperiment, startExperiment } from "@agent-native/core/observability";
|
|
82
|
+
|
|
83
|
+
const exp = await createExperiment({
|
|
84
|
+
name: "sonnet-vs-haiku",
|
|
85
|
+
variants: [
|
|
86
|
+
{ id: "control", weight: 50, config: { model: "claude-sonnet-4-6" } },
|
|
87
|
+
{ id: "treatment", weight: 50, config: { model: "claude-haiku-4-5-20251001" } },
|
|
88
|
+
],
|
|
89
|
+
metrics: ["cost", "latency", "satisfaction"],
|
|
90
|
+
});
|
|
91
|
+
await startExperiment(exp.id);
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
The agent loop reads active experiments via `resolveActiveExperimentConfig()` and applies the variant's `model` override automatically. Assignment uses consistent hashing — same user always gets the same variant.
|
|
95
|
+
|
|
96
|
+
Compute results with `POST /_agent-native/observability/experiments/:id/results`.
|
|
97
|
+
|
|
98
|
+
### 5. Dashboard
|
|
99
|
+
|
|
100
|
+
`ObservabilityDashboard` is a React component with 5 tabs:
|
|
101
|
+
- **Overview** — metric cards (runs, cost, latency, tool success, thumbs up rate, eval score)
|
|
102
|
+
- **Conversations** — trace list with drill-down to span detail
|
|
103
|
+
- **Evals** — eval stats and criteria breakdown bars
|
|
104
|
+
- **Experiments** — experiment list with status badges, drill-down to results
|
|
105
|
+
- **Feedback** — feedback stream, thumbs ratio, category badges
|
|
106
|
+
|
|
107
|
+
Add a dashboard route to any template:
|
|
108
|
+
```tsx
|
|
109
|
+
// app/routes/observability.tsx
|
|
110
|
+
import { ObservabilityDashboard } from "@agent-native/core/client";
|
|
111
|
+
|
|
112
|
+
export default function ObservabilityPage() {
|
|
113
|
+
return (
|
|
114
|
+
<div className="min-h-screen bg-background p-6">
|
|
115
|
+
<ObservabilityDashboard />
|
|
116
|
+
</div>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## API Endpoints
|
|
122
|
+
|
|
123
|
+
All auto-mounted at `/_agent-native/observability/*`:
|
|
124
|
+
|
|
125
|
+
| Method | Path | Purpose |
|
|
126
|
+
|--------|------|---------|
|
|
127
|
+
| GET | `/` | Overview stats |
|
|
128
|
+
| GET | `/traces` | List trace summaries |
|
|
129
|
+
| GET | `/traces/:runId` | Trace detail (summary + spans) |
|
|
130
|
+
| GET | `/traces/:runId/evals` | Evals for a run |
|
|
131
|
+
| POST | `/feedback` | Submit feedback |
|
|
132
|
+
| GET | `/feedback` | List feedback entries |
|
|
133
|
+
| GET | `/feedback/stats` | Feedback aggregation |
|
|
134
|
+
| GET | `/satisfaction` | Satisfaction scores |
|
|
135
|
+
| GET | `/evals/stats` | Eval statistics |
|
|
136
|
+
| POST | `/experiments` | Create experiment |
|
|
137
|
+
| GET | `/experiments` | List experiments |
|
|
138
|
+
| GET | `/experiments/:id` | Experiment detail |
|
|
139
|
+
| PUT | `/experiments/:id` | Update experiment status |
|
|
140
|
+
| POST | `/experiments/:id/results` | Compute experiment results |
|
|
141
|
+
| GET | `/experiments/:id/results` | Get experiment results |
|
|
142
|
+
|
|
143
|
+
All endpoints support `?since=N` (ms timestamp) and `?limit=N` query params.
|
|
144
|
+
|
|
145
|
+
## SQL Tables
|
|
146
|
+
|
|
147
|
+
9 tables created automatically via `ensureObservabilityTables()`:
|
|
148
|
+
- `agent_trace_spans` — individual trace spans
|
|
149
|
+
- `agent_trace_summaries` — aggregated run summaries
|
|
150
|
+
- `agent_feedback` — explicit user feedback
|
|
151
|
+
- `agent_satisfaction_scores` — computed frustration index
|
|
152
|
+
- `agent_evals` — evaluation results
|
|
153
|
+
- `agent_eval_datasets` — golden test datasets
|
|
154
|
+
- `agent_experiments` — experiment definitions
|
|
155
|
+
- `agent_experiment_assignments` — user → variant assignments
|
|
156
|
+
- `agent_experiment_results` — computed metric results
|
|
157
|
+
|
|
158
|
+
All tables are dialect-agnostic (SQLite + Postgres) and strictly additive.
|
|
159
|
+
|
|
160
|
+
## Key Files
|
|
161
|
+
|
|
162
|
+
| File | Purpose |
|
|
163
|
+
|------|---------|
|
|
164
|
+
| `packages/core/src/observability/types.ts` | Shared type definitions |
|
|
165
|
+
| `packages/core/src/observability/store.ts` | SQL tables + CRUD |
|
|
166
|
+
| `packages/core/src/observability/traces.ts` | Auto-instrumentation |
|
|
167
|
+
| `packages/core/src/observability/feedback.ts` | Feedback + Frustration Index |
|
|
168
|
+
| `packages/core/src/observability/evals.ts` | Eval engine (3 layers) |
|
|
169
|
+
| `packages/core/src/observability/experiments.ts` | A/B testing system |
|
|
170
|
+
| `packages/core/src/observability/routes.ts` | HTTP API handlers |
|
|
171
|
+
| `packages/core/src/client/observability/ObservabilityDashboard.tsx` | Admin dashboard |
|
|
172
|
+
| `packages/core/src/client/observability/ThumbsFeedback.tsx` | Inline feedback buttons |
|
|
173
|
+
| `packages/core/src/client/observability/useObservability.ts` | React Query hooks |
|
|
174
|
+
|
|
175
|
+
## Export to External Platforms
|
|
176
|
+
|
|
177
|
+
Configure OTLP export in the observability settings:
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
await putSetting("observability-config", {
|
|
181
|
+
enabled: true,
|
|
182
|
+
exporters: [
|
|
183
|
+
{
|
|
184
|
+
type: "otlp",
|
|
185
|
+
endpoint: "https://cloud.langfuse.com/api/public/otel",
|
|
186
|
+
headers: { Authorization: "Bearer ..." },
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
});
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
The framework emits `gen_ai.*` semantic convention spans compatible with Langfuse, Datadog, Grafana, New Relic, and any OTel-compatible backend.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: onboarding
|
|
3
|
+
description: >-
|
|
4
|
+
How to register user-facing setup steps (API keys, OAuth, connecting
|
|
5
|
+
third-party services) for the sidebar setup checklist. Use when adding a
|
|
6
|
+
feature that needs initial user configuration.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Onboarding Steps
|
|
10
|
+
|
|
11
|
+
## Rule
|
|
12
|
+
|
|
13
|
+
If a feature requires user-facing setup (API keys, OAuth, connecting a third-party service), register an onboarding step so it appears in the agent sidebar's setup checklist.
|
|
14
|
+
|
|
15
|
+
## Registering a Step
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { registerOnboardingStep } from "@agent-native/core/onboarding";
|
|
19
|
+
|
|
20
|
+
registerOnboardingStep({
|
|
21
|
+
id: "gmail",
|
|
22
|
+
order: 100,
|
|
23
|
+
title: "Connect Gmail",
|
|
24
|
+
description: "Grant read/send access.",
|
|
25
|
+
methods: [
|
|
26
|
+
{
|
|
27
|
+
id: "oauth",
|
|
28
|
+
kind: "link",
|
|
29
|
+
primary: true,
|
|
30
|
+
label: "Sign in with Google",
|
|
31
|
+
payload: { url: "/_agent-native/google/auth-url" },
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
isComplete: () => !!process.env.GMAIL_REFRESH_TOKEN,
|
|
35
|
+
});
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
See `packages/core/docs/content/onboarding.md` for method kinds and built-in steps.
|
|
39
|
+
|
|
40
|
+
## Related Skills
|
|
41
|
+
|
|
42
|
+
- `adding-a-feature` — The four-area checklist; onboarding is often part of a new integration
|
|
43
|
+
- `authentication` — Most onboarding steps involve OAuth or credentials
|