@camstack/addon-provider-petkit 0.2.75 → 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
@@ -8951,17 +8951,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
8951
8951
  /**
8952
8952
  * DERIVED per-camera storage summary — the single field cheap consumers read
8953
8953
  * (the viewer's status dot, the camera list) instead of walking `bands`:
8954
- * - `off` — no band covers the camera (or it is disabled).
8955
- * - `events` — every band records around triggers only.
8956
- * - `continuous` — at least one band records continuously.
8957
- *
8958
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
8959
- * every save (`activeModeForConfig`). Writing it has no effect.
8954
+ * - `off` — no band covers the camera (or it is disabled).
8955
+ * - `events` — every band records around triggers only.
8956
+ * - `continuous` — at least one band records continuously.
8957
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
8958
+ * camera raises its own `recording-signal` level (a robot that cleans). There
8959
+ * is no schedule to author, because there is no hour to program — see
8960
+ * {@link RecordingConfigSchema}`.deviceDecision`.
8961
+ *
8962
+ * NEVER authored: the recorder stamps it from the authoritative intent
8963
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
8964
+ * has no effect.
8965
+ *
8966
+ * `on-device-decision` is named for WHO decides, not for how the recording is
8967
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
8968
+ * something the operator makes (the live gate is the recorder's own "demand
8969
+ * window"), and a knob whose name suggests the operator starts it while the
8970
+ * device actually does is the D62 shape — a control nobody can predict.
8960
8971
  */
8961
8972
  var RecordingStorageModeSchema = _enum([
8962
8973
  "off",
8963
8974
  "events",
8964
- "continuous"
8975
+ "continuous",
8976
+ "on-device-decision"
8965
8977
  ]);
8966
8978
  /**
8967
8979
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -9011,22 +9023,7 @@ var RecordingTriggersSchema = object({
9011
9023
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
9012
9024
  * registrare.
9013
9025
  */
9014
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
9015
- /**
9016
- * La camera registra per tutta la durata del SEGNALE che lei stessa
9017
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
9018
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
9019
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
9020
- * caduta, così una pulizia di quaranta minuti è UNA clip.
9021
- *
9022
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
9023
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
9024
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
9025
- * segnale mai abbassato (un evento perso) non può tenere aperta una
9026
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
9027
- * (`holdTrigger` / `releaseTrigger`).
9028
- */
9029
- deviceSignal: boolean().optional()
9026
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
9030
9027
  });
9031
9028
  /**
9032
9029
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -9110,8 +9107,29 @@ var RecordingConfigSchema = object({
9110
9107
  * "off" is the absence of a covering band, never a band value.
9111
9108
  */
9112
9109
  bands: array(RecordingBandSchema).default([]),
9110
+ /**
9111
+ * THE device-decided intent: record for as long as the camera itself raises
9112
+ * `recording-signal` (`active: true` while the device is in function — a
9113
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
9114
+ * recording intent that is not a band.
9115
+ *
9116
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
9117
+ * no hour to program: the device decides. What it costs the operator is one
9118
+ * flag — "this camera can record on its own" — and what it buys is the same
9119
+ * hold/release the recorder already implements (D371, `holdTrigger` /
9120
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
9121
+ * job however long it is, and closes one pad after the fall.
9122
+ *
9123
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
9124
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
9125
+ * operator switching this camera off is REPORTED off, never as broken.
9126
+ */
9127
+ deviceDecision: boolean().optional(),
9113
9128
  retention: RecordingRetentionSchema.optional()
9114
- }).strict();
9129
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
9130
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
9131
+ path: ["bands"]
9132
+ });
9115
9133
  /**
9116
9134
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
9117
9135
  *
@@ -22144,11 +22162,7 @@ var CameraAudioStatusSchema = object({
22144
22162
  });
22145
22163
  /** Recording block — null when no recording cap is active for this device. */
22146
22164
  var CameraRecordingStatusSchema = object({
22147
- mode: _enum([
22148
- "off",
22149
- "continuous",
22150
- "events"
22151
- ]),
22165
+ mode: RecordingStorageModeSchema,
22152
22166
  active: boolean(),
22153
22167
  storageBytes: number()
22154
22168
  });
@@ -30410,11 +30424,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
30410
30424
  var RecordingStatusSchema = object({
30411
30425
  deviceId: number(),
30412
30426
  enabled: boolean(),
30413
- activeMode: _enum([
30414
- "off",
30415
- "continuous",
30416
- "events"
30417
- ]),
30427
+ /** THE derived storage mode, from the one definition
30428
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
30429
+ * `on-device-decision` could have reached the recorder and not the status. */
30430
+ activeMode: RecordingStorageModeSchema,
30418
30431
  nodeId: string(),
30419
30432
  storageBytes: number()
30420
30433
  });
