@threadplane/ag-uiInterfacev0.3.4

AgUiInterruptPersistence

Application-owned interrupt storage using revision-based writes and optional authoritative recovery reconciliation.

import type { AgUiInterruptPersistence } from '@threadplane/ag-ui';

Declaration

export interface AgUiInterruptPersistence  {
  namespace: string;
  reconcile?: (record: AgUiThreadRecord) => Promise<{
        status: 'unknown';
    } | {
        status: 'pending' | 'acknowledged' | 'completed';
        committed: ThreadSnapshot;
        session: InterruptSessionSnapshot;
    }>;
  store: {
        load(key: string): Promise<AgUiThreadRecord | null>;
        compareAndSwap(key: string, expectedRevision: number | null, next: AgUiThreadRecord): Promise<boolean>;
    };
}

Members

namespace

namespace: string;

reconcile

reconcile?: (record: AgUiThreadRecord) => Promise<{
        status: 'unknown';
    } | {
        status: 'pending' | 'acknowledged' | 'completed';
        committed: ThreadSnapshot;
        session: InterruptSessionSnapshot;
    }>;

store

store: {
        load(key: string): Promise<AgUiThreadRecord | null>;
        compareAndSwap(key: string, expectedRevision: number | null, next: AgUiThreadRecord): Promise<boolean>;
    };