@camstack/addon-provider-onvif 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.
Files changed (3) hide show
  1. package/dist/addon.js +488 -355
  2. package/dist/addon.mjs +488 -355
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region \0rolldown/runtime.js
3
3
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
4
4
  //#endregion
5
- //#region ../types/dist/event-category-zAv7pMUz.mjs
5
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
6
6
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
7
7
  EventCategory["SystemBoot"] = "system.boot";
8
8
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -197,6 +197,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
197
197
  EventCategory["ProcessCrashed"] = "process.crashed";
198
198
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
199
199
  EventCategory["ProcessRestarted"] = "process.restarted";
200
+ /**
201
+ * The SET of storage locations changed — one was created, edited, enabled,
202
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
203
+ *
204
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
205
+ * it must also converge on its own periodic path, because a dropped event
206
+ * must not leave a node writing to yesterday's disk set forever. It exists
207
+ * because there was NO signal at all — an operator who added a second
208
+ * recordings disk in the admin UI got nothing, and the recorder kept its
209
+ * resolved locations until something else happened to re-resolve them
210
+ * (D387). Payload `StorageLocationsChangedPayload`.
211
+ */
212
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
200
213
  EventCategory["RecordingStarted"] = "recording.started";
201
214
  EventCategory["RecordingStopped"] = "recording.stopped";
202
215
  EventCategory["RecordingError"] = "recording.error";
@@ -7614,111 +7627,6 @@ var CameraSwitchGroupSchema = object({
7614
7627
  fetchedAt: number()
7615
7628
  });
7616
7629
  /**
7617
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7618
- * an addon declares its channels in.
7619
- *
7620
- * ## Two axes, deliberately separated
7621
- *
7622
- * - **DECLARATION** — which channels exist. Only the addon knows:
7623
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7624
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7625
- * and rots silently. So a channel is declared where it is consulted, and the
7626
- * `log-channels` capability enumerates the declarations.
7627
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7628
- * thing: the logging settings document on the `system` cap. Two authorities
7629
- * over the values is the exact defect
7630
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7631
- * remove; re-introducing it from the cure side would be grotesque.
7632
- *
7633
- * Nothing in this file reads a clock, an env var or a store. The registry is
7634
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7635
- * the hot path with a value somebody actually read, and by
7636
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7637
- * never reaches here, so it can neither disarm an armed channel nor arm a
7638
- * disarmed one (D49).
7639
- *
7640
- * ## The canonical call shape
7641
- *
7642
- * ```ts
7643
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7644
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7645
- * }
7646
- * ```
7647
- *
7648
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7649
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7650
- * object literal is never constructed because it lives inside the branch. It
7651
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7652
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7653
- * destination floor (measured at 1.93 ns/call when off).
7654
- *
7655
- * ## Why a channel emits at `info`
7656
- *
7657
- * `loki-logging.addon.ts` pins the destination default at `info` and
7658
- * `loki-destination.ts` drops everything below it, so a line emitted at
7659
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7660
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7661
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7662
- * emits at the channel's declared level, whose schema floor is `info`.
7663
- */
7664
- /**
7665
- * The level a channel writes at once armed.
7666
- *
7667
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7668
- * not leave the process for Loki, and the whole point of arming a channel is
7669
- * to read it later.
7670
- */
7671
- var LogChannelLevelSchema = _enum([
7672
- "info",
7673
- "warn",
7674
- "error"
7675
- ]);
7676
- /**
7677
- * What an addon declares about one channel. No value, no state — a
7678
- * declaration is inert.
7679
- */
7680
- var LogChannelDescriptorSchema = object({
7681
- /**
7682
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7683
- * the addon's short name so an operator reading a channel list can tell who
7684
- * owns it without a second lookup.
7685
- */
7686
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7687
- /** One sentence: what the operator will SEE after arming it. */
7688
- description: string().min(1),
7689
- /** The level its lines are emitted at. Never below `info`. */
7690
- defaultLevel: LogChannelLevelSchema,
7691
- /**
7692
- * Whether this channel can be narrowed to a camera.
7693
- *
7694
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7695
- * consulted with the numeric device id, AND every line the channel admits
7696
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7697
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7698
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7699
- * the body is the only way to filter.
7700
- *
7701
- * A channel whose lines carry the device only in `meta` (or not at all) is
7702
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7703
- * the operator narrows to one camera, sees nothing, and concludes the code
7704
- * path was never taken.
7705
- */
7706
- perDevice: boolean()
7707
- });
7708
- /**
7709
- * An armed window over one channel, as the document hands it to a mirror.
7710
- *
7711
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7712
- * expires by itself, which is the one failure a boolean cannot avoid.
7713
- */
7714
- var LogChannelWindowSchema = object({
7715
- channel: string().min(1),
7716
- /** Epoch ms the window closes at. */
7717
- armedUntilMs: number(),
7718
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7719
- deviceIds: array(number().int()).readonly().nullable()
7720
- });
7721
- /**
7722
7630
  * Ops-log — the durable, append-only operations audit shared by the
7723
7631
  * recordings and events management surfaces.
7724
7632
  *
@@ -8640,6 +8548,21 @@ var StorageCleanupJobSchema = object({
8640
8548
  });
8641
8549
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8642
8550
  /**
8551
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8552
+ * alias below is `z.infer<>` of it, never a second spelling.
8553
+ */
8554
+ var StorageLocationModeSchema = _enum([
8555
+ "active",
8556
+ "readonly",
8557
+ "drain",
8558
+ "disabled"
8559
+ ]);
8560
+ _enum([
8561
+ "normal",
8562
+ "never",
8563
+ "drain"
8564
+ ]);
8565
+ /**
8643
8566
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8644
8567
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8645
8568
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8664,8 +8587,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8664
8587
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8665
8588
  *
8666
8589
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8667
- * The default location for a type uses `id === <type>:default` by
8668
- * convention (the bare type ref like `'backups'` resolves to it).
8590
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8591
+ * There is no default location any more (D383): `enabled` is the whole write
8592
+ * model, and a bare type ref resolves to the sole location of the type, or —
8593
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8594
+ * slug is `default`.
8669
8595
  *
8670
8596
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8671
8597
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8686,23 +8612,37 @@ var StorageLocationSchema = object({
8686
8612
  * flag at upsert time, not here (the schema is provider-agnostic).
8687
8613
  */
