@camstack/addon-notifiers 1.2.82 → 1.2.84

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
@@ -2,7 +2,7 @@ import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
2
2
  import { readFileSync } from "node:fs";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
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";
@@ -7721,111 +7734,6 @@ var CameraSwitchGroupSchema = object({
7721
7734
  fetchedAt: number()
7722
7735
  });
7723
7736
  /**
7724
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7725
- * an addon declares its channels in.
7726
- *
7727
- * ## Two axes, deliberately separated
7728
- *
7729
- * - **DECLARATION** — which channels exist. Only the addon knows:
7730
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7731
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7732
- * and rots silently. So a channel is declared where it is consulted, and the
7733
- * `log-channels` capability enumerates the declarations.
7734
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7735
- * thing: the logging settings document on the `system` cap. Two authorities
7736
- * over the values is the exact defect
7737
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7738
- * remove; re-introducing it from the cure side would be grotesque.
7739
- *
7740
- * Nothing in this file reads a clock, an env var or a store. The registry is
7741
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7742
- * the hot path with a value somebody actually read, and by
7743
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7744
- * never reaches here, so it can neither disarm an armed channel nor arm a
7745
- * disarmed one (D49).
7746
- *
7747
- * ## The canonical call shape
7748
- *
7749
- * ```ts
7750
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7751
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7752
- * }
7753
- * ```
7754
- *
7755
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7756
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7757
- * object literal is never constructed because it lives inside the branch. It
7758
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7759
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7760
- * destination floor (measured at 1.93 ns/call when off).
7761
- *
7762
- * ## Why a channel emits at `info`
7763
- *
7764
- * `loki-logging.addon.ts` pins the destination default at `info` and
7765
- * `loki-destination.ts` drops everything below it, so a line emitted at
7766
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7767
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7768
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7769
- * emits at the channel's declared level, whose schema floor is `info`.
7770
- */
7771
- /**
7772
- * The level a channel writes at once armed.
7773
- *
7774
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7775
- * not leave the process for Loki, and the whole point of arming a channel is
7776
- * to read it later.
7777
- */
7778
- var LogChannelLevelSchema = _enum([
7779
- "info",
7780
- "warn",
7781
- "error"
7782
- ]);
7783
- /**
7784
- * What an addon declares about one channel. No value, no state — a
7785
- * declaration is inert.
7786
- */
7787
- var LogChannelDescriptorSchema = object({
7788
- /**
7789
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7790
- * the addon's short name so an operator reading a channel list can tell who
7791
- * owns it without a second lookup.
7792
- */
7793
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7794
- /** One sentence: what the operator will SEE after arming it. */
7795
- description: string().min(1),
7796
- /** The level its lines are emitted at. Never below `info`. */
7797
- defaultLevel: LogChannelLevelSchema,
7798
- /**
7799
- * Whether this channel can be narrowed to a camera.
7800
- *
7801
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7802
- * consulted with the numeric device id, AND every line the channel admits
7803
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7804
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7805
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7806
- * the body is the only way to filter.
7807
- *
7808
- * A channel whose lines carry the device only in `meta` (or not at all) is
7809
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7810
- * the operator narrows to one camera, sees nothing, and concludes the code
7811
- * path was never taken.
7812
- */
7813
- perDevice: boolean()
7814
- });
7815
- /**
7816
- * An armed window over one channel, as the document hands it to a mirror.
7817
- *
7818
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7819
- * expires by itself, which is the one failure a boolean cannot avoid.
7820
- */
7821
- var LogChannelWindowSchema = object({
7822
- channel: string().min(1),
7823
- /** Epoch ms the window closes at. */
7824
- armedUntilMs: number(),
7825
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7826
- deviceIds: array(number().int()).readonly().nullable()
7827
- });
7828
- /**
7829
7737
  * Ops-log — the durable, append-only operations audit shared by the
7830
7738
  * recordings and events management surfaces.
7831
7739
  *
@@ -8747,6 +8655,21 @@ var StorageCleanupJobSchema = object({
8747
8655
  });
8748
8656
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8749
8657
  /**
8658
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8659
+ * alias below is `z.infer<>` of it, never a second spelling.
8660
+ */
8661
+ var StorageLocationModeSchema = _enum([
8662
+ "active",
8663
+ "readonly",
8664
+ "drain",
8665
+ "disabled"
8666
+ ]);
8667
+ _enum([
8668
+ "normal",
8669
+ "never",
8670
+ "drain"
8671
+ ]);
8672
+ /**
8750
8673
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8751
8674
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8752
8675
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8771,8 +8694,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8771
8694
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8772
8695
  *
8773
8696
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8774
- * The default location for a type uses `id === <type>:default` by
8775
- * convention (the bare type ref like `'backups'` resolves to it).
8697
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8698
+ * There is no default location any more (D383): `enabled` is the whole write
8699
+ * model, and a bare type ref resolves to the sole location of the type, or —
8700
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8701
+ * slug is `default`.
8776
8702
  *
8777
8703
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8778
8704
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8793,23 +8719,37 @@ var StorageLocationSchema = object({
8793
8719
  * flag at upsert time, not here (the schema is provider-agnostic).
8794
8720
  */
