@camstack/addon-provider-onvif 1.2.116 → 1.2.118

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 +1620 -584
  2. package/dist/addon.mjs +1620 -584
  3. package/package.json +3 -4
package/dist/addon.mjs CHANGED
@@ -3,7 +3,7 @@ import { createRequire } from "node:module";
3
3
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
4
4
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
5
5
  //#endregion
6
- //#region ../types/dist/event-category-C5xZWqz6.mjs
6
+ //#region ../types/dist/event-category-BGmz_oxW.mjs
7
7
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
8
8
  EventCategory["SystemBoot"] = "system.boot";
9
9
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -536,6 +536,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
536
536
  */
537
537
  EventCategory["PipelineAudioInferenceResult"] = "pipeline.audio-inference-result";
538
538
  EventCategory["DetectionPhaseTransition"] = "detection.phase-transition";
539
+ /**
540
+ * A camera provider's RAW onboard motion push (D673): the `MotionOnMotionChanged`
541
+ * data shape without `triggeredBy`, built by `providerMotionEvent`. Its one
542
+ * consumer is the orchestrator's camera-sensors bridge, which re-emits the
543
+ * camera's EFFECTIVE onboard motion as `MotionOnMotionChanged` (a pass-through
544
+ * for a camera with no attached sensor). Providers must not emit
545
+ * `MotionOnMotionChanged` themselves; `scripts/check-onboard-motion-emitters.ts`
546
+ * keeps it so (camera-grid is a named, deferred exception).
547
+ */
539
548
  EventCategory["ProviderMotion"] = "provider.motion";
540
549
  EventCategory["ProviderDetection"] = "provider.detection";
541
550
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
@@ -5374,7 +5383,7 @@ var ZodIssueCode = {
5374
5383
  var ZodFirstPartyTypeKind;
5375
5384
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5376
5385
  //#endregion
5377
- //#region ../types/dist/sleep-DlrgY4Qb.mjs
5386
+ //#region ../types/dist/sleep-CDCONfkt.mjs
5378
5387
  /**
5379
5388
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5380
5389
  * window to float samples (D455).
@@ -7413,23 +7422,74 @@ function errMsg(err) {
7413
7422
  return String(err);
7414
7423
  }
7415
7424
  //#endregion
7416
- //#region ../types/dist/composition-BK-GTFYb.mjs
7425
+ //#region ../types/dist/composition-Bzr7GwgP.mjs
7426
+ /**
7427
+ * The ffmpeg build every CamStack node downloads, per platform and arch.
7428
+ *
7429
+ * ## Why a download, on every node, including the container
7430
+ *
7431
+ * The version of ffmpeg used to be CODE: baked into the image, changeable only
7432
+ * by rebuilding and rolling it. Now it is DATA — this file states the release,
7433
+ * and a node that boots with a different one downloads it. Changing ffmpeg is a
7434
+ * framework bump, not an image rebuild.
7435
+ *
7436
+ * It also settles the licence question by removing it. FFmpeg's licence is
7437
+ * chosen at compile time: the core is LGPL 2.1+, `--enable-gpl` makes it GPL
7438
+ * (for x264/x265), `--enable-version3` makes that v3, and `--enable-nonfree`
7439
+ * makes the result undistributable. These are GPL v3 builds, and we do not
7440
+ * distribute them: the user's own node fetches the archive from the project
7441
+ * that publishes it, so we convey no GPL work and inherit none of the
7442
+ * obligations that come with conveying one. That is the whole reason the image
7443
+ * no longer installs ffmpeg at all — not a technical preference.
7444
+ *
7445
+ * ## Why jellyfin-ffmpeg
7446
+ *
7447
+ * One vendor covering linux-amd64, linux-arm64, darwin-arm64 and darwin-x64
7448
+ * from one release, with the widest hardware surface of anything maintained:
7449
+ * VAAPI, QSV, NVENC/NVDEC, AMF, Vulkan, OpenCL and DRM on amd64, plus Rockchip
7450
+ * MPP on arm64. It reaches the vendor libraries through dlopen trampolines,
7451
+ * so the binary is not linked against a driver stack it may not find.
7452
+ *
7453
+ * **What it still needs from the host, measured 2026-09-19.** On the Unraid
7454
+ * HOST, which has no libva, `-vaapi_device` aborts the process outright —
7455
+ * `implib-gen: libva-drm.so.2: failed to load library ... Assertion '0 &&
7456
+ * "Assertion in generated code"' failed`. Inside our container, which installs
7457
+ * libva plus the iHD driver, the same command encodes: verified end to end with
7458
+ * `testsrc → format=nv12,hwupload → h264_vaapi`. So the image drops ffmpeg and
7459
+ * KEEPS the Intel media stack; the drivers are the part a binary cannot bring.
7460
+ *
7461
+ * ## Why each artifact carries a checksum and a claim
7462
+ *
7463
+ * The download is now the only source, so `sha256` is verified before anything
7464
+ * is extracted — jellyfin publishes no checksums on its release assets, so
7465
+ * these are ours, taken at the version bump. And `expectedHwaccels` is what the
7466
+ * build is supposed to be able to do: a binary that probes short of its own
7467
+ * claim is a source that changed under us, which is precisely what went
7468
+ * unnoticed for months when a static build turned out to carry no VAAPI at all
7469
+ * (D536).
7470
+ */
7471
+ /** The pinned jellyfin-ffmpeg release. Changing this is the version change. */
7472
+ var FFMPEG_RELEASE = "8.1.2-5";
7473
+ var BASE = `https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v${FFMPEG_RELEASE}`;
7474
+ function portable(target) {
7475
+ return `${BASE}/jellyfin-ffmpeg_${FFMPEG_RELEASE}_portable_${target}-gpl.tar.xz`;
7476
+ }
7477
+ portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac64");
7417
7478
  /**
7418
- * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
7419
- * valutatore puro del suo FRONTE.
7479
+ * THE table "which boolean of this device type counts as HIGH", and the
7480
+ * pure evaluator of its EDGE.
7420
7481
  *
7421
- * Viveva dentro il builtin virtual-doorbell
7422
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
7423
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
7424
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
7425
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
7426
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
7427
- * SPOSTA qui e il doorbell la ri-esporta.
7482
+ * ONE table for everyone who asks "is this device HIGH?": the
7483
+ * recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
7484
+ * sensor markers, the orchestrator's camera-sensors bridge and
7485
+ * the sources of a composite doorbell (`doorbellFeatureSources`, D671).
7486
+ * A second copy would diverge at the first cap added, and the symptom — "the
7487
+ * sensor rings the doorbell but does not record" — is exactly D62.
7428
7488
  *
7429
- * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
7430
- * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
7431
- * regola" (e include `presence`, `cover`, `alarm-panel`), questa a "qual è il
7432
- * booleano il cui FRONTE conta". Vocabolari deliberatamente diversi.
7489
+ * ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
7490
+ * two must not be unified: that one answers "what is the state WORD for a
7491
+ * rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
7492
+ * boolean's EDGE counts". Deliberately different vocabularies.
7433
7493
  */
7434
7494
  /**
7435
7495
  * Known binary / switch source caps → the boolean slice field whose
@@ -7450,6 +7510,8 @@ var SOURCE_CAP_ACTIVE_FIELD = {
7450
7510
  vibration: "detected",
7451
7511
  tamper: "tampered"
7452
7512
  };
7513
+ /** Cap names whose presence in a device's bindings qualify it as a source. */
7514
+ var SOURCE_CAPS = Object.keys(SOURCE_CAP_ACTIVE_FIELD);
7453
7515
  /**
7454
7516
  * Error types for the safe expression engine. Two distinct classes so callers
7455
7517
  * can tell a compile-time (grammar) failure from a runtime (evaluation)
@@ -8217,7 +8279,6 @@ var CompositionSchema = object({
8217
8279
  });
8218
8280
  new Set([
8219
8281
  "track",
8220
- "summary",
8221
8282
  "face",
8222
8283
  "identity",
8223
8284
  "plate",
@@ -8886,6 +8947,82 @@ var ArchivedDebugNoteQueryInputSchema = object({
8886
8947
  /** Max rows returned, newest-first. */
8887
8948
  limit: number().int().min(1).max(1e3).optional()
8888
8949
  });
8950
+ var TrackRelationKindSchema = _enum(["same-subject", "different-subjects"]);
8951
+ var TrackSideSchema = _enum(["before", "after"]);
8952
+ var TrackPurityValueSchema = _enum(["mixed", "not-a-subject"]);
8953
+ var TrackRelationSchema = object({
8954
+ id: string(),
8955
+ deviceId: number().int(),
8956
+ leftTrackId: string(),
8957
+ rightTrackId: string(),
8958
+ leftSide: TrackSideSchema.nullable(),
8959
+ rightSide: TrackSideSchema.nullable(),
8960
+ relation: TrackRelationKindSchema,
8961
+ presence: literal("continuous").nullable(),
8962
+ leftStartedAt: number().int().nullable(),
8963
+ rightStartedAt: number().int().nullable(),
8964
+ createdAt: number().int(),
8965
+ updatedAt: number().int(),
8966
+ author: string().nullable()
8967
+ });
8968
+ var TrackPuritySchema = object({
8969
+ id: string(),
8970
+ deviceId: number().int(),
8971
+ sourceTrackId: string(),
8972
+ purity: TrackPurityValueSchema,
8973
+ switchAtMs: number().int().nullable(),
8974
+ startedAt: number().int().nullable(),
8975
+ createdAt: number().int(),
8976
+ updatedAt: number().int(),
8977
+ author: string().nullable()
8978
+ });
8979
+ var SetTrackRelationInputSchema = object({
8980
+ deviceId: number().int(),
8981
+ trackId: string().min(1),
8982
+ otherTrackId: string().min(1),
8983
+ relation: TrackRelationKindSchema,
8984
+ presence: literal("continuous").optional(),
8985
+ trackSide: TrackSideSchema.optional(),
8986
+ otherSide: TrackSideSchema.optional()
8987
+ });
8988
+ var ClearTrackRelationInputSchema = object({
8989
+ deviceId: number().int(),
8990
+ trackId: string().min(1),
8991
+ otherTrackId: string().min(1)
8992
+ });
8993
+ var ClearTrackRelationResultSchema = object({ cleared: boolean() });
8994
+ var SetTrackPurityInputSchema = object({
8995
+ deviceId: number().int(),
8996
+ trackId: string().min(1),
8997
+ purity: _enum([
8998
+ "pure",
8999
+ "mixed",
9000
+ "not-a-subject"
9001
+ ]),
9002
+ switchAtMs: number().int().optional()
9003
+ });
9004
+ /** `null` when `pure` cleared the row. */
9005
+ var SetTrackPurityResultSchema = object({ purity: TrackPuritySchema.nullable() });
9006
+ var ListTrackRelationsInputSchema = object({
9007
+ deviceId: number().int(),
9008
+ trackId: string().optional(),
9009
+ since: number().int().optional(),
9010
+ until: number().int().optional(),
9011
+ limit: number().int().min(1).max(5e3).optional()
9012
+ });
9013
+ var ListTrackRelationsResultSchema = object({
9014
+ relations: array(TrackRelationSchema).readonly(),
9015
+ purities: array(TrackPuritySchema).readonly(),
9016
+ truncated: boolean()
9017
+ });
9018
+ _enum([
9019
+ "unknown-track",
9020
+ "cross-device",
9021
+ "self-relation",
9022
+ "contradiction",
9023
+ "switch-outside-track",
9024
+ "switch-needs-mixed"
9025
+ ]);
8889
9026
  /**
8890
9027
  * Ops-log — the durable, append-only operations audit shared by the
8891
9028
  * recordings and events management surfaces.
@@ -8961,22 +9098,22 @@ var CLASS_MAP_MACRO_TARGETS = [
8961
9098
  "package"
8962
9099
  ];
8963
9100
  /**
8964
- * Le macro classi di PRIMO LIVELLO: quelle che un object detector emette e che
8965
- * un operatore può selezionare.
9101
+ * The FIRST-LEVEL macro classes: those an object detector emits and that
9102
+ * an operator can select.
8966
9103
  *
8967
- * Sono le tre offerte dallo step `object-detection`
9104
+ * They are the three offered by the `object-detection` step
8968
9105
  * (`addon-pipeline/src/detection-pipeline/registry/step-definitions.ts`,
8969
- * `enabledMacroClasses`). `package` sta in {@link CLASS_MAP_MACRO_TARGETS} e in
8970
- * `MACRO_LABELS` — è una macro vera — ma NON qui: appartiene allo step
8971
- * `package-detection`, la cui abilitazione è guidata dalle zone, e offrire la
8972
- * stessa parola due volte ha già fatto accendere a un operatore il proxy COCO
9106
+ * `enabledMacroClasses`). `package` is in {@link CLASS_MAP_MACRO_TARGETS} and in
9107
+ * `MACRO_LABELS` — it is a true macro — but NOT here: it belongs to the step
9108
+ * `package-detection`, whose enablement is driven by zones, and offering the
9109
+ * same word twice has already made an operator turn on the COCO proxy
8973
9110
  * (suitcase/backpack/handbag) lasciando spento il detector dedicato.
8974
9111
  *
8975
- * UNA lista. Prima di oggi le stesse tre erano scritte a mano nell'offerta
8976
- * dello step e una seconda volta come union `FirstLevelMacro`
8977
- * (`types/detection.ts`); una terza copia per il trigger di registrazione
8978
- * (`RecordingTriggers.objectClasses`) avrebbe reso invisibile la divergenza
8979
- * successiva.
9112
+ * ONE list. Before today the same three were hand-written in the step's offer
9113
+ * and a second time as the union `FirstLevelMacro`
9114
+ * (`types/detection.ts`); a third copy for the recording trigger
9115
+ * (`RecordingTriggers.objectClasses`) would have made the later divergence
9116
+ * invisible.
8980
9117
  */
