Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ func main() {

### What gets installed

| Language | Core SDK | Providers |
| ---------- | -------------------------------------------- | ---------------------------------------------- |
| TypeScript | `@sandbox-kit/sandbox` | `@sandbox-kit/daytona`, `@sandbox-kit/modal`, `@sandbox-kit/blaxel` |
| Language | Core SDK | Providers |
| ---------- | -------------------------------------------- | ---------------------------------------------------------------------- |
| TypeScript | `@sandbox-kit/sandbox` | `@sandbox-kit/daytona`, `@sandbox-kit/modal`, `@sandbox-kit/blaxel` |
| Go | `github.com/sandbox-kit/kit/sdks/go/sandbox` | `.../providers/daytona`, `.../providers/modal`, `.../providers/blaxel` |

Install only the provider you use. The core SDK exposes the shared client
Expand Down Expand Up @@ -263,8 +263,9 @@ More detail: [responses and errors](docs/responses-and-errors.md).
Go helpers: `Value(v)` for optional scalars, `Duration(d)` for timeouts.
- Unsupported settings fail before provider calls; quotas stay provider-enforced.
- Memory and disk are MiB. Modal CPU: fractional cores from 0.125 (0.001 steps).
Daytona: whole cores and whole GiB expressed as MiB. Blaxel: `memoryMib` /
`memory_mib` maps 1:1; Blaxel derives CPU from memory.
Daytona: whole cores and whole GiB expressed as MiB. Blaxel: set
`memoryMib` / `memory_mib` (Blaxel documents MB; Kit does not convert); CPU
follows memory.

Guides: [configuration](docs/configuration.md) ·
[creation](docs/sandbox-creation.md) ·
Expand All @@ -285,17 +286,17 @@ Open http://localhost:3000. Docs are organized as Quickstart, Concepts, Provider

These pages are the behavior reference for the same API:

| Guide | Covers |
| -------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| [Client configuration](docs/configuration.md) | Auth, scope, defaults, deadlines |
| [Sandbox creation](docs/sandbox-creation.md) | Fields, units, policies |
| [Sandbox lifecycle](docs/sandbox-lifecycle.md) | Get, attach, capabilities |
| [Filesystem](docs/filesystem.md) | Read, write, copy, list, stat, mkdir, remove |
| [Process](docs/process.md) | Run a command and wait for exit code + output |
| [Providers](docs/providers.md) | Daytona, Modal, and Blaxel |
| [Responses and errors](docs/responses-and-errors.md) | Error details and provider causes |
| [TS Daytona](sdks/typescript/providers/daytona/README.md) / [Modal](sdks/typescript/providers/modal/README.md) / [Blaxel](sdks/typescript/providers/blaxel/README.md) | TypeScript provider notes |
| [Go Daytona](sdks/go/providers/daytona/README.md) / [Modal](sdks/go/providers/modal/README.md) / [Blaxel](sdks/go/providers/blaxel/README.md) | Go provider notes |
| Guide | Covers |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| [Client configuration](docs/configuration.md) | Auth, scope, defaults, deadlines |
| [Sandbox creation](docs/sandbox-creation.md) | Fields, units, policies |
| [Sandbox lifecycle](docs/sandbox-lifecycle.md) | Get, attach, capabilities |
| [Filesystem](docs/filesystem.md) | Read, write, copy, list, stat, mkdir, remove |
| [Process](docs/process.md) | Run a command and wait for exit code + output |
| [Providers](docs/providers.md) | Daytona, Modal, and Blaxel |
| [Responses and errors](docs/responses-and-errors.md) | Error details and provider causes |
| [TS Daytona](sdks/typescript/providers/daytona/README.md) / [Modal](sdks/typescript/providers/modal/README.md) / [Blaxel](sdks/typescript/providers/blaxel/README.md) | TypeScript provider notes |
| [Go Daytona](sdks/go/providers/daytona/README.md) / [Modal](sdks/go/providers/modal/README.md) / [Blaxel](sdks/go/providers/blaxel/README.md) | Go provider notes |

## License

Expand Down
14 changes: 6 additions & 8 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ does not change the handle.

## Provider support

The bindings use Modal v0.11.1, Daytona v0.225.0, `@blaxel/core@0.3.36`, and
`github.com/blaxel-ai/sdk-go@v0.31.0`.
The bindings target Modal, Daytona, and Blaxel. Pinned dependency versions live
in each provider package.

| Setting | Modal | Daytona | Blaxel |
| ---------------- | ---------------------------------------------------------- | --------------------------------- | ------------------------------ |
Expand All @@ -68,9 +68,8 @@ created. Omit `auth` when the provider should use credentials it already finds
in the environment. Daytona can take the organization from that environment
when you use a bearer token and leave organization unset.

TypeScript Blaxel clients share `@blaxel/core` process-global `settings`. Use
one Blaxel Kit client, or one credential set, per process; a second client
overwrites the first.
In TypeScript, use one Blaxel client (or one API key) per process. A second
client with different credentials replaces the first.

A remote endpoint uses HTTPS. HTTP is accepted for `localhost` or a loopback
address. A URL with a username, password, or fragment is rejected. Daytona uses
Expand All @@ -91,9 +90,8 @@ deadline or abort signal that arrives earlier still applies.
Daytona create keeps its 60-second default when the timeout is omitted and
when it is explicit zero. Daytona start, stop, pause, and delete use that
60-second default when the timeout is omitted, and treat explicit zero as no
operation timeout. Blaxel uses the Kit deadline for create. `@blaxel/core`
also accepts a native creation timeout (1–50 whole seconds); this provider
does not forward it. The Go Blaxel SDK has no equivalent argument.
operation timeout. On Blaxel, your client/create `timeout` is how long create
may take.

## Credentials

Expand Down
12 changes: 7 additions & 5 deletions docs/filesystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,13 @@ entries, err := instance.Filesystem().ListDirectory(ctx, "/tmp/kit-files", nil)

## Read metadata

`Stat` returns one path. A symlink result describes the symlink. Modal can
report a symlink. Daytona reports a file or a directory. `mode` is an octal
string when the provider supplies one, such as `0644`. `permissions`, `owner`,
and `group` are set when the provider supplies them. `modifiedAt` is set when
the provider supplies a time.
`Stat` returns one path. A symlink result describes the symlink. On Blaxel,
directories return type directory; files return type file, with size and
permission fields when Blaxel provides them. Modal can report a symlink.
Daytona reports a file or a directory. `mode` is an octal string when the
provider supplies one, such as `0644`. `permissions`, `owner`, and `group` are
set when the provider supplies them. `modifiedAt` is set when the provider
supplies a time.

```ts
const info = await sandbox.filesystem.stat("/tmp/note.txt");
Expand Down
21 changes: 9 additions & 12 deletions docs/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ How providers run the command:

| You pass | Daytona | Modal | Blaxel |
| -------- | ------------------------- | ------------------------ | ------------------------- |
| `argv` | POSIX-quoted shell string | argument list as-is | POSIX-quoted shell string |
| `argv` | One quoted shell command string | argument list as-is | One quoted shell command string |
| `shell` | shell string as-is | `bash -c` with that text | shell string as-is |

## Working directory and environment
Expand Down Expand Up @@ -66,31 +66,28 @@ code.
| `timeout: 0` / `Duration(0)` | Do not add an extra client deadline for this call |
| Positive timeout | Cap this call; must be a whole number of seconds (`5000` ms or `5 * time.Second` is fine; `1500` ms is rejected, field `timeout`) |

Omit or zero also means **no separate provider process auto-kill** (see
Omit or zero also means **no separate provider process time limit** (see
provider quirks). Provider quirks:

- **Daytona** — if you omit a native timeout, Daytona defaults to 10 seconds.
This client therefore uses timeout `0` for omit/zero so the command is not
capped at 10 seconds.
- **Modal** — omit/zero adds no Modal command limit. In TypeScript the client
omits `timeoutMs` (sending `0` is rejected by Modal).
- **Blaxel** — omit or zero adds no Blaxel process auto-kill. Timeouts must
be whole seconds. A positive timeout of at most 60 seconds uses Blaxel's
blocking completion request. Omit, zero, and longer timeouts start the
command and poll until it ends. The Kit deadline and cancel stop that
wait and leave the remote command running. A positive timeout still sets
Blaxel's process auto-kill. An HTTP 504 during the wait is a timeout error.
- **Blaxel** — omit or zero waits until the command ends (or you cancel), with
no Blaxel process time limit. Positive timeouts must be whole seconds and
cap how long the command may run. Canceling stops waiting; the remote
command may keep running. If the wait times out, you get a timeout error.

Cancel behavior:

- **Go** — cancel or a deadline on the context ends the wait and returns an
error. The handle stays busy until that provider call returns.
- **TypeScript** — abort rejects the `await`. The remote command may keep
running. Daytona and Modal do not observe the signal inside exec. Blaxel
polls stop when the signal aborts. A Blaxel run whose timeout is 1–60
seconds uses a completion request that does not observe the signal. The
handle stays busy until the provider call settles, so the next call on
the same handle does not overlap it.
waits stop when the signal aborts. The handle stays busy until the
provider call settles, so the next call on the same handle does not
overlap it.

```ts
const result = await sandbox.process.run({
Expand Down
3 changes: 1 addition & 2 deletions docs/providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ volume fields; Blaxel, Daytona, and Modal volumes stay out of create),
browsers, streaming process handles, sessions, PTY, and macOS or Windows
creation are outside it.

TypeScript Blaxel uses `@blaxel/core` process-global `settings`: one Blaxel
Kit client, or one credential set, per process.
In TypeScript, use one Blaxel client (or one API key) per process.

See [configuration](configuration.md), [creation](sandbox-creation.md),
[lifecycle](sandbox-lifecycle.md), [filesystem](filesystem.md), and
Expand Down
4 changes: 4 additions & 0 deletions docs/responses-and-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ An error that Kit could not classify keeps an unknown kind and the original
cause. A kind is a category. It is not a signal that retrying is safe, and
Kit does not retry for you.

On Blaxel, creating a sandbox whose name already exists returns
`AlreadyExists`. If a delete is still finishing or another conflict occurs,
you get `Conflict`.

## After a failure

An error does not prove that no sandbox exists. Readiness or metadata handling
Expand Down
Loading
Loading