@user-mrz/dsh-system-prompt-studio 0.2.0 → 0.2.1

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/CHANGELOG.md CHANGED
@@ -12,6 +12,40 @@ integration still targets the same DSH shapes, a major bump means it may not.
12
12
 
13
13
  Nothing yet.
14
14
 
15
+ ## [0.2.1] — 2026-11-12
16
+
17
+ ### Fixed
18
+
19
+ - **The section-order table was one DSH release behind.** DSH `0.2.2-rc.2` added two entries to
20
+ `SECTION_ORDERS`: `TOOL_PTY_PANEL` (1710) and `TOOL_COMPUTER_USE` (3000). Neither was in this plugin's
21
+ hardcoded copy, so they were treated as unknown sections and given an interpolated order from their
22
+ neighbours. Nothing failed, but "Replace a section" could not select them and the panel's order column
23
+ drifted for them. Both are now recorded under the names they actually assemble as: `tool:pty-panel`
24
+ (registered by `dsh-terminal-panel`) and `computer-use:dsh-cua` (registered by `dsh-cua`).
25
+
26
+ - **The section listing behind "Replace everything" misjudged plugin sections in both directions.** It
27
+ decided ownership from a name prefix, which was wrong twice over. `dsh-m` registers its section as
28
+ `tool:dshm`, which looks first-party and was silently counted as such; `dsh-cua`'s
29
+ `computer-use:dsh-cua` does not start with a first-party prefix and would have been counted as a
30
+ plugin. The check is now a whitelist of the section names first-party packages actually register, so
31
+ anything not on it is reported as a plugin's. That errs toward over-reporting, which is the safe
32
+ direction: a user is sent to read the list, rather than having a plugin's silent failure hidden from
33
+ them. On a profile running `dsh-m`, the count now correctly includes `tool:dshm`.
34
+
35
+ ### Changed
36
+
37
+ - Four new host checks pin the two `rc.2` order constants and their position relative to their
38
+ neighbours; five new client checks pin the whitelist, including that neither `tool:dshm` nor
39
+ `computer-use:dsh-cua` is on it.
40
+
41
+ ### Note
42
+
43
+ No DSH surface this plugin uses changed shape in `0.2.2-rc.2`: `system-prompt/assemble` keeps its
44
+ `(assembly, context, next)` waterfall signature, `systemPrompt.section()` and the `PromptSection` fields
45
+ are unchanged, and the `agents` / `sessions` / `webServer` services are as before. The two order
46
+ constants were the only drift. `engines.dsh` still reads `>=0.2.2-0 <0.3.0-0`, which already admits
47
+ `0.2.2-rc.2`; no dependency range changed.
48
+
15
49
  ## [0.2.0] — 2026-11-10
16
50
 
17
51
  ### Added
@@ -197,7 +231,8 @@ scoped name unambiguous for anyone who arrives from GitHub.
197
231
  - Read-only assembly observer listing the real section names, order and size.
198
232
  - Loopback-only HTTP route for the panel; forged `Host` headers are refused.
199
233
 
200
- [Unreleased]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.2.0...HEAD
234
+ [Unreleased]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.2.1...HEAD
235
+ [0.2.1]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.2.0...v0.2.1
201
236
  [0.2.0]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.1.9...v0.2.0
202
237
  [0.1.9]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.1.8...v0.1.9
203
238
  [0.1.8]: https://github.com/user-Mrz/dsh-system-prompt-studio/compare/v0.1.7...v0.1.8
package/README.md CHANGED
@@ -89,7 +89,7 @@ dsh plugin --profile <profile> add @user-mrz/dsh-system-prompt-studio
89
89
  From GitHub, which tracks the default branch and therefore needs a ref if you want a fixed version:
90
90
 
91
91
  ```bash
92
- dsh plugin --profile <profile> add github:user-Mrz/dsh-system-prompt-studio#v0.2.0
92
+ dsh plugin --profile <profile> add github:user-Mrz/dsh-system-prompt-studio#v0.2.1
93
93
  ```
94
94
 
95
95
  Replace `<profile>` with your profile name — for the Web build that is usually `web`.
@@ -98,7 +98,7 @@ Replace `<profile>` with your profile name — for the Web build that is usually
98
98
  changes what you install next time:
99
99
 
100
100
  ```bash
101
- dsh plugin --profile <profile> add @user-mrz/dsh-system-prompt-studio@0.2.0
101
+ dsh plugin --profile <profile> add @user-mrz/dsh-system-prompt-studio@0.2.1
102
102
  ```
103
103
 
104
104
  <details>
@@ -377,13 +377,13 @@ dsh plugin --profile <profile> add @user-mrz/dsh-system-prompt-studio
377
377
  或从 GitHub(跟随默认分支,建议锁 tag):
378
378
 
379
379
  ```bash
380
- dsh plugin --profile <profile> add github:user-Mrz/dsh-system-prompt-studio#v0.2.0
380
+ dsh plugin --profile <profile> add github:user-Mrz/dsh-system-prompt-studio#v0.2.1
381
381
  ```
382
382
 
383
383
  锁定版本,保证装到的是一份确定的代码:
384
384
 
385
385
  ```bash
386
- dsh plugin --profile <profile> add @user-mrz/dsh-system-prompt-studio@0.2.0
386
+ dsh plugin --profile <profile> add @user-mrz/dsh-system-prompt-studio@0.2.1
387
387
  ```
