@camstack/types 1.2.416 → 1.2.418

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 (79) hide show
  1. package/dist/addon.js +1 -1
  2. package/dist/addon.mjs +1 -1
  3. package/dist/capabilities/air-quality-sensor.cap.d.ts +2 -8
  4. package/dist/capabilities/ambient-light-sensor.cap.d.ts +3 -14
  5. package/dist/capabilities/battery.cap.d.ts +9 -2
  6. package/dist/capabilities/binary.cap.d.ts +0 -5
  7. package/dist/capabilities/capability-definition.d.ts +11 -6
  8. package/dist/capabilities/composer.cap.d.ts +198 -0
  9. package/dist/capabilities/consumables.cap.d.ts +30 -41
  10. package/dist/capabilities/control.cap.d.ts +3 -25
  11. package/dist/capabilities/core-blocks.cap.d.ts +1421 -0
  12. package/dist/capabilities/customize-catalog.d.ts +0 -8
  13. package/dist/capabilities/customize-spec.d.ts +2 -3
  14. package/dist/capabilities/device-manager.cap.d.ts +79 -0
  15. package/dist/capabilities/device-provider.cap.d.ts +36 -0
  16. package/dist/capabilities/enum-sensor.cap.d.ts +5 -17
  17. package/dist/capabilities/group-status.cap.d.ts +46 -0
  18. package/dist/capabilities/humidity-sensor.cap.d.ts +3 -14
  19. package/dist/capabilities/index.d.ts +4 -2
  20. package/dist/capabilities/motion.cap.d.ts +13 -5
  21. package/dist/capabilities/numeric-sensor.cap.d.ts +8 -16
  22. package/dist/capabilities/pet-feeder.cap.d.ts +1 -1
  23. package/dist/capabilities/power-meter.cap.d.ts +0 -11
  24. package/dist/capabilities/pressure-sensor.cap.d.ts +3 -9
  25. package/dist/capabilities/running-state.cap.d.ts +1 -2
  26. package/dist/capabilities/runtime-field-unit.d.ts +1 -0
  27. package/dist/capabilities/runtime-field-units.d.ts +8 -0
  28. package/dist/capabilities/switch.cap.d.ts +0 -5
  29. package/dist/capabilities/temperature-sensor.cap.d.ts +5 -20
  30. package/dist/capabilities/weather.cap.d.ts +4 -13
  31. package/dist/client.d.ts +2 -1
  32. package/dist/client.js +57 -5
  33. package/dist/client.mjs +55 -6
  34. package/dist/composition/composition-report.d.ts +80 -3
  35. package/dist/composition/composition.d.ts +285 -5
  36. package/dist/composition/helpers/aggregate.d.ts +41 -0
  37. package/dist/composition/helpers/catalog.d.ts +42 -0
  38. package/dist/composition/helpers/compile.d.ts +22 -0
  39. package/dist/composition/helpers/index.d.ts +6 -0
  40. package/dist/composition/helpers/save.d.ts +18 -0
  41. package/dist/composition/helpers/source-pick.d.ts +40 -0
  42. package/dist/composition/helpers/spec.d.ts +38 -0
  43. package/dist/composition/index.d.ts +1 -0
  44. package/dist/composition/source-ref.d.ts +11 -0
  45. package/dist/composition/state-fields.d.ts +1 -1
  46. package/dist/composition/validate-composition.d.ts +8 -2
  47. package/dist/{composition-kEl9mevu.mjs → composition-B85l9j1M.mjs} +114 -8
  48. package/dist/{composition-DsmkwP9-.js → composition-OJKOJJD-.js} +179 -7
  49. package/dist/device/cap-vocabulary/entries/sensors.d.ts +1 -1
  50. package/dist/device/cap-vocabulary/types.d.ts +2 -2
  51. package/dist/device/schema-fields.d.ts +3 -0
  52. package/dist/device/source-info.d.ts +12 -6
  53. package/dist/generated/addon-api.d.ts +14 -0
  54. package/dist/generated/addon-cap-facts.d.ts +1 -1
  55. package/dist/generated/cap-status-types.d.ts +3 -1
  56. package/dist/generated/capability-router-map.d.ts +5 -2
  57. package/dist/generated/customize-catalog.d.ts +11 -87
  58. package/dist/generated/device-local-state.d.ts +3 -0
  59. package/dist/generated/device-proxy.d.ts +3 -0
  60. package/dist/generated/history-catalog.d.ts +1 -1
  61. package/dist/generated/method-access-map.d.ts +1 -1
  62. package/dist/generated/method-device-selectors.d.ts +1 -1
  63. package/dist/generated/runtime-state-durability.d.ts +1 -1
  64. package/dist/index.d.ts +3 -1
  65. package/dist/index.js +1458 -499
  66. package/dist/index.mjs +1420 -499
  67. package/dist/node.js +1 -1
  68. package/dist/node.mjs +1 -1
  69. package/dist/{sleep-BPQ2ZyaI.js → sleep-7Gw3GJ4n.js} +232 -127
  70. package/dist/{sleep-BErAxhul.mjs → sleep-B81gwQuR.mjs} +179 -128
  71. package/dist/units/convert.d.ts +5 -0
  72. package/dist/units/format-reading.d.ts +15 -0
  73. package/dist/units/index.d.ts +8 -1
  74. package/dist/units/ingest-reading.d.ts +21 -0
  75. package/dist/units/quantity.d.ts +47 -0
  76. package/dist/units/threshold.d.ts +6 -0
  77. package/dist/units/unit-table.d.ts +2 -228
  78. package/package.json +1 -1
  79. package/dist/capabilities/advanced-parameters.d.ts +0 -17
