@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.
@@ -1,6 +1,6 @@
1
1
  import { randomUUID } from "node:crypto";
2
2
  import * as path from "node:path";
3
- //#region ../types/dist/event-category-zAv7pMUz.mjs
3
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
4
4
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
5
5
  EventCategory["SystemBoot"] = "system.boot";
6
6
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -195,6 +195,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
195
195
  EventCategory["ProcessCrashed"] = "process.crashed";
196
196
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
197
197
  EventCategory["ProcessRestarted"] = "process.restarted";
198
+ /**
199
+ * The SET of storage locations changed — one was created, edited, enabled,
200
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
201
+ *
202
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
203
+ * it must also converge on its own periodic path, because a dropped event
204
+ * must not leave a node writing to yesterday's disk set forever. It exists
205
+ * because there was NO signal at all — an operator who added a second
206
+ * recordings disk in the admin UI got nothing, and the recorder kept its
207
+ * resolved locations until something else happened to re-resolve them
208
+ * (D387). Payload `StorageLocationsChangedPayload`.
209
+ */
210
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
198
211
  EventCategory["RecordingStarted"] = "recording.started";
199
212
  EventCategory["RecordingStopped"] = "recording.stopped";
200
213
  EventCategory["RecordingError"] = "recording.error";
@@ -7600,111 +7613,6 @@ var CameraSwitchGroupSchema = object({
7600
7613
  fetchedAt: number()
7601
7614
  });
7602
7615
  /**
7603
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7604
- * an addon declares its channels in.
7605
- *
7606
- * ## Two axes, deliberately separated
7607
- *
7608
- * - **DECLARATION** — which channels exist. Only the addon knows:
7609
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7610
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7611
- * and rots silently. So a channel is declared where it is consulted, and the
7612
- * `log-channels` capability enumerates the declarations.
7613
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7614
- * thing: the logging settings document on the `system` cap. Two authorities
7615
- * over the values is the exact defect
7616
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7617
- * remove; re-introducing it from the cure side would be grotesque.
7618
- *
7619
- * Nothing in this file reads a clock, an env var or a store. The registry is
7620
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7621
- * the hot path with a value somebody actually read, and by
7622
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7623
- * never reaches here, so it can neither disarm an armed channel nor arm a
7624
- * disarmed one (D49).
7625
- *
7626
- * ## The canonical call shape
7627
- *
7628
- * ```ts
7629
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7630
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7631
- * }
7632
- * ```
7633
- *
7634
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7635
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7636
- * object literal is never constructed because it lives inside the branch. It
7637
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7638
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7639
- * destination floor (measured at 1.93 ns/call when off).
7640
- *
7641
- * ## Why a channel emits at `info`
7642
- *
7643
- * `loki-logging.addon.ts` pins the destination default at `info` and
7644
- * `loki-destination.ts` drops everything below it, so a line emitted at
7645
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7646
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7647
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7648
- * emits at the channel's declared level, whose schema floor is `info`.
7649
- */
7650
- /**
7651
- * The level a channel writes at once armed.
7652
- *
7653
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7654
- * not leave the process for Loki, and the whole point of arming a channel is
7655
- * to read it later.
7656
- */
7657
- var LogChannelLevelSchema = _enum([
7658
- "info",
7659
- "warn",
7660
- "error"
7661
- ]);
7662
- /**
7663
- * What an addon declares about one channel. No value, no state — a
7664
- * declaration is inert.
7665
- */
7666
- var LogChannelDescriptorSchema = object({
7667
- /**
7668
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7669
- * the addon's short name so an operator reading a channel list can tell who
7670
- * owns it without a second lookup.
7671
- */
7672
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7673
- /** One sentence: what the operator will SEE after arming it. */
7674
- description: string().min(1),
7675
- /** The level its lines are emitted at. Never below `info`. */
7676
- defaultLevel: LogChannelLevelSchema,
7677
- /**
7678
- * Whether this channel can be narrowed to a camera.
7679
- *
7680
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7681
- * consulted with the numeric device id, AND every line the channel admits
7682
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7683
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7684
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7685
- * the body is the only way to filter.
7686
- *
7687
- * A channel whose lines carry the device only in `meta` (or not at all) is
7688
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7689
- * the operator narrows to one camera, sees nothing, and concludes the code
7690
- * path was never taken.
7691
- */
7692
- perDevice: boolean()
7693
- });
7694
- /**
7695
- * An armed window over one channel, as the document hands it to a mirror.
7696
- *
7697
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7698
- * expires by itself, which is the one failure a boolean cannot avoid.
7699
- */
7700
- var LogChannelWindowSchema = object({
7701
- channel: string().min(1),
7702
- /** Epoch ms the window closes at. */
7703
- armedUntilMs: number(),
7704
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7705
- deviceIds: array(number().int()).readonly().nullable()
7706
- });
7707
- /**
7708
7616
  * Ops-log — the durable, append-only operations audit shared by the
7709
7617
  * recordings and events management surfaces.
7710
7618
  *
@@ -8626,6 +8534,21 @@ var StorageCleanupJobSchema = object({
8626
8534
  });
8627
8535
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8628
8536
  /**
8537
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8538
+ * alias below is `z.infer<>` of it, never a second spelling.
8539
+ */
8540
+ var StorageLocationModeSchema = _enum([
8541
+ "active",
8542
+ "readonly",
8543
+ "drain",
8544
+ "disabled"
8545
+ ]);
8546
+ _enum([
8547
+ "normal",
8548
+ "never",
8549
+ "drain"
8550
+ ]);
8551
+ /**
8629
8552
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8630
8553
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8631
8554
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8650,8 +8573,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8650
8573
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8651
8574
  *
8652
8575
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8653
- * The default location for a type uses `id === <type>:default` by
8654
- * convention (the bare type ref like `'backups'` resolves to it).
8576
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8577
+ * There is no default location any more (D383): `enabled` is the whole write
8578
+ * model, and a bare type ref resolves to the sole location of the type, or —
8579
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8580
+ * slug is `default`.
8655
8581
  *
8656
8582
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8657
8583
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8672,23 +8598,37 @@ var StorageLocationSchema = object({
8672
8598
  * flag at upsert time, not here (the schema is provider-agnostic).
8673
8599
  */
