fix: read heartbeat target from per-agent config (#292)

This commit is contained in:
Cameron
2026-02-12 18:36:25 -08:00
committed by GitHub
parent b79d705a99
commit 014c2b56aa
2 changed files with 3 additions and 1 deletions

View File

@@ -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)

View File

@@ -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();