"""From a current-main scenario checkout, run: python3 setup-driver.py /absolute/path/to/proof-agent.mjs.
Installs only a synthetic ACP provider in the scenario harness; the compared application commits stay unchanged.
Then run scenarios:prove with task-not-found.e2e.ts and the requested base/head commits.
"""
import json
import pathlib
import sys
agent = str(pathlib.Path(sys.argv[1]).resolve())
p = pathlib.Path('scripts/scenarios/start-app.ts')
s = p.read_text().replace('providerInstances: Object.fromEntries(', 'providerInstances: { proofReplay: { driver: "acpRegistry", displayName: "Diagnostic replay", config: { source: "local", commandPath: "node", commandArgs: [' + json.dumps(agent) + '] } }, ...Object.fromEntries(').replace('      ),\n    }),', '      ) },\n    }),')
p.write_text(s)
p = pathlib.Path('scripts/scenarios/t3.ts')
p.write_text(p.read_text().replace('["--provider", "devReplay",', '["--provider", "proofReplay",'))
