1.3 KiB
1.3 KiB
description
| description |
|---|
| src/command.ts reproduces Deno.Command on child_process.spawn (stdio defaults, clearEnv, uid/gid, 128+signo); src/errors.ts maps NotFound to ENOENT/ESRCH |
The Deno code was ported one for one; two small modules keep the old shapes so callers barely changed:
src/command.tswrapschild_process.spawnwithDeno.Command's API:output()andspawn(),clearEnv,uid/gid(the agent isolation runs each profile as its own UID, 20000+), and Deno's stdio defaults: stdin inherited; stdout/stderr piped foroutput(), inherited forspawn(). A signal exit maps to status128 + signo. Status settles on process exit, not on stream close. Use it instead of callingnode:child_processdirectly so isolation and status handling stay uniform.src/errors.tsreplacesDeno.errors.NotFoundchecks with anENOENT/ESRCHcode check.makeTempFilebecame an exclusivewxcreate with mode0600.src/json.tsholds type guards used instead ofascasts on parsed JSON.processandBuffermust come fromnode:imports:no-restricted-globalsinscripts/project-lint.tsmaps Deno'sno-window/no-process-global/no-node-globalsthere (lint-parity-never-shrinks).
Related: how each agent CLI reports bad credentials is in agent-cli-auth-failures.