Multi-Agent Collaboration for Team and Friends
TypeScript agent-automationagent-orchestrationagent-workflowai-agentsai-collaborationai-memoryai-workforceautonomous-agentsclaude-codeclaude-code-skillscodexcoding-agentmulti-agentmultiple-agentone-person-businessone-person-companyone-person-teamopencodesolopreneur
chore: increase offline threshold to 30s, heartbeat interval to 15s
Gener42fa188f652e
diff --git a/src/cli/daemon/config.ts b/src/cli/daemon/config.tsindex 14d8d072d..562fef4ba 100644--- a/src/cli/daemon/config.ts+++ b/src/cli/daemon/config.ts@@ -108,7 +108,7 @@ export function loadDaemonConfig(profile?: string): DaemonConfig {process.env.ALOOK_DAEMON_POLL_INTERVAL || "3s",),wsPollInterval: parseDuration(process.env.ALOOK_DAEMON_WS_POLL_INTERVAL || "60s"),- heartbeatInterval: parseDuration(process.env.ALOOK_DAEMON_HEARTBEAT_INTERVAL || "5s"),+ heartbeatInterval: parseDuration(process.env.ALOOK_DAEMON_HEARTBEAT_INTERVAL || "15s"),sweepInterval: parseDuration(process.env.ALOOK_DAEMON_SWEEP_INTERVAL || "60s"),agentTimeout: parseDuration(process.env.ALOOK_AGENT_TIMEOUT || "12h"),messageInactivityTimeout: parseDuration(process.env.ALOOK_MESSAGE_INACTIVITY_TIMEOUT || "20m"),diff --git a/src/shared/src/constants.ts b/src/shared/src/constants.tsindex c652f6058..65933c8f0 100644--- a/src/shared/src/constants.ts+++ b/src/shared/src/constants.ts@@ -87,7 +87,7 @@ export type MessageRoleType = (typeof MessageRole)[keyof typeof MessageRole];// Timing constantsexport const POLL_INTERVAL_MS = Number(process.env.POLL_INTERVAL_MS) || 3_000;-export const OFFLINE_THRESHOLD_MS = Number(process.env.OFFLINE_THRESHOLD_MS) || 9_000;+export const OFFLINE_THRESHOLD_MS = Number(process.env.OFFLINE_THRESHOLD_MS) || 30_000;export const EVENT_POLL_INTERVAL_MS = Number(process.env.EVENT_POLL_INTERVAL_MS) || 2_000;export const AGENT_HANDLE_MIN_LENGTH = 4;export const MAX_TASKS_PER_TRACE = 256;diff --git a/src/shared/test/constants.test.ts b/src/shared/test/constants.test.tsindex 2b54f1944..96b3a42fc 100644--- a/src/shared/test/constants.test.ts+++ b/src/shared/test/constants.test.ts@@ -5,7 +5,7 @@ import {} from "../src/constants"describe("constants", () => {- it("OFFLINE_THRESHOLD_MS is 3x POLL_INTERVAL", () => expect(OFFLINE_THRESHOLD_MS).toBe(POLL_INTERVAL_MS * 3))+ it("OFFLINE_THRESHOLD_MS is 30s", () => expect(OFFLINE_THRESHOLD_MS).toBe(30_000))it("AGENT_HANDLE_MIN_LENGTH is 4", () => expect(AGENT_HANDLE_MIN_LENGTH).toBe(4))it("EVENT_POLL < POLL_INTERVAL", () => expect(EVENT_POLL_INTERVAL_MS).toBeLessThan(POLL_INTERVAL_MS))})diff --git a/src/web/src/app/api/agents/route.test.ts b/src/web/src/app/api/agents/route.test.tsindex 80d1f93e3..35d138c9a 100644--- a/src/web/src/app/api/agents/route.test.ts+++ b/src/web/src/app/api/agents/route.test.ts@@ -16,7 +16,7 @@ vi.mock("@alook/shared", async () => {return {...actual,createDb: vi.fn(() => ({})),- isOnline: vi.fn((t: string | null) => !!t && Date.now() - new Date(t).getTime() < 9000),+ isOnline: vi.fn((t: string | null) => !!t && Date.now() - new Date(t).getTime() < 30_000),queries: {agent: {listAgents: (...args: unknown[]) => mockListAgents(...args),diff --git a/src/web/src/app/api/studios/route.test.ts b/src/web/src/app/api/studios/route.test.tsindex fe72149a6..719f82ea5 100644--- a/src/web/src/app/api/studios/route.test.ts+++ b/src/web/src/app/api/studios/route.test.ts@@ -37,7 +37,7 @@ vi.mock("@alook/shared", async () => {return {...actual,createDb: vi.fn(() => ({})),- isOnline: vi.fn((t: string | null) => !!t && Date.now() - new Date(t).getTime() < 9000),+ isOnline: vi.fn((t: string | null) => !!t && Date.now() - new Date(t).getTime() < 30_000),queries: {agent: {createAgent: (...args: unknown[]) => mockCreateAgent(...args),