refactor(telemetry): strongly type sharing mode

This commit is contained in:
Turtle
2026-08-06 15:34:36 +08:00
parent c6f8055388
commit b10368a8d5
11 changed files with 73 additions and 27 deletions
@@ -10,7 +10,7 @@ Status: implemented
## 决策
`@deepseek-ai/dsh-session-telemetry-otel` 公开三个大写的 `mode` 值:
`@deepseek-ai/dsh-session-telemetry-otel` 向 TypeScript 调用方公开以字符串为值的 `TelemetryMode` 枚举,并在序列化配置中接受相同的三个大写 `mode` 值:
- `FULL` 是默认值,保留向已配置 OTel 流水线的即时投递。
- `FEEDBACK_ONLY` 在追加 `feedback/record` 时读取权威会话日志,并交接截至该事件的未释放前缀。该边界后追加的记录会留在本地,直到另一个反馈事件。