dsh-mask 0.1.1 → 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/ARCHITECTURE.md CHANGED
@@ -50,7 +50,7 @@ Ported from Pii-Stripper-Middleware's `core.py`:
50
50
 
51
51
  ## Session events (adaptive gate)
52
52
 
53
- `mask/applied` is declared through `SessionEventMap` declaration merging in `types.d.ts`. At runtime the plugin appends it only when either (a) the host's `KNOWN_SESSION_EVENT_TYPES` already includes the type, or (b) the host `Session.append` supports the `ignorable` envelope (`probeIgnorableAppend`). On `0.1.0-rc.6` neither is true, so the gate stays closed and appends are skipped — sessions keep loading. The audit payload is counts + type distribution only, never plaintext or the mapping.
53
+ `mask/applied` is declared through `SessionEventMap` declaration merging in `types.d.ts`. At runtime the plugin appends it only when either (a) the host's `KNOWN_SESSION_EVENT_TYPES` already includes the type, or (b) the host `Session.append` supports the `ignorable` envelope (`probeIgnorableAppend`). On `0.1.0-rc.8` neither is true (verified: rc.8 append reads only `surfaceOp`/`sourceEventSeqs` and never stamps `ignorable`), so the gate stays closed and appends are skipped — sessions keep loading. The audit payload is counts + type distribution only, never plaintext or the mapping.
54
54
 
55
55
  ## Storage domain
56
56
 
package/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.2] - 2026-08-21
9
+
10
+ ### Changed
11
+
12
+ - Upgrade all `@deepseek-ai/dsh-*` dependencies to `0.1.0-rc.8`: peerDependencies become `>=0.1.0-rc.8 <0.2.0`, devDependencies pin `0.1.0-rc.8`, and the `dshWorkshop` compatibility manifest declares `0.1.0-rc.8`. `@deepseek-ai/cordis` and all non-dsh dependencies are unchanged.
13
+ - Enable `autoInstallPeers` in `pnpm-workspace.yaml` so the composition/lifecycle suites install the rc.8 peers of the mounted `dsh-commands`/`dsh-tools` runtimes.
14
+
15
+ ### Fixed
16
+
17
+ - `scripts/loader-runner.mjs` adapts to the rc.8 `commands.execute(agent, line, images, signal)` signature (the `images` argument was added in `0.1.0-rc.8`).
18
+
8
19
  ## [0.1.1] - 2026-08-17
9
20
 
10
21
  ### Fixed
package/README.es.md CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  | Superficie | Estado |
26
26
  |---|---|
27
- | Harness | DeepSeek Harness `0.1.0-rc.6` |
27
+ | Harness | DeepSeek Harness `0.1.0-rc.8` |
28
28
  | Node | `^22.19.0 \|\| >=24.0.0` |
29
29
  | Plataformas | Donde corra DSH (host puro, regex sin dependencias; sin mitad de navegador) |
30
30
  | Modelo | Modelos de texto totalmente soportados |
