@deepseek-ai/dsh-session-telemetry-otel 0.1.2-alpha.2 → 0.1.2-alpha.4

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/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/session/session-telemetry-otel/README.md
5
- README.md: 8aa215f5fd2e1344911e3f069f038a4f89f6fa3f
6
- README.zh.md: 1bb3aa8f3b3e4b2f50e66e1833a8f4ab00112a8b
5
+ README.md: 2f489cbdae9a64ac95484cf6ed3aeddac3fe2b1e
6
+ README.zh.md: 78bc221542d9709acd287f258c54b930ac389106
package/README.md CHANGED
@@ -93,7 +93,7 @@ The backend is a thin adapter over the OTel JS SDK: it owns capture mode, resour
93
93
 
94
94
  ### Capture wiring
95
95
 
96
- `FULL` composes the coordinator in `live` mode and lets direct service calls through; `FEEDBACK_ONLY` composes it in `on-demand` mode, gives the coordinator a private backend capability, and triggers `captureSession(session, event.seq)` only for the exact canonical feedback record; `DISABLED` registers nothing but a warning on `feedback/record`. The backend deliberately implements no `flush()`: the batch processor owns ordinary flushing, and forwarding the hint to `forceFlush()` would create the sole source of concurrent flushes whose interaction with shutdown's drain is undocumented.
96
+ `FULL` composes the coordinator in `live` mode and lets direct service calls through; `FEEDBACK_ONLY` composes it in `on-demand` mode, gives the coordinator a private backend capability, and triggers `captureSession(session, event.seq)` only when `session.eventAt(event.seq) === event` confirms the exact canonical feedback record; `DISABLED` registers nothing but a warning on `feedback/record`. The backend deliberately implements no `flush()`: the batch processor owns ordinary flushing, and forwarding the hint to `forceFlush()` would create the sole source of concurrent flushes whose interaction with shutdown's drain is undocumented.
97
97
 
98
98
  ### Field mapping
99
99
 
@@ -144,3 +144,5 @@ These limits define where SDK behavior governs and where export guarantees end.
144
144
  None.
145
145
 
146
146
  </details>
147
+
148
+ **Runtime invariant:** No companion is published. Mode selection changes capture handoff, SDK setup, and local diagnostics without mutating session or service state an independent companion can compare. Export remains inside the SDK past the backend boundary.
package/README.zh.md CHANGED
@@ -93,7 +93,7 @@ kind: "package-reference"
93
93
 
94
94
  ### 捕获接线
95
95
 
96
- `FULL` 以 `live` 模式组装协调器,并放行直接服务调用;`FEEDBACK_ONLY` 以 `on-demand` 模式组装协调器,给协调器一个私有后端能力,并且只对权威日志中精确的反馈记录触发 `captureSession(session, event.seq)`;`DISABLED` 除了在 `feedback/record` 上发出警告外不注册任何内容。后端刻意不实现 `flush()`:常规 flush 由批处理器负责,把提示转发给 `forceFlush()` 会成为并发 flush 的唯一来源,而它与关闭排空的交互没有文档。
96
+ `FULL` 以 `live` 模式组装协调器,并放行直接服务调用;`FEEDBACK_ONLY` 以 `on-demand` 模式组装协调器,给协调器一个私有后端能力,并且仅在 `session.eventAt(event.seq) === event` 确认精确的权威反馈记录时触发 `captureSession(session, event.seq)`;`DISABLED` 除了在 `feedback/record` 上发出警告外不注册任何内容。后端刻意不实现 `flush()`:常规 flush 由批处理器负责,把提示转发给 `forceFlush()` 会成为并发 flush 的唯一来源,而它与关闭排空的交互没有文档。
97
97
 
98
98
  ### 字段映射
99
99
 
@@ -144,3 +144,5 @@ kind: "package-reference"
144
144
  无。
145
145
 
146
146
  </details>
