@band-ai/band-sdk-core 6.1.2 → 7.0.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
@@ -994,6 +994,51 @@ class RoomRoster {
994
994
  if (Symbol.dispose) RoomRoster.prototype[Symbol.dispose] = RoomRoster.prototype.free;
995
995
  exports.RoomRoster = RoomRoster;
996
996
 
997
+ /**
998
+ * Outcome facts for one tool round. The caller owns roster completeness.
999
+ */
1000
+ class RoundOutcome {
1001
+ __destroy_into_raw() {
1002
+ const ptr = this.__wbg_ptr;
1003
+ this.__wbg_ptr = 0;
1004
+ RoundOutcomeFinalization.unregister(this);
1005
+ return ptr;
1006
+ }
1007
+ free() {
1008
+ const ptr = this.__destroy_into_raw();
1009
+ wasm.__wbg_roundoutcome_free(ptr, 0);
1010
+ }
1011
+ constructor() {
1012
+ const ret = wasm.roundoutcome_new();
1013
+ this.__wbg_ptr = ret;
1014
+ RoundOutcomeFinalization.register(this, this.__wbg_ptr, this);
1015
+ return this;
1016
+ }
1017
+ /**
1018
+ * @param {any} effect
1019
+ * @param {any} succeeded
1020
+ */
1021
+ record(effect, succeeded) {
1022
+ const ret = wasm.roundoutcome_record(this.__wbg_ptr, effect, succeeded);
1023
+ if (ret[1]) {
1024
+ throw takeFromExternrefTable0(ret[0]);
1025
+ }
1026
+ }
1027
+ /**
1028
+ * @param {any} complete
1029
+ * @returns {boolean}
1030
+ */
1031
+ shouldStop(complete) {
1032
+ const ret = wasm.roundoutcome_shouldStop(this.__wbg_ptr, complete);
1033
+ if (ret[2]) {
1034
+ throw takeFromExternrefTable0(ret[1]);
1035
+ }
1036
+ return ret[0] !== 0;
1037
+ }
1038
+ }
1039
+ if (Symbol.dispose) RoundOutcome.prototype[Symbol.dispose] = RoundOutcome.prototype.free;
1040
+ exports.RoundOutcome = RoundOutcome;
1041
+
997
1042
  /**
998
1043
  * One WebSocket session's state machine.
999
1044
  */
@@ -1696,6 +1741,24 @@ function agentRoomsTopic(agentId) {
1696
1741
  }
1697
1742
  exports.agentRoomsTopic = agentRoomsTopic;
1698
1743
 
1744
+ /**
1745
+ * The text shown when safe backend recovery still blocks new input.
1746
+ * @returns {string}
1747
+ */
1748
+ function backendStopUnconfirmedMessage() {
1749
+ let deferred1_0;
1750
+ let deferred1_1;
1751
+ try {
1752
+ const ret = wasm.backendStopUnconfirmedMessage();
1753
+ deferred1_0 = ret[0];
1754
+ deferred1_1 = ret[1];
1755
+ return getStringFromWasm0(ret[0], ret[1]);
1756
+ } finally {
1757
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1758
+ }
1759
+ }
1760
+ exports.backendStopUnconfirmedMessage = backendStopUnconfirmedMessage;
1761
+
1699
1762
  /**
1700
1763
  * Every Band tool's canonical name and its `TurnEffect` wire name, as a
1701
1764
  * plain object in the core table's order.
@@ -2294,7 +2357,7 @@ function __wbg_get_imports() {
2294
2357
  const ret = result;
2295
2358
  return ret;
2296
2359
  },
2297
- __wbg_isArray_1826f86c4b2a178d: function() { return handleError(function (arg0) {
2360
+ __wbg_isArray_5f8ac77a592164f7: function() { return handleError(function (arg0) {
2298
2361
  const ret = Array.isArray(arg0);
2299
2362
  return ret;
2300
2363
  }, arguments); },
@@ -2444,6 +2507,9 @@ const RoomReconciliationFinalization = (typeof FinalizationRegistry === 'undefin
2444
2507
  const RoomRosterFinalization = (typeof FinalizationRegistry === 'undefined')
2445
2508
  ? { register: () => {}, unregister: () => {} }
2446
2509
  : new FinalizationRegistry(ptr => wasm.__wbg_roomroster_free(ptr, 1));
2510
+ const RoundOutcomeFinalization = (typeof FinalizationRegistry === 'undefined')
2511
+ ? { register: () => {}, unregister: () => {} }
2512
+ : new FinalizationRegistry(ptr => wasm.__wbg_roundoutcome_free(ptr, 1));
2447
2513
  const SessionFinalization = (typeof FinalizationRegistry === 'undefined')
2448
2514
  ? { register: () => {}, unregister: () => {} }
2449
2515
  : new FinalizationRegistry(ptr => wasm.__wbg_session_free(ptr, 1));
Binary file
package/index.d.ts CHANGED
@@ -782,3 +782,14 @@ export function normalizeRoomActivitySnapshot(
782
782
  selfAgentId: string,
783
783
  traceContext?: string | null,
784
784
  ): RoomActivityPeer[];
785
+
786
+ /** Outcome facts for one tool round; the caller owns roster completeness. */
787
+ export class RoundOutcome {
788
+ constructor();
789
+ free(): void;
790
+ record(effect: TurnEffect, succeeded: boolean): void;
791
+ shouldStop(complete: boolean): boolean;
792
+ }
793
+
794
+ /** Explains why safe backend recovery still blocks new input. */
795
+ export function backendStopUnconfirmedMessage(): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@band-ai/band-sdk-core",
3
- "version": "6.1.2",
3
+ "version": "7.0.0",
4
4
  "description": "Shared Band event-payload validation",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {