/** * The automatic refinement gate: after enough assistant turns (or a * compaction), the driver runs the review gate through the model; on approval * it delegates an `AutomaticPlanRequest` to the shared `RefineCoordinator`, * which owns planning, approval, and the store commit. Cooldown and an * in-flight guard prevent spam; per-session counters keep agents independent. * When a session leaves the store, a best-effort final drain awaits in-flight * review work and starts due-but-unstarted gates so scheduled refinement is * not lost. * @module dsh-continual-harness */ import type { Context } from '@deepseek-ai/cordis'; import type { RefineCoordinator } from './coordinator-types.ts'; import type { HarnessStore } from './store.ts'; /** Default turn interval between automatic refinement passes. */ export declare const DEFAULT_TURN_INTERVAL = 25; /** Default cooldown between automatic refinement attempts. */ export declare const DEFAULT_COOLDOWN_MS: number; /** Upper bound the final drain waits on pending/in-flight review work. */ export declare const FINAL_DRAIN_TIMEOUT_MS = 1000; /** Driver options resolved by the plugin. */ export interface DriverOptions { enabled: boolean; turnInterval: number; cooldownMs: number; compact: boolean; plannerMaxTokens: number; maxTrajectoryChars: number; /** Route B: fraction of the trajectory budget reserved for the verbatim signal layer. */ trajectorySignalRatio: number; /** Persist every gate verdict to `reviews.jsonl` under the harness home. */ auditReviews: boolean; } /** The drainable driver surface returned to the plugin. */ export interface HarnessDriver { /** * Best-effort final drain for one session: awaits in-flight review work and * starts a due-but-unstarted gate, bounded by a short timeout. Idempotent; * never throws out of the disposal path. */ finalize(sessionId: string): Promise; } /** Register the automatic refinement gate over the shared coordinator. */ export declare function registerHarnessDriver(ctx: Context, coordinator: RefineCoordinator, store: HarnessStore, options: DriverOptions): HarnessDriver; //# sourceMappingURL=driver.d.ts.map