8795
8721
  nodeId: string().optional(),
8796
- isDefault: boolean().default(false),
8797
8722
  isSystem: boolean().default(false),
8798
8723
  /**
8799
- * Operator opt-in: whether consumers that BALANCE across several locations
8800
- * of a type may write here. Recordings reads it today; event media and
8801
- * backups are the next consumers, which is why the flag lives on the
8802
- * location rather than in any one addon's store — nothing has to be
8803
- * extended to add the next consumer.
8724
+ * THE write switch, and the only one (D383). `enabled: true` means every
8725
+ * consumer that chooses a write target for this type may write here, and all
8726
+ * enabled locations of a type are used TOGETHER; `false` means read-only —
8727
+ * still read, still played back, still age-swept, still drained, never
8728
+ * written.
8804
8729
  *
8805
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8806
- * flag existed reads back with no flag and keeps working exactly as before;
8807
- * that is the whole compat story, and it is why no migration ships with it.
8808
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8809
- * disk must not silently start writing to it); the default of a type is
8810
- * always stamped `true`.
8730
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8731
+ * stored" on an update and "born inert unless it is the first location of its
8732
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8733
+ * enabled — {@link isLocationEnabled} is the one place that says so, and the
8734
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8735
+ * stops existing rather than being re-derived on every read.
8811
8736
  */
8812
8737
  enabled: boolean().optional(),
8738
+ /**
8739
+ * THE state of this location (D385), and the only authority on what may be
8740
+ * written, read or evicted here. Interpreted in exactly one place —
8741
+ * `storage-location-mode.ts` — which also folds the legacy
8742
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8743
+ * ambiguous.
8744
+ *
8745
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8746
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8747
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8748
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8749
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8750
+ * either, so the two cannot disagree.
8751
+ */
8752
+ mode: StorageLocationModeSchema.optional(),
8813
8753
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8814
8754
  * for node-local locations it can reach) — never persisted, absent when the
8815
8755
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8817,13 +8757,50 @@ var StorageLocationSchema = object({
8817
8757
  totalBytes: number(),
8818
8758
  availableBytes: number()
8819
8759
  }).nullable().optional(),
8760
+ /**
8761
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8762
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8763
+ * never persisted, never a filesystem walk.
8764
+ *
8765
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8766
+ * location yet — nobody stores here, the owning addon is down, or the first
8767
+ * refresh has not completed. A UI must omit the segment rather than draw it
8768
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8769
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8770
+ * be spelled out loud instead of appearing by accident.
8771
+ *
8772
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8773
+ * about the whole figure rather than about its freshest part.
8774
+ */
8775
+ owned: object({
8776
+ bytes: number().int().nonnegative(),
8777
+ measuredAtMs: number().int().nonnegative()
8778
+ }).optional(),
8820
8779
  createdAt: number(),
