/** * LoopGuard — Anti-loop circuit breaker for an agent loop. * * Hermes-inspired: tracks the last N tool calls per run and injects a * corrective system instruction if the same tool is called with identical * arguments more than `threshold` times in a row. * * Usage: * const guard = new LoopGuard(); * // inside onStepFinish: * const warning = guard.check(toolName, JSON.stringify(args)); * if (warning) { / inject into messages or tool output / } */ export declare class LoopGuard { private history; private readonly threshold; constructor(threshold?: number); /** * Check whether the agent is stuck in a loop. * Returns a warning string to inject if stuck, or null if clean. * Resets the history window after a loop is detected. */ check(toolName: string, toolInput: string): string | null; /** Reset state between logical tasks. */ reset(): void; } //# sourceMappingURL=loop-guard.d.ts.map