@camstack/addon-provider-amcrest 0.2.74 → 0.2.75

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
@@ -6452,6 +6452,21 @@ var CameraStreamSchema = object({
6452
6452
  */
6453
6453
  autoEligible: boolean().optional(),
6454
6454
  /**
6455
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6456
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6457
+ * stream. Consulted by the broker's automatic ranking
6458
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6459
+ * an operator's manual assignment still wins, and an absent hint is the
6460
+ * pixel-ranked default every camera had before this field existed.
6461
+ *
6462
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6463
+ * storage class is written for on its own (`recordings` is high|mid,
6464
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6465
+ * camera's single 720p relay is a `low` in every respect except the slot the
6466
+ * heuristic put it in.
6467
+ */
6468
+ profileHint: CamProfileSchema.optional(),
6469
+ /**
6455
6470
  * Transport-specific opaque metadata. The broker passes it through to
6456
6471
  * the source reader without inspecting it. Currently used by
6457
6472
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7889,7 +7904,22 @@ var RecordingTriggersSchema = object({
7889
7904
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7890
7905
  * registrare.
7891
7906
  */
7892
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7907
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7908
+ /**
7909
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7910
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7911
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7912
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7913
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7914
+ *
7915
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7916
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7917
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7918
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7919
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7920
+ * (`holdTrigger` / `releaseTrigger`).
7921
+ */
7922
+ deviceSignal: boolean().optional()
7893
7923
  });
7894
7924
  /**
7895
7925
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11353,6 +11383,8 @@ method(object({
11353
11383
  label: string().optional(),
11354
11384
  deviceFeatures: array(string()).optional(),
11355
11385
  autoEligible: boolean().optional(),
11386
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11387
+ profileHint: CamProfileSchema.optional(),
11356
11388
  metadata: record(string(), unknown()).optional(),
11357
11389
  /** Required when kind === 'derived' — the source camStreamId the
11358
11390
  * derived broker reads its encoded plane from.
@@ -30090,6 +30122,77 @@ method(object({
30090
30122
  auth: "protected"
30091
30123
  });
30092
30124
  /**
30125
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30126
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30127
+ * running, a gate open) and lowers when it stops.
30128
+ *
30129
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30130
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30131
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30132
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30133
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30134
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30135
+ * which records the dock for that long after every short one. So the recorder
30136
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30137
+ * own post-buffer once it falls.
30138
+ *
30139
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30140
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30141
+ * writes this slice on every change; consumers subscribe to the kernel's
30142
+ * `DeviceStateChanged` for it and read it back through
30143
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30144
+ * against the device (D224, D8/D11).
30145
+ *
30146
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30147
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30148
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30149
+ * about the camera, on the camera.
30150
+ */
30151
+ var RecordingSignalStatusSchema = object({
30152
+ /** True while the device asks to be recorded. */
30153
+ active: boolean(),
30154
+ /**
30155
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30156
+ * …). Free text for the log line and the UI badge; the recorder never
30157
+ * branches on it.
30158
+ */
30159
+ reason: string(),
30160
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30161
+ lastChangedAt: number()
30162
+ });
30163
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30164
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30165
+ var recordingSignalCapability = {
30166
+ name: "recording-signal",
30167
+ scope: "device",
30168
+ deviceNative: true,
30169
+ mode: "singleton",
30170
+ deviceTypes: [DeviceType.Camera],
30171
+ methods: {
30172
+ /** The current level, straight from the slice the provider keeps fresh. */
30173
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30174
+ status: {
30175
+ schema: RecordingSignalStatusSchema,
30176
+ kind: "push",
30177
+ empty: {
30178
+ active: false,
30179
+ reason: "unknown",
30180
+ lastChangedAt: 0
30181
+ }
30182
+ },
30183
+ runtimeState: RecordingSignalRuntimeStateSchema,
30184
+ /**
30185
+ * Runtime-state durability: **session** — a restored `active: true` from
30186
+ * before a restart is exactly the stale level the recorder's reconcile bound
30187
+ * exists to end, and the provider re-derives the true level on activation
30188
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30189
+ *
30190
+ * See `RuntimeStateDurability`. Enforced by
30191
+ * `scripts/check-runtime-state-durability.ts`.
30192
+ */
30193
+ durability: "session"
30194
+ };
30195
+ /**
30093
30196
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30094
30197
  * a rect ROI on a camera frame and names one or more states; the engine
30095
30198
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30587,6 +30690,8 @@ var CamStreamDescriptorSchema = object({
30587
30690
  deviceFeatures: array(string()).optional(),
30588
30691
  /** Eligible for automatic profile assignment. Absent = `true`. */
30589
30692
  autoEligible: boolean().optional(),
30693
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30694
+ profileHint: CamProfileSchema.optional(),
30590
30695
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30591
30696
  metadata: record(string(), unknown()).optional()
30592
30697
  });
