import { type SessionIndex } from '../../store/session-index/index.js'; import { type SessionLease, type SessionLog } from '../../store/session-log/index.js'; import type { SessionId, TurnId } from '../../types/ids/index.js'; /** How a session-level operation finds the session's log. */ export interface SessionLocatorOptions { /** Use this log directly. */ readonly log?: SessionLog; /** Otherwise resolve the log through this index. */ readonly index?: SessionIndex; /** Otherwise open the index under this home. Defaults to `resolveNamzuHome()`. */ readonly home?: string; /** A lease the caller already holds. Absent: the lease is claimed and released around the append. */ readonly lease?: SessionLease; } /** * The log a session-level operation acts on: the one given, or the one the * index files the session under. */ export declare function locateSessionLog(sessionId: SessionId, options?: Omit): Promise; /** * Run `operation` under the session's writer lease: the caller's, or one * claimed for the operation and released after it. A session leased by a * live writer is refused rather than waited for. */ export declare function withSessionLease(log: SessionLog, lease: SessionLease | undefined, operation: (lease: SessionLease) => Promise): Promise; /** * Close a session's active turn without resuming it: appends * `turn_failed{ error.code: 'abandoned', reason }` and frees the session for * its next turn. The only other way out of a paused turn is `resumeSession`. * * A running turn is refused with `TurnInProgressError`: it is cancelled by * its own process, not abandoned from outside. */ export declare function abandonTurn(sessionId: SessionId, turnId: TurnId, reason: string, options?: SessionLocatorOptions): Promise; //# sourceMappingURL=abandon-turn.d.ts.map