@shgroup/dsh-serenity-hooks 1.23.3 → 1.23.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/dsh.plugin.json +1 -1
- package/lib/index.js +5 -2
- package/package.json +1 -1
package/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-serenity-hooks",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.4",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"description": "宁静号 ACC harness(Native Cordis 插件):真实 DSH 工具 cc_fs/session/acc_msm/eap/neat/cce/loop/session_rebuild + 拦截缝机械约束(safe-mode/路径守卫)+ 高级设定面板(双端口网关/账号管理)。适配 DSH 公开版(0.1.0-rc,deepseek-ai/deepseek-harness)。",
|
|
6
6
|
"engines": {
|
package/lib/index.js
CHANGED
|
@@ -5106,13 +5106,13 @@ function parseSessionContextFromEvents(events) {
|
|
|
5106
5106
|
const idx = s.indexOf(SESSION_CONTEXT_MARKER);
|
|
5107
5107
|
if (idx < 0) continue;
|
|
5108
5108
|
const dirName = s.slice(idx + 28).trim().split("\n")[0]?.trim() ?? "";
|
|
5109
|
-
const mdMatch = s.match(/SESSION\.md path:\s*(\
|
|
5109
|
+
const mdMatch = s.match(/SESSION\.md path:\s*([^\r\n]+)/);
|
|
5110
5110
|
if (/^\d{4}-\d{2}-\d{2}--/.test(dirName) && mdMatch) {
|
|
5111
5111
|
const idMatch = dirName.match(/--S(\d{3,})--/);
|
|
5112
5112
|
return {
|
|
5113
5113
|
sessionId: idMatch ? `S${idMatch[1]}` : basename(dirName),
|
|
5114
5114
|
dirName,
|
|
5115
|
-
mdPath: mdMatch[1]
|
|
5115
|
+
mdPath: mdMatch[1].trim()
|
|
5116
5116
|
};
|
|
5117
5117
|
}
|
|
5118
5118
|
}
|
|
@@ -5988,11 +5988,14 @@ function stripAckSuffix(text) {
|
|
|
5988
5988
|
*/
|
|
5989
5989
|
function buildRebuildAnchor(root, sessionName, activeMdPath, anchorMessages = DEFAULT_ANCHOR_MESSAGES) {
|
|
5990
5990
|
const rel = activeMdPath.startsWith(root) ? activeMdPath.slice(root.length + 1) : activeMdPath;
|
|
5991
|
+
const sessionDir = basename(dirname(activeMdPath));
|
|
5992
|
+
const sessionLine = sessionDir !== "AGENT_SESSIONS" ? `- Serenity session: ${sessionName !== "" ? `${sessionName} (${sessionDir})` : sessionDir}` : null;
|
|
5991
5993
|
return [
|
|
5992
5994
|
"[TRAJECTORY-REBUILD] The conversation has been cleared and rebuilt (Ship of Theseus: the carrier is replaced, the trajectory continues).",
|
|
5993
5995
|
"",
|
|
5994
5996
|
...anchorMessages.flatMap((text) => [stripAckSuffix(text), ""]),
|
|
5995
5997
|
sessionName !== "" ? `Continue the work of ${sessionName}.` : "Continue the current work.",
|
|
5998
|
+
...sessionLine ? [sessionLine] : [],
|
|
5996
5999
|
`- Persistent trajectory (SESSION.md, unmoved): ${rel}`,
|
|
5997
6000
|
`- Read that SESSION.md first (goal/decisions/progress/unresolved), then continue from the last checkpoint.`
|
|
5998
6001
|
].join("\n");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shgroup/dsh-serenity-hooks",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.4",
|
|
4
4
|
"description": "宁静号 ACC harness — Native Cordis 插件(DeepSeek Harness 运行时)。真实 DSH 工具注册(cc_fs/session/acc_msm 等 9 工具)+ 拦截缝机械约束(safe-mode/路径守卫/会话落盘)+ 系统提示词注入(ACC/CCE/Constraints/SKILL/Session 五块)。适配 DSH 公开版(deepseek-ai/deepseek-harness 0.1.0-rc)。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|