npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pananfly/dsh-llm-wiki

v0.1.0

Published

Obsidian-compatible OKF v0.2 LLM Wiki plugin for DeepSeek Harness (DSH) — 16 tools, 16 slash commands, auto-rebuild guardrails, ambient recall & personal vault support

Readme

@pananfly/dsh-llm-wiki

代码仓库: https://github.com/pananfly/dsh-llm-wiki · npm: @pananfly/dsh-llm-wiki

中文 | English

DeepSeek Harness (DSH) 原生适配版 pi-llm-wiki。为 DSH 会话提供自维护、完全兼容 Obsidian 的 OKF v0.2 知识库体系。

用法完全一致("用法不要改变"):保留上游全部 16 个斜杠命令、17 个 Agent Tools、.llm-wiki/ OKF v0.2 知识库目录结构以及个人知识库回退,无缝接入 DSH Cordis 微内核架构。


核心特性

  • DSH Cordis 原生微内核插件:基于 cordis.patch.yml 与 apply(ctx, config) 挂载,原生支持 @deepseek-ai/schemastery 参数校验。
  • 双宿主兼容:既能作为 DSH 原生插件(注入 ctx.tools, ctx.commands, ctx.systemPrompt, ctx.tools.guard),也支持 Pi / Oh-My-Pi 扩展规范(default(pi))。
  • 17 个 Agent Tools:所有工具入参 schema 均通过官方 @deepseek-ai/dsh-tools 的 assertSupportedJsonSchema 严格校验,杜绝非法关键字。
  • 16 个斜杠命令:
    • 即时文本响应命令(/wiki-status, /wiki-lint, /wiki-dashboard, /wiki-settings, /wiki-model, /wiki-trajectories)。
    • 交互式协同引导命令(/wiki-init, /wiki-ingest, /wiki-query, /wiki-record, /wiki-retro, /wiki-skills, /wiki-digest, /wiki-discover, /wiki-run, /wiki-req)。
  • Obsidian OKF v0.2 知识库规范:标准的 Markdown 知识卡片、YAML 元数据、双向链接([[target]] 和 [text](/folder/page.md))、反向链接索引及原子化元数据投影。
  • DSH 知识库护栏与自动索引:通过 ctx.tools.guard 拦截 fs_write、str_replace_editor 与命令行篡改,严密保护原始输入(raw/)、元数据投影(meta/)与 INDEX.md。并通过 tools/result 事件监听在知识页面变动时自动触发元数据重建。
  • 环境检索与系统提示词注入:通过 ctx.systemPrompt.section 自动召回相关知识,不侵入用户对话轮次、不破坏大模型 Prompt 缓存。

安装使用

在 DeepSeek Harness (DSH) 中安装

# 从本地项目目录添加
dsh plugin --profile web add /path/to/dsh-llm-wiki

# 或从 npm 安装
dsh plugin --profile web add @pananfly/dsh-llm-wiki

# 重启 DSH 生效
dsh --profile web

自动 Bundle 注入配置 (cordis.patch.yml)

插件安装后,DSH 会自动加载 cordis.patch.yml 注入配置:

- insert:
    - id: dsh-llm-wiki
      name: "@pananfly/dsh-llm-wiki"
      config:
        ambientRecall: true
        autoBootstrap: true
        notices: true
        ambientPersonalVault: true
        trajectories: true

配置参数

| 参数名 | 类型 | 默认值 | 说明 | |---|---|---|---| | ambientRecall | boolean | true | 是否在 Agent 每轮对话前自动检索相关知识并注入系统提示词 | | autoBootstrap | boolean | true | 首次使用时若未发现知识库是否自动初始化 pending 库 | | notices | boolean | true | 知识检索命中时是否在状态栏展示通知信息 | | ambientPersonalVault | boolean | true | 项目未初始化知识库时是否回退至个人全局知识库 (~/.llm-wiki/) | | trajectories | boolean | true | 是否启用工作记忆轨迹捕获与技能提炼工具 |


斜杠命令清单 (16)

