/** * Unattended Automation Policy * * Provides: * - validateAutomationScope: Enforces project, environment, device, and run bounds. * - reserveAutomationWriteBudget: Atomically consumes a lab-runner write slot. */ import type { TargetBinding } from "../target-resolution.js"; /** Explicit repository-local policy required for unattended hardware writes. */ export interface LabRunnerAutomationPolicy { enabled: true; profile: "lab_runner"; allowedOperations: string[]; environment: string; deviceFingerprint: string; expiresAt: string; maxRunDurationSeconds: number; maxConsecutiveFlashes: number; cooldownSeconds: number; } /** Complete, normalized input used for automation policy evaluation. */ export interface AutomationScopeInput { automationKey: string; action: string; projectDir: string; environment?: string; targetBinding?: TargetBinding; maxRunDurationSeconds: number; consecutiveFlashes?: number; lastFlashAt?: string; } /** * Enforces automation scope independently of conversational instructions. * * @param input - Scheduled action, exact target, and finite run constraints. * @returns Validated scope and whether the action changes hardware. */ export declare function validateAutomationScope(input: AutomationScopeInput): { allowed: true; writeOperation: boolean; policyProfile: string; }; /** * Atomically validates and records one unattended hardware-write attempt. * * Failed attempts deliberately consume a slot. A later healthy monitor result * resets the consecutive counter, preventing retry storms while still allowing * an operator-defined recovery loop. * * @param input - Exact scheduled write scope to reserve. * @returns Validated lab-runner scope and the persisted counter value. */ export declare function reserveAutomationWriteBudget(input: AutomationScopeInput): Promise<{ allowed: true; writeOperation: true; policyProfile: "lab_runner"; consecutiveHardwareWrites: number; }>; //# sourceMappingURL=automation-policy.d.ts.map