@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
@@ -502,7 +502,7 @@ async function importScryptedCatalogModel(input, deps) {
502
502
  }
503
503
  }
504
504
  //#endregion
505
- //#region ../types/dist/event-category-zAv7pMUz.mjs
505
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
506
506
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
507
507
  EventCategory["SystemBoot"] = "system.boot";
508
508
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -697,6 +697,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
697
697
  EventCategory["ProcessCrashed"] = "process.crashed";
698
698
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
699
699
  EventCategory["ProcessRestarted"] = "process.restarted";
700
+ /**
701
+ * The SET of storage locations changed — one was created, edited, enabled,
702
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
703
+ *
704
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
705
+ * it must also converge on its own periodic path, because a dropped event
706
+ * must not leave a node writing to yesterday's disk set forever. It exists
707
+ * because there was NO signal at all — an operator who added a second
708
+ * recordings disk in the admin UI got nothing, and the recorder kept its
709
+ * resolved locations until something else happened to re-resolve them
710
+ * (D387). Payload `StorageLocationsChangedPayload`.
711
+ */
712
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
700
713
  EventCategory["RecordingStarted"] = "recording.started";
701
714
  EventCategory["RecordingStopped"] = "recording.stopped";
702
715
  EventCategory["RecordingError"] = "recording.error";
@@ -8161,111 +8174,6 @@ var CameraSwitchGroupSchema = object({
8161
8174
  fetchedAt: number()
8162
8175
  });
8163
8176
  /**
8164
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
8165
- * an addon declares its channels in.
8166
- *
8167
- * ## Two axes, deliberately separated
8168
- *
8169
- * - **DECLARATION** — which channels exist. Only the addon knows:
8170
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
8171
- * baichuan/handshake. A hand-wired central list rots at the first addition,
8172
- * and rots silently. So a channel is declared where it is consulted, and the
8173
- * `log-channels` capability enumerates the declarations.
8174
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
8175
- * thing: the logging settings document on the `system` cap. Two authorities
8176
- * over the values is the exact defect
8177
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
8178
- * remove; re-introducing it from the cure side would be grotesque.
8179
- *
8180
- * Nothing in this file reads a clock, an env var or a store. The registry is
8181
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
8182
- * the hot path with a value somebody actually read, and by
8183
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
8184
- * never reaches here, so it can neither disarm an armed channel nor arm a
8185
- * disarmed one (D49).
8186
- *
8187
- * ## The canonical call shape
8188
- *
8189
- * ```ts
8190
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
8191
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
8192
- * }
8193
- * ```
8194
- *
8195
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
8196
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
8197
- * object literal is never constructed because it lives inside the branch. It
8198
- * is the same shape already proven in production at `stream-broker.ts:1650`,
8199
- * and the same discipline `LoggingGate.allowsDestination` uses for the
8200
- * destination floor (measured at 1.93 ns/call when off).
8201
- *
8202
- * ## Why a channel emits at `info`
8203
- *
8204
- * `loki-logging.addon.ts` pins the destination default at `info` and
8205
- * `loki-destination.ts` drops everything below it, so a line emitted at
8206
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
8207
- * minutes. A diagnostic that cannot be read an hour later is worse than no
8208
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
8209
- * emits at the channel's declared level, whose schema floor is `info`.
8210
- */
8211
- /**
8212
- * The level a channel writes at once armed.
8213
- *
8214
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
8215
- * not leave the process for Loki, and the whole point of arming a channel is
8216
- * to read it later.
8217
- */
8218
- var LogChannelLevelSchema = _enum([
8219
- "info",
8220
- "warn",
8221
- "error"
8222
- ]);
8223
- /**
8224
- * What an addon declares about one channel. No value, no state — a
8225
- * declaration is inert.
8226
- */
8227
- var LogChannelDescriptorSchema = object({
8228
- /**
8229
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
8230
- * the addon's short name so an operator reading a channel list can tell who
8231
- * owns it without a second lookup.
8232
- */
8233
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
8234
- /** One sentence: what the operator will SEE after arming it. */
8235
- description: string().min(1),
8236
- /** The level its lines are emitted at. Never below `info`. */
8237
- defaultLevel: LogChannelLevelSchema,
8238
- /**
8239
- * Whether this channel can be narrowed to a camera.
8240
- *
8241
- * `true` is a PROMISE with two halves, and both must hold: the gate is
8242
- * consulted with the numeric device id, AND every line the channel admits
8243
- * carries `tags: { deviceId }` with that same numeric id. The second half is
8244
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
8245
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
8246
- * the body is the only way to filter.
8247
- *
8248
- * A channel whose lines carry the device only in `meta` (or not at all) is
8249
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
8250
- * the operator narrows to one camera, sees nothing, and concludes the code
8251
- * path was never taken.
8252
- */
8253
- perDevice: boolean()
8254
- });
8255
- /**
8256
- * An armed window over one channel, as the document hands it to a mirror.
8257
- *
8258
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
8259
- * expires by itself, which is the one failure a boolean cannot avoid.
8260
- */
8261
- var LogChannelWindowSchema = object({
8262
- channel: string().min(1),
8263
- /** Epoch ms the window closes at. */
8264
- armedUntilMs: number(),
8265
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
8266
- deviceIds: array(number().int()).readonly().nullable()
8267
- });
8268
- /**
8269
8177
  * Ops-log — the durable, append-only operations audit shared by the
8270
8178
  * recordings and events management surfaces.
8271
8179
  *
@@ -9187,6 +9095,21 @@ var StorageCleanupJobSchema = object({
9187
9095
  });
9188
9096
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
9189
9097
  /**
9098
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
9099
+ * alias below is `z.infer<>` of it, never a second spelling.
9100
+ */
9101
+ var StorageLocationModeSchema = _enum([
9102
+ "active",
9103
+ "readonly",
9104
+ "drain",
9105
+ "disabled"
9106
+ ]);
9107
+ _enum([
9108
+ "normal",
9109
+ "never",
9110
+ "drain"
9111
+ ]);
9112
+ /**
9190
9113
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
9191
9114
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
9192
9115
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -9211,8 +9134,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
9211
9134
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
9212
9135
  *
9213
9136
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
9214
- * The default location for a type uses `id === <type>:default` by
9215
- * convention (the bare type ref like `'backups'` resolves to it).
9137
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
9138
+ * There is no default location any more (D383): `enabled` is the whole write
9139
+ * model, and a bare type ref resolves to the sole location of the type, or —
9140
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
9141
+ * slug is `default`.
9216
9142
  *
9217
9143
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
9218
9144
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -9233,23 +9159,37 @@ var StorageLocationSchema = object({
9233
9159
  * flag at upsert time, not here (the schema is provider-agnostic).
9234
9160
  */