8981
9118
  var FIRST_LEVEL_MACRO_CLASSES = [
8982
9119
  "person",
@@ -9041,17 +9178,17 @@ var RecordingStorageModeSchema = _enum([
9041
9178
  "on-device-decision"
9042
9179
  ]);
9043
9180
  /**
9044
- * Le macro classi che possono aprire una finestra di registrazione — le stesse
9045
- * tre offerte dallo step `object-detection`, da UNA lista
9181
+ * The macro classes that can open a recording window — the same
9182
+ * three offered by the `object-detection` step, from ONE list
9046
9183
  * ({@link FIRST_LEVEL_MACRO_CLASSES}).
9047
9184
  */
9048
9185
  var RecordingObjectTriggerClassSchema = _enum(FIRST_LEVEL_MACRO_CLASSES);
9049
9186
  /**
9050
- * True quando `values` non ripete un elemento.
9187
+ * True when `values` does not repeat an element.
9051
9188
  *
9052
- * Un duplicato non è innocuo: ogni voce di `objectClasses` / `sensorDeviceIds`
9053
- * diventa una SORGENTE in `bandTriggerSources`, e la stessa sorgente due volte
9054
- * conterebbe due volte le sue finestre in `segmentMissedByMs`.
9189
+ * A duplicate is not harmless: every entry of `objectClasses` / `sensorDeviceIds`
9190
+ * becomes a SOURCE in `bandTriggerSources`, and the same source twice
9191
+ * would count its windows twice in `segmentMissedByMs`.
9055
9192
  */
9056
9193
  var noDuplicates = (values) => new Set(values).size === values.length;
9057
9194
  /** Which detectors trigger an `events`-mode band. */
@@ -9059,34 +9196,34 @@ var RecordingTriggersSchema = object({
9059
9196
  motion: boolean().optional(),
9060
9197
  audioThresholdDbfs: number().optional(),
9061
9198
  /**
9062
- * Le macro classi la cui detection apre una finestra. ASSENTE = la sorgente
9063
- * non è ascoltata; un array VUOTO è rifiutato, perché "banda events, trigger
9064
- * object acceso, nessuna classe" è la stessa forma "abilitata e non registra
9065
- * nulla, per sempre" contro cui è scritto `eventsBandCanEverDemand`.
9199
+ * The macro classes whose detection opens a window. ABSENT = the source
9200
+ * is not listened to; an EMPTY array is rejected, because "events band, object
9201
+ * trigger on, no class" is the same shape "enabled and records
9202
+ * nothing, forever" that `eventsBandCanEverDemand` is written against.
9066
9203
  *
9067
- * Il segnale letto è GIÀ FILTRATO: solo detection `source: 'pipeline'`, cioè
9068
- * quelle che hanno attraversato `enabledMacroClasses`, i
9069
- * `minConfidence<Macro>` e il full-frame guard. L'AI a bordo camera
9070
- * (`source: 'onboard'`) non attraversa nessuno di quei gate e NON apre
9071
- * finestre — vedi `recorder/object-trigger.ts`.
9204
+ * The signal read is ALREADY FILTERED: only `source: 'pipeline'` detections, i.e.
9205
+ * those that went through `enabledMacroClasses`, the
9206
+ * `minConfidence<Macro>` and the full-frame guard. The camera's onboard AI
9207
+ * (`source: 'onboard'`) goes through none of those gates and does NOT open
9208
+ * windows — see `recorder/object-trigger.ts`.
9072
9209
  */
9073
9210
  objectClasses: array(RecordingObjectTriggerClassSchema).min(1).refine(noDuplicates, { message: "objectClasses must not repeat a class" }).optional(),
9074
9211
  /**
9075
- * I device LINKED il cui FRONTE ALTO apre una finestra. Assente = la sorgente
9076
- * non è ascoltata; un array vuoto è rifiutato per la stessa ragione di
9212
+ * The LINKED devices whose RISING EDGE opens a window. Absent = the source
9213
+ * is not listened to; an empty array is rejected for the same reason as
9077
9214
  * `objectClasses`.
9078
9215
  *
9079
- * Sono id di device SORGENTE, non camere: la banda li nomina, quindi il
9080
- * percorso caldo (`DeviceStateChanged`, a ritmo di bus su tutta la flotta)
9081
- * non fa RPC. L'OFFERTA da cui l'operatore li sceglie è un'altra domanda, e
9082
- * si risolve con `deviceManager.getLinkedDevices` + `getBindingsBatch` per
9083
- * device (D12) — mai un elenco globale di cap.
9216
+ * These are SOURCE device ids, not cameras: the band names them, so the
9217
+ * hot path (`DeviceStateChanged`, at bus rate across the whole fleet)
9218
+ * does no RPC. The OFFER from which the operator picks them is another question, and
9219
+ * is resolved with `deviceManager.getLinkedDevices` + `getBindingsBatch` per
9220
+ * device (D12) — never a global list of caps.
9084
9221
  *
9085
- * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
9086
- * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
9087
- * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
9088
- * il livello: un contatto trovato già aperto al riavvio del runner non fa
9089
- * registrare.
9222
+ * What "high" means depends on the device TYPE and is not decided here:
9223
+ * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) is THE table,
9224
+ * the same one as the composite doorbell (D671). And it is the EDGE, not
9225
+ * the level: a contact found already open at runner restart does not
9226
+ * record.
9090
9227
  */
9091
9228
  sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
9092
9229
  });
@@ -10163,7 +10300,7 @@ var DecoderSessionConfigSchema = object({
10163
10300
  * - **VALUE** — at which level, for which scope, until when. That stays ONE
10164
10301
  * thing: the logging settings document on the `system` cap. Two authorities
10165
10302
  * over the values is the exact defect
10166
- * `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
10303
+ * `docs/design/plans/2026-08-26-per-component-logging.md` was written to
10167
10304
  * remove; re-introducing it from the cure side would be grotesque.
10168
10305
  *
10169
10306
  * Nothing in this file reads a clock, an env var or a store. The registry is
@@ -11439,6 +11576,68 @@ method(object({
11439
11576
  password: string()
11440
11577
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
11441
11578
  /**
11579
+ * How long one snapshot may take end to end: the pinned copy of the whole
11580
+ * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
11581
+ * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
11582
+ * generous because a timeout fails the whole backup run.
11583
+ */
11584
+ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
11585
+ /**
11586
+ * The databases an owner snapshots — declared by the OWNER, so a caller never
11587
+ * guesses which file is live from what sits beside it (a cleanly closed
11588
+ * database has no sidecars and is just as owned). Paths are absolute on the
11589
+ * owner's host.
11590
+ */
11591
+ var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
11592
+ /** One b-tree table of the snapshot and the rows it holds. */
11593
+ var DatabaseSnapshotTableSchema = object({
11594
+ name: string(),
11595
+ rows: number().int().nonnegative()
11596
+ });
11597
+ /**
11598
+ * What the owner wrote. Every path is ABSOLUTE on the owner's host — the
11599
+ * caller pins the call to its own node, so it can read the file; a caller
11600
+ * that finds the path outside its own data root refuses it rather than
11601
+ * archiving something it cannot place.
11602
+ */
11603
+ var DatabaseSnapshotResultSchema = object({
11604
+ /** The live database the snapshot copies. Never to be copied as a file. */
11605
+ livePath: string(),
11606
+ /** The verified copy: `<livePath>` + {@link DATABASE_SNAPSHOT_SUFFIX}. */
11607
+ snapshotPath: string(),
11608
+ sizeBytes: number().int().nonnegative(),
11609
+ pageCount: number().int().nonnegative(),
11610
+ pageSize: number().int().positive(),
11611
+ /**
11612
+ * Every b-tree table with its row count. Read inside the SAME read
11613
+ * transaction the copy was taken from, and found EQUAL on the copy — so
11614
+ * this is the content of the snapshot, not an estimate of the source.
11615
+ */
11616
+ tables: array(DatabaseSnapshotTableSchema),
11617
+ /** Wall time of the pinned copy (row counts included). */
11618
+ copyMs: number().nonnegative(),
11619
+ /** Wall time of the checks on the copy (`integrity_check`, row counts). */
11620
+ verifyMs: number().nonnegative(),
11621
+ /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
11622
+ takenAt: number()
11623
+ });
11624
+ /**
11625
+ * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
11626
+ * the same facts, with both paths relative to the archive root (the node's
11627
+ * data dir), because an archive outlives the host that made it.
11628
+ */
11629
+ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
11630
+ /** Archive-relative path of the live database the archive does NOT carry. */
11631
+ livePath: string(),
11632
+ /** Archive-relative path of the verified copy it carries in its place. */
11633
+ snapshotPath: string()
11634
+ });
11635
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
11636
+ kind: "mutation",
11637
+ auth: "admin",
11638
+ timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
11639
+ });
11640
+ /**
11442
11641
  * Orchestrator-side destination metadata. The orchestrator computes
11443
11642
  * `id = <addonId>:<subId>` from its provider lookup so consumers
11444
11643
  * (admin UI, restore flow) see one canonical key.
@@ -11549,7 +11748,12 @@ var ArchiveManifestSchema = object({
11549
11748
  locations: array(string()),
11550
11749
  entries: array(ArchiveEntrySchema),
11551
11750
  totalBytes: number(),
11552
- totalFiles: number()
11751
+ totalFiles: number(),
11752
+ /**
11753
+ * Live SQLite databases this archive carries as their OWNER's verified
11754
+ * snapshot instead of as files (D693). Absent on archives made before.
11755
+ */
11756
+ sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
11553
11757
  });
11554
11758
  var LocationStatSchema = object({
11555
11759
  name: string(),
@@ -11807,7 +12011,7 @@ var BrokerStatusEnum = _enum([
11807
12011
  "unreachable",
11808
12012
  "error"
11809
12013
  ]);
11810
- var BrokerInfoSchema$1 = object({
12014
+ var BrokerInfoSchema = object({
11811
12015
  /** Stable broker id. Persisted; survives addon restarts. */
11812
12016
  id: string(),
11813
12017
  /** Addon id of the provider that OWNS this broker.
@@ -11940,7 +12144,7 @@ var GetStateInputSchema = object({
11940
12144
  * HA: entity_id (returns the cached entity state). */
11941
12145
  key: string()
11942
12146
  });
11943
- method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, BrokerInfoSchema$1.nullable()), method(_void(), array(BrokerProviderInfoSchema), { auth: "admin" }), method(AddInputSchema, AddResultSchema, {
12147
+ method(ListInputSchema, array(BrokerInfoSchema)), method(GetInputSchema, BrokerInfoSchema.nullable()), method(_void(), array(BrokerProviderInfoSchema), { auth: "admin" }), method(AddInputSchema, AddResultSchema, {
11944
12148
  kind: "mutation",
11945
12149
  auth: "admin"
11946
12150
  }), method(RemoveInputSchema, _void(), {
@@ -12973,6 +13177,116 @@ var CompositionBlockStateSchema = object({
12973
13177
  reason: string().optional(),
12974
13178
  fields: array(CompositionFieldStateSchema)
12975
13179
  });
13180
+ var ComposerBlockSchema = object({
13181
+ id: string().min(1),
13182
+ name: string().min(1).max(120),
13183
+ enabled: boolean(),
13184
+ updatedAt: number(),
13185
+ composition: CompositionSchema
13186
+ });
13187
+ /**
13188
+ * A stored composition row that no longer PARSES — a schema a release
13189
+ * tightened, a row written by a newer build. Sent by id so the composer keeps
13190
+ * its device as a placeholder and reports the block `failed` naming the parse
13191
+ * error. Leaving it out would read, twice, exactly like a delete (D49).
13192
+ */
13193
+ var ComposerUnreadableBlockSchema = object({
13194
+ id: string().min(1),
13195
+ /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13196
+ name: string().nullable(),
13197
+ /** The parse error, in the operator's words. */
13198
+ error: string()
13199
+ });
13200
+ method(object({
13201
+ /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13202
+ integrationId: string().nullable(),
13203
+ /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13204
+ storeLoaded: boolean(),
13205
+ blocks: array(ComposerBlockSchema),
13206
+ /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13207
+ restartBlockIds: array(string()),
13208
+ /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13209
+ unreadableBlocks: array(ComposerUnreadableBlockSchema)
13210
+ }), object({
13211
+ blocks: array(object({
13212
+ blockId: string(),
13213
+ status: CompositionRunStatusSchema,
13214
+ reason: string().optional()
13215
+ })),
13216
+ /**
13217
+ * False when the composer declared and withdrew NOTHING (store not loaded,
13218
+ * integration unknown, its own rows unread or read empty once). An empty
13219
+ * apply the caller owes is paid off only by one the composer acted on (D49).
13220
+ */
13221
+ acted: boolean()
13222
+ }), {
13223
+ kind: "mutation",
13224
+ auth: "admin"
13225
+ }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
13226
+ var NUMBER = {
13227
+ kind: "fixed",
13228
+ result: ["number"]
13229
+ };
13230
+ var BOOLEAN = {
13231
+ kind: "fixed",
13232
+ result: ["boolean"]
13233
+ };
13234
+ Object.freeze({
13235
+ min: NUMBER,
13236
+ max: NUMBER,
13237
+ abs: NUMBER,
13238
+ floor: NUMBER,
13239
+ ceil: NUMBER,
13240
+ sqrt: NUMBER,
13241
+ round: NUMBER,
13242
+ pow: NUMBER,
13243
+ clamp: NUMBER,
13244
+ avg: NUMBER,
13245
+ sum: NUMBER,
13246
+ age: NUMBER,
13247
+ convert: NUMBER,
13248
+ coalesce: { kind: "coalesce" },
13249
+ any: BOOLEAN,
13250
+ all: BOOLEAN,
13251
+ within: BOOLEAN,
13252
+ latest: {
13253
+ kind: "fixed",
13254
+ result: ["number", "null"]
13255
+ },
13256
+ number: {
13257
+ kind: "fixed",
13258
+ result: ["number", "null"]
13259
+ },
13260
+ rose: {
13261
+ kind: "fixed",
13262
+ result: ["number", "null"]
13263
+ },
13264
+ count: NUMBER
13265
+ });
13266
+ `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
13267
+ /**
13268
+ * What a composition may BUILD on a device type (G2, D676): the caps a new
13269
+ * device of that type, or an existing one that lacks them, can be given. The
13270
+ * blockers are the validator's own refusal codes, and a spec compares this
13271
+ * listing with `planComposition` for every capability — the editor can never
13272
+ * offer a feature the save would refuse for the same reason.
13273
+ */
13274
+ var ComposableFieldSchema = object({
13275
+ path: string(),
13276
+ kind: CompositionFieldKindSchema,
13277
+ nullable: boolean(),
13278
+ required: boolean(),
13279
+ enumValues: array(string()).optional()
13280
+ });
13281
+ var ComposableCapabilitiesSchema = object({ caps: array(object({
13282
+ cap: string(),
13283
+ fields: array(ComposableFieldSchema),
13284
+ /** Present for an item-array cap (`consumables.items`). */
13285
+ itemArray: object({
13286
+ path: string(),
13287
+ keyField: string()
13288
+ }).optional()
13289
+ })) });
12976
13290
  /** Where a block runs. The operator chooses — a block driving a device on an
12977
13291
  * agent is the reason placement is not fixed to the hub. */
12978
13292
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -13137,7 +13451,7 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13137
13451
  }), method(object({ blockId: string() }), CompositionGetReadSchema, { auth: "admin" }), method(object({}), CompositionListReadSchema, { auth: "admin" }), method(object({
13138
13452
  addonId: string().min(1),
13139
13453
  stableId: string().min(1)
13140
- }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({
13454
+ }), CompositionCustomizationReadSchema, { auth: "admin" }), method(object({ deviceType: _enum(DeviceType) }), ComposableCapabilitiesSchema, { auth: "admin" }), method(object({
13141
13455
  composition: CompositionSchema,
13142
13456
  blockId: string().optional()
13143
13457
  }), CompositionValidationSchema, {
@@ -13145,52 +13459,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13145
13459
  auth: "admin",
13146
13460
  access: "view"
13147
13461
  });
13148
- var ComposerBlockSchema = object({
13149
- id: string().min(1),
13150
- name: string().min(1).max(120),
13151
- enabled: boolean(),
13152
- updatedAt: number(),
13153
- composition: CompositionSchema
13154
- });
13155
- /**
13156
- * A stored composition row that no longer PARSES — a schema a release
13157
- * tightened, a row written by a newer build. Sent by id so the composer keeps
13158
- * its device as a placeholder and reports the block `failed` naming the parse
13159
- * error. Leaving it out would read, twice, exactly like a delete (D49).
13160
- */
13161
- var ComposerUnreadableBlockSchema = object({
13162
- id: string().min(1),
13163
- /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13164
- name: string().nullable(),
13165
- /** The parse error, in the operator's words. */
13166
- error: string()
13167
- });
13168
- method(object({
13169
- /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13170
- integrationId: string().nullable(),
13171
- /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13172
- storeLoaded: boolean(),
13173
- blocks: array(ComposerBlockSchema),
13174
- /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13175
- restartBlockIds: array(string()),
13176
- /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13177
- unreadableBlocks: array(ComposerUnreadableBlockSchema)
13178
- }), object({
13179
- blocks: array(object({
13180
- blockId: string(),
13181
- status: CompositionRunStatusSchema,
13182
- reason: string().optional()
13183
- })),
13184
- /**
13185
- * False when the composer declared and withdrew NOTHING (store not loaded,
13186
- * integration unknown, its own rows unread or read empty once). An empty
13187
- * apply the caller owes is paid off only by one the composer acted on (D49).
13188
- */
13189
- acted: boolean()
13190
- }), {
13191
- kind: "mutation",
13192
- auth: "admin"
13193
- }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
13194
13462
  /**
13195
13463
  * `custom-model-registry` — collection cap exposing operator-registered
13196
13464
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -13485,7 +13753,7 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
13485
13753
  *
13486
13754
  * ⚠ An earlier version of this comment blamed Zod stripping, and that
13487
13755
  * was wrong — corrected 2026-08-26 after the hop map
13488
- * (`docs/design/2026-08-26-mappa-hop-argomenti.md`) traced the path.
13756
+ * (`docs/design/2026-08-26-topic-hop-map.md`) traced the path.
13489
13757
  * There is **no Zod parse at all** between the door and the engine: the
13490
13758
  * dispatcher forwards the payload verbatim and UDS carries it whole. A
13491
13759
  * field declared here reaches `SqliteSettingsBackend` either way.
@@ -14354,7 +14622,17 @@ var SiteZoneSchema = object({
14354
14622
  var ProviderStatusSchema = object({
14355
14623
  connected: boolean(),
14356
14624
  deviceCount: number(),
14357
- error: string().optional()
14625
+ error: string().optional(),
14626
+ /**
14627
+ * `'orchestrator'`: this provider writes NO camera's `motion` runtime slice
14628
+ * — the orchestrator is its only writer (D696). Set by `BaseDeviceProvider`,
14629
+ * which every provider bundles, so only a provider BUILT from D696-amended
14630
+ * code says it. ABSENT means an older provider that may still write it (raw
14631
+ * VMD writes, a boot seed), and the orchestrator's provider gate keeps that
14632
+ * provider's cameras unwritten (`camera-sensors/motion-slice-provider-gate.ts`)
14633
+ * — the provider twin of the runner's `getLocalLoad().motionSliceWriter`.
14634
+ */
14635
+ motionSliceWriter: literal("orchestrator").optional()
14358
14636
  });
14359
14637
  object({
14360
14638
  externalId: string(),
@@ -15233,6 +15511,121 @@ method(object({
15233
15511
  deviceIds: array(number()).readonly(),
15234
15512
  caps: array(string()).readonly().optional()
15235
15513
  }), record(string(), record(string(), unknown().nullable())));
15514
+ var ExtensionSlotIdSchema = _enum(["linked-devices"]);
15515
+ DeviceType.Camera;
15516
+ /** A slot's editable value, discriminated on `slot`. */
15517
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15518
+ DeviceType.Camera;
15519
+ var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
15520
+ state: literal("unreachable"),
15521
+ reason: string()
15522
+ })]);
15523
+ /** One provider of slots — the D554 source-listing row. */
15524
+ var ExtensionSourceSchema = object({
15525
+ /** The routing prefix of every `slotRef` this provider serves. */
15526
+ source: string(),
15527
+ label: string(),
15528
+ /** Stamped by the dispatcher from the registry (D557). */
15529
+ addonId: string().optional(),
15530
+ availability: ExtensionSourceAvailabilitySchema
15531
+ });
15532
+ /**
15533
+ * How one picked source stands. `missing` — no such device (deleted, or an id
15534
+ * that never existed); `foreign` — a device the slot's owner cannot read from
15535
+ * (a source owned by another addon); `unavailable` — it exists but is not a
15536
+ * valid source now (a container, which is never a pick). A source in any of
15537
+ * these states is SHOWN, never silently dropped or re-pointed.
15538
+ */
15539
+ var ExtensionSourceHealthSchema = _enum([
15540
+ "ok",
15541
+ "missing",
15542
+ "foreign",
15543
+ "unavailable"
15544
+ ]);
15545
+ var ExtensionSlotSourceSchema = object({
15546
+ deviceId: number().int(),
15547
+ /** The device's name, or null when it could not be resolved (`missing`). */
15548
+ name: string().nullable(),
15549
+ health: ExtensionSourceHealthSchema,
15550
+ detail: string().optional()
15551
+ });
15552
+ /**
15553
+ * A DIFFERENT authority that gates whether the slot's sources do anything —
15554
+ * reported read-only, named, never written through this contract (D62) — e.g.
15555
+ * a slot whose sources act only while a wrapper is bound to the host, a
15556
+ * binding that belongs to `deviceManager.setWrapperActive`. No slot reports
15557
+ * one today (`linked-devices` answers `null`). `unknown` means the gate could
15558
+ * not be read; it is not "inactive" (D315).
15559
+ */
15560
+ var ExtensionSlotActivationSchema = object({
15561
+ state: _enum([
15562
+ "active",
15563
+ "inactive",
15564
+ "unknown"
15565
+ ]),
15566
+ authority: string(),
15567
+ detail: string().optional()
15568
+ });
15569
+ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
15570
+ state: literal("ok"),
15571
+ /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
15572
+ slotRef: string(),
15573
+ slot: ExtensionSlotIdSchema,
15574
+ /** Names the store written (D62), e.g. `device-manager:_linkedDeviceIds`. */
15575
+ authority: string(),
15576
+ activation: ExtensionSlotActivationSchema.nullable(),
15577
+ value: ExtensionSlotValueSchema,
15578
+ sources: array(ExtensionSlotSourceSchema),
15579
+ /**
15580
+ * Devices the owner links to the host ON ITS OWN, by structure, and that
15581
+ * are therefore not in `value` (D655): a camera's device-tree children, and
15582
+ * the child a picked container stands for (D356 — a container is never a
15583
+ * pick, its children are). Read-only; the editor shows them and may offer
15584
+ * per-device options on them (the linked-devices tracked-event opt-in).
15585
+ * Absent when the owner links nothing beyond the picks, and from an owner
15586
+ * older than D655.
15587
+ */
15588
+ impliedSources: array(ExtensionSlotSourceSchema).optional()
15589
+ }), object({
15590
+ state: literal("unreachable"),
15591
+ addonId: string(),
15592
+ reason: string()
15593
+ })]);
15594
+ var ExtensionCandidatesSchema = object({ candidates: array(object({
15595
+ deviceId: number().int(),
15596
+ name: string(),
15597
+ type: string(),
15598
+ location: string().nullable(),
15599
+ /** The container a child belongs to — "Spotlight 2" alone does not say which. */
15600
+ parentName: string().nullable(),
15601
+ /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
15602
+ suggested: boolean(),
15603
+ /** Why it is suggested ("same location"), null when it is not. */
15604
+ reason: string().nullable()
15605
+ })) });
15606
+ /**
15607
+ * What a write did. `none` — applied in place. `host` / `parent` — the owner
15608
+ * reloaded the host (or, for an accessory child, its parent) because the
15609
+ * write changed what the host REGISTERS. A slot never adds a capability to its
15610
+ * host — that is a composition (D663) — so today's owners answer `none`.
15611
+ */
15612
+ var ExtensionSetResultSchema = object({
15613
+ applied: literal(true),
15614
+ reload: _enum([
15615
+ "none",
15616
+ "host",
15617
+ "parent"
15618
+ ])
15619
+ });
15620
+ var ExtensionSlotRefInputSchema = object({
15621
+ deviceId: number().int(),
15622
+ slotRef: string().min(1)
15623
+ });
15624
+ var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
15625
+ method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
15626
+ kind: "mutation",
15627
+ auth: "admin"
15628
+ });
15236
15629
  /**
15237
15630
  * Per-field ownership (D663). A composition may CLAIM fields of a native
15238
15631
  * cap's runtime-state slice on an existing device: `replace` overlays the
@@ -15456,7 +15849,7 @@ method(object({
15456
15849
  * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
15457
15850
  * ends in a log line, and a log line is the thing the operator asked to stop
15458
15851
  * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
15459
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
15852
+ * 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
15460
15853
  * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
15461
15854
  * media blackout were both diagnosed. The counters stay; this is where they can
15462
15855
  * be READ.
@@ -16832,7 +17225,7 @@ var BrokerStatusSchema$1 = _enum([
16832
17225
  "unreachable",
16833
17226
  "tls-error"
16834
17227
  ]);
16835
- var BrokerInfoSchema = object({
17228
+ var BrokerInfoSchema$1 = object({
16836
17229
  id: string(),
16837
17230
  name: string(),
16838
17231
  url: string(),
@@ -16895,7 +17288,7 @@ var StatusSchema = object({
16895
17288
  brokerCount: number(),
16896
17289
  embeddedRunning: boolean()
16897
17290
  });
16898
- method(_void(), array(BrokerInfoSchema)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
17291
+ method(_void(), array(BrokerInfoSchema$1)), method(IdInputSchema, BrokerConnectionDetailsSchema, { auth: "admin" }), method(AddBrokerInputSchema, AddBrokerResultSchema, {
16899
17292
  kind: "mutation",
16900
17293
  auth: "admin"
16901
17294
  }), method(IdInputSchema, _void(), {
@@ -18205,17 +18598,25 @@ var NcScheduleSchema = object({
18205
18598
  */
