refactor(cli): split outbound send deps

This commit is contained in:
Peter Steinberger
2026-01-17 05:04:40 +00:00
parent bc49c20434
commit 572e04d5fb
5 changed files with 30 additions and 4 deletions

View File

@@ -1,8 +1,7 @@
import { getChannelPlugin, normalizeChannelId } from "../../channels/plugins/index.js";
import type { ChannelOutboundTargetMode } from "../../channels/plugins/types.js";
import { DEFAULT_CHAT_CHANNEL } from "../../channels/registry.js";
import type { CliDeps } from "../../cli/deps.js";
import { createOutboundSendDeps } from "../../cli/deps.js";
import { createOutboundSendDeps, type CliDeps } from "../../cli/outbound-send-deps.js";
import type { ClawdbotConfig } from "../../config/config.js";
import type { SessionEntry } from "../../config/sessions.js";
import { deliverOutboundPayloads } from "../../infra/outbound/deliver.js";

View File

@@ -316,6 +316,10 @@ vi.mock("./doctor-state-migrations.js", () => ({
}),
}));
vi.mock("./doctor-update.js", () => ({
maybeOfferUpdateBeforeDoctor: vi.fn().mockResolvedValue({ handled: false }),
}));
describe("doctor command", () => {
it("warns when the state directory is missing", async () => {
readConfigFileSnapshot.mockResolvedValue({

View File

@@ -2,7 +2,7 @@ import {
CHANNEL_MESSAGE_ACTION_NAMES,
type ChannelMessageActionName,
} from "../channels/plugins/types.js";
import { createOutboundSendDeps, type CliDeps } from "../cli/deps.js";
import { createOutboundSendDeps, type CliDeps } from "../cli/outbound-send-deps.js";
import { withProgress } from "../cli/progress.js";
import { loadConfig } from "../config/config.js";
import type { OutboundSendDeps } from "../infra/outbound/deliver.js";