@agent-native/core 0.15.13 → 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 +26 -2
- 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,509 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "Workspace Connections"
|
|
3
|
+
description: "Shared provider metadata, grants, and credential refs for connect-once-use-everywhere integrations."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Workspace Connections
|
|
7
|
+
|
|
8
|
+
Workspace connections are the framework path toward "connect once, grant apps,
|
|
9
|
+
use everywhere" integrations. The workspace/Dispatch layer records provider
|
|
10
|
+
accounts once, grants apps such as Brain, Analytics, Mail, and Dispatch access,
|
|
11
|
+
and lets each app's UI and agent inspect safe integration metadata before
|
|
12
|
+
asking for another credential.
|
|
13
|
+
|
|
14
|
+
They have two shared pieces:
|
|
15
|
+
|
|
16
|
+
- A typed provider catalog that templates import to describe the external
|
|
17
|
+
systems they understand.
|
|
18
|
+
- A scoped SQL store for connected accounts plus per-app grants, so Dispatch or
|
|
19
|
+
another workspace setup flow can connect Slack, GitHub, Google Drive, Granola,
|
|
20
|
+
or another provider once and then grant individual apps access.
|
|
21
|
+
|
|
22
|
+
The store records provider ids, account labels, non-secret config, credential
|
|
23
|
+
reference names, health state, and grant rows. It does not run OAuth and never
|
|
24
|
+
returns secret values. Secret values stay in the credential vault and are
|
|
25
|
+
resolved by actions at execution time from the request's user/org/workspace
|
|
26
|
+
scope.
|
|
27
|
+
|
|
28
|
+
Dispatch exposes the first control-plane implementation through the
|
|
29
|
+
`list-workspace-connections`, `upsert-workspace-connection`, and
|
|
30
|
+
`set-workspace-connection-grant` actions. App-specific actions then consume the
|
|
31
|
+
same records. Brain uses `list-connection-providers`; Analytics uses
|
|
32
|
+
`data-source-status`; future apps should expose the same kind of readiness
|
|
33
|
+
summary before asking users for duplicate provider keys.
|
|
34
|
+
|
|
35
|
+
## Provider Catalog
|
|
36
|
+
|
|
37
|
+
Import the catalog from `@agent-native/core/connections`:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import {
|
|
41
|
+
getWorkspaceConnectionProvider,
|
|
42
|
+
listWorkspaceConnectionProvidersForTemplate,
|
|
43
|
+
workspaceConnectionProviderSupports,
|
|
44
|
+
} from "@agent-native/core/connections";
|
|
45
|
+
|
|
46
|
+
const brainProviders = listWorkspaceConnectionProvidersForTemplate("brain");
|
|
47
|
+
const slack = getWorkspaceConnectionProvider("slack");
|
|
48
|
+
|
|
49
|
+
if (workspaceConnectionProviderSupports("slack", "messages")) {
|
|
50
|
+
// Offer a Slack source, sync check, or onboarding step.
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The initial provider ids are:
|
|
55
|
+
|
|
56
|
+
| Provider | Capabilities | Common uses |
|
|
57
|
+
| -------------- | ------------------------------ | ------------------------------ |
|
|
58
|
+
| `slack` | search, import, messages | brain, dispatch, analytics |
|
|
59
|
+
| `github` | search, import, code, docs | brain, analytics, dispatch |
|
|
60
|
+
| `notion` | search, import, docs | brain, content, dispatch |
|
|
61
|
+
| `gmail` | search, import, messages | mail, brain, dispatch |
|
|
62
|
+
| `google_drive` | search, import, docs | brain, content, slides |
|
|
63
|
+
| `hubspot` | search, import, crm | analytics, brain, mail |
|
|
64
|
+
| `granola` | search, import, meetings, docs | brain, calendar, dispatch |
|
|
65
|
+
| `clips` | search, import, meetings | brain, clips, videos |
|
|
66
|
+
| `generic` | search, import, docs | custom webhooks and file drops |
|
|
67
|
+
|
|
68
|
+
Credential keys are names only, such as `SLACK_BOT_TOKEN` or `GITHUB_TOKEN`.
|
|
69
|
+
Provider metadata must never include actual credential values.
|
|
70
|
+
|
|
71
|
+
## Connection Store
|
|
72
|
+
|
|
73
|
+
Import the shared store from `@agent-native/core/workspace-connections`:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
import {
|
|
77
|
+
listWorkspaceConnectionProviderCatalogForApp,
|
|
78
|
+
listWorkspaceConnectionGrants,
|
|
79
|
+
listWorkspaceConnections,
|
|
80
|
+
summarizeWorkspaceConnectionProviderForApp,
|
|
81
|
+
summarizeWorkspaceConnectionProviderReadiness,
|
|
82
|
+
upsertWorkspaceConnection,
|
|
83
|
+
upsertWorkspaceConnectionGrant,
|
|
84
|
+
revokeWorkspaceConnectionGrant,
|
|
85
|
+
} from "@agent-native/core/workspace-connections";
|
|
86
|
+
|
|
87
|
+
await upsertWorkspaceConnection({
|
|
88
|
+
id: "team-slack",
|
|
89
|
+
provider: "slack",
|
|
90
|
+
label: "Team Slack",
|
|
91
|
+
accountLabel: "Acme",
|
|
92
|
+
credentialRefs: [{ key: "SLACK_BOT_TOKEN", scope: "org" }],
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
await upsertWorkspaceConnectionGrant({
|
|
96
|
+
connectionId: "team-slack",
|
|
97
|
+
appId: "dispatch",
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
const connections = await listWorkspaceConnections({ includeDisabled: true });
|
|
101
|
+
const grants = await listWorkspaceConnectionGrants({ appId: "brain" });
|
|
102
|
+
|
|
103
|
+
const appGrant = summarizeWorkspaceConnectionProviderForApp({
|
|
104
|
+
providerId: "slack",
|
|
105
|
+
appId: "brain",
|
|
106
|
+
connections,
|
|
107
|
+
grants,
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const readiness = summarizeWorkspaceConnectionProviderReadiness({
|
|
111
|
+
provider: slack!,
|
|
112
|
+
appId: "brain",
|
|
113
|
+
connections,
|
|
114
|
+
grants,
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const brainCatalog = await listWorkspaceConnectionProviderCatalogForApp({
|
|
118
|
+
appId: "brain",
|
|
119
|
+
templateUse: "brain",
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The `credentialRefs` array points at vault keys; it is not credential storage.
|
|
124
|
+
For example, `{ key: "SLACK_BOT_TOKEN", scope: "org" }` tells a granted app to
|
|
125
|
+
look up the org-scoped vault secret named `SLACK_BOT_TOKEN` when it needs to
|
|
126
|
+
call Slack. Connection-level refs can describe the provider account, and
|
|
127
|
+
grant-level refs can narrow or override what a specific app should use.
|
|
128
|
+
|
|
129
|
+
Connection rows are scoped to the active org when one is present. Without an
|
|
130
|
+
org, they are scoped to the authenticated user. Grant rows use the same scope,
|
|
131
|
+
which means any member of an org can see org-level grants while other orgs and
|
|
132
|
+
personal scopes cannot.
|
|
133
|
+
|
|
134
|
+
`allowedApps` on a connection is still supported for compatibility:
|
|
135
|
+
|
|
136
|
+
- `allowedApps: []` means every app in the same scope may use the connection.
|
|
137
|
+
- `allowedApps: ["dispatch"]` grants access through the legacy field.
|
|
138
|
+
- `workspace_connection_grants` rows add explicit per-app grants alongside the
|
|
139
|
+
legacy field.
|
|
140
|
+
|
|
141
|
+
Use `revokeWorkspaceConnectionGrant(connectionId, appId)` to remove an explicit
|
|
142
|
+
grant. Revoking a grant does not change legacy `allowedApps`; if the app is
|
|
143
|
+
still listed there, the connection remains available to that app.
|
|
144
|
+
|
|
145
|
+
Use `summarizeWorkspaceConnectionProviderForApp()` and
|
|
146
|
+
`summarizeWorkspaceConnectionProviderReadiness()` for app-facing status instead
|
|
147
|
+
of hand-rolling grant checks. The shared summaries return the stable contract
|
|
148
|
+
used by Brain, Analytics, and Dispatch: `grantState`, `grantAvailability`,
|
|
149
|
+
safe credential ref names, per-app connection rows, counts for granted/active
|
|
150
|
+
connections, and readiness fields such as `readyConnectionCount` and
|
|
151
|
+
`missingRequiredCredentialKeys`.
|
|
152
|
+
|
|
153
|
+
For new app setup screens, prefer
|
|
154
|
+
`listWorkspaceConnectionProviderCatalogForApp()` as the higher-level boundary.
|
|
155
|
+
It combines the provider catalog, scoped connections, explicit grants,
|
|
156
|
+
per-app access summaries, and provider readiness into one safe shape. Apps can
|
|
157
|
+
add their own source counts, local health checks, and connector-specific
|
|
158
|
+
fields on top without duplicating grant logic.
|
|
159
|
+
|
|
160
|
+
## How This Complements The Vault
|
|
161
|
+
|
|
162
|
+
The credential vault answers: "Where is the secret stored, who can access it,
|
|
163
|
+
and which apps are granted it?"
|
|
164
|
+
|
|
165
|
+
Workspace connection provider metadata answers: "Which provider is this, what
|
|
166
|
+
can it do, what credential keys might it need, and which templates should offer
|
|
167
|
+
it?"
|
|
168
|
+
|
|
169
|
+
Use both together:
|
|
170
|
+
|
|
171
|
+
1. Dispatch or another workspace setup flow creates/grants the underlying vault
|
|
172
|
+
secret.
|
|
173
|
+
2. The workspace connection store records the provider account, safe metadata,
|
|
174
|
+
credential refs, and app grants.
|
|
175
|
+
3. Each app reads provider metadata from the catalog and connection/grant
|
|
176
|
+
summaries from the shared store.
|
|
177
|
+
4. The app UI shows readiness: connected, granted but unhealthy, needs grant,
|
|
178
|
+
missing credentials, or metadata-only.
|
|
179
|
+
5. App-specific SQL stores only app-specific source ids, cursors, filters, and
|
|
180
|
+
user choices.
|
|
181
|
+
6. App actions resolve credentials at execution time through granted connection
|
|
182
|
+
refs and the vault, and never return secret values.
|
|
183
|
+
|
|
184
|
+
App source connectors should not read deploy-level environment variables as a
|
|
185
|
+
fallback for user/org source credentials. Env vars are global to the deployment
|
|
186
|
+
and do not express workspace grants. Brain's current source resolver checks
|
|
187
|
+
granted workspace connection refs for `appId=brain` first, then backward
|
|
188
|
+
compatible Brain-local SQL credentials and registered vault secrets; it does not
|
|
189
|
+
fall back to `process.env`.
|
|
190
|
+
|
|
191
|
+
Agents should use the same summaries as the UI. Before asking for a duplicate
|
|
192
|
+
Slack, GitHub, HubSpot, Google, or other provider key, an agent should inspect
|
|
193
|
+
the workspace connection catalog or the app's readiness action and prefer a
|
|
194
|
+
granted shared connection when one exists. If a connection exists with
|
|
195
|
+
`needs_grant`, ask for that app grant instead of asking the user to paste a new
|
|
196
|
+
secret.
|
|
197
|
+
|
|
198
|
+
## Minimal Onboarding Flow
|
|
199
|
+
|
|
200
|
+
Use a connect-once flow before app-specific source setup:
|
|
201
|
+
|
|
202
|
+
1. Connect the provider account in Dispatch or the workspace integrations
|
|
203
|
+
surface.
|
|
204
|
+
2. Store safe metadata and credential ref names only; put secret values in the
|
|
205
|
+
vault.
|
|
206
|
+
3. Grant only the apps that need the provider, such as Brain, Analytics, Mail,
|
|
207
|
+
or Dispatch.
|
|
208
|
+
4. In each app, create the app-local source or data source with only the
|
|
209
|
+
provider-specific choices it owns: channels, repositories, polling windows,
|
|
210
|
+
filters, cursors, or sync cadence.
|
|
211
|
+
5. Agents inspect readiness and grants before asking for new credentials.
|
|
212
|
+
|
|
213
|
+
This keeps the UX clean: users connect Slack, GitHub, HubSpot, Google Drive,
|
|
214
|
+
Granola, and similar providers once, then choose which apps may use that
|
|
215
|
+
connection without duplicating secrets or scattering account setup across every
|
|
216
|
+
template.
|
|
217
|
+
|
|
218
|
+
## Build A Reusable Connector Once
|
|
219
|
+
|
|
220
|
+
When a new provider should work across multiple templates, split the work into
|
|
221
|
+
three layers:
|
|
222
|
+
|
|
223
|
+
1. **Provider metadata:** add or reuse a provider in
|
|
224
|
+
`@agent-native/core/connections`. This is the stable id, display label,
|
|
225
|
+
capability list, recommended template uses, and credential key names.
|
|
226
|
+
2. **Workspace connection:** Dispatch or another workspace setup surface stores
|
|
227
|
+
the connected account's safe metadata, status, scopes, `credentialRefs`, and
|
|
228
|
+
app grants through `@agent-native/core/workspace-connections`.
|
|
229
|
+
3. **App-local source:** Brain, Analytics, Mail, or another app stores only the
|
|
230
|
+
app-specific choices it owns, such as Slack channels, GitHub repositories,
|
|
231
|
+
HubSpot object filters, sync cursors, or polling cadence.
|
|
232
|
+
|
|
233
|
+
Do not duplicate OAuth/token storage in each app. The connection record should
|
|
234
|
+
say "this is Acme Slack and its token lives at `SLACK_BOT_TOKEN`"; the app-local
|
|
235
|
+
source should say "Brain may ingest `#product` and `#dev-fusion` from that
|
|
236
|
+
Slack connection."
|
|
237
|
+
|
|
238
|
+
### Dispatch control-plane setup
|
|
239
|
+
|
|
240
|
+
Dispatch exposes the current control-plane actions. They write the same shared
|
|
241
|
+
store functions an app could call directly from server code:
|
|
242
|
+
|
|
243
|
+
```ts
|
|
244
|
+
// templates/dispatch/actions/upsert-workspace-connection.ts delegates to this.
|
|
245
|
+
await upsertWorkspaceConnection({
|
|
246
|
+
id: "team-slack",
|
|
247
|
+
provider: "slack",
|
|
248
|
+
label: "Acme Slack",
|
|
249
|
+
accountId: "T012345",
|
|
250
|
+
accountLabel: "acme",
|
|
251
|
+
status: "connected",
|
|
252
|
+
scopes: ["channels:history", "groups:history"],
|
|
253
|
+
config: {
|
|
254
|
+
teamDomain: "acme",
|
|
255
|
+
preferredChannels: ["product", "dev-fusion"],
|
|
256
|
+
},
|
|
257
|
+
credentialRefs: [
|
|
258
|
+
{
|
|
259
|
+
key: "SLACK_BOT_TOKEN",
|
|
260
|
+
scope: "org",
|
|
261
|
+
provider: "slack",
|
|
262
|
+
label: "Slack bot token",
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
});
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Then grant the apps that should reuse the provider:
|
|
269
|
+
|
|
270
|
+
```ts
|
|
271
|
+
await upsertWorkspaceConnectionGrant({
|
|
272
|
+
connectionId: "team-slack",
|
|
273
|
+
appId: "brain",
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
await upsertWorkspaceConnectionGrant({
|
|
277
|
+
connectionId: "team-slack",
|
|
278
|
+
appId: "analytics",
|
|
279
|
+
});
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Use `allowedApps: []` only when a connection should be available to every app in
|
|
283
|
+
the same workspace scope. Prefer explicit grant rows for production setup,
|
|
284
|
+
because they make revocation, audit, and per-app readiness easier to explain.
|
|
285
|
+
|
|
286
|
+
### App consumption boundary
|
|
287
|
+
|
|
288
|
+
App setup screens and agents should use the high-level catalog helper whenever
|
|
289
|
+
they need provider readiness:
|
|
290
|
+
|
|
291
|
+
```ts
|
|
292
|
+
import { listWorkspaceConnectionProviderCatalogForApp } from "@agent-native/core/workspace-connections";
|
|
293
|
+
|
|
294
|
+
const catalog = await listWorkspaceConnectionProviderCatalogForApp({
|
|
295
|
+
appId: "brain",
|
|
296
|
+
templateUse: "brain",
|
|
297
|
+
provider: "slack",
|
|
298
|
+
includeConnections: "all",
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
const slack = catalog.providers[0];
|
|
302
|
+
if (slack.workspaceConnection.grantState === "needs_grant") {
|
|
303
|
+
// Show "Grant Brain access" instead of asking for a second Slack token.
|
|
304
|
+
}
|
|
305
|
+
if (slack.readiness.status === "needs_credentials") {
|
|
306
|
+
// Show the missing credential ref names, never a secret value.
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
App execution code can then resolve credential values from granted
|
|
311
|
+
`credentialRefs` through the vault in the active request scope. Brain's
|
|
312
|
+
`source-credentials.ts` is the current reference implementation: it lists
|
|
313
|
+
workspace connections for the provider, checks `getWorkspaceConnectionAppAccess`
|
|
314
|
+
for `appId: "brain"`, merges connection-level and grant-level credential refs,
|
|
315
|
+
and reads the first matching scoped vault secret. Other apps should follow that
|
|
316
|
+
shape instead of reaching for `process.env`.
|
|
317
|
+
|
|
318
|
+
## Concrete Provider Examples
|
|
319
|
+
|
|
320
|
+
### Slack: Brain, Analytics, Dispatch
|
|
321
|
+
|
|
322
|
+
Use one Slack workspace connection for channel history and messaging-related
|
|
323
|
+
workflows:
|
|
324
|
+
|
|
325
|
+
```ts
|
|
326
|
+
await upsertWorkspaceConnection({
|
|
327
|
+
id: "acme-slack",
|
|
328
|
+
provider: "slack",
|
|
329
|
+
label: "Acme Slack",
|
|
330
|
+
accountId: "T012345",
|
|
331
|
+
accountLabel: "Acme",
|
|
332
|
+
status: "connected",
|
|
333
|
+
scopes: ["channels:history", "groups:history", "chat:write"],
|
|
334
|
+
config: {
|
|
335
|
+
teamDomain: "acme",
|
|
336
|
+
channelHints: ["product", "dev-fusion", "customer-success"],
|
|
337
|
+
},
|
|
338
|
+
credentialRefs: [{ key: "SLACK_BOT_TOKEN", scope: "org" }],
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
await upsertWorkspaceConnectionGrant({
|
|
342
|
+
connectionId: "acme-slack",
|
|
343
|
+
appId: "brain",
|
|
344
|
+
});
|
|
345
|
+
await upsertWorkspaceConnectionGrant({
|
|
346
|
+
connectionId: "acme-slack",
|
|
347
|
+
appId: "analytics",
|
|
348
|
+
});
|
|
349
|
+
await upsertWorkspaceConnectionGrant({
|
|
350
|
+
connectionId: "acme-slack",
|
|
351
|
+
appId: "dispatch",
|
|
352
|
+
});
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
- **Brain** stores allow-listed channels, exclusion rules, cursors, and source
|
|
356
|
+
status in `brain_sources`; it resolves `SLACK_BOT_TOKEN` from the granted
|
|
357
|
+
workspace connection before Brain-local credentials.
|
|
358
|
+
- **Analytics** should check `data-source-status` for the Slack provider and
|
|
359
|
+
use shared readiness before requesting a Slack credential for channel or
|
|
360
|
+
funnel analysis.
|
|
361
|
+
- **Dispatch** owns the setup/grant UX and can use the same connection for
|
|
362
|
+
Slack-triggered routing, notifications, and agent entrypoints.
|
|
363
|
+
|
|
364
|
+
### HubSpot: Analytics, Brain, Mail
|
|
365
|
+
|
|
366
|
+
Use one HubSpot private app token for CRM records that multiple apps can
|
|
367
|
+
interpret differently:
|
|
368
|
+
|
|
369
|
+
```ts
|
|
370
|
+
await upsertWorkspaceConnection({
|
|
371
|
+
id: "acme-hubspot",
|
|
372
|
+
provider: "hubspot",
|
|
373
|
+
label: "Acme HubSpot",
|
|
374
|
+
accountLabel: "Acme CRM",
|
|
375
|
+
status: "connected",
|
|
376
|
+
scopes: ["crm.objects.contacts.read", "crm.objects.companies.read"],
|
|
377
|
+
config: {
|
|
378
|
+
portalId: "1234567",
|
|
379
|
+
objectHints: ["companies", "contacts", "deals"],
|
|
380
|
+
},
|
|
381
|
+
credentialRefs: [{ key: "HUBSPOT_PRIVATE_APP_TOKEN", scope: "org" }],
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
for (const appId of ["analytics", "brain", "mail"]) {
|
|
385
|
+
await upsertWorkspaceConnectionGrant({
|
|
386
|
+
connectionId: "acme-hubspot",
|
|
387
|
+
appId,
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
- **Analytics** is the first consumer for CRM metrics, lifecycle dashboards, and
|
|
393
|
+
customer segmentation. Its readiness action should show a HubSpot workspace
|
|
394
|
+
connection before asking for duplicate CRM secrets.
|
|
395
|
+
- **Brain** can ingest selected customer-facing context, policies, and product
|
|
396
|
+
rationale derived from CRM workflows while keeping Brain-specific allow-lists
|
|
397
|
+
and proposal gates in Brain SQL.
|
|
398
|
+
- **Mail** should use the same workspace connection pattern when adding CRM
|
|
399
|
+
enrichment to mailbox workflows. The provider catalog already recommends
|
|
400
|
+
`hubspot` for `mail`; a Mail readiness action should call
|
|
401
|
+
`listWorkspaceConnectionProviderCatalogForApp({ appId: "mail" })` before
|
|
402
|
+
prompting for a HubSpot token.
|
|
403
|
+
|
|
404
|
+
### GitHub: Brain, Analytics, Dispatch
|
|
405
|
+
|
|
406
|
+
Use one GitHub connection for repositories, issues, pull requests, and code
|
|
407
|
+
context:
|
|
408
|
+
|
|
409
|
+
```ts
|
|
410
|
+
await upsertWorkspaceConnection({
|
|
411
|
+
id: "acme-github",
|
|
412
|
+
provider: "github",
|
|
413
|
+
label: "Acme GitHub",
|
|
414
|
+
accountLabel: "acme",
|
|
415
|
+
status: "connected",
|
|
416
|
+
scopes: ["contents:read", "issues:read", "pull_requests:read"],
|
|
417
|
+
config: {
|
|
418
|
+
owner: "acme",
|
|
419
|
+
repositoryHints: ["agent-native", "website"],
|
|
420
|
+
},
|
|
421
|
+
credentialRefs: [{ key: "GITHUB_TOKEN", scope: "org" }],
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
await upsertWorkspaceConnectionGrant({
|
|
425
|
+
connectionId: "acme-github",
|
|
426
|
+
appId: "brain",
|
|
427
|
+
});
|
|
428
|
+
await upsertWorkspaceConnectionGrant({
|
|
429
|
+
connectionId: "acme-github",
|
|
430
|
+
appId: "analytics",
|
|
431
|
+
});
|
|
432
|
+
await upsertWorkspaceConnectionGrant({
|
|
433
|
+
connectionId: "acme-github",
|
|
434
|
+
appId: "dispatch",
|
|
435
|
+
});
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
- **Brain** can turn issues, pull requests, and design discussions into cited
|
|
439
|
+
product memory, with app-local repo allow-lists and distillation rules.
|
|
440
|
+
- **Analytics** can use the same granted token for engineering throughput,
|
|
441
|
+
release, and operational dashboards.
|
|
442
|
+
- **Dispatch** can route GitHub-related questions to the right app or connected
|
|
443
|
+
agent without owning repository-specific ingestion state.
|
|
444
|
+
|
|
445
|
+
## Consumer Guide By Surface
|
|
446
|
+
|
|
447
|
+
| Surface | What it should read | What it should store locally |
|
|
448
|
+
| ------------- | ------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
449
|
+
| **Dispatch** | Full provider catalog, connections, grants, app targets | Workspace setup policy, grant choices, safe account metadata |
|
|
450
|
+
| **Brain** | Catalog helper with `{ appId: "brain" }` | Sources, allow-lists, cursors, extraction rules, proposals |
|
|
451
|
+
| **Analytics** | `data-source-status` plus workspace provider summaries | Metric definitions, datasets, sync windows, dashboard choices |
|
|
452
|
+
| **Mail** | A Mail readiness action using the same catalog helper | Mailboxes, labels, reply rules, CRM enrichment preferences |
|
|
453
|
+
| **Agents** | App readiness actions before asking for secrets | No secret values; only cite provider ids, grant state, next steps |
|
|
454
|
+
|
|
455
|
+
Agents should follow a simple rule: if a user asks to connect Slack, GitHub,
|
|
456
|
+
HubSpot, Gmail, Google Drive, Granola, or another shared provider, inspect the
|
|
457
|
+
workspace connection catalog first. If the provider is `connected`, use it. If
|
|
458
|
+
it is `needs_grant`, ask for or perform the app grant. If it is
|
|
459
|
+
`needs_credentials`, ask for the missing vault key. Only ask for a new raw key
|
|
460
|
+
when no reusable connection exists.
|
|
461
|
+
|
|
462
|
+
## App Readiness Pattern
|
|
463
|
+
|
|
464
|
+
Apps that consume shared provider credentials should expose a read-only
|
|
465
|
+
readiness action and a small setup surface:
|
|
466
|
+
|
|
467
|
+
- **Provider catalog:** provider id, label, capabilities, recommended template
|
|
468
|
+
uses, and required credential key names from `@agent-native/core/connections`.
|
|
469
|
+
- **Workspace summary:** connection count, active/granted counts, connection
|
|
470
|
+
statuses, grant state, credential ref names, and non-secret account labels
|
|
471
|
+
from `@agent-native/core/workspace-connections`. Use
|
|
472
|
+
`summarizeWorkspaceConnectionProviderForApp()` for this shape.
|
|
473
|
+
- **Provider readiness:** use
|
|
474
|
+
`summarizeWorkspaceConnectionProviderReadiness()` when the UI needs the
|
|
475
|
+
provider-level `ready`, `needs_credentials`, `needs_attention`, `checking`,
|
|
476
|
+
`disabled`, or `not_configured` status.
|
|
477
|
+
- **Credential health:** whether required keys can be resolved without exposing
|
|
478
|
+
values.
|
|
479
|
+
- **Source state:** app-local configured sources, cursors, sync status, and
|
|
480
|
+
next action.
|
|
481
|
+
|
|
482
|
+
Brain's Sources page is the reference implementation. It shows reusable
|
|
483
|
+
workspace connection providers beside Brain source records, labels grant states
|
|
484
|
+
as `connected`, `granted`, `needs_grant`, or `not_connected`, and shows provider
|
|
485
|
+
health as ready, missing keys, grant needed, needs repair, or metadata only.
|
|
486
|
+
That lets a Brain user create Slack, Granola, GitHub, Clips, generic, or manual
|
|
487
|
+
sources with a clear signal about whether the shared credential path is ready,
|
|
488
|
+
grantable, scoped locally, or missing.
|
|
489
|
+
|
|
490
|
+
## Path To Connect Once, Use Everywhere
|
|
491
|
+
|
|
492
|
+
The provider catalog and grant store are the foundation for a broader workspace
|
|
493
|
+
layer:
|
|
494
|
+
|
|
495
|
+
- Shared provider ids and capability names keep templates aligned.
|
|
496
|
+
- Workspace-level inventory can show which providers are configured across
|
|
497
|
+
Brain, Mail, Analytics, Dispatch, and future apps.
|
|
498
|
+
- Connection rows record account labels, status, allowed apps, credential refs,
|
|
499
|
+
and health checks without changing template-facing provider ids.
|
|
500
|
+
- Grant rows let a workspace owner connect once, then enable individual apps as
|
|
501
|
+
the workspace adopts them.
|
|
502
|
+
- Agents can route work across apps knowing which providers are already
|
|
503
|
+
connected and which apps have grants.
|
|
504
|
+
- Federated search can ask for providers with `search`, `docs`, `messages`,
|
|
505
|
+
`meetings`, `crm`, or `code` capabilities instead of hardcoding every app's
|
|
506
|
+
connector list.
|
|
507
|
+
|
|
508
|
+
Keep the boundary strict: provider metadata is safe to show; credential values
|
|
509
|
+
stay in the vault.
|
|
@@ -181,16 +181,16 @@ When reviewing PRs in this environment:
|
|
|
181
181
|
|
|
182
182
|
The [Dispatch](/docs/dispatch) app is the workspace's runtime control plane. It complements git-level governance with runtime governance:
|
|
183
183
|
|
|
184
|
-
| Concern | Git / GitHub | Dispatch
|
|
185
|
-
| ------------------------------- | ----------------------------- |
|
|
186
|
-
| Who can change code | CODEOWNERS, branch protection | —
|
|
187
|
-
| Who can access secrets | — | Vault policy, grants, request workflow
|
|
188
|
-
| What instructions agents follow | — |
|
|
189
|
-
| Which agents are shared | — | Workspace agent profiles
|
|
190
|
-
| Integration inventory | — | Integrations catalog
|
|
191
|
-
| Runtime change approval | — | Dispatch approval flow
|
|
192
|
-
| Audit trail | `git log` / `git blame` | Vault audit + dispatch audit logs
|
|
193
|
-
| Messaging & routing | — | Slack / Telegram integration
|
|
184
|
+
| Concern | Git / GitHub | Dispatch |
|
|
185
|
+
| ------------------------------- | ----------------------------- | ------------------------------------------------------------ |
|
|
186
|
+
| Who can change code | CODEOWNERS, branch protection | — |
|
|
187
|
+
| Who can access secrets | — | Vault policy, grants, request workflow |
|
|
188
|
+
| What instructions agents follow | — | Global workspace resources (AGENTS.md, instructions, skills) |
|
|
189
|
+
| Which agents are shared | — | Workspace agent profiles |
|
|
190
|
+
| Integration inventory | — | Integrations catalog |
|
|
191
|
+
| Runtime change approval | — | Dispatch approval flow |
|
|
192
|
+
| Audit trail | `git log` / `git blame` | Vault audit + dispatch audit logs |
|
|
193
|
+
| Messaging & routing | — | Slack / Telegram integration |
|
|
194
194
|
|
|
195
195
|
**Git handles code governance. Dispatch handles runtime governance.** Don't try to replicate git workflows inside dispatch or vice versa. They cover different surfaces.
|
|
196
196
|
|
|
@@ -198,7 +198,7 @@ The [Dispatch](/docs/dispatch) app is the workspace's runtime control plane. It
|
|
|
198
198
|
|
|
199
199
|
- **Vault** — store credentials centrally and sync on demand. The default policy makes all vault keys available to all workspace apps; manual mode requires specific app grants. Non-admins can request access; admins approve.
|
|
200
200
|
- **Integrations catalog** — see which credentials each app needs, what's configured, what's missing, what's granted from the vault.
|
|
201
|
-
- **Workspace resources** —
|
|
201
|
+
- **Workspace resources** — manage global skills, always-on guardrail instructions, reusable agent profiles, and reference resources inherited by apps. Use `AGENTS.md` or `instructions/<slug>.md` for instructions loaded every turn, `skills/<slug>/SKILL.md` for on-demand skills, and `context/<slug>.md` for brand/company/product knowledge. Scope to All apps for workspace defaults; apps read those defaults at runtime with no copy or manual sync step, and app shared or personal resources can override locally. The Resources page highlights the starter global context files, can restore missing starter files, and each app card shows the exact inherited/granted resources that app receives.
|
|
202
202
|
- **Approvals** — require review before runtime changes (destinations, settings) take effect.
|
|
203
203
|
- **Audit** — full history of secret access, grants, syncs, and changes.
|
|
204
204
|
|
|
@@ -253,7 +253,7 @@ For a new workspace, after running `agent-native create`:
|
|
|
253
253
|
- [ ] Add shared secrets to the vault (API keys, OAuth credentials, etc.)
|
|
254
254
|
- [ ] Keep the default all-apps vault policy or switch to manual per-app grants
|
|
255
255
|
- [ ] Sync vault secrets to push them to apps
|
|
256
|
-
- [ ] Add workspace-wide skills
|
|
256
|
+
- [ ] Add workspace-wide skills, guardrail instructions, and brand/company reference resources via the Resources page: `context/company.md`, `context/brand.md`, `context/messaging.md`, `instructions/guardrails.md`, and `skills/company-voice/SKILL.md`
|
|
257
257
|
- [ ] Configure the approval policy and approver emails
|
|
258
258
|
- [ ] Set up SendGrid (`SENDGRID_API_KEY`, `SENDGRID_FROM_EMAIL`) for admin notifications
|
|
259
259
|
- [ ] Connect Slack or Telegram for workspace messaging
|