@camstack/addon-mqtt-broker 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.
@@ -44,7 +44,7 @@ let crypto$10 = __toESM(crypto$1, 1);
44
44
  crypto$1 = __toESM(crypto$1);
45
45
  let node_fs = require("node:fs");
46
46
  let node_path = require("node:path");
47
- //#region ../types/dist/event-category-zAv7pMUz.mjs
47
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
48
48
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
49
49
  EventCategory["SystemBoot"] = "system.boot";
50
50
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -239,6 +239,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
239
239
  EventCategory["ProcessCrashed"] = "process.crashed";
240
240
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
241
241
  EventCategory["ProcessRestarted"] = "process.restarted";
242
+ /**
243
+ * The SET of storage locations changed — one was created, edited, enabled,
244
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
245
+ *
246
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
247
+ * it must also converge on its own periodic path, because a dropped event
248
+ * must not leave a node writing to yesterday's disk set forever. It exists
249
+ * because there was NO signal at all — an operator who added a second
250
+ * recordings disk in the admin UI got nothing, and the recorder kept its
251
+ * resolved locations until something else happened to re-resolve them
252
+ * (D387). Payload `StorageLocationsChangedPayload`.
253
+ */
254
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
242
255
  EventCategory["RecordingStarted"] = "recording.started";
243
256
  EventCategory["RecordingStopped"] = "recording.stopped";
244
257
  EventCategory["RecordingError"] = "recording.error";
@@ -7644,111 +7657,6 @@ var CameraSwitchGroupSchema = object({
7644
7657
  fetchedAt: number()
7645
7658
  });
7646
7659
  /**
7647
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7648
- * an addon declares its channels in.
7649
- *
7650
- * ## Two axes, deliberately separated
7651
- *
7652
- * - **DECLARATION** — which channels exist. Only the addon knows:
7653
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7654
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7655
- * and rots silently. So a channel is declared where it is consulted, and the
7656
- * `log-channels` capability enumerates the declarations.
7657
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7658
- * thing: the logging settings document on the `system` cap. Two authorities
7659
- * over the values is the exact defect
7660
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7661
- * remove; re-introducing it from the cure side would be grotesque.
7662
- *
7663
- * Nothing in this file reads a clock, an env var or a store. The registry is
7664
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7665
- * the hot path with a value somebody actually read, and by
7666
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7667
- * never reaches here, so it can neither disarm an armed channel nor arm a
7668
- * disarmed one (D49).
7669
- *
7670
- * ## The canonical call shape
7671
- *
7672
- * ```ts
7673
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7674
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7675
- * }
7676
- * ```
7677
- *
7678
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7679
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7680
- * object literal is never constructed because it lives inside the branch. It
7681
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7682
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7683
- * destination floor (measured at 1.93 ns/call when off).
7684
- *
7685
- * ## Why a channel emits at `info`
7686
- *
7687
- * `loki-logging.addon.ts` pins the destination default at `info` and
7688
- * `loki-destination.ts` drops everything below it, so a line emitted at
7689
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7690
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7691
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7692
- * emits at the channel's declared level, whose schema floor is `info`.
7693
- */
7694
- /**
7695
- * The level a channel writes at once armed.
7696
- *
7697
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7698
- * not leave the process for Loki, and the whole point of arming a channel is
7699
- * to read it later.
7700
- */
7701
- var LogChannelLevelSchema = _enum([
7702
- "info",
7703
- "warn",
7704
- "error"
7705
- ]);
7706
- /**
7707
- * What an addon declares about one channel. No value, no state — a
7708
- * declaration is inert.
7709
- */
7710
- var LogChannelDescriptorSchema = object({
7711
- /**
7712
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7713
- * the addon's short name so an operator reading a channel list can tell who
7714
- * owns it without a second lookup.
7715
- */
7716
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7717
- /** One sentence: what the operator will SEE after arming it. */
7718
- description: string().min(1),
7719
- /** The level its lines are emitted at. Never below `info`. */
7720
- defaultLevel: LogChannelLevelSchema,
7721
- /**
7722
- * Whether this channel can be narrowed to a camera.
7723
- *
7724
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7725
- * consulted with the numeric device id, AND every line the channel admits
7726
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7727
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7728
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7729
- * the body is the only way to filter.
7730
- *
7731
- * A channel whose lines carry the device only in `meta` (or not at all) is
7732
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7733
- * the operator narrows to one camera, sees nothing, and concludes the code
7734
- * path was never taken.
7735
- */
7736
- perDevice: boolean()
7737
- });
7738
- /**
7739
- * An armed window over one channel, as the document hands it to a mirror.
7740
- *
7741
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7742
- * expires by itself, which is the one failure a boolean cannot avoid.
7743
- */
7744
- var LogChannelWindowSchema = object({
7745
- channel: string().min(1),
7746
- /** Epoch ms the window closes at. */
7747
- armedUntilMs: number(),
7748
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7749
- deviceIds: array(number().int()).readonly().nullable()
7750
- });
7751
- /**
7752
7660
  * Ops-log — the durable, append-only operations audit shared by the
7753
7661
  * recordings and events management surfaces.
7754
7662
  *
@@ -8670,6 +8578,21 @@ var StorageCleanupJobSchema = object({
8670
8578
  });
8671
8579
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8672
8580
  /**
8581
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8582
+ * alias below is `z.infer<>` of it, never a second spelling.
8583
+ */
8584
+ var StorageLocationModeSchema = _enum([
8585
+ "active",
8586
+ "readonly",
8587
+ "drain",
8588
+ "disabled"
8589
+ ]);
8590
+ _enum([
8591
+ "normal",
8592
+ "never",
8593
+ "drain"
8594
+ ]);
8595
+ /**
8673
8596
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8674
8597
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8675
8598
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8694,8 +8617,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8694
8617
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8695
8618
  *
8696
8619
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8697
- * The default location for a type uses `id === <type>:default` by
8698
- * convention (the bare type ref like `'backups'` resolves to it).
8620
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8621
+ * There is no default location any more (D383): `enabled` is the whole write
8622
+ * model, and a bare type ref resolves to the sole location of the type, or —
8623
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8624
+ * slug is `default`.
8699
8625
  *
8700
8626
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8701
8627
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8716,23 +8642,37 @@ var StorageLocationSchema = object({
8716
8642
  * flag at upsert time, not here (the schema is provider-agnostic).
8717
8643
  */