8674
8600
  nodeId: string().optional(),
8675
- isDefault: boolean().default(false),
8676
8601
  isSystem: boolean().default(false),
8677
8602
  /**
8678
- * Operator opt-in: whether consumers that BALANCE across several locations
8679
- * of a type may write here. Recordings reads it today; event media and
8680
- * backups are the next consumers, which is why the flag lives on the
8681
- * location rather than in any one addon's store nothing has to be
8682
- * extended to add the next consumer.
8603
+ * THE write switch, and the only one (D383). `enabled: true` means every
8604
+ * consumer that chooses a write target for this type may write here, and all
8605
+ * enabled locations of a type are used TOGETHER; `false` means read-only
8606
+ * still read, still played back, still age-swept, still drained, never
8607
+ * written.
8683
8608
  *
8684
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8685
- * flag existed reads back with no flag and keeps working exactly as before;
8686
- * that is the whole compat story, and it is why no migration ships with it.
8687
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8688
- * disk must not silently start writing to it); the default of a type is
8689
- * always stamped `true`.
8609
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8610
+ * stored" on an update and "born inert unless it is the first location of its
8611
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8612
+ * enabled {@link isLocationEnabled} is the one place that says so, and the
8613
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8614
+ * stops existing rather than being re-derived on every read.
8690
8615
  */
8691
8616
  enabled: boolean().optional(),
8617
+ /**
8618
+ * THE state of this location (D385), and the only authority on what may be
8619
+ * written, read or evicted here. Interpreted in exactly one place —
8620
+ * `storage-location-mode.ts` — which also folds the legacy
8621
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8622
+ * ambiguous.
8623
+ *
8624
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8625
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8626
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8627
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8628
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8629
+ * either, so the two cannot disagree.
8630
+ */
8631
+ mode: StorageLocationModeSchema.optional(),
8692
8632
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8693
8633
  * for node-local locations it can reach) — never persisted, absent when the
