From a410af0b6ccd7dfd558af14b0887db139500ef85 Mon Sep 17 00:00:00 2001 From: uncle6me-web Date: Sun, 14 Jun 2026 22:16:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(cypher):=20KBDB=20proxy=20=E6=8C=87?= =?UTF-8?q?=E5=90=91=E7=8F=BE=E5=BD=B9=20arcrun-kbdb=EF=BC=88=E8=88=8A=20f?= =?UTF-8?q?allback=20kbdb.finally.click=20=E5=B7=B2=E6=AD=BB=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 煙霧測試發現 proxy fallback 寫死舊的 kbdb.finally.click(inkstone 遺留、 回 Missing token),非現役 KBDB。改: - kbdb-proxy.ts fallback → arcrun-kbdb.uncle6-me.workers.dev(現役、無 auth) - cypher wrangler.toml [vars] KBDB_BASE_URL 明設現役 URL(self-host fork 覆蓋自己的) 現役 arcrun-kbdb 無 auth middleware,不需 KBDB_INTERNAL_TOKEN。 cli 版本檔 1.3.8→1.3.9(deploy 腳本自動 bump,含 acr kbdb 命令)。 cypher tsc exit 0。 Co-Authored-By: Claude Opus 4.8 (1M context) --- cli/CHANGELOG.md | 4 ++++ cli/package-lock.json | 4 ++-- cli/package.json | 2 +- cypher-executor/src/routes/kbdb-proxy.ts | 9 +++++++-- cypher-executor/wrangler.toml | 5 +++++ 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index c2544cb..a45856a 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -1,5 +1,9 @@ # arcrun CLI Changelog +## 1.3.9 — 2026-06-14 +- feat(kbdb,mcp): KBDB 資料層薄殼 + self-hosted MCP 認證 + cypher KBDB proxy + + ## 1.3.8 — 2026-06-13 - perf(self-hosted): acr update 共享一次 install 取代 23 個 worker 各裝 324MB diff --git a/cli/package-lock.json b/cli/package-lock.json index 6680c22..3d880bd 100644 --- a/cli/package-lock.json +++ b/cli/package-lock.json @@ -1,12 +1,12 @@ { "name": "arcrun", - "version": "1.3.8", + "version": "1.3.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "arcrun", - "version": "1.3.8", + "version": "1.3.9", "license": "MIT", "dependencies": { "chalk": "^5.3.0", diff --git a/cli/package.json b/cli/package.json index 70620d0..458e8ae 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "arcrun", - "version": "1.3.8", + "version": "1.3.9", "description": "AI Workflow CLI for arcrun — self-host WASM-based AI workflows on your own Cloudflare", "bin": { "acr": "dist/index.js" diff --git a/cypher-executor/src/routes/kbdb-proxy.ts b/cypher-executor/src/routes/kbdb-proxy.ts index 4ed486b..a62971a 100644 --- a/cypher-executor/src/routes/kbdb-proxy.ts +++ b/cypher-executor/src/routes/kbdb-proxy.ts @@ -23,9 +23,14 @@ import type { Bindings } from '../types'; export const kbdbProxyRouter = new Hono<{ Bindings: Bindings }>(); -/** KBDB 基本盤 base URL + internal headers(沿用 webhook-handlers.ts 慣例)。 */ +/** + * KBDB 基本盤 base URL + internal headers。 + * fallback 指**現役** arcrun-kbdb(workers.dev,無 auth、不需 token)—— + * 不沿用 webhook-handlers.ts 的舊 fallback kbdb.finally.click(inkstone 遺留、已死、要 token)。 + * KBDB_BASE_URL 可覆蓋(self-hosted fork 指自己的 KBDB)。 + */ function kbdbBase(env: Bindings): { base: string; headers: Record } { - const base = (env.KBDB_BASE_URL ?? 'https://kbdb.finally.click').replace(/\/$/, ''); + const base = (env.KBDB_BASE_URL ?? 'https://arcrun-kbdb.uncle6-me.workers.dev').replace(/\/$/, ''); const headers: Record = { 'Content-Type': 'application/json' }; if (env.KBDB_INTERNAL_TOKEN) headers['Authorization'] = `Bearer ${env.KBDB_INTERNAL_TOKEN}`; return { base, headers }; diff --git a/cypher-executor/wrangler.toml b/cypher-executor/wrangler.toml index 3465895..51e39c2 100644 --- a/cypher-executor/wrangler.toml +++ b/cypher-executor/wrangler.toml @@ -113,6 +113,11 @@ ENVIRONMENT = "production" # Self-hosted fork:改成自己的 CF 帳號 subdomain(Workers & Pages → 你的帳號 → subdomain settings) WORKER_SUBDOMAIN = "uncle6-me" +# KBDB 基本盤對外 URL(cypher→KBDB:proxy /kbdb/*、recipe-stats、recipe fragment)。 +# 現役 = arcrun-kbdb(workers.dev,無 auth、不需 token)。舊的 kbdb.finally.click 是 inkstone 遺留已死。 +# Self-hosted fork:改成自己部署的 arcrun-kbdb.<你的subdomain>.workers.dev。 +KBDB_BASE_URL = "https://arcrun-kbdb.uncle6-me.workers.dev" + [[routes]] pattern = "cypher.arcrun.dev/*" zone_name = "arcrun.dev"