@camstack/addon-provider-homematic 1.2.158 → 1.2.159

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.
package/dist/addon.mjs CHANGED
@@ -9,7 +9,7 @@ import { join } from "path";
9
9
  var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
10
10
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
11
11
  //#endregion
12
- //#region ../types/dist/event-category-DHXxB8t9.mjs
12
+ //#region ../types/dist/event-category-CT-hz5Rb.mjs
13
13
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
14
14
  EventCategory["SystemBoot"] = "system.boot";
15
15
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -335,6 +335,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
335
335
  /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
336
336
  EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
337
337
  /**
338
+ * A camera's package LLM confirm has failed closed three times in a row
339
+ * (D931, 2026-10-26). One edge per camera until
340
+ * {@link PipelinePackageLlmAnswered}.
341
+ */
342
+ EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
343
+ /** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
344
+ EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
345
+ /**
338
346
  * Per-camera pipeline config was mutated by the orchestrator
339
347
  * (a settings change via `setAgentInferenceDevices` /
340
348
  * `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
@@ -5577,7 +5585,7 @@ var ZodIssueCode = {
5577
5585
  var ZodFirstPartyTypeKind;
5578
5586
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5579
5587
  //#endregion
5580
- //#region ../types/dist/sleep-CARd6wZF.mjs
5588
+ //#region ../types/dist/sleep-bykKrTgu.mjs
5581
5589
  /**
5582
5590
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5583
5591
  * window to float samples (D455).
@@ -8958,6 +8966,8 @@ var CAP_NAMES = Object.freeze([
8958
8966
  "filesystem-browse",
8959
8967
  "flood",
8960
8968
  "gas",
8969
+ "group-commands",
8970
+ "group-status",
8961
8971
  "heating-valve",
8962
8972
  "humidifier",
8963
8973
  "humidity-sensor",
@@ -9776,6 +9786,20 @@ Object.freeze({
9776
9786
  "path": "detected",
9777
9787
  "valueType": "boolean"
9778
9788
  }],
9789
+ "group-status": [
9790
+ {
9791
+ "path": "included",
9792
+ "valueType": "number"
9793
+ },
9794
+ {
9795
+ "path": "excluded",
9796
+ "valueType": "number"
9797
+ },
9798
+ {
9799
+ "path": "total",
9800
+ "valueType": "number"
9801
+ }
9802
+ ],
9779
9803
  "heating-valve": [{
9780
9804
  "path": "position",
9781
9805
  "valueType": "number"
@@ -11117,7 +11141,7 @@ function errMsg(err) {
11117
11141
  return String(err);
11118
11142
  }
11119
11143
  //#endregion
11120
- //#region ../types/dist/composition-kEl9mevu.mjs
11144
+ //#region ../types/dist/composition-OhpuespA.mjs
11121
11145
  /**
11122
11146
  * The ffmpeg build every CamStack node downloads, per platform and arch.
11123
11147
  *
@@ -11872,15 +11896,74 @@ function validateExpressionSource(src) {
11872
11896
  }
11873
11897
  return null;
11874
11898
  }
11875
- /** A composed device's stableId is this prefix plus the block id. */
11876
- var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11877
- /** Longest snippet a `code` source may carry (slice 4). */
11878
- var MAX_COMPOSITION_CODE_LENGTH = 2e4;
11899
+ /**
11900
+ * A composition source identity: `(addonId, stableId)`, never a numeric device
11901
+ * id. Split out so helper schemas can name it without a cycle through
11902
+ * `composition.ts` (D659).
11903
+ */
11879
11904
  var CompositionSourceRefSchema = object({
11880
11905
  /** The owning addon; `stableId` is unique only within it. */
11881
11906
  addonId: string().min(1),
11882
11907
  stableId: string().min(1)
11883
11908
  });
