@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.js CHANGED
@@ -12,7 +12,7 @@ let _camstack_system_addon_utils = require("@camstack/system/addon-utils");
12
12
  let node_fs_promises = require("node:fs/promises");
13
13
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
14
14
  let node_child_process = require("node:child_process");
15
- //#region ../types/dist/event-category-zAv7pMUz.mjs
15
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
16
16
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
17
17
  EventCategory["SystemBoot"] = "system.boot";
18
18
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -207,6 +207,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
207
207
  EventCategory["ProcessCrashed"] = "process.crashed";
208
208
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
209
209
  EventCategory["ProcessRestarted"] = "process.restarted";
210
+ /**
211
+ * The SET of storage locations changed — one was created, edited, enabled,
212
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
213
+ *
214
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
215
+ * it must also converge on its own periodic path, because a dropped event
216
+ * must not leave a node writing to yesterday's disk set forever. It exists
217
+ * because there was NO signal at all — an operator who added a second
218
+ * recordings disk in the admin UI got nothing, and the recorder kept its
219
+ * resolved locations until something else happened to re-resolve them
220
+ * (D387). Payload `StorageLocationsChangedPayload`.
221
+ */
222
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
210
223
  EventCategory["RecordingStarted"] = "recording.started";
211
224
  EventCategory["RecordingStopped"] = "recording.stopped";
212
225
  EventCategory["RecordingError"] = "recording.error";
@@ -7818,111 +7831,6 @@ var CameraSwitchGroupSchema = object({
7818
7831
  fetchedAt: number$1()
7819
7832
  });
7820
7833
  /**
7821
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7822
- * an addon declares its channels in.
7823
- *
7824
- * ## Two axes, deliberately separated
7825
- *
7826
- * - **DECLARATION** — which channels exist. Only the addon knows:
7827
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7828
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7829
- * and rots silently. So a channel is declared where it is consulted, and the
7830
- * `log-channels` capability enumerates the declarations.
7831
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7832
- * thing: the logging settings document on the `system` cap. Two authorities
7833
- * over the values is the exact defect
7834
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7835
- * remove; re-introducing it from the cure side would be grotesque.
7836
- *
7837
- * Nothing in this file reads a clock, an env var or a store. The registry is
7838
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7839
- * the hot path with a value somebody actually read, and by
7840
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7841
- * never reaches here, so it can neither disarm an armed channel nor arm a
7842
- * disarmed one (D49).
7843
- *
7844
- * ## The canonical call shape
7845
- *
7846
- * ```ts
7847
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7848
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7849
- * }
7850
- * ```
7851
- *
7852
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7853
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7854
- * object literal is never constructed because it lives inside the branch. It
7855
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7856
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7857
- * destination floor (measured at 1.93 ns/call when off).
7858
- *
7859
- * ## Why a channel emits at `info`
7860
- *
7861
- * `loki-logging.addon.ts` pins the destination default at `info` and
7862
- * `loki-destination.ts` drops everything below it, so a line emitted at
7863
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7864
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7865
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7866
- * emits at the channel's declared level, whose schema floor is `info`.
7867
- */
7868
- /**
7869
- * The level a channel writes at once armed.
7870
- *
7871
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7872
- * not leave the process for Loki, and the whole point of arming a channel is
7873
- * to read it later.
7874
- */
7875
- var LogChannelLevelSchema = _enum([
7876
- "info",
7877
- "warn",
7878
- "error"
7879
- ]);
7880
- /**
7881
- * What an addon declares about one channel. No value, no state — a
7882
- * declaration is inert.
7883
- */
7884
- var LogChannelDescriptorSchema = object({
7885
- /**
7886
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7887
- * the addon's short name so an operator reading a channel list can tell who
7888
- * owns it without a second lookup.
7889
- */
7890
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7891
- /** One sentence: what the operator will SEE after arming it. */
7892
- description: string().min(1),
7893
- /** The level its lines are emitted at. Never below `info`. */
7894
- defaultLevel: LogChannelLevelSchema,
7895
- /**
7896
- * Whether this channel can be narrowed to a camera.
7897
- *
7898
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7899
- * consulted with the numeric device id, AND every line the channel admits
7900
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7901
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7902
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7903
- * the body is the only way to filter.
7904
- *
7905
- * A channel whose lines carry the device only in `meta` (or not at all) is
7906
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7907
- * the operator narrows to one camera, sees nothing, and concludes the code
7908
- * path was never taken.
7909
- */
7910
- perDevice: boolean()
7911
- });
7912
- /**
7913
- * An armed window over one channel, as the document hands it to a mirror.
7914
- *
7915
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7916
- * expires by itself, which is the one failure a boolean cannot avoid.
7917
- */
7918
- var LogChannelWindowSchema = object({
7919
- channel: string().min(1),
7920
- /** Epoch ms the window closes at. */
7921
- armedUntilMs: number$1(),
7922
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7923
- deviceIds: array(number$1().int()).readonly().nullable()
7924
- });
7925
- /**
7926
7834
  * Ops-log — the durable, append-only operations audit shared by the
7927
7835
  * recordings and events management surfaces.
7928
7836
  *
@@ -8844,6 +8752,21 @@ var StorageCleanupJobSchema = object({
8844
8752
  });
8845
8753
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8846
8754
  /**
8755
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8756
+ * alias below is `z.infer<>` of it, never a second spelling.
8757
+ */
8758
+ var StorageLocationModeSchema = _enum([
8759
+ "active",
8760
+ "readonly",
8761
+ "drain",
8762
+ "disabled"
8763
+ ]);
8764
+ _enum([
8765
+ "normal",
8766
+ "never",
8767
+ "drain"
8768
+ ]);
8769
+ /**
8847
8770
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8848
8771
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8849
8772
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8868,8 +8791,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8868
8791
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8869
8792
  *
8870
8793
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8871
- * The default location for a type uses `id === <type>:default` by
8872
- * convention (the bare type ref like `'backups'` resolves to it).
8794
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8795
+ * There is no default location any more (D383): `enabled` is the whole write
8796
+ * model, and a bare type ref resolves to the sole location of the type, or —
8797
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8798
+ * slug is `default`.
8873
8799
  *
8874
8800
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8875
8801
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8890,23 +8816,37 @@ var StorageLocationSchema = object({
8890
8816
  * flag at upsert time, not here (the schema is provider-agnostic).
8891
8817
  */
