@camstack/addon-model-studio 1.1.186 → 1.1.188

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 (18) hide show
  1. package/dist/{MotionZonesSettings-CA9PaKjB.mjs → MotionZonesSettings-C3Q6uGN6.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-BJR31Efj.mjs → PrivacyMaskSettings-BTYQ0naD.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-HiRFJCYE.mjs → SceneMonitorEditor-Cp7WaMLv.mjs} +3 -3
  4. package/dist/_stub.js +11 -10
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DdDnYrMZ.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DsTZQf95.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-4iTjY_Pt.mjs +26 -0
  7. package/dist/{hostInit-T7_Tpiyv.mjs → hostInit-DdDrweKo.mjs} +3 -3
  8. package/dist/model-studio.addon.js +434 -252
  9. package/dist/model-studio.addon.mjs +434 -252
  10. package/dist/{player-overlays-DdeNw6dl.mjs → player-overlays-DKT8GX77.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-Dma333nN.mjs → responsive-DIe_729f.mjs} +1 -1
  13. package/dist/{scene-monitor-copy-DKotQU9H.mjs → scene-monitor-copy-BPMddHmu.mjs} +1 -1
  14. package/dist/{square-WG1xkrgu.mjs → square-BV6C5eVN.mjs} +1 -1
  15. package/dist/{trash-2-GwC3pOqd.mjs → trash-2-pItW1ij8.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-w31RPwHi.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-xPDjO4M6.mjs} +1 -1
  17. package/package.json +2 -2
  18. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C-PLenBK.mjs +0 -26
@@ -549,7 +549,7 @@ async function importScryptedCatalogModel(input, deps) {
549
549
  }
550
550
  }
551
551
  //#endregion
552
- //#region ../types/dist/event-category-C5xZWqz6.mjs
552
+ //#region ../types/dist/event-category-BGmz_oxW.mjs
553
553
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
554
554
  EventCategory["SystemBoot"] = "system.boot";
555
555
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -1082,6 +1082,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
1082
1082
  */
1083
1083
  EventCategory["PipelineAudioInferenceResult"] = "pipeline.audio-inference-result";
1084
1084
  EventCategory["DetectionPhaseTransition"] = "detection.phase-transition";
1085
+ /**
1086
+ * A camera provider's RAW onboard motion push (D673): the `MotionOnMotionChanged`
1087
+ * data shape without `triggeredBy`, built by `providerMotionEvent`. Its one
1088
+ * consumer is the orchestrator's camera-sensors bridge, which re-emits the
1089
+ * camera's EFFECTIVE onboard motion as `MotionOnMotionChanged` (a pass-through
1090
+ * for a camera with no attached sensor). Providers must not emit
1091
+ * `MotionOnMotionChanged` themselves; `scripts/check-onboard-motion-emitters.ts`
1092
+ * keeps it so (camera-grid is a named, deferred exception).
1093
+ */
1085
1094
  EventCategory["ProviderMotion"] = "provider.motion";
1086
1095
  EventCategory["ProviderDetection"] = "provider.detection";
