mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-23 09:01:16 +00:00
Plugins can register api.registerMcpServerConnectionResolver({serverName,
resolve}) to bind an MCP server's transport (url/headers) to the trusted
sender of each message. Server identity stays static; only the connection
is per-requester. Runtimes are cached per (sessionId, channel, accountId,
senderId); runs without a trusted requester fail closed (cron, subagent,
heartbeat). Resolved credentials never enter fingerprints or logs. Static
servers keep the existing session-scoped lifecycle byte-for-byte.
Enables per-user hosted MCP sessions (e.g. per-user OAuth email/calendar)
in multi-sender channels like Slack.
Refs #106229
61 lines
1.6 KiB
TypeScript
61 lines
1.6 KiB
TypeScript
// Provides the empty plugin registry used before discovery completes.
|
|
import type { PluginRegistry } from "./registry-types.js";
|
|
|
|
export function createEmptyPluginRegistry(): PluginRegistry {
|
|
return {
|
|
plugins: [],
|
|
tools: [],
|
|
hooks: [],
|
|
typedHooks: [],
|
|
channels: [],
|
|
channelSetups: [],
|
|
providers: [],
|
|
modelCatalogProviders: [],
|
|
sessionCatalogs: [],
|
|
cliBackends: [],
|
|
textTransforms: [],
|
|
embeddingProviders: [],
|
|
speechProviders: [],
|
|
realtimeTranscriptionProviders: [],
|
|
realtimeVoiceProviders: [],
|
|
mediaUnderstandingProviders: [],
|
|
transcriptSourceProviders: [],
|
|
imageGenerationProviders: [],
|
|
videoGenerationProviders: [],
|
|
musicGenerationProviders: [],
|
|
webFetchProviders: [],
|
|
webSearchProviders: [],
|
|
workerProviders: new Map(),
|
|
migrationProviders: [],
|
|
codexAppServerExtensionFactories: [],
|
|
agentToolResultMiddlewares: [],
|
|
memoryEmbeddingProviders: [],
|
|
agentHarnesses: [],
|
|
gatewayHandlers: {},
|
|
gatewayMethodDescriptors: [],
|
|
coreGatewayMethodNames: [],
|
|
httpRoutes: [],
|
|
hostedMediaResolvers: [],
|
|
mcpServerConnectionResolvers: [],
|
|
cliRegistrars: [],
|
|
reloads: [],
|
|
nodeHostCommands: [],
|
|
nodeInvokePolicies: [],
|
|
securityAuditCollectors: [],
|
|
services: [],
|
|
gatewayDiscoveryServices: [],
|
|
commands: [],
|
|
interactiveHandlers: [],
|
|
sessionExtensions: [],
|
|
trustedToolPolicies: [],
|
|
toolMetadata: [],
|
|
controlUiDescriptors: [],
|
|
runtimeLifecycles: [],
|
|
agentEventSubscriptions: [],
|
|
sessionSchedulerJobs: [],
|
|
sessionActions: [],
|
|
conversationBindingResolvedHandlers: [],
|
|
diagnostics: [],
|
|
};
|
|
}
|