@camstack/addon-provider-rtsp 1.2.72 → 1.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
@@ -6469,6 +6469,21 @@ var CameraStreamSchema = object({
6469
6469
  */
6470
6470
  autoEligible: boolean().optional(),
6471
6471
  /**
6472
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6473
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6474
+ * stream. Consulted by the broker's automatic ranking
6475
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6476
+ * an operator's manual assignment still wins, and an absent hint is the
6477
+ * pixel-ranked default every camera had before this field existed.
6478
+ *
6479
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6480
+ * storage class is written for on its own (`recordings` is high|mid,
6481
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6482
+ * camera's single 720p relay is a `low` in every respect except the slot the
6483
+ * heuristic put it in.
6484
+ */
6485
+ profileHint: CamProfileSchema.optional(),
6486
+ /**
6472
6487
  * Transport-specific opaque metadata. The broker passes it through to
6473
6488
  * the source reader without inspecting it. Currently used by
6474
6489
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7950,7 +7965,22 @@ var RecordingTriggersSchema = object({
7950
7965
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7951
7966
  * registrare.
7952
7967
  */
7953
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7968
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7969
+ /**
7970
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7971
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7972
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7973
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7974
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7975
+ *
7976
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7977
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7978
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7979
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7980
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7981
+ * (`holdTrigger` / `releaseTrigger`).
7982
+ */
7983
+ deviceSignal: boolean().optional()
7954
7984
  });
7955
7985
  /**
7956
7986
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11414,6 +11444,8 @@ method(object({
11414
11444
  label: string().optional(),
11415
11445
  deviceFeatures: array(string()).optional(),
11416
11446
  autoEligible: boolean().optional(),
11447
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11448
+ profileHint: CamProfileSchema.optional(),
11417
11449
  metadata: record(string(), unknown()).optional(),
11418
11450
  /** Required when kind === 'derived' — the source camStreamId the
11419
11451
  * derived broker reads its encoded plane from.
@@ -30051,6 +30083,77 @@ method(object({
30051
30083
  auth: "protected"
30052
30084
  });
30053
30085
  /**
30086
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30087
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30088
+ * running, a gate open) and lowers when it stops.
30089
+ *
30090
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30091
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30092
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30093
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30094
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30095
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30096
+ * which records the dock for that long after every short one. So the recorder
30097
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30098
+ * own post-buffer once it falls.
30099
+ *
30100
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30101
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30102
+ * writes this slice on every change; consumers subscribe to the kernel's
30103
+ * `DeviceStateChanged` for it and read it back through
30104
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30105
+ * against the device (D224, D8/D11).
30106
+ *
30107
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30108
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30109
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30110
+ * about the camera, on the camera.
30111
+ */
30112
+ var RecordingSignalStatusSchema = object({
30113
+ /** True while the device asks to be recorded. */
30114
+ active: boolean(),
30115
+ /**
30116
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30117
+ * …). Free text for the log line and the UI badge; the recorder never
30118
+ * branches on it.
30119
+ */
30120
+ reason: string(),
30121
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30122
+ lastChangedAt: number()
30123
+ });
30124
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30125
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30126
+ var recordingSignalCapability = {
30127
+ name: "recording-signal",
30128
+ scope: "device",
30129
+ deviceNative: true,
30130
+ mode: "singleton",
30131
+ deviceTypes: [DeviceType.Camera],
30132
+ methods: {
30133
+ /** The current level, straight from the slice the provider keeps fresh. */
30134
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30135
+ status: {
30136
+ schema: RecordingSignalStatusSchema,
30137
+ kind: "push",
30138
+ empty: {
30139
+ active: false,
30140
+ reason: "unknown",
30141
+ lastChangedAt: 0
30142
+ }
30143
+ },
30144
+ runtimeState: RecordingSignalRuntimeStateSchema,
30145
+ /**
30146
+ * Runtime-state durability: **session** — a restored `active: true` from
30147
+ * before a restart is exactly the stale level the recorder's reconcile bound
30148
+ * exists to end, and the provider re-derives the true level on activation
30149
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30150
+ *
30151
+ * See `RuntimeStateDurability`. Enforced by
30152
+ * `scripts/check-runtime-state-durability.ts`.
30153
+ */
30154
+ durability: "session"
30155
+ };
30156
+ /**
30054
30157
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30055
30158
  * a rect ROI on a camera frame and names one or more states; the engine
30056
30159
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30548,6 +30651,8 @@ var CamStreamDescriptorSchema = object({
30548
30651
  deviceFeatures: array(string()).optional(),
30549
30652
  /** Eligible for automatic profile assignment. Absent = `true`. */
30550
30653
  autoEligible: boolean().optional(),
30654
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30655
+ profileHint: CamProfileSchema.optional(),
30551
30656
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30552
30657
  metadata: record(string(), unknown()).optional()
30553
30658
  });