8892
8818
  nodeId: string().optional(),
8893
- isDefault: boolean().default(false),
8894
8819
  isSystem: boolean().default(false),
8895
8820
  /**
8896
- * Operator opt-in: whether consumers that BALANCE across several locations
8897
- * of a type may write here. Recordings reads it today; event media and
8898
- * backups are the next consumers, which is why the flag lives on the
8899
- * location rather than in any one addon's store — nothing has to be
8900
- * extended to add the next consumer.
8821
+ * THE write switch, and the only one (D383). `enabled: true` means every
8822
+ * consumer that chooses a write target for this type may write here, and all
8823
+ * enabled locations of a type are used TOGETHER; `false` means read-only —
8824
+ * still read, still played back, still age-swept, still drained, never
8825
+ * written.
8901
8826
  *
8902
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8903
- * flag existed reads back with no flag and keeps working exactly as before;
8904
- * that is the whole compat story, and it is why no migration ships with it.
8905
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8906
- * disk must not silently start writing to it); the default of a type is
8907
- * always stamped `true`.
8827
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8828
+ * stored" on an update and "born inert unless it is the first location of its
8829
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8830
+ * enabled — {@link isLocationEnabled} is the one place that says so, and the
8831
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8832
+ * stops existing rather than being re-derived on every read.
8908
8833
  */
8909
8834
  enabled: boolean().optional(),
8835
+ /**
8836
+ * THE state of this location (D385), and the only authority on what may be
8837
+ * written, read or evicted here. Interpreted in exactly one place —
8838
+ * `storage-location-mode.ts` — which also folds the legacy
8839
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8840
+ * ambiguous.
8841
+ *
8842
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8843
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8844
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8845
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8846
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8847
+ * either, so the two cannot disagree.
8848
+ */
8849
+ mode: StorageLocationModeSchema.optional(),
8910
8850
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8911
8851
  * for node-local locations it can reach) — never persisted, absent when the
