@camstack/addon-model-studio 1.1.104 → 1.1.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. package/dist/{MotionZonesSettings-Bc_YXAAi.mjs → MotionZonesSettings-B3Ws1xqb.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-By6TGWR1.mjs → PrivacyMaskSettings-D_yq7O4C.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-BZ9hjbBq.mjs → SceneMonitorEditor-6Z16a4l3.mjs} +3 -3
  4. package/dist/_stub.js +10 -10
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-vNTuRhqM.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-h6h-pDo8.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DZEgYM31.mjs +26 -0
  7. package/dist/{hostInit-Cx0wTUuS.mjs → hostInit-uS0lw8TZ.mjs} +3 -3
  8. package/dist/model-studio.addon.js +488 -355
  9. package/dist/model-studio.addon.mjs +488 -355
  10. package/dist/{player-overlays-U1-XkeE2.mjs → player-overlays-zjGpr2DV.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-BKfVQp1R.mjs → responsive-CDob01xQ.mjs} +1 -1
  13. package/dist/{square-CiaLk8Ju.mjs → square-DVxG0_w-.mjs} +1 -1
  14. package/dist/{trash-2-xsKAqBdh.mjs → trash-2-BgbLMJP2.mjs} +1 -1
  15. package/dist/{use-device-snapshot-BHoqPeg0.mjs → use-device-snapshot-esDPfd9B.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CaE_D4tv.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CdPBo7mj.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-pk3CFyYP.mjs +0 -26
@@ -523,7 +523,7 @@ async function importScryptedCatalogModel(input, deps) {
523
523
  }
524
524
  }
525
525
  //#endregion
526
- //#region ../types/dist/event-category-zAv7pMUz.mjs
526
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
527
527
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
528
528
  EventCategory["SystemBoot"] = "system.boot";
529
529
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -718,6 +718,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
718
718
  EventCategory["ProcessCrashed"] = "process.crashed";
719
719
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
720
720
  EventCategory["ProcessRestarted"] = "process.restarted";
721
+ /**
722
+ * The SET of storage locations changed — one was created, edited, enabled,
723
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
724
+ *
725
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
726
+ * it must also converge on its own periodic path, because a dropped event
727
+ * must not leave a node writing to yesterday's disk set forever. It exists
728
+ * because there was NO signal at all — an operator who added a second
729
+ * recordings disk in the admin UI got nothing, and the recorder kept its
730
+ * resolved locations until something else happened to re-resolve them
731
+ * (D387). Payload `StorageLocationsChangedPayload`.
732
+ */
733
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
721
734
  EventCategory["RecordingStarted"] = "recording.started";
722
735
  EventCategory["RecordingStopped"] = "recording.stopped";
723
736
  EventCategory["RecordingError"] = "recording.error";
@@ -8182,111 +8195,6 @@ var CameraSwitchGroupSchema = object({
8182
8195
  fetchedAt: number()
8183
8196
  });
