@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
@@ -570,7 +570,7 @@ async function importScryptedCatalogModel(input, deps) {
570
570
  }
571
571
  }
572
572
  //#endregion
573
- //#region ../types/dist/event-category-C5xZWqz6.mjs
573
+ //#region ../types/dist/event-category-BGmz_oxW.mjs
574
574
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
575
575
  EventCategory["SystemBoot"] = "system.boot";
576
576
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -1103,6 +1103,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
1103
1103
  */
1104
1104
  EventCategory["PipelineAudioInferenceResult"] = "pipeline.audio-inference-result";
1105
1105
  EventCategory["DetectionPhaseTransition"] = "detection.phase-transition";
1106
+ /**
1107
+ * A camera provider's RAW onboard motion push (D673): the `MotionOnMotionChanged`
1108
+ * data shape without `triggeredBy`, built by `providerMotionEvent`. Its one
1109
+ * consumer is the orchestrator's camera-sensors bridge, which re-emits the
1110
+ * camera's EFFECTIVE onboard motion as `MotionOnMotionChanged` (a pass-through
1111
+ * for a camera with no attached sensor). Providers must not emit
1112
+ * `MotionOnMotionChanged` themselves; `scripts/check-onboard-motion-emitters.ts`
1113
+ * keeps it so (camera-grid is a named, deferred exception).
1114
+ */
1106
1115
  EventCategory["ProviderMotion"] = "provider.motion";
1107
1116
  EventCategory["ProviderDetection"] = "provider.detection";
1108
1117
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
@@ -5941,7 +5950,7 @@ var ZodIssueCode = {
5941
5950
  var ZodFirstPartyTypeKind;
5942
5951
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5943
5952
  //#endregion
5944
- //#region ../types/dist/sleep-gU6hqv4_.mjs
5953
+ //#region ../types/dist/sleep-CDCONfkt.mjs
5945
5954
  /**
5946
5955
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5947
5956
  * window to float samples (D455).
@@ -8051,7 +8060,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8051
8060
  return DeviceRole;
8052
8061
  }({});
8053
8062
  //#endregion
8054
- //#region ../types/dist/composition-Dq42XWp0.mjs
8063
+ //#region ../types/dist/composition-43aqsZQj.mjs
8055
8064
  /**
8056
8065
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8057
8066
  *
@@ -8108,13 +8117,12 @@ portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac
8108
8117
  * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
8109
8118
  * valutatore puro del suo FRONTE.
8110
8119
  *
8111
- * Viveva dentro il builtin virtual-doorbell
8112
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
8113
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
8114
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
8115
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
8116
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
8117
- * SPOSTA qui e il doorbell la ri-esporta.
8120
+ * UNA tabella per tutti quelli che chiedono "questo device è ALTO?": il
8121
+ * trigger `RecordingTriggers.sensorDeviceIds` del recorder, i marker dei
8122
+ * sensori della post-analysis, il bridge camera-sensors dell'orchestratore e
8123
+ * le sorgenti di un campanello composto (`doorbellFeatureSources`, D671).
8124
+ * Una seconda copia divergerebbe alla prima cap aggiunta, e il sintomo — "il
8125
+ * sensore fa suonare il campanello ma non registra" — è esattamente D62.
8118
8126
  *
8119
8127
  * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
8120
8128
  * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
@@ -9849,7 +9857,7 @@ var RecordingTriggersSchema = object({
9849
9857
  *
9850
9858
  * Cosa vuol dire "alto" dipende dal TIPO di device e non è deciso qui:
9851
9859
  * `SOURCE_CAP_ACTIVE_FIELD` (`catalogs/sensor-active-state.ts`) è LA tabella,
9852
- * la stessa che il virtual-doorbell usa dal 2026-08-05. Ed è il FRONTE, non
9860
+ * la stessa del campanello composto (D671). Ed è il FRONTE, non
9853
9861
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
9854
9862
  * registrare.
9855
9863
  */
@@ -12222,6 +12230,68 @@ method(object({
12222
12230
  password: string()
12223
12231
  }), AuthResultSchema.nullable(), { kind: "mutation" }), method(object({ state: string() }), string()), method(record(string(), string()), AuthResultSchema, { kind: "mutation" }), method(object({ token: string() }), AuthResultSchema.nullable());
12224
12232
  /**
12233
+ * How long one snapshot may take end to end: the pinned copy of the whole
12234
+ * database plus `PRAGMA integrity_check` over the copy, on the hub's slowest
12235
+ * disk. ~800 MB at a pessimistic 10 MB/s is under 3 minutes; the bound is
12236
+ * generous because a timeout fails the whole backup run.
12237
+ */
12238
+ var DATABASE_SNAPSHOT_TIMEOUT_MS = 30 * 6e4;
12239
+ /**
12240
+ * The databases an owner snapshots — declared by the OWNER, so a caller never
12241
+ * guesses which file is live from what sits beside it (a cleanly closed
12242
+ * database has no sidecars and is just as owned). Paths are absolute on the
12243
+ * owner's host.
12244
+ */
12245
+ var DatabaseSnapshotTargetsSchema = object({ databases: array(object({ livePath: string() })) });
12246
+ /** One b-tree table of the snapshot and the rows it holds. */
12247
+ var DatabaseSnapshotTableSchema = object({
12248
+ name: string(),
12249
+ rows: number().int().nonnegative()
12250
+ });
12251
+ /**
12252
+ * What the owner wrote. Every path is ABSOLUTE on the owner's host — the
12253
+ * caller pins the call to its own node, so it can read the file; a caller
12254
+ * that finds the path outside its own data root refuses it rather than
12255
+ * archiving something it cannot place.
12256
+ */
12257
+ var DatabaseSnapshotResultSchema = object({
12258
+ /** The live database the snapshot copies. Never to be copied as a file. */
12259
+ livePath: string(),
12260
+ /** The verified copy: `<livePath>` + {@link DATABASE_SNAPSHOT_SUFFIX}. */
12261
+ snapshotPath: string(),
12262
+ sizeBytes: number().int().nonnegative(),
12263
+ pageCount: number().int().nonnegative(),
12264
+ pageSize: number().int().positive(),
12265
+ /**
12266
+ * Every b-tree table with its row count. Read inside the SAME read
12267
+ * transaction the copy was taken from, and found EQUAL on the copy — so
12268
+ * this is the content of the snapshot, not an estimate of the source.
12269
+ */
12270
+ tables: array(DatabaseSnapshotTableSchema),
12271
+ /** Wall time of the pinned copy (row counts included). */
12272
+ copyMs: number().nonnegative(),
12273
+ /** Wall time of the checks on the copy (`integrity_check`, row counts). */
12274
+ verifyMs: number().nonnegative(),
12275
+ /** When the pinned read transaction began (ms epoch) — the snapshot's instant. */
12276
+ takenAt: number()
12277
+ });
12278
+ /**
12279
+ * A snapshot as an ARCHIVE records it (`ArchiveManifest.sqliteSnapshots`):
12280
+ * the same facts, with both paths relative to the archive root (the node's
12281
+ * data dir), because an archive outlives the host that made it.
12282
+ */
12283
+ var ArchiveSqliteSnapshotSchema = DatabaseSnapshotResultSchema.extend({
12284
+ /** Archive-relative path of the live database the archive does NOT carry. */
12285
+ livePath: string(),
12286
+ /** Archive-relative path of the verified copy it carries in its place. */
12287
+ snapshotPath: string()
12288
+ });
12289
+ method(object({}), DatabaseSnapshotTargetsSchema, { auth: "admin" }), method(object({}), DatabaseSnapshotResultSchema, {
12290
+ kind: "mutation",
12291
+ auth: "admin",
12292
+ timeoutMs: DATABASE_SNAPSHOT_TIMEOUT_MS
12293
+ });
12294
+ /**
12225
12295
  * Orchestrator-side destination metadata. The orchestrator computes
12226
12296
  * `id = <addonId>:<subId>` from its provider lookup so consumers
12227
12297
  * (admin UI, restore flow) see one canonical key.
@@ -12332,7 +12402,12 @@ var ArchiveManifestSchema = object({
12332
12402
  locations: array(string()),
12333
12403
  entries: array(ArchiveEntrySchema),
12334
12404
  totalBytes: number(),
12335
- totalFiles: number()
12405
+ totalFiles: number(),
12406
+ /**
12407
+ * Live SQLite databases this archive carries as their OWNER's verified
12408
+ * snapshot instead of as files (D693). Absent on archives made before.
12409
+ */
12410
+ sqliteSnapshots: array(ArchiveSqliteSnapshotSchema).optional()
12336
12411
  });
