@camstack/addon-smtp-nodemailer 1.2.77 → 1.2.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,7 +34,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
34
34
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
36
36
  //#endregion
37
- //#region ../types/dist/event-category-zAv7pMUz.mjs
37
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
38
38
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
39
39
  EventCategory["SystemBoot"] = "system.boot";
40
40
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -229,6 +229,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
229
229
  EventCategory["ProcessCrashed"] = "process.crashed";
230
230
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
231
231
  EventCategory["ProcessRestarted"] = "process.restarted";
232
+ /**
233
+ * The SET of storage locations changed — one was created, edited, enabled,
234
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
235
+ *
236
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
237
+ * it must also converge on its own periodic path, because a dropped event
238
+ * must not leave a node writing to yesterday's disk set forever. It exists
239
+ * because there was NO signal at all — an operator who added a second
240
+ * recordings disk in the admin UI got nothing, and the recorder kept its
241
+ * resolved locations until something else happened to re-resolve them
242
+ * (D387). Payload `StorageLocationsChangedPayload`.
243
+ */
244
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
232
245
  EventCategory["RecordingStarted"] = "recording.started";
233
246
  EventCategory["RecordingStopped"] = "recording.stopped";
234
247
  EventCategory["RecordingError"] = "recording.error";
@@ -7634,111 +7647,6 @@ var CameraSwitchGroupSchema = object({
7634
7647
  fetchedAt: number()
7635
7648
  });
7636
7649
  /**
7637
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7638
- * an addon declares its channels in.
7639
- *
7640
- * ## Two axes, deliberately separated
7641
- *
7642
- * - **DECLARATION** — which channels exist. Only the addon knows:
7643
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7644
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7645
- * and rots silently. So a channel is declared where it is consulted, and the
7646
- * `log-channels` capability enumerates the declarations.
7647
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7648
- * thing: the logging settings document on the `system` cap. Two authorities
7649
- * over the values is the exact defect
7650
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7651
- * remove; re-introducing it from the cure side would be grotesque.
7652
- *
7653
- * Nothing in this file reads a clock, an env var or a store. The registry is
7654
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7655
- * the hot path with a value somebody actually read, and by
7656
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7657
- * never reaches here, so it can neither disarm an armed channel nor arm a
7658
- * disarmed one (D49).
7659
- *
7660
- * ## The canonical call shape
7661
- *
7662
- * ```ts
7663
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7664
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7665
- * }
7666
- * ```
7667
- *
7668
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7669
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7670
- * object literal is never constructed because it lives inside the branch. It
7671
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7672
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7673
- * destination floor (measured at 1.93 ns/call when off).
7674
- *
7675
- * ## Why a channel emits at `info`
7676
- *
7677
- * `loki-logging.addon.ts` pins the destination default at `info` and
7678
- * `loki-destination.ts` drops everything below it, so a line emitted at
7679
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7680
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7681
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7682
- * emits at the channel's declared level, whose schema floor is `info`.
7683
- */
7684
- /**
7685
- * The level a channel writes at once armed.
7686
- *
7687
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7688
- * not leave the process for Loki, and the whole point of arming a channel is
7689
- * to read it later.
7690
- */
7691
- var LogChannelLevelSchema = _enum([
7692
- "info",
7693
- "warn",
7694
- "error"
7695
- ]);
7696
- /**
7697
- * What an addon declares about one channel. No value, no state — a
7698
- * declaration is inert.
7699
- */
7700
- var LogChannelDescriptorSchema = object({
7701
- /**
7702
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7703
- * the addon's short name so an operator reading a channel list can tell who
7704
- * owns it without a second lookup.
7705
- */
7706
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7707
- /** One sentence: what the operator will SEE after arming it. */
7708
- description: string().min(1),
7709
- /** The level its lines are emitted at. Never below `info`. */
7710
- defaultLevel: LogChannelLevelSchema,
7711
- /**
7712
- * Whether this channel can be narrowed to a camera.
7713
- *
7714
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7715
- * consulted with the numeric device id, AND every line the channel admits
7716
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7717
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7718
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7719
- * the body is the only way to filter.
7720
- *
7721
- * A channel whose lines carry the device only in `meta` (or not at all) is
7722
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7723
- * the operator narrows to one camera, sees nothing, and concludes the code
7724
- * path was never taken.
7725
- */
7726
- perDevice: boolean()
7727
- });
7728
- /**
7729
- * An armed window over one channel, as the document hands it to a mirror.
7730
- *
7731
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7732
- * expires by itself, which is the one failure a boolean cannot avoid.
7733
- */
7734
- var LogChannelWindowSchema = object({
7735
- channel: string().min(1),
7736
- /** Epoch ms the window closes at. */
7737
- armedUntilMs: number(),
7738
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7739
- deviceIds: array(number().int()).readonly().nullable()
7740
- });
7741
- /**
7742
7650
  * Ops-log — the durable, append-only operations audit shared by the
7743
7651
  * recordings and events management surfaces.
7744
7652
  *
@@ -8660,6 +8568,21 @@ var StorageCleanupJobSchema = object({
8660
8568
  });
8661
8569
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8662
8570
  /**
8571
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8572
+ * alias below is `z.infer<>` of it, never a second spelling.
8573
+ */
8574
+ var StorageLocationModeSchema = _enum([
8575
+ "active",
8576
+ "readonly",
8577
+ "drain",
8578
+ "disabled"
8579
+ ]);
8580
+ _enum([
8581
+ "normal",
8582
+ "never",
8583
+ "drain"
8584
+ ]);
8585
+ /**
8663
8586
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8664
8587
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8665
8588
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8684,8 +8607,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8684
8607
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8685
8608
  *
8686
8609
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8687
- * The default location for a type uses `id === <type>:default` by
8688
- * convention (the bare type ref like `'backups'` resolves to it).
8610
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8611
+ * There is no default location any more (D383): `enabled` is the whole write
8612
+ * model, and a bare type ref resolves to the sole location of the type, or —
8613
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8614
+ * slug is `default`.
8689
8615
  *
8690
8616
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8691
8617
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8706,23 +8632,37 @@ var StorageLocationSchema = object({
8706
8632
  * flag at upsert time, not here (the schema is provider-agnostic).
8707
8633
  */
