@camstack/addon-remote-storage 1.2.77 → 1.2.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,7 +23,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
23
23
  let node_crypto = require("node:crypto");
24
24
  let node_path = require("node:path");
25
25
  node_path = __toESM(node_path);
26
- //#region ../types/dist/event-category-zAv7pMUz.mjs
26
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
27
27
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
28
28
  EventCategory["SystemBoot"] = "system.boot";
29
29
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -218,6 +218,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
218
218
  EventCategory["ProcessCrashed"] = "process.crashed";
219
219
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
220
220
  EventCategory["ProcessRestarted"] = "process.restarted";
221
+ /**
222
+ * The SET of storage locations changed — one was created, edited, enabled,
223
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
224
+ *
225
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
226
+ * it must also converge on its own periodic path, because a dropped event
227
+ * must not leave a node writing to yesterday's disk set forever. It exists
228
+ * because there was NO signal at all — an operator who added a second
229
+ * recordings disk in the admin UI got nothing, and the recorder kept its
230
+ * resolved locations until something else happened to re-resolve them
231
+ * (D387). Payload `StorageLocationsChangedPayload`.
232
+ */
233
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
221
234
  EventCategory["RecordingStarted"] = "recording.started";
222
235
  EventCategory["RecordingStopped"] = "recording.stopped";
223
236
  EventCategory["RecordingError"] = "recording.error";
@@ -7623,111 +7636,6 @@ var CameraSwitchGroupSchema = object({
7623
7636
  fetchedAt: number()
7624
7637
  });
7625
7638
  /**
7626
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7627
- * an addon declares its channels in.
7628
- *
7629
- * ## Two axes, deliberately separated
7630
- *
7631
- * - **DECLARATION** — which channels exist. Only the addon knows:
7632
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7633
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7634
- * and rots silently. So a channel is declared where it is consulted, and the
7635
- * `log-channels` capability enumerates the declarations.
7636
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7637
- * thing: the logging settings document on the `system` cap. Two authorities
7638
- * over the values is the exact defect
7639
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7640
- * remove; re-introducing it from the cure side would be grotesque.
7641
- *
7642
- * Nothing in this file reads a clock, an env var or a store. The registry is
7643
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7644
- * the hot path with a value somebody actually read, and by
7645
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7646
- * never reaches here, so it can neither disarm an armed channel nor arm a
7647
- * disarmed one (D49).
7648
- *
7649
- * ## The canonical call shape
7650
- *
7651
- * ```ts
7652
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7653
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7654
- * }
7655
- * ```
7656
- *
7657
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7658
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7659
- * object literal is never constructed because it lives inside the branch. It
7660
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7661
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7662
- * destination floor (measured at 1.93 ns/call when off).
7663
- *
7664
- * ## Why a channel emits at `info`
7665
- *
7666
- * `loki-logging.addon.ts` pins the destination default at `info` and
7667
- * `loki-destination.ts` drops everything below it, so a line emitted at
7668
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7669
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7670
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7671
- * emits at the channel's declared level, whose schema floor is `info`.
7672
- */
7673
- /**
7674
- * The level a channel writes at once armed.
7675
- *
7676
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7677
- * not leave the process for Loki, and the whole point of arming a channel is
7678
- * to read it later.
7679
- */
7680
- var LogChannelLevelSchema = _enum([
7681
- "info",
7682
- "warn",
7683
- "error"
7684
- ]);
7685
- /**
7686
- * What an addon declares about one channel. No value, no state — a
7687
- * declaration is inert.
7688
- */
7689
- var LogChannelDescriptorSchema = object({
7690
- /**
7691
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7692
- * the addon's short name so an operator reading a channel list can tell who
7693
- * owns it without a second lookup.
7694
- */
7695
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7696
- /** One sentence: what the operator will SEE after arming it. */
7697
- description: string().min(1),
7698
- /** The level its lines are emitted at. Never below `info`. */
7699
- defaultLevel: LogChannelLevelSchema,
7700
- /**
7701
- * Whether this channel can be narrowed to a camera.
7702
- *
7703
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7704
- * consulted with the numeric device id, AND every line the channel admits
7705
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7706
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7707
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7708
- * the body is the only way to filter.
7709
- *
7710
- * A channel whose lines carry the device only in `meta` (or not at all) is
7711
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7712
- * the operator narrows to one camera, sees nothing, and concludes the code
7713
- * path was never taken.
7714
- */
7715
- perDevice: boolean()
7716
- });
7717
- /**
7718
- * An armed window over one channel, as the document hands it to a mirror.
7719
- *
7720
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7721
- * expires by itself, which is the one failure a boolean cannot avoid.
7722
- */
7723
- var LogChannelWindowSchema = object({
7724
- channel: string().min(1),
7725
- /** Epoch ms the window closes at. */
7726
- armedUntilMs: number(),
7727
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7728
- deviceIds: array(number().int()).readonly().nullable()
7729
- });
7730
- /**
7731
7639
  * Ops-log — the durable, append-only operations audit shared by the
7732
7640
  * recordings and events management surfaces.
7733
7641
  *
@@ -8649,6 +8557,21 @@ var StorageCleanupJobSchema = object({
8649
8557
  });
8650
8558
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8651
8559
  /**
8560
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8561
+ * alias below is `z.infer<>` of it, never a second spelling.
8562
+ */
8563
+ var StorageLocationModeSchema = _enum([
8564
+ "active",
8565
+ "readonly",
8566
+ "drain",
8567
+ "disabled"
8568
+ ]);
8569
+ _enum([
8570
+ "normal",
8571
+ "never",
8572
+ "drain"
8573
+ ]);
8574
+ /**
8652
8575
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8653
8576
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8654
8577
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8673,8 +8596,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8673
8596
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8674
8597
  *
8675
8598
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8676
- * The default location for a type uses `id === <type>:default` by
8677
- * convention (the bare type ref like `'backups'` resolves to it).
8599
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8600
+ * There is no default location any more (D383): `enabled` is the whole write
8601
+ * model, and a bare type ref resolves to the sole location of the type, or —
8602
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8603
+ * slug is `default`.
8678
8604
  *
8679
8605
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8680
8606
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8695,23 +8621,37 @@ var StorageLocationSchema = object({
8695
8621
  * flag at upsert time, not here (the schema is provider-agnostic).
8696
8622
  */
