@camstack/addon-ai 0.4.80 → 0.4.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +488 -355
  2. package/dist/addon.mjs +488 -355
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  }) : target, mod));
40
40
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
41
41
  //#endregion
42
- //#region ../types/dist/event-category-zAv7pMUz.mjs
42
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
43
43
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
44
44
  EventCategory["SystemBoot"] = "system.boot";
45
45
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -234,6 +234,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
234
234
  EventCategory["ProcessCrashed"] = "process.crashed";
235
235
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
236
236
  EventCategory["ProcessRestarted"] = "process.restarted";
237
+ /**
238
+ * The SET of storage locations changed — one was created, edited, enabled,
239
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
240
+ *
241
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
242
+ * it must also converge on its own periodic path, because a dropped event
243
+ * must not leave a node writing to yesterday's disk set forever. It exists
244
+ * because there was NO signal at all — an operator who added a second
245
+ * recordings disk in the admin UI got nothing, and the recorder kept its
246
+ * resolved locations until something else happened to re-resolve them
247
+ * (D387). Payload `StorageLocationsChangedPayload`.
248
+ */
249
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
237
250
  EventCategory["RecordingStarted"] = "recording.started";
238
251
  EventCategory["RecordingStopped"] = "recording.stopped";
239
252
  EventCategory["RecordingError"] = "recording.error";
@@ -7845,111 +7858,6 @@ var CameraSwitchGroupSchema = object({
7845
7858
  fetchedAt: number$1()
7846
7859
  });
7847
7860
  /**
7848
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7849
- * an addon declares its channels in.
7850
- *
7851
- * ## Two axes, deliberately separated
7852
- *
7853
- * - **DECLARATION** — which channels exist. Only the addon knows:
7854
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7855
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7856
- * and rots silently. So a channel is declared where it is consulted, and the
7857
- * `log-channels` capability enumerates the declarations.
7858
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7859
- * thing: the logging settings document on the `system` cap. Two authorities
7860
- * over the values is the exact defect
7861
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7862
- * remove; re-introducing it from the cure side would be grotesque.
7863
- *
7864
- * Nothing in this file reads a clock, an env var or a store. The registry is
7865
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7866
- * the hot path with a value somebody actually read, and by
7867
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7868
- * never reaches here, so it can neither disarm an armed channel nor arm a
7869
- * disarmed one (D49).
7870
- *
7871
- * ## The canonical call shape
7872
- *
7873
- * ```ts
7874
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7875
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7876
- * }
7877
- * ```
7878
- *
7879
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7880
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7881
- * object literal is never constructed because it lives inside the branch. It
7882
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7883
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7884
- * destination floor (measured at 1.93 ns/call when off).
7885
- *
7886
- * ## Why a channel emits at `info`
7887
- *
7888
- * `loki-logging.addon.ts` pins the destination default at `info` and
7889
- * `loki-destination.ts` drops everything below it, so a line emitted at
7890
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7891
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7892
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7893
- * emits at the channel's declared level, whose schema floor is `info`.
7894
- */
7895
- /**
7896
- * The level a channel writes at once armed.
7897
- *
7898
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7899
- * not leave the process for Loki, and the whole point of arming a channel is
7900
- * to read it later.
7901
- */
7902
- var LogChannelLevelSchema = _enum([
7903
- "info",
7904
- "warn",
7905
- "error"
7906
- ]);
7907
- /**
7908
- * What an addon declares about one channel. No value, no state — a
7909
- * declaration is inert.
7910
- */
7911
- var LogChannelDescriptorSchema = object({
7912
- /**
7913
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7914
- * the addon's short name so an operator reading a channel list can tell who
7915
- * owns it without a second lookup.
7916
- */
7917
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7918
- /** One sentence: what the operator will SEE after arming it. */
7919
- description: string().min(1),
7920
- /** The level its lines are emitted at. Never below `info`. */
7921
- defaultLevel: LogChannelLevelSchema,
7922
- /**
7923
- * Whether this channel can be narrowed to a camera.
7924
- *
7925
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7926
- * consulted with the numeric device id, AND every line the channel admits
7927
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7928
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7929
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7930
- * the body is the only way to filter.
7931
- *
7932
- * A channel whose lines carry the device only in `meta` (or not at all) is
7933
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7934
- * the operator narrows to one camera, sees nothing, and concludes the code
7935
- * path was never taken.
7936
- */
7937
- perDevice: boolean()
7938
- });
7939
- /**
7940
- * An armed window over one channel, as the document hands it to a mirror.
7941
- *
7942
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7943
- * expires by itself, which is the one failure a boolean cannot avoid.
7944
- */
7945
- var LogChannelWindowSchema = object({
7946
- channel: string().min(1),
7947
- /** Epoch ms the window closes at. */
7948
- armedUntilMs: number$1(),
7949
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7950
- deviceIds: array(number$1().int()).readonly().nullable()
7951
- });
7952
- /**
7953
7861
  * Ops-log — the durable, append-only operations audit shared by the
7954
7862
  * recordings and events management surfaces.
7955
7863
  *
@@ -8871,6 +8779,21 @@ var StorageCleanupJobSchema = object({
8871
8779
  });
8872
8780
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8873
8781
  /**
8782
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8783
+ * alias below is `z.infer<>` of it, never a second spelling.
8784
+ */
8785
+ var StorageLocationModeSchema = _enum([
8786
+ "active",
8787
+ "readonly",
8788
+ "drain",
8789
+ "disabled"
8790
+ ]);
8791
+ _enum([
8792
+ "normal",
8793
+ "never",
8794
+ "drain"
8795
+ ]);
8796
+ /**
8874
8797
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8875
8798
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8876
8799
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8895,8 +8818,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8895
8818
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8896
8819
  *
8897
8820
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8898
- * The default location for a type uses `id === <type>:default` by
8899
- * convention (the bare type ref like `'backups'` resolves to it).
8821
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8822
+ * There is no default location any more (D383): `enabled` is the whole write
8823
+ * model, and a bare type ref resolves to the sole location of the type, or —
8824
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8825
+ * slug is `default`.
8900
8826
  *
8901
8827
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8902
8828
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8917,23 +8843,37 @@ var StorageLocationSchema = object({
8917
8843
  * flag at upsert time, not here (the schema is provider-agnostic).
8918
8844
  */
