@camstack/addon-import-alexa 0.2.115 → 0.2.116

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 +932 -340
  2. package/dist/addon.mjs +932 -340
  3. package/package.json +1 -3
package/dist/addon.js CHANGED
@@ -38,7 +38,7 @@ let node_os = require("node:os");
38
38
  let node_fs = require("node:fs");
39
39
  let node_path = require("node:path");
40
40
  node_path = __toESM(node_path);
41
- //#region ../types/dist/event-category-C5xZWqz6.mjs
41
+ //#region ../types/dist/event-category-BGmz_oxW.mjs
42
42
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
43
43
  EventCategory["SystemBoot"] = "system.boot";
44
44
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -571,6 +571,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
571
571
  */
572
572
  EventCategory["PipelineAudioInferenceResult"] = "pipeline.audio-inference-result";
573
573
  EventCategory["DetectionPhaseTransition"] = "detection.phase-transition";
574
+ /**
575
+ * A camera provider's RAW onboard motion push (D673): the `MotionOnMotionChanged`
576
+ * data shape without `triggeredBy`, built by `providerMotionEvent`. Its one
577
+ * consumer is the orchestrator's camera-sensors bridge, which re-emits the
578
+ * camera's EFFECTIVE onboard motion as `MotionOnMotionChanged` (a pass-through
579
+ * for a camera with no attached sensor). Providers must not emit
580
+ * `MotionOnMotionChanged` themselves; `scripts/check-onboard-motion-emitters.ts`
581
+ * keeps it so (camera-grid is a named, deferred exception).
582
+ */
574
583
  EventCategory["ProviderMotion"] = "provider.motion";
575
584
  EventCategory["ProviderDetection"] = "provider.detection";
