refactor(coding-agent/eval): removed eval shell run helpers from JS and Python preludes

- Removed the JS and Python eval prelude `run` helpers, including their shell execution and timeout/cwd option handling.
- Updated the JS VM helper set to expose `Bun` and removed the deleted `run` entry from the prelude.
- Revised eval docs to drop `run` from the helper surface and note the new JS `Bun` global.
This commit is contained in:
can1357
2026-05-12 05:43:37 +02:00
parent a4d86a075a
commit 7d233725b6
5 changed files with 4 additions and 120 deletions
+1 -3
View File
@@ -129,7 +129,7 @@ Implemented in `packages/coding-agent/src/eval/js/context-manager.ts` and `packa
- Top-level static `import ... from ...` is rewritten to `await import(...)` by `rewriteStaticImports()`
- The prelude installs globals:
- `display`, `print`
- `read`, `write`, `append`, `sort`, `uniq`, `counter`, `diff`, `tree`, `run`, `env`, `output`
- `read`, `write`, `append`, `sort`, `uniq`, `counter`, `diff`, `tree`, `env`, `output`
- `tool.<name>(args)` proxy for arbitrary session tool calls
- JS helpers are async because they cross the VM/tool boundary
- `display(value)` behavior:
@@ -183,8 +183,6 @@ A single tool call can mix Python and JS cells. Persistence is per language runt
- Subprocesses / native bindings
- Python availability check runs `<python> -c ...`.
- Python backend may start or connect to a kernel gateway; details are in `docs/python-repl.md`.
- JS `run()` helper spawns `bash -lc <command>` via `Bun.spawn`.
- Python `run()` helper spawns `bash` or `sh` via `subprocess.Popen`.
- Session state
- `session.assertEvalExecutionAllowed?.()` can block execution.
- `session.trackEvalExecution?.(...)` can register cancellable eval work.