Open source · Prompt & Agent Workflows

Function Call Replay Harness

Replay function calls with fixtures to test validation and failure handling.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

It then writes a report. By default stdout carries the human-readable summary; --json replaces it with the machine-readable report, which is the form to pipe into a JSON parser. Either way stderr carries a one-line summary and any operational diagnostics, and never report data.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+.

Run the checked-in example

# a recording that replays cleanly: exit 0
node bin/function-call-replay-harness.mjs \
  --recording examples/recording.json \
  --registry examples/registry.json

# the same registry against a recording that diverges: exit 1
node bin/function-call-replay-harness.mjs \
  --recording examples/recording-divergent.json \
  --registry examples/registry.json

# the machine-readable report
node bin/function-call-replay-harness.mjs \
  --recording examples/recording.json \
  --registry examples/registry.json --json

npm run check    # lint, tests, the runnable example, and npm pack --dry-run

Read the result

npm run example runs the passing case and npm run example:failing runs the divergent one.

Scope

Every limit is enforced, reachable from its own flag, and covered by a test that drives it through the command line.