cloudaxe-opencode/packages/opencode
Kit Langton 75c507f769 refactor(test/cli): migrate serve/acp builders to AppProcess.spawn
Slice 2 of the CLI harness Effect migration. Drops the last raw
Bun.spawn call sites in withCliFixture.

- `serve` and `acp` both move from `Effect.acquireRelease(Bun.spawn(...))`
  to `appProc.spawn(ChildProcess.make(...))`. The spawner's built-in
  acquireRelease finalizer handles SIGTERM on scope close — no manual
  wiring needed.

- `handle.stdout` / `handle.stderr` are already Effect Streams, so the
  `fromBunStream` helper is gone (Stream.fromReadableStream + the
  per-pipe error-tag boilerplate it wrapped).

- acp's stdin moves from imperative `proc.stdin.write` + `proc.stdin.end`
  to a Queue<Uint8Array> fed into the spawner's stdin Sink via
  Stream.fromQueue. `send` is `Queue.offer`, `close` is `Queue.shutdown` —
  shutdown propagates as stdin EOF, which is ACP's graceful-exit signal.

- ServeHandle/AcpHandle public shape: `kill`/`close` become
  Effect<void> and `exited` becomes Effect<number> (was () => void and
  Promise<number>). The platform error that cross-spawn-spawner raises
  on signal-kill is collapsed to exit code -1 so `exited` stays a clean
  Effect<number> — matches the test contract (just needs proof of exit).

Two consuming tests updated to yield the Effect instead of awaiting
the Promise.
2026-05-19 16:19:04 -04:00
..
bin fix(cli): forward signals from npm shim (#26259) 2026-05-08 14:00:51 -05:00
migration chore: generate 2026-05-12 05:20:22 +00:00
script Speed up targeted opencode tests 2026-05-18 16:18:29 +00:00
specs use keymap state for layer visibility (#26246) 2026-05-19 17:07:26 +02:00
src chore: generate 2026-05-19 15:11:40 +00:00
test refactor(test/cli): migrate serve/acp builders to AppProcess.spawn 2026-05-19 16:19:04 -04:00
.gitignore Load models.dev snapshot from build global (#28077) 2026-05-17 21:59:44 -04:00
AGENTS.md refactor(instance): remove legacy runtime fallback (#27757) 2026-05-15 23:05:44 +05:30
BUN_SHELL_MIGRATION_PLAN.md
bunfig.toml
Dockerfile
drizzle.config.ts
git
package.json sync release versions for v1.15.5 2026-05-18 20:57:13 +00:00
parsers-config.ts feat(tui): add syntax highlighting for elixir, fsharp, r, make, vim, xml, agda (#28198) 2026-05-18 13:08:08 -04:00
README.md
sst-env.d.ts
tsconfig.json core: remove @effect/language-service plugin and optimize hot path type performance 2026-04-30 23:21:05 -04:00

js

To install dependencies:

bun install

To run:

bun run index.ts

This project was created using bun init in bun v1.2.12. Bun is a fast all-in-one JavaScript runtime.