Repository navigation
Add OpenAI Agents SDK examples with CodexProvider - #24
Merged
Merged
Conversation
|
ScriptedAlchemy
added a commit
that referenced
this pull request
Nov 8, 2025
ScriptedAlchemy
added a commit
that referenced
this pull request
Nov 8, 2025
- Remove duplicate [profile.test-cache] section in Cargo.toml - Add assert_cmd to cargo-shear ignored list (legitimately used in test support crates) - Apply formatting fixes to user_notification.rs 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ScriptedAlchemy
force-pushed
the
chore-ci-rust-pin-G9rgS
branch
from
November 9, 2025 07:16
e53c0de to
c8b6f90
Compare
…ations' (#6425) The TypeScript SDK's README incorrectly claimed that runStreamed() emits "file diffs". However, the FileChangeItem type only contains metadata (path, kind, status) without actual diff content. Updated line 36 to accurately describe the SDK as providing "file change notifications" instead of "file diffs" to match the actual implementation in items.ts. Fixes #5850
Allow reading `hw.physicalcpu` so numpy can be imported when running in the sandbox. resolves #6420
ScriptedAlchemy
force-pushed
the
chore-ci-rust-pin-G9rgS
branch
3 times, most recently
from
November 9, 2025 19:20
61d7f8a to
fc25d8b
Compare
…ive build+tests; fix TUI ANSI test env\n\n- Expose minimal core APIs for native tools/interceptors\n- Integrate pending tool registrations into specs\n- Add exec callback runner for ThreadEvent streaming\n- Include sdk/native in pnpm workspace and CI\n- Re-enable TUI vt100 color checks in tests
ScriptedAlchemy
force-pushed
the
chore-ci-rust-pin-G9rgS
branch
from
November 9, 2025 21:31
df40a57 to
f19d76c
Compare
… stream event mapping - Pretest runs to ensure .node is present - Jest config: TS-first via babel-jest; ESM-friendly - CodexProvider: emit response_started first; forward raw_event correctly; include Responses-style deltas/completion - Native loader: prefer env override; ensure local-first - Add approval callback surface; tool interceptors - Remove duplicate .mjs tests; keep TS tests only - Update tests to use responses proxy helpers; stabilize assertions
Fixes session_id handling for completed exec commands by checking both exit_code and has_exited() status before deciding whether to persist session. Resolves test failure in exec_command_reports_chunk_and_exit_metadata. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Resolved conflicts by accepting ours for all codex-rs files and most other files to preserve current branch changes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…persist live sessions core(registry): add upsert_spec_with_parallel_support for external tool overrides core(tools/spec): remove duplicate create_function_tool_spec_from_schema and unify implementation
Add comprehensive NAPI concepts documentation including: - Async functions and tasks - Classes and enums - Environment and exports - External references - Functions and objects - Promises and threadsafe functions - Typed arrays and values - WebAssembly integration - Naming conventions and lifetime management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove sccache wrapper and related configuration to simplify CI builds and improve reproducibility. The overhead of managing sccache cache invalidation outweighs the benefits for this repository structure. Changes: - Remove RUSTC_WRAPPER=sccache from rust-ci.yml workflows - Remove sccache npm scripts from root package.json - Keep CARGO_INCREMENTAL=0 for reproducible builds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The codespell GitHub Action expects a .codespellignore file to exist when ignore_words_file is specified in the workflow. Add an empty file to satisfy this requirement. Actual ignore configuration is handled via .codespellrc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Remove rustc-wrapper = "sccache" from cargo config to fix CI builds. The SDK workflow was failing because cargo was trying to use sccache as a compiler wrapper even though it wasn't installed. This completes the sccache removal started in previous commits. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add rustfmt and clippy components to Rust toolchain installation in SDK workflow. The native SDK build requires cargo fmt and cargo clippy to be available. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add new event types to TypeScript SDK: - RawEvent: Unstructured raw events for diagnostics - TokenCountEvent: Token usage snapshots during turns - TokenUsageEvent: Token usage at shutdown These events are filtered out in Thread class to maintain backward compatibility while allowing for future diagnostics. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Restore RUSTC_WRAPPER and SCCACHE_CACHE_SIZE environment variables to match upstream (openai/codex) configuration for optimal CI performance. This enables the existing sccache infrastructure. Changes: - Add RUSTC_WRAPPER=sccache to rust-ci.yml (lint_build + tests jobs) - Add SCCACHE_CACHE_SIZE=10G to rust-ci.yml - Add Rust dependency caching to sdk.yml workflow This will provide ~30-50% faster CI builds on cache hits by caching compiled objects, not just dependencies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add full sccache configuration to SDK workflow to match rust-ci.yml: - Set RUSTC_WRAPPER=sccache environment variable - Install sccache@0.7.5 via taiki-e/install-action - Configure sccache backend (GitHub Actions cache or local fallback) - Add sccache cache restore/save steps - Add sccache stats reporting This provides compilation object caching for the cargo build steps in addition to the existing Rust dependency caching, significantly speeding up CI runs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Increase SDK workflow timeout from 10 to 30 minutes to accommodate native SDK builds which require more time for Rust compilation. Also restore missing RUSTC_WRAPPER and SCCACHE_CACHE_SIZE environment variables that were accidentally removed. The previous run timed out after 10m02s while still compiling. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove sdk- prefix from cache keys (sccache, cargo-home, cargo-target) - Add rust-toolchain.toml hash to cargo-home cache keys - Add cache-hit conditions to save steps to prevent redundant saves - Add continue-on-error to cargo save operations - Use runner.os for flexibility across runners This enables cache sharing between sdk and rust-ci workflows when they run on the same platform, reducing build times and cache storage. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ScriptedAlchemy
added a commit
that referenced
this pull request
Nov 10, 2025
* Fix SDK documentation: replace 'file diffs' with 'file change notifications' (#6425) The TypeScript SDK's README incorrectly claimed that runStreamed() emits "file diffs". However, the FileChangeItem type only contains metadata (path, kind, status) without actual diff content. Updated line 36 to accurately describe the SDK as providing "file change notifications" instead of "file diffs" to match the actual implementation in items.ts. Fixes #5850 * fix(seatbelt): Allow reading hw.physicalcpu (#6421) Allow reading `hw.physicalcpu` so numpy can be imported when running in the sandbox. resolves #6420 * feat(native): add sdk/native and minimal core/exec shims; CI runs native build+tests; fix TUI ANSI test env\n\n- Expose minimal core APIs for native tools/interceptors\n- Integrate pending tool registrations into specs\n- Add exec callback runner for ThreadEvent streaming\n- Include sdk/native in pnpm workspace and CI\n- Re-enable TUI vt100 color checks in tests * sdk/native: always build N-API before Jest; unify TS test runner; fix stream event mapping - Pretest runs to ensure .node is present - Jest config: TS-first via babel-jest; ESM-friendly - CodexProvider: emit response_started first; forward raw_event correctly; include Responses-style deltas/completion - Native loader: prefer env override; ensure local-first - Add approval callback surface; tool interceptors - Remove duplicate .mjs tests; keep TS tests only - Update tests to use responses proxy helpers; stabilize assertions * fix(core): clear session_id when exec command completes Fixes session_id handling for completed exec commands by checking both exit_code and has_exited() status before deciding whether to persist session. Resolves test failure in exec_command_reports_chunk_and_exit_metadata. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * core(unified_exec): omit session_id for completed exec_command; only persist live sessions core(registry): add upsert_spec_with_parallel_support for external tool overrides core(tools/spec): remove duplicate create_function_tool_spec_from_schema and unify implementation * chore: sync core tool registry and native sdk * Restore native tool bridge and approvals * docs: add NAPI concepts documentation Add comprehensive NAPI concepts documentation including: - Async functions and tasks - Classes and enums - Environment and exports - External references - Functions and objects - Promises and threadsafe functions - Typed arrays and values - WebAssembly integration - Naming conventions and lifetime management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Prune generated artifacts and streamline CI * Tighten native build flags * chore: remove sccache configuration from CI and package scripts Remove sccache wrapper and related configuration to simplify CI builds and improve reproducibility. The overhead of managing sccache cache invalidation outweighs the benefits for this repository structure. Changes: - Remove RUSTC_WRAPPER=sccache from rust-ci.yml workflows - Remove sccache npm scripts from root package.json - Keep CARGO_INCREMENTAL=0 for reproducible builds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Remove sccache-specific tuning * fix: add empty .codespellignore file for CI The codespell GitHub Action expects a .codespellignore file to exist when ignore_words_file is specified in the workflow. Add an empty file to satisfy this requirement. Actual ignore configuration is handled via .codespellrc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: remove sccache from cargo config Remove rustc-wrapper = "sccache" from cargo config to fix CI builds. The SDK workflow was failing because cargo was trying to use sccache as a compiler wrapper even though it wasn't installed. This completes the sccache removal started in previous commits. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix(ci): install rustfmt and clippy for SDK workflow Add rustfmt and clippy components to Rust toolchain installation in SDK workflow. The native SDK build requires cargo fmt and cargo clippy to be available. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * fix: recreate .codespellignore for CI * feat(sdk): add token count and raw event types Add new event types to TypeScript SDK: - RawEvent: Unstructured raw events for diagnostics - TokenCountEvent: Token usage snapshots during turns - TokenUsageEvent: Token usage at shutdown These events are filtered out in Thread class to maintain backward compatibility while allowing for future diagnostics. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * chore(ci): restore sccache configuration to match upstream Restore RUSTC_WRAPPER and SCCACHE_CACHE_SIZE environment variables to match upstream (openai/codex) configuration for optimal CI performance. This enables the existing sccache infrastructure. Changes: - Add RUSTC_WRAPPER=sccache to rust-ci.yml (lint_build + tests jobs) - Add SCCACHE_CACHE_SIZE=10G to rust-ci.yml - Add Rust dependency caching to sdk.yml workflow This will provide ~30-50% faster CI builds on cache hits by caching compiled objects, not just dependencies. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * feat(ci): add sccache to SDK workflow Add full sccache configuration to SDK workflow to match rust-ci.yml: - Set RUSTC_WRAPPER=sccache environment variable - Install sccache@0.7.5 via taiki-e/install-action - Configure sccache backend (GitHub Actions cache or local fallback) - Add sccache cache restore/save steps - Add sccache stats reporting This provides compilation object caching for the cargo build steps in addition to the existing Rust dependency caching, significantly speeding up CI runs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * ci(sdk): remove sccache usage and increase timeout to 20m * ci(sdk): align cargo cache with rust-ci (split home/target, restore/save) * ci(sdk): increase timeout to 30 minutes * fix(ci): increase SDK workflow timeout and restore sccache env vars Increase SDK workflow timeout from 10 to 30 minutes to accommodate native SDK builds which require more time for Rust compilation. Also restore missing RUSTC_WRAPPER and SCCACHE_CACHE_SIZE environment variables that were accidentally removed. The previous run timed out after 10m02s while still compiling. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * ci(sdk): install and configure sccache like rust-ci; add restore/save + stats * ci(sdk): align cache keys with rust-ci pattern for better cache sharing - Remove sdk- prefix from cache keys (sccache, cargo-home, cargo-target) - Add rust-toolchain.toml hash to cargo-home cache keys - Add cache-hit conditions to save steps to prevent redundant saves - Add continue-on-error to cargo save operations - Use runner.os for flexibility across runners This enables cache sharing between sdk and rust-ci workflows when they run on the same platform, reducing build times and cache storage. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Raduan A. <36044389+0xRaduan@users.noreply.github.com> Co-authored-by: Oliver Mannion <125105+tekumara@users.noreply.github.com> Co-authored-by: codex-bot <devnull@example.com> Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds comprehensive examples demonstrating how to use CodexProvider with the OpenAI Agents framework.
New Examples Added
Key Features
Testing
All examples have been tested and verified to work:
Based on OpenAI Agents SDK documentation: https://openai.github.io/openai-agents-js/