@camstack/addon-smtp-nodemailer 1.2.78 → 1.2.79

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.
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
36
  }) : target, mod));
37
37
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
  //#endregion
39
- //#region ../types/dist/event-category-zAv7pMUz.mjs
39
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
40
40
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
41
41
  EventCategory["SystemBoot"] = "system.boot";
42
42
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -231,6 +231,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
231
231
  EventCategory["ProcessCrashed"] = "process.crashed";
232
232
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
233
233
  EventCategory["ProcessRestarted"] = "process.restarted";
234
+ /**
235
+ * The SET of storage locations changed — one was created, edited, enabled,
236
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
237
+ *
238
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
239
+ * it must also converge on its own periodic path, because a dropped event
240
+ * must not leave a node writing to yesterday's disk set forever. It exists
241
+ * because there was NO signal at all — an operator who added a second
242
+ * recordings disk in the admin UI got nothing, and the recorder kept its
243
+ * resolved locations until something else happened to re-resolve them
244
+ * (D387). Payload `StorageLocationsChangedPayload`.
245
+ */
246
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
234
247
  EventCategory["RecordingStarted"] = "recording.started";
235
248
  EventCategory["RecordingStopped"] = "recording.stopped";
236
249
  EventCategory["RecordingError"] = "recording.error";
@@ -8557,6 +8570,21 @@ var StorageCleanupJobSchema = object({
8557
8570
  });
8558
8571
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8559
8572
  /**
8573
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8574
+ * alias below is `z.infer<>` of it, never a second spelling.
8575
+ */
8576
+ var StorageLocationModeSchema = _enum([
8577
+ "active",
8578
+ "readonly",
8579
+ "drain",
8580
+ "disabled"
8581
+ ]);
8582
+ _enum([
8583
+ "normal",
8584
+ "never",
8585
+ "drain"
8586
+ ]);
8587
+ /**
8560
8588
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8561
8589
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8562
8590
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8622,6 +8650,21 @@ var StorageLocationSchema = object({
8622
8650
  * stops existing rather than being re-derived on every read.
8623
8651
  */
8624
8652
  enabled: boolean().optional(),
8653
+ /**
8654
+ * THE state of this location (D385), and the only authority on what may be
8655
+ * written, read or evicted here. Interpreted in exactly one place —
8656
+ * `storage-location-mode.ts` — which also folds the legacy
8657
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8658
+ * ambiguous.
8659
+ *
8660
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8661
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8662
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8663
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8664
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8665
+ * either, so the two cannot disagree.
8666
+ */
8667
+ mode: StorageLocationModeSchema.optional(),
8625
8668
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8626
8669
  * for node-local locations it can reach) — never persisted, absent when the
8627
8670
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8629,11 +8672,46 @@ var StorageLocationSchema = object({
8629
8672
  totalBytes: number(),
8630
8673
  availableBytes: number()
8631
8674
  }).nullable().optional(),
8675
+ /**
8676
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8677
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8678
+ * never persisted, never a filesystem walk.
8679
+ *
8680
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8681
+ * location yet — nobody stores here, the owning addon is down, or the first
8682
+ * refresh has not completed. A UI must omit the segment rather than draw it
8683
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8684
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8685
+ * be spelled out loud instead of appearing by accident.
8686
+ *
8687
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8688
+ * about the whole figure rather than about its freshest part.
8689
+ */
8690
+ owned: object({
8691
+ bytes: number().int().nonnegative(),
8692
+ measuredAtMs: number().int().nonnegative()
8693
+ }).optional(),
8632
8694
  createdAt: number(),
8633
8695
  updatedAt: number()
8634
8696
  });
8635
8697
  object({ isDefault: boolean().optional() });
