Anchorage API reference
    Preparing search index...

    In-memory reference implementation. Mirrors D1ApprovalStore semantics and keeps CAS atomic because each check-and-mutate section is synchronous (no awaits inside).

    Implements

    Index

    Constructors

    Methods

    • Insert — unless an OPEN request (pending | claimed | escalated) already exists for the same (workflowId, runId, stepKey), or any record already carries the same captured (stepPath, suspendedAt, resumeCount) fingerprint. The existing record is returned with created: false, so a stale reconciler cannot file over a decision that landed after its history read. A later re-suspension changes the fingerprint and opens fresh.

      Parameters

      Returns Promise<CreateResult>

    • Ordered per filter.orderBy: oldest-first (createdAt, then id — FIFO queue order) by default, or the reviewer queue order (priority → SLA → FIFO, byReviewerOrder) under 'reviewer' — applied BEFORE filter.limit, so a bounded page is the top of the reviewer queue. Bounded by filter.limit/filter.after; a bare list() with no limit defaults to MAX_APPROVAL_LIST_LIMIT so repeated dashboard polls cannot trigger unbounded full-table scans. Page complete history with an explicit after cursor.

      Parameters

      Returns Promise<ApprovalRecord[]>