@camstack/addon-import-alexa 0.2.74 → 0.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/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.
@@ -8112,13 +8109,28 @@ var RecordingBandSchema = object({
8112
8109
  end: string().regex(HHMM),
8113
8110
  mode: RecordingBandModeSchema,
8114
8111
  triggers: RecordingBandTriggersSchema.optional(),
8112
+ /**
8113
+ * RETIRED (D381). A band no longer carries a pre-buffer of its own.
8114
+ *
8115
+ * It was the retroactive KEEP bound — which already-written segments survive
8116
+ * a trigger — and it had to be at least as wide as the widest pre-roll the
8117
+ * broker could serve, or the gate would delete the seconds the ring had just
8118
+ * handed the writer. That "at least as wide as" is the tell: it was a second
8119
+ * expression of the broker's retention, in different units, in a different
8120
+ * addon, with an invariant the operator had to maintain by hand. The keep
8121
+ * bound is now derived from the one prebuffer ceiling and there is nothing
8122
+ * left to configure here.
8123
+ *
8124
+ * The key survives in the SHAPE so a config written before that record still
8125
+ * parses and can be migrated deliberately — `RecordingBandSchema` is not
8126
+ * strict, so simply deleting it would strip an operator's value in silence on
8127
+ * the next save (the failure D380 came one commit from shipping). Nothing
8128
+ * reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
8129
+ */
8115
8130
  preBufferSec: number().min(0).optional(),
8116
8131
  postBufferSec: number().min(0).optional()
8117
8132
  });
8118
- ({
8119
- preBufferSec: 15,
8120
- postBufferSec: 30
8121
- }).postBufferSec * 1e3;
8133
+ ({ postBufferSec: 30 }).postBufferSec * 1e3;
8122
8134
  /**
8123
8135
  * Per-device retention overrides. Every field is optional; an unset or `0`
8124
8136
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -8166,8 +8178,29 @@ var RecordingConfigSchema = object({
8166
8178
  * "off" is the absence of a covering band, never a band value.
8167
8179
  */
8168
8180
  bands: array(RecordingBandSchema).default([]),
8181
+ /**
8182
+ * THE device-decided intent: record for as long as the camera itself raises
8183
+ * `recording-signal` (`active: true` while the device is in function — a
8184
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8185
+ * recording intent that is not a band.
8186
+ *
8187
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8188
+ * no hour to program: the device decides. What it costs the operator is one
8189
+ * flag — "this camera can record on its own" — and what it buys is the same
8190
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8191
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8192
+ * job however long it is, and closes one pad after the fall.
8193
+ *
8194
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8195
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8196
+ * operator switching this camera off is REPORTED off, never as broken.
8197
+ */
8198
+ deviceDecision: boolean().optional(),
8169
8199
  retention: RecordingRetentionSchema.optional()
8170
- }).strict();
8200
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8201
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8202
+ path: ["bands"]
8203
+ });
8171
8204
  /**
8172
8205
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8173
8206
  *
@@ -21268,11 +21301,7 @@ var CameraAudioStatusSchema = object({
21268
21301
  });
21269
21302
  /** Recording block — null when no recording cap is active for this device. */
21270
21303
  var CameraRecordingStatusSchema = object({
21271
- mode: _enum([
21272
- "off",
21273
- "continuous",
21274
- "events"
21275
- ]),
21304
+ mode: RecordingStorageModeSchema,
21276
21305
  active: boolean(),
21277
21306
  storageBytes: number()
21278
21307
  });
