mirror of
https://github.com/openai/codex.git
synced 2026-04-24 22:54:54 +00:00
## Summary This PR adds two new optional boolean fields to `ThreadOptions` in the TypeScript SDK: - **`networkAccess`**: Enables network access in the sandbox by setting `sandbox_workspace_write.network_access` config - **`webSearch`**: Enables the web search tool by setting `tools.web_search` config These options map to existing Codex configuration options and are properly threaded through the SDK layers: 1. `ThreadOptions` (threadOptions.ts) - User-facing API 2. `CodexExecArgs` (exec.ts) - Internal execution args 3. CLI flags via `--config` in the `codex exec` command ## Changes - `sdk/typescript/src/threadOptions.ts`: Added `networkAccess` and `webSearch` fields to `ThreadOptions` type - `sdk/typescript/src/exec.ts`: Added fields to `CodexExecArgs` and CLI flag generation - `sdk/typescript/src/thread.ts`: Pass options through to exec layer ## Test Plan - [x] Build succeeds (`pnpm build`) - [x] Linter passes (`pnpm lint`) - [x] Type definitions are properly exported - [ ] Manual testing with sample code (to be done by reviewer) --------- Co-authored-by: Claude <noreply@anthropic.com>