Home

mweinbach / agent-coworker

publicmweinbach/agent-coworker
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

refactor: run buffered child processes through Bun.spawn execFileCompat

3 months ago

d4b21df
Authored
Cursor Agent7/1/2026, 10:56:13 PM
Phase 3 (part 1) of the Bun-native migration. Adds src/utils/execFileCompat.ts,
a Bun.spawn-backed replacement for the Node execFile contract (per-stream
maxBuffer, timeout SIGTERM with exit 124, AbortSignal with exit 130, ENOENT
as a result code, pipe teardown on kill so grandchildren cannot wedge reads)
with a parity test suite.

Migrates the buffered consumers: bash tool (tool-facing messages unchanged,
verified end-to-end), grep tool (DI contract now promise-based), ripgrep
archive extraction, and cowork runtime verification probes.

Co-authored-by: Max Weinbach <mweinbach@users.noreply.github.com>

Parent84e0824

7 files changed
  • src/coworkRuntime/runtime.ts+26−13
  • src/tools/bash.ts+27−65
  • src/tools/grep.ts+24−46
  • src/utils/execFileCompat.ts+155−0
  • src/utils/ripgrep.ts+9−11
  • test/execFileCompat.test.ts+99−0
  • test/tools/tools.grep.test.ts+25−28