@mega-yfue/eufy-sdk 0.5.0-beta.95 → 0.6.0-beta.1

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/dist/index.js CHANGED
@@ -8063,6 +8063,7 @@ var ARMING_MEMBERS = {
8063
8063
  * MODE_SWITCH carries no value. Live qualification on a standalone camera showed that authoritative
8064
8064
  * readback requires a bounded cloud-list refresh, and that its P2P session must be reset after
8065
8065
  * convergence before a following mode write; an attached device must never reset its shared HomeBase.
8066
+ * A standalone T8423's level-1 session is kept open instead.
8066
8067
  */
8067
8068
  mode: {
8068
8069
  param: ARMING_CMD.SET_ARMING,
@@ -22030,6 +22031,7 @@ function stationChannels(devices) {
22030
22031
  var DIRECT_CMD_SENDS = 5;
22031
22032
  var LEVEL2_GRACE_MS = 25e3;
22032
22033
  var LEVEL2_SETTLE_MS = 8e3;
22034
+ var KEEP_LEVEL1_SESSION_MODELS = /* @__PURE__ */ new Set(["T8423"]);
22033
22035
  var P2P_STATION_WAITS = {
22034
22036
  connect: CONNECT_TIMEOUT_MS,
22035
22037
  level2Grace: LEVEL2_GRACE_MS,
@@ -22214,14 +22216,22 @@ var P2PCommandRouter = class _P2PCommandRouter {
22214
22216
  const dev = this.recordFor(sn);
22215
22217
  return dev ? stationOf(dev) : sn;
22216
22218
  }
22217
- /** Reset only a standalone device's session; an attached device must not close its shared HomeBase. */
22219
+ /**
22220
+ * Reset only a standalone device's session; an attached device must not close its shared HomeBase.
22221
+ *
22222
+ * A {@link KEEP_LEVEL1_SESSION_MODELS} station whose open session holds no level-2 key is left open.
22223
+ */
22218
22224
  async resetStandaloneSession(sn) {
22219
22225
  const device = this.recordFor(sn);
22220
22226
  if (!device)
22221
22227
  return;
22222
22228
  const station = stationOf(device);
22223
- if (station === sn)
22224
- await this.manager.resetWhenUnused(station);
22229
+ if (station !== sn)
22230
+ return;
22231
+ const open2 = this.manager.get(station);
22232
+ if (open2 && !open2.hasLevel2Key && KEEP_LEVEL1_SESSION_MODELS.has(device.model ?? ""))
22233
+ return;
22234
+ await this.manager.resetWhenUnused(station);
22225
22235
  }
22226
22236
  /**
22227
22237
  * Open (or reuse) the P2P session for a station **on demand**, coalescing concurrent cold opens via