8688
8614
  nodeId: string().optional(),
8689
- isDefault: boolean().default(false),
8690
8615
  isSystem: boolean().default(false),
8691
8616
  /**
8692
- * Operator opt-in: whether consumers that BALANCE across several locations
8693
- * of a type may write here. Recordings reads it today; event media and
8694
- * backups are the next consumers, which is why the flag lives on the
8695
- * location rather than in any one addon's store nothing has to be
8696
- * extended to add the next consumer.
8617
+ * THE write switch, and the only one (D383). `enabled: true` means every
8618
+ * consumer that chooses a write target for this type may write here, and all
8619
+ * enabled locations of a type are used TOGETHER; `false` means read-only
8620
+ * still read, still played back, still age-swept, still drained, never
8621
+ * written.
8697
8622
  *
8698
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8699
- * flag existed reads back with no flag and keeps working exactly as before;
8700
- * that is the whole compat story, and it is why no migration ships with it.
8701
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8702
- * disk must not silently start writing to it); the default of a type is
8703
- * always stamped `true`.
8623
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8624
+ * stored" on an update and "born inert unless it is the first location of its
8625
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8626
+ * enabled {@link isLocationEnabled} is the one place that says so, and the
8627
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8628
+ * stops existing rather than being re-derived on every read.
8704
8629
  */
8705
8630
  enabled: boolean().optional(),
8631
+ /**
8632
+ * THE state of this location (D385), and the only authority on what may be
8633
+ * written, read or evicted here. Interpreted in exactly one place —
8634
+ * `storage-location-mode.ts` — which also folds the legacy
8635
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8636
+ * ambiguous.
8637
+ *
8638
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8639
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8640
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8641
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8642
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8643
+ * either, so the two cannot disagree.
8644
+ */
8645
+ mode: StorageLocationModeSchema.optional(),
8706
8646
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8707
8647
  * for node-local locations it can reach) — never persisted, absent when the
