@camstack/addon-import-alexa 0.2.71 → 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
@@ -6484,6 +6484,21 @@ var CameraStreamSchema = object({
6484
6484
  */
6485
6485
  autoEligible: boolean().optional(),
6486
6486
  /**
6487
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6488
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6489
+ * stream. Consulted by the broker's automatic ranking
6490
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6491
+ * an operator's manual assignment still wins, and an absent hint is the
6492
+ * pixel-ranked default every camera had before this field existed.
6493
+ *
6494
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6495
+ * storage class is written for on its own (`recordings` is high|mid,
6496
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6497
+ * camera's single 720p relay is a `low` in every respect except the slot the
6498
+ * heuristic put it in.
6499
+ */
6500
+ profileHint: CamProfileSchema.optional(),
6501
+ /**
6487
6502
  * Transport-specific opaque metadata. The broker passes it through to
6488
6503
  * the source reader without inspecting it. Currently used by
6489
6504
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -8052,7 +8067,22 @@ var RecordingTriggersSchema = object({
8052
8067
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8053
8068
  * registrare.
8054
8069
  */
8055
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8070
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8071
+ /**
8072
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
8073
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8074
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8075
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8076
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
8077
+ *
8078
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8079
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8080
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8081
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
8082
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8083
+ * (`holdTrigger` / `releaseTrigger`).
8084
+ */
8085
+ deviceSignal: boolean().optional()
8056
8086
  });
8057
8087
  /**
8058
8088
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11584,6 +11614,8 @@ method(object({
11584
11614
  label: string().optional(),
11585
11615
  deviceFeatures: array(string()).optional(),
11586
11616
  autoEligible: boolean().optional(),
11617
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11618
+ profileHint: CamProfileSchema.optional(),
11587
11619
  metadata: record(string(), unknown()).optional(),
11588
11620
  /** Required when kind === 'derived' — the source camStreamId the
11589
11621
  * derived broker reads its encoded plane from.
@@ -30143,6 +30175,77 @@ method(object({
30143
30175
  auth: "protected"
30144
30176
  });
30145
30177
  /**
30178
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30179
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30180
+ * running, a gate open) and lowers when it stops.
30181
+ *
30182
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30183
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30184
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30185
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30186
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30187
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30188
+ * which records the dock for that long after every short one. So the recorder
30189
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30190
+ * own post-buffer once it falls.
30191
+ *
30192
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30193
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30194
+ * writes this slice on every change; consumers subscribe to the kernel's
30195
+ * `DeviceStateChanged` for it and read it back through
30196
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30197
+ * against the device (D224, D8/D11).
30198
+ *
30199
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30200
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30201
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30202
+ * about the camera, on the camera.
30203
+ */
30204
+ var RecordingSignalStatusSchema = object({
30205
+ /** True while the device asks to be recorded. */
30206
+ active: boolean(),
30207
+ /**
30208
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30209
+ * …). Free text for the log line and the UI badge; the recorder never
30210
+ * branches on it.
30211
+ */
30212
+ reason: string(),
30213
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30214
+ lastChangedAt: number()
30215
+ });
30216
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30217
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30218
+ var recordingSignalCapability = {
30219
+ name: "recording-signal",
30220
+ scope: "device",
30221
+ deviceNative: true,
30222
+ mode: "singleton",
30223
+ deviceTypes: [DeviceType.Camera],
30224
+ methods: {
30225
+ /** The current level, straight from the slice the provider keeps fresh. */
30226
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30227
+ status: {
30228
+ schema: RecordingSignalStatusSchema,
30229
+ kind: "push",
30230
+ empty: {
30231
+ active: false,
30232
+ reason: "unknown",
30233
+ lastChangedAt: 0
30234
+ }
30235
+ },
30236
+ runtimeState: RecordingSignalRuntimeStateSchema,
30237
+ /**
30238
+ * Runtime-state durability: **session** — a restored `active: true` from
30239
+ * before a restart is exactly the stale level the recorder's reconcile bound
30240
+ * exists to end, and the provider re-derives the true level on activation
30241
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30242
+ *
30243
+ * See `RuntimeStateDurability`. Enforced by
30244
+ * `scripts/check-runtime-state-durability.ts`.
30245
+ */
30246
+ durability: "session"
30247
+ };
30248
+ /**
30146
30249
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30147
30250
  * a rect ROI on a camera frame and names one or more states; the engine
30148
30251
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30640,6 +30743,8 @@ var CamStreamDescriptorSchema = object({
30640
30743
  deviceFeatures: array(string()).optional(),
30641
30744
  /** Eligible for automatic profile assignment. Absent = `true`. */
30642
30745
  autoEligible: boolean().optional(),
30746
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30747
+ profileHint: CamProfileSchema.optional(),
30643
30748
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30644
30749
  metadata: record(string(), unknown()).optional()
30645
30750
  });