9235
9161
  nodeId: string().optional(),
9236
- isDefault: boolean().default(false),
9237
9162
  isSystem: boolean().default(false),
9238
9163
  /**
9239
- * Operator opt-in: whether consumers that BALANCE across several locations
9240
- * of a type may write here. Recordings reads it today; event media and
9241
- * backups are the next consumers, which is why the flag lives on the
9242
- * location rather than in any one addon's store nothing has to be
9243
- * extended to add the next consumer.
9164
+ * THE write switch, and the only one (D383). `enabled: true` means every
9165
+ * consumer that chooses a write target for this type may write here, and all
9166
+ * enabled locations of a type are used TOGETHER; `false` means read-only
9167
+ * still read, still played back, still age-swept, still drained, never
9168
+ * written.
9244
9169
  *
9245
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
9246
- * flag existed reads back with no flag and keeps working exactly as before;
9247
- * that is the whole compat story, and it is why no migration ships with it.
9248
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
9249
- * disk must not silently start writing to it); the default of a type is
9250
- * always stamped `true`.
9170
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
9171
+ * stored" on an update and "born inert unless it is the first location of its
9172
+ * type" on a create. On a PERSISTED row absence is legacy and it means
9173
+ * enabled {@link isLocationEnabled} is the one place that says so, and the
9174
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
9175
+ * stops existing rather than being re-derived on every read.
9251
9176
  */
9252
9177
  enabled: boolean().optional(),