8184
8197
  /**
8185
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
8186
- * an addon declares its channels in.
8187
- *
8188
- * ## Two axes, deliberately separated
8189
- *
8190
- * - **DECLARATION** — which channels exist. Only the addon knows:
8191
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8192
- * baichuan/handshake. A hand-wired central list rots at the first addition,
8193
- * and rots silently. So a channel is declared where it is consulted, and the
8194
- * `log-channels` capability enumerates the declarations.
8195
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
8196
- * thing: the logging settings document on the `system` cap. Two authorities
8197
- * over the values is the exact defect
8198
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8199
- * remove; re-introducing it from the cure side would be grotesque.
8200
- *
8201
- * Nothing in this file reads a clock, an env var or a store. The registry is
8202
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8203
- * the hot path with a value somebody actually read, and by
8204
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8205
- * never reaches here, so it can neither disarm an armed channel nor arm a
8206
- * disarmed one (D49).
8207
- *
8208
- * ## The canonical call shape
8209
- *
8210
- * ```ts
8211
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8212
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8213
- * }
8214
- * ```
8215
- *
8216
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8217
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
8218
- * object literal is never constructed because it lives inside the branch. It
8219
- * is the same shape already proven in production at `stream-broker.ts:1650`,
8220
- * and the same discipline `LoggingGate.allowsDestination` uses for the
8221
- * destination floor (measured at 1.93 ns/call when off).
8222
- *
8223
- * ## Why a channel emits at `info`
8224
- *
8225
- * `loki-logging.addon.ts` pins the destination default at `info` and
8226
- * `loki-destination.ts` drops everything below it, so a line emitted at
8227
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8228
- * minutes. A diagnostic that cannot be read an hour later is worse than no
8229
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8230
- * emits at the channel's declared level, whose schema floor is `info`.
8231
- */
8232
- /**
8233
- * The level a channel writes at once armed.
8234
- *
8235
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8236
- * not leave the process for Loki, and the whole point of arming a channel is
8237
- * to read it later.
8238
- */
8239
- var LogChannelLevelSchema = _enum([
8240
- "info",
8241
- "warn",
8242
- "error"
8243
- ]);
8244
- /**
8245
- * What an addon declares about one channel. No value, no state — a
8246
- * declaration is inert.
8247
- */
8248
- var LogChannelDescriptorSchema = object({
8249
- /**
8250
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8251
- * the addon's short name so an operator reading a channel list can tell who
8252
- * owns it without a second lookup.
8253
- */
8254
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8255
- /** One sentence: what the operator will SEE after arming it. */
8256
- description: string().min(1),
8257
- /** The level its lines are emitted at. Never below `info`. */
8258
- defaultLevel: LogChannelLevelSchema,
8259
- /**
8260
- * Whether this channel can be narrowed to a camera.
8261
- *
8262
- * `true` is a PROMISE with two halves, and both must hold: the gate is
8263
- * consulted with the numeric device id, AND every line the channel admits
8264
- * carries `tags: { deviceId }` with that same numeric id. The second half is
8265
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8266
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8267
- * the body is the only way to filter.
8268
- *
8269
- * A channel whose lines carry the device only in `meta` (or not at all) is
8270
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8271
- * the operator narrows to one camera, sees nothing, and concludes the code
8272
- * path was never taken.
8273
- */
8274
- perDevice: boolean()
8275
- });
8276
- /**
8277
- * An armed window over one channel, as the document hands it to a mirror.
8278
- *
8279
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8280
- * expires by itself, which is the one failure a boolean cannot avoid.
8281
- */
8282
- var LogChannelWindowSchema = object({
8283
- channel: string().min(1),
8284
- /** Epoch ms the window closes at. */
8285
- armedUntilMs: number(),
8286
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8287
- deviceIds: array(number().int()).readonly().nullable()
8288
- });
8289
- /**
8290
8198
  * Ops-log — the durable, append-only operations audit shared by the
8291
8199
  * recordings and events management surfaces.
8292
8200
  *
@@ -9208,6 +9116,21 @@ var StorageCleanupJobSchema = object({
9208
9116
  });
9209
9117
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
9210
9118
  /**
9119
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
9120
+ * alias below is `z.infer<>` of it, never a second spelling.
9121
+ */
9122
+ var StorageLocationModeSchema = _enum([
9123
+ "active",
9124
+ "readonly",
9125
+ "drain",
9126
+ "disabled"
9127
+ ]);
9128
+ _enum([
9129
+ "normal",
9130
+ "never",
9131
+ "drain"
9132
+ ]);
9133
+ /**
9211
9134
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
9212
9135
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
9213
9136
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -9232,8 +9155,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
9232
9155
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
9233
9156
  *
9234
9157
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
9235
- * The default location for a type uses `id === <type>:default` by
9236
- * convention (the bare type ref like `'backups'` resolves to it).
9158
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
9159
+ * There is no default location any more (D383): `enabled` is the whole write
9160
+ * model, and a bare type ref resolves to the sole location of the type, or —
9161
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
9162
+ * slug is `default`.
9237
9163
  *
9238
9164
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
9239
9165
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -9254,23 +9180,37 @@ var StorageLocationSchema = object({
9254
9180
  * flag at upsert time, not here (the schema is provider-agnostic).
9255
9181
  */
9256
9182
  nodeId: string().optional(),
9257
- isDefault: boolean().default(false),
9258
9183
  isSystem: boolean().default(false),