18206
18599
  var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
18207
18600
  /**
18601
+ * How a summary window is SENT (D698): `rule` (absent) = ONE notification with
18602
+ * every section; `section` = one notification per section with something to
18603
+ * say (an unavailable section included), each titled by its section.
18604
+ */
18605
+ var NcStateSummarySplitSchema = _enum(["rule", "section"]);
18606
+ /**
18208
18607
  * `summary`: the rule sends NOTHING per event. When a window of `schedule`
18209
18608
  * CLOSES, it sends one notification with the current state of its kinds
18210
18609
  * (low batteries, consumables to replace, devices offline, updates
18211
- * available, ...), after its own filters. Nothing to report sends nothing.
18610
+ * available, ...), after its own filters — or, with `split: 'section'`
18611
+ * (D698), one notification per section. Nothing to report sends nothing.
18212
18612
  * The schedule is the ordinary `NcSchedule` (weekly windows, IANA timezone,
18213
18613
  * midnight crossing); the send time is each window's END. Refused on the
18214
18614
  * `alarm` family, which stays instant (`systemEventDeliveryProblems`).
18215
18615
  */
18216
18616
  var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
18217
18617
  mode: literal("summary"),
18218
- schedule: NcScheduleSchema
18618
+ schedule: NcScheduleSchema,
18619
+ split: NcStateSummarySplitSchema.optional()
18219
18620
  })]);
18220
18621
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
18221
18622
  var NcPlateMatcherSchema = object({
@@ -18355,8 +18756,14 @@ var NcSensorTransitionSchema = _enum(["raised", "cleared"]);
18355
18756
  /** Admin-zone membership condition (zone IDs as stamped by the ZoneEngine). */
18356
18757
  var NcZoneConditionSchema = object({
18357
18758
  ids: array(string().min(1)).min(1),
18358
- /** Quantifier over `ids` — at least one / every one visited. */
18359
- match: _enum(["any", "all"]).default("any")
18759
+ /**
18760
+ * LEGACY quantifier over `ids`. Absent = `any` (at least one visited), which
18761
+ * is what both editors mean and all they write since D690: "all of" was
18762
+ * removed from the editors because on an immediate rule it asked one
18763
+ * detection to stand in every zone at once. Still ACCEPTED, and `all` still
18764
+ * evaluated, so a stored rule keeps parsing and meaning what it meant.
18765
+ */
18766
+ match: _enum(["any", "all"]).optional()
18360
18767
  });
18361
18768
  /**
18362
18769
  * The P1 condition set — a flat AND of groups; absent group = pass;
@@ -18860,10 +19267,12 @@ var NcMediaPolicySchema = object({
18860
19267
  /**
18861
19268
  * Cooldown GRANULARITY over the subject's class — how much a fired
18862
19269
  * notification suppresses.
18863
- * - `shared` (default, and the absent value) — one window for the whole
18864
- * rule/scope: a cat silences the next dog for `cooldownSec`.
18865
- * - `per-class` — an independent window per detected class, so cat→dog fires
18866
- * at once and cat→cat still waits.
19270
+ * - `per-class` (default, and the absent value since 2026-10-01 — D36) — an
19271
+ * independent window per detected class: cat→dog fires at once, cat→cat
19272
+ * still waits.
19273
+ * - `shared` — one window for the whole rule/scope: a cat silences the next
19274
+ * dog for `cooldownSec`. Only written when an operator picks it; it is no
19275
+ * longer what an unset rule means.
18867
19276
  *
18868
19277
  * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
18869
19278
  * must not be swallowed by a bark's window (the precedent this generalizes —
@@ -18878,8 +19287,11 @@ var NcThrottleSchema = object({
18878
19287
  /**
18879
19288
  * Class granularity of the cooldown key. Optional rather than defaulted:
18880
19289
  * a Zod default does NOT run on the addon→addon cap path, so a persisted
18881
- * rule authored before this field simply carries none — and the engine
18882
- * reads absent as `shared`, the pre-existing behaviour.
19290
+ * rule authored before this field simply carries none. The engine used to
19291
+ * read absent as `shared` (D36); since 2026-10-01 it reads absent as
19292
+ * `per-class` — the operator's default — and only an explicit `shared`
19293
+ * still means `shared`. See `cooldownKey` / `keysPerClass` in the rule
19294
+ * engine, and D36's dated note.
18883
19295
  */
18884
19296
  granularity: NcThrottleGranularitySchema.optional()
18885
19297
  });
@@ -19052,78 +19464,16 @@ var NcRuleInputSchema = object({
19052
19464
  */
19053
19465
  confirm: NcConfirmSchema.optional(),
19054
19466
  /**
19055
- * WAIT for face/plate recognition before saying anything.
19056
- *
19057
- * A notification's TEXT is frozen at enqueue and its media is re-resolved at
19058
- * send; the identity is neither. A face is confirmed after `confirmFrames`
19059
- * agreeing observations — p50 **11.4 s** after the track was first seen,
19060
- * measured on this hub — and an `immediate` rule enqueues on the first object
19061
- * event, seconds before that. So "Gianluca è arrivato" is unsayable on the
19062
- * immediate path, and no amount of media re-resolution fixes a sentence.
19063
- *
19064
- * Only two honest answers exist, and this flag picks between them. It has
19065
- * effect ONLY on a rule that declares a recognition scope
19066
- * ({@link NcConditions.identities} or {@link NcConditions.plates}) — on any
19067
- * other rule there is nothing to wait for and the flag is inert.
19068
- *
19069
- * | value | what happens |
19070
- * | --- | --- |
19071
- * | `true` | the rule stops firing on the object event and fires at TRACK CLOSE instead, once, with the name — later, and complete |
19072
- * | 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) |
19073
- *
19074
- * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
19075
- * on the addon cap path, and absent has to keep meaning exactly what every
19076
- * rule authored before this field meant.
19077
- *
19078
- * The cost of `true` is stated here because the editor states it too: a rule
19079
- * that waits also inherits track-close SEMANTICS — its `zones` condition
19080
- * tests every zone the track visited and a `crossing` condition can no longer
19081
- * be satisfied, because a closed track carries no crossing.
19467
+ * IMMEDIATE GROUPED (D692): the first matching subject opens a window of this many
19468
+ * seconds; the rule sends ONE message when the window closes — early, once every
19469
+ * subject in it is final, never before {@link NC_GROUPING_MIN_SEC} — naming everybody
19470
+ * the rule matched, with one mosaic tile per subject.
19471
+ * Absent = plain immediate (one message per track, at the first match).
19472
+ * Only an `immediate` DETECTION rule may carry it (`ruleGroupingApplies`, enforced on
19473
+ * save by the hub's grouping guard). `.optional()`, never `.default()`: the addon cap
19474
+ * path does not run Zod defaults.
19082
19475
  */
19083
- waitForEnhancement: boolean().optional(),
19084
- /**
19085
- * GROUP a burst of subjects into ONE notification that grows.
19086
- *
19087
- * Seconds of quiet after the last matching subject before the burst is
19088
- * considered over. While it is open, the first subject enqueues immediately —
19089
- * **exactly as today, with no added latency** — and every real growth (a new
19090
- * subject, or a name confirmed on one already in it) REPLACES that
19091
- * notification with an updated one naming everybody. The push carries the
19092
- * group's own coalescing tag, so the phone replaces rather than stacks.
19093
- *
19094
- * `0` / absent = off, and off is today's behaviour byte for byte.
19095
- *
19096
- * ### Why an idle cutoff and not a window
19097
- *
19098
- * The measured seven-person arrival on device 590 spans 110 s with every
19099
- * internal gap under 30 s. A 12 s fixed window cuts it into three groups; an
19100
- * idle cutoff holds it as one and ends it when the arrival actually ends.
19101
- * 30 s is a widely shipped value for the same decision.
19102
- *
19103
- * ### What it replaces
19104
- *
19105
- * The blind cooldown, which collapses a burst by DISCARDING it. Measured on
19106
- * device 615 / *Persona su Uscio* over six days: 116 qualifying tracks → 74
19107
- * notifications, **44 (37.9%) suppressed outright**, 23 of them overlapping a
19108
- * track that did fire and 7 carrying a confirmed identity nobody heard about.
19109
- * A group collapses the same volume by MERGING, so the cooldown becomes a
19110
- * budget over GROUPS — which is what it always meant — and a growth is never
19111
- * throttled by the window its own first member spent.
19112
- *
19113
- * ### Interaction with {@link waitForEnhancement}
19114
- *
19115
- * They compose, and the order matters. `waitForEnhancement` defers the rule to
19116
- * TRACK CLOSE, so with both set the group is opened by the first member to
19117
- * CLOSE — already carrying its name — and grows as later members close. That
19118
- * is later, and complete. With grouping alone the group opens on the first
19119
- * object event and picks up names as they are confirmed, through the growth
19120
- * path. Neither combination fires twice for one subject.
19121
- *
19122
- * `.optional()` and deliberately NOT `.default()`: a Zod default does not run
19123
- * on the addon cap path, so absent must keep meaning what it meant before this
19124
- * field existed.
19125
- */
19126
- groupIdleSec: number().int().min(0).max(600).optional()
19476
+ groupingSec: number().int().min(5).max(60).optional()
19127
19477
  });
19128
19478
  /**
19129
19479
  * Partial patch for `updateRule` — any subset of the input fields, plus the
@@ -19171,9 +19521,10 @@ var NcRuleClearableKeySchema = _enum([
19171
19521
  "targetUsers",
19172
19522
  "snoozeOptions",
19173
19523
  "snoozeAllowGlobal",
19174
- "waitForEnhancement",
19175
19524
  "actions",
19176
19525
  "confirm",
19526
+ "groupingSec",
19527
+ "waitForEnhancement",
19177
19528
  "groupIdleSec"
19178
19529
  ]);
19179
19530
  var NcRuleUpdateInputSchema = object({
@@ -19195,19 +19546,47 @@ var NcRuleSchema = NcRuleInputSchema.extend({
19195
19546
  */
19196
19547
  disabledTargetIds: array(string()).default([])
19197
19548
  });
19549
+ /**
19550
+ * The state-summary SECTIONS (D647 / D698): the D637 kind groups that report a
19551
+ * still-true state. `backups-exports` and `alarm` are not sections — a completed
19552
+ * job is not an open state, and the alarm stays instant.
19553
+ */
19554
+ var NcStateSummarySectionIdSchema = _enum([
19555
+ "device-state",
19556
+ "streams",
19557
+ "battery",
19558
+ "consumables",
19559
+ "tanks",
19560
+ "detection-blind",
19561
+ "nodes",
19562
+ "addons",
19563
+ "updates"
19564
+ ]);
19198
19565
  /** One section of a previewed state summary. `unavailable` = its state could not be read. */
19199
19566
  var NcStateSummaryPreviewSectionSchema = object({
19200
- id: string(),
19567
+ id: NcStateSummarySectionIdSchema,
19201
19568
  status: _enum(["read", "unavailable"]),
19202
19569
  items: number().int().nonnegative(),
19203
19570
  reason: string().optional()
19204
19571
  });
19205
19572
  /**
19573
+ * One notification a previewed summary would send (D698): the whole summary on
19574
+ * a `rule` split (no `section`), one section's on a `section` split.
19575
+ */
19576
+ var NcStateSummaryPreviewRowSchema = object({
19577
+ section: NcStateSummarySectionIdSchema.optional(),
19578
+ /** The section's name on a per-section row; every reported section's, joined, on a combined one. */
19579
+ title: string(),
19580
+ text: string(),
19581
+ count: number().int().nonnegative()
19582
+ });
19583
+ /**
19206
19584
  * The summary a rule would send now. `empty` = nothing to report and every
19207
19585
  * section read: such a summary is NOT sent. `dropped` counts the open states
19208
19586
  * the rule's own filters (or a camera mute) left out, by reason.
19209
19587
  * `excludedGroups` names the kind groups selected that have no state to report
19210
- * (backups & exports).
19588
+ * (backups & exports). `split` and `rows` (D698) say how it would be sent —
19589
+ * optional, so an older hub's answer still parses.
19211
19590
  */
