621cb8d948
動機(Arcrun#4 後續,leo 批准):code 零件只有原始碼(registry/components/code), downloadAndDeploy 完全沒涵蓋它——tier1 只掃 .component-builds/*(TinyGo 家族,要求 component.wasm),tier2 寫死四個引擎。merge 後用戶跑 acr update 應真的裝上 code。 接法(實查後裁定): - code 是自足 Worker(quickjs-emscripten wasmfile variant,非 TinyGo;見其 index.ts 頭註), 「缺 wasm」的真相是「這一類根本不在部署清單」+「vendored quickjs.wasm 是 gitignored build 產物、不進 archive」。 - deploy.ts 新增 SELF_CONTAINED_COMPONENT_WORKERS(目錄 + 必要產物 gate,比照 tier1 component.wasm gate 的誠實跳過精神),discoverWorkerDirs 將其排進 tier1(零件先於引擎)。 - vendored quickjs.wasm(491KB)commit 進 repo:.gitignore 放行(完全比照 !.component-builds/**/component.wasm 的「部署物 wasm 例外」先例)→ acr update 從 Gitea archive 直接拿到,更新不需 npm build 工具鏈。 - 共享依賴抽成 SHARED_DEPLOY_DEPS 並補 quickjs-emscripten-core + wasmfile variant (版本對齊零件 package.json,測試看守 drift)→ root 裝一次、esbuild 往上 resolve。 - 注入零改動:既有 stripOfficialOnlyBindings 剝掉 code.arcrun.dev 官方 route、 workers_dev=true 保留 → self-hosted 自動落 arcrun-code.<sub>.workers.dev。 - parts.ts BUILTIN_COMPONENTS 加 code 條目(issue #13 W3:零件=靜態清單)→ acr parts 可見。 實查:init 本來就不對 registry 註冊任何零件(registry index 是官方 backfill 腳本的事), 故「比照其他零件」=進 BUILTIN_COMPONENTS 即對齊。 測試:cli/tests/deploy-code-component.test.ts 9 顆全綠(node --test,零新依賴): 部署清單含 code / 缺產物誠實跳過 / wasm 已 git 追蹤(會進 archive)/ SHARED_DEPLOY_DEPS 涵蓋零件全部 runtime deps + 版本一致 / route 剝除與 [vars] 保留 / parts 清單含 code。 tsc --noEmit 綠;零件自身 12 顆 vitest 綠(沙箱行為未動)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015d5jDbuqT5Htwv3Q88XXKk
51 lines
2.4 KiB
Plaintext
51 lines
2.4 KiB
Plaintext
node_modules/
|
||
.wrangler/
|
||
dist/
|
||
# wasm:預設排除(build 中間產物,如 registry/components/*.wasm)
|
||
*.wasm
|
||
# 例外:放行 .component-builds 的部署物 wasm — self-host 用戶 / acr init 從 repo 直接拿這份部署
|
||
# (推翻 rule 05 原「wasm 不 commit」慣例,見 .agents/specs/arcrun/sdk-and-website/self-hosted-init.md §6)
|
||
!.component-builds/**/component.wasm
|
||
# 例外:code 零件(自足 Worker)的 vendored quickjs.wasm 同屬部署物 —— acr init/update 從
|
||
# repo archive 直接部署(同上 .component-builds 放行邏輯)。來源=npm 套件
|
||
# @jitl/quickjs-wasmfile-release-sync 的 emscripten-module.wasm,由 postinstall vendor-wasm.mjs
|
||
# 產出、跟套件版本走(升版時重跑 npm install 再 commit 覆蓋)。約 491KB。
|
||
!registry/components/code/vendor/quickjs.wasm
|
||
# 但「錯做成零件」的再次排除(後出現的規則勝出):claude_api / km_writer / kbdb_upsert_block
|
||
# 不是 endpoint 薄殼,是把工作流硬塞進零件(違反 DECISIONS §1)→ 要降級成工作流/recipe,
|
||
# 不該進 repo 部署來源。commit 二進位進歷史無法乾淨移除 → 一開始就不放行。見 BACKLOG 降級待辦。
|
||
.component-builds/claude_api/component.wasm
|
||
.component-builds/km_writer/component.wasm
|
||
.component-builds/kbdb_upsert_block/component.wasm
|
||
credentials.yaml
|
||
~/.arcrun/
|
||
.env
|
||
.env.*
|
||
# 範本(無值,需進 repo 給 self-host 用戶 cp 成 .env)——必須放行
|
||
!.env.example
|
||
# 任何測試/真實憑證一律不進 repo(2026-06-03:曾誤 commit GCP SA 金鑰被 GitHub push protection 擋)
|
||
docs/test_credentials/
|
||
*.sa.json
|
||
*-service-account*.json
|
||
|
||
# ── 開發痕跡進 repo(D22 翻案 2026-07-03,InkStoneCo 頂層決策)──
|
||
# 舊規則(2026-06-03「開發痕跡不對外」)立於 GitHub 終將公開的前提。
|
||
# 現 repo 真身在自有 Gitea private,clone 者是雲端工人:docs/SDD、wiki、
|
||
# CLAUDE.md、.claude/、.agents/ 都必須進 repo(缺=雲端斷糧,T1.5 卡點實證)。
|
||
# 未來上 GitHub 公開=一次性發佈篩選,不在日常 gitignore 綁死。
|
||
# 例外仍不推:機敏值(本檔各處既有規則照舊)+ .github/(防 Actions 復燃,D20 同源)
|
||
.github/
|
||
|
||
# macOS
|
||
.DS_Store
|
||
|
||
# Local AI tooling artifacts (Claude Code swarm + ruvector)
|
||
.swarm/
|
||
ruvector.db
|
||
**/.swarm/
|
||
**/ruvector.db
|
||
scripts/__pycache__/
|
||
# D1 備份/匯出(wrangler d1 export 產物,含整庫全量資料=機敏,絕不 commit)
|
||
*.sql
|
||
backup-*.sql
|