Skip to content

feat: add process management API#203

Merged
NathanFlurry merged 5 commits intomainfrom
feat/processes
Mar 6, 2026
Merged

feat: add process management API#203
NathanFlurry merged 5 commits intomainfrom
feat/processes

Conversation

@NathanFlurry
Copy link
Member

Summary

Introduces a complete Process Management API for Sandbox Agent including process lifecycle management (start, stop, kill, delete), one-shot command execution, log streaming via SSE and WebSocket, stdin input, and PTY/terminal support.

Changes

  • New process_runtime module managing process state with concurrency limits and configurable timeouts
  • 13 new HTTP endpoints under /v1/processes/* for process control and monitoring
  • WebSocket support for interactive terminal sessions with PTY allocation
  • Full integration test coverage with real server spawning
  • Updated OpenAPI documentation and dependencies (axum WebSocket support)

Scope

Adds 4,300+ lines of implementation and tests across process runtime, router handlers, API types, and integration tests.

Introduces a complete Process Management API for Sandbox Agent with process lifecycle management (start, stop, kill, delete), one-shot command execution, log streaming via SSE and WebSocket, stdin input, and PTY/terminal support. Includes new process_runtime module for managing process state, HTTP route handlers, OpenAPI documentation, and integration tests.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@railway-app railway-app bot temporarily deployed to sandbox-agent / sandbox-agent-pr-203 March 5, 2026 23:44 Destroyed
@railway-app
Copy link

railway-app bot commented Mar 5, 2026

🚅 Deployed to the sandbox-agent-pr-203 environment in sandbox-agent

Service Status Web Updated (UTC)
website 😴 Sleeping (View Logs) Web Mar 6, 2026 at 2:09 am

- Add doc comments to all 13 new #[utoipa::path] handlers (CLAUDE.md compliance)
- Fix send_signal ESRCH check: use raw_os_error() == Some(libc::ESRCH) instead of ErrorKind::NotFound
- Add max_input_bytes_per_request enforcement in WebSocket terminal handler
- URL-decode access_token query parameter for WebSocket auth
- Replace fragile string prefix matching with proper SandboxError::NotFound variant

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@railway-app railway-app bot temporarily deployed to sandbox-agent / sandbox-agent-pr-203 March 5, 2026 23:51 Destroyed
Add process CRUD operations (create, get, list, update, delete) and
event streaming to the TypeScript SDK. Includes integration tests,
mock agent updates, and test environment fixes for cross-platform
home directory handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@railway-app railway-app bot temporarily deployed to sandbox-agent / sandbox-agent-pr-203 March 6, 2026 01:53 Destroyed
Adopt main's refactored prepareMockAgentDataHome that returns
platform-aware env vars via candidateInstallDirs, and use the
returned agentEnv in integration tests. Remove duplicate
installDirsForDataHome helper.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@railway-app railway-app bot temporarily deployed to sandbox-agent / sandbox-agent-pr-203 March 6, 2026 01:55 Destroyed
Node 20 lacks globalThis.WebSocket. Add ws as a devDependency and
pass it to connectProcessTerminalWebSocket in the integration test
so CI no longer fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@railway-app railway-app bot temporarily deployed to sandbox-agent / sandbox-agent-pr-203 March 6, 2026 02:01 Destroyed
@NathanFlurry NathanFlurry merged commit 4335ef6 into main Mar 6, 2026
4 checks passed
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