9178
+ /**
9179
+ * THE state of this location (D385), and the only authority on what may be
9180
+ * written, read or evicted here. Interpreted in exactly one place —
9181
+ * `storage-location-mode.ts` — which also folds the legacy
9182
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
9183
+ * ambiguous.
9184
+ *
9185
+ * OPTIONAL only for the wire and for rows written before D385: absence is
9186
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
9187
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
9188
+ * re-derived on every read. `enabled` survives one release as a DERIVED
9189
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
9190
+ * either, so the two cannot disagree.
9191
+ */
9192
+ mode: StorageLocationModeSchema.optional(),
9253
9193
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
9254
9194
  * for node-local locations it can reach) — never persisted, absent when the
9255
9195
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -9257,13 +9197,50 @@ var StorageLocationSchema = object({
9257
9197
  totalBytes: number(),
9258
9198
  availableBytes: number()
9259
9199
  }).nullable().optional(),
9200
+ /**
9201
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
9202
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
9203
+ * never persisted, never a filesystem walk.
9204
+ *
9205
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
9206
+ * location yet — nobody stores here, the owning addon is down, or the first
9207
+ * refresh has not completed. A UI must omit the segment rather than draw it
9208
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
9209
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
9210
+ * be spelled out loud instead of appearing by accident.
9211
+ *
9212
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
9213
+ * about the whole figure rather than about its freshest part.
9214
+ */
9215
+ owned: object({
9216
+ bytes: number().int().nonnegative(),
9217
+ measuredAtMs: number().int().nonnegative()
9218
+ }).optional(),
9260
9219
  createdAt: number(),
9261
9220
  updatedAt: number()
9262
9221
  });
9222
+ object({ isDefault: boolean().optional() });
9223
+ /**
9224
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
9225
+ *
9226
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
9227
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
9228
+ * drain with no observed growth has no honest ETA, and inventing one is how an
9229
+ * operator learns not to believe the screen.
9230
+ */
9231
+ var StorageDrainProgressSchema = object({
9232
+ locationId: string(),
9233
+ startedAtMs: number(),
9234
+ startBytes: number(),
9235
+ bytesRemaining: number(),
9236
+ drained: boolean(),
9237
+ estimatedEmptyAtMs: number().nullable()
9238
+ });
9263
9239
  /**
9264
9240
  * Reference accepted by consumer-facing `api.storage.*` calls.
9265
9241
  * Either:
9266
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
9242
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
9243
+ * (transitionally, the `<type>:default`-slugged row when several exist)
9267
9244
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
9268
9245
  *
9269
9246
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -9439,6 +9416,111 @@ var DecoderSessionConfigSchema = object({
9439
9416
  */
9440
9417
  debug: boolean().optional()
9441
9418
  });
