@camstack/addon-import-alexa 0.2.74 → 0.2.75

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
@@ -8007,17 +8007,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
8007
8007
  /**
8008
8008
  * DERIVED per-camera storage summary — the single field cheap consumers read
8009
8009
  * (the viewer's status dot, the camera list) instead of walking `bands`:
8010
- * - `off` — no band covers the camera (or it is disabled).
8011
- * - `events` — every band records around triggers only.
8012
- * - `continuous` — at least one band records continuously.
8013
- *
8014
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
8015
- * every save (`activeModeForConfig`). Writing it has no effect.
8010
+ * - `off` — no band covers the camera (or it is disabled).
8011
+ * - `events` — every band records around triggers only.
8012
+ * - `continuous` — at least one band records continuously.
8013
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
8014
+ * camera raises its own `recording-signal` level (a robot that cleans). There
8015
+ * is no schedule to author, because there is no hour to program — see
8016
+ * {@link RecordingConfigSchema}`.deviceDecision`.
8017
+ *
8018
+ * NEVER authored: the recorder stamps it from the authoritative intent
8019
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
8020
+ * has no effect.
8021
+ *
8022
+ * `on-device-decision` is named for WHO decides, not for how the recording is
8023
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
8024
+ * something the operator makes (the live gate is the recorder's own "demand
8025
+ * window"), and a knob whose name suggests the operator starts it while the
8026
+ * device actually does is the D62 shape — a control nobody can predict.
8016
8027
  */
8017
8028
  var RecordingStorageModeSchema = _enum([
8018
8029
  "off",
8019
8030
  "events",
8020
- "continuous"
8031
+ "continuous",
8032
+ "on-device-decision"
8021
8033
  ]);
8022
8034
  /**
8023
8035
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -8067,22 +8079,7 @@ var RecordingTriggersSchema = object({
8067
8079
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8068
8080
  * registrare.
8069
8081
  */
8070
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8071
- /**
8072
- * La camera registra per tutta la durata del SEGNALE che lei stessa
8073
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8074
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8075
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8076
- * caduta, così una pulizia di quaranta minuti è UNA clip.
8077
- *
8078
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8079
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8080
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8081
- * segnale mai abbassato (un evento perso) non può tenere aperta una
8082
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8083
- * (`holdTrigger` / `releaseTrigger`).
8084
- */
8085
- deviceSignal: boolean().optional()
8082
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8086
8083
  });
8087
8084
  /**
8088
8085
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8166,8 +8163,29 @@ var RecordingConfigSchema = object({
8166
8163
  * "off" is the absence of a covering band, never a band value.
8167
8164
  */
8168
8165
  bands: array(RecordingBandSchema).default([]),
8166
+ /**
8167
+ * THE device-decided intent: record for as long as the camera itself raises
8168
+ * `recording-signal` (`active: true` while the device is in function — a
8169
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8170
+ * recording intent that is not a band.
8171
+ *
8172
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8173
+ * no hour to program: the device decides. What it costs the operator is one
8174
+ * flag — "this camera can record on its own" — and what it buys is the same
8175
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8176
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8177
+ * job however long it is, and closes one pad after the fall.
8178
+ *
8179
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8180
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8181
+ * operator switching this camera off is REPORTED off, never as broken.
8182
+ */
8183
+ deviceDecision: boolean().optional(),
8169
8184
  retention: RecordingRetentionSchema.optional()
8170
- }).strict();
8185
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8186
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8187
+ path: ["bands"]
8188
+ });
8171
8189
  /**
8172
8190
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8173
8191
  *
@@ -21268,11 +21286,7 @@ var CameraAudioStatusSchema = object({
21268
21286
  });
21269
21287
  /** Recording block — null when no recording cap is active for this device. */
21270
21288
  var CameraRecordingStatusSchema = object({
21271
- mode: _enum([
21272
- "off",
21273
- "continuous",
21274
- "events"
21275
- ]),
21289
+ mode: RecordingStorageModeSchema,
21276
21290
  active: boolean(),
21277
21291
  storageBytes: number()
21278
21292
  });
@@ -29543,11 +29557,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
29543
29557
  var RecordingStatusSchema = object({
29544
29558
  deviceId: number(),
29545
29559
  enabled: boolean(),
29546
- activeMode: _enum([
29547
- "off",
29548
- "continuous",
29549
- "events"
29550
- ]),
29560
+ /** THE derived storage mode, from the one definition
29561
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
29562
+ * `on-device-decision` could have reached the recorder and not the status. */
29563
+ activeMode: RecordingStorageModeSchema,
29551
29564
  nodeId: string(),
29552
29565
  storageBytes: number()
29553
29566
  });
