Open
Conversation
HTTP bridge to forge-gateway (Rust/Axum) for deterministic execution in Firecracker microVMs. Zero external dependency — self-hosted. Implements all 6 Isolator methods via REST API.
Add .changeset/forge-isolator.md marking @sandboxxjs/core as minor bump. Add ForgeIsolator.test.ts with three bun:test cases covering default gatewayUrl, no-op destroy, and ExecutionError on gateway failure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
新增
ForgeIsolator,填補IsolatorType中e2b的空缺。Forge 是一個自託管的 Rust/Axum gateway,透過 HTTP 橋接到 Firecracker microVM,提供確定性執行環境。與 e2b 不同,Forge 零外部依賴、零 API 費用。
改動
packages/core/src/isolators/ForgeIsolator.ts(172 行)IsolatorType加入"forge"Sandbox.ts和index.ts加入 export使用方式
需要先啟動 forge-gateway(預設
http://127.0.0.1:3456)。技術細節
ForgeIsolator 實作 Isolator 的 6 個方法,內部全部是 HTTP call:
POST /v1/sandbox→ 建立 sandboxPOST /v1/sandbox/:id/shell→ 執行命令POST /v1/sandbox/:id/execute→ 執行代碼DELETE /v1/sandbox/:id→ 銷毀使用原生
fetch,不引入額外依賴。錯誤處理沿用ExecutionError/FileSystemError。後續計劃
相關專案