@shgroup/dsh-serenity-hooks 1.20.2 → 1.20.3

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.20.2",
3
+ "version": "1.20.3",
4
4
  "main": "lib/index.js",
5
5
  "description": "宁静号 ACC harness(Native Cordis 插件):真实 DSH 工具 cc_fs/session/acc_msm/eap/neat/cce/loop + 拦截缝机械约束(safe-mode/路径守卫)。适配 DSH 公开版(0.1.0-rc,deepseek-ai/deepseek-harness)。私有(dsh-external 组织)。",
6
6
  "engines": {
package/lib/client.js CHANGED
@@ -368,11 +368,15 @@ window.__ModuleLoader__.load({
368
368
  if (conversation?.draftImages === void 0) return [];
369
369
  return (conversation.draftImages(ids) ?? []).map((a) => a.file);
370
370
  }
371
- /** 纯文本重发(绕过图片门禁——不含 image part,模型永不触发 MODEL_DOES_NOT_SUPPORT_IMAGES) */
371
+ /**
372
+ * 纯文本重发(绕过图片门禁——不含 image part,模型永不触发 MODEL_DOES_NOT_SUPPORT_IMAGES)。
373
+ * ⚠️ 必须作为方法调用(session.prompt(...)):解构取出再调会丢失 this
374
+ * (prompt 内部读 this.promptError → "Cannot set properties of undefined (setting 'promptError')")。
375
+ */
372
376
  async function resendText(ctx, sessionId, text) {
373
- const prompt = ctx.sessions.binding(sessionId)?.session?.prompt;
374
- if (prompt === void 0) throw new Error("serenity image fallback: session unavailable");
375
- const result = await prompt([{
377
+ const session = ctx.sessions.binding(sessionId)?.session;
378
+ if (session?.prompt === void 0) throw new Error("serenity image fallback: session unavailable");
379
+ const result = await session.prompt([{
376
380
  type: "text",
377
381
  text
378
382
  }], "queue");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shgroup/dsh-serenity-hooks",
3
- "version": "1.20.2",
3
+ "version": "1.20.3",
4
4
  "description": "宁静号 ACC harness — Native Cordis 插件(DeepSeek Harness 运行时)。真实 DSH 工具注册(cc_fs/session/acc_msm 等 9 工具)+ 拦截缝机械约束(safe-mode/路径守卫/会话落盘)+ 系统提示词注入(ACC/CCE/Constraints/SKILL/Session 五块)。适配 DSH 公开版(deepseek-ai/deepseek-harness 0.1.0-rc)。",
5
5
  "license": "MIT",
6
6
  "repository": {