dsh-claude-compat 0.8.2 → 0.8.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +4 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-claude-compat",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
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,14 +406,13 @@ 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 === 'plugin' && m.source.plugin === 'dsh-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
+ // dsh 0.1.2 made the event log private — exact lookup is eventAt(seq),
410
+ // the same API dsh core uses for its own surface scans. Legacy dsh
411
+ // exposed a plain session.events array; keep an optional fallback.
413
412
  const alreadyInjected = present(messages)
414
413
  || present(decision.messages)
415
414
  || agent.session.surface.nodes.some((seq) => {
416
- const event = events[seq];
415
+ const event = agent.session.eventAt?.(seq) ?? agent.session.events?.[seq];
417
416
  return event?.type === 'user/message'
418
417
  && event.data?.source?.kind === 'plugin'
419
418
  && event.data.source.plugin === 'dsh-claude-compat';