1087
1096
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
@@ -5920,7 +5929,7 @@ var ZodIssueCode = {
5920
5929
  var ZodFirstPartyTypeKind;
5921
5930
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5922
5931
  //#endregion
5923
- //#region ../types/dist/sleep-gU6hqv4_.mjs
5932
+ //#region ../types/dist/sleep-CDCONfkt.mjs
5924
5933
  /**
5925
5934
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5926
5935
  * window to float samples (D455).
@@ -8030,7 +8039,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8030
8039
  return DeviceRole;
8031
8040
  }({});
8032
8041
  //#endregion
8033
- //#region ../types/dist/composition-Dq42XWp0.mjs
8042
+ //#region ../types/dist/composition-43aqsZQj.mjs
8034
8043
  /**
8035
8044
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8036
8045
  *
@@ -8087,13 +8096,12 @@ portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac
8087
8096
  * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
8088
8097
  * valutatore puro del suo FRONTE.
8089
8098
  *
8090
- * Viveva dentro il builtin virtual-doorbell
8091
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
8092
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
8093
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
8094
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
8095
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
8096
- * SPOSTA qui e il doorbell la ri-esporta.
8099
+ * UNA tabella per tutti quelli che chiedono "questo device è ALTO?": il
8100
+ * trigger `RecordingTriggers.sensorDeviceIds` del recorder, i marker dei
8101
+ * sensori della post-analysis, il bridge camera-sensors dell'orchestratore e
8102
+ * le sorgenti di un campanello composto (`doorbellFeatureSources`, D671).
8103
+ * Una seconda copia divergerebbe alla prima cap aggiunta, e il sintomo — "il
8104
+ * sensore fa suonare il campanello ma non registra" — è esattamente D62.
8097
8105
  *
8098
8106
  * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
8099
8107
  * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
@@ -9828,7 +9836,7 @@ var RecordingTriggersSchema = object({
9828
9836
  *
9829
9837
  * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
9830
9838
  * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
9831
- * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
9839
+ * la stessa del campanello composto (D671). Ed è il FRONTE, non
9832
9840
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
9833
9841
  * registrare.
9834
9842
  */
@@ -12201,6 +12209,68 @@ method(object({
12201
12209
  password: string()
12202
12210
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
12203
12211
  /**
12212
+ * How long one snapshot may take end to end: the pinned copy of the whole
12213
+ * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
12214
+ * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
12215
+ * generous because a timeout fails the whole backup run.
12216
+ */
12217
+ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
12218
+ /**
12219
+ * The databases an owner snapshots — declared by the OWNER, so a caller never
12220
+ * guesses which file is live from what sits beside it (a cleanly closed
12221
+ * database has no sidecars and is just as owned). Paths are absolute on the
12222
+ * owner's host.
12223
+ */
12224
+ var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
12225
+ /** One b-tree table of the snapshot and the rows it holds. */
12226
+ var DatabaseSnapshotTableSchema = object({
12227
+ name: string(),
12228
+ rows: number().int().nonnegative()
12229
+ });
12230
+ /**
12231
+ * What the owner wrote. Every path is ABSOLUTE on the owner's host — the
12232
+ * caller pins the call to its own node, so it can read the file; a caller
12233
+ * that finds the path outside its own data root refuses it rather than
12234
+ * archiving something it cannot place.
12235
+ */
12236
+ var DatabaseSnapshotResultSchema = object({
12237
+ /** The live database the snapshot copies. Never to be copied as a file. */
12238
+ livePath: string(),
12239
+ /** The verified copy: `<livePath>` + {@link DATABASE_SNAPSHOT_SUFFIX}. */
12240
+ snapshotPath: string(),
12241
+ sizeBytes: number().int().nonnegative(),
12242
+ pageCount: number().int().nonnegative(),
12243
+ pageSize: number().int().positive(),
12244
+ /**
12245
+ * Every b-tree table with its row count. Read inside the SAME read
12246
+ * transaction the copy was taken from, and found EQUAL on the copy — so
12247
+ * this is the content of the snapshot, not an estimate of the source.
12248
+ */
12249
+ tables: array(DatabaseSnapshotTableSchema),
12250
+ /** Wall time of the pinned copy (row counts included). */
12251
+ copyMs: number().nonnegative(),
12252
+ /** Wall time of the checks on the copy (`integrity_check`, row counts). */
12253
+ verifyMs: number().nonnegative(),
12254
+ /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
12255
+ takenAt: number()
12256
+ });
12257
+ /**
12258
+ * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
12259
+ * the same facts, with both paths relative to the archive root (the node's
12260
+ * data dir), because an archive outlives the host that made it.
12261
+ */
12262
+ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
12263
+ /** Archive-relative path of the live database the archive does NOT carry. */
12264
+ livePath: string(),
12265
+ /** Archive-relative path of the verified copy it carries in its place. */
12266
+ snapshotPath: string()
12267
+ });
12268
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
12269
+ kind: "mutation",
12270
+ auth: "admin",
12271
+ timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
12272
+ });
12273
+ /**
12204
12274
  * Orchestrator-side destination metadata. The orchestrator computes
12205
12275
  * `id = <addonId>:<subId>` from its provider lookup so consumers
12206
12276
  * (admin UI, restore flow) see one canonical key.
@@ -12311,7 +12381,12 @@ var ArchiveManifestSchema = object({
12311
12381
  locations: array(string()),
12312
12382
  entries: array(ArchiveEntrySchema),
12313
12383
  totalBytes: number(),
12314
- totalFiles: number()
12384
+ totalFiles: number(),
12385
+ /**
12386
+ * Live SQLite databases this archive carries as their OWNER's verified
12387
+ * snapshot instead of as files (D693). Absent on archives made before.
12388
+ */
12389
+ sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
12315
12390
  });
