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