package/dist/addon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_sleep = require("./sleep-BPQ2ZyaI.js");
2
+ const require_sleep = require("./sleep-7Gw3GJ4n.js");
3
3
  const require_event_category = require("./event-category-DXZ3f9Q5.js");
4
4
  const require_err_msg = require("./err-msg-BhVbr0NX.js");
5
5
  //#region src/generated/cap-input-defaults.ts
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as expandCapMethods, $n as PEER_BYTES_CHUNK_BYTES, $t as REMOVE_LEAF, A as HF_REPO, An as RECORD_BATCH_MAX_BYTES, Ar as emitReadiness, B as withoutCallerStamp, Bn as RECORD_SECRET_COLLECTION_PREFIX, Br as SECRET_CLEAR, Bt as entryBody, C as addonSliceHandleApi, Cn as RevConflictError, Cr as globalSecretScope, Dn as asRecordsError, En as UnknownRecordKindError, Er as parseSecretRef, Fn as RECORD_ID_MAX_LENGTH, G as adminUiCapability, Gn as createSecretsAccess, Gr as isSecretMarkerLike, Gt as RecordIndexSchema, Hn as RECORD_SWEEP_INTERVAL_MS, Hr as isSecretClear, Ht as assertTransactScope, I as deviceOpsCapability, In as RECORD_MAX_DATA_BYTES, Jn as forgetKnownSecret, Jt as RecordRetentionSchema, Kn as MIN_SCRUBBED_LENGTH, Kr as makeSecretMarker, Kt as RecordKindDeclarationSchema, L as viewerUiCapability, Ln as RECORD_MAX_INDEXES, M as CAP_ADVANCE_FIELDS, Mn as RECORD_DATABASES, Nn as RECORD_DEFAULT_MAX_DATA_BYTES, On as recordsErrorFromMessage, P as CAP_STATE_LEAVES, Pn as RECORD_DELETE_BATCH, Qn as shortSecretRefHash, Qt as defineRecordKinds, R as DEVICE_CHILDREN_BATCH_MAX, Rn as RECORD_MAX_INDEX_FIELDS, Rt as makeInMemoryRecords, Sn as RecordsError, Sr as formatSecretScope, Tn as UnindexedFilterError, Tr as normalizeSecretOwner, U as describeCustomActions, Un as resolveSecretViewsIn, Ur as isSecretFieldView, Ut as EntryDescriptorSchema, Vn as RECORD_SETTINGS_MAX_ROWS, Vr as classifySecretWrite, Vt as createRecordsAccess, Wn as REVALIDATE_AFTER_MS, Wr as isSecretMarker, Wt as RecordFieldPathSchema, Xn as registerKnownSecret, Xt as assertValidDeclaration, Yn as knownSecretCount, Yt as StoredRecordKindDeclarationSchema, Zn as scrubKnownSecrets, Zt as declarationsOf, _ as readErrorI18n, _n as RECORDS_ERROR_CODES, an as recordSecretRef, b as isDeviceScopedCap, bn as RecordTooLargeError, br as arrayItemFieldPath, c as asString, cn as collectZodSecretPaths, ct as readNodePin, d as parseJsonUnknown, dn as DeclarationRefusedError, dt as ReadinessRegistry, en as collectSecretLeaves, er as PEER_BYTES_MAX_OUTSTANDING, f as hfModelUrl, fn as FilterRequiredError, ft as ReadinessTimeoutError, g as ErrorI18nPayloadSchema, gn as PlaintextSecretError, hn as NoCallerError, ht as scopeKey, in as recordSecretCollection, ir as DATAPLANE_SECRET_HEADER, jn as RECORD_CLASSES, kn as RECORD_BATCH_MAX, kr as createEvent, ln as isZodSecret, lr as normalizeAddonInitResult, mn as InvalidRecordError, nn as parseSecretPath, nr as PEER_BYTES_TICKET_TTL_MS, o as asJsonObject, on as secretArrayPrefixes, or as DisposerChain, p as BOOT_RECOVERY_BACKOFF_MS, pn as ForeignSecretMarkerError, qn as clearKnownSecrets, qr as toSecretFieldView, qt as RecordKindNameSchema, r as maskUrlCredentials, rn as recordArrayItemPath, sr as BaseAddon, st as nodePin, t as sleep, tn as mapSecretLeaves, tr as PEER_BYTES_STALL_MS, un as BatchTooLargeError, ut as MODEL_FORMATS, vn as RecordNotFoundError, w as createEventBusSliceSource, wn as TransactRefusedError, wr as isSecretRef, x as createDeviceProxy, xn as RecordUniqueViolationError, xr as buildSecretRef, y as DEVICE_SCOPED_CAPS, yn as RecordSecretUnavailableError, yr as SECRET_REF_SCHEME, z as CALLER_STAMPED_CAPABILITIES, zn as RECORD_QUERY_MAX, zt as defineEntryKind } from "./sleep-BErAxhul.mjs";
1
+ import { $ as expandCapMethods, $n as REVALIDATE_AFTER_MS, $r as isSecretMarker, $t as RecordFieldPathSchema, A as HF_REPO, An as RecordUniqueViolationError, Ar as buildSecretRef, B as withoutCallerStamp, Bn as RECORD_CLASSES, C as addonSliceHandleApi, Cn as InvalidRecordError, Dn as RecordNotFoundError, En as RECORDS_ERROR_CODES, Fn as UnknownRecordKindError, Fr as parseSecretRef, G as adminUiCapability, Gn as RECORD_MAX_DATA_BYTES, Hn as RECORD_DEFAULT_MAX_DATA_BYTES, I as deviceOpsCapability, In as asRecordsError, Jn as RECORD_QUERY_MAX, Jt as defineEntryKind, Kn as RECORD_MAX_INDEXES, L as viewerUiCapability, Ln as recordsErrorFromMessage, M as CAP_ADVANCE_FIELDS, Mn as RevConflictError, Mr as globalSecretScope, Nn as TransactRefusedError, Nr as isSecretRef, On as RecordSecretUnavailableError, Or as SECRET_REF_SCHEME, P as CAP_STATE_LEAVES, Pn as UnindexedFilterError, Pr as normalizeSecretOwner, Qn as resolveSecretViewsIn, Qr as isSecretFieldView, Qt as EntryDescriptorSchema, R as DEVICE_CHILDREN_BATCH_MAX, Rn as RECORD_BATCH_MAX, Rr as createEvent, Sn as ForeignSecretMarkerError, Tn as PlaintextSecretError, U as describeCustomActions, Un as RECORD_DELETE_BATCH, Vn as RECORD_DATABASES, Wn as RECORD_ID_MAX_LENGTH, Xn as RECORD_SETTINGS_MAX_ROWS, Xr as classifySecretWrite, Xt as createRecordsAccess, Yn as RECORD_SECRET_COLLECTION_PREFIX, Yr as SECRET_CLEAR, Yt as entryBody, Zn as RECORD_SWEEP_INTERVAL_MS, Zr as isSecretClear, Zt as assertTransactScope, _ as readErrorI18n, _n as collectZodSecretPaths, an as assertValidDeclaration, ar as registerKnownSecret, b as isDeviceScopedCap, bn as DeclarationRefusedError, c as asString, cn as REMOVE_LEAF, cr as PEER_BYTES_CHUNK_BYTES, ct as readNodePin, d as parseJsonUnknown, dn as parseSecretPath, dr as PEER_BYTES_TICKET_TTL_MS, dt as ReadinessRegistry, ei as isSecretMarkerLike, en as RecordIndexSchema, er as createSecretsAccess, f as hfModelUrl, fn as recordArrayItemPath, ft as ReadinessTimeoutError, g as ErrorI18nPayloadSchema, gr as BaseAddon, hn as secretArrayPrefixes, hr as DisposerChain, ht as scopeKey, in as StoredRecordKindDeclarationSchema, ir as knownSecretCount, jn as RecordsError, jr as formatSecretScope, kn as RecordTooLargeError, kr as arrayItemFieldPath, ln as collectSecretLeaves, lr as PEER_BYTES_MAX_OUTSTANDING, mn as recordSecretRef, ni as toSecretFieldView, nn as RecordKindNameSchema, nr as clearKnownSecrets, o as asJsonObject, on as declarationsOf, or as scrubKnownSecrets, p as BOOT_RECOVERY_BACKOFF_MS, pn as recordSecretCollection, pr as DATAPLANE_SECRET_HEADER, qn as RECORD_MAX_INDEX_FIELDS, qt as makeInMemoryRecords, r as maskUrlCredentials, rn as RecordRetentionSchema, rr as forgetKnownSecret, sn as defineRecordKinds, sr as shortSecretRefHash, st as nodePin, t as sleep, ti as makeSecretMarker, tn as RecordKindDeclarationSchema, tr as MIN_SCRUBBED_LENGTH, un as mapSecretLeaves, ur as PEER_BYTES_STALL_MS, ut as MODEL_FORMATS, vn as isZodSecret, vr as normalizeAddonInitResult, w as createEventBusSliceSource, wn as NoCallerError, x as createDeviceProxy, xn as FilterRequiredError, y as DEVICE_SCOPED_CAPS, yn as BatchTooLargeError, z as CALLER_STAMPED_CAPABILITIES, zn as RECORD_BATCH_MAX_BYTES, zr as emitReadiness } from "./sleep-B81gwQuR.mjs";
2
2
  import { t as EventCategory } from "./event-category-DHXxB8t9.mjs";
