@camstack/addon-decoder-ffmpeg 1.2.75 → 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/index.js CHANGED
@@ -7850,17 +7850,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7850
7850
  /**
7851
7851
  * DERIVED per-camera storage summary — the single field cheap consumers read
7852
7852
  * (the viewer's status dot, the camera list) instead of walking `bands`:
7853
- * - `off` — no band covers the camera (or it is disabled).
7854
- * - `events` — every band records around triggers only.
7855
- * - `continuous` — at least one band records continuously.
7856
- *
7857
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
7858
- * every save (`activeModeForConfig`). Writing it has no effect.
7853
+ * - `off` — no band covers the camera (or it is disabled).
7854
+ * - `events` — every band records around triggers only.
7855
+ * - `continuous` — at least one band records continuously.
7856
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
7857
+ * camera raises its own `recording-signal` level (a robot that cleans). There
7858
+ * is no schedule to author, because there is no hour to program — see
7859
+ * {@link RecordingConfigSchema}`.deviceDecision`.
7860
+ *
7861
+ * NEVER authored: the recorder stamps it from the authoritative intent
7862
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
7863
+ * has no effect.
7864
+ *
7865
+ * `on-device-decision` is named for WHO decides, not for how the recording is
7866
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
7867
+ * something the operator makes (the live gate is the recorder's own "demand
7868
+ * window"), and a knob whose name suggests the operator starts it while the
7869
+ * device actually does is the D62 shape — a control nobody can predict.
7859
7870
  */
7860
7871
  var RecordingStorageModeSchema = _enum([
7861
7872
  "off",
7862
7873
  "events",
7863
- "continuous"
7874
+ "continuous",
7875
+ "on-device-decision"
7864
7876
  ]);
7865
7877
  /**
7866
7878
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -7910,22 +7922,7 @@ var RecordingTriggersSchema = object({
7910
7922
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7911
7923
  * registrare.
7912
7924
  */
7913
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7914
- /**
7915
- * La camera registra per tutta la durata del SEGNALE che lei stessa
7916
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7917
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7918
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7919
- * caduta, così una pulizia di quaranta minuti è UNA clip.
7920
- *
7921
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7922
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7923
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7924
- * segnale mai abbassato (un evento perso) non può tenere aperta una
7925
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7926
- * (`holdTrigger` / `releaseTrigger`).
7927
- */
7928
- deviceSignal: boolean().optional()
7925
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7929
7926
  });
7930
7927
  /**
7931
7928
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8009,8 +8006,29 @@ var RecordingConfigSchema = object({
8009
8006
  * "off" is the absence of a covering band, never a band value.
8010
8007
  */
8011
8008
  bands: array(RecordingBandSchema).default([]),
8009
+ /**
8010
+ * THE device-decided intent: record for as long as the camera itself raises
8011
+ * `recording-signal` (`active: true` while the device is in function — a
8012
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8013
+ * recording intent that is not a band.
8014
+ *
8015
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8016
+ * no hour to program: the device decides. What it costs the operator is one
8017
+ * flag — "this camera can record on its own" — and what it buys is the same
8018
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8019
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8020
+ * job however long it is, and closes one pad after the fall.
8021
+ *
8022
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8023
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8024
+ * operator switching this camera off is REPORTED off, never as broken.
8025
+ */
8026
+ deviceDecision: boolean().optional(),
8012
8027
  retention: RecordingRetentionSchema.optional()
8013
- }).strict();
8028
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8029
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8030
+ path: ["bands"]
8031
+ });
8014
8032
  /**
8015
8033
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8016
8034
  *
@@ -20788,11 +20806,7 @@ var CameraAudioStatusSchema = object({
20788
20806
  });
20789
20807
  /** Recording block — null when no recording cap is active for this device. */
20790
20808
  var CameraRecordingStatusSchema = object({
20791
- mode: _enum([
20792
- "off",
20793
- "continuous",
20794
- "events"
20795
- ]),
20809
+ mode: RecordingStorageModeSchema,
20796
20810
  active: boolean(),
20797
20811
  storageBytes: number()
20798
20812
  });
@@ -27198,11 +27212,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27198
27212
  var RecordingStatusSchema = object({
27199
27213
  deviceId: number(),
27200
27214
  enabled: boolean(),
27201
- activeMode: _enum([
27202
- "off",
27203
- "continuous",
27204
- "events"
27205
- ]),
27215
+ /** THE derived storage mode, from the one definition
27216
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27217
+ * `on-device-decision` could have reached the recorder and not the status. */
27218
+ activeMode: RecordingStorageModeSchema,
27206
27219
  nodeId: string(),
27207
27220
  storageBytes: number()
27208
27221
  });
