60f5f10ba5
n8n Code node 式逃生口:config 帶 inline JS、stdin 帶 input JSON、
stdout 回 {success,data}|{success:false,error,error_type}。
沙箱=QuickJS-wasm:user JS 跑在 QuickJS context,global 只有純 ECMAScript
內建 + 唯一 curated builtin sha256(純函式);碰不到網路/檔案/env/secret/
Worker 物件圖。資源上限:timeout(interrupt)/memory/stack/output/code size。
本輪=設計+PoC,未部署 leo21c。sandbox.mjs + test/ 為 Node/vitest 可跑實作
(12 測試全綠,含 card→envelope 與原模組 planCard 逐欄全等)。index.ts 為
Worker host 骨架、DESIGN.md 記錄機制/安全性質/生產路徑/設計岔路(A/B)。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJiLCRUU2o3aSpPEzVCt2o
26 lines
580 B
Markdown
26 lines
580 B
Markdown
---
|
||
tags: [arcrun, 測試]
|
||
gloss: 一張測沙箱用的示範卡片。
|
||
pipeline_candidate: true
|
||
---
|
||
# 沙箱示範卡
|
||
|
||
← [[notes/00-INDEX]]
|
||
|
||
這張卡引用了 [[notes/arcrun-runtime]] 與 [[notes/quickjs-sandbox]]。
|
||
|
||
## 實體
|
||
|
||
- **QuickJS**(quickjs/qjs)— 小型 JS 直譯器,可編成 wasm。
|
||
- **wazero** — Go 寫的 WASI runtime。
|
||
- **workerd** — Cloudflare Worker 的開源 runtime。
|
||
|
||
## 關聯
|
||
|
||
### 內文知識關係
|
||
- QuickJS >> 編譯成 >> wasm
|
||
- workerd >> 執行 >> wasm
|
||
|
||
### 卡片關係
|
||
- [[沙箱示範卡]] >> 依賴 >> [[notes/arcrun-runtime]]
|