388
388
 
389
389
  `prepare` 脚本只校验入口文件存在,不做编译。若被 pnpm 拦下,把 `pnpm-workspace.yaml` 里
package/lib/client.js CHANGED
@@ -609,13 +609,55 @@ window.__ModuleLoader__.load({
609
609
  const dropped = sections.filter((row) => !own.has(row.name))
610
610
  const chars = dropped.reduce((sum, row) => sum + (typeof row.chars === 'number' ? row.chars : 0), 0)
611
611
  /**
612
- * 第三方插件注册的段。第一方段的命名是 `harness:` / `tool:` / `deployment:` /
613
- * `app:` / `context:` / `plan:` / `ui:` / `mcp-` 这些前缀;插件习惯用
614
- * `plugin:` 前缀,或 `<包名>:<段名>` 的形状。按前缀判定是启发式,但足够
615
- * 把「你自己的插件会哑掉」这件事点到名,判错也不会误导成相反的方向。
612
+ * 第三方插件注册的段。
613
+ *
614
+ * 用**前缀白名单**而不是「非第一方即插件」的反向判定:反向判定会把所有
615
+ * 没见过的名字都算成插件,而第一方段的命名空间并不是全封闭的 ——
616
+ * 0.2.2-rc.2 的 dsh-cua 就注册了一个 `computer-use:dsh-cua`,它不是
617
+ * `tool:` 前缀却属于第一方随包发布的插件。反过来,`tool:` 前缀也不保证
618
+ * 第一方:dsh-m 就把自己的段注册成 `tool:dshm`。
619
+ *
620
+ * 所以这里只认「确实是第一方内置包注册的段名」这份白名单,其余一律
621
+ * 计入插件侧 —— 宁可多报一个(提示用户去看清单),也不要漏报一个让
622
+ * 插件静默失效。
616
623
  */
617
- const FIRST_PARTY = /^(harness:|tool:|deployment:|app:|context:|plan:|ui:|mcp-)/
618
- const plugins = dropped.filter((row) => !FIRST_PARTY.test(String(row.name ?? '')))
624
+ const FIRST_PARTY = new Set([
625
+ 'harness:identity',
626
+ 'harness:source',
627
+ 'deployment:persona-prefix',
628
+ 'deployment:persona-suffix',
629
+ 'plan:policy',
630
+ 'team:policy',
631
+ 'ptc:only',
632
+ 'context:file-reference',
633
+ 'tool:bash',
634
+ 'tool:pwsh',
635
+ 'tool:read',
636
+ 'tool:write',
637
+ 'tool:edit',
638
+ 'tool:apply_patch',
639
+ 'tool:glob',
640
+ 'tool:grep',
641
+ 'tool:jobs',
642
+ 'tool:pty',
643
+ 'tool:web_search',
644
+ 'tool:web_fetch',
645
+ 'tool:lsp',
646
+ 'tool:session_query',
647
+ 'tool:goal',
648
+ 'tool:schedule',
649
+ 'tool:workflow',
650
+ 'tool:ralph',
651
+ 'tool:subagent',
652
+ 'tool:subagent_fork',
653
+ 'tool:report',
654
+ 'mcp-resource-servers',
655
+ 'tools:sdk',
656
+ 'ui:deliverable-file-references',
657
+ 'structured-output',
658
+ 'app:web-surface',
659
+ ])
660
+ const plugins = dropped.filter((row) => !FIRST_PARTY.has(String(row.name ?? '')))
619
661
  return { dropped, chars, plugins, kept }
620
662
  })()
621
663
 
package/lib/index.js CHANGED
@@ -67,6 +67,8 @@ const KNOWN_ORDERS = {
67
67
  'tool:grep': 1500,
68
68
  'tool:jobs': 1600,
69
69
  'tool:pty': 1700,
70
+ // 0.2.2-rc.2 新增:dsh-terminal-panel 注册的终端面板段,紧跟在 tool:pty 之后。
71
+ 'tool:pty-panel': 1710,
70
72
  'tool:web_search': 2000,
71
73
  'tool:web_fetch': 2100,
72
74
  'tool:lsp': 2200,
@@ -77,6 +79,9 @@ const KNOWN_ORDERS = {
77
79
  'tool:ralph': 2700,
78
80
  'tool:subagent': 2800,
79
81
  'tool:report': 2900,
82
+ // 0.2.2-rc.2 新增:dsh-cua 注册的段名是 `computer-use:dsh-cua`,不是 `tool:` 前缀,
83
+ // 所以第一方前缀判定认不出它;顺序常量仍按官方的 TOOL_COMPUTER_USE = 3000。
84
+ 'computer-use:dsh-cua': 3000,
80
85
  'mcp-resource-servers': 3100,
81
86
  'tools:sdk': 5000,
82
87
  'ui:deliverable-file-references': 9000,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@user-mrz/dsh-system-prompt-studio",
3
3
  "displayName": "System prompt studio",
4
4
  "description": "Per-conversation system prompt control for DeepSeek Harness: append a section, shadow-replace one named section, or replace the whole prompt. Applies on the next model request, persists per session, and inherits along fork lineage.",
5
- "version": "0.2.0",
5
+ "version": "0.2.1",
6
6
  "type": "module",
7
7
  "main": "lib/index.js",
8
8
  "exports": {