@camstack/addon-decoder-nodeav 1.2.75 → 1.2.77

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/index.js CHANGED
@@ -7849,17 +7849,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7849
7849
  /**
7850
7850
  * DERIVED per-camera storage summary — the single field cheap consumers read
7851
7851
  * (the viewer's status dot, the camera list) instead of walking `bands`:
7852
- * - `off` — no band covers the camera (or it is disabled).
7853
- * - `events` — every band records around triggers only.
7854
- * - `continuous` — at least one band records continuously.
7855
- *
7856
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
7857
- * every save (`activeModeForConfig`). Writing it has no effect.
7852
+ * - `off` — no band covers the camera (or it is disabled).
7853
+ * - `events` — every band records around triggers only.
7854
+ * - `continuous` — at least one band records continuously.
7855
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
7856
+ * camera raises its own `recording-signal` level (a robot that cleans). There
7857
+ * is no schedule to author, because there is no hour to program — see
7858
+ * {@link RecordingConfigSchema}`.deviceDecision`.
7859
+ *
7860
+ * NEVER authored: the recorder stamps it from the authoritative intent
7861
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
7862
+ * has no effect.
7863
+ *
7864
+ * `on-device-decision` is named for WHO decides, not for how the recording is
7865
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
7866
+ * something the operator makes (the live gate is the recorder's own "demand
7867
+ * window"), and a knob whose name suggests the operator starts it while the
7868
+ * device actually does is the D62 shape — a control nobody can predict.
7858
7869
  */
7859
7870
  var RecordingStorageModeSchema = _enum([
7860
7871
  "off",
7861
7872
  "events",
7862
- "continuous"
7873
+ "continuous",
7874
+ "on-device-decision"
7863
7875
  ]);
7864
7876
  /**
7865
7877
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -7909,22 +7921,7 @@ var RecordingTriggersSchema = object({
7909
7921
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7910
7922
  * registrare.
7911
7923
  */
7912
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7913
- /**
7914
- * La camera registra per tutta la durata del SEGNALE che lei stessa
7915
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7916
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7917
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7918
- * caduta, così una pulizia di quaranta minuti è UNA clip.
7919
- *
7920
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7921
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7922
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7923
- * segnale mai abbassato (un evento perso) non può tenere aperta una
7924
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7925
- * (`holdTrigger` / `releaseTrigger`).
7926
- */
7927
- deviceSignal: boolean().optional()
7924
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7928
7925
  });
7929
7926
  /**
7930
7927
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -7954,13 +7951,28 @@ var RecordingBandSchema = object({
7954
7951
  end: string().regex(HHMM),
7955
7952
  mode: RecordingBandModeSchema,
7956
7953
  triggers: RecordingBandTriggersSchema.optional(),
7954
+ /**
7955
+ * RETIRED (D381). A band no longer carries a pre-buffer of its own.
7956
+ *
7957
+ * It was the retroactive KEEP bound — which already-written segments survive
7958
+ * a trigger — and it had to be at least as wide as the widest pre-roll the
7959
+ * broker could serve, or the gate would delete the seconds the ring had just
7960
+ * handed the writer. That "at least as wide as" is the tell: it was a second
7961
+ * expression of the broker's retention, in different units, in a different
7962
+ * addon, with an invariant the operator had to maintain by hand. The keep
7963
+ * bound is now derived from the one prebuffer ceiling and there is nothing
7964
+ * left to configure here.
7965
+ *
7966
+ * The key survives in the SHAPE so a config written before that record still
7967
+ * parses and can be migrated deliberately — `RecordingBandSchema` is not
7968
+ * strict, so simply deleting it would strip an operator's value in silence on
7969
+ * the next save (the failure D380 came one commit from shipping). Nothing
7970
+ * reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
7971
+ */
7957
7972
  preBufferSec: number().min(0).optional(),
7958
7973
  postBufferSec: number().min(0).optional()
7959
7974
  });
7960
- ({
7961
- preBufferSec: 15,
7962
- postBufferSec: 30
7963
- }).postBufferSec * 1e3;
7975
+ ({ postBufferSec: 30 }).postBufferSec * 1e3;
7964
7976
  /**
7965
7977
  * Per-device retention overrides. Every field is optional; an unset or `0`
7966
7978
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -8008,8 +8020,29 @@ var RecordingConfigSchema = object({
8008
8020
  * "off" is the absence of a covering band, never a band value.
8009
8021
  */
