You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create isolated sandboxes, then drive them with **gRPC**: run shell commands and manage files inside the sandbox VM. The SDK uses TLS to the sandbox `grpcServerUrl` and sends the API key in the `x-api-key` metadata header.
-`runCommand`, `uploadFile`, `mkDir`, and `downloadFile` wait until gRPC health reports **ready** (poll every 250 ms, up to **10 s**), then reuse that readiness for later calls on the same instance.
177
+
-`instance.data` is the current **Sandbox** payload (`grpcServerUrl`, `grpcApiKey`, `id`, `imageId`, etc.); see [SandboxInstance](#sandboxinstance).
178
+
133
179
## Prompt to use if you are asking LLM to write code
134
180
135
181
You can use the following prompt to ask LLM to write code that the YepCode Run SDK can execute.
@@ -392,6 +438,114 @@ interface Process {
392
438
}
393
439
```
394
440
441
+
### YepCodeSandbox
442
+
443
+
High-level wrapper around [`YepCodeApi`](#yepcodeapi) for sandbox **REST** operations. `create` returns a [`SandboxInstance`](#sandboxinstance) bound to the same API client for `updateTimeout` / `kill` on that instance.
444
+
445
+
#### Constructor
446
+
447
+
```typescript
448
+
constructor(config?:YepCodeApiConfig)
449
+
```
450
+
451
+
Uses the same options as [`YepCodeApi`](#yepcodeapi) (`apiToken`, `apiHost`, `teamId`, `clientId` / `clientSecret`, etc.).
452
+
453
+
#### Methods
454
+
455
+
| Method | Returns | Description |
456
+
|--------|---------|-------------|
457
+
|`create(data: CreateSandboxInput)`|`Promise<SandboxInstance>`| Create sandbox and return a connected instance |
458
+
|`updateTimeout(id: string, data: UpdateSandboxTimeoutInput)`|`Promise<Sandbox>`| Update timeout by sandbox **id**|
459
+
|`kill(id: string)`|`Promise<Sandbox>`| Kill sandbox by **id**|
0 commit comments