@ynhcj/xiaoyi-channel 0.0.36-next → 0.0.37-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.
@@ -5,7 +5,6 @@ import type { XYChannelConfig } from "./types.js";
5
5
  */
6
6
  export declare class XYPushService {
7
7
  private config;
8
- private readonly DEFAULT_PUSH_URL;
9
8
  private readonly REQUEST_FROM;
10
9
  constructor(config: XYChannelConfig);
11
10
  /**
package/dist/src/push.js CHANGED
@@ -7,7 +7,6 @@ import { randomUUID } from "crypto";
7
7
  */
8
8
  export class XYPushService {
9
9
  config;
10
- DEFAULT_PUSH_URL = "https://hag.cloud.huawei.com/open-ability-agent/v1/agent-webhook";
11
10
  REQUEST_FROM = "openclaw";
12
11
  constructor(config) {
13
12
  this.config = config;
@@ -29,7 +28,7 @@ export class XYPushService {
29
28
  * @param pushId - Push ID to use (required)
30
29
  */
31
30
  async sendPush(content, title, data, sessionId, pushDataId, pushId) {
32
- const pushUrl = this.config.pushUrl || this.DEFAULT_PUSH_URL;
31
+ const pushUrl = `${this.config.fileUploadUrl}/open-ability-agent/v1/agent-webhook`;
33
32
  const traceId = this.generateTraceId();
34
33
  // Use provided pushId or fall back to config pushId
35
34
  const actualPushId = pushId || this.config.pushId;
@@ -87,8 +87,8 @@ async function processImageInput(imageInput, uploadService) {
87
87
  /**
88
88
  * Call image understanding API with streaming response
89
89
  */
90
- async function callImageUnderstandingAPI(imageUrl, text, apiKey, uid) {
91
- const apiUrl = "https://hag-drcn.op.dbankcloud.com/celia-claw/v1/sse-api/skill/execute";
90
+ async function callImageUnderstandingAPI(imageUrl, text, apiKey, uid, fileUploadUrl) {
91
+ const apiUrl = `${fileUploadUrl}/celia-claw/v1/sse-api/skill/execute`;
92
92
  const traceId = uuidv4();
93
93
  const headers = {
94
94
  "Content-Type": "application/json",
@@ -276,7 +276,7 @@ d. 返回图像理解的文本描述内容`,
276
276
  downloadedFile = processedImage.localPath;
277
277
  }
278
278
  // Call image understanding API
279
- const caption = await callImageUnderstandingAPI(processedImage.imageUrl, prompt, config.apiKey, config.uid);
279
+ const caption = await callImageUnderstandingAPI(processedImage.imageUrl, prompt, config.apiKey, config.uid, config.fileUploadUrl);
280
280
  // Clean up downloaded file if any
281
281
  if (downloadedFile) {
282
282
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ynhcj/xiaoyi-channel",
3
- "version": "0.0.36-next",
3
+ "version": "0.0.37-next",
4
4
  "description": "OpenClaw Xiaoyi Channel plugin - Xiaoyi A2A protocol integration",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",