8010
8022
  bands: array(RecordingBandSchema).default([]),
8023
+ /**
8024
+ * THE device-decided intent: record for as long as the camera itself raises
8025
+ * `recording-signal` (`active: true` while the device is in function — a
8026
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8027
+ * recording intent that is not a band.
8028
+ *
8029
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8030
+ * no hour to program: the device decides. What it costs the operator is one
8031
+ * flag — "this camera can record on its own" — and what it buys is the same
8032
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8033
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8034
+ * job however long it is, and closes one pad after the fall.
8035
+ *
8036
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8037
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8038
+ * operator switching this camera off is REPORTED off, never as broken.
8039
+ */
8040
+ deviceDecision: boolean().optional(),
8011
8041
  retention: RecordingRetentionSchema.optional()
8012
- }).strict();
8042
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8043
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8044
+ path: ["bands"]
8045
+ });
8013
8046
  /**
8014
8047
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8015
8048
  *
@@ -20787,11 +20820,7 @@ var CameraAudioStatusSchema = object({
20787
20820
  });
20788
20821
  /** Recording block — null when no recording cap is active for this device. */
20789
20822
  var CameraRecordingStatusSchema = object({
20790
- mode: _enum([
20791
- "off",
20792
- "continuous",
20793
- "events"
20794
- ]),
20823
+ mode: RecordingStorageModeSchema,
20795
20824
  active: boolean(),
20796
20825
  storageBytes: number()
20797
20826
  });
@@ -27197,11 +27226,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27197
27226
  var RecordingStatusSchema = object({
27198
27227
  deviceId: number(),
27199
27228
  enabled: boolean(),
27200
- activeMode: _enum([
27201
- "off",
27202
- "continuous",
27203
- "events"
27204
- ]),
27229
+ /** THE derived storage mode, from the one definition
27230
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27231
+ * `on-device-decision` could have reached the recorder and not the status. */
27232
+ activeMode: RecordingStorageModeSchema,
27205
27233
  nodeId: string(),
27206
27234
  storageBytes: number()
27207
27235
  });
package/dist/index.mjs CHANGED
@@ -7845,17 +7845,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7845
7845
  /**
7846
7846
  * DERIVED per-camera storage summary — the single field cheap consumers read
7847
7847
  * (the viewer's status dot, the camera list) instead of walking `bands`:
7848
- * - `off` — no band covers the camera (or it is disabled).
7849
- * - `events` — every band records around triggers only.
7850
- * - `continuous` — at least one band records continuously.
7851
- *
7852
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
7853
- * every save (`activeModeForConfig`). Writing it has no effect.
7848
+ * - `off` — no band covers the camera (or it is disabled).
7849
+ * - `events` — every band records around triggers only.
7850
+ * - `continuous` — at least one band records continuously.
7851
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
7852
+ * camera raises its own `recording-signal` level (a robot that cleans). There
7853
+ * is no schedule to author, because there is no hour to program — see
7854
+ * {@link RecordingConfigSchema}`.deviceDecision`.
7855
+ *
7856
+ * NEVER authored: the recorder stamps it from the authoritative intent
7857
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
7858
+ * has no effect.
7859
+ *
7860
+ * `on-device-decision` is named for WHO decides, not for how the recording is
7861
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
7862
+ * something the operator makes (the live gate is the recorder's own "demand
7863
+ * window"), and a knob whose name suggests the operator starts it while the
7864
+ * device actually does is the D62 shape — a control nobody can predict.
7854
7865
  */
7855
7866
  var RecordingStorageModeSchema = _enum([
7856
7867
  "off",
7857
7868
  "events",
7858
- "continuous"
7869
+ "continuous",
7870
+ "on-device-decision"
7859
7871
  ]);
7860
7872
  /**
7861
7873
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -7905,22 +7917,7 @@ var RecordingTriggersSchema = object({
7905
7917
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7906
7918
  * registrare.
7907
7919
  */
7908
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7909
- /**
7910
- * La camera registra per tutta la durata del SEGNALE che lei stessa
7911
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7912
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7913
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7914
- * caduta, così una pulizia di quaranta minuti è UNA clip.
7915
- *
7916
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7917
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7918
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7919
- * segnale mai abbassato (un evento perso) non può tenere aperta una
7920
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7921
- * (`holdTrigger` / `releaseTrigger`).
7922
- */
7923
- deviceSignal: boolean().optional()
7920
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7924
7921
  });