@@ -32779,6 +32884,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32779
32884
  pressureSensor: pressureSensorCapability,
32780
32885
  privacyMask: privacyMaskCapability,
32781
32886
  ptzAutotrack: ptzAutotrackCapability,
32887
+ recordingSignal: recordingSignalCapability,
32782
32888
  sceneMonitor: sceneMonitorCapability,
32783
32889
  scriptRunner: scriptRunnerCapability,
32784
32890
  smoke: smokeCapability,
@@ -38526,6 +38632,12 @@ Object.freeze({
38526
38632
  addonId: null,
38527
38633
  access: "view"
38528
38634
  },
38635
+ "recordingSignal.getStatus": {
38636
+ capName: "recording-signal",
38637
+ capScope: "device",
38638
+ addonId: null,
38639
+ access: "view"
38640
+ },
38529
38641
  "sceneMonitor.captureReference": {
38530
38642
  capName: "scene-monitor",
38531
38643
  capScope: "device",
@@ -41518,6 +41630,11 @@ Object.freeze({
41518
41630
  form: "single",
41519
41631
  optional: true
41520
41632
  }],
41633
+ "recordingSignal.getStatus": [{
41634
+ name: "deviceId",
41635
+ form: "single",
41636
+ optional: false
41637
+ }],
41521
41638
  "sceneMonitor.captureReference": [{
41522
41639
  name: "deviceId",
41523
41640
  form: "single",
package/dist/addon.mjs CHANGED
@@ -6484,6 +6484,21 @@ var CameraStreamSchema = object({
6484
6484
  */
6485
6485
  autoEligible: boolean().optional(),
6486
6486
  /**
6487
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6488
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6489
+ * stream. Consulted by the broker's automatic ranking
6490
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6491
+ * an operator's manual assignment still wins, and an absent hint is the
6492
+ * pixel-ranked default every camera had before this field existed.
6493
+ *
6494
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6495
+ * storage class is written for on its own (`recordings` is high|mid,
6496
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6497
+ * camera's single 720p relay is a `low` in every respect except the slot the
6498
+ * heuristic put it in.
6499
+ */
6500
+ profileHint: CamProfileSchema.optional(),
6501
+ /**
6487
6502
  * Transport-specific opaque metadata. The broker passes it through to
6488
6503
  * the source reader without inspecting it. Currently used by
6489
6504
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -8052,7 +8067,22 @@ var RecordingTriggersSchema = object({
8052
8067
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8053
8068
  * registrare.
8054
8069
  */
8055
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
8070
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
8071
+ /**
8072
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
8073
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
8074
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
8075
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
8076
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
8077
+ *
8078
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
8079
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
8080
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
8081
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
8082
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
8083
+ * (`holdTrigger` / `releaseTrigger`).
8084
+ */
8085
+ deviceSignal: boolean().optional()
8056
8086
  });
8057
8087
  /**
8058
8088
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11584,6 +11614,8 @@ method(object({
11584
11614
  label: string().optional(),
11585
11615
  deviceFeatures: array(string()).optional(),
11586
11616
  autoEligible: boolean().optional(),
11617
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11618
+ profileHint: CamProfileSchema.optional(),
11587
11619
  metadata: record(string(), unknown()).optional(),
11588
11620
  /** Required when kind === 'derived' — the source camStreamId the
11589
11621
  * derived broker reads its encoded plane from.
@@ -30143,6 +30175,77 @@ method(object({
30143
30175
  auth: "protected"
30144
30176
  });
30145
30177
  /**
30178
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30179
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30180
+ * running, a gate open) and lowers when it stops.
30181
+ *
30182
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30183
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30184
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30185
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30186
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30187
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30188
+ * which records the dock for that long after every short one. So the recorder
30189
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30190
+ * own post-buffer once it falls.
30191
+ *
30192
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30193
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30194
+ * writes this slice on every change; consumers subscribe to the kernel's
30195
+ * `DeviceStateChanged` for it and read it back through
30196
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30197
+ * against the device (D224, D8/D11).
30198
+ *
30199
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30200
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30201
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30202
+ * about the camera, on the camera.
30203
+ */
30204
+ var RecordingSignalStatusSchema = object({
30205
+ /** True while the device asks to be recorded. */
30206
+ active: boolean(),
30207
+ /**
30208
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30209
+ * …). Free text for the log line and the UI badge; the recorder never
30210
+ * branches on it.
30211
+ */
30212
+ reason: string(),
30213
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30214
+ lastChangedAt: number()
30215
+ });
30216
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30217
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30218
+ var recordingSignalCapability = {
30219
+ name: "recording-signal",
30220
+ scope: "device",
30221
+ deviceNative: true,
30222
+ mode: "singleton",
30223
+ deviceTypes: [DeviceType.Camera],
30224
+ methods: {
30225
+ /** The current level, straight from the slice the provider keeps fresh. */
30226
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30227
+ status: {
30228
+ schema: RecordingSignalStatusSchema,
30229
+ kind: "push",
30230
+ empty: {
30231
+ active: false,
30232
+ reason: "unknown",
30233
+ lastChangedAt: 0
30234
+ }
30235
+ },
30236
+ runtimeState: RecordingSignalRuntimeStateSchema,
30237
+ /**
30238
+ * Runtime-state durability: **session** — a restored `active: true` from
30239
+ * before a restart is exactly the stale level the recorder's reconcile bound
30240
+ * exists to end, and the provider re-derives the true level on activation
30241
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30242
+ *
30243
+ * See `RuntimeStateDurability`. Enforced by
30244
+ * `scripts/check-runtime-state-durability.ts`.
30245
+ */
30246
+ durability: "session"
30247
+ };
30248
+ /**
30146
30249
  * scene-monitor — device-scoped reference-region state cap. An operator marks
30147
30250
  * a rect ROI on a camera frame and names one or more states; the engine
30148
30251
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30640,6 +30743,8 @@ var CamStreamDescriptorSchema = object({
30640
30743
  deviceFeatures: array(string()).optional(),
30641
30744
  /** Eligible for automatic profile assignment. Absent = `true`. */
30642
30745
  autoEligible: boolean().optional(),
30746
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30747
+ profileHint: CamProfileSchema.optional(),
30643
30748
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30644
30749
  metadata: record(string(), unknown()).optional()
30645
30750
  });
@@ -32779,6 +32884,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32779
32884
  pressureSensor: pressureSensorCapability,
32780
32885
  privacyMask: privacyMaskCapability,
32781
32886
  ptzAutotrack: ptzAutotrackCapability,
32887
+ recordingSignal: recordingSignalCapability,
32782
32888
  sceneMonitor: sceneMonitorCapability,
32783
32889
  scriptRunner: scriptRunnerCapability,
32784
32890
  smoke: smokeCapability,
@@ -38526,6 +38632,12 @@ Object.freeze({
38526
38632
  addonId: null,
38527
38633
  access: "view"
38528
38634
  },
38635
+ "recordingSignal.getStatus": {
38636
+ capName: "recording-signal",
38637
+ capScope: "device",
38638
+ addonId: null,
38639
+ access: "view"
38640
+ },
38529
38641
  "sceneMonitor.captureReference": {
38530
38642
  capName: "scene-monitor",
38531
38643
  capScope: "device",
@@ -41518,6 +41630,11 @@ Object.freeze({
41518
41630
  form: "single",
41519
41631
  optional: true
41520
41632
  }],
41633
+ "recordingSignal.getStatus": [{
41634
+ name: "deviceId",
41635
+ form: "single",
41636
+ optional: false
41637
+ }],
41521
41638
  "sceneMonitor.captureReference": [{
41522
41639
  name: "deviceId",
41523
41640
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.71",
3
+ "version": "0.2.72",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",