mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-17 16:46:31 +03:00
The generate command's fast lane spent most of its time on agent round trips, not on the engine. Four engine changes take them out, all behind the lane's own flags so a plain `live` session is untouched: - `live-poll --reply <id> done --then-poll` replies and waits for the next event in one call; the reply's ack rides along as `_replyAck`. - `live-generate` collects the session's own generate event into its output (`GET /poll?types=generate&id=<sessionId>`, a new id filter the parked-poll flush honours too), so the pickup poll is gone. - `live-generate --boot` runs the lane's boot in-process and reuses a running helper; `--dev-url <url>` names the dev server the agent already knows and leads the probe; with no page connected the verdict is `browser_needed` with the harness's own way to open the page (Cursor browser_navigate, Claude Code's Browser pane, Codex --open or the user). `--open` launches the system browser only on a harness without one: on cursor and claude-code it is ignored unless IMPECCABLE_BROWSER or the config's `browser` names a browser, so a second window never opens beside the harness's. The served /live.js carries the helper-wide bar preference in its prelude. - The accept of a session the generate verb started (journaled with origin "agent", or `--bake`) is baked mechanically: the accepted variant's @scope rules are re-anchored on the element's own selector and appended to the stylesheet that names it, the wrapper is unwrapped, the source verified clean. Knobs, plumbing inside the variant, no stylesheet, or a selector the rewrite cannot decide fall back to the carbonize block with `bakeSkipped`. `--no-bake` refuses. Goldens re-recorded for the three help texts and the no-browser case. Written with AI assistance (Claude). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
10 lines
2.1 KiB
JSON
10 lines
2.1 KiB
JSON
{
|
|
"stdout": "Usage: impeccable poll [options]\n\nWait for a browser event from the live variant server, or reply to one.\n\nModes:\n poll Block until a browser event arrives, print JSON, exit\n poll --stream Keep polling; print one JSON line per event (see live.md)\n poll --reply <id> done Reply \"done\" to event <id> (replace or insert generate)\n poll --reply <id> steer_done Reply after handling a steer event (unlocks Steer bar)\n poll --reply <id> error \"msg\" Reply with an error message\n poll --reply <id> done --data '<json>'\n Reply with a structured JSON result (manual_edit_apply)\n poll --reply <id> done --then-poll\n Reply, then keep waiting for the next event in the\n same call (the generate lane: done, then the accept)\n\nOptions:\n --timeout=MS One-shot poll timeout in ms (default: 600000). Ignored in --stream mode\n --types=A,B Lease only these event types\n --ack-timeout=MS Stream mode: max wait for --reply after generate/steer (default: 600000)\n --file PATH Attach a source file path to the reply (generate/steer flow)\n --data JSON Attach a JSON result object to the reply (manual_edit_apply flow). Must be valid JSON\n --then-poll After a successful --reply, run the one-shot poll and print its event\n (the reply's ack rides along as _replyAck). --timeout= bounds the wait\n --help Show this help message\n\nHarness note:\n Default one-shot mode is the primary contract, including Codex foreground polling.\n Claude Code may run it as a background task; Cursor uses a background terminal with exit notification.\n --stream is retained for harnesses with measured, reliable incremental stdout.\n Do not use --stream on Cursor.\n",
|
|
"stderr": "",
|
|
"exit": 0,
|
|
"signal": null,
|
|
"files": {
|
|
".impeccable/live/config.json": "{\n \"files\": [\"index.html\", \"public/**/*.html\"],\n \"insertBefore\": \"</body>\",\n \"commentSyntax\": \"html\"\n}\n"
|
|
}
|
|
}
|