Plugin SDK: guard package subpaths and fix Twitch setup export

* fix(plugins): add missing secret-input-schema build entry and Matrix runtime export

buildSecretInputSchema was not included in plugin-sdk-entrypoints.json,
so it was never emitted to dist/plugin-sdk/secret-input-schema.js. This
caused a ReferenceError during onboard when configuring channels that use
secret input schemas (matrix, feishu, mattermost, bluebubbles, nextcloud-talk, zalo).

Additionally, the Matrix extension's hand-written runtime-api barrel was
missing the re-export, unlike other extensions that use `export *` from
their plugin-sdk subpath.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Plugin SDK: guard package subpaths and fix Twitch setup export

* Plugin SDK: fix import guardrail drift

---------

Co-authored-by: hxy91819 <masonxhuang@icloud.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Vincent Koc
2026-03-17 23:56:49 -07:00
committed by GitHub
parent 8ac4b09fa4
commit 3d31ba7830
10 changed files with 218 additions and 49 deletions

View File

@@ -27,15 +27,25 @@ const RUNTIME_API_EXPORT_GUARDS: Record<string, readonly string[]> = {
'export * from "./src/send.js";',
],
"extensions/imessage/runtime-api.ts": [
'export * from "./src/monitor.js";',
'export * from "./src/probe.js";',
'export * from "./src/send.js";',
'export type { IMessageAccountConfig } from "../../src/config/types.imessage.js";',
'export type { ChannelPlugin } from "../../src/channels/plugins/types.plugin.js";',
'export { DEFAULT_ACCOUNT_ID, PAIRING_APPROVED_MESSAGE, buildChannelConfigSchema, getChatChannelMeta } from "../../src/plugin-sdk/channel-plugin-common.js";',
'export { formatTrimmedAllowFromEntries, resolveIMessageConfigAllowFrom, resolveIMessageConfigDefaultTo } from "../../src/plugin-sdk/channel-config-helpers.js";',
'export { collectStatusIssuesFromLastError } from "../../src/plugin-sdk/status-helpers.js";',
'export { resolveChannelMediaMaxBytes } from "../../src/channels/plugins/media-limits.js";',
'export { looksLikeIMessageTargetId, normalizeIMessageMessagingTarget } from "../../src/channels/plugins/normalize/imessage.js";',
'export { IMessageConfigSchema } from "../../src/config/zod-schema.providers-core.js";',
'export { resolveIMessageGroupRequireMention, resolveIMessageGroupToolPolicy } from "./src/group-policy.js";',
'export { monitorIMessageProvider } from "./src/monitor.js";',
'export type { MonitorIMessageOpts } from "./src/monitor.js";',
'export { probeIMessage } from "./src/probe.js";',
'export { sendMessageIMessage } from "./src/send.js";',
],
"extensions/googlechat/runtime-api.ts": ['export * from "openclaw/plugin-sdk/googlechat";'],
"extensions/nextcloud-talk/runtime-api.ts": [
'export * from "openclaw/plugin-sdk/nextcloud-talk";',
],
"extensions/signal/runtime-api.ts": ['export * from "./src/index.js";'],
"extensions/signal/runtime-api.ts": ['export * from "./src/runtime-api.js";'],
"extensions/slack/runtime-api.ts": [
'export * from "./src/action-runtime.js";',
'export * from "./src/directory-live.js";',
@@ -44,14 +54,21 @@ const RUNTIME_API_EXPORT_GUARDS: Record<string, readonly string[]> = {
'export * from "./src/resolve-users.js";',
],
"extensions/telegram/runtime-api.ts": [
'export * from "./src/audit.js";',
'export * from "./src/action-runtime.js";',
'export * from "./src/channel-actions.js";',
'export * from "./src/monitor.js";',
'export * from "./src/probe.js";',
'export * from "./src/send.js";',
'export * from "./src/thread-bindings.js";',
'export * from "./src/token.js";',
'export type { ChannelPlugin, OpenClawConfig, TelegramActionConfig } from "../../src/plugin-sdk/telegram-core.js";',
'export type { ChannelMessageActionAdapter } from "../../src/channels/plugins/types.js";',
'export type { TelegramAccountConfig, TelegramNetworkConfig } from "../../src/config/types.js";',
'export type { OpenClawPluginApi, OpenClawPluginService, OpenClawPluginServiceContext, PluginLogger } from "../../src/plugins/types.js";',
'export type { AcpRuntime, AcpRuntimeCapabilities, AcpRuntimeDoctorReport, AcpRuntimeEnsureInput, AcpRuntimeEvent, AcpRuntimeHandle, AcpRuntimeStatus, AcpRuntimeTurnInput, AcpSessionUpdateTag } from "../../src/acp/runtime/types.js";',
'export type { AcpRuntimeErrorCode } from "../../src/acp/runtime/errors.js";',
'export { AcpRuntimeError } from "../../src/acp/runtime/errors.js";',
'export { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../../src/routing/session-key.js";',
'export { buildChannelConfigSchema, getChatChannelMeta, jsonResult, readNumberParam, readReactionParams, readStringArrayParam, readStringOrNumberParam, readStringParam, resolvePollMaxSelections, TelegramConfigSchema } from "../../src/plugin-sdk/telegram-core.js";',
'export { parseTelegramTopicConversation } from "../../src/acp/conversation-id.js";',
'export { clearAccountEntryFields } from "../../src/channels/plugins/config-helpers.js";',
'export { buildTokenChannelStatusSummary } from "../../src/plugin-sdk/status-helpers.js";',
'export { projectCredentialSnapshotFields, resolveConfiguredFromCredentialStatuses } from "../../src/channels/account-snapshot-fields.js";',
'export { resolveTelegramPollVisibility } from "../../src/poll-params.js";',
'export { PAIRING_APPROVED_MESSAGE } from "../../src/channels/plugins/pairing-message.js";',
],
"extensions/whatsapp/runtime-api.ts": [
'export * from "./src/active-listener.js";',