8636
8698
  /**
8699
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8700
+ *
8701
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8702
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8703
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8704
+ * operator learns not to believe the screen.
8705
+ */
8706
+ var StorageDrainProgressSchema = object({
8707
+ locationId: string(),
8708
+ startedAtMs: number(),
8709
+ startBytes: number(),
8710
+ bytesRemaining: number(),
8711
+ drained: boolean(),
8712
+ estimatedEmptyAtMs: number().nullable()
8713
+ });
8714
+ /**
8637
8715
  * Reference accepted by consumer-facing `api.storage.*` calls.
8638
8716
  * Either:
8639
8717
  * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
@@ -21607,7 +21685,7 @@ method(object({
21607
21685
  }), _void(), {
21608
21686
  kind: "mutation",
21609
21687
  auth: "admin"
21610
- }), method(object({ id: string() }), object({
21688
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21611
21689
  ok: boolean(),
21612
21690
  error: string().optional()
21613
21691
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21677,6 +21755,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21677
21755
  kind: "mutation",
21678
21756
  auth: "admin"
21679
21757
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21758
+ /**
21759
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
21760
+ * location (D388).
21761
+ *
21762
+ * ## Why this is not `storage-evictable`
21763
+ *
21764
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
21765
+ * not, in two ways that both matter and both bite hardest on the locations an
21766
+ * operator most wants a figure for:
21767
+ *
21768
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
21769
+ * and `recordingsLow:default` deliberately share one root and evict as one
21770
+ * oldest-first pool, so both answer with the SAME combined total. As an
21771
+ * occupancy figure that double-counts the disk.
21772
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
21773
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
21774
+ * is retiring and staring at.
21775
+ *
21776
+ * So this is its own contract with its own quantity, and the quantity is
21777
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
21778
+ * would ever be willing to delete it. A provider that can only answer
21779
+ * "evictable" must not register here — a number that silently means different
21780
+ * things per class is worse than no number.
21781
+ *
21782
+ * ## Absence is an answer
21783
+ *
21784
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
21785
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
21786
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
21787
+ * consuming side has to be written out loud instead of appearing by accident.
21788
+ *
21789
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
21790
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
21791
+ */
21792
+ /** One provider's occupancy answer for one location. */
21793
+ var StorageOccupancyReportSchema = object({
21794
+ locationId: string(),
21795
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
21796
+ * not net of what it is willing to delete. */
21797
+ ownedBytes: number().int().nonnegative(),
21798
+ /** When the provider last actually measured this. The orchestrator carries it
21799
+ * through so a UI can say how old the figure is instead of implying "now". */
21800
+ measuredAtMs: number().int().nonnegative()
21801
+ });
21802
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21680
21803
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21681
21804
  providerId: string().min(1),
21682
21805
  displayName: string().min(1),
@@ -23312,39 +23435,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23312
23435
  deviceId: number(),
23313
23436
  status: BatteryStatusSchema
23314
23437
  });
