Skip to main content
Read state from stable files and frames instead of parsing terminal text. Extension.js publishes a small set of machine contracts for scripts, CI jobs, and AI agents. Each contract has a fixed shape that releases extend but never break.

Which contract to read

How the contracts relate

A session writes dist/extension-js/<browser>/ready.json and appends to events.ndjson and logs.ndjson. All three carry the same runId, so you can join them. Terminating commands answer with one schema-1 result envelope on stdout under --output json. Long-running commands stream the same envelope shape as newline-delimited lifecycle frames. Every failure carries a stable E_* code from one shared table. The control bridge is the WebSocket layer underneath logs --follow and the act commands.

Next steps

  • Start with ready.json, the contract that every automation flow reads first.
  • Let an assistant run the whole loop with Driving the CLI.