babylon.engine.headless_runner

Headless Postgres-backed simulation runner package.

The canonical CLI surface for end-to-end Babylon simulations. A single run() entry point bootstraps Postgres, hydrates hex state, executes the tick loop, and emits an LLM-parseable artifact bundle (trace.csv + summary.json + manifest.json).

Spec: 064-headless-sim-runner

babylon.engine.headless_runner.run(config)[source]

Execute the headless simulation per config and emit artifacts.

Return type:

SimulationRunResult

Returns:

SimulationRunResult describing the run outcome.

Parameters:

config (SimulationRunConfig)

Modules

argparse_cli

CLI parser for the headless simulation runner.

bridge

WorldState ↔ Postgres bridge for the headless runner.

event_capture

Engine event capture for the headless runner.

manifest

Build manifest.json — the artifact-bundle reproducibility fingerprint.

models

Pydantic entities for the headless simulation runner.

reference_data_cache

Per-bridge reference-data cache for the spec-066 bridged headless runner.

run_summary

Build summary.json — terminal aggregates + audit log + performance.

runner

Core headless simulation runner — orchestrates Postgres + tick loop + artifacts.

scopes

Predefined scope resolver for the headless simulation runner.

storage_probe

Collect the run's storage footprint for the manifest storage block.

trace_emitter

Stream the trace.csv artifact from the trace-emission view.