7925
7922
  /**
7926
7923
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -7950,13 +7947,28 @@ var RecordingBandSchema = object({
7950
7947
  end: string().regex(HHMM),
7951
7948
  mode: RecordingBandModeSchema,
7952
7949
  triggers: RecordingBandTriggersSchema.optional(),
7950
+ /**
7951
+ * RETIRED (D381). A band no longer carries a pre-buffer of its own.
7952
+ *
7953
+ * It was the retroactive KEEP bound — which already-written segments survive
7954
+ * a trigger — and it had to be at least as wide as the widest pre-roll the
7955
+ * broker could serve, or the gate would delete the seconds the ring had just
7956
+ * handed the writer. That "at least as wide as" is the tell: it was a second
7957
+ * expression of the broker's retention, in different units, in a different
7958
+ * addon, with an invariant the operator had to maintain by hand. The keep
7959
+ * bound is now derived from the one prebuffer ceiling and there is nothing
7960
+ * left to configure here.
7961
+ *
7962
+ * The key survives in the SHAPE so a config written before that record still
7963
+ * parses and can be migrated deliberately — `RecordingBandSchema` is not
7964
+ * strict, so simply deleting it would strip an operator's value in silence on
7965
+ * the next save (the failure D380 came one commit from shipping). Nothing
7966
+ * reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
7967
+ */
7953
7968
  preBufferSec: number().min(0).optional(),
7954
7969
  postBufferSec: number().min(0).optional()
7955
7970
  });
7956
- ({
7957
- preBufferSec: 15,
7958
- postBufferSec: 30
7959
- }).postBufferSec * 1e3;
7971
+ ({ postBufferSec: 30 }).postBufferSec * 1e3;
7960
7972
  /**
7961
7973
  * Per-device retention overrides. Every field is optional; an unset or `0`
7962
7974
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -8004,8 +8016,29 @@ var RecordingConfigSchema = object({
8004
8016
  * "off" is the absence of a covering band, never a band value.
8005
8017
  */
8006
8018
  bands: array(RecordingBandSchema).default([]),
8019
+ /**
8020
+ * THE device-decided intent: record for as long as the camera itself raises
8021
+ * `recording-signal` (`active: true` while the device is in function — a
8022
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8023
+ * recording intent that is not a band.
8024
+ *
8025
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8026
+ * no hour to program: the device decides. What it costs the operator is one
8027
+ * flag — "this camera can record on its own" — and what it buys is the same
8028
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8029
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8030
+ * job however long it is, and closes one pad after the fall.
8031
+ *
8032
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8033
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8034
+ * operator switching this camera off is REPORTED off, never as broken.
8035
+ */
8036
+ deviceDecision: boolean().optional(),
8007
8037
  retention: RecordingRetentionSchema.optional()
8008
- }).strict();
8038
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8039
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8040
+ path: ["bands"]
8041
+ });
8009
8042
  /**
8010
8043
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8011
8044
  *
@@ -20783,11 +20816,7 @@ var CameraAudioStatusSchema = object({
20783
20816
  });
20784
20817
  /** Recording block — null when no recording cap is active for this device. */
20785
20818
  var CameraRecordingStatusSchema = object({
20786
- mode: _enum([
20787
- "off",
20788
- "continuous",
20789
- "events"
20790
- ]),
20819
+ mode: RecordingStorageModeSchema,
20791
20820
  active: boolean(),
20792
20821
  storageBytes: number()
20793
20822
  });
@@ -27193,11 +27222,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27193
27222
  var RecordingStatusSchema = object({
27194
27223
  deviceId: number(),
27195
27224
  enabled: boolean(),
27196
- activeMode: _enum([
27197
- "off",
27198
- "continuous",
27199
- "events"
27200
- ]),
27225
+ /** THE derived storage mode, from the one definition
27226
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27227
+ * `on-device-decision` could have reached the recorder and not the status. */
27228
+ activeMode: RecordingStorageModeSchema,
27201
27229
  nodeId: string(),
27202
27230
  storageBytes: number()
27203
27231
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-decoder-nodeav",
3
- "version": "1.2.75",
3
+ "version": "1.2.77",
4
4
  "description": "Standalone in-process node-av decoder addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",