@camstack/addon-export-google 0.1.39 → 0.1.41

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.
@@ -8042,17 +8042,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
8042
8042
  /**
8043
8043
  * DERIVED per-camera storage summary — the single field cheap consumers read
8044
8044
  * (the viewer's status dot, the camera list) instead of walking `bands`:
8045
- * - `off` — no band covers the camera (or it is disabled).
8046
- * - `events` — every band records around triggers only.
8047
- * - `continuous` — at least one band records continuously.
8048
- *
8049
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
8050
- * every save (`activeModeForConfig`). Writing it has no effect.
8045
+ * - `off` — no band covers the camera (or it is disabled).
8046
+ * - `events` — every band records around triggers only.
8047
+ * - `continuous` — at least one band records continuously.
8048
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
8049
+ * camera raises its own `recording-signal` level (a robot that cleans). There
8050
+ * is no schedule to author, because there is no hour to program — see
8051
+ * {@link RecordingConfigSchema}`.deviceDecision`.
8052
+ *
8053
+ * NEVER authored: the recorder stamps it from the authoritative intent
8054
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
8055
+ * has no effect.
8056
+ *
8057
+ * `on-device-decision` is named for WHO decides, not for how the recording is
8058
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
8059
+ * something the operator makes (the live gate is the recorder's own "demand
8060
+ * window"), and a knob whose name suggests the operator starts it while the
8061
+ * device actually does is the D62 shape — a control nobody can predict.
8051
8062
  */
8052
8063
  var RecordingStorageModeSchema = _enum([
8053
8064
  "off",
8054
8065
  "events",
8055
- "continuous"
8066
+ "continuous",
8067
+ "on-device-decision"
8056
8068
  ]);
8057
8069
  /**
8058
8070
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -8102,22 +8114,7 @@ var RecordingTriggersSchema = object({
8102
8114
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8103
8115
  * registrare.
8104
8116
  */
8105
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8106
- /**
8107
- * La camera registra per tutta la durata del SEGNALE che lei stessa
8108
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8109
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8110
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8111
- * caduta, così una pulizia di quaranta minuti è UNA clip.
8112
- *
8113
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8114
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8115
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8116
- * segnale mai abbassato (un evento perso) non può tenere aperta una
8117
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8118
- * (`holdTrigger` / `releaseTrigger`).
8119
- */
8120
- deviceSignal: boolean().optional()
8117
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8121
8118
  });
8122
8119
  /**
8123
8120
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8147,13 +8144,28 @@ var RecordingBandSchema = object({
8147
8144
  end: string().regex(HHMM),
8148
8145
  mode: RecordingBandModeSchema,
8149
8146
  triggers: RecordingBandTriggersSchema.optional(),
8147
+ /**
8148
+ * RETIRED (D381). A band no longer carries a pre-buffer of its own.
8149
+ *
8150
+ * It was the retroactive KEEP bound — which already-written segments survive
8151
+ * a trigger — and it had to be at least as wide as the widest pre-roll the
8152
+ * broker could serve, or the gate would delete the seconds the ring had just
8153
+ * handed the writer. That "at least as wide as" is the tell: it was a second
8154
+ * expression of the broker's retention, in different units, in a different
8155
+ * addon, with an invariant the operator had to maintain by hand. The keep
8156
+ * bound is now derived from the one prebuffer ceiling and there is nothing
8157
+ * left to configure here.
8158
+ *
8159
+ * The key survives in the SHAPE so a config written before that record still
8160
+ * parses and can be migrated deliberately — `RecordingBandSchema` is not
8161
+ * strict, so simply deleting it would strip an operator's value in silence on
8162
+ * the next save (the failure D380 came one commit from shipping). Nothing
8163
+ * reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
8164
+ */
8150
8165
  preBufferSec: number().min(0).optional(),
8151
8166
  postBufferSec: number().min(0).optional()
8152
8167
  });
8153
- ({
8154
- preBufferSec: 15,
8155
- postBufferSec: 30
8156
- }).postBufferSec * 1e3;
8168
+ ({ postBufferSec: 30 }).postBufferSec * 1e3;
8157
8169
  /**
8158
8170
  * Per-device retention overrides. Every field is optional; an unset or `0`
8159
8171
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -8201,8 +8213,29 @@ var RecordingConfigSchema = object({
8201
8213
  * "off" is the absence of a covering band, never a band value.
8202
8214
  */
8203
8215
  bands: array(RecordingBandSchema).default([]),
