@camstack/addon-post-analysis 1.2.640 → 1.2.641

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 (14) hide show
  1. package/dist/{clip-model-registry-B1HxbGuP.mjs → clip-model-registry-Cw7Iy7Qi.mjs} +204 -29
  2. package/dist/{clip-model-registry-C8xdbChV.js → clip-model-registry-Qr0XipkX.js} +204 -29
  3. package/dist/embedding-encoder/index.js +1 -1
  4. package/dist/embedding-encoder/index.mjs +1 -1
  5. package/dist/pipeline-analytics/_stub.js +2 -2
  6. package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CO5qrMxU.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-Cct0TMzC.mjs} +2 -2
  7. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-_TUthUZh.mjs +26 -0
  8. package/dist/pipeline-analytics/{_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DIbQ2FJ4.mjs → _virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CuNXxDlT.mjs} +1 -1
  9. package/dist/pipeline-analytics/{hostInit-BN2pgAbz.mjs → hostInit-B9c2FowI.mjs} +2 -2
  10. package/dist/pipeline-analytics/index.js +117 -22
  11. package/dist/pipeline-analytics/index.mjs +117 -22
  12. package/dist/pipeline-analytics/remoteEntry.js +1 -1
  13. package/package.json +1 -1
  14. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CENVyAAQ.mjs +0 -26