8697
8623
  nodeId: string().optional(),
8698
- isDefault: boolean().default(false),
8699
8624
  isSystem: boolean().default(false),
8700
8625
  /**
8701
- * Operator opt-in: whether consumers that BALANCE across several locations
8702
- * of a type may write here. Recordings reads it today; event media and
8703
- * backups are the next consumers, which is why the flag lives on the
8704
- * location rather than in any one addon's store nothing has to be
8705
- * extended to add the next consumer.
8626
+ * THE write switch, and the only one (D383). `enabled: true` means every
8627
+ * consumer that chooses a write target for this type may write here, and all
8628
+ * enabled locations of a type are used TOGETHER; `false` means read-only
8629
+ * still read, still played back, still age-swept, still drained, never
8630
+ * written.
8706
8631
  *
8707
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8708
- * flag existed reads back with no flag and keeps working exactly as before;
8709
- * that is the whole compat story, and it is why no migration ships with it.
8710
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8711
- * disk must not silently start writing to it); the default of a type is
8712
- * always stamped `true`.
8632
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8633
+ * stored" on an update and "born inert unless it is the first location of its
8634
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8635
+ * enabled {@link isLocationEnabled} is the one place that says so, and the
8636
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8637
+ * stops existing rather than being re-derived on every read.
8713
8638
  */
8714
8639
  enabled: boolean().optional(),
8640
+ /**
8641
+ * THE state of this location (D385), and the only authority on what may be
8642
+ * written, read or evicted here. Interpreted in exactly one place —
8643
+ * `storage-location-mode.ts` — which also folds the legacy
8644
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8645
+ * ambiguous.
8646
+ *
8647
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8648
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8649
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8650
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8651
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8652
+ * either, so the two cannot disagree.
8653
+ */
8654
+ mode: StorageLocationModeSchema.optional(),
8715
8655
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8716
8656
  * for node-local locations it can reach) — never persisted, absent when the