576
585
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
@@ -5409,7 +5418,7 @@ var ZodIssueCode = {
5409
5418
  var ZodFirstPartyTypeKind;
5410
5419
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5411
5420
  //#endregion
5412
- //#region ../types/dist/sleep-gU6hqv4_.mjs
5421
+ //#region ../types/dist/sleep-CDCONfkt.mjs
5413
5422
  /**
5414
5423
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5415
5424
  * window to float samples (D455).
@@ -7452,7 +7461,7 @@ function errMsg(err) {
7452
7461
  return String(err);
7453
7462
  }
7454
7463
  //#endregion
7455
- //#region ../types/dist/composition-Dq42XWp0.mjs
7464
+ //#region ../types/dist/composition-Bzr7GwgP.mjs
7456
7465
  /**
7457
7466
  * The ffmpeg build every CamStack node downloads, per platform and arch.
7458
7467
  *
@@ -7506,21 +7515,20 @@ function portable(target) {
7506
7515
  }
7507
7516
  portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac64");
7508
7517
  /**
7509
- * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
7510
- * valutatore puro del suo FRONTE.
7518
+ * THE table "which boolean of this device type counts as HIGH", and the
7519
+ * pure evaluator of its EDGE.
7511
7520
  *
7512
- * Viveva dentro il builtin virtual-doorbell
7513
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
7514
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
7515
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
7516
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
7517
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
7518
- * SPOSTA qui e il doorbell la ri-esporta.
7521
+ * ONE table for everyone who asks "is this device HIGH?": the
7522
+ * recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
7523
+ * sensor markers, the orchestrator's camera-sensors bridge and
7524
+ * the sources of a composite doorbell (`doorbellFeatureSources`, D671).
7525
+ * A second copy would diverge at the first cap added, and the symptom — "the
7526
+ * sensor rings the doorbell but does not record" — is exactly D62.
7519
7527
  *
7520
- * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
7521
- * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
7522
- * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
7523
- * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
7528
+ * ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
7529
+ * two must not be unified: that one answers "what is the state WORD for a
7530
+ * rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
7531
+ * boolean's EDGE counts". Deliberately different vocabularies.
7524
7532
  */
7525
7533
  /**
7526
7534
  * Known binary / switch source caps → the boolean slice field whose
@@ -9246,22 +9254,22 @@ var CLASS_MAP_MACRO_TARGETS = [
9246
9254
  "package"
9247
9255
  ];
9248
9256
  /**
9249
- * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
9250
- * un operatore può selezionare.
9257
+ * The FIRST-LEVEL macro classes: those an object detector emits and that
9258
+ * an operator can select.
9251
9259
  *
9252
- * Sono le tre offerte dallo step `object-detection`
9260
+ * They are the three offered by the `object-detection` step
9253
9261
  * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
9254
- * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
9255
- * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
9256
- * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
9257
- * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
9262
+ * `enabledMacroClasses`). `package` is in {@link CLASS_MAP_MACRO_TARGETS} and in
9263
+ * `MACRO_LABELS` — it is a true macro — but NOT here: it belongs to the step
9264
+ * `package-detection`, whose enablement is driven by zones, and offering the
9265
+ * same word twice has already made an operator turn on the COCO proxy
9258
9266
  * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
9259
9267
  *
9260
- * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
9261
- * dello step e una seconda volta come union `FirstLevelMacro`
9262
- * (`types/detection.ts`); una terza copia per il trigger di registrazione
9263
- * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
9264
- * successiva.
9268
+ * ONE list. Before today the same three were hand-written in the step's offer
9269
+ * and a second time as the union `FirstLevelMacro`
9270
+ * (`types/detection.ts`); a third copy for the recording trigger
9271
+ * (`RecordingTriggers.objectClasses`) would have made the later divergence
9272
+ * invisible.
9265
9273
  */
9266
9274
  var FIRST_LEVEL_MACRO_CLASSES = [
9267
9275
  "person",
@@ -9326,17 +9334,17 @@ var RecordingStorageModeSchema = _enum([
9326
9334
  "on-device-decision"
9327
9335
  ]);
9328
9336
  /**
9329
- * Le macro classi che possono aprire una finestra di registrazione — le stesse
9330
- * tre offerte dallo step `object-detection`, da UNA lista
9337
+ * The macro classes that can open a recording window — the same
9338
+ * three offered by the `object-detection` step, from ONE list
9331
9339
  * ({@link FIRST_LEVEL_MACRO_CLASSES}).
9332
9340
  */
9333
9341
  var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
9334
9342
  /**
9335
- * True quando `values` non ripete un elemento.
9343
+ * True when `values` does not repeat an element.
9336
9344
  *
9337
- * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
9338
- * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
9339
- * conterebbe due volte le sue finestre in `segmentMissedByMs`.
9345
+ * A duplicate is not harmless: every entry of `objectClasses` / `sensorDeviceIds`
9346
+ * becomes a SOURCE in `bandTriggerSources`, and the same source twice
9347
+ * would count its windows twice in `segmentMissedByMs`.
9340
9348
  */
9341
9349
  var noDuplicates = (values) => new Set(values).size === values.length;
9342
9350
  /** Which detectors trigger an `events`-mode band. */
@@ -9344,34 +9352,34 @@ var RecordingTriggersSchema = object({
9344
9352
  motion: boolean().optional(),
9345
9353
  audioThresholdDbfs: number().optional(),
9346
9354
  /**
9347
- * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
9348
- * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
9349
- * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
9350
- * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
9355
+ * The macro classes whose detection opens a window. ABSENT = the source
9356
+ * is not listened to; an EMPTY array is rejected, because "events band, object
9357
+ * trigger on, no class" is the same shape "enabled and records
9358
+ * nothing, forever" that `eventsBandCanEverDemand` is written against.
9351
9359
  *
9352
- * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
9353
- * quelle che hanno attraversato `enabledMacroClasses`, i
9354
- * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
9355
- * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
9356
- * finestre — vedi `recorder/object-trigger.ts`.
9360
+ * The signal read is ALREADY FILTERED: only `source: 'pipeline'` detections, i.e.
9361
+ * those that went through `enabledMacroClasses`, the
9362
+ * `minConfidence<Macro>` and the full-frame guard. The camera's onboard AI
9363
+ * (`source: 'onboard'`) goes through none of those gates and does NOT open
9364
+ * windows — see `recorder/object-trigger.ts`.
9357
9365
  */
9358
9366
  objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
9359
9367
  /**
9360
- * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
9361
- * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
9368
+ * The LINKED devices whose RISING EDGE opens a window. Absent = the source
9369
+ * is not listened to; an empty array is rejected for the same reason as
9362
9370
  * `objectClasses`.
9363
9371
  *
9364
- * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
9365
- * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
9366
- * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
9367
- * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
9368
- * device (D12) — mai un elenco globale di cap.
9372
+ * These are SOURCE device ids, not cameras: the band names them, so the
9373
+ * hot path (`DeviceStateChanged`, at bus rate across the whole fleet)
9374
+ * does no RPC. The OFFER from which the operator picks them is another question, and
9375
+ * is resolved with `deviceManager.getLinkedDevices` + `getBindingsBatch` per
9376
+ * device (D12) — never a global list of caps.
9369
9377
  *
9370
- * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
9371
- * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
9372
- * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
9373
- * il livello: un contatto trovato già aperto al riavvio del runner non fa
9374
- * registrare.
9378
+ * What "high" means depends on the device TYPE and is not decided here:
9379
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) is THE table,
9380
+ * the same one as the composite doorbell (D671). And it is the EDGE, not
9381
+ * the level: a contact found already open at runner restart does not
9382
+ * record.
9375
9383
  */
9376
9384
  sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
9377
9385
  });
@@ -10448,7 +10456,7 @@ var DecoderSessionConfigSchema = object({
10448
10456
  * - **VALUE** — at which level, for which scope, until when. That stays ONE
10449
10457
  * thing: the logging settings document on the `system` cap. Two authorities
10450
10458
  * over the values is the exact defect
10451
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
10459
+ * `docs/design/plans/2026-08-26-per-component-logging.md` was written to
10452
10460
  * remove; re-introducing it from the cure side would be grotesque.
10453
10461
  *
10454
10462
  * Nothing in this file reads a clock, an env var or a store. The registry is
@@ -12178,7 +12186,7 @@ var BrokerStatusEnum = _enum([
12178
12186
  "unreachable",
12179
12187
  "error"
12180
12188
  ]);
12181
- var BrokerInfoSchema$1 = object({
12189
+ var BrokerInfoSchema = object({
12182
12190
  /** Stable broker id. Persisted; survives addon restarts. */
12183
12191
  id: string(),
12184
12192
  /** Addon id of the provider that OWNS this broker.
@@ -12321,8 +12329,8 @@ var brokerCapability = {
12321
12329
  kind: "poll"
12322
12330
  },
12323
12331
  methods: {
12324
- list: method(ListInputSchema, array(BrokerInfoSchema$1)),
12325
- get: method(GetInputSchema, BrokerInfoSchema$1.nullable()),
12332
+ list: method(ListInputSchema, array(BrokerInfoSchema)),
12333
+ get: method(GetInputSchema, BrokerInfoSchema.nullable()),
12326
12334
  /** Enumerate which addon provides which broker kind(s) for the
12327
12335
  * unified create picker. The auto-mount fans this array across
12328
12336
  * every registered `broker` provider (array-output method), so the
@@ -14071,7 +14079,7 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
14071
14079
  *
14072
14080
  * ⚠ An earlier version of this comment blamed Zod stripping, and that
14073
14081
  * was wrong — corrected 2026-08-26 after the hop map
14074
- * (`docs/design/2026-08-26-mappa-hop-argomenti.md`) traced the path.
14082
+ * (`docs/design/2026-08-26-topic-hop-map.md`) traced the path.
14075
14083
  * There is **no Zod parse at all** between the door and the engine: the
14076
14084
  * dispatcher forwards the payload verbatim and UDS carries it whole. A
14077
14085
  * field declared here reaches `SqliteSettingsBackend` either way.
@@ -14951,7 +14959,17 @@ var SiteZoneSchema = object({
14951
14959
  var ProviderStatusSchema = object({
14952
14960
  connected: boolean(),
14953
14961
  deviceCount: number(),
14954
- error: string().optional()
14962
+ error: string().optional(),
14963
+ /**
14964
+ * `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
14965
+ * — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
14966
+ * which every provider bundles, so only a provider BUILT from D696-amended
14967
+ * code says it. ABSENT means an older provider that may still write it (raw
14968
+ * VMD writes, a boot seed), and the orchestrator's provider gate keeps that
14969
+ * provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
14970
+ * — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
14971
+ */
14972
+ motionSliceWriter: literal("orchestrator").optional()
14955
14973
  });
14956
14974
  object({
14957
14975
  externalId: string(),
@@ -15830,109 +15848,10 @@ method(object({
15830
15848
  deviceIds: array(number()).readonly(),
15831
15849
  caps: array(string()).readonly().optional()
15832
15850
  }), record(string(), record(string(), unknown().nullable())));
15833
- /**
15834
- * Doorbell button cap. Two kinds of providers coexist behind this cap
15835
- * name (same pattern as `snapshot`):
15836
- *
15837
- * - **Native** providers: registered per-device by device-driver
15838
- * addons via `ctx.registerNativeCap` — either on a
15839
- * `DeviceType.Button` accessory with `role: DeviceRole.Doorbell`,
15840
- * or directly on the camera (Reolink registers at camera level).
15841
- * Emits an `onPressed` event every time the firmware pushes a
15842
- * ring; status tracks the last press and a pressCount since start
15843
- * (diagnostic).
15844
- *
15845
- * - **Wrapper** provider: the `virtual-doorbell` system builtin
15846
- * (`@camstack/system/builtins/doorbell`). Turns ANY binary-ish
15847
- * device (contact / switch / event-emitter …) into a doorbell for
15848
- * a camera. `defaultActive: false` — the operator explicitly binds
15849
- * it per camera in the device-bindings UI, then picks the source
15850
- * device + trigger in the per-device settings.
15851
- *
15852
- * The DeviceEventPropagator re-emits `onPressed` on the camera parent
15853
- * — subscribers listening at the camera level receive ring events
15854
- * with `via[]` populated. No code on the parent needed.
15855
- */
15856
- var DoorbellStatusSchema = object({
15857
- /** Ms epoch of the last press. null = never observed since this provider started. */
15858
- lastPressedAt: number().nullable(),
15859
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
15860
- pressCountSinceStart: number()
15861
- });
15862
- var DoorbellPressEventSchema = object({
15863
- deviceId: number(),
15864
- timestamp: number()
15865
- });
15866
- /**
15867
- * The `doorbell-source` extension slot's editable value (D648): the camera's
15868
- * virtual-doorbell trigger devices, exactly what the wrapper's
15869
- * `doorbellSources` persists (as `{ deviceId }` records).
15870
- */
15871
- var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
15872
- /**
15873
- * The `doorbell-source` slot — which devices ring this camera's VIRTUAL
15874
- * doorbell, owned by the `virtual-doorbell` wrapper over its
15875
- * `doorbellSources` store (D648). A source rings when one of its
15876
- * `SOURCE_CAPS` rises. Whether the wrapper is bound to the camera at all is a
15877
- * different authority (`deviceManager.setWrapperActive`, D62) — the slot
15878
- * reports it, it never writes it.
15879
- */
15880
- var DOORBELL_SOURCE_SLOT = {
15881
- id: "doorbell-source",
15882
- label: "Doorbell trigger devices",
15883
- description: "Any of these becoming active rings this camera's virtual doorbell: a binary sensor when it goes active, a switch when it turns on.",
15884
- shape: "association",
15885
- hostDeviceTypes: [DeviceType.Camera],
15886
- sourceCaps: SOURCE_CAPS,
15887
- cardinality: "many",
15888
- value: DoorbellSourceSlotValueSchema
15889
- };
15890
- var doorbellCapability = {
15891
- name: "doorbell",
15892
- scope: "device",
15893
- deviceNative: true,
15894
- mode: "singleton",
15895
- kind: "wrapper",
15896
- defaultActive: false,
15897
- deviceTypes: [DeviceType.Button, DeviceType.Camera],
15898
- extensionSlots: [DOORBELL_SOURCE_SLOT],
15899
- methods: {},
15900
- events: {
15901
- /**
15902
- * Fires once per physical press. Reolink delivers via Baichuan
15903
- * push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
15904
- * release/duration — it's a pulse.
15905
- */
15906
- onPressed: {
15907
- data: DoorbellPressEventSchema,
15908
- fromState: {
15909
- field: "lastPressedAt",
15910
- on: "advance"
15911
- }
15912
- } },
15913
- status: {
15914
- schema: DoorbellStatusSchema,
15915
- kind: "push"
15916
- },
15917
- /**
15918
- * Runtime-state slice — last press timestamp + lifetime press count.
15919
- * Mirrored by the kernel and readable via
15920
- * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
15921
- * without subscribing.
15922
- */
15923
- runtimeState: DoorbellStatusSchema,
15924
- /**
15925
- * Runtime-state durability: **restored** — a monotonic accumulator: the slice IS the record. `lastPressedAt` is content here, not a clock, so it is deliberately NOT volatile.
15926
- *
15927
- * See `RuntimeStateDurability`. Enforced by
15928
- * `scripts/check-runtime-state-durability.ts`.
15929
- */
15930
- durability: "restored"
15931
- };
15932
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
15933
- DeviceType.Camera, DeviceType.Camera;
15851
+ var ExtensionSlotIdSchema = _enum(["linked-devices"]);
15852
+ DeviceType.Camera;
15934
15853
  /** A slot's editable value, discriminated on `slot`. */
15935
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15854
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15936
15855
  DeviceType.Camera;
15937
15856
  var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
15938
15857
  state: literal("unreachable"),
@@ -15969,10 +15888,11 @@ var ExtensionSlotSourceSchema = object({
15969
15888
  });
15970
15889
  /**
15971
15890
  * A DIFFERENT authority that gates whether the slot's sources do anything —
15972
- * reported read-only, named, never written through this contract (D62). The
15973
- * virtual doorbell's sources ring only while the wrapper is bound to the
15974
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
15975
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
15891
+ * reported read-only, named, never written through this contract (D62) — e.g.
15892
+ * a slot whose sources act only while a wrapper is bound to the host, a
15893
+ * binding that belongs to `deviceManager.setWrapperActive`. No slot reports
15894
+ * one today (`linked-devices` answers `null`). `unknown` means the gate could
15895
+ * not be read; it is not "inactive" (D315).
15976
15896
  */
15977
15897
  var ExtensionSlotActivationSchema = object({
15978
15898
  state: _enum([
@@ -15988,7 +15908,7 @@ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
15988
15908
  /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
15989
15909
  slotRef: string(),
15990
15910
  slot: ExtensionSlotIdSchema,
15991
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
15911
+ /** Names the store written (D62), e.g. `device-manager:_linkedDeviceIds`. */
15992
15912
  authority: string(),
15993
15913
  activation: ExtensionSlotActivationSchema.nullable(),
15994
15914
  value: ExtensionSlotValueSchema,
@@ -16266,7 +16186,7 @@ method(object({
16266
16186
  * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
16267
16187
  * ends in a log line, and a log line is the thing the operator asked to stop
16268
16188
  * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
16269
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
16189
+ * ricontrolliamo tutti questi punti"* [can we instrument these errors in the meantime? That way next round we recheck all these points]. Reading them meant grepping Loki and
16270
16190
  * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
16271
16191
  * media blackout were both diagnosed. The counters stay; this is where they can
16272
16192
  * be READ.
@@ -17642,7 +17562,7 @@ var BrokerStatusSchema$1 = _enum([
17642
17562
  "unreachable",
17643
17563
  "tls-error"
17644
17564
  ]);
17645
- var BrokerInfoSchema = object({
17565
+ var BrokerInfoSchema$1 = object({
17646
17566
  id: string(),
17647
17567
  name: string(),
17648
17568
  url: string(),
@@ -17705,7 +17625,7 @@ var StatusSchema = object({
17705
17625
  brokerCount: number(),
17706
17626
  embeddedRunning: boolean()
17707
17627
  });
17708
- method(_void(), array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
17628
+ method(_void(), array(BrokerInfoSchema$1)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
17709
17629
  kind: "mutation",
17710
17630
  auth: "admin"
17711
17631
  }), method(IdInputSchema, _void(), {
@@ -19919,78 +19839,16 @@ var NcRuleInputSchema = object({
19919
19839
  */
19920
19840
  confirm: NcConfirmSchema.optional(),
19921
19841
  /**
19922
- * WAIT for face/plate recognition before saying anything.
19923
- *
19924
- * A notification's TEXT is frozen at enqueue and its media is re-resolved at
19925
- * send; the identity is neither. A face is confirmed after `confirmFrames`
19926
- * agreeing observations — p50 **11.4 s** after the track was first seen,
19927
- * measured on this hub — and an `immediate` rule enqueues on the first object
19928
- * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
19929
- * immediate path, and no amount of media re-resolution fixes a sentence.
19930
- *
19931
- * Only two honest answers exist, and this flag picks between them. It has
19932
- * effect ONLY on a rule that declares a recognition scope
19933
- * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
19934
- * other rule there is nothing to wait for and the flag is inert.
19935
- *
19936
- * | value | what happens |
19937
- * | --- | --- |
19938
- * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
19939
- * | absent / `false` | it fires at once WITHOUT the name, and if recognition lands before the track closes a SECOND, "…is Gianluca" notification follows (one per track, per rule, per target) |
19940
- *
19941
- * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
19942
- * on the addon cap path, and absent has to keep meaning exactly what every
19943
- * rule authored before this field meant.
19944
- *
19945
- * The cost of `true` is stated here because the editor states it too: a rule
19946
- * that waits also inherits track-close SEMANTICS — its `zones` condition
19947
- * tests every zone the track visited and a `crossing` condition can no longer
19948
- * be satisfied, because a closed track carries no crossing.
19842
+ * IMMEDIATE GROUPED (D692): the first matching subject opens a window of this many
19843
+ * seconds; the rule sends ONE message when the window closes — early, once every
19844
+ * subject in it is final, never before {@link NC_GROUPING_MIN_SEC} — naming everybody
19845
+ * the rule matched, with one mosaic tile per subject.
19846
+ * Absent = plain immediate (one message per track, at the first match).
19847
+ * Only an `immediate` DETECTION rule may carry it (`ruleGroupingApplies`, enforced on
19848
+ * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
19849
+ * path does not run Zod defaults.
19949
19850
  */
19950
- waitForEnhancement: boolean().optional(),
19951
- /**
19952
- * GROUP a burst of subjects into ONE notification that grows.
19953
- *
19954
- * Seconds of quiet after the last matching subject before the burst is
19955
- * considered over. While it is open, the first subject enqueues immediately —
19956
- * **exactly as today, with no added latency** — and every real growth (a new
19957
- * subject, or a name confirmed on one already in it) REPLACES that
19958
- * notification with an updated one naming everybody. The push carries the
19959
- * group's own coalescing tag, so the phone replaces rather than stacks.
19960
- *
19961
- * `0` / absent = off, and off is today's behaviour byte for byte.
19962
- *
19963
- * ### Why an idle cutoff and not a window
19964
- *
19965
- * The measured seven-person arrival on device 590 spans 110 s with every
19966
- * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
19967
- * idle cutoff holds it as one and ends it when the arrival actually ends.
19968
- * 30 s is a widely shipped value for the same decision.
19969
- *
19970
- * ### What it replaces
19971
- *
19972
- * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
19973
- * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
19974
- * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
19975
- * track that did fire and 7 carrying a confirmed identity nobody heard about.
19976
- * A group collapses the same volume by MERGING, so the cooldown becomes a
19977
- * budget over GROUPS — which is what it always meant — and a growth is never
19978
- * throttled by the window its own first member spent.
19979
- *
19980
- * ### Interaction with {@link waitForEnhancement}
19981
- *
19982
- * They compose, and the order matters. `waitForEnhancement` defers the rule to
19983
- * TRACK CLOSE, so with both set the group is opened by the first member to
19984
- * CLOSE — already carrying its name — and grows as later members close. That
19985
- * is later, and complete. With grouping alone the group opens on the first
19986
- * object event and picks up names as they are confirmed, through the growth
19987
- * path. Neither combination fires twice for one subject.
19988
- *
19989
- * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
19990
- * on the addon cap path, so absent must keep meaning what it meant before this
19991
- * field existed.
19992
- */
19993
- groupIdleSec: number().int().min(0).max(600).optional()
19851
+ groupingSec: number().int().min(5).max(60).optional()
19994
19852
  });
19995
19853
  /**
19996
19854
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -20038,9 +19896,10 @@ var NcRuleClearableKeySchema = _enum([
20038
19896
  "targetUsers",
20039
19897
  "snoozeOptions",
20040
19898
  "snoozeAllowGlobal",
20041
- "waitForEnhancement",
20042
19899
  "actions",
20043
19900
  "confirm",
19901
+ "groupingSec",
19902
+ "waitForEnhancement",
20044
19903
  "groupIdleSec"
20045
19904
  ]);
20046
19905
  var NcRuleUpdateInputSchema = object({
@@ -20062,9 +19921,25 @@ var NcRuleSchema = NcRuleInputSchema.extend({
20062
19921
  */
20063
19922
  disabledTargetIds: array(string()).default([])
20064
19923
  });
19924
+ /**
19925
+ * The state-summary SECTIONS (D647 / D698): the D637 kind groups that report a
19926
+ * still-true state. `backups-exports` and `alarm` are not sections — a completed
19927
+ * job is not an open state, and the alarm stays instant.
19928
+ */
19929
+ var NcStateSummarySectionIdSchema = _enum([
19930
+ "device-state",
19931
+ "streams",
19932
+ "battery",
19933
+ "consumables",
19934
+ "tanks",
19935
+ "detection-blind",
19936
+ "nodes",
19937
+ "addons",
19938
+ "updates"
19939
+ ]);
20065
19940
  /** One section of a previewed state summary. `unavailable` = its state could not be read. */
20066
19941
  var NcStateSummaryPreviewSectionSchema = object({
20067
- id: string(),
19942
+ id: NcStateSummarySectionIdSchema,
20068
19943
  status: _enum(["read", "unavailable"]),
20069
19944
  items: number().int().nonnegative(),
20070
19945
  reason: string().optional()
@@ -20074,7 +19949,7 @@ var NcStateSummaryPreviewSectionSchema = object({
20074
19949
  * a `rule` split (no `section`), one section's on a `section` split.
20075
19950
  */
20076
19951
  var NcStateSummaryPreviewRowSchema = object({
20077
- section: string().optional(),
19952
+ section: NcStateSummarySectionIdSchema.optional(),
20078
19953
  /** The section's name on a per-section row; every reported section's, joined, on a combined one. */
20079
19954
  title: string(),
20080
19955
  text: string(),
@@ -20511,6 +20386,29 @@ object({
20511
20386
  firstAt: number(),
20512
20387
  lastAt: number()
20513
20388
  });
20389
+ var NC_ALARM_TRIGGERED_MAX_SEC = 3600;
20390
+ var NcAlarmDelaySecSchema = number().int().min(0).max(600);
20391
+ var NcAlarmTriggeredSecSchema = number().int().min(0).max(NC_ALARM_TRIGGERED_MAX_SEC);
20392
+ var uniqueModes = (entries) => new Set(entries.map((e) => e.mode)).size === entries.length;
20393
+ var NcAlarmModeDelaysListSchema = array(object({
20394
+ mode: AlarmArmModeSchema,
20395
+ exitDelaySec: NcAlarmDelaySecSchema.optional(),
20396
+ entryDelaySec: NcAlarmDelaySecSchema.optional(),
20397
+ triggeredDurationSec: NcAlarmTriggeredSecSchema.optional()
20398
+ })).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
20399
+ var NcAlarmModeDelaysEditListSchema = array(object({
20400
+ mode: AlarmArmModeSchema,
20401
+ exitDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
20402
+ entryDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
20403
+ triggeredDurationSec: NcAlarmTriggeredSecSchema.nullable().optional()
20404
+ })).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
20405
+ /** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
20406
+ var NcAlarmNonBlockingEditSchema = object({
20407
+ mode: AlarmArmModeSchema,
20408
+ deviceId: number().int().positive(),
20409
+ /** true = on the list (may be open, does not block); false = off the list (blocks). */
20410
+ nonBlocking: boolean()
20411
+ });
20514
20412
  /**
20515
20413
  * The per-mode lists, at most one per mode. Two lists for one mode have no
20516
20414
  * meaning a reader could agree on (union? the last one?), so they are refused
@@ -20519,10 +20417,10 @@ object({
20519
20417
  var NcAlarmNonBlockingListSchema = array(object({
20520
20418
  mode: AlarmArmModeSchema,
20521
20419
  deviceIds: array(number().int()).max(200)
20522
- })).max(8).refine((lists) => new Set(lists.map((l) => l.mode)).size === lists.length, { message: "nonBlocking: at most one list per arm mode" });
20420
+ })).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
20523
20421
  /**
20524
- * The three durations the panel's state machine runs on, who hears about its
20525
- * transitions, and which openings each mode tolerates.
20422
+ * The three durations — global, and per mode since D697 — the panel's state
20423
+ * machine runs on, who hears about its transitions, and which openings each mode tolerates.
20526
20424
  *
20527
20425
  * They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
20528
20426
  * `alarm-panel` is `deviceNative` and its other provider mirrors somebody
@@ -20532,15 +20430,15 @@ var NcAlarmNonBlockingListSchema = array(object({
20532
20430
  */
20533
20431
  var NcAlarmSettingsSchema = object({
20534
20432
  /** Grace period between arming and the mode taking effect. 0 = immediate. */
20535
- exitDelaySec: number().int().min(0).max(600),
20433
+ exitDelaySec: NcAlarmDelaySecSchema,
20536
20434
  /** Grace period between a trigger and the alarm firing. 0 = immediate. */
20537
- entryDelaySec: number().int().min(0).max(600),
20435
+ entryDelaySec: NcAlarmDelaySecSchema,
20538
20436
  /**
20539
20437
  * How long `triggered` lasts before the panel re-arms itself.
20540
20438
  * **0 = until an operator disarms it** — the behaviour before this field
20541
20439
  * existed, and therefore what an untouched install keeps doing.
20542
20440
  */
20543
- triggeredDurationSec: number().int().min(0).max(3600),
20441
+ triggeredDurationSec: NcAlarmTriggeredSecSchema,
20544
20442
  /**
20545
20443
  * Deprecated by D630 — every transition is announced. Parsed, never read;
20546
20444
  * remove after one release. Optional so an older admin's patch (which still
@@ -20563,17 +20461,30 @@ var NcAlarmSettingsSchema = object({
20563
20461
  * per mode is meaningful. Defaulted to `[]` so a blob stored before D630
20564
20462
  * parses as "every opening blocks" — the behaviour it was written under.
20565
20463
  */
20566
- nonBlocking: NcAlarmNonBlockingListSchema.default([])
20464
+ nonBlocking: NcAlarmNonBlockingListSchema.default([]),
20465
+ /**
20466
+ * Per arm mode, the delays that mode OVERRIDES (D697). A mode with no entry, or an entry
20467
+ * without a field, uses the global value above — so `[]`, the default, is exactly the
20468
+ * behaviour of a blob stored before this field existed. Read through `resolveModeDelays`.
20469
+ */
20470
+ modeDelays: NcAlarmModeDelaysListSchema.default([])
20567
20471
  });
20568
20472
  /**
20569
20473
  * Every field optional — a tab edits one control at a time.
20570
20474
  *
20571
- * `nonBlocking` is re-declared WITHOUT its default: `.partial()` does not
20572
- * remove an inner `.default()`, so a patch that never named the field would
20573
- * parse to `nonBlocking: []` and wipe every mode's list on an unrelated edit
20574
- * (the same trap {@link NcRulePatchSchema} documents).
20475
+ * `nonBlocking` and `modeDelays` are re-declared WITHOUT their defaults:
20476
+ * `.partial()` does not remove an inner `.default()`, so a patch that never
20477
+ * named the field would parse to `[]` and wipe every mode's list on an
20478
+ * unrelated edit (the same trap {@link NcRulePatchSchema} documents). Here
20479
+ * `modeDelays` means EDITS, not the stored overrides.
20575
20480
  */
20576
- var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({ nonBlocking: NcAlarmNonBlockingListSchema }).partial();
20481
+ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
20482
+ nonBlocking: NcAlarmNonBlockingListSchema,
20483
+ /** Per-mode, per-field edits — NOT the whole list (see NcAlarmModeDelaysEditSchema). */
20484
+ modeDelays: NcAlarmModeDelaysEditListSchema,
20485
+ /** ONE membership change; the panel applies it to the list it holds at its turn. */
20486
+ nonBlockingEdit: NcAlarmNonBlockingEditSchema
20487
+ }).partial().refine((p) => p.nonBlocking === void 0 || p.nonBlockingEdit === void 0, { message: "nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit" });
20577
20488
  /**
20578
20489
  * What one arm mode actually arms, DERIVED from the enabled rules gated on it.
20579
20490
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
@@ -20673,6 +20584,28 @@ var NcAlarmConfigSchema = object({
20673
20584
  */
20674
20585
  live: NcAlarmLiveSchema.optional()
20675
20586
  });
20587
+ var NcAlarmSensorReadingSchema = _enum([
20588
+ "open",
20589
+ "closed",
20590
+ "unknown",
20591
+ "not-opening"
20592
+ ]);
20593
+ /** One device's state as the alarm reads it — the classifier the arm check uses. */
20594
+ var NcAlarmSensorStateSchema = object({
20595
+ deviceId: number().int().positive(),
20596
+ reading: NcAlarmSensorReadingSchema,
20597
+ /** The word as read (`open`, `closed`, `unlocked`, `stopped`, …); null when unknown / not an opening. */
20598
+ state: string().nullable(),
20599
+ /** Why `unknown`: the read failed, or the slice holds no word its cap defines (a placeholder included). */
20600
+ unknownWhy: _enum(["read-failed", "unknown-word"]).nullable(),
20601
+ /** The device manager's liveness as the centre mirrors it; null = not known. */
20602
+ online: boolean().nullable()
20603
+ });
20604
+ var NcAlarmSensorsInputSchema = object({ deviceIds: array(number().int().positive()).max(500) });
20605
+ var NcAlarmSensorsSchema = object({
20606
+ sensors: array(NcAlarmSensorStateSchema),
20607
+ readAt: number().int().nonnegative()
20608
+ });
20676
20609
  /**
20677
20610
  * ONE rule's demand on ONE camera's clip ring.
20678
20611
  *
@@ -20763,7 +20696,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
20763
20696
  }), method(object({}), NcAlarmConfigSchema, { auth: "admin" }), method(object({ patch: NcAlarmSettingsPatchSchema }), NcAlarmConfigSchema, {
20764
20697
  kind: "mutation",
20765
20698
  auth: "admin"
20766
- });
20699
+ }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
20767
20700
  /**
20768
20701
  * Zod schemas for persisted record types.
20769
20702
  *
@@ -21110,12 +21043,26 @@ var CameraSensorRefSchema = object({
21110
21043
  function cameraSensorRefKey(ref) {
21111
21044
  return `${ref.addonId}/${ref.stableId}`;
21112
21045
  }
21113
- /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
21114
- var CameraSensorsModeSchema = _enum(["in-addition"]);
21115
- var CameraSensorsConfigSchema = object({
21116
- mode: CameraSensorsModeSchema,
21117
- sensors: array(CameraSensorRefSchema).min(1).max(8)
21118
- }).superRefine((value, ctx) => {
21046
+ /**
21047
+ * A sensor's mode (D673). `in-addition`: its motion is the camera's motion too.
21048
+ * `replace`: its motion is the camera's, and while one is READY the camera's
21049
+ * own motion no longer counts on its own. `confirm`: while one is READY the
21050
+ * camera's own motion counts only while a confirm sensor is active — with or
21051
+ * without a replace sensor (spec C2, the controller's ruling on Q1).
21052
+ */
21053
+ var CameraSensorModeSchema = _enum([
21054
+ "in-addition",
21055
+ "confirm",
21056
+ "replace"
21057
+ ]);
21058
+ /** A stored sensor with no mode — every CS-1 row — is in addition. */
21059
+ var DEFAULT_CAMERA_SENSOR_MODE = "in-addition";
21060
+ /**
21061
+ * A camera's attached sensors. A CS-1 row carried an envelope
21062
+ * `mode: 'in-addition'`: `z.object` drops it on parse, and the PARSED value is
21063
+ * what the write stores (D672 rule 3), so it is never written again.
21064
+ */
21065
+ var CameraSensorsConfigSchema = object({ sensors: array(CameraSensorRefSchema.extend({ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE) })).min(1).max(8) }).superRefine((value, ctx) => {
21119
21066
  const seen = /* @__PURE__ */ new Set();
21120
21067
  value.sensors.forEach((ref, index) => {
21121
21068
  const key = cameraSensorRefKey(ref);
@@ -21127,39 +21074,41 @@ var CameraSensorsConfigSchema = object({
21127
21074
  seen.add(key);
21128
21075
  });
21129
21076
  });
21130
- var RefFields = {
21077
+ /** Every attachment names its mode; an older orchestrator that does not is in addition. */
21078
+ var AttachmentFields = {
21131
21079
  addonId: string(),
21132
- stableId: string()
21080
+ stableId: string(),
21081
+ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE)
21133
21082
  };
21134
21083
  var CameraSensorAttachmentSchema = discriminatedUnion("state", [
21135
21084
  object({
21136
- ...RefFields,
21085
+ ...AttachmentFields,
21137
21086
  state: literal("ready"),
21138
21087
  deviceId: number(),
21139
21088
  name: string(),
21140
21089
  caps: array(string()).readonly()
21141
21090
  }),
21142
21091
  object({
21143
- ...RefFields,
21092
+ ...AttachmentFields,
21144
21093
  state: literal("offline"),
21145
21094
  deviceId: number(),
21146
21095
  name: string(),
21147
21096
  reason: _enum(["offline", "disabled"])
21148
21097
  }),
21149
21098
  object({
21150
- ...RefFields,
21099
+ ...AttachmentFields,
21151
21100
  state: literal("missing"),
21152
21101
  reason: string()
21153
21102
  }),
21154
21103
  object({
21155
- ...RefFields,
21104
+ ...AttachmentFields,
21156
21105
  state: literal("unsupported"),
21157
21106
  deviceId: number(),
21158
21107
  name: string(),
21159
21108
  reason: string()
21160
21109
  }),
21161
21110
  object({
21162
- ...RefFields,
21111
+ ...AttachmentFields,
21163
21112
  state: literal("unreadable"),
21164
21113
  reason: string()
21165
21114
  })
@@ -21172,17 +21121,49 @@ var CameraSensorAttachmentSchema = discriminatedUnion("state", [
21172
21121
  * say.
21173
21122
  */
21174
21123
  var CameraSensorsNotForwardedSchema = _enum(["onboard-not-listed", "no-active-detection"]);
21124
+ /** Whether the camera's OWN motion counts on its own (D673 C2), from its READY sensors (C3). */
21125
+ var CameraOwnMotionSchema = _enum([
21126
+ "always",
21127
+ "when-confirmed",
21128
+ "never"
21129
+ ]);
21130
+ /** Confirm / Replace cannot suppress this camera's motion: its provider still emits it directly (D673 C13). */
21131
+ var CameraSensorsNotEnforcedSchema = _enum(["provider-not-split"]);
21132
+ /**
21133
+ * The camera's OWN onboard motion (D696): the raw input the bridge combines,
21134
+ * never the effective value. The camera's `motion` slice is the effective one,
21135
+ * so a view of the camera's own row reads this.
21136
+ * - `atMs`: when the bridge received the camera's last own edge.
21137
+ * - `detected`: evaluated WHEN THE STATUS IS ASKED — the last edge said `true`
21138
+ * AND it is younger than the window the bridge counts the camera's own motion
21139
+ * for (`motionCooldownMs`, floored at two sustain ticks). A camera that never
21140
+ * sends a clear (heartbeats only) therefore reads `false` once no push came
21141
+ * within the window; a status read is a snapshot, so a live view re-asks.
21142
+ * Absent = this orchestrator has not received the camera's own motion since it
21143
+ * started (unknown, never "quiet"), or an orchestrator older than D696.
21144
+ */
21145
+ var CameraRawLevelSchema = object({
21146
+ detected: boolean(),
21147
+ atMs: number()
21148
+ });
21175
21149
  var CameraSensorsStatusSchema = discriminatedUnion("state", [
21176
- object({ state: literal("not-configured") }),
21150
+ object({
21151
+ state: literal("not-configured"),
21152
+ cameraLevel: CameraRawLevelSchema.optional()
21153
+ }),
21177
21154
  object({
21178
21155
  state: literal("unreadable"),
21179
- reason: string()
21156
+ reason: string(),
21157
+ cameraLevel: CameraRawLevelSchema.optional()
21180
21158
  }),
21181
21159
  object({
21182
21160
  state: literal("configured"),
21183
- mode: CameraSensorsModeSchema,
21161
+ cameraLevel: CameraRawLevelSchema.optional(),
21184
21162
  sensors: array(CameraSensorAttachmentSchema).readonly(),
21185
- notForwarded: CameraSensorsNotForwardedSchema.optional()
21163
+ /** Absent = an orchestrator older than CS-2: it does not say (D315). */
21164
+ cameraMotion: CameraOwnMotionSchema.optional(),
21165
+ notForwarded: CameraSensorsNotForwardedSchema.optional(),
21166
+ notEnforced: CameraSensorsNotEnforcedSchema.optional()
21186
21167
  })
21187
21168
  ]);
21188
21169
  Object.freeze({
@@ -21867,14 +21848,14 @@ var TrackSchema = object({
21867
21848
  * `derive-returned-null tile=standin`,
21868
21849
  * `native-tile tile=native no-key-frame-at-close`, …) written at close and
21869
21850
  * CLEARED by the late-keyFrame upgrade when a native tile lands after all.
21870
- * The operator-facing answer to "perché manca l'immagine?" on a track whose
21851
+ * The operator-facing answer to "perché manca l'immagine?" [why is the image missing?] on a track whose
21871
21852
  * tile is a face/plate stand-in, a raster crop, or an icon.
21872
21853
  *
21873
21854
  * **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
21874
21855
  * the TILE ranked below native, so a track whose thumbnail landed natively
21875
21856
  * while its key frame missed carried no reason at all — three of the four
21876
21857
  * `MISSING_KEYFRAME` tracks in the 2026-09-07 operator audit were exactly
21877
- * that shape, and their "niente ultimo" had no cause anywhere on the row.
21858
+ * that shape, and their "niente ultimo" [no last frame] had no cause anywhere on the row.
21878
21859
  * The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
21879
21860
  * lastFrame copy source`), so its absence is now on this line whatever the
21880
21861
  * tile ended up being.
@@ -21961,7 +21942,7 @@ var MotionEventSchema = object({
21961
21942
  /**
21962
21943
  * Ms offsets from `timestamp` (the episode's own first rising edge, so the
21963
21944
  * first entry is always `0`) of every genuine off→on transition the
21964
- * episode saw — "ogni evento on si deve salvare" (D475). NOT one entry per
21945
+ * episode saw — "ogni evento on si deve salvare" [every ON event must be saved] (D475). NOT one entry per
21965
21946
  * push: a firmware source that keepalives at ~1 Hz for the whole burst
21966
21947
  * (Reolink, Hikvision) produces exactly one edge; a source that reports an
21967
21948
  * explicit `false` mid-episode and then resumes before the quiet window
@@ -22485,6 +22466,7 @@ var KeyEventSchema = object({
22485
22466
  bestEventId: string(),
22486
22467
  /** Track lifetime in ms (lastSeen - firstSeen). */
22487
22468
  windowMs: number().optional(),
22469
+ audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
22488
22470
  ...TrackFlagFields,
22489
22471
  ...TrackRetrainFields
22490
22472
  });
@@ -24413,8 +24395,10 @@ var RunnerCameraConfigSchema = object({
24413
24395
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
24414
24396
  * analyzer providers) running on decoded frames in this runner.
24415
24397
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
24416
- * analytics). The provider emits ProviderMotion
24417
- * events; the orchestrator forwards to `reportMotion`.
24398
+ * analytics). The provider emits its raw push as `ProviderMotion`
24399
+ * (D673); the orchestrator's camera-sensors bridge re-emits the camera's
24400
+ * effective motion as `MotionOnMotionChanged`, which is what reaches
24401
+ * `reportMotion`.
24418
24402
  */
24419
24403
  motionSources: MotionSourcesSchema.default(["analyzer"]),
24420
24404
  /**
@@ -24591,7 +24575,15 @@ var RunnerLocalLoadSchema = object({
24591
24575
  hasGpu: boolean(),
24592
24576
  inferenceBackend: string().optional(),
24593
24577
  cpuCores: number().optional()
24594
- })
24578
+ }),
24579
+ /**
24580
+ * Who writes a camera's `motion` runtime slice (D696). `'orchestrator'`: this
24581
+ * runner never writes it. ABSENT = a runner older than D696, which still
24582
+ * writes the slice from its phase machine; the orchestrator does not write
24583
+ * while any runner node is absent-or-unanswered, so one slice never has two
24584
+ * writers.
24585
+ */
24586
+ motionSliceWriter: literal("orchestrator").optional()
24595
24587
  });
24596
24588
  /**
24597
24589
  * Aggregate runtime metrics for the runner's whole local pool. Mirrors the
@@ -27256,7 +27248,7 @@ var ClipPlaybackSchema = object({
27256
27248
  * **One authorised yes is one wake.** `next-natural` — take the clip the next
27257
27249
  * time the camera is awake for its own reasons — is deliberately not a member:
27258
27250
  * it was proposed, it is free on the battery, and the operator declined it on
27259
- * 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."*,
27251
+ * 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."* [When an export is requested the camera wakes up],
27260
27252
  * D558 "Considered and not taken").
27261
27253
  */
27262
27254
  var ClipWakeSchema = _enum(["authorised"]);
@@ -27517,7 +27509,7 @@ DeviceType.Camera, method(object({
27517
27509
  * It replaced `sources?: string[]`, a VIEW filter over source ids that
27518
27510
  * assumed the answer was a fan-out over everything a camera has. The
27519
27511
  * operator settled otherwise on 2026-09-20 — *"l'utilizzatore è uno
27520
- * solo"* — so the list is asked of one provider at a time and there is
27512
+ * solo"* [there is only one user] — so the list is asked of one provider at a time and there is
27521
27513
  * nothing to filter out of it.
27522
27514
  */
27523
27515
  provider: string().min(1)
@@ -30129,6 +30121,70 @@ onStatusChanged: { data: object({
30129
30121
  * whether persisting is worth a SQLite commit. */
30130
30122
  volatileStateFields: ["lastChangedAt"]
30131
30123
  };
30124
+ var DoorbellStatusSchema = object({
30125
+ /** Ms epoch of the last press. null = never observed since this provider started. */
30126
+ lastPressedAt: number().nullable(),
30127
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
30128
+ pressCountSinceStart: number()
30129
+ });
30130
+ var DoorbellPressEventSchema = object({
30131
+ deviceId: number(),
30132
+ timestamp: number()
30133
+ });
30134
+ /**
30135
+ * Doorbell button cap. Two kinds of provider serve it, and to every consumer
30136
+ * they are the same cap:
30137
+ *
30138
+ * - **Native** providers, registered per device by a driver addon through
30139
+ * `ctx.registerNativeCap` — a `DeviceType.Button` accessory with
30140
+ * `role: DeviceRole.Doorbell`, or the camera itself (Reolink registers at
30141
+ * camera level). They emit `onPressed` on every firmware ring.
30142
+ * - **A composed doorbell** (D670, D671): a camera's customization gives it
30143
+ * the cap, its `lastPressedAt` rising from the sources the operator
30144
+ * assigned in Customize → Doorbell, and the composer emits `onPressed`
30145
+ * from that field's advance (`fromState`).
30146
+ *
30147
+ * The DeviceEventPropagator re-emits `onPressed` on the camera parent.
30148
+ */
30149
+ var doorbellCapability = {
30150
+ name: "doorbell",
30151
+ scope: "device",
30152
+ deviceNative: true,
30153
+ mode: "singleton",
30154
+ deviceTypes: [DeviceType.Button, DeviceType.Camera],
30155
+ methods: {},
30156
+ events: {
30157
+ /**
30158
+ * Fires once per physical press. Reolink delivers via Baichuan
30159
+ * push (`ReolinkSimpleEvent.type === 'doorbell'`). There is no
30160
+ * release/duration — it's a pulse.
30161
+ */
30162
+ onPressed: {
30163
+ data: DoorbellPressEventSchema,
30164
+ fromState: {
30165
+ field: "lastPressedAt",
30166
+ on: "advance"
30167
+ }
30168
+ } },
30169
+ status: {
30170
+ schema: DoorbellStatusSchema,
30171
+ kind: "push"
30172
+ },
30173
+ /**
30174
+ * Runtime-state slice — last press timestamp + lifetime press count.
30175
+ * Mirrored by the kernel and readable via
30176
+ * `device.state.doorbell.value`. UIs can show "last ring 5m ago"
30177
+ * without subscribing.
30178
+ */
30179
+ runtimeState: DoorbellStatusSchema,
30180
+ /**
30181
+ * Runtime-state durability: **restored** — a monotonic accumulator: the slice IS the record. `lastPressedAt` is content here, not a clock, so it is deliberately NOT volatile.
30182
+ *
30183
+ * See `RuntimeStateDurability`. Enforced by
30184
+ * `scripts/check-runtime-state-durability.ts`.
30185
+ */
30186
+ durability: "restored"
30187
+ };
30132
30188
  /**
30133
30189
  * Enum-state sensor — a string value picked from a finite option set.
30134
30190
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -32273,9 +32329,9 @@ var MotionStatusSchema = object({
32273
32329
  /** Ms epoch of the last detected-true observation. Null if never detected. */
32274
32330
  lastDetectedAt: number().nullable(),
32275
32331
  /**
32276
- * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device,
32277
- * `null` while false and on every `Sensor` device (D475) — see that
32278
- * constant's doc for the one-authority rule.
32332
+ * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device (the
32333
+ * orchestrator writes it, D696), `null` while false and on every `Sensor`
32334
+ * device (D475) — see that constant's doc for the one-authority rule.
32279
32335
  *
32280
32336
  * ## Reading this field still arms nothing
32281
32337
  *
@@ -32293,34 +32349,31 @@ var MotionStatusSchema = object({
32293
32349
  * `addon-export-alexa/src/motion-clear-hold.ts` and
32294
32350
  * `addon-export-hap`'s `RESET_DEBOUNCE_MS` both do.
32295
32351
  *
32296
- * ## Who writes it
32297
- *
32298
- * - **Cameras** — the runner's phase machine, `active → watching` on
32299
- * `cooldown_expired`, which then writes this slice with
32300
- * `detected: false` (`handlePhaseChanged` in
32301
- * `pipeline-runner/index.ts`). It produces the FALLING edge, which
32302
- * matters most for the sources that only ever push a rising one:
32303
- * Reolink emits `MotionOnMotionChanged { detected: true }` and never
32304
- * a false.
32305
- * - **Sensors** (Home Assistant binary sensors, Homematic) — the
32306
- * provider pushes the false itself, from the upstream system's own
32307
- * state change. No phase machine is involved.
32308
- *
32309
- * ### The phase machine is CANONICAL, not sole — and that is a defect
32310
- *
32311
- * An earlier revision of this docblock (mine, 2026-09-12) claimed the
32312
- * phase machine is the sole writer for a camera. It is not.
32313
- * `hikvision-camera.ts:3464` and `amcrest-camera.ts:445` both call
32314
- * `setCapSlice(motionCapability, …)` on their own rising edge, and
32315
- * Hikvision's comment says why: it read THIS docblock, agreed the
32316
- * runner is canonical, and wrote anyway to avoid per-tick churn. So
32317
- * two authorities can disagree about one slice, which this repo
32318
- * forbids, and the doc said otherwise — which is worse than saying
32319
- * nothing, because it reads as verification.
32320
- *
32321
- * This predates D475 and is not fixed there: the fix touches every
32322
- * camera provider. Recorded in D475's Consequences. Do not restore the
32323
- * "sole writer" wording without also removing the other writers.
32352
+ * ## Who writes it (D696)
32353
+ *
32354
+ * - **Cameras** — the orchestrator, and nothing else. It writes the camera's
32355
+ * EFFECTIVE motion (`addon-pipeline-orchestrator`
32356
+ * `camera-sensors/motion-slice.ts`), alongside the effective
32357
+ * `MotionOnMotionChanged` it emits or receives: the camera-sensors bridge
32358
+ * for a split camera, an unsplit emitter's direct event, the analyzer and
32359
+ * device activity, as the camera's `motionSources` counts them. A source
32360
+ * that never sends a clear falls one window after its last `true`.
32361
+ * `lastDetectedAt` moves only on an effective rise. No camera provider
32362
+ * writes this slice (not even a boot seed), and neither does the runner's
32363
+ * phase machine: its phase is "a session is attached" for every on-motion
32364
+ * session, not motion, and it now has its own `DetectionPhaseTransition`.
32365
+ * A provider's `isDetected` answers from the hub's slice.
32366
+ * - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
32367
+ * imports) — the provider pushes both edges itself, from the upstream
32368
+ * system's own state change. That is the sensor's own fact.
32369
+ *
32370
+ * `scripts/check-onboard-motion-emitters.ts` refuses any other writer of a
32371
+ * `motion` slice; each sensor writer is a named exemption.
32372
+ *
32373
+ * This replaces the D475 §4 rule ("the phase machine is the sole writer").
32374
+ * That rule was never true: Hikvision and Amcrest wrote the slice raw beside
32375
+ * it, every provider seeded it at boot, and every session left it
32376
+ * `detected: true` after its detach.
32324
32377
  */
32325
32378
  autoClearAfterMs: number().nullable()
32326
32379
  });
@@ -32392,11 +32445,12 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
32392
32445
  */
32393
32446
  runtimeState: MotionStatusSchema,
32394
32447
  /**
32395
- * Runtime-state durability: **session** — every writer of this slice
32448
+ * Runtime-state durability: **session** — the writer of this slice
32396
32449
  * writes only on an EDGE, so a restored `detected: true` would stay
32397
32450
  * frozen until the next one instead of being corrected. The next edge
32398
- * re-publishes the real state. (On who the writers are, and why there
32399
- * is more than one, see `autoClearAfterMs` above.)
32451
+ * re-publishes the real state, and the orchestrator re-publishes every
32452
+ * camera when it starts writing (D696; on who writes it, see
32453
+ * `autoClearAfterMs` above).
32400
32454
  *
32401
32455
  * See `RuntimeStateDurability`. Enforced by
32402
32456
  * `scripts/check-runtime-state-durability.ts`.
@@ -34779,8 +34833,7 @@ var ptzAutotrackCapability = {
34779
34833
  deviceNative: true,
34780
34834
  mode: "singleton",
34781
34835
  /**
34782
- * Two kinds of provider behind one name, the same shape `snapshot` and
34783
- * `doorbell` use:
34836
+ * Two kinds of provider behind one name, the same shape `snapshot` uses:
34784
34837
  *
34785
34838
  * - **Native**: the camera's own firmware autotrack, registered per device by
34786
34839
  * the driver when the probe says it exists (Reolink: yes; Hikvision:
@@ -34788,7 +34841,7 @@ var ptzAutotrackCapability = {
34788
34841
  * - **Wrapper**: the emulated implementation (`@camstack/system`'s `autotrack` builtin),
34789
34842
  * which follows a subject with `ptz.move` pulses driven by the detection
34790
34843
  * pipeline. `defaultActive: false` — the operator binds it per camera in
34791
- * the bindings UI, exactly as `virtual-doorbell` is bound.
34844
+ * the bindings UI.
34792
34845
  *
34793
34846
  * The binding chooses WHICH implementation answers; `setEnabled` stays the
34794
34847
  * one switch for the function either way. A camera never has both driving its
@@ -35463,7 +35516,7 @@ var ReadGopBytesResultSchema = object({
35463
35516
  /**
35464
35517
  * A time WINDOW of one finalized segment, cut by byte range — the multi-GOP
35465
35518
  * twin of {@link ReadGopBytesResultSchema}'s single instant. Built for the
35466
- * replay clip's `recording` source (`docs/design/plans/2026-08-26-replay-clip-su-pipeline.md`):
35519
+ * replay clip's `recording` source (`docs/design/plans/2026-08-26-clip-replay-on-pipeline.md`):
35467
35520
  * a replay needs several seconds of native pixels, not one frame.
35468
35521
  *
35469
35522
  * `ok.data` is standalone-demuxable, same as a GOP read. `ok.reachesRequestedEnd`
@@ -38827,6 +38880,7 @@ var zoneRulesCapability = {
38827
38880
  */
38828
38881
  durability: "restored"
38829
38882
  };
38883
+ SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
38830
38884
  /**
38831
38885
  * Accessory device helpers — shared across drivers.
38832
38886
  *
@@ -39886,13 +39940,14 @@ var BaseDeviceProvider = class extends BaseAddon {
39886
39940
  async getStatus() {
39887
39941
  const all = await this.ctx.kernel.devices?.getAll() ?? [];
39888
39942
  const summary = this.restoreFailureSummary();
39889
- if (summary === null) return {
39943
+ const base = {
39890
39944
  connected: true,
39891
- deviceCount: all.length
39945
+ deviceCount: all.length,
39946
+ motionSliceWriter: "orchestrator"
39892
39947
  };
39948
+ if (summary === null) return base;
39893
39949
  return {
39894
- connected: true,
39895
- deviceCount: all.length,
39950
+ ...base,
39896
39951
  error: summary
39897
39952
  };
39898
39953
  }
@@ -45328,6 +45383,12 @@ Object.freeze({
45328
45383
  addonId: null,
45329
45384
  access: "view"
45330
45385
  },
45386
+ "notificationRules.getAlarmSensors": {
45387
+ capName: "notification-rules",
45388
+ capScope: "system",
45389
+ addonId: null,
45390
+ access: "view"
45391
+ },
45331
45392
  "notificationRules.getClipRetentionAsks": {
45332
45393
  capName: "notification-rules",
45333
45394
  capScope: "system",
@@ -48906,6 +48967,11 @@ Object.freeze({
48906
48967
  }
48907
48968
  });
48908
48969
  Object.freeze({
48970
+ "accessories.getStatus": [{
48971
+ name: "deviceId",
48972
+ form: "single",
48973
+ optional: false
48974
+ }],
48909
48975
  "accessories.setChildHidden": [{
48910
48976
  name: "childDeviceId",
48911
48977
  form: "single",
@@ -48925,6 +48991,11 @@ Object.freeze({
48925
48991
  form: "single",
48926
48992
  optional: false
48927
48993
  }],
48994
+ "airQualitySensor.getStatus": [{
48995
+ name: "deviceId",
48996
+ form: "single",
48997
+ optional: false
48998
+ }],
48928
48999
  "alarmPanel.arm": [{
48929
49000
  name: "deviceId",
48930
49001
  form: "single",
@@ -48935,11 +49006,36 @@ Object.freeze({
48935
49006
  form: "single",
48936
49007
  optional: false
48937
49008
  }],
49009
+ "alarmPanel.getStatus": [{
49010
+ name: "deviceId",
49011
+ form: "single",
49012
+ optional: false
49013
+ }],
48938
49014
  "alarmPanel.trigger": [{
48939
49015
  name: "deviceId",
48940
49016
  form: "single",
48941
49017
  optional: false
48942
49018
  }],
49019
+ "ambientLightSensor.getStatus": [{
49020
+ name: "deviceId",
49021
+ form: "single",
49022
+ optional: false
49023
+ }],
49024
+ "audioAnalysis.applyDeviceSettingsPatch": [{
49025
+ name: "deviceId",
49026
+ form: "single",
49027
+ optional: false
49028
+ }],
49029
+ "audioAnalysis.getDeviceLiveContribution": [{
49030
+ name: "deviceId",
49031
+ form: "single",
49032
+ optional: false
49033
+ }],
49034
+ "audioAnalysis.getDeviceSettingsContribution": [{
49035
+ name: "deviceId",
49036
+ form: "single",
49037
+ optional: false
49038
+ }],
48943
49039
  "audioAnalysis.resolveDeviceSettings": [{
48944
49040
  name: "deviceId",
48945
49041
  form: "single",
@@ -48980,16 +49076,36 @@ Object.freeze({
48980
49076
  form: "single",
48981
49077
  optional: false
48982
49078
  }],
49079
+ "automationControl.getStatus": [{
49080
+ name: "deviceId",
49081
+ form: "single",
49082
+ optional: false
49083
+ }],
48983
49084
  "automationControl.trigger": [{
48984
49085
  name: "deviceId",
48985
49086
  form: "single",
48986
49087
  optional: false
48987
49088
  }],
49089
+ "battery.getStatus": [{
49090
+ name: "deviceId",
49091
+ form: "single",
49092
+ optional: false
49093
+ }],
48988
49094
  "battery.wakeForStream": [{
48989
49095
  name: "deviceId",
48990
49096
  form: "single",
48991
49097
  optional: false
48992
49098
  }],
49099
+ "binary.getStatus": [{
49100
+ name: "deviceId",
49101
+ form: "single",
49102
+ optional: false
49103
+ }],
49104
+ "brightness.getStatus": [{
49105
+ name: "deviceId",
49106
+ form: "single",
49107
+ optional: false
49108
+ }],
48993
49109
  "brightness.setBrightness": [{
48994
49110
  name: "deviceId",
48995
49111
  form: "single",
@@ -49005,6 +49121,26 @@ Object.freeze({
49005
49121
  form: "single",
49006
49122
  optional: false
49007
49123
  }],
49124
+ "cameraCredentials.getStatus": [{
49125
+ name: "deviceId",
49126
+ form: "single",
49127
+ optional: false
49128
+ }],
49129
+ "cameraGridLayout.applyDeviceSettingsPatch": [{
49130
+ name: "deviceId",
49131
+ form: "single",
49132
+ optional: false
49133
+ }],
49134
+ "cameraGridLayout.getDeviceLiveContribution": [{
49135
+ name: "deviceId",
49136
+ form: "single",
49137
+ optional: false
49138
+ }],
49139
+ "cameraGridLayout.getDeviceSettingsContribution": [{
49140
+ name: "deviceId",
49141
+ form: "single",
49142
+ optional: false
49143
+ }],
49008
49144
  "cameraGridLayout.getLayout": [{
49009
49145
  name: "deviceId",
49010
49146
  form: "single",
@@ -49020,6 +49156,21 @@ Object.freeze({
49020
49156
  form: "single",
49021
49157
  optional: false
49022
49158
  }],
49159
+ "cameraPipelineConfig.applyDeviceSettingsPatch": [{
49160
+ name: "deviceId",
49161
+ form: "single",
49162
+ optional: false
49163
+ }],
49164
+ "cameraPipelineConfig.getDeviceLiveContribution": [{
49165
+ name: "deviceId",
49166
+ form: "single",
49167
+ optional: false
49168
+ }],
49169
+ "cameraPipelineConfig.getDeviceSettingsContribution": [{
49170
+ name: "deviceId",
49171
+ form: "single",
49172
+ optional: false
49173
+ }],
49023
49174
  "cameraStreams.getBrokerStreams": [{
49024
49175
  name: "deviceId",
49025
49176
  form: "single",
@@ -49045,6 +49196,16 @@ Object.freeze({
49045
49196
  form: "single",
49046
49197
  optional: false
49047
49198
  }],
49199
+ "carbonMonoxide.getStatus": [{
49200
+ name: "deviceId",
49201
+ form: "single",
49202
+ optional: false
49203
+ }],
49204
+ "climateControl.getStatus": [{
49205
+ name: "deviceId",
49206
+ form: "single",
49207
+ optional: false
49208
+ }],
49048
49209
  "climateControl.setFanMode": [{
49049
49210
  name: "deviceId",
49050
49211
  form: "single",
@@ -49085,16 +49246,41 @@ Object.freeze({
49085
49246
  form: "single",
49086
49247
  optional: false
49087
49248
  }],
49249
+ "color.getStatus": [{
49250
+ name: "deviceId",
49251
+ form: "single",
49252
+ optional: false
49253
+ }],
49088
49254
  "color.setColor": [{
49089
49255
  name: "deviceId",
49090
49256
  form: "single",
49091
49257
  optional: false
49092
49258
  }],
49259
+ "connectivity.getStatus": [{
49260
+ name: "deviceId",
49261
+ form: "single",
49262
+ optional: false
49263
+ }],
49264
+ "consumables.getStatus": [{
49265
+ name: "deviceId",
49266
+ form: "single",
49267
+ optional: false
49268
+ }],
49093
49269
  "consumables.reset": [{
49094
49270
  name: "deviceId",
49095
49271
  form: "single",
49096
49272
  optional: false
49097
49273
  }],
49274
+ "contact.getStatus": [{
49275
+ name: "deviceId",
49276
+ form: "single",
49277
+ optional: false
49278
+ }],
49279
+ "control.getStatus": [{
49280
+ name: "deviceId",
49281
+ form: "single",
49282
+ optional: false
49283
+ }],
49098
49284
  "control.setValue": [{
49099
49285
  name: "deviceId",
49100
49286
  form: "single",
@@ -49105,6 +49291,11 @@ Object.freeze({
49105
49291
  form: "single",
49106
49292
  optional: false
49107
49293
  }],
49294
+ "cover.getStatus": [{
49295
+ name: "deviceId",
49296
+ form: "single",
49297
+ optional: false
49298
+ }],
49108
49299
  "cover.open": [{
49109
49300
  name: "deviceId",
49110
49301
  form: "single",
@@ -49130,6 +49321,11 @@ Object.freeze({
49130
49321
  form: "single",
49131
49322
  optional: false
49132
49323
  }],
49324
+ "dayNight.getStatus": [{
49325
+ name: "deviceId",
49326
+ form: "single",
49327
+ optional: false
49328
+ }],
49133
49329
  "dayNight.setSettings": [{
49134
49330
  name: "deviceId",
49135
49331
  form: "single",
@@ -49140,11 +49336,31 @@ Object.freeze({
49140
49336
  form: "single",
49141
49337
  optional: true
49142
49338
  }],
49339
+ "detectionPipeline.applyDeviceSettingsPatch": [{
49340
+ name: "deviceId",
49341
+ form: "single",
49342
+ optional: false
49343
+ }],
49344
+ "detectionPipeline.getDeviceLiveContribution": [{
49345
+ name: "deviceId",
49346
+ form: "single",
49347
+ optional: false
49348
+ }],
49349
+ "detectionPipeline.getDeviceSettingsContribution": [{
49350
+ name: "deviceId",
49351
+ form: "single",
49352
+ optional: false
49353
+ }],
49143
49354
  "deviceAdminLink.getAdminLink": [{
49144
49355
  name: "deviceId",
49145
49356
  form: "single",
49146
49357
  optional: false
49147
49358
  }],
49359
+ "deviceAdoption.getStatus": [{
49360
+ name: "deviceId",
49361
+ form: "single",
49362
+ optional: false
49363
+ }],
49148
49364
  "deviceAdoption.release": [{
49149
49365
  name: "camDeviceId",
49150
49366
  form: "single",
@@ -49160,6 +49376,11 @@ Object.freeze({
49160
49376
  form: "single",
49161
49377
  optional: false
49162
49378
  }],
49379
+ "deviceDiscovery.getStatus": [{
49380
+ name: "deviceId",
49381
+ form: "single",
49382
+ optional: false
49383
+ }],
49163
49384
  "deviceDiscovery.listDiscovered": [{
49164
49385
  name: "deviceId",
49165
49386
  form: "single",
@@ -49179,6 +49400,21 @@ Object.freeze({
49179
49400
  form: "single",
49180
49401
  optional: false
49181
49402
  }],
49403
+ "deviceExport.applyDeviceSettingsPatch": [{
49404
+ name: "deviceId",
49405
+ form: "single",
49406
+ optional: false
49407
+ }],
49408
+ "deviceExport.getDeviceLiveContribution": [{
49409
+ name: "deviceId",
49410
+ form: "single",
49411
+ optional: false
49412
+ }],
49413
+ "deviceExport.getDeviceSettingsContribution": [{
49414
+ name: "deviceId",
49415
+ form: "single",
49416
+ optional: false
49417
+ }],
49182
49418
  "deviceExtension.listCandidates": [{
49183
49419
  name: "deviceId",
49184
49420
  form: "single",
@@ -49527,6 +49763,26 @@ Object.freeze({
49527
49763
  form: "single",
49528
49764
  optional: false
49529
49765
  }],
49766
+ "deviceStatus.getStatus": [{
49767
+ name: "deviceId",
49768
+ form: "single",
49769
+ optional: false
49770
+ }],
49771
+ "doorbell.getStatus": [{
49772
+ name: "deviceId",
49773
+ form: "single",
49774
+ optional: false
49775
+ }],
49776
+ "enumSensor.getStatus": [{
49777
+ name: "deviceId",
49778
+ form: "single",
49779
+ optional: false
49780
+ }],
49781
+ "eventEmitter.getStatus": [{
49782
+ name: "deviceId",
49783
+ form: "single",
49784
+ optional: false
49785
+ }],
49530
49786
  "faceGallery.getFaceByTrack": [{
49531
49787
  name: "deviceId",
49532
49788
  form: "single",
@@ -49541,6 +49797,11 @@ Object.freeze({
49541
49797
  form: "array",
49542
49798
  optional: true
49543
49799
  }],
49800
+ "fanControl.getStatus": [{
49801
+ name: "deviceId",
49802
+ form: "single",
49803
+ optional: false
49804
+ }],
49544
49805
  "fanControl.setDirection": [{
49545
49806
  name: "deviceId",
49546
49807
  form: "single",
@@ -49561,6 +49822,26 @@ Object.freeze({
49561
49822
  form: "single",
49562
49823
  optional: false
49563
49824
  }],
49825
+ "featureProbe.getStatus": [{
49826
+ name: "deviceId",
49827
+ form: "single",
49828
+ optional: false
49829
+ }],
49830
+ "flood.getStatus": [{
49831
+ name: "deviceId",
49832
+ form: "single",
49833
+ optional: false
49834
+ }],
49835
+ "gas.getStatus": [{
49836
+ name: "deviceId",
49837
+ form: "single",
49838
+ optional: false
49839
+ }],
49840
+ "humidifier.getStatus": [{
49841
+ name: "deviceId",
49842
+ form: "single",
49843
+ optional: false
49844
+ }],
49564
49845
  "humidifier.setMode": [{
49565
49846
  name: "deviceId",
49566
49847
  form: "single",
@@ -49576,11 +49857,26 @@ Object.freeze({
49576
49857
  form: "single",
49577
49858
  optional: false
49578
49859
  }],
49860
+ "humiditySensor.getStatus": [{
49861
+ name: "deviceId",
49862
+ form: "single",
49863
+ optional: false
49864
+ }],
49865
+ "image.getStatus": [{
49866
+ name: "deviceId",
49867
+ form: "single",
49868
+ optional: false
49869
+ }],
49579
49870
  "imageSettings.getOptions": [{
49580
49871
  name: "deviceId",
49581
49872
  form: "single",
49582
49873
  optional: false
49583
49874
  }],
49875
+ "imageSettings.getStatus": [{
49876
+ name: "deviceId",
49877
+ form: "single",
49878
+ optional: false
49879
+ }],
49584
49880
  "imageSettings.setSettings": [{
49585
49881
  name: "deviceId",
49586
49882
  form: "single",
@@ -49591,6 +49887,11 @@ Object.freeze({
49591
49887
  form: "single",
49592
49888
  optional: false
49593
49889
  }],
49890
+ "intercom.getStatus": [{
49891
+ name: "deviceId",
49892
+ form: "single",
49893
+ optional: false
49894
+ }],
49594
49895
  "intercom.handleAnswer": [{
49595
49896
  name: "deviceId",
49596
49897
  form: "single",
@@ -49621,6 +49922,11 @@ Object.freeze({
49621
49922
  form: "single",
49622
49923
  optional: false
49623
49924
  }],
49925
+ "lawnMowerControl.getStatus": [{
49926
+ name: "deviceId",
49927
+ form: "single",
49928
+ optional: false
49929
+ }],
49624
49930
  "lawnMowerControl.pause": [{
49625
49931
  name: "deviceId",
49626
49932
  form: "single",
@@ -49631,6 +49937,11 @@ Object.freeze({
49631
49937
  form: "single",
49632
49938
  optional: false
49633
49939
  }],
49940
+ "lockControl.getStatus": [{
49941
+ name: "deviceId",
49942
+ form: "single",
49943
+ optional: false
49944
+ }],
49634
49945
  "lockControl.lock": [{
49635
49946
  name: "deviceId",
49636
49947
  form: "single",
@@ -49646,6 +49957,11 @@ Object.freeze({
49646
49957
  form: "single",
49647
49958
  optional: false
49648
49959
  }],
49960
+ "mediaPlayer.getStatus": [{
49961
+ name: "deviceId",
49962
+ form: "single",
49963
+ optional: false
49964
+ }],
49649
49965
  "mediaPlayer.next": [{
49650
49966
  name: "deviceId",
49651
49967
  form: "single",
@@ -49706,6 +50022,11 @@ Object.freeze({
49706
50022
  form: "single",
49707
50023
  optional: false
49708
50024
  }],
50025
+ "motion.getStatus": [{
50026
+ name: "deviceId",
50027
+ form: "single",
50028
+ optional: false
50029
+ }],
49709
50030
  "motion.isDetected": [{
49710
50031
  name: "deviceId",
49711
50032
  form: "single",
@@ -49716,11 +50037,31 @@ Object.freeze({
49716
50037
  form: "single",
49717
50038
  optional: false
49718
50039
  }],
50040
+ "motionDetection.applyDeviceSettingsPatch": [{
50041
+ name: "deviceId",
50042
+ form: "single",
50043
+ optional: false
50044
+ }],
50045
+ "motionDetection.getDeviceLiveContribution": [{
50046
+ name: "deviceId",
50047
+ form: "single",
50048
+ optional: false
50049
+ }],
50050
+ "motionDetection.getDeviceSettingsContribution": [{
50051
+ name: "deviceId",
50052
+ form: "single",
50053
+ optional: false
50054
+ }],
49719
50055
  "motionDetection.removeCamera": [{
49720
50056
  name: "deviceId",
49721
50057
  form: "single",
49722
50058
  optional: false
49723
50059
  }],
50060
+ "motionTrigger.getStatus": [{
50061
+ name: "deviceId",
50062
+ form: "single",
50063
+ optional: false
50064
+ }],
49724
50065
  "motionTrigger.setMotionTrigger": [{
49725
50066
  name: "deviceId",
49726
50067
  form: "single",
@@ -49731,6 +50072,11 @@ Object.freeze({
49731
50072
  form: "single",
49732
50073
  optional: false
49733
50074
  }],
50075
+ "motionZones.getStatus": [{
50076
+ name: "deviceId",
50077
+ form: "single",
50078
+ optional: false
50079
+ }],
49734
50080
  "motionZones.setZone": [{
49735
50081
  name: "deviceId",
49736
50082
  form: "single",
@@ -49741,6 +50087,11 @@ Object.freeze({
49741
50087
  form: "single",
49742
50088
  optional: false
49743
50089
  }],
50090
+ "nativeObjectDetection.getStatus": [{
50091
+ name: "deviceId",
50092
+ form: "single",
50093
+ optional: false
50094
+ }],
49744
50095
  "nativeObjectDetection.setEnabled": [{
49745
50096
  name: "deviceId",
49746
50097
  form: "single",
@@ -49756,6 +50107,11 @@ Object.freeze({
49756
50107
  form: "single",
49757
50108
  optional: false
49758
50109
  }],
50110
+ "navigation.getStatus": [{
50111
+ name: "deviceId",
50112
+ form: "single",
50113
+ optional: false
50114
+ }],
49759
50115
  "navigation.goToPoint": [{
49760
50116
  name: "deviceId",
49761
50117
  form: "single",
@@ -49801,6 +50157,11 @@ Object.freeze({
49801
50157
  form: "single",
49802
50158
  optional: false
49803
50159
  }],
50160
+ "networkLink.getStatus": [{
50161
+ name: "deviceId",
50162
+ form: "single",
50163
+ optional: false
50164
+ }],
49804
50165
  "networkQuality.getDeviceStats": [{
49805
50166
  name: "deviceId",
49806
50167
  form: "single",
@@ -49811,6 +50172,11 @@ Object.freeze({
49811
50172
  form: "single",
49812
50173
  optional: false
49813
50174
  }],
50175
+ "notificationRules.getAlarmSensors": [{
50176
+ name: "deviceIds",
50177
+ form: "array",
50178
+ optional: false
50179
+ }],
49814
50180
  "notificationRules.setDeviceMuted": [{
49815
50181
  name: "deviceId",
49816
50182
  form: "single",
@@ -49821,11 +50187,26 @@ Object.freeze({
49821
50187
  form: "single",
49822
50188
  optional: false
49823
50189
  }],
50190
+ "notifier.getStatus": [{
50191
+ name: "deviceId",
50192
+ form: "single",
50193
+ optional: false
50194
+ }],
49824
50195
  "notifier.send": [{
49825
50196
  name: "deviceId",
49826
50197
  form: "single",
49827
50198
  optional: false
49828
50199
  }],
50200
+ "numericSensor.getStatus": [{
50201
+ name: "deviceId",
50202
+ form: "single",
50203
+ optional: false
50204
+ }],
50205
+ "osd.getStatus": [{
50206
+ name: "deviceId",
50207
+ form: "single",
50208
+ optional: false
50209
+ }],
49829
50210
  "osd.setOverlay": [{
49830
50211
  name: "deviceId",
49831
50212
  form: "single",
@@ -49885,6 +50266,11 @@ Object.freeze({
49885
50266
  form: "single",
49886
50267
  optional: false
49887
50268
  }],
50269
+ "petFeeder.getStatus": [{
50270
+ name: "deviceId",
50271
+ form: "single",
50272
+ optional: false
50273
+ }],
49888
50274
  "petFeeder.markFoodReplenished": [{
49889
50275
  name: "deviceId",
49890
50276
  form: "single",
@@ -49920,6 +50306,11 @@ Object.freeze({
49920
50306
  form: "single",
49921
50307
  optional: false
49922
50308
  }],
50309
+ "pipelineAnalytics.applyDeviceSettingsPatch": [{
50310
+ name: "deviceId",
50311
+ form: "single",
50312
+ optional: false
50313
+ }],
49923
50314
  "pipelineAnalytics.clearTrackRelation": [{
49924
50315
  name: "deviceId",
49925
50316
  form: "single",
@@ -49960,6 +50351,16 @@ Object.freeze({
49960
50351
  form: "single",
49961
50352
  optional: false
49962
50353
  }],
50354
+ "pipelineAnalytics.getDeviceLiveContribution": [{
50355
+ name: "deviceId",
50356
+ form: "single",
50357
+ optional: false
50358
+ }],
50359
+ "pipelineAnalytics.getDeviceSettingsContribution": [{
50360
+ name: "deviceId",
50361
+ form: "single",
50362
+ optional: false
50363
+ }],
49963
50364
  "pipelineAnalytics.getEventDensity": [{
49964
50365
  name: "deviceId",
49965
50366
  form: "single",
@@ -50175,6 +50576,11 @@ Object.freeze({
50175
50576
  form: "single",
50176
50577
  optional: true
50177
50578
  }],
50579
+ "pipelineOrchestrator.applyDeviceSettingsPatch": [{
50580
+ name: "deviceId",
50581
+ form: "single",
50582
+ optional: false
50583
+ }],
50178
50584
  "pipelineOrchestrator.assignAudio": [{
50179
50585
  name: "deviceId",
50180
50586
  form: "single",
@@ -50220,6 +50626,16 @@ Object.freeze({
50220
50626
  form: "single",
50221
50627
  optional: false
50222
50628
  }],
50629
+ "pipelineOrchestrator.getDeviceLiveContribution": [{
50630
+ name: "deviceId",
50631
+ form: "single",
50632
+ optional: false
50633
+ }],
50634
+ "pipelineOrchestrator.getDeviceSettingsContribution": [{
50635
+ name: "deviceId",
50636
+ form: "single",
50637
+ optional: false
50638
+ }],
50223
50639
  "pipelineOrchestrator.getPipelineAssignment": [{
50224
50640
  name: "deviceId",
50225
50641
  form: "single",
@@ -50340,11 +50756,31 @@ Object.freeze({
50340
50756
  form: "single",
50341
50757
  optional: true
50342
50758
  }],
50759
+ "powerMeter.getStatus": [{
50760
+ name: "deviceId",
50761
+ form: "single",
50762
+ optional: false
50763
+ }],
50764
+ "presence.getStatus": [{
50765
+ name: "deviceId",
50766
+ form: "single",
50767
+ optional: false
50768
+ }],
50769
+ "pressureSensor.getStatus": [{
50770
+ name: "deviceId",
50771
+ form: "single",
50772
+ optional: false
50773
+ }],
50343
50774
  "privacyMask.getOptions": [{
50344
50775
  name: "deviceId",
50345
50776
  form: "single",
50346
50777
  optional: false
50347
50778
  }],
50779
+ "privacyMask.getStatus": [{
50780
+ name: "deviceId",
50781
+ form: "single",
50782
+ optional: false
50783
+ }],
50348
50784
  "privacyMask.setAudioEnabled": [{
50349
50785
  name: "deviceId",
50350
50786
  form: "single",
@@ -50395,6 +50831,11 @@ Object.freeze({
50395
50831
  form: "single",
50396
50832
  optional: false
50397
50833
  }],
50834
+ "ptz.getStatus": [{
50835
+ name: "deviceId",
50836
+ form: "single",
50837
+ optional: false
50838
+ }],
50398
50839
  "ptz.goHome": [{
50399
50840
  name: "deviceId",
50400
50841
  form: "single",
@@ -50485,6 +50926,11 @@ Object.freeze({
50485
50926
  form: "single",
50486
50927
  optional: false
50487
50928
  }],
50929
+ "recordingArchive.applyDeviceSettingsPatch": [{
50930
+ name: "deviceId",
50931
+ form: "single",
50932
+ optional: false
50933
+ }],
50488
50934
  "recordingArchive.deleteFootprint": [{
50489
50935
  name: "deviceId",
50490
50936
  form: "single",
@@ -50505,6 +50951,21 @@ Object.freeze({
50505
50951
  form: "single",
50506
50952
  optional: false
50507
50953
  }],
50954
+ "recordingArchive.getDeviceLiveContribution": [{
50955
+ name: "deviceId",
50956
+ form: "single",
50957
+ optional: false
50958
+ }],
50959
+ "recordingArchive.getDeviceSettingsContribution": [{
50960
+ name: "deviceId",
50961
+ form: "single",
50962
+ optional: false
50963
+ }],
50964
+ "recordingArchive.getStatus": [{
50965
+ name: "deviceId",
50966
+ form: "single",
50967
+ optional: false
50968
+ }],
50508
50969
  "recordingArchive.listOpsLog": [{
50509
50970
  name: "deviceId",
50510
50971
  form: "single",
@@ -50590,6 +51051,11 @@ Object.freeze({
50590
51051
  form: "single",
50591
51052
  optional: false
50592
51053
  }],
51054
+ "recordingOnboard.getStatus": [{
51055
+ name: "deviceId",
51056
+ form: "single",
51057
+ optional: false
51058
+ }],
50593
51059
  "recordingOnboard.setSettings": [{
50594
51060
  name: "deviceId",
50595
51061
  form: "single",
@@ -50620,6 +51086,11 @@ Object.freeze({
50620
51086
  form: "single",
50621
51087
  optional: false
50622
51088
  }],
51089
+ "sceneMonitor.getStatus": [{
51090
+ name: "deviceId",
51091
+ form: "single",
51092
+ optional: false
51093
+ }],
50623
51094
  "sceneMonitor.listScenes": [{
50624
51095
  name: "deviceId",
50625
51096
  form: "single",
@@ -50645,6 +51116,11 @@ Object.freeze({
50645
51116
  form: "single",
50646
51117
  optional: false
50647
51118
  }],
51119
+ "scriptRunner.getStatus": [{
51120
+ name: "deviceId",
51121
+ form: "single",
51122
+ optional: false
51123
+ }],
50648
51124
  "scriptRunner.run": [{
50649
51125
  name: "deviceId",
50650
51126
  form: "single",
@@ -50655,11 +51131,31 @@ Object.freeze({
50655
51131
  form: "single",
50656
51132
  optional: false
50657
51133
  }],
51134
+ "smoke.getStatus": [{
51135
+ name: "deviceId",
51136
+ form: "single",
51137
+ optional: false
51138
+ }],
51139
+ "snapshot.applyDeviceSettingsPatch": [{
51140
+ name: "deviceId",
51141
+ form: "single",
51142
+ optional: false
51143
+ }],
50658
51144
  "snapshot.getDebugState": [{
50659
51145
  name: "deviceId",
50660
51146
  form: "single",
50661
51147
  optional: false
50662
51148
  }],
51149
+ "snapshot.getDeviceLiveContribution": [{
51150
+ name: "deviceId",
51151
+ form: "single",
51152
+ optional: false
51153
+ }],
51154
+ "snapshot.getDeviceSettingsContribution": [{
51155
+ name: "deviceId",
51156
+ form: "single",
51157
+ optional: false
51158
+ }],
50663
51159
  "snapshot.getSnapshot": [{
50664
51160
  name: "deviceId",
50665
51161
  form: "single",
@@ -50676,6 +51172,11 @@ Object.freeze({
50676
51172
  form: "array",
50677
51173
  optional: false
50678
51174
  }],
51175
+ "snapshot.getStatus": [{
51176
+ name: "deviceId",
51177
+ form: "single",
51178
+ optional: false
51179
+ }],
50679
51180
  "snapshot.invalidateCache": [{
50680
51181
  name: "deviceId",
50681
51182
  form: "single",
@@ -50686,6 +51187,11 @@ Object.freeze({
50686
51187
  form: "single",
50687
51188
  optional: false
50688
51189
  }],
51190
+ "streamBroker.applyDeviceSettingsPatch": [{
51191
+ name: "deviceId",
51192
+ form: "single",
51193
+ optional: false
51194
+ }],
50689
51195
  "streamBroker.assignProfile": [{
50690
51196
  name: "deviceId",
50691
51197
  form: "single",
@@ -50701,6 +51207,16 @@ Object.freeze({
50701
51207
  form: "single",
50702
51208
  optional: false
50703
51209
  }],
51210
+ "streamBroker.getDeviceLiveContribution": [{
51211
+ name: "deviceId",
51212
+ form: "single",
51213
+ optional: false
51214
+ }],
51215
+ "streamBroker.getDeviceSettingsContribution": [{
51216
+ name: "deviceId",
51217
+ form: "single",
51218
+ optional: false
51219
+ }],
50704
51220
  "streamBroker.getStreamWithCodec": [{
50705
51221
  name: "deviceId",
50706
51222
  form: "single",
@@ -50761,16 +51277,46 @@ Object.freeze({
50761
51277
  form: "single",
50762
51278
  optional: false
50763
51279
  }],
51280
+ "streamParams.getStatus": [{
51281
+ name: "deviceId",
51282
+ form: "single",
51283
+ optional: false
51284
+ }],
50764
51285
  "streamParams.setProfile": [{
50765
51286
  name: "deviceId",
50766
51287
  form: "single",
50767
51288
  optional: false
50768
51289
  }],
51290
+ "switch.getStatus": [{
51291
+ name: "deviceId",
51292
+ form: "single",
51293
+ optional: false
51294
+ }],
50769
51295
  "switch.setState": [{
50770
51296
  name: "deviceId",
50771
51297
  form: "single",
50772
51298
  optional: false
50773
51299
  }],
51300
+ "tamper.getStatus": [{
51301
+ name: "deviceId",
51302
+ form: "single",
51303
+ optional: false
51304
+ }],
51305
+ "temperatureSensor.getStatus": [{
51306
+ name: "deviceId",
51307
+ form: "single",
51308
+ optional: false
51309
+ }],
51310
+ "update.getStatus": [{
51311
+ name: "deviceId",
51312
+ form: "single",
51313
+ optional: false
51314
+ }],
51315
+ "vacuumControl.getStatus": [{
51316
+ name: "deviceId",
51317
+ form: "single",
51318
+ optional: false
51319
+ }],
50774
51320
  "vacuumControl.locate": [{
50775
51321
  name: "deviceId",
50776
51322
  form: "single",
@@ -50806,6 +51352,11 @@ Object.freeze({
50806
51352
  form: "single",
50807
51353
  optional: false
50808
51354
  }],
51355
+ "valve.getStatus": [{
51356
+ name: "deviceId",
51357
+ form: "single",
51358
+ optional: false
51359
+ }],
50809
51360
  "valve.open": [{
50810
51361
  name: "deviceId",
50811
51362
  form: "single",
@@ -50821,6 +51372,11 @@ Object.freeze({
50821
51372
  form: "single",
50822
51373
  optional: false
50823
51374
  }],
51375
+ "vibration.getStatus": [{
51376
+ name: "deviceId",
51377
+ form: "single",
51378
+ optional: false
51379
+ }],
50824
51380
  "videoclips.dialClipStream": [{
50825
51381
  name: "deviceId",
50826
51382
  form: "single",
@@ -50856,6 +51412,11 @@ Object.freeze({
50856
51412
  form: "single",
50857
51413
  optional: false
50858
51414
  }],
51415
+ "waterHeater.getStatus": [{
51416
+ name: "deviceId",
51417
+ form: "single",
51418
+ optional: false
51419
+ }],
50859
51420
  "waterHeater.setAway": [{
50860
51421
  name: "deviceId",
50861
51422
  form: "single",
@@ -50871,6 +51432,11 @@ Object.freeze({
50871
51432
  form: "single",
50872
51433
  optional: false
50873
51434
  }],
51435
+ "weather.getStatus": [{
51436
+ name: "deviceId",
51437
+ form: "single",
51438
+ optional: false
51439
+ }],
50874
51440
  "webrtcSession.addIceCandidate": [{
50875
51441
  name: "deviceId",
50876
51442
  form: "single",
@@ -51608,7 +52174,7 @@ var PreviewTextField = string().max(200);
51608
52174
  * Whether the notification's preview is a STILL or a short animation.
51609
52175
  *
51610
52176
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
51611
- * rule)"* — the other rules already offer an animated preview, and a ten-hour
52177
+ * rule)"* [sent as a gif or video (as for the other rules)] — the other rules already offer an animated preview, and a ten-hour
51612
52178
  * night reads better as three seconds of motion than as one frame of it. Both
51613
52179
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
51614
52180
  * simply applies it to a dozen frames sampled across the render and assembles
@@ -51746,6 +52312,7 @@ TimelapseRuleInputSchema.extend({
51746
52312
  createdAt: number(),
51747
52313
  updatedAt: number()
51748
52314
  });
52315
+ MotionOnMotionChangedDataSchema.omit({ triggeredBy: true });
51749
52316
  object({
51750
52317
  /**
51751
52318
  * Fraction of the box's own size added on EACH side before cutting.
@@ -95057,6 +95624,32 @@ function decodeDetectionState(value) {
95057
95624
  if (value === "NOT_DETECTED") return false;
95058
95625
  return null;
95059
95626
  }
95627
+ /**
95628
+ * Merge a live Alexa MotionSensor detection into the cached motion slice.
95629
+ *
95630
+ * `lastDetectedAt` is the LAST RISE and survives the fall (`motion.cap.ts`):
95631
+ * `null` means never detected. A clear patches the level only. A rise (or the
95632
+ * first observation of `true` with no stored stamp) stamps `nowMs`. A
95633
+ * sustained `true` across polls keeps the existing stamp — re-stamping every
95634
+ * poll would make "detected a minute ago" read as "just now".
95635
+ */
95636
+ function mergeAlexaMotionStatus(cached, live, nowMs) {
95637
+ if (live === null) return cached;
95638
+ if (live) {
95639
+ const rising = !cached.detected;
95640
+ const stampMissing = typeof cached.lastDetectedAt !== "number" || !Number.isFinite(cached.lastDetectedAt) || cached.lastDetectedAt <= 0;
95641
+ return {
95642
+ detected: true,
95643
+ lastDetectedAt: rising || stampMissing ? nowMs : cached.lastDetectedAt,
95644
+ autoClearAfterMs: null
95645
+ };
95646
+ }
95647
+ return {
95648
+ detected: false,
95649
+ lastDetectedAt: typeof cached.lastDetectedAt === "number" && Number.isFinite(cached.lastDetectedAt) && cached.lastDetectedAt > 0 ? cached.lastDetectedAt : null,
95650
+ autoClearAfterMs: null
95651
+ };
95652
+ }
95060
95653
  /** True when `v` is a non-null, non-array object (cast-free guard). */
95061
95654
  function isRecord(v) {
95062
95655
  return typeof v === "object" && v !== null && !Array.isArray(v);
@@ -95355,22 +95948,21 @@ var AlexaDevice = class extends BaseDevice {
95355
95948
  autoClearAfterMs: null
95356
95949
  };
95357
95950
  const liveDetected = () => decodeDetectionState(this.liveState("Alexa.MotionSensor", "detectionState"));
95951
+ const readAndSync = () => {
95952
+ const cached = this.runtimeState.getCapState("motion") ?? COLD;
95953
+ const next = mergeAlexaMotionStatus(cached, liveDetected(), Date.now());
95954
+ if (next.detected !== cached.detected || next.lastDetectedAt !== cached.lastDetectedAt) this.runtimeState.setCapState("motion", next);
95955
+ return next;
95956
+ };
95358
95957
  this.ctx.registerNativeCap(motionCapability, {
95359
- getStatus: async () => {
95360
- const cached = this.runtimeState.getCapState("motion") ?? COLD;
95361
- const live = liveDetected();
95362
- return live === null ? cached : {
95363
- ...cached,
95364
- detected: live
95365
- };
95366
- },
95367
- isDetected: async () => {
95368
- const live = liveDetected();
95369
- if (live !== null) return live;
95370
- return this.runtimeState.getCapState("motion")?.detected ?? false;
95371
- }
95958
+ getStatus: async () => readAndSync(),
95959
+ isDetected: async () => readAndSync().detected
95960
+ });
95961
+ const stored = this.runtimeState.getCapField("motion", "lastDetectedAt");
95962
+ this.runtimeState.setCapState("motion", {
95963
+ ...COLD,
95964
+ lastDetectedAt: typeof stored === "number" && stored > 0 ? stored : null
95372
95965
  });
95373
- this.runtimeState.setCapState("motion", COLD);
95374
95966
  }
95375
95967
  registerTemperatureSensor() {
95376
95968
  const COLD = {