fix(self-hosted): 身份改明碼 namespace(.env)+ path-based webhook trigger

壓測 §7.2:seed 通了但 creds push/push/runtime 全卡「缺少 api_key」——
self-hosted init 從不發 api_key,但三條路徑都建在多租戶 {api_key}:cred 模型上。

richblack 拍板:self-hosted 不需祕密 api_key,只需 namespace(分區標籤):
- config:ENV_MAP 加 NAMESPACE/ENCRYPTION_KEY + .env 自動載入(無 dotenv 依賴)
- namespace 明碼用戶自填(.env NAMESPACE=leo),沿用 api_key 路徑 → 零分叉
- encryption_key 用戶 .env 自填(工具不生成不 hash),須與 worker secret 一致
- creds/push/init:缺值改引導設 .env,不再叫去 register
- runtime:cypher 加 POST /webhooks/named/:ns/:name/trigger(namespace 走 path,
  公開表單免 header);與 header 路徑共用 triggerNamed,不分叉
- push:self-hosted 顯示 path-based 公開 webhook URL

誠實限制:namespace 明碼非密碼;防外部呼叫靠 webhook 保護(mindset §6)。
CLI 1.3.0 → 1.3.1。SDD: self-hosted-init.md §7.7。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
uncle6me-web
2026-06-06 17:30:16 +08:00
parent 772e4a12ff
commit 44b915554b
9 changed files with 148 additions and 29 deletions
+7
View File
@@ -3,6 +3,13 @@
> 由 `scripts/local-deploy.sh` 在 deploy 時自動維護(version bump + 此檔記錄)。
> 也可手動編輯補充細節。最新在最上。
## 1.3.1 — 2026-06-06
- self-hosted 身份改明碼 namespace.env 的 NAMESPACE,工具不發 api_key+ .env 自動載入
- creds push / push 缺值時引導設 .env NAMESPACE / ENCRYPTION_KEY(不再叫去 register
- push 對 self-hosted 顯示 path-based 公開 webhook URL(免 header,公開表單可打)
- cypher 加 POST /webhooks/named/:ns/:name/triggernamespace 走 path
- 修壓測 §7.2self-hosted init 不發 api_key 導致 creds push/push/runtime 全卡
## 1.3.0 — 2026-06-06
- MCP 搬進 arcrun/mcp/ + acr mcp-setup(依 config mcp_url 寫專案 .mcp.json,接案切資料夾自動切 MCP)
- config 加 mcp_url 三層解析(env ARCRUN_MCP_URL > 專案 > 全域)+ getMcpUrl()