@camstack/addon-decoder-nodeav 1.2.78 → 1.2.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +488 -355
  2. package/dist/index.mjs +488 -355
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { randomUUID } from "node:crypto";
2
- //#region ../types/dist/event-category-zAv7pMUz.mjs
2
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -194,6 +194,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
194
194
  EventCategory["ProcessCrashed"] = "process.crashed";
195
195
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
196
196
  EventCategory["ProcessRestarted"] = "process.restarted";
197
+ /**
198
+ * The SET of storage locations changed — one was created, edited, enabled,
199
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
200
+ *
201
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
202
+ * it must also converge on its own periodic path, because a dropped event
203
+ * must not leave a node writing to yesterday's disk set forever. It exists
204
+ * because there was NO signal at all — an operator who added a second
205
+ * recordings disk in the admin UI got nothing, and the recorder kept its
206
+ * resolved locations until something else happened to re-resolve them
207
+ * (D387). Payload `StorageLocationsChangedPayload`.
208
+ */
209
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
197
210
  EventCategory["RecordingStarted"] = "recording.started";
198
211
  EventCategory["RecordingStopped"] = "recording.stopped";
199
212
  EventCategory["RecordingError"] = "recording.error";
@@ -7611,111 +7624,6 @@ var CameraSwitchGroupSchema = object({
7611
7624
  fetchedAt: number()
7612
7625
  });
7613
7626
  /**
7614
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7615
- * an addon declares its channels in.
7616
- *
7617
- * ## Two axes, deliberately separated
7618
- *
7619
- * - **DECLARATION** — which channels exist. Only the addon knows:
7620
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7621
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7622
- * and rots silently. So a channel is declared where it is consulted, and the
7623
- * `log-channels` capability enumerates the declarations.
7624
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7625
- * thing: the logging settings document on the `system` cap. Two authorities
7626
- * over the values is the exact defect
7627
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7628
- * remove; re-introducing it from the cure side would be grotesque.
7629
- *
7630
- * Nothing in this file reads a clock, an env var or a store. The registry is
7631
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7632
- * the hot path with a value somebody actually read, and by
7633
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7634
- * never reaches here, so it can neither disarm an armed channel nor arm a
7635
- * disarmed one (D49).
7636
- *
7637
- * ## The canonical call shape
7638
- *
7639
- * ```ts
7640
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7641
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7642
- * }
7643
- * ```
7644
- *
7645
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7646
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7647
- * object literal is never constructed because it lives inside the branch. It
7648
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7649
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7650
- * destination floor (measured at 1.93 ns/call when off).
7651
- *
7652
- * ## Why a channel emits at `info`
7653
- *
7654
- * `loki-logging.addon.ts` pins the destination default at `info` and
7655
- * `loki-destination.ts` drops everything below it, so a line emitted at
7656
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7657
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7658
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7659
- * emits at the channel's declared level, whose schema floor is `info`.
7660
- */
7661
- /**
7662
- * The level a channel writes at once armed.
7663
- *
7664
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7665
- * not leave the process for Loki, and the whole point of arming a channel is
7666
- * to read it later.
7667
- */
7668
- var LogChannelLevelSchema = _enum([
7669
- "info",
7670
- "warn",
7671
- "error"
7672
- ]);
7673
- /**
7674
- * What an addon declares about one channel. No value, no state — a
7675
- * declaration is inert.
7676
- */
7677
- var LogChannelDescriptorSchema = object({
7678
- /**
7679
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7680
- * the addon's short name so an operator reading a channel list can tell who
7681
- * owns it without a second lookup.
7682
- */
7683
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7684
- /** One sentence: what the operator will SEE after arming it. */
7685
- description: string().min(1),
7686
- /** The level its lines are emitted at. Never below `info`. */
7687
- defaultLevel: LogChannelLevelSchema,
7688
- /**
7689
- * Whether this channel can be narrowed to a camera.
7690
- *
7691
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7692
- * consulted with the numeric device id, AND every line the channel admits
7693
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7694
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7695
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7696
- * the body is the only way to filter.
7697
- *
7698
- * A channel whose lines carry the device only in `meta` (or not at all) is
7699
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7700
- * the operator narrows to one camera, sees nothing, and concludes the code
7701
- * path was never taken.
7702
- */
7703
- perDevice: boolean()
7704
- });
7705
- /**
7706
- * An armed window over one channel, as the document hands it to a mirror.
7707
- *
7708
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7709
- * expires by itself, which is the one failure a boolean cannot avoid.
7710
- */
7711
- var LogChannelWindowSchema = object({
7712
- channel: string().min(1),
7713
- /** Epoch ms the window closes at. */
7714
- armedUntilMs: number(),
7715
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7716
- deviceIds: array(number().int()).readonly().nullable()
7717
- });
7718
- /**
7719
7627
  * Ops-log — the durable, append-only operations audit shared by the
7720
7628
  * recordings and events management surfaces.
7721
7629
  *
@@ -8637,6 +8545,21 @@ var StorageCleanupJobSchema = object({
8637
8545
  });
8638
8546
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8639
8547
  /**
8548
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8549
+ * alias below is `z.infer<>` of it, never a second spelling.
8550
+ */
8551
+ var StorageLocationModeSchema = _enum([
8552
+ "active",
8553
+ "readonly",
8554
+ "drain",
8555
+ "disabled"
8556
+ ]);
8557
+ _enum([
8558
+ "normal",
8559
+ "never",
8560
+ "drain"
8561
+ ]);
8562
+ /**
8640
8563
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8641
8564
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8642
8565
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8661,8 +8584,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8661
8584
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8662
8585
  *
8663
8586
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8664
- * The default location for a type uses `id === <type>:default` by
8665
- * convention (the bare type ref like `'backups'` resolves to it).
8587
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8588
+ * There is no default location any more (D383): `enabled` is the whole write
8589
+ * model, and a bare type ref resolves to the sole location of the type, or —
8590
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8591
+ * slug is `default`.
8666
8592
  *
8667
8593
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8668
8594
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8683,23 +8609,37 @@ var StorageLocationSchema = object({
8683
8609
  * flag at upsert time, not here (the schema is provider-agnostic).
8684
8610
  */