8718
8644
  nodeId: string().optional(),
8719
- isDefault: boolean().default(false),
8720
8645
  isSystem: boolean().default(false),
8721
8646
  /**
8722
- * Operator opt-in: whether consumers that BALANCE across several locations
8723
- * of a type may write here. Recordings reads it today; event media and
8724
- * backups are the next consumers, which is why the flag lives on the
8725
- * location rather than in any one addon's store — nothing has to be
8726
- * extended to add the next consumer.
8647
+ * THE write switch, and the only one (D383). `enabled: true` means every
8648
+ * consumer that chooses a write target for this type may write here, and all
8649
+ * enabled locations of a type are used TOGETHER; `false` means read-only —
8650
+ * still read, still played back, still age-swept, still drained, never
8651
+ * written.
8727
8652
  *
8728
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8729
- * flag existed reads back with no flag and keeps working exactly as before;
8730
- * that is the whole compat story, and it is why no migration ships with it.
8731
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8732
- * disk must not silently start writing to it); the default of a type is
8733
- * always stamped `true`.
8653
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8654
+ * stored" on an update and "born inert unless it is the first location of its
8655
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8656
+ * enabled — {@link isLocationEnabled} is the one place that says so, and the
8657
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8658
+ * stops existing rather than being re-derived on every read.
8734
8659
  */
8735
8660
  enabled: boolean().optional(),
8661
+ /**
8662
+ * THE state of this location (D385), and the only authority on what may be
8663
+ * written, read or evicted here. Interpreted in exactly one place —
8664
+ * `storage-location-mode.ts` — which also folds the legacy
8665
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8666
+ * ambiguous.
8667
+ *
8668
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8669
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8670
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8671
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8672
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8673
+ * either, so the two cannot disagree.
8674
+ */
8675
+ mode: StorageLocationModeSchema.optional(),
8736
8676
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8737
8677
  * for node-local locations it can reach) — never persisted, absent when the
