/** * G6 — skill-level heartbeat scheduler config. * * matter for a Dispatcher (peaks-code / peaks-rd / peaks-qa) can opt * into a non-default heartbeat interval by including a line like: * * heartbeatIntervalSec: 15 * * The default is 30 s (RL-13 empirical sweet spot). The poller * cadence is fixed at 10 s (sub-agent 30 s / poller 10 s is the * jitter-resistant offset). * * This module is a pure-key parser — it takes a SKILL.md body and * returns the effective config. The Dispatcher's prompt template * for sub-agents is then responsible for inlining the chosen value * into the sub-agent prompt so that the LLM knows how often to * call `peaks sub-agent heartbeat`. * * Note: the heartbeat *cadence* the LLM uses is enforced socially * (via the prompt), not via any hook. R-1 / R-8 boundary — LLM * behaviour is not observable. The user has been explicit about * this: "心跳是 sub-agent 主动写, peaks CLI 不观测 LLM 行为". */ export declare const DEFAULT_HEARTBEAT_INTERVAL_SEC = 30; export declare const MIN_HEARTBEAT_INTERVAL_SEC = 5; export declare const MAX_HEARTBEAT_INTERVAL_SEC = 600; export type SkillHeartbeatConfig = { readonly intervalSec: number; /** Source of the chosen value (useful for debugging). */ readonly source: 'default' | 'skill-frontmatter'; }; /** Parse a SKILL.md body for a `heartbeatIntervalSec: ` line. */ export declare function parseHeartbeatConfig(skillBody: string): SkillHeartbeatConfig; /** * Build the heartbeat-instruction paragraph to inline in a sub-agent * prompt. The LLM reads this and adjusts its `peaks sub-agent * heartbeat` cadence accordingly. */ export declare function heartbeatInstructionParagraph(config: SkillHeartbeatConfig): string;