@camstack/addon-matter-broker 0.2.70 → 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
@@ -5420,6 +5420,12 @@ Object.fromEntries([
5420
5420
  icon: "move",
5421
5421
  order: 40
5422
5422
  },
5423
+ {
5424
+ id: "navigation",
5425
+ label: "Navigation",
5426
+ icon: "compass",
5427
+ order: 41
5428
+ },
5423
5429
  {
5424
5430
  id: "consumables",
5425
5431
  label: "Consumables",
@@ -6453,6 +6459,21 @@ var CameraStreamSchema = object({
6453
6459
  */
6454
6460
  autoEligible: boolean().optional(),
6455
6461
  /**
6462
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6463
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6464
+ * stream. Consulted by the broker's automatic ranking
6465
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6466
+ * an operator's manual assignment still wins, and an absent hint is the
6467
+ * pixel-ranked default every camera had before this field existed.
6468
+ *
6469
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6470
+ * storage class is written for on its own (`recordings` is high|mid,
6471
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6472
+ * camera's single 720p relay is a `low` in every respect except the slot the
6473
+ * heuristic put it in.
6474
+ */
6475
+ profileHint: CamProfileSchema.optional(),
6476
+ /**
6456
6477
  * Transport-specific opaque metadata. The broker passes it through to
6457
6478
  * the source reader without inspecting it. Currently used by
6458
6479
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7902,7 +7923,22 @@ var RecordingTriggersSchema = object({
7902
7923
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7903
7924
  * registrare.
7904
7925
  */
7905
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7926
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7927
+ /**
7928
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7929
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7930
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7931
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7932
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7933
+ *
7934
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7935
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7936
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7937
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7938
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7939
+ * (`holdTrigger` / `releaseTrigger`).
7940
+ */
7941
+ deviceSignal: boolean().optional()
7906
7942
  });
7907
7943
  /**
7908
7944
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11415,6 +11451,8 @@ method(object({
11415
11451
  label: string$2().optional(),
11416
11452
  deviceFeatures: array(string$2()).optional(),
11417
11453
  autoEligible: boolean().optional(),
11454
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11455
+ profileHint: CamProfileSchema.optional(),
11418
11456
  metadata: record(string$2(), unknown()).optional(),
11419
11457
  /** Required when kind === 'derived' — the source camStreamId the
11420
11458
  * derived broker reads its encoded plane from.
@@ -29974,6 +30012,77 @@ method(object({
29974
30012
  auth: "protected"
29975
30013
  });
29976
30014
  /**
30015
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30016
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30017
+ * running, a gate open) and lowers when it stops.
30018
+ *
30019
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30020
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30021
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30022
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30023
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30024
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30025
+ * which records the dock for that long after every short one. So the recorder
30026
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30027
+ * own post-buffer once it falls.
30028
+ *
30029
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30030
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30031
+ * writes this slice on every change; consumers subscribe to the kernel's
30032
+ * `DeviceStateChanged` for it and read it back through
30033
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30034
+ * against the device (D224, D8/D11).
30035
+ *
30036
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30037
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30038
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30039
+ * about the camera, on the camera.
30040
+ */
30041
+ var RecordingSignalStatusSchema = object({
30042
+ /** True while the device asks to be recorded. */
30043
+ active: boolean(),
30044
+ /**
30045
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30046
+ * …). Free text for the log line and the UI badge; the recorder never
30047
+ * branches on it.
30048
+ */
30049
+ reason: string$2(),
30050
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30051
+ lastChangedAt: number()
30052
+ });
30053
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30054
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30055
+ var recordingSignalCapability = {
30056
+ name: "recording-signal",
30057
+ scope: "device",
30058
+ deviceNative: true,
30059
+ mode: "singleton",
30060
+ deviceTypes: [DeviceType.Camera],
30061
+ methods: {
30062
+ /** The current level, straight from the slice the provider keeps fresh. */
30063
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30064
+ status: {
30065
+ schema: RecordingSignalStatusSchema,
30066
+ kind: "push",
30067
+ empty: {
30068
+ active: false,
30069
+ reason: "unknown",
30070
+ lastChangedAt: 0
30071
+ }
30072
+ },
30073
+ runtimeState: RecordingSignalRuntimeStateSchema,
30074
+ /**
30075
+ * Runtime-state durability: **session** — a restored `active: true` from
30076
+ * before a restart is exactly the stale level the recorder's reconcile bound
30077
+ * exists to end, and the provider re-derives the true level on activation
30078
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30079
+ *
30080
+ * See `RuntimeStateDurability`. Enforced by
30081
+ * `scripts/check-runtime-state-durability.ts`.
30082
+ */
30083
+ durability: "session"
30084
+ };
30085
+ /**
29977
30086
  * scene-monitor — device-scoped reference-region state cap. An operator marks
29978
30087
  * a rect ROI on a camera frame and names one or more states; the engine
29979
30088
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30471,6 +30580,8 @@ var CamStreamDescriptorSchema = object({
30471
30580
  deviceFeatures: array(string$2()).optional(),
30472
30581
  /** Eligible for automatic profile assignment. Absent = `true`. */
30473
30582
  autoEligible: boolean().optional(),
30583
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30584
+ profileHint: CamProfileSchema.optional(),
30474
30585
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30475
30586
  metadata: record(string$2(), unknown()).optional()
30476
30587
  });
@@ -32610,6 +32721,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32610
32721
  pressureSensor: pressureSensorCapability,
32611
32722
  privacyMask: privacyMaskCapability,
32612
32723
  ptzAutotrack: ptzAutotrackCapability,
32724
+ recordingSignal: recordingSignalCapability,
32613
32725
  sceneMonitor: sceneMonitorCapability,
32614
32726
  scriptRunner: scriptRunnerCapability,
32615
32727
  smoke: smokeCapability,
@@ -38357,6 +38469,12 @@ Object.freeze({
38357
38469
  addonId: null,
38358
38470
  access: "view"
38359
38471
  },
38472
+ "recordingSignal.getStatus": {
38473
+ capName: "recording-signal",
38474
+ capScope: "device",
38475
+ addonId: null,
38476
+ access: "view"
38477
+ },
38360
38478
  "sceneMonitor.captureReference": {
38361
38479
  capName: "scene-monitor",
38362
38480
  capScope: "device",
@@ -41349,6 +41467,11 @@ Object.freeze({
41349
41467
  form: "single",
41350
41468
  optional: true
41351
41469
  }],
41470
+ "recordingSignal.getStatus": [{
41471
+ name: "deviceId",
41472
+ form: "single",
41473
+ optional: false
41474
+ }],
41352
41475
  "sceneMonitor.captureReference": [{
41353
41476
  name: "deviceId",
41354
41477
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5418,6 +5418,12 @@ Object.fromEntries([
5418
5418
  icon: "move",
5419
5419
  order: 40
5420
5420
  },
5421
+ {
5422
+ id: "navigation",
5423
+ label: "Navigation",
5424
+ icon: "compass",
5425
+ order: 41
5426
+ },
5421
5427
  {
5422
5428
  id: "consumables",
5423
5429
  label: "Consumables",
@@ -6451,6 +6457,21 @@ var CameraStreamSchema = object({
6451
6457
  */
6452
6458
  autoEligible: boolean().optional(),
6453
6459
  /**
6460
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
6461
+ * whose only sensible role is the low-bandwidth one, `high` for a main
6462
+ * stream. Consulted by the broker's automatic ranking
6463
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
6464
+ * an operator's manual assignment still wins, and an absent hint is the
6465
+ * pixel-ranked default every camera had before this field existed.
6466
+ *
6467
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
6468
+ * storage class is written for on its own (`recordings` is high|mid,
6469
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
6470
+ * camera's single 720p relay is a `low` in every respect except the slot the
6471
+ * heuristic put it in.
6472
+ */
6473
+ profileHint: CamProfileSchema.optional(),
6474
+ /**
6454
6475
  * Transport-specific opaque metadata. The broker passes it through to
6455
6476
  * the source reader without inspecting it. Currently used by
6456
6477
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -7900,7 +7921,22 @@ var RecordingTriggersSchema = object({
7900
7921
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
7901
7922
  * registrare.
7902
7923
  */
7903
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
7924
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
7925
+ /**
7926
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
7927
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
7928
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
7929
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
7930
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
7931
+ *
7932
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
7933
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
7934
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
7935
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
7936
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
7937
+ * (`holdTrigger` / `releaseTrigger`).
7938
+ */
7939
+ deviceSignal: boolean().optional()
7904
7940
  });
7905
7941
  /**
7906
7942
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -11413,6 +11449,8 @@ method(object({
11413
11449
  label: string$2().optional(),
11414
11450
  deviceFeatures: array(string$2()).optional(),
11415
11451
  autoEligible: boolean().optional(),
11452
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
11453
+ profileHint: CamProfileSchema.optional(),
11416
11454
  metadata: record(string$2(), unknown()).optional(),
11417
11455
  /** Required when kind === 'derived' — the source camStreamId the
11418
11456
  * derived broker reads its encoded plane from.
@@ -29972,6 +30010,77 @@ method(object({
29972
30010
  auth: "protected"
29973
30011
  });
29974
30012
  /**
30013
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
30014
+ * something it knows about is happening (a robot vacuum cleaning, a machine
30015
+ * running, a gate open) and lowers when it stops.
30016
+ *
30017
+ * It is a level, not an edge. The sensor triggers the recorder already listens
30018
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
30019
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
30020
+ * still happening" cannot be expressed as an edge plus a post-buffer without
30021
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
30022
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
30023
+ * which records the dock for that long after every short one. So the recorder
30024
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
30025
+ * own post-buffer once it falls.
30026
+ *
30027
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
30028
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
30029
+ * writes this slice on every change; consumers subscribe to the kernel's
30030
+ * `DeviceStateChanged` for it and read it back through
30031
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
30032
+ * against the device (D224, D8/D11).
30033
+ *
30034
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
30035
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
30036
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
30037
+ * about the camera, on the camera.
30038
+ */
30039
+ var RecordingSignalStatusSchema = object({
30040
+ /** True while the device asks to be recorded. */
30041
+ active: boolean(),
30042
+ /**
30043
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
30044
+ * …). Free text for the log line and the UI badge; the recorder never
30045
+ * branches on it.
30046
+ */
30047
+ reason: string$2(),
30048
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
30049
+ lastChangedAt: number()
30050
+ });
30051
+ /** The runtime-state slice: the status plus the clock every slice carries. */
30052
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
30053
+ var recordingSignalCapability = {
30054
+ name: "recording-signal",
30055
+ scope: "device",
30056
+ deviceNative: true,
30057
+ mode: "singleton",
30058
+ deviceTypes: [DeviceType.Camera],
30059
+ methods: {
30060
+ /** The current level, straight from the slice the provider keeps fresh. */
30061
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
30062
+ status: {
30063
+ schema: RecordingSignalStatusSchema,
30064
+ kind: "push",
30065
+ empty: {
30066
+ active: false,
30067
+ reason: "unknown",
30068
+ lastChangedAt: 0
30069
+ }
30070
+ },
30071
+ runtimeState: RecordingSignalRuntimeStateSchema,
30072
+ /**
30073
+ * Runtime-state durability: **session** — a restored `active: true` from
30074
+ * before a restart is exactly the stale level the recorder's reconcile bound
30075
+ * exists to end, and the provider re-derives the true level on activation
30076
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
30077
+ *
30078
+ * See `RuntimeStateDurability`. Enforced by
30079
+ * `scripts/check-runtime-state-durability.ts`.
30080
+ */
30081
+ durability: "session"
30082
+ };
30083
+ /**
29975
30084
  * scene-monitor — device-scoped reference-region state cap. An operator marks
29976
30085
  * a rect ROI on a camera frame and names one or more states; the engine
29977
30086
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -30469,6 +30578,8 @@ var CamStreamDescriptorSchema = object({
30469
30578
  deviceFeatures: array(string$2()).optional(),
30470
30579
  /** Eligible for automatic profile assignment. Absent = `true`. */
30471
30580
  autoEligible: boolean().optional(),
30581
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
30582
+ profileHint: CamProfileSchema.optional(),
30472
30583
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
30473
30584
  metadata: record(string$2(), unknown()).optional()
30474
30585
  });
@@ -32608,6 +32719,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32608
32719
  pressureSensor: pressureSensorCapability,
32609
32720
  privacyMask: privacyMaskCapability,
32610
32721
  ptzAutotrack: ptzAutotrackCapability,
32722
+ recordingSignal: recordingSignalCapability,
32611
32723
  sceneMonitor: sceneMonitorCapability,
32612
32724
  scriptRunner: scriptRunnerCapability,
32613
32725
  smoke: smokeCapability,
@@ -38355,6 +38467,12 @@ Object.freeze({
38355
38467
  addonId: null,
38356
38468
  access: "view"
38357
38469
  },
38470
+ "recordingSignal.getStatus": {
38471
+ capName: "recording-signal",
38472
+ capScope: "device",
38473
+ addonId: null,
38474
+ access: "view"
38475
+ },
38358
38476
  "sceneMonitor.captureReference": {
38359
38477
  capName: "scene-monitor",
38360
38478
  capScope: "device",
@@ -41347,6 +41465,11 @@ Object.freeze({
41347
41465
  form: "single",
41348
41466
  optional: true
41349
41467
  }],
41468
+ "recordingSignal.getStatus": [{
41469
+ name: "deviceId",
41470
+ form: "single",
41471
+ optional: false
41472
+ }],
41350
41473
  "sceneMonitor.captureReference": [{
41351
41474
  name: "deviceId",
41352
41475
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-matter-broker",
3
- "version": "0.2.70",
3
+ "version": "0.2.72",
4
4
  "description": "Matter broker addon for CamStack — owns a Matter fabric (commissioning + the long-lived controller) via the matter.js controller and brokers commissioned Matter nodes into CamStack",
5
5
  "keywords": [
6
6
  "camstack",