@camstack/addon-post-analysis 1.2.196 → 1.2.198

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.
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-zAv7pMUz.mjs
1
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -193,6 +193,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
193
193
  EventCategory["ProcessCrashed"] = "process.crashed";
194
194
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
195
195
  EventCategory["ProcessRestarted"] = "process.restarted";
196
+ /**
197
+ * The SET of storage locations changed — one was created, edited, enabled,
198
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
199
+ *
200
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
201
+ * it must also converge on its own periodic path, because a dropped event
202
+ * must not leave a node writing to yesterday's disk set forever. It exists
203
+ * because there was NO signal at all — an operator who added a second
204
+ * recordings disk in the admin UI got nothing, and the recorder kept its
205
+ * resolved locations until something else happened to re-resolve them
206
+ * (D387). Payload `StorageLocationsChangedPayload`.
207
+ */
208
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
196
209
  EventCategory["RecordingStarted"] = "recording.started";
197
210
  EventCategory["RecordingStopped"] = "recording.stopped";
198
211
  EventCategory["RecordingError"] = "recording.error";
@@ -7810,111 +7823,6 @@ var CameraSwitchGroupSchema = object({
7810
7823
  */
7811
7824
  var DETECTION_PIPELINE_CAP_NAME = "detection-pipeline";
7812
7825
  /**
7813
- * Per-component log CHANNELS — the gate a hot path consults, and the registry
7814
- * an addon declares its channels in.
7815
- *
7816
- * ## Two axes, deliberately separated
7817
- *
7818
- * - **DECLARATION** — which channels exist. Only the addon knows:
7819
- * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
7820
- * baichuan/handshake. A hand-wired central list rots at the first addition,
7821
- * and rots silently. So a channel is declared where it is consulted, and the
7822
- * `log-channels` capability enumerates the declarations.
7823
- * - **VALUE** — at which level, for which scope, until when. That stays ONE
7824
- * thing: the logging settings document on the `system` cap. Two authorities
7825
- * over the values is the exact defect
7826
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
7827
- * remove; re-introducing it from the cure side would be grotesque.
7828
- *
7829
- * Nothing in this file reads a clock, an env var or a store. The registry is
7830
- * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
7831
- * the hot path with a value somebody actually read, and by
7832
- * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
7833
- * never reaches here, so it can neither disarm an armed channel nor arm a
7834
- * disarmed one (D49).
7835
- *
7836
- * ## The canonical call shape
7837
- *
7838
- * ```ts
7839
- * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
7840
- * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
7841
- * }
7842
- * ```
7843
- *
7844
- * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
7845
- * read. Disarmed, a call site costs one load and one branch, and the `extras`
7846
- * object literal is never constructed because it lives inside the branch. It
7847
- * is the same shape already proven in production at `stream-broker.ts:1650`,
7848
- * and the same discipline `LoggingGate.allowsDestination` uses for the
7849
- * destination floor (measured at 1.93 ns/call when off).
7850
- *
7851
- * ## Why a channel emits at `info`
7852
- *
7853
- * `loki-logging.addon.ts` pins the destination default at `info` and
7854
- * `loki-destination.ts` drops everything below it, so a line emitted at
7855
- * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
7856
- * minutes. A diagnostic that cannot be read an hour later is worse than no
7857
- * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
7858
- * emits at the channel's declared level, whose schema floor is `info`.
7859
- */
7860
- /**
7861
- * The level a channel writes at once armed.
7862
- *
7863
- * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
7864
- * not leave the process for Loki, and the whole point of arming a channel is
7865
- * to read it later.
7866
- */
7867
- var LogChannelLevelSchema = _enum([
7868
- "info",
7869
- "warn",
7870
- "error"
7871
- ]);
7872
- /**
7873
- * What an addon declares about one channel. No value, no state — a
7874
- * declaration is inert.
7875
- */
7876
- var LogChannelDescriptorSchema = object({
7877
- /**
7878
- * Dotted `area.thing`, unique across the workspace. `area` is conventionally
7879
- * the addon's short name so an operator reading a channel list can tell who
7880
- * owns it without a second lookup.
7881
- */
7882
- name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
7883
- /** One sentence: what the operator will SEE after arming it. */
7884
- description: string().min(1),
7885
- /** The level its lines are emitted at. Never below `info`. */
7886
- defaultLevel: LogChannelLevelSchema,
7887
- /**
7888
- * Whether this channel can be narrowed to a camera.
7889
- *
7890
- * `true` is a PROMISE with two halves, and both must hold: the gate is
7891
- * consulted with the numeric device id, AND every line the channel admits
7892
- * carries `tags: { deviceId }` with that same numeric id. The second half is
7893
- * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
7894
- * keeps `deviceId` out of the stream labels for cardinality, so the tag in
7895
- * the body is the only way to filter.
7896
- *
7897
- * A channel whose lines carry the device only in `meta` (or not at all) is
7898
- * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
7899
- * the operator narrows to one camera, sees nothing, and concludes the code
7900
- * path was never taken.
7901
- */
7902
- perDevice: boolean()
7903
- });
7904
- /**
7905
- * An armed window over one channel, as the document hands it to a mirror.
7906
- *
7907
- * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
7908
- * expires by itself, which is the one failure a boolean cannot avoid.
7909
- */
7910
- var LogChannelWindowSchema = object({
7911
- channel: string().min(1),
7912
- /** Epoch ms the window closes at. */
7913
- armedUntilMs: number(),
7914
- /** `null` = every camera. A non-empty list narrows to those numeric ids. */
7915
- deviceIds: array(number().int()).readonly().nullable()
7916
- });
7917
- /**
7918
7826
  * Ops-log — the durable, append-only operations audit shared by the
7919
7827
  * recordings and events management surfaces.
7920
7828
  *
@@ -8885,6 +8793,100 @@ var StorageCleanupJobSchema = object({
8885
8793
  });
8886
8794
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8887
8795
  /**
8796
+ * The storage-location STATE MODEL (D385) — one typed state, one policy module.
8797
+ *
8798
+ * A location's state used to be split across two authorities: the typed
8799
+ * `enabled` field (THE write switch since D383) and an untyped `config.readOnly`
8800
+ * key. They did not mean the same thing — `enabled: false` was still evicted
8801
+ * under disk pressure while `config.readOnly` was deliberately excluded — and
8802
+ * neither name said which. Every consumer re-derived the difference, and the
8803
+ * three questions that actually matter were answered in six places.
8804
+ *
8805
+ * This module is the ONLY place in the repo allowed to interpret the state. It
8806
+ * answers three questions and nothing else:
8807
+ *
8808
+ * - may this location be WRITTEN to? {@link modeMayWrite}
8809
+ * - may this location be READ? {@link modeMayRead}
8810
+ * - what is its eviction policy? {@link evictionPolicyForMode}
8811
+ *
8812
+ * | mode | write | read | eviction |
8813
+ * | ---------- | ----- | ---- | ------------------------------ |
8814
+ * | `active` | yes | yes | `normal` (pressure + usage cap) |
8815
+ * | `readonly` | no | yes | `never` |
8816
+ * | `drain` | no | yes | `drain` (paced, until empty) |
8817
+ * | `disabled` | no | no | `never` |
8818
+ *
8819
+ * `scripts/check-storage-location-mode-single-owner.ts` fails the build when
8820
+ * anything outside this module reads `config['readOnly']` or compares `enabled`
8821
+ * directly. A rule nothing checks has already been broken somewhere.
8822
+ */
8823
+ var STORAGE_LOCATION_MODES = [
8824
+ "active",
8825
+ "readonly",
8826
+ "drain",
8827
+ "disabled"
8828
+ ];
8829
+ /**
8830
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8831
+ * alias below is `z.infer<>` of it, never a second spelling.
8832
+ */
8833
+ var StorageLocationModeSchema = _enum(STORAGE_LOCATION_MODES);
8834
+ _enum([
8835
+ "normal",
8836
+ "never",
8837
+ "drain"
8838
+ ]);
8839
+ /** Is this mode a write target? Only `active` is. */
8840
+ function modeMayWrite(mode) {
8841
+ return mode === "active";
8842
+ }
8843
+ /** What eviction may do here. See {@link StorageEvictionPolicy}. */
8844
+ function evictionPolicyForMode(mode) {
8845
+ switch (mode) {
8846
+ case "active": return "normal";
8847
+ case "drain": return "drain";
8848
+ case "readonly":
8849
+ case "disabled": return "never";
8850
+ }
8851
+ }
8852
+ /**
8853
+ * The mode a LEGACY row implies, or `null` when it implies nothing — the row is
8854
+ * already stamped, or it carried neither flag.
8855
+ *
8856
+ * Both legacy flags fold to `readonly`, which is the CONSERVATIVE direction: a
8857
+ * state change must never start deleting footage on its own, and it must never
8858
+ * make footage that was still being served disappear. `enabled: false` used to
8859
+ * leave the location evictable under pressure; folding it to `readonly` stops
8860
+ * that, which is a strictly safer answer than the one it replaces.
8861
+ */
8862
+ function legacyModeOf(location) {
8863
+ if (location.mode !== void 0) return null;
8864
+ if (location.config["readOnly"] === true) return "readonly";
8865
+ if (location.enabled === false) return "readonly";
8866
+ return null;
8867
+ }
8868
+ /**
8869
+ * The state of a location, stamped or folded. THE one interpretation: a row
8870
+ * that predates D385 is never ambiguous, and a stamped `mode` always wins over
8871
+ * whatever the legacy pair still says.
8872
+ */
8873
+ function resolveLocationMode(location) {
8874
+ return (isStorageLocationMode(location.mode) ? location.mode : void 0) ?? legacyModeOf(location) ?? "active";
8875
+ }
8876
+ /** Is this one of the four states? The stamped value crosses a wire, and a
8877
+ * value nobody defined must not be rendered as if it were a state. */
8878
+ function isStorageLocationMode(value) {
8879
+ return STORAGE_LOCATION_MODES.some((mode) => mode === value);
8880
+ }
8881
+ /** May this location be written to? */
8882
+ function mayWriteToLocation(location) {
8883
+ return modeMayWrite(resolveLocationMode(location));
8884
+ }
8885
+ /** What eviction may do to this location. */
8886
+ function evictionPolicyOfLocation(location) {
8887
+ return evictionPolicyForMode(resolveLocationMode(location));
8888
+ }
8889
+ /**
8888
8890
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8889
8891
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8890
8892
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8909,8 +8911,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8909
8911
  * `STORAGE_LOCATION_CARDINALITY` map has been removed.
8910
8912
  *
8911
8913
  * `id` is a stable namespaced string of the form `<type>:<slug>`.
8912
- * The default location for a type uses `id === <type>:default` by
8913
- * convention (the bare type ref like `'backups'` resolves to it).
8914
+ * The seed names its first instance `<type>:default` — a NAME, not a flag.
8915
+ * There is no default location any more (D383): `enabled` is the whole write
8916
+ * model, and a bare type ref resolves to the sole location of the type, or —
8917
+ * transitionally, only while legacy NULL-stamped rows exist — to the row whose
8918
+ * slug is `default`.
8914
8919
  *
8915
8920
  * `isSystem` is a legacy persisted flag. Seed still creates the initial
8916
8921
  * `<type>:default` locations; the flag is no longer a lock, a badge, or a
@@ -8931,23 +8936,37 @@ var StorageLocationSchema = object({
8931
8936
  * flag at upsert time, not here (the schema is provider-agnostic).
8932
8937
  */
8933
8938
  nodeId: string().optional(),
8934
- isDefault: boolean().default(false),
8935
8939
  isSystem: boolean().default(false),
8936
8940
  /**
8937
- * Operator opt-in: whether consumers that BALANCE across several locations
8938
- * of a type may write here. Recordings reads it today; event media and
8939
- * backups are the next consumers, which is why the flag lives on the
8940
- * location rather than in any one addon's store nothing has to be
8941
- * extended to add the next consumer.
8941
+ * THE write switch, and the only one (D383). `enabled: true` means every
8942
+ * consumer that chooses a write target for this type may write here, and all
8943
+ * enabled locations of a type are used TOGETHER; `false` means read-only
8944
+ * still read, still played back, still age-swept, still drained, never
8945
+ * written.
8942
8946
  *
8943
- * OPTIONAL, and ABSENT MEANS ACTIVE. Every location persisted before the
8944
- * flag existed reads back with no flag and keeps working exactly as before;
8945
- * that is the whole compat story, and it is why no migration ships with it.
8946
- * A newly CREATED sibling is stamped `false` by the orchestrator (creating a
8947
- * disk must not silently start writing to it); the default of a type is
8948
- * always stamped `true`.
8947
+ * OPTIONAL only for the wire: an upsert that omits it means "leave what is
8948
+ * stored" on an update and "born inert unless it is the first location of its
8949
+ * type" on a create. On a PERSISTED row absence is legacy and it means
8950
+ * enabled {@link isLocationEnabled} is the one place that says so, and the
8951
+ * orchestrator stamps every flagless row `true` once at hydrate so absence
8952
+ * stops existing rather than being re-derived on every read.
8949
8953
  */
8950
8954
  enabled: boolean().optional(),
8955
+ /**
8956
+ * THE state of this location (D385), and the only authority on what may be
8957
+ * written, read or evicted here. Interpreted in exactly one place —
8958
+ * `storage-location-mode.ts` — which also folds the legacy
8959
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8960
+ * ambiguous.
8961
+ *
8962
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8963
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8964
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8965
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8966
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8967
+ * either, so the two cannot disagree.
8968
+ */
8969
+ mode: StorageLocationModeSchema.optional(),
8951
8970
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8952
8971
  * for node-local locations it can reach) — never persisted, absent when the
8953
8972
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8955,13 +8974,50 @@ var StorageLocationSchema = object({
8955
8974
  totalBytes: number(),
8956
8975
  availableBytes: number()
8957
8976
  }).nullable().optional(),
8977
+ /**
8978
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8979
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8980
+ * never persisted, never a filesystem walk.
8981
+ *
8982
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8983
+ * location yet — nobody stores here, the owning addon is down, or the first
8984
+ * refresh has not completed. A UI must omit the segment rather than draw it
8985
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8986
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8987
+ * be spelled out loud instead of appearing by accident.
8988
+ *
8989
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8990
+ * about the whole figure rather than about its freshest part.
8991
+ */
8992
+ owned: object({
8993
+ bytes: number().int().nonnegative(),
8994
+ measuredAtMs: number().int().nonnegative()
8995
+ }).optional(),
8958
8996
  createdAt: number(),
8959
8997
  updatedAt: number()
8960
8998
  });
