@camstack/addon-notifiers 1.2.79 → 1.2.81
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 +66 -38
- package/dist/addon.mjs +66 -38
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7982,17 +7982,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7982
7982
|
/**
|
|
7983
7983
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7984
7984
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7985
|
-
* - `off`
|
|
7986
|
-
* - `events`
|
|
7987
|
-
* - `continuous`
|
|
7988
|
-
*
|
|
7989
|
-
*
|
|
7990
|
-
*
|
|
7985
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7986
|
+
* - `events` — every band records around triggers only.
|
|
7987
|
+
* - `continuous` — at least one band records continuously.
|
|
7988
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7989
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7990
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7991
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7992
|
+
*
|
|
7993
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7994
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7995
|
+
* has no effect.
|
|
7996
|
+
*
|
|
7997
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7998
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7999
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
8000
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
8001
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7991
8002
|
*/
|
|
7992
8003
|
var RecordingStorageModeSchema = _enum([
|
|
7993
8004
|
"off",
|
|
7994
8005
|
"events",
|
|
7995
|
-
"continuous"
|
|
8006
|
+
"continuous",
|
|
8007
|
+
"on-device-decision"
|
|
7996
8008
|
]);
|
|
7997
8009
|
/**
|
|
7998
8010
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -8042,22 +8054,7 @@ var RecordingTriggersSchema = object({
|
|
|
8042
8054
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8043
8055
|
* registrare.
|
|
8044
8056
|
*/
|
|
8045
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8046
|
-
/**
|
|
8047
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
8048
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
8049
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
8050
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
8051
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
8052
|
-
*
|
|
8053
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
8054
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
8055
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
8056
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
8057
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
8058
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
8059
|
-
*/
|
|
8060
|
-
deviceSignal: boolean().optional()
|
|
8057
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8061
8058
|
});
|
|
8062
8059
|
/**
|
|
8063
8060
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8087,13 +8084,28 @@ var RecordingBandSchema = object({
|
|
|
8087
8084
|
end: string().regex(HHMM),
|
|
8088
8085
|
mode: RecordingBandModeSchema,
|
|
8089
8086
|
triggers: RecordingBandTriggersSchema.optional(),
|
|
8087
|
+
/**
|
|
8088
|
+
* RETIRED (D381). A band no longer carries a pre-buffer of its own.
|
|
8089
|
+
*
|
|
8090
|
+
* It was the retroactive KEEP bound — which already-written segments survive
|
|
8091
|
+
* a trigger — and it had to be at least as wide as the widest pre-roll the
|
|
8092
|
+
* broker could serve, or the gate would delete the seconds the ring had just
|
|
8093
|
+
* handed the writer. That "at least as wide as" is the tell: it was a second
|
|
8094
|
+
* expression of the broker's retention, in different units, in a different
|
|
8095
|
+
* addon, with an invariant the operator had to maintain by hand. The keep
|
|
8096
|
+
* bound is now derived from the one prebuffer ceiling and there is nothing
|
|
8097
|
+
* left to configure here.
|
|
8098
|
+
*
|
|
8099
|
+
* The key survives in the SHAPE so a config written before that record still
|
|
8100
|
+
* parses and can be migrated deliberately — `RecordingBandSchema` is not
|
|
8101
|
+
* strict, so simply deleting it would strip an operator's value in silence on
|
|
8102
|
+
* the next save (the failure D380 came one commit from shipping). Nothing
|
|
8103
|
+
* reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
|
|
8104
|
+
*/
|
|
8090
8105
|
preBufferSec: number().min(0).optional(),
|
|
8091
8106
|
postBufferSec: number().min(0).optional()
|
|
8092
8107
|
});
|
|
8093
|
-
({
|
|
8094
|
-
preBufferSec: 15,
|
|
8095
|
-
postBufferSec: 30
|
|
8096
|
-
}).postBufferSec * 1e3;
|
|
8108
|
+
({ postBufferSec: 30 }).postBufferSec * 1e3;
|
|
8097
8109
|
/**
|
|
8098
8110
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
8099
8111
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -8141,8 +8153,29 @@ var RecordingConfigSchema = object({
|
|
|
8141
8153
|
* "off" is the absence of a covering band, never a band value.
|
|
8142
8154
|
*/
|
|
8143
8155
|
bands: array(RecordingBandSchema).default([]),
|
|
8156
|
+
/**
|
|
8157
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8158
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8159
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8160
|
+
* recording intent that is not a band.
|
|
8161
|
+
*
|
|
8162
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8163
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8164
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8165
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8166
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8167
|
+
* job however long it is, and closes one pad after the fall.
|
|
8168
|
+
*
|
|
8169
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8170
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8171
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8172
|
+
*/
|
|
8173
|
+
deviceDecision: boolean().optional(),
|
|
8144
8174
|
retention: RecordingRetentionSchema.optional()
|
|
8145
|
-
}).strict()
|
|
8175
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8176
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8177
|
+
path: ["bands"]
|
|
8178
|
+
});
|
|
8146
8179
|
/**
|
|
8147
8180
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8148
8181
|
*
|
|
@@ -20845,11 +20878,7 @@ var CameraAudioStatusSchema = object({
|
|
|
20845
20878
|
});
|
|
20846
20879
|
/** Recording block — null when no recording cap is active for this device. */
|
|
20847
20880
|
var CameraRecordingStatusSchema = object({
|
|
20848
|
-
mode:
|
|
20849
|
-
"off",
|
|
20850
|
-
"continuous",
|
|
20851
|
-
"events"
|
|
20852
|
-
]),
|
|
20881
|
+
mode: RecordingStorageModeSchema,
|
|
20853
20882
|
active: boolean(),
|
|
20854
20883
|
storageBytes: number()
|
|
20855
20884
|
});
|
|
@@ -27255,11 +27284,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
27255
27284
|
var RecordingStatusSchema = object({
|
|
27256
27285
|
deviceId: number(),
|
|
27257
27286
|
enabled: boolean(),
|
|
27258
|
-
|
|
27259
|
-
|
|
27260
|
-
|
|
27261
|
-
|
|
27262
|
-
]),
|
|
27287
|
+
/** THE derived storage mode, from the one definition
|
|
27288
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
27289
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
27290
|
+
activeMode: RecordingStorageModeSchema,
|
|
27263
27291
|
nodeId: string(),
|
|
27264
27292
|
storageBytes: number()
|
|
27265
27293
|
});
|
package/dist/addon.mjs
CHANGED
|
@@ -7955,17 +7955,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7955
7955
|
/**
|
|
7956
7956
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7957
7957
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7958
|
-
* - `off`
|
|
7959
|
-
* - `events`
|
|
7960
|
-
* - `continuous`
|
|
7961
|
-
*
|
|
7962
|
-
*
|
|
7963
|
-
*
|
|
7958
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7959
|
+
* - `events` — every band records around triggers only.
|
|
7960
|
+
* - `continuous` — at least one band records continuously.
|
|
7961
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7962
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7963
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7964
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7965
|
+
*
|
|
7966
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7967
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7968
|
+
* has no effect.
|
|
7969
|
+
*
|
|
7970
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7971
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7972
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7973
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7974
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7964
7975
|
*/
|
|
7965
7976
|
var RecordingStorageModeSchema = _enum([
|
|
7966
7977
|
"off",
|
|
7967
7978
|
"events",
|
|
7968
|
-
"continuous"
|
|
7979
|
+
"continuous",
|
|
7980
|
+
"on-device-decision"
|
|
7969
7981
|
]);
|
|
7970
7982
|
/**
|
|
7971
7983
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -8015,22 +8027,7 @@ var RecordingTriggersSchema = object({
|
|
|
8015
8027
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8016
8028
|
* registrare.
|
|
8017
8029
|
*/
|
|
8018
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8019
|
-
/**
|
|
8020
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
8021
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
8022
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
8023
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
8024
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
8025
|
-
*
|
|
8026
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
8027
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
8028
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
8029
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
8030
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
8031
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
8032
|
-
*/
|
|
8033
|
-
deviceSignal: boolean().optional()
|
|
8030
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
8034
8031
|
});
|
|
8035
8032
|
/**
|
|
8036
8033
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -8060,13 +8057,28 @@ var RecordingBandSchema = object({
|
|
|
8060
8057
|
end: string().regex(HHMM),
|
|
8061
8058
|
mode: RecordingBandModeSchema,
|
|
8062
8059
|
triggers: RecordingBandTriggersSchema.optional(),
|
|
8060
|
+
/**
|
|
8061
|
+
* RETIRED (D381). A band no longer carries a pre-buffer of its own.
|
|
8062
|
+
*
|
|
8063
|
+
* It was the retroactive KEEP bound — which already-written segments survive
|
|
8064
|
+
* a trigger — and it had to be at least as wide as the widest pre-roll the
|
|
8065
|
+
* broker could serve, or the gate would delete the seconds the ring had just
|
|
8066
|
+
* handed the writer. That "at least as wide as" is the tell: it was a second
|
|
8067
|
+
* expression of the broker's retention, in different units, in a different
|
|
8068
|
+
* addon, with an invariant the operator had to maintain by hand. The keep
|
|
8069
|
+
* bound is now derived from the one prebuffer ceiling and there is nothing
|
|
8070
|
+
* left to configure here.
|
|
8071
|
+
*
|
|
8072
|
+
* The key survives in the SHAPE so a config written before that record still
|
|
8073
|
+
* parses and can be migrated deliberately — `RecordingBandSchema` is not
|
|
8074
|
+
* strict, so simply deleting it would strip an operator's value in silence on
|
|
8075
|
+
* the next save (the failure D380 came one commit from shipping). Nothing
|
|
8076
|
+
* reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
|
|
8077
|
+
*/
|
|
8063
8078
|
preBufferSec: number().min(0).optional(),
|
|
8064
8079
|
postBufferSec: number().min(0).optional()
|
|
8065
8080
|
});
|
|
8066
|
-
({
|
|
8067
|
-
preBufferSec: 15,
|
|
8068
|
-
postBufferSec: 30
|
|
8069
|
-
}).postBufferSec * 1e3;
|
|
8081
|
+
({ postBufferSec: 30 }).postBufferSec * 1e3;
|
|
8070
8082
|
/**
|
|
8071
8083
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
8072
8084
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -8114,8 +8126,29 @@ var RecordingConfigSchema = object({
|
|
|
8114
8126
|
* "off" is the absence of a covering band, never a band value.
|
|
8115
8127
|
*/
|
|
8116
8128
|
bands: array(RecordingBandSchema).default([]),
|
|
8129
|
+
/**
|
|
8130
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8131
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8132
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8133
|
+
* recording intent that is not a band.
|
|
8134
|
+
*
|
|
8135
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8136
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8137
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8138
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8139
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8140
|
+
* job however long it is, and closes one pad after the fall.
|
|
8141
|
+
*
|
|
8142
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8143
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8144
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8145
|
+
*/
|
|
8146
|
+
deviceDecision: boolean().optional(),
|
|
8117
8147
|
retention: RecordingRetentionSchema.optional()
|
|
8118
|
-
}).strict()
|
|
8148
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8149
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8150
|
+
path: ["bands"]
|
|
8151
|
+
});
|
|
8119
8152
|
/**
|
|
8120
8153
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8121
8154
|
*
|
|
@@ -20818,11 +20851,7 @@ var CameraAudioStatusSchema = object({
|
|
|
20818
20851
|
});
|
|
20819
20852
|
/** Recording block — null when no recording cap is active for this device. */
|
|
20820
20853
|
var CameraRecordingStatusSchema = object({
|
|
20821
|
-
mode:
|
|
20822
|
-
"off",
|
|
20823
|
-
"continuous",
|
|
20824
|
-
"events"
|
|
20825
|
-
]),
|
|
20854
|
+
mode: RecordingStorageModeSchema,
|
|
20826
20855
|
active: boolean(),
|
|
20827
20856
|
storageBytes: number()
|
|
20828
20857
|
});
|
|
@@ -27228,11 +27257,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
27228
27257
|
var RecordingStatusSchema = object({
|
|
27229
27258
|
deviceId: number(),
|
|
27230
27259
|
enabled: boolean(),
|
|
27231
|
-
|
|
27232
|
-
|
|
27233
|
-
|
|
27234
|
-
|
|
27235
|
-
]),
|
|
27260
|
+
/** THE derived storage mode, from the one definition
|
|
27261
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
27262
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
27263
|
+
activeMode: RecordingStorageModeSchema,
|
|
27236
27264
|
nodeId: string(),
|
|
27237
27265
|
storageBytes: number()
|
|
27238
27266
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-notifiers",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.81",
|
|
4
4
|
"description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|