openmates 0.15.0-alpha.26 → 0.15.0-alpha.27

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.
@@ -6991,7 +6991,17 @@ var OpenMatesClient = class _OpenMatesClient {
6991
6991
  created_at: now
6992
6992
  }
6993
6993
  ] : [];
6994
+ const storeRequestId = randomUUID5();
6995
+ const storeConfirmed = params.ws.waitForMessage(
6996
+ "store_embed_confirmed",
6997
+ (payload) => {
6998
+ const p = payload;
6999
+ return p.request_id === storeRequestId && p.embed_id === embed.embed_id;
7000
+ },
7001
+ 3e4
7002
+ );
6994
7003
  await params.ws.sendAsync("store_embed", {
7004
+ request_id: storeRequestId,
6995
7005
  embed_id: embed.embed_id,
6996
7006
  encrypted_type: encryptedType,
6997
7007
  encrypted_content: encryptedContent,
@@ -7012,8 +7022,19 @@ var OpenMatesClient = class _OpenMatesClient {
7012
7022
  created_at: createdAt,
7013
7023
  updated_at: updatedAt
7014
7024
  });
7025
+ await storeConfirmed;
7015
7026
  if (keys.length > 0) {
7016
- await params.ws.sendAsync("store_embed_keys", { keys });
7027
+ const keysRequestId = randomUUID5();
7028
+ const keysConfirmed = params.ws.waitForMessage(
7029
+ "store_embed_keys_confirmed",
7030
+ (payload) => {
7031
+ const p = payload;
7032
+ return p.request_id === keysRequestId;
7033
+ },
7034
+ 3e4
7035
+ );
7036
+ await params.ws.sendAsync("store_embed_keys", { request_id: keysRequestId, keys });
7037
+ await keysConfirmed;
7017
7038
  parentKeys.set(embed.embed_id, embedKey);
7018
7039
  }
7019
7040
  if (Array.isArray(embed.version_history_rows)) {
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getExtForLang,
4
4
  serializeToYaml
5
- } from "./chunk-SK2NK7LX.js";
5
+ } from "./chunk-DYM7J2SK.js";
6
6
  import "./chunk-AXNRPVLE.js";
7
7
  export {
8
8
  getExtForLang,
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  reconcileAuthoritativeChats,
19
19
  renderSupportInfo,
20
20
  serializeToYaml
21
- } from "./chunk-SK2NK7LX.js";
21
+ } from "./chunk-DYM7J2SK.js";
22
22
  import "./chunk-AXNRPVLE.js";
23
23
  export {
24
24
  APP_SKILL_METADATA,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.15.0-alpha.26",
3
+ "version": "0.15.0-alpha.27",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",