8821
8780
  updatedAt: number()
8822
8781
  });
8782
+ object({ isDefault: boolean().optional() });
8783
+ /**
8784
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8785
+ *
8786
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8787
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8788
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8789
+ * operator learns not to believe the screen.
8790
+ */
8791
+ var StorageDrainProgressSchema = object({
8792
+ locationId: string(),
8793
+ startedAtMs: number(),
8794
+ startBytes: number(),
8795
+ bytesRemaining: number(),
8796
+ drained: boolean(),
8797
+ estimatedEmptyAtMs: number().nullable()
8798
+ });
8823
8799
  /**
8824
8800
  * Reference accepted by consumer-facing `api.storage.*` calls.
8825
8801
  * Either:
8826
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
8802
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
8803
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8827
8804
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8828
8805
  *
8829
8806
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -8999,6 +8976,111 @@ var DecoderSessionConfigSchema = object({
8999
8976
  */
9000
8977
  debug: boolean().optional()
9001
8978
  });
8979
+ /**
8980
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
8981
+ * an addon declares its channels in.
8982
+ *
8983
+ * ## Two axes, deliberately separated
8984
+ *
8985
+ * - **DECLARATION** — which channels exist. Only the addon knows:
8986
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8987
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
8988
+ * and rots silently. So a channel is declared where it is consulted, and the
8989
+ * `log-channels` capability enumerates the declarations.
8990
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
8991
+ * thing: the logging settings document on the `system` cap. Two authorities
8992
+ * over the values is the exact defect
8993
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8994
+ * remove; re-introducing it from the cure side would be grotesque.
8995
+ *
8996
+ * Nothing in this file reads a clock, an env var or a store. The registry is
8997
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8998
+ * the hot path with a value somebody actually read, and by
8999
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
9000
+ * never reaches here, so it can neither disarm an armed channel nor arm a
9001
+ * disarmed one (D49).
9002
+ *
9003
+ * ## The canonical call shape
9004
+ *
9005
+ * ```ts
9006
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
9007
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
9008
+ * }
9009
+ * ```
9010
+ *
9011
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
9012
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
9013
+ * object literal is never constructed because it lives inside the branch. It
9014
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
9015
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
9016
+ * destination floor (measured at 1.93 ns/call when off).
9017
+ *
9018
+ * ## Why a channel emits at `info`
9019
+ *
9020
+ * `loki-logging.addon.ts` pins the destination default at `info` and
9021
+ * `loki-destination.ts` drops everything below it, so a line emitted at
9022
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
9023
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
9024
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
9025
+ * emits at the channel's declared level, whose schema floor is `info`.
9026
+ */
9027
+ /**
9028
+ * The level a channel writes at once armed.
9029
+ *
9030
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
9031
+ * not leave the process for Loki, and the whole point of arming a channel is
9032
+ * to read it later.
9033
+ */
9034
+ var LogChannelLevelSchema = _enum([
9035
+ "info",
9036
+ "warn",
9037
+ "error"
9038
+ ]);
9039
+ /**
9040
+ * What an addon declares about one channel. No value, no state — a
9041
+ * declaration is inert.
9042
+ */
9043
+ var LogChannelDescriptorSchema = object({
9044
+ /**
9045
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
9046
+ * the addon's short name so an operator reading a channel list can tell who
9047
+ * owns it without a second lookup.
9048
+ */
9049
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
9050
+ /** One sentence: what the operator will SEE after arming it. */
9051
+ description: string().min(1),
9052
+ /** The level its lines are emitted at. Never below `info`. */
9053
+ defaultLevel: LogChannelLevelSchema,
9054
+ /**
9055
+ * Whether this channel can be narrowed to a camera.
9056
+ *
9057
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
9058
+ * consulted with the numeric device id, AND every line the channel admits
9059
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
9060
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
9061
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
9062
+ * the body is the only way to filter.
9063
+ *
9064
+ * A channel whose lines carry the device only in `meta` (or not at all) is
9065
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
9066
+ * the operator narrows to one camera, sees nothing, and concludes the code
9067
+ * path was never taken.
9068
+ */
9069
+ perDevice: boolean()
9070
+ });
9071
+ /**
9072
+ * An armed window over one channel, as the document hands it to a mirror.
9073
+ *
9074
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
9075
+ * expires by itself, which is the one failure a boolean cannot avoid.
9076
+ */
9077
+ var LogChannelWindowSchema = object({
9078
+ channel: string().min(1),
9079
+ /** Epoch ms the window closes at. */
9080
+ armedUntilMs: number(),
9081
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
9082
+ deviceIds: array(number().int()).readonly().nullable()
9083
+ });
9002
9084
  var MODEL_FORMATS = [
9003
9085
  "onnx",
9004
9086
  "coreml",
@@ -21718,7 +21800,7 @@ method(object({
21718
21800
  downloadId: string(),
21719
21801
  offset: number(),
21720
21802
  length: number()
21721
- }), _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({
21803
+ }), _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({
21722
21804
  createdAt: true,
21723
21805
  updatedAt: true
21724
21806
  }), StorageLocationSchema, {
@@ -21730,7 +21812,7 @@ method(object({
21730
21812
  }), _void(), {
21731
21813
  kind: "mutation",
21732
21814
  auth: "admin"
21733
- }), method(object({ id: string() }), object({
21815
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21734
21816
  ok: boolean(),
21735
21817
  error: string().optional()
21736
21818
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21800,6 +21882,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21800
21882
  kind: "mutation",
21801
21883
  auth: "admin"
21802
21884
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21885
+ /**
21886
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
21887
+ * location (D388).
21888
+ *
21889
+ * ## Why this is not `storage-evictable`
21890
+ *
21891
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
21892
+ * not, in two ways that both matter and both bite hardest on the locations an
21893
+ * operator most wants a figure for:
21894
+ *
21895
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
21896
+ * and `recordingsLow:default` deliberately share one root and evict as one
21897
+ * oldest-first pool, so both answer with the SAME combined total. As an
21898
+ * occupancy figure that double-counts the disk.
21899
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
21900
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
21901
+ * is retiring and staring at.
21902
+ *
21903
+ * So this is its own contract with its own quantity, and the quantity is
21904
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
21905
+ * would ever be willing to delete it. A provider that can only answer
21906
+ * "evictable" must not register here — a number that silently means different
21907
+ * things per class is worse than no number.
21908
+ *
21909
+ * ## Absence is an answer
21910
+ *
21911
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
21912
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
21913
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
21914
+ * consuming side has to be written out loud instead of appearing by accident.
21915
+ *
21916
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
21917
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
21918
+ */
21919
+ /** One provider's occupancy answer for one location. */
21920
+ var StorageOccupancyReportSchema = object({
21921
+ locationId: string(),
21922
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
21923
+ * not net of what it is willing to delete. */
21924
+ ownedBytes: number().int().nonnegative(),
21925
+ /** When the provider last actually measured this. The orchestrator carries it
21926
+ * through so a UI can say how old the figure is instead of implying "now". */
21927
+ measuredAtMs: number().int().nonnegative()
21928
+ });
21929
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21803
21930
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21804
21931
  providerId: string().min(1),
21805
21932
  displayName: string().min(1),
@@ -23435,39 +23562,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23435
23562
  deviceId: number(),
23436
23563
  status: BatteryStatusSchema
23437
23564
  });
23438
- /**
23439
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23440
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23441
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23442
- * one Home Assistant projection.
23443
- */
23444
- var NetworkLinkStatusSchema = object({
23445
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23446
- type: _enum([
23447
- "wifi",
23448
- "ethernet",
23449
- "cellular",
23450
- "unknown"
23451
- ]),
23452
- /**
23453
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23454
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23455
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23456
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23457
- * SKIP a null rather than coerce it.
23458
- */
23459
- signalPercent: number().min(0).max(100).nullable(),
23460
- /** Raw received signal strength in dBm, when the firmware reports one. */
23461
- rssiDbm: number().optional(),
23462
- /** Network name of a wireless link, when the firmware reports it. */
23463
- ssid: string().optional(),
23464
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23465
- lastUpdated: number()
23466
- });
23467
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23468
- deviceId: number(),
23469
- status: NetworkLinkStatusSchema
23470
- });
23471
23565
  object({
23472
23566
  on: boolean(),
23473
23567
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25821,6 +25915,236 @@ DeviceType.Camera, method(object({
25821
25915
  detection: NativeDetectionSchema
25822
25916
  });
25823
25917
  /**
25918
+ * `navigation` — a device-scoped capability that natively expresses the FULL
25919
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
25920
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
25921
+ *
25922
+ * Why a NEW cap rather than overloading `ptz`:
25923
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
25924
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
25925
+ * The two are different physical models: PTZ is absolute-position + presets,
25926
+ * navigation is momentary drive nudges + discrete robot ACTIONS
25927
+ * (dock / spot-clean / follow-pet / go-to-point / …).
25928
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
25929
+ * the reverse:
25930
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
25931
+ * / `getOptions`), and
25932
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
25933
+ * robot camera shows up in the existing PTZ control path without every
25934
+ * PTZ provider learning about robots. The mapping lives in the adapter,
25935
+ * not here (see the addon design note):
25936
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
25937
+ * ptz.stop() → navigation.stop()
25938
+ * ptz.goHome() → navigation.runAction('goHome')
25939
+ * ptz.getPresets() → navigation.listActions() (id→preset)
25940
+ * ptz.goToPreset(id) → navigation.runAction(id)
25941
+ *
25942
+ * ## Continuous drive
25943
+ *
25944
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
25945
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
25946
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
25947
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
25948
+ * coalesce them. The UI owns the cadence.
25949
+ *
25950
+ * ## The action dictionary
25951
+ *
25952
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
25953
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
25954
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
25955
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
25956
+ * vendor-specific list. `kind: 'action'` entries are triggered with
25957
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
25958
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
25959
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
25960
+ *
25961
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
25962
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
25963
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
25964
+ * every device handle. A future nodedreame publish adds a typed
25965
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
25966
+ * provider can then swap the raw calls for the typed methods with no change to
25967
+ * THIS contract.
25968
+ */
25969
+ /**
25970
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
25971
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
25972
+ * halts it.
25973
+ *
25974
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
25975
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
25976
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
25977
+ * vector by it (drivers without proportional drive ignore it).
25978
+ *
25979
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
25980
+ * axis alone; an all-undefined nudge is a no-op.
25981
+ */
25982
+ var NavigationMoveCommandSchema = object({
25983
+ pan: number().min(-1).max(1).optional(),
25984
+ tilt: number().min(-1).max(1).optional(),
25985
+ speed: number().min(0).max(1).optional()
25986
+ });
25987
+ /**
25988
+ * The enumerated discrete actions a navigation-capable robot can perform via
25989
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
25990
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
25991
+ * `playSound` (see the `sound` dictionary entries).
25992
+ */
25993
+ var NavigationActionIdSchema = _enum([
25994
+ "goHome",
25995
+ "locate",
25996
+ "spotClean",
25997
+ "findPet",
25998
+ "personFollow",
25999
+ "stop",
26000
+ "startClean",
26001
+ "pauseClean",
26002
+ "dockWash",
26003
+ "autoEmpty",
26004
+ "flashOn",
26005
+ "flashOff"
26006
+ ]);
26007
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26008
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26009
+ /**
26010
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26011
+ * native panel and the PTZ mimic render as a button.
26012
+ *
26013
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26014
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26015
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26016
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26017
+ * - `label` — operator-facing English label.
26018
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26019
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26020
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26021
+ * flips it from config, never by editing code.
26022
+ */
26023
+ var NavigationActionEntrySchema = object({
26024
+ id: string(),
26025
+ kind: NavigationEntryKindSchema,
26026
+ label: string(),
26027
+ icon: string(),
26028
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26029
+ soundId: number().int().optional(),
26030
+ /** Per-device feature flag — render this entry only when true. */
26031
+ enabled: boolean()
26032
+ });
26033
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26034
+ var NavigationPointSchema = object({
26035
+ x: number(),
26036
+ y: number()
26037
+ });
26038
+ /**
26039
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26040
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26041
+ * that are turned on for THIS device. Data-driven: the provider derives these
26042
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26043
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26044
+ * that are not dictionary entries.
26045
+ *
26046
+ * - `move` / `stop` — the momentary drive joystick.
26047
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26048
+ * map-coordinate plumbing is wired.
26049
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26050
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26051
+ * - `light` — the on/off fill-light toggle (works anytime).
26052
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26053
+ * camera-service control; needs an active stream).
26054
+ */
26055
+ var NavigationFeaturesSchema = object({
26056
+ move: boolean(),
26057
+ stop: boolean(),
26058
+ goToPoint: boolean(),
26059
+ runAction: boolean(),
26060
+ playSound: boolean(),
26061
+ light: boolean(),
26062
+ lightMode: boolean()
26063
+ });
26064
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26065
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26066
+ /**
26067
+ * Live navigation state so the UI can reflect what the robot is doing:
26068
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26069
+ * - `following` — person/pet follow is currently armed.
26070
+ * - `flash` — the on-camera fill light is on.
26071
+ * - `lightMode` — auto vs manual fill-light mode.
26072
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26073
+ * `lightMode === 'manual'`.
26074
+ */
26075
+ var NavigationStatusSchema = object({
26076
+ mode: _enum([
26077
+ "idle",
26078
+ "cleaning",
26079
+ "spot",
26080
+ "following",
26081
+ "goto",
26082
+ "returning",
26083
+ "paused",
26084
+ "unknown"
26085
+ ]),
26086
+ following: boolean(),
26087
+ flash: boolean(),
26088
+ lightMode: NavigationLightModeSchema,
26089
+ lightLevel: number().min(40).max(100),
26090
+ /** Ms epoch when the slice was last updated. */
26091
+ lastChangedAt: number()
26092
+ });
26093
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26094
+ 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({
26095
+ deviceId: number(),
26096
+ actionId: NavigationActionIdSchema
26097
+ }), _void(), { kind: "mutation" }), method(object({
26098
+ deviceId: number(),
26099
+ soundId: number().int()
26100
+ }), _void(), { kind: "mutation" }), method(object({
26101
+ deviceId: number(),
26102
+ on: boolean()
26103
+ }), _void(), { kind: "mutation" }), method(object({
26104
+ deviceId: number(),
26105
+ mode: NavigationLightModeSchema,
26106
+ level: number().min(40).max(100).optional()
26107
+ }), _void(), { kind: "mutation" }), method(object({
26108
+ deviceId: number(),
26109
+ level: number().min(40).max(100)
26110
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26111
+ deviceId: number(),
26112
+ status: NavigationStatusSchema
26113
+ });
26114
+ /**
26115
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26116
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26117
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26118
+ * one Home Assistant projection.
26119
+ */
26120
+ var NetworkLinkStatusSchema = object({
26121
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26122
+ type: _enum([
26123
+ "wifi",
26124
+ "ethernet",
26125
+ "cellular",
26126
+ "unknown"
26127
+ ]),
26128
+ /**
26129
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26130
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26131
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26132
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26133
+ * SKIP a null rather than coerce it.
26134
+ */
26135
+ signalPercent: number().min(0).max(100).nullable(),
26136
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26137
+ rssiDbm: number().optional(),
26138
+ /** Network name of a wireless link, when the firmware reports it. */
26139
+ ssid: string().optional(),
26140
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26141
+ lastUpdated: number()
26142
+ });
26143
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26144
+ deviceId: number(),
26145
+ status: NetworkLinkStatusSchema
26146
+ });
26147
+ /**
25824
26148
  * network-quality — system-scoped singleton capability tracking RTT,
25825
26149
  * jitter, and observed/peak bandwidth per device + per client.
25826
26150
  *
@@ -27062,203 +27386,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27062
27386
  deviceId: number(),
27063
27387
  status: PtzAutotrackStatusSchema
27064
27388
  });
27065
- /**
27066
- * `navigation` — a device-scoped capability that natively expresses the FULL
27067
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27068
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27069
- *
27070
- * Why a NEW cap rather than overloading `ptz`:
27071
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27072
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27073
- * The two are different physical models: PTZ is absolute-position + presets,
27074
- * navigation is momentary drive nudges + discrete robot ACTIONS
27075
- * (dock / spot-clean / follow-pet / go-to-point / …).
27076
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27077
- * the reverse:
27078
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27079
- * / `getOptions`), and
27080
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27081
- * robot camera shows up in the existing PTZ control path without every
27082
- * PTZ provider learning about robots. The mapping lives in the adapter,
27083
- * not here (see the addon design note):
27084
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27085
- * ptz.stop() → navigation.stop()
27086
- * ptz.goHome() → navigation.runAction('goHome')
27087
- * ptz.getPresets() → navigation.listActions() (id→preset)
27088
- * ptz.goToPreset(id) → navigation.runAction(id)
27089
- *
27090
- * ## Continuous drive
27091
- *
27092
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27093
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27094
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27095
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27096
- * coalesce them. The UI owns the cadence.
27097
- *
27098
- * ## The action dictionary
27099
- *
27100
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27101
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27102
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27103
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27104
- * vendor-specific list. `kind: 'action'` entries are triggered with
27105
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27106
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27107
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27108
- *
27109
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27110
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27111
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27112
- * every device handle. A future nodedreame publish adds a typed
27113
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27114
- * provider can then swap the raw calls for the typed methods with no change to
27115
- * THIS contract.
27116
- */
27117
- /**
27118
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27119
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27120
- * halts it.
27121
- *
27122
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27123
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27124
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27125
- * vector by it (drivers without proportional drive ignore it).
27126
- *
27127
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27128
- * axis alone; an all-undefined nudge is a no-op.
27129
- */
27130
- var NavigationMoveCommandSchema = object({
27131
- pan: number().min(-1).max(1).optional(),
27132
- tilt: number().min(-1).max(1).optional(),
27133
- speed: number().min(0).max(1).optional()
27134
- });
27135
- /**
27136
- * The enumerated discrete actions a navigation-capable robot can perform via
27137
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27138
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27139
- * `playSound` (see the `sound` dictionary entries).
27140
- */
27141
- var NavigationActionIdSchema = _enum([
27142
- "goHome",
27143
- "locate",
27144
- "spotClean",
27145
- "findPet",
27146
- "personFollow",
27147
- "stop",
27148
- "startClean",
27149
- "pauseClean",
27150
- "dockWash",
27151
- "autoEmpty",
27152
- "flashOn",
27153
- "flashOff"
27154
- ]);
27155
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27156
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27157
- /**
27158
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27159
- * native panel and the PTZ mimic render as a button.
27160
- *
27161
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27162
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27163
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27164
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27165
- * - `label` — operator-facing English label.
27166
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27167
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27168
- * PTZ render ONLY enabled entries. Data-driven: the provider
27169
- * flips it from config, never by editing code.
27170
- */
27171
- var NavigationActionEntrySchema = object({
27172
- id: string(),
27173
- kind: NavigationEntryKindSchema,
27174
- label: string(),
27175
- icon: string(),
27176
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27177
- soundId: number().int().optional(),
27178
- /** Per-device feature flag — render this entry only when true. */
27179
- enabled: boolean()
27180
- });
27181
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27182
- var NavigationPointSchema = object({
27183
- x: number(),
27184
- y: number()
27185
- });
27186
- /**
27187
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27188
- * The cap reports which are enabled so the UI / PTZ render only the controls
27189
- * that are turned on for THIS device. Data-driven: the provider derives these
27190
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27191
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27192
- * that are not dictionary entries.
27193
- *
27194
- * - `move` / `stop` — the momentary drive joystick.
27195
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27196
- * map-coordinate plumbing is wired.
27197
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27198
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27199
- * - `light` — the on/off fill-light toggle (works anytime).
27200
- * - `lightMode` — the auto/manual selector + manual level slider (a
27201
- * camera-service control; needs an active stream).
27202
- */
27203
- var NavigationFeaturesSchema = object({
27204
- move: boolean(),
27205
- stop: boolean(),
27206
- goToPoint: boolean(),
27207
- runAction: boolean(),
27208
- playSound: boolean(),
27209
- light: boolean(),
27210
- lightMode: boolean()
27211
- });
27212
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27213
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27214
- /**
27215
- * Live navigation state so the UI can reflect what the robot is doing:
27216
- * - `mode` — coarse activity (idle / cleaning / following / …).
27217
- * - `following` — person/pet follow is currently armed.
27218
- * - `flash` — the on-camera fill light is on.
27219
- * - `lightMode` — auto vs manual fill-light mode.
27220
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27221
- * `lightMode === 'manual'`.
27222
- */
27223
- var NavigationStatusSchema = object({
27224
- mode: _enum([
27225
- "idle",
27226
- "cleaning",
27227
- "spot",
27228
- "following",
27229
- "goto",
27230
- "returning",
27231
- "paused",
27232
- "unknown"
27233
- ]),
27234
- following: boolean(),
27235
- flash: boolean(),
27236
- lightMode: NavigationLightModeSchema,
27237
- lightLevel: number().min(40).max(100),
27238
- /** Ms epoch when the slice was last updated. */
27239
- lastChangedAt: number()
27240
- });
27241
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27242
- 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({
27243
- deviceId: number(),
27244
- actionId: NavigationActionIdSchema
27245
- }), _void(), { kind: "mutation" }), method(object({
27246
- deviceId: number(),
27247
- soundId: number().int()
27248
- }), _void(), { kind: "mutation" }), method(object({
27249
- deviceId: number(),
27250
- on: boolean()
27251
- }), _void(), { kind: "mutation" }), method(object({
27252
- deviceId: number(),
27253
- mode: NavigationLightModeSchema,
27254
- level: number().min(40).max(100).optional()
27255
- }), _void(), { kind: "mutation" }), method(object({
27256
- deviceId: number(),
27257
- level: number().min(40).max(100)
27258
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27259
- deviceId: number(),
27260
- status: NavigationStatusSchema
27261
- });
27262
27389
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27263
27390
  kind: "mutation",
27264
27391
  auth: "admin"
@@ -34567,13 +34694,13 @@ Object.freeze({
34567
34694
  addonId: null,
34568
34695
  access: "view"
34569
34696
  },
34570
- "storage.getDefaultLocation": {
34697
+ "storage.list": {
34571
34698
  capName: "storage",
34572
34699
  capScope: "system",
34573
34700
  addonId: null,
34574
34701
  access: "view"
34575
34702
  },
34576
- "storage.list": {
34703
+ "storage.listDrainProgress": {
34577
34704
  capName: "storage",
34578
34705
  capScope: "system",
34579
34706
  addonId: null,
@@ -34723,6 +34850,12 @@ Object.freeze({
34723
34850
  addonId: null,
34724
34851
  access: "view"
34725
34852
  },
34853
+ "storageOccupancy.getOccupancy": {
34854
+ capName: "storage-occupancy",
34855
+ capScope: "system",
34856
+ addonId: null,
34857
+ access: "view"
34858
+ },
34726
34859
  "storageProvider.abortUpload": {
34727
34860
  capName: "storage-provider",
34728
34861
  capScope: "system",