@camstack/types 1.2.433 → 1.2.435

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 (56) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/addon.js +2 -2
  3. package/dist/addon.mjs +2 -2
  4. package/dist/automation/index.d.ts +3 -1
  5. package/dist/automation/recipe.d.ts +33 -3
  6. package/dist/automation/stationary-trigger.d.ts +48 -0
  7. package/dist/automation/trace.d.ts +4 -1
  8. package/dist/capabilities/actions.cap.d.ts +1 -0
  9. package/dist/capabilities/air-quality-sensor.cap.d.ts +8 -8
  10. package/dist/capabilities/ambient-light-sensor.cap.d.ts +4 -4
  11. package/dist/capabilities/battery.cap.d.ts +14 -14
  12. package/dist/capabilities/brightness.cap.d.ts +7 -7
  13. package/dist/capabilities/capability-definition.d.ts +3 -3
  14. package/dist/capabilities/color.cap.d.ts +6 -6
  15. package/dist/capabilities/core-blocks.cap.d.ts +156 -0
  16. package/dist/capabilities/device-history.cap.d.ts +2 -2
  17. package/dist/capabilities/dishwasher.cap.d.ts +11 -11
  18. package/dist/capabilities/fan-control.cap.d.ts +6 -6
  19. package/dist/capabilities/humidity-sensor.cap.d.ts +4 -4
  20. package/dist/capabilities/lawn-mower-control.cap.d.ts +3 -3
  21. package/dist/capabilities/media-player.cap.d.ts +8 -8
  22. package/dist/capabilities/meter.cap.d.ts +1 -1
  23. package/dist/capabilities/network-link.cap.d.ts +13 -13
  24. package/dist/capabilities/power-meter.cap.d.ts +22 -22
  25. package/dist/capabilities/presence.cap.d.ts +1 -15
  26. package/dist/capabilities/pressure-sensor.cap.d.ts +4 -4
  27. package/dist/capabilities/temperature-sensor.cap.d.ts +4 -4
  28. package/dist/capabilities/vacuum-control.cap.d.ts +3 -3
  29. package/dist/client.js +1 -1
  30. package/dist/client.mjs +1 -1
  31. package/dist/composition/composition-report.d.ts +1 -1
  32. package/dist/composition/examples.d.ts +1 -1
  33. package/dist/composition/helpers/appliance.d.ts +1 -1
  34. package/dist/{composition-CpAc0YfQ.js → composition-BZf_gqG7.js} +2 -2
  35. package/dist/{composition-Bb8iwHEJ.mjs → composition-CZImLpOI.mjs} +2 -2
  36. package/dist/device/base-device.d.ts +2 -2
  37. package/dist/device/device-runtime-state.d.ts +1 -1
  38. package/dist/device/device-state-handle.d.ts +1 -1
  39. package/dist/device/system-mirror.d.ts +1 -1
  40. package/dist/enums/event-category.d.ts +1 -1
  41. package/dist/enums.js +1 -1
  42. package/dist/enums.mjs +1 -1
  43. package/dist/{event-category-hdMR7CTW.mjs → event-category-DmZDPDf_.mjs} +1 -1
  44. package/dist/{event-category-BhzwWQCH.js → event-category-E17zaHjN.js} +1 -1
  45. package/dist/generated/addon-cap-facts.d.ts +1 -1
  46. package/dist/generated/customize-catalog.d.ts +15 -15
  47. package/dist/generated/history-catalog.d.ts +1 -1
  48. package/dist/index.d.ts +2 -2
  49. package/dist/index.js +673 -518
  50. package/dist/index.mjs +673 -519
  51. package/dist/interfaces/event-bus.d.ts +24 -3
  52. package/dist/node.js +1 -1
  53. package/dist/node.mjs +1 -1
  54. package/dist/{sleep-BHjNez61.mjs → sleep-Crlmu_tO.mjs} +27 -31
  55. package/dist/{sleep-5zRztaHa.js → sleep-DHitF_e4.js} +27 -31
  56. package/package.json +1 -1
@@ -17,11 +17,11 @@ import { DeviceType } from '../device/device-type.js';
17
17
  * in real-world devices.
18
18
  */
19
19
  export declare const PowerMeterStatusSchema: z.ZodObject<{
20
- watts: z.ZodOptional<z.ZodNumber>;
21
- kwhTotal: z.ZodOptional<z.ZodNumber>;
22
- volts: z.ZodOptional<z.ZodNumber>;
23
- amps: z.ZodOptional<z.ZodNumber>;
24
- va: z.ZodOptional<z.ZodNumber>;
20
+ power: z.ZodOptional<z.ZodNumber>;
21
+ energy: z.ZodOptional<z.ZodNumber>;
22
+ voltage: z.ZodOptional<z.ZodNumber>;
23
+ current: z.ZodOptional<z.ZodNumber>;
24
+ apparentPower: z.ZodOptional<z.ZodNumber>;
25
25
  powerFactor: z.ZodOptional<z.ZodNumber>;
26
26
  lastFetchedAt: z.ZodNumber;
27
27
  }, z.core.$strip>;
