dsh-observe 0.2.25 → 0.2.27
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 +16 -0
- package/README-es.md +106 -105
- package/README-hi.md +106 -105
- package/README-pt.md +106 -105
- package/README-zh.md +106 -105
- package/README.md +106 -110
- package/lib/index.js +15 -29
- package/lib/typert.host.js +2 -4
- package/lib/types/version.d.ts +1 -1
- package/lib/types/version.js +1 -1
- package/package.json +26 -25
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -56,11 +56,11 @@ OpenTelemetry and Langfuse observability exporter for DeepSeek Harness.
|
|
|
56
56
|
|
|
57
57
|
Turn session events into OTLP traces and Langfuse observations — sanitized, buffered, off by default.
|
|
58
58
|
|
|
59
|
-

|
|
60
|
+
|
|
61
|
+
*Workflow overview: install → open panel → act. The examples below use the real command surface.*
|
|
60
62
|
|
|
61
|
-

|
|
62
63
|
|
|
63
|
-
*The same run, animated.*
|
|
64
64
|
|
|
65
65
|
## Compatibility
|
|
66
66
|
|
|
@@ -128,6 +128,10 @@ Then verify the row mounts:
|
|
|
128
128
|
dsh --profile web --dump-config | grep -A2 'id: dsh-observe'
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
+
### Examples
|
|
132
|
+
|
|
133
|
+
No user-facing command is registered; this plugin runs as a background exporter, configured through its settings.
|
|
134
|
+
|
|
131
135
|
## Configuration
|
|
132
136
|
|
|
133
137
|
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.
|
|
@@ -236,119 +240,111 @@ pnpm pack # the published tarball
|
|
|
236
240
|
|
|
237
241
|
## PerryLink DSH Plugin Family
|
|
238
242
|
|
|
239
|
-
This project is
|
|
243
|
+
This project is part of the DeepSeek Harness plugin family from [PerryLink](https://github.com/PerryLink). The roster stays collapsed below so every README keeps a short first screen; expand it to see every row and its status.
|
|
240
244
|
|
|
241
245
|
<details>
|
|
242
|
-
<summary>Expand all
|
|
246
|
+
<summary>Expand all plugins</summary>
|
|
243
247
|
|
|
244
|
-
| Plugin |
|
|
245
|
-
|
|
246
|
-
| **[dsh-aqua-input-check](https://github.com/PerryLink/dsh-aqua-input-check)** |
|
|
247
|
-
| **[dsh-archive-check](https://github.com/PerryLink/dsh-archive-check)** |
|
|
248
|
-
| **[dsh-auto-review](https://github.com/PerryLink/dsh-auto-review)** |
|
|
249
|
-
| **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** |
|
|
250
|
-
| **[dsh-
|
|
251
|
-
| **[dsh-bid-
|
|
252
|
-
| **[dsh-
|
|
253
|
-
| **[dsh-
|
|
254
|
-
| **[dsh-
|
|
255
|
-
| **[dsh-
|
|
256
|
-
| **[dsh-
|
|
257
|
-
| **[dsh-
|
|
258
|
-
| **[dsh-
|
|
259
|
-
| **[dsh-
|
|
260
|
-
| **[dsh-
|
|
261
|
-
| **[dsh-
|
|
262
|
-
| **[dsh-
|
|
263
|
-
| **[dsh-
|
|
264
|
-
| **[dsh-
|
|
265
|
-
| **[dsh-
|
|
266
|
-
| **[dsh-
|
|
267
|
-
| **[dsh-
|
|
268
|
-
| **[dsh-
|
|
269
|
-
| **[dsh-
|
|
270
|
-
| **[dsh-
|
|
271
|
-
| **[dsh-
|
|
272
|
-
| **[dsh-
|
|
273
|
-
| **[dsh-
|
|
274
|
-
| **[dsh-
|
|
275
|
-
| **[dsh-
|
|
276
|
-
| **[dsh-
|
|
277
|
-
| **[dsh-
|
|
278
|
-
| **[dsh-
|
|
279
|
-
| **[dsh-
|
|
280
|
-
| **[dsh-
|
|
281
|
-
| **[dsh-
|
|
282
|
-
| **[dsh-
|
|
283
|
-
| **[dsh-
|
|
284
|
-
| **[dsh-
|
|
285
|
-
| **[dsh-
|
|
286
|
-
| **[dsh-
|
|
287
|
-
| **[dsh-
|
|
288
|
-
| **[dsh-
|
|
289
|
-
| **[dsh-
|
|
290
|
-
| **[dsh-
|
|
291
|
-
| **[dsh-
|
|
292
|
-
| **[dsh-
|
|
293
|
-
| **[dsh-
|
|
294
|
-
| **[dsh-
|
|
295
|
-
| **[dsh-
|
|
296
|
-
| **[dsh-
|
|
297
|
-
| **[dsh-
|
|
298
|
-
| **[dsh-
|
|
299
|
-
| **[dsh-
|
|
300
|
-
| **[dsh-
|
|
301
|
-
| **[dsh-
|
|
302
|
-
| **[dsh-
|
|
303
|
-
| **[dsh-
|
|
304
|
-
| **[dsh-
|
|
305
|
-
| **[dsh-
|
|
306
|
-
| **[dsh-
|
|
307
|
-
| **[dsh-
|
|
308
|
-
| **[dsh-
|
|
309
|
-
| **[dsh-
|
|
310
|
-
| **[dsh-
|
|
311
|
-
| **[dsh-
|
|
312
|
-
| **[dsh-
|
|
313
|
-
| **[dsh-
|
|
314
|
-
| **[dsh-
|
|
315
|
-
| **[dsh-
|
|
316
|
-
| **[dsh-
|
|
317
|
-
| **[dsh-
|
|
318
|
-
| **[dsh-
|
|
319
|
-
| **[dsh-
|
|
320
|
-
| **[dsh-
|
|
321
|
-
| **[dsh-
|
|
322
|
-
| **[dsh-
|
|
323
|
-
| **[dsh-
|
|
324
|
-
| **[dsh-
|
|
325
|
-
| **[dsh-
|
|
326
|
-
| **[dsh-
|
|
327
|
-
| **[dsh-
|
|
328
|
-
| **[dsh-
|
|
329
|
-
| **[dsh-
|
|
330
|
-
| **[dsh-
|
|
331
|
-
| **[dsh-
|
|
332
|
-
| **[dsh-
|
|
333
|
-
| **[dsh-
|
|
334
|
-
| **[dsh-
|
|
335
|
-
| **[dsh-
|
|
336
|
-
| **[dsh-
|
|
337
|
-
| **[dsh-
|
|
338
|
-
| **[dsh-
|
|
339
|
-
| **[dsh-
|
|
340
|
-
| **[dsh-
|
|
341
|
-
|
|
342
|
-
</details>
|
|
343
|
-
|
|
344
|
-
</details>
|
|
248
|
+
| Plugin | Status |
|
|
249
|
+
|---|---|
|
|
250
|
+
| **[dsh-aqua-input-check](https://github.com/PerryLink/dsh-aqua-input-check)** | |
|
|
251
|
+
| **[dsh-archive-check](https://github.com/PerryLink/dsh-archive-check)** | |
|
|
252
|
+
| **[dsh-auto-review](https://github.com/PerryLink/dsh-auto-review)** | |
|
|
253
|
+
| **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | 🧊 FROZEN — see the repo README |
|
|
254
|
+
| **[dsh-bid-ca-precheck](https://github.com/PerryLink/dsh-bid-ca-precheck)** | |
|
|
255
|
+
| **[dsh-bid-qual-check](https://github.com/PerryLink/dsh-bid-qual-check)** | |
|
|
256
|
+
| **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | 🧊 FROZEN — see the repo README |
|
|
257
|
+
| **[dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind)** | |
|
|
258
|
+
| **[dsh-click](https://github.com/PerryLink/dsh-click)** | |
|
|
259
|
+
| **[dsh-composer-history](https://github.com/PerryLink/dsh-composer-history)** | |
|
|
260
|
+
| **[dsh-contract-stance](https://github.com/PerryLink/dsh-contract-stance)** | |
|
|
261
|
+
| **[dsh-customs-doc-check](https://github.com/PerryLink/dsh-customs-doc-check)** | |
|
|
262
|
+
| **[dsh-data-quality](https://github.com/PerryLink/dsh-data-quality)** | |
|
|
263
|
+
| **[dsh-demurrage-ledger](https://github.com/PerryLink/dsh-demurrage-ledger)** | |
|
|
264
|
+
| **[dsh-doublecheck](https://github.com/PerryLink/dsh-doublecheck)** | |
|
|
265
|
+
| **[dsh-drill-script-check](https://github.com/PerryLink/dsh-drill-script-check)** | |
|
|
266
|
+
| **[dsh-eia-guide-check](https://github.com/PerryLink/dsh-eia-guide-check)** | |
|
|
267
|
+
| **[dsh-emergency-plan](https://github.com/PerryLink/dsh-emergency-plan)** | |
|
|
268
|
+
| **[dsh-essay-rubric-check](https://github.com/PerryLink/dsh-essay-rubric-check)** | |
|
|
269
|
+
| **[dsh-evidence-check](https://github.com/PerryLink/dsh-evidence-check)** | |
|
|
270
|
+
| **[dsh-export-ctl-check](https://github.com/PerryLink/dsh-export-ctl-check)** | |
|
|
271
|
+
| **[dsh-fast](https://github.com/PerryLink/dsh-fast)** | |
|
|
272
|
+
| **[dsh-fmea-table-check](https://github.com/PerryLink/dsh-fmea-table-check)** | |
|
|
273
|
+
| **[dsh-forecast-penalty](https://github.com/PerryLink/dsh-forecast-penalty)** | |
|
|
274
|
+
| **[dsh-fund-research](https://github.com/PerryLink/dsh-fund-research)** | |
|
|
275
|
+
| **[dsh-github](https://github.com/PerryLink/dsh-github)** | |
|
|
276
|
+
| **[dsh-gongwen-flow-check](https://github.com/PerryLink/dsh-gongwen-flow-check)** | |
|
|
277
|
+
| **[dsh-gongwen-word-check](https://github.com/PerryLink/dsh-gongwen-word-check)** | |
|
|
278
|
+
| **[dsh-guard-plan-qc](https://github.com/PerryLink/dsh-guard-plan-qc)** | |
|
|
279
|
+
| **[dsh-hazchem-check](https://github.com/PerryLink/dsh-hazchem-check)** | |
|
|
280
|
+
| **[dsh-hazplan-check](https://github.com/PerryLink/dsh-hazplan-check)** | |
|
|
281
|
+
| **[dsh-hidden-risk-map](https://github.com/PerryLink/dsh-hidden-risk-map)** | |
|
|
282
|
+
| **[dsh-hs-classify](https://github.com/PerryLink/dsh-hs-classify)** | |
|
|
283
|
+
| **[dsh-icd-rule-check](https://github.com/PerryLink/dsh-icd-rule-check)** | |
|
|
284
|
+
| **[dsh-industry-research](https://github.com/PerryLink/dsh-industry-research)** | |
|
|
285
|
+
| **[dsh-lawcite-adapter](https://github.com/PerryLink/dsh-lawcite-adapter)** | |
|
|
286
|
+
| **[dsh-laya](https://github.com/PerryLink/dsh-laya)** | |
|
|
287
|
+
| **[dsh-lc-doc-check](https://github.com/PerryLink/dsh-lc-doc-check)** | |
|
|
288
|
+
| **[dsh-learning-gap-check](https://github.com/PerryLink/dsh-learning-gap-check)** | |
|
|
289
|
+
| **[dsh-library](https://github.com/PerryLink/dsh-library)** | |
|
|
290
|
+
| **[dsh-local-ai](https://github.com/PerryLink/dsh-local-ai)** | |
|
|
291
|
+
| **[dsh-lsp-actions](https://github.com/PerryLink/dsh-lsp-actions)** | |
|
|
292
|
+
| **[dsh-mask](https://github.com/PerryLink/dsh-mask)** | |
|
|
293
|
+
| **[dsh-mcp-panel](https://github.com/PerryLink/dsh-mcp-panel)** | |
|
|
294
|
+
| **[dsh-medrec-qc](https://github.com/PerryLink/dsh-medrec-qc)** | |
|
|
295
|
+
| **[dsh-memento](https://github.com/PerryLink/dsh-memento)** | |
|
|
296
|
+
| **[dsh-nsfc-form-check](https://github.com/PerryLink/dsh-nsfc-form-check)** | |
|
|
297
|
+
| **[dsh-nurse-record-check](https://github.com/PerryLink/dsh-nurse-record-check)** | |
|
|
298
|
+
| **[dsh-observe](https://github.com/PerryLink/dsh-observe)** | |
|
|
299
|
+
| **[dsh-origin-rvc-check](https://github.com/PerryLink/dsh-origin-rvc-check)** | |
|
|
300
|
+
| **[dsh-ota-review-check](https://github.com/PerryLink/dsh-ota-review-check)** | |
|
|
301
|
+
| **[dsh-output-styles](https://github.com/PerryLink/dsh-output-styles)** | |
|
|
302
|
+
| **[dsh-paper-doc-adapter](https://github.com/PerryLink/dsh-paper-doc-adapter)** | |
|
|
303
|
+
| **[dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules)** | |
|
|
304
|
+
| **[dsh-permit-report-check](https://github.com/PerryLink/dsh-permit-report-check)** | |
|
|
305
|
+
| **[dsh-pipeline-check](https://github.com/PerryLink/dsh-pipeline-check)** | |
|
|
306
|
+
| **[dsh-pleading-draft](https://github.com/PerryLink/dsh-pleading-draft)** | |
|
|
307
|
+
| **[dsh-plugin-doctor](https://github.com/PerryLink/dsh-plugin-doctor)** | |
|
|
308
|
+
| **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | |
|
|
309
|
+
| **[dsh-plugin-kit](https://github.com/PerryLink/dsh-plugin-kit)** | |
|
|
310
|
+
| **[dsh-plugin-upgrade](https://github.com/PerryLink/dsh-plugin-upgrade)** | |
|
|
311
|
+
| **[dsh-policy-brief-draft](https://github.com/PerryLink/dsh-policy-brief-draft)** | |
|
|
312
|
+
| **[dsh-power-loss-split](https://github.com/PerryLink/dsh-power-loss-split)** | |
|
|
313
|
+
| **[dsh-power-ticket-check](https://github.com/PerryLink/dsh-power-ticket-check)** | |
|
|
314
|
+
| **[dsh-ppap-check](https://github.com/PerryLink/dsh-ppap-check)** | |
|
|
315
|
+
| **[dsh-protest-deadline](https://github.com/PerryLink/dsh-protest-deadline)** | |
|
|
316
|
+
| **[dsh-railway-window](https://github.com/PerryLink/dsh-railway-window)** | |
|
|
317
|
+
| **[dsh-repair-order-qc](https://github.com/PerryLink/dsh-repair-order-qc)** | |
|
|
318
|
+
| **[dsh-research-report](https://github.com/PerryLink/dsh-research-report)** | |
|
|
319
|
+
| **[dsh-review-reply-check](https://github.com/PerryLink/dsh-review-reply-check)** | |
|
|
320
|
+
| **[dsh-rulefile-check](https://github.com/PerryLink/dsh-rulefile-check)** | |
|
|
321
|
+
| **[dsh-safety-brief-check](https://github.com/PerryLink/dsh-safety-brief-check)** | |
|
|
322
|
+
| **[dsh-score](https://github.com/PerryLink/dsh-score)** | |
|
|
323
|
+
| **[dsh-session-sync](https://github.com/PerryLink/dsh-session-sync)** | |
|
|
324
|
+
| **[dsh-site-log-check](https://github.com/PerryLink/dsh-site-log-check)** | |
|
|
325
|
+
| **[dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security)** | |
|
|
326
|
+
| **[dsh-soe-decision-check](https://github.com/PerryLink/dsh-soe-decision-check)** | |
|
|
327
|
+
| **[dsh-soilwater-check](https://github.com/PerryLink/dsh-soilwater-check)** | |
|
|
328
|
+
| **[dsh-sop-sync-check](https://github.com/PerryLink/dsh-sop-sync-check)** | |
|
|
329
|
+
| **[dsh-spc-gbt-adapter](https://github.com/PerryLink/dsh-spc-gbt-adapter)** | |
|
|
330
|
+
| **[dsh-talk](https://github.com/PerryLink/dsh-talk)** | |
|
|
331
|
+
| **[dsh-tender-extract](https://github.com/PerryLink/dsh-tender-extract)** | |
|
|
332
|
+
| **[dsh-tender-matrix](https://github.com/PerryLink/dsh-tender-matrix)** | |
|
|
333
|
+
| **[dsh-test-drive](https://github.com/PerryLink/dsh-test-drive)** | |
|
|
334
|
+
| **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | |
|
|
335
|
+
| **[dsh-translate](https://github.com/PerryLink/dsh-translate)** | |
|
|
336
|
+
| **[dsh-warranty-calc](https://github.com/PerryLink/dsh-warranty-calc)** | |
|
|
337
|
+
| **[dsh-budget](https://github.com/PerryLink/dsh-budget)** | 🧊 FROZEN — see the repo README |
|
|
338
|
+
| **[dsh-claude-move](https://github.com/PerryLink/dsh-claude-move)** | 🧊 FROZEN — see the repo README |
|
|
339
|
+
| **[dsh-defend](https://github.com/PerryLink/dsh-defend)** | 🧊 FROZEN — see the repo README |
|
|
340
|
+
| **[dsh-draw](https://github.com/PerryLink/dsh-draw)** | 🧊 FROZEN — see the repo README |
|
|
341
|
+
| **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | 🧊 FROZEN — see the repo README |
|
|
342
|
+
| **[dsh-background-agents](https://github.com/PerryLink/dsh-background-agents)** | 🚫 RETIRED — see the repo README |
|
|
343
|
+
| **[dsh-session-pin](https://github.com/PerryLink/dsh-session-pin)** | 🚫 RETIRED — see the repo README |
|
|
344
|
+
| **[dsh-team-rooms](https://github.com/PerryLink/dsh-team-rooms)** | 🚫 RETIRED — see the repo README |
|
|
345
345
|
|
|
346
346
|
</details>
|
|
347
347
|
|
|
348
|
-
### Install from the DSH Desktop Market
|
|
349
|
-
|
|
350
|
-
All PerryLink plugins are browsable in the built-in DSH Desktop Market: **Market → Sources → add source → paste** `https://perrylink-dsh-catalog.perrylink.workers.dev/catalog-source.json` **→ select it**. Installation still goes through the Market's npm-identity verification and your confirmation.
|
|
351
|
-
|
|
352
348
|
## License
|
|
353
349
|
|
|
354
350
|
[Apache License 2.0](LICENSE) © 2026 dsh-observe contributors
|
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@ 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
5
|
import { TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
6
|
-
|
|
6
|
+
// src/config.ts
|
|
7
7
|
/**
|
|
8
8
|
* Config schema and resolution for `dsh-observe`. Every tunable is a
|
|
9
9
|
* validated {@link Config} field changeable from cordis.yml; the resolution
|
|
@@ -318,8 +318,7 @@ function compilePatterns(patterns) {
|
|
|
318
318
|
}
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
|
|
322
|
-
//#region src/model.ts
|
|
321
|
+
// src/model.ts
|
|
323
322
|
/**
|
|
324
323
|
* Validate a value read back from the durable spool: it must look like an
|
|
325
324
|
* export record. The spool is a durable boundary, so hostile or hand-edited
|
|
@@ -334,8 +333,7 @@ function isExportRecord(value) {
|
|
|
334
333
|
if (record.kind === "metric") return typeof record.metric === "object" && record.metric !== null;
|
|
335
334
|
return false;
|
|
336
335
|
}
|
|
337
|
-
|
|
338
|
-
//#region src/spool.ts
|
|
336
|
+
// src/spool.ts
|
|
339
337
|
/** One stored batch: creation time plus sanitized export records. */
|
|
340
338
|
const spoolBatchSchema = z$1.object({
|
|
341
339
|
createdAt: z$1.number().int().nonnegative(),
|
|
@@ -528,8 +526,7 @@ var DroppingSpool = class {
|
|
|
528
526
|
};
|
|
529
527
|
}
|
|
530
528
|
};
|
|
531
|
-
|
|
532
|
-
//#region src/ids.ts
|
|
529
|
+
// src/ids.ts
|
|
533
530
|
/**
|
|
534
531
|
* Deterministic span and trace ids. Ids are SHA-256 digests of the session
|
|
535
532
|
* identity plus structural keys, truncated to the widths each backend
|
|
@@ -597,8 +594,7 @@ function langfuseTraceId(sessionId, turn) {
|
|
|
597
594
|
function langfuseId(...parts) {
|
|
598
595
|
return digest(["langfuse", ...parts], 16);
|
|
599
596
|
}
|
|
600
|
-
|
|
601
|
-
//#region src/version.ts
|
|
597
|
+
// src/version.ts
|
|
602
598
|
/**
|
|
603
599
|
* Package version stamp shared by build artifacts (OTLP instrumentation
|
|
604
600
|
* scope) and the release script. `scripts/release.mjs` bumps this string
|
|
@@ -607,9 +603,8 @@ function langfuseId(...parts) {
|
|
|
607
603
|
* @module dsh-observe/version
|
|
608
604
|
*/
|
|
609
605
|
/** The dsh-observe package version, kept in sync with package.json. */
|
|
610
|
-
const VERSION = "0.2.
|
|
611
|
-
|
|
612
|
-
//#region src/sinks.ts
|
|
606
|
+
const VERSION = "0.2.27";
|
|
607
|
+
// src/sinks.ts
|
|
613
608
|
/** POST a JSON body with a timeout; throws on non-2xx. */
|
|
614
609
|
async function postJson(url, headers, body, timeoutMs) {
|
|
615
610
|
const response = await fetch(url, {
|
|
@@ -1027,8 +1022,7 @@ var LangfuseSink = class {
|
|
|
1027
1022
|
if (Array.isArray(result.errors) && result.errors.length > 0) throw new Error(`langfuse ingestion reported ${result.errors.length} event error(s)`);
|
|
1028
1023
|
}
|
|
1029
1024
|
};
|
|
1030
|
-
|
|
1031
|
-
//#region src/backoff.ts
|
|
1025
|
+
// src/backoff.ts
|
|
1032
1026
|
/**
|
|
1033
1027
|
* Backoff delay computation for export retries: deterministic exponential
|
|
1034
1028
|
* backoff (no jitter — tests and replays stay reproducible).
|
|
@@ -1045,8 +1039,7 @@ function backoffDelayMs(consecutiveFailures, policy) {
|
|
|
1045
1039
|
const delay = policy.baseDelayMs * policy.factor ** exponent;
|
|
1046
1040
|
return Math.min(delay, policy.maxDelayMs);
|
|
1047
1041
|
}
|
|
1048
|
-
|
|
1049
|
-
//#region src/pipeline.ts
|
|
1042
|
+
// src/pipeline.ts
|
|
1050
1043
|
/**
|
|
1051
1044
|
* One backend's delivery pipeline. Push is synchronous (the session event
|
|
1052
1045
|
* hot path); all network work happens on timers or in the background.
|
|
@@ -1219,8 +1212,7 @@ var Pipeline = class {
|
|
|
1219
1212
|
}
|
|
1220
1213
|
}
|
|
1221
1214
|
};
|
|
1222
|
-
|
|
1223
|
-
//#region src/pricing.ts
|
|
1215
|
+
// src/pricing.ts
|
|
1224
1216
|
/**
|
|
1225
1217
|
* Compile a glob pattern (only `*` is special) to an anchored regular
|
|
1226
1218
|
* expression.
|
|
@@ -1255,8 +1247,7 @@ function costUsd(rule, usage) {
|
|
|
1255
1247
|
const cacheWrite = usage.cacheWrite * (rule.cacheWritePerToken ?? rule.inputPerToken);
|
|
1256
1248
|
return usage.input * rule.inputPerToken + usage.output * rule.outputPerToken + cacheRead + cacheWrite;
|
|
1257
1249
|
}
|
|
1258
|
-
|
|
1259
|
-
//#region src/project.ts
|
|
1250
|
+
// src/project.ts
|
|
1260
1251
|
/**
|
|
1261
1252
|
* Read-only compatibility guard for the retired V3 tool-result wrapper.
|
|
1262
1253
|
*
|
|
@@ -1338,8 +1329,7 @@ function projectToolMessage(message) {
|
|
|
1338
1329
|
function projectMessage(message) {
|
|
1339
1330
|
return `[${message.role}] ${projectMessageContent(message)}`;
|
|
1340
1331
|
}
|
|
1341
|
-
|
|
1342
|
-
//#region src/sanitize.ts
|
|
1332
|
+
// src/sanitize.ts
|
|
1343
1333
|
/** The placeholder replacing any redacted value. */
|
|
1344
1334
|
const REDACTED = "[REDACTED]";
|
|
1345
1335
|
/**
|
|
@@ -1443,8 +1433,7 @@ function sanitizeJsonText(value, budget, policy) {
|
|
|
1443
1433
|
return sanitizeText(value, budget, policy);
|
|
1444
1434
|
}
|
|
1445
1435
|
}
|
|
1446
|
-
|
|
1447
|
-
//#region src/collector.ts
|
|
1436
|
+
// src/collector.ts
|
|
1448
1437
|
/** Milliseconds → Unix nanoseconds. */
|
|
1449
1438
|
const NANO = 1e6;
|
|
1450
1439
|
/** Normalize provider usage to the export-facing token counts. */
|
|
@@ -1954,8 +1943,7 @@ var Collector = class {
|
|
|
1954
1943
|
return sanitizeText(value, this.config.sanitize.truncateAttributeChars, this.config.sanitize);
|
|
1955
1944
|
}
|
|
1956
1945
|
};
|
|
1957
|
-
|
|
1958
|
-
//#region src/remote.ts
|
|
1946
|
+
// src/remote.ts
|
|
1959
1947
|
/**
|
|
1960
1948
|
* Build the `observe` Typert remote service as a Cordis plugin class.
|
|
1961
1949
|
* @param options - the runtime bindings.
|
|
@@ -1983,8 +1971,7 @@ function observeRemotePlugin(options) {
|
|
|
1983
1971
|
}
|
|
1984
1972
|
return ObserveRemoteService;
|
|
1985
1973
|
}
|
|
1986
|
-
|
|
1987
|
-
//#region src/index.ts
|
|
1974
|
+
// src/index.ts
|
|
1988
1975
|
const name = "observe";
|
|
1989
1976
|
/** The durable offline buffer needs the host's storage-domain facility. */
|
|
1990
1977
|
const inject = ["storageDomain"];
|
|
@@ -2129,5 +2116,4 @@ async function apply(ctx, config = {}) {
|
|
|
2129
2116
|
}));
|
|
2130
2117
|
}
|
|
2131
2118
|
}
|
|
2132
|
-
//#endregion
|
|
2133
2119
|
export { Config, REDACTED, VERSION, apply, inject, name, resolveConfig, sanitizeJson, sanitizeJsonText, sanitizeText, truncate };
|
package/lib/typert.host.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
2
|
+
// src/wire.ts
|
|
3
3
|
/**
|
|
4
4
|
* The `observe` Remote wire vocabulary: the status snapshot and the kill
|
|
5
5
|
* switch result, their zod v4 strict schemas, and the invocation descriptors
|
|
@@ -85,8 +85,7 @@ const OBSERVE_SET_ENABLED_DESCRIPTOR = Object.freeze({
|
|
|
85
85
|
});
|
|
86
86
|
/** The canonical invocation list both Typert faces register. */
|
|
87
87
|
const OBSERVE_INVOCATIONS = Object.freeze([OBSERVE_STATUS_DESCRIPTOR, OBSERVE_SET_ENABLED_DESCRIPTOR]);
|
|
88
|
-
|
|
89
|
-
//#region src/typert.host.ts
|
|
88
|
+
// src/typert.host.ts
|
|
90
89
|
/**
|
|
91
90
|
* The hand-written Typert HOST manifest for `dsh-observe`, exported as
|
|
92
91
|
* `./typert` so the harness's typert-loader registers the `observe` status /
|
|
@@ -108,5 +107,4 @@ const TYPERT = Object.freeze({
|
|
|
108
107
|
objects: Object.freeze([])
|
|
109
108
|
})
|
|
110
109
|
});
|
|
111
|
-
//#endregion
|
|
112
110
|
export { TYPERT };
|
package/lib/types/version.d.ts
CHANGED
package/lib/types/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-observe",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.27",
|
|
4
4
|
"description": "OpenTelemetry and Langfuse observability exporter for DeepSeek Harness: turn/step/tool/LLM spans, token and cost metrics, and sanitized LLM prompt/completion capture from the session/event stream, with async batching, bounded offline buffering, and retry with backoff.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -107,41 +107,42 @@
|
|
|
107
107
|
"llm-observability"
|
|
108
108
|
],
|
|
109
109
|
"engines": {
|
|
110
|
-
"node": "^22.19.0 || >=24.
|
|
111
|
-
"dsh": ">=0.2.1-0 <0.3.0"
|
|
110
|
+
"node": "^22.19.0 || >=24.9.0",
|
|
111
|
+
"dsh": ">=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0"
|
|
112
112
|
},
|
|
113
113
|
"packageManager": "pnpm@11.7.0",
|
|
114
114
|
"peerDependencies": {
|
|
115
115
|
"@deepseek-ai/cordis": "^4.0.5-alpha.1",
|
|
116
|
-
"@deepseek-ai/dsh-llm": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0",
|
|
117
|
-
"@deepseek-ai/dsh-session": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0",
|
|
118
|
-
"@deepseek-ai/dsh-storage": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0",
|
|
119
|
-
"@deepseek-ai/dsh-storage-domain": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0",
|
|
120
|
-
"@deepseek-ai/dsh-storage-json": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0",
|
|
121
|
-
"@deepseek-ai/dsh-typert-protocol": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0",
|
|
122
|
-
"@deepseek-ai/schemastery": "^3.18.5
|
|
116
|
+
"@deepseek-ai/dsh-llm": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0",
|
|
117
|
+
"@deepseek-ai/dsh-session": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0",
|
|
118
|
+
"@deepseek-ai/dsh-storage": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0",
|
|
119
|
+
"@deepseek-ai/dsh-storage-domain": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0",
|
|
120
|
+
"@deepseek-ai/dsh-storage-json": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0",
|
|
121
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.1.2-rc.1 <0.2.0 || >=0.1.5-alpha.1 <0.2.0 || >=0.1.6-0 <0.2.0 || >=0.1.7-0 <0.2.0 || >=0.2.0-0 <0.3.0 || >=0.2.1-0 <0.3.0 || >=0.2.2-0 <0.3.0",
|
|
122
|
+
"@deepseek-ai/schemastery": "^3.18.5"
|
|
123
123
|
},
|
|
124
124
|
"dependencies": {
|
|
125
|
-
"zod": "
|
|
125
|
+
"zod": "4.4.3"
|
|
126
126
|
},
|
|
127
127
|
"devDependencies": {
|
|
128
|
-
"@deepseek-ai/dsh-attachment": "0.2.
|
|
129
|
-
"@deepseek-ai/cordis": "^4.0
|
|
130
|
-
"@deepseek-ai/cordis-plugin-include": "^1.0
|
|
131
|
-
"@deepseek-ai/cordis-plugin-loader": "^1.0
|
|
132
|
-
"@deepseek-ai/dsh-llm": "0.2.
|
|
133
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
134
|
-
"@deepseek-ai/dsh-storage": "0.2.
|
|
135
|
-
"@deepseek-ai/dsh-storage-domain": "0.2.
|
|
136
|
-
"@deepseek-ai/dsh-storage-json": "0.2.
|
|
137
|
-
"@deepseek-ai/dsh-typert-protocol": "0.2.
|
|
138
|
-
"@deepseek-ai/schemastery": "
|
|
139
|
-
"@types/node": "^22.
|
|
128
|
+
"@deepseek-ai/dsh-attachment": "0.2.2-rc.1",
|
|
129
|
+
"@deepseek-ai/cordis": "^4.1.0",
|
|
130
|
+
"@deepseek-ai/cordis-plugin-include": "^1.1.0",
|
|
131
|
+
"@deepseek-ai/cordis-plugin-loader": "^1.1.0",
|
|
132
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.1",
|
|
133
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.1",
|
|
134
|
+
"@deepseek-ai/dsh-storage": "0.2.2-rc.1",
|
|
135
|
+
"@deepseek-ai/dsh-storage-domain": "0.2.2-rc.1",
|
|
136
|
+
"@deepseek-ai/dsh-storage-json": "0.2.2-rc.1",
|
|
137
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.1",
|
|
138
|
+
"@deepseek-ai/schemastery": "~3.19.0",
|
|
139
|
+
"@types/node": "^22.20.5",
|
|
140
140
|
"@vitest/coverage-v8": "^3.2.0",
|
|
141
141
|
"oxlint": "0.18.1",
|
|
142
142
|
"vitest": "^3.2.0",
|
|
143
|
-
"tsdown": "^0.
|
|
144
|
-
"typescript": "^5.9.0"
|
|
143
|
+
"tsdown": "^0.23.1",
|
|
144
|
+
"typescript": "^5.9.0",
|
|
145
|
+
"@deepseek-ai/dsh-package-manifest": "0.2.2-rc.1"
|
|
145
146
|
},
|
|
146
147
|
"scripts": {
|
|
147
148
|
"build": "node scripts/prepare.mjs",
|
package/src/version.ts
CHANGED