8999
+ object({ isDefault: boolean().optional() });
9000
+ /**
9001
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
9002
+ *
9003
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
9004
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
9005
+ * drain with no observed growth has no honest ETA, and inventing one is how an
9006
+ * operator learns not to believe the screen.
9007
+ */
9008
+ var StorageDrainProgressSchema = object({
9009
+ locationId: string(),
9010
+ startedAtMs: number(),
9011
+ startBytes: number(),
9012
+ bytesRemaining: number(),
9013
+ drained: boolean(),
9014
+ estimatedEmptyAtMs: number().nullable()
9015
+ });
8961
9016
  /**
8962
9017
  * Reference accepted by consumer-facing `api.storage.*` calls.
8963
9018
  * Either:
8964
- * - a `StorageLocationType` (e.g. `'backups'`) → orchestrator resolves to the default of that type
9019
+ * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
9020
+ * (transitionally, the `<type>:default`-slugged row when several exist)
8965
9021
  * - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
8966
9022
  *
8967
9023
  * The orchestrator's `resolveRef(ref)` handles both cases.
@@ -9138,6 +9194,111 @@ var DecoderSessionConfigSchema = object({
9138
9194
  debug: boolean().optional()
9139
9195
  });
9140
9196
  /**
9197
+ * Per-component log CHANNELS — the gate a hot path consults, and the registry
9198
+ * an addon declares its channels in.
9199
+ *
9200
+ * ## Two axes, deliberately separated
9201
+ *
9202
+ * - **DECLARATION** — which channels exist. Only the addon knows:
9203
+ * `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
9204
+ * baichuan/handshake. A hand-wired central list rots at the first addition,
9205
+ * and rots silently. So a channel is declared where it is consulted, and the
9206
+ * `log-channels` capability enumerates the declarations.
9207
+ * - **VALUE** — at which level, for which scope, until when. That stays ONE
9208
+ * thing: the logging settings document on the `system` cap. Two authorities
9209
+ * over the values is the exact defect
9210
+ * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
9211
+ * remove; re-introducing it from the cure side would be grotesque.
9212
+ *
9213
+ * Nothing in this file reads a clock, an env var or a store. The registry is
9214
+ * a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
9215
+ * the hot path with a value somebody actually read, and by
9216
+ * {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
9217
+ * never reaches here, so it can neither disarm an armed channel nor arm a
9218
+ * disarmed one (D49).
9219
+ *
9220
+ * ## The canonical call shape
9221
+ *
9222
+ * ```ts
9223
+ * if (CH_RTP.on && CH_RTP.wants(deviceId)) {
9224
+ * CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
9225
+ * }
9226
+ * ```
9227
+ *
9228
+ * `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
9229
+ * read. Disarmed, a call site costs one load and one branch, and the `extras`
9230
+ * object literal is never constructed because it lives inside the branch. It
9231
+ * is the same shape already proven in production at `stream-broker.ts:1650`,
9232
+ * and the same discipline `LoggingGate.allowsDestination` uses for the
9233
+ * destination floor (measured at 1.93 ns/call when off).
9234
+ *
9235
+ * ## Why a channel emits at `info`
9236
+ *
9237
+ * `loki-logging.addon.ts` pins the destination default at `info` and
9238
+ * `loki-destination.ts` drops everything below it, so a line emitted at
9239
+ * `debug` never reaches Loki and the hub's in-memory ring only holds ~35
9240
+ * minutes. A diagnostic that cannot be read an hour later is worse than no
9241
+ * diagnostic, because it looks done. {@link LogChannelGate.log} therefore
9242
+ * emits at the channel's declared level, whose schema floor is `info`.
9243
+ */
9244
+ /**
9245
+ * The level a channel writes at once armed.
9246
+ *
9247
+ * `debug` is absent ON PURPOSE and not by omission: below `info` the line does
9248
+ * not leave the process for Loki, and the whole point of arming a channel is
9249
+ * to read it later.
9250
+ */
9251
+ var LogChannelLevelSchema = _enum([
9252
+ "info",
9253
+ "warn",
9254
+ "error"
9255
+ ]);
9256
+ /**
9257
+ * What an addon declares about one channel. No value, no state — a
9258
+ * declaration is inert.
9259
+ */
9260
+ var LogChannelDescriptorSchema = object({
9261
+ /**
9262
+ * Dotted `area.thing`, unique across the workspace. `area` is conventionally
9263
+ * the addon's short name so an operator reading a channel list can tell who
9264
+ * owns it without a second lookup.
9265
+ */
9266
+ name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
9267
+ /** One sentence: what the operator will SEE after arming it. */
9268
+ description: string().min(1),
9269
+ /** The level its lines are emitted at. Never below `info`. */
9270
+ defaultLevel: LogChannelLevelSchema,
9271
+ /**
9272
+ * Whether this channel can be narrowed to a camera.
9273
+ *
9274
+ * `true` is a PROMISE with two halves, and both must hold: the gate is
9275
+ * consulted with the numeric device id, AND every line the channel admits
9276
+ * carries `tags: { deviceId }` with that same numeric id. The second half is
9277
+ * what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
9278
+ * keeps `deviceId` out of the stream labels for cardinality, so the tag in
9279
+ * the body is the only way to filter.
9280
+ *
9281
+ * A channel whose lines carry the device only in `meta` (or not at all) is
9282
+ * declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
9283
+ * the operator narrows to one camera, sees nothing, and concludes the code
9284
+ * path was never taken.
9285
+ */
9286
+ perDevice: boolean()
9287
+ });
9288
+ /**
9289
+ * An armed window over one channel, as the document hands it to a mirror.
9290
+ *
9291
+ * A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
9292
+ * expires by itself, which is the one failure a boolean cannot avoid.
9293
+ */
9294
+ var LogChannelWindowSchema = object({
9295
+ channel: string().min(1),
9296
+ /** Epoch ms the window closes at. */
9297
+ armedUntilMs: number(),
9298
+ /** `null` = every camera. A non-empty list narrows to those numeric ids. */
9299
+ deviceIds: array(number().int()).readonly().nullable()
9300
+ });
9301
+ /**
9141
9302
  * Distinct (device, family, variant) counters one instance will hold.
9142
9303
  *
9143
9304
  * A large fleet x the handful of families any single addon reports, with
@@ -23483,7 +23644,7 @@ method(object({
23483
23644
  downloadId: string(),
23484
23645
  offset: number(),
23485
23646
  length: number()
23486
- }), _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({
23647
+ }), _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({
23487
23648
  createdAt: true,
23488
23649
  updatedAt: true
23489
23650
  }), StorageLocationSchema, {
@@ -23495,7 +23656,7 @@ method(object({
23495
23656
  }), _void(), {
23496
23657
  kind: "mutation",
23497
23658
  auth: "admin"
23498
- }), method(object({ id: string() }), object({
23659
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
23499
23660
  ok: boolean(),
23500
23661
  error: string().optional()
23501
23662
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -23565,6 +23726,71 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
23565
23726
  kind: "mutation",
23566
23727
  auth: "admin"
23567
23728
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
23729
+ /**
23730
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
23731
+ * location (D388).
23732
+ *
23733
+ * ## Why this is not `storage-evictable`
23734
+ *
23735
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
23736
+ * not, in two ways that both matter and both bite hardest on the locations an
23737
+ * operator most wants a figure for:
23738
+ *
23739
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
23740
+ * and `recordingsLow:default` deliberately share one root and evict as one
23741
+ * oldest-first pool, so both answer with the SAME combined total. As an
23742
+ * occupancy figure that double-counts the disk.
23743
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
23744
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
23745
+ * is retiring and staring at.
23746
+ *
23747
+ * So this is its own contract with its own quantity, and the quantity is
23748
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
23749
+ * would ever be willing to delete it. A provider that can only answer
23750
+ * "evictable" must not register here — a number that silently means different
23751
+ * things per class is worse than no number.
23752
+ *
23753
+ * ## Absence is an answer
23754
+ *
23755
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
23756
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
23757
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
23758
+ * consuming side has to be written out loud instead of appearing by accident.
23759
+ *
23760
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
23761
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
23762
+ */
23763
+ /** One provider's occupancy answer for one location. */
23764
+ var StorageOccupancyReportSchema = object({
23765
+ locationId: string(),
23766
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
23767
+ * not net of what it is willing to delete. */
23768
+ ownedBytes: number().int().nonnegative(),
23769
+ /** When the provider last actually measured this. The orchestrator carries it
23770
+ * through so a UI can say how old the figure is instead of implying "now". */
23771
+ measuredAtMs: number().int().nonnegative()
23772
+ });
23773
+ var storageOccupancyCapability = {
23774
+ name: "storage-occupancy",
23775
+ scope: "system",
23776
+ mode: "collection",
23777
+ internal: true,
23778
+ methods: {
23779
+ /**
23780
+ * Occupancy for the given locations, in ONE round trip.
23781
+ *
23782
+ * A provider answers only for the locations it actually holds bytes on and
23783
+ * OMITS the rest — an omitted location is "I hold nothing measurable here",
23784
+ * which the orchestrator merges as a contribution of nothing rather than as
23785
+ * a claim that the location is empty. Only a location no provider reports
23786
+ * at all stays unknown.
23787
+ *
23788
+ * This must be CHEAP and must never walk a filesystem: it is on the admin
23789
+ * UI's `listLocations` path. The owner keeps its own figure fresh (D224) and
23790
+ * answers from what it already has.
23791
+ */
23792
+ getOccupancy: method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" }) }
23793
+ };
23568
23794
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
23569
23795
  providerId: string().min(1),
23570
23796
  displayName: string().min(1),
@@ -25414,88 +25640,6 @@ onStatusChanged: { data: object({
25414
25640
  volatileStateFields: ["lastUpdated"]
25415
25641
  };
25416
25642
  /**
25417
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
25418
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
25419
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
25420
- * one Home Assistant projection.
25421
- */
25422
- var NetworkLinkStatusSchema = object({
25423
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
25424
- type: _enum([
25425
- "wifi",
25426
- "ethernet",
25427
- "cellular",
25428
- "unknown"
25429
- ]),
25430
- /**
25431
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
25432
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
25433
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
25434
- * one whose reading has not landed must not be drawn at 0 %. Consumers
25435
- * SKIP a null rather than coerce it.
25436
- */
25437
- signalPercent: number().min(0).max(100).nullable(),
25438
- /** Raw received signal strength in dBm, when the firmware reports one. */
25439
- rssiDbm: number().optional(),
25440
- /** Network name of a wireless link, when the firmware reports it. */
25441
- ssid: string().optional(),
25442
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
25443
- lastUpdated: number()
25444
- });
25445
- var networkLinkCapability = {
25446
- name: "network-link",
25447
- scope: "device",
25448
- deviceNative: true,
25449
- mode: "singleton",
25450
- deviceTypes: [
25451
- DeviceType.Camera,
25452
- DeviceType.Sensor,
25453
- DeviceType.Button,
25454
- DeviceType.Switch,
25455
- DeviceType.Light,
25456
- DeviceType.Lock,
25457
- DeviceType.Siren
25458
- ],
25459
- methods: {},
25460
- events: {
25461
- /**
25462
- * Emitted whenever the cached status changes (a link switch, a signal
25463
- * reading that moved). Mirrored on the parent chain by the
25464
- * DeviceEventPropagator like `battery.onStatusChanged`.
25465
- */
25466
- onStatusChanged: { data: object({
25467
- deviceId: number(),
25468
- status: NetworkLinkStatusSchema
25469
- }) } },
25470
- status: {
25471
- schema: NetworkLinkStatusSchema,
25472
- kind: "push",
25473
- empty: {
25474
- type: "unknown",
25475
- signalPercent: null,
25476
- lastUpdated: 0
25477
- }
25478
- },
25479
- /**
25480
- * Runtime-state slice — every provider stores the same shape under
25481
- * `device.runtimeState['network-link']`, read once by the badge and the
25482
- * Home Assistant projector regardless of the driver.
25483
- */
25484
- runtimeState: NetworkLinkStatusSchema,
25485
- /**
25486
- * Runtime-state durability: **restored** — a link reading is slow to
25487
- * change and a sleeping battery camera may not report for hours; the
25488
- * restored slice is what the badge shows until the next read.
25489
- *
25490
- * See `RuntimeStateDurability`. Enforced by
25491
- * `scripts/check-runtime-state-durability.ts`.
25492
- */
25493
- durability: "restored",
25494
- /** Clock fields: written, but excluded from the compare that decides
25495
- * whether persisting is worth a SQLite commit. */
25496
- volatileStateFields: ["lastUpdated"]
25497
- };
25498
- /**
25499
25643
  * Generic boolean sensor — last-resort fallback when no domain-
25500
25644
  * specific binary cap fits (Home Assistant `binary_sensor` without a
25501
25645
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -29051,6 +29195,369 @@ var nativeObjectDetectionCapability = {
29051
29195
  volatileStateFields: ["lastFetchedAt"]
29052
29196
  };
29053
29197
  /**
29198
+ * `navigation` — a device-scoped capability that natively expresses the FULL
29199
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
29200
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
29201
+ *
29202
+ * Why a NEW cap rather than overloading `ptz`:
29203
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
29204
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
29205
+ * The two are different physical models: PTZ is absolute-position + presets,
29206
+ * navigation is momentary drive nudges + discrete robot ACTIONS
29207
+ * (dock / spot-clean / follow-pet / go-to-point / …).
29208
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
29209
+ * the reverse:
29210
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
29211
+ * / `getOptions`), and
29212
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
29213
+ * robot camera shows up in the existing PTZ control path without every
29214
+ * PTZ provider learning about robots. The mapping lives in the adapter,
29215
+ * not here (see the addon design note):
29216
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
29217
+ * ptz.stop() → navigation.stop()
29218
+ * ptz.goHome() → navigation.runAction('goHome')
29219
+ * ptz.getPresets() → navigation.listActions() (id→preset)
29220
+ * ptz.goToPreset(id) → navigation.runAction(id)
29221
+ *
29222
+ * ## Continuous drive
29223
+ *
29224
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
29225
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
29226
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
29227
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
29228
+ * coalesce them. The UI owns the cadence.
29229
+ *
29230
+ * ## The action dictionary
29231
+ *
29232
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
29233
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
29234
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
29235
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
29236
+ * vendor-specific list. `kind: 'action'` entries are triggered with
29237
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
29238
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
29239
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
29240
+ *
29241
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
29242
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
29243
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
29244
+ * every device handle. A future nodedreame publish adds a typed
29245
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
29246
+ * provider can then swap the raw calls for the typed methods with no change to
29247
+ * THIS contract.
29248
+ */
29249
+ /**
29250
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
29251
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
29252
+ * halts it.
29253
+ *
29254
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
29255
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
29256
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
29257
+ * vector by it (drivers without proportional drive ignore it).
29258
+ *
29259
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
29260
+ * axis alone; an all-undefined nudge is a no-op.
29261
+ */
29262
+ var NavigationMoveCommandSchema = object({
29263
+ pan: number().min(-1).max(1).optional(),
29264
+ tilt: number().min(-1).max(1).optional(),
29265
+ speed: number().min(0).max(1).optional()
29266
+ });
29267
+ /**
29268
+ * The enumerated discrete actions a navigation-capable robot can perform via
29269
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
29270
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
29271
+ * `playSound` (see the `sound` dictionary entries).
29272
+ */
29273
+ var NavigationActionIdSchema = _enum([
29274
+ "goHome",
29275
+ "locate",
29276
+ "spotClean",
29277
+ "findPet",
29278
+ "personFollow",
29279
+ "stop",
29280
+ "startClean",
29281
+ "pauseClean",
29282
+ "dockWash",
29283
+ "autoEmpty",
29284
+ "flashOn",
29285
+ "flashOff"
29286
+ ]);
29287
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
29288
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
29289
+ /**
29290
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
29291
+ * native panel and the PTZ mimic render as a button.
29292
+ *
29293
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
29294
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
29295
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
29296
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
29297
+ * - `label` — operator-facing English label.
29298
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
29299
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
29300
+ * PTZ render ONLY enabled entries. Data-driven: the provider
29301
+ * flips it from config, never by editing code.
29302
+ */
29303
+ var NavigationActionEntrySchema = object({
29304
+ id: string(),
29305
+ kind: NavigationEntryKindSchema,
29306
+ label: string(),
29307
+ icon: string(),
29308
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
29309
+ soundId: number().int().optional(),
29310
+ /** Per-device feature flag — render this entry only when true. */
29311
+ enabled: boolean()
29312
+ });
29313
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
29314
+ var NavigationPointSchema = object({
29315
+ x: number(),
29316
+ y: number()
29317
+ });
29318
+ /**
29319
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
29320
+ * The cap reports which are enabled so the UI / PTZ render only the controls
29321
+ * that are turned on for THIS device. Data-driven: the provider derives these
29322
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
29323
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
29324
+ * that are not dictionary entries.
29325
+ *
29326
+ * - `move` / `stop` — the momentary drive joystick.
29327
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
29328
+ * map-coordinate plumbing is wired.
29329
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
29330
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
29331
+ * - `light` — the on/off fill-light toggle (works anytime).
29332
+ * - `lightMode` — the auto/manual selector + manual level slider (a
29333
+ * camera-service control; needs an active stream).
29334
+ */
29335
+ var NavigationFeaturesSchema = object({
29336
+ move: boolean(),
29337
+ stop: boolean(),
29338
+ goToPoint: boolean(),
29339
+ runAction: boolean(),
29340
+ playSound: boolean(),
29341
+ light: boolean(),
29342
+ lightMode: boolean()
29343
+ });
29344
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
29345
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
29346
+ /**
29347
+ * Live navigation state so the UI can reflect what the robot is doing:
29348
+ * - `mode` — coarse activity (idle / cleaning / following / …).
29349
+ * - `following` — person/pet follow is currently armed.
29350
+ * - `flash` — the on-camera fill light is on.
29351
+ * - `lightMode` — auto vs manual fill-light mode.
29352
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
29353
+ * `lightMode === 'manual'`.
29354
+ */
29355
+ var NavigationStatusSchema = object({
29356
+ mode: _enum([
29357
+ "idle",
29358
+ "cleaning",
29359
+ "spot",
29360
+ "following",
29361
+ "goto",
29362
+ "returning",
29363
+ "paused",
29364
+ "unknown"
29365
+ ]),
29366
+ following: boolean(),
29367
+ flash: boolean(),
29368
+ lightMode: NavigationLightModeSchema,
29369
+ lightLevel: number().min(40).max(100),
29370
+ /** Ms epoch when the slice was last updated. */
29371
+ lastChangedAt: number()
29372
+ });
29373
+ /**
29374
+ * Runtime-state slice owned by this cap (kernel-managed: validated, mirrored,
29375
+ * observable). Adds `lastFetchedAt` on top of the status shape per the
29376
+ * convention.
29377
+ */
29378
+ var NavigationRuntimeStateSchema = NavigationStatusSchema.extend({ lastFetchedAt: number() });
29379
+ var navigationCapability = {
29380
+ name: "navigation",
29381
+ scope: "device",
29382
+ deviceNative: true,
29383
+ mode: "singleton",
29384
+ deviceTypes: [DeviceType.Camera],
29385
+ deviceConfig: { ui: {
29386
+ kind: "widget",
29387
+ widgetId: "host/navigation-panel",
29388
+ tab: "navigation",
29389
+ topTab: true,
29390
+ label: "Navigation",
29391
+ order: 0
29392
+ } },
29393
+ methods: {
29394
+ /**
29395
+ * Momentary drive nudge (the robot moves). `protected` — mirrors
29396
+ * `ptz.continuousMove` so the Viewer navigation panel (and the PTZ-mimic
29397
+ * path) works for any authenticated user, not admin-only. The UI sends
29398
+ * these at ~1 Hz while a control is held; the provider forwards each one to
29399
+ * a single drive write WITHOUT debouncing.
29400
+ */
29401
+ move: method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
29402
+ /** Halt all motion immediately (zero drive vector). */
29403
+ stop: method(object({ deviceId: number() }), _void(), { kind: "mutation" }),
29404
+ /** Send the robot to a point on its live map. */
29405
+ goToPoint: method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
29406
+ /**
29407
+ * Enumerate the discrete controls THIS device supports (data-driven UI +
29408
+ * PTZ mimic). Camera-probed subset of {@link NAVIGATION_ACTION_CATALOG}.
29409
+ */
29410
+ listActions: method(object({ deviceId: number() }), array(NavigationActionEntrySchema)),
29411
+ /**
29412
+ * Run one discrete action (a `kind:'action'` dictionary entry). Invalid /
29413
+ * unsupported action ids are rejected by the provider.
29414
+ */
29415
+ runAction: method(object({
29416
+ deviceId: number(),
29417
+ actionId: NavigationActionIdSchema
29418
+ }), _void(), { kind: "mutation" }),
29419
+ /** Play a sound by its wire id (the `soundId` of a `kind:'sound'` entry). */
29420
+ playSound: method(object({
29421
+ deviceId: number(),
29422
+ soundId: number().int()
29423
+ }), _void(), { kind: "mutation" }),
29424
+ /**
29425
+ * Turn the on-camera fill light on / off (the `OpenFullLight` control —
29426
+ * works anytime, no active stream required).
29427
+ */
29428
+ setLightOn: method(object({
29429
+ deviceId: number(),
29430
+ on: boolean()
29431
+ }), _void(), { kind: "mutation" }),
29432
+ /**
29433
+ * Set the fill-light mode (auto vs manual). `manual` optionally carries the
29434
+ * initial `level`. The auto/manual + level control is a CAMERA-service
29435
+ * action that generally needs an active camera stream/monitor session — the
29436
+ * UI shows the manual level slider ONLY when `mode === 'manual'`.
29437
+ */
29438
+ setLightMode: method(object({
29439
+ deviceId: number(),
29440
+ mode: NavigationLightModeSchema,
29441
+ level: number().min(40).max(100).optional()
29442
+ }), _void(), { kind: "mutation" }),
29443
+ /** Set the MANUAL fill-light level (40..100). Implies `manual` mode. */
29444
+ setLightLevel: method(object({
29445
+ deviceId: number(),
29446
+ level: number().min(40).max(100)
29447
+ }), _void(), { kind: "mutation" }),
29448
+ /**
29449
+ * Per-device FEATURE-FLAG report for the general primitives — drives which
29450
+ * controls the UI shows (the per-entry flags for the dictionary come back on
29451
+ * `listActions`).
29452
+ */
29453
+ getFeatures: method(object({ deviceId: number() }), NavigationFeaturesSchema)
29454
+ },
29455
+ events: { onStatusChanged: { data: object({
29456
+ deviceId: number(),
29457
+ status: NavigationStatusSchema
29458
+ }) } },
29459
+ status: {
29460
+ schema: NavigationStatusSchema,
29461
+ kind: "push"
29462
+ },
29463
+ /**
29464
+ * Runtime-state slice mirrored by the kernel. The navigation panel watches it
29465
+ * for live mode / follow / flash changes.
29466
+ */
29467
+ runtimeState: NavigationRuntimeStateSchema,
29468
+ /**
29469
+ * Runtime-state durability: **session** — like `vacuum-control`, a restored
29470
+ * `mode: cleaning` / `following: true` is a robot that is not actually doing
29471
+ * that. The live handle re-publishes on connect.
29472
+ *
29473
+ * See `RuntimeStateDurability`. Enforced by
29474
+ * `scripts/check-runtime-state-durability.ts`.
29475
+ */
29476
+ durability: "session"
29477
+ };
29478
+ /**
29479
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
29480
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
29481
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
29482
+ * one Home Assistant projection.
29483
+ */
29484
+ var NetworkLinkStatusSchema = object({
29485
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
29486
+ type: _enum([
29487
+ "wifi",
29488
+ "ethernet",
29489
+ "cellular",
29490
+ "unknown"
29491
+ ]),
29492
+ /**
29493
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
29494
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
29495
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
29496
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
29497
+ * SKIP a null rather than coerce it.
29498
+ */
29499
+ signalPercent: number().min(0).max(100).nullable(),
29500
+ /** Raw received signal strength in dBm, when the firmware reports one. */
29501
+ rssiDbm: number().optional(),
29502
+ /** Network name of a wireless link, when the firmware reports it. */
29503
+ ssid: string().optional(),
29504
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
29505
+ lastUpdated: number()
29506
+ });
29507
+ var networkLinkCapability = {
29508
+ name: "network-link",
29509
+ scope: "device",
29510
+ deviceNative: true,
29511
+ mode: "singleton",
29512
+ deviceTypes: [
29513
+ DeviceType.Camera,
29514
+ DeviceType.Sensor,
29515
+ DeviceType.Button,
29516
+ DeviceType.Switch,
29517
+ DeviceType.Light,
29518
+ DeviceType.Lock,
29519
+ DeviceType.Siren
29520
+ ],
29521
+ methods: {},
29522
+ events: {
29523
+ /**
29524
+ * Emitted whenever the cached status changes (a link switch, a signal
29525
+ * reading that moved). Mirrored on the parent chain by the
29526
+ * DeviceEventPropagator like `battery.onStatusChanged`.
29527
+ */
29528
+ onStatusChanged: { data: object({
29529
+ deviceId: number(),
29530
+ status: NetworkLinkStatusSchema
29531
+ }) } },
29532
+ status: {
29533
+ schema: NetworkLinkStatusSchema,
29534
+ kind: "push",
29535
+ empty: {
29536
+ type: "unknown",
29537
+ signalPercent: null,
29538
+ lastUpdated: 0
29539
+ }
29540
+ },
29541
+ /**
29542
+ * Runtime-state slice — every provider stores the same shape under
29543
+ * `device.runtimeState['network-link']`, read once by the badge and the
29544
+ * Home Assistant projector regardless of the driver.
29545
+ */
29546
+ runtimeState: NetworkLinkStatusSchema,
29547
+ /**
29548
+ * Runtime-state durability: **restored** — a link reading is slow to
29549
+ * change and a sleeping battery camera may not report for hours; the
29550
+ * restored slice is what the badge shows until the next read.
29551
+ *
29552
+ * See `RuntimeStateDurability`. Enforced by
29553
+ * `scripts/check-runtime-state-durability.ts`.
29554
+ */
29555
+ durability: "restored",
29556
+ /** Clock fields: written, but excluded from the compare that decides
29557
+ * whether persisting is worth a SQLite commit. */
29558
+ volatileStateFields: ["lastUpdated"]
29559
+ };
29560
+ /**
29054
29561
  * network-quality — system-scoped singleton capability tracking RTT,
29055
29562
  * jitter, and observed/peak bandwidth per device + per client.
29056
29563
  *
@@ -30665,287 +31172,6 @@ var ptzAutotrackCapability = {
30665
31172
  */
30666
31173
  durability: "session"
30667
31174
  };
30668
- /**
30669
- * `navigation` — a device-scoped capability that natively expresses the FULL
30670
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
30671
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
30672
- *
30673
- * Why a NEW cap rather than overloading `ptz`:
30674
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
30675
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
30676
- * The two are different physical models: PTZ is absolute-position + presets,
30677
- * navigation is momentary drive nudges + discrete robot ACTIONS
30678
- * (dock / spot-clean / follow-pet / go-to-point / …).
30679
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
30680
- * the reverse:
30681
- * 1. a native CamStack navigation panel (data-driven from `listActions`
30682
- * / `getOptions`), and
30683
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
30684
- * robot camera shows up in the existing PTZ control path without every
30685
- * PTZ provider learning about robots. The mapping lives in the adapter,
30686
- * not here (see the addon design note):
30687
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
30688
- * ptz.stop() → navigation.stop()
30689
- * ptz.goHome() → navigation.runAction('goHome')
30690
- * ptz.getPresets() → navigation.listActions() (id→preset)
30691
- * ptz.goToPreset(id) → navigation.runAction(id)
30692
- *
30693
- * ## Continuous drive
30694
- *
30695
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
30696
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
30697
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
30698
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
30699
- * coalesce them. The UI owns the cadence.
30700
- *
30701
- * ## The action dictionary
30702
- *
30703
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
30704
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
30705
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
30706
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
30707
- * vendor-specific list. `kind: 'action'` entries are triggered with
30708
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
30709
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
30710
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
30711
- *
30712
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
30713
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
30714
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
30715
- * every device handle. A future nodedreame publish adds a typed
30716
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
30717
- * provider can then swap the raw calls for the typed methods with no change to
30718
- * THIS contract.
30719
- */
30720
- /**
30721
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
30722
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
30723
- * halts it.
30724
- *
30725
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
30726
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
30727
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
30728
- * vector by it (drivers without proportional drive ignore it).
30729
- *
30730
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
30731
- * axis alone; an all-undefined nudge is a no-op.
30732
- */
30733
- var NavigationMoveCommandSchema = object({
30734
- pan: number().min(-1).max(1).optional(),
30735
- tilt: number().min(-1).max(1).optional(),
30736
- speed: number().min(0).max(1).optional()
30737
- });
30738
- /**
30739
- * The enumerated discrete actions a navigation-capable robot can perform via
30740
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
30741
- * subset it supports through `listActions`. Sounds are NOT here — they go through
30742
- * `playSound` (see the `sound` dictionary entries).
30743
- */
30744
- var NavigationActionIdSchema = _enum([
30745
- "goHome",
30746
- "locate",
30747
- "spotClean",
30748
- "findPet",
30749
- "personFollow",
30750
- "stop",
30751
- "startClean",
30752
- "pauseClean",
30753
- "dockWash",
30754
- "autoEmpty",
30755
- "flashOn",
30756
- "flashOff"
30757
- ]);
30758
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
30759
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
30760
- /**
30761
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
30762
- * native panel and the PTZ mimic render as a button.
30763
- *
30764
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
30765
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
30766
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
30767
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
30768
- * - `label` — operator-facing English label.
30769
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
30770
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
30771
- * PTZ render ONLY enabled entries. Data-driven: the provider
30772
- * flips it from config, never by editing code.
30773
- */
30774
- var NavigationActionEntrySchema = object({
30775
- id: string(),
30776
- kind: NavigationEntryKindSchema,
30777
- label: string(),
30778
- icon: string(),
30779
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
30780
- soundId: number().int().optional(),
30781
- /** Per-device feature flag — render this entry only when true. */
30782
- enabled: boolean()
30783
- });
30784
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
30785
- var NavigationPointSchema = object({
30786
- x: number(),
30787
- y: number()
30788
- });
30789
- /**
30790
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
30791
- * The cap reports which are enabled so the UI / PTZ render only the controls
30792
- * that are turned on for THIS device. Data-driven: the provider derives these
30793
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
30794
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
30795
- * that are not dictionary entries.
30796
- *
30797
- * - `move` / `stop` — the momentary drive joystick.
30798
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
30799
- * map-coordinate plumbing is wired.
30800
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
30801
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
30802
- * - `light` — the on/off fill-light toggle (works anytime).
30803
- * - `lightMode` — the auto/manual selector + manual level slider (a
30804
- * camera-service control; needs an active stream).
30805
- */
30806
- var NavigationFeaturesSchema = object({
30807
- move: boolean(),
30808
- stop: boolean(),
30809
- goToPoint: boolean(),
30810
- runAction: boolean(),
30811
- playSound: boolean(),
30812
- light: boolean(),
30813
- lightMode: boolean()
30814
- });
30815
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
30816
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
30817
- /**
30818
- * Live navigation state so the UI can reflect what the robot is doing:
30819
- * - `mode` — coarse activity (idle / cleaning / following / …).
30820
- * - `following` — person/pet follow is currently armed.
30821
- * - `flash` — the on-camera fill light is on.
30822
- * - `lightMode` — auto vs manual fill-light mode.
30823
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
30824
- * `lightMode === 'manual'`.
30825
- */
30826
- var NavigationStatusSchema = object({
30827
- mode: _enum([
30828
- "idle",
30829
- "cleaning",
30830
- "spot",
30831
- "following",
30832
- "goto",
30833
- "returning",
30834
- "paused",
30835
- "unknown"
30836
- ]),
30837
- following: boolean(),
30838
- flash: boolean(),
30839
- lightMode: NavigationLightModeSchema,
30840
- lightLevel: number().min(40).max(100),
30841
- /** Ms epoch when the slice was last updated. */
30842
- lastChangedAt: number()
30843
- });
30844
- /**
30845
- * Runtime-state slice owned by this cap (kernel-managed: validated, mirrored,
30846
- * observable). Adds `lastFetchedAt` on top of the status shape per the
30847
- * convention.
30848
- */
30849
- var NavigationRuntimeStateSchema = NavigationStatusSchema.extend({ lastFetchedAt: number() });
30850
- var navigationCapability = {
30851
- name: "navigation",
30852
- scope: "device",
30853
- deviceNative: true,
30854
- mode: "singleton",
30855
- deviceTypes: [DeviceType.Camera],
30856
- deviceConfig: { ui: {
30857
- kind: "widget",
30858
- widgetId: "host/navigation-panel",
30859
- tab: "navigation",
30860
- topTab: true,
30861
- label: "Navigation",
30862
- order: 0
30863
- } },
30864
- methods: {
30865
- /**
30866
- * Momentary drive nudge (the robot moves). `protected` — mirrors
30867
- * `ptz.continuousMove` so the Viewer navigation panel (and the PTZ-mimic
30868
- * path) works for any authenticated user, not admin-only. The UI sends
30869
- * these at ~1 Hz while a control is held; the provider forwards each one to
30870
- * a single drive write WITHOUT debouncing.
30871
- */
30872
- move: method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
30873
- /** Halt all motion immediately (zero drive vector). */
30874
- stop: method(object({ deviceId: number() }), _void(), { kind: "mutation" }),
30875
- /** Send the robot to a point on its live map. */
30876
- goToPoint: method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
30877
- /**
30878
- * Enumerate the discrete controls THIS device supports (data-driven UI +
30879
- * PTZ mimic). Camera-probed subset of {@link NAVIGATION_ACTION_CATALOG}.
30880
- */
30881
- listActions: method(object({ deviceId: number() }), array(NavigationActionEntrySchema)),
30882
- /**
30883
- * Run one discrete action (a `kind:'action'` dictionary entry). Invalid /
30884
- * unsupported action ids are rejected by the provider.
30885
- */
30886
- runAction: method(object({
30887
- deviceId: number(),
30888
- actionId: NavigationActionIdSchema
30889
- }), _void(), { kind: "mutation" }),
30890
- /** Play a sound by its wire id (the `soundId` of a `kind:'sound'` entry). */
30891
- playSound: method(object({
30892
- deviceId: number(),
30893
- soundId: number().int()
30894
- }), _void(), { kind: "mutation" }),
30895
- /**
30896
- * Turn the on-camera fill light on / off (the `OpenFullLight` control —
30897
- * works anytime, no active stream required).
30898
- */
30899
- setLightOn: method(object({
30900
- deviceId: number(),
30901
- on: boolean()
30902
- }), _void(), { kind: "mutation" }),
30903
- /**
30904
- * Set the fill-light mode (auto vs manual). `manual` optionally carries the
30905
- * initial `level`. The auto/manual + level control is a CAMERA-service
30906
- * action that generally needs an active camera stream/monitor session — the
30907
- * UI shows the manual level slider ONLY when `mode === 'manual'`.
30908
- */
30909
- setLightMode: method(object({
30910
- deviceId: number(),
30911
- mode: NavigationLightModeSchema,
30912
- level: number().min(40).max(100).optional()
30913
- }), _void(), { kind: "mutation" }),
30914
- /** Set the MANUAL fill-light level (40..100). Implies `manual` mode. */
30915
- setLightLevel: method(object({
30916
- deviceId: number(),
30917
- level: number().min(40).max(100)
30918
- }), _void(), { kind: "mutation" }),
30919
- /**
30920
- * Per-device FEATURE-FLAG report for the general primitives — drives which
30921
- * controls the UI shows (the per-entry flags for the dictionary come back on
30922
- * `listActions`).
30923
- */
30924
- getFeatures: method(object({ deviceId: number() }), NavigationFeaturesSchema)
30925
- },
30926
- events: { onStatusChanged: { data: object({
30927
- deviceId: number(),
30928
- status: NavigationStatusSchema
30929
- }) } },
30930
- status: {
30931
- schema: NavigationStatusSchema,
30932
- kind: "push"
30933
- },
30934
- /**
30935
- * Runtime-state slice mirrored by the kernel. The navigation panel watches it
30936
- * for live mode / follow / flash changes.
30937
- */
30938
- runtimeState: NavigationRuntimeStateSchema,
30939
- /**
30940
- * Runtime-state durability: **session** — like `vacuum-control`, a restored
30941
- * `mode: cleaning` / `following: true` is a robot that is not actually doing
30942
- * that. The live handle re-publishes on connect.
30943
- *
30944
- * See `RuntimeStateDurability`. Enforced by
30945
- * `scripts/check-runtime-state-durability.ts`.
30946
- */
30947
- durability: "session"
30948
- };
30949
31175
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
30950
31176
  kind: "mutation",
30951
31177
  auth: "admin"
@@ -40203,13 +40429,13 @@ Object.freeze({
40203
40429
  addonId: null,
40204
40430
  access: "view"
40205
40431
  },
40206
- "storage.getDefaultLocation": {
40432
+ "storage.list": {
40207
40433
  capName: "storage",
40208
40434
  capScope: "system",
40209
40435
  addonId: null,
40210
40436
  access: "view"
40211
40437
  },
40212
- "storage.list": {
40438
+ "storage.listDrainProgress": {
40213
40439
  capName: "storage",
40214
40440
  capScope: "system",
40215
40441
  addonId: null,
@@ -40359,6 +40585,12 @@ Object.freeze({
40359
40585
  addonId: null,
40360
40586
  access: "view"
40361
40587
  },
40588
+ "storageOccupancy.getOccupancy": {
40589
+ capName: "storage-occupancy",
40590
+ capScope: "system",
40591
+ addonId: null,
40592
+ access: "view"
40593
+ },
40362
40594
  "storageProvider.abortUpload": {
40363
40595
  capName: "storage-provider",
40364
40596
  capScope: "system",
@@ -44362,4 +44594,4 @@ function vectorDimFromBase64(encoded) {
44362
44594
  return Math.floor(Buffer.from(encoded, "base64").byteLength / 4);
44363
44595
  }
44364
44596
  //#endregion
44365
- export { audioModeOf as $, NcSnoozeSchema as A, BaseAddon as At, SCENE_DEFAULT_UNCOVERED_POLICY as B, boolean as Bt, NcConditionDescriptorSchema as C, sceneMonitorCapability as Ct, NcRuleTargetSchema as D, videoclipsCapability as Dt, NcRuleSchema as E, vectorDimFromBase64 as Et, PoolMemoryWatchdog as F, isDeviceScopedCap as Ft, TimelapseRulePatchSchema as G, partialRecord as Gt, SceneMonitorSchema as H, literal as Ht, RECORDING_EXPORT_MAX_READ_BYTES as I, nodePin as It, VISIT_MERGE_GAP_MS as J, unknown as Jt, TimelapseRuleSchema as K, record as Kt, RetrainStatusSchema as L, sleep as Lt, NcSystemEventKindSchema as M, DeviceType as Mt, NcTaxonomySchema as N, createEvent as Nt, NcScheduleSchema as O, zoneAnalyticsCapability as Ot, OpsLogEntrySchema as P, hydrateSchema as Pt, audioMetricsCapability as Q, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS as R, _enum as Rt, NC_TAXONOMY as S, resolvePoolMemoryPolicy as St, NcRulePatchSchema as T, systemEventFilterApplies as Tt, TIMELAPSE_DENSE_FLOOR_SEC as U, number as Ut, SCENE_DIVERGED as V, discriminatedUnion as Vt, TimelapseRuleInputSchema as W, object as Wt, alarmPanelCapability as X, addonWidgetsSourceCapability as Y, EventCategory as Yt, assertTimelapseCadences as Z, MediaFileKindEnum as _, pickClusterStepModels as _t, DEFAULT_EVENT_COLOR as a, embeddingEncoderCapability as at, NC_DEFAULT_SNOOZE_MINUTES as b, readDeviceStateFrom as bt, DETECTION_MACRO_CLASSES as c, faceGalleryCapability as ct, EVENT_KIND_BY_CAP as d, isDetectionMacroClass as dt, buildEventKindDescriptor as et, EVENT_PAD_MS as f, isScheduleActive as ft, MACRO_LABELS as g, parseProcStatus as gt, LabelAttributionSchema as h, notificationRulesCapability as ht, COCO_TO_MACRO as i, deriveRecordingMode as it, NcSnoozeSuppressedSchema as j, CamProfileSchema as jt, NcSnoozeInputSchema as k, errMsg as kt, DETECTION_PIPELINE_CAP_NAME as l, failureContributionCapability as lt, FailureCounters as m, kebabToCamel as mt, BaseDevice as n, customAction as nt, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as o, encodeVectorBase64 as ot, FULL_IMAGE_BBOX as p, isSourceCap as pt, TrackSourceSchema as q, string as qt, CLUSTER_MODEL_SCOPED_STEPS as r, defineCustomActions as rt, DEFAULT_TIMELAPSE_PREVIEW_TEXT as s, evaluateSensorEdge as st, AUDIO_MACRO_LABELS as t, cosineSimilarity as tt, DeclaredDevices as u, hfModelUrl as ut, NC_ALARM_SYSTEM_EVENT_KINDS as v, pipelineAnalyticsCapability as vt, NcRuleInputSchema as w, subKindsOf as wt, NC_SNOOZE_MAX_MINUTES as x, readTimelapseGeneratedAt as xt, NC_CONDITION_CATALOG as y, plateGalleryCapability as yt, SCENE_DEFAULT_ANCHOR_THRESHOLD as z, array as zt };
44597
+ export { audioModeOf as $, EventCategory as $t, NcSnoozeSchema as A, vectorDimFromBase64 as At, SCENE_DEFAULT_UNCOVERED_POLICY as B, nodePin as Bt, NcConditionDescriptorSchema as C, readTimelapseGeneratedAt as Ct, NcRuleTargetSchema as D, storageOccupancyCapability as Dt, NcRuleSchema as E, sceneMonitorCapability as Et, PoolMemoryWatchdog as F, CamProfileSchema as Ft, TimelapseRulePatchSchema as G, discriminatedUnion as Gt, SceneMonitorSchema as H, _enum as Ht, RECORDING_EXPORT_MAX_READ_BYTES as I, DeviceType as It, VISIT_MERGE_GAP_MS as J, object as Jt, TimelapseRuleSchema as K, literal as Kt, RetrainStatusSchema as L, createEvent as Lt, NcSystemEventKindSchema as M, zoneAnalyticsCapability as Mt, NcTaxonomySchema as N, errMsg as Nt, NcScheduleSchema as O, subKindsOf as Ot, OpsLogEntrySchema as P, BaseAddon as Pt, audioMetricsCapability as Q, unknown as Qt, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS as R, hydrateSchema as Rt, NC_TAXONOMY as S, readDeviceStateFrom as St, NcRulePatchSchema as T, resolvePoolMemoryPolicy as Tt, TIMELAPSE_DENSE_FLOOR_SEC as U, array as Ut, SCENE_DIVERGED as V, sleep as Vt, TimelapseRuleInputSchema as W, boolean as Wt, alarmPanelCapability as X, record as Xt, addonWidgetsSourceCapability as Y, partialRecord as Yt, assertTimelapseCadences as Z, string as Zt, MediaFileKindEnum as _, notificationRulesCapability as _t, DEFAULT_EVENT_COLOR as a, embeddingEncoderCapability as at, NC_DEFAULT_SNOOZE_MINUTES as b, pipelineAnalyticsCapability as bt, DETECTION_MACRO_CLASSES as c, evictionPolicyOfLocation as ct, EVENT_KIND_BY_CAP as d, hfModelUrl as dt, buildEventKindDescriptor as et, EVENT_PAD_MS as f, isDetectionMacroClass as ft, MACRO_LABELS as g, mayWriteToLocation as gt, LabelAttributionSchema as h, kebabToCamel as ht, COCO_TO_MACRO as i, deriveRecordingMode as it, NcSnoozeSuppressedSchema as j, videoclipsCapability as jt, NcSnoozeInputSchema as k, systemEventFilterApplies as kt, DETECTION_PIPELINE_CAP_NAME as l, faceGalleryCapability as lt, FailureCounters as m, isSourceCap as mt, BaseDevice as n, customAction as nt, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as o, encodeVectorBase64 as ot, FULL_IMAGE_BBOX as p, isScheduleActive as pt, TrackSourceSchema as q, number as qt, CLUSTER_MODEL_SCOPED_STEPS as r, defineCustomActions as rt, DEFAULT_TIMELAPSE_PREVIEW_TEXT as s, evaluateSensorEdge as st, AUDIO_MACRO_LABELS as t, cosineSimilarity as tt, DeclaredDevices as u, failureContributionCapability as ut, NC_ALARM_SYSTEM_EVENT_KINDS as v, parseProcStatus as vt, NcRuleInputSchema as w, resolveLocationMode as wt, NC_SNOOZE_MAX_MINUTES as x, plateGalleryCapability as xt, NC_CONDITION_CATALOG as y, pickClusterStepModels as yt, SCENE_DEFAULT_ANCHOR_THRESHOLD as z, isDeviceScopedCap as zt };