@camstack/addon-remote-storage 1.2.74 → 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/s3.addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-DorYC8t5.js");
5
+ const require_shared = require("./shared-DlUg7bET.js");
6
6
  let node_stream = require("node:stream");
7
7
  let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
8
8
  let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
package/dist/s3.addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-DkdzfmAe.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-Ch1dJcLf.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { DeleteObjectCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
4
4
  import { Upload } from "@aws-sdk/lib-storage";
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-DorYC8t5.js");
5
+ const require_shared = require("./shared-DlUg7bET.js");
6
6
  let ssh2 = require("ssh2");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-DkdzfmAe.mjs";
1
+ import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-Ch1dJcLf.mjs";
2
2
  import { Client } from "ssh2";
3
3
  import * as path from "node:path";
4
4
  //#region src/providers/sftp/sftp-config-schema.ts
@@ -7834,17 +7834,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7834
7834
  /**
7835
7835
  * DERIVED per-camera storage summary — the single field cheap consumers read
7836
7836
  * (the viewer's status dot, the camera list) instead of walking `bands`:
7837
- * - `off` — no band covers the camera (or it is disabled).
7838
- * - `events` — every band records around triggers only.
7839
- * - `continuous` — at least one band records continuously.
7840
- *
7841
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
7842
- * every save (`activeModeForConfig`). Writing it has no effect.
7837
+ * - `off` — no band covers the camera (or it is disabled).
7838
+ * - `events` — every band records around triggers only.
7839
+ * - `continuous` — at least one band records continuously.
7840
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
7841
+ * camera raises its own `recording-signal` level (a robot that cleans). There
7842
+ * is no schedule to author, because there is no hour to program — see
7843
+ * {@link RecordingConfigSchema}`.deviceDecision`.
7844
+ *
7845
+ * NEVER authored: the recorder stamps it from the authoritative intent
7846
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
7847
+ * has no effect.
7848
+ *
7849
+ * `on-device-decision` is named for WHO decides, not for how the recording is
7850
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
7851
+ * something the operator makes (the live gate is the recorder's own "demand
7852
+ * window"), and a knob whose name suggests the operator starts it while the
7853
+ * device actually does is the D62 shape — a control nobody can predict.
7843
7854
  */
7844
7855
  var RecordingStorageModeSchema = _enum([
7845
7856
  "off",
7846
7857
  "events",
7847
- "continuous"
7858
+ "continuous",
7859
+ "on-device-decision"
7848
7860
  ]);
7849
7861
  /**
7850
7862
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -7894,22 +7906,7 @@ var RecordingTriggersSchema = object({
7894
7906
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7895
7907
  * registrare.
7896
7908
  */
7897
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7898
- /**
7899
- * La camera registra per tutta la durata del SEGNALE che lei stessa
7900
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7901
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7902
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7903
- * caduta, così una pulizia di quaranta minuti è UNA clip.
7904
- *
7905
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7906
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7907
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7908
- * segnale mai abbassato (un evento perso) non può tenere aperta una
7909
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7910
- * (`holdTrigger` / `releaseTrigger`).
7911
- */
7912
- deviceSignal: boolean().optional()
7909
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7913
7910
  });
7914
7911
  /**
7915
7912
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -7939,13 +7936,28 @@ var RecordingBandSchema = object({
7939
7936
  end: string().regex(HHMM),
7940
7937
  mode: RecordingBandModeSchema,
7941
7938
  triggers: RecordingBandTriggersSchema.optional(),
7939
+ /**
7940
+ * RETIRED (D381). A band no longer carries a pre-buffer of its own.
7941
+ *
7942
+ * It was the retroactive KEEP bound — which already-written segments survive
7943
+ * a trigger — and it had to be at least as wide as the widest pre-roll the
7944
+ * broker could serve, or the gate would delete the seconds the ring had just
7945
+ * handed the writer. That "at least as wide as" is the tell: it was a second
7946
+ * expression of the broker's retention, in different units, in a different
7947
+ * addon, with an invariant the operator had to maintain by hand. The keep
7948
+ * bound is now derived from the one prebuffer ceiling and there is nothing
7949
+ * left to configure here.
7950
+ *
7951
+ * The key survives in the SHAPE so a config written before that record still
7952
+ * parses and can be migrated deliberately — `RecordingBandSchema` is not
7953
+ * strict, so simply deleting it would strip an operator's value in silence on
7954
+ * the next save (the failure D380 came one commit from shipping). Nothing
7955
+ * reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
7956
+ */
7942
7957
  preBufferSec: number().min(0).optional(),
7943
7958
  postBufferSec: number().min(0).optional()
7944
7959
  });
7945
- ({
7946
- preBufferSec: 15,
7947
- postBufferSec: 30
7948
- }).postBufferSec * 1e3;
7960
+ ({ postBufferSec: 30 }).postBufferSec * 1e3;
7949
7961
  /**
7950
7962
  * Per-device retention overrides. Every field is optional; an unset or `0`
7951
7963
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -7993,8 +8005,29 @@ var RecordingConfigSchema = object({
7993
8005
  * "off" is the absence of a covering band, never a band value.
7994
8006
  */
