diff --git a/src/agents/pi-embedded-runner/compact.ts b/src/agents/pi-embedded-runner/compact.ts index 587a0e9214d..0dfc727dee1 100644 --- a/src/agents/pi-embedded-runner/compact.ts +++ b/src/agents/pi-embedded-runner/compact.ts @@ -7,6 +7,10 @@ import { estimateTokens, SessionManager, } from "@mariozechner/pi-coding-agent"; +import { + resolveTelegramInlineButtonsScope, + resolveTelegramReactionLevel, +} from "openclaw/plugin-sdk/telegram"; import { resolveHeartbeatPrompt } from "../../auto-reply/heartbeat.js"; import type { ReasoningLevel, ThinkLevel } from "../../auto-reply/thinking.js"; import { resolveChannelCapabilities } from "../../config/channel-capabilities.js"; @@ -20,10 +24,6 @@ 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 { - resolveTelegramInlineButtonsScope, - resolveTelegramReactionLevel, -} from "../../plugin-sdk/telegram.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 3c77d877e28..f89759606de 100644 --- a/src/agents/pi-embedded-runner/run/attempt.ts +++ b/src/agents/pi-embedded-runner/run/attempt.ts @@ -7,6 +7,10 @@ import { DefaultResourceLoader, SessionManager, } from "@mariozechner/pi-coding-agent"; +import { + resolveTelegramInlineButtonsScope, + resolveTelegramReactionLevel, +} from "openclaw/plugin-sdk/telegram"; import { resolveHeartbeatPrompt } from "../../../auto-reply/heartbeat.js"; import { resolveChannelCapabilities } from "../../../config/channel-capabilities.js"; import type { OpenClawConfig } from "../../../config/config.js"; @@ -17,10 +21,6 @@ import { } from "../../../infra/net/undici-global-dispatcher.js"; import { MAX_IMAGE_BYTES } from "../../../media/constants.js"; import { resolveSignalReactionLevel } from "../../../plugin-sdk/signal.js"; -import { - resolveTelegramInlineButtonsScope, - resolveTelegramReactionLevel, -} from "../../../plugin-sdk/telegram.js"; import { getGlobalHookRunner } from "../../../plugins/hook-runner-global.js"; import type { PluginHookAgentContext, diff --git a/src/auto-reply/reply/commands-approve.ts b/src/auto-reply/reply/commands-approve.ts index 630ea988c05..05d7fe0139a 100644 --- a/src/auto-reply/reply/commands-approve.ts +++ b/src/auto-reply/reply/commands-approve.ts @@ -1,9 +1,9 @@ -import { callGateway } from "../../gateway/call.js"; -import { logVerbose } from "../../globals.js"; import { isTelegramExecApprovalApprover, isTelegramExecApprovalClientEnabled, -} from "../../plugin-sdk/telegram.js"; +} from "openclaw/plugin-sdk/telegram"; +import { callGateway } from "../../gateway/call.js"; +import { logVerbose } from "../../globals.js"; import { GATEWAY_CLIENT_MODES, GATEWAY_CLIENT_NAMES } from "../../utils/message-channel.js"; import { requireGatewayClientScopeForInternalChannel } from "./command-gates.js"; import type { CommandHandler } from "./commands-types.js"; diff --git a/src/auto-reply/reply/commands-models.ts b/src/auto-reply/reply/commands-models.ts index 25f309361d2..b1a1fcba8da 100644 --- a/src/auto-reply/reply/commands-models.ts +++ b/src/auto-reply/reply/commands-models.ts @@ -1,3 +1,10 @@ +import { + buildModelsKeyboard, + buildProviderKeyboard, + calculateTotalPages, + getModelsPageSize, + type ProviderInfo, +} from "openclaw/plugin-sdk/telegram"; import { resolveAgentDir, resolveSessionAgentId } from "../../agents/agent-scope.js"; import { resolveModelAuthLabel } from "../../agents/model-auth-label.js"; import { loadModelCatalog } from "../../agents/model-catalog.js"; @@ -10,13 +17,6 @@ import { } from "../../agents/model-selection.js"; import type { OpenClawConfig } from "../../config/config.js"; import type { SessionEntry } from "../../config/sessions.js"; -import { - buildModelsKeyboard, - buildProviderKeyboard, - calculateTotalPages, - getModelsPageSize, - type ProviderInfo, -} from "../../plugin-sdk/telegram.js"; import type { ReplyPayload } from "../types.js"; import { rejectUnauthorizedCommand } from "./command-gates.js"; import type { CommandHandler } from "./commands-types.js"; diff --git a/src/auto-reply/reply/directive-handling.model.ts b/src/auto-reply/reply/directive-handling.model.ts index 986f632bcb5..5d8d871f9ec 100644 --- a/src/auto-reply/reply/directive-handling.model.ts +++ b/src/auto-reply/reply/directive-handling.model.ts @@ -1,3 +1,4 @@ +import { buildBrowseProvidersButton } from "openclaw/plugin-sdk/telegram"; import { ensureAuthProfileStore, resolveAuthStorePathForDisplay, @@ -12,7 +13,6 @@ import { } from "../../agents/model-selection.js"; import type { OpenClawConfig } from "../../config/config.js"; import type { SessionEntry } from "../../config/sessions.js"; -import { buildBrowseProvidersButton } from "../../plugin-sdk/telegram.js"; import { shortenHomePath } from "../../utils.js"; import { resolveSelectedAndActiveModel } from "../model-runtime.js"; import type { ReplyPayload } from "../types.js"; diff --git a/src/auto-reply/templating.ts b/src/auto-reply/templating.ts index a32fdc3ba87..4485e2c22ee 100644 --- a/src/auto-reply/templating.ts +++ b/src/auto-reply/templating.ts @@ -1,9 +1,9 @@ +import type { StickerMetadata } from "openclaw/plugin-sdk/telegram"; import type { ChannelId } from "../channels/plugins/types.js"; import type { MediaUnderstandingDecision, MediaUnderstandingOutput, } from "../media-understanding/types.js"; -import type { StickerMetadata } from "../plugin-sdk/telegram.js"; import type { InputProvenance } from "../sessions/input-provenance.js"; import type { InternalMessageChannel } from "../utils/message-channel.js"; import type { CommandArgs } from "./commands-registry.types.js"; diff --git a/src/channels/read-only-account-inspect.telegram.runtime.ts b/src/channels/read-only-account-inspect.telegram.runtime.ts index 01c492dfffd..12158022b2b 100644 --- a/src/channels/read-only-account-inspect.telegram.runtime.ts +++ b/src/channels/read-only-account-inspect.telegram.runtime.ts @@ -1,8 +1,8 @@ -import { inspectTelegramAccount as inspectTelegramAccountImpl } from "../plugin-sdk/telegram.js"; +import { inspectTelegramAccount as inspectTelegramAccountImpl } from "openclaw/plugin-sdk/telegram"; -export type { InspectedTelegramAccount } from "../plugin-sdk/telegram.js"; +export type { InspectedTelegramAccount } from "openclaw/plugin-sdk/telegram"; -type InspectTelegramAccount = typeof import("../plugin-sdk/telegram.js").inspectTelegramAccount; +type InspectTelegramAccount = typeof import("openclaw/plugin-sdk/telegram").inspectTelegramAccount; export function inspectTelegramAccount( ...args: Parameters diff --git a/src/cli/send-runtime/telegram.ts b/src/cli/send-runtime/telegram.ts index 09d5e3e9b19..bfa22643976 100644 --- a/src/cli/send-runtime/telegram.ts +++ b/src/cli/send-runtime/telegram.ts @@ -1,7 +1,7 @@ -import { sendMessageTelegram as sendMessageTelegramImpl } from "../../plugin-sdk/telegram.js"; +import { sendMessageTelegram as sendMessageTelegramImpl } from "openclaw/plugin-sdk/telegram"; type RuntimeSend = { - sendMessage: typeof import("../../plugin-sdk/telegram.js").sendMessageTelegram; + sendMessage: typeof import("openclaw/plugin-sdk/telegram").sendMessageTelegram; }; export const runtimeSend = { diff --git a/src/commands/doctor-config-flow.ts b/src/commands/doctor-config-flow.ts index ae755423987..10721412927 100644 --- a/src/commands/doctor-config-flow.ts +++ b/src/commands/doctor-config-flow.ts @@ -1,5 +1,12 @@ import fs from "node:fs/promises"; import path from "node:path"; +import { + fetchTelegramChatId, + inspectTelegramAccount, + isNumericTelegramUserId, + listTelegramAccountIds, + normalizeTelegramAllowFromEntry, +} from "openclaw/plugin-sdk/telegram"; import { normalizeChatChannelId } from "../channels/registry.js"; import { formatCliCommand } from "../cli/command-format.js"; import { resolveCommandSecretRefsViaGateway } from "../cli/command-secret-gateway.js"; @@ -23,13 +30,6 @@ import { } from "../infra/exec-safe-bin-trust.js"; import { readChannelAllowFromStore } from "../pairing/pairing-store.js"; import { resolveTelegramAccount } from "../plugin-sdk/account-resolution.js"; -import { - fetchTelegramChatId, - inspectTelegramAccount, - isNumericTelegramUserId, - listTelegramAccountIds, - normalizeTelegramAllowFromEntry, -} from "../plugin-sdk/telegram.js"; import { formatChannelAccountsDefaultPath, formatSetExplicitDefaultInstruction, diff --git a/src/infra/state-migrations.ts b/src/infra/state-migrations.ts index b429365a4a4..8c8dd821df6 100644 --- a/src/infra/state-migrations.ts +++ b/src/infra/state-migrations.ts @@ -1,6 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; +import { listTelegramAccountIds } from "openclaw/plugin-sdk/telegram"; import { resolveDefaultAgentId } from "../agents/agent-scope.js"; import type { OpenClawConfig } from "../config/config.js"; import { @@ -15,7 +16,6 @@ import { canonicalizeMainSessionAlias } from "../config/sessions/main-session.js import type { SessionScope } from "../config/sessions/types.js"; import { createSubsystemLogger } from "../logging/subsystem.js"; import { resolveChannelAllowFromPath } from "../pairing/pairing-store.js"; -import { listTelegramAccountIds } from "../plugin-sdk/telegram.js"; import { buildAgentMainSessionKey, DEFAULT_ACCOUNT_ID, diff --git a/src/security/audit-channel.runtime.ts b/src/security/audit-channel.runtime.ts index de2d666cb87..e53c1c19391 100644 --- a/src/security/audit-channel.runtime.ts +++ b/src/security/audit-channel.runtime.ts @@ -1,8 +1,8 @@ -import { readChannelAllowFromStore } from "../pairing/pairing-store.js"; import { isNumericTelegramUserId, normalizeTelegramAllowFromEntry, -} from "../plugin-sdk/telegram.js"; +} from "openclaw/plugin-sdk/telegram"; +import { readChannelAllowFromStore } from "../pairing/pairing-store.js"; import { isDiscordMutableAllowEntry, isZalouserMutableGroupEntry,