Skip to main content

@ddse/acm-replay

@ddse/acm-replay serialises ACM runs into portable replay bundles and rehydrates them for audits, regression tests, or analytics.

Installation

pnpm add @ddse/acm-replay @ddse/acm-runtime @ddse/acm-sdk

Export a bundle

import {ReplayBundleExporter} from '@ddse/acm-replay';

await ReplayBundleExporter.export({
outputDir: './replay/run-1759529575221',
goal,
context,
plans,
selectedPlanId: plan.id,
ledger: ledger.getEntries(),
taskIO: result.outputsByTask
});

Load and inspect

const bundle = await ReplayBundleExporter.load('./replay/run-1759529575221');
console.log(bundle.plan.id, bundle.ledger.length);

Validate

const { valid, errors } = await ReplayBundleExporter.validate('./replay/run-1759529575221');

Validation ensures:

  • Context hash matches contextRef
  • Ledger entries form a consistent timeline
  • Selected plan exists in the bundle

Use cases

  • Compliance — Provide auditors with a tamper-evident record of agent behaviour.
  • Regression — Re-run tasks offline to compare outputs across model versions.
  • Analytics — Aggregate ledger data to understand tool usage and failure rates.

Bundle contents

  • goal.json
  • context.json
  • plans/plan-a.json, plans/plan-b.json
  • ledger.json
  • task-outputs.json
  • tool-calls/ transcripts
  • Optional checkpoints/ when resumable execution is enabled

References