From a02bfd30c58929aede9ba592c00efc879b65ce47 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 18 Mar 2026 09:43:46 -0700 Subject: [PATCH] Plugin SDK: use public utility subpaths --- src/acp/control-plane/session-actor-queue.ts | 2 +- src/agents/cli-runner/helpers.ts | 2 +- src/agents/pi-embedded-runner/compact.ts | 2 +- src/agents/pi-embedded-runner/run/attempt.ts | 2 +- src/channels/allowlists/resolve-utils.ts | 2 +- src/cli/send-runtime/signal.ts | 4 ++-- src/infra/outbound/targets.ts | 2 +- src/infra/system-run-normalize.ts | 2 +- src/line/bot-handlers.ts | 2 +- src/security/dm-policy-shared.ts | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/acp/control-plane/session-actor-queue.ts b/src/acp/control-plane/session-actor-queue.ts index 7112d7421e3..54a8d33e54b 100644 --- a/src/acp/control-plane/session-actor-queue.ts +++ b/src/acp/control-plane/session-actor-queue.ts @@ -1,4 +1,4 @@ -import { KeyedAsyncQueue } from "../../plugin-sdk/keyed-async-queue.js"; +import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue"; export class SessionActorQueue { private readonly queue = new KeyedAsyncQueue(); diff --git a/src/agents/cli-runner/helpers.ts b/src/agents/cli-runner/helpers.ts index 96ec35540be..98289396112 100644 --- a/src/agents/cli-runner/helpers.ts +++ b/src/agents/cli-runner/helpers.ts @@ -4,10 +4,10 @@ import os from "node:os"; import path from "node:path"; import type { AgentTool } from "@mariozechner/pi-agent-core"; import type { ImageContent } from "@mariozechner/pi-ai"; +import { KeyedAsyncQueue } from "openclaw/plugin-sdk/keyed-async-queue"; import type { ThinkLevel } from "../../auto-reply/thinking.js"; import type { OpenClawConfig } from "../../config/config.js"; import type { CliBackendConfig } from "../../config/types.js"; -import { KeyedAsyncQueue } from "../../plugin-sdk/keyed-async-queue.js"; import { buildTtsSystemPromptHint } from "../../tts/tts.js"; import { isRecord } from "../../utils.js"; import { buildModelAliasLines } from "../model-alias-lines.js"; diff --git a/src/agents/pi-embedded-runner/compact.ts b/src/agents/pi-embedded-runner/compact.ts index 0dfc727dee1..37198c71cda 100644 --- a/src/agents/pi-embedded-runner/compact.ts +++ b/src/agents/pi-embedded-runner/compact.ts @@ -7,6 +7,7 @@ import { estimateTokens, SessionManager, } from "@mariozechner/pi-coding-agent"; +import { resolveSignalReactionLevel } from "openclaw/plugin-sdk/signal"; import { resolveTelegramInlineButtonsScope, resolveTelegramReactionLevel, @@ -23,7 +24,6 @@ import { createInternalHookEvent, triggerInternalHook } from "../../hooks/intern import { getMachineDisplayName } from "../../infra/machine-name.js"; import { generateSecureToken } from "../../infra/secure-random.js"; import { getMemorySearchManager } from "../../memory/index.js"; -import { resolveSignalReactionLevel } from "../../plugin-sdk/signal.js"; import { getGlobalHookRunner } from "../../plugins/hook-runner-global.js"; import { prepareProviderRuntimeAuth } from "../../plugins/provider-runtime.js"; import { type enqueueCommand, enqueueCommandInLane } from "../../process/command-queue.js"; diff --git a/src/agents/pi-embedded-runner/run/attempt.ts b/src/agents/pi-embedded-runner/run/attempt.ts index f89759606de..fdf92569c0b 100644 --- a/src/agents/pi-embedded-runner/run/attempt.ts +++ b/src/agents/pi-embedded-runner/run/attempt.ts @@ -7,6 +7,7 @@ import { DefaultResourceLoader, SessionManager, } from "@mariozechner/pi-coding-agent"; +import { resolveSignalReactionLevel } from "openclaw/plugin-sdk/signal"; import { resolveTelegramInlineButtonsScope, resolveTelegramReactionLevel, @@ -20,7 +21,6 @@ import { ensureGlobalUndiciStreamTimeouts, } from "../../../infra/net/undici-global-dispatcher.js"; import { MAX_IMAGE_BYTES } from "../../../media/constants.js"; -import { resolveSignalReactionLevel } from "../../../plugin-sdk/signal.js"; import { getGlobalHookRunner } from "../../../plugins/hook-runner-global.js"; import type { PluginHookAgentContext, diff --git a/src/channels/allowlists/resolve-utils.ts b/src/channels/allowlists/resolve-utils.ts index 2199eaf4ecf..84a3da97b5e 100644 --- a/src/channels/allowlists/resolve-utils.ts +++ b/src/channels/allowlists/resolve-utils.ts @@ -1,4 +1,4 @@ -import { mapAllowFromEntries } from "../../plugin-sdk/channel-config-helpers.js"; +import { mapAllowFromEntries } from "openclaw/plugin-sdk/channel-config-helpers"; import type { RuntimeEnv } from "../../runtime.js"; import { summarizeStringEntries } from "../../shared/string-sample.js"; diff --git a/src/cli/send-runtime/signal.ts b/src/cli/send-runtime/signal.ts index 151f13cc351..967fde0bc35 100644 --- a/src/cli/send-runtime/signal.ts +++ b/src/cli/send-runtime/signal.ts @@ -1,7 +1,7 @@ -import { sendMessageSignal as sendMessageSignalImpl } from "../../plugin-sdk/signal.js"; +import { sendMessageSignal as sendMessageSignalImpl } from "openclaw/plugin-sdk/signal"; type RuntimeSend = { - sendMessage: typeof import("../../plugin-sdk/signal.js").sendMessageSignal; + sendMessage: typeof import("openclaw/plugin-sdk/signal").sendMessageSignal; }; export const runtimeSend = { diff --git a/src/infra/outbound/targets.ts b/src/infra/outbound/targets.ts index b15dfb881b2..2d294efbef9 100644 --- a/src/infra/outbound/targets.ts +++ b/src/infra/outbound/targets.ts @@ -1,10 +1,10 @@ +import { mapAllowFromEntries } from "openclaw/plugin-sdk/channel-config-helpers"; import { normalizeChatType, type ChatType } from "../../channels/chat-type.js"; import type { ChannelOutboundTargetMode } from "../../channels/plugins/types.js"; import { formatCliCommand } from "../../cli/command-format.js"; import type { OpenClawConfig } from "../../config/config.js"; import type { SessionEntry } from "../../config/sessions.js"; import type { AgentDefaultsConfig } from "../../config/types.agent-defaults.js"; -import { mapAllowFromEntries } from "../../plugin-sdk/channel-config-helpers.js"; import { normalizeAccountId } from "../../routing/session-key.js"; import { deliveryContextFromSession } from "../../utils/delivery-context.js"; import type { diff --git a/src/infra/system-run-normalize.ts b/src/infra/system-run-normalize.ts index 850685e033b..cbf37809356 100644 --- a/src/infra/system-run-normalize.ts +++ b/src/infra/system-run-normalize.ts @@ -1,4 +1,4 @@ -import { mapAllowFromEntries } from "../plugin-sdk/channel-config-helpers.js"; +import { mapAllowFromEntries } from "openclaw/plugin-sdk/channel-config-helpers"; export function normalizeNonEmptyString(value: unknown): string | null { if (typeof value !== "string") { diff --git a/src/line/bot-handlers.ts b/src/line/bot-handlers.ts index 96d82afd33c..0a0d91bf19f 100644 --- a/src/line/bot-handlers.ts +++ b/src/line/bot-handlers.ts @@ -7,6 +7,7 @@ import type { LeaveEvent, PostbackEvent, } from "@line/bot-sdk"; +import { evaluateMatchedGroupAccessForPolicy } from "openclaw/plugin-sdk/group-access"; import { hasControlCommand } from "../auto-reply/command-detection.js"; import { clearHistoryEntriesIfEnabled, @@ -30,7 +31,6 @@ import { readChannelAllowFromStore, upsertChannelPairingRequest, } from "../pairing/pairing-store.js"; -import { evaluateMatchedGroupAccessForPolicy } from "../plugin-sdk/group-access.js"; import { resolveAgentRoute } from "../routing/resolve-route.js"; import type { RuntimeEnv } from "../runtime.js"; import { diff --git a/src/security/dm-policy-shared.ts b/src/security/dm-policy-shared.ts index 7f42f02519e..fdab6636009 100644 --- a/src/security/dm-policy-shared.ts +++ b/src/security/dm-policy-shared.ts @@ -1,9 +1,9 @@ +import { evaluateMatchedGroupAccessForPolicy } from "openclaw/plugin-sdk/group-access"; import { mergeDmAllowFromSources, resolveGroupAllowFromSources } from "../channels/allow-from.js"; import { resolveControlCommandGate } from "../channels/command-gating.js"; import type { ChannelId } from "../channels/plugins/types.js"; import type { GroupPolicy } from "../config/types.base.js"; import { readChannelAllowFromStore } from "../pairing/pairing-store.js"; -import { evaluateMatchedGroupAccessForPolicy } from "../plugin-sdk/group-access.js"; import { normalizeStringEntries } from "../shared/string-normalization.js"; export function resolvePinnedMainDmOwnerFromAllowlist(params: {