12337
12412
  var LocationStatSchema = object({
12338
12413
  name: string(),
@@ -13756,6 +13831,52 @@ var CompositionBlockStateSchema = object({
13756
13831
  reason: string().optional(),
13757
13832
  fields: array(CompositionFieldStateSchema)
13758
13833
  });
13834
+ var ComposerBlockSchema = object({
13835
+ id: string().min(1),
13836
+ name: string().min(1).max(120),
13837
+ enabled: boolean(),
13838
+ updatedAt: number(),
13839
+ composition: CompositionSchema
13840
+ });
13841
+ /**
13842
+ * A stored composition row that no longer PARSES — a schema a release
13843
+ * tightened, a row written by a newer build. Sent by id so the composer keeps
13844
+ * its device as a placeholder and reports the block `failed` naming the parse
13845
+ * error. Leaving it out would read, twice, exactly like a delete (D49).
13846
+ */
13847
+ var ComposerUnreadableBlockSchema = object({
13848
+ id: string().min(1),
13849
+ /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
13850
+ name: string().nullable(),
13851
+ /** The parse error, in the operator's words. */
13852
+ error: string()
13853
+ });
13854
+ method(object({
13855
+ /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
13856
+ integrationId: string().nullable(),
13857
+ /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
13858
+ storeLoaded: boolean(),
13859
+ blocks: array(ComposerBlockSchema),
13860
+ /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
13861
+ restartBlockIds: array(string()),
13862
+ /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
13863
+ unreadableBlocks: array(ComposerUnreadableBlockSchema)
13864
+ }), object({
13865
+ blocks: array(object({
13866
+ blockId: string(),
13867
+ status: CompositionRunStatusSchema,
13868
+ reason: string().optional()
13869
+ })),
13870
+ /**
13871
+ * False when the composer declared and withdrew NOTHING (store not loaded,
13872
+ * integration unknown, its own rows unread or read empty once). An empty
13873
+ * apply the caller owes is paid off only by one the composer acted on (D49).
13874
+ */
13875
+ acted: boolean()
13876
+ }), {
13877
+ kind: "mutation",
13878
+ auth: "admin"
13879
+ }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
13759
13880
  var NUMBER = {
13760
13881
  kind: "fixed",
13761
13882
  result: ["number"]
@@ -13992,52 +14113,6 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
13992
14113
  auth: "admin",
13993
14114
  access: "view"
13994
14115
  });
13995
- var ComposerBlockSchema = object({
13996
- id: string().min(1),
13997
- name: string().min(1).max(120),
13998
- enabled: boolean(),
13999
- updatedAt: number(),
14000
- composition: CompositionSchema
14001
- });
14002
- /**
14003
- * A stored composition row that no longer PARSES — a schema a release
14004
- * tightened, a row written by a newer build. Sent by id so the composer keeps
14005
- * its device as a placeholder and reports the block `failed` naming the parse
14006
- * error. Leaving it out would read, twice, exactly like a delete (D49).
14007
- */
14008
- var ComposerUnreadableBlockSchema = object({
14009
- id: string().min(1),
14010
- /** The row's stored name column; null when even that is unreadable (the device keeps the name it has). */
14011
- name: string().nullable(),
14012
- /** The parse error, in the operator's words. */
14013
- error: string()
14014
- });
14015
- method(object({
14016
- /** The shared Blocks integration; null until `core-blocks` has reconciled it. */
14017
- integrationId: string().nullable(),
14018
- /** False when the `core_blocks` read failed: then nothing may be withdrawn (D49). */
14019
- storeLoaded: boolean(),
14020
- blocks: array(ComposerBlockSchema),
14021
- /** Operator restarts: rebuild these runtimes and re-resolve their sources. Stores nothing (D62). */
14022
- restartBlockIds: array(string()),
14023
- /** Composition rows that exist but do not parse: held, never withdrawn, reported failed. */
14024
- unreadableBlocks: array(ComposerUnreadableBlockSchema)
14025
- }), object({
14026
- blocks: array(object({
14027
- blockId: string(),
14028
- status: CompositionRunStatusSchema,
14029
- reason: string().optional()
14030
- })),
14031
- /**
14032
- * False when the composer declared and withdrew NOTHING (store not loaded,
14033
- * integration unknown, its own rows unread or read empty once). An empty
14034
- * apply the caller owes is paid off only by one the composer acted on (D49).
14035
- */
14036
- acted: boolean()
14037
- }), {
14038
- kind: "mutation",
14039
- auth: "admin"
14040
- }), method(object({ blockIds: array(string()) }), object({ states: array(CompositionBlockStateSchema) }), { auth: "admin" });
14041
14116
  /**
14042
14117
  * `custom-model-registry` — collection cap exposing operator-registered
14043
14118
  * custom detection models. Each provider (today: `addon-model-studio`)
@@ -15902,6 +15977,121 @@ method(object({
15902
15977
  deviceIds: array(number()).readonly(),
15903
15978
  caps: array(string()).readonly().optional()
15904
15979
  }), record(string(), record(string(), unknown().nullable())));
15980
+ var ExtensionSlotIdSchema = _enum(["linked-devices"]);
15981
+ DeviceType.Camera;
15982
+ /** A slot's editable value, discriminated on `slot`. */
15983
+ var ExtensionSlotValueSchema = discriminatedUnion("slot", [LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
15984
+ DeviceType.Camera;
15985
+ var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
15986
+ state: literal("unreachable"),
15987
+ reason: string()
15988
+ })]);
15989
+ /** One provider of slots — the D554 source-listing row. */
15990
+ var ExtensionSourceSchema = object({
15991
+ /** The routing prefix of every `slotRef` this provider serves. */
15992
+ source: string(),
15993
+ label: string(),
15994
+ /** Stamped by the dispatcher from the registry (D557). */
15995
+ addonId: string().optional(),
15996
+ availability: ExtensionSourceAvailabilitySchema
15997
+ });
15998
+ /**
15999
+ * How one picked source stands. `missing` — no such device (deleted, or an id
16000
+ * that never existed); `foreign` — a device the slot's owner cannot read from
16001
+ * (a source owned by another addon); `unavailable` — it exists but is not a
16002
+ * valid source now (a container, which is never a pick). A source in any of
16003
+ * these states is SHOWN, never silently dropped or re-pointed.
16004
+ */
16005
+ var ExtensionSourceHealthSchema = _enum([
16006
+ "ok",
16007
+ "missing",
16008
+ "foreign",
16009
+ "unavailable"
16010
+ ]);
16011
+ var ExtensionSlotSourceSchema = object({
16012
+ deviceId: number().int(),
16013
+ /** The device's name, or null when it could not be resolved (`missing`). */
16014
+ name: string().nullable(),
16015
+ health: ExtensionSourceHealthSchema,
16016
+ detail: string().optional()
16017
+ });
16018
+ /**
16019
+ * A DIFFERENT authority that gates whether the slot's sources do anything —
16020
+ * reported read-only, named, never written through this contract (D62) — e.g.
16021
+ * a slot whose sources act only while a wrapper is bound to the host, a
16022
+ * binding that belongs to `deviceManager.setWrapperActive`. No slot reports
16023
+ * one today (`linked-devices` answers `null`). `unknown` means the gate could
16024
+ * not be read; it is not "inactive" (D315).
16025
+ */
16026
+ var ExtensionSlotActivationSchema = object({
16027
+ state: _enum([
16028
+ "active",
16029
+ "inactive",
16030
+ "unknown"
16031
+ ]),
16032
+ authority: string(),
16033
+ detail: string().optional()
16034
+ });
16035
+ var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
16036
+ state: literal("ok"),
16037
+ /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
16038
+ slotRef: string(),
16039
+ slot: ExtensionSlotIdSchema,
16040
+ /** Names the store written (D62), e.g. `device-manager:_linkedDeviceIds`. */
16041
+ authority: string(),
16042
+ activation: ExtensionSlotActivationSchema.nullable(),
16043
+ value: ExtensionSlotValueSchema,
16044
+ sources: array(ExtensionSlotSourceSchema),
16045
+ /**
16046
+ * Devices the owner links to the host ON ITS OWN, by structure, and that
16047
+ * are therefore not in `value` (D655): a camera's device-tree children, and
16048
+ * the child a picked container stands for (D356 — a container is never a
16049
+ * pick, its children are). Read-only; the editor shows them and may offer
16050
+ * per-device options on them (the linked-devices tracked-event opt-in).
16051
+ * Absent when the owner links nothing beyond the picks, and from an owner
16052
+ * older than D655.
16053
+ */
16054
+ impliedSources: array(ExtensionSlotSourceSchema).optional()
16055
+ }), object({
16056
+ state: literal("unreachable"),
16057
+ addonId: string(),
16058
+ reason: string()
16059
+ })]);
16060
+ var ExtensionCandidatesSchema = object({ candidates: array(object({
16061
+ deviceId: number().int(),
16062
+ name: string(),
16063
+ type: string(),
16064
+ location: string().nullable(),
16065
+ /** The container a child belongs to — "Spotlight 2" alone does not say which. */
16066
+ parentName: string().nullable(),
16067
+ /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
16068
+ suggested: boolean(),
16069
+ /** Why it is suggested ("same location"), null when it is not. */
16070
+ reason: string().nullable()
16071
+ })) });
16072
+ /**
16073
+ * What a write did. `none` — applied in place. `host` / `parent` — the owner
16074
+ * reloaded the host (or, for an accessory child, its parent) because the
16075
+ * write changed what the host REGISTERS. A slot never adds a capability to its
16076
+ * host — that is a composition (D663) — so today's owners answer `none`.
16077
+ */
16078
+ var ExtensionSetResultSchema = object({
16079
+ applied: literal(true),
16080
+ reload: _enum([
16081
+ "none",
16082
+ "host",
16083
+ "parent"
16084
+ ])
16085
+ });
16086
+ var ExtensionSlotRefInputSchema = object({
16087
+ deviceId: number().int(),
16088
+ slotRef: string().min(1)
16089
+ });
16090
+ var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
16091
+ method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
16092
+ kind: "mutation",
16093
+ auth: "admin"
16094
+ });
15905
16095
  /**
15906
16096
  * Per-field ownership (D663). A composition may CLAIM fields of a native
15907
16097
  * cap's runtime-state slice on an existing device: `replace` overlays the
@@ -18880,17 +19070,25 @@ var NcScheduleSchema = object({
18880
19070
  */