8685
8611
  nodeId: string().optional(),
8686
- isDefault: boolean().default(false),
8687
8612
  isSystem: boolean().default(false),
8688
8613
  /**
8689
- * Operator opt-in: whether consumers that BALANCE across several locations
8690
- * of a type may write here. Recordings reads it today; event media and
8691
- * backups are the next consumers, which is why the flag lives on the
8692
- * location rather than in any one addon's store nothing has to be
8693
- * extended to add the next consumer.
8614
+ * THE write switch, and the only one (D383). `enabled: true` means every
8615
+ * consumer that chooses a write target for this type may write here, and all
8616
+ * enabled locations of a type are used TOGETHER; `false` means read-only
8617
+ * still read, still played back, still age-swept, still drained, never
8618
+ * written.
8694
8619
  *
8695
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8696
- * flag existed reads back with no flag and keeps working exactly as before;
8697
- * that is the whole compat story, and it is why no migration ships with it.
8698
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8699
- * disk must not silently start writing to it); the default of a type is
8700
- * always stamped `true`.
8620
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8621
+ * stored" on an update and "born inert unless it is the first location of its
8622
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8623
+ * enabled {@link isLocationEnabled} is the one place that says so, and the
8624
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8625
+ * stops existing rather than being re-derived on every read.
8701
8626
  */
8702
8627
  enabled: boolean().optional(),
8628
+ /**
8629
+ * THE state of this location (D385), and the only authority on what may be
8630
+ * written, read or evicted here. Interpreted in exactly one place —
8631
+ * `storage-location-mode.ts` — which also folds the legacy
8632
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8633
+ * ambiguous.
8634
+ *
8635
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8636
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8637
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8638
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8639
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8640
+ * either, so the two cannot disagree.
8641
+ */
8642
+ mode: StorageLocationModeSchema.optional(),
8703
8643
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8704
8644
  * for node-local locations it can reach) — never persisted, absent when the
