@shgroup/dsh-serenity-hooks 1.31.13 → 1.34.0
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/README.md +14 -11
- package/dsh.plugin.json +5 -5
- package/experiments/autopilot-trajectory/SKILL.md +23 -21
- package/experiments/autopilot-trajectory/scripts/autopilot-trajectory.ts +69 -45
- package/lib/autopilot-script.d.ts +40 -0
- package/lib/autopilot-trajectory.d.ts +44 -5
- package/lib/{ccc-DAsSHsub.js → ccc-eu_IPF94.js} +17 -1
- package/lib/ccc.d.ts +30 -0
- package/lib/client.js +43 -11
- package/lib/diag-ops.d.ts +61 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +4802 -4206
- package/lib/invariant.d.ts +5 -1
- package/lib/invariant.js +7 -3
- package/lib/json.d.ts +1 -1
- package/lib/msm-ops.d.ts +2 -2
- package/lib/output-guard-seam.d.ts +1 -1
- package/lib/rebuild.d.ts +4 -3
- package/lib/seams/guards.d.ts +27 -0
- package/lib/seams/keeper.d.ts +3 -3
- package/lib/{settings-section-01rTVq6v.js → settings-section-BuPGQv_H.js} +5 -3
- package/lib/settings-section.d.ts +15 -3
- package/lib/skiff-core.d.ts +1 -1
- package/lib/{skiff-debug-w2c3UqQk.js → skiff-debug-D83-Njy7.js} +7 -7
- package/lib/{skiff-role-BYvNnwv1.js → skiff-role-DAfPb6YQ.js} +1 -1
- package/lib/tools/acc-diag.d.ts +22 -0
- package/lib/tools/container-admin.d.ts +1 -1
- package/lib/tools/{session.d.ts → trajectory.d.ts} +32 -16
- package/lib/{session-bound-BpTayaIS.js → trajectory-bound-C8DUxi6_.js} +77 -276
- package/lib/{session-bound.d.ts → trajectory-bound.d.ts} +32 -2
- package/lib/{session-ops.d.ts → trajectory-ops.d.ts} +24 -28
- package/lib/wake-registry-D0Vj0WXb.js +270 -0
- package/lib/wake-registry.d.ts +146 -0
- package/lib/wake-scheduler.d.ts +115 -0
- package/lib/{weixin-route-wWk4AIwV.js → weixin-route-D1ND823E.js} +1 -1
- package/package.json +2 -2
- package/lib/tools/autopilot-trajectory.d.ts +0 -25
package/lib/ccc.d.ts
CHANGED
|
@@ -84,6 +84,16 @@ export interface SerenityConfig {
|
|
|
84
84
|
autopilotTrajectory?: AutopilotTrajectorySettings;
|
|
85
85
|
/** 旧键兼容(正式化前存量 CCC,如 pangu——新键 autopilotTrajectory 优先,旧键回退) */
|
|
86
86
|
autotrajectory?: AutopilotTrajectorySettings;
|
|
87
|
+
/**
|
|
88
|
+
* trajectory 族配置(D58,S142 2026-09-13):`trajectory` 是一等概念,
|
|
89
|
+
* **autopilot 降为其子集**——故 autopilot 的配置迁到 `trajectory.autopilot`。
|
|
90
|
+
* 读取顺序(逐级回退,**不回写**):`trajectory.autopilot` → `autopilotTrajectory` → `autotrajectory`。
|
|
91
|
+
* 唤醒注册表(未来时刻一次性唤醒)为 CCC 级文件 `AGENT_SESSIONS/wake-registry.json`,不在此配置。
|
|
92
|
+
*/
|
|
93
|
+
trajectory?: {
|
|
94
|
+
/** autopilot(周期自唤醒的特例;每 CCC 单例,D59) */
|
|
95
|
+
autopilot?: AutopilotTrajectorySettings;
|
|
96
|
+
};
|
|
87
97
|
/**
|
|
88
98
|
* 微信桥(F4c-3,v1.27.0 实验性):**CCC 级**配置——dsh 一个进程含多个 CCC,
|
|
89
99
|
* 每个 CCC 独立对接微信桥(S142 用户拍板:ACC 不绑定 role,配置归 CCC,手工)。
|
|
@@ -92,6 +102,14 @@ export interface SerenityConfig {
|
|
|
92
102
|
* 未配置或 enabled=false → 该 CCC 桥完全不启动(零资源占用)。
|
|
93
103
|
*/
|
|
94
104
|
weixin?: WeixinSettings;
|
|
105
|
+
/**
|
|
106
|
+
* 专属工具声明(v1.33,S142 §32.11):**ACC 注册但默认对所有 CCC 隐藏**的工具,
|
|
107
|
+
* 只有在自己这里声明的 CCC 可见(例:`["acc-diag"]` = ACC 负责人的运行态诊断)。
|
|
108
|
+
*
|
|
109
|
+
* 归属判据(D23):**机制在 ACC(通用,任何工具名皆可),声明在 CCC**——
|
|
110
|
+
* ACC 代码里不出现任何具体 CCC 的名字;未声明(含未配置/配置损坏)⇒ 隐藏。
|
|
111
|
+
*/
|
|
112
|
+
exclusiveTools?: string[];
|
|
95
113
|
}
|
|
96
114
|
/**
|
|
97
115
|
* Autopilot Trajectory 配置(CCC 定义;S142 用户拍板 v0.5 + 正式化 v1.27.4):
|
|
@@ -264,6 +282,18 @@ export declare function __resetBrokenConfigWarningsForTest(): void;
|
|
|
264
282
|
* @returns 解析后的配置;无文件/损坏 → `{}`
|
|
265
283
|
*/
|
|
266
284
|
export declare function loadSerenityConfig(root: string, paths?: string[]): SerenityConfig;
|
|
285
|
+
/**
|
|
286
|
+
* 读取 CCC 声明的「专属工具」清单(`exclusiveTools`,v1.33)。
|
|
287
|
+
*
|
|
288
|
+
* 失败语义:无配置/字段缺失/配置损坏 → **空数组**(= 不声明任何专属工具 ⇒ 专属工具保持隐藏)。
|
|
289
|
+
* 这里选 **fail-closed**(与 im-bridge 的 fail-open 相反)的理由:专属工具的默认态就是"隐藏",
|
|
290
|
+
* 判据读不到 = 没有证据表明该 CCC 要它;而配置损坏本身已在 `loadSerenityConfig` 响亮告警
|
|
291
|
+
* (不会静默)。im-bridge 相反——隐藏一个**已在使用**的通道才会静默损害能力。
|
|
292
|
+
* @param root CCC 根
|
|
293
|
+
* @param paths 候选配置相对路径
|
|
294
|
+
* @returns 去空白后的工具名列表(非字符串项被丢弃)
|
|
295
|
+
*/
|
|
296
|
+
export declare function readExclusiveTools(root: string, paths?: string[]): string[];
|
|
267
297
|
export declare const SAFE_MODE_MARKER = ".serenity-safe-on";
|
|
268
298
|
export declare function isSafeModeOn(root: string): boolean;
|
|
269
299
|
/** 黑名单条目(对齐 osp BlacklistEntry):pattern + 可选自定义拦截提示 message */
|
package/lib/client.js
CHANGED
|
@@ -4788,13 +4788,15 @@ Instruction-following style:
|
|
|
4788
4788
|
const acpOn = value?.acpEnabled ?? false;
|
|
4789
4789
|
const acpPort = value?.acpHttpPort ?? 3100;
|
|
4790
4790
|
const publicAskOn = value?.publicAskEnabled ?? false;
|
|
4791
|
-
const autopilotOn = value?.autopilotEnabled ?? false;
|
|
4791
|
+
const autopilotOn = value?.autopilotWakeEnabled ?? value?.autopilotEnabled ?? false;
|
|
4792
|
+
const wakeSchedOn = value?.wakeSchedulerEnabled ?? true;
|
|
4792
4793
|
const [openGateway, setOpenGateway] = (0, react.useState)(false);
|
|
4793
4794
|
const [openRebuild, setOpenRebuild] = (0, react.useState)(false);
|
|
4794
4795
|
const [openSkiff, setOpenSkiff] = (0, react.useState)(false);
|
|
4795
4796
|
const [openAcp, setOpenAcp] = (0, react.useState)(false);
|
|
4796
4797
|
const [openPublicAsk, setOpenPublicAsk] = (0, react.useState)(false);
|
|
4797
4798
|
const [openAutopilot, setOpenAutopilot] = (0, react.useState)(false);
|
|
4799
|
+
const [openWakeSched, setOpenWakeSched] = (0, react.useState)(false);
|
|
4798
4800
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4799
4801
|
className: "ss-section",
|
|
4800
4802
|
children: [
|
|
@@ -4832,7 +4834,7 @@ Instruction-following style:
|
|
|
4832
4834
|
title: "上下文",
|
|
4833
4835
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCard, {
|
|
4834
4836
|
title: "超限重建",
|
|
4835
|
-
desc: "上下文接近上限时提示调用
|
|
4837
|
+
desc: "上下文接近上限时提示调用 container_trajectory rebuild 清空重建",
|
|
4836
4838
|
expandable: true,
|
|
4837
4839
|
open: openRebuild,
|
|
4838
4840
|
onToggle: setOpenRebuild,
|
|
@@ -4845,7 +4847,7 @@ Instruction-following style:
|
|
|
4845
4847
|
className: "ss-detailStack",
|
|
4846
4848
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4847
4849
|
className: "ss-detailIntro",
|
|
4848
|
-
children: "上下文超限自动重建(
|
|
4850
|
+
children: "上下文超限自动重建(container_trajectory rebuild,v1.33 起 logbook 并入 trajectory):\n· 机制:agent 上下文占用达到阈值时,由 LLM 主动调用重建\n· 语义:完全丢弃当前 dsh 会话 + 自动新建 + 注入「继续原 SESSION 的工作」\n· 效果:SESSION.md 原位不动,认知轨迹延续,上下文归零\n· 关闭后:上下文超限时不再提示,可能导致会话卡顿或丢失"
|
|
4849
4851
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCard, {
|
|
4850
4852
|
title: "重建阈值",
|
|
4851
4853
|
desc: "上下文占用达到该 K 数值时提示(单位 K token,默认 400)",
|
|
@@ -4941,22 +4943,40 @@ Instruction-following style:
|
|
|
4941
4943
|
})
|
|
4942
4944
|
}) }),
|
|
4943
4945
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCard, {
|
|
4944
|
-
title: "
|
|
4945
|
-
desc: "
|
|
4946
|
+
title: "周期自唤醒(autopilot)",
|
|
4947
|
+
desc: "定时唤起 autopilot 轨迹(全局开关,默认关——只在指定电脑开启)",
|
|
4946
4948
|
expandable: true,
|
|
4947
4949
|
open: openAutopilot,
|
|
4948
4950
|
onToggle: setOpenAutopilot,
|
|
4949
4951
|
control: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Toggle, {
|
|
4950
4952
|
checked: autopilotOn,
|
|
4951
|
-
onChange: (on) => toggle("
|
|
4953
|
+
onChange: (on) => toggle("autopilotWakeEnabled", on)
|
|
4952
4954
|
}),
|
|
4953
4955
|
detail: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4954
4956
|
className: "ss-detailStack",
|
|
4955
4957
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4956
4958
|
className: "ss-detailIntro",
|
|
4957
|
-
children: "Autopilot Trajectory
|
|
4959
|
+
children: "周期自唤醒全局闸(v1.34 更名收窄,原 Autopilot Trajectory 全局总开关):\n· 作用:控制本机(本 dsh 实例)是否运行**周期**自动巡航唤起\n· 语义边界:**只管周期自唤醒** —— 关掉它不影响一次性唤醒(wake-later,见下一行)\n· 默认关:未开启即使 CCC 配置 enabled=true 也不启动定时器\n· 定位:多台电脑装 dsp 时,只在指定电脑开启(其余默认关)\n· 双重门控:本开关 AND CCC 级 enabled 都满足才运行\n· CCC 级配置(interval/session/偏见脚本/焦点)不受影响"
|
|
4958
4960
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AutopilotTrajectoryStatusBlock, { autopilotOn })]
|
|
4959
4961
|
})
|
|
4962
|
+
}) }),
|
|
4963
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCard, {
|
|
4964
|
+
title: "唤醒调度器(wake-later)",
|
|
4965
|
+
desc: "投递已登记的“未来时刻 + 一条 message”(全局开关,默认开)",
|
|
4966
|
+
expandable: true,
|
|
4967
|
+
open: openWakeSched,
|
|
4968
|
+
onToggle: setOpenWakeSched,
|
|
4969
|
+
control: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Toggle, {
|
|
4970
|
+
checked: wakeSchedOn,
|
|
4971
|
+
onChange: (on) => toggle("wakeSchedulerEnabled", on)
|
|
4972
|
+
}),
|
|
4973
|
+
detail: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4974
|
+
className: "ss-detailStack",
|
|
4975
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
4976
|
+
className: "ss-detailIntro",
|
|
4977
|
+
children: "唤醒调度器全局闸(v1.34 新增独立开关):\n· 作用:把 CCC 唤醒注册表(AGENT_SESSIONS/wake-registry.json)里到点的条目投递给目标轨迹\n· 条目来源:`container_trajectory wake-later`(对自己或别的 trajectory 预约未来时刻 + 一条 message)\n· 默认开:条目全部由人类/agent 显式登记,无环境自主性 ⇒ 不需要“默认关”的实验保护\n· 与上一行**互不连带**:关掉周期自唤醒不会关掉本调度器(用户 2026-09-15 裁决)\n· 精度:5min tick;补跑窗口 2h(超窗判 missed 留痕);fire-and-forget 无回执"
|
|
4978
|
+
})
|
|
4979
|
+
})
|
|
4960
4980
|
}) })
|
|
4961
4981
|
]
|
|
4962
4982
|
}),
|
|
@@ -5112,6 +5132,7 @@ Instruction-following style:
|
|
|
5112
5132
|
const [cccs, setCccs] = (0, react.useState)([]);
|
|
5113
5133
|
const [selectedRoot, setSelectedRoot] = (0, react.useState)("");
|
|
5114
5134
|
const [status, setStatus] = (0, react.useState)(null);
|
|
5135
|
+
const [wakes, setWakes] = (0, react.useState)([]);
|
|
5115
5136
|
const [unavailable, setUnavailable] = (0, react.useState)(false);
|
|
5116
5137
|
const [waking, setWaking] = (0, react.useState)(false);
|
|
5117
5138
|
const [wakeResult, setWakeResult] = (0, react.useState)(null);
|
|
@@ -5135,9 +5156,10 @@ Instruction-following style:
|
|
|
5135
5156
|
const refresh = (0, react.useCallback)(async () => {
|
|
5136
5157
|
if (!selectedRoot) return;
|
|
5137
5158
|
try {
|
|
5138
|
-
const res = await fetch(`/serenity/
|
|
5159
|
+
const res = await fetch(`/serenity/trajectory?ccc=${encodeURIComponent(selectedRoot)}`, { headers: { accept: "application/json" } });
|
|
5139
5160
|
if (!res.ok) return;
|
|
5140
5161
|
const body = await res.json();
|
|
5162
|
+
if (Array.isArray(body.wakes)) setWakes(body.wakes);
|
|
5141
5163
|
if (body.status) {
|
|
5142
5164
|
setStatus(body.status);
|
|
5143
5165
|
setUnavailable(false);
|
|
@@ -5156,7 +5178,7 @@ Instruction-following style:
|
|
|
5156
5178
|
setWaking(true);
|
|
5157
5179
|
setWakeResult(null);
|
|
5158
5180
|
try {
|
|
5159
|
-
const res = await fetch("/serenity/
|
|
5181
|
+
const res = await fetch("/serenity/trajectory", {
|
|
5160
5182
|
method: "POST",
|
|
5161
5183
|
headers: {
|
|
5162
5184
|
"content-type": "application/json",
|
|
@@ -5204,7 +5226,7 @@ Instruction-following style:
|
|
|
5204
5226
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCard, {
|
|
5205
5227
|
title: "目标 CCC",
|
|
5206
5228
|
desc: "多 CCC 各自独立——选中哪个就查看/唤起哪个",
|
|
5207
|
-
help: "Autopilot Trajectory 目标认知容器:\n· 机制:dsh 一个进程可挂载多个 CCC,每个 CCC 的 autopilot 独立配置\n· 选择:下拉切换要查看/唤起的目标 CCC(各 CCC 时钟独立)\n· 配置:各 CCC 在自身 .opencode/serenity.json 定义 autopilotTrajectory
|
|
5229
|
+
help: "Autopilot Trajectory 目标认知容器:\n· 机制:dsh 一个进程可挂载多个 CCC,每个 CCC 的 autopilot 独立配置\n· 选择:下拉切换要查看/唤起的目标 CCC(各 CCC 时钟独立)\n· 配置:各 CCC 在自身 .opencode/serenity.json 定义 trajectory.autopilot(旧键 autopilotTrajectory 兼容)\n· 唤起:仅对选中 CCC 生效,互不干扰",
|
|
5208
5230
|
control: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
5209
5231
|
className: "ss-select",
|
|
5210
5232
|
value: selectedRoot,
|
|
@@ -5224,7 +5246,7 @@ Instruction-following style:
|
|
|
5224
5246
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCard, {
|
|
5225
5247
|
title: "运行状态",
|
|
5226
5248
|
desc: stateText,
|
|
5227
|
-
help: "Autopilot Trajectory 运行状态含义:\n· 未配置:该 CCC 未定义
|
|
5249
|
+
help: "Autopilot Trajectory 运行状态含义:\n· 未配置:该 CCC 未定义 trajectory.autopilot(机制不开始)\n· 已配置未启用:enabled=false,零资源占用(不唤起不消耗)\n· 已启用:时钟驱动周期性自动唤起——无人类活动满间隔小时数后\n 启动一次前台 agent 轮(用户全程可见可介入)",
|
|
5228
5250
|
control: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
5229
5251
|
className: "ss-value",
|
|
5230
5252
|
children: status.enabled ? "● 运行中" : status.configured ? "○ 待启" : "—"
|
|
@@ -5255,6 +5277,16 @@ Instruction-following style:
|
|
|
5255
5277
|
}
|
|
5256
5278
|
] })
|
|
5257
5279
|
}) }),
|
|
5280
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
5281
|
+
className: "ss-rowCard",
|
|
5282
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DefList, { items: [{
|
|
5283
|
+
term: "唤醒注册表",
|
|
5284
|
+
value: wakes.length === 0 ? "无条目(agent 用 container_trajectory wake-later 登记:未来时刻 + 一条 message)" : `${wakes.filter((w) => w.state === "pending").length} 条在办 / 共 ${wakes.length} 条`
|
|
5285
|
+
}, ...wakes.slice(0, 5).map((w) => ({
|
|
5286
|
+
term: w.state === "pending" ? "· 待唤醒" : `· ${w.state}`,
|
|
5287
|
+
value: `${new Date(w.at).toLocaleString()} → ${w.target}${w.lastResult ? `(${w.lastResult})` : ""}`
|
|
5288
|
+
}))] })
|
|
5289
|
+
}) }),
|
|
5258
5290
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowCard, {
|
|
5259
5291
|
title: "立即唤起",
|
|
5260
5292
|
desc: wakeResult ?? "调试:手动触发一次(跳过窗口/间隔,仍校验配置与偏见脚本)",
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* diag-ops.ts — `acc-diag` 报告装配(v1.33,S142 §32.11)
|
|
3
|
+
*
|
|
4
|
+
* 为什么单独成模块(R↓):工具面(`tools/acc-diag.ts`)只做"取 CCC 根 + 渲染",
|
|
5
|
+
* 装配逻辑放这里 ⇒ 纯函数可单测、不依赖 DSH 工具注册。
|
|
6
|
+
*
|
|
7
|
+
* 为什么**无动作参数**:诊断是低频动作(§32.9 收敛取向),一次调用即出全报告,
|
|
8
|
+
* 不需要子命令面;动作越多,模型选择成本越高。
|
|
9
|
+
*
|
|
10
|
+
* 四段内容(数据来源各自单一真相源,本模块只聚合不复制语义):
|
|
11
|
+
* ① live 运行态 —— 插件进程内 `diagLive(ctx)`(live 会话清单 + 各 autopilot CCC 的
|
|
12
|
+
* 目标命中 / agent 定位诊断)——**脚本侧看不到运行时**,这正是本工具存在的理由
|
|
13
|
+
* ② 面板解析 —— `diagLive.panelResolved`(无参面板请求会落到哪个 CCC)
|
|
14
|
+
* ③ 唤醒注册表 —— `wake-registry.json` 全量条目(state / at / target / lastResult)+ 补跑窗口
|
|
15
|
+
* ④ 唤起条件链 —— 包内脚本 `diag`(`runAutopilotScript(root,'diag')`):逐条件值 + 阻断点 + 修复建议
|
|
16
|
+
*/
|
|
17
|
+
import { type DiagLiveReport, autopilotClockState } from './autopilot-trajectory.js';
|
|
18
|
+
import { wakeSchedulerState } from './wake-scheduler.js';
|
|
19
|
+
import type { Context } from 'cordis';
|
|
20
|
+
/** 进程内时钟状态(唤醒调度器 / autopilot 时钟;判据各自单一真相源) */
|
|
21
|
+
type ClockState = ReturnType<typeof wakeSchedulerState> | ReturnType<typeof autopilotClockState>;
|
|
22
|
+
export interface AccDiagReport {
|
|
23
|
+
/** 调用方会话所属 CCC 根(脚本诊断的目标) */
|
|
24
|
+
ccc: string;
|
|
25
|
+
live: DiagLiveReport;
|
|
26
|
+
/**
|
|
27
|
+
* 进程内两个时钟的武装状态(2026-09-14 F 段缺陷**新暴露面**)。
|
|
28
|
+
* 为什么必须有(R↓):此前"条目为何滞留在 pending"无法从报告回答——④ 段只算**配置**条件,
|
|
29
|
+
* 而真正的原因可能在"时钟根本没在跑"这一层。有了它,同类故障一眼可判。
|
|
30
|
+
*/
|
|
31
|
+
clocks: {
|
|
32
|
+
wake: ClockState;
|
|
33
|
+
autopilot: ClockState;
|
|
34
|
+
};
|
|
35
|
+
wakes: {
|
|
36
|
+
/** 注册表文件路径问题(读不到时非空——不得静默) */
|
|
37
|
+
error: string | null;
|
|
38
|
+
entries: Array<{
|
|
39
|
+
id: string;
|
|
40
|
+
target: string;
|
|
41
|
+
at: string;
|
|
42
|
+
state: string;
|
|
43
|
+
createdBy: string;
|
|
44
|
+
attempts: number;
|
|
45
|
+
lastResult: string | null;
|
|
46
|
+
}>;
|
|
47
|
+
pending: number;
|
|
48
|
+
};
|
|
49
|
+
/** 唤起条件链(脚本输出原文;失败时给出错误文本,不吞) */
|
|
50
|
+
autopilotChain: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 装配报告(一次调用即全报告)。
|
|
54
|
+
* @param ctx 插件上下文(进程内读 sessions/agents)
|
|
55
|
+
* @param root 调用方 CCC 根(脚本诊断目标)
|
|
56
|
+
* @returns 结构化报告(渲染由 {@link renderAccDiag} 负责)
|
|
57
|
+
*/
|
|
58
|
+
export declare function runAccDiag(ctx: Context, root: string): AccDiagReport;
|
|
59
|
+
/** 人读渲染(四段;空段也要显式说明"无",避免"沉默 = 一切正常"的误读) */
|
|
60
|
+
export declare function renderAccDiag(r: AccDiagReport): string;
|
|
61
|
+
export {};
|
package/lib/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 形态(DSH 官方 native hook 约定):name / inject / Config / apply,无 default export。
|
|
5
5
|
*
|
|
6
6
|
* 能力:
|
|
7
|
-
* 1. 真实 DSH 工具注册:container_fs(文件系统 15 子命令,含 reveal)、
|
|
7
|
+
* 1. 真实 DSH 工具注册:container_fs(文件系统 15 子命令,含 reveal)、container_trajectory(轨迹生命周期 + 一次性安排,含 rebuild)
|
|
8
8
|
* 2. 拦截缝机械约束:tools/pre-execute + ctx.tools.guard(安全模式/黑名单/路径守卫)
|
|
9
9
|
*
|
|
10
10
|
* 加载:~/.dsh/config.yaml 加 insert 行(免改 DSH 源码),插件包装入 DSH node_modules。
|