feat(clients/ts): add TypeScript SDK for Sandbox management#300
feat(clients/ts): add TypeScript SDK for Sandbox management#300khirotaka wants to merge 10 commits intokubernetes-sigs:mainfrom
Conversation
- Implement E2E test suite using Vitest - Add TestContext framework for K8s resource management and wait conditions - Port test scenarios from Python (Router/Gateway modes with/without WarmPool) - Integrate TypeScript E2E tests into dev/tools/test-e2e script
- Add unit tests for SandboxClient and ComputerUse extension using Vitest - Mock Kubernetes API, fetch, and port-forwarding logic for isolated testing - Update package.json with test scripts, metadata, and exports configuration - Enhance pod name discovery logic validation in tests
- Use absolute paths in E2E tests for better reliability across different working directories - Fix Kubeconfig and manifest path resolution using import.meta.url - Update package-lock.json with resolved peer dependency flags
…ration - Standardize OpenTelemetry API import logic and add it as a dev dependency - Add null-safety with default values for execution results in ComputerUse extension - Add debug logging for fetch retry attempts in SandboxClient - Ensure non-zero exit code on E2E test failures in dev/tools/test-e2e
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: khirotaka The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
✅ Deploy Preview for agent-sandbox canceled.
|
|
|
|
Welcome @khirotaka! |
|
Hi @khirotaka. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/test presubmit-agent-sandbox-e2e-test |
Summary
clients/typescript/agentic-sandbox-client/) ported from the existing Python SDKSandboxClientwith full lifecycle management:start(),close(),run(),write(),read()ComputerUseSandboxextension withagent()method for agentic task executionSandboxClientandComputerUseSandboxDetails
TypeScript SDK (
clients/typescript/agentic-sandbox-client/)The SDK provides the same capabilities as the Python client:
SandboxClaim, watches forSandboxreadiness, and establishes connectivity (direct API, gateway, or kubectl port-forward). Supports command execution,file upload/download, and automatic cleanup.
agent(query)endpoint for natural language agentic tasks (defaults to port 8080).SandboxClaimannotations.E2E Tests (
test/e2e/clients/typescript/)Four test scenarios exercising the SDK against a real cluster:
Each scenario validates
start()→run()→write()→read()→close()flow.Test Plan
vitestinclients/typescript/agentic-sandbox-client/)make test-e2e)