Plugins: internalize telegram SDK imports
This commit is contained in:
parent
0bdd17aef2
commit
df79113593
@ -1,8 +1,49 @@
|
||||
export * from "./src/audit.js";
|
||||
export * from "./src/action-runtime.js";
|
||||
export * from "./src/channel-actions.js";
|
||||
export * from "./src/monitor.js";
|
||||
export * from "./src/probe.js";
|
||||
export * from "./src/send.js";
|
||||
export * from "./src/thread-bindings.js";
|
||||
export * from "./src/token.js";
|
||||
export type {
|
||||
ChannelPlugin,
|
||||
OpenClawConfig,
|
||||
TelegramActionConfig,
|
||||
} from "../../src/plugin-sdk/telegram-core.js";
|
||||
export type { ChannelMessageActionAdapter } from "../../src/channels/plugins/types.js";
|
||||
export type { TelegramAccountConfig, TelegramNetworkConfig } from "../../src/config/types.js";
|
||||
export type {
|
||||
OpenClawPluginApi,
|
||||
OpenClawPluginService,
|
||||
OpenClawPluginServiceContext,
|
||||
PluginLogger,
|
||||
} from "../../src/plugins/types.js";
|
||||
export type {
|
||||
AcpRuntime,
|
||||
AcpRuntimeCapabilities,
|
||||
AcpRuntimeDoctorReport,
|
||||
AcpRuntimeEnsureInput,
|
||||
AcpRuntimeEvent,
|
||||
AcpRuntimeHandle,
|
||||
AcpRuntimeStatus,
|
||||
AcpRuntimeTurnInput,
|
||||
AcpSessionUpdateTag,
|
||||
} from "../../src/acp/runtime/types.js";
|
||||
export type { AcpRuntimeErrorCode } from "../../src/acp/runtime/errors.js";
|
||||
export { AcpRuntimeError } from "../../src/acp/runtime/errors.js";
|
||||
|
||||
export { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "../../src/routing/session-key.js";
|
||||
export {
|
||||
buildChannelConfigSchema,
|
||||
getChatChannelMeta,
|
||||
jsonResult,
|
||||
readNumberParam,
|
||||
readReactionParams,
|
||||
readStringArrayParam,
|
||||
readStringOrNumberParam,
|
||||
readStringParam,
|
||||
resolvePollMaxSelections,
|
||||
TelegramConfigSchema,
|
||||
} from "../../src/plugin-sdk/telegram-core.js";
|
||||
export { parseTelegramTopicConversation } from "../../src/acp/conversation-id.js";
|
||||
export { clearAccountEntryFields } from "../../src/channels/plugins/config-helpers.js";
|
||||
export { buildTokenChannelStatusSummary } from "../../src/plugin-sdk/status-helpers.js";
|
||||
export {
|
||||
projectCredentialSnapshotFields,
|
||||
resolveConfiguredFromCredentialStatuses,
|
||||
} from "../../src/channels/account-snapshot-fields.js";
|
||||
export { resolveTelegramPollVisibility } from "../../src/poll-params.js";
|
||||
export { PAIRING_APPROVED_MESSAGE } from "../../src/channels/plugins/pairing-message.js";
|
||||
|
||||
@ -8,7 +8,7 @@ import {
|
||||
import { tryReadSecretFileSync } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { resolveDefaultSecretProviderAlias } from "openclaw/plugin-sdk/provider-auth";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
||||
import type { TelegramAccountConfig } from "openclaw/plugin-sdk/telegram";
|
||||
import type { TelegramAccountConfig } from "../runtime-api.js";
|
||||
import {
|
||||
mergeTelegramAccountConfig,
|
||||
resolveDefaultTelegramAccountId,
|
||||
|
||||
@ -16,7 +16,7 @@ import {
|
||||
} from "openclaw/plugin-sdk/routing";
|
||||
import { formatSetExplicitDefaultInstruction } from "openclaw/plugin-sdk/routing";
|
||||
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
||||
import type { TelegramAccountConfig, TelegramActionConfig } from "openclaw/plugin-sdk/telegram";
|
||||
import type { TelegramAccountConfig, TelegramActionConfig } from "../runtime-api.js";
|
||||
import { resolveTelegramToken } from "./token.js";
|
||||
|
||||
let log: ReturnType<typeof createSubsystemLogger> | null = null;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import type { AgentToolResult } from "@mariozechner/pi-agent-core";
|
||||
import { readBooleanParam } from "openclaw/plugin-sdk/boolean-param";
|
||||
import { resolveReactionMessageId } from "openclaw/plugin-sdk/channel-runtime";
|
||||
import { resolveTelegramPollVisibility } from "openclaw/plugin-sdk/telegram";
|
||||
import { resolveTelegramPollVisibility } from "../runtime-api.js";
|
||||
import {
|
||||
jsonResult,
|
||||
readNumberParam,
|
||||
@ -12,7 +12,7 @@ import {
|
||||
resolvePollMaxSelections,
|
||||
type OpenClawConfig,
|
||||
type TelegramActionConfig,
|
||||
} from "openclaw/plugin-sdk/telegram-core";
|
||||
} from "../runtime-api.js";
|
||||
import { createTelegramActionGate, resolveTelegramPollActionGateState } from "./accounts.js";
|
||||
import type { TelegramButtonStyle, TelegramInlineButtons } from "./button-types.js";
|
||||
import { resolveTelegramInlineButtons } from "./button-types.js";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
|
||||
import type { OpenClawConfig, TelegramAccountConfig } from "openclaw/plugin-sdk/telegram";
|
||||
import { vi } from "vitest";
|
||||
import type { OpenClawConfig, TelegramAccountConfig } from "../runtime-api.js";
|
||||
import type { RegisterTelegramNativeCommandsParams } from "./bot-native-commands.js";
|
||||
|
||||
export type NativeCommandTestParams = RegisterTelegramNativeCommandsParams;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/telegram";
|
||||
import { expect, vi } from "vitest";
|
||||
import type { OpenClawConfig } from "../runtime-api.js";
|
||||
import type { TelegramBotDeps } from "./bot-deps.js";
|
||||
import {
|
||||
createNativeCommandTestParams as createBaseNativeCommandTestParams,
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { type ChannelPlugin } from "openclaw/plugin-sdk/telegram";
|
||||
import { type ChannelPlugin } from "../runtime-api.js";
|
||||
import { type ResolvedTelegramAccount } from "./accounts.js";
|
||||
import type { TelegramProbe } from "./probe.js";
|
||||
import { telegramSetupAdapter } from "./setup-core.js";
|
||||
|
||||
@ -10,7 +10,7 @@ import { buildOutboundBaseSessionKey, normalizeOutboundThreadId } from "openclaw
|
||||
import { resolveExecApprovalCommandDisplay } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { buildExecApprovalPendingReplyPayload } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { resolveThreadSessionKeys, type RoutePeer } from "openclaw/plugin-sdk/routing";
|
||||
import { parseTelegramTopicConversation } from "openclaw/plugin-sdk/telegram";
|
||||
import { parseTelegramTopicConversation } from "../runtime-api.js";
|
||||
import {
|
||||
buildTokenChannelStatusSummary,
|
||||
clearAccountEntryFields,
|
||||
@ -21,7 +21,7 @@ import {
|
||||
type ChannelPlugin,
|
||||
type ChannelMessageActionAdapter,
|
||||
type OpenClawConfig,
|
||||
} from "openclaw/plugin-sdk/telegram";
|
||||
} from "../runtime-api.js";
|
||||
import {
|
||||
listTelegramAccountIds,
|
||||
resolveTelegramAccount,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import type { BaseProbeResult } from "openclaw/plugin-sdk/channel-runtime";
|
||||
import type { TelegramNetworkConfig } from "openclaw/plugin-sdk/telegram";
|
||||
import { fetchWithTimeout } from "openclaw/plugin-sdk/text-runtime";
|
||||
import type { TelegramNetworkConfig } from "../runtime-api.js";
|
||||
import { resolveTelegramFetch } from "./fetch.js";
|
||||
import { makeProxyFetch } from "./proxy.js";
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import {
|
||||
TelegramConfigSchema,
|
||||
type ChannelPlugin,
|
||||
type OpenClawConfig,
|
||||
} from "openclaw/plugin-sdk/telegram-core";
|
||||
} from "../runtime-api.js";
|
||||
import { inspectTelegramAccount } from "./account-inspect.js";
|
||||
import {
|
||||
listTelegramAccountIds,
|
||||
|
||||
@ -3,7 +3,7 @@ import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { tryReadSecretFileSync } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/routing";
|
||||
import type { TelegramAccountConfig } from "openclaw/plugin-sdk/telegram";
|
||||
import type { TelegramAccountConfig } from "../runtime-api.js";
|
||||
|
||||
export type TelegramTokenSource = "env" | "tokenFile" | "config" | "none";
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user