@camstack/addon-provider-bosch 0.1.25 → 0.1.26

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.
@@ -1,5 +1,5 @@
1
1
  require("node:crypto");
2
- //#region ../types/dist/event-category-DHXxB8t9.mjs
2
+ //#region ../types/dist/event-category-CT-hz5Rb.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -325,6 +325,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
325
325
  /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
326
326
  EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
327
327
  /**
328
+ * A camera's package LLM confirm has failed closed three times in a row
329
+ * (D931, 2026-10-26). One edge per camera until
330
+ * {@link PipelinePackageLlmAnswered}.
331
+ */
332
+ EventCategory["PipelinePackageLlmSilent"] = "pipeline.package-llm-silent";
333
+ /** The recovery edge of {@link PipelinePackageLlmSilent}: a confirm returned yes or no. */
334
+ EventCategory["PipelinePackageLlmAnswered"] = "pipeline.package-llm-answered";
335
+ /**
328
336
  * Per-camera pipeline config was mutated by the orchestrator
329
337
  * (a settings change via `setAgentInferenceDevices` /
330
338
  * `setCameraStepToggle` / `setCameraStepSettings`). Orchestrator
@@ -5434,7 +5442,7 @@ var ZodIssueCode = {
5434
5442
  var ZodFirstPartyTypeKind;
5435
5443
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5436
5444
  //#endregion
5437
- //#region ../types/dist/sleep-CARd6wZF.mjs
5445
+ //#region ../types/dist/sleep-bykKrTgu.mjs
5438
5446
  /**
5439
5447
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5440
5448
  * window to float samples (D455).
@@ -8653,6 +8661,8 @@ var CAP_NAMES = Object.freeze([
8653
8661
  "filesystem-browse",
8654
8662
  "flood",
8655
8663
  "gas",
8664
+ "group-commands",
8665
+ "group-status",
8656
8666
  "heating-valve",
8657
8667
  "humidifier",
8658
8668
  "humidity-sensor",
@@ -9471,6 +9481,20 @@ Object.freeze({
9471
9481
  "path": "detected",
9472
9482
  "valueType": "boolean"
9473
9483
  }],
9484
+ "group-status": [
9485
+ {
9486
+ "path": "included",
9487
+ "valueType": "number"
9488
+ },
9489
+ {
9490
+ "path": "excluded",
9491
+ "valueType": "number"
9492
+ },
9493
+ {
9494
+ "path": "total",
9495
+ "valueType": "number"
9496
+ }
9497
+ ],
9474
9498
  "heating-valve": [{
9475
9499
  "path": "position",
9476
9500
  "valueType": "number"
@@ -10812,7 +10836,7 @@ function errMsg(err) {
10812
10836
  return String(err);
10813
10837
  }
10814
10838
  //#endregion
10815
- //#region ../types/dist/composition-kEl9mevu.mjs
10839
+ //#region ../types/dist/composition-OhpuespA.mjs
10816
10840
  /**
10817
10841
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10818
10842
  *
@@ -11567,15 +11591,74 @@ function validateExpressionSource(src) {
11567
11591
  }
11568
11592
  return null;
11569
11593
  }
11570
- /** A composed device's stableId is this prefix plus the block id. */
11571
- var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11572
- /** Longest snippet a `code` source may carry (slice 4). */
11573
- var MAX_COMPOSITION_CODE_LENGTH = 2e4;
11594
+ /**
11595
+ * A composition source identity: `(addonId, stableId)`, never a numeric device
11596
+ * id. Split out so helper schemas can name it without a cycle through
11597
+ * `composition.ts` (D659).
11598
+ */
11574
11599
  var CompositionSourceRefSchema = object({
11575
11600
  /** The owning addon; `stableId` is unique only within it. */
11576
11601
  addonId: string().min(1),
11577
11602
  stableId: string().min(1)
11578
11603
  });
