Files
Arcrun/.gitignore
T
Leo 5a164843ef refactor(cypher): 第一刀拆分——UI 搬 CF Pages,ingest 從必爆變穩定
根因(leo 2026-07-21 三個判斷全被數字證實):
- 「cypher 展開上萬行,當時我就懷疑這樣跑得動嗎」→ 15,446 行、bundle 748KB
- 「不相信 CF 連讀文字檔都會撞牆」→ 不是 CF 的問題,是 cypher 太肥
- 「它違反了樂高化的原則」→ 零件 4KB,調度它們的 cypher 是巨石

定位錯誤(比效能更根本):console.ts:1 自陳「Mira Console」,而 wiki 明載
「Mira 是 Arcrun 的使用者,不是開發者」→ 使用者的前端寫進了框架的執行引擎。
CLI/MCP 都已拆成獨立薄殼,唯獨 UI 沒有。責任誠實記:console.ts 標
「2026-07-04 總管派工」,是總管當初選了「就近寫在 cypher」的方便路。

本刀:
- console.ts(1623行) + portal-ui.ts(1390行) 移出 → console-ui/ CF Pages 專案
  (單檔 HTML + 原生 JS,零 build step,保持原特性)
- index.ts 移除兩個路由掛載、修 implicit any
- console-dashboard.ts 只留 API(UI 部分移出)

實測驗收(leo 指定判準:不看 /health,看真實任務):
| 測試 | 拆分前 | 拆分後 |
|---|---|---|
| 連灌 10 張新卡(無間隔) | 從未成功 | 10 張全 create、73 條三元組 |
| 同卡連跑 6 次 | 前 2 過、後 4 全 1102 | 6 次全過 |
| Bundle | 747.9 KB | 528.0 KB(-29%) |

Pages 已上線:arcrun-console-ui.pages.dev(console/portal 皆 200)
cypher API 正常:/health、/console/dashboard-data 皆 200

未做(第二刀):console-dashboard/portal/portal-data 尚未拆,cypher 仍 528KB。
但 ingest 已穩定,急迫性下降。

註:部署撞到三個既有 self-hosted 陷阱(KV/D1 id 是官方帳號的、arcrun.dev route
leo21c 無該 zone),用 wrangler.leo21c.toml 繞過,未改原始設定檔。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 18:55:31 +08:00

55 lines
2.5 KiB
Plaintext
Raw 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.
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
# 任何測試/真實憑證一律不進 repo2026-06-03:曾誤 commit GCP SA 金鑰被 GitHub push protection 擋)
docs/test_credentials/
*.sa.json
*-service-account*.json
# ── 開發痕跡進 repoD22 翻案 2026-07-03InkStoneCo 頂層決策)──
# 舊規則(2026-06-03「開發痕跡不對外」)立於 GitHub 終將公開的前提。
# 現 repo 真身在自有 Gitea privateclone 者是雲端工人: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
# GitHub 公開 mirror 工作目錄(publish-github.sh 產物)
.github-public/
wrangler.leo21c.toml