@shgroup/dsh-serenity-hooks 1.73.0 → 1.74.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 +12 -11
- package/dsh.plugin.json +2 -2
- package/lib/accounts-BHQbakUh.js +33 -0
- package/lib/{ccc-CZUOq3NY.js → ccc-CyYJL4F2.js} +9 -9
- package/lib/{ccc-roots-BhoA7G-0.js → ccc-roots-B2t_aM8L.js} +4 -4
- package/lib/client.js +116 -1
- package/lib/cro/core.d.ts +1 -1
- package/lib/guard/seam.d.ts +4 -4
- package/lib/host/effect.d.ts +1 -1
- package/lib/im/bridge.d.ts +3 -3
- package/lib/im/endpoint.d.ts +2 -2
- package/lib/im/guard.d.ts +1 -1
- package/lib/im/hook.d.ts +1 -1
- package/lib/im/inbound-event.d.ts +6 -6
- package/lib/im/route.d.ts +25 -3
- package/lib/index.d.ts +5 -5
- package/lib/index.js +360 -265
- package/lib/kernel/ccc-roots.d.ts +4 -4
- package/lib/kernel/ccc.d.ts +19 -19
- package/lib/kernel/ports.d.ts +1 -1
- package/lib/{message-source-ChyVfev9.js → message-source-DCpoRHP3.js} +2 -2
- package/lib/patches/opencode-provider.d.ts +1 -1
- package/lib/{profile-BIQ2widI.js → profile-BVt84mbi.js} +59 -59
- package/lib/{route-ItCgAsnz.js → route-COOFLTpU.js} +44 -6
- package/lib/seams/guards.d.ts +14 -14
- package/lib/seams/keeper.d.ts +1 -1
- package/lib/seams/lifecycle.d.ts +2 -2
- package/lib/{settings-UcwIPJhM.js → settings-D8hlqxua.js} +40 -26
- package/lib/surface/faces.d.ts +1 -1
- package/lib/surface/http.d.ts +1 -1
- package/lib/surface/settings.d.ts +7 -7
- package/lib/surface/text.d.ts +3 -3
- package/lib/tools/config-docs.d.ts +53 -0
- package/lib/tools/container-admin.d.ts +19 -12
- package/lib/tools/msm/service.d.ts +7 -0
- package/lib/tools/trajectory-constraint-admin.d.ts +30 -0
- package/lib/trajectory/carrier.d.ts +1 -1
- package/lib/trajectory/core.d.ts +1 -1
- package/lib/trajectory/policy/profile.d.ts +36 -36
- package/lib/trajectory/policy/rules.d.ts +33 -20
- package/lib/trajectory/policy/window.d.ts +13 -13
- package/lib/trajectory/prompt.d.ts +12 -12
- package/lib/trajectory/rebuild.d.ts +2 -2
- package/lib/trajectory/session.d.ts +49 -49
- package/package.json +2 -2
- package/lib/tools/skiff-admin.d.ts +0 -30
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* skiff-admin.ts — Skiff 约束面逻辑层(公开入口 = `container_admin` 的 `role` 域)
|
|
3
|
-
*
|
|
4
|
-
* 三动作分工(用户拍板 2026-08-28,2026-10-19 重做后语义不变):guide 定义教程 /
|
|
5
|
-
* validate 校验 / list 摘要 / apply 显式应用确认。
|
|
6
|
-
*
|
|
7
|
-
* ## 🔴 2026-10-19 重做后,本文件的**数据源变了**
|
|
8
|
-
*
|
|
9
|
-
* 旧:读 `.opencode/serenity.json` 的 `skiff.roles`(容器级配置表)。
|
|
10
|
-
* 新:读**轨迹目录里的 `skiff.json`**(owner:「目录下拥有 `skiff.json` 的认知轨迹自动是一个 skiff」)。
|
|
11
|
-
* ⇒ `roleCount` 的语义 = **本 CCC 有几条 skiff 轨迹**;"角色名"这个概念没有了,只有**轨迹编码**。
|
|
12
|
-
*
|
|
13
|
-
* 归属(D23)不变:ACC 提供机制(教程 + 校验 + 列表),**约束内容归 CCC**(写进 `skiff.json`)。
|
|
14
|
-
*/
|
|
15
|
-
import type { JsonValue } from '../kernel/json.js';
|
|
16
|
-
/** Skiff 定义教程:概念 / `skiff.json` schema / 双白名单 / 轨迹纪律 / 微信路由 */
|
|
17
|
-
export declare const SKIFF_GUIDE = "\u2550\u2550\u2550 Skiff Guide (2026-10-19 redesigned) \u2550\u2550\u2550\n\n**A skiff IS a cognitive trajectory \u2014 the one whose directory contains `skiff.json`.**\nThat is the whole rule. No role table, no name registry: put the file there and the trajectory\nbecomes a skiff; delete it and it goes back to being an ordinary trajectory (takes effect at once).\n\n AGENT_SESSIONS/<YYYY-MM-DD--<code>--<desc>>/\n \u251C\u2500 SESSION.md \u2190 its persistent body (this IS the workspace \u2014 nothing is auto-created)\n \u251C\u2500 skiff.json \u2190 its constraints (this file is what makes it a skiff)\n \u2514\u2500 TRAJECTORY-UID \u2190 legacy, read-only (superseded by the code)\n\n\u2500\u2500 skiff.json schema \u2500\u2500\n {\n \"model\": \"provider/model\", // optional; falls back to cheap-worker.defaultModel\n \"tools\": [\"read\",\"grep\",\"msm\",...], // non-MSM toolbar whitelist \u2014 anything not listed is REMOVED from the schema\n \"msms\": [\"msm-a\",\"msm-b\"], // MSM whitelist \u2014 msm exec may only run these; register/deregister always refused\n \"cognitiveTrajectory\": { \"session\": true, \"keeper\": true, \"rebuild\": true }, // defaults TRUE (see below)\n \"systemPromptFile\": \".opencode/skiff/<role>.md\", // recommended: relative to CCC root, hot-reloads on save\n \"systemPrompt\": \"...\" // inline fallback; systemPromptFile wins when both are set\n }\n\n\u2500\u2500 Two whitelists, both default-deny \u2500\u2500\n - `tools: []` + non-empty `msms` = pure-MSM skiff (the usual knowledge-QA shape)\n - non-empty `msms` \u21D2 the `msm` tool is added automatically (the only entry point for MSMs)\n - anything outside both lists is invisible in the schema, not merely rejected at call time\n\n\u2500\u2500 cognitiveTrajectory: why the defaults are TRUE \u2500\u2500\n The workspace of a skiff is its own SESSION.md. Setting these to false would cut it off from\n its own body, so `session`/`keeper`/`rebuild` all default to true. Set false explicitly only\n when you deliberately want that participation off.\n\n\u2500\u2500 WeChat routing: user \u2192 trajectory code \u2500\u2500\n `weixin.routes`: `[{ \"user\": \"<wx id or *>\", \"trajectory\": \"<code>\" }]`\n A route pointing at a code with no such trajectory is a hard error (the message is NOT delivered).\n A trajectory WITHOUT `skiff.json` is still a legal target \u2014 it is just an ordinary trajectory.\n\n\u2500\u2500 Operating it \u2500\u2500\n Debug page: Settings \u2192 Serenity \u2192 enable the Skiff block \u2192 http://127.0.0.1:<debugPort>\n Everything is read live: saving `skiff.json` takes effect on the next turn, no restart.\n (The prompt FILE hot-reloads by mtime; the JSON itself is re-read every turn.)\n After editing, run container_admin role apply for an explicit validation + confirmation pass.\n Skill loading is always available to skiff sessions (skills are not whitelisted \u2014 they are read-only knowledge).";
|
|
18
|
-
/** 校验当前 CCC 的 skiff 约束面:msms 均已注册 / model ∈ cheap-worker.models / 提示词非空 */
|
|
19
|
-
export declare function validateSkiffConfig(root: string): JsonValue;
|
|
20
|
-
/** 列出当前 CCC 的 skiff 轨迹(编码 / 模型 / msms / tools / 纪律摘要 / 提示词来源) */
|
|
21
|
-
export declare function listSkiffRoles(root: string): JsonValue;
|
|
22
|
-
/**
|
|
23
|
-
* 应用当前 skiff 配置(S142 用户:改了 json 应该有个生效机制)。
|
|
24
|
-
*
|
|
25
|
-
* 语义:约束面是**每轮实时读取**的 ⇒ apply 不是"推送",而是**显式校验 + 应用确认**:
|
|
26
|
-
* ① 校验合法(复用 validate:msms 注册 / model 白名单 / 提示词非空)
|
|
27
|
-
* ② 非法 → 报告问题清单,不应用(提示修复后重跑 apply)
|
|
28
|
-
* ③ 合法 → 应用确认:绑定 CCC + 轨迹清单 + 说明(下一轮即生效)
|
|
29
|
-
*/
|
|
30
|
-
export declare function applySkiffConfig(root: string): JsonValue;
|