8717
8657
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8719,13 +8659,50 @@ var StorageLocationSchema = object({
8719
8659
  totalBytes: number(),
8720
8660
  availableBytes: number()
8721
8661
  }).nullable().optional(),
8662
+ /**
8663
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8664
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8665
+ * never persisted, never a filesystem walk.
8666
+ *
8667
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8668
+ * location yet — nobody stores here, the owning addon is down, or the first
8669
+ * refresh has not completed. A UI must omit the segment rather than draw it
8670
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8671
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8672
+ * be spelled out loud instead of appearing by accident.
8673
+ *
8674
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8675
+ * about the whole figure rather than about its freshest part.
8676
+ */
8677
+ owned: object({
8678
+ bytes: number().int().nonnegative(),
8679
+ measuredAtMs: number().int().nonnegative()
8680
+ }).optional(),
8722
8681
  createdAt: number(),
8723
8682
  updatedAt: number()
8724
8683
  });
8684
+ object({ isDefault: boolean().optional() });
8685
+ /**
8686
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8687
+ *
8688
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8689
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8690
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8691
+ * operator learns not to believe the screen.
8692
+ */
8693
+ var StorageDrainProgressSchema = object({
8694
+ locationId: string(),
8695
+ startedAtMs: number(),
8696
+ startBytes: number(),
8697
+ bytesRemaining: number(),
8698
+ drained: boolean(),
8699
+ estimatedEmptyAtMs: number().nullable()
8700
+ });
8725
8701
  /**
8726
8702
  * Reference accepted by consumer-facing `api.storage.*` calls.
8727
8703
  * Either:
8728
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
8704
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
8705
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8729
8706
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8730
8707
  *
8731
8708
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -8901,6 +8878,111 @@ var DecoderSessionConfigSchema = object({
8901
8878
  */
8902
8879
  debug: boolean().optional()
8903
8880
  });