12316
12391
  var LocationStatSchema = object({
12317
12392
  name: string(),
@@ -13735,6 +13810,52 @@ var CompositionBlockStateSchema = object({
13735
13810
  reason: string().optional(),
13736
13811
  fields: array(CompositionFieldStateSchema)
13737
13812
  });
13813
+ var ComposerBlockSchema = object({
13814
+ id: string().min(1),
13815
+ name: string().min(1).max(120),
13816
+ enabled: boolean(),
13817
+ updatedAt: number(),
13818
+ composition: CompositionSchema
13819
+ });
13820
+ /**
13821
+ * A stored composition row that no longer PARSES — a schema a release
13822
+ * tightened, a row written by a newer build. Sent by id so the composer keeps
13823
+ * its device as a placeholder and reports the block `failed` naming the parse
13824
+ * error. Leaving it out would read, twice, exactly like a delete (D49).
13825
+ */
13826
+ var ComposerUnreadableBlockSchema = object({
13827
+ id: string().min(1),
13828
+ /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13829
+ name: string().nullable(),
13830
+ /** The parse error, in the operator's words. */
13831
+ error: string()
13832
+ });
13833
+ method(object({
13834
+ /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13835
+ integrationId: string().nullable(),
13836
+ /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13837
+ storeLoaded: boolean(),
13838
+ blocks: array(ComposerBlockSchema),
13839
+ /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13840
+ restartBlockIds: array(string()),
13841
+ /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13842
+ unreadableBlocks: array(ComposerUnreadableBlockSchema)
13843
+ }), object({
13844
+ blocks: array(object({
13845
+ blockId: string(),
13846
+ status: CompositionRunStatusSchema,
13847
+ reason: string().optional()
13848
+ })),
13849
+ /**
13850
+ * False when the composer declared and withdrew NOTHING (store not loaded,
13851
+ * integration unknown, its own rows unread or read empty once). An empty
13852
+ * apply the caller owes is paid off only by one the composer acted on (D49).
13853
+ */
13854
+ acted: boolean()
13855
+ }), {
13856
+ kind: "mutation",
13857
+ auth: "admin"
13858
+ }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
13738
13859
  var NUMBER = {
13739
13860
  kind: "fixed",
13740
13861
  result: ["number"]
@@ -13971,52 +14092,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13971
14092
  auth: "admin",
13972
14093
  access: "view"
13973
14094
  });
13974
- var ComposerBlockSchema = object({
13975
- id: string().min(1),
13976
- name: string().min(1).max(120),
13977
- enabled: boolean(),
13978
- updatedAt: number(),
13979
- composition: CompositionSchema
13980
- });
13981
- /**
13982
- * A stored composition row that no longer PARSES — a schema a release
13983
- * tightened, a row written by a newer build. Sent by id so the composer keeps
13984
- * its device as a placeholder and reports the block `failed` naming the parse
13985
- * error. Leaving it out would read, twice, exactly like a delete (D49).
13986
- */
13987
- var ComposerUnreadableBlockSchema = object({
13988
- id: string().min(1),
13989
- /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13990
- name: string().nullable(),
13991
- /** The parse error, in the operator's words. */
13992
- error: string()
13993
- });
13994
- method(object({
13995
- /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13996
- integrationId: string().nullable(),
13997
- /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13998
- storeLoaded: boolean(),
13999
- blocks: array(ComposerBlockSchema),
14000
- /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
14001
- restartBlockIds: array(string()),
14002
- /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
14003
- unreadableBlocks: array(ComposerUnreadableBlockSchema)
14004
- }), object({
14005
- blocks: array(object({
14006
- blockId: string(),
14007
- status: CompositionRunStatusSchema,
14008
- reason: string().optional()
14009
- })),
14010
- /**
14011
- * False when the composer declared and withdrew NOTHING (store not loaded,
14012
- * integration unknown, its own rows unread or read empty once). An empty
14013
- * apply the caller owes is paid off only by one the composer acted on (D49).
14014
- */
14015
- acted: boolean()
14016
- }), {
14017
- kind: "mutation",
14018
- auth: "admin"
14019
- }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
14020
14095
  /**
14021
14096
  * `custom-model-registry` — collection cap exposing operator-registered
14022
14097
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -15881,6 +15956,121 @@ method(object({
15881
15956
  deviceIds: array(number()).readonly(),
15882
15957
  caps: array(string()).readonly().optional()
15883
15958
  }), record(string(), record(string(), unknown().nullable())));
15959
+ var ExtensionSlotIdSchema = _enum(["linked-devices"]);
15960
+ DeviceType.Camera;
15961
+ /** A slot's editable value, discriminated on `slot`. */
15962
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15963
+ DeviceType.Camera;
15964
+ var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
15965
+ state: literal("unreachable"),
15966
+ reason: string()
15967
+ })]);
15968
+ /** One provider of slots — the D554 source-listing row. */
15969
+ var ExtensionSourceSchema = object({
15970
+ /** The routing prefix of every `slotRef` this provider serves. */
15971
+ source: string(),
15972
+ label: string(),
15973
+ /** Stamped by the dispatcher from the registry (D557). */
15974
+ addonId: string().optional(),
15975
+ availability: ExtensionSourceAvailabilitySchema
15976
+ });
15977
+ /**
15978
+ * How one picked source stands. `missing` — no such device (deleted, or an id
15979
+ * that never existed); `foreign` — a device the slot's owner cannot read from
15980
+ * (a source owned by another addon); `unavailable` — it exists but is not a
15981
+ * valid source now (a container, which is never a pick). A source in any of
15982
+ * these states is SHOWN, never silently dropped or re-pointed.
15983
+ */
15984
+ var ExtensionSourceHealthSchema = _enum([
15985
+ "ok",
15986
+ "missing",
15987
+ "foreign",
15988
+ "unavailable"
15989
+ ]);
15990
+ var ExtensionSlotSourceSchema = object({
15991
+ deviceId: number().int(),
15992
+ /** The device's name, or null when it could not be resolved (`missing`). */
15993
+ name: string().nullable(),
15994
+ health: ExtensionSourceHealthSchema,
15995
+ detail: string().optional()
15996
+ });
15997
+ /**
15998
+ * A DIFFERENT authority that gates whether the slot's sources do anything —
15999
+ * reported read-only, named, never written through this contract (D62) — e.g.
16000
+ * a slot whose sources act only while a wrapper is bound to the host, a
16001
+ * binding that belongs to `deviceManager.setWrapperActive`. No slot reports
16002
+ * one today (`linked-devices` answers `null`). `unknown` means the gate could
16003
+ * not be read; it is not "inactive" (D315).
16004
+ */
16005
+ var ExtensionSlotActivationSchema = object({
16006
+ state: _enum([
16007
+ "active",
16008
+ "inactive",
16009
+ "unknown"
16010
+ ]),
16011
+ authority: string(),
16012
+ detail: string().optional()
16013
+ });
16014
+ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
16015
+ state: literal("ok"),
16016
+ /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
16017
+ slotRef: string(),
16018
+ slot: ExtensionSlotIdSchema,
16019
+ /** Names the store written (D62), e.g. `device-manager:_linkedDeviceIds`. */
16020
+ authority: string(),
16021
+ activation: ExtensionSlotActivationSchema.nullable(),
16022
+ value: ExtensionSlotValueSchema,
16023
+ sources: array(ExtensionSlotSourceSchema),
16024
+ /**
16025
+ * Devices the owner links to the host ON ITS OWN, by structure, and that
16026
+ * are therefore not in `value` (D655): a camera's device-tree children, and
16027
+ * the child a picked container stands for (D356 — a container is never a
16028
+ * pick, its children are). Read-only; the editor shows them and may offer
16029
+ * per-device options on them (the linked-devices tracked-event opt-in).
16030
+ * Absent when the owner links nothing beyond the picks, and from an owner
16031
+ * older than D655.
16032
+ */
16033
+ impliedSources: array(ExtensionSlotSourceSchema).optional()
16034
+ }), object({
16035
+ state: literal("unreachable"),
16036
+ addonId: string(),
16037
+ reason: string()
16038
+ })]);
16039
+ var ExtensionCandidatesSchema = object({ candidates: array(object({
16040
+ deviceId: number().int(),
16041
+ name: string(),
16042
+ type: string(),
16043
+ location: string().nullable(),
16044
+ /** The container a child belongs to — "Spotlight 2" alone does not say which. */
16045
+ parentName: string().nullable(),
16046
+ /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
16047
+ suggested: boolean(),
16048
+ /** Why it is suggested ("same location"), null when it is not. */
16049
+ reason: string().nullable()
16050
+ })) });
16051
+ /**
16052
+ * What a write did. `none` — applied in place. `host` / `parent` — the owner
16053
+ * reloaded the host (or, for an accessory child, its parent) because the
16054
+ * write changed what the host REGISTERS. A slot never adds a capability to its
16055
+ * host — that is a composition (D663) — so today's owners answer `none`.
16056
+ */
16057
+ var ExtensionSetResultSchema = object({
16058
+ applied: literal(true),
16059
+ reload: _enum([
16060
+ "none",
16061
+ "host",
16062
+ "parent"
16063
+ ])
16064
+ });
16065
+ var ExtensionSlotRefInputSchema = object({
16066
+ deviceId: number().int(),
16067
+ slotRef: string().min(1)
16068
+ });
16069
+ var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
16070
+ method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
16071
+ kind: "mutation",
16072
+ auth: "admin"
16073
+ });
15884
16074
  /**
15885
16075
  * Per-field ownership (D663). A composition may CLAIM fields of a native
15886
16076
  * cap's runtime-state slice on an existing device: `replace` overlays the
@@ -18859,17 +19049,25 @@ var NcScheduleSchema = object({
18859
19049
  */
