adp-openclaw 0.0.36 → 0.0.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adp-openclaw",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "description": "ADP-OpenClaw demo channel plugin (Go WebSocket backend)",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -59,7 +59,7 @@ interface FileMetadata {
59
59
  // ==================== 常量配置 ====================
60
60
 
61
61
  /** 获取临时密钥的接口地址 */
62
- const CREDENTIAL_API_URL = "https://wss.lke.cloud.tencent.com/test/openclaw/v1/gateway/storage/get_credential";
62
+ const CREDENTIAL_API_URL = "http://101.32.33.231:9876/describeRemoteBotStorageCredential";
63
63
 
64
64
  /** 请求超时时间 (毫秒) */
65
65
  const REQUEST_TIMEOUT_MS = 30000;
@@ -168,6 +168,9 @@ export async function getStorageCredential(
168
168
  file_type: fileType || "",
169
169
  };
170
170
 
171
+ console.log(`[ADP-UPLOAD] Calling credential API: ${CREDENTIAL_API_URL}`);
172
+ console.log(`[ADP-UPLOAD] Request body: token=${token.substring(0, 10)}..., file_type=${fileType || ""}`);
173
+
171
174
  const response = await fetchWithTimeout(
172
175
  CREDENTIAL_API_URL,
173
176
  {
@@ -179,15 +182,21 @@ export async function getStorageCredential(
179
182
  }
180
183
  );
181
184
 
185
+ console.log(`[ADP-UPLOAD] Response status: ${response.status} ${response.statusText}`);
186
+
182
187
  if (!response.ok) {
183
188
  const errorText = await response.text().catch(() => response.statusText);
189
+ console.error(`[ADP-UPLOAD] Error response: ${errorText}`);
184
190
  throw new Error(`获取存储凭证失败: ${response.status} ${errorText}`);
185
191
  }
186
192
 
187
193
  const result = await response.json();
188
194
 
195
+ console.log(`[ADP-UPLOAD] Response received: bucket=${result.bucket}, region=${result.region}, has_upload_url=${!!result.upload_url}, has_file_url=${!!result.file_url}`);
196
+
189
197
  // 检查响应数据的完整性 - 现在主要检查 upload_url 和 file_url
190
198
  if (!result.upload_url || !result.file_url) {
199
+ console.error(`[ADP-UPLOAD] Missing required fields in response:`, JSON.stringify(result).substring(0, 500));
191
200
  throw new Error("获取存储凭证失败: 缺少upload_url或file_url信息");
192
201
  }
193
202
 
package/src/monitor.ts CHANGED
@@ -23,7 +23,7 @@ import {
23
23
  import crypto from "crypto";
24
24
 
25
25
  // Plugin version from package.json
26
- const PLUGIN_VERSION = "0.0.25";
26
+ const PLUGIN_VERSION = "0.0.37";
27
27
 
28
28
  // WebSocket reconnect delay (fixed at 1 second)
29
29
  const RECONNECT_DELAY_MS = 1000;