mirror of https://github.com/openclaw/openclaw.git
refactor: move channel backoff helpers onto runtime-env
This commit is contained in:
parent
01e3dd3508
commit
00dcfa1b3d
|
|
@ -6,7 +6,6 @@ import {
|
|||
resolveDefaultGroupPolicy,
|
||||
warnMissingProviderGroupPolicyFallbackOnce,
|
||||
} from "openclaw/plugin-sdk/config-runtime";
|
||||
import type { BackoffPolicy } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { waitForTransportReady } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { saveMediaBuffer } from "openclaw/plugin-sdk/media-runtime";
|
||||
import { DEFAULT_GROUP_HISTORY_LIMIT, type HistoryEntry } from "openclaw/plugin-sdk/reply-history";
|
||||
|
|
@ -20,7 +19,11 @@ import {
|
|||
resolveChunkMode,
|
||||
resolveTextChunkLimit,
|
||||
} from "openclaw/plugin-sdk/reply-runtime";
|
||||
import { createNonExitingRuntime, type RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
|
||||
import {
|
||||
createNonExitingRuntime,
|
||||
type BackoffPolicy,
|
||||
type RuntimeEnv,
|
||||
} from "openclaw/plugin-sdk/runtime-env";
|
||||
import { normalizeStringEntries } from "openclaw/plugin-sdk/text-runtime";
|
||||
import { normalizeE164 } from "openclaw/plugin-sdk/text-runtime";
|
||||
import { resolveSignalAccount } from "./accounts.js";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,11 @@
|
|||
import type { BackoffPolicy } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { computeBackoff, sleepWithAbort } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { logVerbose, shouldLogVerbose } from "openclaw/plugin-sdk/runtime-env";
|
||||
import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
|
||||
import {
|
||||
computeBackoff,
|
||||
logVerbose,
|
||||
shouldLogVerbose,
|
||||
sleepWithAbort,
|
||||
type BackoffPolicy,
|
||||
type RuntimeEnv,
|
||||
} from "openclaw/plugin-sdk/runtime-env";
|
||||
import { type SignalSseEvent, streamSignalEvents } from "./client.js";
|
||||
|
||||
const DEFAULT_RECONNECT_POLICY: BackoffPolicy = {
|
||||
|
|
|
|||
|
|
@ -16,13 +16,17 @@ import {
|
|||
} from "openclaw/plugin-sdk/config-runtime";
|
||||
import type { SessionScope } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { createConnectedChannelStatusPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
||||
import { computeBackoff, sleepWithAbort } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { installRequestBodyLimitGuard } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { DEFAULT_GROUP_HISTORY_LIMIT } from "openclaw/plugin-sdk/reply-history";
|
||||
import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-runtime";
|
||||
import { normalizeMainKey } from "openclaw/plugin-sdk/routing";
|
||||
import { warn } from "openclaw/plugin-sdk/runtime-env";
|
||||
import { createNonExitingRuntime, type RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
|
||||
import {
|
||||
computeBackoff,
|
||||
createNonExitingRuntime,
|
||||
sleepWithAbort,
|
||||
type RuntimeEnv,
|
||||
} from "openclaw/plugin-sdk/runtime-env";
|
||||
import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
||||
import { normalizeStringEntries } from "openclaw/plugin-sdk/text-runtime";
|
||||
import { resolveSlackAccount } from "../accounts.js";
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import { formatCliCommand } from "openclaw/plugin-sdk/cli-runtime";
|
|||
import { waitForever } from "openclaw/plugin-sdk/cli-runtime";
|
||||
import { hasControlCommand } from "openclaw/plugin-sdk/command-auth";
|
||||
import { loadConfig } from "openclaw/plugin-sdk/config-runtime";
|
||||
import { formatDurationPrecise } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { enqueueSystemEvent } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { DEFAULT_GROUP_HISTORY_LIMIT } from "openclaw/plugin-sdk/reply-history";
|
||||
import { getReplyFromConfig } from "openclaw/plugin-sdk/reply-runtime";
|
||||
|
|
@ -11,7 +10,11 @@ import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
|
|||
import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
|
||||
import { registerUnhandledRejectionHandler } from "openclaw/plugin-sdk/runtime-env";
|
||||
import { getChildLogger } from "openclaw/plugin-sdk/runtime-env";
|
||||
import { defaultRuntime, type RuntimeEnv } from "openclaw/plugin-sdk/runtime-env";
|
||||
import {
|
||||
defaultRuntime,
|
||||
formatDurationPrecise,
|
||||
type RuntimeEnv,
|
||||
} from "openclaw/plugin-sdk/runtime-env";
|
||||
import { resolveWhatsAppAccount, resolveWhatsAppMediaMaxBytes } from "../accounts.js";
|
||||
import { setActiveWebListener } from "../active-listener.js";
|
||||
import { monitorWebInbox } from "../inbound.js";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
import { randomUUID } from "node:crypto";
|
||||
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
|
||||
import type { BackoffPolicy } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import { computeBackoff, sleepWithAbort } from "openclaw/plugin-sdk/infra-runtime";
|
||||
import {
|
||||
computeBackoff,
|
||||
sleepWithAbort,
|
||||
type BackoffPolicy,
|
||||
} from "openclaw/plugin-sdk/runtime-env";
|
||||
import { clamp } from "openclaw/plugin-sdk/text-runtime";
|
||||
|
||||
export type ReconnectPolicy = BackoffPolicy & {
|
||||
|
|
|
|||
Loading…
Reference in New Issue