7995
8007
  bands: array(RecordingBandSchema).default([]),
8008
+ /**
8009
+ * THE device-decided intent: record for as long as the camera itself raises
8010
+ * `recording-signal` (`active: true` while the device is in function — a
8011
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8012
+ * recording intent that is not a band.
8013
+ *
8014
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8015
+ * no hour to program: the device decides. What it costs the operator is one
8016
+ * flag — "this camera can record on its own" — and what it buys is the same
8017
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8018
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8019
+ * job however long it is, and closes one pad after the fall.
8020
+ *
8021
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8022
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8023
+ * operator switching this camera off is REPORTED off, never as broken.
8024
+ */
8025
+ deviceDecision: boolean().optional(),
7996
8026
  retention: RecordingRetentionSchema.optional()
7997
- }).strict();
8027
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8028
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8029
+ path: ["bands"]
8030
+ });
7998
8031
  /**
7999
8032
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8000
8033
  *
@@ -20642,11 +20675,7 @@ var CameraAudioStatusSchema = object({
20642
20675
  });
20643
20676
  /** Recording block — null when no recording cap is active for this device. */
20644
20677
  var CameraRecordingStatusSchema = object({
20645
- mode: _enum([
20646
- "off",
20647
- "continuous",
20648
- "events"
20649
- ]),
20678
+ mode: RecordingStorageModeSchema,
20650
20679
  active: boolean(),
20651
20680
  storageBytes: number()
20652
20681
  });
@@ -27112,11 +27141,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27112
27141
  var RecordingStatusSchema = object({
27113
27142
  deviceId: number(),
27114
27143
  enabled: boolean(),
27115
- activeMode: _enum([
27116
- "off",
27117
- "continuous",
27118
- "events"
27119
- ]),
27144
+ /** THE derived storage mode, from the one definition
27145
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27146
+ * `on-device-decision` could have reached the recorder and not the status. */
27147
+ activeMode: RecordingStorageModeSchema,
27120
27148
  nodeId: string(),
27121
27149
  storageBytes: number()
27122
27150
  });
@@ -7857,17 +7857,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7857
7857
  /**
7858
7858
  * DERIVED per-camera storage summary — the single field cheap consumers read
7859
7859
  * (the viewer's status dot, the camera list) instead of walking `bands`:
7860
- * - `off` — no band covers the camera (or it is disabled).
7861
- * - `events` — every band records around triggers only.
7862
- * - `continuous` — at least one band records continuously.
7863
- *
7864
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
7865
- * every save (`activeModeForConfig`). Writing it has no effect.
7860
+ * - `off` — no band covers the camera (or it is disabled).
7861
+ * - `events` — every band records around triggers only.
7862
+ * - `continuous` — at least one band records continuously.
7863
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
7864
+ * camera raises its own `recording-signal` level (a robot that cleans). There
7865
+ * is no schedule to author, because there is no hour to program — see
7866
+ * {@link RecordingConfigSchema}`.deviceDecision`.
7867
+ *
7868
+ * NEVER authored: the recorder stamps it from the authoritative intent
7869
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
7870
+ * has no effect.
7871
+ *
7872
+ * `on-device-decision` is named for WHO decides, not for how the recording is
7873
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
7874
+ * something the operator makes (the live gate is the recorder's own "demand
7875
+ * window"), and a knob whose name suggests the operator starts it while the
7876
+ * device actually does is the D62 shape — a control nobody can predict.
7866
7877
  */
7867
7878
  var RecordingStorageModeSchema = _enum([
7868
7879
  "off",
7869
7880
  "events",
7870
- "continuous"
7881
+ "continuous",
7882
+ "on-device-decision"
7871
7883
  ]);
7872
7884
  /**
7873
7885
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -7917,22 +7929,7 @@ var RecordingTriggersSchema = object({
7917
7929
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7918
7930
  * registrare.
7919
7931
  */
7920
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7921
- /**
7922
- * La camera registra per tutta la durata del SEGNALE che lei stessa
7923
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7924
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7925
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7926
- * caduta, così una pulizia di quaranta minuti è UNA clip.
7927
- *
7928
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7929
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7930
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7931
- * segnale mai abbassato (un evento perso) non può tenere aperta una
7932
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7933
- * (`holdTrigger` / `releaseTrigger`).
7934
- */
7935
- deviceSignal: boolean().optional()
7932
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7936
7933
  });