| 命令 | 模式 | 功能说明 | |---|---|---| | /wiki-status | 即时反馈 | 展示知识库健康度、各分类页面统计、孤立页面数及异常告警 | | /wiki-lint [--fix] | 即时反馈 | 校验双向链接完整性、OKF 结构合规性并支持自动修复 | | /wiki-dashboard | 即时反馈 | 格式化输出知识库全面数据大盘 | | /wiki-settings | 即时反馈 | 查看后台任务模型、Embedding 提供商及当前运行配置 | | /wiki-model | 即时反馈 | 查看或快速切换后台摘要提炼与向量化模型 | | /wiki-trajectories | 即时反馈 | 查看或切换轨迹工作记忆与技能提炼模块状态 | | /wiki-init [topic] | 交互引导 | 引导 Agent 初始化并规范化搭建当前项目的 OKF v0.2 知识库 | | /wiki-ingest [file/url] | 交互引导 | 抓取、提炼、分类并双向链接新的原始资料 | | /wiki-query <question> | 交互引导 | 发起全库多源混合检索并生成精准解答 | | /wiki-record | 交互引导 | 将当前会话中的关键决策、架构设计转化为正式知识库页面 | | /wiki-retro | 交互引导 | 进行项目阶段复盘,提炼持久性认知 | | /wiki-skills | 交互引导 | 将成功的排障与开发步骤提炼为可复用的技能沉淀 | | /wiki-digest | 交互引导 | 汇总近期知识库增量并生成结构化综述 | | /wiki-discover | 交互引导 | 探索库内未覆盖的盲区、知识冲突与缺失关联 | | /wiki-run | 交互引导 | 执行例行维护、孤立页面清理与定时工作流 | | /wiki-req | 交互引导 | 管理系统原子化需求、优先级追踪与可追溯性链条 |


Agent 工具清单 (17)

所有工具均注入 ctx.tools,并通过 DSH JSON-Schema 规范校验:

  1. wiki_bootstrap:初始化 OKF v0.2 知识库,写入主题、运行模式与目录结构。
  2. wiki_capture_source:抓取原始输入内容(URL/Markdown/文本)存入只读的 raw/sources/。
  3. wiki_ingest:将原始素材提炼生成标准化知识页面(wiki/sources/, wiki/entities/)。
  4. wiki_ensure_page:创建或更新知识卡片,自动补全 frontmatter 与双向反向链接。
  5. wiki_search:基于关键字、标签、类型与分类进行精确与语义检索。
  6. wiki_lint:体检知识库双链完整性、孤立卡片、断链与 schema 格式。
  7. wiki_status:获取结构化指标与健康状态快照。
  8. wiki_rebuild_meta:重构 registry.json、backlinks.json 与目录索引。
  9. wiki_reindex_embeddings:重构向量化嵌入以供混合检索使用。
  10. wiki_log_event:向 meta/events.jsonl 追加可追溯审计事件。
  11. wiki_watch:监听知识库文件变更并触发增量更新。
  12. wiki_recall:按相似度召回相关知识卡片并提供双链扩展。
  13. wiki_retro:从会话轨迹中提取反思与结论。
  14. wiki_observe:在任务执行过程中记录动态观察与阶段发现。
  15. wiki_capture_trajectory:持久化会话执行轨迹供后续分析。
  16. wiki_distill_skills:将经验模式沉淀提炼为标准技能卡片。
  17. wiki_recall_skill:检索并激活符合当前问题上下文的沉淀技能。

知识库目录结构 (OKF v0.2)

.llm-wiki/                  # 项目知识库根目录(缺省时可回退至 ~/.llm-wiki/)
├── config.json             # 知识库核心配置(topic, mode, knowledge_format)
├── WIKI_SCHEMA.md          # 机器可读的权限分配与链接规范
├── raw/                    # 只读原始输入归档
│   └── sources/            # 原始源包(manifest.json, extracted.md)
├── wiki/                   # 用户与模型共同维护的可编辑知识库
│   ├── entities/           # 工具、人物、组织、系统
│   ├── concepts/           # 设计模式、架构原理、算法理念
│   ├── sources/            # 提炼后的资料摘要
│   ├── syntheses/          # 跨源综合、权衡分析与冲突图谱
│   └── requirements/       # 原子化需求与追溯定义
└── meta/                   # 系统自动生成的投影目录(严禁手动修改)
    ├── events.jsonl        # 仅追加写入的审计日志
    ├── registry.json       # 全库卡片元数据索引
    ├── backlinks.json      # 双向反向链接图谱
    └── index.md            # 渲染后的结构化目录大纲

开发与构建

# 安装依赖
pnpm install

# 构建 bundle 与类型声明文件
pnpm build

# 类型检查
pnpm typecheck

# 运行自动化冒烟测试与端到端集成测试
pnpm test

开源协议

MIT © pananfly