@camstack/addon-provider-unraid 0.2.148 → 0.2.149

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.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
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).
@@ -8027,6 +8035,53 @@ var READING_QUANTITIES = [
8027
8035
  ];
8028
8036
  var ReadingQuantitySchema = _enum(READING_QUANTITIES);
8029
8037
  new Set(READING_QUANTITIES);
8038
+ /**
8039
+ * Stored unit symbol for a quantity. `none` means the number is dimensionless
8040
+ * (or an index / ratio / count). `device` means the cap has no single unit.
8041
+ */
8042
+ var QUANTITY_BASE = {
8043
+ temperature: "°C",
8044
+ pressure: "hPa",
8045
+ speed: "m/s",
8046
+ precipitation: "mm",
8047
+ "precipitation-rate": "mm/h",
8048
+ length: "m",
8049
+ area: "m²",
8050
+ illuminance: "lx",
8051
+ irradiance: "W/m²",
8052
+ power: "W",
8053
+ energy: "kWh",
8054
+ voltage: "V",
8055
+ current: "A",
8056
+ "apparent-power": "VA",
8057
+ humidity: "%",
8058
+ percentage: "%",
8059
+ "concentration-volume": "ppm",
8060
+ "concentration-mass": "µg/m³",
8061
+ "concentration-ppb": "ppb",
8062
+ volume: "L",
8063
+ duration: "s",
8064
+ "duration-ms": "ms",
8065
+ information: "B",
8066
+ "sound-level": "dBFS",
8067
+ "signal-level": "dBm",
8068
+ "colour-temperature": "mired",
8069
+ angle: "°",
8070
+ bitrate: "kbps",
8071
+ rate: "fps",
8072
+ mass: "kg",
8073
+ index: "none",
8074
+ ratio: "none",
8075
+ count: "none",
8076
+ none: "none",
8077
+ device: "device"
8078
+ };
8079
+ /** The stored unit, or `undefined` when the quantity has no unit symbol. */
8080
+ function baseUnitOf(quantity) {
8081
+ const symbol = QUANTITY_BASE[quantity];
8082
+ if (symbol === "none" || symbol === "device") return void 0;
8083
+ return symbol;
8084
+ }
8030
8085
  function readingMeta(quantity, extras) {
8031
8086
  return {
8032
8087
  quantity,
@@ -8580,6 +8635,8 @@ var CAP_NAMES = Object.freeze([
8580
8635
  "filesystem-browse",
8581
8636
  "flood",
8582
8637
  "gas",
8638
+ "group-commands",
8639
+ "group-status",
8583
8640
  "heating-valve",
8584
8641
  "humidifier",
8585
8642
  "humidity-sensor",
@@ -9398,6 +9455,20 @@ Object.freeze({
9398
9455
  "path": "detected",
9399
9456
  "valueType": "boolean"
9400
9457
  }],
9458
+ "group-status": [
9459
+ {
9460
+ "path": "included",
9461
+ "valueType": "number"
9462
+ },
9463
+ {
9464
+ "path": "excluded",
9465
+ "valueType": "number"
9466
+ },
9467
+ {
9468
+ "path": "total",
9469
+ "valueType": "number"
9470
+ }
9471
+ ],
9401
9472
  "heating-valve": [{
9402
9473
  "path": "position",
9403
9474
  "valueType": "number"
@@ -10753,7 +10824,7 @@ function errMsg(err) {
10753
10824
  return String(err);
10754
10825
  }
10755
10826
  //#endregion
10756
- //#region ../types/dist/composition-kEl9mevu.mjs
10827
+ //#region ../types/dist/composition-OhpuespA.mjs
10757
10828
  /**
10758
10829
  * The ffmpeg build every CamStack node downloads, per platform and arch.
10759
10830
  *
@@ -11508,15 +11579,74 @@ function validateExpressionSource(src) {
11508
11579
  }
11509
11580
  return null;
11510
11581
  }
11511
- /** A composed device's stableId is this prefix plus the block id. */
11512
- var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11513
- /** Longest snippet a `code` source may carry (slice 4). */
11514
- var MAX_COMPOSITION_CODE_LENGTH = 2e4;
11582
+ /**
11583
+ * A composition source identity: `(addonId, stableId)`, never a numeric device
11584
+ * id. Split out so helper schemas can name it without a cycle through
11585
+ * `composition.ts` (D659).
11586
+ */
11515
11587
  var CompositionSourceRefSchema = object({
11516
11588
  /** The owning addon; `stableId` is unique only within it. */
11517
11589
  addonId: string().min(1),
11518
11590
  stableId: string().min(1)
11519
11591
  });
11592
+ var GROUP_TEMPLATE_IDS = [
11593
+ "temperature",
11594
+ "humidity",
11595
+ "pressure",
11596
+ "illuminance",
11597
+ "power",
11598
+ "energy",
11599
+ "battery",
11600
+ "numeric",
11601
+ "motion",
11602
+ "contact",
11603
+ "leak",
11604
+ "smoke",
11605
+ "occupancy",
11606
+ "binary",
11607
+ "switch",
11608
+ "light"
11609
+ ];
11610
+ var NUMERIC_AGGREGATES = [
11611
+ "mean",
11612
+ "median",
11613
+ "min",
11614
+ "max",
11615
+ "sum"
11616
+ ];
11617
+ var BINARY_AGGREGATES = ["any", "all"];
11618
+ /** How an actuator group decides it is on. Unknown members never count as off. */
11619
+ var ACTIVE_CRITERIA = ["at-least-one", "all"];
11620
+ var AGGREGATE_REDUCERS = [
11621
+ "mean",
11622
+ "median",
11623
+ "min",
11624
+ "max",
11625
+ "sum",
11626
+ "any",
11627
+ "all"
11628
+ ];
11629
+ var GroupTemplateIdSchema = _enum(GROUP_TEMPLATE_IDS);
11630
+ var AggregateReducerSchema = _enum(AGGREGATE_REDUCERS);
11631
+ var ActiveCriterionSchema = _enum(ACTIVE_CRITERIA);
11632
+ /** One member. The field is stored so occupancy can name motion or binary. */
11633
+ var HelperMemberSchema = object({
11634
+ source: CompositionSourceRefSchema,
11635
+ cap: string().min(1),
11636
+ fieldPath: string().min(1)
11637
+ });
11638
+ var HelperSpecSchema = discriminatedUnion("kind", [object({
11639
+ kind: literal("group"),
11640
+ templateId: GroupTemplateIdSchema,
11641
+ aggregate: AggregateReducerSchema,
11642
+ members: array(HelperMemberSchema).min(1).max(64),
11643
+ /** Actuator groups only. Readings leave this unset. */
11644
+ active: ActiveCriterionSchema.optional()
11645
+ })]);
11646
+ /** A composed device's stableId is this prefix plus the block id. */
11647
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
11648
+ /** Longest snippet a `code` source may carry (slice 4). */
11649
+ var MAX_COMPOSITION_CODE_LENGTH = 2e4;
11520
11650
  /** One field of one capability of one source device. */
11521
11651
  var CompositionFieldReadSchema = object({
11522
11652
  source: CompositionSourceRefSchema,
@@ -11560,7 +11690,33 @@ var CompositionCodeSourceSchema = object({
11560
11690
  var CompositionFieldSourceSchema = discriminatedUnion("kind", [
11561
11691
  CompositionFromSourceSchema,
11562
11692
  CompositionExpressionSourceSchema,
11563
- CompositionCodeSourceSchema
11693
+ CompositionCodeSourceSchema,
11694
+ object({
11695
+ kind: literal("aggregate"),
11696
+ reducer: _enum([
11697
+ "mean",
11698
+ "median",
11699
+ "min",
11700
+ "max",
11701
+ "sum",
11702
+ "any",
11703
+ "all"
11704
+ ]),
11705
+ reads: array(CompositionFieldReadSchema).min(1).max(64),
11706
+ /** `value` is the reading; the others are the member counts. */
11707
+ publish: _enum([
11708
+ "value",
11709
+ "included",
11710
+ "excluded",
11711
+ "total"
11712
+ ]),
11713
+ /** What a `value` publish does when nobody is included. Counts ignore this. */
11714
+ empty: _enum([
11715
+ "null",
11716
+ "omit",
11717
+ "offline"
11718
+ ])
11719
+ })
11564
11720
  ]);
11565
11721
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
11566
11722
  kind: literal("forward"),
@@ -11606,7 +11762,13 @@ var CompositionSchema = object({
11606
11762
  kind: literal("existing"),
11607
11763
  device: CompositionSourceRefSchema
11608
11764
  })]),
11609
- features: array(CompositionFeatureSchema).min(1).max(16)
11765
+ features: array(CompositionFeatureSchema).min(1).max(16),
11766
+ /**
11767
+ * Present when the block is a helper template. Absent on a free
11768
+ * composition (the room example, device 4603). The editor reads this,
11769
+ * never the compiled features.
11770
+ */
11771
+ helper: HelperSpecSchema.optional()
11610
11772
  }).superRefine((composition, ctx) => {
11611
11773
  const seen = /* @__PURE__ */ new Set();
11612
11774
  composition.features.forEach((feature, index) => {
@@ -17815,7 +17977,10 @@ var CompositionProblemSchema = object({
17815
17977
  "target-missing",
17816
17978
  "target-unreadable",
17817
17979
  "not-replaceable",
17818
- "native-capability-replace"
17980
+ "native-capability-replace",
17981
+ "mixed-quantity",
17982
+ "helper-mismatch",
17983
+ "member-constraint"
17819
17984
  ]),
17820
17985
  path: string(),
17821
17986
  message: string()
@@ -17836,7 +18001,8 @@ var CompositionUnavailableModeSchema = _enum([
17836
18001
  "null",
17837
18002
  "offline",
17838
18003
  "unknown",
17839
- "release"
18004
+ "release",
18005
+ "omit"
17840
18006
  ]);
17841
18007
  /**
17842
18008
  * `derived` reads a source · `clock` reads only `now`, recomputed when a sibling
@@ -18050,6 +18216,275 @@ Object.freeze({
18050
18216
  result: ["number", "null"]
18051
18217
  }
18052
18218
  });
18219
+ /**
18220
+ * One catalog row per base reading a group helper can build (D944 §3).
18221
+ * Data, not a form default written into the block.
18222
+ */
18223
+ var NOW = {
18224
+ fieldPath: "lastFetchedAt",
18225
+ expr: "now"
18226
+ };
18227
+ var CHANGED = {
18228
+ fieldPath: "lastChangedAt",
18229
+ expr: "now"
18230
+ };
18231
+ function numeric(input) {
18232
+ return {
18233
+ ...input,
18234
+ family: "numeric",
18235
+ deviceType: DeviceType.Sensor,
18236
+ memberDeviceType: DeviceType.Sensor,
18237
+ commandCaps: [],
18238
+ baseUnit: baseUnitOf(input.quantity),
18239
+ aggregates: NUMERIC_AGGREGATES,
18240
+ accept: [{
18241
+ cap: input.outputCap,
18242
+ fieldPath: input.outputField
18243
+ }]
18244
+ };
18245
+ }
18246
+ function binary(input) {
18247
+ return {
18248
+ ...input,
18249
+ family: "binary",
18250
+ deviceType: DeviceType.Sensor,
18251
+ memberDeviceType: DeviceType.Sensor,
18252
+ commandCaps: [],
18253
+ quantity: "none",
18254
+ baseUnit: void 0,
18255
+ aggregates: BINARY_AGGREGATES,
18256
+ empty: "offline"
18257
+ };
18258
+ }
18259
+ var GROUP_TEMPLATES = [
18260
+ numeric({
18261
+ id: "temperature",
18262
+ summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
18263
+ role: DeviceRole.TemperatureSensor,
18264
+ outputCap: "temperature-sensor",
18265
+ outputField: "celsius",
18266
+ quantity: "temperature",
18267
+ defaultAggregate: "mean",
18268
+ empty: "null",
18269
+ companions: [NOW]
18270
+ }),
18271
+ numeric({
18272
+ id: "humidity",
18273
+ summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
18274
+ role: DeviceRole.HumiditySensor,
18275
+ outputCap: "humidity-sensor",
18276
+ outputField: "percent",
18277
+ quantity: "humidity",
18278
+ defaultAggregate: "mean",
18279
+ empty: "null",
18280
+ companions: [NOW]
18281
+ }),
18282
+ numeric({
18283
+ id: "pressure",
18284
+ summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
18285
+ role: DeviceRole.PressureSensor,
18286
+ outputCap: "pressure-sensor",
18287
+ outputField: "hpa",
18288
+ quantity: "pressure",
18289
+ defaultAggregate: "mean",
18290
+ empty: "null",
18291
+ companions: [NOW]
18292
+ }),
18293
+ numeric({
18294
+ id: "illuminance",
18295
+ summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
18296
+ role: DeviceRole.AmbientLightSensor,
18297
+ outputCap: "ambient-light-sensor",
18298
+ outputField: "lux",
18299
+ quantity: "illuminance",
18300
+ defaultAggregate: "mean",
18301
+ empty: "null",
18302
+ companions: [NOW]
18303
+ }),
18304
+ numeric({
18305
+ id: "power",
18306
+ summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
18307
+ role: DeviceRole.PowerSensor,
18308
+ outputCap: "power-meter",
18309
+ outputField: "watts",
18310
+ quantity: "power",
18311
+ defaultAggregate: "sum",
18312
+ empty: "omit",
18313
+ companions: [NOW]
18314
+ }),
18315
+ numeric({
18316
+ id: "energy",
18317
+ summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
18318
+ role: DeviceRole.EnergySensor,
18319
+ outputCap: "power-meter",
18320
+ outputField: "kwhTotal",
18321
+ quantity: "energy",
18322
+ defaultAggregate: "sum",
18323
+ empty: "omit",
18324
+ companions: [NOW]
18325
+ }),
18326
+ numeric({
18327
+ id: "battery",
18328
+ summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
18329
+ role: DeviceRole.BatterySensor,
18330
+ outputCap: "battery",
18331
+ outputField: "percentage",
18332
+ quantity: "percentage",
18333
+ defaultAggregate: "mean",
18334
+ empty: "null",
18335
+ companions: [
18336
+ {
18337
+ fieldPath: "charging",
18338
+ expr: "\"unknown\""
18339
+ },
18340
+ {
18341
+ fieldPath: "sleeping",
18342
+ expr: "false"
18343
+ },
18344
+ {
18345
+ fieldPath: "lastUpdated",
18346
+ expr: "now"
18347
+ }
18348
+ ]
18349
+ }),
18350
+ numeric({
18351
+ id: "numeric",
18352
+ summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
18353
+ role: DeviceRole.NumericSensor,
18354
+ outputCap: "numeric-sensor",
18355
+ outputField: "value",
18356
+ quantity: "device",
18357
+ defaultAggregate: "mean",
18358
+ empty: "null",
18359
+ companions: [NOW]
18360
+ }),
18361
+ binary({
18362
+ id: "motion",
18363
+ summary: "Any or all motion. Offline and unknown members are left out, never read as off. Nobody reporting takes the device offline.",
18364
+ role: DeviceRole.MotionSensor,
18365
+ outputCap: "motion",
18366
+ outputField: "detected",
18367
+ defaultAggregate: "any",
18368
+ accept: [{
18369
+ cap: "motion",
18370
+ fieldPath: "detected"
18371
+ }],
18372
+ companions: [{
18373
+ fieldPath: "lastDetectedAt",
18374
+ expr: "null"
18375
+ }, {
18376
+ fieldPath: "autoClearAfterMs",
18377
+ expr: "null"
18378
+ }]
18379
+ }),
18380
+ binary({
18381
+ id: "contact",
18382
+ summary: "Any or all open contacts. Offline and unknown members are left out, never read as closed.",
18383
+ role: DeviceRole.ContactSensor,
18384
+ outputCap: "contact",
18385
+ outputField: "entryOpen",
18386
+ defaultAggregate: "any",
18387
+ accept: [{
18388
+ cap: "contact",
18389
+ fieldPath: "entryOpen"
18390
+ }],
18391
+ companions: [CHANGED]
18392
+ }),
18393
+ binary({
18394
+ id: "leak",
18395
+ summary: "Any or all leak detections. Offline and unknown members are left out, never read as dry.",
18396
+ role: DeviceRole.LeakSensor,
18397
+ outputCap: "flood",
18398
+ outputField: "flooded",
18399
+ defaultAggregate: "any",
18400
+ accept: [{
18401
+ cap: "flood",
18402
+ fieldPath: "flooded"
18403
+ }],
18404
+ companions: [CHANGED]
18405
+ }),
18406
+ binary({
18407
+ id: "smoke",
18408
+ summary: "Any or all smoke detections. Offline and unknown members are left out, never read as clear.",
18409
+ role: DeviceRole.SmokeSensor,
18410
+ outputCap: "smoke",
18411
+ outputField: "detected",
18412
+ defaultAggregate: "any",
18413
+ accept: [{
18414
+ cap: "smoke",
18415
+ fieldPath: "detected"
18416
+ }],
18417
+ companions: [CHANGED]
18418
+ }),
18419
+ binary({
18420
+ id: "occupancy",
18421
+ summary: "Any or all of motion or binary sensors, published as a binary. Presence zones are not aggregated. Nobody reporting is offline, not off.",
18422
+ role: DeviceRole.BinarySensor,
18423
+ outputCap: "binary",
18424
+ outputField: "on",
18425
+ defaultAggregate: "any",
18426
+ accept: [{
18427
+ cap: "motion",
18428
+ fieldPath: "detected"
18429
+ }, {
18430
+ cap: "binary",
18431
+ fieldPath: "on"
18432
+ }],
18433
+ companions: [CHANGED]
18434
+ }),
18435
+ binary({
18436
+ id: "binary",
18437
+ summary: "Any or all generic binary sensors. Offline and unknown members are left out, never read as off.",
18438
+ role: DeviceRole.BinarySensor,
18439
+ outputCap: "binary",
18440
+ outputField: "on",
18441
+ defaultAggregate: "any",
18442
+ accept: [{
18443
+ cap: "binary",
18444
+ fieldPath: "on"
18445
+ }],
18446
+ companions: [CHANGED]
18447
+ }),
18448
+ actuator({
18449
+ id: "switch",
18450
+ 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.",
18451
+ deviceType: DeviceType.Switch,
18452
+ outputCap: "switch",
18453
+ commandCaps: ["switch"]
18454
+ }),
18455
+ actuator({
18456
+ id: "light",
18457
+ 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.",
18458
+ deviceType: DeviceType.Light,
18459
+ outputCap: "switch",
18460
+ commandCaps: [
18461
+ "switch",
18462
+ "brightness",
18463
+ "color"
18464
+ ]
18465
+ })
18466
+ ];
18467
+ function actuator(input) {
18468
+ return {
18469
+ ...input,
18470
+ family: "actuator",
18471
+ role: void 0,
18472
+ memberDeviceType: input.deviceType,
18473
+ outputField: "on",
18474
+ quantity: "none",
18475
+ baseUnit: void 0,
18476
+ aggregates: BINARY_AGGREGATES,
18477
+ defaultAggregate: "any",
18478
+ empty: "offline",
18479
+ accept: [{
18480
+ cap: "switch",
18481
+ fieldPath: "on"
18482
+ }],
18483
+ companions: [CHANGED]
18484
+ };
18485
+ }
18486
+ new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
18487
+ DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
18053
18488
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
18054
18489
  /**
18055
18490
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -44965,6 +45400,8 @@ var NcSystemEventKindSchema = _enum([
44965
45400
  "detection-blind",
44966
45401
  "motion-noisy",
44967
45402
  "motion-calm",
45403
+ "package-llm-silent",
45404
+ "package-llm-answered",
44968
45405
  "recording-stalled",
44969
45406
  "recording-healthy",
44970
45407
  "recording-degraded",
@@ -56056,6 +56493,28 @@ var PackageVersionInfoSchema = object({
56056
56493
  deprecated: string().optional(),
56057
56494
  distTags: array(string()).readonly()
56058
56495
  });
56496
+ /**
56497
+ * One published document. `ok` is markdown from the registry. `missing` means
56498
+ * the registry answered and the file was not there. `error` is a registry or
56499
+ * tarball failure — never an empty string standing in for either.
56500
+ */
56501
+ var PackageDocBodySchema = discriminatedUnion("status", [
56502
+ object({
56503
+ status: literal("ok"),
56504
+ markdown: string()
56505
+ }),
56506
+ object({ status: literal("missing") }),
56507
+ object({
56508
+ status: literal("error"),
56509
+ message: string()
56510
+ })
56511
+ ]);
56512
+ var PackageDocsSchema = object({
56513
+ name: string(),
56514
+ version: string(),
56515
+ readme: PackageDocBodySchema,
56516
+ changelog: PackageDocBodySchema
56517
+ });
56059
56518
  var SearchResultSchema = object({
56060
56519
  name: string(),
56061
56520
  version: string(),
@@ -56274,7 +56733,10 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
56274
56733
  }), object({ success: literal(true) }), {
56275
56734
  kind: "mutation",
56276
56735
  auth: "admin"
56277
- }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({ addonId: string() }), RestartAddonResultSchema, {
56736
+ }), method(object({ name: string() }), array(PackageVersionInfoSchema).readonly()), method(object({
56737
+ name: string().min(1),
56738
+ version: string().min(1).optional()
56739
+ }), PackageDocsSchema, { auth: "admin" }), method(object({ addonId: string() }), RestartAddonResultSchema, {
56278
56740
  kind: "mutation",
56279
56741
  auth: "admin"
56280
56742
  }), method(object({ packageName: string() }), object({ success: literal(true) }), {
@@ -59610,6 +60072,88 @@ var gasCapability = {
59610
60072
  * whether persisting is worth a SQLite commit. */
59611
60073
  volatileStateFields: ["lastChangedAt"]
59612
60074
  };
60075
+ var GroupCommandsSchema = object({
60076
+ /** One row per member that has been commanded. A later command replaces that member's row. */
60077
+ results: array(object({
60078
+ deviceId: number().int().nonnegative(),
60079
+ cap: string().min(1),
60080
+ method: string().min(1),
60081
+ ok: boolean(),
60082
+ error: string().optional(),
60083
+ /** Ms epoch of the attempt. */
60084
+ at: number()
60085
+ })) });
60086
+ var groupCommandsCapability = {
60087
+ name: "group-commands",
60088
+ scope: "device",
60089
+ deviceNative: true,
60090
+ mode: "singleton",
60091
+ deviceTypes: [DeviceType.Switch, DeviceType.Light],
60092
+ methods: {},
60093
+ status: {
60094
+ schema: GroupCommandsSchema,
60095
+ kind: "push"
60096
+ },
60097
+ runtimeState: GroupCommandsSchema,
60098
+ /**
60099
+ * Runtime-state durability: **session** — the last attempt. A restored
60100
+ * failure would outlive the command that caused it.
60101
+ *
60102
+ * See `RuntimeStateDurability`. Enforced by
60103
+ * `scripts/check-runtime-state-durability.ts`.
60104
+ */
60105
+ durability: "session",
60106
+ history: "none"
60107
+ };
60108
+ /**
60109
+ * How many members of a helper group answered (D944). Counts are integers,
60110
+ * not measurements: zero included is a real count, never a stand-in reading.
60111
+ * The reading itself stays on the output capability. History is none — the
60112
+ * series that later statistics read is the output cap's own history block.
60113
+ */
60114
+ var GroupStatusSchema = object({
60115
+ /** Members whose current value entered the aggregate. */
60116
+ included: number().int().nonnegative().meta(readingMeta("count", {
60117
+ precision: 0,
60118
+ label: "Reporting"
60119
+ })),
60120
+ /** Members left out: offline, unknown, or not a finite reading (D393). */
60121
+ excluded: number().int().nonnegative().meta(readingMeta("count", {
60122
+ precision: 0,
60123
+ label: "Excluded"
60124
+ })),
60125
+ /** `included` + `excluded`. */
60126
+ total: number().int().nonnegative().meta(readingMeta("count", {
60127
+ precision: 0,
60128
+ label: "Members"
60129
+ }))
60130
+ });
60131
+ var groupStatusCapability = {
60132
+ name: "group-status",
60133
+ scope: "device",
60134
+ deviceNative: true,
60135
+ mode: "singleton",
60136
+ deviceTypes: [
60137
+ DeviceType.Sensor,
60138
+ DeviceType.Switch,
60139
+ DeviceType.Light
60140
+ ],
60141
+ methods: {},
60142
+ status: {
60143
+ schema: GroupStatusSchema,
60144
+ kind: "push"
60145
+ },
60146
+ runtimeState: GroupStatusSchema,
60147
+ /**
60148
+ * Runtime-state durability: **session** — recomputed from members on the
60149
+ * next source event; a restored count would outlive the readings it named.
60150
+ *
60151
+ * See `RuntimeStateDurability`. Enforced by
60152
+ * `scripts/check-runtime-state-durability.ts`.
60153
+ */
60154
+ durability: "session",
60155
+ history: "none"
60156
+ };
59613
60157
  var HeatingValveStatusSchema = object({
59614
60158
  /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
59615
60159
  position: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
@@ -61379,12 +61923,18 @@ var motionCapability = {
61379
61923
  methods: {
61380
61924
  /**
61381
61925
  * Pull the current motion state synchronously. Convenience shortcut
61382
- * for consumers that don't need the full status object; equivalent
61383
- * to `getStatus()?.detected ?? false`. Will likely be folded into
61384
- * `getStatus` once the auto-injected status surface lands in every
61385
- * consumer.
61926
+ * for consumers that don't need the full status object. A composed
61927
+ * group answers from its slice (D944): unknown throws, it is not off.
61386
61928
  */
61387
61929
  isDetected: method(object({ deviceId: number() }), boolean()) },
61930
+ /**
61931
+ * A composed motion group serves `isDetected` from `detected` (D944).
61932
+ * Without this the cap stays uncomposable (`has-commands`).
61933
+ */
61934
+ composedMethods: { isDetected: {
61935
+ kind: "slice",
61936
+ field: "detected"
61937
+ } },
61388
61938
  events: {
61389
61939
  /**
61390
61940
  * Fires every time the runner transitions a camera between
@@ -69192,6 +69742,8 @@ var DEVICE_LOCAL_STATE_CAPS = {
69192
69742
  featureProbe: featureProbeCapability,
69193
69743
  flood: floodCapability,
69194
69744
  gas: gasCapability,
69745
+ groupCommands: groupCommandsCapability,
69746
+ groupStatus: groupStatusCapability,
69195
69747
  heatingValve: heatingValveCapability,
69196
69748
  humidifier: humidifierCapability,
69197
69749
  humiditySensor: humiditySensorCapability,
@@ -70568,6 +71120,13 @@ Object.freeze({
70568
71120
  access: "view",
70569
71121
  role: "admin"
70570
71122
  },
71123
+ "addons.getPackageDocs": {
71124
+ capName: "addons",
71125
+ capScope: "system",
71126
+ addonId: null,
71127
+ access: "view",
71128
+ role: "admin"
71129
+ },
70571
71130
  "addons.getVersions": {
70572
71131
  capName: "addons",
70573
71132
  capScope: "system",
@@ -73676,6 +74235,20 @@ Object.freeze({
73676
74235
  access: "view",
73677
74236
  role: "viewer"
73678
74237
  },
74238
+ "groupCommands.getStatus": {
74239
+ capName: "group-commands",
74240
+ capScope: "device",
74241
+ addonId: null,
74242
+ access: "view",
74243
+ role: "viewer"
74244
+ },
74245
+ "groupStatus.getStatus": {
74246
+ capName: "group-status",
74247
+ capScope: "device",
74248
+ addonId: null,
74249
+ access: "view",
74250
+ role: "viewer"
74251
+ },
73679
74252
  "heatingValve.getStatus": {
73680
74253
  capName: "heating-valve",
73681
74254
  capScope: "device",
@@ -83498,6 +84071,37 @@ var SENSOR_CAP_VOCABULARY = {
83498
84071
  icon: "flame"
83499
84072
  }]
83500
84073
  },
84074
+ "group-commands": {
84075
+ scope: "device",
84076
+ noun: t("Group command", "Comando di gruppo")
84077
+ },
84078
+ "group-status": {
84079
+ scope: "device",
84080
+ noun: t("Group", "Gruppo"),
84081
+ state: [
84082
+ {
84083
+ kind: "numeric",
84084
+ field: "included",
84085
+ quantity: t("the members reporting", "i membri che rispondono"),
84086
+ label: t("Reporting", "Rispondono"),
84087
+ icon: "users"
84088
+ },
84089
+ {
84090
+ kind: "numeric",
84091
+ field: "excluded",
84092
+ quantity: t("the members left out", "i membri esclusi"),
84093
+ label: t("Excluded", "Esclusi"),
84094
+ icon: "users"
84095
+ },
84096
+ {
84097
+ kind: "numeric",
84098
+ field: "total",
84099
+ quantity: t("the member count", "il numero di membri"),
84100
+ label: t("Members", "Membri"),
84101
+ icon: "sigma"
84102
+ }
84103
+ ]
84104
+ },
83501
84105
  "humidity-sensor": {
83502
84106
  scope: "device",
83503
84107
  noun: t("Humidity", "Umidità"),
@@ -84963,6 +85567,16 @@ Object.freeze({
84963
85567
  form: "single",
84964
85568
  optional: false
84965
85569
  }],
85570
+ "groupCommands.getStatus": [{
85571
+ name: "deviceId",
85572
+ form: "single",
85573
+ optional: false
85574
+ }],
85575
+ "groupStatus.getStatus": [{
85576
+ name: "deviceId",
85577
+ form: "single",
85578
+ optional: false
85579
+ }],
84966
85580
  "heatingValve.getStatus": [{
84967
85581
  name: "deviceId",
84968
85582
  form: "single",
@@ -86947,6 +87561,8 @@ new Map(Object.entries({
86947
87561
  "detection-blind": "device-events",
86948
87562
  "motion-noisy": "device-events",
86949
87563
  "motion-calm": "device-events",
87564
+ "package-llm-silent": "device-events",
87565
+ "package-llm-answered": "device-events",
86950
87566
  "recording-stalled": "device-events",
86951
87567
  "recording-healthy": "device-events",
86952
87568
  "recording-degraded": "device-events",
@@ -87030,6 +87646,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
87030
87646
  label: "Motion without a subject",
87031
87647
  kinds: ["motion-noisy", "motion-calm"]
87032
87648
  },
87649
+ {
87650
+ id: "package-llm",
87651
+ family: "device-events",
87652
+ label: "Package confirm",
87653
+ kinds: ["package-llm-silent", "package-llm-answered"]
87654
+ },
87033
87655
  {
87034
87656
  id: "recording",
87035
87657
  family: "device-events",
@@ -87211,6 +87833,8 @@ var DEVICE_EVENTS = [
87211
87833
  "detection-blind",
87212
87834
  "motion-noisy",
87213
87835
  "motion-calm",
87836
+ "package-llm-silent",
87837
+ "package-llm-answered",
87214
87838
  "recording-stalled",
87215
87839
  "recording-healthy",
87216
87840
  "recording-degraded",
@@ -87479,6 +88103,15 @@ new Map([
87479
88103
  snapshotLabel: "Cameras with constant motion now",
87480
88104
  snapshotSection: null
87481
88105
  },
88106
+ {
88107
+ id: "package-llm-confirm",
88108
+ family: "device-events",
88109
+ label: "Package confirm (not answering / answering again)",
88110
+ bad: ["package-llm-silent"],
88111
+ recovery: ["package-llm-answered"],
88112
+ snapshotLabel: "Cameras whose package confirm is not answering",
88113
+ snapshotSection: null
88114
+ },
87482
88115
  {
87483
88116
  id: "recording-health",
87484
88117
  family: "device-events",