8881
+ /**
8882
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
8883
+ * an addon declares its channels in.
8884
+ *
8885
+ * ## Two axes, deliberately separated
8886
+ *
8887
+ * - **DECLARATION** — which channels exist. Only the addon knows:
8888
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8889
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
8890
+ * and rots silently. So a channel is declared where it is consulted, and the
8891
+ * `log-channels` capability enumerates the declarations.
8892
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
8893
+ * thing: the logging settings document on the `system` cap. Two authorities
8894
+ * over the values is the exact defect
8895
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8896
+ * remove; re-introducing it from the cure side would be grotesque.
8897
+ *
8898
+ * Nothing in this file reads a clock, an env var or a store. The registry is
8899
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8900
+ * the hot path with a value somebody actually read, and by
8901
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8902
+ * never reaches here, so it can neither disarm an armed channel nor arm a
8903
+ * disarmed one (D49).
8904
+ *
8905
+ * ## The canonical call shape
8906
+ *
8907
+ * ```ts
8908
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8909
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8910
+ * }
8911
+ * ```
8912
+ *
8913
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8914
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
8915
+ * object literal is never constructed because it lives inside the branch. It
8916
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
8917
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
8918
+ * destination floor (measured at 1.93 ns/call when off).
8919
+ *
8920
+ * ## Why a channel emits at `info`
8921
+ *
8922
+ * `loki-logging.addon.ts` pins the destination default at `info` and
8923
+ * `loki-destination.ts` drops everything below it, so a line emitted at
8924
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8925
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
8926
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8927
+ * emits at the channel's declared level, whose schema floor is `info`.
8928
+ */
8929
+ /**
8930
+ * The level a channel writes at once armed.
8931
+ *
8932
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8933
+ * not leave the process for Loki, and the whole point of arming a channel is
8934
+ * to read it later.
8935
+ */
8936
+ var LogChannelLevelSchema = _enum([
8937
+ "info",
8938
+ "warn",
8939
+ "error"
8940
+ ]);
8941
+ /**
8942
+ * What an addon declares about one channel. No value, no state — a
8943
+ * declaration is inert.
8944
+ */
8945
+ var LogChannelDescriptorSchema = object({
8946
+ /**
8947
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8948
+ * the addon's short name so an operator reading a channel list can tell who
8949
+ * owns it without a second lookup.
8950
+ */
8951
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8952
+ /** One sentence: what the operator will SEE after arming it. */
8953
+ description: string().min(1),
8954
+ /** The level its lines are emitted at. Never below `info`. */
8955
+ defaultLevel: LogChannelLevelSchema,
8956
+ /**
8957
+ * Whether this channel can be narrowed to a camera.
8958
+ *
8959
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
8960
+ * consulted with the numeric device id, AND every line the channel admits
8961
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
8962
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8963
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8964
+ * the body is the only way to filter.
8965
+ *
8966
+ * A channel whose lines carry the device only in `meta` (or not at all) is
8967
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8968
+ * the operator narrows to one camera, sees nothing, and concludes the code
8969
+ * path was never taken.
8970
+ */
8971
+ perDevice: boolean()
8972
+ });
8973
+ /**
8974
+ * An armed window over one channel, as the document hands it to a mirror.
8975
+ *
8976
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8977
+ * expires by itself, which is the one failure a boolean cannot avoid.
8978
+ */
8979
+ var LogChannelWindowSchema = object({
8980
+ channel: string().min(1),
8981
+ /** Epoch ms the window closes at. */
8982
+ armedUntilMs: number(),
8983
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8984
+ deviceIds: array(number().int()).readonly().nullable()
8985
+ });
8904
8986
  var MODEL_FORMATS = [
8905
8987
  "onnx",
8906
8988
  "coreml",
@@ -21565,7 +21647,7 @@ method(object({
21565
21647
  downloadId: string(),
21566
21648
  offset: number(),
21567
21649
  length: number()
21568
- }), _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({
21650
+ }), _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({
21569
21651
  createdAt: true,
21570
21652
  updatedAt: true
21571
21653
  }), StorageLocationSchema, {
@@ -21577,7 +21659,7 @@ method(object({
21577
21659
  }), _void(), {
21578
21660
  kind: "mutation",
21579
21661
  auth: "admin"
21580
- }), method(object({ id: string() }), object({
21662
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21581
21663
  ok: boolean(),
21582
21664
  error: string().optional()
21583
21665
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21647,6 +21729,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21647
21729
  kind: "mutation",
21648
21730
  auth: "admin"
21649
21731
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21732
+ /**
21733
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
21734
+ * location (D388).
21735
+ *
21736
+ * ## Why this is not `storage-evictable`
21737
+ *
21738
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
21739
+ * not, in two ways that both matter and both bite hardest on the locations an
21740
+ * operator most wants a figure for:
21741
+ *
21742
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
21743
+ * and `recordingsLow:default` deliberately share one root and evict as one
21744
+ * oldest-first pool, so both answer with the SAME combined total. As an
21745
+ * occupancy figure that double-counts the disk.
21746
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
21747
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
21748
+ * is retiring and staring at.
21749
+ *
21750
+ * So this is its own contract with its own quantity, and the quantity is
21751
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
21752
+ * would ever be willing to delete it. A provider that can only answer
21753
+ * "evictable" must not register here — a number that silently means different
21754
+ * things per class is worse than no number.
21755
+ *
21756
+ * ## Absence is an answer
21757
+ *
21758
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
21759
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
21760
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
21761
+ * consuming side has to be written out loud instead of appearing by accident.
21762
+ *
21763
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
21764
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
21765
+ */
21766
+ /** One provider's occupancy answer for one location. */
21767
+ var StorageOccupancyReportSchema = object({
21768
+ locationId: string(),
21769
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
21770
+ * not net of what it is willing to delete. */
21771
+ ownedBytes: number().int().nonnegative(),
21772
+ /** When the provider last actually measured this. The orchestrator carries it
21773
+ * through so a UI can say how old the figure is instead of implying "now". */
21774
+ measuredAtMs: number().int().nonnegative()
21775
+ });
21776
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21650
21777
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21651
21778
  providerId: string().min(1),
21652
21779
  displayName: string().min(1),
@@ -23342,39 +23469,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23342
23469
  deviceId: number(),
23343
23470
  status: BatteryStatusSchema
23344
23471
  });
23345
- /**
23346
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23347
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23348
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23349
- * one Home Assistant projection.
23350
- */
23351
- var NetworkLinkStatusSchema = object({
23352
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23353
- type: _enum([
23354
- "wifi",
23355
- "ethernet",
23356
- "cellular",
23357
- "unknown"
23358
- ]),
23359
- /**
23360
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23361
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23362
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23363
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23364
- * SKIP a null rather than coerce it.
23365
- */
23366
- signalPercent: number().min(0).max(100).nullable(),
23367
- /** Raw received signal strength in dBm, when the firmware reports one. */
23368
- rssiDbm: number().optional(),
23369
- /** Network name of a wireless link, when the firmware reports it. */
23370
- ssid: string().optional(),
23371
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23372
- lastUpdated: number()
23373
- });
23374
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23375
- deviceId: number(),
23376
- status: NetworkLinkStatusSchema
23377
- });
23378
23472
  object({
23379
23473
  on: boolean(),
23380
23474
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25728,6 +25822,236 @@ DeviceType.Camera, method(object({
25728
25822
  detection: NativeDetectionSchema
25729
25823
  });
25730
25824
  /**
25825
+ * `navigation` — a device-scoped capability that natively expresses the FULL
25826
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
25827
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
25828
+ *
25829
+ * Why a NEW cap rather than overloading `ptz`:
25830
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
25831
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
25832
+ * The two are different physical models: PTZ is absolute-position + presets,
25833
+ * navigation is momentary drive nudges + discrete robot ACTIONS
25834
+ * (dock / spot-clean / follow-pet / go-to-point / …).
25835
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
25836
+ * the reverse:
25837
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
25838
+ * / `getOptions`), and
25839
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
25840
+ * robot camera shows up in the existing PTZ control path without every
25841
+ * PTZ provider learning about robots. The mapping lives in the adapter,
25842
+ * not here (see the addon design note):
25843
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
25844
+ * ptz.stop() → navigation.stop()
25845
+ * ptz.goHome() → navigation.runAction('goHome')
25846
+ * ptz.getPresets() → navigation.listActions() (id→preset)
25847
+ * ptz.goToPreset(id) → navigation.runAction(id)
25848
+ *
25849
+ * ## Continuous drive
25850
+ *
25851
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
25852
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
25853
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
25854
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
25855
+ * coalesce them. The UI owns the cadence.
25856
+ *
25857
+ * ## The action dictionary
25858
+ *
25859
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
25860
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
25861
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
25862
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
25863
+ * vendor-specific list. `kind: 'action'` entries are triggered with
25864
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
25865
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
25866
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
25867
+ *
25868
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
25869
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
25870
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
25871
+ * every device handle. A future nodedreame publish adds a typed
25872
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
25873
+ * provider can then swap the raw calls for the typed methods with no change to
25874
+ * THIS contract.
25875
+ */
25876
+ /**
25877
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
25878
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
25879
+ * halts it.
25880
+ *
25881
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
25882
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
25883
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
25884
+ * vector by it (drivers without proportional drive ignore it).
25885
+ *
25886
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
25887
+ * axis alone; an all-undefined nudge is a no-op.
25888
+ */
25889
+ var NavigationMoveCommandSchema = object({
25890
+ pan: number().min(-1).max(1).optional(),
25891
+ tilt: number().min(-1).max(1).optional(),
25892
+ speed: number().min(0).max(1).optional()
25893
+ });
25894
+ /**
25895
+ * The enumerated discrete actions a navigation-capable robot can perform via
25896
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
25897
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
25898
+ * `playSound` (see the `sound` dictionary entries).
25899
+ */
25900
+ var NavigationActionIdSchema = _enum([
25901
+ "goHome",
25902
+ "locate",
25903
+ "spotClean",
25904
+ "findPet",
25905
+ "personFollow",
25906
+ "stop",
25907
+ "startClean",
25908
+ "pauseClean",
25909
+ "dockWash",
25910
+ "autoEmpty",
25911
+ "flashOn",
25912
+ "flashOff"
25913
+ ]);
25914
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
25915
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
25916
+ /**
25917
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
25918
+ * native panel and the PTZ mimic render as a button.
25919
+ *
25920
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
25921
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
25922
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
25923
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
25924
+ * - `label` — operator-facing English label.
25925
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
25926
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
25927
+ * PTZ render ONLY enabled entries. Data-driven: the provider
25928
+ * flips it from config, never by editing code.
25929
+ */
25930
+ var NavigationActionEntrySchema = object({
25931
+ id: string(),
25932
+ kind: NavigationEntryKindSchema,
25933
+ label: string(),
25934
+ icon: string(),
25935
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
25936
+ soundId: number().int().optional(),
25937
+ /** Per-device feature flag — render this entry only when true. */
25938
+ enabled: boolean()
25939
+ });
25940
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
25941
+ var NavigationPointSchema = object({
25942
+ x: number(),
25943
+ y: number()
25944
+ });
25945
+ /**
25946
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
25947
+ * The cap reports which are enabled so the UI / PTZ render only the controls
25948
+ * that are turned on for THIS device. Data-driven: the provider derives these
25949
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
25950
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
25951
+ * that are not dictionary entries.
25952
+ *
25953
+ * - `move` / `stop` — the momentary drive joystick.
25954
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
25955
+ * map-coordinate plumbing is wired.
25956
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
25957
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
25958
+ * - `light` — the on/off fill-light toggle (works anytime).
25959
+ * - `lightMode` — the auto/manual selector + manual level slider (a
25960
+ * camera-service control; needs an active stream).
25961
+ */
25962
+ var NavigationFeaturesSchema = object({
25963
+ move: boolean(),
25964
+ stop: boolean(),
25965
+ goToPoint: boolean(),
25966
+ runAction: boolean(),
25967
+ playSound: boolean(),
25968
+ light: boolean(),
25969
+ lightMode: boolean()
25970
+ });
25971
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
25972
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
25973
+ /**
25974
+ * Live navigation state so the UI can reflect what the robot is doing:
25975
+ * - `mode` — coarse activity (idle / cleaning / following / …).
25976
+ * - `following` — person/pet follow is currently armed.
25977
+ * - `flash` — the on-camera fill light is on.
25978
+ * - `lightMode` — auto vs manual fill-light mode.
25979
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
25980
+ * `lightMode === 'manual'`.
25981
+ */
25982
+ var NavigationStatusSchema = object({
25983
+ mode: _enum([
25984
+ "idle",
25985
+ "cleaning",
25986
+ "spot",
25987
+ "following",
25988
+ "goto",
25989
+ "returning",
25990
+ "paused",
25991
+ "unknown"
25992
+ ]),
25993
+ following: boolean(),
25994
+ flash: boolean(),
25995
+ lightMode: NavigationLightModeSchema,
25996
+ lightLevel: number().min(40).max(100),
25997
+ /** Ms epoch when the slice was last updated. */
25998
+ lastChangedAt: number()
25999
+ });
26000
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26001
+ 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({
26002
+ deviceId: number(),
26003
+ actionId: NavigationActionIdSchema
26004
+ }), _void(), { kind: "mutation" }), method(object({
26005
+ deviceId: number(),
26006
+ soundId: number().int()
26007
+ }), _void(), { kind: "mutation" }), method(object({
26008
+ deviceId: number(),
26009
+ on: boolean()
26010
+ }), _void(), { kind: "mutation" }), method(object({
26011
+ deviceId: number(),
26012
+ mode: NavigationLightModeSchema,
26013
+ level: number().min(40).max(100).optional()
26014
+ }), _void(), { kind: "mutation" }), method(object({
26015
+ deviceId: number(),
26016
+ level: number().min(40).max(100)
26017
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26018
+ deviceId: number(),
26019
+ status: NavigationStatusSchema
26020
+ });
26021
+ /**
26022
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26023
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26024
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26025
+ * one Home Assistant projection.
26026
+ */
26027
+ var NetworkLinkStatusSchema = object({
26028
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26029
+ type: _enum([
26030
+ "wifi",
26031
+ "ethernet",
26032
+ "cellular",
26033
+ "unknown"
26034
+ ]),
26035
+ /**
26036
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26037
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26038
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26039
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26040
+ * SKIP a null rather than coerce it.
26041
+ */
26042
+ signalPercent: number().min(0).max(100).nullable(),
26043
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26044
+ rssiDbm: number().optional(),
26045
+ /** Network name of a wireless link, when the firmware reports it. */
26046
+ ssid: string().optional(),
26047
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26048
+ lastUpdated: number()
26049
+ });
26050
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26051
+ deviceId: number(),
26052
+ status: NetworkLinkStatusSchema
26053
+ });
26054
+ /**
25731
26055
  * network-quality — system-scoped singleton capability tracking RTT,
25732
26056
  * jitter, and observed/peak bandwidth per device + per client.
25733
26057
  *
@@ -26969,203 +27293,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
26969
27293
  deviceId: number(),
26970
27294
  status: PtzAutotrackStatusSchema
26971
27295
  });
26972
- /**
26973
- * `navigation` — a device-scoped capability that natively expresses the FULL
26974
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
26975
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
26976
- *
26977
- * Why a NEW cap rather than overloading `ptz`:
26978
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26979
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26980
- * The two are different physical models: PTZ is absolute-position + presets,
26981
- * navigation is momentary drive nudges + discrete robot ACTIONS
26982
- * (dock / spot-clean / follow-pet / go-to-point / …).
26983
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26984
- * the reverse:
26985
- * 1. a native CamStack navigation panel (data-driven from `listActions`
26986
- * / `getOptions`), and
26987
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26988
- * robot camera shows up in the existing PTZ control path without every
26989
- * PTZ provider learning about robots. The mapping lives in the adapter,
26990
- * not here (see the addon design note):
26991
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26992
- * ptz.stop() → navigation.stop()
26993
- * ptz.goHome() → navigation.runAction('goHome')
26994
- * ptz.getPresets() → navigation.listActions() (id→preset)
26995
- * ptz.goToPreset(id) → navigation.runAction(id)
26996
- *
26997
- * ## Continuous drive
26998
- *
26999
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27000
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27001
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27002
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27003
- * coalesce them. The UI owns the cadence.
27004
- *
27005
- * ## The action dictionary
27006
- *
27007
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27008
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27009
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27010
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27011
- * vendor-specific list. `kind: 'action'` entries are triggered with
27012
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27013
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27014
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27015
- *
27016
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27017
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27018
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27019
- * every device handle. A future nodedreame publish adds a typed
27020
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27021
- * provider can then swap the raw calls for the typed methods with no change to
27022
- * THIS contract.
27023
- */
27024
- /**
27025
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27026
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27027
- * halts it.
27028
- *
27029
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27030
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27031
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27032
- * vector by it (drivers without proportional drive ignore it).
27033
- *
27034
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27035
- * axis alone; an all-undefined nudge is a no-op.
27036
- */
27037
- var NavigationMoveCommandSchema = object({
27038
- pan: number().min(-1).max(1).optional(),
27039
- tilt: number().min(-1).max(1).optional(),
27040
- speed: number().min(0).max(1).optional()
27041
- });
27042
- /**
27043
- * The enumerated discrete actions a navigation-capable robot can perform via
27044
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27045
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27046
- * `playSound` (see the `sound` dictionary entries).
27047
- */
27048
- var NavigationActionIdSchema = _enum([
27049
- "goHome",
27050
- "locate",
27051
- "spotClean",
27052
- "findPet",
27053
- "personFollow",
27054
- "stop",
27055
- "startClean",
27056
- "pauseClean",
27057
- "dockWash",
27058
- "autoEmpty",
27059
- "flashOn",
27060
- "flashOff"
27061
- ]);
27062
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27063
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27064
- /**
27065
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27066
- * native panel and the PTZ mimic render as a button.
27067
- *
27068
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27069
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27070
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27071
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27072
- * - `label` — operator-facing English label.
27073
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27074
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27075
- * PTZ render ONLY enabled entries. Data-driven: the provider
27076
- * flips it from config, never by editing code.
27077
- */
27078
- var NavigationActionEntrySchema = object({
27079
- id: string(),
27080
- kind: NavigationEntryKindSchema,
27081
- label: string(),
27082
- icon: string(),
27083
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27084
- soundId: number().int().optional(),
27085
- /** Per-device feature flag — render this entry only when true. */
27086
- enabled: boolean()
27087
- });
27088
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27089
- var NavigationPointSchema = object({
27090
- x: number(),
27091
- y: number()
27092
- });
27093
- /**
27094
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27095
- * The cap reports which are enabled so the UI / PTZ render only the controls
27096
- * that are turned on for THIS device. Data-driven: the provider derives these
27097
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27098
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27099
- * that are not dictionary entries.
27100
- *
27101
- * - `move` / `stop` — the momentary drive joystick.
27102
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27103
- * map-coordinate plumbing is wired.
27104
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27105
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27106
- * - `light` — the on/off fill-light toggle (works anytime).
27107
- * - `lightMode` — the auto/manual selector + manual level slider (a
27108
- * camera-service control; needs an active stream).
27109
- */
27110
- var NavigationFeaturesSchema = object({
27111
- move: boolean(),
27112
- stop: boolean(),
27113
- goToPoint: boolean(),
27114
- runAction: boolean(),
27115
- playSound: boolean(),
27116
- light: boolean(),
27117
- lightMode: boolean()
27118
- });
27119
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27120
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27121
- /**
27122
- * Live navigation state so the UI can reflect what the robot is doing:
27123
- * - `mode` — coarse activity (idle / cleaning / following / …).
27124
- * - `following` — person/pet follow is currently armed.
27125
- * - `flash` — the on-camera fill light is on.
27126
- * - `lightMode` — auto vs manual fill-light mode.
27127
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27128
- * `lightMode === 'manual'`.
27129
- */
27130
- var NavigationStatusSchema = object({
27131
- mode: _enum([
27132
- "idle",
27133
- "cleaning",
27134
- "spot",
27135
- "following",
27136
- "goto",
27137
- "returning",
27138
- "paused",
27139
- "unknown"
27140
- ]),
27141
- following: boolean(),
27142
- flash: boolean(),
27143
- lightMode: NavigationLightModeSchema,
27144
- lightLevel: number().min(40).max(100),
27145
- /** Ms epoch when the slice was last updated. */
27146
- lastChangedAt: number()
27147
- });
27148
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27149
- 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({
27150
- deviceId: number(),
27151
- actionId: NavigationActionIdSchema
27152
- }), _void(), { kind: "mutation" }), method(object({
27153
- deviceId: number(),
27154
- soundId: number().int()
27155
- }), _void(), { kind: "mutation" }), method(object({
27156
- deviceId: number(),
27157
- on: boolean()
27158
- }), _void(), { kind: "mutation" }), method(object({
27159
- deviceId: number(),
27160
- mode: NavigationLightModeSchema,
27161
- level: number().min(40).max(100).optional()
27162
- }), _void(), { kind: "mutation" }), method(object({
27163
- deviceId: number(),
27164
- level: number().min(40).max(100)
27165
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27166
- deviceId: number(),
27167
- status: NavigationStatusSchema
27168
- });
27169
27296
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27170
27297
  kind: "mutation",
27171
27298
  auth: "admin"
@@ -34474,13 +34601,13 @@ Object.freeze({
34474
34601
  addonId: null,
34475
34602
  access: "view"
34476
34603
  },
34477
- "storage.getDefaultLocation": {
34604
+ "storage.list": {
34478
34605
  capName: "storage",
34479
34606
  capScope: "system",
34480
34607
  addonId: null,
34481
34608
  access: "view"
34482
34609
  },
34483
- "storage.list": {
34610
+ "storage.listDrainProgress": {
34484
34611
  capName: "storage",
34485
34612
  capScope: "system",
34486
34613
  addonId: null,
@@ -34630,6 +34757,12 @@ Object.freeze({
34630
34757
  addonId: null,
34631
34758
  access: "view"
34632
34759
  },
34760
+ "storageOccupancy.getOccupancy": {
34761
+ capName: "storage-occupancy",
34762
+ capScope: "system",
34763
+ addonId: null,
34764
+ access: "view"
34765
+ },
34633
34766
  "storageProvider.abortUpload": {
34634
34767
  capName: "storage-provider",
34635
34768
  capScope: "system",