From 014c2b56aada790b43833061877670267f5cbd6f Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 12 Feb 2026 18:36:25 -0800 Subject: [PATCH] fix: read heartbeat target from per-agent config (#292) --- src/config/types.ts | 2 ++ src/main.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/config/types.ts b/src/config/types.ts index 5a2e9c3..af5bb99 100644 --- a/src/config/types.ts +++ b/src/config/types.ts @@ -56,6 +56,7 @@ export interface AgentConfig { skipRecentUserMin?: number; // Skip auto-heartbeats for N minutes after user message (0 disables) prompt?: string; // Custom heartbeat prompt (replaces default body) promptFile?: string; // Path to prompt file (re-read each tick for live editing) + target?: string; // Delivery target ("telegram:123", "slack:C123", etc.) }; maxToolCalls?: number; }; @@ -120,6 +121,7 @@ export interface LettaBotConfig { skipRecentUserMin?: number; // Skip auto-heartbeats for N minutes after user message (0 disables) prompt?: string; // Custom heartbeat prompt (replaces default body) promptFile?: string; // Path to prompt file (re-read each tick for live editing) + target?: string; // Delivery target ("telegram:123", "slack:C123", etc.) }; inlineImages?: boolean; // Send images directly to the LLM (default: true). Set false to only send file paths. maxToolCalls?: number; // Abort if agent calls this many tools in one turn (default: 100) diff --git a/src/main.ts b/src/main.ts index c233013..df6dfb6 100644 --- a/src/main.ts +++ b/src/main.ts @@ -605,7 +605,7 @@ async function main() { prompt: heartbeatConfig?.prompt || process.env.HEARTBEAT_PROMPT, promptFile: heartbeatConfig?.promptFile, workingDir: globalConfig.workingDir, - target: parseHeartbeatTarget(process.env.HEARTBEAT_TARGET), + target: parseHeartbeatTarget(heartbeatConfig?.target) || parseHeartbeatTarget(process.env.HEARTBEAT_TARGET), }); if (heartbeatConfig?.enabled) { heartbeatService.start();