import type { Agent } from '@deepseek-ai/dsh-agent'; import { type UserMessage } from '@deepseek-ai/dsh-llm'; import type { SessionEvent } from '@deepseek-ai/dsh-session'; export declare class RestartContinuationError extends Error { readonly code: 'invalid' | 'conflict' | 'ambiguous' | 'flush-failed' | 'authorization-revoked'; constructor(code: 'invalid' | 'conflict' | 'ambiguous' | 'flush-failed' | 'authorization-revoked', message: string); } /** The stable identity is stored by Delivery before any native admission. */ export declare function createRestartContinuation(input: { continuationId: string; text: string; }): UserMessage; export type RestartContinuationInspection = Readonly<{ kind: 'unseen' | 'pending' | 'ambiguous'; turn?: never; reason?: never; }> | Readonly<{ kind: 'claimed'; turn: number; reason?: never; }> | Readonly<{ kind: 'settled'; turn: number; reason: SessionEvent<'turn/end'>['data']['reason']['kind']; }>; /** * Inspect the complete native log, not just today's pending projection. A * previously claimed message must never be made pending again after restart. */ export declare function inspectRestartContinuation(agent: Agent, message: UserMessage): RestartContinuationInspection; export interface RestartContinuationAdmission { /** Recheck the original Inbox owner, current binding, cancellation and frozen budget. */ authorize(): void | Promise; /** Must be the live Session persistence service's awaited flush, not a model self-rating. */ flush(): Promise; /** Synchronous Host commit after flush and authorization, while the native wake remains parked. */ onAdmitted?(): void; signal?: AbortSignal; } /** * The caller must install its model/tool dispatch fences before invoking this. * Native maintenance keeps the wake parked until Session persistence confirms * the splice. Failure cancels that wake and requires the caller to dispose the * Agent handle before attempting another admission. */ export declare function admitRestartContinuation(agent: Agent, message: UserMessage, admission: RestartContinuationAdmission): Promise; //# sourceMappingURL=restart-native.d.ts.map