dsh-claude-compat 0.8.1 → 0.8.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-claude-compat",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
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",
@@ -60,5 +60,9 @@
60
60
  },
61
61
  "bin": {
62
62
  "dsh-claude-compat-restart": "scripts/dsh-restart.sh"
63
+ },
64
+ "repository": {
65
+ "type": "git",
66
+ "url": "https://github.com/biedongbin/dsh-claude-compat.git"
63
67
  }
64
- }
68
+ }
package/src/hooks.js CHANGED
@@ -108,7 +108,7 @@ export function mapPostHookOutput(exitCode, stdout, { warn = console.warn } = {}
108
108
  kind: 'accept',
109
109
  additionalContexts: [createUserMessage({
110
110
  content: [{ type: 'text', text: additional }],
111
- source: { kind: 'claude-compat', form: 'hook-context' },
111
+ source: { kind: 'plugin', plugin: 'dsh-claude-compat', form: 'hook-context' },
112
112
  })],
113
113
  };
114
114
  }
@@ -339,7 +339,7 @@ async function runPromptHooks(hooks, agent, config) {
339
339
  if (text === '') continue;
340
340
  extra.push(createUserMessage({
341
341
  content: [{ type: 'text', text }],
342
- source: { kind: 'claude-compat', form: 'hook-context' },
342
+ source: { kind: 'plugin', plugin: 'dsh-claude-compat', form: 'hook-context' },
343
343
  }));
344
344
  }
345
345
  return extra.length > 0 ? extra : undefined;
package/src/index.js CHANGED
@@ -405,7 +405,7 @@ function registerRulesSection(ctx, config) {
405
405
  ctx.on('agent/pre-step', async ({ agent, messages }, next) => {
406
406
  const decision = await next();
407
407
  if (decision.kind !== 'enter') return decision;
408
- const present = (list) => list.some((m) => m?.source?.kind === 'claude-compat');
408
+ const present = (list) => list.some((m) => m?.source?.kind === 'plugin' && m.source.plugin === 'dsh-claude-compat');
409
409
  // Take one snapshot outside the loop: Session has no `events` property
410
410
  // (dsh 0.1.2-rc.1) — snapshotEvents() is the public API. Indexing the
411
411
  // snapshot by seq is stable and avoids re-materializing per node.
@@ -415,7 +415,8 @@ function registerRulesSection(ctx, config) {
415
415
  || agent.session.surface.nodes.some((seq) => {
416
416
  const event = events[seq];
417
417
  return event?.type === 'user/message'
418
- && event.data?.source?.kind === 'claude-compat';
418
+ && event.data?.source?.kind === 'plugin'
419
+ && event.data.source.plugin === 'dsh-claude-compat';
419
420
  });
420
421
  if (alreadyInjected) return decision;
421
422
  // Session cwd, NOT process.cwd() — the DSH process may be launched from
@@ -430,7 +431,7 @@ function registerRulesSection(ctx, config) {
430
431
  // of the message array. Not in system prompt.
431
432
  cache.set(cwd, createUserMessage({
432
433
  content: [{ type: 'text', text }],
433
- source: { kind: 'claude-compat', form: 'rules' },
434
+ source: { kind: 'plugin', plugin: 'dsh-claude-compat', form: 'rules' },
434
435
  }));
435
436
  }
436
437
  return {