@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.
package/dist/index.js CHANGED
@@ -2654,6 +2654,24 @@ var SessionsResource = class {
2654
2654
  this.client = client;
2655
2655
  }
2656
2656
  client;
2657
+ pendingImages = /* @__PURE__ */ new Map();
2658
+ /** Fetch an immutable message image using this client's authenticated identity. */
2659
+ fetchImage(sessionId, assetId, preview = true) {
2660
+ return this.fetchImagePath(`/api/sessions/${encodeURIComponent(sessionId)}/media/${encodeURIComponent(assetId)}`, preview);
2661
+ }
2662
+ /** Fetch a public-share image; the server validates the share token on every request. */
2663
+ fetchSharedImage(token, assetId, preview = true) {
2664
+ return this.fetchImagePath(`/api/share/${encodeURIComponent(token)}/media/${encodeURIComponent(assetId)}`, preview);
2665
+ }
2666
+ fetchImagePath(resource, preview) {
2667
+ const path = `${resource}${preview ? "?variant=preview" : ""}`;
2668
+ const identity = this.client.buildAuthedUrl(path);
2669
+ const existing = this.pendingImages.get(identity);
2670
+ if (existing) return existing;
2671
+ const pending = this.client.blob("GET", path).finally(() => this.pendingImages.delete(identity));
2672
+ this.pendingImages.set(identity, pending);
2673
+ return pending;
2674
+ }
2657
2675
  getMcpApp(sessionId, sourceId, init) {
2658
2676
  return this.client.jsonFromInit(`/api/sessions/${encodeURIComponent(sessionId)}/mcp-apps/${encodeURIComponent(sourceId)}`, init);
2659
2677
  }
@@ -6899,7 +6917,7 @@ function resolveServiceUrl(endpoints, name, path = "") {
6899
6917
 
6900
6918
  // src/version.ts
6901
6919
  var SDK_NAME = "agent-client";
6902
- var SDK_VERSION = true ? "2610.0.0-beta.83" : "1.1.1";
6920
+ var SDK_VERSION = true ? "2610.0.0-beta.85" : "1.1.1";
6903
6921
 
6904
6922
  // src/commands/protocol.ts
6905
6923
  function isCommandEnvelope(value) {