8912
8852
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8914,13 +8854,50 @@ var StorageLocationSchema = object({
8914
8854
  totalBytes: number$1(),
8915
8855
  availableBytes: number$1()
8916
8856
  }).nullable().optional(),
8857
+ /**
8858
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8859
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8860
+ * never persisted, never a filesystem walk.
8861
+ *
8862
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8863
+ * location yet — nobody stores here, the owning addon is down, or the first
8864
+ * refresh has not completed. A UI must omit the segment rather than draw it
8865
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8866
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8867
+ * be spelled out loud instead of appearing by accident.
8868
+ *
8869
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8870
+ * about the whole figure rather than about its freshest part.
8871
+ */
8872
+ owned: object({
8873
+ bytes: number$1().int().nonnegative(),
8874
+ measuredAtMs: number$1().int().nonnegative()
8875
+ }).optional(),
8917
8876
  createdAt: number$1(),
8918
8877
  updatedAt: number$1()
8919
8878
  });
8879
+ object({ isDefault: boolean().optional() });
8880
+ /**
8881
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8882
+ *
8883
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8884
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8885
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8886
+ * operator learns not to believe the screen.
8887
+ */
8888
+ var StorageDrainProgressSchema = object({
8889
+ locationId: string(),
8890
+ startedAtMs: number$1(),
8891
+ startBytes: number$1(),
8892
+ bytesRemaining: number$1(),
8893
+ drained: boolean(),
8894
+ estimatedEmptyAtMs: number$1().nullable()
8895
+ });
8920
8896
  /**
8921
8897
  * Reference accepted by consumer-facing `api.storage.*` calls.
8922
8898
  * Either:
8923
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
8899
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
8900
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8924
8901
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8925
8902
  *
8926
8903
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -9096,6 +9073,111 @@ var DecoderSessionConfigSchema = object({
9096
9073
  */
9097
9074
  debug: boolean().optional()
9098
9075
  });
