@camstack/addon-provider-dreo 0.2.72 → 0.2.73

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
@@ -6481,6 +6481,21 @@ var CameraStreamSchema = object({
6481
6481
  */
6482
6482
  autoEligible: boolean().optional(),
6483
6483
  /**
6484
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6485
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6486
+ * stream. Consulted by the broker's automatic ranking
6487
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6488
+ * an operator's manual assignment still wins, and an absent hint is the
6489
+ * pixel-ranked default every camera had before this field existed.
6490
+ *
6491
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6492
+ * storage class is written for on its own (`recordings` is high|mid,
6493
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6494
+ * camera's single 720p relay is a `low` in every respect except the slot the
6495
+ * heuristic put it in.
6496
+ */
6497
+ profileHint: CamProfileSchema.optional(),
6498
+ /**
6484
6499
  * Transport-specific opaque metadata. The broker passes it through to
6485
6500
  * the source reader without inspecting it. Currently used by
6486
6501
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7930,7 +7945,22 @@ var RecordingTriggersSchema = object({
7930
7945
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7931
7946
  * registrare.
7932
7947
  */
7933
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7948
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7949
+ /**
7950
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7951
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7952
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7953
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7954
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7955
+ *
7956
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7957
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7958
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7959
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7960
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7961
+ * (`holdTrigger` / `releaseTrigger`).
7962
+ */
7963
+ deviceSignal: boolean().optional()
7934
7964
  });
7935
7965
  /**
7936
7966
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11394,6 +11424,8 @@ method(object({
11394
11424
  label: string().optional(),
11395
11425
  deviceFeatures: array(string()).optional(),
11396
11426
  autoEligible: boolean().optional(),
11427
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11428
+ profileHint: CamProfileSchema.optional(),
11397
11429
  metadata: record(string(), unknown()).optional(),
11398
11430
  /** Required when kind === 'derived' — the source camStreamId the
11399
11431
  * derived broker reads its encoded plane from.
@@ -29944,6 +29976,77 @@ method(object({
29944
29976
  auth: "protected"
29945
29977
  });
29946
29978
  /**
29979
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
29980
+ * something it knows about is happening (a robot vacuum cleaning, a machine
29981
+ * running, a gate open) and lowers when it stops.
29982
+ *
29983
+ * It is a level, not an edge. The sensor triggers the recorder already listens
29984
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
29985
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
29986
+ * still happening" cannot be expressed as an edge plus a post-buffer without
29987
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
29988
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
29989
+ * which records the dock for that long after every short one. So the recorder
29990
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
29991
+ * own post-buffer once it falls.
29992
+ *
29993
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
29994
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
29995
+ * writes this slice on every change; consumers subscribe to the kernel's
29996
+ * `DeviceStateChanged` for it and read it back through
29997
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
29998
+ * against the device (D224, D8/D11).
29999
+ *
30000
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30001
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30002
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30003
+ * about the camera, on the camera.
30004
+ */
30005
+ var RecordingSignalStatusSchema = object({
30006
+ /** True while the device asks to be recorded. */
30007
+ active: boolean(),
30008
+ /**
30009
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30010
+ * …). Free text for the log line and the UI badge; the recorder never
30011
+ * branches on it.
30012
+ */
30013
+ reason: string(),
30014
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30015
+ lastChangedAt: number()
30016
+ });
30017
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30018
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30019
+ var recordingSignalCapability = {
30020
+ name: "recording-signal",
30021
+ scope: "device",
30022
+ deviceNative: true,
30023
+ mode: "singleton",
30024
+ deviceTypes: [DeviceType.Camera],
30025
+ methods: {
30026
+ /** The current level, straight from the slice the provider keeps fresh. */
30027
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30028
+ status: {
30029
+ schema: RecordingSignalStatusSchema,
30030
+ kind: "push",
30031
+ empty: {
30032
+ active: false,
30033
+ reason: "unknown",
30034
+ lastChangedAt: 0
30035
+ }
30036
+ },
30037
+ runtimeState: RecordingSignalRuntimeStateSchema,
30038
+ /**
30039
+ * Runtime-state durability: **session** — a restored `active: true` from
30040
+ * before a restart is exactly the stale level the recorder's reconcile bound
30041
+ * exists to end, and the provider re-derives the true level on activation
30042
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30043
+ *
30044
+ * See `RuntimeStateDurability`. Enforced by
30045
+ * `scripts/check-runtime-state-durability.ts`.
30046
+ */
30047
+ durability: "session"
30048
+ };
30049
+ /**
29947
30050
  * scene-monitor — device-scoped reference-region state cap. An operator marks
29948
30051
  * a rect ROI on a camera frame and names one or more states; the engine
29949
30052
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30441,6 +30544,8 @@ var CamStreamDescriptorSchema = object({
30441
30544
  deviceFeatures: array(string()).optional(),
30442
30545
  /** Eligible for automatic profile assignment. Absent = `true`. */
30443
30546
  autoEligible: boolean().optional(),
30547
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30548
+ profileHint: CamProfileSchema.optional(),
30444
30549
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30445
30550
  metadata: record(string(), unknown()).optional()
30446
30551
  });