18860
19050
  var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
18861
19051
  /**
19052
+ * How a summary window is SENT (D698): `rule` (absent) = ONE notification with
19053
+ * every section; `section` = one notification per section with something to
19054
+ * say (an unavailable section included), each titled by its section.
19055
+ */
19056
+ var NcStateSummarySplitSchema = _enum(["rule", "section"]);
19057
+ /**
18862
19058
  * `summary`: the rule sends NOTHING per event. When a window of `schedule`
18863
19059
  * CLOSES, it sends one notification with the current state of its kinds
18864
19060
  * (low batteries, consumables to replace, devices offline, updates
18865
- * available, ...), after its own filters. Nothing to report sends nothing.
19061
+ * available, ...), after its own filters — or, with `split: 'section'`
19062
+ * (D698), one notification per section. Nothing to report sends nothing.
18866
19063
  * The schedule is the ordinary `NcSchedule` (weekly windows, IANA timezone,
18867
19064
  * midnight crossing); the send time is each window's END. Refused on the
18868
19065
  * `alarm` family, which stays instant (`systemEventDeliveryProblems`).
18869
19066
  */
18870
19067
  var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
18871
19068
  mode: literal("summary"),
18872
- schedule: NcScheduleSchema
19069
+ schedule: NcScheduleSchema,
19070
+ split: NcStateSummarySplitSchema.optional()
18873
19071
  })]);
