@camstack/addon-provider-gree 0.2.74 → 0.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/addon.js +66 -38
- package/dist/addon.mjs +66 -38
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7852,17 +7852,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7852
7852
|
/**
|
|
7853
7853
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7854
7854
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7855
|
-
* - `off`
|
|
7856
|
-
* - `events`
|
|
7857
|
-
* - `continuous`
|
|
7858
|
-
*
|
|
7859
|
-
*
|
|
7860
|
-
*
|
|
7855
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7856
|
+
* - `events` — every band records around triggers only.
|
|
7857
|
+
* - `continuous` — at least one band records continuously.
|
|
7858
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7859
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7860
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7861
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7862
|
+
*
|
|
7863
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7864
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7865
|
+
* has no effect.
|
|
7866
|
+
*
|
|
7867
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7868
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7869
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7870
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7871
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7861
7872
|
*/
|
|
7862
7873
|
var RecordingStorageModeSchema = _enum([
|
|
7863
7874
|
"off",
|
|
7864
7875
|
"events",
|
|
7865
|
-
"continuous"
|
|
7876
|
+
"continuous",
|
|
7877
|
+
"on-device-decision"
|
|
7866
7878
|
]);
|
|
7867
7879
|
/**
|
|
7868
7880
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7912,22 +7924,7 @@ var RecordingTriggersSchema = object({
|
|
|
7912
7924
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7913
7925
|
* registrare.
|
|
7914
7926
|
*/
|
|
7915
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7916
|
-
/**
|
|
7917
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
7918
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
7919
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
7920
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
7921
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
7922
|
-
*
|
|
7923
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
7924
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
7925
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
7926
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
7927
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
7928
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
7929
|
-
*/
|
|
7930
|
-
deviceSignal: boolean().optional()
|
|
7927
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7931
7928
|
});
|
|
7932
7929
|
/**
|
|
7933
7930
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -7957,13 +7954,28 @@ var RecordingBandSchema = object({
|
|
|
7957
7954
|
end: string().regex(HHMM),
|
|
7958
7955
|
mode: RecordingBandModeSchema,
|
|
7959
7956
|
triggers: RecordingBandTriggersSchema.optional(),
|
|
7957
|
+
/**
|
|
7958
|
+
* RETIRED (D381). A band no longer carries a pre-buffer of its own.
|
|
7959
|
+
*
|
|
7960
|
+
* It was the retroactive KEEP bound — which already-written segments survive
|
|
7961
|
+
* a trigger — and it had to be at least as wide as the widest pre-roll the
|
|
7962
|
+
* broker could serve, or the gate would delete the seconds the ring had just
|
|
7963
|
+
* handed the writer. That "at least as wide as" is the tell: it was a second
|
|
7964
|
+
* expression of the broker's retention, in different units, in a different
|
|
7965
|
+
* addon, with an invariant the operator had to maintain by hand. The keep
|
|
7966
|
+
* bound is now derived from the one prebuffer ceiling and there is nothing
|
|
7967
|
+
* left to configure here.
|
|
7968
|
+
*
|
|
7969
|
+
* The key survives in the SHAPE so a config written before that record still
|
|
7970
|
+
* parses and can be migrated deliberately — `RecordingBandSchema` is not
|
|
7971
|
+
* strict, so simply deleting it would strip an operator's value in silence on
|
|
7972
|
+
* the next save (the failure D380 came one commit from shipping). Nothing
|
|
7973
|
+
* reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
|
|
7974
|
+
*/
|
|
7960
7975
|
preBufferSec: number().min(0).optional(),
|
|
7961
7976
|
postBufferSec: number().min(0).optional()
|
|
7962
7977
|
});
|
|
7963
|
-
({
|
|
7964
|
-
preBufferSec: 15,
|
|
7965
|
-
postBufferSec: 30
|
|
7966
|
-
}).postBufferSec * 1e3;
|
|
7978
|
+
({ postBufferSec: 30 }).postBufferSec * 1e3;
|
|
7967
7979
|
/**
|
|
7968
7980
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
7969
7981
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -8011,8 +8023,29 @@ var RecordingConfigSchema = object({
|
|
|
8011
8023
|
* "off" is the absence of a covering band, never a band value.
|
|
8012
8024
|
*/
|
|
8013
8025
|
bands: array(RecordingBandSchema).default([]),
|
|
8026
|
+
/**
|
|
8027
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8028
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8029
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8030
|
+
* recording intent that is not a band.
|
|
8031
|
+
*
|
|
8032
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8033
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8034
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8035
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8036
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8037
|
+
* job however long it is, and closes one pad after the fall.
|
|
8038
|
+
*
|
|
8039
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8040
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8041
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8042
|
+
*/
|
|
8043
|
+
deviceDecision: boolean().optional(),
|
|
8014
8044
|
retention: RecordingRetentionSchema.optional()
|
|
8015
|
-
}).strict()
|
|
8045
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8046
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8047
|
+
path: ["bands"]
|
|
8048
|
+
});
|
|
8016
8049
|
/**
|
|
8017
8050
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8018
8051
|
*
|
|
@@ -21028,11 +21061,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21028
21061
|
});
|
|
21029
21062
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21030
21063
|
var CameraRecordingStatusSchema = object({
|
|
21031
|
-
mode:
|
|
21032
|
-
"off",
|
|
21033
|
-
"continuous",
|
|
21034
|
-
"events"
|
|
21035
|
-
]),
|
|
21064
|
+
mode: RecordingStorageModeSchema,
|
|
21036
21065
|
active: boolean(),
|
|
21037
21066
|
storageBytes: number()
|
|
21038
21067
|
});
|
|
@@ -29286,11 +29315,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
29286
29315
|
var RecordingStatusSchema = object({
|
|
29287
29316
|
deviceId: number(),
|
|
29288
29317
|
enabled: boolean(),
|
|
29289
|
-
|
|
29290
|
-
|
|
29291
|
-
|
|
29292
|
-
|
|
29293
|
-
]),
|
|
29318
|
+
/** THE derived storage mode, from the one definition
|
|
29319
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
29320
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
29321
|
+
activeMode: RecordingStorageModeSchema,
|
|
29294
29322
|
nodeId: string(),
|
|
29295
29323
|
storageBytes: number()
|
|
29296
29324
|
});
|
package/dist/addon.mjs
CHANGED
|
@@ -7851,17 +7851,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
|
7851
7851
|
/**
|
|
7852
7852
|
* DERIVED per-camera storage summary — the single field cheap consumers read
|
|
7853
7853
|
* (the viewer's status dot, the camera list) instead of walking `bands`:
|
|
7854
|
-
* - `off`
|
|
7855
|
-
* - `events`
|
|
7856
|
-
* - `continuous`
|
|
7857
|
-
*
|
|
7858
|
-
*
|
|
7859
|
-
*
|
|
7854
|
+
* - `off` — no band covers the camera (or it is disabled).
|
|
7855
|
+
* - `events` — every band records around triggers only.
|
|
7856
|
+
* - `continuous` — at least one band records continuously.
|
|
7857
|
+
* - `on-device-decision`— the DEVICE decides: recording runs for as long as the
|
|
7858
|
+
* camera raises its own `recording-signal` level (a robot that cleans). There
|
|
7859
|
+
* is no schedule to author, because there is no hour to program — see
|
|
7860
|
+
* {@link RecordingConfigSchema}`.deviceDecision`.
|
|
7861
|
+
*
|
|
7862
|
+
* NEVER authored: the recorder stamps it from the authoritative intent
|
|
7863
|
+
* (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
|
|
7864
|
+
* has no effect.
|
|
7865
|
+
*
|
|
7866
|
+
* `on-device-decision` is named for WHO decides, not for how the recording is
|
|
7867
|
+
* requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
|
|
7868
|
+
* something the operator makes (the live gate is the recorder's own "demand
|
|
7869
|
+
* window"), and a knob whose name suggests the operator starts it while the
|
|
7870
|
+
* device actually does is the D62 shape — a control nobody can predict.
|
|
7860
7871
|
*/
|
|
7861
7872
|
var RecordingStorageModeSchema = _enum([
|
|
7862
7873
|
"off",
|
|
7863
7874
|
"events",
|
|
7864
|
-
"continuous"
|
|
7875
|
+
"continuous",
|
|
7876
|
+
"on-device-decision"
|
|
7865
7877
|
]);
|
|
7866
7878
|
/**
|
|
7867
7879
|
* Le macro classi che possono aprire una finestra di registrazione — le stesse
|
|
@@ -7911,22 +7923,7 @@ var RecordingTriggersSchema = object({
|
|
|
7911
7923
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
7912
7924
|
* registrare.
|
|
7913
7925
|
*/
|
|
7914
|
-
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7915
|
-
/**
|
|
7916
|
-
* La camera registra per tutta la durata del SEGNALE che lei stessa
|
|
7917
|
-
* pubblica — la cap `recording-signal` (`active: true` mentre il device è in
|
|
7918
|
-
* funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
|
|
7919
|
-
* resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
|
|
7920
|
-
* caduta, così una pulizia di quaranta minuti è UNA clip.
|
|
7921
|
-
*
|
|
7922
|
-
* Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
|
|
7923
|
-
* suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
|
|
7924
|
-
* riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
|
|
7925
|
-
* segnale mai abbassato (un evento perso) non può tenere aperta una
|
|
7926
|
-
* registrazione (D11). Vedi `recorder/addon/band-decision.ts`
|
|
7927
|
-
* (`holdTrigger` / `releaseTrigger`).
|
|
7928
|
-
*/
|
|
7929
|
-
deviceSignal: boolean().optional()
|
|
7926
|
+
sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
|
|
7930
7927
|
});
|
|
7931
7928
|
/**
|
|
7932
7929
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -7956,13 +7953,28 @@ var RecordingBandSchema = object({
|
|
|
7956
7953
|
end: string().regex(HHMM),
|
|
7957
7954
|
mode: RecordingBandModeSchema,
|
|
7958
7955
|
triggers: RecordingBandTriggersSchema.optional(),
|
|
7956
|
+
/**
|
|
7957
|
+
* RETIRED (D381). A band no longer carries a pre-buffer of its own.
|
|
7958
|
+
*
|
|
7959
|
+
* It was the retroactive KEEP bound — which already-written segments survive
|
|
7960
|
+
* a trigger — and it had to be at least as wide as the widest pre-roll the
|
|
7961
|
+
* broker could serve, or the gate would delete the seconds the ring had just
|
|
7962
|
+
* handed the writer. That "at least as wide as" is the tell: it was a second
|
|
7963
|
+
* expression of the broker's retention, in different units, in a different
|
|
7964
|
+
* addon, with an invariant the operator had to maintain by hand. The keep
|
|
7965
|
+
* bound is now derived from the one prebuffer ceiling and there is nothing
|
|
7966
|
+
* left to configure here.
|
|
7967
|
+
*
|
|
7968
|
+
* The key survives in the SHAPE so a config written before that record still
|
|
7969
|
+
* parses and can be migrated deliberately — `RecordingBandSchema` is not
|
|
7970
|
+
* strict, so simply deleting it would strip an operator's value in silence on
|
|
7971
|
+
* the next save (the failure D380 came one commit from shipping). Nothing
|
|
7972
|
+
* reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
|
|
7973
|
+
*/
|
|
7959
7974
|
preBufferSec: number().min(0).optional(),
|
|
7960
7975
|
postBufferSec: number().min(0).optional()
|
|
7961
7976
|
});
|
|
7962
|
-
({
|
|
7963
|
-
preBufferSec: 15,
|
|
7964
|
-
postBufferSec: 30
|
|
7965
|
-
}).postBufferSec * 1e3;
|
|
7977
|
+
({ postBufferSec: 30 }).postBufferSec * 1e3;
|
|
7966
7978
|
/**
|
|
7967
7979
|
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
7968
7980
|
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
@@ -8010,8 +8022,29 @@ var RecordingConfigSchema = object({
|
|
|
8010
8022
|
* "off" is the absence of a covering band, never a band value.
|
|
8011
8023
|
*/
|
|
8012
8024
|
bands: array(RecordingBandSchema).default([]),
|
|
8025
|
+
/**
|
|
8026
|
+
* THE device-decided intent: record for as long as the camera itself raises
|
|
8027
|
+
* `recording-signal` (`active: true` while the device is in function — a
|
|
8028
|
+
* robot that cleans). AUTHORED, unlike `mode`, and the only authored
|
|
8029
|
+
* recording intent that is not a band.
|
|
8030
|
+
*
|
|
8031
|
+
* It carries NO schedule on purpose. A band is an HOUR, and this feature has
|
|
8032
|
+
* no hour to program: the device decides. What it costs the operator is one
|
|
8033
|
+
* flag — "this camera can record on its own" — and what it buys is the same
|
|
8034
|
+
* hold/release the recorder already implements (D371, `holdTrigger` /
|
|
8035
|
+
* `releaseTrigger`): the window opens on the rise, stays open for the whole
|
|
8036
|
+
* job however long it is, and closes one pad after the fall.
|
|
8037
|
+
*
|
|
8038
|
+
* EXCLUSIVE with `bands` (below): two authorities deciding when the same
|
|
8039
|
+
* camera records is the D62 failure. `off` remains `enabled: false`, so an
|
|
8040
|
+
* operator switching this camera off is REPORTED off, never as broken.
|
|
8041
|
+
*/
|
|
8042
|
+
deviceDecision: boolean().optional(),
|
|
8013
8043
|
retention: RecordingRetentionSchema.optional()
|
|
8014
|
-
}).strict()
|
|
8044
|
+
}).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
|
|
8045
|
+
message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
|
|
8046
|
+
path: ["bands"]
|
|
8047
|
+
});
|
|
8015
8048
|
/**
|
|
8016
8049
|
* Entity-relocation job state (storage entity-routing spec, Phase 4).
|
|
8017
8050
|
*
|
|
@@ -21027,11 +21060,7 @@ var CameraAudioStatusSchema = object({
|
|
|
21027
21060
|
});
|
|
21028
21061
|
/** Recording block — null when no recording cap is active for this device. */
|
|
21029
21062
|
var CameraRecordingStatusSchema = object({
|
|
21030
|
-
mode:
|
|
21031
|
-
"off",
|
|
21032
|
-
"continuous",
|
|
21033
|
-
"events"
|
|
21034
|
-
]),
|
|
21063
|
+
mode: RecordingStorageModeSchema,
|
|
21035
21064
|
active: boolean(),
|
|
21036
21065
|
storageBytes: number()
|
|
21037
21066
|
});
|
|
@@ -29285,11 +29314,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
29285
29314
|
var RecordingStatusSchema = object({
|
|
29286
29315
|
deviceId: number(),
|
|
29287
29316
|
enabled: boolean(),
|
|
29288
|
-
|
|
29289
|
-
|
|
29290
|
-
|
|
29291
|
-
|
|
29292
|
-
]),
|
|
29317
|
+
/** THE derived storage mode, from the one definition
|
|
29318
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
29319
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
29320
|
+
activeMode: RecordingStorageModeSchema,
|
|
29293
29321
|
nodeId: string(),
|
|
29294
29322
|
storageBytes: number()
|
|
29295
29323
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-gree",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.76",
|
|
4
4
|
"description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|