@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.js CHANGED
@@ -29,7 +29,7 @@ let node_fs = require("node:fs");
29
29
  let node_path = require("node:path");
30
30
  node_path = __toESM(node_path);
31
31
  let node_url = require("node:url");
32
- //#region ../types/dist/event-category-zAv7pMUz.mjs
32
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
33
33
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
34
34
  EventCategory["SystemBoot"] = "system.boot";
35
35
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -224,6 +224,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
224
224
  EventCategory["ProcessCrashed"] = "process.crashed";
225
225
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
226
226
  EventCategory["ProcessRestarted"] = "process.restarted";
227
+ /**
228
+ * The SET of storage locations changed — one was created, edited, enabled,
229
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
230
+ *
231
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
232
+ * it must also converge on its own periodic path, because a dropped event
233
+ * must not leave a node writing to yesterday's disk set forever. It exists
234
+ * because there was NO signal at all — an operator who added a second
235
+ * recordings disk in the admin UI got nothing, and the recorder kept its
236
+ * resolved locations until something else happened to re-resolve them
237
+ * (D387). Payload `StorageLocationsChangedPayload`.
238
+ */
239
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
227
240
  EventCategory["RecordingStarted"] = "recording.started";
228
241
  EventCategory["RecordingStopped"] = "recording.stopped";
229
242
  EventCategory["RecordingError"] = "recording.error";
@@ -7748,111 +7761,6 @@ var CameraSwitchGroupSchema = object({
7748
7761
  fetchedAt: number()
7749
7762
  });
7750
7763
  /**
7751
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7752
- * an addon declares its channels in.
7753
- *
7754
- * ## Two axes, deliberately separated
7755
- *
7756
- * - **DECLARATION** — which channels exist. Only the addon knows:
7757
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7758
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7759
- * and rots silently. So a channel is declared where it is consulted, and the
7760
- * `log-channels` capability enumerates the declarations.
7761
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7762
- * thing: the logging settings document on the `system` cap. Two authorities
7763
- * over the values is the exact defect
7764
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7765
- * remove; re-introducing it from the cure side would be grotesque.
7766
- *
7767
- * Nothing in this file reads a clock, an env var or a store. The registry is
7768
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7769
- * the hot path with a value somebody actually read, and by
7770
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7771
- * never reaches here, so it can neither disarm an armed channel nor arm a
7772
- * disarmed one (D49).
7773
- *
7774
- * ## The canonical call shape
7775
- *
7776
- * ```ts
7777
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7778
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7779
- * }
7780
- * ```
7781
- *
7782
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7783
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7784
- * object literal is never constructed because it lives inside the branch. It
7785
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7786
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7787
- * destination floor (measured at 1.93 ns/call when off).
7788
- *
7789
- * ## Why a channel emits at `info`
7790
- *
7791
- * `loki-logging.addon.ts` pins the destination default at `info` and
7792
- * `loki-destination.ts` drops everything below it, so a line emitted at
7793
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7794
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7795
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7796
- * emits at the channel's declared level, whose schema floor is `info`.
7797
- */
7798
- /**
7799
- * The level a channel writes at once armed.
7800
- *
7801
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7802
- * not leave the process for Loki, and the whole point of arming a channel is
7803
- * to read it later.
7804
- */
7805
- var LogChannelLevelSchema = _enum([
7806
- "info",
7807
- "warn",
7808
- "error"
7809
- ]);
7810
- /**
7811
- * What an addon declares about one channel. No value, no state — a
7812
- * declaration is inert.
7813
- */
7814
- var LogChannelDescriptorSchema = object({
7815
- /**
7816
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7817
- * the addon's short name so an operator reading a channel list can tell who
7818
- * owns it without a second lookup.
7819
- */
7820
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7821
- /** One sentence: what the operator will SEE after arming it. */
7822
- description: string().min(1),
7823
- /** The level its lines are emitted at. Never below `info`. */
7824
- defaultLevel: LogChannelLevelSchema,
7825
- /**
7826
- * Whether this channel can be narrowed to a camera.
7827
- *
7828
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7829
- * consulted with the numeric device id, AND every line the channel admits
7830
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7831
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7832
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7833
- * the body is the only way to filter.
7834
- *
7835
- * A channel whose lines carry the device only in `meta` (or not at all) is
7836
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7837
- * the operator narrows to one camera, sees nothing, and concludes the code
7838
- * path was never taken.
7839
- */
7840
- perDevice: boolean()
7841
- });
7842
- /**
7843
- * An armed window over one channel, as the document hands it to a mirror.
7844
- *
7845
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7846
- * expires by itself, which is the one failure a boolean cannot avoid.
7847
- */
7848
- var LogChannelWindowSchema = object({
7849
- channel: string().min(1),
7850
- /** Epoch ms the window closes at. */
7851
- armedUntilMs: number(),
7852
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7853
- deviceIds: array(number().int()).readonly().nullable()
7854
- });
7855
- /**
7856
7764
  * Ops-log — the durable, append-only operations audit shared by the
7857
7765
  * recordings and events management surfaces.
7858
7766
  *
@@ -8774,6 +8682,21 @@ var StorageCleanupJobSchema = object({
8774
8682
  });
8775
8683
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8776
8684
  /**
8685
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8686
+ * alias below is `z.infer<>` of it, never a second spelling.
8687
+ */
8688
+ var StorageLocationModeSchema = _enum([
8689
+ "active",
8690
+ "readonly",
8691
+ "drain",
8692
+ "disabled"
8693
+ ]);
8694
+ _enum([
8695
+ "normal",
8696
+ "never",
8697
+ "drain"
8698
+ ]);
8699
+ /**
8777
8700
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8778
8701
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8779
8702
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8798,8 +8721,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8798
8721
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8799
8722
  *
8800
8723
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8801
- * The default location for a type uses `id === <type>:default` by
8802
- * convention (the bare type ref like `'backups'` resolves to it).
8724
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8725
+ * There is no default location any more (D383): `enabled` is the whole write
8726
+ * model, and a bare type ref resolves to the sole location of the type, or —
8727
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8728
+ * slug is `default`.
8803
8729
  *
8804
8730
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8805
8731
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8820,23 +8746,37 @@ var StorageLocationSchema = object({
8820
8746
  * flag at upsert time, not here (the schema is provider-agnostic).
8821
8747
  */
