diff --git a/docs/.generated/plugin-sdk-api-baseline.sha256 b/docs/.generated/plugin-sdk-api-baseline.sha256 index 5bdd818e9088..46836bf2344e 100644 --- a/docs/.generated/plugin-sdk-api-baseline.sha256 +++ b/docs/.generated/plugin-sdk-api-baseline.sha256 @@ -48,6 +48,7 @@ f3cee48527f5cddde81912a588e72947d40443322b716871a8d9e5dc0c37c542 module/channel fb123c1b557ed2527e335f13c3d6de41ab0c3305151001cf2b1075d1da8034c5 module/channel-setup aeac9bb8127faf636dde79772a577d9cb003660ef3d1df03ddf606101020c402 module/channel-status f008d1d9ea73cd17e9833143bd117436599438523041fd157b6b6cb17500ac06 module/channel-streaming +d1ff8728d99acf8130b94db7ba75ad7050a549c96365f56b8d4f601a533ca947 module/channel-streaming-config 14f0103adb14627b662fbe9fdd5ed08596ed702a250853e8beb8bb8dd1361588 module/cli-argv c89ec1b194b76f67a6f4dd108dccf460da6065646cba31374c8aa748f23a39e4 module/collection-runtime 391e6f0c77da2e17a058fc5aea87fd193830b2a14e12fae77c7f63b0226f0bb5 module/command-auth diff --git a/docs/plugins/sdk-subpaths.md b/docs/plugins/sdk-subpaths.md index 0d9e9b8a85eb..9e1a9ce0df83 100644 --- a/docs/plugins/sdk-subpaths.md +++ b/docs/plugins/sdk-subpaths.md @@ -124,6 +124,7 @@ deprecated for new code; see the per-row notes below. | `plugin-sdk/channel-inbound-debounce` | Narrow inbound debounce helpers | | `plugin-sdk/channel-mention-gating` | Private-local after July 2026; Narrow mention-policy, mention marker, and mention text helpers without the broader inbound runtime surface | | `plugin-sdk/channel-streaming` | Deprecated compatibility facade. Use `plugin-sdk/channel-outbound`. | + | `plugin-sdk/channel-streaming-config` | Dependency-light channel streaming config readers (`getChannelStreamingConfigObject`, `resolveChannelStreamingNativeTransport`) for doctor contract closures and other control-plane paths that must not load the reply pipeline | | `plugin-sdk/channel-send-result` | Reply result types | | `plugin-sdk/channel-actions` | Channel message-action helpers, plus deprecated native schema helpers kept for plugin compatibility | | `plugin-sdk/channel-route` | Private-local after July 2026; Shared route normalization, parser-driven target resolution, thread-id stringification, dedupe/compact route keys, parsed-target types, and route/target comparison helpers | diff --git a/extensions/memory-core/src/short-term-promotion.ts b/extensions/memory-core/src/short-term-promotion.ts index 95c63aeb48a9..ae57147d2c3a 100644 --- a/extensions/memory-core/src/short-term-promotion.ts +++ b/extensions/memory-core/src/short-term-promotion.ts @@ -240,8 +240,6 @@ export { DEFAULT_PROMOTION_MIN_RECALL_COUNT, DEFAULT_PROMOTION_MIN_SCORE, DEFAULT_PROMOTION_MIN_UNIQUE_QUERIES, - SHORT_TERM_PHASE_SIGNAL_RELATIVE_PATH, - SHORT_TERM_STORE_RELATIVE_PATH, type PromotionCandidate, type RepairShortTermPromotionArtifactsResult, type ShortTermAuditSummary, @@ -249,8 +247,6 @@ export { type ShortTermDreamingStatsEntry, type ShortTermRecallEntry, } from "./short-term-promotion-types.js"; -export { normalizeShortTermPhaseSignalStore } from "./short-term-promotion-store.js"; -export { normalizeShortTermRecallStore } from "./short-term-promotion-utils.js"; export { filterFreshLightDreamingEntries, loadShortTermPromotionDreamingStats, diff --git a/extensions/memory-core/src/test-helpers.ts b/extensions/memory-core/src/test-helpers.ts index 77a29a293a22..4d2aef718ac5 100644 --- a/extensions/memory-core/src/test-helpers.ts +++ b/extensions/memory-core/src/test-helpers.ts @@ -25,11 +25,9 @@ import { writeMemoryCoreWorkspaceEntries, writeMemoryCoreWorkspaceEntry, } from "./dreaming-state.js"; -import { - normalizeShortTermPhaseSignalStore, - normalizeShortTermRecallStore, - type ShortTermRecallEntry, -} from "./short-term-promotion.js"; +import { normalizeShortTermPhaseSignalStore } from "./short-term-promotion-store.js"; +import { normalizeShortTermRecallStore } from "./short-term-promotion-utils.js"; +import type { ShortTermRecallEntry } from "./short-term-promotion.js"; const MEMORY_CORE_PLUGIN_ID = "memory-core"; diff --git a/extensions/slack/src/streaming-compat.ts b/extensions/slack/src/streaming-compat.ts index 5f282298ff01..f3dcc39bb2d0 100644 --- a/extensions/slack/src/streaming-compat.ts +++ b/extensions/slack/src/streaming-compat.ts @@ -1,10 +1,10 @@ // Slack plugin module implements streaming compat behavior. -// channel-streaming exports the same helpers without channel-outbound's +// channel-streaming-config exports the same helpers without channel-outbound's // reply-pipeline/channel-registry graph, which doctor enumeration cold-loads. import { getChannelStreamingConfigObject, resolveChannelStreamingNativeTransport, -} from "openclaw/plugin-sdk/channel-streaming"; +} from "openclaw/plugin-sdk/channel-streaming-config"; import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, diff --git a/package.json b/package.json index d177403638f3..13ac662c4f2e 100644 --- a/package.json +++ b/package.json @@ -431,6 +431,10 @@ "types": "./dist/plugin-sdk/channel-streaming.d.ts", "default": "./dist/plugin-sdk/channel-streaming.js" }, + "./plugin-sdk/channel-streaming-config": { + "types": "./dist/plugin-sdk/channel-streaming-config.d.ts", + "default": "./dist/plugin-sdk/channel-streaming-config.js" + }, "./plugin-sdk/setup-tools": { "types": "./dist/plugin-sdk/setup-tools.d.ts", "default": "./dist/plugin-sdk/setup-tools.js" diff --git a/scripts/lib/plugin-sdk-entrypoints.json b/scripts/lib/plugin-sdk-entrypoints.json index a49288856bbe..2d7f11a9ed98 100644 --- a/scripts/lib/plugin-sdk-entrypoints.json +++ b/scripts/lib/plugin-sdk-entrypoints.json @@ -13,6 +13,7 @@ "setup-runtime", "channel-setup", "channel-streaming", + "channel-streaming-config", "setup-tools", "archive", "root-walk", diff --git a/scripts/plugin-sdk-surface-report.mjs b/scripts/plugin-sdk-surface-report.mjs index a7de981a97ac..07c81d55d717 100644 --- a/scripts/plugin-sdk-surface-report.mjs +++ b/scripts/plugin-sdk-surface-report.mjs @@ -166,7 +166,8 @@ export function readPluginSdkSurfaceBudgets(env = process.env) { // +1: focused inbound-event delivery correlation for channel plugins. // +1: dependency-light agent scope helpers for doctor migration enumeration. // +1: dependency-light realtime-voice activation helpers for doctor closures. - 151, + // +1: dependency-light channel streaming config readers for doctor closures. + 152, env, ), publicExports: readPluginSdkSurfaceBudgetEnv( @@ -228,7 +229,8 @@ export function readPluginSdkSurfaceBudgets(env = process.env) { // +4: focused agent scope functions for doctor migration enumeration. // +1: shared transcript credential-safety prompt for plugin-owned agent harnesses. // +12: realtime-voice activation subpath re-exports and session-agent scope resolver. - 4852, + // +2: channel streaming config reader re-exports. + 4854, env, ), publicFunctionExports: readPluginSdkSurfaceBudgetEnv( @@ -281,7 +283,8 @@ export function readPluginSdkSurfaceBudgets(env = process.env) { // +1: simple channel secret contract factory replacing repeated collectors. // +4: focused agent scope functions for doctor migration enumeration. // +8: realtime-voice activation functions and session-agent scope resolver. - 2924, + // +2: channel streaming config reader functions. + 2926, env, ), publicDeprecatedExports: readPluginSdkSurfaceBudgetEnv( diff --git a/src/plugin-sdk/channel-streaming-config.ts b/src/plugin-sdk/channel-streaming-config.ts new file mode 100644 index 000000000000..d95df7c71cc1 --- /dev/null +++ b/src/plugin-sdk/channel-streaming-config.ts @@ -0,0 +1,12 @@ +/** + * Dependency-light channel streaming config readers. + * + * Doctor contract closures (e.g. Slack's streaming compat rules) need these + * pure config helpers; the broad `channel-outbound` barrel also value-loads + * the reply-pipeline/channel-registry graph, which doctor enumeration must + * not cold-load, and `channel-streaming` is a deprecated compat barrel. + */ +export { + getChannelStreamingConfigObject, + resolveChannelStreamingNativeTransport, +} from "../channels/streaming.js"; diff --git a/src/plugins/doctor-contract-closure-guard.test.ts b/src/plugins/doctor-contract-closure-guard.test.ts index aa9b4ea7edec..e3e18330ba08 100644 --- a/src/plugins/doctor-contract-closure-guard.test.ts +++ b/src/plugins/doctor-contract-closure-guard.test.ts @@ -66,7 +66,7 @@ const FORBIDDEN_SPECIFIER_RULES = new Map