@shgroup/dsh-serenity-hooks 1.99.0 → 1.101.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/dsh.plugin.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-serenity-hooks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.101.0",
|
|
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/cheap-worker/localstore/container_admin;另三个 im-bridge/acc-diag/diagram 按配置条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫)+ 认知轨迹日志与原地重建 + 网页登录入口/IM 桥/认知轨迹唤醒注册表。轨迹声明 = 轨迹目录下的 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
|
@@ -4,7 +4,7 @@ import { _ as resolveInside, a as findSerenityRoot$1, c as matchBlacklist, d as
|
|
|
4
4
|
import { A as namingTitleFor, B as summarize, C as createSession, E as getActiveSessionInfo, F as resolveSessionByTitle, G as readTrajectoryFile, H as useSession, I as sessionEvents, J as localHuman, K as isoLocal, L as sessionsRoot, M as parseTrajectoryCode, O as listActiveTrajectories, P as readTrajectoryUid, R as setActiveSessionInfo, S as clearActiveSessionInfo, T as findSession, U as TRAJECTORY_FILENAME, V as trajectoryDescOf, W as TRAJECTORY_LEGACY_FILENAMES, Y as localIdStamp, b as UID_FILENAME, c as replacesDefaultIdentity, i as listTrajectoryConstraints, j as parseSessionContextFromEvents, k as listSessions, l as trajectoryCodeForSession, n as findDirNameByCode, o as readTrajectoryConstraintAt, q as localFileStamp, r as isTrajectoryConstrained, s as readTrajectoryConstraintByCode, t as TRAJECTORY_CONSTRAINT_FILENAME, u as trajectoryConstraintForSession, v as COGNITIVE_TRAJECTORY_ACTIONS, w as extractSessionMdPathFromText, x as archiveSession, z as showSession } from "./profile-zxakCNXy.js";
|
|
5
5
|
import { n as checkLocalstoreGitCompliance, o as readStore, s as runLocalStore, t as LOCALSTORE_SCOPES } from "./service-DDmHSglV.js";
|
|
6
6
|
import { _ as resolveConstraintSystemPrompt, a as listBoundSessionIds, d as constraintCognitiveTrajectory, f as constraintSystemPromptSource, g as profileWriteWhitelist, h as profileToolWhitelist, i as carrierState, l as TRAJECTORY_CONSTRAINT_HINT, n as PLUGIN_SOURCE, o as readLastBound, r as appendBound, s as resolveSessionCognitiveTrajectoryLabel, t as ACC_MESSAGE_KIND, v as ACC_VERSION, y as findPackageRoot } from "./message-source-BAMwXu6i.js";
|
|
7
|
-
import { A as buildResourceIndex, C as verifyPassword, D as recordToolUsage, E as verifyTotpCode, F as hasTrajectoryPrompt, M as isSafeSkillName, N as truncateContent, O as REFERENCE_DIR, P as TRAJECTORY_PROMPT_FILENAME, S as toWire, T as MECHANISM_PORTS, _ as registerEntrySkillSectionGlobal, a as trajectoryConstraintFor, b as projectKnownWorkspaces, c as trajectoryWorkspaceMdPath, d as CHEAP_WORKER_GUIDE, f as providerAvailabilityError, g as registerEntrySkillSection, h as registerCognitiveTrajectorySkillSection, i as getTrajectoryAgent, j as buildResourceNameSuffix, k as SKILL_ONTOLOGY_FILE, l as unregisterTrajectorySession, m as splitModel, n as deliverToTrajectory, o as trajectoryConstraintMsmGate, p as requireWhitelistedModel, r as ensureWorkspacePromptSection, s as trajectoryConstraintParticipates, t as createTrajectoryAgent, u as workspaceCognitiveTrajectoryLine, v as applyWirePatch, w as FACE_PORTS, x as readAdvancedSettings, y as migrateLegacyLocalstore } from "./session-
|
|
7
|
+
import { A as buildResourceIndex, C as verifyPassword, D as recordToolUsage, E as verifyTotpCode, F as hasTrajectoryPrompt, M as isSafeSkillName, N as truncateContent, O as REFERENCE_DIR, P as TRAJECTORY_PROMPT_FILENAME, S as toWire, T as MECHANISM_PORTS, _ as registerEntrySkillSectionGlobal, a as trajectoryConstraintFor, b as projectKnownWorkspaces, c as trajectoryWorkspaceMdPath, d as CHEAP_WORKER_GUIDE, f as providerAvailabilityError, g as registerEntrySkillSection, h as registerCognitiveTrajectorySkillSection, i as getTrajectoryAgent, j as buildResourceNameSuffix, k as SKILL_ONTOLOGY_FILE, l as unregisterTrajectorySession, m as splitModel, n as deliverToTrajectory, o as trajectoryConstraintMsmGate, p as requireWhitelistedModel, r as ensureWorkspacePromptSection, s as trajectoryConstraintParticipates, t as createTrajectoryAgent, u as workspaceCognitiveTrajectoryLine, v as applyWirePatch, w as FACE_PORTS, x as readAdvancedSettings, y as migrateLegacyLocalstore } from "./session-Beybbybh.js";
|
|
8
8
|
import { i as sessionsRootDir, n as findSessionLog, r as hasSessionLogById } from "./cleanup-CPl1SSaK.js";
|
|
9
9
|
import { i as runImBridge, n as isImWiredTrajectory, o as readSimpleSettings, r as registerImChannel, s as registerSettingsSection, t as imChannelIds } from "./channels-CuCsUfcY.js";
|
|
10
10
|
import { a as readFeishuCredential, c as readWeixinSettings, d as weixinInboundDir, f as weixinSessionIdForTrajectory, i as matchWeixinRoute, n as extractWeixinText, r as hasVoiceItem, s as readWeixinCredential, t as extractWeixinMedia, u as sanitizeFileName$1 } from "./route-DxIKWeN9.js";
|
|
@@ -38,7 +38,13 @@ import { isIP } from "node:net";
|
|
|
38
38
|
* - cp:目录需 recursive;dst 已存在报错;自动建父目录
|
|
39
39
|
* - mv:dst 已存在报错;自动建父目录
|
|
40
40
|
* - list/tree/exists/info/find:输出结构与 osp 一致(JSON 元数据 / 嵌套树 / glob+fuzzy 搜索)
|
|
41
|
-
* - touch:存在更新 mtime
|
|
41
|
+
* - touch:存在更新 mtime、不存在创建(自动建父目录)
|
|
42
|
+
* - 🔴 **`append` 已于 v1.101.0 退役**(owner 2026-10-26 令「砍掉 container_fs 的 append」):
|
|
43
|
+
* 它存在的唯一理由曾是"不读全文的追加",但实测该用途几乎没人走(SESSION.md 追加
|
|
44
|
+
* 7,291 次里 append 只有 74 次,占 1.0%)⇒ 留着一个**绕过 fs-observation 锁**的
|
|
45
|
+
* 写通道,收益不足以抵它带来的规则面(写类动作清单、写白名单、两处工具描述都要维护它)。
|
|
46
|
+
* ⚠️ 传 `action:'append'` 现在得到 `PARAMETER_INVALID_VALUE` 并列出合法动作 —— **响亮失败**,
|
|
47
|
+
* 不是静默忽略。
|
|
42
48
|
* 保留 dsp 增强:win32 reveal 用 spawn+unref(explorer GUI 进程退出码不可靠,fire-and-forget)。
|
|
43
49
|
*/
|
|
44
50
|
const CC_FS_ACTIONS = [
|
|
@@ -53,7 +59,6 @@ const CC_FS_ACTIONS = [
|
|
|
53
59
|
"mv",
|
|
54
60
|
"cp",
|
|
55
61
|
"touch",
|
|
56
|
-
"append",
|
|
57
62
|
"reveal",
|
|
58
63
|
"info",
|
|
59
64
|
"find"
|
|
@@ -314,15 +319,6 @@ function runCcFs(root, args) {
|
|
|
314
319
|
writeFileSync(absPath, "", "utf-8");
|
|
315
320
|
return `created empty file: ${args.path}`;
|
|
316
321
|
}
|
|
317
|
-
case "append": {
|
|
318
|
-
if (!args.path || args.content === void 0) throw new Error("append requires path + content");
|
|
319
|
-
const absPath = validateWritePath(root, args.path);
|
|
320
|
-
const parentDir = dirname(absPath);
|
|
321
|
-
if (!existsSync(parentDir)) mkdirSync(parentDir, { recursive: true });
|
|
322
|
-
const content = args.content;
|
|
323
|
-
appendFileSync(absPath, content, "utf-8");
|
|
324
|
-
return `appended ${Buffer.byteLength(content, "utf8")} bytes to ${args.path}`;
|
|
325
|
-
}
|
|
326
322
|
case "reveal": {
|
|
327
323
|
if (!args.path) throw new Error("reveal requires path");
|
|
328
324
|
const absPath = resolveInside(root, args.path);
|
|
@@ -416,7 +412,7 @@ function runCcFs(root, args) {
|
|
|
416
412
|
count: matches.length
|
|
417
413
|
};
|
|
418
414
|
}
|
|
419
|
-
default: throw new Error(`Unknown action: ${a}`);
|
|
415
|
+
default: throw new Error(`Unknown action: ${a}. Valid actions: ${CC_FS_ACTIONS.join("/")}` + (a === "append" ? "(`append` 已于 v1.101.0 退役 —— 改用 edit 或 write)" : ""));
|
|
420
416
|
}
|
|
421
417
|
}
|
|
422
418
|
//#endregion
|
|
@@ -435,7 +431,7 @@ function renderText$11(value) {
|
|
|
435
431
|
}
|
|
436
432
|
const ccFsTool = defineTool({
|
|
437
433
|
name: "container_fs",
|
|
438
|
-
description: "Container filesystem operations (the CCC's hull — file operations confined to the container root; path escape blocked automatically).
|
|
434
|
+
description: "Container filesystem operations (the CCC's hull — file operations confined to the container root; path escape blocked automatically). 14 subcommands: root/resolve/exists/list/tree/relative/mkdir/rm/mv/cp/touch/reveal/info/find. reveal opens a path in the OS file manager (Linux xdg-open / macOS Finder / Windows Explorer). Complements read/write/edit (structural operations).",
|
|
439
435
|
parameters: {
|
|
440
436
|
action: {
|
|
441
437
|
type: "string",
|
|
@@ -445,7 +441,7 @@ const ccFsTool = defineTool({
|
|
|
445
441
|
},
|
|
446
442
|
path: {
|
|
447
443
|
type: "string",
|
|
448
|
-
description: "Primary path argument (single-path ops: resolve/exists/list/tree/relative/touch/
|
|
444
|
+
description: "Primary path argument (single-path ops: resolve/exists/list/tree/relative/touch/info/rm)"
|
|
449
445
|
},
|
|
450
446
|
paths: {
|
|
451
447
|
type: "array",
|
|
@@ -462,7 +458,7 @@ const ccFsTool = defineTool({
|
|
|
462
458
|
},
|
|
463
459
|
content: {
|
|
464
460
|
type: "string",
|
|
465
|
-
description: "append
|
|
461
|
+
description: "Deprecated/ignored — the only consumer was `append`, retired in v1.101.0"
|
|
466
462
|
},
|
|
467
463
|
pattern: {
|
|
468
464
|
type: "string",
|
|
@@ -12635,8 +12631,6 @@ function createContainerAdminTool(ctx) {
|
|
|
12635
12631
|
}
|
|
12636
12632
|
//#endregion
|
|
12637
12633
|
//#region src/seams/tool-visibility.ts
|
|
12638
|
-
/** ACC 自己注册的工具名集合(退化档只发这些 —— 它们一定在册) */
|
|
12639
|
-
const REGISTERED_TOOLS_SET = new Set(REGISTERED_TOOLS);
|
|
12640
12634
|
/** 收集器:把各来源的 deny 合并成一个判决(**纯函数、无副作用**) */
|
|
12641
12635
|
function collectVisibilityDecision(sources) {
|
|
12642
12636
|
const deny = /* @__PURE__ */ new Set();
|
|
@@ -12668,12 +12662,13 @@ const applied = /* @__PURE__ */ new Map();
|
|
|
12668
12662
|
* (旧集合是新集合的子集时叠不叠都看不出来,但**不是子集时**会残留 —— 必须撤。)
|
|
12669
12663
|
* ③ 🔴 **未注册的名字不许炸掉整次发射**:宿主契约"unknown names … fail"。
|
|
12670
12664
|
* 合并后集合里只要有一个不在册的名字,整次 restrict 就失败 ⇒ 六个机制**全都不生效**。
|
|
12671
|
-
* ⇒ 策略 = **直接发 →
|
|
12672
|
-
*
|
|
12665
|
+
* ⇒ 策略 = **直接发 → 被拒时从宿主的错误文案里解析出它点名的未知名字 → 只剔那几个、其余重发一次**。
|
|
12666
|
+
* 被剔掉的名字进 `dropped`(调用方决定要不要告警)。
|
|
12673
12667
|
* ⚠️ **不做 `tools.get` 预探活** —— 那个视图查不出 agent-plane 贡献的工具
|
|
12674
12668
|
* (`bash` / `schedule_*`),会把**在册的名字误判成未注册**(见下方发射段的实测记录)。
|
|
12675
|
-
*
|
|
12676
|
-
*
|
|
12669
|
+
* 🔴 **也不按"谁注册的"降级** —— `REGISTERED_TOOLS` 只含 ACC 自己的 14 个,
|
|
12670
|
+
* 用它当"在册面"会**整类丢掉宿主工具**(2026-10-24 真机缺陷,见发射段)。
|
|
12671
|
+
* ⇒ 唯一合法的在册判据是**宿主自己的回答**:要么发一次成功,要么它说出哪些名字不认识。
|
|
12677
12672
|
*
|
|
12678
12673
|
* @returns `'unchanged'` / `'applied'` / `'failed'`(`failed` 时 `deny` 保持原样)
|
|
12679
12674
|
*/
|
|
@@ -12716,33 +12711,72 @@ function applyVisibilityDecision(agent, sessionId, decision) {
|
|
|
12716
12711
|
dropped
|
|
12717
12712
|
};
|
|
12718
12713
|
} catch (firstError) {
|
|
12719
|
-
const
|
|
12720
|
-
|
|
12714
|
+
const message = errorText(firstError);
|
|
12715
|
+
const unknown = parseUnknownToolNames(message);
|
|
12716
|
+
if (unknown.length === 0) return {
|
|
12717
|
+
status: "failed",
|
|
12718
|
+
dropped,
|
|
12719
|
+
error: message
|
|
12720
|
+
};
|
|
12721
|
+
const unknownSet = new Set(unknown);
|
|
12722
|
+
const remaining = names.filter((n) => !unknownSet.has(n));
|
|
12723
|
+
dropped.push(...names.filter((n) => unknownSet.has(n)));
|
|
12724
|
+
if (remaining.length === 0) return {
|
|
12721
12725
|
status: "failed",
|
|
12722
12726
|
dropped,
|
|
12723
|
-
error:
|
|
12727
|
+
error: message
|
|
12724
12728
|
};
|
|
12725
|
-
const abandoned = names.filter((n) => !REGISTERED_TOOLS_SET.has(n));
|
|
12726
12729
|
try {
|
|
12727
|
-
const dispose = tools.restrict({ deny:
|
|
12730
|
+
const dispose = tools.restrict({ deny: remaining });
|
|
12728
12731
|
applied.set(sessionId, {
|
|
12729
|
-
signature
|
|
12730
|
-
|
|
12732
|
+
signature: decisionSignature({
|
|
12733
|
+
...decision,
|
|
12734
|
+
deny: remaining
|
|
12735
|
+
}),
|
|
12736
|
+
deny: remaining,
|
|
12731
12737
|
dispose
|
|
12732
12738
|
});
|
|
12733
12739
|
return {
|
|
12734
12740
|
status: "applied",
|
|
12735
|
-
dropped
|
|
12741
|
+
dropped
|
|
12736
12742
|
};
|
|
12737
12743
|
} catch (secondError) {
|
|
12738
12744
|
return {
|
|
12739
12745
|
status: "failed",
|
|
12740
12746
|
dropped,
|
|
12741
|
-
error: secondError
|
|
12747
|
+
error: errorText(secondError)
|
|
12742
12748
|
};
|
|
12743
12749
|
}
|
|
12744
12750
|
}
|
|
12745
12751
|
}
|
|
12752
|
+
/** 取异常的可读文案(非 Error 也能取到 message;都没有则 String()) */
|
|
12753
|
+
function errorText(e) {
|
|
12754
|
+
if (e instanceof Error) return e.message;
|
|
12755
|
+
if (typeof e === "object" && e !== null && "message" in e && typeof e.message === "string") return e.message;
|
|
12756
|
+
return String(e);
|
|
12757
|
+
}
|
|
12758
|
+
/**
|
|
12759
|
+
* 从宿主的 `tools.restrict()` 错误文案里解析出**被点名的未知工具名**。
|
|
12760
|
+
*
|
|
12761
|
+
* 宿主逐字形态(`dsh-tools/lib/types/index.js` 的 `restrict()`):
|
|
12762
|
+
* ```
|
|
12763
|
+
* tools.restrict() names unknown global tool(s) "a", "b"; known global tools: x, y, z
|
|
12764
|
+
* ```
|
|
12765
|
+
* 单数时是 `tool`,复数时是 `tool(s)`——两种都匹配。
|
|
12766
|
+
*
|
|
12767
|
+
* 🔴 **只取分号之前那一段**:分号后是 `known global tools:` 清单,**不能**误当成未知名字。
|
|
12768
|
+
* 🔴 解析不出来就返回 `[]`(调用方据此走"如实失败、不记账"),**绝不猜**。
|
|
12769
|
+
*/
|
|
12770
|
+
function parseUnknownToolNames(message) {
|
|
12771
|
+
const head = message.split(";")[0] ?? "";
|
|
12772
|
+
if (!/names unknown global tool/.test(head)) return [];
|
|
12773
|
+
const out = [];
|
|
12774
|
+
for (const m of head.matchAll(/"([^"]+)"/g)) {
|
|
12775
|
+
const name = m[1];
|
|
12776
|
+
if (name !== void 0 && name !== "") out.push(name);
|
|
12777
|
+
}
|
|
12778
|
+
return [...new Set(out)];
|
|
12779
|
+
}
|
|
12746
12780
|
/** 会话销毁清理(防 per-会话 Map 无界增长;lifecycle 调用) */
|
|
12747
12781
|
function forgetToolVisibility(sessionId) {
|
|
12748
12782
|
const existing = applied.get(sessionId);
|
|
@@ -12769,18 +12803,17 @@ const WRITE_TOOLS = /* @__PURE__ */ new Set([
|
|
|
12769
12803
|
"str_replace_editor",
|
|
12770
12804
|
"container_fs",
|
|
12771
12805
|
"bash",
|
|
12772
|
-
"append",
|
|
12773
12806
|
"touch"
|
|
12774
12807
|
]);
|
|
12775
|
-
/** container_fs 的写类子命令(mkdir/rm/mv/cp/touch
|
|
12776
|
-
* list/tree/relative/reveal/info/find)为只读——只读子命令不查黑名单(同 read 语义)
|
|
12808
|
+
/** container_fs 的写类子命令(mkdir/rm/mv/cp/touch);其余 9 子命令(root/resolve/exists/
|
|
12809
|
+
* list/tree/relative/reveal/info/find)为只读——只读子命令不查黑名单(同 read 语义)
|
|
12810
|
+
* 🔴 `append` 已于 v1.101.0 退役(owner 2026-10-26),故不在此集合。 */
|
|
12777
12811
|
const CC_FS_WRITE_ACTIONS = /* @__PURE__ */ new Set([
|
|
12778
12812
|
"mkdir",
|
|
12779
12813
|
"rm",
|
|
12780
12814
|
"mv",
|
|
12781
12815
|
"cp",
|
|
12782
|
-
"touch"
|
|
12783
|
-
"append"
|
|
12816
|
+
"touch"
|
|
12784
12817
|
]);
|
|
12785
12818
|
/**
|
|
12786
12819
|
* 凭据文件硬名单(数据面守卫,v1.26.3,S142 用户:localstore.json 需要在 read 工具的黑名单里):
|
|
@@ -51,12 +51,13 @@ export declare function getToolVisibilityDiagnostics(): {
|
|
|
51
51
|
* (旧集合是新集合的子集时叠不叠都看不出来,但**不是子集时**会残留 —— 必须撤。)
|
|
52
52
|
* ③ 🔴 **未注册的名字不许炸掉整次发射**:宿主契约"unknown names … fail"。
|
|
53
53
|
* 合并后集合里只要有一个不在册的名字,整次 restrict 就失败 ⇒ 六个机制**全都不生效**。
|
|
54
|
-
* ⇒ 策略 = **直接发 →
|
|
55
|
-
*
|
|
54
|
+
* ⇒ 策略 = **直接发 → 被拒时从宿主的错误文案里解析出它点名的未知名字 → 只剔那几个、其余重发一次**。
|
|
55
|
+
* 被剔掉的名字进 `dropped`(调用方决定要不要告警)。
|
|
56
56
|
* ⚠️ **不做 `tools.get` 预探活** —— 那个视图查不出 agent-plane 贡献的工具
|
|
57
57
|
* (`bash` / `schedule_*`),会把**在册的名字误判成未注册**(见下方发射段的实测记录)。
|
|
58
|
-
*
|
|
59
|
-
*
|
|
58
|
+
* 🔴 **也不按"谁注册的"降级** —— `REGISTERED_TOOLS` 只含 ACC 自己的 14 个,
|
|
59
|
+
* 用它当"在册面"会**整类丢掉宿主工具**(2026-10-24 真机缺陷,见发射段)。
|
|
60
|
+
* ⇒ 唯一合法的在册判据是**宿主自己的回答**:要么发一次成功,要么它说出哪些名字不认识。
|
|
60
61
|
*
|
|
61
62
|
* @returns `'unchanged'` / `'applied'` / `'failed'`(`failed` 时 `deny` 保持原样)
|
|
62
63
|
*/
|
|
@@ -73,5 +74,18 @@ export declare function applyVisibilityDecision(agent: {
|
|
|
73
74
|
dropped: string[];
|
|
74
75
|
error?: string;
|
|
75
76
|
};
|
|
77
|
+
/**
|
|
78
|
+
* 从宿主的 `tools.restrict()` 错误文案里解析出**被点名的未知工具名**。
|
|
79
|
+
*
|
|
80
|
+
* 宿主逐字形态(`dsh-tools/lib/types/index.js` 的 `restrict()`):
|
|
81
|
+
* ```
|
|
82
|
+
* tools.restrict() names unknown global tool(s) "a", "b"; known global tools: x, y, z
|
|
83
|
+
* ```
|
|
84
|
+
* 单数时是 `tool`,复数时是 `tool(s)`——两种都匹配。
|
|
85
|
+
*
|
|
86
|
+
* 🔴 **只取分号之前那一段**:分号后是 `known global tools:` 清单,**不能**误当成未知名字。
|
|
87
|
+
* 🔴 解析不出来就返回 `[]`(调用方据此走"如实失败、不记账"),**绝不猜**。
|
|
88
|
+
*/
|
|
89
|
+
export declare function parseUnknownToolNames(message: string): string[];
|
|
76
90
|
/** 会话销毁清理(防 per-会话 Map 无界增长;lifecycle 调用) */
|
|
77
91
|
export declare function forgetToolVisibility(sessionId: string): void;
|
|
@@ -1500,7 +1500,7 @@ function toolsBlock() {
|
|
|
1500
1500
|
"=== Serenity Tools ===",
|
|
1501
1501
|
"The ACC (this plugin) provides the following built-in tools:",
|
|
1502
1502
|
"",
|
|
1503
|
-
" container_fs — container filesystem operations (
|
|
1503
|
+
" container_fs — container filesystem operations (14 subcommands: root/resolve/exists/list/tree/relative/mkdir/rm/mv/cp/touch/reveal/info/find)",
|
|
1504
1504
|
" cognitive_trajectory — one cognitive trajectory: its persistent body (SESSION.md) + its timeline. Lifecycle: list (inventory + stats) / show / create / use (activate; inline integrity check — silent when fine) / rebuild (clear-and-rebuild this conversation in place, Ship of Theseus); delivery: send-now (deliver one message RIGHT NOW; live target injected immediately, non-live cold-resumed like a direct wake — returns a synchronous receipt) / send-later (one future instant + one message to any cognitive trajectory; fire-and-forget — no receipt, no recall) / cro-guide (the CRO programming guide: how to give THIS cognitive trajectory its own program that decides when it should be woken)",
|
|
1505
1505
|
" dashboard — always-on container instruments: health (CCC three-principle check + registry integrity) / time (now) / wait (N seconds)",
|
|
1506
1506
|
" container_git— git operations (status/commit/push/log/pull/diff)",
|
|
@@ -6,11 +6,17 @@
|
|
|
6
6
|
* - cp:目录需 recursive;dst 已存在报错;自动建父目录
|
|
7
7
|
* - mv:dst 已存在报错;自动建父目录
|
|
8
8
|
* - list/tree/exists/info/find:输出结构与 osp 一致(JSON 元数据 / 嵌套树 / glob+fuzzy 搜索)
|
|
9
|
-
* - touch:存在更新 mtime
|
|
9
|
+
* - touch:存在更新 mtime、不存在创建(自动建父目录)
|
|
10
|
+
* - 🔴 **`append` 已于 v1.101.0 退役**(owner 2026-10-26 令「砍掉 container_fs 的 append」):
|
|
11
|
+
* 它存在的唯一理由曾是"不读全文的追加",但实测该用途几乎没人走(SESSION.md 追加
|
|
12
|
+
* 7,291 次里 append 只有 74 次,占 1.0%)⇒ 留着一个**绕过 fs-observation 锁**的
|
|
13
|
+
* 写通道,收益不足以抵它带来的规则面(写类动作清单、写白名单、两处工具描述都要维护它)。
|
|
14
|
+
* ⚠️ 传 `action:'append'` 现在得到 `PARAMETER_INVALID_VALUE` 并列出合法动作 —— **响亮失败**,
|
|
15
|
+
* 不是静默忽略。
|
|
10
16
|
* 保留 dsp 增强:win32 reveal 用 spawn+unref(explorer GUI 进程退出码不可靠,fire-and-forget)。
|
|
11
17
|
*/
|
|
12
18
|
import type { JsonValue } from '../../kernel/json.js';
|
|
13
|
-
type CcFsAction = 'root' | 'resolve' | 'exists' | 'list' | 'tree' | 'relative' | 'mkdir' | 'rm' | 'mv' | 'cp' | 'touch' | '
|
|
19
|
+
type CcFsAction = 'root' | 'resolve' | 'exists' | 'list' | 'tree' | 'relative' | 'mkdir' | 'rm' | 'mv' | 'cp' | 'touch' | 'reveal' | 'info' | 'find';
|
|
14
20
|
export declare const CC_FS_ACTIONS: readonly CcFsAction[];
|
|
15
21
|
export interface CcFsArgs {
|
|
16
22
|
action: CcFsAction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shgroup/dsh-serenity-hooks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.101.0",
|
|
4
4
|
"description": "宁静号 ACC harness(Native Cordis 插件)——给 DeepSeek Harness 装一个「AI 工作区」:14 个工具(container_fs/cognitive_trajectory/dashboard/container_git/msm/praxis/ontology/serenity-skill-creator/cheap-worker/localstore/container_admin;另三个 im-bridge/acc-diag/diagram 按配置条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫/对外输出守卫)+ 认知轨迹日志与原地重建 + 网页登录入口/IM 桥/认知轨迹唤醒注册表。轨迹声明 = 轨迹目录下的 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": {
|