dsh-deja 0.20.5 → 0.20.6
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 +1 -1
- package/index.js +38 -2
- package/package.json +10 -4
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ DeepSeek Harness can already search its own sessions — that is what the built-
|
|
|
6
6
|
`session-query` subsystem does. This plugin answers the other question: what you
|
|
7
7
|
did in the *other* agents on this machine.
|
|
8
8
|
|
|
9
|
-
deja indexes the session files that twenty-
|
|
9
|
+
deja indexes the session files that twenty-four other coding agents — Claude Code,
|
|
10
10
|
Codex, Cursor, opencode, Antigravity, Grok Build, Kimi, Cline and Zed among
|
|
11
11
|
them — already write to disk. Nothing has to have been recorded ahead of time: the history is already
|
|
12
12
|
there, including the months before deja was installed. If you moved to dsh last
|
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// dsh answers questions about its own sessions through the built-in
|
|
4
4
|
// session-query subsystem. This plugin answers the other question: what you did
|
|
5
|
-
// in Claude Code, Codex, Cursor, opencode and
|
|
5
|
+
// in Claude Code, Codex, Cursor, opencode and twenty-one more agents, on this
|
|
6
6
|
// machine, before dsh existed. The index is deja's; this file is the seam.
|
|
7
7
|
|
|
8
8
|
import { createRequire } from "node:module";
|
|
@@ -258,6 +258,39 @@ function userText(message) {
|
|
|
258
258
|
// needs. installedByCLI() below is the first line of defence; this is the one
|
|
259
259
|
// that holds when the installer wrote to a different DSH_HOME than the profile
|
|
260
260
|
// boots from.
|
|
261
|
+
// autoDigest puts what this project settled in front of the model once at the
|
|
262
|
+
// start of the session — the question-independent counterpart to autoRecall.
|
|
263
|
+
// dsh's own agent/session-start is emit-only, its return reaches nothing, so
|
|
264
|
+
// the digest rides the same assembly seam the recall does. deja_once keys the
|
|
265
|
+
// one-shot on the session id in deja's ledger, which survives a resume in a new
|
|
266
|
+
// process; the Set is the in-process guard that keeps the long-lived web and
|
|
267
|
+
// tui profiles from spawning deja on every assembly of a session already shown.
|
|
268
|
+
function autoDigest(ctx) {
|
|
269
|
+
const seen = new Set();
|
|
270
|
+
|
|
271
|
+
guarded(() =>
|
|
272
|
+
ctx.systemPrompt.context({
|
|
273
|
+
name: "deja:project",
|
|
274
|
+
order: 110,
|
|
275
|
+
text: (assembly) => {
|
|
276
|
+
const agent = assembly && assembly.agent;
|
|
277
|
+
if (!agent) return "";
|
|
278
|
+
const sid = sessionId(agent);
|
|
279
|
+
if (sid && seen.has(sid)) return "";
|
|
280
|
+
if (sid) seen.add(sid);
|
|
281
|
+
return run(
|
|
282
|
+
["hook-context", "--plain"],
|
|
283
|
+
JSON.stringify({ session_id: sid, cwd: process.cwd(), source: "startup", deja_once: true }),
|
|
284
|
+
);
|
|
285
|
+
},
|
|
286
|
+
}),
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function sessionId(agent) {
|
|
291
|
+
return (agent && (agent.sessionId || (agent.session && agent.session.id))) || "";
|
|
292
|
+
}
|
|
293
|
+
|
|
261
294
|
function autoRecall(ctx) {
|
|
262
295
|
let asked = "";
|
|
263
296
|
let recalled = "";
|
|
@@ -339,7 +372,10 @@ function apply(ctx, config) {
|
|
|
339
372
|
);
|
|
340
373
|
if (adds.tools) tools(ctx);
|
|
341
374
|
if (adds.command) command(ctx);
|
|
342
|
-
if (adds.recall)
|
|
375
|
+
if (adds.recall) {
|
|
376
|
+
autoDigest(ctx);
|
|
377
|
+
autoRecall(ctx);
|
|
378
|
+
}
|
|
343
379
|
}
|
|
344
380
|
|
|
345
381
|
apply.inject = ["tools", "commands", "systemPrompt"];
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-deja",
|
|
3
|
-
"version": "0.20.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.20.6",
|
|
4
|
+
"description": "deja-vu memory for DeepSeek Harness: the session history of twenty-four other coding agents, searchable and recalled before each step — a local index, no LLM.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"exports": {
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"url": "git+https://github.com/vshulcz/deja-vu.git",
|
|
23
23
|
"directory": "extensions/dsh"
|
|
24
24
|
},
|
|
25
|
-
"homepage": "https://github.
|
|
25
|
+
"homepage": "https://vshulcz.github.io/deja-vu/guide/memory-for-dsh.html",
|
|
26
26
|
"bugs": {
|
|
27
27
|
"url": "https://github.com/vshulcz/deja-vu/issues"
|
|
28
28
|
},
|
|
@@ -41,10 +41,16 @@
|
|
|
41
41
|
"dsh": {
|
|
42
42
|
"bundle": {
|
|
43
43
|
"patch": "./cordis.patch.yml"
|
|
44
|
+
},
|
|
45
|
+
"compatibility": {
|
|
46
|
+
"dsh": "0.1.1-rc.2",
|
|
47
|
+
"dshReleases": {
|
|
48
|
+
"0.1.1-rc.2": "compatible"
|
|
49
|
+
}
|
|
44
50
|
}
|
|
45
51
|
},
|
|
46
52
|
"dependencies": {
|
|
47
|
-
"@vshulcz/deja-vu": "^0.19.
|
|
53
|
+
"@vshulcz/deja-vu": "^0.19.5"
|
|
48
54
|
},
|
|
49
55
|
"scripts": {
|
|
50
56
|
"test": "node --test test/*.test.js"
|