@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.
- package/dist/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/air-quality-sensor.cap.d.ts +2 -8
- package/dist/capabilities/ambient-light-sensor.cap.d.ts +3 -14
- package/dist/capabilities/battery.cap.d.ts +9 -2
- package/dist/capabilities/binary.cap.d.ts +0 -5
- package/dist/capabilities/capability-definition.d.ts +11 -6
- package/dist/capabilities/composer.cap.d.ts +198 -0
- package/dist/capabilities/consumables.cap.d.ts +30 -41
- package/dist/capabilities/control.cap.d.ts +3 -25
- package/dist/capabilities/core-blocks.cap.d.ts +1421 -0
- package/dist/capabilities/customize-catalog.d.ts +0 -8
- package/dist/capabilities/customize-spec.d.ts +2 -3
- package/dist/capabilities/device-manager.cap.d.ts +79 -0
- package/dist/capabilities/device-provider.cap.d.ts +36 -0
- package/dist/capabilities/enum-sensor.cap.d.ts +5 -17
- package/dist/capabilities/group-status.cap.d.ts +46 -0
- package/dist/capabilities/humidity-sensor.cap.d.ts +3 -14
- package/dist/capabilities/index.d.ts +4 -2
- package/dist/capabilities/motion.cap.d.ts +13 -5
- package/dist/capabilities/numeric-sensor.cap.d.ts +8 -16
- package/dist/capabilities/pet-feeder.cap.d.ts +1 -1
- package/dist/capabilities/power-meter.cap.d.ts +0 -11
- package/dist/capabilities/pressure-sensor.cap.d.ts +3 -9
- package/dist/capabilities/running-state.cap.d.ts +1 -2
- package/dist/capabilities/runtime-field-unit.d.ts +1 -0
- package/dist/capabilities/runtime-field-units.d.ts +8 -0
- package/dist/capabilities/switch.cap.d.ts +0 -5
- package/dist/capabilities/temperature-sensor.cap.d.ts +5 -20
- package/dist/capabilities/weather.cap.d.ts +4 -13
- package/dist/client.d.ts +2 -1
- package/dist/client.js +57 -5
- package/dist/client.mjs +55 -6
- package/dist/composition/composition-report.d.ts +80 -3
- package/dist/composition/composition.d.ts +285 -5
- package/dist/composition/helpers/aggregate.d.ts +41 -0
- package/dist/composition/helpers/catalog.d.ts +42 -0
- package/dist/composition/helpers/compile.d.ts +22 -0
- package/dist/composition/helpers/index.d.ts +6 -0
- package/dist/composition/helpers/save.d.ts +18 -0
- package/dist/composition/helpers/source-pick.d.ts +40 -0
- package/dist/composition/helpers/spec.d.ts +38 -0
- package/dist/composition/index.d.ts +1 -0
- package/dist/composition/source-ref.d.ts +11 -0
- package/dist/composition/state-fields.d.ts +1 -1
- package/dist/composition/validate-composition.d.ts +8 -2
- package/dist/{composition-kEl9mevu.mjs → composition-B85l9j1M.mjs} +114 -8
- package/dist/{composition-DsmkwP9-.js → composition-OJKOJJD-.js} +179 -7
- package/dist/device/cap-vocabulary/entries/sensors.d.ts +1 -1
- package/dist/device/cap-vocabulary/types.d.ts +2 -2
- package/dist/device/schema-fields.d.ts +3 -0
- package/dist/device/source-info.d.ts +12 -6
- package/dist/generated/addon-api.d.ts +14 -0
- package/dist/generated/addon-cap-facts.d.ts +1 -1
- package/dist/generated/cap-status-types.d.ts +3 -1
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/customize-catalog.d.ts +11 -87
- package/dist/generated/device-local-state.d.ts +3 -0
- package/dist/generated/device-proxy.d.ts +3 -0
- package/dist/generated/history-catalog.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/generated/runtime-state-durability.d.ts +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1458 -499
- package/dist/index.mjs +1420 -499
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/{sleep-BPQ2ZyaI.js → sleep-7Gw3GJ4n.js} +232 -127
- package/dist/{sleep-BErAxhul.mjs → sleep-B81gwQuR.mjs} +179 -128
- package/dist/units/convert.d.ts +5 -0
- package/dist/units/format-reading.d.ts +15 -0
- package/dist/units/index.d.ts +8 -1
- package/dist/units/ingest-reading.d.ts +21 -0
- package/dist/units/quantity.d.ts +47 -0
- package/dist/units/threshold.d.ts +6 -0
- package/dist/units/unit-table.d.ts +2 -228
- package/package.json +1 -1
- package/dist/capabilities/advanced-parameters.d.ts +0 -17
|
@@ -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,
|
|
8
|
+
* Coverage: 1 advance-derived caps, 75 caps with 351 state leaves.
|
|
9
9
|
*/
|
|
10
10
|
/** A bindable scalar in a capability's runtime state. */
|
|
11
11
|
export interface CapStateLeaf {
|
|
@@ -30,6 +30,7 @@ import type { FanControlStatusSchema } from '../capabilities/fan-control.cap.js'
|
|
|
30
30
|
import type { FeatureProbeStatusSchema } from '../capabilities/feature-probe.cap.js';
|
|
31
31
|
import type { FloodStatusSchema } from '../capabilities/flood.cap.js';
|
|
32
32
|
import type { GasStatusSchema } from '../capabilities/gas.cap.js';
|
|
33
|
+
import type { groupStatusCapability } from '../capabilities/group-status.cap.js';
|
|
33
34
|
import type { HeatingValveStatusSchema } from '../capabilities/heating-valve.cap.js';
|
|
34
35
|
import type { HumidifierStatusSchema } from '../capabilities/humidifier.cap.js';
|
|
35
36
|
import type { HumiditySensorStatusSchema } from '../capabilities/humidity-sensor.cap.js';
|
|
@@ -111,6 +112,7 @@ export type CapStatusTypeMap = {
|
|
|
111
112
|
readonly 'feature-probe': z.infer<typeof FeatureProbeStatusSchema>;
|
|
112
113
|
readonly 'flood': z.infer<typeof FloodStatusSchema>;
|
|
113
114
|
readonly 'gas': z.infer<typeof GasStatusSchema>;
|
|
115
|
+
readonly 'group-status': z.infer<(typeof groupStatusCapability)['status']['schema']>;
|
|
114
116
|
readonly 'heating-valve': z.infer<typeof HeatingValveStatusSchema>;
|
|
115
117
|
readonly 'humidifier': z.infer<typeof HumidifierStatusSchema>;
|
|
116
118
|
readonly 'humidity-sensor': z.infer<typeof HumiditySensorStatusSchema>;
|
|
@@ -163,4 +165,4 @@ export type CapNameWithStatus = keyof CapStatusTypeMap;
|
|
|
163
165
|
* aggregator to enumerate caps whose `status` should be polled +
|
|
164
166
|
* streamed via `subscribeDeviceStatusAggregate`.
|
|
165
167
|
*/
|
|
166
|
-
export declare const CAP_NAMES_WITH_STATUS: readonly ["accessories", "air-quality-sensor", "alarm-panel", "ambient-light-sensor", "automation-control", "battery", "binary", "brightness", "broker", "camera-credentials", "carbon-monoxide", "climate-control", "color", "connectivity", "consumables", "contact", "control", "cover", "day-night", "device-adoption", "device-discovery", "device-export", "device-status", "dishwasher", "doorbell", "enum-sensor", "event-emitter", "fan-control", "feature-probe", "flood", "gas", "heating-valve", "humidifier", "humidity-sensor", "image", "image-settings", "intercom", "lawn-mower-control", "lock-control", "media-player", "motion", "motion-trigger", "motion-zones", "mqtt-broker", "native-object-detection", "navigation", "network-link", "notifier", "numeric-sensor", "osd", "pet-feeder", "power-meter", "presence", "pressure-sensor", "privacy-mask", "ptz", "ptz-autotrack", "recording-archive", "recording-onboard", "recording-signal", "running-state", "scene-monitor", "script-runner", "smoke", "snapshot", "stream-params", "switch", "tamper", "temperature-sensor", "update", "vacuum-control", "valve", "vibration", "water-heater", "weather"];
|
|
168
|
+
export declare const CAP_NAMES_WITH_STATUS: readonly ["accessories", "air-quality-sensor", "alarm-panel", "ambient-light-sensor", "automation-control", "battery", "binary", "brightness", "broker", "camera-credentials", "carbon-monoxide", "climate-control", "color", "connectivity", "consumables", "contact", "control", "cover", "day-night", "device-adoption", "device-discovery", "device-export", "device-status", "dishwasher", "doorbell", "enum-sensor", "event-emitter", "fan-control", "feature-probe", "flood", "gas", "group-status", "heating-valve", "humidifier", "humidity-sensor", "image", "image-settings", "intercom", "lawn-mower-control", "lock-control", "media-player", "motion", "motion-trigger", "motion-zones", "mqtt-broker", "native-object-detection", "navigation", "network-link", "notifier", "numeric-sensor", "osd", "pet-feeder", "power-meter", "presence", "pressure-sensor", "privacy-mask", "ptz", "ptz-autotrack", "recording-archive", "recording-onboard", "recording-signal", "running-state", "scene-monitor", "script-runner", "smoke", "snapshot", "stream-params", "switch", "tamper", "temperature-sensor", "update", "vacuum-control", "valve", "vibration", "water-heater", "weather"];
|
|
@@ -72,6 +72,7 @@ export { featureProbeCapability } from '../capabilities/feature-probe.cap.js';
|
|
|
72
72
|
export { filesystemBrowseCapability } from '../capabilities/filesystem-browse.cap.js';
|
|
73
73
|
export { floodCapability } from '../capabilities/flood.cap.js';
|
|
74
74
|
export { gasCapability } from '../capabilities/gas.cap.js';
|
|
75
|
+
export { groupStatusCapability } from '../capabilities/group-status.cap.js';
|
|
75
76
|
export { heatingValveCapability } from '../capabilities/heating-valve.cap.js';
|
|
76
77
|
export { humidifierCapability } from '../capabilities/humidifier.cap.js';
|
|
77
78
|
export { humiditySensorCapability } from '../capabilities/humidity-sensor.cap.js';
|
|
@@ -254,6 +255,7 @@ export declare const CAPABILITY_NAMES: {
|
|
|
254
255
|
readonly filesystemBrowse: 'filesystem-browse';
|
|
255
256
|
readonly flood: 'flood';
|
|
256
257
|
readonly gas: 'gas';
|
|
258
|
+
readonly groupStatus: 'group-status';
|
|
257
259
|
readonly heatingValve: 'heating-valve';
|
|
258
260
|
readonly humidifier: 'humidifier';
|
|
259
261
|
readonly humiditySensor: 'humidity-sensor';
|
|
@@ -449,6 +451,7 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
449
451
|
readonly filesystemBrowse: TRouter;
|
|
450
452
|
readonly flood: TRouter;
|
|
451
453
|
readonly gas: TRouter;
|
|
454
|
+
readonly groupStatus: TRouter;
|
|
452
455
|
readonly heatingValve: TRouter;
|
|
453
456
|
readonly humidifier: TRouter;
|
|
454
457
|
readonly humiditySensor: TRouter;
|
|
@@ -557,8 +560,8 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
557
560
|
readonly zoneRules: TRouter;
|
|
558
561
|
readonly zones: TRouter;
|
|
559
562
|
}
|
|
560
|
-
/** Capability names whose mode is `singleton` (
|
|
561
|
-
export declare const SINGLETON_CAPABILITY_NAMES: readonly ['accessories', 'addon-pages', 'addon-settings', 'addon-widgets', 'addons', 'admin-ui', 'air-quality-sensor', 'alarm-panel', 'alerts', 'ambient-light-sensor', 'audio-analysis', 'audio-analyzer', 'audio-codec', 'audio-metrics', 'automation-control', 'backup', 'battery', 'binary', 'brightness', 'button', 'calendars', 'camera-credentials', 'camera-grid-layout', 'camera-pipeline-config', 'camera-streams', 'carbon-monoxide', 'climate-control', 'color', 'composer', 'connectivity', 'consumables', 'contact', 'control', 'core-blocks', 'cover', 'database-snapshot', 'day-night', 'decoder', 'detection-pipeline', 'device-admin-link', 'device-credentials', 'device-discovery', 'device-history', 'device-manager', 'device-ops', 'device-state', 'device-status', 'dishwasher', 'display-palette', 'doorbell', 'enum-sensor', 'event-emitter', 'face-gallery', 'fan-control', 'feature-probe', 'filesystem-browse', 'flood', 'gas', 'heating-valve', 'humidifier', 'humidity-sensor', 'image', 'image-settings', 'integrations', 'intercom', 'keychain', 'keychain-admin', 'lawn-mower-control', 'llm-runtime', 'local-network', 'lock-control', 'media-player', 'metrics-provider', 'model-convert', 'model-distributor', 'motion', 'motion-detection', 'motion-trigger', 'motion-zones', 'native-object-detection', 'navigation', 'network-link', 'network-quality', 'node-certificates', 'nodes', 'notification-rules', 'notifier', 'numeric-sensor', 'oidc-connections', 'osd', 'osd-manager', 'pet-feeder', 'pipeline-analytics', 'pipeline-executor', 'pipeline-orchestrator', 'pipeline-runner', 'plate-gallery', 'platform-probe', 'power-meter', 'presence', 'pressure-sensor', 'privacy-mask', 'ptz', 'ptz-autotrack', 'reboot', 'record-entries', 'recording-archive', 'recording-export', 'recording-onboard', 'recording-signal', 'records', 'running-state', 'scene-monitor', 'script-runner', 'server-management', 'settings-store', 'smoke', 'snapshot', 'sso-bridge', 'storage', 'storage-admin', 'storage-migration', 'stream-broker', 'stream-catalog', 'stream-params', 'stream-signals', 'switch', 'system', 'tamper', 'temperature-sensor', 'terminal-session', 'toast', 'training', 'update', 'user-management', 'vacuum-control', 'valve', 'vector-store', 'vibration', 'viewer-ui', 'water-heater', 'weather', 'webrtc-session', 'zone-analytics', 'zone-rules', 'zones'];
|
|
563
|
+
/** Capability names whose mode is `singleton` (147 caps). */
|
|
564
|
+
export declare const SINGLETON_CAPABILITY_NAMES: readonly ['accessories', 'addon-pages', 'addon-settings', 'addon-widgets', 'addons', 'admin-ui', 'air-quality-sensor', 'alarm-panel', 'alerts', 'ambient-light-sensor', 'audio-analysis', 'audio-analyzer', 'audio-codec', 'audio-metrics', 'automation-control', 'backup', 'battery', 'binary', 'brightness', 'button', 'calendars', 'camera-credentials', 'camera-grid-layout', 'camera-pipeline-config', 'camera-streams', 'carbon-monoxide', 'climate-control', 'color', 'composer', 'connectivity', 'consumables', 'contact', 'control', 'core-blocks', 'cover', 'database-snapshot', 'day-night', 'decoder', 'detection-pipeline', 'device-admin-link', 'device-credentials', 'device-discovery', 'device-history', 'device-manager', 'device-ops', 'device-state', 'device-status', 'dishwasher', 'display-palette', 'doorbell', 'enum-sensor', 'event-emitter', 'face-gallery', 'fan-control', 'feature-probe', 'filesystem-browse', 'flood', 'gas', 'group-status', 'heating-valve', 'humidifier', 'humidity-sensor', 'image', 'image-settings', 'integrations', 'intercom', 'keychain', 'keychain-admin', 'lawn-mower-control', 'llm-runtime', 'local-network', 'lock-control', 'media-player', 'metrics-provider', 'model-convert', 'model-distributor', 'motion', 'motion-detection', 'motion-trigger', 'motion-zones', 'native-object-detection', 'navigation', 'network-link', 'network-quality', 'node-certificates', 'nodes', 'notification-rules', 'notifier', 'numeric-sensor', 'oidc-connections', 'osd', 'osd-manager', 'pet-feeder', 'pipeline-analytics', 'pipeline-executor', 'pipeline-orchestrator', 'pipeline-runner', 'plate-gallery', 'platform-probe', 'power-meter', 'presence', 'pressure-sensor', 'privacy-mask', 'ptz', 'ptz-autotrack', 'reboot', 'record-entries', 'recording-archive', 'recording-export', 'recording-onboard', 'recording-signal', 'records', 'running-state', 'scene-monitor', 'script-runner', 'server-management', 'settings-store', 'smoke', 'snapshot', 'sso-bridge', 'storage', 'storage-admin', 'storage-migration', 'stream-broker', 'stream-catalog', 'stream-params', 'stream-signals', 'switch', 'system', 'tamper', 'temperature-sensor', 'terminal-session', 'toast', 'training', 'update', 'user-management', 'vacuum-control', 'valve', 'vector-store', 'vibration', 'viewer-ui', 'water-heater', 'weather', 'webrtc-session', 'zone-analytics', 'zone-rules', 'zones'];
|
|
562
565
|
/** Union of singleton capability names (literal string union). */
|
|
563
566
|
export type SingletonCapabilityName = typeof SINGLETON_CAPABILITY_NAMES[number];
|
|
564
567
|
/** Capability names whose mode is `collection` (35 caps). */
|
|
@@ -1,26 +1,16 @@
|
|
|
1
1
|
import { DeviceType } from '../device/device-type.js';
|
|
2
2
|
/**
|
|
3
3
|
* Customize catalog, projected from every `*.cap.ts` `customize` block.
|
|
4
|
-
*
|
|
4
|
+
* 5 caps. Field keys are `runtimeState` paths. No Zod.
|
|
5
5
|
*/
|
|
6
6
|
export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
7
|
-
readonly 'ambient-light-sensor': {
|
|
8
|
-
readonly version: 1;
|
|
9
|
-
readonly targets: readonly [];
|
|
10
|
-
readonly advancedParameters: readonly [{
|
|
11
|
-
readonly path: 'lux';
|
|
12
|
-
readonly kind: 'number';
|
|
13
|
-
readonly label: 'Illuminance';
|
|
14
|
-
readonly unit: 'lx';
|
|
15
|
-
}];
|
|
16
|
-
};
|
|
17
7
|
readonly battery: {
|
|
18
8
|
readonly version: 1;
|
|
19
9
|
readonly targets: readonly [{
|
|
20
10
|
readonly id: 'percentage';
|
|
21
11
|
readonly cardinality: 'scalar';
|
|
22
12
|
readonly deviceTypes: readonly [DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat];
|
|
23
|
-
readonly apply: 'add
|
|
13
|
+
readonly apply: 'add';
|
|
24
14
|
readonly vocabularyCap: 'battery';
|
|
25
15
|
readonly vocabularyStateField: 'percentage';
|
|
26
16
|
readonly sources: readonly [{
|
|
@@ -60,29 +50,6 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
60
50
|
readonly when: 'add';
|
|
61
51
|
}];
|
|
62
52
|
}];
|
|
63
|
-
readonly advancedParameters: readonly [{
|
|
64
|
-
readonly path: 'binary';
|
|
65
|
-
readonly kind: 'boolean';
|
|
66
|
-
readonly label: 'Binary indicator';
|
|
67
|
-
}, {
|
|
68
|
-
readonly path: 'charging';
|
|
69
|
-
readonly kind: 'enum';
|
|
70
|
-
readonly label: 'Charging source';
|
|
71
|
-
readonly enumValues: readonly ["dc", "solar", "none", "unknown"];
|
|
72
|
-
}, {
|
|
73
|
-
readonly path: 'sleeping';
|
|
74
|
-
readonly kind: 'boolean';
|
|
75
|
-
readonly label: 'Sleeping';
|
|
76
|
-
}];
|
|
77
|
-
};
|
|
78
|
-
readonly binary: {
|
|
79
|
-
readonly version: 1;
|
|
80
|
-
readonly targets: readonly [];
|
|
81
|
-
readonly advancedParameters: readonly [{
|
|
82
|
-
readonly path: 'on';
|
|
83
|
-
readonly kind: 'boolean';
|
|
84
|
-
readonly label: 'On';
|
|
85
|
-
}];
|
|
86
53
|
};
|
|
87
54
|
readonly consumables: {
|
|
88
55
|
readonly version: 1;
|
|
@@ -130,8 +97,8 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
130
97
|
}];
|
|
131
98
|
}];
|
|
132
99
|
readonly literals: readonly [{
|
|
133
|
-
readonly path: 'remaining.
|
|
134
|
-
readonly values: readonly ["
|
|
100
|
+
readonly path: 'remaining.kind';
|
|
101
|
+
readonly values: readonly ["duration", "count"];
|
|
135
102
|
}];
|
|
136
103
|
}, {
|
|
137
104
|
readonly path: 'status';
|
|
@@ -167,7 +134,6 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
167
134
|
readonly when: 'add';
|
|
168
135
|
}];
|
|
169
136
|
}];
|
|
170
|
-
readonly advancedParameters: readonly [];
|
|
171
137
|
};
|
|
172
138
|
readonly doorbell: {
|
|
173
139
|
readonly version: 1;
|
|
@@ -204,17 +170,6 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
204
170
|
readonly highWater: 'composer-advance';
|
|
205
171
|
readonly debounceMs: 2000;
|
|
206
172
|
}];
|
|
207
|
-
readonly advancedParameters: readonly [];
|
|
208
|
-
};
|
|
209
|
-
readonly 'humidity-sensor': {
|
|
210
|
-
readonly version: 1;
|
|
211
|
-
readonly targets: readonly [];
|
|
212
|
-
readonly advancedParameters: readonly [{
|
|
213
|
-
readonly path: 'percent';
|
|
214
|
-
readonly kind: 'number';
|
|
215
|
-
readonly label: 'Humidity';
|
|
216
|
-
readonly unit: '%';
|
|
217
|
-
}];
|
|
218
173
|
};
|
|
219
174
|
readonly motion: {
|
|
220
175
|
readonly version: 1;
|
|
@@ -222,7 +177,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
222
177
|
readonly id: 'detected';
|
|
223
178
|
readonly cardinality: 'event';
|
|
224
179
|
readonly deviceTypes: readonly [DeviceType.Camera];
|
|
225
|
-
readonly apply: '
|
|
180
|
+
readonly apply: 'add';
|
|
226
181
|
readonly vocabularyCap: 'motion';
|
|
227
182
|
readonly vocabularyEvent: 'onMotionChanged';
|
|
228
183
|
readonly sources: readonly [{
|
|
@@ -250,22 +205,6 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
250
205
|
readonly timeoutMs: 30000;
|
|
251
206
|
readonly sourceModes: readonly ["in-addition", "confirm", "replace"];
|
|
252
207
|
}];
|
|
253
|
-
readonly advancedParameters: readonly [];
|
|
254
|
-
};
|
|
255
|
-
readonly 'power-meter': {
|
|
256
|
-
readonly version: 1;
|
|
257
|
-
readonly targets: readonly [];
|
|
258
|
-
readonly advancedParameters: readonly [{
|
|
259
|
-
readonly path: 'kwhTotal';
|
|
260
|
-
readonly kind: 'number';
|
|
261
|
-
readonly label: 'Energy';
|
|
262
|
-
readonly unit: 'kWh';
|
|
263
|
-
}, {
|
|
264
|
-
readonly path: 'watts';
|
|
265
|
-
readonly kind: 'number';
|
|
266
|
-
readonly label: 'Power';
|
|
267
|
-
readonly unit: 'W';
|
|
268
|
-
}];
|
|
269
208
|
};
|
|
270
209
|
readonly 'running-state': {
|
|
271
210
|
readonly version: 1;
|
|
@@ -273,7 +212,7 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
273
212
|
readonly id: 'running';
|
|
274
213
|
readonly cardinality: 'scalar';
|
|
275
214
|
readonly deviceTypes: readonly [DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder];
|
|
276
|
-
readonly apply: 'add
|
|
215
|
+
readonly apply: 'add';
|
|
277
216
|
readonly vocabularyCap: 'running-state';
|
|
278
217
|
readonly vocabularyStateField: 'running';
|
|
279
218
|
readonly sources: readonly [{
|
|
@@ -334,25 +273,10 @@ export declare const CAP_CUSTOMIZE_CATALOG: {
|
|
|
334
273
|
readonly sourceChangedAt: 'prefer';
|
|
335
274
|
}];
|
|
336
275
|
}];
|
|
337
|
-
readonly advancedParameters: readonly [];
|
|
338
|
-
};
|
|
339
|
-
readonly switch: {
|
|
340
|
-
readonly version: 1;
|
|
341
|
-
readonly targets: readonly [];
|
|
342
|
-
readonly advancedParameters: readonly [{
|
|
343
|
-
readonly path: 'on';
|
|
344
|
-
readonly kind: 'boolean';
|
|
345
|
-
readonly label: 'On';
|
|
346
|
-
}];
|
|
347
|
-
};
|
|
348
|
-
readonly 'temperature-sensor': {
|
|
349
|
-
readonly version: 1;
|
|
350
|
-
readonly targets: readonly [];
|
|
351
|
-
readonly advancedParameters: readonly [{
|
|
352
|
-
readonly path: 'celsius';
|
|
353
|
-
readonly kind: 'number';
|
|
354
|
-
readonly label: 'Temperature';
|
|
355
|
-
readonly unit: '°C';
|
|
356
|
-
}];
|
|
357
276
|
};
|
|
358
277
|
};
|
|
278
|
+
/**
|
|
279
|
+
* Unit meta on runtime-state fields. The composed-device row reads this;
|
|
280
|
+
* it is not an override list (D944).
|
|
281
|
+
*/
|
|
282
|
+
export declare const CAP_RUNTIME_FIELD_UNITS: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
@@ -27,6 +27,7 @@ import { fanControlCapability } from '../capabilities/fan-control.cap.js';
|
|
|
27
27
|
import { featureProbeCapability } from '../capabilities/feature-probe.cap.js';
|
|
28
28
|
import { floodCapability } from '../capabilities/flood.cap.js';
|
|
29
29
|
import { gasCapability } from '../capabilities/gas.cap.js';
|
|
30
|
+
import { groupStatusCapability } from '../capabilities/group-status.cap.js';
|
|
30
31
|
import { heatingValveCapability } from '../capabilities/heating-valve.cap.js';
|
|
31
32
|
import { humidifierCapability } from '../capabilities/humidifier.cap.js';
|
|
32
33
|
import { humiditySensorCapability } from '../capabilities/humidity-sensor.cap.js';
|
|
@@ -111,6 +112,7 @@ export interface DeviceLocalState {
|
|
|
111
112
|
featureProbe: InferRuntimeState<typeof featureProbeCapability>;
|
|
112
113
|
flood: InferRuntimeState<typeof floodCapability>;
|
|
113
114
|
gas: InferRuntimeState<typeof gasCapability>;
|
|
115
|
+
groupStatus: InferRuntimeState<typeof groupStatusCapability>;
|
|
114
116
|
heatingValve: InferRuntimeState<typeof heatingValveCapability>;
|
|
115
117
|
humidifier: InferRuntimeState<typeof humidifierCapability>;
|
|
116
118
|
humiditySensor: InferRuntimeState<typeof humiditySensorCapability>;
|
|
@@ -205,6 +207,7 @@ export interface CapNameToRuntimeStateMap {
|
|
|
205
207
|
'feature-probe': InferRuntimeState<typeof featureProbeCapability>;
|
|
206
208
|
'flood': InferRuntimeState<typeof floodCapability>;
|
|
207
209
|
'gas': InferRuntimeState<typeof gasCapability>;
|
|
210
|
+
'group-status': InferRuntimeState<typeof groupStatusCapability>;
|
|
208
211
|
'heating-valve': InferRuntimeState<typeof heatingValveCapability>;
|
|
209
212
|
'humidifier': InferRuntimeState<typeof humidifierCapability>;
|
|
210
213
|
'humidity-sensor': InferRuntimeState<typeof humiditySensorCapability>;
|
|
@@ -40,6 +40,7 @@ import type { fanControlCapability } from '../capabilities/fan-control.cap.js';
|
|
|
40
40
|
import type { featureProbeCapability } from '../capabilities/feature-probe.cap.js';
|
|
41
41
|
import type { floodCapability } from '../capabilities/flood.cap.js';
|
|
42
42
|
import type { gasCapability } from '../capabilities/gas.cap.js';
|
|
43
|
+
import type { groupStatusCapability } from '../capabilities/group-status.cap.js';
|
|
43
44
|
import type { heatingValveCapability } from '../capabilities/heating-valve.cap.js';
|
|
44
45
|
import type { humidifierCapability } from '../capabilities/humidifier.cap.js';
|
|
45
46
|
import type { humiditySensorCapability } from '../capabilities/humidity-sensor.cap.js';
|
|
@@ -145,6 +146,7 @@ export interface DeviceProxyState {
|
|
|
145
146
|
readonly featureProbe: SliceHandle<InferRuntimeState<typeof featureProbeCapability>>;
|
|
146
147
|
readonly flood: SliceHandle<InferRuntimeState<typeof floodCapability>>;
|
|
147
148
|
readonly gas: SliceHandle<InferRuntimeState<typeof gasCapability>>;
|
|
149
|
+
readonly groupStatus: SliceHandle<InferRuntimeState<typeof groupStatusCapability>>;
|
|
148
150
|
readonly heatingValve: SliceHandle<InferRuntimeState<typeof heatingValveCapability>>;
|
|
149
151
|
readonly humidifier: SliceHandle<InferRuntimeState<typeof humidifierCapability>>;
|
|
150
152
|
readonly humiditySensor: SliceHandle<InferRuntimeState<typeof humiditySensorCapability>>;
|
|
@@ -246,6 +248,7 @@ export interface DeviceProxy {
|
|
|
246
248
|
readonly featureProbe?: InferDeviceProxyCap<typeof featureProbeCapability>;
|
|
247
249
|
readonly flood?: InferDeviceProxyCap<typeof floodCapability>;
|
|
248
250
|
readonly gas?: InferDeviceProxyCap<typeof gasCapability>;
|
|
251
|
+
readonly groupStatus?: InferDeviceProxyCap<typeof groupStatusCapability>;
|
|
249
252
|
readonly heatingValve?: InferDeviceProxyCap<typeof heatingValveCapability>;
|
|
250
253
|
readonly humidifier?: InferDeviceProxyCap<typeof humidifierCapability>;
|
|
251
254
|
readonly humiditySensor?: InferDeviceProxyCap<typeof humiditySensorCapability>;
|
|
@@ -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
|
-
* 41 caps with series (
|
|
4
|
+
* 41 caps with series (75 series), 31 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>>>>;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* scope+access check inside `protectedProcedure` (see
|
|
7
7
|
* `server/backend/src/api/trpc/trpc.middleware.ts`).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 1383 method paths across 182 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { MethodRole } from '../auth/viewer-access.js';
|
|
12
12
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* system-scope cap that takes a deviceId was previously never device-filtered
|
|
7
7
|
* — see the generator header).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
9
|
+
* Coverage: 547 methods carry a device reference, of which
|
|
10
10
|
* 174 are on SYSTEM-scope caps.
|
|
11
11
|
*
|
|
12
12
|
* Top-level fields, number arrays, and one-level arrays of objects carrying
|
|
@@ -11,7 +11,7 @@ export interface RuntimeStatePolicy {
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
|
|
14
|
-
* `runtimeState`.
|
|
14
|
+
* `runtimeState`. 73 caps: 38 `restored`, 35 `session`.
|
|
15
15
|
*
|
|
16
16
|
* A cap absent from this map has no runtime-state slice at all. A cap PRESENT
|
|
17
17
|
* with `durability: 'session'` has one and has decided not to keep it.
|
package/dist/index.d.ts
CHANGED
|
@@ -258,7 +258,9 @@ export { isRestoredCap, RESTORED_CAP_NAMES, RUNTIME_STATE_POLICY, runtimeStatePo
|
|
|
258
258
|
export { BucketAccumulator, bucketStartOf, type ClosedHistoryBucket, HISTORY_BUCKET_MS, MAX_REQUEUED_BUCKETS_PER_SERIES, } from './history/bucket-accumulator.js';
|
|
259
259
|
export { HISTORY_CATALOG, HISTORY_ITEM_CATALOG, HISTORY_NONE_CAPS, historyFieldsFor, } from './generated/history-catalog.js';
|
|
260
260
|
export { CAP_CUSTOMIZE_CATALOG } from './generated/customize-catalog.js';
|
|
261
|
-
export type { CustomizeCatalog,
|
|
261
|
+
export type { CustomizeCatalog, CustomizeCatalogField, CustomizeCatalogSource, CustomizeCatalogTarget, CustomizeCatalogTransform, } from './capabilities/customize-catalog.js';
|
|
262
|
+
export { CAP_RUNTIME_FIELD_UNITS } from './generated/customize-catalog.js';
|
|
263
|
+
export { runtimeFieldUnit } from './capabilities/runtime-field-unit.js';
|
|
262
264
|
export { compositionFillStatus, decodeCompositionToCards, formulaProblem, primaryCapForRole, problemsBlockSave, } from './composition/cards/index.js';
|
|
263
265
|
export type { CompositionFillStatus } from './composition/cards/index.js';
|
|
264
266
|
export type { CapabilityCustomizeSpec, CapabilityCustomizeTarget, CustomizeCardinality, CustomizeEventEdge, EventCustomizeTarget, PulseEventCustomizeTarget, SpanEventCustomizeTarget, } from './capabilities/customize-spec.js';
|