{ "_readme": [ "部署目標定義檔(leo 2026-07-22 立)。一個目標=一組『帳號+profile+apiBase+專案名+對外網址』。", "", "為什麼要這個檔:5a16484 把 UI 搬 CF Pages 後,這些值從 worker 環境變數變成部署期參數。", "誰部署誰要記得帶 → 帶漏了就退回預設,而預設值對兩邊都不對。實際踩過的:", " · demo 站漏 CONSOLE_PROFILE=rag → 顯示個人版 7 頁駕駛艙(leo 看到『Mira 介面』的真因)", " · 兩站都漏 ARCRUN_API_BASE → apiBase 空字串 → 前端打自己回 405 → 登不進去", " · 兩個帳號有同名 arcrun-console-ui 專案,wrangler 又登入在 uncle6", " → 不指定帳號直接 deploy 會部到 demo 站上(差點蓋掉)", "", "🔴 第四次(2026-08-08 發現,同一種病換了形式):", " 上面三次的『解』是 deploy.targets.json + build.mjs 在 build 時把 profile/apiBase", " 烤進產物。但 t160(e744ad1)為了清世代債把 build.mjs 整支刪掉、改成直接託管 public/,", " **沒有人把『把宣告值寫進產物』這件事接手過去** ⇒ deploy.mjs 照樣在終端機印", " 『profile:full / apiBase:…leo21c…』,推上去的卻是 public/config.js 裡凍住的", " cypher.arcrun.dev + 凍在 4 頁的 VIEWS。也就是說:", " **`npm run deploy:personal` 會把個人站的 API 打到企業 demo 的後端、頁面砍成 4 頁**,", " 而終端機從頭到尾顯示『成功』。(第三次的 accountId 是靠 env 傳的,倖存;前兩次的解等於被還原。)", "", " → 現在的規矩:**產物由 deploy.mjs 依本檔即時產生(staging 目錄),", " 推之前驗產物、推之後驗線上網址**。public/ 裡不再放任何跟目標有關的值。", " · public/config.js 已刪除——它是產物不是原始碼(自架站的 /config.js 由", " arcrun-rag 的 build-ui-bundle 動態產生,不吃這個檔)", " · public/console/index.html 的 VIEWS/HOME 只是本機 preview 的預設值,", " 部署時一律被 _profiles 覆寫,覆寫沒命中就中止部署", "", "版本差異(leo 2026-07-22 定調):頁面都存在,由 profile 決定顯示哪些。", " personal(full) 個人版:7 頁全開,落地駕駛艙", " enterprise(rag) 企業版:只留 搜尋/工作流/設定/card,落地搜尋頁", " 未來擴充:個人版新用戶上限 1、知識庫權限不可用 → 加在對應目標的欄位裡,別再散進部署指令。", "", "用法:npm run deploy:personal / npm run deploy:enterprise", " npm run deploy:personal -- --dry-run (只產出並驗產物,不推)", " npm run verify (不部署,只驗線上各站現況=宣告值)" ], "_profiles": { "full": { "description": "個人版:7 頁全開,落地駕駛艙", "views": ["cockpit", "search", "card", "workflows", "creds", "inbox", "settings"], "home": "cockpit" }, "rag": { "description": "企業版:搜尋/card/工作流/設定,落地搜尋頁", "views": ["search", "card", "workflows", "settings"], "home": "search" } }, "personal": { "description": "leo 私人實例(原 Mira)。入口 mira.uncle6.me → leo21c worker。", "accountId": "51a01bfa2665bd7bc3fd080dc40cf3e1", "projectName": "arcrun-console-ui", "profile": "full", "brand": "Arcrun", "apiBase": "https://arcrun-cypher-executor.leo21c.workers.dev", "verifyUrls": ["https://mira.uncle6.me", "https://arcrun-console-ui.pages.dev"], "limits": { "maxUsers": 1, "libraryPermissions": false } }, "enterprise": { "description": "企業版 demo 站。rag-demo.arcrun.dev → uncle6 帳號 cypher。", "accountId": "58309bb90fd93ad6d0fe0aae99170e9d", "projectName": "arcrun-console-ui", "profile": "rag", "brand": "Arcrun", "apiBase": "https://cypher.arcrun.dev", "verifyUrls": ["https://rag-demo.arcrun.dev"], "limits": { "maxUsers": null, "libraryPermissions": true } } }