[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-anomaly-opencode-drive":3,"mdc-ifa51i-key":33,"related-org-anomaly-opencode-drive":6708,"related-repo-anomaly-opencode-drive":6767},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":31,"mdContent":32},"opencode-drive","interact with OpenCode instances","Use when an agent needs to drive OpenCode with an Effect program or interact with an isolated instance",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"anomaly","Anomaly (SST \u002F OpenCode)","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fanomaly.png","anomalyco",[13,17,20],{"name":14,"slug":15,"type":16},"Automation","automation","tag",{"name":18,"slug":19,"type":16},"Engineering","engineering",{"name":21,"slug":22,"type":16},"Code Execution","code-execution",15,"https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fopencode-drive","2026-07-20T05:57:40.691365",null,2,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":26},[],"https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fopencode-drive\u002Ftree\u002FHEAD\u002Fskills\u002Fopencode-drive","---\nname: opencode-drive\ndescription: Use when an agent needs to drive OpenCode with an Effect program or interact with an isolated instance\n---\n\n# OpenCode Drive\n\nUse `opencode-drive` to launch an isolated OpenCode instance and control its TUI and simulated LLM.\n\nDefault to a one-shot Effect program. Use `defineScript` for named, visible,\nrestartable, or manual-launch workflows; it is also Effect-only. Use live\ncommands only for interactive development against a persistent or visible\ninstance.\n\n## Catalog State IDs\n\nBrowse and copy OpenCode terminal state IDs from:\n\n```text\nhttps:\u002F\u002Fcatalog.kitlangton.dev\n```\n\nReplayable flow states expose canonical `\u003Cflow-id>\u002F\u003Cstate-id>` addresses, for example:\n\n```text\npatch-success-lifecycle\u002Fpermission-prompt\n```\n\nReproduce one from an `opencode-drive` source checkout:\n\n```bash\nbun run catalog:reproduce -- patch-success-lifecycle\u002Fpermission-prompt \\\n  --opencode \u002Fpath\u002Fto\u002Fopencode \\\n  --output \u002Ftmp\u002Fpermission-prompt.frame.json\n```\n\nThe command executes the registered recipe only through that checkpoint and writes an `opencode-terminal-frame-v1` artifact. Only flows in `apps\u002Fcatalog\u002Fscenarios\u002Findex.ts` are replayable. Browse-only flows and screen cards copy standalone capture IDs instead; do not invent a flow prefix. Use a protocol-compatible OpenCode checkout, ideally the source revision shown by the selected capture set.\n\nTo compare a committed local OpenCode branch against current v2 across every catalog state:\n\n```bash\nbun run catalog:capture -- \\\n  --opencode \u002Fpath\u002Fto\u002Fopencode \\\n  --revision origin\u002Fv2 \\\n  --revision HEAD\n```\n\nAdd repeated `--theme` flags to capture the same commit pair under multiple themes. Capture resolves detached immutable worktrees, retains earlier sets, and sorts sets by commit time. Uncommitted changes are excluded by design.\n\n## Effect Programs\n\nWrite `drive.ts` as a default-exported, fully provided Effect, then run it directly:\n\n```ts\nimport { Effect } from \"effect\"\nimport { Llm, OpenCodeDriver } from \"opencode-drive\"\n\nexport default OpenCodeDriver.use(\n  {\n    project: {\n      git: true,\n      files: {\n        \"src\u002Fvalue.ts\": \"export const value = 1\\n\",\n      },\n    },\n  },\n  ({ ui, llm }) =>\n    Effect.gen(function* () {\n      yield* llm.queue(Llm.text(\"The value is 1.\"))\n      yield* ui.submit(\"Read src\u002Fvalue.ts\")\n      yield* ui.waitFor(\"The value is 1.\")\n      yield* ui.screenshot(\"result\")\n    }),\n)\n```\n\n```bash\nopencode-drive run .\u002Fdrive.ts\n```\n\n`run` type-checks the module before importing it and requires its default export to be an `Effect\u003Cunknown, unknown, never>`. It accepts exactly one module path; it does not accept `--command.*` flags or application arguments after `--`.\n\n`OpenCodeDriver.use` is the normal lifecycle boundary. It creates an isolated project, starts the server and primary TUI, races the program against backend failure, settles queued LLM work, closes all TUIs, exports recordings, and removes the artifact directory unless `keepArtifacts: true` is set. Settlement failures fail the program.\n\nUse `OpenCodeDriver.make` only when explicit settlement is necessary. It requires a scope, and the program must call `driver.settle()` before leaving that scope.\n\n### Deterministic Project DSL\n\nDeclare the project, semantic OpenCode configuration, and TUI configuration in `OpenCodeDriver.use` options:\n\n```ts\nexport default OpenCodeDriver.use(\n  {\n    project: {\n      git: true,\n      files: { \"README.md\": \"# Fixture\\n\" },\n    },\n    config: {\n      autoupdate: false,\n      username: \"Drive\",\n    },\n    tuiConfig: {\n      theme: \"system\",\n      scroll_speed: 1,\n    },\n    setup: ({ fs, config, tuiConfig }) =>\n      Effect.gen(function* () {\n        yield* fs.writeFile(\"src\u002Fsetup.ts\", \"export const ready = true\\n\")\n        config.username = \"Setup wins\"\n        tuiConfig.scroll_speed = 2\n      }),\n  },\n  ({ ui }) => ui.screenshot(\"home\"),\n)\n```\n\nThe DSL is applied in this order:\n\n1. `project.files` is written into the isolated project.\n2. `config` and `tuiConfig` are deeply merged over `.opencode\u002Fopencode.jsonc` and `.opencode\u002Ftui.jsonc` fixture values. Objects merge recursively; arrays and scalar values replace existing values.\n3. `setup` runs and may write project files or mutate the merged `config` and `tuiConfig` objects. Its mutations take final precedence.\n4. Drive writes both configs as stable, formatted JSON. With `project.git: true`, it creates a repository and commits the complete pre-launch state with fixed Git identity and timestamps.\n\n`fs.writeFile` is rooted inside the simulated project and creates parent directories. `project.git: true` refuses to replace existing Git metadata; omit it when prepared fixtures already include a repository.\n\n### UI And LLM\n\nUI operations are Effects:\n\n- `ui.submit(text)` types and presses Enter.\n- `ui.state()`, `ui.capture()`, and `ui.matches(text)` inspect the terminal.\n- `ui.snapshot()` returns the versioned semantic tree; `ui.getNode(query, options?)` polls for one exact semantic match.\n- `ui.waitFor(textOrPredicate, options?)` polls until a match.\n- `ui.getElement(query, options?)`, `ui.focus(...)`, and `ui.click(...)` target interactive elements.\n- `ui.screenshot(name?)` exports an image and returns its absolute path.\n- `ui.resize({ cols, rows })`, `ui.press(...)`, and `ui.arrow(...)` control the TUI.\n\nBuild deterministic simulated responses with the `Llm` namespace and schedule them through the driver's `llm` controller:\n\n```ts\nyield* llm.queue(\n  Llm.reasoning(\"Checking the fixture\"),\n  Llm.pause(20),\n  Llm.text(\"The value is 1.\", { delay: 2, chunkSize: 15 }),\n)\n```\n\n`llm.queue(...)` declares the next response without waiting. `llm.send(...)`\nwaits for the next request and completes its response. For ongoing responses,\nthe handler passed to `llm.serve` returns an Effect `Stream`; registering the\nhandler is an Effect. Available outputs include `text`, `reasoning`, `pause`,\n`toolCall`, `raw`, `finish`, and `disconnect`; a normal response gets\n`finish(\"stop\")` when no terminal output is supplied.\n\n```ts\nimport { Stream } from \"effect\"\nimport { Llm } from \"opencode-drive\"\n\nyield* llm.serve((_request, index) =>\n  Stream.make(Llm.text(`Response ${index + 1}`)),\n)\n```\n\nUse the capability names literally: `opencode` is the generated OpenCode SDK,\n`tui` is the primary frontend process, `ui` is `tui.ui`, and `tuis` launches\nadditional frontend processes.\n\nAdditional TUIs share the server and LLM controller:\n\n```ts\nconst secondary = yield* tuis.launch({\n  viewport: { cols: 120, rows: 40 },\n  recording: true,\n})\nyield* secondary.ui.screenshot(\"secondary\")\n```\n\n### Reports And Paths\n\n`OpenCodeDriver` exports a branded `AbsolutePath` schema and a compact `RunReport` containing the artifact root, retention, recording paths, and endpoint compatibility. It also exports `decodeAbsolutePath` and `decodeRunReport` for validating unknown values.\n\n`driver.settle()` returns the report with its recording paths. Use `OpenCodeDriver.useReport(options, run)` when a safe lifecycle program also needs the report alongside its result.\n\nDrive prefers protocol negotiation and reports explicit legacy fallback. Set `opencode.compatibility` to `\"required\"` when protocol skew must fail before the program runs. Additional built-in tool adapters remain follow-ups.\n\n### Arbitrary Dynamic Tools\n\nUse runtime `tools.attach` for tools that do not have a shipped Drive adapter.\nAttachment replaces the complete dynamic set without affecting configured\nstatic adapters. Take invocations by the model call ID, while Drive owns\nproducer IDs, progress sequences, reconnect replay, and exactly-one terminal\ncommitment.\n\n```ts\nyield* tools.attach({\n  tools: [\n    {\n      name: \"lookup\",\n      description: \"Look up a value\",\n      inputSchema: {\n        type: \"object\",\n        properties: { query: { type: \"string\" } },\n        required: [\"query\"],\n      },\n      options: { codemode: false },\n    },\n  ],\n})\n\nconst lookup = yield* tools.take(\"call_lookup\")\nyield* lookup.progress({ structured: { phase: \"searching\" } })\nyield* lookup.finish({\n  structured: { answer: 42 },\n  content: [{ type: \"text\", text: \"42\" }],\n})\n```\n\nUse `awaitCancelled()` to observe native interruption. Do not synthesize\ncancellation or expose transport sequence numbers. Dynamic effective names may\nnot collide with configured `shell`, `webfetch`, or `websearch` adapters.\n\n### Simulated Shell Execution\n\nDeclare the built-in tools Drive should intercept, then control each invocation\nfrom the running program. Unregistered tools remain real. Calls may be accepted\nin arrival order or by the stable ID supplied in `Llm.toolCall`, so parallel\ninvocations can progress and settle independently.\n\n```ts\nimport { Effect } from \"effect\"\nimport { Llm, OpenCodeDriver } from \"opencode-drive\"\n\nexport default OpenCodeDriver.use({ tools: [\"shell\"] }, ({ tools, llm, ui }) =>\n  Effect.gen(function* () {\n    const shells = yield* tools.control(\"shell\")\n    yield* llm.queue(\n      Llm.toolCall({\n        index: 0,\n        id: \"call_shell\",\n        name: \"shell\",\n        input: { command: \"compile\" },\n      }),\n      Llm.finish(\"tool-calls\"),\n    )\n    yield* ui.submit(\"Compile the project\")\n    const shell = yield* shells.take(\"call_shell\")\n    yield* shell.progress(`Running ${shell.input.command}\\n`)\n    yield* shell.succeed({ output: \"Controlled success\\n\", exit: 0 })\n  }),\n)\n```\n\nThe same declaration and runtime `tools` capability are available in\n`defineScript`. Supported adapters are `shell`, `webfetch`, and `websearch`.\nEach progress value replaces the visible tool output, so send accumulated text\nwhen earlier lines should remain visible. Calls settle exactly once;\n`awaitInterrupted()` observes session interruption or transport disconnection.\n\nThe callback form remains available for fixed behavior that does not need\nruntime orchestration:\n\n```ts\nimport { Effect } from \"effect\"\nimport { Tool } from \"opencode-drive\"\n\nconst tools = (registry: Tool.Registry) => {\n  registry.handle(\"shell\", ({ input, progress }) =>\n    Effect.gen(function* () {\n      yield* progress(`Running ${input.command}\\n`)\n      return { output: \"Controlled success\\n\", exit: 0 }\n    }),\n  )\n}\n```\n\nForeground callback handler Effects are interrupted when OpenCode interrupts\nthe session, the transport disconnects, or Drive shuts down. Detached\nbackground shell handlers continue after their launch response and are\ninterrupted when Drive shuts down.\n\n## Effect Scripts\n\nUse `defineScript` with `start --script` when the workflow must have a stable\ninstance name, be visible, rerun on `restart`, or explicitly launch and kill\nits server and TUIs. `setup` and `run` return Effects. Operations on `fs`,\n`ui`, `llm`, `tools`, `server`, and `tuis` also return Effects; there is no\nPromise API or compatibility shim.\n\n```ts\nimport { Effect } from \"effect\"\nimport { defineScript, Llm } from \"opencode-drive\"\n\nexport default defineScript({\n  config: { autoupdate: false },\n  tuiConfig: { theme: \"system\" },\n  project: {\n    git: true,\n    files: { \"src\u002Fvalue.ts\": \"export const value = 1\\n\" },\n  },\n  run: ({ ui, llm }) =>\n    Effect.gen(function* () {\n      yield* llm.queue(Llm.text(\"The value is 1.\"))\n      yield* ui.submit(\"Read src\u002Fvalue.ts\")\n      yield* ui.waitFor(\"The value is 1.\")\n    }),\n})\n```\n\nAlways type-check a script before starting it:\n\n```bash\nopencode-drive check .\u002Fdrive.ts\nopencode-drive start --name demo --script .\u002Fdrive.ts\n```\n\nFor a new script, run `opencode-drive script init .\u002Fdrive.ts` once. It creates a\ncanonical Effect-native starter and refuses to overwrite an existing file.\n`check` adds focused migration guidance when it finds Promise-style script\ncallbacks.\n\nThe script DSL applies `project`, `config`, `tuiConfig`, and `setup` with the same deterministic ordering described above. Automatic scripts run again after `opencode-drive restart --name demo`.\n\nUse `launch: \"manual\"` only when the workflow must control server and TUI restarts itself. In manual mode `tui` and `ui` are `null`; run `server.launch()` before `tuis.launch(name)`. Only one server may run at a time, `server.kill()` permits relaunch, and a closed TUI name may be reused.\n\n```ts\nexport default defineScript({\n  launch: \"manual\",\n  run: ({ server, tuis }) =>\n    Effect.gen(function* () {\n      yield* server.launch()\n      const alice = yield* tuis.launch(\"alice\", { recording: true })\n      yield* alice.ui.screenshot(\"alice\")\n      yield* alice.close()\n    }),\n})\n```\n\nCancellation uses Effect interruption. Interrupting the script or an\noperation's fiber interrupts in-flight work and runs scoped finalizers; do not\nintroduce `AbortSignal` or Promise cancellation wrappers.\n\n## Prepare An Instance\n\nUse `init` only when files must be copied into an isolated home or project before a named live or scripted instance starts:\n\n```bash\nartifacts=$(opencode-drive init --name demo)\ncp -R .\u002Ffixtures\u002Fhome\u002F. \"$artifacts\u002F\"\ncp -R .\u002Ffixtures\u002Fproject\u002F. \"$artifacts\u002Ffiles\u002F\"\nopencode-drive start --name demo --dev ~\u002Fprojects\u002Fopencode\n```\n\nThe simulated project is under `$artifacts\u002Ffiles`. A later `start --name demo` reuses the prepared artifacts; otherwise `start` initializes them automatically.\n\nDrive uses an in-memory OpenCode database by default. For a script that restarts\nthe OpenCode service and must recover the same sessions, set\n`OPENCODE_DRIVE_DB` to a file-backed path. Relative paths resolve inside the\nisolated run's OpenCode data directory:\n\n```bash\nOPENCODE_DRIVE_DB=restart.sqlite \\\n  opencode-drive start --name restart-demo --script .\u002Frestart.ts\n```\n\n## Live Interaction\n\nUse live commands to inspect or iterate on a persistent instance. Headless `start` requires a unique `--name`; visible instances may omit it. Headless `start` detaches after the instance is ready, so do not add `&`. Always stop the instance when finished.\n\n```bash\nopencode-drive start --name demo\n\nopencode-drive send --name demo \\\n  --command.ui.type '{\"text\":\"Explain this project\"}' \\\n  --command.ui.enter\n\nopencode-drive send --name demo --command.ui.state\nopencode-drive send --name demo --command.ui.capture\nopencode-drive send --name demo --command.ui.screenshot\nopencode-drive stop --name demo\n```\n\n`send` executes command flags from left to right. JSON-valued commands take one JSON argument. Supported commands are:\n\n- `--command.ui.type '{\"text\":\"...\"}'`\n- `--command.ui.press '{\"key\":\"p\",\"modifiers\":{\"ctrl\":true}}'`\n- `--command.ui.enter`\n- `--command.ui.arrow '{\"direction\":\"down\"}'`\n- `--command.ui.focus '{\"target\":12}'`\n- `--command.ui.click '{\"target\":12,\"x\":4,\"y\":1}'`\n- `--command.ui.resize '{\"cols\":120,\"rows\":40}'`\n- `--command.ui.screenshot` or `--command.ui.screenshot '{\"name\":\"home\"}'`\n- `--command.ui.state`\n- `--command.ui.snapshot`\n- `--command.ui.capture`\n- `--command.ui.matches '{\"text\":\"OpenCode\"}'`\n- `--command.ui.recording.finish`\n\nStart with `--record` to record a headless live instance. `stop` finishes the recording, exports the MP4, performs owner cleanup, and prints the path.\n\n```bash\nopencode-drive start --name demo --record\nopencode-drive stop --name demo\n```\n\n`dir` prints a live instance's artifact directory, and `list` lists active instances:\n\n```bash\nopencode-drive dir --name demo\nopencode-drive list\n```\n\n## Prune\n\n`prune` removes inactive artifact directories. To remove one instance's artifacts, pass the instance name supplied to `init` or `start`, not the generated `run-*` artifact directory name:\n\n```bash\nopencode-drive prune --name demo\n\n# Force removal of all artifact directories, including active ones.\nopencode-drive prune --force\n```\n",{"data":34,"body":35},{"name":4,"description":6},{"type":36,"children":37},"root",[38,46,60,73,80,85,97,110,119,131,210,231,236,312,325,331,344,933,956,990,1009,1029,1036,1048,1633,1638,1725,1743,1749,1754,1887,1907,2107,2197,2420,2464,2469,2663,2669,2711,2729,2750,2756,2769,3405,3440,3446,3459,4261,4308,4313,4698,4703,4709,4788,5315,5320,5374,5395,5433,5490,5836,5849,5855,5867,6006,6035,6048,6105,6111,6146,6338,6349,6477,6498,6548,6567,6606,6612,6643,6702],{"type":39,"tag":40,"props":41,"children":42},"element","h1",{"id":4},[43],{"type":44,"value":45},"text","OpenCode Drive",{"type":39,"tag":47,"props":48,"children":49},"p",{},[50,52,58],{"type":44,"value":51},"Use ",{"type":39,"tag":53,"props":54,"children":56},"code",{"className":55},[],[57],{"type":44,"value":4},{"type":44,"value":59}," to launch an isolated OpenCode instance and control its TUI and simulated LLM.",{"type":39,"tag":47,"props":61,"children":62},{},[63,65,71],{"type":44,"value":64},"Default to a one-shot Effect program. Use ",{"type":39,"tag":53,"props":66,"children":68},{"className":67},[],[69],{"type":44,"value":70},"defineScript",{"type":44,"value":72}," for named, visible,\nrestartable, or manual-launch workflows; it is also Effect-only. Use live\ncommands only for interactive development against a persistent or visible\ninstance.",{"type":39,"tag":74,"props":75,"children":77},"h2",{"id":76},"catalog-state-ids",[78],{"type":44,"value":79},"Catalog State IDs",{"type":39,"tag":47,"props":81,"children":82},{},[83],{"type":44,"value":84},"Browse and copy OpenCode terminal state IDs from:",{"type":39,"tag":86,"props":87,"children":92},"pre",{"className":88,"code":90,"language":44,"meta":91},[89],"language-text","https:\u002F\u002Fcatalog.kitlangton.dev\n","",[93],{"type":39,"tag":53,"props":94,"children":95},{"__ignoreMap":91},[96],{"type":44,"value":90},{"type":39,"tag":47,"props":98,"children":99},{},[100,102,108],{"type":44,"value":101},"Replayable flow states expose canonical ",{"type":39,"tag":53,"props":103,"children":105},{"className":104},[],[106],{"type":44,"value":107},"\u003Cflow-id>\u002F\u003Cstate-id>",{"type":44,"value":109}," addresses, for example:",{"type":39,"tag":86,"props":111,"children":114},{"className":112,"code":113,"language":44,"meta":91},[89],"patch-success-lifecycle\u002Fpermission-prompt\n",[115],{"type":39,"tag":53,"props":116,"children":117},{"__ignoreMap":91},[118],{"type":44,"value":113},{"type":39,"tag":47,"props":120,"children":121},{},[122,124,129],{"type":44,"value":123},"Reproduce one from an ",{"type":39,"tag":53,"props":125,"children":127},{"className":126},[],[128],{"type":44,"value":4},{"type":44,"value":130}," source checkout:",{"type":39,"tag":86,"props":132,"children":136},{"className":133,"code":134,"language":135,"meta":91,"style":91},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","bun run catalog:reproduce -- patch-success-lifecycle\u002Fpermission-prompt \\\n  --opencode \u002Fpath\u002Fto\u002Fopencode \\\n  --output \u002Ftmp\u002Fpermission-prompt.frame.json\n","bash",[137],{"type":39,"tag":53,"props":138,"children":139},{"__ignoreMap":91},[140,179,196],{"type":39,"tag":141,"props":142,"children":145},"span",{"class":143,"line":144},"line",1,[146,152,158,163,168,173],{"type":39,"tag":141,"props":147,"children":149},{"style":148},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[150],{"type":44,"value":151},"bun",{"type":39,"tag":141,"props":153,"children":155},{"style":154},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[156],{"type":44,"value":157}," run",{"type":39,"tag":141,"props":159,"children":160},{"style":154},[161],{"type":44,"value":162}," catalog:reproduce",{"type":39,"tag":141,"props":164,"children":165},{"style":154},[166],{"type":44,"value":167}," --",{"type":39,"tag":141,"props":169,"children":170},{"style":154},[171],{"type":44,"value":172}," patch-success-lifecycle\u002Fpermission-prompt",{"type":39,"tag":141,"props":174,"children":176},{"style":175},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[177],{"type":44,"value":178}," \\\n",{"type":39,"tag":141,"props":180,"children":181},{"class":143,"line":27},[182,187,192],{"type":39,"tag":141,"props":183,"children":184},{"style":154},[185],{"type":44,"value":186},"  --opencode",{"type":39,"tag":141,"props":188,"children":189},{"style":154},[190],{"type":44,"value":191}," \u002Fpath\u002Fto\u002Fopencode",{"type":39,"tag":141,"props":193,"children":194},{"style":175},[195],{"type":44,"value":178},{"type":39,"tag":141,"props":197,"children":199},{"class":143,"line":198},3,[200,205],{"type":39,"tag":141,"props":201,"children":202},{"style":154},[203],{"type":44,"value":204},"  --output",{"type":39,"tag":141,"props":206,"children":207},{"style":154},[208],{"type":44,"value":209}," \u002Ftmp\u002Fpermission-prompt.frame.json\n",{"type":39,"tag":47,"props":211,"children":212},{},[213,215,221,223,229],{"type":44,"value":214},"The command executes the registered recipe only through that checkpoint and writes an ",{"type":39,"tag":53,"props":216,"children":218},{"className":217},[],[219],{"type":44,"value":220},"opencode-terminal-frame-v1",{"type":44,"value":222}," artifact. Only flows in ",{"type":39,"tag":53,"props":224,"children":226},{"className":225},[],[227],{"type":44,"value":228},"apps\u002Fcatalog\u002Fscenarios\u002Findex.ts",{"type":44,"value":230}," are replayable. Browse-only flows and screen cards copy standalone capture IDs instead; do not invent a flow prefix. Use a protocol-compatible OpenCode checkout, ideally the source revision shown by the selected capture set.",{"type":39,"tag":47,"props":232,"children":233},{},[234],{"type":44,"value":235},"To compare a committed local OpenCode branch against current v2 across every catalog state:",{"type":39,"tag":86,"props":237,"children":239},{"className":133,"code":238,"language":135,"meta":91,"style":91},"bun run catalog:capture -- \\\n  --opencode \u002Fpath\u002Fto\u002Fopencode \\\n  --revision origin\u002Fv2 \\\n  --revision HEAD\n",[240],{"type":39,"tag":53,"props":241,"children":242},{"__ignoreMap":91},[243,267,282,299],{"type":39,"tag":141,"props":244,"children":245},{"class":143,"line":144},[246,250,254,259,263],{"type":39,"tag":141,"props":247,"children":248},{"style":148},[249],{"type":44,"value":151},{"type":39,"tag":141,"props":251,"children":252},{"style":154},[253],{"type":44,"value":157},{"type":39,"tag":141,"props":255,"children":256},{"style":154},[257],{"type":44,"value":258}," catalog:capture",{"type":39,"tag":141,"props":260,"children":261},{"style":154},[262],{"type":44,"value":167},{"type":39,"tag":141,"props":264,"children":265},{"style":175},[266],{"type":44,"value":178},{"type":39,"tag":141,"props":268,"children":269},{"class":143,"line":27},[270,274,278],{"type":39,"tag":141,"props":271,"children":272},{"style":154},[273],{"type":44,"value":186},{"type":39,"tag":141,"props":275,"children":276},{"style":154},[277],{"type":44,"value":191},{"type":39,"tag":141,"props":279,"children":280},{"style":175},[281],{"type":44,"value":178},{"type":39,"tag":141,"props":283,"children":284},{"class":143,"line":198},[285,290,295],{"type":39,"tag":141,"props":286,"children":287},{"style":154},[288],{"type":44,"value":289},"  --revision",{"type":39,"tag":141,"props":291,"children":292},{"style":154},[293],{"type":44,"value":294}," origin\u002Fv2",{"type":39,"tag":141,"props":296,"children":297},{"style":175},[298],{"type":44,"value":178},{"type":39,"tag":141,"props":300,"children":302},{"class":143,"line":301},4,[303,307],{"type":39,"tag":141,"props":304,"children":305},{"style":154},[306],{"type":44,"value":289},{"type":39,"tag":141,"props":308,"children":309},{"style":154},[310],{"type":44,"value":311}," HEAD\n",{"type":39,"tag":47,"props":313,"children":314},{},[315,317,323],{"type":44,"value":316},"Add repeated ",{"type":39,"tag":53,"props":318,"children":320},{"className":319},[],[321],{"type":44,"value":322},"--theme",{"type":44,"value":324}," flags to capture the same commit pair under multiple themes. Capture resolves detached immutable worktrees, retains earlier sets, and sorts sets by commit time. Uncommitted changes are excluded by design.",{"type":39,"tag":74,"props":326,"children":328},{"id":327},"effect-programs",[329],{"type":44,"value":330},"Effect Programs",{"type":39,"tag":47,"props":332,"children":333},{},[334,336,342],{"type":44,"value":335},"Write ",{"type":39,"tag":53,"props":337,"children":339},{"className":338},[],[340],{"type":44,"value":341},"drive.ts",{"type":44,"value":343}," as a default-exported, fully provided Effect, then run it directly:",{"type":39,"tag":86,"props":345,"children":349},{"className":346,"code":347,"language":348,"meta":91,"style":91},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { Effect } from \"effect\"\nimport { Llm, OpenCodeDriver } from \"opencode-drive\"\n\nexport default OpenCodeDriver.use(\n  {\n    project: {\n      git: true,\n      files: {\n        \"src\u002Fvalue.ts\": \"export const value = 1\\n\",\n      },\n    },\n  },\n  ({ ui, llm }) =>\n    Effect.gen(function* () {\n      yield* llm.queue(Llm.text(\"The value is 1.\"))\n      yield* ui.submit(\"Read src\u002Fvalue.ts\")\n      yield* ui.waitFor(\"The value is 1.\")\n      yield* ui.screenshot(\"result\")\n    }),\n)\n","ts",[350],{"type":39,"tag":53,"props":351,"children":352},{"__ignoreMap":91},[353,398,444,453,486,495,515,539,556,601,610,619,628,663,705,769,816,861,907,925],{"type":39,"tag":141,"props":354,"children":355},{"class":143,"line":144},[356,362,368,373,378,383,388,393],{"type":39,"tag":141,"props":357,"children":359},{"style":358},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[360],{"type":44,"value":361},"import",{"type":39,"tag":141,"props":363,"children":365},{"style":364},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[366],{"type":44,"value":367}," {",{"type":39,"tag":141,"props":369,"children":370},{"style":175},[371],{"type":44,"value":372}," Effect",{"type":39,"tag":141,"props":374,"children":375},{"style":364},[376],{"type":44,"value":377}," }",{"type":39,"tag":141,"props":379,"children":380},{"style":358},[381],{"type":44,"value":382}," from",{"type":39,"tag":141,"props":384,"children":385},{"style":364},[386],{"type":44,"value":387}," \"",{"type":39,"tag":141,"props":389,"children":390},{"style":154},[391],{"type":44,"value":392},"effect",{"type":39,"tag":141,"props":394,"children":395},{"style":364},[396],{"type":44,"value":397},"\"\n",{"type":39,"tag":141,"props":399,"children":400},{"class":143,"line":27},[401,405,409,414,419,424,428,432,436,440],{"type":39,"tag":141,"props":402,"children":403},{"style":358},[404],{"type":44,"value":361},{"type":39,"tag":141,"props":406,"children":407},{"style":364},[408],{"type":44,"value":367},{"type":39,"tag":141,"props":410,"children":411},{"style":175},[412],{"type":44,"value":413}," Llm",{"type":39,"tag":141,"props":415,"children":416},{"style":364},[417],{"type":44,"value":418},",",{"type":39,"tag":141,"props":420,"children":421},{"style":175},[422],{"type":44,"value":423}," OpenCodeDriver",{"type":39,"tag":141,"props":425,"children":426},{"style":364},[427],{"type":44,"value":377},{"type":39,"tag":141,"props":429,"children":430},{"style":358},[431],{"type":44,"value":382},{"type":39,"tag":141,"props":433,"children":434},{"style":364},[435],{"type":44,"value":387},{"type":39,"tag":141,"props":437,"children":438},{"style":154},[439],{"type":44,"value":4},{"type":39,"tag":141,"props":441,"children":442},{"style":364},[443],{"type":44,"value":397},{"type":39,"tag":141,"props":445,"children":446},{"class":143,"line":198},[447],{"type":39,"tag":141,"props":448,"children":450},{"emptyLinePlaceholder":449},true,[451],{"type":44,"value":452},"\n",{"type":39,"tag":141,"props":454,"children":455},{"class":143,"line":301},[456,461,466,470,475,481],{"type":39,"tag":141,"props":457,"children":458},{"style":358},[459],{"type":44,"value":460},"export",{"type":39,"tag":141,"props":462,"children":463},{"style":358},[464],{"type":44,"value":465}," default",{"type":39,"tag":141,"props":467,"children":468},{"style":175},[469],{"type":44,"value":423},{"type":39,"tag":141,"props":471,"children":472},{"style":364},[473],{"type":44,"value":474},".",{"type":39,"tag":141,"props":476,"children":478},{"style":477},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[479],{"type":44,"value":480},"use",{"type":39,"tag":141,"props":482,"children":483},{"style":175},[484],{"type":44,"value":485},"(\n",{"type":39,"tag":141,"props":487,"children":489},{"class":143,"line":488},5,[490],{"type":39,"tag":141,"props":491,"children":492},{"style":364},[493],{"type":44,"value":494},"  {\n",{"type":39,"tag":141,"props":496,"children":498},{"class":143,"line":497},6,[499,505,510],{"type":39,"tag":141,"props":500,"children":502},{"style":501},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[503],{"type":44,"value":504},"    project",{"type":39,"tag":141,"props":506,"children":507},{"style":364},[508],{"type":44,"value":509},":",{"type":39,"tag":141,"props":511,"children":512},{"style":364},[513],{"type":44,"value":514}," {\n",{"type":39,"tag":141,"props":516,"children":518},{"class":143,"line":517},7,[519,524,528,534],{"type":39,"tag":141,"props":520,"children":521},{"style":501},[522],{"type":44,"value":523},"      git",{"type":39,"tag":141,"props":525,"children":526},{"style":364},[527],{"type":44,"value":509},{"type":39,"tag":141,"props":529,"children":531},{"style":530},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[532],{"type":44,"value":533}," true",{"type":39,"tag":141,"props":535,"children":536},{"style":364},[537],{"type":44,"value":538},",\n",{"type":39,"tag":141,"props":540,"children":542},{"class":143,"line":541},8,[543,548,552],{"type":39,"tag":141,"props":544,"children":545},{"style":501},[546],{"type":44,"value":547},"      files",{"type":39,"tag":141,"props":549,"children":550},{"style":364},[551],{"type":44,"value":509},{"type":39,"tag":141,"props":553,"children":554},{"style":364},[555],{"type":44,"value":514},{"type":39,"tag":141,"props":557,"children":559},{"class":143,"line":558},9,[560,565,570,575,579,583,588,593,597],{"type":39,"tag":141,"props":561,"children":562},{"style":364},[563],{"type":44,"value":564},"        \"",{"type":39,"tag":141,"props":566,"children":567},{"style":501},[568],{"type":44,"value":569},"src\u002Fvalue.ts",{"type":39,"tag":141,"props":571,"children":572},{"style":364},[573],{"type":44,"value":574},"\"",{"type":39,"tag":141,"props":576,"children":577},{"style":364},[578],{"type":44,"value":509},{"type":39,"tag":141,"props":580,"children":581},{"style":364},[582],{"type":44,"value":387},{"type":39,"tag":141,"props":584,"children":585},{"style":154},[586],{"type":44,"value":587},"export const value = 1",{"type":39,"tag":141,"props":589,"children":590},{"style":175},[591],{"type":44,"value":592},"\\n",{"type":39,"tag":141,"props":594,"children":595},{"style":364},[596],{"type":44,"value":574},{"type":39,"tag":141,"props":598,"children":599},{"style":364},[600],{"type":44,"value":538},{"type":39,"tag":141,"props":602,"children":604},{"class":143,"line":603},10,[605],{"type":39,"tag":141,"props":606,"children":607},{"style":364},[608],{"type":44,"value":609},"      },\n",{"type":39,"tag":141,"props":611,"children":613},{"class":143,"line":612},11,[614],{"type":39,"tag":141,"props":615,"children":616},{"style":364},[617],{"type":44,"value":618},"    },\n",{"type":39,"tag":141,"props":620,"children":622},{"class":143,"line":621},12,[623],{"type":39,"tag":141,"props":624,"children":625},{"style":364},[626],{"type":44,"value":627},"  },\n",{"type":39,"tag":141,"props":629,"children":631},{"class":143,"line":630},13,[632,637,643,647,652,657],{"type":39,"tag":141,"props":633,"children":634},{"style":364},[635],{"type":44,"value":636},"  ({",{"type":39,"tag":141,"props":638,"children":640},{"style":639},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[641],{"type":44,"value":642}," ui",{"type":39,"tag":141,"props":644,"children":645},{"style":364},[646],{"type":44,"value":418},{"type":39,"tag":141,"props":648,"children":649},{"style":639},[650],{"type":44,"value":651}," llm",{"type":39,"tag":141,"props":653,"children":654},{"style":364},[655],{"type":44,"value":656}," })",{"type":39,"tag":141,"props":658,"children":660},{"style":659},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[661],{"type":44,"value":662}," =>\n",{"type":39,"tag":141,"props":664,"children":666},{"class":143,"line":665},14,[667,672,676,681,686,691,696,701],{"type":39,"tag":141,"props":668,"children":669},{"style":175},[670],{"type":44,"value":671},"    Effect",{"type":39,"tag":141,"props":673,"children":674},{"style":364},[675],{"type":44,"value":474},{"type":39,"tag":141,"props":677,"children":678},{"style":477},[679],{"type":44,"value":680},"gen",{"type":39,"tag":141,"props":682,"children":683},{"style":175},[684],{"type":44,"value":685},"(",{"type":39,"tag":141,"props":687,"children":688},{"style":659},[689],{"type":44,"value":690},"function",{"type":39,"tag":141,"props":692,"children":693},{"style":364},[694],{"type":44,"value":695},"*",{"type":39,"tag":141,"props":697,"children":698},{"style":364},[699],{"type":44,"value":700}," ()",{"type":39,"tag":141,"props":702,"children":703},{"style":364},[704],{"type":44,"value":514},{"type":39,"tag":141,"props":706,"children":707},{"class":143,"line":23},[708,713,717,721,725,730,734,739,743,747,751,755,760,764],{"type":39,"tag":141,"props":709,"children":710},{"style":358},[711],{"type":44,"value":712},"      yield",{"type":39,"tag":141,"props":714,"children":715},{"style":364},[716],{"type":44,"value":695},{"type":39,"tag":141,"props":718,"children":719},{"style":175},[720],{"type":44,"value":651},{"type":39,"tag":141,"props":722,"children":723},{"style":364},[724],{"type":44,"value":474},{"type":39,"tag":141,"props":726,"children":727},{"style":477},[728],{"type":44,"value":729},"queue",{"type":39,"tag":141,"props":731,"children":732},{"style":501},[733],{"type":44,"value":685},{"type":39,"tag":141,"props":735,"children":736},{"style":175},[737],{"type":44,"value":738},"Llm",{"type":39,"tag":141,"props":740,"children":741},{"style":364},[742],{"type":44,"value":474},{"type":39,"tag":141,"props":744,"children":745},{"style":477},[746],{"type":44,"value":44},{"type":39,"tag":141,"props":748,"children":749},{"style":501},[750],{"type":44,"value":685},{"type":39,"tag":141,"props":752,"children":753},{"style":364},[754],{"type":44,"value":574},{"type":39,"tag":141,"props":756,"children":757},{"style":154},[758],{"type":44,"value":759},"The value is 1.",{"type":39,"tag":141,"props":761,"children":762},{"style":364},[763],{"type":44,"value":574},{"type":39,"tag":141,"props":765,"children":766},{"style":501},[767],{"type":44,"value":768},"))\n",{"type":39,"tag":141,"props":770,"children":772},{"class":143,"line":771},16,[773,777,781,785,789,794,798,802,807,811],{"type":39,"tag":141,"props":774,"children":775},{"style":358},[776],{"type":44,"value":712},{"type":39,"tag":141,"props":778,"children":779},{"style":364},[780],{"type":44,"value":695},{"type":39,"tag":141,"props":782,"children":783},{"style":175},[784],{"type":44,"value":642},{"type":39,"tag":141,"props":786,"children":787},{"style":364},[788],{"type":44,"value":474},{"type":39,"tag":141,"props":790,"children":791},{"style":477},[792],{"type":44,"value":793},"submit",{"type":39,"tag":141,"props":795,"children":796},{"style":501},[797],{"type":44,"value":685},{"type":39,"tag":141,"props":799,"children":800},{"style":364},[801],{"type":44,"value":574},{"type":39,"tag":141,"props":803,"children":804},{"style":154},[805],{"type":44,"value":806},"Read src\u002Fvalue.ts",{"type":39,"tag":141,"props":808,"children":809},{"style":364},[810],{"type":44,"value":574},{"type":39,"tag":141,"props":812,"children":813},{"style":501},[814],{"type":44,"value":815},")\n",{"type":39,"tag":141,"props":817,"children":819},{"class":143,"line":818},17,[820,824,828,832,836,841,845,849,853,857],{"type":39,"tag":141,"props":821,"children":822},{"style":358},[823],{"type":44,"value":712},{"type":39,"tag":141,"props":825,"children":826},{"style":364},[827],{"type":44,"value":695},{"type":39,"tag":141,"props":829,"children":830},{"style":175},[831],{"type":44,"value":642},{"type":39,"tag":141,"props":833,"children":834},{"style":364},[835],{"type":44,"value":474},{"type":39,"tag":141,"props":837,"children":838},{"style":477},[839],{"type":44,"value":840},"waitFor",{"type":39,"tag":141,"props":842,"children":843},{"style":501},[844],{"type":44,"value":685},{"type":39,"tag":141,"props":846,"children":847},{"style":364},[848],{"type":44,"value":574},{"type":39,"tag":141,"props":850,"children":851},{"style":154},[852],{"type":44,"value":759},{"type":39,"tag":141,"props":854,"children":855},{"style":364},[856],{"type":44,"value":574},{"type":39,"tag":141,"props":858,"children":859},{"style":501},[860],{"type":44,"value":815},{"type":39,"tag":141,"props":862,"children":864},{"class":143,"line":863},18,[865,869,873,877,881,886,890,894,899,903],{"type":39,"tag":141,"props":866,"children":867},{"style":358},[868],{"type":44,"value":712},{"type":39,"tag":141,"props":870,"children":871},{"style":364},[872],{"type":44,"value":695},{"type":39,"tag":141,"props":874,"children":875},{"style":175},[876],{"type":44,"value":642},{"type":39,"tag":141,"props":878,"children":879},{"style":364},[880],{"type":44,"value":474},{"type":39,"tag":141,"props":882,"children":883},{"style":477},[884],{"type":44,"value":885},"screenshot",{"type":39,"tag":141,"props":887,"children":888},{"style":501},[889],{"type":44,"value":685},{"type":39,"tag":141,"props":891,"children":892},{"style":364},[893],{"type":44,"value":574},{"type":39,"tag":141,"props":895,"children":896},{"style":154},[897],{"type":44,"value":898},"result",{"type":39,"tag":141,"props":900,"children":901},{"style":364},[902],{"type":44,"value":574},{"type":39,"tag":141,"props":904,"children":905},{"style":501},[906],{"type":44,"value":815},{"type":39,"tag":141,"props":908,"children":910},{"class":143,"line":909},19,[911,916,921],{"type":39,"tag":141,"props":912,"children":913},{"style":364},[914],{"type":44,"value":915},"    }",{"type":39,"tag":141,"props":917,"children":918},{"style":175},[919],{"type":44,"value":920},")",{"type":39,"tag":141,"props":922,"children":923},{"style":364},[924],{"type":44,"value":538},{"type":39,"tag":141,"props":926,"children":928},{"class":143,"line":927},20,[929],{"type":39,"tag":141,"props":930,"children":931},{"style":175},[932],{"type":44,"value":815},{"type":39,"tag":86,"props":934,"children":936},{"className":133,"code":935,"language":135,"meta":91,"style":91},"opencode-drive run .\u002Fdrive.ts\n",[937],{"type":39,"tag":53,"props":938,"children":939},{"__ignoreMap":91},[940],{"type":39,"tag":141,"props":941,"children":942},{"class":143,"line":144},[943,947,951],{"type":39,"tag":141,"props":944,"children":945},{"style":148},[946],{"type":44,"value":4},{"type":39,"tag":141,"props":948,"children":949},{"style":154},[950],{"type":44,"value":157},{"type":39,"tag":141,"props":952,"children":953},{"style":154},[954],{"type":44,"value":955}," .\u002Fdrive.ts\n",{"type":39,"tag":47,"props":957,"children":958},{},[959,965,967,973,975,981,983,989],{"type":39,"tag":53,"props":960,"children":962},{"className":961},[],[963],{"type":44,"value":964},"run",{"type":44,"value":966}," type-checks the module before importing it and requires its default export to be an ",{"type":39,"tag":53,"props":968,"children":970},{"className":969},[],[971],{"type":44,"value":972},"Effect\u003Cunknown, unknown, never>",{"type":44,"value":974},". It accepts exactly one module path; it does not accept ",{"type":39,"tag":53,"props":976,"children":978},{"className":977},[],[979],{"type":44,"value":980},"--command.*",{"type":44,"value":982}," flags or application arguments after ",{"type":39,"tag":53,"props":984,"children":986},{"className":985},[],[987],{"type":44,"value":988},"--",{"type":44,"value":474},{"type":39,"tag":47,"props":991,"children":992},{},[993,999,1001,1007],{"type":39,"tag":53,"props":994,"children":996},{"className":995},[],[997],{"type":44,"value":998},"OpenCodeDriver.use",{"type":44,"value":1000}," is the normal lifecycle boundary. It creates an isolated project, starts the server and primary TUI, races the program against backend failure, settles queued LLM work, closes all TUIs, exports recordings, and removes the artifact directory unless ",{"type":39,"tag":53,"props":1002,"children":1004},{"className":1003},[],[1005],{"type":44,"value":1006},"keepArtifacts: true",{"type":44,"value":1008}," is set. Settlement failures fail the program.",{"type":39,"tag":47,"props":1010,"children":1011},{},[1012,1013,1019,1021,1027],{"type":44,"value":51},{"type":39,"tag":53,"props":1014,"children":1016},{"className":1015},[],[1017],{"type":44,"value":1018},"OpenCodeDriver.make",{"type":44,"value":1020}," only when explicit settlement is necessary. It requires a scope, and the program must call ",{"type":39,"tag":53,"props":1022,"children":1024},{"className":1023},[],[1025],{"type":44,"value":1026},"driver.settle()",{"type":44,"value":1028}," before leaving that scope.",{"type":39,"tag":1030,"props":1031,"children":1033},"h3",{"id":1032},"deterministic-project-dsl",[1034],{"type":44,"value":1035},"Deterministic Project DSL",{"type":39,"tag":47,"props":1037,"children":1038},{},[1039,1041,1046],{"type":44,"value":1040},"Declare the project, semantic OpenCode configuration, and TUI configuration in ",{"type":39,"tag":53,"props":1042,"children":1044},{"className":1043},[],[1045],{"type":44,"value":998},{"type":44,"value":1047}," options:",{"type":39,"tag":86,"props":1049,"children":1051},{"className":346,"code":1050,"language":348,"meta":91,"style":91},"export default OpenCodeDriver.use(\n  {\n    project: {\n      git: true,\n      files: { \"README.md\": \"# Fixture\\n\" },\n    },\n    config: {\n      autoupdate: false,\n      username: \"Drive\",\n    },\n    tuiConfig: {\n      theme: \"system\",\n      scroll_speed: 1,\n    },\n    setup: ({ fs, config, tuiConfig }) =>\n      Effect.gen(function* () {\n        yield* fs.writeFile(\"src\u002Fsetup.ts\", \"export const ready = true\\n\")\n        config.username = \"Setup wins\"\n        tuiConfig.scroll_speed = 2\n      }),\n  },\n  ({ ui }) => ui.screenshot(\"home\"),\n)\n",[1052],{"type":39,"tag":53,"props":1053,"children":1054},{"__ignoreMap":91},[1055,1082,1089,1104,1123,1177,1184,1200,1221,1250,1257,1273,1302,1324,1331,1379,1415,1482,1517,1543,1559,1567,1625],{"type":39,"tag":141,"props":1056,"children":1057},{"class":143,"line":144},[1058,1062,1066,1070,1074,1078],{"type":39,"tag":141,"props":1059,"children":1060},{"style":358},[1061],{"type":44,"value":460},{"type":39,"tag":141,"props":1063,"children":1064},{"style":358},[1065],{"type":44,"value":465},{"type":39,"tag":141,"props":1067,"children":1068},{"style":175},[1069],{"type":44,"value":423},{"type":39,"tag":141,"props":1071,"children":1072},{"style":364},[1073],{"type":44,"value":474},{"type":39,"tag":141,"props":1075,"children":1076},{"style":477},[1077],{"type":44,"value":480},{"type":39,"tag":141,"props":1079,"children":1080},{"style":175},[1081],{"type":44,"value":485},{"type":39,"tag":141,"props":1083,"children":1084},{"class":143,"line":27},[1085],{"type":39,"tag":141,"props":1086,"children":1087},{"style":364},[1088],{"type":44,"value":494},{"type":39,"tag":141,"props":1090,"children":1091},{"class":143,"line":198},[1092,1096,1100],{"type":39,"tag":141,"props":1093,"children":1094},{"style":501},[1095],{"type":44,"value":504},{"type":39,"tag":141,"props":1097,"children":1098},{"style":364},[1099],{"type":44,"value":509},{"type":39,"tag":141,"props":1101,"children":1102},{"style":364},[1103],{"type":44,"value":514},{"type":39,"tag":141,"props":1105,"children":1106},{"class":143,"line":301},[1107,1111,1115,1119],{"type":39,"tag":141,"props":1108,"children":1109},{"style":501},[1110],{"type":44,"value":523},{"type":39,"tag":141,"props":1112,"children":1113},{"style":364},[1114],{"type":44,"value":509},{"type":39,"tag":141,"props":1116,"children":1117},{"style":530},[1118],{"type":44,"value":533},{"type":39,"tag":141,"props":1120,"children":1121},{"style":364},[1122],{"type":44,"value":538},{"type":39,"tag":141,"props":1124,"children":1125},{"class":143,"line":488},[1126,1130,1134,1138,1142,1147,1151,1155,1159,1164,1168,1172],{"type":39,"tag":141,"props":1127,"children":1128},{"style":501},[1129],{"type":44,"value":547},{"type":39,"tag":141,"props":1131,"children":1132},{"style":364},[1133],{"type":44,"value":509},{"type":39,"tag":141,"props":1135,"children":1136},{"style":364},[1137],{"type":44,"value":367},{"type":39,"tag":141,"props":1139,"children":1140},{"style":364},[1141],{"type":44,"value":387},{"type":39,"tag":141,"props":1143,"children":1144},{"style":501},[1145],{"type":44,"value":1146},"README.md",{"type":39,"tag":141,"props":1148,"children":1149},{"style":364},[1150],{"type":44,"value":574},{"type":39,"tag":141,"props":1152,"children":1153},{"style":364},[1154],{"type":44,"value":509},{"type":39,"tag":141,"props":1156,"children":1157},{"style":364},[1158],{"type":44,"value":387},{"type":39,"tag":141,"props":1160,"children":1161},{"style":154},[1162],{"type":44,"value":1163},"# Fixture",{"type":39,"tag":141,"props":1165,"children":1166},{"style":175},[1167],{"type":44,"value":592},{"type":39,"tag":141,"props":1169,"children":1170},{"style":364},[1171],{"type":44,"value":574},{"type":39,"tag":141,"props":1173,"children":1174},{"style":364},[1175],{"type":44,"value":1176}," },\n",{"type":39,"tag":141,"props":1178,"children":1179},{"class":143,"line":497},[1180],{"type":39,"tag":141,"props":1181,"children":1182},{"style":364},[1183],{"type":44,"value":618},{"type":39,"tag":141,"props":1185,"children":1186},{"class":143,"line":517},[1187,1192,1196],{"type":39,"tag":141,"props":1188,"children":1189},{"style":501},[1190],{"type":44,"value":1191},"    config",{"type":39,"tag":141,"props":1193,"children":1194},{"style":364},[1195],{"type":44,"value":509},{"type":39,"tag":141,"props":1197,"children":1198},{"style":364},[1199],{"type":44,"value":514},{"type":39,"tag":141,"props":1201,"children":1202},{"class":143,"line":541},[1203,1208,1212,1217],{"type":39,"tag":141,"props":1204,"children":1205},{"style":501},[1206],{"type":44,"value":1207},"      autoupdate",{"type":39,"tag":141,"props":1209,"children":1210},{"style":364},[1211],{"type":44,"value":509},{"type":39,"tag":141,"props":1213,"children":1214},{"style":530},[1215],{"type":44,"value":1216}," false",{"type":39,"tag":141,"props":1218,"children":1219},{"style":364},[1220],{"type":44,"value":538},{"type":39,"tag":141,"props":1222,"children":1223},{"class":143,"line":558},[1224,1229,1233,1237,1242,1246],{"type":39,"tag":141,"props":1225,"children":1226},{"style":501},[1227],{"type":44,"value":1228},"      username",{"type":39,"tag":141,"props":1230,"children":1231},{"style":364},[1232],{"type":44,"value":509},{"type":39,"tag":141,"props":1234,"children":1235},{"style":364},[1236],{"type":44,"value":387},{"type":39,"tag":141,"props":1238,"children":1239},{"style":154},[1240],{"type":44,"value":1241},"Drive",{"type":39,"tag":141,"props":1243,"children":1244},{"style":364},[1245],{"type":44,"value":574},{"type":39,"tag":141,"props":1247,"children":1248},{"style":364},[1249],{"type":44,"value":538},{"type":39,"tag":141,"props":1251,"children":1252},{"class":143,"line":603},[1253],{"type":39,"tag":141,"props":1254,"children":1255},{"style":364},[1256],{"type":44,"value":618},{"type":39,"tag":141,"props":1258,"children":1259},{"class":143,"line":612},[1260,1265,1269],{"type":39,"tag":141,"props":1261,"children":1262},{"style":501},[1263],{"type":44,"value":1264},"    tuiConfig",{"type":39,"tag":141,"props":1266,"children":1267},{"style":364},[1268],{"type":44,"value":509},{"type":39,"tag":141,"props":1270,"children":1271},{"style":364},[1272],{"type":44,"value":514},{"type":39,"tag":141,"props":1274,"children":1275},{"class":143,"line":621},[1276,1281,1285,1289,1294,1298],{"type":39,"tag":141,"props":1277,"children":1278},{"style":501},[1279],{"type":44,"value":1280},"      theme",{"type":39,"tag":141,"props":1282,"children":1283},{"style":364},[1284],{"type":44,"value":509},{"type":39,"tag":141,"props":1286,"children":1287},{"style":364},[1288],{"type":44,"value":387},{"type":39,"tag":141,"props":1290,"children":1291},{"style":154},[1292],{"type":44,"value":1293},"system",{"type":39,"tag":141,"props":1295,"children":1296},{"style":364},[1297],{"type":44,"value":574},{"type":39,"tag":141,"props":1299,"children":1300},{"style":364},[1301],{"type":44,"value":538},{"type":39,"tag":141,"props":1303,"children":1304},{"class":143,"line":630},[1305,1310,1314,1320],{"type":39,"tag":141,"props":1306,"children":1307},{"style":501},[1308],{"type":44,"value":1309},"      scroll_speed",{"type":39,"tag":141,"props":1311,"children":1312},{"style":364},[1313],{"type":44,"value":509},{"type":39,"tag":141,"props":1315,"children":1317},{"style":1316},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1318],{"type":44,"value":1319}," 1",{"type":39,"tag":141,"props":1321,"children":1322},{"style":364},[1323],{"type":44,"value":538},{"type":39,"tag":141,"props":1325,"children":1326},{"class":143,"line":665},[1327],{"type":39,"tag":141,"props":1328,"children":1329},{"style":364},[1330],{"type":44,"value":618},{"type":39,"tag":141,"props":1332,"children":1333},{"class":143,"line":23},[1334,1339,1343,1348,1353,1357,1362,1366,1371,1375],{"type":39,"tag":141,"props":1335,"children":1336},{"style":477},[1337],{"type":44,"value":1338},"    setup",{"type":39,"tag":141,"props":1340,"children":1341},{"style":364},[1342],{"type":44,"value":509},{"type":39,"tag":141,"props":1344,"children":1345},{"style":364},[1346],{"type":44,"value":1347}," ({",{"type":39,"tag":141,"props":1349,"children":1350},{"style":639},[1351],{"type":44,"value":1352}," fs",{"type":39,"tag":141,"props":1354,"children":1355},{"style":364},[1356],{"type":44,"value":418},{"type":39,"tag":141,"props":1358,"children":1359},{"style":639},[1360],{"type":44,"value":1361}," config",{"type":39,"tag":141,"props":1363,"children":1364},{"style":364},[1365],{"type":44,"value":418},{"type":39,"tag":141,"props":1367,"children":1368},{"style":639},[1369],{"type":44,"value":1370}," tuiConfig",{"type":39,"tag":141,"props":1372,"children":1373},{"style":364},[1374],{"type":44,"value":656},{"type":39,"tag":141,"props":1376,"children":1377},{"style":659},[1378],{"type":44,"value":662},{"type":39,"tag":141,"props":1380,"children":1381},{"class":143,"line":771},[1382,1387,1391,1395,1399,1403,1407,1411],{"type":39,"tag":141,"props":1383,"children":1384},{"style":175},[1385],{"type":44,"value":1386},"      Effect",{"type":39,"tag":141,"props":1388,"children":1389},{"style":364},[1390],{"type":44,"value":474},{"type":39,"tag":141,"props":1392,"children":1393},{"style":477},[1394],{"type":44,"value":680},{"type":39,"tag":141,"props":1396,"children":1397},{"style":175},[1398],{"type":44,"value":685},{"type":39,"tag":141,"props":1400,"children":1401},{"style":659},[1402],{"type":44,"value":690},{"type":39,"tag":141,"props":1404,"children":1405},{"style":364},[1406],{"type":44,"value":695},{"type":39,"tag":141,"props":1408,"children":1409},{"style":364},[1410],{"type":44,"value":700},{"type":39,"tag":141,"props":1412,"children":1413},{"style":364},[1414],{"type":44,"value":514},{"type":39,"tag":141,"props":1416,"children":1417},{"class":143,"line":818},[1418,1423,1427,1431,1435,1440,1444,1448,1453,1457,1461,1465,1470,1474,1478],{"type":39,"tag":141,"props":1419,"children":1420},{"style":358},[1421],{"type":44,"value":1422},"        yield",{"type":39,"tag":141,"props":1424,"children":1425},{"style":364},[1426],{"type":44,"value":695},{"type":39,"tag":141,"props":1428,"children":1429},{"style":175},[1430],{"type":44,"value":1352},{"type":39,"tag":141,"props":1432,"children":1433},{"style":364},[1434],{"type":44,"value":474},{"type":39,"tag":141,"props":1436,"children":1437},{"style":477},[1438],{"type":44,"value":1439},"writeFile",{"type":39,"tag":141,"props":1441,"children":1442},{"style":501},[1443],{"type":44,"value":685},{"type":39,"tag":141,"props":1445,"children":1446},{"style":364},[1447],{"type":44,"value":574},{"type":39,"tag":141,"props":1449,"children":1450},{"style":154},[1451],{"type":44,"value":1452},"src\u002Fsetup.ts",{"type":39,"tag":141,"props":1454,"children":1455},{"style":364},[1456],{"type":44,"value":574},{"type":39,"tag":141,"props":1458,"children":1459},{"style":364},[1460],{"type":44,"value":418},{"type":39,"tag":141,"props":1462,"children":1463},{"style":364},[1464],{"type":44,"value":387},{"type":39,"tag":141,"props":1466,"children":1467},{"style":154},[1468],{"type":44,"value":1469},"export const ready = true",{"type":39,"tag":141,"props":1471,"children":1472},{"style":175},[1473],{"type":44,"value":592},{"type":39,"tag":141,"props":1475,"children":1476},{"style":364},[1477],{"type":44,"value":574},{"type":39,"tag":141,"props":1479,"children":1480},{"style":501},[1481],{"type":44,"value":815},{"type":39,"tag":141,"props":1483,"children":1484},{"class":143,"line":863},[1485,1490,1494,1499,1504,1508,1513],{"type":39,"tag":141,"props":1486,"children":1487},{"style":175},[1488],{"type":44,"value":1489},"        config",{"type":39,"tag":141,"props":1491,"children":1492},{"style":364},[1493],{"type":44,"value":474},{"type":39,"tag":141,"props":1495,"children":1496},{"style":175},[1497],{"type":44,"value":1498},"username",{"type":39,"tag":141,"props":1500,"children":1501},{"style":364},[1502],{"type":44,"value":1503}," =",{"type":39,"tag":141,"props":1505,"children":1506},{"style":364},[1507],{"type":44,"value":387},{"type":39,"tag":141,"props":1509,"children":1510},{"style":154},[1511],{"type":44,"value":1512},"Setup wins",{"type":39,"tag":141,"props":1514,"children":1515},{"style":364},[1516],{"type":44,"value":397},{"type":39,"tag":141,"props":1518,"children":1519},{"class":143,"line":909},[1520,1525,1529,1534,1538],{"type":39,"tag":141,"props":1521,"children":1522},{"style":175},[1523],{"type":44,"value":1524},"        tuiConfig",{"type":39,"tag":141,"props":1526,"children":1527},{"style":364},[1528],{"type":44,"value":474},{"type":39,"tag":141,"props":1530,"children":1531},{"style":175},[1532],{"type":44,"value":1533},"scroll_speed",{"type":39,"tag":141,"props":1535,"children":1536},{"style":364},[1537],{"type":44,"value":1503},{"type":39,"tag":141,"props":1539,"children":1540},{"style":1316},[1541],{"type":44,"value":1542}," 2\n",{"type":39,"tag":141,"props":1544,"children":1545},{"class":143,"line":927},[1546,1551,1555],{"type":39,"tag":141,"props":1547,"children":1548},{"style":364},[1549],{"type":44,"value":1550},"      }",{"type":39,"tag":141,"props":1552,"children":1553},{"style":175},[1554],{"type":44,"value":920},{"type":39,"tag":141,"props":1556,"children":1557},{"style":364},[1558],{"type":44,"value":538},{"type":39,"tag":141,"props":1560,"children":1562},{"class":143,"line":1561},21,[1563],{"type":39,"tag":141,"props":1564,"children":1565},{"style":364},[1566],{"type":44,"value":627},{"type":39,"tag":141,"props":1568,"children":1570},{"class":143,"line":1569},22,[1571,1575,1579,1583,1588,1592,1596,1600,1604,1608,1613,1617,1621],{"type":39,"tag":141,"props":1572,"children":1573},{"style":364},[1574],{"type":44,"value":636},{"type":39,"tag":141,"props":1576,"children":1577},{"style":639},[1578],{"type":44,"value":642},{"type":39,"tag":141,"props":1580,"children":1581},{"style":364},[1582],{"type":44,"value":656},{"type":39,"tag":141,"props":1584,"children":1585},{"style":659},[1586],{"type":44,"value":1587}," =>",{"type":39,"tag":141,"props":1589,"children":1590},{"style":175},[1591],{"type":44,"value":642},{"type":39,"tag":141,"props":1593,"children":1594},{"style":364},[1595],{"type":44,"value":474},{"type":39,"tag":141,"props":1597,"children":1598},{"style":477},[1599],{"type":44,"value":885},{"type":39,"tag":141,"props":1601,"children":1602},{"style":175},[1603],{"type":44,"value":685},{"type":39,"tag":141,"props":1605,"children":1606},{"style":364},[1607],{"type":44,"value":574},{"type":39,"tag":141,"props":1609,"children":1610},{"style":154},[1611],{"type":44,"value":1612},"home",{"type":39,"tag":141,"props":1614,"children":1615},{"style":364},[1616],{"type":44,"value":574},{"type":39,"tag":141,"props":1618,"children":1619},{"style":175},[1620],{"type":44,"value":920},{"type":39,"tag":141,"props":1622,"children":1623},{"style":364},[1624],{"type":44,"value":538},{"type":39,"tag":141,"props":1626,"children":1628},{"class":143,"line":1627},23,[1629],{"type":39,"tag":141,"props":1630,"children":1631},{"style":175},[1632],{"type":44,"value":815},{"type":39,"tag":47,"props":1634,"children":1635},{},[1636],{"type":44,"value":1637},"The DSL is applied in this order:",{"type":39,"tag":1639,"props":1640,"children":1641},"ol",{},[1642,1654,1688,1712],{"type":39,"tag":1643,"props":1644,"children":1645},"li",{},[1646,1652],{"type":39,"tag":53,"props":1647,"children":1649},{"className":1648},[],[1650],{"type":44,"value":1651},"project.files",{"type":44,"value":1653}," is written into the isolated project.",{"type":39,"tag":1643,"props":1655,"children":1656},{},[1657,1663,1665,1671,1673,1679,1680,1686],{"type":39,"tag":53,"props":1658,"children":1660},{"className":1659},[],[1661],{"type":44,"value":1662},"config",{"type":44,"value":1664}," and ",{"type":39,"tag":53,"props":1666,"children":1668},{"className":1667},[],[1669],{"type":44,"value":1670},"tuiConfig",{"type":44,"value":1672}," are deeply merged over ",{"type":39,"tag":53,"props":1674,"children":1676},{"className":1675},[],[1677],{"type":44,"value":1678},".opencode\u002Fopencode.jsonc",{"type":44,"value":1664},{"type":39,"tag":53,"props":1681,"children":1683},{"className":1682},[],[1684],{"type":44,"value":1685},".opencode\u002Ftui.jsonc",{"type":44,"value":1687}," fixture values. Objects merge recursively; arrays and scalar values replace existing values.",{"type":39,"tag":1643,"props":1689,"children":1690},{},[1691,1697,1699,1704,1705,1710],{"type":39,"tag":53,"props":1692,"children":1694},{"className":1693},[],[1695],{"type":44,"value":1696},"setup",{"type":44,"value":1698}," runs and may write project files or mutate the merged ",{"type":39,"tag":53,"props":1700,"children":1702},{"className":1701},[],[1703],{"type":44,"value":1662},{"type":44,"value":1664},{"type":39,"tag":53,"props":1706,"children":1708},{"className":1707},[],[1709],{"type":44,"value":1670},{"type":44,"value":1711}," objects. Its mutations take final precedence.",{"type":39,"tag":1643,"props":1713,"children":1714},{},[1715,1717,1723],{"type":44,"value":1716},"Drive writes both configs as stable, formatted JSON. With ",{"type":39,"tag":53,"props":1718,"children":1720},{"className":1719},[],[1721],{"type":44,"value":1722},"project.git: true",{"type":44,"value":1724},", it creates a repository and commits the complete pre-launch state with fixed Git identity and timestamps.",{"type":39,"tag":47,"props":1726,"children":1727},{},[1728,1734,1736,1741],{"type":39,"tag":53,"props":1729,"children":1731},{"className":1730},[],[1732],{"type":44,"value":1733},"fs.writeFile",{"type":44,"value":1735}," is rooted inside the simulated project and creates parent directories. ",{"type":39,"tag":53,"props":1737,"children":1739},{"className":1738},[],[1740],{"type":44,"value":1722},{"type":44,"value":1742}," refuses to replace existing Git metadata; omit it when prepared fixtures already include a repository.",{"type":39,"tag":1030,"props":1744,"children":1746},{"id":1745},"ui-and-llm",[1747],{"type":44,"value":1748},"UI And LLM",{"type":39,"tag":47,"props":1750,"children":1751},{},[1752],{"type":44,"value":1753},"UI operations are Effects:",{"type":39,"tag":1755,"props":1756,"children":1757},"ul",{},[1758,1769,1796,1815,1826,1851,1862],{"type":39,"tag":1643,"props":1759,"children":1760},{},[1761,1767],{"type":39,"tag":53,"props":1762,"children":1764},{"className":1763},[],[1765],{"type":44,"value":1766},"ui.submit(text)",{"type":44,"value":1768}," types and presses Enter.",{"type":39,"tag":1643,"props":1770,"children":1771},{},[1772,1778,1780,1786,1788,1794],{"type":39,"tag":53,"props":1773,"children":1775},{"className":1774},[],[1776],{"type":44,"value":1777},"ui.state()",{"type":44,"value":1779},", ",{"type":39,"tag":53,"props":1781,"children":1783},{"className":1782},[],[1784],{"type":44,"value":1785},"ui.capture()",{"type":44,"value":1787},", and ",{"type":39,"tag":53,"props":1789,"children":1791},{"className":1790},[],[1792],{"type":44,"value":1793},"ui.matches(text)",{"type":44,"value":1795}," inspect the terminal.",{"type":39,"tag":1643,"props":1797,"children":1798},{},[1799,1805,1807,1813],{"type":39,"tag":53,"props":1800,"children":1802},{"className":1801},[],[1803],{"type":44,"value":1804},"ui.snapshot()",{"type":44,"value":1806}," returns the versioned semantic tree; ",{"type":39,"tag":53,"props":1808,"children":1810},{"className":1809},[],[1811],{"type":44,"value":1812},"ui.getNode(query, options?)",{"type":44,"value":1814}," polls for one exact semantic match.",{"type":39,"tag":1643,"props":1816,"children":1817},{},[1818,1824],{"type":39,"tag":53,"props":1819,"children":1821},{"className":1820},[],[1822],{"type":44,"value":1823},"ui.waitFor(textOrPredicate, options?)",{"type":44,"value":1825}," polls until a match.",{"type":39,"tag":1643,"props":1827,"children":1828},{},[1829,1835,1836,1842,1843,1849],{"type":39,"tag":53,"props":1830,"children":1832},{"className":1831},[],[1833],{"type":44,"value":1834},"ui.getElement(query, options?)",{"type":44,"value":1779},{"type":39,"tag":53,"props":1837,"children":1839},{"className":1838},[],[1840],{"type":44,"value":1841},"ui.focus(...)",{"type":44,"value":1787},{"type":39,"tag":53,"props":1844,"children":1846},{"className":1845},[],[1847],{"type":44,"value":1848},"ui.click(...)",{"type":44,"value":1850}," target interactive elements.",{"type":39,"tag":1643,"props":1852,"children":1853},{},[1854,1860],{"type":39,"tag":53,"props":1855,"children":1857},{"className":1856},[],[1858],{"type":44,"value":1859},"ui.screenshot(name?)",{"type":44,"value":1861}," exports an image and returns its absolute path.",{"type":39,"tag":1643,"props":1863,"children":1864},{},[1865,1871,1872,1878,1879,1885],{"type":39,"tag":53,"props":1866,"children":1868},{"className":1867},[],[1869],{"type":44,"value":1870},"ui.resize({ cols, rows })",{"type":44,"value":1779},{"type":39,"tag":53,"props":1873,"children":1875},{"className":1874},[],[1876],{"type":44,"value":1877},"ui.press(...)",{"type":44,"value":1787},{"type":39,"tag":53,"props":1880,"children":1882},{"className":1881},[],[1883],{"type":44,"value":1884},"ui.arrow(...)",{"type":44,"value":1886}," control the TUI.",{"type":39,"tag":47,"props":1888,"children":1889},{},[1890,1892,1897,1899,1905],{"type":44,"value":1891},"Build deterministic simulated responses with the ",{"type":39,"tag":53,"props":1893,"children":1895},{"className":1894},[],[1896],{"type":44,"value":738},{"type":44,"value":1898}," namespace and schedule them through the driver's ",{"type":39,"tag":53,"props":1900,"children":1902},{"className":1901},[],[1903],{"type":44,"value":1904},"llm",{"type":44,"value":1906}," controller:",{"type":39,"tag":86,"props":1908,"children":1910},{"className":346,"code":1909,"language":348,"meta":91,"style":91},"yield* llm.queue(\n  Llm.reasoning(\"Checking the fixture\"),\n  Llm.pause(20),\n  Llm.text(\"The value is 1.\", { delay: 2, chunkSize: 15 }),\n)\n",[1911],{"type":39,"tag":53,"props":1912,"children":1913},{"__ignoreMap":91},[1914,1942,1984,2017,2100],{"type":39,"tag":141,"props":1915,"children":1916},{"class":143,"line":144},[1917,1922,1926,1930,1934,1938],{"type":39,"tag":141,"props":1918,"children":1919},{"style":358},[1920],{"type":44,"value":1921},"yield",{"type":39,"tag":141,"props":1923,"children":1924},{"style":364},[1925],{"type":44,"value":695},{"type":39,"tag":141,"props":1927,"children":1928},{"style":175},[1929],{"type":44,"value":651},{"type":39,"tag":141,"props":1931,"children":1932},{"style":364},[1933],{"type":44,"value":474},{"type":39,"tag":141,"props":1935,"children":1936},{"style":477},[1937],{"type":44,"value":729},{"type":39,"tag":141,"props":1939,"children":1940},{"style":175},[1941],{"type":44,"value":485},{"type":39,"tag":141,"props":1943,"children":1944},{"class":143,"line":27},[1945,1950,1954,1959,1963,1967,1972,1976,1980],{"type":39,"tag":141,"props":1946,"children":1947},{"style":175},[1948],{"type":44,"value":1949},"  Llm",{"type":39,"tag":141,"props":1951,"children":1952},{"style":364},[1953],{"type":44,"value":474},{"type":39,"tag":141,"props":1955,"children":1956},{"style":477},[1957],{"type":44,"value":1958},"reasoning",{"type":39,"tag":141,"props":1960,"children":1961},{"style":175},[1962],{"type":44,"value":685},{"type":39,"tag":141,"props":1964,"children":1965},{"style":364},[1966],{"type":44,"value":574},{"type":39,"tag":141,"props":1968,"children":1969},{"style":154},[1970],{"type":44,"value":1971},"Checking the fixture",{"type":39,"tag":141,"props":1973,"children":1974},{"style":364},[1975],{"type":44,"value":574},{"type":39,"tag":141,"props":1977,"children":1978},{"style":175},[1979],{"type":44,"value":920},{"type":39,"tag":141,"props":1981,"children":1982},{"style":364},[1983],{"type":44,"value":538},{"type":39,"tag":141,"props":1985,"children":1986},{"class":143,"line":198},[1987,1991,1995,2000,2004,2009,2013],{"type":39,"tag":141,"props":1988,"children":1989},{"style":175},[1990],{"type":44,"value":1949},{"type":39,"tag":141,"props":1992,"children":1993},{"style":364},[1994],{"type":44,"value":474},{"type":39,"tag":141,"props":1996,"children":1997},{"style":477},[1998],{"type":44,"value":1999},"pause",{"type":39,"tag":141,"props":2001,"children":2002},{"style":175},[2003],{"type":44,"value":685},{"type":39,"tag":141,"props":2005,"children":2006},{"style":1316},[2007],{"type":44,"value":2008},"20",{"type":39,"tag":141,"props":2010,"children":2011},{"style":175},[2012],{"type":44,"value":920},{"type":39,"tag":141,"props":2014,"children":2015},{"style":364},[2016],{"type":44,"value":538},{"type":39,"tag":141,"props":2018,"children":2019},{"class":143,"line":301},[2020,2024,2028,2032,2036,2040,2044,2048,2052,2056,2061,2065,2070,2074,2079,2083,2088,2092,2096],{"type":39,"tag":141,"props":2021,"children":2022},{"style":175},[2023],{"type":44,"value":1949},{"type":39,"tag":141,"props":2025,"children":2026},{"style":364},[2027],{"type":44,"value":474},{"type":39,"tag":141,"props":2029,"children":2030},{"style":477},[2031],{"type":44,"value":44},{"type":39,"tag":141,"props":2033,"children":2034},{"style":175},[2035],{"type":44,"value":685},{"type":39,"tag":141,"props":2037,"children":2038},{"style":364},[2039],{"type":44,"value":574},{"type":39,"tag":141,"props":2041,"children":2042},{"style":154},[2043],{"type":44,"value":759},{"type":39,"tag":141,"props":2045,"children":2046},{"style":364},[2047],{"type":44,"value":574},{"type":39,"tag":141,"props":2049,"children":2050},{"style":364},[2051],{"type":44,"value":418},{"type":39,"tag":141,"props":2053,"children":2054},{"style":364},[2055],{"type":44,"value":367},{"type":39,"tag":141,"props":2057,"children":2058},{"style":501},[2059],{"type":44,"value":2060}," delay",{"type":39,"tag":141,"props":2062,"children":2063},{"style":364},[2064],{"type":44,"value":509},{"type":39,"tag":141,"props":2066,"children":2067},{"style":1316},[2068],{"type":44,"value":2069}," 2",{"type":39,"tag":141,"props":2071,"children":2072},{"style":364},[2073],{"type":44,"value":418},{"type":39,"tag":141,"props":2075,"children":2076},{"style":501},[2077],{"type":44,"value":2078}," chunkSize",{"type":39,"tag":141,"props":2080,"children":2081},{"style":364},[2082],{"type":44,"value":509},{"type":39,"tag":141,"props":2084,"children":2085},{"style":1316},[2086],{"type":44,"value":2087}," 15",{"type":39,"tag":141,"props":2089,"children":2090},{"style":364},[2091],{"type":44,"value":377},{"type":39,"tag":141,"props":2093,"children":2094},{"style":175},[2095],{"type":44,"value":920},{"type":39,"tag":141,"props":2097,"children":2098},{"style":364},[2099],{"type":44,"value":538},{"type":39,"tag":141,"props":2101,"children":2102},{"class":143,"line":488},[2103],{"type":39,"tag":141,"props":2104,"children":2105},{"style":175},[2106],{"type":44,"value":815},{"type":39,"tag":47,"props":2108,"children":2109},{},[2110,2116,2118,2124,2126,2132,2134,2140,2142,2147,2148,2153,2154,2159,2160,2166,2167,2173,2174,2180,2181,2187,2189,2195],{"type":39,"tag":53,"props":2111,"children":2113},{"className":2112},[],[2114],{"type":44,"value":2115},"llm.queue(...)",{"type":44,"value":2117}," declares the next response without waiting. ",{"type":39,"tag":53,"props":2119,"children":2121},{"className":2120},[],[2122],{"type":44,"value":2123},"llm.send(...)",{"type":44,"value":2125},"\nwaits for the next request and completes its response. For ongoing responses,\nthe handler passed to ",{"type":39,"tag":53,"props":2127,"children":2129},{"className":2128},[],[2130],{"type":44,"value":2131},"llm.serve",{"type":44,"value":2133}," returns an Effect ",{"type":39,"tag":53,"props":2135,"children":2137},{"className":2136},[],[2138],{"type":44,"value":2139},"Stream",{"type":44,"value":2141},"; registering the\nhandler is an Effect. Available outputs include ",{"type":39,"tag":53,"props":2143,"children":2145},{"className":2144},[],[2146],{"type":44,"value":44},{"type":44,"value":1779},{"type":39,"tag":53,"props":2149,"children":2151},{"className":2150},[],[2152],{"type":44,"value":1958},{"type":44,"value":1779},{"type":39,"tag":53,"props":2155,"children":2157},{"className":2156},[],[2158],{"type":44,"value":1999},{"type":44,"value":538},{"type":39,"tag":53,"props":2161,"children":2163},{"className":2162},[],[2164],{"type":44,"value":2165},"toolCall",{"type":44,"value":1779},{"type":39,"tag":53,"props":2168,"children":2170},{"className":2169},[],[2171],{"type":44,"value":2172},"raw",{"type":44,"value":1779},{"type":39,"tag":53,"props":2175,"children":2177},{"className":2176},[],[2178],{"type":44,"value":2179},"finish",{"type":44,"value":1787},{"type":39,"tag":53,"props":2182,"children":2184},{"className":2183},[],[2185],{"type":44,"value":2186},"disconnect",{"type":44,"value":2188},"; a normal response gets\n",{"type":39,"tag":53,"props":2190,"children":2192},{"className":2191},[],[2193],{"type":44,"value":2194},"finish(\"stop\")",{"type":44,"value":2196}," when no terminal output is supplied.",{"type":39,"tag":86,"props":2198,"children":2200},{"className":346,"code":2199,"language":348,"meta":91,"style":91},"import { Stream } from \"effect\"\nimport { Llm } from \"opencode-drive\"\n\nyield* llm.serve((_request, index) =>\n  Stream.make(Llm.text(`Response ${index + 1}`)),\n)\n",[2201],{"type":39,"tag":53,"props":2202,"children":2203},{"__ignoreMap":91},[2204,2240,2275,2282,2336,2413],{"type":39,"tag":141,"props":2205,"children":2206},{"class":143,"line":144},[2207,2211,2215,2220,2224,2228,2232,2236],{"type":39,"tag":141,"props":2208,"children":2209},{"style":358},[2210],{"type":44,"value":361},{"type":39,"tag":141,"props":2212,"children":2213},{"style":364},[2214],{"type":44,"value":367},{"type":39,"tag":141,"props":2216,"children":2217},{"style":175},[2218],{"type":44,"value":2219}," Stream",{"type":39,"tag":141,"props":2221,"children":2222},{"style":364},[2223],{"type":44,"value":377},{"type":39,"tag":141,"props":2225,"children":2226},{"style":358},[2227],{"type":44,"value":382},{"type":39,"tag":141,"props":2229,"children":2230},{"style":364},[2231],{"type":44,"value":387},{"type":39,"tag":141,"props":2233,"children":2234},{"style":154},[2235],{"type":44,"value":392},{"type":39,"tag":141,"props":2237,"children":2238},{"style":364},[2239],{"type":44,"value":397},{"type":39,"tag":141,"props":2241,"children":2242},{"class":143,"line":27},[2243,2247,2251,2255,2259,2263,2267,2271],{"type":39,"tag":141,"props":2244,"children":2245},{"style":358},[2246],{"type":44,"value":361},{"type":39,"tag":141,"props":2248,"children":2249},{"style":364},[2250],{"type":44,"value":367},{"type":39,"tag":141,"props":2252,"children":2253},{"style":175},[2254],{"type":44,"value":413},{"type":39,"tag":141,"props":2256,"children":2257},{"style":364},[2258],{"type":44,"value":377},{"type":39,"tag":141,"props":2260,"children":2261},{"style":358},[2262],{"type":44,"value":382},{"type":39,"tag":141,"props":2264,"children":2265},{"style":364},[2266],{"type":44,"value":387},{"type":39,"tag":141,"props":2268,"children":2269},{"style":154},[2270],{"type":44,"value":4},{"type":39,"tag":141,"props":2272,"children":2273},{"style":364},[2274],{"type":44,"value":397},{"type":39,"tag":141,"props":2276,"children":2277},{"class":143,"line":198},[2278],{"type":39,"tag":141,"props":2279,"children":2280},{"emptyLinePlaceholder":449},[2281],{"type":44,"value":452},{"type":39,"tag":141,"props":2283,"children":2284},{"class":143,"line":301},[2285,2289,2293,2297,2301,2306,2310,2314,2319,2323,2328,2332],{"type":39,"tag":141,"props":2286,"children":2287},{"style":358},[2288],{"type":44,"value":1921},{"type":39,"tag":141,"props":2290,"children":2291},{"style":364},[2292],{"type":44,"value":695},{"type":39,"tag":141,"props":2294,"children":2295},{"style":175},[2296],{"type":44,"value":651},{"type":39,"tag":141,"props":2298,"children":2299},{"style":364},[2300],{"type":44,"value":474},{"type":39,"tag":141,"props":2302,"children":2303},{"style":477},[2304],{"type":44,"value":2305},"serve",{"type":39,"tag":141,"props":2307,"children":2308},{"style":175},[2309],{"type":44,"value":685},{"type":39,"tag":141,"props":2311,"children":2312},{"style":364},[2313],{"type":44,"value":685},{"type":39,"tag":141,"props":2315,"children":2316},{"style":639},[2317],{"type":44,"value":2318},"_request",{"type":39,"tag":141,"props":2320,"children":2321},{"style":364},[2322],{"type":44,"value":418},{"type":39,"tag":141,"props":2324,"children":2325},{"style":639},[2326],{"type":44,"value":2327}," index",{"type":39,"tag":141,"props":2329,"children":2330},{"style":364},[2331],{"type":44,"value":920},{"type":39,"tag":141,"props":2333,"children":2334},{"style":659},[2335],{"type":44,"value":662},{"type":39,"tag":141,"props":2337,"children":2338},{"class":143,"line":488},[2339,2344,2348,2353,2358,2362,2366,2370,2375,2380,2385,2390,2395,2399,2404,2409],{"type":39,"tag":141,"props":2340,"children":2341},{"style":175},[2342],{"type":44,"value":2343},"  Stream",{"type":39,"tag":141,"props":2345,"children":2346},{"style":364},[2347],{"type":44,"value":474},{"type":39,"tag":141,"props":2349,"children":2350},{"style":477},[2351],{"type":44,"value":2352},"make",{"type":39,"tag":141,"props":2354,"children":2355},{"style":175},[2356],{"type":44,"value":2357},"(Llm",{"type":39,"tag":141,"props":2359,"children":2360},{"style":364},[2361],{"type":44,"value":474},{"type":39,"tag":141,"props":2363,"children":2364},{"style":477},[2365],{"type":44,"value":44},{"type":39,"tag":141,"props":2367,"children":2368},{"style":175},[2369],{"type":44,"value":685},{"type":39,"tag":141,"props":2371,"children":2372},{"style":364},[2373],{"type":44,"value":2374},"`",{"type":39,"tag":141,"props":2376,"children":2377},{"style":154},[2378],{"type":44,"value":2379},"Response ",{"type":39,"tag":141,"props":2381,"children":2382},{"style":364},[2383],{"type":44,"value":2384},"${",{"type":39,"tag":141,"props":2386,"children":2387},{"style":175},[2388],{"type":44,"value":2389},"index ",{"type":39,"tag":141,"props":2391,"children":2392},{"style":364},[2393],{"type":44,"value":2394},"+",{"type":39,"tag":141,"props":2396,"children":2397},{"style":1316},[2398],{"type":44,"value":1319},{"type":39,"tag":141,"props":2400,"children":2401},{"style":364},[2402],{"type":44,"value":2403},"}`",{"type":39,"tag":141,"props":2405,"children":2406},{"style":175},[2407],{"type":44,"value":2408},"))",{"type":39,"tag":141,"props":2410,"children":2411},{"style":364},[2412],{"type":44,"value":538},{"type":39,"tag":141,"props":2414,"children":2415},{"class":143,"line":497},[2416],{"type":39,"tag":141,"props":2417,"children":2418},{"style":175},[2419],{"type":44,"value":815},{"type":39,"tag":47,"props":2421,"children":2422},{},[2423,2425,2431,2433,2439,2441,2447,2449,2455,2456,2462],{"type":44,"value":2424},"Use the capability names literally: ",{"type":39,"tag":53,"props":2426,"children":2428},{"className":2427},[],[2429],{"type":44,"value":2430},"opencode",{"type":44,"value":2432}," is the generated OpenCode SDK,\n",{"type":39,"tag":53,"props":2434,"children":2436},{"className":2435},[],[2437],{"type":44,"value":2438},"tui",{"type":44,"value":2440}," is the primary frontend process, ",{"type":39,"tag":53,"props":2442,"children":2444},{"className":2443},[],[2445],{"type":44,"value":2446},"ui",{"type":44,"value":2448}," is ",{"type":39,"tag":53,"props":2450,"children":2452},{"className":2451},[],[2453],{"type":44,"value":2454},"tui.ui",{"type":44,"value":1787},{"type":39,"tag":53,"props":2457,"children":2459},{"className":2458},[],[2460],{"type":44,"value":2461},"tuis",{"type":44,"value":2463}," launches\nadditional frontend processes.",{"type":39,"tag":47,"props":2465,"children":2466},{},[2467],{"type":44,"value":2468},"Additional TUIs share the server and LLM controller:",{"type":39,"tag":86,"props":2470,"children":2472},{"className":346,"code":2471,"language":348,"meta":91,"style":91},"const secondary = yield* tuis.launch({\n  viewport: { cols: 120, rows: 40 },\n  recording: true,\n})\nyield* secondary.ui.screenshot(\"secondary\")\n",[2473],{"type":39,"tag":53,"props":2474,"children":2475},{"__ignoreMap":91},[2476,2526,2578,2598,2610],{"type":39,"tag":141,"props":2477,"children":2478},{"class":143,"line":144},[2479,2484,2489,2494,2499,2503,2508,2512,2517,2521],{"type":39,"tag":141,"props":2480,"children":2481},{"style":659},[2482],{"type":44,"value":2483},"const",{"type":39,"tag":141,"props":2485,"children":2486},{"style":175},[2487],{"type":44,"value":2488}," secondary ",{"type":39,"tag":141,"props":2490,"children":2491},{"style":364},[2492],{"type":44,"value":2493},"=",{"type":39,"tag":141,"props":2495,"children":2496},{"style":358},[2497],{"type":44,"value":2498}," yield",{"type":39,"tag":141,"props":2500,"children":2501},{"style":364},[2502],{"type":44,"value":695},{"type":39,"tag":141,"props":2504,"children":2505},{"style":175},[2506],{"type":44,"value":2507}," tuis",{"type":39,"tag":141,"props":2509,"children":2510},{"style":364},[2511],{"type":44,"value":474},{"type":39,"tag":141,"props":2513,"children":2514},{"style":477},[2515],{"type":44,"value":2516},"launch",{"type":39,"tag":141,"props":2518,"children":2519},{"style":175},[2520],{"type":44,"value":685},{"type":39,"tag":141,"props":2522,"children":2523},{"style":364},[2524],{"type":44,"value":2525},"{\n",{"type":39,"tag":141,"props":2527,"children":2528},{"class":143,"line":27},[2529,2534,2538,2542,2547,2551,2556,2560,2565,2569,2574],{"type":39,"tag":141,"props":2530,"children":2531},{"style":501},[2532],{"type":44,"value":2533},"  viewport",{"type":39,"tag":141,"props":2535,"children":2536},{"style":364},[2537],{"type":44,"value":509},{"type":39,"tag":141,"props":2539,"children":2540},{"style":364},[2541],{"type":44,"value":367},{"type":39,"tag":141,"props":2543,"children":2544},{"style":501},[2545],{"type":44,"value":2546}," cols",{"type":39,"tag":141,"props":2548,"children":2549},{"style":364},[2550],{"type":44,"value":509},{"type":39,"tag":141,"props":2552,"children":2553},{"style":1316},[2554],{"type":44,"value":2555}," 120",{"type":39,"tag":141,"props":2557,"children":2558},{"style":364},[2559],{"type":44,"value":418},{"type":39,"tag":141,"props":2561,"children":2562},{"style":501},[2563],{"type":44,"value":2564}," rows",{"type":39,"tag":141,"props":2566,"children":2567},{"style":364},[2568],{"type":44,"value":509},{"type":39,"tag":141,"props":2570,"children":2571},{"style":1316},[2572],{"type":44,"value":2573}," 40",{"type":39,"tag":141,"props":2575,"children":2576},{"style":364},[2577],{"type":44,"value":1176},{"type":39,"tag":141,"props":2579,"children":2580},{"class":143,"line":198},[2581,2586,2590,2594],{"type":39,"tag":141,"props":2582,"children":2583},{"style":501},[2584],{"type":44,"value":2585},"  recording",{"type":39,"tag":141,"props":2587,"children":2588},{"style":364},[2589],{"type":44,"value":509},{"type":39,"tag":141,"props":2591,"children":2592},{"style":530},[2593],{"type":44,"value":533},{"type":39,"tag":141,"props":2595,"children":2596},{"style":364},[2597],{"type":44,"value":538},{"type":39,"tag":141,"props":2599,"children":2600},{"class":143,"line":301},[2601,2606],{"type":39,"tag":141,"props":2602,"children":2603},{"style":364},[2604],{"type":44,"value":2605},"}",{"type":39,"tag":141,"props":2607,"children":2608},{"style":175},[2609],{"type":44,"value":815},{"type":39,"tag":141,"props":2611,"children":2612},{"class":143,"line":488},[2613,2617,2621,2626,2630,2634,2638,2642,2646,2650,2655,2659],{"type":39,"tag":141,"props":2614,"children":2615},{"style":358},[2616],{"type":44,"value":1921},{"type":39,"tag":141,"props":2618,"children":2619},{"style":364},[2620],{"type":44,"value":695},{"type":39,"tag":141,"props":2622,"children":2623},{"style":175},[2624],{"type":44,"value":2625}," secondary",{"type":39,"tag":141,"props":2627,"children":2628},{"style":364},[2629],{"type":44,"value":474},{"type":39,"tag":141,"props":2631,"children":2632},{"style":175},[2633],{"type":44,"value":2446},{"type":39,"tag":141,"props":2635,"children":2636},{"style":364},[2637],{"type":44,"value":474},{"type":39,"tag":141,"props":2639,"children":2640},{"style":477},[2641],{"type":44,"value":885},{"type":39,"tag":141,"props":2643,"children":2644},{"style":175},[2645],{"type":44,"value":685},{"type":39,"tag":141,"props":2647,"children":2648},{"style":364},[2649],{"type":44,"value":574},{"type":39,"tag":141,"props":2651,"children":2652},{"style":154},[2653],{"type":44,"value":2654},"secondary",{"type":39,"tag":141,"props":2656,"children":2657},{"style":364},[2658],{"type":44,"value":574},{"type":39,"tag":141,"props":2660,"children":2661},{"style":175},[2662],{"type":44,"value":815},{"type":39,"tag":1030,"props":2664,"children":2666},{"id":2665},"reports-and-paths",[2667],{"type":44,"value":2668},"Reports And Paths",{"type":39,"tag":47,"props":2670,"children":2671},{},[2672,2678,2680,2686,2688,2694,2696,2702,2703,2709],{"type":39,"tag":53,"props":2673,"children":2675},{"className":2674},[],[2676],{"type":44,"value":2677},"OpenCodeDriver",{"type":44,"value":2679}," exports a branded ",{"type":39,"tag":53,"props":2681,"children":2683},{"className":2682},[],[2684],{"type":44,"value":2685},"AbsolutePath",{"type":44,"value":2687}," schema and a compact ",{"type":39,"tag":53,"props":2689,"children":2691},{"className":2690},[],[2692],{"type":44,"value":2693},"RunReport",{"type":44,"value":2695}," containing the artifact root, retention, recording paths, and endpoint compatibility. It also exports ",{"type":39,"tag":53,"props":2697,"children":2699},{"className":2698},[],[2700],{"type":44,"value":2701},"decodeAbsolutePath",{"type":44,"value":1664},{"type":39,"tag":53,"props":2704,"children":2706},{"className":2705},[],[2707],{"type":44,"value":2708},"decodeRunReport",{"type":44,"value":2710}," for validating unknown values.",{"type":39,"tag":47,"props":2712,"children":2713},{},[2714,2719,2721,2727],{"type":39,"tag":53,"props":2715,"children":2717},{"className":2716},[],[2718],{"type":44,"value":1026},{"type":44,"value":2720}," returns the report with its recording paths. Use ",{"type":39,"tag":53,"props":2722,"children":2724},{"className":2723},[],[2725],{"type":44,"value":2726},"OpenCodeDriver.useReport(options, run)",{"type":44,"value":2728}," when a safe lifecycle program also needs the report alongside its result.",{"type":39,"tag":47,"props":2730,"children":2731},{},[2732,2734,2740,2742,2748],{"type":44,"value":2733},"Drive prefers protocol negotiation and reports explicit legacy fallback. Set ",{"type":39,"tag":53,"props":2735,"children":2737},{"className":2736},[],[2738],{"type":44,"value":2739},"opencode.compatibility",{"type":44,"value":2741}," to ",{"type":39,"tag":53,"props":2743,"children":2745},{"className":2744},[],[2746],{"type":44,"value":2747},"\"required\"",{"type":44,"value":2749}," when protocol skew must fail before the program runs. Additional built-in tool adapters remain follow-ups.",{"type":39,"tag":1030,"props":2751,"children":2753},{"id":2752},"arbitrary-dynamic-tools",[2754],{"type":44,"value":2755},"Arbitrary Dynamic Tools",{"type":39,"tag":47,"props":2757,"children":2758},{},[2759,2761,2767],{"type":44,"value":2760},"Use runtime ",{"type":39,"tag":53,"props":2762,"children":2764},{"className":2763},[],[2765],{"type":44,"value":2766},"tools.attach",{"type":44,"value":2768}," for tools that do not have a shipped Drive adapter.\nAttachment replaces the complete dynamic set without affecting configured\nstatic adapters. Take invocations by the model call ID, while Drive owns\nproducer IDs, progress sequences, reconnect replay, and exactly-one terminal\ncommitment.",{"type":39,"tag":86,"props":2770,"children":2772},{"className":346,"code":2771,"language":348,"meta":91,"style":91},"yield* tools.attach({\n  tools: [\n    {\n      name: \"lookup\",\n      description: \"Look up a value\",\n      inputSchema: {\n        type: \"object\",\n        properties: { query: { type: \"string\" } },\n        required: [\"query\"],\n      },\n      options: { codemode: false },\n    },\n  ],\n})\n\nconst lookup = yield* tools.take(\"call_lookup\")\nyield* lookup.progress({ structured: { phase: \"searching\" } })\nyield* lookup.finish({\n  structured: { answer: 42 },\n  content: [{ type: \"text\", text: \"42\" }],\n})\n",[2773],{"type":39,"tag":53,"props":2774,"children":2775},{"__ignoreMap":91},[2776,2809,2826,2834,2863,2892,2908,2937,2996,3035,3042,3075,3082,3094,3105,3112,3170,3251,3282,3316,3394],{"type":39,"tag":141,"props":2777,"children":2778},{"class":143,"line":144},[2779,2783,2787,2792,2796,2801,2805],{"type":39,"tag":141,"props":2780,"children":2781},{"style":358},[2782],{"type":44,"value":1921},{"type":39,"tag":141,"props":2784,"children":2785},{"style":364},[2786],{"type":44,"value":695},{"type":39,"tag":141,"props":2788,"children":2789},{"style":175},[2790],{"type":44,"value":2791}," tools",{"type":39,"tag":141,"props":2793,"children":2794},{"style":364},[2795],{"type":44,"value":474},{"type":39,"tag":141,"props":2797,"children":2798},{"style":477},[2799],{"type":44,"value":2800},"attach",{"type":39,"tag":141,"props":2802,"children":2803},{"style":175},[2804],{"type":44,"value":685},{"type":39,"tag":141,"props":2806,"children":2807},{"style":364},[2808],{"type":44,"value":2525},{"type":39,"tag":141,"props":2810,"children":2811},{"class":143,"line":27},[2812,2817,2821],{"type":39,"tag":141,"props":2813,"children":2814},{"style":501},[2815],{"type":44,"value":2816},"  tools",{"type":39,"tag":141,"props":2818,"children":2819},{"style":364},[2820],{"type":44,"value":509},{"type":39,"tag":141,"props":2822,"children":2823},{"style":175},[2824],{"type":44,"value":2825}," [\n",{"type":39,"tag":141,"props":2827,"children":2828},{"class":143,"line":198},[2829],{"type":39,"tag":141,"props":2830,"children":2831},{"style":364},[2832],{"type":44,"value":2833},"    {\n",{"type":39,"tag":141,"props":2835,"children":2836},{"class":143,"line":301},[2837,2842,2846,2850,2855,2859],{"type":39,"tag":141,"props":2838,"children":2839},{"style":501},[2840],{"type":44,"value":2841},"      name",{"type":39,"tag":141,"props":2843,"children":2844},{"style":364},[2845],{"type":44,"value":509},{"type":39,"tag":141,"props":2847,"children":2848},{"style":364},[2849],{"type":44,"value":387},{"type":39,"tag":141,"props":2851,"children":2852},{"style":154},[2853],{"type":44,"value":2854},"lookup",{"type":39,"tag":141,"props":2856,"children":2857},{"style":364},[2858],{"type":44,"value":574},{"type":39,"tag":141,"props":2860,"children":2861},{"style":364},[2862],{"type":44,"value":538},{"type":39,"tag":141,"props":2864,"children":2865},{"class":143,"line":488},[2866,2871,2875,2879,2884,2888],{"type":39,"tag":141,"props":2867,"children":2868},{"style":501},[2869],{"type":44,"value":2870},"      description",{"type":39,"tag":141,"props":2872,"children":2873},{"style":364},[2874],{"type":44,"value":509},{"type":39,"tag":141,"props":2876,"children":2877},{"style":364},[2878],{"type":44,"value":387},{"type":39,"tag":141,"props":2880,"children":2881},{"style":154},[2882],{"type":44,"value":2883},"Look up a value",{"type":39,"tag":141,"props":2885,"children":2886},{"style":364},[2887],{"type":44,"value":574},{"type":39,"tag":141,"props":2889,"children":2890},{"style":364},[2891],{"type":44,"value":538},{"type":39,"tag":141,"props":2893,"children":2894},{"class":143,"line":497},[2895,2900,2904],{"type":39,"tag":141,"props":2896,"children":2897},{"style":501},[2898],{"type":44,"value":2899},"      inputSchema",{"type":39,"tag":141,"props":2901,"children":2902},{"style":364},[2903],{"type":44,"value":509},{"type":39,"tag":141,"props":2905,"children":2906},{"style":364},[2907],{"type":44,"value":514},{"type":39,"tag":141,"props":2909,"children":2910},{"class":143,"line":517},[2911,2916,2920,2924,2929,2933],{"type":39,"tag":141,"props":2912,"children":2913},{"style":501},[2914],{"type":44,"value":2915},"        type",{"type":39,"tag":141,"props":2917,"children":2918},{"style":364},[2919],{"type":44,"value":509},{"type":39,"tag":141,"props":2921,"children":2922},{"style":364},[2923],{"type":44,"value":387},{"type":39,"tag":141,"props":2925,"children":2926},{"style":154},[2927],{"type":44,"value":2928},"object",{"type":39,"tag":141,"props":2930,"children":2931},{"style":364},[2932],{"type":44,"value":574},{"type":39,"tag":141,"props":2934,"children":2935},{"style":364},[2936],{"type":44,"value":538},{"type":39,"tag":141,"props":2938,"children":2939},{"class":143,"line":541},[2940,2945,2949,2953,2958,2962,2966,2971,2975,2979,2984,2988,2992],{"type":39,"tag":141,"props":2941,"children":2942},{"style":501},[2943],{"type":44,"value":2944},"        properties",{"type":39,"tag":141,"props":2946,"children":2947},{"style":364},[2948],{"type":44,"value":509},{"type":39,"tag":141,"props":2950,"children":2951},{"style":364},[2952],{"type":44,"value":367},{"type":39,"tag":141,"props":2954,"children":2955},{"style":501},[2956],{"type":44,"value":2957}," query",{"type":39,"tag":141,"props":2959,"children":2960},{"style":364},[2961],{"type":44,"value":509},{"type":39,"tag":141,"props":2963,"children":2964},{"style":364},[2965],{"type":44,"value":367},{"type":39,"tag":141,"props":2967,"children":2968},{"style":501},[2969],{"type":44,"value":2970}," type",{"type":39,"tag":141,"props":2972,"children":2973},{"style":364},[2974],{"type":44,"value":509},{"type":39,"tag":141,"props":2976,"children":2977},{"style":364},[2978],{"type":44,"value":387},{"type":39,"tag":141,"props":2980,"children":2981},{"style":154},[2982],{"type":44,"value":2983},"string",{"type":39,"tag":141,"props":2985,"children":2986},{"style":364},[2987],{"type":44,"value":574},{"type":39,"tag":141,"props":2989,"children":2990},{"style":364},[2991],{"type":44,"value":377},{"type":39,"tag":141,"props":2993,"children":2994},{"style":364},[2995],{"type":44,"value":1176},{"type":39,"tag":141,"props":2997,"children":2998},{"class":143,"line":558},[2999,3004,3008,3013,3017,3022,3026,3031],{"type":39,"tag":141,"props":3000,"children":3001},{"style":501},[3002],{"type":44,"value":3003},"        required",{"type":39,"tag":141,"props":3005,"children":3006},{"style":364},[3007],{"type":44,"value":509},{"type":39,"tag":141,"props":3009,"children":3010},{"style":175},[3011],{"type":44,"value":3012}," [",{"type":39,"tag":141,"props":3014,"children":3015},{"style":364},[3016],{"type":44,"value":574},{"type":39,"tag":141,"props":3018,"children":3019},{"style":154},[3020],{"type":44,"value":3021},"query",{"type":39,"tag":141,"props":3023,"children":3024},{"style":364},[3025],{"type":44,"value":574},{"type":39,"tag":141,"props":3027,"children":3028},{"style":175},[3029],{"type":44,"value":3030},"]",{"type":39,"tag":141,"props":3032,"children":3033},{"style":364},[3034],{"type":44,"value":538},{"type":39,"tag":141,"props":3036,"children":3037},{"class":143,"line":603},[3038],{"type":39,"tag":141,"props":3039,"children":3040},{"style":364},[3041],{"type":44,"value":609},{"type":39,"tag":141,"props":3043,"children":3044},{"class":143,"line":612},[3045,3050,3054,3058,3063,3067,3071],{"type":39,"tag":141,"props":3046,"children":3047},{"style":501},[3048],{"type":44,"value":3049},"      options",{"type":39,"tag":141,"props":3051,"children":3052},{"style":364},[3053],{"type":44,"value":509},{"type":39,"tag":141,"props":3055,"children":3056},{"style":364},[3057],{"type":44,"value":367},{"type":39,"tag":141,"props":3059,"children":3060},{"style":501},[3061],{"type":44,"value":3062}," codemode",{"type":39,"tag":141,"props":3064,"children":3065},{"style":364},[3066],{"type":44,"value":509},{"type":39,"tag":141,"props":3068,"children":3069},{"style":530},[3070],{"type":44,"value":1216},{"type":39,"tag":141,"props":3072,"children":3073},{"style":364},[3074],{"type":44,"value":1176},{"type":39,"tag":141,"props":3076,"children":3077},{"class":143,"line":621},[3078],{"type":39,"tag":141,"props":3079,"children":3080},{"style":364},[3081],{"type":44,"value":618},{"type":39,"tag":141,"props":3083,"children":3084},{"class":143,"line":630},[3085,3090],{"type":39,"tag":141,"props":3086,"children":3087},{"style":175},[3088],{"type":44,"value":3089},"  ]",{"type":39,"tag":141,"props":3091,"children":3092},{"style":364},[3093],{"type":44,"value":538},{"type":39,"tag":141,"props":3095,"children":3096},{"class":143,"line":665},[3097,3101],{"type":39,"tag":141,"props":3098,"children":3099},{"style":364},[3100],{"type":44,"value":2605},{"type":39,"tag":141,"props":3102,"children":3103},{"style":175},[3104],{"type":44,"value":815},{"type":39,"tag":141,"props":3106,"children":3107},{"class":143,"line":23},[3108],{"type":39,"tag":141,"props":3109,"children":3110},{"emptyLinePlaceholder":449},[3111],{"type":44,"value":452},{"type":39,"tag":141,"props":3113,"children":3114},{"class":143,"line":771},[3115,3119,3124,3128,3132,3136,3140,3144,3149,3153,3157,3162,3166],{"type":39,"tag":141,"props":3116,"children":3117},{"style":659},[3118],{"type":44,"value":2483},{"type":39,"tag":141,"props":3120,"children":3121},{"style":175},[3122],{"type":44,"value":3123}," lookup ",{"type":39,"tag":141,"props":3125,"children":3126},{"style":364},[3127],{"type":44,"value":2493},{"type":39,"tag":141,"props":3129,"children":3130},{"style":358},[3131],{"type":44,"value":2498},{"type":39,"tag":141,"props":3133,"children":3134},{"style":364},[3135],{"type":44,"value":695},{"type":39,"tag":141,"props":3137,"children":3138},{"style":175},[3139],{"type":44,"value":2791},{"type":39,"tag":141,"props":3141,"children":3142},{"style":364},[3143],{"type":44,"value":474},{"type":39,"tag":141,"props":3145,"children":3146},{"style":477},[3147],{"type":44,"value":3148},"take",{"type":39,"tag":141,"props":3150,"children":3151},{"style":175},[3152],{"type":44,"value":685},{"type":39,"tag":141,"props":3154,"children":3155},{"style":364},[3156],{"type":44,"value":574},{"type":39,"tag":141,"props":3158,"children":3159},{"style":154},[3160],{"type":44,"value":3161},"call_lookup",{"type":39,"tag":141,"props":3163,"children":3164},{"style":364},[3165],{"type":44,"value":574},{"type":39,"tag":141,"props":3167,"children":3168},{"style":175},[3169],{"type":44,"value":815},{"type":39,"tag":141,"props":3171,"children":3172},{"class":143,"line":818},[3173,3177,3181,3186,3190,3195,3199,3204,3209,3213,3217,3222,3226,3230,3235,3239,3243,3247],{"type":39,"tag":141,"props":3174,"children":3175},{"style":358},[3176],{"type":44,"value":1921},{"type":39,"tag":141,"props":3178,"children":3179},{"style":364},[3180],{"type":44,"value":695},{"type":39,"tag":141,"props":3182,"children":3183},{"style":175},[3184],{"type":44,"value":3185}," lookup",{"type":39,"tag":141,"props":3187,"children":3188},{"style":364},[3189],{"type":44,"value":474},{"type":39,"tag":141,"props":3191,"children":3192},{"style":477},[3193],{"type":44,"value":3194},"progress",{"type":39,"tag":141,"props":3196,"children":3197},{"style":175},[3198],{"type":44,"value":685},{"type":39,"tag":141,"props":3200,"children":3201},{"style":364},[3202],{"type":44,"value":3203},"{",{"type":39,"tag":141,"props":3205,"children":3206},{"style":501},[3207],{"type":44,"value":3208}," structured",{"type":39,"tag":141,"props":3210,"children":3211},{"style":364},[3212],{"type":44,"value":509},{"type":39,"tag":141,"props":3214,"children":3215},{"style":364},[3216],{"type":44,"value":367},{"type":39,"tag":141,"props":3218,"children":3219},{"style":501},[3220],{"type":44,"value":3221}," phase",{"type":39,"tag":141,"props":3223,"children":3224},{"style":364},[3225],{"type":44,"value":509},{"type":39,"tag":141,"props":3227,"children":3228},{"style":364},[3229],{"type":44,"value":387},{"type":39,"tag":141,"props":3231,"children":3232},{"style":154},[3233],{"type":44,"value":3234},"searching",{"type":39,"tag":141,"props":3236,"children":3237},{"style":364},[3238],{"type":44,"value":574},{"type":39,"tag":141,"props":3240,"children":3241},{"style":364},[3242],{"type":44,"value":377},{"type":39,"tag":141,"props":3244,"children":3245},{"style":364},[3246],{"type":44,"value":377},{"type":39,"tag":141,"props":3248,"children":3249},{"style":175},[3250],{"type":44,"value":815},{"type":39,"tag":141,"props":3252,"children":3253},{"class":143,"line":863},[3254,3258,3262,3266,3270,3274,3278],{"type":39,"tag":141,"props":3255,"children":3256},{"style":358},[3257],{"type":44,"value":1921},{"type":39,"tag":141,"props":3259,"children":3260},{"style":364},[3261],{"type":44,"value":695},{"type":39,"tag":141,"props":3263,"children":3264},{"style":175},[3265],{"type":44,"value":3185},{"type":39,"tag":141,"props":3267,"children":3268},{"style":364},[3269],{"type":44,"value":474},{"type":39,"tag":141,"props":3271,"children":3272},{"style":477},[3273],{"type":44,"value":2179},{"type":39,"tag":141,"props":3275,"children":3276},{"style":175},[3277],{"type":44,"value":685},{"type":39,"tag":141,"props":3279,"children":3280},{"style":364},[3281],{"type":44,"value":2525},{"type":39,"tag":141,"props":3283,"children":3284},{"class":143,"line":909},[3285,3290,3294,3298,3303,3307,3312],{"type":39,"tag":141,"props":3286,"children":3287},{"style":501},[3288],{"type":44,"value":3289},"  structured",{"type":39,"tag":141,"props":3291,"children":3292},{"style":364},[3293],{"type":44,"value":509},{"type":39,"tag":141,"props":3295,"children":3296},{"style":364},[3297],{"type":44,"value":367},{"type":39,"tag":141,"props":3299,"children":3300},{"style":501},[3301],{"type":44,"value":3302}," answer",{"type":39,"tag":141,"props":3304,"children":3305},{"style":364},[3306],{"type":44,"value":509},{"type":39,"tag":141,"props":3308,"children":3309},{"style":1316},[3310],{"type":44,"value":3311}," 42",{"type":39,"tag":141,"props":3313,"children":3314},{"style":364},[3315],{"type":44,"value":1176},{"type":39,"tag":141,"props":3317,"children":3318},{"class":143,"line":927},[3319,3324,3328,3332,3336,3340,3344,3348,3352,3356,3360,3365,3369,3373,3378,3382,3386,3390],{"type":39,"tag":141,"props":3320,"children":3321},{"style":501},[3322],{"type":44,"value":3323},"  content",{"type":39,"tag":141,"props":3325,"children":3326},{"style":364},[3327],{"type":44,"value":509},{"type":39,"tag":141,"props":3329,"children":3330},{"style":175},[3331],{"type":44,"value":3012},{"type":39,"tag":141,"props":3333,"children":3334},{"style":364},[3335],{"type":44,"value":3203},{"type":39,"tag":141,"props":3337,"children":3338},{"style":501},[3339],{"type":44,"value":2970},{"type":39,"tag":141,"props":3341,"children":3342},{"style":364},[3343],{"type":44,"value":509},{"type":39,"tag":141,"props":3345,"children":3346},{"style":364},[3347],{"type":44,"value":387},{"type":39,"tag":141,"props":3349,"children":3350},{"style":154},[3351],{"type":44,"value":44},{"type":39,"tag":141,"props":3353,"children":3354},{"style":364},[3355],{"type":44,"value":574},{"type":39,"tag":141,"props":3357,"children":3358},{"style":364},[3359],{"type":44,"value":418},{"type":39,"tag":141,"props":3361,"children":3362},{"style":501},[3363],{"type":44,"value":3364}," text",{"type":39,"tag":141,"props":3366,"children":3367},{"style":364},[3368],{"type":44,"value":509},{"type":39,"tag":141,"props":3370,"children":3371},{"style":364},[3372],{"type":44,"value":387},{"type":39,"tag":141,"props":3374,"children":3375},{"style":154},[3376],{"type":44,"value":3377},"42",{"type":39,"tag":141,"props":3379,"children":3380},{"style":364},[3381],{"type":44,"value":574},{"type":39,"tag":141,"props":3383,"children":3384},{"style":364},[3385],{"type":44,"value":377},{"type":39,"tag":141,"props":3387,"children":3388},{"style":175},[3389],{"type":44,"value":3030},{"type":39,"tag":141,"props":3391,"children":3392},{"style":364},[3393],{"type":44,"value":538},{"type":39,"tag":141,"props":3395,"children":3396},{"class":143,"line":1561},[3397,3401],{"type":39,"tag":141,"props":3398,"children":3399},{"style":364},[3400],{"type":44,"value":2605},{"type":39,"tag":141,"props":3402,"children":3403},{"style":175},[3404],{"type":44,"value":815},{"type":39,"tag":47,"props":3406,"children":3407},{},[3408,3409,3415,3417,3423,3424,3430,3432,3438],{"type":44,"value":51},{"type":39,"tag":53,"props":3410,"children":3412},{"className":3411},[],[3413],{"type":44,"value":3414},"awaitCancelled()",{"type":44,"value":3416}," to observe native interruption. Do not synthesize\ncancellation or expose transport sequence numbers. Dynamic effective names may\nnot collide with configured ",{"type":39,"tag":53,"props":3418,"children":3420},{"className":3419},[],[3421],{"type":44,"value":3422},"shell",{"type":44,"value":1779},{"type":39,"tag":53,"props":3425,"children":3427},{"className":3426},[],[3428],{"type":44,"value":3429},"webfetch",{"type":44,"value":3431},", or ",{"type":39,"tag":53,"props":3433,"children":3435},{"className":3434},[],[3436],{"type":44,"value":3437},"websearch",{"type":44,"value":3439}," adapters.",{"type":39,"tag":1030,"props":3441,"children":3443},{"id":3442},"simulated-shell-execution",[3444],{"type":44,"value":3445},"Simulated Shell Execution",{"type":39,"tag":47,"props":3447,"children":3448},{},[3449,3451,3457],{"type":44,"value":3450},"Declare the built-in tools Drive should intercept, then control each invocation\nfrom the running program. Unregistered tools remain real. Calls may be accepted\nin arrival order or by the stable ID supplied in ",{"type":39,"tag":53,"props":3452,"children":3454},{"className":3453},[],[3455],{"type":44,"value":3456},"Llm.toolCall",{"type":44,"value":3458},", so parallel\ninvocations can progress and settle independently.",{"type":39,"tag":86,"props":3460,"children":3462},{"className":346,"code":3461,"language":348,"meta":91,"style":91},"import { Effect } from \"effect\"\nimport { Llm, OpenCodeDriver } from \"opencode-drive\"\n\nexport default OpenCodeDriver.use({ tools: [\"shell\"] }, ({ tools, llm, ui }) =>\n  Effect.gen(function* () {\n    const shells = yield* tools.control(\"shell\")\n    yield* llm.queue(\n      Llm.toolCall({\n        index: 0,\n        id: \"call_shell\",\n        name: \"shell\",\n        input: { command: \"compile\" },\n      }),\n      Llm.finish(\"tool-calls\"),\n    )\n    yield* ui.submit(\"Compile the project\")\n    const shell = yield* shells.take(\"call_shell\")\n    yield* shell.progress(`Running ${shell.input.command}\\n`)\n    yield* shell.succeed({ output: \"Controlled success\\n\", exit: 0 })\n  }),\n)\n",[3463],{"type":39,"tag":53,"props":3464,"children":3465},{"__ignoreMap":91},[3466,3501,3544,3551,3648,3684,3742,3770,3794,3815,3844,3872,3914,3929,3969,3977,4021,4077,4155,4238,4254],{"type":39,"tag":141,"props":3467,"children":3468},{"class":143,"line":144},[3469,3473,3477,3481,3485,3489,3493,3497],{"type":39,"tag":141,"props":3470,"children":3471},{"style":358},[3472],{"type":44,"value":361},{"type":39,"tag":141,"props":3474,"children":3475},{"style":364},[3476],{"type":44,"value":367},{"type":39,"tag":141,"props":3478,"children":3479},{"style":175},[3480],{"type":44,"value":372},{"type":39,"tag":141,"props":3482,"children":3483},{"style":364},[3484],{"type":44,"value":377},{"type":39,"tag":141,"props":3486,"children":3487},{"style":358},[3488],{"type":44,"value":382},{"type":39,"tag":141,"props":3490,"children":3491},{"style":364},[3492],{"type":44,"value":387},{"type":39,"tag":141,"props":3494,"children":3495},{"style":154},[3496],{"type":44,"value":392},{"type":39,"tag":141,"props":3498,"children":3499},{"style":364},[3500],{"type":44,"value":397},{"type":39,"tag":141,"props":3502,"children":3503},{"class":143,"line":27},[3504,3508,3512,3516,3520,3524,3528,3532,3536,3540],{"type":39,"tag":141,"props":3505,"children":3506},{"style":358},[3507],{"type":44,"value":361},{"type":39,"tag":141,"props":3509,"children":3510},{"style":364},[3511],{"type":44,"value":367},{"type":39,"tag":141,"props":3513,"children":3514},{"style":175},[3515],{"type":44,"value":413},{"type":39,"tag":141,"props":3517,"children":3518},{"style":364},[3519],{"type":44,"value":418},{"type":39,"tag":141,"props":3521,"children":3522},{"style":175},[3523],{"type":44,"value":423},{"type":39,"tag":141,"props":3525,"children":3526},{"style":364},[3527],{"type":44,"value":377},{"type":39,"tag":141,"props":3529,"children":3530},{"style":358},[3531],{"type":44,"value":382},{"type":39,"tag":141,"props":3533,"children":3534},{"style":364},[3535],{"type":44,"value":387},{"type":39,"tag":141,"props":3537,"children":3538},{"style":154},[3539],{"type":44,"value":4},{"type":39,"tag":141,"props":3541,"children":3542},{"style":364},[3543],{"type":44,"value":397},{"type":39,"tag":141,"props":3545,"children":3546},{"class":143,"line":198},[3547],{"type":39,"tag":141,"props":3548,"children":3549},{"emptyLinePlaceholder":449},[3550],{"type":44,"value":452},{"type":39,"tag":141,"props":3552,"children":3553},{"class":143,"line":301},[3554,3558,3562,3566,3570,3574,3578,3582,3586,3590,3594,3598,3602,3606,3611,3616,3620,3624,3628,3632,3636,3640,3644],{"type":39,"tag":141,"props":3555,"children":3556},{"style":358},[3557],{"type":44,"value":460},{"type":39,"tag":141,"props":3559,"children":3560},{"style":358},[3561],{"type":44,"value":465},{"type":39,"tag":141,"props":3563,"children":3564},{"style":175},[3565],{"type":44,"value":423},{"type":39,"tag":141,"props":3567,"children":3568},{"style":364},[3569],{"type":44,"value":474},{"type":39,"tag":141,"props":3571,"children":3572},{"style":477},[3573],{"type":44,"value":480},{"type":39,"tag":141,"props":3575,"children":3576},{"style":175},[3577],{"type":44,"value":685},{"type":39,"tag":141,"props":3579,"children":3580},{"style":364},[3581],{"type":44,"value":3203},{"type":39,"tag":141,"props":3583,"children":3584},{"style":501},[3585],{"type":44,"value":2791},{"type":39,"tag":141,"props":3587,"children":3588},{"style":364},[3589],{"type":44,"value":509},{"type":39,"tag":141,"props":3591,"children":3592},{"style":175},[3593],{"type":44,"value":3012},{"type":39,"tag":141,"props":3595,"children":3596},{"style":364},[3597],{"type":44,"value":574},{"type":39,"tag":141,"props":3599,"children":3600},{"style":154},[3601],{"type":44,"value":3422},{"type":39,"tag":141,"props":3603,"children":3604},{"style":364},[3605],{"type":44,"value":574},{"type":39,"tag":141,"props":3607,"children":3608},{"style":175},[3609],{"type":44,"value":3610},"] ",{"type":39,"tag":141,"props":3612,"children":3613},{"style":364},[3614],{"type":44,"value":3615},"},",{"type":39,"tag":141,"props":3617,"children":3618},{"style":364},[3619],{"type":44,"value":1347},{"type":39,"tag":141,"props":3621,"children":3622},{"style":639},[3623],{"type":44,"value":2791},{"type":39,"tag":141,"props":3625,"children":3626},{"style":364},[3627],{"type":44,"value":418},{"type":39,"tag":141,"props":3629,"children":3630},{"style":639},[3631],{"type":44,"value":651},{"type":39,"tag":141,"props":3633,"children":3634},{"style":364},[3635],{"type":44,"value":418},{"type":39,"tag":141,"props":3637,"children":3638},{"style":639},[3639],{"type":44,"value":642},{"type":39,"tag":141,"props":3641,"children":3642},{"style":364},[3643],{"type":44,"value":656},{"type":39,"tag":141,"props":3645,"children":3646},{"style":659},[3647],{"type":44,"value":662},{"type":39,"tag":141,"props":3649,"children":3650},{"class":143,"line":488},[3651,3656,3660,3664,3668,3672,3676,3680],{"type":39,"tag":141,"props":3652,"children":3653},{"style":175},[3654],{"type":44,"value":3655},"  Effect",{"type":39,"tag":141,"props":3657,"children":3658},{"style":364},[3659],{"type":44,"value":474},{"type":39,"tag":141,"props":3661,"children":3662},{"style":477},[3663],{"type":44,"value":680},{"type":39,"tag":141,"props":3665,"children":3666},{"style":175},[3667],{"type":44,"value":685},{"type":39,"tag":141,"props":3669,"children":3670},{"style":659},[3671],{"type":44,"value":690},{"type":39,"tag":141,"props":3673,"children":3674},{"style":364},[3675],{"type":44,"value":695},{"type":39,"tag":141,"props":3677,"children":3678},{"style":364},[3679],{"type":44,"value":700},{"type":39,"tag":141,"props":3681,"children":3682},{"style":364},[3683],{"type":44,"value":514},{"type":39,"tag":141,"props":3685,"children":3686},{"class":143,"line":497},[3687,3692,3697,3701,3705,3709,3713,3717,3722,3726,3730,3734,3738],{"type":39,"tag":141,"props":3688,"children":3689},{"style":659},[3690],{"type":44,"value":3691},"    const",{"type":39,"tag":141,"props":3693,"children":3694},{"style":175},[3695],{"type":44,"value":3696}," shells",{"type":39,"tag":141,"props":3698,"children":3699},{"style":364},[3700],{"type":44,"value":1503},{"type":39,"tag":141,"props":3702,"children":3703},{"style":358},[3704],{"type":44,"value":2498},{"type":39,"tag":141,"props":3706,"children":3707},{"style":364},[3708],{"type":44,"value":695},{"type":39,"tag":141,"props":3710,"children":3711},{"style":175},[3712],{"type":44,"value":2791},{"type":39,"tag":141,"props":3714,"children":3715},{"style":364},[3716],{"type":44,"value":474},{"type":39,"tag":141,"props":3718,"children":3719},{"style":477},[3720],{"type":44,"value":3721},"control",{"type":39,"tag":141,"props":3723,"children":3724},{"style":501},[3725],{"type":44,"value":685},{"type":39,"tag":141,"props":3727,"children":3728},{"style":364},[3729],{"type":44,"value":574},{"type":39,"tag":141,"props":3731,"children":3732},{"style":154},[3733],{"type":44,"value":3422},{"type":39,"tag":141,"props":3735,"children":3736},{"style":364},[3737],{"type":44,"value":574},{"type":39,"tag":141,"props":3739,"children":3740},{"style":501},[3741],{"type":44,"value":815},{"type":39,"tag":141,"props":3743,"children":3744},{"class":143,"line":517},[3745,3750,3754,3758,3762,3766],{"type":39,"tag":141,"props":3746,"children":3747},{"style":358},[3748],{"type":44,"value":3749},"    yield",{"type":39,"tag":141,"props":3751,"children":3752},{"style":364},[3753],{"type":44,"value":695},{"type":39,"tag":141,"props":3755,"children":3756},{"style":175},[3757],{"type":44,"value":651},{"type":39,"tag":141,"props":3759,"children":3760},{"style":364},[3761],{"type":44,"value":474},{"type":39,"tag":141,"props":3763,"children":3764},{"style":477},[3765],{"type":44,"value":729},{"type":39,"tag":141,"props":3767,"children":3768},{"style":501},[3769],{"type":44,"value":485},{"type":39,"tag":141,"props":3771,"children":3772},{"class":143,"line":541},[3773,3778,3782,3786,3790],{"type":39,"tag":141,"props":3774,"children":3775},{"style":175},[3776],{"type":44,"value":3777},"      Llm",{"type":39,"tag":141,"props":3779,"children":3780},{"style":364},[3781],{"type":44,"value":474},{"type":39,"tag":141,"props":3783,"children":3784},{"style":477},[3785],{"type":44,"value":2165},{"type":39,"tag":141,"props":3787,"children":3788},{"style":501},[3789],{"type":44,"value":685},{"type":39,"tag":141,"props":3791,"children":3792},{"style":364},[3793],{"type":44,"value":2525},{"type":39,"tag":141,"props":3795,"children":3796},{"class":143,"line":558},[3797,3802,3806,3811],{"type":39,"tag":141,"props":3798,"children":3799},{"style":501},[3800],{"type":44,"value":3801},"        index",{"type":39,"tag":141,"props":3803,"children":3804},{"style":364},[3805],{"type":44,"value":509},{"type":39,"tag":141,"props":3807,"children":3808},{"style":1316},[3809],{"type":44,"value":3810}," 0",{"type":39,"tag":141,"props":3812,"children":3813},{"style":364},[3814],{"type":44,"value":538},{"type":39,"tag":141,"props":3816,"children":3817},{"class":143,"line":603},[3818,3823,3827,3831,3836,3840],{"type":39,"tag":141,"props":3819,"children":3820},{"style":501},[3821],{"type":44,"value":3822},"        id",{"type":39,"tag":141,"props":3824,"children":3825},{"style":364},[3826],{"type":44,"value":509},{"type":39,"tag":141,"props":3828,"children":3829},{"style":364},[3830],{"type":44,"value":387},{"type":39,"tag":141,"props":3832,"children":3833},{"style":154},[3834],{"type":44,"value":3835},"call_shell",{"type":39,"tag":141,"props":3837,"children":3838},{"style":364},[3839],{"type":44,"value":574},{"type":39,"tag":141,"props":3841,"children":3842},{"style":364},[3843],{"type":44,"value":538},{"type":39,"tag":141,"props":3845,"children":3846},{"class":143,"line":612},[3847,3852,3856,3860,3864,3868],{"type":39,"tag":141,"props":3848,"children":3849},{"style":501},[3850],{"type":44,"value":3851},"        name",{"type":39,"tag":141,"props":3853,"children":3854},{"style":364},[3855],{"type":44,"value":509},{"type":39,"tag":141,"props":3857,"children":3858},{"style":364},[3859],{"type":44,"value":387},{"type":39,"tag":141,"props":3861,"children":3862},{"style":154},[3863],{"type":44,"value":3422},{"type":39,"tag":141,"props":3865,"children":3866},{"style":364},[3867],{"type":44,"value":574},{"type":39,"tag":141,"props":3869,"children":3870},{"style":364},[3871],{"type":44,"value":538},{"type":39,"tag":141,"props":3873,"children":3874},{"class":143,"line":621},[3875,3880,3884,3888,3893,3897,3901,3906,3910],{"type":39,"tag":141,"props":3876,"children":3877},{"style":501},[3878],{"type":44,"value":3879},"        input",{"type":39,"tag":141,"props":3881,"children":3882},{"style":364},[3883],{"type":44,"value":509},{"type":39,"tag":141,"props":3885,"children":3886},{"style":364},[3887],{"type":44,"value":367},{"type":39,"tag":141,"props":3889,"children":3890},{"style":501},[3891],{"type":44,"value":3892}," command",{"type":39,"tag":141,"props":3894,"children":3895},{"style":364},[3896],{"type":44,"value":509},{"type":39,"tag":141,"props":3898,"children":3899},{"style":364},[3900],{"type":44,"value":387},{"type":39,"tag":141,"props":3902,"children":3903},{"style":154},[3904],{"type":44,"value":3905},"compile",{"type":39,"tag":141,"props":3907,"children":3908},{"style":364},[3909],{"type":44,"value":574},{"type":39,"tag":141,"props":3911,"children":3912},{"style":364},[3913],{"type":44,"value":1176},{"type":39,"tag":141,"props":3915,"children":3916},{"class":143,"line":630},[3917,3921,3925],{"type":39,"tag":141,"props":3918,"children":3919},{"style":364},[3920],{"type":44,"value":1550},{"type":39,"tag":141,"props":3922,"children":3923},{"style":501},[3924],{"type":44,"value":920},{"type":39,"tag":141,"props":3926,"children":3927},{"style":364},[3928],{"type":44,"value":538},{"type":39,"tag":141,"props":3930,"children":3931},{"class":143,"line":665},[3932,3936,3940,3944,3948,3952,3957,3961,3965],{"type":39,"tag":141,"props":3933,"children":3934},{"style":175},[3935],{"type":44,"value":3777},{"type":39,"tag":141,"props":3937,"children":3938},{"style":364},[3939],{"type":44,"value":474},{"type":39,"tag":141,"props":3941,"children":3942},{"style":477},[3943],{"type":44,"value":2179},{"type":39,"tag":141,"props":3945,"children":3946},{"style":501},[3947],{"type":44,"value":685},{"type":39,"tag":141,"props":3949,"children":3950},{"style":364},[3951],{"type":44,"value":574},{"type":39,"tag":141,"props":3953,"children":3954},{"style":154},[3955],{"type":44,"value":3956},"tool-calls",{"type":39,"tag":141,"props":3958,"children":3959},{"style":364},[3960],{"type":44,"value":574},{"type":39,"tag":141,"props":3962,"children":3963},{"style":501},[3964],{"type":44,"value":920},{"type":39,"tag":141,"props":3966,"children":3967},{"style":364},[3968],{"type":44,"value":538},{"type":39,"tag":141,"props":3970,"children":3971},{"class":143,"line":23},[3972],{"type":39,"tag":141,"props":3973,"children":3974},{"style":501},[3975],{"type":44,"value":3976},"    )\n",{"type":39,"tag":141,"props":3978,"children":3979},{"class":143,"line":771},[3980,3984,3988,3992,3996,4000,4004,4008,4013,4017],{"type":39,"tag":141,"props":3981,"children":3982},{"style":358},[3983],{"type":44,"value":3749},{"type":39,"tag":141,"props":3985,"children":3986},{"style":364},[3987],{"type":44,"value":695},{"type":39,"tag":141,"props":3989,"children":3990},{"style":175},[3991],{"type":44,"value":642},{"type":39,"tag":141,"props":3993,"children":3994},{"style":364},[3995],{"type":44,"value":474},{"type":39,"tag":141,"props":3997,"children":3998},{"style":477},[3999],{"type":44,"value":793},{"type":39,"tag":141,"props":4001,"children":4002},{"style":501},[4003],{"type":44,"value":685},{"type":39,"tag":141,"props":4005,"children":4006},{"style":364},[4007],{"type":44,"value":574},{"type":39,"tag":141,"props":4009,"children":4010},{"style":154},[4011],{"type":44,"value":4012},"Compile the project",{"type":39,"tag":141,"props":4014,"children":4015},{"style":364},[4016],{"type":44,"value":574},{"type":39,"tag":141,"props":4018,"children":4019},{"style":501},[4020],{"type":44,"value":815},{"type":39,"tag":141,"props":4022,"children":4023},{"class":143,"line":818},[4024,4028,4033,4037,4041,4045,4049,4053,4057,4061,4065,4069,4073],{"type":39,"tag":141,"props":4025,"children":4026},{"style":659},[4027],{"type":44,"value":3691},{"type":39,"tag":141,"props":4029,"children":4030},{"style":175},[4031],{"type":44,"value":4032}," shell",{"type":39,"tag":141,"props":4034,"children":4035},{"style":364},[4036],{"type":44,"value":1503},{"type":39,"tag":141,"props":4038,"children":4039},{"style":358},[4040],{"type":44,"value":2498},{"type":39,"tag":141,"props":4042,"children":4043},{"style":364},[4044],{"type":44,"value":695},{"type":39,"tag":141,"props":4046,"children":4047},{"style":175},[4048],{"type":44,"value":3696},{"type":39,"tag":141,"props":4050,"children":4051},{"style":364},[4052],{"type":44,"value":474},{"type":39,"tag":141,"props":4054,"children":4055},{"style":477},[4056],{"type":44,"value":3148},{"type":39,"tag":141,"props":4058,"children":4059},{"style":501},[4060],{"type":44,"value":685},{"type":39,"tag":141,"props":4062,"children":4063},{"style":364},[4064],{"type":44,"value":574},{"type":39,"tag":141,"props":4066,"children":4067},{"style":154},[4068],{"type":44,"value":3835},{"type":39,"tag":141,"props":4070,"children":4071},{"style":364},[4072],{"type":44,"value":574},{"type":39,"tag":141,"props":4074,"children":4075},{"style":501},[4076],{"type":44,"value":815},{"type":39,"tag":141,"props":4078,"children":4079},{"class":143,"line":863},[4080,4084,4088,4092,4096,4100,4104,4108,4113,4117,4121,4125,4130,4134,4139,4143,4147,4151],{"type":39,"tag":141,"props":4081,"children":4082},{"style":358},[4083],{"type":44,"value":3749},{"type":39,"tag":141,"props":4085,"children":4086},{"style":364},[4087],{"type":44,"value":695},{"type":39,"tag":141,"props":4089,"children":4090},{"style":175},[4091],{"type":44,"value":4032},{"type":39,"tag":141,"props":4093,"children":4094},{"style":364},[4095],{"type":44,"value":474},{"type":39,"tag":141,"props":4097,"children":4098},{"style":477},[4099],{"type":44,"value":3194},{"type":39,"tag":141,"props":4101,"children":4102},{"style":501},[4103],{"type":44,"value":685},{"type":39,"tag":141,"props":4105,"children":4106},{"style":364},[4107],{"type":44,"value":2374},{"type":39,"tag":141,"props":4109,"children":4110},{"style":154},[4111],{"type":44,"value":4112},"Running ",{"type":39,"tag":141,"props":4114,"children":4115},{"style":364},[4116],{"type":44,"value":2384},{"type":39,"tag":141,"props":4118,"children":4119},{"style":175},[4120],{"type":44,"value":3422},{"type":39,"tag":141,"props":4122,"children":4123},{"style":364},[4124],{"type":44,"value":474},{"type":39,"tag":141,"props":4126,"children":4127},{"style":175},[4128],{"type":44,"value":4129},"input",{"type":39,"tag":141,"props":4131,"children":4132},{"style":364},[4133],{"type":44,"value":474},{"type":39,"tag":141,"props":4135,"children":4136},{"style":175},[4137],{"type":44,"value":4138},"command",{"type":39,"tag":141,"props":4140,"children":4141},{"style":364},[4142],{"type":44,"value":2605},{"type":39,"tag":141,"props":4144,"children":4145},{"style":175},[4146],{"type":44,"value":592},{"type":39,"tag":141,"props":4148,"children":4149},{"style":364},[4150],{"type":44,"value":2374},{"type":39,"tag":141,"props":4152,"children":4153},{"style":501},[4154],{"type":44,"value":815},{"type":39,"tag":141,"props":4156,"children":4157},{"class":143,"line":909},[4158,4162,4166,4170,4174,4179,4183,4187,4192,4196,4200,4205,4209,4213,4217,4222,4226,4230,4234],{"type":39,"tag":141,"props":4159,"children":4160},{"style":358},[4161],{"type":44,"value":3749},{"type":39,"tag":141,"props":4163,"children":4164},{"style":364},[4165],{"type":44,"value":695},{"type":39,"tag":141,"props":4167,"children":4168},{"style":175},[4169],{"type":44,"value":4032},{"type":39,"tag":141,"props":4171,"children":4172},{"style":364},[4173],{"type":44,"value":474},{"type":39,"tag":141,"props":4175,"children":4176},{"style":477},[4177],{"type":44,"value":4178},"succeed",{"type":39,"tag":141,"props":4180,"children":4181},{"style":501},[4182],{"type":44,"value":685},{"type":39,"tag":141,"props":4184,"children":4185},{"style":364},[4186],{"type":44,"value":3203},{"type":39,"tag":141,"props":4188,"children":4189},{"style":501},[4190],{"type":44,"value":4191}," output",{"type":39,"tag":141,"props":4193,"children":4194},{"style":364},[4195],{"type":44,"value":509},{"type":39,"tag":141,"props":4197,"children":4198},{"style":364},[4199],{"type":44,"value":387},{"type":39,"tag":141,"props":4201,"children":4202},{"style":154},[4203],{"type":44,"value":4204},"Controlled success",{"type":39,"tag":141,"props":4206,"children":4207},{"style":175},[4208],{"type":44,"value":592},{"type":39,"tag":141,"props":4210,"children":4211},{"style":364},[4212],{"type":44,"value":574},{"type":39,"tag":141,"props":4214,"children":4215},{"style":364},[4216],{"type":44,"value":418},{"type":39,"tag":141,"props":4218,"children":4219},{"style":501},[4220],{"type":44,"value":4221}," exit",{"type":39,"tag":141,"props":4223,"children":4224},{"style":364},[4225],{"type":44,"value":509},{"type":39,"tag":141,"props":4227,"children":4228},{"style":1316},[4229],{"type":44,"value":3810},{"type":39,"tag":141,"props":4231,"children":4232},{"style":364},[4233],{"type":44,"value":377},{"type":39,"tag":141,"props":4235,"children":4236},{"style":501},[4237],{"type":44,"value":815},{"type":39,"tag":141,"props":4239,"children":4240},{"class":143,"line":927},[4241,4246,4250],{"type":39,"tag":141,"props":4242,"children":4243},{"style":364},[4244],{"type":44,"value":4245},"  }",{"type":39,"tag":141,"props":4247,"children":4248},{"style":175},[4249],{"type":44,"value":920},{"type":39,"tag":141,"props":4251,"children":4252},{"style":364},[4253],{"type":44,"value":538},{"type":39,"tag":141,"props":4255,"children":4256},{"class":143,"line":1561},[4257],{"type":39,"tag":141,"props":4258,"children":4259},{"style":175},[4260],{"type":44,"value":815},{"type":39,"tag":47,"props":4262,"children":4263},{},[4264,4266,4272,4274,4279,4281,4286,4287,4292,4293,4298,4300,4306],{"type":44,"value":4265},"The same declaration and runtime ",{"type":39,"tag":53,"props":4267,"children":4269},{"className":4268},[],[4270],{"type":44,"value":4271},"tools",{"type":44,"value":4273}," capability are available in\n",{"type":39,"tag":53,"props":4275,"children":4277},{"className":4276},[],[4278],{"type":44,"value":70},{"type":44,"value":4280},". Supported adapters are ",{"type":39,"tag":53,"props":4282,"children":4284},{"className":4283},[],[4285],{"type":44,"value":3422},{"type":44,"value":1779},{"type":39,"tag":53,"props":4288,"children":4290},{"className":4289},[],[4291],{"type":44,"value":3429},{"type":44,"value":1787},{"type":39,"tag":53,"props":4294,"children":4296},{"className":4295},[],[4297],{"type":44,"value":3437},{"type":44,"value":4299},".\nEach progress value replaces the visible tool output, so send accumulated text\nwhen earlier lines should remain visible. Calls settle exactly once;\n",{"type":39,"tag":53,"props":4301,"children":4303},{"className":4302},[],[4304],{"type":44,"value":4305},"awaitInterrupted()",{"type":44,"value":4307}," observes session interruption or transport disconnection.",{"type":39,"tag":47,"props":4309,"children":4310},{},[4311],{"type":44,"value":4312},"The callback form remains available for fixed behavior that does not need\nruntime orchestration:",{"type":39,"tag":86,"props":4314,"children":4316},{"className":346,"code":4315,"language":348,"meta":91,"style":91},"import { Effect } from \"effect\"\nimport { Tool } from \"opencode-drive\"\n\nconst tools = (registry: Tool.Registry) => {\n  registry.handle(\"shell\", ({ input, progress }) =>\n    Effect.gen(function* () {\n      yield* progress(`Running ${input.command}\\n`)\n      return { output: \"Controlled success\\n\", exit: 0 }\n    }),\n  )\n}\n",[4317],{"type":39,"tag":53,"props":4318,"children":4319},{"__ignoreMap":91},[4320,4355,4391,4398,4453,4516,4551,4610,4667,4682,4690],{"type":39,"tag":141,"props":4321,"children":4322},{"class":143,"line":144},[4323,4327,4331,4335,4339,4343,4347,4351],{"type":39,"tag":141,"props":4324,"children":4325},{"style":358},[4326],{"type":44,"value":361},{"type":39,"tag":141,"props":4328,"children":4329},{"style":364},[4330],{"type":44,"value":367},{"type":39,"tag":141,"props":4332,"children":4333},{"style":175},[4334],{"type":44,"value":372},{"type":39,"tag":141,"props":4336,"children":4337},{"style":364},[4338],{"type":44,"value":377},{"type":39,"tag":141,"props":4340,"children":4341},{"style":358},[4342],{"type":44,"value":382},{"type":39,"tag":141,"props":4344,"children":4345},{"style":364},[4346],{"type":44,"value":387},{"type":39,"tag":141,"props":4348,"children":4349},{"style":154},[4350],{"type":44,"value":392},{"type":39,"tag":141,"props":4352,"children":4353},{"style":364},[4354],{"type":44,"value":397},{"type":39,"tag":141,"props":4356,"children":4357},{"class":143,"line":27},[4358,4362,4366,4371,4375,4379,4383,4387],{"type":39,"tag":141,"props":4359,"children":4360},{"style":358},[4361],{"type":44,"value":361},{"type":39,"tag":141,"props":4363,"children":4364},{"style":364},[4365],{"type":44,"value":367},{"type":39,"tag":141,"props":4367,"children":4368},{"style":175},[4369],{"type":44,"value":4370}," Tool",{"type":39,"tag":141,"props":4372,"children":4373},{"style":364},[4374],{"type":44,"value":377},{"type":39,"tag":141,"props":4376,"children":4377},{"style":358},[4378],{"type":44,"value":382},{"type":39,"tag":141,"props":4380,"children":4381},{"style":364},[4382],{"type":44,"value":387},{"type":39,"tag":141,"props":4384,"children":4385},{"style":154},[4386],{"type":44,"value":4},{"type":39,"tag":141,"props":4388,"children":4389},{"style":364},[4390],{"type":44,"value":397},{"type":39,"tag":141,"props":4392,"children":4393},{"class":143,"line":198},[4394],{"type":39,"tag":141,"props":4395,"children":4396},{"emptyLinePlaceholder":449},[4397],{"type":44,"value":452},{"type":39,"tag":141,"props":4399,"children":4400},{"class":143,"line":301},[4401,4405,4410,4414,4419,4424,4428,4432,4436,4441,4445,4449],{"type":39,"tag":141,"props":4402,"children":4403},{"style":659},[4404],{"type":44,"value":2483},{"type":39,"tag":141,"props":4406,"children":4407},{"style":175},[4408],{"type":44,"value":4409}," tools ",{"type":39,"tag":141,"props":4411,"children":4412},{"style":364},[4413],{"type":44,"value":2493},{"type":39,"tag":141,"props":4415,"children":4416},{"style":364},[4417],{"type":44,"value":4418}," (",{"type":39,"tag":141,"props":4420,"children":4421},{"style":639},[4422],{"type":44,"value":4423},"registry",{"type":39,"tag":141,"props":4425,"children":4426},{"style":364},[4427],{"type":44,"value":509},{"type":39,"tag":141,"props":4429,"children":4430},{"style":148},[4431],{"type":44,"value":4370},{"type":39,"tag":141,"props":4433,"children":4434},{"style":364},[4435],{"type":44,"value":474},{"type":39,"tag":141,"props":4437,"children":4438},{"style":148},[4439],{"type":44,"value":4440},"Registry",{"type":39,"tag":141,"props":4442,"children":4443},{"style":364},[4444],{"type":44,"value":920},{"type":39,"tag":141,"props":4446,"children":4447},{"style":659},[4448],{"type":44,"value":1587},{"type":39,"tag":141,"props":4450,"children":4451},{"style":364},[4452],{"type":44,"value":514},{"type":39,"tag":141,"props":4454,"children":4455},{"class":143,"line":488},[4456,4461,4465,4470,4474,4478,4482,4486,4490,4494,4499,4503,4508,4512],{"type":39,"tag":141,"props":4457,"children":4458},{"style":175},[4459],{"type":44,"value":4460},"  registry",{"type":39,"tag":141,"props":4462,"children":4463},{"style":364},[4464],{"type":44,"value":474},{"type":39,"tag":141,"props":4466,"children":4467},{"style":477},[4468],{"type":44,"value":4469},"handle",{"type":39,"tag":141,"props":4471,"children":4472},{"style":501},[4473],{"type":44,"value":685},{"type":39,"tag":141,"props":4475,"children":4476},{"style":364},[4477],{"type":44,"value":574},{"type":39,"tag":141,"props":4479,"children":4480},{"style":154},[4481],{"type":44,"value":3422},{"type":39,"tag":141,"props":4483,"children":4484},{"style":364},[4485],{"type":44,"value":574},{"type":39,"tag":141,"props":4487,"children":4488},{"style":364},[4489],{"type":44,"value":418},{"type":39,"tag":141,"props":4491,"children":4492},{"style":364},[4493],{"type":44,"value":1347},{"type":39,"tag":141,"props":4495,"children":4496},{"style":639},[4497],{"type":44,"value":4498}," input",{"type":39,"tag":141,"props":4500,"children":4501},{"style":364},[4502],{"type":44,"value":418},{"type":39,"tag":141,"props":4504,"children":4505},{"style":639},[4506],{"type":44,"value":4507}," progress",{"type":39,"tag":141,"props":4509,"children":4510},{"style":364},[4511],{"type":44,"value":656},{"type":39,"tag":141,"props":4513,"children":4514},{"style":659},[4515],{"type":44,"value":662},{"type":39,"tag":141,"props":4517,"children":4518},{"class":143,"line":497},[4519,4523,4527,4531,4535,4539,4543,4547],{"type":39,"tag":141,"props":4520,"children":4521},{"style":175},[4522],{"type":44,"value":671},{"type":39,"tag":141,"props":4524,"children":4525},{"style":364},[4526],{"type":44,"value":474},{"type":39,"tag":141,"props":4528,"children":4529},{"style":477},[4530],{"type":44,"value":680},{"type":39,"tag":141,"props":4532,"children":4533},{"style":501},[4534],{"type":44,"value":685},{"type":39,"tag":141,"props":4536,"children":4537},{"style":659},[4538],{"type":44,"value":690},{"type":39,"tag":141,"props":4540,"children":4541},{"style":364},[4542],{"type":44,"value":695},{"type":39,"tag":141,"props":4544,"children":4545},{"style":364},[4546],{"type":44,"value":700},{"type":39,"tag":141,"props":4548,"children":4549},{"style":364},[4550],{"type":44,"value":514},{"type":39,"tag":141,"props":4552,"children":4553},{"class":143,"line":517},[4554,4558,4562,4566,4570,4574,4578,4582,4586,4590,4594,4598,4602,4606],{"type":39,"tag":141,"props":4555,"children":4556},{"style":358},[4557],{"type":44,"value":712},{"type":39,"tag":141,"props":4559,"children":4560},{"style":364},[4561],{"type":44,"value":695},{"type":39,"tag":141,"props":4563,"children":4564},{"style":477},[4565],{"type":44,"value":4507},{"type":39,"tag":141,"props":4567,"children":4568},{"style":501},[4569],{"type":44,"value":685},{"type":39,"tag":141,"props":4571,"children":4572},{"style":364},[4573],{"type":44,"value":2374},{"type":39,"tag":141,"props":4575,"children":4576},{"style":154},[4577],{"type":44,"value":4112},{"type":39,"tag":141,"props":4579,"children":4580},{"style":364},[4581],{"type":44,"value":2384},{"type":39,"tag":141,"props":4583,"children":4584},{"style":175},[4585],{"type":44,"value":4129},{"type":39,"tag":141,"props":4587,"children":4588},{"style":364},[4589],{"type":44,"value":474},{"type":39,"tag":141,"props":4591,"children":4592},{"style":175},[4593],{"type":44,"value":4138},{"type":39,"tag":141,"props":4595,"children":4596},{"style":364},[4597],{"type":44,"value":2605},{"type":39,"tag":141,"props":4599,"children":4600},{"style":175},[4601],{"type":44,"value":592},{"type":39,"tag":141,"props":4603,"children":4604},{"style":364},[4605],{"type":44,"value":2374},{"type":39,"tag":141,"props":4607,"children":4608},{"style":501},[4609],{"type":44,"value":815},{"type":39,"tag":141,"props":4611,"children":4612},{"class":143,"line":541},[4613,4618,4622,4626,4630,4634,4638,4642,4646,4650,4654,4658,4662],{"type":39,"tag":141,"props":4614,"children":4615},{"style":358},[4616],{"type":44,"value":4617},"      return",{"type":39,"tag":141,"props":4619,"children":4620},{"style":364},[4621],{"type":44,"value":367},{"type":39,"tag":141,"props":4623,"children":4624},{"style":501},[4625],{"type":44,"value":4191},{"type":39,"tag":141,"props":4627,"children":4628},{"style":364},[4629],{"type":44,"value":509},{"type":39,"tag":141,"props":4631,"children":4632},{"style":364},[4633],{"type":44,"value":387},{"type":39,"tag":141,"props":4635,"children":4636},{"style":154},[4637],{"type":44,"value":4204},{"type":39,"tag":141,"props":4639,"children":4640},{"style":175},[4641],{"type":44,"value":592},{"type":39,"tag":141,"props":4643,"children":4644},{"style":364},[4645],{"type":44,"value":574},{"type":39,"tag":141,"props":4647,"children":4648},{"style":364},[4649],{"type":44,"value":418},{"type":39,"tag":141,"props":4651,"children":4652},{"style":501},[4653],{"type":44,"value":4221},{"type":39,"tag":141,"props":4655,"children":4656},{"style":364},[4657],{"type":44,"value":509},{"type":39,"tag":141,"props":4659,"children":4660},{"style":1316},[4661],{"type":44,"value":3810},{"type":39,"tag":141,"props":4663,"children":4664},{"style":364},[4665],{"type":44,"value":4666}," }\n",{"type":39,"tag":141,"props":4668,"children":4669},{"class":143,"line":558},[4670,4674,4678],{"type":39,"tag":141,"props":4671,"children":4672},{"style":364},[4673],{"type":44,"value":915},{"type":39,"tag":141,"props":4675,"children":4676},{"style":501},[4677],{"type":44,"value":920},{"type":39,"tag":141,"props":4679,"children":4680},{"style":364},[4681],{"type":44,"value":538},{"type":39,"tag":141,"props":4683,"children":4684},{"class":143,"line":603},[4685],{"type":39,"tag":141,"props":4686,"children":4687},{"style":501},[4688],{"type":44,"value":4689},"  )\n",{"type":39,"tag":141,"props":4691,"children":4692},{"class":143,"line":612},[4693],{"type":39,"tag":141,"props":4694,"children":4695},{"style":364},[4696],{"type":44,"value":4697},"}\n",{"type":39,"tag":47,"props":4699,"children":4700},{},[4701],{"type":44,"value":4702},"Foreground callback handler Effects are interrupted when OpenCode interrupts\nthe session, the transport disconnects, or Drive shuts down. Detached\nbackground shell handlers continue after their launch response and are\ninterrupted when Drive shuts down.",{"type":39,"tag":74,"props":4704,"children":4706},{"id":4705},"effect-scripts",[4707],{"type":44,"value":4708},"Effect Scripts",{"type":39,"tag":47,"props":4710,"children":4711},{},[4712,4713,4718,4720,4726,4728,4734,4736,4741,4742,4747,4749,4755,4756,4761,4762,4767,4768,4773,4774,4780,4781,4786],{"type":44,"value":51},{"type":39,"tag":53,"props":4714,"children":4716},{"className":4715},[],[4717],{"type":44,"value":70},{"type":44,"value":4719}," with ",{"type":39,"tag":53,"props":4721,"children":4723},{"className":4722},[],[4724],{"type":44,"value":4725},"start --script",{"type":44,"value":4727}," when the workflow must have a stable\ninstance name, be visible, rerun on ",{"type":39,"tag":53,"props":4729,"children":4731},{"className":4730},[],[4732],{"type":44,"value":4733},"restart",{"type":44,"value":4735},", or explicitly launch and kill\nits server and TUIs. ",{"type":39,"tag":53,"props":4737,"children":4739},{"className":4738},[],[4740],{"type":44,"value":1696},{"type":44,"value":1664},{"type":39,"tag":53,"props":4743,"children":4745},{"className":4744},[],[4746],{"type":44,"value":964},{"type":44,"value":4748}," return Effects. Operations on ",{"type":39,"tag":53,"props":4750,"children":4752},{"className":4751},[],[4753],{"type":44,"value":4754},"fs",{"type":44,"value":538},{"type":39,"tag":53,"props":4757,"children":4759},{"className":4758},[],[4760],{"type":44,"value":2446},{"type":44,"value":1779},{"type":39,"tag":53,"props":4763,"children":4765},{"className":4764},[],[4766],{"type":44,"value":1904},{"type":44,"value":1779},{"type":39,"tag":53,"props":4769,"children":4771},{"className":4770},[],[4772],{"type":44,"value":4271},{"type":44,"value":1779},{"type":39,"tag":53,"props":4775,"children":4777},{"className":4776},[],[4778],{"type":44,"value":4779},"server",{"type":44,"value":1787},{"type":39,"tag":53,"props":4782,"children":4784},{"className":4783},[],[4785],{"type":44,"value":2461},{"type":44,"value":4787}," also return Effects; there is no\nPromise API or compatibility shim.",{"type":39,"tag":86,"props":4789,"children":4791},{"className":346,"code":4790,"language":348,"meta":91,"style":91},"import { Effect } from \"effect\"\nimport { defineScript, Llm } from \"opencode-drive\"\n\nexport default defineScript({\n  config: { autoupdate: false },\n  tuiConfig: { theme: \"system\" },\n  project: {\n    git: true,\n    files: { \"src\u002Fvalue.ts\": \"export const value = 1\\n\" },\n  },\n  run: ({ ui, llm }) =>\n    Effect.gen(function* () {\n      yield* llm.queue(Llm.text(\"The value is 1.\"))\n      yield* ui.submit(\"Read src\u002Fvalue.ts\")\n      yield* ui.waitFor(\"The value is 1.\")\n    }),\n})\n",[4792],{"type":39,"tag":53,"props":4793,"children":4794},{"__ignoreMap":91},[4795,4830,4874,4881,4904,4937,4978,4994,5014,5066,5073,5109,5144,5203,5246,5289,5304],{"type":39,"tag":141,"props":4796,"children":4797},{"class":143,"line":144},[4798,4802,4806,4810,4814,4818,4822,4826],{"type":39,"tag":141,"props":4799,"children":4800},{"style":358},[4801],{"type":44,"value":361},{"type":39,"tag":141,"props":4803,"children":4804},{"style":364},[4805],{"type":44,"value":367},{"type":39,"tag":141,"props":4807,"children":4808},{"style":175},[4809],{"type":44,"value":372},{"type":39,"tag":141,"props":4811,"children":4812},{"style":364},[4813],{"type":44,"value":377},{"type":39,"tag":141,"props":4815,"children":4816},{"style":358},[4817],{"type":44,"value":382},{"type":39,"tag":141,"props":4819,"children":4820},{"style":364},[4821],{"type":44,"value":387},{"type":39,"tag":141,"props":4823,"children":4824},{"style":154},[4825],{"type":44,"value":392},{"type":39,"tag":141,"props":4827,"children":4828},{"style":364},[4829],{"type":44,"value":397},{"type":39,"tag":141,"props":4831,"children":4832},{"class":143,"line":27},[4833,4837,4841,4846,4850,4854,4858,4862,4866,4870],{"type":39,"tag":141,"props":4834,"children":4835},{"style":358},[4836],{"type":44,"value":361},{"type":39,"tag":141,"props":4838,"children":4839},{"style":364},[4840],{"type":44,"value":367},{"type":39,"tag":141,"props":4842,"children":4843},{"style":175},[4844],{"type":44,"value":4845}," defineScript",{"type":39,"tag":141,"props":4847,"children":4848},{"style":364},[4849],{"type":44,"value":418},{"type":39,"tag":141,"props":4851,"children":4852},{"style":175},[4853],{"type":44,"value":413},{"type":39,"tag":141,"props":4855,"children":4856},{"style":364},[4857],{"type":44,"value":377},{"type":39,"tag":141,"props":4859,"children":4860},{"style":358},[4861],{"type":44,"value":382},{"type":39,"tag":141,"props":4863,"children":4864},{"style":364},[4865],{"type":44,"value":387},{"type":39,"tag":141,"props":4867,"children":4868},{"style":154},[4869],{"type":44,"value":4},{"type":39,"tag":141,"props":4871,"children":4872},{"style":364},[4873],{"type":44,"value":397},{"type":39,"tag":141,"props":4875,"children":4876},{"class":143,"line":198},[4877],{"type":39,"tag":141,"props":4878,"children":4879},{"emptyLinePlaceholder":449},[4880],{"type":44,"value":452},{"type":39,"tag":141,"props":4882,"children":4883},{"class":143,"line":301},[4884,4888,4892,4896,4900],{"type":39,"tag":141,"props":4885,"children":4886},{"style":358},[4887],{"type":44,"value":460},{"type":39,"tag":141,"props":4889,"children":4890},{"style":358},[4891],{"type":44,"value":465},{"type":39,"tag":141,"props":4893,"children":4894},{"style":477},[4895],{"type":44,"value":4845},{"type":39,"tag":141,"props":4897,"children":4898},{"style":175},[4899],{"type":44,"value":685},{"type":39,"tag":141,"props":4901,"children":4902},{"style":364},[4903],{"type":44,"value":2525},{"type":39,"tag":141,"props":4905,"children":4906},{"class":143,"line":488},[4907,4912,4916,4920,4925,4929,4933],{"type":39,"tag":141,"props":4908,"children":4909},{"style":501},[4910],{"type":44,"value":4911},"  config",{"type":39,"tag":141,"props":4913,"children":4914},{"style":364},[4915],{"type":44,"value":509},{"type":39,"tag":141,"props":4917,"children":4918},{"style":364},[4919],{"type":44,"value":367},{"type":39,"tag":141,"props":4921,"children":4922},{"style":501},[4923],{"type":44,"value":4924}," autoupdate",{"type":39,"tag":141,"props":4926,"children":4927},{"style":364},[4928],{"type":44,"value":509},{"type":39,"tag":141,"props":4930,"children":4931},{"style":530},[4932],{"type":44,"value":1216},{"type":39,"tag":141,"props":4934,"children":4935},{"style":364},[4936],{"type":44,"value":1176},{"type":39,"tag":141,"props":4938,"children":4939},{"class":143,"line":497},[4940,4945,4949,4953,4958,4962,4966,4970,4974],{"type":39,"tag":141,"props":4941,"children":4942},{"style":501},[4943],{"type":44,"value":4944},"  tuiConfig",{"type":39,"tag":141,"props":4946,"children":4947},{"style":364},[4948],{"type":44,"value":509},{"type":39,"tag":141,"props":4950,"children":4951},{"style":364},[4952],{"type":44,"value":367},{"type":39,"tag":141,"props":4954,"children":4955},{"style":501},[4956],{"type":44,"value":4957}," theme",{"type":39,"tag":141,"props":4959,"children":4960},{"style":364},[4961],{"type":44,"value":509},{"type":39,"tag":141,"props":4963,"children":4964},{"style":364},[4965],{"type":44,"value":387},{"type":39,"tag":141,"props":4967,"children":4968},{"style":154},[4969],{"type":44,"value":1293},{"type":39,"tag":141,"props":4971,"children":4972},{"style":364},[4973],{"type":44,"value":574},{"type":39,"tag":141,"props":4975,"children":4976},{"style":364},[4977],{"type":44,"value":1176},{"type":39,"tag":141,"props":4979,"children":4980},{"class":143,"line":517},[4981,4986,4990],{"type":39,"tag":141,"props":4982,"children":4983},{"style":501},[4984],{"type":44,"value":4985},"  project",{"type":39,"tag":141,"props":4987,"children":4988},{"style":364},[4989],{"type":44,"value":509},{"type":39,"tag":141,"props":4991,"children":4992},{"style":364},[4993],{"type":44,"value":514},{"type":39,"tag":141,"props":4995,"children":4996},{"class":143,"line":541},[4997,5002,5006,5010],{"type":39,"tag":141,"props":4998,"children":4999},{"style":501},[5000],{"type":44,"value":5001},"    git",{"type":39,"tag":141,"props":5003,"children":5004},{"style":364},[5005],{"type":44,"value":509},{"type":39,"tag":141,"props":5007,"children":5008},{"style":530},[5009],{"type":44,"value":533},{"type":39,"tag":141,"props":5011,"children":5012},{"style":364},[5013],{"type":44,"value":538},{"type":39,"tag":141,"props":5015,"children":5016},{"class":143,"line":558},[5017,5022,5026,5030,5034,5038,5042,5046,5050,5054,5058,5062],{"type":39,"tag":141,"props":5018,"children":5019},{"style":501},[5020],{"type":44,"value":5021},"    files",{"type":39,"tag":141,"props":5023,"children":5024},{"style":364},[5025],{"type":44,"value":509},{"type":39,"tag":141,"props":5027,"children":5028},{"style":364},[5029],{"type":44,"value":367},{"type":39,"tag":141,"props":5031,"children":5032},{"style":364},[5033],{"type":44,"value":387},{"type":39,"tag":141,"props":5035,"children":5036},{"style":501},[5037],{"type":44,"value":569},{"type":39,"tag":141,"props":5039,"children":5040},{"style":364},[5041],{"type":44,"value":574},{"type":39,"tag":141,"props":5043,"children":5044},{"style":364},[5045],{"type":44,"value":509},{"type":39,"tag":141,"props":5047,"children":5048},{"style":364},[5049],{"type":44,"value":387},{"type":39,"tag":141,"props":5051,"children":5052},{"style":154},[5053],{"type":44,"value":587},{"type":39,"tag":141,"props":5055,"children":5056},{"style":175},[5057],{"type":44,"value":592},{"type":39,"tag":141,"props":5059,"children":5060},{"style":364},[5061],{"type":44,"value":574},{"type":39,"tag":141,"props":5063,"children":5064},{"style":364},[5065],{"type":44,"value":1176},{"type":39,"tag":141,"props":5067,"children":5068},{"class":143,"line":603},[5069],{"type":39,"tag":141,"props":5070,"children":5071},{"style":364},[5072],{"type":44,"value":627},{"type":39,"tag":141,"props":5074,"children":5075},{"class":143,"line":612},[5076,5081,5085,5089,5093,5097,5101,5105],{"type":39,"tag":141,"props":5077,"children":5078},{"style":477},[5079],{"type":44,"value":5080},"  run",{"type":39,"tag":141,"props":5082,"children":5083},{"style":364},[5084],{"type":44,"value":509},{"type":39,"tag":141,"props":5086,"children":5087},{"style":364},[5088],{"type":44,"value":1347},{"type":39,"tag":141,"props":5090,"children":5091},{"style":639},[5092],{"type":44,"value":642},{"type":39,"tag":141,"props":5094,"children":5095},{"style":364},[5096],{"type":44,"value":418},{"type":39,"tag":141,"props":5098,"children":5099},{"style":639},[5100],{"type":44,"value":651},{"type":39,"tag":141,"props":5102,"children":5103},{"style":364},[5104],{"type":44,"value":656},{"type":39,"tag":141,"props":5106,"children":5107},{"style":659},[5108],{"type":44,"value":662},{"type":39,"tag":141,"props":5110,"children":5111},{"class":143,"line":621},[5112,5116,5120,5124,5128,5132,5136,5140],{"type":39,"tag":141,"props":5113,"children":5114},{"style":175},[5115],{"type":44,"value":671},{"type":39,"tag":141,"props":5117,"children":5118},{"style":364},[5119],{"type":44,"value":474},{"type":39,"tag":141,"props":5121,"children":5122},{"style":477},[5123],{"type":44,"value":680},{"type":39,"tag":141,"props":5125,"children":5126},{"style":175},[5127],{"type":44,"value":685},{"type":39,"tag":141,"props":5129,"children":5130},{"style":659},[5131],{"type":44,"value":690},{"type":39,"tag":141,"props":5133,"children":5134},{"style":364},[5135],{"type":44,"value":695},{"type":39,"tag":141,"props":5137,"children":5138},{"style":364},[5139],{"type":44,"value":700},{"type":39,"tag":141,"props":5141,"children":5142},{"style":364},[5143],{"type":44,"value":514},{"type":39,"tag":141,"props":5145,"children":5146},{"class":143,"line":630},[5147,5151,5155,5159,5163,5167,5171,5175,5179,5183,5187,5191,5195,5199],{"type":39,"tag":141,"props":5148,"children":5149},{"style":358},[5150],{"type":44,"value":712},{"type":39,"tag":141,"props":5152,"children":5153},{"style":364},[5154],{"type":44,"value":695},{"type":39,"tag":141,"props":5156,"children":5157},{"style":175},[5158],{"type":44,"value":651},{"type":39,"tag":141,"props":5160,"children":5161},{"style":364},[5162],{"type":44,"value":474},{"type":39,"tag":141,"props":5164,"children":5165},{"style":477},[5166],{"type":44,"value":729},{"type":39,"tag":141,"props":5168,"children":5169},{"style":501},[5170],{"type":44,"value":685},{"type":39,"tag":141,"props":5172,"children":5173},{"style":175},[5174],{"type":44,"value":738},{"type":39,"tag":141,"props":5176,"children":5177},{"style":364},[5178],{"type":44,"value":474},{"type":39,"tag":141,"props":5180,"children":5181},{"style":477},[5182],{"type":44,"value":44},{"type":39,"tag":141,"props":5184,"children":5185},{"style":501},[5186],{"type":44,"value":685},{"type":39,"tag":141,"props":5188,"children":5189},{"style":364},[5190],{"type":44,"value":574},{"type":39,"tag":141,"props":5192,"children":5193},{"style":154},[5194],{"type":44,"value":759},{"type":39,"tag":141,"props":5196,"children":5197},{"style":364},[5198],{"type":44,"value":574},{"type":39,"tag":141,"props":5200,"children":5201},{"style":501},[5202],{"type":44,"value":768},{"type":39,"tag":141,"props":5204,"children":5205},{"class":143,"line":665},[5206,5210,5214,5218,5222,5226,5230,5234,5238,5242],{"type":39,"tag":141,"props":5207,"children":5208},{"style":358},[5209],{"type":44,"value":712},{"type":39,"tag":141,"props":5211,"children":5212},{"style":364},[5213],{"type":44,"value":695},{"type":39,"tag":141,"props":5215,"children":5216},{"style":175},[5217],{"type":44,"value":642},{"type":39,"tag":141,"props":5219,"children":5220},{"style":364},[5221],{"type":44,"value":474},{"type":39,"tag":141,"props":5223,"children":5224},{"style":477},[5225],{"type":44,"value":793},{"type":39,"tag":141,"props":5227,"children":5228},{"style":501},[5229],{"type":44,"value":685},{"type":39,"tag":141,"props":5231,"children":5232},{"style":364},[5233],{"type":44,"value":574},{"type":39,"tag":141,"props":5235,"children":5236},{"style":154},[5237],{"type":44,"value":806},{"type":39,"tag":141,"props":5239,"children":5240},{"style":364},[5241],{"type":44,"value":574},{"type":39,"tag":141,"props":5243,"children":5244},{"style":501},[5245],{"type":44,"value":815},{"type":39,"tag":141,"props":5247,"children":5248},{"class":143,"line":23},[5249,5253,5257,5261,5265,5269,5273,5277,5281,5285],{"type":39,"tag":141,"props":5250,"children":5251},{"style":358},[5252],{"type":44,"value":712},{"type":39,"tag":141,"props":5254,"children":5255},{"style":364},[5256],{"type":44,"value":695},{"type":39,"tag":141,"props":5258,"children":5259},{"style":175},[5260],{"type":44,"value":642},{"type":39,"tag":141,"props":5262,"children":5263},{"style":364},[5264],{"type":44,"value":474},{"type":39,"tag":141,"props":5266,"children":5267},{"style":477},[5268],{"type":44,"value":840},{"type":39,"tag":141,"props":5270,"children":5271},{"style":501},[5272],{"type":44,"value":685},{"type":39,"tag":141,"props":5274,"children":5275},{"style":364},[5276],{"type":44,"value":574},{"type":39,"tag":141,"props":5278,"children":5279},{"style":154},[5280],{"type":44,"value":759},{"type":39,"tag":141,"props":5282,"children":5283},{"style":364},[5284],{"type":44,"value":574},{"type":39,"tag":141,"props":5286,"children":5287},{"style":501},[5288],{"type":44,"value":815},{"type":39,"tag":141,"props":5290,"children":5291},{"class":143,"line":771},[5292,5296,5300],{"type":39,"tag":141,"props":5293,"children":5294},{"style":364},[5295],{"type":44,"value":915},{"type":39,"tag":141,"props":5297,"children":5298},{"style":175},[5299],{"type":44,"value":920},{"type":39,"tag":141,"props":5301,"children":5302},{"style":364},[5303],{"type":44,"value":538},{"type":39,"tag":141,"props":5305,"children":5306},{"class":143,"line":818},[5307,5311],{"type":39,"tag":141,"props":5308,"children":5309},{"style":364},[5310],{"type":44,"value":2605},{"type":39,"tag":141,"props":5312,"children":5313},{"style":175},[5314],{"type":44,"value":815},{"type":39,"tag":47,"props":5316,"children":5317},{},[5318],{"type":44,"value":5319},"Always type-check a script before starting it:",{"type":39,"tag":86,"props":5321,"children":5323},{"className":133,"code":5322,"language":135,"meta":91,"style":91},"opencode-drive check .\u002Fdrive.ts\nopencode-drive start --name demo --script .\u002Fdrive.ts\n",[5324],{"type":39,"tag":53,"props":5325,"children":5326},{"__ignoreMap":91},[5327,5343],{"type":39,"tag":141,"props":5328,"children":5329},{"class":143,"line":144},[5330,5334,5339],{"type":39,"tag":141,"props":5331,"children":5332},{"style":148},[5333],{"type":44,"value":4},{"type":39,"tag":141,"props":5335,"children":5336},{"style":154},[5337],{"type":44,"value":5338}," check",{"type":39,"tag":141,"props":5340,"children":5341},{"style":154},[5342],{"type":44,"value":955},{"type":39,"tag":141,"props":5344,"children":5345},{"class":143,"line":27},[5346,5350,5355,5360,5365,5370],{"type":39,"tag":141,"props":5347,"children":5348},{"style":148},[5349],{"type":44,"value":4},{"type":39,"tag":141,"props":5351,"children":5352},{"style":154},[5353],{"type":44,"value":5354}," start",{"type":39,"tag":141,"props":5356,"children":5357},{"style":154},[5358],{"type":44,"value":5359}," --name",{"type":39,"tag":141,"props":5361,"children":5362},{"style":154},[5363],{"type":44,"value":5364}," demo",{"type":39,"tag":141,"props":5366,"children":5367},{"style":154},[5368],{"type":44,"value":5369}," --script",{"type":39,"tag":141,"props":5371,"children":5372},{"style":154},[5373],{"type":44,"value":955},{"type":39,"tag":47,"props":5375,"children":5376},{},[5377,5379,5385,5387,5393],{"type":44,"value":5378},"For a new script, run ",{"type":39,"tag":53,"props":5380,"children":5382},{"className":5381},[],[5383],{"type":44,"value":5384},"opencode-drive script init .\u002Fdrive.ts",{"type":44,"value":5386}," once. It creates a\ncanonical Effect-native starter and refuses to overwrite an existing file.\n",{"type":39,"tag":53,"props":5388,"children":5390},{"className":5389},[],[5391],{"type":44,"value":5392},"check",{"type":44,"value":5394}," adds focused migration guidance when it finds Promise-style script\ncallbacks.",{"type":39,"tag":47,"props":5396,"children":5397},{},[5398,5400,5406,5407,5412,5413,5418,5419,5424,5426,5432],{"type":44,"value":5399},"The script DSL applies ",{"type":39,"tag":53,"props":5401,"children":5403},{"className":5402},[],[5404],{"type":44,"value":5405},"project",{"type":44,"value":1779},{"type":39,"tag":53,"props":5408,"children":5410},{"className":5409},[],[5411],{"type":44,"value":1662},{"type":44,"value":1779},{"type":39,"tag":53,"props":5414,"children":5416},{"className":5415},[],[5417],{"type":44,"value":1670},{"type":44,"value":1787},{"type":39,"tag":53,"props":5420,"children":5422},{"className":5421},[],[5423],{"type":44,"value":1696},{"type":44,"value":5425}," with the same deterministic ordering described above. Automatic scripts run again after ",{"type":39,"tag":53,"props":5427,"children":5429},{"className":5428},[],[5430],{"type":44,"value":5431},"opencode-drive restart --name demo",{"type":44,"value":474},{"type":39,"tag":47,"props":5434,"children":5435},{},[5436,5437,5443,5445,5450,5451,5456,5458,5464,5466,5472,5474,5480,5482,5488],{"type":44,"value":51},{"type":39,"tag":53,"props":5438,"children":5440},{"className":5439},[],[5441],{"type":44,"value":5442},"launch: \"manual\"",{"type":44,"value":5444}," only when the workflow must control server and TUI restarts itself. In manual mode ",{"type":39,"tag":53,"props":5446,"children":5448},{"className":5447},[],[5449],{"type":44,"value":2438},{"type":44,"value":1664},{"type":39,"tag":53,"props":5452,"children":5454},{"className":5453},[],[5455],{"type":44,"value":2446},{"type":44,"value":5457}," are ",{"type":39,"tag":53,"props":5459,"children":5461},{"className":5460},[],[5462],{"type":44,"value":5463},"null",{"type":44,"value":5465},"; run ",{"type":39,"tag":53,"props":5467,"children":5469},{"className":5468},[],[5470],{"type":44,"value":5471},"server.launch()",{"type":44,"value":5473}," before ",{"type":39,"tag":53,"props":5475,"children":5477},{"className":5476},[],[5478],{"type":44,"value":5479},"tuis.launch(name)",{"type":44,"value":5481},". Only one server may run at a time, ",{"type":39,"tag":53,"props":5483,"children":5485},{"className":5484},[],[5486],{"type":44,"value":5487},"server.kill()",{"type":44,"value":5489}," permits relaunch, and a closed TUI name may be reused.",{"type":39,"tag":86,"props":5491,"children":5493},{"className":346,"code":5492,"language":348,"meta":91,"style":91},"export default defineScript({\n  launch: \"manual\",\n  run: ({ server, tuis }) =>\n    Effect.gen(function* () {\n      yield* server.launch()\n      const alice = yield* tuis.launch(\"alice\", { recording: true })\n      yield* alice.ui.screenshot(\"alice\")\n      yield* alice.close()\n    }),\n})\n",[5494],{"type":39,"tag":53,"props":5495,"children":5496},{"__ignoreMap":91},[5497,5520,5549,5585,5620,5648,5731,5782,5810,5825],{"type":39,"tag":141,"props":5498,"children":5499},{"class":143,"line":144},[5500,5504,5508,5512,5516],{"type":39,"tag":141,"props":5501,"children":5502},{"style":358},[5503],{"type":44,"value":460},{"type":39,"tag":141,"props":5505,"children":5506},{"style":358},[5507],{"type":44,"value":465},{"type":39,"tag":141,"props":5509,"children":5510},{"style":477},[5511],{"type":44,"value":4845},{"type":39,"tag":141,"props":5513,"children":5514},{"style":175},[5515],{"type":44,"value":685},{"type":39,"tag":141,"props":5517,"children":5518},{"style":364},[5519],{"type":44,"value":2525},{"type":39,"tag":141,"props":5521,"children":5522},{"class":143,"line":27},[5523,5528,5532,5536,5541,5545],{"type":39,"tag":141,"props":5524,"children":5525},{"style":501},[5526],{"type":44,"value":5527},"  launch",{"type":39,"tag":141,"props":5529,"children":5530},{"style":364},[5531],{"type":44,"value":509},{"type":39,"tag":141,"props":5533,"children":5534},{"style":364},[5535],{"type":44,"value":387},{"type":39,"tag":141,"props":5537,"children":5538},{"style":154},[5539],{"type":44,"value":5540},"manual",{"type":39,"tag":141,"props":5542,"children":5543},{"style":364},[5544],{"type":44,"value":574},{"type":39,"tag":141,"props":5546,"children":5547},{"style":364},[5548],{"type":44,"value":538},{"type":39,"tag":141,"props":5550,"children":5551},{"class":143,"line":198},[5552,5556,5560,5564,5569,5573,5577,5581],{"type":39,"tag":141,"props":5553,"children":5554},{"style":477},[5555],{"type":44,"value":5080},{"type":39,"tag":141,"props":5557,"children":5558},{"style":364},[5559],{"type":44,"value":509},{"type":39,"tag":141,"props":5561,"children":5562},{"style":364},[5563],{"type":44,"value":1347},{"type":39,"tag":141,"props":5565,"children":5566},{"style":639},[5567],{"type":44,"value":5568}," server",{"type":39,"tag":141,"props":5570,"children":5571},{"style":364},[5572],{"type":44,"value":418},{"type":39,"tag":141,"props":5574,"children":5575},{"style":639},[5576],{"type":44,"value":2507},{"type":39,"tag":141,"props":5578,"children":5579},{"style":364},[5580],{"type":44,"value":656},{"type":39,"tag":141,"props":5582,"children":5583},{"style":659},[5584],{"type":44,"value":662},{"type":39,"tag":141,"props":5586,"children":5587},{"class":143,"line":301},[5588,5592,5596,5600,5604,5608,5612,5616],{"type":39,"tag":141,"props":5589,"children":5590},{"style":175},[5591],{"type":44,"value":671},{"type":39,"tag":141,"props":5593,"children":5594},{"style":364},[5595],{"type":44,"value":474},{"type":39,"tag":141,"props":5597,"children":5598},{"style":477},[5599],{"type":44,"value":680},{"type":39,"tag":141,"props":5601,"children":5602},{"style":175},[5603],{"type":44,"value":685},{"type":39,"tag":141,"props":5605,"children":5606},{"style":659},[5607],{"type":44,"value":690},{"type":39,"tag":141,"props":5609,"children":5610},{"style":364},[5611],{"type":44,"value":695},{"type":39,"tag":141,"props":5613,"children":5614},{"style":364},[5615],{"type":44,"value":700},{"type":39,"tag":141,"props":5617,"children":5618},{"style":364},[5619],{"type":44,"value":514},{"type":39,"tag":141,"props":5621,"children":5622},{"class":143,"line":488},[5623,5627,5631,5635,5639,5643],{"type":39,"tag":141,"props":5624,"children":5625},{"style":358},[5626],{"type":44,"value":712},{"type":39,"tag":141,"props":5628,"children":5629},{"style":364},[5630],{"type":44,"value":695},{"type":39,"tag":141,"props":5632,"children":5633},{"style":175},[5634],{"type":44,"value":5568},{"type":39,"tag":141,"props":5636,"children":5637},{"style":364},[5638],{"type":44,"value":474},{"type":39,"tag":141,"props":5640,"children":5641},{"style":477},[5642],{"type":44,"value":2516},{"type":39,"tag":141,"props":5644,"children":5645},{"style":501},[5646],{"type":44,"value":5647},"()\n",{"type":39,"tag":141,"props":5649,"children":5650},{"class":143,"line":497},[5651,5656,5661,5665,5669,5673,5677,5681,5685,5689,5693,5698,5702,5706,5710,5715,5719,5723,5727],{"type":39,"tag":141,"props":5652,"children":5653},{"style":659},[5654],{"type":44,"value":5655},"      const",{"type":39,"tag":141,"props":5657,"children":5658},{"style":175},[5659],{"type":44,"value":5660}," alice",{"type":39,"tag":141,"props":5662,"children":5663},{"style":364},[5664],{"type":44,"value":1503},{"type":39,"tag":141,"props":5666,"children":5667},{"style":358},[5668],{"type":44,"value":2498},{"type":39,"tag":141,"props":5670,"children":5671},{"style":364},[5672],{"type":44,"value":695},{"type":39,"tag":141,"props":5674,"children":5675},{"style":175},[5676],{"type":44,"value":2507},{"type":39,"tag":141,"props":5678,"children":5679},{"style":364},[5680],{"type":44,"value":474},{"type":39,"tag":141,"props":5682,"children":5683},{"style":477},[5684],{"type":44,"value":2516},{"type":39,"tag":141,"props":5686,"children":5687},{"style":501},[5688],{"type":44,"value":685},{"type":39,"tag":141,"props":5690,"children":5691},{"style":364},[5692],{"type":44,"value":574},{"type":39,"tag":141,"props":5694,"children":5695},{"style":154},[5696],{"type":44,"value":5697},"alice",{"type":39,"tag":141,"props":5699,"children":5700},{"style":364},[5701],{"type":44,"value":574},{"type":39,"tag":141,"props":5703,"children":5704},{"style":364},[5705],{"type":44,"value":418},{"type":39,"tag":141,"props":5707,"children":5708},{"style":364},[5709],{"type":44,"value":367},{"type":39,"tag":141,"props":5711,"children":5712},{"style":501},[5713],{"type":44,"value":5714}," recording",{"type":39,"tag":141,"props":5716,"children":5717},{"style":364},[5718],{"type":44,"value":509},{"type":39,"tag":141,"props":5720,"children":5721},{"style":530},[5722],{"type":44,"value":533},{"type":39,"tag":141,"props":5724,"children":5725},{"style":364},[5726],{"type":44,"value":377},{"type":39,"tag":141,"props":5728,"children":5729},{"style":501},[5730],{"type":44,"value":815},{"type":39,"tag":141,"props":5732,"children":5733},{"class":143,"line":517},[5734,5738,5742,5746,5750,5754,5758,5762,5766,5770,5774,5778],{"type":39,"tag":141,"props":5735,"children":5736},{"style":358},[5737],{"type":44,"value":712},{"type":39,"tag":141,"props":5739,"children":5740},{"style":364},[5741],{"type":44,"value":695},{"type":39,"tag":141,"props":5743,"children":5744},{"style":175},[5745],{"type":44,"value":5660},{"type":39,"tag":141,"props":5747,"children":5748},{"style":364},[5749],{"type":44,"value":474},{"type":39,"tag":141,"props":5751,"children":5752},{"style":175},[5753],{"type":44,"value":2446},{"type":39,"tag":141,"props":5755,"children":5756},{"style":364},[5757],{"type":44,"value":474},{"type":39,"tag":141,"props":5759,"children":5760},{"style":477},[5761],{"type":44,"value":885},{"type":39,"tag":141,"props":5763,"children":5764},{"style":501},[5765],{"type":44,"value":685},{"type":39,"tag":141,"props":5767,"children":5768},{"style":364},[5769],{"type":44,"value":574},{"type":39,"tag":141,"props":5771,"children":5772},{"style":154},[5773],{"type":44,"value":5697},{"type":39,"tag":141,"props":5775,"children":5776},{"style":364},[5777],{"type":44,"value":574},{"type":39,"tag":141,"props":5779,"children":5780},{"style":501},[5781],{"type":44,"value":815},{"type":39,"tag":141,"props":5783,"children":5784},{"class":143,"line":541},[5785,5789,5793,5797,5801,5806],{"type":39,"tag":141,"props":5786,"children":5787},{"style":358},[5788],{"type":44,"value":712},{"type":39,"tag":141,"props":5790,"children":5791},{"style":364},[5792],{"type":44,"value":695},{"type":39,"tag":141,"props":5794,"children":5795},{"style":175},[5796],{"type":44,"value":5660},{"type":39,"tag":141,"props":5798,"children":5799},{"style":364},[5800],{"type":44,"value":474},{"type":39,"tag":141,"props":5802,"children":5803},{"style":477},[5804],{"type":44,"value":5805},"close",{"type":39,"tag":141,"props":5807,"children":5808},{"style":501},[5809],{"type":44,"value":5647},{"type":39,"tag":141,"props":5811,"children":5812},{"class":143,"line":558},[5813,5817,5821],{"type":39,"tag":141,"props":5814,"children":5815},{"style":364},[5816],{"type":44,"value":915},{"type":39,"tag":141,"props":5818,"children":5819},{"style":175},[5820],{"type":44,"value":920},{"type":39,"tag":141,"props":5822,"children":5823},{"style":364},[5824],{"type":44,"value":538},{"type":39,"tag":141,"props":5826,"children":5827},{"class":143,"line":603},[5828,5832],{"type":39,"tag":141,"props":5829,"children":5830},{"style":364},[5831],{"type":44,"value":2605},{"type":39,"tag":141,"props":5833,"children":5834},{"style":175},[5835],{"type":44,"value":815},{"type":39,"tag":47,"props":5837,"children":5838},{},[5839,5841,5847],{"type":44,"value":5840},"Cancellation uses Effect interruption. Interrupting the script or an\noperation's fiber interrupts in-flight work and runs scoped finalizers; do not\nintroduce ",{"type":39,"tag":53,"props":5842,"children":5844},{"className":5843},[],[5845],{"type":44,"value":5846},"AbortSignal",{"type":44,"value":5848}," or Promise cancellation wrappers.",{"type":39,"tag":74,"props":5850,"children":5852},{"id":5851},"prepare-an-instance",[5853],{"type":44,"value":5854},"Prepare An Instance",{"type":39,"tag":47,"props":5856,"children":5857},{},[5858,5859,5865],{"type":44,"value":51},{"type":39,"tag":53,"props":5860,"children":5862},{"className":5861},[],[5863],{"type":44,"value":5864},"init",{"type":44,"value":5866}," only when files must be copied into an isolated home or project before a named live or scripted instance starts:",{"type":39,"tag":86,"props":5868,"children":5870},{"className":133,"code":5869,"language":135,"meta":91,"style":91},"artifacts=$(opencode-drive init --name demo)\ncp -R .\u002Ffixtures\u002Fhome\u002F. \"$artifacts\u002F\"\ncp -R .\u002Ffixtures\u002Fproject\u002F. \"$artifacts\u002Ffiles\u002F\"\nopencode-drive start --name demo --dev ~\u002Fprojects\u002Fopencode\n",[5871],{"type":39,"tag":53,"props":5872,"children":5873},{"__ignoreMap":91},[5874,5908,5944,5977],{"type":39,"tag":141,"props":5875,"children":5876},{"class":143,"line":144},[5877,5882,5887,5891,5896,5900,5904],{"type":39,"tag":141,"props":5878,"children":5879},{"style":175},[5880],{"type":44,"value":5881},"artifacts",{"type":39,"tag":141,"props":5883,"children":5884},{"style":364},[5885],{"type":44,"value":5886},"=$(",{"type":39,"tag":141,"props":5888,"children":5889},{"style":148},[5890],{"type":44,"value":4},{"type":39,"tag":141,"props":5892,"children":5893},{"style":154},[5894],{"type":44,"value":5895}," init",{"type":39,"tag":141,"props":5897,"children":5898},{"style":154},[5899],{"type":44,"value":5359},{"type":39,"tag":141,"props":5901,"children":5902},{"style":154},[5903],{"type":44,"value":5364},{"type":39,"tag":141,"props":5905,"children":5906},{"style":364},[5907],{"type":44,"value":815},{"type":39,"tag":141,"props":5909,"children":5910},{"class":143,"line":27},[5911,5916,5921,5926,5930,5935,5940],{"type":39,"tag":141,"props":5912,"children":5913},{"style":148},[5914],{"type":44,"value":5915},"cp",{"type":39,"tag":141,"props":5917,"children":5918},{"style":154},[5919],{"type":44,"value":5920}," -R",{"type":39,"tag":141,"props":5922,"children":5923},{"style":154},[5924],{"type":44,"value":5925}," .\u002Ffixtures\u002Fhome\u002F.",{"type":39,"tag":141,"props":5927,"children":5928},{"style":364},[5929],{"type":44,"value":387},{"type":39,"tag":141,"props":5931,"children":5932},{"style":175},[5933],{"type":44,"value":5934},"$artifacts",{"type":39,"tag":141,"props":5936,"children":5937},{"style":154},[5938],{"type":44,"value":5939},"\u002F",{"type":39,"tag":141,"props":5941,"children":5942},{"style":364},[5943],{"type":44,"value":397},{"type":39,"tag":141,"props":5945,"children":5946},{"class":143,"line":198},[5947,5951,5955,5960,5964,5968,5973],{"type":39,"tag":141,"props":5948,"children":5949},{"style":148},[5950],{"type":44,"value":5915},{"type":39,"tag":141,"props":5952,"children":5953},{"style":154},[5954],{"type":44,"value":5920},{"type":39,"tag":141,"props":5956,"children":5957},{"style":154},[5958],{"type":44,"value":5959}," .\u002Ffixtures\u002Fproject\u002F.",{"type":39,"tag":141,"props":5961,"children":5962},{"style":364},[5963],{"type":44,"value":387},{"type":39,"tag":141,"props":5965,"children":5966},{"style":175},[5967],{"type":44,"value":5934},{"type":39,"tag":141,"props":5969,"children":5970},{"style":154},[5971],{"type":44,"value":5972},"\u002Ffiles\u002F",{"type":39,"tag":141,"props":5974,"children":5975},{"style":364},[5976],{"type":44,"value":397},{"type":39,"tag":141,"props":5978,"children":5979},{"class":143,"line":301},[5980,5984,5988,5992,5996,6001],{"type":39,"tag":141,"props":5981,"children":5982},{"style":148},[5983],{"type":44,"value":4},{"type":39,"tag":141,"props":5985,"children":5986},{"style":154},[5987],{"type":44,"value":5354},{"type":39,"tag":141,"props":5989,"children":5990},{"style":154},[5991],{"type":44,"value":5359},{"type":39,"tag":141,"props":5993,"children":5994},{"style":154},[5995],{"type":44,"value":5364},{"type":39,"tag":141,"props":5997,"children":5998},{"style":154},[5999],{"type":44,"value":6000}," --dev",{"type":39,"tag":141,"props":6002,"children":6003},{"style":154},[6004],{"type":44,"value":6005}," ~\u002Fprojects\u002Fopencode\n",{"type":39,"tag":47,"props":6007,"children":6008},{},[6009,6011,6017,6019,6025,6027,6033],{"type":44,"value":6010},"The simulated project is under ",{"type":39,"tag":53,"props":6012,"children":6014},{"className":6013},[],[6015],{"type":44,"value":6016},"$artifacts\u002Ffiles",{"type":44,"value":6018},". A later ",{"type":39,"tag":53,"props":6020,"children":6022},{"className":6021},[],[6023],{"type":44,"value":6024},"start --name demo",{"type":44,"value":6026}," reuses the prepared artifacts; otherwise ",{"type":39,"tag":53,"props":6028,"children":6030},{"className":6029},[],[6031],{"type":44,"value":6032},"start",{"type":44,"value":6034}," initializes them automatically.",{"type":39,"tag":47,"props":6036,"children":6037},{},[6038,6040,6046],{"type":44,"value":6039},"Drive uses an in-memory OpenCode database by default. For a script that restarts\nthe OpenCode service and must recover the same sessions, set\n",{"type":39,"tag":53,"props":6041,"children":6043},{"className":6042},[],[6044],{"type":44,"value":6045},"OPENCODE_DRIVE_DB",{"type":44,"value":6047}," to a file-backed path. Relative paths resolve inside the\nisolated run's OpenCode data directory:",{"type":39,"tag":86,"props":6049,"children":6051},{"className":133,"code":6050,"language":135,"meta":91,"style":91},"OPENCODE_DRIVE_DB=restart.sqlite \\\n  opencode-drive start --name restart-demo --script .\u002Frestart.ts\n",[6052],{"type":39,"tag":53,"props":6053,"children":6054},{"__ignoreMap":91},[6055,6075],{"type":39,"tag":141,"props":6056,"children":6057},{"class":143,"line":144},[6058,6062,6066,6071],{"type":39,"tag":141,"props":6059,"children":6060},{"style":175},[6061],{"type":44,"value":6045},{"type":39,"tag":141,"props":6063,"children":6064},{"style":364},[6065],{"type":44,"value":2493},{"type":39,"tag":141,"props":6067,"children":6068},{"style":154},[6069],{"type":44,"value":6070},"restart.sqlite",{"type":39,"tag":141,"props":6072,"children":6073},{"style":148},[6074],{"type":44,"value":178},{"type":39,"tag":141,"props":6076,"children":6077},{"class":143,"line":27},[6078,6083,6087,6091,6096,6100],{"type":39,"tag":141,"props":6079,"children":6080},{"style":154},[6081],{"type":44,"value":6082},"  opencode-drive",{"type":39,"tag":141,"props":6084,"children":6085},{"style":154},[6086],{"type":44,"value":5354},{"type":39,"tag":141,"props":6088,"children":6089},{"style":154},[6090],{"type":44,"value":5359},{"type":39,"tag":141,"props":6092,"children":6093},{"style":154},[6094],{"type":44,"value":6095}," restart-demo",{"type":39,"tag":141,"props":6097,"children":6098},{"style":154},[6099],{"type":44,"value":5369},{"type":39,"tag":141,"props":6101,"children":6102},{"style":154},[6103],{"type":44,"value":6104}," .\u002Frestart.ts\n",{"type":39,"tag":74,"props":6106,"children":6108},{"id":6107},"live-interaction",[6109],{"type":44,"value":6110},"Live Interaction",{"type":39,"tag":47,"props":6112,"children":6113},{},[6114,6116,6121,6123,6129,6131,6136,6138,6144],{"type":44,"value":6115},"Use live commands to inspect or iterate on a persistent instance. Headless ",{"type":39,"tag":53,"props":6117,"children":6119},{"className":6118},[],[6120],{"type":44,"value":6032},{"type":44,"value":6122}," requires a unique ",{"type":39,"tag":53,"props":6124,"children":6126},{"className":6125},[],[6127],{"type":44,"value":6128},"--name",{"type":44,"value":6130},"; visible instances may omit it. Headless ",{"type":39,"tag":53,"props":6132,"children":6134},{"className":6133},[],[6135],{"type":44,"value":6032},{"type":44,"value":6137}," detaches after the instance is ready, so do not add ",{"type":39,"tag":53,"props":6139,"children":6141},{"className":6140},[],[6142],{"type":44,"value":6143},"&",{"type":44,"value":6145},". Always stop the instance when finished.",{"type":39,"tag":86,"props":6147,"children":6149},{"className":133,"code":6148,"language":135,"meta":91,"style":91},"opencode-drive start --name demo\n\nopencode-drive send --name demo \\\n  --command.ui.type '{\"text\":\"Explain this project\"}' \\\n  --command.ui.enter\n\nopencode-drive send --name demo --command.ui.state\nopencode-drive send --name demo --command.ui.capture\nopencode-drive send --name demo --command.ui.screenshot\nopencode-drive stop --name demo\n",[6150],{"type":39,"tag":53,"props":6151,"children":6152},{"__ignoreMap":91},[6153,6173,6180,6204,6231,6239,6246,6270,6294,6318],{"type":39,"tag":141,"props":6154,"children":6155},{"class":143,"line":144},[6156,6160,6164,6168],{"type":39,"tag":141,"props":6157,"children":6158},{"style":148},[6159],{"type":44,"value":4},{"type":39,"tag":141,"props":6161,"children":6162},{"style":154},[6163],{"type":44,"value":5354},{"type":39,"tag":141,"props":6165,"children":6166},{"style":154},[6167],{"type":44,"value":5359},{"type":39,"tag":141,"props":6169,"children":6170},{"style":154},[6171],{"type":44,"value":6172}," demo\n",{"type":39,"tag":141,"props":6174,"children":6175},{"class":143,"line":27},[6176],{"type":39,"tag":141,"props":6177,"children":6178},{"emptyLinePlaceholder":449},[6179],{"type":44,"value":452},{"type":39,"tag":141,"props":6181,"children":6182},{"class":143,"line":198},[6183,6187,6192,6196,6200],{"type":39,"tag":141,"props":6184,"children":6185},{"style":148},[6186],{"type":44,"value":4},{"type":39,"tag":141,"props":6188,"children":6189},{"style":154},[6190],{"type":44,"value":6191}," send",{"type":39,"tag":141,"props":6193,"children":6194},{"style":154},[6195],{"type":44,"value":5359},{"type":39,"tag":141,"props":6197,"children":6198},{"style":154},[6199],{"type":44,"value":5364},{"type":39,"tag":141,"props":6201,"children":6202},{"style":175},[6203],{"type":44,"value":178},{"type":39,"tag":141,"props":6205,"children":6206},{"class":143,"line":301},[6207,6212,6217,6222,6227],{"type":39,"tag":141,"props":6208,"children":6209},{"style":154},[6210],{"type":44,"value":6211},"  --command.ui.type",{"type":39,"tag":141,"props":6213,"children":6214},{"style":364},[6215],{"type":44,"value":6216}," '",{"type":39,"tag":141,"props":6218,"children":6219},{"style":154},[6220],{"type":44,"value":6221},"{\"text\":\"Explain this project\"}",{"type":39,"tag":141,"props":6223,"children":6224},{"style":364},[6225],{"type":44,"value":6226},"'",{"type":39,"tag":141,"props":6228,"children":6229},{"style":175},[6230],{"type":44,"value":178},{"type":39,"tag":141,"props":6232,"children":6233},{"class":143,"line":488},[6234],{"type":39,"tag":141,"props":6235,"children":6236},{"style":154},[6237],{"type":44,"value":6238},"  --command.ui.enter\n",{"type":39,"tag":141,"props":6240,"children":6241},{"class":143,"line":497},[6242],{"type":39,"tag":141,"props":6243,"children":6244},{"emptyLinePlaceholder":449},[6245],{"type":44,"value":452},{"type":39,"tag":141,"props":6247,"children":6248},{"class":143,"line":517},[6249,6253,6257,6261,6265],{"type":39,"tag":141,"props":6250,"children":6251},{"style":148},[6252],{"type":44,"value":4},{"type":39,"tag":141,"props":6254,"children":6255},{"style":154},[6256],{"type":44,"value":6191},{"type":39,"tag":141,"props":6258,"children":6259},{"style":154},[6260],{"type":44,"value":5359},{"type":39,"tag":141,"props":6262,"children":6263},{"style":154},[6264],{"type":44,"value":5364},{"type":39,"tag":141,"props":6266,"children":6267},{"style":154},[6268],{"type":44,"value":6269}," --command.ui.state\n",{"type":39,"tag":141,"props":6271,"children":6272},{"class":143,"line":541},[6273,6277,6281,6285,6289],{"type":39,"tag":141,"props":6274,"children":6275},{"style":148},[6276],{"type":44,"value":4},{"type":39,"tag":141,"props":6278,"children":6279},{"style":154},[6280],{"type":44,"value":6191},{"type":39,"tag":141,"props":6282,"children":6283},{"style":154},[6284],{"type":44,"value":5359},{"type":39,"tag":141,"props":6286,"children":6287},{"style":154},[6288],{"type":44,"value":5364},{"type":39,"tag":141,"props":6290,"children":6291},{"style":154},[6292],{"type":44,"value":6293}," --command.ui.capture\n",{"type":39,"tag":141,"props":6295,"children":6296},{"class":143,"line":558},[6297,6301,6305,6309,6313],{"type":39,"tag":141,"props":6298,"children":6299},{"style":148},[6300],{"type":44,"value":4},{"type":39,"tag":141,"props":6302,"children":6303},{"style":154},[6304],{"type":44,"value":6191},{"type":39,"tag":141,"props":6306,"children":6307},{"style":154},[6308],{"type":44,"value":5359},{"type":39,"tag":141,"props":6310,"children":6311},{"style":154},[6312],{"type":44,"value":5364},{"type":39,"tag":141,"props":6314,"children":6315},{"style":154},[6316],{"type":44,"value":6317}," --command.ui.screenshot\n",{"type":39,"tag":141,"props":6319,"children":6320},{"class":143,"line":603},[6321,6325,6330,6334],{"type":39,"tag":141,"props":6322,"children":6323},{"style":148},[6324],{"type":44,"value":4},{"type":39,"tag":141,"props":6326,"children":6327},{"style":154},[6328],{"type":44,"value":6329}," stop",{"type":39,"tag":141,"props":6331,"children":6332},{"style":154},[6333],{"type":44,"value":5359},{"type":39,"tag":141,"props":6335,"children":6336},{"style":154},[6337],{"type":44,"value":6172},{"type":39,"tag":47,"props":6339,"children":6340},{},[6341,6347],{"type":39,"tag":53,"props":6342,"children":6344},{"className":6343},[],[6345],{"type":44,"value":6346},"send",{"type":44,"value":6348}," executes command flags from left to right. JSON-valued commands take one JSON argument. Supported commands are:",{"type":39,"tag":1755,"props":6350,"children":6351},{},[6352,6361,6370,6379,6388,6397,6406,6415,6432,6441,6450,6459,6468],{"type":39,"tag":1643,"props":6353,"children":6354},{},[6355],{"type":39,"tag":53,"props":6356,"children":6358},{"className":6357},[],[6359],{"type":44,"value":6360},"--command.ui.type '{\"text\":\"...\"}'",{"type":39,"tag":1643,"props":6362,"children":6363},{},[6364],{"type":39,"tag":53,"props":6365,"children":6367},{"className":6366},[],[6368],{"type":44,"value":6369},"--command.ui.press '{\"key\":\"p\",\"modifiers\":{\"ctrl\":true}}'",{"type":39,"tag":1643,"props":6371,"children":6372},{},[6373],{"type":39,"tag":53,"props":6374,"children":6376},{"className":6375},[],[6377],{"type":44,"value":6378},"--command.ui.enter",{"type":39,"tag":1643,"props":6380,"children":6381},{},[6382],{"type":39,"tag":53,"props":6383,"children":6385},{"className":6384},[],[6386],{"type":44,"value":6387},"--command.ui.arrow '{\"direction\":\"down\"}'",{"type":39,"tag":1643,"props":6389,"children":6390},{},[6391],{"type":39,"tag":53,"props":6392,"children":6394},{"className":6393},[],[6395],{"type":44,"value":6396},"--command.ui.focus '{\"target\":12}'",{"type":39,"tag":1643,"props":6398,"children":6399},{},[6400],{"type":39,"tag":53,"props":6401,"children":6403},{"className":6402},[],[6404],{"type":44,"value":6405},"--command.ui.click '{\"target\":12,\"x\":4,\"y\":1}'",{"type":39,"tag":1643,"props":6407,"children":6408},{},[6409],{"type":39,"tag":53,"props":6410,"children":6412},{"className":6411},[],[6413],{"type":44,"value":6414},"--command.ui.resize '{\"cols\":120,\"rows\":40}'",{"type":39,"tag":1643,"props":6416,"children":6417},{},[6418,6424,6426],{"type":39,"tag":53,"props":6419,"children":6421},{"className":6420},[],[6422],{"type":44,"value":6423},"--command.ui.screenshot",{"type":44,"value":6425}," or ",{"type":39,"tag":53,"props":6427,"children":6429},{"className":6428},[],[6430],{"type":44,"value":6431},"--command.ui.screenshot '{\"name\":\"home\"}'",{"type":39,"tag":1643,"props":6433,"children":6434},{},[6435],{"type":39,"tag":53,"props":6436,"children":6438},{"className":6437},[],[6439],{"type":44,"value":6440},"--command.ui.state",{"type":39,"tag":1643,"props":6442,"children":6443},{},[6444],{"type":39,"tag":53,"props":6445,"children":6447},{"className":6446},[],[6448],{"type":44,"value":6449},"--command.ui.snapshot",{"type":39,"tag":1643,"props":6451,"children":6452},{},[6453],{"type":39,"tag":53,"props":6454,"children":6456},{"className":6455},[],[6457],{"type":44,"value":6458},"--command.ui.capture",{"type":39,"tag":1643,"props":6460,"children":6461},{},[6462],{"type":39,"tag":53,"props":6463,"children":6465},{"className":6464},[],[6466],{"type":44,"value":6467},"--command.ui.matches '{\"text\":\"OpenCode\"}'",{"type":39,"tag":1643,"props":6469,"children":6470},{},[6471],{"type":39,"tag":53,"props":6472,"children":6474},{"className":6473},[],[6475],{"type":44,"value":6476},"--command.ui.recording.finish",{"type":39,"tag":47,"props":6478,"children":6479},{},[6480,6482,6488,6490,6496],{"type":44,"value":6481},"Start with ",{"type":39,"tag":53,"props":6483,"children":6485},{"className":6484},[],[6486],{"type":44,"value":6487},"--record",{"type":44,"value":6489}," to record a headless live instance. ",{"type":39,"tag":53,"props":6491,"children":6493},{"className":6492},[],[6494],{"type":44,"value":6495},"stop",{"type":44,"value":6497}," finishes the recording, exports the MP4, performs owner cleanup, and prints the path.",{"type":39,"tag":86,"props":6499,"children":6501},{"className":133,"code":6500,"language":135,"meta":91,"style":91},"opencode-drive start --name demo --record\nopencode-drive stop --name demo\n",[6502],{"type":39,"tag":53,"props":6503,"children":6504},{"__ignoreMap":91},[6505,6529],{"type":39,"tag":141,"props":6506,"children":6507},{"class":143,"line":144},[6508,6512,6516,6520,6524],{"type":39,"tag":141,"props":6509,"children":6510},{"style":148},[6511],{"type":44,"value":4},{"type":39,"tag":141,"props":6513,"children":6514},{"style":154},[6515],{"type":44,"value":5354},{"type":39,"tag":141,"props":6517,"children":6518},{"style":154},[6519],{"type":44,"value":5359},{"type":39,"tag":141,"props":6521,"children":6522},{"style":154},[6523],{"type":44,"value":5364},{"type":39,"tag":141,"props":6525,"children":6526},{"style":154},[6527],{"type":44,"value":6528}," --record\n",{"type":39,"tag":141,"props":6530,"children":6531},{"class":143,"line":27},[6532,6536,6540,6544],{"type":39,"tag":141,"props":6533,"children":6534},{"style":148},[6535],{"type":44,"value":4},{"type":39,"tag":141,"props":6537,"children":6538},{"style":154},[6539],{"type":44,"value":6329},{"type":39,"tag":141,"props":6541,"children":6542},{"style":154},[6543],{"type":44,"value":5359},{"type":39,"tag":141,"props":6545,"children":6546},{"style":154},[6547],{"type":44,"value":6172},{"type":39,"tag":47,"props":6549,"children":6550},{},[6551,6557,6559,6565],{"type":39,"tag":53,"props":6552,"children":6554},{"className":6553},[],[6555],{"type":44,"value":6556},"dir",{"type":44,"value":6558}," prints a live instance's artifact directory, and ",{"type":39,"tag":53,"props":6560,"children":6562},{"className":6561},[],[6563],{"type":44,"value":6564},"list",{"type":44,"value":6566}," lists active instances:",{"type":39,"tag":86,"props":6568,"children":6570},{"className":133,"code":6569,"language":135,"meta":91,"style":91},"opencode-drive dir --name demo\nopencode-drive list\n",[6571],{"type":39,"tag":53,"props":6572,"children":6573},{"__ignoreMap":91},[6574,6594],{"type":39,"tag":141,"props":6575,"children":6576},{"class":143,"line":144},[6577,6581,6586,6590],{"type":39,"tag":141,"props":6578,"children":6579},{"style":148},[6580],{"type":44,"value":4},{"type":39,"tag":141,"props":6582,"children":6583},{"style":154},[6584],{"type":44,"value":6585}," dir",{"type":39,"tag":141,"props":6587,"children":6588},{"style":154},[6589],{"type":44,"value":5359},{"type":39,"tag":141,"props":6591,"children":6592},{"style":154},[6593],{"type":44,"value":6172},{"type":39,"tag":141,"props":6595,"children":6596},{"class":143,"line":27},[6597,6601],{"type":39,"tag":141,"props":6598,"children":6599},{"style":148},[6600],{"type":44,"value":4},{"type":39,"tag":141,"props":6602,"children":6603},{"style":154},[6604],{"type":44,"value":6605}," list\n",{"type":39,"tag":74,"props":6607,"children":6609},{"id":6608},"prune",[6610],{"type":44,"value":6611},"Prune",{"type":39,"tag":47,"props":6613,"children":6614},{},[6615,6620,6622,6627,6628,6633,6635,6641],{"type":39,"tag":53,"props":6616,"children":6618},{"className":6617},[],[6619],{"type":44,"value":6608},{"type":44,"value":6621}," removes inactive artifact directories. To remove one instance's artifacts, pass the instance name supplied to ",{"type":39,"tag":53,"props":6623,"children":6625},{"className":6624},[],[6626],{"type":44,"value":5864},{"type":44,"value":6425},{"type":39,"tag":53,"props":6629,"children":6631},{"className":6630},[],[6632],{"type":44,"value":6032},{"type":44,"value":6634},", not the generated ",{"type":39,"tag":53,"props":6636,"children":6638},{"className":6637},[],[6639],{"type":44,"value":6640},"run-*",{"type":44,"value":6642}," artifact directory name:",{"type":39,"tag":86,"props":6644,"children":6646},{"className":133,"code":6645,"language":135,"meta":91,"style":91},"opencode-drive prune --name demo\n\n# Force removal of all artifact directories, including active ones.\nopencode-drive prune --force\n",[6647],{"type":39,"tag":53,"props":6648,"children":6649},{"__ignoreMap":91},[6650,6670,6677,6686],{"type":39,"tag":141,"props":6651,"children":6652},{"class":143,"line":144},[6653,6657,6662,6666],{"type":39,"tag":141,"props":6654,"children":6655},{"style":148},[6656],{"type":44,"value":4},{"type":39,"tag":141,"props":6658,"children":6659},{"style":154},[6660],{"type":44,"value":6661}," prune",{"type":39,"tag":141,"props":6663,"children":6664},{"style":154},[6665],{"type":44,"value":5359},{"type":39,"tag":141,"props":6667,"children":6668},{"style":154},[6669],{"type":44,"value":6172},{"type":39,"tag":141,"props":6671,"children":6672},{"class":143,"line":27},[6673],{"type":39,"tag":141,"props":6674,"children":6675},{"emptyLinePlaceholder":449},[6676],{"type":44,"value":452},{"type":39,"tag":141,"props":6678,"children":6679},{"class":143,"line":198},[6680],{"type":39,"tag":141,"props":6681,"children":6683},{"style":6682},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[6684],{"type":44,"value":6685},"# Force removal of all artifact directories, including active ones.\n",{"type":39,"tag":141,"props":6687,"children":6688},{"class":143,"line":301},[6689,6693,6697],{"type":39,"tag":141,"props":6690,"children":6691},{"style":148},[6692],{"type":44,"value":4},{"type":39,"tag":141,"props":6694,"children":6695},{"style":154},[6696],{"type":44,"value":6661},{"type":39,"tag":141,"props":6698,"children":6699},{"style":154},[6700],{"type":44,"value":6701}," --force\n",{"type":39,"tag":6703,"props":6704,"children":6705},"style",{},[6706],{"type":44,"value":6707},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":6709,"total":301},[6710,6728,6744,6761],{"slug":6711,"name":6711,"fn":6712,"description":6713,"org":6714,"tags":6715,"stars":6725,"repoUrl":6726,"updatedAt":6727},"opentui","build terminal UIs with OpenTUI","Build terminal UIs with OpenTUI. Covers core, components, audio, keymaps, React, Solid, plugins, testing, standalone executables, QR encoding, SSH, and Three.js WebGPU.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6716,6719,6722],{"name":6717,"slug":6718,"type":16},"Desktop","desktop",{"name":6720,"slug":6721,"type":16},"React","react",{"name":6723,"slug":6724,"type":16},"UI Components","ui-components",12436,"https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fopentui","2026-07-29T05:41:33.249647",{"slug":6729,"name":6729,"fn":6730,"description":6731,"org":6732,"tags":6733,"stars":6741,"repoUrl":6742,"updatedAt":6743},"terminal-control","control and test terminal applications","Drive and verify terminal applications with the termctrl CLI in a real PTY - read visible screens, run named live sessions, send typed keyboard input, wait for text, save evidence, record timelines, and export edited videos. Use when an agent must operate or test a TUI, REPL, interactive CLI, shell process, or OpenTUI application.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6734,6735,6738],{"name":14,"slug":15,"type":16},{"name":6736,"slug":6737,"type":16},"CLI","cli",{"name":6739,"slug":6740,"type":16},"Testing","testing",293,"https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fterminal-control","2026-07-23T05:44:15.921174",{"slug":6745,"name":6745,"fn":6746,"description":6747,"org":6748,"tags":6749,"stars":6758,"repoUrl":6759,"updatedAt":6760},"browser-control","automate browser interactions with Playwright","Drive the user's existing Chromium-family browser with deterministic Playwright. Use when asked to inspect, automate, test, or interact with a visible browser tab; continue an authenticated browser workflow; handle 2FA, passkeys, CAPTCHAs, or payment confirmation; record browser behavior; or capture an authenticated network flow.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6750,6751,6754,6757],{"name":14,"slug":15,"type":16},{"name":6752,"slug":6753,"type":16},"Browser Automation","browser-automation",{"name":6755,"slug":6756,"type":16},"Playwright","playwright",{"name":6739,"slug":6740,"type":16},205,"https:\u002F\u002Fgithub.com\u002Fanomalyco\u002Fbrowser-control","2026-07-23T05:40:34.252936",{"slug":4,"name":4,"fn":5,"description":6,"org":6762,"tags":6763,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6764,6765,6766],{"name":14,"slug":15,"type":16},{"name":21,"slug":22,"type":16},{"name":18,"slug":19,"type":16},{"items":6768,"total":144},[6769],{"slug":4,"name":4,"fn":5,"description":6,"org":6770,"tags":6771,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[6772,6773,6774],{"name":14,"slug":15,"type":16},{"name":21,"slug":22,"type":16},{"name":18,"slug":19,"type":16}]