mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-23 14:45:46 +00:00
refactor(plugin-runtime): remove plugin-specific core seams
This commit is contained in:
@@ -40,154 +40,6 @@ export const GENERATED_PLUGIN_SDK_FACADES = [
|
||||
"resolveAnthropicVertexRegionFromBaseUrl",
|
||||
],
|
||||
},
|
||||
{
|
||||
subpath: "discord-account",
|
||||
source: pluginSource("discord", "api.js"),
|
||||
exports: ["resolveDiscordAccount", "ResolvedDiscordAccount"],
|
||||
typeExports: ["ResolvedDiscordAccount"],
|
||||
},
|
||||
{
|
||||
subpath: "discord-runtime-surface",
|
||||
source: pluginSource("discord", "runtime-api.js"),
|
||||
// Runtime entrypoints should be blocked until the owning plugin is active.
|
||||
loadPolicy: "activated",
|
||||
exports: [
|
||||
"addRoleDiscord",
|
||||
"auditDiscordChannelPermissions",
|
||||
"banMemberDiscord",
|
||||
"collectDiscordAuditChannelIds",
|
||||
"createChannelDiscord",
|
||||
"createScheduledEventDiscord",
|
||||
"createThreadDiscord",
|
||||
"deleteChannelDiscord",
|
||||
"deleteMessageDiscord",
|
||||
"discordMessageActions",
|
||||
"editChannelDiscord",
|
||||
"editDiscordComponentMessage",
|
||||
"editMessageDiscord",
|
||||
"fetchChannelInfoDiscord",
|
||||
"fetchChannelPermissionsDiscord",
|
||||
"fetchMemberInfoDiscord",
|
||||
"fetchMessageDiscord",
|
||||
"fetchReactionsDiscord",
|
||||
"fetchRoleInfoDiscord",
|
||||
"fetchVoiceStatusDiscord",
|
||||
"getGateway",
|
||||
"getPresence",
|
||||
"hasAnyGuildPermissionDiscord",
|
||||
"kickMemberDiscord",
|
||||
"listDiscordDirectoryGroupsLive",
|
||||
"listDiscordDirectoryPeersLive",
|
||||
"listGuildChannelsDiscord",
|
||||
"listGuildEmojisDiscord",
|
||||
"listPinsDiscord",
|
||||
"listScheduledEventsDiscord",
|
||||
"listThreadsDiscord",
|
||||
"monitorDiscordProvider",
|
||||
"moveChannelDiscord",
|
||||
"pinMessageDiscord",
|
||||
"probeDiscord",
|
||||
"reactMessageDiscord",
|
||||
"readMessagesDiscord",
|
||||
"registerBuiltDiscordComponentMessage",
|
||||
"removeChannelPermissionDiscord",
|
||||
"removeOwnReactionsDiscord",
|
||||
"removeReactionDiscord",
|
||||
"removeRoleDiscord",
|
||||
"resolveDiscordChannelAllowlist",
|
||||
"resolveDiscordOutboundSessionRoute",
|
||||
"resolveDiscordUserAllowlist",
|
||||
"searchMessagesDiscord",
|
||||
"sendDiscordComponentMessage",
|
||||
"sendMessageDiscord",
|
||||
"sendPollDiscord",
|
||||
"sendStickerDiscord",
|
||||
"sendTypingDiscord",
|
||||
"sendVoiceMessageDiscord",
|
||||
"setChannelPermissionDiscord",
|
||||
"timeoutMemberDiscord",
|
||||
"unpinMessageDiscord",
|
||||
"uploadEmojiDiscord",
|
||||
"uploadStickerDiscord",
|
||||
],
|
||||
},
|
||||
{
|
||||
subpath: "discord-session-key",
|
||||
source: pluginSource("discord", "session-key-api.js"),
|
||||
exports: ["normalizeExplicitDiscordSessionKey"],
|
||||
},
|
||||
{
|
||||
subpath: "discord-surface",
|
||||
source: pluginSource("discord", "api.js"),
|
||||
exports: [
|
||||
"buildDiscordComponentMessage",
|
||||
"collectDiscordStatusIssues",
|
||||
"createDiscordActionGate",
|
||||
"DiscordComponentMessageSpec",
|
||||
"DiscordSendComponents",
|
||||
"DiscordSendEmbeds",
|
||||
"DiscordSendResult",
|
||||
"handleDiscordMessageAction",
|
||||
"inspectDiscordAccount",
|
||||
"isDiscordExecApprovalApprover",
|
||||
"isDiscordExecApprovalClientEnabled",
|
||||
"InspectedDiscordAccount",
|
||||
"listDiscordAccountIds",
|
||||
"listDiscordDirectoryGroupsFromConfig",
|
||||
"listDiscordDirectoryPeersFromConfig",
|
||||
"looksLikeDiscordTargetId",
|
||||
"normalizeDiscordMessagingTarget",
|
||||
"normalizeDiscordOutboundTarget",
|
||||
"readDiscordComponentSpec",
|
||||
"ResolvedDiscordAccount",
|
||||
"resolveDefaultDiscordAccountId",
|
||||
"resolveDiscordAccount",
|
||||
"resolveDiscordChannelId",
|
||||
"resolveDiscordRuntimeGroupPolicy",
|
||||
"resolveDiscordGroupRequireMention",
|
||||
"resolveDiscordGroupToolPolicy",
|
||||
],
|
||||
typeExports: [
|
||||
"DiscordComponentMessageSpec",
|
||||
"DiscordProbe",
|
||||
"DiscordSendComponents",
|
||||
"DiscordSendEmbeds",
|
||||
"DiscordSendResult",
|
||||
"DiscordTokenResolution",
|
||||
"InspectedDiscordAccount",
|
||||
"ResolvedDiscordAccount",
|
||||
],
|
||||
},
|
||||
{
|
||||
subpath: "discord-thread-bindings",
|
||||
source: pluginSource("discord", "runtime-api.js"),
|
||||
loadPolicy: "activated",
|
||||
directExports: {
|
||||
unbindThreadBindingsBySessionKey: "./discord-maintenance.js",
|
||||
},
|
||||
exports: [
|
||||
"autoBindSpawnedDiscordSubagent",
|
||||
"createThreadBindingManager",
|
||||
"getThreadBindingManager",
|
||||
"listThreadBindingsBySessionKey",
|
||||
"resolveThreadBindingIdleTimeoutMs",
|
||||
"resolveThreadBindingInactivityExpiresAt",
|
||||
"resolveThreadBindingMaxAgeExpiresAt",
|
||||
"resolveThreadBindingMaxAgeMs",
|
||||
"setThreadBindingIdleTimeoutBySessionKey",
|
||||
"setThreadBindingMaxAgeBySessionKey",
|
||||
"ThreadBindingManager",
|
||||
"ThreadBindingRecord",
|
||||
"ThreadBindingTargetKind",
|
||||
"unbindThreadBindingsBySessionKey",
|
||||
],
|
||||
typeExports: ["ThreadBindingManager", "ThreadBindingRecord", "ThreadBindingTargetKind"],
|
||||
},
|
||||
{
|
||||
subpath: "discord-timeouts",
|
||||
source: pluginSource("discord", "timeouts.js"),
|
||||
exports: ["DISCORD_DEFAULT_INBOUND_WORKER_TIMEOUT_MS", "DISCORD_DEFAULT_LISTENER_TIMEOUT_MS"],
|
||||
},
|
||||
{
|
||||
subpath: "anthropic-cli",
|
||||
source: pluginSource("anthropic", "api.js"),
|
||||
@@ -836,32 +688,6 @@ export const GENERATED_PLUGIN_SDK_FACADES = [
|
||||
source: pluginSource("qianfan", "api.js"),
|
||||
exports: ["QIANFAN_BASE_URL", "QIANFAN_DEFAULT_MODEL_ID", "buildQianfanProvider"],
|
||||
},
|
||||
{
|
||||
subpath: "signal-account",
|
||||
source: pluginSource("signal", "api.js"),
|
||||
exports: ["resolveSignalAccount", "ResolvedSignalAccount"],
|
||||
typeExports: ["ResolvedSignalAccount"],
|
||||
},
|
||||
{
|
||||
subpath: "signal-surface",
|
||||
source: pluginSource("signal", "api.js"),
|
||||
exports: [
|
||||
"isSignalSenderAllowed",
|
||||
"listEnabledSignalAccounts",
|
||||
"listSignalAccountIds",
|
||||
"monitorSignalProvider",
|
||||
"probeSignal",
|
||||
"removeReactionSignal",
|
||||
"ResolvedSignalAccount",
|
||||
"resolveDefaultSignalAccountId",
|
||||
"resolveSignalReactionLevel",
|
||||
"sendMessageSignal",
|
||||
"sendReactionSignal",
|
||||
"signalMessageActions",
|
||||
"SignalSender",
|
||||
],
|
||||
typeExports: ["ResolvedSignalAccount", "SignalProbe", "SignalSender"],
|
||||
},
|
||||
{
|
||||
subpath: "provider-reasoning",
|
||||
source: pluginSource("ollama", "api.js"),
|
||||
@@ -938,84 +764,6 @@ export const GENERATED_PLUGIN_SDK_FACADES = [
|
||||
"SYNTHETIC_MODEL_CATALOG",
|
||||
],
|
||||
},
|
||||
{
|
||||
subpath: "slack-target-parser",
|
||||
source: pluginSource("slack", "api.js"),
|
||||
exports: ["parseSlackTarget", "resolveSlackChannelId"],
|
||||
},
|
||||
{
|
||||
subpath: "slack-account",
|
||||
source: pluginSource("slack", "api.js"),
|
||||
exports: ["resolveSlackAccount", "ResolvedSlackAccount"],
|
||||
typeExports: ["ResolvedSlackAccount"],
|
||||
},
|
||||
{
|
||||
subpath: "slack-runtime-surface",
|
||||
source: pluginSource("slack", "runtime-api.js"),
|
||||
loadPolicy: "activated",
|
||||
exports: [
|
||||
"handleSlackAction",
|
||||
"listSlackDirectoryGroupsLive",
|
||||
"listSlackDirectoryPeersLive",
|
||||
"monitorSlackProvider",
|
||||
"probeSlack",
|
||||
"resolveSlackChannelAllowlist",
|
||||
"resolveSlackUserAllowlist",
|
||||
"sendMessageSlack",
|
||||
"SlackActionContext",
|
||||
],
|
||||
typeExports: ["SlackActionContext"],
|
||||
},
|
||||
{
|
||||
subpath: "slack-surface",
|
||||
source: pluginSource("slack", "api.js"),
|
||||
functionExports: [
|
||||
"listSlackAccountIds",
|
||||
"listSlackDirectoryGroupsFromConfig",
|
||||
"listSlackDirectoryPeersFromConfig",
|
||||
"resolveDefaultSlackAccountId",
|
||||
"resolveSlackRuntimeGroupPolicy",
|
||||
],
|
||||
exports: [
|
||||
"buildSlackThreadingToolContext",
|
||||
"createSlackWebClient",
|
||||
"deleteSlackMessage",
|
||||
"downloadSlackFile",
|
||||
"editSlackMessage",
|
||||
"extractSlackToolSend",
|
||||
"getSlackMemberInfo",
|
||||
"handleSlackHttpRequest",
|
||||
"inspectSlackAccount",
|
||||
"InspectedSlackAccount",
|
||||
"isSlackInteractiveRepliesEnabled",
|
||||
"listEnabledSlackAccounts",
|
||||
"listSlackAccountIds",
|
||||
"listSlackDirectoryGroupsFromConfig",
|
||||
"listSlackDirectoryPeersFromConfig",
|
||||
"listSlackEmojis",
|
||||
"listSlackMessageActions",
|
||||
"listSlackPins",
|
||||
"listSlackReactions",
|
||||
"normalizeAllowListLower",
|
||||
"parseSlackBlocksInput",
|
||||
"recordSlackThreadParticipation",
|
||||
"resolveDefaultSlackAccountId",
|
||||
"resolveSlackAutoThreadId",
|
||||
"resolveSlackGroupRequireMention",
|
||||
"resolveSlackRuntimeGroupPolicy",
|
||||
"resolveSlackGroupToolPolicy",
|
||||
"resolveSlackReplyToMode",
|
||||
"ResolvedSlackAccount",
|
||||
"sendSlackMessage",
|
||||
"pinSlackMessage",
|
||||
"reactSlackMessage",
|
||||
"readSlackMessages",
|
||||
"removeOwnSlackReactions",
|
||||
"removeSlackReaction",
|
||||
"unpinSlackMessage",
|
||||
],
|
||||
typeExports: ["InspectedSlackAccount", "ResolvedSlackAccount", "SlackProbe"],
|
||||
},
|
||||
{
|
||||
subpath: "together",
|
||||
source: pluginSource("together", "api.js"),
|
||||
@@ -1040,71 +788,6 @@ export const GENERATED_PLUGIN_SDK_FACADES = [
|
||||
"VENICE_MODEL_CATALOG",
|
||||
],
|
||||
},
|
||||
{
|
||||
subpath: "telegram-account",
|
||||
source: pluginSource("telegram", "api.js"),
|
||||
exports: ["resolveTelegramAccount", "ResolvedTelegramAccount"],
|
||||
typeExports: ["ResolvedTelegramAccount"],
|
||||
},
|
||||
{
|
||||
subpath: "telegram-allow-from",
|
||||
source: pluginSource("telegram", "api.js"),
|
||||
exports: ["isNumericTelegramUserId", "normalizeTelegramAllowFromEntry"],
|
||||
},
|
||||
{
|
||||
subpath: "telegram-surface",
|
||||
source: pluginSource("telegram", "api.js"),
|
||||
exports: [
|
||||
"buildBrowseProvidersButton",
|
||||
"buildModelsKeyboard",
|
||||
"buildProviderKeyboard",
|
||||
"buildTelegramGroupPeerId",
|
||||
"calculateTotalPages",
|
||||
"createTelegramActionGate",
|
||||
"fetchTelegramChatId",
|
||||
"getCacheStats",
|
||||
"getModelsPageSize",
|
||||
"inspectTelegramAccount",
|
||||
"InspectedTelegramAccount",
|
||||
"isTelegramExecApprovalApprover",
|
||||
"isTelegramExecApprovalAuthorizedSender",
|
||||
"isTelegramExecApprovalClientEnabled",
|
||||
"isTelegramExecApprovalTargetRecipient",
|
||||
"listTelegramAccountIds",
|
||||
"listTelegramDirectoryGroupsFromConfig",
|
||||
"listTelegramDirectoryPeersFromConfig",
|
||||
"looksLikeTelegramTargetId",
|
||||
"lookupTelegramChatId",
|
||||
"normalizeTelegramMessagingTarget",
|
||||
"parseTelegramReplyToMessageId",
|
||||
"parseTelegramTarget",
|
||||
"parseTelegramThreadId",
|
||||
"ProviderInfo",
|
||||
"ResolvedTelegramAccount",
|
||||
"resolveTelegramAutoThreadId",
|
||||
"resolveTelegramGroupRequireMention",
|
||||
"resolveTelegramGroupToolPolicy",
|
||||
"resolveTelegramInlineButtonsScope",
|
||||
"resolveTelegramPollActionGateState",
|
||||
"resolveTelegramReactionLevel",
|
||||
"resolveTelegramTargetChatType",
|
||||
"searchStickers",
|
||||
"sendTelegramPayloadMessages",
|
||||
"StickerMetadata",
|
||||
"TelegramButtonStyle",
|
||||
"TelegramInlineButtons",
|
||||
],
|
||||
typeExports: [
|
||||
"InspectedTelegramAccount",
|
||||
"ProviderInfo",
|
||||
"ResolvedTelegramAccount",
|
||||
"StickerMetadata",
|
||||
"TelegramButtonStyle",
|
||||
"TelegramInlineButtons",
|
||||
"TelegramProbe",
|
||||
"TelegramTokenResolution",
|
||||
],
|
||||
},
|
||||
{
|
||||
subpath: "vercel-ai-gateway",
|
||||
source: pluginSource("vercel-ai-gateway", "api.js"),
|
||||
@@ -1193,36 +876,6 @@ export const GENERATED_PLUGIN_SDK_FACADES = [
|
||||
"ZAI_GLOBAL_BASE_URL",
|
||||
],
|
||||
},
|
||||
{
|
||||
subpath: "whatsapp-targets",
|
||||
source: pluginSource("whatsapp", "api.js"),
|
||||
exports: ["isWhatsAppGroupJid", "isWhatsAppUserTarget", "normalizeWhatsAppTarget"],
|
||||
},
|
||||
{
|
||||
subpath: "whatsapp-surface",
|
||||
source: pluginSource("whatsapp", "api.js"),
|
||||
exportSources: {
|
||||
DEFAULT_WEB_MEDIA_BYTES: pluginSource("whatsapp", "constants.js"),
|
||||
},
|
||||
exports: [
|
||||
"DEFAULT_WEB_MEDIA_BYTES",
|
||||
"hasAnyWhatsAppAuth",
|
||||
"listEnabledWhatsAppAccounts",
|
||||
"listWhatsAppDirectoryGroupsFromConfig",
|
||||
"listWhatsAppDirectoryPeersFromConfig",
|
||||
"resolveWhatsAppAccount",
|
||||
"resolveWhatsAppGroupRequireMention",
|
||||
"resolveWhatsAppGroupToolPolicy",
|
||||
"resolveWhatsAppOutboundTarget",
|
||||
"whatsappAccessControlTesting",
|
||||
],
|
||||
typeExports: [
|
||||
"WebChannelStatus",
|
||||
"WebInboundMessage",
|
||||
"WebListenerCloseReason",
|
||||
"WebMonitorTuning",
|
||||
],
|
||||
},
|
||||
{
|
||||
subpath: "zalo-setup",
|
||||
source: pluginSource("zalo", "api.js"),
|
||||
|
||||
Reference in New Issue
Block a user