18881
19071
  var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
18882
19072
  /**
19073
+ * How a summary window is SENT (D698): `rule` (absent) = ONE notification with
19074
+ * every section; `section` = one notification per section with something to
19075
+ * say (an unavailable section included), each titled by its section.
19076
+ */
19077
+ var NcStateSummarySplitSchema = _enum(["rule", "section"]);
19078
+ /**
18883
19079
  * `summary`: the rule sends NOTHING per event. When a window of `schedule`
18884
19080
  * CLOSES, it sends one notification with the current state of its kinds
18885
19081
  * (low batteries, consumables to replace, devices offline, updates
18886
- * available, ...), after its own filters. Nothing to report sends nothing.
19082
+ * available, ...), after its own filters — or, with `split: 'section'`
19083
+ * (D698), one notification per section. Nothing to report sends nothing.
18887
19084
  * The schedule is the ordinary `NcSchedule` (weekly windows, IANA timezone,
18888
19085
  * midnight crossing); the send time is each window's END. Refused on the
18889
19086
  * `alarm` family, which stays instant (`systemEventDeliveryProblems`).
18890
19087
  */
18891
19088
  var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
18892
19089
  mode: literal("summary"),
18893
- schedule: NcScheduleSchema
19090
+ schedule: NcScheduleSchema,
19091
+ split: NcStateSummarySplitSchema.optional()
18894
19092
  })]);