3
3
  import { a as DeviceType, t as errMsg } from "./err-msg-BXKzRBwg.mjs";
4
4
  //#region src/generated/cap-input-defaults.ts
@@ -17,8 +17,6 @@ export declare const AirQualitySensorStatusSchema: z.ZodObject<{
17
17
  pm10: z.ZodOptional<z.ZodNumber>;
18
18
  aqi: z.ZodOptional<z.ZodNumber>;
19
19
  lastFetchedAt: z.ZodNumber;
20
- unit: z.ZodOptional<z.ZodString>;
21
- precision: z.ZodOptional<z.ZodNumber>;
22
20
  }, z.core.$strip>;
23
21
  export type AirQualitySensorStatus = z.infer<typeof AirQualitySensorStatusSchema>;
24
22
  export declare const airQualitySensorCapability: {
@@ -36,8 +34,6 @@ export declare const airQualitySensorCapability: {
36
34
  pm10: z.ZodOptional<z.ZodNumber>;
37
35
  aqi: z.ZodOptional<z.ZodNumber>;
38
36
  lastFetchedAt: z.ZodNumber;
39
- unit: z.ZodOptional<z.ZodString>;
40
- precision: z.ZodOptional<z.ZodNumber>;
41
37
  }, z.core.$strip>;
42
38
  readonly kind: 'push';
43
39
  };