@@ -5640,7 +5640,7 @@ var ZodIssueCode = {
5640
5640
  var ZodFirstPartyTypeKind;
5641
5641
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5642
5642
  //#endregion
5643
- //#region ../types/dist/sleep-bykKrTgu.mjs
5643
+ //#region ../types/dist/sleep-0sD_LHLI.mjs
5644
5644
  /**
5645
5645
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5646
5646
  * window to float samples (D455).
@@ -9083,6 +9083,7 @@ var CAP_NAMES = Object.freeze([
9083
9083
  "login-method",
9084
9084
  "media-player",
9085
9085
  "mesh-network",
9086
+ "meter",
9086
9087
  "metrics-provider",
9087
9088
  "model-convert",
9088
9089
  "model-distributor",
@@ -10140,6 +10141,10 @@ Object.freeze({
10140
10141
  ]
10141
10142
  }
10142
10143
  ],
10144
+ "meter": [{
10145
+ "path": "value",
10146
+ "valueType": "number"
10147
+ }],
10143
10148
  "motion": [
10144
10149
  {
10145
10150
  "path": "detected",
@@ -10885,7 +10890,7 @@ Object.freeze({
10885
10890
  * can answer "may a rule actuate this?" without importing the schema barrel
10886
10891
  * (~144MB RSS per runner, D28).
10887
10892
  *
10888
- * Coverage: 93 device-scoped capabilities.
10893
+ * Coverage: 94 device-scoped capabilities.
10889
10894
  */
10890
10895
  var DEVICE_SCOPED_CAPS = new Set([
10891
10896
  "accessories",
@@ -10937,6 +10942,7 @@ var DEVICE_SCOPED_CAPS = new Set([
10937
10942
  "lawn-mower-control",
10938
10943
  "lock-control",
10939
10944
  "media-player",
10945
+ "meter",
10940
10946
  "motion",
10941
10947
  "motion-detection",
10942
10948
  "motion-trigger",
@@ -11385,7 +11391,7 @@ function errMsg(err) {
11385
11391
  return String(err);
11386
11392
  }
11387
11393
  //#endregion
11388
- //#region ../types/dist/composition-B2rw5L29.mjs
11394
+ //#region ../types/dist/composition-CpETZ4HL.mjs
11389
11395
  /**
11390
11396
  * Deterministic SHA-256 hash of an arbitrary serialisable value. The
11391
11397
  * canonical form sorts object keys alphabetically at every depth so two
@@ -12321,6 +12327,77 @@ var APPLIANCE_KINDS = [
12321
12327
  ];
12322
12328
  DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
12323
12329
  /**
12330
+ * Statistics and integrals over a history read (D944).
12331
+ *
12332
+ * Pure: the same points always give the same answer, so a restart recomputes
12333
+ * rather than trusting a buffer. A gauge mean is time-weighted (value × ms),
12334
+ * never the mean of the samples. A hole with no held value is not integrated
12335
+ * as zero. A truncated read is not published.
12336
+ */
12337
+ var STATISTIC_STATS = [
12338
+ "min",
12339
+ "max",
12340
+ "mean",
12341
+ "sum",
12342
+ "count",
12343
+ "change"
12344
+ ];
12345
+ /**
12346
+ * The range a statistics or integral helper asks history for (D944).
12347
+ *
12348
+ * Calendar edges are the hub's timezone, never UTC midnight: a day is 23, 24
12349
+ * or 25 hours across a DST change. A tier is eligible only when its retention
12350
+ * is strictly longer than the longest that range can be. Forever qualifies.
12351
+ * Equal to a tier's retention is a refusal, not a short answer.
12352
+ */
12353
+ var MINUTE_MS = 6e4;
12354
+ var HOUR_MS = 60 * MINUTE_MS;
12355
+ var DAY_MS = 24 * HOUR_MS;
12356
+ var ROLLING_SPANS = [
12357
+ "1h",
12358
+ "24h",
12359
+ "2d",
12360
+ "7d",
12361
+ "30d",
12362
+ "custom"
12363
+ ];
12364
+ var CALENDAR_PERIODS = [
12365
+ "today",
12366
+ "yesterday",
12367
+ "this-week",
12368
+ "this-month"
12369
+ ];
12370
+ var RESET_PERIODS = [
12371
+ "never",
12372
+ "daily",
12373
+ "weekly",
12374
+ "monthly"
12375
+ ];
12376
+ 5 * MINUTE_MS;
12377
+ 24 * HOUR_MS, 2 * DAY_MS, 7 * DAY_MS, 30 * DAY_MS;
12378
+ 7 * DAY_MS, 30 * DAY_MS, 365 * DAY_MS;
12379
+ var StatisticWindowSchema = discriminatedUnion("kind", [object({
12380
+ kind: literal("rolling"),
12381
+ span: _enum(ROLLING_SPANS),
12382
+ customMinutes: number().int().min(5).optional()
12383
+ }).check((payload) => {
12384
+ if (payload.value.span === "custom" && payload.value.customMinutes === void 0) payload.issues.push({
12385
+ code: "custom",
12386
+ message: "a custom range needs a duration in minutes",
12387
+ path: ["customMinutes"],
12388
+ input: payload.value
12389
+ });
12390
+ if (payload.value.span !== "custom" && payload.value.customMinutes !== void 0) payload.issues.push({
12391
+ code: "custom",
12392
+ message: "only a custom range carries a duration",
12393
+ path: ["customMinutes"],
12394
+ input: payload.value
12395
+ });
12396
+ }), object({
12397
+ kind: literal("calendar"),
12398
+ period: _enum(CALENDAR_PERIODS)
12399
+ })]);
12400
+ /**
12324
12401
  * A composition source identity: `(addonId, stableId)`, never a numeric device
12325
12402
  * id. Split out so helper schemas can name it without a cycle through
12326
12403
  * `composition.ts` (D659).
@@ -12376,22 +12453,37 @@ var HelperMemberSchema = object({
12376
12453
  cap: string().min(1),
12377
12454
  fieldPath: string().min(1)
12378
12455
  });
12379
- var HelperSpecSchema = discriminatedUnion("kind", [object({
12380
- kind: literal("group"),
12381
- templateId: GroupTemplateIdSchema,
12382
- aggregate: AggregateReducerSchema,
12383
- members: array(HelperMemberSchema).min(1).max(64),
12384
- /** Actuator groups only. Readings leave this unset. */
12385
- active: ActiveCriterionSchema.optional()
12386
- }), object({
12387
- kind: literal("appliance"),
12388
- templateId: literal(APPLIANCE_TEMPLATE_ID),
12389
- appliance: _enum(APPLIANCE_KINDS),
12390
- thresholdWatts: number().positive(),
12391
- startDwellMs: number().int().nonnegative(),
12392
- stopDwellMs: number().int().nonnegative(),
12393
- member: HelperMemberSchema
12394
- })]);
12456
+ var HelperSpecSchema = discriminatedUnion("kind", [
12457
+ object({
12458
+ kind: literal("group"),
12459
+ templateId: GroupTemplateIdSchema,
12460
+ aggregate: AggregateReducerSchema,
12461
+ members: array(HelperMemberSchema).min(1).max(64),
12462
+ /** Actuator groups only. Readings leave this unset. */
12463
+ active: ActiveCriterionSchema.optional()
12464
+ }),
12465
+ object({
12466
+ kind: literal("appliance"),
12467
+ templateId: literal(APPLIANCE_TEMPLATE_ID),
12468
+ appliance: _enum(APPLIANCE_KINDS),
12469
+ thresholdWatts: number().positive(),
12470
+ startDwellMs: number().int().nonnegative(),
12471
+ stopDwellMs: number().int().nonnegative(),
12472
+ member: HelperMemberSchema
12473
+ }),
12474
+ object({
12475
+ kind: literal("statistic"),
12476
+ stat: _enum(STATISTIC_STATS),
12477
+ window: StatisticWindowSchema,
12478
+ source: HelperMemberSchema
12479
+ }),
12480
+ object({
12481
+ kind: literal("integral"),
12482
+ reset: _enum(RESET_PERIODS),
12483
+ output: _enum(["energy", "meter"]),
12484
+ source: HelperMemberSchema
12485
+ })
12486
+ ]);
12395
12487
  /** A composed device's stableId is this prefix plus the block id. */
12396
12488
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
12397
12489
  /** Longest snippet a `code` source may carry (slice 4). */
@@ -12465,6 +12557,26 @@ var CompositionFieldSourceSchema = discriminatedUnion("kind", [
12465
12557
  "omit",
12466
12558
  "offline"
12467
12559
  ])
12560
+ }),
12561
+ object({
12562
+ kind: literal("series"),
12563
+ read: CompositionFieldReadSchema,
12564
+ /** `value` is the statistic or the integral. The others are the gap counts. */
12565
+ publish: _enum([
12566
+ "value",
12567
+ "included",
12568
+ "excluded",
12569
+ "total"
12570
+ ]),
12571
+ /**
12572
+ * What an unanswered `value` does. Counts ignore this. `offline` leaves the
12573
+ * device unseeded until history answers, so a restart cannot publish 0.
12574
+ */
12575
+ empty: _enum([
12576
+ "null",
12577
+ "omit",
12578
+ "offline"
12579
+ ])
12468
12580
  })
