mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-20 13:41:30 +00:00
fix: avoid telegram plugin self-recursive sdk imports
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { resolveAccountWithDefaultFallback } from "openclaw/plugin-sdk/account-resolution";
|
||||
import { resolveAccountWithDefaultFallback } from "openclaw/plugin-sdk/account-core";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { coerceSecretRef } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { tryReadSecretFileSync } from "openclaw/plugin-sdk/core";
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
resolveListedDefaultAccountId,
|
||||
resolveAccountWithDefaultFallback,
|
||||
type OpenClawConfig,
|
||||
} from "openclaw/plugin-sdk/account-resolution";
|
||||
} from "openclaw/plugin-sdk/account-core";
|
||||
import {
|
||||
listBoundAccountIds,
|
||||
resolveDefaultAgentBoundAccountId,
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
resolvePollMaxSelections,
|
||||
type OpenClawConfig,
|
||||
type TelegramActionConfig,
|
||||
} from "../runtime-api.js";
|
||||
} from "openclaw/plugin-sdk/telegram-core";
|
||||
import { createTelegramActionGate, resolveTelegramPollActionGateState } from "./accounts.js";
|
||||
import type { TelegramButtonStyle, TelegramInlineButtons } from "./button-types.js";
|
||||
import { resolveTelegramInlineButtons } from "./button-types.js";
|
||||
|
||||
@@ -23,17 +23,17 @@ import {
|
||||
createComputedAccountStatusAdapter,
|
||||
createDefaultChannelRuntimeState,
|
||||
} from "openclaw/plugin-sdk/status-helpers";
|
||||
import { parseTelegramTopicConversation } from "../runtime-api.js";
|
||||
import {
|
||||
buildTokenChannelStatusSummary,
|
||||
clearAccountEntryFields,
|
||||
DEFAULT_ACCOUNT_ID,
|
||||
PAIRING_APPROVED_MESSAGE,
|
||||
parseTelegramTopicConversation,
|
||||
projectCredentialSnapshotFields,
|
||||
resolveConfiguredFromCredentialStatuses,
|
||||
type ChannelMessageActionAdapter,
|
||||
type OpenClawConfig,
|
||||
} from "../runtime-api.js";
|
||||
} from "openclaw/plugin-sdk/telegram-core";
|
||||
import {
|
||||
listTelegramAccountIds,
|
||||
resolveTelegramAccount,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { resolveNormalizedAccountEntry } from "openclaw/plugin-sdk/account-resolution";
|
||||
import { resolveNormalizedAccountEntry } from "openclaw/plugin-sdk/account-core";
|
||||
import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
|
||||
import {
|
||||
adaptScopedAccountAccessor,
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
normalizeAccountId,
|
||||
type ChannelPlugin,
|
||||
type OpenClawConfig,
|
||||
} from "../runtime-api.js";
|
||||
} from "openclaw/plugin-sdk/telegram-core";
|
||||
import { inspectTelegramAccount } from "./account-inspect.js";
|
||||
import {
|
||||
listTelegramAccountIds,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { resolveNormalizedAccountEntry } from "openclaw/plugin-sdk/account-resolution";
|
||||
import { resolveNormalizedAccountEntry } from "openclaw/plugin-sdk/account-core";
|
||||
import type { BaseTokenResolution } from "openclaw/plugin-sdk/channel-contract";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { tryReadSecretFileSync } from "openclaw/plugin-sdk/core";
|
||||
|
||||
@@ -55,6 +55,26 @@ const SAME_CHANNEL_SDK_GUARDS: GuardedSource[] = [
|
||||
path: bundledPluginFile("telegram", "src/shared.ts"),
|
||||
forbiddenPatterns: [/["']openclaw\/plugin-sdk\/telegram["']/, /plugin-sdk-internal\/telegram/],
|
||||
},
|
||||
{
|
||||
path: bundledPluginFile("telegram", "src/account-inspect.ts"),
|
||||
forbiddenPatterns: [/["']openclaw\/plugin-sdk\/account-resolution["']/],
|
||||
},
|
||||
{
|
||||
path: bundledPluginFile("telegram", "src/accounts.ts"),
|
||||
forbiddenPatterns: [/["']openclaw\/plugin-sdk\/account-resolution["']/],
|
||||
},
|
||||
{
|
||||
path: bundledPluginFile("telegram", "src/token.ts"),
|
||||
forbiddenPatterns: [/["']openclaw\/plugin-sdk\/account-resolution["']/],
|
||||
},
|
||||
{
|
||||
path: bundledPluginFile("telegram", "src/channel.ts"),
|
||||
forbiddenPatterns: [/["']\.\.\/runtime-api\.js["']/],
|
||||
},
|
||||
{
|
||||
path: bundledPluginFile("telegram", "src/action-runtime.ts"),
|
||||
forbiddenPatterns: [/["']\.\.\/runtime-api\.js["']/],
|
||||
},
|
||||
{
|
||||
path: bundledPluginFile("imessage", "src/shared.ts"),
|
||||
forbiddenPatterns: [/["']openclaw\/plugin-sdk\/imessage["']/, /plugin-sdk-internal\/imessage/],
|
||||
|
||||
Reference in New Issue
Block a user