dsh-mask 0.2.0 → 0.2.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 +3 -3
- package/CHANGELOG.md +12 -0
- package/README.es.md +39 -20
- package/README.hi.md +39 -20
- package/README.md +39 -20
- package/README.pt.md +39 -20
- package/README.zh.md +40 -21
- package/THIRD_PARTY_NOTICES.md +3 -3
- package/cordis.patch.yml +12 -14
- package/index.mjs +24 -11
- package/package.json +23 -18
package/ARCHITECTURE.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## Roles
|
|
8
8
|
|
|
9
|
-
- **Consumes public services only**: `commands
|
|
9
|
+
- **Consumes public services only**: `commands` (hard `inject`); `storageDomain` (optional `ctx.get` — missing means a memory-only restore table with a one-time warning); `tools` (registered via `ctx.inject(['tools'], …)` when present). The masking seam is the `agent/pre-step` waterfall.
|
|
10
10
|
- **`lib/` is zero-DSH-dependency**: services are wired only at the boundary in `index.mjs`; `lib/` depends only on `node:` built-ins (the single sanctioned exception is `lib/domain.mjs`, which imports `zod` and `@deepseek-ai/dsh-storage-domain` because the domain record schema is a persistence-boundary validator).
|
|
11
11
|
|
|
12
12
|
## Module map
|
|
@@ -54,11 +54,11 @@ The detector is a pluggable Provider: `Stripper` and `createStripper` accept an
|
|
|
54
54
|
|
|
55
55
|
## Session events (adaptive gate)
|
|
56
56
|
|
|
57
|
-
`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.
|
|
57
|
+
`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.2-alpha.3` neither is true (verified: alpha.3 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.
|
|
58
58
|
|
|
59
59
|
## Storage domain
|
|
60
60
|
|
|
61
|
-
The `dsh_mask` domain has one `restore` table keyed by session id. Its record holds `entries: { placeholder: original }` plus `updatedAt`. This is the only place plaintext PII is stored, and only when `persistRestoreTable: true`; the `Stripper` keeps a bounded in-memory copy (`maxRestoreEntriesPerSession`, `maxSessions` with LRU eviction).
|
|
61
|
+
The `dsh_mask` domain has one `restore` table keyed by session id. Its record holds `entries: { placeholder: original }` plus `updatedAt`. This is the only place plaintext PII is stored, and only when `persistRestoreTable: true`; the `Stripper` keeps a bounded in-memory copy (`maxRestoreEntriesPerSession`, `maxSessions` with LRU eviction). `storageDomain` is an optional service: the bundle patch inserts only the `mask` row, so a profile that already composes the storage stack (`web`, via `@deepseek-ai/dsh-web-app`) provides it, while a bare profile without it gets a memory-only restore table (`persistRestoreTable` is a no-op with a one-time warning).
|
|
62
62
|
|
|
63
63
|
## Safety boundaries
|
|
64
64
|
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ 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.2.2] - 2026-09-01
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Upgrade the `@deepseek-ai/dsh-*` dev dependencies from `0.1.2-alpha.2` to `0.1.2-alpha.3` (peer ranges stay `>=0.1.0-rc.8 <0.2.0`; the `dsh-commands` peer exact pin is widened to the same range), align the `@deepseek-ai/cordis` / `@deepseek-ai/schemastery` carets to `^4.0.2` / `^3.18.2`, refresh `dshWorkshop.compatibility.dshVersions` and the five-language README version notes to `0.1.2-alpha.3`, and re-verify the adaptive audit gate on alpha.3 (unchanged: the gate stays closed).
|
|
13
|
+
|
|
14
|
+
## [0.2.1] - 2026-08-27
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- The bundle patch no longer inserts the storage stack (`@deepseek-ai/dsh-storage` / `dsh-storage-json` / `dsh-storage-domain`), which crashed `dsh web` with `duplicate loader entry id: storage` because `@deepseek-ai/dsh-web-app` already composes the same ids (issue #2). `storageDomain` is now an optional service: a profile that composes the storage stack provides it, while a bare profile without it degrades to a memory-only restore table with a one-time warning instead of hanging on `pending (waiting for service: storageDomain)`.
|
|
19
|
+
|
|
8
20
|
## [0.2.0] - 2026-08-26
|
|
9
21
|
|
|
10
22
|
### Added
|
package/README.es.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
3
|
# dsh-mask
|
|
4
|
+
- **Canal 1024 store**: `npm i -g dsh1024` una vez, luego `dsh1024 plugin --profile web add dsh-mask` (cuenta para el ranking de instalaciones de [deepseek1024.com](https://deepseek1024.com)).
|
|
4
5
|
|
|
5
6
|
**Middleware de enmascaramiento de PII para DeepSeek Harness: anonimiza los datos personales antes de que lleguen al modelo y los restaura en la capa de visualización.**
|
|
6
7
|
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
|
|
25
26
|
| Superficie | Estado |
|
|
26
27
|
|---|---|
|
|
27
|
-
| Harness | DeepSeek Harness `0.1.
|
|
28
|
+
| Harness | DeepSeek Harness `0.1.2-alpha.3` (adaptado el 2026-09-01): el sobre de sesión conserva su campo ignorable solo para compatibilidad de lectura de logs almacenados - Session.append aún no puede estamparlo, por lo que el comportamiento de la puerta no cambia. |
|
|
28
29
|
| Node | `^22.19.0 \|\| >=24.0.0` |
|
|
29
30
|
| Plataformas | Donde corra DSH (host puro, regex sin dependencias; sin mitad de navegador) |
|
|
30
31
|
| Modelo | Modelos de texto totalmente soportados |
|
|
@@ -74,6 +75,8 @@ dsh --profile web --dump-config | grep -A2 'id: mask'
|
|
|
74
75
|
- **Canal tarball**: `pnpm pack` y luego `dsh plugin --profile web add ./dsh-mask-<version>.tgz`.
|
|
75
76
|
- **Desinstalar**: `dsh plugin --profile web remove dsh-mask`.
|
|
76
77
|
|
|
78
|
+
`dsh-mask` ya no incluye la pila de almacenamiento. Los perfiles que ya la componen (el perfil `web` lo hace, vía `@deepseek-ai/dsh-web-app`) aportan `storageDomain`, así que la persistencia funciona de inmediato. En un perfil bare sin almacenamiento el plugin se monta y enmascara igualmente, pero la tabla es solo en memoria (se pierde al reiniciar): compón la pila de almacenamiento en tu parche de perfil, o pon `persistRestoreTable: false`.
|
|
79
|
+
|
|
77
80
|
## Configuration
|
|
78
81
|
|
|
79
82
|
Todas las opciones son campos Schemastery `Config` (modificables desde cordis.yml). `cordis.patch.yml` documenta cada clave.
|
|
@@ -118,7 +121,7 @@ Todas las opciones son campos Schemastery `Config` (modificables desde cordis.ym
|
|
|
118
121
|
|
|
119
122
|
- **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
123
|
- **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.
|
|
124
|
+
- **Eventos en `0.1.2-alpha.3`.** El host aún no registra `mask/*`, así que los appends de auditoría se omiten (las sesiones siguen cargando).
|
|
122
125
|
|
|
123
126
|
## Development
|
|
124
127
|
|
|
@@ -148,26 +151,42 @@ El benchmark de PII (P/R/F1 por tipo sobre 108 muestras sintéticas) está en [`
|
|
|
148
151
|
|
|
149
152
|
## PerryLink DSH Plugin Family
|
|
150
153
|
|
|
151
|
-
Este proyecto es uno de los [
|
|
154
|
+
Este proyecto es uno de los [33 complementos de DeepSeek Harness](https://github.com/PerryLink) mantenidos por [PerryLink](https://github.com/PerryLink). Si este te ayuda, probablemente los demás también:
|
|
152
155
|
|
|
153
|
-
| Plugin |
|
|
156
|
+
| Plugin | One-liner |
|
|
154
157
|
|---|---|
|
|
155
|
-
| **[dsh-
|
|
156
|
-
| [dsh-
|
|
157
|
-
| [dsh-
|
|
158
|
-
| [dsh-
|
|
159
|
-
| [dsh-
|
|
160
|
-
| [dsh-
|
|
161
|
-
| [dsh-
|
|
162
|
-
| [dsh-
|
|
163
|
-
| [dsh-
|
|
164
|
-
| [dsh-
|
|
165
|
-
| [dsh-
|
|
166
|
-
| [dsh-
|
|
167
|
-
| [dsh-
|
|
168
|
-
| [dsh-github](https://github.com/PerryLink/dsh-github) | Integración de PR/issues de GitHub para DSH,
|
|
169
|
-
| [dsh-
|
|
170
|
-
| [dsh-
|
|
158
|
+
| **[dsh-dsh-auto-review](https://github.com/PerryLink/dsh-dsh-auto-review)** | Auto-revisión de segundo modelo en la cadena de aprobación, con cierre en fallo por defecto | |
|
|
159
|
+
| **[dsh-dsh-background-agents](https://github.com/PerryLink/dsh-dsh-background-agents)** | Agentes hijos en segundo plano durables con barra lateral de UI web, mensajería e interrupción | |
|
|
160
|
+
| **[dsh-dsh-budget](https://github.com/PerryLink/dsh-dsh-budget)** | Gobernanza de costes para DeepSeek Harness: presupuestos, carbono y latencia en un panel. | |
|
|
161
|
+
| **[dsh-dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-dsh-checkpoint-rewind)** | Equivalente a /rewind de Claude Code: instantáneas, bifurcaciones de sesión, restauración de un solo uso | |
|
|
162
|
+
| **[dsh-dsh-claude-move](https://github.com/PerryLink/dsh-dsh-claude-move)** | Migra sesiones, memoria, habilidades y CLAUDE.md de Claude Code a DSH | |
|
|
163
|
+
| **[dsh-dsh-click](https://github.com/PerryLink/dsh-dsh-click)** | Control de escritorio nativo multiplataforma para DeepSeek Harness — Windows primero. | |
|
|
164
|
+
| **[dsh-dsh-composer-history](https://github.com/PerryLink/dsh-dsh-composer-history)** | Historial de entrada estilo terminal para el compositor web: flechas, búsqueda Ctrl+R | |
|
|
165
|
+
| **[dsh-dsh-data-quality](https://github.com/PerryLink/dsh-dsh-data-quality)** | Comprobaciones de calidad de datasets y verificación de citas (el puente numérico opcional consumido aquí) | |
|
|
166
|
+
| **[dsh-dsh-defend](https://github.com/PerryLink/dsh-dsh-defend)** | Defensa contra inyección de prompts, jailbreak y fuga de secretos para DeepSeek Harness. | |
|
|
167
|
+
| **[dsh-dsh-doublecheck](https://github.com/PerryLink/dsh-dsh-doublecheck)** | Guardián de disciplina de ingeniería: interrogatorio de requisitos, puertas de pruebas, revisión adversaria | |
|
|
168
|
+
| **[dsh-dsh-draw](https://github.com/PerryLink/dsh-dsh-draw)** | Enrutamiento unificado de generación de imágenes estáticas para DeepSeek Harness. | |
|
|
169
|
+
| **[dsh-dsh-fast](https://github.com/PerryLink/dsh-dsh-fast)** | Diagnóstico de rendimiento de solo lectura para DeepSeek Harness. | |
|
|
170
|
+
| **[dsh-dsh-fund-research](https://github.com/PerryLink/dsh-dsh-fund-research)** | Informes de investigación deterministas para fondos mutuos públicos chinos | |
|
|
171
|
+
| **[dsh-dsh-github](https://github.com/PerryLink/dsh-dsh-github)** | Integración de PR/issues de GitHub para DSH, cada escritura controlada por aprobación | |
|
|
172
|
+
| **[dsh-dsh-industry-research](https://github.com/PerryLink/dsh-dsh-industry-research)** | Orquestación de investigación sectorial que sella sus entregables mediante el `ctx.researchReport.assemble` de este plugin | |
|
|
173
|
+
| **[dsh-dsh-library](https://github.com/PerryLink/dsh-dsh-library)** | Base de conocimiento documental local para DeepSeek Harness. | |
|
|
174
|
+
| **[dsh-dsh-local-ai](https://github.com/PerryLink/dsh-dsh-local-ai)** | Integración de modelos locales (Ollama) para DeepSeek Harness. | |
|
|
175
|
+
| **[dsh-dsh-lsp-actions](https://github.com/PerryLink/dsh-dsh-lsp-actions)** | Diagnósticos, formato, autocompletado, acciones de código y renombrado LSP sobre servidores de lenguaje | |
|
|
176
|
+
| **[dsh-dsh-mcp-panel](https://github.com/PerryLink/dsh-dsh-mcp-panel)** | Panel de tiempo de ejecución MCP de solo lectura: comando /mcp + pestaña Settings con estado, herramientas y errores | |
|
|
177
|
+
| **[dsh-dsh-memento](https://github.com/PerryLink/dsh-dsh-memento)** | Memoria entre sesiones controlada por aprobación: costura ctx.memory + SQLite + herramienta de memoria | |
|
|
178
|
+
| **[dsh-dsh-observe](https://github.com/PerryLink/dsh-dsh-observe)** | Exportador de observabilidad OpenTelemetry y Langfuse para DeepSeek Harness. | |
|
|
179
|
+
| **[dsh-dsh-output-styles](https://github.com/PerryLink/dsh-dsh-output-styles)** | Cambio de estilo en tiempo de ejecución equivalente a outputStyles de Claude Code | |
|
|
180
|
+
| **[dsh-dsh-permission-rules](https://github.com/PerryLink/dsh-dsh-permission-rules)** | Reglas de permisos declarativas allow/deny/ask estilo Claude Code con auditoría | |
|
|
181
|
+
| **[dsh-dsh-plugin-guide](https://github.com/PerryLink/dsh-dsh-plugin-guide)** | Base de conocimiento de desarrollo de plugins como habilidad de agente bajo demanda | |
|
|
182
|
+
| **[dsh-dsh-research-report](https://github.com/PerryLink/dsh-dsh-research-report)** | Motor de informes de investigación verificables con evidencia direccionada por contenido | |
|
|
183
|
+
| **[dsh-dsh-score](https://github.com/PerryLink/dsh-dsh-score)** | Puntuación de calidad multidimensional para plugins de DeepSeek Harness. | |
|
|
184
|
+
| **[dsh-dsh-session-pin](https://github.com/PerryLink/dsh-dsh-session-pin)** | Fija sesiones en la barra lateral web con orden durable | |
|
|
185
|
+
| **[dsh-dsh-session-sync](https://github.com/PerryLink/dsh-dsh-session-sync)** | Sincronización de sesiones entre dispositivos para DeepSeek Harness — un espejo git dedicado de tu almacén de sesiones. | |
|
|
186
|
+
| **[dsh-dsh-skill-pack-security](https://github.com/PerryLink/dsh-dsh-skill-pack-security)** | Paquete de habilidades de auditoría de seguridad: escaneo de secretos, revisión de dependencias y cadena de suministro | |
|
|
187
|
+
| **[dsh-dsh-talk](https://github.com/PerryLink/dsh-dsh-talk)** | Bucle de sesión con voz para DeepSeek Harness: háblale y escucha su respuesta. | |
|
|
188
|
+
| **[dsh-dsh-test-drive](https://github.com/PerryLink/dsh-dsh-test-drive)** | Pruebas de instalación y humo aisladas para plugins de DeepSeek Harness. | |
|
|
189
|
+
| **[dsh-dsh-translate](https://github.com/PerryLink/dsh-dsh-translate)** | Traducción de parámetros entre proveedores y reparación determinista de JSON para DeepSeek Harness. | |
|
|
171
190
|
|
|
172
191
|
## License
|
|
173
192
|
|
package/README.hi.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
3
|
# dsh-mask
|
|
4
|
+
- **1024 स्टोर चैनल**: एक बार `npm i -g dsh1024`, फिर `dsh1024 plugin --profile web add dsh-mask` ([deepseek1024.com](https://deepseek1024.com) इंस्टॉल रैंकिंग में गिना जाता है)।
|
|
4
5
|
|
|
5
6
|
**DeepSeek Harness के लिए PII मास्किंग मिडलवेयर — मॉडल तक पहुँचने से पहले व्यक्तिगत डेटा को अनाम करें, डिस्प्ले लेयर पर उसे वापस लाएँ।**
|
|
6
7
|
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
|
|
25
26
|
| सतह | स्थिति |
|
|
26
27
|
|---|---|
|
|
27
|
-
| Harness | DeepSeek Harness `0.1.
|
|
28
|
+
| Harness | DeepSeek Harness `0.1.2-alpha.3` (2026-09-01 को अनुकूलित): सत्र लिफ़ाफ़ा अपना ignorable फ़ील्ड केवल संग्रहीत-लॉग पठन संगतता के लिए रखता है - Session.append अभी भी इसे स्टैम्प नहीं कर सकता, इसलिए गेट व्यवहार अपरिवर्तित है। |
|
|
28
29
|
| Node | `^22.19.0 \|\| >=24.0.0` |
|
|
29
30
|
| प्लेटफ़ॉर्म | जहाँ DSH चले (शुद्ध host, शून्य-निर्भरता regex; कोई ब्राउज़र आधा नहीं) |
|
|
30
31
|
| मॉडल | टेक्स्ट मॉडल पूर्ण रूप से समर्थित |
|
|
@@ -74,6 +75,8 @@ dsh --profile web --dump-config | grep -A2 'id: mask'
|
|
|
74
75
|
- **tarball चैनल**: `pnpm pack` फिर `dsh plugin --profile web add ./dsh-mask-<version>.tgz`।
|
|
75
76
|
- **अनइंस्टॉल**: `dsh plugin --profile web remove dsh-mask`।
|
|
76
77
|
|
|
78
|
+
`dsh-mask` अब storage स्टैक बंडल नहीं करता। जो प्रोफ़ाइल इसे पहले से रचते हैं (`web` प्रोफ़ाइल `@deepseek-ai/dsh-web-app` के ज़रिए करती है) वे `storageDomain` देते हैं, इसलिए persistence तुरंत काम करता है। बिना storage वाले bare प्रोफ़ाइल में प्लगइन फिर भी माउंट होता है और मास्क करता है, पर restore तालिका केवल मेमोरी में रहती है (रीस्टार्ट पर खो जाती है): अपने प्रोफ़ाइल पैच में storage स्टैक रचें, या `persistRestoreTable: false` करें।
|
|
79
|
+
|
|
77
80
|
## Configuration
|
|
78
81
|
|
|
79
82
|
सभी विकल्प Schemastery `Config` फ़ील्ड हैं (cordis.yml से बदले जा सकते हैं)। `cordis.patch.yml` हर कुंजी का दस्तावेज़ देता है।
|
|
@@ -118,7 +121,7 @@ dsh --profile web --dump-config | grep -A2 'id: mask'
|
|
|
118
121
|
|
|
119
122
|
- **केवल regex।** `person` और `address` को बाहरी NER पहचानकर्ता चाहिए; लोड पर विफल। बॉक्स में: फ़ोन, ईमेल, आईडी कार्ड, बैंक कार्ड, कुंजी और IP (opt-in)।
|
|
120
123
|
- **डिस्प्ले-लेयर पुनर्स्थापना को क्लाइंट आधा चाहिए।** मास्किंग host-side है; UI बुलबुलों को खोलना एक ब्राउज़र-आधा सुविधा है जो यह शुद्ध-host रूप नहीं देता। तालिका और `restore()` पूर्ण host-side seam हैं।
|
|
121
|
-
- **`0.1.
|
|
124
|
+
- **`0.1.2-alpha.3` इवेंट।** host अभी `mask/*` दर्ज नहीं करता, इसलिए ऑडिट appends छोड़े जाते हैं (सत्र लोड होते रहते हैं)।
|
|
122
125
|
|
|
123
126
|
## Development
|
|
124
127
|
|
|
@@ -148,26 +151,42 @@ PII बेंचमार्क (108 सिंथेटिक नमूनों
|
|
|
148
151
|
|
|
149
152
|
## PerryLink DSH Plugin Family
|
|
150
153
|
|
|
151
|
-
यह
|
|
154
|
+
यह प्रोजेक्ट [PerryLink](https://github.com/PerryLink) द्वारा अनुरक्षित [33 DeepSeek Harness प्लगइनों](https://github.com/PerryLink) में से एक है। अगर यह आपकी मदद करता है, तो बाकी भी करेंगे:
|
|
152
155
|
|
|
153
|
-
|
|
|
156
|
+
| Plugin | One-liner |
|
|
154
157
|
|---|---|
|
|
155
|
-
| **[dsh-
|
|
156
|
-
| [dsh-
|
|
157
|
-
| [dsh-
|
|
158
|
-
| [dsh-
|
|
159
|
-
| [dsh-
|
|
160
|
-
| [dsh-
|
|
161
|
-
| [dsh-
|
|
162
|
-
| [dsh-
|
|
163
|
-
| [dsh-
|
|
164
|
-
| [dsh-
|
|
165
|
-
| [dsh-
|
|
166
|
-
| [dsh-
|
|
167
|
-
| [dsh-
|
|
168
|
-
| [dsh-github](https://github.com/PerryLink/dsh-github) | DSH के लिए GitHub PR/
|
|
169
|
-
| [dsh-
|
|
170
|
-
| [dsh-
|
|
158
|
+
| **[dsh-dsh-auto-review](https://github.com/PerryLink/dsh-dsh-auto-review)** | अनुमोदन श्रृंखला पर द्वितीय-मॉडल स्वतः-समीक्षा, डिफ़ॉल्ट रूप से विफल-बंद | |
|
|
159
|
+
| **[dsh-dsh-background-agents](https://github.com/PerryLink/dsh-dsh-background-agents)** | वेब UI साइडबार, संदेश और अवरोधन के साथ टिकाऊ पृष्ठभूमि चाइल्ड एजेंट | |
|
|
160
|
+
| **[dsh-dsh-budget](https://github.com/PerryLink/dsh-dsh-budget)** | DeepSeek Harness के लिए लागत प्रशासन: बजट, कार्बन और विलंबता एक पैनल में। | |
|
|
161
|
+
| **[dsh-dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-dsh-checkpoint-rewind)** | Claude Code /rewind-समतुल्य: स्नैपशॉट, सत्र फ़ॉर्क, एक-बार पुनर्स्थापना | |
|
|
162
|
+
| **[dsh-dsh-claude-move](https://github.com/PerryLink/dsh-dsh-claude-move)** | Claude Code सत्र, मेमोरी, कौशल और CLAUDE.md को DSH में स्थानांतरित करें | |
|
|
163
|
+
| **[dsh-dsh-click](https://github.com/PerryLink/dsh-dsh-click)** | DeepSeek Harness के लिए क्रॉस-प्लेटफ़ॉर्म नेटिव डेस्कटॉप नियंत्रण — Windows पहले। | |
|
|
164
|
+
| **[dsh-dsh-composer-history](https://github.com/PerryLink/dsh-dsh-composer-history)** | वेब कंपोज़र के लिए टर्मिनल-शैली इनपुट इतिहास: तीर, Ctrl+R खोज | |
|
|
165
|
+
| **[dsh-dsh-data-quality](https://github.com/PerryLink/dsh-dsh-data-quality)** | डेटासेट गुणवत्ता जाँच व उद्धरण सत्यापन (यहाँ उपभोग किया गया वैकल्पिक संख्या-सेतु) | |
|
|
166
|
+
| **[dsh-dsh-defend](https://github.com/PerryLink/dsh-dsh-defend)** | DeepSeek Harness के लिए प्रॉम्प्ट-इंजेक्शन, जेलब्रेक और सीक्रेट-लीक रक्षा। | |
|
|
167
|
+
| **[dsh-dsh-doublecheck](https://github.com/PerryLink/dsh-dsh-doublecheck)** | इंजीनियरिंग-अनुशासन रक्षक: आवश्यकताओं की पूछताछ, परीक्षण द्वार, प्रतिद्वंद्वी समीक्षा | |
|
|
168
|
+
| **[dsh-dsh-draw](https://github.com/PerryLink/dsh-dsh-draw)** | DeepSeek Harness के लिए एकीकृत स्थैतिक-छवि निर्माण रूटिंग। | |
|
|
169
|
+
| **[dsh-dsh-fast](https://github.com/PerryLink/dsh-dsh-fast)** | DeepSeek Harness के लिए रीड-ओनली प्रदर्शन डायग्नोस्टिक्स। | |
|
|
170
|
+
| **[dsh-dsh-fund-research](https://github.com/PerryLink/dsh-dsh-fund-research)** | चीनी सार्वजनिक म्यूचुअल फंड के लिए नियतात्मक अनुसंधान रिपोर्ट | |
|
|
171
|
+
| **[dsh-dsh-github](https://github.com/PerryLink/dsh-dsh-github)** | DSH के लिए GitHub PR/issues एकीकरण, हर लेखन अनुमोदन-द्वारित | |
|
|
172
|
+
| **[dsh-dsh-industry-research](https://github.com/PerryLink/dsh-dsh-industry-research)** | उद्योग-अनुसंधान ऑर्केस्ट्रेशन जो इस प्लगिन के `ctx.researchReport.assemble` से डिलीवरेबल सील करता है | |
|
|
173
|
+
| **[dsh-dsh-library](https://github.com/PerryLink/dsh-dsh-library)** | DeepSeek Harness के लिए स्थानीय दस्तावेज़ ज्ञानकोश। | |
|
|
174
|
+
| **[dsh-dsh-local-ai](https://github.com/PerryLink/dsh-dsh-local-ai)** | DeepSeek Harness के लिए स्थानीय-मॉडल (Ollama) एकीकरण। | |
|
|
175
|
+
| **[dsh-dsh-lsp-actions](https://github.com/PerryLink/dsh-dsh-lsp-actions)** | भाषा सर्वरों पर LSP निदान, फ़ॉर्मेटिंग, पूर्णता, कोड क्रियाएँ और नाम बदलना | |
|
|
176
|
+
| **[dsh-dsh-mcp-panel](https://github.com/PerryLink/dsh-dsh-mcp-panel)** | केवल-पढ़ने वाला MCP रनटाइम पैनल: /mcp कमांड + स्थिति, टूल और त्रुटियों वाला Settings टैब | |
|
|
177
|
+
| **[dsh-dsh-memento](https://github.com/PerryLink/dsh-dsh-memento)** | अनुमोदन-द्वारित क्रॉस-सत्र मेमोरी: ctx.memory सीम + SQLite + मेमोरी टूल | |
|
|
178
|
+
| **[dsh-dsh-observe](https://github.com/PerryLink/dsh-dsh-observe)** | DeepSeek Harness के लिए OpenTelemetry और Langfuse अवलोकनीयता निर्यातक। | |
|
|
179
|
+
| **[dsh-dsh-output-styles](https://github.com/PerryLink/dsh-dsh-output-styles)** | Claude Code outputStyles-समतुल्य रनटाइम शैली बदलाव | |
|
|
180
|
+
| **[dsh-dsh-permission-rules](https://github.com/PerryLink/dsh-dsh-permission-rules)** | ऑडिट के साथ Claude Code-शैली घोषणात्मक allow/deny/ask अनुमति नियम | |
|
|
181
|
+
| **[dsh-dsh-plugin-guide](https://github.com/PerryLink/dsh-dsh-plugin-guide)** | माँग पर एजेंट कौशल के रूप में प्लगइन-विकास ज्ञान आधार | |
|
|
182
|
+
| **[dsh-dsh-research-report](https://github.com/PerryLink/dsh-dsh-research-report)** | सामग्री-पता साक्ष्य और सीलबंद संस्करणों वाला सत्यापन-योग्य अनुसंधान-रिपोर्ट इंजन | |
|
|
183
|
+
| **[dsh-dsh-score](https://github.com/PerryLink/dsh-dsh-score)** | DeepSeek Harness प्लगिनों की बहु-आयामी गुणवत्ता स्कोरिंग। | |
|
|
184
|
+
| **[dsh-dsh-session-pin](https://github.com/PerryLink/dsh-dsh-session-pin)** | टिकाऊ क्रम के साथ वेब साइडबार में सत्र पिन करें | |
|
|
185
|
+
| **[dsh-dsh-session-sync](https://github.com/PerryLink/dsh-dsh-session-sync)** | DeepSeek Harness के लिए क्रॉस-डिवाइस सत्र सिंक — आपके सत्र स्टोर का एक समर्पित git मिरर। | |
|
|
186
|
+
| **[dsh-dsh-skill-pack-security](https://github.com/PerryLink/dsh-dsh-skill-pack-security)** | सुरक्षा-ऑडिट कौशल पैक: गुप्त स्कैन, निर्भरता और आपूर्ति-श्रृंखला समीक्षा | |
|
|
187
|
+
| **[dsh-dsh-talk](https://github.com/PerryLink/dsh-dsh-talk)** | DeepSeek Harness के लिए आवाज़-प्रथम सत्र लूप: बोलें और उत्तर सुनें। | |
|
|
188
|
+
| **[dsh-dsh-test-drive](https://github.com/PerryLink/dsh-dsh-test-drive)** | DeepSeek Harness प्लगिनों के लिए पृथक इंस्टॉल-एंड-स्मोक टेस्ट ड्राइव। | |
|
|
189
|
+
| **[dsh-dsh-translate](https://github.com/PerryLink/dsh-dsh-translate)** | DeepSeek Harness के लिए वेंडर पैरामीटर अनुवाद और नियतात्मक JSON मरम्मत। | |
|
|
171
190
|
|
|
172
191
|
## License
|
|
173
192
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
3
|
# dsh-mask
|
|
4
|
+
- **1024 store channel**: `npm i -g dsh1024` once, then `dsh1024 plugin --profile web add dsh-mask` (counts toward the [deepseek1024.com](https://deepseek1024.com) install ranking).
|
|
4
5
|
[](https://gitee.com/perrylink/dsh-mask)
|
|
5
6
|
|
|
6
7
|
**PII masking middleware for DeepSeek Harness — anonymize personal data before it reaches the model, restore it at the display layer.**
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
|
|
26
27
|
| Surface | Status |
|
|
27
28
|
|---|---|
|
|
28
|
-
| Harness | DeepSeek Harness `0.1.
|
|
29
|
+
| Harness | DeepSeek Harness `0.1.2-alpha.3` (adapted 2026-09-01): the session envelope keeps its ignorable field for stored-log read compatibility only - Session.append still cannot stamp it, so audit-gate behavior is unchanged. |
|
|
29
30
|
| Node | `^22.19.0 \|\| >=24.0.0` |
|
|
30
31
|
| Platforms | Anywhere DSH runs (pure host, zero-dependency regex; no browser half) |
|
|
31
32
|
| Model | Text models fully supported; no extra model capability required |
|
|
@@ -81,6 +82,8 @@ Then tailor the entity list in your profile patch:
|
|
|
81
82
|
- **tarball channel**: `pnpm pack` in this repo, then `dsh plugin --profile web add ./dsh-mask-<version>.tgz`.
|
|
82
83
|
- **uninstall**: `dsh plugin --profile web remove dsh-mask` (or remove the row from the profile patch).
|
|
83
84
|
|
|
85
|
+
`dsh-mask` no longer bundles the storage stack. Profiles that already compose it (the `web` profile does, via `@deepseek-ai/dsh-web-app`) provide `storageDomain`, so persistence works out of the box. On a bare profile without storage the plugin still mounts and masks, but the restore table is memory-only (lost on restart) — compose the storage stack in your profile patch, or set `persistRestoreTable: false`.
|
|
86
|
+
|
|
84
87
|
## Configuration
|
|
85
88
|
|
|
86
89
|
All tunables are Schemastery `Config` fields (changeable from cordis.yml). An id-targeted override replaces the whole row — restate every key you need. `cordis.patch.yml` documents each key inline.
|
|
@@ -139,13 +142,13 @@ Example override in your profile patch:
|
|
|
139
142
|
|
|
140
143
|
- **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.
|
|
141
144
|
- **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.
|
|
142
|
-
- **Session events on `0.1.
|
|
145
|
+
- **Session events on `0.1.2-alpha.3`.** The harness does not yet record `mask/*` event types, and its `Session.append` does not stamp the `ignorable` envelope, so on alpha.3 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.
|
|
143
146
|
|
|
144
147
|
## Development
|
|
145
148
|
|
|
146
149
|
```sh
|
|
147
150
|
pnpm install # node ^22.19 || >=24
|
|
148
|
-
pnpm run typecheck && pnpm run typecheck:ci # tsc --checkJs against the published
|
|
151
|
+
pnpm run typecheck && pnpm run typecheck:ci # tsc --checkJs against the published 0.1.2-alpha.3 peers
|
|
149
152
|
pnpm test # node --test
|
|
150
153
|
pnpm run verify:self-contained # dependency specs resolve from the registry
|
|
151
154
|
pnpm run verify:artifacts # shipped files present + index.mjs importable
|
|
@@ -169,26 +172,42 @@ The PII benchmark (per-type P/R/F1 over 108 synthetic samples) is published in [
|
|
|
169
172
|
|
|
170
173
|
## PerryLink DSH Plugin Family
|
|
171
174
|
|
|
172
|
-
This project is one of the [DeepSeek Harness plugins](https://github.com/PerryLink) maintained by [PerryLink](https://github.com/PerryLink). If this one helps you, the others likely will too:
|
|
175
|
+
This project is one of the [33 DeepSeek Harness plugins](https://github.com/PerryLink) maintained by [PerryLink](https://github.com/PerryLink). If this one helps you, the others likely will too:
|
|
173
176
|
|
|
174
177
|
| Plugin | One-liner |
|
|
175
178
|
|---|---|
|
|
176
|
-
| **[dsh-
|
|
177
|
-
| [dsh-
|
|
178
|
-
| [dsh-
|
|
179
|
-
| [dsh-
|
|
180
|
-
| [dsh-
|
|
181
|
-
| [dsh-
|
|
182
|
-
| [dsh-
|
|
183
|
-
| [dsh-
|
|
184
|
-
| [dsh-
|
|
185
|
-
| [dsh-
|
|
186
|
-
| [dsh-
|
|
187
|
-
| [dsh-
|
|
188
|
-
| [dsh-
|
|
189
|
-
| [dsh-github](https://github.com/PerryLink/dsh-github) | GitHub PR/issues integration for DSH, every write gated by approval |
|
|
190
|
-
| [dsh-
|
|
191
|
-
| [dsh-
|
|
179
|
+
| **[dsh-dsh-auto-review](https://github.com/PerryLink/dsh-dsh-auto-review)** | Second-model auto-review on the approval chain, fail-closed by default | |
|
|
180
|
+
| **[dsh-dsh-background-agents](https://github.com/PerryLink/dsh-dsh-background-agents)** | Durable background child agents with a Web UI sidebar, messaging and interrupt | |
|
|
181
|
+
| **[dsh-dsh-budget](https://github.com/PerryLink/dsh-dsh-budget)** | Cost governance for DeepSeek Harness: budgets, carbon, and latency in one panel. | |
|
|
182
|
+
| **[dsh-dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-dsh-checkpoint-rewind)** | Claude Code /rewind-equivalent: snapshots, session forks, one-shot restore | |
|
|
183
|
+
| **[dsh-dsh-claude-move](https://github.com/PerryLink/dsh-dsh-claude-move)** | Migrate Claude Code sessions, memory, skills and CLAUDE.md into DSH | |
|
|
184
|
+
| **[dsh-dsh-click](https://github.com/PerryLink/dsh-dsh-click)** | Cross-platform native desktop control for DeepSeek Harness — Windows first. | |
|
|
185
|
+
| **[dsh-dsh-composer-history](https://github.com/PerryLink/dsh-dsh-composer-history)** | Terminal-style input history for the web composer: arrows, Ctrl+R search | |
|
|
186
|
+
| **[dsh-dsh-data-quality](https://github.com/PerryLink/dsh-dsh-data-quality)** | Dataset quality checks and citation cross-checks (the optional numeric bridge consumed here) | |
|
|
187
|
+
| **[dsh-dsh-defend](https://github.com/PerryLink/dsh-dsh-defend)** | Prompt-injection, jailbreak, and secret-leak defense for DeepSeek Harness. | |
|
|
188
|
+
| **[dsh-dsh-doublecheck](https://github.com/PerryLink/dsh-dsh-doublecheck)** | Engineering-discipline guard: requirements grill, test gates, adversary review | |
|
|
189
|
+
| **[dsh-dsh-draw](https://github.com/PerryLink/dsh-dsh-draw)** | Unified static-image generation routing for DeepSeek Harness. | |
|
|
190
|
+
| **[dsh-dsh-fast](https://github.com/PerryLink/dsh-dsh-fast)** | Read-only performance diagnostics for DeepSeek Harness. | |
|
|
191
|
+
| **[dsh-dsh-fund-research](https://github.com/PerryLink/dsh-dsh-fund-research)** | Deterministic research reports for Chinese public mutual funds | |
|
|
192
|
+
| **[dsh-dsh-github](https://github.com/PerryLink/dsh-dsh-github)** | GitHub PR/issues integration for DSH, every write gated by approval | |
|
|
193
|
+
| **[dsh-dsh-industry-research](https://github.com/PerryLink/dsh-dsh-industry-research)** | Industry research orchestration that seals its deliverables through this plugin's `ctx.researchReport.assemble` | |
|
|
194
|
+
| **[dsh-dsh-library](https://github.com/PerryLink/dsh-dsh-library)** | Local document knowledge base for DeepSeek Harness. | |
|
|
195
|
+
| **[dsh-dsh-local-ai](https://github.com/PerryLink/dsh-dsh-local-ai)** | Local-model (Ollama) integration for DeepSeek Harness. | |
|
|
196
|
+
| **[dsh-dsh-lsp-actions](https://github.com/PerryLink/dsh-dsh-lsp-actions)** | LSP diagnostics, formatting, completion, code actions and rename over language servers | |
|
|
197
|
+
| **[dsh-dsh-mcp-panel](https://github.com/PerryLink/dsh-dsh-mcp-panel)** | Read-only MCP runtime panel: /mcp command + Settings tab with status, tools and errors | |
|
|
198
|
+
| **[dsh-dsh-memento](https://github.com/PerryLink/dsh-dsh-memento)** | Approval-gated cross-session memory: ctx.memory seam + SQLite + memory tool | |
|
|
199
|
+
| **[dsh-dsh-observe](https://github.com/PerryLink/dsh-dsh-observe)** | OpenTelemetry and Langfuse observability exporter for DeepSeek Harness. | |
|
|
200
|
+
| **[dsh-dsh-output-styles](https://github.com/PerryLink/dsh-dsh-output-styles)** | Claude Code outputStyles-equivalent runtime style switching | |
|
|
201
|
+
| **[dsh-dsh-permission-rules](https://github.com/PerryLink/dsh-dsh-permission-rules)** | Claude Code-style declarative allow/deny/ask permission rules with audit | |
|
|
202
|
+
| **[dsh-dsh-plugin-guide](https://github.com/PerryLink/dsh-dsh-plugin-guide)** | Plugin-development knowledge base as an on-demand agent skill | |
|
|
203
|
+
| **[dsh-dsh-research-report](https://github.com/PerryLink/dsh-dsh-research-report)** | Verifiable research-report engine: content-addressed evidence ledger and sealed versions | |
|
|
204
|
+
| **[dsh-dsh-score](https://github.com/PerryLink/dsh-dsh-score)** | Multi-dimensional quality scoring for DeepSeek Harness plugins. | |
|
|
205
|
+
| **[dsh-dsh-session-pin](https://github.com/PerryLink/dsh-dsh-session-pin)** | Pin sessions in the Web sidebar with durable ordering | |
|
|
206
|
+
| **[dsh-dsh-session-sync](https://github.com/PerryLink/dsh-dsh-session-sync)** | Cross-device session sync for DeepSeek Harness — a dedicated git mirror of your session store. | |
|
|
207
|
+
| **[dsh-dsh-skill-pack-security](https://github.com/PerryLink/dsh-dsh-skill-pack-security)** | Security-audit skill pack: secret scan, dependency and supply-chain review | |
|
|
208
|
+
| **[dsh-dsh-talk](https://github.com/PerryLink/dsh-dsh-talk)** | Voice-first session loop for DeepSeek Harness: talk to it, hear it answer. | |
|
|
209
|
+
| **[dsh-dsh-test-drive](https://github.com/PerryLink/dsh-dsh-test-drive)** | Isolated install-and-smoke test drives for DeepSeek Harness plugins. | |
|
|
210
|
+
| **[dsh-dsh-translate](https://github.com/PerryLink/dsh-dsh-translate)** | Vendor parameter translation and deterministic JSON repair for DeepSeek Harness. | |
|
|
192
211
|
|
|
193
212
|
## License
|
|
194
213
|
|
package/README.pt.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
3
|
# dsh-mask
|
|
4
|
+
- **Canal 1024 store**: `npm i -g dsh1024` uma vez, depois `dsh1024 plugin --profile web add dsh-mask` (conta para o ranking de instalações do [deepseek1024.com](https://deepseek1024.com)).
|
|
4
5
|
|
|
5
6
|
**Middleware de mascaramento de PII para o DeepSeek Harness: anonimize dados pessoais antes que cheguem ao modelo e restaure-os na camada de exibição.**
|
|
6
7
|
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
|
|
25
26
|
| Superfície | Estado |
|
|
26
27
|
|---|---|
|
|
27
|
-
| Harness | DeepSeek Harness `0.1.
|
|
28
|
+
| Harness | DeepSeek Harness `0.1.2-alpha.3` (adaptado em 2026-09-01): o envelope de sessão mantém seu campo ignorable apenas para compatibilidade de leitura de logs armazenados - o Session.append ainda não consegue estampá-lo, então o comportamento da porta não muda. |
|
|
28
29
|
| Node | `^22.19.0 \|\| >=24.0.0` |
|
|
29
30
|
| Plataformas | Onde o DSH rodar (host puro, regex sem dependências; sem metade de navegador) |
|
|
30
31
|
| Modelo | Modelos de texto totalmente suportados |
|
|
@@ -74,6 +75,8 @@ dsh --profile web --dump-config | grep -A2 'id: mask'
|
|
|
74
75
|
- **Canal tarball**: `pnpm pack` e depois `dsh plugin --profile web add ./dsh-mask-<version>.tgz`.
|
|
75
76
|
- **Desinstalar**: `dsh plugin --profile web remove dsh-mask`.
|
|
76
77
|
|
|
78
|
+
`dsh-mask` não inclui mais a pilha de armazenamento. Perfis que já a compõem (o perfil `web` o faz, via `@deepseek-ai/dsh-web-app`) fornecem `storageDomain`, então a persistência funciona imediatamente. Em um perfil bare sem armazenamento o plugin monta e mascara mesmo assim, mas a tabela é só em memória (perdida ao reiniciar): componha a pilha de armazenamento no seu patch de perfil, ou defina `persistRestoreTable: false`.
|
|
79
|
+
|
|
77
80
|
## Configuration
|
|
78
81
|
|
|
79
82
|
Todas as opções são campos Schemastery `Config` (alteráveis via cordis.yml). O `cordis.patch.yml` documenta cada chave.
|
|
@@ -118,7 +121,7 @@ Todas as opções são campos Schemastery `Config` (alteráveis via cordis.yml).
|
|
|
118
121
|
|
|
119
122
|
- **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
123
|
- **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.
|
|
124
|
+
- **Eventos em `0.1.2-alpha.3`.** O host ainda não registra `mask/*`, então os appends de auditoria são omitidos (sessões continuam carregando).
|
|
122
125
|
|
|
123
126
|
## Development
|
|
124
127
|
|
|
@@ -148,26 +151,42 @@ O benchmark de PII (P/R/F1 por tipo em 108 amostras sintéticas) está em [`benc
|
|
|
148
151
|
|
|
149
152
|
## PerryLink DSH Plugin Family
|
|
150
153
|
|
|
151
|
-
Este projeto é um dos [plugins
|
|
154
|
+
Este projeto é um dos [33 plugins de DeepSeek Harness](https://github.com/PerryLink) mantidos por [PerryLink](https://github.com/PerryLink). Se este ajuda você, os outros provavelmente também:
|
|
152
155
|
|
|
153
|
-
| Plugin |
|
|
156
|
+
| Plugin | One-liner |
|
|
154
157
|
|---|---|
|
|
155
|
-
| **[dsh-
|
|
156
|
-
| [dsh-
|
|
157
|
-
| [dsh-
|
|
158
|
-
| [dsh-
|
|
159
|
-
| [dsh-
|
|
160
|
-
| [dsh-
|
|
161
|
-
| [dsh-
|
|
162
|
-
| [dsh-
|
|
163
|
-
| [dsh-
|
|
164
|
-
| [dsh-
|
|
165
|
-
| [dsh-
|
|
166
|
-
| [dsh-
|
|
167
|
-
| [dsh-
|
|
168
|
-
| [dsh-github](https://github.com/PerryLink/dsh-github) | Integração de PR/issues do GitHub para DSH,
|
|
169
|
-
| [dsh-
|
|
170
|
-
| [dsh-
|
|
158
|
+
| **[dsh-dsh-auto-review](https://github.com/PerryLink/dsh-dsh-auto-review)** | Auto-revisão de segundo modelo na cadeia de aprovação, com falha fechada por padrão | |
|
|
159
|
+
| **[dsh-dsh-background-agents](https://github.com/PerryLink/dsh-dsh-background-agents)** | Agentes filhos em segundo plano duráveis com barra lateral de UI web, mensagens e interrupção | |
|
|
160
|
+
| **[dsh-dsh-budget](https://github.com/PerryLink/dsh-dsh-budget)** | Governança de custos para DeepSeek Harness: orçamentos, carbono e latência em um painel. | |
|
|
161
|
+
| **[dsh-dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-dsh-checkpoint-rewind)** | Equivalente ao /rewind do Claude Code: instantâneos, bifurcações de sessão, restauração de uso único | |
|
|
162
|
+
| **[dsh-dsh-claude-move](https://github.com/PerryLink/dsh-dsh-claude-move)** | Migre sessões, memória, habilidades e CLAUDE.md do Claude Code para o DSH | |
|
|
163
|
+
| **[dsh-dsh-click](https://github.com/PerryLink/dsh-dsh-click)** | Controle de desktop nativo multiplataforma para DeepSeek Harness — Windows primeiro. | |
|
|
164
|
+
| **[dsh-dsh-composer-history](https://github.com/PerryLink/dsh-dsh-composer-history)** | Histórico de entrada estilo terminal para o compositor web: setas, busca Ctrl+R | |
|
|
165
|
+
| **[dsh-dsh-data-quality](https://github.com/PerryLink/dsh-dsh-data-quality)** | Verificações de qualidade de datasets e verificação de citações (a ponte numérica opcional consumida aqui) | |
|
|
166
|
+
| **[dsh-dsh-defend](https://github.com/PerryLink/dsh-dsh-defend)** | Defesa contra injeção de prompt, jailbreak e vazamento de segredos para DeepSeek Harness. | |
|
|
167
|
+
| **[dsh-dsh-doublecheck](https://github.com/PerryLink/dsh-dsh-doublecheck)** | Guardião de disciplina de engenharia: sabatina de requisitos, portões de teste, revisão adversária | |
|
|
168
|
+
| **[dsh-dsh-draw](https://github.com/PerryLink/dsh-dsh-draw)** | Roteamento unificado de geração de imagens estáticas para DeepSeek Harness. | |
|
|
169
|
+
| **[dsh-dsh-fast](https://github.com/PerryLink/dsh-dsh-fast)** | Diagnóstico de desempenho só de leitura para DeepSeek Harness. | |
|
|
170
|
+
| **[dsh-dsh-fund-research](https://github.com/PerryLink/dsh-dsh-fund-research)** | Relatórios de pesquisa deterministas para fundos mútuos públicos chineses | |
|
|
171
|
+
| **[dsh-dsh-github](https://github.com/PerryLink/dsh-dsh-github)** | Integração de PR/issues do GitHub para o DSH, cada escrita controlada por aprovação | |
|
|
172
|
+
| **[dsh-dsh-industry-research](https://github.com/PerryLink/dsh-dsh-industry-research)** | Orquestração de pesquisa setorial que sela as suas entregas através do `ctx.researchReport.assemble` deste plugin | |
|
|
173
|
+
| **[dsh-dsh-library](https://github.com/PerryLink/dsh-dsh-library)** | Base de conhecimento documental local para DeepSeek Harness. | |
|
|
174
|
+
| **[dsh-dsh-local-ai](https://github.com/PerryLink/dsh-dsh-local-ai)** | Integração de modelos locais (Ollama) para DeepSeek Harness. | |
|
|
175
|
+
| **[dsh-dsh-lsp-actions](https://github.com/PerryLink/dsh-dsh-lsp-actions)** | Diagnósticos, formatação, autocompletar, ações de código e renomeação LSP sobre servidores de linguagem | |
|
|
176
|
+
| **[dsh-dsh-mcp-panel](https://github.com/PerryLink/dsh-dsh-mcp-panel)** | Painel de tempo de execução MCP somente leitura: comando /mcp + aba Settings com status, ferramentas e erros | |
|
|
177
|
+
| **[dsh-dsh-memento](https://github.com/PerryLink/dsh-dsh-memento)** | Memória entre sessões controlada por aprovação: costura ctx.memory + SQLite + ferramenta de memória | |
|
|
178
|
+
| **[dsh-dsh-observe](https://github.com/PerryLink/dsh-dsh-observe)** | Exportador de observabilidade OpenTelemetry e Langfuse para DeepSeek Harness. | |
|
|
179
|
+
| **[dsh-dsh-output-styles](https://github.com/PerryLink/dsh-dsh-output-styles)** | Troca de estilo em tempo de execução equivalente ao outputStyles do Claude Code | |
|
|
180
|
+
| **[dsh-dsh-permission-rules](https://github.com/PerryLink/dsh-dsh-permission-rules)** | Regras de permissão declarativas allow/deny/ask estilo Claude Code com auditoria | |
|
|
181
|
+
| **[dsh-dsh-plugin-guide](https://github.com/PerryLink/dsh-dsh-plugin-guide)** | Base de conhecimento de desenvolvimento de plugins como habilidade de agente sob demanda | |
|
|
182
|
+
| **[dsh-dsh-research-report](https://github.com/PerryLink/dsh-dsh-research-report)** | Motor de relatórios de pesquisa verificáveis com evidência endereçada por conteúdo | |
|
|
183
|
+
| **[dsh-dsh-score](https://github.com/PerryLink/dsh-dsh-score)** | Pontuação de qualidade multidimensional para plugins de DeepSeek Harness. | |
|
|
184
|
+
| **[dsh-dsh-session-pin](https://github.com/PerryLink/dsh-dsh-session-pin)** | Fixe sessões na barra lateral web com ordenação durável | |
|
|
185
|
+
| **[dsh-dsh-session-sync](https://github.com/PerryLink/dsh-dsh-session-sync)** | Sincronização de sessões entre dispositivos para DeepSeek Harness — um espelho git dedicado do seu armazenamento de sessões. | |
|
|
186
|
+
| **[dsh-dsh-skill-pack-security](https://github.com/PerryLink/dsh-dsh-skill-pack-security)** | Pacote de habilidades de auditoria de segurança: varredura de segredos, revisão de dependências e cadeia de suprimentos | |
|
|
187
|
+
| **[dsh-dsh-talk](https://github.com/PerryLink/dsh-dsh-talk)** | Loop de sessão com voz para DeepSeek Harness: fale e ouça a resposta. | |
|
|
188
|
+
| **[dsh-dsh-test-drive](https://github.com/PerryLink/dsh-dsh-test-drive)** | Test drives isolados de instalação e smoke para plugins de DeepSeek Harness. | |
|
|
189
|
+
| **[dsh-dsh-translate](https://github.com/PerryLink/dsh-dsh-translate)** | Tradução de parâmetros entre fornecedores e reparo determinístico de JSON para DeepSeek Harness. | |
|
|
171
190
|
|
|
172
191
|
## License
|
|
173
192
|
|
package/README.zh.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
3
|
# dsh-mask
|
|
4
|
+
- **1024 商店渠道**:先 `npm i -g dsh1024`,再 `dsh1024 plugin --profile web add dsh-mask`(计入 [deepseek1024.com](https://deepseek1024.com) 安装排行)。
|
|
4
5
|
|
|
5
6
|
**面向 DeepSeek Harness 的 PII 脱敏中间件——在个人数据进入模型前匿名化,在展示层还原。**
|
|
6
7
|
|
|
@@ -24,7 +25,7 @@
|
|
|
24
25
|
|
|
25
26
|
| 维度 | 状态 |
|
|
26
27
|
|---|---|
|
|
27
|
-
| Harness | DeepSeek Harness `0.1.
|
|
28
|
+
| Harness | DeepSeek Harness `0.1.2-alpha.3`(2026-09-01 已适配):会话信封保留 ignorable 字段但仅用于存量日志读取兼容——Session.append 仍无法盖章,门控行为不变。 |
|
|
28
29
|
| Node | `^22.19.0 \|\| >=24.0.0` |
|
|
29
30
|
| 平台 | 任何 DSH 可运行处(纯 host、零依赖正则;无浏览器半) |
|
|
30
31
|
| 模型 | 文本模型完全支持;无需额外模型能力 |
|
|
@@ -80,6 +81,8 @@ dsh --profile web --dump-config | grep -A2 'id: mask'
|
|
|
80
81
|
- **tarball 通道**:在本仓库 `pnpm pack`,再 `dsh plugin --profile web add ./dsh-mask-<version>.tgz`。
|
|
81
82
|
- **卸载**:`dsh plugin --profile web remove dsh-mask`(或从 profile patch 删掉该行)。
|
|
82
83
|
|
|
84
|
+
`dsh-mask` 不再自带 storage 栈。已组合该栈的 profile(`web` profile 通过 `@deepseek-ai/dsh-web-app` 提供)自带 `storageDomain`,持久化开箱即用。未组合 storage 的 bare profile 仍可正常挂载与遮罩,但恢复表仅存内存(重启丢失)——请在 profile patch 中组合 storage 栈,或将 `persistRestoreTable` 设为 `false`。
|
|
85
|
+
|
|
83
86
|
## Configuration
|
|
84
87
|
|
|
85
88
|
所有可调项都是 Schemastery `Config` 字段(可从 cordis.yml 覆盖)。按 id 覆盖会替换整行——请重述所有需要的键。`cordis.patch.yml` 逐键内联注释。
|
|
@@ -136,13 +139,13 @@ profile patch 覆盖示例:
|
|
|
136
139
|
|
|
137
140
|
- **仅正则。** 姓名(`person`)与地址(`address`)识别需要外部 NER 识别器,纯 host 零依赖形态未捆绑;`mode: regex+ner` 与这些实体在加载期响亮失败。开箱即用覆盖电话、邮箱、身份证、银行卡、密钥与(可选)IP。
|
|
138
141
|
- **展示层还原需要浏览器半。** 遮罩完全在 host 侧,但客户端 UI 中透明还原助手气泡属于浏览器半功能,本纯 host 形态未交付;恢复表与 `restore()` 是供客户端插件消费的完整 host 侧 seam,交互需求现由 `/mask restore` 覆盖。
|
|
139
|
-
- **`0.1.
|
|
142
|
+
- **`0.1.2-alpha.3` 会话事件。** 宿主尚未收录 `mask/*` 事件类型,且其 `Session.append` 不盖章 `ignorable` 信封,因此 alpha.3 上会话日志审计 append 被跳过(会话仍可加载);宿主收录类型或支持 `ignorable` 信封后自动开启。
|
|
140
143
|
|
|
141
144
|
## Development
|
|
142
145
|
|
|
143
146
|
```sh
|
|
144
147
|
pnpm install # node ^22.19 || >=24
|
|
145
|
-
pnpm run typecheck && pnpm run typecheck:ci # tsc --checkJs(对照
|
|
148
|
+
pnpm run typecheck && pnpm run typecheck:ci # tsc --checkJs(对照 0.1.2-alpha.3 peers)
|
|
146
149
|
pnpm test # node --test
|
|
147
150
|
pnpm run verify:self-contained # 依赖 spec 均来自 registry
|
|
148
151
|
pnpm run verify:artifacts # 发布文件齐全 + index.mjs 可 import
|
|
@@ -166,26 +169,42 @@ PII 基准(108 个合成样本的逐类 P/R/F1)见 [`benchmark/RESULTS.md`](
|
|
|
166
169
|
|
|
167
170
|
## PerryLink DSH Plugin Family
|
|
168
171
|
|
|
169
|
-
|
|
172
|
+
这是 [PerryLink](https://github.com/PerryLink) 维护的 [33 个 DeepSeek Harness 插件](https://github.com/PerryLink) 之一。如果它能帮到你,其他的也会:
|
|
170
173
|
|
|
171
|
-
|
|
|
174
|
+
| Plugin | One-liner |
|
|
172
175
|
|---|---|
|
|
173
|
-
| **[dsh-
|
|
174
|
-
| [dsh-
|
|
175
|
-
| [dsh-
|
|
176
|
-
| [dsh-
|
|
177
|
-
| [dsh-
|
|
178
|
-
| [dsh-
|
|
179
|
-
| [dsh-
|
|
180
|
-
| [dsh-
|
|
181
|
-
| [dsh-
|
|
182
|
-
| [dsh-
|
|
183
|
-
| [dsh-
|
|
184
|
-
| [dsh-
|
|
185
|
-
| [dsh-
|
|
186
|
-
| [dsh-github](https://github.com/PerryLink/dsh-github) | DSH 的 GitHub PR/
|
|
187
|
-
| [dsh-
|
|
188
|
-
| [dsh-
|
|
176
|
+
| **[dsh-dsh-auto-review](https://github.com/PerryLink/dsh-dsh-auto-review)** | 审批链上的第二模型自动审查,默认失败关闭 | |
|
|
177
|
+
| **[dsh-dsh-background-agents](https://github.com/PerryLink/dsh-dsh-background-agents)** | 带 Web UI 侧栏、消息与中断的持久后台子代理 | |
|
|
178
|
+
| **[dsh-dsh-budget](https://github.com/PerryLink/dsh-dsh-budget)** | DeepSeek Harness 的成本治理:预算、碳排与延迟一屏呈现。 | |
|
|
179
|
+
| **[dsh-dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-dsh-checkpoint-rewind)** | Claude Code /rewind 等价:快照、会话 fork、一次性恢复 | |
|
|
180
|
+
| **[dsh-dsh-claude-move](https://github.com/PerryLink/dsh-dsh-claude-move)** | 把 Claude Code 会话、记忆、技能与 CLAUDE.md 迁入 DSH | |
|
|
181
|
+
| **[dsh-dsh-click](https://github.com/PerryLink/dsh-dsh-click)** | 跨平台原生桌面控制(DeepSeek Harness),Windows 优先。 | |
|
|
182
|
+
| **[dsh-dsh-composer-history](https://github.com/PerryLink/dsh-dsh-composer-history)** | Web 输入框的终端式历史:方向键、Ctrl+R 搜索 | |
|
|
183
|
+
| **[dsh-dsh-data-quality](https://github.com/PerryLink/dsh-dsh-data-quality)** | 数据集质量检查与引文核查(本插件可选消费的数字核查桥) | |
|
|
184
|
+
| **[dsh-dsh-defend](https://github.com/PerryLink/dsh-dsh-defend)** | DeepSeek Harness 的提示注入、越狱与密钥泄露防护。 | |
|
|
185
|
+
| **[dsh-dsh-doublecheck](https://github.com/PerryLink/dsh-dsh-doublecheck)** | 工程纪律守卫:需求质询、测试门禁、对手评审 | |
|
|
186
|
+
| **[dsh-dsh-draw](https://github.com/PerryLink/dsh-dsh-draw)** | DeepSeek Harness 的统一静态图像生成路由。 | |
|
|
187
|
+
| **[dsh-dsh-fast](https://github.com/PerryLink/dsh-dsh-fast)** | DeepSeek Harness 只读性能诊断。 | |
|
|
188
|
+
| **[dsh-dsh-fund-research](https://github.com/PerryLink/dsh-dsh-fund-research)** | 面向中国公募基金的确定性研究报告 | |
|
|
189
|
+
| **[dsh-dsh-github](https://github.com/PerryLink/dsh-dsh-github)** | 面向 DSH 的 GitHub PR/issues 集成,每次写入经审批门控 | |
|
|
190
|
+
| **[dsh-dsh-industry-research](https://github.com/PerryLink/dsh-dsh-industry-research)** | 行业研究编排,经本插件的 `ctx.researchReport.assemble` 封存交付物 | |
|
|
191
|
+
| **[dsh-dsh-library](https://github.com/PerryLink/dsh-dsh-library)** | DeepSeek Harness 的本地文档知识库。 | |
|
|
192
|
+
| **[dsh-dsh-local-ai](https://github.com/PerryLink/dsh-dsh-local-ai)** | DeepSeek Harness 的本地模型(Ollama)接入。 | |
|
|
193
|
+
| **[dsh-dsh-lsp-actions](https://github.com/PerryLink/dsh-dsh-lsp-actions)** | 通过语言服务器的 LSP 诊断、格式化、补全、代码操作与重命名 | |
|
|
194
|
+
| **[dsh-dsh-mcp-panel](https://github.com/PerryLink/dsh-dsh-mcp-panel)** | 只读 MCP 运行时面板:/mcp 命令 + 带状态、工具与错误的 Settings 标签页 | |
|
|
195
|
+
| **[dsh-dsh-memento](https://github.com/PerryLink/dsh-dsh-memento)** | 审批门控的跨会话记忆:ctx.memory 接缝 + SQLite + 记忆工具 | |
|
|
196
|
+
| **[dsh-dsh-observe](https://github.com/PerryLink/dsh-dsh-observe)** | DeepSeek Harness 的 OpenTelemetry 与 Langfuse 可观测导出器。 | |
|
|
197
|
+
| **[dsh-dsh-output-styles](https://github.com/PerryLink/dsh-dsh-output-styles)** | Claude Code outputStyles 等价的运行时风格切换 | |
|
|
198
|
+
| **[dsh-dsh-permission-rules](https://github.com/PerryLink/dsh-dsh-permission-rules)** | Claude Code 风格声明式 allow/deny/ask 权限规则,带审计 | |
|
|
199
|
+
| **[dsh-dsh-plugin-guide](https://github.com/PerryLink/dsh-dsh-plugin-guide)** | 作为按需代理技能的插件开发知识库 | |
|
|
200
|
+
| **[dsh-dsh-research-report](https://github.com/PerryLink/dsh-dsh-research-report)** | 可验证研究报告引擎:内容寻址证据账本与封存版本 | |
|
|
201
|
+
| **[dsh-dsh-score](https://github.com/PerryLink/dsh-dsh-score)** | DeepSeek Harness 插件的多维质量评分。 | |
|
|
202
|
+
| **[dsh-dsh-session-pin](https://github.com/PerryLink/dsh-dsh-session-pin)** | 在 Web 侧栏置顶会话,带持久排序 | |
|
|
203
|
+
| **[dsh-dsh-session-sync](https://github.com/PerryLink/dsh-dsh-session-sync)** | DeepSeek Harness 的跨设备会话同步——会话存储的专用 git 镜像。 | |
|
|
204
|
+
| **[dsh-dsh-skill-pack-security](https://github.com/PerryLink/dsh-dsh-skill-pack-security)** | 安全审计技能包:密钥扫描、依赖与供应链审查 | |
|
|
205
|
+
| **[dsh-dsh-talk](https://github.com/PerryLink/dsh-dsh-talk)** | DeepSeek Harness 的语音优先会话闭环:对它说,听它答。 | |
|
|
206
|
+
| **[dsh-dsh-test-drive](https://github.com/PerryLink/dsh-dsh-test-drive)** | DeepSeek Harness 插件的隔离试装冒烟。 | |
|
|
207
|
+
| **[dsh-dsh-translate](https://github.com/PerryLink/dsh-dsh-translate)** | DeepSeek Harness 的厂商参数翻译与确定性 JSON 修复。 | |
|
|
189
208
|
|
|
190
209
|
## License
|
|
191
210
|
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -29,12 +29,12 @@ software, none of which is bundled into the published tarball:
|
|
|
29
29
|
|---|---|---|---|
|
|
30
30
|
| [zod](https://github.com/colinhacks/zod) | `^4.4.3` | MIT | Runtime schema for the `dsh_mask` storage-domain record (persistence-boundary validator) |
|
|
31
31
|
| [typescript](https://github.com/microsoft/TypeScript) | `^5.9.0` | Apache-2.0 | `tsc --checkJs` typecheck gate (`tsconfig.check.json`) |
|
|
32
|
-
| [@deepseek-ai/cordis](https://www.npmjs.com/package/@deepseek-ai/cordis) | `^4.0.
|
|
33
|
-
| [@deepseek-ai/schemastery](https://www.npmjs.com/package/@deepseek-ai/schemastery) | `^3.18.
|
|
32
|
+
| [@deepseek-ai/cordis](https://www.npmjs.com/package/@deepseek-ai/cordis) | `^4.0.2` (peer) | See package | The plugin runtime |
|
|
33
|
+
| [@deepseek-ai/schemastery](https://www.npmjs.com/package/@deepseek-ai/schemastery) | `^3.18.2` (peer) | See package | Configuration schema |
|
|
34
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.
|
|
37
|
+
add `@deepseek-ai/dsh-agent` and `@deepseek-ai/dsh-commands` at `0.1.2-alpha.3`, and
|
|
38
38
|
`@types/node`.
|
|
39
39
|
|
|
40
40
|
At runtime the plugin only talks to the harness services listed as peerDependencies;
|
package/cordis.patch.yml
CHANGED
|
@@ -2,20 +2,16 @@
|
|
|
2
2
|
#
|
|
3
3
|
# Every key below is a Config field (Schemastery schema); invalid values fail
|
|
4
4
|
# the profile load loudly. See README.md "Configuration" for the full table.
|
|
5
|
+
#
|
|
6
|
+
# This patch inserts only the `mask` row. It deliberately does NOT insert the
|
|
7
|
+
# storage stack (`storage` / `storage-json` / `storage-domain`): a profile that
|
|
8
|
+
# already composes it — the `web` profile does, via @deepseek-ai/dsh-web-app —
|
|
9
|
+
# would collide on the duplicate loader entry id `storage` and refuse to boot
|
|
10
|
+
# (issue #2). The plugin treats `storageDomain` as an optional service: when
|
|
11
|
+
# the profile provides it, the restore table persists to the `dsh_mask` domain;
|
|
12
|
+
# on a profile without storage, the restore table is memory-only and
|
|
13
|
+
# `persistRestoreTable: true` is a no-op with a one-time warning.
|
|
5
14
|
- insert:
|
|
6
|
-
- id: storage
|
|
7
|
-
name: '@deepseek-ai/dsh-storage'
|
|
8
|
-
|
|
9
|
-
- id: storage-json
|
|
10
|
-
name: '@deepseek-ai/dsh-storage-json'
|
|
11
|
-
config:
|
|
12
|
-
root: !!js dshHomePath('storages')
|
|
13
|
-
|
|
14
|
-
- id: storage-domain
|
|
15
|
-
name: '@deepseek-ai/dsh-storage-domain'
|
|
16
|
-
config:
|
|
17
|
-
backend: json
|
|
18
|
-
|
|
19
15
|
- id: mask
|
|
20
16
|
name: dsh-mask
|
|
21
17
|
config:
|
|
@@ -47,7 +43,9 @@
|
|
|
47
43
|
registerCommand: true
|
|
48
44
|
registerTools: true
|
|
49
45
|
# Persist the placeholder->original restore table to the controlled
|
|
50
|
-
# dsh_mask storage domain (false = memory only, lost on restart).
|
|
46
|
+
# dsh_mask storage domain (false = memory only, lost on restart). A
|
|
47
|
+
# no-op with a one-time warning when the profile composes no storage
|
|
48
|
+
# stack (storageDomain service absent).
|
|
51
49
|
persistRestoreTable: true
|
|
52
50
|
# Per-session cap on restore entries; the oldest placeholders are
|
|
53
51
|
# evicted first (their responses can no longer be restored).
|
package/index.mjs
CHANGED
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
// - 表面:/mask 命令(status|on|off|restore|help)与 mask_test 工具(试跑一段
|
|
13
13
|
// 文本看替换效果,绝不回显原文)。
|
|
14
14
|
//
|
|
15
|
-
// 只消费公开服务:commands
|
|
16
|
-
// 可选注册;lib/ 零 DSH
|
|
15
|
+
// 只消费公开服务:commands(inject 声明)、storageDomain(ctx.get 可选,缺失时
|
|
16
|
+
// 恢复表降级为纯内存并一次性告警),tools 经 ctx.inject 可选注册;lib/ 零 DSH
|
|
17
|
+
// 依赖,服务只在边界接线。
|
|
17
18
|
|
|
18
19
|
import { Context } from '@deepseek-ai/cordis'
|
|
19
20
|
import Schema from '@deepseek-ai/schemastery'
|
|
@@ -41,8 +42,12 @@ import { dshMaskDomainSpec } from './lib/domain.mjs'
|
|
|
41
42
|
|
|
42
43
|
export const name = PLUGIN_NAME
|
|
43
44
|
|
|
44
|
-
/**
|
|
45
|
-
|
|
45
|
+
/**
|
|
46
|
+
* 必需服务:缺失即加载失败(响亮)。storageDomain 是可选服务(apply 内
|
|
47
|
+
* ctx.get 读取,缺失时恢复表降级为纯内存),不再作为 inject 硬依赖——否则
|
|
48
|
+
* bare profile 会卡在 `pending (waiting for service: storageDomain)`。
|
|
49
|
+
*/
|
|
50
|
+
export const inject = ['commands']
|
|
46
51
|
|
|
47
52
|
/**
|
|
48
53
|
* 宿主 append 是否盖章 ignorable 信封(运行时能力探测)。
|
|
@@ -273,13 +278,21 @@ export function apply(ctx, config = {}) {
|
|
|
273
278
|
const warn = (message) => logger.warn(message)
|
|
274
279
|
const eventGate = makeEventGate(KNOWN_SESSION_EVENT_TYPES, probeIgnorableAppend())
|
|
275
280
|
|
|
276
|
-
// ---
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
// --- 恢复表:可选 storageDomain 的 'dsh_mask' 领域(异步打开,操作路径 await)。
|
|
282
|
+
// storageDomain 缺失(bare profile 未组合存储栈)时降级为纯内存恢复表,
|
|
283
|
+
// persistRestoreTable 视为 no-op 并一次性告警(可选 seam 失败关闭,绝不卡 pending)。
|
|
284
|
+
const storageDomain = ctx.get('storageDomain')
|
|
285
|
+
/** @type {Promise<any>|null} 打开的领域(含 table/close),RestoreStore 按需消费。 */
|
|
286
|
+
let domainPromise = null
|
|
287
|
+
if (storageDomain !== undefined) {
|
|
288
|
+
domainPromise = storageDomain.open(dshMaskDomainSpec).then((domain) => {
|
|
289
|
+
ctx.effect(() => () => { void domain.close() }, `${PLUGIN_NAME}.domain.close`)
|
|
290
|
+
return domain
|
|
291
|
+
})
|
|
292
|
+
domainPromise.catch(() => {}) // 消费方各自处理拒绝;此处仅避免未处理拒绝告警。
|
|
293
|
+
} else if (resolved.persistRestoreTable) {
|
|
294
|
+
warn('storageDomain not composed: the restore table is memory-only (lost on restart). Compose the storage stack (storage / storage-json / storage-domain) in the profile, or set persistRestoreTable: false.')
|
|
295
|
+
}
|
|
283
296
|
|
|
284
297
|
const store = new RestoreStore({
|
|
285
298
|
entities: resolved.entities,
|
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.2.
|
|
4
|
+
"version": "0.2.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.
|
|
73
|
+
"0.1.2-alpha.3"
|
|
74
74
|
]
|
|
75
75
|
},
|
|
76
76
|
"capability": {
|
|
@@ -87,33 +87,34 @@
|
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
90
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
91
|
+
"@deepseek-ai/dsh-commands": ">=0.1.0-rc.8 <0.2.0",
|
|
91
92
|
"@deepseek-ai/dsh-session": ">=0.1.0-rc.8 <0.2.0",
|
|
92
93
|
"@deepseek-ai/dsh-storage": ">=0.1.0-rc.8 <0.2.0",
|
|
93
94
|
"@deepseek-ai/dsh-storage-domain": ">=0.1.0-rc.8 <0.2.0",
|
|
94
95
|
"@deepseek-ai/dsh-storage-json": ">=0.1.0-rc.8 <0.2.0",
|
|
95
96
|
"@deepseek-ai/dsh-tools": ">=0.1.0-rc.8 <0.2.0",
|
|
96
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
97
|
+
"@deepseek-ai/schemastery": "^3.18.2"
|
|
97
98
|
},
|
|
98
99
|
"dependencies": {
|
|
99
|
-
"typescript": "^5.9.0",
|
|
100
100
|
"zod": "^4.4.3"
|
|
101
101
|
},
|
|
102
|
-
"devDependencies": {
|
|
103
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
102
|
+
"devDependencies": {"@deepseek-ai/dsh-attachment": "0.1.2-alpha.3",
|
|
103
|
+
"@deepseek-ai/cordis": "^4.0.2",
|
|
104
104
|
"@deepseek-ai/cordis-plugin-include": "1.0.6",
|
|
105
105
|
"@deepseek-ai/cordis-plugin-loader": "1.0.2",
|
|
106
|
-
"@deepseek-ai/dsh-agent": "0.1.
|
|
107
|
-
"@deepseek-ai/dsh-commands": "0.1.
|
|
108
|
-
"@deepseek-ai/dsh-session": "0.1.
|
|
109
|
-
"@deepseek-ai/dsh-storage": "0.1.
|
|
110
|
-
"@deepseek-ai/dsh-storage-domain": "0.1.
|
|
111
|
-
"@deepseek-ai/dsh-storage-json": "0.1.
|
|
112
|
-
"@deepseek-ai/dsh-system-prompt": "0.1.
|
|
113
|
-
"@deepseek-ai/dsh-tools": "0.1.
|
|
114
|
-
"@deepseek-ai/schemastery": "^3.18.
|
|
106
|
+
"@deepseek-ai/dsh-agent": "0.1.2-alpha.3",
|
|
107
|
+
"@deepseek-ai/dsh-commands": "0.1.2-alpha.3",
|
|
108
|
+
"@deepseek-ai/dsh-session": "0.1.2-alpha.3",
|
|
109
|
+
"@deepseek-ai/dsh-storage": "0.1.2-alpha.3",
|
|
110
|
+
"@deepseek-ai/dsh-storage-domain": "0.1.2-alpha.3",
|
|
111
|
+
"@deepseek-ai/dsh-storage-json": "0.1.2-alpha.3",
|
|
112
|
+
"@deepseek-ai/dsh-system-prompt": "0.1.2-alpha.3",
|
|
113
|
+
"@deepseek-ai/dsh-tools": "0.1.2-alpha.3",
|
|
114
|
+
"@deepseek-ai/schemastery": "^3.18.2",
|
|
115
115
|
"@types/node": "^22.19.0",
|
|
116
|
-
"oxlint": "0.18.1"
|
|
116
|
+
"oxlint": "0.18.1",
|
|
117
|
+
"typescript": "^5.9.0"
|
|
117
118
|
},
|
|
118
119
|
"scripts": {
|
|
119
120
|
"typecheck": "tsc -p tsconfig.check.json",
|
|
@@ -144,5 +145,9 @@
|
|
|
144
145
|
"publishConfig": {
|
|
145
146
|
"access": "public"
|
|
146
147
|
},
|
|
147
|
-
"license": "Apache-2.0"
|
|
148
|
+
"license": "Apache-2.0",
|
|
149
|
+
"funding": {
|
|
150
|
+
"type": "individual",
|
|
151
|
+
"url": "https://github.com/sponsors/PerryLink"
|
|
152
|
+
}
|
|
148
153
|
}
|