package/dist/addon.mjs CHANGED
@@ -8007,17 +8007,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
8007
8007
  /**
8008
8008
  * DERIVED per-camera storage summary — the single field cheap consumers read
8009
8009
  * (the viewer's status dot, the camera list) instead of walking `bands`:
8010
- * - `off` — no band covers the camera (or it is disabled).
8011
- * - `events` — every band records around triggers only.
8012
- * - `continuous` — at least one band records continuously.
8013
- *
8014
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
8015
- * every save (`activeModeForConfig`). Writing it has no effect.
8010
+ * - `off` — no band covers the camera (or it is disabled).
8011
+ * - `events` — every band records around triggers only.
8012
+ * - `continuous` — at least one band records continuously.
8013
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
8014
+ * camera raises its own `recording-signal` level (a robot that cleans). There
8015
+ * is no schedule to author, because there is no hour to program — see
8016
+ * {@link RecordingConfigSchema}`.deviceDecision`.
8017
+ *
8018
+ * NEVER authored: the recorder stamps it from the authoritative intent
8019
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
8020
+ * has no effect.
8021
+ *
8022
+ * `on-device-decision` is named for WHO decides, not for how the recording is
8023
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
8024
+ * something the operator makes (the live gate is the recorder's own "demand
8025
+ * window"), and a knob whose name suggests the operator starts it while the
8026
+ * device actually does is the D62 shape — a control nobody can predict.
8016
8027
  */
8017
8028
  var RecordingStorageModeSchema = _enum([
8018
8029
  "off",
8019
8030
  "events",
8020
- "continuous"
8031
+ "continuous",
8032
+ "on-device-decision"
8021
8033
  ]);
8022
8034
  /**
8023
8035
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -8067,22 +8079,7 @@ var RecordingTriggersSchema = object({
8067
8079
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8068
8080
  * registrare.
8069
8081
  */
8070
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8071
- /**
8072
- * La camera registra per tutta la durata del SEGNALE che lei stessa
8073
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8074
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8075
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8076
- * caduta, così una pulizia di quaranta minuti è UNA clip.
8077
- *
8078
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8079
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8080
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8081
- * segnale mai abbassato (un evento perso) non può tenere aperta una
8082
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8083
- * (`holdTrigger` / `releaseTrigger`).
8084
- */
8085
- deviceSignal: boolean().optional()
8082
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8086
8083
  });
8087
8084
  /**
8088
8085
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8166,8 +8163,29 @@ var RecordingConfigSchema = object({
8166
8163
  * "off" is the absence of a covering band, never a band value.
8167
8164
  */
8168
8165
  bands: array(RecordingBandSchema).default([]),
8166
+ /**
8167
+ * THE device-decided intent: record for as long as the camera itself raises
8168
+ * `recording-signal` (`active: true` while the device is in function — a
8169
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8170
+ * recording intent that is not a band.
8171
+ *
8172
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8173
+ * no hour to program: the device decides. What it costs the operator is one
8174
+ * flag — "this camera can record on its own" — and what it buys is the same
8175
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8176
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8177
+ * job however long it is, and closes one pad after the fall.
8178
+ *
8179
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8180
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8181
+ * operator switching this camera off is REPORTED off, never as broken.
8182
+ */
8183
+ deviceDecision: boolean().optional(),
8169
8184
  retention: RecordingRetentionSchema.optional()
8170
- }).strict();
8185
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8186
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8187
+ path: ["bands"]
8188
+ });
8171
8189
  /**
8172
8190
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8173
8191
  *
@@ -21268,11 +21286,7 @@ var CameraAudioStatusSchema = object({
21268
21286
  });
21269
21287
  /** Recording block — null when no recording cap is active for this device. */
21270
21288
  var CameraRecordingStatusSchema = object({
21271
- mode: _enum([
21272
- "off",
21273
- "continuous",
21274
- "events"
21275
- ]),
21289
+ mode: RecordingStorageModeSchema,
21276
21290
  active: boolean(),
21277
21291
  storageBytes: number()
21278
21292
  });
@@ -29543,11 +29557,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
29543
29557
  var RecordingStatusSchema = object({
29544
29558
  deviceId: number(),
29545
29559
  enabled: boolean(),
29546
- activeMode: _enum([
29547
- "off",
29548
- "continuous",
29549
- "events"
29550
- ]),
29560
+ /** THE derived storage mode, from the one definition
29561
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
29562
+ * `on-device-decision` could have reached the recorder and not the status. */
29563
+ activeMode: RecordingStorageModeSchema,
29551
29564
  nodeId: string(),
29552
29565
  storageBytes: number()
29553
29566
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.74",
3
+ "version": "0.2.75",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",