dsh-deja 0.20.0 → 0.20.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.
Files changed (2) hide show
  1. package/index.js +26 -1
  2. package/package.json +4 -3
package/index.js CHANGED
@@ -7,6 +7,9 @@
7
7
 
8
8
  import { createRequire } from "node:module";
9
9
  import { execFileSync } from "node:child_process";
10
+ import { existsSync } from "node:fs";
11
+ import { homedir } from "node:os";
12
+ import { join } from "node:path";
10
13
 
11
14
  const require = createRequire(import.meta.url);
12
15
 
@@ -289,9 +292,31 @@ function isHuman(message) {
289
292
  return Boolean(message) && (!message.source || message.source.kind === "user");
290
293
  }
291
294
 
295
+ // cliPluginDir is where `deja install dsh` writes plugins of its own. A user
296
+ // who ran the installer and then added this package has both in the profile:
297
+ // two `/deja` commands and the same recall on the system prompt twice. The
298
+ // files on disk win — the installer keeps them current — and this package then
299
+ // contributes only what they do not: the model-facing tools.
300
+ function cliPluginDir() {
301
+ const home = process.env.DSH_HOME || join(homedir(), ".dsh");
302
+ return join(home, "plugins", "deja");
303
+ }
304
+
305
+ function installedByCLI(file) {
306
+ try {
307
+ return existsSync(join(cliPluginDir(), file));
308
+ } catch {
309
+ return false;
310
+ }
311
+ }
312
+
292
313
  function apply(ctx, config) {
293
314
  tools(ctx);
294
- command(ctx);
315
+ // Each half stands down on its own: `deja install dsh` writes command.js,
316
+ // and only `deja install dsh-auto` adds auto.js, so a profile can have the
317
+ // command from the installer and still want recall from here.
318
+ if (!installedByCLI("command.js")) command(ctx);
319
+ if (installedByCLI("auto.js")) return;
295
320
  if (!config || config.autoRecall !== false) autoRecall(ctx);
296
321
  }
297
322
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-deja",
3
- "version": "0.20.0",
3
+ "version": "0.20.2",
4
4
  "description": "Brings the session history of nineteen other coding agents into DeepSeek Harness: recall, session digest and per-file history tools over a local index, plus optional automatic recall before each step.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -18,9 +18,10 @@
18
18
  "license": "MIT",
19
19
  "repository": {
20
20
  "type": "git",
21
- "url": "git+https://github.com/vshulcz/dsh-deja.git"
21
+ "url": "git+https://github.com/vshulcz/deja-vu.git",
22
+ "directory": "extensions/dsh"
22
23
  },
23
- "homepage": "https://github.com/vshulcz/dsh-deja",
24
+ "homepage": "https://github.com/vshulcz/deja-vu/tree/main/extensions/dsh",
24
25
  "bugs": {
25
26
  "url": "https://github.com/vshulcz/deja-vu/issues"
26
27
  },