@@ -118,7 +118,7 @@ Todas las opciones son campos Schemastery `Config` (modificables desde cordis.ym
118
118
 
119
119
  - **Solo regex.** `person` y `address` requieren un reconocedor NER externo; fallan al cargar. Cubierto de serie: teléfono, correo, documento, tarjeta, clave e IP (opt-in).
120
120
  - **La restauración visual necesita una mitad de cliente.** Enmascarar es host-side; desenmascarar burbujas en la UI es una función de navegador que esta forma host puro no incluye. La tabla y `restore()` son el seam host-side completo.
121
- - **Eventos en `0.1.0-rc.6`.** El host aún no registra `mask/*`, así que los appends de auditoría se omiten (las sesiones siguen cargando).
121
+ - **Eventos en `0.1.0-rc.8`.** El host aún no registra `mask/*`, así que los appends de auditoría se omiten (las sesiones siguen cargando).
122
122
 
123
123
  ## Development
124
124
 
package/README.hi.md CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  | सतह | स्थिति |
26
26
  |---|---|
27
- | Harness | DeepSeek Harness `0.1.0-rc.6` |
27
+ | Harness | DeepSeek Harness `0.1.0-rc.8` |
28
28
  | Node | `^22.19.0 \|\| >=24.0.0` |
29
29
  | प्लेटफ़ॉर्म | जहाँ DSH चले (शुद्ध host, शून्य-निर्भरता regex; कोई ब्राउज़र आधा नहीं) |
30
30
  | मॉडल | टेक्स्ट मॉडल पूर्ण रूप से समर्थित |
@@ -118,7 +118,7 @@ dsh --profile web --dump-config | grep -A2 'id: mask'
118
118
 
119
119
  - **केवल regex।** `person` और `address` को बाहरी NER पहचानकर्ता चाहिए; लोड पर विफल। बॉक्स में: फ़ोन, ईमेल, आईडी कार्ड, बैंक कार्ड, कुंजी और IP (opt-in)।
120
120
  - **डिस्प्ले-लेयर पुनर्स्थापना को क्लाइंट आधा चाहिए।** मास्किंग host-side है; UI बुलबुलों को खोलना एक ब्राउज़र-आधा सुविधा है जो यह शुद्ध-host रूप नहीं देता। तालिका और `restore()` पूर्ण host-side seam हैं।
121
- - **`0.1.0-rc.6` इवेंट।** host अभी `mask/*` दर्ज नहीं करता, इसलिए ऑडिट appends छोड़े जाते हैं (सत्र लोड होते रहते हैं)।
121
+ - **`0.1.0-rc.8` इवेंट।** host अभी `mask/*` दर्ज नहीं करता, इसलिए ऑडिट appends छोड़े जाते हैं (सत्र लोड होते रहते हैं)।
122
122
 
123
123
  ## Development
124
124
 
package/README.md CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  | Surface | Status |
26
26
  |---|---|
27
- | Harness | DeepSeek Harness `0.1.0-rc.6` |
27
+ | Harness | DeepSeek Harness `0.1.0-rc.8` |
28
28
  | Node | `^22.19.0 \|\| >=24.0.0` |
29
29
  | Platforms | Anywhere DSH runs (pure host, zero-dependency regex; no browser half) |
30
30
  | Model | Text models fully supported; no extra model capability required |
@@ -136,13 +136,13 @@ Example override in your profile patch:
136
136
 
137
137
  - **Regex only.** Name (`person`) and address (`address`) recognition needs an external NER recognizer, which the pure-host zero-dependency form does not bundle; `mode: regex+ner` and those entities fail loudly at load. The PII types covered out of the box are phone, email, ID card, bank card, key, and (opt-in) IP.
138
138
  - **Display-layer restore needs a client half.** Masking is fully host-side, but transparently un-masking the assistant bubbles in the client UI is a browser-half feature this pure-host form does not ship; the restore table and `restore()` are the complete host-side seam a client plugin would consume, and `/mask restore` covers interactive needs today.
139
- - **Session events on `0.1.0-rc.6`.** The harness does not yet record `mask/*` event types, so on rc.6 the session-log audit appends are skipped (sessions keep loading); the plugin enables them automatically once a host records the types or supports the `ignorable` envelope.
139
+ - **Session events on `0.1.0-rc.8`.** The harness does not yet record `mask/*` event types, and its `Session.append` does not stamp the `ignorable` envelope, so on rc.8 the session-log audit appends are skipped (sessions keep loading); the plugin enables them automatically once a host records the types or supports the `ignorable` envelope.
140
140
 
141
141
  ## Development
142
142
 
143
143
  ```sh
144
144
  pnpm install # node ^22.19 || >=24
145
- pnpm run typecheck && pnpm run typecheck:ci # tsc --checkJs against the published rc.6 peers
145
+ pnpm run typecheck && pnpm run typecheck:ci # tsc --checkJs against the published rc.8 peers
146
146
  pnpm test # node --test
147
147
  pnpm run verify:self-contained # dependency specs resolve from the registry
148
148
  pnpm run verify:artifacts # shipped files present + index.mjs importable
package/README.pt.md CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  | Superfície | Estado |
26
26
  |---|---|
27
- | Harness | DeepSeek Harness `0.1.0-rc.6` |
27
+ | Harness | DeepSeek Harness `0.1.0-rc.8` |
28
28
  | Node | `^22.19.0 \|\| >=24.0.0` |
29
29
  | Plataformas | Onde o DSH rodar (host puro, regex sem dependências; sem metade de navegador) |
30
30
  | Modelo | Modelos de texto totalmente suportados |
@@ -118,7 +118,7 @@ Todas as opções são campos Schemastery `Config` (alteráveis via cordis.yml).
118
118
 
119
119
  - **Somente regex.** `person` e `address` exigem um reconhecedor NER externo; falham ao carregar. Coberto de série: telefone, e-mail, documento, cartão, chave e IP (opt-in).
120
120
  - **A restauração visual precisa de uma metade de cliente.** Mascarar é host-side; desmascarar bolhas na UI é uma função de navegador que esta forma host puro não inclui. A tabela e `restore()` são o seam host-side completo.
121
- - **Eventos em `0.1.0-rc.6`.** O host ainda não registra `mask/*`, então os appends de auditoria são omitidos (sessões continuam carregando).
121
+ - **Eventos em `0.1.0-rc.8`.** O host ainda não registra `mask/*`, então os appends de auditoria são omitidos (sessões continuam carregando).
122
122
 
123
123
  ## Development
124
124
 
package/README.zh.md CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  | 维度 | 状态 |
26
26
  |---|---|
27
- | Harness | DeepSeek Harness `0.1.0-rc.6` |
27
+ | Harness | DeepSeek Harness `0.1.0-rc.8` |
28
28
  | Node | `^22.19.0 \|\| >=24.0.0` |
29
29
  | 平台 | 任何 DSH 可运行处(纯 host、零依赖正则;无浏览器半) |
30
30
  | 模型 | 文本模型完全支持;无需额外模型能力 |
@@ -136,13 +136,13 @@ profile patch 覆盖示例:
136
136
 
137
137
  - **仅正则。** 姓名(`person`)与地址(`address`)识别需要外部 NER 识别器,纯 host 零依赖形态未捆绑;`mode: regex+ner` 与这些实体在加载期响亮失败。开箱即用覆盖电话、邮箱、身份证、银行卡、密钥与(可选)IP。
138
138
  - **展示层还原需要浏览器半。** 遮罩完全在 host 侧,但客户端 UI 中透明还原助手气泡属于浏览器半功能,本纯 host 形态未交付;恢复表与 `restore()` 是供客户端插件消费的完整 host 侧 seam,交互需求现由 `/mask restore` 覆盖。
139
- - **`0.1.0-rc.6` 会话事件。** 宿主尚未收录 `mask/*` 事件类型,因此 rc.6 上会话日志审计 append 被跳过(会话仍可加载);宿主收录类型或支持 `ignorable` 信封后自动开启。
139
+ - **`0.1.0-rc.8` 会话事件。** 宿主尚未收录 `mask/*` 事件类型,且其 `Session.append` 不盖章 `ignorable` 信封,因此 rc.8 上会话日志审计 append 被跳过(会话仍可加载);宿主收录类型或支持 `ignorable` 信封后自动开启。
140
140
 
141
141
  ## Development
142
142
 
143
143
  ```sh
144
144
  pnpm install # node ^22.19 || >=24
145
- pnpm run typecheck && pnpm run typecheck:ci # tsc --checkJs(对照 rc.6 peers)
145
+ pnpm run typecheck && pnpm run typecheck:ci # tsc --checkJs(对照 rc.8 peers)
146
146
  pnpm test # node --test
147
147
  pnpm run verify:self-contained # 依赖 spec 均来自 registry
148
148
  pnpm run verify:artifacts # 发布文件齐全 + index.mjs 可 import
@@ -31,10 +31,10 @@ software, none of which is bundled into the published tarball:
31
31
  | [typescript](https://github.com/microsoft/TypeScript) | `^5.9.0` | Apache-2.0 | `tsc --checkJs` typecheck gate (`tsconfig.check.json`) |
32
32
  | [@deepseek-ai/cordis](https://www.npmjs.com/package/@deepseek-ai/cordis) | `^4.0.1` (peer) | See package | The plugin runtime |
33
33
  | [@deepseek-ai/schemastery](https://www.npmjs.com/package/@deepseek-ai/schemastery) | `^3.18.0` (peer) | See package | Configuration schema |
34
- | `@deepseek-ai/dsh-*` peers | `0.1.0-rc.6` (peer) | See packages | Official harness seams (`dsh-session`, `dsh-storage-domain`, `dsh-tools`) |
34
+ | `@deepseek-ai/dsh-*` peers | `>=0.1.0-rc.8 <0.2.0` (peer) | See packages | Official harness seams (`dsh-session`, `dsh-storage-domain`, `dsh-tools`) |
35
35
 
36
36
  Development-only dependencies (not shipped, used by tests and the typecheck gate)
37
- add `@deepseek-ai/dsh-agent` and `@deepseek-ai/dsh-commands` at `0.1.0-rc.6`, and
37
+ add `@deepseek-ai/dsh-agent` and `@deepseek-ai/dsh-commands` at `0.1.0-rc.8`, and
38
38
  `@types/node`.
39
39
 
40
40
  At runtime the plugin only talks to the harness services listed as peerDependencies;
package/index.mjs CHANGED
@@ -47,8 +47,11 @@ export const inject = ['commands', 'storageDomain']
47
47
  /**
48
48
  * 宿主 append 是否盖章 ignorable 信封(运行时能力探测)。
49
49
  * 在全新 detached Context 上构造 SessionStore(绝不接入宿主持久化):追加一条带
50
- * { ignorable: true } 的探测事件并回读信封标记。rc.6 的 append 静默丢弃未知选项
51
- * 键 → 标记缺失 → false(门保持关闭);支持 ignorable 信封的宿主 → true。
50
+ * { ignorable: true } 的探测事件并回读信封标记。rc.6/rc.8 的 append 只消费
51
+ * surfaceOp/sourceEventSeqs,静默丢弃未知选项键 → 标记缺失 → false(门保持关闭);
52
+ * 支持 ignorable 信封的宿主 → true。
53
+ * 探测留下的空壳 Context/SessionStore 不持有宿主句柄、定时器或监听器,
54
+ * 返回后即成为 GC 垃圾,无需(也没有 API 可)显式收尾。
52
55
  * @returns {boolean} 宿主支持 ignorable 信封。
53
56
  */
54
57
  export function probeIgnorableAppend() {
@@ -59,7 +62,7 @@ export function probeIgnorableAppend() {
59
62
  sessionId: 'probe',
60
63
  replaced: 0,
61
64
  distribution: {},
62
- // @ts-ignore rc.6 append has no envelope option — probing it is the point.
65
+ // @ts-ignore rc.8 append takes no envelope option for non-surface types — probing it is the point.
63
66
  }, /** @type {any} */ ({ ignorable: true }))
64
67
  return event?.ignorable === true
65
68
  } catch {
package/lib/gate.mjs CHANGED
@@ -6,7 +6,7 @@ import { PLUGIN_NAME } from './constants.mjs'
6
6
  * 会话事件自适应门:决策函数返回是否 append 以及是否带 ignorable 信封。
7
7
  * 宿主 KNOWN_SESSION_EVENT_TYPES 收录的类型直接 append;未收录但宿主 append
8
8
  * 支持 ignorable 信封(运行时探测)时以 { ignorable: true } append;其余
9
- * 拒绝(rc.6:未收录类型落盘会让会话下次加载被持久化层拒绝)。
9
+ * 拒绝(rc.6/rc.8:未收录类型落盘会让会话下次加载被持久化层拒绝)。
10
10
  * @param {ReadonlySet<string>} knownTypes - KNOWN_SESSION_EVENT_TYPES。
11
11
  * @param {boolean} [ignorableAppend] - 宿主 append 是否盖章 ignorable 信封。
12
12
  * @returns {(type: string) => {append: boolean, ignorable: boolean}} 决策函数。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-mask",
3
3
  "description": "PII masking middleware for DeepSeek Harness: anonymize names, phones, emails, ID cards, bank cards, keys, and addresses to placeholders before they reach the model, restore them at the display layer, keep the restore table only in memory and a controlled storage domain, never log plaintext, and expose /mask and the mask_test tool",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/PerryLink/dsh-mask.git"
@@ -70,7 +70,7 @@
70
70
  ],
