adp-openclaw 0.0.37 → 0.0.39
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 +1 -1
- package/src/adp-upload-tool.ts +10 -1
- package/src/monitor.ts +1 -1
package/package.json
CHANGED
package/src/adp-upload-tool.ts
CHANGED
|
@@ -59,7 +59,7 @@ interface FileMetadata {
|
|
|
59
59
|
// ==================== 常量配置 ====================
|
|
60
60
|
|
|
61
61
|
/** 获取临时密钥的接口地址 */
|
|
62
|
-
const CREDENTIAL_API_URL = "
|
|
62
|
+
const CREDENTIAL_API_URL = "https://wss.lke.cloud.tencent.com/test/openclaw/v1/gateway/storage/get_credential";
|
|
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