feat(code): Workers 就緒化(裁定 A)—— singlefile variant + 純 JS SHA-256 prelude
- 沙箱改用 quickjs-emscripten singlefile variant(wasm 內嵌 base64、同步載入), CF Workers 相容;sandbox.mjs 成 Node/Worker 共用 runtime-agnostic 核心。 - sha256 curated builtin 改「純 JS SHA-256 prelude 字串注入」,去掉 node:crypto / async Web Crypto host-call,Node/Worker 皆決定性(card content_hash 逐字等價)。 - index.ts 成可部署 Worker host(Hono,POST /→runCode),自足不走 TinyGo 模板流程。 - 補 wrangler.toml(arcrun-code / code.arcrun.dev)、tsconfig、DEPLOY.md。 - contract stability 修為 floating(過 registry zod schema 驗證)。 - 單測 12/12 全綠(含 card→envelope 與原模組 planCard 逐欄全等)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HJiLCRUU2o3aSpPEzVCt2o
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
name = "arcrun-code"
|
||||
main = "index.ts"
|
||||
compatibility_date = "2025-02-19"
|
||||
workers_dev = true
|
||||
|
||||
[vars]
|
||||
COMPONENT_ID = "code"
|
||||
|
||||
[[routes]]
|
||||
pattern = "code.arcrun.dev/*"
|
||||
zone_name = "arcrun.dev"
|
||||
Reference in New Issue
Block a user