dsh-log-contract 0.3.24 → 0.3.25
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 +3 -4
- package/README.zh.md +3 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -59,7 +59,7 @@ strict contracts. Once the format drifts, humans see nothing wrong while program
|
|
|
59
59
|
crash or misreport.
|
|
60
60
|
|
|
61
61
|
**Real log-corruption shapes found in production sessions shaped most of the rules here** —
|
|
62
|
-
see the [Case log](
|
|
62
|
+
see the [Case log](#case-log--why-production-grade-is-not-a-slogan) below. The case-derived instances are pinned by regression tests: a corrupt log shape
|
|
63
63
|
this tool must flag, and the repaired shape it must pass. The remaining rules come from
|
|
64
64
|
line-by-line verification against the official Host source (each rule carries its
|
|
65
65
|
`source`).
|
|
@@ -110,7 +110,7 @@ Both the human-readable `check` output and the `--json` `support` field carry th
|
|
|
110
110
|
version support: host @deepseek-ai/dsh-session@0.1.5-rc.1 (baseline 0.1.5-rc.1) | file format v3 (header, baseline)
|
|
111
111
|
```
|
|
112
112
|
|
|
113
|
-
## 🆕 0.3.18 – 0.3.
|
|
113
|
+
## 🆕 0.3.18 – 0.3.24 · DSH 0.2.x (session format v4) support
|
|
114
114
|
**Session format v4** (`@deepseek-ai/dsh-session` 0.2.x) is now validated by format-version dispatch
|
|
115
115
|
rather than by relaxing the format gate:
|
|
116
116
|
|
|
@@ -367,8 +367,7 @@ Session format **v4** (host `dsh-session` 0.2.x) is supported by version dispatc
|
|
|
367
367
|
`system/message` source); five rules were added (`G4` unknown-but-ignorable events, `S10` reference element
|
|
368
368
|
types, `I2` `seedLength` semantics, `P5` carrier pairing, `A1` structured-only in-place restorability);
|
|
369
369
|
large sessions (> 500 MB) are read line-wise and repaired with streaming frames; the Windows absolute-path
|
|
370
|
-
check for `H2` is platform-aware.
|
|
371
|
-
still **partial** — see the changelog's known-gap list). Verdicts, exit codes and `--json` fields are unchanged.
|
|
370
|
+
check for `H2` is platform-aware. still **partial** — see the changelog's known-gap list). Verdicts, exit codes and `--json` fields are unchanged.
|
|
372
371
|
|
|
373
372
|
> **0.3.17 changes no behaviour.** It only adjusts the wording of comments, test titles, a few
|
|
374
373
|
> diagnostic strings and the README. Every verdict, exit code and `--json`
|
package/README.zh.md
CHANGED
|
@@ -48,7 +48,7 @@ dsh-retrace 的「日志体检与修复」能力——与 dsh-retrace 一起构
|
|
|
48
48
|
## 为什么需要它
|
|
49
49
|
**「one log, two consumers, two verdicts」**:一条日志同时被人类与自动化程序消费,人眼容忍格式微调,程序解析依赖严格契约;格式一旦漂移,人看不出问题,程序直接崩溃或误报。
|
|
50
50
|
|
|
51
|
-
**这里大多数规则都来自会话日志中实际出现过的损坏形态**——见下方 [⚡ 案例记录](
|
|
51
|
+
**这里大多数规则都来自会话日志中实际出现过的损坏形态**——见下方 [⚡ 案例记录](#案例记录--生产级保证不是口号)。由这些案例派生的用例都有回归测试钉住:损坏的日志形态本工具必须报出,修复后的形态必须通过。其余规则来自对官方宿主源码的逐行核对(每条规则都带 `source`)。
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
@@ -94,7 +94,7 @@ dsh-retrace 的「日志体检与修复」能力——与 dsh-retrace 一起构
|
|
|
94
94
|
测试基线:@deepseek-ai/dsh-session@0.1.5-rc.1 | 会话格式 v3(已知 0/1/2/3;peer ^0.1.0-rc.7 || ^0.1.5-rc.1)
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
## 🆕 0.3.18 – 0.3.
|
|
97
|
+
## 🆕 0.3.18 – 0.3.24 · 支持 DSH 0.2.x(会话格式 v4)
|
|
98
98
|
**会话格式 v4**(`@deepseek-ai/dsh-session` 0.2.x)改为**按格式版本分派规则**,而不是放宽格式闸门:
|
|
99
99
|
|
|
100
100
|
- `tool/result` 按 v4 形状校验(`role: 'tool'`、无 `tool-result` 包裹块)
|
|
@@ -324,9 +324,7 @@ git config --get core.hooksPath # 验证:应输出 .githooks
|
|
|
324
324
|
|
|
325
325
|
**会话格式 v4**(宿主 `dsh-session` 0.2.x)改为按版本分派判定(`tool/result` 的 role、`system/message` 的来源);
|
|
326
326
|
新增五条规则(`G4` 未知但可忽略事件、`S10` 引用元素类型、`I2` `seedLength` 语义、`P5` 载体配对、`A1` 只认结构化字段的在位可还原);
|
|
327
|
-
大会话(>500MB)按行读取 + 流式帧重建;Windows 的 `header.cwd` 判定改为平台感知。
|
|
328
|
-
`contract/` + `adapters/dsh/` 分层(行为不变,且**仍是部分成立** —— 见 CHANGELOG 的已知缺口清单)。判定结果、退出码与 `--json` 字段均不变。
|
|
329
|
-
|
|
327
|
+
大会话(>500MB)按行读取 + 流式帧重建;Windows 的 `header.cwd` 判定改为平台感知。
|
|
330
328
|
> **0.3.17 不含行为变更。** 它只调整了注释、测试标题、少量诊断文案与 README 的措辞。
|
|
331
329
|
> 所有判定结果、退出码与 `--json` 字段与 0.3.15 完全一致,
|
|
332
330
|
> 因此从 0.3.12 升到 0.3.17 时,下面各条与原来完全一致。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-log-contract",
|
|
3
3
|
"description": "日志契约守护 — DSH session log contract guard: offline health check (CLI) + pre-write validation for DeepSeek Harness session logs",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.25",
|
|
5
5
|
"packageManager": "pnpm@11.7.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/index.js",
|