UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

16 lines (15 loc) • 972 B
import { t as formatCliCommand } from "./command-format-DwEdrDKL.mjs"; import { t as quoteCliArg } from "./quote-cli-arg-BEt71TUh.mjs"; import { t as note } from "./note-Bi0VsI6R.mjs"; import { n as countFailedChannelIngressQueueEntries } from "./ingress-queue-health-Bi4gQP22.mjs"; //#region src/commands/doctor-channel-ingress.ts async function noteChannelIngressDeadLetters(options = {}) { const failed = await countFailedChannelIngressQueueEntries(options.stateDir); const first = failed[0]; if (!first) return; const lines = failed.map((entry) => `- ${entry.channelId}/${entry.accountId}: ${entry.count} dead-lettered ingress event${entry.count === 1 ? "" : "s"}.`); lines.push(`- Inspect with ${formatCliCommand(`openclaw channels dead-letters list --channel ${quoteCliArg(first.channelId)} --account ${quoteCliArg(first.accountId)}`)}.`); (options.noteFn ?? note)(lines.join("\n"), "Channel ingress"); } //#endregion export { noteChannelIngressDeadLetters };