This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
---
|
||||
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.ts`** wraps `child_process.spawn` with `Deno.Command`'s API:
|
||||
`output()` and `spawn()`, `clearEnv`, `uid`/`gid` (the agent isolation runs
|
||||
each profile as its own UID, 20000+), and Deno's stdio defaults: stdin
|
||||
inherited; stdout/stderr piped for `output()`, inherited for `spawn()`. A
|
||||
signal exit maps to status `128 + signo`. Status settles on process exit,
|
||||
not on stream close. Use it instead of calling `node:child_process`
|
||||
directly so isolation and status handling stay uniform.
|
||||
- **`src/errors.ts`** replaces `Deno.errors.NotFound` checks with an
|
||||
`ENOENT`/`ESRCH` code check.
|
||||
- `makeTempFile` became an exclusive `wx` create with mode `0600`.
|
||||
- `src/json.ts` holds type guards used instead of `as` casts on parsed JSON.
|
||||
- `process` and `Buffer` must come from `node:` imports:
|
||||
`no-restricted-globals` in `scripts/project-lint.ts` maps Deno's
|
||||
`no-window`/`no-process-global`/`no-node-globals` there
|
||||
([[lint-parity-never-shrinks]]).
|
||||
|
||||
Related: how each agent CLI reports bad credentials is in
|
||||
[[agent-cli-auth-failures]].
|
||||
Reference in New Issue
Block a user