Skip to content
1 min read · 170 words

Function: rawOps()

ts
function rawOps(
  store: PlanStore,
  planId: string,
  opts?: {
    sinceLamport?: number;
    throughRevision?: number;
  },
): Promise<PlanOp[]>;

Defined in: src/batteries/orchestration/raw.ts:86

Read the plan's raw op log.

Parameters

ParameterTypeDescription
storePlanStoreThe plan store to read from.
planIdstringThe plan to read.
opts?{ sinceLamport?: number; throughRevision?: number; }Optional filters.
opts.sinceLamport?numberOnly ops with lamport >= sinceLamport.
opts.throughRevision?numberOnly ops up to and including this revision.

Returns

Promise<PlanOp[]>

The matching ops, in the store's order.

Remarks

The op log is the source of truth the fold reads; this returns the ops themselves, optionally filtered. sinceLamport filters by clock (a Lamport value is not a revision selector — use throughRevision to bound by revision). throughRevision bounds the result to a REVISION PREFIX, which is what rawPlan({revision}) and rawDiff(a, b) need. A revision the log never reached is rejected by the store rather than silently returning everything.