8919
8845
  nodeId: string().optional(),
8920
- isDefault: boolean().default(false),
8921
8846
  isSystem: boolean().default(false),
8922
8847
  /**
8923
- * Operator opt-in: whether consumers that BALANCE across several locations
8924
- * of a type may write here. Recordings reads it today; event media and
8925
- * backups are the next consumers, which is why the flag lives on the
8926
- * location rather than in any one addon's store — nothing has to be
8927
- * extended to add the next consumer.
8848
+ * THE write switch, and the only one (D383). `enabled: true` means every
8849
+ * consumer that chooses a write target for this type may write here, and all
8850
+ * enabled locations of a type are used TOGETHER; `false` means read-only —
8851
+ * still read, still played back, still age-swept, still drained, never
8852
+ * written.
8928
8853
  *
8929
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8930
- * flag existed reads back with no flag and keeps working exactly as before;
8931
- * that is the whole compat story, and it is why no migration ships with it.
8932
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8933
- * disk must not silently start writing to it); the default of a type is
8934
- * always stamped `true`.
8854
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8855
+ * stored" on an update and "born inert unless it is the first location of its
8856
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8857
+ * enabled — {@link isLocationEnabled} is the one place that says so, and the
8858
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8859
+ * stops existing rather than being re-derived on every read.
8935
8860
  */
8936
8861
  enabled: boolean().optional(),
8862
+ /**
8863
+ * THE state of this location (D385), and the only authority on what may be
8864
+ * written, read or evicted here. Interpreted in exactly one place —
8865
+ * `storage-location-mode.ts` — which also folds the legacy
8866
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8867
+ * ambiguous.
8868
+ *
8869
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8870
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8871
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8872
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8873
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8874
+ * either, so the two cannot disagree.
8875
+ */
8876
+ mode: StorageLocationModeSchema.optional(),
8937
8877
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8938
8878
  * for node-local locations it can reach) — never persisted, absent when the
