---
url: >-
  https://adk.nht.io/api/@nhtio/adk/batteries/orchestration/raw/functions/rawOps.md
---

# Function: rawOps()

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

Defined in: [src/batteries/orchestration/raw.ts:86](https://github.com/NHTIO/ADK/blob/v1.20260906.0/src/src/batteries/orchestration/raw.ts#L86)

Read the plan's raw op log.

## Parameters

| Parameter               | Type                                                           | Description                                 |
| ----------------------- | -------------------------------------------------------------- | ------------------------------------------- |
| `store`                 | [`PlanStore`](../../interfaces/PlanStore.md)                   | The plan store to read from.                |
| `planId`                | `string`                                                       | The plan to read.                           |
| `opts?`                 | { `sinceLamport?`: `number`; `throughRevision?`: `number`; } | Optional filters.                           |
| `opts.sinceLamport?`    | `number`                                                       | Only ops with `lamport >= sinceLamport`.    |
| `opts.throughRevision?` | `number`                                                       | Only ops up to and including this revision. |

## Returns

`Promise`<[`PlanOp`](../../types/type-aliases/PlanOp.md)\[]>

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.
