@camstack/addon-provider-amcrest 0.2.73 → 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
@@ -5413,6 +5413,12 @@ Object.fromEntries([
5413
5413
  icon: "move",
5414
5414
  order: 40
5415
5415
  },
5416
+ {
5417
+ id: "navigation",
5418
+ label: "Navigation",
5419
+ icon: "compass",
5420
+ order: 41
5421
+ },
5416
5422
  {
5417
5423
  id: "consumables",
5418
5424
  label: "Consumables",
@@ -6446,6 +6452,21 @@ var CameraStreamSchema = object({
6446
6452
  */
6447
6453
  autoEligible: boolean().optional(),
6448
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
+ /**
6449
6470
  * Transport-specific opaque metadata. The broker passes it through to
6450
6471
  * the source reader without inspecting it. Currently used by
6451
6472
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7883,7 +7904,22 @@ var RecordingTriggersSchema = object({
7883
7904
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7884
7905
  * registrare.
7885
7906
  */
7886
- 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()
7887
7923
  });
7888
7924
  /**
7889
7925
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11347,6 +11383,8 @@ method(object({
11347
11383
  label: string().optional(),
11348
11384
  deviceFeatures: array(string()).optional(),
11349
11385
  autoEligible: boolean().optional(),
11386
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11387
+ profileHint: CamProfileSchema.optional(),
11350
11388
  metadata: record(string(), unknown()).optional(),
11351
11389
  /** Required when kind === 'derived' — the source camStreamId the
11352
11390
  * derived broker reads its encoded plane from.
@@ -30084,6 +30122,77 @@ method(object({
30084
30122
  auth: "protected"
30085
30123
  });
30086
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
+ /**
30087
30196
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30088
30197
  * a rect ROI on a camera frame and names one or more states; the engine
30089
30198
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30581,6 +30690,8 @@ var CamStreamDescriptorSchema = object({
30581
30690
  deviceFeatures: array(string()).optional(),
30582
30691
  /** Eligible for automatic profile assignment. Absent = `true`. */
30583
30692
  autoEligible: boolean().optional(),
30693
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30694
+ profileHint: CamProfileSchema.optional(),
30584
30695
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30585
30696
  metadata: record(string(), unknown()).optional()
30586
30697
  });
@@ -32918,6 +33029,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32918
33029
  pressureSensor: pressureSensorCapability,
32919
33030
  privacyMask: privacyMaskCapability,
32920
33031
  ptzAutotrack: ptzAutotrackCapability,
33032
+ recordingSignal: recordingSignalCapability,
32921
33033
  sceneMonitor: sceneMonitorCapability,
32922
33034
  scriptRunner: scriptRunnerCapability,
32923
33035
  smoke: smokeCapability,
@@ -38871,6 +38983,12 @@ Object.freeze({
38871
38983
  addonId: null,
38872
38984
  access: "view"
38873
38985
  },
38986
+ "recordingSignal.getStatus": {
38987
+ capName: "recording-signal",
38988
+ capScope: "device",
38989
+ addonId: null,
38990
+ access: "view"
38991
+ },
38874
38992
  "sceneMonitor.captureReference": {
38875
38993
  capName: "scene-monitor",
38876
38994
  capScope: "device",
@@ -41863,6 +41981,11 @@ Object.freeze({
41863
41981
  form: "single",
41864
41982
  optional: true
41865
41983
  }],
41984
+ "recordingSignal.getStatus": [{
41985
+ name: "deviceId",
41986
+ form: "single",
41987
+ optional: false
41988
+ }],
41866
41989
  "sceneMonitor.captureReference": [{
41867
41990
  name: "deviceId",
41868
41991
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5414,6 +5414,12 @@ Object.fromEntries([
5414
5414
  icon: "move",
5415
5415
  order: 40
5416
5416
  },
5417
+ {
5418
+ id: "navigation",
5419
+ label: "Navigation",
5420
+ icon: "compass",
5421
+ order: 41
5422
+ },
5417
5423
  {
5418
5424
  id: "consumables",
5419
5425
  label: "Consumables",
@@ -6447,6 +6453,21 @@ var CameraStreamSchema = object({
6447
6453
  */
6448
6454
  autoEligible: boolean().optional(),
6449
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
+ /**
6450
6471
  * Transport-specific opaque metadata. The broker passes it through to
6451
6472
  * the source reader without inspecting it. Currently used by
6452
6473
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7884,7 +7905,22 @@ var RecordingTriggersSchema = object({
7884
7905
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7885
7906
  * registrare.
7886
7907
  */
7887
- 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()
7888
7924
  });
7889
7925
  /**
7890
7926
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11348,6 +11384,8 @@ method(object({
11348
11384
  label: string().optional(),
11349
11385
  deviceFeatures: array(string()).optional(),
11350
11386
  autoEligible: boolean().optional(),
11387
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11388
+ profileHint: CamProfileSchema.optional(),
11351
11389
  metadata: record(string(), unknown()).optional(),
11352
11390
  /** Required when kind === 'derived' — the source camStreamId the
11353
11391
  * derived broker reads its encoded plane from.
@@ -30085,6 +30123,77 @@ method(object({
30085
30123
  auth: "protected"
30086
30124
  });
30087
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
+ /**
30088
30197
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30089
30198
  * a rect ROI on a camera frame and names one or more states; the engine
30090
30199
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30582,6 +30691,8 @@ var CamStreamDescriptorSchema = object({
30582
30691
  deviceFeatures: array(string()).optional(),
30583
30692
  /** Eligible for automatic profile assignment. Absent = `true`. */
30584
30693
  autoEligible: boolean().optional(),
30694
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30695
+ profileHint: CamProfileSchema.optional(),
30585
30696
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30586
30697
  metadata: record(string(), unknown()).optional()
30587
30698
  });
@@ -32919,6 +33030,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32919
33030
  pressureSensor: pressureSensorCapability,
32920
33031
  privacyMask: privacyMaskCapability,
32921
33032
  ptzAutotrack: ptzAutotrackCapability,
33033
+ recordingSignal: recordingSignalCapability,
32922
33034
  sceneMonitor: sceneMonitorCapability,
32923
33035
  scriptRunner: scriptRunnerCapability,
32924
33036
  smoke: smokeCapability,
@@ -38872,6 +38984,12 @@ Object.freeze({
38872
38984
  addonId: null,
38873
38985
  access: "view"
38874
38986
  },
38987
+ "recordingSignal.getStatus": {
38988
+ capName: "recording-signal",
38989
+ capScope: "device",
38990
+ addonId: null,
38991
+ access: "view"
38992
+ },
38875
38993
  "sceneMonitor.captureReference": {
38876
38994
  capName: "scene-monitor",
38877
38995
  capScope: "device",
@@ -41864,6 +41982,11 @@ Object.freeze({
41864
41982
  form: "single",
41865
41983
  optional: true
41866
41984
  }],
41985
+ "recordingSignal.getStatus": [{
41986
+ name: "deviceId",
41987
+ form: "single",
41988
+ optional: false
41989
+ }],
41867
41990
  "sceneMonitor.captureReference": [{
41868
41991
  name: "deviceId",
41869
41992
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-amcrest",
3
- "version": "0.2.73",
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",