@shgroup/dsh-serenity-hooks 1.129.1 → 1.129.3

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.129.1",
3
+ "version": "1.129.3",
4
4
  "main": "lib/index.js",
5
5
  "description": "宁静号 ACC harness(Native Cordis 插件):给 DSH 装一个「AI 工作区」——14 个工具(container_fs/cognitive_trajectory/dashboard/container_git/msm/praxis/ontology/serenity-skill-creator/localstore/container_admin/browser_slot;另三个 im-bridge/diagram/reconstruct 按条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫)+ 认知轨迹日志与原地重建 + 网页登录入口/IM 桥/认知轨迹唤醒注册表 + 浏览器槽位管理(≤20 个独立 profile 的 Chrome 槽位,带占用归属与异常时向所属会话反向注入提醒)。轨迹声明 = 轨迹目录下的 trajectory.json(约束面 + 旧标识 uid + CRO 机器绑定 cro.host;旧名 trajectory-constraint.json / skiff.json 仍在读取族里);轨迹提示词 = 轨迹目录下的 PROMPT.md(一条轨迹「是谁、按什么章程工作」,所有轨迹通用,追加在容器层与质量层之后,不替换它们)。适配 DSH 0.1.7-rc.1 / 0.2.0-rc.1 / 0.2.1-rc.1(三档,deepseek-ai/deepseek-harness)。",