8822
8748
  nodeId: string().optional(),
8823
- isDefault: boolean().default(false),
8824
8749
  isSystem: boolean().default(false),
8825
8750
  /**
8826
- * Operator opt-in: whether consumers that BALANCE across several locations
8827
- * of a type may write here. Recordings reads it today; event media and
8828
- * backups are the next consumers, which is why the flag lives on the
8829
- * location rather than in any one addon's store — nothing has to be
8830
- * extended to add the next consumer.
8751
+ * THE write switch, and the only one (D383). `enabled: true` means every
8752
+ * consumer that chooses a write target for this type may write here, and all
8753
+ * enabled locations of a type are used TOGETHER; `false` means read-only —
8754
+ * still read, still played back, still age-swept, still drained, never
8755
+ * written.
8831
8756
  *
8832
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8833
- * flag existed reads back with no flag and keeps working exactly as before;
8834
- * that is the whole compat story, and it is why no migration ships with it.
8835
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8836
- * disk must not silently start writing to it); the default of a type is
8837
- * always stamped `true`.
8757
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8758
+ * stored" on an update and "born inert unless it is the first location of its
8759
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8760
+ * enabled — {@link isLocationEnabled} is the one place that says so, and the
8761
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8762
+ * stops existing rather than being re-derived on every read.
8838
8763
  */
8839
8764
  enabled: boolean().optional(),
8765
+ /**
8766
+ * THE state of this location (D385), and the only authority on what may be
8767
+ * written, read or evicted here. Interpreted in exactly one place —
8768
+ * `storage-location-mode.ts` — which also folds the legacy
8769
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8770
+ * ambiguous.
8771
+ *
8772
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8773
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8774
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8775
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8776
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8777
+ * either, so the two cannot disagree.
8778
+ */
8779
+ mode: StorageLocationModeSchema.optional(),
8840
8780
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8841
8781
  * for node-local locations it can reach) — never persisted, absent when the