package/dist/index.mjs CHANGED
@@ -7846,17 +7846,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7846
7846
  /**
7847
7847
  * DERIVED per-camera storage summary — the single field cheap consumers read
7848
7848
  * (the viewer's status dot, the camera list) instead of walking `bands`:
7849
- * - `off` — no band covers the camera (or it is disabled).
7850
- * - `events` — every band records around triggers only.
7851
- * - `continuous` — at least one band records continuously.
7852
- *
7853
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
7854
- * every save (`activeModeForConfig`). Writing it has no effect.
7849
+ * - `off` — no band covers the camera (or it is disabled).
7850
+ * - `events` — every band records around triggers only.
7851
+ * - `continuous` — at least one band records continuously.
7852
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
7853
+ * camera raises its own `recording-signal` level (a robot that cleans). There
7854
+ * is no schedule to author, because there is no hour to program — see
7855
+ * {@link RecordingConfigSchema}`.deviceDecision`.
7856
+ *
7857
+ * NEVER authored: the recorder stamps it from the authoritative intent
7858
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
7859
+ * has no effect.
7860
+ *
7861
+ * `on-device-decision` is named for WHO decides, not for how the recording is
7862
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
7863
+ * something the operator makes (the live gate is the recorder's own "demand
7864
+ * window"), and a knob whose name suggests the operator starts it while the
7865
+ * device actually does is the D62 shape — a control nobody can predict.
7855
7866
  */
7856
7867
  var RecordingStorageModeSchema = _enum([
7857
7868
  "off",
7858
7869
  "events",
7859
- "continuous"
7870
+ "continuous",
7871
+ "on-device-decision"
7860
7872
  ]);
7861
7873
  /**
7862
7874
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -7906,22 +7918,7 @@ var RecordingTriggersSchema = object({
7906
7918
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7907
7919
  * registrare.
7908
7920
  */
7909
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7910
- /**
7911
- * La camera registra per tutta la durata del SEGNALE che lei stessa
7912
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7913
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7914
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7915
- * caduta, così una pulizia di quaranta minuti è UNA clip.
7916
- *
7917
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7918
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7919
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7920
- * segnale mai abbassato (un evento perso) non può tenere aperta una
7921
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7922
- * (`holdTrigger` / `releaseTrigger`).
7923
- */
7924
- deviceSignal: boolean().optional()
7921
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7925
7922
  });
7926
7923
  /**
7927
7924
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8005,8 +8002,29 @@ var RecordingConfigSchema = object({
8005
8002
  * "off" is the absence of a covering band, never a band value.
8006
8003
  */
8007
8004
  bands: array(RecordingBandSchema).default([]),
8005
+ /**
8006
+ * THE device-decided intent: record for as long as the camera itself raises
8007
+ * `recording-signal` (`active: true` while the device is in function — a
8008
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8009
+ * recording intent that is not a band.
8010
+ *
8011
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8012
+ * no hour to program: the device decides. What it costs the operator is one
8013
+ * flag — "this camera can record on its own" — and what it buys is the same
8014
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8015
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8016
+ * job however long it is, and closes one pad after the fall.
8017
+ *
8018
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8019
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8020
+ * operator switching this camera off is REPORTED off, never as broken.
8021
+ */
8022
+ deviceDecision: boolean().optional(),
8008
8023
  retention: RecordingRetentionSchema.optional()
8009
- }).strict();
8024
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8025
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8026
+ path: ["bands"]
8027
+ });
8010
8028
  /**
8011
8029
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8012
8030
  *
@@ -20784,11 +20802,7 @@ var CameraAudioStatusSchema = object({
20784
20802
  });
20785
20803
  /** Recording block — null when no recording cap is active for this device. */
20786
20804
  var CameraRecordingStatusSchema = object({
20787
- mode: _enum([
20788
- "off",
20789
- "continuous",
20790
- "events"
20791
- ]),
20805
+ mode: RecordingStorageModeSchema,
20792
20806
  active: boolean(),
20793
20807
  storageBytes: number()
20794
20808
  });
@@ -27194,11 +27208,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27194
27208
  var RecordingStatusSchema = object({
27195
27209
  deviceId: number(),
27196
27210
  enabled: boolean(),
27197
- activeMode: _enum([
27198
- "off",
27199
- "continuous",
27200
- "events"
27201
- ]),
27211
+ /** THE derived storage mode, from the one definition
27212
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27213
+ * `on-device-decision` could have reached the recorder and not the status. */
27214
+ activeMode: RecordingStorageModeSchema,
27202
27215
  nodeId: string(),
27203
27216
  storageBytes: number()
27204
27217
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-decoder-ffmpeg",
3
- "version": "1.2.75",
3
+ "version": "1.2.76",
4
4
  "description": "Standalone ffmpeg-subprocess decoder fallback addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",