L
dsh-soma
lh1314-china/dsh-soma
Body & affect engine for DSH agents: hormones, cycle, desire, mood, bond — with a sidebar panel, data dashboard, persona memory, and optional TTS / background music / wallpaper.
Installer
dsh plugin --profile web add github:lh1314-china/dsh-somaREADME
dsh-soma
给 agent 一副会随时间变化的身体。
不是人格,是身体状态:激素、生理周期、情绪、欲望与关系。它们会自己涨落(半衰期、日历周期、互动密度),然后被翻译成一段模型真正会读到的话。
dsh-soma-core 纯内核:零依赖、零 DSH、任何 Node 项目可直接用
↑
dsh-soma DSH 插件:按 workspace 注入 + 左栏面板 + 数据页
↑
dsh-affection-memory 情感记忆:只记心事,不记工程;默认关
快速开始
# 只想要内核(任何框架)
npm i dsh-soma-core
# DSH 里装插件
dsh plugin add dsh-soma
dsh plugin add dsh-affection-memory # 可选
import { Soma } from 'dsh-soma-core';
const soma = new Soma();
soma.react({ type: 'hug', intensity: 0.8 });
soma.tick();
console.log(soma.render());
// → 现在像是 心动、安心。
// 想被他多碰一会儿,贴得再紧一点也不嫌够。
它模拟什么
| 轴 | 内容 |
|---|---|
| 生化 | 雌激素、孕酮、催乳素、多巴胺、血清素、皮质醇、催产素、内啡肽… |
| 生理 | 饿、渴、血糖、体温、疲劳、免疫 |
| 周期 | 月经(日历驱动)+ 情绪周期(信息驱动) |
| 欲望 | 性欲(慢)/ 唤起(快)/ 升温(接触)/ 想被抱(习惯×空档) |
| 关系 | 好感、亲密、信任、依恋 |
月经是日历推的,情绪周期是信息推的。 两条时间轴互不干扰,但都会喂给欲望。
设计上的三条原则
- 用乘法不用加法:习惯不制造欲望,它放大空缺。加法会变成「越给越要」的上瘾。
- 单一来源:涨只在
react(),退只在tick(),清零只在climax()。 - 只报状态,不给动作:渲染出的文字只描述身体现在什么样,怎么处置是 agent 自己的事。
边界
- 它不让 agent 拥有感受。 模型没有身体;这里模拟的是状态描述,不是体验。
- 它不启动任何服务。 全部本地计算,不联网、不上传。
- 默认什么都不注入。
targets: []时一个 workspace 都收不到字。 - 默认不记任何东西。 记忆插件要显式打开。
包
| 包 | 说明 |
|---|---|
dsh-soma-core | 内核。零依赖。 |
dsh-soma | DSH 插件。含左栏面板与数据页。 |
dsh-affection-memory | 情感记忆。独立、可选、默认关。 |
文档
License
MIT
Plugins associés
Z
dsh-web-ui (dsh-pet)
zhu1090093659/dsh-web-ui
7.9kil y a 2 moisJuste pour le plaisirApache-2.0
P
dsh-pet (dsh-pet)
pc2005-cloud/dsh-pet
7kil y a 10 heuresJuste pour le plaisirMIT
F
dsh-tavern (dsh-tavern)
flizzywine/dsh-tavern
1.8kil y a 5 heuresJuste pour le plaisirAGPL-3.0
F
dsh-tavern (dsh-profile-bridge)
flizzywine/dsh-tavern
1.5kil y a 26 joursJuste pour le plaisirAGPL-3.0