Skip to content

An open-source, faster Devin alternative

TypeScript

podmn

motatoes7a303a638665
diff --git a/.dockerignore b/archive/process-level/.dockerignore
similarity index 100%
rename from .dockerignore
rename to archive/process-level/.dockerignore
diff --git a/.gitignore b/archive/process-level/.gitignore
similarity index 100%
rename from .gitignore
rename to archive/process-level/.gitignore
diff --git a/Cargo.lock b/archive/process-level/Cargo.lock
similarity index 100%
rename from Cargo.lock
rename to archive/process-level/Cargo.lock
diff --git a/Cargo.toml b/archive/process-level/Cargo.toml
similarity index 100%
rename from Cargo.toml
rename to archive/process-level/Cargo.toml
diff --git a/Dockerfile b/archive/process-level/Dockerfile
similarity index 100%
rename from Dockerfile
rename to archive/process-level/Dockerfile
diff --git a/README.md b/archive/process-level/README.md
similarity index 100%
rename from README.md
rename to archive/process-level/README.md
diff --git a/benchmarks/.gitignore b/archive/process-level/benchmarks/.gitignore
similarity index 100%
rename from benchmarks/.gitignore
rename to archive/process-level/benchmarks/.gitignore
diff --git a/benchmarks/README.md b/archive/process-level/benchmarks/README.md
similarity index 100%
rename from benchmarks/README.md
rename to archive/process-level/benchmarks/README.md
diff --git a/benchmarks/benchmark_commands.py b/archive/process-level/benchmarks/benchmark_commands.py
similarity index 100%
rename from benchmarks/benchmark_commands.py
rename to archive/process-level/benchmarks/benchmark_commands.py
diff --git a/benchmarks/benchmark_concurrency.py b/archive/process-level/benchmarks/benchmark_concurrency.py
similarity index 100%
rename from benchmarks/benchmark_concurrency.py
rename to archive/process-level/benchmarks/benchmark_concurrency.py
diff --git a/benchmarks/benchmark_creation.py b/archive/process-level/benchmarks/benchmark_creation.py
similarity index 100%
rename from benchmarks/benchmark_creation.py
rename to archive/process-level/benchmarks/benchmark_creation.py
diff --git a/benchmarks/benchmark_files.py b/archive/process-level/benchmarks/benchmark_files.py
similarity index 100%
rename from benchmarks/benchmark_files.py
rename to archive/process-level/benchmarks/benchmark_files.py
diff --git a/benchmarks/benchmark_workflow.py b/archive/process-level/benchmarks/benchmark_workflow.py
similarity index 100%
rename from benchmarks/benchmark_workflow.py
rename to archive/process-level/benchmarks/benchmark_workflow.py
diff --git a/benchmarks/quick_test.py b/archive/process-level/benchmarks/quick_test.py
similarity index 100%
rename from benchmarks/quick_test.py
rename to archive/process-level/benchmarks/quick_test.py
diff --git a/benchmarks/requirements.txt b/archive/process-level/benchmarks/requirements.txt
similarity index 100%
rename from benchmarks/requirements.txt
rename to archive/process-level/benchmarks/requirements.txt
diff --git a/benchmarks/run_benchmarks.py b/archive/process-level/benchmarks/run_benchmarks.py
similarity index 100%
rename from benchmarks/run_benchmarks.py
rename to archive/process-level/benchmarks/run_benchmarks.py
diff --git a/benchmarks/sandbox_interface.py b/archive/process-level/benchmarks/sandbox_interface.py
similarity index 100%
rename from benchmarks/sandbox_interface.py
rename to archive/process-level/benchmarks/sandbox_interface.py
diff --git a/build.rs b/archive/process-level/build.rs
similarity index 100%
rename from build.rs
rename to archive/process-level/build.rs
diff --git a/docker-compose.yml b/archive/process-level/docker-compose.yml
similarity index 100%
rename from docker-compose.yml
rename to archive/process-level/docker-compose.yml
diff --git a/examples/claude-agent-sdk-test/.env.example b/archive/process-level/examples/claude-agent-sdk-test/.env.example
similarity index 100%
rename from examples/claude-agent-sdk-test/.env.example
rename to archive/process-level/examples/claude-agent-sdk-test/.env.example
diff --git a/examples/claude-agent-sdk-test/Dockerfile b/archive/process-level/examples/claude-agent-sdk-test/Dockerfile
similarity index 100%
rename from examples/claude-agent-sdk-test/Dockerfile
rename to archive/process-level/examples/claude-agent-sdk-test/Dockerfile
diff --git a/examples/claude-agent-sdk-test/Dockerfile.full b/archive/process-level/examples/claude-agent-sdk-test/Dockerfile.full
similarity index 100%
rename from examples/claude-agent-sdk-test/Dockerfile.full
rename to archive/process-level/examples/claude-agent-sdk-test/Dockerfile.full
diff --git a/examples/claude-agent-sdk-test/compare_e2b.py b/archive/process-level/examples/claude-agent-sdk-test/compare_e2b.py
similarity index 100%
rename from examples/claude-agent-sdk-test/compare_e2b.py
rename to archive/process-level/examples/claude-agent-sdk-test/compare_e2b.py
diff --git a/examples/claude-agent-sdk-test/docker-compose.yml b/archive/process-level/examples/claude-agent-sdk-test/docker-compose.yml
similarity index 100%
rename from examples/claude-agent-sdk-test/docker-compose.yml
rename to archive/process-level/examples/claude-agent-sdk-test/docker-compose.yml
diff --git a/examples/claude-agent-sdk-test/requirements.txt b/archive/process-level/examples/claude-agent-sdk-test/requirements.txt
similarity index 100%
rename from examples/claude-agent-sdk-test/requirements.txt
rename to archive/process-level/examples/claude-agent-sdk-test/requirements.txt
diff --git a/examples/claude-agent-sdk-test/run.sh b/archive/process-level/examples/claude-agent-sdk-test/run.sh
similarity index 100%
rename from examples/claude-agent-sdk-test/run.sh
rename to archive/process-level/examples/claude-agent-sdk-test/run.sh
diff --git a/examples/claude-agent-sdk-test/test_agent.py b/archive/process-level/examples/claude-agent-sdk-test/test_agent.py
similarity index 100%
rename from examples/claude-agent-sdk-test/test_agent.py
rename to archive/process-level/examples/claude-agent-sdk-test/test_agent.py
diff --git a/examples/claude-chat/.env.example b/archive/process-level/examples/claude-chat/.env.example
similarity index 100%
rename from examples/claude-chat/.env.example
rename to archive/process-level/examples/claude-chat/.env.example
diff --git a/examples/claude-chat/Dockerfile b/archive/process-level/examples/claude-chat/Dockerfile
similarity index 100%
rename from examples/claude-chat/Dockerfile
rename to archive/process-level/examples/claude-chat/Dockerfile
diff --git a/examples/claude-chat/app.py b/archive/process-level/examples/claude-chat/app.py
similarity index 100%
rename from examples/claude-chat/app.py
rename to archive/process-level/examples/claude-chat/app.py
diff --git a/examples/claude-chat/docker-compose.yml b/archive/process-level/examples/claude-chat/docker-compose.yml
similarity index 100%
rename from examples/claude-chat/docker-compose.yml
rename to archive/process-level/examples/claude-chat/docker-compose.yml
diff --git a/examples/claude-chat/requirements.txt b/archive/process-level/examples/claude-chat/requirements.txt
similarity index 100%
rename from examples/claude-chat/requirements.txt
rename to archive/process-level/examples/claude-chat/requirements.txt
diff --git a/examples/claude-chat/static/index.html b/archive/process-level/examples/claude-chat/static/index.html
similarity index 100%
rename from examples/claude-chat/static/index.html
rename to archive/process-level/examples/claude-chat/static/index.html
diff --git a/examples/code-agent/.env.example b/archive/process-level/examples/code-agent/.env.example
similarity index 100%
rename from examples/code-agent/.env.example
rename to archive/process-level/examples/code-agent/.env.example
diff --git a/examples/code-agent/.gitignore b/archive/process-level/examples/code-agent/.gitignore
similarity index 100%
rename from examples/code-agent/.gitignore
rename to archive/process-level/examples/code-agent/.gitignore
diff --git a/examples/code-agent/Dockerfile b/archive/process-level/examples/code-agent/Dockerfile
similarity index 100%
rename from examples/code-agent/Dockerfile
rename to archive/process-level/examples/code-agent/Dockerfile
diff --git a/examples/code-agent/README.md b/archive/process-level/examples/code-agent/README.md
similarity index 100%
rename from examples/code-agent/README.md
rename to archive/process-level/examples/code-agent/README.md
diff --git a/examples/code-agent/docker-compose.yml b/archive/process-level/examples/code-agent/docker-compose.yml
similarity index 100%
rename from examples/code-agent/docker-compose.yml
rename to archive/process-level/examples/code-agent/docker-compose.yml
diff --git a/examples/code-agent/requirements.txt b/archive/process-level/examples/code-agent/requirements.txt
similarity index 100%
rename from examples/code-agent/requirements.txt
rename to archive/process-level/examples/code-agent/requirements.txt
diff --git a/examples/code-agent/run_api.py b/archive/process-level/examples/code-agent/run_api.py
similarity index 100%
rename from examples/code-agent/run_api.py
rename to archive/process-level/examples/code-agent/run_api.py
diff --git a/examples/code-agent/run_ui.py b/archive/process-level/examples/code-agent/run_ui.py
similarity index 100%
rename from examples/code-agent/run_ui.py
rename to archive/process-level/examples/code-agent/run_ui.py
diff --git a/examples/code-agent/src/__init__.py b/archive/process-level/examples/code-agent/src/__init__.py
similarity index 100%
rename from examples/code-agent/src/__init__.py
rename to archive/process-level/examples/code-agent/src/__init__.py
diff --git a/examples/code-agent/src/agent/__init__.py b/archive/process-level/examples/code-agent/src/agent/__init__.py
similarity index 100%
rename from examples/code-agent/src/agent/__init__.py
rename to archive/process-level/examples/code-agent/src/agent/__init__.py
diff --git a/examples/code-agent/src/agent/graph.py b/archive/process-level/examples/code-agent/src/agent/graph.py
similarity index 100%
rename from examples/code-agent/src/agent/graph.py
rename to archive/process-level/examples/code-agent/src/agent/graph.py
diff --git a/examples/code-agent/src/agent/nodes.py b/archive/process-level/examples/code-agent/src/agent/nodes.py
similarity index 100%
rename from examples/code-agent/src/agent/nodes.py
rename to archive/process-level/examples/code-agent/src/agent/nodes.py
diff --git a/examples/code-agent/src/agent/state.py b/archive/process-level/examples/code-agent/src/agent/state.py
similarity index 100%
rename from examples/code-agent/src/agent/state.py
rename to archive/process-level/examples/code-agent/src/agent/state.py
diff --git a/examples/code-agent/src/api/__init__.py b/archive/process-level/examples/code-agent/src/api/__init__.py
similarity index 100%
rename from examples/code-agent/src/api/__init__.py
rename to archive/process-level/examples/code-agent/src/api/__init__.py
diff --git a/examples/code-agent/src/api/server.py b/archive/process-level/examples/code-agent/src/api/server.py
similarity index 100%
rename from examples/code-agent/src/api/server.py
rename to archive/process-level/examples/code-agent/src/api/server.py
diff --git a/examples/code-agent/src/config.py b/archive/process-level/examples/code-agent/src/config.py
similarity index 100%
rename from examples/code-agent/src/config.py
rename to archive/process-level/examples/code-agent/src/config.py
diff --git a/examples/code-agent/src/indexer/__init__.py b/archive/process-level/examples/code-agent/src/indexer/__init__.py
similarity index 100%
rename from examples/code-agent/src/indexer/__init__.py
rename to archive/process-level/examples/code-agent/src/indexer/__init__.py
diff --git a/examples/code-agent/src/indexer/chunker.py b/archive/process-level/examples/code-agent/src/indexer/chunker.py
similarity index 100%
rename from examples/code-agent/src/indexer/chunker.py
rename to archive/process-level/examples/code-agent/src/indexer/chunker.py
diff --git a/examples/code-agent/src/indexer/embeddings.py b/archive/process-level/examples/code-agent/src/indexer/embeddings.py
similarity index 100%
rename from examples/code-agent/src/indexer/embeddings.py
rename to archive/process-level/examples/code-agent/src/indexer/embeddings.py
diff --git a/examples/code-agent/src/indexer/faiss_store.py b/archive/process-level/examples/code-agent/src/indexer/faiss_store.py
similarity index 100%
rename from examples/code-agent/src/indexer/faiss_store.py
rename to archive/process-level/examples/code-agent/src/indexer/faiss_store.py
diff --git a/examples/code-agent/src/indexer/repo_manager.py b/archive/process-level/examples/code-agent/src/indexer/repo_manager.py
similarity index 100%
rename from examples/code-agent/src/indexer/repo_manager.py
rename to archive/process-level/examples/code-agent/src/indexer/repo_manager.py
diff --git a/examples/code-agent/src/llm/__init__.py b/archive/process-level/examples/code-agent/src/llm/__init__.py
similarity index 100%
rename from examples/code-agent/src/llm/__init__.py
rename to archive/process-level/examples/code-agent/src/llm/__init__.py
diff --git a/examples/code-agent/src/llm/provider.py b/archive/process-level/examples/code-agent/src/llm/provider.py
similarity index 100%
rename from examples/code-agent/src/llm/provider.py
rename to archive/process-level/examples/code-agent/src/llm/provider.py
diff --git a/examples/code-agent/src/models.py b/archive/process-level/examples/code-agent/src/models.py
similarity index 100%
rename from examples/code-agent/src/models.py
rename to archive/process-level/examples/code-agent/src/models.py
diff --git a/examples/code-agent/src/sandbox/__init__.py b/archive/process-level/examples/code-agent/src/sandbox/__init__.py
similarity index 100%
rename from examples/code-agent/src/sandbox/__init__.py
rename to archive/process-level/examples/code-agent/src/sandbox/__init__.py
diff --git a/examples/code-agent/src/sandbox/base.py b/archive/process-level/examples/code-agent/src/sandbox/base.py
similarity index 100%
rename from examples/code-agent/src/sandbox/base.py
rename to archive/process-level/examples/code-agent/src/sandbox/base.py
diff --git a/examples/code-agent/src/sandbox/e2b.py b/archive/process-level/examples/code-agent/src/sandbox/e2b.py
similarity index 100%
rename from examples/code-agent/src/sandbox/e2b.py
rename to archive/process-level/examples/code-agent/src/sandbox/e2b.py
diff --git a/examples/code-agent/src/sandbox/opensandbox.py b/archive/process-level/examples/code-agent/src/sandbox/opensandbox.py
similarity index 100%
rename from examples/code-agent/src/sandbox/opensandbox.py
rename to archive/process-level/examples/code-agent/src/sandbox/opensandbox.py
diff --git a/examples/code-agent/src/tools/__init__.py b/archive/process-level/examples/code-agent/src/tools/__init__.py
similarity index 100%
rename from examples/code-agent/src/tools/__init__.py
rename to archive/process-level/examples/code-agent/src/tools/__init__.py
diff --git a/examples/code-agent/src/tools/code.py b/archive/process-level/examples/code-agent/src/tools/code.py
similarity index 100%
rename from examples/code-agent/src/tools/code.py
rename to archive/process-level/examples/code-agent/src/tools/code.py
diff --git a/examples/code-agent/src/tools/git.py b/archive/process-level/examples/code-agent/src/tools/git.py
similarity index 100%
rename from examples/code-agent/src/tools/git.py
rename to archive/process-level/examples/code-agent/src/tools/git.py
diff --git a/examples/code-agent/src/tools/search.py b/archive/process-level/examples/code-agent/src/tools/search.py
similarity index 100%
rename from examples/code-agent/src/tools/search.py
rename to archive/process-level/examples/code-agent/src/tools/search.py
diff --git a/examples/code-agent/src/ui/__init__.py b/archive/process-level/examples/code-agent/src/ui/__init__.py
similarity index 100%
rename from examples/code-agent/src/ui/__init__.py
rename to archive/process-level/examples/code-agent/src/ui/__init__.py
diff --git a/examples/code-agent/src/ui/app.py b/archive/process-level/examples/code-agent/src/ui/app.py
similarity index 100%
rename from examples/code-agent/src/ui/app.py
rename to archive/process-level/examples/code-agent/src/ui/app.py
diff --git a/examples/code-agent/tests/__init__.py b/archive/process-level/examples/code-agent/tests/__init__.py
similarity index 100%
rename from examples/code-agent/tests/__init__.py
rename to archive/process-level/examples/code-agent/tests/__init__.py
diff --git a/examples/code-agent/tests/test_sandbox.py b/archive/process-level/examples/code-agent/tests/test_sandbox.py
similarity index 100%
rename from examples/code-agent/tests/test_sandbox.py
rename to archive/process-level/examples/code-agent/tests/test_sandbox.py
diff --git a/fly.toml b/archive/process-level/fly.toml
similarity index 100%
rename from fly.toml
rename to archive/process-level/fly.toml
diff --git a/proto/sandbox.proto b/archive/process-level/proto/sandbox.proto
similarity index 100%
rename from proto/sandbox.proto
rename to archive/process-level/proto/sandbox.proto
diff --git a/sdk/python/README.md b/archive/process-level/sdk/python/README.md
similarity index 100%
rename from sdk/python/README.md
rename to archive/process-level/sdk/python/README.md
diff --git a/sdk/python/examples/basic_usage.py b/archive/process-level/sdk/python/examples/basic_usage.py
similarity index 100%
rename from sdk/python/examples/basic_usage.py
rename to archive/process-level/sdk/python/examples/basic_usage.py
diff --git a/sdk/python/generate_proto.sh b/archive/process-level/sdk/python/generate_proto.sh
similarity index 100%
rename from sdk/python/generate_proto.sh
rename to archive/process-level/sdk/python/generate_proto.sh
diff --git a/sdk/python/opensandbox/__init__.py b/archive/process-level/sdk/python/opensandbox/__init__.py
similarity index 100%
rename from sdk/python/opensandbox/__init__.py
rename to archive/process-level/sdk/python/opensandbox/__init__.py
diff --git a/sdk/python/opensandbox/client.py b/archive/process-level/sdk/python/opensandbox/client.py
similarity index 100%
rename from sdk/python/opensandbox/client.py
rename to archive/process-level/sdk/python/opensandbox/client.py
diff --git a/sdk/python/opensandbox/exceptions.py b/archive/process-level/sdk/python/opensandbox/exceptions.py
similarity index 100%
rename from sdk/python/opensandbox/exceptions.py
rename to archive/process-level/sdk/python/opensandbox/exceptions.py
diff --git a/sdk/python/opensandbox/proto/__init__.py b/archive/process-level/sdk/python/opensandbox/proto/__init__.py
similarity index 100%
rename from sdk/python/opensandbox/proto/__init__.py
rename to archive/process-level/sdk/python/opensandbox/proto/__init__.py
diff --git a/sdk/python/opensandbox/proto/sandbox_pb2.py b/archive/process-level/sdk/python/opensandbox/proto/sandbox_pb2.py
similarity index 100%
rename from sdk/python/opensandbox/proto/sandbox_pb2.py
rename to archive/process-level/sdk/python/opensandbox/proto/sandbox_pb2.py
diff --git a/sdk/python/opensandbox/proto/sandbox_pb2_grpc.py b/archive/process-level/sdk/python/opensandbox/proto/sandbox_pb2_grpc.py
similarity index 100%
rename from sdk/python/opensandbox/proto/sandbox_pb2_grpc.py
rename to archive/process-level/sdk/python/opensandbox/proto/sandbox_pb2_grpc.py
diff --git a/sdk/python/opensandbox/sandbox.py b/archive/process-level/sdk/python/opensandbox/sandbox.py
similarity index 100%
rename from sdk/python/opensandbox/sandbox.py
rename to archive/process-level/sdk/python/opensandbox/sandbox.py
diff --git a/sdk/python/pyproject.toml b/archive/process-level/sdk/python/pyproject.toml
similarity index 100%
rename from sdk/python/pyproject.toml
rename to archive/process-level/sdk/python/pyproject.toml
diff --git a/sdk/typescript/README.md b/archive/process-level/sdk/typescript/README.md
similarity index 100%
rename from sdk/typescript/README.md
rename to archive/process-level/sdk/typescript/README.md
diff --git a/sdk/typescript/examples/demo.ts b/archive/process-level/sdk/typescript/examples/demo.ts
similarity index 100%
rename from sdk/typescript/examples/demo.ts
rename to archive/process-level/sdk/typescript/examples/demo.ts
diff --git a/sdk/typescript/examples/quickstart.ts b/archive/process-level/sdk/typescript/examples/quickstart.ts
similarity index 100%
rename from sdk/typescript/examples/quickstart.ts
rename to archive/process-level/sdk/typescript/examples/quickstart.ts
diff --git a/sdk/typescript/package-lock.json b/archive/process-level/sdk/typescript/package-lock.json
similarity index 100%
rename from sdk/typescript/package-lock.json
rename to archive/process-level/sdk/typescript/package-lock.json
diff --git a/sdk/typescript/package.json b/archive/process-level/sdk/typescript/package.json
similarity index 100%
rename from sdk/typescript/package.json
rename to archive/process-level/sdk/typescript/package.json
diff --git a/sdk/typescript/src/client.ts b/archive/process-level/sdk/typescript/src/client.ts
similarity index 100%
rename from sdk/typescript/src/client.ts
rename to archive/process-level/sdk/typescript/src/client.ts
diff --git a/sdk/typescript/src/errors.ts b/archive/process-level/sdk/typescript/src/errors.ts
similarity index 100%
rename from sdk/typescript/src/errors.ts
rename to archive/process-level/sdk/typescript/src/errors.ts
diff --git a/sdk/typescript/src/index.ts b/archive/process-level/sdk/typescript/src/index.ts
similarity index 100%
rename from sdk/typescript/src/index.ts
rename to archive/process-level/sdk/typescript/src/index.ts
diff --git a/sdk/typescript/src/sandbox.ts b/archive/process-level/sdk/typescript/src/sandbox.ts
similarity index 100%
rename from sdk/typescript/src/sandbox.ts
rename to archive/process-level/sdk/typescript/src/sandbox.ts
diff --git a/sdk/typescript/src/types.ts b/archive/process-level/sdk/typescript/src/types.ts
similarity index 100%
rename from sdk/typescript/src/types.ts
rename to archive/process-level/sdk/typescript/src/types.ts
diff --git a/sdk/typescript/tsconfig.json b/archive/process-level/sdk/typescript/tsconfig.json
similarity index 100%
rename from sdk/typescript/tsconfig.json
rename to archive/process-level/sdk/typescript/tsconfig.json
diff --git a/src/grpc_server.rs b/archive/process-level/src/grpc_server.rs
similarity index 100%
rename from src/grpc_server.rs
rename to archive/process-level/src/grpc_server.rs
diff --git a/src/http_server.rs b/archive/process-level/src/http_server.rs
similarity index 100%
rename from src/http_server.rs
rename to archive/process-level/src/http_server.rs
diff --git a/src/main.rs b/archive/process-level/src/main.rs
similarity index 100%
rename from src/main.rs
rename to archive/process-level/src/main.rs
diff --git a/src/sandbox.rs b/archive/process-level/src/sandbox.rs
similarity index 100%
rename from src/sandbox.rs
rename to archive/process-level/src/sandbox.rs
diff --git a/src/state.rs b/archive/process-level/src/state.rs
similarity index 100%
rename from src/state.rs
rename to archive/process-level/src/state.rs
diff --git a/benchmarks/results/benchmark_20260130_172220.json b/benchmarks/results/benchmark_20260130_172220.json
deleted file mode 100644
index 3df67823..00000000
--- a/benchmarks/results/benchmark_20260130_172220.json
+++ /dev/null
@@ -1,360 +0,0 @@
-{
- "timestamp": "2026-01-30T17:22:20.720212",
- "iterations": 3,
- "providers": {
- "opensandbox": {}
- },
- "benchmarks": {
- "creation": {
- "opensandbox": {
- "provider": "opensandbox",
- "iterations": 3,
- "create": {
- "avg_ms": 131.2,
- "std_ms": 73.44,
- "min_ms": 87.29,
- "max_ms": 215.98,
- "all_ms": [
- 87.29,
- 215.98,
- 90.33
- ]
- },
- "destroy": {
- "avg_ms": 84.77,
- "std_ms": 33.19,
- "min_ms": 64.9,
- "max_ms": 123.09,
- "all_ms": [
- 123.09,
- 66.33,
- 64.9
- ]
- },
- "errors": []
- }
- },
- "commands": {
- "opensandbox": {
- "provider": "opensandbox",
- "iterations": 3,
- "setup_time_ms": 88.2,
- "teardown_time_ms": 58.87,
- "total_avg_ms": 111.35,
- "commands": [
- {
- "name": "echo",
- "command": "echo 'hello world'",
- "avg_ms": 67.27,
- "std_ms": 4.19,
- "min_ms": 63.38,
- "max_ms": 71.71,
- "success": 3,
- "fail": 0
- },
- {
- "name": "pwd",
- "command": "pwd",
- "avg_ms": 88.82,
- "std_ms": 39.75,
- "min_ms": 65.77,
- "max_ms": 134.72,
- "success": 3,
- "fail": 0
- },
- {
- "name": "ls",
- "command": "ls -la /",
- "avg_ms": 92.71,
- "std_ms": 41.82,
- "min_ms": 67.8,
- "max_ms": 140.99,
- "success": 3,
- "fail": 0
- },
- {
- "name": "env",
- "command": "env | head -20",
- "avg_ms": 209.79,
- "std_ms": 256.32,
- "min_ms": 60.77,
- "max_ms": 505.77,
- "success": 3,
- "fail": 0
- },
- {
- "name": "python_version",
- "command": "python3 --version 2>&1 || python --version 2>&1 || echo 'no python'",
- "avg_ms": 238.99,
- "std_ms": 305.79,
- "min_ms": 62.43,
- "max_ms": 592.09,
- "success": 3,
- "fail": 0
- },
- {
- "name": "git_version",
- "command": "git --version",
- "avg_ms": 110.21,
- "std_ms": 82.45,
- "min_ms": 59.79,
- "max_ms": 205.36,
- "success": 3,
- "fail": 0
- },
- {
- "name": "uname",
- "command": "uname -a",
- "avg_ms": 64.67,
- "std_ms": 1.11,
- "min_ms": 63.64,
- "max_ms": 65.85,
- "success": 3,
- "fail": 0
- },
- {
- "name": "cat_etc_os",
- "command": "cat /etc/os-release 2>/dev/null || cat /etc/debian_version 2>/dev/null || echo 'unknown'",
- "avg_ms": 62.25,
- "std_ms": 2.33,
- "min_ms": 60.89,
- "max_ms": 64.94,
- "success": 3,
- "fail": 0
- },
- {
- "name": "loop_100",
- "command": "for i in $(seq 1 100); do echo $i; done | tail -1",
- "avg_ms": 90.74,
- "std_ms": 46.29,
- "min_ms": 63.4,
- "max_ms": 144.19,
- "success": 3,
- "fail": 0
- },
- {
- "name": "calculate",
- "command": "echo $((12345 * 67890))",
- "avg_ms": 88.07,
- "std_ms": 47.28,
- "min_ms": 60.29,
- "max_ms": 142.67,
- "success": 3,
- "fail": 0
- }
- ],
- "errors": []
- }
- },
- "files": {
- "opensandbox": {
- "provider": "opensandbox",
- "iterations": 3,
- "setup_time_ms": 599.87,
- "teardown_time_ms": 58.08,
- "files": [
- {
- "name": "tiny",
- "size_bytes": 100,
- "write": {
- "avg_ms": 209.11,
- "min_ms": 63.96,
- "max_ms": 489.59,
- "throughput_kbps": 0.47
- },
- "read": {
- "avg_ms": 114.31,
- "min_ms": 111.81,
- "max_ms": 117.25,
- "throughput_kbps": 0.85
- },
- "success": 3,
- "fail": 0
- },
- {
- "name": "small",
- "size_bytes": 1024,
- "write": {
- "avg_ms": 67.6,
- "min_ms": 65.17,
- "max_ms": 71.79,
- "throughput_kbps": 14.79
- },
- "read": {
- "avg_ms": 204.31,
- "min_ms": 63.91,
- "max_ms": 483.01,
- "throughput_kbps": 4.89
- },
- "success": 3,
- "fail": 0
- }
- ],
- "errors": []
- }
- },
- "workflow": {
- "opensandbox": {
- "provider": "opensandbox",
- "iterations": 3,
- "total_avg_ms": 1528.6,
- "total_times_ms": [
- 1769.87,
- 1352.44,
- 1463.49
- ],
- "steps": {
- "sandbox_create": {
- "name": "sandbox_create",
- "avg_ms": 122.0,
- "std_ms": 27.35,
- "min_ms": 93.36,
- "max_ms": 147.84,
- "success": 3,
- "fail": 0
- },
- "mkdir": {
- "name": "mkdir",
- "avg_ms": 219.73,
- "std_ms": 263.59,
- "min_ms": 66.0,
- "max_ms": 524.09,
- "success": 3,
- "fail": 0
- },
- "git_clone": {
- "name": "git_clone",
- "avg_ms": 373.68,
- "std_ms": 140.98,
- "min_ms": 284.63,
- "max_ms": 536.22,
- "success": 3,
- "fail": 0
- },
- "list_files": {
- "name": "list_files",
- "avg_ms": 68.72,
- "std_ms": 6.2,
- "min_ms": 63.74,
- "max_ms": 75.67,
- "success": 3,
- "fail": 0
- },
- "write_file": {
- "name": "write_file",
- "avg_ms": 211.08,
- "std_ms": 247.5,
- "min_ms": 67.18,
- "max_ms": 496.87,
- "success": 3,
- "fail": 0
- },
- "read_readme": {
- "name": "read_readme",
- "avg_ms": 88.26,
- "std_ms": 41.55,
- "min_ms": 62.24,
- "max_ms": 136.18,
- "success": 3,
- "fail": 0
- },
- "git_status": {
- "name": "git_status",
- "avg_ms": 67.45,
- "std_ms": 1.58,
- "min_ms": 65.81,
- "max_ms": 68.96,
- "success": 3,
- "fail": 0
- },
- "git_diff": {
- "name": "git_diff",
- "avg_ms": 73.46,
- "std_ms": 9.99,
- "min_ms": 67.25,
- "max_ms": 84.98,
- "success": 3,
- "fail": 0
- },
- "cleanup": {
- "name": "cleanup",
- "avg_ms": 94.64,
- "std_ms": 46.35,
- "min_ms": 63.47,
- "max_ms": 147.9,
- "success": 3,
- "fail": 0
- },
- "sandbox_destroy": {
- "name": "sandbox_destroy",
- "avg_ms": 201.2,
- "std_ms": 241.54,
- "min_ms": 59.97,
- "max_ms": 480.11,
- "success": 3,
- "fail": 0
- }
- },
- "errors": []
- }
- },
- "concurrency": {
- "opensandbox": {
- "provider": "opensandbox",
- "concurrency_levels": [
- 1,
- 2,
- 4,
- 8
- ],
- "results": {
- "1": {
- "concurrency": 1,
- "total_wall_time_ms": 505.06,
- "successful": 1,
- "failed": 0,
- "avg_create_ms": 83.73,
- "avg_command_ms": 279.25,
- "avg_destroy_ms": 112.76,
- "avg_total_ms": 483.85,
- "throughput_per_sec": 1.98
- },
- "2": {
- "concurrency": 2,
- "total_wall_time_ms": 408.35,
- "successful": 2,
- "failed": 0,
- "avg_create_ms": 89.2,
- "avg_command_ms": 248.41,
- "avg_destroy_ms": 59.38,
- "avg_total_ms": 405.41,
- "throughput_per_sec": 4.9
- },
- "4": {
- "concurrency": 4,
- "total_wall_time_ms": 460.13,
- "successful": 4,
- "failed": 0,
- "avg_create_ms": 93.72,
- "avg_command_ms": 247.29,
- "avg_destroy_ms": 78.89,
- "avg_total_ms": 428.81,
- "throughput_per_sec": 8.69
- },
- "8": {
- "concurrency": 8,
- "total_wall_time_ms": 536.99,
- "successful": 8,
- "failed": 0,
- "avg_create_ms": 110.57,
- "avg_command_ms": 267.7,
- "avg_destroy_ms": 78.88,
- "avg_total_ms": 511.07,
- "throughput_per_sec": 14.9
- }
- },
- "errors": []
- }
- }
- }
-}
\ No newline at end of file
diff --git a/benchmarks/results/benchmark_20260130_172220.md b/benchmarks/results/benchmark_20260130_172220.md
deleted file mode 100644
index 1c6a348f..00000000
--- a/benchmarks/results/benchmark_20260130_172220.md
+++ /dev/null
@@ -1,73 +0,0 @@
-# Sandbox Benchmark Results
-
-**Date:** 2026-01-30T17:22:20.720212
-**Iterations:** 3
-
-## 1. Sandbox Creation Time
-
-| Provider | Create Avg (ms) | Create Std | Destroy Avg (ms) |
-|----------|-----------------|------------|------------------|
-| opensandbox | 131.2 | 73.44 | 84.77 |
-
-## 2. Command Execution Latency
-
-| Command | opensandbox (ms) |
-|---------|----------|
-| echo | 67.27 |
-| pwd | 88.82 |
-| ls | 92.71 |
-| env | 209.79 |
-| python_version | 238.99 |
-| git_version | 110.21 |
-| uname | 64.67 |
-| cat_etc_os | 62.25 |
-| loop_100 | 90.74 |
-| calculate | 88.07 |
-
-### Overall Command Execution Average
-
-- **opensandbox:** 111.35 ms
-
-## 3. File Operations
-
-### Write Performance
-
-| Size | opensandbox (ms) |
-|------|----------|
-| tiny (100B) | 209.11 |
-| small (1,024B) | 67.6 |
-
-### Read Performance
-
-| Size | opensandbox (ms) |
-|------|----------|
-| tiny (100B) | 114.31 |
-| small (1,024B) | 204.31 |
-
-## 4. Realistic Workflow (Git Clone + Edit)
-
-| Step | opensandbox (ms) |
-|------|----------|
-| sandbox_create | 122.0 |
-| mkdir | 219.73 |
-| git_clone | 373.68 |
-| list_files | 68.72 |
-| write_file | 211.08 |
-| read_readme | 88.26 |
-| git_status | 67.45 |
-| git_diff | 73.46 |
-| cleanup | 94.64 |
-| sandbox_destroy | 201.2 |
-
-### Total Workflow Time
-
-- **opensandbox:** 1528.6 ms
-
-## 5. Concurrency (Parallel Sandboxes)
-
-| Concurrency | opensandbox Wall Time (ms) | opensandbox Throughput/s |
-|-------------|------------------|------------------|
-| 1 | 505.06 | 1.98 |
-| 2 | 408.35 | 4.9 |
-| 4 | 460.13 | 8.69 |
-| 8 | 536.99 | 14.9 |
diff --git a/benchmarks/results/benchmark_20260130_172241.json b/benchmarks/results/benchmark_20260130_172241.json
deleted file mode 100644
index 3b4bf265..00000000
--- a/benchmarks/results/benchmark_20260130_172241.json
+++ /dev/null
@@ -1,360 +0,0 @@
-{
- "timestamp": "2026-01-30T17:22:41.494429",
- "iterations": 3,
- "providers": {
- "e2b": {}
- },
- "benchmarks": {
- "creation": {
- "e2b": {
- "provider": "e2b",
- "iterations": 3,
- "create": {
- "avg_ms": 274.37,
- "std_ms": 317.71,
- "min_ms": 88.18,
- "max_ms": 641.21,
- "all_ms": [
- 641.21,
- 88.18,
- 93.72
- ]
- },
- "destroy": {
- "avg_ms": 112.99,
- "std_ms": 25.28,
- "min_ms": 97.54,
- "max_ms": 142.17,
- "all_ms": [
- 97.54,
- 99.26,
- 142.17
- ]
- },
- "errors": []
- }
- },
- "commands": {
- "e2b": {
- "provider": "e2b",
- "iterations": 3,
- "setup_time_ms": 93.6,
- "teardown_time_ms": 101.4,
- "total_avg_ms": 50.59,
- "commands": [
- {
- "name": "echo",
- "command": "echo 'hello world'",
- "avg_ms": 60.82,
- "std_ms": 45.83,
- "min_ms": 33.77,
- "max_ms": 113.74,
- "success": 3,
- "fail": 0
- },
- {
- "name": "pwd",
- "command": "pwd",
- "avg_ms": 38.5,
- "std_ms": 3.37,
- "min_ms": 35.21,
- "max_ms": 41.94,
- "success": 3,
- "fail": 0
- },
- {
- "name": "ls",
- "command": "ls -la /",
- "avg_ms": 41.5,
- "std_ms": 3.39,
- "min_ms": 39.4,
- "max_ms": 45.42,
- "success": 3,
- "fail": 0
- },
- {
- "name": "env",
- "command": "env | head -20",
- "avg_ms": 42.6,
- "std_ms": 6.9,
- "min_ms": 38.22,
- "max_ms": 50.56,
- "success": 3,
- "fail": 0
- },
- {
- "name": "python_version",
- "command": "python3 --version 2>&1 || python --version 2>&1 || echo 'no python'",
- "avg_ms": 51.92,
- "std_ms": 23.15,
- "min_ms": 37.39,
- "max_ms": 78.61,
- "success": 3,
- "fail": 0
- },
- {
- "name": "git_version",
- "command": "git --version",
- "avg_ms": 61.91,
- "std_ms": 40.13,
- "min_ms": 38.5,
- "max_ms": 108.26,
- "success": 3,
- "fail": 0
- },
- {
- "name": "uname",
- "command": "uname -a",
- "avg_ms": 38.07,
- "std_ms": 3.04,
- "min_ms": 35.13,
- "max_ms": 41.2,
- "success": 3,
- "fail": 0
- },
- {
- "name": "cat_etc_os",
- "command": "cat /etc/os-release 2>/dev/null || cat /etc/debian_version 2>/dev/null || echo 'unknown'",
- "avg_ms": 67.77,
- "std_ms": 48.69,
- "min_ms": 38.45,
- "max_ms": 123.98,
- "success": 3,
- "fail": 0
- },
- {
- "name": "loop_100",
- "command": "for i in $(seq 1 100); do echo $i; done | tail -1",
- "avg_ms": 64.79,
- "std_ms": 37.86,
- "min_ms": 38.76,
- "max_ms": 108.22,
- "success": 3,
- "fail": 0
- },
- {
- "name": "calculate",
- "command": "echo $((12345 * 67890))",
- "avg_ms": 37.99,
- "std_ms": 0.55,
- "min_ms": 37.44,
- "max_ms": 38.55,
- "success": 3,
- "fail": 0
- }
- ],
- "errors": []
- }
- },
- "files": {
- "e2b": {
- "provider": "e2b",
- "iterations": 3,
- "setup_time_ms": 92.17,
- "teardown_time_ms": 239.58,
- "files": [
- {
- "name": "tiny",
- "size_bytes": 100,
- "write": {
- "avg_ms": 33.69,
- "min_ms": 32.94,
- "max_ms": 34.97,
- "throughput_kbps": 2.9
- },
- "read": {
- "avg_ms": 33.04,
- "min_ms": 32.06,
- "max_ms": 33.98,
- "throughput_kbps": 2.96
- },
- "success": 3,
- "fail": 0
- },
- {
- "name": "small",
- "size_bytes": 1024,
- "write": {
- "avg_ms": 61.64,
- "min_ms": 30.98,
- "max_ms": 120.33,
- "throughput_kbps": 16.22
- },
- "read": {
- "avg_ms": 31.88,
- "min_ms": 31.02,
- "max_ms": 32.66,
- "throughput_kbps": 31.37
- },
- "success": 3,
- "fail": 0
- }
- ],
- "errors": []
- }
- },
- "workflow": {
- "e2b": {
- "provider": "e2b",
- "iterations": 3,
- "total_avg_ms": 1268.46,
- "total_times_ms": [
- 1388.84,
- 1225.63,
- 1190.92
- ],
- "steps": {
- "sandbox_create": {
- "name": "sandbox_create",
- "avg_ms": 125.16,
- "std_ms": 44.56,
- "min_ms": 92.77,
- "max_ms": 175.98,
- "success": 3,
- "fail": 0
- },
- "mkdir": {
- "name": "mkdir",
- "avg_ms": 130.0,
- "std_ms": 30.19,
- "min_ms": 100.66,
- "max_ms": 160.97,
- "success": 3,
- "fail": 0
- },
- "git_clone": {
- "name": "git_clone",
- "avg_ms": 648.47,
- "std_ms": 110.47,
- "min_ms": 577.13,
- "max_ms": 775.72,
- "success": 3,
- "fail": 0
- },
- "list_files": {
- "name": "list_files",
- "avg_ms": 42.84,
- "std_ms": 2.29,
- "min_ms": 40.91,
- "max_ms": 45.37,
- "success": 3,
- "fail": 0
- },
- "write_file": {
- "name": "write_file",
- "avg_ms": 33.93,
- "std_ms": 2.7,
- "min_ms": 32.06,
- "max_ms": 37.03,
- "success": 3,
- "fail": 0
- },
- "read_readme": {
- "name": "read_readme",
- "avg_ms": 37.72,
- "std_ms": 2.0,
- "min_ms": 35.42,
- "max_ms": 39.11,
- "success": 3,
- "fail": 0
- },
- "git_status": {
- "name": "git_status",
- "avg_ms": 37.5,
- "std_ms": 2.09,
- "min_ms": 35.85,
- "max_ms": 39.84,
- "success": 3,
- "fail": 0
- },
- "git_diff": {
- "name": "git_diff",
- "avg_ms": 60.28,
- "std_ms": 38.09,
- "min_ms": 36.99,
- "max_ms": 104.24,
- "success": 3,
- "fail": 0
- },
- "cleanup": {
- "name": "cleanup",
- "avg_ms": 45.16,
- "std_ms": 3.69,
- "min_ms": 41.45,
- "max_ms": 48.83,
- "success": 3,
- "fail": 0
- },
- "sandbox_destroy": {
- "name": "sandbox_destroy",
- "avg_ms": 107.23,
- "std_ms": 12.57,
- "min_ms": 99.0,
- "max_ms": 121.7,
- "success": 3,
- "fail": 0
- }
- },
- "errors": []
- }
- },
- "concurrency": {
- "e2b": {
- "provider": "e2b",
- "concurrency_levels": [
- 1,
- 2,
- 4,
- 8
- ],
- "results": {
- "1": {
- "concurrency": 1,
- "total_wall_time_ms": 482.76,
- "successful": 1,
- "failed": 0,
- "avg_create_ms": 103.86,
- "avg_command_ms": 273.52,
- "avg_destroy_ms": 100.06,
- "avg_total_ms": 477.45,
- "throughput_per_sec": 2.07
- },
- "2": {
- "concurrency": 2,
- "total_wall_time_ms": 652.2,
- "successful": 2,
- "failed": 0,
- "avg_create_ms": 184.27,
- "avg_command_ms": 231.9,
- "avg_destroy_ms": 120.66,
- "avg_total_ms": 536.84,
- "throughput_per_sec": 3.07
- },
- "4": {
- "concurrency": 4,
- "total_wall_time_ms": 583.93,
- "successful": 4,
- "failed": 0,
- "avg_create_ms": 111.25,
- "avg_command_ms": 294.38,
- "avg_destroy_ms": 116.54,
- "avg_total_ms": 522.18,
- "throughput_per_sec": 6.85
- },
- "8": {
- "concurrency": 8,
- "total_wall_time_ms": 3138.83,
- "successful": 8,
- "failed": 0,
- "avg_create_ms": 467.79,
- "avg_command_ms": 474.69,
- "avg_destroy_ms": 134.27,
- "avg_total_ms": 1076.79,
- "throughput_per_sec": 2.55
- }
- },
- "errors": []
- }
- }
- }
-}
\ No newline at end of file
diff --git a/benchmarks/results/benchmark_20260130_172241.md b/benchmarks/results/benchmark_20260130_172241.md
deleted file mode 100644
index 8d16038e..00000000
--- a/benchmarks/results/benchmark_20260130_172241.md
+++ /dev/null
@@ -1,73 +0,0 @@
-# Sandbox Benchmark Results
-
-**Date:** 2026-01-30T17:22:41.494429
-**Iterations:** 3
-
-## 1. Sandbox Creation Time
-
-| Provider | Create Avg (ms) | Create Std | Destroy Avg (ms) |
-|----------|-----------------|------------|------------------|
-| e2b | 274.37 | 317.71 | 112.99 |
-
-## 2. Command Execution Latency
-
-| Command | e2b (ms) |
-|---------|----------|
-| echo | 60.82 |
-| pwd | 38.5 |
-| ls | 41.5 |
-| env | 42.6 |
-| python_version | 51.92 |
-| git_version | 61.91 |
-| uname | 38.07 |
-| cat_etc_os | 67.77 |
-| loop_100 | 64.79 |
-| calculate | 37.99 |
-
-### Overall Command Execution Average
-
-- **e2b:** 50.59 ms
-
-## 3. File Operations
-
-### Write Performance
-
-| Size | e2b (ms) |
-|------|----------|
-| tiny (100B) | 33.69 |
-| small (1,024B) | 61.64 |
-
-### Read Performance
-
-| Size | e2b (ms) |
-|------|----------|
-| tiny (100B) | 33.04 |
-| small (1,024B) | 31.88 |
-
-## 4. Realistic Workflow (Git Clone + Edit)
-
-| Step | e2b (ms) |
-|------|----------|
-| sandbox_create | 125.16 |
-| mkdir | 130.0 |
-| git_clone | 648.47 |
-| list_files | 42.84 |
-| write_file | 33.93 |
-| read_readme | 37.72 |
-| git_status | 37.5 |
-| git_diff | 60.28 |
-| cleanup | 45.16 |
-| sandbox_destroy | 107.23 |
-
-### Total Workflow Time
-
-- **e2b:** 1268.46 ms
-
-## 5. Concurrency (Parallel Sandboxes)
-
-| Concurrency | e2b Wall Time (ms) | e2b Throughput/s |
-|-------------|------------------|------------------|
-| 1 | 482.76 | 2.07 |
-| 2 | 652.2 | 3.07 |
-| 4 | 583.93 | 6.85 |
-| 8 | 3138.83 | 2.55 |
diff --git a/sdk/typescript/dist/client.d.ts b/sdk/typescript/dist/client.d.ts
deleted file mode 100644
index 32c7df8d..00000000
--- a/sdk/typescript/dist/client.d.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * OpenSandbox client for creating and managing sandbox sessions.
- */
-import { Sandbox } from './sandbox';
-import type { ClientOptions, CreateOptions } from './types';
-/**
- * Client for connecting to an OpenSandbox server.
- *
- * This client uses HTTP for sandbox lifecycle (create/destroy) and
- * optionally gRPC for fast command execution and file operations.
- *
- * @example
- * ```typescript
- * const client = new OpenSandbox('http://localhost:8080');
- * const sandbox = await client.create();
- * const result = await sandbox.run('echo hello');
- * console.log(result.stdout); // "hello\n"
- * await sandbox.destroy();
- * await client.close();
- * ```
- */
-export declare class OpenSandbox {
- private _baseUrl;
- private _grpcPort;
- private _grpcInsecure;
- private _timeout;
- private _grpcChannel;
- private _grpcStub;
- private _host;
- private _grpcSecure;
- /**
- * Initialize the OpenSandbox client.
- *
- * @param baseUrl - Base URL of the OpenSandbox server (e.g., "http://localhost:8080")
- * @param options - Client options
- */
- constructor(baseUrl: string, options?: ClientOptions);
- /**
- * Create a new sandbox session.
- *
- * @param options - Options for creating the sandbox
- * @returns A Sandbox instance ready for use
- * @throws {ConnectionError} If connection to the server fails
- */
- create(options?: CreateOptions): Promise<Sandbox>;
- /**
- * Initialize gRPC connection (optional, for better performance).
- *
- * Call this method before creating sandboxes if you want to use gRPC
- * for command execution and file operations.
- */
- connectGrpc(): Promise<void>;
- /**
- * Close all connections to the server.
- */
- close(): Promise<void>;
-}
-//# sourceMappingURL=client.d.ts.map
\ No newline at end of file
diff --git a/sdk/typescript/dist/client.d.ts.map b/sdk/typescript/dist/client.d.ts.map
deleted file mode 100644
index 2a4bd37a..00000000
--- a/sdk/typescript/dist/client.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAa5D;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,aAAa,CAAU;IAC/B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,SAAS,CAAa;IAC9B,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,WAAW,CAAU;IAE7B;;;;;OAKG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,aAAkB;IAaxD;;;;;;OAMG;IACG,MAAM,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;IAwC3D;;;;;OAKG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IA0BlC;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAO7B"}
\ No newline at end of file
diff --git a/sdk/typescript/dist/client.js b/sdk/typescript/dist/client.js
deleted file mode 100644
index 3edf2e6b..00000000
--- a/sdk/typescript/dist/client.js
+++ /dev/null
@@ -1,161 +0,0 @@
-"use strict";
-/**
- * OpenSandbox client for creating and managing sandbox sessions.
- */
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.OpenSandbox = void 0;
-const grpc = __importStar(require("@grpc/grpc-js"));
-const protoLoader = __importStar(require("@grpc/proto-loader"));
-const sandbox_1 = require("./sandbox");
-const errors_1 = require("./errors");
-/**
- * Client for connecting to an OpenSandbox server.
- *
- * This client uses HTTP for sandbox lifecycle (create/destroy) and
- * optionally gRPC for fast command execution and file operations.
- *
- * @example
- * ```typescript
- * const client = new OpenSandbox('http://localhost:8080');
- * const sandbox = await client.create();
- * const result = await sandbox.run('echo hello');
- * console.log(result.stdout); // "hello\n"
- * await sandbox.destroy();
- * await client.close();
- * ```
- */
-class OpenSandbox {
- _baseUrl;
- _grpcPort;
- _grpcInsecure;
- _timeout;
- _grpcChannel = null;
- _grpcStub = null;
- _host;
- _grpcSecure;
- /**
- * Initialize the OpenSandbox client.
- *
- * @param baseUrl - Base URL of the OpenSandbox server (e.g., "http://localhost:8080")
- * @param options - Client options
- */
- constructor(baseUrl, options = {}) {
- this._baseUrl = baseUrl.replace(/\/$/, '');
- this._grpcPort = options.grpcPort ?? 50051;
- this._grpcInsecure = options.grpcInsecure ?? false;
- this._timeout = options.timeout ?? 30000;
- // Parse URL to get host
- const url = new URL(this._baseUrl);
- this._host = url.hostname;
- // Use secure gRPC for HTTPS unless explicitly set to insecure
- this._grpcSecure = url.protocol === 'https:' && !this._grpcInsecure;
- }
- /**
- * Create a new sandbox session.
- *
- * @param options - Options for creating the sandbox
- * @returns A Sandbox instance ready for use
- * @throws {ConnectionError} If connection to the server fails
- */
- async create(options = {}) {
- const { env = {}, timeout = 300 } = options;
- try {
- const controller = new AbortController();
- const timeoutId = setTimeout(() => controller.abort(), this._timeout);
- const response = await fetch(`${this._baseUrl}/sessions`, {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ env }),
- signal: controller.signal,
- });
- clearTimeout(timeoutId);
- if (!response.ok) {
- throw new errors_1.ConnectionError(`Failed to create sandbox: ${response.status} ${response.statusText}`);
- }
- // Server returns snake_case, we need to map to camelCase
- const data = await response.json();
- return new sandbox_1.Sandbox(data.session_id, this._grpcStub, this._baseUrl, data.preview_url);
- }
- catch (error) {
- if (error instanceof errors_1.ConnectionError) {
- throw error;
- }
- throw new errors_1.ConnectionError(`Failed to create sandbox: ${error}`);
- }
- }
- /**
- * Initialize gRPC connection (optional, for better performance).
- *
- * Call this method before creating sandboxes if you want to use gRPC
- * for command execution and file operations.
- */
- async connectGrpc() {
- const grpcTarget = `${this._host}:${this._grpcPort}`;
- const credentials = this._grpcSecure
- ? grpc.credentials.createSsl()
- : grpc.credentials.createInsecure();
- // Load proto file dynamically
- // Note: In a real implementation, you'd either bundle the proto file
- // or generate TypeScript types from it
- try {
- const packageDefinition = protoLoader.loadSync('sandbox.proto', {
- keepCase: true,
- longs: String,
- enums: String,
- defaults: true,
- oneofs: true,
- });
- const proto = grpc.loadPackageDefinition(packageDefinition);
- this._grpcStub = new proto.sandbox.SandboxService(grpcTarget, credentials);
- }
- catch {
- // gRPC connection is optional - SDK works with HTTP only
- console.warn('gRPC connection not available, using HTTP only');
- }
- }
- /**
- * Close all connections to the server.
- */
- async close() {
- if (this._grpcChannel) {
- this._grpcChannel.close();
- this._grpcChannel = null;
- }
- this._grpcStub = null;
- }
-}
-exports.OpenSandbox = OpenSandbox;
-//# sourceMappingURL=client.js.map
\ No newline at end of file
diff --git a/sdk/typescript/dist/client.js.map b/sdk/typescript/dist/client.js.map
deleted file mode 100644
index 0ca9fddf..00000000
--- a/sdk/typescript/dist/client.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AACtC,gEAAkD;AAClD,uCAAoC;AACpC,qCAA2C;AAc3C;;;;;;;;;;;;;;;GAeG;AACH,MAAa,WAAW;IACd,QAA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AAK,EAAE,MAAM;gBACb,QAAQ,EAAE,IAAI;gBACd,MAAM,EAAE,IAAI;aACb,CAAC,CAAC;YACH,MAAM,KAAK,GAAG,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,CAA6B,CAAC;YACxF,IAAI,CAAC,SAAS,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,cAAc,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;QAC7E,CAAC;QAAC,MAAM,CAAC;YACP,yDAAyD;YACzD,OAAO,CAAC,IAAI,CAAC,gDAAgD,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,KAAK;QACT,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YACtB,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;YAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QAC3B,CAAC;QACD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;CACF;AAtHD,kCAsHC"}
\ No newline at end of file
diff --git a/sdk/typescript/dist/errors.d.ts b/sdk/typescript/dist/errors.d.ts
deleted file mode 100644
index c9b9ab63..00000000
--- a/sdk/typescript/dist/errors.d.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- * Custom error classes for the OpenSandbox SDK.
- */
-/**
- * Base error class for OpenSandbox errors.
- */
-export declare class OpenSandboxError extends Error {
- constructor(message: string);
-}
-/**
- * Error thrown when a sandbox session is not found.
- */
-export declare class SandboxNotFoundError extends OpenSandboxError {
- constructor(message?: string);
-}
-/**
- * Error thrown when connection to the sandbox server fails.
- */
-export declare class ConnectionError extends OpenSandboxError {
- constructor(message: string);
-}
-/**
- * Error thrown when a command execution fails.
- */
-export declare class CommandExecutionError extends OpenSandboxError {
- /** Exit code of the failed command */
- exitCode: number;
- /** Standard output from the command */
- stdout: string;
- /** Standard error from the command */
- stderr: string;
- constructor(message: string, exitCode?: number, stdout?: string, stderr?: string);
-}
-/**
- * Error thrown when a file operation fails.
- */
-export declare class FileOperationError extends OpenSandboxError {
- constructor(message: string);
-}
-//# sourceMappingURL=errors.d.ts.map
\ No newline at end of file
diff --git a/sdk/typescript/dist/errors.d.ts.map b/sdk/typescript/dist/errors.d.ts.map
deleted file mode 100644
index ec1141dd..00000000
--- a/sdk/typescript/dist/errors.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,gBAAgB;gBAC5C,OAAO,SAA8B;CAIlD;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,gBAAgB;gBACvC,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,gBAAgB;IACzD,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;gBAEH,OAAO,EAAE,MAAM,EAAE,QAAQ,SAAI,EAAE,MAAM,SAAK,EAAE,MAAM,SAAK;CAOpE;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,gBAAgB;gBAC1C,OAAO,EAAE,MAAM;CAI5B"}
\ No newline at end of file
diff --git a/sdk/typescript/dist/errors.js b/sdk/typescript/dist/errors.js
deleted file mode 100644
index f5d32fb0..00000000
--- a/sdk/typescript/dist/errors.js
+++ /dev/null
@@ -1,66 +0,0 @@
-"use strict";
-/**
- * Custom error classes for the OpenSandbox SDK.
- */
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.FileOperationError = exports.CommandExecutionError = exports.ConnectionError = exports.SandboxNotFoundError = exports.OpenSandboxError = void 0;
-/**
- * Base error class for OpenSandbox errors.
- */
-class OpenSandboxError extends Error {
- constructor(message) {
- super(message);
- this.name = 'OpenSandboxError';
- }
-}
-exports.OpenSandboxError = OpenSandboxError;
-/**
- * Error thrown when a sandbox session is not found.
- */
-class SandboxNotFoundError extends OpenSandboxError {
- constructor(message = 'Sandbox session not found') {
- super(message);
- this.name = 'SandboxNotFoundError';
- }
-}
-exports.SandboxNotFoundError = SandboxNotFoundError;
-/**
- * Error thrown when connection to the sandbox server fails.
- */
-class ConnectionError extends OpenSandboxError {
- constructor(message) {
- super(message);
- this.name = 'ConnectionError';
- }
-}
-exports.ConnectionError = ConnectionError;
-/**
- * Error thrown when a command execution fails.
- */
-class CommandExecutionError extends OpenSandboxError {
- /** Exit code of the failed command */
- exitCode;
- /** Standard output from the command */
- stdout;
- /** Standard error from the command */
- stderr;
- constructor(message, exitCode = 1, stdout = '', stderr = '') {
- super(message);
- this.name = 'CommandExecutionError';
- this.exitCode = exitCode;
- this.stdout = stdout;
- this.stderr = stderr;
- }
-}
-exports.CommandExecutionError = CommandExecutionError;
-/**
- * Error thrown when a file operation fails.
- */
-class FileOperationError extends OpenSandboxError {
- constructor(message) {
- super(message);
- this.name = 'FileOperationError';
- }
-}
-exports.FileOperationError = FileOperationError;
-//# sourceMappingURL=errors.js.map
\ No newline at end of file
diff --git a/sdk/typescript/dist/errors.js.map b/sdk/typescript/dist/errors.js.map
deleted file mode 100644
index d60bf7d8..00000000
--- a/sdk/typescript/dist/errors.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH;;GAEG;AACH,MAAa,gBAAiB,SAAQ,KAAK;IACzC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AALD,4CAKC;AAED;;GAEG;AACH,MAAa,oBAAqB,SAAQ,gBAAgB;IACxD,YAAY,OAAO,GAAG,2BAA2B;QAC/C,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;IACrC,CAAC;CACF;AALD,oDAKC;AAED;;GAEG;AACH,MAAa,eAAgB,SAAQ,gBAAgB;IACnD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAC;IAChC,CAAC;CACF;AALD,0CAKC;AAED;;GAEG;AACH,MAAa,qBAAsB,SAAQ,gBAAgB;IACzD,sCAAsC;IACtC,QAAQ,CAAS;IACjB,uCAAuC;IACvC,MAAM,CAAS;IACf,sCAAsC;IACtC,MAAM,CAAS;IAEf,YAAY,OAAe,EAAE,QAAQ,GAAG,CAAC,EAAE,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE;QACjE,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;QACpC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF;AAfD,sDAeC;AAED;;GAEG;AACH,MAAa,kBAAmB,SAAQ,gBAAgB;IACtD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AALD,gDAKC"}
\ No newline at end of file
diff --git a/sdk/typescript/dist/index.d.ts b/sdk/typescript/dist/index.d.ts
deleted file mode 100644
index 92a8c710..00000000
--- a/sdk/typescript/dist/index.d.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * OpenSandbox TypeScript SDK
- *
- * A TypeScript SDK for interacting with OpenSandbox - secure code execution environments.
- *
- * @example
- * ```typescript
- * import { OpenSandbox } from '@opensandbox/sdk';
- *
- * const client = new OpenSandbox('http://localhost:8080');
- * const sandbox = await client.create();
- *
- * // Run commands
- * const result = await sandbox.run('echo "Hello, World!"');
- * console.log(result.stdout); // "Hello, World!\n"
- *
- * // File operations
- * await sandbox.writeFile('/home/test.txt', 'Hello from SDK!');
- * const content = await sandbox.readFileText('/home/test.txt');
- * console.log(content); // "Hello from SDK!"
- *
- * // List files
- * const files = await sandbox.listFiles('/home');
- * console.log(files);
- *
- * // Cleanup
- * await sandbox.destroy();
- * await client.close();
- * ```
- */
-export { OpenSandbox } from './client';
-export { Sandbox } from './sandbox';
-export type { CommandResult, RunOptions, CreateOptions, ClientOptions, FileEntry, SessionInfo, CreateSessionResponse, BackgroundRunOptions, BackgroundRunResult, } from './types';
-export { OpenSandboxError, SandboxNotFoundError, ConnectionError, CommandExecutionError, FileOperationError, } from './errors';
-//# sourceMappingURL=index.d.ts.map
\ No newline at end of file
diff --git a/sdk/typescript/dist/index.d.ts.map b/sdk/typescript/dist/index.d.ts.map
deleted file mode 100644
index 37aac18f..00000000
--- a/sdk/typescript/dist/index.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,YAAY,EACV,aAAa,EACb,UAAU,EACV,aAAa,EACb,aAAa,EACb,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,UAAU,CAAC"}
\ No newline at end of file
diff --git a/sdk/typescript/dist/index.js b/sdk/typescript/dist/index.js
deleted file mode 100644
index 072aede0..00000000
--- a/sdk/typescript/dist/index.js
+++ /dev/null
@@ -1,46 +0,0 @@
-"use strict";
-/**
- * OpenSandbox TypeScript SDK
- *
- * A TypeScript SDK for interacting with OpenSandbox - secure code execution environments.
- *
- * @example
- * ```typescript
- * import { OpenSandbox } from '@opensandbox/sdk';
- *
- * const client = new OpenSandbox('http://localhost:8080');
- * const sandbox = await client.create();
- *
- * // Run commands
- * const result = await sandbox.run('echo "Hello, World!"');
- * console.log(result.stdout); // "Hello, World!\n"
- *
- * // File operations
- * await sandbox.writeFile('/home/test.txt', 'Hello from SDK!');
- * const content = await sandbox.readFileText('/home/test.txt');
- * console.log(content); // "Hello from SDK!"
- *
- * // List files
- * const files = await sandbox.listFiles('/home');
- * console.log(files);
- *
- * // Cleanup
- * await sandbox.destroy();
- * await client.close();
- * ```
- */
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.FileOperationError = exports.CommandExecutionError = exports.ConnectionError = exports.SandboxNotFoundError = exports.OpenSandboxError = exports.Sandbox = exports.OpenSandbox = void 0;
-// Main exports
-var client_1 = require("./client");
-Object.defineProperty(exports, "OpenSandbox", { enumerable: true, get: function () { return client_1.OpenSandbox; } });
-var sandbox_1 = require("./sandbox");
-Object.defineProperty(exports, "Sandbox", { enumerable: true, get: function () { return sandbox_1.Sandbox; } });
-// Error exports
-var errors_1 = require("./errors");
-Object.defineProperty(exports, "OpenSandboxError", { enumerable: true, get: function () { return errors_1.OpenSandboxError; } });
-Object.defineProperty(exports, "SandboxNotFoundError", { enumerable: true, get: function () { return errors_1.SandboxNotFoundError; } });
-Object.defineProperty(exports, "ConnectionError", { enumerable: true, get: function () { return errors_1.ConnectionError; } });
-Object.defineProperty(exports, "CommandExecutionError", { enumerable: true, get: function () { return errors_1.CommandExecutionError; } });
-Object.defineProperty(exports, "FileOperationError", { enumerable: true, get: function () { return errors_1.FileOperationError; } });
-//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/sdk/typescript/dist/index.js.map b/sdk/typescript/dist/index.js.map
deleted file mode 100644
index 416463be..00000000
--- a/sdk/typescript/dist/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;;;AAEH,eAAe;AACf,mCAAuC;AAA9B,qGAAA,WAAW,OAAA;AACpB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAehB,gBAAgB;AAChB,mCAMkB;AALhB,0GAAA,gBAAgB,OAAA;AAChB,8GAAA,oBAAoB,OAAA;AACpB,yGAAA,eAAe,OAAA;AACf,+GAAA,qBAAqB,OAAA;AACrB,4GAAA,kBAAkB,OAAA"}
\ No newline at end of file
diff --git a/sdk/typescript/dist/sandbox.d.ts b/sdk/typescript/dist/sandbox.d.ts
deleted file mode 100644
index b620cc58..00000000
--- a/sdk/typescript/dist/sandbox.d.ts
+++ /dev/null
@@ -1,202 +0,0 @@
-/**
- * Sandbox session class for interacting with a running sandbox.
- */
-import * as grpc from '@grpc/grpc-js';
-import type { CommandResult, RunOptions, FileEntry, BackgroundRunOptions, BackgroundRunResult } from './types';
-export interface SandboxServiceClient {
- runCommand(request: RunCommandRequest, callback: (error: grpc.ServiceError | null, response: RunCommandResponse) => void): void;
- writeFile(request: WriteFileRequest, callback: (error: grpc.ServiceError | null, response: WriteFileResponse) => void): void;
- writeFiles(request: GrpcWriteFilesRequest, callback: (error: grpc.ServiceError | null, response: GrpcWriteFilesResponse) => void): void;
- readFile(request: ReadFileRequest, callback: (error: grpc.ServiceError | null, response: ReadFileResponse) => void): void;
- setEnv(request: SetEnvRequest, callback: (error: grpc.ServiceError | null, response: SetEnvResponse) => void): void;
- setCwd(request: SetCwdRequest, callback: (error: grpc.ServiceError | null, response: SetCwdResponse) => void): void;
-}
-interface RunCommandRequest {
- session_id: string;
- command: string[];
- time_ms: number;
- mem_kb: number;
- fsize_kb: number;
- nofile: number;
- env: Record<string, string>;
- cwd: string;
-}
-interface RunCommandResponse {
- stdout: string;
- stderr: string;
- exit_code: number;
- signal: number;
-}
-interface WriteFileRequest {
- session_id: string;
- path: string;
- content: Buffer;
-}
-interface WriteFileResponse {
- success: boolean;
- error: string;
-}
-interface ReadFileRequest {
- session_id: string;
- path: string;
-}
-interface ReadFileResponse {
- content: Buffer;
- error: string;
-}
-interface SetEnvRequest {
- session_id: string;
- env: Record<string, string>;
-}
-interface SetEnvResponse {
- success: boolean;
-}
-interface SetCwdRequest {
- session_id: string;
- cwd: string;
-}
-interface SetCwdResponse {
- success: boolean;
-}
-interface GrpcBulkFileEntry {
- path: string;
- content: Buffer;
-}
-interface GrpcWriteFilesRequest {
- session_id: string;
- files: GrpcBulkFileEntry[];
-}
-interface GrpcFileError {
- path: string;
- error: string;
-}
-interface GrpcWriteFilesResponse {
- success: boolean;
- errors: GrpcFileError[];
-}
-/**
- * A sandbox session that can execute commands and manage files.
- *
- * This class uses gRPC for fast command execution and file operations,
- * with HTTP fallback for session lifecycle management.
- */
-export declare class Sandbox {
- /** Unique session identifier */
- readonly sessionId: string;
- /** Preview URL for accessing web servers in the sandbox */
- readonly previewUrl: string | null;
- private _grpcStub;
- private _httpBaseUrl;
- private _destroyed;
- constructor(sessionId: string, grpcStub: SandboxServiceClient | null, httpBaseUrl: string, previewUrl?: string | null);
- /**
- * Execute a shell command in the sandbox.
- *
- * @param command - The shell command to execute
- * @param options - Execution options (timeout, memory, etc.)
- * @returns Command result with stdout, stderr, exitCode, and signal
- * @throws {SandboxNotFoundError} If the session no longer exists
- * @throws {CommandExecutionError} If there was an error executing the command
- */
- run(command: string, options?: RunOptions): Promise<CommandResult>;
- private _runViaGrpc;
- private _runViaHttp;
- /**
- * Write content to a file in the sandbox.
- *
- * @param path - Absolute path in the sandbox filesystem
- * @param content - File content (string or Buffer)
- * @throws {SandboxNotFoundError} If the session no longer exists
- * @throws {FileOperationError} If the file cannot be written
- */
- writeFile(path: string, content: string | Buffer): Promise<void>;
- private _writeFileViaGrpc;
- private _writeFileViaHttp;
- /**
- * Write multiple files to the sandbox in a single request.
- *
- * @param files - Array of files with path and content
- * @throws {SandboxNotFoundError} If the session no longer exists
- * @throws {FileOperationError} If any file cannot be written (partial success possible)
- */
- writeFiles(files: Array<{
- path: string;
- content: string | Buffer;
- }>): Promise<void>;
- private _writeFilesViaGrpc;
- private _writeFilesViaHttp;
- /**
- * Read a file from the sandbox.
- *
- * @param path - Absolute path in the sandbox filesystem
- * @returns File contents as a Buffer
- * @throws {SandboxNotFoundError} If the session no longer exists
- * @throws {FileOperationError} If the file cannot be read
- */
- readFile(path: string): Promise<Buffer>;
- private _readFileViaGrpc;
- private _readFileViaHttp;
- /**
- * Read a text file from the sandbox.
- *
- * @param path - Absolute path in the sandbox filesystem
- * @param encoding - Text encoding (default: utf-8)
- * @returns File contents as a string
- */
- readFileText(path: string, encoding?: BufferEncoding): Promise<string>;
- /**
- * List files in a directory within the sandbox.
- *
- * @param path - Directory path in the sandbox filesystem
- * @returns Array of file entries
- * @throws {SandboxNotFoundError} If the session no longer exists
- * @throws {FileOperationError} If the directory cannot be listed
- */
- listFiles(path: string): Promise<FileEntry[]>;
- /**
- * Set environment variables for subsequent commands.
- *
- * @param env - Dictionary of environment variables to set
- * @throws {SandboxNotFoundError} If the session no longer exists
- */
- setEnv(env: Record<string, string>): Promise<void>;
- private _setEnvViaGrpc;
- private _setEnvViaHttp;
- /**
- * Set the working directory for subsequent commands.
- *
- * @param cwd - The new working directory path
- * @throws {SandboxNotFoundError} If the session no longer exists
- */
- setCwd(cwd: string): Promise<void>;
- private _setCwdViaGrpc;
- private _setCwdViaHttp;
- /**
- * Start a long-running background process in the sandbox (e.g., a dev server).
- * Unlike `run()`, the process survives after the call returns.
- *
- * @param command - The shell command to execute (e.g., "npm run dev")
- * @param options - Background run options (port, env, cwd)
- * @returns Background process result with PID, port, and preview URL
- * @throws {SandboxNotFoundError} If the session no longer exists
- * @throws {CommandExecutionError} If the process couldn't be started
- */
- startBackground(command: string, options?: BackgroundRunOptions): Promise<BackgroundRunResult>;
- /**
- * Kill all background processes in this sandbox.
- *
- * Use this before starting a new background process to avoid port conflicts.
- */
- killBackground(): Promise<{
- killed: number[];
- total: number;
- }>;
- /**
- * Destroy this sandbox session.
- *
- * After calling this method, the sandbox cannot be used anymore.
- */
- destroy(): Promise<void>;
-}
-export {};
-//# sourceMappingURL=sandbox.d.ts.map
\ No newline at end of file
diff --git a/sdk/typescript/dist/sandbox.d.ts.map b/sdk/typescript/dist/sandbox.d.ts.map
deleted file mode 100644
index 688f92e9..00000000
--- a/sdk/typescript/dist/sandbox.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,EACV,aAAa,EACb,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAQjB,MAAM,WAAW,oBAAoB;IACnC,UAAU,CACR,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,GAAG,IAAI,EAAE,QAAQ,EAAE,kBAAkB,KAAK,IAAI,GAChF,IAAI,CAAC;IACR,SAAS,CACP,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,GAAG,IAAI,EAAE,QAAQ,EAAE,iBAAiB,KAAK,IAAI,GAC/E,IAAI,CAAC;IACR,UAAU,CACR,OAAO,EAAE,qBAAqB,EAC9B,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,GAAG,IAAI,EAAE,QAAQ,EAAE,sBAAsB,KAAK,IAAI,GACpF,IAAI,CAAC;IACR,QAAQ,CACN,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,YAAY,GAAG,IAA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100644
index 3ac4ce82..00000000
--- a/sdk/typescript/dist/sandbox.js
+++ /dev/null
@@ -1,559 +0,0 @@
-"use strict";
-/**
- * Sandbox session class for interacting with a running sandbox.
- */
-var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- var desc = Object.getOwnPropertyDescriptor(m, k);
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
- desc = { enumerable: true, get: function() { return m[k]; } };
- }
- Object.defineProperty(o, k2, desc);
-}) : (function(o, m, k, k2) {
- if (k2 === undefined) k2 = k;
- o[k2] = m[k];
-}));
-var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
- Object.defineProperty(o, "default", { enumerable: true, value: v });
-}) : function(o, v) {
- o["default"] = v;
-});
-var __importStar = (this && this.__importStar) || (function () {
- var ownKeys = function(o) {
- ownKeys = Object.getOwnPropertyNames || function (o) {
- var ar = [];
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
- return ar;
- };
- return ownKeys(o);
- };
- return function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
- __setModuleDefault(result, mod);
- return result;
- };
-})();
-Object.defineProperty(exports, "__esModule", { value: true });
-exports.Sandbox = void 0;
-const grpc = __importStar(require("@grpc/grpc-js"));
-const errors_1 = require("./errors");
-/**
- * A sandbox session that can execute commands and manage files.
- *
- * This class uses gRPC for fast command execution and file operations,
- * with HTTP fallback for session lifecycle management.
- */
-class Sandbox {
- /** Unique session identifier */
- sessionId;
- /** Preview URL for accessing web servers in the sandbox */
- previewUrl;
- _grpcStub;
- _httpBaseUrl;
- _destroyed = false;
- constructor(sessionId, grpcStub, httpBaseUrl, previewUrl = null) {
- this.sessionId = sessionId;
- this._grpcStub = grpcStub;
- this._httpBaseUrl = httpBaseUrl;
- this.previewUrl = previewUrl;
- }
- /**
- * Execute a shell command in the sandbox.
- *
- * @param command - The shell command to execute
- * @param options - Execution options (timeout, memory, etc.)
- * @returns Command result with stdout, stderr, exitCode, and signal
- * @throws {SandboxNotFoundError} If the session no longer exists
- * @throws {CommandExecutionError} If there was an error executing the command
- */
- async run(command, options = {}) {
- if (this._destroyed) {
- throw new errors_1.SandboxNotFoundError('Sandbox has been destroyed');
- }
- const { timeoutMs = 300000, memKb = 2097152, fsizeKb = 1048576, nofile = 256, env = {}, cwd = '', } = options;
- // Try gRPC first if available
- if (this._grpcStub) {
- return this._runViaGrpc(command, timeoutMs, memKb, fsizeKb, nofile, env, cwd);
- }
- // Fall back to HTTP
- return this._runViaHttp(command, timeoutMs, memKb, fsizeKb, nofile, env, cwd);
- }
- async _runViaGrpc(command, timeoutMs, memKb, fsizeKb, nofile, env, cwd) {
- const request = {
- session_id: this.sessionId,
- command: ['/bin/sh', '-c', command],
- time_ms: timeoutMs,
- mem_kb: memKb,
- fsize_kb: fsizeKb,
- nofile: nofile,
- env: env,
- cwd: cwd,
- };
- return new Promise((resolve, reject) => {
- this._grpcStub.runCommand(request, (error, response) => {
- if (error) {
- if (error.code === grpc.status.NOT_FOUND) {
- reject(new errors_1.SandboxNotFoundError('Session not found'));
- }
- else {
- reject(new errors_1.CommandExecutionError(`gRPC error: ${error.message}`));
- }
- return;
- }
- resolve({
- stdout: response.stdout,
- stderr: response.stderr,
- exitCode: response.exit_code,
- signal: response.signal,
- });
- });
- });
- }
- async _runViaHttp(command, timeoutMs, memKb, fsizeKb, nofile, env, cwd) {
- const response = await fetch(`${this._httpBaseUrl}/sessions/${this.sessionId}/run`, {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({
- command: ['/bin/sh', '-c', command],
- time: timeoutMs,
- mem: memKb,
- fsize: fsizeKb,
- nofile: nofile,
- env: env,
- cwd: cwd || '/',
- }),
- });
- if (!response.ok) {
- if (response.status === 404) {
- throw new errors_1.SandboxNotFoundError('Session not found');
- }
- const text = await response.text();
- throw new errors_1.CommandExecutionError(`HTTP error: ${response.status} ${response.statusText} - ${text}`);
- }
- const result = await response.json();
- return {
- stdout: result.stdout,
- stderr: result.stderr,
- exitCode: result.exit_code ?? 0,
- signal: result.signal ?? 0,
- };
- }
- /**
- * Write content to a file in the sandbox.
- *
- * @param path - Absolute path in the sandbox filesystem
- * @param content - File content (string or Buffer)
- * @throws {SandboxNotFoundError} If the session no longer exists
- * @throws {FileOperationError} If the file cannot be written
- */
- async writeFile(path, content) {
- if (this._destroyed) {
- throw new errors_1.SandboxNotFoundError('Sandbox has been destroyed');
- }
- const buffer = typeof content === 'string' ? Buffer.from(content, 'utf-8') : content;
- // Try gRPC first if available
- if (this._grpcStub) {
- return this._writeFileViaGrpc(path, buffer);
- }
- // Fall back to HTTP
- return this._writeFileViaHttp(path, buffer);
- }
- async _writeFileViaGrpc(path, content) {
- const request = {
- session_id: this.sessionId,
- path: path,
- content: content,
- };
- return new Promise((resolve, reject) => {
- this._grpcStub.writeFile(request, (error, response) => {
- if (error) {
- if (error.code === grpc.status.NOT_FOUND) {
- reject(new errors_1.SandboxNotFoundError('Session not found'));
- }
- else {
- reject(new errors_1.FileOperationError(`gRPC error: ${error.message}`));
- }
- return;
- }
- if (!response.success) {
- reject(new errors_1.FileOperationError(`Failed to write file: ${response.error}`));
- return;
- }
- resolve();
- });
- });
- }
- async _writeFileViaHttp(path, content) {
- const response = await fetch(`${this._httpBaseUrl}/sessions/${this.sessionId}/files/write`, {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({
- path: path,
- content: content.toString('base64'),
- }),
- });
- if (!response.ok) {
- if (response.status === 404) {
- throw new errors_1.SandboxNotFoundError('Session not found');
- }
- const text = await response.text();
- throw new errors_1.FileOperationError(`HTTP error: ${response.status} ${response.statusText} - ${text}`);
- }
- }
- /**
- * Write multiple files to the sandbox in a single request.
- *
- * @param files - Array of files with path and content
- * @throws {SandboxNotFoundError} If the session no longer exists
- * @throws {FileOperationError} If any file cannot be written (partial success possible)
- */
- async writeFiles(files) {
- if (this._destroyed) {
- throw new errors_1.SandboxNotFoundError('Sandbox has been destroyed');
- }
- const buffered = files.map((f) => ({
- path: f.path,
- content: typeof f.content === 'string' ? Buffer.from(f.content, 'utf-8') : f.content,
- }));
- // Try gRPC first if available
- if (this._grpcStub) {
- return this._writeFilesViaGrpc(buffered);
- }
- // Fall back to HTTP
- return this._writeFilesViaHttp(buffered);
- }
- async _writeFilesViaGrpc(files) {
- const request = {
- session_id: this.sessionId,
- files: files.map((f) => ({ path: f.path, content: f.content })),
- };
- return new Promise((resolve, reject) => {
- this._grpcStub.writeFiles(request, (error, response) => {
- if (error) {
- if (error.code === grpc.status.NOT_FOUND) {
- reject(new errors_1.SandboxNotFoundError('Session not found'));
- }
- else {
- reject(new errors_1.FileOperationError(`gRPC error: ${error.message}`));
- }
- return;
- }
- if (!response.success) {
- const msgs = response.errors.map((e) => `${e.path}: ${e.error}`).join('; ');
- reject(new errors_1.FileOperationError(`Failed to write files: ${msgs}`));
- return;
- }
- resolve();
- });
- });
- }
- async _writeFilesViaHttp(files) {
- const response = await fetch(`${this._httpBaseUrl}/sessions/${this.sessionId}/files/write-bulk`, {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({
- files: files.map((f) => ({
- path: f.path,
- content: f.content.toString('base64'),
- })),
- }),
- });
- if (!response.ok) {
- if (response.status === 404) {
- throw new errors_1.SandboxNotFoundError('Session not found');
- }
- const text = await response.text();
- throw new errors_1.FileOperationError(`HTTP error: ${response.status} ${response.statusText} - ${text}`);
- }
- const result = await response.json();
- if (!result.success) {
- const msgs = result.errors.map((e) => `${e.path}: ${e.error}`).join('; ');
- throw new errors_1.FileOperationError(`Failed to write files: ${msgs}`);
- }
- }
- /**
- * Read a file from the sandbox.
- *
- * @param path - Absolute path in the sandbox filesystem
- * @returns File contents as a Buffer
- * @throws {SandboxNotFoundError} If the session no longer exists
- * @throws {FileOperationError} If the file cannot be read
- */
- async readFile(path) {
- if (this._destroyed) {
- throw new errors_1.SandboxNotFoundError('Sandbox has been destroyed');
- }
- // Try gRPC first if available
- if (this._grpcStub) {
- return this._readFileViaGrpc(path);
- }
- // Fall back to HTTP
- return this._readFileViaHttp(path);
- }
- async _readFileViaGrpc(path) {
- const request = {
- session_id: this.sessionId,
- path: path,
- };
- return new Promise((resolve, reject) => {
- this._grpcStub.readFile(request, (error, response) => {
- if (error) {
- if (error.code === grpc.status.NOT_FOUND) {
- reject(new errors_1.SandboxNotFoundError('Session not found'));
- }
- else {
- reject(new errors_1.FileOperationError(`gRPC error: ${error.message}`));
- }
- return;
- }
- if (response.error) {
- reject(new errors_1.FileOperationError(`Failed to read file: ${response.error}`));
- return;
- }
- resolve(Buffer.from(response.content));
- });
- });
- }
- async _readFileViaHttp(path) {
- const url = new URL(`${this._httpBaseUrl}/sessions/${this.sessionId}/files/read`);
- url.searchParams.set('path', path);
- const response = await fetch(url.toString());
- if (!response.ok) {
- if (response.status === 404) {
- throw new errors_1.SandboxNotFoundError('Session not found');
- }
- const text = await response.text();
- throw new errors_1.FileOperationError(`HTTP error: ${response.status} ${response.statusText} - ${text}`);
- }
- const result = await response.json();
- return Buffer.from(result.content, 'base64');
- }
- /**
- * Read a text file from the sandbox.
- *
- * @param path - Absolute path in the sandbox filesystem
- * @param encoding - Text encoding (default: utf-8)
- * @returns File contents as a string
- */
- async readFileText(path, encoding = 'utf-8') {
- const content = await this.readFile(path);
- return content.toString(encoding);
- }
- /**
- * List files in a directory within the sandbox.
- *
- * @param path - Directory path in the sandbox filesystem
- * @returns Array of file entries
- * @throws {SandboxNotFoundError} If the session no longer exists
- * @throws {FileOperationError} If the directory cannot be listed
- */
- async listFiles(path) {
- if (this._destroyed) {
- throw new errors_1.SandboxNotFoundError('Sandbox has been destroyed');
- }
- const url = new URL(`${this._httpBaseUrl}/sessions/${this.sessionId}/files/list`);
- url.searchParams.set('path', path);
- const response = await fetch(url.toString());
- if (!response.ok) {
- if (response.status === 404) {
- throw new errors_1.SandboxNotFoundError('Session not found');
- }
- const text = await response.text();
- throw new errors_1.FileOperationError(`HTTP error: ${response.status} ${response.statusText} - ${text}`);
- }
- const result = await response.json();
- return result.files.map((f) => ({
- name: f.name,
- path: f.path,
- isDirectory: f.is_directory,
- size: f.size,
- }));
- }
- /**
- * Set environment variables for subsequent commands.
- *
- * @param env - Dictionary of environment variables to set
- * @throws {SandboxNotFoundError} If the session no longer exists
- */
- async setEnv(env) {
- if (this._destroyed) {
- throw new errors_1.SandboxNotFoundError('Sandbox has been destroyed');
- }
- // Try gRPC first if available
- if (this._grpcStub) {
- return this._setEnvViaGrpc(env);
- }
- // Fall back to HTTP
- return this._setEnvViaHttp(env);
- }
- async _setEnvViaGrpc(env) {
- const request = {
- session_id: this.sessionId,
- env: env,
- };
- return new Promise((resolve, reject) => {
- this._grpcStub.setEnv(request, (error) => {
- if (error) {
- if (error.code === grpc.status.NOT_FOUND) {
- reject(new errors_1.SandboxNotFoundError('Session not found'));
- }
- else {
- reject(error);
- }
- return;
- }
- resolve();
- });
- });
- }
- async _setEnvViaHttp(env) {
- const response = await fetch(`${this._httpBaseUrl}/sessions/${this.sessionId}/env`, {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ env }),
- });
- if (!response.ok) {
- if (response.status === 404) {
- throw new errors_1.SandboxNotFoundError('Session not found');
- }
- throw new Error(`HTTP error: ${response.status} ${response.statusText}`);
- }
- }
- /**
- * Set the working directory for subsequent commands.
- *
- * @param cwd - The new working directory path
- * @throws {SandboxNotFoundError} If the session no longer exists
- */
- async setCwd(cwd) {
- if (this._destroyed) {
- throw new errors_1.SandboxNotFoundError('Sandbox has been destroyed');
- }
- // Try gRPC first if available
- if (this._grpcStub) {
- return this._setCwdViaGrpc(cwd);
- }
- // Fall back to HTTP
- return this._setCwdViaHttp(cwd);
- }
- async _setCwdViaGrpc(cwd) {
- const request = {
- session_id: this.sessionId,
- cwd: cwd,
- };
- return new Promise((resolve, reject) => {
- this._grpcStub.setCwd(request, (error) => {
- if (error) {
- if (error.code === grpc.status.NOT_FOUND) {
- reject(new errors_1.SandboxNotFoundError('Session not found'));
- }
- else {
- reject(error);
- }
- return;
- }
- resolve();
- });
- });
- }
- async _setCwdViaHttp(cwd) {
- const response = await fetch(`${this._httpBaseUrl}/sessions/${this.sessionId}/cwd`, {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ cwd }),
- });
- if (!response.ok) {
- if (response.status === 404) {
- throw new errors_1.SandboxNotFoundError('Session not found');
- }
- throw new Error(`HTTP error: ${response.status} ${response.statusText}`);
- }
- }
- /**
- * Start a long-running background process in the sandbox (e.g., a dev server).
- * Unlike `run()`, the process survives after the call returns.
- *
- * @param command - The shell command to execute (e.g., "npm run dev")
- * @param options - Background run options (port, env, cwd)
- * @returns Background process result with PID, port, and preview URL
- * @throws {SandboxNotFoundError} If the session no longer exists
- * @throws {CommandExecutionError} If the process couldn't be started
- */
- async startBackground(command, options = {}) {
- if (this._destroyed) {
- throw new errors_1.SandboxNotFoundError('Sandbox has been destroyed');
- }
- const { port = 5173, env = {}, cwd = '' } = options;
- const response = await fetch(`${this._httpBaseUrl}/sessions/${this.sessionId}/background`, {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({
- command: ['/bin/sh', '-c', command],
- port,
- env,
- cwd: cwd || '/',
- }),
- });
- if (!response.ok) {
- if (response.status === 404) {
- throw new errors_1.SandboxNotFoundError('Session not found');
- }
- const text = await response.text();
- throw new errors_1.CommandExecutionError(`Failed to start background process: ${response.status} - ${text}`);
- }
- const result = await response.json();
- return {
- pid: result.pid,
- port: result.port,
- previewUrl: result.preview_url,
- };
- }
- /**
- * Kill all background processes in this sandbox.
- *
- * Use this before starting a new background process to avoid port conflicts.
- */
- async killBackground() {
- if (this._destroyed) {
- throw new errors_1.SandboxNotFoundError('Sandbox has been destroyed');
- }
- const response = await fetch(`${this._httpBaseUrl}/sessions/${this.sessionId}/background`, {
- method: 'DELETE',
- });
- if (!response.ok) {
- if (response.status === 404) {
- throw new errors_1.SandboxNotFoundError('Session not found');
- }
- const text = await response.text();
- throw new errors_1.CommandExecutionError(`Failed to kill background processes: ${response.status} - ${text}`);
- }
- return await response.json();
- }
- /**
- * Destroy this sandbox session.
- *
- * After calling this method, the sandbox cannot be used anymore.
- */
- async destroy() {
- if (this._destroyed) {
- return;
- }
- try {
- const response = await fetch(`${this._httpBaseUrl}/sessions/${this.sessionId}`, {
- method: 'DELETE',
- });
- // Best effort cleanup - ignore errors
- void response;
- }
- catch {
- // Ignore errors during cleanup
- }
- finally {
- this._destroyed = true;
- }
- }
-}
-exports.Sandbox = Sandbox;
-//# sourceMappingURL=sandbox.js.map
\ No newline at end of file
diff --git a/sdk/typescript/dist/sandbox.js.map b/sdk/typescript/dist/sandbox.js.map
deleted file mode 100644
index d7908602..00000000
--- a/sdk/typescript/dist/sandbox.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAsC;AAQtC,qCAIkB;AA4GlB;;;;;GAKG;AACH,MAAa,OAAO;IAClB,gCAAgC;IACvB,SAAS,CAAS;IAE3B,2DAA2D;IAClD,UAAU,CAAgB;IAE3B,SAAS,CAA8B;IACvC,YAAY,CAAS;IACrB,UAAU,GAAG,KAAK,CAAC;IAE3B,YACE,SAAiB,EACjB,QAAqC,EACrC,WAAmB,EACnB,aAA4B,IAAI;QAEhC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC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;IACH,CAAC;CACF;AAzmBD,0BAymBC"}
\ No newline at end of file
diff --git a/sdk/typescript/dist/types.d.ts b/sdk/typescript/dist/types.d.ts
deleted file mode 100644
index 51eb5463..00000000
--- a/sdk/typescript/dist/types.d.ts
+++ /dev/null
@@ -1,119 +0,0 @@
-/**
- * TypeScript type definitions for OpenSandbox SDK.
- */
-/**
- * Result of a command execution in the sandbox.
- */
-export interface CommandResult {
- /** Standard output from the command */
- stdout: string;
- /** Standard error from the command */
- stderr: string;
- /** Exit code (0 for success) */
- exitCode: number;
- /** Signal number if process was killed by a signal */
- signal: number;
-}
-/**
- * Options for running a command in the sandbox.
- */
-export interface RunOptions {
- /** CPU time limit in milliseconds (default: 300000) */
- timeoutMs?: number;
- /** Memory limit in KB (default: 2097152) */
- memKb?: number;
- /** Maximum file size in KB (default: 1048576) */
- fsizeKb?: number;
- /** Maximum number of open files (default: 256) */
- nofile?: number;
- /** Additional environment variables */
- env?: Record<string, string>;
- /** Working directory for the command */
- cwd?: string;
-}
-/**
- * Options for creating a new sandbox session.
- */
-export interface CreateOptions {
- /** Initial environment variables */
- env?: Record<string, string>;
- /** Session timeout in seconds (default: 300) */
- timeout?: number;
-}
-/**
- * Options for the OpenSandbox client.
- */
-export interface ClientOptions {
- /** gRPC port (default: 50051) */
- grpcPort?: number;
- /** Use insecure gRPC connection even for HTTPS base URL */
- grpcInsecure?: boolean;
- /** HTTP request timeout in milliseconds (default: 30000) */
- timeout?: number;
-}
-/**
- * File entry from directory listing.
- */
-export interface FileEntry {
- /** File or directory name */
- name: string;
- /** Full path within the sandbox */
- path: string;
- /** Whether this entry is a directory */
- isDirectory: boolean;
- /** File size in bytes (0 for directories) */
- size: number;
-}
-/**
- * Session information returned by the server.
- */
-export interface SessionInfo {
- /** Unique session ID */
- id: string;
- /** Environment variables */
- env: Record<string, string>;
- /** Current working directory */
- cwd: string;
- /** Session age in seconds */
- ageSecs: number;
- /** Idle time in seconds */
- idleSecs: number;
- /** Preview URL for web servers (if configured) */
- previewUrl: string | null;
- /** Exposed ports */
- ports: number[];
- /** Session status */
- status: 'running' | 'idle' | 'terminating';
-}
-/**
- * Options for starting a background process (e.g., a dev server).
- */
-export interface BackgroundRunOptions {
- /** Port the process will listen on (default: 5173) */
- port?: number;
- /** Additional environment variables */
- env?: Record<string, string>;
- /** Working directory for the command */
- cwd?: string;
-}
-/**
- * Result of starting a background process.
- */
-export interface BackgroundRunResult {
- /** PID of the background process */
- pid: number;
- /** Port the process is listening on */
- port: number;
- /** Preview URL to access the web server */
- previewUrl: string | null;
-}
-/**
- * Response from creating a session.
- */
-export interface CreateSessionResponse {
- /** Unique session ID */
- sessionId: string;
- /** Preview URL for web servers (if configured) */
- previewUrl: string | null;
-}
-//# sourceMappingURL=types.d.ts.map
\ No newline at end of file
diff --git a/sdk/typescript/dist/types.d.ts.map b/sdk/typescript/dist/types.d.ts.map
deleted file mode 100644
index a630dee6..00000000
--- a/sdk/typescript/dist/types.d.ts.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,sDAAsD;IACtD,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kDAAkD;IAClD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,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ACvC,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,wCAAwC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oCAAoC;IACpC,GAAG,EAAE,MAAM,CAAC;IACZ,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,wBAAwB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,kDAAkD;IAClD,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B"}
\ No newline at end of file
diff --git a/sdk/typescript/dist/types.js b/sdk/typescript/dist/types.js
deleted file mode 100644
index 0bfaad42..00000000
--- a/sdk/typescript/dist/types.js
+++ /dev/null
@@ -1,6 +0,0 @@
-"use strict";
-/**
- * TypeScript type definitions for OpenSandbox SDK.
- */
-Object.defineProperty(exports, "__esModule", { value: true });
-//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/sdk/typescript/dist/types.js.map b/sdk/typescript/dist/types.js.map
deleted file mode 100644
index 764f3122..00000000
--- a/sdk/typescript/dist/types.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
\ No newline at end of file