feat(shell): add env parameter to /v1/shell/exec endpoint#169
Open
Ricardo-M-L wants to merge 1 commit intoagent-infra:mainfrom
Open
feat(shell): add env parameter to /v1/shell/exec endpoint#169Ricardo-M-L wants to merge 1 commit intoagent-infra:mainfrom
Ricardo-M-L wants to merge 1 commit intoagent-infra:mainfrom
Conversation
Add optional `env` parameter to the ShellExecRequest model, allowing callers to pass environment variables that will be merged with the existing process environment during command execution. Similar to Python's subprocess.run env parameter. Changes: - OpenAPI spec: add nullable env field (object with string values) - Python SDK: add env param to sync/async ShellClient and RawShellClient - JS SDK: add env field to ShellExecRequest interface - Tests: comprehensive test suites for both Python and JS SDKs Fixes agent-infra#165 Co-Authored-By: Claude Opus 4.6 (1M context) <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.
Summary
envparameter to the/v1/shell/execendpoint request model, allowing callers to pass environment variables that will be merged with the existing process environment during command executionsubprocess.run(env=...)interface, as requested in the issueChanges
website/docs/public/v1/openapi.jsonenvfield toShellExecRequestschemasdk/python/agent_sandbox/shell/raw_client.pyenvparam to sync/asyncRawShellClient.exec_command()sdk/python/agent_sandbox/shell/client.pyenvparam to sync/asyncShellClient.exec_command()sdk/js/src/api/resources/shell/client/requests/ShellExecRequest.tsenvfield to TS interfacesdk/js/__test__/shell-exec-env.test.tssdk/python/tests/test_shell_exec_env.pyAPI Usage
Test plan
envfield in the request bodyFixes #165
🤖 Generated with Claude Code