@vectorize-io/hindsight-coding-agents 0.3.3 → 0.3.4
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 +23 -5
- package/cordis.patch.yml +18 -0
- package/dist/antigravity-hook.js +17 -3
- package/dist/antigravity-stop-hook.js +16 -2
- package/dist/claude-hook.js +17 -3
- package/dist/claude-stop-hook.js +16 -2
- package/dist/cline.js +20 -6
- package/dist/codex-hook.js +17 -3
- package/dist/codex-stop-hook.js +16 -2
- package/dist/copilot-hook.js +17 -3
- package/dist/copilot-stop-hook.js +16 -2
- package/dist/cursor-hook.js +17 -3
- package/dist/cursor-stop-hook.js +16 -2
- package/dist/deepen.js +27 -3
- package/dist/devin-hook.js +17 -3
- package/dist/devin-stop-hook.js +16 -2
- package/dist/dsh.js +17042 -0
- package/dist/grok-hook.js +17 -3
- package/dist/grok-stop-hook.js +16 -2
- package/dist/index.js +20 -6
- package/dist/installer.js +189 -1
- package/dist/kilo.js +20 -6
- package/dist/mcp-server.js +47 -33
- package/dist/prime-agent.js +20 -6
- package/package.json +18 -2
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Long-term project memory for **coding agents**, backed by [Hindsight](https://vectorize.io/hindsight).
|
|
4
4
|
One package, several agents: a shared reflect-and-inject core with a thin entry point per agent
|
|
5
|
-
(**opencode**, **Kilo CLI**, **Cline CLI**, **Prime Agent**, **Claude Code**, **Codex CLI**, **Antigravity CLI**, **Cursor CLI**, **GitHub Copilot CLI**, **Grok Build**). Ingestion is fully
|
|
5
|
+
(**opencode**, **Kilo CLI**, **Cline CLI**, **Prime Agent**, **DeepSeek Harness**, **Claude Code**, **Codex CLI**, **Antigravity CLI**, **Cursor CLI**, **GitHub Copilot CLI**, **Grok Build**). Ingestion is fully
|
|
6
6
|
automatic — there is no setup command: a repo's git history and conversations flow into its memory
|
|
7
7
|
bank in the background as you work.
|
|
8
8
|
|
|
@@ -120,6 +120,21 @@ npx @vectorize-io/hindsight-coding-agents install prime-agent
|
|
|
120
120
|
|
|
121
121
|
An extension entry in `~/.prime/agent/settings.json` — native tools, no MCP needed.
|
|
122
122
|
|
|
123
|
+
#### <img src="https://hindsight.vectorize.io/img/harness/dsh.svg" alt="" width="20" height="20" /> DeepSeek Harness
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npx @vectorize-io/hindsight-coding-agents install dsh
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
A Cordis plugin row in `$DSH_HOME/cordis.patch.yml` (`~/.dsh` by default), which every dsh profile
|
|
130
|
+
composes — native tools, no MCP needed. Two dsh-specific notes: one dsh process serves **several
|
|
131
|
+
repositories** (its Web UI opens each session in whatever directory you pick), so the bank is
|
|
132
|
+
resolved per session workspace rather than once per process; and dsh has no plugin-facing notice
|
|
133
|
+
channel, so the seed line goes to the plugin log rather than the UI. Everything model-facing —
|
|
134
|
+
recalled memory, the knowledge preamble, the `hindsight_*` tools — is unaffected. If you prefer the
|
|
135
|
+
published-package route, `dsh plugin --profile web add @vectorize-io/hindsight-coding-agents` works
|
|
136
|
+
too: the package ships the profile patch layer, so nothing else needs editing.
|
|
137
|
+
|
|
123
138
|
Uninstall the same way: `npx @vectorize-io/hindsight-coding-agents uninstall claude-code` (or `uninstall all`).
|
|
124
139
|
|
|
125
140
|
**Devin CLI needs Node 22.5 or newer.** Its hooks pass only a session id — the conversation itself
|
|
@@ -153,7 +168,8 @@ minimal, hand-wired setup.
|
|
|
153
168
|
|
|
154
169
|
Adding an agent: hook-based → write a `HookSpec` entry point (see `src/cursor-hook.ts`) and register
|
|
155
170
|
a `hookAdapter` in `src/harness/registry.ts`; persistent-plugin → implement `HarnessAdapter`
|
|
156
|
-
(`src/core/types.ts`) fully (see `src/harness/opencode.ts`)
|
|
171
|
+
(`src/core/types.ts`) fully (see `src/harness/opencode.ts`), or bind the host's own plugin API to
|
|
172
|
+
`RuntimeCore` directly when it is not an opencode fork (see `src/cline.ts`, `src/dsh.ts`).
|
|
157
173
|
|
|
158
174
|
## Migrating from the per-agent plugins
|
|
159
175
|
|
|
@@ -186,12 +202,14 @@ transcripts are needed either way; going through them directly is simply the sho
|
|
|
186
202
|
|
|
187
203
|
**How sessions are matched.** A conversation is imported only when the session itself records the
|
|
188
204
|
directory it ran in — never inferred from a file or folder name. Claude Code writes that directory
|
|
189
|
-
on its entries
|
|
190
|
-
sessions started in a subdirectory of the repo. Guessing was tempting (Claude names its history
|
|
205
|
+
on its entries, Codex in its `session_meta` header and DeepSeek Harness in its session-log header,
|
|
206
|
+
so all three can be attributed exactly, including sessions started in a subdirectory of the repo. Guessing was tempting (Claude names its history
|
|
191
207
|
folders after the project path) but unsafe: `/` and `.` both encode to `-`, so `repo-sub` is either
|
|
192
208
|
the subdirectory `repo/sub` or an unrelated sibling repo — and a wrong guess files someone else's
|
|
193
209
|
conversation into your bank. Sessions that record nothing are skipped and the count is reported.
|
|
194
|
-
|
|
210
|
+
DeepSeek Harness logs are Zstandard-framed JSONL under `$DSH_HOME/sessions`, which needs Node 22.15+
|
|
211
|
+
to read; an older Node skips the import with that reason rather than silently importing nothing. The
|
|
212
|
+
other harnesses (opencode, Kilo, Cursor, Cline, Copilot, Devin) keep history in internal SQLite
|
|
195
213
|
databases with unversioned schemas and are skipped with a reason.
|
|
196
214
|
|
|
197
215
|
**Nothing else is translated.** The old plugin's behavioural settings — 12 `recall*`, 7 `retain*`,
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# DeepSeek Harness profile layer for Hindsight memory.
|
|
2
|
+
#
|
|
3
|
+
# `dsh plugin --profile <name> add @vectorize-io/hindsight-coding-agents` installs this package into
|
|
4
|
+
# the profile and — because package.json declares `dsh.bundle.patch` — appends this file to the
|
|
5
|
+
# profile's ordered bundle list. Nothing else needs editing: the row below mounts on the host plane,
|
|
6
|
+
# where the pre-step/session-start/turn-stopping events and the layered tools registry all reach
|
|
7
|
+
# every session, including the Web surface's per-session agent presets.
|
|
8
|
+
#
|
|
9
|
+
# Memory itself is configured OUTSIDE dsh, in ~/.hindsight/coding-agent.json (server URL, token,
|
|
10
|
+
# bank naming, opt-outs) — the same file every other Hindsight coding-agent harness reads. To turn
|
|
11
|
+
# it off for one profile without uninstalling, patch this row in the profile's own
|
|
12
|
+
# cordis.patch.yml:
|
|
13
|
+
#
|
|
14
|
+
# - id: hindsight
|
|
15
|
+
# disabled: true
|
|
16
|
+
- insert:
|
|
17
|
+
- id: hindsight
|
|
18
|
+
name: "@vectorize-io/hindsight-coding-agents/dsh"
|
package/dist/antigravity-hook.js
CHANGED
|
@@ -372,6 +372,20 @@ var log = {
|
|
|
372
372
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
373
373
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
374
374
|
};
|
|
375
|
+
function describeError(value, maxChars = 200) {
|
|
376
|
+
const parts = [];
|
|
377
|
+
const seen = /* @__PURE__ */ new Set();
|
|
378
|
+
let current2 = value;
|
|
379
|
+
while (current2 && !seen.has(current2)) {
|
|
380
|
+
seen.add(current2);
|
|
381
|
+
const error = current2;
|
|
382
|
+
const text = typeof error.message === "string" ? error.message : String(current2);
|
|
383
|
+
const withCode = error.code ? `${text} (${String(error.code)})` : text;
|
|
384
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
385
|
+
current2 = error.cause;
|
|
386
|
+
}
|
|
387
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
388
|
+
}
|
|
375
389
|
|
|
376
390
|
// src/core/diag.ts
|
|
377
391
|
function diagFilePath() {
|
|
@@ -1166,11 +1180,11 @@ async function buildHookOutput(args) {
|
|
|
1166
1180
|
reflectAnswer = "";
|
|
1167
1181
|
reflectFailed = true;
|
|
1168
1182
|
log.warn(harness, "reflect failed \u2014 session runs without memory", {
|
|
1169
|
-
error:
|
|
1183
|
+
error: describeError(e)
|
|
1170
1184
|
});
|
|
1171
1185
|
diag(harness, "reflect_failed", {
|
|
1172
1186
|
ms: Date.now() - t0,
|
|
1173
|
-
error:
|
|
1187
|
+
error: describeError(e),
|
|
1174
1188
|
query: prompt.slice(0, 80)
|
|
1175
1189
|
});
|
|
1176
1190
|
}
|
|
@@ -1189,7 +1203,7 @@ async function buildHookOutput(args) {
|
|
|
1189
1203
|
client.knowledgePagesSupported === false ? "knowledge_pages_unavailable" : "pages_failed",
|
|
1190
1204
|
{
|
|
1191
1205
|
ms: Date.now() - t0,
|
|
1192
|
-
error:
|
|
1206
|
+
error: describeError(e)
|
|
1193
1207
|
}
|
|
1194
1208
|
);
|
|
1195
1209
|
}
|
|
@@ -349,6 +349,20 @@ var log = {
|
|
|
349
349
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
350
350
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
351
351
|
};
|
|
352
|
+
function describeError(value, maxChars = 200) {
|
|
353
|
+
const parts = [];
|
|
354
|
+
const seen = /* @__PURE__ */ new Set();
|
|
355
|
+
let current2 = value;
|
|
356
|
+
while (current2 && !seen.has(current2)) {
|
|
357
|
+
seen.add(current2);
|
|
358
|
+
const error = current2;
|
|
359
|
+
const text = typeof error.message === "string" ? error.message : String(current2);
|
|
360
|
+
const withCode = error.code ? `${text} (${String(error.code)})` : text;
|
|
361
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
362
|
+
current2 = error.cause;
|
|
363
|
+
}
|
|
364
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
365
|
+
}
|
|
352
366
|
|
|
353
367
|
// src/core/diag.ts
|
|
354
368
|
function diagFilePath() {
|
|
@@ -1525,11 +1539,11 @@ async function buildRetain(args) {
|
|
|
1525
1539
|
diag(harness, "retain_ok", { ms: Date.now() - t0, turns: turns.length, session: sessionId });
|
|
1526
1540
|
} catch (e) {
|
|
1527
1541
|
log.warn(harness, "session write-back failed", {
|
|
1528
|
-
error:
|
|
1542
|
+
error: describeError(e)
|
|
1529
1543
|
});
|
|
1530
1544
|
diag(harness, "retain_failed", {
|
|
1531
1545
|
ms: Date.now() - t0,
|
|
1532
|
-
error:
|
|
1546
|
+
error: describeError(e),
|
|
1533
1547
|
session: sessionId
|
|
1534
1548
|
});
|
|
1535
1549
|
}
|
package/dist/claude-hook.js
CHANGED
|
@@ -372,6 +372,20 @@ var log = {
|
|
|
372
372
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
373
373
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
374
374
|
};
|
|
375
|
+
function describeError(value, maxChars = 200) {
|
|
376
|
+
const parts = [];
|
|
377
|
+
const seen = /* @__PURE__ */ new Set();
|
|
378
|
+
let current2 = value;
|
|
379
|
+
while (current2 && !seen.has(current2)) {
|
|
380
|
+
seen.add(current2);
|
|
381
|
+
const error = current2;
|
|
382
|
+
const text = typeof error.message === "string" ? error.message : String(current2);
|
|
383
|
+
const withCode = error.code ? `${text} (${String(error.code)})` : text;
|
|
384
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
385
|
+
current2 = error.cause;
|
|
386
|
+
}
|
|
387
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
388
|
+
}
|
|
375
389
|
|
|
376
390
|
// src/core/diag.ts
|
|
377
391
|
function diagFilePath() {
|
|
@@ -1166,11 +1180,11 @@ async function buildHookOutput(args) {
|
|
|
1166
1180
|
reflectAnswer = "";
|
|
1167
1181
|
reflectFailed = true;
|
|
1168
1182
|
log.warn(harness, "reflect failed \u2014 session runs without memory", {
|
|
1169
|
-
error:
|
|
1183
|
+
error: describeError(e)
|
|
1170
1184
|
});
|
|
1171
1185
|
diag(harness, "reflect_failed", {
|
|
1172
1186
|
ms: Date.now() - t0,
|
|
1173
|
-
error:
|
|
1187
|
+
error: describeError(e),
|
|
1174
1188
|
query: prompt.slice(0, 80)
|
|
1175
1189
|
});
|
|
1176
1190
|
}
|
|
@@ -1189,7 +1203,7 @@ async function buildHookOutput(args) {
|
|
|
1189
1203
|
client.knowledgePagesSupported === false ? "knowledge_pages_unavailable" : "pages_failed",
|
|
1190
1204
|
{
|
|
1191
1205
|
ms: Date.now() - t0,
|
|
1192
|
-
error:
|
|
1206
|
+
error: describeError(e)
|
|
1193
1207
|
}
|
|
1194
1208
|
);
|
|
1195
1209
|
}
|
package/dist/claude-stop-hook.js
CHANGED
|
@@ -349,6 +349,20 @@ var log = {
|
|
|
349
349
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
350
350
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
351
351
|
};
|
|
352
|
+
function describeError(value, maxChars = 200) {
|
|
353
|
+
const parts = [];
|
|
354
|
+
const seen = /* @__PURE__ */ new Set();
|
|
355
|
+
let current2 = value;
|
|
356
|
+
while (current2 && !seen.has(current2)) {
|
|
357
|
+
seen.add(current2);
|
|
358
|
+
const error = current2;
|
|
359
|
+
const text = typeof error.message === "string" ? error.message : String(current2);
|
|
360
|
+
const withCode = error.code ? `${text} (${String(error.code)})` : text;
|
|
361
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
362
|
+
current2 = error.cause;
|
|
363
|
+
}
|
|
364
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
365
|
+
}
|
|
352
366
|
|
|
353
367
|
// src/core/diag.ts
|
|
354
368
|
function diagFilePath() {
|
|
@@ -1525,11 +1539,11 @@ async function buildRetain(args) {
|
|
|
1525
1539
|
diag(harness, "retain_ok", { ms: Date.now() - t0, turns: turns.length, session: sessionId });
|
|
1526
1540
|
} catch (e) {
|
|
1527
1541
|
log.warn(harness, "session write-back failed", {
|
|
1528
|
-
error:
|
|
1542
|
+
error: describeError(e)
|
|
1529
1543
|
});
|
|
1530
1544
|
diag(harness, "retain_failed", {
|
|
1531
1545
|
ms: Date.now() - t0,
|
|
1532
|
-
error:
|
|
1546
|
+
error: describeError(e),
|
|
1533
1547
|
session: sessionId
|
|
1534
1548
|
});
|
|
1535
1549
|
}
|
package/dist/cline.js
CHANGED
|
@@ -1008,6 +1008,20 @@ var log = {
|
|
|
1008
1008
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
1009
1009
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
1010
1010
|
};
|
|
1011
|
+
function describeError(value, maxChars = 200) {
|
|
1012
|
+
const parts = [];
|
|
1013
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1014
|
+
let current2 = value;
|
|
1015
|
+
while (current2 && !seen.has(current2)) {
|
|
1016
|
+
seen.add(current2);
|
|
1017
|
+
const error51 = current2;
|
|
1018
|
+
const text = typeof error51.message === "string" ? error51.message : String(current2);
|
|
1019
|
+
const withCode = error51.code ? `${text} (${String(error51.code)})` : text;
|
|
1020
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
1021
|
+
current2 = error51.cause;
|
|
1022
|
+
}
|
|
1023
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
1024
|
+
}
|
|
1011
1025
|
|
|
1012
1026
|
// src/core/diag.ts
|
|
1013
1027
|
function diagFilePath() {
|
|
@@ -15874,7 +15888,7 @@ function ok(value) {
|
|
|
15874
15888
|
return { content: [{ type: "text", text: JSON.stringify(value, null, 2) }] };
|
|
15875
15889
|
}
|
|
15876
15890
|
function err(e) {
|
|
15877
|
-
const message =
|
|
15891
|
+
const message = describeError(e);
|
|
15878
15892
|
return { content: [{ type: "text", text: JSON.stringify({ error: message }) }], isError: true };
|
|
15879
15893
|
}
|
|
15880
15894
|
function guarded(fn) {
|
|
@@ -16507,11 +16521,11 @@ async function buildHookOutput(args) {
|
|
|
16507
16521
|
reflectAnswer = "";
|
|
16508
16522
|
reflectFailed = true;
|
|
16509
16523
|
log.warn(harness, "reflect failed \u2014 session runs without memory", {
|
|
16510
|
-
error:
|
|
16524
|
+
error: describeError(e)
|
|
16511
16525
|
});
|
|
16512
16526
|
diag(harness, "reflect_failed", {
|
|
16513
16527
|
ms: Date.now() - t0,
|
|
16514
|
-
error:
|
|
16528
|
+
error: describeError(e),
|
|
16515
16529
|
query: prompt.slice(0, 80)
|
|
16516
16530
|
});
|
|
16517
16531
|
}
|
|
@@ -16530,7 +16544,7 @@ async function buildHookOutput(args) {
|
|
|
16530
16544
|
client.knowledgePagesSupported === false ? "knowledge_pages_unavailable" : "pages_failed",
|
|
16531
16545
|
{
|
|
16532
16546
|
ms: Date.now() - t0,
|
|
16533
|
-
error:
|
|
16547
|
+
error: describeError(e)
|
|
16534
16548
|
}
|
|
16535
16549
|
);
|
|
16536
16550
|
}
|
|
@@ -16726,7 +16740,7 @@ var RuntimeCore = class {
|
|
|
16726
16740
|
turns = await this.fetchTranscript(sessionId2);
|
|
16727
16741
|
} catch (e) {
|
|
16728
16742
|
diag(this.harness, "idle_fetch_failed", {
|
|
16729
|
-
error:
|
|
16743
|
+
error: describeError(e),
|
|
16730
16744
|
session: sessionId2
|
|
16731
16745
|
});
|
|
16732
16746
|
return;
|
|
@@ -16766,7 +16780,7 @@ var RuntimeCore = class {
|
|
|
16766
16780
|
).catch(
|
|
16767
16781
|
(e) => diag(this.harness, "retain_failed", {
|
|
16768
16782
|
ms: Date.now() - t0,
|
|
16769
|
-
error:
|
|
16783
|
+
error: describeError(e),
|
|
16770
16784
|
session: sessionId2,
|
|
16771
16785
|
trigger
|
|
16772
16786
|
})
|
package/dist/codex-hook.js
CHANGED
|
@@ -372,6 +372,20 @@ var log = {
|
|
|
372
372
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
373
373
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
374
374
|
};
|
|
375
|
+
function describeError(value, maxChars = 200) {
|
|
376
|
+
const parts = [];
|
|
377
|
+
const seen = /* @__PURE__ */ new Set();
|
|
378
|
+
let current2 = value;
|
|
379
|
+
while (current2 && !seen.has(current2)) {
|
|
380
|
+
seen.add(current2);
|
|
381
|
+
const error = current2;
|
|
382
|
+
const text = typeof error.message === "string" ? error.message : String(current2);
|
|
383
|
+
const withCode = error.code ? `${text} (${String(error.code)})` : text;
|
|
384
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
385
|
+
current2 = error.cause;
|
|
386
|
+
}
|
|
387
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
388
|
+
}
|
|
375
389
|
|
|
376
390
|
// src/core/diag.ts
|
|
377
391
|
function diagFilePath() {
|
|
@@ -1166,11 +1180,11 @@ async function buildHookOutput(args) {
|
|
|
1166
1180
|
reflectAnswer = "";
|
|
1167
1181
|
reflectFailed = true;
|
|
1168
1182
|
log.warn(harness, "reflect failed \u2014 session runs without memory", {
|
|
1169
|
-
error:
|
|
1183
|
+
error: describeError(e)
|
|
1170
1184
|
});
|
|
1171
1185
|
diag(harness, "reflect_failed", {
|
|
1172
1186
|
ms: Date.now() - t0,
|
|
1173
|
-
error:
|
|
1187
|
+
error: describeError(e),
|
|
1174
1188
|
query: prompt.slice(0, 80)
|
|
1175
1189
|
});
|
|
1176
1190
|
}
|
|
@@ -1189,7 +1203,7 @@ async function buildHookOutput(args) {
|
|
|
1189
1203
|
client.knowledgePagesSupported === false ? "knowledge_pages_unavailable" : "pages_failed",
|
|
1190
1204
|
{
|
|
1191
1205
|
ms: Date.now() - t0,
|
|
1192
|
-
error:
|
|
1206
|
+
error: describeError(e)
|
|
1193
1207
|
}
|
|
1194
1208
|
);
|
|
1195
1209
|
}
|
package/dist/codex-stop-hook.js
CHANGED
|
@@ -349,6 +349,20 @@ var log = {
|
|
|
349
349
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
350
350
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
351
351
|
};
|
|
352
|
+
function describeError(value, maxChars = 200) {
|
|
353
|
+
const parts = [];
|
|
354
|
+
const seen = /* @__PURE__ */ new Set();
|
|
355
|
+
let current2 = value;
|
|
356
|
+
while (current2 && !seen.has(current2)) {
|
|
357
|
+
seen.add(current2);
|
|
358
|
+
const error = current2;
|
|
359
|
+
const text = typeof error.message === "string" ? error.message : String(current2);
|
|
360
|
+
const withCode = error.code ? `${text} (${String(error.code)})` : text;
|
|
361
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
362
|
+
current2 = error.cause;
|
|
363
|
+
}
|
|
364
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
365
|
+
}
|
|
352
366
|
|
|
353
367
|
// src/core/diag.ts
|
|
354
368
|
function diagFilePath() {
|
|
@@ -1525,11 +1539,11 @@ async function buildRetain(args) {
|
|
|
1525
1539
|
diag(harness, "retain_ok", { ms: Date.now() - t0, turns: turns.length, session: sessionId });
|
|
1526
1540
|
} catch (e) {
|
|
1527
1541
|
log.warn(harness, "session write-back failed", {
|
|
1528
|
-
error:
|
|
1542
|
+
error: describeError(e)
|
|
1529
1543
|
});
|
|
1530
1544
|
diag(harness, "retain_failed", {
|
|
1531
1545
|
ms: Date.now() - t0,
|
|
1532
|
-
error:
|
|
1546
|
+
error: describeError(e),
|
|
1533
1547
|
session: sessionId
|
|
1534
1548
|
});
|
|
1535
1549
|
}
|
package/dist/copilot-hook.js
CHANGED
|
@@ -372,6 +372,20 @@ var log = {
|
|
|
372
372
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
373
373
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
374
374
|
};
|
|
375
|
+
function describeError(value, maxChars = 200) {
|
|
376
|
+
const parts = [];
|
|
377
|
+
const seen = /* @__PURE__ */ new Set();
|
|
378
|
+
let current2 = value;
|
|
379
|
+
while (current2 && !seen.has(current2)) {
|
|
380
|
+
seen.add(current2);
|
|
381
|
+
const error = current2;
|
|
382
|
+
const text = typeof error.message === "string" ? error.message : String(current2);
|
|
383
|
+
const withCode = error.code ? `${text} (${String(error.code)})` : text;
|
|
384
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
385
|
+
current2 = error.cause;
|
|
386
|
+
}
|
|
387
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
388
|
+
}
|
|
375
389
|
|
|
376
390
|
// src/core/diag.ts
|
|
377
391
|
function diagFilePath() {
|
|
@@ -1166,11 +1180,11 @@ async function buildHookOutput(args) {
|
|
|
1166
1180
|
reflectAnswer = "";
|
|
1167
1181
|
reflectFailed = true;
|
|
1168
1182
|
log.warn(harness, "reflect failed \u2014 session runs without memory", {
|
|
1169
|
-
error:
|
|
1183
|
+
error: describeError(e)
|
|
1170
1184
|
});
|
|
1171
1185
|
diag(harness, "reflect_failed", {
|
|
1172
1186
|
ms: Date.now() - t0,
|
|
1173
|
-
error:
|
|
1187
|
+
error: describeError(e),
|
|
1174
1188
|
query: prompt.slice(0, 80)
|
|
1175
1189
|
});
|
|
1176
1190
|
}
|
|
@@ -1189,7 +1203,7 @@ async function buildHookOutput(args) {
|
|
|
1189
1203
|
client.knowledgePagesSupported === false ? "knowledge_pages_unavailable" : "pages_failed",
|
|
1190
1204
|
{
|
|
1191
1205
|
ms: Date.now() - t0,
|
|
1192
|
-
error:
|
|
1206
|
+
error: describeError(e)
|
|
1193
1207
|
}
|
|
1194
1208
|
);
|
|
1195
1209
|
}
|
|
@@ -349,6 +349,20 @@ var log = {
|
|
|
349
349
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
350
350
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
351
351
|
};
|
|
352
|
+
function describeError(value, maxChars = 200) {
|
|
353
|
+
const parts = [];
|
|
354
|
+
const seen = /* @__PURE__ */ new Set();
|
|
355
|
+
let current2 = value;
|
|
356
|
+
while (current2 && !seen.has(current2)) {
|
|
357
|
+
seen.add(current2);
|
|
358
|
+
const error = current2;
|
|
359
|
+
const text = typeof error.message === "string" ? error.message : String(current2);
|
|
360
|
+
const withCode = error.code ? `${text} (${String(error.code)})` : text;
|
|
361
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
362
|
+
current2 = error.cause;
|
|
363
|
+
}
|
|
364
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
365
|
+
}
|
|
352
366
|
|
|
353
367
|
// src/core/diag.ts
|
|
354
368
|
function diagFilePath() {
|
|
@@ -1525,11 +1539,11 @@ async function buildRetain(args) {
|
|
|
1525
1539
|
diag(harness, "retain_ok", { ms: Date.now() - t0, turns: turns.length, session: sessionId });
|
|
1526
1540
|
} catch (e) {
|
|
1527
1541
|
log.warn(harness, "session write-back failed", {
|
|
1528
|
-
error:
|
|
1542
|
+
error: describeError(e)
|
|
1529
1543
|
});
|
|
1530
1544
|
diag(harness, "retain_failed", {
|
|
1531
1545
|
ms: Date.now() - t0,
|
|
1532
|
-
error:
|
|
1546
|
+
error: describeError(e),
|
|
1533
1547
|
session: sessionId
|
|
1534
1548
|
});
|
|
1535
1549
|
}
|
package/dist/cursor-hook.js
CHANGED
|
@@ -372,6 +372,20 @@ var log = {
|
|
|
372
372
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
373
373
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
374
374
|
};
|
|
375
|
+
function describeError(value, maxChars = 200) {
|
|
376
|
+
const parts = [];
|
|
377
|
+
const seen = /* @__PURE__ */ new Set();
|
|
378
|
+
let current2 = value;
|
|
379
|
+
while (current2 && !seen.has(current2)) {
|
|
380
|
+
seen.add(current2);
|
|
381
|
+
const error = current2;
|
|
382
|
+
const text = typeof error.message === "string" ? error.message : String(current2);
|
|
383
|
+
const withCode = error.code ? `${text} (${String(error.code)})` : text;
|
|
384
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
385
|
+
current2 = error.cause;
|
|
386
|
+
}
|
|
387
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
388
|
+
}
|
|
375
389
|
|
|
376
390
|
// src/core/diag.ts
|
|
377
391
|
function diagFilePath() {
|
|
@@ -1166,11 +1180,11 @@ async function buildHookOutput(args) {
|
|
|
1166
1180
|
reflectAnswer = "";
|
|
1167
1181
|
reflectFailed = true;
|
|
1168
1182
|
log.warn(harness, "reflect failed \u2014 session runs without memory", {
|
|
1169
|
-
error:
|
|
1183
|
+
error: describeError(e)
|
|
1170
1184
|
});
|
|
1171
1185
|
diag(harness, "reflect_failed", {
|
|
1172
1186
|
ms: Date.now() - t0,
|
|
1173
|
-
error:
|
|
1187
|
+
error: describeError(e),
|
|
1174
1188
|
query: prompt.slice(0, 80)
|
|
1175
1189
|
});
|
|
1176
1190
|
}
|
|
@@ -1189,7 +1203,7 @@ async function buildHookOutput(args) {
|
|
|
1189
1203
|
client.knowledgePagesSupported === false ? "knowledge_pages_unavailable" : "pages_failed",
|
|
1190
1204
|
{
|
|
1191
1205
|
ms: Date.now() - t0,
|
|
1192
|
-
error:
|
|
1206
|
+
error: describeError(e)
|
|
1193
1207
|
}
|
|
1194
1208
|
);
|
|
1195
1209
|
}
|
package/dist/cursor-stop-hook.js
CHANGED
|
@@ -349,6 +349,20 @@ var log = {
|
|
|
349
349
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
350
350
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
351
351
|
};
|
|
352
|
+
function describeError(value, maxChars = 200) {
|
|
353
|
+
const parts = [];
|
|
354
|
+
const seen = /* @__PURE__ */ new Set();
|
|
355
|
+
let current2 = value;
|
|
356
|
+
while (current2 && !seen.has(current2)) {
|
|
357
|
+
seen.add(current2);
|
|
358
|
+
const error = current2;
|
|
359
|
+
const text = typeof error.message === "string" ? error.message : String(current2);
|
|
360
|
+
const withCode = error.code ? `${text} (${String(error.code)})` : text;
|
|
361
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
362
|
+
current2 = error.cause;
|
|
363
|
+
}
|
|
364
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
365
|
+
}
|
|
352
366
|
|
|
353
367
|
// src/core/diag.ts
|
|
354
368
|
function diagFilePath() {
|
|
@@ -1525,11 +1539,11 @@ async function buildRetain(args) {
|
|
|
1525
1539
|
diag(harness, "retain_ok", { ms: Date.now() - t0, turns: turns.length, session: sessionId });
|
|
1526
1540
|
} catch (e) {
|
|
1527
1541
|
log.warn(harness, "session write-back failed", {
|
|
1528
|
-
error:
|
|
1542
|
+
error: describeError(e)
|
|
1529
1543
|
});
|
|
1530
1544
|
diag(harness, "retain_failed", {
|
|
1531
1545
|
ms: Date.now() - t0,
|
|
1532
|
-
error:
|
|
1546
|
+
error: describeError(e),
|
|
1533
1547
|
session: sessionId
|
|
1534
1548
|
});
|
|
1535
1549
|
}
|
package/dist/deepen.js
CHANGED
|
@@ -1191,6 +1191,9 @@ var HARNESS_NAMES = [
|
|
|
1191
1191
|
"kilo",
|
|
1192
1192
|
// Cline CLI loads dist/cline.js through its native plugin manager; file hooks cannot inject.
|
|
1193
1193
|
"cline-cli",
|
|
1194
|
+
// DeepSeek Harness loads dist/dsh.js as a native Cordis plugin (src/dsh.ts). Its Claude Code /
|
|
1195
|
+
// Codex hook bridges are optional packages, so there is no hook binary to install either.
|
|
1196
|
+
"dsh",
|
|
1194
1197
|
// Prime Agent loads dist/prime-agent.js as an extension (src/prime-agent.ts); no hook binary.
|
|
1195
1198
|
"prime-agent",
|
|
1196
1199
|
"claude-code",
|
|
@@ -1211,9 +1214,16 @@ var HOOK_BINS = {
|
|
|
1211
1214
|
"grok-build": "hindsight-grok-hook"
|
|
1212
1215
|
// more hook harnesses: add a HookSpec entry point (see src/cursor-hook.ts) + a registration here.
|
|
1213
1216
|
};
|
|
1217
|
+
var PLUGIN_ENTRYPOINTS = {
|
|
1218
|
+
opencode: "src/index.ts",
|
|
1219
|
+
kilo: "src/kilo.ts",
|
|
1220
|
+
"cline-cli": "src/cline.ts",
|
|
1221
|
+
"prime-agent": "src/prime-agent.ts",
|
|
1222
|
+
dsh: "src/dsh.ts"
|
|
1223
|
+
};
|
|
1214
1224
|
async function getHarness(name) {
|
|
1215
|
-
|
|
1216
|
-
|
|
1225
|
+
const entry = PLUGIN_ENTRYPOINTS[name];
|
|
1226
|
+
if (entry) {
|
|
1217
1227
|
return noRuntimeAdapter(
|
|
1218
1228
|
name,
|
|
1219
1229
|
`${name}'s runtime is built by ${entry} (the ${name} plugin entrypoint), not via the harness registry`
|
|
@@ -1264,6 +1274,20 @@ var log = {
|
|
|
1264
1274
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
1265
1275
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
1266
1276
|
};
|
|
1277
|
+
function describeError(value, maxChars = 200) {
|
|
1278
|
+
const parts = [];
|
|
1279
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1280
|
+
let current2 = value;
|
|
1281
|
+
while (current2 && !seen.has(current2)) {
|
|
1282
|
+
seen.add(current2);
|
|
1283
|
+
const error = current2;
|
|
1284
|
+
const text = typeof error.message === "string" ? error.message : String(current2);
|
|
1285
|
+
const withCode = error.code ? `${text} (${String(error.code)})` : text;
|
|
1286
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
1287
|
+
current2 = error.cause;
|
|
1288
|
+
}
|
|
1289
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
1290
|
+
}
|
|
1267
1291
|
|
|
1268
1292
|
// src/core/diag.ts
|
|
1269
1293
|
function diagFilePath() {
|
|
@@ -1543,7 +1567,7 @@ async function main() {
|
|
|
1543
1567
|
main().catch((e) => {
|
|
1544
1568
|
diag("deepen", "deepen_failed", {
|
|
1545
1569
|
bank: FINAL_BANK,
|
|
1546
|
-
error:
|
|
1570
|
+
error: describeError(e)
|
|
1547
1571
|
});
|
|
1548
1572
|
console.error("deepen failed:", e.message || e);
|
|
1549
1573
|
try {
|
package/dist/devin-hook.js
CHANGED
|
@@ -372,6 +372,20 @@ var log = {
|
|
|
372
372
|
warn: (scope, msg, extra) => write("warn", scope, msg, extra),
|
|
373
373
|
error: (scope, msg, extra) => write("error", scope, msg, extra)
|
|
374
374
|
};
|
|
375
|
+
function describeError(value, maxChars = 200) {
|
|
376
|
+
const parts = [];
|
|
377
|
+
const seen = /* @__PURE__ */ new Set();
|
|
378
|
+
let current2 = value;
|
|
379
|
+
while (current2 && !seen.has(current2)) {
|
|
380
|
+
seen.add(current2);
|
|
381
|
+
const error = current2;
|
|
382
|
+
const text = typeof error.message === "string" ? error.message : String(current2);
|
|
383
|
+
const withCode = error.code ? `${text} (${String(error.code)})` : text;
|
|
384
|
+
if (withCode && parts.at(-1) !== withCode) parts.push(withCode);
|
|
385
|
+
current2 = error.cause;
|
|
386
|
+
}
|
|
387
|
+
return (parts.join(": ") || String(value)).slice(0, maxChars);
|
|
388
|
+
}
|
|
375
389
|
|
|
376
390
|
// src/core/diag.ts
|
|
377
391
|
function diagFilePath() {
|
|
@@ -1166,11 +1180,11 @@ async function buildHookOutput(args) {
|
|
|
1166
1180
|
reflectAnswer = "";
|
|
1167
1181
|
reflectFailed = true;
|
|
1168
1182
|
log.warn(harness, "reflect failed \u2014 session runs without memory", {
|
|
1169
|
-
error:
|
|
1183
|
+
error: describeError(e)
|
|
1170
1184
|
});
|
|
1171
1185
|
diag(harness, "reflect_failed", {
|
|
1172
1186
|
ms: Date.now() - t0,
|
|
1173
|
-
error:
|
|
1187
|
+
error: describeError(e),
|
|
1174
1188
|
query: prompt.slice(0, 80)
|
|
1175
1189
|
});
|
|
1176
1190
|
}
|
|
@@ -1189,7 +1203,7 @@ async function buildHookOutput(args) {
|
|
|
1189
1203
|
client.knowledgePagesSupported === false ? "knowledge_pages_unavailable" : "pages_failed",
|
|
1190
1204
|
{
|
|
1191
1205
|
ms: Date.now() - t0,
|
|
1192
|
-
error:
|
|
1206
|
+
error: describeError(e)
|
|
1193
1207
|
}
|
|
1194
1208
|
);
|
|
1195
1209
|
}
|