8708
8648
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8710,13 +8650,50 @@ var StorageLocationSchema = object({
8710
8650
  totalBytes: number(),
8711
8651
  availableBytes: number()
8712
8652
  }).nullable().optional(),
8653
+ /**
8654
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8655
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8656
+ * never persisted, never a filesystem walk.
8657
+ *
8658
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8659
+ * location yet — nobody stores here, the owning addon is down, or the first
8660
+ * refresh has not completed. A UI must omit the segment rather than draw it
8661
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8662
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8663
+ * be spelled out loud instead of appearing by accident.
8664
+ *
8665
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8666
+ * about the whole figure rather than about its freshest part.
8667
+ */
8668
+ owned: object({
8669
+ bytes: number().int().nonnegative(),
8670
+ measuredAtMs: number().int().nonnegative()
8671
+ }).optional(),
8713
8672
  createdAt: number(),
8714
8673
  updatedAt: number()
8715
8674
  });
8675
+ object({ isDefault: boolean().optional() });
8676
+ /**
8677
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8678
+ *
8679
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8680
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8681
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8682
+ * operator learns not to believe the screen.
8683
+ */
8684
+ var StorageDrainProgressSchema = object({
8685
+ locationId: string(),
8686
+ startedAtMs: number(),
8687
+ startBytes: number(),
8688
+ bytesRemaining: number(),
8689
+ drained: boolean(),
8690
+ estimatedEmptyAtMs: number().nullable()
8691
+ });
8716
8692
  /**
8717
8693
  * Reference accepted by consumer-facing `api.storage.*` calls.
8718
8694
  * Either:
8719
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
8695
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
8696
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8720
8697
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8721
8698
  *
8722
8699
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -8892,6 +8869,111 @@ var DecoderSessionConfigSchema = object({
8892
8869
  */
8893
8870
  debug: boolean().optional()
8894
8871
  });
