fix(cypher): KBDB proxy 指向現役 arcrun-kbdb(舊 fallback kbdb.finally.click 已死)

煙霧測試發現 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) <noreply@anthropic.com>
This commit is contained in:
uncle6me-web
2026-06-14 22:16:18 +08:00
parent 886a8e31d0
commit a410af0b6c
5 changed files with 19 additions and 5 deletions
+7 -2
View File
@@ -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-kbdbworkers.dev,無 auth、不需 token)——
* 不沿用 webhook-handlers.ts 的舊 fallback kbdb.finally.clickinkstone 遺留、已死、要 token)。
* KBDB_BASE_URL 可覆蓋(self-hosted fork 指自己的 KBDB)。
*/
function kbdbBase(env: Bindings): { base: string; headers: Record<string, string> } {
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<string, string> = { 'Content-Type': 'application/json' };
if (env.KBDB_INTERNAL_TOKEN) headers['Authorization'] = `Bearer ${env.KBDB_INTERNAL_TOKEN}`;
return { base, headers };
+5
View File
@@ -113,6 +113,11 @@ ENVIRONMENT = "production"
# Self-hosted fork:改成自己的 CF 帳號 subdomainWorkers & Pages → 你的帳號 → subdomain settings
WORKER_SUBDOMAIN = "uncle6-me"
# KBDB 基本盤對外 URLcypher→KBDBproxy /kbdb/*、recipe-stats、recipe fragment)。
# 現役 = arcrun-kbdbworkers.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"