@agent-native/core 0.15.12 → 0.16.0
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 +37 -0
- package/dist/agent/app-model-defaults.d.ts +37 -0
- package/dist/agent/app-model-defaults.d.ts.map +1 -0
- package/dist/agent/app-model-defaults.js +136 -0
- package/dist/agent/app-model-defaults.js.map +1 -0
- package/dist/agent/engine/registry.d.ts +12 -7
- package/dist/agent/engine/registry.d.ts.map +1 -1
- package/dist/agent/engine/registry.js +28 -8
- package/dist/agent/engine/registry.js.map +1 -1
- package/dist/agent/production-agent.d.ts +2 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +3 -1
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/browser-sessions/actions.d.ts +7 -0
- package/dist/browser-sessions/actions.d.ts.map +1 -0
- package/dist/browser-sessions/actions.js +223 -0
- package/dist/browser-sessions/actions.js.map +1 -0
- package/dist/browser-sessions/routes.d.ts +7 -0
- package/dist/browser-sessions/routes.d.ts.map +1 -0
- package/dist/browser-sessions/routes.js +159 -0
- package/dist/browser-sessions/routes.js.map +1 -0
- package/dist/browser-sessions/store.d.ts +33 -0
- package/dist/browser-sessions/store.d.ts.map +1 -0
- package/dist/browser-sessions/store.js +506 -0
- package/dist/browser-sessions/store.js.map +1 -0
- package/dist/browser-sessions/types.d.ts +68 -0
- package/dist/browser-sessions/types.d.ts.map +1 -0
- package/dist/browser-sessions/types.js +2 -0
- package/dist/browser-sessions/types.js.map +1 -0
- package/dist/cli/code-agent-commands.d.ts +36 -0
- package/dist/cli/code-agent-commands.d.ts.map +1 -0
- package/dist/cli/code-agent-commands.js +192 -0
- package/dist/cli/code-agent-commands.js.map +1 -0
- package/dist/cli/code-agent-connector.d.ts +17 -0
- package/dist/cli/code-agent-connector.d.ts.map +1 -0
- package/dist/cli/code-agent-connector.js +724 -0
- package/dist/cli/code-agent-connector.js.map +1 -0
- package/dist/cli/code-agent-executor.d.ts +31 -0
- package/dist/cli/code-agent-executor.d.ts.map +1 -0
- package/dist/cli/code-agent-executor.js +921 -0
- package/dist/cli/code-agent-executor.js.map +1 -0
- package/dist/cli/code-agent-runs.d.ts +102 -0
- package/dist/cli/code-agent-runs.d.ts.map +1 -0
- package/dist/cli/code-agent-runs.js +277 -0
- package/dist/cli/code-agent-runs.js.map +1 -0
- package/dist/cli/code.d.ts +66 -0
- package/dist/cli/code.d.ts.map +1 -0
- package/dist/cli/code.js +1306 -0
- package/dist/cli/code.js.map +1 -0
- package/dist/cli/create.d.ts +2 -1
- package/dist/cli/create.d.ts.map +1 -1
- package/dist/cli/create.js +11 -1
- package/dist/cli/create.js.map +1 -1
- package/dist/cli/index.js +26 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/migrate.d.ts +27 -0
- package/dist/cli/migrate.d.ts.map +1 -1
- package/dist/cli/migrate.js +1328 -20
- package/dist/cli/migrate.js.map +1 -1
- package/dist/cli/templates-meta.d.ts.map +1 -1
- package/dist/cli/templates-meta.js +27 -3
- package/dist/cli/templates-meta.js.map +1 -1
- package/dist/cli/workspacify.d.ts +2 -0
- package/dist/cli/workspacify.d.ts.map +1 -1
- package/dist/cli/workspacify.js +2 -1
- package/dist/cli/workspacify.js.map +1 -1
- package/dist/client/AgentNative.d.ts +32 -0
- package/dist/client/AgentNative.d.ts.map +1 -0
- package/dist/client/AgentNative.js +79 -0
- package/dist/client/AgentNative.js.map +1 -0
- package/dist/client/AgentNativeEmbedded.d.ts +47 -0
- package/dist/client/AgentNativeEmbedded.d.ts.map +1 -0
- package/dist/client/AgentNativeEmbedded.js +148 -0
- package/dist/client/AgentNativeEmbedded.js.map +1 -0
- package/dist/client/AgentNativeFrame.d.ts +25 -0
- package/dist/client/AgentNativeFrame.d.ts.map +1 -0
- package/dist/client/AgentNativeFrame.js +68 -0
- package/dist/client/AgentNativeFrame.js.map +1 -0
- package/dist/client/AgentPanel.d.ts +19 -2
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +15 -4
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +79 -48
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
- package/dist/client/MultiTabAssistantChat.js +2 -1
- package/dist/client/MultiTabAssistantChat.js.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.d.ts.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.js +3 -2
- package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
- package/dist/client/browser-session-bridge.d.ts +44 -0
- package/dist/client/browser-session-bridge.d.ts.map +1 -0
- package/dist/client/browser-session-bridge.js +339 -0
- package/dist/client/browser-session-bridge.js.map +1 -0
- package/dist/client/client-action.d.ts +7 -0
- package/dist/client/client-action.d.ts.map +1 -0
- package/dist/client/client-action.js +4 -0
- package/dist/client/client-action.js.map +1 -0
- package/dist/client/components/ui/tooltip.d.ts.map +1 -1
- package/dist/client/components/ui/tooltip.js +1 -1
- package/dist/client/components/ui/tooltip.js.map +1 -1
- package/dist/client/composer/AgentComposerFrame.d.ts +17 -0
- package/dist/client/composer/AgentComposerFrame.d.ts.map +1 -0
- package/dist/client/composer/AgentComposerFrame.js +14 -0
- package/dist/client/composer/AgentComposerFrame.js.map +1 -0
- package/dist/client/composer/MentionPopover.d.ts.map +1 -1
- package/dist/client/composer/MentionPopover.js +2 -2
- package/dist/client/composer/MentionPopover.js.map +1 -1
- package/dist/client/composer/PromptComposer.d.ts +35 -2
- package/dist/client/composer/PromptComposer.d.ts.map +1 -1
- package/dist/client/composer/PromptComposer.js +31 -17
- package/dist/client/composer/PromptComposer.js.map +1 -1
- package/dist/client/composer/TiptapComposer.d.ts +20 -2
- package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
- package/dist/client/composer/TiptapComposer.js +112 -22
- package/dist/client/composer/TiptapComposer.js.map +1 -1
- package/dist/client/composer/index.d.ts +3 -2
- package/dist/client/composer/index.d.ts.map +1 -1
- package/dist/client/composer/index.js +1 -0
- package/dist/client/composer/index.js.map +1 -1
- package/dist/client/composer/types.d.ts +1 -0
- package/dist/client/composer/types.d.ts.map +1 -1
- package/dist/client/composer/types.js.map +1 -1
- package/dist/client/extensions/AgentNativeExtensionFrame.d.ts +58 -0
- package/dist/client/extensions/AgentNativeExtensionFrame.d.ts.map +1 -0
- package/dist/client/extensions/AgentNativeExtensionFrame.e2e-host.d.ts +2 -0
- package/dist/client/extensions/AgentNativeExtensionFrame.e2e-host.d.ts.map +1 -0
- package/dist/client/extensions/AgentNativeExtensionFrame.e2e-host.js +110 -0
- package/dist/client/extensions/AgentNativeExtensionFrame.e2e-host.js.map +1 -0
- package/dist/client/extensions/AgentNativeExtensionFrame.js +354 -0
- package/dist/client/extensions/AgentNativeExtensionFrame.js.map +1 -0
- package/dist/client/extensions/AgentNativeExtensionFrame.spec.d.ts +2 -0
- package/dist/client/extensions/AgentNativeExtensionFrame.spec.d.ts.map +1 -0
- package/dist/client/extensions/AgentNativeExtensionFrame.spec.js +68 -0
- package/dist/client/extensions/AgentNativeExtensionFrame.spec.js.map +1 -0
- package/dist/client/extensions/agent-native-extension-runtime.d.ts +69 -0
- package/dist/client/extensions/agent-native-extension-runtime.d.ts.map +1 -0
- package/dist/client/extensions/agent-native-extension-runtime.js +348 -0
- package/dist/client/extensions/agent-native-extension-runtime.js.map +1 -0
- package/dist/client/extensions/index.d.ts +2 -0
- package/dist/client/extensions/index.d.ts.map +1 -1
- package/dist/client/extensions/index.js +2 -0
- package/dist/client/extensions/index.js.map +1 -1
- package/dist/client/extensions/portable-extension.d.ts +86 -0
- package/dist/client/extensions/portable-extension.d.ts.map +1 -0
- package/dist/client/extensions/portable-extension.js +480 -0
- package/dist/client/extensions/portable-extension.js.map +1 -0
- package/dist/client/host-bridge.d.ts +266 -0
- package/dist/client/host-bridge.d.ts.map +1 -0
- package/dist/client/host-bridge.js +745 -0
- package/dist/client/host-bridge.js.map +1 -0
- package/dist/client/host-tools.d.ts +40 -0
- package/dist/client/host-tools.d.ts.map +1 -0
- package/dist/client/host-tools.js +94 -0
- package/dist/client/host-tools.js.map +1 -0
- package/dist/client/index.d.ts +13 -2
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +11 -2
- package/dist/client/index.js.map +1 -1
- package/dist/client/resources/BuiltinCapabilityDetail.d.ts +10 -0
- package/dist/client/resources/BuiltinCapabilityDetail.d.ts.map +1 -0
- package/dist/client/resources/BuiltinCapabilityDetail.js +51 -0
- package/dist/client/resources/BuiltinCapabilityDetail.js.map +1 -0
- package/dist/client/resources/ResourceEditor.d.ts +3 -1
- package/dist/client/resources/ResourceEditor.d.ts.map +1 -1
- package/dist/client/resources/ResourceEditor.js +40 -17
- package/dist/client/resources/ResourceEditor.js.map +1 -1
- package/dist/client/resources/ResourceTree.d.ts.map +1 -1
- package/dist/client/resources/ResourceTree.js +23 -2
- package/dist/client/resources/ResourceTree.js.map +1 -1
- package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
- package/dist/client/resources/ResourcesPanel.js +77 -17
- package/dist/client/resources/ResourcesPanel.js.map +1 -1
- package/dist/client/resources/index.d.ts +1 -0
- package/dist/client/resources/index.d.ts.map +1 -1
- package/dist/client/resources/index.js +1 -0
- package/dist/client/resources/index.js.map +1 -1
- package/dist/client/resources/use-builtin-capabilities.d.ts +62 -0
- package/dist/client/resources/use-builtin-capabilities.d.ts.map +1 -0
- package/dist/client/resources/use-builtin-capabilities.js +54 -0
- package/dist/client/resources/use-builtin-capabilities.js.map +1 -0
- package/dist/client/resources/use-resources.d.ts +30 -2
- package/dist/client/resources/use-resources.d.ts.map +1 -1
- package/dist/client/resources/use-resources.js +42 -1
- package/dist/client/resources/use-resources.js.map +1 -1
- package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
- package/dist/client/settings/SettingsPanel.js +151 -2
- package/dist/client/settings/SettingsPanel.js.map +1 -1
- package/dist/client/use-chat-models.d.ts.map +1 -1
- package/dist/client/use-chat-models.js +20 -0
- package/dist/client/use-chat-models.js.map +1 -1
- package/dist/client/use-chat-threads.d.ts.map +1 -1
- package/dist/client/use-chat-threads.js +46 -2
- package/dist/client/use-chat-threads.js.map +1 -1
- package/dist/client/use-chat-threads.spec.js +77 -0
- package/dist/client/use-chat-threads.spec.js.map +1 -1
- package/dist/code-agents/index.d.ts +4 -0
- package/dist/code-agents/index.d.ts.map +1 -0
- package/dist/code-agents/index.js +4 -0
- package/dist/code-agents/index.js.map +1 -0
- package/dist/connections/catalog.d.ts +134 -0
- package/dist/connections/catalog.d.ts.map +1 -0
- package/dist/connections/catalog.js +180 -0
- package/dist/connections/catalog.js.map +1 -0
- package/dist/connections/index.d.ts +2 -0
- package/dist/connections/index.d.ts.map +1 -0
- package/dist/connections/index.js +2 -0
- package/dist/connections/index.js.map +1 -0
- package/dist/extensions/change-marker.d.ts +10 -0
- package/dist/extensions/change-marker.d.ts.map +1 -0
- package/dist/extensions/change-marker.js +42 -0
- package/dist/extensions/change-marker.js.map +1 -0
- package/dist/extensions/routes.d.ts.map +1 -1
- package/dist/extensions/routes.js +1 -7
- package/dist/extensions/routes.js.map +1 -1
- package/dist/extensions/schema.d.ts +1 -0
- package/dist/extensions/schema.d.ts.map +1 -1
- package/dist/extensions/schema.js +1 -0
- package/dist/extensions/schema.js.map +1 -1
- package/dist/extensions/slots/routes.js +1 -1
- package/dist/extensions/slots/routes.js.map +1 -1
- package/dist/extensions/store.d.ts +3 -0
- package/dist/extensions/store.d.ts.map +1 -1
- package/dist/extensions/store.js +112 -4
- package/dist/extensions/store.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/adapters/telegram.d.ts.map +1 -1
- package/dist/integrations/adapters/telegram.js +1 -0
- package/dist/integrations/adapters/telegram.js.map +1 -1
- package/dist/integrations/index.d.ts +5 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js +4 -1
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/plugin.d.ts +8 -0
- package/dist/integrations/plugin.d.ts.map +1 -1
- package/dist/integrations/plugin.js +760 -32
- package/dist/integrations/plugin.js.map +1 -1
- package/dist/integrations/remote-commands-store.d.ts +36 -0
- package/dist/integrations/remote-commands-store.d.ts.map +1 -0
- package/dist/integrations/remote-commands-store.js +273 -0
- package/dist/integrations/remote-commands-store.js.map +1 -0
- package/dist/integrations/remote-devices-store.d.ts +43 -0
- package/dist/integrations/remote-devices-store.d.ts.map +1 -0
- package/dist/integrations/remote-devices-store.js +315 -0
- package/dist/integrations/remote-devices-store.js.map +1 -0
- package/dist/integrations/remote-push-store.d.ts +37 -0
- package/dist/integrations/remote-push-store.d.ts.map +1 -0
- package/dist/integrations/remote-push-store.js +299 -0
- package/dist/integrations/remote-push-store.js.map +1 -0
- package/dist/integrations/remote-retry-job.d.ts +7 -0
- package/dist/integrations/remote-retry-job.d.ts.map +1 -0
- package/dist/integrations/remote-retry-job.js +45 -0
- package/dist/integrations/remote-retry-job.js.map +1 -0
- package/dist/integrations/remote-run-events-store.d.ts +18 -0
- package/dist/integrations/remote-run-events-store.d.ts.map +1 -0
- package/dist/integrations/remote-run-events-store.js +82 -0
- package/dist/integrations/remote-run-events-store.js.map +1 -0
- package/dist/integrations/remote-types.d.ts +101 -0
- package/dist/integrations/remote-types.d.ts.map +1 -0
- package/dist/integrations/remote-types.js +2 -0
- package/dist/integrations/remote-types.js.map +1 -0
- package/dist/integrations/webhook-handler.d.ts +2 -0
- package/dist/integrations/webhook-handler.d.ts.map +1 -1
- package/dist/integrations/webhook-handler.js +4 -1
- package/dist/integrations/webhook-handler.js.map +1 -1
- package/dist/jobs/scheduler.d.ts +4 -2
- package/dist/jobs/scheduler.d.ts.map +1 -1
- package/dist/jobs/scheduler.js +9 -3
- package/dist/jobs/scheduler.js.map +1 -1
- package/dist/mcp-client/builtin-capabilities.d.ts +20 -0
- package/dist/mcp-client/builtin-capabilities.d.ts.map +1 -0
- package/dist/mcp-client/builtin-capabilities.js +75 -0
- package/dist/mcp-client/builtin-capabilities.js.map +1 -0
- package/dist/mcp-client/builtin-store.d.ts +10 -0
- package/dist/mcp-client/builtin-store.d.ts.map +1 -0
- package/dist/mcp-client/builtin-store.js +55 -0
- package/dist/mcp-client/builtin-store.js.map +1 -0
- package/dist/mcp-client/index.d.ts +3 -1
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +3 -1
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/mcp-client/routes.d.ts +28 -0
- package/dist/mcp-client/routes.d.ts.map +1 -1
- package/dist/mcp-client/routes.js +195 -1
- package/dist/mcp-client/routes.js.map +1 -1
- package/dist/org/context.d.ts.map +1 -1
- package/dist/org/context.js +34 -0
- package/dist/org/context.js.map +1 -1
- package/dist/resources/handlers.d.ts +4 -0
- package/dist/resources/handlers.d.ts.map +1 -1
- package/dist/resources/handlers.js +46 -7
- package/dist/resources/handlers.js.map +1 -1
- package/dist/resources/script-helpers.d.ts +8 -1
- package/dist/resources/script-helpers.d.ts.map +1 -1
- package/dist/resources/script-helpers.js +18 -8
- package/dist/resources/script-helpers.js.map +1 -1
- package/dist/resources/store.d.ts +19 -0
- package/dist/resources/store.d.ts.map +1 -1
- package/dist/resources/store.js +86 -3
- package/dist/resources/store.js.map +1 -1
- package/dist/scripts/agent-engines/list-agent-engines.d.ts +1 -1
- package/dist/scripts/agent-engines/list-agent-engines.d.ts.map +1 -1
- package/dist/scripts/agent-engines/list-agent-engines.js +18 -7
- package/dist/scripts/agent-engines/list-agent-engines.js.map +1 -1
- package/dist/scripts/agent-engines/manage-agent-engine.d.ts.map +1 -1
- package/dist/scripts/agent-engines/manage-agent-engine.js +100 -7
- package/dist/scripts/agent-engines/manage-agent-engine.js.map +1 -1
- package/dist/scripts/resources/delete.d.ts.map +1 -1
- package/dist/scripts/resources/delete.js +4 -1
- package/dist/scripts/resources/delete.js.map +1 -1
- package/dist/scripts/resources/effective.d.ts +11 -0
- package/dist/scripts/resources/effective.d.ts.map +1 -0
- package/dist/scripts/resources/effective.js +54 -0
- package/dist/scripts/resources/effective.js.map +1 -0
- package/dist/scripts/resources/index.d.ts.map +1 -1
- package/dist/scripts/resources/index.js +1 -0
- package/dist/scripts/resources/index.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 +17 -5
- package/dist/scripts/resources/list.js.map +1 -1
- package/dist/scripts/resources/read.d.ts +1 -1
- package/dist/scripts/resources/read.d.ts.map +1 -1
- package/dist/scripts/resources/read.js +20 -5
- package/dist/scripts/resources/read.js.map +1 -1
- package/dist/scripts/resources/write.d.ts.map +1 -1
- package/dist/scripts/resources/write.js +4 -1
- package/dist/scripts/resources/write.js.map +1 -1
- package/dist/scripts/runner.d.ts +11 -1
- package/dist/scripts/runner.d.ts.map +1 -1
- package/dist/scripts/runner.js +75 -27
- package/dist/scripts/runner.js.map +1 -1
- package/dist/server/action-discovery.d.ts.map +1 -1
- package/dist/server/action-discovery.js +5 -0
- package/dist/server/action-discovery.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts +24 -0
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +608 -54
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +2 -0
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/server/embedded.d.ts +72 -0
- package/dist/server/embedded.d.ts.map +1 -0
- package/dist/server/embedded.js +119 -0
- package/dist/server/embedded.js.map +1 -0
- package/dist/server/index.d.ts +8 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +7 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/poll.d.ts.map +1 -1
- package/dist/server/poll.js +184 -13
- package/dist/server/poll.js.map +1 -1
- package/dist/server/resources-plugin.d.ts.map +1 -1
- package/dist/server/resources-plugin.js +11 -2
- package/dist/server/resources-plugin.js.map +1 -1
- package/dist/sharing/actions/extension-change.d.ts +4 -0
- package/dist/sharing/actions/extension-change.d.ts.map +1 -0
- package/dist/sharing/actions/extension-change.js +13 -0
- package/dist/sharing/actions/extension-change.js.map +1 -0
- package/dist/sharing/actions/set-resource-visibility.d.ts.map +1 -1
- package/dist/sharing/actions/set-resource-visibility.js +3 -0
- 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 +4 -0
- package/dist/sharing/actions/share-resource.js.map +1 -1
- package/dist/sharing/actions/unshare-resource.d.ts.map +1 -1
- package/dist/sharing/actions/unshare-resource.js +3 -0
- package/dist/sharing/actions/unshare-resource.js.map +1 -1
- package/dist/templates/default/AGENTS.md +3 -3
- package/dist/templates/workspace-core/AGENTS.md +7 -0
- package/dist/templates/workspace-root/AGENTS.md +7 -0
- package/dist/templates/workspace-root/README.md +25 -0
- package/dist/triggers/dispatcher.d.ts +3 -1
- package/dist/triggers/dispatcher.d.ts.map +1 -1
- package/dist/triggers/dispatcher.js +9 -3
- package/dist/triggers/dispatcher.js.map +1 -1
- package/dist/workspace-connections/index.d.ts +2 -0
- package/dist/workspace-connections/index.d.ts.map +1 -0
- package/dist/workspace-connections/index.js +2 -0
- package/dist/workspace-connections/index.js.map +1 -0
- package/dist/workspace-connections/store.d.ts +229 -0
- package/dist/workspace-connections/store.d.ts.map +1 -0
- package/dist/workspace-connections/store.js +938 -0
- package/dist/workspace-connections/store.js.map +1 -0
- package/docs/content/agent-teams.md +6 -0
- package/docs/content/cloneable-saas.md +1 -0
- package/docs/content/code-agents-ui.md +261 -0
- package/docs/content/dispatch.md +40 -3
- package/docs/content/embedding-sdk.md +459 -0
- package/docs/content/faq.md +1 -0
- package/docs/content/getting-started.md +1 -0
- package/docs/content/mcp-clients.md +41 -3
- package/docs/content/migration-workbench.md +237 -54
- package/docs/content/multi-app-workspace.md +41 -0
- package/docs/content/multi-tenancy.md +1 -1
- package/docs/content/template-brain.md +418 -0
- package/docs/content/template-dispatch.md +30 -0
- package/docs/content/workspace-connections.md +509 -0
- package/docs/content/workspace-management.md +12 -12
- package/docs/content/workspace.md +180 -40
- package/package.json +7 -2
- package/src/templates/default/AGENTS.md +3 -3
- package/src/templates/workspace-core/AGENTS.md +7 -0
- package/src/templates/workspace-root/AGENTS.md +7 -0
- package/src/templates/workspace-root/README.md +25 -0
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Brain"
|
|
3
|
+
description: "A public first-party template for cited company memory, reviewable source ingestion, and the path toward universal workspace search."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Brain
|
|
7
|
+
|
|
8
|
+
Brain is a public first-party template for Company Brain: cited institutional
|
|
9
|
+
memory that agents and humans can search without pretending raw workplace data
|
|
10
|
+
is already clean, complete, or safe to publish. The first-run surface is a
|
|
11
|
+
full-page company chat with demo and eval controls, source health, review
|
|
12
|
+
counts, and cited answers from approved company knowledge.
|
|
13
|
+
|
|
14
|
+
Brain ingests approved Slack channels, Clips recordings, Granola Team-space
|
|
15
|
+
notes, GitHub issues/PRs, and generic transcript/webhook payloads. It stores raw
|
|
16
|
+
captures, distills durable facts/decisions/processes, and routes sensitive or
|
|
17
|
+
low-confidence memories through review before they become company knowledge.
|
|
18
|
+
|
|
19
|
+
Use Brain when your team wants agents to answer questions like "why did we make
|
|
20
|
+
this product decision?", "how does this in-development feature work?", or "what
|
|
21
|
+
changed in this process?" with links back to the source conversation, meeting,
|
|
22
|
+
or issue.
|
|
23
|
+
|
|
24
|
+
Brain is intentionally on an open-source, Glean-shaped path, but it is not a
|
|
25
|
+
complete Glean replacement today. V1 is cited company memory over reviewed
|
|
26
|
+
knowledge. V1.5 adds universal Brain search across knowledge, captures, and
|
|
27
|
+
sources, plus reusable workspace connections for source credentials. V2 points
|
|
28
|
+
toward federated app/source search, permission-aware result filtering, ranking,
|
|
29
|
+
and an expertise graph as a future platform layer.
|
|
30
|
+
|
|
31
|
+
## What It Includes
|
|
32
|
+
|
|
33
|
+
- **Full-page company chat.** The Ask route is the main product surface. It
|
|
34
|
+
shows a compact demo CTA, source health, review count, and suggested
|
|
35
|
+
company-memory questions. It uses `AgentChatSurface`, so the Brain composer
|
|
36
|
+
stays on the same shared chat input stack as the agent sidebar and
|
|
37
|
+
Agent-Native Code.
|
|
38
|
+
- **Repeatable demo flow.** Load a product-decision corpus, run the demo eval,
|
|
39
|
+
ask a cited question immediately, then continue into Review or Knowledge so a
|
|
40
|
+
new workspace can see the trust loop before connecting real sources.
|
|
41
|
+
- **Approved sources.** Configure manual, generic webhook, Clips, Slack,
|
|
42
|
+
Granola, and GitHub source records. Slack is channel-oriented by design; DMs
|
|
43
|
+
and MPIMs are not scan targets.
|
|
44
|
+
- **Raw captures.** Store transcripts, channel exports, notes, and webhook imports in portable SQL with dedupe keys and source metadata.
|
|
45
|
+
- **Distilled knowledge.** Write atomic entries with kind, topic, entities, confidence, exact evidence quotes, and supersede links.
|
|
46
|
+
- **Review queue.** Proposed company memories have a first-class Review route
|
|
47
|
+
where reviewers edit wording, inspect evidence/source links, approve, or
|
|
48
|
+
reject. Reviewers can also choose whether an approved proposal becomes
|
|
49
|
+
canonical company context immediately.
|
|
50
|
+
- **Review gating.** High-confidence non-sensitive entries can publish immediately; company-tier or sensitive entries can queue as proposals for approval.
|
|
51
|
+
- **Cited retrieval.** V1 exposes `search-knowledge` and `get-knowledge` for
|
|
52
|
+
distilled company memory. The V1.5 expansion adds a Search route and
|
|
53
|
+
`search-everything` action for searching knowledge, raw captures, and source
|
|
54
|
+
records together, then drilling into `get-knowledge` / `get-capture`.
|
|
55
|
+
- **Pilot and Ops controls.** Slack pilots stay bounded by default, `get-pilot-report` summarizes source quality without raw bodies, and the Ops route tracks stale or failed distillation queue items with safe retry controls.
|
|
56
|
+
- **Shared integrations.** The Sources page shows Brain source records beside
|
|
57
|
+
reusable workspace connection grants and provider readiness, so Brain can use
|
|
58
|
+
Dispatch/workspace-managed credentials when a grant exists.
|
|
59
|
+
- **Ambient context.** Canonical approved entries can mirror into workspace
|
|
60
|
+
resources under `context/company-brain/...` for cross-app context. The Review
|
|
61
|
+
route exposes this as a per-proposal switch; the Knowledge route can publish
|
|
62
|
+
or unpublish approved memories later with `set-knowledge-canonical`. Both
|
|
63
|
+
flows preview the exact Markdown through `preview-canonical-resource` before
|
|
64
|
+
the resource is written or removed.
|
|
65
|
+
|
|
66
|
+
Brain intentionally uses SQL text search and agentic query expansion for v1.
|
|
67
|
+
There is no vector database requirement, so the template stays portable across
|
|
68
|
+
SQLite, Postgres, Neon, D1, Turso, and similar hosts. Raw capture content is
|
|
69
|
+
redacted by default in review/search surfaces; editor-authorized distillation
|
|
70
|
+
can request exact raw text for quote validation.
|
|
71
|
+
|
|
72
|
+
## Search Model
|
|
73
|
+
|
|
74
|
+
Brain search has three layers:
|
|
75
|
+
|
|
76
|
+
- **V1 Company Brain search:** answer from reviewed, distilled knowledge first.
|
|
77
|
+
This is the trust layer for decisions, policies, product facts, processes,
|
|
78
|
+
and durable summaries.
|
|
79
|
+
- **V1.5 universal Brain search:** use `search-everything` as the broad first
|
|
80
|
+
pass across knowledge, raw captures, and sources. Then call `get-knowledge`
|
|
81
|
+
for reviewed entries or `get-capture` for exact source context and links.
|
|
82
|
+
- **V2 federated workspace search:** reuse workspace connections and search
|
|
83
|
+
across apps/sources with permission-aware result filtering and ranking. The
|
|
84
|
+
expertise graph belongs to this future/platform layer.
|
|
85
|
+
|
|
86
|
+
Agents should cite evidence links or source URLs whenever available. If Brain
|
|
87
|
+
does not return support for a question, the agent should report that honestly
|
|
88
|
+
instead of implying the company memory contains an answer.
|
|
89
|
+
|
|
90
|
+
## Brain vs Dispatch
|
|
91
|
+
|
|
92
|
+
Brain and Dispatch are complementary, but they do different jobs:
|
|
93
|
+
|
|
94
|
+
- **Brain owns company memory.** It ingests sources, reviews raw captures,
|
|
95
|
+
distills durable facts/decisions/processes, answers from cited evidence, and
|
|
96
|
+
exposes approved knowledge to agents.
|
|
97
|
+
- **Dispatch owns the workspace control plane.** It centralizes messaging,
|
|
98
|
+
secrets, recurring jobs, approvals, A2A orchestration, and workspace-wide
|
|
99
|
+
resources.
|
|
100
|
+
|
|
101
|
+
In a multi-app workspace, Dispatch can route a question to Brain over A2A and
|
|
102
|
+
can grant Brain shared provider credentials. Brain remains the specialist for
|
|
103
|
+
approved source ingestion, review, retrieval, and cited Company Brain answers.
|
|
104
|
+
|
|
105
|
+
## Scaffolding
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
pnpm dlx @agent-native/core create my-brain --template brain --standalone
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Then open the app, add sources, import a transcript, and ask the agent to distill cited memories from the raw capture.
|
|
112
|
+
|
|
113
|
+
For a public demo, open the Ask page and choose **Start demo**. Brain seeds the
|
|
114
|
+
product-decision corpus, runs the demo eval, asks the cited freemium question,
|
|
115
|
+
then offers Review and Knowledge follow-ups. The seeded corpus demonstrates
|
|
116
|
+
product-decision recall, citation links, supersede behavior, review gating,
|
|
117
|
+
redaction, personal-content exclusion, and honest not-found behavior without
|
|
118
|
+
connecting a real workspace.
|
|
119
|
+
|
|
120
|
+
## Generic Ingest
|
|
121
|
+
|
|
122
|
+
Brain exposes a signed webhook for Clips and generic transcript/capture imports
|
|
123
|
+
at:
|
|
124
|
+
|
|
125
|
+
```txt
|
|
126
|
+
/api/_agent-native/brain/ingest
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Create a source with a `sourceKey` to receive a bearer token, then send a `RawCapturePayload`:
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"sourceKey": "clips",
|
|
134
|
+
"externalId": "meeting-123",
|
|
135
|
+
"title": "Pricing decision review",
|
|
136
|
+
"participants": ["Ada", "Grace"],
|
|
137
|
+
"occurredAt": "2026-05-15T15:00:00.000Z",
|
|
138
|
+
"transcript": "We decided to keep annual pricing because...",
|
|
139
|
+
"sourceUrl": "https://example.com/share/meeting-123",
|
|
140
|
+
"tags": ["pricing", "product"],
|
|
141
|
+
"raw": {}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Set `Authorization: Bearer <ingestToken>` on the request. Clips can export to
|
|
146
|
+
that endpoint without Brain reading the Clips database directly. Generic sources
|
|
147
|
+
use the same payload shape for call transcripts, customer research, imported
|
|
148
|
+
notes, or any other source that can produce a bounded capture.
|
|
149
|
+
|
|
150
|
+
## Slack Backfill
|
|
151
|
+
|
|
152
|
+
Brain resolves `SLACK_BOT_TOKEN` from a granted Slack workspace connection
|
|
153
|
+
first, then from backward-compatible Brain-local or registered vault
|
|
154
|
+
credentials. It scans only channels that an admin configures on the source:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
pnpm --filter brain action create-source \
|
|
158
|
+
--title "Slack product channels" \
|
|
159
|
+
--provider slack \
|
|
160
|
+
--visibility org \
|
|
161
|
+
--config '{"channelIds":["C0123456789"],"historyLimit":15}'
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The connector verifies each configured conversation before reading history and
|
|
165
|
+
rejects DMs and MPIMs. Cursor state is stored on the source so each sync can pick
|
|
166
|
+
up where the last one stopped, including after Slack rate limiting.
|
|
167
|
+
|
|
168
|
+
Use `test-slack-connection` before a production backfill. It validates the
|
|
169
|
+
Slack bot token with `auth.test` and, when channel refs are provided, checks
|
|
170
|
+
channel metadata without reading message history.
|
|
171
|
+
|
|
172
|
+
For Slack, grant the bot the smallest scopes needed for the source:
|
|
173
|
+
|
|
174
|
+
- `auth.test` for credential validation.
|
|
175
|
+
- `conversations.info` for allow-list verification and DM/MPIM rejection.
|
|
176
|
+
- `conversations.history` for allow-listed channel history.
|
|
177
|
+
- `chat.getPermalink` for durable citations.
|
|
178
|
+
- `conversations.list` only when setup resolves channel names instead of IDs.
|
|
179
|
+
|
|
180
|
+
Private channels require inviting the bot to the channel. Public channels may
|
|
181
|
+
also require joining or inviting the bot depending on the Slack app posture.
|
|
182
|
+
|
|
183
|
+
For local CLI/action-runner QA, put `SLACK_BOT_TOKEN` in a workspace connection,
|
|
184
|
+
registered vault secret, or Brain-local app credential before running source
|
|
185
|
+
actions. Brain source connectors intentionally do not read process environment
|
|
186
|
+
variables directly, so `.env.local` alone is not a credential source.
|
|
187
|
+
|
|
188
|
+
Use `run-slack-pilot` for a safer first-pass rollout report. The default action
|
|
189
|
+
validates the Slack credential and allow-listed channels, reports guardrails,
|
|
190
|
+
privacy exclusions, current knowledge/proposal counts, and next steps, and does
|
|
191
|
+
not call `conversations.history`. Only pass `readHistory: true` when the user
|
|
192
|
+
explicitly wants a tiny sample sync; the pilot caps the read to two validated
|
|
193
|
+
channels, one page per channel, ten messages per page, ten permalinks,
|
|
194
|
+
`autoSync: false`, and a recent default history window.
|
|
195
|
+
|
|
196
|
+
After a sample sync succeeds, list the imported inventory before opening raw
|
|
197
|
+
message bodies:
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
pnpm --filter brain action list-captures \
|
|
201
|
+
--sourceId <source-id> \
|
|
202
|
+
--status queued
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
The listing omits raw capture content by default and includes each capture's
|
|
206
|
+
latest distillation queue state. Use `get-capture` for one specific record when
|
|
207
|
+
a reviewer or agent needs exact source context, then write only durable, cited
|
|
208
|
+
knowledge. Keep `autoSync` disabled until the channel allow-list, review gate,
|
|
209
|
+
and first distilled entries are validated.
|
|
210
|
+
|
|
211
|
+
The Sources UI has the same flow: open **Captures** on a source card to review
|
|
212
|
+
queued records, opt into short previews only when needed, queue distillation,
|
|
213
|
+
see whether a capture is waiting on the distillation worker, or mark non-company
|
|
214
|
+
material ignored.
|
|
215
|
+
|
|
216
|
+
Slack source cards expose this as a clean rollout flow: **Test** checks the
|
|
217
|
+
credential and allow-list without history reads, **Safe pilot** imports only a
|
|
218
|
+
tiny capped sample, **Review captures** opens the capture inventory, and
|
|
219
|
+
**Review queue** sends reviewers to approve proposals before they become
|
|
220
|
+
queryable company memory.
|
|
221
|
+
|
|
222
|
+
Use `get-pilot-report` after a sample sync to inspect sync health, capture
|
|
223
|
+
counts, queue state, published knowledge, pending proposals, privacy notes, and
|
|
224
|
+
recommended rollout steps without returning raw capture bodies.
|
|
225
|
+
|
|
226
|
+
Recommended production rollout:
|
|
227
|
+
|
|
228
|
+
1. Start with one or two high-signal channels and channel IDs.
|
|
229
|
+
2. Keep `autoSync: false` until review quality is proven.
|
|
230
|
+
3. Run `test-slack-connection`, then `run-slack-pilot` without history.
|
|
231
|
+
4. Run one explicit `run-slack-pilot --readHistory true` sample when the report
|
|
232
|
+
is clean.
|
|
233
|
+
5. Review captures with previews only when needed; ignore social, personal, or
|
|
234
|
+
thin records.
|
|
235
|
+
6. Distill durable company context, approve proposal-gated memories, and verify
|
|
236
|
+
`ask-brain` returns cited Slack permalinks.
|
|
237
|
+
7. Expand with bounded manual `sync-source` runs before enabling background
|
|
238
|
+
polling.
|
|
239
|
+
|
|
240
|
+
When approving a proposal, keep the company-context switch off unless the
|
|
241
|
+
memory should be ambient context for Dispatch and other apps. Turn it on for
|
|
242
|
+
canonical decisions, policies, product facts, or durable process notes that are
|
|
243
|
+
safe to place under `context/company-brain/...`; Brain shows the exact Markdown
|
|
244
|
+
preview before approval publishes it. Use the Knowledge route or
|
|
245
|
+
`set-knowledge-canonical --published=false` to remove a mirrored resource after
|
|
246
|
+
previewing what will be removed, without deleting the underlying Brain
|
|
247
|
+
knowledge.
|
|
248
|
+
|
|
249
|
+
Distillation has two worker paths. When a Brain tab is open, the app shell
|
|
250
|
+
claims queued items with `claim-distillation` and delegates them to the app
|
|
251
|
+
agent in the background. When no tab is open, the `brain-distillation` server
|
|
252
|
+
sweep runs with `RUN_BACKGROUND_JOBS`, claims due queued rows, reclaims stale
|
|
253
|
+
`processing` rows, and invokes the same agent loop headlessly. Re-running
|
|
254
|
+
`enqueue-distillation` for an active queue item refreshes the handoff instead
|
|
255
|
+
of duplicating queue rows. The agent reads the capture, writes cited knowledge
|
|
256
|
+
or review proposals, then calls `mark-capture-distilled`, which marks the
|
|
257
|
+
active queue row done. If the agent does not close the queue, the worker
|
|
258
|
+
requeues the item with a short delay and eventually fails it after repeated
|
|
259
|
+
attempts.
|
|
260
|
+
|
|
261
|
+
The Ops route is the operator view for distillation. It lists queued,
|
|
262
|
+
processing, failed, done, stale, and retryable handoffs, backed by
|
|
263
|
+
`list-distillation-queue` and `retry-distillation`.
|
|
264
|
+
|
|
265
|
+
## Granola Polling
|
|
266
|
+
|
|
267
|
+
Brain resolves `GRANOLA_API_KEY` from a granted Granola workspace connection
|
|
268
|
+
first, then from backward-compatible Brain-local or registered vault
|
|
269
|
+
credentials. It polls Granola's public API for notes, then fetches each note
|
|
270
|
+
with its transcript:
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
pnpm --filter brain action create-source \
|
|
274
|
+
--title "Granola team notes" \
|
|
275
|
+
--provider granola \
|
|
276
|
+
--visibility org \
|
|
277
|
+
--config '{"pageSize":10,"updatedAfter":"2026-05-01T00:00:00.000Z"}'
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Granola Enterprise API keys expose Team-space notes, not private notes or
|
|
281
|
+
private folders. Brain stores the note summary, transcript, attendees, calendar
|
|
282
|
+
metadata, and source URL as a raw capture before distillation.
|
|
283
|
+
|
|
284
|
+
## GitHub Connector
|
|
285
|
+
|
|
286
|
+
GitHub is Brain's first reusable connector proof. It resolves `GITHUB_TOKEN`
|
|
287
|
+
from a granted GitHub workspace connection first, then from backward-compatible
|
|
288
|
+
Brain-local or registered vault credentials, and imports bounded issue and pull
|
|
289
|
+
request context from approved repositories:
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
pnpm --filter brain action create-source \
|
|
293
|
+
--title "GitHub product repos" \
|
|
294
|
+
--provider github \
|
|
295
|
+
--visibility org \
|
|
296
|
+
--config '{"repositories":["owner/repo"],"state":"all","limit":25}'
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
The connector accepts `repositories` or `repos`, optional `state`, `limit`,
|
|
300
|
+
`includeIssues`, and `includePullRequests`. Imported items become raw captures
|
|
301
|
+
with stable source URLs and can be distilled like Slack or meeting context. This
|
|
302
|
+
is intentionally Brain context ingestion, not a replacement for Analytics-style
|
|
303
|
+
GitHub reporting.
|
|
304
|
+
|
|
305
|
+
## Shared Workspace Connections
|
|
306
|
+
|
|
307
|
+
Brain sources can reuse shared workspace connections when Dispatch or another
|
|
308
|
+
workspace setup has already connected a provider and granted `appId=brain`
|
|
309
|
+
access. The source record still belongs to Brain: it stores channel ids,
|
|
310
|
+
repositories, sync cursors, review settings, and other source-specific choices,
|
|
311
|
+
while the provider credential stays in the workspace vault behind a connection
|
|
312
|
+
or grant credential ref.
|
|
313
|
+
|
|
314
|
+
The `list-connection-providers` action returns each Brain provider with
|
|
315
|
+
connection counts, grant state, credential reference names, credential health,
|
|
316
|
+
and whether Brain has access. It never returns credential values. Source sync
|
|
317
|
+
resolves credentials in this order:
|
|
318
|
+
|
|
319
|
+
1. Granted `workspace_connections` / `workspace_connection_grants` credential
|
|
320
|
+
refs for `appId=brain`.
|
|
321
|
+
2. Backward-compatible Brain-local SQL credentials.
|
|
322
|
+
3. Registered vault secrets for the same user/org/workspace scope.
|
|
323
|
+
|
|
324
|
+
Brain source credentials do not fall back to deploy-level environment
|
|
325
|
+
variables. If a shared provider exists but has not been granted to Brain, grant
|
|
326
|
+
Brain access instead of copying the same secret into a Brain-specific setting.
|
|
327
|
+
|
|
328
|
+
Keep the ownership model simple:
|
|
329
|
+
|
|
330
|
+
- Dispatch or the workspace layer owns provider account metadata, credential
|
|
331
|
+
ref names, and app grants.
|
|
332
|
+
- The vault owns the secret values.
|
|
333
|
+
- Brain owns source-local choices such as Slack channels, GitHub repositories,
|
|
334
|
+
Granola polling windows, cursors, review posture, and distillation status.
|
|
335
|
+
- Agents should inspect connection readiness first, then request a grant or
|
|
336
|
+
source configuration instead of asking the user for another provider token.
|
|
337
|
+
|
|
338
|
+
The Sources page surfaces the same provider catalog. A provider can be:
|
|
339
|
+
|
|
340
|
+
- `connected` when an active workspace connection is already granted to Brain.
|
|
341
|
+
- `granted` when Brain can access the connection but it is not currently active.
|
|
342
|
+
- `needs_grant` when the workspace has a connection that has not been granted to
|
|
343
|
+
Brain.
|
|
344
|
+
- `not_connected` when Brain is using scoped credentials or has no connection
|
|
345
|
+
yet.
|
|
346
|
+
|
|
347
|
+
The page also shows provider readiness: ready, grant needed, needs repair,
|
|
348
|
+
missing keys, or metadata only. Agents should inspect this same readiness via
|
|
349
|
+
`list-connection-providers` before asking users for duplicate Slack, Granola,
|
|
350
|
+
GitHub, or future provider credentials.
|
|
351
|
+
|
|
352
|
+
## Scheduled Sync
|
|
353
|
+
|
|
354
|
+
The Sources page includes a setup sheet for Slack, Granola, GitHub, Clips,
|
|
355
|
+
generic webhooks, and manual imports. Slack, Granola, and GitHub sources can
|
|
356
|
+
opt into `autoSync` with a `pollMinutes` cadence. Use `sync-source` for a
|
|
357
|
+
single source, `sync-due-sources` for all due accessible sources, or enable
|
|
358
|
+
`RUN_BACKGROUND_JOBS=1` locally to let the Brain background job poll due sources
|
|
359
|
+
from the Nitro process.
|
|
360
|
+
|
|
361
|
+
## Demo and Eval
|
|
362
|
+
|
|
363
|
+
Brain ships with a repeatable product-decision demo corpus. `seed-demo-data`
|
|
364
|
+
loads Slack, Clips, Granola, and webhook-style captures; creates cited knowledge
|
|
365
|
+
about retiring freemium, how Decision Digest works, and why product decisions
|
|
366
|
+
are the lead demo; queues a policy-sensitive proposal; redacts an email; and
|
|
367
|
+
keeps a personal aside out of queryable knowledge.
|
|
368
|
+
|
|
369
|
+
`run-demo-eval` checks the behavior that matters most for trust: recall,
|
|
370
|
+
citations, supersede links, proposal gating, redaction, and personal-content
|
|
371
|
+
exclusion. The Ask page includes a compact **Start demo** CTA for empty
|
|
372
|
+
workspaces and reveals Review, Knowledge, and **Run eval** follow-ups once the
|
|
373
|
+
demo is ready.
|
|
374
|
+
|
|
375
|
+
`run-retrieval-eval` checks an offline real-channel-style retrieval set. It
|
|
376
|
+
uses existing workspace Brain data when #dev-fusion stale Fusion branch answers
|
|
377
|
+
already have citation-backed support; otherwise, with `seedIfMissing` enabled,
|
|
378
|
+
it seeds a small Slack-style fallback corpus and re-runs the same checks. The
|
|
379
|
+
result covers Slack-style citations, branch-safety terms, and an unsupported
|
|
380
|
+
cleanup-cron not-found case. The same mode is available through `run-demo-eval`
|
|
381
|
+
with `mode: "retrieval"`.
|
|
382
|
+
|
|
383
|
+
The repository-level `pnpm test` command includes `pnpm test:brain-evals`, which
|
|
384
|
+
runs Brain's product-demo and retrieval action evals against a disposable local
|
|
385
|
+
SQLite database. The CI/prep eval path is fully seeded and offline; it does not
|
|
386
|
+
require production Slack, Granola, Clips, or any external workspace data.
|
|
387
|
+
|
|
388
|
+
## Privacy And Gating
|
|
389
|
+
|
|
390
|
+
Brain is designed for company memory, not personal surveillance:
|
|
391
|
+
|
|
392
|
+
- Slack sync only reads explicitly configured channels and rejects DMs/MPIMs.
|
|
393
|
+
- Granola sync reads Team-space notes exposed by Granola's API, not private
|
|
394
|
+
notes or private folders.
|
|
395
|
+
- Raw captures are redacted from listing/search surfaces by default; reviewers
|
|
396
|
+
and distillation flows request previews or raw content only when needed.
|
|
397
|
+
- Source configs can require review before distilled knowledge becomes durable
|
|
398
|
+
company memory.
|
|
399
|
+
- Settings control default publish tier, whether company-tier knowledge requires
|
|
400
|
+
approval, citation requirements, email redaction, and connector error
|
|
401
|
+
notifications.
|
|
402
|
+
- Demo/eval coverage checks proposal gating, PII redaction, personal-content
|
|
403
|
+
exclusion, citations, real-channel-style retrieval, and honest not-found
|
|
404
|
+
behavior.
|
|
405
|
+
|
|
406
|
+
## Developer Notes
|
|
407
|
+
|
|
408
|
+
The template follows the agent-native four-area contract:
|
|
409
|
+
|
|
410
|
+
- **UI:** Ask, Search, Knowledge, Review, Sources, Ops, and Settings routes.
|
|
411
|
+
- **Actions:** imports, source management, pilot reports, distillation queueing/claiming/retry, proposal review, cited search, and navigation/context actions.
|
|
412
|
+
- **Skills/instructions:** Brain-specific guidance for distillation and retrieval.
|
|
413
|
+
- **Application state:** route, filters, and selected IDs mirror into `application_state` for agent context.
|
|
414
|
+
|
|
415
|
+
See [Dispatch](/docs/dispatch) for the workspace control plane, the
|
|
416
|
+
[Dispatch template](/templates/dispatch) for the scaffolded app,
|
|
417
|
+
[Workspace](/docs/workspace) for shared resources, and
|
|
418
|
+
[A2A Protocol](/docs/a2a-protocol) for cross-app delegation.
|
|
@@ -26,8 +26,10 @@ If you're running an [multi-app workspace](/docs/multi-app-workspace) with many
|
|
|
26
26
|
- **Central inbox.** Slack DMs, Telegram messages, email notifications, A2A requests from other agents — all land in one place. The Dispatch agent triages and either handles them itself or delegates. See [Messaging](/docs/messaging) for how to wire Slack, email, and Telegram into your workspace.
|
|
27
27
|
- **Orchestrator, not specialist.** Dispatch does _not_ try to be the email app or the analytics app. When someone asks "summarize last week's signups," Dispatch calls the analytics agent over A2A and returns the answer. When someone asks "draft a reply to Alice," Dispatch calls the mail agent.
|
|
28
28
|
- **Secrets vault.** A central store for API keys, OAuth tokens, and shared credentials. Apps in the workspace resolve secrets from Dispatch instead of duplicating them in every `.env`. Requests + approvals for sensitive access.
|
|
29
|
+
- **Workspace resources.** Global skills, guardrail instructions, custom agent profiles, and reference resources can be created once in Dispatch. All-app resources are inherited at runtime by every app with no copy or manual sync step; selected grants are for app-specific exceptions.
|
|
29
30
|
- **Integrations catalog.** One page showing every third-party integration — Slack, Telegram, SendGrid, Apollo, etc. — with a "configured / not configured / pending approval" status per app.
|
|
30
31
|
- **Scheduled jobs hub.** Cross-app [recurring jobs](/docs/recurring-jobs) live here: "every weekday at 7, pull yesterday's key metrics from analytics and draft a morning summary email."
|
|
32
|
+
- **Dreams.** Dispatch can review recent agent runs, failures, feedback, and successful patterns to propose memory, skill, job, and instruction improvements before anything durable is applied.
|
|
31
33
|
- **Approval flow.** Destructive or external actions (sending money, shipping an outbound email, posting to Slack at scale) can require an admin OK before they fire. Dispatch owns the queue.
|
|
32
34
|
|
|
33
35
|
## When to use it {#when-to-use}
|
|
@@ -47,7 +49,9 @@ Day-to-day, Dispatch is the place admins and ops folks open to keep the workspac
|
|
|
47
49
|
|
|
48
50
|
- **Connect Slack, email, and Telegram** so people can message your agent from wherever they already work. See [Messaging](/docs/messaging) for the wiring steps.
|
|
49
51
|
- **Save shared secrets once.** API keys, OAuth tokens, and service credentials live in the vault and the other apps in your workspace pull from there instead of every team member juggling their own `.env`.
|
|
52
|
+
- **Keep company context global.** Put personas, positioning, messaging, company facts, brand guidelines, and guardrails in Dispatch Resources once, then preview the effective workspace -> app/org -> personal stack for any app/user or inspect the stack from an app card's Context view.
|
|
50
53
|
- **Set up recurring jobs.** "Every Monday at 7am, ask the analytics agent for last week's signups and email me a summary." See [Recurring Jobs](/docs/recurring-jobs).
|
|
54
|
+
- **Review dream proposals.** Dispatch Dreams inspect prior agent runs and create source-backed proposals for what the workspace should remember, which stale notes should be cleaned up, and which repeated lessons should become skills or jobs.
|
|
51
55
|
- **Approve outbound actions before they fire.** Sending money, mass-emailing customers, or posting to a public Slack channel can be gated behind an admin OK.
|
|
52
56
|
- **See who has access to what.** Per-app grants, request queue, and an audit log of who used which secret when.
|
|
53
57
|
- **Route messages to the right specialist.** A Slack DM about analytics goes to the analytics agent; one about email goes to the mail agent — Dispatch picks.
|
|
@@ -62,6 +66,32 @@ _How it works under the hood (for developers)._
|
|
|
62
66
|
- **Slack / Telegram plugins.** Server plugins that register webhooks and forward incoming messages to the orchestrator agent.
|
|
63
67
|
- **MCP hub mode.** Dispatch can act as the workspace's [MCP hub](/docs/mcp-clients#hub) so every other app in the workspace pulls the same org-scope MCP server list.
|
|
64
68
|
|
|
69
|
+
## Dreams {#dreams}
|
|
70
|
+
|
|
71
|
+
Dreams are Dispatch's review loop for agent memory. A dream pass looks over existing agent runs, thread debug data, feedback, evals, and repeated tool failures, then writes a report with proposed changes. The proposals can target personal memory, shared `LEARNINGS.md`, workspace instructions, workspace skills, workspace knowledge, workspace agents, or recurring jobs, but shared and workspace-level changes stay reviewable rather than being applied silently.
|
|
72
|
+
|
|
73
|
+
Dream proposals are checked against the personal memory index, existing `memory/*.md` files, and shared `LEARNINGS.md` before they are saved. Duplicate lessons are skipped in the report, while likely stale personal memories are updated in place instead of producing parallel notes. Within a report, Dreams also deduplicate repeated evidence by thread, signal type, and normalized quote, strip injected context from user-correction detection, and summarize raw eval/tool rows into human-readable bullets before they appear in proposal text. When a pass finds signals but intentionally creates no proposals, the report includes guardrail notes explaining which evidence was suppressed.
|
|
74
|
+
|
|
75
|
+
When Dispatch approval policy is enabled, applying a shared or team-wide dream proposal creates a pending approval request instead of writing immediately. Creating, updating, or deleting an All-app workspace resource also queues an approval request. Personal memory proposals and selected-only resource edits can still be applied directly after review.
|
|
76
|
+
|
|
77
|
+
Use Dreams when you want to answer questions like "what did agents keep getting wrong this week?", "what should we remember?", or "which repeated lesson deserves a skill?" Inbound Slack, email, Telegram, WhatsApp, and web-derived evidence is treated as untrusted input, so proposals from those sources require review and provenance before they affect shared memory. Workspace-instruction proposals require durable evidence spanning at least two threads or two source apps; eval-only noise, account setup issues, quota limits, and single-app UI wording corrections stay out of global instructions.
|
|
78
|
+
|
|
79
|
+
In the Dispatch UI, open **Dreams** to run a manual pass, review candidate threads, inspect the report, and open each proposal's review sheet before applying or rejecting it. Use **Settings** to edit the recurring cron schedule, source scope, timeout/concurrency limits, candidate limit, and minimum candidate threshold; use **Ensure schedule** after saving when you want the `jobs/dispatch-dream.md` recurring job materialized from those settings. The review sheet shows approval behavior, the current target content, proposed content, and source evidence. Agents use the same workflow through actions:
|
|
80
|
+
|
|
81
|
+
- `list-dream-candidates` finds recent threads with grounded signals such as explicit user corrections, failed runs, tool errors, feedback, eval failures, and successful checkpointed workflows. Pass `sourceId: "all"` or `sourceIds` to scan multiple thread-debug sources; `sourceTimeoutMs`, `sourceConcurrency`, `sourceStartStaggerMs`, `threadConcurrency`, and `threadTimeoutMs` keep production scans partial and bounded, and the response includes per-source health.
|
|
82
|
+
- `create-dream-report` creates the report and pending proposals. Multi-source reports include a Source Health section so partial scans are visible during review. Repeated corrections and recurring failures can become workspace-resource proposals such as `workspace-instruction`; repeated successful checkpointed workflows can become `workspace-skill` proposals.
|
|
83
|
+
- `get-dream-settings` and `set-dream-settings` read and update the recurring dream schedule, source scope, timeout/concurrency controls, limit, and minimum candidate threshold.
|
|
84
|
+
- `get-dream`, `preview-dream-proposal`, `apply-dream-proposal`, and `reject-dream-proposal` handle review.
|
|
85
|
+
- `ensure-dream-job` creates the safe recurring dream job once manual reports are useful.
|
|
86
|
+
|
|
87
|
+
The Dispatch template's local action runner also exposes packaged Dispatch actions, so in development you can run the same workflow from `apps/dispatch`:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
pnpm action get-dream-settings
|
|
91
|
+
pnpm action set-dream-settings --enabled true --schedule "0 9 * * 1" --allSources true --limit 8
|
|
92
|
+
pnpm action create-dream-report --allSources true --sourceTimeoutMs 30000 --limit 8
|
|
93
|
+
```
|
|
94
|
+
|
|
65
95
|
## Scaffolding {#scaffolding}
|
|
66
96
|
|
|
67
97
|
```bash
|