12469
12581
  ]);
12470
12582
  var CompositionCommandTargetSchema = discriminatedUnion("kind", [object({
@@ -19512,7 +19624,8 @@ var CompositionProblemSchema = object({
19512
19624
  "native-capability-replace",
19513
19625
  "mixed-quantity",
19514
19626
  "helper-mismatch",
19515
- "member-constraint"
19627
+ "member-constraint",
19628
+ "retention"
19516
19629
  ]),
19517
19630
  path: string(),
19518
19631
  message: string()
@@ -19752,7 +19865,7 @@ Object.freeze({
19752
19865
  * One catalog row per base reading a group helper can build (D944 §3).
19753
19866
  * Data, not a form default written into the block.
19754
19867
  */
19755
- var NOW = {
19868
+ var NOW$1 = {
19756
19869
  fieldPath: "lastFetchedAt",
19757
19870
  expr: "now"
19758
19871
  };
@@ -19798,7 +19911,7 @@ var GROUP_TEMPLATES = [
19798
19911
  quantity: "temperature",
19799
19912
  defaultAggregate: "mean",
19800
19913
  empty: "null",
19801
- companions: [NOW]
19914
+ companions: [NOW$1]
19802
19915
  }),
19803
19916
  numeric({
19804
19917
  id: "humidity",
@@ -19809,7 +19922,7 @@ var GROUP_TEMPLATES = [
19809
19922
  quantity: "humidity",
19810
19923
  defaultAggregate: "mean",
19811
19924
  empty: "null",
19812
- companions: [NOW]
19925
+ companions: [NOW$1]
19813
19926
  }),
19814
19927
  numeric({
19815
19928
  id: "pressure",
@@ -19820,7 +19933,7 @@ var GROUP_TEMPLATES = [
19820
19933
  quantity: "pressure",
19821
19934
  defaultAggregate: "mean",
19822
19935
  empty: "null",
19823
- companions: [NOW]
19936
+ companions: [NOW$1]
19824
19937
  }),
19825
19938
  numeric({
19826
19939
  id: "illuminance",
@@ -19831,7 +19944,7 @@ var GROUP_TEMPLATES = [
19831
19944
  quantity: "illuminance",
19832
19945
  defaultAggregate: "mean",
19833
19946
  empty: "null",
19834
- companions: [NOW]
19947
+ companions: [NOW$1]
19835
19948
  }),
19836
19949
  numeric({
19837
19950
  id: "power",
@@ -19842,7 +19955,7 @@ var GROUP_TEMPLATES = [
19842
19955
  quantity: "power",
19843
19956
  defaultAggregate: "sum",
19844
19957
  empty: "omit",
19845
- companions: [NOW]
19958
+ companions: [NOW$1]
19846
19959
  }),
19847
19960
  numeric({
19848
19961
  id: "energy",
@@ -19853,7 +19966,7 @@ var GROUP_TEMPLATES = [
19853
19966
  quantity: "energy",
19854
19967
  defaultAggregate: "sum",
19855
19968
  empty: "omit",
19856
- companions: [NOW]
19969
+ companions: [NOW$1]
19857
19970
  }),
19858
19971
  numeric({
19859
19972
  id: "battery",
@@ -19888,7 +20001,7 @@ var GROUP_TEMPLATES = [
19888
20001
  quantity: "device",
19889
20002
  defaultAggregate: "mean",
19890
20003
  empty: "null",
19891
- companions: [NOW]
20004
+ companions: [NOW$1]
19892
20005
  }),
19893
20006
  binary({
19894
20007
  id: "motion",
@@ -20017,6 +20130,7 @@ function actuator(input) {
20017
20130
  }
20018
20131
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
20019
20132
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
20133
+ DeviceType.Camera;
20020
20134
  `${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
20021
20135
  /**
20022
20136
  * What a composition may BUILD on a device type (G2, D676): the caps a new
@@ -64979,6 +65093,44 @@ var lockControlCapability = {
64979
65093
  volatileStateFields: ["lastChangedAt"]
64980
65094
  };
64981
65095
  /**
65096
+ * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
65097
+ * so dashboards keep one series; every other instantaneous reading lands here.
65098
+ * `value` is the time integral in the source quantity's accumulated base
65099
+ * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
65100
+ */
65101
+ var MeterStatusSchema = object({
65102
+ value: number().nullable().meta(readingMeta("device", { label: "Total" })),
65103
+ lastFetchedAt: number()
65104
+ });
65105
+ var meterCapability = {
65106
+ name: "meter",
65107
+ scope: "device",
65108
+ deviceNative: true,
65109
+ mode: "singleton",
65110
+ deviceTypes: [DeviceType.Sensor],
65111
+ methods: {},
65112
+ status: {
65113
+ schema: MeterStatusSchema,
65114
+ kind: "push"
65115
+ },
65116
+ runtimeState: MeterStatusSchema,
65117
+ /**
65118
+ * Runtime-state durability: **restored** — the total is a cache of the
65119
+ * history integral. A restart shows it only until the history pass
65120
+ * recomputes the open period; it is not an in-memory buffer.
65121
+ *
65122
+ * See `RuntimeStateDurability`. Enforced by
65123
+ * `scripts/check-runtime-state-durability.ts`.
65124
+ */
65125
+ durability: "restored",
65126
+ history: { fields: { value: {
65127
+ kind: "counter",
65128
+ deadband: .001,
65129
+ minIntervalMs: 6e4
65130
+ } } },
65131
+ volatileStateFields: ["lastFetchedAt"]
65132
+ };
65133
+ /**
64982
65134
  * Media-player cap. Models HA `media_player.*` (Sonos, Chromecast,
64983
65135
  * Apple TV, Spotify, Roku, generic OTT receivers, …) on
64984
65136
  * `DeviceType.MediaPlayer`. Disjoint from the camera streaming
@@ -73456,6 +73608,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
73456
73608
  lawnMowerControl: lawnMowerControlCapability,
73457
73609
  lockControl: lockControlCapability,
73458
73610
  mediaPlayer: mediaPlayerCapability,
73611
+ meter: meterCapability,
73459
73612
  motion: motionCapability,
73460
73613
  motionTrigger: motionTriggerCapability,
73461
73614
  motionZones: motionZonesCapability,
@@ -78421,6 +78574,13 @@ Object.freeze({
78421
78574
  access: "create",
78422
78575
  role: "admin"
78423
78576
  },
78577
+ "meter.getStatus": {
78578
+ capName: "meter",
78579
+ capScope: "device",
78580
+ addonId: null,
78581
+ access: "view",
78582
+ role: "viewer"
78583
+ },
78424
78584
  "metricsProvider.collectSnapshot": {
78425
78585
  capName: "metrics-provider",
78426
78586
  capScope: "system",
@@ -87379,6 +87539,17 @@ var SENSOR_CAP_VOCABULARY = {
87379
87539
  }],
87380
87540
  events: { onMotionChanged: { notOperatorFacing: "the `detected` state trigger phrases both edges, from the mirror that survives a dropped event (D49)" } }
87381
87541
  },
87542
+ meter: {
87543
+ scope: "device",
87544
+ noun: t("Meter", "Contatore"),
87545
+ state: [{
87546
+ kind: "numeric",
87547
+ field: "value",
87548
+ quantity: t("the total", "il totale"),
87549
+ label: t("Total", "Totale"),
87550
+ icon: "gauge"
87551
+ }]
87552
+ },
87382
87553
  "numeric-sensor": {
87383
87554
  scope: "device",
87384
87555
  noun: t("Sensor", "Sensore"),
@@ -89068,6 +89239,11 @@ Object.freeze({
89068
89239
  form: "single",
89069
89240
  optional: false
89070
89241
  }],
89242
+ "meter.getStatus": [{
89243
+ name: "deviceId",
89244
+ form: "single",
89245
+ optional: false
89246
+ }],
89071
89247
  "motion.getStatus": [{
89072
89248
  name: "deviceId",
89073
89249
  form: "single",
@@ -90772,7 +90948,6 @@ var BucketAccumulator = class {
90772
90948
  return n;
90773
90949
  }
90774
90950
  };
90775
- DeviceType.Camera;
90776
90951
  /**
90777
90952
  * A saved Customize assignment (D936). The schema is the type: callers use
90778
90953
  * `z.infer`, they do not restate the shape.