@camstack/addon-smtp-nodemailer 1.2.78 → 1.2.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.
@@ -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
@@ -20074,8 +20152,25 @@ var occupancyRecheckFramesField = {
20074
20152
  * (analyzer attaches detected `regions[]`; onboard does not — the
20075
20153
  * camera typically only reports a binary signal plus an optional
20076
20154
  * channel/AI class which lives in dedicated event channels).
20077
- */
20078
- var MotionSourceEnum = _enum(["onboard", "analyzer"]);
20155
+ *
20156
+ * - `onboard` — the camera's firmware said something moved.
20157
+ * - `analyzer` — this runner's frame-diff said so, and attaches `regions[]`.
20158
+ * - `device-activity` — the DEVICE said it is doing its job: the
20159
+ * `recording-signal` LEVEL the same device raises for the recorder
20160
+ * ([D380](../../../../docs/decisions/adr-0380-a-device-decided-recording-is-a-mode-with-no-schedule-seeded-once.md)),
20161
+ * republished as a motion source. It attaches **nothing** — no regions, no
20162
+ * class: the only fact it carries is that the device is active, and a robot
20163
+ * vacuum that is itself the moving object has no region worth sending. It is
20164
+ * a LEVEL, so unlike `onboard` it has a real falling edge, and unlike
20165
+ * `analyzer` it must not open the frame-diff side-channel — the runner's
20166
+ * `handleOnboardMotionAnalyzer` gate is `source === 'onboard'` and stays that
20167
+ * way ([D392](../../../../docs/decisions/adr-0392-a-device-that-says-it-is-working-is-a-motion-source-of-its-own.md)).
20168
+ */
20169
+ var MotionSourceEnum = _enum([
20170
+ "onboard",
20171
+ "analyzer",
20172
+ "device-activity"
20173
+ ]);
20079
20174
  /**
20080
20175
  * List of motion sources active on a camera. Empty array is valid:
20081
20176
  * "no source" — happens for battery cams without firmware motion when
@@ -21607,7 +21702,7 @@ method(object({
21607
21702
  }), _void(), {
21608
21703
  kind: "mutation",
21609
21704
  auth: "admin"
21610
- }), method(object({ id: string() }), object({
21705
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21611
21706
  ok: boolean(),
21612
21707
  error: string().optional()
21613
21708
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21677,6 +21772,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21677
21772
  kind: "mutation",
21678
21773
  auth: "admin"
21679
21774
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21775
+ /**
21776
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
21777
+ * location (D388).
21778
+ *
21779
+ * ## Why this is not `storage-evictable`
21780
+ *
21781
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
21782
+ * not, in two ways that both matter and both bite hardest on the locations an
21783
+ * operator most wants a figure for:
21784
+ *
21785
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
21786
+ * and `recordingsLow:default` deliberately share one root and evict as one
21787
+ * oldest-first pool, so both answer with the SAME combined total. As an
21788
+ * occupancy figure that double-counts the disk.
21789
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
21790
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
21791
+ * is retiring and staring at.
21792
+ *
21793
+ * So this is its own contract with its own quantity, and the quantity is
21794
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
21795
+ * would ever be willing to delete it. A provider that can only answer
21796
+ * "evictable" must not register here — a number that silently means different
21797
+ * things per class is worse than no number.
21798
+ *
21799
+ * ## Absence is an answer
21800
+ *
21801
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
21802
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
21803
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
21804
+ * consuming side has to be written out loud instead of appearing by accident.
21805
+ *
21806
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
21807
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
21808
+ */
21809
+ /** One provider's occupancy answer for one location. */
21810
+ var StorageOccupancyReportSchema = object({
21811
+ locationId: string(),
21812
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
21813
+ * not net of what it is willing to delete. */
21814
+ ownedBytes: number().int().nonnegative(),
21815
+ /** When the provider last actually measured this. The orchestrator carries it
21816
+ * through so a UI can say how old the figure is instead of implying "now". */
21817
+ measuredAtMs: number().int().nonnegative()
21818
+ });
21819
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21680
21820
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21681
21821
  providerId: string().min(1),
21682
21822
  displayName: string().min(1),
@@ -23312,39 +23452,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23312
23452
  deviceId: number(),
23313
23453
  status: BatteryStatusSchema
23314
23454
  });
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
23455
  object({
23349
23456
  on: boolean(),
23350
23457
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25698,6 +25805,236 @@ DeviceType.Camera, method(object({
25698
25805
  detection: NativeDetectionSchema
25699
25806
  });
25700
25807
  /**
25808
+ * `navigation` — a device-scoped capability that natively expresses the FULL
25809
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
25810
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
25811
+ *
25812
+ * Why a NEW cap rather than overloading `ptz`:
25813
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
25814
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
25815
+ * The two are different physical models: PTZ is absolute-position + presets,
25816
+ * navigation is momentary drive nudges + discrete robot ACTIONS
25817
+ * (dock / spot-clean / follow-pet / go-to-point / …).
25818
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
25819
+ * the reverse:
25820
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
25821
+ * / `getOptions`), and
25822
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
25823
+ * robot camera shows up in the existing PTZ control path without every
25824
+ * PTZ provider learning about robots. The mapping lives in the adapter,
25825
+ * not here (see the addon design note):
25826
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
25827
+ * ptz.stop() → navigation.stop()
25828
+ * ptz.goHome() → navigation.runAction('goHome')
25829
+ * ptz.getPresets() → navigation.listActions() (id→preset)
25830
+ * ptz.goToPreset(id) → navigation.runAction(id)
25831
+ *
25832
+ * ## Continuous drive
25833
+ *
25834
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
25835
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
25836
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
25837
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
25838
+ * coalesce them. The UI owns the cadence.
25839
+ *
25840
+ * ## The action dictionary
25841
+ *
25842
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
25843
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
25844
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
25845
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
25846
+ * vendor-specific list. `kind: 'action'` entries are triggered with
25847
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
25848
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
25849
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
25850
+ *
25851
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
25852
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
25853
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
25854
+ * every device handle. A future nodedreame publish adds a typed
25855
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
25856
+ * provider can then swap the raw calls for the typed methods with no change to
25857
+ * THIS contract.
25858
+ */
25859
+ /**
25860
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
25861
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
25862
+ * halts it.
25863
+ *
25864
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
25865
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
25866
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
25867
+ * vector by it (drivers without proportional drive ignore it).
25868
+ *
25869
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
25870
+ * axis alone; an all-undefined nudge is a no-op.
25871
+ */
25872
+ var NavigationMoveCommandSchema = object({
25873
+ pan: number().min(-1).max(1).optional(),
25874
+ tilt: number().min(-1).max(1).optional(),
25875
+ speed: number().min(0).max(1).optional()
25876
+ });
25877
+ /**
25878
+ * The enumerated discrete actions a navigation-capable robot can perform via
25879
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
25880
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
25881
+ * `playSound` (see the `sound` dictionary entries).
25882
+ */
25883
+ var NavigationActionIdSchema = _enum([
25884
+ "goHome",
25885
+ "locate",
25886
+ "spotClean",
25887
+ "findPet",
25888
+ "personFollow",
25889
+ "stop",
25890
+ "startClean",
25891
+ "pauseClean",
25892
+ "dockWash",
25893
+ "autoEmpty",
25894
+ "flashOn",
25895
+ "flashOff"
25896
+ ]);
25897
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
25898
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
25899
+ /**
25900
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
25901
+ * native panel and the PTZ mimic render as a button.
25902
+ *
25903
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
25904
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
25905
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
25906
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
25907
+ * - `label` — operator-facing English label.
25908
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
25909
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
25910
+ * PTZ render ONLY enabled entries. Data-driven: the provider
25911
+ * flips it from config, never by editing code.
25912
+ */
25913
+ var NavigationActionEntrySchema = object({
25914
+ id: string(),
25915
+ kind: NavigationEntryKindSchema,
25916
+ label: string(),
25917
+ icon: string(),
25918
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
25919
+ soundId: number().int().optional(),
25920
+ /** Per-device feature flag — render this entry only when true. */
25921
+ enabled: boolean()
25922
+ });
25923
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
25924
+ var NavigationPointSchema = object({
25925
+ x: number(),
25926
+ y: number()
25927
+ });
25928
+ /**
25929
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
25930
+ * The cap reports which are enabled so the UI / PTZ render only the controls
25931
+ * that are turned on for THIS device. Data-driven: the provider derives these
25932
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
25933
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
25934
+ * that are not dictionary entries.
25935
+ *
25936
+ * - `move` / `stop` — the momentary drive joystick.
25937
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
25938
+ * map-coordinate plumbing is wired.
25939
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
25940
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
25941
+ * - `light` — the on/off fill-light toggle (works anytime).
25942
+ * - `lightMode` — the auto/manual selector + manual level slider (a
25943
+ * camera-service control; needs an active stream).
25944
+ */
25945
+ var NavigationFeaturesSchema = object({
25946
+ move: boolean(),
25947
+ stop: boolean(),
25948
+ goToPoint: boolean(),
25949
+ runAction: boolean(),
25950
+ playSound: boolean(),
25951
+ light: boolean(),
25952
+ lightMode: boolean()
25953
+ });
25954
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
25955
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
25956
+ /**
25957
+ * Live navigation state so the UI can reflect what the robot is doing:
25958
+ * - `mode` — coarse activity (idle / cleaning / following / …).
25959
+ * - `following` — person/pet follow is currently armed.
25960
+ * - `flash` — the on-camera fill light is on.
25961
+ * - `lightMode` — auto vs manual fill-light mode.
25962
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
25963
+ * `lightMode === 'manual'`.
25964
+ */
25965
+ var NavigationStatusSchema = object({
25966
+ mode: _enum([
25967
+ "idle",
25968
+ "cleaning",
25969
+ "spot",
25970
+ "following",
25971
+ "goto",
25972
+ "returning",
25973
+ "paused",
25974
+ "unknown"
25975
+ ]),
25976
+ following: boolean(),
25977
+ flash: boolean(),
25978
+ lightMode: NavigationLightModeSchema,
25979
+ lightLevel: number().min(40).max(100),
25980
+ /** Ms epoch when the slice was last updated. */
25981
+ lastChangedAt: number()
25982
+ });
25983
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
25984
+ 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({
25985
+ deviceId: number(),
25986
+ actionId: NavigationActionIdSchema
25987
+ }), _void(), { kind: "mutation" }), method(object({
25988
+ deviceId: number(),
25989
+ soundId: number().int()
25990
+ }), _void(), { kind: "mutation" }), method(object({
25991
+ deviceId: number(),
25992
+ on: boolean()
25993
+ }), _void(), { kind: "mutation" }), method(object({
25994
+ deviceId: number(),
25995
+ mode: NavigationLightModeSchema,
25996
+ level: number().min(40).max(100).optional()
25997
+ }), _void(), { kind: "mutation" }), method(object({
25998
+ deviceId: number(),
25999
+ level: number().min(40).max(100)
26000
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26001
+ deviceId: number(),
26002
+ status: NavigationStatusSchema
26003
+ });
26004
+ /**
26005
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26006
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26007
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26008
+ * one Home Assistant projection.
26009
+ */
26010
+ var NetworkLinkStatusSchema = object({
26011
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26012
+ type: _enum([
26013
+ "wifi",
26014
+ "ethernet",
26015
+ "cellular",
26016
+ "unknown"
26017
+ ]),
26018
+ /**
26019
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26020
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26021
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26022
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26023
+ * SKIP a null rather than coerce it.
26024
+ */
26025
+ signalPercent: number().min(0).max(100).nullable(),
26026
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26027
+ rssiDbm: number().optional(),
26028
+ /** Network name of a wireless link, when the firmware reports it. */
26029
+ ssid: string().optional(),
26030
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26031
+ lastUpdated: number()
26032
+ });
26033
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26034
+ deviceId: number(),
26035
+ status: NetworkLinkStatusSchema
26036
+ });
26037
+ /**
25701
26038
  * network-quality — system-scoped singleton capability tracking RTT,
25702
26039
  * jitter, and observed/peak bandwidth per device + per client.
25703
26040
  *
@@ -26939,203 +27276,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
26939
27276
  deviceId: number(),
26940
27277
  status: PtzAutotrackStatusSchema
26941
27278
  });
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
27279
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27140
27280
  kind: "mutation",
27141
27281
  auth: "admin"
@@ -34450,6 +34590,12 @@ Object.freeze({
34450
34590
  addonId: null,
34451
34591
  access: "view"
34452
34592
  },
34593
+ "storage.listDrainProgress": {
34594
+ capName: "storage",
34595
+ capScope: "system",
34596
+ addonId: null,
34597
+ access: "view"
34598
+ },
34453
34599
  "storage.listLocationDeclarations": {
34454
34600
  capName: "storage",
34455
34601
  capScope: "system",
@@ -34594,6 +34740,12 @@ Object.freeze({
34594
34740
  addonId: null,
34595
34741
  access: "view"
34596
34742
  },
34743
+ "storageOccupancy.getOccupancy": {
34744
+ capName: "storage-occupancy",
34745
+ capScope: "system",
34746
+ addonId: null,
34747
+ access: "view"
34748
+ },
34597
34749
  "storageProvider.abortUpload": {
34598
34750
  capName: "storage-provider",
34599
34751
  capScope: "system",