@camstack/addon-provider-wyze 0.2.76 → 0.2.77

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
@@ -6477,6 +6477,21 @@ var CameraStreamSchema = object({
6477
6477
  */
6478
6478
  autoEligible: boolean().optional(),
6479
6479
  /**
6480
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6481
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6482
+ * stream. Consulted by the broker's automatic ranking
6483
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6484
+ * an operator's manual assignment still wins, and an absent hint is the
6485
+ * pixel-ranked default every camera had before this field existed.
6486
+ *
6487
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6488
+ * storage class is written for on its own (`recordings` is high|mid,
6489
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6490
+ * camera's single 720p relay is a `low` in every respect except the slot the
6491
+ * heuristic put it in.
6492
+ */
6493
+ profileHint: CamProfileSchema.optional(),
6494
+ /**
6480
6495
  * Transport-specific opaque metadata. The broker passes it through to
6481
6496
  * the source reader without inspecting it. Currently used by
6482
6497
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7926,7 +7941,22 @@ var RecordingTriggersSchema = object({
7926
7941
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7927
7942
  * registrare.
7928
7943
  */
7929
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7944
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7945
+ /**
7946
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7947
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7948
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7949
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7950
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7951
+ *
7952
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7953
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7954
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7955
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7956
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7957
+ * (`holdTrigger` / `releaseTrigger`).
7958
+ */
7959
+ deviceSignal: boolean().optional()
7930
7960
  });
7931
7961
  /**
7932
7962
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11390,6 +11420,8 @@ method(object({
11390
11420
  label: string().optional(),
11391
11421
  deviceFeatures: array(string()).optional(),
11392
11422
  autoEligible: boolean().optional(),
11423
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11424
+ profileHint: CamProfileSchema.optional(),
11393
11425
  metadata: record(string(), unknown()).optional(),
11394
11426
  /** Required when kind === 'derived' — the source camStreamId the
11395
11427
  * derived broker reads its encoded plane from.
@@ -30044,6 +30076,77 @@ method(object({
30044
30076
  auth: "protected"
30045
30077
  });
30046
30078
  /**
30079
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30080
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30081
+ * running, a gate open) and lowers when it stops.
30082
+ *
30083
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30084
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30085
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30086
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30087
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30088
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30089
+ * which records the dock for that long after every short one. So the recorder
30090
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30091
+ * own post-buffer once it falls.
30092
+ *
30093
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30094
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30095
+ * writes this slice on every change; consumers subscribe to the kernel's
30096
+ * `DeviceStateChanged` for it and read it back through
30097
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30098
+ * against the device (D224, D8/D11).
30099
+ *
30100
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30101
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30102
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30103
+ * about the camera, on the camera.
30104
+ */
30105
+ var RecordingSignalStatusSchema = object({
30106
+ /** True while the device asks to be recorded. */
30107
+ active: boolean(),
30108
+ /**
30109
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30110
+ * …). Free text for the log line and the UI badge; the recorder never
30111
+ * branches on it.
30112
+ */
30113
+ reason: string(),
30114
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30115
+ lastChangedAt: number()
30116
+ });
30117
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30118
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30119
+ var recordingSignalCapability = {
30120
+ name: "recording-signal",
30121
+ scope: "device",
30122
+ deviceNative: true,
30123
+ mode: "singleton",
30124
+ deviceTypes: [DeviceType.Camera],
30125
+ methods: {
30126
+ /** The current level, straight from the slice the provider keeps fresh. */
30127
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30128
+ status: {
30129
+ schema: RecordingSignalStatusSchema,
30130
+ kind: "push",
30131
+ empty: {
30132
+ active: false,
30133
+ reason: "unknown",
30134
+ lastChangedAt: 0
30135
+ }
30136
+ },
30137
+ runtimeState: RecordingSignalRuntimeStateSchema,
30138
+ /**
30139
+ * Runtime-state durability: **session** — a restored `active: true` from
30140
+ * before a restart is exactly the stale level the recorder's reconcile bound
30141
+ * exists to end, and the provider re-derives the true level on activation
30142
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30143
+ *
30144
+ * See `RuntimeStateDurability`. Enforced by
30145
+ * `scripts/check-runtime-state-durability.ts`.
30146
+ */
30147
+ durability: "session"
30148
+ };
30149
+ /**
30047
30150
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30048
30151
  * a rect ROI on a camera frame and names one or more states; the engine
30049
30152
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30541,6 +30644,8 @@ var CamStreamDescriptorSchema = object({
30541
30644
  deviceFeatures: array(string()).optional(),
30542
30645
  /** Eligible for automatic profile assignment. Absent = `true`. */
30543
30646
  autoEligible: boolean().optional(),
30647
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30648
+ profileHint: CamProfileSchema.optional(),
30544
30649
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30545
30650
  metadata: record(string(), unknown()).optional()
30546
30651
  });
