@band-ai/band-sdk-core 1.2.1 → 2.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
@@ -727,6 +727,13 @@ class SessionPolicy {
727
727
  const ptr = this.__destroy_into_raw();
728
728
  wasm.__wbg_sessionpolicy_free(ptr, 0);
729
729
  }
730
+ /**
731
+ * @returns {number}
732
+ */
733
+ get deadThresholdS() {
734
+ const ret = wasm.sessionpolicy_deadThresholdS(this.__wbg_ptr);
735
+ return ret;
736
+ }
730
737
  /**
731
738
  * A recommended, not final, default.
732
739
  * @returns {SessionPolicy}
@@ -735,6 +742,13 @@ class SessionPolicy {
735
742
  const ret = wasm.sessionpolicy_default();
736
743
  return SessionPolicy.__wrap(ret);
737
744
  }
745
+ /**
746
+ * @returns {number}
747
+ */
748
+ get heartbeatIntervalS() {
749
+ const ret = wasm.sessionpolicy_heartbeatIntervalS(this.__wbg_ptr);
750
+ return ret;
751
+ }
738
752
  /**
739
753
  * `config` is any plain object with the fields declared in
740
754
  * `index.d.ts`'s `SessionPolicyConfig`; grouped into one value rather
Binary file
package/index.d.ts CHANGED
@@ -240,21 +240,26 @@ export interface SessionPolicyConfig {
240
240
  rapidCooldownStepS: number;
241
241
  rapidCooldownMaxS: number;
242
242
  rapidThreshold: number;
243
+ heartbeatIntervalS: number;
244
+ deadThresholdS: number;
243
245
  }
244
246
 
245
247
  /**
246
248
  * Reconnect backoff/jitter policy, plus the graduated rapid-disconnect
247
249
  * cooldown ladder. A recommended, not final, starting design.
248
250
  *
249
- * Throws a native `Error` with `.issues`/`.traceContext` if `factor < 1.0`
250
- * or `baseDelayS > maxDelayS`. Throws a plain `Error` if `config` is
251
- * missing a field or a field is not a finite, non-negative number
252
- * (`rapidThreshold` must also be an integer).
251
+ * Throws a native `Error` with `.issues`/`.traceContext` if `factor < 1.0`,
252
+ * `baseDelayS > maxDelayS`, `heartbeatIntervalS == 0`, or
253
+ * `deadThresholdS <= heartbeatIntervalS`. Throws a plain `Error` if
254
+ * `config` is missing a field or a field is not a finite, non-negative
255
+ * number (`rapidThreshold` must also be an integer).
253
256
  */
254
257
  export class SessionPolicy {
255
258
  constructor(config: SessionPolicyConfig, traceContext?: string | null);
256
259
  /** A recommended, not final, default. */
257
260
  static default(): SessionPolicy;
261
+ readonly heartbeatIntervalS: number;
262
+ readonly deadThresholdS: number;
258
263
  }
259
264
 
260
265
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@band-ai/band-sdk-core",
3
- "version": "1.2.1",
3
+ "version": "2.0.0",
4
4
  "description": "Shared Band event-payload validation",
5
5
  "license": "MIT",
6
6
  "repository": {