@camstack/addon-export-alexa 1.2.80 → 1.2.82

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.
@@ -8017,17 +8017,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
8017
8017
  /**
8018
8018
  * DERIVED per-camera storage summary — the single field cheap consumers read
8019
8019
  * (the viewer's status dot, the camera list) instead of walking `bands`:
8020
- * - `off` — no band covers the camera (or it is disabled).
8021
- * - `events` — every band records around triggers only.
8022
- * - `continuous` — at least one band records continuously.
8023
- *
8024
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
8025
- * every save (`activeModeForConfig`). Writing it has no effect.
8020
+ * - `off` — no band covers the camera (or it is disabled).
8021
+ * - `events` — every band records around triggers only.
8022
+ * - `continuous` — at least one band records continuously.
8023
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
8024
+ * camera raises its own `recording-signal` level (a robot that cleans). There
8025
+ * is no schedule to author, because there is no hour to program — see
8026
+ * {@link RecordingConfigSchema}`.deviceDecision`.
8027
+ *
8028
+ * NEVER authored: the recorder stamps it from the authoritative intent
8029
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
8030
+ * has no effect.
8031
+ *
8032
+ * `on-device-decision` is named for WHO decides, not for how the recording is
8033
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
8034
+ * something the operator makes (the live gate is the recorder's own "demand
8035
+ * window"), and a knob whose name suggests the operator starts it while the
8036
+ * device actually does is the D62 shape — a control nobody can predict.
8026
8037
  */
8027
8038
  var RecordingStorageModeSchema = _enum([
8028
8039
  "off",
8029
8040
  "events",
8030
- "continuous"
8041
+ "continuous",
8042
+ "on-device-decision"
8031
8043
  ]);
8032
8044
  /**
8033
8045
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -8077,22 +8089,7 @@ var RecordingTriggersSchema = object({
8077
8089
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8078
8090
  * registrare.
8079
8091
  */
8080
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8081
- /**
8082
- * La camera registra per tutta la durata del SEGNALE che lei stessa
8083
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8084
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8085
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8086
- * caduta, così una pulizia di quaranta minuti è UNA clip.
8087
- *
8088
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8089
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8090
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8091
- * segnale mai abbassato (un evento perso) non può tenere aperta una
8092
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8093
- * (`holdTrigger` / `releaseTrigger`).
8094
- */
8095
- deviceSignal: boolean().optional()
8092
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8096
8093
  });
8097
8094
  /**
8098
8095
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8176,8 +8173,29 @@ var RecordingConfigSchema = object({
8176
8173
  * "off" is the absence of a covering band, never a band value.
8177
8174
  */
8178
8175
  bands: array(RecordingBandSchema).default([]),
8176
+ /**
8177
+ * THE device-decided intent: record for as long as the camera itself raises
8178
+ * `recording-signal` (`active: true` while the device is in function — a
8179
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8180
+ * recording intent that is not a band.
8181
+ *
8182
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8183
+ * no hour to program: the device decides. What it costs the operator is one
8184
+ * flag — "this camera can record on its own" — and what it buys is the same
8185
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8186
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8187
+ * job however long it is, and closes one pad after the fall.
8188
+ *
8189
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8190
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8191
+ * operator switching this camera off is REPORTED off, never as broken.
8192
+ */
8193
+ deviceDecision: boolean().optional(),
8179
8194
  retention: RecordingRetentionSchema.optional()
8180
- }).strict();
8195
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8196
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8197
+ path: ["bands"]
8198
+ });
8181
8199
  /**
8182
8200
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8183
8201
  *
@@ -20968,11 +20986,7 @@ var CameraAudioStatusSchema = object({
20968
20986
  });
20969
20987
  /** Recording block — null when no recording cap is active for this device. */
20970
20988
  var CameraRecordingStatusSchema = object({
20971
- mode: _enum([
20972
- "off",
20973
- "continuous",
20974
- "events"
20975
- ]),
20989
+ mode: RecordingStorageModeSchema,
20976
20990
  active: boolean(),
20977
20991
  storageBytes: number()
20978
20992
  });
@@ -27378,11 +27392,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27378
27392
  var RecordingStatusSchema = object({
27379
27393
  deviceId: number(),
27380
27394
  enabled: boolean(),
27381
- activeMode: _enum([
27382
- "off",
27383
- "continuous",
27384
- "events"
27385
- ]),
27395
+ /** THE derived storage mode, from the one definition
27396
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27397
+ * `on-device-decision` could have reached the recorder and not the status. */
27398
+ activeMode: RecordingStorageModeSchema,
27386
27399
  nodeId: string(),
27387
27400
  storageBytes: number()
27388
27401
  });
