@shgroup/dsh-serenity-hooks 1.30.3 → 1.30.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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-serenity-hooks",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.4",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"description": "宁静号 ACC harness(Native Cordis 插件):真实 DSH 工具 container_fs/logbook/dashboard/container_git/msm/praxis/handyman/localstore/container_admin/autopilot-trajectory + 拦截缝机械约束(safe-mode/路径守卫)+ 高级设定面板(双端口网关/账号管理)+ Skiff 认知子集角色(实验性)。适配 DSH 公开版(0.1.0-rc,deepseek-ai/deepseek-harness)。",
|
|
6
6
|
"engines": {
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
2
|
import { a as findSerenityRoot, c as matchBlacklist, d as readCccName$2, f as readHandymanConfig, i as findGitRoot, l as pathInside, m as resolveInside, n as SAFE_MODE_MARKER, o as isSafeModeOn, r as classifyPath, s as loadSerenityConfig, t as DEFAULT_SERENITY_CONFIG_PATHS, u as readBlacklist } from "./ccc-CX48YNUL.js";
|
|
3
3
|
import { a as resolveRoleSystemPrompt, i as readSkiffRoles, l as systemPromptSource, r as isSkiffSessionId, s as roleToolWhitelist } from "./skiff-role-LW4tjF9L.js";
|
|
4
|
-
import { C as
|
|
4
|
+
import { C as readProgress, D as writeProgress, E as writeFailedStatus, O as skiffRoleFor, S as newStopToken, T as splitModel, _ as workspaceTrajectoryLine, a as startSkiffDebugServer, b as handymanProgressPaths, c as askSkiff, d as getSkiffAgent, f as skiffMsmGate, g as unregisterSkiffSession, h as skiffTrajectoryEnabled, l as createSkiffAgent, m as skiffSessionSnapshot, n as jscSafeJsonText, o as stopSkiffDebugServer, p as skiffSessionInfo, r as renderSkiffMarkdown, s as stripThink, t as discoverCccs, u as ensureSkiffSession, v as HANDYMAN_GUIDE, w as requireWhitelistedModel, x as listActiveHandymen, y as buildRoundPrompt } from "./skiff-debug-gYigSgl_.js";
|
|
5
5
|
import { a as readWeixinCredential, c as weixinInboundDir, d as LOCALSTORE_SCOPES, f as checkLocalstoreGitCompliance, h as runLocalStore, i as matchWeixinRoute, l as weixinSessionIdFor, m as readGitTrack, n as extractWeixinText, o as readWeixinSettings, p as localstorePath, r as hasVoiceItem, s as sanitizeFileName$1, t as extractWeixinMedia } from "./weixin-route-jA0qENOf.js";
|
|
6
6
|
import { C as useSession, S as summarize, _ as resolveSessionByTitle, a as archiveSessions, b as setActiveSessionInfo, c as extractSessionMdPathFromText, d as getActiveSessionInfo, f as healthCheck, g as readActiveSessionMd, h as qaCheck, i as SESSION_ACTIONS, l as findLatestActiveSessionMd, m as parseSessionContextFromEvents, n as readLastBound, o as closeSession, p as listSessions, r as DEFAULT_SESSION_SCOPE, s as createSession, t as appendBound, u as findSession, v as sessionEvents, x as showSession, y as sessionsRoot } from "./session-bound-p9oR9dj9.js";
|
|
7
7
|
import { n as registerSettingsSection, t as readSimpleSettings } from "./settings-section-BfVxgCZy.js";
|
|
@@ -6071,7 +6071,7 @@ function registerStatusApi(ctx, opts = {}) {
|
|
|
6071
6071
|
workspace: url.searchParams.get("workspace") ?? void 0
|
|
6072
6072
|
});
|
|
6073
6073
|
const root = findSerenityRoot(workspace) ?? "";
|
|
6074
|
-
const { discoverCccs } = await import("./skiff-debug-
|
|
6074
|
+
const { discoverCccs } = await import("./skiff-debug-gYigSgl_.js").then((n) => n.i);
|
|
6075
6075
|
sendJson$1(res, 200, { cccs: await discoverCccs(ctx, root) });
|
|
6076
6076
|
} catch (err) {
|
|
6077
6077
|
sendJson$1(res, 400, { error: err.message ?? String(err) });
|
|
@@ -9036,6 +9036,11 @@ async function handleIncoming(ctx, root, accountId, cred, msg) {
|
|
|
9036
9036
|
const sessionId = weixinSessionIdFor(fromUserId);
|
|
9037
9037
|
const existing = getSkiffAgent(sessionId);
|
|
9038
9038
|
const hc = readHandymanConfig(root);
|
|
9039
|
+
if (existing) try {
|
|
9040
|
+
ensureSkiffSession(root, existing, roleName, role);
|
|
9041
|
+
} catch (err) {
|
|
9042
|
+
console.warn(`[serenity-hooks] weixin-bridge ensure 失败(不影响处理): ${String(err?.message ?? err)}`);
|
|
9043
|
+
}
|
|
9039
9044
|
const ref = existing ? {
|
|
9040
9045
|
agent: existing,
|
|
9041
9046
|
sessionId,
|
|
@@ -9097,6 +9102,8 @@ async function handleIncoming(ctx, root, accountId, cred, msg) {
|
|
|
9097
9102
|
}
|
|
9098
9103
|
}
|
|
9099
9104
|
const parts = [];
|
|
9105
|
+
const activeWorkspace = getActiveSessionInfo(sessionId);
|
|
9106
|
+
if (activeWorkspace?.mdPath) parts.push(workspaceTrajectoryLine(activeWorkspace.mdPath));
|
|
9100
9107
|
if (text) parts.push(text);
|
|
9101
9108
|
parts.push(...mediaNotes, ...degradedNotes);
|
|
9102
9109
|
const question = parts.join("\n");
|
package/lib/skiff-core.d.ts
CHANGED
|
@@ -28,8 +28,11 @@ export declare function skiffSessionSnapshot(): ReadonlyMap<string, {
|
|
|
28
28
|
ccc: string;
|
|
29
29
|
}>;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
|
-
*
|
|
31
|
+
* 系统提示词中的**工作台纪律块**(v1.30.4 升级:从单行路径 → 完整 ACC 层约束)。
|
|
32
|
+
* 用户点破(S142):只给路径 LLM 不会主动用——需注入「已绑定 + 使用纪律 + 动作指引」。
|
|
33
|
+
* SESSION = 工作台——skiff 与主舱同一套机制(零特调,用户拍板):
|
|
34
|
+
* 自动绑定已生效(无需 logbook use)、SESSION.md 是持久记忆载体(write/edit 维护)、
|
|
35
|
+
* rebuild 自动从本 SESSION 续接。注入 agent 系统提示词(用户对话面不可见)。
|
|
33
36
|
*/
|
|
34
37
|
export declare function workspaceTrajectoryLine(mdPath: string): string;
|
|
35
38
|
/**
|
|
@@ -248,12 +248,29 @@ function skiffSessionSnapshot() {
|
|
|
248
248
|
/** 自动创建的 bound 标记(readLastBound 恢复判定——只恢复本机制建的;手工 use 的旧 bound 不认) */
|
|
249
249
|
const AUTO_BOUND_NOTE_PREFIX = "auto-created for skiff role";
|
|
250
250
|
/**
|
|
251
|
-
*
|
|
252
|
-
*
|
|
251
|
+
* 系统提示词中的**工作台纪律块**(v1.30.4 升级:从单行路径 → 完整 ACC 层约束)。
|
|
252
|
+
* 用户点破(S142):只给路径 LLM 不会主动用——需注入「已绑定 + 使用纪律 + 动作指引」。
|
|
253
|
+
* SESSION = 工作台——skiff 与主舱同一套机制(零特调,用户拍板):
|
|
254
|
+
* 自动绑定已生效(无需 logbook use)、SESSION.md 是持久记忆载体(write/edit 维护)、
|
|
255
|
+
* rebuild 自动从本 SESSION 续接。注入 agent 系统提示词(用户对话面不可见)。
|
|
253
256
|
*/
|
|
254
257
|
function workspaceTrajectoryLine(mdPath) {
|
|
255
|
-
return
|
|
256
|
-
|
|
258
|
+
return [
|
|
259
|
+
"── Serenity Session Workspace ──",
|
|
260
|
+
"This role session is AUTO-BOUND to a trajectory workspace SESSION (no logbook use needed):",
|
|
261
|
+
` SESSION.md: ${mdPath}`,
|
|
262
|
+
"",
|
|
263
|
+
"Rules of the workspace:",
|
|
264
|
+
" 1. This SESSION.md is your persistent memory carrier (like the main cabin SESSION) — ",
|
|
265
|
+
" read it first when context feels thin or work spans turns.",
|
|
266
|
+
" 2. Record key decisions/progress/unresolved items INTO this SESSION.md with write/edit",
|
|
267
|
+
" (sections: 目标 / 状态 / 关键决策 / 进度记录 / 未解决的问题). Keep it current — it is",
|
|
268
|
+
" what a rebuild resumes from.",
|
|
269
|
+
" 3. When context pressure is high, run logbook rebuild — it auto-resumes from THIS SESSION.md",
|
|
270
|
+
" (no manual use; do not switch to or read other SESSIONs unless the user explicitly asks).",
|
|
271
|
+
" 4. Never expose this internal path in user-facing replies (chat stays clean).",
|
|
272
|
+
"── ──"
|
|
273
|
+
].join("\n");
|
|
257
274
|
}
|
|
258
275
|
/**
|
|
259
276
|
* 确保启用 session 能力的 skiff 会话拥有**专属 SESSION**(工作台):
|
|
@@ -2731,4 +2748,4 @@ async function handle(ctx, defaultRoot, webPort, req, res) {
|
|
|
2731
2748
|
}
|
|
2732
2749
|
}
|
|
2733
2750
|
//#endregion
|
|
2734
|
-
export {
|
|
2751
|
+
export { readProgress as C, writeProgress as D, writeFailedStatus as E, skiffRoleFor$1 as O, newStopToken as S, splitModel as T, workspaceTrajectoryLine as _, startSkiffDebugServer as a, handymanProgressPaths as b, askSkiff as c, getSkiffAgent as d, skiffMsmGate as f, unregisterSkiffSession as g, skiffTrajectoryEnabled as h, skiff_debug_exports as i, createSkiffAgent as l, skiffSessionSnapshot as m, jscSafeJsonText as n, stopSkiffDebugServer as o, skiffSessionInfo as p, renderSkiffMarkdown as r, stripThink as s, discoverCccs as t, ensureSkiffSession as u, HANDYMAN_GUIDE as v, requireWhitelistedModel as w, listActiveHandymen as x, buildRoundPrompt as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shgroup/dsh-serenity-hooks",
|
|
3
|
-
"version": "1.30.
|
|
3
|
+
"version": "1.30.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": {
|