import { type ResidentDecision, type ResidentExecutionStore, type ResidentState } from './store.js'; /** @experimental Developer-owned step; bind providers, tools and budgets in the host. */ export type ResidentStep = (state: ResidentState, signal: AbortSignal) => Promise; /** @experimental No model is invoked for an idle, terminal or unresolved resident. */ export type ResidentStepResult = { status: 'settled'; state: ResidentState; } | { status: 'idle'; reason: 'not-due' | 'terminal' | 'unresolved' | 'contended'; state: ResidentState; }; /** @experimental A failed/aborted callback leaves its durable claim unresolved. */ export declare function stepResident(store: ResidentExecutionStore, step: ResidentStep, signal: AbortSignal, now?: () => number): Promise; /** @experimental Bounded local driver; not a daemon, process recovery service or notification transport. */ export interface ResidentLoopOptions { readonly store: ResidentExecutionStore; readonly step: ResidentStep; readonly signal: AbortSignal; /** Required finite admission cap for this invocation, independent of provider token limits. */ readonly maxSteps: number; /** Maximum single idle wait, default 60 seconds. Longer waits return control to the host. */ readonly maxIdleMs?: number; } /** * @experimental Continue a pursuit without a new user message. Null wake times * and terminal states stop immediately; cancellation also interrupts idle waits. * An abort cannot undo callback effects or forcibly stop a callback ignoring its signal. */ export declare function runResident(options: ResidentLoopOptions): Promise; //# sourceMappingURL=loop.d.ts.map