@camstack/addon-provider-petkit 0.2.71 → 0.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
@@ -6508,6 +6508,12 @@ Object.fromEntries([
6508
6508
  icon: "move",
6509
6509
  order: 40
6510
6510
  },
6511
+ {
6512
+ id: "navigation",
6513
+ label: "Navigation",
6514
+ icon: "compass",
6515
+ order: 41
6516
+ },
6511
6517
  {
6512
6518
  id: "consumables",
6513
6519
  label: "Consumables",
@@ -7541,6 +7547,21 @@ var CameraStreamSchema = object({
7541
7547
  */
7542
7548
  autoEligible: boolean().optional(),
7543
7549
  /**
7550
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
7551
+ * whose only sensible role is the low-bandwidth one, `high` for a main
7552
+ * stream. Consulted by the broker's automatic ranking
7553
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
7554
+ * an operator's manual assignment still wins, and an absent hint is the
7555
+ * pixel-ranked default every camera had before this field existed.
7556
+ *
7557
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
7558
+ * storage class is written for on its own (`recordings` is high|mid,
7559
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
7560
+ * camera's single 720p relay is a `low` in every respect except the slot the
7561
+ * heuristic put it in.
7562
+ */
7563
+ profileHint: CamProfileSchema.optional(),
7564
+ /**
7544
7565
  * Transport-specific opaque metadata. The broker passes it through to
7545
7566
  * the source reader without inspecting it. Currently used by
7546
7567
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -8990,7 +9011,22 @@ var RecordingTriggersSchema = object({
8990
9011
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8991
9012
  * registrare.
8992
9013
  */
8993
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
9014
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
9015
+ /**
9016
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
9017
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
9018
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
9019
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
9020
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
9021
+ *
9022
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
9023
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
9024
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
9025
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
9026
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
9027
+ * (`holdTrigger` / `releaseTrigger`).
9028
+ */
9029
+ deviceSignal: boolean().optional()
8994
9030
  });
8995
9031
  /**
8996
9032
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -12454,6 +12490,8 @@ method(object({
12454
12490
  label: string().optional(),
12455
12491
  deviceFeatures: array(string()).optional(),
12456
12492
  autoEligible: boolean().optional(),
12493
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
12494
+ profileHint: CamProfileSchema.optional(),
12457
12495
  metadata: record(string(), unknown()).optional(),
12458
12496
  /** Required when kind === 'derived' — the source camStreamId the
12459
12497
  * derived broker reads its encoded plane from.
@@ -31004,6 +31042,77 @@ method(object({
31004
31042
  auth: "protected"
31005
31043
  });
31006
31044
  /**
31045
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
31046
+ * something it knows about is happening (a robot vacuum cleaning, a machine
31047
+ * running, a gate open) and lowers when it stops.
31048
+ *
31049
+ * It is a level, not an edge. The sensor triggers the recorder already listens
31050
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
31051
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
31052
+ * still happening" cannot be expressed as an edge plus a post-buffer without
31053
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
31054
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
31055
+ * which records the dock for that long after every short one. So the recorder
31056
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
31057
+ * own post-buffer once it falls.
31058
+ *
31059
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
31060
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
31061
+ * writes this slice on every change; consumers subscribe to the kernel's
31062
+ * `DeviceStateChanged` for it and read it back through
31063
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
31064
+ * against the device (D224, D8/D11).
31065
+ *
31066
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
31067
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
31068
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
31069
+ * about the camera, on the camera.
31070
+ */
31071
+ var RecordingSignalStatusSchema = object({
31072
+ /** True while the device asks to be recorded. */
31073
+ active: boolean(),
31074
+ /**
31075
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
31076
+ * …). Free text for the log line and the UI badge; the recorder never
31077
+ * branches on it.
31078
+ */
31079
+ reason: string(),
31080
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
31081
+ lastChangedAt: number()
31082
+ });
31083
+ /** The runtime-state slice: the status plus the clock every slice carries. */
31084
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
31085
+ var recordingSignalCapability = {
31086
+ name: "recording-signal",
31087
+ scope: "device",
31088
+ deviceNative: true,
31089
+ mode: "singleton",
31090
+ deviceTypes: [DeviceType.Camera],
31091
+ methods: {
31092
+ /** The current level, straight from the slice the provider keeps fresh. */
31093
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
31094
+ status: {
31095
+ schema: RecordingSignalStatusSchema,
31096
+ kind: "push",
31097
+ empty: {
31098
+ active: false,
31099
+ reason: "unknown",
31100
+ lastChangedAt: 0
31101
+ }
31102
+ },
31103
+ runtimeState: RecordingSignalRuntimeStateSchema,
31104
+ /**
31105
+ * Runtime-state durability: **session** — a restored `active: true` from
31106
+ * before a restart is exactly the stale level the recorder's reconcile bound
31107
+ * exists to end, and the provider re-derives the true level on activation
31108
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
31109
+ *
31110
+ * See `RuntimeStateDurability`. Enforced by
31111
+ * `scripts/check-runtime-state-durability.ts`.
31112
+ */
31113
+ durability: "session"
31114
+ };
31115
+ /**
31007
31116
  * scene-monitor — device-scoped reference-region state cap. An operator marks
31008
31117
  * a rect ROI on a camera frame and names one or more states; the engine
31009
31118
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -31501,6 +31610,8 @@ var CamStreamDescriptorSchema = object({
31501
31610
  deviceFeatures: array(string()).optional(),
31502
31611
  /** Eligible for automatic profile assignment. Absent = `true`. */
31503
31612
  autoEligible: boolean().optional(),
31613
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
31614
+ profileHint: CamProfileSchema.optional(),
31504
31615
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
31505
31616
  metadata: record(string(), unknown()).optional()
31506
31617
  });
@@ -33640,6 +33751,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33640
33751
  pressureSensor: pressureSensorCapability,
33641
33752
  privacyMask: privacyMaskCapability,
33642
33753
  ptzAutotrack: ptzAutotrackCapability,
33754
+ recordingSignal: recordingSignalCapability,
33643
33755
  sceneMonitor: sceneMonitorCapability,
33644
33756
  scriptRunner: scriptRunnerCapability,
33645
33757
  smoke: smokeCapability,
@@ -39387,6 +39499,12 @@ Object.freeze({
39387
39499
  addonId: null,
39388
39500
  access: "view"
39389
39501
  },
39502
+ "recordingSignal.getStatus": {
39503
+ capName: "recording-signal",
39504
+ capScope: "device",
39505
+ addonId: null,
39506
+ access: "view"
39507
+ },
39390
39508
  "sceneMonitor.captureReference": {
39391
39509
  capName: "scene-monitor",
39392
39510
  capScope: "device",
@@ -42379,6 +42497,11 @@ Object.freeze({
42379
42497
  form: "single",
42380
42498
  optional: true
42381
42499
  }],
42500
+ "recordingSignal.getStatus": [{
42501
+ name: "deviceId",
42502
+ form: "single",
42503
+ optional: false
42504
+ }],
42382
42505
  "sceneMonitor.captureReference": [{
42383
42506
  name: "deviceId",
42384
42507
  form: "single",
package/dist/addon.mjs CHANGED
@@ -6507,6 +6507,12 @@ Object.fromEntries([
6507
6507
  icon: "move",
6508
6508
  order: 40
6509
6509
  },
6510
+ {
6511
+ id: "navigation",
6512
+ label: "Navigation",
6513
+ icon: "compass",
6514
+ order: 41
6515
+ },
6510
6516
  {
6511
6517
  id: "consumables",
6512
6518
  label: "Consumables",
@@ -7540,6 +7546,21 @@ var CameraStreamSchema = object({
7540
7546
  */
7541
7547
  autoEligible: boolean().optional(),
7542
7548
  /**
7549
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
7550
+ * whose only sensible role is the low-bandwidth one, `high` for a main
7551
+ * stream. Consulted by the broker's automatic ranking
7552
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
7553
+ * an operator's manual assignment still wins, and an absent hint is the
7554
+ * pixel-ranked default every camera had before this field existed.
7555
+ *
7556
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
7557
+ * storage class is written for on its own (`recordings` is high|mid,
7558
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
7559
+ * camera's single 720p relay is a `low` in every respect except the slot the
7560
+ * heuristic put it in.
7561
+ */
7562
+ profileHint: CamProfileSchema.optional(),
7563
+ /**
7543
7564
  * Transport-specific opaque metadata. The broker passes it through to
7544
7565
  * the source reader without inspecting it. Currently used by
7545
7566
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -8989,7 +9010,22 @@ var RecordingTriggersSchema = object({
8989
9010
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
8990
9011
  * registrare.
8991
9012
  */
8992
- sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
9013
+ sensorDeviceIds: array(number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
9014
+ /**
9015
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
9016
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
9017
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
9018
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
9019
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
9020
+ *
9021
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
9022
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
9023
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
9024
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
9025
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
9026
+ * (`holdTrigger` / `releaseTrigger`).
9027
+ */
9028
+ deviceSignal: boolean().optional()
8993
9029
  });
8994
9030
  /**
8995
9031
  * Mode of a single recording band — the recorder per-band vocabulary.
@@ -12453,6 +12489,8 @@ method(object({
12453
12489
  label: string().optional(),
12454
12490
  deviceFeatures: array(string()).optional(),
12455
12491
  autoEligible: boolean().optional(),
12492
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
12493
+ profileHint: CamProfileSchema.optional(),
12456
12494
  metadata: record(string(), unknown()).optional(),
12457
12495
  /** Required when kind === 'derived' — the source camStreamId the
12458
12496
  * derived broker reads its encoded plane from.
@@ -31003,6 +31041,77 @@ method(object({
31003
31041
  auth: "protected"
31004
31042
  });
31005
31043
  /**
31044
+ * A camera's own "record me NOW" LEVEL — a signal the device raises while
31045
+ * something it knows about is happening (a robot vacuum cleaning, a machine
31046
+ * running, a gate open) and lowers when it stops.
31047
+ *
31048
+ * It is a level, not an edge. The sensor triggers the recorder already listens
31049
+ * to (`SOURCE_CAP_ACTIVE_FIELD`) fire on a rising edge and record for a fixed
31050
+ * post-buffer; a cleaning lasts forty minutes, and forty minutes of "this is
31051
+ * still happening" cannot be expressed as an edge plus a post-buffer without
31052
+ * either re-triggering on a timer (polling — D224 forbids the consumer keeping
31053
+ * the fact fresh) or picking a post-buffer long enough to cover every job,
31054
+ * which records the dock for that long after every short one. So the recorder
31055
+ * reads the LEVEL: it records for as long as `active` is true, plus the band's
31056
+ * own post-buffer once it falls.
31057
+ *
31058
+ * Who owns the fact: the PROVIDER of the device, which already reads the state
31059
+ * the signal is derived from (the vacuum's lifecycle state, for Dreame). It
31060
+ * writes this slice on every change; consumers subscribe to the kernel's
31061
+ * `DeviceStateChanged` for it and read it back through
31062
+ * `deviceState.getCapSlice` to reconcile — never a second copy, never a poll
31063
+ * against the device (D224, D8/D11).
31064
+ *
31065
+ * Deliberately NOT a `binary` sensor on the camera: a binary sensor is exported
31066
+ * to Home Assistant, HomeKit and the sensor picker as a thing an operator can
31067
+ * bind, and "the camera wants to record" is not a room sensor. It is a fact
31068
+ * about the camera, on the camera.
31069
+ */
31070
+ var RecordingSignalStatusSchema = object({
31071
+ /** True while the device asks to be recorded. */
31072
+ active: boolean(),
31073
+ /**
31074
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
31075
+ * …). Free text for the log line and the UI badge; the recorder never
31076
+ * branches on it.
31077
+ */
31078
+ reason: string(),
31079
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
31080
+ lastChangedAt: number()
31081
+ });
31082
+ /** The runtime-state slice: the status plus the clock every slice carries. */
31083
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: number() });
31084
+ var recordingSignalCapability = {
31085
+ name: "recording-signal",
31086
+ scope: "device",
31087
+ deviceNative: true,
31088
+ mode: "singleton",
31089
+ deviceTypes: [DeviceType.Camera],
31090
+ methods: {
31091
+ /** The current level, straight from the slice the provider keeps fresh. */
31092
+ getStatus: method(object({ deviceId: number() }), RecordingSignalStatusSchema) },
31093
+ status: {
31094
+ schema: RecordingSignalStatusSchema,
31095
+ kind: "push",
31096
+ empty: {
31097
+ active: false,
31098
+ reason: "unknown",
31099
+ lastChangedAt: 0
31100
+ }
31101
+ },
31102
+ runtimeState: RecordingSignalRuntimeStateSchema,
31103
+ /**
31104
+ * Runtime-state durability: **session** — a restored `active: true` from
31105
+ * before a restart is exactly the stale level the recorder's reconcile bound
31106
+ * exists to end, and the provider re-derives the true level on activation
31107
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
31108
+ *
31109
+ * See `RuntimeStateDurability`. Enforced by
31110
+ * `scripts/check-runtime-state-durability.ts`.
31111
+ */
31112
+ durability: "session"
31113
+ };
31114
+ /**
31006
31115
  * scene-monitor — device-scoped reference-region state cap. An operator marks
31007
31116
  * a rect ROI on a camera frame and names one or more states; the engine
31008
31117
  * (pipeline-analytics, designated post-processing node) reports which state is
@@ -31500,6 +31609,8 @@ var CamStreamDescriptorSchema = object({
31500
31609
  deviceFeatures: array(string()).optional(),
31501
31610
  /** Eligible for automatic profile assignment. Absent = `true`. */
31502
31611
  autoEligible: boolean().optional(),
31612
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
31613
+ profileHint: CamProfileSchema.optional(),
31503
31614
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
31504
31615
  metadata: record(string(), unknown()).optional()
31505
31616
  });
@@ -33639,6 +33750,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33639
33750
  pressureSensor: pressureSensorCapability,
33640
33751
  privacyMask: privacyMaskCapability,
33641
33752
  ptzAutotrack: ptzAutotrackCapability,
33753
+ recordingSignal: recordingSignalCapability,
33642
33754
  sceneMonitor: sceneMonitorCapability,
33643
33755
  scriptRunner: scriptRunnerCapability,
33644
33756
  smoke: smokeCapability,
@@ -39386,6 +39498,12 @@ Object.freeze({
39386
39498
  addonId: null,
39387
39499
  access: "view"
39388
39500
  },
39501
+ "recordingSignal.getStatus": {
39502
+ capName: "recording-signal",
39503
+ capScope: "device",
39504
+ addonId: null,
39505
+ access: "view"
39506
+ },
39389
39507
  "sceneMonitor.captureReference": {
39390
39508
  capName: "scene-monitor",
39391
39509
  capScope: "device",
@@ -42378,6 +42496,11 @@ Object.freeze({
42378
42496
  form: "single",
42379
42497
  optional: true
42380
42498
  }],
42499
+ "recordingSignal.getStatus": [{
42500
+ name: "deviceId",
42501
+ form: "single",
42502
+ optional: false
42503
+ }],
42381
42504
  "sceneMonitor.captureReference": [{
42382
42505
  name: "deviceId",
42383
42506
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-petkit",
3
- "version": "0.2.71",
3
+ "version": "0.2.73",
4
4
  "description": "PetKit smart-feeder device-provider addon for CamStack — wraps the @apocaliss92/nodepetkit PetKit cloud client",
5
5
  "keywords": [
6
6
  "camstack",