@@ -29543,11 +29572,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
29543
29572
  var RecordingStatusSchema = object({
29544
29573
  deviceId: number(),
29545
29574
  enabled: boolean(),
29546
- activeMode: _enum([
29547
- "off",
29548
- "continuous",
29549
- "events"
29550
- ]),
29575
+ /** THE derived storage mode, from the one definition
29576
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
29577
+ * `on-device-decision` could have reached the recorder and not the status. */
29578
+ activeMode: RecordingStorageModeSchema,
29551
29579
  nodeId: string(),
29552
29580
  storageBytes: number()
29553
29581
  });
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.
@@ -8112,13 +8109,28 @@ var RecordingBandSchema = object({
8112
8109
  end: string().regex(HHMM),
8113
8110
  mode: RecordingBandModeSchema,
8114
8111
  triggers: RecordingBandTriggersSchema.optional(),
8112
+ /**
8113
+ * RETIRED (D381). A band no longer carries a pre-buffer of its own.
8114
+ *
8115
+ * It was the retroactive KEEP bound — which already-written segments survive
8116
+ * a trigger — and it had to be at least as wide as the widest pre-roll the
8117
+ * broker could serve, or the gate would delete the seconds the ring had just
8118
+ * handed the writer. That "at least as wide as" is the tell: it was a second
8119
+ * expression of the broker's retention, in different units, in a different
8120
+ * addon, with an invariant the operator had to maintain by hand. The keep
8121
+ * bound is now derived from the one prebuffer ceiling and there is nothing
8122
+ * left to configure here.
8123
+ *
8124
+ * The key survives in the SHAPE so a config written before that record still
8125
+ * parses and can be migrated deliberately — `RecordingBandSchema` is not
8126
+ * strict, so simply deleting it would strip an operator's value in silence on
8127
+ * the next save (the failure D380 came one commit from shipping). Nothing
8128
+ * reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
8129
+ */
8115
8130
  preBufferSec: number().min(0).optional(),
8116
8131
  postBufferSec: number().min(0).optional()
8117
8132
  });
8118
- ({
8119
- preBufferSec: 15,
8120
- postBufferSec: 30
8121
- }).postBufferSec * 1e3;
8133
+ ({ postBufferSec: 30 }).postBufferSec * 1e3;
8122
8134
  /**
8123
8135
  * Per-device retention overrides. Every field is optional; an unset or `0`
8124
8136
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -8166,8 +8178,29 @@ var RecordingConfigSchema = object({
8166
8178
  * "off" is the absence of a covering band, never a band value.
8167
8179
  */
8168
8180
  bands: array(RecordingBandSchema).default([]),
8181
+ /**
8182
+ * THE device-decided intent: record for as long as the camera itself raises
8183
+ * `recording-signal` (`active: true` while the device is in function — a
8184
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8185
+ * recording intent that is not a band.
8186
+ *
8187
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8188
+ * no hour to program: the device decides. What it costs the operator is one
8189
+ * flag — "this camera can record on its own" — and what it buys is the same
8190
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8191
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8192
+ * job however long it is, and closes one pad after the fall.
8193
+ *
8194
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8195
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8196
+ * operator switching this camera off is REPORTED off, never as broken.
8197
+ */
8198
+ deviceDecision: boolean().optional(),
8169
8199
  retention: RecordingRetentionSchema.optional()
8170
- }).strict();
8200
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8201
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8202
+ path: ["bands"]
8203
+ });
8171
8204
  /**
8172
8205
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8173
8206
  *
@@ -21268,11 +21301,7 @@ var CameraAudioStatusSchema = object({
21268
21301
  });
21269
21302
  /** Recording block — null when no recording cap is active for this device. */
21270
21303
  var CameraRecordingStatusSchema = object({
21271
- mode: _enum([
21272
- "off",
21273
- "continuous",
21274
- "events"
21275
- ]),
21304
+ mode: RecordingStorageModeSchema,
21276
21305
  active: boolean(),
21277
21306
  storageBytes: number()
21278
21307
  });
@@ -29543,11 +29572,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
29543
29572
  var RecordingStatusSchema = object({
29544
29573
  deviceId: number(),
29545
29574
  enabled: boolean(),
29546
- activeMode: _enum([
29547
- "off",
29548
- "continuous",
29549
- "events"
29550
- ]),
29575
+ /** THE derived storage mode, from the one definition
29576
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
29577
+ * `on-device-decision` could have reached the recorder and not the status. */
29578
+ activeMode: RecordingStorageModeSchema,
29551
29579
  nodeId: string(),
29552
29580
  storageBytes: number()
29553
29581
  });
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.76",
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",