19212
19591
  var NcStateSummaryPreviewSchema = object({
19213
19592
  empty: boolean(),
@@ -19215,7 +19594,9 @@ var NcStateSummaryPreviewSchema = object({
19215
19594
  text: string(),
19216
19595
  sections: array(NcStateSummaryPreviewSectionSchema),
19217
19596
  dropped: record(string(), number().int().nonnegative()),
19218
- excludedGroups: array(string())
19597
+ excludedGroups: array(string()),
19598
+ split: NcStateSummarySplitSchema.optional(),
19599
+ rows: array(NcStateSummaryPreviewRowSchema).optional()
19219
19600
  });
19220
19601
  var NcTestResultSchema = object({
19221
19602
  recordId: string(),
@@ -19630,6 +20011,29 @@ object({
19630
20011
  firstAt: number(),
19631
20012
  lastAt: number()
19632
20013
  });
20014
+ var NC_ALARM_TRIGGERED_MAX_SEC = 3600;
20015
+ var NcAlarmDelaySecSchema = number().int().min(0).max(600);
20016
+ var NcAlarmTriggeredSecSchema = number().int().min(0).max(NC_ALARM_TRIGGERED_MAX_SEC);
20017
+ var uniqueModes = (entries) => new Set(entries.map((e) => e.mode)).size === entries.length;
20018
+ var NcAlarmModeDelaysListSchema = array(object({
20019
+ mode: AlarmArmModeSchema,
20020
+ exitDelaySec: NcAlarmDelaySecSchema.optional(),
20021
+ entryDelaySec: NcAlarmDelaySecSchema.optional(),
20022
+ triggeredDurationSec: NcAlarmTriggeredSecSchema.optional()
20023
+ })).max(8).refine(uniqueModes, { message: "modeDelays: at most one entry per arm mode" });
20024
+ var NcAlarmModeDelaysEditListSchema = array(object({
20025
+ mode: AlarmArmModeSchema,
20026
+ exitDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
20027
+ entryDelaySec: NcAlarmDelaySecSchema.nullable().optional(),
20028
+ triggeredDurationSec: NcAlarmTriggeredSecSchema.nullable().optional()
20029
+ })).max(8).refine(uniqueModes, { message: "modeDelays: at most one edit per arm mode" });
20030
+ /** One switch of the alarm table: put ONE device on, or take it off, ONE mode's list. */
20031
+ var NcAlarmNonBlockingEditSchema = object({
20032
+ mode: AlarmArmModeSchema,
20033
+ deviceId: number().int().positive(),
20034
+ /** true = on the list (may be open, does not block); false = off the list (blocks). */
20035
+ nonBlocking: boolean()
20036
+ });
19633
20037
  /**
19634
20038
  * The per-mode lists, at most one per mode. Two lists for one mode have no
19635
20039
  * meaning a reader could agree on (union? the last one?), so they are refused
@@ -19638,10 +20042,10 @@ object({
19638
20042
  var NcAlarmNonBlockingListSchema = array(object({
19639
20043
  mode: AlarmArmModeSchema,
19640
20044
  deviceIds: array(number().int()).max(200)
19641
- })).max(8).refine((lists) => new Set(lists.map((l) => l.mode)).size === lists.length, { message: "nonBlocking: at most one list per arm mode" });
20045
+ })).max(8).refine(uniqueModes, { message: "nonBlocking: at most one list per arm mode" });
19642
20046
  /**
19643
- * The three durations the panel's state machine runs on, who hears about its
19644
- * transitions, and which openings each mode tolerates.
20047
+ * The three durations — global, and per mode since D697 — the panel's state
20048
+ * machine runs on, who hears about its transitions, and which openings each mode tolerates.
19645
20049
  *
19646
20050
  * They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
19647
20051
  * `alarm-panel` is `deviceNative` and its other provider mirrors somebody
@@ -19651,15 +20055,15 @@ var NcAlarmNonBlockingListSchema = array(object({
19651
20055
  */
19652
20056
  var NcAlarmSettingsSchema = object({
19653
20057
  /** Grace period between arming and the mode taking effect. 0 = immediate. */
19654
- exitDelaySec: number().int().min(0).max(600),
20058
+ exitDelaySec: NcAlarmDelaySecSchema,
19655
20059
  /** Grace period between a trigger and the alarm firing. 0 = immediate. */
19656
- entryDelaySec: number().int().min(0).max(600),
20060
+ entryDelaySec: NcAlarmDelaySecSchema,
19657
20061
  /**
19658
20062
  * How long `triggered` lasts before the panel re-arms itself.
19659
20063
  * **0 = until an operator disarms it** — the behaviour before this field
19660
20064
  * existed, and therefore what an untouched install keeps doing.
19661
20065
  */
19662
- triggeredDurationSec: number().int().min(0).max(3600),
20066
+ triggeredDurationSec: NcAlarmTriggeredSecSchema,
19663
20067
  /**
19664
20068
  * Deprecated by D630 — every transition is announced. Parsed, never read;
19665
20069
  * remove after one release. Optional so an older admin's patch (which still
@@ -19682,17 +20086,30 @@ var NcAlarmSettingsSchema = object({
19682
20086
  * per mode is meaningful. Defaulted to `[]` so a blob stored before D630
19683
20087
  * parses as "every opening blocks" — the behaviour it was written under.
19684
20088
  */
19685
- nonBlocking: NcAlarmNonBlockingListSchema.default([])
20089
+ nonBlocking: NcAlarmNonBlockingListSchema.default([]),
20090
+ /**
20091
+ * Per arm mode, the delays that mode OVERRIDES (D697). A mode with no entry, or an entry
20092
+ * without a field, uses the global value above — so `[]`, the default, is exactly the
20093
+ * behaviour of a blob stored before this field existed. Read through `resolveModeDelays`.
20094
+ */
20095
+ modeDelays: NcAlarmModeDelaysListSchema.default([])
19686
20096
  });
19687
20097
  /**
19688
20098
  * Every field optional — a tab edits one control at a time.
19689
20099
  *
19690
- * `nonBlocking` is re-declared WITHOUT its default: `.partial()` does not
19691
- * remove an inner `.default()`, so a patch that never named the field would
19692
- * parse to `nonBlocking: []` and wipe every mode's list on an unrelated edit
19693
- * (the same trap {@link NcRulePatchSchema} documents).
20100
+ * `nonBlocking` and `modeDelays` are re-declared WITHOUT their defaults:
20101
+ * `.partial()` does not remove an inner `.default()`, so a patch that never
20102
+ * named the field would parse to `[]` and wipe every mode's list on an
20103
+ * unrelated edit (the same trap {@link NcRulePatchSchema} documents). Here
20104
+ * `modeDelays` means EDITS, not the stored overrides.
19694
20105
  */
19695
- var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({ nonBlocking: NcAlarmNonBlockingListSchema }).partial();
20106
+ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({
20107
+ nonBlocking: NcAlarmNonBlockingListSchema,
20108
+ /** Per-mode, per-field edits — NOT the whole list (see NcAlarmModeDelaysEditSchema). */
20109
+ modeDelays: NcAlarmModeDelaysEditListSchema,
20110
+ /** ONE membership change; the panel applies it to the list it holds at its turn. */
20111
+ nonBlockingEdit: NcAlarmNonBlockingEditSchema
20112
+ }).partial().refine((p) => p.nonBlocking === void 0 || p.nonBlockingEdit === void 0, { message: "nonBlocking and nonBlockingEdit are exclusive — send the whole lists or one edit" });
19696
20113
  /**
19697
20114
  * What one arm mode actually arms, DERIVED from the enabled rules gated on it.
19698
20115
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
@@ -19792,6 +20209,28 @@ var NcAlarmConfigSchema = object({
19792
20209
  */
19793
20210
  live: NcAlarmLiveSchema.optional()
19794
20211
  });
20212
+ var NcAlarmSensorReadingSchema = _enum([
20213
+ "open",
20214
+ "closed",
20215
+ "unknown",
20216
+ "not-opening"
20217
+ ]);
20218
+ /** One device's state as the alarm reads it — the classifier the arm check uses. */
20219
+ var NcAlarmSensorStateSchema = object({
20220
+ deviceId: number().int().positive(),
20221
+ reading: NcAlarmSensorReadingSchema,
20222
+ /** The word as read (`open`, `closed`, `unlocked`, `stopped`, …); null when unknown / not an opening. */
20223
+ state: string().nullable(),
20224
+ /** Why `unknown`: the read failed, or the slice holds no word its cap defines (a placeholder included). */
20225
+ unknownWhy: _enum(["read-failed", "unknown-word"]).nullable(),
20226
+ /** The device manager's liveness as the centre mirrors it; null = not known. */
20227
+ online: boolean().nullable()
20228
+ });
20229
+ var NcAlarmSensorsInputSchema = object({ deviceIds: array(number().int().positive()).max(500) });
20230
+ var NcAlarmSensorsSchema = object({
20231
+ sensors: array(NcAlarmSensorStateSchema),
20232
+ readAt: number().int().nonnegative()
20233
+ });
19795
20234
  /**
19796
20235
  * ONE rule's demand on ONE camera's clip ring.
19797
20236
  *
@@ -19882,7 +20321,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
19882
20321
  }), method(object({}), NcAlarmConfigSchema, { auth: "admin" }), method(object({ patch: NcAlarmSettingsPatchSchema }), NcAlarmConfigSchema, {
19883
20322
  kind: "mutation",
19884
20323
  auth: "admin"
19885
- });
20324
+ }), method(NcAlarmSensorsInputSchema, NcAlarmSensorsSchema, { auth: "admin" });
19886
20325
  /**
19887
20326
  * Zod schemas for persisted record types.
19888
20327
  *
@@ -20213,6 +20652,150 @@ var OauthIntegrationDescriptorSchema = object({
20213
20652
  });
20214
20653
  method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
20215
20654
  /**
20655
+ * What started a camera's onboard motion (D672). `camera` is the camera's own
20656
+ * firmware; `sensor` is a device the operator ATTACHED to it. Absent on the
20657
+ * wire means the camera: only the camera-sensors bridge ever says `sensor`.
20658
+ */
20659
+ var MotionTriggeredBySchema = discriminatedUnion("kind", [object({ kind: literal("camera") }), object({
20660
+ kind: literal("sensor"),
20661
+ deviceId: number().int().positive()
20662
+ })]);
20663
+ Object.freeze({ kind: "camera" });
20664
+ var CameraSensorRefSchema = object({
20665
+ addonId: string().min(1),
20666
+ stableId: string().min(1)
20667
+ });
20668
+ function cameraSensorRefKey(ref) {
20669
+ return `${ref.addonId}/${ref.stableId}`;
20670
+ }
20671
+ /**
20672
+ * A sensor's mode (D673). `in-addition`: its motion is the camera's motion too.
20673
+ * `replace`: its motion is the camera's, and while one is READY the camera's
20674
+ * own motion no longer counts on its own. `confirm`: while one is READY the
20675
+ * camera's own motion counts only while a confirm sensor is active — with or
20676
+ * without a replace sensor (spec C2, the controller's ruling on Q1).
20677
+ */
20678
+ var CameraSensorModeSchema = _enum([
20679
+ "in-addition",
20680
+ "confirm",
20681
+ "replace"
20682
+ ]);
20683
+ /** A stored sensor with no mode — every CS-1 row — is in addition. */
20684
+ var DEFAULT_CAMERA_SENSOR_MODE = "in-addition";
20685
+ /**
20686
+ * A camera's attached sensors. A CS-1 row carried an envelope
20687
+ * `mode: 'in-addition'`: `z.object` drops it on parse, and the PARSED value is
20688
+ * what the write stores (D672 rule 3), so it is never written again.
20689
+ */
20690
+ var CameraSensorsConfigSchema = object({ sensors: array(CameraSensorRefSchema.extend({ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE) })).min(1).max(8) }).superRefine((value, ctx) => {
20691
+ const seen = /* @__PURE__ */ new Set();
20692
+ value.sensors.forEach((ref, index) => {
20693
+ const key = cameraSensorRefKey(ref);
20694
+ if (seen.has(key)) ctx.addIssue({
20695
+ code: "custom",
20696
+ path: ["sensors", index],
20697
+ message: `duplicate camera sensor ${key}`
20698
+ });
20699
+ seen.add(key);
20700
+ });
20701
+ });
20702
+ /** Every attachment names its mode; an older orchestrator that does not is in addition. */
20703
+ var AttachmentFields = {
20704
+ addonId: string(),
20705
+ stableId: string(),
20706
+ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE)
20707
+ };
20708
+ var CameraSensorAttachmentSchema = discriminatedUnion("state", [
20709
+ object({
20710
+ ...AttachmentFields,
20711
+ state: literal("ready"),
20712
+ deviceId: number(),
20713
+ name: string(),
20714
+ caps: array(string()).readonly()
20715
+ }),
20716
+ object({
20717
+ ...AttachmentFields,
20718
+ state: literal("offline"),
20719
+ deviceId: number(),
20720
+ name: string(),
20721
+ reason: _enum(["offline", "disabled"])
20722
+ }),
20723
+ object({
20724
+ ...AttachmentFields,
20725
+ state: literal("missing"),
20726
+ reason: string()
20727
+ }),
20728
+ object({
20729
+ ...AttachmentFields,
20730
+ state: literal("unsupported"),
20731
+ deviceId: number(),
20732
+ name: string(),
20733
+ reason: string()
20734
+ }),
20735
+ object({
20736
+ ...AttachmentFields,
20737
+ state: literal("unreadable"),
20738
+ reason: string()
20739
+ })
20740
+ ]);
20741
+ /**
20742
+ * Why a configured camera forwards NOTHING from its sensors, however ready they
20743
+ * are (D672): it does not list `onboard` in `motionSources` (attaching a sensor
20744
+ * does not add it), or it has no active detection config at all (the bridge
20745
+ * reads the active config). Absent = forwarded, or an older node that does not
20746
+ * say.
20747
+ */
20748
+ var CameraSensorsNotForwardedSchema = _enum(["onboard-not-listed", "no-active-detection"]);
20749
+ /** Whether the camera's OWN motion counts on its own (D673 C2), from its READY sensors (C3). */
20750
+ var CameraOwnMotionSchema = _enum([
20751
+ "always",
20752
+ "when-confirmed",
20753
+ "never"
20754
+ ]);
20755
+ /** Confirm / Replace cannot suppress this camera's motion: its provider still emits it directly (D673 C13). */
20756
+ var CameraSensorsNotEnforcedSchema = _enum(["provider-not-split"]);
20757
+ /**
20758
+ * The camera's OWN onboard motion (D696): the raw input the bridge combines,
20759
+ * never the effective value. The camera's `motion` slice is the effective one,
20760
+ * so a view of the camera's own row reads this.
20761
+ * - `atMs`: when the bridge received the camera's last own edge.
20762
+ * - `detected`: evaluated WHEN THE STATUS IS ASKED — the last edge said `true`
20763
+ * AND it is younger than the window the bridge counts the camera's own motion
20764
+ * for (`motionCooldownMs`, floored at two sustain ticks). A camera that never
20765
+ * sends a clear (heartbeats only) therefore reads `false` once no push came
20766
+ * within the window; a status read is a snapshot, so a live view re-asks.
20767
+ * Absent = this orchestrator has not received the camera's own motion since it
20768
+ * started (unknown, never "quiet"), or an orchestrator older than D696.
20769
+ */
20770
+ var CameraRawLevelSchema = object({
20771
+ detected: boolean(),
20772
+ atMs: number()
20773
+ });
20774
+ var CameraSensorsStatusSchema = discriminatedUnion("state", [
20775
+ object({
20776
+ state: literal("not-configured"),
20777
+ cameraLevel: CameraRawLevelSchema.optional()
20778
+ }),
20779
+ object({
20780
+ state: literal("unreadable"),
20781
+ reason: string(),
20782
+ cameraLevel: CameraRawLevelSchema.optional()
20783
+ }),
20784
+ object({
20785
+ state: literal("configured"),
20786
+ cameraLevel: CameraRawLevelSchema.optional(),
20787
+ sensors: array(CameraSensorAttachmentSchema).readonly(),
20788
+ /** Absent = an orchestrator older than CS-2: it does not say (D315). */
20789
+ cameraMotion: CameraOwnMotionSchema.optional(),
20790
+ notForwarded: CameraSensorsNotForwardedSchema.optional(),
20791
+ notEnforced: CameraSensorsNotEnforcedSchema.optional()
20792
+ })
20793
+ ]);
20794
+ Object.freeze({
20795
+ state: "unreadable",
20796
+ reason: "camera sensor mappings not loaded"
20797
+ });
20798
+ /**
20216
20799
  * A model choice has a SCOPE, and a scope change has a workflow.
20217
20800
  *
20218
20801
  * ## The two scopes
@@ -20890,14 +21473,14 @@ var TrackSchema = object({
20890
21473
  * `derive-returned-null tile=standin`,
20891
21474
  * `native-tile tile=native no-key-frame-at-close`, …) written at close and
20892
21475
  * CLEARED by the late-keyFrame upgrade when a native tile lands after all.
20893
- * The operator-facing answer to "perché manca l'immagine?" on a track whose
21476
+ * The operator-facing answer to "perché manca l'immagine?" [why is the image missing?] on a track whose
20894
21477
  * tile is a face/plate stand-in, a raster crop, or an icon.
20895
21478
  *
20896
21479
  * **`no-key-frame-at-close` (D400).** The line used to be written ONLY when
20897
21480
  * the TILE ranked below native, so a track whose thumbnail landed natively
20898
21481
  * while its key frame missed carried no reason at all — three of the four
20899
21482
  * `MISSING_KEYFRAME` tracks in the 2026-09-07 operator audit were exactly
20900
- * that shape, and their "niente ultimo" had no cause anywhere on the row.
21483
+ * that shape, and their "niente ultimo" [no last frame] had no cause anywhere on the row.
20901
21484
  * The key frame is the head of a cascade (`keyFrame ⇒ keyFrameSmall ⇒ the
20902
21485
  * lastFrame copy source`), so its absence is now on this line whatever the
20903
21486
  * tile ended up being.
@@ -20961,6 +21544,12 @@ var MotionEventSchema = object({
20961
21544
  /** Populated by B5 (recording playback URL for this event). */
20962
21545
  mediaUrl: string().optional(),
20963
21546
  /**
21547
+ * The FIRST trigger of an `onboard` episode, written once at open (D672).
21548
+ * Absent = not recorded (a row written before D672, or an analyzer /
21549
+ * device-activity episode) — never read as "the camera" (D393).
21550
+ */
21551
+ triggeredBy: MotionTriggeredBySchema.optional(),
21552
+ /**
20964
21553
  * One row per motion EPISODE, not one per push (D475). `null` while the
20965
21554
  * episode is still open — a further rising edge extends it in place rather
20966
21555
  * than inserting a new row. Set once, at close, to `lastOnAt - startedAt`
@@ -20978,7 +21567,7 @@ var MotionEventSchema = object({
20978
21567
  /**
20979
21568
  * Ms offsets from `timestamp` (the episode's own first rising edge, so the
20980
21569
  * first entry is always `0`) of every genuine off→on transition the
20981
- * episode saw — "ogni evento on si deve salvare" (D475). NOT one entry per
21570
+ * episode saw — "ogni evento on si deve salvare" [every ON event must be saved] (D475). NOT one entry per
20982
21571
  * push: a firmware source that keepalives at ~1 Hz for the whole burst
20983
21572
  * (Reolink, Hikvision) produces exactly one edge; a source that reports an
20984
21573
  * explicit `false` mid-episode and then resumes before the quiet window
@@ -21119,6 +21708,21 @@ var ObjectEventSchema = object({
21119
21708
  keyFrameMediaId: number().int().optional(),
21120
21709
  /** Populated by B5 (recording playback URL for this event). */
21121
21710
  mediaUrl: string().optional(),
21711
+ /**
21712
+ * When the change this row records HAPPENED, epoch ms, when that is earlier
21713
+ * than {@link timestamp} and the producer could date it (D684).
21714
+ *
21715
+ * Set on a package PICK-UP row only: its `timestamp` is when the departure
21716
+ * was CONCLUDED — five minutes of unseen observed time after the parcel went
21717
+ * — and a notification's footage has to be cut around the pick-up, not the
21718
+ * empty doormat after it (D682). Stored so every path that rebuilds a
21719
+ * notification subject from the row (the boot reconcile, a dry-run) anchors
21720
+ * on the same instant the live hook did.
21721
+ *
21722
+ * `timestamp` keeps its meaning. Absent on every other row and on every
21723
+ * pick-up written before D684 — UNKNOWN, never 0 and never `timestamp`.
21724
+ */
21725
+ observedAt: number().optional(),
21122
21726
  /** The parent track's key-event importance [0,1], propagated to every object
21123
21727
  * event of the track (so an event row can be sorted by importance without a
21124
21728
  * track join). Absent on legacy rows / before the track was scored. */
@@ -21454,131 +22058,6 @@ var RecentTracksQueryInput = object({
21454
22058
  /** See {@link ExcludeSourcesDoc}. */
21455
22059
  excludeSources: array(TrackSourceSchema).optional()
21456
22060
  });
