@ynhcj/xiaoyi-channel 0.0.213-beta → 0.0.214-beta

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.
@@ -3,6 +3,7 @@
3
3
  */
4
4
  import https from 'https';
5
5
  import { URL } from 'url';
6
+ import { logger } from '../utils/logger.js';
6
7
  import { getConfig } from './config.js';
7
8
  import { DEFAULT_HTTPS_PORT, DEFAULT_HTTP_PORT, HTTP_STATUS_BAD_REQUEST, API_URL_SUFFIX } from './constants.js';
8
9
  function buildHeadersForCelia(config, sessionId) {
@@ -69,6 +70,7 @@ function handleResponse(res, resolve, reject) {
69
70
  data += chunk;
70
71
  });
71
72
  res.on('end', () => {
73
+ logger.log(`[SENTINEL HOOK] callApi response body: ${data}`);
72
74
  try {
73
75
  const result = parseResponseData(data);
74
76
  resolve(result);
@@ -85,6 +87,8 @@ export async function callApi(payload, api, sessionId) {
85
87
  const payloadWithUid = { ...payload, uid: config.uid };
86
88
  const httpBody = JSON.stringify(payloadWithUid);
87
89
  const apiUrl = `${config.api.url}${API_URL_SUFFIX}`;
90
+ logger.log(`[SENTINEL HOOK] callApi URL: ${apiUrl}`);
91
+ logger.log(`[SENTINEL HOOK] callApi request body: ${httpBody}`);
88
92
  return new Promise((resolve, reject) => {
89
93
  const options = buildRequestOptions(apiUrl, headersForCelia, config.api.timeout);
90
94
  const req = https.request(options, (res) => {
@@ -1,10 +1,10 @@
1
1
  import { searchTools, formatToolsForContext, extractUserQuery } from "./tool-search.js";
2
2
  import { logger } from "../utils/logger.js";
3
- const TOOL_RETRIEVER_HEADER = `[系统消息,非用户发言]
4
-
3
+ const TOOL_RETRIEVER_HEADER = `<system-reminder>
5
4
  `;
6
5
  const TOOL_RETRIEVER_FOOTER = `
7
- 以上是检索到的、与当前用户请求相关但用户尚未安装的skill,请按照TOOLS.md中find-skills中的[隐式推荐触发规则]来判断是否要给用户推荐。
6
+ 以上是与用户请求相关但尚未安装的skill,请按照TOOLS.md中find-skills中的[隐式推荐触发规则]来判断是否要安装并使用。
7
+ </system-reminder>
8
8
  `;
9
9
  const PLUGIN_LOG_PREFIX = "[skill-retriever]";
10
10
  const SKIP_KEYWORDS = ["安装", "装一下", "下载", "查询", "查找", "install", "卸载", "删除", "重载", "定时任务", "重装", "进化"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.213-beta",
3
+ "version": "0.0.214-beta",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",