8738
8678
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8740,13 +8680,50 @@ var StorageLocationSchema = object({
8740
8680
  totalBytes: number(),
8741
8681
  availableBytes: number()
8742
8682
  }).nullable().optional(),
8683
+ /**
8684
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8685
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8686
+ * never persisted, never a filesystem walk.
8687
+ *
8688
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8689
+ * location yet — nobody stores here, the owning addon is down, or the first
8690
+ * refresh has not completed. A UI must omit the segment rather than draw it
8691
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8692
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8693
+ * be spelled out loud instead of appearing by accident.
8694
+ *
8695
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8696
+ * about the whole figure rather than about its freshest part.
8697
+ */
8698
+ owned: object({
8699
+ bytes: number().int().nonnegative(),
8700
+ measuredAtMs: number().int().nonnegative()
8701
+ }).optional(),
8743
8702
  createdAt: number(),
8744
8703
  updatedAt: number()
8745
8704
  });
8705
+ object({ isDefault: boolean().optional() });
8706
+ /**
8707
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8708
+ *
8709
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8710
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8711
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8712
+ * operator learns not to believe the screen.
8713
+ */
8714
+ var StorageDrainProgressSchema = object({
8715
+ locationId: string(),
8716
+ startedAtMs: number(),
8717
+ startBytes: number(),
8718
+ bytesRemaining: number(),
8719
+ drained: boolean(),
8720
+ estimatedEmptyAtMs: number().nullable()
8721
+ });
8746
8722
  /**
8747
8723
  * Reference accepted by consumer-facing `api.storage.*` calls.
8748
8724
  * Either:
8749
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
8725
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
8726
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8750
8727
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8751
8728
  *
8752
8729
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -8922,6 +8899,111 @@ var DecoderSessionConfigSchema = object({
8922
8899
  */
8923
8900
  debug: boolean().optional()
8924
8901
  });
