import type { SessionCheckpointMigration } from "#execution/session/checkpoint-migrations.js"; import { type DurableSessionState } from "#execution/durable-session-store.js"; import { type SessionOwnerActivation } from "#execution/session/handoff.js"; /** Parses retained work with this deployment's code before deciding whether it can move. */ export declare function isSessionStateIdleForHandoff(input: { readonly sessionState: DurableSessionState; }): boolean; /** Reads durable work using the source deployment's handoff contract. */ export declare function isSessionIdleForHandoffStep(input: { readonly sessionState: DurableSessionState; }): Promise; export type SessionCheckpointValidation = { readonly kind: "valid"; } | { readonly kind: "incompatible"; readonly reason: "checkpoint-version"; }; /** * Validates an upgraded checkpoint and resolves the target deployment's * compiled bundle. * * A checkpoint this deployment cannot read is a settled answer, not a fault, * so it returns rather than throws: retrying the step can never change it. */ export declare function validateSessionCheckpointStep(input: { readonly migration: SessionCheckpointMigration; readonly sessionId: string; }): Promise; /** * Stops idle subagent sessions an older owner kept resumable, after this owner * activates. Best effort: a child that cannot be stopped ends at its own timeout. */ export declare function stopUntrackedChildSessionsStep(input: { readonly runIds: readonly string[]; readonly sessionId: string; }): Promise; /** Records why the owner kept a session it tried to move, so a stuck handoff is visible. */ export declare function reportSessionHandoffRetainedStep(input: { readonly error?: string; readonly reason: "activation-failed" | "checkpoint-incompatible"; readonly sessionId: string; readonly sourceDeploymentId: string; readonly targetDeploymentId: string; }): Promise; /** * Records the identity of an owner that this deployment's code did not start * (a handoff successor or a legacy importer) before it claims any hook: * ingress reads `$eve.version` to decide whether the owner can run, so a * missing value would strand a healthy session. The value comes from this * step's code, not the previous owner's. Unlike observability attributes, a * failed write fails the boot. */ export declare function recordSessionOwnerStep(input: { readonly sessionId: string; }): Promise; export declare function signalSessionOwnerActivationStep(input: { readonly activation: SessionOwnerActivation; readonly token: string; }): Promise; export declare function signalSessionAnchorStep(input: { readonly result: { readonly output: unknown; }; readonly token: string; }): Promise;