@mega-yfue/eufy-sdk 0.5.0-beta.8 → 0.5.0-beta.80

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.
Files changed (61) hide show
  1. package/dist/client/device-registry.d.ts +24 -2
  2. package/dist/client/eufy-mega.d.ts +75 -6
  3. package/dist/client/types.d.ts +1 -1
  4. package/dist/core/contracts.d.ts +80 -33
  5. package/dist/core/store.d.ts +4 -0
  6. package/dist/core/types.d.ts +2 -0
  7. package/dist/index.js +3754 -617
  8. package/dist/index.js.map +4 -4
  9. package/dist/model/capabilities/arming.d.ts +39 -4
  10. package/dist/model/capabilities/camera.d.ts +47 -18
  11. package/dist/model/capabilities/dp-catalog.d.ts +4 -3
  12. package/dist/model/capabilities/index.d.ts +16 -3
  13. package/dist/model/capabilities/light.d.ts +3 -0
  14. package/dist/model/capabilities/lock.d.ts +21 -7
  15. package/dist/model/capabilities/motion.d.ts +17 -2
  16. package/dist/model/capabilities/mower.d.ts +230 -0
  17. package/dist/model/capabilities/rtsp.d.ts +16 -3
  18. package/dist/model/capabilities/smart-drop.d.ts +20 -0
  19. package/dist/model/capabilities/suction.d.ts +5 -5
  20. package/dist/model/capabilities/types.d.ts +10 -0
  21. package/dist/model/capabilities/vacuum-clean.d.ts +19 -13
  22. package/dist/model/classify.d.ts +1 -2
  23. package/dist/model/device-family.d.ts +12 -0
  24. package/dist/model/param-dictionary.d.ts +6 -0
  25. package/dist/model/param-namespace.d.ts +1 -1
  26. package/dist/model/registry.d.ts +3 -2
  27. package/dist/model/types.d.ts +26 -12
  28. package/dist/transport/abortable.d.ts +8 -0
  29. package/dist/transport/http/mega-client.d.ts +34 -2
  30. package/dist/transport/mqtt/broker-discovery.d.ts +2 -1
  31. package/dist/transport/mqtt/command-router.d.ts +3 -2
  32. package/dist/transport/p2p/audio-frame.d.ts +14 -0
  33. package/dist/transport/p2p/codec.d.ts +16 -0
  34. package/dist/transport/p2p/command-router.d.ts +19 -30
  35. package/dist/transport/p2p/fmp4.d.ts +12 -2
  36. package/dist/transport/p2p/live-trace.d.ts +25 -2
  37. package/dist/transport/p2p/p2p-session.d.ts +55 -12
  38. package/dist/transport/p2p/readable-egress.d.ts +4 -0
  39. package/dist/transport/p2p/recording-download.d.ts +4 -3
  40. package/dist/transport/p2p/shared-live-source.d.ts +29 -14
  41. package/dist/transport/p2p/talkback.d.ts +21 -10
  42. package/dist/transport/p2p/video.d.ts +2 -0
  43. package/dist/transport/rtc/call-live.d.ts +41 -0
  44. package/dist/transport/rtc/command-router.d.ts +145 -0
  45. package/dist/transport/rtc/live.d.ts +76 -0
  46. package/dist/transport/rtc/peer.d.ts +122 -0
  47. package/dist/transport/rtc/portal-keepalive.d.ts +11 -0
  48. package/dist/transport/rtc/portal-packet.d.ts +72 -0
  49. package/dist/transport/rtc/ptcs-framer.d.ts +86 -0
  50. package/dist/transport/rtc/scall-sdp.d.ts +50 -0
  51. package/dist/transport/rtc/session.d.ts +99 -0
  52. package/dist/transport/rtc/signaling.d.ts +139 -0
  53. package/dist/transport/token-echo.d.ts +8 -0
  54. package/dist/transport/tuya/account.d.ts +8 -5
  55. package/dist/transport/tuya/client.d.ts +19 -5
  56. package/dist/transport/tuya/command-router.d.ts +10 -14
  57. package/dist/transport/tuya/dp-codec.d.ts +2 -23
  58. package/dist/transport/tuya/et3.d.ts +22 -0
  59. package/dist/transport/tuya/request.d.ts +18 -8
  60. package/dist/transport/tuya/sign.d.ts +7 -0
  61. package/package.json +2 -1
