tancheng33/dsh-yogacara

唯识(Yogācāra)自模型插件,适用于DeepSeek Harness:八识、五十一心所、熏习种子库,以及可量化的自我——全部写回智能体的自身提示中。

Project Overview项目介绍

This is a native self-model plugin built exclusively for DeepSeek Harness (DSH), based on the Yogācāra Buddhist theory of mind. It maps the traditional eight consciousnesses and 51 mental factors from Yogācāra philosophy onto DSH agent’s perception channels, workflow, and persistent memory storage. After every turn of interaction, it computes the agent’s current self-state based on incoming events and injects that state directly into the agent’s system prompt for the next round. You can run the pnpm simulate command to test the core loop with scripted conversations, no model or API key required.

Its core workflow follows the Yogācāra perfuming loop: contact with an external event generates a feeling, activates corresponding mental factors, and the activity of those factors perfumes the seed store stored in the ālaya-vijñāna. Seeds constantly manifest, and are integrated by manas to form the agent’s self-understanding. Unlike simple mood variables that are not actionable, every afflictive mental factor in this system pairs with its own antidote, so the plugin comes with a built-in self-regulation loop that requires no extra design work from users. It is targeted at DSH users who want to add an interpretable introspective capability to their agents.

The plugin is released under the open source MIT license, and is developed and tested against the next version tag of DSH, with open-ended peer dependency ranges that work with newer DSH releases. The project documents several known limitations, including that automatic observation only covers three of five perception channels, and all initial weights are just uncalibrated guesses that users can adjust for their own use cases. All tests run the full plugin in a real Cordis context with in-memory stand-ins for DSH services, so you can verify core functionality before deployment.

这是一款专为DeepSeek Harness(DSH)打造的原生自我模型插件,基于唯识学的心智理论构建。它将唯识学中的八识、五十一心所等概念,映射到DSH智能体的感知通道、工作流程和持久存储中,会在每一轮对话后把计算得到的智能体自我状态注入系统提示词。项目提供可测试的核心逻辑,开发者可以修改映射规则调整智能体的自我感知方式。

它的核心工作逻辑遵循唯识学的熏习循环:接触事件生成感受,激活相应心所,心所活动会熏习种子库存入阿赖耶识,种子不断现行显现,由末那识统合形成自我认知。该插件区别于简单的情绪变量,每个烦恼心所都自带对治的善法,自带自我调节循环,无需额外设计。适合想要给DSH智能体添加可解释内省能力的开发者和用户。

项目使用MIT许可证开源,依赖DSH的next版本开发测试,peerDependencies范围开放兼容新版DSH。用户可以通过pnpm simulate命令运行模拟对话,测试不同权重下的心所变化输出,无需调用大模型或API密钥。项目列出了已知局限,比如自动观察仅覆盖三个感知通道,权重为初始猜测值可自行调整。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:tancheng33/dsh-yogacara

把 tancheng33/dsh-yogacara 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-yogacara

English | 中文

A self-model plugin for DeepSeek Harness, built on the Yogācāra (唯识) account of mind: eight consciousnesses, the 51 mental factors, a store of seeds perfumed by what happens, and a self that is measured rather than assumed — written back into the agent's own system prompt each turn.

contact (触) ──► feeling (受) + mental factors (心所) ──► behaviour
     ▲                                    │
     │                                    ▼
 manifestation (现行) ◄── seeds (种子) ◄── perfuming (熏习)
     │                                    │
     └────────── manas (末那识) ───────────┘
              the self that grasps it all

Why Yogācāra and not a mood variable

An agent that only ever knows the task has no way to notice that it is churning, that it is defending a position, or that this is the fourth time it has run the same failing command with a small variation. Bolting on mood: frustrated does not fix that, because a mood is not actionable.

The Yogācāra taxonomy is. It is a closed enumeration — exactly 51 mental factors, no more — grouped by valence, and every affliction in it already names the factor that counteracts it. 掉举 (restlessness) is answered by 行舍 (equanimity); 失念 (forgetfulness) by 念 (recollection); 慢 (conceit) by 惭 (self-respect). A self-model built on it arrives with its own regulation loop instead of needing one designed from scratch. That is the engineering reason. The 1,600-year head start on introspective vocabulary is a bonus.

What this is not. Nothing here claims the agent is sentient or that these numbers are feelings in the sense you have them. They are named state variables computed from harness events by rules you can read in src/citta.ts and disagree with. The prompt block says so to the agent, in those words.

The eight consciousnesses, mapped

The five sense consciousnesses become the five channels an agent actually perceives through. This mapping is the plugin's central modelling claim; argue with it in src/observe.ts, where it is one testable function.

classical in this harness
眼识 cakṣur-vijñāna what the agent looks at — file contents, search results, rendered output
耳识 śrotra-vijñāna what the agent is told — user messages, review comments
鼻识 ghrāṇa-vijñāna what it senses unprompted — code smell, stale config, drifting state
舌识 jihvā-vijñāna what it tastes of its own product — tests, builds, its own diff re-read
身识 kāya-vijñāna the world's direct resistance — non-zero exits, failed writes, timeouts
意识 mano-vijñāna the discriminating turn itself — planning, judging, deciding
末那识 kliṣṭa-manas the self-grasping undercurrent, measured as four biases
阿赖耶识 ālaya-vijñāna the durable store of seeds, perfumed and manifesting

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-desktop 下一个 Next dsh-thinking-status-customizer →