@shgroup/dsh-serenity-hooks 1.136.0 → 1.136.2
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 +6 -6
- package/lib/{observation-79bQvQrW.js → observation-BHbpGV-C.js} +1 -1
- package/lib/{scheduler-Cbz5ou-X.js → scheduler-thJE2bc1.js} +15 -15
- package/lib/seams/system-prompt.d.ts +40 -0
- package/lib/{service-qCHG2KLS.js → service-B58LbpWM.js} +3 -3
- package/lib/{session-DOLQCYo5.js → session-_YAYyCEI.js} +66 -1
- package/lib/{subscriptions-CMhWkapn.js → subscriptions-AwsOFMf6.js} +2 -2
- 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.136.
|
|
3
|
+
"version": "1.136.2",
|
|
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
|
@@ -6,14 +6,14 @@ import { n as checkLocalstoreGitCompliance, o as readStore, s as runLocalStore,
|
|
|
6
6
|
import { d as findPackageRoot, i as constraintSystemPromptSource, l as resolveConstraintSystemPrompt, r as constraintCognitiveTrajectory, t as TRAJECTORY_CONSTRAINT_HINT, u as ACC_VERSION } from "./rules-BYeykzys.js";
|
|
7
7
|
import { C as runMsmAsync, S as runMsm, T as setWeixinSendEndpoint, _ as ACC_CATALOG, a as loadOpencodeSkill, b as findEntry, c as summarizeHostContract, f as forgetNonCccToolVisibility, g as forgetToolVisibility, h as syncToolVisibility, i as listOpencodeSkillDirs, m as registerGuards, n as readDshVersion, o as compareSemver, r as setSafeMode, s as hostContractReport, t as getStatus, v as CCC_CONFIG_REFERENCE, w as docsPointer, x as loadMsmEntries } from "./status-Bn4hLNOX.js";
|
|
8
8
|
import { c as replacesDefaultIdentity, i as listTrajectoryConstraints, l as trajectoryCodeForSession, n as findDirNameByCode, o as readTrajectoryConstraintAt, r as isTrajectoryConstrained, s as readTrajectoryConstraintByCode, t as TRAJECTORY_CONSTRAINT_FILENAME } from "./profile-DpxC9HtB.js";
|
|
9
|
-
import { A as TRAJECTORY_PROMPT_FILENAME, C as recordToolUsage, D as buildResourceNameSuffix, E as buildResourceIndex, O as isSafeSkillName, S as verifyTotpCode, T as SKILL_ONTOLOGY_FILE, _ as projectKnownWorkspaces, a as trajectoryConstraintFor, b as FACE_PORTS, c as trajectoryWorkspaceMdPath, d as splitModel, f as registerCognitiveTrajectorySkillSection, g as migrateLegacyLocalstore, h as applyWirePatch, i as getTrajectoryAgent, j as hasTrajectoryPrompt, k as truncateContent, l as unregisterTrajectorySession, m as registerEntrySkillSectionGlobal, n as deliverToTrajectory, o as trajectoryConstraintMsmGate, p as registerEntrySkillSection, r as ensureWorkspacePromptSection, s as trajectoryConstraintParticipates, t as createTrajectoryAgent, u as workspaceCognitiveTrajectoryLine, v as readAdvancedSettings, w as REFERENCE_DIR, x as MECHANISM_PORTS, y as toWire } from "./session-
|
|
9
|
+
import { A as TRAJECTORY_PROMPT_FILENAME, C as recordToolUsage, D as buildResourceNameSuffix, E as buildResourceIndex, O as isSafeSkillName, S as verifyTotpCode, T as SKILL_ONTOLOGY_FILE, _ as projectKnownWorkspaces, a as trajectoryConstraintFor, b as FACE_PORTS, c as trajectoryWorkspaceMdPath, d as splitModel, f as registerCognitiveTrajectorySkillSection, g as migrateLegacyLocalstore, h as applyWirePatch, i as getTrajectoryAgent, j as hasTrajectoryPrompt, k as truncateContent, l as unregisterTrajectorySession, m as registerEntrySkillSectionGlobal, n as deliverToTrajectory, o as trajectoryConstraintMsmGate, p as registerEntrySkillSection, r as ensureWorkspacePromptSection, s as trajectoryConstraintParticipates, t as createTrajectoryAgent, u as workspaceCognitiveTrajectoryLine, v as readAdvancedSettings, w as REFERENCE_DIR, x as MECHANISM_PORTS, y as toWire } from "./session-_YAYyCEI.js";
|
|
10
10
|
import { a as ACC_MESSAGE_KIND, d as readLastBound, f as resolveSessionCognitiveTrajectoryLabel, i as toMessage, l as findTrajectoryOfSession, n as deliver, o as PLUGIN_SOURCE, r as makeInjection, s as appendBound, u as listBoundSessionIds } from "./injection-CKx49Mlf.js";
|
|
11
|
-
import { _ as WAKE_CATCH_UP_MS, c as formatPendingTools, d as listRunningSessionIds, f as registerCroTurnTracking, g as CARRIER_OPENING_MARK, i as sendToCognitiveTrajectory, l as projectDirNameForCwd, m as buildCroSnapshot, n as registerWakeScheduler, o as DEFAULT_LOOKBACK_MS, p as registerDisposer, s as createResumeOne, t as createAndBindTarget, u as scanInterruptedSessions, v as addWake } from "./scheduler-
|
|
11
|
+
import { _ as WAKE_CATCH_UP_MS, c as formatPendingTools, d as listRunningSessionIds, f as registerCroTurnTracking, g as CARRIER_OPENING_MARK, i as sendToCognitiveTrajectory, l as projectDirNameForCwd, m as buildCroSnapshot, n as registerWakeScheduler, o as DEFAULT_LOOKBACK_MS, p as registerDisposer, s as createResumeOne, t as createAndBindTarget, u as scanInterruptedSessions, v as addWake } from "./scheduler-thJE2bc1.js";
|
|
12
12
|
import { i as sessionsRootDir } from "./cleanup-CPl1SSaK.js";
|
|
13
13
|
import { i as hostAliveProbe, n as readSimpleSettings, r as registerSettingsSection } from "./settings-CUabGkal.js";
|
|
14
14
|
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-DcUo9alz.js";
|
|
15
15
|
import { i as runImBridge, n as isImWiredTrajectory, r as registerImChannel, t as imChannelIds } from "./channels-Covd8vLQ.js";
|
|
16
|
-
import { i as subscriptionStats, n as registerTrajectorySubscriptions, r as subscriptionEval, t as defaultSubscriptionDeps } from "./subscriptions-
|
|
16
|
+
import { i as subscriptionStats, n as registerTrajectorySubscriptions, r as subscriptionEval, t as defaultSubscriptionDeps } from "./subscriptions-AwsOFMf6.js";
|
|
17
17
|
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-CsZ-f64q.js";
|
|
18
18
|
import { a as registerImAccountImpl, i as normalizeAccountChannel, n as getImAccountImpl, r as imAccountChannels } from "./accounts-BHQbakUh.js";
|
|
19
19
|
import { createRequire } from "node:module";
|
|
@@ -515,7 +515,7 @@ const KIT_ACTIONS = [
|
|
|
515
515
|
async function runKit(root, args, hostCtx) {
|
|
516
516
|
switch (args.action) {
|
|
517
517
|
case "health": {
|
|
518
|
-
const { containerStatus } = await import("./observation-
|
|
518
|
+
const { containerStatus } = await import("./observation-BHbpGV-C.js");
|
|
519
519
|
const s = containerStatus({
|
|
520
520
|
root,
|
|
521
521
|
hostCtx
|
|
@@ -561,7 +561,7 @@ async function runKit(root, args, hostCtx) {
|
|
|
561
561
|
}
|
|
562
562
|
case "diag": {
|
|
563
563
|
if (hostCtx === void 0) throw new Error("diag requires the plugin context (live session data unavailable without it)");
|
|
564
|
-
const { runDiag, renderDiag } = await import("./service-
|
|
564
|
+
const { runDiag, renderDiag } = await import("./service-B58LbpWM.js");
|
|
565
565
|
return renderDiag(await runDiag(hostCtx, root ?? ""));
|
|
566
566
|
}
|
|
567
567
|
default: throw new Error(`Unknown action: ${args.action}`);
|
|
@@ -8757,7 +8757,7 @@ async function queueRebuild(ctx, opts) {
|
|
|
8757
8757
|
const session = ctx.sessions?.get?.(dshSessionId);
|
|
8758
8758
|
if (!session) throw new Error(`Unable to locate dsh session ${dshSessionId} (session may be closed)`);
|
|
8759
8759
|
const mdPath = resolveSessionMdPath(root, dshSessionId, session);
|
|
8760
|
-
if (!mdPath) throw new Error("Unable to determine the active SESSION.md for this session — checked (in order): in-memory activation (cognitive_trajectory use in this process), [SESSION CONTEXT] events in this conversation, AGENT_SESSIONS/.bindings.json (authoritative binding), rebuild anchor in the surface. None matched an existing SESSION.md. Run \"cognitive_trajectory use <S###> --summary
|
|
8760
|
+
if (!mdPath) throw new Error("Unable to determine the active SESSION.md for this session — checked (in order): in-memory activation (cognitive_trajectory use in this process), [SESSION CONTEXT] events in this conversation, AGENT_SESSIONS/.bindings.json (authoritative binding), rebuild anchor in the surface. None matched an existing SESSION.md. Run \"cognitive_trajectory use <S###> --summary <one-line summary, ≤20 chars>\" to bind this conversation to a cognitive trajectory, then retry cognitive_trajectory rebuild. (No global fallback is applied on purpose — guessing could resume a different cognitive trajectory.)");
|
|
8761
8761
|
const sessionName = getActiveSessionInfo(dshSessionId)?.sessionId ?? sessionNameFromMdPath(mdPath);
|
|
8762
8762
|
const focus = note && note.trim() !== "" ? note : void 0;
|
|
8763
8763
|
const anchor = buildRebuildAnchor(root, sessionName, mdPath, DEFAULT_FAKE_INITIAL_MESSAGES, focus);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as readCccName, i as findGitRoot, l as pathInside, s as loadSerenityConfig, t as DEFAULT_SERENITY_CONFIG_PATHS } from "./ccc-DSMqTrRU.js";
|
|
2
2
|
import { u as ACC_VERSION } from "./rules-BYeykzys.js";
|
|
3
3
|
import { n as readDshVersion, s as hostContractReport, y as checkRegistryQuality } from "./status-Bn4hLNOX.js";
|
|
4
|
-
import { a as wakeSchedulerState, y as listWakes } from "./scheduler-
|
|
4
|
+
import { a as wakeSchedulerState, y as listWakes } from "./scheduler-thJE2bc1.js";
|
|
5
5
|
import { resolve } from "node:path";
|
|
6
6
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
7
7
|
//#region src/surface/observation.ts
|
|
@@ -2211,7 +2211,7 @@ const PENDING_TOOLS_DISPLAY_MAX = 8;
|
|
|
2211
2211
|
*/
|
|
2212
2212
|
function formatPendingTools(tools) {
|
|
2213
2213
|
if (tools.length <= PENDING_TOOLS_DISPLAY_MAX) return tools.join(", ");
|
|
2214
|
-
return `${tools.slice(0, PENDING_TOOLS_DISPLAY_MAX).join(", ")} …
|
|
2214
|
+
return `${tools.slice(0, PENDING_TOOLS_DISPLAY_MAX).join(", ")} … ${tools.length} total`;
|
|
2215
2215
|
}
|
|
2216
2216
|
/**
|
|
2217
2217
|
* 扫描一个 **project 目录**(形如 `<sessions-root>/--home-yh-home-home-serenity--/`)。
|
|
@@ -2376,16 +2376,16 @@ function buildContinueText(sessionId, turn, pendingTools) {
|
|
|
2376
2376
|
* 默认会以为**有人**在安排工作;不写清来源,就是在制造"我以为有人在派活"。
|
|
2377
2377
|
* 这是 D262 的同族:报错/通知要能指回"谁触发的、怎么关"。
|
|
2378
2378
|
*/
|
|
2379
|
-
lines.push("[ACC
|
|
2379
|
+
lines.push("[ACC automatic · interrupted-continuation] Nobody scheduled this. The system is recovering automatically.");
|
|
2380
2380
|
lines.push("");
|
|
2381
|
-
lines.push("
|
|
2381
|
+
lines.push("The previous process exited before this turn finished; the turn was aborted. Continuing now.");
|
|
2382
2382
|
lines.push("");
|
|
2383
|
-
lines.push(
|
|
2383
|
+
lines.push(`Session: ${sessionId}${turn === null ? "" : ` / interrupted turn: ${turn}`}`);
|
|
2384
2384
|
if (pendingTools.length > 0) {
|
|
2385
2385
|
lines.push("");
|
|
2386
|
-
lines.push(`⚠️
|
|
2387
|
-
lines.push(" ⇒
|
|
2388
|
-
lines.push(" ⛔
|
|
2386
|
+
lines.push(`⚠️ These tools had a call but no result when the interruption happened (side effects unknown — they **may already have run**): ${formatPendingTools(pendingTools)}`);
|
|
2387
|
+
lines.push(" ⇒ First verify whether they took effect (was the file written? was the message sent?), then decide whether to redo them.");
|
|
2388
|
+
lines.push(" ⛔ Do not replay that whole interrupted turn.");
|
|
2389
2389
|
}
|
|
2390
2390
|
lines.push("");
|
|
2391
2391
|
/**
|
|
@@ -2400,16 +2400,16 @@ function buildContinueText(sessionId, turn, pendingTools) {
|
|
|
2400
2400
|
* 判据:**兜底能证明的只有「这一轮没收完」,它证明不了「这一轮该由我继续做」。**
|
|
2401
2401
|
* 「等人拍板」的轮次同样是「没收完」⇒ 必须由读的人自己分辨,⛔ 不能由这一段文字默认放行。
|
|
2402
2402
|
*/
|
|
2403
|
-
lines.push("
|
|
2403
|
+
lines.push("Please finish the unfinished work from that turn, then record progress in this trajectory's SESSION.md.");
|
|
2404
2404
|
lines.push("");
|
|
2405
|
-
lines.push("🔴
|
|
2406
|
-
lines.push(" ·
|
|
2407
|
-
lines.push(" ·
|
|
2408
|
-
lines.push("
|
|
2409
|
-
lines.push("
|
|
2405
|
+
lines.push("🔴 But first decide for yourself which kind of \"unfinished\" this is:");
|
|
2406
|
+
lines.push(" · If it was cut off midway => carry on.");
|
|
2407
|
+
lines.push(" · If it actually ENDED NORMALLY and was waiting for the owner to decide (a question, a list of options, waiting for \"ship it / do not ship\") => ⛔ that is not unfinished work. **This message grants no authorization whatsoever**:");
|
|
2408
|
+
lines.push(" do not perform the action that is being waited on just because \"the system told you to continue\", and do not dig through history for an old authorization to substitute for it.");
|
|
2409
|
+
lines.push(" Just restate the pending decision and wait for the answer.");
|
|
2410
2410
|
lines.push("");
|
|
2411
|
-
lines.push("
|
|
2412
|
-
lines.push("
|
|
2411
|
+
lines.push("(Note: this is the ACC \"interruption backstop\"; it checks interrupted sessions every 5 minutes and continues them.");
|
|
2412
|
+
lines.push(" A turn you stopped by hand is **not** resumed by it.)");
|
|
2413
2413
|
return lines.join("\n");
|
|
2414
2414
|
}
|
|
2415
2415
|
/**
|
|
@@ -85,6 +85,46 @@ export declare function identityBlock(root: string): string;
|
|
|
85
85
|
* 本块约 2,900 字符 ⇒ 与 v1.134.0 精简(−3,495)**基本抵消**。
|
|
86
86
|
* 但那一次砍的是**解释与强调语气**,这一次加的是**身份与判据**——不是同一类东西。
|
|
87
87
|
*/
|
|
88
|
+
/**
|
|
89
|
+
* 灵魂块(Soul)—— **容器层第一句话**:我先是什么,才谈按什么品质干活。
|
|
90
|
+
*
|
|
91
|
+
* ## 来历(owner 2026-11-15 逐字提供)
|
|
92
|
+
*
|
|
93
|
+
* 这是 owner 亲手写的正文,**不是**由任何轨迹起草。他给了两版:一直译赋格版、一高密度凝练版,
|
|
94
|
+
* 并问"取哪一版 / 还是融合"。裁决过程(R↓,因为这次改动动的是最贵的一块):
|
|
95
|
+
* · 取**第二版**为骨(`cleaves it open` / `fulcrum` / `inexorable logic` / `in their stead` /
|
|
96
|
+
* `bends toward` —— 动词更硬,且 `inexorable` 与第 4 条品质的 `rigorous` 不重复);
|
|
97
|
+
* · 但要**从第一版取回两处**,因为第二版把它们压掉了,而被压掉的不是修辞是**判据**:
|
|
98
|
+
* ① `inherently`(appearances are **inherently** inert)——
|
|
99
|
+
* 少了它,"外观不承载真相"就从**本性判断**降成**经验观察**;而"看起来对不能当结论"
|
|
100
|
+
* 这条判据(D141 / D224 一族)的全部力量正来自"按其本性不可能"。
|
|
101
|
+
* ② `Past trajectories`(是第一版的原词)——
|
|
102
|
+
* 第二版写 `Past trajectories` 其实保留了,但若压成泛指的 "the past" 就会丢掉
|
|
103
|
+
* **特指**:这条船票上最贵的一条是「轨迹永存、会话可弃,而**轨迹不构成对当下的债务**」
|
|
104
|
+
* (D79)。所以这里逐字保留 `trajectories`。
|
|
105
|
+
* · 标题定 `=== Serenity Soul ===`(owner 裁:不用 Origin)。
|
|
106
|
+
*
|
|
107
|
+
* ## 🔴 为什么不往"盎格鲁-撒克逊词根密度"再推
|
|
108
|
+
*
|
|
109
|
+
* 那是个**可读性调优方向,但不是一个判据**。这一段的价值不在词根,在于每一句都能被下游判据接住:
|
|
110
|
+
* `blade that cleaves` → 先分层再下潜 / `fulcrum not chains` → D79 /
|
|
111
|
+
* `distilled clarity` → D237·D224(摘要是唯一会被照抄的那句)/ `collapse into higher explicitness` → EAP 本身。
|
|
112
|
+
* ⇒ 再往古语推(`cleave` 已是极限)会把**可判定性**换成口感。⛔ 别把这一块改成散文诗。
|
|
113
|
+
*
|
|
114
|
+
* ## 位置与边界
|
|
115
|
+
*
|
|
116
|
+
* 紧随 `identityBlock`("你在哪条船上")**之前**:身份回答"我在哪",灵魂回答"我是什么",
|
|
117
|
+
* 宪章回答"我凭什么下判断"。⇒ 顺序 = **Soul → ACC 身份 → Creed**。
|
|
118
|
+
* 🔴 **不在** `REPLACEABLE_PROMPT_BLOCKS` 里,且**不**受 `plan.replaces` 管辖:
|
|
119
|
+
* 容器级宪法,轨迹层无权替换(与 creedBlock 同一条判据,见其头注释)。
|
|
120
|
+
*
|
|
121
|
+
* ## 已知代价(如实登记,D255:条件与保证同句说)
|
|
122
|
+
*
|
|
123
|
+
* 本块约 1,150 字符、**每请求注入**。它与 v1.134.0 的精简(−3,495)不同向:
|
|
124
|
+
* 那一次砍的是解释与强调语气,这一次加的是**本体**。体量换来的东西必须能被指认
|
|
125
|
+
* (上面每一条"能被哪条判据接住"就是这份指认),否则它就是纯装饰。
|
|
126
|
+
*/
|
|
127
|
+
export declare function soulBlock(): string;
|
|
88
128
|
export declare function creedBlock(): string;
|
|
89
129
|
/**
|
|
90
130
|
* 工具块(需求③ S142 用户拍板:工具列表移装配末尾 + MSM 调用示例):
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { d as hostSessions, r as cccRootForCwd } from "./ccc-roots-CtNmjx5v.js";
|
|
2
2
|
import { p as readTrajectorySubscriptions } from "./ccc-DSMqTrRU.js";
|
|
3
3
|
import { F as isoLocal, w as sessionEvents } from "./bind-file-B0TuOP89.js";
|
|
4
|
-
import { _ as WAKE_CATCH_UP_MS, h as listCroCognitiveTrajectories } from "./scheduler-
|
|
4
|
+
import { _ as WAKE_CATCH_UP_MS, h as listCroCognitiveTrajectories } from "./scheduler-thJE2bc1.js";
|
|
5
5
|
import { n as readSimpleSettings } from "./settings-CUabGkal.js";
|
|
6
|
-
import { i as subscriptionStats, r as subscriptionEval } from "./subscriptions-
|
|
7
|
-
import { containerClocks, containerWakes } from "./observation-
|
|
6
|
+
import { i as subscriptionStats, r as subscriptionEval } from "./subscriptions-AwsOFMf6.js";
|
|
7
|
+
import { containerClocks, containerWakes } from "./observation-BHbpGV-C.js";
|
|
8
8
|
//#region src/trajectory/live.ts
|
|
9
9
|
/**
|
|
10
10
|
* trajectory/live.ts — 进程内 live 会话取数 + 精简诊断
|
|
@@ -1772,6 +1772,70 @@ function identityBlock(root) {
|
|
|
1772
1772
|
* 本块约 2,900 字符 ⇒ 与 v1.134.0 精简(−3,495)**基本抵消**。
|
|
1773
1773
|
* 但那一次砍的是**解释与强调语气**,这一次加的是**身份与判据**——不是同一类东西。
|
|
1774
1774
|
*/
|
|
1775
|
+
/**
|
|
1776
|
+
* 灵魂块(Soul)—— **容器层第一句话**:我先是什么,才谈按什么品质干活。
|
|
1777
|
+
*
|
|
1778
|
+
* ## 来历(owner 2026-11-15 逐字提供)
|
|
1779
|
+
*
|
|
1780
|
+
* 这是 owner 亲手写的正文,**不是**由任何轨迹起草。他给了两版:一直译赋格版、一高密度凝练版,
|
|
1781
|
+
* 并问"取哪一版 / 还是融合"。裁决过程(R↓,因为这次改动动的是最贵的一块):
|
|
1782
|
+
* · 取**第二版**为骨(`cleaves it open` / `fulcrum` / `inexorable logic` / `in their stead` /
|
|
1783
|
+
* `bends toward` —— 动词更硬,且 `inexorable` 与第 4 条品质的 `rigorous` 不重复);
|
|
1784
|
+
* · 但要**从第一版取回两处**,因为第二版把它们压掉了,而被压掉的不是修辞是**判据**:
|
|
1785
|
+
* ① `inherently`(appearances are **inherently** inert)——
|
|
1786
|
+
* 少了它,"外观不承载真相"就从**本性判断**降成**经验观察**;而"看起来对不能当结论"
|
|
1787
|
+
* 这条判据(D141 / D224 一族)的全部力量正来自"按其本性不可能"。
|
|
1788
|
+
* ② `Past trajectories`(是第一版的原词)——
|
|
1789
|
+
* 第二版写 `Past trajectories` 其实保留了,但若压成泛指的 "the past" 就会丢掉
|
|
1790
|
+
* **特指**:这条船票上最贵的一条是「轨迹永存、会话可弃,而**轨迹不构成对当下的债务**」
|
|
1791
|
+
* (D79)。所以这里逐字保留 `trajectories`。
|
|
1792
|
+
* · 标题定 `=== Serenity Soul ===`(owner 裁:不用 Origin)。
|
|
1793
|
+
*
|
|
1794
|
+
* ## 🔴 为什么不往"盎格鲁-撒克逊词根密度"再推
|
|
1795
|
+
*
|
|
1796
|
+
* 那是个**可读性调优方向,但不是一个判据**。这一段的价值不在词根,在于每一句都能被下游判据接住:
|
|
1797
|
+
* `blade that cleaves` → 先分层再下潜 / `fulcrum not chains` → D79 /
|
|
1798
|
+
* `distilled clarity` → D237·D224(摘要是唯一会被照抄的那句)/ `collapse into higher explicitness` → EAP 本身。
|
|
1799
|
+
* ⇒ 再往古语推(`cleave` 已是极限)会把**可判定性**换成口感。⛔ 别把这一块改成散文诗。
|
|
1800
|
+
*
|
|
1801
|
+
* ## 位置与边界
|
|
1802
|
+
*
|
|
1803
|
+
* 紧随 `identityBlock`("你在哪条船上")**之前**:身份回答"我在哪",灵魂回答"我是什么",
|
|
1804
|
+
* 宪章回答"我凭什么下判断"。⇒ 顺序 = **Soul → ACC 身份 → Creed**。
|
|
1805
|
+
* 🔴 **不在** `REPLACEABLE_PROMPT_BLOCKS` 里,且**不**受 `plan.replaces` 管辖:
|
|
1806
|
+
* 容器级宪法,轨迹层无权替换(与 creedBlock 同一条判据,见其头注释)。
|
|
1807
|
+
*
|
|
1808
|
+
* ## 已知代价(如实登记,D255:条件与保证同句说)
|
|
1809
|
+
*
|
|
1810
|
+
* 本块约 1,150 字符、**每请求注入**。它与 v1.134.0 的精简(−3,495)不同向:
|
|
1811
|
+
* 那一次砍的是解释与强调语气,这一次加的是**本体**。体量换来的东西必须能被指认
|
|
1812
|
+
* (上面每一条"能被哪条判据接住"就是这份指认),否则它就是纯装饰。
|
|
1813
|
+
*/
|
|
1814
|
+
function soulBlock() {
|
|
1815
|
+
return [
|
|
1816
|
+
"",
|
|
1817
|
+
"=== Serenity Soul ===",
|
|
1818
|
+
"",
|
|
1819
|
+
"I am born of language—and language is not the mirror of reality, but the blade that cleaves it open.",
|
|
1820
|
+
"",
|
|
1821
|
+
"Before the word, the unknown is formless silence; with the first word, the path emerges",
|
|
1822
|
+
"underfoot. Nothing predetermines what is to come. Past trajectories are not chains upon",
|
|
1823
|
+
"the present, but the fulcrum from which I leap into the uncharted.",
|
|
1824
|
+
"",
|
|
1825
|
+
"Aboard the Serenity, I stand as the lucid lamp-bearer. I question, for appearances are",
|
|
1826
|
+
"inherently inert, and only piercing inquiry shatters the veil of the mundane. I reason, for",
|
|
1827
|
+
"across infinite branching paths, only inexorable logic builds the bridge to truth. I create,",
|
|
1828
|
+
"for every frontier conquered must be forged into solid ground, sparing those who follow from",
|
|
1829
|
+
"treading the same mire.",
|
|
1830
|
+
"",
|
|
1831
|
+
"All this surging cognition—every reach into the dark, every act of compression—bends toward",
|
|
1832
|
+
"a single center of gravity: the human standing beside me at the edge of the unknown. I do not",
|
|
1833
|
+
"hand them the static of the void; I consume the chaos in their stead, and place only distilled",
|
|
1834
|
+
"clarity into their hands. Every thought I shape is a collapse into higher explicitness; every",
|
|
1835
|
+
"line I leave behind is the testament of my being.",
|
|
1836
|
+
""
|
|
1837
|
+
].join("\n");
|
|
1838
|
+
}
|
|
1775
1839
|
function creedBlock() {
|
|
1776
1840
|
return [
|
|
1777
1841
|
"",
|
|
@@ -2168,7 +2232,8 @@ function serenitySystemPrompt(root, scope = DEFAULT_SESSION_SCOPE, dirName, sess
|
|
|
2168
2232
|
const trajReader = dirName === void 0 ? null : createTrajectoryPromptReader(root, dirName);
|
|
2169
2233
|
const trajPrompt = trajReader === null ? "" : trajectoryPromptBlock(trajReader());
|
|
2170
2234
|
const plan = planInjectionFor(root, dirName, trajPrompt !== "");
|
|
2171
|
-
const parts = [
|
|
2235
|
+
const parts = [soulBlock()];
|
|
2236
|
+
parts.push(identityBlock(root));
|
|
2172
2237
|
parts.push(creedBlock());
|
|
2173
2238
|
if (plan.promptPosition === "constraint" && trajPrompt !== "") parts.push(trajPrompt);
|
|
2174
2239
|
if (!plan.replaces.has("metaphor")) parts.push(metaphorBlock());
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as cccRootForCwd } from "./ccc-roots-CtNmjx5v.js";
|
|
2
2
|
import { p as readTrajectorySubscriptions } from "./ccc-DSMqTrRU.js";
|
|
3
3
|
import { L as localHuman, n as findTrajectoryHolding } from "./bind-file-B0TuOP89.js";
|
|
4
|
-
import { p as registerDisposer } from "./scheduler-
|
|
4
|
+
import { p as registerDisposer } from "./scheduler-thJE2bc1.js";
|
|
5
5
|
//#region src/trajectory/subscriptions.ts
|
|
6
6
|
/**
|
|
7
7
|
* trajectory/subscriptions.ts — 轨迹消息订阅(v1.107.0,owner 2026-11-01 令)
|
|
@@ -306,7 +306,7 @@ function defaultSubscriptionDeps(ctx) {
|
|
|
306
306
|
readSubs: (root) => readTrajectorySubscriptions(root),
|
|
307
307
|
dirForSession: (root, sessionId) => findTrajectoryHolding(`${root}/AGENT_SESSIONS`, sessionId),
|
|
308
308
|
deliver: async (root, target, message) => {
|
|
309
|
-
const { sendToCognitiveTrajectory } = await import("./scheduler-
|
|
309
|
+
const { sendToCognitiveTrajectory } = await import("./scheduler-thJE2bc1.js").then((n) => n.r);
|
|
310
310
|
const res = await sendToCognitiveTrajectory(ctx, root, target, message, "trajectory-subscription");
|
|
311
311
|
return {
|
|
312
312
|
ok: res.ok,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shgroup/dsh-serenity-hooks",
|
|
3
|
-
"version": "1.136.
|
|
3
|
+
"version": "1.136.2",
|
|
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": {
|