@@ -32924,6 +33029,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32924
33029
  pressureSensor: pressureSensorCapability,
32925
33030
  privacyMask: privacyMaskCapability,
32926
33031
  ptzAutotrack: ptzAutotrackCapability,
33032
+ recordingSignal: recordingSignalCapability,
32927
33033
  sceneMonitor: sceneMonitorCapability,
32928
33034
  scriptRunner: scriptRunnerCapability,
32929
33035
  smoke: smokeCapability,
@@ -38877,6 +38983,12 @@ Object.freeze({
38877
38983
  addonId: null,
38878
38984
  access: "view"
38879
38985
  },
38986
+ "recordingSignal.getStatus": {
38987
+ capName: "recording-signal",
38988
+ capScope: "device",
38989
+ addonId: null,
38990
+ access: "view"
38991
+ },
38880
38992
  "sceneMonitor.captureReference": {
38881
38993
  capName: "scene-monitor",
38882
38994
  capScope: "device",
@@ -41869,6 +41981,11 @@ Object.freeze({
41869
41981
  form: "single",
41870
41982
  optional: true
41871
41983
  }],
41984
+ "recordingSignal.getStatus": [{
41985
+ name: "deviceId",
41986
+ form: "single",
41987
+ optional: false
41988
+ }],
41872
41989
  "sceneMonitor.captureReference": [{
41873
41990
  name: "deviceId",
41874
41991
  form: "single",
package/dist/addon.mjs CHANGED
@@ -6453,6 +6453,21 @@ var CameraStreamSchema = object({
6453
6453
  */
6454
6454
  autoEligible: boolean().optional(),
6455
6455
  /**
6456
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6457
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6458
+ * stream. Consulted by the broker's automatic ranking
6459
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6460
+ * an operator's manual assignment still wins, and an absent hint is the
6461
+ * pixel-ranked default every camera had before this field existed.
6462
+ *
6463
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6464
+ * storage class is written for on its own (`recordings` is high|mid,
6465
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6466
+ * camera's single 720p relay is a `low` in every respect except the slot the
6467
+ * heuristic put it in.
6468
+ */
6469
+ profileHint: CamProfileSchema.optional(),
6470
+ /**
6456
6471
  * Transport-specific opaque metadata. The broker passes it through to
6457
6472
  * the source reader without inspecting it. Currently used by
6458
6473
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7890,7 +7905,22 @@ var RecordingTriggersSchema = object({
7890
7905
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7891
7906
  * registrare.
7892
7907
  */
7893
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7908
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7909
+ /**
7910
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7911
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7912
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7913
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7914
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7915
+ *
7916
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7917
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7918
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7919
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7920
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7921
+ * (`holdTrigger` / `releaseTrigger`).
7922
+ */
7923
+ deviceSignal: boolean().optional()
7894
7924
  });
7895
7925
  /**
7896
7926
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11354,6 +11384,8 @@ method(object({
11354
11384
  label: string().optional(),
11355
11385
  deviceFeatures: array(string()).optional(),
11356
11386
  autoEligible: boolean().optional(),
11387
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11388
+ profileHint: CamProfileSchema.optional(),
11357
11389
  metadata: record(string(), unknown()).optional(),
11358
11390
  /** Required when kind === 'derived' — the source camStreamId the
11359
11391
  * derived broker reads its encoded plane from.
@@ -30091,6 +30123,77 @@ method(object({
30091
30123
  auth: "protected"
30092
30124
  });
30093
30125
  /**
30126
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30127
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30128
+ * running, a gate open) and lowers when it stops.
30129
+ *
30130
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30131
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30132
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30133
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30134
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30135
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30136
+ * which records the dock for that long after every short one. So the recorder
30137
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30138
+ * own post-buffer once it falls.
30139
+ *
30140
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30141
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30142
+ * writes this slice on every change; consumers subscribe to the kernel's
30143
+ * `DeviceStateChanged` for it and read it back through
30144
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30145
+ * against the device (D224, D8/D11).
30146
+ *
30147
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30148
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30149
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30150
+ * about the camera, on the camera.
30151
+ */
30152
+ var RecordingSignalStatusSchema = object({
30153
+ /** True while the device asks to be recorded. */
30154
+ active: boolean(),
30155
+ /**
30156
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30157
+ * …). Free text for the log line and the UI badge; the recorder never
30158
+ * branches on it.
30159
+ */
30160
+ reason: string(),
30161
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30162
+ lastChangedAt: number()
30163
+ });
30164
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30165
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30166
+ var recordingSignalCapability = {
30167
+ name: "recording-signal",
30168
+ scope: "device",
30169
+ deviceNative: true,
30170
+ mode: "singleton",
30171
+ deviceTypes: [DeviceType.Camera],
30172
+ methods: {
30173
+ /** The current level, straight from the slice the provider keeps fresh. */
30174
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30175
+ status: {
30176
+ schema: RecordingSignalStatusSchema,
30177
+ kind: "push",
30178
+ empty: {
30179
+ active: false,
30180
+ reason: "unknown",
30181
+ lastChangedAt: 0
30182
+ }
30183
+ },
30184
+ runtimeState: RecordingSignalRuntimeStateSchema,
30185
+ /**
30186
+ * Runtime-state durability: **session** — a restored `active: true` from
30187
+ * before a restart is exactly the stale level the recorder's reconcile bound
30188
+ * exists to end, and the provider re-derives the true level on activation
30189
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30190
+ *
30191
+ * See `RuntimeStateDurability`. Enforced by
30192
+ * `scripts/check-runtime-state-durability.ts`.
30193
+ */
30194
+ durability: "session"
30195
+ };
30196
+ /**
30094
30197
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30095
30198
  * a rect ROI on a camera frame and names one or more states; the engine
30096
30199
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30588,6 +30691,8 @@ var CamStreamDescriptorSchema = object({
30588
30691
  deviceFeatures: array(string()).optional(),
30589
30692
  /** Eligible for automatic profile assignment. Absent = `true`. */
30590
30693
  autoEligible: boolean().optional(),
30694
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30695
+ profileHint: CamProfileSchema.optional(),
30591
30696
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30592
30697
  metadata: record(string(), unknown()).optional()
30593
30698
  });
@@ -32925,6 +33030,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32925
33030
  pressureSensor: pressureSensorCapability,
32926
33031
  privacyMask: privacyMaskCapability,
32927
33032
  ptzAutotrack: ptzAutotrackCapability,
33033
+ recordingSignal: recordingSignalCapability,
32928
33034
  sceneMonitor: sceneMonitorCapability,
32929
33035
  scriptRunner: scriptRunnerCapability,
32930
33036
  smoke: smokeCapability,
@@ -38878,6 +38984,12 @@ Object.freeze({
38878
38984
  addonId: null,
38879
38985
  access: "view"
38880
38986
  },
38987
+ "recordingSignal.getStatus": {
38988
+ capName: "recording-signal",
38989
+ capScope: "device",
38990
+ addonId: null,
38991
+ access: "view"
38992
+ },
38881
38993
  "sceneMonitor.captureReference": {
38882
38994
  capName: "scene-monitor",
38883
38995
  capScope: "device",
@@ -41870,6 +41982,11 @@ Object.freeze({
41870
41982
  form: "single",
41871
41983
  optional: true
41872
41984
  }],
41985
+ "recordingSignal.getStatus": [{
41986
+ name: "deviceId",
41987
+ form: "single",
41988
+ optional: false
41989
+ }],
41873
41990
  "sceneMonitor.captureReference": [{
41874
41991
  name: "deviceId",
41875
41992
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-amcrest",
3
- "version": "0.2.74",
3
+ "version": "0.2.75",
4
4
  "description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
5
5
  "keywords": [
6
6
  "camstack",