8705
8645
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8707,13 +8647,50 @@ var StorageLocationSchema = object({
8707
8647
  totalBytes: number(),
8708
8648
  availableBytes: number()
8709
8649
  }).nullable().optional(),
8650
+ /**
8651
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8652
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8653
+ * never persisted, never a filesystem walk.
8654
+ *
8655
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8656
+ * location yet — nobody stores here, the owning addon is down, or the first
8657
+ * refresh has not completed. A UI must omit the segment rather than draw it
8658
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8659
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8660
+ * be spelled out loud instead of appearing by accident.
8661
+ *
8662
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8663
+ * about the whole figure rather than about its freshest part.
8664
+ */
8665
+ owned: object({
8666
+ bytes: number().int().nonnegative(),
8667
+ measuredAtMs: number().int().nonnegative()
8668
+ }).optional(),
8710
8669
  createdAt: number(),
8711
8670
  updatedAt: number()
8712
8671
  });
8672
+ object({ isDefault: boolean().optional() });
8673
+ /**
8674
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8675
+ *
8676
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8677
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8678
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8679
+ * operator learns not to believe the screen.
8680
+ */
8681
+ var StorageDrainProgressSchema = object({
8682
+ locationId: string(),
8683
+ startedAtMs: number(),
8684
+ startBytes: number(),
8685
+ bytesRemaining: number(),
8686
+ drained: boolean(),
8687
+ estimatedEmptyAtMs: number().nullable()
8688
+ });
8713
8689
  /**
8714
8690
  * Reference accepted by consumer-facing `api.storage.*` calls.
8715
8691
  * Either:
8716
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
8692
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
8693
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8717
8694
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8718
8695
  *
8719
8696
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -8889,6 +8866,111 @@ var DecoderSessionConfigSchema = object({
8889
8866
  */
8890
8867
  debug: boolean().optional()
8891
8868
  });
