ad367e450d
🔴 根因:5a16484 把 UI 搬 CF Pages 時「移出 → console-ui/」實際上只搬了 build 產物(HTML),三支 renderer 原始檔被刪且沒搬 → `npm run build` 從那天起 ENOENT 死掉,線上 HTML 是刪檔前烤好的, 一個月來無法重建(CONSOLE_PROFILE 改了也不會生效,因為 build 跑不起來)。 修法: - 從 git 撈回 console.ts(1623)/portal-ui.ts(1390)/console-dashboard.ts(822) 放進 console-ui/src/——UI 原始碼跟著 UI 專案走,才是那一刀的原意 - build.mjs 加 resolveSource():本地 src/ 優先,找不到才回退 cypher-executor 新增具名部署目標(deploy.targets.json + scripts/deploy.mjs): 一個目標=帳號+profile+apiBase 綁在一起,解決三次帶漏參數: - demo 站漏 CONSOLE_PROFILE=rag → 顯示個人版 7 頁駕駛艙(leo「進去是 Mira 介面」的真因) - 兩站漏 ARCRUN_API_BASE → apiBase 空 → 前端打自己 405 → 登不進去 - 兩帳號都有同名 arcrun-console-ui 專案且 wrangler OAuth 登入在 uncle6 → 不指定帳號 deploy 會部到 demo 站(差點蓋掉,改用 API token 鎖帳號) npm run deploy:personal → leo21c, profile=full(7頁), apiBase 指 leo21c worker npm run deploy:enterprise → uncle6, profile=rag(4頁落地搜尋), apiBase 指 cypher.arcrun.dev 實測(用戶真的會走的路): - mira.uncle6.me/console/ 200,VIEWS 7 頁,apiBase 對,CORS ACAO 通 - rag-demo.arcrun.dev 4 頁落地搜尋;登入 OK、搜「藍鯨導航儀」5 筆(未受部署影響) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
46 lines
2.0 KiB
JSON
46 lines
2.0 KiB
JSON
{
|
|
"_readme": [
|
|
"部署目標定義檔(leo 2026-07-22 立)。一個目標=一組『帳號+profile+apiBase+專案名』。",
|
|
"",
|
|
"為什麼要這個檔:5a16484 把 UI 搬 CF Pages 後,這些值從 worker 環境變數變成 build 期參數。",
|
|
"誰部署誰要記得帶 → 帶漏了就退回預設,而預設值對兩邊都不對。今天實際踩到的:",
|
|
" · demo 站漏 CONSOLE_PROFILE=rag → 顯示個人版 7 頁駕駛艙(leo 看到『Mira 介面』的真因)",
|
|
" · 兩站都漏 ARCRUN_API_BASE → apiBase 空字串 → 前端打自己回 405 → 登不進去",
|
|
" · 兩個帳號有同名 arcrun-console-ui 專案,wrangler 又登入在 uncle6",
|
|
" → 不指定帳號直接 deploy 會部到 demo 站上(差點蓋掉)",
|
|
"",
|
|
"版本差異(leo 2026-07-22 定調):頁面都存在,由 profile 決定顯示哪些。",
|
|
" personal(full) 個人版:7 頁全開,落地駕駛艙",
|
|
" enterprise(rag) 企業版:只留 搜尋/工作流/設定/card,落地搜尋頁",
|
|
" 未來擴充:個人版新用戶上限 1、知識庫權限不可用 → 加在對應目標的欄位裡,別再散進部署指令。",
|
|
"",
|
|
"用法:npm run deploy:personal / npm run deploy:enterprise"
|
|
],
|
|
|
|
"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",
|
|
"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",
|
|
"limits": {
|
|
"maxUsers": null,
|
|
"libraryPermissions": true
|
|
}
|
|
}
|
|
}
|