8939
8879
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8941,13 +8881,50 @@ var StorageLocationSchema = object({
8941
8881
  totalBytes: number$1(),
8942
8882
  availableBytes: number$1()
8943
8883
  }).nullable().optional(),
8884
+ /**
8885
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8886
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8887
+ * never persisted, never a filesystem walk.
8888
+ *
8889
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8890
+ * location yet — nobody stores here, the owning addon is down, or the first
8891
+ * refresh has not completed. A UI must omit the segment rather than draw it
8892
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8893
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8894
+ * be spelled out loud instead of appearing by accident.
8895
+ *
8896
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8897
+ * about the whole figure rather than about its freshest part.
8898
+ */
8899
+ owned: object({
8900
+ bytes: number$1().int().nonnegative(),
8901
+ measuredAtMs: number$1().int().nonnegative()
8902
+ }).optional(),
8944
8903
  createdAt: number$1(),
8945
8904
  updatedAt: number$1()
8946
8905
  });
8906
+ object({ isDefault: boolean().optional() });
8907
+ /**
8908
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8909
+ *
8910
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8911
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8912
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8913
+ * operator learns not to believe the screen.
8914
+ */
8915
+ var StorageDrainProgressSchema = object({
8916
+ locationId: string(),
8917
+ startedAtMs: number$1(),
8918
+ startBytes: number$1(),
8919
+ bytesRemaining: number$1(),
8920
+ drained: boolean(),
8921
+ estimatedEmptyAtMs: number$1().nullable()
8922
+ });
8947
8923
  /**
8948
8924
  * Reference accepted by consumer-facing `api.storage.*` calls.
8949
8925
  * Either:
8950
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
8926
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
8927
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8951
8928
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8952
8929
  *
8953
8930
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -9123,6 +9100,111 @@ var DecoderSessionConfigSchema = object({
9123
9100
  */
9124
9101
  debug: boolean().optional()
9125
9102
  });
