Files
Arcrun/system-dev/wiki/cards/decisions/R2用途-平台零件不從R2讀.md
uncle6me-web 558e80b4da chore(wiki): wiki-init 補骨架 + system-dev-template 安裝/更新腳本
wiki 已初始化過(push 檔活躍維護),本次補從沒建的 pull 層 + arcrun 化範本:
- cards/decisions/ 14 張決策原子卡(含 gloss/實體/typed-edge 三元組):
  從 decisions-summary 全量改寫 13 + 新增「薄殼規則晚於實作-MCP漂移是歷史債」1
- TAXONOMY 從 PKM 範本換成 arcrun 軸(子系統 零件架構/cypher/credential/recipe/kbdb/
  薄殼/部署/平台原則 + 形態 架構決策/踩坑/機制說明/禁令/案例經驗)
- principles 填 13 條跨全局原則(從 rules/ + mindset 蒸餾)
- INDEX 真實視圖(子系統角度 + 決策角度,指向 cards)
- system-dev/scripts/ + scripts/ install/update 安裝腳本(template 接入)

純基建/文檔,無業務 code(功能 code 見前一 commit)。
raw source(docs/)0 異動、wiki 卡際連結無斷鏈。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 17:53:37 +08:00

34 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
tags: [零件架構, 部署, 架構決策]
gloss: 平台內建零件 WASM 已 bundle 進各自 Worker binary,不從 R2 動態讀。R2 只在 Phase 5(用戶自製零件)啟用。
---
# R2 用途 — 平台零件不從 R2 讀
← [[decisions/00-INDEX]]
**來源**`system-dev/wiki/decisions-summary.md`R2 的用途)、`.claude/rules/03-component-architecture.md §2`
**最後更新**2026-06-27
## 摘要
平台內建零件的 WASM 文件在部署時已 bundle 進各自 Worker 的 binary(透過 codeload tarball);R2 存儲的機制只為 Phase 5(用戶上傳自製零件)保留。
## 重點
- 平台零件 = 獨立 Worker,已部署完成,走 HTTP URL 呼叫;沒有 R2 動態載入那一步。
- WASM 文件的位置:`registry/components/{name}/` 是原始碼,`.component-builds/{name}/component.wasm` 是編譯產物,commit 進 repo 後作為 codeload 部署來源。
- R2 存儲的唯一用途:Phase 5 啟用時,用戶透過 `acr component submit` 上傳自製 .wasm → R2 存儲 → runtime 動態執行(當時 API 才支援 `GET /user/{id}/components/{name}/wasm`)。
- 當前「怎麼從 R2 取 WASM」是典型誤問——错误假设的标志。
## 實體
- **平台內建零件**platform components)— 由 arcrun 官方維護、已編譯成 .wasm、獨立部署成 Worker 的零件(gmail、telegram、http_request 等)。
- **R2**Cloudflare R2)— 對象存儲服務,當前未用於平台零件;Phase 5 起用於存放用戶自製零件。
- **codeload 部署**tarball deployment)— 透過 GitHub codeload tarball 或 git clone + local build,把平台零件連同依賴打進 Worker binary 的部署方式。
- **用戶自製零件**user-submitted components)— Phase 5 後用戶上傳的自定義 WASM 零件(動態來源)。
## 關聯
### 內文知識關係
- 平台內建零件 >> 不從 >> R2
- R2 >> 保留用於 >> 用戶自製零件
- 平台內建零件 >> 透過 codeload 部署 >> 獨立 Worker
### 卡片關係
- [[R2用途-平台零件不從R2讀]] >> 架構前提來自 >> [[service-binding-vs-cypher-binding]]