@camstack/types 0.1.40 → 0.1.42
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/base-addon.d.ts +12 -0
- package/dist/addon/base-addon.d.ts.map +1 -1
- package/dist/addon/durable-state.d.ts +33 -0
- package/dist/addon/durable-state.d.ts.map +1 -0
- package/dist/capabilities/accessories.cap.d.ts +56 -8
- package/dist/capabilities/accessories.cap.d.ts.map +1 -1
- package/dist/capabilities/advanced-notifier.cap.d.ts +4 -0
- package/dist/capabilities/advanced-notifier.cap.d.ts.map +1 -1
- package/dist/capabilities/air-quality-sensor.cap.d.ts +56 -0
- package/dist/capabilities/air-quality-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/alarm-panel.cap.d.ts +154 -0
- package/dist/capabilities/alarm-panel.cap.d.ts.map +1 -0
- package/dist/capabilities/ambient-light-sensor.cap.d.ts +39 -0
- package/dist/capabilities/ambient-light-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/automation-control.cap.d.ts +65 -0
- package/dist/capabilities/automation-control.cap.d.ts.map +1 -0
- package/dist/capabilities/battery.cap.d.ts +30 -1
- package/dist/capabilities/battery.cap.d.ts.map +1 -1
- package/dist/capabilities/binary.cap.d.ts +40 -0
- package/dist/capabilities/binary.cap.d.ts.map +1 -0
- package/dist/capabilities/brightness.cap.d.ts +3 -2
- package/dist/capabilities/brightness.cap.d.ts.map +1 -1
- package/dist/capabilities/broker.cap.d.ts +291 -0
- package/dist/capabilities/broker.cap.d.ts.map +1 -0
- package/dist/capabilities/button.cap.d.ts +27 -0
- package/dist/capabilities/button.cap.d.ts.map +1 -0
- package/dist/capabilities/camera-credentials.cap.d.ts +1 -0
- package/dist/capabilities/camera-credentials.cap.d.ts.map +1 -1
- package/dist/capabilities/camera-streams.cap.d.ts +147 -10
- package/dist/capabilities/camera-streams.cap.d.ts.map +1 -1
- package/dist/capabilities/capability-definition.d.ts +15 -0
- package/dist/capabilities/capability-definition.d.ts.map +1 -1
- package/dist/capabilities/carbon-monoxide.cap.d.ts +33 -0
- package/dist/capabilities/carbon-monoxide.cap.d.ts.map +1 -0
- package/dist/capabilities/climate-control.cap.d.ts +183 -0
- package/dist/capabilities/climate-control.cap.d.ts.map +1 -0
- package/dist/capabilities/color.cap.d.ts +186 -0
- package/dist/capabilities/color.cap.d.ts.map +1 -0
- package/dist/capabilities/connectivity.cap.d.ts +37 -0
- package/dist/capabilities/connectivity.cap.d.ts.map +1 -0
- package/dist/capabilities/consumables.cap.d.ts +105 -0
- package/dist/capabilities/consumables.cap.d.ts.map +1 -0
- package/dist/capabilities/contact.cap.d.ts +41 -0
- package/dist/capabilities/contact.cap.d.ts.map +1 -0
- package/dist/capabilities/control.cap.d.ts +167 -0
- package/dist/capabilities/control.cap.d.ts.map +1 -0
- package/dist/capabilities/cover.cap.d.ts +104 -0
- package/dist/capabilities/cover.cap.d.ts.map +1 -0
- package/dist/capabilities/custom-actions.d.ts +6 -0
- package/dist/capabilities/custom-actions.d.ts.map +1 -1
- package/dist/capabilities/decoder.cap.d.ts +1 -1
- package/dist/capabilities/device-adoption.cap.d.ts +203 -0
- package/dist/capabilities/device-adoption.cap.d.ts.map +1 -0
- package/dist/capabilities/device-discovery.cap.d.ts +44 -143
- package/dist/capabilities/device-discovery.cap.d.ts.map +1 -1
- package/dist/capabilities/device-manager.cap.d.ts +469 -0
- package/dist/capabilities/device-manager.cap.d.ts.map +1 -1
- package/dist/capabilities/device-ops.cap.d.ts +30 -0
- package/dist/capabilities/device-ops.cap.d.ts.map +1 -1
- package/dist/capabilities/device-provider.cap.d.ts +36 -0
- package/dist/capabilities/device-provider.cap.d.ts.map +1 -1
- package/dist/capabilities/device-status.cap.d.ts +1 -0
- package/dist/capabilities/device-status.cap.d.ts.map +1 -1
- package/dist/capabilities/doorbell.cap.d.ts +1 -0
- package/dist/capabilities/doorbell.cap.d.ts.map +1 -1
- package/dist/capabilities/enum-sensor.cap.d.ts +60 -0
- package/dist/capabilities/enum-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/event-emitter.cap.d.ts +79 -0
- package/dist/capabilities/event-emitter.cap.d.ts.map +1 -0
- package/dist/capabilities/fan-control.cap.d.ts +100 -0
- package/dist/capabilities/fan-control.cap.d.ts.map +1 -0
- package/dist/capabilities/feature-probe.cap.d.ts +1 -0
- package/dist/capabilities/feature-probe.cap.d.ts.map +1 -1
- package/dist/capabilities/filesystem-browse.cap.d.ts +39 -0
- package/dist/capabilities/filesystem-browse.cap.d.ts.map +1 -0
- package/dist/capabilities/flood.cap.d.ts +37 -0
- package/dist/capabilities/flood.cap.d.ts.map +1 -0
- package/dist/capabilities/gas.cap.d.ts +34 -0
- package/dist/capabilities/gas.cap.d.ts.map +1 -0
- package/dist/capabilities/humidifier.cap.d.ts +82 -0
- package/dist/capabilities/humidifier.cap.d.ts.map +1 -0
- package/dist/capabilities/humidity-sensor.cap.d.ts +43 -0
- package/dist/capabilities/humidity-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/image.cap.d.ts +44 -0
- package/dist/capabilities/image.cap.d.ts.map +1 -0
- package/dist/capabilities/index.d.ts +97 -12
- package/dist/capabilities/index.d.ts.map +1 -1
- package/dist/capabilities/integrations.cap.d.ts +12 -0
- package/dist/capabilities/integrations.cap.d.ts.map +1 -1
- package/dist/capabilities/intercom.cap.d.ts +49 -9
- package/dist/capabilities/intercom.cap.d.ts.map +1 -1
- package/dist/capabilities/lawn-mower-control.cap.d.ts +83 -0
- package/dist/capabilities/lawn-mower-control.cap.d.ts.map +1 -0
- package/dist/capabilities/lock-control.cap.d.ts +92 -0
- package/dist/capabilities/lock-control.cap.d.ts.map +1 -0
- package/dist/capabilities/media-player.cap.d.ts +201 -0
- package/dist/capabilities/media-player.cap.d.ts.map +1 -0
- package/dist/capabilities/motion-trigger.cap.d.ts +1 -0
- package/dist/capabilities/motion-trigger.cap.d.ts.map +1 -1
- package/dist/capabilities/motion-zones.cap.d.ts +1 -0
- package/dist/capabilities/motion-zones.cap.d.ts.map +1 -1
- package/dist/capabilities/native-object-detection.cap.d.ts +1 -0
- package/dist/capabilities/native-object-detection.cap.d.ts.map +1 -1
- package/dist/capabilities/network-quality.cap.d.ts +5 -0
- package/dist/capabilities/network-quality.cap.d.ts.map +1 -1
- package/dist/capabilities/notifier.cap.d.ts +173 -0
- package/dist/capabilities/notifier.cap.d.ts.map +1 -0
- package/dist/capabilities/numeric-sensor.cap.d.ts +52 -0
- package/dist/capabilities/numeric-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/osd.cap.d.ts +1 -0
- package/dist/capabilities/osd.cap.d.ts.map +1 -1
- package/dist/capabilities/pipeline-analytics.cap.d.ts +69 -22
- package/dist/capabilities/pipeline-analytics.cap.d.ts.map +1 -1
- package/dist/capabilities/pipeline-executor.cap.d.ts +2 -2
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +1 -1
- package/dist/capabilities/pipeline-runner.cap.d.ts +2 -2
- package/dist/capabilities/platform-probe.cap.d.ts +25 -0
- package/dist/capabilities/platform-probe.cap.d.ts.map +1 -1
- package/dist/capabilities/power-meter.cap.d.ts +65 -0
- package/dist/capabilities/power-meter.cap.d.ts.map +1 -0
- package/dist/capabilities/presence.cap.d.ts +79 -0
- package/dist/capabilities/presence.cap.d.ts.map +1 -0
- package/dist/capabilities/pressure-sensor.cap.d.ts +43 -0
- package/dist/capabilities/pressure-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/privacy-mask.cap.d.ts +1 -0
- package/dist/capabilities/privacy-mask.cap.d.ts.map +1 -1
- package/dist/capabilities/ptz-autotrack.cap.d.ts +1 -0
- package/dist/capabilities/ptz-autotrack.cap.d.ts.map +1 -1
- package/dist/capabilities/ptz.cap.d.ts +1 -0
- package/dist/capabilities/ptz.cap.d.ts.map +1 -1
- package/dist/capabilities/reboot.cap.d.ts +1 -0
- package/dist/capabilities/reboot.cap.d.ts.map +1 -1
- package/dist/capabilities/recording.cap.d.ts +367 -32
- package/dist/capabilities/recording.cap.d.ts.map +1 -1
- package/dist/capabilities/restreamer.cap.d.ts +2 -2
- package/dist/capabilities/schemas/orchestrator-metrics.d.ts +2 -2
- package/dist/capabilities/schemas/streaming-shared.d.ts +64 -1
- package/dist/capabilities/schemas/streaming-shared.d.ts.map +1 -1
- package/dist/capabilities/script-runner.cap.d.ts +62 -0
- package/dist/capabilities/script-runner.cap.d.ts.map +1 -0
- package/dist/capabilities/settings-store.cap.d.ts +25 -0
- package/dist/capabilities/settings-store.cap.d.ts.map +1 -1
- package/dist/capabilities/smoke.cap.d.ts +38 -0
- package/dist/capabilities/smoke.cap.d.ts.map +1 -0
- package/dist/capabilities/snapshot-provider.cap.d.ts +1 -1
- package/dist/capabilities/snapshot.cap.d.ts +1 -0
- package/dist/capabilities/snapshot.cap.d.ts.map +1 -1
- package/dist/capabilities/storage-evictable.cap.d.ts +54 -0
- package/dist/capabilities/storage-evictable.cap.d.ts.map +1 -0
- package/dist/capabilities/storage-provider.cap.d.ts +46 -186
- package/dist/capabilities/storage-provider.cap.d.ts.map +1 -1
- package/dist/capabilities/storage.cap.d.ts +41 -226
- package/dist/capabilities/storage.cap.d.ts.map +1 -1
- package/dist/capabilities/stream-broker.cap.d.ts +323 -25
- package/dist/capabilities/stream-broker.cap.d.ts.map +1 -1
- package/dist/capabilities/stream-catalog.cap.d.ts +3 -0
- package/dist/capabilities/stream-catalog.cap.d.ts.map +1 -1
- package/dist/capabilities/stream-params.cap.d.ts +27 -26
- package/dist/capabilities/stream-params.cap.d.ts.map +1 -1
- package/dist/capabilities/switch.cap.d.ts +1 -0
- package/dist/capabilities/switch.cap.d.ts.map +1 -1
- package/dist/capabilities/tamper.cap.d.ts +33 -0
- package/dist/capabilities/tamper.cap.d.ts.map +1 -0
- package/dist/capabilities/temperature-sensor.cap.d.ts +51 -0
- package/dist/capabilities/temperature-sensor.cap.d.ts.map +1 -0
- package/dist/capabilities/update.cap.d.ts +49 -0
- package/dist/capabilities/update.cap.d.ts.map +1 -0
- package/dist/capabilities/vacuum-control.cap.d.ts +229 -0
- package/dist/capabilities/vacuum-control.cap.d.ts.map +1 -0
- package/dist/capabilities/valve.cap.d.ts +93 -0
- package/dist/capabilities/valve.cap.d.ts.map +1 -0
- package/dist/capabilities/vibration.cap.d.ts +33 -0
- package/dist/capabilities/vibration.cap.d.ts.map +1 -0
- package/dist/capabilities/videoclips.cap.d.ts +77 -0
- package/dist/capabilities/videoclips.cap.d.ts.map +1 -0
- package/dist/capabilities/water-heater.cap.d.ts +78 -0
- package/dist/capabilities/water-heater.cap.d.ts.map +1 -0
- package/dist/capabilities/weather.cap.d.ts +76 -0
- package/dist/capabilities/weather.cap.d.ts.map +1 -0
- package/dist/capabilities/webrtc-session.cap.d.ts +95 -1
- package/dist/capabilities/webrtc-session.cap.d.ts.map +1 -1
- package/dist/constants.d.ts +0 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/device/base-device-provider.d.ts +11 -0
- package/dist/device/base-device-provider.d.ts.map +1 -1
- package/dist/device/base-device.d.ts +52 -0
- package/dist/device/base-device.d.ts.map +1 -1
- package/dist/device/device-context.d.ts +29 -0
- package/dist/device/device-context.d.ts.map +1 -1
- package/dist/device/device-link-transform.d.ts +6 -0
- package/dist/device/device-link-transform.d.ts.map +1 -0
- package/dist/device/device-management.d.ts +116 -4
- package/dist/device/device-management.d.ts.map +1 -1
- package/dist/device/device-type.d.ts +214 -3
- package/dist/device/device-type.d.ts.map +1 -1
- package/dist/device/device.d.ts +25 -0
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/index.d.ts +5 -1
- package/dist/device/index.d.ts.map +1 -1
- package/dist/device/path-util.d.ts +13 -0
- package/dist/device/path-util.d.ts.map +1 -0
- package/dist/device/schema-fields.d.ts +12 -0
- package/dist/device/schema-fields.d.ts.map +1 -0
- package/dist/device/source-info.d.ts +87 -0
- package/dist/device/source-info.d.ts.map +1 -0
- package/dist/device/system-mirror.d.ts +6 -2
- package/dist/device/system-mirror.d.ts.map +1 -1
- package/dist/encode-profile.d.ts +126 -0
- package/dist/encode-profile.d.ts.map +1 -0
- package/dist/enums/event-category.d.ts +64 -6
- package/dist/enums/event-category.d.ts.map +1 -1
- package/dist/generated/addon-api.d.ts +12722 -8080
- package/dist/generated/addon-api.d.ts.map +1 -1
- package/dist/generated/cap-status-types.d.ts +85 -1
- package/dist/generated/cap-status-types.d.ts.map +1 -1
- package/dist/generated/capability-router-map.d.ts +139 -7
- package/dist/generated/capability-router-map.d.ts.map +1 -1
- package/dist/generated/device-local-state.d.ts +117 -0
- package/dist/generated/device-local-state.d.ts.map +1 -1
- package/dist/generated/device-proxy.d.ts +126 -5
- package/dist/generated/device-proxy.d.ts.map +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts.map +1 -1
- package/dist/generated/provider-kind-map.d.ts +1 -1
- package/dist/generated/provider-kind-map.d.ts.map +1 -1
- package/dist/generated/system-proxy.d.ts +10 -8
- package/dist/generated/system-proxy.d.ts.map +1 -1
- package/dist/{index-C2zzIDdX.mjs → index-BxWo3b49.mjs} +4714 -1113
- package/dist/index-BxWo3b49.mjs.map +1 -0
- package/dist/{index-DnpdVFKv.js → index-CGMPfVaT.js} +4321 -720
- package/dist/index-CGMPfVaT.js.map +1 -0
- package/dist/index.d.ts +22 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1384 -116
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1698 -430
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/addon-data-plane.d.ts +76 -0
- package/dist/interfaces/addon-data-plane.d.ts.map +1 -0
- package/dist/interfaces/addon.d.ts +60 -0
- package/dist/interfaces/addon.d.ts.map +1 -1
- package/dist/interfaces/advanced-notifier.d.ts +4 -0
- package/dist/interfaces/advanced-notifier.d.ts.map +1 -1
- package/dist/interfaces/capability.d.ts +42 -1
- package/dist/interfaces/capability.d.ts.map +1 -1
- package/dist/interfaces/config-ui.d.ts +70 -6
- package/dist/interfaces/config-ui.d.ts.map +1 -1
- package/dist/interfaces/device-capabilities/camera.d.ts +2 -1
- package/dist/interfaces/device-capabilities/camera.d.ts.map +1 -1
- package/dist/interfaces/event-bus.d.ts +49 -3
- package/dist/interfaces/event-bus.d.ts.map +1 -1
- package/dist/interfaces/kernel-abstractions.d.ts +10 -1
- package/dist/interfaces/kernel-abstractions.d.ts.map +1 -1
- package/dist/interfaces/network-quality.d.ts +8 -0
- package/dist/interfaces/network-quality.d.ts.map +1 -1
- package/dist/interfaces/pipeline-executor-capability.d.ts +2 -2
- package/dist/interfaces/pipeline-orchestrator-capability.d.ts +2 -1
- package/dist/interfaces/pipeline-orchestrator-capability.d.ts.map +1 -1
- package/dist/interfaces/pipeline-runner-capability.d.ts +7 -0
- package/dist/interfaces/pipeline-runner-capability.d.ts.map +1 -1
- package/dist/interfaces/recording-config-migrate.d.ts +13 -0
- package/dist/interfaces/recording-config-migrate.d.ts.map +1 -0
- package/dist/interfaces/recording-config.d.ts +209 -0
- package/dist/interfaces/recording-config.d.ts.map +1 -0
- package/dist/interfaces/rtp-egress.d.ts +2 -3
- package/dist/interfaces/rtp-egress.d.ts.map +1 -1
- package/dist/interfaces/storage-location-declaration.d.ts +34 -0
- package/dist/interfaces/storage-location-declaration.d.ts.map +1 -0
- package/dist/interfaces/storage-location.d.ts +19 -74
- package/dist/interfaces/storage-location.d.ts.map +1 -1
- package/dist/interfaces/storage.d.ts +15 -4
- package/dist/interfaces/storage.d.ts.map +1 -1
- package/dist/interfaces/stream-broker.d.ts +18 -3
- package/dist/interfaces/stream-broker.d.ts.map +1 -1
- package/dist/interfaces/timezones.d.ts +59 -0
- package/dist/interfaces/timezones.d.ts.map +1 -0
- package/dist/node.d.ts +3 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +50 -8
- package/dist/node.js.map +1 -1
- package/dist/node.mjs +51 -9
- package/dist/node.mjs.map +1 -1
- package/dist/storage/filesystem-storage-provider.d.ts +2 -1
- package/dist/storage/filesystem-storage-provider.d.ts.map +1 -1
- package/dist/stream-selection.d.ts +85 -0
- package/dist/stream-selection.d.ts.map +1 -0
- package/dist/types/detection.d.ts +3 -3
- package/dist/types/io.d.ts +1 -1
- package/dist/types/io.d.ts.map +1 -1
- package/dist/util/location-match.d.ts +15 -0
- package/dist/util/location-match.d.ts.map +1 -0
- package/dist/utils/canonical-hash.d.ts +20 -0
- package/dist/utils/canonical-hash.d.ts.map +1 -0
- package/dist/utils/export-reconciler.d.ts +101 -0
- package/dist/utils/export-reconciler.d.ts.map +1 -0
- package/dist/utils/sleep.d.ts +36 -0
- package/dist/utils/sleep.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/capabilities/recording-engine.cap.d.ts +0 -477
- package/dist/capabilities/recording-engine.cap.d.ts.map +0 -1
- package/dist/index-C2zzIDdX.mjs.map +0 -1
- package/dist/index-DnpdVFKv.js.map +0 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
import { DeviceType } from '../device/device-type.js';
|
|
4
|
+
/**
|
|
5
|
+
* Generic boolean sensor — last-resort fallback when no domain-
|
|
6
|
+
* specific binary cap fits (Home Assistant `binary_sensor` without a
|
|
7
|
+
* known `device_class`, or a domain we haven't typed yet). Pure
|
|
8
|
+
* pass-through: just the bool + timestamp. Push-driven.
|
|
9
|
+
*
|
|
10
|
+
* Prefer the typed alternatives (`contact`, `flood`, `smoke`,
|
|
11
|
+
* `carbon-monoxide`, `gas`, `tamper`, `vibration`, `connectivity`,
|
|
12
|
+
* `motion`) when the semantics match — export adapters render those
|
|
13
|
+
* with the right HomeKit / Alexa display category.
|
|
14
|
+
*/
|
|
15
|
+
export declare const BinaryStatusSchema: z.ZodObject<{
|
|
16
|
+
on: z.ZodBoolean;
|
|
17
|
+
lastChangedAt: z.ZodNumber;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type BinaryStatus = z.infer<typeof BinaryStatusSchema>;
|
|
20
|
+
export declare const binaryCapability: {
|
|
21
|
+
readonly name: "binary";
|
|
22
|
+
readonly scope: "device";
|
|
23
|
+
readonly deviceNative: true;
|
|
24
|
+
readonly mode: "singleton";
|
|
25
|
+
readonly deviceTypes: readonly [DeviceType.Sensor];
|
|
26
|
+
readonly methods: {};
|
|
27
|
+
readonly status: {
|
|
28
|
+
readonly schema: z.ZodObject<{
|
|
29
|
+
on: z.ZodBoolean;
|
|
30
|
+
lastChangedAt: z.ZodNumber;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
readonly kind: "push";
|
|
33
|
+
};
|
|
34
|
+
readonly runtimeState: z.ZodObject<{
|
|
35
|
+
on: z.ZodBoolean;
|
|
36
|
+
lastChangedAt: z.ZodNumber;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
};
|
|
39
|
+
export type IBinaryProvider = InferProvider<typeof binaryCapability>;
|
|
40
|
+
//# sourceMappingURL=binary.cap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"binary.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/binary.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAA6B,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB;;;iBAI7B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;CAYY,CAAA;AAEzC,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|
|
@@ -4,8 +4,8 @@ import { DeviceType } from '../device/device-type.js';
|
|
|
4
4
|
/**
|
|
5
5
|
* Dimmable-light brightness control. Co-exists with `switch` on the
|
|
6
6
|
* same device — the switch toggles on/off, this cap sets the level
|
|
7
|
-
* applied when the light is on.
|
|
8
|
-
*
|
|
7
|
+
* applied when the light is on. Drivers map their per-vendor dim
|
|
8
|
+
* controls to this single-method surface.
|
|
9
9
|
*
|
|
10
10
|
* The cap is intentionally minimal: a single `setBrightness({deviceId,
|
|
11
11
|
* percentage})` mutation plus the auto-injected `getStatus`. Drivers
|
|
@@ -21,6 +21,7 @@ export type BrightnessStatus = z.infer<typeof BrightnessStatusSchema>;
|
|
|
21
21
|
export declare const brightnessCapability: {
|
|
22
22
|
readonly name: "brightness";
|
|
23
23
|
readonly scope: "device";
|
|
24
|
+
readonly deviceNative: true;
|
|
24
25
|
readonly mode: "singleton";
|
|
25
26
|
readonly deviceTypes: readonly [DeviceType.Light];
|
|
26
27
|
readonly methods: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brightness.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/brightness.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB;;;iBAKjC,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"brightness.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/brightness.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB;;;iBAKjC,CAAA;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;QAiB7B;;;;WAIG;;;;;;;;;;;;;;;;IAWL;;;;OAIG;;;;;CAEoC,CAAA;AAEzC,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC,OAAO,oBAAoB,CAAC,CAAA"}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
/**
|
|
4
|
+
* `broker` — unified pub/sub broker registry, system-scoped collection.
|
|
5
|
+
*
|
|
6
|
+
* The cap models any kind-tagged message broker the user wants to
|
|
7
|
+
* register and that other addons might consume. The first two kinds
|
|
8
|
+
* are MQTT (mosquitto / aedes embedded / cloud bridge) and
|
|
9
|
+
* Home Assistant (HA WebSocket — subscribe_entities + call_service).
|
|
10
|
+
* Future kinds (Zigbee2MQTT bridge, ZHA, KNX, Telegram, …) plug in
|
|
11
|
+
* the same surface.
|
|
12
|
+
*
|
|
13
|
+
* Why one cap, not one cap per kind:
|
|
14
|
+
* - The integrations page wants a single table of "every broker"
|
|
15
|
+
* across kinds; a unified cap drives it without join logic.
|
|
16
|
+
* - Generic admin operations (add / remove / test / status) are
|
|
17
|
+
* identical across kinds — duplicating them per cap was busywork.
|
|
18
|
+
* - The `network-access` cap precedent: same interface, many
|
|
19
|
+
* `providerKind: 'ingress'` implementations (Tailscale, ngrok, …).
|
|
20
|
+
*
|
|
21
|
+
* What stays kind-specific:
|
|
22
|
+
* - `getBrokerConfig` payload (kind decides whether it returns
|
|
23
|
+
* mqtt URL+creds, HA baseUrl+token, …) — typed as
|
|
24
|
+
* `Record<string, unknown>` at the wire; consumers narrow.
|
|
25
|
+
* - `publish` / `subscribe` / `getState` arguments (target / filter /
|
|
26
|
+
* key) — also typed as `Record<string, unknown>` so each kind can
|
|
27
|
+
* evolve its surface (MQTT topic+qos vs HA entity_id+domain)
|
|
28
|
+
* without rebreaking the cap signature.
|
|
29
|
+
* - `add` `settings` payload (different fields per kind, validated by
|
|
30
|
+
* the kind-specific provider).
|
|
31
|
+
*
|
|
32
|
+
* Bidirectionality:
|
|
33
|
+
* - `publish` is RPC — synchronous result (provider-defined).
|
|
34
|
+
* - `subscribe` returns a subscription handle; the actual message
|
|
35
|
+
* stream flows over the typed event-bus as `broker.message` events
|
|
36
|
+
* keyed by `(brokerId, subscriptionId)`. Consumers filter in their
|
|
37
|
+
* event handler. Subscriptions persist across reconnects — the
|
|
38
|
+
* provider re-subscribes upstream after a transport drop.
|
|
39
|
+
*
|
|
40
|
+
* Why event-bus push (not a subscription RPC stream):
|
|
41
|
+
* - Matches the rest of CamStack's D8 contract — events for telemetry,
|
|
42
|
+
* RPC for loss-is-a-bug. Broker messages are telemetry (a single
|
|
43
|
+
* drop is recoverable via `getState({key})`).
|
|
44
|
+
* - Frees `broker.subscribe` from holding a long-lived RPC channel.
|
|
45
|
+
* - Cross-process: events already route through `$event-bus`; no
|
|
46
|
+
* per-broker wire-shaping needed.
|
|
47
|
+
*/
|
|
48
|
+
export declare const BrokerStatusEnum: z.ZodEnum<{
|
|
49
|
+
error: "error";
|
|
50
|
+
unreachable: "unreachable";
|
|
51
|
+
connecting: "connecting";
|
|
52
|
+
connected: "connected";
|
|
53
|
+
disconnected: "disconnected";
|
|
54
|
+
"auth-failed": "auth-failed";
|
|
55
|
+
}>;
|
|
56
|
+
export type BrokerStatus = z.infer<typeof BrokerStatusEnum>;
|
|
57
|
+
declare const BrokerInfoSchema: z.ZodObject<{
|
|
58
|
+
id: z.ZodString;
|
|
59
|
+
addonId: z.ZodString;
|
|
60
|
+
name: z.ZodString;
|
|
61
|
+
kind: z.ZodString;
|
|
62
|
+
status: z.ZodEnum<{
|
|
63
|
+
error: "error";
|
|
64
|
+
unreachable: "unreachable";
|
|
65
|
+
connecting: "connecting";
|
|
66
|
+
connected: "connected";
|
|
67
|
+
disconnected: "disconnected";
|
|
68
|
+
"auth-failed": "auth-failed";
|
|
69
|
+
}>;
|
|
70
|
+
info: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
71
|
+
lastCheckedAt: z.ZodNullable<z.ZodNumber>;
|
|
72
|
+
error: z.ZodNullable<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
export type BrokerInfo = z.infer<typeof BrokerInfoSchema>;
|
|
75
|
+
declare const RegistryStatusSchema: z.ZodObject<{
|
|
76
|
+
brokerCount: z.ZodNumber;
|
|
77
|
+
connectedCount: z.ZodNumber;
|
|
78
|
+
}, z.core.$strip>;
|
|
79
|
+
/**
|
|
80
|
+
* One entry per `broker` provider — which addon provides which broker
|
|
81
|
+
* kind(s). The unified create picker reads this to know, for each
|
|
82
|
+
* (addonId, kind) pair the operator can pick, where to route the
|
|
83
|
+
* follow-up `getSettingsSchema` / `testSettings` / `add` calls (via the
|
|
84
|
+
* `{ addonId }` selector). A provider only advertises a kind here when
|
|
85
|
+
* it implements `getSettingsSchema` for that kind (so the picker never
|
|
86
|
+
* offers a kind whose creation form can't be rendered).
|
|
87
|
+
*/
|
|
88
|
+
declare const BrokerProviderInfoSchema: z.ZodObject<{
|
|
89
|
+
addonId: z.ZodString;
|
|
90
|
+
kinds: z.ZodArray<z.ZodObject<{
|
|
91
|
+
kind: z.ZodString;
|
|
92
|
+
label: z.ZodString;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export type BrokerProviderInfo = z.infer<typeof BrokerProviderInfoSchema>;
|
|
96
|
+
declare const AddInputSchema: z.ZodObject<{
|
|
97
|
+
kind: z.ZodString;
|
|
98
|
+
name: z.ZodString;
|
|
99
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
declare const TestConnectionResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
102
|
+
ok: z.ZodLiteral<true>;
|
|
103
|
+
latencyMs: z.ZodNumber;
|
|
104
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
105
|
+
ok: z.ZodLiteral<false>;
|
|
106
|
+
error: z.ZodString;
|
|
107
|
+
}, z.core.$strip>], "ok">;
|
|
108
|
+
declare const SettingsSchemaInputSchema: z.ZodObject<{
|
|
109
|
+
kind: z.ZodString;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
declare const TestSettingsInputSchema: z.ZodObject<{
|
|
112
|
+
kind: z.ZodString;
|
|
113
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
114
|
+
}, z.core.$strip>;
|
|
115
|
+
declare const TestSettingsResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
116
|
+
ok: z.ZodLiteral<true>;
|
|
117
|
+
latencyMs: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
119
|
+
ok: z.ZodLiteral<false>;
|
|
120
|
+
error: z.ZodString;
|
|
121
|
+
}, z.core.$strip>], "ok">;
|
|
122
|
+
declare const PublishInputSchema: z.ZodObject<{
|
|
123
|
+
brokerId: z.ZodString;
|
|
124
|
+
target: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
125
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
declare const SubscribeInputSchema: z.ZodObject<{
|
|
128
|
+
brokerId: z.ZodString;
|
|
129
|
+
filter: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
declare const SubscribeResultSchema: z.ZodObject<{
|
|
132
|
+
subscriptionId: z.ZodString;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
declare const UnsubscribeInputSchema: z.ZodObject<{
|
|
135
|
+
brokerId: z.ZodString;
|
|
136
|
+
subscriptionId: z.ZodString;
|
|
137
|
+
}, z.core.$strip>;
|
|
138
|
+
declare const GetStateInputSchema: z.ZodObject<{
|
|
139
|
+
brokerId: z.ZodString;
|
|
140
|
+
key: z.ZodString;
|
|
141
|
+
}, z.core.$strip>;
|
|
142
|
+
export declare const brokerCapability: {
|
|
143
|
+
readonly name: "broker";
|
|
144
|
+
readonly scope: "system";
|
|
145
|
+
readonly mode: "collection";
|
|
146
|
+
readonly providerKind: "broker";
|
|
147
|
+
readonly status: {
|
|
148
|
+
readonly schema: z.ZodObject<{
|
|
149
|
+
brokerCount: z.ZodNumber;
|
|
150
|
+
connectedCount: z.ZodNumber;
|
|
151
|
+
}, z.core.$strip>;
|
|
152
|
+
readonly kind: "poll";
|
|
153
|
+
};
|
|
154
|
+
readonly methods: {
|
|
155
|
+
readonly list: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
156
|
+
kind: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
158
|
+
id: z.ZodString;
|
|
159
|
+
addonId: z.ZodString;
|
|
160
|
+
name: z.ZodString;
|
|
161
|
+
kind: z.ZodString;
|
|
162
|
+
status: z.ZodEnum<{
|
|
163
|
+
error: "error";
|
|
164
|
+
unreachable: "unreachable";
|
|
165
|
+
connecting: "connecting";
|
|
166
|
+
connected: "connected";
|
|
167
|
+
disconnected: "disconnected";
|
|
168
|
+
"auth-failed": "auth-failed";
|
|
169
|
+
}>;
|
|
170
|
+
info: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
171
|
+
lastCheckedAt: z.ZodNullable<z.ZodNumber>;
|
|
172
|
+
error: z.ZodNullable<z.ZodString>;
|
|
173
|
+
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
174
|
+
readonly get: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
175
|
+
id: z.ZodString;
|
|
176
|
+
}, z.core.$strip>, z.ZodNullable<z.ZodObject<{
|
|
177
|
+
id: z.ZodString;
|
|
178
|
+
addonId: z.ZodString;
|
|
179
|
+
name: z.ZodString;
|
|
180
|
+
kind: z.ZodString;
|
|
181
|
+
status: z.ZodEnum<{
|
|
182
|
+
error: "error";
|
|
183
|
+
unreachable: "unreachable";
|
|
184
|
+
connecting: "connecting";
|
|
185
|
+
connected: "connected";
|
|
186
|
+
disconnected: "disconnected";
|
|
187
|
+
"auth-failed": "auth-failed";
|
|
188
|
+
}>;
|
|
189
|
+
info: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
190
|
+
lastCheckedAt: z.ZodNullable<z.ZodNumber>;
|
|
191
|
+
error: z.ZodNullable<z.ZodString>;
|
|
192
|
+
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
193
|
+
/** Enumerate which addon provides which broker kind(s) for the
|
|
194
|
+
* unified create picker. The auto-mount fans this array across
|
|
195
|
+
* every registered `broker` provider (array-output method), so the
|
|
196
|
+
* picker sees every kind from every provider in one call. */
|
|
197
|
+
readonly listProviders: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodArray<z.ZodObject<{
|
|
198
|
+
addonId: z.ZodString;
|
|
199
|
+
kinds: z.ZodArray<z.ZodObject<{
|
|
200
|
+
kind: z.ZodString;
|
|
201
|
+
label: z.ZodString;
|
|
202
|
+
}, z.core.$strip>>;
|
|
203
|
+
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
204
|
+
readonly add: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
205
|
+
kind: z.ZodString;
|
|
206
|
+
name: z.ZodString;
|
|
207
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
208
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
}, z.core.$strip>, "mutation">;
|
|
211
|
+
readonly remove: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
212
|
+
id: z.ZodString;
|
|
213
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
214
|
+
readonly testConnection: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
215
|
+
id: z.ZodString;
|
|
216
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
217
|
+
ok: z.ZodLiteral<true>;
|
|
218
|
+
latencyMs: z.ZodNumber;
|
|
219
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
220
|
+
ok: z.ZodLiteral<false>;
|
|
221
|
+
error: z.ZodString;
|
|
222
|
+
}, z.core.$strip>], "ok">, "mutation">;
|
|
223
|
+
/** Read the persisted settings record for a broker (kind-specific
|
|
224
|
+
* shape). Admin-only — settings may contain secrets. Returns `null`
|
|
225
|
+
* when the broker id is unknown to the provider (the collection
|
|
226
|
+
* fallback may route a foreign id to the first provider). */
|
|
227
|
+
readonly getSettings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
228
|
+
id: z.ZodString;
|
|
229
|
+
}, z.core.$strip>, z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
230
|
+
/** Overwrite the persisted settings record. The kind-specific
|
|
231
|
+
* provider validates the shape and applies the change (reconnects
|
|
232
|
+
* if credentials changed). */
|
|
233
|
+
readonly setSettings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
234
|
+
id: z.ZodString;
|
|
235
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
236
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
237
|
+
/** Returns the kind-specific connection config the consumer needs
|
|
238
|
+
* to open its own client (MQTT pattern: `{url, username, password,
|
|
239
|
+
* clientIdPrefix}`). HA providers MAY return the auth envelope
|
|
240
|
+
* but typical HA consumers use `publish` / `subscribe` instead.
|
|
241
|
+
* Returns `null` when the broker id is unknown to the provider. */
|
|
242
|
+
readonly getBrokerConfig: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
243
|
+
id: z.ZodString;
|
|
244
|
+
}, z.core.$strip>, z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
245
|
+
readonly getSettingsSchema: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
246
|
+
kind: z.ZodString;
|
|
247
|
+
}, z.core.$strip>, z.ZodNullable<z.ZodUnknown>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
248
|
+
readonly testSettings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
249
|
+
kind: z.ZodString;
|
|
250
|
+
settings: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
251
|
+
}, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
252
|
+
ok: z.ZodLiteral<true>;
|
|
253
|
+
latencyMs: z.ZodOptional<z.ZodNumber>;
|
|
254
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
255
|
+
ok: z.ZodLiteral<false>;
|
|
256
|
+
error: z.ZodString;
|
|
257
|
+
}, z.core.$strip>], "ok">, "mutation">;
|
|
258
|
+
readonly publish: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
259
|
+
brokerId: z.ZodString;
|
|
260
|
+
target: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
261
|
+
payload: z.ZodOptional<z.ZodUnknown>;
|
|
262
|
+
}, z.core.$strip>, z.ZodUnknown, "mutation">;
|
|
263
|
+
readonly subscribe: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
264
|
+
brokerId: z.ZodString;
|
|
265
|
+
filter: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
266
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
267
|
+
subscriptionId: z.ZodString;
|
|
268
|
+
}, z.core.$strip>, "mutation">;
|
|
269
|
+
readonly unsubscribe: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
270
|
+
brokerId: z.ZodString;
|
|
271
|
+
subscriptionId: z.ZodString;
|
|
272
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
273
|
+
/** Read the broker's cached state for a key. Returns `null` when
|
|
274
|
+
* unknown to the broker (never published / unknown entity). */
|
|
275
|
+
readonly getState: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
276
|
+
brokerId: z.ZodString;
|
|
277
|
+
key: z.ZodString;
|
|
278
|
+
}, z.core.$strip>, z.ZodNullable<z.ZodUnknown>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
279
|
+
/** Status method — explicit registration with a `z.void()` input so
|
|
280
|
+
* the codegen-generated tRPC router types its input as
|
|
281
|
+
* `{addonId?: string, nodeId?: string}` (system-scoped collection
|
|
282
|
+
* shape) instead of the device-scoped `{deviceId}` fallback. */
|
|
283
|
+
readonly getStatus: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
|
|
284
|
+
brokerCount: z.ZodNumber;
|
|
285
|
+
connectedCount: z.ZodNumber;
|
|
286
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
export type IBrokerProvider = InferProvider<typeof brokerCapability>;
|
|
290
|
+
export { BrokerInfoSchema, BrokerProviderInfoSchema, RegistryStatusSchema as BrokerRegistryStatusSchema, TestConnectionResultSchema as BrokerTestConnectionResultSchema, PublishInputSchema as BrokerPublishInputSchema, SubscribeInputSchema as BrokerSubscribeInputSchema, SubscribeResultSchema as BrokerSubscribeResultSchema, UnsubscribeInputSchema as BrokerUnsubscribeInputSchema, GetStateInputSchema as BrokerGetStateInputSchema, AddInputSchema as BrokerAddInputSchema, SettingsSchemaInputSchema as BrokerSettingsSchemaInputSchema, TestSettingsInputSchema as BrokerTestSettingsInputSchema, TestSettingsResultSchema as BrokerTestSettingsResultSchema, };
|
|
291
|
+
//# sourceMappingURL=broker.cap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"broker.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/broker.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAElG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,eAAO,MAAM,gBAAgB;;;;;;;EAO3B,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE3D,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;iBA2BpB,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,QAAA,MAAM,oBAAoB;;;iBAGxB,CAAA;AAEF;;;;;;;;GAQG;AACH,QAAA,MAAM,wBAAwB;;;;;;iBAK5B,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAUzE,QAAA,MAAM,cAAc;;;;iBAOlB,CAAA;AAMF,QAAA,MAAM,0BAA0B;;;;;;yBAG9B,CAAA;AAIF,QAAA,MAAM,yBAAyB;;iBAAiC,CAAA;AAChE,QAAA,MAAM,uBAAuB;;;iBAG3B,CAAA;AACF,QAAA,MAAM,wBAAwB;;;;;;yBAK5B,CAAA;AAIF,QAAA,MAAM,kBAAkB;;;;iBAUtB,CAAA;AAEF,QAAA,MAAM,oBAAoB;;;iBAMxB,CAAA;AAEF,QAAA,MAAM,qBAAqB;;iBAIzB,CAAA;AAEF,QAAA,MAAM,sBAAsB;;;iBAG1B,CAAA;AAEF,QAAA,MAAM,mBAAmB;;;iBAMvB,CAAA;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAUzB;;;sEAG8D;;;;;;;;;;;;;;;;;;;;;;;;;;;QAO9D;;;sEAG8D;;;;QAE9D;;uCAE+B;;;;;QAQ/B;;;;4EAIoE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAYpE;wEACgE;;;;;QAGhE;;;yEAGiE;;;;;;CAG5B,CAAA;AAEzC,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEpE,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,IAAI,0BAA0B,EAClD,0BAA0B,IAAI,gCAAgC,EAC9D,kBAAkB,IAAI,wBAAwB,EAC9C,oBAAoB,IAAI,0BAA0B,EAClD,qBAAqB,IAAI,2BAA2B,EACpD,sBAAsB,IAAI,4BAA4B,EACtD,mBAAmB,IAAI,yBAAyB,EAChD,cAAc,IAAI,oBAAoB,EACtC,yBAAyB,IAAI,+BAA+B,EAC5D,uBAAuB,IAAI,6BAA6B,EACxD,wBAAwB,IAAI,8BAA8B,GAC3D,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
import { DeviceType } from '../device/device-type.js';
|
|
4
|
+
/**
|
|
5
|
+
* button — device-scoped capability for HA `button.*` / `input_button.*`
|
|
6
|
+
* fire-only actuators. A button entity has no readable state — pressing it
|
|
7
|
+
* triggers an action on the HA side. There is no `status` / `runtimeState`:
|
|
8
|
+
* nothing to poll, nothing to subscribe to.
|
|
9
|
+
*
|
|
10
|
+
* Usage: the admin UI renders a single "Press" affordance. The provider calls
|
|
11
|
+
* the HA `button.press` (or `input_button.press`) service. The domain is
|
|
12
|
+
* derived from the entity_id prefix at runtime.
|
|
13
|
+
*/
|
|
14
|
+
export declare const buttonCapability: {
|
|
15
|
+
readonly name: "button";
|
|
16
|
+
readonly scope: "device";
|
|
17
|
+
readonly deviceNative: true;
|
|
18
|
+
readonly mode: "singleton";
|
|
19
|
+
readonly deviceTypes: readonly [DeviceType.Button];
|
|
20
|
+
readonly methods: {
|
|
21
|
+
readonly press: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
22
|
+
deviceId: z.ZodNumber;
|
|
23
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export type IButtonProvider = InferProvider<typeof buttonCapability>;
|
|
27
|
+
//# sourceMappingURL=button.cap.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/button.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;CAaY,CAAA;AAEzC,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC,OAAO,gBAAgB,CAAC,CAAA"}
|
|
@@ -62,6 +62,7 @@ export type CameraCredentialsStatus = z.infer<typeof CameraCredentialsStatusSche
|
|
|
62
62
|
export declare const cameraCredentialsCapability: {
|
|
63
63
|
readonly name: "camera-credentials";
|
|
64
64
|
readonly scope: "device";
|
|
65
|
+
readonly deviceNative: true;
|
|
65
66
|
readonly mode: "singleton";
|
|
66
67
|
readonly deviceTypes: readonly [DeviceType.Camera];
|
|
67
68
|
readonly methods: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera-credentials.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/camera-credentials.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;iBAiBlC,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;iBASxC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEnF,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"camera-credentials.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/camera-credentials.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAAqC,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;iBAiBlC,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;iBASxC,CAAA;AAEF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEnF,eAAO,MAAM,2BAA2B;;;;;;;QAOpC;;;;;WAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWkC,CAAA;AAEzC,MAAM,MAAM,0BAA0B,GAAG,aAAa,CAAC,OAAO,2BAA2B,CAAC,CAAA"}
|
|
@@ -1,6 +1,56 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { type InferProvider } from './capability-definition.js';
|
|
3
3
|
import { DeviceType } from '../device/device-type.js';
|
|
4
|
+
export declare const StreamCodecSchema: z.ZodEnum<{
|
|
5
|
+
h264: "h264";
|
|
6
|
+
h265: "h265";
|
|
7
|
+
hevc: "hevc";
|
|
8
|
+
mjpeg: "mjpeg";
|
|
9
|
+
av1: "av1";
|
|
10
|
+
vp8: "vp8";
|
|
11
|
+
vp9: "vp9";
|
|
12
|
+
}>;
|
|
13
|
+
export type StreamCodec = z.infer<typeof StreamCodecSchema>;
|
|
14
|
+
export declare const PickStreamRequirementsSchema: z.ZodReadonly<z.ZodObject<{
|
|
15
|
+
acceptCodecs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
16
|
+
h264: "h264";
|
|
17
|
+
h265: "h265";
|
|
18
|
+
hevc: "hevc";
|
|
19
|
+
mjpeg: "mjpeg";
|
|
20
|
+
av1: "av1";
|
|
21
|
+
vp8: "vp8";
|
|
22
|
+
vp9: "vp9";
|
|
23
|
+
}>>>>;
|
|
24
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
excludeDerived: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
requireSiblingCodec: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
28
|
+
h264: "h264";
|
|
29
|
+
h265: "h265";
|
|
30
|
+
hevc: "hevc";
|
|
31
|
+
mjpeg: "mjpeg";
|
|
32
|
+
av1: "av1";
|
|
33
|
+
vp8: "vp8";
|
|
34
|
+
vp9: "vp9";
|
|
35
|
+
}>>>>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
export declare const PickStreamPreferencesSchema: z.ZodReadonly<z.ZodObject<{
|
|
38
|
+
preferredProviders: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
39
|
+
resolutionPreference: z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
highest: "highest";
|
|
41
|
+
lowest: "lowest";
|
|
42
|
+
}>>;
|
|
43
|
+
}, z.core.$strip>>;
|
|
44
|
+
export declare const PickedCamStreamSchema: z.ZodObject<{
|
|
45
|
+
camStreamId: z.ZodString;
|
|
46
|
+
codec: z.ZodOptional<z.ZodString>;
|
|
47
|
+
resolution: z.ZodOptional<z.ZodObject<{
|
|
48
|
+
width: z.ZodNumber;
|
|
49
|
+
height: z.ZodNumber;
|
|
50
|
+
}, z.core.$strip>>;
|
|
51
|
+
reason: z.ZodString;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type PickedCamStream = z.infer<typeof PickedCamStreamSchema>;
|
|
4
54
|
/**
|
|
5
55
|
* Camera streams — device-scoped facade over the system `stream-broker`.
|
|
6
56
|
*
|
|
@@ -38,6 +88,7 @@ export declare const cameraStreamsCapability: {
|
|
|
38
88
|
"pull-http": "pull-http";
|
|
39
89
|
"pull-rfc4571": "pull-rfc4571";
|
|
40
90
|
"push-annexb": "push-annexb";
|
|
91
|
+
derived: "derived";
|
|
41
92
|
}>;
|
|
42
93
|
url: z.ZodOptional<z.ZodString>;
|
|
43
94
|
codec: z.ZodOptional<z.ZodString>;
|
|
@@ -78,17 +129,16 @@ export declare const cameraStreamsCapability: {
|
|
|
78
129
|
errorMessage: z.ZodOptional<z.ZodString>;
|
|
79
130
|
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
80
131
|
/**
|
|
81
|
-
* Per-device RTSP restream entries
|
|
82
|
-
* RTSP
|
|
83
|
-
* including the rendered `url` field with the RTSP token applied.
|
|
84
|
-
* Consumers (snapshot wrapper, recording, external probes) use this
|
|
85
|
-
* to pick a stream URL without scanning the whole cluster.
|
|
132
|
+
* Per-device RAW RTSP restream entries — one per published camStream
|
|
133
|
+
* that has RTSP restream enabled (`native:main`, `rtsp:sub`, …).
|
|
86
134
|
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
135
|
+
* LIVE-VIEW ONLY. This is the surface the device-details stream
|
|
136
|
+
* picker uses so an operator can hit each physical stream directly.
|
|
137
|
+
* Programmatic / external consumers (HAP, Alexa, ha-mqtt, recording)
|
|
138
|
+
* MUST use `getProfileRtspEntries` instead — picking from raw
|
|
139
|
+
* variants makes two consumers of the same camera land on two
|
|
140
|
+
* different physical pulls (e.g. Reolink `native:main` vs
|
|
141
|
+
* `rtsp:main`) and trips the camera's concurrent-session limit.
|
|
92
142
|
*/
|
|
93
143
|
readonly getRtspEntries: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
94
144
|
deviceId: z.ZodNumber;
|
|
@@ -98,7 +148,93 @@ export declare const cameraStreamsCapability: {
|
|
|
98
148
|
url: z.ZodString;
|
|
99
149
|
mutedUrl: z.ZodString;
|
|
100
150
|
enabled: z.ZodBoolean;
|
|
151
|
+
codec: z.ZodOptional<z.ZodString>;
|
|
152
|
+
resolution: z.ZodOptional<z.ZodObject<{
|
|
153
|
+
width: z.ZodNumber;
|
|
154
|
+
height: z.ZodNumber;
|
|
155
|
+
}, z.core.$strip>>;
|
|
101
156
|
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
157
|
+
/**
|
|
158
|
+
* Per-device PROFILE RTSP restream entries — one per ASSIGNED
|
|
159
|
+
* profile slot (high/mid/low). Each entry's `url` is a profile-keyed
|
|
160
|
+
* broker restream that aliases the profile's assigned source broker,
|
|
161
|
+
* so HAP / Alexa / recording / WebRTC all converge on the broker's
|
|
162
|
+
* single on-demand pull for that profile. This is the supported
|
|
163
|
+
* exporter-facing surface; the raw `getRtspEntries` is live-view
|
|
164
|
+
* only. Returns `[]` for a device with no assigned profiles
|
|
165
|
+
* (cold-start before first publish).
|
|
166
|
+
*/
|
|
167
|
+
readonly getProfileRtspEntries: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
168
|
+
deviceId: z.ZodNumber;
|
|
169
|
+
hostname: z.ZodOptional<z.ZodString>;
|
|
170
|
+
}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
171
|
+
profile: z.ZodEnum<{
|
|
172
|
+
high: "high";
|
|
173
|
+
mid: "mid";
|
|
174
|
+
low: "low";
|
|
175
|
+
}>;
|
|
176
|
+
brokerId: z.ZodString;
|
|
177
|
+
url: z.ZodString;
|
|
178
|
+
mutedUrl: z.ZodString;
|
|
179
|
+
enabled: z.ZodBoolean;
|
|
180
|
+
codec: z.ZodOptional<z.ZodString>;
|
|
181
|
+
resolution: z.ZodOptional<z.ZodObject<{
|
|
182
|
+
width: z.ZodNumber;
|
|
183
|
+
height: z.ZodNumber;
|
|
184
|
+
}, z.core.$strip>>;
|
|
185
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
186
|
+
/**
|
|
187
|
+
* "Best source stream for these decode constraints". Returns the
|
|
188
|
+
* camStreamId the caller should dial (or null when no stream
|
|
189
|
+
* matches). See `PickStreamRequirementsSchema` for the filter shape
|
|
190
|
+
* and `PickStreamPreferencesSchema` for the ranking inputs.
|
|
191
|
+
*
|
|
192
|
+
* Returning null instructs the caller to fall back to its existing
|
|
193
|
+
* path (derived-broker transcode, profile-slot pick, etc.) — the
|
|
194
|
+
* picker NEVER ranks `derived:*` candidates as a "match" because
|
|
195
|
+
* its whole job is to avoid the transcode.
|
|
196
|
+
*/
|
|
197
|
+
readonly pickStream: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
198
|
+
deviceId: z.ZodNumber;
|
|
199
|
+
requirements: z.ZodReadonly<z.ZodObject<{
|
|
200
|
+
acceptCodecs: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
201
|
+
h264: "h264";
|
|
202
|
+
h265: "h265";
|
|
203
|
+
hevc: "hevc";
|
|
204
|
+
mjpeg: "mjpeg";
|
|
205
|
+
av1: "av1";
|
|
206
|
+
vp8: "vp8";
|
|
207
|
+
vp9: "vp9";
|
|
208
|
+
}>>>>;
|
|
209
|
+
minHeight: z.ZodOptional<z.ZodNumber>;
|
|
210
|
+
minWidth: z.ZodOptional<z.ZodNumber>;
|
|
211
|
+
excludeDerived: z.ZodOptional<z.ZodBoolean>;
|
|
212
|
+
requireSiblingCodec: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
213
|
+
h264: "h264";
|
|
214
|
+
h265: "h265";
|
|
215
|
+
hevc: "hevc";
|
|
216
|
+
mjpeg: "mjpeg";
|
|
217
|
+
av1: "av1";
|
|
218
|
+
vp8: "vp8";
|
|
219
|
+
vp9: "vp9";
|
|
220
|
+
}>>>>;
|
|
221
|
+
}, z.core.$strip>>;
|
|
222
|
+
preferences: z.ZodOptional<z.ZodReadonly<z.ZodObject<{
|
|
223
|
+
preferredProviders: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
224
|
+
resolutionPreference: z.ZodOptional<z.ZodEnum<{
|
|
225
|
+
highest: "highest";
|
|
226
|
+
lowest: "lowest";
|
|
227
|
+
}>>;
|
|
228
|
+
}, z.core.$strip>>>;
|
|
229
|
+
}, z.core.$strip>, z.ZodNullable<z.ZodObject<{
|
|
230
|
+
camStreamId: z.ZodString;
|
|
231
|
+
codec: z.ZodOptional<z.ZodString>;
|
|
232
|
+
resolution: z.ZodOptional<z.ZodObject<{
|
|
233
|
+
width: z.ZodNumber;
|
|
234
|
+
height: z.ZodNumber;
|
|
235
|
+
}, z.core.$strip>>;
|
|
236
|
+
reason: z.ZodString;
|
|
237
|
+
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
102
238
|
};
|
|
103
239
|
readonly events: {
|
|
104
240
|
/** Fires on publishCameraStream / retractCameraStream. */
|
|
@@ -113,6 +249,7 @@ export declare const cameraStreamsCapability: {
|
|
|
113
249
|
"pull-http": "pull-http";
|
|
114
250
|
"pull-rfc4571": "pull-rfc4571";
|
|
115
251
|
"push-annexb": "push-annexb";
|
|
252
|
+
derived: "derived";
|
|
116
253
|
}>;
|
|
117
254
|
url: z.ZodOptional<z.ZodString>;
|
|
118
255
|
codec: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"camera-streams.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/camera-streams.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAA4C,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AACzG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"camera-streams.cap.d.ts","sourceRoot":"","sources":["../../src/capabilities/camera-streams.cap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EAA4C,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAA;AACzG,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAuBrD,eAAO,MAAM,iBAAiB;;;;;;;;EAA8B,CAAA;AAC5D,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;kBA2B5B,CAAA;AAEb,eAAO,MAAM,2BAA2B;;;;;;kBAa3B,CAAA;AAEb,eAAO,MAAM,qBAAqB;;;;;;;;iBAMhC,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAGnE;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAgBhC;;;;;;;;;;;WAWG;;;;;;;;;;;;;;;QASH;;;;;;;;;WASG;;;;;;;;;;;;;;;;;;;;QASH;;;;;;;;;;WAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAWH,0DAA0D;;;;;;;;;;;;;;;;;;;;;;;;;;;QAK1D,wEAAwE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAM1E;;;;;;;;;;;;;;;;;;;;;;OAsBG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAeoC,CAAA;AAEzC,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC,OAAO,uBAAuB,CAAC,CAAA"}
|
|
@@ -253,6 +253,12 @@ export interface CapabilityDefinition<TName extends string = string, TMethods ex
|
|
|
253
253
|
* Ignored unless `kind === 'wrapper'`. Default: `false`.
|
|
254
254
|
*/
|
|
255
255
|
readonly defaultActive?: boolean;
|
|
256
|
+
/** True when this cap is registered PER-DEVICE via `ctx.registerNativeCap`
|
|
257
|
+
* (the provider IS the device), so the tRPC layer must resolve it with
|
|
258
|
+
* `requireDeviceScoped` → `getNativeProvider(capName, deviceId)`. Distinct
|
|
259
|
+
* from `scope:'device'` SYSTEM caps (zones/recording/motion/events) whose
|
|
260
|
+
* single provider dispatches on deviceId internally. Default: undefined/false. */
|
|
261
|
+
readonly deviceNative?: boolean;
|
|
256
262
|
/** Method definitions: name → { input, output } Zod schemas */
|
|
257
263
|
readonly methods: TMethods;
|
|
258
264
|
/** Event definitions: name → { data } Zod schema (optional) */
|
|
@@ -378,6 +384,15 @@ export interface CapabilityDefinition<TName extends string = string, TMethods ex
|
|
|
378
384
|
* cluster roster.
|
|
379
385
|
*/
|
|
380
386
|
readonly nodeIdMode?: 'routing' | 'data';
|
|
387
|
+
/**
|
|
388
|
+
* For `mode: 'singleton'` caps with multiple possible provider addons —
|
|
389
|
+
* the addon id that should be the DEFAULT active provider when no operator
|
|
390
|
+
* preference (`setActiveSingleton`) is set. Makes active-provider selection
|
|
391
|
+
* deterministic instead of registration-order-dependent. Ignored when an
|
|
392
|
+
* operator preference exists (operator choice always wins) and for
|
|
393
|
+
* non-singleton caps.
|
|
394
|
+
*/
|
|
395
|
+
readonly preferredProvider?: string;
|
|
381
396
|
}
|
|
382
397
|
/** Contract for the three methods added by `exposesDeviceSettings: true`. */
|
|
383
398
|
export interface DeviceSettingsContribution {
|