@lmzhen/dsh-evolution-review 0.1.0-rc.35 → 0.1.0-rc.37
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/lib/index.js +18 -0
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -389,9 +389,27 @@ function buildReviewRequest(session, kind, signal, maxMessages, maxMessageChars)
|
|
|
389
389
|
const text = message.content.map((block) => block.type === "text" ? block.text : "").join(" ").trim();
|
|
390
390
|
if (text) messages.push(`${message.role.toUpperCase()}: ${text.slice(0, maxMessageChars)}`);
|
|
391
391
|
}
|
|
392
|
+
const toolLines = [];
|
|
393
|
+
const events = session.events;
|
|
394
|
+
for (let index = events.length - 1; index >= 0 && toolLines.length < 12; index -= 1) {
|
|
395
|
+
const event = events[index];
|
|
396
|
+
if (event?.type === "tool/call") {
|
|
397
|
+
const data = event.data;
|
|
398
|
+
const argsRaw = typeof data?.arguments === "string" ? data.arguments : JSON.stringify(data?.arguments ?? {});
|
|
399
|
+
toolLines.push(`[call] ${data?.name ?? "?"} ${argsRaw.slice(0, 500)}`);
|
|
400
|
+
} else if (event?.type === "tool/result") {
|
|
401
|
+
const data = event.data;
|
|
402
|
+
const output = typeof data?.output === "string" ? data.output : "";
|
|
403
|
+
const failure = data?.error ? " [ERROR]" : "";
|
|
404
|
+
toolLines.push(`[result]${failure} ${output.slice(0, 500)}`);
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
toolLines.reverse();
|
|
392
408
|
return [
|
|
393
409
|
`Review kind: ${kind}`,
|
|
394
410
|
`Signals: ${signal.toolCalls} tool calls, ${signal.userChars} user chars, ${signal.assistantChars} assistant chars.`,
|
|
411
|
+
`Recent tool activity (${toolLines.length}):`,
|
|
412
|
+
...toolLines,
|
|
395
413
|
"Return ONLY the structured JSON plan. Evidence is mandatory for every op.",
|
|
396
414
|
"",
|
|
397
415
|
...messages
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-review",
|
|
3
3
|
"description": "Background review orchestration (community build)",
|
|
4
|
-
"version": "0.1.0-rc.
|
|
4
|
+
"version": "0.1.0-rc.37",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
36
|
-
"@lmzhen/dsh-evolution-core": "^0.1.0-rc.
|
|
37
|
-
"@lmzhen/dsh-evolution-plan-validator": "^0.1.0-rc.
|
|
36
|
+
"@lmzhen/dsh-evolution-core": "^0.1.0-rc.37",
|
|
37
|
+
"@lmzhen/dsh-evolution-plan-validator": "^0.1.0-rc.37"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
|
|
44
44
|
"@deepseek-ai/dsh-session": "^0.1.0-rc.6",
|
|
45
45
|
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
|
|
46
|
-
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.
|
|
46
|
+
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.37"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
|
|
53
53
|
"@deepseek-ai/dsh-session": "^0.1.0-rc.6",
|
|
54
54
|
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6",
|
|
55
|
-
"@lmzhen/dsh-evolution-core": "^0.1.0-rc.
|
|
56
|
-
"@lmzhen/dsh-evolution-plan-validator": "^0.1.0-rc.
|
|
57
|
-
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.
|
|
55
|
+
"@lmzhen/dsh-evolution-core": "^0.1.0-rc.37",
|
|
56
|
+
"@lmzhen/dsh-evolution-plan-validator": "^0.1.0-rc.37",
|
|
57
|
+
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.37"
|
|
58
58
|
}
|
|
59
59
|
}
|