diff --git a/mcp/wrangler.stage.toml b/mcp/wrangler.stage.toml new file mode 100644 index 0000000..8f98c44 --- /dev/null +++ b/mcp/wrangler.stage.toml @@ -0,0 +1,56 @@ +# ── arcrun-mcp STAGE(youlin 帳號)──────────────────────────────────────────────── +# +# 這支存在的理由(2026-08-10,Leo/mira#4): +# `arcrun-mcp` 不在安裝器出貨的那批裡,所以「升級某台的 arcrun-mcp」一直沒有測試場, +# 要驗只能拿 leo21c(唯一一份 47.9 萬筆知識的真身)去冒險。這支把 stage 補上: +# youlin = stage(agent-memory「兩台分工」:AI 測 youlin、leo 核實 prod)。 +# +# 用法(在 mcp/ 目錄下跑,-c 必須與 main="src/index.ts" 同目錄,否則找不到入口): +# cd mcp +# CLOUDFLARE_ACCOUNT_ID=1129efd7df2e8899d537e9c8fbabb6cb \ +# CLOUDFLARE_API_TOKEN="$CLOUDFLARE_API_TOKEN_YOULIN_CC_USE" \ +# npx wrangler deploy -c wrangler.stage.toml +# +# 與出貨用的 wrangler.toml 的差別,就是「手動直推 arcrun-mcp 到自架帳號」的兩個坑 +# (agent-memory 已記,這裡是把它變成檔案而不是靠人記得): +# ① 拿掉 [[routes]] —— `mcp.arcrun.dev` 那個 zone 在 uncle6,自架帳號沒有,帶著會部署失敗 +# ② OAUTH_KV 填真 id —— 出貨 toml 是佔位符 REPLACE_WITH_REAL_KV_ID,只有走 acr init/update +# 才會被自動注入;直推必須自己填(沒填 → /authorize 回 503,OAuth 整條死) +# +# 🔴 [vars] 必須列**全**:wrangler deploy 會用本檔的 vars 整組取代線上的,漏一個就是靜默清掉。 +# 下方七個 var 是 2026-08-10 從線上 arcrun-mcp 抓下來的原樣值。 +# Secrets(KBDB_INTERNAL_TOKEN / MCP_OWNER_SECRET)不進本檔也不會被 deploy 洗掉。 + +name = "arcrun-mcp" +main = "src/index.ts" +compatibility_date = "2024-11-27" +compatibility_flags = [ "nodejs_compat" ] +workers_dev = true + +[vars] +MULTI_TENANT = "false" +CF_ACCOUNT_ID = "1129efd7df2e8899d537e9c8fbabb6cb" +WORKER_SUBDOMAIN = "youlin-hsieh-dev" +CONSOLE_TENANT = "yuga3bse" +MCP_OWNER_NAMESPACE = "yuga3bse" +KBDB_BASE_URL = "https://arcrun-kbdb.youlin-hsieh-dev.workers.dev" +UI_ORIGINS = "https://arcrun-rag-ui.youlin-hsieh-dev.workers.dev" +# 部署標記,GET /health 原樣回報。每次重推 stage 就換一個,別讓它跟線上脫節。 +MCP_BUILD = "stage-2026-08-10+5b231e6" + +[[services]] +binding = "COMPONENT_REGISTRY" +service = "arcrun-registry" + +[[services]] +binding = "CYPHER_EXECUTOR" +service = "arcrun-cypher-executor" + +[[services]] +binding = "KBDB" +service = "arcrun-kbdb" + +# youlin 的 OAuth KV(安裝器建的 arcrun-rag-yuga3bse-kv-oauth_kv)。 +[[kv_namespaces]] +binding = "OAUTH_KV" +id = "6a8d4dd621994607b3998ade4c7e9944"