18895
19093
  /** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
18896
19094
  var NcPlateMatcherSchema = object({
@@ -19541,10 +19739,12 @@ var NcMediaPolicySchema = object({
19541
19739
  /**
19542
19740
  * Cooldown GRANULARITY over the subject's class — how much a fired
19543
19741
  * notification suppresses.
19544
- * - `shared` (default, and the absent value) — one window for the whole
19545
- * rule/scope: a cat silences the next dog for `cooldownSec`.
19546
- * - `per-class` — an independent window per detected class, so cat→dog fires
19547
- * at once and cat→cat still waits.
19742
+ * - `per-class` (default, and the absent value since 2026-10-01 — D36) — an
19743
+ * independent window per detected class: cat→dog fires at once, cat→cat
19744
+ * still waits.
19745
+ * - `shared` — one window for the whole rule/scope: a cat silences the next
19746
+ * dog for `cooldownSec`. Only written when an operator picks it; it is no
19747
+ * longer what an unset rule means.
19548
19748
  *
19549
19749
  * AUDIO subjects are ALWAYS per-class regardless of this setting: a scream
19550
19750
  * must not be swallowed by a bark's window (the precedent this generalizes —
@@ -19559,8 +19759,11 @@ var NcThrottleSchema = object({
19559
19759
  /**
19560
19760
  * Class granularity of the cooldown key. Optional rather than defaulted:
19561
19761
  * a Zod default does NOT run on the addon→addon cap path, so a persisted
19562
- * rule authored before this field simply carries none — and the engine
19563
- * reads absent as `shared`, the pre-existing behaviour.
19762
+ * rule authored before this field simply carries none. The engine used to
19763
+ * read absent as `shared` (D36); since 2026-10-01 it reads absent as
19764
+ * `per-class` — the operator's default — and only an explicit `shared`
19765
+ * still means `shared`. See `cooldownKey` / `keysPerClass` in the rule
19766
+ * engine, and D36's dated note.
19564
19767
  */
19565
19768
  granularity: NcThrottleGranularitySchema.optional()
19566
19769
  });
@@ -19884,11 +20087,23 @@ var NcStateSummaryPreviewSectionSchema = object({
19884
20087
  reason: string().optional()
19885
20088
  });
19886
20089
  /**
20090
+ * One notification a previewed summary would send (D698): the whole summary on
20091
+ * a `rule` split (no `section`), one section's on a `section` split.
20092
+ */
20093
+ var NcStateSummaryPreviewRowSchema = object({
20094
+ section: string().optional(),
20095
+ /** The section's name on a per-section row; every reported section's, joined, on a combined one. */
20096
+ title: string(),
20097
+ text: string(),
20098
+ count: number().int().nonnegative()
20099
+ });
20100
+ /**
19887
20101
  * The summary a rule would send now. `empty` = nothing to report and every
19888
20102
  * section read: such a summary is NOT sent. `dropped` counts the open states
19889
20103
  * the rule's own filters (or a camera mute) left out, by reason.
19890
20104
  * `excludedGroups` names the kind groups selected that have no state to report
19891
- * (backups & exports).
20105
+ * (backups & exports). `split` and `rows` (D698) say how it would be sent —
20106
+ * optional, so an older hub's answer still parses.
19892
20107
  */
