@camstack/addon-provider-wyze 0.2.79 → 0.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
|
@@ -7881,17 +7881,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7881
7881
|
/**
|
|
7882
7882
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7883
7883
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7884
|
-
* - `off`
|
|
7885
|
-
* - `events`
|
|
7886
|
-
* - `continuous`
|
|
7887
|
-
*
|
|
7888
|
-
*
|
|
7889
|
-
*
|
|
7884
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7885
|
+
* - `events` — every band records around triggers only.
|
|
7886
|
+
* - `continuous` — at least one band records continuously.
|
|
7887
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7888
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7889
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7890
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7891
|
+
*
|
|
7892
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7893
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7894
|
+
* has no effect.
|
|
7895
|
+
*
|
|
7896
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7897
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7898
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7899
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7900
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7890
7901
|
*/
|
|
7891
7902
|
var RecordingStorageModeSchema = _enum([
|
|
7892
7903
|
"off",
|
|
7893
7904
|
"events",
|
|
7894
|
-
"continuous"
|
|
7905
|
+
"continuous",
|
|
7906
|
+
"on-device-decision"
|
|
7895
7907
|
]);
|
|
7896
7908
|
/**
|
|
7897
7909
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7941,22 +7953,7 @@ var RecordingTriggersSchema = object({
|
|
|
7941
7953
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7942
7954
|
* registrare.
|
|
7943
7955
|
*/
|
|
7944
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7945
|
-
/**
|
|
7946
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
7947
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
7948
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
7949
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
7950
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
7951
|
-
*
|
|
7952
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
7953
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
7954
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
7955
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
7956
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
7957
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
7958
|
-
*/
|
|
7959
|
-
deviceSignal: boolean().optional()
|
|
7956
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7960
7957
|
});
|
|
7961
7958
|
/**
|
|
7962
7959
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -7986,13 +7983,28 @@ var RecordingBandSchema = object({
|
|
|
7986
7983
|
end: string().regex(HHMM),
|
|
7987
7984
|
mode: RecordingBandModeSchema,
|
|
7988
7985
|
triggers: RecordingBandTriggersSchema.optional(),
|
|
7986
|
+
/**
|
|
7987
|
+
* RETIRED (D381). A band no longer carries a pre-buffer of its own.
|
|
7988
|
+
*
|
|
7989
|
+
* It was the retroactive KEEP bound — which already-written segments survive
|
|
7990
|
+
* a trigger — and it had to be at least as wide as the widest pre-roll the
|
|
7991
|
+
* broker could serve, or the gate would delete the seconds the ring had just
|
|
7992
|
+
* handed the writer. That "at least as wide as" is the tell: it was a second
|
|
7993
|
+
* expression of the broker's retention, in different units, in a different
|
|
7994
|
+
* addon, with an invariant the operator had to maintain by hand. The keep
|
|
7995
|
+
* bound is now derived from the one prebuffer ceiling and there is nothing
|
|
7996
|
+
* left to configure here.
|
|
7997
|
+
*
|
|
7998
|
+
* The key survives in the SHAPE so a config written before that record still
|
|
7999
|
+
* parses and can be migrated deliberately — `RecordingBandSchema` is not
|
|
8000
|
+
* strict, so simply deleting it would strip an operator's value in silence on
|
|
8001
|
+
* the next save (the failure D380 came one commit from shipping). Nothing
|
|
8002
|
+
* reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
|
|
8003
|
+
*/
|
|
7989
8004
|
preBufferSec: number().min(0).optional(),
|
|
7990
8005
|
postBufferSec: number().min(0).optional()
|
|
7991
8006
|
});
|
|
7992
|
-
({
|
|
7993
|
-
preBufferSec: 15,
|
|
7994
|
-
postBufferSec: 30
|
|
7995
|
-
}).postBufferSec * 1e3;
|
|
8007
|
+
({ postBufferSec: 30 }).postBufferSec * 1e3;
|
|
7996
8008
|
/**
|
|
7997
8009
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
7998
8010
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -8040,8 +8052,29 @@ var RecordingConfigSchema = object({
|
|
|
8040
8052
|
* "off" is the absence of a covering band, never a band value.
|
|
8041
8053
|
*/
|
|
8042
8054
|
bands: array(RecordingBandSchema).default([]),
|
|
8055
|
+
/**
|
|
8056
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8057
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8058
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8059
|
+
* recording intent that is not a band.
|
|
8060
|
+
*
|
|
8061
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8062
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8063
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8064
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8065
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8066
|
+
* job however long it is, and closes one pad after the fall.
|
|
8067
|
+
*
|
|
8068
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8069
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8070
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8071
|
+
*/
|
|
8072
|
+
deviceDecision: boolean().optional(),
|
|
8043
8073
|
retention: RecordingRetentionSchema.optional()
|
|
8044
|
-
}).strict()
|
|
8074
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8075
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8076
|
+
path: ["bands"]
|
|
8077
|
+
});
|
|
8045
8078
|
/**
|
|
8046
8079
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8047
8080
|
*
|
|
@@ -21074,11 +21107,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21074
21107
|
});
|
|
21075
21108
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21076
21109
|
var CameraRecordingStatusSchema = object({
|
|
21077
|
-
mode:
|
|
21078
|
-
"off",
|
|
21079
|
-
"continuous",
|
|
21080
|
-
"events"
|
|
21081
|
-
]),
|
|
21110
|
+
mode: RecordingStorageModeSchema,
|
|
21082
21111
|
active: boolean(),
|
|
21083
21112
|
storageBytes: number()
|
|
21084
21113
|
});
|
|
@@ -29444,11 +29473,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
29444
29473
|
var RecordingStatusSchema = object({
|
|
29445
29474
|
deviceId: number(),
|
|
29446
29475
|
enabled: boolean(),
|
|
29447
|
-
|
|
29448
|
-
|
|
29449
|
-
|
|
29450
|
-
|
|
29451
|
-
]),
|
|
29476
|
+
/** THE derived storage mode, from the one definition
|
|
29477
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
29478
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
29479
|
+
activeMode: RecordingStorageModeSchema,
|
|
29452
29480
|
nodeId: string(),
|
|
29453
29481
|
storageBytes: number()
|
|
29454
29482
|
});
|
package/dist/addon.mjs
CHANGED
|
@@ -7860,17 +7860,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7860
7860
|
/**
|
|
7861
7861
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7862
7862
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7863
|
-
* - `off`
|
|
7864
|
-
* - `events`
|
|
7865
|
-
* - `continuous`
|
|
7866
|
-
*
|
|
7867
|
-
*
|
|
7868
|
-
*
|
|
7863
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7864
|
+
* - `events` — every band records around triggers only.
|
|
7865
|
+
* - `continuous` — at least one band records continuously.
|
|
7866
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7867
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7868
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7869
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7870
|
+
*
|
|
7871
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7872
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7873
|
+
* has no effect.
|
|
7874
|
+
*
|
|
7875
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7876
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7877
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7878
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7879
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7869
7880
|
*/
|
|
7870
7881
|
var RecordingStorageModeSchema = _enum([
|
|
7871
7882
|
"off",
|
|
7872
7883
|
"events",
|
|
7873
|
-
"continuous"
|
|
7884
|
+
"continuous",
|
|
7885
|
+
"on-device-decision"
|
|
7874
7886
|
]);
|
|
7875
7887
|
/**
|
|
7876
7888
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7920,22 +7932,7 @@ var RecordingTriggersSchema = object({
|
|
|
7920
7932
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7921
7933
|
* registrare.
|
|
7922
7934
|
*/
|
|
7923
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7924
|
-
/**
|
|
7925
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
7926
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
7927
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
7928
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
7929
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
7930
|
-
*
|
|
7931
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
7932
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
7933
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
7934
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
7935
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
7936
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
7937
|
-
*/
|
|
7938
|
-
deviceSignal: boolean().optional()
|
|
7935
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7939
7936
|
});
|
|
7940
7937
|
/**
|
|
7941
7938
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -7965,13 +7962,28 @@ var RecordingBandSchema = object({
|
|
|
7965
7962
|
end: string().regex(HHMM),
|
|
7966
7963
|
mode: RecordingBandModeSchema,
|
|
7967
7964
|
triggers: RecordingBandTriggersSchema.optional(),
|
|
7965
|
+
/**
|
|
7966
|
+
* RETIRED (D381). A band no longer carries a pre-buffer of its own.
|
|
7967
|
+
*
|
|
7968
|
+
* It was the retroactive KEEP bound — which already-written segments survive
|
|
7969
|
+
* a trigger — and it had to be at least as wide as the widest pre-roll the
|
|
7970
|
+
* broker could serve, or the gate would delete the seconds the ring had just
|
|
7971
|
+
* handed the writer. That "at least as wide as" is the tell: it was a second
|
|
7972
|
+
* expression of the broker's retention, in different units, in a different
|
|
7973
|
+
* addon, with an invariant the operator had to maintain by hand. The keep
|
|
7974
|
+
* bound is now derived from the one prebuffer ceiling and there is nothing
|
|
7975
|
+
* left to configure here.
|
|
7976
|
+
*
|
|
7977
|
+
* The key survives in the SHAPE so a config written before that record still
|
|
7978
|
+
* parses and can be migrated deliberately — `RecordingBandSchema` is not
|
|
7979
|
+
* strict, so simply deleting it would strip an operator's value in silence on
|
|
7980
|
+
* the next save (the failure D380 came one commit from shipping). Nothing
|
|
7981
|
+
* reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
|
|
7982
|
+
*/
|
|
7968
7983
|
preBufferSec: number().min(0).optional(),
|
|
7969
7984
|
postBufferSec: number().min(0).optional()
|
|
7970
7985
|
});
|
|
7971
|
-
({
|
|
7972
|
-
preBufferSec: 15,
|
|
7973
|
-
postBufferSec: 30
|
|
7974
|
-
}).postBufferSec * 1e3;
|
|
7986
|
+
({ postBufferSec: 30 }).postBufferSec * 1e3;
|
|
7975
7987
|
/**
|
|
7976
7988
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
7977
7989
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -8019,8 +8031,29 @@ var RecordingConfigSchema = object({
|
|
|
8019
8031
|
* "off" is the absence of a covering band, never a band value.
|
|
8020
8032
|
*/
|
|
8021
8033
|
bands: array(RecordingBandSchema).default([]),
|
|
8034
|
+
/**
|
|
8035
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8036
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8037
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8038
|
+
* recording intent that is not a band.
|
|
8039
|
+
*
|
|
8040
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8041
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8042
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8043
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8044
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8045
|
+
* job however long it is, and closes one pad after the fall.
|
|
8046
|
+
*
|
|
8047
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8048
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8049
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8050
|
+
*/
|
|
8051
|
+
deviceDecision: boolean().optional(),
|
|
8022
8052
|
retention: RecordingRetentionSchema.optional()
|
|
8023
|
-
}).strict()
|
|
8053
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8054
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8055
|
+
path: ["bands"]
|
|
8056
|
+
});
|
|
8024
8057
|
/**
|
|
8025
8058
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8026
8059
|
*
|
|
@@ -21053,11 +21086,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21053
21086
|
});
|
|
21054
21087
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21055
21088
|
var CameraRecordingStatusSchema = object({
|
|
21056
|
-
mode:
|
|
21057
|
-
"off",
|
|
21058
|
-
"continuous",
|
|
21059
|
-
"events"
|
|
21060
|
-
]),
|
|
21089
|
+
mode: RecordingStorageModeSchema,
|
|
21061
21090
|
active: boolean(),
|
|
21062
21091
|
storageBytes: number()
|
|
21063
21092
|
});
|
|
@@ -29423,11 +29452,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
29423
29452
|
var RecordingStatusSchema = object({
|
|
29424
29453
|
deviceId: number(),
|
|
29425
29454
|
enabled: boolean(),
|
|
29426
|
-
|
|
29427
|
-
|
|
29428
|
-
|
|
29429
|
-
|
|
29430
|
-
]),
|
|
29455
|
+
/** THE derived storage mode, from the one definition
|
|
29456
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
29457
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
29458
|
+
activeMode: RecordingStorageModeSchema,
|
|
29431
29459
|
nodeId: string(),
|
|
29432
29460
|
storageBytes: number()
|
|
29433
29461
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-wyze",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.81",
|
|
4
4
|
"description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|