add-e2b-route
/add-e2b-route
Add an E2B-SDK-compatible route under /e2b/... by mirroring the Daytona facade pattern. The /e2b package does not exist yet — copy pkg/api/daytona/ as the template. Forces the open create-idempotency design question to be answered before coding. Use when the user asks to "build the e2b facade", "add an /e2b route", "make E2B Python SDK work with X", or work on plans/sdk-compatibility/e2b/. Proactively suggest when an E2B SDK call needs server-side support.
- Author
- aerol-ai ↗
- Repository
- microvm ↗
- Licence
- MIT
- Last repository change
- 20.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 20.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Add an E2B-SDK-compatible route under /e2b/... by mirroring the Daytona facade pattern. The /e2b package does not exist yet — copy pkg/api/daytona/ as the template. Forces the open create-idempotency design question to be answered before coding. Use when the user asks to "build the e2b facade", "add an /e2b route", "make E2B Python SDK work with X", or work on plans/sdk-compatibility/e2b/. Proactively suggest when an E2B SDK call needs server-side support.
Triggers from the description
Original author description
Add an E2B-SDK-compatible route under /e2b/... by mirroring the Daytona facade pattern. The /e2b package does not exist yet — copy pkg/api/daytona/ as the template. Forces the open create-idempotency design question to be answered before coding. Use when the user asks to "build the e2b facade", "add an /e2b route", "make E2B Python SDK work with X", or work on plans/sdk-compatibility/e2b/. Proactively suggest when an E2B SDK call needs server-side support.
How it works
- Status
- Steps
- Blocker: create-path idempotency
- Idempotency for other E2B routes
SKILL.md preview
---
name: add-e2b-route
description: Add an E2B-SDK-compatible route under /e2b/... by mirroring the Daytona facade pattern. The /e2b package does not exist yet — copy pkg/api/daytona/ as the template. Forces the open create-idempotency design question to be answered before coding. Use when the user asks to "build the e2b facade", "add an /e2b route", "make E2B Python SDK work with X", or work on plans/sdk-compatibility/e2b/. Proactively suggest when an E2B SDK call needs server-side support.
---
# Add an E2B compatibility route
E2B compatibility is **planned, not yet built**. The canonical design is in [`plans/sdk-compatibility/e2b/facade-plan.md`](../../plans/sdk-compatibility/e2b/facade-plan.md). Read it before coding — the open design questions there are not optional polish, they're blockers.
## Status
- `pkg/api/e2b/` does **not exist yet**. The first PR that adds an `/e2b` route creates it.
- `internal/service/e2b.go` exists and currently holds metadata-storage helpers (Upsert/Get/List/Delete for sandbox metadata and snapshots).
- `pkg/models/e2b.go` exists with `E2BSandboxMetadata` and `E2BSnapshotMetadata`.
- Store helpers exist on `*Store`: `UpsertE2BSandboxMetadata`, `GetE2BSandboxMetadata`, `ListE2BSandboxMetadata`, `UpsertE2BSnapshot`, `GetE2BSnapshot`, `ListE2BSnapshots`, `DeleteE2BSnapshot`.
## Steps
1. **Create the package.** Copy the file shape of `pkg/api/daytona/`:
```
pkg/api/e2b/
routes.go const PathPrefix = "/e2b"; RegisterRoutes(mux, Deps)
handlers.go newHandlers(Deps); thin wire ↔ service translation
dto.go E2B-shaped DTOs
contract_test.go E2B SDK wire-shape contracts
handlers_test.go
```
2. **Wire into the server.** In `pkg/api/server.go` `routes()`, add `e2b.RegisterRoutes(s.mux, e2b.Deps{...})` next to the existing `daytona.RegisterRoutes` and `apiv1.RegisterRoutes` calls. The Deps shape is the same (`Service`, `Logger`, `Auth`).
3. **Service-layer helpers** go in `internal/service/e2b.go`. Keep `internal/service` version-agnostic — no `if facade == "e2b"`.
4. **Store helpers** go in `internal/store/store.go`. Mirror the existing `Daytona*` and `E2B*` shapes. Use additive schema only.
5. **Update** `plans/sdk-compatibility/e2b/facade-plan.md` support tables when you mark a route done.
## Blocker: create-path idempotency
`POST /e2b/sandboxes` is the open design question.
The upstream E2B create body has `templateID`, timeout/lifecycle inputs, metadata, env vars, network options, secure mode, and volume mounts — but **no caller-supplied sandbox name, alias, or request ID**. There is no natural stable key for retry deduplication.
You must pick a deterministic retry story before coding the create handler. Options (in order of preference):
1. **Persisted request fingerprint.** Hash the canonical form of the create body, persist `(fingerprint, sandbox_id)` in a new table, and dedupe within a TTL window. Survives daemon restarts. Required schema change in `internal/store/store.go`.
2. **Explicit `Idempotency-Key` header.** E2B SDK doesn't send one today, but the facade can accept one and propagate it. Sandbox under the assumption that clients without the header get a documented "may double-create on retry" warning.
3. **Best-effort dedupe in memory.** Simplest; loses guarantees across daemon restarts. Not acceptable for production per `pr-review.md` §1 — listed only to be argued against.
Whichever you pick, write it down in the facade-plan.md and the PR description.
## Idempotency for other E2B routes
Each of these needs an explicit retry story (`pr-review.md` §1):
- `POST /e2b/sandboxes/{id}/connect`
- `POST /e2b/sandboxes/{id}/pause`
- `POST /e2b/sandboxes/{id}/timeout`
- `POST /e2b/sandboxes/{id}/snapshots`
- `DELETE /e2b/templates/{id}`
Pattern from the existing facades: lookups return the existing resource on retry; state transitions are no-ops if already in the target state.
Versions
The database has no other skills named add-e2b-route.
Database snapshot: 13.11.2026 · package version 19747ff4e006 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100add-daytona-route
Add a Daytona-SDK-compatible route under /daytona/... by translating Daytona's wire shape to internal/service calls. Keeps version branching out of internal/. Use when the user asks to "support this in the Daytona facade", "add a /daytona route", "make Daytona SDK work with X",… - 100add-v1-endpoint
Add a new route under /v1/... to the AerolVM HTTP server. Walks through DTOs, handler, route registration, service-layer call, tests, and the idempotency check. Use when the user asks to "add a v1 endpoint", "add an API route", "add a new HTTP handler", or describes a new… - 96add-route
Add an HTTP route or a new resource to this Axum API with its store, error mapping and tests. Use when the user asks for a new endpoint, resource, field or HTTP method. - 100daytona-webhooks
Receive and verify Daytona webhooks (sandbox infrastructure for AI code). Use when setting up Daytona webhook handlers, debugging Svix signature verification (svix-id, svix-timestamp, svix-signature, whsec_ secret), or handling events like sandbox.created, sandbox.state.updated,… - 100daytona
Daytona CLI setup, sandbox debugging, keep a sandbox alive, secrets volume, snapshot refresh. Use when Daytona itself is the problem, not for running tests (see run-tests). - 100add-harness-package
Guide for adding new AI SDK harness packages. Use when creating a new @ai-sdk/harness-<name> package that adapts a coding-agent runtime to HarnessV1.