@camstack/addon-pipeline-orchestrator 1.2.165 → 1.2.167

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.
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ node_fs = __toESM(node_fs);
30
30
  let node_path = require("node:path");
31
31
  node_path = __toESM(node_path);
32
32
  let node_url = require("node:url");
33
- //#region ../types/dist/event-category-zAv7pMUz.mjs
33
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
34
34
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
35
35
  EventCategory["SystemBoot"] = "system.boot";
36
36
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -225,6 +225,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
225
225
  EventCategory["ProcessCrashed"] = "process.crashed";
226
226
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
227
227
  EventCategory["ProcessRestarted"] = "process.restarted";
228
+ /**
229
+ * The SET of storage locations changed — one was created, edited, enabled,
230
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
231
+ *
232
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
233
+ * it must also converge on its own periodic path, because a dropped event
234
+ * must not leave a node writing to yesterday's disk set forever. It exists
235
+ * because there was NO signal at all — an operator who added a second
236
+ * recordings disk in the admin UI got nothing, and the recorder kept its
237
+ * resolved locations until something else happened to re-resolve them
238
+ * (D387). Payload `StorageLocationsChangedPayload`.
239
+ */
240
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
228
241
  EventCategory["RecordingStarted"] = "recording.started";
229
242
  EventCategory["RecordingStopped"] = "recording.stopped";
230
243
  EventCategory["RecordingError"] = "recording.error";
@@ -8491,111 +8504,6 @@ function composeSwitchedOff(input) {
8491
8504
  };
8492
8505
  }
8493
8506
  /**
8494
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
8495
- * an addon declares its channels in.
8496
- *
8497
- * ## Two axes, deliberately separated
8498
- *
8499
- * - **DECLARATION** — which channels exist. Only the addon knows:
8500
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8501
- * baichuan/handshake. A hand-wired central list rots at the first addition,
8502
- * and rots silently. So a channel is declared where it is consulted, and the
8503
- * `log-channels` capability enumerates the declarations.
8504
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
8505
- * thing: the logging settings document on the `system` cap. Two authorities
8506
- * over the values is the exact defect
8507
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8508
- * remove; re-introducing it from the cure side would be grotesque.
8509
- *
8510
- * Nothing in this file reads a clock, an env var or a store. The registry is
8511
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8512
- * the hot path with a value somebody actually read, and by
8513
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8514
- * never reaches here, so it can neither disarm an armed channel nor arm a
8515
- * disarmed one (D49).
8516
- *
8517
- * ## The canonical call shape
8518
- *
8519
- * ```ts
8520
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8521
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8522
- * }
8523
- * ```
8524
- *
8525
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8526
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
8527
- * object literal is never constructed because it lives inside the branch. It
8528
- * is the same shape already proven in production at `stream-broker.ts:1650`,
8529
- * and the same discipline `LoggingGate.allowsDestination` uses for the
8530
- * destination floor (measured at 1.93 ns/call when off).
8531
- *
8532
- * ## Why a channel emits at `info`
8533
- *
8534
- * `loki-logging.addon.ts` pins the destination default at `info` and
8535
- * `loki-destination.ts` drops everything below it, so a line emitted at
8536
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8537
- * minutes. A diagnostic that cannot be read an hour later is worse than no
8538
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8539
- * emits at the channel's declared level, whose schema floor is `info`.
8540
- */
8541
- /**
8542
- * The level a channel writes at once armed.
8543
- *
8544
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8545
- * not leave the process for Loki, and the whole point of arming a channel is
8546
- * to read it later.
8547
- */
8548
- var LogChannelLevelSchema = _enum([
8549
- "info",
8550
- "warn",
8551
- "error"
8552
- ]);
8553
- /**
8554
- * What an addon declares about one channel. No value, no state — a
8555
- * declaration is inert.
8556
- */
8557
- var LogChannelDescriptorSchema = object({
8558
- /**
8559
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8560
- * the addon's short name so an operator reading a channel list can tell who
8561
- * owns it without a second lookup.
8562
- */
8563
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8564
- /** One sentence: what the operator will SEE after arming it. */
8565
- description: string().min(1),
8566
- /** The level its lines are emitted at. Never below `info`. */
8567
- defaultLevel: LogChannelLevelSchema,
8568
- /**
8569
- * Whether this channel can be narrowed to a camera.
8570
- *
8571
- * `true` is a PROMISE with two halves, and both must hold: the gate is
8572
- * consulted with the numeric device id, AND every line the channel admits
8573
- * carries `tags: { deviceId }` with that same numeric id. The second half is
8574
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8575
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8576
- * the body is the only way to filter.
8577
- *
8578
- * A channel whose lines carry the device only in `meta` (or not at all) is
8579
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8580
- * the operator narrows to one camera, sees nothing, and concludes the code
8581
- * path was never taken.
8582
- */
8583
- perDevice: boolean()
8584
- });
8585
- /**
8586
- * An armed window over one channel, as the document hands it to a mirror.
8587
- *
8588
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8589
- * expires by itself, which is the one failure a boolean cannot avoid.
8590
- */
8591
- var LogChannelWindowSchema = object({
8592
- channel: string().min(1),
8593
- /** Epoch ms the window closes at. */
8594
- armedUntilMs: number(),
8595
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8596
- deviceIds: array(number().int()).readonly().nullable()
8597
- });
8598
- /**
8599
8507
  * Ops-log — the durable, append-only operations audit shared by the
8600
8508
  * recordings and events management surfaces.
8601
8509
  *
@@ -9517,6 +9425,21 @@ var StorageCleanupJobSchema = object({
9517
9425
  });
9518
9426
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
9519
9427
  /**
9428
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
9429
+ * alias below is `z.infer<>` of it, never a second spelling.
9430
+ */
9431
+ var StorageLocationModeSchema = _enum([
9432
+ "active",
9433
+ "readonly",
9434
+ "drain",
9435
+ "disabled"
9436
+ ]);
9437
+ _enum([
9438
+ "normal",
9439
+ "never",
9440
+ "drain"
9441
+ ]);
9442
+ /**
9520
9443
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
9521
9444
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
9522
9445
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -9541,8 +9464,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
9541
9464
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
9542
9465
  *
9543
9466
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
9544
- * The default location for a type uses `id === <type>:default` by
9545
- * convention (the bare type ref like `'backups'` resolves to it).
9467
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
9468
+ * There is no default location any more (D383): `enabled` is the whole write
9469
+ * model, and a bare type ref resolves to the sole location of the type, or —
9470
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
9471
+ * slug is `default`.
9546
9472
  *
9547
9473
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
9548
9474
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -9563,23 +9489,37 @@ var StorageLocationSchema = object({
9563
9489
  * flag at upsert time, not here (the schema is provider-agnostic).
9564
9490
  */