9259
9184
  /**
9260
- * Operator opt-in: whether consumers that BALANCE across several locations
9261
- * of a type may write here. Recordings reads it today; event media and
9262
- * backups are the next consumers, which is why the flag lives on the
9263
- * location rather than in any one addon's store nothing has to be
9264
- * extended to add the next consumer.
9185
+ * THE write switch, and the only one (D383). `enabled: true` means every
9186
+ * consumer that chooses a write target for this type may write here, and all
9187
+ * enabled locations of a type are used TOGETHER; `false` means read-only
9188
+ * still read, still played back, still age-swept, still drained, never
9189
+ * written.
9265
9190
  *
9266
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
9267
- * flag existed reads back with no flag and keeps working exactly as before;
9268
- * that is the whole compat story, and it is why no migration ships with it.
9269
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
9270
- * disk must not silently start writing to it); the default of a type is
9271
- * always stamped `true`.
9191
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
9192
+ * stored" on an update and "born inert unless it is the first location of its
9193
+ * type" on a create. On a PERSISTED row absence is legacy and it means
9194
+ * enabled {@link isLocationEnabled} is the one place that says so, and the
9195
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
9196
+ * stops existing rather than being re-derived on every read.
9272
9197
  */
9273
9198
  enabled: boolean().optional(),
9199
+ /**
9200
+ * THE state of this location (D385), and the only authority on what may be
9201
+ * written, read or evicted here. Interpreted in exactly one place —
9202
+ * `storage-location-mode.ts` — which also folds the legacy
9203
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
9204
+ * ambiguous.
9205
+ *
9206
+ * OPTIONAL only for the wire and for rows written before D385: absence is
9207
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
9208
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
9209
+ * re-derived on every read. `enabled` survives one release as a DERIVED
9210
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
9211
+ * either, so the two cannot disagree.
9212
+ */
9213
+ mode: StorageLocationModeSchema.optional(),
9274
9214
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
9275
9215
  * for node-local locations it can reach) — never persisted, absent when the
9276
9216
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -9278,13 +9218,50 @@ var StorageLocationSchema = object({
9278
9218
  totalBytes: number(),
9279
9219
  availableBytes: number()
9280
9220
  }).nullable().optional(),
9221
+ /**
9222
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
9223
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
9224
+ * never persisted, never a filesystem walk.
9225
+ *
9226
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
9227
+ * location yet — nobody stores here, the owning addon is down, or the first
9228
+ * refresh has not completed. A UI must omit the segment rather than draw it
9229
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
9230
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
9231
+ * be spelled out loud instead of appearing by accident.
9232
+ *
9233
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
9234
+ * about the whole figure rather than about its freshest part.
9235
+ */
9236
+ owned: object({
9237
+ bytes: number().int().nonnegative(),
9238
+ measuredAtMs: number().int().nonnegative()
9239
+ }).optional(),
9281
9240
  createdAt: number(),
9282
9241
  updatedAt: number()
9283
9242
  });
9243
+ object({ isDefault: boolean().optional() });
9244
+ /**
9245
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
9246
+ *
9247
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
9248
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
9249
+ * drain with no observed growth has no honest ETA, and inventing one is how an
9250
+ * operator learns not to believe the screen.
9251
+ */
9252
+ var StorageDrainProgressSchema = object({
9253
+ locationId: string(),
9254
+ startedAtMs: number(),
9255
+ startBytes: number(),
9256
+ bytesRemaining: number(),
9257
+ drained: boolean(),
9258
+ estimatedEmptyAtMs: number().nullable()
9259
+ });
9284
9260
  /**
9285
9261
  * Reference accepted by consumer-facing `api.storage.*` calls.
9286
9262
  * Either:
9287
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
9263
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
9264
+ * (transitionally, the `<type>:default`-slugged row when several exist)
9288
9265
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
9289
9266
  *
9290
9267
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -9460,6 +9437,111 @@ var DecoderSessionConfigSchema = object({
9460
9437
  */
9461
9438
  debug: boolean().optional()
9462
9439
  });