@@ -48,8 +44,6 @@ export declare const airQualitySensorCapability: {
48
44
  pm10: z.ZodOptional<z.ZodNumber>;
49
45
  aqi: z.ZodOptional<z.ZodNumber>;
50
46
  lastFetchedAt: z.ZodNumber;
51
- unit: z.ZodOptional<z.ZodString>;
52
- precision: z.ZodOptional<z.ZodNumber>;
53
47
  }, z.core.$strip>;
54
48
  /**
55
49
  * Runtime-state durability: **restored** — as `numeric-sensor`.
@@ -75,12 +69,12 @@ export declare const airQualitySensorCapability: {
75
69
  };
76
70
  readonly pm25: {
77
71
  readonly kind: 'gauge';
78
- readonly unit: 'ug/m3';
72
+ readonly unit: 'µg/m³';
79
73
  readonly deadband: 1;
80
74
  };
81
75
  readonly pm10: {
82
76
  readonly kind: 'gauge';
83
- readonly unit: 'ug/m3';
77
+ readonly unit: 'µg/m³';
84
78
  readonly deadband: 1;
85
79
  };
86
80
  readonly aqi: {
@@ -6,10 +6,8 @@ import { DeviceType } from '../device/device-type.js';
6
6
  * entries with `device_class: illuminance`.
7
7
  */
8
8
  export declare const AmbientLightSensorStatusSchema: z.ZodObject<{
9
- lux: z.ZodNumber;
9
+ lux: z.ZodNullable<z.ZodNumber>;
10
10
  lastFetchedAt: z.ZodNumber;
11
- unit: z.ZodOptional<z.ZodString>;
12
- precision: z.ZodOptional<z.ZodNumber>;
13
11
  }, z.core.$strip>;
14
12
  export type AmbientLightSensorStatus = z.infer<typeof AmbientLightSensorStatusSchema>;
15
13
  export declare const ambientLightSensorCapability: {
@@ -21,18 +19,14 @@ export declare const ambientLightSensorCapability: {
21
19
  readonly methods: {};
22
20
  readonly status: {
23
21
  readonly schema: z.ZodObject<{
24
- lux: z.ZodNumber;
22
+ lux: z.ZodNullable<z.ZodNumber>;
25
23
  lastFetchedAt: z.ZodNumber;
26
- unit: z.ZodOptional<z.ZodString>;
27
- precision: z.ZodOptional<z.ZodNumber>;
28
24
  }, z.core.$strip>;
29
25
  readonly kind: 'push';
30
26
  };
31
27
  readonly runtimeState: z.ZodObject<{
32
- lux: z.ZodNumber;
28
+ lux: z.ZodNullable<z.ZodNumber>;
33
29
  lastFetchedAt: z.ZodNumber;
34
- unit: z.ZodOptional<z.ZodString>;
35
- precision: z.ZodOptional<z.ZodNumber>;
36
30
  }, z.core.$strip>;
37
31
  /**
38
32
  * Runtime-state durability: **restored** — as `numeric-sensor`.
@@ -57,10 +51,5 @@ export declare const ambientLightSensorCapability: {
57
51
  /** Clock fields: written, but excluded from the compare that decides
58
52
  * whether persisting is worth a SQLite commit. */
59
53
  readonly volatileStateFields: readonly ["lastFetchedAt"];
60
- readonly customize: {
61
- readonly version: 1;
62
- readonly advanced: 'derive';
63
- readonly targets: readonly [];
64
- };
65
54
  };
66
55
  export type IAmbientLightSensorProvider = InferProvider<typeof ambientLightSensorCapability>;
@@ -18,6 +18,7 @@ export declare const BatteryStatusSchema: z.ZodObject<{
18
18
  }>;
19
19
  sleeping: z.ZodBoolean;
20
20
  lastUpdated: z.ZodNumber;
21
+ volts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
21
22
  lastContactAt: z.ZodOptional<z.ZodNumber>;
22
23
  lastFullRefreshAt: z.ZodOptional<z.ZodNumber>;
23
24
  binary: z.ZodOptional<z.ZodBoolean>;
@@ -89,6 +90,7 @@ export declare const batteryCapability: {
89
90
  }>;
90
91
  sleeping: z.ZodBoolean;
91
92
  lastUpdated: z.ZodNumber;
93
+ volts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
92
94
  lastContactAt: z.ZodOptional<z.ZodNumber>;
93
95
  lastFullRefreshAt: z.ZodOptional<z.ZodNumber>;
94
96
  binary: z.ZodOptional<z.ZodBoolean>;
@@ -107,6 +109,7 @@ export declare const batteryCapability: {
107
109
  }>;
108
110
  sleeping: z.ZodBoolean;
109
111
  lastUpdated: z.ZodNumber;
112
+ volts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
110
113
  lastContactAt: z.ZodOptional<z.ZodNumber>;
111
114
  lastFullRefreshAt: z.ZodOptional<z.ZodNumber>;
112
115
  binary: z.ZodOptional<z.ZodBoolean>;
@@ -138,6 +141,7 @@ export declare const batteryCapability: {
138
141
  }>;
139
142
  sleeping: z.ZodBoolean;
140
143
  lastUpdated: z.ZodNumber;
144
+ volts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
141
145
  lastContactAt: z.ZodOptional<z.ZodNumber>;
142
146
  lastFullRefreshAt: z.ZodOptional<z.ZodNumber>;
143
147
  binary: z.ZodOptional<z.ZodBoolean>;
@@ -158,11 +162,14 @@ export declare const batteryCapability: {
158
162
  readonly kind: 'gauge';
159
163
  readonly unit: '%';
160
164
  };
165
+ readonly volts: {
166
+ readonly kind: 'gauge';
167
+ readonly unit: 'V';
168
+ };
161
169
  };