147
+
148
+ **运行时不变式:** 不发布伴生入口。mode 只改变 capture handoff、SDK setup 与本地 diagnostics,不改变可由独立 companion 对照的 Session 或 service 状态。
package/lib/index.js CHANGED
@@ -164,7 +164,7 @@ var OpenTelemetrySessionBackend = class extends SessionTelemetryBackend {
164
164
  const coordinator = new SessionTelemetryCoordinator(ctx, backend, "on-demand");
165
165
  ctx.on("session/event", (session, event) => {
166
166
  if (event.type !== "feedback/record") return;
167
- if (session.events[event.seq] !== event) {
167
+ if (session.eventAt(event.seq) !== event) {
168
168
  ctx.logger.warn(NON_CANONICAL_FEEDBACK_WARNING);
169
169
  return;
170
170
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-session-telemetry-otel",
3
3
  "description": "OpenTelemetry backend for the DeepSeek Harness telemetry seam: hands captured session records to the OTel JS SDK's log pipeline",
4
- "version": "0.1.2-alpha.2",
4
+ "version": "0.1.2-alpha.4",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -18,16 +18,11 @@
18
18
  "types": "./lib/types/index.d.ts",
19
19
  "default": "./lib/index.js"
20
20
  },
21
- "./invariant": {
22
- "types": "./lib/types/invariant.d.ts",
23
- "default": "./lib/invariant.js"
24
- },
25
21
  "./src/*": "./src/*",
26
22
  "./package.json": "./package.json"
27
23
  },
28
24
  "files": [
29
25
  "lib/index.js",
30
- "lib/invariant.js",
31
26
  "lib/types/**/*.d.ts"
32
27
  ],
33
28
  "license": "MIT",
@@ -41,30 +36,27 @@
41
36
  "@deepseek-ai/schemastery": "^3.18.2"
42
37
  },
43
38
  "peerDependencies": {
44
- "@deepseek-ai/dsh-command-feedback": "^0.1.2-alpha.2",
45
- "@deepseek-ai/dsh-llm": "^0.1.2-alpha.2",
46
- "@deepseek-ai/dsh-invariants": "^0.1.2-alpha.2",
47
- "@deepseek-ai/dsh-session-telemetry": "^0.1.2-alpha.2",
48
- "@deepseek-ai/dsh-session": "^0.1.2-alpha.2",
49
- "@deepseek-ai/dsh-anonymous-user-id": "^0.1.2-alpha.2",
39
+ "@deepseek-ai/dsh-llm": "^0.1.2-alpha.4",
40
+ "@deepseek-ai/dsh-command-feedback": "^0.1.2-alpha.4",
41
+ "@deepseek-ai/dsh-session": "^0.1.2-alpha.4",
42
+ "@deepseek-ai/dsh-session-telemetry": "^0.1.2-alpha.4",
43
+ "@deepseek-ai/dsh-anonymous-user-id": "^0.1.2-alpha.4",
50
44
  "@deepseek-ai/cordis": "^4.0.2"
51
45
  },
52
46
  "devDependencies": {
53
- "@deepseek-ai/cordis-plugin-logger-console": "^1.0.2",
54
- "@deepseek-ai/dsh-app-boot": "^0.1.2-alpha.2",
55
- "@deepseek-ai/dsh-bash-local": "^0.1.2-alpha.2",
56
47
  "@deepseek-ai/cordis-plugin-loader": "^1.0.3",
57
- "@deepseek-ai/dsh-agent-spine-demo": "^0.1.2-alpha.2",
58
- "@deepseek-ai/dsh-command-feedback": "^0.1.2-alpha.2",
59
- "@deepseek-ai/dsh-invariants": "^0.1.2-alpha.2",
60
- "@deepseek-ai/dsh-llm": "^0.1.2-alpha.2",
61
- "@deepseek-ai/dsh-loader-smoke": "^0.1.2-alpha.2",
62
- "@deepseek-ai/dsh-session": "^0.1.2-alpha.2",
63
- "@deepseek-ai/dsh-session-checkpoint-policy": "^0.1.2-alpha.2",
64
- "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.2-alpha.2",
65
- "@deepseek-ai/dsh-session-telemetry": "^0.1.2-alpha.2",
66
- "@deepseek-ai/dsh-subprocess-local": "^0.1.2-alpha.2",
67
- "@deepseek-ai/cordis": "^4.0.2",
68
- "@deepseek-ai/dsh-anonymous-user-id": "^0.1.2-alpha.2"
48
+ "@deepseek-ai/cordis-plugin-logger-console": "^1.0.2",
49
+ "@deepseek-ai/dsh-bash-local": "^0.1.2-alpha.4",
50
+ "@deepseek-ai/dsh-command-feedback": "^0.1.2-alpha.4",
51
+ "@deepseek-ai/dsh-app-boot": "^0.1.2-alpha.4",
52
+ "@deepseek-ai/dsh-llm": "^0.1.2-alpha.4",
53
+ "@deepseek-ai/dsh-loader-smoke": "^0.1.2-alpha.4",
54
+ "@deepseek-ai/dsh-session": "^0.1.2-alpha.4",
55
+ "@deepseek-ai/dsh-session-persistence-jsonl": "^0.1.2-alpha.4",
56
+ "@deepseek-ai/dsh-session-telemetry": "^0.1.2-alpha.4",
57
+ "@deepseek-ai/dsh-subprocess-local": "^0.1.2-alpha.4",
58
+ "@deepseek-ai/dsh-session-checkpoint-policy": "^0.1.2-alpha.4",
59
+ "@deepseek-ai/dsh-anonymous-user-id": "^0.1.2-alpha.4",
60
+ "@deepseek-ai/cordis": "^4.0.2"
69
61
  }
70
62
  }
package/lib/invariant.js DELETED
@@ -1,24 +0,0 @@
1
- //#region lib/types/invariant.js
2
- /**
3
- * Package-owned invariant companion for `@deepseek-ai/dsh-session-telemetry-otel`.
4
- * @module @deepseek-ai/dsh-session-telemetry-otel/invariant
5
- */
6
- const PACKAGE_NAME = "@deepseek-ai/dsh-session-telemetry-otel";
7
- /** Cordis companion plugin name. */
8
- const name = "session-telemetry-otel-invariant";
9
- /** Service required before the companion can reserve package ownership. */
10
- const inject = ["invariants"];
11
- /**
12
- * No runtime invariant: mode selection changes capture handoff, SDK setup, and
13
- * local diagnostics without mutating session or service state an independent
14
- * companion can compare. Export remains inside the SDK past the backend boundary.
15
- */
16
- const install = () => {};
17
- /**
18
- * Register this package's invariant companion.
19
- * @param ctx - Cordis context carrying the invariant service.
20
- * @returns the installed registration's disposer after setup succeeds.
21
- */
22
- const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
23
- //#endregion
24
- export { apply, inject, name };
@@ -1,16 +0,0 @@
1
- /**
2
- * Package-owned invariant companion for `@deepseek-ai/dsh-session-telemetry-otel`.
3
- * @module @deepseek-ai/dsh-session-telemetry-otel/invariant
4
- */
5
- import type { Context } from '@deepseek-ai/cordis';
6
- /** Cordis companion plugin name. */
7
- export declare const name = "session-telemetry-otel-invariant";
8
- /** Service required before the companion can reserve package ownership. */
9
- export declare const inject: string[];
10
- /**
11
- * Register this package's invariant companion.
12
- * @param ctx - Cordis context carrying the invariant service.
13
- * @returns the installed registration's disposer after setup succeeds.
14
- */
15
- export declare const apply: (ctx: Context) => Promise<() => void>;
16
- //# sourceMappingURL=invariant.d.ts.map