import type { SessionManager } from "@caupulican/pi-agent-core/node"; import type { Usage } from "@caupulican/pi-ai"; import type { CapabilityEnvelope, WorkerClaim, WorkerClaimStatus, WorkerRequest } from "../autonomy/contracts.ts"; import { type LaneRecord, type LaneTerminalStatus } from "../autonomy/lane-tracker.ts"; import type { ManagedLaneEvent } from "../extensions/types.ts"; import type { GoalState } from "../goals/goal-state.ts"; import type { WorkerLifecycle } from "./worker-lifecycle.ts"; export declare function resolveManagedLaneTerminalStatus(status: string | undefined): LaneTerminalStatus; export declare function mapManagedLaneTerminalStatus(status: LaneTerminalStatus): WorkerClaimStatus; export interface ManagedLaneControllerDeps { isDisposed(): boolean; getAgentDir(): string; getCwd(): string; getSessionManager(): SessionManager; getGoalStateSnapshot(): GoalState | undefined; getCapabilityEnvelope(): CapabilityEnvelope | undefined; saveWorkerClaimSnapshot(claim: WorkerClaim, request?: WorkerRequest): string; /** Optional only for minimal host embeddings; normal AgentSession integration always supplies this. */ addSpawnedUsage?(usage: Usage, opts: { label?: string; sourceSessionId?: string; reportId: string; }): string | undefined; } /** Out-of-process adapter over the same durable worker lifecycle used by in-process delegation. */ export declare class ManagedLaneController { private readonly deps; private readonly lifecycle; private readonly recordTerminal; private readonly warn; private readonly deregisterByLane; private hydrated; constructor(deps: ManagedLaneControllerDeps, lifecycle: WorkerLifecycle, recordTerminal: (record: LaneRecord, durableNotificationId: string) => void, warn?: (message: string) => void); ensureHydrated(): void; resolve(callerLaneId: string): string | undefined; record(event: ManagedLaneEvent): LaneRecord | undefined; release(): void; private ensureRegistration; private releaseRegistration; /** A replay after a crash between claim append and lifecycle finalization must not duplicate the claim. */ private hasPersistedClaimForAttempt; private compileGrant; } //# sourceMappingURL=managed-lane-controller.d.ts.map