@camstack/addon-mqtt-broker 1.2.74 → 1.2.76
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/mqtt-broker.addon.js +47 -34
- package/dist/mqtt-broker.addon.mjs +47 -34
- package/package.json +1 -1
|
@@ -7878,17 +7878,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7878
7878
|
/**
|
|
7879
7879
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7880
7880
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7881
|
-
* - `off`
|
|
7882
|
-
* - `events`
|
|
7883
|
-
* - `continuous`
|
|
7884
|
-
*
|
|
7885
|
-
*
|
|
7886
|
-
*
|
|
7881
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7882
|
+
* - `events` — every band records around triggers only.
|
|
7883
|
+
* - `continuous` — at least one band records continuously.
|
|
7884
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7885
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7886
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7887
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7888
|
+
*
|
|
7889
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7890
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7891
|
+
* has no effect.
|
|
7892
|
+
*
|
|
7893
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7894
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7895
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7896
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7897
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7887
7898
|
*/
|
|
7888
7899
|
var RecordingStorageModeSchema = _enum([
|
|
7889
7900
|
"off",
|
|
7890
7901
|
"events",
|
|
7891
|
-
"continuous"
|
|
7902
|
+
"continuous",
|
|
7903
|
+
"on-device-decision"
|
|
7892
7904
|
]);
|
|
7893
7905
|
/**
|
|
7894
7906
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7938,22 +7950,7 @@ var RecordingTriggersSchema = object({
|
|
|
7938
7950
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7939
7951
|
* registrare.
|
|
7940
7952
|
*/
|
|
7941
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7942
|
-
/**
|
|
7943
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
7944
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
7945
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
7946
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
7947
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
7948
|
-
*
|
|
7949
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
7950
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
7951
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
7952
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
7953
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
7954
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
7955
|
-
*/
|
|
7956
|
-
deviceSignal: boolean().optional()
|
|
7953
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7957
7954
|
});
|
|
7958
7955
|
/**
|
|
7959
7956
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8037,8 +8034,29 @@ var RecordingConfigSchema = object({
|
|
|
8037
8034
|
* "off" is the absence of a covering band, never a band value.
|
|
8038
8035
|
*/
|
|
8039
8036
|
bands: array(RecordingBandSchema).default([]),
|
|
8037
|
+
/**
|
|
8038
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8039
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8040
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8041
|
+
* recording intent that is not a band.
|
|
8042
|
+
*
|
|
8043
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8044
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8045
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8046
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8047
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8048
|
+
* job however long it is, and closes one pad after the fall.
|
|
8049
|
+
*
|
|
8050
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8051
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8052
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8053
|
+
*/
|
|
8054
|
+
deviceDecision: boolean().optional(),
|
|
8040
8055
|
retention: RecordingRetentionSchema.optional()
|
|
8041
|
-
}).strict()
|
|
8056
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8057
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8058
|
+
path: ["bands"]
|
|
8059
|
+
});
|
|
8042
8060
|
/**
|
|
8043
8061
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8044
8062
|
*
|
|
@@ -20754,11 +20772,7 @@ var CameraAudioStatusSchema = object({
|
|
|
20754
20772
|
});
|
|
20755
20773
|
/** Recording block — null when no recording cap is active for this device. */
|
|
20756
20774
|
var CameraRecordingStatusSchema = object({
|
|
20757
|
-
mode:
|
|
20758
|
-
"off",
|
|
20759
|
-
"continuous",
|
|
20760
|
-
"events"
|
|
20761
|
-
]),
|
|
20775
|
+
mode: RecordingStorageModeSchema,
|
|
20762
20776
|
active: boolean(),
|
|
20763
20777
|
storageBytes: number()
|
|
20764
20778
|
});
|
|
@@ -27164,11 +27178,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
27164
27178
|
var RecordingStatusSchema = object({
|
|
27165
27179
|
deviceId: number(),
|
|
27166
27180
|
enabled: boolean(),
|
|
27167
|
-
|
|
27168
|
-
|
|
27169
|
-
|
|
27170
|
-
|
|
27171
|
-
]),
|
|
27181
|
+
/** THE derived storage mode, from the one definition
|
|
27182
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
27183
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
27184
|
+
activeMode: RecordingStorageModeSchema,
|
|
27172
27185
|
nodeId: string(),
|
|
27173
27186
|
storageBytes: number()
|
|
27174
27187
|
});
|
|
@@ -7873,17 +7873,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7873
7873
|
/**
|
|
7874
7874
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7875
7875
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7876
|
-
* - `off`
|
|
7877
|
-
* - `events`
|
|
7878
|
-
* - `continuous`
|
|
7879
|
-
*
|
|
7880
|
-
*
|
|
7881
|
-
*
|
|
7876
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7877
|
+
* - `events` — every band records around triggers only.
|
|
7878
|
+
* - `continuous` — at least one band records continuously.
|
|
7879
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7880
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7881
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7882
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7883
|
+
*
|
|
7884
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7885
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7886
|
+
* has no effect.
|
|
7887
|
+
*
|
|
7888
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7889
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7890
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7891
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7892
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7882
7893
|
*/
|
|
7883
7894
|
var RecordingStorageModeSchema = _enum([
|
|
7884
7895
|
"off",
|
|
7885
7896
|
"events",
|
|
7886
|
-
"continuous"
|
|
7897
|
+
"continuous",
|
|
7898
|
+
"on-device-decision"
|
|
7887
7899
|
]);
|
|
7888
7900
|
/**
|
|
7889
7901
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7933,22 +7945,7 @@ var RecordingTriggersSchema = object({
|
|
|
7933
7945
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7934
7946
|
* registrare.
|
|
7935
7947
|
*/
|
|
7936
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7937
|
-
/**
|
|
7938
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
7939
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
7940
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
7941
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
7942
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
7943
|
-
*
|
|
7944
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
7945
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
7946
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
7947
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
7948
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
7949
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
7950
|
-
*/
|
|
7951
|
-
deviceSignal: boolean().optional()
|
|
7948
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7952
7949
|
});
|
|
7953
7950
|
/**
|
|
7954
7951
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8032,8 +8029,29 @@ var RecordingConfigSchema = object({
|
|
|
8032
8029
|
* "off" is the absence of a covering band, never a band value.
|
|
8033
8030
|
*/
|
|
8034
8031
|
bands: array(RecordingBandSchema).default([]),
|
|
8032
|
+
/**
|
|
8033
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8034
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8035
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8036
|
+
* recording intent that is not a band.
|
|
8037
|
+
*
|
|
8038
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8039
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8040
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8041
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8042
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8043
|
+
* job however long it is, and closes one pad after the fall.
|
|
8044
|
+
*
|
|
8045
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8046
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8047
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8048
|
+
*/
|
|
8049
|
+
deviceDecision: boolean().optional(),
|
|
8035
8050
|
retention: RecordingRetentionSchema.optional()
|
|
8036
|
-
}).strict()
|
|
8051
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8052
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8053
|
+
path: ["bands"]
|
|
8054
|
+
});
|
|
8037
8055
|
/**
|
|
8038
8056
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8039
8057
|
*
|
|
@@ -20749,11 +20767,7 @@ var CameraAudioStatusSchema = object({
|
|
|
20749
20767
|
});
|
|
20750
20768
|
/** Recording block — null when no recording cap is active for this device. */
|
|
20751
20769
|
var CameraRecordingStatusSchema = object({
|
|
20752
|
-
mode:
|
|
20753
|
-
"off",
|
|
20754
|
-
"continuous",
|
|
20755
|
-
"events"
|
|
20756
|
-
]),
|
|
20770
|
+
mode: RecordingStorageModeSchema,
|
|
20757
20771
|
active: boolean(),
|
|
20758
20772
|
storageBytes: number()
|
|
20759
20773
|
});
|
|
@@ -27159,11 +27173,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
27159
27173
|
var RecordingStatusSchema = object({
|
|
27160
27174
|
deviceId: number(),
|
|
27161
27175
|
enabled: boolean(),
|
|
27162
|
-
|
|
27163
|
-
|
|
27164
|
-
|
|
27165
|
-
|
|
27166
|
-
]),
|
|
27176
|
+
/** THE derived storage mode, from the one definition
|
|
27177
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
27178
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
27179
|
+
activeMode: RecordingStorageModeSchema,
|
|
27167
27180
|
nodeId: string(),
|
|
27168
27181
|
storageBytes: number()
|
|
27169
27182
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-mqtt-broker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.76",
|
|
4
4
|
"description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|