@camstack/types 1.2.282 → 1.2.284

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 (39) hide show
  1. package/dist/addon.js +2 -2
  2. package/dist/addon.mjs +2 -2
  3. package/dist/capabilities/device-extension.cap.d.ts +8 -25
  4. package/dist/capabilities/device-manager.cap.d.ts +2 -2
  5. package/dist/capabilities/device-state.cap.d.ts +2 -2
  6. package/dist/capabilities/doorbell.cap.d.ts +13 -64
  7. package/dist/capabilities/index.d.ts +2 -2
  8. package/dist/capabilities/motion.cap.d.ts +9 -8
  9. package/dist/capabilities/notification-rules.cap.d.ts +97 -2
  10. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +147 -15
  11. package/dist/capabilities/pipeline-runner.cap.d.ts +2 -0
  12. package/dist/capabilities/ptz-autotrack.cap.d.ts +2 -3
  13. package/dist/catalogs/sensor-active-state.d.ts +8 -10
  14. package/dist/composition/presets/doorbell-feature.d.ts +1 -1
  15. package/dist/{composition-Dq42XWp0.mjs → composition-43aqsZQj.mjs} +6 -7
  16. package/dist/{composition-DG4jVTfB.js → composition-w3gBWMer.js} +6 -7
  17. package/dist/device/hub-motion-read.d.ts +22 -0
  18. package/dist/device-extension/slot-descriptor.d.ts +3 -3
  19. package/dist/enums/event-category.d.ts +9 -0
  20. package/dist/enums.js +1 -1
  21. package/dist/enums.mjs +1 -1
  22. package/dist/{event-category-C5xZWqz6.mjs → event-category-BGmz_oxW.mjs} +9 -0
  23. package/dist/{event-category-MbnB-6AN.js → event-category-DmS_tLsU.js} +9 -0
  24. package/dist/generated/extension-slots.d.ts +2 -6
  25. package/dist/index.d.ts +5 -2
  26. package/dist/index.js +302 -205
  27. package/dist/index.mjs +290 -203
  28. package/dist/interfaces/event-bus.d.ts +5 -3
  29. package/dist/interfaces/pipeline-runner-capability.d.ts +2 -0
  30. package/dist/node.js +1 -1
  31. package/dist/node.mjs +1 -1
  32. package/dist/notification/system-event-summary.d.ts +7 -1
  33. package/dist/pipeline/camera-sensors.d.ts +133 -9
  34. package/dist/pipeline/motion-ownership.d.ts +13 -0
  35. package/dist/pipeline/provider-motion.d.ts +33 -0
  36. package/dist/{sleep-gU6hqv4_.mjs → sleep-CDCONfkt.mjs} +1 -1
  37. package/dist/{sleep-DCbD8sdg.js → sleep-G4F3X9X_.js} +1 -1
  38. package/dist/utils/addon-id.d.ts +2 -2
  39. package/package.json +2 -2
@@ -128,6 +128,7 @@ declare const AgentLoadSummarySchema: z.ZodObject<{
128
128
  inferenceBackend: z.ZodOptional<z.ZodString>;
129
129
  cpuCores: z.ZodOptional<z.ZodNumber>;
130
130
  }, z.core.$strip>;
131
+ motionSliceWriter: z.ZodOptional<z.ZodLiteral<"orchestrator">>;
131
132
  }, z.core.$strip>;
132
133
  score: z.ZodNumber;
133
134
  decodeHwaccel: z.ZodNullable<z.ZodString>;
@@ -512,14 +513,23 @@ declare const CameraStatusSchema: z.ZodObject<{
512
513
  }>>>;
513
514
  cameraSensors: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
514
515
  state: z.ZodLiteral<"not-configured">;
