@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,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: adding-a-feature
|
|
3
|
+
description: >-
|
|
4
|
+
The four-area checklist every new feature must complete. Use when adding any
|
|
5
|
+
feature, integration, or capability to ensure the agent and UI stay in parity.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Adding a Feature — The Four-Area Checklist
|
|
9
|
+
|
|
10
|
+
## Rule
|
|
11
|
+
|
|
12
|
+
Every new feature MUST update all four areas. Skipping any one breaks the agent-native contract — the agent and UI must always be equal partners.
|
|
13
|
+
|
|
14
|
+
## Why
|
|
15
|
+
|
|
16
|
+
Agent-native apps are defined by parity: everything the UI can do, the agent can do, and vice versa. A feature that only has UI is invisible to the agent. A feature that only has scripts is invisible to the user. A feature without app-state sync means the agent is blind to what the user is doing.
|
|
17
|
+
|
|
18
|
+
## The Checklist
|
|
19
|
+
|
|
20
|
+
When you add a new feature, work through these four areas in order:
|
|
21
|
+
|
|
22
|
+
### 1. UI Component
|
|
23
|
+
|
|
24
|
+
Build the user-facing interface — a page, component, dialog, or route. Use `useActionQuery` and `useActionMutation` from `@agent-native/core/client` to call actions for data fetching and mutations — you rarely need custom `/api/` routes.
|
|
25
|
+
|
|
26
|
+
**Auto-refresh on agent writes is non-negotiable** — when the agent mutates data, the UI must reflect the change without a manual refresh. There are two paths, and you must pick the right one:
|
|
27
|
+
|
|
28
|
+
- **`useActionQuery` / `useActionMutation`** — covered automatically. The framework's `useDbSync` invalidates `["action"]` on every change event, so every `useActionQuery` hook refetches on agent activity. No extra wiring required. **Prefer this path.**
|
|
29
|
+
- **Raw `useQuery` with custom keys** — needs explicit wiring. Fold `useChangeVersions([<source>, "action"])` from `@agent-native/core/client` into the `queryKey` and set `placeholderData: (prev) => prev`. The `action` source is the reliable signal (the agent runner emits it after every successful tool call); the resource-specific source (`"dashboards"`, `"analyses"`, `"settings"`, etc.) is bonus when emitted. Without this wiring, agent writes will be invisible until manual refresh — that breaks the framework's #1 promise.
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { useChangeVersions } from "@agent-native/core/client";
|
|
33
|
+
import { useQuery } from "@tanstack/react-query";
|
|
34
|
+
|
|
35
|
+
const v = useChangeVersions(["dashboards", "action"]);
|
|
36
|
+
useQuery({
|
|
37
|
+
queryKey: ["dashboard", id, v],
|
|
38
|
+
queryFn: () => fetchDashboard(id),
|
|
39
|
+
placeholderData: (prev) => prev, // no flicker on refetch
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
See the `real-time-sync` skill for the full pattern and source catalog.
|
|
44
|
+
|
|
45
|
+
### 2. Action
|
|
46
|
+
|
|
47
|
+
Create an action in `actions/` using `defineAction`. This serves double duty: the agent calls it as a tool, and the framework auto-exposes it as an HTTP endpoint at `/_agent-native/actions/:name` for the UI to call. Set `http: { method: "GET" }` for read actions, leave default for writes, or set `http: false` for agent-only actions like `navigate` and `view-screen`.
|
|
48
|
+
|
|
49
|
+
### 3. Skills / Instructions
|
|
50
|
+
|
|
51
|
+
Update `AGENTS.md` and/or create a skill in `.agents/skills/` if the feature introduces patterns the agent needs to know. At minimum, add the new actions to the action table in the template's `AGENTS.md`.
|
|
52
|
+
|
|
53
|
+
### 4. Application State Sync
|
|
54
|
+
|
|
55
|
+
Expose navigation and selection state so the agent knows what the user is looking at. Write to the `navigation` app-state key on route changes. Update the `view-screen` action to fetch relevant data for the new feature. Add a `navigate` command if the agent needs to open the new view.
|
|
56
|
+
|
|
57
|
+
## Examples
|
|
58
|
+
|
|
59
|
+
### Adding "compose email" to a mail app
|
|
60
|
+
|
|
61
|
+
| Area | What to build |
|
|
62
|
+
| --------------- | ---------------------------------------------------------------------------------------- |
|
|
63
|
+
| UI | Compose panel with tabs, to/cc/bcc fields, body editor. Use `useActionQuery`/`useActionMutation` for data. |
|
|
64
|
+
| Action | `manage-draft` action (create/update/delete drafts), `send-email` action |
|
|
65
|
+
| Skills/AGENTS | Document compose state shape, draft lifecycle, action args in AGENTS.md |
|
|
66
|
+
| App-state sync | `compose-{id}` keys for each draft tab, `navigation` includes compose state |
|
|
67
|
+
|
|
68
|
+
### Adding "create form" to a forms app
|
|
69
|
+
|
|
70
|
+
| Area | What to build |
|
|
71
|
+
| --------------- | ---------------------------------------------------------------------------------------- |
|
|
72
|
+
| UI | Form builder page with drag-and-drop fields, preview, settings. Use `useActionQuery` for lists. |
|
|
73
|
+
| Action | `create-form` action, `update-form` action, `list-forms` action (GET) |
|
|
74
|
+
| Skills/AGENTS | Document form schema shape, field types, validation rules in AGENTS.md |
|
|
75
|
+
| App-state sync | `navigation` includes `{ view: "form-builder", formId: "..." }`, `view-screen` fetches form data |
|
|
76
|
+
|
|
77
|
+
### Adding "chart type" to an analytics app
|
|
78
|
+
|
|
79
|
+
| Area | What to build |
|
|
80
|
+
| --------------- | ---------------------------------------------------------------------------------------- |
|
|
81
|
+
| UI | New chart component, chart type selector in dashboard |
|
|
82
|
+
| Action | `create-chart` or `update-dashboard` action that sets chart type and config |
|
|
83
|
+
| Skills/AGENTS | Document supported chart types, config options, data requirements |
|
|
84
|
+
| App-state sync | `navigation` includes selected chart/dashboard, `view-screen` returns chart config |
|
|
85
|
+
|
|
86
|
+
## Adding a new route
|
|
87
|
+
|
|
88
|
+
Templates are single-page apps with client-side routing. The app shell (AgentSidebar + top-level nav) MUST persist across navigation — it is mounted once, either in `root.tsx` around `<Outlet />` or via a pathless `_app.tsx` layout route that all authed routes nest under.
|
|
89
|
+
|
|
90
|
+
**Never wrap each new route in its own `<AppLayout>` / `<Layout>`.** That causes React to unmount the entire app shell on every navigation, reloading the agent sidebar and destroying in-progress work.
|
|
91
|
+
|
|
92
|
+
- If the template has `<AppLayout>` in `root.tsx` — just render page content in your new route file, nothing else.
|
|
93
|
+
- If the template has `app/routes/_app.tsx` (pathless layout) — name your new route `_app.<segment>.tsx` to inherit the shell, or bare `<segment>.tsx` for public routes that should NOT have the shell.
|
|
94
|
+
- If a page needs per-route data (e.g. highlighting the active item in the sidebar), read it in the layout from `useParams()` / `useLocation()`. Don't pass it as a prop through every route file.
|
|
95
|
+
|
|
96
|
+
See the "Client-Side Routing" section in the root `CLAUDE.md` for full details.
|
|
97
|
+
|
|
98
|
+
## Anti-Patterns
|
|
99
|
+
|
|
100
|
+
- **Per-route `<AppLayout>` wrappers** — Every route file wraps its content in `<AppLayout>` or `<Layout>`. React sees a different component at the outlet on each nav and unmounts the whole shell, causing the agent sidebar to reload on every click. Mount the shell once above `<Outlet />` (root.tsx or `_app.tsx` pathless layout).
|
|
101
|
+
- **UI without actions** — The user can create forms but the agent cannot. The agent says "I don't have access to that" when it should be able to do it.
|
|
102
|
+
- **Actions without AGENTS.md** — The actions exist but the agent doesn't know about them because they're not documented. The agent reinvents solutions instead of using the actions.
|
|
103
|
+
- **Duplicate API routes** — Creating `/api/` routes for operations that actions already handle. Actions are auto-exposed as HTTP endpoints — use `useActionQuery`/`useActionMutation` instead.
|
|
104
|
+
- **Features without app-state** — The agent cannot see that the user is looking at a specific form, email, or chart. It asks "which one?" instead of acting on the current selection.
|
|
105
|
+
- **Actions without UI** — The agent can do something the user cannot. This is less common but still breaks parity.
|
|
106
|
+
|
|
107
|
+
## Verification
|
|
108
|
+
|
|
109
|
+
After completing all four areas, verify:
|
|
110
|
+
|
|
111
|
+
1. Can the user perform the operation from the UI?
|
|
112
|
+
2. Can the agent perform the same operation via actions?
|
|
113
|
+
3. Does `pnpm action view-screen` show the relevant state when the user is using the feature?
|
|
114
|
+
4. Can the agent navigate to the feature view via the `navigate` action?
|
|
115
|
+
5. Is the feature documented in AGENTS.md with action names and args?
|
|
116
|
+
|
|
117
|
+
## One more area — sharing
|
|
118
|
+
|
|
119
|
+
If the feature stores **user-authored resources** (documents, dashboards, forms, decks, etc.), make them ownable so they get private-by-default semantics and a share dialog for free. See the `sharing` skill.
|
|
120
|
+
|
|
121
|
+
TL;DR: spread `ownableColumns()` into the resource table, pair it with `createSharesTable(...)`, call `registerShareableResource(...)`, wrap list/read queries with `accessFilter`, guard writes with `assertAccess`, and drop `<ShareButton>` in the resource header. The `share-resource`, `unshare-resource`, `list-resource-shares`, and `set-resource-visibility` actions are auto-mounted framework-wide.
|
|
122
|
+
|
|
123
|
+
## Related Skills
|
|
124
|
+
|
|
125
|
+
- **sharing** — How to make a new resource ownable (private by default, share with users/orgs/public)
|
|
126
|
+
- **context-awareness** — How to expose UI state to the agent (area 4 in detail)
|
|
127
|
+
- **actions** — How to create actions with `defineAction` and the `http` option (area 2 in detail)
|
|
128
|
+
- **create-skill** — How to create skills for new patterns (area 3 in detail)
|
|
129
|
+
- **storing-data** — Where to store the feature's data
|
|
130
|
+
- **real-time-sync** — How the UI stays in sync when the agent writes data
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: address-feedback
|
|
3
|
+
description: >-
|
|
4
|
+
Triage feedback docs or pasted feedback into bugs to fix, UX suggestions to
|
|
5
|
+
propose, unclear questions, and skipped noise; verify bugs, check Sentry when
|
|
6
|
+
relevant, and keep UI changes minimal.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Address Feedback
|
|
10
|
+
|
|
11
|
+
Use this skill when the user shares a feedback document, issue, thread, or pasted notes and asks you to address the feedback.
|
|
12
|
+
|
|
13
|
+
The default posture is judgment plus action: fix clear, verified bugs you agree with; propose UX changes with rationale; skip or flag low-signal, unclear, or out-of-scope items.
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
- If no link or feedback text is provided, ask for it.
|
|
18
|
+
- Read the repo `AGENTS.md` before touching code.
|
|
19
|
+
- Use the relevant connector/plugin/skill for the source when available, instead of scraping authenticated pages.
|
|
20
|
+
|
|
21
|
+
## Steps
|
|
22
|
+
|
|
23
|
+
1. Read the feedback source.
|
|
24
|
+
|
|
25
|
+
| Source | Reader |
|
|
26
|
+
| --- | --- |
|
|
27
|
+
| Notion link | Notion connector or Notion skill |
|
|
28
|
+
| Google Docs/Drive link | Google Drive connector or Google Docs skill |
|
|
29
|
+
| Linear link | Linear connector if installed; otherwise ask for pasted content |
|
|
30
|
+
| GitHub issue or PR | GitHub connector or `gh issue view` / `gh pr view` |
|
|
31
|
+
| Slack thread | Slack connector |
|
|
32
|
+
| Public URL | Web browsing |
|
|
33
|
+
| Pasted text | Read directly |
|
|
34
|
+
|
|
35
|
+
Use web browsing only for public URLs. Auth-gated docs usually need their matching connector.
|
|
36
|
+
|
|
37
|
+
2. Categorize every actionable item.
|
|
38
|
+
|
|
39
|
+
- **Bug**: Broken behavior, crash, wrong data, dead link, package/API mismatch, or captured exception. Verify and fix when you agree.
|
|
40
|
+
- **UX suggestion**: Design, discoverability, workflow, or feature feedback. Propose the cleanest version first unless the user explicitly asked you to implement UX changes.
|
|
41
|
+
- **Question or unclear**: Missing detail, contradictory feedback, or behavior you cannot inspect. Ask or flag it.
|
|
42
|
+
- **Out of scope**: Outside this repo, already shipped, intentionally unsupported, or too low-signal. Note briefly and skip.
|
|
43
|
+
|
|
44
|
+
3. Check Sentry when the feedback smells like an error.
|
|
45
|
+
|
|
46
|
+
- Use the Sentry skill/plugin if available, or the repo's Sentry scripts if documented.
|
|
47
|
+
- Search by route, stack symbol, error text, and symptom keywords.
|
|
48
|
+
- Default org is `builder-io` unless the user specifies another.
|
|
49
|
+
- Cite issue IDs or links when you find a match.
|
|
50
|
+
- If nothing matches, say that plainly.
|
|
51
|
+
|
|
52
|
+
4. Fix only the clear bugs you agree with.
|
|
53
|
+
|
|
54
|
+
- Verify before fixing: reproduce locally, read the relevant code, inspect logs, or confirm with a stack trace.
|
|
55
|
+
- Keep each fix narrow and mapped to a feedback item.
|
|
56
|
+
- Follow existing project conventions and nearby patterns.
|
|
57
|
+
- Do not switch branches, stash, reset, force-push, or open a PR unless the user asks.
|
|
58
|
+
- Add or update focused tests when the bug risk warrants it.
|
|
59
|
+
|
|
60
|
+
5. Treat UX feedback with restraint.
|
|
61
|
+
|
|
62
|
+
Do not solve UX problems by adding more visible controls, helper text, banners, top-level nav, or always-open panels by default. Prefer cleaner interaction models:
|
|
63
|
+
|
|
64
|
+
- Make the existing primary action more discoverable.
|
|
65
|
+
- Remove competing elements so the right action stands out.
|
|
66
|
+
- Move secondary actions into `DropdownMenu`, `Popover`, `Sheet`, `Collapsible`, or tabs.
|
|
67
|
+
- Improve empty states around one clear action.
|
|
68
|
+
- Use progressive disclosure for optional or advanced controls.
|
|
69
|
+
|
|
70
|
+
When proposing a UX change, write it as: what to change, why it helps, and the tradeoff. Keep each proposal short.
|
|
71
|
+
|
|
72
|
+
6. Verify changed behavior.
|
|
73
|
+
|
|
74
|
+
- Run the smallest relevant test or typecheck command.
|
|
75
|
+
- For UI fixes, verify in a browser when feasible and inspect the actual screen.
|
|
76
|
+
- If you cannot run a useful verification, say why.
|
|
77
|
+
|
|
78
|
+
## Report Format
|
|
79
|
+
|
|
80
|
+
Keep the final report short:
|
|
81
|
+
|
|
82
|
+
```md
|
|
83
|
+
## Bugs Fixed
|
|
84
|
+
- [feedback item] - [what changed, file:line]
|
|
85
|
+
|
|
86
|
+
## Bugs Flagged But Not Fixed
|
|
87
|
+
- [feedback item] - [why]
|
|
88
|
+
|
|
89
|
+
## UX Suggestions
|
|
90
|
+
- [feedback item] -> [proposed change]
|
|
91
|
+
|
|
92
|
+
## Skipped
|
|
93
|
+
- [feedback item] - [reason]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Only include sections that have content. The user can read the diff; do not write a second feedback document.
|
|
97
|
+
|
|
98
|
+
## Avoid
|
|
99
|
+
|
|
100
|
+
- Do not agree with every suggestion by default.
|
|
101
|
+
- Do not bundle unrelated cleanups.
|
|
102
|
+
- Do not implement UX changes that make an important screen busier without explicit user approval.
|
|
103
|
+
- Do not claim a UI change is done without browser verification when a local app can be run.
|
|
104
|
+
- Do not invent Sentry matches, affected users, or reproduction steps.
|
|
105
|
+
|
|
106
|
+
## Related Skills
|
|
107
|
+
|
|
108
|
+
- `github:gh-address-comments` for GitHub PR review threads.
|
|
109
|
+
- `github:gh-fix-ci` for failing GitHub checks.
|
|
110
|
+
- `sentry:sentry` for production error investigation.
|
|
111
|
+
- `frontend-design` for approved UI implementation work.
|
|
112
|
+
- `qa` for broader browser verification.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: authentication
|
|
3
|
+
description: >-
|
|
4
|
+
How auth works in agent-native apps. Use when wiring login/signup,
|
|
5
|
+
configuring auth modes, setting up organizations, protecting routes, or
|
|
6
|
+
debugging session issues.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Authentication
|
|
10
|
+
|
|
11
|
+
## Rule
|
|
12
|
+
|
|
13
|
+
Auth is powered by **Better Auth** with account-first design. Every new user creates an account on first visit. Use `getSession(event)` to authenticate custom routes; actions are auto-protected.
|
|
14
|
+
|
|
15
|
+
## Auth Modes
|
|
16
|
+
|
|
17
|
+
| Mode | Behavior |
|
|
18
|
+
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| **Development (default)** | Auth is automatically bypassed. `getSession()` falls back to `{ email: "local@localhost" }` when nothing else succeeds. No config. |
|
|
20
|
+
| **Production (default)** | Better Auth with email/password + social providers (Google, GitHub). Organizations built in. |
|
|
21
|
+
| **`AUTH_MODE=local`** | Explicit escape hatch. `getSession()` always returns `{ email: "local@localhost" }`. Set via `.env` or the onboarding page's "Use locally" button. |
|
|
22
|
+
| **`AUTH_SKIP_EMAIL_VERIFICATION=1`** | QA/preview escape hatch for real email/password accounts. Signup skips email verification and does not send the signup verification email. Local dev/test skips verification by default; set `AUTH_SKIP_EMAIL_VERIFICATION=0` only when testing verification itself. Use `+qa` emails for test accounts. |
|
|
23
|
+
| **`ACCESS_TOKEN` / `ACCESS_TOKENS`** | Simple token-based auth for production deployments. |
|
|
24
|
+
| **`AUTH_DISABLED=true`** | Skip auth entirely (for apps behind infrastructure-level auth like Cloudflare Access). |
|
|
25
|
+
| **Custom** | Pass your own `getSession` to `autoMountAuth(app, { getSession })`. |
|
|
26
|
+
|
|
27
|
+
## Local → Real Account Migration
|
|
28
|
+
|
|
29
|
+
Upgrading from `local@localhost` to a real account preserves SQL-backed workspace data. The built-in migration moves `application_state`, user-scoped `settings`, `oauth_tokens`, and any template table that uses `owner_email`.
|
|
30
|
+
|
|
31
|
+
Templates with legacy global settings can provide `POST /api/local-migration` for one-time re-homing during the upgrade flow.
|
|
32
|
+
|
|
33
|
+
## Organizations
|
|
34
|
+
|
|
35
|
+
Better Auth's organization plugin is built in. Every app supports creating orgs, inviting members, and role-based access (owner/admin/member).
|
|
36
|
+
|
|
37
|
+
The active org flows automatically: `session.orgId` → `AGENT_ORG_ID` → SQL scoping (see `security` skill).
|
|
38
|
+
|
|
39
|
+
**If your template requires an org to function** (data is scoped by `organization_id`, core features can't run without one), set `AUTO_CREATE_DEFAULT_ORG=1` in your `.env`. The framework will auto-create a default org (named after the user) on first login when no memberships exist. This happens inside `getOrgContext` — no template integration needed.
|
|
40
|
+
|
|
41
|
+
As a safety net, also wrap your app shell in `<RequireActiveOrg>` from `@agent-native/core/client/org`. It blocks the wrapped area with a "Create your organization" pane (and accept-invite CTAs for pending invitations) if auto-create failed or the account predates it. Place it **inside** the agent sidebar so the setup checklist, chat, and CLI stay usable during setup.
|
|
42
|
+
|
|
43
|
+
## A2A Identity
|
|
44
|
+
|
|
45
|
+
Set `A2A_SECRET` (same value) on all apps that must verify each other's identity.
|
|
46
|
+
|
|
47
|
+
- Outbound A2A calls are signed with JWTs
|
|
48
|
+
- Inbound calls are verified cryptographically
|
|
49
|
+
- Without `A2A_SECRET`, A2A calls are unauthenticated (fine for local dev)
|
|
50
|
+
|
|
51
|
+
## Builder Browser Access
|
|
52
|
+
|
|
53
|
+
Apps can connect to Builder via the `cli-auth` flow and persist shared browser credentials in `.env`. Agents then use the built-in `get-browser-connection` tool to provision a real browser session via AI Services.
|
|
54
|
+
|
|
55
|
+
## Protecting Custom Routes
|
|
56
|
+
|
|
57
|
+
Actions are auto-protected. For custom `/api/` routes:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import { getSession } from "@agent-native/core/server";
|
|
61
|
+
|
|
62
|
+
export default defineEventHandler(async (event) => {
|
|
63
|
+
const session = await getSession(event);
|
|
64
|
+
if (!session) throw createError({ statusCode: 401 });
|
|
65
|
+
// ...
|
|
66
|
+
});
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Never create unprotected routes that modify data.
|
|
70
|
+
|
|
71
|
+
## Sign-In from a Public Page
|
|
72
|
+
|
|
73
|
+
For public pages (share links, embeds, marketing pages) that need anonymous viewers to sign in and return to where they were, navigate them through the framework's sign-in entry point — never roll your own:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
const ret = window.location.pathname + window.location.search;
|
|
77
|
+
window.location.href =
|
|
78
|
+
"/_agent-native/sign-in?return=" + encodeURIComponent(ret);
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
After successful sign-in (token / email-password / Google OAuth), the framework 302s to `return`. The path is validated as same-origin via the URL parser — open-redirect / header-injection inputs fall back to `/`.
|
|
82
|
+
|
|
83
|
+
Bookmarked private paths already work without any plumbing — the framework's login page is served at the requested URL, and post-login reload returns the user there.
|
|
84
|
+
|
|
85
|
+
## Related Skills
|
|
86
|
+
|
|
87
|
+
- `security` — Data scoping, SQL injection, secrets
|
|
88
|
+
- `actions` — Auto-protected by the auth guard
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: automations
|
|
3
|
+
description: >-
|
|
4
|
+
Event-triggered and schedule-triggered automations with natural-language
|
|
5
|
+
conditions. Use when creating automations, wiring events, or understanding
|
|
6
|
+
how triggers fire.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Automations
|
|
10
|
+
|
|
11
|
+
## Rule
|
|
12
|
+
|
|
13
|
+
Automations are agent-executed tasks that fire in response to events or on a cron schedule. Each automation is a markdown resource under `jobs/` with YAML frontmatter describing when and how it fires, and a body containing natural-language instructions the agent follows. Automations extend the recurring-jobs system with event triggers, natural-language condition evaluation, and outbound HTTP via the `web-request` tool.
|
|
14
|
+
|
|
15
|
+
## The Two Trigger Types
|
|
16
|
+
|
|
17
|
+
| Type | Fires when | Key field |
|
|
18
|
+
| ---------- | ----------------------------------------------- | ------------------- |
|
|
19
|
+
| `schedule` | Cron expression matches (same as recurring jobs) | `schedule` (cron) |
|
|
20
|
+
| `event` | A matching event is emitted on the event bus | `event` (event name) |
|
|
21
|
+
|
|
22
|
+
Event triggers can optionally include a `condition` -- a natural-language string evaluated by Haiku against the event payload before dispatch. If the condition does not match, the automation is skipped.
|
|
23
|
+
|
|
24
|
+
## How It Works
|
|
25
|
+
|
|
26
|
+
1. User asks the agent to create an automation (or uses the settings UI).
|
|
27
|
+
2. Agent calls `manage-automations` with `action=list-events` to discover available events.
|
|
28
|
+
3. Agent calls `manage-automations` with `action=define` to write a `jobs/<name>.md` resource.
|
|
29
|
+
4. The trigger dispatcher subscribes to the event on the bus.
|
|
30
|
+
5. When the event fires, the dispatcher loads all matching triggers, evaluates conditions via Haiku, and dispatches matching ones.
|
|
31
|
+
6. In `agentic` mode, the dispatcher runs a full `runAgentLoop` with the automation body as the prompt and the event payload as context.
|
|
32
|
+
7. Status (`lastRun`, `lastStatus`, `lastError`) is written back to the resource frontmatter.
|
|
33
|
+
|
|
34
|
+
## Markdown Format
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
---
|
|
38
|
+
schedule: "0 9 * * 1-5"
|
|
39
|
+
enabled: true
|
|
40
|
+
triggerType: event
|
|
41
|
+
event: calendar.booking.created
|
|
42
|
+
condition: "attendee email ends with @example.com"
|
|
43
|
+
mode: agentic
|
|
44
|
+
domain: calendar
|
|
45
|
+
createdBy: owner@example.com
|
|
46
|
+
runAs: creator
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
Send a Slack message to #sales with the booking details.
|
|
50
|
+
Use the web-request tool with ${keys.SLACK_WEBHOOK}.
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Frontmatter Fields
|
|
54
|
+
|
|
55
|
+
| Field | Type | Purpose |
|
|
56
|
+
| ------------- | ------------------------------ | ------------------------------------------------------ |
|
|
57
|
+
| `schedule` | `string` | Cron expression (required for schedule triggers) |
|
|
58
|
+
| `enabled` | `boolean` | Whether the automation is active |
|
|
59
|
+
| `triggerType` | `"schedule" \| "event"` | How the automation fires |
|
|
60
|
+
| `event` | `string?` | Event name to subscribe to (event triggers) |
|
|
61
|
+
| `condition` | `string?` | Natural-language condition evaluated before dispatch |
|
|
62
|
+
| `mode` | `"agentic" \| "deterministic"` | Full agent loop vs. fixed action set |
|
|
63
|
+
| `model` | `string?` | Override the model for this trigger's agent loop |
|
|
64
|
+
| `domain` | `string?` | Grouping tag (mail, calendar, clips, etc.) |
|
|
65
|
+
| `createdBy` | `string?` | Owner email |
|
|
66
|
+
| `orgId` | `string?` | Org scope |
|
|
67
|
+
| `runAs` | `"creator" \| "shared"` | Whose API key and permissions to use |
|
|
68
|
+
| `lastRun` | `string?` | ISO timestamp of last execution |
|
|
69
|
+
| `lastStatus` | `string?` | `success`, `error`, `running`, or `skipped` |
|
|
70
|
+
| `lastError` | `string?` | Error message from last failed run |
|
|
71
|
+
|
|
72
|
+
## Agent Tools
|
|
73
|
+
|
|
74
|
+
All automation operations are accessed through a single `manage-automations` tool with an `action` parameter:
|
|
75
|
+
|
|
76
|
+
| Action | Purpose |
|
|
77
|
+
| ------------- | -------------------------------------------------------------------- |
|
|
78
|
+
| `list-events` | Discover all registered events with descriptions and payload schemas |
|
|
79
|
+
| `list` | List all automations with status, filter by domain or enabled |
|
|
80
|
+
| `define` | Create a new automation (name, trigger type, event, condition, body) |
|
|
81
|
+
| `update` | Update an existing automation (enabled, condition, body) |
|
|
82
|
+
| `delete` | Delete an automation (always confirm with user first) |
|
|
83
|
+
| `fire-test` | Emit a `test.event.fired` event to validate automations |
|
|
84
|
+
|
|
85
|
+
Additional tool: `web-request` — outbound HTTP with `${keys.NAME}` substitution.
|
|
86
|
+
|
|
87
|
+
## The Event Bus
|
|
88
|
+
|
|
89
|
+
Integrations register events at module load time. The bus validates payloads against Standard Schema definitions and dispatches to subscribers.
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
import { registerEvent, emit } from "@agent-native/core/event-bus";
|
|
93
|
+
import { z } from "zod";
|
|
94
|
+
|
|
95
|
+
// Register an event type (typically in a server plugin)
|
|
96
|
+
registerEvent({
|
|
97
|
+
name: "calendar.booking.created",
|
|
98
|
+
description: "A new calendar booking was created",
|
|
99
|
+
payloadSchema: z.object({
|
|
100
|
+
bookingId: z.string(),
|
|
101
|
+
attendeeEmail: z.string(),
|
|
102
|
+
startTime: z.string(),
|
|
103
|
+
}),
|
|
104
|
+
example: { bookingId: "abc", attendeeEmail: "jane@co.com", startTime: "2025-01-15T10:00:00Z" },
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
// Emit the event (from an action, webhook handler, etc.)
|
|
108
|
+
emit("calendar.booking.created", {
|
|
109
|
+
bookingId: "abc",
|
|
110
|
+
attendeeEmail: "jane@co.com",
|
|
111
|
+
startTime: "2025-01-15T10:00:00Z",
|
|
112
|
+
}, { owner: "owner@example.com" });
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Built-in Events
|
|
116
|
+
|
|
117
|
+
| Event | Source |
|
|
118
|
+
| ------------------------- | ------------------- |
|
|
119
|
+
| `test.event.fired` | Manual / manage-automations action=fire-test |
|
|
120
|
+
| `agent.turn.completed` | Agent chat |
|
|
121
|
+
| `calendar.*` | Calendar integration |
|
|
122
|
+
| `clip.*` | Clips integration |
|
|
123
|
+
| `mail.*` | Mail integration |
|
|
124
|
+
|
|
125
|
+
### Event Bus API
|
|
126
|
+
|
|
127
|
+
| Function | Purpose |
|
|
128
|
+
| ---------------- | ------------------------------------------- |
|
|
129
|
+
| `registerEvent` | Declare an event type with schema |
|
|
130
|
+
| `emit` | Fire an event (validates payload) |
|
|
131
|
+
| `subscribe` | Listen for an event (returns subscription ID) |
|
|
132
|
+
| `unsubscribe` | Remove a subscription by ID |
|
|
133
|
+
| `listEvents` | List all registered event definitions |
|
|
134
|
+
|
|
135
|
+
## Condition Evaluator
|
|
136
|
+
|
|
137
|
+
When an automation has a `condition`, the dispatcher calls Haiku (claude-haiku-4-5) to classify whether the event payload satisfies the condition. This is a yes/no classification, not a generation task.
|
|
138
|
+
|
|
139
|
+
- Empty or missing condition = unconditional (always fires).
|
|
140
|
+
- Results are memoized (SHA-256 of condition + payload) with a 5-minute TTL and 500-entry LRU cache.
|
|
141
|
+
- Payload is truncated to 4000 characters before sending to Haiku.
|
|
142
|
+
- On API failure, the condition evaluates to `false` (safe default -- skips the automation).
|
|
143
|
+
|
|
144
|
+
## The `web-request` Tool and Keys
|
|
145
|
+
|
|
146
|
+
Automations use the `web-request` tool for outbound HTTP. It supports `${keys.NAME}` placeholders in the URL, headers, and body. These are resolved server-side after the agent emits the tool call -- the raw secret value never enters the agent's context.
|
|
147
|
+
|
|
148
|
+
- Keys are ad-hoc secrets created by the user via the settings UI or the `/_agent-native/secrets/adhoc` API.
|
|
149
|
+
- Each key can have a URL allowlist that restricts which origins the key can be sent to.
|
|
150
|
+
- `resolveKeyReferences()` resolves placeholders, falling back from user scope to workspace scope.
|
|
151
|
+
- `validateUrlAllowlist()` checks the resolved URL against per-key allowlists (origin-level matching).
|
|
152
|
+
|
|
153
|
+
## UI
|
|
154
|
+
|
|
155
|
+
Automations appear in the settings panel under an "Automations" section. Users can view, enable/disable, and delete automations from there. Creation typically happens through the agent chat.
|
|
156
|
+
|
|
157
|
+
## Example
|
|
158
|
+
|
|
159
|
+
User: "When someone books a meeting with a @example.com email, message me in Slack."
|
|
160
|
+
|
|
161
|
+
Agent flow:
|
|
162
|
+
|
|
163
|
+
1. Calls `manage-automations` with `action=list-events` to find `calendar.booking.created`.
|
|
164
|
+
2. Confirms the plan with the user.
|
|
165
|
+
3. Calls `manage-automations` with `action=define`:
|
|
166
|
+
- `name`: `slack-on-builder-booking`
|
|
167
|
+
- `trigger_type`: `event`
|
|
168
|
+
- `event`: `calendar.booking.created`
|
|
169
|
+
- `condition`: `attendee email ends with @example.com`
|
|
170
|
+
- `mode`: `agentic`
|
|
171
|
+
- `domain`: `calendar`
|
|
172
|
+
- `body`: `Send a Slack message to #sales with the booking details. Use the web-request tool to POST to ${keys.SLACK_WEBHOOK}.`
|
|
173
|
+
|
|
174
|
+
## Key Files
|
|
175
|
+
|
|
176
|
+
| File | Purpose |
|
|
177
|
+
| ---------------------------------------------- | ------------------------------------------------ |
|
|
178
|
+
| `packages/core/src/triggers/types.ts` | `TriggerFrontmatter` interface |
|
|
179
|
+
| `packages/core/src/triggers/actions.ts` | Agent tools (define, list, update, delete, test) |
|
|
180
|
+
| `packages/core/src/triggers/dispatcher.ts` | Event subscription and agentic dispatch |
|
|
181
|
+
| `packages/core/src/triggers/condition-evaluator.ts` | Haiku condition classification with caching |
|
|
182
|
+
| `packages/core/src/event-bus/` | Event bus (register, emit, subscribe) |
|
|
183
|
+
| `packages/core/src/tools/fetch-tool.ts` | `web-request` tool with key substitution |
|
|
184
|
+
| `packages/core/src/secrets/substitution.ts` | `resolveKeyReferences()` and `validateUrlAllowlist()` |
|
|
185
|
+
|
|
186
|
+
## Related Skills
|
|
187
|
+
|
|
188
|
+
- `recurring-jobs` -- schedule-triggered automations reuse the same scheduler
|
|
189
|
+
- `secrets` -- ad-hoc keys and `${keys.NAME}` substitution
|
|
190
|
+
- `actions` -- automations can call any registered action via the agent loop
|
|
191
|
+
- `delegate-to-agent` -- agentic mode runs a full `runAgentLoop`
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: capture-learnings
|
|
3
|
+
description: >-
|
|
4
|
+
Capture and apply accumulated knowledge via structured memory. Use when the
|
|
5
|
+
user gives feedback, shares preferences, corrects a mistake, or when you
|
|
6
|
+
discover something worth remembering for future conversations.
|
|
7
|
+
user-invocable: false
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Capture Learnings
|
|
11
|
+
|
|
12
|
+
This is background knowledge, not a slash command. **Your memory index is loaded at the start of every conversation.** Use `save-memory` proactively when you learn something worth remembering.
|
|
13
|
+
|
|
14
|
+
## How to Read & Write Memories
|
|
15
|
+
|
|
16
|
+
Memories are stored as **resources** in the SQL database (personal scope), not as files on disk.
|
|
17
|
+
|
|
18
|
+
- **Save a memory:** `save-memory --name <name> --type <type> --description "..." --content "..."`
|
|
19
|
+
- **Read a memory:** `resource-read --path memory/<name>.md`
|
|
20
|
+
- **Delete a memory:** `delete-memory --name <name>`
|
|
21
|
+
- **List all memories:** `resource-list --prefix memory/`
|
|
22
|
+
|
|
23
|
+
## Memory Types
|
|
24
|
+
|
|
25
|
+
| Type | Use for |
|
|
26
|
+
|------|---------|
|
|
27
|
+
| `user` | Preferences, role, personal context, contacts |
|
|
28
|
+
| `feedback` | Corrections, confirmed approaches, things to avoid or repeat |
|
|
29
|
+
| `project` | Ongoing work context, decisions, deadlines, status |
|
|
30
|
+
| `reference` | Pointers to external systems, URLs, API details |
|
|
31
|
+
|
|
32
|
+
## When to Capture
|
|
33
|
+
|
|
34
|
+
### User Preferences & Memory (`user`)
|
|
35
|
+
- **Tone and style** — "I prefer casual tone", "don't use emojis", "keep replies short"
|
|
36
|
+
- **Personal context** — contacts, relationships, habits ("my wife's email is...", "I'm in PST timezone")
|
|
37
|
+
- **Workflow preferences** — "always CC my assistant", "I like to review before sending"
|
|
38
|
+
- **Role and expertise** — "I'm a data scientist", "new to React"
|
|
39
|
+
|
|
40
|
+
### Feedback & Corrections (`feedback`)
|
|
41
|
+
- **Corrections** — user says "no, do it this way" → capture the right way
|
|
42
|
+
- **Confirmed approaches** — user validates a non-obvious choice ("yes, that's perfect")
|
|
43
|
+
- **Repeated friction** — you hit the same issue twice; save it
|
|
44
|
+
|
|
45
|
+
### Project Context (`project`)
|
|
46
|
+
- **Ongoing work** — who is doing what, why, by when
|
|
47
|
+
- **Decisions** — why something is done a certain way
|
|
48
|
+
- **Status** — current state of initiatives
|
|
49
|
+
|
|
50
|
+
### References (`reference`)
|
|
51
|
+
- **External systems** — "bugs are tracked in Linear project INGEST"
|
|
52
|
+
- **URLs** — dashboards, documentation, tools
|
|
53
|
+
- **API quirks** — undocumented behavior, version-specific gotchas
|
|
54
|
+
|
|
55
|
+
### Don't Capture
|
|
56
|
+
- Things obvious from reading the code
|
|
57
|
+
- Standard language/framework behavior
|
|
58
|
+
- Temporary debugging notes
|
|
59
|
+
- Anything already in AGENTS.md or skills
|
|
60
|
+
- Ephemeral task details (use tasks/plans instead)
|
|
61
|
+
|
|
62
|
+
## Key Rules
|
|
63
|
+
|
|
64
|
+
1. **Save proactively — don't ask permission.** When you learn something, save it immediately.
|
|
65
|
+
2. **One memory per topic** — e.g. `coding-style`, `project-alpha`, not one giant dump
|
|
66
|
+
3. **Read before updating** — if a memory exists, read it first and merge, don't overwrite
|
|
67
|
+
4. **Keep descriptions concise** — the index is loaded every conversation
|
|
68
|
+
5. **Memories are SQL-backed** — safe for personal info, persist across sessions, not in git
|
|
69
|
+
|
|
70
|
+
## Graduation
|
|
71
|
+
|
|
72
|
+
When a memory is referenced repeatedly, it may belong in AGENTS.md or a skill:
|
|
73
|
+
- Saving a memory is lightweight (auto-apply, personal scope)
|
|
74
|
+
- Updating AGENTS.md or a skill is heavier (affects all users/agents)
|