8842
8782
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8844,13 +8784,50 @@ var StorageLocationSchema = object({
8844
8784
  totalBytes: number(),
8845
8785
  availableBytes: number()
8846
8786
  }).nullable().optional(),
8787
+ /**
8788
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8789
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8790
+ * never persisted, never a filesystem walk.
8791
+ *
8792
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8793
+ * location yet — nobody stores here, the owning addon is down, or the first
8794
+ * refresh has not completed. A UI must omit the segment rather than draw it
8795
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8796
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8797
+ * be spelled out loud instead of appearing by accident.
8798
+ *
8799
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8800
+ * about the whole figure rather than about its freshest part.
8801
+ */
8802
+ owned: object({
8803
+ bytes: number().int().nonnegative(),
8804
+ measuredAtMs: number().int().nonnegative()
8805
+ }).optional(),
8847
8806
  createdAt: number(),
8848
8807
  updatedAt: number()
8849
8808
  });
8809
+ object({ isDefault: boolean().optional() });
8810
+ /**
8811
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8812
+ *
8813
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8814
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8815
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8816
+ * operator learns not to believe the screen.
8817
+ */
8818
+ var StorageDrainProgressSchema = object({
8819
+ locationId: string(),
8820
+ startedAtMs: number(),
8821
+ startBytes: number(),
8822
+ bytesRemaining: number(),
8823
+ drained: boolean(),
8824
+ estimatedEmptyAtMs: number().nullable()
8825
+ });
8850
8826
  /**
8851
8827
  * Reference accepted by consumer-facing `api.storage.*` calls.
8852
8828
  * Either:
8853
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
8829
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
8830
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8854
8831
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8855
8832
  *
8856
8833
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -9026,6 +9003,111 @@ var DecoderSessionConfigSchema = object({
9026
9003
  */
9027
9004
  debug: boolean().optional()
9028
9005
  });
