dsh-prompt-trove 0.0.0-stage → 0.1.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 linye
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,133 @@
1
- # Temporary Holding Version
1
+ # dsh-prompt-trove
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ [![npm](https://img.shields.io/npm/v/dsh-prompt-trove)](https://www.npmjs.com/package/dsh-prompt-trove)
4
+ [![downloads](https://img.shields.io/npm/dm/dsh-prompt-trove)](https://www.npmjs.com/package/dsh-prompt-trove)
5
+ [![license](https://img.shields.io/npm/l/dsh-prompt-trove)](LICENSE)
6
+ ![DSH](https://img.shields.io/badge/DSH-0.2.x%20%7C%200.3.x-blue)
7
+
8
+ 每次开新会话都要重复一遍「我是谁、在做什么、输出要什么格式」?
9
+ 把这段背景存成 Markdown,在输入框点一下或打 `@`,就**追加**进当前草稿——不覆盖你已经写的内容。
10
+
11
+ ![演示:点条目 → 追加进草稿](https://raw.githubusercontent.com/CIBUDAYI3906/dsh-prompt-trove/main/assets/demo.gif)
12
+
13
+ ## English
14
+
15
+ A composer prompt library for DeepSeek Harness. Reusable prompts (identity, project background, output preferences) live as plain Markdown — a shared library in `~/.dsh/prompts/` and optional per-project libraries in `<project>/.dsh-prompts/`. Click an entry or type `@` to **append** it to the current draft; nothing you already typed is overwritten. No account, no database, no network requests.
16
+
17
+ ```sh
18
+ dsh plugin --profile web add dsh-prompt-trove
19
+ ```
20
+
21
+ ## 30 秒上手
22
+
23
+ ```sh
24
+ dsh plugin --profile web add dsh-prompt-trove
25
+ ```
26
+
27
+ 重启 `dsh web` → 输入框工具行出现「常用提示词」按钮 → 点开 → 新建一条 → 点它,正文就追加进草稿。
28
+
29
+ ![输入框工具行里的按钮](https://raw.githubusercontent.com/CIBUDAYI3906/dsh-prompt-trove/main/assets/screenshot-1-composer.png)
30
+
31
+ ## 它解决什么
32
+
33
+ - **一层全局库,零配置可用**:`~/.dsh/prompts/global.md`,放你的身份、行业语汇、输出偏好。
34
+ - **一层项目库,按需开启**:`<项目>/.dsh-prompts/<项目名>.md`,跟着项目走,可以直接提交进 git。
35
+ - **追加而不是替换**:你已经写了半句需求,插入背景后那半句还在,两者之间空一行。
36
+ - **两种入口**:面板里点条目,或在输入框里打 `@` 选条目。
37
+ - **界面里增删改**:新建、编辑、删除、搜索;手改 Markdown 后点「重新读取磁盘」即可生效。
38
+ - **纯本地文件**:没有数据库、没有账号、没有网络请求,数据就是你自己的 Markdown。
39
+
40
+ ## 适合谁 / 不适合谁
41
+
42
+ **适合**:同时维护多个项目、每次新会话都要重复交代背景的人;希望提示词跟项目一起进 git 的人;偏好"看得见、改得动"的文本文件而不是黑盒记忆的人。
43
+
44
+ **不适合**:想要"自动记忆 / 自动注入、不用手动插入"的人(本插件只把文本放进当前这条消息);想要 `{{变量}}` 模板、AI 改写、团队共享服务的人——这些不在本插件的范围内。
45
+
46
+ ## 和同类插件的区别
47
+
48
+ | 插件 | 存储 | 插入方式 | 适合 |
49
+ | --- | --- | --- | --- |
50
+ | **dsh-prompt-trove** | 两层 Markdown 文件(全局 + 每项目) | 点条目或 `@`,**追加** | 项目多、想进 git、要可手改 |
51
+ | `dsh-prompt-vault` | Host 侧 JSON | 点条目,追加 | 单库、零文件管理 |
52
+ | `dsh-prompt-shortcuts` | Host 侧 JSON | 置顶按钮,替换草稿 | 需要一排常用按钮 |
53
+ | `dsh-prompt-library` | 本地 JSON + 模板 | 插入/追加,支持变量 | 需要模板变量 |
54
+
55
+ ## 库放在哪
56
+
57
+ | 层 | 位置 | 放什么 |
58
+ | --- | --- | --- |
59
+ | 全局 | `~/.dsh/prompts/global.md` | 跨项目通用的身份、行业语汇、输出偏好 |
60
+ | 项目 | `<项目>/.dsh-prompts/<项目名>.md` | 只对某个项目成立的背景、技术栈、验收标准 |
61
+
62
+ 全局库装好就能用。项目库要在 profile 的 `cordis.patch.yml` 里给这一行加 `config.root`:
63
+
64
+ ```yaml
65
+ # ~/.dsh/profiles/web/cordis.patch.yml
66
+ - id: dsh-prompt-trove
67
+ config:
68
+ root: /Users/you/code
69
+ ```
70
+
71
+ `root` 的两种用法:
72
+
73
+ ```text
74
+ root = /Users/you/code # 多项目:code 下每个含 .dsh-prompts/ 的一级文件夹是一个分组
75
+ root = /Users/you/code/alpha # 单项目:项目自己含 .dsh-prompts/ 就是一个分组
76
+ ```
77
+
78
+ 没配 `root` 时面板只显示全局库,不会去扫你的磁盘。
79
+
80
+ ## 文件格式
81
+
82
+ ```markdown
83
+ # 分组名
84
+
85
+ ## 我的工作背景
86
+ > 一句话说明(列表里显示) #身份 #背景
87
+ 我在 XX 公司负责 XX,团队 3 人……
88
+ ```
89
+
90
+ - `## 标题` = 一个条目,同一文件内标题必须唯一;
91
+ - `> ` 开头的一行 = 列表里显示的说明,写在里面的 `#标签` 会被识别;
92
+ - 标题下面、正文之前的内容都属于正文,插入时原样进入输入框。
93
+
94
+ 示例见 [`examples/`](examples/)。
95
+
96
+ ## 局限(诚实说明)
97
+
98
+ - 插入的是**文本,不是记忆**:和手打一遍等价,只影响当前这条消息;
99
+ - 项目库需要手动指定 `root`(DSH 0.2 的输入槽不向客户端插件暴露 `sessionId`,无法自动跟随当前项目);
100
+ - 条目建议 300–600 字,列表里常显字数就是为了让插入成本可见;
101
+ - 界面文案目前只有中文。
102
+
103
+ ## 兼容性
104
+
105
+ - 目标:DSH **0.2.x / 0.3.x**(`engines.dsh: >=0.2.0-rc.1 <0.4.0`),实测于 0.2.0-rc.2;
106
+ - 客户端对输入槽做了能力探测:契约变化时插件会降级为“无入口”而不是让页面崩溃;
107
+ - DSH 0.3 尚未正式发布,0.3 上的行为会在发布后回归;遇到问题请开 issue。
108
+
109
+ ## 卸载
110
+
111
+ ```sh
112
+ dsh plugin --profile web remove dsh-prompt-trove
113
+ ```
114
+
115
+ Markdown 文件不会被删除。
116
+
117
+ ## 同作者的另一款插件
118
+
119
+ 如果你也嫌侧边栏工作区是平的:[`dsh-workspace-nest`](https://github.com/CIBUDAYI3906/dsh-workspace-nest) —— 多级子工作区 + 会话置顶到所属文件夹。
120
+
121
+ ## 开发
122
+
123
+ ```sh
124
+ npm install
125
+ npm run build # client-source.jsx → client.js
126
+ node scripts/preflight.mjs
127
+ ```
128
+
129
+ 发布流程、issue/PR 规范见 [CONTRIBUTING.md](CONTRIBUTING.md),版本变化见 [CHANGELOG.md](CHANGELOG.md)。
130
+
131
+ ## License
132
+
133
+ MIT