adp-openclaw 0.0.45 → 0.0.46

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.
Files changed (2) hide show
  1. package/index.ts +11 -2
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -179,16 +179,23 @@ const plugin = {
179
179
 
180
180
  api.logger.debug?.(`[${ADP_UPLOAD_TOOL_NAME}] upload success toolCallId=${toolCallId} count=${successResult.files?.length ?? 0} paths=${JSON.stringify(parsed.value.paths)}`);
181
181
 
182
+ // Debug: print full downloadUrl for each file
183
+ for (const file of (successResult.files || [])) {
184
+ api.logger.info?.(`[${ADP_UPLOAD_TOOL_NAME}] file.downloadUrl: ${file.downloadUrl}`);
185
+ api.logger.info?.(`[${ADP_UPLOAD_TOOL_NAME}] file.uri: ${file.uri}`);
186
+ }
187
+
182
188
  // Build content with resource links and download URLs
183
- const content: Array<{ type: string; uri?: string; name?: string; mimeType?: string; text?: string }> = [];
189
+ const content: Array<{ type: string; uri?: string; name?: string; mimeType?: string; text?: string; downloadUrl?: string }> = [];
184
190
 
185
191
  // Add resource links for each file
186
192
  for (const file of (successResult.files || [])) {
187
193
  content.push({
188
194
  type: "resource_link",
189
- uri: file.uri,
195
+ uri: file.downloadUrl || file.uri, // 使用带签名的下载链接
190
196
  name: file.name,
191
197
  mimeType: file.mimeType,
198
+ downloadUrl: file.downloadUrl, // 也包含 downloadUrl 字段
192
199
  });
193
200
  }
194
201
 
@@ -197,6 +204,8 @@ const plugin = {
197
204
  .map((f: UploadedFileInfo) => `- [${f.name}](${f.downloadUrl || f.uri})`)
198
205
  .join("\n");
199
206
 
207
+ api.logger.info?.(`[${ADP_UPLOAD_TOOL_NAME}] urlSummary: ${urlSummary}`);
208
+
200
209
  content.push({
201
210
  type: "text",
202
211
  text: `Files uploaded successfully:\n${urlSummary}\n\n⚠️ Note: Please include these download links in your response to the user and remind them that the links are valid for 24 hours.`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adp-openclaw",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "description": "ADP-OpenClaw demo channel plugin (Go WebSocket backend)",
5
5
  "type": "module",
6
6
  "dependencies": {