mirror of
https://github.com/moltbot/moltbot.git
synced 2026-04-26 16:06:16 +00:00
chore: purge warelay references
This commit is contained in:
@@ -28,7 +28,7 @@ import {
|
||||
const makeSessionStore = async (
|
||||
entries: Record<string, unknown> = {},
|
||||
): Promise<{ storePath: string; cleanup: () => Promise<void> }> => {
|
||||
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "warelay-session-"));
|
||||
const dir = await fs.mkdtemp(path.join(os.tmpdir(), "clawdis-session-"));
|
||||
const storePath = path.join(dir, "sessions.json");
|
||||
await fs.writeFile(storePath, JSON.stringify(entries));
|
||||
return {
|
||||
@@ -229,7 +229,7 @@ describe("runWebHeartbeatOnce", () => {
|
||||
|
||||
it("does not refresh updatedAt when heartbeat is skipped", async () => {
|
||||
const tmpDir = await fs.mkdtemp(
|
||||
path.join(os.tmpdir(), "warelay-heartbeat-"),
|
||||
path.join(os.tmpdir(), "clawdis-heartbeat-"),
|
||||
);
|
||||
const storePath = path.join(tmpDir, "sessions.json");
|
||||
const now = Date.now();
|
||||
@@ -269,7 +269,7 @@ describe("runWebHeartbeatOnce", () => {
|
||||
|
||||
it("heartbeat reuses existing session id when last inbound is present", async () => {
|
||||
const tmpDir = await fs.mkdtemp(
|
||||
path.join(os.tmpdir(), "warelay-heartbeat-session-"),
|
||||
path.join(os.tmpdir(), "clawdis-heartbeat-session-"),
|
||||
);
|
||||
const storePath = path.join(tmpDir, "sessions.json");
|
||||
const sessionId = "sess-keep";
|
||||
@@ -319,7 +319,7 @@ describe("runWebHeartbeatOnce", () => {
|
||||
|
||||
it("heartbeat honors session-id override and seeds store", async () => {
|
||||
const tmpDir = await fs.mkdtemp(
|
||||
path.join(os.tmpdir(), "warelay-heartbeat-override-"),
|
||||
path.join(os.tmpdir(), "clawdis-heartbeat-override-"),
|
||||
);
|
||||
const storePath = path.join(tmpDir, "sessions.json");
|
||||
await fs.writeFile(storePath, JSON.stringify({}));
|
||||
@@ -527,7 +527,7 @@ describe("web auto-reply", () => {
|
||||
|
||||
it("skips reply heartbeat when requests are running", async () => {
|
||||
const tmpDir = await fs.mkdtemp(
|
||||
path.join(os.tmpdir(), "warelay-heartbeat-queue-"),
|
||||
path.join(os.tmpdir(), "clawdis-heartbeat-queue-"),
|
||||
);
|
||||
const storePath = path.join(tmpDir, "sessions.json");
|
||||
await fs.writeFile(storePath, JSON.stringify({}));
|
||||
@@ -1126,7 +1126,7 @@ describe("web auto-reply", () => {
|
||||
|
||||
it("emits heartbeat logs with connection metadata", async () => {
|
||||
vi.useFakeTimers();
|
||||
const logPath = `/tmp/warelay-heartbeat-${crypto.randomUUID()}.log`;
|
||||
const logPath = `/tmp/clawdis-heartbeat-${crypto.randomUUID()}.log`;
|
||||
setLoggerOverride({ level: "trace", file: logPath });
|
||||
|
||||
const runtime = {
|
||||
@@ -1168,7 +1168,7 @@ describe("web auto-reply", () => {
|
||||
});
|
||||
|
||||
it("logs outbound replies to file", async () => {
|
||||
const logPath = `/tmp/warelay-log-test-${crypto.randomUUID()}.log`;
|
||||
const logPath = `/tmp/clawdis-log-test-${crypto.randomUUID()}.log`;
|
||||
setLoggerOverride({ level: "trace", file: logPath });
|
||||
|
||||
let capturedOnMessage:
|
||||
@@ -1362,7 +1362,7 @@ describe("web auto-reply", () => {
|
||||
sendMedia: vi.fn(),
|
||||
});
|
||||
|
||||
// HEARTBEAT_OK should NOT have prefix - warelay needs exact match
|
||||
// HEARTBEAT_OK should NOT have prefix - clawdis needs exact match
|
||||
expect(reply).toHaveBeenCalledWith(HEARTBEAT_TOKEN);
|
||||
resetLoadConfigMock();
|
||||
});
|
||||
|
||||
@@ -18,7 +18,7 @@ vi.mock("../config/config.js", () => ({
|
||||
|
||||
const HOME = path.join(
|
||||
os.tmpdir(),
|
||||
`warelay-inbound-media-${crypto.randomUUID()}`,
|
||||
`clawdis-inbound-media-${crypto.randomUUID()}`,
|
||||
);
|
||||
process.env.HOME = HOME;
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ describe("web media loading", () => {
|
||||
.jpeg({ quality: 95 })
|
||||
.toBuffer();
|
||||
|
||||
const file = path.join(os.tmpdir(), `warelay-media-${Date.now()}.jpg`);
|
||||
const file = path.join(os.tmpdir(), `clawdis-media-${Date.now()}.jpg`);
|
||||
tmpFiles.push(file);
|
||||
await fs.writeFile(file, buffer);
|
||||
|
||||
@@ -45,7 +45,7 @@ describe("web media loading", () => {
|
||||
})
|
||||
.png()
|
||||
.toBuffer();
|
||||
const wrongExt = path.join(os.tmpdir(), `warelay-media-${Date.now()}.bin`);
|
||||
const wrongExt = path.join(os.tmpdir(), `clawdis-media-${Date.now()}.bin`);
|
||||
tmpFiles.push(wrongExt);
|
||||
await fs.writeFile(wrongExt, pngBuffer);
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ describe("web monitor inbox", () => {
|
||||
it("logs inbound bodies to file", async () => {
|
||||
const logPath = path.join(
|
||||
os.tmpdir(),
|
||||
`warelay-log-test-${crypto.randomUUID()}.log`,
|
||||
`clawdis-log-test-${crypto.randomUUID()}.log`,
|
||||
);
|
||||
setLoggerOverride({ level: "trace", file: logPath });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user