fix(config): add timeoutSeconds support to agents.defaults.heartbeat

The heartbeat config schema was missing the timeoutSeconds field that was
documented in heartbeat.md. This caused config validation to fail when users
set timeoutSeconds under agents.defaults.heartbeat.

Changes:
- Add timeoutSeconds to HeartbeatSchema (z.number().int().positive().optional())
- Add timeoutSeconds type definition in AgentDefaultsConfig
- Add JSDoc comment for the new field

Fixes #64437

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Bulloda
2026-04-10 13:18:56 -07:00
committed by Peter Steinberger
parent 5c126dc6ac
commit 2e8b6eac8d
2 changed files with 3 additions and 0 deletions

View File

@@ -299,6 +299,8 @@ export type AgentDefaultsConfig = {
ackMaxChars?: number;
/** Suppress tool error warning payloads during heartbeat runs. */
suppressToolErrorWarnings?: boolean;
/** Run timeout in seconds for heartbeat agent turns. */
timeoutSeconds?: number;
/**
* If true, run heartbeat turns with lightweight bootstrap context.
* Lightweight mode keeps only HEARTBEAT.md from workspace bootstrap files.

View File

@@ -38,6 +38,7 @@ export const HeartbeatSchema = z
includeSystemPromptSection: z.boolean().optional(),
ackMaxChars: z.number().int().nonnegative().optional(),
suppressToolErrorWarnings: z.boolean().optional(),
timeoutSeconds: z.number().int().positive().optional(),
lightContext: z.boolean().optional(),
isolatedSession: z.boolean().optional(),
})