/** Default funding-check cadence. */ export declare const DEFAULT_CREDIT_CHECK_INTERVAL_MS = 60000; export interface CreditWatcherDeps { /** The run being watched (for correlation/logging). */ runId: string; /** Resolves true while the org can keep spending; false once it's out of credit. Brokered * (`RunnerControlClient.checkCredit` → `GET /credit`), so the runner never reads billing state directly. */ isFunded: () => Promise; /** Fired exactly once when the org is first seen to be out of credit. */ onExhausted: () => void; intervalMs?: number; } export declare class CreditWatcher { private readonly deps; private timer; private firing; private exhausted; private stopped; constructor(deps: CreditWatcherDeps); /** Begin periodic funding checks. */ start(): void; /** Stop checking and drain any in-flight check. Idempotent. */ stop(): Promise; /** Whether exhaustion was detected (the orchestrator may read this to shape the terminal result). */ isExhausted(): boolean; /** True once the watcher should no longer act. A method (not an inline field read) so it's * re-evaluated after an `await` — `stop()` can flip `stopped` mid-check. */ private done; private check; }