@shgroup/dsh-serenity-hooks 1.47.0 → 1.47.1

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.47.0",
3
+ "version": "1.47.1",
4
4
  "main": "lib/index.js",
5
5
  "description": "宁静号 ACC harness(Native Cordis 插件):给 DSH 装一个「AI 工作区」——11 个工具(container_fs/container_trajectory/dashboard/container_git/msm/praxis/handyman/localstore/container_admin/im-bridge/acc-diag;后两个按配置条件出现)+ 机械约束(安全模式/工作区围墙/密钥守卫)+ 轨迹日志与原地重建 + 网页登录入口/微信桥/子角色/对外问答页/trajectory 唤醒注册表。适配 DSH 0.1.5-rc.2(deepseek-ai/deepseek-harness)。",
6
6
  "engines": {
@@ -94,7 +94,7 @@ export declare function declaresImage(input: unknown): boolean;
94
94
  */
95
95
  export declare function desiredInput(input: unknown): string[];
96
96
  interface DeepseekVisionPatchInput {
97
- /** `llm-pi-ai` 命名空间**解析后**的值(`settings.get` 结果;undefined = 命名空间未注册) */
97
+ /** `llm-pi-ai` 命名空间**解析后**的值(0.1.7 读面 `settings.describe()` 里按 `ns` 挑出的 `value`;undefined = 命名空间未注册) */
98
98
  resolved: unknown;
99
99
  /** 开关(CCC 配置 `visionPatch.enabled`);undefined ⇒ 按默认 true */
100
100
  enabled?: boolean;
package/lib/index.js CHANGED
@@ -8338,21 +8338,14 @@ const HOST_SERVICES = [
8338
8338
  id: "settings",
8339
8339
  name: "settings",
8340
8340
  access: "injected",
8341
- members: [
8342
- {
8343
- name: "installSection",
8344
- kind: "function"
8345
- },
8346
- {
8347
- name: "get",
8348
- kind: "function"
8349
- },
8350
- {
8351
- name: "update",
8352
- kind: "function"
8353
- }
8354
- ],
8355
- impact: "设置面板不安装 → 所有开关静默 no-op;opencode 路由自动配置失效",
8341
+ members: [{
8342
+ name: "describe",
8343
+ kind: "function"
8344
+ }, {
8345
+ name: "update",
8346
+ kind: "function"
8347
+ }],
8348
+ impact: "设置面板不装配 → 所有开关静默 no-op;opencode 路由自动配置与多模态补丁失效",
8356
8349
  required: true
8357
8350
  },
8358
8351
  {
@@ -14875,7 +14868,7 @@ function describeOpencodeAction(action) {
14875
14868
  */
14876
14869
  async function applyOpencodeAutoConfigOnce(ctx, env) {
14877
14870
  const settings = hostSettings(ctx);
14878
- if (settings?.get === void 0 || settings.update === void 0) {
14871
+ if (settings?.describe === void 0 || settings.update === void 0) {
14879
14872
  console.warn("[serenity-hooks] opencode 路由自动配置跳过:settings 服务不可用(未能读取/写入 llm-pi-ai 命名空间)");
14880
14873
  return {
14881
14874
  wrote: false,
@@ -14884,7 +14877,7 @@ async function applyOpencodeAutoConfigOnce(ctx, env) {
14884
14877
  }
14885
14878
  let resolved;
14886
14879
  try {
14887
- resolved = settings.get.call(settings, LLM_PI_AI_NAMESPACE);
14880
+ resolved = (settings.describe.call(settings) ?? []).find((f) => f.ns === LLM_PI_AI_NAMESPACE)?.value;
14888
14881
  } catch (error) {
14889
14882
  console.warn(`[serenity-hooks] opencode 路由自动配置跳过:读取 ${LLM_PI_AI_NAMESPACE} 失败: ${String(error?.message ?? error)}`);
14890
14883
  return {
@@ -15121,7 +15114,7 @@ function planDeepseekVisionPatch(input) {
15121
15114
  */
15122
15115
  async function applyDeepseekVisionPatchOnce(ctx, enabled) {
15123
15116
  const settings = hostSettings(ctx);
15124
- if (settings?.get === void 0 || settings.update === void 0) {
15117
+ if (settings?.describe === void 0 || settings.update === void 0) {
15125
15118
  console.warn("[serenity-hooks] DeepSeek 多模态补丁跳过:settings 服务不可用(未能读写 llm-pi-ai 命名空间)");
15126
15119
  return {
15127
15120
  wrote: false,
@@ -15130,7 +15123,7 @@ async function applyDeepseekVisionPatchOnce(ctx, enabled) {
15130
15123
  }
15131
15124
  let resolved;
15132
15125
  try {
15133
- resolved = settings.get.call(settings, LLM_PI_AI_NAMESPACE);
15126
+ resolved = (settings.describe.call(settings) ?? []).find((f) => f.ns === LLM_PI_AI_NAMESPACE)?.value;
15134
15127
  } catch (error) {
15135
15128
  console.warn(`[serenity-hooks] DeepSeek 多模态补丁跳过:读取 ${LLM_PI_AI_NAMESPACE} 失败: ${String(error?.message ?? error)}`);
15136
15129
  return {
@@ -69,7 +69,7 @@ export declare const OPENCODE_API_KEY_ENV = "OPENCODE_API_KEY";
69
69
  */
70
70
  export declare function opencodeRouteHeaders(): Record<string, string>;
71
71
  interface OpencodeAutoConfigInput {
72
- /** `llm-pi-ai` 命名空间**解析后**的值(`settings.get` 结果;undefined = 命名空间未注册) */
72
+ /** `llm-pi-ai` 命名空间**解析后**的值(0.1.7 读面 `settings.describe()` 里按 `ns` 挑出的 `value`;undefined = 命名空间未注册) */
73
73
  resolved: unknown;
74
74
  /** 进程环境(注入以便测试) */
75
75
  env: Readonly<Record<string, string | undefined>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shgroup/dsh-serenity-hooks",
3
- "version": "1.47.0",
3
+ "version": "1.47.1",
4
4
  "description": "宁静号 ACC harness(Native Cordis 插件)——给 DeepSeek Harness 装一个「AI 工作区」:11 个工具(container_fs/container_trajectory/dashboard/container_git/msm/praxis/handyman/localstore/container_admin/im-bridge/acc-diag)+ 机械约束(安全模式/工作区围墙/密钥守卫/对外输出守卫)+ 工作日志与原地重建 + 网页登录入口/微信桥/子角色/对外问答页/trajectory 唤醒注册表。适配 DSH 0.1.7-rc.1。",
5
5
  "license": "MIT",
6
6
  "repository": {