dsh-observe 0.2.13 → 0.2.15

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-zh.md CHANGED
@@ -11,6 +11,7 @@
11
11
  [![Gitee](https://img.shields.io/badge/Gitee-mirror-c71d23?logo=gitee)](https://gitee.com/perrylink/dsh-observe)
12
12
  [![DSH plugin](https://img.shields.io/badge/dsh--plugin-✅-green)](https://github.com/topics/dsh-plugin)
13
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-徽章)
14
+ [![DSH Market](https://raw.githubusercontent.com/2BingLing/dsh-market/master/assets/readme/badge-listed-zh.svg)](https://dsh.market/)
14
15
  [![Node](https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-brightgreen.svg)](#)
15
16
  [![CI](https://img.shields.io/github/actions/workflow/status/PerryLink/dsh-observe/ci.yml?branch=main&label=CI)](https://github.com/PerryLink/dsh-observe/actions)
16
17
  [![Version](https://img.shields.io/github/v/tag/PerryLink/dsh-observe?label=version)](https://github.com/PerryLink/dsh-observe/releases)
@@ -27,7 +28,7 @@
27
28
 
28
29
  | 方面 | 状态 |
29
30
  |---|---|
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 工作流覆盖)。 |
31
+ | Harness | DeepSeek Harness `dsh-v0.1.7-alpha.1`(2026-09-22 已适配):会话格式 V4 把工具结果改为 `role: 'tool'` 的一等消息,顶层携带 `toolCallId` + `content` + 可选 `isError` —— V3 的 `tool-result` 内容块已从宿主 `ContentBlockMap` 移除,本插件只读 V4 形状(升级前的 V3 日志仍可经只读兼容路径投影)。会话格式 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 \|\| >=0.1.7-0 <0.2.0` 保持每条已发布线可安装(本地完整门禁链;profile 安装冒烟由 compat 工作流覆盖)。 |
31
32
  | Node | `^22.19.0 \|\| >=24.0.0` |
32
33
  | 后端 | OpenTelemetry OTLP/HTTP(traces + metrics,JSON 编码)与 Langfuse(LLM 可观测)——二选一或同时 |
33
34
  | 模型 | 与模型无关:它导出 session/event 流,自身不调用任何模型 |
@@ -171,7 +172,7 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-observe'
171
172
 
172
173
  ## Known limitations
173
174
 
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
+ - **npm 0.1.7-alpha.1** —— 插件针对 `@deepseek-ai/dsh@0.1.7-alpha.1` 开发与测试(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 || >=0.1.7-0 <0.2.0` 保持每条已发布线可安装,旧基线与第二把尺子(`typecheck:ci`)及 compat 工作流共同覆盖。
175
176
  - **审计事件不落盘** —— 本插件自身的 `observe/*` 记录仅作审计:当前宿主线的会话 append 闸门只接纳 surface 事件,因此不会有 `observe/*` 事件写入会话日志;插件也不会用未标记 append 伪造一条(那会让会话不可读)。审计面请以 `/observe` 状态输出与 OTLP/Langfuse 后端为准。
176
177
  - **Metrics 不走重试/缓冲路径** —— OTLP metrics 按累计聚合,丢失一次 flush 会在下一次自愈(设计如此,非缺陷)。
177
178
  - **无采样** —— 每个启用的 span 族都会导出;大流量会话请调整 `capture.*` 开关与 `batch.maxBufferRecords`。
@@ -180,7 +181,7 @@ dsh --profile web --dump-config | grep -A2 'id: dsh-observe'
180
181
 
181
182
  ```sh
182
183
  pnpm install # node ^22.19 || >=24
183
- pnpm run typecheck # tsc:src + tests,对照 0.1.6-alpha.2 devDeps(无 tsconfig paths)
184
+ pnpm run typecheck # tsc:src + tests,对照 0.1.7-alpha.1 devDeps(无 tsconfig paths)
184
185
  pnpm run typecheck:ci # tsc:对照已发布线(无 paths)
185
186
  pnpm run check:ruler-live # canary:必须编译失败,以证明尺子仍是活的
186
187
  pnpm test # vitest:126 个测试、18 个套件(真实 Context/Session/storage 接缝)
@@ -202,56 +203,56 @@ pnpm pack # 发布用 tarball
202
203
 
203
204
  ## PerryLink DSH Plugin Family
204
205
 
205
- 这是 [PerryLink](https://github.com/PerryLink) 维护的 [40 个 DeepSeek Harness 插件](https://github.com/PerryLink) 之一。如果它能帮到你,其他的也会:
206
+ This project is one of the **45 DeepSeek Harness plugins** maintained by [PerryLink](https://github.com/PerryLink). If this one helps you, the others likely will too:
206
207
 
207
208
  | Plugin | One-liner |
208
209
  |---|---|
209
- | **[dsh-auto-review](https://github.com/PerryLink/dsh-auto-review)** | 审批链上的第二模型自动审查,默认失败关闭 | |
210
- | **[dsh-background-agents](https://github.com/PerryLink/dsh-background-agents)** | 带 Web UI 侧栏、消息与中断的持久后台子代理 | |
211
- | **[dsh-budget](https://github.com/PerryLink/dsh-budget)** | DeepSeek Harness 的成本治理:预算、碳排与延迟一屏呈现。 | |
212
- | **[dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind)** | Claude Code /rewind 等价:快照、会话 fork、一次性恢复 | |
213
- | **[dsh-claude-move](https://github.com/PerryLink/dsh-claude-move)** | 把 Claude Code 会话、记忆、技能与 CLAUDE.md 迁入 DSH | |
214
- | **[dsh-click](https://github.com/PerryLink/dsh-click)** | 跨平台原生桌面控制(DeepSeek Harness),Windows 优先。 | |
215
- | **[dsh-composer-history](https://github.com/PerryLink/dsh-composer-history)** | Web 输入框的终端式历史:方向键、Ctrl+R 搜索 | |
216
- | **[dsh-data-quality](https://github.com/PerryLink/dsh-data-quality)** | 数据集质量检查与引文核查(本插件可选消费的数字核查桥) | |
217
- | **[dsh-defend](https://github.com/PerryLink/dsh-defend)** | DeepSeek Harness 的提示注入、越狱与密钥泄露防护。 | |
218
- | **[dsh-doublecheck](https://github.com/PerryLink/dsh-doublecheck)** | 工程纪律守卫:需求质询、测试门禁、对手评审 | |
219
- | **[dsh-draw](https://github.com/PerryLink/dsh-draw)** | DeepSeek Harness 的统一静态图像生成路由。 | |
220
- | **[dsh-fast](https://github.com/PerryLink/dsh-fast)** | DeepSeek Harness 只读性能诊断。 | |
221
- | **[dsh-fund-research](https://github.com/PerryLink/dsh-fund-research)** | 面向中国公募基金的确定性研究报告 | |
222
- | **[dsh-github](https://github.com/PerryLink/dsh-github)** | 面向 DSH 的 GitHub PR/issues 集成,每次写入经审批门控 | |
223
- | **[dsh-industry-research](https://github.com/PerryLink/dsh-industry-research)** | 行业研究编排,经本插件的 `ctx.researchReport.assemble` 封存交付物 | |
224
- | **[dsh-library](https://github.com/PerryLink/dsh-library)** | DeepSeek Harness 的本地文档知识库。 | |
225
- | **[dsh-local-ai](https://github.com/PerryLink/dsh-local-ai)** | DeepSeek Harness 的本地模型(Ollama)接入。 | |
226
- | **[dsh-lsp-actions](https://github.com/PerryLink/dsh-lsp-actions)** | 通过语言服务器的 LSP 诊断、格式化、补全、代码操作与重命名 | |
227
- | **[dsh-mask](https://github.com/PerryLink/dsh-mask)** | PII 脱敏中间件:模型边界匿名化、展示层还原 | |
228
- | **[dsh-mcp-panel](https://github.com/PerryLink/dsh-mcp-panel)** | 只读 MCP 运行时面板:/mcp 命令 + 带状态、工具与错误的 Settings 标签页 | |
229
- | **[dsh-memento](https://github.com/PerryLink/dsh-memento)** | 审批门控的跨会话记忆:ctx.memory 接缝 + SQLite + 记忆工具 | |
230
- | **[dsh-output-styles](https://github.com/PerryLink/dsh-output-styles)** | Claude Code outputStyles 等价的运行时风格切换 | |
231
- | **[dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules)** | Claude Code 风格声明式 allow/deny/ask 权限规则,带审计 | |
232
- | **[dsh-personal-directive](https://github.com/PerryLink/dsh-personal-directive)** | 个人指令注入器:顶栏开关(框架版) |
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 | |
235
- | **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | 多渠道审批/提问桥接:微信/Telegram/飞书,会话控制台 |
236
- | **[dsh-research-report](https://github.com/PerryLink/dsh-research-report)** | 可验证研究报告引擎:内容寻址证据账本与封存版本 | |
237
- | **[dsh-score](https://github.com/PerryLink/dsh-score)** | DeepSeek Harness 插件的多维质量评分。 | |
238
- | **[dsh-session-pin](https://github.com/PerryLink/dsh-session-pin)** | 在 Web 侧栏置顶会话,带持久排序 | |
239
- | **[dsh-session-sync](https://github.com/PerryLink/dsh-session-sync)** | DeepSeek Harness 的跨设备会话同步——会话存储的专用 git 镜像。 | |
240
- | **[dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security)** | 安全审计技能包:密钥扫描、依赖与供应链审查 | |
241
- | **[dsh-talk](https://github.com/PerryLink/dsh-talk)** | DeepSeek Harness 的语音优先会话闭环:对它说,听它答。 | |
242
- | **[dsh-test-drive](https://github.com/PerryLink/dsh-test-drive)** | DeepSeek Harness 插件的隔离试装冒烟。 | |
243
- | **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | TickTick/滴答清单任务桥接:会话头面板 + 11 个工具 |
244
- | **[dsh-translate](https://github.com/PerryLink/dsh-translate)** | DeepSeek Harness 的厂商参数翻译与确定性 JSON 修复。 | |
245
- | **[dsh-wechat](https://github.com/pan17/dsh-wechat)** | 微信 ↔ DSH 桥接(Tencent iLink 机器人):文本/图片/文件/语音,聊天内审批卡片 |
210
+ | **[dsh-auto-review](https://github.com/PerryLink/dsh-auto-review)** | Second-model auto-review on the approval chain, fail-closed by default | |
246
211
  | **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | Automatic strong/cheap model-tier routing with deterministic risk guards and a `/tier` command | |
212
+ | **[dsh-background-agents](https://github.com/PerryLink/dsh-background-agents)** | Durable background child agents with a Web UI sidebar, messaging and interrupt | |
213
+ | **[dsh-budget](https://github.com/PerryLink/dsh-budget)** | Cost governance for DeepSeek Harness: budgets, carbon, and latency in one panel. | |
247
214
  | **[dsh-catalog](https://github.com/PerryLink/dsh-catalog)** | DSH Desktop Market standard catalog source for the PerryLink family | |
248
215
  | **[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 | |
216
+ | **[dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind)** | Claude Code /rewind-equivalent: snapshots, session forks, one-shot restore | |
217
+ | **[dsh-claude-move](https://github.com/PerryLink/dsh-claude-move)** | Migrate Claude Code sessions, memory, skills and CLAUDE.md into DSH | |
218
+ | **[dsh-click](https://github.com/PerryLink/dsh-click)** | Cross-platform native desktop control for DeepSeek Harness — Windows first. | |
219
+ | **[dsh-composer-history](https://github.com/PerryLink/dsh-composer-history)** | Terminal-style input history for the web composer: arrows, Ctrl+R search | |
220
+ | **[dsh-data-quality](https://github.com/PerryLink/dsh-data-quality)** | Dataset quality checks and citation cross-checks (the optional numeric bridge consumed here) | |
221
+ | **[dsh-defend](https://github.com/PerryLink/dsh-defend)** | Prompt-injection, jailbreak, and secret-leak defense for DeepSeek Harness. | |
222
+ | **[dsh-doublecheck](https://github.com/PerryLink/dsh-doublecheck)** | Engineering-discipline guard: requirements grill, test gates, adversary review | |
223
+ | **[dsh-draw](https://github.com/PerryLink/dsh-draw)** | Unified static-image generation routing for DeepSeek Harness. | |
224
+ | **[dsh-fast](https://github.com/PerryLink/dsh-fast)** | Read-only performance diagnostics for DeepSeek Harness. | |
225
+ | **[dsh-fund-research](https://github.com/PerryLink/dsh-fund-research)** | Deterministic research reports for Chinese public mutual funds | |
226
+ | **[dsh-github](https://github.com/PerryLink/dsh-github)** | GitHub PR/issues integration for DSH, every write gated by approval | |
227
+ | **[dsh-industry-research](https://github.com/PerryLink/dsh-industry-research)** | Industry research orchestration that seals its deliverables through this plugin's `ctx.researchReport.assemble` | |
228
+ | **[dsh-laya](https://github.com/PerryLink/dsh-laya)** | Laya typed decisions (`noul`/`choice`/`score`) as a first-class Cordis service and model-visible tools | |
229
+ | **[dsh-library](https://github.com/PerryLink/dsh-library)** | Local document knowledge base for DeepSeek Harness. | |
230
+ | **[dsh-local-ai](https://github.com/PerryLink/dsh-local-ai)** | Local-model (Ollama) integration for DeepSeek Harness. | |
231
+ | **[dsh-lsp-actions](https://github.com/PerryLink/dsh-lsp-actions)** | LSP diagnostics, formatting, completion, code actions and rename over language servers | |
232
+ | **[dsh-mask](https://github.com/PerryLink/dsh-mask)** | PII masking middleware: anonymize at the model boundary, restore at the display layer | |
233
+ | **[dsh-mcp-panel](https://github.com/PerryLink/dsh-mcp-panel)** | Read-only MCP runtime panel: /mcp command + Settings tab with status, tools and errors | |
234
+ | **[dsh-memento](https://github.com/PerryLink/dsh-memento)** | Approval-gated cross-session memory: ctx.memory seam + SQLite + memory tool | |
235
+ | **[dsh-observe](https://github.com/PerryLink/dsh-observe)** | OpenTelemetry and Langfuse observability exporter for DeepSeek Harness. | |
236
+ | **[dsh-output-styles](https://github.com/PerryLink/dsh-output-styles)** | Claude Code outputStyles-equivalent runtime style switching | |
237
+ | **[dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules)** | Claude Code-style declarative allow/deny/ask permission rules with audit | |
250
238
  | **[dsh-plugin-certification](https://github.com/PerryLink/dsh-plugin-certification)** | Community certification registry with repro-checkable grades and badges | |
239
+ | **[dsh-plugin-doctor](https://github.com/PerryLink/dsh-plugin-doctor)** | Zero-dependency static + sandbox smoke detector for DSH plugins | |
240
+ | **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | Plugin-development knowledge base as an on-demand agent skill | |
251
241
  | **[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 | |
242
+ | **[dsh-plugin-upgrade](https://github.com/PerryLink/dsh-plugin-upgrade)** | One-package, one-corridor-index plugin upgrade skill: routes a repository to the matching closed corridor card | |
253
243
  | **[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 | |
244
+ | **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | Multi-channel approval/question bridge: WeChat/Telegram/Feishu, session console | |
245
+ | **[dsh-research-report](https://github.com/PerryLink/dsh-research-report)** | Verifiable research-report engine: content-addressed evidence ledger and sealed versions | |
246
+ | **[dsh-score](https://github.com/PerryLink/dsh-score)** | Multi-dimensional quality scoring for DeepSeek Harness plugins. | |
247
+ | **[dsh-session-pin](https://github.com/PerryLink/dsh-session-pin)** | Pin sessions in the Web sidebar with durable ordering | |
248
+ | **[dsh-session-sync](https://github.com/PerryLink/dsh-session-sync)** | Cross-device session sync for DeepSeek Harness — a dedicated git mirror of your session store. | |
249
+ | **[dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security)** | Security-audit skill pack: secret scan, dependency and supply-chain review | |
250
+ | **[dsh-talk](https://github.com/PerryLink/dsh-talk)** | Voice-first session loop for DeepSeek Harness: talk to it, hear it answer. | |
254
251
  | **[dsh-team-rooms](https://github.com/PerryLink/dsh-team-rooms)** | Cross-session team rooms: shared message bus, task board and timeline | |
252
+ | **[dsh-test-drive](https://github.com/PerryLink/dsh-test-drive)** | Isolated install-and-smoke test drives for DeepSeek Harness plugins. | |
253
+ | **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | TickTick/Dida365 task bridge: session-header panel + 11 tools | |
254
+ | **[dsh-translate](https://github.com/PerryLink/dsh-translate)** | Vendor parameter translation and deterministic JSON repair for DeepSeek Harness. | |
255
+
255
256
 
256
257
  ## License
257
258
 
package/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  # 📊 dsh-observe
4
4
  - **1024 store channel**: `npm i -g dsh1024` once, then `dsh1024 plugin --profile web add dsh-observe` (counts toward the [deepseek1024.com](https://deepseek1024.com) install ranking).
5
5
  [![Gitee](https://img.shields.io/badge/Gitee-mirror-c71d23?logo=gitee)](https://gitee.com/perrylink/dsh-observe)
6
+ [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/PerryLink/dsh-observe/badge)](https://api.securityscorecards.dev/projects/github.com/PerryLink/dsh-observe)
6
7
 
7
8
  **OpenTelemetry and Langfuse observability exporter for DeepSeek Harness.**
8
9
 
@@ -11,6 +12,7 @@
11
12
  [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
12
13
  [![DSH plugin](https://img.shields.io/badge/dsh--plugin-✅-green)](https://github.com/topics/dsh-plugin)
13
14
  [![dsh-doctor](https://raw.githubusercontent.com/PerryLink/dsh-plugin-doctor/main/badges/PerryLink__dsh-observe.svg)](https://github.com/PerryLink/dsh-plugin-doctor#verified-徽章)
15
+ [![DSH Market](https://raw.githubusercontent.com/2BingLing/dsh-market/master/assets/readme/badge-listed-en.svg)](https://dsh.market/)
14
16
  [![Node](https://img.shields.io/badge/node-%5E22.19%20%7C%7C%20%3E%3D24-brightgreen.svg)](#)
15
17
  [![CI](https://img.shields.io/github/actions/workflow/status/PerryLink/dsh-observe/ci.yml?branch=main&label=CI)](https://github.com/PerryLink/dsh-observe/actions)
16
18
  [![Version](https://img.shields.io/github/v/tag/PerryLink/dsh-observe?label=version)](https://github.com/PerryLink/dsh-observe/releases)
@@ -27,7 +29,7 @@
27
29
 
28
30
  | Surface | Status |
29
31
  |---|---|
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). |
32
+ | Harness | DeepSeek Harness `dsh-v0.1.7-alpha.1` (adapted 2026-09-22): session format V4 represents a tool result as a first-class `role: 'tool'` message carrying top-level `toolCallId` + `content` + optional `isError` — the V3 `tool-result` content block is gone from the host's `ContentBlockMap`, and this plugin reads only the V4 shape (a pre-upgrade V3 log still projects through a read-only compatibility path). Session format V3's other traits carry over: the assistant stream is embedded in `assistant/message` / `assistant/attempt`, and the system prompt is 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 \|\| >=0.1.7-0 <0.2.0` keeps every published line installable (full local gate chain; the compat workflow covers the profile install smoke). |
31
33
  | Node | `^22.19.0 \|\| >=24.0.0` |
32
34
  | Backends | OpenTelemetry OTLP/HTTP (traces + metrics, JSON encoding) and Langfuse (LLM observability) — either or both |
33
35
  | Model | Model-agnostic: it exports the session/event stream; no model calls are made |
@@ -171,7 +173,7 @@ This plugin registers **no model tools** — it is a background exporter. Its su
171
173
 
172
174
  ## Known limitations
173
175
 
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.
176
+ - **npm 0.1.7-alpha.1** — the plugin is developed and tested against `@deepseek-ai/dsh@0.1.7-alpha.1` (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 || >=0.1.7-0 <0.2.0` keeps every published line installable, and the second ruler (`typecheck:ci`) plus the compat workflow cover the older baselines.
175
177
  - **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.
176
178
  - **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).
177
179
  - **No sampling** — every enabled span family is exported; set `capture.*` switches and `batch.maxBufferRecords` for high-volume sessions.
@@ -180,7 +182,7 @@ This plugin registers **no model tools** — it is a background exporter. Its su
180
182
 
181
183
  ```sh
182
184
  pnpm install # node ^22.19 || >=24
183
- pnpm run typecheck # tsc: src + tests against the 0.1.6-alpha.2 devDeps (no tsconfig paths)
185
+ pnpm run typecheck # tsc: src + tests against the 0.1.7-alpha.1 devDeps (no tsconfig paths)
184
186
  pnpm run typecheck:ci # tsc against the published line (no paths)
185
187
  pnpm run check:ruler-live # canary: must fail to compile, proving the ruler is live
186
188
  pnpm test # vitest: 126 tests, 18 suites (real Context/Session/storage seam)
@@ -202,13 +204,16 @@ pnpm pack # the published tarball
202
204
 
203
205
  ## PerryLink DSH Plugin Family
204
206
 
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:
207
+ This project is one of the **45 DeepSeek Harness plugins** maintained by [PerryLink](https://github.com/PerryLink). If this one helps you, the others likely will too:
206
208
 
207
209
  | Plugin | One-liner |
208
210
  |---|---|
209
211
  | **[dsh-auto-review](https://github.com/PerryLink/dsh-auto-review)** | Second-model auto-review on the approval chain, fail-closed by default | |
212
+ | **[dsh-autotier](https://github.com/PerryLink/dsh-autotier)** | Automatic strong/cheap model-tier routing with deterministic risk guards and a `/tier` command | |
210
213
  | **[dsh-background-agents](https://github.com/PerryLink/dsh-background-agents)** | Durable background child agents with a Web UI sidebar, messaging and interrupt | |
211
214
  | **[dsh-budget](https://github.com/PerryLink/dsh-budget)** | Cost governance for DeepSeek Harness: budgets, carbon, and latency in one panel. | |
215
+ | **[dsh-catalog](https://github.com/PerryLink/dsh-catalog)** | DSH Desktop Market standard catalog source for the PerryLink family | |
216
+ | **[dsh-cert-mcp](https://github.com/PerryLink/dsh-cert-mcp)** | Read-only MCP server exposing the certification registry: grades, snapshots and five-dimension evidence | |
212
217
  | **[dsh-checkpoint-rewind](https://github.com/PerryLink/dsh-checkpoint-rewind)** | Claude Code /rewind-equivalent: snapshots, session forks, one-shot restore | |
213
218
  | **[dsh-claude-move](https://github.com/PerryLink/dsh-claude-move)** | Migrate Claude Code sessions, memory, skills and CLAUDE.md into DSH | |
214
219
  | **[dsh-click](https://github.com/PerryLink/dsh-click)** | Cross-platform native desktop control for DeepSeek Harness — Windows first. | |
@@ -221,37 +226,34 @@ This project is one of the [40 DeepSeek Harness plugins](https://github.com/Perr
221
226
  | **[dsh-fund-research](https://github.com/PerryLink/dsh-fund-research)** | Deterministic research reports for Chinese public mutual funds | |
222
227
  | **[dsh-github](https://github.com/PerryLink/dsh-github)** | GitHub PR/issues integration for DSH, every write gated by approval | |
223
228
  | **[dsh-industry-research](https://github.com/PerryLink/dsh-industry-research)** | Industry research orchestration that seals its deliverables through this plugin's `ctx.researchReport.assemble` | |
229
+ | **[dsh-laya](https://github.com/PerryLink/dsh-laya)** | Laya typed decisions (`noul`/`choice`/`score`) as a first-class Cordis service and model-visible tools | |
224
230
  | **[dsh-library](https://github.com/PerryLink/dsh-library)** | Local document knowledge base for DeepSeek Harness. | |
225
231
  | **[dsh-local-ai](https://github.com/PerryLink/dsh-local-ai)** | Local-model (Ollama) integration for DeepSeek Harness. | |
226
232
  | **[dsh-lsp-actions](https://github.com/PerryLink/dsh-lsp-actions)** | LSP diagnostics, formatting, completion, code actions and rename over language servers | |
227
233
  | **[dsh-mask](https://github.com/PerryLink/dsh-mask)** | PII masking middleware: anonymize at the model boundary, restore at the display layer | |
228
234
  | **[dsh-mcp-panel](https://github.com/PerryLink/dsh-mcp-panel)** | Read-only MCP runtime panel: /mcp command + Settings tab with status, tools and errors | |
229
235
  | **[dsh-memento](https://github.com/PerryLink/dsh-memento)** | Approval-gated cross-session memory: ctx.memory seam + SQLite + memory tool | |
236
+ | **[dsh-observe](https://github.com/PerryLink/dsh-observe)** | OpenTelemetry and Langfuse observability exporter for DeepSeek Harness. | |
230
237
  | **[dsh-output-styles](https://github.com/PerryLink/dsh-output-styles)** | Claude Code outputStyles-equivalent runtime style switching | |
231
238
  | **[dsh-permission-rules](https://github.com/PerryLink/dsh-permission-rules)** | Claude Code-style declarative allow/deny/ask permission rules with audit | |
232
- | **[dsh-personal-directive](https://github.com/PerryLink/dsh-personal-directive)** | Personal directive injector with top-bar toggle (framework edition) |
233
- | **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | Plugin-development knowledge base as an on-demand agent skill | |
239
+ | **[dsh-plugin-certification](https://github.com/PerryLink/dsh-plugin-certification)** | Community certification registry with repro-checkable grades and badges | |
234
240
  | **[dsh-plugin-doctor](https://github.com/PerryLink/dsh-plugin-doctor)** | Zero-dependency static + sandbox smoke detector for DSH plugins | |
235
- | **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | Multi-channel approval/question bridge: WeChat/Telegram/Feishu, session console |
241
+ | **[dsh-plugin-guide](https://github.com/PerryLink/dsh-plugin-guide)** | Plugin-development knowledge base as an on-demand agent skill | |
242
+ | **[dsh-plugin-kit](https://github.com/PerryLink/dsh-plugin-kit)** | Shared zero-runtime-dependency toolkit for the PerryLink DSH plugins | |
243
+ | **[dsh-plugin-upgrade](https://github.com/PerryLink/dsh-plugin-upgrade)** | One-package, one-corridor-index plugin upgrade skill: routes a repository to the matching closed corridor card | |
244
+ | **[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 | |
245
+ | **[dsh-reach](https://github.com/PerryLink/dsh-reach)** | Multi-channel approval/question bridge: WeChat/Telegram/Feishu, session console | |
236
246
  | **[dsh-research-report](https://github.com/PerryLink/dsh-research-report)** | Verifiable research-report engine: content-addressed evidence ledger and sealed versions | |
237
247
  | **[dsh-score](https://github.com/PerryLink/dsh-score)** | Multi-dimensional quality scoring for DeepSeek Harness plugins. | |
238
248
  | **[dsh-session-pin](https://github.com/PerryLink/dsh-session-pin)** | Pin sessions in the Web sidebar with durable ordering | |
239
249
  | **[dsh-session-sync](https://github.com/PerryLink/dsh-session-sync)** | Cross-device session sync for DeepSeek Harness — a dedicated git mirror of your session store. | |
240
250
  | **[dsh-skill-pack-security](https://github.com/PerryLink/dsh-skill-pack-security)** | Security-audit skill pack: secret scan, dependency and supply-chain review | |
241
251
  | **[dsh-talk](https://github.com/PerryLink/dsh-talk)** | Voice-first session loop for DeepSeek Harness: talk to it, hear it answer. | |
252
+ | **[dsh-team-rooms](https://github.com/PerryLink/dsh-team-rooms)** | Cross-session team rooms: shared message bus, task board and timeline | |
242
253
  | **[dsh-test-drive](https://github.com/PerryLink/dsh-test-drive)** | Isolated install-and-smoke test drives for DeepSeek Harness plugins. | |
243
- | **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | TickTick/Dida365 task bridge: session-header panel + 11 tools |
254
+ | **[dsh-ticktick](https://github.com/PerryLink/dsh-ticktick)** | TickTick/Dida365 task bridge: session-header panel + 11 tools | |
244
255
  | **[dsh-translate](https://github.com/PerryLink/dsh-translate)** | Vendor parameter translation and deterministic JSON repair for DeepSeek Harness. | |
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 | |
256
+
255
257
 
256
258
  ### Install from the DSH Desktop Market
257
259
 
package/lib/index.js CHANGED
@@ -607,7 +607,7 @@ function langfuseId(...parts) {
607
607
  * @module dsh-observe/version
608
608
  */
609
609
  /** The dsh-observe package version, kept in sync with package.json. */
610
- const VERSION = "0.2.13";
610
+ const VERSION = "0.2.15";
611
611
  //#endregion
612
612
  //#region src/sinks.ts
613
613
  /** POST a JSON body with a timeout; throws on non-2xx. */
@@ -1258,40 +1258,85 @@ function costUsd(rule, usage) {
1258
1258
  //#endregion
1259
1259
  //#region src/project.ts
1260
1260
  /**
1261
+ * Read-only compatibility guard for the retired V3 tool-result wrapper.
1262
+ *
1263
+ * Structural, not a cast: a block that does not carry an array `content` is not
1264
+ * a wrapper, so a future or foreign block kind that happens to reuse the
1265
+ * `'tool-result'` tag cannot make the projection below recurse into nothing.
1266
+ *
1267
+ * This plugin is a pure consumer of tool results — it holds no path that
1268
+ * constructs a message or a content block — so there is no write-side
1269
+ * migration to perform here; keeping the read reachable is what lets a
1270
+ * pre-upgrade session log still project the output it already showed the model.
1271
+ * @param block - any block read off a logged message.
1272
+ * @returns whether the block is the retired V3 tool-result wrapper.
1273
+ */
1274
+ function isRetiredToolResultWrapper(block) {
1275
+ return block !== null && typeof block === "object" && block.type === "tool-result" && Array.isArray(block.content);
1276
+ }
1277
+ /**
1261
1278
  * Project content blocks to one compact plain-text string. Text and
1262
1279
  * reasoning deltas pass through verbatim; tool calls render as
1263
- * `<tool-call name(arguments)>`; images render as `[image]`; tool results
1264
- * recurse. Unknown block types (merge-extensible) are skipped — they carry
1265
- * no projectable text.
1280
+ * `<tool-call name(arguments)>`; images render as `[image]`. Unknown block
1281
+ * types (merge-extensible) are skipped — they carry no projectable text.
1266
1282
  * @param blocks - the model-facing content blocks.
1267
1283
  * @returns the joined projection.
1268
1284
  */
1269
1285
  function projectContent(blocks) {
1270
1286
  const parts = [];
1271
- for (const block of blocks) switch (block.type) {
1272
- case "text":
1273
- parts.push(block.text);
1274
- break;
1275
- case "reasoning":
1276
- parts.push(block.text);
1277
- break;
1278
- case "tool-call":
1279
- parts.push(`<tool-call ${block.name}(${block.arguments})>`);
1280
- break;
1281
- case "image":
1282
- parts.push("[image]");
1283
- break;
1284
- case "tool-result": parts.push(projectContent(block.content) + (block.isError === true ? " [error]" : ""));
1287
+ for (const block of blocks) {
1288
+ if (isRetiredToolResultWrapper(block)) {
1289
+ parts.push(projectContent(block.content));
1290
+ continue;
1291
+ }
1292
+ if (block === null || typeof block !== "object") continue;
1293
+ const typed = block;
1294
+ switch (typed.type) {
1295
+ case "text":
1296
+ parts.push(typed.text);
1297
+ break;
1298
+ case "reasoning":
1299
+ parts.push(typed.text);
1300
+ break;
1301
+ case "tool-call":
1302
+ parts.push(`<tool-call ${typed.name}(${typed.arguments})>`);
1303
+ break;
1304
+ case "image": parts.push("[image]");
1305
+ }
1285
1306
  }
1286
1307
  return parts.join("\n");
1287
1308
  }
1288
1309
  /**
1310
+ * Project one message's content.
1311
+ *
1312
+ * A tool-role message carries its failure flag on the MESSAGE (`isError`), not
1313
+ * on any block, so it needs `projectToolMessage` to reproduce the `[error]`
1314
+ * marker the model saw. Every other role keeps the plain block projection.
1315
+ * @param message - the logged message.
1316
+ * @returns the projection of its content.
1317
+ */
1318
+ function projectMessageContent(message) {
1319
+ return message.role === "tool" ? projectToolMessage(message) : projectContent(message.content);
1320
+ }
1321
+ /**
1322
+ * Project one first-class V4 tool-role message, surfacing its failure flag.
1323
+ *
1324
+ * V4 moved the tool result out of the content blocks and onto the message, so
1325
+ * the `[error]` marker has to be appended here — projecting the blocks alone
1326
+ * would drop it and report a failed tool as a successful one.
1327
+ * @param message - the logged tool-role message.
1328
+ * @returns the projected result text, marked when the invocation failed.
1329
+ */
1330
+ function projectToolMessage(message) {
1331
+ return projectContent(message.content) + (message.isError === true ? " [error]" : "");
1332
+ }
1333
+ /**
1289
1334
  * Project one message with its role prefix.
1290
1335
  * @param message - the logged message.
1291
1336
  * @returns `[role] content` on one logical line.
1292
1337
  */
1293
1338
  function projectMessage(message) {
1294
- return `[${message.role}] ${projectContent(message.content)}`;
1339
+ return `[${message.role}] ${projectMessageContent(message)}`;
1295
1340
  }
1296
1341
  //#endregion
1297
1342
  //#region src/sanitize.ts
@@ -1697,7 +1742,7 @@ var Collector = class {
1697
1742
  attributes["tool.error.code"] = this.attr(event.data.error.code);
1698
1743
  }
1699
1744
  const input = sanitizeJsonText(open.arguments, this.config.sanitize.truncateToolInputChars, this.config.sanitize);
1700
- const output = sanitizeText(projectContent(event.data.message.content), this.config.sanitize.truncateToolOutputChars, this.config.sanitize);
1745
+ const output = sanitizeText(projectToolMessage(event.data.message), this.config.sanitize.truncateToolOutputChars, this.config.sanitize);
1701
1746
  this.onSpan({
1702
1747
  kind: "tool",
1703
1748
  sessionId: session.id,
@@ -1 +1 @@
1
- {"version":3,"file":"collector.d.ts","sourceRoot":"","sources":["../../src/collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,OAAO,KAAK,EAA+B,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAClG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,KAAK,EAAc,YAAY,EAAE,UAAU,EAAe,MAAM,YAAY,CAAA;AAInF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAK/C;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,OAAO,EAAE,OAAO,GAAG;QACzB,WAAW,EAAE,MAAM,CAAA;QACnB,QAAQ,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,CAAA;SAAE,CAAA;KAC7B,CAAA;CACF;AAiID;;;GAGG;AACH,qBAAa,SAAS;IAWlB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAdzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;IAE9D;;;;;;OAMG;gBAEgB,MAAM,EAAE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;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAmBrB,6FAA6F;IAC7F,OAAO,CAAC,OAAO;IAOf,uDAAuD;IACvD,OAAO,CAAC,cAAc;IAatB,+CAA+C;IAC/C,OAAO,CAAC,IAAI;CAGb"}
@@ -12,7 +12,7 @@
12
12
  * @module dsh-observe/collector
13
13
  */
14
14
  import { findPrice, costUsd } from "./pricing.js";
15
- import { projectContent, projectMessage } from "./project.js";
15
+ import { projectContent, projectMessage, projectToolMessage } from "./project.js";
16
16
  import { sanitizeJsonText, sanitizeText } from "./sanitize.js";
17
17
  /** Milliseconds → Unix nanoseconds. */
18
18
  const NANO = 1_000_000;
@@ -357,7 +357,10 @@ export class Collector {
357
357
  attributes['tool.error.code'] = this.attr(event.data.error.code);
358
358
  }
359
359
  const input = sanitizeJsonText(open.arguments, this.config.sanitize.truncateToolInputChars, this.config.sanitize);
360
- const output = sanitizeText(projectContent(event.data.message.content), this.config.sanitize.truncateToolOutputChars, this.config.sanitize);
360
+ // V4 carries the tool outcome on the MESSAGE (`isError`), so the projected
361
+ // output must go through `projectToolMessage`; projecting `content` alone
362
+ // would drop the `[error]` marker and report a failed tool as a success.
363
+ const output = sanitizeText(projectToolMessage(event.data.message), this.config.sanitize.truncateToolOutputChars, this.config.sanitize);
361
364
  this.onSpan({
362
365
  kind: 'tool',
363
366
  sessionId: session.id,
@@ -1 +1 @@
1
- {"version":3,"file":"collector.js","sourceRoot":"","sources":["../../src/collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAG9D,uCAAuC;AACvC,MAAM,IAAI,GAAG,SAAS,CAAA;AAmDtB,kEAAkE;AAClE,SAAS,cAAc,CAAC,KAA6B;I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D,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YACjF,UAAU,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAA;QACpE,CAAC;QACD,OAAO,UAAU,CAAA;IACnB,CAAC;IAED,+CAA+C;IACvC,IAAI,CAAC,KAAa;QACxB,OAAO,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC/F,CAAC;CACF"}
@@ -7,20 +7,82 @@
7
7
  * @module dsh-observe/project
8
8
  */
9
9
  import type { ContentBlock, Message } from '@deepseek-ai/dsh-llm';
10
+ /**
11
+ * The **retired** session-format-V3 tool-result wrapper.
12
+ *
13
+ * Through the V3 format a tool result was a content BLOCK nested inside a
14
+ * message's content:
15
+ * `{ type: 'tool-result', source: { callId }, content: [...] }`. Since the V4
16
+ * format a tool result is a first-class `role: 'tool'` message instead
17
+ * (`ToolResultMessage`: top-level `toolCallId` + `content` + optional
18
+ * `isError`), `'tool-result'` is no longer a member of the host's
19
+ * `ContentBlockMap`, and the host refuses the retired wrapper at **physical
20
+ * row admission** — `assertV4ToolResultMessage` rejects any tool-role content
21
+ * that still nests one (`packages/session/session-format-v3-to-v4/src/tool-role.ts`,
22
+ * "content must not contain a released tool-result wrapper").
23
+ *
24
+ * This type exists ONLY so the read path below can still describe, and
25
+ * therefore still project, a log written before the upgrade. It is deliberately
26
+ * absent from `ContentBlock`, so no V4-shaped code can produce one by accident:
27
+ * the sole way to obtain this shape is the {@link isRetiredToolResultWrapper}
28
+ * guard. This module never constructs one.
29
+ */
30
+ interface RetiredToolResultBlock {
31
+ readonly type: 'tool-result';
32
+ readonly content: readonly ContentBlock[];
33
+ }
34
+ /**
35
+ * Read-only compatibility guard for the retired V3 tool-result wrapper.
36
+ *
37
+ * Structural, not a cast: a block that does not carry an array `content` is not
38
+ * a wrapper, so a future or foreign block kind that happens to reuse the
39
+ * `'tool-result'` tag cannot make the projection below recurse into nothing.
40
+ *
41
+ * This plugin is a pure consumer of tool results — it holds no path that
42
+ * constructs a message or a content block — so there is no write-side
43
+ * migration to perform here; keeping the read reachable is what lets a
44
+ * pre-upgrade session log still project the output it already showed the model.
45
+ * @param block - any block read off a logged message.
46
+ * @returns whether the block is the retired V3 tool-result wrapper.
47
+ */
48
+ export declare function isRetiredToolResultWrapper(block: unknown): block is RetiredToolResultBlock;
10
49
  /**
11
50
  * Project content blocks to one compact plain-text string. Text and
12
51
  * reasoning deltas pass through verbatim; tool calls render as
13
- * `<tool-call name(arguments)>`; images render as `[image]`; tool results
14
- * recurse. Unknown block types (merge-extensible) are skipped — they carry
15
- * no projectable text.
52
+ * `<tool-call name(arguments)>`; images render as `[image]`. Unknown block
53
+ * types (merge-extensible) are skipped — they carry no projectable text.
16
54
  * @param blocks - the model-facing content blocks.
17
55
  * @returns the joined projection.
18
56
  */
19
57
  export declare function projectContent(blocks: readonly ContentBlock[]): string;
58
+ /**
59
+ * Project one message's content.
60
+ *
61
+ * A tool-role message carries its failure flag on the MESSAGE (`isError`), not
62
+ * on any block, so it needs `projectToolMessage` to reproduce the `[error]`
63
+ * marker the model saw. Every other role keeps the plain block projection.
64
+ * @param message - the logged message.
65
+ * @returns the projection of its content.
66
+ */
67
+ export declare function projectMessageContent(message: Message): string;
68
+ /**
69
+ * Project one first-class V4 tool-role message, surfacing its failure flag.
70
+ *
71
+ * V4 moved the tool result out of the content blocks and onto the message, so
72
+ * the `[error]` marker has to be appended here — projecting the blocks alone
73
+ * would drop it and report a failed tool as a successful one.
74
+ * @param message - the logged tool-role message.
75
+ * @returns the projected result text, marked when the invocation failed.
76
+ */
77
+ export declare function projectToolMessage(message: {
78
+ readonly content: readonly ContentBlock[];
79
+ readonly isError?: boolean;
80
+ }): string;
20
81
  /**
21
82
  * Project one message with its role prefix.
22
83
  * @param message - the logged message.
23
84
  * @returns `[role] content` on one logical line.
24
85
  */
25
86
  export declare function projectMessage(message: Message): string;
87
+ export {};
26
88
  //# sourceMappingURL=project.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/project.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEjE;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,CAyBtE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEvD"}
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/project.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEjE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAA;CAC1C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,sBAAsB,CAK1F;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,MAAM,CAoCtE;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAI9D;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,QAAQ,CAAC,OAAO,EAAE,SAAS,YAAY,EAAE,CAAA;IACzC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAC3B,GAAG,MAAM,CAET;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEvD"}