yue02.sun 5bf9a2ed59 feat: 集成 d-auth 认证系统
## 改动

- 移除内置的 auth 模块,改为调用 d-auth CLI
- 添加登录拦截器,保护 index/compile/dream/search/get 命令
- 添加 d-auth 作为依赖项

## 认证流程

1. 用户执行需要认证的命令
2. d-wiki 调用 d-auth check 检查登录状态
3. 未登录则拦截并提示用户登录
4. 已登录则正常执行命令

## 相关文档

见 docs/AUTH.md

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-02 22:01:00 +08:00
2026-05-28 19:02:16 +08:00
2026-06-02 22:01:00 +08:00
2026-05-28 19:02:16 +08:00
2026-06-02 22:01:00 +08:00
2026-05-28 19:02:16 +08:00
2026-05-28 19:02:16 +08:00
2026-05-28 19:02:16 +08:00
2026-05-28 19:02:16 +08:00
2026-05-28 19:01:52 +08:00

d-wiki

Lightweight local knowledge retrieval for agent-facing context packs.

The first version intentionally avoids embedding models and qmd runtime dependencies. It uses BM25 plus local metadata (d-wiki.yml, aliases, query entries, and page frontmatter) to return structured context that a caller can use to synthesize an answer.

Language choice

d-wiki is implemented in Python for v1. The main reasons are lower integration friction with robogo_assistant_service, a dependency-light local CLI, and a better fit for retrieval/evaluation scripts. See docs/language-decision.md for the Python vs TypeScript trade-off.

CLI

d-wiki status --format json
d-wiki index --kb x5
d-wiki compile --kb robogo --force
d-wiki compile --kb x5 --force --llm auto
d-wiki search --kb x5 --query "如何在X5平台上点亮camera" --format json
d-wiki get --kb x5 --id multimedia_development/7-camsys_debug --format json

compile builds an llm-wiki style wiki/ under the knowledge base's .d_wiki/ directory. After compilation, search prefers compiled wiki pages and falls back to raw sources when no compiled wiki exists.

v2 adds optional LLM-assisted compilation:

  • --llm off: deterministic compile only.
  • --llm auto: use LLM synthesis when D_WIKI_LLM_* or ROBOGO_LLM_* environment variables are present; otherwise fall back to deterministic compile.
  • --llm require: fail if LLM configuration is missing or synthesis fails.
  • --llm-scope queries: default, only synthesize curated queries/*.md concept pages.
  • --llm-scope all: synthesize every compiled concept page.

LLM synthesis produces a stronger summary, answer blueprint, and synthesized evidence while preserving raw Key Evidence and source-map provenance.

Use D_WIKI_CONFIG=/path/to/d-wiki.yml or --config /path/to/d-wiki.yml.

Description
No description provided
Readme 254 KiB
Languages
Python 100%