8694
8634
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8696,13 +8636,50 @@ var StorageLocationSchema = object({
8696
8636
  totalBytes: number(),
8697
8637
  availableBytes: number()
8698
8638
  }).nullable().optional(),
8639
+ /**
8640
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8641
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8642
+ * never persisted, never a filesystem walk.
8643
+ *
8644
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8645
+ * location yet — nobody stores here, the owning addon is down, or the first
8646
+ * refresh has not completed. A UI must omit the segment rather than draw it
8647
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8648
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8649
+ * be spelled out loud instead of appearing by accident.
8650
+ *
8651
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8652
+ * about the whole figure rather than about its freshest part.
8653
+ */
8654
+ owned: object({
8655
+ bytes: number().int().nonnegative(),
8656
+ measuredAtMs: number().int().nonnegative()
8657
+ }).optional(),
8699
8658
  createdAt: number(),
8700
8659
  updatedAt: number()
8701
8660
  });
8661
+ object({ isDefault: boolean().optional() });
8662
+ /**
8663
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8664
+ *
8665
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8666
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8667
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8668
+ * operator learns not to believe the screen.
8669
+ */
8670
+ var StorageDrainProgressSchema = object({
8671
+ locationId: string(),
8672
+ startedAtMs: number(),
8673
+ startBytes: number(),
8674
+ bytesRemaining: number(),
8675
+ drained: boolean(),
8676
+ estimatedEmptyAtMs: number().nullable()
8677
+ });
8702
8678
  /**
8703
8679
  * Reference accepted by consumer-facing `api.storage.*` calls.
8704
8680
  * Either:
8705
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
8681
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
8682
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8706
8683
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8707
8684
  *
8708
8685
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -8878,6 +8855,111 @@ var DecoderSessionConfigSchema = object({
8878
8855
  */
8879
8856
  debug: boolean().optional()
8880
8857
  });
