@shgroup/dsh-serenity-hooks 1.26.12 → 1.26.13
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 +26 -5
- 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.26.
|
|
3
|
+
"version": "1.26.13",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"description": "宁静号 ACC harness(Native Cordis 插件):真实 DSH 工具 cc_fs/session/acc_msm/eap/neat/cce/handyman/session_rebuild/skiff_admin + 拦截缝机械约束(safe-mode/路径守卫)+ 高级设定面板(双端口网关/账号管理)+ Skiff 认知子集角色(实验性)。适配 DSH 公开版(0.1.0-rc,deepseek-ai/deepseek-harness)。",
|
|
6
6
|
"engines": {
|
package/lib/index.js
CHANGED
|
@@ -7096,8 +7096,24 @@ const skiffAdminTool = defineTool({
|
|
|
7096
7096
|
* 实现:薄封装——exec 包内静态脚本(npm files 含 experiments/),脚本是单一真相源。
|
|
7097
7097
|
* 环境注入 SERENITY_ROOT(当前 CCC 根)供脚本定位;bun 优先(可直跑 TS)。
|
|
7098
7098
|
*/
|
|
7099
|
-
/**
|
|
7100
|
-
|
|
7099
|
+
/**
|
|
7100
|
+
* 定位包内实验脚本(npm files 分发 experiments/autotrajectory/)。
|
|
7101
|
+
* 布局差异:tsdown bundle 后 import.meta.url 指向 lib/index.js(lib → 包根 1 层);
|
|
7102
|
+
* vitest 源码直跑时指向 src/tools/x.ts(src/tools → 包根 2 层)——逐级上溯查找,
|
|
7103
|
+
* 两种布局都稳(找到 experiments/autotrajectory/scripts/autotrajectory-exp.ts 即止)。
|
|
7104
|
+
*/
|
|
7105
|
+
function findExpScript(startDir) {
|
|
7106
|
+
let cur = startDir;
|
|
7107
|
+
while (true) {
|
|
7108
|
+
const cand = join(cur, "experiments", "autotrajectory", "scripts", "autotrajectory-exp.ts");
|
|
7109
|
+
if (existsSync(cand)) return cand;
|
|
7110
|
+
const parent = dirname(cur);
|
|
7111
|
+
if (parent === cur) return null;
|
|
7112
|
+
cur = parent;
|
|
7113
|
+
}
|
|
7114
|
+
}
|
|
7115
|
+
/** 包内实验脚本(上溯查找;找不到 → execute 报错提示包完整性) */
|
|
7116
|
+
const EXP_SCRIPT = findExpScript(dirname(fileURLToPath(import.meta.url)));
|
|
7101
7117
|
const AUTO_TRAJECTORY_EXP_ACTIONS = [
|
|
7102
7118
|
"all",
|
|
7103
7119
|
"init",
|
|
@@ -7132,13 +7148,18 @@ const autoTrajectoryExpTool = defineTool({
|
|
|
7132
7148
|
async execute(args, exec) {
|
|
7133
7149
|
const root = findSerenityRoot(agentCwd$1(exec));
|
|
7134
7150
|
const result = {};
|
|
7135
|
-
if (!
|
|
7136
|
-
result.error =
|
|
7151
|
+
if (!EXP_SCRIPT) {
|
|
7152
|
+
result.error = "autotrajectory-exp 实验脚本未随安装分发(npm 包缺 experiments/autotrajectory/)——请检查包完整性";
|
|
7153
|
+
return result;
|
|
7154
|
+
}
|
|
7155
|
+
const script = EXP_SCRIPT;
|
|
7156
|
+
if (!existsSync(script)) {
|
|
7157
|
+
result.error = `autotrajectory-exp 脚本缺失(${script})——实验包未随安装分发,请检查 npm 包完整性`;
|
|
7137
7158
|
return result;
|
|
7138
7159
|
}
|
|
7139
7160
|
const env = { ...process.env };
|
|
7140
7161
|
if (root) env.SERENITY_ROOT = root;
|
|
7141
|
-
const r = spawnSync("bun", [
|
|
7162
|
+
const r = spawnSync("bun", [script, args.action ?? "all"], {
|
|
7142
7163
|
encoding: "utf-8",
|
|
7143
7164
|
timeout: 6e5,
|
|
7144
7165
|
env,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shgroup/dsh-serenity-hooks",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.13",
|
|
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": {
|