8869
+ /**
8870
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
8871
+ * an addon declares its channels in.
8872
+ *
8873
+ * ## Two axes, deliberately separated
8874
+ *
8875
+ * - **DECLARATION** — which channels exist. Only the addon knows:
8876
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8877
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
8878
+ * and rots silently. So a channel is declared where it is consulted, and the
8879
+ * `log-channels` capability enumerates the declarations.
8880
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
8881
+ * thing: the logging settings document on the `system` cap. Two authorities
8882
+ * over the values is the exact defect
8883
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8884
+ * remove; re-introducing it from the cure side would be grotesque.
8885
+ *
8886
+ * Nothing in this file reads a clock, an env var or a store. The registry is
8887
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8888
+ * the hot path with a value somebody actually read, and by
8889
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8890
+ * never reaches here, so it can neither disarm an armed channel nor arm a
8891
+ * disarmed one (D49).
8892
+ *
8893
+ * ## The canonical call shape
8894
+ *
8895
+ * ```ts
8896
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8897
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8898
+ * }
8899
+ * ```
8900
+ *
8901
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8902
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
8903
+ * object literal is never constructed because it lives inside the branch. It
8904
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
8905
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
8906
+ * destination floor (measured at 1.93 ns/call when off).
8907
+ *
8908
+ * ## Why a channel emits at `info`
8909
+ *
8910
+ * `loki-logging.addon.ts` pins the destination default at `info` and
8911
+ * `loki-destination.ts` drops everything below it, so a line emitted at
8912
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8913
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
8914
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8915
+ * emits at the channel's declared level, whose schema floor is `info`.
8916
+ */
8917
+ /**
8918
+ * The level a channel writes at once armed.
8919
+ *
8920
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8921
+ * not leave the process for Loki, and the whole point of arming a channel is
8922
+ * to read it later.
8923
+ */
8924
+ var LogChannelLevelSchema = _enum([
8925
+ "info",
8926
+ "warn",
8927
+ "error"
8928
+ ]);
8929
+ /**
8930
+ * What an addon declares about one channel. No value, no state — a
8931
+ * declaration is inert.
8932
+ */
8933
+ var LogChannelDescriptorSchema = object({
8934
+ /**
8935
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8936
+ * the addon's short name so an operator reading a channel list can tell who
8937
+ * owns it without a second lookup.
8938
+ */
8939
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8940
+ /** One sentence: what the operator will SEE after arming it. */
8941
+ description: string().min(1),
8942
+ /** The level its lines are emitted at. Never below `info`. */
8943
+ defaultLevel: LogChannelLevelSchema,
8944
+ /**
8945
+ * Whether this channel can be narrowed to a camera.
8946
+ *
8947
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
8948
+ * consulted with the numeric device id, AND every line the channel admits
8949
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
8950
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8951
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8952
+ * the body is the only way to filter.
8953
+ *
8954
+ * A channel whose lines carry the device only in `meta` (or not at all) is
8955
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8956
+ * the operator narrows to one camera, sees nothing, and concludes the code
8957
+ * path was never taken.
8958
+ */
8959
+ perDevice: boolean()
8960
+ });
8961
+ /**
8962
+ * An armed window over one channel, as the document hands it to a mirror.
8963
+ *
8964
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8965
+ * expires by itself, which is the one failure a boolean cannot avoid.
8966
+ */
8967
+ var LogChannelWindowSchema = object({
8968
+ channel: string().min(1),
8969
+ /** Epoch ms the window closes at. */
8970
+ armedUntilMs: number(),
8971
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8972
+ deviceIds: array(number().int()).readonly().nullable()
8973
+ });
8892
8974
  var MODEL_FORMATS = [
8893
8975
  "onnx",
8894
8976
  "coreml",
@@ -21683,7 +21765,7 @@ method(object({
21683
21765
  downloadId: string(),
21684
21766
  offset: number(),
21685
21767
  length: number()
21686
- }), _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({
21768
+ }), _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({
21687
21769
  createdAt: true,
21688
21770
  updatedAt: true
21689
21771
  }), StorageLocationSchema, {
@@ -21695,7 +21777,7 @@ method(object({
21695
21777
  }), _void(), {
21696
21778
  kind: "mutation",
21697
21779
  auth: "admin"
21698
- }), method(object({ id: string() }), object({
21780
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21699
21781
  ok: boolean(),
21700
21782
  error: string().optional()
21701
21783
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21765,6 +21847,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21765
21847
  kind: "mutation",
21766
21848
  auth: "admin"
21767
21849
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21850
+ /**
21851
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
21852
+ * location (D388).
21853
+ *
21854
+ * ## Why this is not `storage-evictable`
21855
+ *
21856
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
21857
+ * not, in two ways that both matter and both bite hardest on the locations an
21858
+ * operator most wants a figure for:
21859
+ *
21860
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
21861
+ * and `recordingsLow:default` deliberately share one root and evict as one
21862
+ * oldest-first pool, so both answer with the SAME combined total. As an
21863
+ * occupancy figure that double-counts the disk.
21864
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
21865
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
21866
+ * is retiring and staring at.
21867
+ *
21868
+ * So this is its own contract with its own quantity, and the quantity is
21869
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
21870
+ * would ever be willing to delete it. A provider that can only answer
21871
+ * "evictable" must not register here — a number that silently means different
21872
+ * things per class is worse than no number.
21873
+ *
21874
+ * ## Absence is an answer
21875
+ *
21876
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
21877
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
21878
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
21879
+ * consuming side has to be written out loud instead of appearing by accident.
21880
+ *
21881
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
21882
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
21883
+ */
21884
+ /** One provider's occupancy answer for one location. */
21885
+ var StorageOccupancyReportSchema = object({
21886
+ locationId: string(),
21887
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
21888
+ * not net of what it is willing to delete. */
21889
+ ownedBytes: number().int().nonnegative(),
21890
+ /** When the provider last actually measured this. The orchestrator carries it
21891
+ * through so a UI can say how old the figure is instead of implying "now". */
21892
+ measuredAtMs: number().int().nonnegative()
21893
+ });
21894
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21768
21895
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21769
21896
  providerId: string().min(1),
21770
21897
  displayName: string().min(1),
@@ -23400,39 +23527,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23400
23527
  deviceId: number(),
23401
23528
  status: BatteryStatusSchema
23402
23529
  });
23403
- /**
23404
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23405
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23406
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23407
- * one Home Assistant projection.
23408
- */
23409
- var NetworkLinkStatusSchema = object({
23410
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23411
- type: _enum([
23412
- "wifi",
23413
- "ethernet",
23414
- "cellular",
23415
- "unknown"
23416
- ]),
23417
- /**
23418
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23419
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23420
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23421
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23422
- * SKIP a null rather than coerce it.
23423
- */
23424
- signalPercent: number().min(0).max(100).nullable(),
23425
- /** Raw received signal strength in dBm, when the firmware reports one. */
23426
- rssiDbm: number().optional(),
23427
- /** Network name of a wireless link, when the firmware reports it. */
23428
- ssid: string().optional(),
23429
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23430
- lastUpdated: number()
23431
- });
23432
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23433
- deviceId: number(),
23434
- status: NetworkLinkStatusSchema
23435
- });
23436
23530
  object({
23437
23531
  on: boolean(),
23438
23532
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25786,6 +25880,236 @@ DeviceType.Camera, method(object({
25786
25880
  detection: NativeDetectionSchema
25787
25881
  });
25788
25882
  /**
25883
+ * `navigation` — a device-scoped capability that natively expresses the FULL
25884
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
25885
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
25886
+ *
25887
+ * Why a NEW cap rather than overloading `ptz`:
25888
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
25889
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
25890
+ * The two are different physical models: PTZ is absolute-position + presets,
25891
+ * navigation is momentary drive nudges + discrete robot ACTIONS
25892
+ * (dock / spot-clean / follow-pet / go-to-point / …).
25893
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
25894
+ * the reverse:
25895
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
25896
+ * / `getOptions`), and
25897
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
25898
+ * robot camera shows up in the existing PTZ control path without every
25899
+ * PTZ provider learning about robots. The mapping lives in the adapter,
25900
+ * not here (see the addon design note):
25901
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
25902
+ * ptz.stop() → navigation.stop()
25903
+ * ptz.goHome() → navigation.runAction('goHome')
25904
+ * ptz.getPresets() → navigation.listActions() (id→preset)
25905
+ * ptz.goToPreset(id) → navigation.runAction(id)
25906
+ *
25907
+ * ## Continuous drive
25908
+ *
25909
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
25910
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
25911
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
25912
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
25913
+ * coalesce them. The UI owns the cadence.
25914
+ *
25915
+ * ## The action dictionary
25916
+ *
25917
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
25918
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
25919
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
25920
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
25921
+ * vendor-specific list. `kind: 'action'` entries are triggered with
25922
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
25923
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
25924
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
25925
+ *
25926
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
25927
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
25928
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
25929
+ * every device handle. A future nodedreame publish adds a typed
25930
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
25931
+ * provider can then swap the raw calls for the typed methods with no change to
25932
+ * THIS contract.
25933
+ */
25934
+ /**
25935
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
25936
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
25937
+ * halts it.
25938
+ *
25939
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
25940
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
25941
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
25942
+ * vector by it (drivers without proportional drive ignore it).
25943
+ *
25944
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
25945
+ * axis alone; an all-undefined nudge is a no-op.
25946
+ */
25947
+ var NavigationMoveCommandSchema = object({
25948
+ pan: number().min(-1).max(1).optional(),
25949
+ tilt: number().min(-1).max(1).optional(),
25950
+ speed: number().min(0).max(1).optional()
25951
+ });
25952
+ /**
25953
+ * The enumerated discrete actions a navigation-capable robot can perform via
25954
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
25955
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
25956
+ * `playSound` (see the `sound` dictionary entries).
25957
+ */
25958
+ var NavigationActionIdSchema = _enum([
25959
+ "goHome",
25960
+ "locate",
25961
+ "spotClean",
25962
+ "findPet",
25963
+ "personFollow",
25964
+ "stop",
25965
+ "startClean",
25966
+ "pauseClean",
25967
+ "dockWash",
25968
+ "autoEmpty",
25969
+ "flashOn",
25970
+ "flashOff"
25971
+ ]);
25972
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
25973
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
25974
+ /**
25975
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
25976
+ * native panel and the PTZ mimic render as a button.
25977
+ *
25978
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
25979
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
25980
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
25981
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
25982
+ * - `label` — operator-facing English label.
25983
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
25984
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
25985
+ * PTZ render ONLY enabled entries. Data-driven: the provider
25986
+ * flips it from config, never by editing code.
25987
+ */
25988
+ var NavigationActionEntrySchema = object({
25989
+ id: string(),
25990
+ kind: NavigationEntryKindSchema,
25991
+ label: string(),
25992
+ icon: string(),
25993
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
25994
+ soundId: number().int().optional(),
25995
+ /** Per-device feature flag — render this entry only when true. */
25996
+ enabled: boolean()
25997
+ });
25998
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
25999
+ var NavigationPointSchema = object({
26000
+ x: number(),
26001
+ y: number()
26002
+ });
26003
+ /**
26004
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26005
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26006
+ * that are turned on for THIS device. Data-driven: the provider derives these
26007
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26008
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26009
+ * that are not dictionary entries.
26010
+ *
26011
+ * - `move` / `stop` — the momentary drive joystick.
26012
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26013
+ * map-coordinate plumbing is wired.
26014
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26015
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26016
+ * - `light` — the on/off fill-light toggle (works anytime).
26017
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26018
+ * camera-service control; needs an active stream).
26019
+ */
26020
+ var NavigationFeaturesSchema = object({
26021
+ move: boolean(),
26022
+ stop: boolean(),
26023
+ goToPoint: boolean(),
26024
+ runAction: boolean(),
26025
+ playSound: boolean(),
26026
+ light: boolean(),
26027
+ lightMode: boolean()
26028
+ });
26029
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26030
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26031
+ /**
26032
+ * Live navigation state so the UI can reflect what the robot is doing:
26033
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26034
+ * - `following` — person/pet follow is currently armed.
26035
+ * - `flash` — the on-camera fill light is on.
26036
+ * - `lightMode` — auto vs manual fill-light mode.
26037
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26038
+ * `lightMode === 'manual'`.
26039
+ */
26040
+ var NavigationStatusSchema = object({
26041
+ mode: _enum([
26042
+ "idle",
26043
+ "cleaning",
26044
+ "spot",
26045
+ "following",
26046
+ "goto",
26047
+ "returning",
26048
+ "paused",
26049
+ "unknown"
26050
+ ]),
26051
+ following: boolean(),
26052
+ flash: boolean(),
26053
+ lightMode: NavigationLightModeSchema,
26054
+ lightLevel: number().min(40).max(100),
26055
+ /** Ms epoch when the slice was last updated. */
26056
+ lastChangedAt: number()
26057
+ });
26058
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26059
+ 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({
26060
+ deviceId: number(),
26061
+ actionId: NavigationActionIdSchema
26062
+ }), _void(), { kind: "mutation" }), method(object({
26063
+ deviceId: number(),
26064
+ soundId: number().int()
26065
+ }), _void(), { kind: "mutation" }), method(object({
26066
+ deviceId: number(),
26067
+ on: boolean()
26068
+ }), _void(), { kind: "mutation" }), method(object({
26069
+ deviceId: number(),
26070
+ mode: NavigationLightModeSchema,
26071
+ level: number().min(40).max(100).optional()
26072
+ }), _void(), { kind: "mutation" }), method(object({
26073
+ deviceId: number(),
26074
+ level: number().min(40).max(100)
26075
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26076
+ deviceId: number(),
26077
+ status: NavigationStatusSchema
26078
+ });
26079
+ /**
26080
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26081
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26082
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26083
+ * one Home Assistant projection.
26084
+ */
26085
+ var NetworkLinkStatusSchema = object({
26086
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26087
+ type: _enum([
26088
+ "wifi",
26089
+ "ethernet",
26090
+ "cellular",
26091
+ "unknown"
26092
+ ]),
26093
+ /**
26094
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26095
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26096
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26097
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26098
+ * SKIP a null rather than coerce it.
26099
+ */
26100
+ signalPercent: number().min(0).max(100).nullable(),
26101
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26102
+ rssiDbm: number().optional(),
26103
+ /** Network name of a wireless link, when the firmware reports it. */
26104
+ ssid: string().optional(),
26105
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26106
+ lastUpdated: number()
26107
+ });
26108
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26109
+ deviceId: number(),
26110
+ status: NetworkLinkStatusSchema
26111
+ });
26112
+ /**
25789
26113
  * network-quality — system-scoped singleton capability tracking RTT,
25790
26114
  * jitter, and observed/peak bandwidth per device + per client.
25791
26115
  *
@@ -27027,203 +27351,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27027
27351
  deviceId: number(),
27028
27352
  status: PtzAutotrackStatusSchema
27029
27353
  });
27030
- /**
27031
- * `navigation` — a device-scoped capability that natively expresses the FULL
27032
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27033
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27034
- *
27035
- * Why a NEW cap rather than overloading `ptz`:
27036
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27037
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27038
- * The two are different physical models: PTZ is absolute-position + presets,
27039
- * navigation is momentary drive nudges + discrete robot ACTIONS
27040
- * (dock / spot-clean / follow-pet / go-to-point / …).
27041
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27042
- * the reverse:
27043
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27044
- * / `getOptions`), and
27045
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27046
- * robot camera shows up in the existing PTZ control path without every
27047
- * PTZ provider learning about robots. The mapping lives in the adapter,
27048
- * not here (see the addon design note):
27049
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27050
- * ptz.stop() → navigation.stop()
27051
- * ptz.goHome() → navigation.runAction('goHome')
27052
- * ptz.getPresets() → navigation.listActions() (id→preset)
27053
- * ptz.goToPreset(id) → navigation.runAction(id)
27054
- *
27055
- * ## Continuous drive
27056
- *
27057
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27058
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27059
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27060
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27061
- * coalesce them. The UI owns the cadence.
27062
- *
27063
- * ## The action dictionary
27064
- *
27065
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27066
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27067
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27068
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27069
- * vendor-specific list. `kind: 'action'` entries are triggered with
27070
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27071
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27072
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27073
- *
27074
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27075
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27076
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27077
- * every device handle. A future nodedreame publish adds a typed
27078
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27079
- * provider can then swap the raw calls for the typed methods with no change to
27080
- * THIS contract.
27081
- */
27082
- /**
27083
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27084
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27085
- * halts it.
27086
- *
27087
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27088
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27089
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27090
- * vector by it (drivers without proportional drive ignore it).
27091
- *
27092
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27093
- * axis alone; an all-undefined nudge is a no-op.
27094
- */
27095
- var NavigationMoveCommandSchema = object({
27096
- pan: number().min(-1).max(1).optional(),
27097
- tilt: number().min(-1).max(1).optional(),
27098
- speed: number().min(0).max(1).optional()
27099
- });
27100
- /**
27101
- * The enumerated discrete actions a navigation-capable robot can perform via
27102
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27103
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27104
- * `playSound` (see the `sound` dictionary entries).
27105
- */
27106
- var NavigationActionIdSchema = _enum([
27107
- "goHome",
27108
- "locate",
27109
- "spotClean",
27110
- "findPet",
27111
- "personFollow",
27112
- "stop",
27113
- "startClean",
27114
- "pauseClean",
27115
- "dockWash",
27116
- "autoEmpty",
27117
- "flashOn",
27118
- "flashOff"
27119
- ]);
27120
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27121
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27122
- /**
27123
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27124
- * native panel and the PTZ mimic render as a button.
27125
- *
27126
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27127
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27128
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27129
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27130
- * - `label` — operator-facing English label.
27131
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27132
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27133
- * PTZ render ONLY enabled entries. Data-driven: the provider
27134
- * flips it from config, never by editing code.
27135
- */
27136
- var NavigationActionEntrySchema = object({
27137
- id: string(),
27138
- kind: NavigationEntryKindSchema,
27139
- label: string(),
27140
- icon: string(),
27141
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27142
- soundId: number().int().optional(),
27143
- /** Per-device feature flag — render this entry only when true. */
27144
- enabled: boolean()
27145
- });
27146
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27147
- var NavigationPointSchema = object({
27148
- x: number(),
27149
- y: number()
27150
- });
27151
- /**
27152
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27153
- * The cap reports which are enabled so the UI / PTZ render only the controls
27154
- * that are turned on for THIS device. Data-driven: the provider derives these
27155
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27156
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27157
- * that are not dictionary entries.
27158
- *
27159
- * - `move` / `stop` — the momentary drive joystick.
27160
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27161
- * map-coordinate plumbing is wired.
27162
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27163
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27164
- * - `light` — the on/off fill-light toggle (works anytime).
27165
- * - `lightMode` — the auto/manual selector + manual level slider (a
27166
- * camera-service control; needs an active stream).
27167
- */
27168
- var NavigationFeaturesSchema = object({
27169
- move: boolean(),
27170
- stop: boolean(),
27171
- goToPoint: boolean(),
27172
- runAction: boolean(),
27173
- playSound: boolean(),
27174
- light: boolean(),
27175
- lightMode: boolean()
27176
- });
27177
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27178
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27179
- /**
27180
- * Live navigation state so the UI can reflect what the robot is doing:
27181
- * - `mode` — coarse activity (idle / cleaning / following / …).
27182
- * - `following` — person/pet follow is currently armed.
27183
- * - `flash` — the on-camera fill light is on.
27184
- * - `lightMode` — auto vs manual fill-light mode.
27185
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27186
- * `lightMode === 'manual'`.
27187
- */
27188
- var NavigationStatusSchema = object({
27189
- mode: _enum([
27190
- "idle",
27191
- "cleaning",
27192
- "spot",
27193
- "following",
27194
- "goto",
27195
- "returning",
27196
- "paused",
27197
- "unknown"
27198
- ]),
27199
- following: boolean(),
27200
- flash: boolean(),
27201
- lightMode: NavigationLightModeSchema,
27202
- lightLevel: number().min(40).max(100),
27203
- /** Ms epoch when the slice was last updated. */
27204
- lastChangedAt: number()
27205
- });
27206
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27207
- 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({
27208
- deviceId: number(),
27209
- actionId: NavigationActionIdSchema
27210
- }), _void(), { kind: "mutation" }), method(object({
27211
- deviceId: number(),
27212
- soundId: number().int()
27213
- }), _void(), { kind: "mutation" }), method(object({
27214
- deviceId: number(),
27215
- on: boolean()
27216
- }), _void(), { kind: "mutation" }), method(object({
27217
- deviceId: number(),
27218
- mode: NavigationLightModeSchema,
27219
- level: number().min(40).max(100).optional()
27220
- }), _void(), { kind: "mutation" }), method(object({
27221
- deviceId: number(),
27222
- level: number().min(40).max(100)
27223
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27224
- deviceId: number(),
27225
- status: NavigationStatusSchema
27226
- });
27227
27354
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27228
27355
  kind: "mutation",
27229
27356
  auth: "admin"
@@ -34532,13 +34659,13 @@ Object.freeze({
34532
34659
  addonId: null,
34533
34660
  access: "view"
34534
34661
  },
34535
- "storage.getDefaultLocation": {
34662
+ "storage.list": {
34536
34663
  capName: "storage",
34537
34664
  capScope: "system",
34538
34665
  addonId: null,
34539
34666
  access: "view"
34540
34667
  },
34541
- "storage.list": {
34668
+ "storage.listDrainProgress": {
34542
34669
  capName: "storage",
34543
34670
  capScope: "system",
34544
34671
  addonId: null,
@@ -34688,6 +34815,12 @@ Object.freeze({
34688
34815
  addonId: null,
34689
34816
  access: "view"
34690
34817
  },
34818
+ "storageOccupancy.getOccupancy": {
34819
+ capName: "storage-occupancy",
34820
+ capScope: "system",
34821
+ addonId: null,
34822
+ access: "view"
34823
+ },
34691
34824
  "storageProvider.abortUpload": {
34692
34825
  capName: "storage-provider",
34693
34826
  capScope: "system",