Add execute_commands() for command-only execution without agent invocation#19
Merged
vijit-lark merged 2 commits intomainfrom Apr 12, 2026
Merged
Add execute_commands() for command-only execution without agent invocation#19vijit-lark merged 2 commits intomainfrom
vijit-lark merged 2 commits intomainfrom
Conversation
…ation Introduces a new `execute_commands()` method on the RuntimeUse client that runs commands in the runtime environment and returns per-command exit codes without invoking the agent handler. Logs stream in real time via `on_assistant_message`, errors raise `AgentRuntimeError`, and the artifact upload handshake is supported. Wire protocol: new `command_execution_message` (incoming) and `command_execution_result_message` (outgoing) message types. Bumps both packages from 0.7.0 to 0.8.0. Made-with: Cursor
…README Made-with: Cursor
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
execute_commands()client method and corresponding wire protocol (command_execution_message/command_execution_result_message) that runs commands in the runtime environment and returns per-command exit codes without invoking the agent handler.on_assistant_message, error propagation viaAgentRuntimeError, and the full artifact upload handshake.runtimeuse(TS server) andruntimeuse-client-pythonfrom0.7.0→0.8.0.Changes
Server (TypeScript)
types.ts: NewCommandExecutionMessage,CommandExecutionResultItem,CommandExecutionResultMessageinterfaces; updatedIncomingMessage/OutgoingMessageunions.invocation-runner.ts: NewrunCommandsOnly()method; refactoreddownloadRuntimeEnvironmentto accept downloadables directly.session.ts: Routescommand_execution_messageto newexecuteCommandsOnly()handler withArtifactManagersupport.index.ts: Exports new types.invocation-runner.test.ts/session.test.ts: Unit tests for the new flow.Client (Python)
types.py: NewCommandExecutionMessage,CommandResultItem,CommandExecutionResult,CommandExecutionResultMessageInterface,ExecuteCommandsOptionstypes.client.py: Newexecute_commands()method with the same streaming/error/artifact semantics asquery().__init__.py: Exports new types.test_client.py: 10 unit tests withFakeTransport.test/e2e/test_e2e.py: 9 E2E tests covering success, failure, streaming, cancellation, timeout, secrets, and cwd.test/sandbox/test_e2b.py: E2B sandbox integration test forexecute_commands.Test plan
invocation-runner.test.ts,session.test.ts)test_client.py)test_e2e.py)test_e2b.py)Made with Cursor