9440
+ /**
9441
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
9442
+ * an addon declares its channels in.
9443
+ *
9444
+ * ## Two axes, deliberately separated
9445
+ *
9446
+ * - **DECLARATION** — which channels exist. Only the addon knows:
9447
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
9448
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
9449
+ * and rots silently. So a channel is declared where it is consulted, and the
9450
+ * `log-channels` capability enumerates the declarations.
9451
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
9452
+ * thing: the logging settings document on the `system` cap. Two authorities
9453
+ * over the values is the exact defect
9454
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
9455
+ * remove; re-introducing it from the cure side would be grotesque.
9456
+ *
9457
+ * Nothing in this file reads a clock, an env var or a store. The registry is
9458
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
9459
+ * the hot path with a value somebody actually read, and by
9460
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
9461
+ * never reaches here, so it can neither disarm an armed channel nor arm a
9462
+ * disarmed one (D49).
9463
+ *
9464
+ * ## The canonical call shape
9465
+ *
9466
+ * ```ts
9467
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
9468
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
9469
+ * }
9470
+ * ```
9471
+ *
9472
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
9473
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
9474
+ * object literal is never constructed because it lives inside the branch. It
9475
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
9476
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
9477
+ * destination floor (measured at 1.93 ns/call when off).
9478
+ *
9479
+ * ## Why a channel emits at `info`
9480
+ *
9481
+ * `loki-logging.addon.ts` pins the destination default at `info` and
9482
+ * `loki-destination.ts` drops everything below it, so a line emitted at
9483
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
9484
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
9485
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
9486
+ * emits at the channel's declared level, whose schema floor is `info`.
9487
+ */
9488
+ /**
9489
+ * The level a channel writes at once armed.
9490
+ *
9491
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
9492
+ * not leave the process for Loki, and the whole point of arming a channel is
9493
+ * to read it later.
9494
+ */
9495
+ var LogChannelLevelSchema = _enum([
9496
+ "info",
9497
+ "warn",
9498
+ "error"
9499
+ ]);
9500
+ /**
9501
+ * What an addon declares about one channel. No value, no state — a
9502
+ * declaration is inert.
9503
+ */
9504
+ var LogChannelDescriptorSchema = object({
9505
+ /**
9506
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
9507
+ * the addon's short name so an operator reading a channel list can tell who
9508
+ * owns it without a second lookup.
9509
+ */
9510
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
9511
+ /** One sentence: what the operator will SEE after arming it. */
9512
+ description: string().min(1),
9513
+ /** The level its lines are emitted at. Never below `info`. */
9514
+ defaultLevel: LogChannelLevelSchema,
9515
+ /**
9516
+ * Whether this channel can be narrowed to a camera.
9517
+ *
9518
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
9519
+ * consulted with the numeric device id, AND every line the channel admits
9520
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
9521
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
9522
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
9523
+ * the body is the only way to filter.
9524
+ *
9525
+ * A channel whose lines carry the device only in `meta` (or not at all) is
9526
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
9527
+ * the operator narrows to one camera, sees nothing, and concludes the code
9528
+ * path was never taken.
9529
+ */
9530
+ perDevice: boolean()
9531
+ });
9532
+ /**
9533
+ * An armed window over one channel, as the document hands it to a mirror.
9534
+ *
9535
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
9536
+ * expires by itself, which is the one failure a boolean cannot avoid.
9537
+ */
9538
+ var LogChannelWindowSchema = object({
9539
+ channel: string().min(1),
9540
+ /** Epoch ms the window closes at. */
9541
+ armedUntilMs: number(),
9542
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
9543
+ deviceIds: array(number().int()).readonly().nullable()
9544
+ });
9463
9545
  var MODEL_FORMATS = [
9464
9546
  "onnx",
9465
9547
  "coreml",
@@ -22186,7 +22268,7 @@ method(object({
22186
22268
  downloadId: string(),
22187
22269
  offset: number(),
22188
22270
  length: number()
22189
- }), _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({
22271
+ }), _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({
22190
22272
  createdAt: true,
22191
22273
  updatedAt: true
22192
22274
  }), StorageLocationSchema, {
@@ -22198,7 +22280,7 @@ method(object({
22198
22280
  }), _void(), {
22199
22281
  kind: "mutation",
22200
22282
  auth: "admin"
22201
- }), method(object({ id: string() }), object({
22283
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
22202
22284
  ok: boolean(),
22203
22285
  error: string().optional()
22204
22286
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -22268,6 +22350,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
22268
22350
  kind: "mutation",
22269
22351
  auth: "admin"
22270
22352
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22353
+ /**
22354
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22355
+ * location (D388).
22356
+ *
22357
+ * ## Why this is not `storage-evictable`
22358
+ *
22359
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22360
+ * not, in two ways that both matter and both bite hardest on the locations an
22361
+ * operator most wants a figure for:
22362
+ *
22363
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22364
+ * and `recordingsLow:default` deliberately share one root and evict as one
22365
+ * oldest-first pool, so both answer with the SAME combined total. As an
22366
+ * occupancy figure that double-counts the disk.
22367
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22368
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22369
+ * is retiring and staring at.
22370
+ *
22371
+ * So this is its own contract with its own quantity, and the quantity is
22372
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22373
+ * would ever be willing to delete it. A provider that can only answer
22374
+ * "evictable" must not register here — a number that silently means different
22375
+ * things per class is worse than no number.
22376
+ *
22377
+ * ## Absence is an answer
22378
+ *
22379
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22380
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22381
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22382
+ * consuming side has to be written out loud instead of appearing by accident.
22383
+ *
22384
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22385
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22386
+ */
22387
+ /** One provider's occupancy answer for one location. */
22388
+ var StorageOccupancyReportSchema = object({
22389
+ locationId: string(),
22390
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22391
+ * not net of what it is willing to delete. */
22392
+ ownedBytes: number().int().nonnegative(),
22393
+ /** When the provider last actually measured this. The orchestrator carries it
22394
+ * through so a UI can say how old the figure is instead of implying "now". */
22395
+ measuredAtMs: number().int().nonnegative()
22396
+ });
22397
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
22271
22398
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
22272
22399
  providerId: string().min(1),
22273
22400
  displayName: string().min(1),
@@ -23903,39 +24030,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23903
24030
  deviceId: number(),
23904
24031
  status: BatteryStatusSchema
23905
24032
  });
23906
- /**
23907
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23908
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23909
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23910
- * one Home Assistant projection.
23911
- */
23912
- var NetworkLinkStatusSchema = object({
23913
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23914
- type: _enum([
23915
- "wifi",
23916
- "ethernet",
23917
- "cellular",
23918
- "unknown"
23919
- ]),
23920
- /**
23921
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23922
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23923
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23924
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23925
- * SKIP a null rather than coerce it.
23926
- */
23927
- signalPercent: number().min(0).max(100).nullable(),
23928
- /** Raw received signal strength in dBm, when the firmware reports one. */
23929
- rssiDbm: number().optional(),
23930
- /** Network name of a wireless link, when the firmware reports it. */
23931
- ssid: string().optional(),
23932
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23933
- lastUpdated: number()
23934
- });
23935
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23936
- deviceId: number(),
23937
- status: NetworkLinkStatusSchema
23938
- });
23939
24033
  object({
23940
24034
  on: boolean(),
23941
24035
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -26289,6 +26383,236 @@ DeviceType.Camera, method(object({
26289
26383
  detection: NativeDetectionSchema
26290
26384
  });
26291
26385
  /**
26386
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26387
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26388
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26389
+ *
26390
+ * Why a NEW cap rather than overloading `ptz`:
26391
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26392
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26393
+ * The two are different physical models: PTZ is absolute-position + presets,
26394
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26395
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26396
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26397
+ * the reverse:
26398
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26399
+ * / `getOptions`), and
26400
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26401
+ * robot camera shows up in the existing PTZ control path without every
26402
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26403
+ * not here (see the addon design note):
26404
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26405
+ * ptz.stop() → navigation.stop()
26406
+ * ptz.goHome() → navigation.runAction('goHome')
26407
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26408
+ * ptz.goToPreset(id) → navigation.runAction(id)
26409
+ *
26410
+ * ## Continuous drive
26411
+ *
26412
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26413
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26414
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26415
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26416
+ * coalesce them. The UI owns the cadence.
26417
+ *
26418
+ * ## The action dictionary
26419
+ *
26420
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26421
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26422
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26423
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26424
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26425
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26426
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26427
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26428
+ *
26429
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26430
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26431
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26432
+ * every device handle. A future nodedreame publish adds a typed
26433
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26434
+ * provider can then swap the raw calls for the typed methods with no change to
26435
+ * THIS contract.
26436
+ */
26437
+ /**
26438
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26439
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26440
+ * halts it.
26441
+ *
26442
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26443
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26444
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26445
+ * vector by it (drivers without proportional drive ignore it).
26446
+ *
26447
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26448
+ * axis alone; an all-undefined nudge is a no-op.
26449
+ */
26450
+ var NavigationMoveCommandSchema = object({
26451
+ pan: number().min(-1).max(1).optional(),
26452
+ tilt: number().min(-1).max(1).optional(),
26453
+ speed: number().min(0).max(1).optional()
26454
+ });
26455
+ /**
26456
+ * The enumerated discrete actions a navigation-capable robot can perform via
26457
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26458
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26459
+ * `playSound` (see the `sound` dictionary entries).
26460
+ */
26461
+ var NavigationActionIdSchema = _enum([
26462
+ "goHome",
26463
+ "locate",
26464
+ "spotClean",
26465
+ "findPet",
26466
+ "personFollow",
26467
+ "stop",
26468
+ "startClean",
26469
+ "pauseClean",
26470
+ "dockWash",
26471
+ "autoEmpty",
26472
+ "flashOn",
26473
+ "flashOff"
26474
+ ]);
26475
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26476
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26477
+ /**
26478
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26479
+ * native panel and the PTZ mimic render as a button.
26480
+ *
26481
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26482
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26483
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26484
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26485
+ * - `label` — operator-facing English label.
26486
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26487
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26488
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26489
+ * flips it from config, never by editing code.
26490
+ */
26491
+ var NavigationActionEntrySchema = object({
26492
+ id: string(),
26493
+ kind: NavigationEntryKindSchema,
26494
+ label: string(),
26495
+ icon: string(),
26496
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26497
+ soundId: number().int().optional(),
26498
+ /** Per-device feature flag — render this entry only when true. */
26499
+ enabled: boolean()
26500
+ });
26501
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26502
+ var NavigationPointSchema = object({
26503
+ x: number(),
26504
+ y: number()
26505
+ });
26506
+ /**
26507
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26508
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26509
+ * that are turned on for THIS device. Data-driven: the provider derives these
26510
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26511
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26512
+ * that are not dictionary entries.
26513
+ *
26514
+ * - `move` / `stop` — the momentary drive joystick.
26515
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26516
+ * map-coordinate plumbing is wired.
26517
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26518
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26519
+ * - `light` — the on/off fill-light toggle (works anytime).
26520
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26521
+ * camera-service control; needs an active stream).
26522
+ */
26523
+ var NavigationFeaturesSchema = object({
26524
+ move: boolean(),
26525
+ stop: boolean(),
26526
+ goToPoint: boolean(),
26527
+ runAction: boolean(),
26528
+ playSound: boolean(),
26529
+ light: boolean(),
26530
+ lightMode: boolean()
26531
+ });
26532
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26533
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26534
+ /**
26535
+ * Live navigation state so the UI can reflect what the robot is doing:
26536
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26537
+ * - `following` — person/pet follow is currently armed.
26538
+ * - `flash` — the on-camera fill light is on.
26539
+ * - `lightMode` — auto vs manual fill-light mode.
26540
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26541
+ * `lightMode === 'manual'`.
26542
+ */
26543
+ var NavigationStatusSchema = object({
26544
+ mode: _enum([
26545
+ "idle",
26546
+ "cleaning",
26547
+ "spot",
26548
+ "following",
26549
+ "goto",
26550
+ "returning",
26551
+ "paused",
26552
+ "unknown"
26553
+ ]),
26554
+ following: boolean(),
26555
+ flash: boolean(),
26556
+ lightMode: NavigationLightModeSchema,
26557
+ lightLevel: number().min(40).max(100),
26558
+ /** Ms epoch when the slice was last updated. */
26559
+ lastChangedAt: number()
26560
+ });
26561
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26562
+ 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({
26563
+ deviceId: number(),
26564
+ actionId: NavigationActionIdSchema
26565
+ }), _void(), { kind: "mutation" }), method(object({
26566
+ deviceId: number(),
26567
+ soundId: number().int()
26568
+ }), _void(), { kind: "mutation" }), method(object({
26569
+ deviceId: number(),
26570
+ on: boolean()
26571
+ }), _void(), { kind: "mutation" }), method(object({
26572
+ deviceId: number(),
26573
+ mode: NavigationLightModeSchema,
26574
+ level: number().min(40).max(100).optional()
26575
+ }), _void(), { kind: "mutation" }), method(object({
26576
+ deviceId: number(),
26577
+ level: number().min(40).max(100)
26578
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26579
+ deviceId: number(),
26580
+ status: NavigationStatusSchema
26581
+ });
26582
+ /**
26583
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26584
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26585
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26586
+ * one Home Assistant projection.
26587
+ */
26588
+ var NetworkLinkStatusSchema = object({
26589
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26590
+ type: _enum([
26591
+ "wifi",
26592
+ "ethernet",
26593
+ "cellular",
26594
+ "unknown"
26595
+ ]),
26596
+ /**
26597
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26598
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26599
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26600
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26601
+ * SKIP a null rather than coerce it.
26602
+ */
26603
+ signalPercent: number().min(0).max(100).nullable(),
26604
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26605
+ rssiDbm: number().optional(),
26606
+ /** Network name of a wireless link, when the firmware reports it. */
26607
+ ssid: string().optional(),
26608
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26609
+ lastUpdated: number()
26610
+ });
26611
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26612
+ deviceId: number(),
26613
+ status: NetworkLinkStatusSchema
26614
+ });
26615
+ /**
26292
26616
  * network-quality — system-scoped singleton capability tracking RTT,
26293
26617
  * jitter, and observed/peak bandwidth per device + per client.
26294
26618
  *
@@ -27530,203 +27854,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27530
27854
  deviceId: number(),
27531
27855
  status: PtzAutotrackStatusSchema
27532
27856
  });
27533
- /**
27534
- * `navigation` — a device-scoped capability that natively expresses the FULL
27535
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27536
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27537
- *
27538
- * Why a NEW cap rather than overloading `ptz`:
27539
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27540
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27541
- * The two are different physical models: PTZ is absolute-position + presets,
27542
- * navigation is momentary drive nudges + discrete robot ACTIONS
27543
- * (dock / spot-clean / follow-pet / go-to-point / …).
27544
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27545
- * the reverse:
27546
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27547
- * / `getOptions`), and
27548
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27549
- * robot camera shows up in the existing PTZ control path without every
27550
- * PTZ provider learning about robots. The mapping lives in the adapter,
27551
- * not here (see the addon design note):
27552
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27553
- * ptz.stop() → navigation.stop()
27554
- * ptz.goHome() → navigation.runAction('goHome')
27555
- * ptz.getPresets() → navigation.listActions() (id→preset)
27556
- * ptz.goToPreset(id) → navigation.runAction(id)
27557
- *
27558
- * ## Continuous drive
27559
- *
27560
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27561
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27562
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27563
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27564
- * coalesce them. The UI owns the cadence.
27565
- *
27566
- * ## The action dictionary
27567
- *
27568
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27569
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27570
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27571
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27572
- * vendor-specific list. `kind: 'action'` entries are triggered with
27573
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27574
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27575
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27576
- *
27577
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27578
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27579
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27580
- * every device handle. A future nodedreame publish adds a typed
27581
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27582
- * provider can then swap the raw calls for the typed methods with no change to
27583
- * THIS contract.
27584
- */
27585
- /**
27586
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27587
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27588
- * halts it.
27589
- *
27590
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27591
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27592
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27593
- * vector by it (drivers without proportional drive ignore it).
27594
- *
27595
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27596
- * axis alone; an all-undefined nudge is a no-op.
27597
- */
27598
- var NavigationMoveCommandSchema = object({
27599
- pan: number().min(-1).max(1).optional(),
27600
- tilt: number().min(-1).max(1).optional(),
27601
- speed: number().min(0).max(1).optional()
27602
- });
27603
- /**
27604
- * The enumerated discrete actions a navigation-capable robot can perform via
27605
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27606
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27607
- * `playSound` (see the `sound` dictionary entries).
27608
- */
27609
- var NavigationActionIdSchema = _enum([
27610
- "goHome",
27611
- "locate",
27612
- "spotClean",
27613
- "findPet",
27614
- "personFollow",
27615
- "stop",
27616
- "startClean",
27617
- "pauseClean",
27618
- "dockWash",
27619
- "autoEmpty",
27620
- "flashOn",
27621
- "flashOff"
27622
- ]);
27623
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27624
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27625
- /**
27626
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27627
- * native panel and the PTZ mimic render as a button.
27628
- *
27629
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27630
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27631
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27632
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27633
- * - `label` — operator-facing English label.
27634
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27635
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27636
- * PTZ render ONLY enabled entries. Data-driven: the provider
27637
- * flips it from config, never by editing code.
27638
- */
27639
- var NavigationActionEntrySchema = object({
27640
- id: string(),
27641
- kind: NavigationEntryKindSchema,
27642
- label: string(),
27643
- icon: string(),
27644
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27645
- soundId: number().int().optional(),
27646
- /** Per-device feature flag — render this entry only when true. */
27647
- enabled: boolean()
27648
- });
27649
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27650
- var NavigationPointSchema = object({
27651
- x: number(),
27652
- y: number()
27653
- });
27654
- /**
27655
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27656
- * The cap reports which are enabled so the UI / PTZ render only the controls
27657
- * that are turned on for THIS device. Data-driven: the provider derives these
27658
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27659
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27660
- * that are not dictionary entries.
27661
- *
27662
- * - `move` / `stop` — the momentary drive joystick.
27663
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27664
- * map-coordinate plumbing is wired.
27665
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27666
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27667
- * - `light` — the on/off fill-light toggle (works anytime).
27668
- * - `lightMode` — the auto/manual selector + manual level slider (a
27669
- * camera-service control; needs an active stream).
27670
- */
27671
- var NavigationFeaturesSchema = object({
27672
- move: boolean(),
27673
- stop: boolean(),
27674
- goToPoint: boolean(),
27675
- runAction: boolean(),
27676
- playSound: boolean(),
27677
- light: boolean(),
27678
- lightMode: boolean()
27679
- });
27680
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27681
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27682
- /**
27683
- * Live navigation state so the UI can reflect what the robot is doing:
27684
- * - `mode` — coarse activity (idle / cleaning / following / …).
27685
- * - `following` — person/pet follow is currently armed.
27686
- * - `flash` — the on-camera fill light is on.
27687
- * - `lightMode` — auto vs manual fill-light mode.
27688
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27689
- * `lightMode === 'manual'`.
27690
- */
27691
- var NavigationStatusSchema = object({
27692
- mode: _enum([
27693
- "idle",
27694
- "cleaning",
27695
- "spot",
27696
- "following",
27697
- "goto",
27698
- "returning",
27699
- "paused",
27700
- "unknown"
27701
- ]),
27702
- following: boolean(),
27703
- flash: boolean(),
27704
- lightMode: NavigationLightModeSchema,
27705
- lightLevel: number().min(40).max(100),
27706
- /** Ms epoch when the slice was last updated. */
27707
- lastChangedAt: number()
27708
- });
27709
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27710
- 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({
27711
- deviceId: number(),
27712
- actionId: NavigationActionIdSchema
27713
- }), _void(), { kind: "mutation" }), method(object({
27714
- deviceId: number(),
27715
- soundId: number().int()
27716
- }), _void(), { kind: "mutation" }), method(object({
27717
- deviceId: number(),
27718
- on: boolean()
27719
- }), _void(), { kind: "mutation" }), method(object({
27720
- deviceId: number(),
27721
- mode: NavigationLightModeSchema,
27722
- level: number().min(40).max(100).optional()
27723
- }), _void(), { kind: "mutation" }), method(object({
27724
- deviceId: number(),
27725
- level: number().min(40).max(100)
27726
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27727
- deviceId: number(),
27728
- status: NavigationStatusSchema
27729
- });
27730
27857
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27731
27858
  kind: "mutation",
27732
27859
  auth: "admin"
@@ -35035,13 +35162,13 @@ Object.freeze({
35035
35162
  addonId: null,
35036
35163
  access: "view"
35037
35164
  },
35038
- "storage.getDefaultLocation": {
35165
+ "storage.list": {
35039
35166
  capName: "storage",
35040
35167
  capScope: "system",
35041
35168
  addonId: null,
35042
35169
  access: "view"
35043
35170
  },
35044
- "storage.list": {
35171
+ "storage.listDrainProgress": {
35045
35172
  capName: "storage",
35046
35173
  capScope: "system",
35047
35174
  addonId: null,
@@ -35191,6 +35318,12 @@ Object.freeze({
35191
35318
  addonId: null,
35192
35319
  access: "view"
35193
35320
  },
35321
+ "storageOccupancy.getOccupancy": {
35322
+ capName: "storage-occupancy",
35323
+ capScope: "system",
35324
+ addonId: null,
35325
+ access: "view"
35326
+ },
35194
35327
  "storageProvider.abortUpload": {
35195
35328
  capName: "storage-provider",
35196
35329
  capScope: "system",