9419
+ /**
9420
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
9421
+ * an addon declares its channels in.
9422
+ *
9423
+ * ## Two axes, deliberately separated
9424
+ *
9425
+ * - **DECLARATION** — which channels exist. Only the addon knows:
9426
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
9427
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
9428
+ * and rots silently. So a channel is declared where it is consulted, and the
9429
+ * `log-channels` capability enumerates the declarations.
9430
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
9431
+ * thing: the logging settings document on the `system` cap. Two authorities
9432
+ * over the values is the exact defect
9433
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
9434
+ * remove; re-introducing it from the cure side would be grotesque.
9435
+ *
9436
+ * Nothing in this file reads a clock, an env var or a store. The registry is
9437
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
9438
+ * the hot path with a value somebody actually read, and by
9439
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
9440
+ * never reaches here, so it can neither disarm an armed channel nor arm a
9441
+ * disarmed one (D49).
9442
+ *
9443
+ * ## The canonical call shape
9444
+ *
9445
+ * ```ts
9446
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
9447
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
9448
+ * }
9449
+ * ```
9450
+ *
9451
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
9452
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
9453
+ * object literal is never constructed because it lives inside the branch. It
9454
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
9455
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
9456
+ * destination floor (measured at 1.93 ns/call when off).
9457
+ *
9458
+ * ## Why a channel emits at `info`
9459
+ *
9460
+ * `loki-logging.addon.ts` pins the destination default at `info` and
9461
+ * `loki-destination.ts` drops everything below it, so a line emitted at
9462
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
9463
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
9464
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
9465
+ * emits at the channel's declared level, whose schema floor is `info`.
9466
+ */
9467
+ /**
9468
+ * The level a channel writes at once armed.
9469
+ *
9470
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
9471
+ * not leave the process for Loki, and the whole point of arming a channel is
9472
+ * to read it later.
9473
+ */
9474
+ var LogChannelLevelSchema = _enum([
9475
+ "info",
9476
+ "warn",
9477
+ "error"
9478
+ ]);
9479
+ /**
9480
+ * What an addon declares about one channel. No value, no state — a
9481
+ * declaration is inert.
9482
+ */
9483
+ var LogChannelDescriptorSchema = object({
9484
+ /**
9485
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
9486
+ * the addon's short name so an operator reading a channel list can tell who
9487
+ * owns it without a second lookup.
9488
+ */
9489
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
9490
+ /** One sentence: what the operator will SEE after arming it. */
9491
+ description: string().min(1),
9492
+ /** The level its lines are emitted at. Never below `info`. */
9493
+ defaultLevel: LogChannelLevelSchema,
9494
+ /**
9495
+ * Whether this channel can be narrowed to a camera.
9496
+ *
9497
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
9498
+ * consulted with the numeric device id, AND every line the channel admits
9499
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
9500
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
9501
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
9502
+ * the body is the only way to filter.
9503
+ *
9504
+ * A channel whose lines carry the device only in `meta` (or not at all) is
9505
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
9506
+ * the operator narrows to one camera, sees nothing, and concludes the code
9507
+ * path was never taken.
9508
+ */
9509
+ perDevice: boolean()
9510
+ });
9511
+ /**
9512
+ * An armed window over one channel, as the document hands it to a mirror.
9513
+ *
9514
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
9515
+ * expires by itself, which is the one failure a boolean cannot avoid.
9516
+ */
9517
+ var LogChannelWindowSchema = object({
9518
+ channel: string().min(1),
9519
+ /** Epoch ms the window closes at. */
9520
+ armedUntilMs: number(),
9521
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
9522
+ deviceIds: array(number().int()).readonly().nullable()
9523
+ });
9442
9524
  var MODEL_FORMATS = [
9443
9525
  "onnx",
9444
9526
  "coreml",
@@ -22165,7 +22247,7 @@ method(object({
22165
22247
  downloadId: string(),
22166
22248
  offset: number(),
22167
22249
  length: number()
22168
- }), _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({
22250
+ }), _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({
22169
22251
  createdAt: true,
22170
22252
  updatedAt: true
22171
22253
  }), StorageLocationSchema, {
@@ -22177,7 +22259,7 @@ method(object({
22177
22259
  }), _void(), {
22178
22260
  kind: "mutation",
22179
22261
  auth: "admin"
22180
- }), method(object({ id: string() }), object({
22262
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
22181
22263
  ok: boolean(),
22182
22264
  error: string().optional()
22183
22265
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -22247,6 +22329,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
22247
22329
  kind: "mutation",
22248
22330
  auth: "admin"
22249
22331
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22332
+ /**
22333
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22334
+ * location (D388).
22335
+ *
22336
+ * ## Why this is not `storage-evictable`
22337
+ *
22338
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22339
+ * not, in two ways that both matter and both bite hardest on the locations an
22340
+ * operator most wants a figure for:
22341
+ *
22342
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22343
+ * and `recordingsLow:default` deliberately share one root and evict as one
22344
+ * oldest-first pool, so both answer with the SAME combined total. As an
22345
+ * occupancy figure that double-counts the disk.
22346
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22347
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22348
+ * is retiring and staring at.
22349
+ *
22350
+ * So this is its own contract with its own quantity, and the quantity is
22351
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22352
+ * would ever be willing to delete it. A provider that can only answer
22353
+ * "evictable" must not register here — a number that silently means different
22354
+ * things per class is worse than no number.
22355
+ *
22356
+ * ## Absence is an answer
22357
+ *
22358
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22359
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22360
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22361
+ * consuming side has to be written out loud instead of appearing by accident.
22362
+ *
22363
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22364
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22365
+ */
22366
+ /** One provider's occupancy answer for one location. */
22367
+ var StorageOccupancyReportSchema = object({
22368
+ locationId: string(),
22369
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22370
+ * not net of what it is willing to delete. */
22371
+ ownedBytes: number().int().nonnegative(),
22372
+ /** When the provider last actually measured this. The orchestrator carries it
22373
+ * through so a UI can say how old the figure is instead of implying "now". */
22374
+ measuredAtMs: number().int().nonnegative()
22375
+ });
22376
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
22250
22377
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
22251
22378
  providerId: string().min(1),
22252
22379
  displayName: string().min(1),
@@ -23882,39 +24009,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23882
24009
  deviceId: number(),
23883
24010
  status: BatteryStatusSchema
23884
24011
  });
23885
- /**
23886
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23887
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23888
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23889
- * one Home Assistant projection.
23890
- */
23891
- var NetworkLinkStatusSchema = object({
23892
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23893
- type: _enum([
23894
- "wifi",
23895
- "ethernet",
23896
- "cellular",
23897
- "unknown"
23898
- ]),
23899
- /**
23900
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23901
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23902
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23903
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23904
- * SKIP a null rather than coerce it.
23905
- */
23906
- signalPercent: number().min(0).max(100).nullable(),
23907
- /** Raw received signal strength in dBm, when the firmware reports one. */
23908
- rssiDbm: number().optional(),
23909
- /** Network name of a wireless link, when the firmware reports it. */
23910
- ssid: string().optional(),
23911
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23912
- lastUpdated: number()
23913
- });
23914
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23915
- deviceId: number(),
23916
- status: NetworkLinkStatusSchema
23917
- });
23918
24012
  object({
23919
24013
  on: boolean(),
23920
24014
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -26268,6 +26362,236 @@ DeviceType.Camera, method(object({
26268
26362
  detection: NativeDetectionSchema
26269
26363
  });
26270
26364
  /**
26365
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26366
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26367
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26368
+ *
26369
+ * Why a NEW cap rather than overloading `ptz`:
26370
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26371
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26372
+ * The two are different physical models: PTZ is absolute-position + presets,
26373
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26374
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26375
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26376
+ * the reverse:
26377
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26378
+ * / `getOptions`), and
26379
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26380
+ * robot camera shows up in the existing PTZ control path without every
26381
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26382
+ * not here (see the addon design note):
26383
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26384
+ * ptz.stop() → navigation.stop()
26385
+ * ptz.goHome() → navigation.runAction('goHome')
26386
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26387
+ * ptz.goToPreset(id) → navigation.runAction(id)
26388
+ *
26389
+ * ## Continuous drive
26390
+ *
26391
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26392
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26393
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26394
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26395
+ * coalesce them. The UI owns the cadence.
26396
+ *
26397
+ * ## The action dictionary
26398
+ *
26399
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26400
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26401
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26402
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26403
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26404
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26405
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26406
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26407
+ *
26408
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26409
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26410
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26411
+ * every device handle. A future nodedreame publish adds a typed
26412
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26413
+ * provider can then swap the raw calls for the typed methods with no change to
26414
+ * THIS contract.
26415
+ */
26416
+ /**
26417
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26418
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26419
+ * halts it.
26420
+ *
26421
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26422
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26423
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26424
+ * vector by it (drivers without proportional drive ignore it).
26425
+ *
26426
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26427
+ * axis alone; an all-undefined nudge is a no-op.
26428
+ */
26429
+ var NavigationMoveCommandSchema = object({
26430
+ pan: number().min(-1).max(1).optional(),
26431
+ tilt: number().min(-1).max(1).optional(),
26432
+ speed: number().min(0).max(1).optional()
26433
+ });
26434
+ /**
26435
+ * The enumerated discrete actions a navigation-capable robot can perform via
26436
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26437
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26438
+ * `playSound` (see the `sound` dictionary entries).
26439
+ */
26440
+ var NavigationActionIdSchema = _enum([
26441
+ "goHome",
26442
+ "locate",
26443
+ "spotClean",
26444
+ "findPet",
26445
+ "personFollow",
26446
+ "stop",
26447
+ "startClean",
26448
+ "pauseClean",
26449
+ "dockWash",
26450
+ "autoEmpty",
26451
+ "flashOn",
26452
+ "flashOff"
26453
+ ]);
26454
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26455
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26456
+ /**
26457
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26458
+ * native panel and the PTZ mimic render as a button.
26459
+ *
26460
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26461
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26462
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26463
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26464
+ * - `label` — operator-facing English label.
26465
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26466
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26467
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26468
+ * flips it from config, never by editing code.
26469
+ */
26470
+ var NavigationActionEntrySchema = object({
26471
+ id: string(),
26472
+ kind: NavigationEntryKindSchema,
26473
+ label: string(),
26474
+ icon: string(),
26475
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26476
+ soundId: number().int().optional(),
26477
+ /** Per-device feature flag — render this entry only when true. */
26478
+ enabled: boolean()
26479
+ });
26480
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26481
+ var NavigationPointSchema = object({
26482
+ x: number(),
26483
+ y: number()
26484
+ });
26485
+ /**
26486
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26487
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26488
+ * that are turned on for THIS device. Data-driven: the provider derives these
26489
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26490
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26491
+ * that are not dictionary entries.
26492
+ *
26493
+ * - `move` / `stop` — the momentary drive joystick.
26494
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26495
+ * map-coordinate plumbing is wired.
26496
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26497
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26498
+ * - `light` — the on/off fill-light toggle (works anytime).
26499
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26500
+ * camera-service control; needs an active stream).
26501
+ */
26502
+ var NavigationFeaturesSchema = object({
26503
+ move: boolean(),
26504
+ stop: boolean(),
26505
+ goToPoint: boolean(),
26506
+ runAction: boolean(),
26507
+ playSound: boolean(),
26508
+ light: boolean(),
26509
+ lightMode: boolean()
26510
+ });
26511
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26512
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26513
+ /**
26514
+ * Live navigation state so the UI can reflect what the robot is doing:
26515
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26516
+ * - `following` — person/pet follow is currently armed.
26517
+ * - `flash` — the on-camera fill light is on.
26518
+ * - `lightMode` — auto vs manual fill-light mode.
26519
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26520
+ * `lightMode === 'manual'`.
26521
+ */
26522
+ var NavigationStatusSchema = object({
26523
+ mode: _enum([
26524
+ "idle",
26525
+ "cleaning",
26526
+ "spot",
26527
+ "following",
26528
+ "goto",
26529
+ "returning",
26530
+ "paused",
26531
+ "unknown"
26532
+ ]),
26533
+ following: boolean(),
26534
+ flash: boolean(),
26535
+ lightMode: NavigationLightModeSchema,
26536
+ lightLevel: number().min(40).max(100),
26537
+ /** Ms epoch when the slice was last updated. */
26538
+ lastChangedAt: number()
26539
+ });
26540
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26541
+ 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({
26542
+ deviceId: number(),
26543
+ actionId: NavigationActionIdSchema
26544
+ }), _void(), { kind: "mutation" }), method(object({
26545
+ deviceId: number(),
26546
+ soundId: number().int()
26547
+ }), _void(), { kind: "mutation" }), method(object({
26548
+ deviceId: number(),
26549
+ on: boolean()
26550
+ }), _void(), { kind: "mutation" }), method(object({
26551
+ deviceId: number(),
26552
+ mode: NavigationLightModeSchema,
26553
+ level: number().min(40).max(100).optional()
26554
+ }), _void(), { kind: "mutation" }), method(object({
26555
+ deviceId: number(),
26556
+ level: number().min(40).max(100)
26557
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26558
+ deviceId: number(),
26559
+ status: NavigationStatusSchema
26560
+ });
26561
+ /**
26562
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26563
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26564
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26565
+ * one Home Assistant projection.
26566
+ */
26567
+ var NetworkLinkStatusSchema = object({
26568
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26569
+ type: _enum([
26570
+ "wifi",
26571
+ "ethernet",
26572
+ "cellular",
26573
+ "unknown"
26574
+ ]),
26575
+ /**
26576
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26577
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26578
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26579
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26580
+ * SKIP a null rather than coerce it.
26581
+ */
26582
+ signalPercent: number().min(0).max(100).nullable(),
26583
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26584
+ rssiDbm: number().optional(),
26585
+ /** Network name of a wireless link, when the firmware reports it. */
26586
+ ssid: string().optional(),
26587
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26588
+ lastUpdated: number()
26589
+ });
26590
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26591
+ deviceId: number(),
26592
+ status: NetworkLinkStatusSchema
26593
+ });
26594
+ /**
26271
26595
  * network-quality — system-scoped singleton capability tracking RTT,
26272
26596
  * jitter, and observed/peak bandwidth per device + per client.
26273
26597
  *
@@ -27509,203 +27833,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27509
27833
  deviceId: number(),
27510
27834
  status: PtzAutotrackStatusSchema
27511
27835
  });
27512
- /**
27513
- * `navigation` — a device-scoped capability that natively expresses the FULL
27514
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27515
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27516
- *
27517
- * Why a NEW cap rather than overloading `ptz`:
27518
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27519
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27520
- * The two are different physical models: PTZ is absolute-position + presets,
27521
- * navigation is momentary drive nudges + discrete robot ACTIONS
27522
- * (dock / spot-clean / follow-pet / go-to-point / …).
27523
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27524
- * the reverse:
27525
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27526
- * / `getOptions`), and
27527
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27528
- * robot camera shows up in the existing PTZ control path without every
27529
- * PTZ provider learning about robots. The mapping lives in the adapter,
27530
- * not here (see the addon design note):
27531
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27532
- * ptz.stop() → navigation.stop()
27533
- * ptz.goHome() → navigation.runAction('goHome')
27534
- * ptz.getPresets() → navigation.listActions() (id→preset)
27535
- * ptz.goToPreset(id) → navigation.runAction(id)
27536
- *
27537
- * ## Continuous drive
27538
- *
27539
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27540
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27541
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27542
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27543
- * coalesce them. The UI owns the cadence.
27544
- *
27545
- * ## The action dictionary
27546
- *
27547
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27548
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27549
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27550
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27551
- * vendor-specific list. `kind: 'action'` entries are triggered with
27552
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27553
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27554
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27555
- *
27556
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27557
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27558
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27559
- * every device handle. A future nodedreame publish adds a typed
27560
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27561
- * provider can then swap the raw calls for the typed methods with no change to
27562
- * THIS contract.
27563
- */
27564
- /**
27565
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27566
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27567
- * halts it.
27568
- *
27569
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27570
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27571
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27572
- * vector by it (drivers without proportional drive ignore it).
27573
- *
27574
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27575
- * axis alone; an all-undefined nudge is a no-op.
27576
- */
27577
- var NavigationMoveCommandSchema = object({
27578
- pan: number().min(-1).max(1).optional(),
27579
- tilt: number().min(-1).max(1).optional(),
27580
- speed: number().min(0).max(1).optional()
27581
- });
27582
- /**
27583
- * The enumerated discrete actions a navigation-capable robot can perform via
27584
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27585
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27586
- * `playSound` (see the `sound` dictionary entries).
27587
- */
27588
- var NavigationActionIdSchema = _enum([
27589
- "goHome",
27590
- "locate",
27591
- "spotClean",
27592
- "findPet",
27593
- "personFollow",
27594
- "stop",
27595
- "startClean",
27596
- "pauseClean",
27597
- "dockWash",
27598
- "autoEmpty",
27599
- "flashOn",
27600
- "flashOff"
27601
- ]);
27602
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27603
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27604
- /**
27605
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27606
- * native panel and the PTZ mimic render as a button.
27607
- *
27608
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27609
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27610
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27611
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27612
- * - `label` — operator-facing English label.
27613
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27614
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27615
- * PTZ render ONLY enabled entries. Data-driven: the provider
27616
- * flips it from config, never by editing code.
27617
- */
27618
- var NavigationActionEntrySchema = object({
27619
- id: string(),
27620
- kind: NavigationEntryKindSchema,
27621
- label: string(),
27622
- icon: string(),
27623
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27624
- soundId: number().int().optional(),
27625
- /** Per-device feature flag — render this entry only when true. */
27626
- enabled: boolean()
27627
- });
27628
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27629
- var NavigationPointSchema = object({
27630
- x: number(),
27631
- y: number()
27632
- });
27633
- /**
27634
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27635
- * The cap reports which are enabled so the UI / PTZ render only the controls
27636
- * that are turned on for THIS device. Data-driven: the provider derives these
27637
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27638
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27639
- * that are not dictionary entries.
27640
- *
27641
- * - `move` / `stop` — the momentary drive joystick.
27642
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27643
- * map-coordinate plumbing is wired.
27644
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27645
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27646
- * - `light` — the on/off fill-light toggle (works anytime).
27647
- * - `lightMode` — the auto/manual selector + manual level slider (a
27648
- * camera-service control; needs an active stream).
27649
- */
27650
- var NavigationFeaturesSchema = object({
27651
- move: boolean(),
27652
- stop: boolean(),
27653
- goToPoint: boolean(),
27654
- runAction: boolean(),
27655
- playSound: boolean(),
27656
- light: boolean(),
27657
- lightMode: boolean()
27658
- });
27659
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27660
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27661
- /**
27662
- * Live navigation state so the UI can reflect what the robot is doing:
27663
- * - `mode` — coarse activity (idle / cleaning / following / …).
27664
- * - `following` — person/pet follow is currently armed.
27665
- * - `flash` — the on-camera fill light is on.
27666
- * - `lightMode` — auto vs manual fill-light mode.
27667
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27668
- * `lightMode === 'manual'`.
27669
- */
27670
- var NavigationStatusSchema = object({
27671
- mode: _enum([
27672
- "idle",
27673
- "cleaning",
27674
- "spot",
27675
- "following",
27676
- "goto",
27677
- "returning",
27678
- "paused",
27679
- "unknown"
27680
- ]),
27681
- following: boolean(),
27682
- flash: boolean(),
27683
- lightMode: NavigationLightModeSchema,
27684
- lightLevel: number().min(40).max(100),
27685
- /** Ms epoch when the slice was last updated. */
27686
- lastChangedAt: number()
27687
- });
27688
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27689
- 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({
27690
- deviceId: number(),
27691
- actionId: NavigationActionIdSchema
27692
- }), _void(), { kind: "mutation" }), method(object({
27693
- deviceId: number(),
27694
- soundId: number().int()
27695
- }), _void(), { kind: "mutation" }), method(object({
27696
- deviceId: number(),
27697
- on: boolean()
27698
- }), _void(), { kind: "mutation" }), method(object({
27699
- deviceId: number(),
27700
- mode: NavigationLightModeSchema,
27701
- level: number().min(40).max(100).optional()
27702
- }), _void(), { kind: "mutation" }), method(object({
27703
- deviceId: number(),
27704
- level: number().min(40).max(100)
27705
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27706
- deviceId: number(),
27707
- status: NavigationStatusSchema
27708
- });
27709
27836
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27710
27837
  kind: "mutation",
27711
27838
  auth: "admin"
@@ -35014,13 +35141,13 @@ Object.freeze({
35014
35141
  addonId: null,
35015
35142
  access: "view"
35016
35143
  },
35017
- "storage.getDefaultLocation": {
35144
+ "storage.list": {
35018
35145
  capName: "storage",
35019
35146
  capScope: "system",
35020
35147
  addonId: null,
35021
35148
  access: "view"
35022
35149
  },
35023
- "storage.list": {
35150
+ "storage.listDrainProgress": {
35024
35151
  capName: "storage",
35025
35152
  capScope: "system",
35026
35153
  addonId: null,
@@ -35170,6 +35297,12 @@ Object.freeze({
35170
35297
  addonId: null,
35171
35298
  access: "view"
35172
35299
  },
35300
+ "storageOccupancy.getOccupancy": {
35301
+ capName: "storage-occupancy",
35302
+ capScope: "system",
35303
+ addonId: null,
35304
+ access: "view"
35305
+ },
35173
35306
  "storageProvider.abortUpload": {
35174
35307
  capName: "storage-provider",
35175
35308
  capScope: "system",