23315
- /**
23316
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23317
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23318
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23319
- * one Home Assistant projection.
23320
- */
23321
- var NetworkLinkStatusSchema = object({
23322
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23323
- type: _enum([
23324
- "wifi",
23325
- "ethernet",
23326
- "cellular",
23327
- "unknown"
23328
- ]),
23329
- /**
23330
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23331
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23332
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23333
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23334
- * SKIP a null rather than coerce it.
23335
- */
23336
- signalPercent: number().min(0).max(100).nullable(),
23337
- /** Raw received signal strength in dBm, when the firmware reports one. */
23338
- rssiDbm: number().optional(),
23339
- /** Network name of a wireless link, when the firmware reports it. */
23340
- ssid: string().optional(),
23341
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23342
- lastUpdated: number()
23343
- });
23344
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23345
- deviceId: number(),
23346
- status: NetworkLinkStatusSchema
23347
- });
23348
23438
  object({
23349
23439
  on: boolean(),
23350
23440
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25698,6 +25788,236 @@ DeviceType.Camera, method(object({
25698
25788
  detection: NativeDetectionSchema
25699
25789
  });
25700
25790
  /**
25791
+ * `navigation` — a device-scoped capability that natively expresses the FULL
25792
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
25793
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
25794
+ *
25795
+ * Why a NEW cap rather than overloading `ptz`:
25796
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
25797
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
25798
+ * The two are different physical models: PTZ is absolute-position + presets,
25799
+ * navigation is momentary drive nudges + discrete robot ACTIONS
25800
+ * (dock / spot-clean / follow-pet / go-to-point / …).
25801
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
25802
+ * the reverse:
25803
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
25804
+ * / `getOptions`), and
25805
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
25806
+ * robot camera shows up in the existing PTZ control path without every
25807
+ * PTZ provider learning about robots. The mapping lives in the adapter,
25808
+ * not here (see the addon design note):
25809
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
25810
+ * ptz.stop() → navigation.stop()
25811
+ * ptz.goHome() → navigation.runAction('goHome')
25812
+ * ptz.getPresets() → navigation.listActions() (id→preset)
25813
+ * ptz.goToPreset(id) → navigation.runAction(id)
25814
+ *
25815
+ * ## Continuous drive
25816
+ *
25817
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
25818
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
25819
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
25820
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
25821
+ * coalesce them. The UI owns the cadence.
25822
+ *
25823
+ * ## The action dictionary
25824
+ *
25825
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
25826
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
25827
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
25828
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
25829
+ * vendor-specific list. `kind: 'action'` entries are triggered with
25830
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
25831
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
25832
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
25833
+ *
25834
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
25835
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
25836
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
25837
+ * every device handle. A future nodedreame publish adds a typed
25838
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
25839
+ * provider can then swap the raw calls for the typed methods with no change to
25840
+ * THIS contract.
25841
+ */
25842
+ /**
25843
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
25844
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
25845
+ * halts it.
25846
+ *
25847
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
25848
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
25849
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
25850
+ * vector by it (drivers without proportional drive ignore it).
25851
+ *
25852
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
25853
+ * axis alone; an all-undefined nudge is a no-op.
25854
+ */
25855
+ var NavigationMoveCommandSchema = object({
25856
+ pan: number().min(-1).max(1).optional(),
25857
+ tilt: number().min(-1).max(1).optional(),
25858
+ speed: number().min(0).max(1).optional()
25859
+ });
25860
+ /**
25861
+ * The enumerated discrete actions a navigation-capable robot can perform via
25862
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
25863
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
25864
+ * `playSound` (see the `sound` dictionary entries).
25865
+ */
25866
+ var NavigationActionIdSchema = _enum([
25867
+ "goHome",
25868
+ "locate",
25869
+ "spotClean",
25870
+ "findPet",
25871
+ "personFollow",
25872
+ "stop",
25873
+ "startClean",
25874
+ "pauseClean",
25875
+ "dockWash",
25876
+ "autoEmpty",
25877
+ "flashOn",
25878
+ "flashOff"
25879
+ ]);
25880
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
25881
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
25882
+ /**
25883
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
25884
+ * native panel and the PTZ mimic render as a button.
25885
+ *
25886
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
25887
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
25888
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
25889
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
25890
+ * - `label` — operator-facing English label.
25891
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
25892
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
25893
+ * PTZ render ONLY enabled entries. Data-driven: the provider
25894
+ * flips it from config, never by editing code.
25895
+ */
25896
+ var NavigationActionEntrySchema = object({
25897
+ id: string(),
25898
+ kind: NavigationEntryKindSchema,
25899
+ label: string(),
25900
+ icon: string(),
25901
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
25902
+ soundId: number().int().optional(),
25903
+ /** Per-device feature flag — render this entry only when true. */
25904
+ enabled: boolean()
25905
+ });
25906
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
25907
+ var NavigationPointSchema = object({
25908
+ x: number(),
25909
+ y: number()
25910
+ });
25911
+ /**
25912
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
25913
+ * The cap reports which are enabled so the UI / PTZ render only the controls
25914
+ * that are turned on for THIS device. Data-driven: the provider derives these
25915
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
25916
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
25917
+ * that are not dictionary entries.
25918
+ *
25919
+ * - `move` / `stop` — the momentary drive joystick.
25920
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
25921
+ * map-coordinate plumbing is wired.
25922
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
25923
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
25924
+ * - `light` — the on/off fill-light toggle (works anytime).
25925
+ * - `lightMode` — the auto/manual selector + manual level slider (a
25926
+ * camera-service control; needs an active stream).
25927
+ */
25928
+ var NavigationFeaturesSchema = object({
25929
+ move: boolean(),
25930
+ stop: boolean(),
25931
+ goToPoint: boolean(),
25932
+ runAction: boolean(),
25933
+ playSound: boolean(),
25934
+ light: boolean(),
25935
+ lightMode: boolean()
25936
+ });
25937
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
25938
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
25939
+ /**
25940
+ * Live navigation state so the UI can reflect what the robot is doing:
25941
+ * - `mode` — coarse activity (idle / cleaning / following / …).
25942
+ * - `following` — person/pet follow is currently armed.
25943
+ * - `flash` — the on-camera fill light is on.
25944
+ * - `lightMode` — auto vs manual fill-light mode.
25945
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
25946
+ * `lightMode === 'manual'`.
25947
+ */
25948
+ var NavigationStatusSchema = object({
25949
+ mode: _enum([
25950
+ "idle",
25951
+ "cleaning",
25952
+ "spot",
25953
+ "following",
25954
+ "goto",
25955
+ "returning",
25956
+ "paused",
25957
+ "unknown"
25958
+ ]),
25959
+ following: boolean(),
25960
+ flash: boolean(),
25961
+ lightMode: NavigationLightModeSchema,
25962
+ lightLevel: number().min(40).max(100),
25963
+ /** Ms epoch when the slice was last updated. */
25964
+ lastChangedAt: number()
25965
+ });
25966
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
25967
+ DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(NavigationActionEntrySchema)), method(object({
25968
+ deviceId: number(),
25969
+ actionId: NavigationActionIdSchema
25970
+ }), _void(), { kind: "mutation" }), method(object({
25971
+ deviceId: number(),
25972
+ soundId: number().int()
25973
+ }), _void(), { kind: "mutation" }), method(object({
25974
+ deviceId: number(),
25975
+ on: boolean()
25976
+ }), _void(), { kind: "mutation" }), method(object({
25977
+ deviceId: number(),
25978
+ mode: NavigationLightModeSchema,
25979
+ level: number().min(40).max(100).optional()
25980
+ }), _void(), { kind: "mutation" }), method(object({
25981
+ deviceId: number(),
25982
+ level: number().min(40).max(100)
25983
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
25984
+ deviceId: number(),
25985
+ status: NavigationStatusSchema
25986
+ });
25987
+ /**
25988
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
25989
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
25990
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
25991
+ * one Home Assistant projection.
25992
+ */
25993
+ var NetworkLinkStatusSchema = object({
25994
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
25995
+ type: _enum([
25996
+ "wifi",
25997
+ "ethernet",
25998
+ "cellular",
25999
+ "unknown"
26000
+ ]),
26001
+ /**
26002
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26003
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26004
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26005
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26006
+ * SKIP a null rather than coerce it.
26007
+ */
26008
+ signalPercent: number().min(0).max(100).nullable(),
26009
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26010
+ rssiDbm: number().optional(),
26011
+ /** Network name of a wireless link, when the firmware reports it. */
26012
+ ssid: string().optional(),
26013
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26014
+ lastUpdated: number()
26015
+ });
26016
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26017
+ deviceId: number(),
26018
+ status: NetworkLinkStatusSchema
26019
+ });
26020
+ /**
25701
26021
  * network-quality — system-scoped singleton capability tracking RTT,
25702
26022
  * jitter, and observed/peak bandwidth per device + per client.
25703
26023
  *
@@ -26939,203 +27259,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
26939
27259
  deviceId: number(),
26940
27260
  status: PtzAutotrackStatusSchema
26941
27261
  });
26942
- /**
26943
- * `navigation` — a device-scoped capability that natively expresses the FULL
26944
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
26945
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
26946
- *
26947
- * Why a NEW cap rather than overloading `ptz`:
26948
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26949
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26950
- * The two are different physical models: PTZ is absolute-position + presets,
26951
- * navigation is momentary drive nudges + discrete robot ACTIONS
26952
- * (dock / spot-clean / follow-pet / go-to-point / …).
26953
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26954
- * the reverse:
26955
- * 1. a native CamStack navigation panel (data-driven from `listActions`
26956
- * / `getOptions`), and
26957
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26958
- * robot camera shows up in the existing PTZ control path without every
26959
- * PTZ provider learning about robots. The mapping lives in the adapter,
26960
- * not here (see the addon design note):
26961
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26962
- * ptz.stop() → navigation.stop()
26963
- * ptz.goHome() → navigation.runAction('goHome')
26964
- * ptz.getPresets() → navigation.listActions() (id→preset)
26965
- * ptz.goToPreset(id) → navigation.runAction(id)
26966
- *
26967
- * ## Continuous drive
26968
- *
26969
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26970
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26971
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26972
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26973
- * coalesce them. The UI owns the cadence.
26974
- *
26975
- * ## The action dictionary
26976
- *
26977
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26978
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26979
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26980
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26981
- * vendor-specific list. `kind: 'action'` entries are triggered with
26982
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26983
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
26984
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26985
- *
26986
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26987
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26988
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
26989
- * every device handle. A future nodedreame publish adds a typed
26990
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26991
- * provider can then swap the raw calls for the typed methods with no change to
26992
- * THIS contract.
26993
- */
26994
- /**
26995
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26996
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26997
- * halts it.
26998
- *
26999
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27000
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27001
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27002
- * vector by it (drivers without proportional drive ignore it).
27003
- *
27004
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27005
- * axis alone; an all-undefined nudge is a no-op.
27006
- */
27007
- var NavigationMoveCommandSchema = object({
27008
- pan: number().min(-1).max(1).optional(),
27009
- tilt: number().min(-1).max(1).optional(),
27010
- speed: number().min(0).max(1).optional()
27011
- });
27012
- /**
27013
- * The enumerated discrete actions a navigation-capable robot can perform via
27014
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27015
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27016
- * `playSound` (see the `sound` dictionary entries).
27017
- */
27018
- var NavigationActionIdSchema = _enum([
27019
- "goHome",
27020
- "locate",
27021
- "spotClean",
27022
- "findPet",
27023
- "personFollow",
27024
- "stop",
27025
- "startClean",
27026
- "pauseClean",
27027
- "dockWash",
27028
- "autoEmpty",
27029
- "flashOn",
27030
- "flashOff"
27031
- ]);
27032
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27033
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27034
- /**
27035
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27036
- * native panel and the PTZ mimic render as a button.
27037
- *
27038
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27039
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27040
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27041
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27042
- * - `label` — operator-facing English label.
27043
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27044
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27045
- * PTZ render ONLY enabled entries. Data-driven: the provider
27046
- * flips it from config, never by editing code.
27047
- */
27048
- var NavigationActionEntrySchema = object({
27049
- id: string(),
27050
- kind: NavigationEntryKindSchema,
27051
- label: string(),
27052
- icon: string(),
27053
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27054
- soundId: number().int().optional(),
27055
- /** Per-device feature flag — render this entry only when true. */
27056
- enabled: boolean()
27057
- });
27058
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27059
- var NavigationPointSchema = object({
27060
- x: number(),
27061
- y: number()
27062
- });
27063
- /**
27064
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27065
- * The cap reports which are enabled so the UI / PTZ render only the controls
27066
- * that are turned on for THIS device. Data-driven: the provider derives these
27067
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27068
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27069
- * that are not dictionary entries.
27070
- *
27071
- * - `move` / `stop` — the momentary drive joystick.
27072
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27073
- * map-coordinate plumbing is wired.
27074
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27075
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27076
- * - `light` — the on/off fill-light toggle (works anytime).
27077
- * - `lightMode` — the auto/manual selector + manual level slider (a
27078
- * camera-service control; needs an active stream).
27079
- */
27080
- var NavigationFeaturesSchema = object({
27081
- move: boolean(),
27082
- stop: boolean(),
27083
- goToPoint: boolean(),
27084
- runAction: boolean(),
27085
- playSound: boolean(),
27086
- light: boolean(),
27087
- lightMode: boolean()
27088
- });
27089
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27090
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27091
- /**
27092
- * Live navigation state so the UI can reflect what the robot is doing:
27093
- * - `mode` — coarse activity (idle / cleaning / following / …).
27094
- * - `following` — person/pet follow is currently armed.
27095
- * - `flash` — the on-camera fill light is on.
27096
- * - `lightMode` — auto vs manual fill-light mode.
27097
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27098
- * `lightMode === 'manual'`.
27099
- */
27100
- var NavigationStatusSchema = object({
27101
- mode: _enum([
27102
- "idle",
27103
- "cleaning",
27104
- "spot",
27105
- "following",
27106
- "goto",
27107
- "returning",
27108
- "paused",
27109
- "unknown"
27110
- ]),
27111
- following: boolean(),
27112
- flash: boolean(),
27113
- lightMode: NavigationLightModeSchema,
27114
- lightLevel: number().min(40).max(100),
27115
- /** Ms epoch when the slice was last updated. */
27116
- lastChangedAt: number()
27117
- });
27118
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27119
- DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(NavigationActionEntrySchema)), method(object({
27120
- deviceId: number(),
27121
- actionId: NavigationActionIdSchema
27122
- }), _void(), { kind: "mutation" }), method(object({
27123
- deviceId: number(),
27124
- soundId: number().int()
27125
- }), _void(), { kind: "mutation" }), method(object({
27126
- deviceId: number(),
27127
- on: boolean()
27128
- }), _void(), { kind: "mutation" }), method(object({
27129
- deviceId: number(),
27130
- mode: NavigationLightModeSchema,
27131
- level: number().min(40).max(100).optional()
27132
- }), _void(), { kind: "mutation" }), method(object({
27133
- deviceId: number(),
27134
- level: number().min(40).max(100)
27135
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27136
- deviceId: number(),
27137
- status: NavigationStatusSchema
27138
- });
27139
27262
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27140
27263
  kind: "mutation",
27141
27264
  auth: "admin"
@@ -34450,6 +34573,12 @@ Object.freeze({
34450
34573
  addonId: null,
34451
34574
  access: "view"
34452
34575
  },
34576
+ "storage.listDrainProgress": {
34577
+ capName: "storage",
34578
+ capScope: "system",
34579
+ addonId: null,
34580
+ access: "view"
34581
+ },
34453
34582
  "storage.listLocationDeclarations": {
34454
34583
  capName: "storage",
34455
34584
  capScope: "system",
@@ -34594,6 +34723,12 @@ Object.freeze({
34594
34723
  addonId: null,
34595
34724
  access: "view"
34596
34725
  },
34726
+ "storageOccupancy.getOccupancy": {
34727
+ capName: "storage-occupancy",
34728
+ capScope: "system",
34729
+ addonId: null,
34730
+ access: "view"
34731
+ },
34597
34732
  "storageProvider.abortUpload": {
34598
34733
  capName: "storage-provider",
34599
34734
  capScope: "system",