feat(console): 駕駛艙 dashboard——/console/dashboard(-data) 聚合 KBDB dash_* entries (T-cockpit ②, Arcrun#3 console 系)
- GET /console/dashboard-data:無需登入唯讀聚合端點(dash_beat/dash_task/dash_wait/inbox, 租戶=CONSOLE_TENANT),燈號判定寫死在端點(red=blocked/心跳>240分僅台北09-22判定; yellow=非標準落後標記;green=其餘)。created_at 實測 epoch 秒(number),解析防禦性兼容字串 - GET /console/dashboard:單檔 HTML 兩格儀表板(狀態燈+心跳+今日完成度橫條 / 今日路線+ 等你的事+收件匣數),手機優先一屏、60s 自動刷新、無互動 - kbdb-proxy.ts:kbdbBase() 改 export 供 dashboard 共用(同一 KBDB 連線慣例,不重複實作) - SDD 補件:docs/3-specs/arcrun/search-console/(issue #3 授權;位於既有 arcrun/ 白名單下) 部署:手工注入法(mistakes #23,禁 acr update)deploy leo21c,version 4252c321-e15b-494c-ab97-29f82eefa565 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,7 +29,7 @@ export const kbdbProxyRouter = new Hono<{ Bindings: Bindings }>();
|
||||
* 不沿用 webhook-handlers.ts 的舊 fallback kbdb.finally.click(inkstone 遺留、已死、要 token)。
|
||||
* KBDB_BASE_URL 可覆蓋(self-hosted fork 指自己的 KBDB)。
|
||||
*/
|
||||
function kbdbBase(env: Bindings): { base: string; headers: Record<string, string> } {
|
||||
export function kbdbBase(env: Bindings): { base: string; headers: Record<string, string> } {
|
||||
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}`;
|
||||
|
||||
Reference in New Issue
Block a user