@@ -7990,17 +7990,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
7990
7990
  /**
7991
7991
  * DERIVED per-camera storage summary — the single field cheap consumers read
7992
7992
  * (the viewer's status dot, the camera list) instead of walking `bands`:
7993
- * - `off` — no band covers the camera (or it is disabled).
7994
- * - `events` — every band records around triggers only.
7995
- * - `continuous` — at least one band records continuously.
7996
- *
7997
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
7998
- * every save (`activeModeForConfig`). Writing it has no effect.
7993
+ * - `off` — no band covers the camera (or it is disabled).
7994
+ * - `events` — every band records around triggers only.
7995
+ * - `continuous` — at least one band records continuously.
7996
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
7997
+ * camera raises its own `recording-signal` level (a robot that cleans). There
7998
+ * is no schedule to author, because there is no hour to program — see
7999
+ * {@link RecordingConfigSchema}`.deviceDecision`.
8000
+ *
8001
+ * NEVER authored: the recorder stamps it from the authoritative intent
8002
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
8003
+ * has no effect.
8004
+ *
8005
+ * `on-device-decision` is named for WHO decides, not for how the recording is
8006
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
8007
+ * something the operator makes (the live gate is the recorder's own "demand
8008
+ * window"), and a knob whose name suggests the operator starts it while the
8009
+ * device actually does is the D62 shape — a control nobody can predict.
7999
8010
  */
8000
8011
  var RecordingStorageModeSchema = _enum([
8001
8012
  "off",
8002
8013
  "events",
8003
- "continuous"
8014
+ "continuous",
8015
+ "on-device-decision"
8004
8016
  ]);
8005
8017
  /**
8006
8018
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -8050,22 +8062,7 @@ var RecordingTriggersSchema = object({
8050
8062
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8051
8063
  * registrare.
8052
8064
  */
8053
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8054
- /**
8055
- * La camera registra per tutta la durata del SEGNALE che lei stessa
8056
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8057
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8058
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8059
- * caduta, così una pulizia di quaranta minuti è UNA clip.
8060
- *
8061
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8062
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8063
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8064
- * segnale mai abbassato (un evento perso) non può tenere aperta una
8065
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8066
- * (`holdTrigger` / `releaseTrigger`).
8067
- */
8068
- deviceSignal: boolean().optional()
8065
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8069
8066
  });
8070
8067
  /**
8071
8068
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8149,8 +8146,29 @@ var RecordingConfigSchema = object({
8149
8146
  * "off" is the absence of a covering band, never a band value.
8150
8147
  */
8151
8148
  bands: array(RecordingBandSchema).default([]),
8149
+ /**
8150
+ * THE device-decided intent: record for as long as the camera itself raises
8151
+ * `recording-signal` (`active: true` while the device is in function — a
8152
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8153
+ * recording intent that is not a band.
8154
+ *
8155
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8156
+ * no hour to program: the device decides. What it costs the operator is one
8157
+ * flag — "this camera can record on its own" — and what it buys is the same
8158
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8159
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8160
+ * job however long it is, and closes one pad after the fall.
8161
+ *
8162
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8163
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8164
+ * operator switching this camera off is REPORTED off, never as broken.
8165
+ */
8166
+ deviceDecision: boolean().optional(),
8152
8167
  retention: RecordingRetentionSchema.optional()
8153
- }).strict();
8168
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8169
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8170
+ path: ["bands"]
8171
+ });
8154
8172
  /**
8155
8173
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8156
8174
  *
@@ -20941,11 +20959,7 @@ var CameraAudioStatusSchema = object({
20941
20959
  });
20942
20960
  /** Recording block — null when no recording cap is active for this device. */
20943
20961
  var CameraRecordingStatusSchema = object({
20944
- mode: _enum([
20945
- "off",
20946
- "continuous",
20947
- "events"
20948
- ]),
20962
+ mode: RecordingStorageModeSchema,
20949
20963
  active: boolean(),
20950
20964
  storageBytes: number()
20951
20965
  });
@@ -27351,11 +27365,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27351
27365
  var RecordingStatusSchema = object({
27352
27366
  deviceId: number(),
27353
27367
  enabled: boolean(),
27354
- activeMode: _enum([
27355
- "off",
27356
- "continuous",
27357
- "events"
27358
- ]),
27368
+ /** THE derived storage mode, from the one definition
27369
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27370
+ * `on-device-decision` could have reached the recorder and not the status. */
27371
+ activeMode: RecordingStorageModeSchema,
27359
27372
  nodeId: string(),
27360
27373
  storageBytes: number()
27361
27374
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.2.80",
3
+ "version": "1.2.82",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",