19893
20108
  var NcStateSummaryPreviewSchema = object({
19894
20109
  empty: boolean(),
@@ -19896,7 +20111,9 @@ var NcStateSummaryPreviewSchema = object({
19896
20111
  text: string(),
19897
20112
  sections: array(NcStateSummaryPreviewSectionSchema),
19898
20113
  dropped: record(string(), number().int().nonnegative()),
19899
- excludedGroups: array(string())
20114
+ excludedGroups: array(string()),
20115
+ split: NcStateSummarySplitSchema.optional(),
20116
+ rows: array(NcStateSummaryPreviewRowSchema).optional()
19900
20117
  });
19901
20118
  var NcTestResultSchema = object({
19902
20119
  recordId: string(),
@@ -20910,12 +21127,26 @@ var CameraSensorRefSchema = object({
20910
21127
  function cameraSensorRefKey(ref) {
20911
21128
  return `${ref.addonId}/${ref.stableId}`;
20912
21129
  }
20913
- /** CS-1 accepts exactly one mode; CS-2 (D673) widens it to confirm / replace. */
20914
- var CameraSensorsModeSchema = _enum(["in-addition"]);
20915
- var CameraSensorsConfigSchema = object({
20916
- mode: CameraSensorsModeSchema,
20917
- sensors: array(CameraSensorRefSchema).min(1).max(8)
20918
- }).superRefine((value, ctx) => {
21130
+ /**
21131
+ * A sensor's mode (D673). `in-addition`: its motion is the camera's motion too.
21132
+ * `replace`: its motion is the camera's, and while one is READY the camera's
21133
+ * own motion no longer counts on its own. `confirm`: while one is READY the
21134
+ * camera's own motion counts only while a confirm sensor is active — with or
21135
+ * without a replace sensor (spec C2, the controller's ruling on Q1).
21136
+ */
21137
+ var CameraSensorModeSchema = _enum([
21138
+ "in-addition",
21139
+ "confirm",
21140
+ "replace"
21141
+ ]);
21142
+ /** A stored sensor with no mode — every CS-1 row — is in addition. */
21143
+ var DEFAULT_CAMERA_SENSOR_MODE = "in-addition";
21144
+ /**
21145
+ * A camera's attached sensors. A CS-1 row carried an envelope
21146
+ * `mode: 'in-addition'`: `z.object` drops it on parse, and the PARSED value is
21147
+ * what the write stores (D672 rule 3), so it is never written again.
21148
+ */
21149
+ var CameraSensorsConfigSchema = object({ sensors: array(CameraSensorRefSchema.extend({ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE) })).min(1).max(8) }).superRefine((value, ctx) => {
20919
21150
  const seen = /* @__PURE__ */ new Set();
20920
21151
  value.sensors.forEach((ref, index) => {
20921
21152
  const key = cameraSensorRefKey(ref);
@@ -20927,39 +21158,41 @@ var CameraSensorsConfigSchema = object({
20927
21158
  seen.add(key);
20928
21159
  });
20929
21160
  });
20930
- var RefFields = {
21161
+ /** Every attachment names its mode; an older orchestrator that does not is in addition. */
21162
+ var AttachmentFields = {
20931
21163
  addonId: string(),
20932
- stableId: string()
21164
+ stableId: string(),
21165
+ mode: CameraSensorModeSchema.default(DEFAULT_CAMERA_SENSOR_MODE)
20933
21166
  };
20934
21167
  var CameraSensorAttachmentSchema = discriminatedUnion("state", [
20935
21168
  object({
20936
- ...RefFields,
21169
+ ...AttachmentFields,
20937
21170
  state: literal("ready"),
20938
21171
  deviceId: number(),
20939
21172
  name: string(),
20940
21173
  caps: array(string()).readonly()
20941
21174
  }),
20942
21175
  object({
20943
- ...RefFields,
21176
+ ...AttachmentFields,
20944
21177
  state: literal("offline"),
20945
21178
  deviceId: number(),
20946
21179
  name: string(),
20947
21180
  reason: _enum(["offline", "disabled"])
20948
21181
  }),
20949
21182
  object({
20950
- ...RefFields,
21183
+ ...AttachmentFields,
20951
21184
  state: literal("missing"),
20952
21185
  reason: string()
20953
21186
  }),
20954
21187
  object({
20955
- ...RefFields,
21188
+ ...AttachmentFields,
20956
21189
  state: literal("unsupported"),
20957
21190
  deviceId: number(),
20958
21191
  name: string(),
20959
21192
  reason: string()
20960
21193
  }),
20961
21194
  object({
20962
- ...RefFields,
21195
+ ...AttachmentFields,
20963
21196
  state: literal("unreadable"),
20964
21197
  reason: string()
20965
21198
  })
@@ -20972,17 +21205,49 @@ var CameraSensorAttachmentSchema = discriminatedUnion("state", [
20972
21205
  * say.
20973
21206
  */
20974
21207
  var CameraSensorsNotForwardedSchema = _enum(["onboard-not-listed", "no-active-detection"]);
21208
+ /** Whether the camera's OWN motion counts on its own (D673 C2), from its READY sensors (C3). */
21209
+ var CameraOwnMotionSchema = _enum([
21210
+ "always",
21211
+ "when-confirmed",
21212
+ "never"
21213
+ ]);
21214
+ /** Confirm / Replace cannot suppress this camera's motion: its provider still emits it directly (D673 C13). */
21215
+ var CameraSensorsNotEnforcedSchema = _enum(["provider-not-split"]);
21216
+ /**
21217
+ * The camera's OWN onboard motion (D696): the raw input the bridge combines,
21218
+ * never the effective value. The camera's `motion` slice is the effective one,
21219
+ * so a view of the camera's own row reads this.
21220
+ * - `atMs`: when the bridge received the camera's last own edge.
21221
+ * - `detected`: evaluated WHEN THE STATUS IS ASKED — the last edge said `true`
21222
+ * AND it is younger than the window the bridge counts the camera's own motion
21223
+ * for (`motionCooldownMs`, floored at two sustain ticks). A camera that never
21224
+ * sends a clear (heartbeats only) therefore reads `false` once no push came
21225
+ * within the window; a status read is a snapshot, so a live view re-asks.
21226
+ * Absent = this orchestrator has not received the camera's own motion since it
21227
+ * started (unknown, never "quiet"), or an orchestrator older than D696.
21228
+ */
21229
+ var CameraRawLevelSchema = object({
21230
+ detected: boolean(),
21231
+ atMs: number()
21232
+ });
20975
21233
  var CameraSensorsStatusSchema = discriminatedUnion("state", [
20976
- object({ state: literal("not-configured") }),
21234
+ object({
21235
+ state: literal("not-configured"),
21236
+ cameraLevel: CameraRawLevelSchema.optional()
21237
+ }),
20977
21238
  object({
20978
21239
  state: literal("unreadable"),
20979
- reason: string()
21240
+ reason: string(),
21241
+ cameraLevel: CameraRawLevelSchema.optional()
20980
21242
  }),
20981
21243
  object({
20982
21244
  state: literal("configured"),
20983
- mode: CameraSensorsModeSchema,
21245
+ cameraLevel: CameraRawLevelSchema.optional(),
20984
21246
  sensors: array(CameraSensorAttachmentSchema).readonly(),
20985
- notForwarded: CameraSensorsNotForwardedSchema.optional()
21247
+ /** Absent = an orchestrator older than CS-2: it does not say (D315). */
21248
+ cameraMotion: CameraOwnMotionSchema.optional(),
21249
+ notForwarded: CameraSensorsNotForwardedSchema.optional(),
21250
+ notEnforced: CameraSensorsNotEnforcedSchema.optional()
20986
21251
  })
20987
21252
  ]);
20988
21253
  Object.freeze({
@@ -24173,8 +24438,10 @@ var RunnerCameraConfigSchema = object({
24173
24438
  * - `analyzer`: ML/frame-diff motion detection (motion-wasm or other
24174
24439
  * analyzer providers) running on decoded frames in this runner.
24175
24440
  * - `onboard`: camera-native motion pushes (Reolink Baichuan, ONVIF
24176
- * analytics). The provider emits ProviderMotion
24177
- * events; the orchestrator forwards to `reportMotion`.
24441
+ * analytics). The provider emits its raw push as `ProviderMotion`
24442
+ * (D673); the orchestrator's camera-sensors bridge re-emits the camera's
24443
+ * effective motion as `MotionOnMotionChanged`, which is what reaches
24444
+ * `reportMotion`.
24178
24445
  */
24179
24446
  motionSources: MotionSourcesSchema.default(["analyzer"]),
24180
24447
  /**
@@ -24351,7 +24618,15 @@ var RunnerLocalLoadSchema = object({
24351
24618
  hasGpu: boolean(),
24352
24619
  inferenceBackend: string().optional(),
24353
24620
  cpuCores: number().optional()
24354
- })
24621
+ }),
24622
+ /**
24623
+ * Who writes a camera's `motion` runtime slice (D696). `'orchestrator'`: this
24624
+ * runner never writes it. ABSENT = a runner older than D696, which still
24625
+ * writes the slice from its phase machine; the orchestrator does not write
24626
+ * while any runner node is absent-or-unanswered, so one slice never has two
24627
+ * writers.
24628
+ */
24629
+ motionSliceWriter: literal("orchestrator").optional()
24355
24630
  });
24356
24631
  /**
24357
24632
  * Aggregate runtime metrics for the runner's whole local pool. Mirrors the
@@ -27375,138 +27650,6 @@ DeviceType.Camera, method(object({
27375
27650
  kind: "query",
27376
27651
  auth: "protected"
27377
27652
  });
27378
- object({
27379
- /** Ms epoch of the last press. null = never observed since this provider started. */
27380
- lastPressedAt: number().nullable(),
27381
- /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
27382
- pressCountSinceStart: number()
27383
- });
27384
- object({
27385
- deviceId: number(),
27386
- timestamp: number()
27387
- });
27388
- /**
27389
- * The `doorbell-source` extension slot's editable value (D648): the camera's
27390
- * virtual-doorbell trigger devices, exactly what the wrapper's
27391
- * `doorbellSources` persists (as `{ deviceId }` records).
27392
- */
27393
- var DoorbellSourceSlotValueSchema = object({ deviceIds: array(number().int().positive()) });
27394
- DeviceType.Camera;
27395
- DeviceType.Button, DeviceType.Camera;
27396
- var ExtensionSlotIdSchema = _enum(["doorbell-source", "linked-devices"]);
27397
- DeviceType.Camera, DeviceType.Camera;
27398
- /** A slot's editable value, discriminated on `slot`. */
27399
- var ExtensionSlotValueSchema = discriminatedUnion("slot", [DoorbellSourceSlotValueSchema.extend({ slot: literal("doorbell-source") }), LinkedDevicesSlotValueSchema.extend({ slot: literal("linked-devices") })]);
27400
- DeviceType.Camera;
27401
- var ExtensionSourceAvailabilitySchema = discriminatedUnion("state", [object({ state: literal("ok") }), object({
27402
- state: literal("unreachable"),
27403
- reason: string()
27404
- })]);
27405
- /** One provider of slots — the D554 source-listing row. */
27406
- var ExtensionSourceSchema = object({
27407
- /** The routing prefix of every `slotRef` this provider serves. */
27408
- source: string(),
27409
- label: string(),
27410
- /** Stamped by the dispatcher from the registry (D557). */
27411
- addonId: string().optional(),
27412
- availability: ExtensionSourceAvailabilitySchema
27413
- });
27414
- /**
27415
- * How one picked source stands. `missing` — no such device (deleted, or an id
27416
- * that never existed); `foreign` — a device the slot's owner cannot read from
27417
- * (a source owned by another addon); `unavailable` — it exists but is not a
27418
- * valid source now (a container, which is never a pick). A source in any of
27419
- * these states is SHOWN, never silently dropped or re-pointed.
27420
- */
27421
- var ExtensionSourceHealthSchema = _enum([
27422
- "ok",
27423
- "missing",
27424
- "foreign",
27425
- "unavailable"
27426
- ]);
27427
- var ExtensionSlotSourceSchema = object({
27428
- deviceId: number().int(),
27429
- /** The device's name, or null when it could not be resolved (`missing`). */
27430
- name: string().nullable(),
27431
- health: ExtensionSourceHealthSchema,
27432
- detail: string().optional()
27433
- });
27434
- /**
27435
- * A DIFFERENT authority that gates whether the slot's sources do anything —
27436
- * reported read-only, named, never written through this contract (D62). The
27437
- * virtual doorbell's sources ring only while the wrapper is bound to the
27438
- * camera, and that binding belongs to `deviceManager.setWrapperActive`.
27439
- * `unknown` means the gate could not be read; it is not "inactive" (D315).
27440
- */
27441
- var ExtensionSlotActivationSchema = object({
27442
- state: _enum([
27443
- "active",
27444
- "inactive",
27445
- "unknown"
27446
- ]),
27447
- authority: string(),
27448
- detail: string().optional()
27449
- });
27450
- var ExtensionSlotRowSchema = discriminatedUnion("state", [object({
27451
- state: literal("ok"),
27452
- /** `<source>:<slotId>` — the routing key for `listCandidates` / `setSlot`. */
27453
- slotRef: string(),
27454
- slot: ExtensionSlotIdSchema,
27455
- /** Names the store written (D62), e.g. `virtual-doorbell:doorbellSources`. */
27456
- authority: string(),
27457
- activation: ExtensionSlotActivationSchema.nullable(),
27458
- value: ExtensionSlotValueSchema,
27459
- sources: array(ExtensionSlotSourceSchema),
27460
- /**
27461
- * Devices the owner links to the host ON ITS OWN, by structure, and that
27462
- * are therefore not in `value` (D655): a camera's device-tree children, and
27463
- * the child a picked container stands for (D356 — a container is never a
27464
- * pick, its children are). Read-only; the editor shows them and may offer
27465
- * per-device options on them (the linked-devices tracked-event opt-in).
27466
- * Absent when the owner links nothing beyond the picks, and from an owner
27467
- * older than D655.
27468
- */
27469
- impliedSources: array(ExtensionSlotSourceSchema).optional()
27470
- }), object({
27471
- state: literal("unreachable"),
27472
- addonId: string(),
27473
- reason: string()
27474
- })]);
27475
- var ExtensionCandidatesSchema = object({ candidates: array(object({
27476
- deviceId: number().int(),
27477
- name: string(),
27478
- type: string(),
27479
- location: string().nullable(),
27480
- /** The container a child belongs to — "Spotlight 2" alone does not say which. */
27481
- parentName: string().nullable(),
27482
- /** Pre-marked by the owner's suggestion rule. NEVER saved on its own (D356). */
27483
- suggested: boolean(),
27484
- /** Why it is suggested ("same location"), null when it is not. */
27485
- reason: string().nullable()
27486
- })) });
27487
- /**
27488
- * What a write did. `none` — applied in place. `host` / `parent` — the owner
27489
- * reloaded the host (or, for an accessory child, its parent) because the
27490
- * write changed what the host REGISTERS. A slot never adds a capability to its
27491
- * host — that is a composition (D663) — so today's owners answer `none`.
27492
- */
27493
- var ExtensionSetResultSchema = object({
27494
- applied: literal(true),
27495
- reload: _enum([
27496
- "none",
27497
- "host",
27498
- "parent"
27499
- ])
27500
- });
27501
- var ExtensionSlotRefInputSchema = object({
27502
- deviceId: number().int(),
27503
- slotRef: string().min(1)
27504
- });
27505
- var ExtensionSetSlotInputSchema = ExtensionSlotRefInputSchema.extend({ value: ExtensionSlotValueSchema });
27506
- method(object({ deviceId: number().int() }), array(ExtensionSourceSchema)), method(object({ deviceId: number().int() }), array(ExtensionSlotRowSchema)), method(ExtensionSlotRefInputSchema, ExtensionCandidatesSchema), method(ExtensionSetSlotInputSchema, ExtensionSetResultSchema, {
27507
- kind: "mutation",
27508
- auth: "admin"
27509
- });
27510
27653
  /**
27511
27654
  * Optional client-side hints sent at session creation to help the provider
27512
27655
  * pick the best native source. All fields optional — a viewer that knows
@@ -29324,6 +29467,17 @@ object({
29324
29467
  deviceId: number(),
29325
29468
  status: DeviceStatusSchema
29326
29469
  });
29470
+ object({
29471
+ /** Ms epoch of the last press. null = never observed since this provider started. */
29472
+ lastPressedAt: number().nullable(),
29473
+ /** Counter since provider start. Resets on reboot. Useful for metrics/debug. */
29474
+ pressCountSinceStart: number()
29475
+ });
29476
+ object({
29477
+ deviceId: number(),
29478
+ timestamp: number()
29479
+ });
29480
+ DeviceType.Button, DeviceType.Camera;
29327
29481
  /**
29328
29482
  * Enum-state sensor — a string value picked from a finite option set.
29329
29483
  * Drives HA `sensor` entries with `state_class: enum` (HVAC action
@@ -30968,9 +31122,9 @@ object({
30968
31122
  /** Ms epoch of the last detected-true observation. Null if never detected. */
30969
31123
  lastDetectedAt: number().nullable(),
30970
31124
  /**
30971
- * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device,
30972
- * `null` while false and on every `Sensor` device (D475) — see that
30973
- * constant's doc for the one-authority rule.
31125
+ * `MOTION_CLOSE_AFTER_MS` while `detected: true` on a `Camera` device (the
31126
+ * orchestrator writes it, D696), `null` while false and on every `Sensor`
31127
+ * device (D475) — see that constant's doc for the one-authority rule.
30974
31128
  *
30975
31129
  * ## Reading this field still arms nothing
30976
31130
  *
@@ -30988,38 +31142,41 @@ object({
30988
31142
  * `addon-export-alexa/src/motion-clear-hold.ts` and
30989
31143
  * `addon-export-hap`'s `RESET_DEBOUNCE_MS` both do.
30990
31144
  *
30991
- * ## Who writes it
30992
- *
30993
- * - **Cameras** — the runner's phase machine, `active → watching` on
30994
- * `cooldown_expired`, which then writes this slice with
30995
- * `detected: false` (`handlePhaseChanged` in
30996
- * `pipeline-runner/index.ts`). It produces the FALLING edge, which
30997
- * matters most for the sources that only ever push a rising one:
30998
- * Reolink emits `MotionOnMotionChanged { detected: true }` and never
30999
- * a false.
31000
- * - **Sensors** (Home Assistant binary sensors, Homematic) — the
31001
- * provider pushes the false itself, from the upstream system's own
31002
- * state change. No phase machine is involved.
31003
- *
31004
- * ### The phase machine is CANONICAL, not sole — and that is a defect
31005
- *
31006
- * An earlier revision of this docblock (mine, 2026-09-12) claimed the
31007
- * phase machine is the sole writer for a camera. It is not.
31008
- * `hikvision-camera.ts:3464` and `amcrest-camera.ts:445` both call
31009
- * `setCapSlice(motionCapability, …)` on their own rising edge, and
31010
- * Hikvision's comment says why: it read THIS docblock, agreed the
31011
- * runner is canonical, and wrote anyway to avoid per-tick churn. So
31012
- * two authorities can disagree about one slice, which this repo
31013
- * forbids, and the doc said otherwise — which is worse than saying
31014
- * nothing, because it reads as verification.
31015
- *
31016
- * This predates D475 and is not fixed there: the fix touches every
31017
- * camera provider. Recorded in D475's Consequences. Do not restore the
31018
- * "sole writer" wording without also removing the other writers.
31145
+ * ## Who writes it (D696)
31146
+ *
31147
+ * - **Cameras** — the orchestrator, and nothing else. It writes the camera's
31148
+ * EFFECTIVE motion (`addon-pipeline-orchestrator`
31149
+ * `camera-sensors/motion-slice.ts`), alongside the effective
31150
+ * `MotionOnMotionChanged` it emits or receives: the camera-sensors bridge
31151
+ * for a split camera, an unsplit emitter's direct event, the analyzer and
31152
+ * device activity, as the camera's `motionSources` counts them. A source
31153
+ * that never sends a clear falls one window after its last `true`.
31154
+ * `lastDetectedAt` moves only on an effective rise. No camera provider
31155
+ * writes this slice (not even a boot seed), and neither does the runner's
31156
+ * phase machine: its phase is "a session is attached" for every on-motion
31157
+ * session, not motion, and it now has its own `DetectionPhaseTransition`.
31158
+ * A provider's `isDetected` answers from the hub's slice.
31159
+ * - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
31160
+ * imports) — the provider pushes both edges itself, from the upstream
31161
+ * system's own state change. That is the sensor's own fact.
31162
+ *
31163
+ * `scripts/check-onboard-motion-emitters.ts` refuses any other writer of a
31164
+ * `motion` slice; each sensor writer is a named exemption.
31165
+ *
31166
+ * This replaces the D475 §4 rule ("the phase machine is the sole writer").
31167
+ * That rule was never true: Hikvision and Amcrest wrote the slice raw beside
31168
+ * it, every provider seeded it at boot, and every session left it
31169
+ * `detected: true` after its detach.
31019
31170
  */
31020
31171
  autoClearAfterMs: number().nullable()
31021
31172
  });
31022
- object({
31173
+ /**
31174
+ * Payload of `motion.onMotionChanged` event + the corresponding bus
31175
+ * event `EventCategory.MotionOnMotionChanged`. Single source of truth
31176
+ * — both the cap event surface and the bus payload type alias to this
31177
+ * schema.
31178
+ */
31179
+ var MotionOnMotionChangedDataSchema = object({
31023
31180
  deviceId: number(),
31024
31181
  detected: boolean(),
31025
31182
  timestamp: number(),
@@ -38606,6 +38763,18 @@ Object.freeze({
38606
38763
  addonId: null,
38607
38764
  access: "view"
38608
38765
  },
38766
+ "databaseSnapshot.listDatabases": {
38767
+ capName: "database-snapshot",
38768
+ capScope: "system",
38769
+ addonId: null,
38770
+ access: "view"
38771
+ },
38772
+ "databaseSnapshot.writeSnapshot": {
38773
+ capName: "database-snapshot",
38774
+ capScope: "system",
38775
+ addonId: null,
38776
+ access: "create"
38777
+ },
38609
38778
  "dataStoreProvider.aggregate": {
38610
38779
  capName: "data-store-provider",
38611
38780
  capScope: "system",
@@ -47134,6 +47303,18 @@ var STATE_SUMMARY_VARS = [
47134
47303
  systemEventKinds: [...SUMMARISABLE],
47135
47304
  systemEventDeliveries: ["summary"]
47136
47305
  },
47306
+ {
47307
+ name: "summarySection",
47308
+ label: "Summary: this section",
47309
+ description: "The section a per-section summary row is about (D698); on a summary sent as one message, every section it reports, comma-separated.",
47310
+ example: "Batterie scariche",
47311
+ group: "system",
47312
+ families: ["rule"],
47313
+ fields: [...RULE_TEXT],
47314
+ kinds: ["system"],
47315
+ systemEventKinds: [...SUMMARISABLE],
47316
+ systemEventDeliveries: ["summary"]
47317
+ },
47137
47318
  ...STATE_SUMMARY_SECTION_VARS.map((v) => ({
47138
47319
  name: v.name,
47139
47320
  label: v.label,
@@ -47472,6 +47653,7 @@ TimelapseRuleInputSchema.extend({
47472
47653
  createdAt: number(),
47473
47654
  updatedAt: number()
47474
47655
  });
47656
+ MotionOnMotionChangedDataSchema.omit({ triggeredBy: true });
47475
47657
  object({
47476
47658
  /**
47477
47659
  * Fraction of the box's own size added on EACH side before cutting.