8216
+ /**
8217
+ * THE device-decided intent: record for as long as the camera itself raises
8218
+ * `recording-signal` (`active: true` while the device is in function — a
8219
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8220
+ * recording intent that is not a band.
8221
+ *
8222
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8223
+ * no hour to program: the device decides. What it costs the operator is one
8224
+ * flag — "this camera can record on its own" — and what it buys is the same
8225
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8226
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8227
+ * job however long it is, and closes one pad after the fall.
8228
+ *
8229
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8230
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8231
+ * operator switching this camera off is REPORTED off, never as broken.
8232
+ */
8233
+ deviceDecision: boolean().optional(),
8204
8234
  retention: RecordingRetentionSchema.optional()
8205
- }).strict();
8235
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8236
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8237
+ path: ["bands"]
8238
+ });
8206
8239
  /**
8207
8240
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8208
8241
  *
@@ -20939,11 +20972,7 @@ var CameraAudioStatusSchema = object({
20939
20972
  });
20940
20973
  /** Recording block — null when no recording cap is active for this device. */
20941
20974
  var CameraRecordingStatusSchema = object({
20942
- mode: _enum([
20943
- "off",
20944
- "continuous",
20945
- "events"
20946
- ]),
20975
+ mode: RecordingStorageModeSchema,
20947
20976
  active: boolean(),
20948
20977
  storageBytes: number()
20949
20978
  });
@@ -27361,11 +27390,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27361
27390
  var RecordingStatusSchema = object({
27362
27391
  deviceId: number(),
27363
27392
  enabled: boolean(),
27364
- activeMode: _enum([
27365
- "off",
27366
- "continuous",
27367
- "events"
27368
- ]),
27393
+ /** THE derived storage mode, from the one definition
27394
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27395
+ * `on-device-decision` could have reached the recorder and not the status. */
27396
+ activeMode: RecordingStorageModeSchema,
27369
27397
  nodeId: string(),
27370
27398
  storageBytes: number()
27371
27399
  });
@@ -8038,17 +8038,29 @@ var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
8038
8038
  /**
8039
8039
  * DERIVED per-camera storage summary — the single field cheap consumers read
8040
8040
  * (the viewer's status dot, the camera list) instead of walking `bands`:
8041
- * - `off` — no band covers the camera (or it is disabled).
8042
- * - `events` — every band records around triggers only.
8043
- * - `continuous` — at least one band records continuously.
8044
- *
8045
- * NEVER authored: the recorder stamps it from the authoritative `bands` on
8046
- * every save (`activeModeForConfig`). Writing it has no effect.
8041
+ * - `off` — no band covers the camera (or it is disabled).
8042
+ * - `events` — every band records around triggers only.
8043
+ * - `continuous` — at least one band records continuously.
8044
+ * - `on-device-decision`— the DEVICE decides: recording runs for as long as the
8045
+ * camera raises its own `recording-signal` level (a robot that cleans). There
8046
+ * is no schedule to author, because there is no hour to program — see
8047
+ * {@link RecordingConfigSchema}`.deviceDecision`.
8048
+ *
8049
+ * NEVER authored: the recorder stamps it from the authoritative intent
8050
+ * (`bands` + `deviceDecision`) on every save (`activeModeForConfig`). Writing it
8051
+ * has no effect.
8052
+ *
8053
+ * `on-device-decision` is named for WHO decides, not for how the recording is
8054
+ * requested. `on-demand` was rejected: in this repo's vocabulary a "demand" is
8055
+ * something the operator makes (the live gate is the recorder's own "demand
8056
+ * window"), and a knob whose name suggests the operator starts it while the
8057
+ * device actually does is the D62 shape — a control nobody can predict.
8047
8058
  */
8048
8059
  var RecordingStorageModeSchema = _enum([
8049
8060
  "off",
8050
8061
  "events",
8051
- "continuous"
8062
+ "continuous",
8063
+ "on-device-decision"
8052
8064
  ]);
8053
8065
  /**
8054
8066
  * Le macro classi che possono aprire una finestra di registrazione — le stesse
@@ -8098,22 +8110,7 @@ var RecordingTriggersSchema = object({
8098
8110
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8099
8111
  * registrare.
8100
8112
  */
8101
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8102
- /**
8103
- * La camera registra per tutta la durata del SEGNALE che lei stessa
8104
- * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8105
- * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8106
- * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8107
- * caduta, così una pulizia di quaranta minuti è UNA clip.
8108
- *
8109
- * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8110
- * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8111
- * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8112
- * segnale mai abbassato (un evento perso) non può tenere aperta una
8113
- * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8114
- * (`holdTrigger` / `releaseTrigger`).
8115
- */
8116
- deviceSignal: boolean().optional()
8113
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8117
8114
  });
