# CLI Driver

Bundled headless verify-proof driver for CI / non-GUI environments.
Doesn't open a browser, doesn't render anything — asserts on command
output, captured logs, and runtime state.

## When Aperant picks this driver

`/apt:verify-proof` auto-selects `cli` when:

- The project has no GUI runtime (no Electron, no Tauri, no web frontend).
- The required IDL capabilities are: `execute_js`, `capture_logs`,
  `assert_output`, `assert_text`, `dump_state`.
- Used as a fallback for CI runs where the higher-priority browser /
  electron drivers can't be reached.

## Capabilities

| IDL verb | Behavior |
|----------|----------|
| `execute_js` | Run a Node snippet via `execFile('node', ['-e', script])` |
| `capture_logs` | Append stdout/stderr to an evidence file |
| `assert_output` | Match a pattern against captured stdout/stderr |
| `assert_text` | Match a pattern against a captured text artifact |
| `dump_state` | Write a JSON dump of runner CWD + env keys |

## Manifest

- **Priority:** 60 (below browser=100 / electron=90 / api=50).
- **Stability:** `ga`.
- **Trust:** `first_party_signed`.
- **Network posture:** `deny`.
- **Transport:** `{ builtin: true }` — the driver IS the transport.
- **Security:** `allow_shell: false`. The driver routes every spawn
  through `execFile` (no shell, no pipes, no redirects) per ID-03.

## V1 scope — adapter is thin

Like the other bundled drivers, `driver.mjs` is a v1 manifest-conformant
adapter shim: each verb validates its args via `IDL_VERB_ARGS` and
returns a VerbResult stub. Actual Node-side execution lands in
`verify-proof-driver-transport-wiring-v2` (follow-up). The CLI driver
is the most natural candidate for first direct-dispatch since
`{ builtin: true }` already means "driver process owns the transport."
