@camstack/addon-tailscale 1.2.79 → 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.
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-zAv7pMUz.mjs
1
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -193,6 +193,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
193
193
  EventCategory["ProcessCrashed"] = "process.crashed";
194
194
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
195
195
  EventCategory["ProcessRestarted"] = "process.restarted";
196
+ /**
197
+ * The SET of storage locations changed — one was created, edited, enabled,
198
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
199
+ *
200
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
201
+ * it must also converge on its own periodic path, because a dropped event
202
+ * must not leave a node writing to yesterday's disk set forever. It exists
203
+ * because there was NO signal at all — an operator who added a second
204
+ * recordings disk in the admin UI got nothing, and the recorder kept its
205
+ * resolved locations until something else happened to re-resolve them
206
+ * (D387). Payload `StorageLocationsChangedPayload`.
207
+ */
208
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
196
209
  EventCategory["RecordingStarted"] = "recording.started";
197
210
  EventCategory["RecordingStopped"] = "recording.stopped";
198
211
  EventCategory["RecordingError"] = "recording.error";
@@ -8553,6 +8566,21 @@ var StorageCleanupJobSchema = object({
8553
8566
  });
8554
8567
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8555
8568
  /**
8569
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8570
+ * alias below is `z.infer<>` of it, never a second spelling.
8571
+ */
8572
+ var StorageLocationModeSchema = _enum([
8573
+ "active",
8574
+ "readonly",
8575
+ "drain",
8576
+ "disabled"
8577
+ ]);
8578
+ _enum([
8579
+ "normal",
8580
+ "never",
8581
+ "drain"
8582
+ ]);
8583
+ /**
8556
8584
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8557
8585
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8558
8586
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8618,6 +8646,21 @@ var StorageLocationSchema = object({
8618
8646
  * stops existing rather than being re-derived on every read.
8619
8647
  */
8620
8648
  enabled: boolean().optional(),
8649
+ /**
8650
+ * THE state of this location (D385), and the only authority on what may be
8651
+ * written, read or evicted here. Interpreted in exactly one place —
8652
+ * `storage-location-mode.ts` — which also folds the legacy
8653
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8654
+ * ambiguous.
8655
+ *
8656
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8657
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8658
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8659
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8660
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8661
+ * either, so the two cannot disagree.
8662
+ */
8663
+ mode: StorageLocationModeSchema.optional(),
8621
8664
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8622
8665
  * for node-local locations it can reach) — never persisted, absent when the
8623
8666
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8625,11 +8668,46 @@ var StorageLocationSchema = object({
8625
8668
  totalBytes: number(),
8626
8669
  availableBytes: number()
8627
8670
  }).nullable().optional(),
8671
+ /**
8672
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8673
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8674
+ * never persisted, never a filesystem walk.
8675
+ *
8676
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8677
+ * location yet — nobody stores here, the owning addon is down, or the first
8678
+ * refresh has not completed. A UI must omit the segment rather than draw it
8679
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8680
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8681
+ * be spelled out loud instead of appearing by accident.
8682
+ *
8683
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8684
+ * about the whole figure rather than about its freshest part.
8685
+ */
8686
+ owned: object({
8687
+ bytes: number().int().nonnegative(),
8688
+ measuredAtMs: number().int().nonnegative()
8689
+ }).optional(),
8628
8690
  createdAt: number(),
8629
8691
  updatedAt: number()
8630
8692
  });
8631
8693
  object({ isDefault: boolean().optional() });
8632
8694
  /**
8695
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8696
+ *
8697
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8698
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8699
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8700
+ * operator learns not to believe the screen.
8701
+ */
8702
+ var StorageDrainProgressSchema = object({
8703
+ locationId: string(),
8704
+ startedAtMs: number(),
8705
+ startBytes: number(),
8706
+ bytesRemaining: number(),
8707
+ drained: boolean(),
8708
+ estimatedEmptyAtMs: number().nullable()
8709
+ });
8710
+ /**
8633
8711
  * Reference accepted by consumer-facing `api.storage.*` calls.
8634
8712
  * Either:
8635
8713
  * - 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. */
