import type { CommandMessage, CommandResponse, OrchestrationInput, PilotSwarmSessionStatus, SessionCommandResponse, SessionResponsePayload, TurnAction } from "../types.js"; import { type DurableSessionRuntime } from "./state.js"; export declare function publishStatus(runtime: DurableSessionRuntime, status: PilotSwarmSessionStatus, extra?: Record): void; export declare function readCounter(ctx: any, key: string): number; export declare function writeLatestResponse(runtime: DurableSessionRuntime, payload: Omit): Generator; export declare function writeCommandResponse(runtime: DurableSessionRuntime, response: CommandResponse): Generator; export declare function wrapWithResumeContext(runtime: DurableSessionRuntime, userPrompt: string, extra?: string): string; /** * Session lifecycle protocol (§3.4 tier 3): release the worker affinity by * rotating the GUID — a pure orchestration-state change, no activity at all. * Nothing needs uploading (every completed turn committed its snapshot * inside the runTurn activity) and nothing needs telling the old worker: * its local copy is a cache reclaimed by its own eviction clock. The next * event hydrates wherever duroxide places the new key. */ export declare function releaseAffinity(runtime: DurableSessionRuntime, reason: string, eventData?: Record): Generator; export declare function maybeSummarize(runtime: DurableSessionRuntime): Generator; export declare function ensureTaskContext(runtime: DurableSessionRuntime, sourcePrompt?: string): void; export declare function applyCronAction(runtime: DurableSessionRuntime, action: Extract, sourcePrompt?: string): void; export declare function applyCronAtAction(runtime: DurableSessionRuntime, action: Extract, sourcePrompt?: string): Generator; export declare function drainLeadingQueuedScheduleActions(runtime: DurableSessionRuntime, sourcePrompt?: string): Generator; export declare const drainLeadingQueuedCronActions: typeof drainLeadingQueuedScheduleActions; export declare function promptIdsIntersectCancellation(runtime: DurableSessionRuntime, ids: string[]): boolean; export declare function recordCancelledMessageIds(runtime: DurableSessionRuntime, ids: string[], reason: string): Generator; export declare function bufferChildUpdate(runtime: DurableSessionRuntime, update: { sessionId: string; updateType: string; content: string; cycleOrigin?: "cron" | "cron_at"; cycleStatus?: "quiet" | "material" | "blocked"; verdict?: import("../types.js").ChildSessionVerdict; }, observedAtMs: number): void; /** True when the buffered digest carries a child failure or cancellation — the parent should hear those at once. */ export declare function pendingChildDigestHasError(runtime: DurableSessionRuntime): boolean; export declare function clearPendingChildDigest(runtime: DurableSessionRuntime): void; export declare function buildPendingChildDigestSystemPrompt(runtime: DurableSessionRuntime): string | undefined; export declare function flushPendingChildDigestIntoPrompt(runtime: DurableSessionRuntime, rawPrompt: string | undefined): string | undefined; export declare function queueFollowup(runtime: DurableSessionRuntime, nextPrompt: string): void; export declare function buildContinueInput(runtime: DurableSessionRuntime, overrides?: Partial): OrchestrationInput; export declare function buildContinueInputWithPrompt(runtime: DurableSessionRuntime, nextPrompt?: string, overrides?: Partial): OrchestrationInput; /** Capture the active timer state into a continueAsNew input and yield the version-bumped CAN. */ export declare function versionedContinueAsNew(runtime: DurableSessionRuntime, canInput: OrchestrationInput): Generator; export declare function continueInput(runtime: DurableSessionRuntime, overrides?: Partial): OrchestrationInput; export declare function continueInputWithPrompt(runtime: DurableSessionRuntime, nextPrompt?: string, overrides?: Partial): OrchestrationInput; export declare function handleCommand(runtime: DurableSessionRuntime, cmdMsg: CommandMessage): Generator; export declare function advanceRegenPipeline(runtime: DurableSessionRuntime): Generator; //# sourceMappingURL=lifecycle.d.ts.map