@camstack/addon-provider-hikvision 1.2.83 → 1.2.85

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 CHANGED
@@ -7844,17 +7844,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7844
7844
  /**
7845
7845
  * DERIVED per-camera storage summary — the single field cheap consumers read
7846
7846
  * (the viewer's status dot, the camera list) instead of walking `bands`:
7847
- * - `off` — no band covers the camera (or it is disabled).
7848
- * - `events` — every band records around triggers only.
7849
- * - `continuous` — at least one band records continuously.
7850
- *
7851
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
7852
- * every save (`activeModeForConfig`). Writing it has no effect.
7847
+ * - `off` — no band covers the camera (or it is disabled).
7848
+ * - `events` — every band records around triggers only.
7849
+ * - `continuous` — at least one band records continuously.
7850
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
7851
+ * camera raises its own `recording-signal` level (a robot that cleans). There
7852
+ * is no schedule to author, because there is no hour to program — see
7853
+ * {@link RecordingConfigSchema}`.deviceDecision`.
7854
+ *
7855
+ * NEVER authored: the recorder stamps it from the authoritative intent
7856
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
7857
+ * has no effect.
7858
+ *
7859
+ * `on-device-decision` is named for WHO decides, not for how the recording is
7860
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
7861
+ * something the operator makes (the live gate is the recorder's own "demand
7862
+ * window"), and a knob whose name suggests the operator starts it while the
7863
+ * device actually does is the D62 shape — a control nobody can predict.
7853
7864
  */
7854
7865
  var RecordingStorageModeSchema = _enum([
7855
7866
  "off",
7856
7867
  "events",
7857
- "continuous"
7868
+ "continuous",
7869
+ "on-device-decision"
7858
7870
  ]);
7859
7871
  /**
7860
7872
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -7904,22 +7916,7 @@ var RecordingTriggersSchema = object({
7904
7916
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7905
7917
  * registrare.
7906
7918
  */
7907
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7908
- /**
7909
- * La camera registra per tutta la durata del SEGNALE che lei stessa
7910
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7911
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7912
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7913
- * caduta, così una pulizia di quaranta minuti è UNA clip.
7914
- *
7915
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7916
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7917
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7918
- * segnale mai abbassato (un evento perso) non può tenere aperta una
7919
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7920
- * (`holdTrigger` / `releaseTrigger`).
7921
- */
7922
- deviceSignal: boolean().optional()
7919
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7923
7920
  });
7924
7921
  /**
7925
7922
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -7949,13 +7946,28 @@ var RecordingBandSchema = object({
7949
7946
  end: string().regex(HHMM),
7950
7947
  mode: RecordingBandModeSchema,
7951
7948
  triggers: RecordingBandTriggersSchema.optional(),
7949
+ /**
7950
+ * RETIRED (D381). A band no longer carries a pre-buffer of its own.
7951
+ *
7952
+ * It was the retroactive KEEP bound — which already-written segments survive
7953
+ * a trigger — and it had to be at least as wide as the widest pre-roll the
7954
+ * broker could serve, or the gate would delete the seconds the ring had just
7955
+ * handed the writer. That "at least as wide as" is the tell: it was a second
7956
+ * expression of the broker's retention, in different units, in a different
7957
+ * addon, with an invariant the operator had to maintain by hand. The keep
7958
+ * bound is now derived from the one prebuffer ceiling and there is nothing
7959
+ * left to configure here.
7960
+ *
7961
+ * The key survives in the SHAPE so a config written before that record still
7962
+ * parses and can be migrated deliberately — `RecordingBandSchema` is not
7963
+ * strict, so simply deleting it would strip an operator's value in silence on
7964
+ * the next save (the failure D380 came one commit from shipping). Nothing
7965
+ * reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
7966
+ */
7952
7967
  preBufferSec: number().min(0).optional(),
7953
7968
  postBufferSec: number().min(0).optional()