21457
- /**
21458
- * A Summary (D359): the per-camera session envelope that references tracks.
21459
- * `groupShotMediaId` is the media ROW id of its group shot (`ownerKind:
21460
- * 'summary'`, served by the event-media plane at `/m/<id>`), null until the
21461
- * first frame with a member visible has been materialised (D482 — it was the
21462
- * row's composite key, which embedded the owner and could name another table's
21463
- * row once event ids became per-table rowids).
21464
- */
21465
- var SummarySchema = object({
21466
- id: string(),
21467
- deviceId: number(),
21468
- openedAt: number(),
21469
- lastActiveAt: number(),
21470
- sealedAt: number().nullable(),
21471
- memberCount: number().int().nonnegative(),
21472
- groupShotMediaId: number().int().nullable()
21473
- });
21474
- var SummariesQueryInput = object({
21475
- deviceIds: array(number()).min(1),
21476
- since: number().optional(),
21477
- until: number().optional(),
21478
- limit: number().int().min(1).max(200).default(50),
21479
- /** The same member-wise filter {@link listRecentSummaries} takes — one
21480
- * meaning of "dog" on every summary surface. */
21481
- classes: array(string().min(1).max(60)).max(40).optional()
21482
- });
21483
- var SummaryDetailSchema = object({
21484
- summary: SummarySchema,
21485
- /** Members in absorption order, oldest join first. */
21486
- members: array(object({
21487
- trackId: string(),
21488
- /**
21489
- * The track's class at the time it JOINED, or `null` when it was unresolved
21490
- * and the track no longer exists to fill it.
21491
- *
21492
- * The join, not the latest opinion: class voting can re-decide a track's
21493
- * class afterwards, and a group's composition is the history of who came
21494
- * together. A consumer counts these to badge a thumbnail — "two people and a
21495
- * dog" — rather than being handed a second, denormalised tally that would
21496
- * drift from the members it claims to describe.
21497
- */
21498
- className: string().nullable(),
21499
- /** `primary` is the one member that carries the group's identity. */
21500
- role: _enum([
21501
- "primary",
21502
- "sibling",
21503
- "child"
21504
- ]).nullable(),
21505
- joinedAt: number(),
21506
- /** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
21507
- * at read time. Absent when nothing resolved, never an empty string. */
21508
- label: string().optional(),
21509
- /** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
21510
- * recognised nobody, and absent for a member whose track has been pruned —
21511
- * a thumbnail that names the wrong person is worse than one naming nobody. */
21512
- subLabel: string().optional()
21513
- })).readonly()
21514
- });
21515
- /**
21516
- * What a LIST of groups carries: the envelope plus what it is MADE OF.
21517
- *
21518
- * Coarse on purpose — the operator's rule is "only the rough data on the list,
21519
- * we extend when we notice we need more". Enough to draw the card ("two people
21520
- * and a dog") and no more. The MEMBERS, their names and the per-member links
21521
- * are on {@link getSummary}: shipping every member of every group so a client
21522
- * can count them turns a page of two hundred groups into a thousand records to
21523
- * draw two hundred badges.
21524
- */
21525
- var SummaryListItemSchema = object({
21526
- summary: SummarySchema,
21527
- /** Class counts, most numerous first; `className: null` is a member whose
21528
- * class never resolved, counted so the counts add up to `memberCount`. */
21529
- classes: array(object({
21530
- className: string().nullable(),
21531
- count: number().int().positive()
21532
- })).readonly()
21533
- });
21534
- var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
21535
- /**
21536
- * The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
21537
- *
21538
- * The reel on the cameras page and the Events gallery both ride a cursor, so a
21539
- * summaries feed that could only answer "the last N for these cameras"
21540
- * (`listSummaries`) would make groups available in the timeline and nowhere
21541
- * else. Two feeds with different ordering contracts would be two ideas of what
21542
- * "newest" means, on one screen.
21543
- */
21544
- var RecentSummariesQueryInput = object({
21545
- /** Devices to merge. An empty array yields an empty page. */
21546
- deviceIds: array(number()),
21547
- /** Window lower bound on `lastActiveAt` (inclusive). */
21548
- since: number().optional(),
21549
- /** Window upper bound on `lastActiveAt` (inclusive). */
21550
- until: number().optional(),
21551
- limit: number().int().min(1).max(500).default(100),
21552
- /** Opaque continuation cursor from a previous page's `nextCursor`. */
21553
- cursor: string().optional(),
21554
- /**
21555
- * Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
21556
- * deliberately the same name: the events filter tree emits one list of ticked
21557
- * taxonomy nodes, and a summaries feed that called it something else would
21558
- * make the operator's one filter component produce two shapes.
21559
- *
21560
- * A question about the MEMBERS: a group matches when ANY of them does. "Show
21561
- * me the arrivals with a dog" has to return the group of four people who had
21562
- * one with them; a filter on the group's own fields could only ever answer
21563
- * about its primary.
21564
- *
21565
- * Matched against all THREE tiers of a member — the class (`animal`), the
21566
- * sub-class (`dog`) and the instance (a name, a plate) — because which tier a
21567
- * ticked node lives on is the taxonomy's business, not the caller's. `dog` is
21568
- * an event kind in the tree and a tier-1 label on an `animal` track; a filter
21569
- * that read only the class would answer "animal" and never "dog".
21570
- *
21571
- * ABSENT or EMPTY means no filter — absent is not a selection of none.
21572
- */
21573
- classes: array(string().min(1).max(60)).max(40).optional()
21574
- });
21575
- var RecentSummariesPageSchema = object({
21576
- /** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
21577
- * {@link listSummaries} — one list shape, so a card renders the same
21578
- * whichever feed drew it. */
21579
- summaries: array(SummaryListItemSchema).readonly(),
21580
- nextCursor: string().nullable()
21581
- });
21582
22061
  var RecentTracksPageSchema = object({
21583
22062
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
21584
22063
  tracks: array(TrackSchema).readonly(),
@@ -21612,6 +22091,7 @@ var KeyEventSchema = object({
21612
22091
  bestEventId: string(),
21613
22092
  /** Track lifetime in ms (lastSeen - firstSeen). */
21614
22093
  windowMs: number().optional(),
22094
+ audioLabels: array(TrackAudioLabelSchema).readonly().optional(),
21615
22095
  ...TrackFlagFields,
21616
22096
  ...TrackRetrainFields
21617
22097
  });
@@ -22090,7 +22570,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22090
22570
  classes: array(string()).optional(),
22091
22571
  /** See {@link ExcludeSourcesDoc}. */
22092
22572
  excludeSources: array(TrackSourceSchema).optional()
22093
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
22573
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
22094
22574
  kind: "mutation",
22095
22575
  auth: "admin"
22096
22576
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -22144,7 +22624,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22144
22624
  trackIds: array(string()).min(1)
22145
22625
  }), object({
22146
22626
  deleted: number().int(),
22147
- failed: array(string()).readonly()
22627
+ failed: array(string()).readonly(),
22628
+ sparedMediaIds: array(number().int()).readonly().optional()
22148
22629
  }), {
22149
22630
  kind: "mutation",
22150
22631
  auth: "admin"
@@ -22153,7 +22634,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22153
22634
  deviceId: number(),
22154
22635
  trackId: string(),
22155
22636
  flags: TrackFlagsPatchSchema
22156
- }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
22637
+ }), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(SetTrackRelationInputSchema, TrackRelationSchema, { kind: "mutation" }), method(ClearTrackRelationInputSchema, ClearTrackRelationResultSchema, { kind: "mutation" }), method(SetTrackPurityInputSchema, SetTrackPurityResultSchema, { kind: "mutation" }), method(ListTrackRelationsInputSchema, ListTrackRelationsResultSchema, { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
22157
22638
  kind: "query",
22158
22639
  auth: "admin"
22159
22640
  }), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
@@ -23270,6 +23751,23 @@ var MotionSourceEnum = _enum([
23270
23751
  */
23271
23752
  var MotionSourcesSchema = array(MotionSourceEnum);
23272
23753
  /**
23754
+ * The operator-facing name of each MOTION source (D672: `onboard` = the
23755
+ * camera's sensors — its own motion plus any sensor attached to it). The wire
23756
+ * value stays `onboard`; only the label changed. `detectionSources: 'onboard'`
23757
+ * ("Camera onboard AI") and the notification source filter keep their labels.
23758
+ */
23759
+ var MOTION_SOURCE_LABELS = {
23760
+ analyzer: "Frame-diff Analyzer (motion addon)",
23761
+ onboard: "Camera sensors",
23762
+ "device-activity": "Device activity (the device says it is working)"
23763
+ };
23764
+ /** The order the motion-source picker offers them in (not the enum's order). */
23765
+ var MOTION_SOURCE_PICKER_ORDER = [
23766
+ "analyzer",
23767
+ "onboard",
23768
+ "device-activity"
23769
+ ];
23770
+ /**
23273
23771
  * Which root detector a camera runs — EXACTLY ONE.
23274
23772
  *
23275
23773
  * Deliberately the SAME vocabulary post-analysis already tags every detection
@@ -23482,8 +23980,10 @@ var RunnerCameraConfigSchema = object({
23482
23980
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
23483
23981
  * analyzer providers) running on decoded frames in this runner.
23484
23982
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
23485
- * analytics). The provider emits ProviderMotion
23486
- * events; the orchestrator forwards to `reportMotion`.
23983
+ * analytics). The provider emits its raw push as `ProviderMotion`
23984
+ * (D673); the orchestrator's camera-sensors bridge re-emits the camera's
23985
+ * effective motion as `MotionOnMotionChanged`, which is what reaches
23986
+ * `reportMotion`.
23487
23987
  */
23488
23988
  motionSources: MotionSourcesSchema.default(["analyzer"]),
23489
23989
  /**
@@ -23616,7 +24116,14 @@ var RunnerCameraConfigSchema = object({
23616
24116
  */
23617
24117
  inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
23618
24118
  });
23619
- motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, audioMotionWindowMsField.min, audioMotionWindowMsField.max, audioMotionWindowMsField.step, audioMotionWindowMsField.default, preRollInferenceFramesField.min, preRollInferenceFramesField.max, preRollInferenceFramesField.step, preRollInferenceFramesField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
24119
+ MOTION_SOURCE_PICKER_ORDER.map((value) => value === "onboard" ? {
24120
+ value,
24121
+ label: MOTION_SOURCE_LABELS[value],
24122
+ description: "The camera's own motion, plus any sensor attached to it"
24123
+ } : {
24124
+ value,
24125
+ label: MOTION_SOURCE_LABELS[value]
24126
+ }), motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, audioMotionWindowMsField.min, audioMotionWindowMsField.max, audioMotionWindowMsField.step, audioMotionWindowMsField.default, preRollInferenceFramesField.min, preRollInferenceFramesField.max, preRollInferenceFramesField.step, preRollInferenceFramesField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
23620
24127
  /**
23621
24128
  * Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
23622
24129
  * load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
@@ -23653,7 +24160,15 @@ var RunnerLocalLoadSchema = object({
23653
24160
  hasGpu: boolean(),
23654
24161
  inferenceBackend: string().optional(),
23655
24162
  cpuCores: number().optional()
23656
- })
24163
+ }),
24164
+ /**
24165
+ * Who writes a camera's `motion` runtime slice (D696). `'orchestrator'`: this
24166
+ * runner never writes it. ABSENT = a runner older than D696, which still
24167
+ * writes the slice from its phase machine; the orchestrator does not write
24168
+ * while any runner node is absent-or-unanswered, so one slice never has two
24169
+ * writers.
24170
+ */
24171
+ motionSliceWriter: literal("orchestrator").optional()
23657
24172
  });
23658
24173
  /**
23659
24174
  * Aggregate runtime metrics for the runner's whole local pool. Mirrors the
@@ -24190,6 +24705,11 @@ var CameraStatusSchema = object({
24190
24705
  */
24191
24706
  switchedOff: array(CameraSwitchIdSchema).readonly(),
24192
24707
  /**
24708
+ * The camera's attached sensors (D672). Optional only for a status composed
24709
+ * by an orchestrator older than D672; this orchestrator always sets it.
24710
+ */
24711
+ cameraSensors: CameraSensorsStatusSchema.optional(),
24712
+ /**
24193
24713
  * Stages of the bounded fan-out that were CUT SHORT — a timeout or a
24194
24714
  * rejection — and whose block is therefore `null` because we could not
24195
24715
  * READ it, not because there is nothing there.
@@ -24282,7 +24802,64 @@ var NodeInferenceDevicesSchema = object({
24282
24802
  reachable: boolean(),
24283
24803
  devices: array(NodeInferenceDeviceSchema).readonly()
24284
24804
  });
24285
- method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
24805
+ /**
24806
+ * Pipeline Orchestrator capability — global load balancer + camera dispatcher.
24807
+ *
24808
+ * Lives on the hub. Tracks the camera-to-agent assignment map, listens to
24809
+ * device lifecycle events, queries each runner's capacity + hardware
24810
+ * profile, and dispatches `attachCamera` / `detachCamera` cap calls to the
24811
+ * appropriate runner instances. Persists assignments via the multi-level
24812
+ * settings store so they survive hub restarts.
24813
+ *
24814
+ * Strictly the control plane: never sees a frame, never calls inference,
24815
+ * never drains queues. The runner does that work locally on each agent.
24816
+ */
24817
+ /**
24818
+ * The input of `setCameraSensors` (G5, D676): the ONE typed write path of a
24819
+ * camera's attached sensors (D672). `config: null` removes the attachment —
24820
+ * the camera reads `not-configured` again, never `unreadable`.
24821
+ */
24822
+ var SetCameraSensorsInputSchema = object({
24823
+ deviceId: number().int().nonnegative(),
24824
+ /** `null` removes the attachment: the camera goes back to `not-configured`. */
24825
+ config: CameraSensorsConfigSchema.nullable()
24826
+ });
24827
+ /**
24828
+ * Why an early occupancy look (D691) was not scheduled.
24829
+ *
24830
+ * - `unknown-camera` — no session was ever dispatched for it, so there is no
24831
+ * node and no config to attach a burst with.
24832
+ * - `out-of-range` — the ask is negative or further out than the orchestrator
24833
+ * will hold a timer for; the parked-object cadence is the answer there.
24834
+ * - `no-burst-producer` — this build has no burst producer at all.
24835
+ * - `already-looked` — this camera's ONE early look since its last session has
24836
+ * been spent. A look's own burst can re-arm a flickering flip, and a look
24837
+ * per arm would chain a burst every ~30 s forever (review H2); the next
24838
+ * real session re-arms the budget.
24839
+ */
24840
+ var OccupancyLookRefusalSchema = _enum([
24841
+ "unknown-camera",
24842
+ "out-of-range",
24843
+ "no-burst-producer",
24844
+ "already-looked"
24845
+ ]);
24846
+ method(object({
24847
+ deviceId: number().int().nonnegative(),
24848
+ /** How long from NOW until the pending flip's sustain window ends. RELATIVE,
24849
+ * so the caller's clock and the orchestrator's never have to agree. */
24850
+ afterMs: number().finite(),
24851
+ /** Why, for the log. */
24852
+ reason: string()
24853
+ }), object({
24854
+ scheduled: boolean(),
24855
+ /** When `scheduled`: how long until the burst is dialled. */
24856
+ dueInMs: number().optional(),
24857
+ /** When not `scheduled`: why. */
24858
+ refusedBecause: OccupancyLookRefusalSchema.optional()
24859
+ }), {
24860
+ kind: "mutation",
24861
+ auth: "admin"
24862
+ }), method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
24286
24863
  kind: "mutation",
24287
24864
  auth: "admin"
24288
24865
  }), method(StorageMigrationLeaseInputSchema, object({ resumed: literal(true) }), {
@@ -24436,7 +25013,10 @@ method(StorageMigrationLeaseInputSchema, object({ paused: literal(true) }), {
24436
25013
  }), CameraSwitchGroupSchema, {
24437
25014
  kind: "mutation",
24438
25015
  auth: "admin"
24439
- }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(_void(), DiskReconcileJobSchema, {
25016
+ }), method(object({ deviceId: number() }), CameraStatusSchema), method(object({ deviceIds: array(number()).optional() }), array(CameraStatusSchema).readonly()), method(SetCameraSensorsInputSchema, object({ success: literal(true) }), {
25017
+ kind: "mutation",
25018
+ auth: "admin"
25019
+ }), method(_void(), DiskReconcileJobSchema, {
24440
25020
  kind: "mutation",
24441
25021
  auth: "admin"
24442
25022
  }), method(_void(), DiskReconcileJobSchema, { auth: "admin" }), method(_void(), array(PipelineTemplateSchema).readonly()), method(object({
@@ -26328,7 +26908,7 @@ var ClipPlaybackSchema = object({
26328
26908
  * **One authorised yes is one wake.** `next-natural` — take the clip the next
26329
26909
  * time the camera is awake for its own reasons — is deliberately not a member:
26330
26910
  * it was proposed, it is free on the battery, and the operator declined it on
26331
- * 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."*,
26911
+ * 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."* [When an export is requested the camera wakes up],
26332
26912
  * D558 "Considered and not taken").
26333
26913
  */
26334
26914
  var ClipWakeSchema = _enum(["authorised"]);
@@ -26589,7 +27169,7 @@ DeviceType.Camera, method(object({
26589
27169
  * It replaced `sources?: string[]`, a VIEW filter over source ids that
26590
27170
  * assumed the answer was a fan-out over everything a camera has. The
26591
27171
  * operator settled otherwise on 2026-09-20 — *"l'utilizzatore è uno
26592
- * solo"* — so the list is asked of one provider at a time and there is
27172
+ * solo"* [there is only one user] — so the list is asked of one provider at a time and there is
26593
27173
  * nothing to filter out of it.
26594
27174
  */
26595
27175
  provider: string().min(1)
@@ -26716,138 +27296,6 @@ DeviceType.Camera, method(object({
26716
27296
  kind: "query",
26717
27297
  auth: "protected"
26718
27298
  });
26719
- object({
26720
- /** Ms epoch of the last press. null = never observed since this provider started. */
26721
- lastPressedAt: number().nullable(),
26722
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
26723
- pressCountSinceStart: number()
26724
- });
26725
- object({
26726
- deviceId: number(),
26727
- timestamp: number()
26728
- });
26729
- /**
26730
- * The `doorbell-source` extension slot's editable value (D648): the camera's
26731
- * virtual-doorbell trigger devices, exactly what the wrapper's
26732
- * `doorbellSources` persists (as `{ deviceId }` records).
26733
- */
26734
- var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
26735
- DeviceType.Camera;
26736
- DeviceType.Button, DeviceType.Camera;
26737
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
26738
- DeviceType.Camera, DeviceType.Camera;
26739
- /** A slot's editable value, discriminated on `slot`. */
26740
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
26741
- DeviceType.Camera;
26742
- var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
26743
- state: literal("unreachable"),
26744
- reason: string()
26745
- })]);
26746
- /** One provider of slots — the D554 source-listing row. */
26747
- var ExtensionSourceSchema = object({
26748
- /** The routing prefix of every `slotRef` this provider serves. */
26749
- source: string(),
26750
- label: string(),
26751
- /** Stamped by the dispatcher from the registry (D557). */
26752
- addonId: string().optional(),
26753
- availability: ExtensionSourceAvailabilitySchema
26754
- });
26755
- /**
26756
- * How one picked source stands. `missing` — no such device (deleted, or an id
26757
- * that never existed); `foreign` — a device the slot's owner cannot read from
26758
- * (a source owned by another addon); `unavailable` — it exists but is not a
26759
- * valid source now (a container, which is never a pick). A source in any of
26760
- * these states is SHOWN, never silently dropped or re-pointed.
26761
- */
26762
- var ExtensionSourceHealthSchema = _enum([
26763
- "ok",
26764
- "missing",
26765
- "foreign",
26766
- "unavailable"
26767
- ]);
26768
- var ExtensionSlotSourceSchema = object({
26769
- deviceId: number().int(),
26770
- /** The device's name, or null when it could not be resolved (`missing`). */
26771
- name: string().nullable(),
26772
- health: ExtensionSourceHealthSchema,
26773
- detail: string().optional()
26774
- });
26775
- /**
26776
- * A DIFFERENT authority that gates whether the slot's sources do anything —
26777
- * reported read-only, named, never written through this contract (D62). The
26778
- * virtual doorbell's sources ring only while the wrapper is bound to the
26779
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
26780
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
26781
- */
26782
- var ExtensionSlotActivationSchema = object({
26783
- state: _enum([
26784
- "active",
26785
- "inactive",
26786
- "unknown"
26787
- ]),
26788
- authority: string(),
26789
- detail: string().optional()
26790
- });
26791
- var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
26792
- state: literal("ok"),
26793
- /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
26794
- slotRef: string(),
26795
- slot: ExtensionSlotIdSchema,
26796
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
26797
- authority: string(),
26798
- activation: ExtensionSlotActivationSchema.nullable(),
26799
- value: ExtensionSlotValueSchema,
26800
- sources: array(ExtensionSlotSourceSchema),
26801
- /**
26802
- * Devices the owner links to the host ON ITS OWN, by structure, and that
26803
- * are therefore not in `value` (D655): a camera's device-tree children, and
26804
- * the child a picked container stands for (D356 — a container is never a
26805
- * pick, its children are). Read-only; the editor shows them and may offer
26806
- * per-device options on them (the linked-devices tracked-event opt-in).
26807
- * Absent when the owner links nothing beyond the picks, and from an owner
26808
- * older than D655.
26809
- */
26810
- impliedSources: array(ExtensionSlotSourceSchema).optional()
26811
- }), object({
26812
- state: literal("unreachable"),
26813
- addonId: string(),
26814
- reason: string()
26815
- })]);
26816
- var ExtensionCandidatesSchema = object({ candidates: array(object({
26817
- deviceId: number().int(),
26818
- name: string(),
26819
- type: string(),
26820
- location: string().nullable(),
26821
- /** The container a child belongs to — "Spotlight 2" alone does not say which. */
26822
- parentName: string().nullable(),
26823
- /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
26824
- suggested: boolean(),
26825
- /** Why it is suggested ("same location"), null when it is not. */
26826
- reason: string().nullable()
26827
- })) });
26828
- /**
26829
- * What a write did. `none` — applied in place. `host` / `parent` — the owner
26830
- * reloaded the host (or, for an accessory child, its parent) because the
26831
- * write changed what the host REGISTERS. A slot never adds a capability to its
26832
- * host — that is a composition (D663) — so today's owners answer `none`.
26833
- */
26834
- var ExtensionSetResultSchema = object({
26835
- applied: literal(true),
26836
- reload: _enum([
26837
- "none",
26838
- "host",
26839
- "parent"
26840
- ])
26841
- });
26842
- var ExtensionSlotRefInputSchema = object({
26843
- deviceId: number().int(),
26844
- slotRef: string().min(1)
26845
- });
26846
- var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
26847
- method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
26848
- kind: "mutation",
26849
- auth: "admin"
26850
- });
26851
27299
  /**
26852
27300
  * Optional client-side hints sent at session creation to help the provider
26853
27301
  * pick the best native source. All fields optional — a viewer that knows
@@ -28665,6 +29113,17 @@ object({
28665
29113
  deviceId: number(),
28666
29114
  status: DeviceStatusSchema
28667
29115
  });
29116
+ object({
29117
+ /** Ms epoch of the last press. null = never observed since this provider started. */
29118
+ lastPressedAt: number().nullable(),
29119
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
29120
+ pressCountSinceStart: number()
29121
+ });
29122
+ object({
29123
+ deviceId: number(),
29124
+ timestamp: number()
29125
+ });
29126
+ DeviceType.Button, DeviceType.Camera;
28668
29127
  /**
28669
29128
  * Enum-state sensor — a string value picked from a finite option set.
28670
29129
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -30309,9 +30768,9 @@ object({
30309
30768
  /** Ms epoch of the last detected-true observation. Null if never detected. */