9565
9491
  nodeId: string().optional(),
9566
- isDefault: boolean().default(false),
9567
9492
  isSystem: boolean().default(false),
9568
9493
  /**
9569
- * Operator opt-in: whether consumers that BALANCE across several locations
9570
- * of a type may write here. Recordings reads it today; event media and
9571
- * backups are the next consumers, which is why the flag lives on the
9572
- * location rather than in any one addon's store nothing has to be
9573
- * extended to add the next consumer.
9494
+ * THE write switch, and the only one (D383). `enabled: true` means every
9495
+ * consumer that chooses a write target for this type may write here, and all
9496
+ * enabled locations of a type are used TOGETHER; `false` means read-only
9497
+ * still read, still played back, still age-swept, still drained, never
9498
+ * written.
9574
9499
  *
9575
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
9576
- * flag existed reads back with no flag and keeps working exactly as before;
9577
- * that is the whole compat story, and it is why no migration ships with it.
9578
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
9579
- * disk must not silently start writing to it); the default of a type is
9580
- * always stamped `true`.
9500
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
9501
+ * stored" on an update and "born inert unless it is the first location of its
9502
+ * type" on a create. On a PERSISTED row absence is legacy and it means
9503
+ * enabled {@link isLocationEnabled} is the one place that says so, and the
9504
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
9505
+ * stops existing rather than being re-derived on every read.
9581
9506
  */
9582
9507
  enabled: boolean().optional(),