package/dist/addon.mjs CHANGED
@@ -8950,17 +8950,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
8950
8950
  /**
8951
8951
  * DERIVED per-camera storage summary — the single field cheap consumers read
8952
8952
  * (the viewer's status dot, the camera list) instead of walking `bands`:
8953
- * - `off` — no band covers the camera (or it is disabled).
8954
- * - `events` — every band records around triggers only.
8955
- * - `continuous` — at least one band records continuously.
8956
- *
8957
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
8958
- * every save (`activeModeForConfig`). Writing it has no effect.
8953
+ * - `off` — no band covers the camera (or it is disabled).
8954
+ * - `events` — every band records around triggers only.
8955
+ * - `continuous` — at least one band records continuously.
8956
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
8957
+ * camera raises its own `recording-signal` level (a robot that cleans). There
8958
+ * is no schedule to author, because there is no hour to program — see
8959
+ * {@link RecordingConfigSchema}`.deviceDecision`.
8960
+ *
8961
+ * NEVER authored: the recorder stamps it from the authoritative intent
8962
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
8963
+ * has no effect.
8964
+ *
8965
+ * `on-device-decision` is named for WHO decides, not for how the recording is
8966
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
8967
+ * something the operator makes (the live gate is the recorder's own "demand
8968
+ * window"), and a knob whose name suggests the operator starts it while the
8969
+ * device actually does is the D62 shape — a control nobody can predict.
8959
8970
  */
8960
8971
  var RecordingStorageModeSchema = _enum([
8961
8972
  "off",
8962
8973
  "events",
8963
- "continuous"
8974
+ "continuous",
8975
+ "on-device-decision"
8964
8976
  ]);
8965
8977
  /**
8966
8978
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -9010,22 +9022,7 @@ var RecordingTriggersSchema = object({
9010
9022
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
9011
9023
  * registrare.
9012
9024
  */
9013
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
9014
- /**
9015
- * La camera registra per tutta la durata del SEGNALE che lei stessa
9016
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
9017
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
9018
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
9019
- * caduta, così una pulizia di quaranta minuti è UNA clip.
9020
- *
9021
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
9022
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
9023
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
9024
- * segnale mai abbassato (un evento perso) non può tenere aperta una
9025
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
9026
- * (`holdTrigger` / `releaseTrigger`).
9027
- */
9028
- deviceSignal: boolean().optional()
9025
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
9029
9026
  });
9030
9027
  /**
9031
9028
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -9109,8 +9106,29 @@ var RecordingConfigSchema = object({
9109
9106
  * "off" is the absence of a covering band, never a band value.
9110
9107
  */
9111
9108
  bands: array(RecordingBandSchema).default([]),
9109
+ /**
9110
+ * THE device-decided intent: record for as long as the camera itself raises
9111
+ * `recording-signal` (`active: true` while the device is in function — a
9112
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
9113
+ * recording intent that is not a band.
9114
+ *
9115
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
9116
+ * no hour to program: the device decides. What it costs the operator is one
9117
+ * flag — "this camera can record on its own" — and what it buys is the same
9118
+ * hold/release the recorder already implements (D371, `holdTrigger` /
9119
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
9120
+ * job however long it is, and closes one pad after the fall.
9121
+ *
9122
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
9123
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
9124
+ * operator switching this camera off is REPORTED off, never as broken.
9125
+ */
9126
+ deviceDecision: boolean().optional(),
9112
9127
  retention: RecordingRetentionSchema.optional()
9113
- }).strict();
9128
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
9129
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
9130
+ path: ["bands"]
9131
+ });
9114
9132
  /**
9115
9133
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
9116
9134
  *
@@ -22143,11 +22161,7 @@ var CameraAudioStatusSchema = object({
22143
22161
  });
22144
22162
  /** Recording block — null when no recording cap is active for this device. */
22145
22163
  var CameraRecordingStatusSchema = object({
22146
- mode: _enum([
22147
- "off",
22148
- "continuous",
22149
- "events"
22150
- ]),
22164
+ mode: RecordingStorageModeSchema,
22151
22165
  active: boolean(),
22152
22166
  storageBytes: number()
22153
22167
  });
@@ -30409,11 +30423,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
30409
30423
  var RecordingStatusSchema = object({
30410
30424
  deviceId: number(),
30411
30425
  enabled: boolean(),
30412
- activeMode: _enum([
30413
- "off",
30414
- "continuous",
30415
- "events"
30416
- ]),
30426
+ /** THE derived storage mode, from the one definition
30427
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
30428
+ * `on-device-decision` could have reached the recorder and not the status. */
30429
+ activeMode: RecordingStorageModeSchema,
30417
30430
  nodeId: string(),
30418
30431
  storageBytes: number()
30419
30432
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-petkit",
3
- "version": "0.2.75",
3
+ "version": "0.2.76",
4
4
  "description": "PetKit smart-feeder device-provider addon for CamStack — wraps the @apocaliss92/nodepetkit PetKit cloud client",
5
5
  "keywords": [
6
6
  "camstack",