@shgroup/dsh-serenity-hooks 1.56.8 → 1.56.9

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 CHANGED
@@ -131,8 +131,9 @@ dsh plugin --profile web add link:$(pwd)/hooks/dsh-serenity-hooks
131
131
 
132
132
  - **只管"会话族"的头**:`x-opencode-session` / `X-Session-ID` / `x-opencode-client` / `x-opencode-project`。
133
133
  前两个名字是**同一个值的两个别名**——写了其中一个,即以**该值**补上另一个,不会出现两个互相冲突的会话 id
134
- - **不冒充 opencode 官方客户端**:`X-Title` / `HTTP-Referer` 这类"身份头"只在免费档的滥用判别里起作用,
135
- 插件不注入(代使用者骗取额度不是本插件该做的事,付费面本来也不需要它们);`User-Agent` 是 DSH 的保留名,想注也注不了
134
+ - **注入范围以接口要求为界**:`/zen/go` 缺会话族头即返回 400,故补齐;
135
+ `X-Title` / `HTTP-Referer` 属客户端身份头,不在接口要求之内,故不注入。
136
+ `User-Agent` 是 DSH 的保留名,想注也注不了
136
137
  - **会话标识是固定的**(`dsh-serenity`):DSH 的请求头在路由解析时一次算好,只能给静态值。
137
138
  优势是同一台机器的请求稳定落同一个上游(对缓存友好);代价是无法做到"按会话分区"
138
139
  - **写入的是使用者自己的文件**:写入 DSH 的 settings(`llm-pi-ai.providers.<路由>.headers`),随时可改可删。
package/dsh.plugin.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "id": "dsh-serenity-hooks",
3
- "version": "1.56.8",
3
+ "version": "1.56.9",
4
4
  "main": "lib/index.js",
5
5
  "description": "宁静号 ACC harness(Native Cordis 插件):给 DSH 装一个「AI 工作区」——14 个工具(container_fs/container_trajectory/dashboard/container_git/msm/praxis/ontology/serenity-skill-creator/handyman/localstore/container_admin;另三个 im-bridge/acc-diag/diagram 按配置条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫)+ 轨迹日志与原地重建 + 网页登录入口/微信桥/子角色/对外问答页/trajectory 唤醒注册表。适配 DSH 0.1.7-rc.1 与 0.2.0-rc.1(双档,deepseek-ai/deepseek-harness)。",
6
6
  "engines": {
@@ -45,8 +45,10 @@
45
45
  * - 注入:`x-opencode-session` / `X-Session-ID`(同一个稳定的本机安装标识)、
46
46
  * `x-opencode-client: dsh`、`x-opencode-project: global`
47
47
  * (证据:Trae 的 Go 面代理注入的正是这一族,且该项目 README 明列 "dsh 亲测有效")
48
- * - **不注入** `X-Title: opencode` / `HTTP-Referer: https://opencode.ai/` —— 那是**冒充 OpenCode 客户端**,
49
- * 只在免费档的**滥用判别**中起作用(hermes #106495 实证)。冒充他人客户端去绕限额不是本插件该做的事。
48
+ * - **不注入** `X-Title: opencode` / `HTTP-Referer: https://opencode.ai/` —— 它们是**客户端身份头**,
49
+ * 不在 `/zen/go` 的接口要求之内(该端点只校验会话族,见本文件开头:缺 `x-opencode-session` 才 400)。
50
+ * 注入范围**以接口要求为界**:要求什么补什么,不要求的一律不补。
51
+ * 身份头的作用面是**免费档的滥用判别**(hermes #106495 实证),付费路径本就不需要它们。
50
52
  * - **不注入** `User-Agent` —— 它是 `@deepseek-ai/dsh-llm` 的 attribution 保留名
51
53
  * (`APP_IDENTITY` 无配置缝),宿主层面就不可覆盖。
52
54
  * - **不注入** `x-opencode-request` —— 它的语义是"会话内递增"(`msg_1`/`msg_2`…),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shgroup/dsh-serenity-hooks",
3
- "version": "1.56.8",
3
+ "version": "1.56.9",
4
4
  "description": "宁静号 ACC harness(Native Cordis 插件)——给 DeepSeek Harness 装一个「AI 工作区」:14 个工具(container_fs/container_trajectory/dashboard/container_git/msm/praxis/ontology/serenity-skill-creator/handyman/localstore/container_admin;另三个 im-bridge/acc-diag/diagram 按配置条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫/对外输出守卫)+ 工作日志与原地重建 + 网页登录入口/微信桥/子角色/对外问答页/trajectory 唤醒注册表。适配 DSH 0.1.7-rc.1 与 0.2.0-rc.1(双档)。",
5
5
  "license": "MIT",
6
6
  "repository": {