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