How ihorleleka/local-rag-wiki works
local-rag-wiki packages an installer for repository-local agent integrations and a Dockerized MCP wiki service. The main workflow is an agent client invoking the managed runner, which reaches the service to search or manage Markdown wiki notes; DSH additionally performs bounded, tiered recall during a turn. Inside the service, the API delegates indexing and retrieval to the knowledge index. README statements establish the installation and client-to-service flow; source excerpts establish DSH dispatch and selected service dependencies. Unshown service internals are represented only where their modules and capabilities are identified by the source index or README.
Main entry points: indexer.py Knowledge index · app.py MCP service API · index.mjs DSH lifecycle bundle · run-wiki-manager.mcp.js Managed runner
Components 22
Install and lifecycle
- Wiki-kit installer
bin/wiki-kit.js - Managed runner
templates/root/.agents/run-wiki-manager.mcp.js - Workspace MCP config
templates/root/.dsh/mcp.servers.yml
Knowledge service
- MCP service API
kb-service/src/kb_service/app.py - Service settings
kb-service/src/kb_service/settings.py - Tool contract
kb-service/src/kb_service/contract.py - Runtime protection
kb-service/src/kb_service/runtime_safety.py - Vector-store safety
kb-service/src/kb_service/vector_store_safety.py
Index and retrieval
- Knowledge index
kb-service/src/kb_service/indexer.py - Local embeddings
kb-service/src/kb_service/embeddings.py - Lexical search
kb-service/src/kb_service/lexical.py - Result reranker
kb-service/src/kb_service/reranker.py - Evidence checks
kb-service/src/kb_service/evidence.py - Atomic note I/O
kb-service/src/kb_service/atomic_io.py - Text utilities
kb-service/src/kb_service/text_utils.py - Retrieval evaluation
kb-service/src/kb_service/evaluation.py
DSH integration
- DSH lifecycle bundle
packages/dsh-local-rag-wiki/index.mjs - Workspace config loader
packages/dsh-local-rag-wiki/workspace-mcp.mjs - Scoped MCP bridge
templates/root/.dsh/.dsh-mcp-client.js - Tiered wiki recall
packages/dsh-local-rag-wiki/recall.mjs - Prompt text helpers
packages/dsh-local-rag-wiki/text.mjs
Other components
- Agent client
Connections 20
- Agent client → Managed runner: connects through
README.md - Wiki-kit installer → Managed runner: scaffolds
README.md - Wiki-kit installer → Workspace MCP config: scaffolds
README.md - Managed runner → MCP service API: launches per repository
README.md - Agent client → MCP service API: calls MCP tools
README.md - MCP service API → Service settings: loads
kb-service/src/kb_service/app.py - MCP service API → Tool contract: exposes tools
kb-service/src/kb_service/app.py - MCP service API → Knowledge index: delegates indexing and search
kb-service/src/kb_service/app.py - Knowledge index → Local embeddings: uses
kb-service/src/kb_service/indexer.py - Knowledge index → Lexical search: uses
kb-service/src/kb_service/indexer.py - Knowledge index → Result reranker: uses
kb-service/src/kb_service/indexer.py - Knowledge index → Evidence checks: checks note evidence
kb-service/src/kb_service/indexer.py - Knowledge index → Atomic note I/O: uses
kb-service/src/kb_service/indexer.py - Knowledge index → Text utilities: uses
kb-service/src/kb_service/indexer.py - DSH lifecycle bundle → Workspace config loader: loads workspace config
packages/dsh-local-rag-wiki/index.mjs - DSH lifecycle bundle → Scoped MCP bridge: mounts
packages/dsh-local-rag-wiki/index.mjs - DSH lifecycle bundle → Tiered wiki recall: retrieves turn context
packages/dsh-local-rag-wiki/index.mjs - DSH lifecycle bundle → Prompt text helpers: extracts prompt text
packages/dsh-local-rag-wiki/index.mjs - DSH lifecycle bundle → Agent client: dispatches wiki search
packages/dsh-local-rag-wiki/index.mjs - Tiered wiki recall → MCP service API: searches abstract then packet
README.md