diff --git a/src/cli/deps.ts b/src/cli/deps.ts index e347206bf..41a1118d0 100644 --- a/src/cli/deps.ts +++ b/src/cli/deps.ts @@ -2,6 +2,7 @@ import { sendMessageDiscord } from "../discord/send.js"; import { sendMessageIMessage } from "../imessage/send.js"; import { logWebSelfId, sendMessageWhatsApp } from "../providers/web/index.js"; import { sendMessageSignal } from "../signal/send.js"; +import { sendMessageSlack } from "../slack/send.js"; import { sendMessageTelegram } from "../telegram/send.js"; export type CliDeps = { diff --git a/src/cli/gateway.sigterm.test.ts b/src/cli/gateway.sigterm.test.ts index e7f39bac8..e3e6f6685 100644 --- a/src/cli/gateway.sigterm.test.ts +++ b/src/cli/gateway.sigterm.test.ts @@ -1,5 +1,8 @@ import { spawn } from "node:child_process"; +import fs from "node:fs"; import net from "node:net"; +import os from "node:os"; +import path from "node:path"; import { afterEach, describe, expect, it } from "vitest"; const waitForPortOpen = async ( @@ -72,8 +75,11 @@ describe("gateway SIGTERM", () => { child = null; }); - it("exits 0 on SIGTERM", { timeout: 60_000 }, async () => { + it("exits 0 on SIGTERM", { timeout: 90_000 }, async () => { const port = await getFreePort(); + const stateDir = fs.mkdtempSync( + path.join(os.tmpdir(), "clawdis-gateway-test-"), + ); const out: string[] = []; const err: string[] = []; @@ -94,6 +100,8 @@ describe("gateway SIGTERM", () => { cwd: process.cwd(), env: { ...process.env, + CLAWDIS_STATE_DIR: stateDir, + CLAWDIS_CONFIG_PATH: path.join(stateDir, "clawdis.json"), CLAWDIS_SKIP_PROVIDERS: "1", CLAWDIS_SKIP_BROWSER_CONTROL_SERVER: "1", CLAWDIS_SKIP_CANVAS_HOST: "1", @@ -113,7 +121,7 @@ describe("gateway SIGTERM", () => { child.stdout?.on("data", (d) => out.push(String(d))); child.stderr?.on("data", (d) => err.push(String(d))); - await waitForPortOpen(proc, out, err, port, 45_000); + await waitForPortOpen(proc, out, err, port, 75_000); proc.kill("SIGTERM"); diff --git a/src/infra/heartbeat-runner.ts b/src/infra/heartbeat-runner.ts index 446ea8f68..5099734a8 100644 --- a/src/infra/heartbeat-runner.ts +++ b/src/infra/heartbeat-runner.ts @@ -22,6 +22,7 @@ import { getQueueSize } from "../process/command-queue.js"; import { webAuthExists } from "../providers/web/index.js"; import { defaultRuntime, type RuntimeEnv } from "../runtime.js"; import { sendMessageSignal } from "../signal/send.js"; +import { sendMessageSlack } from "../slack/send.js"; import { sendMessageTelegram } from "../telegram/send.js"; import { normalizeE164 } from "../utils.js"; import { getActiveWebListener } from "../web/active-listener.js";