dsh-observe 0.2.26 → 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 CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.27] - 2026-11-05
4
+
5
+ ### Changed
6
+
7
+ - **Host 0.2.2 line support.** devDependencies move from 0.2.1-rc.2 to 0.2.2-rc.1, cordis to 4.1.0 / include 1.1.0 / loader 1.1.0, and schemastery to ~3.19.0 so a single copy resolves against `@deepseek-ai/dsh-llm` 0.2.2. `engines.dsh` appends `>=0.2.2-0 <0.3.0` (append-only) and `engines.node` becomes `^22.19.0 || >=24.9.0`.
8
+
9
+ ### Fixed
10
+
11
+ - Add `@deepseek-ai/dsh-package-manifest`: `@deepseek-ai/dsh-llm` 0.2.2's published types import it but its manifest does not declare it.
12
+
3
13
  ## [0.2.26] - 2026-10-24
4
14
 
5
15
  ### Fixed
package/README.md CHANGED
@@ -250,10 +250,10 @@ This project is part of the DeepSeek Harness plugin family from [PerryLink](http
250
250
  | **[dsh-aqua-input-check](https://github.com/PerryLink/dsh-aqua-input-check)** | |
251
251
  | **[dsh-archive-check](https://github.com/PerryLink/dsh-archive-check)** | |
252
252
  | **[dsh-auto-review](https://github.com/PerryLink/dsh-auto-review)** | |
253
- | **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | |
253
+ | **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | 🧊 FROZEN — see the repo README |
254
254
  | **[dsh-bid-ca-precheck](https://github.com/PerryLink/dsh-bid-ca-precheck)** | |
255
255
  | **[dsh-bid-qual-check](https://github.com/PerryLink/dsh-bid-qual-check)** | |
256
- | **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | |
256
+ | **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | 🧊 FROZEN — see the repo README |
257
257
  | **[dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind)** | |
258
258
  | **[dsh-click](https://github.com/PerryLink/dsh-click)** | |
259
259
  | **[dsh-composer-history](https://github.com/PerryLink/dsh-composer-history)** | |
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
- //#region src/config.ts
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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.26";
611
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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
- //#endregion
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 };
@@ -1,5 +1,5 @@
1
1
  import { z } from "zod";
2
- //#region src/wire.ts
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
- //#endregion
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 };
@@ -6,5 +6,5 @@
6
6
  * @module dsh-observe/version
7
7
  */
8
8
  /** The dsh-observe package version, kept in sync with package.json. */
9
- export declare const VERSION = "0.2.26";
9
+ export declare const VERSION = "0.2.27";
10
10
  //# sourceMappingURL=version.d.ts.map
@@ -6,5 +6,5 @@
6
6
  * @module dsh-observe/version
7
7
  */
8
8
  /** The dsh-observe package version, kept in sync with package.json. */
9
- export const VERSION = '0.2.26';
9
+ export const VERSION = '0.2.27';
10
10
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-observe",
3
- "version": "0.2.26",
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.0.0",
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-alpha.2"
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
125
  "zod": "4.4.3"
126
126
  },
127
127
  "devDependencies": {
128
- "@deepseek-ai/dsh-attachment": "0.2.1-rc.2",
129
- "@deepseek-ai/cordis": "^4.0.5-alpha.1",
130
- "@deepseek-ai/cordis-plugin-include": "^1.0.10-alpha.2",
131
- "@deepseek-ai/cordis-plugin-loader": "^1.0.6-alpha.1",
132
- "@deepseek-ai/dsh-llm": "0.2.1-rc.2",
133
- "@deepseek-ai/dsh-session": "0.2.1-rc.2",
134
- "@deepseek-ai/dsh-storage": "0.2.1-rc.2",
135
- "@deepseek-ai/dsh-storage-domain": "0.2.1-rc.2",
136
- "@deepseek-ai/dsh-storage-json": "0.2.1-rc.2",
137
- "@deepseek-ai/dsh-typert-protocol": "0.2.1-rc.2",
138
- "@deepseek-ai/schemastery": "^3.18.5-alpha.2",
139
- "@types/node": "^22.19.0",
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.22.14",
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
@@ -7,4 +7,4 @@
7
7
  */
8
8
 
9
9
  /** The dsh-observe package version, kept in sync with package.json. */
10
- export const VERSION = '0.2.26'
10
+ export const VERSION = '0.2.27'