11909
+ var GROUP_TEMPLATE_IDS = [
11910
+ "temperature",
11911
+ "humidity",
11912
+ "pressure",
11913
+ "illuminance",
11914
+ "power",
11915
+ "energy",
11916
+ "battery",
11917
+ "numeric",
11918
+ "motion",
11919
+ "contact",
11920
+ "leak",
11921
+ "smoke",
11922
+ "occupancy",
11923
+ "binary",
11924
+ "switch",
11925
+ "light"
11926
+ ];
11927
+ var NUMERIC_AGGREGATES = [
11928
+ "mean",
11929
+ "median",
11930
+ "min",
11931
+ "max",
11932
+ "sum"
11933
+ ];
11934
+ var BINARY_AGGREGATES = ["any", "all"];
11935
+ /** How an actuator group decides it is on. Unknown members never count as off. */
11936
+ var ACTIVE_CRITERIA = ["at-least-one", "all"];
11937
+ var AGGREGATE_REDUCERS = [
11938
+ "mean",
11939
+ "median",
11940
+ "min",
11941
+ "max",
11942
+ "sum",
11943
+ "any",
11944
+ "all"
11945
+ ];
11946
+ var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
11947
+ var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
11948
+ var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
11949
+ /** One member. The field is stored so occupancy can name motion or binary. */
11950
+ var HelperMemberSchema = object({
11951
+ source: CompositionSourceRefSchema,
11952
+ cap: string().min(1),
11953
+ fieldPath: string().min(1)
11954
+ });
11955
+ var HelperSpecSchema = discriminatedUnion("kind", [object({
11956
+ kind: literal("group"),
11957
+ templateId: GroupTemplateIdSchema,
11958
+ aggregate: AggregateReducerSchema,
11959
+ members: array(HelperMemberSchema).min(1).max(64),
11960
+ /** Actuator groups only. Readings leave this unset. */
11961
+ active: ActiveCriterionSchema.optional()
11962
+ })]);
11963
+ /** A composed device's stableId is this prefix plus the block id. */
11964
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11965
+ /** Longest snippet a `code` source may carry (slice 4). */
11966
+ var MAX_COMPOSITION_CODE_LENGTH = 2e4;
11884
11967
  /** One field of one capability of one source device. */
11885
11968
  var CompositionFieldReadSchema = object({
11886
11969
  source: CompositionSourceRefSchema,
@@ -11924,7 +12007,33 @@ var CompositionCodeSourceSchema = object({
11924
12007
  var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11925
12008
  CompositionFromSourceSchema,
11926
12009
  CompositionExpressionSourceSchema,
11927
- CompositionCodeSourceSchema
12010
+ CompositionCodeSourceSchema,
12011
+ object({
12012
+ kind: literal("aggregate"),
12013
+ reducer: _enum([
12014
+ "mean",
12015
+ "median",
12016
+ "min",
12017
+ "max",
12018
+ "sum",
12019
+ "any",
12020
+ "all"
12021
+ ]),
12022
+ reads: array(CompositionFieldReadSchema).min(1).max(64),
12023
+ /** `value` is the reading; the others are the member counts. */
12024
+ publish: _enum([
12025
+ "value",
12026
+ "included",
12027
+ "excluded",
12028
+ "total"
12029
+ ]),
12030
+ /** What a `value` publish does when nobody is included. Counts ignore this. */
12031
+ empty: _enum([
12032
+ "null",
12033
+ "omit",
12034
+ "offline"
12035
+ ])
12036
+ })
11928
12037
  ]);
11929
12038
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
11930
12039
  kind: literal("forward"),
@@ -11970,7 +12079,13 @@ var CompositionSchema = object({
11970
12079
  kind: literal("existing"),
11971
12080
  device: CompositionSourceRefSchema
11972
12081
  })]),
