Skip to content

add env param to command type#20

Merged
jackcbrown89 merged 4 commits into
mainfrom
jb-command-env
Apr 13, 2026
Merged

add env param to command type#20
jackcbrown89 merged 4 commits into
mainfrom
jb-command-env

Conversation

@jackcbrown89
Copy link
Copy Markdown
Contributor

@jackcbrown89 jackcbrown89 commented Apr 13, 2026

Note

Medium Risk
Introduces environment-variable injection into both command execution and agent invocation, which can change runtime behavior and has potential security/secret-handling implications if misused. Scope spans both the TypeScript runtime protocol/types and the Python client serialization/tests.

Overview
Adds environment variable plumbing end-to-end: InvocationMessage now carries agent_env (forwarded to AgentInvocation.env), and Command/CommandInterface now support per-command env.

Updates the TypeScript runtime to merge command env on top of process.env when spawning commands and to pass invocation agent_env into the Claude handler’s SDK options; adds/updates unit tests accordingly. Updates the Python client/types/docs/tests to serialize these new fields and demonstrate usage in query() and execute_commands().

Reviewed by Cursor Bugbot for commit 7d9fba3. Bugbot is set up for automated code reviews on this repo. Configure here.

@jackcbrown89
Copy link
Copy Markdown
Contributor Author

bugbot run

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f87cb20. Configure here.

@jackcbrown89
Copy link
Copy Markdown
Contributor Author

bugbot run

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7d9fba3. Configure here.

Comment thread packages/runtimeuse/src/claude-handler.ts
@jackcbrown89 jackcbrown89 merged commit c4aa7f1 into main Apr 13, 2026
6 checks passed
@jackcbrown89 jackcbrown89 deleted the jb-command-env branch April 13, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant