Dashboard › opencode › Distillation
ccc514e8-aa1a-4422-8719-f8be4c5cbb26["lore_tm_v1_4wDHk6i3uifTkWcoA7DE1M9e5ty9k26vz9R75uHuwoI","lore_tm_v1_hp91snVjN565sCr1bFmsCeOKvAOKhAZ6_RIGAAoW9N4","lore_tm_v1_Mim4l2uO1L6qwmjrHjyO5In2cjEk5vw1mmYhFueo-7o","lore_tm_v1_x-r98GU3uODkkQ-BNku6AQsjVT6Pt7_EWAXjHV3P4DA","lore_tm_v1_3NwWash17ReOq_yRdGRdyBSiOmFTRcUpjqtIoEHC73M"]
spawn/spawnSync/execFile-related matches. Non-test/runtime or build-script paths included /home/byk/Code/opencode-v2-pilot/packages/desktop/electron-builder.config.ts:1, packages/desktop/src/main/service/shell-env.ts:1, packages/desktop/src/main/service/desktop-cli.ts:3, packages/desktop/src/main/files/index.ts:3, packages/desktop/src/main/files/apps.ts:1, packages/desktop/src/main/wsl/sidecar.ts:1, packages/desktop/src/main/wsl/runtime.ts:1, packages/desktop/src/main/wsl/local.ts:1, packages/desktop/scripts/dev.ts:57, packages/util/src/cross-spawn-spawner.ts:16, packages/session-ui/performance/highlighting/build.ts:25-26, packages/http-recorder/script/verify-package.ts:8,14, packages/core/src/persistent-pty/daemon.ts:1, packages/tui/src/editor.ts:6, packages/core/script/test.ts:37, packages/core/script/migration.ts:102, packages/client/src/service-contender.ts:1, packages/cli/script/service-smoke.ts:29,107, packages/cli/script/build-node.ts:3, packages/app/e2e/performance/patch-groups/vite.config.ts:5, and packages/app/e2e/performance/devex/desktop-startup.ts:3.packages/sdk/test/import-boundaries.test.ts:26; packages/desktop/test/browser-native.test.ts:37,47,82; packages/desktop/scripts/windows-installer.test.ts:14; packages/util/test/global-roots.test.ts:49; packages/util/test/global.test.ts:14,55; packages/core/test/shell-scan/powershell-runtime.test.ts:344, parity-regressions.test.ts:94, compound-parity.test.ts:116, bash-syntax.test.ts:81,109,233, bash-safety.test.ts:25,213,247, and arithmetic.test.ts:122; packages/core/test/shell-parse-compatibility.test.ts:49; packages/session-ui/src/components/session-diff.test.ts:23; packages/core/test/persistent-pty-daemon.test.ts:2; packages/server/test/fixture/worktree-plugin/index.ts:44; packages/core/test/mcp-import-boundary.test.ts:11; packages/core/test/util/process-lock.test.ts:29; packages/core/test/pty/pty-windows.test.ts:2; packages/core/test/filesystem/search.test.ts:43; packages/core/test/effect/observability.test.ts:58; packages/tui/test/plugin-source.test.ts:238; packages/client/test/import-boundaries.test.ts:54; packages/client/test/fixture/service-fixture.ts:24; packages/cli/test/upgrade.test.ts:77; packages/cli/test/updater-install.test.ts:213; packages/cli/test/standalone.test.ts:9; packages/cli/test/service.test.ts:234,267,298,332,366,413,461,539,546,617; packages/cli/test/mini.test.ts:10; packages/cli/test/import-export.test.ts:48; packages/cli/test/import-boundaries.test.ts:76; packages/cli/test/debug-paths.test.ts:54; packages/cli/test/debug-config.test.ts:74; packages/cli/test/config.test.ts:370,377; packages/cli/test/auth.test.ts:296; packages/cli/test/acp/subprocess.ts:208; packages/cli/test/acp/command.test.ts:13; and packages/app/test-browser/playwright-config.test.ts:10,45,63.ChildProcessSpawner/CrossSpawnSpawner matches. The implementation is centered on /home/byk/Code/opencode-v2-pilot/packages/util/src/process.ts and /home/byk/Code/opencode-v2-pilot/packages/util/src/cross-spawn-spawner.ts; production consumers include packages/core/src/workspace.ts, packages/core/src/ripgrep/binary.ts, packages/core/src/mcp/stdio.ts, packages/core/src/environment/unavailable.ts, packages/core/src/environment/memory.ts, packages/core/src/environment/local.ts, packages/core/src/environment/exec-defaults.ts, packages/core/src/environment/environment.ts, packages/core/src/environment/driver.ts, packages/server/src/workerd.ts, and packages/cli/src/services/standalone.ts.packages/util/src/process.ts:268 exports node = makeGlobalNode({ service: Service, layer: layer, deps: [CrossSpawnSpawner.node] }); packages/util/src/cross-spawn-spawner.ts:545-550 provides the ChildProcessSpawner layer via makeCrossSpawnSpawner with filesystem and path dependencies.ChildProcessSpawner/CrossSpawnSpawner include packages/core/test/tool-read-filesystem.test.ts, packages/core/test/shell-retention.test.ts, packages/core/test/mcp.test.ts, packages/core/test/environment.test.ts, packages/core/test/fixture/environment.ts, packages/core/test/effect/cross-spawn-spawner.test.ts, and packages/cli/test/updater-install.test.ts./home/byk/Code/opencode-v2-pilot/packages/util/src/cross-spawn-spawner.ts imports node:child_process as NodeChildProcess, PassThrough from node:stream, and launch from cross-spawn; its flatten() recursively converts StandardCommand/PipedCommand trees into ordered command and pipe-option arrays and throws "flatten produced empty commands array" if no commands result.cross-spawn-spawner.ts maps Node errors as follows: ENOENT → NotFound, EACCES → PermissionDenied, EEXIST → AlreadyExists, EISDIR/ENOTDIR/ELOOP → BadResource, EBUSY → Busy, and all others → Unknown; toPlatformError() reports module "ChildProcess" and renders pipelines by joining command strings with " | ".makeCrossSpawnSpawner, cwd handling calls fs.access(opts.cwd) then path.resolve(opts.cwd); environment handling either merges globalThis.process.env with opts.env when extendEnv is true or uses opts.env directly.cross-spawn-spawner.ts defaults stdin to { stream: "pipe", encoding: "utf-8", endOnDone: true } and stdout/stderr to { stream: "pipe" }. Effect streams/sinks are represented as Node "pipe" stdio, and Windows converts "pipe" to "overlapped".cross-spawn-spawner.ts are parsed with ChildProcess.parseFdName(), invalid names are omitted, valid descriptors are sorted numerically, gaps from fd 3 through the maximum fd are initialized to "ignore", and configured descriptors are opened as pipes.cross-spawn-spawner.ts:241-267 captures stdout and stderr by immediately piping each readable into a PassThrough, specifically because “Bun resumes stdio on exit” before the lazy Effect reader may attach. The resulting streams are interrupted by stopOutput; absent that deadline, cleanup destroys the original readable. Configured sinks are applied with Stream.transduce(), and combined output is Stream.merge(stdout, stderr)./home/byk/Code/opencode-v2-pilot/packages/util/src/cross-spawn-spawner.ts is at line 274: const proc = launch(command.command, command.args, opts).launchProcess() creates separate closed and exited deferred values. A process "error" fails with toPlatformError("spawn", err, command); "exit" completes exited; "close" idempotently completes both deferreds using the earlier exit tuple when available; "spawn" resumes successfully with [proc, closed, exited]; and interruption sends proc.kill("SIGTERM").spawn() logs "spawning process" with command, args, and cwd, then starts a scoped output deadline before process release. After process exit it waits up to exactly "1 second" for "close"; if close does not arrive, it completes stopOutput and discards stdout/stderr to prevent inherited stdio from detached descendants—examples named in comments are warmed MSBuild processes from dotnet build and agent-browser.discard() in cross-spawn-spawner.ts:322-333 skips absent or destroyed streams, calls unpipe(), drains repeatedly on "readable" until read() returns null, ignores one "error", removes the drain listener on "close", and performs an immediate initial drain.