162
170
  };
163
171
  readonly customize: {
164
172
  readonly version: 1;
165
- readonly advanced: 'derive';
166
173
  readonly targets: readonly [{
167
174
  readonly id: 'percentage';
168
175
  readonly cardinality: 'scalar';
@@ -171,7 +178,7 @@ export declare const batteryCapability: {
171
178
  readonly stateField: 'percentage';
172
179
  };
173
180
  readonly deviceTypes: readonly [DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat];
174
- readonly apply: 'add-or-replace';
181
+ readonly apply: 'add';
175
182
  readonly path: 'percentage';
176
183
  readonly sources: readonly [{
177
184
  readonly kind: 'field';
@@ -55,10 +55,5 @@ export declare const binaryCapability: {
55
55
  /** Clock fields: written, but excluded from the compare that decides
56
56
  * whether persisting is worth a SQLite commit. */
57
57
  readonly volatileStateFields: readonly ["lastChangedAt"];
58
- readonly customize: {
59
- readonly version: 1;
60
- readonly advanced: 'derive';
61
- readonly targets: readonly [];
62
- };
63
58
  };
64
59
  export type IBinaryProvider = InferProvider<typeof binaryCapability>;
@@ -396,12 +396,11 @@ export type RuntimeStateDurability = 'session' | 'restored';
396
396
  export declare const DEFAULT_RUNTIME_STATE_DURABILITY: RuntimeStateDurability;
397
397
  /**
398
398
  * Unit of a recorded history series. A closed set: the History tab formats by
399
- * it. `'ug/m3'` is the ASCII-safe id of micrograms per cubic metre — render it
400
- * through {@link HISTORY_UNIT_LABELS}. A series whose unit is a per-device fact
401
- * names a sibling field with {@link CapabilityHistoryField.unitFrom} instead.
399
+ * it. The symbol is the quantity's stored base (D944), including `µg/m³` and
400
+ * `m/s`. A per-device quantity (`numeric-sensor`) has no fixed unit.
402
401
  */
403
- export type HistoryUnit = '%' | 'dBFS' | 'dBm' | '°C' | 'W' | 'kWh' | 'V' | 'A' | 'VA' | 'lx' | 'ppm' | 'ppb' | 'ug/m3' | 'hPa' | 'count' | 'ratio' | 'ms' | 's' | 'days' | 'bytes' | 'kbps' | 'fps';
404
- /** Display label per {@link HistoryUnit} (only `'ug/m3'` differs from its id). */
402
+ export type HistoryUnit = '%' | 'dBFS' | 'dBm' | '°C' | 'W' | 'kWh' | 'V' | 'A' | 'VA' | 'lx' | 'ppm' | 'ppb' | 'µg/m³' | 'hPa' | 'count' | 'ratio' | 'ms' | 's' | 'days' | 'bytes' | 'kbps' | 'fps' | 'm/s';
403
+ /** Display label per {@link HistoryUnit}. */
405
404
  export declare const HISTORY_UNIT_LABELS: Readonly<Record<HistoryUnit, string>>;
406
405
  /** One `runtimeState` field recorded as a history series. */
407
406
  export interface CapabilityHistoryField {
@@ -434,7 +433,8 @@ export interface CapabilityHistoryField {
434
433
  readonly unit?: HistoryUnit;
435
434
  /**
436
435
  * Path of a SIBLING `runtimeState` field (a string or enum) that carries this
437
- * device's unit — `weather.temperature` takes it from `temperatureUnit`. The
436
+ * device's quantity. A series stores the quantity base, so `unit` is that
437
+ * symbol (`°C`, `hPa`, `m/s`). `unitFrom` is not allowed. The
438
438
  * catalog records the path; the reader resolves it per device. Mutually
439
439
  * exclusive with {@link unit}.
440
440
  */
@@ -518,6 +518,11 @@ export type ComposedMethodAnswer = {
518
518
  } | {
519
519
  readonly kind: 'answer';
520
520
  readonly value: unknown;
521
+ }
522
+ /** Read one field of the composed slice. Unknown is a throw, never false (D393). */
523
+ | {
524
+ readonly kind: 'slice';
525
+ readonly field: string;
521
526
  };
522
527
  /**
523
528
  * Full definition of a capability — the single source of truth for the
@@ -56,6 +56,36 @@ export declare const ComposerBlockSchema: z.ZodObject<{
56
56
  }, z.core.$strip>, z.ZodObject<{
57
57
  kind: z.ZodLiteral<"code">;
58
58
  code: z.ZodString;
59
+ }, z.core.$strip>, z.ZodObject<{
60
+ kind: z.ZodLiteral<"aggregate">;
61
+ reducer: z.ZodEnum<{
62
+ all: "all";
63
+ any: "any";
64
+ max: "max";
65
+ mean: "mean";
66
+ median: "median";
67
+ min: "min";
68
+ sum: "sum";
69
+ }>;
70
+ reads: z.ZodArray<z.ZodObject<{
71
+ source: z.ZodObject<{
72
+ addonId: z.ZodString;
73
+ stableId: z.ZodString;
74
+ }, z.core.$strip>;
75
+ cap: z.ZodString;
76
+ fieldPath: z.ZodString;
77
+ }, z.core.$strip>>;
78
+ publish: z.ZodEnum<{
79
+ excluded: "excluded";
80
+ included: "included";
81
+ total: "total";
82
+ value: "value";
83
+ }>;
84
+ empty: z.ZodEnum<{
85
+ null: "null";
86
+ offline: "offline";
87
+ omit: "omit";
88
+ }>;
59
89
  }, z.core.$strip>], "kind">>;
60
90
  items: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
61
91
  label: z.ZodString;
@@ -85,6 +115,36 @@ export declare const ComposerBlockSchema: z.ZodObject<{
85
115
  }, z.core.$strip>, z.ZodObject<{
86
116
  kind: z.ZodLiteral<"code">;
87
117
  code: z.ZodString;
118
+ }, z.core.$strip>, z.ZodObject<{
119
+ kind: z.ZodLiteral<"aggregate">;
120
+ reducer: z.ZodEnum<{
121
+ all: "all";
122
+ any: "any";
123
+ max: "max";
124
+ mean: "mean";
125
+ median: "median";
126
+ min: "min";
127
+ sum: "sum";
128
+ }>;
129
+ reads: z.ZodArray<z.ZodObject<{
130
+ source: z.ZodObject<{
131
+ addonId: z.ZodString;
132
+ stableId: z.ZodString;
133
+ }, z.core.$strip>;
134
+ cap: z.ZodString;
135
+ fieldPath: z.ZodString;
136
+ }, z.core.$strip>>;
137
+ publish: z.ZodEnum<{
138
+ excluded: "excluded";
139
+ included: "included";
140
+ total: "total";
141
+ value: "value";
142
+ }>;
143
+ empty: z.ZodEnum<{
144
+ null: "null";
145
+ offline: "offline";
146
+ omit: "omit";
147
+ }>;
88
148
  }, z.core.$strip>], "kind">>;
89
149
  }, z.core.$strip>>>;
90
150
  commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -108,6 +168,12 @@ export declare const ComposerBlockSchema: z.ZodObject<{
108
168
  stableId: z.ZodString;
109
169
  }, z.core.$strip>;
110
170
  }, z.core.$strip>], "kind">>;
171
+ helper: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
172
+ kind: z.ZodLiteral<'group'>;
173
+ templateId: typeof import("../index.js").GroupTemplateIdSchema;
174
+ aggregate: typeof import("../index.js").AggregateReducerSchema;
175
+ members: z.ZodArray<typeof import("../index.js").HelperMemberSchema>;
176
+ }, z.core.$strip>], "kind">>;
111
177
  }, z.core.$strip>;
112
178
  }, z.core.$strip>;
113
179
  export type ComposerBlock = z.infer<typeof ComposerBlockSchema>;
@@ -181,6 +247,36 @@ export declare const ComposerApplyInputSchema: z.ZodObject<{
181
247
  }, z.core.$strip>, z.ZodObject<{
182
248
  kind: z.ZodLiteral<"code">;
183
249
  code: z.ZodString;
250
+ }, z.core.$strip>, z.ZodObject<{
251
+ kind: z.ZodLiteral<"aggregate">;
252
+ reducer: z.ZodEnum<{
253
+ all: "all";
254
+ any: "any";
255
+ max: "max";
256
+ mean: "mean";
257
+ median: "median";
258
+ min: "min";
259
+ sum: "sum";
260
+ }>;
261
+ reads: z.ZodArray<z.ZodObject<{
262
+ source: z.ZodObject<{
263
+ addonId: z.ZodString;
264
+ stableId: z.ZodString;
265
+ }, z.core.$strip>;
266
+ cap: z.ZodString;
267
+ fieldPath: z.ZodString;
268
+ }, z.core.$strip>>;
269
+ publish: z.ZodEnum<{
270
+ excluded: "excluded";
271
+ included: "included";
272
+ total: "total";
273
+ value: "value";
274
+ }>;
275
+ empty: z.ZodEnum<{
276
+ null: "null";
277
+ offline: "offline";
278
+ omit: "omit";
279
+ }>;
184
280
  }, z.core.$strip>], "kind">>;
185
281
  items: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
186
282
  label: z.ZodString;
@@ -210,6 +306,36 @@ export declare const ComposerApplyInputSchema: z.ZodObject<{
210
306
  }, z.core.$strip>, z.ZodObject<{
211
307
  kind: z.ZodLiteral<"code">;
212
308
  code: z.ZodString;
309
+ }, z.core.$strip>, z.ZodObject<{
310
+ kind: z.ZodLiteral<"aggregate">;
311
+ reducer: z.ZodEnum<{
312
+ all: "all";
313
+ any: "any";
314
+ max: "max";
315
+ mean: "mean";
316
+ median: "median";
317
+ min: "min";
318
+ sum: "sum";
319
+ }>;
320
+ reads: z.ZodArray<z.ZodObject<{
321
+ source: z.ZodObject<{
322
+ addonId: z.ZodString;
323
+ stableId: z.ZodString;
324
+ }, z.core.$strip>;
325
+ cap: z.ZodString;
326
+ fieldPath: z.ZodString;
327
+ }, z.core.$strip>>;
328
+ publish: z.ZodEnum<{
329
+ excluded: "excluded";
330
+ included: "included";
331
+ total: "total";
332
+ value: "value";
333
+ }>;
334
+ empty: z.ZodEnum<{
335
+ null: "null";
336
+ offline: "offline";
337
+ omit: "omit";
338
+ }>;
213
339
  }, z.core.$strip>], "kind">>;
214
340
  }, z.core.$strip>>>;
215
341
  commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -233,6 +359,12 @@ export declare const ComposerApplyInputSchema: z.ZodObject<{
233
359
  stableId: z.ZodString;
234
360
  }, z.core.$strip>;
235
361
  }, z.core.$strip>], "kind">>;
362
+ helper: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
363
+ kind: z.ZodLiteral<'group'>;
364
+ templateId: typeof import("../index.js").GroupTemplateIdSchema;
365
+ aggregate: typeof import("../index.js").AggregateReducerSchema;
366
+ members: z.ZodArray<typeof import("../index.js").HelperMemberSchema>;
367
+ }, z.core.$strip>], "kind">>;
236
368
  }, z.core.$strip>;
237
369
  }, z.core.$strip>>;
238
370
  restartBlockIds: z.ZodArray<z.ZodString>;
@@ -339,6 +471,36 @@ export declare const composerCapability: {
339
471
  }, z.core.$strip>, z.ZodObject<{
340
472
  kind: z.ZodLiteral<"code">;
341
473
  code: z.ZodString;
474
+ }, z.core.$strip>, z.ZodObject<{
475
+ kind: z.ZodLiteral<"aggregate">;
476
+ reducer: z.ZodEnum<{
477
+ all: "all";
478
+ any: "any";
479
+ max: "max";
480
+ mean: "mean";
481
+ median: "median";
482
+ min: "min";
483
+ sum: "sum";
484
+ }>;
485
+ reads: z.ZodArray<z.ZodObject<{
486
+ source: z.ZodObject<{
487
+ addonId: z.ZodString;
488
+ stableId: z.ZodString;
489
+ }, z.core.$strip>;
490
+ cap: z.ZodString;
491
+ fieldPath: z.ZodString;
492
+ }, z.core.$strip>>;
493
+ publish: z.ZodEnum<{
494
+ excluded: "excluded";
495
+ included: "included";
496
+ total: "total";
497
+ value: "value";
498
+ }>;
499
+ empty: z.ZodEnum<{
500
+ null: "null";
501
+ offline: "offline";
502
+ omit: "omit";
503
+ }>;
342
504
  }, z.core.$strip>], "kind">>;
343
505
  items: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
344
506
  label: z.ZodString;
@@ -368,6 +530,36 @@ export declare const composerCapability: {
368
530
  }, z.core.$strip>, z.ZodObject<{
369
531
  kind: z.ZodLiteral<"code">;
370
532
  code: z.ZodString;
533
+ }, z.core.$strip>, z.ZodObject<{
534
+ kind: z.ZodLiteral<"aggregate">;
535
+ reducer: z.ZodEnum<{
536
+ all: "all";
537
+ any: "any";
538
+ max: "max";
539
+ mean: "mean";
540
+ median: "median";
541
+ min: "min";
542
+ sum: "sum";
543
+ }>;
544
+ reads: z.ZodArray<z.ZodObject<{
545
+ source: z.ZodObject<{
546
+ addonId: z.ZodString;
547
+ stableId: z.ZodString;
548
+ }, z.core.$strip>;
549
+ cap: z.ZodString;
550
+ fieldPath: z.ZodString;
551
+ }, z.core.$strip>>;
552
+ publish: z.ZodEnum<{
553
+ excluded: "excluded";
554
+ included: "included";
555
+ total: "total";
556
+ value: "value";
557
+ }>;
558
+ empty: z.ZodEnum<{
559
+ null: "null";
560
+ offline: "offline";
561
+ omit: "omit";
562
+ }>;
371
563
  }, z.core.$strip>], "kind">>;
372
564
  }, z.core.$strip>>>;
373
565
  commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -391,6 +583,12 @@ export declare const composerCapability: {
391
583
  stableId: z.ZodString;
392
584
  }, z.core.$strip>;
393
585
  }, z.core.$strip>], "kind">>;
586
+ helper: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
587
+ kind: z.ZodLiteral<'group'>;
588
+ templateId: typeof import("../index.js").GroupTemplateIdSchema;
589
+ aggregate: typeof import("../index.js").AggregateReducerSchema;
590
+ members: z.ZodArray<typeof import("../index.js").HelperMemberSchema>;
591
+ }, z.core.$strip>], "kind">>;
394
592
  }, z.core.$strip>;
395
593
  }, z.core.$strip>>;
396
594
  restartBlockIds: z.ZodArray<z.ZodString>;
@@ -83,22 +83,18 @@ export declare function consumableFormOf(item: {
83
83
  readonly kind?: ConsumableKind;
84
84
  readonly form?: ConsumableForm;
85
85
  }): ConsumableForm;
86
- /** Units a remaining-life counter is reported in. Closed: the panel renders
87
- * each. */
88
- export declare const ConsumableRemainingUnitSchema: z.ZodEnum<{
89
- cycles: "cycles";
90
- days: "days";
91
- hours: "hours";
86
+ /** Whether `remaining.value` is a duration in seconds or a dimensionless count. */
87
+ export declare const ConsumableRemainingKindSchema: z.ZodEnum<{
88
+ count: "count";
89
+ duration: "duration";
92
90
  }>;
93
- export type ConsumableRemainingUnit = z.infer<typeof ConsumableRemainingUnitSchema>;
94
- /** Remaining life as a COUNT, not a percentage (the PetKit desiccant reports
95
- * days). `value` null = unknown (D393). */
91
+ export type ConsumableRemainingKind = z.infer<typeof ConsumableRemainingKindSchema>;
92
+ /** Remaining life. `value` null = unknown (D393). Duration is seconds. */
96
93
  export declare const ConsumableRemainingSchema: z.ZodObject<{
97
94
  value: z.ZodNullable<z.ZodNumber>;
98
- unit: z.ZodEnum<{
99
- cycles: "cycles";
100
- days: "days";
101
- hours: "hours";
95
+ kind: z.ZodEnum<{
96
+ count: "count";
97
+ duration: "duration";
102
98
  }>;
103
99
  }, z.core.$strip>;
104
100
  export type ConsumableRemaining = z.infer<typeof ConsumableRemainingSchema>;
@@ -133,10 +129,9 @@ export declare const ConsumableItemSchema: z.ZodObject<{
133
129
  resettable: z.ZodBoolean;
134
130
  remaining: z.ZodOptional<z.ZodObject<{
135
131
  value: z.ZodNullable<z.ZodNumber>;
136
- unit: z.ZodEnum<{
137
- cycles: "cycles";
138
- days: "days";
139
- hours: "hours";
132
+ kind: z.ZodEnum<{
133
+ count: "count";
134
+ duration: "duration";
140
135
  }>;
141
136
  }, z.core.$strip>>;
142
137
  }, z.core.$strip>;
@@ -167,10 +162,9 @@ export declare const ConsumablesStatusSchema: z.ZodObject<{
167
162
  resettable: z.ZodBoolean;
168
163
  remaining: z.ZodOptional<z.ZodObject<{
169
164
  value: z.ZodNullable<z.ZodNumber>;
170
- unit: z.ZodEnum<{
171
- cycles: "cycles";
172
- days: "days";
173
- hours: "hours";
165
+ kind: z.ZodEnum<{
166
+ count: "count";
167
+ duration: "duration";
174
168
  }>;
175
169
  }, z.core.$strip>>;
176
170
  }, z.core.$strip>>;
@@ -242,10 +236,9 @@ export declare const consumablesCapability: {
242
236
  resettable: z.ZodBoolean;
243
237
  remaining: z.ZodOptional<z.ZodObject<{
244
238
  value: z.ZodNullable<z.ZodNumber>;
245
- unit: z.ZodEnum<{
246
- cycles: "cycles";
247
- days: "days";
248
- hours: "hours";
239
+ kind: z.ZodEnum<{
240
+ count: "count";
241
+ duration: "duration";
249
242
  }>;
250
243
  }, z.core.$strip>>;
251
244
  }, z.core.$strip>>;
@@ -264,7 +257,7 @@ export declare const consumablesCapability: {
264
257
  resettable: boolean;
265
258
  remaining?: {
266
259
  value: number | null;
267
- unit: "cycles" | "days" | "hours";
260
+ kind: "count" | "duration";
268
261
  } | undefined;
269
262
  }[];
270
263
  lastChangedAt: number;
@@ -299,10 +292,9 @@ export declare const consumablesCapability: {
299
292
  resettable: z.ZodBoolean;
300
293
  remaining: z.ZodOptional<z.ZodObject<{
301
294
  value: z.ZodNullable<z.ZodNumber>;
302
- unit: z.ZodEnum<{
303
- cycles: "cycles";
304
- days: "days";
305
- hours: "hours";
295
+ kind: z.ZodEnum<{
296
+ count: "count";
297
+ duration: "duration";
306
298
  }>;
307
299
  }, z.core.$strip>>;
308
300
  }, z.core.$strip>;
@@ -317,7 +309,7 @@ export declare const consumablesCapability: {
317
309
  resettable: boolean;
318
310
  remaining?: {
319
311
  value: number | null;
320
- unit: "cycles" | "days" | "hours";
312
+ kind: "count" | "duration";
321
313
  } | undefined;
322
314
  };
323
315
  };
@@ -349,10 +341,9 @@ export declare const consumablesCapability: {
349
341
  resettable: z.ZodBoolean;
350
342
  remaining: z.ZodOptional<z.ZodObject<{
351
343
  value: z.ZodNullable<z.ZodNumber>;
352
- unit: z.ZodEnum<{
353
- cycles: "cycles";
354
- days: "days";
355
- hours: "hours";
344
+ kind: z.ZodEnum<{
345
+ count: "count";
346
+ duration: "duration";
356
347
  }>;
357
348
  }, z.core.$strip>>;
358
349
  }, z.core.$strip>>;
@@ -417,10 +408,9 @@ export declare const consumablesCapability: {
417
408
  resettable: z.ZodBoolean;
418
409
  remaining: z.ZodOptional<z.ZodObject<{
419
410
  value: z.ZodNullable<z.ZodNumber>;
420
- unit: z.ZodEnum<{
421
- cycles: "cycles";
422
- days: "days";
423
- hours: "hours";
411
+ kind: z.ZodEnum<{
412
+ count: "count";
413
+ duration: "duration";
424
414
  }>;
425
415
  }, z.core.$strip>>;
426
416
  }, z.core.$strip>;
@@ -457,7 +447,7 @@ export declare const consumablesCapability: {
457
447
  }[];
458
448
  literals: {
459
449
  path: string;
460
- values: ("cycles" | "days" | "hours")[];
450
+ values: ("count" | "duration")[];
461
451
  }[];
462
452
  } | {
463
453
  literals?: undefined;
@@ -507,7 +497,6 @@ export declare const consumablesCapability: {
507
497
  };
508
498
  readonly 'remaining.value': {
509
499
  readonly kind: 'gauge';
510
- readonly unitFrom: 'remaining.unit';
511
500
  readonly deadband: 1;
512
501
  readonly displayName: 'Remaining';
513
502
  };