v2 SDK process launchers. Spawns the closedcode binary as a headless HTTP server (createOpencodeServer) or as an interactive TUI (createOpencodeTui), passing configuration via env and forwarding aborts.
Methods
(static) createOpencodeServer(optionsopt) → {Promise.<{url: string, close: function()}>}
Spawn a headless closedcode server process and resolve once it is listening.
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | Server options. Properties
|
The server URL and a close handle.
- Type:
- Promise.<{url: string, close: function()}>
(static) createOpencodeTui(optionsopt) → {Object}
Spawn an interactive closedcode TUI process that inherits the current stdio.
| Name | Type | Attributes | Description | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options | Object | <optional> | TUI options. Properties
|
A handle that terminates the TUI process.
- Type:
- Object