diff --git a/docs/plugins/sdk-migration.md b/docs/plugins/sdk-migration.md index 49cb030080f..4d735f752f7 100644 --- a/docs/plugins/sdk-migration.md +++ b/docs/plugins/sdk-migration.md @@ -129,6 +129,25 @@ releases. must receive config from their boundary, and long-lived runtime modules have zero allowed ambient `loadConfig()` calls. + New plugin code should also avoid importing the broad + `openclaw/plugin-sdk/config-runtime` compatibility barrel. Use the narrow + SDK subpath that matches the job: + + | Need | Import | + | --- | --- | + | Config types such as `OpenClawConfig` | `openclaw/plugin-sdk/config-types` | + | Already-loaded config assertions and plugin-entry config lookup | `openclaw/plugin-sdk/plugin-config-runtime` | + | Current runtime snapshot reads | `openclaw/plugin-sdk/runtime-config-snapshot` | + | Config writes | `openclaw/plugin-sdk/config-mutation` | + | Session store helpers | `openclaw/plugin-sdk/session-store-runtime` | + | Markdown table config | `openclaw/plugin-sdk/markdown-table-runtime` | + | Group policy runtime helpers | `openclaw/plugin-sdk/runtime-group-policy` | + | Secret input resolution | `openclaw/plugin-sdk/secret-input-runtime` | + | Model/session overrides | `openclaw/plugin-sdk/model-session-runtime` | + + Bundled production plugins are scanner-guarded against the broad barrel so + imports stay local to the behavior they need. + diff --git a/docs/plugins/sdk-runtime.md b/docs/plugins/sdk-runtime.md index 2412111c798..3414d3a63e2 100644 --- a/docs/plugins/sdk-runtime.md +++ b/docs/plugins/sdk-runtime.md @@ -43,6 +43,12 @@ The mutation helpers return `afterWrite` plus a typed `followUp` summary so call `api.runtime.config.loadConfig()` and `api.runtime.config.writeConfigFile(...)` are deprecated compatibility helpers under `runtime-config-load-write`. They warn once at runtime, and bundled plugins must not use them; the config boundary guards fail if production plugin code calls them or imports those helpers from plugin SDK subpaths. +For direct SDK imports, use the focused config subpaths instead of the broad +`openclaw/plugin-sdk/config-runtime` compatibility barrel: `config-types` for +types, `plugin-config-runtime` for already-loaded config assertions and plugin +entry lookup, `runtime-config-snapshot` for current process snapshots, and +`config-mutation` for writes. + Internal OpenClaw runtime code has the same direction: load config once at the CLI, gateway, or process boundary, then pass that value through. Successful mutation writes refresh the process runtime snapshot and advance its internal revision; long-lived caches should key off the runtime-owned cache key instead of serializing config locally. Long-lived runtime modules have a zero-tolerance scanner for ambient `loadConfig()` calls; use a passed `cfg`, a request `context.getRuntimeConfig()`, or `getRuntimeConfig()` at an explicit process boundary. ## Runtime namespaces diff --git a/docs/plugins/sdk-subpaths.md b/docs/plugins/sdk-subpaths.md index e3adf2818b6..9fc0f2da9ab 100644 --- a/docs/plugins/sdk-subpaths.md +++ b/docs/plugins/sdk-subpaths.md @@ -161,7 +161,10 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview) | `plugin-sdk/process-runtime` | Process exec helpers | | `plugin-sdk/cli-runtime` | CLI formatting, wait, version, argument-invocation, and lazy command-group helpers | | `plugin-sdk/gateway-runtime` | Gateway client, gateway CLI RPC, gateway protocol errors, and channel-status patch helpers | - | `plugin-sdk/config-runtime` | Config load/write helpers and plugin-config lookup helpers | + | `plugin-sdk/config-types` | Type-only config surface for plugin config shapes such as `OpenClawConfig` and channel/provider config types | + | `plugin-sdk/plugin-config-runtime` | Runtime plugin-config lookup helpers such as `requireRuntimeConfig`, `resolvePluginConfigObject`, and `resolveLivePluginConfigObject` | + | `plugin-sdk/config-mutation` | Transactional config mutation helpers such as `mutateConfigFile`, `replaceConfigFile`, and `logConfigUpdated` | + | `plugin-sdk/runtime-config-snapshot` | Current process config snapshot helpers such as `getRuntimeConfig`, `getRuntimeConfigSnapshot`, and test snapshot setters | | `plugin-sdk/telegram-command-config` | Telegram command-name/description normalization and duplicate/conflict checks, even when the bundled Telegram contract surface is unavailable | | `plugin-sdk/text-autolink-runtime` | File-reference autolink detection without the broad text-runtime barrel | | `plugin-sdk/approval-runtime` | Exec/plugin approval helpers, approval-capability builders, auth/profile helpers, native routing/runtime helpers, and structured approval display path formatting | @@ -170,7 +173,8 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview) | `plugin-sdk/reply-history` | Shared short-window reply-history helpers such as `buildHistoryContext`, `recordPendingHistoryEntry`, and `clearHistoryEntriesIfEnabled` | | `plugin-sdk/reply-reference` | `createReplyReferencePlanner` | | `plugin-sdk/reply-chunking` | Narrow text/markdown chunking helpers | - | `plugin-sdk/session-store-runtime` | Session store path + updated-at helpers | + | `plugin-sdk/session-store-runtime` | Session store path, session-key, updated-at, and store mutation helpers | + | `plugin-sdk/cron-store-runtime` | Cron store path/load/save helpers | | `plugin-sdk/state-paths` | State/OAuth dir path helpers | | `plugin-sdk/routing` | Route/session-key/account binding helpers such as `resolveAgentRoute`, `buildAgentSessionKey`, and `resolveDefaultAgentBoundAccountId` | | `plugin-sdk/status-helpers` | Shared channel/account status summary helpers, runtime-state defaults, and issue metadata helpers | @@ -184,6 +188,8 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview) | `plugin-sdk/temp-path` | Shared temp-download path helpers | | `plugin-sdk/logging-core` | Subsystem logger and redaction helpers | | `plugin-sdk/markdown-table-runtime` | Markdown table mode and conversion helpers | + | `plugin-sdk/model-session-runtime` | Model/session override helpers such as `applyModelOverrideToSessionEntry` and `resolveAgentMaxConcurrent` | + | `plugin-sdk/talk-config-runtime` | Talk provider config resolution helpers | | `plugin-sdk/json-store` | Small JSON state read/write helpers | | `plugin-sdk/file-lock` | Re-entrant file-lock helpers | | `plugin-sdk/persistent-dedupe` | Disk-backed dedupe cache helpers | @@ -207,7 +213,7 @@ For the plugin authoring guide, see [Plugin SDK overview](/plugins/sdk-overview) | `plugin-sdk/runtime-fetch` | Dispatcher-aware runtime fetch without proxy/guarded-fetch imports | | `plugin-sdk/response-limit-runtime` | Bounded response-body reader without the broad media runtime surface | | `plugin-sdk/session-binding-runtime` | Current conversation binding state without configured binding routing or pairing stores | - | `plugin-sdk/session-store-runtime` | Session-store read helpers without broad config writes/maintenance imports | + | `plugin-sdk/session-store-runtime` | Session-store helpers without broad config writes/maintenance imports | | `plugin-sdk/context-visibility-runtime` | Context visibility resolution and supplemental context filtering without broad config/security imports | | `plugin-sdk/string-coerce-runtime` | Narrow primitive record/string coercion and normalization helpers without markdown/logging imports | | `plugin-sdk/host-runtime` | Hostname and SCP host normalization helpers | diff --git a/extensions/active-memory/index.ts b/extensions/active-memory/index.ts index 3b8bb2a35df..d9f552d1a09 100644 --- a/extensions/active-memory/index.ts +++ b/extensions/active-memory/index.ts @@ -9,14 +9,16 @@ import { resolveAgentWorkspaceDir, resolveDefaultModelForAgent, } from "openclaw/plugin-sdk/agent-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveLivePluginConfigObject, resolvePluginConfigObject, +} from "openclaw/plugin-sdk/plugin-config-runtime"; +import { definePluginEntry, type OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry"; +import { resolveSessionStoreEntry, updateSessionStore, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; -import { definePluginEntry, type OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry"; +} from "openclaw/plugin-sdk/session-store-runtime"; import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path"; const DEFAULT_TIMEOUT_MS = 15_000; diff --git a/extensions/amazon-bedrock/register.sync.runtime.ts b/extensions/amazon-bedrock/register.sync.runtime.ts index 018fa4c03e9..603dffc3783 100644 --- a/extensions/amazon-bedrock/register.sync.runtime.ts +++ b/extensions/amazon-bedrock/register.sync.runtime.ts @@ -1,5 +1,6 @@ import type { StreamFn } from "@mariozechner/pi-agent-core"; -import { resolvePluginConfigObject, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime"; import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry"; import { ANTHROPIC_BY_MODEL_REPLAY_HOOKS, diff --git a/extensions/bluebubbles/src/accounts.ts b/extensions/bluebubbles/src/accounts.ts index a2b1276e6f0..2ce35a8a06a 100644 --- a/extensions/bluebubbles/src/accounts.ts +++ b/extensions/bluebubbles/src/accounts.ts @@ -4,7 +4,7 @@ import { resolveMergedAccountConfig, } from "openclaw/plugin-sdk/account-resolution"; import { resolveChannelStreamingChunkMode } from "openclaw/plugin-sdk/channel-streaming"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { normalizeBlueBubblesAccountsMap, diff --git a/extensions/bluebubbles/src/config-apply.ts b/extensions/bluebubbles/src/config-apply.ts index bc3c0322ecf..bcc56a24bae 100644 --- a/extensions/bluebubbles/src/config-apply.ts +++ b/extensions/bluebubbles/src/config-apply.ts @@ -1,5 +1,5 @@ import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; type BlueBubblesConfigPatch = { serverUrl?: string; diff --git a/extensions/bluebubbles/src/conversation-bindings.test.ts b/extensions/bluebubbles/src/conversation-bindings.test.ts index 4356e6cf365..b21f0b7645e 100644 --- a/extensions/bluebubbles/src/conversation-bindings.test.ts +++ b/extensions/bluebubbles/src/conversation-bindings.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { __testing as sessionBindingTesting, getSessionBindingService, diff --git a/extensions/bluebubbles/src/conversation-bindings.ts b/extensions/bluebubbles/src/conversation-bindings.ts index 00d192d8318..303c84155e5 100644 --- a/extensions/bluebubbles/src/conversation-bindings.ts +++ b/extensions/bluebubbles/src/conversation-bindings.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { createAccountScopedConversationBindingManager, resetAccountScopedConversationBindingsForTests, diff --git a/extensions/bluebubbles/src/conversation-route.test.ts b/extensions/bluebubbles/src/conversation-route.test.ts index eec5fa9bc60..f6aefb8c824 100644 --- a/extensions/bluebubbles/src/conversation-route.test.ts +++ b/extensions/bluebubbles/src/conversation-route.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { __testing as sessionBindingTesting, registerSessionBindingAdapter, diff --git a/extensions/bluebubbles/src/conversation-route.ts b/extensions/bluebubbles/src/conversation-route.ts index 41bd58dc45c..6bf5927f16d 100644 --- a/extensions/bluebubbles/src/conversation-route.ts +++ b/extensions/bluebubbles/src/conversation-route.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRoute, diff --git a/extensions/bluebubbles/src/group-policy.ts b/extensions/bluebubbles/src/group-policy.ts index 34a95441c4a..dd593f89fef 100644 --- a/extensions/bluebubbles/src/group-policy.ts +++ b/extensions/bluebubbles/src/group-policy.ts @@ -3,7 +3,7 @@ import { resolveChannelGroupToolsPolicy, type GroupToolPolicyConfig, } from "openclaw/plugin-sdk/channel-policy"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; type BlueBubblesGroupContext = { cfg: OpenClawConfig; diff --git a/extensions/bluebubbles/src/monitor-processing-api.ts b/extensions/bluebubbles/src/monitor-processing-api.ts index 7b7eb3e0d7f..3ba8ba16b09 100644 --- a/extensions/bluebubbles/src/monitor-processing-api.ts +++ b/extensions/bluebubbles/src/monitor-processing-api.ts @@ -10,7 +10,7 @@ export { resolveDmGroupAccessWithLists, } from "openclaw/plugin-sdk/channel-policy"; export { resolveControlCommandGate } from "openclaw/plugin-sdk/command-auth"; -export { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/config-runtime"; +export { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime"; export { evictOldHistoryKeys, recordPendingHistoryEntryIfEnabled, diff --git a/extensions/bluebubbles/src/monitor-shared.ts b/extensions/bluebubbles/src/monitor-shared.ts index d41501d6362..8b9baf79463 100644 --- a/extensions/bluebubbles/src/monitor-shared.ts +++ b/extensions/bluebubbles/src/monitor-shared.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ResolvedBlueBubblesAccount } from "./accounts.js"; import { getBlueBubblesRuntime } from "./runtime.js"; export { diff --git a/extensions/bluebubbles/src/runtime-api.ts b/extensions/bluebubbles/src/runtime-api.ts index 23df82e0180..71524ac363d 100644 --- a/extensions/bluebubbles/src/runtime-api.ts +++ b/extensions/bluebubbles/src/runtime-api.ts @@ -54,7 +54,7 @@ export { resolveWebhookTargetWithAuthOrRejectSync, withResolvedWebhookRequestPipeline, } from "openclaw/plugin-sdk/webhook-ingress"; -export { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/config-runtime"; +export { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime"; export { evaluateSupplementalContextVisibility, shouldIncludeSupplementalContext, diff --git a/extensions/bluebubbles/src/setup-surface.test.ts b/extensions/bluebubbles/src/setup-surface.test.ts index ea0b4ddf9cf..9a49ea3a622 100644 --- a/extensions/bluebubbles/src/setup-surface.test.ts +++ b/extensions/bluebubbles/src/setup-surface.test.ts @@ -1,5 +1,5 @@ import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/routing"; import { isPrivateNetworkOptInEnabled } from "openclaw/plugin-sdk/ssrf-runtime"; import { describe, expect, it, vi } from "vitest"; diff --git a/extensions/codex/index.ts b/extensions/codex/index.ts index 6441be5c4da..cb0ebd850cb 100644 --- a/extensions/codex/index.ts +++ b/extensions/codex/index.ts @@ -1,7 +1,5 @@ -import { - resolveLivePluginConfigObject, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { resolveLivePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime"; import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry"; import { createCodexAppServerAgentHarness } from "./harness.js"; import { buildCodexMediaUnderstandingProvider } from "./media-understanding-provider.js"; diff --git a/extensions/codex/provider.ts b/extensions/codex/provider.ts index c52e5034c1b..20f47402758 100644 --- a/extensions/codex/provider.ts +++ b/extensions/codex/provider.ts @@ -1,5 +1,5 @@ -import { resolvePluginConfigObject } from "openclaw/plugin-sdk/config-runtime"; import { createSubsystemLogger } from "openclaw/plugin-sdk/core"; +import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime"; import type { ProviderRuntimeModel } from "openclaw/plugin-sdk/plugin-entry"; import { normalizeModelCompat, diff --git a/extensions/comfy/test-helpers.ts b/extensions/comfy/test-helpers.ts index 8d3f8885e53..f6a9fd6b1c7 100644 --- a/extensions/comfy/test-helpers.ts +++ b/extensions/comfy/test-helpers.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import * as providerAuth from "openclaw/plugin-sdk/provider-auth-runtime"; import { expect, vi } from "vitest"; diff --git a/extensions/comfy/workflow-runtime.ts b/extensions/comfy/workflow-runtime.ts index da4bd0fa00f..bb4791e6f44 100644 --- a/extensions/comfy/workflow-runtime.ts +++ b/extensions/comfy/workflow-runtime.ts @@ -1,5 +1,5 @@ import fs from "node:fs/promises"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { canResolveEnvSecretRefInReadOnlyPath } from "openclaw/plugin-sdk/extension-shared"; import { isProviderApiKeyConfigured, diff --git a/extensions/diffs/api.ts b/extensions/diffs/api.ts index dbbc492439a..c94fbb4bf35 100644 --- a/extensions/diffs/api.ts +++ b/extensions/diffs/api.ts @@ -1,4 +1,4 @@ -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { definePluginEntry, type AnyAgentTool, diff --git a/extensions/diffs/src/plugin.ts b/extensions/diffs/src/plugin.ts index 4de9140d4e4..c15e2078711 100644 --- a/extensions/diffs/src/plugin.ts +++ b/extensions/diffs/src/plugin.ts @@ -1,5 +1,5 @@ import path from "node:path"; -import { resolveLivePluginConfigObject } from "openclaw/plugin-sdk/config-runtime"; +import { resolveLivePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime"; import { resolvePreferredOpenClawTmpDir, type OpenClawConfig, diff --git a/extensions/discord/account-inspect-api.ts b/extensions/discord/account-inspect-api.ts index 4a24677b3d7..250b0eeb012 100644 --- a/extensions/discord/account-inspect-api.ts +++ b/extensions/discord/account-inspect-api.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { inspectDiscordAccount } from "./src/account-inspect.js"; export function inspectDiscordReadOnlyAccount(cfg: OpenClawConfig, accountId?: string | null) { diff --git a/extensions/discord/src/account-inspect.test.ts b/extensions/discord/src/account-inspect.test.ts index f474d5af861..bd73b27f72f 100644 --- a/extensions/discord/src/account-inspect.test.ts +++ b/extensions/discord/src/account-inspect.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { inspectDiscordAccount } from "./account-inspect.js"; diff --git a/extensions/discord/src/actions/handle-action.test.ts b/extensions/discord/src/actions/handle-action.test.ts index c162cf9d4cc..512397212df 100644 --- a/extensions/discord/src/actions/handle-action.test.ts +++ b/extensions/discord/src/actions/handle-action.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; const runtimeModule = await import("./runtime.js"); diff --git a/extensions/discord/src/actions/runtime.moderation.authz.test.ts b/extensions/discord/src/actions/runtime.moderation.authz.test.ts index 20eb1bc82be..00a9ec6fe29 100644 --- a/extensions/discord/src/actions/runtime.moderation.authz.test.ts +++ b/extensions/discord/src/actions/runtime.moderation.authz.test.ts @@ -1,5 +1,5 @@ import { PermissionFlagsBits } from "discord-api-types/v10"; -import type { DiscordActionConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordActionConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { EMPTY_DISCORD_TEST_CONFIG } from "../test-support/config.js"; import { diff --git a/extensions/discord/src/actions/runtime.presence.test.ts b/extensions/discord/src/actions/runtime.presence.test.ts index 263381f2a35..867e74637f3 100644 --- a/extensions/discord/src/actions/runtime.presence.test.ts +++ b/extensions/discord/src/actions/runtime.presence.test.ts @@ -1,5 +1,5 @@ import type { GatewayPlugin } from "@buape/carbon/gateway"; -import type { DiscordActionConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordActionConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { clearGateways, registerGateway } from "../monitor/gateway-registry.js"; import type { ActionGate } from "../runtime-api.js"; diff --git a/extensions/discord/src/actions/runtime.test.ts b/extensions/discord/src/actions/runtime.test.ts index 4a32e34cacf..49edd7fe9cf 100644 --- a/extensions/discord/src/actions/runtime.test.ts +++ b/extensions/discord/src/actions/runtime.test.ts @@ -1,5 +1,5 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { DiscordActionConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { DiscordActionConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { clearPresences, setPresence } from "../monitor/presence-cache.js"; import { EMPTY_DISCORD_TEST_CONFIG } from "../test-support/config.js"; diff --git a/extensions/discord/src/approval-handler.runtime.ts b/extensions/discord/src/approval-handler.runtime.ts index 05ef65f13a4..e7cd416c85b 100644 --- a/extensions/discord/src/approval-handler.runtime.ts +++ b/extensions/discord/src/approval-handler.runtime.ts @@ -19,7 +19,7 @@ import type { PluginApprovalResolvedView, } from "openclaw/plugin-sdk/approval-handler-runtime"; import { createChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime"; -import type { DiscordExecApprovalConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordExecApprovalConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ExecApprovalActionDescriptor, ExecApprovalDecision, diff --git a/extensions/discord/src/approval-native.ts b/extensions/discord/src/approval-native.ts index 007af27cec8..1119188d552 100644 --- a/extensions/discord/src/approval-native.ts +++ b/extensions/discord/src/approval-native.ts @@ -2,7 +2,7 @@ import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-s import type { ChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime"; import { resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-runtime"; import type { ChannelApprovalCapability } from "openclaw/plugin-sdk/channel-contract"; -import type { DiscordExecApprovalConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordExecApprovalConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, diff --git a/extensions/discord/src/approval-shared.ts b/extensions/discord/src/approval-shared.ts index a9fb93ccd6b..cd7773fb11f 100644 --- a/extensions/discord/src/approval-shared.ts +++ b/extensions/discord/src/approval-shared.ts @@ -1,5 +1,5 @@ import { doesApprovalRequestMatchChannelAccount } from "openclaw/plugin-sdk/approval-native-runtime"; -import type { DiscordExecApprovalConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordExecApprovalConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ExecApprovalRequest, PluginApprovalRequest } from "openclaw/plugin-sdk/infra-runtime"; import { resolveDiscordAccount } from "./accounts.js"; import { diff --git a/extensions/discord/src/audit-core.ts b/extensions/discord/src/audit-core.ts index f124a066e34..60263b77c7c 100644 --- a/extensions/discord/src/audit-core.ts +++ b/extensions/discord/src/audit-core.ts @@ -2,7 +2,7 @@ import type { DiscordGuildChannelConfig, DiscordGuildEntry, OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { isRecord, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/discord/src/audit.test.ts b/extensions/discord/src/audit.test.ts index fb9b015d90e..8b078092524 100644 --- a/extensions/discord/src/audit.test.ts +++ b/extensions/discord/src/audit.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { auditDiscordChannelPermissionsWithFetcher, diff --git a/extensions/discord/src/audit.ts b/extensions/discord/src/audit.ts index 60ffb524c54..1893c34c134 100644 --- a/extensions/discord/src/audit.ts +++ b/extensions/discord/src/audit.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { inspectDiscordAccount } from "./account-inspect.js"; import { auditDiscordChannelPermissionsWithFetcher, diff --git a/extensions/discord/src/channel-actions.contract.test.ts b/extensions/discord/src/channel-actions.contract.test.ts index c0db13297f4..25bb2db3884 100644 --- a/extensions/discord/src/channel-actions.contract.test.ts +++ b/extensions/discord/src/channel-actions.contract.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe } from "vitest"; import { installChannelActionsContractSuite } from "../../../test/helpers/channels/registry-contract-suites.js"; import { discordPlugin } from "../api.js"; diff --git a/extensions/discord/src/channel-actions.test.ts b/extensions/discord/src/channel-actions.test.ts index 28b7b74fcc7..161a044fe5d 100644 --- a/extensions/discord/src/channel-actions.test.ts +++ b/extensions/discord/src/channel-actions.test.ts @@ -1,5 +1,5 @@ import type { ChannelMessageActionContext } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { withEnv } from "openclaw/plugin-sdk/testing"; import { describe, expect, it, vi } from "vitest"; diff --git a/extensions/discord/src/channel-actions.ts b/extensions/discord/src/channel-actions.ts index 96fd7907675..6dcc0d82e5c 100644 --- a/extensions/discord/src/channel-actions.ts +++ b/extensions/discord/src/channel-actions.ts @@ -7,7 +7,7 @@ import type { ChannelMessageActionName, ChannelMessageToolDiscovery, } from "openclaw/plugin-sdk/channel-contract"; -import type { DiscordActionConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordActionConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { extractToolSend } from "openclaw/plugin-sdk/tool-send"; import { diff --git a/extensions/discord/src/channel-api.ts b/extensions/discord/src/channel-api.ts index 4664eb4a3b2..5e582023598 100644 --- a/extensions/discord/src/channel-api.ts +++ b/extensions/discord/src/channel-api.ts @@ -7,7 +7,7 @@ export { } from "openclaw/plugin-sdk/channel-status"; export { createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers"; export type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; const DISCORD_CHANNEL_META = { id: "discord", diff --git a/extensions/discord/src/client.test.ts b/extensions/discord/src/client.test.ts index 986c1468938..20bf9587b7a 100644 --- a/extensions/discord/src/client.test.ts +++ b/extensions/discord/src/client.test.ts @@ -1,5 +1,5 @@ import type { RequestClient } from "@buape/carbon"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { createDiscordRestClient } from "./client.js"; diff --git a/extensions/discord/src/client.ts b/extensions/discord/src/client.ts index 8483eb7cced..bba03322410 100644 --- a/extensions/discord/src/client.ts +++ b/extensions/discord/src/client.ts @@ -1,5 +1,6 @@ import { RequestClient } from "@buape/carbon"; -import { requireRuntimeConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import type { RetryConfig, RetryRunner } from "openclaw/plugin-sdk/retry-runtime"; import { normalizeAccountId } from "openclaw/plugin-sdk/routing"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; diff --git a/extensions/discord/src/delivery-retry.ts b/extensions/discord/src/delivery-retry.ts index cc0c45efa35..a7f52a410fc 100644 --- a/extensions/discord/src/delivery-retry.ts +++ b/extensions/discord/src/delivery-retry.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveRetryConfig, retryAsync, diff --git a/extensions/discord/src/directory-live.test.ts b/extensions/discord/src/directory-live.test.ts index c36f1c619ab..c487fb79168 100644 --- a/extensions/discord/src/directory-live.test.ts +++ b/extensions/discord/src/directory-live.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { DirectoryConfigParams } from "openclaw/plugin-sdk/directory-runtime"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { listDiscordDirectoryGroupsLive, listDiscordDirectoryPeersLive } from "./directory-live.js"; diff --git a/extensions/discord/src/doctor-contract.ts b/extensions/discord/src/doctor-contract.ts index f8d346b2a3f..8a462005517 100644 --- a/extensions/discord/src/doctor-contract.ts +++ b/extensions/discord/src/doctor-contract.ts @@ -2,7 +2,7 @@ import type { ChannelDoctorConfigMutation, ChannelDoctorLegacyConfigRule, } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { asObjectRecord, normalizeLegacyChannelAliases } from "openclaw/plugin-sdk/runtime-doctor"; import { resolveDiscordPreviewStreamMode } from "./preview-streaming.js"; diff --git a/extensions/discord/src/doctor.test.ts b/extensions/discord/src/doctor.test.ts index 46bf3fa0f9d..cef4cc31213 100644 --- a/extensions/discord/src/doctor.test.ts +++ b/extensions/discord/src/doctor.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { collectDiscordNumericIdWarnings, diff --git a/extensions/discord/src/doctor.ts b/extensions/discord/src/doctor.ts index 9be485b683d..4122fcb9945 100644 --- a/extensions/discord/src/doctor.ts +++ b/extensions/discord/src/doctor.ts @@ -1,5 +1,5 @@ import { type ChannelDoctorAdapter } from "openclaw/plugin-sdk/channel-contract"; -import { type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { collectProviderDangerousNameMatchingScopes } from "openclaw/plugin-sdk/runtime-doctor"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { normalizeCompatibilityConfig as normalizeDiscordCompatibilityConfig } from "./doctor-contract.js"; diff --git a/extensions/discord/src/draft-chunking.test.ts b/extensions/discord/src/draft-chunking.test.ts index 249368d2889..f8a439b341f 100644 --- a/extensions/discord/src/draft-chunking.test.ts +++ b/extensions/discord/src/draft-chunking.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { resolveDiscordDraftStreamingChunking } from "./draft-chunking.js"; import { EMPTY_DISCORD_TEST_CONFIG } from "./test-support/config.js"; diff --git a/extensions/discord/src/draft-chunking.ts b/extensions/discord/src/draft-chunking.ts index 24a15fe60a4..32d10024d9f 100644 --- a/extensions/discord/src/draft-chunking.ts +++ b/extensions/discord/src/draft-chunking.ts @@ -1,5 +1,5 @@ import { resolveChannelStreamingPreviewChunk } from "openclaw/plugin-sdk/channel-streaming"; -import { type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking"; import { resolveAccountEntry } from "openclaw/plugin-sdk/routing"; import { normalizeAccountId } from "openclaw/plugin-sdk/routing"; diff --git a/extensions/discord/src/exec-approvals.test.ts b/extensions/discord/src/exec-approvals.test.ts index 497a24ca1ec..1f9ac90df48 100644 --- a/extensions/discord/src/exec-approvals.test.ts +++ b/extensions/discord/src/exec-approvals.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { getDiscordExecApprovalApprovers, diff --git a/extensions/discord/src/exec-approvals.ts b/extensions/discord/src/exec-approvals.ts index c1796d9aa8d..ad37b50ecdb 100644 --- a/extensions/discord/src/exec-approvals.ts +++ b/extensions/discord/src/exec-approvals.ts @@ -1,5 +1,5 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { DiscordExecApprovalConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { DiscordExecApprovalConfig } from "openclaw/plugin-sdk/config-types"; import type { ReplyPayload } from "openclaw/plugin-sdk/reply-dispatch-runtime"; import { resolveDiscordAccount } from "./accounts.js"; import { diff --git a/extensions/discord/src/monitor.test.ts b/extensions/discord/src/monitor.test.ts index 02fdff7950a..cfd280c9872 100644 --- a/extensions/discord/src/monitor.test.ts +++ b/extensions/discord/src/monitor.test.ts @@ -991,7 +991,7 @@ function makeReactionListenerParams(overrides?: { guildEntries?: Record; }) { return { - cfg: {} as import("openclaw/plugin-sdk/config-runtime").OpenClawConfig, + cfg: {} as import("openclaw/plugin-sdk/config-types").OpenClawConfig, accountId: "acc-1", runtime: {} as import("openclaw/plugin-sdk/runtime-env").RuntimeEnv, botUserId: overrides?.botUserId ?? "bot-1", diff --git a/extensions/discord/src/monitor/ack-reactions.ts b/extensions/discord/src/monitor/ack-reactions.ts index d9dafe8f4e2..5c48eb095e4 100644 --- a/extensions/discord/src/monitor/ack-reactions.ts +++ b/extensions/discord/src/monitor/ack-reactions.ts @@ -4,7 +4,7 @@ import { logAckFailure, type StatusReactionAdapter, } from "openclaw/plugin-sdk/channel-feedback"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { createDiscordRuntimeAccountContext } from "../client.js"; import { reactMessageDiscord, removeReactionDiscord } from "../send.js"; diff --git a/extensions/discord/src/monitor/acp-bind-here.integration.test.ts b/extensions/discord/src/monitor/acp-bind-here.integration.test.ts index c4a12047038..b34b3b7c11a 100644 --- a/extensions/discord/src/monitor/acp-bind-here.integration.test.ts +++ b/extensions/discord/src/monitor/acp-bind-here.integration.test.ts @@ -13,7 +13,7 @@ vi.mock("openclaw/plugin-sdk/config-runtime", async () => { }; }); -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { getSessionBindingService, registerSessionBindingAdapter, diff --git a/extensions/discord/src/monitor/agent-components-helpers.ts b/extensions/discord/src/monitor/agent-components-helpers.ts index 73860e69d21..d4881471736 100644 --- a/extensions/discord/src/monitor/agent-components-helpers.ts +++ b/extensions/discord/src/monitor/agent-components-helpers.ts @@ -11,7 +11,7 @@ import { import { ChannelType } from "discord-api-types/v10"; import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing"; import { resolveCommandAuthorizedFromAuthorizers } from "openclaw/plugin-sdk/command-auth-native"; -import type { DiscordAccountConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordAccountConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; import { resolveAgentRoute } from "openclaw/plugin-sdk/routing"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; diff --git a/extensions/discord/src/monitor/auto-presence.ts b/extensions/discord/src/monitor/auto-presence.ts index b76ea6f6d5c..0536f924a26 100644 --- a/extensions/discord/src/monitor/auto-presence.ts +++ b/extensions/discord/src/monitor/auto-presence.ts @@ -10,7 +10,7 @@ import { import type { DiscordAccountConfig, DiscordAutoPresenceConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; import { warn } from "openclaw/plugin-sdk/runtime-env"; import { resolveDiscordPresenceUpdate } from "./presence.js"; diff --git a/extensions/discord/src/monitor/commands.ts b/extensions/discord/src/monitor/commands.ts index 43e92ea9122..3de05c809be 100644 --- a/extensions/discord/src/monitor/commands.ts +++ b/extensions/discord/src/monitor/commands.ts @@ -1,4 +1,4 @@ -import type { DiscordSlashCommandConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordSlashCommandConfig } from "openclaw/plugin-sdk/config-types"; export function resolveDiscordSlashCommandConfig( raw?: DiscordSlashCommandConfig, diff --git a/extensions/discord/src/monitor/exec-approvals.test.ts b/extensions/discord/src/monitor/exec-approvals.test.ts index 78e8eb9fc62..2d7d04bbfcf 100644 --- a/extensions/discord/src/monitor/exec-approvals.test.ts +++ b/extensions/discord/src/monitor/exec-approvals.test.ts @@ -1,5 +1,5 @@ import type { ButtonInteraction, ComponentData } from "@buape/carbon"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; const resolveApprovalOverGatewayMock = vi.hoisted(() => vi.fn()); diff --git a/extensions/discord/src/monitor/exec-approvals.ts b/extensions/discord/src/monitor/exec-approvals.ts index e4460018a1d..ee21e716f44 100644 --- a/extensions/discord/src/monitor/exec-approvals.ts +++ b/extensions/discord/src/monitor/exec-approvals.ts @@ -1,7 +1,7 @@ import { Button, type ButtonInteraction, type ComponentData } from "@buape/carbon"; import { ButtonStyle } from "discord-api-types/v10"; import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime"; -import type { DiscordExecApprovalConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordExecApprovalConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ExecApprovalDecision, ExecApprovalRequest, diff --git a/extensions/discord/src/monitor/gateway-plugin.ts b/extensions/discord/src/monitor/gateway-plugin.ts index 2fb36ab3019..995641751f1 100644 --- a/extensions/discord/src/monitor/gateway-plugin.ts +++ b/extensions/discord/src/monitor/gateway-plugin.ts @@ -2,7 +2,7 @@ import { randomUUID } from "node:crypto"; import * as carbonGateway from "@buape/carbon/gateway"; import type { APIGatewayBotInfo } from "discord-api-types/v10"; import * as httpsProxyAgent from "https-proxy-agent"; -import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { captureHttpExchange, @@ -73,7 +73,7 @@ function hasCarbonGatewaySocketStarted(plugin: carbonGateway.GatewayPlugin): boo } export function resolveDiscordGatewayIntents( - intentsConfig?: import("openclaw/plugin-sdk/config-runtime").DiscordIntentsConfig, + intentsConfig?: import("openclaw/plugin-sdk/config-types").DiscordIntentsConfig, ): number { let intents = carbonGateway.GatewayIntents.Guilds | diff --git a/extensions/discord/src/monitor/listeners.ts b/extensions/discord/src/monitor/listeners.ts index bd3a1a1f2f9..5f2c8aa9c44 100644 --- a/extensions/discord/src/monitor/listeners.ts +++ b/extensions/discord/src/monitor/listeners.ts @@ -8,7 +8,7 @@ import { ThreadUpdateListener, type User, } from "@buape/carbon"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { enqueueSystemEvent } from "openclaw/plugin-sdk/infra-runtime"; import { resolveAgentRoute } from "openclaw/plugin-sdk/routing"; import { diff --git a/extensions/discord/src/monitor/message-handler.batch-gate.ts b/extensions/discord/src/monitor/message-handler.batch-gate.ts index 417b7e86fcc..554133bd79a 100644 --- a/extensions/discord/src/monitor/message-handler.batch-gate.ts +++ b/extensions/discord/src/monitor/message-handler.batch-gate.ts @@ -1,4 +1,4 @@ -import type { ReplyToMode } from "openclaw/plugin-sdk/config-runtime"; +import type { ReplyToMode } from "openclaw/plugin-sdk/config-types"; import type { ReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference"; import { resolveBatchedReplyThreadingPolicy } from "openclaw/plugin-sdk/reply-reference"; diff --git a/extensions/discord/src/monitor/message-handler.preflight.acp-bindings.test.ts b/extensions/discord/src/monitor/message-handler.preflight.acp-bindings.test.ts index 85de3adf7c7..5b1c0a3591a 100644 --- a/extensions/discord/src/monitor/message-handler.preflight.acp-bindings.test.ts +++ b/extensions/discord/src/monitor/message-handler.preflight.acp-bindings.test.ts @@ -151,7 +151,7 @@ function createBasePreflightParams(overrides?: Record) { discordConfig: { allowBots: true, } as NonNullable< - import("openclaw/plugin-sdk/config-runtime").OpenClawConfig["channels"] + import("openclaw/plugin-sdk/config-types").OpenClawConfig["channels"] >["discord"], data: createGuildEvent({ channelId: CHANNEL_ID, @@ -165,7 +165,7 @@ function createBasePreflightParams(overrides?: Record) { discordConfig: { allowBots: true, } as NonNullable< - import("openclaw/plugin-sdk/config-runtime").OpenClawConfig["channels"] + import("openclaw/plugin-sdk/config-types").OpenClawConfig["channels"] >["discord"], ...overrides, } satisfies Parameters[0]; diff --git a/extensions/discord/src/monitor/message-handler.preflight.test-helpers.ts b/extensions/discord/src/monitor/message-handler.preflight.test-helpers.ts index 8c6aa5f3cc1..4a352369e74 100644 --- a/extensions/discord/src/monitor/message-handler.preflight.test-helpers.ts +++ b/extensions/discord/src/monitor/message-handler.preflight.test-helpers.ts @@ -1,5 +1,5 @@ import { ChannelType } from "@buape/carbon"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { preflightDiscordMessage } from "./message-handler.preflight.js"; import { createNoopThreadBindingManager } from "./thread-bindings.js"; diff --git a/extensions/discord/src/monitor/message-handler.preflight.test.ts b/extensions/discord/src/monitor/message-handler.preflight.test.ts index fd5c937604d..521d337ada5 100644 --- a/extensions/discord/src/monitor/message-handler.preflight.test.ts +++ b/extensions/discord/src/monitor/message-handler.preflight.test.ts @@ -71,7 +71,7 @@ function createThreadBinding( } function createPreflightArgs(params: { - cfg: import("openclaw/plugin-sdk/config-runtime").OpenClawConfig; + cfg: import("openclaw/plugin-sdk/config-types").OpenClawConfig; discordConfig: DiscordConfig; data: DiscordMessageEvent; client: DiscordClient; @@ -163,7 +163,7 @@ async function runGuildPreflight(params: { guildId: string; message: import("@buape/carbon").Message; discordConfig: DiscordConfig; - cfg?: import("openclaw/plugin-sdk/config-runtime").OpenClawConfig; + cfg?: import("openclaw/plugin-sdk/config-types").OpenClawConfig; guildEntries?: Parameters[0]["guildEntries"]; includeGuildObject?: boolean; }) { @@ -579,7 +579,7 @@ describe("preflightDiscordMessage", () => { createPreflightArgs({ cfg: { ...DEFAULT_PREFLIGHT_CFG, - } as import("openclaw/plugin-sdk/config-runtime").OpenClawConfig, + } as import("openclaw/plugin-sdk/config-types").OpenClawConfig, discordConfig: { allowBots: true, } as DiscordConfig, @@ -1064,7 +1064,7 @@ describe("preflightDiscordMessage", () => { mentionPatterns: ["openclaw"], }, }, - } as import("openclaw/plugin-sdk/config-runtime").OpenClawConfig, + } as import("openclaw/plugin-sdk/config-types").OpenClawConfig, discordConfig: {} as DiscordConfig, data: createGuildEvent({ channelId, @@ -1133,7 +1133,7 @@ describe("preflightDiscordMessage", () => { mentionPatterns: ["openclaw"], }, }, - } as import("openclaw/plugin-sdk/config-runtime").OpenClawConfig, + } as import("openclaw/plugin-sdk/config-types").OpenClawConfig, discordConfig: {} as DiscordConfig, data: createGuildEvent({ channelId, diff --git a/extensions/discord/src/monitor/message-handler.preflight.ts b/extensions/discord/src/monitor/message-handler.preflight.ts index 7324dfc89fc..4a71a626c96 100644 --- a/extensions/discord/src/monitor/message-handler.preflight.ts +++ b/extensions/discord/src/monitor/message-handler.preflight.ts @@ -11,8 +11,8 @@ import { import { resolveControlCommandGate } from "openclaw/plugin-sdk/command-auth-native"; import { hasControlCommand } from "openclaw/plugin-sdk/command-detection"; import { shouldHandleTextCommands } from "openclaw/plugin-sdk/command-surface"; -import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/config-runtime"; import type { SessionBindingRecord } from "openclaw/plugin-sdk/conversation-binding-runtime"; +import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; import { enqueueSystemEvent, recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime"; import { recordPendingHistoryEntryIfEnabled, diff --git a/extensions/discord/src/monitor/message-handler.preflight.types.ts b/extensions/discord/src/monitor/message-handler.preflight.types.ts index 56df3db48d2..8c6458a43c5 100644 --- a/extensions/discord/src/monitor/message-handler.preflight.types.ts +++ b/extensions/discord/src/monitor/message-handler.preflight.types.ts @@ -1,5 +1,5 @@ import type { ChannelType, Client, User } from "@buape/carbon"; -import type { OpenClawConfig, ReplyToMode } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig, ReplyToMode } from "openclaw/plugin-sdk/config-types"; import type { SessionBindingRecord } from "openclaw/plugin-sdk/conversation-runtime"; import type { HistoryEntry } from "openclaw/plugin-sdk/reply-history"; import type { resolveAgentRoute } from "openclaw/plugin-sdk/routing"; @@ -19,7 +19,7 @@ export type DiscordMessageEvent = import("./listeners.js").DiscordMessageEvent; type DiscordMessagePreflightSharedFields = { cfg: LoadedConfig; discordConfig: NonNullable< - import("openclaw/plugin-sdk/config-runtime").OpenClawConfig["channels"] + import("openclaw/plugin-sdk/config-types").OpenClawConfig["channels"] >["discord"]; accountId: string; token: string; diff --git a/extensions/discord/src/monitor/message-handler.process.test.ts b/extensions/discord/src/monitor/message-handler.process.test.ts index d85aa262ee2..7fb168bf68e 100644 --- a/extensions/discord/src/monitor/message-handler.process.test.ts +++ b/extensions/discord/src/monitor/message-handler.process.test.ts @@ -755,7 +755,7 @@ describe("processDiscordMessage session routing", () => { it("prefers bound session keys and sets MessageThreadId for bound thread messages", async () => { const threadBindings = createThreadBindingManager({ - cfg: {} as import("openclaw/plugin-sdk/config-runtime").OpenClawConfig, + cfg: {} as import("openclaw/plugin-sdk/config-types").OpenClawConfig, accountId: "default", persist: false, enableSweeper: false, diff --git a/extensions/discord/src/monitor/message-handler.test-helpers.ts b/extensions/discord/src/monitor/message-handler.test-helpers.ts index ed232ae43fb..1c166c17d1e 100644 --- a/extensions/discord/src/monitor/message-handler.test-helpers.ts +++ b/extensions/discord/src/monitor/message-handler.test-helpers.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { vi } from "vitest"; import type { createDiscordMessageHandler } from "./message-handler.js"; import { createNoopThreadBindingManager } from "./thread-bindings.js"; diff --git a/extensions/discord/src/monitor/model-picker.ts b/extensions/discord/src/monitor/model-picker.ts index b4ac0994d78..b0f853504ff 100644 --- a/extensions/discord/src/monitor/model-picker.ts +++ b/extensions/discord/src/monitor/model-picker.ts @@ -11,7 +11,7 @@ import { } from "@buape/carbon"; import type { APISelectMenuOption } from "discord-api-types/v10"; import { ButtonStyle } from "discord-api-types/v10"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ModelsProviderData } from "openclaw/plugin-sdk/models-provider-runtime"; import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared"; diff --git a/extensions/discord/src/monitor/monitor.agent-components.test.ts b/extensions/discord/src/monitor/monitor.agent-components.test.ts index e571b12d777..5bfd6189a11 100644 --- a/extensions/discord/src/monitor/monitor.agent-components.test.ts +++ b/extensions/discord/src/monitor/monitor.agent-components.test.ts @@ -1,7 +1,7 @@ import type { ButtonInteraction, ComponentData, StringSelectMenuInteraction } from "@buape/carbon"; import { ChannelType } from "discord-api-types/v10"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-types"; import { buildAgentSessionKey } from "openclaw/plugin-sdk/routing"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { peekSystemEvents, resetSystemEventsForTest } from "../../../../src/infra/system-events.js"; diff --git a/extensions/discord/src/monitor/monitor.test.ts b/extensions/discord/src/monitor/monitor.test.ts index 14df72f7b5a..0ebfa187262 100644 --- a/extensions/discord/src/monitor/monitor.test.ts +++ b/extensions/discord/src/monitor/monitor.test.ts @@ -5,7 +5,7 @@ import type { StringSelectMenuInteraction, } from "@buape/carbon"; import { ChannelType } from "discord-api-types/v10"; -import type { DiscordAccountConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordAccountConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { buildPluginBindingApprovalCustomId } from "openclaw/plugin-sdk/conversation-runtime"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { type DiscordComponentEntry, type DiscordModalEntry } from "../components.js"; diff --git a/extensions/discord/src/monitor/native-command-dispatch.ts b/extensions/discord/src/monitor/native-command-dispatch.ts index 9906c890cfc..06c21033776 100644 --- a/extensions/discord/src/monitor/native-command-dispatch.ts +++ b/extensions/discord/src/monitor/native-command-dispatch.ts @@ -4,7 +4,7 @@ import type { StringSelectMenuInteraction, } from "@buape/carbon"; import type { ChatCommandDefinition, CommandArgs } from "openclaw/plugin-sdk/command-auth"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ResolvedAgentRoute } from "openclaw/plugin-sdk/routing"; import type { ThreadBindingManager } from "./thread-bindings.js"; diff --git a/extensions/discord/src/monitor/native-command-model-picker-apply.ts b/extensions/discord/src/monitor/native-command-model-picker-apply.ts index 8d022ed2580..517892a9664 100644 --- a/extensions/discord/src/monitor/native-command-model-picker-apply.ts +++ b/extensions/discord/src/monitor/native-command-model-picker-apply.ts @@ -1,13 +1,10 @@ import type { ButtonInteraction, StringSelectMenuInteraction } from "@buape/carbon"; import type { ChatCommandDefinition, CommandArgs } from "openclaw/plugin-sdk/command-auth"; -import { - applyModelOverrideToSessionEntry, - resolveStorePath, - updateSessionStore, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { applyModelOverrideToSessionEntry } from "openclaw/plugin-sdk/model-session-runtime"; import type { ResolvedAgentRoute } from "openclaw/plugin-sdk/routing"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; +import { resolveStorePath, updateSessionStore } from "openclaw/plugin-sdk/session-store-runtime"; import { withTimeout } from "openclaw/plugin-sdk/text-runtime"; import { recordDiscordModelPickerRecentModel, diff --git a/extensions/discord/src/monitor/native-command-route.ts b/extensions/discord/src/monitor/native-command-route.ts index eb3b7833cd4..5404001a6ae 100644 --- a/extensions/discord/src/monitor/native-command-route.ts +++ b/extensions/discord/src/monitor/native-command-route.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import * as conversationRuntime from "openclaw/plugin-sdk/conversation-binding-runtime"; import type { ResolvedAgentRoute } from "openclaw/plugin-sdk/routing"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/discord/src/monitor/native-command-ui.ts b/extensions/discord/src/monitor/native-command-ui.ts index eec4c714f6a..5fb4398ffb7 100644 --- a/extensions/discord/src/monitor/native-command-ui.ts +++ b/extensions/discord/src/monitor/native-command-ui.ts @@ -24,9 +24,9 @@ import { type CommandArgValues, type CommandArgs, } from "openclaw/plugin-sdk/command-auth"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { loadSessionStore, resolveStorePath } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ResolvedAgentRoute } from "openclaw/plugin-sdk/routing"; +import { loadSessionStore, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime"; import { chunkItems, normalizeLowercaseStringOrEmpty, diff --git a/extensions/discord/src/monitor/native-command.command-arg.test.ts b/extensions/discord/src/monitor/native-command.command-arg.test.ts index 901f2955acf..7dca81b5c36 100644 --- a/extensions/discord/src/monitor/native-command.command-arg.test.ts +++ b/extensions/discord/src/monitor/native-command.command-arg.test.ts @@ -1,6 +1,6 @@ import type { ChatCommandDefinition } from "openclaw/plugin-sdk/command-auth"; import * as commandRegistryModule from "openclaw/plugin-sdk/command-auth"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it, vi } from "vitest"; import { createDiscordCommandArgFallbackButton, diff --git a/extensions/discord/src/monitor/native-command.commands-allowfrom.test.ts b/extensions/discord/src/monitor/native-command.commands-allowfrom.test.ts index efa09626b50..eb859efd99c 100644 --- a/extensions/discord/src/monitor/native-command.commands-allowfrom.test.ts +++ b/extensions/discord/src/monitor/native-command.commands-allowfrom.test.ts @@ -1,7 +1,7 @@ import { ChannelType } from "discord-api-types/v10"; import type { NativeCommandSpec } from "openclaw/plugin-sdk/command-auth"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-types"; import * as pluginCommandsModule from "openclaw/plugin-sdk/plugin-runtime"; import * as dispatcherModule from "openclaw/plugin-sdk/reply-dispatch-runtime"; import { beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/extensions/discord/src/monitor/native-command.model-picker.test.ts b/extensions/discord/src/monitor/native-command.model-picker.test.ts index 5eaf3e719f0..00b7ce01187 100644 --- a/extensions/discord/src/monitor/native-command.model-picker.test.ts +++ b/extensions/discord/src/monitor/native-command.model-picker.test.ts @@ -5,13 +5,13 @@ import { ChannelType } from "discord-api-types/v10"; import * as commandRegistryModule from "openclaw/plugin-sdk/command-auth"; import type { ChatCommandDefinition, CommandArgsParsing } from "openclaw/plugin-sdk/command-auth"; import type { ModelsProviderData } from "openclaw/plugin-sdk/command-auth"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import * as globalsModule from "openclaw/plugin-sdk/runtime-env"; import { loadSessionStore, resolveStorePath, saveSessionStore, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; -import * as globalsModule from "openclaw/plugin-sdk/runtime-env"; +} from "openclaw/plugin-sdk/session-store-runtime"; import * as commandTextModule from "openclaw/plugin-sdk/text-runtime"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { defineThrowingDiscordChannelGetter } from "../test-support/partial-channel.js"; diff --git a/extensions/discord/src/monitor/native-command.options.test.ts b/extensions/discord/src/monitor/native-command.options.test.ts index 8731e4451f9..466a821d16c 100644 --- a/extensions/discord/src/monitor/native-command.options.test.ts +++ b/extensions/discord/src/monitor/native-command.options.test.ts @@ -1,5 +1,5 @@ import { ChannelType } from "discord-api-types/v10"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const { logVerboseMock } = vi.hoisted(() => ({ diff --git a/extensions/discord/src/monitor/native-command.plugin-dispatch.test.ts b/extensions/discord/src/monitor/native-command.plugin-dispatch.test.ts index 78927b24b60..6336d6a1aa4 100644 --- a/extensions/discord/src/monitor/native-command.plugin-dispatch.test.ts +++ b/extensions/discord/src/monitor/native-command.plugin-dispatch.test.ts @@ -1,7 +1,7 @@ import { ChannelType } from "discord-api-types/v10"; import type { NativeCommandSpec } from "openclaw/plugin-sdk/command-auth"; import { resolveDirectStatusReplyForSession } from "openclaw/plugin-sdk/command-status-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { clearPluginCommands, executePluginCommand, diff --git a/extensions/discord/src/monitor/native-command.status-direct.test.ts b/extensions/discord/src/monitor/native-command.status-direct.test.ts index bdb5cd46b23..5aa9d2eb99f 100644 --- a/extensions/discord/src/monitor/native-command.status-direct.test.ts +++ b/extensions/discord/src/monitor/native-command.status-direct.test.ts @@ -1,5 +1,5 @@ import { ChannelType } from "discord-api-types/v10"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { createMockCommandInteraction as createInteraction } from "./native-command.test-helpers.js"; import { createNoopThreadBindingManager } from "./thread-bindings.js"; diff --git a/extensions/discord/src/monitor/native-command.think-autocomplete.test.ts b/extensions/discord/src/monitor/native-command.think-autocomplete.test.ts index 5a5af99d937..eb538cb2c7d 100644 --- a/extensions/discord/src/monitor/native-command.think-autocomplete.test.ts +++ b/extensions/discord/src/monitor/native-command.think-autocomplete.test.ts @@ -2,10 +2,8 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; import { ChannelType, type AutocompleteInteraction } from "@buape/carbon"; -import { - clearSessionStoreCacheForTest, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { clearSessionStoreCacheForTest } from "openclaw/plugin-sdk/session-store-runtime"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { createNoopThreadBindingManager } from "./thread-bindings.js"; diff --git a/extensions/discord/src/monitor/native-command.ts b/extensions/discord/src/monitor/native-command.ts index a24d140c7e4..df6c7d502c8 100644 --- a/extensions/discord/src/monitor/native-command.ts +++ b/extensions/discord/src/monitor/native-command.ts @@ -18,7 +18,7 @@ import { resolveNativeCommandSessionTargets, } from "openclaw/plugin-sdk/command-auth-native"; import { resolveDirectStatusReplyForSession } from "openclaw/plugin-sdk/command-status-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { buildPairingReply } from "openclaw/plugin-sdk/conversation-runtime"; import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; import { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime"; diff --git a/extensions/discord/src/monitor/preflight-audio.test.ts b/extensions/discord/src/monitor/preflight-audio.test.ts index 9d492f2724e..27c865640ee 100644 --- a/extensions/discord/src/monitor/preflight-audio.test.ts +++ b/extensions/discord/src/monitor/preflight-audio.test.ts @@ -8,7 +8,7 @@ vi.mock("./preflight-audio.runtime.js", () => ({ import { resolveDiscordPreflightAudioMentionContext } from "./preflight-audio.js"; -const cfg = {} as import("openclaw/plugin-sdk/config-runtime").OpenClawConfig; +const cfg = {} as import("openclaw/plugin-sdk/config-types").OpenClawConfig; describe("resolveDiscordPreflightAudioMentionContext", () => { beforeEach(() => { diff --git a/extensions/discord/src/monitor/preflight-audio.ts b/extensions/discord/src/monitor/preflight-audio.ts index 98706f47b83..9bc68c4a9f4 100644 --- a/extensions/discord/src/monitor/preflight-audio.ts +++ b/extensions/discord/src/monitor/preflight-audio.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { getFileExtension } from "openclaw/plugin-sdk/media-mime"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/discord/src/monitor/presence.ts b/extensions/discord/src/monitor/presence.ts index 6dc97ff65c9..fa95b2e1d5d 100644 --- a/extensions/discord/src/monitor/presence.ts +++ b/extensions/discord/src/monitor/presence.ts @@ -1,5 +1,5 @@ import type { Activity, UpdatePresenceData } from "@buape/carbon/gateway"; -import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; const DEFAULT_CUSTOM_ACTIVITY_TYPE = 4; diff --git a/extensions/discord/src/monitor/provider.allowlist.ts b/extensions/discord/src/monitor/provider.allowlist.ts index df37c47702b..5112f51699f 100644 --- a/extensions/discord/src/monitor/provider.allowlist.ts +++ b/extensions/discord/src/monitor/provider.allowlist.ts @@ -5,7 +5,7 @@ import { patchAllowlistUsersInConfigEntries, summarizeMapping, } from "openclaw/plugin-sdk/allow-from"; -import type { DiscordGuildEntry } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordGuildEntry } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { formatErrorMessage } from "openclaw/plugin-sdk/ssrf-runtime"; import { normalizeStringEntries } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/discord/src/monitor/provider.startup.ts b/extensions/discord/src/monitor/provider.startup.ts index 1b59e091a15..7aa33dee54d 100644 --- a/extensions/discord/src/monitor/provider.startup.ts +++ b/extensions/discord/src/monitor/provider.startup.ts @@ -8,8 +8,8 @@ import { } from "@buape/carbon"; import type { GatewayPlugin } from "@buape/carbon/gateway"; import { VoicePlugin } from "@buape/carbon/voice"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; import { danger } from "openclaw/plugin-sdk/runtime-env"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/discord/src/monitor/provider.test.ts b/extensions/discord/src/monitor/provider.test.ts index 272e9c5afc6..54a5757652d 100644 --- a/extensions/discord/src/monitor/provider.test.ts +++ b/extensions/discord/src/monitor/provider.test.ts @@ -1,7 +1,7 @@ import { EventEmitter } from "node:events"; import { RateLimitError } from "@buape/carbon"; import type { ChannelRuntimeSurface } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { baseConfig, diff --git a/extensions/discord/src/monitor/provider.ts b/extensions/discord/src/monitor/provider.ts index 7b228086e22..c350832750e 100644 --- a/extensions/discord/src/monitor/provider.ts +++ b/extensions/discord/src/monitor/provider.ts @@ -16,15 +16,15 @@ import { listSkillCommandsForAgents, type NativeCommandSpec, } from "openclaw/plugin-sdk/command-auth"; +import type { OpenClawConfig, ReplyToMode } from "openclaw/plugin-sdk/config-types"; +import { createConnectedChannelStatusPatch } from "openclaw/plugin-sdk/gateway-runtime"; import { isNativeCommandsExplicitlyDisabled, resolveNativeCommandsEnabled, resolveNativeSkillsEnabled, -} from "openclaw/plugin-sdk/config-runtime"; -import type { OpenClawConfig, ReplyToMode } from "openclaw/plugin-sdk/config-runtime"; -import { getRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; -import { createConnectedChannelStatusPatch } from "openclaw/plugin-sdk/gateway-runtime"; +} from "openclaw/plugin-sdk/native-command-config-runtime"; import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { danger, isVerbose, diff --git a/extensions/discord/src/monitor/reply-delivery.test.ts b/extensions/discord/src/monitor/reply-delivery.test.ts index 3b27e432b65..b5618988162 100644 --- a/extensions/discord/src/monitor/reply-delivery.test.ts +++ b/extensions/discord/src/monitor/reply-delivery.test.ts @@ -1,5 +1,5 @@ import type { RequestClient } from "@buape/carbon"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/extensions/discord/src/monitor/reply-delivery.ts b/extensions/discord/src/monitor/reply-delivery.ts index 588262cbae8..03d3945ba77 100644 --- a/extensions/discord/src/monitor/reply-delivery.ts +++ b/extensions/discord/src/monitor/reply-delivery.ts @@ -4,7 +4,7 @@ import type { MarkdownTableMode, OpenClawConfig, ReplyToMode, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; import type { OutboundMediaAccess } from "openclaw/plugin-sdk/media-runtime"; import { buildOutboundSessionContext, diff --git a/extensions/discord/src/monitor/route-resolution.test.ts b/extensions/discord/src/monitor/route-resolution.test.ts index 7f181e59d61..308f5177d7a 100644 --- a/extensions/discord/src/monitor/route-resolution.test.ts +++ b/extensions/discord/src/monitor/route-resolution.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ResolvedAgentRoute } from "openclaw/plugin-sdk/routing"; import { describe, expect, it } from "vitest"; import { diff --git a/extensions/discord/src/monitor/route-resolution.ts b/extensions/discord/src/monitor/route-resolution.ts index f76c9b49f65..df9e63cddcb 100644 --- a/extensions/discord/src/monitor/route-resolution.ts +++ b/extensions/discord/src/monitor/route-resolution.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { deriveLastRoutePolicy, resolveAgentRoute, diff --git a/extensions/discord/src/monitor/thread-bindings.config.ts b/extensions/discord/src/monitor/thread-bindings.config.ts index a6520c5e868..a13c2bbee09 100644 --- a/extensions/discord/src/monitor/thread-bindings.config.ts +++ b/extensions/discord/src/monitor/thread-bindings.config.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveThreadBindingIdleTimeoutMs, resolveThreadBindingMaxAgeMs, diff --git a/extensions/discord/src/monitor/thread-bindings.discord-api.test.ts b/extensions/discord/src/monitor/thread-bindings.discord-api.test.ts index 309e857c451..e41a3aaff09 100644 --- a/extensions/discord/src/monitor/thread-bindings.discord-api.test.ts +++ b/extensions/discord/src/monitor/thread-bindings.discord-api.test.ts @@ -1,5 +1,5 @@ import { ChannelType } from "discord-api-types/v10"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import * as discordClientModule from "../client.js"; import * as discordSendModule from "../send.js"; diff --git a/extensions/discord/src/monitor/thread-bindings.discord-api.ts b/extensions/discord/src/monitor/thread-bindings.discord-api.ts index 0c2555db671..9124347d6a9 100644 --- a/extensions/discord/src/monitor/thread-bindings.discord-api.ts +++ b/extensions/discord/src/monitor/thread-bindings.discord-api.ts @@ -1,5 +1,5 @@ import { ChannelType, Routes } from "discord-api-types/v10"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { createDiscordRestClient } from "../client.js"; diff --git a/extensions/discord/src/monitor/thread-bindings.lifecycle.ts b/extensions/discord/src/monitor/thread-bindings.lifecycle.ts index c1576ea98ea..8f890115bef 100644 --- a/extensions/discord/src/monitor/thread-bindings.lifecycle.ts +++ b/extensions/discord/src/monitor/thread-bindings.lifecycle.ts @@ -1,5 +1,5 @@ import { readAcpSessionEntry, type AcpSessionStoreEntry } from "openclaw/plugin-sdk/acp-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeOptionalLowercaseString, normalizeOptionalString, diff --git a/extensions/discord/src/monitor/thread-session-close.ts b/extensions/discord/src/monitor/thread-session-close.ts index 39f2a818d37..7b9853d0f63 100644 --- a/extensions/discord/src/monitor/thread-session-close.ts +++ b/extensions/discord/src/monitor/thread-session-close.ts @@ -1,5 +1,5 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { resolveStorePath, updateSessionStore } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { resolveStorePath, updateSessionStore } from "openclaw/plugin-sdk/session-store-runtime"; import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/text-runtime"; /** diff --git a/extensions/discord/src/monitor/thread-title.generate.test.ts b/extensions/discord/src/monitor/thread-title.generate.test.ts index bc4f1f4533c..9e394dd5262 100644 --- a/extensions/discord/src/monitor/thread-title.generate.test.ts +++ b/extensions/discord/src/monitor/thread-title.generate.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import * as agentRuntimeModule from "openclaw/plugin-sdk/simple-completion-runtime"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { EMPTY_DISCORD_TEST_CONFIG } from "../test-support/config.js"; diff --git a/extensions/discord/src/monitor/thread-title.ts b/extensions/discord/src/monitor/thread-title.ts index a0668d50d5f..3444d03962c 100644 --- a/extensions/discord/src/monitor/thread-title.ts +++ b/extensions/discord/src/monitor/thread-title.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { completeWithPreparedSimpleCompletionModel, diff --git a/extensions/discord/src/monitor/threading.auto-thread.test.ts b/extensions/discord/src/monitor/threading.auto-thread.test.ts index c05539defa7..154a263ccc0 100644 --- a/extensions/discord/src/monitor/threading.auto-thread.test.ts +++ b/extensions/discord/src/monitor/threading.auto-thread.test.ts @@ -1,5 +1,5 @@ import { ChannelType } from "@buape/carbon"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { EMPTY_DISCORD_TEST_CONFIG } from "../test-support/config.js"; type MaybeCreateDiscordAutoThreadFn = typeof import("./threading.js").maybeCreateDiscordAutoThread; diff --git a/extensions/discord/src/monitor/threading.ts b/extensions/discord/src/monitor/threading.ts index e75da23e227..b04b9b989de 100644 --- a/extensions/discord/src/monitor/threading.ts +++ b/extensions/discord/src/monitor/threading.ts @@ -1,10 +1,7 @@ import { ChannelType, type Client, type MessageCreateListener } from "@buape/carbon"; import { Routes, type APIAttachment, type APIStickerItem } from "discord-api-types/v10"; -import { - resolveChannelModelOverride, - type OpenClawConfig, - type ReplyToMode, -} from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig, ReplyToMode } from "openclaw/plugin-sdk/config-types"; +import { resolveChannelModelOverride } from "openclaw/plugin-sdk/model-session-runtime"; import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference"; import { buildAgentSessionKey } from "openclaw/plugin-sdk/routing"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; diff --git a/extensions/discord/src/outbound-adapter.ts b/extensions/discord/src/outbound-adapter.ts index 51acf26d09f..d790b141c42 100644 --- a/extensions/discord/src/outbound-adapter.ts +++ b/extensions/discord/src/outbound-adapter.ts @@ -2,7 +2,7 @@ import { type ChannelOutboundAdapter, createAttachedChannelResultAdapter, } from "openclaw/plugin-sdk/channel-send-result"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { OutboundIdentity } from "openclaw/plugin-sdk/outbound-runtime"; import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps"; import { diff --git a/extensions/discord/src/outbound-send-context.ts b/extensions/discord/src/outbound-send-context.ts index d5098ca55fb..9dd9f31af41 100644 --- a/extensions/discord/src/outbound-send-context.ts +++ b/extensions/discord/src/outbound-send-context.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig, ReplyToMode } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig, ReplyToMode } from "openclaw/plugin-sdk/config-types"; import { createReplyToFanout, type ReplyToResolution } from "openclaw/plugin-sdk/outbound-runtime"; import { resolveOutboundSendDep, diff --git a/extensions/discord/src/outbound-session-route.ts b/extensions/discord/src/outbound-session-route.ts index db9a02e404f..953998caf27 100644 --- a/extensions/discord/src/outbound-session-route.ts +++ b/extensions/discord/src/outbound-session-route.ts @@ -1,5 +1,5 @@ import { buildThreadAwareOutboundSessionRoute } from "openclaw/plugin-sdk/channel-core"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { buildOutboundBaseSessionKey, type RoutePeer } from "openclaw/plugin-sdk/routing"; import { parseDiscordTarget } from "./target-parsing.js"; diff --git a/extensions/discord/src/proxy-fetch.ts b/extensions/discord/src/proxy-fetch.ts index 2d95c3b70bb..4ff393bf770 100644 --- a/extensions/discord/src/proxy-fetch.ts +++ b/extensions/discord/src/proxy-fetch.ts @@ -1,5 +1,5 @@ import { isIP } from "node:net"; -import { type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { makeProxyFetch } from "openclaw/plugin-sdk/infra-runtime"; import { danger } from "openclaw/plugin-sdk/runtime-env"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; diff --git a/extensions/discord/src/recipient-resolution.ts b/extensions/discord/src/recipient-resolution.ts index 3757bcd01ee..b9c61d17cd7 100644 --- a/extensions/discord/src/recipient-resolution.ts +++ b/extensions/discord/src/recipient-resolution.ts @@ -1,4 +1,5 @@ -import { requireRuntimeConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { resolveDiscordAccount } from "./accounts.js"; import { parseAndResolveDiscordTarget } from "./target-resolver.js"; import type { DiscordTargetParseOptions } from "./targets.js"; diff --git a/extensions/discord/src/runtime-api.ts b/extensions/discord/src/runtime-api.ts index daf217bbe4f..186efe2be28 100644 --- a/extensions/discord/src/runtime-api.ts +++ b/extensions/discord/src/runtime-api.ts @@ -21,7 +21,7 @@ export type { DiscordActionConfig, DiscordConfig, OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; export { jsonResult, readNumberParam, diff --git a/extensions/discord/src/send.components.ts b/extensions/discord/src/send.components.ts index 5347f3c8ed6..382df013738 100644 --- a/extensions/discord/src/send.components.ts +++ b/extensions/discord/src/send.components.ts @@ -5,12 +5,9 @@ import { type RequestClient, } from "@buape/carbon"; import { ChannelType, Routes } from "discord-api-types/v10"; -import { - requireRuntimeConfig, - type MarkdownTableMode, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +import type { MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import type { ChunkMode } from "openclaw/plugin-sdk/reply-chunking"; import { resolveDiscordAccount } from "./accounts.js"; import { registerDiscordComponentEntries } from "./components-registry.js"; diff --git a/extensions/discord/src/send.outbound.ts b/extensions/discord/src/send.outbound.ts index 8d43d6b0242..727e4c9d9cb 100644 --- a/extensions/discord/src/send.outbound.ts +++ b/extensions/discord/src/send.outbound.ts @@ -3,17 +3,14 @@ import fs from "node:fs/promises"; import path from "node:path"; import { serializePayload, type MessagePayloadObject, type RequestClient } from "@buape/carbon"; import { ChannelType, Routes } from "discord-api-types/v10"; -import { - requireRuntimeConfig, - type MarkdownTableMode, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; -import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import type { MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime"; +import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; import { maxBytesForKind } from "openclaw/plugin-sdk/media-runtime"; import { extensionForMime } from "openclaw/plugin-sdk/media-runtime"; import { unlinkIfExists } from "openclaw/plugin-sdk/media-runtime"; import type { PollInput } from "openclaw/plugin-sdk/media-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { resolveChunkMode, type ChunkMode } from "openclaw/plugin-sdk/reply-chunking"; import type { RetryConfig } from "openclaw/plugin-sdk/retry-runtime"; import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path"; diff --git a/extensions/discord/src/send.reactions.ts b/extensions/discord/src/send.reactions.ts index 67f091d05ec..5efb39fddca 100644 --- a/extensions/discord/src/send.reactions.ts +++ b/extensions/discord/src/send.reactions.ts @@ -1,5 +1,5 @@ import { Routes } from "discord-api-types/v10"; -import { requireRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { buildReactionIdentifier, createDiscordClient, diff --git a/extensions/discord/src/send.shared.ts b/extensions/discord/src/send.shared.ts index 45097ae3a06..8bfba8133ac 100644 --- a/extensions/discord/src/send.shared.ts +++ b/extensions/discord/src/send.shared.ts @@ -9,7 +9,7 @@ import { import { PollLayoutType } from "discord-api-types/payloads/v10"; import type { RESTAPIPoll } from "discord-api-types/rest/v10"; import { Routes, type APIChannel, type APIEmbed } from "discord-api-types/v10"; -import { requireRuntimeConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { buildOutboundMediaLoadOptions } from "openclaw/plugin-sdk/media-runtime"; import { extensionForMime } from "openclaw/plugin-sdk/media-runtime"; import { @@ -17,6 +17,7 @@ import { normalizePollInput, type PollInput, } from "openclaw/plugin-sdk/media-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import type { ChunkMode } from "openclaw/plugin-sdk/reply-chunking"; import { resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload"; import type { RetryRunner } from "openclaw/plugin-sdk/retry-runtime"; diff --git a/extensions/discord/src/send.types.ts b/extensions/discord/src/send.types.ts index c6a578feaff..27d20f17208 100644 --- a/extensions/discord/src/send.types.ts +++ b/extensions/discord/src/send.types.ts @@ -1,5 +1,5 @@ import type { RequestClient } from "@buape/carbon"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { RetryConfig } from "openclaw/plugin-sdk/retry-runtime"; export class DiscordSendError extends Error { diff --git a/extensions/discord/src/setup-account-state.ts b/extensions/discord/src/setup-account-state.ts index bcc59b8b4bc..7b839946d3a 100644 --- a/extensions/discord/src/setup-account-state.ts +++ b/extensions/discord/src/setup-account-state.ts @@ -1,6 +1,6 @@ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id"; import { listCombinedAccountIds } from "openclaw/plugin-sdk/account-resolution"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { hasConfiguredSecretInput, normalizeSecretInputString, diff --git a/extensions/discord/src/setup-core.ts b/extensions/discord/src/setup-core.ts index 7a66dba5ecd..fd1c80f9233 100644 --- a/extensions/discord/src/setup-core.ts +++ b/extensions/discord/src/setup-core.ts @@ -1,5 +1,5 @@ import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id"; -import type { DiscordGuildEntry, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { DiscordGuildEntry, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ChannelSetupDmPolicy, ChannelSetupWizard } from "openclaw/plugin-sdk/setup-runtime"; import { createStandardChannelSetupStatus } from "openclaw/plugin-sdk/setup-runtime"; import { formatDocsLink } from "openclaw/plugin-sdk/setup-tools"; diff --git a/extensions/discord/src/setup-surface.test.ts b/extensions/discord/src/setup-surface.test.ts index 916078725d2..48bc2dc1eb1 100644 --- a/extensions/discord/src/setup-surface.test.ts +++ b/extensions/discord/src/setup-surface.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { createDiscordSetupWizardBase } from "./setup-core.js"; diff --git a/extensions/discord/src/targets.test.ts b/extensions/discord/src/targets.test.ts index 033e5d9ba6e..7e87eaa9eab 100644 --- a/extensions/discord/src/targets.test.ts +++ b/extensions/discord/src/targets.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { __resetDiscordDirectoryCacheForTest, diff --git a/extensions/discord/src/test-support/config.ts b/extensions/discord/src/test-support/config.ts index 344a8f8e0d9..9f41275dcfe 100644 --- a/extensions/discord/src/test-support/config.ts +++ b/extensions/discord/src/test-support/config.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export const EMPTY_DISCORD_TEST_CONFIG = {} as OpenClawConfig; diff --git a/extensions/discord/src/test-support/provider.test-support.ts b/extensions/discord/src/test-support/provider.test-support.ts index a17bb325770..9a2dd4a4eab 100644 --- a/extensions/discord/src/test-support/provider.test-support.ts +++ b/extensions/discord/src/test-support/provider.test-support.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import type { Mock } from "vitest"; import { expect, vi } from "vitest"; diff --git a/extensions/discord/src/token.test.ts b/extensions/discord/src/token.test.ts index 9490b9f6040..88bea96cae2 100644 --- a/extensions/discord/src/token.test.ts +++ b/extensions/discord/src/token.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it, vi } from "vitest"; import { resolveDiscordToken } from "./token.js"; diff --git a/extensions/discord/src/token.ts b/extensions/discord/src/token.ts index 37f843cdea0..0eac4adf0bf 100644 --- a/extensions/discord/src/token.ts +++ b/extensions/discord/src/token.ts @@ -1,5 +1,5 @@ import type { BaseTokenResolution } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing"; import { resolveAccountEntry } from "openclaw/plugin-sdk/routing"; import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input"; diff --git a/extensions/discord/src/ui-colors.ts b/extensions/discord/src/ui-colors.ts index d7abbe28a08..9791445cc54 100644 --- a/extensions/discord/src/ui-colors.ts +++ b/extensions/discord/src/ui-colors.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { inspectDiscordAccount } from "./account-inspect.js"; export const DEFAULT_DISCORD_ACCENT_COLOR = "#5865F2"; diff --git a/extensions/discord/src/ui.ts b/extensions/discord/src/ui.ts index fcce75cbca0..aba19364d6c 100644 --- a/extensions/discord/src/ui.ts +++ b/extensions/discord/src/ui.ts @@ -1,5 +1,5 @@ import { Container } from "@buape/carbon"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeDiscordAccentColor, resolveDiscordAccentColor } from "./ui-colors.js"; export { normalizeDiscordAccentColor, resolveDiscordAccentColor } from "./ui-colors.js"; diff --git a/extensions/discord/src/voice/access.test.ts b/extensions/discord/src/voice/access.test.ts index 107dc757da5..cd3c5dfadaf 100644 --- a/extensions/discord/src/voice/access.test.ts +++ b/extensions/discord/src/voice/access.test.ts @@ -1,5 +1,5 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { authorizeDiscordVoiceIngress } from "./access.js"; diff --git a/extensions/discord/src/voice/access.ts b/extensions/discord/src/voice/access.ts index 7fcbe5b8b5f..49ce84bf276 100644 --- a/extensions/discord/src/voice/access.ts +++ b/extensions/discord/src/voice/access.ts @@ -1,7 +1,7 @@ import type { Guild } from "@buape/carbon"; import { resolveCommandAuthorizedFromAuthorizers } from "openclaw/plugin-sdk/command-auth-native"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-types"; import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy"; import { isDiscordGroupAllowedByPolicy, diff --git a/extensions/discord/src/voice/command.ts b/extensions/discord/src/voice/command.ts index aa3502aae75..eb82fab292a 100644 --- a/extensions/discord/src/voice/command.ts +++ b/extensions/discord/src/voice/command.ts @@ -10,8 +10,8 @@ import { ChannelType as DiscordChannelType, type APIApplicationCommandChannelOption, } from "discord-api-types/v10"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { DiscordAccountConfig } from "openclaw/plugin-sdk/config-types"; import { formatMention } from "../mentions.js"; import { resolveDiscordChannelNameSafe } from "../monitor/channel-access.js"; import { resolveDiscordSenderIdentity } from "../monitor/sender-identity.js"; diff --git a/extensions/discord/src/voice/manager.ts b/extensions/discord/src/voice/manager.ts index ae779c63d39..f321ce985e2 100644 --- a/extensions/discord/src/voice/manager.ts +++ b/extensions/discord/src/voice/manager.ts @@ -13,8 +13,8 @@ import { resolveTtsPrefsPath, type ResolvedTtsConfig, } from "openclaw/plugin-sdk/agent-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { DiscordAccountConfig, TtsConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { DiscordAccountConfig, TtsConfig } from "openclaw/plugin-sdk/config-types"; import { resolveAgentRoute } from "openclaw/plugin-sdk/routing"; import { logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env"; import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env"; diff --git a/extensions/duckduckgo/src/config.ts b/extensions/duckduckgo/src/config.ts index 5332c16c980..b828bdacaea 100644 --- a/extensions/duckduckgo/src/config.ts +++ b/extensions/duckduckgo/src/config.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; export const DEFAULT_DDG_SAFE_SEARCH = "moderate"; diff --git a/extensions/duckduckgo/src/ddg-client.ts b/extensions/duckduckgo/src/ddg-client.ts index 4e6d3c08d36..d33656585a4 100644 --- a/extensions/duckduckgo/src/ddg-client.ts +++ b/extensions/duckduckgo/src/ddg-client.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_CACHE_TTL_MINUTES, DEFAULT_SEARCH_COUNT, diff --git a/extensions/elevenlabs/doctor-contract.ts b/extensions/elevenlabs/doctor-contract.ts index 9c5e94e9e85..f174c22cca2 100644 --- a/extensions/elevenlabs/doctor-contract.ts +++ b/extensions/elevenlabs/doctor-contract.ts @@ -1,5 +1,5 @@ import type { ChannelDoctorLegacyConfigRule } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { isRecord } from "openclaw/plugin-sdk/text-runtime"; import { ELEVENLABS_TALK_PROVIDER_ID, migrateElevenLabsLegacyTalkConfig } from "./config-compat.js"; diff --git a/extensions/feishu/runtime-api.ts b/extensions/feishu/runtime-api.ts index eec0d4797d0..e5b844809e1 100644 --- a/extensions/feishu/runtime-api.ts +++ b/extensions/feishu/runtime-api.ts @@ -19,7 +19,7 @@ export type { } from "openclaw/plugin-sdk/core"; export type { OpenClawConfig as ClawdbotConfig } from "openclaw/plugin-sdk/core"; export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime"; -export type { GroupToolPolicyConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { GroupToolPolicyConfig } from "openclaw/plugin-sdk/config-types"; export { DEFAULT_ACCOUNT_ID, buildChannelConfigSchema, @@ -38,8 +38,11 @@ export { evaluateSupplementalContextVisibility, filterSupplementalContextItems, resolveChannelContextVisibilityMode, -} from "openclaw/plugin-sdk/config-runtime"; -export { loadSessionStore, resolveSessionStoreEntry } from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/context-visibility-runtime"; +export { + loadSessionStore, + resolveSessionStoreEntry, +} from "openclaw/plugin-sdk/session-store-runtime"; export { readJsonFileWithFallback } from "openclaw/plugin-sdk/json-store"; export { createPersistentDedupe } from "openclaw/plugin-sdk/persistent-dedupe"; export { normalizeAgentId } from "openclaw/plugin-sdk/routing"; diff --git a/extensions/feishu/src/channel.ts b/extensions/feishu/src/channel.ts index 34c18e28908..a6846fd3909 100644 --- a/extensions/feishu/src/channel.ts +++ b/extensions/feishu/src/channel.ts @@ -1140,7 +1140,7 @@ export const feishuPlugin: ChannelPlugin { const { createClackPrompter } = await import("openclaw/plugin-sdk/setup-runtime"); - const { replaceConfigFile } = await import("openclaw/plugin-sdk/config-runtime"); + const { replaceConfigFile } = await import("openclaw/plugin-sdk/config-mutation"); const prompter = createClackPrompter(); const nextCfg = await runFeishuLogin({ cfg, prompter }); if (nextCfg !== cfg) { diff --git a/extensions/feishu/src/comment-handler-runtime-api.ts b/extensions/feishu/src/comment-handler-runtime-api.ts index 326f2cb7022..646a742e979 100644 --- a/extensions/feishu/src/comment-handler-runtime-api.ts +++ b/extensions/feishu/src/comment-handler-runtime-api.ts @@ -1,3 +1,3 @@ -export type { OpenClawConfig as ClawdbotConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig as ClawdbotConfig } from "openclaw/plugin-sdk/config-types"; export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime"; export { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing"; diff --git a/extensions/feishu/src/send.ts b/extensions/feishu/src/send.ts index ccaeb908c00..3724ed9e5d8 100644 --- a/extensions/feishu/src/send.ts +++ b/extensions/feishu/src/send.ts @@ -1,4 +1,4 @@ -import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; import { convertMarkdownTables, normalizeLowercaseStringOrEmpty, diff --git a/extensions/feishu/src/thread-bindings.test.ts b/extensions/feishu/src/thread-bindings.test.ts index d02b392d8f4..2f24d31f172 100644 --- a/extensions/feishu/src/thread-bindings.test.ts +++ b/extensions/feishu/src/thread-bindings.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime"; import { beforeEach, describe, expect, it } from "vitest"; import { __testing, createFeishuThreadBindingManager } from "./thread-bindings.js"; diff --git a/extensions/feishu/src/thread-bindings.ts b/extensions/feishu/src/thread-bindings.ts index 3b976a7c668..176de0a5b83 100644 --- a/extensions/feishu/src/thread-bindings.ts +++ b/extensions/feishu/src/thread-bindings.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAgeMsForChannel, diff --git a/extensions/firecrawl/api.ts b/extensions/firecrawl/api.ts index 4c314c6bb3d..94b32e75e59 100644 --- a/extensions/firecrawl/api.ts +++ b/extensions/firecrawl/api.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { readStringValue } from "openclaw/plugin-sdk/text-runtime"; import { runFirecrawlScrape } from "./src/firecrawl-client.js"; diff --git a/extensions/firecrawl/src/config.ts b/extensions/firecrawl/src/config.ts index 0a501afb65e..2f6eb374d7f 100644 --- a/extensions/firecrawl/src/config.ts +++ b/extensions/firecrawl/src/config.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { canResolveEnvSecretRefInReadOnlyPath } from "openclaw/plugin-sdk/extension-shared"; import { resolveSecretInputString, normalizeSecretInput } from "openclaw/plugin-sdk/secret-input"; diff --git a/extensions/firecrawl/src/firecrawl-client.ts b/extensions/firecrawl/src/firecrawl-client.ts index 42621dd41ae..6fc00df8e55 100644 --- a/extensions/firecrawl/src/firecrawl-client.ts +++ b/extensions/firecrawl/src/firecrawl-client.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_CACHE_TTL_MINUTES, markdownToText, diff --git a/extensions/firecrawl/src/firecrawl-tools.test.ts b/extensions/firecrawl/src/firecrawl-tools.test.ts index ead73e95b5e..3cccccdf7be 100644 --- a/extensions/firecrawl/src/firecrawl-tools.test.ts +++ b/extensions/firecrawl/src/firecrawl-tools.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { mockPinnedHostnameResolution } from "../../../src/test-helpers/ssrf.js"; import { diff --git a/extensions/github-copilot/auth.ts b/extensions/github-copilot/auth.ts index 1e524f8048d..07ad01d13ed 100644 --- a/extensions/github-copilot/auth.ts +++ b/extensions/github-copilot/auth.ts @@ -1,10 +1,10 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { resolveRequiredConfiguredSecretRefInputString } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { coerceSecretRef, ensureAuthProfileStore, listProfilesForProvider, } from "openclaw/plugin-sdk/provider-auth"; +import { resolveRequiredConfiguredSecretRefInputString } from "openclaw/plugin-sdk/secret-input-runtime"; import { PROVIDER_ID } from "./models.js"; export async function resolveFirstGithubToken(params: { diff --git a/extensions/github-copilot/embeddings.ts b/extensions/github-copilot/embeddings.ts index 28a4210ec2d..6283764233c 100644 --- a/extensions/github-copilot/embeddings.ts +++ b/extensions/github-copilot/embeddings.ts @@ -1,4 +1,3 @@ -import { resolveConfiguredSecretInputString } from "openclaw/plugin-sdk/config-runtime"; import { DEFAULT_COPILOT_API_BASE_URL, resolveCopilotApiToken, @@ -10,6 +9,7 @@ import { type MemoryEmbeddingProvider, type MemoryEmbeddingProviderAdapter, } from "openclaw/plugin-sdk/memory-core-host-engine-embeddings"; +import { resolveConfiguredSecretInputString } from "openclaw/plugin-sdk/secret-input-runtime"; import { fetchWithSsrFGuard, type SsrFPolicy } from "openclaw/plugin-sdk/ssrf-runtime"; import { resolveFirstGithubToken } from "./auth.js"; diff --git a/extensions/github-copilot/index.ts b/extensions/github-copilot/index.ts index 39e68b6361f..44ec17359e2 100644 --- a/extensions/github-copilot/index.ts +++ b/extensions/github-copilot/index.ts @@ -1,4 +1,5 @@ -import { resolvePluginConfigObject, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime"; import { definePluginEntry, type ProviderAuthContext, diff --git a/extensions/github-copilot/login.ts b/extensions/github-copilot/login.ts index 263b97ddcaf..35a276cad5e 100644 --- a/extensions/github-copilot/login.ts +++ b/extensions/github-copilot/login.ts @@ -1,6 +1,6 @@ import { intro, note, outro, spinner } from "@clack/prompts"; import { stylePromptTitle } from "openclaw/plugin-sdk/cli-runtime"; -import { logConfigUpdated, updateConfig } from "openclaw/plugin-sdk/config-runtime"; +import { logConfigUpdated, updateConfig } from "openclaw/plugin-sdk/config-mutation"; import { applyAuthProfileConfig, ensureAuthProfileStore, diff --git a/extensions/google-meet/src/agent-consult.ts b/extensions/google-meet/src/agent-consult.ts index e536563efa8..da44d5699ae 100644 --- a/extensions/google-meet/src/agent-consult.ts +++ b/extensions/google-meet/src/agent-consult.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime"; import { buildRealtimeVoiceAgentConsultWorkingResponse, diff --git a/extensions/google-meet/src/realtime-node.ts b/extensions/google-meet/src/realtime-node.ts index 2b6fd25c913..2dc8e72afa8 100644 --- a/extensions/google-meet/src/realtime-node.ts +++ b/extensions/google-meet/src/realtime-node.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime"; import { diff --git a/extensions/google-meet/src/realtime.ts b/extensions/google-meet/src/realtime.ts index 37dd307d196..4873dc849c8 100644 --- a/extensions/google-meet/src/realtime.ts +++ b/extensions/google-meet/src/realtime.ts @@ -1,6 +1,6 @@ import { spawn } from "node:child_process"; import type { Writable } from "node:stream"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime"; import { diff --git a/extensions/google-meet/src/runtime.ts b/extensions/google-meet/src/runtime.ts index afa6ebd902a..9df38f0ab11 100644 --- a/extensions/google-meet/src/runtime.ts +++ b/extensions/google-meet/src/runtime.ts @@ -1,5 +1,5 @@ import { randomUUID } from "node:crypto"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/google-meet/src/transports/chrome.ts b/extensions/google-meet/src/transports/chrome.ts index 65b0575eda4..35fb7b24be3 100644 --- a/extensions/google-meet/src/transports/chrome.ts +++ b/extensions/google-meet/src/transports/chrome.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { callGatewayFromCli } from "openclaw/plugin-sdk/gateway-runtime"; import type { PluginRuntime } from "openclaw/plugin-sdk/plugin-runtime"; import type { RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime"; diff --git a/extensions/googlechat/runtime-api.ts b/extensions/googlechat/runtime-api.ts index 4df77e72bce..5ab7cef0eb8 100644 --- a/extensions/googlechat/runtime-api.ts +++ b/extensions/googlechat/runtime-api.ts @@ -29,20 +29,20 @@ export { } from "openclaw/plugin-sdk/channel-policy"; export { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status"; export { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { GoogleChatConfigSchema } from "openclaw/plugin-sdk/channel-config-schema-legacy"; export { GROUP_POLICY_BLOCKED_LABEL, - isDangerousNameMatchingEnabled, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/runtime-group-policy"; +export { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; export { fetchRemoteMedia, resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime"; export { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media"; export type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store"; export { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime"; -export type { GoogleChatAccountConfig, GoogleChatConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { GoogleChatAccountConfig, GoogleChatConfig } from "openclaw/plugin-sdk/config-types"; export { extractToolSend } from "openclaw/plugin-sdk/tool-send"; export { resolveInboundMentionDecision } from "openclaw/plugin-sdk/channel-inbound"; export { resolveInboundRouteEnvelopeBuilderWithRuntime } from "openclaw/plugin-sdk/inbound-envelope"; diff --git a/extensions/googlechat/src/actions.ts b/extensions/googlechat/src/actions.ts index 74ddf4101d2..eddd1916070 100644 --- a/extensions/googlechat/src/actions.ts +++ b/extensions/googlechat/src/actions.ts @@ -9,7 +9,7 @@ import type { ChannelMessageActionAdapter, ChannelMessageActionName, } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media"; import { extractToolSend } from "openclaw/plugin-sdk/tool-send"; import { listEnabledGoogleChatAccounts, resolveGoogleChatAccount } from "./accounts.js"; diff --git a/extensions/googlechat/src/doctor-contract.ts b/extensions/googlechat/src/doctor-contract.ts index 187fc8ea234..854a4b488c4 100644 --- a/extensions/googlechat/src/doctor-contract.ts +++ b/extensions/googlechat/src/doctor-contract.ts @@ -2,7 +2,7 @@ import type { ChannelDoctorConfigMutation, ChannelDoctorLegacyConfigRule, } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { asObjectRecord } from "openclaw/plugin-sdk/runtime-doctor"; type GoogleChatChannelsConfig = NonNullable; diff --git a/extensions/googlechat/src/gateway.ts b/extensions/googlechat/src/gateway.ts index 02db0ad51ae..49b3cbba8c2 100644 --- a/extensions/googlechat/src/gateway.ts +++ b/extensions/googlechat/src/gateway.ts @@ -2,7 +2,7 @@ import { createAccountStatusSink, runPassiveAccountLifecycle, } from "openclaw/plugin-sdk/channel-lifecycle"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime"; import type { ChannelAccountSnapshot } from "openclaw/plugin-sdk/status-helpers"; import type { ResolvedGoogleChatAccount } from "./accounts.js"; diff --git a/extensions/imessage/runtime-api.ts b/extensions/imessage/runtime-api.ts index 88c3187d924..0f09e73e5ce 100644 --- a/extensions/imessage/runtime-api.ts +++ b/extensions/imessage/runtime-api.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig as RuntimeApiOpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig as RuntimeApiOpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { DEFAULT_ACCOUNT_ID, diff --git a/extensions/imessage/src/account-types.ts b/extensions/imessage/src/account-types.ts index fd3b3b9d350..6be29a0e7e9 100644 --- a/extensions/imessage/src/account-types.ts +++ b/extensions/imessage/src/account-types.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type IMessageAccountConfig = Omit< NonNullable["imessage"]>, diff --git a/extensions/imessage/src/channel-inbound-roots.contract.test.ts b/extensions/imessage/src/channel-inbound-roots.contract.test.ts index cf23c473277..fb925111566 100644 --- a/extensions/imessage/src/channel-inbound-roots.contract.test.ts +++ b/extensions/imessage/src/channel-inbound-roots.contract.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, diff --git a/extensions/imessage/src/config-accessors.ts b/extensions/imessage/src/config-accessors.ts index 4e0aadfd145..8693a299e2d 100644 --- a/extensions/imessage/src/config-accessors.ts +++ b/extensions/imessage/src/config-accessors.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveIMessageAccount } from "./accounts.js"; export function resolveIMessageConfigAllowFrom(params: { diff --git a/extensions/imessage/src/conversation-bindings.ts b/extensions/imessage/src/conversation-bindings.ts index c14a60cb9d5..608263396fd 100644 --- a/extensions/imessage/src/conversation-bindings.ts +++ b/extensions/imessage/src/conversation-bindings.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { createAccountScopedConversationBindingManager, resetAccountScopedConversationBindingsForTests, diff --git a/extensions/imessage/src/conversation-route.test.ts b/extensions/imessage/src/conversation-route.test.ts index 779ad08a039..9654d4e7d92 100644 --- a/extensions/imessage/src/conversation-route.test.ts +++ b/extensions/imessage/src/conversation-route.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { __testing as sessionBindingTesting, registerSessionBindingAdapter, diff --git a/extensions/imessage/src/conversation-route.ts b/extensions/imessage/src/conversation-route.ts index fecc6810a88..f46df84fafb 100644 --- a/extensions/imessage/src/conversation-route.ts +++ b/extensions/imessage/src/conversation-route.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRoute, diff --git a/extensions/imessage/src/media-contract.ts b/extensions/imessage/src/media-contract.ts index a64610131f4..cf4d8a7145c 100644 --- a/extensions/imessage/src/media-contract.ts +++ b/extensions/imessage/src/media-contract.ts @@ -1,5 +1,5 @@ import { mergeInboundPathRoots } from "openclaw/plugin-sdk/channel-inbound-roots"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveIMessageAccount } from "./accounts.js"; export const DEFAULT_IMESSAGE_ATTACHMENT_ROOTS = ["/Users/*/Library/Messages/Attachments"] as const; diff --git a/extensions/imessage/src/monitor.gating.test.ts b/extensions/imessage/src/monitor.gating.test.ts index dbb4ba6b5fc..17def201753 100644 --- a/extensions/imessage/src/monitor.gating.test.ts +++ b/extensions/imessage/src/monitor.gating.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { buildIMessageInboundContext, diff --git a/extensions/imessage/src/monitor/deliver.runtime.ts b/extensions/imessage/src/monitor/deliver.runtime.ts index e1fbcb5de6f..2a829578e76 100644 --- a/extensions/imessage/src/monitor/deliver.runtime.ts +++ b/extensions/imessage/src/monitor/deliver.runtime.ts @@ -1,3 +1,3 @@ -export { resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +export { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; export { chunkTextWithMode, resolveChunkMode } from "openclaw/plugin-sdk/reply-runtime"; export { convertMarkdownTables } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/imessage/src/monitor/deliver.ts b/extensions/imessage/src/monitor/deliver.ts index 7fbd51ada0c..71a4e834bd2 100644 --- a/extensions/imessage/src/monitor/deliver.ts +++ b/extensions/imessage/src/monitor/deliver.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { deliverTextOrMediaReply, resolveSendableOutboundReplyParts, diff --git a/extensions/imessage/src/monitor/inbound-processing.test.ts b/extensions/imessage/src/monitor/inbound-processing.test.ts index 9550dbc4650..1bab96bbae9 100644 --- a/extensions/imessage/src/monitor/inbound-processing.test.ts +++ b/extensions/imessage/src/monitor/inbound-processing.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it, vi } from "vitest"; import { sanitizeTerminalText } from "../../../../src/terminal/safe-text.js"; import { diff --git a/extensions/imessage/src/monitor/inbound-processing.ts b/extensions/imessage/src/monitor/inbound-processing.ts index 5d927b6a15c..a9aae9e68b5 100644 --- a/extensions/imessage/src/monitor/inbound-processing.ts +++ b/extensions/imessage/src/monitor/inbound-processing.ts @@ -8,14 +8,14 @@ import { resolveEnvelopeFormatOptions, resolveInboundMentionDecision, } from "openclaw/plugin-sdk/channel-inbound"; -import { hasControlCommand } from "openclaw/plugin-sdk/command-auth"; -import { resolveDualTextControlCommandGate } from "openclaw/plugin-sdk/command-auth"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; import { - resolveChannelContextVisibilityMode, resolveChannelGroupPolicy, resolveChannelGroupRequireMention, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/channel-policy"; +import { hasControlCommand } from "openclaw/plugin-sdk/command-auth"; +import { resolveDualTextControlCommandGate } from "openclaw/plugin-sdk/command-auth"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime"; import { buildPendingHistoryContextFromMap, recordPendingHistoryEntryIfEnabled, diff --git a/extensions/imessage/src/monitor/monitor-provider.ts b/extensions/imessage/src/monitor/monitor-provider.ts index 61db9180f46..e82a030388a 100644 --- a/extensions/imessage/src/monitor/monitor-provider.ts +++ b/extensions/imessage/src/monitor/monitor-provider.ts @@ -6,13 +6,6 @@ import { } from "openclaw/plugin-sdk/channel-inbound"; import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing"; import { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline"; -import { getRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; -import { - resolveOpenProviderRuntimeGroupPolicy, - resolveDefaultGroupPolicy, - warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/config-runtime"; -import { readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/config-runtime"; import { readChannelAllowFromStore, upsertChannelPairingRequest, @@ -29,8 +22,15 @@ import { import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-runtime"; import { dispatchInboundMessage } from "openclaw/plugin-sdk/reply-runtime"; import { createReplyDispatcher } from "openclaw/plugin-sdk/reply-runtime"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { danger, logVerbose, shouldLogVerbose, warn } from "openclaw/plugin-sdk/runtime-env"; +import { + resolveOpenProviderRuntimeGroupPolicy, + resolveDefaultGroupPolicy, + warnMissingProviderGroupPolicyFallbackOnce, +} from "openclaw/plugin-sdk/runtime-group-policy"; import { resolvePinnedMainDmOwnerFromAllowlist } from "openclaw/plugin-sdk/security-runtime"; +import { readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime"; import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-runtime"; import { resolveIMessageAccount } from "../accounts.js"; import { createIMessageRpcClient, type IMessageRpcClient } from "../client.js"; diff --git a/extensions/imessage/src/monitor/self-chat-dedupe.test.ts b/extensions/imessage/src/monitor/self-chat-dedupe.test.ts index 8311c759419..3415e46d12f 100644 --- a/extensions/imessage/src/monitor/self-chat-dedupe.test.ts +++ b/extensions/imessage/src/monitor/self-chat-dedupe.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it, vi } from "vitest"; import { createSentMessageCache } from "./echo-cache.js"; import { resolveIMessageInboundDecision } from "./inbound-processing.js"; diff --git a/extensions/imessage/src/monitor/types.ts b/extensions/imessage/src/monitor/types.ts index 78c56285536..cb29a224911 100644 --- a/extensions/imessage/src/monitor/types.ts +++ b/extensions/imessage/src/monitor/types.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; export type IMessageAttachment = { diff --git a/extensions/imessage/src/probe.ts b/extensions/imessage/src/probe.ts index f8713ab2abf..740ea3335fc 100644 --- a/extensions/imessage/src/probe.ts +++ b/extensions/imessage/src/probe.ts @@ -1,6 +1,6 @@ import type { BaseProbeResult } from "openclaw/plugin-sdk/channel-contract"; -import { getRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; import { runCommandWithTimeout } from "openclaw/plugin-sdk/process-runtime"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { detectBinary } from "openclaw/plugin-sdk/setup"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/imessage/src/send.ts b/extensions/imessage/src/send.ts index 26864e0d9b4..1cd146e4bb4 100644 --- a/extensions/imessage/src/send.ts +++ b/extensions/imessage/src/send.ts @@ -1,7 +1,8 @@ -import { requireRuntimeConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; import { kindFromMime } from "openclaw/plugin-sdk/media-runtime"; import { resolveOutboundAttachmentFromUrl } from "openclaw/plugin-sdk/media-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { convertMarkdownTables } from "openclaw/plugin-sdk/text-runtime"; import { stripInlineDirectiveTagsForDelivery } from "openclaw/plugin-sdk/text-runtime"; import { resolveIMessageAccount, type ResolvedIMessageAccount } from "./accounts.js"; diff --git a/extensions/irc/src/inbound.ts b/extensions/irc/src/inbound.ts index 2c693303fee..17309b6cdb3 100644 --- a/extensions/irc/src/inbound.ts +++ b/extensions/irc/src/inbound.ts @@ -4,19 +4,19 @@ import { resolveEffectiveAllowFromLists, } from "openclaw/plugin-sdk/channel-policy"; import { resolveControlCommandGate } from "openclaw/plugin-sdk/command-auth"; -import { - GROUP_POLICY_BLOCKED_LABEL, - isDangerousNameMatchingEnabled, - resolveAllowlistProviderRuntimeGroupPolicy, - resolveDefaultGroupPolicy, - warnMissingProviderGroupPolicyFallbackOnce, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; import { deliverFormattedTextWithAttachments, type OutboundReplyPayload, } from "openclaw/plugin-sdk/reply-payload"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime"; +import { + GROUP_POLICY_BLOCKED_LABEL, + resolveAllowlistProviderRuntimeGroupPolicy, + resolveDefaultGroupPolicy, + warnMissingProviderGroupPolicyFallbackOnce, +} from "openclaw/plugin-sdk/runtime-group-policy"; import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, diff --git a/extensions/irc/src/policy.test.ts b/extensions/irc/src/policy.test.ts index 2101eed25a2..688b96db055 100644 --- a/extensions/irc/src/policy.test.ts +++ b/extensions/irc/src/policy.test.ts @@ -1,4 +1,4 @@ -import { resolveChannelGroupPolicy } from "openclaw/plugin-sdk/config-runtime"; +import { resolveChannelGroupPolicy } from "openclaw/plugin-sdk/channel-policy"; import { describe, expect, it } from "vitest"; import { resolveIrcGroupAccessGate, diff --git a/extensions/irc/src/runtime-api.ts b/extensions/irc/src/runtime-api.ts index fbe2bb4cbea..696227025fc 100644 --- a/extensions/irc/src/runtime-api.ts +++ b/extensions/irc/src/runtime-api.ts @@ -3,7 +3,7 @@ export type { BaseProbeResult } from "openclaw/plugin-sdk/channel-contract"; export type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store"; export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime"; export type { @@ -14,7 +14,7 @@ export type { GroupToolPolicyBySenderConfig, GroupToolPolicyConfig, MarkdownConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; export type { OutboundReplyPayload } from "openclaw/plugin-sdk/reply-payload"; export { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id"; export { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives"; @@ -38,9 +38,9 @@ export { } from "openclaw/plugin-sdk/reply-payload"; export { GROUP_POLICY_BLOCKED_LABEL, - isDangerousNameMatchingEnabled, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/runtime-group-policy"; +export { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; export { logInboundDrop } from "openclaw/plugin-sdk/channel-inbound"; diff --git a/extensions/irc/src/send.ts b/extensions/irc/src/send.ts index 654e0a0a1b3..2254461b9c8 100644 --- a/extensions/irc/src/send.ts +++ b/extensions/irc/src/send.ts @@ -1,4 +1,5 @@ -import { requireRuntimeConfig, resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { convertMarkdownTables } from "openclaw/plugin-sdk/text-runtime"; import { resolveIrcAccount } from "./accounts.js"; import type { IrcClient } from "./client.js"; diff --git a/extensions/irc/src/setup-core.ts b/extensions/irc/src/setup-core.ts index f111041b9e1..4aa7e4947b1 100644 --- a/extensions/irc/src/setup-core.ts +++ b/extensions/irc/src/setup-core.ts @@ -1,5 +1,5 @@ import type { ChannelSetupAdapter, ChannelSetupInput } from "openclaw/plugin-sdk/channel-setup"; -import type { DmPolicy } from "openclaw/plugin-sdk/config-runtime"; +import type { DmPolicy } from "openclaw/plugin-sdk/config-types"; import { normalizeAccountId } from "openclaw/plugin-sdk/routing"; import { applyAccountNameToChannelSection, diff --git a/extensions/kilocode/onboard.test.ts b/extensions/kilocode/onboard.test.ts index a379d4ec975..f3215ea260f 100644 --- a/extensions/kilocode/onboard.test.ts +++ b/extensions/kilocode/onboard.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveEnvApiKey } from "openclaw/plugin-sdk/provider-auth-runtime"; import { resolveAgentModelPrimaryValue } from "openclaw/plugin-sdk/provider-onboard"; import { captureEnv } from "openclaw/plugin-sdk/testing"; diff --git a/extensions/line/src/accounts.test.ts b/extensions/line/src/accounts.test.ts index f29c1ce56be..7b83486fc9a 100644 --- a/extensions/line/src/accounts.test.ts +++ b/extensions/line/src/accounts.test.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, it, expect, beforeEach, afterEach } from "vitest"; import { resolveLineAccount, diff --git a/extensions/line/src/auto-reply-delivery.ts b/extensions/line/src/auto-reply-delivery.ts index d6f828f8957..fcced53036a 100644 --- a/extensions/line/src/auto-reply-delivery.ts +++ b/extensions/line/src/auto-reply-delivery.ts @@ -1,5 +1,5 @@ import type { messagingApi } from "@line/bot-sdk"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload"; import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; import type { FlexContainer } from "./flex-templates.js"; diff --git a/extensions/line/src/bot-handlers.ts b/extensions/line/src/bot-handlers.ts index c9d58d01c58..e0105cd9b89 100644 --- a/extensions/line/src/bot-handlers.ts +++ b/extensions/line/src/bot-handlers.ts @@ -6,12 +6,7 @@ import { } from "openclaw/plugin-sdk/channel-inbound"; import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing"; import { hasControlCommand, resolveControlCommandGate } from "openclaw/plugin-sdk/command-auth"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { - resolveAllowlistProviderRuntimeGroupPolicy, - resolveDefaultGroupPolicy, - warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { readChannelAllowFromStore, resolvePairingIdLabel, @@ -28,6 +23,11 @@ import { import { resolveAgentRoute } from "openclaw/plugin-sdk/routing"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime"; import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env"; +import { + resolveAllowlistProviderRuntimeGroupPolicy, + resolveDefaultGroupPolicy, + warnMissingProviderGroupPolicyFallbackOnce, +} from "openclaw/plugin-sdk/runtime-group-policy"; import { firstDefined, isSenderAllowed, diff --git a/extensions/line/src/bot-message-context.test.ts b/extensions/line/src/bot-message-context.test.ts index 803c4b5c77a..3487378ee60 100644 --- a/extensions/line/src/bot-message-context.test.ts +++ b/extensions/line/src/bot-message-context.test.ts @@ -2,7 +2,7 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import type { webhook } from "@line/bot-sdk"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime"; import { __testing as sessionBindingTesting } from "openclaw/plugin-sdk/conversation-runtime"; import { afterEach, beforeEach, describe, expect, it } from "vitest"; diff --git a/extensions/line/src/bot-message-context.ts b/extensions/line/src/bot-message-context.ts index cb01b941541..c8b4dd5e7ed 100644 --- a/extensions/line/src/bot-message-context.ts +++ b/extensions/line/src/bot-message-context.ts @@ -5,7 +5,7 @@ import { resolveInboundSessionEnvelopeContext, toLocationContext, } from "openclaw/plugin-sdk/channel-inbound"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { ensureConfiguredBindingRouteReady, recordInboundSession, diff --git a/extensions/line/src/bot.ts b/extensions/line/src/bot.ts index d7b8a18c756..2b0103f1ee1 100644 --- a/extensions/line/src/bot.ts +++ b/extensions/line/src/bot.ts @@ -1,8 +1,8 @@ import type { webhook } from "@line/bot-sdk"; import type { NextFunction, Request, Response } from "express"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { getRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_GROUP_HISTORY_LIMIT, type HistoryEntry } from "openclaw/plugin-sdk/reply-history"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { createNonExitingRuntime, logVerbose, diff --git a/extensions/line/src/channel-setup-status.contract.test.ts b/extensions/line/src/channel-setup-status.contract.test.ts index c0e8942ef94..aab5bf79ef5 100644 --- a/extensions/line/src/channel-setup-status.contract.test.ts +++ b/extensions/line/src/channel-setup-status.contract.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect } from "vitest"; import { installChannelSetupContractSuite, diff --git a/extensions/line/src/monitor.lifecycle.test.ts b/extensions/line/src/monitor.lifecycle.test.ts index 171f706a69c..ac3a55528a2 100644 --- a/extensions/line/src/monitor.lifecycle.test.ts +++ b/extensions/line/src/monitor.lifecycle.test.ts @@ -1,5 +1,5 @@ import type { IncomingMessage, ServerResponse } from "node:http"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { WEBHOOK_IN_FLIGHT_DEFAULTS } from "openclaw/plugin-sdk/webhook-request-guards"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/extensions/line/src/monitor.ts b/extensions/line/src/monitor.ts index f0ca80f4ed4..7f4171d480d 100644 --- a/extensions/line/src/monitor.ts +++ b/extensions/line/src/monitor.ts @@ -1,6 +1,6 @@ import type { webhook } from "@line/bot-sdk"; import { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { dispatchReplyWithBufferedBlockDispatcher, chunkMarkdownText, diff --git a/extensions/line/src/reply-chunks.ts b/extensions/line/src/reply-chunks.ts index 6534b96d3c1..264317f2dee 100644 --- a/extensions/line/src/reply-chunks.ts +++ b/extensions/line/src/reply-chunks.ts @@ -1,5 +1,5 @@ import type { messagingApi } from "@line/bot-sdk"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type LineReplyMessage = messagingApi.TextMessage; diff --git a/extensions/line/src/rich-menu.ts b/extensions/line/src/rich-menu.ts index 0103068b584..4a06b711b2e 100644 --- a/extensions/line/src/rich-menu.ts +++ b/extensions/line/src/rich-menu.ts @@ -1,6 +1,6 @@ import { readFile } from "node:fs/promises"; import { messagingApi } from "@line/bot-sdk"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; import { resolveLineAccount } from "./accounts.js"; diff --git a/extensions/line/src/send.ts b/extensions/line/src/send.ts index f9be3d6bee3..2f05cd65925 100644 --- a/extensions/line/src/send.ts +++ b/extensions/line/src/send.ts @@ -1,6 +1,7 @@ import { messagingApi } from "@line/bot-sdk"; -import { requireRuntimeConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { resolveLineAccount } from "./accounts.js"; import { resolveLineChannelAccessToken } from "./channel-access-token.js"; diff --git a/extensions/litellm/image-generation-provider.ts b/extensions/litellm/image-generation-provider.ts index ec904ecc62b..5843edbcd46 100644 --- a/extensions/litellm/image-generation-provider.ts +++ b/extensions/litellm/image-generation-provider.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ImageGenerationProvider } from "openclaw/plugin-sdk/image-generation"; import { isProviderApiKeyConfigured } from "openclaw/plugin-sdk/provider-auth"; import { resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runtime"; diff --git a/extensions/lmstudio/src/runtime.ts b/extensions/lmstudio/src/runtime.ts index 042ec4661d0..b8eac211f34 100644 --- a/extensions/lmstudio/src/runtime.ts +++ b/extensions/lmstudio/src/runtime.ts @@ -1,4 +1,3 @@ -import { resolveConfiguredSecretInputString } from "openclaw/plugin-sdk/config-runtime"; import { CUSTOM_LOCAL_AUTH_MARKER, isKnownEnvApiKeyMarker, @@ -8,6 +7,7 @@ import { type OpenClawConfig, } from "openclaw/plugin-sdk/provider-auth"; import { resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runtime"; +import { resolveConfiguredSecretInputString } from "openclaw/plugin-sdk/secret-input-runtime"; import { LMSTUDIO_DEFAULT_API_KEY_ENV_VAR, LMSTUDIO_LOCAL_API_KEY_PLACEHOLDER, diff --git a/extensions/matrix/auth-presence.ts b/extensions/matrix/auth-presence.ts index 60ca1ffbb59..13ea3a7bab7 100644 --- a/extensions/matrix/auth-presence.ts +++ b/extensions/matrix/auth-presence.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveStateDir } from "openclaw/plugin-sdk/state-paths"; import { resolveMatrixCredentialsDir, diff --git a/extensions/matrix/runtime-api.ts b/extensions/matrix/runtime-api.ts index 743963e89da..4ff094f29ed 100644 --- a/extensions/matrix/runtime-api.ts +++ b/extensions/matrix/runtime-api.ts @@ -30,7 +30,7 @@ export type { ChannelDirectoryEntry, ChannelMessageActionContext, } from "openclaw/plugin-sdk/channel-contract"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { formatZonedTimestamp } from "openclaw/plugin-sdk/core"; export type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime"; export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; diff --git a/extensions/matrix/src/account-selection.test.ts b/extensions/matrix/src/account-selection.test.ts index b963cc6551b..f80a657c41a 100644 --- a/extensions/matrix/src/account-selection.test.ts +++ b/extensions/matrix/src/account-selection.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { findMatrixAccountEntry, diff --git a/extensions/matrix/src/account-selection.ts b/extensions/matrix/src/account-selection.ts index 05597085a6e..811d8113218 100644 --- a/extensions/matrix/src/account-selection.ts +++ b/extensions/matrix/src/account-selection.ts @@ -9,7 +9,7 @@ import { normalizeAccountId, normalizeOptionalAccountId, } from "openclaw/plugin-sdk/account-id"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input-runtime"; import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime"; import { diff --git a/extensions/matrix/src/approval-native.test.ts b/extensions/matrix/src/approval-native.test.ts index 662492b6beb..fc780ecfe84 100644 --- a/extensions/matrix/src/approval-native.test.ts +++ b/extensions/matrix/src/approval-native.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { matrixApprovalCapability } from "./approval-native.js"; diff --git a/extensions/matrix/src/doctor-contract.ts b/extensions/matrix/src/doctor-contract.ts index ad4884629f0..9246ec5bfc4 100644 --- a/extensions/matrix/src/doctor-contract.ts +++ b/extensions/matrix/src/doctor-contract.ts @@ -2,7 +2,7 @@ import type { ChannelDoctorConfigMutation, ChannelDoctorLegacyConfigRule, } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { hasLegacyFlatAllowPrivateNetworkAlias, migrateLegacyFlatAllowPrivateNetworkAlias, diff --git a/extensions/matrix/src/doctor.ts b/extensions/matrix/src/doctor.ts index bca71c1bb6c..8d88fa58e77 100644 --- a/extensions/matrix/src/doctor.ts +++ b/extensions/matrix/src/doctor.ts @@ -1,5 +1,5 @@ import { type ChannelDoctorAdapter } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { detectPluginInstallPathIssue, formatPluginInstallPathIssue, diff --git a/extensions/matrix/src/exec-approval-resolver.ts b/extensions/matrix/src/exec-approval-resolver.ts index 52bbb615854..d2c333c00c5 100644 --- a/extensions/matrix/src/exec-approval-resolver.ts +++ b/extensions/matrix/src/exec-approval-resolver.ts @@ -1,6 +1,6 @@ import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime"; import type { ExecApprovalReplyDecision } from "openclaw/plugin-sdk/approval-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime"; export { isApprovalNotFoundError }; diff --git a/extensions/matrix/src/exec-approvals.test.ts b/extensions/matrix/src/exec-approvals.test.ts index 6e56af329dd..83476e8e2e7 100644 --- a/extensions/matrix/src/exec-approvals.test.ts +++ b/extensions/matrix/src/exec-approvals.test.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it } from "vitest"; import { getMatrixExecApprovalApprovers, diff --git a/extensions/matrix/src/exec-approvals.ts b/extensions/matrix/src/exec-approvals.ts index f12da3d9e56..edda9e0c1d7 100644 --- a/extensions/matrix/src/exec-approvals.ts +++ b/extensions/matrix/src/exec-approvals.ts @@ -7,7 +7,7 @@ import { matchesApprovalRequestFilters, } from "openclaw/plugin-sdk/approval-client-runtime"; import { resolveApprovalRequestChannelAccountId } from "openclaw/plugin-sdk/approval-native-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ExecApprovalRequest, PluginApprovalRequest } from "openclaw/plugin-sdk/infra-runtime"; import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; import { normalizeAccountId } from "openclaw/plugin-sdk/routing"; diff --git a/extensions/matrix/src/legacy-crypto.test.ts b/extensions/matrix/src/legacy-crypto.test.ts index e161bdec104..29bd9ea8e04 100644 --- a/extensions/matrix/src/legacy-crypto.test.ts +++ b/extensions/matrix/src/legacy-crypto.test.ts @@ -1,6 +1,6 @@ import fs from "node:fs"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it, vi } from "vitest"; import { withTempHome } from "../../../test/helpers/temp-home.js"; diff --git a/extensions/matrix/src/legacy-crypto.ts b/extensions/matrix/src/legacy-crypto.ts index 7fdaba80dca..a34972c16ef 100644 --- a/extensions/matrix/src/legacy-crypto.ts +++ b/extensions/matrix/src/legacy-crypto.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { writeJsonFileAtomically as writeJsonFileAtomicallyImpl } from "openclaw/plugin-sdk/json-store"; import { resolveStateDir } from "openclaw/plugin-sdk/state-paths"; import { resolveConfiguredMatrixAccountIds } from "./account-selection.js"; diff --git a/extensions/matrix/src/legacy-state.test.ts b/extensions/matrix/src/legacy-state.test.ts index 32eefa577ec..c495d575b42 100644 --- a/extensions/matrix/src/legacy-state.test.ts +++ b/extensions/matrix/src/legacy-state.test.ts @@ -1,6 +1,6 @@ import fs from "node:fs"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { withTempHome } from "../../../test/helpers/temp-home.js"; import { autoMigrateLegacyMatrixState, detectLegacyMatrixState } from "./legacy-state.js"; diff --git a/extensions/matrix/src/legacy-state.ts b/extensions/matrix/src/legacy-state.ts index 1368528a2e8..1a23c3703e3 100644 --- a/extensions/matrix/src/legacy-state.ts +++ b/extensions/matrix/src/legacy-state.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveStateDir } from "openclaw/plugin-sdk/state-paths"; import { resolveLegacyMatrixFlatStoreTarget } from "./migration-config.js"; import { resolveMatrixLegacyFlatStoragePaths } from "./storage-paths.js"; diff --git a/extensions/matrix/src/matrix/actions/verification.ts b/extensions/matrix/src/matrix/actions/verification.ts index 50077f9c6fc..c23425e2256 100644 --- a/extensions/matrix/src/matrix/actions/verification.ts +++ b/extensions/matrix/src/matrix/actions/verification.ts @@ -1,5 +1,5 @@ import { setTimeout as sleep } from "node:timers/promises"; -import { requireRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime"; import type { CoreConfig } from "../../types.js"; import { formatMatrixEncryptionUnavailableError } from "../encryption-guidance.js"; diff --git a/extensions/matrix/src/matrix/client-bootstrap.ts b/extensions/matrix/src/matrix/client-bootstrap.ts index 04b5d9b7ef8..4ea0dc0f96d 100644 --- a/extensions/matrix/src/matrix/client-bootstrap.ts +++ b/extensions/matrix/src/matrix/client-bootstrap.ts @@ -1,4 +1,4 @@ -import { requireRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import type { CoreConfig } from "../types.js"; import { getActiveMatrixClient } from "./active-client.js"; import { isBunRuntime } from "./client/runtime.js"; diff --git a/extensions/matrix/src/matrix/client/config-secret-input.runtime.ts b/extensions/matrix/src/matrix/client/config-secret-input.runtime.ts index 27aac7c4690..326a88eecaf 100644 --- a/extensions/matrix/src/matrix/client/config-secret-input.runtime.ts +++ b/extensions/matrix/src/matrix/client/config-secret-input.runtime.ts @@ -1 +1 @@ -export { resolveConfiguredSecretInputString } from "openclaw/plugin-sdk/config-runtime"; +export { resolveConfiguredSecretInputString } from "openclaw/plugin-sdk/secret-input-runtime"; diff --git a/extensions/matrix/src/matrix/client/config.ts b/extensions/matrix/src/matrix/client/config.ts index d661042b49f..20604d983aa 100644 --- a/extensions/matrix/src/matrix/client/config.ts +++ b/extensions/matrix/src/matrix/client/config.ts @@ -1,5 +1,5 @@ -import { requireRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { retryAsync } from "openclaw/plugin-sdk/retry-runtime"; import { coerceSecretRef, diff --git a/extensions/matrix/src/matrix/client/storage.ts b/extensions/matrix/src/matrix/client/storage.ts index ff194aceecb..759909068b0 100644 --- a/extensions/matrix/src/matrix/client/storage.ts +++ b/extensions/matrix/src/matrix/client/storage.ts @@ -2,7 +2,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; import { normalizeAccountId } from "openclaw/plugin-sdk/account-id"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { requiresExplicitMatrixDefaultAccount, resolveMatrixDefaultOrOnlyAccountId, diff --git a/extensions/matrix/src/matrix/credentials-read.ts b/extensions/matrix/src/matrix/credentials-read.ts index ffaa5a9d914..5299413dc38 100644 --- a/extensions/matrix/src/matrix/credentials-read.ts +++ b/extensions/matrix/src/matrix/credentials-read.ts @@ -2,7 +2,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { requiresExplicitMatrixDefaultAccount, resolveMatrixDefaultOrOnlyAccountId, diff --git a/extensions/matrix/src/matrix/monitor/ack-config.ts b/extensions/matrix/src/matrix/monitor/ack-config.ts index 0c375aeb516..b3e6a742ded 100644 --- a/extensions/matrix/src/matrix/monitor/ack-config.ts +++ b/extensions/matrix/src/matrix/monitor/ack-config.ts @@ -1,5 +1,5 @@ import { resolveAckReaction } from "openclaw/plugin-sdk/channel-feedback"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { CoreConfig } from "../../types.js"; import { resolveMatrixAccountConfig } from "../account-config.js"; diff --git a/extensions/matrix/src/matrix/monitor/runtime-api.ts b/extensions/matrix/src/matrix/monitor/runtime-api.ts index 401d60c20b5..01c86a07244 100644 --- a/extensions/matrix/src/matrix/monitor/runtime-api.ts +++ b/extensions/matrix/src/matrix/monitor/runtime-api.ts @@ -5,7 +5,7 @@ export type { NormalizedLocation } from "openclaw/plugin-sdk/channel-location"; export type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime"; export type { BlockReplyContext, ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; -export type { MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime"; export { addAllowlistUserEntriesFromConfigEntry, diff --git a/extensions/matrix/src/matrix/send.ts b/extensions/matrix/src/matrix/send.ts index 7aefc46803b..ca792de330e 100644 --- a/extensions/matrix/src/matrix/send.ts +++ b/extensions/matrix/src/matrix/send.ts @@ -1,5 +1,5 @@ -import { requireRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; import type { MarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import type { PollInput } from "../runtime-api.js"; import { getMatrixRuntime } from "../runtime.js"; import type { CoreConfig } from "../types.js"; diff --git a/extensions/matrix/src/matrix/send/client.ts b/extensions/matrix/src/matrix/send/client.ts index b06c8e33509..cc96f088680 100644 --- a/extensions/matrix/src/matrix/send/client.ts +++ b/extensions/matrix/src/matrix/send/client.ts @@ -1,4 +1,4 @@ -import { requireRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import type { CoreConfig } from "../../types.js"; import { resolveMatrixAccountConfig } from "../account-config.js"; import type { MatrixClient } from "../sdk.js"; diff --git a/extensions/matrix/src/matrix/thread-bindings.ts b/extensions/matrix/src/matrix/thread-bindings.ts index f0541619023..953b9f2b467 100644 --- a/extensions/matrix/src/matrix/thread-bindings.ts +++ b/extensions/matrix/src/matrix/thread-bindings.ts @@ -1,5 +1,5 @@ import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { readJsonFileWithFallback, writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store"; import { resolveAgentIdFromSessionKey } from "openclaw/plugin-sdk/session-key-runtime"; import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime"; diff --git a/extensions/matrix/src/migration-config.test.ts b/extensions/matrix/src/migration-config.test.ts index 0f6e7d3b532..c59d03b1b57 100644 --- a/extensions/matrix/src/migration-config.test.ts +++ b/extensions/matrix/src/migration-config.test.ts @@ -1,5 +1,5 @@ import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { withTempHome } from "../../../test/helpers/temp-home.js"; import { resolveMatrixMigrationAccountTarget } from "./migration-config.js"; diff --git a/extensions/matrix/src/migration-config.ts b/extensions/matrix/src/migration-config.ts index 73ef3ee5766..07bbe79d924 100644 --- a/extensions/matrix/src/migration-config.ts +++ b/extensions/matrix/src/migration-config.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveStateDir } from "openclaw/plugin-sdk/state-paths"; import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime"; import { diff --git a/extensions/matrix/src/migration-snapshot.ts b/extensions/matrix/src/migration-snapshot.ts index c5a518cf825..17a475187ad 100644 --- a/extensions/matrix/src/migration-snapshot.ts +++ b/extensions/matrix/src/migration-snapshot.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { detectLegacyMatrixCrypto } from "./legacy-crypto.js"; import { detectLegacyMatrixState } from "./legacy-state.js"; import { diff --git a/extensions/matrix/src/onboarding.ts b/extensions/matrix/src/onboarding.ts index 9d26e548283..72861d2defc 100644 --- a/extensions/matrix/src/onboarding.ts +++ b/extensions/matrix/src/onboarding.ts @@ -1,5 +1,5 @@ import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id"; -import type { DmPolicy } from "openclaw/plugin-sdk/config-runtime"; +import type { DmPolicy } from "openclaw/plugin-sdk/config-types"; import { type ChannelSetupDmPolicy, type ChannelSetupWizardAdapter, diff --git a/extensions/matrix/src/runtime-api.ts b/extensions/matrix/src/runtime-api.ts index dd92cbc4f48..3f353a94b76 100644 --- a/extensions/matrix/src/runtime-api.ts +++ b/extensions/matrix/src/runtime-api.ts @@ -40,8 +40,8 @@ export type { ContextVisibilityMode, DmPolicy, GroupPolicy, -} from "openclaw/plugin-sdk/config-runtime"; -export type { GroupToolPolicyConfig } from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; +export type { GroupToolPolicyConfig } from "openclaw/plugin-sdk/config-types"; export type { WizardPrompter } from "openclaw/plugin-sdk/setup"; export type { SecretInput } from "openclaw/plugin-sdk/secret-input"; export { @@ -49,7 +49,7 @@ export { resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/runtime-group-policy"; export { addWildcardAllowFrom, formatDocsLink, diff --git a/extensions/matrix/src/session-route.ts b/extensions/matrix/src/session-route.ts index d1e5a9cc37c..e03785b2197 100644 --- a/extensions/matrix/src/session-route.ts +++ b/extensions/matrix/src/session-route.ts @@ -4,12 +4,12 @@ import { buildThreadAwareOutboundSessionRoute, type ChannelOutboundSessionRouteParams, } from "openclaw/plugin-sdk/channel-core"; +import { parseThreadSessionSuffix } from "openclaw/plugin-sdk/routing"; import { loadSessionStore, resolveSessionStoreEntry, resolveStorePath, -} from "openclaw/plugin-sdk/config-runtime"; -import { parseThreadSessionSuffix } from "openclaw/plugin-sdk/routing"; +} from "openclaw/plugin-sdk/session-store-runtime"; import { resolveMatrixAccountConfig } from "./matrix/account-config.js"; import { resolveDefaultMatrixAccountId } from "./matrix/accounts.js"; import { resolveMatrixStoredSessionMeta } from "./matrix/session-store-metadata.js"; diff --git a/extensions/matrix/src/setup-core.ts b/extensions/matrix/src/setup-core.ts index a730f5ee6ae..21cbe90a6fd 100644 --- a/extensions/matrix/src/setup-core.ts +++ b/extensions/matrix/src/setup-core.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_ACCOUNT_ID, type DmPolicy, diff --git a/extensions/matrix/src/setup-dm-policy.ts b/extensions/matrix/src/setup-dm-policy.ts index 2ae2d51b808..7aeb7e55eff 100644 --- a/extensions/matrix/src/setup-dm-policy.ts +++ b/extensions/matrix/src/setup-dm-policy.ts @@ -1,4 +1,4 @@ -import type { DmPolicy } from "openclaw/plugin-sdk/config-runtime"; +import type { DmPolicy } from "openclaw/plugin-sdk/config-types"; import { addWildcardAllowFrom, normalizeAllowFromEntries } from "openclaw/plugin-sdk/setup"; import type { MatrixConfig } from "./types.js"; diff --git a/extensions/matrix/src/startup-maintenance.ts b/extensions/matrix/src/startup-maintenance.ts index 1d29cd01577..a50f701d39f 100644 --- a/extensions/matrix/src/startup-maintenance.ts +++ b/extensions/matrix/src/startup-maintenance.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { autoMigrateLegacyMatrixState, autoPrepareLegacyMatrixCrypto, diff --git a/extensions/mattermost/runtime-api.ts b/extensions/mattermost/runtime-api.ts index 2a2a531bfea..4b0a7c80e66 100644 --- a/extensions/mattermost/runtime-api.ts +++ b/extensions/mattermost/runtime-api.ts @@ -21,7 +21,7 @@ export type { BlockStreamingCoalesceConfig, DmPolicy, GroupPolicy, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; export { DEFAULT_ACCOUNT_ID, buildChannelConfigSchema, @@ -41,13 +41,12 @@ export { } from "openclaw/plugin-sdk/command-auth"; export { GROUP_POLICY_BLOCKED_LABEL, - isDangerousNameMatchingEnabled, - loadSessionStore, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, - resolveStorePath, warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/runtime-group-policy"; +export { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; +export { loadSessionStore, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime"; export { formatInboundFromLabel } from "openclaw/plugin-sdk/channel-inbound"; export { logInboundDrop } from "openclaw/plugin-sdk/channel-inbound"; export { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing"; diff --git a/extensions/mattermost/src/channel-actions-setup-status.contract.test.ts b/extensions/mattermost/src/channel-actions-setup-status.contract.test.ts index 39d26ee2bcd..13d8d377922 100644 --- a/extensions/mattermost/src/channel-actions-setup-status.contract.test.ts +++ b/extensions/mattermost/src/channel-actions-setup-status.contract.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect } from "vitest"; import { installChannelActionsContractSuite, diff --git a/extensions/mattermost/src/channel-api.ts b/extensions/mattermost/src/channel-api.ts index e63716cd829..fc416bf0b59 100644 --- a/extensions/mattermost/src/channel-api.ts +++ b/extensions/mattermost/src/channel-api.ts @@ -4,5 +4,5 @@ export { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/core"; export { resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/runtime-group-policy"; export { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking"; diff --git a/extensions/mattermost/src/mattermost/model-picker.ts b/extensions/mattermost/src/mattermost/model-picker.ts index cc7eeee8f60..08bf3cf843d 100644 --- a/extensions/mattermost/src/mattermost/model-picker.ts +++ b/extensions/mattermost/src/mattermost/model-picker.ts @@ -1,9 +1,9 @@ import { createHash } from "node:crypto"; import type { ModelsProviderData } from "openclaw/plugin-sdk/command-auth"; import { resolveStoredModelOverride } from "openclaw/plugin-sdk/command-auth"; -import { loadSessionStore, resolveStorePath } from "openclaw/plugin-sdk/config-runtime"; import type { OpenClawConfig } from "openclaw/plugin-sdk/core"; import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared"; +import { loadSessionStore, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime"; import { normalizeOptionalString, normalizeStringifiedOptionalString, diff --git a/extensions/mattermost/src/mattermost/runtime-api.ts b/extensions/mattermost/src/mattermost/runtime-api.ts index 92ba013b183..b3c71361175 100644 --- a/extensions/mattermost/src/mattermost/runtime-api.ts +++ b/extensions/mattermost/src/mattermost/runtime-api.ts @@ -26,12 +26,12 @@ export { listSkillCommandsForAgents, resolveControlCommandGate, } from "openclaw/plugin-sdk/command-auth"; +export { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; export { - isDangerousNameMatchingEnabled, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/runtime-group-policy"; export { evaluateSenderGroupAccessForPolicy } from "openclaw/plugin-sdk/group-access"; export { getAgentScopedMediaLocalRoots, diff --git a/extensions/mattermost/src/mattermost/send.ts b/extensions/mattermost/src/mattermost/send.ts index e9cc0c9b225..4a42bff16a8 100644 --- a/extensions/mattermost/src/mattermost/send.ts +++ b/extensions/mattermost/src/mattermost/send.ts @@ -1,4 +1,5 @@ -import { requireRuntimeConfig, resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { isPrivateNetworkOptInEnabled } from "openclaw/plugin-sdk/ssrf-runtime"; import { convertMarkdownTables, diff --git a/extensions/mattermost/src/setup-core.ts b/extensions/mattermost/src/setup-core.ts index e160cd98fd9..06ed55b35a8 100644 --- a/extensions/mattermost/src/setup-core.ts +++ b/extensions/mattermost/src/setup-core.ts @@ -1,6 +1,6 @@ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id"; import type { ChannelSetupAdapter } from "openclaw/plugin-sdk/channel-setup"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { applyAccountNameToChannelSection, applySetupAccountConfigPatch, diff --git a/extensions/mattermost/src/setup-surface.ts b/extensions/mattermost/src/setup-surface.ts index 3fe0fea8a57..4194228ca3d 100644 --- a/extensions/mattermost/src/setup-surface.ts +++ b/extensions/mattermost/src/setup-surface.ts @@ -1,5 +1,5 @@ import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { applySetupAccountConfigPatch, createStandardChannelSetupStatus, diff --git a/extensions/memory-core/api.ts b/extensions/memory-core/api.ts index a7e4fe6c9bc..6e3c6bb7327 100644 --- a/extensions/memory-core/api.ts +++ b/extensions/memory-core/api.ts @@ -1,4 +1,4 @@ -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type { MemoryEmbeddingProbeResult, MemoryProviderStatus, diff --git a/extensions/memory-core/src/dreaming-command.ts b/extensions/memory-core/src/dreaming-command.ts index dac286805b1..86663c832db 100644 --- a/extensions/memory-core/src/dreaming-command.ts +++ b/extensions/memory-core/src/dreaming-command.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveMemoryDreamingConfig } from "openclaw/plugin-sdk/memory-core-host-status"; import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/memory-core/src/dreaming-narrative.ts b/extensions/memory-core/src/dreaming-narrative.ts index a05e5d26b66..4e7fa5a06bc 100644 --- a/extensions/memory-core/src/dreaming-narrative.ts +++ b/extensions/memory-core/src/dreaming-narrative.ts @@ -2,12 +2,6 @@ import { createHash } from "node:crypto"; import type { Dirent } from "node:fs"; import fs from "node:fs/promises"; import path from "node:path"; -import { - getRuntimeConfig, - loadSessionStore, - resolveStorePath, - updateSessionStore, -} from "openclaw/plugin-sdk/config-runtime"; import { extractErrorCode, formatErrorMessage, @@ -18,6 +12,12 @@ import { import { resolveGlobalMap } from "openclaw/plugin-sdk/global-singleton"; import { createAsyncLock } from "openclaw/plugin-sdk/infra-runtime"; import { resolveStateDir } from "openclaw/plugin-sdk/memory-core-host-runtime-core"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; +import { + loadSessionStore, + resolveStorePath, + updateSessionStore, +} from "openclaw/plugin-sdk/session-store-runtime"; // ── Types ────────────────────────────────────────────────────────────── diff --git a/extensions/memory-core/src/dreaming.ts b/extensions/memory-core/src/dreaming.ts index 68838bd194e..e985cad2244 100644 --- a/extensions/memory-core/src/dreaming.ts +++ b/extensions/memory-core/src/dreaming.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { peekSystemEventEntries } from "openclaw/plugin-sdk/infra-runtime"; import { DEFAULT_MEMORY_DREAMING_FREQUENCY as DEFAULT_MEMORY_DREAMING_CRON_EXPR, diff --git a/extensions/memory-lancedb/index.ts b/extensions/memory-lancedb/index.ts index 31c61799c38..45d12034afd 100644 --- a/extensions/memory-lancedb/index.ts +++ b/extensions/memory-lancedb/index.ts @@ -9,10 +9,8 @@ import { randomUUID } from "node:crypto"; import type * as LanceDB from "@lancedb/lancedb"; import OpenAI from "openai"; -import { - resolveLivePluginConfigObject, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { resolveLivePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime"; import { ensureGlobalUndiciEnvProxyDispatcher } from "openclaw/plugin-sdk/runtime-env"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; import { Type } from "typebox"; diff --git a/extensions/microsoft-foundry/index.test.ts b/extensions/microsoft-foundry/index.test.ts index c8cf515ec8d..8f19f4e9eb6 100644 --- a/extensions/microsoft-foundry/index.test.ts +++ b/extensions/microsoft-foundry/index.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { createTestPluginApi } from "../../test/helpers/plugins/plugin-api.js"; import { getAccessTokenResultAsync } from "./cli.js"; diff --git a/extensions/microsoft/speech-provider.test.ts b/extensions/microsoft/speech-provider.test.ts index fbe52717da3..14964282a1b 100644 --- a/extensions/microsoft/speech-provider.test.ts +++ b/extensions/microsoft/speech-provider.test.ts @@ -1,7 +1,7 @@ import { mkdtempSync, writeFileSync } from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it, vi } from "vitest"; import { installDebugProxyTestResetHooks } from "../test-support/debug-proxy-env-test-helpers.js"; diff --git a/extensions/msteams/runtime-api.ts b/extensions/msteams/runtime-api.ts index 0bb70455017..6b5ea885c64 100644 --- a/extensions/msteams/runtime-api.ts +++ b/extensions/msteams/runtime-api.ts @@ -47,11 +47,9 @@ export type { MSTeamsTeamConfig, MarkdownTableMode, OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; -export { - isDangerousNameMatchingEnabled, - resolveDefaultGroupPolicy, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; +export { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; +export { resolveDefaultGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy"; export { withFileLock } from "openclaw/plugin-sdk/file-lock"; export { keepHttpServerTaskAlive } from "openclaw/plugin-sdk/channel-lifecycle"; export { diff --git a/extensions/msteams/src/channel-api.ts b/extensions/msteams/src/channel-api.ts index 4a57f6c6223..50d0b1c8285 100644 --- a/extensions/msteams/src/channel-api.ts +++ b/extensions/msteams/src/channel-api.ts @@ -1,7 +1,7 @@ export type { ChannelMessageActionName } from "openclaw/plugin-sdk/channel-contract"; export type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; export { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id"; export { buildProbeChannelStatusSummary, diff --git a/extensions/msteams/src/channel.actions.test.ts b/extensions/msteams/src/channel.actions.test.ts index c9f0ccca421..c22795036c1 100644 --- a/extensions/msteams/src/channel.actions.test.ts +++ b/extensions/msteams/src/channel.actions.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { msteamsActionsAdapter } from "./actions.js"; import { msteamsPlugin } from "./channel.js"; diff --git a/extensions/msteams/src/channel.setup.ts b/extensions/msteams/src/channel.setup.ts index 8cbc537bbc8..238ed8e4bca 100644 --- a/extensions/msteams/src/channel.setup.ts +++ b/extensions/msteams/src/channel.setup.ts @@ -2,7 +2,7 @@ import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers"; import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from"; import { createTopLevelChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers"; import type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { MSTeamsChannelConfigSchema } from "./config-schema.js"; import { msteamsSetupAdapter } from "./setup-core.js"; import { msteamsSetupWizard } from "./setup-surface.js"; diff --git a/extensions/msteams/src/channel.test.ts b/extensions/msteams/src/channel.test.ts index cd4b0ea95b1..64a89474147 100644 --- a/extensions/msteams/src/channel.test.ts +++ b/extensions/msteams/src/channel.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { MSTeamsConfigSchema } from "../config-api.js"; import { msTeamsApprovalAuth } from "./approval-auth.js"; diff --git a/extensions/msteams/src/send.ts b/extensions/msteams/src/send.ts index 25c9267de3a..ff516b27528 100644 --- a/extensions/msteams/src/send.ts +++ b/extensions/msteams/src/send.ts @@ -1,4 +1,4 @@ -import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; import { convertMarkdownTables } from "openclaw/plugin-sdk/text-runtime"; import { loadOutboundMediaFromUrl, type OpenClawConfig } from "../runtime-api.js"; import { createMSTeamsConversationStoreFs } from "./conversation-store-fs.js"; diff --git a/extensions/msteams/src/setup-core.ts b/extensions/msteams/src/setup-core.ts index d0087aee06b..71063513cb7 100644 --- a/extensions/msteams/src/setup-core.ts +++ b/extensions/msteams/src/setup-core.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { createStandardChannelSetupStatus, DEFAULT_ACCOUNT_ID, diff --git a/extensions/nextcloud-talk/runtime-api.ts b/extensions/nextcloud-talk/runtime-api.ts index 98fbf11fb8e..2ce1fdd8131 100644 --- a/extensions/nextcloud-talk/runtime-api.ts +++ b/extensions/nextcloud-talk/runtime-api.ts @@ -16,13 +16,13 @@ export type { GroupPolicy, GroupToolPolicyConfig, OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; export { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/runtime-group-policy"; export { dispatchInboundReplyWithBase } from "openclaw/plugin-sdk/inbound-reply-dispatch"; export type { OutboundReplyPayload } from "openclaw/plugin-sdk/reply-payload"; export { deliverFormattedTextWithAttachments } from "openclaw/plugin-sdk/reply-payload"; diff --git a/extensions/nextcloud-talk/src/channel-api.ts b/extensions/nextcloud-talk/src/channel-api.ts index ea880fc4743..d6b7ea10708 100644 --- a/extensions/nextcloud-talk/src/channel-api.ts +++ b/extensions/nextcloud-talk/src/channel-api.ts @@ -1,5 +1,5 @@ export type { ChannelPlugin } from "openclaw/plugin-sdk/channel-plugin-common"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { clearAccountEntryFields } from "openclaw/plugin-sdk/channel-plugin-common"; export { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id"; export { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-schema"; diff --git a/extensions/nextcloud-talk/src/send.runtime.ts b/extensions/nextcloud-talk/src/send.runtime.ts index edad9a15879..c4be195933b 100644 --- a/extensions/nextcloud-talk/src/send.runtime.ts +++ b/extensions/nextcloud-talk/src/send.runtime.ts @@ -1,4 +1,5 @@ -export { requireRuntimeConfig, resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +export { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; +export { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; export { ssrfPolicyFromPrivateNetworkOptIn } from "openclaw/plugin-sdk/ssrf-runtime"; export { convertMarkdownTables } from "openclaw/plugin-sdk/text-runtime"; export { fetchWithSsrFGuard } from "../runtime-api.js"; diff --git a/extensions/nextcloud-talk/src/session-route.ts b/extensions/nextcloud-talk/src/session-route.ts index 6ebc143ecbf..c47db342c4f 100644 --- a/extensions/nextcloud-talk/src/session-route.ts +++ b/extensions/nextcloud-talk/src/session-route.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { buildOutboundBaseSessionKey } from "openclaw/plugin-sdk/routing"; import { stripNextcloudTalkTargetPrefix } from "./normalize.js"; diff --git a/extensions/nextcloud-talk/src/setup-core.ts b/extensions/nextcloud-talk/src/setup-core.ts index 9d6c535722b..6e2b93e5812 100644 --- a/extensions/nextcloud-talk/src/setup-core.ts +++ b/extensions/nextcloud-talk/src/setup-core.ts @@ -1,5 +1,5 @@ import type { ChannelSetupAdapter, ChannelSetupInput } from "openclaw/plugin-sdk/channel-setup"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing"; import { applyAccountNameToChannelSection, diff --git a/extensions/nostr/runtime-api.ts b/extensions/nostr/runtime-api.ts index 77ac75ff302..fcc7baa369b 100644 --- a/extensions/nostr/runtime-api.ts +++ b/extensions/nostr/runtime-api.ts @@ -1,6 +1,6 @@ // Private runtime barrel for the bundled Nostr extension. // Keep this barrel thin and aligned with the local extension surface. -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { getPluginRuntimeGatewayRequestScope } from "openclaw/plugin-sdk/plugin-runtime"; export type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store"; diff --git a/extensions/nostr/src/channel.outbound.test.ts b/extensions/nostr/src/channel.outbound.test.ts index 450b3057209..366776c0b13 100644 --- a/extensions/nostr/src/channel.outbound.test.ts +++ b/extensions/nostr/src/channel.outbound.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it, vi } from "vitest"; import { createStartAccountContext } from "../../../test/helpers/plugins/start-account-context.js"; import type { PluginRuntime } from "../runtime-api.js"; diff --git a/extensions/nostr/src/channel.setup.ts b/extensions/nostr/src/channel.setup.ts index 2c03a8c9231..c11d995f0a9 100644 --- a/extensions/nostr/src/channel.setup.ts +++ b/extensions/nostr/src/channel.setup.ts @@ -1,5 +1,5 @@ import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { patchTopLevelChannelConfigSection } from "openclaw/plugin-sdk/setup"; import { createDelegatedSetupWizardProxy, diff --git a/extensions/nostr/src/gateway.ts b/extensions/nostr/src/gateway.ts index 4a54f2f8a7e..7fbe957005a 100644 --- a/extensions/nostr/src/gateway.ts +++ b/extensions/nostr/src/gateway.ts @@ -1,6 +1,6 @@ import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing"; import { attachChannelToResult } from "openclaw/plugin-sdk/channel-send-result"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { createPreCryptoDirectDmAuthorizer, DEFAULT_ACCOUNT_ID, diff --git a/extensions/nostr/src/types.ts b/extensions/nostr/src/types.ts index f358a06eb09..cff387d7b7c 100644 --- a/extensions/nostr/src/types.ts +++ b/extensions/nostr/src/types.ts @@ -7,7 +7,7 @@ import { listCombinedAccountIds, resolveListedDefaultAccountId, } from "openclaw/plugin-sdk/account-resolution"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeSecretInputString, type SecretInput } from "openclaw/plugin-sdk/secret-input"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import type { NostrProfile } from "./config-schema.js"; diff --git a/extensions/ollama/index.ts b/extensions/ollama/index.ts index 3f405ae8857..d303e921ec8 100644 --- a/extensions/ollama/index.ts +++ b/extensions/ollama/index.ts @@ -1,4 +1,5 @@ -import { resolvePluginConfigObject, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime"; import { definePluginEntry, type OpenClawPluginApi, diff --git a/extensions/ollama/src/web-search-provider.test.ts b/extensions/ollama/src/web-search-provider.test.ts index 350bdef27fa..60fc013567a 100644 --- a/extensions/ollama/src/web-search-provider.test.ts +++ b/extensions/ollama/src/web-search-provider.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { createOllamaWebSearchProvider as createContractOllamaWebSearchProvider } from "../web-search-contract-api.js"; import { diff --git a/extensions/ollama/src/web-search-provider.ts b/extensions/ollama/src/web-search-provider.ts index 712c0b42a46..a14419105cc 100644 --- a/extensions/ollama/src/web-search-provider.ts +++ b/extensions/ollama/src/web-search-provider.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { isNonSecretApiKeyMarker, normalizeOptionalSecretInput, diff --git a/extensions/openai/image-generation-provider.ts b/extensions/openai/image-generation-provider.ts index 024e6908703..02cd072c0db 100644 --- a/extensions/openai/image-generation-provider.ts +++ b/extensions/openai/image-generation-provider.ts @@ -1,5 +1,5 @@ import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ImageGenerationOutputFormat, ImageGenerationProvider, diff --git a/extensions/openai/index.test.ts b/extensions/openai/index.test.ts index bb5cfa8f78e..e8addcbde11 100644 --- a/extensions/openai/index.test.ts +++ b/extensions/openai/index.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import * as providerAuth from "openclaw/plugin-sdk/provider-auth-runtime"; import * as providerHttp from "openclaw/plugin-sdk/provider-http"; import type { ProviderPlugin } from "openclaw/plugin-sdk/provider-model-shared"; diff --git a/extensions/openai/index.ts b/extensions/openai/index.ts index c7f4b9d5642..25b0a492bf9 100644 --- a/extensions/openai/index.ts +++ b/extensions/openai/index.ts @@ -1,4 +1,4 @@ -import { resolvePluginConfigObject } from "openclaw/plugin-sdk/config-runtime"; +import { resolvePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime"; import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry"; import { buildProviderToolCompatFamilyHooks } from "openclaw/plugin-sdk/provider-tools"; import { buildOpenAICodexCliBackend } from "./cli-backend.js"; diff --git a/extensions/openai/native-web-search.ts b/extensions/openai/native-web-search.ts index 69a20abb4f4..c1c7abc74d2 100644 --- a/extensions/openai/native-web-search.ts +++ b/extensions/openai/native-web-search.ts @@ -1,6 +1,6 @@ import type { StreamFn } from "@mariozechner/pi-agent-core"; import { streamSimple } from "@mariozechner/pi-ai"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeProviderId } from "openclaw/plugin-sdk/provider-model-shared"; import { streamWithPayloadPatch } from "openclaw/plugin-sdk/provider-stream-shared"; import { isOpenAIApiBaseUrl } from "./base-url.js"; diff --git a/extensions/openai/openai.live.test.ts b/extensions/openai/openai.live.test.ts index 1649ecd8dae..812785fcec6 100644 --- a/extensions/openai/openai.live.test.ts +++ b/extensions/openai/openai.live.test.ts @@ -5,8 +5,9 @@ import { getModel, type Api, type Model } from "@mariozechner/pi-ai"; import { AuthStorage, ModelRegistry } from "@mariozechner/pi-coding-agent"; import OpenAI from "openai"; import type { ResolvedTtsConfig } from "openclaw/plugin-sdk/agent-runtime"; -import { getRuntimeConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { encodePngRgba, fillPixel } from "openclaw/plugin-sdk/media-runtime"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { describe, expect, it } from "vitest"; import { registerProviderPlugin, diff --git a/extensions/openai/shared.ts b/extensions/openai/shared.ts index d5c63a6e0be..c54807c68bb 100644 --- a/extensions/openai/shared.ts +++ b/extensions/openai/shared.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { findCatalogTemplate } from "openclaw/plugin-sdk/provider-catalog-shared"; import { cloneFirstTemplateModel, diff --git a/extensions/phone-control/index.ts b/extensions/phone-control/index.ts index 2343922d85a..e94b1cd0883 100644 --- a/extensions/phone-control/index.ts +++ b/extensions/phone-control/index.ts @@ -1,6 +1,6 @@ import fs from "node:fs/promises"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, diff --git a/extensions/qa-channel/src/inbound.ts b/extensions/qa-channel/src/inbound.ts index 8a9fc929d71..fcc1103740d 100644 --- a/extensions/qa-channel/src/inbound.ts +++ b/extensions/qa-channel/src/inbound.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { dispatchInboundReplyWithBase } from "openclaw/plugin-sdk/inbound-reply-dispatch"; import { buildAgentMediaPayload, diff --git a/extensions/qa-channel/src/runtime-api.ts b/extensions/qa-channel/src/runtime-api.ts index 05a1f3dbb9f..4a5d243bb16 100644 --- a/extensions/qa-channel/src/runtime-api.ts +++ b/extensions/qa-channel/src/runtime-api.ts @@ -4,7 +4,7 @@ export type { ChannelGatewayContext, } from "openclaw/plugin-sdk/channel-contract"; export type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime"; export type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store"; export { diff --git a/extensions/qa-channel/src/setup.ts b/extensions/qa-channel/src/setup.ts index 90f97f571e2..ca377544bf4 100644 --- a/extensions/qa-channel/src/setup.ts +++ b/extensions/qa-channel/src/setup.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_ACCOUNT_ID } from "./accounts.js"; import type { CoreConfig } from "./types.js"; diff --git a/extensions/qa-lab/src/gateway-child.ts b/extensions/qa-lab/src/gateway-child.ts index 9dc7b938676..f7b6ba10dd7 100644 --- a/extensions/qa-lab/src/gateway-child.ts +++ b/extensions/qa-lab/src/gateway-child.ts @@ -6,7 +6,7 @@ import net from "node:net"; import os from "node:os"; import path from "node:path"; import { setTimeout as sleep } from "node:timers/promises"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import type { ModelProviderConfig } from "openclaw/plugin-sdk/provider-model-shared"; import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime"; diff --git a/extensions/qa-lab/src/live-transports/discord/discord-live.runtime.test.ts b/extensions/qa-lab/src/live-transports/discord/discord-live.runtime.test.ts index bb7790035ad..c86196a31a5 100644 --- a/extensions/qa-lab/src/live-transports/discord/discord-live.runtime.test.ts +++ b/extensions/qa-lab/src/live-transports/discord/discord-live.runtime.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it, vi } from "vitest"; import { LIVE_TRANSPORT_BASELINE_STANDARD_SCENARIO_IDS, diff --git a/extensions/qa-lab/src/live-transports/discord/discord-live.runtime.ts b/extensions/qa-lab/src/live-transports/discord/discord-live.runtime.ts index 07ccc88335d..da007ff6555 100644 --- a/extensions/qa-lab/src/live-transports/discord/discord-live.runtime.ts +++ b/extensions/qa-lab/src/live-transports/discord/discord-live.runtime.ts @@ -1,7 +1,7 @@ import { randomUUID } from "node:crypto"; import fs from "node:fs/promises"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime"; import { z } from "zod"; diff --git a/extensions/qa-lab/src/live-transports/shared/live-gateway.runtime.ts b/extensions/qa-lab/src/live-transports/shared/live-gateway.runtime.ts index 7fca2761da7..9ad48c679b2 100644 --- a/extensions/qa-lab/src/live-transports/shared/live-gateway.runtime.ts +++ b/extensions/qa-lab/src/live-transports/shared/live-gateway.runtime.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { startQaGatewayChild, type QaCliBackendAuthMode, diff --git a/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.test.ts b/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.test.ts index 7b83a00526c..911248a4fb8 100644 --- a/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.test.ts +++ b/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it, vi } from "vitest"; import { LIVE_TRANSPORT_BASELINE_STANDARD_SCENARIO_IDS, diff --git a/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.ts b/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.ts index 6d287ace2f8..18c60e683b6 100644 --- a/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.ts +++ b/extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.ts @@ -3,7 +3,7 @@ import { randomUUID } from "node:crypto"; import fs from "node:fs/promises"; import path from "node:path"; import { promisify } from "node:util"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime"; import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path"; diff --git a/extensions/qa-lab/src/providers/live-frontier/auth.ts b/extensions/qa-lab/src/providers/live-frontier/auth.ts index c1c9e1242c1..797582b942f 100644 --- a/extensions/qa-lab/src/providers/live-frontier/auth.ts +++ b/extensions/qa-lab/src/providers/live-frontier/auth.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { applyAuthProfileConfig, validateAnthropicSetupToken, diff --git a/extensions/qa-lab/src/providers/shared/mock-auth.ts b/extensions/qa-lab/src/providers/shared/mock-auth.ts index 4407070ed52..1d29fee4885 100644 --- a/extensions/qa-lab/src/providers/shared/mock-auth.ts +++ b/extensions/qa-lab/src/providers/shared/mock-auth.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { applyAuthProfileConfig } from "openclaw/plugin-sdk/provider-auth-api-key"; import { resolveQaAgentAuthDir, writeQaAuthProfiles } from "./auth-store.js"; diff --git a/extensions/qa-lab/src/qa-channel-transport.ts b/extensions/qa-lab/src/qa-channel-transport.ts index 8fae9278bbe..455f8130d3f 100644 --- a/extensions/qa-lab/src/qa-channel-transport.ts +++ b/extensions/qa-lab/src/qa-channel-transport.ts @@ -1,5 +1,5 @@ import { setTimeout as sleep } from "node:timers/promises"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import type { QaBusState } from "./bus-state.js"; import { getQaProvider } from "./providers/index.js"; diff --git a/extensions/qa-lab/src/qa-gateway-config.ts b/extensions/qa-lab/src/qa-gateway-config.ts index f7a0bab4662..66f639c8fa4 100644 --- a/extensions/qa-lab/src/qa-gateway-config.ts +++ b/extensions/qa-lab/src/qa-gateway-config.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ModelProviderConfig } from "openclaw/plugin-sdk/provider-model-shared"; import { defaultQaModelForMode, diff --git a/extensions/qa-lab/src/qa-transport.ts b/extensions/qa-lab/src/qa-transport.ts index fe389fedebf..04e7335ce17 100644 --- a/extensions/qa-lab/src/qa-transport.ts +++ b/extensions/qa-lab/src/qa-transport.ts @@ -1,5 +1,5 @@ import { setTimeout as sleep } from "node:timers/promises"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { QaProviderMode } from "./model-selection.js"; import { extractQaFailureReplyText } from "./reply-failure.js"; import type { diff --git a/extensions/qa-lab/src/runtime-api.ts b/extensions/qa-lab/src/runtime-api.ts index a02cf412a79..3a6e2499ec9 100644 --- a/extensions/qa-lab/src/runtime-api.ts +++ b/extensions/qa-lab/src/runtime-api.ts @@ -1,5 +1,5 @@ export type { Command } from "commander"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry"; export { callGatewayFromCli } from "openclaw/plugin-sdk/gateway-runtime"; export type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store"; diff --git a/extensions/qa-lab/src/self-check.ts b/extensions/qa-lab/src/self-check.ts index 09931b6ed99..f8f182a8eea 100644 --- a/extensions/qa-lab/src/self-check.ts +++ b/extensions/qa-lab/src/self-check.ts @@ -1,6 +1,6 @@ import fs from "node:fs/promises"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { QaBusState } from "./bus-state.js"; import { createQaTransportAdapter, type QaTransportId } from "./qa-transport-registry.js"; import { renderQaMarkdownReport } from "./report.js"; diff --git a/extensions/qa-lab/src/suite-runtime-types.ts b/extensions/qa-lab/src/suite-runtime-types.ts index b16b64846a5..97e6acf7b87 100644 --- a/extensions/qa-lab/src/suite-runtime-types.ts +++ b/extensions/qa-lab/src/suite-runtime-types.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { QaProviderMode } from "./model-selection.js"; import type { QaTransportActionName, QaTransportAdapter } from "./qa-transport.js"; diff --git a/extensions/qa-lab/src/suite.ts b/extensions/qa-lab/src/suite.ts index 2e3c5919cae..97c77e4dbb9 100644 --- a/extensions/qa-lab/src/suite.ts +++ b/extensions/qa-lab/src/suite.ts @@ -2,7 +2,7 @@ import fs from "node:fs/promises"; import path from "node:path"; import { setTimeout as sleep } from "node:timers/promises"; import { disposeRegisteredAgentHarnesses } from "openclaw/plugin-sdk/agent-harness"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { startQaGatewayChild, type QaCliBackendAuthMode } from "./gateway-child.js"; import type { diff --git a/extensions/qa-matrix/src/runners/contract/runtime.test.ts b/extensions/qa-matrix/src/runners/contract/runtime.test.ts index ce1d9cdc794..0764582ea51 100644 --- a/extensions/qa-matrix/src/runners/contract/runtime.test.ts +++ b/extensions/qa-matrix/src/runners/contract/runtime.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it, vi } from "vitest"; import { renderQaMarkdownReport } from "../../report.js"; import { __testing as liveTesting } from "./runtime.js"; diff --git a/extensions/qa-matrix/src/runners/contract/runtime.ts b/extensions/qa-matrix/src/runners/contract/runtime.ts index 6921d35ad58..765e0dba82e 100644 --- a/extensions/qa-matrix/src/runners/contract/runtime.ts +++ b/extensions/qa-matrix/src/runners/contract/runtime.ts @@ -2,7 +2,7 @@ import { randomUUID } from "node:crypto"; import fs from "node:fs/promises"; import path from "node:path"; import { setTimeout as sleep } from "node:timers/promises"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { loadQaRuntimeModule } from "openclaw/plugin-sdk/qa-runner-runtime"; import type { QaReportCheck } from "../../report.js"; diff --git a/extensions/qa-matrix/src/substrate/config.test.ts b/extensions/qa-matrix/src/substrate/config.test.ts index 995969af053..4423ead4df4 100644 --- a/extensions/qa-matrix/src/substrate/config.test.ts +++ b/extensions/qa-matrix/src/substrate/config.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { buildMatrixQaConfig, diff --git a/extensions/qa-matrix/src/substrate/config.ts b/extensions/qa-matrix/src/substrate/config.ts index 7c8dee83993..af5019a2584 100644 --- a/extensions/qa-matrix/src/substrate/config.ts +++ b/extensions/qa-matrix/src/substrate/config.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { MatrixQaProvisionedTopology } from "./topology.js"; export type MatrixQaReplyToMode = "off" | "first" | "all" | "batched"; diff --git a/extensions/qqbot/runtime-api.ts b/extensions/qqbot/runtime-api.ts index 004f9a255a1..ba55326e56e 100644 --- a/extensions/qqbot/runtime-api.ts +++ b/extensions/qqbot/runtime-api.ts @@ -1,5 +1,5 @@ export type { ChannelPlugin, OpenClawPluginApi, PluginRuntime } from "openclaw/plugin-sdk/core"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type { OpenClawPluginService, OpenClawPluginServiceContext, diff --git a/extensions/qqbot/src/bridge/approval/capability.ts b/extensions/qqbot/src/bridge/approval/capability.ts index c1817d2a604..d045ced24de 100644 --- a/extensions/qqbot/src/bridge/approval/capability.ts +++ b/extensions/qqbot/src/bridge/approval/capability.ts @@ -19,7 +19,7 @@ import { createLazyChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-s import type { ChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime"; import { resolveApprovalRequestSessionConversation } from "openclaw/plugin-sdk/approval-native-runtime"; import type { ChannelApprovalCapability } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { resolveApprovalTarget } from "../../engine/approval/index.js"; import { diff --git a/extensions/qqbot/src/bridge/bootstrap.ts b/extensions/qqbot/src/bridge/bootstrap.ts index d1b9b3e57c7..2820d1867b4 100644 --- a/extensions/qqbot/src/bridge/bootstrap.ts +++ b/extensions/qqbot/src/bridge/bootstrap.ts @@ -95,7 +95,7 @@ function createBuiltinAdapter(): PlatformAdapter { async resolveApproval(approvalId: string, decision: string): Promise { try { - const { getRuntimeConfig } = await import("openclaw/plugin-sdk/config-runtime"); + const { getRuntimeConfig } = await import("openclaw/plugin-sdk/runtime-config-snapshot"); const { resolveApprovalOverGateway } = await import("openclaw/plugin-sdk/approval-gateway-runtime"); const cfg = getRuntimeConfig(); diff --git a/extensions/qqbot/src/bridge/config-shared.ts b/extensions/qqbot/src/bridge/config-shared.ts index 483c6d820c6..15ca9dc68d0 100644 --- a/extensions/qqbot/src/bridge/config-shared.ts +++ b/extensions/qqbot/src/bridge/config-shared.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { applyAccountNameToChannelSection, deleteAccountFromConfigSection, diff --git a/extensions/qqbot/src/bridge/config.ts b/extensions/qqbot/src/bridge/config.ts index efaeb8568ab..525a6c5a064 100644 --- a/extensions/qqbot/src/bridge/config.ts +++ b/extensions/qqbot/src/bridge/config.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { getPlatformAdapter } from "../engine/adapter/index.js"; import { DEFAULT_ACCOUNT_ID as ENGINE_DEFAULT_ACCOUNT_ID, diff --git a/extensions/qqbot/src/bridge/gateway.ts b/extensions/qqbot/src/bridge/gateway.ts index 58f4b9e5102..33c82782cc1 100644 --- a/extensions/qqbot/src/bridge/gateway.ts +++ b/extensions/qqbot/src/bridge/gateway.ts @@ -8,7 +8,7 @@ */ import { resolveRuntimeServiceVersion } from "openclaw/plugin-sdk/cli-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { registerVersionResolver, registerPluginVersion, diff --git a/extensions/qqbot/src/bridge/setup/finalize.ts b/extensions/qqbot/src/bridge/setup/finalize.ts index ad2d1f66247..1681e28b843 100644 --- a/extensions/qqbot/src/bridge/setup/finalize.ts +++ b/extensions/qqbot/src/bridge/setup/finalize.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ChannelSetupWizard } from "openclaw/plugin-sdk/setup"; import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/setup"; import { formatDocsLink } from "openclaw/plugin-sdk/setup-tools"; diff --git a/extensions/qqbot/src/channel.ts b/extensions/qqbot/src/channel.ts index 5ebe03f3a12..26c0c3b7ca5 100644 --- a/extensions/qqbot/src/channel.ts +++ b/extensions/qqbot/src/channel.ts @@ -1,5 +1,5 @@ import { getExecApprovalReplyMetadata } from "openclaw/plugin-sdk/approval-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ChannelPlugin } from "openclaw/plugin-sdk/core"; // Register the PlatformAdapter before any core/ module is used. import "./bridge/bootstrap.js"; diff --git a/extensions/qqbot/src/config.test.ts b/extensions/qqbot/src/config.test.ts index 7818b7ed510..c7fcbc72be5 100644 --- a/extensions/qqbot/src/config.test.ts +++ b/extensions/qqbot/src/config.test.ts @@ -1,5 +1,5 @@ import fs from "node:fs"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { validateJsonSchemaValue } from "../../../src/plugins/schema-validator.js"; import type { JsonSchemaObject } from "../../../src/shared/json-schema.types.js"; diff --git a/extensions/qqbot/src/exec-approvals.ts b/extensions/qqbot/src/exec-approvals.ts index f63a1f9e8a9..821cfb6741a 100644 --- a/extensions/qqbot/src/exec-approvals.ts +++ b/extensions/qqbot/src/exec-approvals.ts @@ -5,7 +5,7 @@ import { matchesApprovalRequestFilters, } from "openclaw/plugin-sdk/approval-client-runtime"; import { resolveApprovalRequestChannelAccountId } from "openclaw/plugin-sdk/approval-native-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ExecApprovalRequest, PluginApprovalRequest } from "openclaw/plugin-sdk/infra-runtime"; import { normalizeAccountId } from "openclaw/plugin-sdk/routing"; import { diff --git a/extensions/qqbot/src/qqbot-test-support.ts b/extensions/qqbot/src/qqbot-test-support.ts index 2c3a0e87354..2aee474c3f7 100644 --- a/extensions/qqbot/src/qqbot-test-support.ts +++ b/extensions/qqbot/src/qqbot-test-support.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export function makeQqbotSecretRefConfig(): OpenClawConfig { return { diff --git a/extensions/searxng/src/config.ts b/extensions/searxng/src/config.ts index 8e83aac9803..be7aefca29c 100644 --- a/extensions/searxng/src/config.ts +++ b/extensions/searxng/src/config.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeResolvedSecretInputString, normalizeSecretInput, diff --git a/extensions/searxng/src/searxng-client.ts b/extensions/searxng/src/searxng-client.ts index 5a754517be4..25d8ed0275b 100644 --- a/extensions/searxng/src/searxng-client.ts +++ b/extensions/searxng/src/searxng-client.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_CACHE_TTL_MINUTES, DEFAULT_SEARCH_COUNT, diff --git a/extensions/sglang/models.ts b/extensions/sglang/models.ts index 97c80f81da1..d87556cf984 100644 --- a/extensions/sglang/models.ts +++ b/extensions/sglang/models.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { discoverOpenAICompatibleLocalModels } from "openclaw/plugin-sdk/provider-setup"; import { SGLANG_DEFAULT_BASE_URL, SGLANG_PROVIDER_LABEL } from "./defaults.js"; diff --git a/extensions/signal/src/account-types.ts b/extensions/signal/src/account-types.ts index 107bd763d87..cbaa337f8d9 100644 --- a/extensions/signal/src/account-types.ts +++ b/extensions/signal/src/account-types.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type SignalAccountConfig = Omit< Exclude["signal"], undefined>, diff --git a/extensions/signal/src/channel.ts b/extensions/signal/src/channel.ts index 2cf6bfc161c..b30e48f5f62 100644 --- a/extensions/signal/src/channel.ts +++ b/extensions/signal/src/channel.ts @@ -7,7 +7,7 @@ import { attachChannelToResults, } from "openclaw/plugin-sdk/channel-send-result"; import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status"; -import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime"; import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps"; import { chunkText, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking"; diff --git a/extensions/signal/src/core.test.ts b/extensions/signal/src/core.test.ts index 57ce5352829..c8f8c862b43 100644 --- a/extensions/signal/src/core.test.ts +++ b/extensions/signal/src/core.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it, vi } from "vitest"; import { createPluginSetupWizardStatus } from "../../../test/helpers/plugins/setup-wizard.js"; import { signalPlugin } from "./channel.js"; diff --git a/extensions/signal/src/format.ts b/extensions/signal/src/format.ts index 66539548731..880c38f4c76 100644 --- a/extensions/signal/src/format.ts +++ b/extensions/signal/src/format.ts @@ -1,4 +1,4 @@ -import type { MarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import type { MarkdownTableMode } from "openclaw/plugin-sdk/config-types"; import { markdownToIR, normalizeLowercaseStringOrEmpty, diff --git a/extensions/signal/src/message-actions.test.ts b/extensions/signal/src/message-actions.test.ts index 74b595c8c11..d643f266f89 100644 --- a/extensions/signal/src/message-actions.test.ts +++ b/extensions/signal/src/message-actions.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; const sendReactionsModule = await import("./send-reactions.js"); diff --git a/extensions/signal/src/monitor.tool-result.autostart.test.ts b/extensions/signal/src/monitor.tool-result.autostart.test.ts index 819e86fa6fd..be4d5ed4517 100644 --- a/extensions/signal/src/monitor.tool-result.autostart.test.ts +++ b/extensions/signal/src/monitor.tool-result.autostart.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it, vi } from "vitest"; import type { SignalDaemonExitEvent } from "./daemon.js"; import { diff --git a/extensions/signal/src/monitor.tool-result.sends-tool-summaries-responseprefix.test.ts b/extensions/signal/src/monitor.tool-result.sends-tool-summaries-responseprefix.test.ts index cd690c36cc8..b4f9c8a0769 100644 --- a/extensions/signal/src/monitor.tool-result.sends-tool-summaries-responseprefix.test.ts +++ b/extensions/signal/src/monitor.tool-result.sends-tool-summaries-responseprefix.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveAgentRoute } from "openclaw/plugin-sdk/routing"; import { normalizeE164 } from "openclaw/plugin-sdk/text-runtime"; import { describe, expect, it, vi } from "vitest"; diff --git a/extensions/signal/src/monitor.ts b/extensions/signal/src/monitor.ts index 1aa9f178415..ca037d473b9 100644 --- a/extensions/signal/src/monitor.ts +++ b/extensions/signal/src/monitor.ts @@ -1,11 +1,5 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { SignalReactionNotificationMode } from "openclaw/plugin-sdk/config-runtime"; -import { getRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; -import { - resolveAllowlistProviderRuntimeGroupPolicy, - resolveDefaultGroupPolicy, - warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { SignalReactionNotificationMode } from "openclaw/plugin-sdk/config-types"; import { waitForTransportReady } from "openclaw/plugin-sdk/infra-runtime"; import { detectMime, @@ -23,11 +17,17 @@ import { resolveChunkMode, resolveTextChunkLimit, } from "openclaw/plugin-sdk/reply-runtime"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { createNonExitingRuntime, type BackoffPolicy, type RuntimeEnv, } from "openclaw/plugin-sdk/runtime-env"; +import { + resolveAllowlistProviderRuntimeGroupPolicy, + resolveDefaultGroupPolicy, + warnMissingProviderGroupPolicyFallbackOnce, +} from "openclaw/plugin-sdk/runtime-group-policy"; import { normalizeE164, normalizeOptionalString, diff --git a/extensions/signal/src/monitor/event-handler.mention-gating.test.ts b/extensions/signal/src/monitor/event-handler.mention-gating.test.ts index b597b7c3c95..b74a1fd4b5b 100644 --- a/extensions/signal/src/monitor/event-handler.mention-gating.test.ts +++ b/extensions/signal/src/monitor/event-handler.mention-gating.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { MsgContext } from "openclaw/plugin-sdk/reply-runtime"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { buildDispatchInboundCaptureMock } from "../../../../src/channels/plugins/contracts/inbound-testkit.js"; diff --git a/extensions/signal/src/monitor/event-handler.ts b/extensions/signal/src/monitor/event-handler.ts index c5d52d1326f..747c6c68f4f 100644 --- a/extensions/signal/src/monitor/event-handler.ts +++ b/extensions/signal/src/monitor/event-handler.ts @@ -11,14 +11,13 @@ import { shouldDebounceTextInbound, } from "openclaw/plugin-sdk/channel-inbound"; import { logInboundDrop } from "openclaw/plugin-sdk/channel-inbound"; -import { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline"; -import { resolveControlCommandGate } from "openclaw/plugin-sdk/command-auth"; -import { hasControlCommand } from "openclaw/plugin-sdk/command-auth"; import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention, -} from "openclaw/plugin-sdk/config-runtime"; -import { readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/channel-policy"; +import { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline"; +import { resolveControlCommandGate } from "openclaw/plugin-sdk/command-auth"; +import { hasControlCommand } from "openclaw/plugin-sdk/command-auth"; import { recordInboundSession } from "openclaw/plugin-sdk/conversation-runtime"; import { createInternalHookEvent, @@ -42,6 +41,7 @@ import { DM_GROUP_ACCESS_REASON, resolvePinnedMainDmOwnerFromAllowlist, } from "openclaw/plugin-sdk/security-runtime"; +import { readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime"; import { normalizeE164, normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { formatSignalPairingIdLine, diff --git a/extensions/signal/src/monitor/event-handler.types.ts b/extensions/signal/src/monitor/event-handler.types.ts index 228247dbec5..819adeee09c 100644 --- a/extensions/signal/src/monitor/event-handler.types.ts +++ b/extensions/signal/src/monitor/event-handler.types.ts @@ -1,9 +1,9 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { DmPolicy, GroupPolicy, SignalReactionNotificationMode, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; import type { HistoryEntry } from "openclaw/plugin-sdk/reply-history"; import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; diff --git a/extensions/signal/src/monitor/inbound-context.ts b/extensions/signal/src/monitor/inbound-context.ts index fc06cd9d218..28f0e5c6d74 100644 --- a/extensions/signal/src/monitor/inbound-context.ts +++ b/extensions/signal/src/monitor/inbound-context.ts @@ -1,4 +1,4 @@ -import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/config-runtime"; +import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime"; import { evaluateSupplementalContextVisibility, type ContextVisibilityDecision, diff --git a/extensions/signal/src/reaction-level.ts b/extensions/signal/src/reaction-level.ts index 2211b9f261a..0adc2b5b394 100644 --- a/extensions/signal/src/reaction-level.ts +++ b/extensions/signal/src/reaction-level.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveReactionLevel, type ReactionLevel, diff --git a/extensions/signal/src/runtime-api.ts b/extensions/signal/src/runtime-api.ts index 2dab3b7acba..47deb259179 100644 --- a/extensions/signal/src/runtime-api.ts +++ b/extensions/signal/src/runtime-api.ts @@ -4,7 +4,7 @@ export type { ChannelMessageActionAdapter } from "openclaw/plugin-sdk/channel-contract"; export { buildChannelConfigSchema, SignalConfigSchema } from "../config-api.js"; export { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status"; -import type { OpenClawConfig as RuntimeOpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig as RuntimeOpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type { RuntimeOpenClawConfig as OpenClawConfig }; export type { OpenClawPluginApi, PluginRuntime } from "openclaw/plugin-sdk/core"; export type { ChannelPlugin } from "openclaw/plugin-sdk/core"; @@ -26,7 +26,7 @@ export { detectBinary } from "openclaw/plugin-sdk/setup-tools"; export { resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/runtime-group-policy"; export { buildBaseAccountStatusSnapshot, buildBaseChannelStatusSummary, diff --git a/extensions/signal/src/send-reactions.ts b/extensions/signal/src/send-reactions.ts index 0b3306d6d1a..ac321c8eb96 100644 --- a/extensions/signal/src/send-reactions.ts +++ b/extensions/signal/src/send-reactions.ts @@ -2,7 +2,8 @@ * Signal reactions via signal-cli JSON-RPC API */ -import { requireRuntimeConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; import { resolveSignalAccount } from "./accounts.js"; import { signalRpcRequest } from "./client.js"; diff --git a/extensions/signal/src/send.ts b/extensions/signal/src/send.ts index 844b1d8f56f..28d9c4f5188 100644 --- a/extensions/signal/src/send.ts +++ b/extensions/signal/src/send.ts @@ -1,7 +1,8 @@ -import { requireRuntimeConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; import { kindFromMime } from "openclaw/plugin-sdk/media-runtime"; import { resolveOutboundAttachmentFromUrl } from "openclaw/plugin-sdk/media-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; import { resolveSignalAccount } from "./accounts.js"; import { signalRpcRequest } from "./client.js"; diff --git a/extensions/skill-workshop/index.ts b/extensions/skill-workshop/index.ts index 68403bdd132..e55102d4bc7 100644 --- a/extensions/skill-workshop/index.ts +++ b/extensions/skill-workshop/index.ts @@ -1,7 +1,5 @@ -import { - resolveLivePluginConfigObject, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { resolveLivePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime"; import { definePluginEntry, resolveDefaultAgentId } from "./api.js"; import { resolveConfig } from "./src/config.js"; import { buildWorkshopGuidance } from "./src/prompt.js"; diff --git a/extensions/slack/account-inspect-api.ts b/extensions/slack/account-inspect-api.ts index 7ce9b7bfb2e..936de567da0 100644 --- a/extensions/slack/account-inspect-api.ts +++ b/extensions/slack/account-inspect-api.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { inspectSlackAccount } from "./src/account-inspect.js"; export function inspectSlackReadOnlyAccount(cfg: OpenClawConfig, accountId?: string | null) { diff --git a/extensions/slack/src/account-surface-fields.ts b/extensions/slack/src/account-surface-fields.ts index be264d9d369..10864f3908b 100644 --- a/extensions/slack/src/account-surface-fields.ts +++ b/extensions/slack/src/account-surface-fields.ts @@ -1,4 +1,4 @@ -import type { SlackAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { SlackAccountConfig } from "openclaw/plugin-sdk/config-types"; export type SlackAccountSurfaceFields = { groupPolicy?: SlackAccountConfig["groupPolicy"]; diff --git a/extensions/slack/src/accounts.test.ts b/extensions/slack/src/accounts.test.ts index f97f994023a..a8104a2300e 100644 --- a/extensions/slack/src/accounts.test.ts +++ b/extensions/slack/src/accounts.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { resolveSlackAccount } from "./accounts.js"; diff --git a/extensions/slack/src/action-runtime.test.ts b/extensions/slack/src/action-runtime.test.ts index fc9bd251748..0fe99263dcf 100644 --- a/extensions/slack/src/action-runtime.test.ts +++ b/extensions/slack/src/action-runtime.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { handleSlackAction, slackActionRuntime } from "./action-runtime.js"; import { parseSlackBlocksInput } from "./blocks-input.js"; diff --git a/extensions/slack/src/actions.download-file.test.ts b/extensions/slack/src/actions.download-file.test.ts index 5e8765d0f4d..934cddcb17c 100644 --- a/extensions/slack/src/actions.download-file.test.ts +++ b/extensions/slack/src/actions.download-file.test.ts @@ -1,5 +1,5 @@ import type { WebClient } from "@slack/web-api"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const resolveSlackMedia = vi.fn(); diff --git a/extensions/slack/src/actions.ts b/extensions/slack/src/actions.ts index 88057e808ec..ca11ea3c4eb 100644 --- a/extensions/slack/src/actions.ts +++ b/extensions/slack/src/actions.ts @@ -1,5 +1,6 @@ import type { Block, KnownBlock, WebClient } from "@slack/web-api"; -import { requireRuntimeConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { resolveSlackAccount } from "./accounts.js"; import { buildSlackBlocksFallbackText } from "./blocks-fallback.js"; diff --git a/extensions/slack/src/approval-auth.ts b/extensions/slack/src/approval-auth.ts index d1a8251bc1c..f0484656602 100644 --- a/extensions/slack/src/approval-auth.ts +++ b/extensions/slack/src/approval-auth.ts @@ -2,7 +2,7 @@ import { createResolvedApproverActionAuthAdapter, resolveApprovalApprovers, } from "openclaw/plugin-sdk/approval-auth-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveSlackAccount } from "./accounts.js"; import { normalizeSlackApproverId } from "./exec-approvals.js"; diff --git a/extensions/slack/src/approval-handler.runtime.ts b/extensions/slack/src/approval-handler.runtime.ts index bacb6c46117..d54173226ad 100644 --- a/extensions/slack/src/approval-handler.runtime.ts +++ b/extensions/slack/src/approval-handler.runtime.ts @@ -8,7 +8,7 @@ import type { } from "openclaw/plugin-sdk/approval-handler-runtime"; import { createChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime"; import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { buildApprovalInteractiveReplyFromActionDescriptors, type ExecApprovalRequest, diff --git a/extensions/slack/src/approval-native.test.ts b/extensions/slack/src/approval-native.test.ts index a578c49f00a..0e3d6df6b0f 100644 --- a/extensions/slack/src/approval-native.test.ts +++ b/extensions/slack/src/approval-native.test.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { clearSessionStoreCacheForTest } from "../../../src/config/sessions/store.js"; import { slackApprovalCapability, slackNativeApprovalAdapter } from "./approval-native.js"; diff --git a/extensions/slack/src/channel-actions-setup-status.contract.test.ts b/extensions/slack/src/channel-actions-setup-status.contract.test.ts index f0a3f46f31b..abfccf34c87 100644 --- a/extensions/slack/src/channel-actions-setup-status.contract.test.ts +++ b/extensions/slack/src/channel-actions-setup-status.contract.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect } from "vitest"; import { installChannelActionsContractSuite, diff --git a/extensions/slack/src/channel-api.ts b/extensions/slack/src/channel-api.ts index 1a20abe3d99..781f565b8ac 100644 --- a/extensions/slack/src/channel-api.ts +++ b/extensions/slack/src/channel-api.ts @@ -5,7 +5,7 @@ export { resolveConfiguredFromRequiredCredentialStatuses, } from "openclaw/plugin-sdk/channel-status"; export type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { looksLikeSlackTargetId, normalizeSlackMessagingTarget } from "./target-parsing.js"; const SLACK_CHANNEL_META = { diff --git a/extensions/slack/src/channel-migration.ts b/extensions/slack/src/channel-migration.ts index e8ea0a13c7f..b08c52ab3fe 100644 --- a/extensions/slack/src/channel-migration.ts +++ b/extensions/slack/src/channel-migration.ts @@ -1,5 +1,5 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { SlackChannelConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { SlackChannelConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeAccountId } from "openclaw/plugin-sdk/routing"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/slack/src/doctor-contract.ts b/extensions/slack/src/doctor-contract.ts index 06aa7ff9688..c35ec3b0a26 100644 --- a/extensions/slack/src/doctor-contract.ts +++ b/extensions/slack/src/doctor-contract.ts @@ -2,7 +2,7 @@ import type { ChannelDoctorConfigMutation, ChannelDoctorLegacyConfigRule, } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { asObjectRecord, hasLegacyAccountStreamingAliases, diff --git a/extensions/slack/src/draft-stream.ts b/extensions/slack/src/draft-stream.ts index 52915a9e585..85c855bc396 100644 --- a/extensions/slack/src/draft-stream.ts +++ b/extensions/slack/src/draft-stream.ts @@ -1,5 +1,5 @@ import { createDraftStreamLoop } from "openclaw/plugin-sdk/channel-lifecycle"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { deleteSlackMessage, editSlackMessage } from "./actions.js"; import { SLACK_TEXT_LIMIT } from "./limits.js"; diff --git a/extensions/slack/src/exec-approvals.test.ts b/extensions/slack/src/exec-approvals.test.ts index faeebb0f3ae..0e78b27d0f2 100644 --- a/extensions/slack/src/exec-approvals.test.ts +++ b/extensions/slack/src/exec-approvals.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { getSlackExecApprovalApprovers, diff --git a/extensions/slack/src/exec-approvals.ts b/extensions/slack/src/exec-approvals.ts index 3f5fcfab3b6..0052204fdc1 100644 --- a/extensions/slack/src/exec-approvals.ts +++ b/extensions/slack/src/exec-approvals.ts @@ -4,7 +4,7 @@ import { isChannelExecApprovalTargetRecipient, } from "openclaw/plugin-sdk/approval-client-runtime"; import { doesApprovalRequestMatchChannelAccount } from "openclaw/plugin-sdk/approval-native-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { resolveSlackAccount } from "./accounts.js"; diff --git a/extensions/slack/src/format.ts b/extensions/slack/src/format.ts index ebf639248b0..f08e22726bb 100644 --- a/extensions/slack/src/format.ts +++ b/extensions/slack/src/format.ts @@ -1,4 +1,4 @@ -import type { MarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import type { MarkdownTableMode } from "openclaw/plugin-sdk/config-types"; import { markdownToIR, type MarkdownLinkSpan, diff --git a/extensions/slack/src/inbound-context.contract.test.ts b/extensions/slack/src/inbound-context.contract.test.ts index 86e8e5ed8e9..16dd5f5fa9a 100644 --- a/extensions/slack/src/inbound-context.contract.test.ts +++ b/extensions/slack/src/inbound-context.contract.test.ts @@ -1,5 +1,5 @@ import { expectChannelInboundContextContract } from "openclaw/plugin-sdk/channel-contract-testing"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { createTempHomeEnv } from "../../../test/helpers/plugins/temp-home.js"; import { diff --git a/extensions/slack/src/interactive-replies.ts b/extensions/slack/src/interactive-replies.ts index 39fc1815200..e207f6b4597 100644 --- a/extensions/slack/src/interactive-replies.ts +++ b/extensions/slack/src/interactive-replies.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; import { resolveDefaultSlackAccountId, resolveSlackAccount } from "./accounts.js"; diff --git a/extensions/slack/src/message-actions.ts b/extensions/slack/src/message-actions.ts index e7371201b6c..c5e5ebb5ebb 100644 --- a/extensions/slack/src/message-actions.ts +++ b/extensions/slack/src/message-actions.ts @@ -1,6 +1,6 @@ import { createActionGate } from "openclaw/plugin-sdk/channel-actions"; import type { ChannelMessageActionName } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { extractToolSend, type ChannelToolSend } from "openclaw/plugin-sdk/tool-send"; import { listEnabledSlackAccounts, resolveSlackAccount } from "./accounts.js"; diff --git a/extensions/slack/src/message-tools.test.ts b/extensions/slack/src/message-tools.test.ts index 84bacdbdd54..3906d3b8050 100644 --- a/extensions/slack/src/message-tools.test.ts +++ b/extensions/slack/src/message-tools.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { listSlackMessageActions } from "./message-actions.js"; import { describeSlackMessageTool } from "./message-tool-api.js"; diff --git a/extensions/slack/src/monitor/channel-config.ts b/extensions/slack/src/monitor/channel-config.ts index abbec18665b..955dadb9cf4 100644 --- a/extensions/slack/src/monitor/channel-config.ts +++ b/extensions/slack/src/monitor/channel-config.ts @@ -4,7 +4,7 @@ import { resolveChannelEntryMatchWithFallback, type ChannelMatchSource, } from "openclaw/plugin-sdk/channel-targets"; -import type { SlackReactionNotificationMode } from "openclaw/plugin-sdk/config-runtime"; +import type { SlackReactionNotificationMode } from "openclaw/plugin-sdk/config-types"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; import type { SlackMessageEvent } from "../types.js"; import { allowListMatches, normalizeAllowListLower, normalizeSlackSlug } from "./allow-list.js"; diff --git a/extensions/slack/src/monitor/commands.ts b/extensions/slack/src/monitor/commands.ts index fd9d37d82e2..e82a534f968 100644 --- a/extensions/slack/src/monitor/commands.ts +++ b/extensions/slack/src/monitor/commands.ts @@ -1,4 +1,4 @@ -import type { SlackSlashCommandConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { SlackSlashCommandConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; /** diff --git a/extensions/slack/src/monitor/config.runtime.ts b/extensions/slack/src/monitor/config.runtime.ts index ed06f209326..c2468fafb05 100644 --- a/extensions/slack/src/monitor/config.runtime.ts +++ b/extensions/slack/src/monitor/config.runtime.ts @@ -1,13 +1,15 @@ +export { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; +export { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; export { - getRuntimeConfig, - isDangerousNameMatchingEnabled, readSessionUpdatedAt, recordSessionMetaFromInbound, - resolveChannelContextVisibilityMode, - resolveDefaultGroupPolicy, - resolveOpenProviderRuntimeGroupPolicy, resolveSessionKey, resolveStorePath, updateLastRoute, +} from "openclaw/plugin-sdk/session-store-runtime"; +export { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime"; +export { + resolveDefaultGroupPolicy, + resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/runtime-group-policy"; diff --git a/extensions/slack/src/monitor/context.test.ts b/extensions/slack/src/monitor/context.test.ts index f7dd4e23db5..c6eb45c4cdd 100644 --- a/extensions/slack/src/monitor/context.test.ts +++ b/extensions/slack/src/monitor/context.test.ts @@ -1,5 +1,5 @@ import type { App } from "@slack/bolt"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { describe, expect, it } from "vitest"; import { createSlackMonitorContext } from "./context.js"; diff --git a/extensions/slack/src/monitor/context.ts b/extensions/slack/src/monitor/context.ts index 318f58c2a7a..6b1b9a1ceb0 100644 --- a/extensions/slack/src/monitor/context.ts +++ b/extensions/slack/src/monitor/context.ts @@ -3,9 +3,9 @@ import { formatAllowlistMatchMeta } from "openclaw/plugin-sdk/allow-from"; import type { OpenClawConfig, SlackReactionNotificationMode, -} from "openclaw/plugin-sdk/config-runtime"; -import type { SessionScope } from "openclaw/plugin-sdk/config-runtime"; -import type { DmPolicy, GroupPolicy } from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; +import type { SessionScope } from "openclaw/plugin-sdk/config-types"; +import type { DmPolicy, GroupPolicy } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { createDedupeCache } from "openclaw/plugin-sdk/infra-runtime"; import type { HistoryEntry } from "openclaw/plugin-sdk/reply-history"; @@ -65,7 +65,7 @@ export type SlackMonitorContext = { threadHistoryScope: "thread" | "channel"; threadInheritParent: boolean; threadRequireExplicitMention: boolean; - slashCommand: Required; + slashCommand: Required; textLimit: number; ackReactionScope: string; typingReaction: string; diff --git a/extensions/slack/src/monitor/events/channels.ts b/extensions/slack/src/monitor/events/channels.ts index 25b91f08907..25d98ce8afd 100644 --- a/extensions/slack/src/monitor/events/channels.ts +++ b/extensions/slack/src/monitor/events/channels.ts @@ -1,8 +1,9 @@ import type { SlackEventMiddlewareArgs } from "@slack/bolt"; import { resolveChannelConfigWrites } from "openclaw/plugin-sdk/channel-config-writes"; -import { getRuntimeConfig, replaceConfigFile } from "openclaw/plugin-sdk/config-runtime"; +import { replaceConfigFile } from "openclaw/plugin-sdk/config-mutation"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { enqueueSystemEvent } from "openclaw/plugin-sdk/infra-runtime"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { danger, warn } from "openclaw/plugin-sdk/runtime-env"; import { migrateSlackChannelConfig } from "../../channel-migration.js"; import { resolveSlackChannelLabel } from "../channel-config.js"; diff --git a/extensions/slack/src/monitor/message-handler/prepare-routing.ts b/extensions/slack/src/monitor/message-handler/prepare-routing.ts index 01a412907e0..5c6ec0983c9 100644 --- a/extensions/slack/src/monitor/message-handler/prepare-routing.ts +++ b/extensions/slack/src/monitor/message-handler/prepare-routing.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveRuntimeConversationBindingRoute, type RuntimeConversationBindingRouteResult, diff --git a/extensions/slack/src/monitor/message-handler/prepare-thread-context.test.ts b/extensions/slack/src/monitor/message-handler/prepare-thread-context.test.ts index 2c0dbccfdca..e01670fc3e2 100644 --- a/extensions/slack/src/monitor/message-handler/prepare-thread-context.test.ts +++ b/extensions/slack/src/monitor/message-handler/prepare-thread-context.test.ts @@ -1,6 +1,6 @@ import type { App } from "@slack/bolt"; import { resolveEnvelopeFormatOptions } from "openclaw/plugin-sdk/channel-inbound"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterAll, beforeAll, describe, expect, it, vi } from "vitest"; import type { SlackMessageEvent } from "../../types.js"; import { resolveSlackThreadContextData } from "./prepare-thread-context.js"; diff --git a/extensions/slack/src/monitor/message-handler/prepare-thread-context.ts b/extensions/slack/src/monitor/message-handler/prepare-thread-context.ts index 3360381a99f..4fc7a4f56fc 100644 --- a/extensions/slack/src/monitor/message-handler/prepare-thread-context.ts +++ b/extensions/slack/src/monitor/message-handler/prepare-thread-context.ts @@ -1,5 +1,5 @@ import { formatInboundEnvelope } from "openclaw/plugin-sdk/channel-inbound"; -import type { ContextVisibilityMode } from "openclaw/plugin-sdk/config-runtime"; +import type { ContextVisibilityMode } from "openclaw/plugin-sdk/config-types"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { filterSupplementalContextItems, diff --git a/extensions/slack/src/monitor/message-handler/prepare.test-helpers.ts b/extensions/slack/src/monitor/message-handler/prepare.test-helpers.ts index 60634271d4a..5961fc84c87 100644 --- a/extensions/slack/src/monitor/message-handler/prepare.test-helpers.ts +++ b/extensions/slack/src/monitor/message-handler/prepare.test-helpers.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import path from "node:path"; import type { App } from "@slack/bolt"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path"; import type { ResolvedSlackAccount } from "../../accounts.js"; diff --git a/extensions/slack/src/monitor/message-handler/prepare.test.ts b/extensions/slack/src/monitor/message-handler/prepare.test.ts index d5e4303b288..c832e8ea8f9 100644 --- a/extensions/slack/src/monitor/message-handler/prepare.test.ts +++ b/extensions/slack/src/monitor/message-handler/prepare.test.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import type { App } from "@slack/bolt"; import { expectChannelInboundContextContract as expectInboundContextContract } from "openclaw/plugin-sdk/channel-contract-testing"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { registerSessionBindingAdapter, unregisterSessionBindingAdapter, diff --git a/extensions/slack/src/monitor/message-handler/prepare.thread-session-key.test.ts b/extensions/slack/src/monitor/message-handler/prepare.thread-session-key.test.ts index f124e6cc64d..0a7f39cb358 100644 --- a/extensions/slack/src/monitor/message-handler/prepare.thread-session-key.test.ts +++ b/extensions/slack/src/monitor/message-handler/prepare.thread-session-key.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import type { ResolvedSlackAccount } from "../../accounts.js"; import type { SlackMessageEvent } from "../../types.js"; diff --git a/extensions/slack/src/monitor/monitor.test.ts b/extensions/slack/src/monitor/monitor.test.ts index 84defd823fe..ee3604f0d2d 100644 --- a/extensions/slack/src/monitor/monitor.test.ts +++ b/extensions/slack/src/monitor/monitor.test.ts @@ -1,5 +1,5 @@ import type { App } from "@slack/bolt"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { describe, expect, it } from "vitest"; import { resolveSlackChannelConfig } from "./channel-config.js"; diff --git a/extensions/slack/src/monitor/provider.ts b/extensions/slack/src/monitor/provider.ts index 778de6782e9..3719cbdffc1 100644 --- a/extensions/slack/src/monitor/provider.ts +++ b/extensions/slack/src/monitor/provider.ts @@ -8,7 +8,7 @@ import { } from "openclaw/plugin-sdk/allow-from"; import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime"; import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context"; -import type { SessionScope } from "openclaw/plugin-sdk/config-runtime"; +import type { SessionScope } from "openclaw/plugin-sdk/config-types"; import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking"; import { DEFAULT_GROUP_HISTORY_LIMIT } from "openclaw/plugin-sdk/reply-history"; import { normalizeMainKey } from "openclaw/plugin-sdk/routing"; diff --git a/extensions/slack/src/monitor/replies.ts b/extensions/slack/src/monitor/replies.ts index ff64ee9566a..cf0428782f4 100644 --- a/extensions/slack/src/monitor/replies.ts +++ b/extensions/slack/src/monitor/replies.ts @@ -1,4 +1,4 @@ -import type { MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { chunkMarkdownTextWithMode, isSilentReplyText, diff --git a/extensions/slack/src/monitor/slash-dispatch.runtime.ts b/extensions/slack/src/monitor/slash-dispatch.runtime.ts index a9c7eaba1d3..cd55a592d04 100644 --- a/extensions/slack/src/monitor/slash-dispatch.runtime.ts +++ b/extensions/slack/src/monitor/slash-dispatch.runtime.ts @@ -1,8 +1,8 @@ -import { resolveMarkdownTableMode as resolveMarkdownTableModeImpl } from "openclaw/plugin-sdk/config-runtime"; import { recordInboundSessionMetaSafe as recordInboundSessionMetaSafeImpl, resolveConversationLabel as resolveConversationLabelImpl, } from "openclaw/plugin-sdk/conversation-runtime"; +import { resolveMarkdownTableMode as resolveMarkdownTableModeImpl } from "openclaw/plugin-sdk/markdown-table-runtime"; import { dispatchReplyWithDispatcher as dispatchReplyWithDispatcherImpl, finalizeInboundContext as finalizeInboundContextImpl, @@ -21,7 +21,7 @@ type ResolveConversationLabel = type RecordInboundSessionMetaSafe = typeof import("openclaw/plugin-sdk/conversation-runtime").recordInboundSessionMetaSafe; type ResolveMarkdownTableMode = - typeof import("openclaw/plugin-sdk/config-runtime").resolveMarkdownTableMode; + typeof import("openclaw/plugin-sdk/markdown-table-runtime").resolveMarkdownTableMode; type ResolveAgentRoute = typeof import("openclaw/plugin-sdk/routing").resolveAgentRoute; type DeliverSlackSlashReplies = typeof import("./replies.js").deliverSlackSlashReplies; diff --git a/extensions/slack/src/monitor/slash.ts b/extensions/slack/src/monitor/slash.ts index 20ca5279425..bf927a064fc 100644 --- a/extensions/slack/src/monitor/slash.ts +++ b/extensions/slack/src/monitor/slash.ts @@ -11,16 +11,15 @@ import { resolveCommandAuthorizedFromAuthorizers, resolveNativeCommandSessionTargets, } from "openclaw/plugin-sdk/command-auth-native"; +import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled, - loadSessionStore, - resolveStorePath, -} from "openclaw/plugin-sdk/config-runtime"; -import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; +} from "openclaw/plugin-sdk/native-command-config-runtime"; import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; import type { ResolvedAgentRoute } from "openclaw/plugin-sdk/routing"; import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env"; +import { loadSessionStore, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime"; import { chunkItems, normalizeLowercaseStringOrEmpty, diff --git a/extensions/slack/src/monitor/types.ts b/extensions/slack/src/monitor/types.ts index 7df610361f1..7d66dd83a53 100644 --- a/extensions/slack/src/monitor/types.ts +++ b/extensions/slack/src/monitor/types.ts @@ -1,5 +1,5 @@ import type { ChannelRuntimeSurface } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig, SlackSlashCommandConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig, SlackSlashCommandConfig } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import type { SlackFile, SlackMessageEvent } from "../types.js"; diff --git a/extensions/slack/src/runtime-api.ts b/extensions/slack/src/runtime-api.ts index f6ee16d23ab..5dad8fb2a8f 100644 --- a/extensions/slack/src/runtime-api.ts +++ b/extensions/slack/src/runtime-api.ts @@ -12,8 +12,8 @@ export type { OpenClawPluginApi, PluginRuntime, } from "openclaw/plugin-sdk/channel-plugin-common"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -export type { SlackAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +export type { SlackAccountConfig } from "openclaw/plugin-sdk/config-types"; export { emptyPluginConfigSchema, formatPairingApproveHint, diff --git a/extensions/slack/src/send.ts b/extensions/slack/src/send.ts index 5901dc367dc..10b1a131af2 100644 --- a/extensions/slack/src/send.ts +++ b/extensions/slack/src/send.ts @@ -1,7 +1,8 @@ import { type Block, type KnownBlock, type WebClient } from "@slack/web-api"; -import { requireRuntimeConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { withTrustedEnvProxyGuardedFetchMode } from "openclaw/plugin-sdk/fetch-runtime"; +import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { chunkMarkdownTextWithMode, isSilentReplyText, diff --git a/extensions/slack/src/setup-surface.test.ts b/extensions/slack/src/setup-surface.test.ts index f0be1eb3528..240c572568b 100644 --- a/extensions/slack/src/setup-surface.test.ts +++ b/extensions/slack/src/setup-surface.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it, vi } from "vitest"; import { createTestWizardPrompter, diff --git a/extensions/slack/src/threading-tool-context.test.ts b/extensions/slack/src/threading-tool-context.test.ts index caf9d7b873f..2cb55b406b2 100644 --- a/extensions/slack/src/threading-tool-context.test.ts +++ b/extensions/slack/src/threading-tool-context.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { buildSlackThreadingToolContext } from "./threading-tool-context.js"; diff --git a/extensions/slack/src/threading-tool-context.ts b/extensions/slack/src/threading-tool-context.ts index 8d8f6fbf630..55e99d7ed58 100644 --- a/extensions/slack/src/threading-tool-context.ts +++ b/extensions/slack/src/threading-tool-context.ts @@ -2,7 +2,7 @@ import type { ChannelThreadingContext, ChannelThreadingToolContext, } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { resolveSlackAccount, resolveSlackReplyToMode } from "./accounts.js"; import { normalizeSlackThreadTsCandidate } from "./thread-ts.js"; diff --git a/extensions/slack/src/threading.ts b/extensions/slack/src/threading.ts index d072ab796c0..ab23ab89c40 100644 --- a/extensions/slack/src/threading.ts +++ b/extensions/slack/src/threading.ts @@ -1,4 +1,4 @@ -import type { ReplyToMode } from "openclaw/plugin-sdk/config-runtime"; +import type { ReplyToMode } from "openclaw/plugin-sdk/config-types"; import type { SlackAppMentionEvent, SlackMessageEvent } from "./types.js"; export type SlackThreadContext = { diff --git a/extensions/speech-core/src/tts.test.ts b/extensions/speech-core/src/tts.test.ts index 206b4232e5a..96c8fa10d46 100644 --- a/extensions/speech-core/src/tts.test.ts +++ b/extensions/speech-core/src/tts.test.ts @@ -1,11 +1,11 @@ import { rmSync } from "node:fs"; import path from "node:path"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { ReplyPayload } from "openclaw/plugin-sdk/reply-payload"; import { clearRuntimeConfigSnapshot, setRuntimeConfigSnapshot, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; -import type { ReplyPayload } from "openclaw/plugin-sdk/reply-payload"; +} from "openclaw/plugin-sdk/runtime-config-snapshot"; import type { SpeechProviderPlugin, SpeechProviderPrepareSynthesisContext, diff --git a/extensions/speech-core/src/tts.ts b/extensions/speech-core/src/tts.ts index a98c7ab7bab..9fbbc4db811 100644 --- a/extensions/speech-core/src/tts.ts +++ b/extensions/speech-core/src/tts.ts @@ -10,22 +10,24 @@ import { } from "node:fs"; import path from "node:path"; import { resolveChannelTtsVoiceDelivery } from "openclaw/plugin-sdk/channel-targets"; -import { - getRuntimeConfigSnapshot, - getRuntimeConfigSourceSnapshot, - type OpenClawConfig, - type ResolvedTtsPersona, - type TtsAutoMode, - type TtsConfig, - type TtsModelOverrideConfig, - type TtsProvider, -} from "openclaw/plugin-sdk/config-runtime"; +import type { + OpenClawConfig, + ResolvedTtsPersona, + TtsAutoMode, + TtsConfig, + TtsModelOverrideConfig, + TtsProvider, +} from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { redactSensitiveText } from "openclaw/plugin-sdk/logging-core"; import { resolveSendableOutboundReplyParts, type ReplyPayload, } from "openclaw/plugin-sdk/reply-payload"; +import { + getRuntimeConfigSnapshot, + getRuntimeConfigSourceSnapshot, +} from "openclaw/plugin-sdk/runtime-config-snapshot"; import { isVerbose, logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/sandbox"; import { diff --git a/extensions/synology-chat/src/core.test.ts b/extensions/synology-chat/src/core.test.ts index 3480b131104..fad44348168 100644 --- a/extensions/synology-chat/src/core.test.ts +++ b/extensions/synology-chat/src/core.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { createPluginSetupWizardConfigure, diff --git a/extensions/synology-chat/src/inbound-turn.ts b/extensions/synology-chat/src/inbound-turn.ts index 269272b048d..185b28a367d 100644 --- a/extensions/synology-chat/src/inbound-turn.ts +++ b/extensions/synology-chat/src/inbound-turn.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { sendMessage } from "./client.js"; import { buildSynologyChatInboundContext, type SynologyInboundMessage } from "./inbound-context.js"; import { getSynologyRuntime } from "./runtime.js"; diff --git a/extensions/talk-voice/index.ts b/extensions/talk-voice/index.ts index 7034db903e4..7517f5a021b 100644 --- a/extensions/talk-voice/index.ts +++ b/extensions/talk-voice/index.ts @@ -1,9 +1,7 @@ -import { - resolveActiveTalkProviderConfig, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import type { SpeechVoiceOption } from "openclaw/plugin-sdk/speech"; +import { resolveActiveTalkProviderConfig } from "openclaw/plugin-sdk/talk-config-runtime"; import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, diff --git a/extensions/tavily/src/config.ts b/extensions/tavily/src/config.ts index bcd5f7bdf71..ffd008eb009 100644 --- a/extensions/tavily/src/config.ts +++ b/extensions/tavily/src/config.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeResolvedSecretInputString, normalizeSecretInput, diff --git a/extensions/tavily/src/tavily-client.ts b/extensions/tavily/src/tavily-client.ts index f61e1514df4..60f67ea3e11 100644 --- a/extensions/tavily/src/tavily-client.ts +++ b/extensions/tavily/src/tavily-client.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_CACHE_TTL_MINUTES, normalizeCacheKey, diff --git a/extensions/tavily/src/tavily-tools.test.ts b/extensions/tavily/src/tavily-tools.test.ts index acec5eeac58..7fc4c8d621b 100644 --- a/extensions/tavily/src/tavily-tools.test.ts +++ b/extensions/tavily/src/tavily-tools.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-runtime"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { diff --git a/extensions/telegram/runtime-api.ts b/extensions/telegram/runtime-api.ts index dcff692a97c..2cf0cdb15b7 100644 --- a/extensions/telegram/runtime-api.ts +++ b/extensions/telegram/runtime-api.ts @@ -6,7 +6,7 @@ export type { OpenClawPluginServiceContext, PluginLogger, } from "openclaw/plugin-sdk/plugin-entry"; -import type { OpenClawConfig as RuntimeOpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig as RuntimeOpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store"; export type { AcpRuntime, @@ -86,7 +86,7 @@ export { export { resolveTelegramToken } from "./src/token.js"; export { setTelegramRuntime } from "./src/runtime.js"; export type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type TelegramAccountConfig = NonNullable< NonNullable["telegram"] >; diff --git a/extensions/telegram/src/account-config.ts b/extensions/telegram/src/account-config.ts index a6d3b4269a1..4b3622b6734 100644 --- a/extensions/telegram/src/account-config.ts +++ b/extensions/telegram/src/account-config.ts @@ -3,7 +3,7 @@ import { resolveAccountEntry, type OpenClawConfig, } from "openclaw/plugin-sdk/account-core"; -import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-types"; export function resolveTelegramAccountConfig( cfg: OpenClawConfig, diff --git a/extensions/telegram/src/account-inspect.test.ts b/extensions/telegram/src/account-inspect.test.ts index 55107afec08..dccd3b575ac 100644 --- a/extensions/telegram/src/account-inspect.test.ts +++ b/extensions/telegram/src/account-inspect.test.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { withEnv } from "openclaw/plugin-sdk/testing"; import { describe, expect, it } from "vitest"; import { inspectTelegramAccount } from "./account-inspect.js"; diff --git a/extensions/telegram/src/account-inspect.ts b/extensions/telegram/src/account-inspect.ts index 378425cb2bc..f856dd78cc2 100644 --- a/extensions/telegram/src/account-inspect.ts +++ b/extensions/telegram/src/account-inspect.ts @@ -1,14 +1,14 @@ import { resolveAccountWithDefaultFallback } from "openclaw/plugin-sdk/account-core"; import { tryReadSecretFileSync } from "openclaw/plugin-sdk/channel-core"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { coerceSecretRef } from "openclaw/plugin-sdk/config-runtime"; -import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-types"; import { resolveDefaultSecretProviderAlias } from "openclaw/plugin-sdk/provider-auth"; import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing"; import { hasConfiguredSecretInput, normalizeSecretInputString, } from "openclaw/plugin-sdk/secret-input"; +import { coerceSecretRef } from "openclaw/plugin-sdk/secret-input-runtime"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { mergeTelegramAccountConfig, diff --git a/extensions/telegram/src/account-selection.ts b/extensions/telegram/src/account-selection.ts index c942056aecd..8f5718527cf 100644 --- a/extensions/telegram/src/account-selection.ts +++ b/extensions/telegram/src/account-selection.ts @@ -3,7 +3,7 @@ import { normalizeAccountId, normalizeOptionalAccountId, } from "openclaw/plugin-sdk/account-id"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; const DEFAULT_AGENT_ID = "main"; diff --git a/extensions/telegram/src/accounts.test.ts b/extensions/telegram/src/accounts.test.ts index 13b617d0de2..b14e57d3ae2 100644 --- a/extensions/telegram/src/accounts.test.ts +++ b/extensions/telegram/src/accounts.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import * as runtimeEnvModule from "openclaw/plugin-sdk/runtime-env"; import { withEnv } from "openclaw/plugin-sdk/testing"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/extensions/telegram/src/accounts.ts b/extensions/telegram/src/accounts.ts index bfb2081f26f..ade877db7d2 100644 --- a/extensions/telegram/src/accounts.ts +++ b/extensions/telegram/src/accounts.ts @@ -6,10 +6,7 @@ import { resolveAccountWithDefaultFallback, type OpenClawConfig, } from "openclaw/plugin-sdk/account-core"; -import type { - TelegramAccountConfig, - TelegramActionConfig, -} from "openclaw/plugin-sdk/config-runtime"; +import type { TelegramAccountConfig, TelegramActionConfig } from "openclaw/plugin-sdk/config-types"; import { formatSetExplicitDefaultInstruction } from "openclaw/plugin-sdk/routing"; import { createSubsystemLogger, isTruthyEnvValue } from "openclaw/plugin-sdk/runtime-env"; import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime"; diff --git a/extensions/telegram/src/action-runtime.test.ts b/extensions/telegram/src/action-runtime.test.ts index 6898afbd82a..bdae070cd83 100644 --- a/extensions/telegram/src/action-runtime.test.ts +++ b/extensions/telegram/src/action-runtime.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { captureEnv } from "openclaw/plugin-sdk/testing"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { handleTelegramAction, telegramActionRuntime } from "./action-runtime.js"; diff --git a/extensions/telegram/src/action-runtime.ts b/extensions/telegram/src/action-runtime.ts index 5b80b8eb8eb..defdf45ab30 100644 --- a/extensions/telegram/src/action-runtime.ts +++ b/extensions/telegram/src/action-runtime.ts @@ -10,7 +10,7 @@ import { resolvePollMaxSelections, resolveReactionMessageId, } from "openclaw/plugin-sdk/channel-actions"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeMessagePresentation, presentationToInteractiveReply, diff --git a/extensions/telegram/src/api-fetch.ts b/extensions/telegram/src/api-fetch.ts index 2b8b1c9f8cf..6b82a1e86e2 100644 --- a/extensions/telegram/src/api-fetch.ts +++ b/extensions/telegram/src/api-fetch.ts @@ -1,4 +1,4 @@ -import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/config-types"; import { resolveTelegramApiBase, resolveTelegramFetch } from "./fetch.js"; import { makeProxyFetch } from "./proxy.js"; diff --git a/extensions/telegram/src/approval-native.test.ts b/extensions/telegram/src/approval-native.test.ts index f5f0a298364..53c2056eced 100644 --- a/extensions/telegram/src/approval-native.test.ts +++ b/extensions/telegram/src/approval-native.test.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { clearSessionStoreCacheForTest } from "../../../src/config/sessions/store.js"; import { telegramApprovalCapability, telegramNativeApprovalAdapter } from "./approval-native.js"; diff --git a/extensions/telegram/src/audit.ts b/extensions/telegram/src/audit.ts index 35aa7bfbf49..a0b6dd9c3b4 100644 --- a/extensions/telegram/src/audit.ts +++ b/extensions/telegram/src/audit.ts @@ -1,4 +1,4 @@ -import type { TelegramGroupConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { TelegramGroupConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; export type { AuditTelegramGroupMembershipParams, diff --git a/extensions/telegram/src/audit.types.ts b/extensions/telegram/src/audit.types.ts index 198a5d197e7..7b60302eff9 100644 --- a/extensions/telegram/src/audit.types.ts +++ b/extensions/telegram/src/audit.types.ts @@ -1,4 +1,4 @@ -import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/config-types"; export type TelegramGroupMembershipAuditEntry = { chatId: string; diff --git a/extensions/telegram/src/auto-topic-label-config.ts b/extensions/telegram/src/auto-topic-label-config.ts index 0049aa75a30..7f33bb28363 100644 --- a/extensions/telegram/src/auto-topic-label-config.ts +++ b/extensions/telegram/src/auto-topic-label-config.ts @@ -1,7 +1,4 @@ -import type { - TelegramAccountConfig, - TelegramDirectConfig, -} from "openclaw/plugin-sdk/config-runtime"; +import type { TelegramAccountConfig, TelegramDirectConfig } from "openclaw/plugin-sdk/config-types"; export const AUTO_TOPIC_LABEL_DEFAULT_PROMPT = "Generate a very short topic label (2-4 words, max 25 chars) for a chat conversation based on the user's first message below. No emoji. Use the same language as the message. Be concise and descriptive. Return ONLY the topic name, nothing else."; diff --git a/extensions/telegram/src/auto-topic-label.ts b/extensions/telegram/src/auto-topic-label.ts index 64546c9a8a9..1b3b8453ee3 100644 --- a/extensions/telegram/src/auto-topic-label.ts +++ b/extensions/telegram/src/auto-topic-label.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { generateConversationLabel } from "openclaw/plugin-sdk/reply-dispatch-runtime"; export { AUTO_TOPIC_LABEL_DEFAULT_PROMPT, diff --git a/extensions/telegram/src/bot-core.ts b/extensions/telegram/src/bot-core.ts index 433886ce032..0b32eeee1f4 100644 --- a/extensions/telegram/src/bot-core.ts +++ b/extensions/telegram/src/bot-core.ts @@ -1,18 +1,18 @@ -import { - isNativeCommandsExplicitlyDisabled, - resolveNativeCommandsEnabled, - resolveNativeSkillsEnabled, -} from "openclaw/plugin-sdk/config-runtime"; import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/channel-policy"; import { resolveThreadBindingIdleTimeoutMsForChannel, resolveThreadBindingMaxAgeMsForChannel, resolveThreadBindingSpawnPolicy, } from "openclaw/plugin-sdk/conversation-runtime"; import { formatErrorMessage, formatUncaughtError } from "openclaw/plugin-sdk/error-runtime"; +import { + isNativeCommandsExplicitlyDisabled, + resolveNativeCommandsEnabled, + resolveNativeSkillsEnabled, +} from "openclaw/plugin-sdk/native-command-config-runtime"; import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking"; import { DEFAULT_GROUP_HISTORY_LIMIT, type HistoryEntry } from "openclaw/plugin-sdk/reply-history"; import { danger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env"; diff --git a/extensions/telegram/src/bot-deps.ts b/extensions/telegram/src/bot-deps.ts index 7ba2d39a269..fc60f12fc4d 100644 --- a/extensions/telegram/src/bot-deps.ts +++ b/extensions/telegram/src/bot-deps.ts @@ -1,11 +1,12 @@ import { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline"; -import { getRuntimeConfig, resolveStorePath } from "openclaw/plugin-sdk/config-runtime"; -import { loadSessionStore } from "openclaw/plugin-sdk/config-runtime"; import { readChannelAllowFromStore } from "openclaw/plugin-sdk/conversation-runtime"; import { upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime"; import { enqueueSystemEvent } from "openclaw/plugin-sdk/infra-runtime"; import { buildModelsProviderData } from "openclaw/plugin-sdk/models-provider-runtime"; import { dispatchReplyWithBufferedBlockDispatcher } from "openclaw/plugin-sdk/reply-dispatch-runtime"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; +import { resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime"; +import { loadSessionStore } from "openclaw/plugin-sdk/session-store-runtime"; import { listSkillCommandsForAgents } from "openclaw/plugin-sdk/skill-commands-runtime"; import { loadWebMedia } from "openclaw/plugin-sdk/web-media"; import { syncTelegramMenuCommands } from "./bot-native-command-menu.js"; diff --git a/extensions/telegram/src/bot-handlers.runtime.ts b/extensions/telegram/src/bot-handlers.runtime.ts index 04b39b7e745..7c533b9485e 100644 --- a/extensions/telegram/src/bot-handlers.runtime.ts +++ b/extensions/telegram/src/bot-handlers.runtime.ts @@ -11,25 +11,25 @@ import { resolveCommandAuthorizedFromAuthorizers, } from "openclaw/plugin-sdk/command-auth-native"; import { buildCommandsMessagePaginated } from "openclaw/plugin-sdk/command-status"; -import { replaceConfigFile } from "openclaw/plugin-sdk/config-runtime"; -import { - loadSessionStore, - resolveSessionStoreEntry, - updateSessionStore, -} from "openclaw/plugin-sdk/config-runtime"; -import type { DmPolicy, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { TelegramGroupConfig, TelegramTopicConfig } from "openclaw/plugin-sdk/config-runtime"; -import { applyModelOverrideToSessionEntry } from "openclaw/plugin-sdk/config-runtime"; +import { replaceConfigFile } from "openclaw/plugin-sdk/config-mutation"; +import type { DmPolicy, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { TelegramGroupConfig, TelegramTopicConfig } from "openclaw/plugin-sdk/config-types"; import { buildPluginBindingResolvedText, parsePluginBindingApprovalCustomId, resolvePluginConversationBindingApproval, } from "openclaw/plugin-sdk/conversation-runtime"; import { parseExecApprovalCommandText } from "openclaw/plugin-sdk/infra-runtime"; +import { applyModelOverrideToSessionEntry } from "openclaw/plugin-sdk/model-session-runtime"; import { formatModelsAvailableHeader } from "openclaw/plugin-sdk/models-provider-runtime"; import { resolveAgentRoute } from "openclaw/plugin-sdk/routing"; import { resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing"; import { danger, logVerbose, warn } from "openclaw/plugin-sdk/runtime-env"; +import { + loadSessionStore, + resolveSessionStoreEntry, + updateSessionStore, +} from "openclaw/plugin-sdk/session-store-runtime"; import { resolveTelegramMediaRuntimeOptions } from "./accounts.js"; import { withTelegramApiErrorLogging } from "./api-logging.js"; import { diff --git a/extensions/telegram/src/bot-message-context.body.ts b/extensions/telegram/src/bot-message-context.body.ts index cf6b9610673..2b4b56333ed 100644 --- a/extensions/telegram/src/bot-message-context.body.ts +++ b/extensions/telegram/src/bot-message-context.body.ts @@ -7,15 +7,15 @@ import { resolveInboundMentionDecision, type NormalizedLocation, } from "openclaw/plugin-sdk/channel-inbound"; +import { resolveChannelGroupPolicy } from "openclaw/plugin-sdk/channel-policy"; import { resolveControlCommandGate } from "openclaw/plugin-sdk/command-auth-native"; import { hasControlCommand } from "openclaw/plugin-sdk/command-detection"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { TelegramDirectConfig, TelegramGroupConfig, TelegramTopicConfig, -} from "openclaw/plugin-sdk/config-runtime"; -import { resolveChannelGroupPolicy } from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; import { createInternalHookEvent, fireAndForgetHook, diff --git a/extensions/telegram/src/bot-message-context.runtime.ts b/extensions/telegram/src/bot-message-context.runtime.ts index 928269119e9..197ad8bdf37 100644 --- a/extensions/telegram/src/bot-message-context.runtime.ts +++ b/extensions/telegram/src/bot-message-context.runtime.ts @@ -1,4 +1,4 @@ export { createStatusReactionController } from "openclaw/plugin-sdk/channel-feedback"; export { recordChannelActivity } from "openclaw/plugin-sdk/infra-runtime"; -export { getRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; +export { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; export { ensureConfiguredBindingRouteReady } from "openclaw/plugin-sdk/conversation-runtime"; diff --git a/extensions/telegram/src/bot-message-context.session-recreate.test-support.ts b/extensions/telegram/src/bot-message-context.session-recreate.test-support.ts index 1512259d0a2..c149c42b2eb 100644 --- a/extensions/telegram/src/bot-message-context.session-recreate.test-support.ts +++ b/extensions/telegram/src/bot-message-context.session-recreate.test-support.ts @@ -3,12 +3,12 @@ import path from "node:path"; import { clearRuntimeConfigSnapshot, setRuntimeConfigSnapshot, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/runtime-config-snapshot"; import { clearSessionStoreCacheForTest, loadSessionStore, updateSessionStore, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/session-store-runtime"; import { resolvePreferredOpenClawTmpDir } from "openclaw/plugin-sdk/temp-path"; import { afterAll, afterEach, beforeAll, describe, expect, it } from "vitest"; import { buildTelegramMessageContextForTest } from "./bot-message-context.test-harness.js"; diff --git a/extensions/telegram/src/bot-message-context.session.runtime.ts b/extensions/telegram/src/bot-message-context.session.runtime.ts index d69f28642d4..f7ec48878e4 100644 --- a/extensions/telegram/src/bot-message-context.session.runtime.ts +++ b/extensions/telegram/src/bot-message-context.session.runtime.ts @@ -1,4 +1,4 @@ -export { readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/config-runtime"; +export { readSessionUpdatedAt, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime"; export { recordInboundSession } from "openclaw/plugin-sdk/conversation-runtime"; export { finalizeInboundContext } from "openclaw/plugin-sdk/reply-dispatch-runtime"; export { resolveInboundLastRouteSessionKey } from "openclaw/plugin-sdk/routing"; diff --git a/extensions/telegram/src/bot-message-context.session.ts b/extensions/telegram/src/bot-message-context.session.ts index 3a6874f3e0d..8d67edaaeb2 100644 --- a/extensions/telegram/src/bot-message-context.session.ts +++ b/extensions/telegram/src/bot-message-context.session.ts @@ -5,13 +5,13 @@ import { type NormalizedLocation, } from "openclaw/plugin-sdk/channel-inbound"; import { normalizeCommandBody } from "openclaw/plugin-sdk/command-surface"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { TelegramDirectConfig, TelegramGroupConfig, TelegramTopicConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; +import { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime"; import { buildPendingHistoryContextFromMap, type HistoryEntry, diff --git a/extensions/telegram/src/bot-message-context.topic-agentid.test.ts b/extensions/telegram/src/bot-message-context.topic-agentid.test.ts index 0e3a98e6a1f..cf6815a9087 100644 --- a/extensions/telegram/src/bot-message-context.topic-agentid.test.ts +++ b/extensions/telegram/src/bot-message-context.topic-agentid.test.ts @@ -1,4 +1,4 @@ -import { getRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { beforeEach, describe, expect, it, vi } from "vitest"; const { defaultRouteConfig } = vi.hoisted(() => ({ diff --git a/extensions/telegram/src/bot-message-context.ts b/extensions/telegram/src/bot-message-context.ts index de6f6d770c5..58a8fa01989 100644 --- a/extensions/telegram/src/bot-message-context.ts +++ b/extensions/telegram/src/bot-message-context.ts @@ -4,7 +4,7 @@ import { shouldAckReaction as shouldAckReactionGate, } from "openclaw/plugin-sdk/channel-feedback"; import { logInboundDrop } from "openclaw/plugin-sdk/channel-inbound"; -import type { TelegramDirectConfig, TelegramGroupConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { TelegramDirectConfig, TelegramGroupConfig } from "openclaw/plugin-sdk/config-types"; import { deriveLastRoutePolicy } from "openclaw/plugin-sdk/routing"; import { normalizeAccountId, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; diff --git a/extensions/telegram/src/bot-message-context.types.ts b/extensions/telegram/src/bot-message-context.types.ts index 30da153b84c..ee7a9cab87b 100644 --- a/extensions/telegram/src/bot-message-context.types.ts +++ b/extensions/telegram/src/bot-message-context.types.ts @@ -1,11 +1,11 @@ import type { Bot } from "grammy"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { DmPolicy, TelegramDirectConfig, TelegramGroupConfig, TelegramTopicConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; import type { HistoryEntry } from "openclaw/plugin-sdk/reply-history"; import type { StickerMetadata, TelegramContext } from "./bot/types.js"; diff --git a/extensions/telegram/src/bot-message-dispatch.runtime.ts b/extensions/telegram/src/bot-message-dispatch.runtime.ts index e89dfbf3055..c8470c4590f 100644 --- a/extensions/telegram/src/bot-message-dispatch.runtime.ts +++ b/extensions/telegram/src/bot-message-dispatch.runtime.ts @@ -1,9 +1,9 @@ export { loadSessionStore, - resolveMarkdownTableMode, resolveSessionStoreEntry, resolveStorePath, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/session-store-runtime"; +export { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; export { getAgentScopedMediaLocalRoots } from "openclaw/plugin-sdk/media-runtime"; export { resolveChunkMode } from "openclaw/plugin-sdk/reply-dispatch-runtime"; export { diff --git a/extensions/telegram/src/bot-message-dispatch.ts b/extensions/telegram/src/bot-message-dispatch.ts index 25be7ba3ff4..8f4d0144f6d 100644 --- a/extensions/telegram/src/bot-message-dispatch.ts +++ b/extensions/telegram/src/bot-message-dispatch.ts @@ -15,7 +15,7 @@ import type { OpenClawConfig, ReplyToMode, TelegramAccountConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { createOutboundPayloadPlan, diff --git a/extensions/telegram/src/bot-message.ts b/extensions/telegram/src/bot-message.ts index 6ab4cfbd015..332fa8a91f8 100644 --- a/extensions/telegram/src/bot-message.ts +++ b/extensions/telegram/src/bot-message.ts @@ -1,5 +1,5 @@ -import type { ReplyToMode } from "openclaw/plugin-sdk/config-runtime"; -import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { ReplyToMode } from "openclaw/plugin-sdk/config-types"; +import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-types"; import { danger, logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import type { TelegramBotDeps } from "./bot-deps.js"; diff --git a/extensions/telegram/src/bot-native-command-deps.runtime.ts b/extensions/telegram/src/bot-native-command-deps.runtime.ts index 02a2c2881bb..07887ede360 100644 --- a/extensions/telegram/src/bot-native-command-deps.runtime.ts +++ b/extensions/telegram/src/bot-native-command-deps.runtime.ts @@ -1,7 +1,7 @@ -import { getRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; import { readChannelAllowFromStore } from "openclaw/plugin-sdk/conversation-runtime"; import { getPluginCommandSpecs } from "openclaw/plugin-sdk/plugin-runtime"; import { dispatchReplyWithBufferedBlockDispatcher } from "openclaw/plugin-sdk/reply-dispatch-runtime"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { listSkillCommandsForAgents } from "openclaw/plugin-sdk/skill-commands-runtime"; import type { TelegramBotDeps } from "./bot-deps.js"; import { syncTelegramMenuCommands } from "./bot-native-command-menu.js"; diff --git a/extensions/telegram/src/bot-native-commands.group-auth.test.ts b/extensions/telegram/src/bot-native-commands.group-auth.test.ts index 3a3adff7b8c..2e0a4fff1ed 100644 --- a/extensions/telegram/src/bot-native-commands.group-auth.test.ts +++ b/extensions/telegram/src/bot-native-commands.group-auth.test.ts @@ -1,6 +1,6 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { ChannelGroupPolicy } from "openclaw/plugin-sdk/config-runtime"; -import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { ChannelGroupPolicy } from "openclaw/plugin-sdk/config-types"; +import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { createNativeCommandsHarness, diff --git a/extensions/telegram/src/bot-native-commands.registry.test.ts b/extensions/telegram/src/bot-native-commands.registry.test.ts index 9cb7abfde05..7f9cbf465d5 100644 --- a/extensions/telegram/src/bot-native-commands.registry.test.ts +++ b/extensions/telegram/src/bot-native-commands.registry.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; let registerTelegramNativeCommands: typeof import("./bot-native-commands.js").registerTelegramNativeCommands; diff --git a/extensions/telegram/src/bot-native-commands.session-meta.test.ts b/extensions/telegram/src/bot-native-commands.session-meta.test.ts index 449c99d7771..a83634e4e2f 100644 --- a/extensions/telegram/src/bot-native-commands.session-meta.test.ts +++ b/extensions/telegram/src/bot-native-commands.session-meta.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ResolvedAgentRoute } from "openclaw/plugin-sdk/routing"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import type { TelegramNativeCommandDeps } from "./bot-native-command-deps.runtime.js"; diff --git a/extensions/telegram/src/bot-native-commands.skills-allowlist.test.ts b/extensions/telegram/src/bot-native-commands.skills-allowlist.test.ts index 17e994d428c..7e5bfd7a776 100644 --- a/extensions/telegram/src/bot-native-commands.skills-allowlist.test.ts +++ b/extensions/telegram/src/bot-native-commands.skills-allowlist.test.ts @@ -1,7 +1,7 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it, vi } from "vitest"; import { registerTelegramNativeCommands } from "./bot-native-commands.js"; import { diff --git a/extensions/telegram/src/bot-native-commands.test-helpers.ts b/extensions/telegram/src/bot-native-commands.test-helpers.ts index 6f43b534b62..ffd00f747e9 100644 --- a/extensions/telegram/src/bot-native-commands.test-helpers.ts +++ b/extensions/telegram/src/bot-native-commands.test-helpers.ts @@ -1,6 +1,6 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { ChannelGroupPolicy } from "openclaw/plugin-sdk/config-runtime"; -import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { ChannelGroupPolicy } from "openclaw/plugin-sdk/config-types"; +import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import type { MockFn } from "openclaw/plugin-sdk/testing"; import { vi } from "vitest"; diff --git a/extensions/telegram/src/bot-native-commands.test.ts b/extensions/telegram/src/bot-native-commands.test.ts index 5a5b64a8260..75b15ca1ead 100644 --- a/extensions/telegram/src/bot-native-commands.test.ts +++ b/extensions/telegram/src/bot-native-commands.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig, TelegramAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig, TelegramAccountConfig } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { diff --git a/extensions/telegram/src/bot-native-commands.ts b/extensions/telegram/src/bot-native-commands.ts index 991f66d8df7..d7dccf6e814 100644 --- a/extensions/telegram/src/bot-native-commands.ts +++ b/extensions/telegram/src/bot-native-commands.ts @@ -17,26 +17,26 @@ import { resolveStoredModelOverride, type CommandArgs, } from "openclaw/plugin-sdk/command-auth-native"; -import { - loadSessionStore, - resolveSessionStoreEntry, - resolveStorePath, -} from "openclaw/plugin-sdk/config-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { ChannelGroupPolicy } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { ChannelGroupPolicy } from "openclaw/plugin-sdk/config-types"; import type { ReplyToMode, TelegramAccountConfig, TelegramDirectConfig, TelegramGroupConfig, TelegramTopicConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; import { resolveAgentRoute } from "openclaw/plugin-sdk/routing"; import { getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { getChildLogger } from "openclaw/plugin-sdk/runtime-env"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; +import { + loadSessionStore, + resolveSessionStoreEntry, + resolveStorePath, +} from "openclaw/plugin-sdk/session-store-runtime"; import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, diff --git a/extensions/telegram/src/bot.create-telegram-bot.test-harness.ts b/extensions/telegram/src/bot.create-telegram-bot.test-harness.ts index 5b979d4eab7..e5e165d9400 100644 --- a/extensions/telegram/src/bot.create-telegram-bot.test-harness.ts +++ b/extensions/telegram/src/bot.create-telegram-bot.test-harness.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { GetReplyOptions, MsgContext } from "openclaw/plugin-sdk/reply-runtime"; import type { MockFn } from "openclaw/plugin-sdk/testing"; import { beforeEach, vi } from "vitest"; diff --git a/extensions/telegram/src/bot.helpers.test.ts b/extensions/telegram/src/bot.helpers.test.ts index 88c3d63eb65..cc08232ec40 100644 --- a/extensions/telegram/src/bot.helpers.test.ts +++ b/extensions/telegram/src/bot.helpers.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { resolveTelegramStreamMode } from "./bot/helpers.js"; import { resolveTelegramDraftStreamingChunking } from "./draft-chunking.js"; diff --git a/extensions/telegram/src/bot.media.e2e-harness.ts b/extensions/telegram/src/bot.media.e2e-harness.ts index f2faacc696d..6696331fd9a 100644 --- a/extensions/telegram/src/bot.media.e2e-harness.ts +++ b/extensions/telegram/src/bot.media.e2e-harness.ts @@ -1,5 +1,5 @@ import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resetInboundDedupe } from "openclaw/plugin-sdk/reply-runtime"; import type { GetReplyOptions, MsgContext } from "openclaw/plugin-sdk/reply-runtime"; import { beforeEach, vi, type Mock } from "vitest"; diff --git a/extensions/telegram/src/bot.test.ts b/extensions/telegram/src/bot.test.ts index 2237e4e4860..27c08d9c6a3 100644 --- a/extensions/telegram/src/bot.test.ts +++ b/extensions/telegram/src/bot.test.ts @@ -1,5 +1,5 @@ import { rm } from "node:fs/promises"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { clearPluginInteractiveHandlers, registerPluginInteractiveHandler, diff --git a/extensions/telegram/src/bot.types.ts b/extensions/telegram/src/bot.types.ts index 26ab001f2d5..f9ce39c95ca 100644 --- a/extensions/telegram/src/bot.types.ts +++ b/extensions/telegram/src/bot.types.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig, ReplyToMode } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig, ReplyToMode } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import type { TelegramBotDeps } from "./bot-deps.js"; import type { TelegramTransport } from "./fetch.js"; diff --git a/extensions/telegram/src/bot/delivery.replies.ts b/extensions/telegram/src/bot/delivery.replies.ts index 4d43a67d121..41c872e5735 100644 --- a/extensions/telegram/src/bot/delivery.replies.ts +++ b/extensions/telegram/src/bot/delivery.replies.ts @@ -1,6 +1,6 @@ import { type Bot, GrammyError, InputFile } from "grammy"; -import type { ReplyToMode } from "openclaw/plugin-sdk/config-runtime"; -import type { MarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import type { ReplyToMode } from "openclaw/plugin-sdk/config-types"; +import type { MarkdownTableMode } from "openclaw/plugin-sdk/config-types"; import { fireAndForgetHook } from "openclaw/plugin-sdk/hook-runtime"; import { createInternalHookEvent, triggerInternalHook } from "openclaw/plugin-sdk/hook-runtime"; import { @@ -661,7 +661,7 @@ export function emitTelegramMessageSentHooks(params: EmitMessageSentHookParams): export async function deliverReplies(params: { replies: ReplyPayload[]; - cfg?: import("openclaw/plugin-sdk/config-runtime").OpenClawConfig; + cfg?: import("openclaw/plugin-sdk/config-types").OpenClawConfig; chatId: string; accountId?: string; sessionKeyForInternalHooks?: string; diff --git a/extensions/telegram/src/bot/helpers.ts b/extensions/telegram/src/bot/helpers.ts index 466ac01c403..a5f5378b11a 100644 --- a/extensions/telegram/src/bot/helpers.ts +++ b/extensions/telegram/src/bot/helpers.ts @@ -4,7 +4,7 @@ import type { TelegramDirectConfig, TelegramGroupConfig, TelegramTopicConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; import { readChannelAllowFromStore } from "openclaw/plugin-sdk/conversation-runtime"; import { normalizeAccountId } from "openclaw/plugin-sdk/routing"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/telegram/src/bot/reply-threading.ts b/extensions/telegram/src/bot/reply-threading.ts index 11f4f099688..7ee37c6cd73 100644 --- a/extensions/telegram/src/bot/reply-threading.ts +++ b/extensions/telegram/src/bot/reply-threading.ts @@ -1,4 +1,4 @@ -import type { ReplyToMode } from "openclaw/plugin-sdk/config-runtime"; +import type { ReplyToMode } from "openclaw/plugin-sdk/config-types"; export type DeliveryProgress = { hasReplied: boolean; diff --git a/extensions/telegram/src/channel-actions.contract.test.ts b/extensions/telegram/src/channel-actions.contract.test.ts index 64f1ae31b27..e79c59dd6fc 100644 --- a/extensions/telegram/src/channel-actions.contract.test.ts +++ b/extensions/telegram/src/channel-actions.contract.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe } from "vitest"; import { installChannelActionsContractSuite } from "../../../test/helpers/channels/registry-contract-suites.js"; import { telegramPlugin } from "../api.js"; diff --git a/extensions/telegram/src/channel-actions.test.ts b/extensions/telegram/src/channel-actions.test.ts index 1211c5e6208..38926d3637e 100644 --- a/extensions/telegram/src/channel-actions.test.ts +++ b/extensions/telegram/src/channel-actions.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; import { telegramMessageActions, telegramMessageActionRuntime } from "./channel-actions.js"; diff --git a/extensions/telegram/src/channel-actions.ts b/extensions/telegram/src/channel-actions.ts index 0ba850c8cb8..b20c3233eaa 100644 --- a/extensions/telegram/src/channel-actions.ts +++ b/extensions/telegram/src/channel-actions.ts @@ -9,7 +9,7 @@ import type { ChannelMessageToolDiscovery, ChannelMessageToolSchemaContribution, } from "openclaw/plugin-sdk/channel-contract"; -import type { TelegramActionConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { TelegramActionConfig } from "openclaw/plugin-sdk/config-types"; import { readStringValue } from "openclaw/plugin-sdk/text-runtime"; import { extractToolSend } from "openclaw/plugin-sdk/tool-send"; import { diff --git a/extensions/telegram/src/channel.ts b/extensions/telegram/src/channel.ts index bde70177450..c314889c07c 100644 --- a/extensions/telegram/src/channel.ts +++ b/extensions/telegram/src/channel.ts @@ -19,7 +19,7 @@ import { projectCredentialSnapshotFields, resolveConfiguredFromCredentialStatuses, } from "openclaw/plugin-sdk/channel-status"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { createChannelDirectoryAdapter } from "openclaw/plugin-sdk/directory-runtime"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { diff --git a/extensions/telegram/src/conversation-route.base-session-key.test.ts b/extensions/telegram/src/conversation-route.base-session-key.test.ts index b369947e09d..4df685afbdb 100644 --- a/extensions/telegram/src/conversation-route.base-session-key.test.ts +++ b/extensions/telegram/src/conversation-route.base-session-key.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing"; import { describe, expect, it } from "vitest"; import { resolveTelegramConversationBaseSessionKey } from "./conversation-route.js"; diff --git a/extensions/telegram/src/conversation-route.ts b/extensions/telegram/src/conversation-route.ts index f8249e4cc7b..0d6c25b7434 100644 --- a/extensions/telegram/src/conversation-route.ts +++ b/extensions/telegram/src/conversation-route.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveConfiguredBindingRoute, resolveRuntimeConversationBindingRoute, diff --git a/extensions/telegram/src/directory-config.ts b/extensions/telegram/src/directory-config.ts index 077be0bb1e5..b07939413a4 100644 --- a/extensions/telegram/src/directory-config.ts +++ b/extensions/telegram/src/directory-config.ts @@ -1,6 +1,6 @@ import { normalizeAccountId } from "openclaw/plugin-sdk/account-core"; import { mapAllowFromEntries } from "openclaw/plugin-sdk/channel-config-helpers"; -import type { OpenClawConfig, TelegramAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig, TelegramAccountConfig } from "openclaw/plugin-sdk/config-types"; import { createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-config-runtime"; import { mergeTelegramAccountConfig } from "./account-config.js"; import { resolveDefaultTelegramAccountSelection } from "./account-selection.js"; diff --git a/extensions/telegram/src/dm-access.ts b/extensions/telegram/src/dm-access.ts index d2a9be610d9..5bbdac1863a 100644 --- a/extensions/telegram/src/dm-access.ts +++ b/extensions/telegram/src/dm-access.ts @@ -1,7 +1,7 @@ import type { Message } from "@grammyjs/types"; import type { Bot } from "grammy"; import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing"; -import type { DmPolicy } from "openclaw/plugin-sdk/config-runtime"; +import type { DmPolicy } from "openclaw/plugin-sdk/config-types"; import { upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { withTelegramApiErrorLogging } from "./api-logging.js"; diff --git a/extensions/telegram/src/doctor-contract.ts b/extensions/telegram/src/doctor-contract.ts index d01601ad76f..907a3c2022a 100644 --- a/extensions/telegram/src/doctor-contract.ts +++ b/extensions/telegram/src/doctor-contract.ts @@ -2,7 +2,7 @@ import type { ChannelDoctorConfigMutation, ChannelDoctorLegacyConfigRule, } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { asObjectRecord, hasLegacyAccountStreamingAliases, diff --git a/extensions/telegram/src/doctor.test.ts b/extensions/telegram/src/doctor.test.ts index 8405e97e66e..63714606fa7 100644 --- a/extensions/telegram/src/doctor.test.ts +++ b/extensions/telegram/src/doctor.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { collectTelegramInvalidAllowFromWarnings, diff --git a/extensions/telegram/src/doctor.ts b/extensions/telegram/src/doctor.ts index aa0835c2233..74e969cbc72 100644 --- a/extensions/telegram/src/doctor.ts +++ b/extensions/telegram/src/doctor.ts @@ -2,7 +2,7 @@ import { type ChannelDoctorAdapter, type ChannelDoctorEmptyAllowlistAccountContext, } from "openclaw/plugin-sdk/channel-contract"; -import { type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { inspectTelegramAccount } from "./account-inspect.js"; diff --git a/extensions/telegram/src/draft-chunking.ts b/extensions/telegram/src/draft-chunking.ts index 0091eb05085..9f6c11d7e2e 100644 --- a/extensions/telegram/src/draft-chunking.ts +++ b/extensions/telegram/src/draft-chunking.ts @@ -1,5 +1,5 @@ import { resolveChannelStreamingPreviewChunk } from "openclaw/plugin-sdk/channel-streaming"; -import { type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking"; import { resolveAccountEntry } from "openclaw/plugin-sdk/routing"; import { normalizeAccountId } from "openclaw/plugin-sdk/routing"; diff --git a/extensions/telegram/src/error-policy.ts b/extensions/telegram/src/error-policy.ts index 322210de4a8..fb320a1633f 100644 --- a/extensions/telegram/src/error-policy.ts +++ b/extensions/telegram/src/error-policy.ts @@ -3,7 +3,7 @@ import type { TelegramDirectConfig, TelegramGroupConfig, TelegramTopicConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; export type TelegramErrorPolicy = "always" | "once" | "silent"; diff --git a/extensions/telegram/src/exec-approval-forwarding.ts b/extensions/telegram/src/exec-approval-forwarding.ts index 4150e381f71..91b5a6e3751 100644 --- a/extensions/telegram/src/exec-approval-forwarding.ts +++ b/extensions/telegram/src/exec-approval-forwarding.ts @@ -3,7 +3,7 @@ import { resolveExecApprovalRequestAllowedDecisions, resolveExecApprovalCommandDisplay, } from "openclaw/plugin-sdk/approval-reply-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ExecApprovalRequest } from "openclaw/plugin-sdk/infra-runtime"; import { normalizeMessageChannel } from "openclaw/plugin-sdk/routing"; import { isTelegramExecApprovalClientEnabled } from "./exec-approvals.js"; diff --git a/extensions/telegram/src/exec-approval-resolver.ts b/extensions/telegram/src/exec-approval-resolver.ts index b4e45a1f609..e8a36728c1c 100644 --- a/extensions/telegram/src/exec-approval-resolver.ts +++ b/extensions/telegram/src/exec-approval-resolver.ts @@ -1,5 +1,5 @@ import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ExecApprovalReplyDecision } from "openclaw/plugin-sdk/infra-runtime"; export type ResolveTelegramExecApprovalParams = { diff --git a/extensions/telegram/src/exec-approvals.test.ts b/extensions/telegram/src/exec-approvals.test.ts index e6a748faa90..e52d04fecdb 100644 --- a/extensions/telegram/src/exec-approvals.test.ts +++ b/extensions/telegram/src/exec-approvals.test.ts @@ -5,7 +5,7 @@ import type { OpenClawConfig, TelegramAccountConfig, TelegramExecApprovalConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it } from "vitest"; import { getTelegramExecApprovalApprovers, diff --git a/extensions/telegram/src/exec-approvals.ts b/extensions/telegram/src/exec-approvals.ts index 719a581118f..ba059a5cc1d 100644 --- a/extensions/telegram/src/exec-approvals.ts +++ b/extensions/telegram/src/exec-approvals.ts @@ -6,8 +6,8 @@ import { matchesApprovalRequestFilters, } from "openclaw/plugin-sdk/approval-client-runtime"; import { resolveApprovalRequestChannelAccountId } from "openclaw/plugin-sdk/approval-native-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { TelegramExecApprovalConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { TelegramExecApprovalConfig } from "openclaw/plugin-sdk/config-types"; import type { ExecApprovalRequest, PluginApprovalRequest } from "openclaw/plugin-sdk/infra-runtime"; import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; import { normalizeAccountId } from "openclaw/plugin-sdk/routing"; diff --git a/extensions/telegram/src/fetch.ts b/extensions/telegram/src/fetch.ts index 5827c598bee..d5501620e72 100644 --- a/extensions/telegram/src/fetch.ts +++ b/extensions/telegram/src/fetch.ts @@ -1,6 +1,6 @@ import { randomUUID } from "node:crypto"; import * as dns from "node:dns"; -import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { createPinnedLookup, diff --git a/extensions/telegram/src/format.ts b/extensions/telegram/src/format.ts index b77a4f28ccd..0eb092aa6a3 100644 --- a/extensions/telegram/src/format.ts +++ b/extensions/telegram/src/format.ts @@ -1,4 +1,4 @@ -import type { MarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import type { MarkdownTableMode } from "openclaw/plugin-sdk/config-types"; import { FILE_REF_EXTENSIONS_WITH_TLD, isAutoLinkedFileRef, diff --git a/extensions/telegram/src/group-access.base-access.test.ts b/extensions/telegram/src/group-access.base-access.test.ts index ed48c363198..cdaa46330a2 100644 --- a/extensions/telegram/src/group-access.base-access.test.ts +++ b/extensions/telegram/src/group-access.base-access.test.ts @@ -1,5 +1,5 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { normalizeAllowFrom, type NormalizedAllowFrom } from "./bot-access.js"; import { diff --git a/extensions/telegram/src/group-access.ts b/extensions/telegram/src/group-access.ts index d4802a9f0cf..5ed4fb7c0c9 100644 --- a/extensions/telegram/src/group-access.ts +++ b/extensions/telegram/src/group-access.ts @@ -1,13 +1,13 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { ChannelGroupPolicy } from "openclaw/plugin-sdk/config-runtime"; -import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { ChannelGroupPolicy } from "openclaw/plugin-sdk/config-types"; import type { TelegramAccountConfig, TelegramDirectConfig, TelegramGroupConfig, TelegramTopicConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; import { evaluateMatchedGroupAccessForPolicy } from "openclaw/plugin-sdk/group-access"; +import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy"; import { isSenderAllowed, type NormalizedAllowFrom } from "./bot-access.js"; import { firstDefined } from "./bot-access.js"; diff --git a/extensions/telegram/src/group-config-helpers.ts b/extensions/telegram/src/group-config-helpers.ts index 8c0f4652282..0959ee3460a 100644 --- a/extensions/telegram/src/group-config-helpers.ts +++ b/extensions/telegram/src/group-config-helpers.ts @@ -2,7 +2,7 @@ import type { TelegramDirectConfig, TelegramGroupConfig, TelegramTopicConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; import { firstDefined } from "./bot-access.js"; export function resolveTelegramGroupPromptSettings(params: { diff --git a/extensions/telegram/src/group-migration.ts b/extensions/telegram/src/group-migration.ts index 11043b822e8..fbdc0f23c89 100644 --- a/extensions/telegram/src/group-migration.ts +++ b/extensions/telegram/src/group-migration.ts @@ -1,5 +1,5 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { TelegramGroupConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { TelegramGroupConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeAccountId } from "openclaw/plugin-sdk/routing"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/telegram/src/group-policy.test.ts b/extensions/telegram/src/group-policy.test.ts index e121f2b073c..4178a9bb8d0 100644 --- a/extensions/telegram/src/group-policy.test.ts +++ b/extensions/telegram/src/group-policy.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { resolveTelegramGroupRequireMention, diff --git a/extensions/telegram/src/inline-buttons.ts b/extensions/telegram/src/inline-buttons.ts index e2bbaa70604..5446782a8f5 100644 --- a/extensions/telegram/src/inline-buttons.ts +++ b/extensions/telegram/src/inline-buttons.ts @@ -1,5 +1,5 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { TelegramInlineButtonsScope } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { TelegramInlineButtonsScope } from "openclaw/plugin-sdk/config-types"; import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, diff --git a/extensions/telegram/src/monitor.ts b/extensions/telegram/src/monitor.ts index 8f30c8bd70b..459f9b2976e 100644 --- a/extensions/telegram/src/monitor.ts +++ b/extensions/telegram/src/monitor.ts @@ -1,9 +1,9 @@ import type { RunOptions } from "@grammyjs/runner"; import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime"; import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context"; -import { resolveAgentMaxConcurrent } from "openclaw/plugin-sdk/config-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { getRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import { resolveAgentMaxConcurrent } from "openclaw/plugin-sdk/model-session-runtime"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { waitForAbortSignal } from "openclaw/plugin-sdk/runtime-env"; import { registerUnhandledRejectionHandler } from "openclaw/plugin-sdk/runtime-env"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; diff --git a/extensions/telegram/src/monitor.types.ts b/extensions/telegram/src/monitor.types.ts index 0a9834e333a..198bae18f09 100644 --- a/extensions/telegram/src/monitor.types.ts +++ b/extensions/telegram/src/monitor.types.ts @@ -2,7 +2,7 @@ import type { ChannelAccountSnapshot, ChannelRuntimeSurface, } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; export type MonitorTelegramOpts = { diff --git a/extensions/telegram/src/network-config.test.ts b/extensions/telegram/src/network-config.test.ts index 000bd340ef6..c0a9b978d48 100644 --- a/extensions/telegram/src/network-config.test.ts +++ b/extensions/telegram/src/network-config.test.ts @@ -1,4 +1,4 @@ -import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; vi.mock("openclaw/plugin-sdk/runtime-env", () => ({ diff --git a/extensions/telegram/src/network-config.ts b/extensions/telegram/src/network-config.ts index 34c60bb0e46..0ea6790b2ab 100644 --- a/extensions/telegram/src/network-config.ts +++ b/extensions/telegram/src/network-config.ts @@ -1,5 +1,5 @@ import process from "node:process"; -import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/config-types"; import { isTruthyEnvValue, isWSL2Sync } from "openclaw/plugin-sdk/runtime-env"; import { normalizeOptionalLowercaseString } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/telegram/src/probe.ts b/extensions/telegram/src/probe.ts index 1deeb9ac8a2..32382b77a89 100644 --- a/extensions/telegram/src/probe.ts +++ b/extensions/telegram/src/probe.ts @@ -1,5 +1,5 @@ import type { BaseProbeResult } from "openclaw/plugin-sdk/channel-contract"; -import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { fetchWithTimeout } from "openclaw/plugin-sdk/text-runtime"; import { resolveTelegramApiBase, resolveTelegramFetch } from "./fetch.js"; diff --git a/extensions/telegram/src/reaction-level.test.ts b/extensions/telegram/src/reaction-level.test.ts index c9cb0c7bb74..7387f2e271d 100644 --- a/extensions/telegram/src/reaction-level.test.ts +++ b/extensions/telegram/src/reaction-level.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterAll, beforeAll, describe, expect, it } from "vitest"; import { resolveTelegramReactionLevel } from "./reaction-level.js"; diff --git a/extensions/telegram/src/reaction-level.ts b/extensions/telegram/src/reaction-level.ts index 3f33277d19a..3374673bb8f 100644 --- a/extensions/telegram/src/reaction-level.ts +++ b/extensions/telegram/src/reaction-level.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveReactionLevel, type ReactionLevel, diff --git a/extensions/telegram/src/send.runtime.ts b/extensions/telegram/src/send.runtime.ts index b1fc9164f46..760f15e9c2c 100644 --- a/extensions/telegram/src/send.runtime.ts +++ b/extensions/telegram/src/send.runtime.ts @@ -1,5 +1,6 @@ -export { requireRuntimeConfig, resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; +export { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type { PollInput, MediaKind } from "openclaw/plugin-sdk/media-runtime"; export { buildOutboundMediaLoadOptions, diff --git a/extensions/telegram/src/send.test-harness.ts b/extensions/telegram/src/send.test-harness.ts index 2ce554ee52e..fd8d1e308e1 100644 --- a/extensions/telegram/src/send.test-harness.ts +++ b/extensions/telegram/src/send.test-harness.ts @@ -1,4 +1,4 @@ -import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-runtime"; import { buildOutboundMediaLoadOptions, isGifMedia, diff --git a/extensions/telegram/src/sent-message-cache.ts b/extensions/telegram/src/sent-message-cache.ts index eeff10d0611..46a2fefcea6 100644 --- a/extensions/telegram/src/sent-message-cache.ts +++ b/extensions/telegram/src/sent-message-cache.ts @@ -1,7 +1,8 @@ import fs from "node:fs"; import path from "node:path"; -import { resolveStorePath, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; +import { resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime"; const TTL_MS = 24 * 60 * 60 * 1000; const TELEGRAM_SENT_MESSAGES_STATE_KEY = Symbol.for("openclaw.telegramSentMessagesState"); diff --git a/extensions/telegram/src/setup-surface.test.ts b/extensions/telegram/src/setup-surface.test.ts index 87582931e8c..45ae3536cd6 100644 --- a/extensions/telegram/src/setup-surface.test.ts +++ b/extensions/telegram/src/setup-surface.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/setup"; import { describe, expect, it, vi } from "vitest"; import { diff --git a/extensions/telegram/src/shared.test.ts b/extensions/telegram/src/shared.test.ts index 942b02aa91a..601f0a7a9ac 100644 --- a/extensions/telegram/src/shared.test.ts +++ b/extensions/telegram/src/shared.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import type { ResolvedTelegramAccount } from "./accounts.js"; import { createTelegramPluginBase } from "./shared.js"; diff --git a/extensions/telegram/src/shared.ts b/extensions/telegram/src/shared.ts index a0cdc6404e0..ae547b7c205 100644 --- a/extensions/telegram/src/shared.ts +++ b/extensions/telegram/src/shared.ts @@ -7,7 +7,7 @@ import { } from "openclaw/plugin-sdk/channel-config-helpers"; import { createChannelPluginBase, type ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; import { getChatChannelMeta } from "openclaw/plugin-sdk/channel-plugin-common"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/routing"; import { inspectTelegramAccount } from "./account-inspect.js"; import { diff --git a/extensions/telegram/src/state-migrations.ts b/extensions/telegram/src/state-migrations.ts index 455d5a77126..238fdc0230e 100644 --- a/extensions/telegram/src/state-migrations.ts +++ b/extensions/telegram/src/state-migrations.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import type { ChannelLegacyStateMigrationPlan } from "openclaw/plugin-sdk/channel-contract"; import { resolveChannelAllowFromPath } from "openclaw/plugin-sdk/channel-pairing-paths"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveDefaultTelegramAccountId } from "./account-selection.js"; function fileExists(pathValue: string): boolean { diff --git a/extensions/telegram/src/sticker-cache.ts b/extensions/telegram/src/sticker-cache.ts index 251cdcb4835..a759c243464 100644 --- a/extensions/telegram/src/sticker-cache.ts +++ b/extensions/telegram/src/sticker-cache.ts @@ -6,7 +6,7 @@ import { modelSupportsVision, } from "openclaw/plugin-sdk/agent-runtime"; import { resolveDefaultModelForAgent } from "openclaw/plugin-sdk/agent-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveAutoImageModel } from "openclaw/plugin-sdk/media-runtime"; import { resolveAutoMediaKeyProviders, diff --git a/extensions/telegram/src/sticker-vision.runtime.ts b/extensions/telegram/src/sticker-vision.runtime.ts index 8bc56dbd643..faa9179acd4 100644 --- a/extensions/telegram/src/sticker-vision.runtime.ts +++ b/extensions/telegram/src/sticker-vision.runtime.ts @@ -4,7 +4,7 @@ import { modelSupportsVision, resolveDefaultModelForAgent, } from "openclaw/plugin-sdk/agent-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export async function resolveStickerVisionSupportRuntime(params: { cfg: OpenClawConfig; diff --git a/extensions/telegram/src/target-writeback.ts b/extensions/telegram/src/target-writeback.ts index ee81d66833d..6d0753ff1a4 100644 --- a/extensions/telegram/src/target-writeback.ts +++ b/extensions/telegram/src/target-writeback.ts @@ -1,13 +1,13 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; import { readConfigFileSnapshotForWrite, replaceConfigFile, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-mutation"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { loadCronStore, resolveCronStorePath, saveCronStore, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/cron-store-runtime"; import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env"; import { normalizeLowercaseStringOrEmpty, diff --git a/extensions/telegram/src/thread-bindings.test.ts b/extensions/telegram/src/thread-bindings.test.ts index b7e4e5904cc..a76f19265f1 100644 --- a/extensions/telegram/src/thread-bindings.test.ts +++ b/extensions/telegram/src/thread-bindings.test.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { getSessionBindingService } from "openclaw/plugin-sdk/conversation-runtime"; import { resolveStateDir } from "openclaw/plugin-sdk/state-paths"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/extensions/telegram/src/thread-bindings.ts b/extensions/telegram/src/thread-bindings.ts index c03db717d9f..7f02435c7f5 100644 --- a/extensions/telegram/src/thread-bindings.ts +++ b/extensions/telegram/src/thread-bindings.ts @@ -2,7 +2,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; import { readAcpSessionEntry } from "openclaw/plugin-sdk/acp-runtime"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatThreadBindingDurationLabel, registerSessionBindingAdapter, diff --git a/extensions/telegram/src/threading-tool-context.test.ts b/extensions/telegram/src/threading-tool-context.test.ts index ab19b884ff6..f95569e7f32 100644 --- a/extensions/telegram/src/threading-tool-context.test.ts +++ b/extensions/telegram/src/threading-tool-context.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { buildTelegramThreadingToolContext } from "./threading-tool-context.js"; diff --git a/extensions/telegram/src/threading-tool-context.ts b/extensions/telegram/src/threading-tool-context.ts index dc9b248686e..3033242f4ee 100644 --- a/extensions/telegram/src/threading-tool-context.ts +++ b/extensions/telegram/src/threading-tool-context.ts @@ -2,7 +2,7 @@ import type { ChannelThreadingContext, ChannelThreadingToolContext, } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { parseTelegramTarget } from "./targets.js"; diff --git a/extensions/telegram/src/token.test.ts b/extensions/telegram/src/token.test.ts index 932098421d8..54596e2a8e5 100644 --- a/extensions/telegram/src/token.test.ts +++ b/extensions/telegram/src/token.test.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { afterEach, describe, expect, it, vi } from "vitest"; import { withStateDirEnv } from "../../../src/test-helpers/state-dir-env.js"; import { resolveTelegramToken } from "./token.js"; diff --git a/extensions/telegram/src/token.ts b/extensions/telegram/src/token.ts index 3dd593cf2ac..a3b54beeaf8 100644 --- a/extensions/telegram/src/token.ts +++ b/extensions/telegram/src/token.ts @@ -1,8 +1,8 @@ import { resolveNormalizedAccountEntry } from "openclaw/plugin-sdk/account-core"; import type { BaseTokenResolution } from "openclaw/plugin-sdk/channel-contract"; import { tryReadSecretFileSync } from "openclaw/plugin-sdk/channel-core"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { TelegramAccountConfig } from "openclaw/plugin-sdk/config-types"; import { resolveDefaultSecretProviderAlias } from "openclaw/plugin-sdk/provider-auth"; import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing"; import { diff --git a/extensions/telegram/src/webhook.ts b/extensions/telegram/src/webhook.ts index 47a0aeb60b8..abef596c0d7 100644 --- a/extensions/telegram/src/webhook.ts +++ b/extensions/telegram/src/webhook.ts @@ -2,7 +2,7 @@ import { createServer } from "node:http"; import type { IncomingMessage } from "node:http"; import net from "node:net"; import * as grammy from "grammy"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { isDiagnosticsEnabled } from "openclaw/plugin-sdk/diagnostic-runtime"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { defaultRuntime } from "openclaw/plugin-sdk/runtime-env"; diff --git a/extensions/thread-ownership/api.ts b/extensions/thread-ownership/api.ts index 6be7975e16a..babf1db1635 100644 --- a/extensions/thread-ownership/api.ts +++ b/extensions/thread-ownership/api.ts @@ -1,4 +1,4 @@ -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { definePluginEntry, type OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry"; export { fetchWithSsrFGuard, diff --git a/extensions/thread-ownership/index.ts b/extensions/thread-ownership/index.ts index ee416a86592..2995b02d6e0 100644 --- a/extensions/thread-ownership/index.ts +++ b/extensions/thread-ownership/index.ts @@ -1,4 +1,4 @@ -import { resolveLivePluginConfigObject } from "openclaw/plugin-sdk/config-runtime"; +import { resolveLivePluginConfigObject } from "openclaw/plugin-sdk/plugin-config-runtime"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { definePluginEntry, diff --git a/extensions/tlon/runtime-api.ts b/extensions/tlon/runtime-api.ts index 35f278592db..c9647d8c5d2 100644 --- a/extensions/tlon/runtime-api.ts +++ b/extensions/tlon/runtime-api.ts @@ -2,7 +2,7 @@ // Keep this barrel thin and aligned with the local extension surface. export type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime"; export { createDedupeCache } from "openclaw/plugin-sdk/core"; export { createLoggerBackedRuntime } from "./src/logger-runtime.js"; diff --git a/extensions/tlon/src/channel.runtime.ts b/extensions/tlon/src/channel.runtime.ts index 923a7ba33e0..74dd1ac62f9 100644 --- a/extensions/tlon/src/channel.runtime.ts +++ b/extensions/tlon/src/channel.runtime.ts @@ -1,7 +1,7 @@ import crypto from "node:crypto"; import type { ChannelAccountSnapshot } from "openclaw/plugin-sdk/channel-contract"; import type { ChannelOutboundAdapter } from "openclaw/plugin-sdk/channel-send-result"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { ChannelPlugin } from "openclaw/plugin-sdk/core"; import { monitorTlonProvider } from "./monitor/index.js"; import { tlonSetupWizard } from "./setup-surface.js"; diff --git a/extensions/tlon/src/monitor/authorization.ts b/extensions/tlon/src/monitor/authorization.ts index b45baf0e39a..bd1965a576a 100644 --- a/extensions/tlon/src/monitor/authorization.ts +++ b/extensions/tlon/src/monitor/authorization.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { TlonSettingsStore } from "../settings.js"; type ChannelAuthorization = { diff --git a/extensions/tlon/src/types.ts b/extensions/tlon/src/types.ts index b758d51c99f..a2e6a4ff059 100644 --- a/extensions/tlon/src/types.ts +++ b/extensions/tlon/src/types.ts @@ -4,7 +4,7 @@ import { normalizeAccountId, resolveMergedAccountConfig, } from "openclaw/plugin-sdk/account-resolution"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { hasLegacyFlatAllowPrivateNetworkAlias, isPrivateNetworkOptInEnabled, diff --git a/extensions/tts-local-cli/speech-provider.test.ts b/extensions/tts-local-cli/speech-provider.test.ts index 2457e7fac14..75b09ee8f1c 100644 --- a/extensions/tts-local-cli/speech-provider.test.ts +++ b/extensions/tts-local-cli/speech-provider.test.ts @@ -1,7 +1,7 @@ import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { SpeechProviderConfig, SpeechSynthesisRequest } from "openclaw/plugin-sdk/speech-core"; import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; diff --git a/extensions/twitch/runtime-api.ts b/extensions/twitch/runtime-api.ts index 296b534afe6..a29dd560223 100644 --- a/extensions/twitch/runtime-api.ts +++ b/extensions/twitch/runtime-api.ts @@ -17,6 +17,6 @@ export type { } from "openclaw/plugin-sdk/channel-contract"; export type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; export type { OutboundDeliveryResult } from "openclaw/plugin-sdk/channel-send-result"; -export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime"; export type { WizardPrompter } from "openclaw/plugin-sdk/setup"; diff --git a/extensions/twitch/src/config.ts b/extensions/twitch/src/config.ts index bc653d93108..a1d1aecc4d7 100644 --- a/extensions/twitch/src/config.ts +++ b/extensions/twitch/src/config.ts @@ -3,7 +3,7 @@ import { normalizeAccountId, resolveNormalizedAccountEntry, } from "openclaw/plugin-sdk/account-resolution"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveTwitchToken, type TwitchTokenResolution } from "./token.js"; import type { TwitchAccountConfig } from "./types.js"; import { isAccountConfigured } from "./utils/twitch.js"; diff --git a/extensions/twitch/src/monitor.ts b/extensions/twitch/src/monitor.ts index 8ba8d14246d..27cb2be3dfd 100644 --- a/extensions/twitch/src/monitor.ts +++ b/extensions/twitch/src/monitor.ts @@ -6,7 +6,7 @@ */ import { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline"; -import type { MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/twitch/src/plugin.ts b/extensions/twitch/src/plugin.ts index d1e35986f80..aa81e28aaa6 100644 --- a/extensions/twitch/src/plugin.ts +++ b/extensions/twitch/src/plugin.ts @@ -12,7 +12,7 @@ import { createLoggedPairingApprovalNotifier, createPairingPrefixStripper, } from "openclaw/plugin-sdk/channel-pairing"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { buildPassiveProbedChannelStatusSummary } from "openclaw/plugin-sdk/extension-shared"; import { createComputedAccountStatusAdapter, diff --git a/extensions/twitch/src/send.ts b/extensions/twitch/src/send.ts index 9f4277f2a15..b7c431cbca4 100644 --- a/extensions/twitch/src/send.ts +++ b/extensions/twitch/src/send.ts @@ -5,7 +5,7 @@ * They support dependency injection via the `deps` parameter for testability. */ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { getClientManager as getRegistryClientManager } from "./client-manager-registry.js"; import { resolveTwitchAccountContext } from "./config.js"; diff --git a/extensions/twitch/src/token.ts b/extensions/twitch/src/token.ts index 13ef6ec20c2..9fd3122d739 100644 --- a/extensions/twitch/src/token.ts +++ b/extensions/twitch/src/token.ts @@ -14,7 +14,7 @@ import { normalizeAccountId, resolveNormalizedAccountEntry, } from "openclaw/plugin-sdk/account-resolution"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type TwitchTokenSource = "env" | "config" | "none"; diff --git a/extensions/twitch/src/twitch-client.ts b/extensions/twitch/src/twitch-client.ts index c662cea8c8f..30a9ac71398 100644 --- a/extensions/twitch/src/twitch-client.ts +++ b/extensions/twitch/src/twitch-client.ts @@ -1,6 +1,6 @@ import { RefreshingAuthProvider, StaticAuthProvider } from "@twurple/auth"; import { ChatClient, LogLevel } from "@twurple/chat"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { resolveTwitchToken } from "./token.js"; import type { ChannelLogSink, TwitchAccountConfig, TwitchChatMessage } from "./types.js"; diff --git a/extensions/vllm/models.ts b/extensions/vllm/models.ts index 1b1c886e15f..13b04f25940 100644 --- a/extensions/vllm/models.ts +++ b/extensions/vllm/models.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { discoverOpenAICompatibleLocalModels } from "openclaw/plugin-sdk/provider-setup"; import { VLLM_DEFAULT_BASE_URL, VLLM_PROVIDER_LABEL } from "./defaults.js"; diff --git a/extensions/voice-call/src/response-generator.ts b/extensions/voice-call/src/response-generator.ts index 249488b244e..83c9aaa6de2 100644 --- a/extensions/voice-call/src/response-generator.ts +++ b/extensions/voice-call/src/response-generator.ts @@ -4,7 +4,7 @@ */ import crypto from "node:crypto"; -import { applyModelOverrideToSessionEntry } from "openclaw/plugin-sdk/config-runtime"; +import { applyModelOverrideToSessionEntry } from "openclaw/plugin-sdk/model-session-runtime"; import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime"; import type { SessionEntry } from "../api.js"; import type { VoiceCallConfig } from "./config.js"; diff --git a/extensions/voice-call/src/runtime.ts b/extensions/voice-call/src/runtime.ts index 5ba24172fd7..6ffbaad291d 100644 --- a/extensions/voice-call/src/runtime.ts +++ b/extensions/voice-call/src/runtime.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { consultRealtimeVoiceAgent, diff --git a/extensions/voice-call/src/webhook.ts b/extensions/voice-call/src/webhook.ts index 24b3a908878..0d04dc75da0 100644 --- a/extensions/voice-call/src/webhook.ts +++ b/extensions/voice-call/src/webhook.ts @@ -1,6 +1,6 @@ import http from "node:http"; import { URL } from "node:url"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveConfiguredCapabilityProvider } from "openclaw/plugin-sdk/provider-selection-runtime"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { diff --git a/extensions/vydra/shared.ts b/extensions/vydra/shared.ts index f1f526b660f..5ef6f81f871 100644 --- a/extensions/vydra/shared.ts +++ b/extensions/vydra/shared.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveApiKeyForProvider } from "openclaw/plugin-sdk/provider-auth-runtime"; import { assertOkOrThrowHttpError, diff --git a/extensions/webhooks/runtime-api.ts b/extensions/webhooks/runtime-api.ts index 37713b698d8..3148e4a5b55 100644 --- a/extensions/webhooks/runtime-api.ts +++ b/extensions/webhooks/runtime-api.ts @@ -11,7 +11,5 @@ export { WEBHOOK_RATE_LIMIT_DEFAULTS, type WebhookInFlightLimiter, } from "openclaw/plugin-sdk/webhook-ingress"; -export { - resolveConfiguredSecretInputString, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +export { resolveConfiguredSecretInputString } from "openclaw/plugin-sdk/secret-input-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; diff --git a/extensions/whatsapp/auth-presence.ts b/extensions/whatsapp/auth-presence.ts index 0b79bf777b2..8aaa14c86b7 100644 --- a/extensions/whatsapp/auth-presence.ts +++ b/extensions/whatsapp/auth-presence.ts @@ -2,7 +2,7 @@ import fs from "node:fs"; import path from "node:path"; import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id"; import { resolveUserPath } from "openclaw/plugin-sdk/account-resolution"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveOAuthDir } from "openclaw/plugin-sdk/state-paths"; import { hasWebCredsSync } from "./src/creds-files.js"; diff --git a/extensions/whatsapp/src/account-types.ts b/extensions/whatsapp/src/account-types.ts index 2a031144384..9629a0ba4de 100644 --- a/extensions/whatsapp/src/account-types.ts +++ b/extensions/whatsapp/src/account-types.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export type WhatsAppAccountConfig = NonNullable< NonNullable["whatsapp"]>["accounts"] diff --git a/extensions/whatsapp/src/accounts.ts b/extensions/whatsapp/src/accounts.ts index 58401ae3c42..e6c8101f725 100644 --- a/extensions/whatsapp/src/accounts.ts +++ b/extensions/whatsapp/src/accounts.ts @@ -6,7 +6,7 @@ import { resolveUserPath, type OpenClawConfig, } from "openclaw/plugin-sdk/account-core"; -import type { DmPolicy, GroupPolicy, ReplyToMode } from "openclaw/plugin-sdk/config-runtime"; +import type { DmPolicy, GroupPolicy, ReplyToMode } from "openclaw/plugin-sdk/config-types"; import { resolveOAuthDir } from "openclaw/plugin-sdk/state-paths"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { resolveMergedWhatsAppAccountConfig } from "./account-config.js"; diff --git a/extensions/whatsapp/src/action-runtime-target-auth.ts b/extensions/whatsapp/src/action-runtime-target-auth.ts index 77bad1fabb3..1085a1edc9c 100644 --- a/extensions/whatsapp/src/action-runtime-target-auth.ts +++ b/extensions/whatsapp/src/action-runtime-target-auth.ts @@ -1,5 +1,5 @@ import { ToolAuthorizationError } from "openclaw/plugin-sdk/channel-actions"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveWhatsAppAccount } from "./accounts.js"; import { resolveWhatsAppOutboundTarget } from "./resolve-outbound-target.js"; diff --git a/extensions/whatsapp/src/action-runtime.test.ts b/extensions/whatsapp/src/action-runtime.test.ts index a741cb91391..8ab7ff911c4 100644 --- a/extensions/whatsapp/src/action-runtime.test.ts +++ b/extensions/whatsapp/src/action-runtime.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/routing"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { handleWhatsAppAction, whatsAppActionRuntime } from "./action-runtime.js"; diff --git a/extensions/whatsapp/src/action-runtime.ts b/extensions/whatsapp/src/action-runtime.ts index 9c812d03c56..3251a9cfec1 100644 --- a/extensions/whatsapp/src/action-runtime.ts +++ b/extensions/whatsapp/src/action-runtime.ts @@ -5,7 +5,7 @@ import { readReactionParams, readStringParam, } from "openclaw/plugin-sdk/channel-actions"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveAuthorizedWhatsAppOutboundTarget } from "./action-runtime-target-auth.js"; import { resolveWhatsAppReactionLevel } from "./reaction-level.js"; import { sendReactionWhatsApp } from "./send.js"; diff --git a/extensions/whatsapp/src/active-listener.ts b/extensions/whatsapp/src/active-listener.ts index 26336c17c79..96bda4a9f0d 100644 --- a/extensions/whatsapp/src/active-listener.ts +++ b/extensions/whatsapp/src/active-listener.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveDefaultWhatsAppAccountId } from "./account-ids.js"; import { getRegisteredWhatsAppConnectionController } from "./connection-controller-registry.js"; import type { ActiveWebListener, ActiveWebSendOptions } from "./inbound/types.js"; diff --git a/extensions/whatsapp/src/auto-reply.broadcast-groups.combined.test.ts b/extensions/whatsapp/src/auto-reply.broadcast-groups.combined.test.ts index 85d04adc245..dd1c2c5f5a5 100644 --- a/extensions/whatsapp/src/auto-reply.broadcast-groups.combined.test.ts +++ b/extensions/whatsapp/src/auto-reply.broadcast-groups.combined.test.ts @@ -1,5 +1,5 @@ import "./test-helpers.js"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it, vi } from "vitest"; import { monitorWebChannelWithCapture, diff --git a/extensions/whatsapp/src/auto-reply.web-auto-reply.connection-and-logging.e2e.test.ts b/extensions/whatsapp/src/auto-reply.web-auto-reply.connection-and-logging.e2e.test.ts index 6585de0c481..6d9986deaa2 100644 --- a/extensions/whatsapp/src/auto-reply.web-auto-reply.connection-and-logging.e2e.test.ts +++ b/extensions/whatsapp/src/auto-reply.web-auto-reply.connection-and-logging.e2e.test.ts @@ -1,7 +1,7 @@ import "./test-helpers.js"; import crypto from "node:crypto"; import fs from "node:fs/promises"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { setLoggerOverride } from "openclaw/plugin-sdk/runtime-env"; import { withEnvAsync } from "openclaw/plugin-sdk/testing"; import { beforeAll, describe, expect, it, vi } from "vitest"; diff --git a/extensions/whatsapp/src/auto-reply.web-auto-reply.last-route.test.ts b/extensions/whatsapp/src/auto-reply.web-auto-reply.last-route.test.ts index 201a213a1d2..dacf273b181 100644 --- a/extensions/whatsapp/src/auto-reply.web-auto-reply.last-route.test.ts +++ b/extensions/whatsapp/src/auto-reply.web-auto-reply.last-route.test.ts @@ -1,5 +1,5 @@ import "./test-helpers.js"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { installWebAutoReplyUnitTestHooks, makeSessionStore } from "./auto-reply.test-harness.js"; diff --git a/extensions/whatsapp/src/auto-reply/config.runtime.ts b/extensions/whatsapp/src/auto-reply/config.runtime.ts index a2039033a0e..19e852d8c81 100644 --- a/extensions/whatsapp/src/auto-reply/config.runtime.ts +++ b/extensions/whatsapp/src/auto-reply/config.runtime.ts @@ -1,12 +1,7 @@ export { evaluateSessionFreshness, - getRuntimeConfig, - getRuntimeConfigSourceSnapshot, loadSessionStore, recordSessionMetaFromInbound, - resolveChannelContextVisibilityMode, - resolveChannelGroupPolicy, - resolveChannelGroupRequireMention, resolveGroupSessionKey, resolveSessionKey, resolveSessionResetPolicy, @@ -15,4 +10,13 @@ export { resolveThreadFlag, resolveChannelResetConfig, updateLastRoute, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/session-store-runtime"; +export { + getRuntimeConfig, + getRuntimeConfigSourceSnapshot, +} from "openclaw/plugin-sdk/runtime-config-snapshot"; +export { resolveChannelContextVisibilityMode } from "openclaw/plugin-sdk/context-visibility-runtime"; +export { + resolveChannelGroupPolicy, + resolveChannelGroupRequireMention, +} from "openclaw/plugin-sdk/channel-policy"; diff --git a/extensions/whatsapp/src/auto-reply/deliver-reply.ts b/extensions/whatsapp/src/auto-reply/deliver-reply.ts index 03768490536..3c4adcd415f 100644 --- a/extensions/whatsapp/src/auto-reply/deliver-reply.ts +++ b/extensions/whatsapp/src/auto-reply/deliver-reply.ts @@ -1,4 +1,4 @@ -import type { MarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +import type { MarkdownTableMode } from "openclaw/plugin-sdk/config-types"; import { chunkMarkdownTextWithMode, type ChunkMode } from "openclaw/plugin-sdk/reply-chunking"; import type { ReplyPayload } from "openclaw/plugin-sdk/reply-chunking"; import { diff --git a/extensions/whatsapp/src/auto-reply/heartbeat-runner.runtime.ts b/extensions/whatsapp/src/auto-reply/heartbeat-runner.runtime.ts index 33fe5c217a7..fe05639ec3c 100644 --- a/extensions/whatsapp/src/auto-reply/heartbeat-runner.runtime.ts +++ b/extensions/whatsapp/src/auto-reply/heartbeat-runner.runtime.ts @@ -1,12 +1,12 @@ export { appendCronStyleCurrentTimeLine } from "openclaw/plugin-sdk/agent-runtime"; export { canonicalizeMainSessionAlias, - getRuntimeConfig, loadSessionStore, resolveSessionKey, resolveStorePath, updateSessionStore, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/session-store-runtime"; +export { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; export { emitHeartbeatEvent, resolveHeartbeatVisibility, diff --git a/extensions/whatsapp/src/auto-reply/mentions.ts b/extensions/whatsapp/src/auto-reply/mentions.ts index a1756a4f5ee..1c5af35f895 100644 --- a/extensions/whatsapp/src/auto-reply/mentions.ts +++ b/extensions/whatsapp/src/auto-reply/mentions.ts @@ -2,7 +2,7 @@ import { buildMentionRegexes, normalizeMentionText, } from "openclaw/plugin-sdk/channel-mention-gating"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { getComparableIdentityValues, getMentionIdentities, diff --git a/extensions/whatsapp/src/auto-reply/monitor/ack-reaction.test.ts b/extensions/whatsapp/src/auto-reply/monitor/ack-reaction.test.ts index 1bfb5beaaed..603975296c8 100644 --- a/extensions/whatsapp/src/auto-reply/monitor/ack-reaction.test.ts +++ b/extensions/whatsapp/src/auto-reply/monitor/ack-reaction.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeEach, describe, expect, it, vi } from "vitest"; import type { WebInboundMessage } from "../../inbound/types.js"; import { maybeSendAckReaction } from "./ack-reaction.js"; diff --git a/extensions/whatsapp/src/auto-reply/monitor/ack-reaction.ts b/extensions/whatsapp/src/auto-reply/monitor/ack-reaction.ts index 1ac353e161d..659e6956a90 100644 --- a/extensions/whatsapp/src/auto-reply/monitor/ack-reaction.ts +++ b/extensions/whatsapp/src/auto-reply/monitor/ack-reaction.ts @@ -3,7 +3,7 @@ import { shouldAckReactionForWhatsApp, type AckReactionHandle, } from "openclaw/plugin-sdk/channel-feedback"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { logVerbose } from "openclaw/plugin-sdk/runtime-env"; import { getSenderIdentity } from "../../identity.js"; import { resolveWhatsAppReactionLevel } from "../../reaction-level.js"; diff --git a/extensions/whatsapp/src/auto-reply/monitor/broadcast.ts b/extensions/whatsapp/src/auto-reply/monitor/broadcast.ts index b43e40553c7..ac0aeb3a03d 100644 --- a/extensions/whatsapp/src/auto-reply/monitor/broadcast.ts +++ b/extensions/whatsapp/src/auto-reply/monitor/broadcast.ts @@ -1,5 +1,5 @@ import type { AckReactionHandle } from "openclaw/plugin-sdk/channel-feedback"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { resolveAgentRoute } from "openclaw/plugin-sdk/routing"; import { buildAgentSessionKey, deriveLastRoutePolicy } from "openclaw/plugin-sdk/routing"; import { diff --git a/extensions/whatsapp/src/auto-reply/monitor/group-activation.ts b/extensions/whatsapp/src/auto-reply/monitor/group-activation.ts index 0c3e934689e..be033f6982a 100644 --- a/extensions/whatsapp/src/auto-reply/monitor/group-activation.ts +++ b/extensions/whatsapp/src/auto-reply/monitor/group-activation.ts @@ -1,6 +1,6 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { updateSessionStore } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing"; +import { updateSessionStore } from "openclaw/plugin-sdk/session-store-runtime"; import { resolveWhatsAppLegacyGroupSessionKey } from "../../group-session-key.js"; import { resolveWhatsAppInboundPolicy } from "../../inbound-policy.js"; import { loadSessionStore, resolveStorePath } from "../config.runtime.js"; diff --git a/extensions/whatsapp/src/auto-reply/monitor/group-gating.ts b/extensions/whatsapp/src/auto-reply/monitor/group-gating.ts index 3c6c9768612..486dd8b878c 100644 --- a/extensions/whatsapp/src/auto-reply/monitor/group-gating.ts +++ b/extensions/whatsapp/src/auto-reply/monitor/group-gating.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { getPrimaryIdentityId, getReplyContext, diff --git a/extensions/whatsapp/src/auto-reply/monitor/last-route.ts b/extensions/whatsapp/src/auto-reply/monitor/last-route.ts index 300fd921fd0..f6ae7ccca7b 100644 --- a/extensions/whatsapp/src/auto-reply/monitor/last-route.ts +++ b/extensions/whatsapp/src/auto-reply/monitor/last-route.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { MsgContext } from "openclaw/plugin-sdk/reply-runtime"; import { formatError } from "../../session.js"; import { resolveStorePath, updateLastRoute } from "../config.runtime.js"; diff --git a/extensions/whatsapp/src/auto-reply/monitor/message-line.runtime.ts b/extensions/whatsapp/src/auto-reply/monitor/message-line.runtime.ts index 98fbdc3a817..d7ab78f25c2 100644 --- a/extensions/whatsapp/src/auto-reply/monitor/message-line.runtime.ts +++ b/extensions/whatsapp/src/auto-reply/monitor/message-line.runtime.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { formatInboundEnvelope, diff --git a/extensions/whatsapp/src/auto-reply/monitor/message-line.ts b/extensions/whatsapp/src/auto-reply/monitor/message-line.ts index c52be3cee5a..7fde5ab6345 100644 --- a/extensions/whatsapp/src/auto-reply/monitor/message-line.ts +++ b/extensions/whatsapp/src/auto-reply/monitor/message-line.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { getPrimaryIdentityId, getReplyContext, getSenderIdentity } from "../../identity.js"; import type { WebInboundMsg } from "../types.js"; import { diff --git a/extensions/whatsapp/src/auto-reply/session-snapshot.ts b/extensions/whatsapp/src/auto-reply/session-snapshot.ts index 0e575910905..4087ac3ca3f 100644 --- a/extensions/whatsapp/src/auto-reply/session-snapshot.ts +++ b/extensions/whatsapp/src/auto-reply/session-snapshot.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeMainKey } from "openclaw/plugin-sdk/routing"; import { evaluateSessionFreshness, diff --git a/extensions/whatsapp/src/auto-reply/web-auto-reply-monitor.test.ts b/extensions/whatsapp/src/auto-reply/web-auto-reply-monitor.test.ts index 57e4fadb307..1c0fd061048 100644 --- a/extensions/whatsapp/src/auto-reply/web-auto-reply-monitor.test.ts +++ b/extensions/whatsapp/src/auto-reply/web-auto-reply-monitor.test.ts @@ -33,10 +33,10 @@ const makeConfig = (overrides: Record) => }, session: { store: sessionStorePath }, ...overrides, - }) as unknown as import("openclaw/plugin-sdk/config-runtime").OpenClawConfig; + }) as unknown as import("openclaw/plugin-sdk/config-types").OpenClawConfig; async function runGroupGating(params: { - cfg: import("openclaw/plugin-sdk/config-runtime").OpenClawConfig; + cfg: import("openclaw/plugin-sdk/config-types").OpenClawConfig; msg: Record; conversationId?: string; agentId?: string; diff --git a/extensions/whatsapp/src/auto-reply/web-auto-reply-utils.test.ts b/extensions/whatsapp/src/auto-reply/web-auto-reply-utils.test.ts index 7c593f1ba4f..1ea38cdd838 100644 --- a/extensions/whatsapp/src/auto-reply/web-auto-reply-utils.test.ts +++ b/extensions/whatsapp/src/auto-reply/web-auto-reply-utils.test.ts @@ -1,6 +1,6 @@ import fs from "node:fs/promises"; import path from "node:path"; -import { saveSessionStore } from "openclaw/plugin-sdk/config-runtime"; +import { saveSessionStore } from "openclaw/plugin-sdk/session-store-runtime"; import { describe, expect, it, vi } from "vitest"; import { withTempDir } from "../../../../test/helpers/plugins/temp-dir.js"; import { diff --git a/extensions/whatsapp/src/channel-actions.runtime.ts b/extensions/whatsapp/src/channel-actions.runtime.ts index f61fb881ac5..533fd13209b 100644 --- a/extensions/whatsapp/src/channel-actions.runtime.ts +++ b/extensions/whatsapp/src/channel-actions.runtime.ts @@ -1,6 +1,6 @@ import { createActionGate } from "openclaw/plugin-sdk/channel-actions"; import type { ChannelMessageActionName } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { listWhatsAppAccountIds, resolveWhatsAppAccount } from "./accounts.js"; export { resolveWhatsAppReactionLevel } from "./reaction-level.js"; diff --git a/extensions/whatsapp/src/channel-react-action.runtime.ts b/extensions/whatsapp/src/channel-react-action.runtime.ts index 94c159feed1..af929a90ad4 100644 --- a/extensions/whatsapp/src/channel-react-action.runtime.ts +++ b/extensions/whatsapp/src/channel-react-action.runtime.ts @@ -1,5 +1,5 @@ import { readStringOrNumberParam, readStringParam } from "openclaw/plugin-sdk/channel-actions"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-actions"; export { handleWhatsAppAction } from "./action-runtime.js"; diff --git a/extensions/whatsapp/src/config-accessors.ts b/extensions/whatsapp/src/config-accessors.ts index 81d4b90fbe0..61b12c60c52 100644 --- a/extensions/whatsapp/src/config-accessors.ts +++ b/extensions/whatsapp/src/config-accessors.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveWhatsAppAccount } from "./accounts.js"; import { normalizeWhatsAppAllowFromEntries } from "./normalize-target.js"; diff --git a/extensions/whatsapp/src/doctor-contract.ts b/extensions/whatsapp/src/doctor-contract.ts index 4f704ea8e92..18bd34e112c 100644 --- a/extensions/whatsapp/src/doctor-contract.ts +++ b/extensions/whatsapp/src/doctor-contract.ts @@ -1,5 +1,5 @@ import type { ChannelDoctorConfigMutation } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeCompatibilityConfig as normalizeCompatibilityConfigImpl } from "./doctor.js"; export function normalizeCompatibilityConfig({ diff --git a/extensions/whatsapp/src/doctor.ts b/extensions/whatsapp/src/doctor.ts index 02e70e1a6e1..64b7bba5151 100644 --- a/extensions/whatsapp/src/doctor.ts +++ b/extensions/whatsapp/src/doctor.ts @@ -2,7 +2,7 @@ import type { ChannelDoctorAdapter, ChannelDoctorConfigMutation, } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; export function normalizeCompatibilityConfig({ cfg, diff --git a/extensions/whatsapp/src/group-policy.ts b/extensions/whatsapp/src/group-policy.ts index 83af3dc9a05..95b0e3556aa 100644 --- a/extensions/whatsapp/src/group-policy.ts +++ b/extensions/whatsapp/src/group-policy.ts @@ -3,7 +3,7 @@ import { resolveChannelGroupToolsPolicy, type GroupToolPolicyConfig, } from "openclaw/plugin-sdk/channel-policy"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; type WhatsAppGroupContext = { cfg: OpenClawConfig; diff --git a/extensions/whatsapp/src/heartbeat-recipients.runtime.ts b/extensions/whatsapp/src/heartbeat-recipients.runtime.ts index a87879802e1..ba58e4a79cd 100644 --- a/extensions/whatsapp/src/heartbeat-recipients.runtime.ts +++ b/extensions/whatsapp/src/heartbeat-recipients.runtime.ts @@ -2,8 +2,5 @@ export { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id"; export { normalizeE164 } from "openclaw/plugin-sdk/account-resolution"; export { readChannelAllowFromStoreSync } from "openclaw/plugin-sdk/channel-pairing"; export { normalizeChannelId } from "openclaw/plugin-sdk/channel-targets"; -export { - loadSessionStore, - resolveStorePath, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +export { loadSessionStore, resolveStorePath } from "openclaw/plugin-sdk/session-store-runtime"; +export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; diff --git a/extensions/whatsapp/src/inbound-policy.ts b/extensions/whatsapp/src/inbound-policy.ts index 4468ad0ad8e..9601fcabdd8 100644 --- a/extensions/whatsapp/src/inbound-policy.ts +++ b/extensions/whatsapp/src/inbound-policy.ts @@ -1,18 +1,20 @@ import { resolveChannelGroupPolicy, resolveChannelGroupRequireMention, - resolveDefaultGroupPolicy, - resolveGroupSessionKey, - type ChannelGroupPolicy, - type DmPolicy, - type GroupPolicy, - type OpenClawConfig, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/channel-policy"; +import type { + ChannelGroupPolicy, + DmPolicy, + GroupPolicy, + OpenClawConfig, +} from "openclaw/plugin-sdk/config-types"; +import { resolveDefaultGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy"; import { readStoreAllowFromForDmPolicy, resolveEffectiveAllowFromLists, resolveDmGroupAccessWithCommandGate, } from "openclaw/plugin-sdk/security-runtime"; +import { resolveGroupSessionKey } from "openclaw/plugin-sdk/session-store-runtime"; import { resolveWhatsAppAccount, type ResolvedWhatsAppAccount } from "./accounts.js"; import { getSelfIdentity, getSenderIdentity } from "./identity.js"; import type { WebInboundMessage } from "./inbound/types.js"; diff --git a/extensions/whatsapp/src/inbound/access-control.ts b/extensions/whatsapp/src/inbound/access-control.ts index d0899b47dfe..22e56def137 100644 --- a/extensions/whatsapp/src/inbound/access-control.ts +++ b/extensions/whatsapp/src/inbound/access-control.ts @@ -1,8 +1,8 @@ import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; -import { warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime"; import { defaultRuntime } from "openclaw/plugin-sdk/runtime-env"; +import { warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy"; import { readStoreAllowFromForDmPolicy, resolveDmGroupAccessWithLists, diff --git a/extensions/whatsapp/src/login-qr.ts b/extensions/whatsapp/src/login-qr.ts index 7d7c2e571c0..656ed282702 100644 --- a/extensions/whatsapp/src/login-qr.ts +++ b/extensions/whatsapp/src/login-qr.ts @@ -1,5 +1,5 @@ import { randomUUID } from "node:crypto"; -import { getRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { danger, info, success } from "openclaw/plugin-sdk/runtime-env"; import { defaultRuntime, type RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { logInfo } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/whatsapp/src/login.ts b/extensions/whatsapp/src/login.ts index 5d5dc81afd0..b08bde6de2b 100644 --- a/extensions/whatsapp/src/login.ts +++ b/extensions/whatsapp/src/login.ts @@ -1,5 +1,5 @@ import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime"; -import { getRuntimeConfig } from "openclaw/plugin-sdk/config-runtime"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { danger, success } from "openclaw/plugin-sdk/runtime-env"; import { defaultRuntime, type RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; import { logInfo } from "openclaw/plugin-sdk/text-runtime"; diff --git a/extensions/whatsapp/src/outbound-adapter.poll.test.ts b/extensions/whatsapp/src/outbound-adapter.poll.test.ts index 19d9973698e..7626dcd5bb3 100644 --- a/extensions/whatsapp/src/outbound-adapter.poll.test.ts +++ b/extensions/whatsapp/src/outbound-adapter.poll.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; const hoisted = vi.hoisted(() => ({ diff --git a/extensions/whatsapp/src/outbound-base.ts b/extensions/whatsapp/src/outbound-base.ts index f3705d91fd1..3941b9063a9 100644 --- a/extensions/whatsapp/src/outbound-base.ts +++ b/extensions/whatsapp/src/outbound-base.ts @@ -8,7 +8,7 @@ import { createAttachedChannelResultAdapter, type ChannelOutboundAdapter, } from "openclaw/plugin-sdk/channel-send-result"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { sanitizeForPlainText } from "openclaw/plugin-sdk/outbound-runtime"; import { resolveOutboundSendDep } from "openclaw/plugin-sdk/outbound-send-deps"; import { sendTextMediaPayload } from "openclaw/plugin-sdk/reply-payload"; diff --git a/extensions/whatsapp/src/outbound-test-support.ts b/extensions/whatsapp/src/outbound-test-support.ts index 67999391a5c..56d6979cdc9 100644 --- a/extensions/whatsapp/src/outbound-test-support.ts +++ b/extensions/whatsapp/src/outbound-test-support.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import type { MockInstance } from "vitest"; export function createWhatsAppPollFixture() { diff --git a/extensions/whatsapp/src/reaction-level.test.ts b/extensions/whatsapp/src/reaction-level.test.ts index d8d0478027d..124319239a1 100644 --- a/extensions/whatsapp/src/reaction-level.test.ts +++ b/extensions/whatsapp/src/reaction-level.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { resolveWhatsAppReactionLevel } from "./reaction-level.js"; diff --git a/extensions/whatsapp/src/reaction-level.ts b/extensions/whatsapp/src/reaction-level.ts index 35a395b096a..2f82549a9ec 100644 --- a/extensions/whatsapp/src/reaction-level.ts +++ b/extensions/whatsapp/src/reaction-level.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveReactionLevel, type ReactionLevel, diff --git a/extensions/whatsapp/src/reconnect.test.ts b/extensions/whatsapp/src/reconnect.test.ts index fe00fda6132..aef55b51ece 100644 --- a/extensions/whatsapp/src/reconnect.test.ts +++ b/extensions/whatsapp/src/reconnect.test.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { describe, expect, it } from "vitest"; import { computeBackoff, diff --git a/extensions/whatsapp/src/reconnect.ts b/extensions/whatsapp/src/reconnect.ts index f8a43af512b..309350dd90a 100644 --- a/extensions/whatsapp/src/reconnect.ts +++ b/extensions/whatsapp/src/reconnect.ts @@ -1,5 +1,5 @@ import { randomUUID } from "node:crypto"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { computeBackoff, sleepWithAbort, diff --git a/extensions/whatsapp/src/runtime-api.ts b/extensions/whatsapp/src/runtime-api.ts index 65117feb430..fbabe5890c2 100644 --- a/extensions/whatsapp/src/runtime-api.ts +++ b/extensions/whatsapp/src/runtime-api.ts @@ -14,8 +14,8 @@ export { ToolAuthorizationError, } from "openclaw/plugin-sdk/channel-actions"; export { normalizeE164 } from "openclaw/plugin-sdk/account-resolution"; -export type { DmPolicy, GroupPolicy } from "openclaw/plugin-sdk/config-runtime"; -import type { OpenClawConfig as RuntimeOpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +export type { DmPolicy, GroupPolicy } from "openclaw/plugin-sdk/config-types"; +import type { OpenClawConfig as RuntimeOpenClawConfig } from "openclaw/plugin-sdk/config-types"; export { type ChannelMessageActionName } from "openclaw/plugin-sdk/channel-contract"; export { loadOutboundMediaFromUrl } from "./outbound-media.runtime.js"; diff --git a/extensions/whatsapp/src/runtime-group-policy.ts b/extensions/whatsapp/src/runtime-group-policy.ts index 033bd891a47..ddf2ef86fe6 100644 --- a/extensions/whatsapp/src/runtime-group-policy.ts +++ b/extensions/whatsapp/src/runtime-group-policy.ts @@ -1,4 +1,4 @@ -import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/config-runtime"; +import { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy"; export function resolveWhatsAppRuntimeGroupPolicy(params: { providerConfigPresent: boolean; diff --git a/extensions/whatsapp/src/security-fix.ts b/extensions/whatsapp/src/security-fix.ts index d62d39310f7..dc38d5d647c 100644 --- a/extensions/whatsapp/src/security-fix.ts +++ b/extensions/whatsapp/src/security-fix.ts @@ -1,7 +1,7 @@ import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id"; import type { ChannelDoctorConfigMutation } from "openclaw/plugin-sdk/channel-contract"; import { readChannelAllowFromStore } from "openclaw/plugin-sdk/channel-pairing"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; function applyGroupAllowFromFromStore(params: { cfg: OpenClawConfig; diff --git a/extensions/whatsapp/src/send.test.ts b/extensions/whatsapp/src/send.test.ts index 0ccd2df1f50..383d76cb142 100644 --- a/extensions/whatsapp/src/send.test.ts +++ b/extensions/whatsapp/src/send.test.ts @@ -2,7 +2,7 @@ import crypto from "node:crypto"; import fsSync from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { redactIdentifier } from "openclaw/plugin-sdk/logging-core"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import type { ActiveWebListener } from "./inbound/types.js"; diff --git a/extensions/whatsapp/src/send.ts b/extensions/whatsapp/src/send.ts index da698c09b26..836f083113f 100644 --- a/extensions/whatsapp/src/send.ts +++ b/extensions/whatsapp/src/send.ts @@ -1,11 +1,12 @@ import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime"; -import { requireRuntimeConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { generateSecureUuid } from "openclaw/plugin-sdk/core"; import { redactIdentifier } from "openclaw/plugin-sdk/logging-core"; import { convertMarkdownTables, resolveMarkdownTableMode, } from "openclaw/plugin-sdk/markdown-table-runtime"; +import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime"; import { normalizePollInput, type PollInput } from "openclaw/plugin-sdk/poll-runtime"; import { createSubsystemLogger, getChildLogger } from "openclaw/plugin-sdk/runtime-env"; import { diff --git a/extensions/xai/code-execution.ts b/extensions/xai/code-execution.ts index 7ad02e3af2c..e95e100495f 100644 --- a/extensions/xai/code-execution.ts +++ b/extensions/xai/code-execution.ts @@ -1,5 +1,5 @@ -import { getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/config-runtime"; import { jsonResult, readStringParam } from "openclaw/plugin-sdk/provider-web-search"; +import { getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { Type } from "typebox"; import { buildXaiCodeExecutionPayload, diff --git a/extensions/xai/src/tool-auth-shared.ts b/extensions/xai/src/tool-auth-shared.ts index 3338c504d5e..14386fff94b 100644 --- a/extensions/xai/src/tool-auth-shared.ts +++ b/extensions/xai/src/tool-auth-shared.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { canResolveEnvSecretRefInReadOnlyPath } from "openclaw/plugin-sdk/extension-shared"; import { coerceSecretRef, diff --git a/extensions/xai/src/x-search-config.ts b/extensions/xai/src/x-search-config.ts index 0595f96602e..7bc76a89623 100644 --- a/extensions/xai/src/x-search-config.ts +++ b/extensions/xai/src/x-search-config.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { isRecord } from "./tool-config-shared.js"; type JsonRecord = Record; diff --git a/extensions/xai/x-search.ts b/extensions/xai/x-search.ts index ff653ae49dd..88c4ad10001 100644 --- a/extensions/xai/x-search.ts +++ b/extensions/xai/x-search.ts @@ -1,4 +1,3 @@ -import { getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/config-runtime"; import { jsonResult, readCache, @@ -8,6 +7,7 @@ import { resolveTimeoutSeconds, writeCache, } from "openclaw/plugin-sdk/provider-web-search"; +import { getRuntimeConfigSnapshot } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { isXaiToolEnabled, resolveXaiToolApiKey } from "./src/tool-auth-shared.js"; import { resolveEffectiveXSearchConfig } from "./src/x-search-config.js"; import { diff --git a/extensions/xai/xai.live.test.ts b/extensions/xai/xai.live.test.ts index 700a1e0a5af..fee8424db45 100644 --- a/extensions/xai/xai.live.test.ts +++ b/extensions/xai/xai.live.test.ts @@ -1,8 +1,9 @@ import fs from "node:fs/promises"; import os from "node:os"; import path from "node:path"; -import { getRuntimeConfig, type OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { encodePngRgba, fillPixel } from "openclaw/plugin-sdk/media-runtime"; +import { getRuntimeConfig } from "openclaw/plugin-sdk/runtime-config-snapshot"; import { describe, expect, it } from "vitest"; import { registerProviderPlugin, diff --git a/extensions/zalo/src/accounts.ts b/extensions/zalo/src/accounts.ts index a97ad4bbbc2..da1fe50355c 100644 --- a/extensions/zalo/src/accounts.ts +++ b/extensions/zalo/src/accounts.ts @@ -3,7 +3,7 @@ import { resolveMergedAccountConfig, } from "openclaw/plugin-sdk/account-helpers"; import { normalizeAccountId } from "openclaw/plugin-sdk/account-id"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import { resolveZaloToken } from "./token.js"; import type { ResolvedZaloAccount, ZaloAccountConfig, ZaloConfig } from "./types.js"; diff --git a/extensions/zalo/src/actions.ts b/extensions/zalo/src/actions.ts index 4aeeb1b155c..31feb0df2ce 100644 --- a/extensions/zalo/src/actions.ts +++ b/extensions/zalo/src/actions.ts @@ -3,7 +3,7 @@ import type { ChannelMessageActionAdapter, ChannelMessageActionName, } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime"; import { extractToolSend } from "openclaw/plugin-sdk/tool-send"; import { listEnabledZaloAccounts, resolveZaloAccount } from "./accounts.js"; diff --git a/extensions/zalo/src/channel.ts b/extensions/zalo/src/channel.ts index 376f295ee20..439b5e81f46 100644 --- a/extensions/zalo/src/channel.ts +++ b/extensions/zalo/src/channel.ts @@ -23,7 +23,7 @@ import { createRawChannelSendResultAdapter, } from "openclaw/plugin-sdk/channel-send-result"; import { buildTokenChannelStatusSummary } from "openclaw/plugin-sdk/channel-status"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { createStaticReplyToModeResolver } from "openclaw/plugin-sdk/conversation-runtime"; import { createChannelDirectoryAdapter } from "openclaw/plugin-sdk/directory-runtime"; import { listResolvedDirectoryUserEntriesFromAllowFrom } from "openclaw/plugin-sdk/directory-runtime"; diff --git a/extensions/zalo/src/monitor.ts b/extensions/zalo/src/monitor.ts index 86991937771..42024da67ee 100644 --- a/extensions/zalo/src/monitor.ts +++ b/extensions/zalo/src/monitor.ts @@ -6,7 +6,7 @@ import { resolveDirectDmAuthorizationOutcome, resolveSenderCommandAuthorizationWithRuntime, } from "openclaw/plugin-sdk/command-auth"; -import type { MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { resolveInboundRouteEnvelopeBuilderWithRuntime } from "openclaw/plugin-sdk/inbound-envelope"; import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload"; import { diff --git a/extensions/zalo/src/runtime-support.ts b/extensions/zalo/src/runtime-support.ts index 233893f5cbe..ab857a4e089 100644 --- a/extensions/zalo/src/runtime-support.ts +++ b/extensions/zalo/src/runtime-support.ts @@ -1,6 +1,6 @@ export type { ReplyPayload } from "openclaw/plugin-sdk/reply-runtime"; -export type { OpenClawConfig, GroupPolicy } from "openclaw/plugin-sdk/config-runtime"; -export type { MarkdownTableMode } from "openclaw/plugin-sdk/config-runtime"; +export type { OpenClawConfig, GroupPolicy } from "openclaw/plugin-sdk/config-types"; +export type { MarkdownTableMode } from "openclaw/plugin-sdk/config-types"; export type { BaseTokenResolution } from "openclaw/plugin-sdk/channel-contract"; export type { BaseProbeResult, @@ -52,11 +52,11 @@ export { } from "openclaw/plugin-sdk/allow-from"; export { addWildcardAllowFrom } from "openclaw/plugin-sdk/setup"; export { evaluateSenderGroupAccess } from "openclaw/plugin-sdk/group-access"; -export { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/config-runtime"; +export { resolveOpenProviderRuntimeGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy"; export { warnMissingProviderGroupPolicyFallbackOnce, resolveDefaultGroupPolicy, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/runtime-group-policy"; export { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing"; export { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline"; export { logTypingFailure } from "openclaw/plugin-sdk/channel-feedback"; diff --git a/extensions/zalo/src/send.ts b/extensions/zalo/src/send.ts index 2c7e0ab8e1a..41c5008f042 100644 --- a/extensions/zalo/src/send.ts +++ b/extensions/zalo/src/send.ts @@ -1,4 +1,4 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime"; import { resolveZaloAccount } from "./accounts.js"; import type { ZaloFetch } from "./api.js"; diff --git a/extensions/zalouser/runtime-api.ts b/extensions/zalouser/runtime-api.ts index 6a0a145352d..715c86a5887 100644 --- a/extensions/zalouser/runtime-api.ts +++ b/extensions/zalouser/runtime-api.ts @@ -16,7 +16,7 @@ export type { OpenClawConfig, GroupToolPolicyConfig, MarkdownTableMode, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/config-types"; export type { PluginRuntime, AnyAgentTool, @@ -30,12 +30,12 @@ export { normalizeAccountId, } from "openclaw/plugin-sdk/core"; export { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking"; +export { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; export { - isDangerousNameMatchingEnabled, resolveDefaultGroupPolicy, resolveOpenProviderRuntimeGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/config-runtime"; +} from "openclaw/plugin-sdk/runtime-group-policy"; export { mergeAllowlist, summarizeMapping, diff --git a/extensions/zalouser/src/accounts.ts b/extensions/zalouser/src/accounts.ts index 067650eed57..fdeefdb6620 100644 --- a/extensions/zalouser/src/accounts.ts +++ b/extensions/zalouser/src/accounts.ts @@ -4,7 +4,7 @@ import { normalizeAccountId, resolveMergedAccountConfig, } from "openclaw/plugin-sdk/account-resolution"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { normalizeOptionalString } from "openclaw/plugin-sdk/text-runtime"; import type { ResolvedZalouserAccount, ZalouserAccountConfig, ZalouserConfig } from "./types.js"; diff --git a/extensions/zalouser/src/channel-api.ts b/extensions/zalouser/src/channel-api.ts index fa2e03fd85d..29e54550785 100644 --- a/extensions/zalouser/src/channel-api.ts +++ b/extensions/zalouser/src/channel-api.ts @@ -12,10 +12,8 @@ export { normalizeAccountId, type OpenClawConfig, } from "openclaw/plugin-sdk/core"; -export { - isDangerousNameMatchingEnabled, - type GroupToolPolicyConfig, -} from "openclaw/plugin-sdk/config-runtime"; +export { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; +export type { GroupToolPolicyConfig } from "openclaw/plugin-sdk/config-types"; export { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking"; export { isNumericTargetId, diff --git a/extensions/zalouser/src/doctor-contract.ts b/extensions/zalouser/src/doctor-contract.ts index 1300a212d91..5a87a2963e6 100644 --- a/extensions/zalouser/src/doctor-contract.ts +++ b/extensions/zalouser/src/doctor-contract.ts @@ -2,7 +2,7 @@ import type { ChannelDoctorConfigMutation, ChannelDoctorLegacyConfigRule, } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; type ZalouserChannelsConfig = NonNullable; diff --git a/extensions/zalouser/src/monitor.ts b/extensions/zalouser/src/monitor.ts index d1dd766ef49..b565a6e1244 100644 --- a/extensions/zalouser/src/monitor.ts +++ b/extensions/zalouser/src/monitor.ts @@ -10,15 +10,9 @@ import { } from "openclaw/plugin-sdk/channel-policy"; import { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline"; import { resolveSenderCommandAuthorization } from "openclaw/plugin-sdk/command-auth"; -import { - isDangerousNameMatchingEnabled, - resolveDefaultGroupPolicy, - resolveOpenProviderRuntimeGroupPolicy, - type MarkdownTableMode, - type OpenClawConfig, - warnMissingProviderGroupPolicyFallbackOnce, -} from "openclaw/plugin-sdk/config-runtime"; +import type { MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-types"; import { KeyedAsyncQueue } from "openclaw/plugin-sdk/core"; +import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime"; import { createDeferred } from "openclaw/plugin-sdk/extension-shared"; import { evaluateGroupRouteAccessForPolicy, @@ -37,6 +31,11 @@ import { type OutboundReplyPayload, } from "openclaw/plugin-sdk/reply-payload"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime"; +import { + resolveDefaultGroupPolicy, + resolveOpenProviderRuntimeGroupPolicy, + warnMissingProviderGroupPolicyFallbackOnce, +} from "openclaw/plugin-sdk/runtime-group-policy"; import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, diff --git a/package.json b/package.json index 4d1a1803801..c23b2aae34e 100644 --- a/package.json +++ b/package.json @@ -186,6 +186,22 @@ "types": "./dist/plugin-sdk/config-runtime.d.ts", "default": "./dist/plugin-sdk/config-runtime.js" }, + "./plugin-sdk/config-types": { + "types": "./dist/plugin-sdk/config-types.d.ts", + "default": "./dist/plugin-sdk/config-types.js" + }, + "./plugin-sdk/plugin-config-runtime": { + "types": "./dist/plugin-sdk/plugin-config-runtime.d.ts", + "default": "./dist/plugin-sdk/plugin-config-runtime.js" + }, + "./plugin-sdk/config-mutation": { + "types": "./dist/plugin-sdk/config-mutation.d.ts", + "default": "./dist/plugin-sdk/config-mutation.js" + }, + "./plugin-sdk/cron-store-runtime": { + "types": "./dist/plugin-sdk/cron-store-runtime.d.ts", + "default": "./dist/plugin-sdk/cron-store-runtime.js" + }, "./plugin-sdk/config-schema": { "types": "./dist/plugin-sdk/config-schema.d.ts", "default": "./dist/plugin-sdk/config-schema.js" @@ -270,6 +286,14 @@ "types": "./dist/plugin-sdk/runtime-group-policy.d.ts", "default": "./dist/plugin-sdk/runtime-group-policy.js" }, + "./plugin-sdk/model-session-runtime": { + "types": "./dist/plugin-sdk/model-session-runtime.d.ts", + "default": "./dist/plugin-sdk/model-session-runtime.js" + }, + "./plugin-sdk/talk-config-runtime": { + "types": "./dist/plugin-sdk/talk-config-runtime.d.ts", + "default": "./dist/plugin-sdk/talk-config-runtime.js" + }, "./plugin-sdk/ssrf-policy": { "types": "./dist/plugin-sdk/ssrf-policy.d.ts", "default": "./dist/plugin-sdk/ssrf-policy.js" diff --git a/packages/plugin-sdk/package.json b/packages/plugin-sdk/package.json index b00ab5a3dee..72f1feabb2a 100644 --- a/packages/plugin-sdk/package.json +++ b/packages/plugin-sdk/package.json @@ -28,6 +28,22 @@ "types": "./dist/src/plugin-sdk/config-runtime.d.ts", "default": "./src/config-runtime.ts" }, + "./config-types": { + "types": "./dist/src/plugin-sdk/config-types.d.ts", + "default": "./src/config-types.ts" + }, + "./plugin-config-runtime": { + "types": "./dist/src/plugin-sdk/plugin-config-runtime.d.ts", + "default": "./src/plugin-config-runtime.ts" + }, + "./config-mutation": { + "types": "./dist/src/plugin-sdk/config-mutation.d.ts", + "default": "./src/config-mutation.ts" + }, + "./cron-store-runtime": { + "types": "./dist/src/plugin-sdk/cron-store-runtime.d.ts", + "default": "./src/cron-store-runtime.ts" + }, "./browser-setup-tools": { "types": "./dist/src/plugin-sdk/browser-setup-tools.d.ts", "default": "./src/browser-setup-tools.ts" @@ -92,6 +108,14 @@ "types": "./dist/src/plugin-sdk/provider-model-shared.d.ts", "default": "./src/provider-model-shared.ts" }, + "./model-session-runtime": { + "types": "./dist/src/plugin-sdk/model-session-runtime.d.ts", + "default": "./src/model-session-runtime.ts" + }, + "./talk-config-runtime": { + "types": "./dist/src/plugin-sdk/talk-config-runtime.d.ts", + "default": "./src/talk-config-runtime.ts" + }, "./provider-onboard": { "types": "./dist/src/plugin-sdk/provider-onboard.d.ts", "default": "./src/provider-onboard.ts" diff --git a/scripts/lib/config-boundary-guard.mjs b/scripts/lib/config-boundary-guard.mjs index 94f4982d0aa..605881a07b2 100644 --- a/scripts/lib/config-boundary-guard.mjs +++ b/scripts/lib/config-boundary-guard.mjs @@ -66,6 +66,7 @@ function isProductionExtensionFile(relPath) { relPath.includes(".test-d.") || relPath.includes(".test-harness.") || relPath.includes(".test-shared.") || + relPath.endsWith(".test-support.ts") || relPath.endsWith("-test-helpers.ts") || relPath.endsWith("-test-support.ts") ) { @@ -155,6 +156,26 @@ function pushDeprecatedRuntimeApiViolations(violations, files) { } } +function pushBroadConfigRuntimeBarrelViolations(violations, files) { + const staticImportPattern = + /\b(?:import|export)\s+(?:type\s+)?\{[\s\S]*?\}\s+from\s+["']openclaw\/plugin-sdk\/config-runtime["']/g; + const dynamicImportPattern = + /\b(?:const|let|var)\s+\{[\s\S]*?\}\s*=\s*(?:await\s+)?import\(["']openclaw\/plugin-sdk\/config-runtime["']\)/g; + const typeQueryPattern = + /\b(?:typeof\s+)?import\(["']openclaw\/plugin-sdk\/config-runtime["']\)\.[A-Za-z_$][\w$]*/g; + + for (const { filePath, relPath } of files) { + const source = readFileSync(filePath, "utf8"); + for (const pattern of [staticImportPattern, dynamicImportPattern, typeQueryPattern]) { + for (const line of findMatchLineNumbers(source, pattern)) { + violations.push( + `${relPath}:${line} use narrow plugin-sdk config subpaths instead of openclaw/plugin-sdk/config-runtime`, + ); + } + } + } +} + export function collectDeprecatedInternalConfigApiViolations({ repoRoot = DEFAULT_REPO_ROOT, } = {}) { @@ -177,6 +198,7 @@ export function collectDeprecatedInternalConfigApiViolations({ .map((filePath) => ({ filePath, relPath: repoRelative(repoRoot, filePath) })) .filter(({ relPath }) => isProductionExtensionFile(relPath)); pushDeprecatedRuntimeApiViolations(violations, productionExtensionFiles); + pushBroadConfigRuntimeBarrelViolations(violations, productionExtensionFiles); for (const { filePath, relPath } of productionExtensionFiles) { const source = readFileSync(filePath, "utf8"); @@ -215,6 +237,15 @@ export function collectDeprecatedInternalConfigApiViolations({ violations, repoFiles.filter(({ relPath }) => !isCompatConfigApiFile(relPath)), ); + pushBroadConfigRuntimeBarrelViolations( + violations, + repoFiles.filter( + ({ relPath }) => + !isTestOrHarnessFile(relPath) && + !isCompatConfigApiFile(relPath) && + !relPath.startsWith("test/"), + ), + ); for (const { filePath, relPath } of repoFiles.filter( ({ relPath }) => !isCompatConfigApiFile(relPath), diff --git a/scripts/lib/plugin-sdk-entrypoints.json b/scripts/lib/plugin-sdk-entrypoints.json index 58449a5b134..62b4df85330 100644 --- a/scripts/lib/plugin-sdk-entrypoints.json +++ b/scripts/lib/plugin-sdk-entrypoints.json @@ -30,6 +30,10 @@ "approval-reply-runtime", "approval-runtime", "config-runtime", + "config-types", + "plugin-config-runtime", + "config-mutation", + "cron-store-runtime", "config-schema", "reply-runtime", "reply-dedupe", @@ -51,6 +55,8 @@ "infra-runtime", "runtime-config-snapshot", "runtime-group-policy", + "model-session-runtime", + "talk-config-runtime", "ssrf-policy", "ssrf-runtime", "media-runtime", diff --git a/src/cli/update-cli.test.ts b/src/cli/update-cli.test.ts index 3945b0a911d..b72a0e0c501 100644 --- a/src/cli/update-cli.test.ts +++ b/src/cli/update-cli.test.ts @@ -1092,7 +1092,9 @@ describe("update-cli", () => { ); expect(defaultRuntime.error).toHaveBeenCalledWith( - expect.stringContaining("Package updates cannot run from inside the gateway service process."), + expect.stringContaining( + "Package updates cannot run from inside the gateway service process.", + ), ); expect(defaultRuntime.exit).toHaveBeenCalledWith(1); expect(runGatewayUpdate).not.toHaveBeenCalled(); diff --git a/src/commands/migrate/output.ts b/src/commands/migrate/output.ts index 03415e82bdc..c057658cd09 100644 --- a/src/commands/migrate/output.ts +++ b/src/commands/migrate/output.ts @@ -1,5 +1,5 @@ -import type { MigrationApplyResult, MigrationItem, MigrationPlan } from "../../plugins/types.js"; import { redactMigrationPlan } from "../../plugin-sdk/migration.js"; +import type { MigrationApplyResult, MigrationItem, MigrationPlan } from "../../plugins/types.js"; import { writeRuntimeJson } from "../../runtime.js"; import type { RuntimeEnv } from "../../runtime.js"; import { theme } from "../../terminal/theme.js"; diff --git a/src/plugin-sdk/channel-policy.ts b/src/plugin-sdk/channel-policy.ts index 87ad49a8ffe..a98f70cbf2e 100644 --- a/src/plugin-sdk/channel-policy.ts +++ b/src/plugin-sdk/channel-policy.ts @@ -36,9 +36,11 @@ export { } from "../channels/plugins/group-policy-warnings.js"; export { buildAccountScopedDmSecurityPolicy } from "../channels/plugins/helpers.js"; export { + resolveChannelGroupPolicy, resolveChannelGroupRequireMention, resolveChannelGroupToolsPolicy, resolveToolsBySender, + type ChannelGroupPolicy, } from "../config/group-policy.js"; export { DM_GROUP_ACCESS_REASON, diff --git a/src/plugin-sdk/config-mutation.ts b/src/plugin-sdk/config-mutation.ts new file mode 100644 index 00000000000..c0773c6919b --- /dev/null +++ b/src/plugin-sdk/config-mutation.ts @@ -0,0 +1,5 @@ +export { logConfigUpdated } from "../config/logging.js"; +export { readConfigFileSnapshotForWrite } from "../config/io.js"; +export { mutateConfigFile, replaceConfigFile } from "../config/mutate.js"; +export type { ConfigWriteAfterWrite } from "../config/runtime-snapshot.js"; +export { updateConfig } from "../commands/models/shared.js"; diff --git a/src/plugin-sdk/config-runtime.ts b/src/plugin-sdk/config-runtime.ts index 225bdf8d8a3..d5dd3d612ea 100644 --- a/src/plugin-sdk/config-runtime.ts +++ b/src/plugin-sdk/config-runtime.ts @@ -1,51 +1,12 @@ // Shared config/runtime boundary for plugins that need config loading, // config writes, or session-store helpers without importing src internals. -import type { OpenClawConfig } from "../config/types.js"; - -export function requireRuntimeConfig(config: OpenClawConfig, context: string): OpenClawConfig { - if (config) { - return config; - } - throw new Error( - `${context} requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.`, - ); -} - -export function resolvePluginConfigObject( - config: OpenClawConfig | undefined, - pluginId: string, -): Record | undefined { - const plugins = - config?.plugins && typeof config.plugins === "object" && !Array.isArray(config.plugins) - ? (config.plugins as Record) - : undefined; - const entries = - plugins?.entries && typeof plugins.entries === "object" && !Array.isArray(plugins.entries) - ? (plugins.entries as Record) - : undefined; - const entry = entries?.[pluginId]; - if (!entry || typeof entry !== "object" || Array.isArray(entry)) { - return undefined; - } - const pluginConfig = (entry as { config?: unknown }).config; - return pluginConfig && typeof pluginConfig === "object" && !Array.isArray(pluginConfig) - ? (pluginConfig as Record) - : undefined; -} - -export function resolveLivePluginConfigObject( - runtimeConfigLoader: (() => OpenClawConfig | undefined) | undefined, - pluginId: string, - startupPluginConfig?: Record, -): Record | undefined { - if (typeof runtimeConfigLoader !== "function") { - return startupPluginConfig; - } - return resolvePluginConfigObject(runtimeConfigLoader(), pluginId); -} - export { resolveDefaultAgentId } from "../agents/agent-scope.js"; +export { + requireRuntimeConfig, + resolveLivePluginConfigObject, + resolvePluginConfigObject, +} from "./plugin-config-runtime.js"; export { clearRuntimeConfigSnapshot, getRuntimeConfigSourceSnapshot, diff --git a/src/plugin-sdk/config-types.ts b/src/plugin-sdk/config-types.ts new file mode 100644 index 00000000000..9416377e186 --- /dev/null +++ b/src/plugin-sdk/config-types.ts @@ -0,0 +1,7 @@ +// Type-only config surface for plugins. + +export type * from "../config/types.js"; +export type { ConfigWriteAfterWrite } from "../config/runtime-snapshot.js"; +export type { ChannelGroupPolicy } from "../config/group-policy.js"; +export type { SessionResetMode } from "../config/sessions/reset.js"; +export type { SessionEntry, SessionScope } from "../config/sessions/types.js"; diff --git a/src/plugin-sdk/cron-store-runtime.ts b/src/plugin-sdk/cron-store-runtime.ts new file mode 100644 index 00000000000..31d39eab73c --- /dev/null +++ b/src/plugin-sdk/cron-store-runtime.ts @@ -0,0 +1 @@ +export { loadCronStore, resolveCronStorePath, saveCronStore } from "../cron/store.js"; diff --git a/src/plugin-sdk/model-session-runtime.ts b/src/plugin-sdk/model-session-runtime.ts new file mode 100644 index 00000000000..41a874231d1 --- /dev/null +++ b/src/plugin-sdk/model-session-runtime.ts @@ -0,0 +1,3 @@ +export { resolveChannelModelOverride } from "../channels/model-overrides.js"; +export { resolveAgentMaxConcurrent } from "../config/agent-limits.js"; +export { applyModelOverrideToSessionEntry } from "../sessions/model-overrides.js"; diff --git a/src/plugin-sdk/native-command-config-runtime.ts b/src/plugin-sdk/native-command-config-runtime.ts index c0db6ba48ea..27c5df606a6 100644 --- a/src/plugin-sdk/native-command-config-runtime.ts +++ b/src/plugin-sdk/native-command-config-runtime.ts @@ -1 +1,5 @@ -export { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "../config/commands.js"; +export { + isNativeCommandsExplicitlyDisabled, + resolveNativeCommandsEnabled, + resolveNativeSkillsEnabled, +} from "../config/commands.js"; diff --git a/src/plugin-sdk/plugin-config-runtime.ts b/src/plugin-sdk/plugin-config-runtime.ts new file mode 100644 index 00000000000..c9ec85ce4ed --- /dev/null +++ b/src/plugin-sdk/plugin-config-runtime.ts @@ -0,0 +1,43 @@ +import type { OpenClawConfig } from "../config/types.js"; + +export function requireRuntimeConfig(config: OpenClawConfig, context: string): OpenClawConfig { + if (config) { + return config; + } + throw new Error( + `${context} requires a resolved runtime config. Load and resolve config at the command or gateway boundary, then pass cfg through the runtime path.`, + ); +} + +export function resolvePluginConfigObject( + config: OpenClawConfig | undefined, + pluginId: string, +): Record | undefined { + const plugins = + config?.plugins && typeof config.plugins === "object" && !Array.isArray(config.plugins) + ? (config.plugins as Record) + : undefined; + const entries = + plugins?.entries && typeof plugins.entries === "object" && !Array.isArray(plugins.entries) + ? (plugins.entries as Record) + : undefined; + const entry = entries?.[pluginId]; + if (!entry || typeof entry !== "object" || Array.isArray(entry)) { + return undefined; + } + const pluginConfig = (entry as { config?: unknown }).config; + return pluginConfig && typeof pluginConfig === "object" && !Array.isArray(pluginConfig) + ? (pluginConfig as Record) + : undefined; +} + +export function resolveLivePluginConfigObject( + runtimeConfigLoader: (() => OpenClawConfig | undefined) | undefined, + pluginId: string, + startupPluginConfig?: Record, +): Record | undefined { + if (typeof runtimeConfigLoader !== "function") { + return startupPluginConfig; + } + return resolvePluginConfigObject(runtimeConfigLoader(), pluginId); +} diff --git a/src/plugin-sdk/runtime-config-snapshot.ts b/src/plugin-sdk/runtime-config-snapshot.ts index 776dde41201..ada7bccdfe0 100644 --- a/src/plugin-sdk/runtime-config-snapshot.ts +++ b/src/plugin-sdk/runtime-config-snapshot.ts @@ -3,4 +3,5 @@ export { getRuntimeConfigSnapshot, setRuntimeConfigSnapshot, } from "../config/runtime-snapshot.js"; +export { getRuntimeConfig, getRuntimeConfigSourceSnapshot } from "../config/io.js"; export type { OpenClawConfig } from "../config/types.js"; diff --git a/src/plugin-sdk/secret-input-runtime.ts b/src/plugin-sdk/secret-input-runtime.ts index 079ea26bdd4..1a2e050fff1 100644 --- a/src/plugin-sdk/secret-input-runtime.ts +++ b/src/plugin-sdk/secret-input-runtime.ts @@ -9,3 +9,8 @@ export { type SecretInputStringResolution, type SecretInputStringResolutionMode, } from "../config/types.secrets.js"; +export { + resolveConfiguredSecretInputString, + resolveConfiguredSecretInputWithFallback, + resolveRequiredConfiguredSecretRefInputString, +} from "../gateway/resolve-configured-secret-input-string.js"; diff --git a/src/plugin-sdk/session-store-runtime.ts b/src/plugin-sdk/session-store-runtime.ts index 0e5ed35eb80..177964ea54b 100644 --- a/src/plugin-sdk/session-store-runtime.ts +++ b/src/plugin-sdk/session-store-runtime.ts @@ -1,7 +1,24 @@ -// Narrow session-store read helpers for channel hot paths. +// Narrow session-store helpers for channel hot paths. export { loadSessionStore } from "../config/sessions/store-load.js"; export { resolveSessionStoreEntry } from "../config/sessions/store-entry.js"; export { resolveStorePath } from "../config/sessions/paths.js"; -export { readSessionUpdatedAt } from "../config/sessions/store.js"; -export type { SessionEntry } from "../config/sessions/types.js"; +export { resolveSessionKey } from "../config/sessions/session-key.js"; +export { resolveGroupSessionKey } from "../config/sessions/group.js"; +export { canonicalizeMainSessionAlias } from "../config/sessions/main-session.js"; +export { + clearSessionStoreCacheForTest, + readSessionUpdatedAt, + recordSessionMetaFromInbound, + saveSessionStore, + updateLastRoute, + updateSessionStore, +} from "../config/sessions/store.js"; +export { + evaluateSessionFreshness, + resolveChannelResetConfig, + resolveSessionResetPolicy, + resolveSessionResetType, + resolveThreadFlag, +} from "../config/sessions/reset.js"; +export type { SessionEntry, SessionScope } from "../config/sessions/types.js"; diff --git a/src/plugin-sdk/talk-config-runtime.ts b/src/plugin-sdk/talk-config-runtime.ts new file mode 100644 index 00000000000..29868d05d96 --- /dev/null +++ b/src/plugin-sdk/talk-config-runtime.ts @@ -0,0 +1,2 @@ +export { resolveActiveTalkProviderConfig } from "../config/talk.js"; +export type { OpenClawConfig } from "../config/types.js"; diff --git a/src/plugins/contracts/config-boundary-guard.test.ts b/src/plugins/contracts/config-boundary-guard.test.ts index 92ee4eac9b2..1e621f3284c 100644 --- a/src/plugins/contracts/config-boundary-guard.test.ts +++ b/src/plugins/contracts/config-boundary-guard.test.ts @@ -75,4 +75,43 @@ describe("config boundary guard", () => { "extensions/telegram/src/send.ts:1: export async function send() { return loadConfig(); }", ]); }); + + it("flags broad config-runtime barrel imports in production code", () => { + const repoRoot = makeRepoFixture(); + writeFixture( + repoRoot, + "extensions/telegram/src/index.ts", + [ + 'import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";', + 'import { requireRuntimeConfig } from "openclaw/plugin-sdk/config-runtime";', + 'type Loader = typeof import("openclaw/plugin-sdk/config-runtime").getRuntimeConfig;', + "export type Config = OpenClawConfig;", + "export const load: Loader = requireRuntimeConfig;", + ].join("\n"), + ); + + expect(collectDeprecatedInternalConfigApiViolations({ repoRoot })).toEqual( + expect.arrayContaining([ + "extensions/telegram/src/index.ts:1 use narrow plugin-sdk config subpaths instead of openclaw/plugin-sdk/config-runtime", + "extensions/telegram/src/index.ts:2 use narrow plugin-sdk config subpaths instead of openclaw/plugin-sdk/config-runtime", + "extensions/telegram/src/index.ts:3 use narrow plugin-sdk config subpaths instead of openclaw/plugin-sdk/config-runtime", + ]), + ); + }); + + it("allows narrow config SDK subpaths in production code", () => { + const repoRoot = makeRepoFixture(); + writeFixture( + repoRoot, + "extensions/telegram/src/index.ts", + [ + 'import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";', + 'import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";', + 'type Loader = typeof import("openclaw/plugin-sdk/runtime-config-snapshot").getRuntimeConfig;', + 'export const load = (cfg: OpenClawConfig) => requireRuntimeConfig(cfg, "telegram");', + ].join("\n"), + ); + + expect(collectDeprecatedInternalConfigApiViolations({ repoRoot })).toEqual([]); + }); }); diff --git a/src/plugins/contracts/plugin-sdk-runtime-api-guardrails.test.ts b/src/plugins/contracts/plugin-sdk-runtime-api-guardrails.test.ts index 8a1eb70415a..bce47c97a90 100644 --- a/src/plugins/contracts/plugin-sdk-runtime-api-guardrails.test.ts +++ b/src/plugins/contracts/plugin-sdk-runtime-api-guardrails.test.ts @@ -66,14 +66,15 @@ const RUNTIME_API_EXPORT_GUARDS: Record = { 'export { evaluateGroupRouteAccessForPolicy, resolveDmGroupAccessWithLists, resolveSenderScopedGroupPolicy } from "openclaw/plugin-sdk/channel-policy";', 'export { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";', 'export { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";', - 'export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";', + 'export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";', 'export { GoogleChatConfigSchema } from "openclaw/plugin-sdk/channel-config-schema-legacy";', - 'export { GROUP_POLICY_BLOCKED_LABEL, isDangerousNameMatchingEnabled, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/config-runtime";', + 'export { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";', + 'export { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";', 'export { fetchRemoteMedia, resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";', 'export { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";', 'export type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store";', 'export { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";', - 'export type { GoogleChatAccountConfig, GoogleChatConfig } from "openclaw/plugin-sdk/config-runtime";', + 'export type { GoogleChatAccountConfig, GoogleChatConfig } from "openclaw/plugin-sdk/config-types";', 'export { extractToolSend } from "openclaw/plugin-sdk/tool-send";', 'export { resolveInboundMentionDecision } from "openclaw/plugin-sdk/channel-inbound";', 'export { resolveInboundRouteEnvelopeBuilderWithRuntime } from "openclaw/plugin-sdk/inbound-envelope";', @@ -94,8 +95,9 @@ const RUNTIME_API_EXPORT_GUARDS: Record = { 'export { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline";', 'export { PAIRING_APPROVED_MESSAGE, buildProbeChannelStatusSummary, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/channel-status";', 'export { buildChannelKeyCandidates, normalizeChannelSlug, resolveChannelEntryMatchWithFallback, resolveNestedAllowlistDecision } from "openclaw/plugin-sdk/channel-targets";', - 'export type { GroupPolicy, GroupToolPolicyConfig, MSTeamsChannelConfig, MSTeamsConfig, MSTeamsReplyStyle, MSTeamsTeamConfig, MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";', - 'export { isDangerousNameMatchingEnabled, resolveDefaultGroupPolicy } from "openclaw/plugin-sdk/config-runtime";', + 'export type { GroupPolicy, GroupToolPolicyConfig, MSTeamsChannelConfig, MSTeamsConfig, MSTeamsReplyStyle, MSTeamsTeamConfig, MarkdownTableMode, OpenClawConfig } from "openclaw/plugin-sdk/config-types";', + 'export { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";', + 'export { resolveDefaultGroupPolicy } from "openclaw/plugin-sdk/runtime-group-policy";', 'export { withFileLock } from "openclaw/plugin-sdk/file-lock";', 'export { keepHttpServerTaskAlive } from "openclaw/plugin-sdk/channel-lifecycle";', 'export { detectMime, extensionForMime, extractOriginalFilename, getFileExtension, resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";', @@ -127,7 +129,7 @@ const RUNTIME_API_EXPORT_GUARDS: Record = { 'export { setMatrixRuntime } from "./src/runtime.js";', 'export { writeJsonFileAtomically } from "openclaw/plugin-sdk/json-store";', 'export type { ChannelDirectoryEntry, ChannelMessageActionContext } from "openclaw/plugin-sdk/channel-contract";', - 'export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";', + 'export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";', 'export { formatZonedTimestamp } from "openclaw/plugin-sdk/core";', 'export type { PluginRuntime, RuntimeLogger } from "openclaw/plugin-sdk/plugin-runtime";', 'export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";', @@ -144,8 +146,8 @@ const RUNTIME_API_EXPORT_GUARDS: Record = { 'export { logInboundDrop } from "openclaw/plugin-sdk/channel-logging";', 'export { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";', 'export { readStoreAllowFromForDmPolicy, resolveDmGroupAccessWithCommandGate } from "openclaw/plugin-sdk/channel-policy";', - 'export type { BlockStreamingCoalesceConfig, DmConfig, DmPolicy, GroupPolicy, GroupToolPolicyConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";', - 'export { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/config-runtime";', + 'export type { BlockStreamingCoalesceConfig, DmConfig, DmPolicy, GroupPolicy, GroupToolPolicyConfig, OpenClawConfig } from "openclaw/plugin-sdk/config-types";', + 'export { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";', 'export { dispatchInboundReplyWithBase } from "openclaw/plugin-sdk/inbound-reply-dispatch";', 'export type { OutboundReplyPayload } from "openclaw/plugin-sdk/reply-payload";', 'export { deliverFormattedTextWithAttachments } from "openclaw/plugin-sdk/reply-payload";', @@ -156,7 +158,7 @@ const RUNTIME_API_EXPORT_GUARDS: Record = { 'export { setNextcloudTalkRuntime } from "./src/runtime.js";', ], [bundledPluginFile({ rootDir: ROOT_DIR, pluginId: "nostr", relativePath: "runtime-api.ts" })]: [ - 'export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";', + 'export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";', 'export { getPluginRuntimeGatewayRequestScope } from "openclaw/plugin-sdk/plugin-runtime";', 'export type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store";', ], @@ -202,7 +204,7 @@ const RUNTIME_API_EXPORT_GUARDS: Record = { 'export { resolveTelegramToken } from "./src/token.js";', 'export { setTelegramRuntime } from "./src/runtime.js";', 'export type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core";', - 'export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";', + 'export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";', 'export type TelegramAccountConfig = NonNullable< NonNullable["telegram"] >;', 'export type TelegramActionConfig = NonNullable;', 'export type TelegramNetworkConfig = NonNullable;', @@ -213,7 +215,7 @@ const RUNTIME_API_EXPORT_GUARDS: Record = { 'export type { ChannelAccountSnapshot, ChannelCapabilities, ChannelGatewayContext, ChannelLogSink, ChannelMessageActionAdapter, ChannelMessageActionContext, ChannelMeta, ChannelOutboundAdapter, ChannelOutboundContext, ChannelResolveKind, ChannelResolveResult, ChannelStatusAdapter } from "openclaw/plugin-sdk/channel-contract";', 'export type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core";', 'export type { OutboundDeliveryResult } from "openclaw/plugin-sdk/channel-send-result";', - 'export type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";', + 'export type { OpenClawConfig } from "openclaw/plugin-sdk/config-types";', 'export type { RuntimeEnv } from "openclaw/plugin-sdk/runtime";', 'export type { WizardPrompter } from "openclaw/plugin-sdk/setup";', ], diff --git a/src/plugins/lazy-service-module.test.ts b/src/plugins/lazy-service-module.test.ts index 2922e553f2d..f7419a8c06f 100644 --- a/src/plugins/lazy-service-module.test.ts +++ b/src/plugins/lazy-service-module.test.ts @@ -100,9 +100,7 @@ describe("startLazyPluginServiceModule", () => { platformSpy.mockRestore(); } - expect(importModule).toHaveBeenCalledWith( - "file:///C:/Users/alice/plugin%20folder/x%23y.mjs", - ); + expect(importModule).toHaveBeenCalledWith("file:///C:/Users/alice/plugin%20folder/x%23y.mjs"); }); it("leaves caller-supplied override loaders responsible for their own specifiers", async () => { diff --git a/ui/src/ui/controllers/config.ts b/ui/src/ui/controllers/config.ts index ae8d6ba8291..eeb2d37cafb 100644 --- a/ui/src/ui/controllers/config.ts +++ b/ui/src/ui/controllers/config.ts @@ -160,7 +160,8 @@ function resolveUpdateStatusBanner(params: { status?: string; reason?: string }) "ui-build-failed": "The control UI rebuild failed. Fix the UI build error and retry.", "global-install-failed": "The global package install did not verify on disk. Retry or reinstall from the CLI.", - "restart-disabled": "The update was not applied because gateway restarts are disabled. Enable restarts in config, then retry — or run `openclaw update` from the CLI.", + "restart-disabled": + "The update was not applied because gateway restarts are disabled. Enable restarts in config, then retry — or run `openclaw update` from the CLI.", "restart-unavailable": "This global install cannot be safely replaced while restarts are disabled and no supervisor is present.", "restart-unhealthy":