8872
+ /**
8873
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
8874
+ * an addon declares its channels in.
8875
+ *
8876
+ * ## Two axes, deliberately separated
8877
+ *
8878
+ * - **DECLARATION** — which channels exist. Only the addon knows:
8879
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8880
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
8881
+ * and rots silently. So a channel is declared where it is consulted, and the
8882
+ * `log-channels` capability enumerates the declarations.
8883
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
8884
+ * thing: the logging settings document on the `system` cap. Two authorities
8885
+ * over the values is the exact defect
8886
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8887
+ * remove; re-introducing it from the cure side would be grotesque.
8888
+ *
8889
+ * Nothing in this file reads a clock, an env var or a store. The registry is
8890
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8891
+ * the hot path with a value somebody actually read, and by
8892
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8893
+ * never reaches here, so it can neither disarm an armed channel nor arm a
8894
+ * disarmed one (D49).
8895
+ *
8896
+ * ## The canonical call shape
8897
+ *
8898
+ * ```ts
8899
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8900
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8901
+ * }
8902
+ * ```
8903
+ *
8904
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8905
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
8906
+ * object literal is never constructed because it lives inside the branch. It
8907
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
8908
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
8909
+ * destination floor (measured at 1.93 ns/call when off).
8910
+ *
8911
+ * ## Why a channel emits at `info`
8912
+ *
8913
+ * `loki-logging.addon.ts` pins the destination default at `info` and
8914
+ * `loki-destination.ts` drops everything below it, so a line emitted at
8915
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8916
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
8917
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8918
+ * emits at the channel's declared level, whose schema floor is `info`.
8919
+ */
8920
+ /**
8921
+ * The level a channel writes at once armed.
8922
+ *
8923
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8924
+ * not leave the process for Loki, and the whole point of arming a channel is
8925
+ * to read it later.
8926
+ */
8927
+ var LogChannelLevelSchema = _enum([
8928
+ "info",
8929
+ "warn",
8930
+ "error"
8931
+ ]);
8932
+ /**
8933
+ * What an addon declares about one channel. No value, no state — a
8934
+ * declaration is inert.
8935
+ */
8936
+ var LogChannelDescriptorSchema = object({
8937
+ /**
8938
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8939
+ * the addon's short name so an operator reading a channel list can tell who
8940
+ * owns it without a second lookup.
8941
+ */
8942
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8943
+ /** One sentence: what the operator will SEE after arming it. */
8944
+ description: string().min(1),
8945
+ /** The level its lines are emitted at. Never below `info`. */
8946
+ defaultLevel: LogChannelLevelSchema,
8947
+ /**
8948
+ * Whether this channel can be narrowed to a camera.
8949
+ *
8950
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
8951
+ * consulted with the numeric device id, AND every line the channel admits
8952
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
8953
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8954
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8955
+ * the body is the only way to filter.
8956
+ *
8957
+ * A channel whose lines carry the device only in `meta` (or not at all) is
8958
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8959
+ * the operator narrows to one camera, sees nothing, and concludes the code
8960
+ * path was never taken.
8961
+ */
8962
+ perDevice: boolean()
8963
+ });
8964
+ /**
8965
+ * An armed window over one channel, as the document hands it to a mirror.
8966
+ *
8967
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8968
+ * expires by itself, which is the one failure a boolean cannot avoid.
8969
+ */
8970
+ var LogChannelWindowSchema = object({
8971
+ channel: string().min(1),
8972
+ /** Epoch ms the window closes at. */
8973
+ armedUntilMs: number(),
8974
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8975
+ deviceIds: array(number().int()).readonly().nullable()
8976
+ });
8895
8977
  var MODEL_FORMATS = [
8896
8978
  "onnx",
8897
8979
  "coreml",
@@ -21741,7 +21823,7 @@ method(object({
21741
21823
  downloadId: string(),
21742
21824
  offset: number(),
21743
21825
  length: number()
21744
- }), _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({
21826
+ }), _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({
21745
21827
  createdAt: true,
21746
21828
  updatedAt: true
21747
21829
  }), StorageLocationSchema, {
@@ -21753,7 +21835,7 @@ method(object({
21753
21835
  }), _void(), {
21754
21836
  kind: "mutation",
21755
21837
  auth: "admin"
21756
- }), method(object({ id: string() }), object({
21838
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21757
21839
  ok: boolean(),
21758
21840
  error: string().optional()
21759
21841
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21823,6 +21905,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21823
21905
  kind: "mutation",
21824
21906
  auth: "admin"
21825
21907
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21908
+ /**
21909
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
21910
+ * location (D388).
21911
+ *
21912
+ * ## Why this is not `storage-evictable`
21913
+ *
21914
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
21915
+ * not, in two ways that both matter and both bite hardest on the locations an
21916
+ * operator most wants a figure for:
21917
+ *
21918
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
21919
+ * and `recordingsLow:default` deliberately share one root and evict as one
21920
+ * oldest-first pool, so both answer with the SAME combined total. As an
21921
+ * occupancy figure that double-counts the disk.
21922
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
21923
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
21924
+ * is retiring and staring at.
21925
+ *
21926
+ * So this is its own contract with its own quantity, and the quantity is
21927
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
21928
+ * would ever be willing to delete it. A provider that can only answer
21929
+ * "evictable" must not register here — a number that silently means different
21930
+ * things per class is worse than no number.
21931
+ *
21932
+ * ## Absence is an answer
21933
+ *
21934
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
21935
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
21936
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
21937
+ * consuming side has to be written out loud instead of appearing by accident.
21938
+ *
21939
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
21940
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
21941
+ */
21942
+ /** One provider's occupancy answer for one location. */
21943
+ var StorageOccupancyReportSchema = object({
21944
+ locationId: string(),
21945
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
21946
+ * not net of what it is willing to delete. */
21947
+ ownedBytes: number().int().nonnegative(),
21948
+ /** When the provider last actually measured this. The orchestrator carries it
21949
+ * through so a UI can say how old the figure is instead of implying "now". */
21950
+ measuredAtMs: number().int().nonnegative()
21951
+ });
21952
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21826
21953
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21827
21954
  providerId: string().min(1),
21828
21955
  displayName: string().min(1),
@@ -23458,39 +23585,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23458
23585
  deviceId: number(),
23459
23586
  status: BatteryStatusSchema
23460
23587
  });
23461
- /**
23462
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23463
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23464
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23465
- * one Home Assistant projection.
23466
- */
23467
- var NetworkLinkStatusSchema = object({
23468
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23469
- type: _enum([
23470
- "wifi",
23471
- "ethernet",
23472
- "cellular",
23473
- "unknown"
23474
- ]),
23475
- /**
23476
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23477
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23478
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23479
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23480
- * SKIP a null rather than coerce it.
23481
- */
23482
- signalPercent: number().min(0).max(100).nullable(),
23483
- /** Raw received signal strength in dBm, when the firmware reports one. */
23484
- rssiDbm: number().optional(),
23485
- /** Network name of a wireless link, when the firmware reports it. */
23486
- ssid: string().optional(),
23487
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23488
- lastUpdated: number()
23489
- });
23490
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23491
- deviceId: number(),
23492
- status: NetworkLinkStatusSchema
23493
- });
23494
23588
  object({
23495
23589
  on: boolean(),
23496
23590
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25844,6 +25938,236 @@ DeviceType.Camera, method(object({
25844
25938
  detection: NativeDetectionSchema
25845
25939
  });
25846
25940
  /**
25941
+ * `navigation` — a device-scoped capability that natively expresses the FULL
25942
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
25943
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
25944
+ *
25945
+ * Why a NEW cap rather than overloading `ptz`:
25946
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
25947
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
25948
+ * The two are different physical models: PTZ is absolute-position + presets,
25949
+ * navigation is momentary drive nudges + discrete robot ACTIONS
25950
+ * (dock / spot-clean / follow-pet / go-to-point / …).
25951
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
25952
+ * the reverse:
25953
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
25954
+ * / `getOptions`), and
25955
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
25956
+ * robot camera shows up in the existing PTZ control path without every
25957
+ * PTZ provider learning about robots. The mapping lives in the adapter,
25958
+ * not here (see the addon design note):
25959
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
25960
+ * ptz.stop() → navigation.stop()
25961
+ * ptz.goHome() → navigation.runAction('goHome')
25962
+ * ptz.getPresets() → navigation.listActions() (id→preset)
25963
+ * ptz.goToPreset(id) → navigation.runAction(id)
25964
+ *
25965
+ * ## Continuous drive
25966
+ *
25967
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
25968
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
25969
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
25970
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
25971
+ * coalesce them. The UI owns the cadence.
25972
+ *
25973
+ * ## The action dictionary
25974
+ *
25975
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
25976
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
25977
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
25978
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
25979
+ * vendor-specific list. `kind: 'action'` entries are triggered with
25980
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
25981
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
25982
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
25983
+ *
25984
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
25985
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
25986
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
25987
+ * every device handle. A future nodedreame publish adds a typed
25988
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
25989
+ * provider can then swap the raw calls for the typed methods with no change to
25990
+ * THIS contract.
25991
+ */
25992
+ /**
25993
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
25994
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
25995
+ * halts it.
25996
+ *
25997
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
25998
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
25999
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26000
+ * vector by it (drivers without proportional drive ignore it).
26001
+ *
26002
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26003
+ * axis alone; an all-undefined nudge is a no-op.
26004
+ */
26005
+ var NavigationMoveCommandSchema = object({
26006
+ pan: number().min(-1).max(1).optional(),
26007
+ tilt: number().min(-1).max(1).optional(),
26008
+ speed: number().min(0).max(1).optional()
26009
+ });
26010
+ /**
26011
+ * The enumerated discrete actions a navigation-capable robot can perform via
26012
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26013
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26014
+ * `playSound` (see the `sound` dictionary entries).
26015
+ */
26016
+ var NavigationActionIdSchema = _enum([
26017
+ "goHome",
26018
+ "locate",
26019
+ "spotClean",
26020
+ "findPet",
26021
+ "personFollow",
26022
+ "stop",
26023
+ "startClean",
26024
+ "pauseClean",
26025
+ "dockWash",
26026
+ "autoEmpty",
26027
+ "flashOn",
26028
+ "flashOff"
26029
+ ]);
26030
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26031
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26032
+ /**
26033
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26034
+ * native panel and the PTZ mimic render as a button.
26035
+ *
26036
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26037
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26038
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26039
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26040
+ * - `label` — operator-facing English label.
26041
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26042
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26043
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26044
+ * flips it from config, never by editing code.
26045
+ */
26046
+ var NavigationActionEntrySchema = object({
26047
+ id: string(),
26048
+ kind: NavigationEntryKindSchema,
26049
+ label: string(),
26050
+ icon: string(),
26051
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26052
+ soundId: number().int().optional(),
26053
+ /** Per-device feature flag — render this entry only when true. */
26054
+ enabled: boolean()
26055
+ });
26056
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26057
+ var NavigationPointSchema = object({
26058
+ x: number(),
26059
+ y: number()
26060
+ });
26061
+ /**
26062
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26063
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26064
+ * that are turned on for THIS device. Data-driven: the provider derives these
26065
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26066
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26067
+ * that are not dictionary entries.
26068
+ *
26069
+ * - `move` / `stop` — the momentary drive joystick.
26070
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26071
+ * map-coordinate plumbing is wired.
26072
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26073
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26074
+ * - `light` — the on/off fill-light toggle (works anytime).
26075
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26076
+ * camera-service control; needs an active stream).
26077
+ */
26078
+ var NavigationFeaturesSchema = object({
26079
+ move: boolean(),
26080
+ stop: boolean(),
26081
+ goToPoint: boolean(),
26082
+ runAction: boolean(),
26083
+ playSound: boolean(),
26084
+ light: boolean(),
26085
+ lightMode: boolean()
26086
+ });
26087
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26088
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26089
+ /**
26090
+ * Live navigation state so the UI can reflect what the robot is doing:
26091
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26092
+ * - `following` — person/pet follow is currently armed.
26093
+ * - `flash` — the on-camera fill light is on.
26094
+ * - `lightMode` — auto vs manual fill-light mode.
26095
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26096
+ * `lightMode === 'manual'`.
26097
+ */
26098
+ var NavigationStatusSchema = object({
26099
+ mode: _enum([
26100
+ "idle",
26101
+ "cleaning",
26102
+ "spot",
26103
+ "following",
26104
+ "goto",
26105
+ "returning",
26106
+ "paused",
26107
+ "unknown"
26108
+ ]),
26109
+ following: boolean(),
26110
+ flash: boolean(),
26111
+ lightMode: NavigationLightModeSchema,
26112
+ lightLevel: number().min(40).max(100),
26113
+ /** Ms epoch when the slice was last updated. */
26114
+ lastChangedAt: number()
26115
+ });
26116
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26117
+ 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({
26118
+ deviceId: number(),
26119
+ actionId: NavigationActionIdSchema
26120
+ }), _void(), { kind: "mutation" }), method(object({
26121
+ deviceId: number(),
26122
+ soundId: number().int()
26123
+ }), _void(), { kind: "mutation" }), method(object({
26124
+ deviceId: number(),
26125
+ on: boolean()
26126
+ }), _void(), { kind: "mutation" }), method(object({
26127
+ deviceId: number(),
26128
+ mode: NavigationLightModeSchema,
26129
+ level: number().min(40).max(100).optional()
26130
+ }), _void(), { kind: "mutation" }), method(object({
26131
+ deviceId: number(),
26132
+ level: number().min(40).max(100)
26133
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26134
+ deviceId: number(),
26135
+ status: NavigationStatusSchema
26136
+ });
26137
+ /**
26138
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26139
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26140
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26141
+ * one Home Assistant projection.
26142
+ */
26143
+ var NetworkLinkStatusSchema = object({
26144
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26145
+ type: _enum([
26146
+ "wifi",
26147
+ "ethernet",
26148
+ "cellular",
26149
+ "unknown"
26150
+ ]),
26151
+ /**
26152
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26153
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26154
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26155
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26156
+ * SKIP a null rather than coerce it.
26157
+ */
26158
+ signalPercent: number().min(0).max(100).nullable(),
26159
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26160
+ rssiDbm: number().optional(),
26161
+ /** Network name of a wireless link, when the firmware reports it. */
26162
+ ssid: string().optional(),
26163
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26164
+ lastUpdated: number()
26165
+ });
26166
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26167
+ deviceId: number(),
26168
+ status: NetworkLinkStatusSchema
26169
+ });
26170
+ /**
25847
26171
  * network-quality — system-scoped singleton capability tracking RTT,
25848
26172
  * jitter, and observed/peak bandwidth per device + per client.
25849
26173
  *
@@ -27127,203 +27451,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27127
27451
  deviceId: number(),
27128
27452
  status: PtzAutotrackStatusSchema
27129
27453
  });
27130
- /**
27131
- * `navigation` — a device-scoped capability that natively expresses the FULL
27132
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27133
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27134
- *
27135
- * Why a NEW cap rather than overloading `ptz`:
27136
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27137
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27138
- * The two are different physical models: PTZ is absolute-position + presets,
27139
- * navigation is momentary drive nudges + discrete robot ACTIONS
27140
- * (dock / spot-clean / follow-pet / go-to-point / …).
27141
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27142
- * the reverse:
27143
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27144
- * / `getOptions`), and
27145
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27146
- * robot camera shows up in the existing PTZ control path without every
27147
- * PTZ provider learning about robots. The mapping lives in the adapter,
27148
- * not here (see the addon design note):
27149
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27150
- * ptz.stop() → navigation.stop()
27151
- * ptz.goHome() → navigation.runAction('goHome')
27152
- * ptz.getPresets() → navigation.listActions() (id→preset)
27153
- * ptz.goToPreset(id) → navigation.runAction(id)
27154
- *
27155
- * ## Continuous drive
27156
- *
27157
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27158
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27159
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27160
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27161
- * coalesce them. The UI owns the cadence.
27162
- *
27163
- * ## The action dictionary
27164
- *
27165
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27166
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27167
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27168
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27169
- * vendor-specific list. `kind: 'action'` entries are triggered with
27170
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27171
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27172
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27173
- *
27174
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27175
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27176
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27177
- * every device handle. A future nodedreame publish adds a typed
27178
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27179
- * provider can then swap the raw calls for the typed methods with no change to
27180
- * THIS contract.
27181
- */
27182
- /**
27183
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27184
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27185
- * halts it.
27186
- *
27187
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27188
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27189
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27190
- * vector by it (drivers without proportional drive ignore it).
27191
- *
27192
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27193
- * axis alone; an all-undefined nudge is a no-op.
27194
- */
27195
- var NavigationMoveCommandSchema = object({
27196
- pan: number().min(-1).max(1).optional(),
27197
- tilt: number().min(-1).max(1).optional(),
27198
- speed: number().min(0).max(1).optional()
27199
- });
27200
- /**
27201
- * The enumerated discrete actions a navigation-capable robot can perform via
27202
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27203
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27204
- * `playSound` (see the `sound` dictionary entries).
27205
- */
27206
- var NavigationActionIdSchema = _enum([
27207
- "goHome",
27208
- "locate",
27209
- "spotClean",
27210
- "findPet",
27211
- "personFollow",
27212
- "stop",
27213
- "startClean",
27214
- "pauseClean",
27215
- "dockWash",
27216
- "autoEmpty",
27217
- "flashOn",
27218
- "flashOff"
27219
- ]);
27220
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27221
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27222
- /**
27223
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27224
- * native panel and the PTZ mimic render as a button.
27225
- *
27226
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27227
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27228
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27229
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27230
- * - `label` — operator-facing English label.
27231
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27232
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27233
- * PTZ render ONLY enabled entries. Data-driven: the provider
27234
- * flips it from config, never by editing code.
27235
- */
27236
- var NavigationActionEntrySchema = object({
27237
- id: string(),
27238
- kind: NavigationEntryKindSchema,
27239
- label: string(),
27240
- icon: string(),
27241
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27242
- soundId: number().int().optional(),
27243
- /** Per-device feature flag — render this entry only when true. */
27244
- enabled: boolean()
27245
- });
27246
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27247
- var NavigationPointSchema = object({
27248
- x: number(),
27249
- y: number()
27250
- });
27251
- /**
27252
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27253
- * The cap reports which are enabled so the UI / PTZ render only the controls
27254
- * that are turned on for THIS device. Data-driven: the provider derives these
27255
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27256
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27257
- * that are not dictionary entries.
27258
- *
27259
- * - `move` / `stop` — the momentary drive joystick.
27260
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27261
- * map-coordinate plumbing is wired.
27262
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27263
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27264
- * - `light` — the on/off fill-light toggle (works anytime).
27265
- * - `lightMode` — the auto/manual selector + manual level slider (a
27266
- * camera-service control; needs an active stream).
27267
- */
27268
- var NavigationFeaturesSchema = object({
27269
- move: boolean(),
27270
- stop: boolean(),
27271
- goToPoint: boolean(),
27272
- runAction: boolean(),
27273
- playSound: boolean(),
27274
- light: boolean(),
27275
- lightMode: boolean()
27276
- });
27277
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27278
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27279
- /**
27280
- * Live navigation state so the UI can reflect what the robot is doing:
27281
- * - `mode` — coarse activity (idle / cleaning / following / …).
27282
- * - `following` — person/pet follow is currently armed.
27283
- * - `flash` — the on-camera fill light is on.
27284
- * - `lightMode` — auto vs manual fill-light mode.
27285
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27286
- * `lightMode === 'manual'`.
27287
- */
27288
- var NavigationStatusSchema = object({
27289
- mode: _enum([
27290
- "idle",
27291
- "cleaning",
27292
- "spot",
27293
- "following",
27294
- "goto",
27295
- "returning",
27296
- "paused",
27297
- "unknown"
27298
- ]),
27299
- following: boolean(),
27300
- flash: boolean(),
27301
- lightMode: NavigationLightModeSchema,
27302
- lightLevel: number().min(40).max(100),
27303
- /** Ms epoch when the slice was last updated. */
27304
- lastChangedAt: number()
27305
- });
27306
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27307
- 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({
27308
- deviceId: number(),
27309
- actionId: NavigationActionIdSchema
27310
- }), _void(), { kind: "mutation" }), method(object({
27311
- deviceId: number(),
27312
- soundId: number().int()
27313
- }), _void(), { kind: "mutation" }), method(object({
27314
- deviceId: number(),
27315
- on: boolean()
27316
- }), _void(), { kind: "mutation" }), method(object({
27317
- deviceId: number(),
27318
- mode: NavigationLightModeSchema,
27319
- level: number().min(40).max(100).optional()
27320
- }), _void(), { kind: "mutation" }), method(object({
27321
- deviceId: number(),
27322
- level: number().min(40).max(100)
27323
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27324
- deviceId: number(),
27325
- status: NavigationStatusSchema
27326
- });
27327
27454
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27328
27455
  kind: "mutation",
27329
27456
  auth: "admin"
@@ -35458,13 +35585,13 @@ Object.freeze({
35458
35585
  addonId: null,
35459
35586
  access: "view"
35460
35587
  },
35461
- "storage.getDefaultLocation": {
35588
+ "storage.list": {
35462
35589
  capName: "storage",
35463
35590
  capScope: "system",
35464
35591
  addonId: null,
35465
35592
  access: "view"
35466
35593
  },
35467
- "storage.list": {
35594
+ "storage.listDrainProgress": {
35468
35595
  capName: "storage",
35469
35596
  capScope: "system",
35470
35597
  addonId: null,
@@ -35614,6 +35741,12 @@ Object.freeze({
35614
35741
  addonId: null,
35615
35742
  access: "view"
35616
35743
  },
35744
+ "storageOccupancy.getOccupancy": {
35745
+ capName: "storage-occupancy",
35746
+ capScope: "system",
35747
+ addonId: null,
35748
+ access: "view"
35749
+ },
35617
35750
  "storageProvider.abortUpload": {
35618
35751
  capName: "storage-provider",
35619
35752
  capScope: "system",