dsh-observe 0.2.12 → 0.2.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 CHANGED
@@ -5,6 +5,25 @@ 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.13] - 2026-09-18
9
+
10
+ ### Added
11
+
12
+ - `dsh.manifestVersion: 1` and the canonical three-clause `engines.dsh` range, matching the 0.1.6 family contract.
13
+ - An optional diagnostics outlet: when the experimental `inspector` service is composed, every recorded metric is also published (`observe.metric`). The service is read structurally and never injected, a missing service is a silent no-op, and a throwing service cannot break the export path — the OTLP sink stays the primary outlet.
14
+ - A ruler-liveness canary (`tsconfig.canary.json` + `scripts/ruler-canary.ts` + `pnpm run check:ruler-live`): the canary references constructs that exist only on the older alpha.1/rc.2 type line, so a green compile means the typecheck ruler is measuring a stale face. CI now runs both rulers plus the canary.
15
+
16
+ ### Fixed
17
+
18
+ - Strict Typert wire codecs now carry both faces — the published `schema` field and the checkout `create()` factory. The 0.1.6-alpha.2 loader requires `create()`, so the build failed on that line with `Property 'create' is missing`; the codec is built through a variable so neither typecheck ruler flags the other face's field as excess.
19
+ - Mounting no longer dies when the durable offline buffer cannot open. `storageDomain` is single-open per name, so a hot reload racing the previous instance's close made the second `open` reject and the whole exporter failed to mount; the open is now wrapped, the degradation warns once, and the exporter keeps delivering through the in-memory queue.
20
+ - The `session/event`, `session/flush`, and `session/disposed` listeners are registered inside the teardown effect (with the timers, the final pipeline flush, and the domain close), so a mid-apply disposal can no longer throw `INACTIVE_EFFECT` or leave the collector writing after unmount.
21
+ - Prompt capture reads the projected model-visible history (`Session.deriveMessages()`) instead of the deprecated synchronous event snapshot; hosts without that accessor contribute the logged header only, which is what their pre-0.1.5 logs carried anyway.
22
+
23
+ ### Changed
24
+
25
+ - The dev/test `@deepseek-ai/dsh-*` dependencies move to the `0.1.6-alpha.2` line so the primary typecheck ruler measures the new type face; `typecheck:ci` keeps measuring the published line.
26
+
8
27
  ## [0.2.12] - 2026-09-12
9
28
 
10
29
  ### Changed
package/README-es.md CHANGED
@@ -8,6 +8,7 @@
8
8
  *Convierte los eventos de sesión en trazas OTLP y observaciones de Langfuse — saneado, con buffer y apagado por defecto.*
9
9
 