11604
+ var GROUP_TEMPLATE_IDS = [
11605
+ "temperature",
11606
+ "humidity",
11607
+ "pressure",
11608
+ "illuminance",
11609
+ "power",
11610
+ "energy",
11611
+ "battery",
11612
+ "numeric",
11613
+ "motion",
11614
+ "contact",
11615
+ "leak",
11616
+ "smoke",
11617
+ "occupancy",
11618
+ "binary",
11619
+ "switch",
11620
+ "light"
11621
+ ];
11622
+ var NUMERIC_AGGREGATES = [
11623
+ "mean",
11624
+ "median",
11625
+ "min",
11626
+ "max",
11627
+ "sum"
11628
+ ];
11629
+ var BINARY_AGGREGATES = ["any", "all"];
11630
+ /** How an actuator group decides it is on. Unknown members never count as off. */
11631
+ var ACTIVE_CRITERIA = ["at-least-one", "all"];
11632
+ var AGGREGATE_REDUCERS = [
11633
+ "mean",
11634
+ "median",
11635
+ "min",
11636
+ "max",
11637
+ "sum",
11638
+ "any",
11639
+ "all"
11640
+ ];
11641
+ var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
11642
+ var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
11643
+ var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
11644
+ /** One member. The field is stored so occupancy can name motion or binary. */
11645
+ var HelperMemberSchema = object({
11646
+ source: CompositionSourceRefSchema,
11647
+ cap: string().min(1),
11648
+ fieldPath: string().min(1)
11649
+ });
11650
+ var HelperSpecSchema = discriminatedUnion("kind", [object({
11651
+ kind: literal("group"),
11652
+ templateId: GroupTemplateIdSchema,
11653
+ aggregate: AggregateReducerSchema,
11654
+ members: array(HelperMemberSchema).min(1).max(64),
11655
+ /** Actuator groups only. Readings leave this unset. */
11656
+ active: ActiveCriterionSchema.optional()
11657
+ })]);
11658
+ /** A composed device's stableId is this prefix plus the block id. */
11659
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11660
+ /** Longest snippet a `code` source may carry (slice 4). */
11661
+ var MAX_COMPOSITION_CODE_LENGTH = 2e4;
11579
11662
  /** One field of one capability of one source device. */
11580
11663
  var CompositionFieldReadSchema = object({
11581
11664
  source: CompositionSourceRefSchema,
@@ -11619,7 +11702,33 @@ var CompositionCodeSourceSchema = object({
11619
11702
  var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11620
11703
  CompositionFromSourceSchema,
11621
11704
  CompositionExpressionSourceSchema,
11622
- CompositionCodeSourceSchema
11705
+ CompositionCodeSourceSchema,
11706
+ object({
11707
+ kind: literal("aggregate"),
11708
+ reducer: _enum([
11709
+ "mean",
11710
+ "median",
11711
+ "min",
11712
+ "max",
11713
+ "sum",
11714
+ "any",
11715
+ "all"
11716
+ ]),
11717
+ reads: array(CompositionFieldReadSchema).min(1).max(64),
11718
+ /** `value` is the reading; the others are the member counts. */
11719
+ publish: _enum([
11720
+ "value",
11721
+ "included",
11722
+ "excluded",
11723
+ "total"
11724
+ ]),
11725
+ /** What a `value` publish does when nobody is included. Counts ignore this. */
11726
+ empty: _enum([
11727
+ "null",
11728
+ "omit",
11729
+ "offline"
11730
+ ])
11731
+ })
11623
11732
  ]);
11624
11733
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
11625
11734
  kind: literal("forward"),
@@ -11665,7 +11774,13 @@ var CompositionSchema = object({
11665
11774
  kind: literal("existing"),
11666
11775
  device: CompositionSourceRefSchema
11667
11776
  })]),