30310
30769
  lastDetectedAt: number().nullable(),
30311
30770
  /**
30312
- * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device,
30313
- * `null` while false and on every `Sensor` device (D475) — see that
30314
- * constant's doc for the one-authority rule.
30771
+ * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device (the
30772
+ * orchestrator writes it, D696), `null` while false and on every `Sensor`
30773
+ * device (D475) — see that constant's doc for the one-authority rule.
30315
30774
  *
30316
30775
  * ## Reading this field still arms nothing
30317
30776
  *
@@ -30329,43 +30788,48 @@ object({
30329
30788
  * `addon-export-alexa/src/motion-clear-hold.ts` and
30330
30789
  * `addon-export-hap`'s `RESET_DEBOUNCE_MS` both do.
30331
30790
  *
30332
- * ## Who writes it
30333
- *
30334
- * - **Cameras** — the runner's phase machine, `active → watching` on
30335
- * `cooldown_expired`, which then writes this slice with
30336
- * `detected: false` (`handlePhaseChanged` in
30337
- * `pipeline-runner/index.ts`). It produces the FALLING edge, which
30338
- * matters most for the sources that only ever push a rising one:
30339
- * Reolink emits `MotionOnMotionChanged { detected: true }` and never
30340
- * a false.
30341
- * - **Sensors** (Home Assistant binary sensors, Homematic) — the
30342
- * provider pushes the false itself, from the upstream system's own
30343
- * state change. No phase machine is involved.
30344
- *
30345
- * ### The phase machine is CANONICAL, not sole — and that is a defect
30346
- *
30347
- * An earlier revision of this docblock (mine, 2026-09-12) claimed the
30348
- * phase machine is the sole writer for a camera. It is not.
30349
- * `hikvision-camera.ts:3464` and `amcrest-camera.ts:445` both call
30350
- * `setCapSlice(motionCapability, …)` on their own rising edge, and
30351
- * Hikvision's comment says why: it read THIS docblock, agreed the
30352
- * runner is canonical, and wrote anyway to avoid per-tick churn. So
30353
- * two authorities can disagree about one slice, which this repo
30354
- * forbids, and the doc said otherwise — which is worse than saying
30355
- * nothing, because it reads as verification.
30356
- *
30357
- * This predates D475 and is not fixed there: the fix touches every
30358
- * camera provider. Recorded in D475's Consequences. Do not restore the
30359
- * "sole writer" wording without also removing the other writers.
30791
+ * ## Who writes it (D696)
30792
+ *
30793
+ * - **Cameras** — the orchestrator, and nothing else. It writes the camera's
30794
+ * EFFECTIVE motion (`addon-pipeline-orchestrator`
30795
+ * `camera-sensors/motion-slice.ts`), alongside the effective
30796
+ * `MotionOnMotionChanged` it emits or receives: the camera-sensors bridge
30797
+ * for a split camera, an unsplit emitter's direct event, the analyzer and
30798
+ * device activity, as the camera's `motionSources` counts them. A source
30799
+ * that never sends a clear falls one window after its last `true`.
30800
+ * `lastDetectedAt` moves only on an effective rise. No camera provider
30801
+ * writes this slice (not even a boot seed), and neither does the runner's
30802
+ * phase machine: its phase is "a session is attached" for every on-motion
30803
+ * session, not motion, and it now has its own `DetectionPhaseTransition`.
30804
+ * A provider's `isDetected` answers from the hub's slice.
30805
+ * - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
30806
+ * imports) — the provider pushes both edges itself, from the upstream
30807
+ * system's own state change. That is the sensor's own fact.
30808
+ *
30809
+ * `scripts/check-onboard-motion-emitters.ts` refuses any other writer of a
30810
+ * `motion` slice; each sensor writer is a named exemption.
30811
+ *
30812
+ * This replaces the D475 §4 rule ("the phase machine is the sole writer").
30813
+ * That rule was never true: Hikvision and Amcrest wrote the slice raw beside
30814
+ * it, every provider seeded it at boot, and every session left it
30815
+ * `detected: true` after its detach.
30360
30816
  */
30361
30817
  autoClearAfterMs: number().nullable()
30362
30818
  });