18874
19072
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
18875
19073
  var NcPlateMatcherSchema = object({
@@ -19520,10 +19718,12 @@ var NcMediaPolicySchema = object({
19520
19718
  /**
19521
19719
  * Cooldown GRANULARITY over the subject's class — how much a fired
19522
19720
  * notification suppresses.
19523
- * - `shared` (default, and the absent value) — one window for the whole
19524
- * rule/scope: a cat silences the next dog for `cooldownSec`.
19525
- * - `per-class` — an independent window per detected class, so cat→dog fires
19526
- * at once and cat→cat still waits.
19721
+ * - `per-class` (default, and the absent value since 2026-10-01 — D36) — an
19722
+ * independent window per detected class: cat→dog fires at once, cat→cat
19723
+ * still waits.
19724
+ * - `shared` — one window for the whole rule/scope: a cat silences the next
19725
+ * dog for `cooldownSec`. Only written when an operator picks it; it is no
19726
+ * longer what an unset rule means.
19527
19727
  *
19528
19728
  * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
19529
19729
  * must not be swallowed by a bark's window (the precedent this generalizes —
@@ -19538,8 +19738,11 @@ var NcThrottleSchema = object({
19538
19738
  /**
19539
19739
  * Class granularity of the cooldown key. Optional rather than defaulted:
19540
19740
  * a Zod default does NOT run on the addon→addon cap path, so a persisted
19541
- * rule authored before this field simply carries none — and the engine
19542
- * reads absent as `shared`, the pre-existing behaviour.
19741
+ * rule authored before this field simply carries none. The engine used to
19742
+ * read absent as `shared` (D36); since 2026-10-01 it reads absent as
19743
+ * `per-class` — the operator's default — and only an explicit `shared`
19744
+ * still means `shared`. See `cooldownKey` / `keysPerClass` in the rule
19745
+ * engine, and D36's dated note.
19543
19746
  */
19544
19747
  granularity: NcThrottleGranularitySchema.optional()
19545
19748
  });
@@ -19863,11 +20066,23 @@ var NcStateSummaryPreviewSectionSchema = object({
19863
20066
  reason: string().optional()
19864
20067
  });
19865
20068
  /**
20069
+ * One notification a previewed summary would send (D698): the whole summary on
20070
+ * a `rule` split (no `section`), one section's on a `section` split.
20071
+ */
20072
+ var NcStateSummaryPreviewRowSchema = object({
20073
+ section: string().optional(),
20074
+ /** The section's name on a per-section row; every reported section's, joined, on a combined one. */
20075
+ title: string(),
20076
+ text: string(),
20077
+ count: number().int().nonnegative()
20078
+ });
20079
+ /**
19866
20080
  * The summary a rule would send now. `empty` = nothing to report and every
19867
20081
  * section read: such a summary is NOT sent. `dropped` counts the open states
19868
20082
  * the rule's own filters (or a camera mute) left out, by reason.
19869
20083
  * `excludedGroups` names the kind groups selected that have no state to report
19870
- * (backups & exports).
20084
+ * (backups & exports). `split` and `rows` (D698) say how it would be sent —
20085
+ * optional, so an older hub's answer still parses.
19871
20086
  */
19872
20087
  var NcStateSummaryPreviewSchema = object({
19873
20088
  empty: boolean(),
@@ -19875,7 +20090,9 @@ var NcStateSummaryPreviewSchema = object({
19875
20090
  text: string(),
19876
20091
  sections: array(NcStateSummaryPreviewSectionSchema),
19877
20092
  dropped: record(string(), number().int().nonnegative()),
19878
- excludedGroups: array(string())
20093
+ excludedGroups: array(string()),
20094
+ split: NcStateSummarySplitSchema.optional(),
20095
+ rows: array(NcStateSummaryPreviewRowSchema).optional()
19879
20096
  });
19880
20097
  var NcTestResultSchema = object({
19881
20098
  recordId: string(),
@@ -20889,12 +21106,26 @@ var CameraSensorRefSchema = object({
20889
21106
  function cameraSensorRefKey(ref) {
20890
21107
  return `${ref.addonId}/${ref.stableId}`;
20891
21108
  }
20892
- /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
20893
- var CameraSensorsModeSchema = _enum(["in-addition"]);
20894
- var CameraSensorsConfigSchema = object({
20895
- mode: CameraSensorsModeSchema,
20896
- sensors: array(CameraSensorRefSchema).min(1).max(8)
20897
- }).superRefine((value, ctx) => {
21109
+ /**
21110
+ * A sensor's mode (D673). `in-addition`: its motion is the camera's motion too.
21111
+ * `replace`: its motion is the camera's, and while one is READY the camera's
21112
+ * own motion no longer counts on its own. `confirm`: while one is READY the
21113
+ * camera's own motion counts only while a confirm sensor is active — with or
21114
+ * without a replace sensor (spec C2, the controller's ruling on Q1).
21115
+ */
21116
+ var CameraSensorModeSchema = _enum([
21117
+ "in-addition",
21118
+ "confirm",
21119
+ "replace"
21120
+ ]);
21121
+ /** A stored sensor with no mode — every CS-1 row — is in addition. */
21122
+ var DEFAULT_CAMERA_SENSOR_MODE = "in-addition";
21123
+ /**
21124
+ * A camera's attached sensors. A CS-1 row carried an envelope
21125
+ * `mode: 'in-addition'`: `z.object` drops it on parse, and the PARSED value is
21126
+ * what the write stores (D672 rule 3), so it is never written again.
21127
+ */
21128
+ var CameraSensorsConfigSchema = object({ sensors: array(CameraSensorRefSchema.extend({ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE) })).min(1).max(8) }).superRefine((value, ctx) => {
20898
21129
  const seen = /* @__PURE__ */ new Set();
20899
21130
  value.sensors.forEach((ref, index) => {
20900
21131
  const key = cameraSensorRefKey(ref);
@@ -20906,39 +21137,41 @@ var CameraSensorsConfigSchema = object({
20906
21137
  seen.add(key);
20907
21138
  });
20908
21139
  });
20909
- var RefFields = {
21140
+ /** Every attachment names its mode; an older orchestrator that does not is in addition. */
21141
+ var AttachmentFields = {
20910
21142
  addonId: string(),
20911
- stableId: string()
21143
+ stableId: string(),
21144
+ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE)
20912
21145
  };
20913
21146
  var CameraSensorAttachmentSchema = discriminatedUnion("state", [
20914
21147
  object({
20915
- ...RefFields,
21148
+ ...AttachmentFields,
20916
21149
  state: literal("ready"),
20917
21150
  deviceId: number(),
20918
21151
  name: string(),
20919
21152
  caps: array(string()).readonly()
20920
21153
  }),
20921
21154
  object({
20922
- ...RefFields,
21155
+ ...AttachmentFields,
20923
21156
  state: literal("offline"),
20924
21157
  deviceId: number(),
20925
21158
  name: string(),
20926
21159
  reason: _enum(["offline", "disabled"])
20927
21160
  }),
20928
21161
  object({
20929
- ...RefFields,
21162
+ ...AttachmentFields,
20930
21163
  state: literal("missing"),
20931
21164
  reason: string()
20932
21165
  }),
20933
21166
  object({
20934
- ...RefFields,
21167
+ ...AttachmentFields,
20935
21168
  state: literal("unsupported"),
20936
21169
  deviceId: number(),
20937
21170
  name: string(),
20938
21171
  reason: string()
20939
21172
  }),
20940
21173
  object({
20941
- ...RefFields,
21174
+ ...AttachmentFields,
20942
21175
  state: literal("unreadable"),
20943
21176
  reason: string()
20944
21177
  })
@@ -20951,17 +21184,49 @@ var CameraSensorAttachmentSchema = discriminatedUnion("state", [
20951
21184
  * say.
20952
21185
  */
20953
21186
  var CameraSensorsNotForwardedSchema = _enum(["onboard-not-listed", "no-active-detection"]);
21187
+ /** Whether the camera's OWN motion counts on its own (D673 C2), from its READY sensors (C3). */
21188
+ var CameraOwnMotionSchema = _enum([
21189
+ "always",
21190
+ "when-confirmed",
21191
+ "never"
21192
+ ]);
21193
+ /** Confirm / Replace cannot suppress this camera's motion: its provider still emits it directly (D673 C13). */
21194
+ var CameraSensorsNotEnforcedSchema = _enum(["provider-not-split"]);
21195
+ /**
21196
+ * The camera's OWN onboard motion (D696): the raw input the bridge combines,
21197
+ * never the effective value. The camera's `motion` slice is the effective one,
21198
+ * so a view of the camera's own row reads this.
21199
+ * - `atMs`: when the bridge received the camera's last own edge.
21200
+ * - `detected`: evaluated WHEN THE STATUS IS ASKED — the last edge said `true`
21201
+ * AND it is younger than the window the bridge counts the camera's own motion
21202
+ * for (`motionCooldownMs`, floored at two sustain ticks). A camera that never
21203
+ * sends a clear (heartbeats only) therefore reads `false` once no push came
21204
+ * within the window; a status read is a snapshot, so a live view re-asks.
21205
+ * Absent = this orchestrator has not received the camera's own motion since it
21206
+ * started (unknown, never "quiet"), or an orchestrator older than D696.
21207
+ */
21208
+ var CameraRawLevelSchema = object({
21209
+ detected: boolean(),
21210
+ atMs: number()
21211
+ });
20954
21212
  var CameraSensorsStatusSchema = discriminatedUnion("state", [
20955
- object({ state: literal("not-configured") }),
21213
+ object({
21214
+ state: literal("not-configured"),
21215
+ cameraLevel: CameraRawLevelSchema.optional()
21216
+ }),
20956
21217
  object({
20957
21218
  state: literal("unreadable"),
20958
- reason: string()
21219
+ reason: string(),
21220
+ cameraLevel: CameraRawLevelSchema.optional()
20959
21221
  }),
20960
21222
  object({
20961
21223
  state: literal("configured"),
20962
- mode: CameraSensorsModeSchema,
21224
+ cameraLevel: CameraRawLevelSchema.optional(),
20963
21225
  sensors: array(CameraSensorAttachmentSchema).readonly(),
20964
- notForwarded: CameraSensorsNotForwardedSchema.optional()
21226
+ /** Absent = an orchestrator older than CS-2: it does not say (D315). */
21227
+ cameraMotion: CameraOwnMotionSchema.optional(),
21228
+ notForwarded: CameraSensorsNotForwardedSchema.optional(),
21229
+ notEnforced: CameraSensorsNotEnforcedSchema.optional()
20965
21230
  })
20966
21231
  ]);
20967
21232
  Object.freeze({
@@ -24152,8 +24417,10 @@ var RunnerCameraConfigSchema = object({
24152
24417
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
24153
24418
  * analyzer providers) running on decoded frames in this runner.
24154
24419
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
24155
- * analytics). The provider emits ProviderMotion
24156
- * events; the orchestrator forwards to `reportMotion`.
24420
+ * analytics). The provider emits its raw push as `ProviderMotion`
24421
+ * (D673); the orchestrator's camera-sensors bridge re-emits the camera's
24422
+ * effective motion as `MotionOnMotionChanged`, which is what reaches
24423
+ * `reportMotion`.
24157
24424
  */
24158
24425
  motionSources: MotionSourcesSchema.default(["analyzer"]),
24159
24426
  /**
@@ -24330,7 +24597,15 @@ var RunnerLocalLoadSchema = object({
24330
24597
  hasGpu: boolean(),
24331
24598
  inferenceBackend: string().optional(),
24332
24599
  cpuCores: number().optional()
24333
- })
24600
+ }),
24601
+ /**
24602
+ * Who writes a camera's `motion` runtime slice (D696). `'orchestrator'`: this
24603
+ * runner never writes it. ABSENT = a runner older than D696, which still
24604
+ * writes the slice from its phase machine; the orchestrator does not write
24605
+ * while any runner node is absent-or-unanswered, so one slice never has two
24606
+ * writers.
24607
+ */
24608
+ motionSliceWriter: literal("orchestrator").optional()
24334
24609
  });
24335
24610
  /**
24336
24611
  * Aggregate runtime metrics for the runner's whole local pool. Mirrors the
@@ -27354,138 +27629,6 @@ DeviceType.Camera, method(object({
27354
27629
  kind: "query",
27355
27630
  auth: "protected"
27356
27631
  });
27357
- object({
27358
- /** Ms epoch of the last press. null = never observed since this provider started. */
27359
- lastPressedAt: number().nullable(),
27360
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
27361
- pressCountSinceStart: number()
27362
- });
27363
- object({
27364
- deviceId: number(),
27365
- timestamp: number()
27366
- });
27367
- /**
27368
- * The `doorbell-source` extension slot's editable value (D648): the camera's
27369
- * virtual-doorbell trigger devices, exactly what the wrapper's
27370
- * `doorbellSources` persists (as `{ deviceId }` records).
27371
- */
27372
- var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
27373
- DeviceType.Camera;
27374
- DeviceType.Button, DeviceType.Camera;
27375
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
27376
- DeviceType.Camera, DeviceType.Camera;
27377
- /** A slot's editable value, discriminated on `slot`. */
27378
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
27379
- DeviceType.Camera;
27380
- var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
27381
- state: literal("unreachable"),
27382
- reason: string()
27383
- })]);
27384
- /** One provider of slots — the D554 source-listing row. */
27385
- var ExtensionSourceSchema = object({
27386
- /** The routing prefix of every `slotRef` this provider serves. */
27387
- source: string(),
27388
- label: string(),
27389
- /** Stamped by the dispatcher from the registry (D557). */
27390
- addonId: string().optional(),
27391
- availability: ExtensionSourceAvailabilitySchema
27392
- });
27393
- /**
27394
- * How one picked source stands. `missing` — no such device (deleted, or an id
27395
- * that never existed); `foreign` — a device the slot's owner cannot read from
27396
- * (a source owned by another addon); `unavailable` — it exists but is not a
27397
- * valid source now (a container, which is never a pick). A source in any of
27398
- * these states is SHOWN, never silently dropped or re-pointed.
27399
- */
27400
- var ExtensionSourceHealthSchema = _enum([
27401
- "ok",
27402
- "missing",
27403
- "foreign",
27404
- "unavailable"
27405
- ]);
27406
- var ExtensionSlotSourceSchema = object({
27407
- deviceId: number().int(),
27408
- /** The device's name, or null when it could not be resolved (`missing`). */
27409
- name: string().nullable(),
27410
- health: ExtensionSourceHealthSchema,
27411
- detail: string().optional()
27412
- });
27413
- /**
27414
- * A DIFFERENT authority that gates whether the slot's sources do anything —
27415
- * reported read-only, named, never written through this contract (D62). The
27416
- * virtual doorbell's sources ring only while the wrapper is bound to the
27417
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
27418
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
27419
- */
27420
- var ExtensionSlotActivationSchema = object({
27421
- state: _enum([
27422
- "active",
27423
- "inactive",
27424
- "unknown"
27425
- ]),
27426
- authority: string(),
27427
- detail: string().optional()
27428
- });
27429
- var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
27430
- state: literal("ok"),
27431
- /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
27432
- slotRef: string(),
27433
- slot: ExtensionSlotIdSchema,
27434
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
27435
- authority: string(),
27436
- activation: ExtensionSlotActivationSchema.nullable(),
27437
- value: ExtensionSlotValueSchema,
27438
- sources: array(ExtensionSlotSourceSchema),
27439
- /**
27440
- * Devices the owner links to the host ON ITS OWN, by structure, and that
27441
- * are therefore not in `value` (D655): a camera's device-tree children, and
27442
- * the child a picked container stands for (D356 — a container is never a
27443
- * pick, its children are). Read-only; the editor shows them and may offer
27444
- * per-device options on them (the linked-devices tracked-event opt-in).
27445
- * Absent when the owner links nothing beyond the picks, and from an owner
27446
- * older than D655.
27447
- */
27448
- impliedSources: array(ExtensionSlotSourceSchema).optional()
27449
- }), object({
27450
- state: literal("unreachable"),
27451
- addonId: string(),
27452
- reason: string()
27453
- })]);
27454
- var ExtensionCandidatesSchema = object({ candidates: array(object({
27455
- deviceId: number().int(),
27456
- name: string(),
27457
- type: string(),
27458
- location: string().nullable(),
27459
- /** The container a child belongs to — "Spotlight 2" alone does not say which. */
27460
- parentName: string().nullable(),
27461
- /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
27462
- suggested: boolean(),
27463
- /** Why it is suggested ("same location"), null when it is not. */
27464
- reason: string().nullable()
27465
- })) });
27466
- /**
27467
- * What a write did. `none` — applied in place. `host` / `parent` — the owner
27468
- * reloaded the host (or, for an accessory child, its parent) because the
27469
- * write changed what the host REGISTERS. A slot never adds a capability to its
27470
- * host — that is a composition (D663) — so today's owners answer `none`.
27471
- */
27472
- var ExtensionSetResultSchema = object({
27473
- applied: literal(true),
27474
- reload: _enum([
27475
- "none",
27476
- "host",
27477
- "parent"
27478
- ])
27479
- });
27480
- var ExtensionSlotRefInputSchema = object({
27481
- deviceId: number().int(),
27482
- slotRef: string().min(1)
27483
- });
27484
- var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
27485
- method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
27486
- kind: "mutation",
27487
- auth: "admin"
27488
- });
27489
27632
  /**
27490
27633
  * Optional client-side hints sent at session creation to help the provider
27491
27634
  * pick the best native source. All fields optional — a viewer that knows
@@ -29303,6 +29446,17 @@ object({
29303
29446
  deviceId: number(),
29304
29447
  status: DeviceStatusSchema
29305
29448
  });
29449
+ object({
29450
+ /** Ms epoch of the last press. null = never observed since this provider started. */
29451
+ lastPressedAt: number().nullable(),
29452
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
29453
+ pressCountSinceStart: number()
29454
+ });
29455
+ object({
29456
+ deviceId: number(),
29457
+ timestamp: number()
29458
+ });
29459
+ DeviceType.Button, DeviceType.Camera;
29306
29460
  /**
29307
29461
  * Enum-state sensor — a string value picked from a finite option set.
29308
29462
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -30947,9 +31101,9 @@ object({
30947
31101
  /** Ms epoch of the last detected-true observation. Null if never detected. */