8118
8115
  /**
8119
8116
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -8143,13 +8140,28 @@ var RecordingBandSchema = object({
8143
8140
  end: string().regex(HHMM),
8144
8141
  mode: RecordingBandModeSchema,
8145
8142
  triggers: RecordingBandTriggersSchema.optional(),
8143
+ /**
8144
+ * RETIRED (D381). A band no longer carries a pre-buffer of its own.
8145
+ *
8146
+ * It was the retroactive KEEP bound — which already-written segments survive
8147
+ * a trigger — and it had to be at least as wide as the widest pre-roll the
8148
+ * broker could serve, or the gate would delete the seconds the ring had just
8149
+ * handed the writer. That "at least as wide as" is the tell: it was a second
8150
+ * expression of the broker's retention, in different units, in a different
8151
+ * addon, with an invariant the operator had to maintain by hand. The keep
8152
+ * bound is now derived from the one prebuffer ceiling and there is nothing
8153
+ * left to configure here.
8154
+ *
8155
+ * The key survives in the SHAPE so a config written before that record still
8156
+ * parses and can be migrated deliberately — `RecordingBandSchema` is not
8157
+ * strict, so simply deleting it would strip an operator's value in silence on
8158
+ * the next save (the failure D380 came one commit from shipping). Nothing
8159
+ * reads it: {@link stripRetiredBandPreBufferSec} removes it on load.
8160
+ */
8146
8161
  preBufferSec: number().min(0).optional(),
8147
8162
  postBufferSec: number().min(0).optional()
8148
8163
  });
8149
- ({
8150
- preBufferSec: 15,
8151
- postBufferSec: 30
8152
- }).postBufferSec * 1e3;
8164
+ ({ postBufferSec: 30 }).postBufferSec * 1e3;
8153
8165
  /**
8154
8166
  * Per-device retention overrides. Every field is optional; an unset or `0`
8155
8167
  * value inherits the node-wide recorder default. Only footage-lifetime limits
@@ -8197,8 +8209,29 @@ var RecordingConfigSchema = object({
8197
8209
  * "off" is the absence of a covering band, never a band value.
8198
8210
  */
8199
8211
  bands: array(RecordingBandSchema).default([]),
8212
+ /**
8213
+ * THE device-decided intent: record for as long as the camera itself raises
8214
+ * `recording-signal` (`active: true` while the device is in function — a
8215
+ * robot that cleans). AUTHORED, unlike `mode`, and the only authored
8216
+ * recording intent that is not a band.
8217
+ *
8218
+ * It carries NO schedule on purpose. A band is an HOUR, and this feature has
8219
+ * no hour to program: the device decides. What it costs the operator is one
8220
+ * flag — "this camera can record on its own" — and what it buys is the same
8221
+ * hold/release the recorder already implements (D371, `holdTrigger` /
8222
+ * `releaseTrigger`): the window opens on the rise, stays open for the whole
8223
+ * job however long it is, and closes one pad after the fall.
8224
+ *
8225
+ * EXCLUSIVE with `bands` (below): two authorities deciding when the same
8226
+ * camera records is the D62 failure. `off` remains `enabled: false`, so an
8227
+ * operator switching this camera off is REPORTED off, never as broken.
8228
+ */
8229
+ deviceDecision: boolean().optional(),
8200
8230
  retention: RecordingRetentionSchema.optional()
8201
- }).strict();
8231
+ }).strict().refine((config) => config.deviceDecision !== true || config.bands.length === 0, {
8232
+ message: "deviceDecision is a whole-config mode and carries no schedule: it cannot be combined with bands",
8233
+ path: ["bands"]
8234
+ });
8202
8235
  /**
8203
8236
  * Entity-relocation job state (storage entity-routing spec, Phase 4).
8204
8237
  *
@@ -20935,11 +20968,7 @@ var CameraAudioStatusSchema = object({
20935
20968
  });
20936
20969
  /** Recording block — null when no recording cap is active for this device. */
20937
20970
  var CameraRecordingStatusSchema = object({
20938
- mode: _enum([
20939
- "off",
20940
- "continuous",
20941
- "events"
20942
- ]),
20971
+ mode: RecordingStorageModeSchema,
20943
20972
  active: boolean(),
20944
20973
  storageBytes: number()
20945
20974
  });
@@ -27357,11 +27386,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
27357
27386
  var RecordingStatusSchema = object({
27358
27387
  deviceId: number(),
27359
27388
  enabled: boolean(),
27360
- activeMode: _enum([
27361
- "off",
27362
- "continuous",
27363
- "events"
27364
- ]),
27389
+ /** THE derived storage mode, from the one definition
27390
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
27391
+ * `on-device-decision` could have reached the recorder and not the status. */
27392
+ activeMode: RecordingStorageModeSchema,
27365
27393
  nodeId: string(),
27366
27394
  storageBytes: number()
27367
27395
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-google",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "description": "Google Home export — hub-side smart-home fulfillment (SYNC / QUERY / EXECUTE / DISCONNECT) for the non-camera fleet, served over the hub's own OAuth account link. No Google credential is stored, sent or required.",
5
5
  "keywords": [
6
6
  "camstack",