30363
- object({
30819
+ /**
30820
+ * Payload of `motion.onMotionChanged` event + the corresponding bus
30821
+ * event `EventCategory.MotionOnMotionChanged`. Single source of truth
30822
+ * — both the cap event surface and the bus payload type alias to this
30823
+ * schema.
30824
+ */
30825
+ var MotionOnMotionChangedDataSchema = object({
30364
30826
  deviceId: number(),
30365
30827
  detected: boolean(),
30366
30828
  timestamp: number(),
30367
30829
  source: MotionSourceEnum,
30368
- regions: array(MotionRegionSchema).readonly().optional()
30830
+ regions: array(MotionRegionSchema).readonly().optional(),
30831
+ /** Who started it (D672). Absent = the camera itself. Only `onboard` carries `sensor`. */
30832
+ triggeredBy: MotionTriggeredBySchema.optional()
30369
30833
  });
30370
30834
  DeviceType.Camera, DeviceType.Sensor, method(object({ deviceId: number() }), boolean());
30371
30835
  object({
@@ -32915,7 +33379,7 @@ var ReadGopBytesResultSchema = object({
32915
33379
  /**
32916
33380
  * A time WINDOW of one finalized segment, cut by byte range — the multi-GOP
32917
33381
  * twin of {@link ReadGopBytesResultSchema}'s single instant. Built for the
32918
- * replay clip's `recording` source (`docs/design/plans/2026-08-26-replay-clip-su-pipeline.md`):
33382
+ * replay clip's `recording` source (`docs/design/plans/2026-08-26-clip-replay-on-pipeline.md`):
32919
33383
  * a replay needs several seconds of native pixels, not one frame.
32920
33384
  *
32921
33385
  * `ok.data` is standalone-demuxable, same as a GOP read. `ok.reachesRequestedEnd`
@@ -35531,47 +35995,7 @@ DeviceType.Camera, method(object({
35531
35995
  detection: array(ZoneRuleSchema).readonly(),
35532
35996
  package: array(ZoneRuleSchema).readonly()
35533
35997
  });
35534
- var NUMBER = {
35535
- kind: "fixed",
35536
- result: ["number"]
35537
- };
35538
- var BOOLEAN = {
35539
- kind: "fixed",
35540
- result: ["boolean"]
35541
- };
35542
- Object.freeze({
35543
- min: NUMBER,
35544
- max: NUMBER,
35545
- abs: NUMBER,
35546
- floor: NUMBER,
35547
- ceil: NUMBER,
35548
- sqrt: NUMBER,
35549
- round: NUMBER,
35550
- pow: NUMBER,
35551
- clamp: NUMBER,
35552
- avg: NUMBER,
35553
- sum: NUMBER,
35554
- age: NUMBER,
35555
- convert: NUMBER,
35556
- coalesce: { kind: "coalesce" },
35557
- any: BOOLEAN,
35558
- all: BOOLEAN,
35559
- within: BOOLEAN,
35560
- latest: {
35561
- kind: "fixed",
35562
- result: ["number", "null"]
35563
- },
35564
- number: {
35565
- kind: "fixed",
35566
- result: ["number", "null"]
35567
- },
35568
- rose: {
35569
- kind: "fixed",
35570
- result: ["number", "null"]
35571
- },
35572
- count: NUMBER
35573
- });
35574
- `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
35998
+ SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
35575
35999
  /**
35576
36000
  * Accessory device helpers — shared across drivers.
35577
36001
  *
@@ -35926,13 +36350,14 @@ var BaseDeviceProvider = class extends BaseAddon {
35926
36350
  async getStatus() {
35927
36351
  const all = await this.ctx.kernel.devices?.getAll() ?? [];
35928
36352
  const summary = this.restoreFailureSummary();
35929
- if (summary === null) return {
36353
+ const base = {
35930
36354
  connected: true,
35931
- deviceCount: all.length
36355
+ deviceCount: all.length,
36356
+ motionSliceWriter: "orchestrator"
35932
36357
  };
36358
+ if (summary === null) return base;
35933
36359
  return {
35934
- connected: true,
35935
- deviceCount: all.length,
36360
+ ...base,
35936
36361
  error: summary
35937
36362
  };
35938
36363
  }
@@ -38878,6 +39303,12 @@ Object.freeze({
38878
39303
  addonId: null,
38879
39304
  access: "view"
38880
39305
  },
39306
+ "coreBlocks.listComposableCaps": {
39307
+ capName: "core-blocks",
39308
+ capScope: "system",
39309
+ addonId: null,
39310
+ access: "view"
39311
+ },
38881
39312
  "coreBlocks.listCompositions": {
38882
39313
  capName: "core-blocks",
38883
39314
  capScope: "system",
@@ -38956,6 +39387,18 @@ Object.freeze({
38956
39387
  addonId: null,
38957
39388
  access: "view"
38958
39389
  },
39390
+ "databaseSnapshot.listDatabases": {
39391
+ capName: "database-snapshot",
39392
+ capScope: "system",
39393
+ addonId: null,
39394
+ access: "view"
39395
+ },
39396
+ "databaseSnapshot.writeSnapshot": {
39397
+ capName: "database-snapshot",
39398
+ capScope: "system",
39399
+ addonId: null,
39400
+ access: "create"
39401
+ },
38959
39402
  "dataStoreProvider.aggregate": {
38960
39403
  capName: "data-store-provider",
38961
39404
  capScope: "system",
@@ -41416,6 +41859,12 @@ Object.freeze({
41416
41859
  addonId: null,
41417
41860
  access: "view"
41418
41861
  },
41862
+ "notificationRules.getAlarmSensors": {
41863
+ capName: "notification-rules",
41864
+ capScope: "system",
41865
+ addonId: null,
41866
+ access: "view"
41867
+ },
41419
41868
  "notificationRules.getClipRetentionAsks": {
41420
41869
  capName: "notification-rules",
41421
41870
  capScope: "system",
@@ -41692,6 +42141,12 @@ Object.freeze({
41692
42141
  addonId: null,
41693
42142
  access: "create"
41694
42143
  },
42144
+ "pipelineAnalytics.clearTrackRelation": {
42145
+ capName: "pipeline-analytics",
42146
+ capScope: "device",
42147
+ addonId: null,
42148
+ access: "delete"
42149
+ },
41695
42150
  "pipelineAnalytics.clearTracks": {
41696
42151
  capName: "pipeline-analytics",
41697
42152
  capScope: "device",
@@ -41848,12 +42303,6 @@ Object.freeze({
41848
42303
  addonId: null,
41849
42304
  access: "view"
41850
42305
  },
41851
- "pipelineAnalytics.getSummary": {
41852
- capName: "pipeline-analytics",
41853
- capScope: "device",
41854
- addonId: null,
41855
- access: "view"
41856
- },
41857
42306
  "pipelineAnalytics.getTrack": {
41858
42307
  capName: "pipeline-analytics",
41859
42308
  capScope: "device",
@@ -41914,12 +42363,6 @@ Object.freeze({
41914
42363
  addonId: null,
41915
42364
  access: "view"
41916
42365
  },
41917
- "pipelineAnalytics.listRecentSummaries": {
41918
- capName: "pipeline-analytics",
41919
- capScope: "device",
41920
- addonId: null,
41921
- access: "view"
41922
- },
41923
42366
  "pipelineAnalytics.listRecentTracks": {
41924
42367
  capName: "pipeline-analytics",
41925
42368
  capScope: "device",
@@ -41950,13 +42393,13 @@ Object.freeze({
41950
42393
  addonId: null,
41951
42394
  access: "view"
41952
42395
  },
41953
- "pipelineAnalytics.listSummaries": {
42396
+ "pipelineAnalytics.listTrackMedia": {
41954
42397
  capName: "pipeline-analytics",
41955
42398
  capScope: "device",
41956
42399
  addonId: null,
41957
42400
  access: "view"
41958
42401
  },
41959
- "pipelineAnalytics.listTrackMedia": {
42402
+ "pipelineAnalytics.listTrackRelations": {
41960
42403
  capName: "pipeline-analytics",
41961
42404
  capScope: "device",
41962
42405
  addonId: null,
@@ -42076,6 +42519,18 @@ Object.freeze({
42076
42519
  addonId: null,
42077
42520
  access: "create"
42078
42521
  },
42522
+ "pipelineAnalytics.setTrackPurity": {
42523
+ capName: "pipeline-analytics",
42524
+ capScope: "device",
42525
+ addonId: null,
42526
+ access: "create"
42527
+ },
42528
+ "pipelineAnalytics.setTrackRelation": {
42529
+ capName: "pipeline-analytics",
42530
+ capScope: "device",
42531
+ addonId: null,
42532
+ access: "create"
42533
+ },
42079
42534
  "pipelineAnalytics.startStorageMigrationMove": {
42080
42535
  capName: "pipeline-analytics",
42081
42536
  capScope: "device",
@@ -42514,6 +42969,12 @@ Object.freeze({
42514
42969
  addonId: null,
42515
42970
  access: "delete"
42516
42971
  },
42972
+ "pipelineOrchestrator.requestOccupancyLook": {
42973
+ capName: "pipeline-orchestrator",
42974
+ capScope: "system",
42975
+ addonId: null,
42976
+ access: "create"
42977
+ },
42517
42978
  "pipelineOrchestrator.resetNodePipelineDefaults": {
42518
42979
  capName: "pipeline-orchestrator",
42519
42980
  capScope: "system",
@@ -42580,6 +43041,12 @@ Object.freeze({
42580
43041
  addonId: null,
42581
43042
  access: "create"
42582
43043
  },
43044
+ "pipelineOrchestrator.setCameraSensors": {
43045
+ capName: "pipeline-orchestrator",
43046
+ capScope: "system",
43047
+ addonId: null,
43048
+ access: "create"
43049
+ },
42583
43050
  "pipelineOrchestrator.setCameraStepOverride": {
42584
43051
  capName: "pipeline-orchestrator",
42585
43052
  capScope: "system",
@@ -44976,6 +45443,11 @@ Object.freeze({
44976
45443
  }
44977
45444
  });
44978
45445
  Object.freeze({
45446
+ "accessories.getStatus": [{
45447
+ name: "deviceId",
45448
+ form: "single",
45449
+ optional: false
45450
+ }],
44979
45451
  "accessories.setChildHidden": [{
44980
45452
  name: "childDeviceId",
44981
45453
  form: "single",
@@ -44995,6 +45467,11 @@ Object.freeze({
44995
45467
  form: "single",
44996
45468
  optional: false
44997
45469
  }],
45470
+ "airQualitySensor.getStatus": [{
45471
+ name: "deviceId",
45472
+ form: "single",
45473
+ optional: false
45474
+ }],
44998
45475
  "alarmPanel.arm": [{
44999
45476
  name: "deviceId",
45000
45477
  form: "single",
@@ -45005,11 +45482,36 @@ Object.freeze({
45005
45482
  form: "single",
45006
45483
  optional: false
45007
45484
  }],
45485
+ "alarmPanel.getStatus": [{
45486
+ name: "deviceId",
45487
+ form: "single",
45488
+ optional: false
45489
+ }],
45008
45490
  "alarmPanel.trigger": [{
45009
45491
  name: "deviceId",
45010
45492
  form: "single",
45011
45493
  optional: false
45012
45494
  }],
45495
+ "ambientLightSensor.getStatus": [{
45496
+ name: "deviceId",
45497
+ form: "single",
45498
+ optional: false
45499
+ }],
45500
+ "audioAnalysis.applyDeviceSettingsPatch": [{
45501
+ name: "deviceId",
45502
+ form: "single",
45503
+ optional: false
45504
+ }],
45505
+ "audioAnalysis.getDeviceLiveContribution": [{
45506
+ name: "deviceId",
45507
+ form: "single",
45508
+ optional: false
45509
+ }],
45510
+ "audioAnalysis.getDeviceSettingsContribution": [{
45511
+ name: "deviceId",
45512
+ form: "single",
45513
+ optional: false
45514
+ }],
45013
45515
  "audioAnalysis.resolveDeviceSettings": [{
45014
45516
  name: "deviceId",
45015
45517
  form: "single",
@@ -45050,16 +45552,36 @@ Object.freeze({
45050
45552
  form: "single",
45051
45553
  optional: false
45052
45554
  }],
45555
+ "automationControl.getStatus": [{
45556
+ name: "deviceId",
45557
+ form: "single",
45558
+ optional: false
45559
+ }],
45053
45560
  "automationControl.trigger": [{
45054
45561
  name: "deviceId",
45055
45562
  form: "single",
45056
45563
  optional: false
45057
45564
  }],
45565
+ "battery.getStatus": [{
45566
+ name: "deviceId",
45567
+ form: "single",
45568
+ optional: false
45569
+ }],
45058
45570
  "battery.wakeForStream": [{
45059
45571
  name: "deviceId",
45060
45572
  form: "single",
45061
45573
  optional: false
45062
45574
  }],
45575
+ "binary.getStatus": [{
45576
+ name: "deviceId",
45577
+ form: "single",
45578
+ optional: false
45579
+ }],
45580
+ "brightness.getStatus": [{
45581
+ name: "deviceId",
45582
+ form: "single",
45583
+ optional: false
45584
+ }],
45063
45585
  "brightness.setBrightness": [{
45064
45586
  name: "deviceId",
45065
45587
  form: "single",
@@ -45075,6 +45597,26 @@ Object.freeze({
45075
45597
  form: "single",
45076
45598
  optional: false
45077
45599
  }],
45600
+ "cameraCredentials.getStatus": [{
45601
+ name: "deviceId",
45602
+ form: "single",
45603
+ optional: false
45604
+ }],
45605
+ "cameraGridLayout.applyDeviceSettingsPatch": [{
45606
+ name: "deviceId",
45607
+ form: "single",
45608
+ optional: false
45609
+ }],
45610
+ "cameraGridLayout.getDeviceLiveContribution": [{
45611
+ name: "deviceId",
45612
+ form: "single",
45613
+ optional: false
45614
+ }],
45615
+ "cameraGridLayout.getDeviceSettingsContribution": [{
45616
+ name: "deviceId",
45617
+ form: "single",
45618
+ optional: false
45619
+ }],
45078
45620
  "cameraGridLayout.getLayout": [{
45079
45621
  name: "deviceId",
45080
45622
  form: "single",
@@ -45090,6 +45632,21 @@ Object.freeze({
45090
45632
  form: "single",
45091
45633
  optional: false
45092
45634
  }],
45635
+ "cameraPipelineConfig.applyDeviceSettingsPatch": [{
45636
+ name: "deviceId",
45637
+ form: "single",
45638
+ optional: false
45639
+ }],
45640
+ "cameraPipelineConfig.getDeviceLiveContribution": [{
45641
+ name: "deviceId",
45642
+ form: "single",
45643
+ optional: false
45644
+ }],
45645
+ "cameraPipelineConfig.getDeviceSettingsContribution": [{
45646
+ name: "deviceId",
45647
+ form: "single",
45648
+ optional: false
45649
+ }],
45093
45650
  "cameraStreams.getBrokerStreams": [{
45094
45651
  name: "deviceId",
45095
45652
  form: "single",
@@ -45115,6 +45672,16 @@ Object.freeze({
45115
45672
  form: "single",
45116
45673
  optional: false
45117
45674
  }],
45675
+ "carbonMonoxide.getStatus": [{
45676
+ name: "deviceId",
45677
+ form: "single",
45678
+ optional: false
45679
+ }],
45680
+ "climateControl.getStatus": [{
45681
+ name: "deviceId",
45682
+ form: "single",
45683
+ optional: false
45684
+ }],
45118
45685
  "climateControl.setFanMode": [{
45119
45686
  name: "deviceId",
45120
45687
  form: "single",
@@ -45155,16 +45722,41 @@ Object.freeze({
45155
45722
  form: "single",
45156
45723
  optional: false
45157
45724
  }],
45725
+ "color.getStatus": [{
45726
+ name: "deviceId",
45727
+ form: "single",
45728
+ optional: false
45729
+ }],
45158
45730
  "color.setColor": [{
45159
45731
  name: "deviceId",
45160
45732
  form: "single",
45161
45733
  optional: false
45162
45734
  }],
45735
+ "connectivity.getStatus": [{
45736
+ name: "deviceId",
45737
+ form: "single",
45738
+ optional: false
45739
+ }],
45740
+ "consumables.getStatus": [{
45741
+ name: "deviceId",
45742
+ form: "single",
45743
+ optional: false
45744
+ }],
45163
45745
  "consumables.reset": [{
45164
45746
  name: "deviceId",
45165
45747
  form: "single",
45166
45748
  optional: false
45167
45749
  }],
45750
+ "contact.getStatus": [{
45751
+ name: "deviceId",
45752
+ form: "single",
45753
+ optional: false
45754
+ }],
45755
+ "control.getStatus": [{
45756
+ name: "deviceId",
45757
+ form: "single",
45758
+ optional: false
45759
+ }],
45168
45760
  "control.setValue": [{
45169
45761
  name: "deviceId",
45170
45762
  form: "single",
@@ -45175,6 +45767,11 @@ Object.freeze({
45175
45767
  form: "single",
45176
45768
  optional: false
45177
45769
  }],
45770
+ "cover.getStatus": [{
45771
+ name: "deviceId",
45772
+ form: "single",
45773
+ optional: false
45774
+ }],
45178
45775
  "cover.open": [{
45179
45776
  name: "deviceId",
45180
45777
  form: "single",
@@ -45200,6 +45797,11 @@ Object.freeze({
45200
45797
  form: "single",
45201
45798
  optional: false
45202
45799
  }],
45800
+ "dayNight.getStatus": [{
45801
+ name: "deviceId",
45802
+ form: "single",
45803
+ optional: false
45804
+ }],
45203
45805
  "dayNight.setSettings": [{
45204
45806
  name: "deviceId",
45205
45807
  form: "single",
@@ -45210,11 +45812,31 @@ Object.freeze({
45210
45812
  form: "single",
45211
45813
  optional: true
45212
45814
  }],
45815
+ "detectionPipeline.applyDeviceSettingsPatch": [{
45816
+ name: "deviceId",
45817
+ form: "single",
45818
+ optional: false
45819
+ }],
45820
+ "detectionPipeline.getDeviceLiveContribution": [{
45821
+ name: "deviceId",
45822
+ form: "single",
45823
+ optional: false
45824
+ }],
45825
+ "detectionPipeline.getDeviceSettingsContribution": [{
45826
+ name: "deviceId",
45827
+ form: "single",
45828
+ optional: false
45829
+ }],
45213
45830
  "deviceAdminLink.getAdminLink": [{
45214
45831
  name: "deviceId",
45215
45832
  form: "single",
45216
45833
  optional: false
45217
45834
  }],
45835
+ "deviceAdoption.getStatus": [{
45836
+ name: "deviceId",
45837
+ form: "single",
45838
+ optional: false
45839
+ }],
45218
45840
  "deviceAdoption.release": [{
45219
45841
  name: "camDeviceId",
45220
45842
  form: "single",
@@ -45230,6 +45852,11 @@ Object.freeze({
45230
45852
  form: "single",
45231
45853
  optional: false
45232
45854
  }],
45855
+ "deviceDiscovery.getStatus": [{
45856
+ name: "deviceId",
45857
+ form: "single",
45858
+ optional: false
45859
+ }],
45233
45860
  "deviceDiscovery.listDiscovered": [{
45234
45861
  name: "deviceId",
45235
45862
  form: "single",
@@ -45249,6 +45876,21 @@ Object.freeze({
45249
45876
  form: "single",
45250
45877
  optional: false
45251
45878
  }],
45879
+ "deviceExport.applyDeviceSettingsPatch": [{
45880
+ name: "deviceId",
45881
+ form: "single",
45882
+ optional: false
45883
+ }],
45884
+ "deviceExport.getDeviceLiveContribution": [{
45885
+ name: "deviceId",
45886
+ form: "single",
45887
+ optional: false
45888
+ }],
45889
+ "deviceExport.getDeviceSettingsContribution": [{
45890
+ name: "deviceId",
45891
+ form: "single",
45892
+ optional: false
45893
+ }],
45252
45894
  "deviceExtension.listCandidates": [{
45253
45895
  name: "deviceId",
45254
45896
  form: "single",
@@ -45597,6 +46239,26 @@ Object.freeze({
45597
46239
  form: "single",
45598
46240
  optional: false
45599
46241
  }],
46242
+ "deviceStatus.getStatus": [{
46243
+ name: "deviceId",
46244
+ form: "single",
46245
+ optional: false
46246
+ }],
46247
+ "doorbell.getStatus": [{
46248
+ name: "deviceId",
46249
+ form: "single",
46250
+ optional: false
46251
+ }],
46252
+ "enumSensor.getStatus": [{
46253
+ name: "deviceId",
46254
+ form: "single",
46255
+ optional: false
46256
+ }],
46257
+ "eventEmitter.getStatus": [{
46258
+ name: "deviceId",
46259
+ form: "single",
46260
+ optional: false
46261
+ }],
45600
46262
  "faceGallery.getFaceByTrack": [{
45601
46263
  name: "deviceId",
45602
46264
  form: "single",
@@ -45611,6 +46273,11 @@ Object.freeze({
45611
46273
  form: "array",
45612
46274
  optional: true
45613
46275
  }],
46276
+ "fanControl.getStatus": [{
46277
+ name: "deviceId",
46278
+ form: "single",
46279
+ optional: false
46280
+ }],
45614
46281
  "fanControl.setDirection": [{
45615
46282
  name: "deviceId",
45616
46283
  form: "single",
@@ -45631,6 +46298,26 @@ Object.freeze({
45631
46298
  form: "single",
45632
46299
  optional: false
45633
46300
  }],
46301
+ "featureProbe.getStatus": [{
46302
+ name: "deviceId",
46303
+ form: "single",
46304
+ optional: false
46305
+ }],
46306
+ "flood.getStatus": [{
46307
+ name: "deviceId",
46308
+ form: "single",
46309
+ optional: false
46310
+ }],
46311
+ "gas.getStatus": [{
46312
+ name: "deviceId",
46313
+ form: "single",
46314
+ optional: false
46315
+ }],
46316
+ "humidifier.getStatus": [{
46317
+ name: "deviceId",
46318
+ form: "single",
46319
+ optional: false
46320
+ }],
45634
46321
  "humidifier.setMode": [{
45635
46322
  name: "deviceId",
45636
46323
  form: "single",
@@ -45646,11 +46333,26 @@ Object.freeze({
45646
46333
  form: "single",
45647
46334
  optional: false
45648
46335
  }],
46336
+ "humiditySensor.getStatus": [{
46337
+ name: "deviceId",
46338
+ form: "single",
46339
+ optional: false
46340
+ }],
46341
+ "image.getStatus": [{
46342
+ name: "deviceId",
46343
+ form: "single",
46344
+ optional: false
46345
+ }],
45649
46346
  "imageSettings.getOptions": [{
45650
46347
  name: "deviceId",
45651
46348
  form: "single",
45652
46349
  optional: false
45653
46350
  }],
46351
+ "imageSettings.getStatus": [{
46352
+ name: "deviceId",
46353
+ form: "single",
46354
+ optional: false
46355
+ }],
45654
46356
  "imageSettings.setSettings": [{
45655
46357
  name: "deviceId",
45656
46358
  form: "single",
@@ -45661,6 +46363,11 @@ Object.freeze({
45661
46363
  form: "single",
45662
46364
  optional: false
45663
46365
  }],
46366
+ "intercom.getStatus": [{
46367
+ name: "deviceId",
46368
+ form: "single",
46369
+ optional: false
46370
+ }],
45664
46371
  "intercom.handleAnswer": [{
45665
46372
  name: "deviceId",
45666
46373
  form: "single",
@@ -45691,6 +46398,11 @@ Object.freeze({
45691
46398
  form: "single",
45692
46399
  optional: false
45693
46400
  }],
46401
+ "lawnMowerControl.getStatus": [{
46402
+ name: "deviceId",
46403
+ form: "single",
46404
+ optional: false
46405
+ }],
45694
46406
  "lawnMowerControl.pause": [{
45695
46407
  name: "deviceId",
45696
46408
  form: "single",
@@ -45701,6 +46413,11 @@ Object.freeze({
45701
46413
  form: "single",
45702
46414
  optional: false
45703
46415
  }],
46416
+ "lockControl.getStatus": [{
46417
+ name: "deviceId",
46418
+ form: "single",
46419
+ optional: false
46420
+ }],
45704
46421
  "lockControl.lock": [{
45705
46422
  name: "deviceId",
45706
46423
  form: "single",
@@ -45716,6 +46433,11 @@ Object.freeze({
45716
46433
  form: "single",
45717
46434
  optional: false
45718
46435
  }],
46436
+ "mediaPlayer.getStatus": [{
46437
+ name: "deviceId",
46438
+ form: "single",
46439
+ optional: false
46440
+ }],
45719
46441
  "mediaPlayer.next": [{
45720
46442
  name: "deviceId",
45721
46443
  form: "single",
@@ -45776,6 +46498,11 @@ Object.freeze({
45776
46498
  form: "single",
45777
46499
  optional: false
45778
46500
  }],
46501
+ "motion.getStatus": [{
46502
+ name: "deviceId",
46503
+ form: "single",
46504
+ optional: false
46505
+ }],
45779
46506
  "motion.isDetected": [{
45780
46507
  name: "deviceId",
45781
46508
  form: "single",
@@ -45786,11 +46513,31 @@ Object.freeze({
45786
46513
  form: "single",
45787
46514
  optional: false
45788
46515
  }],
46516
+ "motionDetection.applyDeviceSettingsPatch": [{
46517
+ name: "deviceId",
46518
+ form: "single",
46519
+ optional: false
46520
+ }],
46521
+ "motionDetection.getDeviceLiveContribution": [{
46522
+ name: "deviceId",
46523
+ form: "single",
46524
+ optional: false
46525
+ }],
46526
+ "motionDetection.getDeviceSettingsContribution": [{
46527
+ name: "deviceId",
46528
+ form: "single",
46529
+ optional: false
46530
+ }],
45789
46531
  "motionDetection.removeCamera": [{
45790
46532
  name: "deviceId",
45791
46533
  form: "single",
45792
46534
  optional: false
45793
46535
  }],
46536
+ "motionTrigger.getStatus": [{
46537
+ name: "deviceId",
46538
+ form: "single",
46539
+ optional: false
46540
+ }],
45794
46541
  "motionTrigger.setMotionTrigger": [{
45795
46542
  name: "deviceId",
45796
46543
  form: "single",
@@ -45801,6 +46548,11 @@ Object.freeze({
45801
46548
  form: "single",
45802
46549
  optional: false
45803
46550
  }],
46551
+ "motionZones.getStatus": [{
46552
+ name: "deviceId",
46553
+ form: "single",
46554
+ optional: false
46555
+ }],
45804
46556
  "motionZones.setZone": [{
45805
46557
  name: "deviceId",
45806
46558
  form: "single",
@@ -45811,6 +46563,11 @@ Object.freeze({
45811
46563
  form: "single",
45812
46564
  optional: false
45813
46565
  }],
46566
+ "nativeObjectDetection.getStatus": [{
46567
+ name: "deviceId",
46568
+ form: "single",
46569
+ optional: false
46570
+ }],
45814
46571
  "nativeObjectDetection.setEnabled": [{
45815
46572
  name: "deviceId",
45816
46573
  form: "single",
@@ -45826,6 +46583,11 @@ Object.freeze({
45826
46583
  form: "single",
45827
46584
  optional: false
45828
46585
  }],
46586
+ "navigation.getStatus": [{
46587
+ name: "deviceId",
46588
+ form: "single",
46589
+ optional: false
46590
+ }],
45829
46591
  "navigation.goToPoint": [{
45830
46592
  name: "deviceId",
45831
46593
  form: "single",
@@ -45871,6 +46633,11 @@ Object.freeze({
45871
46633
  form: "single",
45872
46634
  optional: false
45873
46635
  }],
46636
+ "networkLink.getStatus": [{
46637
+ name: "deviceId",
46638
+ form: "single",
46639
+ optional: false
46640
+ }],
45874
46641
  "networkQuality.getDeviceStats": [{
45875
46642
  name: "deviceId",
45876
46643
  form: "single",
@@ -45881,6 +46648,11 @@ Object.freeze({
45881
46648
  form: "single",
45882
46649
  optional: false
45883
46650
  }],
46651
+ "notificationRules.getAlarmSensors": [{
46652
+ name: "deviceIds",
46653
+ form: "array",
46654
+ optional: false
46655
+ }],
45884
46656
  "notificationRules.setDeviceMuted": [{
45885
46657
  name: "deviceId",
45886
46658
  form: "single",
@@ -45891,11 +46663,26 @@ Object.freeze({
45891
46663
  form: "single",
45892
46664
  optional: false
45893
46665
  }],
46666
+ "notifier.getStatus": [{
46667
+ name: "deviceId",
46668
+ form: "single",
46669
+ optional: false
46670
+ }],
45894
46671
  "notifier.send": [{
45895
46672
  name: "deviceId",
45896
46673
  form: "single",
45897
46674
  optional: false
45898
46675
  }],
46676
+ "numericSensor.getStatus": [{
46677
+ name: "deviceId",
46678
+ form: "single",
46679
+ optional: false
46680
+ }],
46681
+ "osd.getStatus": [{
46682
+ name: "deviceId",
46683
+ form: "single",
46684
+ optional: false
46685
+ }],
45899
46686
  "osd.setOverlay": [{
45900
46687
  name: "deviceId",
45901
46688
  form: "single",
@@ -45955,6 +46742,11 @@ Object.freeze({
45955
46742
  form: "single",
45956
46743
  optional: false
45957
46744
  }],
46745
+ "petFeeder.getStatus": [{
46746
+ name: "deviceId",
46747
+ form: "single",
46748
+ optional: false
46749
+ }],
45958
46750
  "petFeeder.markFoodReplenished": [{
45959
46751
  name: "deviceId",
45960
46752
  form: "single",
@@ -45990,6 +46782,16 @@ Object.freeze({
45990
46782
  form: "single",
45991
46783
  optional: false
45992
46784
  }],
46785
+ "pipelineAnalytics.applyDeviceSettingsPatch": [{
46786
+ name: "deviceId",
46787
+ form: "single",
46788
+ optional: false
46789
+ }],
46790
+ "pipelineAnalytics.clearTrackRelation": [{
46791
+ name: "deviceId",
46792
+ form: "single",
46793
+ optional: false
46794
+ }],
45993
46795
  "pipelineAnalytics.clearTracks": [{
45994
46796
  name: "deviceId",
45995
46797
  form: "single",
@@ -46025,6 +46827,16 @@ Object.freeze({
46025
46827
  form: "single",
46026
46828
  optional: false
46027
46829
  }],
46830
+ "pipelineAnalytics.getDeviceLiveContribution": [{
46831
+ name: "deviceId",
46832
+ form: "single",
46833
+ optional: false
46834
+ }],
46835
+ "pipelineAnalytics.getDeviceSettingsContribution": [{
46836
+ name: "deviceId",
46837
+ form: "single",
46838
+ optional: false
46839
+ }],
46028
46840
  "pipelineAnalytics.getEventDensity": [{
46029
46841
  name: "deviceId",
46030
46842
  form: "single",
@@ -46125,11 +46937,6 @@ Object.freeze({
46125
46937
  form: "single",
46126
46938
  optional: true
46127
46939
  }],
46128
- "pipelineAnalytics.listRecentSummaries": [{
46129
- name: "deviceIds",
46130
- form: "array",
46131
- optional: false
46132
- }],
46133
46940
  "pipelineAnalytics.listRecentTracks": [{
46134
46941
  name: "deviceIds",
46135
46942
  form: "array",
@@ -46140,12 +46947,12 @@ Object.freeze({
46140
46947
  form: "array",
46141
46948
  optional: true
46142
46949
  }],
46143
- "pipelineAnalytics.listSummaries": [{
46144
- name: "deviceIds",
46145
- form: "array",
46950
+ "pipelineAnalytics.listTrackMedia": [{
46951
+ name: "deviceId",
46952
+ form: "single",
46146
46953
  optional: false
46147
46954
  }],
46148
- "pipelineAnalytics.listTrackMedia": [{
46955
+ "pipelineAnalytics.listTrackRelations": [{
46149
46956
  name: "deviceId",
46150
46957
  form: "single",
46151
46958
  optional: false
@@ -46220,6 +47027,16 @@ Object.freeze({
46220
47027
  form: "single",
46221
47028
  optional: false
46222
47029
  }],
47030
+ "pipelineAnalytics.setTrackPurity": [{
47031
+ name: "deviceId",
47032
+ form: "single",
47033
+ optional: false
47034
+ }],
47035
+ "pipelineAnalytics.setTrackRelation": [{
47036
+ name: "deviceId",
47037
+ form: "single",
47038
+ optional: false
47039
+ }],
46223
47040
  "pipelineAnalytics.wipeAllAnalytics": [{
46224
47041
  name: "deviceId",
46225
47042
  form: "single",
@@ -46235,6 +47052,11 @@ Object.freeze({
46235
47052
  form: "single",
46236
47053
  optional: true
46237
47054
  }],
47055
+ "pipelineOrchestrator.applyDeviceSettingsPatch": [{
47056
+ name: "deviceId",
47057
+ form: "single",
47058
+ optional: false
47059
+ }],
46238
47060
  "pipelineOrchestrator.assignAudio": [{
46239
47061
  name: "deviceId",
46240
47062
  form: "single",
@@ -46280,6 +47102,16 @@ Object.freeze({
46280
47102
  form: "single",
46281
47103
  optional: false
46282
47104
  }],
47105
+ "pipelineOrchestrator.getDeviceLiveContribution": [{
47106
+ name: "deviceId",
47107
+ form: "single",
47108
+ optional: false
47109
+ }],
47110
+ "pipelineOrchestrator.getDeviceSettingsContribution": [{
47111
+ name: "deviceId",
47112
+ form: "single",
47113
+ optional: false
47114
+ }],
46283
47115
  "pipelineOrchestrator.getPipelineAssignment": [{
46284
47116
  name: "deviceId",
46285
47117
  form: "single",
@@ -46290,6 +47122,11 @@ Object.freeze({
46290
47122
  form: "single",
46291
47123
  optional: false
46292
47124
  }],
47125
+ "pipelineOrchestrator.requestOccupancyLook": [{
47126
+ name: "deviceId",
47127
+ form: "single",
47128
+ optional: false
47129
+ }],
46293
47130
  "pipelineOrchestrator.resolvePipeline": [{
46294
47131
  name: "deviceId",
46295
47132
  form: "single",
@@ -46300,6 +47137,11 @@ Object.freeze({
46300
47137
  form: "single",
46301
47138
  optional: false
46302
47139
  }],
47140
+ "pipelineOrchestrator.setCameraSensors": [{
47141
+ name: "deviceId",
47142
+ form: "single",
47143
+ optional: false
47144
+ }],
46303
47145
  "pipelineOrchestrator.setCameraStepOverride": [{
46304
47146
  name: "deviceId",
46305
47147
  form: "single",
@@ -46390,11 +47232,31 @@ Object.freeze({
46390
47232
  form: "single",
46391
47233
  optional: true
46392
47234
  }],
47235
+ "powerMeter.getStatus": [{
47236
+ name: "deviceId",
47237
+ form: "single",
47238
+ optional: false
47239
+ }],
47240
+ "presence.getStatus": [{
47241
+ name: "deviceId",
47242
+ form: "single",
47243
+ optional: false
47244
+ }],
47245
+ "pressureSensor.getStatus": [{
47246
+ name: "deviceId",
47247
+ form: "single",
47248
+ optional: false
47249
+ }],
46393
47250
  "privacyMask.getOptions": [{
46394
47251
  name: "deviceId",
46395
47252
  form: "single",
46396
47253
  optional: false
46397
47254
  }],
47255
+ "privacyMask.getStatus": [{
47256
+ name: "deviceId",
47257
+ form: "single",
47258
+ optional: false
47259
+ }],
46398
47260
  "privacyMask.setAudioEnabled": [{
46399
47261
  name: "deviceId",
46400
47262
  form: "single",
@@ -46445,6 +47307,11 @@ Object.freeze({
46445
47307
  form: "single",
46446
47308
  optional: false
46447
47309
  }],
47310
+ "ptz.getStatus": [{
47311
+ name: "deviceId",
47312
+ form: "single",
47313
+ optional: false
47314
+ }],
46448
47315
  "ptz.goHome": [{
46449
47316
  name: "deviceId",
46450
47317
  form: "single",
@@ -46535,6 +47402,11 @@ Object.freeze({
46535
47402
  form: "single",
46536
47403
  optional: false
46537
47404
  }],
47405
+ "recordingArchive.applyDeviceSettingsPatch": [{
47406
+ name: "deviceId",
47407
+ form: "single",
47408
+ optional: false
47409
+ }],
46538
47410
  "recordingArchive.deleteFootprint": [{
46539
47411
  name: "deviceId",
46540
47412
  form: "single",
@@ -46555,6 +47427,21 @@ Object.freeze({
46555
47427
  form: "single",
46556
47428
  optional: false
46557
47429
  }],
47430
+ "recordingArchive.getDeviceLiveContribution": [{
47431
+ name: "deviceId",
47432
+ form: "single",
47433
+ optional: false
47434
+ }],
47435
+ "recordingArchive.getDeviceSettingsContribution": [{
47436
+ name: "deviceId",
47437
+ form: "single",
47438
+ optional: false
47439
+ }],
47440
+ "recordingArchive.getStatus": [{
47441
+ name: "deviceId",
47442
+ form: "single",
47443
+ optional: false
47444
+ }],
46558
47445
  "recordingArchive.listOpsLog": [{
46559
47446
  name: "deviceId",
46560
47447
  form: "single",
@@ -46640,6 +47527,11 @@ Object.freeze({
46640
47527
  form: "single",
46641
47528
  optional: false
46642
47529
  }],
47530
+ "recordingOnboard.getStatus": [{
47531
+ name: "deviceId",
47532
+ form: "single",
47533
+ optional: false
47534
+ }],
46643
47535
  "recordingOnboard.setSettings": [{
46644
47536
  name: "deviceId",
46645
47537
  form: "single",
@@ -46670,6 +47562,11 @@ Object.freeze({
46670
47562
  form: "single",
46671
47563
  optional: false
46672
47564
  }],
47565
+ "sceneMonitor.getStatus": [{
47566
+ name: "deviceId",
47567
+ form: "single",
47568
+ optional: false
47569
+ }],
46673
47570
  "sceneMonitor.listScenes": [{
46674
47571
  name: "deviceId",
46675
47572
  form: "single",
@@ -46695,6 +47592,11 @@ Object.freeze({
46695
47592
  form: "single",
46696
47593
  optional: false
46697
47594
  }],
47595
+ "scriptRunner.getStatus": [{
47596
+ name: "deviceId",
47597
+ form: "single",
47598
+ optional: false
47599
+ }],
46698
47600
  "scriptRunner.run": [{
46699
47601
  name: "deviceId",
46700
47602
  form: "single",
@@ -46705,11 +47607,31 @@ Object.freeze({
46705
47607
  form: "single",
46706
47608
  optional: false
46707
47609
  }],
47610
+ "smoke.getStatus": [{
47611
+ name: "deviceId",
47612
+ form: "single",
47613
+ optional: false
47614
+ }],
47615
+ "snapshot.applyDeviceSettingsPatch": [{
47616
+ name: "deviceId",
47617
+ form: "single",
47618
+ optional: false
47619
+ }],
46708
47620
  "snapshot.getDebugState": [{
46709
47621
  name: "deviceId",
46710
47622
  form: "single",
46711
47623
  optional: false
46712
47624
  }],
47625
+ "snapshot.getDeviceLiveContribution": [{
47626
+ name: "deviceId",
47627
+ form: "single",
47628
+ optional: false
47629
+ }],
47630
+ "snapshot.getDeviceSettingsContribution": [{
47631
+ name: "deviceId",
47632
+ form: "single",
47633
+ optional: false
47634
+ }],
46713
47635
  "snapshot.getSnapshot": [{
46714
47636
  name: "deviceId",
46715
47637
  form: "single",
@@ -46726,6 +47648,11 @@ Object.freeze({
46726
47648
  form: "array",
46727
47649
  optional: false
46728
47650
  }],
47651
+ "snapshot.getStatus": [{
47652
+ name: "deviceId",
47653
+ form: "single",
47654
+ optional: false
47655
+ }],
46729
47656
  "snapshot.invalidateCache": [{
46730
47657
  name: "deviceId",
46731
47658
  form: "single",
@@ -46736,6 +47663,11 @@ Object.freeze({
46736
47663
  form: "single",
46737
47664
  optional: false
46738
47665
  }],
47666
+ "streamBroker.applyDeviceSettingsPatch": [{
47667
+ name: "deviceId",
47668
+ form: "single",
47669
+ optional: false
47670
+ }],
46739
47671
  "streamBroker.assignProfile": [{
46740
47672
  name: "deviceId",
46741
47673
  form: "single",
@@ -46751,6 +47683,16 @@ Object.freeze({
46751
47683
  form: "single",
46752
47684
  optional: false
46753
47685
  }],
47686
+ "streamBroker.getDeviceLiveContribution": [{
47687
+ name: "deviceId",
47688
+ form: "single",
47689
+ optional: false
47690
+ }],
47691
+ "streamBroker.getDeviceSettingsContribution": [{
47692
+ name: "deviceId",
47693
+ form: "single",
47694
+ optional: false
47695
+ }],
46754
47696
  "streamBroker.getStreamWithCodec": [{
46755
47697
  name: "deviceId",
46756
47698
  form: "single",
@@ -46811,16 +47753,46 @@ Object.freeze({
46811
47753
  form: "single",
46812
47754
  optional: false
46813
47755
  }],
47756
+ "streamParams.getStatus": [{
47757
+ name: "deviceId",
47758
+ form: "single",
47759
+ optional: false
47760
+ }],
46814
47761
  "streamParams.setProfile": [{
46815
47762
  name: "deviceId",
46816
47763
  form: "single",
46817
47764
  optional: false
46818
47765
  }],
47766
+ "switch.getStatus": [{
47767
+ name: "deviceId",
47768
+ form: "single",
47769
+ optional: false
47770
+ }],
46819
47771
  "switch.setState": [{
46820
47772
  name: "deviceId",
46821
47773
  form: "single",
46822
47774
  optional: false
46823
47775
  }],
47776
+ "tamper.getStatus": [{
47777
+ name: "deviceId",
47778
+ form: "single",
47779
+ optional: false
47780
+ }],
47781
+ "temperatureSensor.getStatus": [{
47782
+ name: "deviceId",
47783
+ form: "single",
47784
+ optional: false
47785
+ }],
47786
+ "update.getStatus": [{
47787
+ name: "deviceId",
47788
+ form: "single",
47789
+ optional: false
47790
+ }],
47791
+ "vacuumControl.getStatus": [{
47792
+ name: "deviceId",
47793
+ form: "single",
47794
+ optional: false
47795
+ }],
46824
47796
  "vacuumControl.locate": [{
46825
47797
  name: "deviceId",
46826
47798
  form: "single",
@@ -46856,6 +47828,11 @@ Object.freeze({
46856
47828
  form: "single",
46857
47829
  optional: false
46858
47830
  }],
47831
+ "valve.getStatus": [{
47832
+ name: "deviceId",
47833
+ form: "single",
47834
+ optional: false
47835
+ }],
46859
47836
  "valve.open": [{
46860
47837
  name: "deviceId",
46861
47838
  form: "single",
@@ -46871,6 +47848,11 @@ Object.freeze({
46871
47848
  form: "single",
46872
47849
  optional: false
46873
47850
  }],
47851
+ "vibration.getStatus": [{
47852
+ name: "deviceId",
47853
+ form: "single",
47854
+ optional: false
47855
+ }],
46874
47856
  "videoclips.dialClipStream": [{
46875
47857
  name: "deviceId",
46876
47858
  form: "single",
@@ -46906,6 +47888,11 @@ Object.freeze({
46906
47888
  form: "single",
46907
47889
  optional: false
46908
47890
  }],
47891
+ "waterHeater.getStatus": [{
47892
+ name: "deviceId",
47893
+ form: "single",
47894
+ optional: false
47895
+ }],
46909
47896
  "waterHeater.setAway": [{
46910
47897
  name: "deviceId",
46911
47898
  form: "single",
@@ -46921,6 +47908,11 @@ Object.freeze({
46921
47908
  form: "single",
46922
47909
  optional: false
46923
47910
  }],
47911
+ "weather.getStatus": [{
47912
+ name: "deviceId",
47913
+ form: "single",
47914
+ optional: false
47915
+ }],
46924
47916
  "webrtcSession.addIceCandidate": [{
46925
47917
  name: "deviceId",
46926
47918
  form: "single",
@@ -47446,6 +48438,18 @@ var STATE_SUMMARY_VARS = [
47446
48438
  systemEventKinds: [...SUMMARISABLE],
47447
48439
  systemEventDeliveries: ["summary"]
47448
48440
  },
48441
+ {
48442
+ name: "summarySection",
48443
+ label: "Summary: this section",
48444
+ description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
48445
+ example: "Batterie scariche",
48446
+ group: "system",
48447
+ families: ["rule"],
48448
+ fields: [...RULE_TEXT],
48449
+ kinds: ["system"],
48450
+ systemEventKinds: [...SUMMARISABLE],
48451
+ systemEventDeliveries: ["summary"]
48452
+ },
47449
48453
  ...STATE_SUMMARY_SECTION_VARS.map((v) => ({
47450
48454
  name: v.name,
47451
48455
  label: v.label,
@@ -47522,6 +48526,37 @@ var STATE_SUMMARY_VARS = [
47522
48526
  [...RULE_TEXT],
47523
48527
  ...STATE_SUMMARY_VARS
47524
48528
  ];
48529
+ new Set([
48530
+ "disarmed",
48531
+ "armed_home",
48532
+ "armed_away",
48533
+ "armed_night",
48534
+ "armed_vacation",
48535
+ "armed_custom_bypass",
48536
+ "arming",
48537
+ "disarming",
48538
+ "pending",
48539
+ "triggered",
48540
+ "open",
48541
+ "opening",
48542
+ "closing",
48543
+ "closed",
48544
+ "stopped",
48545
+ "locked",
48546
+ "unlocked",
48547
+ "locking",
48548
+ "unlocking",
48549
+ "jammed",
48550
+ "on",
48551
+ "off",
48552
+ "home",
48553
+ "not_home",
48554
+ "matched",
48555
+ "diverged",
48556
+ "unknown",
48557
+ "latched",
48558
+ "live"
48559
+ ]);
47525
48560
  /**
47526
48561
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
47527
48562
  *
@@ -47615,7 +48650,7 @@ var PreviewTextField = string().max(200);
47615
48650
  * Whether the notification's preview is a STILL or a short animation.
47616
48651
  *
47617
48652
  * The operator's ask, verbatim: *"inviato come gif o video (come per le altre
47618
- * rule)"* — the other rules already offer an animated preview, and a ten-hour
48653
+ * rule)"* [sent as a gif or video (as for the other rules)] — the other rules already offer an animated preview, and a ten-hour
47619
48654
  * night reads better as three seconds of motion than as one frame of it. Both
47620
48655
  * modes get the SAME treatment (blurred frame, large centred title); `'gif'`
47621
48656
  * simply applies it to a dozen frames sampled across the render and assembles
@@ -47753,6 +48788,7 @@ TimelapseRuleInputSchema.extend({
47753
48788
  createdAt: number(),
47754
48789
  updatedAt: number()
47755
48790
  });
48791
+ MotionOnMotionChangedDataSchema.omit({ triggeredBy: true });
47756
48792
  object({
47757
48793
  /**
47758
48794
  * Fraction of the box's own size added on EACH side before cutting.