30948
31102
  lastDetectedAt: number().nullable(),
30949
31103
  /**
30950
- * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device,
30951
- * `null` while false and on every `Sensor` device (D475) — see that
30952
- * constant's doc for the one-authority rule.
31104
+ * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device (the
31105
+ * orchestrator writes it, D696), `null` while false and on every `Sensor`
31106
+ * device (D475) — see that constant's doc for the one-authority rule.
30953
31107
  *
30954
31108
  * ## Reading this field still arms nothing
30955
31109
  *
@@ -30967,38 +31121,41 @@ object({
30967
31121
  * `addon-export-alexa/src/motion-clear-hold.ts` and
30968
31122
  * `addon-export-hap`'s `RESET_DEBOUNCE_MS` both do.
30969
31123
  *
30970
- * ## Who writes it
30971
- *
30972
- * - **Cameras** — the runner's phase machine, `active → watching` on
30973
- * `cooldown_expired`, which then writes this slice with
30974
- * `detected: false` (`handlePhaseChanged` in
30975
- * `pipeline-runner/index.ts`). It produces the FALLING edge, which
30976
- * matters most for the sources that only ever push a rising one:
30977
- * Reolink emits `MotionOnMotionChanged { detected: true }` and never
30978
- * a false.
30979
- * - **Sensors** (Home Assistant binary sensors, Homematic) — the
30980
- * provider pushes the false itself, from the upstream system's own
30981
- * state change. No phase machine is involved.
30982
- *
30983
- * ### The phase machine is CANONICAL, not sole — and that is a defect
30984
- *
30985
- * An earlier revision of this docblock (mine, 2026-09-12) claimed the
30986
- * phase machine is the sole writer for a camera. It is not.
30987
- * `hikvision-camera.ts:3464` and `amcrest-camera.ts:445` both call
30988
- * `setCapSlice(motionCapability, …)` on their own rising edge, and
30989
- * Hikvision's comment says why: it read THIS docblock, agreed the
30990
- * runner is canonical, and wrote anyway to avoid per-tick churn. So
30991
- * two authorities can disagree about one slice, which this repo
30992
- * forbids, and the doc said otherwise — which is worse than saying
30993
- * nothing, because it reads as verification.
30994
- *
30995
- * This predates D475 and is not fixed there: the fix touches every
30996
- * camera provider. Recorded in D475's Consequences. Do not restore the
30997
- * "sole writer" wording without also removing the other writers.
31124
+ * ## Who writes it (D696)
31125
+ *
31126
+ * - **Cameras** — the orchestrator, and nothing else. It writes the camera's
31127
+ * EFFECTIVE motion (`addon-pipeline-orchestrator`
31128
+ * `camera-sensors/motion-slice.ts`), alongside the effective
31129
+ * `MotionOnMotionChanged` it emits or receives: the camera-sensors bridge
31130
+ * for a split camera, an unsplit emitter's direct event, the analyzer and
31131
+ * device activity, as the camera's `motionSources` counts them. A source
31132
+ * that never sends a clear falls one window after its last `true`.
31133
+ * `lastDetectedAt` moves only on an effective rise. No camera provider
31134
+ * writes this slice (not even a boot seed), and neither does the runner's
31135
+ * phase machine: its phase is "a session is attached" for every on-motion
31136
+ * session, not motion, and it now has its own `DetectionPhaseTransition`.
31137
+ * A provider's `isDetected` answers from the hub's slice.
31138
+ * - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
31139
+ * imports) — the provider pushes both edges itself, from the upstream
31140
+ * system's own state change. That is the sensor's own fact.
31141
+ *
31142
+ * `scripts/check-onboard-motion-emitters.ts` refuses any other writer of a
31143
+ * `motion` slice; each sensor writer is a named exemption.
31144
+ *
31145
+ * This replaces the D475 §4 rule ("the phase machine is the sole writer").
31146
+ * That rule was never true: Hikvision and Amcrest wrote the slice raw beside
31147
+ * it, every provider seeded it at boot, and every session left it
31148
+ * `detected: true` after its detach.
30998
31149
  */
