dsh-claude-compat 0.8.0 → 0.8.1

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.md CHANGED
@@ -8,7 +8,7 @@
8
8
  <a href="README.zh-CN.md"><img src="https://img.shields.io/badge/🌐_įŽ€äŊ“中文-į‚šæˆ‘é˜…č¯ģ中文-red?style=for-the-badge" alt="įŽ€äŊ“中文"></a>
9
9
  <img src="https://img.shields.io/npm/dm/dsh-claude-compat?style=flat-square&label=downloads/month&color=brightgreen" alt="npm downloads/month">
10
10
  <img src="https://img.shields.io/npm/dt/dsh-claude-compat?style=flat-square&label=total%20downloads&color=blue" alt="npm total downloads">
11
- <img src="https://img.shields.io/badge/version-0.8.0-blue?style=flat-square" alt="Version">
11
+ <img src="https://img.shields.io/badge/version-0.8.1-blue?style=flat-square" alt="Version">
12
12
  <img src="https://img.shields.io/badge/license-MIT-orange?style=flat-square" alt="License">
13
13
  </p>
14
14
 
package/README.zh-CN.md CHANGED
@@ -8,7 +8,7 @@
8
8
  <a href="README.md"><img src="https://img.shields.io/badge/🌐_English-Click_me-red?style=for-the-badge" alt="English"></a>
9
9
  <img src="https://img.shields.io/npm/dm/dsh-claude-compat?style=flat-square&label=downloads/month&color=brightgreen" alt="npm downloads/month">
10
10
  <img src="https://img.shields.io/npm/dt/dsh-claude-compat?style=flat-square&label=total%20downloads&color=blue" alt="npm total downloads">
11
- <img src="https://img.shields.io/badge/version-0.8.0-blue?style=flat-square" alt="Version">
11
+ <img src="https://img.shields.io/badge/version-0.8.1-blue?style=flat-square" alt="Version">
12
12
  <img src="https://img.shields.io/badge/license-MIT-orange?style=flat-square" alt="License">
13
13
  </p>
14
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-claude-compat",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "DeepSeek Harness plugin: bridge Claude Code's .claude/ directories (project and ~/.claude: skills, commands, rules) into DSH native skill registry and message-stream rules injection.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -406,10 +406,14 @@ function registerRulesSection(ctx, config) {
406
406
  const decision = await next();
407
407
  if (decision.kind !== 'enter') return decision;
408
408
  const present = (list) => list.some((m) => m?.source?.kind === 'claude-compat');
409
+ // Take one snapshot outside the loop: Session has no `events` property
410
+ // (dsh 0.1.2-rc.1) — snapshotEvents() is the public API. Indexing the
411
+ // snapshot by seq is stable and avoids re-materializing per node.
412
+ const events = agent.session.snapshotEvents();
409
413
  const alreadyInjected = present(messages)
410
414
  || present(decision.messages)
411
415
  || agent.session.surface.nodes.some((seq) => {
412
- const event = agent.session.events[seq];
416
+ const event = events[seq];
413
417
  return event?.type === 'user/message'
414
418
  && event.data?.source?.kind === 'claude-compat';
415
419
  });