refactor: move discord duration formatting onto runtime env

This commit is contained in:
Peter Steinberger
2026-03-28 03:17:12 +00:00
parent c1abf7c8c0
commit 0825ff9619
3 changed files with 11 additions and 6 deletions

View File

@@ -1,7 +1,6 @@
import { createRunStateMachine } from "openclaw/plugin-sdk/channel-lifecycle";
import { KeyedAsyncQueue } from "openclaw/plugin-sdk/core";
import { formatDurationSeconds } from "openclaw/plugin-sdk/infra-runtime";
import { danger } from "openclaw/plugin-sdk/runtime-env";
import { danger, formatDurationSeconds } from "openclaw/plugin-sdk/runtime-env";
import { materializeDiscordInboundJob, type DiscordInboundJob } from "./inbound-job.js";
import type { RuntimeEnv } from "./message-handler.preflight.types.js";
import { processDiscordMessage } from "./message-handler.process.js";

View File

@@ -9,11 +9,14 @@ import {
type User,
} from "@buape/carbon";
import type { OpenClawConfig } from "openclaw/plugin-sdk/config-runtime";
import { formatDurationSeconds } from "openclaw/plugin-sdk/infra-runtime";
import { enqueueSystemEvent } from "openclaw/plugin-sdk/infra-runtime";
import { resolveAgentRoute } from "openclaw/plugin-sdk/routing";
import { danger, logVerbose } from "openclaw/plugin-sdk/runtime-env";
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
import {
createSubsystemLogger,
danger,
formatDurationSeconds,
logVerbose,
} from "openclaw/plugin-sdk/runtime-env";
import {
readStoreAllowFromForDmPolicy,
resolveDmGroupAccessWithLists,

View File

@@ -20,7 +20,10 @@ export { isTruthyEnvValue } from "../infra/env.js";
export * from "../logging.js";
export { waitForAbortSignal } from "../infra/abort-signal.js";
export { computeBackoff, sleepWithAbort, type BackoffPolicy } from "../infra/backoff.js";
export { formatDurationPrecise } from "../infra/format-time/format-duration.ts";
export {
formatDurationPrecise,
formatDurationSeconds,
} from "../infra/format-time/format-duration.ts";
export { retryAsync } from "../infra/retry.js";
export { ensureGlobalUndiciEnvProxyDispatcher } from "../infra/net/undici-global-dispatcher.js";
export { registerUnhandledRejectionHandler } from "../infra/unhandled-rejections.js";