30999
31150
  autoClearAfterMs: number().nullable()
31000
31151
  });
31001
- object({
31152
+ /**
31153
+ * Payload of `motion.onMotionChanged` event + the corresponding bus
31154
+ * event `EventCategory.MotionOnMotionChanged`. Single source of truth
31155
+ * — both the cap event surface and the bus payload type alias to this
31156
+ * schema.
31157
+ */
31158
+ var MotionOnMotionChangedDataSchema = object({
31002
31159
  deviceId: number(),
31003
31160
  detected: boolean(),
31004
31161
  timestamp: number(),
@@ -38585,6 +38742,18 @@ Object.freeze({
38585
38742
  addonId: null,
38586
38743
  access: "view"
38587
38744
  },
38745
+ "databaseSnapshot.listDatabases": {
38746
+ capName: "database-snapshot",
38747
+ capScope: "system",
38748
+ addonId: null,
38749
+ access: "view"
38750
+ },
38751
+ "databaseSnapshot.writeSnapshot": {
38752
+ capName: "database-snapshot",
38753
+ capScope: "system",
38754
+ addonId: null,
38755
+ access: "create"
38756
+ },
38588
38757
  "dataStoreProvider.aggregate": {
38589
38758
  capName: "data-store-provider",
38590
38759
  capScope: "system",
@@ -47113,6 +47282,18 @@ var STATE_SUMMARY_VARS = [
47113
47282
  systemEventKinds: [...SUMMARISABLE],
47114
47283
  systemEventDeliveries: ["summary"]
47115
47284
  },
47285
+ {
47286
+ name: "summarySection",
47287
+ label: "Summary: this section",
47288
+ description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
47289
+ example: "Batterie scariche",
47290
+ group: "system",
47291
+ families: ["rule"],
47292
+ fields: [...RULE_TEXT],
47293
+ kinds: ["system"],
47294
+ systemEventKinds: [...SUMMARISABLE],
47295
+ systemEventDeliveries: ["summary"]
47296
+ },
47116
47297
  ...STATE_SUMMARY_SECTION_VARS.map((v) => ({
47117
47298
  name: v.name,
47118
47299
  label: v.label,
@@ -47451,6 +47632,7 @@ TimelapseRuleInputSchema.extend({
47451
47632
  createdAt: number(),
47452
47633
  updatedAt: number()
47453
47634
  });
47635
+ MotionOnMotionChangedDataSchema.omit({ triggeredBy: true });
47454
47636
  object({
47455
47637
  /**
47456
47638
  * Fraction of the box's own size added on EACH side before cutting.