11973
- features: array(CompositionFeatureSchema).min(1).max(16)
12082
+ features: array(CompositionFeatureSchema).min(1).max(16),
12083
+ /**
12084
+ * Present when the block is a helper template. Absent on a free
12085
+ * composition (the room example, device 4603). The editor reads this,
12086
+ * never the compiled features.
12087
+ */
12088
+ helper: HelperSpecSchema.optional()
11974
12089
  }).superRefine((composition, ctx) => {
11975
12090
  const seen = /* @__PURE__ */ new Set();
11976
12091
  composition.features.forEach((feature, index) => {
@@ -18228,7 +18343,10 @@ var CompositionProblemSchema = object({
18228
18343
  "target-missing",
18229
18344
  "target-unreadable",
18230
18345
  "not-replaceable",
18231
- "native-capability-replace"
18346
+ "native-capability-replace",
18347
+ "mixed-quantity",
18348
+ "helper-mismatch",
18349
+ "member-constraint"
18232
18350
  ]),
18233
18351
  path: string(),
18234
18352
  message: string()
@@ -18249,7 +18367,8 @@ var CompositionUnavailableModeSchema = _enum([
18249
18367
  "null",
18250
18368
  "offline",
18251
18369
  "unknown",
18252
- "release"
18370
+ "release",
18371
+ "omit"
18253
18372
  ]);
18254
18373
  /**
18255
18374
  * `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
@@ -18463,6 +18582,275 @@ Object.freeze({
18463
18582
  result: ["number", "null"]
18464
18583
  }
18465
18584
  });
18585
+ /**
18586
+ * One catalog row per base reading a group helper can build (D944 §3).
18587
+ * Data, not a form default written into the block.
18588
+ */
18589
+ var NOW = {
18590
+ fieldPath: "lastFetchedAt",
18591
+ expr: "now"
18592
+ };
18593
+ var CHANGED = {
18594
+ fieldPath: "lastChangedAt",
18595
+ expr: "now"
18596
+ };
18597
+ function numeric(input) {
18598
+ return {
18599
+ ...input,
18600
+ family: "numeric",
18601
+ deviceType: DeviceType.Sensor,
18602
+ memberDeviceType: DeviceType.Sensor,
18603
+ commandCaps: [],
18604
+ baseUnit: baseUnitOf(input.quantity),
18605
+ aggregates: NUMERIC_AGGREGATES,
18606
+ accept: [{
18607
+ cap: input.outputCap,
18608
+ fieldPath: input.outputField
18609
+ }]
18610
+ };
18611
+ }
18612
+ function binary(input) {
18613
+ return {
18614
+ ...input,
18615
+ family: "binary",
18616
+ deviceType: DeviceType.Sensor,
18617
+ memberDeviceType: DeviceType.Sensor,
18618
+ commandCaps: [],
18619
+ quantity: "none",
18620
+ baseUnit: void 0,
18621
+ aggregates: BINARY_AGGREGATES,
18622
+ empty: "offline"
18623
+ };
18624
+ }
18625
+ var GROUP_TEMPLATES = [
18626
+ numeric({
18627
+ id: "temperature",
18628
+ summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
18629
+ role: DeviceRole.TemperatureSensor,
18630
+ outputCap: "temperature-sensor",
18631
+ outputField: "celsius",
18632
+ quantity: "temperature",
18633
+ defaultAggregate: "mean",
18634
+ empty: "null",
18635
+ companions: [NOW]
18636
+ }),
18637
+ numeric({
18638
+ id: "humidity",
18639
+ summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
18640
+ role: DeviceRole.HumiditySensor,
18641
+ outputCap: "humidity-sensor",
18642
+ outputField: "percent",
18643
+ quantity: "humidity",
18644
+ defaultAggregate: "mean",
18645
+ empty: "null",
18646
+ companions: [NOW]
18647
+ }),
18648
+ numeric({
18649
+ id: "pressure",
18650
+ summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
18651
+ role: DeviceRole.PressureSensor,
18652
+ outputCap: "pressure-sensor",
18653
+ outputField: "hpa",
18654
+ quantity: "pressure",
18655
+ defaultAggregate: "mean",
18656
+ empty: "null",
18657
+ companions: [NOW]
18658
+ }),
18659
+ numeric({
18660
+ id: "illuminance",
18661
+ summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
18662
+ role: DeviceRole.AmbientLightSensor,
18663
+ outputCap: "ambient-light-sensor",
18664
+ outputField: "lux",
18665
+ quantity: "illuminance",
18666
+ defaultAggregate: "mean",
18667
+ empty: "null",
18668
+ companions: [NOW]
18669
+ }),
18670
+ numeric({
18671
+ id: "power",
18672
+ summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
18673
+ role: DeviceRole.PowerSensor,
18674
+ outputCap: "power-meter",
18675
+ outputField: "watts",
18676
+ quantity: "power",
18677
+ defaultAggregate: "sum",
18678
+ empty: "omit",
18679
+ companions: [NOW]
18680
+ }),
18681
+ numeric({
18682
+ id: "energy",
18683
+ summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
18684
+ role: DeviceRole.EnergySensor,
18685
+ outputCap: "power-meter",
18686
+ outputField: "kwhTotal",
18687
+ quantity: "energy",
18688
+ defaultAggregate: "sum",
18689
+ empty: "omit",
18690
+ companions: [NOW]
18691
+ }),
18692
+ numeric({
18693
+ id: "battery",
18694
+ summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
18695
+ role: DeviceRole.BatterySensor,
18696
+ outputCap: "battery",
18697
+ outputField: "percentage",
18698
+ quantity: "percentage",
18699
+ defaultAggregate: "mean",
18700
+ empty: "null",
18701
+ companions: [
18702
+ {
18703
+ fieldPath: "charging",
18704
+ expr: "\"unknown\""
18705
+ },
18706
+ {
18707
+ fieldPath: "sleeping",
18708
+ expr: "false"
18709
+ },
18710
+ {
18711
+ fieldPath: "lastUpdated",
18712
+ expr: "now"
18713
+ }
18714
+ ]
18715
+ }),
18716
+ numeric({
18717
+ id: "numeric",
18718
+ summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
18719
+ role: DeviceRole.NumericSensor,
18720
+ outputCap: "numeric-sensor",
18721
+ outputField: "value",
18722
+ quantity: "device",
18723
+ defaultAggregate: "mean",
18724
+ empty: "null",
18725
+ companions: [NOW]
18726
+ }),
18727
+ binary({
18728
+ id: "motion",
18729
+ summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
18730
+ role: DeviceRole.MotionSensor,
18731
+ outputCap: "motion",
18732
+ outputField: "detected",
18733
+ defaultAggregate: "any",
18734
+ accept: [{
18735
+ cap: "motion",
18736
+ fieldPath: "detected"
18737
+ }],
18738
+ companions: [{
18739
+ fieldPath: "lastDetectedAt",
18740
+ expr: "null"
18741
+ }, {
18742
+ fieldPath: "autoClearAfterMs",
18743
+ expr: "null"
18744
+ }]
18745
+ }),
18746
+ binary({
18747
+ id: "contact",
18748
+ summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
18749
+ role: DeviceRole.ContactSensor,
18750
+ outputCap: "contact",
18751
+ outputField: "entryOpen",
18752
+ defaultAggregate: "any",
18753
+ accept: [{
18754
+ cap: "contact",
18755
+ fieldPath: "entryOpen"
18756
+ }],
18757
+ companions: [CHANGED]
18758
+ }),
18759
+ binary({
18760
+ id: "leak",
18761
+ summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
18762
+ role: DeviceRole.LeakSensor,
18763
+ outputCap: "flood",
18764
+ outputField: "flooded",
18765
+ defaultAggregate: "any",
18766
+ accept: [{
18767
+ cap: "flood",
18768
+ fieldPath: "flooded"
18769
+ }],
18770
+ companions: [CHANGED]
18771
+ }),
18772
+ binary({
18773
+ id: "smoke",
18774
+ summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
18775
+ role: DeviceRole.SmokeSensor,
18776
+ outputCap: "smoke",
18777
+ outputField: "detected",
18778
+ defaultAggregate: "any",
18779
+ accept: [{
18780
+ cap: "smoke",
18781
+ fieldPath: "detected"
18782
+ }],
18783
+ companions: [CHANGED]
18784
+ }),
18785
+ binary({
18786
+ id: "occupancy",
18787
+ summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
18788
+ role: DeviceRole.BinarySensor,
18789
+ outputCap: "binary",
18790
+ outputField: "on",
18791
+ defaultAggregate: "any",
18792
+ accept: [{
18793
+ cap: "motion",
18794
+ fieldPath: "detected"
18795
+ }, {
18796
+ cap: "binary",
18797
+ fieldPath: "on"
18798
+ }],
18799
+ companions: [CHANGED]
18800
+ }),
18801
+ binary({
18802
+ id: "binary",
18803
+ summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
18804
+ role: DeviceRole.BinarySensor,
18805
+ outputCap: "binary",
18806
+ outputField: "on",
18807
+ defaultAggregate: "any",
18808
+ accept: [{
18809
+ cap: "binary",
18810
+ fieldPath: "on"
18811
+ }],
18812
+ companions: [CHANGED]
18813
+ }),
18814
+ actuator({
18815
+ id: "switch",
18816
+ summary: "On when at least one switch is on, or when all of them are. Offline and unknown members are left out of that decision, never read as off, and still receive the command.",
18817
+ deviceType: DeviceType.Switch,
18818
+ outputCap: "switch",
18819
+ commandCaps: ["switch"]
18820
+ }),
18821
+ actuator({
18822
+ id: "light",
18823
+ summary: "On when at least one light is on, or when all of them are. Brightness and colour are offered only when every member has them. A command is not sent to a member that lacks it.",
18824
+ deviceType: DeviceType.Light,
18825
+ outputCap: "switch",
18826
+ commandCaps: [
18827
+ "switch",
18828
+ "brightness",
18829
+ "color"
18830
+ ]
18831
+ })
18832
+ ];
18833
+ function actuator(input) {
18834
+ return {
18835
+ ...input,
18836
+ family: "actuator",
18837
+ role: void 0,
18838
+ memberDeviceType: input.deviceType,
18839
+ outputField: "on",
18840
+ quantity: "none",
18841
+ baseUnit: void 0,
18842
+ aggregates: BINARY_AGGREGATES,
18843
+ defaultAggregate: "any",
18844
+ empty: "offline",
18845
+ accept: [{
18846
+ cap: "switch",
18847
+ fieldPath: "on"
18848
+ }],
18849
+ companions: [CHANGED]
18850
+ };
18851
+ }
18852
+ new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18853
+ DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
18466
18854
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18467
18855
  /**
18468
18856
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -45469,6 +45857,8 @@ var NcSystemEventKindSchema = _enum([
45469
45857
  "detection-blind",
45470
45858
  "motion-noisy",
45471
45859
  "motion-calm",
45860
+ "package-llm-silent",
45861
+ "package-llm-answered",
45472
45862
  "recording-stalled",
45473
45863
  "recording-healthy",
45474
45864
  "recording-degraded",
@@ -56560,6 +56950,28 @@ var PackageVersionInfoSchema = object({
56560
56950
  deprecated: string().optional(),
56561
56951
  distTags: array(string()).readonly()
56562
56952
  });
56953
+ /**
56954
+ * One published document. `ok` is markdown from the registry. `missing` means
56955
+ * the registry answered and the file was not there. `error` is a registry or
56956
+ * tarball failure — never an empty string standing in for either.
56957
+ */
56958
+ var PackageDocBodySchema = discriminatedUnion("status", [
56959
+ object({
56960
+ status: literal("ok"),
56961
+ markdown: string()
56962
+ }),
56963
+ object({ status: literal("missing") }),
56964
+ object({
56965
+ status: literal("error"),
56966
+ message: string()
56967
+ })
56968
+ ]);
56969
+ var PackageDocsSchema = object({
56970
+ name: string(),
56971
+ version: string(),
56972
+ readme: PackageDocBodySchema,
56973
+ changelog: PackageDocBodySchema
56974
+ });
56563
56975
  var SearchResultSchema = object({
56564
56976
  name: string(),
56565
56977
  version: string(),
@@ -56778,7 +57190,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
56778
57190
  }), object({ success: literal(true) }), {
56779
57191
  kind: "mutation",
56780
57192
  auth: "admin"
56781
- }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
57193
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
57194
+ name: string().min(1),
57195
+ version: string().min(1).optional()
57196
+ }), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
56782
57197
  kind: "mutation",
56783
57198
  auth: "admin"
56784
57199
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -60097,6 +60512,88 @@ var gasCapability = {
60097
60512
  * whether persisting is worth a SQLite commit. */
60098
60513
  volatileStateFields: ["lastChangedAt"]
60099
60514
  };
60515
+ var GroupCommandsSchema = object({
60516
+ /** One row per member that has been commanded. A later command replaces that member's row. */
60517
+ results: array(object({
60518
+ deviceId: number().int().nonnegative(),
60519
+ cap: string().min(1),
60520
+ method: string().min(1),
60521
+ ok: boolean(),
60522
+ error: string().optional(),
60523
+ /** Ms epoch of the attempt. */
60524
+ at: number()
60525
+ })) });
60526
+ var groupCommandsCapability = {
60527
+ name: "group-commands",
60528
+ scope: "device",
60529
+ deviceNative: true,
60530
+ mode: "singleton",
60531
+ deviceTypes: [DeviceType.Switch, DeviceType.Light],
60532
+ methods: {},
60533
+ status: {
60534
+ schema: GroupCommandsSchema,
60535
+ kind: "push"
60536
+ },
60537
+ runtimeState: GroupCommandsSchema,
60538
+ /**
60539
+ * Runtime-state durability: **session** — the last attempt. A restored
60540
+ * failure would outlive the command that caused it.
60541
+ *
60542
+ * See `RuntimeStateDurability`. Enforced by
60543
+ * `scripts/check-runtime-state-durability.ts`.
60544
+ */
60545
+ durability: "session",
60546
+ history: "none"
60547
+ };
60548
+ /**
60549
+ * How many members of a helper group answered (D944). Counts are integers,
60550
+ * not measurements: zero included is a real count, never a stand-in reading.
60551
+ * The reading itself stays on the output capability. History is none — the
60552
+ * series that later statistics read is the output cap's own history block.
60553
+ */
60554
+ var GroupStatusSchema = object({
60555
+ /** Members whose current value entered the aggregate. */
60556
+ included: number().int().nonnegative().meta(readingMeta("count", {
60557
+ precision: 0,
60558
+ label: "Reporting"
60559
+ })),
60560
+ /** Members left out: offline, unknown, or not a finite reading (D393). */
60561
+ excluded: number().int().nonnegative().meta(readingMeta("count", {
60562
+ precision: 0,
60563
+ label: "Excluded"
60564
+ })),
60565
+ /** `included` + `excluded`. */
60566
+ total: number().int().nonnegative().meta(readingMeta("count", {
60567
+ precision: 0,
60568
+ label: "Members"
60569
+ }))
60570
+ });
60571
+ var groupStatusCapability = {
60572
+ name: "group-status",
60573
+ scope: "device",
60574
+ deviceNative: true,
60575
+ mode: "singleton",
60576
+ deviceTypes: [
60577
+ DeviceType.Sensor,
60578
+ DeviceType.Switch,
60579
+ DeviceType.Light
60580
+ ],
60581
+ methods: {},
60582
+ status: {
60583
+ schema: GroupStatusSchema,
60584
+ kind: "push"
60585
+ },
60586
+ runtimeState: GroupStatusSchema,
60587
+ /**
60588
+ * Runtime-state durability: **session** — recomputed from members on the
60589
+ * next source event; a restored count would outlive the readings it named.
60590
+ *
60591
+ * See `RuntimeStateDurability`. Enforced by
60592
+ * `scripts/check-runtime-state-durability.ts`.
60593
+ */
60594
+ durability: "session",
60595
+ history: "none"
60596
+ };
60100
60597
  var HeatingValveStatusSchema = object({
60101
60598
  /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
60102
60599
  position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -61866,12 +62363,18 @@ var motionCapability = {
61866
62363
  methods: {
61867
62364
  /**
61868
62365
  * Pull the current motion state synchronously. Convenience shortcut
61869
- * for consumers that don't need the full status object; equivalent
61870
- * to `getStatus()?.detected ?? false`. Will likely be folded into
61871
- * `getStatus` once the auto-injected status surface lands in every
61872
- * consumer.
62366
+ * for consumers that don't need the full status object. A composed
62367
+ * group answers from its slice (D944): unknown throws, it is not off.
61873
62368
  */
61874
62369
  isDetected: method(object({ deviceId: number() }), boolean()) },
62370
+ /**
62371
+ * A composed motion group serves `isDetected` from `detected` (D944).
62372
+ * Without this the cap stays uncomposable (`has-commands`).
62373
+ */
62374
+ composedMethods: { isDetected: {
62375
+ kind: "slice",
62376
+ field: "detected"
62377
+ } },
61875
62378
  events: {
61876
62379
  /**
61877
62380
  * Fires every time the runner transitions a camera between
@@ -70062,6 +70565,8 @@ var DEVICE_LOCAL_STATE_CAPS = {
70062
70565
  featureProbe: featureProbeCapability,
70063
70566
  flood: floodCapability,
70064
70567
  gas: gasCapability,
70568
+ groupCommands: groupCommandsCapability,
70569
+ groupStatus: groupStatusCapability,
70065
70570
  heatingValve: heatingValveCapability,
70066
70571
  humidifier: humidifierCapability,
70067
70572
  humiditySensor: humiditySensorCapability,
@@ -71438,6 +71943,13 @@ Object.freeze({
71438
71943
  access: "view",
71439
71944
  role: "admin"
71440
71945
  },
71946
+ "addons.getPackageDocs": {
71947
+ capName: "addons",
71948
+ capScope: "system",
71949
+ addonId: null,
71950
+ access: "view",
71951
+ role: "admin"
71952
+ },
71441
71953
  "addons.getVersions": {
71442
71954
  capName: "addons",
71443
71955
  capScope: "system",
@@ -74546,6 +75058,20 @@ Object.freeze({
74546
75058
  access: "view",
74547
75059
  role: "viewer"
74548
75060
  },
75061
+ "groupCommands.getStatus": {
75062
+ capName: "group-commands",
75063
+ capScope: "device",
75064
+ addonId: null,
75065
+ access: "view",
75066
+ role: "viewer"
75067
+ },
75068
+ "groupStatus.getStatus": {
75069
+ capName: "group-status",
75070
+ capScope: "device",
75071
+ addonId: null,
75072
+ access: "view",
75073
+ role: "viewer"
75074
+ },
74549
75075
  "heatingValve.getStatus": {
74550
75076
  capName: "heating-valve",
74551
75077
  capScope: "device",
@@ -84368,6 +84894,37 @@ var SENSOR_CAP_VOCABULARY = {
84368
84894
  icon: "flame"
84369
84895
  }]
84370
84896
  },
84897
+ "group-commands": {
84898
+ scope: "device",
84899
+ noun: t("Group command", "Comando di gruppo")
84900
+ },
84901
+ "group-status": {
84902
+ scope: "device",
84903
+ noun: t("Group", "Gruppo"),
84904
+ state: [
84905
+ {
84906
+ kind: "numeric",
84907
+ field: "included",
84908
+ quantity: t("the members reporting", "i membri che rispondono"),
84909
+ label: t("Reporting", "Rispondono"),
84910
+ icon: "users"
84911
+ },
84912
+ {
84913
+ kind: "numeric",
84914
+ field: "excluded",
84915
+ quantity: t("the members left out", "i membri esclusi"),
84916
+ label: t("Excluded", "Esclusi"),
84917
+ icon: "users"
84918
+ },
84919
+ {
84920
+ kind: "numeric",
84921
+ field: "total",
84922
+ quantity: t("the member count", "il numero di membri"),
84923
+ label: t("Members", "Membri"),
84924
+ icon: "sigma"
84925
+ }
84926
+ ]
84927
+ },
84371
84928
  "humidity-sensor": {
84372
84929
  scope: "device",
84373
84930
  noun: t("Humidity", "Umidità"),
@@ -85833,6 +86390,16 @@ Object.freeze({
85833
86390
  form: "single",
85834
86391
  optional: false
85835
86392
  }],
86393
+ "groupCommands.getStatus": [{
86394
+ name: "deviceId",
86395
+ form: "single",
86396
+ optional: false
86397
+ }],
86398
+ "groupStatus.getStatus": [{
86399
+ name: "deviceId",
86400
+ form: "single",
86401
+ optional: false
86402
+ }],
85836
86403
  "heatingValve.getStatus": [{
85837
86404
  name: "deviceId",
85838
86405
  form: "single",
@@ -87817,6 +88384,8 @@ new Map(Object.entries({
87817
88384
  "detection-blind": "device-events",
87818
88385
  "motion-noisy": "device-events",
87819
88386
  "motion-calm": "device-events",
88387
+ "package-llm-silent": "device-events",
88388
+ "package-llm-answered": "device-events",
87820
88389
  "recording-stalled": "device-events",
87821
88390
  "recording-healthy": "device-events",
87822
88391
  "recording-degraded": "device-events",
@@ -87900,6 +88469,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
87900
88469
  label: "Motion without a subject",
87901
88470
  kinds: ["motion-noisy", "motion-calm"]
87902
88471
  },
88472
+ {
88473
+ id: "package-llm",
88474
+ family: "device-events",
88475
+ label: "Package confirm",
88476
+ kinds: ["package-llm-silent", "package-llm-answered"]
88477
+ },
87903
88478
  {
87904
88479
  id: "recording",
87905
88480
  family: "device-events",
@@ -88081,6 +88656,8 @@ var DEVICE_EVENTS = [
88081
88656
  "detection-blind",
88082
88657
  "motion-noisy",
88083
88658
  "motion-calm",
88659
+ "package-llm-silent",
88660
+ "package-llm-answered",
88084
88661
  "recording-stalled",
88085
88662
  "recording-healthy",
88086
88663
  "recording-degraded",
@@ -88349,6 +88926,15 @@ new Map([
88349
88926
  snapshotLabel: "Cameras with constant motion now",
88350
88927
  snapshotSection: null
88351
88928
  },
88929
+ {
88930
+ id: "package-llm-confirm",
88931
+ family: "device-events",
88932
+ label: "Package confirm (not answering / answering again)",
88933
+ bad: ["package-llm-silent"],
88934
+ recovery: ["package-llm-answered"],
88935
+ snapshotLabel: "Cameras whose package confirm is not answering",
88936
+ snapshotSection: null
88937
+ },
88352
88938
  {
88353
88939
  id: "recording-health",
88354
88940
  family: "device-events",