@@ -32680,6 +32785,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32680
32785
  pressureSensor: pressureSensorCapability,
32681
32786
  privacyMask: privacyMaskCapability,
32682
32787
  ptzAutotrack: ptzAutotrackCapability,
32788
+ recordingSignal: recordingSignalCapability,
32683
32789
  sceneMonitor: sceneMonitorCapability,
32684
32790
  scriptRunner: scriptRunnerCapability,
32685
32791
  smoke: smokeCapability,
@@ -38427,6 +38533,12 @@ Object.freeze({
38427
38533
  addonId: null,
38428
38534
  access: "view"
38429
38535
  },
38536
+ "recordingSignal.getStatus": {
38537
+ capName: "recording-signal",
38538
+ capScope: "device",
38539
+ addonId: null,
38540
+ access: "view"
38541
+ },
38430
38542
  "sceneMonitor.captureReference": {
38431
38543
  capName: "scene-monitor",
38432
38544
  capScope: "device",
@@ -41419,6 +41531,11 @@ Object.freeze({
41419
41531
  form: "single",
41420
41532
  optional: true
41421
41533
  }],
41534
+ "recordingSignal.getStatus": [{
41535
+ name: "deviceId",
41536
+ form: "single",
41537
+ optional: false
41538
+ }],
41422
41539
  "sceneMonitor.captureReference": [{
41423
41540
  name: "deviceId",
41424
41541
  form: "single",
package/dist/addon.mjs CHANGED
@@ -6456,6 +6456,21 @@ var CameraStreamSchema = object({
6456
6456
  */
6457
6457
  autoEligible: boolean().optional(),
6458
6458
  /**
6459
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6460
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6461
+ * stream. Consulted by the broker's automatic ranking
6462
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6463
+ * an operator's manual assignment still wins, and an absent hint is the
6464
+ * pixel-ranked default every camera had before this field existed.
6465
+ *
6466
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6467
+ * storage class is written for on its own (`recordings` is high|mid,
6468
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6469
+ * camera's single 720p relay is a `low` in every respect except the slot the
6470
+ * heuristic put it in.
6471
+ */
6472
+ profileHint: CamProfileSchema.optional(),
6473
+ /**
6459
6474
  * Transport-specific opaque metadata. The broker passes it through to
6460
6475
  * the source reader without inspecting it. Currently used by
6461
6476
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7905,7 +7920,22 @@ var RecordingTriggersSchema = object({
7905
7920
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7906
7921
  * registrare.
7907
7922
  */
7908
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7923
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7924
+ /**
7925
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7926
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7927
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7928
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7929
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7930
+ *
7931
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7932
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7933
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7934
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7935
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7936
+ * (`holdTrigger` / `releaseTrigger`).
7937
+ */
7938
+ deviceSignal: boolean().optional()
7909
7939
  });
7910
7940
  /**
7911
7941
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11369,6 +11399,8 @@ method(object({
11369
11399
  label: string().optional(),
11370
11400
  deviceFeatures: array(string()).optional(),
11371
11401
  autoEligible: boolean().optional(),
11402
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11403
+ profileHint: CamProfileSchema.optional(),
11372
11404
  metadata: record(string(), unknown()).optional(),
11373
11405
  /** Required when kind === 'derived' — the source camStreamId the
11374
11406
  * derived broker reads its encoded plane from.
@@ -30023,6 +30055,77 @@ method(object({
30023
30055
  auth: "protected"
30024
30056
  });
30025
30057
  /**
30058
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30059
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30060
+ * running, a gate open) and lowers when it stops.
30061
+ *
30062
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30063
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30064
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30065
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30066
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30067
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30068
+ * which records the dock for that long after every short one. So the recorder
30069
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30070
+ * own post-buffer once it falls.
30071
+ *
30072
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30073
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30074
+ * writes this slice on every change; consumers subscribe to the kernel's
30075
+ * `DeviceStateChanged` for it and read it back through
30076
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30077
+ * against the device (D224, D8/D11).
30078
+ *
30079
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30080
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30081
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30082
+ * about the camera, on the camera.
30083
+ */
30084
+ var RecordingSignalStatusSchema = object({
30085
+ /** True while the device asks to be recorded. */
30086
+ active: boolean(),
30087
+ /**
30088
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30089
+ * …). Free text for the log line and the UI badge; the recorder never
30090
+ * branches on it.
30091
+ */
30092
+ reason: string(),
30093
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30094
+ lastChangedAt: number()
30095
+ });
30096
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30097
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30098
+ var recordingSignalCapability = {
30099
+ name: "recording-signal",
30100
+ scope: "device",
30101
+ deviceNative: true,
30102
+ mode: "singleton",
30103
+ deviceTypes: [DeviceType.Camera],
30104
+ methods: {
30105
+ /** The current level, straight from the slice the provider keeps fresh. */
30106
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30107
+ status: {
30108
+ schema: RecordingSignalStatusSchema,
30109
+ kind: "push",
30110
+ empty: {
30111
+ active: false,
30112
+ reason: "unknown",
30113
+ lastChangedAt: 0
30114
+ }
30115
+ },
30116
+ runtimeState: RecordingSignalRuntimeStateSchema,
30117
+ /**
30118
+ * Runtime-state durability: **session** — a restored `active: true` from
30119
+ * before a restart is exactly the stale level the recorder's reconcile bound
30120
+ * exists to end, and the provider re-derives the true level on activation
30121
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30122
+ *
30123
+ * See `RuntimeStateDurability`. Enforced by
30124
+ * `scripts/check-runtime-state-durability.ts`.
30125
+ */
30126
+ durability: "session"
30127
+ };
30128
+ /**
30026
30129
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30027
30130
  * a rect ROI on a camera frame and names one or more states; the engine
30028
30131
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30520,6 +30623,8 @@ var CamStreamDescriptorSchema = object({
30520
30623
  deviceFeatures: array(string()).optional(),
30521
30624
  /** Eligible for automatic profile assignment. Absent = `true`. */
30522
30625
  autoEligible: boolean().optional(),
30626
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30627
+ profileHint: CamProfileSchema.optional(),
30523
30628
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30524
30629
  metadata: record(string(), unknown()).optional()
30525
30630
  });
@@ -32659,6 +32764,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32659
32764
  pressureSensor: pressureSensorCapability,
32660
32765
  privacyMask: privacyMaskCapability,
32661
32766
  ptzAutotrack: ptzAutotrackCapability,
32767
+ recordingSignal: recordingSignalCapability,
32662
32768
  sceneMonitor: sceneMonitorCapability,
32663
32769
  scriptRunner: scriptRunnerCapability,
32664
32770
  smoke: smokeCapability,
@@ -38406,6 +38512,12 @@ Object.freeze({
38406
38512
  addonId: null,
38407
38513
  access: "view"
38408
38514
  },
38515
+ "recordingSignal.getStatus": {
38516
+ capName: "recording-signal",
38517
+ capScope: "device",
38518
+ addonId: null,
38519
+ access: "view"
38520
+ },
38409
38521
  "sceneMonitor.captureReference": {
38410
38522
  capName: "scene-monitor",
38411
38523
  capScope: "device",
@@ -41398,6 +41510,11 @@ Object.freeze({
41398
41510
  form: "single",
41399
41511
  optional: true
41400
41512
  }],
41513
+ "recordingSignal.getStatus": [{
41514
+ name: "deviceId",
41515
+ form: "single",
41516
+ optional: false
41517
+ }],
41401
41518
  "sceneMonitor.captureReference": [{
41402
41519
  name: "deviceId",
41403
41520
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-wyze",
3
- "version": "0.2.76",
3
+ "version": "0.2.77",
4
4
  "description": "Wyze camera device-provider addon for CamStack — wraps the @apocaliss92/wyze-bridge-js P2P/DTLS client, feeding the stream-broker via the pull-rfc4571 lazy-publish path (a structural twin of addon-provider-reolink)",
5
5
  "keywords": [
6
6
  "camstack",