9103
+ /**
9104
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
9105
+ * an addon declares its channels in.
9106
+ *
9107
+ * ## Two axes, deliberately separated
9108
+ *
9109
+ * - **DECLARATION** — which channels exist. Only the addon knows:
9110
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
9111
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
9112
+ * and rots silently. So a channel is declared where it is consulted, and the
9113
+ * `log-channels` capability enumerates the declarations.
9114
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
9115
+ * thing: the logging settings document on the `system` cap. Two authorities
9116
+ * over the values is the exact defect
9117
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
9118
+ * remove; re-introducing it from the cure side would be grotesque.
9119
+ *
9120
+ * Nothing in this file reads a clock, an env var or a store. The registry is
9121
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
9122
+ * the hot path with a value somebody actually read, and by
9123
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
9124
+ * never reaches here, so it can neither disarm an armed channel nor arm a
9125
+ * disarmed one (D49).
9126
+ *
9127
+ * ## The canonical call shape
9128
+ *
9129
+ * ```ts
9130
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
9131
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
9132
+ * }
9133
+ * ```
9134
+ *
9135
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
9136
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
9137
+ * object literal is never constructed because it lives inside the branch. It
9138
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
9139
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
9140
+ * destination floor (measured at 1.93 ns/call when off).
9141
+ *
9142
+ * ## Why a channel emits at `info`
9143
+ *
9144
+ * `loki-logging.addon.ts` pins the destination default at `info` and
9145
+ * `loki-destination.ts` drops everything below it, so a line emitted at
9146
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
9147
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
9148
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
9149
+ * emits at the channel's declared level, whose schema floor is `info`.
9150
+ */
9151
+ /**
9152
+ * The level a channel writes at once armed.
9153
+ *
9154
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
9155
+ * not leave the process for Loki, and the whole point of arming a channel is
9156
+ * to read it later.
9157
+ */
9158
+ var LogChannelLevelSchema = _enum([
9159
+ "info",
9160
+ "warn",
9161
+ "error"
9162
+ ]);
9163
+ /**
9164
+ * What an addon declares about one channel. No value, no state — a
9165
+ * declaration is inert.
9166
+ */
9167
+ var LogChannelDescriptorSchema = object({
9168
+ /**
9169
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
9170
+ * the addon's short name so an operator reading a channel list can tell who
9171
+ * owns it without a second lookup.
9172
+ */
9173
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
9174
+ /** One sentence: what the operator will SEE after arming it. */
9175
+ description: string().min(1),
9176
+ /** The level its lines are emitted at. Never below `info`. */
9177
+ defaultLevel: LogChannelLevelSchema,
9178
+ /**
9179
+ * Whether this channel can be narrowed to a camera.
9180
+ *
9181
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
9182
+ * consulted with the numeric device id, AND every line the channel admits
9183
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
9184
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
9185
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
9186
+ * the body is the only way to filter.
9187
+ *
9188
+ * A channel whose lines carry the device only in `meta` (or not at all) is
9189
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
9190
+ * the operator narrows to one camera, sees nothing, and concludes the code
9191
+ * path was never taken.
9192
+ */
9193
+ perDevice: boolean()
9194
+ });
9195
+ /**
9196
+ * An armed window over one channel, as the document hands it to a mirror.
9197
+ *
9198
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
9199
+ * expires by itself, which is the one failure a boolean cannot avoid.
9200
+ */
9201
+ var LogChannelWindowSchema = object({
9202
+ channel: string().min(1),
9203
+ /** Epoch ms the window closes at. */
9204
+ armedUntilMs: number$1(),
9205
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
9206
+ deviceIds: array(number$1().int()).readonly().nullable()
9207
+ });
9126
9208
  var MODEL_FORMATS = [
9127
9209
  "onnx",
9128
9210
  "coreml",
@@ -21881,7 +21963,7 @@ method(object({
21881
21963
  downloadId: string(),
21882
21964
  offset: number$1(),
21883
21965
  length: number$1()
21884
- }), _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({
21966
+ }), _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({
21885
21967
  createdAt: true,
21886
21968
  updatedAt: true
21887
21969
  }), StorageLocationSchema, {
@@ -21893,7 +21975,7 @@ method(object({
21893
21975
  }), _void(), {
21894
21976
  kind: "mutation",
21895
21977
  auth: "admin"
21896
- }), method(object({ id: string() }), object({
21978
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21897
21979
  ok: boolean(),
21898
21980
  error: string().optional()
21899
21981
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21963,6 +22045,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21963
22045
  kind: "mutation",
21964
22046
  auth: "admin"
21965
22047
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22048
+ /**
22049
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22050
+ * location (D388).
22051
+ *
22052
+ * ## Why this is not `storage-evictable`
22053
+ *
22054
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22055
+ * not, in two ways that both matter and both bite hardest on the locations an
22056
+ * operator most wants a figure for:
22057
+ *
22058
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22059
+ * and `recordingsLow:default` deliberately share one root and evict as one
22060
+ * oldest-first pool, so both answer with the SAME combined total. As an
22061
+ * occupancy figure that double-counts the disk.
22062
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22063
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22064
+ * is retiring and staring at.
22065
+ *
22066
+ * So this is its own contract with its own quantity, and the quantity is
22067
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22068
+ * would ever be willing to delete it. A provider that can only answer
22069
+ * "evictable" must not register here — a number that silently means different
22070
+ * things per class is worse than no number.
22071
+ *
22072
+ * ## Absence is an answer
22073
+ *
22074
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22075
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22076
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22077
+ * consuming side has to be written out loud instead of appearing by accident.
22078
+ *
22079
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22080
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22081
+ */
22082
+ /** One provider's occupancy answer for one location. */
22083
+ var StorageOccupancyReportSchema = object({
22084
+ locationId: string(),
22085
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22086
+ * not net of what it is willing to delete. */
22087
+ ownedBytes: number$1().int().nonnegative(),
22088
+ /** When the provider last actually measured this. The orchestrator carries it
22089
+ * through so a UI can say how old the figure is instead of implying "now". */
22090
+ measuredAtMs: number$1().int().nonnegative()
22091
+ });
22092
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21966
22093
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21967
22094
  providerId: string().min(1),
21968
22095
  displayName: string().min(1),
@@ -23598,39 +23725,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23598
23725
  deviceId: number$1(),
23599
23726
  status: BatteryStatusSchema
23600
23727
  });
23601
- /**
23602
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23603
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23604
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23605
- * one Home Assistant projection.
23606
- */
23607
- var NetworkLinkStatusSchema = object({
23608
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23609
- type: _enum([
23610
- "wifi",
23611
- "ethernet",
23612
- "cellular",
23613
- "unknown"
23614
- ]),
23615
- /**
23616
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23617
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23618
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23619
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23620
- * SKIP a null rather than coerce it.
23621
- */
23622
- signalPercent: number$1().min(0).max(100).nullable(),
23623
- /** Raw received signal strength in dBm, when the firmware reports one. */
23624
- rssiDbm: number$1().optional(),
23625
- /** Network name of a wireless link, when the firmware reports it. */
23626
- ssid: string().optional(),
23627
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23628
- lastUpdated: number$1()
23629
- });
23630
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23631
- deviceId: number$1(),
23632
- status: NetworkLinkStatusSchema
23633
- });
23634
23728
  object({
23635
23729
  on: boolean(),
23636
23730
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25984,6 +26078,236 @@ DeviceType.Camera, method(object({
25984
26078
  detection: NativeDetectionSchema
25985
26079
  });
25986
26080
  /**
26081
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26082
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26083
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26084
+ *
26085
+ * Why a NEW cap rather than overloading `ptz`:
26086
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26087
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26088
+ * The two are different physical models: PTZ is absolute-position + presets,
26089
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26090
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26091
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26092
+ * the reverse:
26093
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26094
+ * / `getOptions`), and
26095
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26096
+ * robot camera shows up in the existing PTZ control path without every
26097
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26098
+ * not here (see the addon design note):
26099
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26100
+ * ptz.stop() → navigation.stop()
26101
+ * ptz.goHome() → navigation.runAction('goHome')
26102
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26103
+ * ptz.goToPreset(id) → navigation.runAction(id)
26104
+ *
26105
+ * ## Continuous drive
26106
+ *
26107
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26108
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26109
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26110
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26111
+ * coalesce them. The UI owns the cadence.
26112
+ *
26113
+ * ## The action dictionary
26114
+ *
26115
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26116
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26117
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26118
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26119
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26120
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26121
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26122
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26123
+ *
26124
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26125
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26126
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26127
+ * every device handle. A future nodedreame publish adds a typed
26128
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26129
+ * provider can then swap the raw calls for the typed methods with no change to
26130
+ * THIS contract.
26131
+ */
26132
+ /**
26133
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26134
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26135
+ * halts it.
26136
+ *
26137
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26138
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26139
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26140
+ * vector by it (drivers without proportional drive ignore it).
26141
+ *
26142
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26143
+ * axis alone; an all-undefined nudge is a no-op.
26144
+ */
26145
+ var NavigationMoveCommandSchema = object({
26146
+ pan: number$1().min(-1).max(1).optional(),
26147
+ tilt: number$1().min(-1).max(1).optional(),
26148
+ speed: number$1().min(0).max(1).optional()
26149
+ });
26150
+ /**
26151
+ * The enumerated discrete actions a navigation-capable robot can perform via
26152
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26153
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26154
+ * `playSound` (see the `sound` dictionary entries).
26155
+ */
26156
+ var NavigationActionIdSchema = _enum([
26157
+ "goHome",
26158
+ "locate",
26159
+ "spotClean",
26160
+ "findPet",
26161
+ "personFollow",
26162
+ "stop",
26163
+ "startClean",
26164
+ "pauseClean",
26165
+ "dockWash",
26166
+ "autoEmpty",
26167
+ "flashOn",
26168
+ "flashOff"
26169
+ ]);
26170
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26171
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26172
+ /**
26173
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26174
+ * native panel and the PTZ mimic render as a button.
26175
+ *
26176
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26177
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26178
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26179
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26180
+ * - `label` — operator-facing English label.
26181
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26182
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26183
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26184
+ * flips it from config, never by editing code.
26185
+ */
26186
+ var NavigationActionEntrySchema = object({
26187
+ id: string(),
26188
+ kind: NavigationEntryKindSchema,
26189
+ label: string(),
26190
+ icon: string(),
26191
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26192
+ soundId: number$1().int().optional(),
26193
+ /** Per-device feature flag — render this entry only when true. */
26194
+ enabled: boolean()
26195
+ });
26196
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26197
+ var NavigationPointSchema = object({
26198
+ x: number$1(),
26199
+ y: number$1()
26200
+ });
26201
+ /**
26202
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26203
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26204
+ * that are turned on for THIS device. Data-driven: the provider derives these
26205
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26206
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26207
+ * that are not dictionary entries.
26208
+ *
26209
+ * - `move` / `stop` — the momentary drive joystick.
26210
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26211
+ * map-coordinate plumbing is wired.
26212
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26213
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26214
+ * - `light` — the on/off fill-light toggle (works anytime).
26215
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26216
+ * camera-service control; needs an active stream).
26217
+ */
26218
+ var NavigationFeaturesSchema = object({
26219
+ move: boolean(),
26220
+ stop: boolean(),
26221
+ goToPoint: boolean(),
26222
+ runAction: boolean(),
26223
+ playSound: boolean(),
26224
+ light: boolean(),
26225
+ lightMode: boolean()
26226
+ });
26227
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26228
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26229
+ /**
26230
+ * Live navigation state so the UI can reflect what the robot is doing:
26231
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26232
+ * - `following` — person/pet follow is currently armed.
26233
+ * - `flash` — the on-camera fill light is on.
26234
+ * - `lightMode` — auto vs manual fill-light mode.
26235
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26236
+ * `lightMode === 'manual'`.
26237
+ */
26238
+ var NavigationStatusSchema = object({
26239
+ mode: _enum([
26240
+ "idle",
26241
+ "cleaning",
26242
+ "spot",
26243
+ "following",
26244
+ "goto",
26245
+ "returning",
26246
+ "paused",
26247
+ "unknown"
26248
+ ]),
26249
+ following: boolean(),
26250
+ flash: boolean(),
26251
+ lightMode: NavigationLightModeSchema,
26252
+ lightLevel: number$1().min(40).max(100),
26253
+ /** Ms epoch when the slice was last updated. */
26254
+ lastChangedAt: number$1()
26255
+ });
26256
+ NavigationStatusSchema.extend({ lastFetchedAt: number$1() });
26257
+ DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), array(NavigationActionEntrySchema)), method(object({
26258
+ deviceId: number$1(),
26259
+ actionId: NavigationActionIdSchema
26260
+ }), _void(), { kind: "mutation" }), method(object({
26261
+ deviceId: number$1(),
26262
+ soundId: number$1().int()
26263
+ }), _void(), { kind: "mutation" }), method(object({
26264
+ deviceId: number$1(),
26265
+ on: boolean()
26266
+ }), _void(), { kind: "mutation" }), method(object({
26267
+ deviceId: number$1(),
26268
+ mode: NavigationLightModeSchema,
26269
+ level: number$1().min(40).max(100).optional()
26270
+ }), _void(), { kind: "mutation" }), method(object({
26271
+ deviceId: number$1(),
26272
+ level: number$1().min(40).max(100)
26273
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), NavigationFeaturesSchema), object({
26274
+ deviceId: number$1(),
26275
+ status: NavigationStatusSchema
26276
+ });
26277
+ /**
26278
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26279
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26280
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26281
+ * one Home Assistant projection.
26282
+ */
26283
+ var NetworkLinkStatusSchema = object({
26284
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26285
+ type: _enum([
26286
+ "wifi",
26287
+ "ethernet",
26288
+ "cellular",
26289
+ "unknown"
26290
+ ]),
26291
+ /**
26292
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26293
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26294
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26295
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26296
+ * SKIP a null rather than coerce it.
26297
+ */
26298
+ signalPercent: number$1().min(0).max(100).nullable(),
26299
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26300
+ rssiDbm: number$1().optional(),
26301
+ /** Network name of a wireless link, when the firmware reports it. */
26302
+ ssid: string().optional(),
26303
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26304
+ lastUpdated: number$1()
26305
+ });
26306
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26307
+ deviceId: number$1(),
26308
+ status: NetworkLinkStatusSchema
26309
+ });
26310
+ /**
25987
26311
  * network-quality — system-scoped singleton capability tracking RTT,
25988
26312
  * jitter, and observed/peak bandwidth per device + per client.
25989
26313
  *
@@ -27225,203 +27549,6 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), PtzAutotrackStatusSc
27225
27549
  deviceId: number$1(),
27226
27550
  status: PtzAutotrackStatusSchema
27227
27551
  });
27228
- /**
27229
- * `navigation` — a device-scoped capability that natively expresses the FULL
27230
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27231
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27232
- *
27233
- * Why a NEW cap rather than overloading `ptz`:
27234
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27235
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27236
- * The two are different physical models: PTZ is absolute-position + presets,
27237
- * navigation is momentary drive nudges + discrete robot ACTIONS
27238
- * (dock / spot-clean / follow-pet / go-to-point / …).
27239
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27240
- * the reverse:
27241
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27242
- * / `getOptions`), and
27243
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27244
- * robot camera shows up in the existing PTZ control path without every
27245
- * PTZ provider learning about robots. The mapping lives in the adapter,
27246
- * not here (see the addon design note):
27247
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27248
- * ptz.stop() → navigation.stop()
27249
- * ptz.goHome() → navigation.runAction('goHome')
27250
- * ptz.getPresets() → navigation.listActions() (id→preset)
27251
- * ptz.goToPreset(id) → navigation.runAction(id)
27252
- *
27253
- * ## Continuous drive
27254
- *
27255
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27256
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27257
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27258
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27259
- * coalesce them. The UI owns the cadence.
27260
- *
27261
- * ## The action dictionary
27262
- *
27263
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27264
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27265
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27266
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27267
- * vendor-specific list. `kind: 'action'` entries are triggered with
27268
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27269
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27270
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27271
- *
27272
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27273
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27274
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27275
- * every device handle. A future nodedreame publish adds a typed
27276
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27277
- * provider can then swap the raw calls for the typed methods with no change to
27278
- * THIS contract.
27279
- */
27280
- /**
27281
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27282
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27283
- * halts it.
27284
- *
27285
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27286
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27287
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27288
- * vector by it (drivers without proportional drive ignore it).
27289
- *
27290
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27291
- * axis alone; an all-undefined nudge is a no-op.
27292
- */
27293
- var NavigationMoveCommandSchema = object({
27294
- pan: number$1().min(-1).max(1).optional(),
27295
- tilt: number$1().min(-1).max(1).optional(),
27296
- speed: number$1().min(0).max(1).optional()
27297
- });
27298
- /**
27299
- * The enumerated discrete actions a navigation-capable robot can perform via
27300
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27301
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27302
- * `playSound` (see the `sound` dictionary entries).
27303
- */
27304
- var NavigationActionIdSchema = _enum([
27305
- "goHome",
27306
- "locate",
27307
- "spotClean",
27308
- "findPet",
27309
- "personFollow",
27310
- "stop",
27311
- "startClean",
27312
- "pauseClean",
27313
- "dockWash",
27314
- "autoEmpty",
27315
- "flashOn",
27316
- "flashOff"
27317
- ]);
27318
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27319
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27320
- /**
27321
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27322
- * native panel and the PTZ mimic render as a button.
27323
- *
27324
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27325
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27326
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27327
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27328
- * - `label` — operator-facing English label.
27329
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27330
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27331
- * PTZ render ONLY enabled entries. Data-driven: the provider
27332
- * flips it from config, never by editing code.
27333
- */
27334
- var NavigationActionEntrySchema = object({
27335
- id: string(),
27336
- kind: NavigationEntryKindSchema,
27337
- label: string(),
27338
- icon: string(),
27339
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27340
- soundId: number$1().int().optional(),
27341
- /** Per-device feature flag — render this entry only when true. */
27342
- enabled: boolean()
27343
- });
27344
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27345
- var NavigationPointSchema = object({
27346
- x: number$1(),
27347
- y: number$1()
27348
- });
27349
- /**
27350
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27351
- * The cap reports which are enabled so the UI / PTZ render only the controls
27352
- * that are turned on for THIS device. Data-driven: the provider derives these
27353
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27354
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27355
- * that are not dictionary entries.
27356
- *
27357
- * - `move` / `stop` — the momentary drive joystick.
27358
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27359
- * map-coordinate plumbing is wired.
27360
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27361
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27362
- * - `light` — the on/off fill-light toggle (works anytime).
27363
- * - `lightMode` — the auto/manual selector + manual level slider (a
27364
- * camera-service control; needs an active stream).
27365
- */
27366
- var NavigationFeaturesSchema = object({
27367
- move: boolean(),
27368
- stop: boolean(),
27369
- goToPoint: boolean(),
27370
- runAction: boolean(),
27371
- playSound: boolean(),
27372
- light: boolean(),
27373
- lightMode: boolean()
27374
- });
27375
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27376
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27377
- /**
27378
- * Live navigation state so the UI can reflect what the robot is doing:
27379
- * - `mode` — coarse activity (idle / cleaning / following / …).
27380
- * - `following` — person/pet follow is currently armed.
27381
- * - `flash` — the on-camera fill light is on.
27382
- * - `lightMode` — auto vs manual fill-light mode.
27383
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27384
- * `lightMode === 'manual'`.
27385
- */
27386
- var NavigationStatusSchema = object({
27387
- mode: _enum([
27388
- "idle",
27389
- "cleaning",
27390
- "spot",
27391
- "following",
27392
- "goto",
27393
- "returning",
27394
- "paused",
27395
- "unknown"
27396
- ]),
27397
- following: boolean(),
27398
- flash: boolean(),
27399
- lightMode: NavigationLightModeSchema,
27400
- lightLevel: number$1().min(40).max(100),
27401
- /** Ms epoch when the slice was last updated. */
27402
- lastChangedAt: number$1()
27403
- });
27404
- NavigationStatusSchema.extend({ lastFetchedAt: number$1() });
27405
- DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), array(NavigationActionEntrySchema)), method(object({
27406
- deviceId: number$1(),
27407
- actionId: NavigationActionIdSchema
27408
- }), _void(), { kind: "mutation" }), method(object({
27409
- deviceId: number$1(),
27410
- soundId: number$1().int()
27411
- }), _void(), { kind: "mutation" }), method(object({
27412
- deviceId: number$1(),
27413
- on: boolean()
27414
- }), _void(), { kind: "mutation" }), method(object({
27415
- deviceId: number$1(),
27416
- mode: NavigationLightModeSchema,
27417
- level: number$1().min(40).max(100).optional()
27418
- }), _void(), { kind: "mutation" }), method(object({
27419
- deviceId: number$1(),
27420
- level: number$1().min(40).max(100)
27421
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), NavigationFeaturesSchema), object({
27422
- deviceId: number$1(),
27423
- status: NavigationStatusSchema
27424
- });
27425
27552
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number$1().int().nonnegative() }), object({ success: literal(true) }), {
27426
27553
  kind: "mutation",
27427
27554
  auth: "admin"
@@ -34730,13 +34857,13 @@ Object.freeze({
34730
34857
  addonId: null,
34731
34858
  access: "view"
34732
34859
  },
34733
- "storage.getDefaultLocation": {
34860
+ "storage.list": {
34734
34861
  capName: "storage",
34735
34862
  capScope: "system",
34736
34863
  addonId: null,
34737
34864
  access: "view"
34738
34865
  },
34739
- "storage.list": {
34866
+ "storage.listDrainProgress": {
34740
34867
  capName: "storage",
34741
34868
  capScope: "system",
34742
34869
  addonId: null,
@@ -34886,6 +35013,12 @@ Object.freeze({
34886
35013
  addonId: null,
34887
35014
  access: "view"
34888
35015
  },
35016
+ "storageOccupancy.getOccupancy": {
35017
+ capName: "storage-occupancy",
35018
+ capScope: "system",
35019
+ addonId: null,
35020
+ access: "view"
35021
+ },
34889
35022
  "storageProvider.abortUpload": {
34890
35023
  capName: "storage-provider",
34891
35024
  capScope: "system",