8708
8634
  nodeId: string().optional(),
8709
- isDefault: boolean().default(false),
8710
8635
  isSystem: boolean().default(false),
8711
8636
  /**
8712
- * Operator opt-in: whether consumers that BALANCE across several locations
8713
- * of a type may write here. Recordings reads it today; event media and
8714
- * backups are the next consumers, which is why the flag lives on the
8715
- * location rather than in any one addon's store nothing has to be
8716
- * extended to add the next consumer.
8637
+ * THE write switch, and the only one (D383). `enabled: true` means every
8638
+ * consumer that chooses a write target for this type may write here, and all
8639
+ * enabled locations of a type are used TOGETHER; `false` means read-only
8640
+ * still read, still played back, still age-swept, still drained, never
8641
+ * written.
8717
8642
  *
8718
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8719
- * flag existed reads back with no flag and keeps working exactly as before;
8720
- * that is the whole compat story, and it is why no migration ships with it.
8721
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8722
- * disk must not silently start writing to it); the default of a type is
8723
- * always stamped `true`.
8643
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8644
+ * stored" on an update and "born inert unless it is the first location of its
8645
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8646
+ * enabled {@link isLocationEnabled} is the one place that says so, and the
8647
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8648
+ * stops existing rather than being re-derived on every read.
8724
8649
  */
8725
8650
  enabled: boolean().optional(),
8651
+ /**
8652
+ * THE state of this location (D385), and the only authority on what may be
8653
+ * written, read or evicted here. Interpreted in exactly one place —
8654
+ * `storage-location-mode.ts` — which also folds the legacy
8655
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8656
+ * ambiguous.
8657
+ *
8658
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8659
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8660
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8661
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8662
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8663
+ * either, so the two cannot disagree.
8664
+ */
8665
+ mode: StorageLocationModeSchema.optional(),
8726
8666
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8727
8667
  * for node-local locations it can reach) — never persisted, absent when the
