# @x12i/memorix-pipeline-runtime

> Shared Mongo operational repositories for org-scoped artifacts, receipts, DLQ, leases, checkpoints, and schedule leases

Latest version **3.1.1** (published 2026-08-05) · exellix-license license · 0 weekly downloads

## Install

```sh
npm install @x12i/memorix-pipeline-runtime
pnpm add @x12i/memorix-pipeline-runtime
yarn add @x12i/memorix-pipeline-runtime
bun add @x12i/memorix-pipeline-runtime
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 3.1.1 |
| Published | 2026-08-05 |
| First published | 2026-07-19 |
| Weekly downloads | 0 |
| License | exellix-license |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 1 |
| Unpacked size | 165.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | x12i |
| Keywords | memorix, pipeline, runtime, operational, artifacts, receipts, dlq, leases, checkpoints |

## Links

- npm: https://www.npmjs.com/package/@x12i/memorix-pipeline-runtime
- Repository: https://github.com/x12i/memorix-mono-repo
- Homepage: https://github.com/x12i/memorix-mono-repo#readme
- Issues: https://github.com/x12i/memorix-mono-repo/issues
- npm.io page: https://npm.io/package/@x12i/memorix-pipeline-runtime

## Dependencies (1)

- [mongodb](https://npm.io/package/mongodb.md) ^6.0.0

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 3.1.1 (latest) — 2026-08-05
- 3.0.0 (next) — 2026-07-23
- 3.1.0 — 2026-08-05
- 3.0.2 — 2026-07-23
- 3.0.1 — 2026-07-23
- 1.1.1 — 2026-07-23
- 1.1.0 — 2026-07-19
- 1.0.1 — 2026-07-19
- 1.0.0 — 2026-07-19

## README

# `@x12i/memorix-pipeline-runtime`

Org-scoped **operational persistence** helpers used by the pipeline stack: artifacts (`DataRef`), receipts, DLQ, execution leases, checkpoints, schedule leases, retention sweeps, identity merge helpers, and **repeated-work** stores (Work definitions, evaluations, batches, queue settings).

This is a **ledger/storage** package, not the DAG engine. The engine lives in `@x12i/memorix-pipeline`.

## Install

```bash
npm install @x12i/memorix-pipeline-runtime@3.0.2
```

| Audience | Use this package? |
|----------|-------------------|
| Remote app | **No** — `/api/pipelines` + `/api/operations` (+ future `/api/jobs/v1`) |
| Platform / pipeline package | **Yes** (Mongo or in-memory stores) |

## What it stores

| Kind | Role |
|------|------|
| Artifacts | Large step outputs behind `DataRef` / `artifactId` |
| Receipts | Write acknowledgements |
| DLQ | Failed items for replay policy |
| Leases / checkpoints | Step lease + cursor state for durable execution |
| Schedule leases | Scheduler ownership |
| Work definitions | Continuous repeated-work configs (runtime-only; never Magit) |
| Work evaluations | Evaluation observability (matched/eligible/excluded) |
| Batches | Frozen cohorts of pipeline runs |
| Queue settings | Pause/resume + concurrency defaults |

### Lease layering

| Layer | Store | Key |
|-------|-------|-----|
| Run admission | `PipelineRun.admission` on pipeline run ledger | run document |
| Step execution | `LeaseStore` | `orgId:runId:stepId` |
| Schedule fire | `ScheduleLeaseStore` | `orgId:scheduleId:dueAt` |

## Core API

```ts
import {
  createMongoOperationalStores,
  createMemoryOperationalStores,
  ensureOperationalIndexes,
  COLLECTION_NAMES,
  redactSensitive,
  deriveCanonicalRecordId,
  mergeRecords,
  sweepRetentionClasses,
} from "@x12i/memorix-pipeline-runtime";
```

| Export | Role |
|--------|------|
| `createMongoOperationalStores` / `createMemoryOperationalStores` | Store bundle (`OperationalStores`) |
| `ensureOperationalIndexes` / `COLLECTION_NAMES` | Mongo layout |
| `redactSensitive` | Scrub sensitive values in logs/exports |
| `deriveCanonicalRecordId` / `mergeRecords` / `batchMerge` | Identity policy helpers |
| `sweepRetentionClass(es)` | Retention class cleanup |

## How it fits

```text
memorix-pipeline (engine + admission + Work evaluator)
  → run / attempt ledger (pipeline package)
  → work / batch / evaluation / settings (this package)
  → artifacts / DataRef (this package + pipeline ledger)
memorix-service /api/pipelines · /api/operations · /api/jobs/v1 (P3)
```

## Docs

- Ebook: [Building Pipelines](../memorix-docs/08-pipelines/)
- Jobs reuse plan: [`.operational/jobs-memorix-reuse-plan.md`](../.operational/jobs-memorix-reuse-plan.md)
- Jobs API FR: [`.operational/jobs-v1-api-FR.md`](../.operational/jobs-v1-api-FR.md)
- Mutation capture note (journey): [`../memorix-pipeline/docs/mutation-refs-capture.md`](../memorix-pipeline/docs/mutation-refs-capture.md)
- Hub: [https://docs.memorix.x12i.com](https://docs.memorix.x12i.com)

```bash
npm test
```

---
_Source: https://npm.io/package/@x12i/memorix-pipeline-runtime · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