516
+ cameraLevel: z.ZodOptional<z.ZodObject<{
517
+ detected: z.ZodBoolean;
518
+ atMs: z.ZodNumber;
519
+ }, z.core.$strip>>;
515
520
  }, z.core.$strip>, z.ZodObject<{
516
521
  state: z.ZodLiteral<"unreadable">;
517
522
  reason: z.ZodString;
523
+ cameraLevel: z.ZodOptional<z.ZodObject<{
524
+ detected: z.ZodBoolean;
525
+ atMs: z.ZodNumber;
526
+ }, z.core.$strip>>;
518
527
  }, z.core.$strip>, z.ZodObject<{
519
528
  state: z.ZodLiteral<"configured">;
520
- mode: z.ZodEnum<{
521
- "in-addition": "in-addition";
522
- }>;
529
+ cameraLevel: z.ZodOptional<z.ZodObject<{
530
+ detected: z.ZodBoolean;
531
+ atMs: z.ZodNumber;
532
+ }, z.core.$strip>>;
523
533
  sensors: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
524
534
  state: z.ZodLiteral<"ready">;
525
535
  deviceId: z.ZodNumber;
@@ -527,6 +537,11 @@ declare const CameraStatusSchema: z.ZodObject<{
527
537
  caps: z.ZodReadonly<z.ZodArray<z.ZodString>>;
528
538
  addonId: z.ZodString;
529
539
  stableId: z.ZodString;
540
+ mode: z.ZodDefault<z.ZodEnum<{
541
+ "in-addition": "in-addition";
542
+ confirm: "confirm";
543
+ replace: "replace";
544
+ }>>;
530
545
  }, z.core.$strip>, z.ZodObject<{
531
546
  state: z.ZodLiteral<"offline">;
532
547
  deviceId: z.ZodNumber;
@@ -537,11 +552,21 @@ declare const CameraStatusSchema: z.ZodObject<{
537
552
  }>;
538
553
  addonId: z.ZodString;
539
554
  stableId: z.ZodString;
555
+ mode: z.ZodDefault<z.ZodEnum<{
556
+ "in-addition": "in-addition";
557
+ confirm: "confirm";
558
+ replace: "replace";
559
+ }>>;
540
560
  }, z.core.$strip>, z.ZodObject<{
541
561
  state: z.ZodLiteral<"missing">;
542
562
  reason: z.ZodString;
543
563
  addonId: z.ZodString;
544
564
  stableId: z.ZodString;
565
+ mode: z.ZodDefault<z.ZodEnum<{
566
+ "in-addition": "in-addition";
567
+ confirm: "confirm";
568
+ replace: "replace";
569
+ }>>;
545
570
  }, z.core.$strip>, z.ZodObject<{
546
571
  state: z.ZodLiteral<"unsupported">;
547
572
  deviceId: z.ZodNumber;
@@ -549,16 +574,34 @@ declare const CameraStatusSchema: z.ZodObject<{
549
574
  reason: z.ZodString;
550
575
  addonId: z.ZodString;
551
576
  stableId: z.ZodString;
577
+ mode: z.ZodDefault<z.ZodEnum<{
578
+ "in-addition": "in-addition";
579
+ confirm: "confirm";
580
+ replace: "replace";
581
+ }>>;
552
582
  }, z.core.$strip>, z.ZodObject<{
553
583
  state: z.ZodLiteral<"unreadable">;
554
584
  reason: z.ZodString;
555
585
  addonId: z.ZodString;
556
586
  stableId: z.ZodString;
587
+ mode: z.ZodDefault<z.ZodEnum<{
588
+ "in-addition": "in-addition";
589
+ confirm: "confirm";
590
+ replace: "replace";
591
+ }>>;
557
592
  }, z.core.$strip>], "state">>>;
593
+ cameraMotion: z.ZodOptional<z.ZodEnum<{
594
+ never: "never";
595
+ always: "always";
596
+ "when-confirmed": "when-confirmed";
597
+ }>>;
558
598
  notForwarded: z.ZodOptional<z.ZodEnum<{
559
599
  "onboard-not-listed": "onboard-not-listed";
560
600
  "no-active-detection": "no-active-detection";
561
601
  }>>;
602
+ notEnforced: z.ZodOptional<z.ZodEnum<{
603
+ "provider-not-split": "provider-not-split";
604
+ }>>;
562
605
  }, z.core.$strip>], "state">>;
563
606
  degraded: z.ZodReadonly<z.ZodArray<z.ZodObject<{
564
607
  stage: z.ZodEnum<{
@@ -702,12 +745,14 @@ declare const NodeInferenceDevicesSchema: z.ZodObject<{
702
745
  export declare const SetCameraSensorsInputSchema: z.ZodObject<{
703
746
  deviceId: z.ZodNumber;
704
747
  config: z.ZodNullable<z.ZodObject<{
705
- mode: z.ZodEnum<{
706
- "in-addition": "in-addition";
707
- }>;
708
748
  sensors: z.ZodArray<z.ZodObject<{
709
749
  addonId: z.ZodString;
710
750
  stableId: z.ZodString;
751
+ mode: z.ZodDefault<z.ZodEnum<{
752
+ "in-addition": "in-addition";
753
+ confirm: "confirm";
754
+ replace: "replace";
755
+ }>>;
711
756
  }, z.core.$strip>>;
712
757
  }, z.core.$strip>>;
713
758
  }, z.core.$strip>;
@@ -922,6 +967,7 @@ export declare const pipelineOrchestratorCapability: {
922
967
  inferenceBackend: z.ZodOptional<z.ZodString>;
923
968
  cpuCores: z.ZodOptional<z.ZodNumber>;
924
969
  }, z.core.$strip>;
970
+ motionSliceWriter: z.ZodOptional<z.ZodLiteral<"orchestrator">>;
925
971
  }, z.core.$strip>;
926
972
  score: z.ZodNumber;
927
973
  decodeHwaccel: z.ZodNullable<z.ZodString>;
@@ -1672,14 +1718,23 @@ export declare const pipelineOrchestratorCapability: {
1672
1718
  }>>>;
1673
1719
  cameraSensors: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1674
1720
  state: z.ZodLiteral<"not-configured">;
1721
+ cameraLevel: z.ZodOptional<z.ZodObject<{
1722
+ detected: z.ZodBoolean;
1723
+ atMs: z.ZodNumber;
1724
+ }, z.core.$strip>>;
1675
1725
  }, z.core.$strip>, z.ZodObject<{
1676
1726
  state: z.ZodLiteral<"unreadable">;
1677
1727
  reason: z.ZodString;
1728
+ cameraLevel: z.ZodOptional<z.ZodObject<{
1729
+ detected: z.ZodBoolean;
1730
+ atMs: z.ZodNumber;
1731
+ }, z.core.$strip>>;
1678
1732
  }, z.core.$strip>, z.ZodObject<{
1679
1733
  state: z.ZodLiteral<"configured">;
1680
- mode: z.ZodEnum<{
1681
- "in-addition": "in-addition";
1682
- }>;
1734
+ cameraLevel: z.ZodOptional<z.ZodObject<{
1735
+ detected: z.ZodBoolean;
1736
+ atMs: z.ZodNumber;
1737
+ }, z.core.$strip>>;
1683
1738
  sensors: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1684
1739
  state: z.ZodLiteral<"ready">;
1685
1740
  deviceId: z.ZodNumber;
@@ -1687,6 +1742,11 @@ export declare const pipelineOrchestratorCapability: {
1687
1742
  caps: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1688
1743
  addonId: z.ZodString;
1689
1744
  stableId: z.ZodString;
1745
+ mode: z.ZodDefault<z.ZodEnum<{
1746
+ "in-addition": "in-addition";
1747
+ confirm: "confirm";
1748
+ replace: "replace";
1749
+ }>>;
1690
1750
  }, z.core.$strip>, z.ZodObject<{
1691
1751
  state: z.ZodLiteral<"offline">;
1692
1752
  deviceId: z.ZodNumber;
@@ -1697,11 +1757,21 @@ export declare const pipelineOrchestratorCapability: {
1697
1757
  }>;
1698
1758
  addonId: z.ZodString;
1699
1759
  stableId: z.ZodString;
1760
+ mode: z.ZodDefault<z.ZodEnum<{
1761
+ "in-addition": "in-addition";
1762
+ confirm: "confirm";
1763
+ replace: "replace";
1764
+ }>>;
1700
1765
  }, z.core.$strip>, z.ZodObject<{
1701
1766
  state: z.ZodLiteral<"missing">;
1702
1767
  reason: z.ZodString;
1703
1768
  addonId: z.ZodString;
1704
1769
  stableId: z.ZodString;
1770
+ mode: z.ZodDefault<z.ZodEnum<{
1771
+ "in-addition": "in-addition";
1772
+ confirm: "confirm";
1773
+ replace: "replace";
1774
+ }>>;
1705
1775
  }, z.core.$strip>, z.ZodObject<{
1706
1776
  state: z.ZodLiteral<"unsupported">;
1707
1777
  deviceId: z.ZodNumber;
@@ -1709,16 +1779,34 @@ export declare const pipelineOrchestratorCapability: {
1709
1779
  reason: z.ZodString;
1710
1780
  addonId: z.ZodString;
1711
1781
  stableId: z.ZodString;
1782
+ mode: z.ZodDefault<z.ZodEnum<{
1783
+ "in-addition": "in-addition";
1784
+ confirm: "confirm";
1785
+ replace: "replace";
1786
+ }>>;
1712
1787
  }, z.core.$strip>, z.ZodObject<{
1713
1788
  state: z.ZodLiteral<"unreadable">;
1714
1789
  reason: z.ZodString;
1715
1790
  addonId: z.ZodString;
1716
1791
  stableId: z.ZodString;
1792
+ mode: z.ZodDefault<z.ZodEnum<{
1793
+ "in-addition": "in-addition";
1794
+ confirm: "confirm";
1795
+ replace: "replace";
1796
+ }>>;
1717
1797
  }, z.core.$strip>], "state">>>;
1798
+ cameraMotion: z.ZodOptional<z.ZodEnum<{
1799
+ never: "never";
1800
+ always: "always";
1801
+ "when-confirmed": "when-confirmed";
1802
+ }>>;
1718
1803
  notForwarded: z.ZodOptional<z.ZodEnum<{
1719
1804
  "onboard-not-listed": "onboard-not-listed";
1720
1805
  "no-active-detection": "no-active-detection";
1721
1806
  }>>;
1807
+ notEnforced: z.ZodOptional<z.ZodEnum<{
1808
+ "provider-not-split": "provider-not-split";
1809
+ }>>;
1722
1810
  }, z.core.$strip>], "state">>;
1723
1811
  degraded: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1724
1812
  stage: z.ZodEnum<{
@@ -1859,14 +1947,23 @@ export declare const pipelineOrchestratorCapability: {
1859
1947
  }>>>;
1860
1948
  cameraSensors: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
1861
1949
  state: z.ZodLiteral<"not-configured">;
1950
+ cameraLevel: z.ZodOptional<z.ZodObject<{
1951
+ detected: z.ZodBoolean;
1952
+ atMs: z.ZodNumber;
1953
+ }, z.core.$strip>>;
1862
1954
  }, z.core.$strip>, z.ZodObject<{
1863
1955
  state: z.ZodLiteral<"unreadable">;
1864
1956
  reason: z.ZodString;
1957
+ cameraLevel: z.ZodOptional<z.ZodObject<{
1958
+ detected: z.ZodBoolean;
1959
+ atMs: z.ZodNumber;
1960
+ }, z.core.$strip>>;
1865
1961
  }, z.core.$strip>, z.ZodObject<{
1866
1962
  state: z.ZodLiteral<"configured">;
1867
- mode: z.ZodEnum<{
1868
- "in-addition": "in-addition";
1869
- }>;
1963
+ cameraLevel: z.ZodOptional<z.ZodObject<{
1964
+ detected: z.ZodBoolean;
1965
+ atMs: z.ZodNumber;
1966
+ }, z.core.$strip>>;
1870
1967
  sensors: z.ZodReadonly<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1871
1968
  state: z.ZodLiteral<"ready">;
1872
1969
  deviceId: z.ZodNumber;
@@ -1874,6 +1971,11 @@ export declare const pipelineOrchestratorCapability: {
1874
1971
  caps: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1875
1972
  addonId: z.ZodString;
1876
1973
  stableId: z.ZodString;
1974
+ mode: z.ZodDefault<z.ZodEnum<{
1975
+ "in-addition": "in-addition";
1976
+ confirm: "confirm";
1977
+ replace: "replace";
1978
+ }>>;
1877
1979
  }, z.core.$strip>, z.ZodObject<{
1878
1980
  state: z.ZodLiteral<"offline">;
1879
1981
  deviceId: z.ZodNumber;
@@ -1884,11 +1986,21 @@ export declare const pipelineOrchestratorCapability: {
1884
1986
  }>;
1885
1987
  addonId: z.ZodString;
1886
1988
  stableId: z.ZodString;
1989
+ mode: z.ZodDefault<z.ZodEnum<{
1990
+ "in-addition": "in-addition";
1991
+ confirm: "confirm";
1992
+ replace: "replace";
1993
+ }>>;
1887
1994
  }, z.core.$strip>, z.ZodObject<{
1888
1995
  state: z.ZodLiteral<"missing">;
1889
1996
  reason: z.ZodString;
1890
1997
  addonId: z.ZodString;
1891
1998
  stableId: z.ZodString;
1999
+ mode: z.ZodDefault<z.ZodEnum<{
2000
+ "in-addition": "in-addition";
2001
+ confirm: "confirm";
2002
+ replace: "replace";
2003
+ }>>;
1892
2004
  }, z.core.$strip>, z.ZodObject<{
1893
2005
  state: z.ZodLiteral<"unsupported">;
1894
2006
  deviceId: z.ZodNumber;
@@ -1896,16 +2008,34 @@ export declare const pipelineOrchestratorCapability: {
1896
2008
  reason: z.ZodString;
1897
2009
  addonId: z.ZodString;
1898
2010
  stableId: z.ZodString;
2011
+ mode: z.ZodDefault<z.ZodEnum<{
2012
+ "in-addition": "in-addition";
2013
+ confirm: "confirm";
2014
+ replace: "replace";
2015
+ }>>;
1899
2016
  }, z.core.$strip>, z.ZodObject<{
1900
2017
  state: z.ZodLiteral<"unreadable">;
1901
2018
  reason: z.ZodString;
1902
2019
  addonId: z.ZodString;
1903
2020
  stableId: z.ZodString;
2021
+ mode: z.ZodDefault<z.ZodEnum<{
2022
+ "in-addition": "in-addition";
2023
+ confirm: "confirm";
2024
+ replace: "replace";
2025
+ }>>;
1904
2026
  }, z.core.$strip>], "state">>>;
2027
+ cameraMotion: z.ZodOptional<z.ZodEnum<{
2028
+ never: "never";
2029
+ always: "always";
2030
+ "when-confirmed": "when-confirmed";
2031
+ }>>;
1905
2032
  notForwarded: z.ZodOptional<z.ZodEnum<{
1906
2033
  "onboard-not-listed": "onboard-not-listed";
1907
2034
  "no-active-detection": "no-active-detection";
1908
2035
  }>>;
2036
+ notEnforced: z.ZodOptional<z.ZodEnum<{
2037
+ "provider-not-split": "provider-not-split";
2038
+ }>>;
1909
2039
  }, z.core.$strip>], "state">>;
1910
2040
  degraded: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1911
2041
  stage: z.ZodEnum<{
@@ -1935,12 +2065,14 @@ export declare const pipelineOrchestratorCapability: {
1935
2065
  readonly setCameraSensors: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1936
2066
  deviceId: z.ZodNumber;
1937
2067
  config: z.ZodNullable<z.ZodObject<{
1938
- mode: z.ZodEnum<{
1939
- "in-addition": "in-addition";
1940
- }>;
1941
2068
  sensors: z.ZodArray<z.ZodObject<{
1942
2069
  addonId: z.ZodString;
1943
2070
  stableId: z.ZodString;
2071
+ mode: z.ZodDefault<z.ZodEnum<{
2072
+ "in-addition": "in-addition";
2073
+ confirm: "confirm";
2074
+ replace: "replace";
2075
+ }>>;
1944
2076
  }, z.core.$strip>>;
1945
2077
  }, z.core.$strip>>;
1946
2078
  }, z.core.$strip>, z.ZodObject<{
@@ -458,6 +458,7 @@ declare const RunnerLocalLoadSchema: z.ZodObject<{
458
458
  inferenceBackend: z.ZodOptional<z.ZodString>;
459
459
  cpuCores: z.ZodOptional<z.ZodNumber>;
460
460
  }, z.core.$strip>;
461
+ motionSliceWriter: z.ZodOptional<z.ZodLiteral<"orchestrator">>;
461
462
  }, z.core.$strip>;
462
463
  /**
463
464
  * Aggregate runtime metrics for the runner's whole local pool. Mirrors the
@@ -770,6 +771,7 @@ export declare const pipelineRunnerCapability: {
770
771
  inferenceBackend: z.ZodOptional<z.ZodString>;
771
772
  cpuCores: z.ZodOptional<z.ZodNumber>;
772
773
  }, z.core.$strip>;
774
+ motionSliceWriter: z.ZodOptional<z.ZodLiteral<"orchestrator">>;
773
775
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
774
776
  /** Return aggregate runtime metrics for this runner instance. */
775
777
  readonly getLocalMetrics: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
@@ -67,8 +67,7 @@ export declare const ptzAutotrackCapability: {
67
67
  readonly deviceNative: true;
68
68
  readonly mode: "singleton";
69
69
  /**
70
- * Two kinds of provider behind one name, the same shape `snapshot` and
71
- * `doorbell` use:
70
+ * Two kinds of provider behind one name, the same shape `snapshot` uses:
72
71
  *
73
72
  * - **Native**: the camera's own firmware autotrack, registered per device by
74
73
  * the driver when the probe says it exists (Reolink: yes; Hikvision:
@@ -76,7 +75,7 @@ export declare const ptzAutotrackCapability: {
76
75
  * - **Wrapper**: the emulated implementation (`@camstack/system`'s `autotrack` builtin),
77
76
  * which follows a subject with `ptz.move` pulses driven by the detection
78
77
  * pipeline. `defaultActive: false` — the operator binds it per camera in
79
- * the bindings UI, exactly as `virtual-doorbell` is bound.
78
+ * the bindings UI.
80
79
  *
81
80
  * The binding chooses WHICH implementation answers; `setEnabled` stays the
82
81
  * one switch for the function either way. A camera never has both driving its
@@ -2,13 +2,12 @@
2
2
  * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
3
3
  * valutatore puro del suo FRONTE.
4
4
  *
5
- * Viveva dentro il builtin virtual-doorbell
6
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
7
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
8
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
9
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
10
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
11
- * SPOSTA qui e il doorbell la ri-esporta.
5
+ * UNA tabella per tutti quelli che chiedono "questo device è ALTO?": il
6
+ * trigger `RecordingTriggers.sensorDeviceIds` del recorder, i marker dei
7
+ * sensori della post-analysis, il bridge camera-sensors dell'orchestratore e
8
+ * le sorgenti di un campanello composto (`doorbellFeatureSources`, D671).
9
+ * Una seconda copia divergerebbe alla prima cap aggiunta, e il sintomo — "il
10
+ * sensore fa suonare il campanello ma non registra" — è esattamente D62.
12
11
  *
13
12
  * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
14
13
  * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
@@ -65,9 +64,8 @@ export declare function sliceActiveValue(capName: string, slice: Readonly<Record
65
64
  * it is absent, non-numeric or the zero "never observed" sentinel. */
66
65
  export declare function sliceChangedAt(capName: string, slice: Readonly<Record<string, unknown>>): number | null;
67
66
  /**
68
- * Perché una slice non ha portato un fronte alto. Stesso vocabolario che il
69
- * virtual-doorbell riporta dal 2026-08-05: UN enum, così "perché non è scattato
70
- * niente" ha una risposta sola, chiunque lo chieda.
67
+ * Perché una slice non ha portato un fronte alto. UN enum, così "perché non è
68
+ * scattato niente" ha una risposta sola, chiunque lo chieda.
71
69
  */
72
70
  export type SensorEdgeIgnoreReason =
73
71
  /** Not a recognised binary/switch source cap. */
@@ -16,5 +16,5 @@ export interface DoorbellFeatureInput {
16
16
  }
17
17
  /** Every source cap of `source` that `SOURCE_CAP_ACTIVE_FIELD` knows AND the device has bound. */
18
18
  export declare function doorbellFeatureSources(source: CompositionSourceRef, boundCaps: readonly string[]): readonly DoorbellFeatureSource[];
19
- /** The D671 feature, byte for byte what the migration writes. Throws on zero sources. */
19
+ /** The canonical D671 doorbell feature. Throws on zero sources. */
20
20
  export declare function buildDoorbellCompositionFeature(input: DoorbellFeatureInput): CompositionFieldsFeature;
@@ -904,13 +904,12 @@ function chooseFfmpegBinary(input) {
904
904
  * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
905
905
  * valutatore puro del suo FRONTE.
906
906
  *
907
- * Viveva dentro il builtin virtual-doorbell
908
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
909
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
910
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
911
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
912
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
913
- * SPOSTA qui e il doorbell la ri-esporta.
907
+ * UNA tabella per tutti quelli che chiedono "questo device è ALTO?": il
908
+ * trigger `RecordingTriggers.sensorDeviceIds` del recorder, i marker dei
909
+ * sensori della post-analysis, il bridge camera-sensors dell'orchestratore e
910
+ * le sorgenti di un campanello composto (`doorbellFeatureSources`, D671).
911
+ * Una seconda copia divergerebbe alla prima cap aggiunta, e il sintomo — "il
912
+ * sensore fa suonare il campanello ma non registra" — è esattamente D62.
914
913
  *
915
914
  * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
916
915
  * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
@@ -904,13 +904,12 @@ function chooseFfmpegBinary(input) {
904
904
  * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
905
905
  * valutatore puro del suo FRONTE.
906
906
  *
907
- * Viveva dentro il builtin virtual-doorbell
908
- * (`@camstack/system` — `builtins/doorbell/trigger-engine.ts`) e i suoi
909
- * predicati erano privati al modulo. Il recorder ne ha bisogno per il trigger
910
- * `RecordingTriggers.sensorDeviceIds`: copiarla avrebbe creato la SECONDA
911
- * tabella, che diverge alla prima cap aggiunta e il cui sintomo — "il sensore
912
- * fa suonare il campanello ma non registra" — è esattamente D62. Quindi si
913
- * SPOSTA qui e il doorbell la ri-esporta.
907
+ * UNA tabella per tutti quelli che chiedono "questo device è ALTO?": il
908
+ * trigger `RecordingTriggers.sensorDeviceIds` del recorder, i marker dei
909
+ * sensori della post-analysis, il bridge camera-sensors dell'orchestratore e
910
+ * le sorgenti di un campanello composto (`doorbellFeatureSources`, D671).
911
+ * Una seconda copia divergerebbe alla prima cap aggiunta, e il sintomo — "il
912
+ * sensore fa suonare il campanello ma non registra" — è esattamente D62.
914
913
  *
915
914
  * ⚠ NON è `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), e le
916
915
  * due non vanno unificate: quella risponde a "qual è la PAROLA di stato per una
@@ -0,0 +1,22 @@
1
+ /**
2
+ * A camera's `motion` slice, read from the HUB (D696).
3
+ *
4
+ * The orchestrator is the only writer of a camera's `motion` runtime slice, and
5
+ * it writes the EFFECTIVE value on the hub. A camera provider's local runtime
6
+ * state therefore holds no `motion` slice, and its `motion.isDetected` answers
7
+ * from here. Two answers are UNKNOWN, and both make the call fail rather than
8
+ * answer `false` (D49, D393):
9
+ * - the read did not answer (the hub is unreachable, the call threw);
10
+ * - the read answered with no `detected`: nobody has published the camera's
11
+ * motion since the hub started (the slice is session-durable).
12
+ */
13
+ /** The one `deviceState` read this needs. `ctx.api.deviceState` satisfies it. */
14
+ export interface HubMotionSliceReader {
15
+ readonly getCapSlice: {
16
+ readonly query: (input: {
17
+ deviceId: number;
18
+ capName: string;
19
+ }) => Promise<Readonly<Record<string, unknown>> | null>;
20
+ };
21
+ }
22
+ export declare function readHubMotionDetected(deviceState: HubMotionSliceReader, deviceId: number): Promise<boolean>;
@@ -3,15 +3,15 @@
3
3
  * declared by the capability that already owns the function (D648).
4
4
  *
5
5
  * A slot is metadata, and behavioural metadata lives in the owning `*.cap.ts`
6
- * (D4): `device-manager.cap.ts` declares `linked-devices`, `doorbell.cap.ts`
7
- * declares `doorbell-source`. `npm run codegen` folds every declaration into
6
+ * (D4): `device-manager.cap.ts` declares `linked-devices`, today the only
7
+ * slot. `npm run codegen` folds every declaration into
8
8
  * `generated/extension-slots.ts` (the id enum, the table and the discriminated
9
9
  * union of slot values), and `device-extension` is the device-scoped
10
10
  * collection contract that lists and writes them. The contract persists
11
11
  * NOTHING: each slot is served by the addon that owns its store (D62).
12
12
  *
13
13
  * One shape, `association` — the host LISTS other devices (a camera's linked
14
- * devices, its doorbell trigger sources). Removing every source is "off";
14
+ * devices). Removing every source is "off";
15
15
  * there is no separate switch.
16
16
  *
17
17
  * A host that GAINS a whole capability from other devices is not a slot: that
@@ -530,6 +530,15 @@ export declare enum EventCategory {
530
530
  */
531
531
  PipelineAudioInferenceResult = "pipeline.audio-inference-result",
532
532
  DetectionPhaseTransition = "detection.phase-transition",
533
+ /**
534
+ * A camera provider's RAW onboard motion push (D673): the `MotionOnMotionChanged`
535
+ * data shape without `triggeredBy`, built by `providerMotionEvent`. Its one
536
+ * consumer is the orchestrator's camera-sensors bridge, which re-emits the
537
+ * camera's EFFECTIVE onboard motion as `MotionOnMotionChanged` (a pass-through
538
+ * for a camera with no attached sensor). Providers must not emit
539
+ * `MotionOnMotionChanged` themselves; `scripts/check-onboard-motion-emitters.ts`
540
+ * keeps it so (camera-grid is a named, deferred exception).
541
+ */
533
542
  ProviderMotion = "provider.motion",
534
543
  ProviderDetection = "provider.detection",
535
544
  EnrichmentEmbeddingStored = "enrichment.embedding.stored",
package/dist/enums.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_event_category = require("./event-category-MbnB-6AN.js");
2
+ const require_event_category = require("./event-category-DmS_tLsU.js");
3
3
  //#region src/enums/event-source-type.ts
4
4
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
5
5
  EventSourceType["Addon"] = "addon";
package/dist/enums.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as EventCategory } from "./event-category-C5xZWqz6.mjs";
1
+ import { t as EventCategory } from "./event-category-BGmz_oxW.mjs";
2
2
  //#region src/enums/event-source-type.ts
3
3
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
4
4
  EventSourceType["Addon"] = "addon";
@@ -531,6 +531,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
531
531
  */
532
532
  EventCategory["PipelineAudioInferenceResult"] = "pipeline.audio-inference-result";
533
533
  EventCategory["DetectionPhaseTransition"] = "detection.phase-transition";
534
+ /**
535
+ * A camera provider's RAW onboard motion push (D673): the `MotionOnMotionChanged`
536
+ * data shape without `triggeredBy`, built by `providerMotionEvent`. Its one
537
+ * consumer is the orchestrator's camera-sensors bridge, which re-emits the
538
+ * camera's EFFECTIVE onboard motion as `MotionOnMotionChanged` (a pass-through
539
+ * for a camera with no attached sensor). Providers must not emit
540
+ * `MotionOnMotionChanged` themselves; `scripts/check-onboard-motion-emitters.ts`
541
+ * keeps it so (camera-grid is a named, deferred exception).
542
+ */
534
543
  EventCategory["ProviderMotion"] = "provider.motion";
535
544
  EventCategory["ProviderDetection"] = "provider.detection";
536
545
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
@@ -531,6 +531,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
531
531
  */
532
532
  EventCategory["PipelineAudioInferenceResult"] = "pipeline.audio-inference-result";
533
533
  EventCategory["DetectionPhaseTransition"] = "detection.phase-transition";
534
+ /**
535
+ * A camera provider's RAW onboard motion push (D673): the `MotionOnMotionChanged`
536
+ * data shape without `triggeredBy`, built by `providerMotionEvent`. Its one
537
+ * consumer is the orchestrator's camera-sensors bridge, which re-emits the
538
+ * camera's EFFECTIVE onboard motion as `MotionOnMotionChanged` (a pass-through
539
+ * for a camera with no attached sensor). Providers must not emit
540
+ * `MotionOnMotionChanged` themselves; `scripts/check-onboard-motion-emitters.ts`
541
+ * keeps it so (camera-grid is a named, deferred exception).
542
+ */
534
543
  EventCategory["ProviderMotion"] = "provider.motion";
535
544
  EventCategory["ProviderDetection"] = "provider.detection";
536
545
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
@@ -6,16 +6,15 @@
6
6
  * caps' descriptors and value schemas — never the caps barrel — so
7
7
  * `device-extension.cap.ts` can import this module without a cycle.
8
8
  *
9
- * Coverage: 2 slot(s).
9
+ * Coverage: 1 slot(s).
10
10
  */
11
11
  import { z } from 'zod';
12
12
  import { DeviceType } from '../device/device-type.js';
13
13
  import type { ExtensionSlotDescriptor } from '../device-extension/slot-descriptor.js';
14
14
  /** Every declared slot id, in table order. */
15
- export declare const EXTENSION_SLOT_IDS: readonly ["doorbell-source", "linked-devices"];
15
+ export declare const EXTENSION_SLOT_IDS: readonly ["linked-devices"];
16
16
  export declare const ExtensionSlotIdSchema: z.ZodEnum<{
17
17
  "linked-devices": "linked-devices";
18
- "doorbell-source": "doorbell-source";
19
18
  }>;
20
19
  export type ExtensionSlotId = z.infer<typeof ExtensionSlotIdSchema>;
21
20
  /** One row of the table: the descriptor, who declared it, where it is offered. */
@@ -28,9 +27,6 @@ export interface ExtensionSlotEntry {
28
27
  export declare const EXTENSION_SLOTS: Readonly<Record<ExtensionSlotId, ExtensionSlotEntry>>;
29
28
  /** A slot's editable value, discriminated on `slot`. */
30
29
  export declare const ExtensionSlotValueSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
31
- deviceIds: z.ZodArray<z.ZodNumber>;
32
- slot: z.ZodLiteral<"doorbell-source">;
33
- }, z.core.$strip>, z.ZodObject<{
34
30
  deviceIds: z.ZodArray<z.ZodNumber>;
35
31
  trackedDeviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
36
32
  slot: z.ZodLiteral<"linked-devices">;
package/dist/index.d.ts CHANGED
@@ -243,14 +243,17 @@ export { NC_SENSOR_RAISED_FIELD_BY_KIND, NC_SENSOR_TRANSITION_KINDS, NC_SENSOR_T
243
243
  export { NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, isHeldBackTemplateVar, isKnownTemplateVar, servedTemplateVars, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, templateVarsFor, } from './notification/template-vars.js';
244
244
  export { NC_SYSTEM_EVENT_FILTER_KEYS, type NcSystemEventFilterKey, systemEventFilterApplies, systemEventFilterAppliesToAnyKind, } from './notification/system-event-filters.js';
245
245
  export { describeSystemEventFamilyProblem, isSystemEventFamily, NC_SYSTEM_EVENT_CONDITION_FILTER_KEYS, NC_SYSTEM_EVENT_FAMILIES, NC_SYSTEM_EVENT_FAMILY, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, type NcSystemEventConditionFilterKey, type NcSystemEventFamily, type NcSystemEventFamilyProblem, type NcSystemEventFamilyVerdict, type NcSystemEventKindGroupSpec, systemEventFamilyOf, systemEventFamilyProblems, systemEventKindNamesOf, systemEventKindsOfFamily, } from './notification/system-event-families.js';
246
- export { describeSystemEventDeliveryProblem, isSystemEventSummaryRule, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, type NcSummarySendTime, type NcSystemEventDeliveryProblem, type NcSystemEventDeliverySubject, scheduleForSendTimes, sendTimesOfSchedule, systemEventDeliveryProblems, systemEventSummaryScheduleOf, templateCarriesSummary, } from './notification/system-event-summary.js';
246
+ export { describeSystemEventDeliveryProblem, isSystemEventSummaryRule, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, type NcSummarySendTime, type NcSystemEventDeliveryProblem, type NcSystemEventDeliverySubject, scheduleForSendTimes, sendTimesOfSchedule, systemEventDeliveryProblems, systemEventSummaryScheduleOf, systemEventSummarySplitOf, templateCarriesSummary, } from './notification/system-event-summary.js';
247
247
  export { NC_SERVER_PACKAGE_NAME, NC_UPDATE_EVENT_PACKAGE_NAMES, type NcInstalledPackageLike, type NcScopePickerItem, nodePickerItems, packagePickerItems, } from './notification/scope-picker-items.js';
248
248
  export type { TimelapseCadencePair, TimelapsePreviewMode, TimelapseRule, TimelapseRuleInput, TimelapseRulePatch, TimelapseTemplate, } from './notification/timelapse-rule.js';
249
249
  export type { StateLabel, StateLabelKey, StateLabelLocale } from './i18n/state-labels.js';
250
250
  export { isStateLabelKey, STATE_LABEL_KEYS, STATE_LABELS, stateLabel, } from './i18n/state-labels.js';
251
251
  export { assertTimelapseCadences, DEFAULT_TIMELAPSE_PREVIEW_TEXT, readTimelapseGeneratedAt, TIMELAPSE_DENSE_FLOOR_SEC, TimelapseRuleInputSchema, TimelapseRulePatchSchema, TimelapseRuleSchema, TimelapseTemplateSchema, } from './notification/timelapse-rule.js';
252
252
  export { CLUSTER_MODEL_SCOPED_STEPS, CLUSTER_MODEL_SECTION_ID, CLUSTER_STEP_SETTING_FIELDS, type ClusterModelScopedStep, type ClusterStepModels, type ClusterStepSettingField, type ClusterStepSettings, clusterModelSettingKey, clusterStepSettingFieldsFor, clusterStepSettingKey, DEFAULT_CLUSTER_STEP_MODELS, DEFAULT_CLUSTER_STEP_SETTINGS, DEFAULT_MIN_LANDMARK_FACE_SIZE_PX, type HydratedClusterSection, type HydratedClusterView, interpretStoredClusterModel, type InvalidClusterStepModelEntry, invalidClusterStepModelEntries, isClusterScopedStep, overlayClusterStepSettings, pickClusterStepModels, pickClusterStepSettings, pickInvalidClusterStepModels, readClusterStepModels, readClusterStepSettings, resolveClusterStepModelId, type StepModelScope, type StoredClusterModelInterpretation, } from './pipeline/cluster-model-scope.js';
253
- export { CAMERA_SENSORS_NOT_LOADED, CAMERA_SENSORS_SETTINGS_KEY, CAMERA_TRIGGER, type CameraSensorAttachment, CameraSensorAttachmentSchema, type CameraSensorRef, CameraSensorRefSchema, cameraSensorRefKey, type CameraSensorsConfig, CameraSensorsConfigSchema, type CameraSensorsMode, CameraSensorsModeSchema, type CameraSensorsNotForwarded, CameraSensorsNotForwardedSchema, type CameraSensorsStatus, CameraSensorsStatusSchema, MAX_CAMERA_SENSORS, type MotionTriggeredBy, type MotionTriggeredByReading, MotionTriggeredBySchema, readMotionTriggeredBy, } from './pipeline/camera-sensors.js';
253
+ export { CAMERA_SENSORS_NOT_LOADED, CAMERA_SENSORS_SETTINGS_KEY, CAMERA_TRIGGER, type CameraSensorAttachment, CameraSensorAttachmentSchema, type CameraSensorRef, CameraSensorRefSchema, cameraSensorRefKey, type CameraSensorsConfig, CameraSensorsConfigSchema, type CameraOwnMotion, CameraOwnMotionSchema, type CameraRawLevel, CameraRawLevelSchema, type CameraSensorEntry, CameraSensorEntrySchema, type CameraSensorMode, CameraSensorModeSchema, type CameraSensorsNotEnforced, CameraSensorsNotEnforcedSchema, type CameraSensorsNotForwarded, CameraSensorsNotForwardedSchema, type CameraSensorsStatus, CameraSensorsStatusSchema, DEFAULT_CAMERA_SENSOR_MODE, MAX_CAMERA_SENSORS, type MotionTriggeredBy, type MotionTriggeredByReading, MotionTriggeredBySchema, readMotionTriggeredBy, } from './pipeline/camera-sensors.js';
254
+ export { cameraOwnsMotionViaSensor } from './pipeline/motion-ownership.js';
255
+ export { readHubMotionDetected } from './device/hub-motion-read.js';
256
+ export { type ProviderMotionData, ProviderMotionDataSchema, providerMotionEvent, } from './pipeline/provider-motion.js';
254
257
  export { type FormatRunnableModel, stepModelRunsOnFormat, } from './pipeline/step-format-runnable.js';
255
258
  export { DEFAULT_DETAIL_CROP_CONVENTION, DETAIL_CROP_PADDING_FIELD, DETAIL_CROP_PADDING_KEY, DETAIL_CROP_SECTION_ID, DETAIL_CROP_SQUARE_KEY, type DetailCropConvention, DetailCropConventionSchema, type DetailCropRect, deriveDetailCropRect, FULL_IMAGE_BBOX, type HydratedSettingsSection, type HydratedSettingsView, pickDetailCropConvention, readDetailCropConvention, } from './pipeline/detail-crop.js';
256
259
  export { DEFAULT_NATIVE_LEASE_SETTINGS, NATIVE_LEASE_ACTIVITY_FIELD, NATIVE_LEASE_ACTIVITY_KEY, NATIVE_LEASE_ADMISSION_FIELD, NATIVE_LEASE_ADMISSION_KEY, NATIVE_LEASE_BUDGET_FIELD, NATIVE_LEASE_BUDGET_KEY, NATIVE_LEASE_HOLD_FIELD, NATIVE_LEASE_HOLD_KEY, NATIVE_LEASE_SCENE_BUDGET_FIELD, NATIVE_LEASE_SCENE_BUDGET_KEY, NATIVE_LEASE_SECTION_ID, NATIVE_LEASE_TILE_BUDGET_FIELD, NATIVE_LEASE_TILE_BUDGET_KEY, type NativeLeaseAdmission, NativeLeaseAdmissionSchema, type NativeLeaseKnob, type NativeLeaseNumberKnob, type NativeLeaseSettings, type NativeLeaseSettingsOverride, NativeLeaseSettingsSchema, pickNativeLeaseOverride, readNativeLeaseOverride, } from './pipeline/native-lease.js';