8728
8668
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8730,13 +8670,50 @@ var StorageLocationSchema = object({
8730
8670
  totalBytes: number(),
8731
8671
  availableBytes: number()
8732
8672
  }).nullable().optional(),
8673
+ /**
8674
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8675
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8676
+ * never persisted, never a filesystem walk.
8677
+ *
8678
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8679
+ * location yet — nobody stores here, the owning addon is down, or the first
8680
+ * refresh has not completed. A UI must omit the segment rather than draw it
8681
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8682
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8683
+ * be spelled out loud instead of appearing by accident.
8684
+ *
8685
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8686
+ * about the whole figure rather than about its freshest part.
8687
+ */
8688
+ owned: object({
8689
+ bytes: number().int().nonnegative(),
8690
+ measuredAtMs: number().int().nonnegative()
8691
+ }).optional(),
8733
8692
  createdAt: number(),
8734
8693
  updatedAt: number()
8735
8694
  });
8695
+ object({ isDefault: boolean().optional() });
8696
+ /**
8697
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8698
+ *
8699
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8700
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8701
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8702
+ * operator learns not to believe the screen.
8703
+ */
8704
+ var StorageDrainProgressSchema = object({
8705
+ locationId: string(),
8706
+ startedAtMs: number(),
8707
+ startBytes: number(),
8708
+ bytesRemaining: number(),
8709
+ drained: boolean(),
8710
+ estimatedEmptyAtMs: number().nullable()
8711
+ });
8736
8712
  /**
8737
8713
  * Reference accepted by consumer-facing `api.storage.*` calls.
8738
8714
  * Either:
8739
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
8715
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
8716
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8740
8717
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8741
8718
  *
8742
8719
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -8912,6 +8889,111 @@ var DecoderSessionConfigSchema = object({
8912
8889
  */
8913
8890
  debug: boolean().optional()
8914
8891
  });