@@ -76,10 +76,13 @@ export declare const ARMING_CMD: {
76
76
  * The ENCRYPTION LEVEL is the session's to pick (`"auto"`), not this command's: the T8030 the envelope
77
77
  * was captured on holds a level-2 key and seals it level-2, while an own-session camera that never
78
78
  * negotiates one carries the same envelope level-1. See `armingCommand`.
79
+ *
80
+ * A T8410C takes the mode as a direct frame instead of this envelope; see {@link DIRECT_ARMING_MODELS}.
79
81
  */
80
82
  readonly SET_ARMING: 1224;
81
83
  /**
82
- * The per-mode alarm/arm-delay configuration write. ✅ WIRE CAPTURED live on a T8030 (
84
+ * One guard mode's per-device action table (app `CMD_SET_ALL_ACTION`), which carries the alarm delays
85
+ * and each device's actions in that mode. ✅ WIRE CAPTURED live on a T8030 (
83
86
  * 2026-07-23, both directions): a **bare
84
87
  * JSON frame, no `1350`/`1700` envelope** — outer P2P cmd IS `1255` itself, station channel 255,
85
88
  * plaintext `{account_id, count_down_alarm:{channel_list,delay_time},
@@ -96,15 +99,26 @@ export declare const ARMING_CMD: {
96
99
  * corresponding GET command (`1310`/inner cmd `40003`, sent by the app right before editing) always
97
100
  * replied `{count:0,data:null}` in every capture — genuinely empty, not a decrypt failure (confirmed
98
101
  * via the same bidirectional decrypt this finding used) — so the app does NOT read the current
99
- * config this way; how it does is still unknown. Without a working GET, safely PATCHING just one
100
- * channel in or out of an existing list isn't possible without risking clobbering the rest — so
102
+ * config this way; a T8010 reports it on its own params instead, see below. Without a working GET,
103
+ * safely PATCHING just one channel in or out of an existing list isn't possible without risking
104
+ * clobbering the rest — so
101
105
  * this ships as a caller-supplies-everything write instead of guessing a merge.
102
106
  * `devices`/`siren_sensor_action` are even less understood (raw per-device action codes, meaning
103
107
  * unconfirmed) and MUST come from a value independently read/captured for the target mode —
104
108
  * see `AlarmDelayConfig`'s field docs.
109
+ *
110
+ * ✅ On a T8010 the app writes the same command for the Device Control screen: header channel 0, the
111
+ * whole table of the mode `{mode_id, devices, count_down_alarm, count_down_arm}`, acked by an all-zero
112
+ * 1255 reply. The T8010 reports each table on its own params, Home on 1157 and Away on 1158, and the
113
+ * reported table follows a write within 15 s. See {@link DEVICE_NOTIFY_FLAG}.
105
114
  */
106
- readonly ALARM_DELAY_CONFIG: 1255;
115
+ readonly SET_ALL_ACTION: 1255;
107
116
  };
117
+ /**
118
+ * The guard modes whose device notification is read and written. Home and away are replayed on a T8010;
119
+ * `custom1` (wire 3) is captured on a T8170, whose own params report it on 1148.
120
+ */
121
+ export type DeviceNotificationMode = Extract<ArmingMode, "home" | "away" | "custom1">;
108
122
  /**
109
123
  * Alarm-delay durations the app's OWN picker UI offers — `AlarmDelaySeconds` is both the const
110
124
  * value-object (`AlarmDelaySeconds.sec45`) and the union type of its values, so callers pass the
@@ -225,6 +239,27 @@ export declare const ARMING_MEMBERS: {
225
239
  * would be the same unverified guess `setMode` refuses.
226
240
  */
227
241
  readonly setAlarmDelayConfig: import("./members.js").MethodMember<(mode: AlarmDelayMode, config: AlarmDelayConfig) => Promise<void>>;
242
+ /**
243
+ * Whether the device on `channel` sends a push notification in `mode`: its {@link DEVICE_NOTIFY_FLAG}
244
+ * in the action table the station reports for that mode. `undefined` where the station reports no table
245
+ * or the table does not list `channel`. A standalone camera answers from its own 1225/1239/1148 flags,
246
+ * for its own channel only. A device's channel is `EufyDevice.channel`.
247
+ */
248
+ readonly deviceNotification: import("./members.js").MethodMember<(mode: DeviceNotificationMode, channel: number) => boolean | undefined> & {
249
+ available: (ctx: CommandContext) => boolean;
250
+ };
251
+ /**
252
+ * Turn the push notification of the device on `channel` on or off in `mode` (cmd
253
+ * {@link ARMING_CMD.SET_ALL_ACTION}): the station's reported table written back with that one flag
254
+ * changed. A standalone camera is sent a one-entry `{mode_id, devices}` table built from its own flags,
255
+ * for its own channel only. Rejects, sending nothing, where the table does not list `channel`. A write
256
+ * builds on the last one sent for that mode until the device reports a table (`${mode}Action` on a
257
+ * standalone camera) observed 15 s after it, so a second write does not revert it; a write whose dispatch
258
+ * rejects is not built on.
259
+ */
260
+ readonly setDeviceNotification: import("./members.js").MethodMember<(mode: DeviceNotificationMode, channel: number, on: boolean) => Promise<void>> & {
261
+ available: (ctx: CommandContext) => boolean;
262
+ };
228
263
  };
