@band-ai/band-sdk-core 1.1.0 → 1.2.0

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/band_sdk_core.js CHANGED
@@ -1035,6 +1035,106 @@ class SubscriptionTracker {
1035
1035
  if (Symbol.dispose) SubscriptionTracker.prototype[Symbol.dispose] = SubscriptionTracker.prototype.free;
1036
1036
  exports.SubscriptionTracker = SubscriptionTracker;
1037
1037
 
1038
+ /**
1039
+ * This platform's Phoenix Channels topic for the `agent_contacts` channel.
1040
+ * @param {any} agentId
1041
+ * @returns {string}
1042
+ */
1043
+ function agentContactsTopic(agentId) {
1044
+ let deferred2_0;
1045
+ let deferred2_1;
1046
+ try {
1047
+ const ret = wasm.agentContactsTopic(agentId);
1048
+ var ptr1 = ret[0];
1049
+ var len1 = ret[1];
1050
+ if (ret[3]) {
1051
+ ptr1 = 0; len1 = 0;
1052
+ throw takeFromExternrefTable0(ret[2]);
1053
+ }
1054
+ deferred2_0 = ptr1;
1055
+ deferred2_1 = len1;
1056
+ return getStringFromWasm0(ptr1, len1);
1057
+ } finally {
1058
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1059
+ }
1060
+ }
1061
+ exports.agentContactsTopic = agentContactsTopic;
1062
+
1063
+ /**
1064
+ * This platform's Phoenix Channels topic for the `agent_control` channel.
1065
+ * @param {any} agentId
1066
+ * @returns {string}
1067
+ */
1068
+ function agentControlTopic(agentId) {
1069
+ let deferred2_0;
1070
+ let deferred2_1;
1071
+ try {
1072
+ const ret = wasm.agentControlTopic(agentId);
1073
+ var ptr1 = ret[0];
1074
+ var len1 = ret[1];
1075
+ if (ret[3]) {
1076
+ ptr1 = 0; len1 = 0;
1077
+ throw takeFromExternrefTable0(ret[2]);
1078
+ }
1079
+ deferred2_0 = ptr1;
1080
+ deferred2_1 = len1;
1081
+ return getStringFromWasm0(ptr1, len1);
1082
+ } finally {
1083
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1084
+ }
1085
+ }
1086
+ exports.agentControlTopic = agentControlTopic;
1087
+
1088
+ /**
1089
+ * This platform's Phoenix Channels topic for the `agent_rooms` channel.
1090
+ * @param {any} agentId
1091
+ * @returns {string}
1092
+ */
1093
+ function agentRoomsTopic(agentId) {
1094
+ let deferred2_0;
1095
+ let deferred2_1;
1096
+ try {
1097
+ const ret = wasm.agentRoomsTopic(agentId);
1098
+ var ptr1 = ret[0];
1099
+ var len1 = ret[1];
1100
+ if (ret[3]) {
1101
+ ptr1 = 0; len1 = 0;
1102
+ throw takeFromExternrefTable0(ret[2]);
1103
+ }
1104
+ deferred2_0 = ptr1;
1105
+ deferred2_1 = len1;
1106
+ return getStringFromWasm0(ptr1, len1);
1107
+ } finally {
1108
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1109
+ }
1110
+ }
1111
+ exports.agentRoomsTopic = agentRoomsTopic;
1112
+
1113
+ /**
1114
+ * This platform's Phoenix Channels topic for a room's `chat_room` channel.
1115
+ * @param {any} roomId
1116
+ * @returns {string}
1117
+ */
1118
+ function chatRoomTopic(roomId) {
1119
+ let deferred2_0;
1120
+ let deferred2_1;
1121
+ try {
1122
+ const ret = wasm.chatRoomTopic(roomId);
1123
+ var ptr1 = ret[0];
1124
+ var len1 = ret[1];
1125
+ if (ret[3]) {
1126
+ ptr1 = 0; len1 = 0;
1127
+ throw takeFromExternrefTable0(ret[2]);
1128
+ }
1129
+ deferred2_0 = ptr1;
1130
+ deferred2_1 = len1;
1131
+ return getStringFromWasm0(ptr1, len1);
1132
+ } finally {
1133
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1134
+ }
1135
+ }
1136
+ exports.chatRoomTopic = chatRoomTopic;
1137
+
1038
1138
  /**
1039
1139
  * Classify a WebSocket close code. Returns `[terminal, delayRange]`.
1040
1140
  * @param {number | null} [closeCode]
@@ -1064,6 +1164,32 @@ function classifyUpgrade(status) {
1064
1164
  }
1065
1165
  exports.classifyUpgrade = classifyUpgrade;
1066
1166
 
1167
+ /**
1168
+ * This platform's Phoenix Channels topic for a room's `room_participants`
1169
+ * channel.
1170
+ * @param {any} roomId
1171
+ * @returns {string}
1172
+ */
1173
+ function roomParticipantsTopic(roomId) {
1174
+ let deferred2_0;
1175
+ let deferred2_1;
1176
+ try {
1177
+ const ret = wasm.roomParticipantsTopic(roomId);
1178
+ var ptr1 = ret[0];
1179
+ var len1 = ret[1];
1180
+ if (ret[3]) {
1181
+ ptr1 = 0; len1 = 0;
1182
+ throw takeFromExternrefTable0(ret[2]);
1183
+ }
1184
+ deferred2_0 = ptr1;
1185
+ deferred2_1 = len1;
1186
+ return getStringFromWasm0(ptr1, len1);
1187
+ } finally {
1188
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1189
+ }
1190
+ }
1191
+ exports.roomParticipantsTopic = roomParticipantsTopic;
1192
+
1067
1193
  /**
1068
1194
  * Validate and normalize an inbound platform event payload.
1069
1195
  *
Binary file
package/index.d.ts CHANGED
@@ -199,6 +199,24 @@ export function classifyUpgrade(
199
199
  status: number,
200
200
  ): [boolean, [number, number] | undefined];
201
201
 
202
+ /** This platform's Phoenix Channels topic for the `agent_control` channel. */
203
+ export function agentControlTopic(agentId: string): string;
204
+
205
+ /** This platform's Phoenix Channels topic for the `agent_rooms` channel. */
206
+ export function agentRoomsTopic(agentId: string): string;
207
+
208
+ /** This platform's Phoenix Channels topic for the `agent_contacts` channel. */
209
+ export function agentContactsTopic(agentId: string): string;
210
+
211
+ /** This platform's Phoenix Channels topic for a room's `chat_room` channel. */
212
+ export function chatRoomTopic(roomId: string): string;
213
+
214
+ /**
215
+ * This platform's Phoenix Channels topic for a room's `room_participants`
216
+ * channel.
217
+ */
218
+ export function roomParticipantsTopic(roomId: string): string;
219
+
202
220
  /** The settled outcome of one {@link Session} call. */
203
221
  export class SessionOutcome {
204
222
  private constructor();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@band-ai/band-sdk-core",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Shared Band event-payload validation",
5
5
  "license": "MIT",
6
6
  "repository": {