8858
+ /**
8859
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
8860
+ * an addon declares its channels in.
8861
+ *
8862
+ * ## Two axes, deliberately separated
8863
+ *
8864
+ * - **DECLARATION** — which channels exist. Only the addon knows:
8865
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8866
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
8867
+ * and rots silently. So a channel is declared where it is consulted, and the
8868
+ * `log-channels` capability enumerates the declarations.
8869
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
8870
+ * thing: the logging settings document on the `system` cap. Two authorities
8871
+ * over the values is the exact defect
8872
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8873
+ * remove; re-introducing it from the cure side would be grotesque.
8874
+ *
8875
+ * Nothing in this file reads a clock, an env var or a store. The registry is
8876
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8877
+ * the hot path with a value somebody actually read, and by
8878
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8879
+ * never reaches here, so it can neither disarm an armed channel nor arm a
8880
+ * disarmed one (D49).
8881
+ *
8882
+ * ## The canonical call shape
8883
+ *
8884
+ * ```ts
8885
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8886
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8887
+ * }
8888
+ * ```
8889
+ *
8890
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8891
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
8892
+ * object literal is never constructed because it lives inside the branch. It
8893
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
8894
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
8895
+ * destination floor (measured at 1.93 ns/call when off).
8896
+ *
8897
+ * ## Why a channel emits at `info`
8898
+ *
8899
+ * `loki-logging.addon.ts` pins the destination default at `info` and
8900
+ * `loki-destination.ts` drops everything below it, so a line emitted at
8901
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8902
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
8903
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8904
+ * emits at the channel's declared level, whose schema floor is `info`.
8905
+ */
8906
+ /**
8907
+ * The level a channel writes at once armed.
8908
+ *
8909
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8910
+ * not leave the process for Loki, and the whole point of arming a channel is
8911
+ * to read it later.
8912
+ */
8913
+ var LogChannelLevelSchema = _enum([
8914
+ "info",
8915
+ "warn",
8916
+ "error"
8917
+ ]);
8918
+ /**
8919
+ * What an addon declares about one channel. No value, no state — a
8920
+ * declaration is inert.
8921
+ */
8922
+ var LogChannelDescriptorSchema = object({
8923
+ /**
8924
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8925
+ * the addon's short name so an operator reading a channel list can tell who
8926
+ * owns it without a second lookup.
8927
+ */
8928
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8929
+ /** One sentence: what the operator will SEE after arming it. */
8930
+ description: string().min(1),
8931
+ /** The level its lines are emitted at. Never below `info`. */
8932
+ defaultLevel: LogChannelLevelSchema,
8933
+ /**
8934
+ * Whether this channel can be narrowed to a camera.
8935
+ *
8936
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
8937
+ * consulted with the numeric device id, AND every line the channel admits
8938
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
8939
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8940
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8941
+ * the body is the only way to filter.
8942
+ *
8943
+ * A channel whose lines carry the device only in `meta` (or not at all) is
8944
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8945
+ * the operator narrows to one camera, sees nothing, and concludes the code
8946
+ * path was never taken.
8947
+ */
8948
+ perDevice: boolean()
8949
+ });
8950
+ /**
8951
+ * An armed window over one channel, as the document hands it to a mirror.
8952
+ *
8953
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8954
+ * expires by itself, which is the one failure a boolean cannot avoid.
8955
+ */
8956
+ var LogChannelWindowSchema = object({
8957
+ channel: string().min(1),
8958
+ /** Epoch ms the window closes at. */
8959
+ armedUntilMs: number(),
8960
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8961
+ deviceIds: array(number().int()).readonly().nullable()
8962
+ });
8881
8963
  var MODEL_FORMATS = [
8882
8964
  "onnx",
8883
8965
  "coreml",
@@ -21542,7 +21624,7 @@ method(object({
21542
21624
  downloadId: string(),
21543
21625
  offset: number(),
21544
21626
  length: number()
21545
- }), _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({
21627
+ }), _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({
21546
21628
  createdAt: true,
21547
21629
  updatedAt: true
21548
21630
  }), StorageLocationSchema, {
@@ -21554,7 +21636,7 @@ method(object({
21554
21636
  }), _void(), {
21555
21637
  kind: "mutation",
21556
21638
  auth: "admin"
21557
- }), method(object({ id: string() }), object({
21639
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21558
21640
  ok: boolean(),
21559
21641
  error: string().optional()
21560
21642
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21624,6 +21706,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21624
21706
  kind: "mutation",
21625
21707
  auth: "admin"
21626
21708
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21709
+ /**
21710
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
21711
+ * location (D388).
21712
+ *
21713
+ * ## Why this is not `storage-evictable`
21714
+ *
21715
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
21716
+ * not, in two ways that both matter and both bite hardest on the locations an
21717
+ * operator most wants a figure for:
21718
+ *
21719
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
21720
+ * and `recordingsLow:default` deliberately share one root and evict as one
21721
+ * oldest-first pool, so both answer with the SAME combined total. As an
21722
+ * occupancy figure that double-counts the disk.
21723
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
21724
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
21725
+ * is retiring and staring at.
21726
+ *
21727
+ * So this is its own contract with its own quantity, and the quantity is
21728
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
21729
+ * would ever be willing to delete it. A provider that can only answer
21730
+ * "evictable" must not register here — a number that silently means different
21731
+ * things per class is worse than no number.
21732
+ *
21733
+ * ## Absence is an answer
21734
+ *
21735
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
21736
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
21737
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
21738
+ * consuming side has to be written out loud instead of appearing by accident.
21739
+ *
21740
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
21741
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
21742
+ */
21743
+ /** One provider's occupancy answer for one location. */
21744
+ var StorageOccupancyReportSchema = object({
21745
+ locationId: string(),
21746
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
21747
+ * not net of what it is willing to delete. */
21748
+ ownedBytes: number().int().nonnegative(),
21749
+ /** When the provider last actually measured this. The orchestrator carries it
21750
+ * through so a UI can say how old the figure is instead of implying "now". */
21751
+ measuredAtMs: number().int().nonnegative()
21752
+ });
21753
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21627
21754
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21628
21755
  providerId: string().min(1),
21629
21756
  displayName: string().min(1),
@@ -23319,39 +23446,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23319
23446
  deviceId: number(),
23320
23447
  status: BatteryStatusSchema
23321
23448
  });
23322
- /**
23323
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23324
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23325
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23326
- * one Home Assistant projection.
23327
- */
23328
- var NetworkLinkStatusSchema = object({
23329
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23330
- type: _enum([
23331
- "wifi",
23332
- "ethernet",
23333
- "cellular",
23334
- "unknown"
23335
- ]),
23336
- /**
23337
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23338
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23339
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23340
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23341
- * SKIP a null rather than coerce it.
23342
- */
23343
- signalPercent: number().min(0).max(100).nullable(),
23344
- /** Raw received signal strength in dBm, when the firmware reports one. */
23345
- rssiDbm: number().optional(),
23346
- /** Network name of a wireless link, when the firmware reports it. */
23347
- ssid: string().optional(),
23348
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23349
- lastUpdated: number()
23350
- });
23351
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23352
- deviceId: number(),
23353
- status: NetworkLinkStatusSchema
23354
- });
23355
23449
  object({
23356
23450
  on: boolean(),
23357
23451
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25705,6 +25799,236 @@ DeviceType.Camera, method(object({
25705
25799
  detection: NativeDetectionSchema
25706
25800
  });
25707
25801
  /**
25802
+ * `navigation` — a device-scoped capability that natively expresses the FULL
25803
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
25804
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
25805
+ *
25806
+ * Why a NEW cap rather than overloading `ptz`:
25807
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
25808
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
25809
+ * The two are different physical models: PTZ is absolute-position + presets,
25810
+ * navigation is momentary drive nudges + discrete robot ACTIONS
25811
+ * (dock / spot-clean / follow-pet / go-to-point / …).
25812
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
25813
+ * the reverse:
25814
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
25815
+ * / `getOptions`), and
25816
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
25817
+ * robot camera shows up in the existing PTZ control path without every
25818
+ * PTZ provider learning about robots. The mapping lives in the adapter,
25819
+ * not here (see the addon design note):
25820
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
25821
+ * ptz.stop() → navigation.stop()
25822
+ * ptz.goHome() → navigation.runAction('goHome')
25823
+ * ptz.getPresets() → navigation.listActions() (id→preset)
25824
+ * ptz.goToPreset(id) → navigation.runAction(id)
25825
+ *
25826
+ * ## Continuous drive
25827
+ *
25828
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
25829
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
25830
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
25831
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
25832
+ * coalesce them. The UI owns the cadence.
25833
+ *
25834
+ * ## The action dictionary
25835
+ *
25836
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
25837
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
25838
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
25839
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
25840
+ * vendor-specific list. `kind: 'action'` entries are triggered with
25841
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
25842
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
25843
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
25844
+ *
25845
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
25846
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
25847
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
25848
+ * every device handle. A future nodedreame publish adds a typed
25849
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
25850
+ * provider can then swap the raw calls for the typed methods with no change to
25851
+ * THIS contract.
25852
+ */
25853
+ /**
25854
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
25855
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
25856
+ * halts it.
25857
+ *
25858
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
25859
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
25860
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
25861
+ * vector by it (drivers without proportional drive ignore it).
25862
+ *
25863
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
25864
+ * axis alone; an all-undefined nudge is a no-op.
25865
+ */
25866
+ var NavigationMoveCommandSchema = object({
25867
+ pan: number().min(-1).max(1).optional(),
25868
+ tilt: number().min(-1).max(1).optional(),
25869
+ speed: number().min(0).max(1).optional()
25870
+ });
25871
+ /**
25872
+ * The enumerated discrete actions a navigation-capable robot can perform via
25873
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
25874
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
25875
+ * `playSound` (see the `sound` dictionary entries).
25876
+ */
25877
+ var NavigationActionIdSchema = _enum([
25878
+ "goHome",
25879
+ "locate",
25880
+ "spotClean",
25881
+ "findPet",
25882
+ "personFollow",
25883
+ "stop",
25884
+ "startClean",
25885
+ "pauseClean",
25886
+ "dockWash",
25887
+ "autoEmpty",
25888
+ "flashOn",
25889
+ "flashOff"
25890
+ ]);
25891
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
25892
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
25893
+ /**
25894
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
25895
+ * native panel and the PTZ mimic render as a button.
25896
+ *
25897
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
25898
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
25899
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
25900
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
25901
+ * - `label` — operator-facing English label.
25902
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
25903
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
25904
+ * PTZ render ONLY enabled entries. Data-driven: the provider
25905
+ * flips it from config, never by editing code.
25906
+ */
25907
+ var NavigationActionEntrySchema = object({
25908
+ id: string(),
25909
+ kind: NavigationEntryKindSchema,
25910
+ label: string(),
25911
+ icon: string(),
25912
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
25913
+ soundId: number().int().optional(),
25914
+ /** Per-device feature flag — render this entry only when true. */
25915
+ enabled: boolean()
25916
+ });
25917
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
25918
+ var NavigationPointSchema = object({
25919
+ x: number(),
25920
+ y: number()
25921
+ });
25922
+ /**
25923
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
25924
+ * The cap reports which are enabled so the UI / PTZ render only the controls
25925
+ * that are turned on for THIS device. Data-driven: the provider derives these
25926
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
25927
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
25928
+ * that are not dictionary entries.
25929
+ *
25930
+ * - `move` / `stop` — the momentary drive joystick.
25931
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
25932
+ * map-coordinate plumbing is wired.
25933
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
25934
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
25935
+ * - `light` — the on/off fill-light toggle (works anytime).
25936
+ * - `lightMode` — the auto/manual selector + manual level slider (a
25937
+ * camera-service control; needs an active stream).
25938
+ */
25939
+ var NavigationFeaturesSchema = object({
25940
+ move: boolean(),
25941
+ stop: boolean(),
25942
+ goToPoint: boolean(),
25943
+ runAction: boolean(),
25944
+ playSound: boolean(),
25945
+ light: boolean(),
25946
+ lightMode: boolean()
25947
+ });
25948
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
25949
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
25950
+ /**
25951
+ * Live navigation state so the UI can reflect what the robot is doing:
25952
+ * - `mode` — coarse activity (idle / cleaning / following / …).
25953
+ * - `following` — person/pet follow is currently armed.
25954
+ * - `flash` — the on-camera fill light is on.
25955
+ * - `lightMode` — auto vs manual fill-light mode.
25956
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
25957
+ * `lightMode === 'manual'`.
25958
+ */
25959
+ var NavigationStatusSchema = object({
25960
+ mode: _enum([
25961
+ "idle",
25962
+ "cleaning",
25963
+ "spot",
25964
+ "following",
25965
+ "goto",
25966
+ "returning",
25967
+ "paused",
25968
+ "unknown"
25969
+ ]),
25970
+ following: boolean(),
25971
+ flash: boolean(),
25972
+ lightMode: NavigationLightModeSchema,
25973
+ lightLevel: number().min(40).max(100),
25974
+ /** Ms epoch when the slice was last updated. */
25975
+ lastChangedAt: number()
25976
+ });
25977
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
25978
+ 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({
25979
+ deviceId: number(),
25980
+ actionId: NavigationActionIdSchema
25981
+ }), _void(), { kind: "mutation" }), method(object({
25982
+ deviceId: number(),
25983
+ soundId: number().int()
25984
+ }), _void(), { kind: "mutation" }), method(object({
25985
+ deviceId: number(),
25986
+ on: boolean()
25987
+ }), _void(), { kind: "mutation" }), method(object({
25988
+ deviceId: number(),
25989
+ mode: NavigationLightModeSchema,
25990
+ level: number().min(40).max(100).optional()
25991
+ }), _void(), { kind: "mutation" }), method(object({
25992
+ deviceId: number(),
25993
+ level: number().min(40).max(100)
25994
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
25995
+ deviceId: number(),
25996
+ status: NavigationStatusSchema
25997
+ });
25998
+ /**
25999
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26000
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26001
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26002
+ * one Home Assistant projection.
26003
+ */
26004
+ var NetworkLinkStatusSchema = object({
26005
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26006
+ type: _enum([
26007
+ "wifi",
26008
+ "ethernet",
26009
+ "cellular",
26010
+ "unknown"
26011
+ ]),
26012
+ /**
26013
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26014
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26015
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26016
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26017
+ * SKIP a null rather than coerce it.
26018
+ */
26019
+ signalPercent: number().min(0).max(100).nullable(),
26020
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26021
+ rssiDbm: number().optional(),
26022
+ /** Network name of a wireless link, when the firmware reports it. */
26023
+ ssid: string().optional(),
26024
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26025
+ lastUpdated: number()
26026
+ });
26027
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26028
+ deviceId: number(),
26029
+ status: NetworkLinkStatusSchema
26030
+ });
26031
+ /**
25708
26032
  * network-quality — system-scoped singleton capability tracking RTT,
25709
26033
  * jitter, and observed/peak bandwidth per device + per client.
25710
26034
  *
@@ -26946,203 +27270,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
26946
27270
  deviceId: number(),
26947
27271
  status: PtzAutotrackStatusSchema
26948
27272
  });
26949
- /**
26950
- * `navigation` — a device-scoped capability that natively expresses the FULL
26951
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
26952
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
26953
- *
26954
- * Why a NEW cap rather than overloading `ptz`:
26955
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26956
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26957
- * The two are different physical models: PTZ is absolute-position + presets,
26958
- * navigation is momentary drive nudges + discrete robot ACTIONS
26959
- * (dock / spot-clean / follow-pet / go-to-point / …).
26960
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26961
- * the reverse:
26962
- * 1. a native CamStack navigation panel (data-driven from `listActions`
26963
- * / `getOptions`), and
26964
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26965
- * robot camera shows up in the existing PTZ control path without every
26966
- * PTZ provider learning about robots. The mapping lives in the adapter,
26967
- * not here (see the addon design note):
26968
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26969
- * ptz.stop() → navigation.stop()
26970
- * ptz.goHome() → navigation.runAction('goHome')
26971
- * ptz.getPresets() → navigation.listActions() (id→preset)
26972
- * ptz.goToPreset(id) → navigation.runAction(id)
26973
- *
26974
- * ## Continuous drive
26975
- *
26976
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26977
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26978
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26979
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26980
- * coalesce them. The UI owns the cadence.
26981
- *
26982
- * ## The action dictionary
26983
- *
26984
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26985
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26986
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26987
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26988
- * vendor-specific list. `kind: 'action'` entries are triggered with
26989
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26990
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
26991
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26992
- *
26993
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26994
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26995
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
26996
- * every device handle. A future nodedreame publish adds a typed
26997
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26998
- * provider can then swap the raw calls for the typed methods with no change to
26999
- * THIS contract.
27000
- */
27001
- /**
27002
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27003
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27004
- * halts it.
27005
- *
27006
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27007
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27008
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27009
- * vector by it (drivers without proportional drive ignore it).
27010
- *
27011
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27012
- * axis alone; an all-undefined nudge is a no-op.
27013
- */
27014
- var NavigationMoveCommandSchema = object({
27015
- pan: number().min(-1).max(1).optional(),
27016
- tilt: number().min(-1).max(1).optional(),
27017
- speed: number().min(0).max(1).optional()
27018
- });
27019
- /**
27020
- * The enumerated discrete actions a navigation-capable robot can perform via
27021
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27022
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27023
- * `playSound` (see the `sound` dictionary entries).
27024
- */
27025
- var NavigationActionIdSchema = _enum([
27026
- "goHome",
27027
- "locate",
27028
- "spotClean",
27029
- "findPet",
27030
- "personFollow",
27031
- "stop",
27032
- "startClean",
27033
- "pauseClean",
27034
- "dockWash",
27035
- "autoEmpty",
27036
- "flashOn",
27037
- "flashOff"
27038
- ]);
27039
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27040
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27041
- /**
27042
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27043
- * native panel and the PTZ mimic render as a button.
27044
- *
27045
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27046
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27047
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27048
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27049
- * - `label` — operator-facing English label.
27050
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27051
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27052
- * PTZ render ONLY enabled entries. Data-driven: the provider
27053
- * flips it from config, never by editing code.
27054
- */
27055
- var NavigationActionEntrySchema = object({
27056
- id: string(),
27057
- kind: NavigationEntryKindSchema,
27058
- label: string(),
27059
- icon: string(),
27060
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27061
- soundId: number().int().optional(),
27062
- /** Per-device feature flag — render this entry only when true. */
27063
- enabled: boolean()
27064
- });
27065
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27066
- var NavigationPointSchema = object({
27067
- x: number(),
27068
- y: number()
27069
- });
27070
- /**
27071
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27072
- * The cap reports which are enabled so the UI / PTZ render only the controls
27073
- * that are turned on for THIS device. Data-driven: the provider derives these
27074
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27075
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27076
- * that are not dictionary entries.
27077
- *
27078
- * - `move` / `stop` — the momentary drive joystick.
27079
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27080
- * map-coordinate plumbing is wired.
27081
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27082
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27083
- * - `light` — the on/off fill-light toggle (works anytime).
27084
- * - `lightMode` — the auto/manual selector + manual level slider (a
27085
- * camera-service control; needs an active stream).
27086
- */
27087
- var NavigationFeaturesSchema = object({
27088
- move: boolean(),
27089
- stop: boolean(),
27090
- goToPoint: boolean(),
27091
- runAction: boolean(),
27092
- playSound: boolean(),
27093
- light: boolean(),
27094
- lightMode: boolean()
27095
- });
27096
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27097
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27098
- /**
27099
- * Live navigation state so the UI can reflect what the robot is doing:
27100
- * - `mode` — coarse activity (idle / cleaning / following / …).
27101
- * - `following` — person/pet follow is currently armed.
27102
- * - `flash` — the on-camera fill light is on.
27103
- * - `lightMode` — auto vs manual fill-light mode.
27104
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27105
- * `lightMode === 'manual'`.
27106
- */
27107
- var NavigationStatusSchema = object({
27108
- mode: _enum([
27109
- "idle",
27110
- "cleaning",
27111
- "spot",
27112
- "following",
27113
- "goto",
27114
- "returning",
27115
- "paused",
27116
- "unknown"
27117
- ]),
27118
- following: boolean(),
27119
- flash: boolean(),
27120
- lightMode: NavigationLightModeSchema,
27121
- lightLevel: number().min(40).max(100),
27122
- /** Ms epoch when the slice was last updated. */
27123
- lastChangedAt: number()
27124
- });
27125
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27126
- 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({
27127
- deviceId: number(),
27128
- actionId: NavigationActionIdSchema
27129
- }), _void(), { kind: "mutation" }), method(object({
27130
- deviceId: number(),
27131
- soundId: number().int()
27132
- }), _void(), { kind: "mutation" }), method(object({
27133
- deviceId: number(),
27134
- on: boolean()
27135
- }), _void(), { kind: "mutation" }), method(object({
27136
- deviceId: number(),
27137
- mode: NavigationLightModeSchema,
27138
- level: number().min(40).max(100).optional()
27139
- }), _void(), { kind: "mutation" }), method(object({
27140
- deviceId: number(),
27141
- level: number().min(40).max(100)
27142
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27143
- deviceId: number(),
27144
- status: NavigationStatusSchema
27145
- });
27146
27273
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27147
27274
  kind: "mutation",
27148
27275
  auth: "admin"
@@ -34451,13 +34578,13 @@ Object.freeze({
34451
34578
  addonId: null,
34452
34579
  access: "view"
34453
34580
  },
34454
- "storage.getDefaultLocation": {
34581
+ "storage.list": {
34455
34582
  capName: "storage",
34456
34583
  capScope: "system",
34457
34584
  addonId: null,
34458
34585
  access: "view"
34459
34586
  },
34460
- "storage.list": {
34587
+ "storage.listDrainProgress": {
34461
34588
  capName: "storage",
34462
34589
  capScope: "system",
34463
34590
  addonId: null,
@@ -34607,6 +34734,12 @@ Object.freeze({
34607
34734
  addonId: null,
34608
34735
  access: "view"
34609
34736
  },
34737
+ "storageOccupancy.getOccupancy": {
34738
+ capName: "storage-occupancy",
34739
+ capScope: "system",
34740
+ addonId: null,
34741
+ access: "view"
34742
+ },
34610
34743
  "storageProvider.abortUpload": {
34611
34744
  capName: "storage-provider",
34612
34745
  capScope: "system",