ihorleleka/Local-Rag-Wiki ↗★ 0

@ihorleleka/wiki-kit

Installer and runner assets for wiki-manager agent wiki-kit integration.

Package
@ihorleleka/wiki-kit
Compatibility
Unverified
Harness peer range
>=0.2.1-rc.5 <0.3.0-0
Version
0.4.0
License
UNLICENSED
Last updated
Nov 17, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ihorleleka/Local-Rag-Wiki

local-rag-wiki

A repo-local RAG wiki for AI agents: a per-repository MCP knowledge service (governed search / read / write of Markdown wiki notes) plus an installer that wires it into your agent tooling. Docker is required to run the service.

Quick start (recommended)

Pre-pull the service image before your first agent session to avoid cold-start delays:

docker pull ihorleleka/project-rag-wiki:latest

Install

Run in your repository root:

npx github:ihorleleka/Local-Rag-Wiki install .

This scaffolds the managed .agents/ runner, the AGENTS.md policy section, DSH workspace assets (.dsh/mcp.servers.yml and its scoped MCP bridge), Claude Code, Codex, VS Code, and OpenCode, plus a wiki/ folder. The DSH bridge stays under .dsh/; it is never installed as a repository-root .dsh-mcp-client.js. These integrations are additive. The MCP service starts per repository when a configured agent client connects. Pre-pulling the image (above) is recommended before running the agent in a fresh environment.

Claude Code

The installer delivers Claude Code's project-native integration surfaces:

  • Root .mcp.json defines wiki-manager under mcpServers, pointing to the managed Node runner. Existing unrelated MCP servers are preserved.
  • .claude/skills/wiki/SKILL.md and its authoring reference are materialized from the shared .agents/skills/wiki source. Use /wiki in Claude Code ($wiki is the invocation used by other clients). Updates refresh this managed skill even without --force, while preserving other skill directories.
  • CLAUDE.md receives a bounded, managed wiki-policy section; existing project instructions outside that section are preserved.

The installer does not add MCP definitions to .claude/settings.local.json. Older installations may still contain an obsolete mcpServers.wiki-manager entry there; updates leave that file, user hooks, permissions, and other local preferences untouched. Review/remove that obsolete entry yourself if desired. No server approval or tool permission is granted automatically: accept the workspace/project MCP trust prompts as appropriate, then check /mcp and confirm /wiki is listed in a fresh Claude session. Docker must be available for MCP startup. --skip-root omits all these Claude integration surfaces.

The .agents/plugins/marketplace.json catalog is for other agent tooling, not a Claude Code marketplace. This integration uses project skills and project MCP configuration directly; no Claude plugin installation is required.

Compatibility was checked against the live official documentation on 2026-11-17, not a version-pinned historical snapshot: skills and discovery, project MCP configuration and trust, settings scope, and Claude plugin marketplaces.

DeepSeek Harness

The native bundle supports DSH >=0.2.1-rc.5 = 0.5, direct lexical grounding to the prompt (two shared meaningful terms or one shared identifier), and explicit trust signals: active status, complete schema, current freshness, present evidence, and no required verification. Pending, historical, and unknown- trust results are excluded from automatic injection. Older service images without these trust fields also cause automatic recall to abstain; explicit retrieval remains available. These signals describe the indexed snapshot, not proof of live behavior. The score is a ranking signal, not a calibrated probability; $wiki bypasses this automatic-abstention policy for deliberate inspection. Candidate and injected L0 results use three matches and are capped at 900 characters—about 225 tokens by the recorded estimate. It never automatically preloads L1 packets; additional detail is a model-directed wiki_search or wiki_read decision. Recall is cached and in-flight deduplicated per workspace. It is turn-scoped: when the turn stops, the evidence is replaced by an empty, non-model-visible surface event, so it cannot accumulate in later model requests. Recall diagnostics track skipped ordinary prompts, explicit requests, cache hits, context characters, estimated injected tokens, and budget truncations.

The governed wiki and its MCP search are the only DSH memory path; the bundle does not capture local prompt history. Claude Code connects to the same runner through its MCP configuration without repository prompt-history hooks. See .dsh/README.md for the workspace boundary.

Update

After install, refresh the managed files from inside the repo — no npx needed:

