/** * /loop — cron scheduler, Cron* tools, and autonomous continuation. * * `/loop` schedules prompts via cron and drives autonomous continuation. The same * scheduler backs the agent-callable CronCreate/CronList/CronDelete tools. * * /loop "" schedule recurring (5-field cron, local time) * /loop <5m|2h|1d> schedule recurring at a simple interval * /loop once "" schedule a one-shot * /loop list | /loop delete | /loop stop * /loop auto [--max-turns N] keep iterating until the task says LOOP_DONE */ import type { ExtensionAPI } from "../../core/extensions/types.js"; /** Sentinel the agent replies with to declare the autonomous loop finished. */ export declare const AUTO_LOOP_DONE_TOKEN = "LOOP_DONE"; /** * Event-bus channel: the autonomous-loop active state changed. * Payload: `{ active: boolean }`. Emitted whenever `/loop auto` starts or stops * so other extensions (e.g. ask_options) can adapt to running unattended. */ export declare const LOOP_AUTO_CHANGED = "loop:auto-changed"; /** * Event-bus channel: request to halt the autonomous loop. * Payload: `{ reason: string }`. Sent by another extension when it hits a * blocker that requires a human decision the loop cannot safely make on its own. */ export declare const LOOP_HALT = "loop:halt"; /** * Event-bus channel: start the autonomous loop. * Payload: {@link LoopAutoStartPayload}. Mirrors LOOP_HALT in the opposite * direction, letting another extension (e.g. `/goal`) drive the loop without * reaching into state that lives inside this module's closure. */ export declare const LOOP_AUTO_START = "loop:auto-start"; /** Payload for {@link LOOP_AUTO_START}. */ export interface LoopAutoStartPayload { /** The task to work toward, delivered as the loop's first user message. */ task: string; /** Turn budget before the loop stops itself. Defaults to 10. */ maxTurns?: number; /** * Message re-sent on each continuation. Callers with a concrete completion * condition should restate it here, so the target does not drift out of view * as the transcript grows. Defaults to a generic nudge. */ continuePrompt?: string; } export declare function setupLoop(hoo: ExtensionAPI): void; //# sourceMappingURL=loop.d.ts.map