@camstack/addon-provider-gree 0.2.70 → 0.2.72

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
@@ -5409,6 +5409,12 @@ Object.fromEntries([
5409
5409
  icon: "move",
5410
5410
  order: 40
5411
5411
  },
5412
+ {
5413
+ id: "navigation",
5414
+ label: "Navigation",
5415
+ icon: "compass",
5416
+ order: 41
5417
+ },
5412
5418
  {
5413
5419
  id: "consumables",
5414
5420
  label: "Consumables",
@@ -6442,6 +6448,21 @@ var CameraStreamSchema = object({
6442
6448
  */
6443
6449
  autoEligible: boolean().optional(),
6444
6450
  /**
6451
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6452
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6453
+ * stream. Consulted by the broker's automatic ranking
6454
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6455
+ * an operator's manual assignment still wins, and an absent hint is the
6456
+ * pixel-ranked default every camera had before this field existed.
6457
+ *
6458
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6459
+ * storage class is written for on its own (`recordings` is high|mid,
6460
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6461
+ * camera's single 720p relay is a `low` in every respect except the slot the
6462
+ * heuristic put it in.
6463
+ */
6464
+ profileHint: CamProfileSchema.optional(),
6465
+ /**
6445
6466
  * Transport-specific opaque metadata. The broker passes it through to
6446
6467
  * the source reader without inspecting it. Currently used by
6447
6468
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7891,7 +7912,22 @@ var RecordingTriggersSchema = object({
7891
7912
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7892
7913
  * registrare.
7893
7914
  */
7894
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7915
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7916
+ /**
7917
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7918
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7919
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7920
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7921
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7922
+ *
7923
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7924
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7925
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7926
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7927
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7928
+ * (`holdTrigger` / `releaseTrigger`).
7929
+ */
7930
+ deviceSignal: boolean().optional()
7895
7931
  });
7896
7932
  /**
7897
7933
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11355,6 +11391,8 @@ method(object({
11355
11391
  label: string().optional(),
11356
11392
  deviceFeatures: array(string()).optional(),
11357
11393
  autoEligible: boolean().optional(),
11394
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11395
+ profileHint: CamProfileSchema.optional(),
11358
11396
  metadata: record(string(), unknown()).optional(),
11359
11397
  /** Required when kind === 'derived' — the source camStreamId the
11360
11398
  * derived broker reads its encoded plane from.
@@ -29880,6 +29918,77 @@ method(object({
29880
29918
  auth: "protected"
29881
29919
  });
29882
29920
  /**
29921
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
29922
+ * something it knows about is happening (a robot vacuum cleaning, a machine
29923
+ * running, a gate open) and lowers when it stops.
29924
+ *
29925
+ * It is a level, not an edge. The sensor triggers the recorder already listens
29926
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
29927
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
29928
+ * still happening" cannot be expressed as an edge plus a post-buffer without
29929
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
29930
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
29931
+ * which records the dock for that long after every short one. So the recorder
29932
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
29933
+ * own post-buffer once it falls.
29934
+ *
29935
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
29936
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
29937
+ * writes this slice on every change; consumers subscribe to the kernel's
29938
+ * `DeviceStateChanged` for it and read it back through
29939
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
29940
+ * against the device (D224, D8/D11).
29941
+ *
29942
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
29943
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
29944
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
29945
+ * about the camera, on the camera.
29946
+ */
29947
+ var RecordingSignalStatusSchema = object({
29948
+ /** True while the device asks to be recorded. */
29949
+ active: boolean(),
29950
+ /**
29951
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
29952
+ * …). Free text for the log line and the UI badge; the recorder never
29953
+ * branches on it.
29954
+ */
29955
+ reason: string(),
29956
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
29957
+ lastChangedAt: number()
29958
+ });
29959
+ /** The runtime-state slice: the status plus the clock every slice carries. */
29960
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
29961
+ var recordingSignalCapability = {
29962
+ name: "recording-signal",
29963
+ scope: "device",
29964
+ deviceNative: true,
29965
+ mode: "singleton",
29966
+ deviceTypes: [DeviceType.Camera],
29967
+ methods: {
29968
+ /** The current level, straight from the slice the provider keeps fresh. */
29969
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
29970
+ status: {
29971
+ schema: RecordingSignalStatusSchema,
29972
+ kind: "push",
29973
+ empty: {
29974
+ active: false,
29975
+ reason: "unknown",
29976
+ lastChangedAt: 0
29977
+ }
29978
+ },
29979
+ runtimeState: RecordingSignalRuntimeStateSchema,
29980
+ /**
29981
+ * Runtime-state durability: **session** — a restored `active: true` from
29982
+ * before a restart is exactly the stale level the recorder's reconcile bound
29983
+ * exists to end, and the provider re-derives the true level on activation
29984
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
29985
+ *
29986
+ * See `RuntimeStateDurability`. Enforced by
29987
+ * `scripts/check-runtime-state-durability.ts`.
29988
+ */
29989
+ durability: "session"
29990
+ };
29991
+ /**
29883
29992
  * scene-monitor — device-scoped reference-region state cap. An operator marks
29884
29993
  * a rect ROI on a camera frame and names one or more states; the engine
29885
29994
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30377,6 +30486,8 @@ var CamStreamDescriptorSchema = object({
30377
30486
  deviceFeatures: array(string()).optional(),
30378
30487
  /** Eligible for automatic profile assignment. Absent = `true`. */
30379
30488
  autoEligible: boolean().optional(),
30489
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30490
+ profileHint: CamProfileSchema.optional(),
30380
30491
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30381
30492
  metadata: record(string(), unknown()).optional()
30382
30493
  });
@@ -32516,6 +32627,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32516
32627
  pressureSensor: pressureSensorCapability,
32517
32628
  privacyMask: privacyMaskCapability,
32518
32629
  ptzAutotrack: ptzAutotrackCapability,
32630
+ recordingSignal: recordingSignalCapability,
32519
32631
  sceneMonitor: sceneMonitorCapability,
32520
32632
  scriptRunner: scriptRunnerCapability,
32521
32633
  smoke: smokeCapability,
@@ -38263,6 +38375,12 @@ Object.freeze({
38263
38375
  addonId: null,
38264
38376
  access: "view"
38265
38377
  },
38378
+ "recordingSignal.getStatus": {
38379
+ capName: "recording-signal",
38380
+ capScope: "device",
38381
+ addonId: null,
38382
+ access: "view"
38383
+ },
38266
38384
  "sceneMonitor.captureReference": {
38267
38385
  capName: "scene-monitor",
38268
38386
  capScope: "device",
@@ -41255,6 +41373,11 @@ Object.freeze({
41255
41373
  form: "single",
41256
41374
  optional: true
41257
41375
  }],
41376
+ "recordingSignal.getStatus": [{
41377
+ name: "deviceId",
41378
+ form: "single",
41379
+ optional: false
41380
+ }],
41258
41381
  "sceneMonitor.captureReference": [{
41259
41382
  name: "deviceId",
41260
41383
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5408,6 +5408,12 @@ Object.fromEntries([
5408
5408
  icon: "move",
5409
5409
  order: 40
5410
5410
  },
5411
+ {
5412
+ id: "navigation",
5413
+ label: "Navigation",
5414
+ icon: "compass",
5415
+ order: 41
5416
+ },
5411
5417
  {
5412
5418
  id: "consumables",
5413
5419
  label: "Consumables",
@@ -6441,6 +6447,21 @@ var CameraStreamSchema = object({
6441
6447
  */
6442
6448
  autoEligible: boolean().optional(),
6443
6449
  /**
6450
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6451
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6452
+ * stream. Consulted by the broker's automatic ranking
6453
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6454
+ * an operator's manual assignment still wins, and an absent hint is the
6455
+ * pixel-ranked default every camera had before this field existed.
6456
+ *
6457
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6458
+ * storage class is written for on its own (`recordings` is high|mid,
6459
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6460
+ * camera's single 720p relay is a `low` in every respect except the slot the
6461
+ * heuristic put it in.
6462
+ */
6463
+ profileHint: CamProfileSchema.optional(),
6464
+ /**
6444
6465
  * Transport-specific opaque metadata. The broker passes it through to
6445
6466
  * the source reader without inspecting it. Currently used by
6446
6467
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7890,7 +7911,22 @@ var RecordingTriggersSchema = object({
7890
7911
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7891
7912
  * registrare.
7892
7913
  */
7893
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7914
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7915
+ /**
7916
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7917
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7918
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7919
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7920
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7921
+ *
7922
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7923
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7924
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7925
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7926
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7927
+ * (`holdTrigger` / `releaseTrigger`).
7928
+ */
7929
+ deviceSignal: boolean().optional()
7894
7930
  });
7895
7931
  /**
7896
7932
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11354,6 +11390,8 @@ method(object({
11354
11390
  label: string().optional(),
11355
11391
  deviceFeatures: array(string()).optional(),
11356
11392
  autoEligible: boolean().optional(),
11393
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11394
+ profileHint: CamProfileSchema.optional(),
11357
11395
  metadata: record(string(), unknown()).optional(),
11358
11396
  /** Required when kind === 'derived' — the source camStreamId the
11359
11397
  * derived broker reads its encoded plane from.
@@ -29879,6 +29917,77 @@ method(object({
29879
29917
  auth: "protected"
29880
29918
  });
29881
29919
  /**
29920
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
29921
+ * something it knows about is happening (a robot vacuum cleaning, a machine
29922
+ * running, a gate open) and lowers when it stops.
29923
+ *
29924
+ * It is a level, not an edge. The sensor triggers the recorder already listens
29925
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
29926
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
29927
+ * still happening" cannot be expressed as an edge plus a post-buffer without
29928
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
29929
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
29930
+ * which records the dock for that long after every short one. So the recorder
29931
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
29932
+ * own post-buffer once it falls.
29933
+ *
29934
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
29935
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
29936
+ * writes this slice on every change; consumers subscribe to the kernel's
29937
+ * `DeviceStateChanged` for it and read it back through
29938
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
29939
+ * against the device (D224, D8/D11).
29940
+ *
29941
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
29942
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
29943
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
29944
+ * about the camera, on the camera.
29945
+ */
29946
+ var RecordingSignalStatusSchema = object({
29947
+ /** True while the device asks to be recorded. */
29948
+ active: boolean(),
29949
+ /**
29950
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
29951
+ * …). Free text for the log line and the UI badge; the recorder never
29952
+ * branches on it.
29953
+ */
29954
+ reason: string(),
29955
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
29956
+ lastChangedAt: number()
29957
+ });
29958
+ /** The runtime-state slice: the status plus the clock every slice carries. */
29959
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
29960
+ var recordingSignalCapability = {
29961
+ name: "recording-signal",
29962
+ scope: "device",
29963
+ deviceNative: true,
29964
+ mode: "singleton",
29965
+ deviceTypes: [DeviceType.Camera],
29966
+ methods: {
29967
+ /** The current level, straight from the slice the provider keeps fresh. */
29968
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
29969
+ status: {
29970
+ schema: RecordingSignalStatusSchema,
29971
+ kind: "push",
29972
+ empty: {
29973
+ active: false,
29974
+ reason: "unknown",
29975
+ lastChangedAt: 0
29976
+ }
29977
+ },
29978
+ runtimeState: RecordingSignalRuntimeStateSchema,
29979
+ /**
29980
+ * Runtime-state durability: **session** — a restored `active: true` from
29981
+ * before a restart is exactly the stale level the recorder's reconcile bound
29982
+ * exists to end, and the provider re-derives the true level on activation
29983
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
29984
+ *
29985
+ * See `RuntimeStateDurability`. Enforced by
29986
+ * `scripts/check-runtime-state-durability.ts`.
29987
+ */
29988
+ durability: "session"
29989
+ };
29990
+ /**
29882
29991
  * scene-monitor — device-scoped reference-region state cap. An operator marks
29883
29992
  * a rect ROI on a camera frame and names one or more states; the engine
29884
29993
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30376,6 +30485,8 @@ var CamStreamDescriptorSchema = object({
30376
30485
  deviceFeatures: array(string()).optional(),
30377
30486
  /** Eligible for automatic profile assignment. Absent = `true`. */
30378
30487
  autoEligible: boolean().optional(),
30488
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30489
+ profileHint: CamProfileSchema.optional(),
30379
30490
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30380
30491
  metadata: record(string(), unknown()).optional()
30381
30492
  });
@@ -32515,6 +32626,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32515
32626
  pressureSensor: pressureSensorCapability,
32516
32627
  privacyMask: privacyMaskCapability,
32517
32628
  ptzAutotrack: ptzAutotrackCapability,
32629
+ recordingSignal: recordingSignalCapability,
32518
32630
  sceneMonitor: sceneMonitorCapability,
32519
32631
  scriptRunner: scriptRunnerCapability,
32520
32632
  smoke: smokeCapability,
@@ -38262,6 +38374,12 @@ Object.freeze({
38262
38374
  addonId: null,
38263
38375
  access: "view"
38264
38376
  },
38377
+ "recordingSignal.getStatus": {
38378
+ capName: "recording-signal",
38379
+ capScope: "device",
38380
+ addonId: null,
38381
+ access: "view"
38382
+ },
38265
38383
  "sceneMonitor.captureReference": {
38266
38384
  capName: "scene-monitor",
38267
38385
  capScope: "device",
@@ -41254,6 +41372,11 @@ Object.freeze({
41254
41372
  form: "single",
41255
41373
  optional: true
41256
41374
  }],
41375
+ "recordingSignal.getStatus": [{
41376
+ name: "deviceId",
41377
+ form: "single",
41378
+ optional: false
41379
+ }],
41257
41380
  "sceneMonitor.captureReference": [{
41258
41381
  name: "deviceId",
41259
41382
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-gree",
3
- "version": "0.2.70",
3
+ "version": "0.2.72",
4
4
  "description": "Gree air-conditioner device-provider addon for CamStack — wraps the @apocaliss92/nodegree local-UDP client (LAN discovery + AES control), exposing climate-control and fan-control",
5
5
  "keywords": [
6
6
  "camstack",