@@ -35,62 +35,62 @@ export declare const powerMeterCapability: {
35
35
  readonly methods: {};
36
36
  readonly status: {
37
37
  readonly schema: z.ZodObject<{
38
- watts: z.ZodOptional<z.ZodNumber>;
39
- kwhTotal: z.ZodOptional<z.ZodNumber>;
40
- volts: z.ZodOptional<z.ZodNumber>;
41
- amps: z.ZodOptional<z.ZodNumber>;
42
- va: z.ZodOptional<z.ZodNumber>;
38
+ power: z.ZodOptional<z.ZodNumber>;
39
+ energy: z.ZodOptional<z.ZodNumber>;
40
+ voltage: z.ZodOptional<z.ZodNumber>;
41
+ current: z.ZodOptional<z.ZodNumber>;
42
+ apparentPower: z.ZodOptional<z.ZodNumber>;
43
43
  powerFactor: z.ZodOptional<z.ZodNumber>;
44
44
  lastFetchedAt: z.ZodNumber;
45
45
  }, z.core.$strip>;
46
46
  readonly kind: 'push';
47
47
  };
48
48
  readonly runtimeState: z.ZodObject<{
49
- watts: z.ZodOptional<z.ZodNumber>;
50
- kwhTotal: z.ZodOptional<z.ZodNumber>;
51
- volts: z.ZodOptional<z.ZodNumber>;
52
- amps: z.ZodOptional<z.ZodNumber>;
53
- va: z.ZodOptional<z.ZodNumber>;
49
+ power: z.ZodOptional<z.ZodNumber>;
50
+ energy: z.ZodOptional<z.ZodNumber>;
51
+ voltage: z.ZodOptional<z.ZodNumber>;
52
+ current: z.ZodOptional<z.ZodNumber>;
53
+ apparentPower: z.ZodOptional<z.ZodNumber>;
54
54
  powerFactor: z.ZodOptional<z.ZodNumber>;
55
55
  lastFetchedAt: z.ZodNumber;
56
56
  }, z.core.$strip>;
57
57
  /**
58
- * Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
58
+ * Runtime-state durability: **restored** — as `numeric-sensor`; `energy` is an accumulator whose restored value is the baseline.
59
59
  *
60
60
  * See `RuntimeStateDurability`. Enforced by
61
61
  * `scripts/check-runtime-state-durability.ts`.
62
62
  */
63
63
  readonly durability: 'restored';
64
64
  /**
65
- * History (D850): recorded series. Gauges are floored at 30 s; `kwhTotal` is the one monotonic meter (counter).
65
+ * History (D850): recorded series. Gauges are floored at 30 s; `energy` is the one monotonic meter (counter).
66
66
  */
67
67
  readonly history: {
68
68
  readonly fields: {
69
- readonly watts: {
69
+ readonly power: {
70
70
  readonly kind: 'gauge';
71
71
  readonly unit: 'W';
72
72
  readonly deadband: 1;
73
73
  readonly minIntervalMs: 30000;
74
74
  };
75
- readonly kwhTotal: {
75
+ readonly energy: {
76
76
  readonly kind: 'counter';
77
77
  readonly unit: 'kWh';
78
78
  readonly deadband: 0.01;
79
79
  readonly minIntervalMs: 60000;
80
80
  };
81
- readonly volts: {
81
+ readonly voltage: {
82
82
  readonly kind: 'gauge';
83
83
  readonly unit: 'V';
84
84
  readonly deadband: 1;
85
85
  readonly minIntervalMs: 30000;
86
86
  };
87
- readonly amps: {
87
+ readonly current: {
88
88
  readonly kind: 'gauge';
89
89
  readonly unit: 'A';
90
90
  readonly deadband: 0.05;
91
91
  readonly minIntervalMs: 30000;
92
92
  };
93
- readonly va: {
93
+ readonly apparentPower: {
94
94
  readonly kind: 'gauge';
95
95
  readonly unit: 'VA';
96
96
  readonly deadband: 1;
@@ -31,7 +31,6 @@ export declare const PresenceStatusSchema: z.ZodObject<{
31
31
  longitude: z.ZodNumber;
32
32
  accuracyMeters: z.ZodNumber;
33
33
  }, z.core.$strip>>;
34
- batteryPercent: z.ZodNullable<z.ZodNumber>;
35
34
  lastChangedAt: z.ZodNumber;
36
35
  }, z.core.$strip>;
37
36
  export type PresenceStatus = z.infer<typeof PresenceStatusSchema>;
@@ -51,7 +50,6 @@ export declare const presenceCapability: {
51
50
  longitude: z.ZodNumber;
52
51
  accuracyMeters: z.ZodNumber;
53
52
  }, z.core.$strip>>;
54
- batteryPercent: z.ZodNullable<z.ZodNumber>;
55
53
  lastChangedAt: z.ZodNumber;
56
54
  }, z.core.$strip>;
57
55
  readonly kind: 'push';
@@ -70,7 +68,6 @@ export declare const presenceCapability: {
70
68
  longitude: z.ZodNumber;
71
69
  accuracyMeters: z.ZodNumber;
72
70
  }, z.core.$strip>>;
73
- batteryPercent: z.ZodNullable<z.ZodNumber>;
74
71
  lastChangedAt: z.ZodNumber;
75
72
  }, z.core.$strip>;
76
73
  /**
@@ -80,18 +77,7 @@ export declare const presenceCapability: {
80
77
  * `scripts/check-runtime-state-durability.ts`.
81
78
  */
82
79
  readonly durability: 'restored';
83
- /**
84
- * History (D850): recorded series.
85
- */
86
- readonly history: {
87
- readonly fields: {
88
- readonly batteryPercent: {
89
- readonly kind: 'gauge';
90
- readonly unit: '%';
91
- readonly deadband: 1;
92
- };
93
- };
94
- };
80
+ readonly history: 'none';
95
81
  /** Clock fields: written, but excluded from the compare that decides
96
82
  * whether persisting is worth a SQLite commit. */
97
83
  readonly volatileStateFields: readonly ["lastChangedAt"];
@@ -10,7 +10,7 @@ import { DeviceType } from '../device/device-type.js';
10
10
  * `sourceInfo`.
11
11
  */
12
12
  export declare const PressureSensorStatusSchema: z.ZodObject<{
13
- hpa: z.ZodNullable<z.ZodNumber>;
13
+ pressure: z.ZodNullable<z.ZodNumber>;
14
14
  lastFetchedAt: z.ZodNumber;
15
15
  }, z.core.$strip>;
16
16
  export type PressureSensorStatus = z.infer<typeof PressureSensorStatusSchema>;
@@ -23,13 +23,13 @@ export declare const pressureSensorCapability: {
23
23
  readonly methods: {};
24
24
  readonly status: {
25
25
  readonly schema: z.ZodObject<{
26
- hpa: z.ZodNullable<z.ZodNumber>;
26
+ pressure: z.ZodNullable<z.ZodNumber>;
27
27
  lastFetchedAt: z.ZodNumber;
28
28
  }, z.core.$strip>;
29
29
  readonly kind: 'push';
30
30
  };
31
31
  readonly runtimeState: z.ZodObject<{
32
- hpa: z.ZodNullable<z.ZodNumber>;
32
+ pressure: z.ZodNullable<z.ZodNumber>;
33
33
  lastFetchedAt: z.ZodNumber;
34
34
  }, z.core.$strip>;
35
35
  /**
@@ -44,7 +44,7 @@ export declare const pressureSensorCapability: {
44
44
  */
45
45
  readonly history: {
46
46
  readonly fields: {
47
- readonly hpa: {
47
+ readonly pressure: {
48
48
  readonly kind: 'gauge';
49
49
  readonly unit: 'hPa';
50
50
  readonly deadband: 0.1;
@@ -14,7 +14,7 @@ import { DeviceType } from '../device/device-type.js';
14
14
  * changed" steady state.
15
15
  */
16
16
  export declare const TemperatureSensorStatusSchema: z.ZodObject<{
17
- celsius: z.ZodNullable<z.ZodNumber>;
17
+ temperature: z.ZodNullable<z.ZodNumber>;
18
18
  lastFetchedAt: z.ZodNumber;
19
19
  }, z.core.$strip>;
20
20
  export type TemperatureSensorStatus = z.infer<typeof TemperatureSensorStatusSchema>;
@@ -27,13 +27,13 @@ export declare const temperatureSensorCapability: {
27
27
  readonly methods: {};
28
28
  readonly status: {
29
29
  readonly schema: z.ZodObject<{
30
- celsius: z.ZodNullable<z.ZodNumber>;
30
+ temperature: z.ZodNullable<z.ZodNumber>;
31
31
  lastFetchedAt: z.ZodNumber;
32
32
  }, z.core.$strip>;
33
33
  readonly kind: 'push';
34
34
  };
35
35
  readonly runtimeState: z.ZodObject<{
36
- celsius: z.ZodNullable<z.ZodNumber>;
36
+ temperature: z.ZodNullable<z.ZodNumber>;
37
37
  lastFetchedAt: z.ZodNumber;
38
38
  }, z.core.$strip>;
39
39
  /**
@@ -48,7 +48,7 @@ export declare const temperatureSensorCapability: {
48
48
  */
49
49
  readonly history: {
50
50
  readonly fields: {
51
- readonly celsius: {
51
+ readonly temperature: {
52
52
  readonly kind: 'gauge';
53
53
  readonly unit: '°C';
54
54
  readonly deadband: 0.1;
@@ -44,7 +44,7 @@ export declare const VacuumControlStatusSchema: z.ZodObject<{
44
44
  batteryLevel: z.ZodNullable<z.ZodNumber>;
45
45
  fanSpeed: z.ZodNullable<z.ZodString>;
46
46
  availableFanSpeeds: z.ZodArray<z.ZodString>;
47
- progressPercent: z.ZodNullable<z.ZodNumber>;
47
+ progress: z.ZodNullable<z.ZodNumber>;
48
48
  errorCode: z.ZodNullable<z.ZodNumber>;
49
49
  errorLabel: z.ZodNullable<z.ZodString>;
50
50
  lastChangedAt: z.ZodNumber;
@@ -91,7 +91,7 @@ export declare const vacuumControlCapability: {
91
91
  batteryLevel: z.ZodNullable<z.ZodNumber>;
92
92
  fanSpeed: z.ZodNullable<z.ZodString>;
93
93
  availableFanSpeeds: z.ZodArray<z.ZodString>;
94
- progressPercent: z.ZodNullable<z.ZodNumber>;
94
+ progress: z.ZodNullable<z.ZodNumber>;
95
95
  errorCode: z.ZodNullable<z.ZodNumber>;
96
96
  errorLabel: z.ZodNullable<z.ZodString>;
97
97
  lastChangedAt: z.ZodNumber;
@@ -115,7 +115,7 @@ export declare const vacuumControlCapability: {
115
115
  batteryLevel: z.ZodNullable<z.ZodNumber>;
116
116
  fanSpeed: z.ZodNullable<z.ZodString>;
117
117
  availableFanSpeeds: z.ZodArray<z.ZodString>;
118
- progressPercent: z.ZodNullable<z.ZodNumber>;
118
+ progress: z.ZodNullable<z.ZodNumber>;
119
119
  errorCode: z.ZodNullable<z.ZodNumber>;
120
120
  errorLabel: z.ZodNullable<z.ZodString>;
121
121
  lastChangedAt: z.ZodNumber;
package/dist/client.js CHANGED
@@ -26538,7 +26538,7 @@ function createMirrorSource(mirror, listeners, api) {
26538
26538
  *
26539
26539
  * const dev = createDeviceProxy(api, binding)
26540
26540
  * dev.state.battery.value // BatteryStatus | undefined
26541
- * dev.state.battery.value?.percentage
26541
+ * dev.state.battery.value?.level
26542
26542
  *
26543
26543
  * Two-arg form (deprecated path, kept for spec compatibility):
26544
26544
  * passes the api directly, builds a per-handle lazy source. New
package/dist/client.mjs CHANGED
@@ -26537,7 +26537,7 @@ function createMirrorSource(mirror, listeners, api) {
26537
26537
  *
26538
26538
  * const dev = createDeviceProxy(api, binding)
26539
26539
  * dev.state.battery.value // BatteryStatus | undefined
26540
- * dev.state.battery.value?.percentage
26540
+ * dev.state.battery.value?.level
26541
26541
  *
26542
26542
  * Two-arg form (deprecated path, kept for spec compatibility):
26543
26543
  * passes the api directly, builds a per-handle lazy source. New
@@ -33,7 +33,7 @@ export declare const CompositionProblemCodeSchema: z.ZodEnum<{
33
33
  "wrong-device-type": "wrong-device-type";
34
34
  }>;
35
35
  export type CompositionProblemCode = z.infer<typeof CompositionProblemCodeSchema>;
36
- /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
36
+ /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
37
37
  export declare const CompositionProblemSchema: z.ZodObject<{
38
38
  code: z.ZodEnum<{
39
39
  cycle: "cycle";
@@ -22,7 +22,7 @@ export declare function roomCompositionExample(input: RoomExampleInput): Composi
22
22
  * an `enum-sensor` whose `value` is the raw STRING state — `number(d)` reads it,
23
23
  * and anything that is not a number is `null`, never 0 (D393). The battery
24
24
  * status sensor is an `enum-sensor` too (`unavailable` keeps its cold `''`, so
25
- * `percentage` is `null`). `charging` maps `battery_charging` off to
25
+ * `level` is `null`). `charging` maps `battery_charging` off to
26
26
  * `'unknown'`, never `'none'`: off does not prove "on battery alone" (the
27
27
  * operator confirms the real semantics live).
28
28
  */
@@ -24,5 +24,5 @@ export interface ApplianceDefaults {
24
24
  export declare const APPLIANCE_DEFAULTS: Readonly<Record<ApplianceKind, ApplianceDefaults>>;
25
25
  export declare function applianceDeviceType(kind: ApplianceKind): DeviceType;
26
26
  export declare function isApplianceKind(value: string): value is ApplianceKind;
27
- /** The member step: one watts reading, from a sensor or from the plug itself. */
27
+ /** The member step: one power reading, from a sensor or from the plug itself. */
28
28
  export declare function sourcePickForAppliance(): SourcePickRequest;
@@ -2263,7 +2263,7 @@ function applianceDeviceType(kind) {
2263
2263
  function isApplianceKind(value) {
2264
2264
  return APPLIANCE_KINDS.some((kind) => kind === value);
2265
2265
  }
2266
- /** The member step: one watts reading, from a sensor or from the plug itself. */
2266
+ /** The member step: one power reading, from a sensor or from the plug itself. */
2267
2267
  function sourcePickForAppliance() {
2268
2268
  return {
2269
2269
  purpose: "reading",
@@ -2272,7 +2272,7 @@ function sourcePickForAppliance() {
2272
2272
  deviceTypes: [require_err_msg.DeviceType.Sensor, require_err_msg.DeviceType.Switch],
2273
2273
  accept: [{
2274
2274
  cap: "power-meter",
2275
- fieldPath: "watts",
2275
+ fieldPath: "power",
2276
2276
  valueKind: "number"
2277
2277
  }],
2278
2278
  history: {
@@ -2263,7 +2263,7 @@ function applianceDeviceType(kind) {
2263
2263
  function isApplianceKind(value) {
2264
2264
  return APPLIANCE_KINDS.some((kind) => kind === value);
2265
2265
  }
2266
- /** The member step: one watts reading, from a sensor or from the plug itself. */
2266
+ /** The member step: one power reading, from a sensor or from the plug itself. */
2267
2267
  function sourcePickForAppliance() {
2268
2268
  return {
2269
2269
  purpose: "reading",
@@ -2272,7 +2272,7 @@ function sourcePickForAppliance() {
2272
2272
  deviceTypes: [DeviceType.Sensor, DeviceType.Switch],
2273
2273
  accept: [{
2274
2274
  cap: "power-meter",
2275
- fieldPath: "watts",
2275
+ fieldPath: "power",
2276
2276
  valueKind: "number"
2277
2277
  }],
2278
2278
  history: {
@@ -31,7 +31,7 @@ export declare abstract class BaseDevice<T extends z.ZodObject<z.core.$ZodLooseS
31
31
  * `device-local-state.ts`. Drivers access via:
32
32
  *
33
33
  * `this.state.battery.sleeping = true` // patches the battery slice
34
- * `const pct = this.state.battery.percentage` // reads the battery slice
34
+ * `const pct = this.state.battery.level` // reads the battery slice
35
35
  * `this.state.deviceStatus.online = true` // mirrors `markOnline(true)`
36
36
  *
37
37
  * Adding a new cap with `runtimeState:` automatically extends this
@@ -56,7 +56,7 @@ export declare abstract class BaseDevice<T extends z.ZodObject<z.core.$ZodLooseS
56
56
  * shape; drivers don't redeclare it, they just write through.
57
57
  *
58
58
  * Read: `this.runtimeState.getCapState('battery')` →
59
- * `{percentage, charging, sleeping, lastUpdated}` for any
59
+ * `{level, charging, sleeping, lastUpdated}` for any
60
60
  * provider that registers `batteryCapability`.
61
61
  * Write: `this.runtimeState.setCapState('battery', { … })`.
62
62
  *
@@ -40,7 +40,7 @@ export interface IDeviceRuntimeState {
40
40
  getCapState<K extends keyof import('../generated/device-local-state.js').CapNameToRuntimeStateMap>(capName: K): Readonly<import('../generated/device-local-state.js').CapNameToRuntimeStateMap[K]> | undefined;
41
41
  getCapState<T extends Record<string, unknown> = Record<string, unknown>>(capName: string): Readonly<T> | undefined;
42
42
  /** Read a single key inside a slice. Convenience for the common
43
- * case of reading a primitive (`battery.percentage`). */
43
+ * case of reading a primitive (`battery.level`). */
44
44
  getCapField(capName: string, key: string): unknown;
45
45
  /**
46
46
  * Replace the slice for `capName`. The schema bound to `capName`
@@ -182,7 +182,7 @@ export declare function createMirrorSource(mirror: ReadonlyMap<number, ReadonlyM
182
182
  *
183
183
  * const dev = createDeviceProxy(api, binding)
184
184
  * dev.state.battery.value // BatteryStatus | undefined
185
- * dev.state.battery.value?.percentage
185
+ * dev.state.battery.value?.level
186
186
  *
187
187
  * Two-arg form (deprecated path, kept for spec compatibility):
188
188
  * passes the api directly, builds a per-handle lazy source. New
@@ -33,7 +33,7 @@
33
33
  * await dev?.snapshot?.getSnapshot({...}) // method dispatch via cap-router
34
34
  *
35
35
  * sm.query({ addonId: 'reolink', online: true })
36
- * sm.whereState('battery', s => s.percentage < 20)
36
+ * sm.whereState('battery', s => s.level < 20)
37
37
  * sm.listenCap('motion', (id, slice) => …)
38
38
  * await sm.waitForState(8, 'battery', s => !s.sleeping, 30_000)
39
39
  *
@@ -624,7 +624,7 @@ export declare enum EventCategory {
624
624
  * (a track was promoted to a stationary-registry entry) or departs (the
625
625
  * object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
626
626
  * the dedicated "Stationary" section — never the live event feed. Payload:
627
- * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
627
+ * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
628
628
  */
629
629
  PipelineAnalyticsStationaryChanged = "pipeline-analytics.stationary-changed",
630
630
  /**
package/dist/enums.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_event_category = require("./event-category-BhzwWQCH.js");
2
+ const require_event_category = require("./event-category-E17zaHjN.js");
3
3
  //#region src/enums/event-source-type.ts
4
4
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
5
5
  EventSourceType["Addon"] = "addon";
package/dist/enums.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as EventCategory } from "./event-category-hdMR7CTW.mjs";
1
+ import { t as EventCategory } from "./event-category-DmZDPDf_.mjs";
2
2
  //#region src/enums/event-source-type.ts
3
3
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
4
4
  EventSourceType["Addon"] = "addon";
@@ -625,7 +625,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
625
625
  * (a track was promoted to a stationary-registry entry) or departs (the
626
626
  * object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
627
627
  * the dedicated "Stationary" section — never the live event feed. Payload:
628
- * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
628
+ * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
629
629
  */
630
630
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
631
631
  /**
@@ -625,7 +625,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
625
625
  * (a track was promoted to a stationary-registry entry) or departs (the
626
626
  * object moved / was removed). Telemetry (D8): lossy, drives a UI refresh of
627
627
  * the dedicated "Stationary" section — never the live event feed. Payload:
628
- * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
628
+ * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp, observedAt, zones }`.
629
629
  */
630
630
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
631
631
  /**
@@ -5,7 +5,7 @@
5
5
  * `ALL_CAPABILITY_DEFINITIONS` (the whole Zod schema graph, ~+100 MB heap per
6
6
  * runner). See docs/decisions/adr-0028.md.
7
7
  *
8
- * Coverage: 1 advance-derived caps, 77 caps with 356 state leaves.
8
+ * Coverage: 1 advance-derived caps, 77 caps with 355 state leaves.
9
9
  */
10
10
  /** A bindable scalar in a capability's runtime state. */
11
11
  export interface CapStateLeaf {
@@ -7,12 +7,12 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
7
7
  readonly battery: {
8
8
  readonly version: 1;
9
9
  readonly targets: readonly [{
10
- readonly id: 'percentage';
10
+ readonly id: 'level';
11
11
  readonly cardinality: 'scalar';
12
12
  readonly deviceTypes: readonly [DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter];
13
13
  readonly apply: 'add';
14
14
  readonly vocabularyCap: 'battery';
15
- readonly vocabularyStateField: 'percentage';
15
+ readonly vocabularyStateField: 'level';
16
16
  readonly sources: readonly [{
17
17
  readonly kind: 'field';
18
18
  readonly valueKinds: readonly ["number", "string"];
@@ -31,7 +31,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
31
31
  readonly status: 'assignment-status';
32
32
  };
33
33
  readonly advancedExpression: true;
34
- readonly path: 'percentage';
34
+ readonly path: 'level';
35
35
  readonly valueKind: 'number';
36
36
  readonly nullable: true;
37
37
  readonly companions: readonly [{
@@ -209,12 +209,12 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
209
209
  readonly 'power-meter': {
210
210
  readonly version: 1;
211
211
  readonly targets: readonly [{
212
- readonly id: 'watts';
212
+ readonly id: 'power';
213
213
  readonly cardinality: 'scalar';
214
214
  readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder];
215
215
  readonly apply: 'add';
216
216
  readonly vocabularyCap: 'power-meter';
217
- readonly vocabularyStateField: 'watts';
217
+ readonly vocabularyStateField: 'power';
218
218
  readonly sources: readonly [{
219
219
  readonly kind: 'numeric';
220
220
  readonly requiredUnit: 'W';
@@ -227,7 +227,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
227
227
  readonly status: 'assignment-status';
228
228
  };
229
229
  readonly advancedExpression: true;
230
- readonly path: 'watts';
230
+ readonly path: 'power';
231
231
  readonly valueKind: 'number';
232
232
  readonly nullable: false;
233
233
  readonly companions: readonly [{
@@ -236,12 +236,12 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
236
236
  readonly when: 'always';
237
237
  }];
238
238
  }, {
239
- readonly id: 'kwhTotal';
239
+ readonly id: 'energy';
240
240
  readonly cardinality: 'scalar';
241
241
  readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder];
242
242
  readonly apply: 'add';
243
243
  readonly vocabularyCap: 'power-meter';
244
- readonly vocabularyStateField: 'kwhTotal';
244
+ readonly vocabularyStateField: 'energy';
245
245
  readonly sources: readonly [{
246
246
  readonly kind: 'numeric';
247
247
  readonly requiredUnit: 'kWh';
@@ -254,7 +254,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
254
254
  readonly status: 'assignment-status';
255
255
  };
256
256
  readonly advancedExpression: true;
257
- readonly path: 'kwhTotal';
257
+ readonly path: 'energy';
258
258
  readonly valueKind: 'number';
259
259
  readonly nullable: false;
260
260
  readonly companions: readonly [{
@@ -263,12 +263,12 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
263
263
  readonly when: 'always';
264
264
  }];
265
265
  }, {
266
- readonly id: 'volts';
266
+ readonly id: 'voltage';
267
267
  readonly cardinality: 'scalar';
268
268
  readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder];
269
269
  readonly apply: 'add';
270
270
  readonly vocabularyCap: 'power-meter';
271
- readonly vocabularyStateField: 'volts';
271
+ readonly vocabularyStateField: 'voltage';
272
272
  readonly sources: readonly [{
273
273
  readonly kind: 'numeric';
274
274
  readonly requiredUnit: 'V';
@@ -281,7 +281,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
281
281
  readonly status: 'assignment-status';
282
282
  };
283
283
  readonly advancedExpression: true;
284
- readonly path: 'volts';
284
+ readonly path: 'voltage';
285
285
  readonly valueKind: 'number';
286
286
  readonly nullable: false;
287
287
  readonly companions: readonly [{
@@ -290,12 +290,12 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
290
290
  readonly when: 'always';
291
291
  }];
292
292
  }, {
293
- readonly id: 'amps';
293
+ readonly id: 'current';
294
294
  readonly cardinality: 'scalar';
295
295
  readonly deviceTypes: readonly [DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder];
296
296
  readonly apply: 'add';
297
297
  readonly vocabularyCap: 'power-meter';
298
- readonly vocabularyStateField: 'amps';
298
+ readonly vocabularyStateField: 'current';
299
299
  readonly sources: readonly [{
300
300
  readonly kind: 'numeric';
301
301
  readonly requiredUnit: 'A';
@@ -308,7 +308,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
308
308
  readonly status: 'assignment-status';
309
309
  };
310
310
  readonly advancedExpression: true;
311
- readonly path: 'amps';
311
+ readonly path: 'current';
312
312
  readonly valueKind: 'number';
313
313
  readonly nullable: false;
314
314
  readonly companions: readonly [{
@@ -1,7 +1,7 @@
1
1
  import type { CapabilityHistoryField, CapabilityHistoryItems } from '../capabilities/capability-definition.js';
2
2
  /**
3
3
  * Cap history catalog, projected from every `*.cap.ts` `history` block.
4
- * 42 caps with series (77 series), 33 caps answered `'none'`.
4
+ * 41 caps with series (76 series), 34 caps answered `'none'`.
5
5
  * Field keys are `runtimeState` paths (`a.b` into fixed objects only).
6
6
  */
7
7
  export declare const HISTORY_CATALOG: Readonly<Record<string, Readonly<Record<string, CapabilityHistoryField>>>>;
package/dist/index.d.ts CHANGED
@@ -162,8 +162,8 @@ export { APP_FLOW_DEFAULT_REDIRECT, APP_FLOW_REFUSAL_MESSAGES, APP_FLOW_STATE_PR
162
162
  export { SSO_STATE_COOKIE, SSO_STATE_COOKIE_MAX_AGE_SEC } from './auth/sso-state.js';
163
163
  export { buildDeviceEnrollmentLink, buildDeviceSignatureMessage, type CompleteEnrollmentInput, CompleteEnrollmentInputSchema, type CompleteEnrollmentOutput, CompleteEnrollmentOutputSchema, DEVICE_CERT_RENEW_WINDOW_DAYS, DEVICE_CERT_SIGNATURE, DEVICE_CERT_VALIDITY_DAYS, DEVICE_ENROLLMENT_TTL_MS, DEVICE_NONCE_TTL_MS, DEVICE_SAN_CREDENTIAL_PREFIX, DEVICE_SAN_USER_PREFIX, DEVICE_SIGNATURE_MESSAGE_VERSION, type DeviceCertificateLoginMethod, DeviceCertificateLoginMethodSchema, type DeviceChallenge, DeviceChallengeSchema, type DeviceCredential, DeviceCredentialSchema, type DeviceCredentialStatus, DeviceCredentialStatusSchema, type DevicePlatform, DevicePlatformSchema, type DeviceProofInput, DeviceProofInputSchema, type CompleteEnrollmentResult, CompleteEnrollmentResultSchema, DEFINITIVE_DEVICE_REFUSALS, DEVICE_DEFINITIVE_REFUSALS_BEFORE_DELETE, DEVICE_REFRESH_REFUSAL_PREFIX, deviceRefusalFromMessage, type DeviceChallengeResult, DeviceChallengeResultSchema, DeviceEnrollProofSchema, type DeviceRefusal, type DeviceRefusalReason, DeviceRefusalReasonSchema, DeviceRefusalSchema, type DeviceRevoker, type EnrollSelfInput, EnrollSelfInputSchema, formatDeviceRevoker, isDefinitiveDeviceRefusal, type RenewDeviceCertificateResult, RenewDeviceCertificateResultSchema, type RevokeOwnDeviceCertificateResult, RevokeOwnDeviceCertificateResultSchema, type DeviceSignaturePurpose, DeviceSignaturePurposeSchema, type RenewDeviceCertificateOutput, RenewDeviceCertificateOutputSchema, type StartEnrollmentOutput, StartEnrollmentOutputSchema, parseDeviceEnrollmentLink, } from './auth/device-certificate.js';
164
164
  export { advertisedHubOrigins, claimedRequestOrigins, normalizeOrigin, pickRequestOrigin, type RequestHeaders, requestMountPrefix, } from './auth/request-origin.js';
165
- export type { ActionStep, AutomationAction, AutomationCondition, AutomationConditionAll, AutomationConditionAny, AutomationConditionExpression, AutomationConditionLeaf, AutomationConditionNot, AutomationConditionOperator, AutomationConditionTraceNode, AutomationRecipe, AutomationRunMode, AutomationRunOutcome, AutomationRunTrace, AutomationRunVerdict, AutomationStateDoc, AutomationStepTrace, AutomationTrigger, AutomationTriggerTrace, ConditionEvaluation, ConditionReader, DetectionDecision, DetectionTrigger, DetectionVars, GenerateAutomationBlockInput, MirrorRefreshFetchers, MirrorRefreshReport, MirrorSource, TraceNodeOutcome, TraceValue, TrackLifecycleInput, } from './automation/index.js';
166
- export { ActionStepSchema, AutomationActionSchema, AutomationCapStepSchema, AutomationWaitStepSchema, EMPTY_AUTOMATION_STATE, mergeSkipTraces, AutomationConditionOperatorSchema, AutomationConditionSchema, AutomationConditionTraceNodeSchema, AutomationRecipeSchema, AutomationRunModeSchema, AutomationRunOutcomeSchema, AutomationRunTraceSchema, AutomationRunVerdictSchema, AutomationStateDocSchema, AutomationStepTraceSchema, AutomationTriggerSchema, AutomationTriggerTraceSchema, appendTrace, buildTriggerTrace, collectMirrorSources, ConditionMirror, conditionDepth, countConditionLeaves, DEFAULT_TRACE_KEEP, DetectionTriggerFilter, detectionClassMatches, evaluateConditionTree, generateAutomationBlock, isSkippedTrace, MAX_CONDITION_DEPTH, MAX_CONDITION_LEAVES, MAX_TRACE_KEEP, RunGate, skipSignature, TraceNodeOutcomeSchema, TraceValueSchema, validateRecipeBounds, } from './automation/index.js';
165
+ export type { ActionStep, AutomationAction, AutomationCondition, AutomationConditionAll, AutomationConditionAny, AutomationConditionExpression, AutomationConditionLeaf, AutomationConditionStationaryPresent, AutomationConditionNot, AutomationConditionOperator, AutomationConditionTraceNode, AutomationRecipe, AutomationRunMode, AutomationRunOutcome, AutomationRunTrace, AutomationRunVerdict, AutomationStateDoc, AutomationStepTrace, AutomationTrigger, AutomationTriggerTrace, ConditionEvaluation, ConditionReader, DetectionDecision, DetectionTrigger, DetectionVars, GenerateAutomationBlockInput, MirrorRefreshFetchers, MirrorRefreshReport, MirrorSource, StationaryChangedInput, StationaryDecision, StationaryTrigger, StationaryVars, TraceNodeOutcome, TraceValue, TrackLifecycleInput, } from './automation/index.js';
166
+ export { ActionStepSchema, AutomationActionSchema, AutomationCapStepSchema, AutomationWaitStepSchema, EMPTY_AUTOMATION_STATE, mergeSkipTraces, AutomationConditionOperatorSchema, AutomationConditionSchema, AutomationConditionTraceNodeSchema, AutomationRecipeSchema, AutomationRunModeSchema, AutomationRunOutcomeSchema, AutomationRunTraceSchema, AutomationRunVerdictSchema, AutomationStateDocSchema, AutomationStepTraceSchema, AutomationTriggerSchema, AutomationTriggerTraceSchema, appendTrace, buildTriggerTrace, collectMirrorSources, ConditionMirror, conditionDepth, countConditionLeaves, DEFAULT_TRACE_KEEP, DetectionTriggerFilter, detectionClassMatches, evaluateConditionTree, evaluateStationaryTrigger, generateAutomationBlock, isSkippedTrace, MAX_CONDITION_DEPTH, MAX_CONDITION_LEAVES, MAX_TRACE_KEEP, RunGate, skipSignature, TraceNodeOutcomeSchema, TraceValueSchema, validateRecipeBounds, } from './automation/index.js';
167
167
  export * from './automation/action.js';
168
168
  export * from './automation/step-runner.js';
169
169
  export * from './cap-call-context.js';