@band-ai/band-sdk-core 2.1.0 → 2.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/README.md +6 -0
- package/band_sdk_core.js +20 -0
- package/band_sdk_core_bg.wasm +0 -0
- package/index.d.ts +9 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -193,6 +193,12 @@ classifies one candidate per call.
|
|
|
193
193
|
`evaluateAdapterResult(roomId, messageId, succeeded)` maps an adapter
|
|
194
194
|
outcome to `"processed"` or `"failed"`.
|
|
195
195
|
|
|
196
|
+
`isSelfEcho(senderId, senderType, agentId)` is the one definition of
|
|
197
|
+
"self echo" (`senderType === "Agent" && senderId === agentId`) that
|
|
198
|
+
`evaluateDeliveryEvent` and `evaluateDrainCandidate` use internally,
|
|
199
|
+
exposed for a host's own call sites that classify a sender without going
|
|
200
|
+
through either function.
|
|
201
|
+
|
|
196
202
|
The public declaration is
|
|
197
203
|
[`index.d.ts`](https://github.com/band-ai/band-sdk-core/blob/main/crates/wasm/index.d.ts).
|
|
198
204
|
|
package/band_sdk_core.js
CHANGED
|
@@ -1282,6 +1282,26 @@ function evaluateNextMessage(triggeringMessageId, nextMessageId) {
|
|
|
1282
1282
|
}
|
|
1283
1283
|
exports.evaluateNextMessage = evaluateNextMessage;
|
|
1284
1284
|
|
|
1285
|
+
/**
|
|
1286
|
+
* The one definition of "self echo" (`senderType === "Agent" &&
|
|
1287
|
+
* senderId === agentId`), shared by `evaluateDeliveryEvent` and
|
|
1288
|
+
* `evaluateDrainCandidate` internally and exposed here for a host's own
|
|
1289
|
+
* call sites that don't go through either. Throws a plain `Error` if
|
|
1290
|
+
* `senderId`/`senderType`/`agentId` is not a string.
|
|
1291
|
+
* @param {any} senderId
|
|
1292
|
+
* @param {any} senderType
|
|
1293
|
+
* @param {any} agentId
|
|
1294
|
+
* @returns {boolean}
|
|
1295
|
+
*/
|
|
1296
|
+
function isSelfEcho(senderId, senderType, agentId) {
|
|
1297
|
+
const ret = wasm.isSelfEcho(senderId, senderType, agentId);
|
|
1298
|
+
if (ret[2]) {
|
|
1299
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1300
|
+
}
|
|
1301
|
+
return ret[0] !== 0;
|
|
1302
|
+
}
|
|
1303
|
+
exports.isSelfEcho = isSelfEcho;
|
|
1304
|
+
|
|
1285
1305
|
/**
|
|
1286
1306
|
* This platform's Phoenix Channels topic for a room's `room_participants`
|
|
1287
1307
|
* channel.
|
package/band_sdk_core_bg.wasm
CHANGED
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -500,3 +500,12 @@ export function evaluateAdapterResult(
|
|
|
500
500
|
messageId: string,
|
|
501
501
|
succeeded: boolean,
|
|
502
502
|
): AckDecision;
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* The one definition of "self echo" (`senderType === "Agent" &&
|
|
506
|
+
* senderId === agentId`), shared by {@link evaluateDeliveryEvent} and
|
|
507
|
+
* {@link evaluateDrainCandidate} internally and exposed here for a host's
|
|
508
|
+
* own call sites that don't go through either. Throws a plain `Error` if
|
|
509
|
+
* `senderId`/`senderType`/`agentId` is not a string.
|
|
510
|
+
*/
|
|
511
|
+
export function isSelfEcho(senderId: string, senderType: string, agentId: string): boolean;
|