Files
kbdb-ingest-plugin/wrangler.toml
T
Leo 16ad1cb208 feat(ingest): T0.5–T5 純餵食器管線實作(issue #2)
ingest 全管線(採取優先、extract fallback、跨庫織網、POST envelope):
- T0.5 骨架:Hono + zod-openapi,無 D1/Vectorize/AI 綁定(不碰儲存鐵律)
- T1 SourceAdapter:GitHub runtime API 拉 + per-file sha256 content-hash + /refresh 受理端
- T2 採取(路徑 A 優先):harvest template 1.8.0+ 卡(gloss/實體/typed-edge)
- T3 extract(路徑 B fallback):LlmCaller 可選模型 + JSON-fail 升級閘 + 端點對齊硬自檢護欄;第一版不 embed(只打標)
- T4 跨庫織網(主職):匯總多 repo → 偵測跨庫橋/異見,不算 bridge_score(graph 領域)
- T5 輸出:buildEnvelope strict + 顯式禁送欄位自檢;graph-client 純 POST(cherry-pick _kbdb_client.py 改不碰 base);薄 ops CLI(不帶查詢 MCP)

envelope 對齊 full contract(embed/id/aliases/predicate_embed);同步 contract 向量化欄位升格。

gate:vitest 28 passed / tsc clean / wrangler dry-run 乾淨(只 env-var 綁定)。
端到端 ingest→graph:graph receiver 已補對齊 → 待 ingest 部署 + GRAPH_BASE_URL → 待部署驗,未假綠。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 20:40:53 +08:00

25 lines
958 B
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name = "kbdb-ingest-plugin"
main = "src/index.ts"
compatibility_date = "2025-02-19"
compatibility_flags = ["nodejs_compat"]
workers_dev = true
# KBDB-ingest 插件 = 純餵食器:GitHub 拉 + 採取/萃取 + 跨庫織網 → POST envelope 給 graph。
# 鐵律:不碰儲存(無 D1/Vectorize/AI 綁定——那些屬 base/graphingest 不直連)。
# 部署走 wrangler,繞 GitHub Actions(被 flag 教訓)。
[vars]
ENVIRONMENT = "development"
# graph 插件寫入端 base URLPOST {GRAPH_BASE_URL}/triplets/ingest)。
# 部署前用 `wrangler secret put` 或在此填,例如 https://kbdb-graph.<acct>.workers.dev
GRAPH_BASE_URL = ""
# 萃取(路徑 B)預設模型意圖。"shallow"=Haiku/Workers AI"deep"=Claude via CC。
DEFAULT_EXTRACT_TIER = "shallow"
[alias]
"zod/v3" = "zod"
"zod/v4" = "zod"
"zod/v4-mini" = "zod"
# GITHUB_TOKEN / GRAPH_INTERNAL_TOKEN / ANTHROPIC 等機敏值走 `wrangler secret put`,不寫這裡。