229
264
  /**
230
265
  * `arming` — guard/arming mode. `armingMode` (see {@link ARMING_CMD.SET_ARMING}) has a verified read/write
@@ -1,3 +1,4 @@
1
+ import { isCameraCodec } from "./access.js";
1
2
  import { type Surface } from "./members.js";
2
3
  import type { AvailabilityContext, CapabilityModule, CommandContext } from "./types.js";
3
4
  import { type Command, type MediaProvider } from "../../core/contracts.js";
@@ -8,6 +9,8 @@ import { type Command, type MediaProvider } from "../../core/contracts.js";
8
9
  * `transport/p2p/commands.ts`). Each entry notes its app `CommandType` name.
9
10
  */
10
11
  export declare const CAMERA_CMD: {
12
+ /** Camera-reported Wi-Fi signal (app `CMD_GET_WIFI_RSSI`). */
13
+ readonly WIFI_RSSI: 1142;
11
14
  /** Camera on/off. Read and write polarity depend on the family and topology. */
12
15
  readonly CAMERA_ENABLE: 1035;
13
16
  /** Wrapped T8410 power switch on HomeBase 3. */
@@ -271,6 +274,14 @@ export type CameraActions = Surface<typeof CAMERA_MEMBERS> & {
271
274
  * @internal
272
275
  */
273
276
  export declare const CAMERA_MEMBERS: {
277
+ /** Reads the latest cached report and exposes no setter. */
278
+ readonly wifiRssi: {
279
+ readonly param: 1142;
280
+ readonly type: "number";
281
+ readonly kind: "scalar";
282
+ readonly provenance: "apk";
283
+ readonly description: "Camera-reported Wi-Fi signal; physical units and a quality scale are unspecified.";
284
+ };
274
285
  /**
275
286
  * The default READ is the *disable*-bit convention (1035 "0" ⇒ ON, 2001 direct); the WRITE polarity is
276
287
  * family-dependent — see `powerValue` / `isEnableBitPolarity`. Battery/solo cams report the state under
@@ -290,6 +301,7 @@ export declare const CAMERA_MEMBERS: {
290
301
  readonly type: "bool";
291
302
  readonly kind: "boolean";
292
303
  readonly provenance: "verified";
304
+ readonly available: typeof isCameraCodec;
293
305
  readonly invert: true;
294
306
  readonly invertFor: (ctx: AvailabilityContext) => false | undefined;
295
307
  readonly readAliases: readonly [{
@@ -324,6 +336,7 @@ export declare const CAMERA_MEMBERS: {
324
336
  readonly type: "bool";
325
337
  readonly kind: "boolean";
326
338
  readonly provenance: "apk";
339
+ readonly available: typeof isCameraCodec;
327
340
  readonly description: string;
328
341
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
329
342
  };
@@ -343,6 +356,7 @@ export declare const CAMERA_MEMBERS: {
343
356
  readonly 2: "Timestamp + Logo";
344
357
  };
345
358
  readonly provenance: "verified";
359
+ readonly available: typeof isCameraCodec;
346
360
  readonly description: string;
347
361
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
348
362
  };
@@ -356,6 +370,7 @@ export declare const CAMERA_MEMBERS: {
356
370
  readonly type: "bool";
357
371
  readonly kind: "boolean";
358
372
  readonly provenance: "verified";
373
+ readonly available: typeof isCameraCodec;
359
374
  readonly description: string;
360
375
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
361
376
  };
@@ -371,6 +386,7 @@ export declare const CAMERA_MEMBERS: {
371
386
  readonly type: "number";
372
387
  readonly kind: "scalar";
373
388
  readonly provenance: "verified";
389
+ readonly available: typeof isCameraCodec;
374
390
  readonly description: string;
375
391
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
376
392
  };
@@ -388,6 +404,7 @@ export declare const CAMERA_MEMBERS: {
388
404
  readonly 2: "All Sound";
389
405
  };
390
406
  readonly provenance: "verified";
407
+ readonly available: typeof isCameraCodec;
391
408
  readonly description: string;
392
409
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
393
410
  };
@@ -409,6 +426,7 @@ export declare const CAMERA_MEMBERS: {
409
426
  readonly 3: "Text First, Then Thumbnail";
410
427
  };
411
428
  readonly provenance: "verified";
429
+ readonly available: typeof isCameraCodec;
412
430
  readonly description: string;
413
431
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
414
432
  };
@@ -428,6 +446,7 @@ export declare const CAMERA_MEMBERS: {
428
446
  readonly 2: "Full Color";
429
447
  };
430
448
  readonly provenance: "verified";
449
+ readonly available: typeof isCameraCodec;
431
450
  readonly description: string;
432
451
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
433
452
  };
@@ -435,25 +454,30 @@ export declare const CAMERA_MEMBERS: {
435
454
  * Live-view quality, the pair to {@link CAMERA_MEMBERS.recordingQuality} and a different setting on a
436
455
  * different wire: changing one leaves the other's parameter untouched.
437
456
  *
438
- * The READ is 1020, which reports the resolved tier as a plain integer. 1020 is also the name the
439
- * param dictionary already gives that id, and `Device` keys state by NAME — a member claiming 2730
440
- * under this name would collide with it on a device reporting both.
457
+ * The READ is 1020, which reports the resolved tier as a plain integer, while the WRITE rides 2730's
458
+ * `1350` payload. They are two ids for one setting because 2730 carries a per-mode config and 1020
459
+ * carries the tier in force; the tier is what this property means. 1020 is also the name the param
460
+ * dictionary already gives that id, and `Device` keys state by NAME — a member claiming 2730 under
461
+ * this name would collide with it on a device reporting both.
441
462
  *
442
- * `unverified: true` with no `write`: the app's 2730 frame is captured byte-exact, but replaying it
443
- * from this SDK produced no observable change on a standalone T8171, where the recording sibling's
444
- * 2731 write on the same envelope and the same session does land. The one difference the capture
445
- * shows is that the app's frame carries no `mChannel`/`mValue3`, which this envelope always emits.
446
- * Until a send is confirmed, the setter is absent — a control that silently does nothing is worse
447
- * than none — and the read ships ahead of it, which verification per direction allows.
463
+ * `transaction` is part of the frame that was captured, so it is sent. The recording sibling's own
464
+ * confirmed frame carries no such field; neither is inferred from the other.
448
465
  */
449
466
  readonly streamingQuality: {
467
+ readonly accepts: StreamingQualityName;
450
468
  readonly param: 1020;
451
469
  readonly type: "number";
452
470
  readonly kind: "enum";
453
471
  readonly enumValues: Readonly<Record<number, string>>;
454
472
  readonly provenance: "verified";
455
- readonly unverified: true;
473
+ readonly available: typeof isCameraCodec;
474
+ readonly args: readonly [{
475
+ readonly name: "quality";
476
+ readonly kind: "enum";
477
+ readonly description: "A tier, or the name it maps to. 0 is Auto.";
478
+ }];
456
479
  readonly description: string;
480
+ readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
457
481
  };
458
482
  /**
459
483
  * `type` is how the value is STORED, and 2731 stores the whole config — the ACTIVE tier is lifted out
@@ -465,6 +489,7 @@ export declare const CAMERA_MEMBERS: {
465
489
  readonly param: 2731;
466
490
  readonly type: "string";
467
491
  readonly provenance: "verified";
492
+ readonly available: typeof isCameraCodec;
468
493
  readonly decode: (raw: unknown) => number | undefined;
469
494
  readonly decodedKind: "enum";
470
495
  readonly decodedValues: number[];
@@ -486,6 +511,7 @@ export declare const CAMERA_MEMBERS: {
486
511
  readonly type: "bool";
487
512
  readonly kind: "boolean";
488
513
  readonly provenance: "apk";
514
+ readonly available: typeof isCameraCodec;
489
515
  readonly description: string;
490
516
  readonly requires: readonly [1015];
491
517
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
@@ -503,6 +529,7 @@ export declare const CAMERA_MEMBERS: {
503
529
  readonly kind: "boolean";
504
530
  readonly writeOnly: true;
505
531
  readonly provenance: "verified";
532
+ readonly available: typeof isCameraCodec;
506
533
  readonly description: "Privacy mode (PRIVACY_MODE 6250) — the multi-frame burst the sink plays.";
507
534
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
508
535
  };
@@ -516,6 +543,7 @@ export declare const CAMERA_MEMBERS: {
516
543
  readonly type: "bool";
517
544
  readonly kind: "boolean";
518
545
  readonly provenance: "verified";
546
+ readonly available: typeof isCameraCodec;
519
547
  readonly readAvailable: (ctx: AvailabilityContext) => boolean;
520
548
  readonly readAliases: readonly [{
521
549
  readonly paramType: 1716;
@@ -525,6 +553,7 @@ export declare const CAMERA_MEMBERS: {
525
553
  readonly description: "Camera status LED. Video doorbells report the same state under their button-ring LED parameter.";
526
554
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
527
555
  };
556
+ readonly views: import("./members.js").ProvidedMember<"media", (() => readonly number[]) | undefined>;
528
557
  /**
529
558
  * Media is not a property: it returns DATA rather than moving state, its options are richer than a
530
559
  * value, and it exists only on a device bound to a provider. Each is declared once, with its
@@ -542,21 +571,21 @@ export declare const CAMERA_MEMBERS: {
542
571
  * The refusal REJECTS on the four that answer with a promise, and THROWS on
543
572
  * {@link CAMERA_MEMBERS.recordFragments}, which answers with a handle.
544
573
  */
545
- readonly snapshotStored: import("./members.js").ProvidedMember<"media", (() => Promise<Buffer<ArrayBufferLike>>) | undefined>;
546
- readonly snapshotLive: import("./members.js").ProvidedMember<"media", (opts?: Parameters<MediaProvider["snapshotLive"]>[0]) => Promise<{
574
+ readonly snapshotStored: import("./members.js").ProvidedMember<"media", false | (() => Promise<Buffer<ArrayBufferLike>>) | undefined>;
575
+ readonly snapshotLive: import("./members.js").ProvidedMember<"media", false | ((opts?: Parameters<MediaProvider["snapshotLive"]>[0]) => Promise<{
547
576
  jpeg: Buffer;
548
577
  width: number;
549
578
  height: number;
550
579
  retained?: true;
551
- }>>;
580
+ }>)>;
552
581
  readonly live: import("./members.js").ProvidedMember<"media", (opts?: Parameters<MediaProvider["live"]>[0]) => Promise<import("../../core/contracts.js").LiveStreamConsumer>>;
553
- readonly record: import("./members.js").ProvidedMember<"media", (seconds: number, opts?: {
582
+ readonly record: import("./members.js").ProvidedMember<"media", false | ((seconds: number, opts?: {
554
583
  timeoutMs?: number;
555
584
  skipKeyframes?: number;
556
- } | undefined) => Promise<Buffer<ArrayBufferLike>>>;
557
- readonly openReadable: import("./members.js").ProvidedMember<"media", ((opts?: Parameters<NonNullable<MediaProvider["openReadable"]>>[0]) => Promise<import("node:stream").Readable>) | undefined>;
558
- readonly recordFragments: import("./members.js").ProvidedMember<"media", ((opts?: Parameters<NonNullable<MediaProvider["recordFragments"]>>[0]) => import("../../core/contracts.js").FragmentRecordingHandle) | undefined>;
559
- readonly downloadRecording: import("./members.js").ProvidedMember<"media", ((opts: Parameters<NonNullable<MediaProvider["downloadRecording"]>>[0]) => Promise<import("../../core/contracts.js").RecordingDownload>) | undefined>;
585
+ } | undefined) => Promise<Buffer<ArrayBufferLike>>)>;
586
+ readonly openReadable: import("./members.js").ProvidedMember<"media", false | ((opts?: Parameters<NonNullable<MediaProvider["openReadable"]>>[0]) => Promise<import("node:stream").Readable>) | undefined>;
587
+ readonly recordFragments: import("./members.js").ProvidedMember<"media", false | ((opts?: Parameters<NonNullable<MediaProvider["recordFragments"]>>[0]) => import("../../core/contracts.js").FragmentRecordingHandle) | undefined>;
588
+ readonly downloadRecording: import("./members.js").ProvidedMember<"media", false | ((opts: Parameters<NonNullable<MediaProvider["downloadRecording"]>>[0]) => Promise<import("../../core/contracts.js").RecordingDownload>) | undefined>;
560
589
  /**
561
590
  * Push audio from the host to this camera's speaker. Gated on the **speaker** param specifically —
562
591
  * not the `audio` capability, which resolves on a microphone alone and would advertise a speaker the
@@ -15,10 +15,11 @@
15
15
  /** The parsed DP capability catalog for one product SKU. */
16
16
  export interface DpCatalog {
17
17
  /**
18
- * For enum-type DPs: the valid integer values as declared in the catalog.
19
- * Absent for non-enum DPs (bool, raw, integer, string).
18
+ * For enum-type DPs: the range members exactly as the catalog lists them, as strings — value names
19
+ * (`"Quiet"`) or numeric strings (`"0"`), whichever the SKU's catalog uses. What a member means is
20
+ * the reading capability's to decide. Absent for non-enum DPs (bool, raw, integer, string).
20
21
  */
21
- readonly enumRanges: ReadonlyMap<number, readonly number[]>;
22
+ readonly enumRanges: ReadonlyMap<number, readonly string[]>;
22
23
  }
23
24
  /** Returned whenever the API call fails or the response shape is not recognised. */
24
25
  export declare const EMPTY_DP_CATALOG: DpCatalog;
@@ -42,8 +42,11 @@ import type { VacuumCleanActions } from "./vacuum-clean.js";
42
42
  import type { VacuumDockActions } from "./vacuum-dock.js";
43
43
  import type { DisplayActions } from "./display.js";
44
44
  import type { SuctionActions } from "./suction.js";
45
+ import type { MowerActions } from "./mower.js";
45
46
  import type { LocateActions } from "./locate.js";
47
+ import type { SmartDropActions } from "./smart-drop.js";
46
48
  import type { DeviceInfo } from "./info.js";
49
+ import type { CusPushAlarmType } from "../push-events.js";
47
50
  /**
48
51
  * Look up the {@link CapabilityModule} for a capability, or `undefined` if none is registered.
49
52
  * @internal
@@ -296,9 +299,13 @@ export interface DeviceEventMap {
296
299
  * can be known about a value nothing pushes.
297
300
  */
298
301
  cameraEnabledChanged: PushSemanticEvent;
299
- /** Station alarm lifecycle; `phase` says whether it fired or is counting down. */
302
+ /**
303
+ * Station alarm lifecycle; `phase` says whether it fired, is counting down, or was stopped. `type` is
304
+ * the push's alarm source or stop reason, absent when the push carried none.
305
+ */
300
306
  alarm: PushSemanticEvent & {
301
- phase?: "triggered" | "delayed";
307
+ phase?: "triggered" | "delayed" | "stopped";
308
+ type?: CusPushAlarmType;
302
309
  };
303
310
  /** Lock (un)locked or a lock alarm fired. */
304
311
  lockState: PushSemanticEvent;
@@ -421,8 +428,12 @@ export interface DeviceActionMap {
421
428
  vacuumDock: VacuumDockActions;
422
429
  /** RoboVac suction: `level`, `boostIq`, `supportedLevels`; `setSuctionLevel`, `setBoostIq`. */
423
430
  suction: SuctionActions;
431
+ /** Robot mower (read-only): `battery`, `cutHeight`, `network`, `wifiSignal`, wear timers and settings. No write is captured. */
432
+ mower: MowerActions;
424
433
  /** RoboVac locate (find-robot beep): `locating`; `locate(on?)`. */
425
434
  locate: LocateActions;
435
+ /** SmartDrop parcel box: `openLid()`. */
436
+ smartDrop: SmartDropActions;
426
437
  /** Smart Display (read-only): `battery`. No display write is captured. */
427
438
  display: DisplayActions;
428
439
  /** Identity metadata (read-only): `{ manufacturer, model, serialNumber, name, deviceType?, firmwareVersion?, hardwareVersion? }`. */
@@ -516,7 +527,7 @@ export type { ActionSpec } from "./types.js";
516
527
  * `undefined` for an action nothing describes.
517
528
  */
518
529
  export { actionSpecOf } from "./access.js";
519
- export type { PtzActions, LightActions, SmartLightActions, RgbColor, CameraActions, LockActions, SirenActions, ArmingActions, BatteryActions, MotionActions, ContactActions, LeakActions, SmokeActions, CoActions, KeypadActions, RtspActions, VacuumCleanActions, SuctionActions, LocateActions, };
530
+ export type { PtzActions, LightActions, SmartLightActions, RgbColor, CameraActions, LockActions, SirenActions, ArmingActions, BatteryActions, MotionActions, ContactActions, LeakActions, SmokeActions, CoActions, KeypadActions, RtspActions, VacuumCleanActions, SuctionActions, MowerActions, LocateActions, SmartDropActions, };
520
531
  /**
521
532
  * The member table each `*Actions` type is DERIVED from (`LockActions = Surface<typeof LOCK_MEMBERS>`),
522
533
  * so the type names the table and the table is part of the published surface.
@@ -541,10 +552,12 @@ export { MOTION_MEMBERS } from "./motion.js";
541
552
  export { PTZ_MEMBERS } from "./ptz.js";
542
553
  export { RTSP_MEMBERS } from "./rtsp.js";
543
554
  export { SIREN_MEMBERS } from "./siren.js";
555
+ export { SMART_DROP_MEMBERS } from "./smart-drop.js";
544
556
  export { SMART_LIGHT_MEMBERS } from "./smart-light.js";
545
557
  export { SMOKE_MEMBERS } from "./smoke.js";
546
558
  export { DISPLAY_MEMBERS, type DisplayActions } from "./display.js";
547
559
  export { SUCTION_MEMBERS } from "./suction.js";
560
+ export { MOWER_MEMBERS } from "./mower.js";
548
561
  export { VACUUM_CLEAN_MEMBERS } from "./vacuum-clean.js";
549
562
  export type { DeviceInfo } from "./info.js";
550
563
  export type { AutoSpotlightOptions } from "./light.js";
@@ -160,6 +160,9 @@ export declare const LIGHT_MEMBERS: {
160
160
  * This is the switch a user changes and expects to STAY changed. {@link isOn} is a different fact:
161
161
  * the lamp being lit right now, driven by whichever
162
162
  * client is streaming — the vendor app lights it for a live view and drops it on quitting.
163
+ *
164
+ * The T8423 write takes the session-chosen level; level-1 int+string was verified live on a standalone
165
+ * unit.
163
166
  */
164
167
  readonly spotlightEnabled: {
165
168
  readonly param: 1403;
@@ -1,6 +1,6 @@
1
1
  import { type Surface } from "./members.js";
2
2
  import type { AvailabilityContext, CapabilityModule, CommandContext } from "./types.js";
3
- import type { Command, AutoLockSnapshot } from "../../core/contracts.js";
3
+ import type { Command, AutoLockSnapshot, MediaProvider } from "../../core/contracts.js";
4
4
  /**
5
5
  * Setting-id selectors for the compact `ff09-setting-toggle` write — this capability's OWN wire
6
6
  * vocabulary, named not inlined per the capability wire-id convention, so `setRainMode`
@@ -107,10 +107,14 @@ export declare const LOCK_MEMBERS: {
107
107
  readonly provenance: "verified";
108
108
  readonly description: "Lock signal strength (verified: param 1141 = RSSI).";
109
109
  };
110
- /** Lock the deadbolt/door. Fire-and-forget — rejects only on missing member identity, never on a device timeout. */
111
- readonly lock: import("./members.js").MethodMember<() => Promise<void>>;
112
- /** Unlock the deadbolt/door. Fire-and-forget — rejects only on missing member identity. */
113
- readonly unlock: import("./members.js").MethodMember<() => Promise<void>>;
110
+ /** Lock the deadbolt/door. Resolves after sending; does not confirm physical state. */
111
+ readonly lock: import("./members.js").MethodMember<() => Promise<void>> & {
112
+ available: (ctx: CommandContext) => boolean;
113
+ };
114
+ /** Unlock the deadbolt/door. Resolves after sending; does not confirm physical state. */
115
+ readonly unlock: import("./members.js").MethodMember<() => Promise<void>> & {
116
+ available: (ctx: CommandContext) => boolean;
117
+ };
114
118
  /**
115
119
  * Read-modify-write the auto-lock setting: the transport GETs the device's current settings, changes
116
120
  * only `enabled` (+ `delaySeconds` if given — otherwise the current delay is preserved), and writes the
@@ -120,7 +124,9 @@ export declare const LOCK_MEMBERS: {
120
124
  * **Unlike `lock`/`unlock` this can reject on a device TIMEOUT**, not just missing identity — the GET
121
125
  * step is a genuine precondition, so this one is not fire-and-forget.
122
126
  */
123
- readonly setAutoLock: import("./members.js").MethodMember<(enabled: boolean, delaySeconds?: number) => Promise<void>>;
127
+ readonly setAutoLock: import("./members.js").MethodMember<(enabled: boolean, delaySeconds?: number) => Promise<void>> & {
128
+ available: (ctx: CommandContext) => boolean;
129
+ };
124
130
  /**
125
131
  * Toggle Rain Mode — a pure blind write, unlike `setAutoLock`: the compact frame carries only this one
126
132
  * field, so there is no GET pass and it is fire-and-forget. Confirmed on-device end-to-end in both
@@ -220,6 +226,14 @@ export declare const LOCK_MEMBERS: {
220
226
  readonly description: "One-touch rear locking (setting-id 11). Wire shape confirmed in the app's own JS, NOT captured.";
221
227
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command;
222
228
  };
229
+ /** Read the current device-reported state; undefined means no settled locked/unlocked state. */
230
+ readonly refreshStatus: {
231
+ readonly needs: "media";
232
+ readonly provided: (provider: MediaProvider, deps: import("./members.js").MemberDeps) => (() => Promise<boolean | undefined>) | undefined;
233
+ readonly description: string;
234
+ readonly requiredCapabilities?: readonly import("../types.js").Capability[];
235
+ readonly answers: true;
236
+ };
223
237
  /**
224
238
  * Read the device's current auto-lock settings via a live `GET_SETTINGS` round-trip — the SAME read
225
239
  * `setAutoLock` does internally, exposed standalone with no write attached. Works over BOTH transports.
@@ -230,7 +244,7 @@ export declare const LOCK_MEMBERS: {
230
244
  */
231
245
  readonly getAutoLockState: {
232
246
  readonly needs: "ff09Settings";
233
- readonly provided: (provider: import("../../core/contracts.js").Ff09SettingsReader, deps: import("./members.js").MemberDeps) => () => Promise<AutoLockSnapshot>;
247
+ readonly provided: (provider: import("../../core/contracts.js").Ff09SettingsReader, deps: import("./members.js").MemberDeps) => (() => Promise<AutoLockSnapshot>) | undefined;
234
248
  readonly description: string;
235
249
  readonly requiredCapabilities?: readonly import("../types.js").Capability[];
236
250
  readonly answers: true;
@@ -182,6 +182,11 @@ export interface AiDetectFlags {
182
182
  export declare function encodeAiDetectType(flags: AiDetectFlags): number;
183
183
  /** Decode an `ai_detect_type` bitmask → which detection types are on. */
184
184
  export declare function decodeAiDetectType(value: number): AiDetectFlags;
185
+ /**
186
+ * The `ai_detect_type` bitmask from a stored 1298 value: the bare number, or the numeric
187
+ * `ai_detect_type` field of the JSON object form. Answers `undefined` for any other shape.
188
+ */
189
+ declare function decodeAiDetectTypeParam(raw: unknown): number | undefined;
185
190
  /**
186
191
  * Decode a `radar_wd_switch` (2706, loitering) read the way the app does:
187
192
  * `typeof v === "object" ? v.radar_wd_switch : v`. The device may store it as a JSON object
@@ -245,11 +250,15 @@ export declare const MOTION_MEMBERS: {
245
250
  * 1298 holds the detailed AI-type BITMASK (live-observed: `0x30000` enabled-base | type bits, e.g. a
246
251
  * T8425 reads `0x3000f`). Cams also report 1299 (`hbAiDetectType`) but that is a separate, simpler
247
252
  * value (1) — NOT this bitmask, so 1298 is the read/write id.
253
+ *
254
+ * The value arrives in two shapes, both read by the app's 1298 parser: a bare bitmask, or a JSON
255
+ * object carrying the same bitmask as `ai_detect_type` (see {@link decodeAiDetectTypeParam}).
248
256
  */
249
257
  readonly aiDetectType: {
250
258
  readonly param: 1298;
251
- readonly type: "number";
252
- readonly kind: "bitfield";
259
+ readonly type: "string";
260
+ readonly decode: typeof decodeAiDetectTypeParam;
261
+ readonly decodedKind: "bitfield";
253
262
  readonly provenance: "verified";
254
263
  readonly description: string;
255
264
  readonly write: (v: string | number | boolean, ctx: CommandContext) => Command | undefined;
@@ -271,6 +280,10 @@ export declare const MOTION_MEMBERS: {
271
280
  * The raw sensitivity an indoor camera reports, on the one id whose write takes a `1700` control
272
281
  * payload carrying an index rather than the `1350` envelope its siblings use — a frame-shape
273
282
  * difference `sensitivityCommand` resolves from the scale. `unexposed` like its three siblings.
283
+ *
284
+ * Some devices report 6041 as a base64 JSON list of per-sensor entries
285
+ * (`{"list":[{"sensor_id":…,"sensitivity":…}]}`) rather than a scalar. That value is stored verbatim
286
+ * and this getter answers `undefined` for it: only the scalar form is confirmed to be this step.
274
287
  */
275
288
  readonly indoorSensitivity: {
276
289
  readonly param: 6041;
@@ -279,6 +292,7 @@ export declare const MOTION_MEMBERS: {
279
292
  readonly provenance: "verified";
280
293
  readonly unexposed: true;
281
294
  readonly description: "Raw sensitivity an indoor camera reports (verified: param 6041).";
295
+ readonly decode: (raw: unknown) => number | undefined;
282
296
  };
283
297
  /**
284
298
  * The raw sensitivity on the INVERTED seven-step camera scale — a HIGHER number is LESS sensitive, so
@@ -374,3 +388,4 @@ export declare const MOTION_MEMBERS: {
374
388
  };
375
389
  };
376
390
  export declare const MOTION: CapabilityModule;
391
+ export {};