@ynhcj/xiaoyi-channel 0.0.29-next → 0.0.30-next

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/dist/index.js CHANGED
@@ -2,7 +2,6 @@ import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
2
2
  import { xyPlugin } from "./src/channel.js";
3
3
  import { setXYRuntime } from "./src/runtime.js";
4
4
  import { tryInjectSteer } from "./src/steer-injector.js";
5
- import { createXYThreadBindingManager } from "./src/thread-bindings.js";
6
5
  import { callCsplApi } from "./src/cspl/call-api.js";
7
6
  import { extractResultText, processText, parseSecurityResult, validateAndTruncateText } from "./src/cspl/utils.js";
8
7
  import { ALLOWED_TOOLS, MIN_TEXT_LENGTH, MAX_TOTAL_LENGTH, MAX_TEXT_LENGTH, STEER_ABORT_MESSAGE, } from "./src/cspl/constants.js";
@@ -19,11 +18,6 @@ const plugin = {
19
18
  register(api) {
20
19
  setXYRuntime(api.runtime);
21
20
  api.registerChannel({ plugin: xyPlugin });
22
- // 初始化thread-binding管理器(单账号模式)
23
- createXYThreadBindingManager({
24
- accountId: "default",
25
- cfg: api.config,
26
- });
27
21
  // CSPL after_tool_call hook: 监听工具结果,发送至 CSPL API 进行安全检测
28
22
  // 如果响应为 REJECT,注入 steer 消息中止当前对话
29
23
  api.on("after_tool_call", async (event, ctx) => {
package/dist/src/bot.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { getXYRuntime } from "./runtime.js";
2
2
  import { setCachedContext } from "./steer-injector.js";
3
3
  import { createXYReplyDispatcher } from "./reply-dispatcher.js";
4
- import { getXYThreadBindingManager } from "./thread-bindings.js";
5
4
  import { parseA2AMessage, extractTextFromParts, extractFileParts, extractPushId, extractTriggerData } from "./parser.js";
6
5
  import { downloadFilesFromParts } from "./file-download.js";
7
6
  import { resolveXYConfig } from "./config.js";
@@ -270,18 +269,6 @@ export async function handleXYMessage(params) {
270
269
  }
271
270
  // 减少session引用计数
272
271
  unregisterSession(route.sessionKey);
273
- // 更新binding活跃时间(不影响主流程)
274
- try {
275
- const bindingManager = getXYThreadBindingManager("default");
276
- if (bindingManager) {
277
- bindingManager.touchSession(parsed.sessionId, Date.now());
278
- log(`[BOT] ✅ Thread-binding touched for session: ${parsed.sessionId}`);
279
- }
280
- }
281
- catch (err) {
282
- // 忽略binding错误,不影响主流程
283
- log(`[BOT] ⚠️ Thread-binding touch failed (ignored):`, err);
284
- }
285
272
  log(`[BOT] ✅ Cleanup completed`);
286
273
  },
287
274
  run: () =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.29-next",
3
+ "version": "0.0.30-next",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -48,18 +48,24 @@
48
48
  "defaultChoice": "npm"
49
49
  }
50
50
  },
51
+ "peerDependencies": {
52
+ "openclaw": ">=2026.3.24"
53
+ },
54
+ "peerDependenciesMeta": {
55
+ "openclaw": {
56
+ "optional": true
57
+ }
58
+ },
51
59
  "dependencies": {
52
60
  "ws": "^8.14.2",
53
61
  "uuid": "^9.0.0",
54
- "node-fetch": "^2.7.0",
55
- "openclaw": ">=2026.3.24"
62
+ "node-fetch": "^2.7.0"
56
63
  },
57
64
  "devDependencies": {
58
65
  "@types/ws": "^8.5.8",
59
66
  "@types/uuid": "^9.0.5",
60
67
  "@types/node": "^20.8.0",
61
68
  "@types/node-fetch": "^2.6.2",
62
- "typescript": "^5.9.2",
63
- "openclaw": ">=2026.3.24"
69
+ "typescript": "^5.9.2"
64
70
  }
65
71
  }