Repository navigation
Add Blaxel providers, examples, and docs - #44
Nabhag8848 wants to merge 64 commits into
Conversation
Expose an optional nonblank workspace field on the shared Scope contract, regenerate Go and TypeScript protobuf packages, and mirror the path constant in both public SDKs. Co-authored-by: Nabhag Motivaras <Nabhag8848@users.noreply.github.com>
Mirror the Modal provider layout with apiKey + workspace auth, required name/image create via SandboxInstance.create, get/refresh and delete by name, filesystem and blocking run, and Vitest rejection/mapping coverage. Co-authored-by: Nabhag Motivaras <Nabhag8848@users.noreply.github.com>
Pin github.com/blaxel-ai/sdk-go@v0.31.0, inventory the provider in specs/providers/blaxel.yaml, and mirror Modal/Daytona file roles for API-key plus workspace client config, name/image create, get/refresh by name, the shared filesystem surface, blocking Run, and delete. Co-authored-by: Nabhag Motivaras <Nabhag8848@users.noreply.github.com>
Land full Go and TypeScript example catalogs for Blaxel, align Go network mapping with ports and outbound domains, and update provider docs plus the website to describe Blaxel as a first-class provider. Co-authored-by: Nabhag Motivaras <Nabhag8848@users.noreply.github.com>
|
@cursoragent review it. is there anything which is wrongly wired. check provider docs and lets us know. |
|
Yes — a few things are wrongly wired or inconsistent with Blaxel’s docs. Real wiring issues
Docs/site
Fine as designed: native Full write-up is on PR #44. Say if you want those fixed on this branch. |
Review: Blaxel wiring vs provider docsReviewed Go/TS providers against Blaxel sandbox docs and our published READMEs/site. Core create/get/delete/FS/run shape matches the locked decisions (native Wrong / risky wiring
Docs / site gaps (not runtime bugs, but wrong for the Blaxel switcher)
Intentionally fine (not bugs)
Happy to patch (1)–(5) and fill the site |
|
@cursoragent can u look at other solution of provider + also seee other implementation within same codebase. get all the sdks of provider we have impleemented or not. then check and go ahead with what recommend. just take decision based on if u implement this if it creates more technical debt don't do it (thats the one of the way u verify that u are thinnking write way) go ahead. |
|
Compared Blaxel against Modal/Daytona and the native Blaxel SDKs, then only shipped fixes that cut Go↔TS drift without inventing unsupported APIs. Shipped in #45 →
Skipped (would add debt):
Waiting on CI for |
Fix reserved ports in examples, add Go TTL/memory floors to match TS, mark delete as Deleted/terminal in TS like Go, reject idle-disable consistently, and correct region/scope docs without inventing Go create timeout or private-field standby mapping. Co-authored-by: Nabhag Motivaras <Nabhag8848@users.noreply.github.com>
|
Went through Modal/Daytona + Blaxel SDKs and shipped the low-debt alignments on Did: reserved-ports examples, Go TTL/memory floors, TS delete terminal state, idle-disable reject, region/scope docs. Skipped on purpose: Go create-timeout (no native API), TS standby (no public |
Align Blaxel wiring with sibling providers
|
@cursoragent review again. check for everything that looks incorrect, wrong validations, wrong decisions, code smells, wrong ownership in code. look trhough and recommend. all the decisions should be backed by stromg valid reasons with proof u have checked provider sdks |
|
Second-pass review is on #44, checked against Must-fix: TS Keep (proven): max-age → Weak/wrong validations: memory ≥256 has no SDK/API proof — confirm or drop. Reserved ports still accepted by the provider (examples only were fixed). Ownership smells: process-global Say if you want a follow-up PR for Ready + the 256 floor. |
Second review (post-#45) — SDK-backedPinned SDKs checked: Must-fix / wrong decision1. Proof ( async wait({ maxWait = 60000, interval = 1000 } = {}) {
logger.warn("⚠️ Warning: sandbox.wait() is deprecated. You don't need to wait for the sandbox to be deployed anymore.");
return this;
}Kit still maps So Ready conflates three different things: a no-op deprecated wait, a required Kit timeout, and a destructive creation deadline. Go already rejects any non-default Recommend: Reject Correct — keep (with proof)
Wrong or weak validations2. Memory floor 256 MiB — unproven Enforced in Go + TS Recommend: Confirm against Blaxel support/API error for 3. Reserved ports not rejected in the provider Examples fixed, but create still maps 443/8080 (see Go Ownership / smells (judgement)4. TS
5. Go Rebuilds 6. Go Go 7. Still intentionally skipped (debt)
Suggested follow-up order
I can ship (1)–(2) on a small PR into this branch if you want. |
|
@cursoragent what all decisons u need from me which u are confused |
|
Only three need your call — everything else I already have a recommendation for:
No decision needed: I’ll fix TS Reply like |
|
Not confused on most of it — only these need a call from you: Need your decision
No decision needed — I’ll do this unless you say stop
Not asking you (already decided / won’t do)
Reply with e.g. |
|
@cursoragent go ahead with what u recommend and lean to I will review it before merge if there are things which needs more decisions implement all of it |
|
Shipped as 1A / 2A / 3A in #46 →
Waiting on CI for your review before merge. |
Reject WaitCondition.Ready in TS (sandbox.wait is a deprecated no-op), map provisioning.timeout only as Blaxel create timeout, drop the undocumented 256 MiB memory floor, pre-reject reserved ports, align SANDBOX_ALREADY_EXISTS to AlreadyExists, and document global settings. Co-authored-by: Nabhag Motivaras <Nabhag8848@users.noreply.github.com>
|
Shipped recommended leans as 1A / 2A / 3A on
Please review before merge. |
Fix Blaxel Ready conflation and unproven floors
Require client region and reject provisioning create timeout in both languages, map DEPLOYED+STANDBY to paused in TypeScript, and pin @blaxel/core 0.3.36. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M72D46E7HQX3GFKVGVZYM9A6
Accept Kit create timeout as the client deadline (Modal pattern), align Go/TS rejection paths, and document memory MiB→MB pass-through. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M72E9BJ8TVSP0DN6KT4ENVXT
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Soft-debt polish from the third-pass review is in #48 → this branch: dead create |
Scope bare 409 AlreadyExists to create, return real delete state with wait polling, and close Go/TS gaps that broke kind- and field-based app code. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop wait polling; a successful DELETE is reported as Deleted even when Blaxel finishes removal asynchronously. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the 60s completion-hold policy for one native process wait, and report file Stat from a single ls path without parent listing. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop builder-facing wording across guides, examples, and provider READMEs, and have TypeScript Stat use filesystem GET so file metadata matches Go. Co-authored-by: Cursor <cursoragent@cursor.com>
Polish Blaxel soft debt from third-pass review
Restore a Kit-owned delete poll when wait is true, drop obsolete Blaxel native/create leftovers, and rewrite product docs plus agent rules for end-user voice. Co-authored-by: Cursor <cursoragent@cursor.com>
Project a plain TS sandbox handle instead of mutating the native instance, and classify Http2Tls as Unsupported to match Blaxel's HTTP|TCP|UDP|TLS port protocols. Co-authored-by: Cursor <cursoragent@cursor.com>
Map 1–50s create timeouts to Blaxel's native timeout, fix FS NotFound field tagging and empty labels, and rewrite Blaxel website/docs for SDK callers. Co-authored-by: Cursor <cursoragent@cursor.com>
Stop inventing labels on TypeScript create, map remaining Blaxel control-plane codes, prefer provider codes over bare gateway status, and keep the YAML inventory and caller docs in sync. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M75HEJSYDFTDW4X6CH4Q3WAW
Treat lockdown as an internal control-plane failure like sibling create codes, and record the 5m TTL floor plus Ready/Started/Submitted wait rejects in YAML and caller docs. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M75J6E122PN6ST5N68VPHMXS
Drop the redundant resource unmapped path and unused TS exports so create validation and handle mapping stay on one clear path. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M75JKM1T3F2H1A383X6YBW7Z
Treat whitespace-only create names as required, pass Blaxel Stat name/path through without inventing, and document both for SDK callers. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M75KHG44HR3FXP1K7P3HHWMS
Map junk Stat bodies and empty list identities to InvalidResponse, and classify copyToLocal Node path failures as local_path so callers see the same kinds in both languages. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M75MAKHPB275KCG9MWHZ2DNP
Remap local_path only when the Node error path matches the destination, matching Go, and reuse one isDirectoryListing helper for Stat. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M75MHTVFCPY90FSC7B0H7EY6
Prefer X-Blaxel-Source then body origin like Go, fix the lifetime mapping comment, and note that Stat size may be zero. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M75NP65A11TKDYVKV5MMG3ME
Keep Blaxel info on the YAML mapSandboxInfo surface so Go matches TypeScript. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M75NXZCP7T0BYKYAR18Z4R3A
Wire the Go provider, all Go Blaxel examples, and the TypeScript provider into the harness so CI matches the tooling README. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M75PE7TRNR7FJ5MVCPQYZ6HZ
First Blaxel npm cut should start at 0.1.0; document that workspace may come from BL_WORKSPACE when omitted. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M75Q081EAWTAMYPAHHYVHQHR
Point Go/TS examples at Blaxel 0.1.0 and stop describing every npm package as 0.1.7. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M75QJ61YKYC189A1YFWH6KZZ
Keep examples and docs from setting an empty workspace; note Go vs TS edge-504 create behavior. Co-authored-by: Cursor <cursoragent@cursor.com> Entire-Checkpoint: 01M75RNQWQZ3DA1G8HBQ7PKK8X


Summary
Add Blaxel as an independently published provider for the shared Go and TypeScript Sandbox Kit clients. Applications can create, look up, run commands in, inspect files in, and delete Blaxel sandboxes through the same client/handle model used by the other providers.
The branch also hardens shared client boundaries across providers: response identity checks, public error context, cancellation and deadlines, input ownership, endpoint validation, and Go credential JSON handling. It adds runnable provider-specific examples and updates the website and Markdown guides for each language.
Native SDKs are pinned to
github.com/blaxel-ai/sdk-go@v0.31.0and@blaxel/core@0.3.36. The provider packages remain separate from the core sandbox package.Architecture
The provider owns the native SDK and translates its API into Kit types. Shared contract validation runs before provider validation; unsupported intent is rejected before provider calls. Closing a client or handle releases local resources and does not delete a cloud sandbox.
1. Blaxel configuration and creation
Scope.Workspaceto the protobuf client contract, regenerate Go/TypeScript contracts, and align the client inventory. Blaxel accepts an API key and workspace, withBL_API_KEY/BL_WORKSPACEfallbacks; create also requires a region.sdks/go/providers/blaxeland@sandbox-kit/blaxel. The TypeScript provider rejects a second incompatible Blaxel configuration in the same process because the pinned native SDK uses process-wide configuration.2. Lifecycle, process, and filesystem
Blaxel supports
get/refresh,delete, andclose; it does not expose Kit attach, start, stop, pause, archive, or terminate. Active and idle states map to running and paused. Successful delete reports deleted and terminal. Withoutwait, delete returns when accepted; withwait, Kit polls until the resource is removed or reports deleted.flowchart TD A[Delete by sandbox name] --> B[Native delete] B --> C{wait requested?} C -->|no| D[Return deleted / terminal] C -->|yes| E[Poll lookup] E --> F{Not found or deleted?} F -->|no| E F -->|yes| DProcess calls accept
argvorshell, return exit code/stdout/stderr, and treat nonzero exit codes as results. Arguments are shell-quoted for Blaxel's command interface. A positive Blaxel process timeout must be whole seconds; omitted or zero disables the native process time limit. Cancellation ends the caller's wait, but a remote command may continue.Filesystem support includes read/write, local copy in/out, mkdir, list, stat, and remove. Paths inside the sandbox must be absolute; mkdir defaults to creating parents and rejects
parents: false. Stat maps the type and size plus permissions/owner/group/modified time when reported. Local copy failures identifylocal_pathwhen applicable.3. Errors, cancellation, and provider behavior
AlreadyExistsfor an existing create name,Conflictwhile deletion is still completing,NotFoundfor missing resources, andTimeout/Canceledfor wait failures.get, even when the provider usesrefreshinternally).4. Credential serialization
Go credential pointers implement
encoding/jsonredaction, including credentials nested in the usual*sandbox.Config. OAuth output retains only the client ID. This affects JSON output, not the credential passed to the provider.Known limitation: marshaling an individual credential value directly with
encoding/jsoncan expose its fields; pointer redaction does not apply. Protobufprotojsonalso serializes schema fields. Avoid serializing credential values/configuration with those paths. Resolving value serialization completely requires a broader decision about the public protobuf-based credential representation.5. Documentation, examples, and tooling
Verification