71
71
  "compatibility": {
72
72
  "dshVersions": [
73
- "0.1.0-rc.6"
73
+ "0.1.0-rc.8"
74
74
  ]
75
75
  },
76
76
  "capability": {
@@ -88,11 +88,11 @@
88
88
  },
89
89
  "peerDependencies": {
90
90
  "@deepseek-ai/cordis": "^4.0.1",
91
- "@deepseek-ai/dsh-session": "0.1.0-rc.6",
92
- "@deepseek-ai/dsh-storage": "0.1.0-rc.6",
93
- "@deepseek-ai/dsh-storage-json": "0.1.0-rc.6",
94
- "@deepseek-ai/dsh-storage-domain": "0.1.0-rc.6",
95
- "@deepseek-ai/dsh-tools": "0.1.0-rc.6",
91
+ "@deepseek-ai/dsh-session": ">=0.1.0-rc.8 <0.2.0",
92
+ "@deepseek-ai/dsh-storage": ">=0.1.0-rc.8 <0.2.0",
93
+ "@deepseek-ai/dsh-storage-domain": ">=0.1.0-rc.8 <0.2.0",
94
+ "@deepseek-ai/dsh-storage-json": ">=0.1.0-rc.8 <0.2.0",
95
+ "@deepseek-ai/dsh-tools": ">=0.1.0-rc.8 <0.2.0",
96
96
  "@deepseek-ai/schemastery": "^3.18.0"
97
97
  },
