@blade-hq/agent-client 2610.0.0-beta.83 → 2610.0.0-beta.85

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.
@@ -304,6 +304,12 @@ export interface ImportSessionOptions {
304
304
  }
305
305
  export declare class SessionsResource {
306
306
  private client;
307
+ private readonly pendingImages;
308
+ /** Fetch an immutable message image using this client's authenticated identity. */
309
+ fetchImage(sessionId: string, assetId: string, preview?: boolean): Promise<Blob>;
310
+ /** Fetch a public-share image; the server validates the share token on every request. */
311
+ fetchSharedImage(token: string, assetId: string, preview?: boolean): Promise<Blob>;
312
+ private fetchImagePath;
307
313
  constructor(client: BladeClient);
308
314
  getMcpApp(sessionId: string, sourceId: string, init?: RequestInit): Promise<McpAppArchive>;
309
315
  onMcpAppChanged(sessionId: string, sourceId: string, listener: () => void): () => void;
@@ -8,6 +8,9 @@ export interface ImageUrlContentPart {
8
8
  type: "image_url";
9
9
  image_url: {
10
10
  url: string;
11
+ source_path?: string;
12
+ width?: number;
13
+ height?: number;
11
14
  };
12
15
  }
13
16
  export interface FileContentPart {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blade-hq/agent-client",
3
- "version": "2610.0.0-beta.83",
3
+ "version": "2610.0.0-beta.85",
4
4
  "description": "Blade Agent 框架无关客户端:会话实时状态机、REST 通道、弹窗登录、页面协作。浏览器与 Node.js 通用。",
5
5
  "repository": {
6
6
  "type": "git",
package/public-api.md CHANGED
@@ -844,7 +844,7 @@ toolCallId: string | undefined
844
844
  ## `ImageUrlContentPart` (interface)
845
845
 
846
846
  ```ts
847
- image_url: { url: string; }
847
+ image_url: { url: string; source_path?: string; width?: number; height?: number; }
848
848
  type: "image_url"
849
849
  ```
850
850
 
@@ -1821,7 +1821,9 @@ deleteFile: (sessionId: string, filePath: string) => Promise<void>
1821
1821
  deleteSession: (sessionId: string, options?: { deleteWorkspace?: boolean; }) => Promise<{ deleted: boolean; workspace_deleted?: boolean; }>
1822
1822
  downloadFile: (sessionId: string, filePath: string, downloadName?: string) => Promise<void>
1823
1823
  exportSession: (sessionId: string) => Promise<void>
1824
+ fetchImage: (sessionId: string, assetId: string, preview?: boolean) => Promise<Blob>
1824
1825
  fetchSessionPluginIcon: (sessionId: string, name: string) => Promise<Blob>
1826
+ fetchSharedImage: (token: string, assetId: string, preview?: boolean) => Promise<Blob>
1825
1827
  getBackgroundTask: (sessionId: string, taskId: string, tail?: number, init?: RequestInit) => Promise<BackgroundTask>
1826
1828
  getDownloadDirUrl: (sessionId: string, dirPath: string) => string
1827
1829
  getMcpApp: (sessionId: string, sourceId: string, init?: RequestInit) => Promise<McpAppArchive>