9508
+ /**
9509
+ * THE state of this location (D385), and the only authority on what may be
9510
+ * written, read or evicted here. Interpreted in exactly one place —
9511
+ * `storage-location-mode.ts` — which also folds the legacy
9512
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
9513
+ * ambiguous.
9514
+ *
9515
+ * OPTIONAL only for the wire and for rows written before D385: absence is
9516
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
9517
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
9518
+ * re-derived on every read. `enabled` survives one release as a DERIVED
9519
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
9520
+ * either, so the two cannot disagree.
9521
+ */
9522
+ mode: StorageLocationModeSchema.optional(),
9583
9523
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
9584
9524
  * for node-local locations it can reach) — never persisted, absent when the
9585
9525
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -9587,13 +9527,50 @@ var StorageLocationSchema = object({
9587
9527
  totalBytes: number(),
9588
9528
  availableBytes: number()
9589
9529
  }).nullable().optional(),
9530
+ /**
9531
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
9532
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
9533
+ * never persisted, never a filesystem walk.
9534
+ *
9535
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
9536
+ * location yet — nobody stores here, the owning addon is down, or the first
9537
+ * refresh has not completed. A UI must omit the segment rather than draw it
9538
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
9539
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
9540
+ * be spelled out loud instead of appearing by accident.
9541
+ *
9542
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
9543
+ * about the whole figure rather than about its freshest part.
9544
+ */
9545
+ owned: object({
9546
+ bytes: number().int().nonnegative(),
9547
+ measuredAtMs: number().int().nonnegative()
9548
+ }).optional(),
9590
9549
  createdAt: number(),
9591
9550
  updatedAt: number()
9592
9551
  });
9552
+ object({ isDefault: boolean().optional() });
9553
+ /**
9554
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
9555
+ *
9556
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
9557
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
9558
+ * drain with no observed growth has no honest ETA, and inventing one is how an
9559
+ * operator learns not to believe the screen.
9560
+ */
9561
+ var StorageDrainProgressSchema = object({
9562
+ locationId: string(),
9563
+ startedAtMs: number(),
9564
+ startBytes: number(),
9565
+ bytesRemaining: number(),
9566
+ drained: boolean(),
9567
+ estimatedEmptyAtMs: number().nullable()
9568
+ });
9593
9569
  /**
9594
9570
  * Reference accepted by consumer-facing `api.storage.*` calls.
9595
9571
  * Either:
9596
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
9572
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
9573
+ * (transitionally, the `<type>:default`-slugged row when several exist)
9597
9574
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
9598
9575
  *
9599
9576
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -9769,6 +9746,111 @@ var DecoderSessionConfigSchema = object({
9769
9746
  */
9770
9747
  debug: boolean().optional()
9771
9748
  });
