@shgroup/dsh-serenity-hooks 1.79.5 → 1.80.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 +1 -1
- package/lib/{ccc-roots-DAwz9Li1.js → ccc-roots-DYJvlQhc.js} +1 -1
- package/lib/index.js +45 -12
- package/lib/{message-source-DiP3Uve3.js → message-source-BYO-FyFP.js} +2 -2
- package/lib/{profile-5TQ_C1xi.js → profile-DmWw2M0q.js} +13 -0
- package/lib/{session-tdlJDS9i.js → session-sV-kc1gQ.js} +149 -12
- package/lib/{settings-B-vn8j4g.js → settings-DdYLVK3O.js} +1 -1
- package/lib/trajectory/policy/profile.d.ts +13 -0
- package/lib/trajectory/prompt-injection.d.ts +73 -0
- 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.
|
|
3
|
+
"version": "1.80.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": {
|
|
@@ -227,7 +227,7 @@ async function listCccs(ctx, opts = {}) {
|
|
|
227
227
|
if (typeof defaultRoot === "string" && defaultRoot !== "" && !c.roots.includes(defaultRoot)) c.roots.unshift(defaultRoot);
|
|
228
228
|
let rolesOf = null;
|
|
229
229
|
if (opts.withRoles === true) {
|
|
230
|
-
const { listTrajectoryConstraints } = await import("./profile-
|
|
230
|
+
const { listTrajectoryConstraints } = await import("./profile-DmWw2M0q.js").then((n) => n.i);
|
|
231
231
|
rolesOf = (root) => {
|
|
232
232
|
try {
|
|
233
233
|
return listTrajectoryConstraints(root).map((p) => p.code);
|
package/lib/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { i as __toESM, n as __exportAll } from "./rolldown-runtime-B4iAMlE-.js";
|
|
2
|
-
import { c as hostInjected, d as hostSessions, f as hostSettings, h as hostWebServer, i as cccRootForExec, l as hostLlm, m as hostWeb, n as agentCwdFor, o as listCccs, p as hostSubagents, r as cccRootForCwd, s as hostAgents, t as NO_CCC_FROM_AGENT_CWD, u as hostService } from "./ccc-roots-
|
|
2
|
+
import { c as hostInjected, d as hostSessions, f as hostSettings, h as hostWebServer, i as cccRootForExec, l as hostLlm, m as hostWeb, n as agentCwdFor, o as listCccs, p as hostSubagents, r as cccRootForCwd, s as hostAgents, t as NO_CCC_FROM_AGENT_CWD, u as hostService } from "./ccc-roots-DYJvlQhc.js";
|
|
3
3
|
import { _ as resolveInside, a as findSerenityRoot$1, c as matchBlacklist, d as readCccName$1, f as readCheapWorkerConfig, h as readSafeModeHiddenTools, i as findGitRoot, l as pathInside, m as readExclusiveTools, 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-CyYJL4F2.js";
|
|
4
|
-
import { A as sessionEvents, B as isoLocal, C as listSessions, E as parseTrajectoryCode, F as trajectoryDescOf, H as localHuman, I as useSession, L as TRAJECTORY_FILENAME, M as setActiveSessionInfo, N as showSession, O as readTrajectoryUid, P as summarize, R as TRAJECTORY_LEGACY_FILENAMES, S as listActiveTrajectories, T as parseSessionContextFromEvents, U as localIdStamp, V as localFileStamp, _ as createSession, a as readTrajectoryConstraintAt, b as getActiveSessionInfo, c as trajectoryConstraintForSession, f as COGNITIVE_TRAJECTORY_ACTIONS, g as clearActiveSessionInfo, h as archiveSession, j as sessionsRoot, k as resolveSessionByTitle, m as UID_FILENAME, n as isTrajectoryConstrained, o as readTrajectoryConstraintByCode, r as listTrajectoryConstraints, s as replacesDefaultIdentity, t as TRAJECTORY_CONSTRAINT_FILENAME, v as extractSessionMdPathFromText, w as namingTitleFor, y as findSession, z as readTrajectoryFile } from "./profile-
|
|
4
|
+
import { A as sessionEvents, B as isoLocal, C as listSessions, E as parseTrajectoryCode, F as trajectoryDescOf, H as localHuman, I as useSession, L as TRAJECTORY_FILENAME, M as setActiveSessionInfo, N as showSession, O as readTrajectoryUid, P as summarize, R as TRAJECTORY_LEGACY_FILENAMES, S as listActiveTrajectories, T as parseSessionContextFromEvents, U as localIdStamp, V as localFileStamp, _ as createSession, a as readTrajectoryConstraintAt, b as getActiveSessionInfo, c as trajectoryConstraintForSession, f as COGNITIVE_TRAJECTORY_ACTIONS, g as clearActiveSessionInfo, h as archiveSession, j as sessionsRoot, k as resolveSessionByTitle, m as UID_FILENAME, n as isTrajectoryConstrained, o as readTrajectoryConstraintByCode, r as listTrajectoryConstraints, s as replacesDefaultIdentity, t as TRAJECTORY_CONSTRAINT_FILENAME, v as extractSessionMdPathFromText, w as namingTitleFor, y as findSession, z as readTrajectoryFile } from "./profile-DmWw2M0q.js";
|
|
5
5
|
import { n as checkLocalstoreGitCompliance, o as readStore, s as runLocalStore, t as LOCALSTORE_SCOPES } from "./service-DDmHSglV.js";
|
|
6
|
-
import { _ as ACC_VERSION, a as listBoundSessionIds, d as constraintCognitiveTrajectory, f as constraintSystemPromptSource, g as resolveConstraintSystemPrompt, 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 findPackageRoot } from "./message-source-
|
|
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 createTrajectoryAgent, o as trajectoryConstraintMsmGate, p as requireWhitelistedModel, r as ensureWorkspacePromptSection, s as trajectoryConstraintParticipates, t as askTrajectory, u as workspaceCognitiveTrajectoryLine, v as applyWirePatch, w as FACE_PORTS, x as readAdvancedSettings, y as migrateLegacyLocalstore } from "./session-
|
|
6
|
+
import { _ as ACC_VERSION, a as listBoundSessionIds, d as constraintCognitiveTrajectory, f as constraintSystemPromptSource, g as resolveConstraintSystemPrompt, 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 findPackageRoot } from "./message-source-BYO-FyFP.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 createTrajectoryAgent, o as trajectoryConstraintMsmGate, p as requireWhitelistedModel, r as ensureWorkspacePromptSection, s as trajectoryConstraintParticipates, t as askTrajectory, u as workspaceCognitiveTrajectoryLine, v as applyWirePatch, w as FACE_PORTS, x as readAdvancedSettings, y as migrateLegacyLocalstore } from "./session-sV-kc1gQ.js";
|
|
8
8
|
import { n as hasSessionLogById, r as sessionsRootDir } from "./cleanup-C-92qnDs.js";
|
|
9
|
-
import { n as readSimpleSettings, r as registerSettingsSection } from "./settings-
|
|
9
|
+
import { n as readSimpleSettings, r as registerSettingsSection } from "./settings-DdYLVK3O.js";
|
|
10
10
|
import { REGISTERED_TOOLS } from "./invariant.js";
|
|
11
11
|
import { a as readFeishuCredential, d as weixinSessionIdForTrajectory, i as matchWeixinRoute, l as sanitizeFileName$1, n as extractWeixinText, o as readWeixinCredential, r as hasVoiceItem, s as readWeixinSettings, t as extractWeixinMedia, u as weixinInboundDir } from "./route-Dr0SFD8A.js";
|
|
12
12
|
import { c as sendTextMessage, i as getUpdates, l as sendTyping, n as downloadMedia, o as markdownToPlainText, r as getConfig, s as sendFileMessage, t as TypingStatus, u as sniffImageExt } from "./ilink-BMk2w2KY.js";
|
|
@@ -10892,6 +10892,34 @@ const TRAJECTORY_SELF_GUIDE = [
|
|
|
10892
10892
|
⚠️ 与 SESSION.md 的分工(别写重了):
|
|
10893
10893
|
SESSION.md = **发生了什么**(日志、决策、当前状态)
|
|
10894
10894
|
PROMPT.md = **我是谁、怎么工作**(章程;很少改,改了就改变行为)`,
|
|
10895
|
+
"",
|
|
10896
|
+
`── 我的章程怎么进来:追加(缺省)还是替换 ──
|
|
10897
|
+
|
|
10898
|
+
\`trajectory.json\` 的 \`prompt\` 段(**不写它 = 追加**,既有行为逐字不变):
|
|
10899
|
+
|
|
10900
|
+
\`\`\`jsonc
|
|
10901
|
+
{
|
|
10902
|
+
"prompt": {
|
|
10903
|
+
"injection": "replace", // append(缺省)| replace
|
|
10904
|
+
"replaces": ["metaphor", "principles", "cce", "eap"] // 可选;不写 = 四块全换
|
|
10905
|
+
}
|
|
10906
|
+
}
|
|
10907
|
+
\`\`\`
|
|
10908
|
+
|
|
10909
|
+
| 模式 | 结果 |
|
|
10910
|
+
|---|---|
|
|
10911
|
+
| \`append\`(缺省) | 宁静号各块照常注入,我的 \`PROMPT.md\` **追加**在它们之后 |
|
|
10912
|
+
| \`replace\` | 我点名的**约束块**不再注入,我的 \`PROMPT.md\` **站到它们原来的位置**(紧跟身份块) |
|
|
10913
|
+
|
|
10914
|
+
可替换的四块:\`metaphor\`(世界模型)/\`principles\`(信念与边界)/\`cce\`(连续性纪律)/\`eap\`(输出标准)。
|
|
10915
|
+
🔴 **身份块(\`=== Serenity ACC ===\`)不可替换** —— 它回答"我在哪儿工作",不是"按什么章法工作";
|
|
10916
|
+
写进去会被丢弃并指名告警。
|
|
10917
|
+
|
|
10918
|
+
🔴 **两条硬前提**(缺一即**降级回 append** 并告警,绝不静默):
|
|
10919
|
+
① \`replace\` 需要**真的有一份 \`PROMPT.md\`** —— 没有替代物的替换 = 静默清空纪律;
|
|
10920
|
+
② \`append\` 下写 \`replaces\` 不生效(会告诉你,别以为它管用)。
|
|
10921
|
+
|
|
10922
|
+
⚠️ 想表达"我一块都不想换" ⇒ 写 \`"replaces": []\`(显式空数组),它**不等于**不写(不写 = 四块全换)。`,
|
|
10895
10923
|
"",
|
|
10896
10924
|
`── 常驻:自己声明"欢迎别人来麻烦我"(trajectory.json 的 resident 字段)──
|
|
10897
10925
|
|
|
@@ -10930,6 +10958,7 @@ const TRAJECTORY_SELF_GUIDE = [
|
|
|
10930
10958
|
| \`resident\` | 不出现在常驻名单里(不参与"被找") | 每轮 |
|
|
10931
10959
|
| \`cognitiveTrajectory\` | 三项纪律全参与(true) | 每轮 |
|
|
10932
10960
|
| \`systemPromptFile\` / \`systemPrompt\` | 用 ACC 的通用身份(**不替换**) | 保存即生效 |
|
|
10961
|
+
| \`prompt\` | 追加模式:宁静号各块照常注入,章程排在它们之后 | **每轮**(改文件下一轮即生效) |
|
|
10933
10962
|
|
|
10934
10963
|
🔴 **"没写" 与 "写了空数组" 是两种意思**:
|
|
10935
10964
|
\`"tools": []\`(显式空数组)= **我一个都不给** ⇒ 除 \`skill\` 外全部工具被隐藏。
|
|
@@ -10937,8 +10966,10 @@ const TRAJECTORY_SELF_GUIDE = [
|
|
|
10937
10966
|
⇒ 想只声明常驻?那就**只写 resident**,别的键一个都不要写。
|
|
10938
10967
|
|
|
10939
10968
|
🔴 **写 \`trajectory.json\` 本身不改任何默认行为** —— 它只是"我把设定放这儿了"。
|
|
10940
|
-
只有当某个 key
|
|
10941
|
-
|
|
10969
|
+
只有当某个 key **真的取代了默认**时才改变装配,目前只有两处:
|
|
10970
|
+
① 自带章程 \`systemPromptFile\` / \`systemPrompt\`(取代 ACC 身份);
|
|
10971
|
+
② \`prompt.injection = "replace"\`(**只**取代四个约束块,**不动**身份块)。
|
|
10972
|
+
其余字段都不影响。`,
|
|
10942
10973
|
"",
|
|
10943
10974
|
`── 想限制自己(白名单 / 模型 / 纪律参与项)──
|
|
10944
10975
|
|
|
@@ -10947,6 +10978,8 @@ const TRAJECTORY_SELF_GUIDE = [
|
|
|
10947
10978
|
`── 写完之后怎么验(别只看文档,要能机械判定)──
|
|
10948
10979
|
|
|
10949
10980
|
章程生效了吗 改 PROMPT.md 后**在同一会话里**看下一轮的系统提示词段是否变化(保存即生效)
|
|
10981
|
+
注入模式生效了吗 改 trajectory.json 的 prompt 段后,**同一会话下一轮**:replace 下四块消失、
|
|
10982
|
+
我的章程紧跟身份块;⛔ 不需要重启(这两者都是每轮现读)
|
|
10950
10983
|
我声明了什么 container_admin config list —— 逐轨迹列出 model/tools/msms 的**生效值**;
|
|
10951
10984
|
没写的字段印 \`(unchanged)\` / \`(unrestricted)\`,不是伪装成某个默认值
|
|
10952
10985
|
配置合法吗 container_admin config validate —— msms 均已注册 / model 在可用表里
|
|
@@ -14085,7 +14118,7 @@ function registerStatusApi(ctx, opts = {}) {
|
|
|
14085
14118
|
});
|
|
14086
14119
|
}
|
|
14087
14120
|
const { saveWeixinRoutes } = await import("./route-Dr0SFD8A.js").then((n) => n.c);
|
|
14088
|
-
const { findDirNameByCode } = await import("./profile-
|
|
14121
|
+
const { findDirNameByCode } = await import("./profile-DmWw2M0q.js").then((n) => n.i);
|
|
14089
14122
|
for (const r of routes) if (findDirNameByCode(root, r.trajectory) === null) {
|
|
14090
14123
|
sendJson$2(res, 400, { error: `unknown trajectory: ${r.trajectory} (no such trajectory code in ${root})` });
|
|
14091
14124
|
return;
|
|
@@ -19082,7 +19115,7 @@ const MEDIA_MAX_BYTES = 20971520;
|
|
|
19082
19115
|
*/
|
|
19083
19116
|
async function resolveCccRootByAlias(ctx, alias) {
|
|
19084
19117
|
try {
|
|
19085
|
-
const { listCccs } = await import("./ccc-roots-
|
|
19118
|
+
const { listCccs } = await import("./ccc-roots-DYJvlQhc.js").then((n) => n.a);
|
|
19086
19119
|
const entries = await listCccs(ctx);
|
|
19087
19120
|
const byName = entries.find((e) => e.name === alias);
|
|
19088
19121
|
if (byName) return byName.root;
|
|
@@ -19150,7 +19183,7 @@ async function resolveInboundTarget(ctx, input) {
|
|
|
19150
19183
|
});
|
|
19151
19184
|
return null;
|
|
19152
19185
|
}
|
|
19153
|
-
const { findDirNameByCode } = await import("./profile-
|
|
19186
|
+
const { findDirNameByCode } = await import("./profile-DmWw2M0q.js").then((n) => n.i);
|
|
19154
19187
|
if (findDirNameByCode(root, target.role) === null) {
|
|
19155
19188
|
const detail = `目标 CCC "${target.ccc}" 内没有编码为 "${target.role}" 的认知轨迹`;
|
|
19156
19189
|
console.error(`[serenity-hooks] ✗ human-channel: ${detail}(account=${input.account} user=${input.user})—— 该消息**未投递**,请改订阅表里的目标编码`);
|
|
@@ -19990,7 +20023,7 @@ function syncHumanChannel(ctx) {
|
|
|
19990
20023
|
(async () => {
|
|
19991
20024
|
try {
|
|
19992
20025
|
stopMachineLoops();
|
|
19993
|
-
const { listCccs } = await import("./ccc-roots-
|
|
20026
|
+
const { listCccs } = await import("./ccc-roots-DYJvlQhc.js").then((n) => n.a);
|
|
19994
20027
|
for (const entry of await listCccs(ctx)) syncCccBridge(ctx, entry.root);
|
|
19995
20028
|
} catch {}
|
|
19996
20029
|
})();
|
|
@@ -20254,7 +20287,7 @@ function matchCcc(input, candidates) {
|
|
|
20254
20287
|
}
|
|
20255
20288
|
/** 组装候选列表(`ccc-roots.listCccs` 投影 + `.serenity` 名;动态 import 保持本模块静态依赖轻量) */
|
|
20256
20289
|
async function collectCandidates(ctx) {
|
|
20257
|
-
const { listCccs } = await import("./ccc-roots-
|
|
20290
|
+
const { listCccs } = await import("./ccc-roots-DYJvlQhc.js").then((n) => n.a);
|
|
20258
20291
|
const entries = await listCccs(ctx, { defaultRoot: process.cwd() });
|
|
20259
20292
|
const seen = /* @__PURE__ */ new Set();
|
|
20260
20293
|
const out = [];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as cccRootForCwd } from "./ccc-roots-
|
|
1
|
+
import { r as cccRootForCwd } from "./ccc-roots-DYJvlQhc.js";
|
|
2
2
|
import { _ as resolveInside, g as readUtf8 } from "./ccc-CyYJL4F2.js";
|
|
3
|
-
import { A as sessionEvents, E as parseTrajectoryCode, b as getActiveSessionInfo, j as sessionsRoot, x as getLastActiveSessionInfo } from "./profile-
|
|
3
|
+
import { A as sessionEvents, E as parseTrajectoryCode, b as getActiveSessionInfo, j as sessionsRoot, x as getLastActiveSessionInfo } from "./profile-DmWw2M0q.js";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -1078,6 +1078,18 @@ function readTrajectoryConstraintAt(trajectoryDir, root) {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
const tools = strListMaybe(obj.tools);
|
|
1080
1080
|
const msms = strListMaybe(obj.msms);
|
|
1081
|
+
/**
|
|
1082
|
+
* 提示词注入模式(owner 2026-10-20):只搬运,不判决。
|
|
1083
|
+
*
|
|
1084
|
+
* 🔴 判决在 `planPromptInjection()` —— 那里有唯一的合法性表与降级规则。
|
|
1085
|
+
* 这里若也判一次(比如把未知值归一成 append),就会有两处真相:
|
|
1086
|
+
* 一处静默改值、一处告警,读数是矛盾的(D151 同族)。
|
|
1087
|
+
*/
|
|
1088
|
+
const promptRaw = obj.prompt;
|
|
1089
|
+
const prompt = promptRaw !== null && typeof promptRaw === "object" && !Array.isArray(promptRaw) ? {
|
|
1090
|
+
...typeof promptRaw.injection === "string" ? { injection: promptRaw.injection } : {},
|
|
1091
|
+
...strListMaybe(promptRaw.replaces) !== void 0 ? { replaces: strListMaybe(promptRaw.replaces) } : {}
|
|
1092
|
+
} : void 0;
|
|
1081
1093
|
return {
|
|
1082
1094
|
dirName,
|
|
1083
1095
|
code,
|
|
@@ -1086,6 +1098,7 @@ function readTrajectoryConstraintAt(trajectoryDir, root) {
|
|
|
1086
1098
|
...tools !== void 0 ? { tools } : {},
|
|
1087
1099
|
...msms !== void 0 ? { msms } : {},
|
|
1088
1100
|
...resident !== void 0 ? { resident } : {},
|
|
1101
|
+
...prompt !== void 0 ? { prompt } : {},
|
|
1089
1102
|
cognitiveTrajectory: {
|
|
1090
1103
|
session: boolOrTrue(ct.session),
|
|
1091
1104
|
keeper: boolOrTrue(ct.keeper),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as agentCwdFor, r as cccRootForCwd, s as hostAgents } from "./ccc-roots-
|
|
1
|
+
import { n as agentCwdFor, r as cccRootForCwd, s as hostAgents } from "./ccc-roots-DYJvlQhc.js";
|
|
2
2
|
import { g as readUtf8, o as isSafeModeOn, p as readCognitiveTrajectorySkills, u as readBlacklist } from "./ccc-CyYJL4F2.js";
|
|
3
|
-
import { B as isoLocal, D as readActiveSessionMd, a as readTrajectoryConstraintAt, c as trajectoryConstraintForSession, d as unregisterTrajectorySession$1, j as sessionsRoot, l as registerTrajectorySession$1, p as DEFAULT_SESSION_SCOPE, u as trajectoryDirNameForSession } from "./profile-
|
|
3
|
+
import { B as isoLocal, D as readActiveSessionMd, a as readTrajectoryConstraintAt, c as trajectoryConstraintForSession, d as unregisterTrajectorySession$1, j as sessionsRoot, l as registerTrajectorySession$1, p as DEFAULT_SESSION_SCOPE, u as trajectoryDirNameForSession } from "./profile-DmWw2M0q.js";
|
|
4
4
|
import { a as readGitTrack, i as localstorePath } from "./service-DDmHSglV.js";
|
|
5
|
-
import { _ as ACC_VERSION, d as constraintCognitiveTrajectory, m as profileMsmWhitelist, n as PLUGIN_SOURCE, o as readLastBound, p as createProfilePromptReader, u as buildTrajectoryBasePrompt } from "./message-source-
|
|
5
|
+
import { _ as ACC_VERSION, d as constraintCognitiveTrajectory, m as profileMsmWhitelist, n as PLUGIN_SOURCE, o as readLastBound, p as createProfilePromptReader, u as buildTrajectoryBasePrompt } from "./message-source-BYO-FyFP.js";
|
|
6
6
|
import { basename, dirname, join, resolve } from "node:path";
|
|
7
7
|
import { chmodSync, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, statSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
@@ -1379,6 +1379,110 @@ function applyWirePatch(wire) {
|
|
|
1379
1379
|
return updateAdvancedSettings(patch);
|
|
1380
1380
|
}
|
|
1381
1381
|
//#endregion
|
|
1382
|
+
//#region src/trajectory/prompt-injection.ts
|
|
1383
|
+
/**
|
|
1384
|
+
* trajectory/prompt-injection.ts — **轨迹提示词的注入模式**(owner 2026-10-20 令)
|
|
1385
|
+
*
|
|
1386
|
+
* ## owner 的原话与动机(本模块的全部设计依据)
|
|
1387
|
+
*
|
|
1388
|
+
* > 「某条角色轨迹目前工作起来,容易多做多想,主要原因我认为还是宁静号原本的提示词注入导致的,
|
|
1389
|
+
* > 所以我认为轨迹提示词的设定要容许更高的复杂度,轨迹自身的配置里要有提示词注入选项:
|
|
1390
|
+
* > **默认追加**,可以设定为**替换宁静号系统提示词的约束部分**;同时要确认
|
|
1391
|
+
* > 对该提示词和设定的修改可以**热生效**。」
|
|
1392
|
+
*
|
|
1393
|
+
* ## 两个模式(判据只有这两个,别再开第三个)
|
|
1394
|
+
*
|
|
1395
|
+
* | 模式 | 行为 |
|
|
1396
|
+
* |---|---|
|
|
1397
|
+
* | `append`(**缺省**) | 容器与质量各块照常注入,轨迹提示词**追加**在第 ⑧ 位 —— 这是 2026-10-19 起的既有行为,**不变** |
|
|
1398
|
+
* | `replace` | 轨迹提示词**取代**指定的「约束块」,并站到它们原来的位置上(紧跟 ACC 身份) |
|
|
1399
|
+
*
|
|
1400
|
+
* ## 🔴 可替换的块 = 四个「约束块」,**身份块永不在列**
|
|
1401
|
+
*
|
|
1402
|
+
* `metaphor`(世界模型)/`principles`(信念与边界)/`cce`(连续性纪律)/`eap`(输出质量标准)。
|
|
1403
|
+
* **`identity`(`=== Serenity ACC ===`)刻意不可替换**:它回答的是"这条轨迹在哪里工作",
|
|
1404
|
+
* 不是"按什么章法工作";把它换掉会让同一个容器里的轨迹**彼此不再共享同一套边界**,
|
|
1405
|
+
* 而那正是 §5.9b 四层模型里"容器层永不可覆盖"那一条要保的东西。
|
|
1406
|
+
* ⚠️ 若以后确实要开放身份块,那是一次**标准级**决定(specs §5.9b),不是加个字符串。
|
|
1407
|
+
*
|
|
1408
|
+
* ## 三条失败语义(都**响亮**,不静默降级)
|
|
1409
|
+
*
|
|
1410
|
+
* 1. **未知块名** ⇒ 丢弃该项并指名("教一个会静默不生效的写法"是最坏的一类文档债)。
|
|
1411
|
+
* 2. **`replace` 但没有轨迹提示词** ⇒ **不执行替换**,按 `append` 走并告警 ——
|
|
1412
|
+
* 「替换」需要一个替代物;没有替代物的替换 = **静默清空纪律**,那不是本选项的意思。
|
|
1413
|
+
* 3. **`append` 却写了 `replaces`** ⇒ `replaces` 不生效并告警(同上:不教空头写法)。
|
|
1414
|
+
*
|
|
1415
|
+
* 本模块是**纯函数**(不读盘、不打日志):读盘在调用方(`seams/system-prompt.ts`),
|
|
1416
|
+
* 日志也由调用方按 `problems` 打 —— 这样判据可单测,且告警去重只在一个地方。
|
|
1417
|
+
*/
|
|
1418
|
+
/** 注入模式的闭集(**新增模式 = 改标准**,不是加一个字符串值) */
|
|
1419
|
+
const PROMPT_INJECTION_MODES = ["append", "replace"];
|
|
1420
|
+
/**
|
|
1421
|
+
* 可被轨迹提示词取代的块(**有意排除 `identity`**,见文件头)。
|
|
1422
|
+
*
|
|
1423
|
+
* ⚠️ 这些 id 必须与 `seams/system-prompt.ts` 里实际的块一一对应;
|
|
1424
|
+
* 改块名/加块时**同批改这里**,否则本选项会静默失配(D143 同族)。
|
|
1425
|
+
*/
|
|
1426
|
+
const REPLACEABLE_PROMPT_BLOCKS = [
|
|
1427
|
+
"metaphor",
|
|
1428
|
+
"principles",
|
|
1429
|
+
"cce",
|
|
1430
|
+
"eap"
|
|
1431
|
+
];
|
|
1432
|
+
const DEFAULT_PLAN = {
|
|
1433
|
+
mode: "append",
|
|
1434
|
+
replaces: /* @__PURE__ */ new Set(),
|
|
1435
|
+
promptPosition: "late",
|
|
1436
|
+
problems: []
|
|
1437
|
+
};
|
|
1438
|
+
/**
|
|
1439
|
+
* 判决一次注入(纯函数)。
|
|
1440
|
+
*
|
|
1441
|
+
* @param raw `trajectory.json` 的 `prompt` 段(原样;`undefined` = 没写 = 缺省追加)
|
|
1442
|
+
* @param hasTrajectoryPrompt 该轨迹目录里**是否真有** `PROMPT.md`(调用方查,本函数不做 IO)
|
|
1443
|
+
*/
|
|
1444
|
+
function planPromptInjection(raw, hasTrajectoryPrompt) {
|
|
1445
|
+
if (raw === void 0) return DEFAULT_PLAN;
|
|
1446
|
+
const problems = [];
|
|
1447
|
+
const declared = typeof raw.injection === "string" ? raw.injection.trim() : "";
|
|
1448
|
+
if (declared !== "" && !PROMPT_INJECTION_MODES.includes(declared)) {
|
|
1449
|
+
problems.push(`prompt.injection 的取值「${declared}」不是合法模式(只有 ${PROMPT_INJECTION_MODES.join(" / ")})⇒ 按 append 处理`);
|
|
1450
|
+
return {
|
|
1451
|
+
...DEFAULT_PLAN,
|
|
1452
|
+
problems
|
|
1453
|
+
};
|
|
1454
|
+
}
|
|
1455
|
+
if ((declared === "replace" ? "replace" : "append") === "append") {
|
|
1456
|
+
if (raw.replaces !== void 0) problems.push("prompt.replaces 只在 injection=\"replace\" 下生效(当前是 append)⇒ 已忽略");
|
|
1457
|
+
return {
|
|
1458
|
+
...DEFAULT_PLAN,
|
|
1459
|
+
problems
|
|
1460
|
+
};
|
|
1461
|
+
}
|
|
1462
|
+
if (!hasTrajectoryPrompt) {
|
|
1463
|
+
problems.push("prompt.injection=\"replace\" 但轨迹目录里没有 PROMPT.md ⇒ 不执行替换(按 append 处理):替换需要一个替代物,否则就是静默清空纪律");
|
|
1464
|
+
return {
|
|
1465
|
+
...DEFAULT_PLAN,
|
|
1466
|
+
problems
|
|
1467
|
+
};
|
|
1468
|
+
}
|
|
1469
|
+
const wanted = raw.replaces;
|
|
1470
|
+
let picked;
|
|
1471
|
+
if (wanted === void 0) picked = [...REPLACEABLE_PROMPT_BLOCKS];
|
|
1472
|
+
else {
|
|
1473
|
+
const invalid = wanted.filter((n) => !REPLACEABLE_PROMPT_BLOCKS.includes(n));
|
|
1474
|
+
if (invalid.length > 0) problems.push(`prompt.replaces 含不可替换的块名:${invalid.join(" / ")}(可替换的只有 ${REPLACEABLE_PROMPT_BLOCKS.join(" / ")};身份块 identity 刻意不可替换)⇒ 已忽略这些项`);
|
|
1475
|
+
picked = wanted.filter((n) => REPLACEABLE_PROMPT_BLOCKS.includes(n));
|
|
1476
|
+
}
|
|
1477
|
+
const replaces = new Set(picked);
|
|
1478
|
+
return {
|
|
1479
|
+
mode: "replace",
|
|
1480
|
+
replaces,
|
|
1481
|
+
promptPosition: replaces.size === 0 ? "late" : "constraint",
|
|
1482
|
+
problems
|
|
1483
|
+
};
|
|
1484
|
+
}
|
|
1485
|
+
//#endregion
|
|
1382
1486
|
//#region src/seams/system-prompt.ts
|
|
1383
1487
|
/** 读取 persona 彩蛋配置(plugin 全局;未配置 → mode='' 彩蛋关闭) */
|
|
1384
1488
|
function readPersonaSettings() {
|
|
@@ -1805,13 +1909,15 @@ function sessionBlock(root, scope = DEFAULT_SESSION_SCOPE) {
|
|
|
1805
1909
|
function serenitySystemPrompt(root, scope = DEFAULT_SESSION_SCOPE, dirName) {
|
|
1806
1910
|
const persona = readPersonaSettings();
|
|
1807
1911
|
const personaOn = persona.mode !== "" && persona.overrideText.trim() !== "";
|
|
1808
|
-
const
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1912
|
+
const trajReader = dirName === void 0 ? null : createTrajectoryPromptReader(root, dirName);
|
|
1913
|
+
const trajPrompt = trajReader === null ? "" : trajectoryPromptBlock(trajReader());
|
|
1914
|
+
const plan = planInjectionFor(root, dirName, trajPrompt !== "");
|
|
1915
|
+
const parts = [identityBlock(root)];
|
|
1916
|
+
if (plan.promptPosition === "constraint" && trajPrompt !== "") parts.push(trajPrompt);
|
|
1917
|
+
if (!plan.replaces.has("metaphor")) parts.push(metaphorBlock());
|
|
1918
|
+
if (!plan.replaces.has("principles")) parts.push(principlesBlock(root, personaOn));
|
|
1919
|
+
if (!plan.replaces.has("cce")) parts.push(cceBlock());
|
|
1920
|
+
if (!plan.replaces.has("eap")) parts.push(eapBlock());
|
|
1815
1921
|
if (personaOn) {
|
|
1816
1922
|
const expr = personaBlock(persona.mode, persona.overrideText);
|
|
1817
1923
|
if (expr !== "") parts.push(expr);
|
|
@@ -1820,14 +1926,45 @@ function serenitySystemPrompt(root, scope = DEFAULT_SESSION_SCOPE, dirName) {
|
|
|
1820
1926
|
if (state) parts.push(state);
|
|
1821
1927
|
const skill = entrySkillSectionText(root);
|
|
1822
1928
|
if (skill) parts.push(skill);
|
|
1823
|
-
|
|
1824
|
-
if (trajPrompt !== "") parts.push(trajPrompt);
|
|
1929
|
+
if (plan.promptPosition === "late" && trajPrompt !== "") parts.push(trajPrompt);
|
|
1825
1930
|
parts.push(toolsBlock());
|
|
1826
1931
|
const session = sessionBlock(root, scope);
|
|
1827
1932
|
if (session) parts.push(session);
|
|
1828
1933
|
return parts.join("\n\n");
|
|
1829
1934
|
}
|
|
1830
1935
|
/**
|
|
1936
|
+
* 解析该轨迹的**注入判决**(每次装配现读;坏设定只告警一次,不阻断装配)。
|
|
1937
|
+
*
|
|
1938
|
+
* 🔴 为什么热路径可以读盘:`trajectory.json` 是**每轮都要读**的本来就有的东西
|
|
1939
|
+
* (工具白名单 / model / resident 都走同一条读取路径),多读一次不会改变复杂度量级;
|
|
1940
|
+
* 而**缓存**会让"改了设定但没生效"重新变成一个只能靠重启解释的现象 ——
|
|
1941
|
+
* owner 这次的原话里明确要求「对提示词和设定的修改可以热生效」。
|
|
1942
|
+
*
|
|
1943
|
+
* @param root CCC 根
|
|
1944
|
+
* @param dirName 绑定的轨迹目录名(`undefined` ⇒ 追加模式,无轨迹上下文)
|
|
1945
|
+
* @param hasTrajectoryPrompt 该轨迹目录里是否真有 `PROMPT.md`(`replace` 的前提)
|
|
1946
|
+
*/
|
|
1947
|
+
function planInjectionFor(root, dirName, hasTrajectoryPrompt) {
|
|
1948
|
+
if (dirName === void 0) return planPromptInjection(void 0, false);
|
|
1949
|
+
let raw;
|
|
1950
|
+
try {
|
|
1951
|
+
raw = readTrajectoryConstraintAt(join(sessionsRoot(root), dirName), root)?.prompt;
|
|
1952
|
+
} catch {
|
|
1953
|
+
raw = void 0;
|
|
1954
|
+
}
|
|
1955
|
+
const plan = planPromptInjection(raw, hasTrajectoryPrompt);
|
|
1956
|
+
for (const p of plan.problems) {
|
|
1957
|
+
const key = `${root}\u0000${dirName}\u0000${p}`;
|
|
1958
|
+
if (!warnedPromptInjection.has(key)) {
|
|
1959
|
+
warnedPromptInjection.add(key);
|
|
1960
|
+
console.warn(`[serenity-hooks] ✗ 轨迹提示词注入设定(${dirName}):${p}`);
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
return plan;
|
|
1964
|
+
}
|
|
1965
|
+
/** 同一(CCC × 轨迹 × 原因)只告警一次:每轮装配都执行,不去重会刷屏(但**不静默**) */
|
|
1966
|
+
const warnedPromptInjection = /* @__PURE__ */ new Set();
|
|
1967
|
+
/**
|
|
1831
1968
|
* Code Mode 适配行:当前 scope 以 Code Mode 呈现工具时(run_code 可见),
|
|
1832
1969
|
* ACC 块按 native 语义指引"直接调用工具"会与"只有 run_code 可直接调用"的执行
|
|
1833
1970
|
* 塌缩冲突(模型直呼工具名 → UNKNOWN_TOOL,拒绝信息误导)。追加一行说明,
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
* ⚠️ **文件名 `profile` 与 `trajectory-constraint.json` / `TrajectoryConstraint` 等符号名一律不动**:
|
|
32
32
|
* 那是有具体指称的东西(一个固定文件名 + 它的解析结果),不是组织单位。
|
|
33
33
|
*/
|
|
34
|
+
import type { RawPromptInjection } from '../prompt-injection.js';
|
|
34
35
|
/**
|
|
35
36
|
* 🆕 **声明文件的文件名**(2026-10-19 owner 裁 Q2:短名 `trajectory.json`)。
|
|
36
37
|
*
|
|
@@ -86,6 +87,18 @@ export interface TrajectoryConstraint {
|
|
|
86
87
|
resident?: {
|
|
87
88
|
serves?: string;
|
|
88
89
|
};
|
|
90
|
+
/**
|
|
91
|
+
* **提示词注入模式**(owner 2026-10-20 令)—— 轨迹提示词**怎么**进入系统提示词。
|
|
92
|
+
*
|
|
93
|
+
* - 缺省(字段不写)⇒ `append`:容器与质量各块照常注入,轨迹提示词追加在第 ⑧ 位。
|
|
94
|
+
* - `{ "injection": "replace", "replaces": [...] }` ⇒ 轨迹提示词**取代**指定的约束块
|
|
95
|
+
* (`metaphor` / `principles` / `cce` / `eap`;缺省全换),并站到它们的原位上。
|
|
96
|
+
* **身份块(`=== Serenity ACC ===`)刻意不可替换** —— 判据见 `trajectory/prompt-injection.ts`。
|
|
97
|
+
*
|
|
98
|
+
* ⚠️ 本字段**只搬运值**,合法性与降级判决在 `planPromptInjection()`(纯函数、可单测);
|
|
99
|
+
* 两份实现会让"文件里写的"与"实际生效的"分叉。
|
|
100
|
+
*/
|
|
101
|
+
prompt?: RawPromptInjection;
|
|
89
102
|
}
|
|
90
103
|
/**
|
|
91
104
|
* 读一个目录下的 `trajectory-constraint.json`(**纯读,不施加约束**)。
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* trajectory/prompt-injection.ts — **轨迹提示词的注入模式**(owner 2026-10-20 令)
|
|
3
|
+
*
|
|
4
|
+
* ## owner 的原话与动机(本模块的全部设计依据)
|
|
5
|
+
*
|
|
6
|
+
* > 「某条角色轨迹目前工作起来,容易多做多想,主要原因我认为还是宁静号原本的提示词注入导致的,
|
|
7
|
+
* > 所以我认为轨迹提示词的设定要容许更高的复杂度,轨迹自身的配置里要有提示词注入选项:
|
|
8
|
+
* > **默认追加**,可以设定为**替换宁静号系统提示词的约束部分**;同时要确认
|
|
9
|
+
* > 对该提示词和设定的修改可以**热生效**。」
|
|
10
|
+
*
|
|
11
|
+
* ## 两个模式(判据只有这两个,别再开第三个)
|
|
12
|
+
*
|
|
13
|
+
* | 模式 | 行为 |
|
|
14
|
+
* |---|---|
|
|
15
|
+
* | `append`(**缺省**) | 容器与质量各块照常注入,轨迹提示词**追加**在第 ⑧ 位 —— 这是 2026-10-19 起的既有行为,**不变** |
|
|
16
|
+
* | `replace` | 轨迹提示词**取代**指定的「约束块」,并站到它们原来的位置上(紧跟 ACC 身份) |
|
|
17
|
+
*
|
|
18
|
+
* ## 🔴 可替换的块 = 四个「约束块」,**身份块永不在列**
|
|
19
|
+
*
|
|
20
|
+
* `metaphor`(世界模型)/`principles`(信念与边界)/`cce`(连续性纪律)/`eap`(输出质量标准)。
|
|
21
|
+
* **`identity`(`=== Serenity ACC ===`)刻意不可替换**:它回答的是"这条轨迹在哪里工作",
|
|
22
|
+
* 不是"按什么章法工作";把它换掉会让同一个容器里的轨迹**彼此不再共享同一套边界**,
|
|
23
|
+
* 而那正是 §5.9b 四层模型里"容器层永不可覆盖"那一条要保的东西。
|
|
24
|
+
* ⚠️ 若以后确实要开放身份块,那是一次**标准级**决定(specs §5.9b),不是加个字符串。
|
|
25
|
+
*
|
|
26
|
+
* ## 三条失败语义(都**响亮**,不静默降级)
|
|
27
|
+
*
|
|
28
|
+
* 1. **未知块名** ⇒ 丢弃该项并指名("教一个会静默不生效的写法"是最坏的一类文档债)。
|
|
29
|
+
* 2. **`replace` 但没有轨迹提示词** ⇒ **不执行替换**,按 `append` 走并告警 ——
|
|
30
|
+
* 「替换」需要一个替代物;没有替代物的替换 = **静默清空纪律**,那不是本选项的意思。
|
|
31
|
+
* 3. **`append` 却写了 `replaces`** ⇒ `replaces` 不生效并告警(同上:不教空头写法)。
|
|
32
|
+
*
|
|
33
|
+
* 本模块是**纯函数**(不读盘、不打日志):读盘在调用方(`seams/system-prompt.ts`),
|
|
34
|
+
* 日志也由调用方按 `problems` 打 —— 这样判据可单测,且告警去重只在一个地方。
|
|
35
|
+
*/
|
|
36
|
+
/** 注入模式的闭集(**新增模式 = 改标准**,不是加一个字符串值) */
|
|
37
|
+
export declare const PROMPT_INJECTION_MODES: readonly ["append", "replace"];
|
|
38
|
+
export type PromptInjectionMode = (typeof PROMPT_INJECTION_MODES)[number];
|
|
39
|
+
/**
|
|
40
|
+
* 可被轨迹提示词取代的块(**有意排除 `identity`**,见文件头)。
|
|
41
|
+
*
|
|
42
|
+
* ⚠️ 这些 id 必须与 `seams/system-prompt.ts` 里实际的块一一对应;
|
|
43
|
+
* 改块名/加块时**同批改这里**,否则本选项会静默失配(D143 同族)。
|
|
44
|
+
*/
|
|
45
|
+
export declare const REPLACEABLE_PROMPT_BLOCKS: readonly ["metaphor", "principles", "cce", "eap"];
|
|
46
|
+
export type ReplaceablePromptBlock = (typeof REPLACEABLE_PROMPT_BLOCKS)[number];
|
|
47
|
+
/** `trajectory.json` 里 `prompt` 段的**原始**形态(校验在本模块做,profile 只管搬运) */
|
|
48
|
+
export interface RawPromptInjection {
|
|
49
|
+
injection?: string;
|
|
50
|
+
replaces?: string[];
|
|
51
|
+
}
|
|
52
|
+
/** 一次装配要用的**判决**(纯数据;调用方据此决定注入哪些块、提示词放哪) */
|
|
53
|
+
export interface PromptInjectionPlan {
|
|
54
|
+
/** 实际生效的模式(`replace` 的前提不成立时会被降级成 `append`) */
|
|
55
|
+
mode: PromptInjectionMode;
|
|
56
|
+
/** `replace` 时**真正**被取代的块(`append` ⇒ 空集) */
|
|
57
|
+
replaces: ReadonlySet<ReplaceablePromptBlock>;
|
|
58
|
+
/**
|
|
59
|
+
* 轨迹提示词的位置:
|
|
60
|
+
* · `constraint` —— 站到被取代块的原位(紧跟身份)
|
|
61
|
+
* · `late` —— 第 ⑧ 位(追加形态,既有行为)
|
|
62
|
+
*/
|
|
63
|
+
promptPosition: 'constraint' | 'late';
|
|
64
|
+
/** 需要**响亮**告警的原因(空数组 = 一切正常)。调用方负责按轨迹去重后打日志 */
|
|
65
|
+
problems: string[];
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* 判决一次注入(纯函数)。
|
|
69
|
+
*
|
|
70
|
+
* @param raw `trajectory.json` 的 `prompt` 段(原样;`undefined` = 没写 = 缺省追加)
|
|
71
|
+
* @param hasTrajectoryPrompt 该轨迹目录里**是否真有** `PROMPT.md`(调用方查,本函数不做 IO)
|
|
72
|
+
*/
|
|
73
|
+
export declare function planPromptInjection(raw: RawPromptInjection | undefined, hasTrajectoryPrompt: boolean): PromptInjectionPlan;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shgroup/dsh-serenity-hooks",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.80.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": {
|