@camstack/types 1.2.405 → 1.2.407
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 +21 -2
- package/dist/addon.mjs +21 -2
- package/dist/capabilities/battery.cap.d.ts +46 -0
- package/dist/capabilities/capability-definition.d.ts +8 -0
- package/dist/capabilities/consumables.cap.d.ts +110 -0
- package/dist/capabilities/customize-catalog.d.ts +72 -0
- package/dist/capabilities/customize-spec.d.ts +202 -0
- package/dist/capabilities/doorbell.cap.d.ts +39 -0
- package/dist/capabilities/index.d.ts +6 -4
- package/dist/capabilities/motion.cap.d.ts +39 -0
- package/dist/capabilities/notification-rules.cap.d.ts +3 -78
- package/dist/capabilities/osd-manager.cap.d.ts +0 -18
- package/dist/capabilities/running-state.cap.d.ts +140 -0
- package/dist/catalogs/sensor-active-state.d.ts +1 -1
- package/dist/client.js +11 -63
- package/dist/client.mjs +11 -63
- package/dist/composition/customize/__fixtures__/refs.d.ts +27 -0
- package/dist/composition/customize/__fixtures__/stored-cases.d.ts +13 -0
- package/dist/composition/customize/event-compile.d.ts +20 -0
- package/dist/composition/customize/event-decode.d.ts +19 -0
- package/dist/composition/customize/event-eval.d.ts +35 -0
- package/dist/composition/customize/event-status.d.ts +49 -0
- package/dist/composition/customize/field-source.d.ts +5 -0
- package/dist/composition/customize/keyed-array-compile.d.ts +26 -0
- package/dist/composition/customize/keyed-array-decode.d.ts +20 -0
- package/dist/composition/customize/keyed-array-expr.d.ts +10 -0
- package/dist/composition/customize/keyed-array-status.d.ts +22 -0
- package/dist/composition/customize/normalize.d.ts +4 -0
- package/dist/composition/customize/override-draft.d.ts +311 -0
- package/dist/composition/customize/scalar-compile.d.ts +13 -0
- package/dist/composition/customize/scalar-decode.d.ts +17 -0
- package/dist/composition/customize/scalar-expr.d.ts +33 -0
- package/dist/composition/customize/scalar-status.d.ts +31 -0
- package/dist/composition/customize/stored.d.ts +15 -0
- package/dist/composition/index.d.ts +0 -1
- package/dist/{composition-CB6PMT9p.mjs → composition-BJ8iAZb3.mjs} +87 -3
- package/dist/{composition-eoYYVfOp.js → composition-CSLSFGTO.js} +87 -3
- package/dist/device/cap-vocabulary/entries/appliances.d.ts +1 -1
- package/dist/enums/event-category.d.ts +4 -0
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-fDPduoeC.mjs → event-category-Ceif8n-v.mjs} +4 -0
- package/dist/{event-category-CXrwjC3e.js → event-category-DG6Vir8Z.js} +4 -0
- package/dist/expression/builtins.d.ts +7 -18
- package/dist/expression/expression-source.d.ts +14 -2
- 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 +229 -0
- package/dist/generated/device-local-state.d.ts +3 -0
- package/dist/generated/device-proxy.d.ts +3 -0
- package/dist/generated/device-scoped-caps.d.ts +1 -1
- 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 +16 -0
- package/dist/index.js +2385 -173
- package/dist/index.mjs +2351 -171
- package/dist/interfaces/config-ui.d.ts +69 -2
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/running-state/defaults.d.ts +6 -0
- package/dist/running-state/from-operation.d.ts +14 -0
- package/dist/{sleep-CHIEEJkY.mjs → sleep-CYfIZzGv.mjs} +7 -3
- package/dist/{sleep-BKS4OPMo.js → sleep-UP964hNP.js} +7 -3
- package/package.json +1 -1
- package/dist/composition/presets/doorbell-feature.d.ts +0 -20
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
import { DeviceType } from '../device/device-type.js';
|
|
4
|
+
export declare const RunningStateSourceSchema: z.ZodEnum<{
|
|
5
|
+
assigned: "assigned";
|
|
6
|
+
native: "native";
|
|
7
|
+
}>;
|
|
8
|
+
export type RunningStateSource = z.infer<typeof RunningStateSourceSchema>;
|
|
9
|
+
export declare const RunningStateStatusSchema: z.ZodObject<{
|
|
10
|
+
running: z.ZodNullable<z.ZodBoolean>;
|
|
11
|
+
since: z.ZodNullable<z.ZodNumber>;
|
|
12
|
+
source: z.ZodEnum<{
|
|
13
|
+
assigned: "assigned";
|
|
14
|
+
native: "native";
|
|
15
|
+
}>;
|
|
16
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
17
|
+
lastFetchedAt: z.ZodNullable<z.ZodNumber>;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type RunningStateStatus = z.infer<typeof RunningStateStatusSchema>;
|
|
20
|
+
export declare const runningStateCapability: {
|
|
21
|
+
readonly name: 'running-state';
|
|
22
|
+
readonly scope: 'device';
|
|
23
|
+
readonly deviceNative: true;
|
|
24
|
+
readonly mode: 'singleton';
|
|
25
|
+
readonly deviceTypes: readonly DeviceType[];
|
|
26
|
+
readonly methods: {};
|
|
27
|
+
readonly events: {
|
|
28
|
+
readonly onStarted: {
|
|
29
|
+
readonly data: z.ZodObject<{
|
|
30
|
+
deviceId: z.ZodNumber;
|
|
31
|
+
since: z.ZodNullable<z.ZodNumber>;
|
|
32
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
};
|
|
35
|
+
readonly onFinished: {
|
|
36
|
+
readonly data: z.ZodObject<{
|
|
37
|
+
deviceId: z.ZodNumber;
|
|
38
|
+
since: z.ZodNullable<z.ZodNumber>;
|
|
39
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
readonly status: {
|
|
44
|
+
readonly schema: z.ZodObject<{
|
|
45
|
+
running: z.ZodNullable<z.ZodBoolean>;
|
|
46
|
+
since: z.ZodNullable<z.ZodNumber>;
|
|
47
|
+
source: z.ZodEnum<{
|
|
48
|
+
assigned: "assigned";
|
|
49
|
+
native: "native";
|
|
50
|
+
}>;
|
|
51
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
52
|
+
lastFetchedAt: z.ZodNullable<z.ZodNumber>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
readonly kind: 'push';
|
|
55
|
+
};
|
|
56
|
+
readonly runtimeState: z.ZodObject<{
|
|
57
|
+
running: z.ZodNullable<z.ZodBoolean>;
|
|
58
|
+
since: z.ZodNullable<z.ZodNumber>;
|
|
59
|
+
source: z.ZodEnum<{
|
|
60
|
+
assigned: "assigned";
|
|
61
|
+
native: "native";
|
|
62
|
+
}>;
|
|
63
|
+
phase: z.ZodNullable<z.ZodString>;
|
|
64
|
+
lastFetchedAt: z.ZodNullable<z.ZodNumber>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
readonly durability: 'restored';
|
|
67
|
+
readonly history: {
|
|
68
|
+
readonly fields: {
|
|
69
|
+
readonly running: {
|
|
70
|
+
readonly kind: 'boolean';
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
readonly volatileStateFields: readonly ["lastFetchedAt"];
|
|
75
|
+
readonly customize: {
|
|
76
|
+
readonly version: 1;
|
|
77
|
+
readonly targets: readonly [{
|
|
78
|
+
readonly id: 'running';
|
|
79
|
+
readonly cardinality: 'scalar';
|
|
80
|
+
readonly vocabulary: {
|
|
81
|
+
readonly cap: 'running-state';
|
|
82
|
+
readonly stateField: 'running';
|
|
83
|
+
};
|
|
84
|
+
readonly deviceTypes: readonly [DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder];
|
|
85
|
+
readonly apply: 'add-or-replace';
|
|
86
|
+
readonly path: 'running';
|
|
87
|
+
readonly sources: readonly [{
|
|
88
|
+
readonly kind: 'switch';
|
|
89
|
+
readonly transforms: readonly [{
|
|
90
|
+
readonly kind: 'identity';
|
|
91
|
+
}];
|
|
92
|
+
}, {
|
|
93
|
+
readonly kind: 'binary';
|
|
94
|
+
readonly transforms: readonly [{
|
|
95
|
+
readonly kind: 'identity';
|
|
96
|
+
}, {
|
|
97
|
+
readonly kind: 'invert';
|
|
98
|
+
}];
|
|
99
|
+
}, {
|
|
100
|
+
readonly kind: 'numeric';
|
|
101
|
+
readonly requiredUnit: 'W';
|
|
102
|
+
readonly transforms: readonly [{
|
|
103
|
+
readonly kind: 'threshold';
|
|
104
|
+
readonly comparison: 'gte';
|
|
105
|
+
readonly defaultThreshold: 5;
|
|
106
|
+
readonly defaultStartDwellMs: 30000;
|
|
107
|
+
readonly defaultStopDwellMs: 180000;
|
|
108
|
+
readonly thresholdUnit: 'W';
|
|
109
|
+
}];
|
|
110
|
+
}];
|
|
111
|
+
readonly companions: readonly [{
|
|
112
|
+
readonly kind: 'constant';
|
|
113
|
+
readonly path: 'source';
|
|
114
|
+
readonly value: 'assigned';
|
|
115
|
+
readonly when: 'always';
|
|
116
|
+
}, {
|
|
117
|
+
readonly kind: 'constant';
|
|
118
|
+
readonly path: 'phase';
|
|
119
|
+
readonly value: null;
|
|
120
|
+
readonly when: 'always';
|
|
121
|
+
}, {
|
|
122
|
+
readonly kind: 'clock';
|
|
123
|
+
readonly path: 'lastFetchedAt';
|
|
124
|
+
readonly when: 'always';
|
|
125
|
+
}, {
|
|
126
|
+
readonly kind: 'transition-time';
|
|
127
|
+
readonly path: 'since';
|
|
128
|
+
readonly sourceChangedAt: 'prefer';
|
|
129
|
+
}];
|
|
130
|
+
readonly sourceReport: {
|
|
131
|
+
readonly status: 'assignment-status';
|
|
132
|
+
readonly runtimeField: 'source';
|
|
133
|
+
readonly nativeValue: 'native';
|
|
134
|
+
readonly assignedValue: 'assigned';
|
|
135
|
+
};
|
|
136
|
+
readonly advancedExpression: true;
|
|
137
|
+
}];
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
export type IRunningStateProvider = InferProvider<typeof runningStateCapability>;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* ONE table for everyone who asks "is this device HIGH?": the
|
|
6
6
|
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
7
7
|
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
8
|
-
* the sources of a
|
|
8
|
+
* the sources of a pulse (`compilePulseOverride`, D936).
|
|
9
9
|
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
10
10
|
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
11
11
|
*
|
package/dist/client.js
CHANGED
|
@@ -909,7 +909,7 @@ zod.z.object({
|
|
|
909
909
|
* ONE table for everyone who asks "is this device HIGH?": the
|
|
910
910
|
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
911
911
|
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
912
|
-
* the sources of a
|
|
912
|
+
* the sources of a pulse (`compilePulseOverride`, D936).
|
|
913
913
|
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
914
914
|
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
915
915
|
*
|
|
@@ -22259,9 +22259,6 @@ var NcSystemEventKindSchema = zod.z.enum([
|
|
|
22259
22259
|
"device-battery-normal",
|
|
22260
22260
|
"device-consumable-low",
|
|
22261
22261
|
"device-consumable-normal",
|
|
22262
|
-
"device-tank-low",
|
|
22263
|
-
"device-tank-full",
|
|
22264
|
-
"device-tank-normal",
|
|
22265
22262
|
"stream-online",
|
|
22266
22263
|
"stream-offline",
|
|
22267
22264
|
"node-online",
|
|
@@ -22308,13 +22305,14 @@ var NcSystemEventKindSchema = zod.z.enum([
|
|
|
22308
22305
|
"camera-enabled"
|
|
22309
22306
|
]);
|
|
22310
22307
|
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
22311
|
-
var NC_LEGACY_SYSTEM_EVENT_KINDS =
|
|
22308
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = [
|
|
22312
22309
|
"camera-online",
|
|
22313
22310
|
"camera-offline",
|
|
22314
22311
|
"camera-disabled",
|
|
22315
22312
|
"camera-enabled"
|
|
22316
|
-
]
|
|
22317
|
-
|
|
22313
|
+
];
|
|
22314
|
+
var NC_LEGACY_SYSTEM_EVENT_KIND_SET = new Set(NC_LEGACY_SYSTEM_EVENT_KINDS);
|
|
22315
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KIND_SET.has(kind));
|
|
22318
22316
|
/**
|
|
22319
22317
|
* The panel's transitions, as ONE list.
|
|
22320
22318
|
*
|
|
@@ -23491,18 +23489,11 @@ var NcRuleSchema = NcRuleInputSchema.extend({
|
|
|
23491
23489
|
*/
|
|
23492
23490
|
disabledTargetIds: zod.z.array(zod.z.string()).default([])
|
|
23493
23491
|
});
|
|
23494
|
-
/**
|
|
23495
|
-
* The state-summary SECTIONS (D647 / D698 / D708): the D637 kind groups that
|
|
23496
|
-
* report a still-true state. `addons` is the crash-looped addons only and
|
|
23497
|
-
* `addon-updates` the addons that are behind (D708 split them). `backups-exports` and `alarm` are not sections — a completed
|
|
23498
|
-
* job is not an open state, and the alarm stays instant.
|
|
23499
|
-
*/
|
|
23500
23492
|
var NcStateSummarySectionIdSchema = zod.z.enum([
|
|
23501
23493
|
"device-state",
|
|
23502
23494
|
"streams",
|
|
23503
23495
|
"battery",
|
|
23504
23496
|
"consumables",
|
|
23505
|
-
"tanks",
|
|
23506
23497
|
"detection-blind",
|
|
23507
23498
|
"nodes",
|
|
23508
23499
|
"addons",
|
|
@@ -26520,6 +26511,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
26520
26511
|
getStatus: (input) => dispatch("recording-onboard", "recordingOnboard", "getStatus", "query", input)
|
|
26521
26512
|
};
|
|
26522
26513
|
const recordingSignalInterface = { getStatus: (input) => dispatch("recording-signal", "recordingSignal", "getStatus", "query", input) };
|
|
26514
|
+
const runningStateInterface = { getStatus: (input) => dispatch("running-state", "runningState", "getStatus", "query", input) };
|
|
26523
26515
|
const sceneMonitorInterface = {
|
|
26524
26516
|
listScenes: (input) => dispatch("scene-monitor", "sceneMonitor", "listScenes", "query", input),
|
|
26525
26517
|
listScenesBatch: (input) => dispatch("scene-monitor", "sceneMonitor", "listScenesBatch", "query", input),
|
|
@@ -26846,6 +26838,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
26846
26838
|
ptzAutotrack: createSliceHandle(stateSource, binding.deviceId, "ptz-autotrack"),
|
|
26847
26839
|
recordingOnboard: createSliceHandle(stateSource, binding.deviceId, "recording-onboard"),
|
|
26848
26840
|
recordingSignal: createSliceHandle(stateSource, binding.deviceId, "recording-signal"),
|
|
26841
|
+
runningState: createSliceHandle(stateSource, binding.deviceId, "running-state"),
|
|
26849
26842
|
sceneMonitor: createSliceHandle(stateSource, binding.deviceId, "scene-monitor"),
|
|
26850
26843
|
scriptRunner: createSliceHandle(stateSource, binding.deviceId, "script-runner"),
|
|
26851
26844
|
smoke: createSliceHandle(stateSource, binding.deviceId, "smoke"),
|
|
@@ -26934,6 +26927,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
26934
26927
|
...bound("recording") ? { recording: recordingInterface } : {},
|
|
26935
26928
|
...bound("recording-onboard") ? { recordingOnboard: recordingOnboardInterface } : {},
|
|
26936
26929
|
...bound("recording-signal") ? { recordingSignal: recordingSignalInterface } : {},
|
|
26930
|
+
...bound("running-state") ? { runningState: runningStateInterface } : {},
|
|
26937
26931
|
...bound("scene-monitor") ? { sceneMonitor: sceneMonitorInterface } : {},
|
|
26938
26932
|
...bound("script-runner") ? { scriptRunner: scriptRunnerInterface } : {},
|
|
26939
26933
|
...bound("smoke") ? { smoke: smokeInterface } : {},
|
|
@@ -28736,6 +28730,7 @@ new Set(["devices", "classes"]);
|
|
|
28736
28730
|
* narrows, and still fails CLOSED on a subject that cannot produce the identity
|
|
28737
28731
|
* it tests (a device the mirror cannot name is not evidence of a camera).
|
|
28738
28732
|
*/
|
|
28733
|
+
var LEGACY_KINDS_WITHOUT_FILTERS = new Set(NC_LEGACY_SYSTEM_EVENT_KINDS);
|
|
28739
28734
|
/**
|
|
28740
28735
|
* Every filter, for the callers that must cover all of them (guards, tests).
|
|
28741
28736
|
*
|
|
@@ -28759,6 +28754,7 @@ var NC_SYSTEM_EVENT_FILTER_KEYS = [
|
|
|
28759
28754
|
* ignores it and an editor hides its input. It never means "excluded".
|
|
28760
28755
|
*/
|
|
28761
28756
|
function systemEventFilterApplies(kind, filter) {
|
|
28757
|
+
if (LEGACY_KINDS_WITHOUT_FILTERS.has(kind)) return false;
|
|
28762
28758
|
switch (filter) {
|
|
28763
28759
|
case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind.startsWith("motion-") || kind.startsWith("recording-") || kind === "alarm-triggered";
|
|
28764
28760
|
case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind" || kind.startsWith("motion-");
|
|
@@ -28813,9 +28809,6 @@ var NC_SYSTEM_EVENT_FAMILY = {
|
|
|
28813
28809
|
"device-battery-normal": "device-events",
|
|
28814
28810
|
"device-consumable-low": "device-events",
|
|
28815
28811
|
"device-consumable-normal": "device-events",
|
|
28816
|
-
"device-tank-low": "device-events",
|
|
28817
|
-
"device-tank-full": "device-events",
|
|
28818
|
-
"device-tank-normal": "device-events",
|
|
28819
28812
|
"stream-online": "device-events",
|
|
28820
28813
|
"stream-offline": "device-events",
|
|
28821
28814
|
"detection-blind": "device-events",
|
|
@@ -28910,16 +28903,6 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
28910
28903
|
label: "Consumables",
|
|
28911
28904
|
kinds: ["device-consumable-low", "device-consumable-normal"]
|
|
28912
28905
|
},
|
|
28913
|
-
{
|
|
28914
|
-
id: "tanks",
|
|
28915
|
-
family: "device-events",
|
|
28916
|
-
label: "Tanks",
|
|
28917
|
-
kinds: [
|
|
28918
|
-
"device-tank-low",
|
|
28919
|
-
"device-tank-full",
|
|
28920
|
-
"device-tank-normal"
|
|
28921
|
-
]
|
|
28922
|
-
},
|
|
28923
28906
|
{
|
|
28924
28907
|
id: "detection-blind",
|
|
28925
28908
|
family: "device-events",
|
|
@@ -29893,11 +29876,6 @@ var RULE_BODY_ONLY = ["body"];
|
|
|
29893
29876
|
var RULE_TEXT = ["title", "body"];
|
|
29894
29877
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
29895
29878
|
var CONSUMABLE = ["device-consumable-low", "device-consumable-normal"];
|
|
29896
|
-
var TANK = [
|
|
29897
|
-
"device-tank-low",
|
|
29898
|
-
"device-tank-full",
|
|
29899
|
-
"device-tank-normal"
|
|
29900
|
-
];
|
|
29901
29879
|
var ALERT_EPISODE = [
|
|
29902
29880
|
"alert-critical",
|
|
29903
29881
|
"alert-error",
|
|
@@ -29929,7 +29907,6 @@ var DEVICE_EVENTS = [
|
|
|
29929
29907
|
"device-enabled",
|
|
29930
29908
|
...BATTERY,
|
|
29931
29909
|
...CONSUMABLE,
|
|
29932
|
-
...TANK,
|
|
29933
29910
|
"stream-online",
|
|
29934
29911
|
"stream-offline",
|
|
29935
29912
|
"detection-blind",
|
|
@@ -29975,12 +29952,6 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
29975
29952
|
example: "Robot — filter 10 %",
|
|
29976
29953
|
kinds: CONSUMABLE
|
|
29977
29954
|
},
|
|
29978
|
-
{
|
|
29979
|
-
name: "summaryTanks",
|
|
29980
|
-
label: "Summary: tanks",
|
|
29981
|
-
example: "Robot — clean water low",
|
|
29982
|
-
kinds: TANK
|
|
29983
|
-
},
|
|
29984
29955
|
{
|
|
29985
29956
|
name: "summaryDetection",
|
|
29986
29957
|
label: "Summary: cameras detecting nothing",
|
|
@@ -30389,18 +30360,7 @@ var NC_TEMPLATE_VARS = [
|
|
|
30389
30360
|
families: ["rule"],
|
|
30390
30361
|
fields: [...RULE_TEXT],
|
|
30391
30362
|
kinds: ["system"],
|
|
30392
|
-
systemEventKinds: [...CONSUMABLE
|
|
30393
|
-
},
|
|
30394
|
-
{
|
|
30395
|
-
name: "tank",
|
|
30396
|
-
label: "Tank",
|
|
30397
|
-
description: "Which tank, as a stable token: cleanWater, dirtyWater, detergent, dustBin, or the device key of any other supply (salt, rinse aid).",
|
|
30398
|
-
example: "clean water",
|
|
30399
|
-
group: "system",
|
|
30400
|
-
families: ["rule"],
|
|
30401
|
-
fields: [...RULE_TEXT],
|
|
30402
|
-
kinds: ["system"],
|
|
30403
|
-
systemEventKinds: [...TANK]
|
|
30363
|
+
systemEventKinds: [...CONSUMABLE]
|
|
30404
30364
|
},
|
|
30405
30365
|
{
|
|
30406
30366
|
name: "profile",
|
|
@@ -31051,9 +31011,6 @@ var NC_TEMPLATE_VARS = [
|
|
|
31051
31011
|
* delete it from here then, and the served catalog names it again.
|
|
31052
31012
|
*/
|
|
31053
31013
|
var NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS = [
|
|
31054
|
-
"device-tank-low",
|
|
31055
|
-
"device-tank-full",
|
|
31056
|
-
"device-tank-normal",
|
|
31057
31014
|
"node-restarting",
|
|
31058
31015
|
"node-updating",
|
|
31059
31016
|
"alert-critical",
|
|
@@ -31166,15 +31123,6 @@ var NC_SYSTEM_EVENT_CLASS_SPECS = [
|
|
|
31166
31123
|
snapshotLabel: "Consumables low now",
|
|
31167
31124
|
snapshotSection: "consumables"
|
|
31168
31125
|
},
|
|
31169
|
-
{
|
|
31170
|
-
id: "tanks",
|
|
31171
|
-
family: "device-events",
|
|
31172
|
-
label: "Tanks (low or full / back to normal)",
|
|
31173
|
-
bad: ["device-tank-low", "device-tank-full"],
|
|
31174
|
-
recovery: ["device-tank-normal"],
|
|
31175
|
-
snapshotLabel: "Tanks low or full now",
|
|
31176
|
-
snapshotSection: "tanks"
|
|
31177
|
-
},
|
|
31178
31126
|
{
|
|
31179
31127
|
id: "motion-noise",
|
|
31180
31128
|
family: "device-events",
|
package/dist/client.mjs
CHANGED
|
@@ -908,7 +908,7 @@ z.object({
|
|
|
908
908
|
* ONE table for everyone who asks "is this device HIGH?": the
|
|
909
909
|
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
910
910
|
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
911
|
-
* the sources of a
|
|
911
|
+
* the sources of a pulse (`compilePulseOverride`, D936).
|
|
912
912
|
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
913
913
|
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
914
914
|
*
|
|
@@ -22258,9 +22258,6 @@ var NcSystemEventKindSchema = z.enum([
|
|
|
22258
22258
|
"device-battery-normal",
|
|
22259
22259
|
"device-consumable-low",
|
|
22260
22260
|
"device-consumable-normal",
|
|
22261
|
-
"device-tank-low",
|
|
22262
|
-
"device-tank-full",
|
|
22263
|
-
"device-tank-normal",
|
|
22264
22261
|
"stream-online",
|
|
22265
22262
|
"stream-offline",
|
|
22266
22263
|
"node-online",
|
|
@@ -22307,13 +22304,14 @@ var NcSystemEventKindSchema = z.enum([
|
|
|
22307
22304
|
"camera-enabled"
|
|
22308
22305
|
]);
|
|
22309
22306
|
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
22310
|
-
var NC_LEGACY_SYSTEM_EVENT_KINDS =
|
|
22307
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = [
|
|
22311
22308
|
"camera-online",
|
|
22312
22309
|
"camera-offline",
|
|
22313
22310
|
"camera-disabled",
|
|
22314
22311
|
"camera-enabled"
|
|
22315
|
-
]
|
|
22316
|
-
|
|
22312
|
+
];
|
|
22313
|
+
var NC_LEGACY_SYSTEM_EVENT_KIND_SET = new Set(NC_LEGACY_SYSTEM_EVENT_KINDS);
|
|
22314
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KIND_SET.has(kind));
|
|
22317
22315
|
/**
|
|
22318
22316
|
* The panel's transitions, as ONE list.
|
|
22319
22317
|
*
|
|
@@ -23490,18 +23488,11 @@ var NcRuleSchema = NcRuleInputSchema.extend({
|
|
|
23490
23488
|
*/
|
|
23491
23489
|
disabledTargetIds: z.array(z.string()).default([])
|
|
23492
23490
|
});
|
|
23493
|
-
/**
|
|
23494
|
-
* The state-summary SECTIONS (D647 / D698 / D708): the D637 kind groups that
|
|
23495
|
-
* report a still-true state. `addons` is the crash-looped addons only and
|
|
23496
|
-
* `addon-updates` the addons that are behind (D708 split them). `backups-exports` and `alarm` are not sections — a completed
|
|
23497
|
-
* job is not an open state, and the alarm stays instant.
|
|
23498
|
-
*/
|
|
23499
23491
|
var NcStateSummarySectionIdSchema = z.enum([
|
|
23500
23492
|
"device-state",
|
|
23501
23493
|
"streams",
|
|
23502
23494
|
"battery",
|
|
23503
23495
|
"consumables",
|
|
23504
|
-
"tanks",
|
|
23505
23496
|
"detection-blind",
|
|
23506
23497
|
"nodes",
|
|
23507
23498
|
"addons",
|
|
@@ -26519,6 +26510,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
26519
26510
|
getStatus: (input) => dispatch("recording-onboard", "recordingOnboard", "getStatus", "query", input)
|
|
26520
26511
|
};
|
|
26521
26512
|
const recordingSignalInterface = { getStatus: (input) => dispatch("recording-signal", "recordingSignal", "getStatus", "query", input) };
|
|
26513
|
+
const runningStateInterface = { getStatus: (input) => dispatch("running-state", "runningState", "getStatus", "query", input) };
|
|
26522
26514
|
const sceneMonitorInterface = {
|
|
26523
26515
|
listScenes: (input) => dispatch("scene-monitor", "sceneMonitor", "listScenes", "query", input),
|
|
26524
26516
|
listScenesBatch: (input) => dispatch("scene-monitor", "sceneMonitor", "listScenesBatch", "query", input),
|
|
@@ -26845,6 +26837,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
26845
26837
|
ptzAutotrack: createSliceHandle(stateSource, binding.deviceId, "ptz-autotrack"),
|
|
26846
26838
|
recordingOnboard: createSliceHandle(stateSource, binding.deviceId, "recording-onboard"),
|
|
26847
26839
|
recordingSignal: createSliceHandle(stateSource, binding.deviceId, "recording-signal"),
|
|
26840
|
+
runningState: createSliceHandle(stateSource, binding.deviceId, "running-state"),
|
|
26848
26841
|
sceneMonitor: createSliceHandle(stateSource, binding.deviceId, "scene-monitor"),
|
|
26849
26842
|
scriptRunner: createSliceHandle(stateSource, binding.deviceId, "script-runner"),
|
|
26850
26843
|
smoke: createSliceHandle(stateSource, binding.deviceId, "smoke"),
|
|
@@ -26933,6 +26926,7 @@ function createDeviceProxy(api, binding, opts) {
|
|
|
26933
26926
|
...bound("recording") ? { recording: recordingInterface } : {},
|
|
26934
26927
|
...bound("recording-onboard") ? { recordingOnboard: recordingOnboardInterface } : {},
|
|
26935
26928
|
...bound("recording-signal") ? { recordingSignal: recordingSignalInterface } : {},
|
|
26929
|
+
...bound("running-state") ? { runningState: runningStateInterface } : {},
|
|
26936
26930
|
...bound("scene-monitor") ? { sceneMonitor: sceneMonitorInterface } : {},
|
|
26937
26931
|
...bound("script-runner") ? { scriptRunner: scriptRunnerInterface } : {},
|
|
26938
26932
|
...bound("smoke") ? { smoke: smokeInterface } : {},
|
|
@@ -28735,6 +28729,7 @@ new Set(["devices", "classes"]);
|
|
|
28735
28729
|
* narrows, and still fails CLOSED on a subject that cannot produce the identity
|
|
28736
28730
|
* it tests (a device the mirror cannot name is not evidence of a camera).
|
|
28737
28731
|
*/
|
|
28732
|
+
var LEGACY_KINDS_WITHOUT_FILTERS = new Set(NC_LEGACY_SYSTEM_EVENT_KINDS);
|
|
28738
28733
|
/**
|
|
28739
28734
|
* Every filter, for the callers that must cover all of them (guards, tests).
|
|
28740
28735
|
*
|
|
@@ -28758,6 +28753,7 @@ var NC_SYSTEM_EVENT_FILTER_KEYS = [
|
|
|
28758
28753
|
* ignores it and an editor hides its input. It never means "excluded".
|
|
28759
28754
|
*/
|
|
28760
28755
|
function systemEventFilterApplies(kind, filter) {
|
|
28756
|
+
if (LEGACY_KINDS_WITHOUT_FILTERS.has(kind)) return false;
|
|
28761
28757
|
switch (filter) {
|
|
28762
28758
|
case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind.startsWith("motion-") || kind.startsWith("recording-") || kind === "alarm-triggered";
|
|
28763
28759
|
case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind" || kind.startsWith("motion-");
|
|
@@ -28812,9 +28808,6 @@ var NC_SYSTEM_EVENT_FAMILY = {
|
|
|
28812
28808
|
"device-battery-normal": "device-events",
|
|
28813
28809
|
"device-consumable-low": "device-events",
|
|
28814
28810
|
"device-consumable-normal": "device-events",
|
|
28815
|
-
"device-tank-low": "device-events",
|
|
28816
|
-
"device-tank-full": "device-events",
|
|
28817
|
-
"device-tank-normal": "device-events",
|
|
28818
28811
|
"stream-online": "device-events",
|
|
28819
28812
|
"stream-offline": "device-events",
|
|
28820
28813
|
"detection-blind": "device-events",
|
|
@@ -28909,16 +28902,6 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
28909
28902
|
label: "Consumables",
|
|
28910
28903
|
kinds: ["device-consumable-low", "device-consumable-normal"]
|
|
28911
28904
|
},
|
|
28912
|
-
{
|
|
28913
|
-
id: "tanks",
|
|
28914
|
-
family: "device-events",
|
|
28915
|
-
label: "Tanks",
|
|
28916
|
-
kinds: [
|
|
28917
|
-
"device-tank-low",
|
|
28918
|
-
"device-tank-full",
|
|
28919
|
-
"device-tank-normal"
|
|
28920
|
-
]
|
|
28921
|
-
},
|
|
28922
28905
|
{
|
|
28923
28906
|
id: "detection-blind",
|
|
28924
28907
|
family: "device-events",
|
|
@@ -29892,11 +29875,6 @@ var RULE_BODY_ONLY = ["body"];
|
|
|
29892
29875
|
var RULE_TEXT = ["title", "body"];
|
|
29893
29876
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
29894
29877
|
var CONSUMABLE = ["device-consumable-low", "device-consumable-normal"];
|
|
29895
|
-
var TANK = [
|
|
29896
|
-
"device-tank-low",
|
|
29897
|
-
"device-tank-full",
|
|
29898
|
-
"device-tank-normal"
|
|
29899
|
-
];
|
|
29900
29878
|
var ALERT_EPISODE = [
|
|
29901
29879
|
"alert-critical",
|
|
29902
29880
|
"alert-error",
|
|
@@ -29928,7 +29906,6 @@ var DEVICE_EVENTS = [
|
|
|
29928
29906
|
"device-enabled",
|
|
29929
29907
|
...BATTERY,
|
|
29930
29908
|
...CONSUMABLE,
|
|
29931
|
-
...TANK,
|
|
29932
29909
|
"stream-online",
|
|
29933
29910
|
"stream-offline",
|
|
29934
29911
|
"detection-blind",
|
|
@@ -29974,12 +29951,6 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
29974
29951
|
example: "Robot — filter 10 %",
|
|
29975
29952
|
kinds: CONSUMABLE
|
|
29976
29953
|
},
|
|
29977
|
-
{
|
|
29978
|
-
name: "summaryTanks",
|
|
29979
|
-
label: "Summary: tanks",
|
|
29980
|
-
example: "Robot — clean water low",
|
|
29981
|
-
kinds: TANK
|
|
29982
|
-
},
|
|
29983
29954
|
{
|
|
29984
29955
|
name: "summaryDetection",
|
|
29985
29956
|
label: "Summary: cameras detecting nothing",
|
|
@@ -30388,18 +30359,7 @@ var NC_TEMPLATE_VARS = [
|
|
|
30388
30359
|
families: ["rule"],
|
|
30389
30360
|
fields: [...RULE_TEXT],
|
|
30390
30361
|
kinds: ["system"],
|
|
30391
|
-
systemEventKinds: [...CONSUMABLE
|
|
30392
|
-
},
|
|
30393
|
-
{
|
|
30394
|
-
name: "tank",
|
|
30395
|
-
label: "Tank",
|
|
30396
|
-
description: "Which tank, as a stable token: cleanWater, dirtyWater, detergent, dustBin, or the device key of any other supply (salt, rinse aid).",
|
|
30397
|
-
example: "clean water",
|
|
30398
|
-
group: "system",
|
|
30399
|
-
families: ["rule"],
|
|
30400
|
-
fields: [...RULE_TEXT],
|
|
30401
|
-
kinds: ["system"],
|
|
30402
|
-
systemEventKinds: [...TANK]
|
|
30362
|
+
systemEventKinds: [...CONSUMABLE]
|
|
30403
30363
|
},
|
|
30404
30364
|
{
|
|
30405
30365
|
name: "profile",
|
|
@@ -31050,9 +31010,6 @@ var NC_TEMPLATE_VARS = [
|
|
|
31050
31010
|
* delete it from here then, and the served catalog names it again.
|
|
31051
31011
|
*/
|
|
31052
31012
|
var NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS = [
|
|
31053
|
-
"device-tank-low",
|
|
31054
|
-
"device-tank-full",
|
|
31055
|
-
"device-tank-normal",
|
|
31056
31013
|
"node-restarting",
|
|
31057
31014
|
"node-updating",
|
|
31058
31015
|
"alert-critical",
|
|
@@ -31165,15 +31122,6 @@ var NC_SYSTEM_EVENT_CLASS_SPECS = [
|
|
|
31165
31122
|
snapshotLabel: "Consumables low now",
|
|
31166
31123
|
snapshotSection: "consumables"
|
|
31167
31124
|
},
|
|
31168
|
-
{
|
|
31169
|
-
id: "tanks",
|
|
31170
|
-
family: "device-events",
|
|
31171
|
-
label: "Tanks (low or full / back to normal)",
|
|
31172
|
-
bad: ["device-tank-low", "device-tank-full"],
|
|
31173
|
-
recovery: ["device-tank-normal"],
|
|
31174
|
-
snapshotLabel: "Tanks low or full now",
|
|
31175
|
-
snapshotSection: "tanks"
|
|
31176
|
-
},
|
|
31177
31125
|
{
|
|
31178
31126
|
id: "motion-noise",
|
|
31179
31127
|
family: "device-events",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Source devices the generic compiler fixtures name. Not a new catalogue.
|
|
3
|
+
*/
|
|
4
|
+
import type { CompositionSourceRef } from '../../composition.js';
|
|
5
|
+
export interface FixtureFieldRead {
|
|
6
|
+
readonly source: CompositionSourceRef;
|
|
7
|
+
readonly cap: string;
|
|
8
|
+
readonly fieldPath: string;
|
|
9
|
+
readonly valueKind: 'boolean' | 'number' | 'string';
|
|
10
|
+
}
|
|
11
|
+
export declare const FEEDER: CompositionSourceRef;
|
|
12
|
+
export declare const BATTERY_NUMBER: FixtureFieldRead;
|
|
13
|
+
export declare const DESICCANT_STRING: FixtureFieldRead;
|
|
14
|
+
export declare const DISHWASHER: CompositionSourceRef;
|
|
15
|
+
export declare const SWITCH_REF: CompositionSourceRef;
|
|
16
|
+
export declare const CAMERA_615: CompositionSourceRef;
|
|
17
|
+
export declare const DOORBELL_SWITCH: CompositionSourceRef;
|
|
18
|
+
export declare const PIR_SENSOR: {
|
|
19
|
+
readonly addonId: 'provider-homeassistant';
|
|
20
|
+
readonly stableId: 'ha:pir';
|
|
21
|
+
readonly mode: 'in-addition';
|
|
22
|
+
};
|
|
23
|
+
export declare const GATE_SENSOR: {
|
|
24
|
+
readonly addonId: 'provider-zigbee';
|
|
25
|
+
readonly stableId: 'z:gate';
|
|
26
|
+
readonly mode: 'confirm';
|
|
27
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ScalarCompileInput } from '../scalar-compile.js';
|
|
2
|
+
import type { CustomizeStored } from '../stored.js';
|
|
3
|
+
export interface CustomizeStoredCase {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly input: ScalarCompileInput;
|
|
6
|
+
readonly stored: CustomizeStored;
|
|
7
|
+
}
|
|
8
|
+
export declare const CUSTOMIZE_STORED_CASES: readonly CustomizeStoredCase[];
|
|
9
|
+
export interface NoncanonicalCustomizeStored {
|
|
10
|
+
readonly id: string;
|
|
11
|
+
readonly stored: CustomizeStored;
|
|
12
|
+
}
|
|
13
|
+
export declare const NONCANONICAL_CUSTOMIZE_STORED: readonly NoncanonicalCustomizeStored[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CompositionFieldsFeature, CompositionSourceRef } from '../composition.js';
|
|
2
|
+
import { type CameraSensorsConfig } from '../../pipeline/camera-sensors.js';
|
|
3
|
+
import type { PulseOverrideDraft, SpanOverrideDraft } from './override-draft.js';
|
|
4
|
+
import type { CustomizeRoundTrip } from './stored.js';
|
|
5
|
+
export interface PulseCompileInput {
|
|
6
|
+
readonly draft: PulseOverrideDraft;
|
|
7
|
+
readonly device: CompositionSourceRef;
|
|
8
|
+
readonly changedAtFields: readonly string[];
|
|
9
|
+
}
|
|
10
|
+
export interface SpanCompiled {
|
|
11
|
+
readonly config: CameraSensorsConfig | null;
|
|
12
|
+
readonly timeoutMs: number;
|
|
13
|
+
readonly cooldownMs: number | undefined;
|
|
14
|
+
}
|
|
15
|
+
export interface SpanCompileInput {
|
|
16
|
+
readonly draft: SpanOverrideDraft;
|
|
17
|
+
readonly device: CompositionSourceRef;
|
|
18
|
+
}
|
|
19
|
+
export declare function compilePulseOverride(input: PulseCompileInput): CustomizeRoundTrip<CompositionFieldsFeature>;
|
|
20
|
+
export declare function compileSpanOverride(input: SpanCompileInput): CustomizeRoundTrip<SpanCompiled>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recover a pulse draft only when compiling it again reproduces the stored
|
|
3
|
+
* feature. Anything else is another formula.
|
|
4
|
+
*/
|
|
5
|
+
import type { CompositionFieldsFeature, CompositionSourceRef } from '../composition.js';
|
|
6
|
+
import type { PulseOverrideDraft } from './override-draft.js';
|
|
7
|
+
export interface PulseDecoded {
|
|
8
|
+
readonly draft: PulseOverrideDraft;
|
|
9
|
+
readonly changedAtFields: readonly string[];
|
|
10
|
+
}
|
|
11
|
+
export interface PulseDecodeInput {
|
|
12
|
+
readonly feature: CompositionFieldsFeature;
|
|
13
|
+
readonly device: CompositionSourceRef;
|
|
14
|
+
readonly cap: string;
|
|
15
|
+
readonly targetId: string;
|
|
16
|
+
readonly timestampPath: string;
|
|
17
|
+
readonly counterPath: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function decodePulseOverride(input: PulseDecodeInput): PulseDecoded | null;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pulse and span edges for Customize preview (D936 §5.5).
|
|
3
|
+
*
|
|
4
|
+
* An unread sample is not a level. It does not arm, start, end or count
|
|
5
|
+
* (D49): a failed read must not look like a falling edge.
|
|
6
|
+
*/
|
|
7
|
+
export type LevelSample = {
|
|
8
|
+
readonly kind: 'unread';
|
|
9
|
+
} | {
|
|
10
|
+
readonly kind: 'level';
|
|
11
|
+
readonly active: boolean;
|
|
12
|
+
readonly changedAt: number | null;
|
|
13
|
+
};
|
|
14
|
+
export interface PulseState {
|
|
15
|
+
readonly priorActive: boolean | undefined;
|
|
16
|
+
readonly lastPressedAt: number | null;
|
|
17
|
+
readonly count: number;
|
|
18
|
+
readonly acceptedAt: number | null;
|
|
19
|
+
}
|
|
20
|
+
export interface SpanState {
|
|
21
|
+
readonly open: boolean;
|
|
22
|
+
readonly startedAt: number | null;
|
|
23
|
+
readonly endedAt: number | null;
|
|
24
|
+
readonly quietUntil: number | null;
|
|
25
|
+
readonly priorActive: boolean | undefined;
|
|
26
|
+
}
|
|
27
|
+
export interface SpanTiming {
|
|
28
|
+
readonly timeoutMs: number;
|
|
29
|
+
readonly cooldownMs: number;
|
|
30
|
+
readonly nowMs: number;
|
|
31
|
+
}
|
|
32
|
+
export declare const INITIAL_PULSE: PulseState;
|
|
33
|
+
export declare const INITIAL_SPAN: SpanState;
|
|
34
|
+
export declare function stepPulse(state: PulseState, sample: LevelSample, debounceMs: number): PulseState;
|
|
35
|
+
export declare function stepSpan(state: SpanState, sample: LevelSample, timing: SpanTiming): SpanState;
|