9749
+ /**
9750
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
9751
+ * an addon declares its channels in.
9752
+ *
9753
+ * ## Two axes, deliberately separated
9754
+ *
9755
+ * - **DECLARATION** — which channels exist. Only the addon knows:
9756
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
9757
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
9758
+ * and rots silently. So a channel is declared where it is consulted, and the
9759
+ * `log-channels` capability enumerates the declarations.
9760
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
9761
+ * thing: the logging settings document on the `system` cap. Two authorities
9762
+ * over the values is the exact defect
9763
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
9764
+ * remove; re-introducing it from the cure side would be grotesque.
9765
+ *
9766
+ * Nothing in this file reads a clock, an env var or a store. The registry is
9767
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
9768
+ * the hot path with a value somebody actually read, and by
9769
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
9770
+ * never reaches here, so it can neither disarm an armed channel nor arm a
9771
+ * disarmed one (D49).
9772
+ *
9773
+ * ## The canonical call shape
9774
+ *
9775
+ * ```ts
9776
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
9777
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
9778
+ * }
9779
+ * ```
9780
+ *
9781
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
9782
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
9783
+ * object literal is never constructed because it lives inside the branch. It
9784
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
9785
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
9786
+ * destination floor (measured at 1.93 ns/call when off).
9787
+ *
9788
+ * ## Why a channel emits at `info`
9789
+ *
9790
+ * `loki-logging.addon.ts` pins the destination default at `info` and
9791
+ * `loki-destination.ts` drops everything below it, so a line emitted at
9792
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
9793
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
9794
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
9795
+ * emits at the channel's declared level, whose schema floor is `info`.
9796
+ */
9797
+ /**
9798
+ * The level a channel writes at once armed.
9799
+ *
9800
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
9801
+ * not leave the process for Loki, and the whole point of arming a channel is
9802
+ * to read it later.
9803
+ */
9804
+ var LogChannelLevelSchema = _enum([
9805
+ "info",
9806
+ "warn",
9807
+ "error"
9808
+ ]);
9809
+ /**
9810
+ * What an addon declares about one channel. No value, no state — a
9811
+ * declaration is inert.
9812
+ */
9813
+ var LogChannelDescriptorSchema = object({
9814
+ /**
9815
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
9816
+ * the addon's short name so an operator reading a channel list can tell who
9817
+ * owns it without a second lookup.
9818
+ */
9819
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
9820
+ /** One sentence: what the operator will SEE after arming it. */
9821
+ description: string().min(1),
9822
+ /** The level its lines are emitted at. Never below `info`. */
9823
+ defaultLevel: LogChannelLevelSchema,
9824
+ /**
9825
+ * Whether this channel can be narrowed to a camera.
9826
+ *
9827
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
9828
+ * consulted with the numeric device id, AND every line the channel admits
9829
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
9830
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
9831
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
9832
+ * the body is the only way to filter.
9833
+ *
9834
+ * A channel whose lines carry the device only in `meta` (or not at all) is
9835
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
9836
+ * the operator narrows to one camera, sees nothing, and concludes the code
9837
+ * path was never taken.
9838
+ */
9839
+ perDevice: boolean()
9840
+ });
9841
+ /**
9842
+ * An armed window over one channel, as the document hands it to a mirror.
9843
+ *
9844
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
9845
+ * expires by itself, which is the one failure a boolean cannot avoid.
9846
+ */
9847
+ var LogChannelWindowSchema = object({
9848
+ channel: string().min(1),
9849
+ /** Epoch ms the window closes at. */
9850
+ armedUntilMs: number(),
9851
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
9852
+ deviceIds: array(number().int()).readonly().nullable()
9853
+ });
9772
9854
  var MODEL_FORMATS = [
9773
9855
  "onnx",
9774
9856
  "coreml",
@@ -23224,7 +23306,7 @@ method(object({
23224
23306
  downloadId: string(),
23225
23307
  offset: number(),
23226
23308
  length: number()
23227
- }), _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({
23309
+ }), _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({
23228
23310
  createdAt: true,
23229
23311
  updatedAt: true
23230
23312
  }), StorageLocationSchema, {
@@ -23236,7 +23318,7 @@ method(object({
23236
23318
  }), _void(), {
23237
23319
  kind: "mutation",
23238
23320
  auth: "admin"
23239
- }), method(object({ id: string() }), object({
23321
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
23240
23322
  ok: boolean(),
23241
23323
  error: string().optional()
23242
23324
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -23306,6 +23388,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
23306
23388
  kind: "mutation",
23307
23389
  auth: "admin"
23308
23390
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
23391
+ /**
23392
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
23393
+ * location (D388).
23394
+ *
23395
+ * ## Why this is not `storage-evictable`
23396
+ *
23397
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
23398
+ * not, in two ways that both matter and both bite hardest on the locations an
23399
+ * operator most wants a figure for:
23400
+ *
23401
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
23402
+ * and `recordingsLow:default` deliberately share one root and evict as one
23403
+ * oldest-first pool, so both answer with the SAME combined total. As an
23404
+ * occupancy figure that double-counts the disk.
23405
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
23406
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
23407
+ * is retiring and staring at.
23408
+ *
23409
+ * So this is its own contract with its own quantity, and the quantity is
23410
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
23411
+ * would ever be willing to delete it. A provider that can only answer
23412
+ * "evictable" must not register here — a number that silently means different
23413
+ * things per class is worse than no number.
23414
+ *
23415
+ * ## Absence is an answer
23416
+ *
23417
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
23418
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
23419
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
23420
+ * consuming side has to be written out loud instead of appearing by accident.
23421
+ *
23422
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
23423
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
23424
+ */
23425
+ /** One provider's occupancy answer for one location. */
23426
+ var StorageOccupancyReportSchema = object({
23427
+ locationId: string(),
23428
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
23429
+ * not net of what it is willing to delete. */
23430
+ ownedBytes: number().int().nonnegative(),
23431
+ /** When the provider last actually measured this. The orchestrator carries it
23432
+ * through so a UI can say how old the figure is instead of implying "now". */
23433
+ measuredAtMs: number().int().nonnegative()
23434
+ });
23435
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
23309
23436
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
23310
23437
  providerId: string().min(1),
23311
23438
  displayName: string().min(1),
@@ -24941,39 +25068,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
24941
25068
  deviceId: number(),
24942
25069
  status: BatteryStatusSchema
24943
25070
  });
24944
- /**
24945
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
24946
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
24947
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
24948
- * one Home Assistant projection.
24949
- */
24950
- var NetworkLinkStatusSchema = object({
24951
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
24952
- type: _enum([
24953
- "wifi",
24954
- "ethernet",
24955
- "cellular",
24956
- "unknown"
24957
- ]),
24958
- /**
24959
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
24960
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
24961
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
24962
- * one whose reading has not landed must not be drawn at 0 %. Consumers
24963
- * SKIP a null rather than coerce it.
24964
- */
24965
- signalPercent: number().min(0).max(100).nullable(),
24966
- /** Raw received signal strength in dBm, when the firmware reports one. */
24967
- rssiDbm: number().optional(),
24968
- /** Network name of a wireless link, when the firmware reports it. */
24969
- ssid: string().optional(),
24970
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
24971
- lastUpdated: number()
24972
- });
24973
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
24974
- deviceId: number(),
24975
- status: NetworkLinkStatusSchema
24976
- });
24977
25071
  object({
24978
25072
  on: boolean(),
24979
25073
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -27327,6 +27421,236 @@ DeviceType.Camera, method(object({
27327
27421
  detection: NativeDetectionSchema
27328
27422
  });
27329
27423
  /**
27424
+ * `navigation` — a device-scoped capability that natively expresses the FULL
27425
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
27426
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
27427
+ *
27428
+ * Why a NEW cap rather than overloading `ptz`:
27429
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27430
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27431
+ * The two are different physical models: PTZ is absolute-position + presets,
27432
+ * navigation is momentary drive nudges + discrete robot ACTIONS
27433
+ * (dock / spot-clean / follow-pet / go-to-point / …).
27434
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27435
+ * the reverse:
27436
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
27437
+ * / `getOptions`), and
27438
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27439
+ * robot camera shows up in the existing PTZ control path without every
27440
+ * PTZ provider learning about robots. The mapping lives in the adapter,
27441
+ * not here (see the addon design note):
27442
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27443
+ * ptz.stop() → navigation.stop()
27444
+ * ptz.goHome() → navigation.runAction('goHome')
27445
+ * ptz.getPresets() → navigation.listActions() (id→preset)
27446
+ * ptz.goToPreset(id) → navigation.runAction(id)
27447
+ *
27448
+ * ## Continuous drive
27449
+ *
27450
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27451
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27452
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27453
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27454
+ * coalesce them. The UI owns the cadence.
27455
+ *
27456
+ * ## The action dictionary
27457
+ *
27458
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27459
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27460
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27461
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27462
+ * vendor-specific list. `kind: 'action'` entries are triggered with
27463
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27464
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
27465
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27466
+ *
27467
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27468
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27469
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
27470
+ * every device handle. A future nodedreame publish adds a typed
27471
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27472
+ * provider can then swap the raw calls for the typed methods with no change to
27473
+ * THIS contract.
27474
+ */
27475
+ /**
27476
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27477
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27478
+ * halts it.
27479
+ *
27480
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
27481
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27482
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27483
+ * vector by it (drivers without proportional drive ignore it).
27484
+ *
27485
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27486
+ * axis alone; an all-undefined nudge is a no-op.
27487
+ */
27488
+ var NavigationMoveCommandSchema = object({
27489
+ pan: number().min(-1).max(1).optional(),
27490
+ tilt: number().min(-1).max(1).optional(),
27491
+ speed: number().min(0).max(1).optional()
27492
+ });
27493
+ /**
27494
+ * The enumerated discrete actions a navigation-capable robot can perform via
27495
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27496
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
27497
+ * `playSound` (see the `sound` dictionary entries).
27498
+ */
27499
+ var NavigationActionIdSchema = _enum([
27500
+ "goHome",
27501
+ "locate",
27502
+ "spotClean",
27503
+ "findPet",
27504
+ "personFollow",
27505
+ "stop",
27506
+ "startClean",
27507
+ "pauseClean",
27508
+ "dockWash",
27509
+ "autoEmpty",
27510
+ "flashOn",
27511
+ "flashOff"
27512
+ ]);
27513
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27514
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
27515
+ /**
27516
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27517
+ * native panel and the PTZ mimic render as a button.
27518
+ *
27519
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27520
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27521
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
27522
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27523
+ * - `label` — operator-facing English label.
27524
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27525
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27526
+ * PTZ render ONLY enabled entries. Data-driven: the provider
27527
+ * flips it from config, never by editing code.
27528
+ */
27529
+ var NavigationActionEntrySchema = object({
27530
+ id: string(),
27531
+ kind: NavigationEntryKindSchema,
27532
+ label: string(),
27533
+ icon: string(),
27534
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27535
+ soundId: number().int().optional(),
27536
+ /** Per-device feature flag — render this entry only when true. */
27537
+ enabled: boolean()
27538
+ });
27539
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
27540
+ var NavigationPointSchema = object({
27541
+ x: number(),
27542
+ y: number()
27543
+ });
27544
+ /**
27545
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27546
+ * The cap reports which are enabled so the UI / PTZ render only the controls
27547
+ * that are turned on for THIS device. Data-driven: the provider derives these
27548
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27549
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27550
+ * that are not dictionary entries.
27551
+ *
27552
+ * - `move` / `stop` — the momentary drive joystick.
27553
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27554
+ * map-coordinate plumbing is wired.
27555
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27556
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27557
+ * - `light` — the on/off fill-light toggle (works anytime).
27558
+ * - `lightMode` — the auto/manual selector + manual level slider (a
27559
+ * camera-service control; needs an active stream).
27560
+ */
27561
+ var NavigationFeaturesSchema = object({
27562
+ move: boolean(),
27563
+ stop: boolean(),
27564
+ goToPoint: boolean(),
27565
+ runAction: boolean(),
27566
+ playSound: boolean(),
27567
+ light: boolean(),
27568
+ lightMode: boolean()
27569
+ });
27570
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27571
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
27572
+ /**
27573
+ * Live navigation state so the UI can reflect what the robot is doing:
27574
+ * - `mode` — coarse activity (idle / cleaning / following / …).
27575
+ * - `following` — person/pet follow is currently armed.
27576
+ * - `flash` — the on-camera fill light is on.
27577
+ * - `lightMode` — auto vs manual fill-light mode.
27578
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
27579
+ * `lightMode === 'manual'`.
27580
+ */
27581
+ var NavigationStatusSchema = object({
27582
+ mode: _enum([
27583
+ "idle",
27584
+ "cleaning",
27585
+ "spot",
27586
+ "following",
27587
+ "goto",
27588
+ "returning",
27589
+ "paused",
27590
+ "unknown"
27591
+ ]),
27592
+ following: boolean(),
27593
+ flash: boolean(),
27594
+ lightMode: NavigationLightModeSchema,
27595
+ lightLevel: number().min(40).max(100),
27596
+ /** Ms epoch when the slice was last updated. */
27597
+ lastChangedAt: number()
27598
+ });
27599
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
27600
+ 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({
27601
+ deviceId: number(),
27602
+ actionId: NavigationActionIdSchema
27603
+ }), _void(), { kind: "mutation" }), method(object({
27604
+ deviceId: number(),
27605
+ soundId: number().int()
27606
+ }), _void(), { kind: "mutation" }), method(object({
27607
+ deviceId: number(),
27608
+ on: boolean()
27609
+ }), _void(), { kind: "mutation" }), method(object({
27610
+ deviceId: number(),
27611
+ mode: NavigationLightModeSchema,
27612
+ level: number().min(40).max(100).optional()
27613
+ }), _void(), { kind: "mutation" }), method(object({
27614
+ deviceId: number(),
27615
+ level: number().min(40).max(100)
27616
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27617
+ deviceId: number(),
27618
+ status: NavigationStatusSchema
27619
+ });
27620
+ /**
27621
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
27622
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
27623
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
27624
+ * one Home Assistant projection.
27625
+ */
27626
+ var NetworkLinkStatusSchema = object({
27627
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
27628
+ type: _enum([
27629
+ "wifi",
27630
+ "ethernet",
27631
+ "cellular",
27632
+ "unknown"
27633
+ ]),
27634
+ /**
27635
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
27636
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
27637
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
27638
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
27639
+ * SKIP a null rather than coerce it.
27640
+ */
27641
+ signalPercent: number().min(0).max(100).nullable(),
27642
+ /** Raw received signal strength in dBm, when the firmware reports one. */
27643
+ rssiDbm: number().optional(),
27644
+ /** Network name of a wireless link, when the firmware reports it. */
27645
+ ssid: string().optional(),
27646
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
27647
+ lastUpdated: number()
27648
+ });
27649
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
27650
+ deviceId: number(),
27651
+ status: NetworkLinkStatusSchema
27652
+ });
27653
+ /**
27330
27654
  * network-quality — system-scoped singleton capability tracking RTT,
27331
27655
  * jitter, and observed/peak bandwidth per device + per client.
27332
27656
  *
@@ -28568,203 +28892,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
28568
28892
  deviceId: number(),
28569
28893
  status: PtzAutotrackStatusSchema
28570
28894
  });
28571
- /**
28572
- * `navigation` — a device-scoped capability that natively expresses the FULL
28573
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
28574
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
28575
- *
28576
- * Why a NEW cap rather than overloading `ptz`:
28577
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
28578
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
28579
- * The two are different physical models: PTZ is absolute-position + presets,
28580
- * navigation is momentary drive nudges + discrete robot ACTIONS
28581
- * (dock / spot-clean / follow-pet / go-to-point / …).
28582
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
28583
- * the reverse:
28584
- * 1. a native CamStack navigation panel (data-driven from `listActions`
28585
- * / `getOptions`), and
28586
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
28587
- * robot camera shows up in the existing PTZ control path without every
28588
- * PTZ provider learning about robots. The mapping lives in the adapter,
28589
- * not here (see the addon design note):
28590
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
28591
- * ptz.stop() → navigation.stop()
28592
- * ptz.goHome() → navigation.runAction('goHome')
28593
- * ptz.getPresets() → navigation.listActions() (id→preset)
28594
- * ptz.goToPreset(id) → navigation.runAction(id)
28595
- *
28596
- * ## Continuous drive
28597
- *
28598
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
28599
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
28600
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
28601
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
28602
- * coalesce them. The UI owns the cadence.
28603
- *
28604
- * ## The action dictionary
28605
- *
28606
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
28607
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
28608
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
28609
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
28610
- * vendor-specific list. `kind: 'action'` entries are triggered with
28611
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
28612
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
28613
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
28614
- *
28615
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
28616
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
28617
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
28618
- * every device handle. A future nodedreame publish adds a typed
28619
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
28620
- * provider can then swap the raw calls for the typed methods with no change to
28621
- * THIS contract.
28622
- */
28623
- /**
28624
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
28625
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
28626
- * halts it.
28627
- *
28628
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
28629
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
28630
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
28631
- * vector by it (drivers without proportional drive ignore it).
28632
- *
28633
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
28634
- * axis alone; an all-undefined nudge is a no-op.
28635
- */
28636
- var NavigationMoveCommandSchema = object({
28637
- pan: number().min(-1).max(1).optional(),
28638
- tilt: number().min(-1).max(1).optional(),
28639
- speed: number().min(0).max(1).optional()
28640
- });
28641
- /**
28642
- * The enumerated discrete actions a navigation-capable robot can perform via
28643
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
28644
- * subset it supports through `listActions`. Sounds are NOT here — they go through
28645
- * `playSound` (see the `sound` dictionary entries).
28646
- */
28647
- var NavigationActionIdSchema = _enum([
28648
- "goHome",
28649
- "locate",
28650
- "spotClean",
28651
- "findPet",
28652
- "personFollow",
28653
- "stop",
28654
- "startClean",
28655
- "pauseClean",
28656
- "dockWash",
28657
- "autoEmpty",
28658
- "flashOn",
28659
- "flashOff"
28660
- ]);
28661
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
28662
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
28663
- /**
28664
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
28665
- * native panel and the PTZ mimic render as a button.
28666
- *
28667
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
28668
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
28669
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
28670
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
28671
- * - `label` — operator-facing English label.
28672
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
28673
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
28674
- * PTZ render ONLY enabled entries. Data-driven: the provider
28675
- * flips it from config, never by editing code.
28676
- */
28677
- var NavigationActionEntrySchema = object({
28678
- id: string(),
28679
- kind: NavigationEntryKindSchema,
28680
- label: string(),
28681
- icon: string(),
28682
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
28683
- soundId: number().int().optional(),
28684
- /** Per-device feature flag — render this entry only when true. */
28685
- enabled: boolean()
28686
- });
28687
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
28688
- var NavigationPointSchema = object({
28689
- x: number(),
28690
- y: number()
28691
- });
28692
- /**
28693
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
28694
- * The cap reports which are enabled so the UI / PTZ render only the controls
28695
- * that are turned on for THIS device. Data-driven: the provider derives these
28696
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
28697
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
28698
- * that are not dictionary entries.
28699
- *
28700
- * - `move` / `stop` — the momentary drive joystick.
28701
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
28702
- * map-coordinate plumbing is wired.
28703
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
28704
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
28705
- * - `light` — the on/off fill-light toggle (works anytime).
28706
- * - `lightMode` — the auto/manual selector + manual level slider (a
28707
- * camera-service control; needs an active stream).
28708
- */
28709
- var NavigationFeaturesSchema = object({
28710
- move: boolean(),
28711
- stop: boolean(),
28712
- goToPoint: boolean(),
28713
- runAction: boolean(),
28714
- playSound: boolean(),
28715
- light: boolean(),
28716
- lightMode: boolean()
28717
- });
28718
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
28719
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
28720
- /**
28721
- * Live navigation state so the UI can reflect what the robot is doing:
28722
- * - `mode` — coarse activity (idle / cleaning / following / …).
28723
- * - `following` — person/pet follow is currently armed.
28724
- * - `flash` — the on-camera fill light is on.
28725
- * - `lightMode` — auto vs manual fill-light mode.
28726
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
28727
- * `lightMode === 'manual'`.
28728
- */
28729
- var NavigationStatusSchema = object({
28730
- mode: _enum([
28731
- "idle",
28732
- "cleaning",
28733
- "spot",
28734
- "following",
28735
- "goto",
28736
- "returning",
28737
- "paused",
28738
- "unknown"
28739
- ]),
28740
- following: boolean(),
28741
- flash: boolean(),
28742
- lightMode: NavigationLightModeSchema,
28743
- lightLevel: number().min(40).max(100),
28744
- /** Ms epoch when the slice was last updated. */
28745
- lastChangedAt: number()
28746
- });
28747
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
28748
- 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({
28749
- deviceId: number(),
28750
- actionId: NavigationActionIdSchema
28751
- }), _void(), { kind: "mutation" }), method(object({
28752
- deviceId: number(),
28753
- soundId: number().int()
28754
- }), _void(), { kind: "mutation" }), method(object({
28755
- deviceId: number(),
28756
- on: boolean()
28757
- }), _void(), { kind: "mutation" }), method(object({
28758
- deviceId: number(),
28759
- mode: NavigationLightModeSchema,
28760
- level: number().min(40).max(100).optional()
28761
- }), _void(), { kind: "mutation" }), method(object({
28762
- deviceId: number(),
28763
- level: number().min(40).max(100)
28764
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
28765
- deviceId: number(),
28766
- status: NavigationStatusSchema
28767
- });
28768
28895
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
28769
28896
  kind: "mutation",
28770
28897
  auth: "admin"
@@ -36157,13 +36284,13 @@ Object.freeze({
36157
36284
  addonId: null,
36158
36285
  access: "view"
36159
36286
  },
36160
- "storage.getDefaultLocation": {
36287
+ "storage.list": {
36161
36288
  capName: "storage",
36162
36289
  capScope: "system",
36163
36290
  addonId: null,
36164
36291
  access: "view"
36165
36292
  },
36166
- "storage.list": {
36293
+ "storage.listDrainProgress": {
36167
36294
  capName: "storage",
36168
36295
  capScope: "system",
36169
36296
  addonId: null,
@@ -36313,6 +36440,12 @@ Object.freeze({
36313
36440
  addonId: null,
36314
36441
  access: "view"
36315
36442
  },
36443
+ "storageOccupancy.getOccupancy": {
36444
+ capName: "storage-occupancy",
36445
+ capScope: "system",
36446
+ addonId: null,
36447
+ access: "view"
36448
+ },
36316
36449
  "storageProvider.abortUpload": {
36317
36450
  capName: "storage-provider",
36318
36451
  capScope: "system",