@camstack/addon-provider-petkit 0.2.72 → 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 +118 -1
- package/dist/addon.mjs +118 -1
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7547,6 +7547,21 @@ var CameraStreamSchema = object({
|
|
|
7547
7547
|
*/
|
|
7548
7548
|
autoEligible: boolean().optional(),
|
|
7549
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
|
+
/**
|
|
7550
7565
|
* Transport-specific opaque metadata. The broker passes it through to
|
|
7551
7566
|
* the source reader without inspecting it. Currently used by
|
|
7552
7567
|
* `pull-rfc4571` streams to carry the upstream SDP (so the reader can
|
|
@@ -8996,7 +9011,22 @@ var RecordingTriggersSchema = object({
|
|
|
8996
9011
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8997
9012
|
* registrare.
|
|
8998
9013
|
*/
|
|
8999
|
-
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()
|
|
9000
9030
|
});
|
|
9001
9031
|
/**
|
|
9002
9032
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -12460,6 +12490,8 @@ method(object({
|
|
|
12460
12490
|
label: string().optional(),
|
|
12461
12491
|
deviceFeatures: array(string()).optional(),
|
|
12462
12492
|
autoEligible: boolean().optional(),
|
|
12493
|
+
/** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
|
|
12494
|
+
profileHint: CamProfileSchema.optional(),
|
|
12463
12495
|
metadata: record(string(), unknown()).optional(),
|
|
12464
12496
|
/** Required when kind === 'derived' — the source camStreamId the
|
|
12465
12497
|
* derived broker reads its encoded plane from.
|
|
@@ -31010,6 +31042,77 @@ method(object({
|
|
|
31010
31042
|
auth: "protected"
|
|
31011
31043
|
});
|
|
31012
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
|
+
/**
|
|
31013
31116
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
31014
31117
|
* a rect ROI on a camera frame and names one or more states; the engine
|
|
31015
31118
|
* (pipeline-analytics, designated post-processing node) reports which state is
|
|
@@ -31507,6 +31610,8 @@ var CamStreamDescriptorSchema = object({
|
|
|
31507
31610
|
deviceFeatures: array(string()).optional(),
|
|
31508
31611
|
/** Eligible for automatic profile assignment. Absent = `true`. */
|
|
31509
31612
|
autoEligible: boolean().optional(),
|
|
31613
|
+
/** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
|
|
31614
|
+
profileHint: CamProfileSchema.optional(),
|
|
31510
31615
|
/** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
|
|
31511
31616
|
metadata: record(string(), unknown()).optional()
|
|
31512
31617
|
});
|
|
@@ -33646,6 +33751,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
33646
33751
|
pressureSensor: pressureSensorCapability,
|
|
33647
33752
|
privacyMask: privacyMaskCapability,
|
|
33648
33753
|
ptzAutotrack: ptzAutotrackCapability,
|
|
33754
|
+
recordingSignal: recordingSignalCapability,
|
|
33649
33755
|
sceneMonitor: sceneMonitorCapability,
|
|
33650
33756
|
scriptRunner: scriptRunnerCapability,
|
|
33651
33757
|
smoke: smokeCapability,
|
|
@@ -39393,6 +39499,12 @@ Object.freeze({
|
|
|
39393
39499
|
addonId: null,
|
|
39394
39500
|
access: "view"
|
|
39395
39501
|
},
|
|
39502
|
+
"recordingSignal.getStatus": {
|
|
39503
|
+
capName: "recording-signal",
|
|
39504
|
+
capScope: "device",
|
|
39505
|
+
addonId: null,
|
|
39506
|
+
access: "view"
|
|
39507
|
+
},
|
|
39396
39508
|
"sceneMonitor.captureReference": {
|
|
39397
39509
|
capName: "scene-monitor",
|
|
39398
39510
|
capScope: "device",
|
|
@@ -42385,6 +42497,11 @@ Object.freeze({
|
|
|
42385
42497
|
form: "single",
|
|
42386
42498
|
optional: true
|
|
42387
42499
|
}],
|
|
42500
|
+
"recordingSignal.getStatus": [{
|
|
42501
|
+
name: "deviceId",
|
|
42502
|
+
form: "single",
|
|
42503
|
+
optional: false
|
|
42504
|
+
}],
|
|
42388
42505
|
"sceneMonitor.captureReference": [{
|
|
42389
42506
|
name: "deviceId",
|
|
42390
42507
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -7546,6 +7546,21 @@ var CameraStreamSchema = object({
|
|
|
7546
7546
|
*/
|
|
7547
7547
|
autoEligible: boolean().optional(),
|
|
7548
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
|
+
/**
|
|
7549
7564
|
* Transport-specific opaque metadata. The broker passes it through to
|
|
7550
7565
|
* the source reader without inspecting it. Currently used by
|
|
7551
7566
|
* `pull-rfc4571` streams to carry the upstream SDP (so the reader can
|
|
@@ -8995,7 +9010,22 @@ var RecordingTriggersSchema = object({
|
|
|
8995
9010
|
* il livello: un contatto trovato già aperto al riavvio del runner non fa
|
|
8996
9011
|
* registrare.
|
|
8997
9012
|
*/
|
|
8998
|
-
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()
|
|
8999
9029
|
});
|
|
9000
9030
|
/**
|
|
9001
9031
|
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
@@ -12459,6 +12489,8 @@ method(object({
|
|
|
12459
12489
|
label: string().optional(),
|
|
12460
12490
|
deviceFeatures: array(string()).optional(),
|
|
12461
12491
|
autoEligible: boolean().optional(),
|
|
12492
|
+
/** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
|
|
12493
|
+
profileHint: CamProfileSchema.optional(),
|
|
12462
12494
|
metadata: record(string(), unknown()).optional(),
|
|
12463
12495
|
/** Required when kind === 'derived' — the source camStreamId the
|
|
12464
12496
|
* derived broker reads its encoded plane from.
|
|
@@ -31009,6 +31041,77 @@ method(object({
|
|
|
31009
31041
|
auth: "protected"
|
|
31010
31042
|
});
|
|
31011
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
|
+
/**
|
|
31012
31115
|
* scene-monitor — device-scoped reference-region state cap. An operator marks
|
|
31013
31116
|
* a rect ROI on a camera frame and names one or more states; the engine
|
|
31014
31117
|
* (pipeline-analytics, designated post-processing node) reports which state is
|
|
@@ -31506,6 +31609,8 @@ var CamStreamDescriptorSchema = object({
|
|
|
31506
31609
|
deviceFeatures: array(string()).optional(),
|
|
31507
31610
|
/** Eligible for automatic profile assignment. Absent = `true`. */
|
|
31508
31611
|
autoEligible: boolean().optional(),
|
|
31612
|
+
/** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
|
|
31613
|
+
profileHint: CamProfileSchema.optional(),
|
|
31509
31614
|
/** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
|
|
31510
31615
|
metadata: record(string(), unknown()).optional()
|
|
31511
31616
|
});
|
|
@@ -33645,6 +33750,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
|
|
|
33645
33750
|
pressureSensor: pressureSensorCapability,
|
|
33646
33751
|
privacyMask: privacyMaskCapability,
|
|
33647
33752
|
ptzAutotrack: ptzAutotrackCapability,
|
|
33753
|
+
recordingSignal: recordingSignalCapability,
|
|
33648
33754
|
sceneMonitor: sceneMonitorCapability,
|
|
33649
33755
|
scriptRunner: scriptRunnerCapability,
|
|
33650
33756
|
smoke: smokeCapability,
|
|
@@ -39392,6 +39498,12 @@ Object.freeze({
|
|
|
39392
39498
|
addonId: null,
|
|
39393
39499
|
access: "view"
|
|
39394
39500
|
},
|
|
39501
|
+
"recordingSignal.getStatus": {
|
|
39502
|
+
capName: "recording-signal",
|
|
39503
|
+
capScope: "device",
|
|
39504
|
+
addonId: null,
|
|
39505
|
+
access: "view"
|
|
39506
|
+
},
|
|
39395
39507
|
"sceneMonitor.captureReference": {
|
|
39396
39508
|
capName: "scene-monitor",
|
|
39397
39509
|
capScope: "device",
|
|
@@ -42384,6 +42496,11 @@ Object.freeze({
|
|
|
42384
42496
|
form: "single",
|
|
42385
42497
|
optional: true
|
|
42386
42498
|
}],
|
|
42499
|
+
"recordingSignal.getStatus": [{
|
|
42500
|
+
name: "deviceId",
|
|
42501
|
+
form: "single",
|
|
42502
|
+
optional: false
|
|
42503
|
+
}],
|
|
42387
42504
|
"sceneMonitor.captureReference": [{
|
|
42388
42505
|
name: "deviceId",
|
|
42389
42506
|
form: "single",
|
package/package.json
CHANGED