@@ -25759,6 +25849,236 @@ DeviceType.Camera, method(object({
25759
25849
  detection: NativeDetectionSchema
25760
25850
  });
25761
25851
  /**
25852
+ * `navigation` — a device-scoped capability that natively expresses the FULL
25853
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
25854
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
25855
+ *
25856
+ * Why a NEW cap rather than overloading `ptz`:
25857
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
25858
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
25859
+ * The two are different physical models: PTZ is absolute-position + presets,
25860
+ * navigation is momentary drive nudges + discrete robot ACTIONS
25861
+ * (dock / spot-clean / follow-pet / go-to-point / …).
25862
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
25863
+ * the reverse:
25864
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
25865
+ * / `getOptions`), and
25866
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
25867
+ * robot camera shows up in the existing PTZ control path without every
25868
+ * PTZ provider learning about robots. The mapping lives in the adapter,
25869
+ * not here (see the addon design note):
25870
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
25871
+ * ptz.stop() → navigation.stop()
25872
+ * ptz.goHome() → navigation.runAction('goHome')
25873
+ * ptz.getPresets() → navigation.listActions() (id→preset)
25874
+ * ptz.goToPreset(id) → navigation.runAction(id)
25875
+ *
25876
+ * ## Continuous drive
25877
+ *
25878
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
25879
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
25880
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
25881
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
25882
+ * coalesce them. The UI owns the cadence.
25883
+ *
25884
+ * ## The action dictionary
25885
+ *
25886
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
25887
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
25888
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
25889
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
25890
+ * vendor-specific list. `kind: 'action'` entries are triggered with
25891
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
25892
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
25893
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
25894
+ *
25895
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
25896
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
25897
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
25898
+ * every device handle. A future nodedreame publish adds a typed
25899
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
25900
+ * provider can then swap the raw calls for the typed methods with no change to
25901
+ * THIS contract.
25902
+ */
25903
+ /**
25904
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
25905
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
25906
+ * halts it.
25907
+ *
25908
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
25909
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
25910
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
25911
+ * vector by it (drivers without proportional drive ignore it).
25912
+ *
25913
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
25914
+ * axis alone; an all-undefined nudge is a no-op.
25915
+ */
25916
+ var NavigationMoveCommandSchema = object({
25917
+ pan: number().min(-1).max(1).optional(),
25918
+ tilt: number().min(-1).max(1).optional(),
25919
+ speed: number().min(0).max(1).optional()
25920
+ });
25921
+ /**
25922
+ * The enumerated discrete actions a navigation-capable robot can perform via
25923
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
25924
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
25925
+ * `playSound` (see the `sound` dictionary entries).
25926
+ */
25927
+ var NavigationActionIdSchema = _enum([
25928
+ "goHome",
25929
+ "locate",
25930
+ "spotClean",
25931
+ "findPet",
25932
+ "personFollow",
25933
+ "stop",
25934
+ "startClean",
25935
+ "pauseClean",
25936
+ "dockWash",
25937
+ "autoEmpty",
25938
+ "flashOn",
25939
+ "flashOff"
25940
+ ]);
25941
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
25942
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
25943
+ /**
25944
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
25945
+ * native panel and the PTZ mimic render as a button.
25946
+ *
25947
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
25948
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
25949
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
25950
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
25951
+ * - `label` — operator-facing English label.
25952
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
25953
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
25954
+ * PTZ render ONLY enabled entries. Data-driven: the provider
25955
+ * flips it from config, never by editing code.
25956
+ */
25957
+ var NavigationActionEntrySchema = object({
25958
+ id: string(),
25959
+ kind: NavigationEntryKindSchema,
25960
+ label: string(),
25961
+ icon: string(),
25962
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
25963
+ soundId: number().int().optional(),
25964
+ /** Per-device feature flag — render this entry only when true. */
25965
+ enabled: boolean()
25966
+ });
25967
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
25968
+ var NavigationPointSchema = object({
25969
+ x: number(),
25970
+ y: number()
25971
+ });
25972
+ /**
25973
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
25974
+ * The cap reports which are enabled so the UI / PTZ render only the controls
25975
+ * that are turned on for THIS device. Data-driven: the provider derives these
25976
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
25977
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
25978
+ * that are not dictionary entries.
25979
+ *
25980
+ * - `move` / `stop` — the momentary drive joystick.
25981
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
25982
+ * map-coordinate plumbing is wired.
25983
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
25984
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
25985
+ * - `light` — the on/off fill-light toggle (works anytime).
25986
+ * - `lightMode` — the auto/manual selector + manual level slider (a
25987
+ * camera-service control; needs an active stream).
25988
+ */
25989
+ var NavigationFeaturesSchema = object({
25990
+ move: boolean(),
25991
+ stop: boolean(),
25992
+ goToPoint: boolean(),
25993
+ runAction: boolean(),
25994
+ playSound: boolean(),
25995
+ light: boolean(),
25996
+ lightMode: boolean()
25997
+ });
25998
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
25999
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26000
+ /**
26001
+ * Live navigation state so the UI can reflect what the robot is doing:
26002
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26003
+ * - `following` — person/pet follow is currently armed.
26004
+ * - `flash` — the on-camera fill light is on.
26005
+ * - `lightMode` — auto vs manual fill-light mode.
26006
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26007
+ * `lightMode === 'manual'`.
26008
+ */
26009
+ var NavigationStatusSchema = object({
26010
+ mode: _enum([
26011
+ "idle",
26012
+ "cleaning",
26013
+ "spot",
26014
+ "following",
26015
+ "goto",
26016
+ "returning",
26017
+ "paused",
26018
+ "unknown"
26019
+ ]),
26020
+ following: boolean(),
26021
+ flash: boolean(),
26022
+ lightMode: NavigationLightModeSchema,
26023
+ lightLevel: number().min(40).max(100),
26024
+ /** Ms epoch when the slice was last updated. */
26025
+ lastChangedAt: number()
26026
+ });
26027
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26028
+ 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({
26029
+ deviceId: number(),
26030
+ actionId: NavigationActionIdSchema
26031
+ }), _void(), { kind: "mutation" }), method(object({
26032
+ deviceId: number(),
26033
+ soundId: number().int()
26034
+ }), _void(), { kind: "mutation" }), method(object({
26035
+ deviceId: number(),
26036
+ on: boolean()
26037
+ }), _void(), { kind: "mutation" }), method(object({
26038
+ deviceId: number(),
26039
+ mode: NavigationLightModeSchema,
26040
+ level: number().min(40).max(100).optional()
26041
+ }), _void(), { kind: "mutation" }), method(object({
26042
+ deviceId: number(),
26043
+ level: number().min(40).max(100)
26044
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26045
+ deviceId: number(),
26046
+ status: NavigationStatusSchema
26047
+ });
26048
+ /**
26049
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26050
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26051
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26052
+ * one Home Assistant projection.
26053
+ */
26054
+ var NetworkLinkStatusSchema = object({
26055
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26056
+ type: _enum([
26057
+ "wifi",
26058
+ "ethernet",
26059
+ "cellular",
26060
+ "unknown"
26061
+ ]),
26062
+ /**
26063
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26064
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26065
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26066
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26067
+ * SKIP a null rather than coerce it.
26068
+ */
26069
+ signalPercent: number().min(0).max(100).nullable(),
26070
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26071
+ rssiDbm: number().optional(),
26072
+ /** Network name of a wireless link, when the firmware reports it. */
26073
+ ssid: string().optional(),
26074
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26075
+ lastUpdated: number()
26076
+ });
26077
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26078
+ deviceId: number(),
26079
+ status: NetworkLinkStatusSchema
26080
+ });
26081
+ /**
25762
26082
  * network-quality — system-scoped singleton capability tracking RTT,
25763
26083
  * jitter, and observed/peak bandwidth per device + per client.
25764
26084
  *
@@ -27000,203 +27320,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27000
27320
  deviceId: number(),
27001
27321
  status: PtzAutotrackStatusSchema
27002
27322
  });
27003
- /**
27004
- * `navigation` — a device-scoped capability that natively expresses the FULL
27005
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27006
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27007
- *
27008
- * Why a NEW cap rather than overloading `ptz`:
27009
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27010
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27011
- * The two are different physical models: PTZ is absolute-position + presets,
27012
- * navigation is momentary drive nudges + discrete robot ACTIONS
27013
- * (dock / spot-clean / follow-pet / go-to-point / …).
27014
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27015
- * the reverse:
27016
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27017
- * / `getOptions`), and
27018
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27019
- * robot camera shows up in the existing PTZ control path without every
27020
- * PTZ provider learning about robots. The mapping lives in the adapter,
27021
- * not here (see the addon design note):
27022
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27023
- * ptz.stop() → navigation.stop()
27024
- * ptz.goHome() → navigation.runAction('goHome')
27025
- * ptz.getPresets() → navigation.listActions() (id→preset)
27026
- * ptz.goToPreset(id) → navigation.runAction(id)
27027
- *
27028
- * ## Continuous drive
27029
- *
27030
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27031
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27032
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27033
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27034
- * coalesce them. The UI owns the cadence.
27035
- *
27036
- * ## The action dictionary
27037
- *
27038
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27039
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27040
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27041
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27042
- * vendor-specific list. `kind: 'action'` entries are triggered with
27043
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27044
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27045
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27046
- *
27047
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27048
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27049
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27050
- * every device handle. A future nodedreame publish adds a typed
27051
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27052
- * provider can then swap the raw calls for the typed methods with no change to
27053
- * THIS contract.
27054
- */
27055
- /**
27056
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27057
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27058
- * halts it.
27059
- *
27060
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27061
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27062
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27063
- * vector by it (drivers without proportional drive ignore it).
27064
- *
27065
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27066
- * axis alone; an all-undefined nudge is a no-op.
27067
- */
27068
- var NavigationMoveCommandSchema = object({
27069
- pan: number().min(-1).max(1).optional(),
27070
- tilt: number().min(-1).max(1).optional(),
27071
- speed: number().min(0).max(1).optional()
27072
- });
27073
- /**
27074
- * The enumerated discrete actions a navigation-capable robot can perform via
27075
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27076
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27077
- * `playSound` (see the `sound` dictionary entries).
27078
- */
27079
- var NavigationActionIdSchema = _enum([
27080
- "goHome",
27081
- "locate",
27082
- "spotClean",
27083
- "findPet",
27084
- "personFollow",
27085
- "stop",
27086
- "startClean",
27087
- "pauseClean",
27088
- "dockWash",
27089
- "autoEmpty",
27090
- "flashOn",
27091
- "flashOff"
27092
- ]);
27093
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27094
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27095
- /**
27096
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27097
- * native panel and the PTZ mimic render as a button.
27098
- *
27099
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27100
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27101
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27102
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27103
- * - `label` — operator-facing English label.
27104
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27105
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27106
- * PTZ render ONLY enabled entries. Data-driven: the provider
27107
- * flips it from config, never by editing code.
27108
- */
27109
- var NavigationActionEntrySchema = object({
27110
- id: string(),
27111
- kind: NavigationEntryKindSchema,
27112
- label: string(),
27113
- icon: string(),
27114
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27115
- soundId: number().int().optional(),
27116
- /** Per-device feature flag — render this entry only when true. */
27117
- enabled: boolean()
27118
- });
27119
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27120
- var NavigationPointSchema = object({
27121
- x: number(),
27122
- y: number()
27123
- });
27124
- /**
27125
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27126
- * The cap reports which are enabled so the UI / PTZ render only the controls
27127
- * that are turned on for THIS device. Data-driven: the provider derives these
27128
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27129
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27130
- * that are not dictionary entries.
27131
- *
27132
- * - `move` / `stop` — the momentary drive joystick.
27133
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27134
- * map-coordinate plumbing is wired.
27135
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27136
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27137
- * - `light` — the on/off fill-light toggle (works anytime).
27138
- * - `lightMode` — the auto/manual selector + manual level slider (a
27139
- * camera-service control; needs an active stream).
27140
- */
27141
- var NavigationFeaturesSchema = object({
27142
- move: boolean(),
27143
- stop: boolean(),
27144
- goToPoint: boolean(),
27145
- runAction: boolean(),
27146
- playSound: boolean(),
27147
- light: boolean(),
27148
- lightMode: boolean()
27149
- });
27150
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27151
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27152
- /**
27153
- * Live navigation state so the UI can reflect what the robot is doing:
27154
- * - `mode` — coarse activity (idle / cleaning / following / …).
27155
- * - `following` — person/pet follow is currently armed.
27156
- * - `flash` — the on-camera fill light is on.
27157
- * - `lightMode` — auto vs manual fill-light mode.
27158
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27159
- * `lightMode === 'manual'`.
27160
- */
27161
- var NavigationStatusSchema = object({
27162
- mode: _enum([
27163
- "idle",
27164
- "cleaning",
27165
- "spot",
27166
- "following",
27167
- "goto",
27168
- "returning",
27169
- "paused",
27170
- "unknown"
27171
- ]),
27172
- following: boolean(),
27173
- flash: boolean(),
27174
- lightMode: NavigationLightModeSchema,
27175
- lightLevel: number().min(40).max(100),
27176
- /** Ms epoch when the slice was last updated. */
27177
- lastChangedAt: number()
27178
- });
27179
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27180
- 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({
27181
- deviceId: number(),
27182
- actionId: NavigationActionIdSchema
27183
- }), _void(), { kind: "mutation" }), method(object({
27184
- deviceId: number(),
27185
- soundId: number().int()
27186
- }), _void(), { kind: "mutation" }), method(object({
27187
- deviceId: number(),
27188
- on: boolean()
27189
- }), _void(), { kind: "mutation" }), method(object({
27190
- deviceId: number(),
27191
- mode: NavigationLightModeSchema,
27192
- level: number().min(40).max(100).optional()
27193
- }), _void(), { kind: "mutation" }), method(object({
27194
- deviceId: number(),
27195
- level: number().min(40).max(100)
27196
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27197
- deviceId: number(),
27198
- status: NavigationStatusSchema
27199
- });
27200
27323
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27201
27324
  kind: "mutation",
27202
27325
  auth: "admin"
@@ -34511,6 +34634,12 @@ Object.freeze({
34511
34634
  addonId: null,
34512
34635
  access: "view"
34513
34636
  },
34637
+ "storage.listDrainProgress": {
34638
+ capName: "storage",
34639
+ capScope: "system",
34640
+ addonId: null,
34641
+ access: "view"
34642
+ },
34514
34643
  "storage.listLocationDeclarations": {
34515
34644
  capName: "storage",
34516
34645
  capScope: "system",
@@ -34655,6 +34784,12 @@ Object.freeze({
34655
34784
  addonId: null,
34656
34785
  access: "view"
34657
34786
  },
34787
+ "storageOccupancy.getOccupancy": {
34788
+ capName: "storage-occupancy",
34789
+ capScope: "system",
34790
+ addonId: null,
34791
+ access: "view"
34792
+ },
34658
34793
  "storageProvider.abortUpload": {
34659
34794
  capName: "storage-provider",
34660
34795
  capScope: "system",