98
98
  "dependencies": {
@@ -101,19 +101,26 @@
101
101
  },
102
102
  "devDependencies": {
103
103
  "@deepseek-ai/cordis": "^4.0.1",
104
- "@deepseek-ai/dsh-agent": "0.1.0-rc.6",
105
- "@deepseek-ai/dsh-commands": "0.1.0-rc.6",
106
- "@deepseek-ai/dsh-session": "0.1.0-rc.6",
107
- "@deepseek-ai/dsh-storage-domain": "0.1.0-rc.6",
108
- "@deepseek-ai/dsh-tools": "0.1.0-rc.6",
104
+ "@deepseek-ai/cordis-plugin-include": "1.0.6",
105
+ "@deepseek-ai/cordis-plugin-loader": "1.0.2",
106
+ "@deepseek-ai/dsh-agent": "0.1.0-rc.8",
107
+ "@deepseek-ai/dsh-commands": "0.1.0-rc.8",
108
+ "@deepseek-ai/dsh-session": "0.1.0-rc.8",
109
+ "@deepseek-ai/dsh-storage": "0.1.0-rc.8",
110
+ "@deepseek-ai/dsh-storage-domain": "0.1.0-rc.8",
111
+ "@deepseek-ai/dsh-storage-json": "0.1.0-rc.8",
112
+ "@deepseek-ai/dsh-system-prompt": "0.1.0-rc.8",
113
+ "@deepseek-ai/dsh-tools": "0.1.0-rc.8",
109
114
  "@deepseek-ai/schemastery": "^3.18.0",
110
- "@types/node": "^22.19.0"
115
+ "@types/node": "^22.19.0",
116
+ "oxlint": "0.18.1"
111
117
  },
112
118
  "scripts": {
113
119
  "typecheck": "tsc -p tsconfig.check.json",
114
120
  "typecheck:ci": "tsc -p tsconfig.check.json",
115
121
  "test": "node --test \"test/*.test.mjs\"",
116
122
  "coverage": "node --test --experimental-test-coverage \"test/*.test.mjs\"",
123
+ "lint": "oxlint",
117
124
  "verify:self-contained": "node scripts/verify-self-contained.mjs",
118
125
  "verify:artifacts": "node scripts/verify-artifacts.mjs",
119
126
  "check:readmes": "node scripts/verify-readmes.mjs"