feat(#11): CLI/MCP 薄殼對齊 — P0 run 死端點修 + P1 list 同源 + R4 防複發機制

P0 CLI run 改打 /webhooks/named/:name/trigger 真端點(原打 /webhooks/<name> 死端點 404)。
P1 CLI/MCP list 收斂到 GET /webhooks/named(KV 同源):
   - CLI list 停 CfKvClient 直連 KV,順手修 key 前綴 bug(原讀 workflow: 對不上部署的 {apiKey}:wf:)
     + self-hosted 不再需 CF API token。
   - MCP u6u_list_workflows 從讀 KBDB record 改讀 GET /webhooks/named(registry 簽名加 partnerToken)。
R4 防複發機制:
   - cli-mcp-capability-matrix.md(13 能力對照,docs/ gitignored 不進此 commit,僅本機)
   - thin-shell-smoke.sh(對真端點斷言非 404,本機手動跑非 CI/cron)
   - 機制自驗:注入故意死端點當場攔下、exit 1。

依賴關係:本批依賴 #8(webhooks-named GET 補 description/created_at 欄位、search/backfill 端點),
故疊在 feat/issue-8 branch 上、作獨立 commit。

⚠️ tsc 綠 = code done 非完成。端到端待 leo21c(CLI/MCP 真打通 200 非 404、smoke 對已部署 prod
全綠——目前 smoke 揭 #8 search/backfill 在 prod 仍 404=未部署)。P2 validate 收斂待 #10、
tag resource_id 語意債待方向①。#11 留 open。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
uncle6me-web
2026-06-27 19:36:58 +08:00
parent 558e80b4da
commit 5d38b599fd
5 changed files with 161 additions and 55 deletions
+3 -1
View File
@@ -97,9 +97,11 @@ export async function cmdRun(workflowName: string, options: RunOptions): Promise
}
// ── 玩法二:本機沒這個 YAML → 按名字打已 push 到 KV 的 workflow ───────────────
// thin-shell-alignment P0issue #11):原打 /webhooks/${name} 是死端點(404)。
// 真端點是 /webhooks/named/:name/triggerwebhooks-named.ts:279X-Arcrun-API-Key header)。
const spinner = ora(`執行 workflow "${workflowName}"`).start();
try {
const res = await fetch(`${executorUrl}/webhooks/${workflowName}`, {
const res = await fetch(`${executorUrl}/webhooks/named/${workflowName}/trigger`, {
method: 'POST',
headers,
body: JSON.stringify(inputContext),