fix(cli): MCP self-hosted discovery + config setup

- deploy.ts: discoverWorkerDirs 掃 mcp worker + 回傳 mcpUrl(對內 /mcp 端點)
- init.ts: initSelfHosted 寫入 config.mcp_url + 重跑 cmdMcpSetup
- config.ts: DEFAULT_MCP_URL 補 /mcp 後綴

Fixes mcp-account-source §3:self-hosted .mcp.json 必須指自己的 mcp worker,避免連官方失敗。

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
uncle6me-web
2026-06-08 13:23:02 +08:00
parent 5daeede45f
commit 2b46bea764
3 changed files with 25 additions and 2 deletions
+2 -1
View File
@@ -65,7 +65,8 @@ const ENV_MAP: Record<string, keyof ArcrunConfig> = {
* 平台預設 MCP URLmcp_url 未設時的 fallbackSaaS 用戶用)。
* MCP 搬進 arcrun 主庫後改用 arcrun.dev zonemcp/wrangler.toml route = mcp.arcrun.dev)。
*/
export const DEFAULT_MCP_URL = 'https://mcp.arcrun.dev';
// MCP streamable-http 端點是 /mcp(根路徑 404)。少了 /mcp → client 連線 Failed。
export const DEFAULT_MCP_URL = 'https://mcp.arcrun.dev/mcp';
/**
* 公庫 URLrecipe pull/search/submit-p 的對象,kbdb-base §7.5)。