10
10
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
11
+ [![Gitee](https://img.shields.io/badge/Gitee-mirror-c71d23?logo=gitee)](https://gitee.com/perrylink/dsh-observe)
11
12
  [![DSH plugin](https://img.shields.io/badge/dsh--plugin-✅-green)](https://github.com/topics/dsh-plugin)
12
13
  [![dsh-doctor](https://raw.githubusercontent.com/PerryLink/dsh-plugin-doctor/main/badges/PerryLink__dsh-observe.svg)](https://github.com/PerryLink/dsh-plugin-doctor#verified-徽章)
13
14
  [![Node](https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-brightgreen.svg)](#)
@@ -26,7 +27,7 @@
26
27
 
27
28
  | Superficie | Estado |
28
29
  |---|---|
29
- | Harness | DeepSeek Harness `dsh-v0.1.5-rc.2` (adaptado el 2026-09-09): el formato de sesión V3 incorpora el flujo del asistente en `assistant/message` / `assistant/attempt` y representa el prompt de sistema como nodo 0 de la superficie (`system/message`); el plugin consume solo el flujo de eventos en vivo y nunca lee archivos de log de sesión. Verificado el 2026-09-11 contra el tag dsh-v0.1.5-rc.2 (cadena completa de puertas local; el workflow compat mensual cubre el smoke de instalación de perfil). |
30
+ | Harness | DeepSeek Harness `dsh-v0.1.6-alpha.2` (adaptado el 2026-09-18): el formato de sesión V3 incorpora el flujo del asistente en `assistant/message` / `assistant/attempt` y representa el prompt de sistema como nodo 0 de la superficie (`system/message`); el plugin consume solo el flujo de eventos en vivo y nunca lee archivos de log de sesión. El rango de peers `>=0.1.2-rc.1 <0.2.0 \|\| >=0.1.5-alpha.1 <0.2.0 \|\| >=0.1.6-0 <0.2.0` mantiene instalable cada línea publicada (cadena completa de puertas local; el workflow compat cubre el smoke de instalación de perfil). |
30
31
  | Node | `^22.19.0 \|\| >=24.0.0` |
31
32
  | Backends | OpenTelemetry OTLP/HTTP (traces + metrics, codificación JSON) y Langfuse (observabilidad de LLM) — uno o ambos |
32
33
  | Modelo | Independiente del modelo: exporta el flujo `session/event`; no realiza llamadas a modelos |
@@ -170,7 +171,8 @@ Este plugin **no registra herramientas de modelo** — es un exportador en segun
170
171
 
171
172
  ## Known limitations
172
173
 
173
- - **npm 0.1.5-rc.2** — el plugin se desarrolla y prueba contra `@deepseek-ai/dsh@0.1.5-rc.2` (devDeps y CI fijados); el rango de peers `>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0` mantiene instalable la línea rc.1 publicada, y el workflow compat mensual cubre baselines más nuevos.
174
+ - **npm 0.1.6-alpha.2** — el plugin se desarrolla y prueba contra `@deepseek-ai/dsh@0.1.6-alpha.2` (devDeps y la regla primaria de CI); el rango de peers `>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0` mantiene instalable cada línea publicada, y la segunda regla (`typecheck:ci`) más el workflow compat cubren los baselines antiguos.
175
+ - **Los eventos de auditoría no se persisten** — los registros `observe/*` del propio exportador son solo de auditoría: en la línea de host actual la puerta de append de sesión admite eventos de superficie, así que ningún evento `observe/*` se escribe en el log de sesión, y el plugin no lo falsifica con un append sin marcar (eso volvería ilegibles las sesiones). Usa la salida de estado de `/observe` y los backends OTLP/Langfuse como superficie de auditoría.
174
176
  - **Las métricas evitan la ruta de reintento/spool** — las métricas OTLP se agregan de forma acumulativa, así que un flush perdido se autocura en el siguiente (por diseño, no es un fallo).
175
177
  - **Sin muestreo** — toda familia de spans habilitada se exporta; ajusta los interruptores `capture.*` y `batch.maxBufferRecords` para sesiones de alto volumen.
176
178
 
@@ -178,9 +180,10 @@ Este plugin **no registra herramientas de modelo** — es un exportador en segun
178
180
 
179
181
  ```sh
180
182
  pnpm install # node ^22.19 || >=24
181
- pnpm run typecheck # tsc: src + tests contra los devDeps fijados 0.1.5-rc.2 (sin tsconfig paths)
182
- pnpm run typecheck:ci # tsc contra los tipos publicados 0.1.5-rc.2 (sin paths)
183
- pnpm test # vitest: 124 tests, 18 suites (Context/Session/storage seam reales)
183
+ pnpm run typecheck # tsc: src + tests contra los devDeps 0.1.6-alpha.2 (sin tsconfig paths)
184
+ pnpm run typecheck:ci # tsc contra la línea publicada (sin paths)
185
+ pnpm run check:ruler-live # canario: debe fallar al compilar, probando que la regla sigue viva
186
+ pnpm test # vitest: 126 tests, 18 suites (Context/Session/storage seam reales)
184
187
  pnpm run test:coverage # puerta de cobertura (90/80/90/90)
185
188
  pnpm run build # bundle tsdown + declaraciones tsc (lib/)
186
189
  pnpm run verify:self-contained # las especificaciones de dependencias resuelven desde el registry
@@ -199,7 +202,7 @@ pnpm pack # el tarball publicado
199
202
 
200
203
  ## PerryLink DSH Plugin Family
201
204
 
202
- Este proyecto es uno de los [37 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:
205
+ Este proyecto es uno de los [40 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:
203
206
 
204
207
  | Plugin | One-liner |
205
208
  |---|---|
@@ -228,6 +231,7 @@ Este proyecto es uno de los [37 complementos de DeepSeek Harness](https://github
228
231
  | **[dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules)** | Reglas de permisos declarativas allow/deny/ask estilo Claude Code con auditoría | |
229
232
  | **[dsh-personal-directive](https://github.com/PerryLink/dsh-personal-directive)** | Inyector de directivas personales con interruptor en la barra superior (edición framework) |
230
233
  | **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | Base de conocimiento de desarrollo de plugins como habilidad de agente bajo demanda | |
234
+ | **[dsh-plugin-doctor](https://github.com/PerryLink/dsh-plugin-doctor)** | Zero-dependency static + sandbox smoke detector for DSH plugins | |
231
235
  | **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | Puente multicanal de aprobación/preguntas: WeChat/Telegram/Feishu, consola de sesión |
232
236
  | **[dsh-research-report](https://github.com/PerryLink/dsh-research-report)** | Motor de informes de investigación verificables con evidencia direccionada por contenido | |
233
237
  | **[dsh-score](https://github.com/PerryLink/dsh-score)** | Puntuación de calidad multidimensional para plugins de DeepSeek Harness. | |
@@ -238,7 +242,16 @@ Este proyecto es uno de los [37 complementos de DeepSeek Harness](https://github
238
242
  | **[dsh-test-drive](https://github.com/PerryLink/dsh-test-drive)** | Pruebas de instalación y humo aisladas para plugins de DeepSeek Harness. | |
239
243
  | **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | Puente de tareas TickTick/Dida365: panel de cabecera de sesión + 11 herramientas |
240
244
  | **[dsh-translate](https://github.com/PerryLink/dsh-translate)** | Traducción de parámetros entre proveedores y reparación determinista de JSON para DeepSeek Harness. | |
241
- | **[dsh-wechat](https://github.com/PerryLink/dsh-wechat)** | Puente WeChat ↔ DSH (bot Tencent iLink): texto/imagen/archivo/voz, aprobaciones en el chat |
245
+ | **[dsh-wechat](https://github.com/pan17/dsh-wechat)** | Puente WeChat ↔ DSH (bot Tencent iLink): texto/imagen/archivo/voz, aprobaciones en el chat |
246
+ | **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | Automatic strong/cheap model-tier routing with deterministic risk guards and a `/tier` command | |
247
+ | **[dsh-catalog](https://github.com/PerryLink/dsh-catalog)** | DSH Desktop Market standard catalog source for the PerryLink family | |
248
+ | **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | Read-only MCP server exposing the certification registry: grades, snapshots and five-dimension evidence | |
249
+ | **[dsh-kit](https://github.com/PerryLink/dsh-kit)** | One-command starter pack that installs the core family | |
250
+ | **[dsh-plugin-certification](https://github.com/PerryLink/dsh-plugin-certification)** | Community certification registry with repro-checkable grades and badges | |
251
+ | **[dsh-plugin-kit](https://github.com/PerryLink/dsh-plugin-kit)** | Shared zero-runtime-dependency toolkit for the PerryLink DSH plugins | |
252
+ | **[dsh-plugin-portal](https://github.com/PerryLink/dsh-plugin-portal)** | Zero-dependency static portal rendering the whole plugin family as one page | |
253
+ | **[dsh-plugin-upgrade-015](https://github.com/PerryLink/dsh-plugin-upgrade-015)** | Merged `0.1.3-alpha.1` → `0.1.5-rc.1` upgrade corridor card plus a zero-dependency seam scanner | |
254
+ | **[dsh-team-rooms](https://github.com/PerryLink/dsh-team-rooms)** | Cross-session team rooms: shared message bus, task board and timeline | |
242
255
 
243
256
  ## License
244
257
 
package/README-hi.md CHANGED
@@ -8,6 +8,7 @@
8
8
  *सेशन इवेंट्स को OTLP traces और Langfuse observations में बदलें — सैनिटाइज़्ड, बफ़र्ड, डिफ़ॉल्ट रूप से बंद।*
9
9
 
10
10
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
11
+ [![Gitee](https://img.shields.io/badge/Gitee-mirror-c71d23?logo=gitee)](https://gitee.com/perrylink/dsh-observe)
11
12
  [![DSH plugin](https://img.shields.io/badge/dsh--plugin-✅-green)](https://github.com/topics/dsh-plugin)
12
13
  [![dsh-doctor](https://raw.githubusercontent.com/PerryLink/dsh-plugin-doctor/main/badges/PerryLink__dsh-observe.svg)](https://github.com/PerryLink/dsh-plugin-doctor#verified-徽章)
13
14
  [![Node](https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-brightgreen.svg)](#)
@@ -26,7 +27,7 @@
26
27
 
27
28
  | सतह | स्थिति |
28
29
  |---|---|
29
- | Harness | DeepSeek Harness `dsh-v0.1.5-rc.2` (2026-09-09 को अनुकूलित): सत्र प्रारूप V3 सहायक स्ट्रीम को `assistant/message` / `assistant/attempt` में एम्बेड करता है और सिस्टम प्रॉम्प्ट को सरफ़ेस नोड 0 (`system/message`) के रूप में रखता है; प्लगइन केवल लाइव इवेंट स्ट्रीम पढ़ता है और कभी सत्र लॉग फ़ाइलें नहीं पढ़ता। 2026-09-11 को dsh-v0.1.5-rc.2 tag के विरुद्ध सत्यापित (स्थानीय पूर्ण गेट श्रृंखला; प्रोफ़ाइल इंस्टॉल स्मोक मासिक compat वर्कफ़्लो कवर करता है)। |
30
+ | Harness | DeepSeek Harness `dsh-v0.1.6-alpha.2` (2026-09-18 को अनुकूलित): सत्र प्रारूप V3 सहायक स्ट्रीम को `assistant/message` / `assistant/attempt` में एम्बेड करता है और सिस्टम प्रॉम्प्ट को सरफ़ेस नोड 0 (`system/message`) के रूप में रखता है; प्लगइन केवल लाइव इवेंट स्ट्रीम पढ़ता है और कभी सत्र लॉग फ़ाइलें नहीं पढ़ता। peer रेंज `>=0.1.2-rc.1 <0.2.0 \|\| >=0.1.5-alpha.1 <0.2.0 \|\| >=0.1.6-0 <0.2.0` हर प्रकाशित लाइन को इंस्टॉल-योग्य रखती है (स्थानीय पूर्ण गेट श्रृंखला; प्रोफ़ाइल इंस्टॉल स्मोक compat वर्कफ़्लो कवर करता है)। |
30
31
  | Node | `^22.19.0 \|\| >=24.0.0` |
31
32
  | बैकएंड | OpenTelemetry OTLP/HTTP (traces + metrics, JSON एन्कोडिंग) और Langfuse (LLM ऑब्ज़र्वेबिलिटी) — एक या दोनों |
32
33
  | मॉडल | मॉडल-स्वतंत्र: यह `session/event` स्ट्रीम निर्यात करता है; कोई मॉडल कॉल नहीं करता |
@@ -170,7 +171,8 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-observe'
170
171
 
171
172
  ## Known limitations
172
173
 
173
- - **npm 0.1.5-rc.2** — प्लगइन `@deepseek-ai/dsh@0.1.5-rc.2` के विरुद्ध विकसित और परीक्षित है (devDeps और CI इसी पर पिन); peer रेंज `>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0` प्रकाशित rc.1 लाइन को इंस्टॉल-योग्य रखती है, और मासिक compat वर्कफ़्लो नए बेसलाइन कवर करता है।
174
+ - **npm 0.1.6-alpha.2** — प्लगइन `@deepseek-ai/dsh@0.1.6-alpha.2` के विरुद्ध विकसित और परीक्षित है (devDeps और CI की मुख्य रूलर); peer रेंज `>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0` हर प्रकाशित लाइन को इंस्टॉल-योग्य रखती है, और दूसरी रूलर (`typecheck:ci`) तथा compat वर्कफ़्लो पुराने बेसलाइन कवर करते हैं।
175
+ - **ऑडिट इवेंट्स संग्रहीत नहीं होते** — एक्सपोर्टर के स्वयं के `observe/*` रिकॉर्ड केवल ऑडिट के लिए हैं: वर्तमान होस्ट लाइन पर सत्र append गेट केवल सरफ़ेस इवेंट स्वीकार करता है, इसलिए कोई `observe/*` इवेंट सत्र लॉग में नहीं लिखा जाता, और प्लगइन बिना मार्क के append से इसे नकली नहीं बनाता (इससे सत्र अपठनीय हो जाते)। ऑडिट सतह के लिए `/observe` स्टेटस आउटपुट और OTLP/Langfuse बैकएंड देखें।
174
176
  - **मेट्रिक्स पुनर्प्रयास/spool पथ से बचती हैं** — OTLP मेट्रिक्स संचयी रूप से एकत्र होती हैं, इसलिए खोया flush अगले में स्वयं-सुधर जाता है (डिज़ाइन से, बग नहीं)।
175
177
  - **कोई सैंपलिंग नहीं** — हर सक्षम span परिवार निर्यात होता है; उच्च-मात्रा सत्रों के लिए `capture.*` स्विच और `batch.maxBufferRecords` समायोजित करें।
176
178
 
@@ -178,9 +180,10 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-observe'
178
180
 
179
181
  ```sh
180
182
  pnpm install # node ^22.19 || >=24
181
- pnpm run typecheck # tsc: src + tests पिन किए 0.1.5-rc.2 devDeps के विरुद्ध (कोई tsconfig paths नहीं)
182
- pnpm run typecheck:ci # tsc प्रकाशित 0.1.5-rc.2 प्रकारों के विरुद्ध (बिना paths)
183
- pnpm test # vitest: 124 टेस्ट, 18 सुइट (वास्तविक Context/Session/storage seam)
183
+ pnpm run typecheck # tsc: src + tests 0.1.6-alpha.2 devDeps के विरुद्ध (कोई tsconfig paths नहीं)
184
+ pnpm run typecheck:ci # tsc प्रकाशित लाइन के विरुद्ध (बिना paths)
185
+ pnpm run check:ruler-live # कैनरी: कंपाइल विफल होना चाहिए, यह सिद्ध करते हुए कि रूलर जीवित है
186
+ pnpm test # vitest: 126 टेस्ट, 18 सुइट (वास्तविक Context/Session/storage seam)
184
187
  pnpm run test:coverage # कवरेज द्वार (90/80/90/90)
185
188
  pnpm run build # tsdown बंडल + tsc घोषणाएँ (lib/)
186
189
  pnpm run verify:self-contained # निर्भरता स्पेक registry से हल होती हैं
@@ -199,7 +202,7 @@ pnpm pack # प्रकाशित tarball
199
202
 
200
203
  ## PerryLink DSH Plugin Family
201
204
 
202
- यह प्रोजेक्ट [PerryLink](https://github.com/PerryLink) द्वारा अनुरक्षित [37 DeepSeek Harness प्लगइनों](https://github.com/PerryLink) में से एक है। अगर यह आपकी मदद करता है, तो बाकी भी करेंगे:
205
+ यह प्रोजेक्ट [PerryLink](https://github.com/PerryLink) द्वारा अनुरक्षित [40 DeepSeek Harness प्लगइनों](https://github.com/PerryLink) में से एक है। अगर यह आपकी मदद करता है, तो बाकी भी करेंगे:
203
206
 
204
207
  | Plugin | One-liner |
205
208
  |---|---|
@@ -228,6 +231,7 @@ pnpm pack # प्रकाशित tarball
228
231
  | **[dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules)** | ऑडिट के साथ Claude Code-शैली घोषणात्मक allow/deny/ask अनुमति नियम | |
229
232
  | **[dsh-personal-directive](https://github.com/PerryLink/dsh-personal-directive)** | शीर्ष-बार टॉगल के साथ व्यक्तिगत निर्देश इंजेक्टर (फ्रेमवर्क संस्करण) |
230
233
  | **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | माँग पर एजेंट कौशल के रूप में प्लगइन-विकास ज्ञान आधार | |
234
+ | **[dsh-plugin-doctor](https://github.com/PerryLink/dsh-plugin-doctor)** | Zero-dependency static + sandbox smoke detector for DSH plugins | |
231
235
  | **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | मल्टी-चैनल अनुमोदन/प्रश्न ब्रिज: WeChat/Telegram/Feishu, सत्र कंसोल |
232
236
  | **[dsh-research-report](https://github.com/PerryLink/dsh-research-report)** | सामग्री-पता साक्ष्य और सीलबंद संस्करणों वाला सत्यापन-योग्य अनुसंधान-रिपोर्ट इंजन | |
233
237
  | **[dsh-score](https://github.com/PerryLink/dsh-score)** | DeepSeek Harness प्लगिनों की बहु-आयामी गुणवत्ता स्कोरिंग। | |
@@ -238,7 +242,16 @@ pnpm pack # प्रकाशित tarball
238
242
  | **[dsh-test-drive](https://github.com/PerryLink/dsh-test-drive)** | DeepSeek Harness प्लगिनों के लिए पृथक इंस्टॉल-एंड-स्मोक टेस्ट ड्राइव। | |
239
243
  | **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | TickTick/Dida365 कार्य ब्रिज: सत्र-हेडर पैनल + 11 टूल |
240
244
  | **[dsh-translate](https://github.com/PerryLink/dsh-translate)** | DeepSeek Harness के लिए वेंडर पैरामीटर अनुवाद और नियतात्मक JSON मरम्मत। | |
241
- | **[dsh-wechat](https://github.com/PerryLink/dsh-wechat)** | WeChat ↔ DSH ब्रिज (Tencent iLink bot): टेक्स्ट/इमेज/फ़ाइल/आवाज़, चैट में अनुमोदन |
245
+ | **[dsh-wechat](https://github.com/pan17/dsh-wechat)** | WeChat ↔ DSH ब्रिज (Tencent iLink bot): टेक्स्ट/इमेज/फ़ाइल/आवाज़, चैट में अनुमोदन |
246
+ | **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | Automatic strong/cheap model-tier routing with deterministic risk guards and a `/tier` command | |
247
+ | **[dsh-catalog](https://github.com/PerryLink/dsh-catalog)** | DSH Desktop Market standard catalog source for the PerryLink family | |
248
+ | **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | Read-only MCP server exposing the certification registry: grades, snapshots and five-dimension evidence | |
249
+ | **[dsh-kit](https://github.com/PerryLink/dsh-kit)** | One-command starter pack that installs the core family | |
250
+ | **[dsh-plugin-certification](https://github.com/PerryLink/dsh-plugin-certification)** | Community certification registry with repro-checkable grades and badges | |
251
+ | **[dsh-plugin-kit](https://github.com/PerryLink/dsh-plugin-kit)** | Shared zero-runtime-dependency toolkit for the PerryLink DSH plugins | |
252
+ | **[dsh-plugin-portal](https://github.com/PerryLink/dsh-plugin-portal)** | Zero-dependency static portal rendering the whole plugin family as one page | |
253
+ | **[dsh-plugin-upgrade-015](https://github.com/PerryLink/dsh-plugin-upgrade-015)** | Merged `0.1.3-alpha.1` → `0.1.5-rc.1` upgrade corridor card plus a zero-dependency seam scanner | |
254
+ | **[dsh-team-rooms](https://github.com/PerryLink/dsh-team-rooms)** | Cross-session team rooms: shared message bus, task board and timeline | |
242
255
 
243
256
  ## License
244
257
 
package/README-pt.md CHANGED
@@ -8,6 +8,7 @@
8
8
  *Transforme eventos de sessão em traces OTLP e observações Langfuse — saneados, com buffer e desligados por padrão.*
9
9
 
10
10
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
11
+ [![Gitee](https://img.shields.io/badge/Gitee-mirror-c71d23?logo=gitee)](https://gitee.com/perrylink/dsh-observe)
11
12
  [![DSH plugin](https://img.shields.io/badge/dsh--plugin-✅-green)](https://github.com/topics/dsh-plugin)
12
13
  [![dsh-doctor](https://raw.githubusercontent.com/PerryLink/dsh-plugin-doctor/main/badges/PerryLink__dsh-observe.svg)](https://github.com/PerryLink/dsh-plugin-doctor#verified-徽章)
13
14
  [![Node](https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-brightgreen.svg)](#)
@@ -26,7 +27,7 @@
26
27
 
27
28
  | Superfície | Status |
28
29
  |---|---|
29
- | Harness | DeepSeek Harness `dsh-v0.1.5-rc.2` (adaptado em 2026-09-09): o formato de sessão V3 embute o fluxo do assistente em `assistant/message` / `assistant/attempt` e representa o prompt de sistema como nó 0 da superfície (`system/message`); o plugin consome apenas o fluxo de eventos ao vivo e nunca lê arquivos de log de sessão. Verificado em 2026-09-11 contra a tag dsh-v0.1.5-rc.2 (cadeia completa de portas local; o workflow compat mensal cobre o smoke de instalação de perfil). |
30
+ | Harness | DeepSeek Harness `dsh-v0.1.6-alpha.2` (adaptado em 2026-09-18): o formato de sessão V3 embute o fluxo do assistente em `assistant/message` / `assistant/attempt` e representa o prompt de sistema como nó 0 da superfície (`system/message`); o plugin consome apenas o fluxo de eventos ao vivo e nunca lê arquivos de log de sessão. O intervalo de peers `>=0.1.2-rc.1 <0.2.0 \|\| >=0.1.5-alpha.1 <0.2.0 \|\| >=0.1.6-0 <0.2.0` mantém cada linha publicada instalável (cadeia completa de portas local; o workflow compat cobre o smoke de instalação de perfil). |
30
31
  | Node | `^22.19.0 \|\| >=24.0.0` |
31
32
  | Backends | OpenTelemetry OTLP/HTTP (traces + metrics, codificação JSON) e Langfuse (observabilidade de LLM) — um ou ambos |
32
33
  | Modelo | Independente de modelo: exporta o fluxo `session/event`; não faz chamadas a modelos |
@@ -170,7 +171,8 @@ Este plugin **não registra ferramentas de modelo** — é um exportador em segu
170
171
 
171
172
  ## Known limitations
172
173
 
173
- - **npm 0.1.5-rc.2** — o plugin é desenvolvido e testado contra `@deepseek-ai/dsh@0.1.5-rc.2` (devDeps e CI fixados); o intervalo de peers `>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0` mantém a linha rc.1 publicada instalável, e o workflow compat mensal cobre baselines mais novos.
174
+ - **npm 0.1.6-alpha.2** — o plugin é desenvolvido e testado contra `@deepseek-ai/dsh@0.1.6-alpha.2` (devDeps e a régua primária do CI); o intervalo de peers `>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0` mantém cada linha publicada instalável, e a segunda régua (`typecheck:ci`) mais o workflow compat cobrem os baselines antigos.
175
+ - **Eventos de auditoria não são persistidos** — os registros `observe/*` do próprio exportador são apenas de auditoria: na linha de host atual o portão de append da sessão admite eventos de superfície, então nenhum evento `observe/*` é gravado no log da sessão, e o plugin não o falsifica com um append sem marcação (isso tornaria as sessões ilegíveis). Use a saída de status do `/observe` e os backends OTLP/Langfuse como superfície de auditoria.
174
176
  - **Métricas evitam o caminho de tentativa/spool** — as métricas OTLP são agregadas cumulativamente, então um flush perdido se autocura no seguinte (por design, não é um bug).
175
177
  - **Sem amostragem** — toda família de spans habilitada é exportada; ajuste os interruptores `capture.*` e `batch.maxBufferRecords` para sessões de alto volume.
176
178
 
@@ -178,9 +180,10 @@ Este plugin **não registra ferramentas de modelo** — é um exportador em segu
178
180
 
179
181
  ```sh
180
182
  pnpm install # node ^22.19 || >=24
181
- pnpm run typecheck # tsc: src + tests contra os devDeps fixados 0.1.5-rc.2 (sem tsconfig paths)
182
- pnpm run typecheck:ci # tsc contra os tipos publicados 0.1.5-rc.2 (sem paths)
183
- pnpm test # vitest: 124 testes, 18 suítes (Context/Session/storage seam reais)
183
+ pnpm run typecheck # tsc: src + tests contra os devDeps 0.1.6-alpha.2 (sem tsconfig paths)
184
+ pnpm run typecheck:ci # tsc contra a linha publicada (sem paths)
185
+ pnpm run check:ruler-live # canário: deve falhar ao compilar, provando que a régua segue viva
186
+ pnpm test # vitest: 126 testes, 18 suítes (Context/Session/storage seam reais)
184
187
  pnpm run test:coverage # porta de cobertura (90/80/90/90)
185
188
  pnpm run build # bundle tsdown + declarações tsc (lib/)
186
189
  pnpm run verify:self-contained # as especificações de dependências resolvem pelo registry
@@ -199,7 +202,7 @@ pnpm pack # o tarball publicado
199
202
 
200
203
  ## PerryLink DSH Plugin Family
201
204
 
202
- Este projeto é um dos [37 plugins de DeepSeek Harness](https://github.com/PerryLink) mantidos por [PerryLink](https://github.com/PerryLink). Se este ajuda você, os outros provavelmente também:
205
+ Este projeto é um dos [40 plugins de DeepSeek Harness](https://github.com/PerryLink) mantidos por [PerryLink](https://github.com/PerryLink). Se este ajuda você, os outros provavelmente também:
203
206
 
204
207
  | Plugin | One-liner |
205
208
  |---|---|
@@ -228,6 +231,7 @@ Este projeto é um dos [37 plugins de DeepSeek Harness](https://github.com/Perry
228
231
  | **[dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules)** | Regras de permissão declarativas allow/deny/ask estilo Claude Code com auditoria | |
229
232
  | **[dsh-personal-directive](https://github.com/PerryLink/dsh-personal-directive)** | Injetor de diretivas pessoais com alternância na barra superior (edição framework) |
230
233
  | **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | Base de conhecimento de desenvolvimento de plugins como habilidade de agente sob demanda | |
234
+ | **[dsh-plugin-doctor](https://github.com/PerryLink/dsh-plugin-doctor)** | Zero-dependency static + sandbox smoke detector for DSH plugins | |
231
235
  | **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | Ponte multicanal de aprovação/perguntas: WeChat/Telegram/Feishu, console de sessão |
232
236
  | **[dsh-research-report](https://github.com/PerryLink/dsh-research-report)** | Motor de relatórios de pesquisa verificáveis com evidência endereçada por conteúdo | |
233
237
  | **[dsh-score](https://github.com/PerryLink/dsh-score)** | Pontuação de qualidade multidimensional para plugins de DeepSeek Harness. | |
@@ -238,7 +242,16 @@ Este projeto é um dos [37 plugins de DeepSeek Harness](https://github.com/Perry
238
242
  | **[dsh-test-drive](https://github.com/PerryLink/dsh-test-drive)** | Test drives isolados de instalação e smoke para plugins de DeepSeek Harness. | |
239
243
  | **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | Ponte de tarefas TickTick/Dida365: painel no cabeçalho da sessão + 11 ferramentas |
240
244
  | **[dsh-translate](https://github.com/PerryLink/dsh-translate)** | Tradução de parâmetros entre fornecedores e reparo determinístico de JSON para DeepSeek Harness. | |
241
- | **[dsh-wechat](https://github.com/PerryLink/dsh-wechat)** | Ponte WeChat ↔ DSH (bot Tencent iLink): texto/imagem/arquivo/voz, aprovações no chat |
245
+ | **[dsh-wechat](https://github.com/pan17/dsh-wechat)** | Ponte WeChat ↔ DSH (bot Tencent iLink): texto/imagem/arquivo/voz, aprovações no chat |
246
+ | **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | Automatic strong/cheap model-tier routing with deterministic risk guards and a `/tier` command | |
247
+ | **[dsh-catalog](https://github.com/PerryLink/dsh-catalog)** | DSH Desktop Market standard catalog source for the PerryLink family | |
248
+ | **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | Read-only MCP server exposing the certification registry: grades, snapshots and five-dimension evidence | |
249
+ | **[dsh-kit](https://github.com/PerryLink/dsh-kit)** | One-command starter pack that installs the core family | |
250
+ | **[dsh-plugin-certification](https://github.com/PerryLink/dsh-plugin-certification)** | Community certification registry with repro-checkable grades and badges | |
251
+ | **[dsh-plugin-kit](https://github.com/PerryLink/dsh-plugin-kit)** | Shared zero-runtime-dependency toolkit for the PerryLink DSH plugins | |
252
+ | **[dsh-plugin-portal](https://github.com/PerryLink/dsh-plugin-portal)** | Zero-dependency static portal rendering the whole plugin family as one page | |
253
+ | **[dsh-plugin-upgrade-015](https://github.com/PerryLink/dsh-plugin-upgrade-015)** | Merged `0.1.3-alpha.1` → `0.1.5-rc.1` upgrade corridor card plus a zero-dependency seam scanner | |
254
+ | **[dsh-team-rooms](https://github.com/PerryLink/dsh-team-rooms)** | Cross-session team rooms: shared message bus, task board and timeline | |
242
255
 
243
256
  ## License
244
257
 
package/README-zh.md CHANGED
@@ -8,6 +8,7 @@
8
8
  *把会话事件变成 OTLP 追踪与 Langfuse 观测 —— 脱敏、缓冲、默认关闭。*
9
9
 
10
10
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
11
+ [![Gitee](https://img.shields.io/badge/Gitee-mirror-c71d23?logo=gitee)](https://gitee.com/perrylink/dsh-observe)
11
12
  [![DSH plugin](https://img.shields.io/badge/dsh--plugin-✅-green)](https://github.com/topics/dsh-plugin)
12
13
  [![dsh-doctor](https://raw.githubusercontent.com/PerryLink/dsh-plugin-doctor/main/badges/PerryLink__dsh-observe.svg)](https://github.com/PerryLink/dsh-plugin-doctor#verified-徽章)
13
14
  [![Node](https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-brightgreen.svg)](#)
@@ -26,7 +27,7 @@
26
27
 
27
28
  | 方面 | 状态 |
28
29
  |---|---|
29
- | Harness | DeepSeek Harness `dsh-v0.1.5-rc.2`(2026-09-09 已适配):会话格式 V3 把助手流内嵌到 `assistant/message` / `assistant/attempt`,系统提示词成为 surface 节点 0(`system/message`);本插件只消费实时事件流,从不读取会话日志文件。已于 2026-09-11 对照 dsh-v0.1.5-rc.2 tag 核验(本地完整门禁链;profile 安装冒烟由月度 compat 工作流覆盖)。 |
30
+ | Harness | DeepSeek Harness `dsh-v0.1.6-alpha.2`(2026-09-18 已适配):会话格式 V3 把助手流内嵌到 `assistant/message` / `assistant/attempt`,系统提示词成为 surface 节点 0(`system/message`);本插件只消费实时事件流,从不读取会话日志文件。peer 复合范围 `>=0.1.2-rc.1 <0.2.0 \|\| >=0.1.5-alpha.1 <0.2.0 \|\| >=0.1.6-0 <0.2.0` 保持每条已发布线可安装(本地完整门禁链;profile 安装冒烟由 compat 工作流覆盖)。 |
30
31
  | Node | `^22.19.0 \|\| >=24.0.0` |
31
32
  | 后端 | OpenTelemetry OTLP/HTTP(traces + metrics,JSON 编码)与 Langfuse(LLM 可观测)——二选一或同时 |
32
33
  | 模型 | 与模型无关:它导出 session/event 流,自身不调用任何模型 |
@@ -170,7 +171,8 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-observe'
170
171
 
171
172
  ## Known limitations
172
173
 
173
- - **npm 0.1.5-rc.2** —— 插件针对 `@deepseek-ai/dsh@0.1.5-rc.2` 开发与测试(devDeps 与 CI 均钉此版本);peer 复合范围 `>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0` 保持已发布的 rc.1 线可安装,更新的 harness 基线由月度 compat 工作流验证。
174
+ - **npm 0.1.6-alpha.2** —— 插件针对 `@deepseek-ai/dsh@0.1.6-alpha.2` 开发与测试(devDeps 与 CI 主尺子);peer 复合范围 `>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0` 保持每条已发布线可安装,旧基线与第二把尺子(`typecheck:ci`)及 compat 工作流共同覆盖。
175
+ - **审计事件不落盘** —— 本插件自身的 `observe/*` 记录仅作审计:当前宿主线的会话 append 闸门只接纳 surface 事件,因此不会有 `observe/*` 事件写入会话日志;插件也不会用未标记 append 伪造一条(那会让会话不可读)。审计面请以 `/observe` 状态输出与 OTLP/Langfuse 后端为准。
174
176
  - **Metrics 不走重试/缓冲路径** —— OTLP metrics 按累计聚合,丢失一次 flush 会在下一次自愈(设计如此,非缺陷)。
175
177
  - **无采样** —— 每个启用的 span 族都会导出;大流量会话请调整 `capture.*` 开关与 `batch.maxBufferRecords`。
176
178
 
@@ -178,9 +180,10 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-observe'
178
180
 
179
181
  ```sh
180
182
  pnpm install # node ^22.19 || >=24
181
- pnpm run typecheck # tsc:src + tests,对照钉定的 0.1.5-rc.2 devDeps(无 tsconfig paths)
182
- pnpm run typecheck:ci # tsc:对照已发布的 0.1.5-rc.2 类型(无 paths)
183
- pnpm test # vitest:124 个测试、18 个套件(真实 Context/Session/storage 接缝)
183
+ pnpm run typecheck # tsc:src + tests,对照 0.1.6-alpha.2 devDeps(无 tsconfig paths)
184
+ pnpm run typecheck:ci # tsc:对照已发布线(无 paths)
185
+ pnpm run check:ruler-live # canary:必须编译失败,以证明尺子仍是活的
186
+ pnpm test # vitest:126 个测试、18 个套件(真实 Context/Session/storage 接缝)
184
187
  pnpm run test:coverage # 覆盖率门禁(90/80/90/90)
185
188
  pnpm run build # tsdown bundle + tsc 声明(lib/)
186
189
  pnpm run verify:self-contained # 依赖声明全部来自 registry
@@ -199,7 +202,7 @@ pnpm pack # 发布用 tarball
199
202
 
200
203
  ## PerryLink DSH Plugin Family
201
204
 
202
- 这是 [PerryLink](https://github.com/PerryLink) 维护的 [37 个 DeepSeek Harness 插件](https://github.com/PerryLink) 之一。如果它能帮到你,其他的也会:
205
+ 这是 [PerryLink](https://github.com/PerryLink) 维护的 [40 个 DeepSeek Harness 插件](https://github.com/PerryLink) 之一。如果它能帮到你,其他的也会:
203
206
 
204
207
  | Plugin | One-liner |
205
208
  |---|---|
@@ -228,6 +231,7 @@ pnpm pack # 发布用 tarball
228
231
  | **[dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules)** | Claude Code 风格声明式 allow/deny/ask 权限规则,带审计 | |
229
232
  | **[dsh-personal-directive](https://github.com/PerryLink/dsh-personal-directive)** | 个人指令注入器:顶栏开关(框架版) |
230
233
  | **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | 作为按需代理技能的插件开发知识库 | |
234
+ | **[dsh-plugin-doctor](https://github.com/PerryLink/dsh-plugin-doctor)** | Zero-dependency static + sandbox smoke detector for DSH plugins | |
231
235
  | **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | 多渠道审批/提问桥接:微信/Telegram/飞书,会话控制台 |
232
236
  | **[dsh-research-report](https://github.com/PerryLink/dsh-research-report)** | 可验证研究报告引擎:内容寻址证据账本与封存版本 | |
233
237
  | **[dsh-score](https://github.com/PerryLink/dsh-score)** | DeepSeek Harness 插件的多维质量评分。 | |
@@ -238,7 +242,16 @@ pnpm pack # 发布用 tarball
238
242
  | **[dsh-test-drive](https://github.com/PerryLink/dsh-test-drive)** | DeepSeek Harness 插件的隔离试装冒烟。 | |
239
243
  | **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | TickTick/滴答清单任务桥接:会话头面板 + 11 个工具 |
240
244
  | **[dsh-translate](https://github.com/PerryLink/dsh-translate)** | DeepSeek Harness 的厂商参数翻译与确定性 JSON 修复。 | |
241
- | **[dsh-wechat](https://github.com/PerryLink/dsh-wechat)** | 微信 ↔ DSH 桥接(Tencent iLink 机器人):文本/图片/文件/语音,聊天内审批卡片 |
245
+ | **[dsh-wechat](https://github.com/pan17/dsh-wechat)** | 微信 ↔ DSH 桥接(Tencent iLink 机器人):文本/图片/文件/语音,聊天内审批卡片 |
246
+ | **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | Automatic strong/cheap model-tier routing with deterministic risk guards and a `/tier` command | |
247
+ | **[dsh-catalog](https://github.com/PerryLink/dsh-catalog)** | DSH Desktop Market standard catalog source for the PerryLink family | |
248
+ | **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | Read-only MCP server exposing the certification registry: grades, snapshots and five-dimension evidence | |
249
+ | **[dsh-kit](https://github.com/PerryLink/dsh-kit)** | One-command starter pack that installs the core family | |
250
+ | **[dsh-plugin-certification](https://github.com/PerryLink/dsh-plugin-certification)** | Community certification registry with repro-checkable grades and badges | |
251
+ | **[dsh-plugin-kit](https://github.com/PerryLink/dsh-plugin-kit)** | Shared zero-runtime-dependency toolkit for the PerryLink DSH plugins | |
252
+ | **[dsh-plugin-portal](https://github.com/PerryLink/dsh-plugin-portal)** | Zero-dependency static portal rendering the whole plugin family as one page | |
253
+ | **[dsh-plugin-upgrade-015](https://github.com/PerryLink/dsh-plugin-upgrade-015)** | Merged `0.1.3-alpha.1` → `0.1.5-rc.1` upgrade corridor card plus a zero-dependency seam scanner | |
254
+ | **[dsh-team-rooms](https://github.com/PerryLink/dsh-team-rooms)** | Cross-session team rooms: shared message bus, task board and timeline | |
242
255
 
243
256
  ## License
244
257
 
package/README.md CHANGED
@@ -27,7 +27,7 @@
27
27
 
28
28
  | Surface | Status |
29
29
  |---|---|
30
- | Harness | DeepSeek Harness `dsh-v0.1.5-rc.2` (adapted 2026-09-09): session format V3 embeds the assistant stream in `assistant/message` / `assistant/attempt` and represents the system prompt as surface node 0 (`system/message`); the plugin consumes only the live event stream and never reads session log files. Verified 2026-09-11 against the dsh-v0.1.5-rc.2 tag (full local gate chain; the monthly compat workflow covers the profile install smoke). |
30
+ | Harness | DeepSeek Harness `dsh-v0.1.6-alpha.2` (adapted 2026-09-18): session format V3 embeds the assistant stream in `assistant/message` / `assistant/attempt` and represents the system prompt as surface node 0 (`system/message`); the plugin consumes only the live event stream and never reads session log files. The peer range `>=0.1.2-rc.1 <0.2.0 \|\| >=0.1.5-alpha.1 <0.2.0 \|\| >=0.1.6-0 <0.2.0` keeps every published line installable (full local gate chain; the compat workflow covers the profile install smoke). |
31
31
  | Node | `^22.19.0 \|\| >=24.0.0` |
32
32
  | Backends | OpenTelemetry OTLP/HTTP (traces + metrics, JSON encoding) and Langfuse (LLM observability) — either or both |
33
33
  | Model | Model-agnostic: it exports the session/event stream; no model calls are made |
@@ -171,7 +171,8 @@ This plugin registers **no model tools** — it is a background exporter. Its su
171
171
 
172
172
  ## Known limitations
173
173
 
174
- - **npm 0.1.5-rc.2** — the plugin is developed and tested against `@deepseek-ai/dsh@0.1.5-rc.2` (devDeps and CI pinned); the peer range `>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0` keeps the published rc.1 line installable, and the monthly compat workflow covers newer baselines.
174
+ - **npm 0.1.6-alpha.2** — the plugin is developed and tested against `@deepseek-ai/dsh@0.1.6-alpha.2` (devDeps and CI's primary ruler); the peer range `>=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0` keeps every published line installable, and the second ruler (`typecheck:ci`) plus the compat workflow cover the older baselines.
175
+ - **Audit events are not persisted** — the exporter's own `observe/*` records are audit-only: on the current host line the session append gate admits surface events, so no `observe/*` event is written to the session log, and the plugin does not fake one with an unmarked append (that would make sessions unreadable). Treat `/observe` status output and the OTLP/Langfuse backends as the audit surface.
175
176
  - **Metrics bypass the retry/spool path** — OTLP metrics are aggregated cumulatively, so a lost flush self-heals on the next one (by design, not a bug).
176
177
  - **No sampling** — every enabled span family is exported; set `capture.*` switches and `batch.maxBufferRecords` for high-volume sessions.
177
178
 
@@ -179,9 +180,10 @@ This plugin registers **no model tools** — it is a background exporter. Its su
179
180
 
180
181
  ```sh
181
182
  pnpm install # node ^22.19 || >=24
182
- pnpm run typecheck # tsc: src + tests against the pinned 0.1.5-rc.2 devDeps (no tsconfig paths)
183
- pnpm run typecheck:ci # tsc against the published 0.1.5-rc.2 types (no paths)
184
- pnpm test # vitest: 124 tests, 18 suites (real Context/Session/storage seam)
183
+ pnpm run typecheck # tsc: src + tests against the 0.1.6-alpha.2 devDeps (no tsconfig paths)
184
+ pnpm run typecheck:ci # tsc against the published line (no paths)
185
+ pnpm run check:ruler-live # canary: must fail to compile, proving the ruler is live
186
+ pnpm test # vitest: 126 tests, 18 suites (real Context/Session/storage seam)
185
187
  pnpm run test:coverage # coverage gate (90/80/90/90)
186
188
  pnpm run build # tsdown bundle + tsc declarations (lib/)
187
189
  pnpm run verify:self-contained # dependency specs resolve from the registry
@@ -200,7 +202,7 @@ pnpm pack # the published tarball
200
202
 
201
203
  ## PerryLink DSH Plugin Family
202
204
 
203
- This project is one of the [37 DeepSeek Harness plugins](https://github.com/PerryLink) maintained by [PerryLink](https://github.com/PerryLink). If this one helps you, the others likely will too:
205
+ This project is one of the [40 DeepSeek Harness plugins](https://github.com/PerryLink) maintained by [PerryLink](https://github.com/PerryLink). If this one helps you, the others likely will too:
204
206
 
205
207
  | Plugin | One-liner |
206
208
  |---|---|
@@ -229,6 +231,7 @@ This project is one of the [37 DeepSeek Harness plugins](https://github.com/Perr
229
231
  | **[dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules)** | Claude Code-style declarative allow/deny/ask permission rules with audit | |
230
232
  | **[dsh-personal-directive](https://github.com/PerryLink/dsh-personal-directive)** | Personal directive injector with top-bar toggle (framework edition) |
231
233
  | **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | Plugin-development knowledge base as an on-demand agent skill | |
234
+ | **[dsh-plugin-doctor](https://github.com/PerryLink/dsh-plugin-doctor)** | Zero-dependency static + sandbox smoke detector for DSH plugins | |
232
235
  | **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | Multi-channel approval/question bridge: WeChat/Telegram/Feishu, session console |
233
236
  | **[dsh-research-report](https://github.com/PerryLink/dsh-research-report)** | Verifiable research-report engine: content-addressed evidence ledger and sealed versions | |
234
237
  | **[dsh-score](https://github.com/PerryLink/dsh-score)** | Multi-dimensional quality scoring for DeepSeek Harness plugins. | |
@@ -239,7 +242,16 @@ This project is one of the [37 DeepSeek Harness plugins](https://github.com/Perr
239
242
  | **[dsh-test-drive](https://github.com/PerryLink/dsh-test-drive)** | Isolated install-and-smoke test drives for DeepSeek Harness plugins. | |
240
243
  | **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | TickTick/Dida365 task bridge: session-header panel + 11 tools |
241
244
  | **[dsh-translate](https://github.com/PerryLink/dsh-translate)** | Vendor parameter translation and deterministic JSON repair for DeepSeek Harness. | |
242
- | **[dsh-wechat](https://github.com/PerryLink/dsh-wechat)** | WeChat ↔ DSH bridge (Tencent iLink bot): text/image/file/voice, approvals in chat |
245
+ | **[dsh-wechat](https://github.com/pan17/dsh-wechat)** | WeChat ↔ DSH bridge (Tencent iLink bot): text/image/file/voice, approvals in chat |
246
+ | **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | Automatic strong/cheap model-tier routing with deterministic risk guards and a `/tier` command | |
247
+ | **[dsh-catalog](https://github.com/PerryLink/dsh-catalog)** | DSH Desktop Market standard catalog source for the PerryLink family | |
248
+ | **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | Read-only MCP server exposing the certification registry: grades, snapshots and five-dimension evidence | |
249
+ | **[dsh-kit](https://github.com/PerryLink/dsh-kit)** | One-command starter pack that installs the core family | |
250
+ | **[dsh-plugin-certification](https://github.com/PerryLink/dsh-plugin-certification)** | Community certification registry with repro-checkable grades and badges | |
251
+ | **[dsh-plugin-kit](https://github.com/PerryLink/dsh-plugin-kit)** | Shared zero-runtime-dependency toolkit for the PerryLink DSH plugins | |
252
+ | **[dsh-plugin-portal](https://github.com/PerryLink/dsh-plugin-portal)** | Zero-dependency static portal rendering the whole plugin family as one page | |
253
+ | **[dsh-plugin-upgrade-015](https://github.com/PerryLink/dsh-plugin-upgrade-015)** | Merged `0.1.3-alpha.1` → `0.1.5-rc.1` upgrade corridor card plus a zero-dependency seam scanner | |
254
+ | **[dsh-team-rooms](https://github.com/PerryLink/dsh-team-rooms)** | Cross-session team rooms: shared message bus, task board and timeline | |
243
255
 
244
256
  ### Install from the DSH Desktop Market
245
257
 
package/lib/index.js CHANGED
@@ -2,7 +2,6 @@ import z from "@deepseek-ai/schemastery";
2
2
  import { defineDomain } from "@deepseek-ai/dsh-storage-domain";
3
3
  import { z as z$1 } from "zod";
4
4
  import { createHash } from "node:crypto";
5
- import { deriveEventMessage } from "@deepseek-ai/dsh-session";
6
5
  import { TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
7
6
  //#region src/config.ts
8
7
  /**
@@ -492,6 +491,43 @@ var Spool = class {
492
491
  function openSpool(domain, maxBufferRecords, onDropped, onInvalid) {
493
492
  return new Spool(domain.table("spool"), maxBufferRecords, onDropped, onInvalid);
494
493
  }
494
+ /**
495
+ * The offline buffer's degraded stand-in, used when the storage domain could
496
+ * not be opened at mount (storageDomain is single-open per name, so a hot
497
+ * reload racing the previous instance's close fails the second open).
498
+ * Nothing is persisted and drains are no-ops; the runtime reports the
499
+ * degradation once at mount and keeps exporting in memory.
500
+ */
501
+ var DroppingSpool = class {
502
+ /** Records that would have been spilled into the durable buffer. */
503
+ dropped = 0;
504
+ /** Count the records the durable buffer would have held. */
505
+ async push(_backend, records) {
506
+ this.dropped += records.length;
507
+ }
508
+ /** Nothing is durable, so a drain always finds an empty buffer. */
509
+ peek() {
510
+ return {
511
+ batches: [],
512
+ records: []
513
+ };
514
+ }
515
+ /** No stored batches exist to delete. */
516
+ async remove() {}
517
+ /** Occupancy of a buffer that holds nothing. */
518
+ counts() {
519
+ return {
520
+ otlp: {
521
+ batches: 0,
522
+ records: 0
523
+ },
524
+ langfuse: {
525
+ batches: 0,
526
+ records: 0
527
+ }
528
+ };
529
+ }
530
+ };
495
531
  //#endregion
496
532
  //#region src/ids.ts
497
533
  /**
@@ -571,7 +607,7 @@ function langfuseId(...parts) {
571
607
  * @module dsh-observe/version
572
608
  */
573
609
  /** The dsh-observe package version, kept in sync with package.json. */
574
- const VERSION = "0.2.12";
610
+ const VERSION = "0.2.13";
575
611
  //#endregion
576
612
  //#region src/sinks.ts
577
613
  /** POST a JSON body with a timeout; throws on non-2xx. */
@@ -1848,13 +1884,8 @@ var Collector = class {
1848
1884
  const parts = [];
1849
1885
  const legacySystem = header?.system;
1850
1886
  if (legacySystem !== void 0) parts.push(legacySystem);
1851
- const events = typeof session.snapshotEvents === "function" ? session.snapshotEvents() : session.events;
1852
- for (const seq of session.surface.nodes) {
1853
- const event = events[seq];
1854
- if (event === void 0) continue;
1855
- const message = deriveEventMessage(event);
1856
- if (message !== null) parts.push(projectMessage(message));
1857
- }
1887
+ const derived = typeof session.deriveMessages === "function" ? session.deriveMessages() : void 0;
1888
+ if (derived !== void 0) for (const message of derived) parts.push(projectMessage(message));
1858
1889
  return sanitizeText(parts.join("\n"), this.config.sanitize.truncatePromptChars, this.config.sanitize);
1859
1890
  }
1860
1891
  /** The current provider/model attribution: request context first, then the logged header. */
@@ -1929,19 +1960,39 @@ async function apply(ctx, config = {}) {
1929
1960
  let enabled = true;
1930
1961
  const isEnabled = () => enabled;
1931
1962
  const otlpSink = resolved.otlp === void 0 ? void 0 : new OtlpSink(resolved.otlp, logger);
1963
+ const inspector = ctx.get("inspector");
1964
+ const publishInspector = (topic, payload) => {
1965
+ if (inspector === void 0 || typeof inspector.publish !== "function") return;
1966
+ try {
1967
+ inspector.publish(topic, payload);
1968
+ } catch {}
1969
+ };
1932
1970
  const recordMetric = (metric) => {
1933
- if (isEnabled()) otlpSink?.recordMetric(metric);
1971
+ if (!isEnabled()) return;
1972
+ otlpSink?.recordMetric(metric);
1973
+ publishInspector("observe.metric", metric);
1934
1974
  };
1935
- const domain = await ctx.storageDomain.open(observeDomainSpec);
1936
- const spool = openSpool(domain, resolved.batch.maxBufferRecords, (count) => recordMetric({
1937
- name: "observe.dropped",
1938
- kind: "counter",
1939
- unit: "records",
1940
- value: count,
1941
- attributes: { reason: "buffer_overflow" }
1942
- }), (count) => {
1943
- logger.warn(`spool: ${count} stored record(s) failed validation and were dropped`);
1944
- });
1975
+ let domain;
1976
+ let spool = new DroppingSpool();
1977
+ try {
1978
+ const opened = await ctx.storageDomain.open(observeDomainSpec);
1979
+ if (ctx.fiber.uid === null) {
1980
+ await opened.close();
1981
+ return;
1982
+ }
1983
+ domain = opened;
1984
+ spool = openSpool(opened, resolved.batch.maxBufferRecords, (count) => recordMetric({
1985
+ name: "observe.dropped",
1986
+ kind: "counter",
1987
+ unit: "records",
1988
+ value: count,
1989
+ attributes: { reason: "buffer_overflow" }
1990
+ }), (count) => {
1991
+ logger.warn(`spool: ${count} stored record(s) failed validation and were dropped`);
1992
+ });
1993
+ } catch (error) {
1994
+ logger.warn(`offline buffer unavailable (${error instanceof Error ? error.message : String(error)}); continuing without the durable spool — spilled records are dropped instead of persisted`);
1995
+ }
1945
1996
  const pipelines = [];
1946
1997
  if (otlpSink !== void 0) pipelines.push(new Pipeline({
1947
1998
  name: "otlp",
@@ -1983,30 +2034,33 @@ async function apply(ctx, config = {}) {
1983
2034
  otlpSink.flushMetrics();
1984
2035
  }, resolved.batch.flushIntervalMs)]
1985
2036
  ];
2037
+ const offEvent = ctx.on("session/event", (session, event) => {
2038
+ try {
2039
+ collector.handleEvent(session, event);
2040
+ } catch (error) {
2041
+ logger.warn(`session "${session.id}": event handling failed: ${error instanceof Error ? error.message : String(error)}`);
2042
+ }
2043
+ });
2044
+ const offFlush = ctx.on("session/flush", () => {
2045
+ for (const pipeline of pipelines) pipeline.kick();
2046
+ });
2047
+ const offDisposed = ctx.on("session/disposed", (session) => {
2048
+ try {
2049
+ collector.handleSessionDisposed(session);
2050
+ } catch (error) {
2051
+ logger.warn(`session "${session.id}": disposal handling failed: ${error instanceof Error ? error.message : String(error)}`);
2052
+ }
2053
+ for (const pipeline of pipelines) pipeline.kick();
2054
+ });
1986
2055
  return async () => {
1987
2056
  for (const timer of timers) clearInterval(timer);
2057
+ offEvent();
2058
+ offFlush();
2059
+ offDisposed();
1988
2060
  await Promise.all(pipelines.map((pipeline) => pipeline.dispose()));
1989
- await domain.close();
2061
+ await domain?.close();
1990
2062
  };
1991
2063
  });
1992
- ctx.on("session/event", (session, event) => {
1993
- try {
1994
- collector.handleEvent(session, event);
1995
- } catch (error) {
1996
- logger.warn(`session "${session.id}": event handling failed: ${error instanceof Error ? error.message : String(error)}`);
1997
- }
1998
- });
1999
- ctx.on("session/flush", () => {
2000
- for (const pipeline of pipelines) pipeline.kick();
2001
- });
2002
- ctx.on("session/disposed", (session) => {
2003
- try {
2004
- collector.handleSessionDisposed(session);
2005
- } catch (error) {
2006
- logger.warn(`session "${session.id}": disposal handling failed: ${error instanceof Error ? error.message : String(error)}`);
2007
- }
2008
- for (const pipeline of pipelines) pipeline.kick();
2009
- });
2010
2064
  if (resolved.remote) {
2011
2065
  const depthOf = (backend) => pipelines.find((pipeline) => pipeline.name === backend)?.depth ?? 0;
2012
2066
  await ctx.plugin(observeRemotePlugin({