adp-openclaw 0.0.37 → 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.37",
3
+ "version": "0.0.38",
4
4
  "description": "ADP-OpenClaw demo channel plugin (Go WebSocket backend)",
5
5
  "type": "module",
6
6
  "dependencies": {
@@ -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