fix: add missing shell streaming event types#1771
fix: add missing shell streaming event types#1771fuleinist wants to merge 1 commit intoopenai:masterfrom
Conversation
Adds the following missing streaming event types for the hosted shell tool: - ResponseShellCallCommandAddedEvent - ResponseShellCallCommandDeltaEvent - ResponseShellCallCommandDoneEvent - ResponseShellCallOutputContentDeltaEvent - ResponseShellCallOutputContentDoneEvent Fixes openai#1750
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a1d9f1caf
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| /** | ||
| * Opaque obfuscation token (unused). | ||
| */ | ||
| obfuscation: string; |
There was a problem hiding this comment.
Make shell command obfuscation optional
ResponseShellCallCommandDeltaEvent currently requires obfuscation, but the same file documents stream_options.include_obfuscation as disabling obfuscation fields on streaming delta events. When callers set that flag to false, this event can arrive without obfuscation, so the required string type can mislead SDK users into dereferencing a missing field at runtime; this should be optional to match the wire format.
Useful? React with 👍 / 👎.
Summary
Adds missing streaming event types for the hosted shell tool that are emitted by the API but not currently defined in the SDK.
Changes
ResponseShellCallCommandAddedEvent- fired when a new shell command starts streamingResponseShellCallCommandDeltaEvent- incremental text delta for a shell command being streamedResponseShellCallCommandDoneEvent- fired when a shell command has finished streamingResponseShellCallOutputContentDeltaEvent- incremental delta for shell execution stdout/stderrResponseShellCallOutputContentDoneEvent- fired when a shell command output is completeResponseStreamEventandResponsesServerEventunion types to include these new eventsTesting
Types are based on actual API responses as documented in issue #1750.
Note
I understand that this repository is auto-generated and this PR may not be merged as-is. Submitting to share the fix with the community.
Fixes #1750