9076
+ /**
9077
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
9078
+ * an addon declares its channels in.
9079
+ *
9080
+ * ## Two axes, deliberately separated
9081
+ *
9082
+ * - **DECLARATION** — which channels exist. Only the addon knows:
9083
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
9084
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
9085
+ * and rots silently. So a channel is declared where it is consulted, and the
9086
+ * `log-channels` capability enumerates the declarations.
9087
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
9088
+ * thing: the logging settings document on the `system` cap. Two authorities
9089
+ * over the values is the exact defect
9090
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
9091
+ * remove; re-introducing it from the cure side would be grotesque.
9092
+ *
9093
+ * Nothing in this file reads a clock, an env var or a store. The registry is
9094
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
9095
+ * the hot path with a value somebody actually read, and by
9096
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
9097
+ * never reaches here, so it can neither disarm an armed channel nor arm a
9098
+ * disarmed one (D49).
9099
+ *
9100
+ * ## The canonical call shape
9101
+ *
9102
+ * ```ts
9103
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
9104
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
9105
+ * }
9106
+ * ```
9107
+ *
9108
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
9109
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
9110
+ * object literal is never constructed because it lives inside the branch. It
9111
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
9112
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
9113
+ * destination floor (measured at 1.93 ns/call when off).
9114
+ *
9115
+ * ## Why a channel emits at `info`
9116
+ *
9117
+ * `loki-logging.addon.ts` pins the destination default at `info` and
9118
+ * `loki-destination.ts` drops everything below it, so a line emitted at
9119
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
9120
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
9121
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
9122
+ * emits at the channel's declared level, whose schema floor is `info`.
9123
+ */
9124
+ /**
9125
+ * The level a channel writes at once armed.
9126
+ *
9127
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
9128
+ * not leave the process for Loki, and the whole point of arming a channel is
9129
+ * to read it later.
9130
+ */
9131
+ var LogChannelLevelSchema = _enum([
9132
+ "info",
9133
+ "warn",
9134
+ "error"
9135
+ ]);
9136
+ /**
9137
+ * What an addon declares about one channel. No value, no state — a
9138
+ * declaration is inert.
9139
+ */
9140
+ var LogChannelDescriptorSchema = object({
9141
+ /**
9142
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
9143
+ * the addon's short name so an operator reading a channel list can tell who
9144
+ * owns it without a second lookup.
9145
+ */
9146
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
9147
+ /** One sentence: what the operator will SEE after arming it. */
9148
+ description: string().min(1),
9149
+ /** The level its lines are emitted at. Never below `info`. */
9150
+ defaultLevel: LogChannelLevelSchema,
9151
+ /**
9152
+ * Whether this channel can be narrowed to a camera.
9153
+ *
9154
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
9155
+ * consulted with the numeric device id, AND every line the channel admits
9156
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
9157
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
9158
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
9159
+ * the body is the only way to filter.
9160
+ *
9161
+ * A channel whose lines carry the device only in `meta` (or not at all) is
9162
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
9163
+ * the operator narrows to one camera, sees nothing, and concludes the code
9164
+ * path was never taken.
9165
+ */
9166
+ perDevice: boolean()
9167
+ });
9168
+ /**
9169
+ * An armed window over one channel, as the document hands it to a mirror.
9170
+ *
9171
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
9172
+ * expires by itself, which is the one failure a boolean cannot avoid.
9173
+ */
9174
+ var LogChannelWindowSchema = object({
9175
+ channel: string().min(1),
9176
+ /** Epoch ms the window closes at. */
9177
+ armedUntilMs: number$1(),
9178
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
9179
+ deviceIds: array(number$1().int()).readonly().nullable()
9180
+ });
9099
9181
  var MODEL_FORMATS = [
9100
9182
  "onnx",
9101
9183
  "coreml",
@@ -21854,7 +21936,7 @@ method(object({
21854
21936
  downloadId: string(),
21855
21937
  offset: number$1(),
21856
21938
  length: number$1()
21857
- }), _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({
21939
+ }), _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({
21858
21940
  createdAt: true,
21859
21941
  updatedAt: true
21860
21942
  }), StorageLocationSchema, {
@@ -21866,7 +21948,7 @@ method(object({
21866
21948
  }), _void(), {
21867
21949
  kind: "mutation",
21868
21950
  auth: "admin"
21869
- }), method(object({ id: string() }), object({
21951
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21870
21952
  ok: boolean(),
21871
21953
  error: string().optional()
21872
21954
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21936,6 +22018,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21936
22018
  kind: "mutation",
21937
22019
  auth: "admin"
21938
22020
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22021
+ /**
22022
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22023
+ * location (D388).
22024
+ *
22025
+ * ## Why this is not `storage-evictable`
22026
+ *
22027
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22028
+ * not, in two ways that both matter and both bite hardest on the locations an
22029
+ * operator most wants a figure for:
22030
+ *
22031
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22032
+ * and `recordingsLow:default` deliberately share one root and evict as one
22033
+ * oldest-first pool, so both answer with the SAME combined total. As an
22034
+ * occupancy figure that double-counts the disk.
22035
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22036
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22037
+ * is retiring and staring at.
22038
+ *
22039
+ * So this is its own contract with its own quantity, and the quantity is
22040
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22041
+ * would ever be willing to delete it. A provider that can only answer
22042
+ * "evictable" must not register here — a number that silently means different
22043
+ * things per class is worse than no number.
22044
+ *
22045
+ * ## Absence is an answer
22046
+ *
22047
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22048
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22049
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22050
+ * consuming side has to be written out loud instead of appearing by accident.
22051
+ *
22052
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22053
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22054
+ */
22055
+ /** One provider's occupancy answer for one location. */
22056
+ var StorageOccupancyReportSchema = object({
22057
+ locationId: string(),
22058
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22059
+ * not net of what it is willing to delete. */
22060
+ ownedBytes: number$1().int().nonnegative(),
22061
+ /** When the provider last actually measured this. The orchestrator carries it
22062
+ * through so a UI can say how old the figure is instead of implying "now". */
22063
+ measuredAtMs: number$1().int().nonnegative()
22064
+ });
22065
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21939
22066
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21940
22067
  providerId: string().min(1),
21941
22068
  displayName: string().min(1),
@@ -23571,39 +23698,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23571
23698
  deviceId: number$1(),
23572
23699
  status: BatteryStatusSchema
23573
23700
  });
23574
- /**
23575
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23576
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23577
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23578
- * one Home Assistant projection.
23579
- */
23580
- var NetworkLinkStatusSchema = object({
23581
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23582
- type: _enum([
23583
- "wifi",
23584
- "ethernet",
23585
- "cellular",
23586
- "unknown"
23587
- ]),
23588
- /**
23589
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23590
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23591
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23592
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23593
- * SKIP a null rather than coerce it.
23594
- */
23595
- signalPercent: number$1().min(0).max(100).nullable(),
23596
- /** Raw received signal strength in dBm, when the firmware reports one. */
23597
- rssiDbm: number$1().optional(),
23598
- /** Network name of a wireless link, when the firmware reports it. */
23599
- ssid: string().optional(),
23600
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23601
- lastUpdated: number$1()
23602
- });
23603
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23604
- deviceId: number$1(),
23605
- status: NetworkLinkStatusSchema
23606
- });
23607
23701
  object({
23608
23702
  on: boolean(),
23609
23703
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25957,6 +26051,236 @@ DeviceType.Camera, method(object({
25957
26051
  detection: NativeDetectionSchema
25958
26052
  });
25959
26053
  /**
26054
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26055
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26056
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26057
+ *
26058
+ * Why a NEW cap rather than overloading `ptz`:
26059
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26060
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26061
+ * The two are different physical models: PTZ is absolute-position + presets,
26062
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26063
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26064
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26065
+ * the reverse:
26066
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26067
+ * / `getOptions`), and
26068
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26069
+ * robot camera shows up in the existing PTZ control path without every
26070
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26071
+ * not here (see the addon design note):
26072
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26073
+ * ptz.stop() → navigation.stop()
26074
+ * ptz.goHome() → navigation.runAction('goHome')
26075
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26076
+ * ptz.goToPreset(id) → navigation.runAction(id)
26077
+ *
26078
+ * ## Continuous drive
26079
+ *
26080
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26081
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26082
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26083
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26084
+ * coalesce them. The UI owns the cadence.
26085
+ *
26086
+ * ## The action dictionary
26087
+ *
26088
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26089
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26090
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26091
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26092
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26093
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26094
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26095
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26096
+ *
26097
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26098
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26099
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26100
+ * every device handle. A future nodedreame publish adds a typed
26101
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26102
+ * provider can then swap the raw calls for the typed methods with no change to
26103
+ * THIS contract.
26104
+ */
26105
+ /**
26106
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26107
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26108
+ * halts it.
26109
+ *
26110
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26111
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26112
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26113
+ * vector by it (drivers without proportional drive ignore it).
26114
+ *
26115
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26116
+ * axis alone; an all-undefined nudge is a no-op.
26117
+ */
26118
+ var NavigationMoveCommandSchema = object({
26119
+ pan: number$1().min(-1).max(1).optional(),
26120
+ tilt: number$1().min(-1).max(1).optional(),
26121
+ speed: number$1().min(0).max(1).optional()
26122
+ });
26123
+ /**
26124
+ * The enumerated discrete actions a navigation-capable robot can perform via
26125
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26126
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26127
+ * `playSound` (see the `sound` dictionary entries).
26128
+ */
26129
+ var NavigationActionIdSchema = _enum([
26130
+ "goHome",
26131
+ "locate",
26132
+ "spotClean",
26133
+ "findPet",
26134
+ "personFollow",
26135
+ "stop",
26136
+ "startClean",
26137
+ "pauseClean",
26138
+ "dockWash",
26139
+ "autoEmpty",
26140
+ "flashOn",
26141
+ "flashOff"
26142
+ ]);
26143
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26144
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26145
+ /**
26146
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26147
+ * native panel and the PTZ mimic render as a button.
26148
+ *
26149
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26150
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26151
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26152
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26153
+ * - `label` — operator-facing English label.
26154
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26155
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26156
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26157
+ * flips it from config, never by editing code.
26158
+ */
26159
+ var NavigationActionEntrySchema = object({
26160
+ id: string(),
26161
+ kind: NavigationEntryKindSchema,
26162
+ label: string(),
26163
+ icon: string(),
26164
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26165
+ soundId: number$1().int().optional(),
26166
+ /** Per-device feature flag — render this entry only when true. */
26167
+ enabled: boolean()
26168
+ });
26169
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26170
+ var NavigationPointSchema = object({
26171
+ x: number$1(),
26172
+ y: number$1()
26173
+ });
26174
+ /**
26175
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26176
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26177
+ * that are turned on for THIS device. Data-driven: the provider derives these
26178
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26179
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26180
+ * that are not dictionary entries.
26181
+ *
26182
+ * - `move` / `stop` — the momentary drive joystick.
26183
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26184
+ * map-coordinate plumbing is wired.
26185
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26186
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26187
+ * - `light` — the on/off fill-light toggle (works anytime).
26188
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26189
+ * camera-service control; needs an active stream).
26190
+ */
26191
+ var NavigationFeaturesSchema = object({
26192
+ move: boolean(),
26193
+ stop: boolean(),
26194
+ goToPoint: boolean(),
26195
+ runAction: boolean(),
26196
+ playSound: boolean(),
26197
+ light: boolean(),
26198
+ lightMode: boolean()
26199
+ });
26200
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26201
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26202
+ /**
26203
+ * Live navigation state so the UI can reflect what the robot is doing:
26204
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26205
+ * - `following` — person/pet follow is currently armed.
26206
+ * - `flash` — the on-camera fill light is on.
26207
+ * - `lightMode` — auto vs manual fill-light mode.
26208
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26209
+ * `lightMode === 'manual'`.
26210
+ */
26211
+ var NavigationStatusSchema = object({
26212
+ mode: _enum([
26213
+ "idle",
26214
+ "cleaning",
26215
+ "spot",
26216
+ "following",
26217
+ "goto",
26218
+ "returning",
26219
+ "paused",
26220
+ "unknown"
26221
+ ]),
26222
+ following: boolean(),
26223
+ flash: boolean(),
26224
+ lightMode: NavigationLightModeSchema,
26225
+ lightLevel: number$1().min(40).max(100),
26226
+ /** Ms epoch when the slice was last updated. */
26227
+ lastChangedAt: number$1()
26228
+ });
26229
+ NavigationStatusSchema.extend({ lastFetchedAt: number$1() });
26230
+ 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({
26231
+ deviceId: number$1(),
26232
+ actionId: NavigationActionIdSchema
26233
+ }), _void(), { kind: "mutation" }), method(object({
26234
+ deviceId: number$1(),
26235
+ soundId: number$1().int()
26236
+ }), _void(), { kind: "mutation" }), method(object({
26237
+ deviceId: number$1(),
26238
+ on: boolean()
26239
+ }), _void(), { kind: "mutation" }), method(object({
26240
+ deviceId: number$1(),
26241
+ mode: NavigationLightModeSchema,
26242
+ level: number$1().min(40).max(100).optional()
26243
+ }), _void(), { kind: "mutation" }), method(object({
26244
+ deviceId: number$1(),
26245
+ level: number$1().min(40).max(100)
26246
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), NavigationFeaturesSchema), object({
26247
+ deviceId: number$1(),
26248
+ status: NavigationStatusSchema
26249
+ });
26250
+ /**
26251
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26252
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26253
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26254
+ * one Home Assistant projection.
26255
+ */
26256
+ var NetworkLinkStatusSchema = object({
26257
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26258
+ type: _enum([
26259
+ "wifi",
26260
+ "ethernet",
26261
+ "cellular",
26262
+ "unknown"
26263
+ ]),
26264
+ /**
26265
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26266
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26267
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26268
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26269
+ * SKIP a null rather than coerce it.
26270
+ */
26271
+ signalPercent: number$1().min(0).max(100).nullable(),
26272
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26273
+ rssiDbm: number$1().optional(),
26274
+ /** Network name of a wireless link, when the firmware reports it. */
26275
+ ssid: string().optional(),
26276
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26277
+ lastUpdated: number$1()
26278
+ });
26279
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26280
+ deviceId: number$1(),
26281
+ status: NetworkLinkStatusSchema
26282
+ });
26283
+ /**
25960
26284
  * network-quality — system-scoped singleton capability tracking RTT,
25961
26285
  * jitter, and observed/peak bandwidth per device + per client.
25962
26286
  *
@@ -27198,203 +27522,6 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), PtzAutotrackStatusSc
27198
27522
  deviceId: number$1(),
27199
27523
  status: PtzAutotrackStatusSchema
27200
27524
  });
27201
- /**
27202
- * `navigation` — a device-scoped capability that natively expresses the FULL
27203
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27204
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27205
- *
27206
- * Why a NEW cap rather than overloading `ptz`:
27207
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27208
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27209
- * The two are different physical models: PTZ is absolute-position + presets,
27210
- * navigation is momentary drive nudges + discrete robot ACTIONS
27211
- * (dock / spot-clean / follow-pet / go-to-point / …).
27212
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27213
- * the reverse:
27214
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27215
- * / `getOptions`), and
27216
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27217
- * robot camera shows up in the existing PTZ control path without every
27218
- * PTZ provider learning about robots. The mapping lives in the adapter,
27219
- * not here (see the addon design note):
27220
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27221
- * ptz.stop() → navigation.stop()
27222
- * ptz.goHome() → navigation.runAction('goHome')
27223
- * ptz.getPresets() → navigation.listActions() (id→preset)
27224
- * ptz.goToPreset(id) → navigation.runAction(id)
27225
- *
27226
- * ## Continuous drive
27227
- *
27228
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27229
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27230
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27231
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27232
- * coalesce them. The UI owns the cadence.
27233
- *
27234
- * ## The action dictionary
27235
- *
27236
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27237
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27238
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27239
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27240
- * vendor-specific list. `kind: 'action'` entries are triggered with
27241
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27242
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27243
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27244
- *
27245
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27246
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27247
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27248
- * every device handle. A future nodedreame publish adds a typed
27249
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27250
- * provider can then swap the raw calls for the typed methods with no change to
27251
- * THIS contract.
27252
- */
27253
- /**
27254
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27255
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27256
- * halts it.
27257
- *
27258
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27259
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27260
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27261
- * vector by it (drivers without proportional drive ignore it).
27262
- *
27263
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27264
- * axis alone; an all-undefined nudge is a no-op.
27265
- */
27266
- var NavigationMoveCommandSchema = object({
27267
- pan: number$1().min(-1).max(1).optional(),
27268
- tilt: number$1().min(-1).max(1).optional(),
27269
- speed: number$1().min(0).max(1).optional()
27270
- });
27271
- /**
27272
- * The enumerated discrete actions a navigation-capable robot can perform via
27273
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27274
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27275
- * `playSound` (see the `sound` dictionary entries).
27276
- */
27277
- var NavigationActionIdSchema = _enum([
27278
- "goHome",
27279
- "locate",
27280
- "spotClean",
27281
- "findPet",
27282
- "personFollow",
27283
- "stop",
27284
- "startClean",
27285
- "pauseClean",
27286
- "dockWash",
27287
- "autoEmpty",
27288
- "flashOn",
27289
- "flashOff"
27290
- ]);
27291
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27292
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27293
- /**
27294
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27295
- * native panel and the PTZ mimic render as a button.
27296
- *
27297
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27298
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27299
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27300
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27301
- * - `label` — operator-facing English label.
27302
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27303
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27304
- * PTZ render ONLY enabled entries. Data-driven: the provider
27305
- * flips it from config, never by editing code.
27306
- */
27307
- var NavigationActionEntrySchema = object({
27308
- id: string(),
27309
- kind: NavigationEntryKindSchema,
27310
- label: string(),
27311
- icon: string(),
27312
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27313
- soundId: number$1().int().optional(),
27314
- /** Per-device feature flag — render this entry only when true. */
27315
- enabled: boolean()
27316
- });
27317
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27318
- var NavigationPointSchema = object({
27319
- x: number$1(),
27320
- y: number$1()
27321
- });
27322
- /**
27323
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27324
- * The cap reports which are enabled so the UI / PTZ render only the controls
27325
- * that are turned on for THIS device. Data-driven: the provider derives these
27326
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27327
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27328
- * that are not dictionary entries.
27329
- *
27330
- * - `move` / `stop` — the momentary drive joystick.
27331
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27332
- * map-coordinate plumbing is wired.
27333
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27334
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27335
- * - `light` — the on/off fill-light toggle (works anytime).
27336
- * - `lightMode` — the auto/manual selector + manual level slider (a
27337
- * camera-service control; needs an active stream).
27338
- */
27339
- var NavigationFeaturesSchema = object({
27340
- move: boolean(),
27341
- stop: boolean(),
27342
- goToPoint: boolean(),
27343
- runAction: boolean(),
27344
- playSound: boolean(),
27345
- light: boolean(),
27346
- lightMode: boolean()
27347
- });
27348
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27349
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27350
- /**
27351
- * Live navigation state so the UI can reflect what the robot is doing:
27352
- * - `mode` — coarse activity (idle / cleaning / following / …).
27353
- * - `following` — person/pet follow is currently armed.
27354
- * - `flash` — the on-camera fill light is on.
27355
- * - `lightMode` — auto vs manual fill-light mode.
27356
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27357
- * `lightMode === 'manual'`.
27358
- */
27359
- var NavigationStatusSchema = object({
27360
- mode: _enum([
27361
- "idle",
27362
- "cleaning",
27363
- "spot",
27364
- "following",
27365
- "goto",
27366
- "returning",
27367
- "paused",
27368
- "unknown"
27369
- ]),
27370
- following: boolean(),
27371
- flash: boolean(),
27372
- lightMode: NavigationLightModeSchema,
27373
- lightLevel: number$1().min(40).max(100),
27374
- /** Ms epoch when the slice was last updated. */
27375
- lastChangedAt: number$1()
27376
- });
27377
- NavigationStatusSchema.extend({ lastFetchedAt: number$1() });
27378
- 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({
27379
- deviceId: number$1(),
27380
- actionId: NavigationActionIdSchema
27381
- }), _void(), { kind: "mutation" }), method(object({
27382
- deviceId: number$1(),
27383
- soundId: number$1().int()
27384
- }), _void(), { kind: "mutation" }), method(object({
27385
- deviceId: number$1(),
27386
- on: boolean()
27387
- }), _void(), { kind: "mutation" }), method(object({
27388
- deviceId: number$1(),
27389
- mode: NavigationLightModeSchema,
27390
- level: number$1().min(40).max(100).optional()
27391
- }), _void(), { kind: "mutation" }), method(object({
27392
- deviceId: number$1(),
27393
- level: number$1().min(40).max(100)
27394
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), NavigationFeaturesSchema), object({
27395
- deviceId: number$1(),
27396
- status: NavigationStatusSchema
27397
- });
27398
27525
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number$1().int().nonnegative() }), object({ success: literal(true) }), {
27399
27526
  kind: "mutation",
27400
27527
  auth: "admin"
@@ -34703,13 +34830,13 @@ Object.freeze({
34703
34830
  addonId: null,
34704
34831
  access: "view"
34705
34832
  },
34706
- "storage.getDefaultLocation": {
34833
+ "storage.list": {
34707
34834
  capName: "storage",
34708
34835
  capScope: "system",
34709
34836
  addonId: null,
34710
34837
  access: "view"
34711
34838
  },
34712
- "storage.list": {
34839
+ "storage.listDrainProgress": {
34713
34840
  capName: "storage",
34714
34841
  capScope: "system",
34715
34842
  addonId: null,
@@ -34859,6 +34986,12 @@ Object.freeze({
34859
34986
  addonId: null,
34860
34987
  access: "view"
34861
34988
  },
34989
+ "storageOccupancy.getOccupancy": {
34990
+ capName: "storage-occupancy",
34991
+ capScope: "system",
34992
+ addonId: null,
34993
+ access: "view"
34994
+ },
34862
34995
  "storageProvider.abortUpload": {
34863
34996
  capName: "storage-provider",
34864
34997
  capScope: "system",