@@ -32580,6 +32685,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32580
32685
  pressureSensor: pressureSensorCapability,
32581
32686
  privacyMask: privacyMaskCapability,
32582
32687
  ptzAutotrack: ptzAutotrackCapability,
32688
+ recordingSignal: recordingSignalCapability,
32583
32689
  sceneMonitor: sceneMonitorCapability,
32584
32690
  scriptRunner: scriptRunnerCapability,
32585
32691
  smoke: smokeCapability,
@@ -38327,6 +38433,12 @@ Object.freeze({
38327
38433
  addonId: null,
38328
38434
  access: "view"
38329
38435
  },
38436
+ "recordingSignal.getStatus": {
38437
+ capName: "recording-signal",
38438
+ capScope: "device",
38439
+ addonId: null,
38440
+ access: "view"
38441
+ },
38330
38442
  "sceneMonitor.captureReference": {
38331
38443
  capName: "scene-monitor",
38332
38444
  capScope: "device",
@@ -41319,6 +41431,11 @@ Object.freeze({
41319
41431
  form: "single",
41320
41432
  optional: true
41321
41433
  }],
41434
+ "recordingSignal.getStatus": [{
41435
+ name: "deviceId",
41436
+ form: "single",
41437
+ optional: false
41438
+ }],
41322
41439
  "sceneMonitor.captureReference": [{
41323
41440
  name: "deviceId",
41324
41441
  form: "single",
package/dist/addon.mjs CHANGED
@@ -6482,6 +6482,21 @@ var CameraStreamSchema = object({
6482
6482
  */
6483
6483
  autoEligible: boolean().optional(),
6484
6484
  /**
6485
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6486
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6487
+ * stream. Consulted by the broker's automatic ranking
6488
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6489
+ * an operator's manual assignment still wins, and an absent hint is the
6490
+ * pixel-ranked default every camera had before this field existed.
6491
+ *
6492
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6493
+ * storage class is written for on its own (`recordings` is high|mid,
6494
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6495
+ * camera's single 720p relay is a `low` in every respect except the slot the
6496
+ * heuristic put it in.
6497
+ */
6498
+ profileHint: CamProfileSchema.optional(),
6499
+ /**
6485
6500
  * Transport-specific opaque metadata. The broker passes it through to
6486
6501
  * the source reader without inspecting it. Currently used by
6487
6502
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7931,7 +7946,22 @@ var RecordingTriggersSchema = object({
7931
7946
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7932
7947
  * registrare.
7933
7948
  */
7934
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7949
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7950
+ /**
7951
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7952
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7953
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7954
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7955
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7956
+ *
7957
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7958
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7959
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7960
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7961
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7962
+ * (`holdTrigger` / `releaseTrigger`).
7963
+ */
7964
+ deviceSignal: boolean().optional()
7935
7965
  });
7936
7966
  /**
7937
7967
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11395,6 +11425,8 @@ method(object({
11395
11425
  label: string().optional(),
11396
11426
  deviceFeatures: array(string()).optional(),
11397
11427
  autoEligible: boolean().optional(),
11428
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11429
+ profileHint: CamProfileSchema.optional(),
11398
11430
  metadata: record(string(), unknown()).optional(),
11399
11431
  /** Required when kind === 'derived' — the source camStreamId the
11400
11432
  * derived broker reads its encoded plane from.
@@ -29945,6 +29977,77 @@ method(object({
29945
29977
  auth: "protected"
29946
29978
  });
29947
29979
  /**
29980
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
29981
+ * something it knows about is happening (a robot vacuum cleaning, a machine
29982
+ * running, a gate open) and lowers when it stops.
29983
+ *
29984
+ * It is a level, not an edge. The sensor triggers the recorder already listens
29985
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
29986
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
29987
+ * still happening" cannot be expressed as an edge plus a post-buffer without
29988
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
29989
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
29990
+ * which records the dock for that long after every short one. So the recorder
29991
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
29992
+ * own post-buffer once it falls.
29993
+ *
29994
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
29995
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
29996
+ * writes this slice on every change; consumers subscribe to the kernel's
29997
+ * `DeviceStateChanged` for it and read it back through
29998
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
29999
+ * against the device (D224, D8/D11).
30000
+ *
30001
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30002
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30003
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30004
+ * about the camera, on the camera.
30005
+ */
30006
+ var RecordingSignalStatusSchema = object({
30007
+ /** True while the device asks to be recorded. */
30008
+ active: boolean(),
30009
+ /**
30010
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30011
+ * …). Free text for the log line and the UI badge; the recorder never
30012
+ * branches on it.
30013
+ */
30014
+ reason: string(),
30015
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30016
+ lastChangedAt: number()
30017
+ });
30018
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30019
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30020
+ var recordingSignalCapability = {
30021
+ name: "recording-signal",
30022
+ scope: "device",
30023
+ deviceNative: true,
30024
+ mode: "singleton",
30025
+ deviceTypes: [DeviceType.Camera],
30026
+ methods: {
30027
+ /** The current level, straight from the slice the provider keeps fresh. */
30028
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30029
+ status: {
30030
+ schema: RecordingSignalStatusSchema,
30031
+ kind: "push",
30032
+ empty: {
30033
+ active: false,
30034
+ reason: "unknown",
30035
+ lastChangedAt: 0
30036
+ }
30037
+ },
30038
+ runtimeState: RecordingSignalRuntimeStateSchema,
30039
+ /**
30040
+ * Runtime-state durability: **session** — a restored `active: true` from
30041
+ * before a restart is exactly the stale level the recorder's reconcile bound
30042
+ * exists to end, and the provider re-derives the true level on activation
30043
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30044
+ *
30045
+ * See `RuntimeStateDurability`. Enforced by
30046
+ * `scripts/check-runtime-state-durability.ts`.
30047
+ */
30048
+ durability: "session"
30049
+ };
30050
+ /**
29948
30051
  * scene-monitor — device-scoped reference-region state cap. An operator marks
29949
30052
  * a rect ROI on a camera frame and names one or more states; the engine
29950
30053
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30442,6 +30545,8 @@ var CamStreamDescriptorSchema = object({
30442
30545
  deviceFeatures: array(string()).optional(),
30443
30546
  /** Eligible for automatic profile assignment. Absent = `true`. */
30444
30547
  autoEligible: boolean().optional(),
30548
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30549
+ profileHint: CamProfileSchema.optional(),
30445
30550
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30446
30551
  metadata: record(string(), unknown()).optional()
30447
30552
  });
@@ -32581,6 +32686,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32581
32686
  pressureSensor: pressureSensorCapability,
32582
32687
  privacyMask: privacyMaskCapability,
32583
32688
  ptzAutotrack: ptzAutotrackCapability,
32689
+ recordingSignal: recordingSignalCapability,
32584
32690
  sceneMonitor: sceneMonitorCapability,
32585
32691
  scriptRunner: scriptRunnerCapability,
32586
32692
  smoke: smokeCapability,
@@ -38328,6 +38434,12 @@ Object.freeze({
38328
38434
  addonId: null,
38329
38435
  access: "view"
38330
38436
  },
38437
+ "recordingSignal.getStatus": {
38438
+ capName: "recording-signal",
38439
+ capScope: "device",
38440
+ addonId: null,
38441
+ access: "view"
38442
+ },
38331
38443
  "sceneMonitor.captureReference": {
38332
38444
  capName: "scene-monitor",
38333
38445
  capScope: "device",
@@ -41320,6 +41432,11 @@ Object.freeze({
41320
41432
  form: "single",
41321
41433
  optional: true
41322
41434
  }],
41435
+ "recordingSignal.getStatus": [{
41436
+ name: "deviceId",
41437
+ form: "single",
41438
+ optional: false
41439
+ }],
41323
41440
  "sceneMonitor.captureReference": [{
41324
41441
  name: "deviceId",
41325
41442
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreo",
3
- "version": "0.2.72",
3
+ "version": "0.2.73",
4
4
  "description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
5
5
  "keywords": [
6
6
  "camstack",