mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
Add js_repl cwd and homeDir helpers (#14385)
## Summary This PR adds two read-only path helpers to `js_repl`: - `codex.cwd` - `codex.homeDir` They are exposed alongside the existing `codex.tmpDir` helper so the REPL can reference basic host path context without reopening direct `process` access. ## Implementation - expose `codex.cwd` and `codex.homeDir` from the js_repl kernel - make `codex.homeDir` come from the kernel process environment - pass session dependency env through js_repl kernel startup so `codex.homeDir` matches the env a shell-launched process would see - keep existing shell `HOME` population behavior unchanged - update js_repl prompt/docs and add runtime/integration coverage for the new helpers
This commit is contained in:
committed by
GitHub
parent
5259e5e236
commit
5a89660ae4
@@ -74,6 +74,8 @@ imported local file. They are not resolved relative to the imported file's locat
|
||||
|
||||
`js_repl` exposes these globals:
|
||||
|
||||
- `codex.cwd`: REPL working directory path.
|
||||
- `codex.homeDir`: effective home directory path from the kernel environment.
|
||||
- `codex.tmpDir`: per-session scratch directory path.
|
||||
- `codex.tool(name, args?)`: executes a normal Codex tool call from inside `js_repl` (including shell tools like `shell` / `shell_command` when available).
|
||||
- `codex.emitImage(imageLike)`: explicitly adds one image to the outer `js_repl` function output each time you call it.
|
||||
|
||||
Reference in New Issue
Block a user