9006
+ /**
9007
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
9008
+ * an addon declares its channels in.
9009
+ *
9010
+ * ## Two axes, deliberately separated
9011
+ *
9012
+ * - **DECLARATION** — which channels exist. Only the addon knows:
9013
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
9014
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
9015
+ * and rots silently. So a channel is declared where it is consulted, and the
9016
+ * `log-channels` capability enumerates the declarations.
9017
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
9018
+ * thing: the logging settings document on the `system` cap. Two authorities
9019
+ * over the values is the exact defect
9020
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
9021
+ * remove; re-introducing it from the cure side would be grotesque.
9022
+ *
9023
+ * Nothing in this file reads a clock, an env var or a store. The registry is
9024
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
9025
+ * the hot path with a value somebody actually read, and by
9026
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
9027
+ * never reaches here, so it can neither disarm an armed channel nor arm a
9028
+ * disarmed one (D49).
9029
+ *
9030
+ * ## The canonical call shape
9031
+ *
9032
+ * ```ts
9033
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
9034
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
9035
+ * }
9036
+ * ```
9037
+ *
9038
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
9039
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
9040
+ * object literal is never constructed because it lives inside the branch. It
9041
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
9042
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
9043
+ * destination floor (measured at 1.93 ns/call when off).
9044
+ *
9045
+ * ## Why a channel emits at `info`
9046
+ *
9047
+ * `loki-logging.addon.ts` pins the destination default at `info` and
9048
+ * `loki-destination.ts` drops everything below it, so a line emitted at
9049
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
9050
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
9051
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
9052
+ * emits at the channel's declared level, whose schema floor is `info`.
9053
+ */
9054
+ /**
9055
+ * The level a channel writes at once armed.
9056
+ *
9057
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
9058
+ * not leave the process for Loki, and the whole point of arming a channel is
9059
+ * to read it later.
9060
+ */
9061
+ var LogChannelLevelSchema = _enum([
9062
+ "info",
9063
+ "warn",
9064
+ "error"
9065
+ ]);
9066
+ /**
9067
+ * What an addon declares about one channel. No value, no state — a
9068
+ * declaration is inert.
9069
+ */
9070
+ var LogChannelDescriptorSchema = object({
9071
+ /**
9072
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
9073
+ * the addon's short name so an operator reading a channel list can tell who
9074
+ * owns it without a second lookup.
9075
+ */
9076
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
9077
+ /** One sentence: what the operator will SEE after arming it. */
9078
+ description: string().min(1),
9079
+ /** The level its lines are emitted at. Never below `info`. */
9080
+ defaultLevel: LogChannelLevelSchema,
9081
+ /**
9082
+ * Whether this channel can be narrowed to a camera.
9083
+ *
9084
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
9085
+ * consulted with the numeric device id, AND every line the channel admits
9086
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
9087
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
9088
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
9089
+ * the body is the only way to filter.
9090
+ *
9091
+ * A channel whose lines carry the device only in `meta` (or not at all) is
9092
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
9093
+ * the operator narrows to one camera, sees nothing, and concludes the code
9094
+ * path was never taken.
9095
+ */
9096
+ perDevice: boolean()
9097
+ });
9098
+ /**
9099
+ * An armed window over one channel, as the document hands it to a mirror.
9100
+ *
9101
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
9102
+ * expires by itself, which is the one failure a boolean cannot avoid.
9103
+ */
9104
+ var LogChannelWindowSchema = object({
9105
+ channel: string().min(1),
9106
+ /** Epoch ms the window closes at. */
9107
+ armedUntilMs: number(),
9108
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
9109
+ deviceIds: array(number().int()).readonly().nullable()
9110
+ });
9029
9111
  var MODEL_FORMATS = [
9030
9112
  "onnx",
9031
9113
  "coreml",
@@ -21745,7 +21827,7 @@ method(object({
21745
21827
  downloadId: string(),
21746
21828
  offset: number(),
21747
21829
  length: number()
21748
- }), _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({
21830
+ }), _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({
21749
21831
  createdAt: true,
21750
21832
  updatedAt: true
21751
21833
  }), StorageLocationSchema, {
@@ -21757,7 +21839,7 @@ method(object({
21757
21839
  }), _void(), {
21758
21840
  kind: "mutation",
21759
21841
  auth: "admin"
21760
- }), method(object({ id: string() }), object({
21842
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21761
21843
  ok: boolean(),
21762
21844
  error: string().optional()
21763
21845
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21827,6 +21909,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21827
21909
  kind: "mutation",
21828
21910
  auth: "admin"
21829
21911
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21912
+ /**
21913
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
21914
+ * location (D388).
21915
+ *
21916
+ * ## Why this is not `storage-evictable`
21917
+ *
21918
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
21919
+ * not, in two ways that both matter and both bite hardest on the locations an
21920
+ * operator most wants a figure for:
21921
+ *
21922
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
21923
+ * and `recordingsLow:default` deliberately share one root and evict as one
21924
+ * oldest-first pool, so both answer with the SAME combined total. As an
21925
+ * occupancy figure that double-counts the disk.
21926
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
21927
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
21928
+ * is retiring and staring at.
21929
+ *
21930
+ * So this is its own contract with its own quantity, and the quantity is
21931
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
21932
+ * would ever be willing to delete it. A provider that can only answer
21933
+ * "evictable" must not register here — a number that silently means different
21934
+ * things per class is worse than no number.
21935
+ *
21936
+ * ## Absence is an answer
21937
+ *
21938
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
21939
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
21940
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
21941
+ * consuming side has to be written out loud instead of appearing by accident.
21942
+ *
21943
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
21944
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
21945
+ */
21946
+ /** One provider's occupancy answer for one location. */
21947
+ var StorageOccupancyReportSchema = object({
21948
+ locationId: string(),
21949
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
21950
+ * not net of what it is willing to delete. */
21951
+ ownedBytes: number().int().nonnegative(),
21952
+ /** When the provider last actually measured this. The orchestrator carries it
21953
+ * through so a UI can say how old the figure is instead of implying "now". */
21954
+ measuredAtMs: number().int().nonnegative()
21955
+ });
21956
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21830
21957
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21831
21958
  providerId: string().min(1),
21832
21959
  displayName: string().min(1),
@@ -23462,39 +23589,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23462
23589
  deviceId: number(),
23463
23590
  status: BatteryStatusSchema
23464
23591
  });
23465
- /**
23466
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23467
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23468
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23469
- * one Home Assistant projection.
23470
- */
23471
- var NetworkLinkStatusSchema = object({
23472
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23473
- type: _enum([
23474
- "wifi",
23475
- "ethernet",
23476
- "cellular",
23477
- "unknown"
23478
- ]),
23479
- /**
23480
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23481
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23482
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23483
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23484
- * SKIP a null rather than coerce it.
23485
- */
23486
- signalPercent: number().min(0).max(100).nullable(),
23487
- /** Raw received signal strength in dBm, when the firmware reports one. */
23488
- rssiDbm: number().optional(),
23489
- /** Network name of a wireless link, when the firmware reports it. */
23490
- ssid: string().optional(),
23491
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23492
- lastUpdated: number()
23493
- });
23494
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23495
- deviceId: number(),
23496
- status: NetworkLinkStatusSchema
23497
- });
23498
23592
  object({
23499
23593
  on: boolean(),
23500
23594
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25848,6 +25942,236 @@ DeviceType.Camera, method(object({
25848
25942
  detection: NativeDetectionSchema
25849
25943
  });
25850
25944
  /**
25945
+ * `navigation` — a device-scoped capability that natively expresses the FULL
25946
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
25947
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
25948
+ *
25949
+ * Why a NEW cap rather than overloading `ptz`:
25950
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
25951
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
25952
+ * The two are different physical models: PTZ is absolute-position + presets,
25953
+ * navigation is momentary drive nudges + discrete robot ACTIONS
25954
+ * (dock / spot-clean / follow-pet / go-to-point / …).
25955
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
25956
+ * the reverse:
25957
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
25958
+ * / `getOptions`), and
25959
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
25960
+ * robot camera shows up in the existing PTZ control path without every
25961
+ * PTZ provider learning about robots. The mapping lives in the adapter,
25962
+ * not here (see the addon design note):
25963
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
25964
+ * ptz.stop() → navigation.stop()
25965
+ * ptz.goHome() → navigation.runAction('goHome')
25966
+ * ptz.getPresets() → navigation.listActions() (id→preset)
25967
+ * ptz.goToPreset(id) → navigation.runAction(id)
25968
+ *
25969
+ * ## Continuous drive
25970
+ *
25971
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
25972
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
25973
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
25974
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
25975
+ * coalesce them. The UI owns the cadence.
25976
+ *
25977
+ * ## The action dictionary
25978
+ *
25979
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
25980
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
25981
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
25982
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
25983
+ * vendor-specific list. `kind: 'action'` entries are triggered with
25984
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
25985
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
25986
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
25987
+ *
25988
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
25989
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
25990
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
25991
+ * every device handle. A future nodedreame publish adds a typed
25992
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
25993
+ * provider can then swap the raw calls for the typed methods with no change to
25994
+ * THIS contract.
25995
+ */
25996
+ /**
25997
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
25998
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
25999
+ * halts it.
26000
+ *
26001
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26002
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26003
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26004
+ * vector by it (drivers without proportional drive ignore it).
26005
+ *
26006
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26007
+ * axis alone; an all-undefined nudge is a no-op.
26008
+ */
26009
+ var NavigationMoveCommandSchema = object({
26010
+ pan: number().min(-1).max(1).optional(),
26011
+ tilt: number().min(-1).max(1).optional(),
26012
+ speed: number().min(0).max(1).optional()
26013
+ });
26014
+ /**
26015
+ * The enumerated discrete actions a navigation-capable robot can perform via
26016
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26017
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26018
+ * `playSound` (see the `sound` dictionary entries).
26019
+ */
26020
+ var NavigationActionIdSchema = _enum([
26021
+ "goHome",
26022
+ "locate",
26023
+ "spotClean",
26024
+ "findPet",
26025
+ "personFollow",
26026
+ "stop",
26027
+ "startClean",
26028
+ "pauseClean",
26029
+ "dockWash",
26030
+ "autoEmpty",
26031
+ "flashOn",
26032
+ "flashOff"
26033
+ ]);
26034
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26035
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26036
+ /**
26037
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26038
+ * native panel and the PTZ mimic render as a button.
26039
+ *
26040
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26041
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26042
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26043
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26044
+ * - `label` — operator-facing English label.
26045
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26046
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26047
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26048
+ * flips it from config, never by editing code.
26049
+ */
26050
+ var NavigationActionEntrySchema = object({
26051
+ id: string(),
26052
+ kind: NavigationEntryKindSchema,
26053
+ label: string(),
26054
+ icon: string(),
26055
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26056
+ soundId: number().int().optional(),
26057
+ /** Per-device feature flag — render this entry only when true. */
26058
+ enabled: boolean()
26059
+ });
26060
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26061
+ var NavigationPointSchema = object({
26062
+ x: number(),
26063
+ y: number()
26064
+ });
26065
+ /**
26066
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26067
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26068
+ * that are turned on for THIS device. Data-driven: the provider derives these
26069
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26070
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26071
+ * that are not dictionary entries.
26072
+ *
26073
+ * - `move` / `stop` — the momentary drive joystick.
26074
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26075
+ * map-coordinate plumbing is wired.
26076
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26077
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26078
+ * - `light` — the on/off fill-light toggle (works anytime).
26079
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26080
+ * camera-service control; needs an active stream).
26081
+ */
26082
+ var NavigationFeaturesSchema = object({
26083
+ move: boolean(),
26084
+ stop: boolean(),
26085
+ goToPoint: boolean(),
26086
+ runAction: boolean(),
26087
+ playSound: boolean(),
26088
+ light: boolean(),
26089
+ lightMode: boolean()
26090
+ });
26091
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26092
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26093
+ /**
26094
+ * Live navigation state so the UI can reflect what the robot is doing:
26095
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26096
+ * - `following` — person/pet follow is currently armed.
26097
+ * - `flash` — the on-camera fill light is on.
26098
+ * - `lightMode` — auto vs manual fill-light mode.
26099
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26100
+ * `lightMode === 'manual'`.
26101
+ */
26102
+ var NavigationStatusSchema = object({
26103
+ mode: _enum([
26104
+ "idle",
26105
+ "cleaning",
26106
+ "spot",
26107
+ "following",
26108
+ "goto",
26109
+ "returning",
26110
+ "paused",
26111
+ "unknown"
26112
+ ]),
26113
+ following: boolean(),
26114
+ flash: boolean(),
26115
+ lightMode: NavigationLightModeSchema,
26116
+ lightLevel: number().min(40).max(100),
26117
+ /** Ms epoch when the slice was last updated. */
26118
+ lastChangedAt: number()
26119
+ });
26120
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26121
+ 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({
26122
+ deviceId: number(),
26123
+ actionId: NavigationActionIdSchema
26124
+ }), _void(), { kind: "mutation" }), method(object({
26125
+ deviceId: number(),
26126
+ soundId: number().int()
26127
+ }), _void(), { kind: "mutation" }), method(object({
26128
+ deviceId: number(),
26129
+ on: boolean()
26130
+ }), _void(), { kind: "mutation" }), method(object({
26131
+ deviceId: number(),
26132
+ mode: NavigationLightModeSchema,
26133
+ level: number().min(40).max(100).optional()
26134
+ }), _void(), { kind: "mutation" }), method(object({
26135
+ deviceId: number(),
26136
+ level: number().min(40).max(100)
26137
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26138
+ deviceId: number(),
26139
+ status: NavigationStatusSchema
26140
+ });
26141
+ /**
26142
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26143
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26144
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26145
+ * one Home Assistant projection.
26146
+ */
26147
+ var NetworkLinkStatusSchema = object({
26148
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26149
+ type: _enum([
26150
+ "wifi",
26151
+ "ethernet",
26152
+ "cellular",
26153
+ "unknown"
26154
+ ]),
26155
+ /**
26156
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26157
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26158
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26159
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26160
+ * SKIP a null rather than coerce it.
26161
+ */
26162
+ signalPercent: number().min(0).max(100).nullable(),
26163
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26164
+ rssiDbm: number().optional(),
26165
+ /** Network name of a wireless link, when the firmware reports it. */
26166
+ ssid: string().optional(),
26167
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26168
+ lastUpdated: number()
26169
+ });
26170
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26171
+ deviceId: number(),
26172
+ status: NetworkLinkStatusSchema
26173
+ });
26174
+ /**
25851
26175
  * network-quality — system-scoped singleton capability tracking RTT,
25852
26176
  * jitter, and observed/peak bandwidth per device + per client.
25853
26177
  *
@@ -27089,203 +27413,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27089
27413
  deviceId: number(),
27090
27414
  status: PtzAutotrackStatusSchema
27091
27415
  });
27092
- /**
27093
- * `navigation` — a device-scoped capability that natively expresses the FULL
27094
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27095
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27096
- *
27097
- * Why a NEW cap rather than overloading `ptz`:
27098
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27099
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27100
- * The two are different physical models: PTZ is absolute-position + presets,
27101
- * navigation is momentary drive nudges + discrete robot ACTIONS
27102
- * (dock / spot-clean / follow-pet / go-to-point / …).
27103
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27104
- * the reverse:
27105
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27106
- * / `getOptions`), and
27107
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27108
- * robot camera shows up in the existing PTZ control path without every
27109
- * PTZ provider learning about robots. The mapping lives in the adapter,
27110
- * not here (see the addon design note):
27111
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27112
- * ptz.stop() → navigation.stop()
27113
- * ptz.goHome() → navigation.runAction('goHome')
27114
- * ptz.getPresets() → navigation.listActions() (id→preset)
27115
- * ptz.goToPreset(id) → navigation.runAction(id)
27116
- *
27117
- * ## Continuous drive
27118
- *
27119
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27120
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27121
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27122
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27123
- * coalesce them. The UI owns the cadence.
27124
- *
27125
- * ## The action dictionary
27126
- *
27127
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27128
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27129
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27130
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27131
- * vendor-specific list. `kind: 'action'` entries are triggered with
27132
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27133
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27134
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27135
- *
27136
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27137
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27138
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27139
- * every device handle. A future nodedreame publish adds a typed
27140
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27141
- * provider can then swap the raw calls for the typed methods with no change to
27142
- * THIS contract.
27143
- */
27144
- /**
27145
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27146
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27147
- * halts it.
27148
- *
27149
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27150
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27151
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27152
- * vector by it (drivers without proportional drive ignore it).
27153
- *
27154
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27155
- * axis alone; an all-undefined nudge is a no-op.
27156
- */
27157
- var NavigationMoveCommandSchema = object({
27158
- pan: number().min(-1).max(1).optional(),
27159
- tilt: number().min(-1).max(1).optional(),
27160
- speed: number().min(0).max(1).optional()
27161
- });
27162
- /**
27163
- * The enumerated discrete actions a navigation-capable robot can perform via
27164
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27165
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27166
- * `playSound` (see the `sound` dictionary entries).
27167
- */
27168
- var NavigationActionIdSchema = _enum([
27169
- "goHome",
27170
- "locate",
27171
- "spotClean",
27172
- "findPet",
27173
- "personFollow",
27174
- "stop",
27175
- "startClean",
27176
- "pauseClean",
27177
- "dockWash",
27178
- "autoEmpty",
27179
- "flashOn",
27180
- "flashOff"
27181
- ]);
27182
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27183
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27184
- /**
27185
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27186
- * native panel and the PTZ mimic render as a button.
27187
- *
27188
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27189
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27190
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27191
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27192
- * - `label` — operator-facing English label.
27193
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27194
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27195
- * PTZ render ONLY enabled entries. Data-driven: the provider
27196
- * flips it from config, never by editing code.
27197
- */
27198
- var NavigationActionEntrySchema = object({
27199
- id: string(),
27200
- kind: NavigationEntryKindSchema,
27201
- label: string(),
27202
- icon: string(),
27203
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27204
- soundId: number().int().optional(),
27205
- /** Per-device feature flag — render this entry only when true. */
27206
- enabled: boolean()
27207
- });
27208
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27209
- var NavigationPointSchema = object({
27210
- x: number(),
27211
- y: number()
27212
- });
27213
- /**
27214
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27215
- * The cap reports which are enabled so the UI / PTZ render only the controls
27216
- * that are turned on for THIS device. Data-driven: the provider derives these
27217
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27218
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27219
- * that are not dictionary entries.
27220
- *
27221
- * - `move` / `stop` — the momentary drive joystick.
27222
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27223
- * map-coordinate plumbing is wired.
27224
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27225
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27226
- * - `light` — the on/off fill-light toggle (works anytime).
27227
- * - `lightMode` — the auto/manual selector + manual level slider (a
27228
- * camera-service control; needs an active stream).
27229
- */
27230
- var NavigationFeaturesSchema = object({
27231
- move: boolean(),
27232
- stop: boolean(),
27233
- goToPoint: boolean(),
27234
- runAction: boolean(),
27235
- playSound: boolean(),
27236
- light: boolean(),
27237
- lightMode: boolean()
27238
- });
27239
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27240
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27241
- /**
27242
- * Live navigation state so the UI can reflect what the robot is doing:
27243
- * - `mode` — coarse activity (idle / cleaning / following / …).
27244
- * - `following` — person/pet follow is currently armed.
27245
- * - `flash` — the on-camera fill light is on.
27246
- * - `lightMode` — auto vs manual fill-light mode.
27247
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27248
- * `lightMode === 'manual'`.
27249
- */
27250
- var NavigationStatusSchema = object({
27251
- mode: _enum([
27252
- "idle",
27253
- "cleaning",
27254
- "spot",
27255
- "following",
27256
- "goto",
27257
- "returning",
27258
- "paused",
27259
- "unknown"
27260
- ]),
27261
- following: boolean(),
27262
- flash: boolean(),
27263
- lightMode: NavigationLightModeSchema,
27264
- lightLevel: number().min(40).max(100),
27265
- /** Ms epoch when the slice was last updated. */
27266
- lastChangedAt: number()
27267
- });
27268
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27269
- 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({
27270
- deviceId: number(),
27271
- actionId: NavigationActionIdSchema
27272
- }), _void(), { kind: "mutation" }), method(object({
27273
- deviceId: number(),
27274
- soundId: number().int()
27275
- }), _void(), { kind: "mutation" }), method(object({
27276
- deviceId: number(),
27277
- on: boolean()
27278
- }), _void(), { kind: "mutation" }), method(object({
27279
- deviceId: number(),
27280
- mode: NavigationLightModeSchema,
27281
- level: number().min(40).max(100).optional()
27282
- }), _void(), { kind: "mutation" }), method(object({
27283
- deviceId: number(),
27284
- level: number().min(40).max(100)
27285
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27286
- deviceId: number(),
27287
- status: NavigationStatusSchema
27288
- });
27289
27416
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27290
27417
  kind: "mutation",
27291
27418
  auth: "admin"
@@ -34594,13 +34721,13 @@ Object.freeze({
34594
34721
  addonId: null,
34595
34722
  access: "view"
34596
34723
  },
34597
- "storage.getDefaultLocation": {
34724
+ "storage.list": {
34598
34725
  capName: "storage",
34599
34726
  capScope: "system",
34600
34727
  addonId: null,
34601
34728
  access: "view"
34602
34729
  },
34603
- "storage.list": {
34730
+ "storage.listDrainProgress": {
34604
34731
  capName: "storage",
34605
34732
  capScope: "system",
34606
34733
  addonId: null,
@@ -34750,6 +34877,12 @@ Object.freeze({
34750
34877
  addonId: null,
34751
34878
  access: "view"
34752
34879
  },
34880
+ "storageOccupancy.getOccupancy": {
34881
+ capName: "storage-occupancy",
34882
+ capScope: "system",
34883
+ addonId: null,
34884
+ access: "view"
34885
+ },
34753
34886
  "storageProvider.abortUpload": {
34754
34887
  capName: "storage-provider",
34755
34888
  capScope: "system",