dsh-soul 0.7.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -2
- package/README_EN.md +17 -2
- package/assets/personas/custom-placeholder.webp +0 -0
- package/assets/personas/placeholder.svg +16 -0
- package/assets/personas//344/270/245/346/240/274/344/273/243/347/240/201/345/256/241/351/230/205/350/200/205.webp +0 -0
- package/assets/personas//345/244/264/350/204/221/351/243/216/346/232/264/344/274/231/344/274/264.webp +0 -0
- package/assets/personas//346/225/231/345/255/246/345/236/213/350/256/262/350/247/243/350/200/205.webp +0 -0
- package/assets/personas//346/236/201/347/256/200/344/270/273/344/271/211/350/200/205.webp +0 -0
- package/assets/personas//350/207/252/351/251/261/345/236/213/345/215/217/344/275/234/350/200/205.webp +0 -0
- package/assets/personas//350/213/217/346/240/274/346/213/211/345/272/225/345/274/217/346/217/220/351/227/256/350/200/205.webp +0 -0
- package/assets/personas//350/265/204/346/267/261/346/236/266/346/236/204/345/270/210.webp +0 -0
- package/client/index.mjs +2375 -228
- package/index.mjs +1111 -36
- package/lib/bindings.mjs +430 -0
- package/lib/config.mjs +40 -1
- package/lib/history.mjs +593 -0
- package/lib/personas.mjs +31 -6
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +8 -3
- package/scripts/verify-bindings.mjs +552 -0
- package/scripts/verify-client.mjs +1198 -40
- package/scripts/verify-config.mjs +2183 -93
- package/scripts/verify-e2e-prompt.mjs +932 -24
- package/scripts/verify-history.mjs +771 -0
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[简体中文](./README.md) | [English](./README_EN.md)
|
|
4
4
|
|
|
5
|
+
[](https://dsh-plugin.org/plugins/aliuyanfeng/dsh-soul)
|
|
6
|
+
|
|
5
7
|
DeepSeek Harness 个性化设置插件,用于配置 Agent 的昵称、回复风格、语调和自定义指令。
|
|
6
8
|
|
|
7
9
|
## 功能
|
|
@@ -22,7 +24,7 @@ DeepSeek Harness 个性化设置插件,用于配置 Agent 的昵称、回复
|
|
|
22
24
|
- Agent 可调用工具 `set_persona`,让模型在对话中直接调整人设
|
|
23
25
|
- 人设预设:7 个内置人设(苏格拉底式提问者 / 极简主义者 / 资深架构师 / 教学型讲解者 / 严格代码审阅者 / 头脑风暴伙伴 / 自驱型协作者,随插件提供、不可删除)+ 多套自建人设一键切换(保存 / 使用 / 列表 / 删除,Web UI 与命令双入口);每行摘要显示风格与偏离默认的维度
|
|
24
26
|
- 预设只管 Agent 的人格:**切换预设不会动「关于你」**(昵称 / 职业 / 介绍是你本人的资料,与「Agent 怎么说话」是两码事)。内置与自建一视同仁——保存预设时只快照风格 / 特质 / 回复长度 / 输出语言 / 自定义指令,不包含身份字段;早期版本存下的完整快照会在读取时自动剥离
|
|
25
|
-
- `set_persona` 确认模式(`requireToolConfirmation`):Agent
|
|
27
|
+
- `set_persona` 确认模式(`requireToolConfirmation`):Agent 的人设修改先在输入框处弹出**宿主原生审批面板**,由你点「允许一次」或「拒绝」(`Enter` 允许 / `Esc` 拒绝)后才会生效;审批通道不可用时(如会话审批策略为 `never`)退化为待确认提议,需 `/soul confirm` 处理
|
|
26
28
|
- 输入框光轨:Agent 回复中时,输入框边框显示沿边循环流动的光轨(默认颜色 `#679EFE`)
|
|
27
29
|
- 颜色:预设色板、取色器或十六进制输入(如 `#679EFE`)
|
|
28
30
|
- 流动速度:慢 / 中 / 快;光带粗细:细 / 中 / 粗
|
|
@@ -37,10 +39,23 @@ DeepSeek Harness 个性化设置插件,用于配置 Agent 的昵称、回复
|
|
|
37
39
|
- 提示词插值已关闭:自定义指令里的 `{{…}}` 按字面保留,不会触发宿主提示词装配失败
|
|
38
40
|
- 配置更新后同步到所有活动 Agent
|
|
39
41
|
- 变更检测:仅在影响 Agent 行为的配置实际变化时刷新提示词并注入会话;纯外观配置(输入框光轨)只落盘,不产生注入消息
|
|
42
|
+
- 变更记录与回滚(**插件详情页**:插件管理 → 已安装插件 → dsh-soul;设置页只在「人设预设」展开区给出指引,保留条数下拉也在这个区块内):每次配置改动都追加一条记录(时间、**来源**、字段级 `原值 → 新值`),可**撤销某一次改动及其之后的全部改动**;删掉的预设可单点恢复。记录写在 `$DSH_HOME/soul-config.history.jsonl`(追加式,一行一条,人能直接读),保留条数可调(50 / 100 / 200 / 500,默认 200,改完即时生效);存不下时**只影响记录、不影响配置写入**,并如实告诉你「记录可能不完整」。详情页给时间线与撤销,也可直接看文件
|
|
40
43
|
- 插件图标:插件管理列表与侧栏入口显示专属图标(`assets/icon.svg`,36×36,随 npm 包发布)
|
|
41
44
|
- 设置导航图标:设置面板左侧「个性化」那一项显示与插件图标同一套几何的图标——同一条光轨与火花,颜色与线宽则跟随邻居(单色 `currentColor`);DSH 的导航图标按 section id 硬编码、插件声明不了,故由客户端做 DOM 替换
|
|
42
45
|
- 提示词预览(只读,设置页底部折叠区):无未保存编辑时显示**当前生效**的提示词;表单一有改动就转为预览**草稿**——展示保存后真正会注入的内容,边改边看(停止输入 400ms 后自动重新编译),并在保存 / 重置 / 应用预设后自动刷新。未通过校验的字段会单独列出且不计入预览
|
|
43
46
|
|
|
47
|
+
## 路线图
|
|
48
|
+
|
|
49
|
+
| 版本 | 方向 | 状态 |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| `0.7.2` | 设置页样式对齐宿主、卡片堆叠轮播、人设变更走宿主原生审批面板 | 已发布 |
|
|
52
|
+
| `0.8.0` | **变更审计与回滚** —— 记录每次配置改动(时间戳、来源、字段级 from→to),插件详情页给时间线与撤销(设置页只留去向指引) | [设计文档](./DESIGN-audit-rollback.md) 已完成 |
|
|
53
|
+
| `0.9.0` | **三级隔离** —— Global → Workspace → Session,工作区决定人设、会话可临时覆盖 | [设计文档](./DESIGN-persona-scope.md) 设计完成待实现 |
|
|
54
|
+
| `0.8.2` | 自演化提议 + diff 审批 —— Agent 提议精炼人设,改动以 diff 走审批面板 | 规划中 |
|
|
55
|
+
| `0.9.0` | 记忆层 —— 跨会话长期记忆,按人设隔离、按需召回 | 规划中 |
|
|
56
|
+
|
|
57
|
+
设计与取舍写在对应的设计文档里;已发布的改动见 [RELEASE_NOTES.md](./RELEASE_NOTES.md),发版流程见 [PUBLISHING.md](./PUBLISHING.md)。路线图是方向而非承诺,顺序可能调整。
|
|
58
|
+
|
|
44
59
|
## 安装
|
|
45
60
|
|
|
46
61
|
```powershell
|
|
@@ -115,7 +130,7 @@ dsh plugin --profile <profile> update dsh-soul
|
|
|
115
130
|
|
|
116
131
|
配置保存后会同步到所有活动 Agent,当前会话下一次请求即可使用最新配置;无实际变化的保存不产生注入消息。
|
|
117
132
|
|
|
118
|
-
Agent 也可以通过工具 `set_persona` 在对话中直接调整你的人设(昵称、回复风格和语调、特质、回复语言、自定义指令)。模型只会在明确请求改变称呼、语气、风格或语言时调用该工具。开启「人设变更需确认」(`requireToolConfirmation
|
|
133
|
+
Agent 也可以通过工具 `set_persona` 在对话中直接调整你的人设(昵称、回复风格和语调、特质、回复语言、自定义指令)。模型只会在明确请求改变称呼、语气、风格或语言时调用该工具。开启「人设变更需确认」(`requireToolConfirmation`)后,该工具的修改会先在输入框处弹出**宿主原生审批面板**(与沙箱提权、模型切换用的是同一套交互),由你点「允许一次」或「拒绝」——`Enter` 允许、`Esc` 拒绝,改动会写入会话审计日志。审批通道不可用时(例如会话审批策略为 `never`、或没有可用的 Web UI 应答者)则退化为待确认提议,需 `/soul confirm` 确认或 `/soul reject` 拒绝。若你处在完全权限的会话中(审批策略 `never`),面板不会出现、每次变更都要手动输入命令,此时建议关闭该开关。
|
|
119
134
|
|
|
120
135
|
## 配置文件
|
|
121
136
|
|
package/README_EN.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
# dsh-soul
|
|
4
4
|
|
|
5
|
+
[](https://dsh-plugin.org/plugins/aliuyanfeng/dsh-soul)
|
|
6
|
+
|
|
5
7
|
A personalization plugin for DeepSeek Harness (DSH). Configure your agent's nickname, reply style, tone, and custom instructions.
|
|
6
8
|
|
|
7
9
|
## Features
|
|
@@ -22,7 +24,7 @@ A personalization plugin for DeepSeek Harness (DSH). Configure your agent's nick
|
|
|
22
24
|
- Agent-callable tool `set_persona` to let the model adjust persona during a conversation
|
|
23
25
|
- Named personas: 7 built-in personas (Socratic Questioner / Minimalist / Senior Architect / Teaching Explainer / Strict Code Reviewer / Brainstorm Partner / Self-Driven Collaborator — shipped with the plugin, cannot be deleted) plus your own named personas, switched with one click (save / use / list / delete, in both the Web UI and slash commands); each row summarises the style and every dimension that differs from its default
|
|
24
26
|
- Personas cover the **agent's personality only**: switching a persona never touches **"About you"** (nickname / occupation / bio describe *you*, not how the agent talks). Built-in and self-saved personas behave identically — saving a persona snapshots style / traits / reply length / reply language / custom instructions, never the identity fields; full-config snapshots written by earlier versions are stripped on read
|
|
25
|
-
- `set_persona` confirmation mode (`requireToolConfirmation`): agent persona changes
|
|
27
|
+
- `set_persona` confirmation mode (`requireToolConfirmation`): agent persona changes first raise the **host's native approval panel** above the composer, taking effect only after you click "Allow once" or "Reject" (`Enter` allows, `Esc` rejects); when the approval channel is unavailable (e.g. the session approval policy is `never`) it degrades to a pending proposal handled with `/soul confirm`
|
|
26
28
|
- Composer light trail: while the agent is replying, a light trail loops around the composer border (default color `#679EFE`)
|
|
27
29
|
- Color: preset swatches, a color picker, or a hex input (e.g. `#679EFE`)
|
|
28
30
|
- Flow speed: slow / normal / fast (default slow, 4.8s / 3.6s / 2.4s); trail thickness: thin / normal / thick (default thin, 1.5 / 2.5 / 4 px)
|
|
@@ -37,10 +39,23 @@ A personalization plugin for DeepSeek Harness (DSH). Configure your agent's nick
|
|
|
37
39
|
- Prompt interpolation is disabled: `{{…}}` in custom instructions stays literal and can no longer break system-prompt assembly
|
|
38
40
|
- Configuration synced to all active agents after every update
|
|
39
41
|
- Change detection: the prompt is refreshed and sessions injected only when a behavior-affecting field actually changed — appearance-only config (composer light trail) is persisted without injecting anything
|
|
42
|
+
- Change history and rollback (**plugin details page**: Plugin manager → Installed plugins → dsh-soul; the settings page only keeps a pointer, and the retention dropdown lives in that same block): every config change appends a record (time, **source**, field-level `old → new`), and you can **undo one change together with everything after it**; deleted personas can be restored individually. The log lives in `$DSH_HOME/soul-config.history.jsonl` (append-only, one record per line, readable by eye), and the retention count is configurable (50 / 100 / 200 / 500, default 200, applied immediately). When it cannot be written, **only the log suffers — config writes still go through**, and you are told the history may be incomplete
|
|
40
43
|
- Plugin icon: a dedicated icon in the plugin manager list and the sidebar entry (`assets/icon.svg`, 36×36, shipped with the npm package)
|
|
41
44
|
- Settings nav icon: the "Personalization" entry in the settings panel draws the same geometry as the plugin icon — same trail and spark, but coloured and weighted like its neighbours (monochrome `currentColor`). DSH hardcodes nav glyphs by section id and offers no way for a plugin to declare one, so the client swaps the glyph in the DOM
|
|
42
45
|
- Prompt preview (read-only, collapsible section at the bottom of the settings page): shows the **currently active** prompt while the form is untouched; as soon as any edit is pending it compiles the **draft** instead — what will actually be injected once you save — refreshing live (400 ms after you stop typing) and again after save / reset / applying a persona. Fields that fail validation are listed separately and excluded from the preview
|
|
43
46
|
|
|
47
|
+
## Roadmap
|
|
48
|
+
|
|
49
|
+
| Version | Direction | Status |
|
|
50
|
+
| --- | --- | --- |
|
|
51
|
+
| `0.7.2` | Settings-page styling aligned with the host, stacked card carousel, persona changes routed through the host's native approval panel | Released |
|
|
52
|
+
| `0.8.0` | **Change audit and rollback** — every config change recorded (timestamp, source, field-level from→to), with a timeline and undo on the plugin details page (the settings page keeps only a pointer) | [Design doc](./DESIGN-audit-rollback.md), done |
|
|
53
|
+
| `0.9.0` | **Three-level scoping** — Global → Workspace → Session; the workspace picks the persona, a session may override it | [Design doc](./DESIGN-persona-scope.md), designed |
|
|
54
|
+
| `0.8.2` | Self-evolution proposals with diff approval — the Agent proposes persona refinements and the diff goes through the approval panel | Planned |
|
|
55
|
+
| `0.9.0` | Memory layer — long-term memory across sessions, isolated per persona, recalled on demand | Planned |
|
|
56
|
+
|
|
57
|
+
Design rationale lives in the corresponding design document; shipped changes are in [RELEASE_NOTES.md](./RELEASE_NOTES.md) and the release process in [PUBLISHING.md](./PUBLISHING.md). The roadmap states direction, not a commitment — the order may change.
|
|
58
|
+
|
|
44
59
|
## Installation
|
|
45
60
|
|
|
46
61
|
```powershell
|
|
@@ -117,7 +132,7 @@ Slash commands are also available:
|
|
|
117
132
|
|
|
118
133
|
Once saved, the configuration is synced to all active agents and takes effect on the next request in the current session; no-op saves inject nothing.
|
|
119
134
|
|
|
120
|
-
The agent can also use the `set_persona` tool to adjust your persona (nickname, style & tone, traits, reply language, custom instructions). The model only invokes this tool when you explicitly ask to change how it addresses or responds to you. With **Require confirmation for persona changes** (`requireToolConfirmation`) enabled, tool changes
|
|
135
|
+
The agent can also use the `set_persona` tool to adjust your persona (nickname, style & tone, traits, reply language, custom instructions). The model only invokes this tool when you explicitly ask to change how it addresses or responds to you. With **Require confirmation for persona changes** (`requireToolConfirmation`) enabled, tool changes first raise the **host's native approval panel** above the composer (the same interaction the host uses for sandbox escalation and model switching), where you click "Allow once" or "Reject" — `Enter` allows, `Esc` rejects, and the decision is written to the session audit log. When the approval channel is unavailable (for example the session approval policy is `never`, or no web UI answerer is present) it degrades to a pending proposal handled with `/soul confirm` or `/soul reject`. Under a full-permission session (approval policy `never`) the panel never appears and every change requires a manual command, so turning this switch off is recommended.
|
|
121
136
|
|
|
122
137
|
## Configuration File
|
|
123
138
|
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512" role="img" aria-label="persona placeholder">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="ph-bg" x1="0" y1="0" x2="0" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#EEF3FF"/>
|
|
5
|
+
<stop offset="1" stop-color="#D8E3FF"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<linearGradient id="ph-fish" x1="0" y1="0" x2="1" y2="1">
|
|
8
|
+
<stop offset="0" stop-color="#93B6FF"/>
|
|
9
|
+
<stop offset="1" stop-color="#4D6BFE"/>
|
|
10
|
+
</linearGradient>
|
|
11
|
+
</defs>
|
|
12
|
+
<rect width="512" height="512" rx="112" fill="url(#ph-bg)"/>
|
|
13
|
+
<g transform="translate(97.28 139.22) scale(13.7064)">
|
|
14
|
+
<path d="M22.9168 1.43018C22.6713 1.31018 22.5658 1.53918 22.4223 1.65519C22.3733 1.69269 22.3318 1.74169 22.2903 1.78669C21.9317 2.1697 21.5127 2.42121 20.9657 2.39121C20.1657 2.34621 19.4827 2.59771 18.8787 3.20973C18.7502 2.45521 18.3236 2.0047 17.6746 1.71569C17.3351 1.56568 16.9916 1.41518 16.7536 1.08867C16.5876 0.856163 16.5421 0.597155 16.4591 0.341647C16.4061 0.187643 16.3536 0.0301382 16.1761 0.00363739C15.9836 -0.0263635 15.9081 0.135141 15.8326 0.270145C15.5306 0.822162 15.4136 1.43018 15.4251 2.0462C15.4516 3.43174 16.0366 4.53527 17.1991 5.3203C17.3311 5.4103 17.3651 5.5003 17.3236 5.63181C17.2441 5.90231 17.1501 6.16482 17.0671 6.43533C17.0141 6.60784 16.9351 6.64584 16.7501 6.57033C16.1121 6.30383 15.5611 5.90931 15.074 5.4328C14.2475 4.63328 13.5 3.75075 12.568 3.05973C12.349 2.89822 12.13 2.74822 11.9034 2.60522C10.9524 1.68169 12.028 0.923165 12.277 0.833162C12.5375 0.739159 12.3675 0.41615 11.5259 0.42015C10.6844 0.42365 9.91439 0.705658 8.93286 1.08117C8.78935 1.13767 8.63835 1.17867 8.48384 1.21267C7.59332 1.04367 6.66829 1.00617 5.70226 1.11517C3.88321 1.31768 2.43016 2.1777 1.36213 3.64575C0.0790928 5.4103 -0.222916 7.41536 0.146595 9.50642C0.535106 11.7105 1.66014 13.535 3.38869 14.9616C5.18125 16.4406 7.24581 17.1657 9.60138 17.0266C11.0319 16.9441 12.6245 16.7526 14.421 15.2321C14.874 15.4576 15.3496 15.5476 16.1381 15.6151C16.7456 15.6716 17.3306 15.5851 17.7836 15.4911C18.4931 15.3411 18.4441 14.6841 18.1876 14.5636C16.1081 13.595 16.5646 13.9891 16.1496 13.67C17.2061 12.42 18.8202 10.1979 19.3182 7.17235C19.3672 6.83834 19.4297 6.36783 19.4222 6.09732C19.4182 5.93231 19.4562 5.86831 19.6447 5.84931C20.1657 5.78931 20.6712 5.64681 21.1357 5.3913C22.4833 4.65528 23.0268 3.44624 23.1548 1.9972C23.1738 1.77569 23.1508 1.54668 22.9168 1.43018ZM11.1749 14.4736C9.15936 12.889 8.18184 12.3675 7.77832 12.39C7.40081 12.4125 7.46881 12.8445 7.55182 13.126C7.63882 13.404 7.75182 13.5955 7.91033 13.8396C8.01983 14.0011 8.09533 14.2411 7.80083 14.4216C7.15181 14.8231 6.02327 14.2866 5.97027 14.2601C4.65673 13.4865 3.5587 12.4655 2.78467 11.069C2.03715 9.72493 1.60314 8.28289 1.53164 6.74384C1.51264 6.37233 1.62214 6.24082 1.99215 6.17332C2.47916 6.08332 2.98118 6.06432 3.46769 6.13582C5.52476 6.43633 7.27581 7.35586 8.74385 8.8129C9.58188 9.64243 10.2159 10.634 10.8689 11.6025C11.5634 12.631 12.3105 13.611 13.262 14.4146C13.598 14.6961 13.866 14.9101 14.1225 15.0681C13.349 15.1546 12.058 15.1731 11.1749 14.4746L11.1749 14.4736ZM12.141 8.25988C12.141 8.09488 12.273 7.96338 12.439 7.96338C12.4765 7.96338 12.5105 7.97088 12.541 7.98188C12.5825 7.99688 12.6205 8.01938 12.6505 8.05338C12.7035 8.10588 12.7335 8.18088 12.7335 8.25988C12.7335 8.42489 12.6015 8.55639 12.4355 8.55639C12.2695 8.55639 12.141 8.42489 12.141 8.25988ZM15.1415 9.79893C14.949 9.87793 14.7565 9.94544 14.5715 9.95294C14.2845 9.96794 13.9715 9.85143 13.8015 9.70893C13.5375 9.48742 13.3485 9.36342 13.2695 8.97691C13.2355 8.8119 13.2545 8.55639 13.2845 8.40989C13.3525 8.09438 13.277 7.89187 13.0545 7.70787C12.8735 7.55786 12.643 7.51636 12.39 7.51636C12.2955 7.51636 12.209 7.47486 12.1445 7.44136C12.039 7.38886 11.9519 7.25735 12.035 7.09585C12.0615 7.04335 12.19 6.91584 12.22 6.89334C12.5635 6.69784 12.9595 6.76184 13.326 6.90834C13.6655 7.04735 13.9225 7.30236 14.292 7.66287C14.6695 8.09838 14.7375 8.21838 14.9525 8.54539C15.1225 8.8009 15.277 9.06341 15.3831 9.36392C15.4471 9.55142 15.3641 9.70493 15.1415 9.79893Z" fill="url(#ph-fish)"/>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|