@@ -32687,6 +32792,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32687
32792
  pressureSensor: pressureSensorCapability,
32688
32793
  privacyMask: privacyMaskCapability,
32689
32794
  ptzAutotrack: ptzAutotrackCapability,
32795
+ recordingSignal: recordingSignalCapability,
32690
32796
  sceneMonitor: sceneMonitorCapability,
32691
32797
  scriptRunner: scriptRunnerCapability,
32692
32798
  smoke: smokeCapability,
@@ -38500,6 +38606,12 @@ Object.freeze({
38500
38606
  addonId: null,
38501
38607
  access: "view"
38502
38608
  },
38609
+ "recordingSignal.getStatus": {
38610
+ capName: "recording-signal",
38611
+ capScope: "device",
38612
+ addonId: null,
38613
+ access: "view"
38614
+ },
38503
38615
  "sceneMonitor.captureReference": {
38504
38616
  capName: "scene-monitor",
38505
38617
  capScope: "device",
@@ -41492,6 +41604,11 @@ Object.freeze({
41492
41604
  form: "single",
41493
41605
  optional: true
41494
41606
  }],
41607
+ "recordingSignal.getStatus": [{
41608
+ name: "deviceId",
41609
+ form: "single",
41610
+ optional: false
41611
+ }],
41495
41612
  "sceneMonitor.captureReference": [{
41496
41613
  name: "deviceId",
41497
41614
  form: "single",
package/dist/addon.mjs CHANGED
@@ -6445,6 +6445,21 @@ var CameraStreamSchema = object({
6445
6445
  */
6446
6446
  autoEligible: boolean().optional(),
6447
6447
  /**
6448
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6449
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6450
+ * stream. Consulted by the broker's automatic ranking
6451
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6452
+ * an operator's manual assignment still wins, and an absent hint is the
6453
+ * pixel-ranked default every camera had before this field existed.
6454
+ *
6455
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6456
+ * storage class is written for on its own (`recordings` is high|mid,
6457
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6458
+ * camera's single 720p relay is a `low` in every respect except the slot the
6459
+ * heuristic put it in.
6460
+ */
6461
+ profileHint: CamProfileSchema.optional(),
6462
+ /**
6448
6463
  * Transport-specific opaque metadata. The broker passes it through to
6449
6464
  * the source reader without inspecting it. Currently used by
6450
6465
  * `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.
@@ -30027,6 +30059,77 @@ method(object({
30027
30059
  auth: "protected"
30028
30060
  });
30029
30061
  /**
30062
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30063
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30064
+ * running, a gate open) and lowers when it stops.
30065
+ *
30066
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30067
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30068
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30069
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30070
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30071
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30072
+ * which records the dock for that long after every short one. So the recorder
30073
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30074
+ * own post-buffer once it falls.
30075
+ *
30076
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30077
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30078
+ * writes this slice on every change; consumers subscribe to the kernel's
30079
+ * `DeviceStateChanged` for it and read it back through
30080
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30081
+ * against the device (D224, D8/D11).
30082
+ *
30083
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30084
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30085
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30086
+ * about the camera, on the camera.
30087
+ */
30088
+ var RecordingSignalStatusSchema = object({
30089
+ /** True while the device asks to be recorded. */
30090
+ active: boolean(),
30091
+ /**
30092
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30093
+ * …). Free text for the log line and the UI badge; the recorder never
30094
+ * branches on it.
30095
+ */
30096
+ reason: string(),
30097
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30098
+ lastChangedAt: number()
30099
+ });
30100
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30101
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30102
+ var recordingSignalCapability = {
30103
+ name: "recording-signal",
30104
+ scope: "device",
30105
+ deviceNative: true,
30106
+ mode: "singleton",
30107
+ deviceTypes: [DeviceType.Camera],
30108
+ methods: {
30109
+ /** The current level, straight from the slice the provider keeps fresh. */
30110
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30111
+ status: {
30112
+ schema: RecordingSignalStatusSchema,
30113
+ kind: "push",
30114
+ empty: {
30115
+ active: false,
30116
+ reason: "unknown",
30117
+ lastChangedAt: 0
30118
+ }
30119
+ },
30120
+ runtimeState: RecordingSignalRuntimeStateSchema,
30121
+ /**
30122
+ * Runtime-state durability: **session** — a restored `active: true` from
30123
+ * before a restart is exactly the stale level the recorder's reconcile bound
30124
+ * exists to end, and the provider re-derives the true level on activation
30125
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30126
+ *
30127
+ * See `RuntimeStateDurability`. Enforced by
30128
+ * `scripts/check-runtime-state-durability.ts`.
30129
+ */
30130
+ durability: "session"
30131
+ };
30132
+ /**
30030
30133
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30031
30134
  * a rect ROI on a camera frame and names one or more states; the engine
30032
30135
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30524,6 +30627,8 @@ var CamStreamDescriptorSchema = object({
30524
30627
  deviceFeatures: array(string()).optional(),
30525
30628
  /** Eligible for automatic profile assignment. Absent = `true`. */
30526
30629
  autoEligible: boolean().optional(),
30630
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30631
+ profileHint: CamProfileSchema.optional(),
30527
30632
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30528
30633
  metadata: record(string(), unknown()).optional()
30529
30634
  });
@@ -32663,6 +32768,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32663
32768
  pressureSensor: pressureSensorCapability,
32664
32769
  privacyMask: privacyMaskCapability,
32665
32770
  ptzAutotrack: ptzAutotrackCapability,
32771
+ recordingSignal: recordingSignalCapability,
32666
32772
  sceneMonitor: sceneMonitorCapability,
32667
32773
  scriptRunner: scriptRunnerCapability,
32668
32774
  smoke: smokeCapability,
@@ -38476,6 +38582,12 @@ Object.freeze({
38476
38582
  addonId: null,
38477
38583
  access: "view"
38478
38584
  },
38585
+ "recordingSignal.getStatus": {
38586
+ capName: "recording-signal",
38587
+ capScope: "device",
38588
+ addonId: null,
38589
+ access: "view"
38590
+ },
38479
38591
  "sceneMonitor.captureReference": {
38480
38592
  capName: "scene-monitor",
38481
38593
  capScope: "device",
@@ -41468,6 +41580,11 @@ Object.freeze({
41468
41580
  form: "single",
41469
41581
  optional: true
41470
41582
  }],
41583
+ "recordingSignal.getStatus": [{
41584
+ name: "deviceId",
41585
+ form: "single",
41586
+ optional: false
41587
+ }],
41471
41588
  "sceneMonitor.captureReference": [{
41472
41589
  name: "deviceId",
41473
41590
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "1.2.72",
3
+ "version": "1.2.73",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",