@camstack/types 1.2.152 → 1.2.154
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 +2 -2
- package/dist/addon.mjs +2 -2
- package/dist/capabilities/index.d.ts +5 -1
- package/dist/capabilities/navigation.cap.d.ts +463 -0
- package/dist/capabilities/network-link.cap.d.ts +135 -0
- package/dist/enums/event-category.d.ts +7 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-BaEgqJNv.js → event-category-b8kBSOTT.js} +7 -0
- package/dist/{event-category-BZL-fdNj.mjs → event-category-zAv7pMUz.mjs} +7 -0
- package/dist/generated/addon-api.d.ts +99 -0
- package/dist/generated/cap-status-types.d.ts +5 -1
- package/dist/generated/capability-router-map.d.ts +8 -2
- package/dist/generated/device-local-state.d.ts +6 -0
- package/dist/generated/device-proxy.d.ts +6 -0
- package/dist/generated/device-scoped-caps.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.js +704 -3
- package/dist/index.mjs +685 -4
- package/dist/{sleep-Db7MvrdS.mjs → sleep-CgijQHtG.mjs} +20 -2
- package/dist/{sleep-DVTaZZHP.js → sleep-Dp0uukHR.js} +20 -2
- package/package.json +1 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
import { DeviceType } from '../device/device-type.js';
|
|
4
|
+
/**
|
|
5
|
+
* How a device reaches the network, and how well.
|
|
6
|
+
*
|
|
7
|
+
* NOT `connectivity`: that cap is an UPSTREAM system's binary view of whether
|
|
8
|
+
* an entity is reachable (a Home Assistant `binary_sensor` with
|
|
9
|
+
* `device_class: connectivity`). This one is the device's OWN link — the
|
|
10
|
+
* medium it is on and the signal it sees — the way `battery` is the device's
|
|
11
|
+
* own charge.
|
|
12
|
+
*
|
|
13
|
+
* `'wifi'`, `'ethernet'` and `'cellular'` are links the firmware actually
|
|
14
|
+
* reported. `'unknown'` is the ABSENCE of an answer — the provider has
|
|
15
|
+
* registered the capability but has not read the link yet (D315: unknown is
|
|
16
|
+
* not empty). Consumers skip it rather than draw a wire or a bar.
|
|
17
|
+
*/
|
|
18
|
+
export declare const NETWORK_LINK_TYPES: readonly ["wifi", "ethernet", "cellular", "unknown"];
|
|
19
|
+
export type NetworkLinkType = (typeof NETWORK_LINK_TYPES)[number];
|
|
20
|
+
/**
|
|
21
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
22
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
24
|
+
* one Home Assistant projection.
|
|
25
|
+
*/
|
|
26
|
+
export declare const NetworkLinkStatusSchema: z.ZodObject<{
|
|
27
|
+
type: z.ZodEnum<{
|
|
28
|
+
unknown: "unknown";
|
|
29
|
+
wifi: "wifi";
|
|
30
|
+
ethernet: "ethernet";
|
|
31
|
+
cellular: "cellular";
|
|
32
|
+
}>;
|
|
33
|
+
signalPercent: z.ZodNullable<z.ZodNumber>;
|
|
34
|
+
rssiDbm: z.ZodOptional<z.ZodNumber>;
|
|
35
|
+
ssid: z.ZodOptional<z.ZodString>;
|
|
36
|
+
lastUpdated: z.ZodNumber;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
export type NetworkLinkStatus = z.infer<typeof NetworkLinkStatusSchema>;
|
|
39
|
+
/** The slice a provider seeds before its first read: nothing is known yet. */
|
|
40
|
+
export declare const NETWORK_LINK_UNKNOWN: NetworkLinkStatus;
|
|
41
|
+
/**
|
|
42
|
+
* Normalise a signal the firmware reports as BARS (0..`maxBars`) to 0..100.
|
|
43
|
+
* Out-of-range or non-finite input is not a reading: `null`.
|
|
44
|
+
*/
|
|
45
|
+
export declare function signalPercentFromBars(bars: number | undefined, maxBars: number): number | null;
|
|
46
|
+
/**
|
|
47
|
+
* Normalise an RSSI in dBm to 0..100 on the usual wifi scale: -100 dBm and
|
|
48
|
+
* below is 0 %, -50 dBm and above is 100 %, linear between. Non-finite or
|
|
49
|
+
* positive input is not an RSSI: `null`.
|
|
50
|
+
*/
|
|
51
|
+
export declare function signalPercentFromRssi(rssiDbm: number | undefined): number | null;
|
|
52
|
+
export declare const networkLinkCapability: {
|
|
53
|
+
readonly name: "network-link";
|
|
54
|
+
readonly scope: "device";
|
|
55
|
+
readonly deviceNative: true;
|
|
56
|
+
readonly mode: "singleton";
|
|
57
|
+
readonly deviceTypes: readonly [DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren];
|
|
58
|
+
readonly methods: {};
|
|
59
|
+
readonly events: {
|
|
60
|
+
/**
|
|
61
|
+
* Emitted whenever the cached status changes (a link switch, a signal
|
|
62
|
+
* reading that moved). Mirrored on the parent chain by the
|
|
63
|
+
* DeviceEventPropagator like `battery.onStatusChanged`.
|
|
64
|
+
*/
|
|
65
|
+
readonly onStatusChanged: {
|
|
66
|
+
readonly data: z.ZodObject<{
|
|
67
|
+
deviceId: z.ZodNumber;
|
|
68
|
+
status: z.ZodObject<{
|
|
69
|
+
type: z.ZodEnum<{
|
|
70
|
+
unknown: "unknown";
|
|
71
|
+
wifi: "wifi";
|
|
72
|
+
ethernet: "ethernet";
|
|
73
|
+
cellular: "cellular";
|
|
74
|
+
}>;
|
|
75
|
+
signalPercent: z.ZodNullable<z.ZodNumber>;
|
|
76
|
+
rssiDbm: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
ssid: z.ZodOptional<z.ZodString>;
|
|
78
|
+
lastUpdated: z.ZodNumber;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
readonly status: {
|
|
84
|
+
readonly schema: z.ZodObject<{
|
|
85
|
+
type: z.ZodEnum<{
|
|
86
|
+
unknown: "unknown";
|
|
87
|
+
wifi: "wifi";
|
|
88
|
+
ethernet: "ethernet";
|
|
89
|
+
cellular: "cellular";
|
|
90
|
+
}>;
|
|
91
|
+
signalPercent: z.ZodNullable<z.ZodNumber>;
|
|
92
|
+
rssiDbm: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
ssid: z.ZodOptional<z.ZodString>;
|
|
94
|
+
lastUpdated: z.ZodNumber;
|
|
95
|
+
}, z.core.$strip>;
|
|
96
|
+
readonly kind: "push";
|
|
97
|
+
readonly empty: {
|
|
98
|
+
type: "unknown" | "wifi" | "ethernet" | "cellular";
|
|
99
|
+
signalPercent: number | null;
|
|
100
|
+
lastUpdated: number;
|
|
101
|
+
rssiDbm?: number | undefined;
|
|
102
|
+
ssid?: string | undefined;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Runtime-state slice — every provider stores the same shape under
|
|
107
|
+
* `device.runtimeState['network-link']`, read once by the badge and the
|
|
108
|
+
* Home Assistant projector regardless of the driver.
|
|
109
|
+
*/
|
|
110
|
+
readonly runtimeState: z.ZodObject<{
|
|
111
|
+
type: z.ZodEnum<{
|
|
112
|
+
unknown: "unknown";
|
|
113
|
+
wifi: "wifi";
|
|
114
|
+
ethernet: "ethernet";
|
|
115
|
+
cellular: "cellular";
|
|
116
|
+
}>;
|
|
117
|
+
signalPercent: z.ZodNullable<z.ZodNumber>;
|
|
118
|
+
rssiDbm: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
ssid: z.ZodOptional<z.ZodString>;
|
|
120
|
+
lastUpdated: z.ZodNumber;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
/**
|
|
123
|
+
* Runtime-state durability: **restored** — a link reading is slow to
|
|
124
|
+
* change and a sleeping battery camera may not report for hours; the
|
|
125
|
+
* restored slice is what the badge shows until the next read.
|
|
126
|
+
*
|
|
127
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
128
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
129
|
+
*/
|
|
130
|
+
readonly durability: "restored";
|
|
131
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
132
|
+
* whether persisting is worth a SQLite commit. */
|
|
133
|
+
readonly volatileStateFields: readonly ["lastUpdated"];
|
|
134
|
+
};
|
|
135
|
+
export type INetworkLinkProvider = InferProvider<typeof networkLinkCapability>;
|
|
@@ -368,6 +368,13 @@ export declare enum EventCategory {
|
|
|
368
368
|
* polling `batteryCapability.getStatus`.
|
|
369
369
|
*/
|
|
370
370
|
BatteryOnStatusChanged = "battery.onStatusChanged",
|
|
371
|
+
/**
|
|
372
|
+
* Cap event fired by every device that registers the `network-link`
|
|
373
|
+
* capability. Mirrors the cap definition's `onStatusChanged`. Carries
|
|
374
|
+
* `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
|
|
375
|
+
* reading that moved.
|
|
376
|
+
*/
|
|
377
|
+
NetworkLinkOnStatusChanged = "network-link.onStatusChanged",
|
|
371
378
|
/**
|
|
372
379
|
* Emitted by the battery cap provider WHEN `wakeForStream` enters the
|
|
373
380
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
package/dist/enums.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_event_category = require("./event-category-
|
|
2
|
+
const require_event_category = require("./event-category-b8kBSOTT.js");
|
|
3
3
|
//#region src/enums/event-source-type.ts
|
|
4
4
|
var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
|
|
5
5
|
EventSourceType["Addon"] = "addon";
|
package/dist/enums.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as EventCategory } from "./event-category-
|
|
1
|
+
import { t as EventCategory } from "./event-category-zAv7pMUz.mjs";
|
|
2
2
|
//#region src/enums/event-source-type.ts
|
|
3
3
|
var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
|
|
4
4
|
EventSourceType["Addon"] = "addon";
|
|
@@ -370,6 +370,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
370
370
|
*/
|
|
371
371
|
EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
|
|
372
372
|
/**
|
|
373
|
+
* Cap event fired by every device that registers the `network-link`
|
|
374
|
+
* capability. Mirrors the cap definition's `onStatusChanged`. Carries
|
|
375
|
+
* `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
|
|
376
|
+
* reading that moved.
|
|
377
|
+
*/
|
|
378
|
+
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
379
|
+
/**
|
|
373
380
|
* Emitted by the battery cap provider WHEN `wakeForStream` enters the
|
|
374
381
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
375
382
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
@@ -370,6 +370,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
370
370
|
*/
|
|
371
371
|
EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
|
|
372
372
|
/**
|
|
373
|
+
* Cap event fired by every device that registers the `network-link`
|
|
374
|
+
* capability. Mirrors the cap definition's `onStatusChanged`. Carries
|
|
375
|
+
* `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
|
|
376
|
+
* reading that moved.
|
|
377
|
+
*/
|
|
378
|
+
EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
|
|
379
|
+
/**
|
|
373
380
|
* Emitted by the battery cap provider WHEN `wakeForStream` enters the
|
|
374
381
|
* "wake in progress" window — between the Baichuan wake-up issue and
|
|
375
382
|
* the camera's first dialed-back RTP packet. The stream-broker
|
|
@@ -71,6 +71,7 @@ import type { motionZonesCapability } from '../capabilities/motion-zones.cap.js'
|
|
|
71
71
|
import type { motionCapability } from '../capabilities/motion.cap.js';
|
|
72
72
|
import type { mqttBrokerCapability } from '../capabilities/mqtt-broker.cap.js';
|
|
73
73
|
import type { nativeObjectDetectionCapability } from '../capabilities/native-object-detection.cap.js';
|
|
74
|
+
import type { navigationCapability } from '../capabilities/navigation.cap.js';
|
|
74
75
|
import type { networkAccessCapability } from '../capabilities/network-access.cap.js';
|
|
75
76
|
import type { networkQualityCapability } from '../capabilities/network-quality.cap.js';
|
|
76
77
|
import type { nodesCapability } from '../capabilities/nodes.cap.js';
|
|
@@ -4318,6 +4319,90 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
4318
4319
|
meta: object;
|
|
4319
4320
|
}>;
|
|
4320
4321
|
}>>;
|
|
4322
|
+
navigation: TRPCBuiltRouter<{
|
|
4323
|
+
ctx: TrpcContext;
|
|
4324
|
+
meta: object;
|
|
4325
|
+
errorShape: AugmentedErrorShape;
|
|
4326
|
+
transformer: true;
|
|
4327
|
+
}, TRPCDecorateCreateRouterOptions<{
|
|
4328
|
+
getStatus: TRPCQueryProcedure<{
|
|
4329
|
+
input: {
|
|
4330
|
+
[x: string]: unknown;
|
|
4331
|
+
} & z.input<typeof DEVICE_STATUS_METHOD.getStatus.input>;
|
|
4332
|
+
output: z.infer<typeof DEVICE_STATUS_METHOD.getStatus.output>;
|
|
4333
|
+
meta: object;
|
|
4334
|
+
}>;
|
|
4335
|
+
move: TRPCMutationProcedure<{
|
|
4336
|
+
input: {
|
|
4337
|
+
[x: string]: unknown;
|
|
4338
|
+
} & z.input<typeof navigationCapability.methods.move.input>;
|
|
4339
|
+
output: z.infer<typeof navigationCapability.methods.move.output>;
|
|
4340
|
+
meta: object;
|
|
4341
|
+
}>;
|
|
4342
|
+
stop: TRPCMutationProcedure<{
|
|
4343
|
+
input: {
|
|
4344
|
+
[x: string]: unknown;
|
|
4345
|
+
} & z.input<typeof navigationCapability.methods.stop.input>;
|
|
4346
|
+
output: z.infer<typeof navigationCapability.methods.stop.output>;
|
|
4347
|
+
meta: object;
|
|
4348
|
+
}>;
|
|
4349
|
+
goToPoint: TRPCMutationProcedure<{
|
|
4350
|
+
input: {
|
|
4351
|
+
[x: string]: unknown;
|
|
4352
|
+
} & z.input<typeof navigationCapability.methods.goToPoint.input>;
|
|
4353
|
+
output: z.infer<typeof navigationCapability.methods.goToPoint.output>;
|
|
4354
|
+
meta: object;
|
|
4355
|
+
}>;
|
|
4356
|
+
listActions: TRPCQueryProcedure<{
|
|
4357
|
+
input: {
|
|
4358
|
+
[x: string]: unknown;
|
|
4359
|
+
} & z.input<typeof navigationCapability.methods.listActions.input>;
|
|
4360
|
+
output: z.infer<typeof navigationCapability.methods.listActions.output>;
|
|
4361
|
+
meta: object;
|
|
4362
|
+
}>;
|
|
4363
|
+
runAction: TRPCMutationProcedure<{
|
|
4364
|
+
input: {
|
|
4365
|
+
[x: string]: unknown;
|
|
4366
|
+
} & z.input<typeof navigationCapability.methods.runAction.input>;
|
|
4367
|
+
output: z.infer<typeof navigationCapability.methods.runAction.output>;
|
|
4368
|
+
meta: object;
|
|
4369
|
+
}>;
|
|
4370
|
+
playSound: TRPCMutationProcedure<{
|
|
4371
|
+
input: {
|
|
4372
|
+
[x: string]: unknown;
|
|
4373
|
+
} & z.input<typeof navigationCapability.methods.playSound.input>;
|
|
4374
|
+
output: z.infer<typeof navigationCapability.methods.playSound.output>;
|
|
4375
|
+
meta: object;
|
|
4376
|
+
}>;
|
|
4377
|
+
setLightOn: TRPCMutationProcedure<{
|
|
4378
|
+
input: {
|
|
4379
|
+
[x: string]: unknown;
|
|
4380
|
+
} & z.input<typeof navigationCapability.methods.setLightOn.input>;
|
|
4381
|
+
output: z.infer<typeof navigationCapability.methods.setLightOn.output>;
|
|
4382
|
+
meta: object;
|
|
4383
|
+
}>;
|
|
4384
|
+
setLightMode: TRPCMutationProcedure<{
|
|
4385
|
+
input: {
|
|
4386
|
+
[x: string]: unknown;
|
|
4387
|
+
} & z.input<typeof navigationCapability.methods.setLightMode.input>;
|
|
4388
|
+
output: z.infer<typeof navigationCapability.methods.setLightMode.output>;
|
|
4389
|
+
meta: object;
|
|
4390
|
+
}>;
|
|
4391
|
+
setLightLevel: TRPCMutationProcedure<{
|
|
4392
|
+
input: {
|
|
4393
|
+
[x: string]: unknown;
|
|
4394
|
+
} & z.input<typeof navigationCapability.methods.setLightLevel.input>;
|
|
4395
|
+
output: z.infer<typeof navigationCapability.methods.setLightLevel.output>;
|
|
4396
|
+
meta: object;
|
|
4397
|
+
}>;
|
|
4398
|
+
getFeatures: TRPCQueryProcedure<{
|
|
4399
|
+
input: {
|
|
4400
|
+
[x: string]: unknown;
|
|
4401
|
+
} & z.input<typeof navigationCapability.methods.getFeatures.input>;
|
|
4402
|
+
output: z.infer<typeof navigationCapability.methods.getFeatures.output>;
|
|
4403
|
+
meta: object;
|
|
4404
|
+
}>;
|
|
4405
|
+
}>>;
|
|
4321
4406
|
networkAccess: TRPCBuiltRouter<{
|
|
4322
4407
|
ctx: TrpcContext;
|
|
4323
4408
|
meta: object;
|
|
@@ -4365,6 +4450,20 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
4365
4450
|
meta: object;
|
|
4366
4451
|
}>;
|
|
4367
4452
|
}>>;
|
|
4453
|
+
networkLink: TRPCBuiltRouter<{
|
|
4454
|
+
ctx: TrpcContext;
|
|
4455
|
+
meta: object;
|
|
4456
|
+
errorShape: AugmentedErrorShape;
|
|
4457
|
+
transformer: true;
|
|
4458
|
+
}, TRPCDecorateCreateRouterOptions<{
|
|
4459
|
+
getStatus: TRPCQueryProcedure<{
|
|
4460
|
+
input: {
|
|
4461
|
+
[x: string]: unknown;
|
|
4462
|
+
} & z.input<typeof DEVICE_STATUS_METHOD.getStatus.input>;
|
|
4463
|
+
output: z.infer<typeof DEVICE_STATUS_METHOD.getStatus.output>;
|
|
4464
|
+
meta: object;
|
|
4465
|
+
}>;
|
|
4466
|
+
}>>;
|
|
4368
4467
|
networkQuality: TRPCBuiltRouter<{
|
|
4369
4468
|
ctx: TrpcContext;
|
|
4370
4469
|
meta: object;
|
|
@@ -42,6 +42,8 @@ import type { MotionTriggerStatusSchema } from '../capabilities/motion-trigger.c
|
|
|
42
42
|
import type { motionZonesCapability } from '../capabilities/motion-zones.cap.js';
|
|
43
43
|
import type { MqttBrokerStatusSchema } from '../capabilities/mqtt-broker.cap.js';
|
|
44
44
|
import type { NativeObjectDetectionStatusSchema } from '../capabilities/native-object-detection.cap.js';
|
|
45
|
+
import type { NavigationStatusSchema } from '../capabilities/navigation.cap.js';
|
|
46
|
+
import type { NetworkLinkStatusSchema } from '../capabilities/network-link.cap.js';
|
|
45
47
|
import type { NotifierStatusSchema } from '../capabilities/notifier.cap.js';
|
|
46
48
|
import type { NumericSensorStatusSchema } from '../capabilities/numeric-sensor.cap.js';
|
|
47
49
|
import type { OsdStatusSchema } from '../capabilities/osd.cap.js';
|
|
@@ -116,6 +118,8 @@ export type CapStatusTypeMap = {
|
|
|
116
118
|
readonly 'motion-zones': z.infer<(typeof motionZonesCapability)['status']['schema']>;
|
|
117
119
|
readonly 'mqtt-broker': z.infer<typeof MqttBrokerStatusSchema>;
|
|
118
120
|
readonly 'native-object-detection': z.infer<typeof NativeObjectDetectionStatusSchema>;
|
|
121
|
+
readonly 'navigation': z.infer<typeof NavigationStatusSchema>;
|
|
122
|
+
readonly 'network-link': z.infer<typeof NetworkLinkStatusSchema>;
|
|
119
123
|
readonly 'notifier': z.infer<typeof NotifierStatusSchema>;
|
|
120
124
|
readonly 'numeric-sensor': z.infer<typeof NumericSensorStatusSchema>;
|
|
121
125
|
readonly 'osd': z.infer<typeof OsdStatusSchema>;
|
|
@@ -149,4 +153,4 @@ export type CapNameWithStatus = keyof CapStatusTypeMap;
|
|
|
149
153
|
* aggregator to enumerate caps whose `status` should be polled +
|
|
150
154
|
* streamed via `subscribeDeviceStatusAggregate`.
|
|
151
155
|
*/
|
|
152
|
-
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", "doorbell", "enum-sensor", "event-emitter", "fan-control", "feature-probe", "flood", "gas", "humidifier", "humidity-sensor", "image", "image-settings", "intercom", "lawn-mower-control", "lock-control", "media-player", "motion", "motion-trigger", "motion-zones", "mqtt-broker", "native-object-detection", "notifier", "numeric-sensor", "osd", "pet-feeder", "power-meter", "presence", "pressure-sensor", "privacy-mask", "ptz", "ptz-autotrack", "recording", "scene-monitor", "script-runner", "smoke", "snapshot", "stream-params", "switch", "tamper", "temperature-sensor", "update", "vacuum-control", "valve", "vibration", "water-heater", "weather"];
|
|
156
|
+
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", "doorbell", "enum-sensor", "event-emitter", "fan-control", "feature-probe", "flood", "gas", "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", "scene-monitor", "script-runner", "smoke", "snapshot", "stream-params", "switch", "tamper", "temperature-sensor", "update", "vacuum-control", "valve", "vibration", "water-heater", "weather"];
|
|
@@ -87,7 +87,9 @@ export { motionTriggerCapability } from '../capabilities/motion-trigger.cap.js';
|
|
|
87
87
|
export { motionZonesCapability } from '../capabilities/motion-zones.cap.js';
|
|
88
88
|
export { mqttBrokerCapability } from '../capabilities/mqtt-broker.cap.js';
|
|
89
89
|
export { nativeObjectDetectionCapability } from '../capabilities/native-object-detection.cap.js';
|
|
90
|
+
export { navigationCapability } from '../capabilities/navigation.cap.js';
|
|
90
91
|
export { networkAccessCapability } from '../capabilities/network-access.cap.js';
|
|
92
|
+
export { networkLinkCapability } from '../capabilities/network-link.cap.js';
|
|
91
93
|
export { networkQualityCapability } from '../capabilities/network-quality.cap.js';
|
|
92
94
|
export { nodesCapability } from '../capabilities/nodes.cap.js';
|
|
93
95
|
export { notificationOutputCapability } from '../capabilities/notification-output.cap.js';
|
|
@@ -240,7 +242,9 @@ export declare const CAPABILITY_NAMES: {
|
|
|
240
242
|
readonly motionZones: "motion-zones";
|
|
241
243
|
readonly mqttBroker: "mqtt-broker";
|
|
242
244
|
readonly nativeObjectDetection: "native-object-detection";
|
|
245
|
+
readonly navigation: "navigation";
|
|
243
246
|
readonly networkAccess: "network-access";
|
|
247
|
+
readonly networkLink: "network-link";
|
|
244
248
|
readonly networkQuality: "network-quality";
|
|
245
249
|
readonly nodes: "nodes";
|
|
246
250
|
readonly notificationOutput: "notification-output";
|
|
@@ -406,7 +410,9 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
406
410
|
readonly motionZones: TRouter;
|
|
407
411
|
readonly mqttBroker: TRouter;
|
|
408
412
|
readonly nativeObjectDetection: TRouter;
|
|
413
|
+
readonly navigation: TRouter;
|
|
409
414
|
readonly networkAccess: TRouter;
|
|
415
|
+
readonly networkLink: TRouter;
|
|
410
416
|
readonly networkQuality: TRouter;
|
|
411
417
|
readonly nodes: TRouter;
|
|
412
418
|
readonly notificationOutput: TRouter;
|
|
@@ -470,8 +476,8 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
470
476
|
readonly zoneRules: TRouter;
|
|
471
477
|
readonly zones: TRouter;
|
|
472
478
|
}
|
|
473
|
-
/** Capability names whose mode is `singleton` (
|
|
474
|
-
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", "camera-credentials", "camera-pipeline-config", "camera-streams", "carbon-monoxide", "climate-control", "color", "connectivity", "consumables", "contact", "control", "core-blocks", "cover", "day-night", "decoder", "detection-pipeline", "device-adoption", "device-discovery", "device-manager", "device-ops", "device-state", "device-status", "doorbell", "enum-sensor", "event-emitter", "events", "face-gallery", "fan-control", "feature-probe", "filesystem-browse", "flood", "gas", "humidifier", "humidity-sensor", "image", "image-settings", "integrations", "intercom", "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", "network-quality", "nodes", "notification-rules", "notifier", "numeric-sensor", "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", "recording", "recording-export", "scene-monitor", "script-runner", "server-management", "settings-store", "smoke", "snapshot", "sso-bridge", "storage", "storage-migration", "stream-broker", "stream-catalog", "stream-params", "switch", "system", "tamper", "temperature-sensor", "terminal-session", "toast", "update", "user-management", "vacuum-control", "valve", "vector-store", "vibration", "videoclips", "viewer-ui", "water-heater", "weather", "webrtc-session", "zone-analytics", "zone-rules", "zones"];
|
|
479
|
+
/** Capability names whose mode is `singleton` (127 caps). */
|
|
480
|
+
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", "camera-credentials", "camera-pipeline-config", "camera-streams", "carbon-monoxide", "climate-control", "color", "connectivity", "consumables", "contact", "control", "core-blocks", "cover", "day-night", "decoder", "detection-pipeline", "device-adoption", "device-discovery", "device-manager", "device-ops", "device-state", "device-status", "doorbell", "enum-sensor", "event-emitter", "events", "face-gallery", "fan-control", "feature-probe", "filesystem-browse", "flood", "gas", "humidifier", "humidity-sensor", "image", "image-settings", "integrations", "intercom", "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", "nodes", "notification-rules", "notifier", "numeric-sensor", "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", "recording", "recording-export", "scene-monitor", "script-runner", "server-management", "settings-store", "smoke", "snapshot", "sso-bridge", "storage", "storage-migration", "stream-broker", "stream-catalog", "stream-params", "switch", "system", "tamper", "temperature-sensor", "terminal-session", "toast", "update", "user-management", "vacuum-control", "valve", "vector-store", "vibration", "videoclips", "viewer-ui", "water-heater", "weather", "webrtc-session", "zone-analytics", "zone-rules", "zones"];
|
|
475
481
|
/** Union of singleton capability names (literal string union). */
|
|
476
482
|
export type SingletonCapabilityName = typeof SINGLETON_CAPABILITY_NAMES[number];
|
|
477
483
|
/** Capability names whose mode is `collection` (27 caps). */
|
|
@@ -38,6 +38,8 @@ import { motionCapability } from '../capabilities/motion.cap.js';
|
|
|
38
38
|
import { motionTriggerCapability } from '../capabilities/motion-trigger.cap.js';
|
|
39
39
|
import { motionZonesCapability } from '../capabilities/motion-zones.cap.js';
|
|
40
40
|
import { nativeObjectDetectionCapability } from '../capabilities/native-object-detection.cap.js';
|
|
41
|
+
import { navigationCapability } from '../capabilities/navigation.cap.js';
|
|
42
|
+
import { networkLinkCapability } from '../capabilities/network-link.cap.js';
|
|
41
43
|
import { notifierCapability } from '../capabilities/notifier.cap.js';
|
|
42
44
|
import { numericSensorCapability } from '../capabilities/numeric-sensor.cap.js';
|
|
43
45
|
import { petFeederCapability } from '../capabilities/pet-feeder.cap.js';
|
|
@@ -114,6 +116,8 @@ export interface DeviceLocalState {
|
|
|
114
116
|
motionTrigger: InferRuntimeState<typeof motionTriggerCapability>;
|
|
115
117
|
motionZones: InferRuntimeState<typeof motionZonesCapability>;
|
|
116
118
|
nativeObjectDetection: InferRuntimeState<typeof nativeObjectDetectionCapability>;
|
|
119
|
+
navigation: InferRuntimeState<typeof navigationCapability>;
|
|
120
|
+
networkLink: InferRuntimeState<typeof networkLinkCapability>;
|
|
117
121
|
notifier: InferRuntimeState<typeof notifierCapability>;
|
|
118
122
|
numericSensor: InferRuntimeState<typeof numericSensorCapability>;
|
|
119
123
|
petFeeder: InferRuntimeState<typeof petFeederCapability>;
|
|
@@ -200,6 +204,8 @@ export interface CapNameToRuntimeStateMap {
|
|
|
200
204
|
'motion-trigger': InferRuntimeState<typeof motionTriggerCapability>;
|
|
201
205
|
'motion-zones': InferRuntimeState<typeof motionZonesCapability>;
|
|
202
206
|
'native-object-detection': InferRuntimeState<typeof nativeObjectDetectionCapability>;
|
|
207
|
+
'navigation': InferRuntimeState<typeof navigationCapability>;
|
|
208
|
+
'network-link': InferRuntimeState<typeof networkLinkCapability>;
|
|
203
209
|
'notifier': InferRuntimeState<typeof notifierCapability>;
|
|
204
210
|
'numeric-sensor': InferRuntimeState<typeof numericSensorCapability>;
|
|
205
211
|
'pet-feeder': InferRuntimeState<typeof petFeederCapability>;
|
|
@@ -49,6 +49,8 @@ import type { motionDetectionCapability } from '../capabilities/motion-detection
|
|
|
49
49
|
import type { motionTriggerCapability } from '../capabilities/motion-trigger.cap.js';
|
|
50
50
|
import type { motionZonesCapability } from '../capabilities/motion-zones.cap.js';
|
|
51
51
|
import type { nativeObjectDetectionCapability } from '../capabilities/native-object-detection.cap.js';
|
|
52
|
+
import type { navigationCapability } from '../capabilities/navigation.cap.js';
|
|
53
|
+
import type { networkLinkCapability } from '../capabilities/network-link.cap.js';
|
|
52
54
|
import type { notificationRulesCapability } from '../capabilities/notification-rules.cap.js';
|
|
53
55
|
import type { notifierCapability } from '../capabilities/notifier.cap.js';
|
|
54
56
|
import type { numericSensorCapability } from '../capabilities/numeric-sensor.cap.js';
|
|
@@ -144,6 +146,8 @@ export interface DeviceProxyState {
|
|
|
144
146
|
readonly motionTrigger: SliceHandle<InferRuntimeState<typeof motionTriggerCapability>>;
|
|
145
147
|
readonly motionZones: SliceHandle<InferRuntimeState<typeof motionZonesCapability>>;
|
|
146
148
|
readonly nativeObjectDetection: SliceHandle<InferRuntimeState<typeof nativeObjectDetectionCapability>>;
|
|
149
|
+
readonly navigation: SliceHandle<InferRuntimeState<typeof navigationCapability>>;
|
|
150
|
+
readonly networkLink: SliceHandle<InferRuntimeState<typeof networkLinkCapability>>;
|
|
147
151
|
readonly notifier: SliceHandle<InferRuntimeState<typeof notifierCapability>>;
|
|
148
152
|
readonly numericSensor: SliceHandle<InferRuntimeState<typeof numericSensorCapability>>;
|
|
149
153
|
readonly petFeeder: SliceHandle<InferRuntimeState<typeof petFeederCapability>>;
|
|
@@ -235,6 +239,8 @@ export interface DeviceProxy {
|
|
|
235
239
|
readonly motionTrigger?: InferDeviceProxyCap<typeof motionTriggerCapability>;
|
|
236
240
|
readonly motionZones?: InferDeviceProxyCap<typeof motionZonesCapability>;
|
|
237
241
|
readonly nativeObjectDetection?: InferDeviceProxyCap<typeof nativeObjectDetectionCapability>;
|
|
242
|
+
readonly navigation?: InferDeviceProxyCap<typeof navigationCapability>;
|
|
243
|
+
readonly networkLink?: InferDeviceProxyCap<typeof networkLinkCapability>;
|
|
238
244
|
readonly notificationRules?: InferDeviceProxyCap<typeof notificationRulesCapability>;
|
|
239
245
|
readonly notifier?: InferDeviceProxyCap<typeof notifierCapability>;
|
|
240
246
|
readonly numericSensor?: InferDeviceProxyCap<typeof numericSensorCapability>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* can answer "may a rule actuate this?" without importing the schema barrel
|
|
6
6
|
* (~144MB RSS per runner, D28).
|
|
7
7
|
*
|
|
8
|
-
* Coverage:
|
|
8
|
+
* Coverage: 82 device-scoped capabilities.
|
|
9
9
|
*/
|
|
10
10
|
export declare const DEVICE_SCOPED_CAPS: ReadonlySet<string>;
|
|
11
11
|
/**
|
|
@@ -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: 1019 method paths across 127 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -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: 366 methods carry a device reference, of which
|
|
10
10
|
* 134 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`. 66 caps: 35 `restored`, 31 `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.
|