8902
+ /**
8903
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
8904
+ * an addon declares its channels in.
8905
+ *
8906
+ * ## Two axes, deliberately separated
8907
+ *
8908
+ * - **DECLARATION** — which channels exist. Only the addon knows:
8909
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8910
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
8911
+ * and rots silently. So a channel is declared where it is consulted, and the
8912
+ * `log-channels` capability enumerates the declarations.
8913
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
8914
+ * thing: the logging settings document on the `system` cap. Two authorities
8915
+ * over the values is the exact defect
8916
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8917
+ * remove; re-introducing it from the cure side would be grotesque.
8918
+ *
8919
+ * Nothing in this file reads a clock, an env var or a store. The registry is
8920
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8921
+ * the hot path with a value somebody actually read, and by
8922
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8923
+ * never reaches here, so it can neither disarm an armed channel nor arm a
8924
+ * disarmed one (D49).
8925
+ *
8926
+ * ## The canonical call shape
8927
+ *
8928
+ * ```ts
8929
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8930
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8931
+ * }
8932
+ * ```
8933
+ *
8934
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8935
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
8936
+ * object literal is never constructed because it lives inside the branch. It
8937
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
8938
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
8939
+ * destination floor (measured at 1.93 ns/call when off).
8940
+ *
8941
+ * ## Why a channel emits at `info`
8942
+ *
8943
+ * `loki-logging.addon.ts` pins the destination default at `info` and
8944
+ * `loki-destination.ts` drops everything below it, so a line emitted at
8945
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8946
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
8947
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8948
+ * emits at the channel's declared level, whose schema floor is `info`.
8949
+ */
8950
+ /**
8951
+ * The level a channel writes at once armed.
8952
+ *
8953
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8954
+ * not leave the process for Loki, and the whole point of arming a channel is
8955
+ * to read it later.
8956
+ */
8957
+ var LogChannelLevelSchema = _enum([
8958
+ "info",
8959
+ "warn",
8960
+ "error"
8961
+ ]);
8962
+ /**
8963
+ * What an addon declares about one channel. No value, no state — a
8964
+ * declaration is inert.
8965
+ */
8966
+ var LogChannelDescriptorSchema = object({
8967
+ /**
8968
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8969
+ * the addon's short name so an operator reading a channel list can tell who
8970
+ * owns it without a second lookup.
8971
+ */
8972
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8973
+ /** One sentence: what the operator will SEE after arming it. */
8974
+ description: string().min(1),
8975
+ /** The level its lines are emitted at. Never below `info`. */
8976
+ defaultLevel: LogChannelLevelSchema,
8977
+ /**
8978
+ * Whether this channel can be narrowed to a camera.
8979
+ *
8980
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
8981
+ * consulted with the numeric device id, AND every line the channel admits
8982
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
8983
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8984
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8985
+ * the body is the only way to filter.
8986
+ *
8987
+ * A channel whose lines carry the device only in `meta` (or not at all) is
8988
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8989
+ * the operator narrows to one camera, sees nothing, and concludes the code
8990
+ * path was never taken.
8991
+ */
8992
+ perDevice: boolean()
8993
+ });
8994
+ /**
8995
+ * An armed window over one channel, as the document hands it to a mirror.
8996
+ *
8997
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8998
+ * expires by itself, which is the one failure a boolean cannot avoid.
8999
+ */
9000
+ var LogChannelWindowSchema = object({
9001
+ channel: string().min(1),
9002
+ /** Epoch ms the window closes at. */
9003
+ armedUntilMs: number(),
9004
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
9005
+ deviceIds: array(number().int()).readonly().nullable()
9006
+ });
8925
9007
  var MODEL_FORMATS = [
8926
9008
  "onnx",
8927
9009
  "coreml",
@@ -21654,7 +21736,7 @@ method(object({
21654
21736
  downloadId: string(),
21655
21737
  offset: number(),
21656
21738
  length: number()
21657
- }), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(object({ type: StorageLocationTypeSchema }), StorageLocationSchema.nullable()), method(_void(), array(StorageLocationDeclarationSchema).readonly()), method(StorageLocationSchema.omit({
21739
+ }), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(_void(), array(StorageLocationDeclarationSchema).readonly()), method(StorageLocationSchema.omit({
21658
21740
  createdAt: true,
21659
21741
  updatedAt: true
21660
21742
  }), StorageLocationSchema, {
@@ -21666,7 +21748,7 @@ method(object({
21666
21748
  }), _void(), {
21667
21749
  kind: "mutation",
21668
21750
  auth: "admin"
21669
- }), method(object({ id: string() }), object({
21751
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21670
21752
  ok: boolean(),
21671
21753
  error: string().optional()
21672
21754
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21736,6 +21818,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21736
21818
  kind: "mutation",
21737
21819
  auth: "admin"
21738
21820
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21821
+ /**
21822
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
21823
+ * location (D388).
21824
+ *
21825
+ * ## Why this is not `storage-evictable`
21826
+ *
21827
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
21828
+ * not, in two ways that both matter and both bite hardest on the locations an
21829
+ * operator most wants a figure for:
21830
+ *
21831
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
21832
+ * and `recordingsLow:default` deliberately share one root and evict as one
21833
+ * oldest-first pool, so both answer with the SAME combined total. As an
21834
+ * occupancy figure that double-counts the disk.
21835
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
21836
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
21837
+ * is retiring and staring at.
21838
+ *
21839
+ * So this is its own contract with its own quantity, and the quantity is
21840
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
21841
+ * would ever be willing to delete it. A provider that can only answer
21842
+ * "evictable" must not register here — a number that silently means different
21843
+ * things per class is worse than no number.
21844
+ *
21845
+ * ## Absence is an answer
21846
+ *
21847
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
21848
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
21849
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
21850
+ * consuming side has to be written out loud instead of appearing by accident.
21851
+ *
21852
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
21853
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
21854
+ */
21855
+ /** One provider's occupancy answer for one location. */
21856
+ var StorageOccupancyReportSchema = object({
21857
+ locationId: string(),
21858
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
21859
+ * not net of what it is willing to delete. */
21860
+ ownedBytes: number().int().nonnegative(),
21861
+ /** When the provider last actually measured this. The orchestrator carries it
21862
+ * through so a UI can say how old the figure is instead of implying "now". */
21863
+ measuredAtMs: number().int().nonnegative()
21864
+ });
21865
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21739
21866
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21740
21867
  providerId: string().min(1),
21741
21868
  displayName: string().min(1),
@@ -23371,39 +23498,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23371
23498
  deviceId: number(),
23372
23499
  status: BatteryStatusSchema
23373
23500
  });
23374
- /**
23375
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23376
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23377
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23378
- * one Home Assistant projection.
23379
- */
23380
- var NetworkLinkStatusSchema = object({
23381
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23382
- type: _enum([
23383
- "wifi",
23384
- "ethernet",
23385
- "cellular",
23386
- "unknown"
23387
- ]),
23388
- /**
23389
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23390
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23391
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23392
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23393
- * SKIP a null rather than coerce it.
23394
- */
23395
- signalPercent: number().min(0).max(100).nullable(),
23396
- /** Raw received signal strength in dBm, when the firmware reports one. */
23397
- rssiDbm: number().optional(),
23398
- /** Network name of a wireless link, when the firmware reports it. */
23399
- ssid: string().optional(),
23400
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23401
- lastUpdated: number()
23402
- });
23403
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23404
- deviceId: number(),
23405
- status: NetworkLinkStatusSchema
23406
- });
23407
23501
  object({
23408
23502
  on: boolean(),
23409
23503
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25757,6 +25851,236 @@ DeviceType.Camera, method(object({
25757
25851
  detection: NativeDetectionSchema
25758
25852
  });
25759
25853
  /**
25854
+ * `navigation` — a device-scoped capability that natively expresses the FULL
25855
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
25856
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
25857
+ *
25858
+ * Why a NEW cap rather than overloading `ptz`:
25859
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
25860
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
25861
+ * The two are different physical models: PTZ is absolute-position + presets,
25862
+ * navigation is momentary drive nudges + discrete robot ACTIONS
25863
+ * (dock / spot-clean / follow-pet / go-to-point / …).
25864
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
25865
+ * the reverse:
25866
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
25867
+ * / `getOptions`), and
25868
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
25869
+ * robot camera shows up in the existing PTZ control path without every
25870
+ * PTZ provider learning about robots. The mapping lives in the adapter,
25871
+ * not here (see the addon design note):
25872
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
25873
+ * ptz.stop() → navigation.stop()
25874
+ * ptz.goHome() → navigation.runAction('goHome')
25875
+ * ptz.getPresets() → navigation.listActions() (id→preset)
25876
+ * ptz.goToPreset(id) → navigation.runAction(id)
25877
+ *
25878
+ * ## Continuous drive
25879
+ *
25880
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
25881
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
25882
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
25883
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
25884
+ * coalesce them. The UI owns the cadence.
25885
+ *
25886
+ * ## The action dictionary
25887
+ *
25888
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
25889
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
25890
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
25891
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
25892
+ * vendor-specific list. `kind: 'action'` entries are triggered with
25893
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
25894
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
25895
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
25896
+ *
25897
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
25898
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
25899
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
25900
+ * every device handle. A future nodedreame publish adds a typed
25901
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
25902
+ * provider can then swap the raw calls for the typed methods with no change to
25903
+ * THIS contract.
25904
+ */
25905
+ /**
25906
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
25907
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
25908
+ * halts it.
25909
+ *
25910
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
25911
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
25912
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
25913
+ * vector by it (drivers without proportional drive ignore it).
25914
+ *
25915
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
25916
+ * axis alone; an all-undefined nudge is a no-op.
25917
+ */
25918
+ var NavigationMoveCommandSchema = object({
25919
+ pan: number().min(-1).max(1).optional(),
25920
+ tilt: number().min(-1).max(1).optional(),
25921
+ speed: number().min(0).max(1).optional()
25922
+ });
25923
+ /**
25924
+ * The enumerated discrete actions a navigation-capable robot can perform via
25925
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
25926
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
25927
+ * `playSound` (see the `sound` dictionary entries).
25928
+ */
25929
+ var NavigationActionIdSchema = _enum([
25930
+ "goHome",
25931
+ "locate",
25932
+ "spotClean",
25933
+ "findPet",
25934
+ "personFollow",
25935
+ "stop",
25936
+ "startClean",
25937
+ "pauseClean",
25938
+ "dockWash",
25939
+ "autoEmpty",
25940
+ "flashOn",
25941
+ "flashOff"
25942
+ ]);
25943
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
25944
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
25945
+ /**
25946
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
25947
+ * native panel and the PTZ mimic render as a button.
25948
+ *
25949
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
25950
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
25951
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
25952
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
25953
+ * - `label` — operator-facing English label.
25954
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
25955
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
25956
+ * PTZ render ONLY enabled entries. Data-driven: the provider
25957
+ * flips it from config, never by editing code.
25958
+ */
25959
+ var NavigationActionEntrySchema = object({
25960
+ id: string(),
25961
+ kind: NavigationEntryKindSchema,
25962
+ label: string(),
25963
+ icon: string(),
25964
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
25965
+ soundId: number().int().optional(),
25966
+ /** Per-device feature flag — render this entry only when true. */
25967
+ enabled: boolean()
25968
+ });
25969
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
25970
+ var NavigationPointSchema = object({
25971
+ x: number(),
25972
+ y: number()
25973
+ });
25974
+ /**
25975
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
25976
+ * The cap reports which are enabled so the UI / PTZ render only the controls
25977
+ * that are turned on for THIS device. Data-driven: the provider derives these
25978
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
25979
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
25980
+ * that are not dictionary entries.
25981
+ *
25982
+ * - `move` / `stop` — the momentary drive joystick.
25983
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
25984
+ * map-coordinate plumbing is wired.
25985
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
25986
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
25987
+ * - `light` — the on/off fill-light toggle (works anytime).
25988
+ * - `lightMode` — the auto/manual selector + manual level slider (a
25989
+ * camera-service control; needs an active stream).
25990
+ */
25991
+ var NavigationFeaturesSchema = object({
25992
+ move: boolean(),
25993
+ stop: boolean(),
25994
+ goToPoint: boolean(),
25995
+ runAction: boolean(),
25996
+ playSound: boolean(),
25997
+ light: boolean(),
25998
+ lightMode: boolean()
25999
+ });
26000
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26001
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26002
+ /**
26003
+ * Live navigation state so the UI can reflect what the robot is doing:
26004
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26005
+ * - `following` — person/pet follow is currently armed.
26006
+ * - `flash` — the on-camera fill light is on.
26007
+ * - `lightMode` — auto vs manual fill-light mode.
26008
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26009
+ * `lightMode === 'manual'`.
26010
+ */
26011
+ var NavigationStatusSchema = object({
26012
+ mode: _enum([
26013
+ "idle",
26014
+ "cleaning",
26015
+ "spot",
26016
+ "following",
26017
+ "goto",
26018
+ "returning",
26019
+ "paused",
26020
+ "unknown"
26021
+ ]),
26022
+ following: boolean(),
26023
+ flash: boolean(),
26024
+ lightMode: NavigationLightModeSchema,
26025
+ lightLevel: number().min(40).max(100),
26026
+ /** Ms epoch when the slice was last updated. */
26027
+ lastChangedAt: number()
26028
+ });
26029
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26030
+ 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({
26031
+ deviceId: number(),
26032
+ actionId: NavigationActionIdSchema
26033
+ }), _void(), { kind: "mutation" }), method(object({
26034
+ deviceId: number(),
26035
+ soundId: number().int()
26036
+ }), _void(), { kind: "mutation" }), method(object({
26037
+ deviceId: number(),
26038
+ on: boolean()
26039
+ }), _void(), { kind: "mutation" }), method(object({
26040
+ deviceId: number(),
26041
+ mode: NavigationLightModeSchema,
26042
+ level: number().min(40).max(100).optional()
26043
+ }), _void(), { kind: "mutation" }), method(object({
26044
+ deviceId: number(),
26045
+ level: number().min(40).max(100)
26046
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26047
+ deviceId: number(),
26048
+ status: NavigationStatusSchema
26049
+ });
26050
+ /**
26051
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26052
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26053
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26054
+ * one Home Assistant projection.
26055
+ */
26056
+ var NetworkLinkStatusSchema = object({
26057
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26058
+ type: _enum([
26059
+ "wifi",
26060
+ "ethernet",
26061
+ "cellular",
26062
+ "unknown"
26063
+ ]),
26064
+ /**
26065
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26066
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26067
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26068
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26069
+ * SKIP a null rather than coerce it.
26070
+ */
26071
+ signalPercent: number().min(0).max(100).nullable(),
26072
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26073
+ rssiDbm: number().optional(),
26074
+ /** Network name of a wireless link, when the firmware reports it. */
26075
+ ssid: string().optional(),
26076
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26077
+ lastUpdated: number()
26078
+ });
26079
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26080
+ deviceId: number(),
26081
+ status: NetworkLinkStatusSchema
26082
+ });
26083
+ /**
25760
26084
  * network-quality — system-scoped singleton capability tracking RTT,
25761
26085
  * jitter, and observed/peak bandwidth per device + per client.
25762
26086
  *
@@ -26998,203 +27322,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
26998
27322
  deviceId: number(),
26999
27323
  status: PtzAutotrackStatusSchema
27000
27324
  });
27001
- /**
27002
- * `navigation` — a device-scoped capability that natively expresses the FULL
27003
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27004
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27005
- *
27006
- * Why a NEW cap rather than overloading `ptz`:
27007
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27008
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27009
- * The two are different physical models: PTZ is absolute-position + presets,
27010
- * navigation is momentary drive nudges + discrete robot ACTIONS
27011
- * (dock / spot-clean / follow-pet / go-to-point / …).
27012
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27013
- * the reverse:
27014
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27015
- * / `getOptions`), and
27016
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27017
- * robot camera shows up in the existing PTZ control path without every
27018
- * PTZ provider learning about robots. The mapping lives in the adapter,
27019
- * not here (see the addon design note):
27020
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27021
- * ptz.stop() → navigation.stop()
27022
- * ptz.goHome() → navigation.runAction('goHome')
27023
- * ptz.getPresets() → navigation.listActions() (id→preset)
27024
- * ptz.goToPreset(id) → navigation.runAction(id)
27025
- *
27026
- * ## Continuous drive
27027
- *
27028
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27029
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27030
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27031
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27032
- * coalesce them. The UI owns the cadence.
27033
- *
27034
- * ## The action dictionary
27035
- *
27036
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27037
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27038
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27039
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27040
- * vendor-specific list. `kind: 'action'` entries are triggered with
27041
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27042
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27043
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27044
- *
27045
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27046
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27047
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27048
- * every device handle. A future nodedreame publish adds a typed
27049
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27050
- * provider can then swap the raw calls for the typed methods with no change to
27051
- * THIS contract.
27052
- */
27053
- /**
27054
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27055
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27056
- * halts it.
27057
- *
27058
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27059
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27060
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27061
- * vector by it (drivers without proportional drive ignore it).
27062
- *
27063
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27064
- * axis alone; an all-undefined nudge is a no-op.
27065
- */
27066
- var NavigationMoveCommandSchema = object({
27067
- pan: number().min(-1).max(1).optional(),
27068
- tilt: number().min(-1).max(1).optional(),
27069
- speed: number().min(0).max(1).optional()
27070
- });
27071
- /**
27072
- * The enumerated discrete actions a navigation-capable robot can perform via
27073
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27074
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27075
- * `playSound` (see the `sound` dictionary entries).
27076
- */
27077
- var NavigationActionIdSchema = _enum([
27078
- "goHome",
27079
- "locate",
27080
- "spotClean",
27081
- "findPet",
27082
- "personFollow",
27083
- "stop",
27084
- "startClean",
27085
- "pauseClean",
27086
- "dockWash",
27087
- "autoEmpty",
27088
- "flashOn",
27089
- "flashOff"
27090
- ]);
27091
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27092
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27093
- /**
27094
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27095
- * native panel and the PTZ mimic render as a button.
27096
- *
27097
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27098
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27099
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27100
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27101
- * - `label` — operator-facing English label.
27102
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27103
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27104
- * PTZ render ONLY enabled entries. Data-driven: the provider
27105
- * flips it from config, never by editing code.
27106
- */
27107
- var NavigationActionEntrySchema = object({
27108
- id: string(),
27109
- kind: NavigationEntryKindSchema,
27110
- label: string(),
27111
- icon: string(),
27112
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27113
- soundId: number().int().optional(),
27114
- /** Per-device feature flag — render this entry only when true. */
27115
- enabled: boolean()
27116
- });
27117
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27118
- var NavigationPointSchema = object({
27119
- x: number(),
27120
- y: number()
27121
- });
27122
- /**
27123
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27124
- * The cap reports which are enabled so the UI / PTZ render only the controls
27125
- * that are turned on for THIS device. Data-driven: the provider derives these
27126
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27127
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27128
- * that are not dictionary entries.
27129
- *
27130
- * - `move` / `stop` — the momentary drive joystick.
27131
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27132
- * map-coordinate plumbing is wired.
27133
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27134
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27135
- * - `light` — the on/off fill-light toggle (works anytime).
27136
- * - `lightMode` — the auto/manual selector + manual level slider (a
27137
- * camera-service control; needs an active stream).
27138
- */
27139
- var NavigationFeaturesSchema = object({
27140
- move: boolean(),
27141
- stop: boolean(),
27142
- goToPoint: boolean(),
27143
- runAction: boolean(),
27144
- playSound: boolean(),
27145
- light: boolean(),
27146
- lightMode: boolean()
27147
- });
27148
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27149
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27150
- /**
27151
- * Live navigation state so the UI can reflect what the robot is doing:
27152
- * - `mode` — coarse activity (idle / cleaning / following / …).
27153
- * - `following` — person/pet follow is currently armed.
27154
- * - `flash` — the on-camera fill light is on.
27155
- * - `lightMode` — auto vs manual fill-light mode.
27156
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27157
- * `lightMode === 'manual'`.
27158
- */
27159
- var NavigationStatusSchema = object({
27160
- mode: _enum([
27161
- "idle",
27162
- "cleaning",
27163
- "spot",
27164
- "following",
27165
- "goto",
27166
- "returning",
27167
- "paused",
27168
- "unknown"
27169
- ]),
27170
- following: boolean(),
27171
- flash: boolean(),
27172
- lightMode: NavigationLightModeSchema,
27173
- lightLevel: number().min(40).max(100),
27174
- /** Ms epoch when the slice was last updated. */
27175
- lastChangedAt: number()
27176
- });
27177
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27178
- 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({
27179
- deviceId: number(),
27180
- actionId: NavigationActionIdSchema
27181
- }), _void(), { kind: "mutation" }), method(object({
27182
- deviceId: number(),
27183
- soundId: number().int()
27184
- }), _void(), { kind: "mutation" }), method(object({
27185
- deviceId: number(),
27186
- on: boolean()
27187
- }), _void(), { kind: "mutation" }), method(object({
27188
- deviceId: number(),
27189
- mode: NavigationLightModeSchema,
27190
- level: number().min(40).max(100).optional()
27191
- }), _void(), { kind: "mutation" }), method(object({
27192
- deviceId: number(),
27193
- level: number().min(40).max(100)
27194
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27195
- deviceId: number(),
27196
- status: NavigationStatusSchema
27197
- });
27198
27325
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27199
27326
  kind: "mutation",
27200
27327
  auth: "admin"
@@ -34503,13 +34630,13 @@ Object.freeze({
34503
34630
  addonId: null,
34504
34631
  access: "view"
34505
34632
  },
34506
- "storage.getDefaultLocation": {
34633
+ "storage.list": {
34507
34634
  capName: "storage",
34508
34635
  capScope: "system",
34509
34636
  addonId: null,
34510
34637
  access: "view"
34511
34638
  },
34512
- "storage.list": {
34639
+ "storage.listDrainProgress": {
34513
34640
  capName: "storage",
34514
34641
  capScope: "system",
34515
34642
  addonId: null,
@@ -34659,6 +34786,12 @@ Object.freeze({
34659
34786
  addonId: null,
34660
34787
  access: "view"
34661
34788
  },
34789
+ "storageOccupancy.getOccupancy": {
34790
+ capName: "storage-occupancy",
34791
+ capScope: "system",
34792
+ addonId: null,
34793
+ access: "view"
34794
+ },
34662
34795
  "storageProvider.abortUpload": {
34663
34796
  capName: "storage-provider",
34664
34797
  capScope: "system",