.agents\update-wiki-kit.cmd --force
sh .agents/update-wiki-kit.sh --force

Lifecycle

npx github:ihorleleka/Local-Rag-Wiki status .
npx github:ihorleleka/Local-Rag-Wiki restart .
npx github:ihorleleka/Local-Rag-Wiki doctor . --live

start ., stop ., and pull . are available the same way. The repository container persists independently of individual agent clients.

Long-running MCP sessions

The HTTP backend can expire idle MCP sessions while remaining healthy. The managed stdio runner renews a missing session on HTTP 404, then retries the rejected request once without restarting MCP or the container. Other HTTP and transport failures return errors with the caller's request ID instead of leaving calls pending. A 30-second wall-clock HTTP deadline also bounds stalled SSE responses, even when keepalive traffic continues. Network failures and timeouts are not automatically retried: a write may already have executed.

For an older installed runner, update the managed workspace files and reconnect its MCP client once to load the fix. A container/image replacement is not required for this runner-only fix.

Crash-dump protection

Starting with 0.2.5, the Linux backend disables process core dumps before loading native dependencies, including when WSL uses a piped crash collector (where ulimit core=0 alone is not sufficient). Managed containers additionally use --ulimit core=0:0. The backend refuses to start on Linux if process-level protection cannot be established. Ordinary debugger/ptrace attachment to that process is also disabled. This contains crash-dump disk growth; it does not fix native crashes or limit RAM.

To apply this protection to an existing installation, update the managed files, then run pull . and restart . using the lifecycle commands above. Updating files alone does not replace a running container. Restart briefly interrupts all clients sharing that repository's container, but retains wiki/index/model volumes. If KB_IMAGE is overridden, use an image containing this fix; the default image is pinned to the shared release version. Existing Windows dump files are not removed, and no host-wide WSL settings are modified. Custom image commands that bypass python -m kb_service also bypass its process-level protection.

How it works

  • This package is the installer: it scaffolds and maintains the .agents/ runner and MCP configuration in a consumer repository.
  • kb-service/ is the Dockerized MCP knowledge service the runner launches per repository. It serves wiki_search, wiki_read, wiki_list, wiki_tree, wiki_schema_report, wiki_edit, wiki_write, wiki_capture, wiki_delete, and wiki_rename over POST /mcp/ (loopback by default), with atomic note persistence and targeted reindexing. Prefer wiki_edit for small updates; use wiki_write for creation or full replacements. wiki_search supports tiered retrieval (depth=abstract|packet) plus path_prefix directory scoping.

wiki_edit(path: str, old_text: str, new_text: str) replaces exactly one literal match in an existing note. old_text must be nonempty; empty new_text deletes that match. It performs no write on conflicts: not_found (missing note), text_not_found (no match), or ambiguous_match (multiple matches). See the service write contract for details.

Agentic memory design review

See the dated comparison and delivery audit against Mem0, Letta, Graphiti, Cognee, and OpenViking, including adopted patterns, licensing caveats, and prioritized remaining work. The design keeps governed Markdown and bounded retrieval rather than adding a conversation archive or graph service. MCP availability and native skill discovery are separate capabilities; the delivered policy names the skill file for clients without $wiki discovery.

Versioning

The installer and kb-service ride the same Git tag (X.Y.Z or vX.Y.Z). Release automation:

Development and verification

From a clean checkout, install the locked JavaScript dependencies before running installer and scoped DSH bridge regressions:

npm ci
npm test

The dependency-free Python suite fakes native libraries and model providers; it requires Python 3.11+ and does not start Docker or download models:

python -m unittest discover -s kb-service/tests -p 'test_*.py'

CI runs this suite on Python 3.11 and 3.14. See the service verification notes for the separate real-dependency integration suite. npm run verify:runner requires Docker and exercises container lifecycle operations; it is not part of the offline suite.

When updating DSH-related libraries, check the supported runtime's peer ranges, not only npm's latest tag. DSH 0.2.1-rc.5 requires Cordis ~4.0.5 and uses Schemastery ~3.18.5; upgrading the top-level copies independently can split the plugin dependency graph. Preserve the supported runtime baseline and verify the scoped bridge before accepting such updates.

License

MIT (see kb-service/LICENSE).