7937
7934
  /**
7938
7935
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -7962,13 +7959,28 @@ var RecordingBandSchema = object({
7962
7959
  end: string().regex(HHMM),
7963
7960
  mode: RecordingBandModeSchema,
7964
7961
  triggers: RecordingBandTriggersSchema.optional(),
7962
+ /**
7963
+ * RETIRED (D381). A band no longer carries a pre-buffer of its own.
7964
+ *
7965
+ * It was the retroactive KEEP bound — which already-written segments survive
7966
+ * a trigger — and it had to be at least as wide as the widest pre-roll the
7967
+ * broker could serve, or the gate would delete the seconds the ring had just
7968
+ * handed the writer. That "at least as wide as" is the tell: it was a second
7969
+ * expression of the broker's retention, in different units, in a different
7970
+ * addon, with an invariant the operator had to maintain by hand. The keep
7971
+ * bound is now derived from the one prebuffer ceiling and there is nothing
7972
+ * left to configure here.
7973
+ *
7974
+ * The key survives in the SHAPE so a config written before that record still
7975
+ * parses and can be migrated deliberately — `RecordingBandSchema` is not
7976
+ * strict, so simply deleting it would strip an operator's value in silence on
7977
+ * the next save (the failure D380 came one commit from shipping). Nothing
7978
+ * reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
7979
+ */
7965
7980
  preBufferSec: number().min(0).optional(),
7966
7981
  postBufferSec: number().min(0).optional()
7967
7982
  });
7968
- ({
7969
- preBufferSec: 15,
7970
- postBufferSec: 30
7971
- }).postBufferSec * 1e3;
7983
+ ({ postBufferSec: 30 }).postBufferSec * 1e3;
7972
7984
  /**
7973
7985
  * Per-device retention overrides. Every field is optional; an unset or `0`
7974
7986
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -8016,8 +8028,29 @@ var RecordingConfigSchema = object({
8016
8028
  * "off" is the absence of a covering band, never a band value.
8017
8029
  */
8018
8030
  bands: array(RecordingBandSchema).default([]),
8031
+ /**
8032
+ * THE device-decided intent: record for as long as the camera itself raises
8033
+ * `recording-signal` (`active: true` while the device is in function — a
8034
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8035
+ * recording intent that is not a band.
8036
+ *
8037
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8038
+ * no hour to program: the device decides. What it costs the operator is one
8039
+ * flag — "this camera can record on its own" — and what it buys is the same
8040
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8041
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8042
+ * job however long it is, and closes one pad after the fall.
8043
+ *
8044
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8045
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8046
+ * operator switching this camera off is REPORTED off, never as broken.
8047
+ */
8048
+ deviceDecision: boolean().optional(),
8019
8049
  retention: RecordingRetentionSchema.optional()
8020
- }).strict();
8050
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8051
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8052
+ path: ["bands"]
8053
+ });
8021
8054
  /**
8022
8055
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8023
8056
  *
@@ -20665,11 +20698,7 @@ var CameraAudioStatusSchema = object({
20665
20698
  });
20666
20699
  /** Recording block — null when no recording cap is active for this device. */
20667
20700
  var CameraRecordingStatusSchema = object({
20668
- mode: _enum([
20669
- "off",
20670
- "continuous",
20671
- "events"
20672
- ]),
20701
+ mode: RecordingStorageModeSchema,
20673
20702
  active: boolean(),
20674
20703
  storageBytes: number()
20675
20704
  });
@@ -27135,11 +27164,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27135
27164
  var RecordingStatusSchema = object({
27136
27165
  deviceId: number(),
27137
27166
  enabled: boolean(),
27138
- activeMode: _enum([
27139
- "off",
27140
- "continuous",
27141
- "events"
27142
- ]),
27167
+ /** THE derived storage mode, from the one definition
27168
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27169
+ * `on-device-decision` could have reached the recorder and not the status. */
27170
+ activeMode: RecordingStorageModeSchema,
27143
27171
  nodeId: string(),
27144
27172
  storageBytes: number()
27145
27173
  });
package/dist/smb.addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-DorYC8t5.js");
5
+ const require_shared = require("./shared-DlUg7bET.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, s as storageProviderCapability } from "./shared-DkdzfmAe.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, s as storageProviderCapability } from "./shared-Ch1dJcLf.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import * as path from "node:path";
4
4
  import * as fsp from "node:fs/promises";
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-DorYC8t5.js");
5
+ const require_shared = require("./shared-DlUg7bET.js");
6
6
  let node_stream = require("node:stream");
7
7
  let webdav = require("webdav");
8
8
  //#region src/providers/webdav/webdav-config-schema.ts
@@ -1,4 +1,4 @@
1
- import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-DkdzfmAe.mjs";
1
+ import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-Ch1dJcLf.mjs";
2
2
  import { PassThrough } from "node:stream";
3
3
  import { AuthType, createClient } from "webdav";
4
4
  //#region src/providers/webdav/webdav-config-schema.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-remote-storage",
3
- "version": "1.2.74",
3
+ "version": "1.2.76",
4
4
  "description": "Remote storage providers (SFTP, S3, WebDAV, SMB) — unifies remote backends behind the storage-provider cap",
5
5
  "keywords": [
6
6
  "camstack",