dsh-output-styles 0.6.11 → 0.6.13
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 +22 -0
- package/README.es.md +5 -4
- package/README.hi.md +5 -4
- package/README.md +5 -4
- package/README.pt.md +5 -4
- package/README.zh.md +5 -4
- package/docs/VERIFICATION.zh.md +62 -0
- package/lib/index.js +11 -2
- package/lib/types/export.d.ts +7 -0
- package/lib/types/export.d.ts.map +1 -1
- package/lib/types/runtime.d.ts +2 -1
- package/lib/types/runtime.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/export.ts +9 -1
- package/src/runtime.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@ All notable changes to this project are documented in this file. The format
|
|
|
4
4
|
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the
|
|
5
5
|
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [0.6.13] - 2026-09-09
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Use `$RUNNER_TEMP` instead of an absolute `/tmp` path in the plugin-doctor workflow: the repository self-contained gate rejects absolute paths, so the 0.6.12 publish workflow failed at `verify-self-contained`; no product code changes.
|
|
12
|
+
|
|
13
|
+
## [0.6.12] - 2026-09-09
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- `/export` no longer includes the system prompt. Session format V3 (DeepSeek Harness `dsh-v0.1.5-alpha.1`) moved the rendered prompt onto the message surface as node 0 (a `system/message` event), and the transcript projection mapped that node to the first `## User` block, so a V3 session exported the whole prompt with the output-style body inside it. The surface node is excluded now and the pre-V3 export output is restored; `tests/export-surface.spec.ts` fails without the fix and passes with it.
|
|
18
|
+
- `scripts/verify-session-log.mjs` follows the V3 session-log contracts: `SessionHandle.read()` returns `{ eventState, events }` (an event array up to `0.1.3-alpha.1`), the model-visible prompt is read from the `system/message` event (`request/header.system` stays a V2 read fallback), and the storage probe reads the `single`-layout unit file `<root>/output_style.json` instead of scanning a directory that never exists. The pure shape handling moved to `scripts/session-log-evidence.mjs` and is unit tested (`tests/session-log-evidence.spec.ts`) without reading any real session log.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- The `devDependencies` pins for `@deepseek-ai/dsh-storage`, `@deepseek-ai/dsh-storage-domain`, and `@deepseek-ai/dsh-storage-json` are stated at `0.1.2-rc.1`, matching what pnpm resolves: the same packages are runtime `dependencies` on that line and pnpm resolves them from `dependencies` alone, so the `0.1.5-alpha.1` dev pins added in 0.6.11 were inert. The runtime dependency line is unchanged (0.1.2-rc.1 is the widest published install line and the peer range still covers 0.1.5-alpha.1).
|
|
23
|
+
- The compat workflow probes now install `@deepseek-ai/dsh@0.1.5-alpha.1`, `@deepseek-ai/dsh-base@0.1.5-alpha.1`, and `@deepseek-ai/dsh-headless@0.1.5-alpha.1`, and the bare-import job pins the current `dsh-settings` peer range.
|
|
24
|
+
|
|
25
|
+
### Docs
|
|
26
|
+
|
|
27
|
+
- Five-language README: the injected system prompt is recorded as the `system/message` surface node (not `request/header`), and the test-count line states 148 tests.
|
|
28
|
+
|
|
7
29
|
## [0.6.11] - 2026-09-09
|
|
8
30
|
|
|
9
31
|
### Changed
|
package/README.es.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
[](https://github.com/topics/dsh-plugin)
|
|
12
|
+
[](https://github.com/PerryLink/dsh-plugin-doctor#verified-徽章)
|
|
12
13
|
[](#)
|
|
13
14
|
[](https://github.com/PerryLink/dsh-output-styles/actions)
|
|
14
15
|
[](https://github.com/PerryLink/dsh-output-styles/releases)
|
|
@@ -85,10 +86,10 @@ flowchart LR
|
|
|
85
86
|
D --> R[OutputStyleRuntime]
|
|
86
87
|
R -->|body at every assembly| S[systemPrompt section order 90]
|
|
87
88
|
S --> M[Model request]
|
|
88
|
-
M -->|full system prompt| H[
|
|
89
|
+
M -->|full system prompt| H[system/message logged]
|
|
89
90
|
```
|
|
90
91
|
|
|
91
|
-
Todo lo que el modelo ve es reconstruible desde el registro de sesión — sin un nuevo tipo de evento de sesión, sin cambios en el agent-loop. El nombre del estilo viene de `command/run`, el texto exacto inyectado de `
|
|
92
|
+
Todo lo que el modelo ve es reconstruible desde el registro de sesión — sin un nuevo tipo de evento de sesión, sin cambios en el agent-loop. El nombre del estilo viene de `command/run`, el texto exacto inyectado de `system/message`, y el marcador de procedencia `{ kind: 'plugin', plugin: 'dsh-output-styles' }` viaja en el registro del dominio. Los estilos se aplican solo a la conversación principal; las sesiones de subagente conservan sus propios prompts (igual que Claude Code).
|
|
92
93
|
|
|
93
94
|
## Install & uninstall
|
|
94
95
|
|
|
@@ -188,7 +189,7 @@ Filtrado contra el ecosistema DSH antes del desarrollo (instantánea 2026-08): n
|
|
|
188
189
|
|
|
189
190
|
- **Permissions**: el manifiesto de workshop declara `fs:read`, `fs:write`, `fs:watch`, `storage:read`, `storage:write` y `settings:read`.
|
|
190
191
|
- **Data**: la elección de estilo vive en el dominio de almacenamiento `output_style` (indexada por sessionId); no se persiste otro estado, sin solicitudes de red.
|
|
191
|
-
- **Session log**: el nombre del estilo viene de `command/run`, el texto exacto inyectado de `
|
|
192
|
+
- **Session log**: el nombre del estilo viene de `command/run`, el texto exacto inyectado de `system/message`; el marcador de procedencia `{ kind: 'plugin', plugin: 'dsh-output-styles' }` viaja en el registro del dominio.
|
|
192
193
|
|
|
193
194
|
## Security boundaries
|
|
194
195
|
|
|
@@ -208,7 +209,7 @@ Filtrado contra el ecosistema DSH antes del desarrollo (instantánea 2026-08): n
|
|
|
208
209
|
```sh
|
|
209
210
|
pnpm install
|
|
210
211
|
pnpm run typecheck # ambos proyectos tsc
|
|
211
|
-
pnpm test # vitest —
|
|
212
|
+
pnpm test # vitest — 148 tests
|
|
212
213
|
pnpm run verify # typecheck + tests + self-contained (la puerta de prepublishOnly)
|
|
213
214
|
pnpm run build # artefactos lib/ (bundles host + client)
|
|
214
215
|
pnpm pack # tarball para dsh plugin add
|
package/README.hi.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
[](https://github.com/topics/dsh-plugin)
|
|
12
|
+
[](https://github.com/PerryLink/dsh-plugin-doctor#verified-徽章)
|
|
12
13
|
[](#)
|
|
13
14
|
[](https://github.com/PerryLink/dsh-output-styles/actions)
|
|
14
15
|
[](https://github.com/PerryLink/dsh-output-styles/releases)
|
|
@@ -85,10 +86,10 @@ flowchart LR
|
|
|
85
86
|
D --> R[OutputStyleRuntime]
|
|
86
87
|
R -->|body at every assembly| S[systemPrompt section order 90]
|
|
87
88
|
S --> M[Model request]
|
|
88
|
-
M -->|full system prompt| H[
|
|
89
|
+
M -->|full system prompt| H[system/message logged]
|
|
89
90
|
```
|
|
90
91
|
|
|
91
|
-
मॉडल जो देखता है वह सब सत्र लॉग से पुनर्निर्माण-योग्य है — कोई नया सत्र घटना प्रकार नहीं, कोई agent-loop बदलाव नहीं। शैली नाम `command/run` से आता है, सटीक इंजेक्ट किया गया पाठ `
|
|
92
|
+
मॉडल जो देखता है वह सब सत्र लॉग से पुनर्निर्माण-योग्य है — कोई नया सत्र घटना प्रकार नहीं, कोई agent-loop बदलाव नहीं। शैली नाम `command/run` से आता है, सटीक इंजेक्ट किया गया पाठ `system/message` से, और स्रोत मार्कर `{ kind: 'plugin', plugin: 'dsh-output-styles' }` डोमेन रिकॉर्ड में चलता है। शैलियाँ केवल मुख्य वार्तालाप पर लागू होती हैं; उप-एजेंट सत्र अपने प्रॉम्प्ट रखते हैं (Claude Code की तरह)।
|
|
92
93
|
|
|
93
94
|
## Install & uninstall
|
|
94
95
|
|
|
@@ -188,7 +189,7 @@ flowchart LR
|
|
|
188
189
|
|
|
189
190
|
- **Permissions**: workshop मैनिफ़ेस्ट `fs:read`, `fs:write`, `fs:watch`, `storage:read`, `storage:write` और `settings:read` घोषित करता है।
|
|
190
191
|
- **Data**: शैली चयन `output_style` स्टोरेज डोमेन में रहता है (sessionId से अनुक्रमित); कोई अन्य स्थिति स्थायी नहीं, कोई नेटवर्क अनुरोध नहीं।
|
|
191
|
-
- **Session log**: शैली नाम `command/run` से आता है, सटीक इंजेक्ट किया गया पाठ `
|
|
192
|
+
- **Session log**: शैली नाम `command/run` से आता है, सटीक इंजेक्ट किया गया पाठ `system/message` से; स्रोत मार्कर `{ kind: 'plugin', plugin: 'dsh-output-styles' }` डोमेन रिकॉर्ड में चलता है।
|
|
192
193
|
|
|
193
194
|
## Security boundaries
|
|
194
195
|
|
|
@@ -208,7 +209,7 @@ flowchart LR
|
|
|
208
209
|
```sh
|
|
209
210
|
pnpm install
|
|
210
211
|
pnpm run typecheck # दोनों tsc परियोजनाएँ
|
|
211
|
-
pnpm test # vitest —
|
|
212
|
+
pnpm test # vitest — 148 tests
|
|
212
213
|
pnpm run verify # typecheck + tests + self-contained (prepublishOnly द्वार)
|
|
213
214
|
pnpm run build # lib/ कलाकृतियाँ (host + client बंडल)
|
|
214
215
|
pnpm pack # dsh plugin add के लिए tarball
|
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
[](LICENSE)
|
|
14
14
|
[](https://github.com/topics/dsh-plugin)
|
|
15
|
+
[](https://github.com/PerryLink/dsh-plugin-doctor#verified-徽章)
|
|
15
16
|
[](#)
|
|
16
17
|
[](https://github.com/PerryLink/dsh-output-styles/actions)
|
|
17
18
|
[](https://github.com/PerryLink/dsh-output-styles/releases)
|
|
@@ -88,10 +89,10 @@ flowchart LR
|
|
|
88
89
|
D --> R[OutputStyleRuntime]
|
|
89
90
|
R -->|body at every assembly| S[systemPrompt section order 90]
|
|
90
91
|
S --> M[Model request]
|
|
91
|
-
M -->|full system prompt| H[
|
|
92
|
+
M -->|full system prompt| H[system/message logged]
|
|
92
93
|
```
|
|
93
94
|
|
|
94
|
-
Everything the model sees is reconstructable from the session log — no new session event type, no agent-loop changes. The style name comes from `command/run`, the exact injected text from `
|
|
95
|
+
Everything the model sees is reconstructable from the session log — no new session event type, no agent-loop changes. The style name comes from `command/run`, the exact injected text from `system/message`, and the provenance marker `{ kind: 'plugin', plugin: 'dsh-output-styles' }` rides in the domain record. Styles apply to the main conversation only; subagent sessions keep their own prompts (matching Claude Code).
|
|
95
96
|
|
|
96
97
|
## Install & uninstall
|
|
97
98
|
|
|
@@ -191,7 +192,7 @@ Screened against the DSH ecosystem before development (2026-08 snapshot): no `st
|
|
|
191
192
|
|
|
192
193
|
- **Permissions**: declares `fs:read`, `fs:write`, `fs:watch`, `storage:read`, `storage:write`, and `settings:read` in its workshop manifest.
|
|
193
194
|
- **Data**: the style choice lives in the `output_style` storage domain (keyed by sessionId); no other state is persisted, no network requests.
|
|
194
|
-
- **Session log**: the style name comes from `command/run`, the exact injected text from `
|
|
195
|
+
- **Session log**: the style name comes from `command/run`, the exact injected text from `system/message`; the provenance marker `{ kind: 'plugin', plugin: 'dsh-output-styles' }` rides in the domain record.
|
|
195
196
|
|
|
196
197
|
## Security boundaries
|
|
197
198
|
|
|
@@ -212,7 +213,7 @@ Screened against the DSH ecosystem before development (2026-08 snapshot): no `st
|
|
|
212
213
|
```sh
|
|
213
214
|
pnpm install
|
|
214
215
|
pnpm run typecheck # both tsc projects
|
|
215
|
-
pnpm test # vitest —
|
|
216
|
+
pnpm test # vitest — 148 tests
|
|
216
217
|
pnpm run verify # typecheck + tests + self-contained (the prepublishOnly gate)
|
|
217
218
|
pnpm run build # lib/ artifacts (host + client bundles)
|
|
218
219
|
pnpm pack # tarball for dsh plugin add
|
package/README.pt.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
[](https://github.com/topics/dsh-plugin)
|
|
12
|
+
[](https://github.com/PerryLink/dsh-plugin-doctor#verified-徽章)
|
|
12
13
|
[](#)
|
|
13
14
|
[](https://github.com/PerryLink/dsh-output-styles/actions)
|
|
14
15
|
[](https://github.com/PerryLink/dsh-output-styles/releases)
|
|
@@ -85,10 +86,10 @@ flowchart LR
|
|
|
85
86
|
D --> R[OutputStyleRuntime]
|
|
86
87
|
R -->|body at every assembly| S[systemPrompt section order 90]
|
|
87
88
|
S --> M[Model request]
|
|
88
|
-
M -->|full system prompt| H[
|
|
89
|
+
M -->|full system prompt| H[system/message logged]
|
|
89
90
|
```
|
|
90
91
|
|
|
91
|
-
Tudo o que o modelo vê é reconstruível a partir do log de sessão — sem novo tipo de evento de sessão, sem alterações no agent-loop. O nome do estilo vem de `command/run`, o texto exato injetado de `
|
|
92
|
+
Tudo o que o modelo vê é reconstruível a partir do log de sessão — sem novo tipo de evento de sessão, sem alterações no agent-loop. O nome do estilo vem de `command/run`, o texto exato injetado de `system/message`, e o marcador de procedência `{ kind: 'plugin', plugin: 'dsh-output-styles' }` viaja no registro do domínio. Os estilos se aplicam apenas à conversa principal; sessões de subagente mantêm seus próprios prompts (como no Claude Code).
|
|
92
93
|
|
|
93
94
|
## Install & uninstall
|
|
94
95
|
|
|
@@ -188,7 +189,7 @@ Filtrado contra o ecossistema DSH antes do desenvolvimento (instantânea 2026-08
|
|
|
188
189
|
|
|
189
190
|
- **Permissions**: o manifesto de workshop declara `fs:read`, `fs:write`, `fs:watch`, `storage:read`, `storage:write` e `settings:read`.
|
|
190
191
|
- **Data**: a escolha de estilo vive no domínio de armazenamento `output_style` (indexada por sessionId); nenhum outro estado é persistido, sem solicitações de rede.
|
|
191
|
-
- **Session log**: o nome do estilo vem de `command/run`, o texto exato injetado de `
|
|
192
|
+
- **Session log**: o nome do estilo vem de `command/run`, o texto exato injetado de `system/message`; o marcador de procedência `{ kind: 'plugin', plugin: 'dsh-output-styles' }` viaja no registro do domínio.
|
|
192
193
|
|
|
193
194
|
## Security boundaries
|
|
194
195
|
|
|
@@ -208,7 +209,7 @@ Filtrado contra o ecossistema DSH antes do desenvolvimento (instantânea 2026-08
|
|
|
208
209
|
```sh
|
|
209
210
|
pnpm install
|
|
210
211
|
pnpm run typecheck # ambos os projetos tsc
|
|
211
|
-
pnpm test # vitest —
|
|
212
|
+
pnpm test # vitest — 148 tests
|
|
212
213
|
pnpm run verify # typecheck + tests + self-contained (a porta de prepublishOnly)
|
|
213
214
|
pnpm run build # artefatos lib/ (bundles host + client)
|
|
214
215
|
pnpm pack # tarball para dsh plugin add
|
package/README.zh.md
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
[](LICENSE)
|
|
13
13
|
[](https://github.com/topics/dsh-plugin)
|
|
14
|
+
[](https://github.com/PerryLink/dsh-plugin-doctor#verified-徽章)
|
|
14
15
|
[](#)
|
|
15
16
|
[](https://github.com/PerryLink/dsh-output-styles/actions)
|
|
16
17
|
[](https://github.com/PerryLink/dsh-output-styles/releases)
|
|
@@ -87,10 +88,10 @@ flowchart LR
|
|
|
87
88
|
D --> R[OutputStyleRuntime]
|
|
88
89
|
R -->|body at every assembly| S[systemPrompt section order 90]
|
|
89
90
|
S --> M[Model request]
|
|
90
|
-
M -->|full system prompt| H[
|
|
91
|
+
M -->|full system prompt| H[system/message logged]
|
|
91
92
|
```
|
|
92
93
|
|
|
93
|
-
模型所见的一切都能从会话日志重建 —— 无新增会话事件类型、无 agent-loop 改动。风格名来自 `command/run`,精确注入文本来自 `
|
|
94
|
+
模型所见的一切都能从会话日志重建 —— 无新增会话事件类型、无 agent-loop 改动。风格名来自 `command/run`,精确注入文本来自 `system/message`,来源标记 `{ kind: 'plugin', plugin: 'dsh-output-styles' }` 随域记录携带。风格只作用于主会话;子代理会话保留各自提示(与 Claude Code 一致)。
|
|
94
95
|
|
|
95
96
|
## Install & uninstall
|
|
96
97
|
|
|
@@ -190,7 +191,7 @@ flowchart LR
|
|
|
190
191
|
|
|
191
192
|
- **Permissions**:workshop 清单声明 `fs:read`、`fs:write`、`fs:watch`、`storage:read`、`storage:write` 与 `settings:read`。
|
|
192
193
|
- **Data**:风格选择存于 `output_style` 存储域(按 sessionId 隔离);不持久化其他状态,无网络请求。
|
|
193
|
-
- **Session log**:风格名来自 `command/run`,精确注入文本来自 `
|
|
194
|
+
- **Session log**:风格名来自 `command/run`,精确注入文本来自 `system/message`;来源标记 `{ kind: 'plugin', plugin: 'dsh-output-styles' }` 随域记录携带。
|
|
194
195
|
|
|
195
196
|
## Security boundaries
|
|
196
197
|
|
|
@@ -210,7 +211,7 @@ flowchart LR
|
|
|
210
211
|
```sh
|
|
211
212
|
pnpm install
|
|
212
213
|
pnpm run typecheck # 两个 tsc 项目
|
|
213
|
-
pnpm test # vitest ——
|
|
214
|
+
pnpm test # vitest —— 148 个测试
|
|
214
215
|
pnpm run verify # typecheck + tests + self-contained(prepublishOnly 门禁)
|
|
215
216
|
pnpm run build # lib/ 产物(host + client 包)
|
|
216
217
|
pnpm pack # 供 dsh plugin add 的 tarball
|
package/docs/VERIFICATION.zh.md
CHANGED
|
@@ -169,3 +169,65 @@ Error: dsh: plugin tree failed to load: ... entry output-styles (dsh-output-styl
|
|
|
169
169
|
```
|
|
170
170
|
|
|
171
171
|
即:0.3.0 tarball 经真实 rc.6 CLI 安装、补丁层组合、启动加载器逐行应用全部通过;插件的 Schemastery schema 在真实组合中生效(非法配置按插件自身的校验信息拒绝启动)。模型可见注入路径(systemPrompt 组装)由第 7.1 节组装级集成测试覆盖,真实 API 复测边界与第 6 节一致。
|
|
172
|
+
|
|
173
|
+
## 8. 0.6.12 增量验证(会话格式 V3)
|
|
174
|
+
|
|
175
|
+
宿主基线 `dsh-v0.1.5-alpha.1`:系统提示词不再是 `request/header.system`,而是消息面上的节点 0(`system/message` 事件);`SessionHandle.read()` 返回 `{ eventState, events }`(此前为事件数组)。本节记录本版本针对这两项契约的实测,全部使用合成事件,未读取任何真实会话。
|
|
176
|
+
|
|
177
|
+
### 8.1 `/export` 回归(先红后绿)
|
|
178
|
+
|
|
179
|
+
```text
|
|
180
|
+
$ git stash push -- src/export.ts # 暂时撤掉修复
|
|
181
|
+
$ pnpm exec vitest run tests/export-surface.spec.ts
|
|
182
|
+
❯ tests/export-surface.spec.ts (4 tests | 3 failed)
|
|
183
|
+
AssertionError: expected '# Session export\n\n## User\n\n# Outp…' not to contain 'Output style'
|
|
184
|
+
Tests 3 failed | 1 passed (4)
|
|
185
|
+
|
|
186
|
+
$ git stash pop # 恢复修复
|
|
187
|
+
$ pnpm exec vitest run tests/export-surface.spec.ts tests/session-log-evidence.spec.ts
|
|
188
|
+
✓ tests/session-log-evidence.spec.ts (13 tests)
|
|
189
|
+
✓ tests/export-surface.spec.ts (4 tests)
|
|
190
|
+
Test Files 2 passed (2)
|
|
191
|
+
Tests 17 passed (17)
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
修复前,V3 会话的导出文档首段正是 `## User` + 整段系统提示词(含 `# Output style: concise` 正文),与评估卡用合成 surface 的实测结论一致;修复后系统节点被排除,`## User` 只出现一次且不含风格正文。V2 存储日志(`request/header` 携带 `system`)本就不在消息面上,输出与 0.1.3 及更早一致(同文件第三条用例覆盖)。
|
|
195
|
+
|
|
196
|
+
### 8.2 取证脚本的 V3 形状(合成数据)
|
|
197
|
+
|
|
198
|
+
`scripts/verify-session-log.mjs` 的纯形状处理抽到 `scripts/session-log-evidence.mjs`,由 `tests/session-log-evidence.spec.ts` 用合成事件覆盖:`read()` 的 V3 对象与旧数组两种形状、`system/message` 的 `data.message.content` 提取(含「末节点为空即视为无系统提示、不回落旧文本」)、V2 `request/header.system` 回落、风格标记计数,以及 `single` 布局 `<root>/output_style.json` 的定位(旧脚本扫描的是永不存在的同名目录)。
|
|
199
|
+
|
|
200
|
+
真实会话日志复跑(`node scripts/verify-session-log.mjs`)**未执行**:红线禁止使用真实会话数据(`$DSH_HOME/sessions`)。脚本已按 V3 形状修好,复跑命令与第 4 节一致,留待人工在有真实 V3 会话的机器上执行。
|
|
201
|
+
|
|
202
|
+
### 8.3 门禁(2026-09-09 实测)
|
|
203
|
+
|
|
204
|
+
```text
|
|
205
|
+
$ pnpm install --frozen-lockfile --ignore-scripts
|
|
206
|
+
Lockfile is up to date, resolution step is skipped
|
|
207
|
+
Already up to date
|
|
208
|
+
|
|
209
|
+
$ pnpm run check:readmes
|
|
210
|
+
readme-sync: all 5 READMEs share 22 sections, the install command, and 11 config keys
|
|
211
|
+
|
|
212
|
+
$ pnpm run lint
|
|
213
|
+
Found 4 warnings and 0 errors.
|
|
214
|
+
|
|
215
|
+
$ pnpm run typecheck # exit 0(两个 tsc 工程)
|
|
216
|
+
$ pnpm test
|
|
217
|
+
Test Files 14 passed (14)
|
|
218
|
+
Tests 148 passed (148)
|
|
219
|
+
|
|
220
|
+
$ pnpm run build
|
|
221
|
+
fix-dts: 5 file(s), 22 specifier(s) rewritten to .js
|
|
222
|
+
|
|
223
|
+
$ pnpm run verify:self-contained
|
|
224
|
+
self-contained repository verified (75 text files)
|
|
225
|
+
|
|
226
|
+
$ pnpm run verify:artifacts
|
|
227
|
+
artifacts OK: syntax + ESM imports + bundle patch present
|
|
228
|
+
|
|
229
|
+
$ pnpm pack --pack-destination <pack 目录>
|
|
230
|
+
dsh-output-styles-0.6.12.tgz
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
`compat.yml` 的月度/手动作业本版本已把两条安装钉号升到 `0.1.5-alpha.1`、并把裸装作业的 `dsh-settings` 范围改为当前 peer 复合范围;该 workflow 只在 GitHub runner 上运行,本机**未执行**。
|
package/lib/index.js
CHANGED
|
@@ -316,6 +316,13 @@ const BUILTIN_RENDERERS = [{
|
|
|
316
316
|
* Extract the message surface of a session log as plain lines. Tool calls and
|
|
317
317
|
* tool results render as labeled lines so the transcript stays readable; the
|
|
318
318
|
* content is never summarized — this is a projection, not an interpretation.
|
|
319
|
+
*
|
|
320
|
+
* Session format V3 moved the rendered system prompt onto the surface as node 0
|
|
321
|
+
* (a `system/message` event, replacing the old `request/header.system`). A
|
|
322
|
+
* transcript export is the human conversation, not the model request, so the
|
|
323
|
+
* system node is excluded: otherwise the whole system prompt would surface as
|
|
324
|
+
* the first `## User` block, which is neither a user turn nor content the
|
|
325
|
+
* transcript ever showed.
|
|
319
326
|
* @param events - the session log, in seq order.
|
|
320
327
|
* @returns the conversation lines in surface order.
|
|
321
328
|
*/
|
|
@@ -325,8 +332,9 @@ function conversationLines(events) {
|
|
|
325
332
|
for (const seq of nodes) {
|
|
326
333
|
const event = events.find((item) => item.seq === seq);
|
|
327
334
|
if (event === void 0) continue;
|
|
335
|
+
if (event.type === "system/message") continue;
|
|
328
336
|
const message = deriveEventMessage(event);
|
|
329
|
-
if (message === null) continue;
|
|
337
|
+
if (message === null || message.role === "system") continue;
|
|
330
338
|
const described = describeMessage(message);
|
|
331
339
|
if (described.text === "") continue;
|
|
332
340
|
lines.push(described);
|
|
@@ -590,7 +598,8 @@ var OutputStyleRuntime = class {
|
|
|
590
598
|
/**
|
|
591
599
|
* The model-visible style directive for a session: a header naming the
|
|
592
600
|
* style plus its body under the configured budget. The exact text is what
|
|
593
|
-
* the harness logs
|
|
601
|
+
* the harness logs as the `system/message` surface node before dispatch
|
|
602
|
+
* (session format V3; `request/header.system` in older logs).
|
|
594
603
|
* @param sessionId - the session the directive is built for.
|
|
595
604
|
* @returns the directive, or `''` when no style applies.
|
|
596
605
|
*/
|
package/lib/types/export.d.ts
CHANGED
|
@@ -38,6 +38,13 @@ export interface ExportDocument {
|
|
|
38
38
|
* Extract the message surface of a session log as plain lines. Tool calls and
|
|
39
39
|
* tool results render as labeled lines so the transcript stays readable; the
|
|
40
40
|
* content is never summarized — this is a projection, not an interpretation.
|
|
41
|
+
*
|
|
42
|
+
* Session format V3 moved the rendered system prompt onto the surface as node 0
|
|
43
|
+
* (a `system/message` event, replacing the old `request/header.system`). A
|
|
44
|
+
* transcript export is the human conversation, not the model request, so the
|
|
45
|
+
* system node is excluded: otherwise the whole system prompt would surface as
|
|
46
|
+
* the first `## User` block, which is neither a user turn nor content the
|
|
47
|
+
* transcript ever showed.
|
|
41
48
|
* @param events - the session log, in seq order.
|
|
42
49
|
* @returns the conversation lines in surface order.
|
|
43
50
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAEpE,sCAAsC;AACtC,MAAM,WAAW,UAAU;IACzB,oDAAoD;IACpD,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAA;IAC5C,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,qDAAqD;IACrD,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,mEAAmE;AACnE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAA;IACpC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;IACnC,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAA;IACpC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAA;IACrC,QAAQ,CAAC,QAAQ,EAAE,SAAS,YAAY,EAAE,CAAA;CAC3C;AAED
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/export.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAEpE,sCAAsC;AACtC,MAAM,WAAW,UAAU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AAS,OAAO,gBAAgB,EAAE,SAAS,EAAE,EACpD,GAAG,GAAE,IAAiB,GACrB,cAAc,CAoBhB"}
|
package/lib/types/runtime.d.ts
CHANGED
|
@@ -91,7 +91,8 @@ export declare class OutputStyleRuntime {
|
|
|
91
91
|
/**
|
|
92
92
|
* The model-visible style directive for a session: a header naming the
|
|
93
93
|
* style plus its body under the configured budget. The exact text is what
|
|
94
|
-
* the harness logs
|
|
94
|
+
* the harness logs as the `system/message` surface node before dispatch
|
|
95
|
+
* (session format V3; `request/header.system` in older logs).
|
|
95
96
|
* @param sessionId - the session the directive is built for.
|
|
96
97
|
* @returns the directive, or `''` when no style applies.
|
|
97
98
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,OAAO,EAAgB,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAKhF,OAAO,KAAK,EAAE,MAAM,EAA2B,MAAM,iCAAiC,CAAA;AAGtF,OAAO,EAAiB,KAAK,MAAM,EAAE,MAAM,aAAa,CAAA;AAGxD,OAAO,EAAmC,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEtF,OAAO,EAAE,mBAAmB,EAAgE,KAAK,cAAc,EAA2B,MAAM,YAAY,CAAA;AAc5J,kGAAkG;AAClG,eAAO,MAAM,kBAAkB,QAAwD,CAAA;AAEvF,mFAAmF;AACnF,eAAO,MAAM,kBAAkB,2BAA2B,CAAA;AAQ1D;;;;;;GAMG;AACH,qBAAa,kBAAkB;IAqB3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IApBzB,OAAO,CAAC,OAAO,CAAkC;IACjD,OAAO,CAAC,WAAW,CAAyB;IAE5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAoC;IAC9D,OAAO,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M,CAAA;CAAE,CAAA;AAEzF;;;;;;;;;;;;;GAaG;AACH,wBAAsB,cAAc,CAClC,EAAE,EAAE,gBAAgB,GAAG,SAAS,EAChC,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAoD3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-output-styles",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.13",
|
|
4
4
|
"description": "Claude Code outputStyles-equivalent runtime output-style switching for DeepSeek Harness",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -192,9 +192,9 @@
|
|
|
192
192
|
"@deepseek-ai/dsh-session-persistence-jsonl": "0.1.5-alpha.1",
|
|
193
193
|
"@deepseek-ai/dsh-session-projection": "0.1.5-alpha.1",
|
|
194
194
|
"@deepseek-ai/dsh-settings": "0.1.5-alpha.1",
|
|
195
|
-
"@deepseek-ai/dsh-storage": "0.1.
|
|
196
|
-
"@deepseek-ai/dsh-storage-domain": "0.1.
|
|
197
|
-
"@deepseek-ai/dsh-storage-json": "0.1.
|
|
195
|
+
"@deepseek-ai/dsh-storage": "0.1.2-rc.1",
|
|
196
|
+
"@deepseek-ai/dsh-storage-domain": "0.1.2-rc.1",
|
|
197
|
+
"@deepseek-ai/dsh-storage-json": "0.1.2-rc.1",
|
|
198
198
|
"@deepseek-ai/dsh-system-prompt": "0.1.5-alpha.1",
|
|
199
199
|
"@deepseek-ai/dsh-timeout": "0.1.5-alpha.1",
|
|
200
200
|
"@deepseek-ai/dsh-typert-protocol": "0.1.5-alpha.1",
|
package/src/export.ts
CHANGED
|
@@ -43,6 +43,13 @@ export interface ExportDocument {
|
|
|
43
43
|
* Extract the message surface of a session log as plain lines. Tool calls and
|
|
44
44
|
* tool results render as labeled lines so the transcript stays readable; the
|
|
45
45
|
* content is never summarized — this is a projection, not an interpretation.
|
|
46
|
+
*
|
|
47
|
+
* Session format V3 moved the rendered system prompt onto the surface as node 0
|
|
48
|
+
* (a `system/message` event, replacing the old `request/header.system`). A
|
|
49
|
+
* transcript export is the human conversation, not the model request, so the
|
|
50
|
+
* system node is excluded: otherwise the whole system prompt would surface as
|
|
51
|
+
* the first `## User` block, which is neither a user turn nor content the
|
|
52
|
+
* transcript ever showed.
|
|
46
53
|
* @param events - the session log, in seq order.
|
|
47
54
|
* @returns the conversation lines in surface order.
|
|
48
55
|
*/
|
|
@@ -52,8 +59,9 @@ export function conversationLines(events: readonly SessionEvent[]): ExportLine[]
|
|
|
52
59
|
for (const seq of nodes) {
|
|
53
60
|
const event = events.find(item => item.seq === seq)
|
|
54
61
|
if (event === undefined) continue
|
|
62
|
+
if (event.type === 'system/message') continue
|
|
55
63
|
const message = deriveEventMessage(event)
|
|
56
|
-
if (message === null) continue
|
|
64
|
+
if (message === null || message.role === 'system') continue
|
|
57
65
|
const described = describeMessage(message)
|
|
58
66
|
if (described.text === '') continue
|
|
59
67
|
lines.push(described)
|
package/src/runtime.ts
CHANGED
|
@@ -169,7 +169,8 @@ export class OutputStyleRuntime {
|
|
|
169
169
|
/**
|
|
170
170
|
* The model-visible style directive for a session: a header naming the
|
|
171
171
|
* style plus its body under the configured budget. The exact text is what
|
|
172
|
-
* the harness logs
|
|
172
|
+
* the harness logs as the `system/message` surface node before dispatch
|
|
173
|
+
* (session format V3; `request/header.system` in older logs).
|
|
173
174
|
* @param sessionId - the session the directive is built for.
|
|
174
175
|
* @returns the directive, or `''` when no style applies.
|
|
175
176
|
*/
|