11668
- features: array(CompositionFeatureSchema).min(1).max(16)
11777
+ features: array(CompositionFeatureSchema).min(1).max(16),
11778
+ /**
11779
+ * Present when the block is a helper template. Absent on a free
11780
+ * composition (the room example, device 4603). The editor reads this,
11781
+ * never the compiled features.
11782
+ */
11783
+ helper: HelperSpecSchema.optional()
11669
11784
  }).superRefine((composition, ctx) => {
11670
11785
  const seen = /* @__PURE__ */ new Set();
11671
11786
  composition.features.forEach((feature, index) => {
@@ -17874,7 +17989,10 @@ var CompositionProblemSchema = object({
17874
17989
  "target-missing",
17875
17990
  "target-unreadable",
17876
17991
  "not-replaceable",
17877
- "native-capability-replace"
17992
+ "native-capability-replace",
17993
+ "mixed-quantity",
17994
+ "helper-mismatch",
17995
+ "member-constraint"
17878
17996
  ]),
17879
17997
  path: string(),
17880
17998
  message: string()
@@ -17895,7 +18013,8 @@ var CompositionUnavailableModeSchema = _enum([
17895
18013
  "null",
17896
18014
  "offline",
17897
18015
  "unknown",
17898
- "release"
18016
+ "release",
18017
+ "omit"
17899
18018
  ]);
17900
18019
  /**
17901
18020
  * `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
@@ -18109,6 +18228,275 @@ Object.freeze({
18109
18228
  result: ["number", "null"]
18110
18229
  }
18111
18230
  });
18231
+ /**
18232
+ * One catalog row per base reading a group helper can build (D944 §3).
18233
+ * Data, not a form default written into the block.
18234
+ */
18235
+ var NOW = {
18236
+ fieldPath: "lastFetchedAt",
18237
+ expr: "now"
18238
+ };
18239
+ var CHANGED = {
18240
+ fieldPath: "lastChangedAt",
18241
+ expr: "now"
18242
+ };
18243
+ function numeric(input) {
18244
+ return {
18245
+ ...input,
18246
+ family: "numeric",
18247
+ deviceType: DeviceType.Sensor,
18248
+ memberDeviceType: DeviceType.Sensor,
18249
+ commandCaps: [],
18250
+ baseUnit: baseUnitOf(input.quantity),
18251
+ aggregates: NUMERIC_AGGREGATES,
18252
+ accept: [{
18253
+ cap: input.outputCap,
18254
+ fieldPath: input.outputField
18255
+ }]
18256
+ };
18257
+ }
18258
+ function binary(input) {
18259
+ return {
18260
+ ...input,
18261
+ family: "binary",
18262
+ deviceType: DeviceType.Sensor,
18263
+ memberDeviceType: DeviceType.Sensor,
18264
+ commandCaps: [],
18265
+ quantity: "none",
18266
+ baseUnit: void 0,
18267
+ aggregates: BINARY_AGGREGATES,
18268
+ empty: "offline"
18269
+ };
18270
+ }
18271
+ var GROUP_TEMPLATES = [
18272
+ numeric({
18273
+ id: "temperature",
18274
+ summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
18275
+ role: DeviceRole.TemperatureSensor,
18276
+ outputCap: "temperature-sensor",
18277
+ outputField: "celsius",
18278
+ quantity: "temperature",
18279
+ defaultAggregate: "mean",
18280
+ empty: "null",
18281
+ companions: [NOW]
18282
+ }),
18283
+ numeric({
18284
+ id: "humidity",
18285
+ summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
18286
+ role: DeviceRole.HumiditySensor,
18287
+ outputCap: "humidity-sensor",
18288
+ outputField: "percent",
18289
+ quantity: "humidity",
18290
+ defaultAggregate: "mean",
18291
+ empty: "null",
18292
+ companions: [NOW]
18293
+ }),
18294
+ numeric({
18295
+ id: "pressure",
18296
+ summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
18297
+ role: DeviceRole.PressureSensor,
18298
+ outputCap: "pressure-sensor",
18299
+ outputField: "hpa",
18300
+ quantity: "pressure",
18301
+ defaultAggregate: "mean",
18302
+ empty: "null",
18303
+ companions: [NOW]
18304
+ }),
18305
+ numeric({
18306
+ id: "illuminance",
18307
+ summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
18308
+ role: DeviceRole.AmbientLightSensor,
18309
+ outputCap: "ambient-light-sensor",
18310
+ outputField: "lux",
18311
+ quantity: "illuminance",
18312
+ defaultAggregate: "mean",
18313
+ empty: "null",
18314
+ companions: [NOW]
18315
+ }),
18316
+ numeric({
18317
+ id: "power",
18318
+ summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
18319
+ role: DeviceRole.PowerSensor,
18320
+ outputCap: "power-meter",
18321
+ outputField: "watts",
18322
+ quantity: "power",
18323
+ defaultAggregate: "sum",
18324
+ empty: "omit",
18325
+ companions: [NOW]
18326
+ }),
18327
+ numeric({
18328
+ id: "energy",
18329
+ summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
18330
+ role: DeviceRole.EnergySensor,
18331
+ outputCap: "power-meter",
18332
+ outputField: "kwhTotal",
18333
+ quantity: "energy",
18334
+ defaultAggregate: "sum",
18335
+ empty: "omit",
18336
+ companions: [NOW]
18337
+ }),
18338
+ numeric({
18339
+ id: "battery",
18340
+ summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
18341
+ role: DeviceRole.BatterySensor,
18342
+ outputCap: "battery",
18343
+ outputField: "percentage",
18344
+ quantity: "percentage",
18345
+ defaultAggregate: "mean",
18346
+ empty: "null",
18347
+ companions: [
18348
+ {
18349
+ fieldPath: "charging",
18350
+ expr: "\"unknown\""
18351
+ },
18352
+ {
18353
+ fieldPath: "sleeping",
18354
+ expr: "false"
18355
+ },
18356
+ {
18357
+ fieldPath: "lastUpdated",
18358
+ expr: "now"
18359
+ }
18360
+ ]
18361
+ }),
18362
+ numeric({
18363
+ id: "numeric",
18364
+ summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
18365
+ role: DeviceRole.NumericSensor,
18366
+ outputCap: "numeric-sensor",
18367
+ outputField: "value",
18368
+ quantity: "device",
18369
+ defaultAggregate: "mean",
18370
+ empty: "null",
18371
+ companions: [NOW]
18372
+ }),
18373
+ binary({
18374
+ id: "motion",
18375
+ summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
18376
+ role: DeviceRole.MotionSensor,
18377
+ outputCap: "motion",
18378
+ outputField: "detected",
18379
+ defaultAggregate: "any",
18380
+ accept: [{
18381
+ cap: "motion",
18382
+ fieldPath: "detected"
18383
+ }],
18384
+ companions: [{
18385
+ fieldPath: "lastDetectedAt",
18386
+ expr: "null"
18387
+ }, {
18388
+ fieldPath: "autoClearAfterMs",
18389
+ expr: "null"
18390
+ }]
18391
+ }),
18392
+ binary({
18393
+ id: "contact",
18394
+ summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
18395
+ role: DeviceRole.ContactSensor,
18396
+ outputCap: "contact",
18397
+ outputField: "entryOpen",
18398
+ defaultAggregate: "any",
18399
+ accept: [{
18400
+ cap: "contact",
18401
+ fieldPath: "entryOpen"
18402
+ }],
18403
+ companions: [CHANGED]
18404
+ }),
18405
+ binary({
18406
+ id: "leak",
18407
+ summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
18408
+ role: DeviceRole.LeakSensor,
18409
+ outputCap: "flood",
18410
+ outputField: "flooded",
18411
+ defaultAggregate: "any",
18412
+ accept: [{
18413
+ cap: "flood",
18414
+ fieldPath: "flooded"
18415
+ }],
18416
+ companions: [CHANGED]
18417
+ }),
18418
+ binary({
18419
+ id: "smoke",
18420
+ summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
18421
+ role: DeviceRole.SmokeSensor,
18422
+ outputCap: "smoke",
18423
+ outputField: "detected",
18424
+ defaultAggregate: "any",
18425
+ accept: [{
18426
+ cap: "smoke",
18427
+ fieldPath: "detected"
18428
+ }],
18429
+ companions: [CHANGED]
18430
+ }),
18431
+ binary({
18432
+ id: "occupancy",
18433
+ summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
18434
+ role: DeviceRole.BinarySensor,
18435
+ outputCap: "binary",
18436
+ outputField: "on",
18437
+ defaultAggregate: "any",
18438
+ accept: [{
18439
+ cap: "motion",
18440
+ fieldPath: "detected"
18441
+ }, {
18442
+ cap: "binary",
18443
+ fieldPath: "on"
18444
+ }],
18445
+ companions: [CHANGED]
18446
+ }),
18447
+ binary({
18448
+ id: "binary",
18449
+ summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
18450
+ role: DeviceRole.BinarySensor,
18451
+ outputCap: "binary",
18452
+ outputField: "on",
18453
+ defaultAggregate: "any",
18454
+ accept: [{
18455
+ cap: "binary",
18456
+ fieldPath: "on"
18457
+ }],
18458
+ companions: [CHANGED]
18459
+ }),
18460
+ actuator({
18461
+ id: "switch",
18462
+ 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.",
18463
+ deviceType: DeviceType.Switch,
18464
+ outputCap: "switch",
18465
+ commandCaps: ["switch"]
18466
+ }),
18467
+ actuator({
18468
+ id: "light",
18469
+ 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.",
18470
+ deviceType: DeviceType.Light,
18471
+ outputCap: "switch",
18472
+ commandCaps: [
18473
+ "switch",
18474
+ "brightness",
18475
+ "color"
18476
+ ]
18477
+ })
18478
+ ];
18479
+ function actuator(input) {
18480
+ return {
18481
+ ...input,
18482
+ family: "actuator",
18483
+ role: void 0,
18484
+ memberDeviceType: input.deviceType,
18485
+ outputField: "on",
18486
+ quantity: "none",
18487
+ baseUnit: void 0,
18488
+ aggregates: BINARY_AGGREGATES,
18489
+ defaultAggregate: "any",
18490
+ empty: "offline",
18491
+ accept: [{
18492
+ cap: "switch",
18493
+ fieldPath: "on"
18494
+ }],
18495
+ companions: [CHANGED]
18496
+ };
18497
+ }
18498
+ new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18499
+ DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
18112
18500
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18113
18501
  /**
18114
18502
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -45002,6 +45390,8 @@ var NcSystemEventKindSchema = _enum([
45002
45390
  "detection-blind",
45003
45391
  "motion-noisy",
45004
45392
  "motion-calm",
45393
+ "package-llm-silent",
45394
+ "package-llm-answered",
45005
45395
  "recording-stalled",
45006
45396
  "recording-healthy",
45007
45397
  "recording-degraded",
@@ -56093,6 +56483,28 @@ var PackageVersionInfoSchema = object({
56093
56483
  deprecated: string().optional(),
56094
56484
  distTags: array(string()).readonly()
56095
56485
  });
56486
+ /**
56487
+ * One published document. `ok` is markdown from the registry. `missing` means
56488
+ * the registry answered and the file was not there. `error` is a registry or
56489
+ * tarball failure — never an empty string standing in for either.
56490
+ */
56491
+ var PackageDocBodySchema = discriminatedUnion("status", [
56492
+ object({
56493
+ status: literal("ok"),
56494
+ markdown: string()
56495
+ }),
56496
+ object({ status: literal("missing") }),
56497
+ object({
56498
+ status: literal("error"),
56499
+ message: string()
56500
+ })
56501
+ ]);
56502
+ var PackageDocsSchema = object({
56503
+ name: string(),
56504
+ version: string(),
56505
+ readme: PackageDocBodySchema,
56506
+ changelog: PackageDocBodySchema
56507
+ });
56096
56508
  var SearchResultSchema = object({
56097
56509
  name: string(),
56098
56510
  version: string(),
@@ -56311,7 +56723,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
56311
56723
  }), object({ success: literal(true) }), {
56312
56724
  kind: "mutation",
56313
56725
  auth: "admin"
56314
- }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
56726
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
56727
+ name: string().min(1),
56728
+ version: string().min(1).optional()
56729
+ }), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
56315
56730
  kind: "mutation",
56316
56731
  auth: "admin"
56317
56732
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -59638,6 +60053,88 @@ var gasCapability = {
59638
60053
  * whether persisting is worth a SQLite commit. */
59639
60054
  volatileStateFields: ["lastChangedAt"]
59640
60055
  };
60056
+ var GroupCommandsSchema = object({
60057
+ /** One row per member that has been commanded. A later command replaces that member's row. */
60058
+ results: array(object({
60059
+ deviceId: number().int().nonnegative(),
60060
+ cap: string().min(1),
60061
+ method: string().min(1),
60062
+ ok: boolean(),
60063
+ error: string().optional(),
60064
+ /** Ms epoch of the attempt. */
60065
+ at: number()
60066
+ })) });
60067
+ var groupCommandsCapability = {
60068
+ name: "group-commands",
60069
+ scope: "device",
60070
+ deviceNative: true,
60071
+ mode: "singleton",
60072
+ deviceTypes: [DeviceType.Switch, DeviceType.Light],
60073
+ methods: {},
60074
+ status: {
60075
+ schema: GroupCommandsSchema,
60076
+ kind: "push"
60077
+ },
60078
+ runtimeState: GroupCommandsSchema,
60079
+ /**
60080
+ * Runtime-state durability: **session** — the last attempt. A restored
60081
+ * failure would outlive the command that caused it.
60082
+ *
60083
+ * See `RuntimeStateDurability`. Enforced by
60084
+ * `scripts/check-runtime-state-durability.ts`.
60085
+ */
60086
+ durability: "session",
60087
+ history: "none"
60088
+ };
60089
+ /**
60090
+ * How many members of a helper group answered (D944). Counts are integers,
60091
+ * not measurements: zero included is a real count, never a stand-in reading.
60092
+ * The reading itself stays on the output capability. History is none — the
60093
+ * series that later statistics read is the output cap's own history block.
60094
+ */
60095
+ var GroupStatusSchema = object({
60096
+ /** Members whose current value entered the aggregate. */
60097
+ included: number().int().nonnegative().meta(readingMeta("count", {
60098
+ precision: 0,
60099
+ label: "Reporting"
60100
+ })),
60101
+ /** Members left out: offline, unknown, or not a finite reading (D393). */
60102
+ excluded: number().int().nonnegative().meta(readingMeta("count", {
60103
+ precision: 0,
60104
+ label: "Excluded"
60105
+ })),
60106
+ /** `included` + `excluded`. */
60107
+ total: number().int().nonnegative().meta(readingMeta("count", {
60108
+ precision: 0,
60109
+ label: "Members"
60110
+ }))
60111
+ });
60112
+ var groupStatusCapability = {
60113
+ name: "group-status",
60114
+ scope: "device",
60115
+ deviceNative: true,
60116
+ mode: "singleton",
60117
+ deviceTypes: [
60118
+ DeviceType.Sensor,
60119
+ DeviceType.Switch,
60120
+ DeviceType.Light
60121
+ ],
60122
+ methods: {},
60123
+ status: {
60124
+ schema: GroupStatusSchema,
60125
+ kind: "push"
60126
+ },
60127
+ runtimeState: GroupStatusSchema,
60128
+ /**
60129
+ * Runtime-state durability: **session** — recomputed from members on the
60130
+ * next source event; a restored count would outlive the readings it named.
60131
+ *
60132
+ * See `RuntimeStateDurability`. Enforced by
60133
+ * `scripts/check-runtime-state-durability.ts`.
60134
+ */
60135
+ durability: "session",
60136
+ history: "none"
60137
+ };
59641
60138
  var HeatingValveStatusSchema = object({
59642
60139
  /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
59643
60140
  position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -61407,12 +61904,18 @@ var motionCapability = {
61407
61904
  methods: {
61408
61905
  /**
61409
61906
  * Pull the current motion state synchronously. Convenience shortcut
61410
- * for consumers that don't need the full status object; equivalent
61411
- * to `getStatus()?.detected ?? false`. Will likely be folded into
61412
- * `getStatus` once the auto-injected status surface lands in every
61413
- * consumer.
61907
+ * for consumers that don't need the full status object. A composed
61908
+ * group answers from its slice (D944): unknown throws, it is not off.
61414
61909
  */
61415
61910
  isDetected: method(object({ deviceId: number() }), boolean()) },
61911
+ /**
61912
+ * A composed motion group serves `isDetected` from `detected` (D944).
61913
+ * Without this the cap stays uncomposable (`has-commands`).
61914
+ */
61915
+ composedMethods: { isDetected: {
61916
+ kind: "slice",
61917
+ field: "detected"
61918
+ } },
61416
61919
  events: {
61417
61920
  /**
61418
61921
  * Fires every time the runner transitions a camera between
@@ -69642,6 +70145,8 @@ var DEVICE_LOCAL_STATE_CAPS = {
69642
70145
  featureProbe: featureProbeCapability,
69643
70146
  flood: floodCapability,
69644
70147
  gas: gasCapability,
70148
+ groupCommands: groupCommandsCapability,
70149
+ groupStatus: groupStatusCapability,
69645
70150
  heatingValve: heatingValveCapability,
69646
70151
  humidifier: humidifierCapability,
69647
70152
  humiditySensor: humiditySensorCapability,
@@ -71018,6 +71523,13 @@ Object.freeze({
71018
71523
  access: "view",
71019
71524
  role: "admin"
71020
71525
  },
71526
+ "addons.getPackageDocs": {
71527
+ capName: "addons",
71528
+ capScope: "system",
71529
+ addonId: null,
71530
+ access: "view",
71531
+ role: "admin"
71532
+ },
71021
71533
  "addons.getVersions": {
71022
71534
  capName: "addons",
71023
71535
  capScope: "system",
@@ -74126,6 +74638,20 @@ Object.freeze({
74126
74638
  access: "view",
74127
74639
  role: "viewer"
74128
74640
  },
74641
+ "groupCommands.getStatus": {
74642
+ capName: "group-commands",
74643
+ capScope: "device",
74644
+ addonId: null,
74645
+ access: "view",
74646
+ role: "viewer"
74647
+ },
74648
+ "groupStatus.getStatus": {
74649
+ capName: "group-status",
74650
+ capScope: "device",
74651
+ addonId: null,
74652
+ access: "view",
74653
+ role: "viewer"
74654
+ },
74129
74655
  "heatingValve.getStatus": {
74130
74656
  capName: "heating-valve",
74131
74657
  capScope: "device",
@@ -83948,6 +84474,37 @@ var SENSOR_CAP_VOCABULARY = {
83948
84474
  icon: "flame"
83949
84475
  }]
83950
84476
  },
84477
+ "group-commands": {
84478
+ scope: "device",
84479
+ noun: t("Group command", "Comando di gruppo")
84480
+ },
84481
+ "group-status": {
84482
+ scope: "device",
84483
+ noun: t("Group", "Gruppo"),
84484
+ state: [
84485
+ {
84486
+ kind: "numeric",
84487
+ field: "included",
84488
+ quantity: t("the members reporting", "i membri che rispondono"),
84489
+ label: t("Reporting", "Rispondono"),
84490
+ icon: "users"
84491
+ },
84492
+ {
84493
+ kind: "numeric",
84494
+ field: "excluded",
84495
+ quantity: t("the members left out", "i membri esclusi"),
84496
+ label: t("Excluded", "Esclusi"),
84497
+ icon: "users"
84498
+ },
84499
+ {
84500
+ kind: "numeric",
84501
+ field: "total",
84502
+ quantity: t("the member count", "il numero di membri"),
84503
+ label: t("Members", "Membri"),
84504
+ icon: "sigma"
84505
+ }
84506
+ ]
84507
+ },
83951
84508
  "humidity-sensor": {
83952
84509
  scope: "device",
83953
84510
  noun: t("Humidity", "Umidità"),
@@ -85413,6 +85970,16 @@ Object.freeze({
85413
85970
  form: "single",
85414
85971
  optional: false
85415
85972
  }],
85973
+ "groupCommands.getStatus": [{
85974
+ name: "deviceId",
85975
+ form: "single",
85976
+ optional: false
85977
+ }],
85978
+ "groupStatus.getStatus": [{
85979
+ name: "deviceId",
85980
+ form: "single",
85981
+ optional: false
85982
+ }],
85416
85983
  "heatingValve.getStatus": [{
85417
85984
  name: "deviceId",
85418
85985
  form: "single",
@@ -87397,6 +87964,8 @@ new Map(Object.entries({
87397
87964
  "detection-blind": "device-events",
87398
87965
  "motion-noisy": "device-events",
87399
87966
  "motion-calm": "device-events",
87967
+ "package-llm-silent": "device-events",
87968
+ "package-llm-answered": "device-events",
87400
87969
  "recording-stalled": "device-events",
87401
87970
  "recording-healthy": "device-events",
87402
87971
  "recording-degraded": "device-events",
@@ -87480,6 +88049,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
87480
88049
  label: "Motion without a subject",
87481
88050
  kinds: ["motion-noisy", "motion-calm"]
87482
88051
  },
88052
+ {
88053
+ id: "package-llm",
88054
+ family: "device-events",
88055
+ label: "Package confirm",
88056
+ kinds: ["package-llm-silent", "package-llm-answered"]
88057
+ },
87483
88058
  {
87484
88059
  id: "recording",
87485
88060
  family: "device-events",
@@ -87661,6 +88236,8 @@ var DEVICE_EVENTS = [
87661
88236
  "detection-blind",
87662
88237
  "motion-noisy",
87663
88238
  "motion-calm",
88239
+ "package-llm-silent",
88240
+ "package-llm-answered",
87664
88241
  "recording-stalled",
87665
88242
  "recording-healthy",
87666
88243
  "recording-degraded",
@@ -87929,6 +88506,15 @@ new Map([
87929
88506
  snapshotLabel: "Cameras with constant motion now",
87930
88507
  snapshotSection: null
87931
88508
  },
88509
+ {
88510
+ id: "package-llm-confirm",
88511
+ family: "device-events",
88512
+ label: "Package confirm (not answering / answering again)",
88513
+ bad: ["package-llm-silent"],
88514
+ recovery: ["package-llm-answered"],
88515
+ snapshotLabel: "Cameras whose package confirm is not answering",
88516
+ snapshotSection: null
88517
+ },
87932
88518
  {
87933
88519
  id: "recording-health",
87934
88520
  family: "device-events",