6
6
  "engines": {
package/lib/index.js CHANGED
@@ -19860,7 +19860,10 @@ function destroySlot(n, pidHint = 0) {
19860
19860
  const parts = [];
19861
19861
  if (killed.length > 0) parts.push(`已回收 ${killed.length} 个进程(${killed.join(", ")});profile 保留(登录态不丢)`);
19862
19862
  else parts.push("无可回收进程(槽位本就空闲)");
19863
- if (absent.length > 0) parts.push(` ℹ️ 另有 ${absent.length} 个 pid(${absent.join(", ")})**动手前就已不存在** ⇒ 未计入"已回收"(台账里那条是陈旧的)。`);
19863
+ if (absent.length > 0) {
19864
+ const hintAbsent = rejectedHint === 0 && absent.length === 1 && pidHint > 0 && absent[0] === pidHint;
19865
+ parts.push(hintAbsent ? ` ℹ️ 台账记的 pid ${absent[0]} **动手前就已不存在** ⇒ 未计入"已回收"(那条租约是陈旧的或被污染)。` : ` ℹ️ 另有 ${absent.length} 个 pid(${absent.join(", ")})在我逐个处置时**已经退出** ⇒ 未计入"已回收"。\n 成因多半是**连带退出**:它们与本槽位同一条进程树,先处置的那个已经带走了它们(⛔ 不是台账陈旧)。`);
19866
+ }
19864
19867
  if (denied.length > 0) parts.push(` ⛔ ${denied.length} 个 pid(${denied.join(", ")})**杀不动**(多半是权限不足)⇒ 它们可能仍在运行,请人工确认。`);
19865
19868
  if (rejectedHint > 0) parts.push(` ⚠️ 台账记的 pid ${rejectedHint} **未被杀死** —— 它的命令行里没有本槽位的 profile,说明台账那条记录是陈旧的或被污染(⛔ 不按台账杀陌生进程)。`);
19866
19869
  return {
@@ -21235,7 +21238,7 @@ async function run(ctx, root, sessionId, trajectory, action, args) {
21235
21238
  case "ext-list": {
21236
21239
  const exts = slotExtList(root);
21237
21240
  if (exts.length === 0) return `本 CCC 还没有任何扩展。\n 写一个:在 <CCC 根>/${EXT_DIR_REL}/ 下放一个 .ts 文件,文件名即扩展名。\n 契约:stdin 收 {slot,port,cccRoot,args};stdout **最后一个非空行**给 {"ok":true,"result":…}。\n ⚠️ ACC 只 spawn、⛔ 从不 import —— 你的语法错不会放倒宿主。`;
21238
- return `本 CCC 的浏览器扩展 ${exts.length} 个(<CCC 根>/${EXT_DIR_REL}/):\n` + exts.map((e) => ` · ${e.name}`).join("\n") + `\n\n调用:browser_slot ext --slot b1 --name <名> [--eslot …/--earg key=value]`;
21241
+ return `本 CCC 的浏览器扩展 ${exts.length} 个(<CCC 根>/${EXT_DIR_REL}/):\n` + exts.map((e) => ` · ${e.name}`).join("\n") + `\n\n调用:browser_slot ext --slot b1 --name <名> [--earg key=value …(可重复)]`;
21239
21242
  }
21240
21243
  case "ext": {
21241
21244
  const n = needSlot(args);
@@ -21269,6 +21272,47 @@ function createBrowserSlotTool(ctx) {
21269
21272
  reason: {
21270
21273
  type: "string",
21271
21274
  description: "reap: why this slot is being force-reclaimed (recorded)."
21275
+ },
21276
+ url: {
21277
+ type: "string",
21278
+ description: "open / goto: the address to open or navigate to (http(s)://…)"
21279
+ },
21280
+ target: {
21281
+ type: "string",
21282
+ description: "goto / eval / text / html / shot / reload / close: the targetId from `targets` (⛔ not a slot number)"
21283
+ },
21284
+ js: {
21285
+ type: "string",
21286
+ description: "eval: a JavaScript expression to evaluate in the page (e.g. document.title); uses Runtime.evaluate"
21287
+ },
21288
+ out: {
21289
+ type: "string",
21290
+ description: "shot: output path for the PNG, relative to the CCC root. Omit = auto-named under _tmp/browser-shots/"
21291
+ },
21292
+ max: {
21293
+ type: "number",
21294
+ description: "html: truncate the returned HTML after this many characters"
21295
+ },
21296
+ all: {
21297
+ type: "boolean",
21298
+ description: "close: close every target in the slot instead of one (then `target` is not needed)"
21299
+ },
21300
+ name: {
21301
+ type: "string",
21302
+ description: "ext: extension name = the .ts file name under <CCC>/browser-ext/ (run `ext-list` to see them)"
21303
+ },
21304
+ earg: {
21305
+ type: "array",
21306
+ items: { type: "string" },
21307
+ description: "ext: repeatable key=value pairs passed to the extension as strings (e.g. [\"city=Suzhou\"])"
21308
+ },
21309
+ timeout: {
21310
+ type: "number",
21311
+ description: "eval: evaluate timeout in milliseconds"
21312
+ },
21313
+ script: {
21314
+ type: "string",
21315
+ description: "reload: a script to run after the reload completes"
21272
21316
  }
21273
21317
  },
21274
21318
  output: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shgroup/dsh-serenity-hooks",
3
- "version": "1.129.1",
3
+ "version": "1.129.3",
4
4
  "description": "宁静号 ACC harness(Native Cordis 插件)——给 DeepSeek Harness 装一个「AI 工作区」:14 个工具(container_fs/cognitive_trajectory/dashboard/container_git/msm/praxis/ontology/serenity-skill-creator/localstore/container_admin/browser_slot;另三个 im-bridge/diagram/reconstruct 按条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫/对外输出守卫)+ 认知轨迹日志与原地重建 + 网页登录入口/IM 桥/认知轨迹唤醒注册表 + 浏览器槽位管理(≤20 个独立 profile 的 Chrome 槽位,带占用归属与异常时向所属会话反向注入提醒)。轨迹声明 = 轨迹目录下的 trajectory.json(约束面 + 旧标识 uid + CRO 机器绑定 cro.host;旧名 trajectory-constraint.json / skiff.json 仍在读取族里);轨迹提示词 = 轨迹目录下的 PROMPT.md(一条轨迹「是谁、按什么章程工作」,所有轨迹通用,追加在容器层与质量层之后,不替换它们)。适配 DSH 0.1.7-rc.1 / 0.2.0-rc.1 / 0.2.1-rc.1(三档)。",
5
5
  "license": "MIT",
6
6
  "repository": {