8892
+ /**
8893
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
8894
+ * an addon declares its channels in.
8895
+ *
8896
+ * ## Two axes, deliberately separated
8897
+ *
8898
+ * - **DECLARATION** — which channels exist. Only the addon knows:
8899
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8900
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
8901
+ * and rots silently. So a channel is declared where it is consulted, and the
8902
+ * `log-channels` capability enumerates the declarations.
8903
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
8904
+ * thing: the logging settings document on the `system` cap. Two authorities
8905
+ * over the values is the exact defect
8906
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8907
+ * remove; re-introducing it from the cure side would be grotesque.
8908
+ *
8909
+ * Nothing in this file reads a clock, an env var or a store. The registry is
8910
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8911
+ * the hot path with a value somebody actually read, and by
8912
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8913
+ * never reaches here, so it can neither disarm an armed channel nor arm a
8914
+ * disarmed one (D49).
8915
+ *
8916
+ * ## The canonical call shape
8917
+ *
8918
+ * ```ts
8919
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8920
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8921
+ * }
8922
+ * ```
8923
+ *
8924
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8925
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
8926
+ * object literal is never constructed because it lives inside the branch. It
8927
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
8928
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
8929
+ * destination floor (measured at 1.93 ns/call when off).
8930
+ *
8931
+ * ## Why a channel emits at `info`
8932
+ *
8933
+ * `loki-logging.addon.ts` pins the destination default at `info` and
8934
+ * `loki-destination.ts` drops everything below it, so a line emitted at
8935
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8936
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
8937
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8938
+ * emits at the channel's declared level, whose schema floor is `info`.
8939
+ */
8940
+ /**
8941
+ * The level a channel writes at once armed.
8942
+ *
8943
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8944
+ * not leave the process for Loki, and the whole point of arming a channel is
8945
+ * to read it later.
8946
+ */
8947
+ var LogChannelLevelSchema = _enum([
8948
+ "info",
8949
+ "warn",
8950
+ "error"
8951
+ ]);
8952
+ /**
8953
+ * What an addon declares about one channel. No value, no state — a
8954
+ * declaration is inert.
8955
+ */
8956
+ var LogChannelDescriptorSchema = object({
8957
+ /**
8958
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8959
+ * the addon's short name so an operator reading a channel list can tell who
8960
+ * owns it without a second lookup.
8961
+ */
8962
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8963
+ /** One sentence: what the operator will SEE after arming it. */
8964
+ description: string().min(1),
8965
+ /** The level its lines are emitted at. Never below `info`. */
8966
+ defaultLevel: LogChannelLevelSchema,
8967
+ /**
8968
+ * Whether this channel can be narrowed to a camera.
8969
+ *
8970
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
8971
+ * consulted with the numeric device id, AND every line the channel admits
8972
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
8973
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8974
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8975
+ * the body is the only way to filter.
8976
+ *
8977
+ * A channel whose lines carry the device only in `meta` (or not at all) is
8978
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8979
+ * the operator narrows to one camera, sees nothing, and concludes the code
8980
+ * path was never taken.
8981
+ */
8982
+ perDevice: boolean()
8983
+ });
8984
+ /**
8985
+ * An armed window over one channel, as the document hands it to a mirror.
8986
+ *
8987
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8988
+ * expires by itself, which is the one failure a boolean cannot avoid.
8989
+ */
8990
+ var LogChannelWindowSchema = object({
8991
+ channel: string().min(1),
8992
+ /** Epoch ms the window closes at. */
8993
+ armedUntilMs: number(),
8994
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8995
+ deviceIds: array(number().int()).readonly().nullable()
8996
+ });
8915
8997
  var MODEL_FORMATS = [
8916
8998
  "onnx",
8917
8999
  "coreml",
@@ -21589,7 +21671,7 @@ method(object({
21589
21671
  downloadId: string(),
21590
21672
  offset: number(),
21591
21673
  length: number()
21592
- }), _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({
21674
+ }), _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({
21593
21675
  createdAt: true,
21594
21676
  updatedAt: true
21595
21677
  }), StorageLocationSchema, {
@@ -21601,7 +21683,7 @@ method(object({
21601
21683
  }), _void(), {
21602
21684
  kind: "mutation",
21603
21685
  auth: "admin"
21604
- }), method(object({ id: string() }), object({
21686
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21605
21687
  ok: boolean(),
21606
21688
  error: string().optional()
21607
21689
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21671,6 +21753,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21671
21753
  kind: "mutation",
21672
21754
  auth: "admin"
21673
21755
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21756
+ /**
21757
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
21758
+ * location (D388).
21759
+ *
21760
+ * ## Why this is not `storage-evictable`
21761
+ *
21762
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
21763
+ * not, in two ways that both matter and both bite hardest on the locations an
21764
+ * operator most wants a figure for:
21765
+ *
21766
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
21767
+ * and `recordingsLow:default` deliberately share one root and evict as one
21768
+ * oldest-first pool, so both answer with the SAME combined total. As an
21769
+ * occupancy figure that double-counts the disk.
21770
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
21771
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
21772
+ * is retiring and staring at.
21773
+ *
21774
+ * So this is its own contract with its own quantity, and the quantity is
21775
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
21776
+ * would ever be willing to delete it. A provider that can only answer
21777
+ * "evictable" must not register here — a number that silently means different
21778
+ * things per class is worse than no number.
21779
+ *
21780
+ * ## Absence is an answer
21781
+ *
21782
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
21783
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
21784
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
21785
+ * consuming side has to be written out loud instead of appearing by accident.
21786
+ *
21787
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
21788
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
21789
+ */
21790
+ /** One provider's occupancy answer for one location. */
21791
+ var StorageOccupancyReportSchema = object({
21792
+ locationId: string(),
21793
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
21794
+ * not net of what it is willing to delete. */
21795
+ ownedBytes: number().int().nonnegative(),
21796
+ /** When the provider last actually measured this. The orchestrator carries it
21797
+ * through so a UI can say how old the figure is instead of implying "now". */
21798
+ measuredAtMs: number().int().nonnegative()
21799
+ });
21800
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21674
21801
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21675
21802
  providerId: string().min(1),
21676
21803
  displayName: string().min(1),
@@ -23306,39 +23433,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23306
23433
  deviceId: number(),
23307
23434
  status: BatteryStatusSchema
23308
23435
  });
23309
- /**
23310
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23311
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23312
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23313
- * one Home Assistant projection.
23314
- */
23315
- var NetworkLinkStatusSchema = object({
23316
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23317
- type: _enum([
23318
- "wifi",
23319
- "ethernet",
23320
- "cellular",
23321
- "unknown"
23322
- ]),
23323
- /**
23324
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23325
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23326
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23327
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23328
- * SKIP a null rather than coerce it.
23329
- */
23330
- signalPercent: number().min(0).max(100).nullable(),
23331
- /** Raw received signal strength in dBm, when the firmware reports one. */
23332
- rssiDbm: number().optional(),
23333
- /** Network name of a wireless link, when the firmware reports it. */
23334
- ssid: string().optional(),
23335
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23336
- lastUpdated: number()
23337
- });
23338
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23339
- deviceId: number(),
23340
- status: NetworkLinkStatusSchema
23341
- });
23342
23436
  object({
23343
23437
  on: boolean(),
23344
23438
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25692,6 +25786,236 @@ DeviceType.Camera, method(object({
25692
25786
  detection: NativeDetectionSchema
25693
25787
  });
25694
25788
  /**
25789
+ * `navigation` — a device-scoped capability that natively expresses the FULL
25790
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
25791
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
25792
+ *
25793
+ * Why a NEW cap rather than overloading `ptz`:
25794
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
25795
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
25796
+ * The two are different physical models: PTZ is absolute-position + presets,
25797
+ * navigation is momentary drive nudges + discrete robot ACTIONS
25798
+ * (dock / spot-clean / follow-pet / go-to-point / …).
25799
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
25800
+ * the reverse:
25801
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
25802
+ * / `getOptions`), and
25803
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
25804
+ * robot camera shows up in the existing PTZ control path without every
25805
+ * PTZ provider learning about robots. The mapping lives in the adapter,
25806
+ * not here (see the addon design note):
25807
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
25808
+ * ptz.stop() → navigation.stop()
25809
+ * ptz.goHome() → navigation.runAction('goHome')
25810
+ * ptz.getPresets() → navigation.listActions() (id→preset)
25811
+ * ptz.goToPreset(id) → navigation.runAction(id)
25812
+ *
25813
+ * ## Continuous drive
25814
+ *
25815
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
25816
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
25817
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
25818
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
25819
+ * coalesce them. The UI owns the cadence.
25820
+ *
25821
+ * ## The action dictionary
25822
+ *
25823
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
25824
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
25825
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
25826
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
25827
+ * vendor-specific list. `kind: 'action'` entries are triggered with
25828
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
25829
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
25830
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
25831
+ *
25832
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
25833
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
25834
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
25835
+ * every device handle. A future nodedreame publish adds a typed
25836
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
25837
+ * provider can then swap the raw calls for the typed methods with no change to
25838
+ * THIS contract.
25839
+ */
25840
+ /**
25841
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
25842
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
25843
+ * halts it.
25844
+ *
25845
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
25846
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
25847
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
25848
+ * vector by it (drivers without proportional drive ignore it).
25849
+ *
25850
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
25851
+ * axis alone; an all-undefined nudge is a no-op.
25852
+ */
25853
+ var NavigationMoveCommandSchema = object({
25854
+ pan: number().min(-1).max(1).optional(),
25855
+ tilt: number().min(-1).max(1).optional(),
25856
+ speed: number().min(0).max(1).optional()
25857
+ });
25858
+ /**
25859
+ * The enumerated discrete actions a navigation-capable robot can perform via
25860
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
25861
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
25862
+ * `playSound` (see the `sound` dictionary entries).
25863
+ */
25864
+ var NavigationActionIdSchema = _enum([
25865
+ "goHome",
25866
+ "locate",
25867
+ "spotClean",
25868
+ "findPet",
25869
+ "personFollow",
25870
+ "stop",
25871
+ "startClean",
25872
+ "pauseClean",
25873
+ "dockWash",
25874
+ "autoEmpty",
25875
+ "flashOn",
25876
+ "flashOff"
25877
+ ]);
25878
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
25879
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
25880
+ /**
25881
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
25882
+ * native panel and the PTZ mimic render as a button.
25883
+ *
25884
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
25885
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
25886
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
25887
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
25888
+ * - `label` — operator-facing English label.
25889
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
25890
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
25891
+ * PTZ render ONLY enabled entries. Data-driven: the provider
25892
+ * flips it from config, never by editing code.
25893
+ */
25894
+ var NavigationActionEntrySchema = object({
25895
+ id: string(),
25896
+ kind: NavigationEntryKindSchema,
25897
+ label: string(),
25898
+ icon: string(),
25899
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
25900
+ soundId: number().int().optional(),
25901
+ /** Per-device feature flag — render this entry only when true. */
25902
+ enabled: boolean()
25903
+ });
25904
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
25905
+ var NavigationPointSchema = object({
25906
+ x: number(),
25907
+ y: number()
25908
+ });
25909
+ /**
25910
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
25911
+ * The cap reports which are enabled so the UI / PTZ render only the controls
25912
+ * that are turned on for THIS device. Data-driven: the provider derives these
25913
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
25914
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
25915
+ * that are not dictionary entries.
25916
+ *
25917
+ * - `move` / `stop` — the momentary drive joystick.
25918
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
25919
+ * map-coordinate plumbing is wired.
25920
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
25921
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
25922
+ * - `light` — the on/off fill-light toggle (works anytime).
25923
+ * - `lightMode` — the auto/manual selector + manual level slider (a
25924
+ * camera-service control; needs an active stream).
25925
+ */
25926
+ var NavigationFeaturesSchema = object({
25927
+ move: boolean(),
25928
+ stop: boolean(),
25929
+ goToPoint: boolean(),
25930
+ runAction: boolean(),
25931
+ playSound: boolean(),
25932
+ light: boolean(),
25933
+ lightMode: boolean()
25934
+ });
25935
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
25936
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
25937
+ /**
25938
+ * Live navigation state so the UI can reflect what the robot is doing:
25939
+ * - `mode` — coarse activity (idle / cleaning / following / …).
25940
+ * - `following` — person/pet follow is currently armed.
25941
+ * - `flash` — the on-camera fill light is on.
25942
+ * - `lightMode` — auto vs manual fill-light mode.
25943
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
25944
+ * `lightMode === 'manual'`.
25945
+ */
25946
+ var NavigationStatusSchema = object({
25947
+ mode: _enum([
25948
+ "idle",
25949
+ "cleaning",
25950
+ "spot",
25951
+ "following",
25952
+ "goto",
25953
+ "returning",
25954
+ "paused",
25955
+ "unknown"
25956
+ ]),
25957
+ following: boolean(),
25958
+ flash: boolean(),
25959
+ lightMode: NavigationLightModeSchema,
25960
+ lightLevel: number().min(40).max(100),
25961
+ /** Ms epoch when the slice was last updated. */
25962
+ lastChangedAt: number()
25963
+ });
25964
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
25965
+ 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({
25966
+ deviceId: number(),
25967
+ actionId: NavigationActionIdSchema
25968
+ }), _void(), { kind: "mutation" }), method(object({
25969
+ deviceId: number(),
25970
+ soundId: number().int()
25971
+ }), _void(), { kind: "mutation" }), method(object({
25972
+ deviceId: number(),
25973
+ on: boolean()
25974
+ }), _void(), { kind: "mutation" }), method(object({
25975
+ deviceId: number(),
25976
+ mode: NavigationLightModeSchema,
25977
+ level: number().min(40).max(100).optional()
25978
+ }), _void(), { kind: "mutation" }), method(object({
25979
+ deviceId: number(),
25980
+ level: number().min(40).max(100)
25981
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
25982
+ deviceId: number(),
25983
+ status: NavigationStatusSchema
25984
+ });
25985
+ /**
25986
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
25987
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
25988
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
25989
+ * one Home Assistant projection.
25990
+ */
25991
+ var NetworkLinkStatusSchema = object({
25992
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
25993
+ type: _enum([
25994
+ "wifi",
25995
+ "ethernet",
25996
+ "cellular",
25997
+ "unknown"
25998
+ ]),
25999
+ /**
26000
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26001
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26002
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26003
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26004
+ * SKIP a null rather than coerce it.
26005
+ */
26006
+ signalPercent: number().min(0).max(100).nullable(),
26007
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26008
+ rssiDbm: number().optional(),
26009
+ /** Network name of a wireless link, when the firmware reports it. */
26010
+ ssid: string().optional(),
26011
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26012
+ lastUpdated: number()
26013
+ });
26014
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26015
+ deviceId: number(),
26016
+ status: NetworkLinkStatusSchema
26017
+ });
26018
+ /**
25695
26019
  * network-quality — system-scoped singleton capability tracking RTT,
25696
26020
  * jitter, and observed/peak bandwidth per device + per client.
25697
26021
  *
@@ -26933,203 +27257,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
26933
27257
  deviceId: number(),
26934
27258
  status: PtzAutotrackStatusSchema
26935
27259
  });
26936
- /**
26937
- * `navigation` — a device-scoped capability that natively expresses the FULL
26938
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
26939
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
26940
- *
26941
- * Why a NEW cap rather than overloading `ptz`:
26942
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26943
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26944
- * The two are different physical models: PTZ is absolute-position + presets,
26945
- * navigation is momentary drive nudges + discrete robot ACTIONS
26946
- * (dock / spot-clean / follow-pet / go-to-point / …).
26947
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26948
- * the reverse:
26949
- * 1. a native CamStack navigation panel (data-driven from `listActions`
26950
- * / `getOptions`), and
26951
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26952
- * robot camera shows up in the existing PTZ control path without every
26953
- * PTZ provider learning about robots. The mapping lives in the adapter,
26954
- * not here (see the addon design note):
26955
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26956
- * ptz.stop() → navigation.stop()
26957
- * ptz.goHome() → navigation.runAction('goHome')
26958
- * ptz.getPresets() → navigation.listActions() (id→preset)
26959
- * ptz.goToPreset(id) → navigation.runAction(id)
26960
- *
26961
- * ## Continuous drive
26962
- *
26963
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26964
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26965
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26966
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26967
- * coalesce them. The UI owns the cadence.
26968
- *
26969
- * ## The action dictionary
26970
- *
26971
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26972
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26973
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26974
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26975
- * vendor-specific list. `kind: 'action'` entries are triggered with
26976
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26977
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
26978
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26979
- *
26980
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26981
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26982
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
26983
- * every device handle. A future nodedreame publish adds a typed
26984
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26985
- * provider can then swap the raw calls for the typed methods with no change to
26986
- * THIS contract.
26987
- */
26988
- /**
26989
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26990
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26991
- * halts it.
26992
- *
26993
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
26994
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26995
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26996
- * vector by it (drivers without proportional drive ignore it).
26997
- *
26998
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26999
- * axis alone; an all-undefined nudge is a no-op.
27000
- */
27001
- var NavigationMoveCommandSchema = object({
27002
- pan: number().min(-1).max(1).optional(),
27003
- tilt: number().min(-1).max(1).optional(),
27004
- speed: number().min(0).max(1).optional()
27005
- });
27006
- /**
27007
- * The enumerated discrete actions a navigation-capable robot can perform via
27008
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27009
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27010
- * `playSound` (see the `sound` dictionary entries).
27011
- */
27012
- var NavigationActionIdSchema = _enum([
27013
- "goHome",
27014
- "locate",
27015
- "spotClean",
27016
- "findPet",
27017
- "personFollow",
27018
- "stop",
27019
- "startClean",
27020
- "pauseClean",
27021
- "dockWash",
27022
- "autoEmpty",
27023
- "flashOn",
27024
- "flashOff"
27025
- ]);
27026
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27027
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27028
- /**
27029
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27030
- * native panel and the PTZ mimic render as a button.
27031
- *
27032
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27033
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27034
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27035
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27036
- * - `label` — operator-facing English label.
27037
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27038
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27039
- * PTZ render ONLY enabled entries. Data-driven: the provider
27040
- * flips it from config, never by editing code.
27041
- */
27042
- var NavigationActionEntrySchema = object({
27043
- id: string(),
27044
- kind: NavigationEntryKindSchema,
27045
- label: string(),
27046
- icon: string(),
27047
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27048
- soundId: number().int().optional(),
27049
- /** Per-device feature flag — render this entry only when true. */
27050
- enabled: boolean()
27051
- });
27052
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27053
- var NavigationPointSchema = object({
27054
- x: number(),
27055
- y: number()
27056
- });
27057
- /**
27058
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27059
- * The cap reports which are enabled so the UI / PTZ render only the controls
27060
- * that are turned on for THIS device. Data-driven: the provider derives these
27061
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27062
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27063
- * that are not dictionary entries.
27064
- *
27065
- * - `move` / `stop` — the momentary drive joystick.
27066
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27067
- * map-coordinate plumbing is wired.
27068
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27069
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27070
- * - `light` — the on/off fill-light toggle (works anytime).
27071
- * - `lightMode` — the auto/manual selector + manual level slider (a
27072
- * camera-service control; needs an active stream).
27073
- */
27074
- var NavigationFeaturesSchema = object({
27075
- move: boolean(),
27076
- stop: boolean(),
27077
- goToPoint: boolean(),
27078
- runAction: boolean(),
27079
- playSound: boolean(),
27080
- light: boolean(),
27081
- lightMode: boolean()
27082
- });
27083
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27084
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27085
- /**
27086
- * Live navigation state so the UI can reflect what the robot is doing:
27087
- * - `mode` — coarse activity (idle / cleaning / following / …).
27088
- * - `following` — person/pet follow is currently armed.
27089
- * - `flash` — the on-camera fill light is on.
27090
- * - `lightMode` — auto vs manual fill-light mode.
27091
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27092
- * `lightMode === 'manual'`.
27093
- */
27094
- var NavigationStatusSchema = object({
27095
- mode: _enum([
27096
- "idle",
27097
- "cleaning",
27098
- "spot",
27099
- "following",
27100
- "goto",
27101
- "returning",
27102
- "paused",
27103
- "unknown"
27104
- ]),
27105
- following: boolean(),
27106
- flash: boolean(),
27107
- lightMode: NavigationLightModeSchema,
27108
- lightLevel: number().min(40).max(100),
27109
- /** Ms epoch when the slice was last updated. */
27110
- lastChangedAt: number()
27111
- });
27112
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27113
- 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({
27114
- deviceId: number(),
27115
- actionId: NavigationActionIdSchema
27116
- }), _void(), { kind: "mutation" }), method(object({
27117
- deviceId: number(),
27118
- soundId: number().int()
27119
- }), _void(), { kind: "mutation" }), method(object({
27120
- deviceId: number(),
27121
- on: boolean()
27122
- }), _void(), { kind: "mutation" }), method(object({
27123
- deviceId: number(),
27124
- mode: NavigationLightModeSchema,
27125
- level: number().min(40).max(100).optional()
27126
- }), _void(), { kind: "mutation" }), method(object({
27127
- deviceId: number(),
27128
- level: number().min(40).max(100)
27129
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27130
- deviceId: number(),
27131
- status: NavigationStatusSchema
27132
- });
27133
27260
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27134
27261
  kind: "mutation",
27135
27262
  auth: "admin"
@@ -34438,13 +34565,13 @@ Object.freeze({
34438
34565
  addonId: null,
34439
34566
  access: "view"
34440
34567
  },
34441
- "storage.getDefaultLocation": {
34568
+ "storage.list": {
34442
34569
  capName: "storage",
34443
34570
  capScope: "system",
34444
34571
  addonId: null,
34445
34572
  access: "view"
34446
34573
  },
34447
- "storage.list": {
34574
+ "storage.listDrainProgress": {
34448
34575
  capName: "storage",
34449
34576
  capScope: "system",
34450
34577
  addonId: null,
@@ -34594,6 +34721,12 @@ Object.freeze({
34594
34721
  addonId: null,
34595
34722
  access: "view"
34596
34723
  },
34724
+ "storageOccupancy.getOccupancy": {
34725
+ capName: "storage-occupancy",
34726
+ capScope: "system",
34727
+ addonId: null,
34728
+ access: "view"
34729
+ },
34597
34730
  "storageProvider.abortUpload": {
34598
34731
  capName: "storage-provider",
34599
34732
  capScope: "system",