7954
7969
  });
7955
- ({
7956
- preBufferSec: 15,
7957
- postBufferSec: 30
7958
- }).postBufferSec * 1e3;
7970
+ ({ postBufferSec: 30 }).postBufferSec * 1e3;
7959
7971
  /**
7960
7972
  * Per-device retention overrides. Every field is optional; an unset or `0`
7961
7973
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -8003,8 +8015,29 @@ var RecordingConfigSchema = object({
8003
8015
  * "off" is the absence of a covering band, never a band value.
8004
8016
  */
8005
8017
  bands: array(RecordingBandSchema).default([]),
8018
+ /**
8019
+ * THE device-decided intent: record for as long as the camera itself raises
8020
+ * `recording-signal` (`active: true` while the device is in function — a
8021
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8022
+ * recording intent that is not a band.
8023
+ *
8024
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8025
+ * no hour to program: the device decides. What it costs the operator is one
8026
+ * flag — "this camera can record on its own" — and what it buys is the same
8027
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8028
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8029
+ * job however long it is, and closes one pad after the fall.
8030
+ *
8031
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8032
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8033
+ * operator switching this camera off is REPORTED off, never as broken.
8034
+ */
8035
+ deviceDecision: boolean().optional(),
8006
8036
  retention: RecordingRetentionSchema.optional()
8007
- }).strict();
8037
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8038
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8039
+ path: ["bands"]
8040
+ });
8008
8041
  /**
8009
8042
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8010
8043
  *
@@ -21332,11 +21365,7 @@ var CameraAudioStatusSchema = object({
21332
21365
  });
21333
21366
  /** Recording block — null when no recording cap is active for this device. */
21334
21367
  var CameraRecordingStatusSchema = object({
21335
- mode: _enum([
21336
- "off",
21337
- "continuous",
21338
- "events"
21339
- ]),
21368
+ mode: RecordingStorageModeSchema,
21340
21369
  active: boolean(),
21341
21370
  storageBytes: number()
21342
21371
  });
@@ -29827,11 +29856,10 @@ var rebootCapability = {
29827
29856
  var RecordingStatusSchema = object({
29828
29857
  deviceId: number(),
29829
29858
  enabled: boolean(),
29830
- activeMode: _enum([
29831
- "off",
29832
- "continuous",
29833
- "events"
29834
- ]),
29859
+ /** THE derived storage mode, from the one definition
29860
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
29861
+ * `on-device-decision` could have reached the recorder and not the status. */
29862
+ activeMode: RecordingStorageModeSchema,
29835
29863
  nodeId: string(),
29836
29864
  storageBytes: number()
29837
29865
  });
package/dist/addon.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
  *
@@ -21333,11 +21366,7 @@ var CameraAudioStatusSchema = object({
21333
21366
  });
21334
21367
  /** Recording block — null when no recording cap is active for this device. */
21335
21368
  var CameraRecordingStatusSchema = object({
21336
- mode: _enum([
21337
- "off",
21338
- "continuous",
21339
- "events"
21340
- ]),
21369
+ mode: RecordingStorageModeSchema,
21341
21370
  active: boolean(),
21342
21371
  storageBytes: number()
21343
21372
  });
@@ -29828,11 +29857,10 @@ var rebootCapability = {
29828
29857
  var RecordingStatusSchema = object({
29829
29858
  deviceId: number(),
29830
29859
  enabled: boolean(),
29831
- activeMode: _enum([
29832
- "off",
29833
- "continuous",
29834
- "events"
29835
- ]),
29860
+ /** THE derived storage mode, from the one definition
29861
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
29862
+ * `on-device-decision` could have reached the recorder and not the status. */
29863
+ activeMode: RecordingStorageModeSchema,
29836
29864
  nodeId: string(),
29837
29865
  storageBytes: number()
29838
29866
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.2.83",
3
+ "version": "1.2.85",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",