@byok-sdk/cloud 0.4.0 → 0.4.1

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/README.md CHANGED
@@ -49,4 +49,4 @@ if (result === undefined) {
49
49
  stored body is not a terminal envelope throws `ByokCloudError` rather than
50
50
  returning a best-effort shape.
51
51
 
52
- MIT licensed. Node.js 22.19.0 or newer.
52
+ MIT licensed. Node.js 22.22.0 or newer.
package/dist/index.js CHANGED
@@ -675,6 +675,7 @@ function tokenHandler(deps) {
675
675
  return c.json(response, 200);
676
676
  };
677
677
  }
678
+ var CLOUD_PROTOCOL_CAPABILITIES = ["result-document"];
678
679
  function sleep(ms) {
679
680
  return new Promise((resolve) => setTimeout(resolve, ms));
680
681
  }
@@ -703,12 +704,20 @@ function eventsHandler(deps) {
703
704
  });
704
705
  if (page.messages.length > 0) {
705
706
  const events = page.messages.map((message) => decodeEnvelope(message.body));
706
- const response2 = { events, cursor: page.nextSeq };
707
+ const response2 = {
708
+ events,
709
+ cursor: page.nextSeq,
710
+ capabilities: CLOUD_PROTOCOL_CAPABILITIES
711
+ };
707
712
  return c.json(response2, 200);
708
713
  }
709
714
  if (attempt < attempts - 1) await sleep(deps.longPollIntervalMs);
710
715
  }
711
- const response = { events: [], cursor };
716
+ const response = {
717
+ events: [],
718
+ cursor,
719
+ capabilities: CLOUD_PROTOCOL_CAPABILITIES
720
+ };
712
721
  return c.json(response, 200);
713
722
  };
714
723
  }