@camstack/types 1.2.286 → 1.2.288
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/capabilities/device-manager.cap.d.ts +1 -1
- package/dist/capabilities/failure-contribution.cap.d.ts +1 -1
- package/dist/capabilities/motion.cap.d.ts +1 -1
- package/dist/capabilities/recording-archive.cap.d.ts +1 -1
- package/dist/capabilities/system.cap.d.ts +1 -1
- package/dist/capabilities/videoclips.cap.d.ts +3 -3
- package/dist/catalogs/sensor-active-state.d.ts +31 -31
- package/dist/{composition-43aqsZQj.mjs → composition-D7ULvLdD.mjs} +22 -22
- package/dist/{composition-w3gBWMer.js → composition-DexM_etk.js} +22 -22
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/index.js +576 -62
- package/dist/index.mjs +576 -62
- package/dist/interfaces/recording-config.d.ts +7 -7
- package/dist/logging/log-channel.d.ts +1 -1
- package/dist/node.js +1 -1
- package/dist/node.mjs +1 -1
- package/dist/notification/rule-kinds.d.ts +3 -3
- package/dist/notification/timelapse-rule.d.ts +1 -1
- package/dist/types/detection.d.ts +9 -9
- package/dist/types/labels.d.ts +14 -14
- package/package.json +1 -1
|
@@ -1473,7 +1473,7 @@ export declare const deviceManagerCapability: {
|
|
|
1473
1473
|
* sources could be switched off without switching off the rest (D556, then
|
|
1474
1474
|
* D555's re-key by source). The operator removed the whole idea the same
|
|
1475
1475
|
* day: *"tutti i providers funzionano sempre, non serve
|
|
1476
|
-
* disattivarli/attivarli … loro vivono lì"* (D557 amended, third). A
|
|
1476
|
+
* disattivarli/attivarli … loro vivono lì"* [all the providers always work, there is no need to deactivate/activate them … they live there] (D557 amended, third). A
|
|
1477
1477
|
* collection cap's providers are a DERIVED set — every addon that provides
|
|
1478
1478
|
* the cap for this device type, computed on every read and persisted
|
|
1479
1479
|
* nowhere — so there is nothing here to activate, and a verb that accepted
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
30
30
|
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
31
31
|
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
32
|
-
* ricontrolliamo tutti questi punti"
|
|
32
|
+
* ricontrolliamo tutti questi punti"* [can we instrument these errors in the meantime? That way next round we recheck all these points]. Reading them meant grepping Loki and
|
|
33
33
|
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
34
34
|
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
35
35
|
* be READ.
|
|
@@ -15,7 +15,7 @@ import { type InferProvider } from './capability-definition.js';
|
|
|
15
15
|
*/
|
|
16
16
|
/**
|
|
17
17
|
* How long after a camera's last rising edge `pipeline-analytics` closes the
|
|
18
|
-
* motion EPISODE row it kept open for it (D475) — "il delay della cap", in
|
|
18
|
+
* motion EPISODE row it kept open for it (D475) — "il delay della cap" [the cap's delay], in
|
|
19
19
|
* the operator's words. One authority for the whole system: the writer of a
|
|
20
20
|
* `Camera` device's slice (the orchestrator, D696) writes this SAME constant
|
|
21
21
|
* in `autoClearAfterMs` while `detected: true` (never a camera's own clock —
|
|
@@ -342,7 +342,7 @@ export type ReadGopBytesResult = z.infer<typeof ReadGopBytesResultSchema>;
|
|
|
342
342
|
/**
|
|
343
343
|
* A time WINDOW of one finalized segment, cut by byte range — the multi-GOP
|
|
344
344
|
* twin of {@link ReadGopBytesResultSchema}'s single instant. Built for the
|
|
345
|
-
* replay clip's `recording` source (`docs/design/plans/2026-08-26-replay-
|
|
345
|
+
* replay clip's `recording` source (`docs/design/plans/2026-08-26-clip-replay-on-pipeline.md`):
|
|
346
346
|
* a replay needs several seconds of native pixels, not one frame.
|
|
347
347
|
*
|
|
348
348
|
* `ok.data` is standalone-demuxable, same as a GOP read. `ok.reachesRequestedEnd`
|
|
@@ -835,7 +835,7 @@ export declare const systemCapability: {
|
|
|
835
835
|
*
|
|
836
836
|
* This is the surface the operator asked for on 2026-08-28 (*"possiamo
|
|
837
837
|
* armare questi errori intanto? Così al prossimo giro ricontrolliamo tutti
|
|
838
|
-
* questi punti"*). Before it, four live failure modes could only be counted
|
|
838
|
+
* questi punti"* [can we instrument these errors in the meantime? That way next round we recheck all these points]). Before it, four live failure modes could only be counted
|
|
839
839
|
* by grepping Loki and hand-correlating timestamps, which is exactly how a
|
|
840
840
|
* 22% thumbnail gap and a 3-hour media blackout were diagnosed — twice.
|
|
841
841
|
*
|
|
@@ -25,7 +25,7 @@ import { type InferProvider } from './capability-definition.js';
|
|
|
25
25
|
*
|
|
26
26
|
* `listClips` is asked of ONE provider at a time, and NAMING it is REQUIRED
|
|
27
27
|
* ({@link videoclipsCapability.methods.listClips} `provider`, D554 amended). It is not
|
|
28
|
-
* a union over everything a camera has: *"l'utilizzatore è uno solo"
|
|
28
|
+
* a union over everything a camera has: *"l'utilizzatore è uno solo"* [there is only one user]. There
|
|
29
29
|
* is no default, because a collection cap's binding set is DERIVED and PLURAL
|
|
30
30
|
* (D554 amended, `getBindings` step 0) — "the bound one" does not exist to
|
|
31
31
|
* resolve to, and the one thing that could take its place is a second
|
|
@@ -230,7 +230,7 @@ export type ClipPlayback = z.infer<typeof ClipPlaybackSchema>;
|
|
|
230
230
|
* **One authorised yes is one wake.** `next-natural` — take the clip the next
|
|
231
231
|
* time the camera is awake for its own reasons — is deliberately not a member:
|
|
232
232
|
* it was proposed, it is free on the battery, and the operator declined it on
|
|
233
|
-
* 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."
|
|
233
|
+
* 2026-09-20 (*"Quando un export viene richiesto si sveglia la camera."* [When an export is requested the camera wakes up],
|
|
234
234
|
* D558 "Considered and not taken").
|
|
235
235
|
*/
|
|
236
236
|
export declare const ClipWakeSchema: z.ZodEnum<{
|
|
@@ -570,7 +570,7 @@ export declare const videoclipsCapability: {
|
|
|
570
570
|
* **It is a SECTION of the Recording tab, at the end of it — not a tab of
|
|
571
571
|
* its own.** It shipped as a `clips` top-tab and the operator rejected the
|
|
572
572
|
* placement: *"utilizzerei la stessa tab recordings, lì abbiamo già tutto il
|
|
573
|
-
* necessario, una nuova sezione alla fine per le clips"
|
|
573
|
+
* necessario, una nuova sezione alla fine per le clips"* [I would use the same recordings tab, there we already have everything necessary, a new section at the end for the clips]. The Recording tab
|
|
574
574
|
* already holds the recorder's panel, the schedule bands and the unified
|
|
575
575
|
* retention policy; footage the camera itself holds is the same question,
|
|
576
576
|
* asked of a different store. `order: 100` puts it after all of them with
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* THE table "which boolean of this device type counts as HIGH", and the
|
|
3
|
+
* pure evaluator of its EDGE.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
5
|
+
* ONE table for everyone who asks "is this device HIGH?": the
|
|
6
|
+
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
7
|
+
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
8
|
+
* the sources of a composite doorbell (`doorbellFeatureSources`, D671).
|
|
9
|
+
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
10
|
+
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
11
11
|
*
|
|
12
|
-
* ⚠
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
|
|
13
|
+
* two must not be unified: that one answers "what is the state WORD for a
|
|
14
|
+
* rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
|
|
15
|
+
* boolean's EDGE counts". Deliberately different vocabularies.
|
|
16
16
|
*/
|
|
17
17
|
/**
|
|
18
18
|
* Known binary / switch source caps → the boolean slice field whose
|
|
@@ -64,8 +64,8 @@ export declare function sliceActiveValue(capName: string, slice: Readonly<Record
|
|
|
64
64
|
* it is absent, non-numeric or the zero "never observed" sentinel. */
|
|
65
65
|
export declare function sliceChangedAt(capName: string, slice: Readonly<Record<string, unknown>>): number | null;
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
67
|
+
* Why a slice did not carry a rising edge. ONE enum, so "why did nothing
|
|
68
|
+
* fire" has a single answer, whoever asks.
|
|
69
69
|
*/
|
|
70
70
|
export type SensorEdgeIgnoreReason =
|
|
71
71
|
/** Not a recognised binary/switch source cap. */
|
|
@@ -87,19 +87,19 @@ export type SensorEdgeIgnoreReason =
|
|
|
87
87
|
export interface SensorEdgeInput {
|
|
88
88
|
readonly capName: string;
|
|
89
89
|
readonly slice: Readonly<Record<string, unknown>>;
|
|
90
|
-
/**
|
|
90
|
+
/** Last boolean observed for this `(device, cap)`; `undefined` = never seen. */
|
|
91
91
|
readonly prior: boolean | undefined;
|
|
92
|
-
/**
|
|
93
|
-
*
|
|
92
|
+
/** When the OBSERVER started watching — the floor for a first
|
|
93
|
+
* already-active observation. Each observer has its own. */
|
|
94
94
|
readonly startedAtMs: number;
|
|
95
95
|
readonly nowMs: number;
|
|
96
96
|
readonly firstSightingFreshnessMs: number;
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
|
-
* `value`
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
99
|
+
* `value` is returned on every path where the slice CARRIED a boolean,
|
|
100
|
+
* even when there is no edge: the caller updates its memory with that
|
|
101
|
+
* and does not re-read the slice. On `unknown-cap` / `non-boolean-value` it is `null` and the
|
|
102
|
+
* memory must not be touched.
|
|
103
103
|
*/
|
|
104
104
|
export type SensorEdgeVerdict = {
|
|
105
105
|
readonly edge: 'rising';
|
|
@@ -137,16 +137,16 @@ export type SensorLevelEdgeVerdict = {
|
|
|
137
137
|
*/
|
|
138
138
|
export declare function evaluateSensorLevelEdge(input: SensorLevelEdgeInput): SensorLevelEdgeVerdict;
|
|
139
139
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
140
|
+
* THE edge. Pure: no clock of its own, no memory — the caller
|
|
141
|
+
* brings `prior`, `nowMs` and its own `startedAtMs`.
|
|
142
142
|
*
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* `startedAtMs` **
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
143
|
+
* The case of the FIRST slice already active is treated explicitly and counts as an
|
|
144
|
+
* edge only if the UPSTREAM timestamp of the transition is later than
|
|
145
|
+
* `startedAtMs` **and** within `firstSightingFreshnessMs`. Both halves
|
|
146
|
+
* are needed: freshness alone would fire on a boot-time hydration of a
|
|
147
|
+
* state flipped a few seconds before the restart, and "after we started"
|
|
148
|
+
* alone would fire, on a long-lived process, for a source
|
|
149
|
+
* adopted today whose state changed yesterday. The ambiguous case ERRS TOWARD
|
|
150
|
+
* SILENCE and declares it (`baseline-seeded-stale-active`).
|
|
151
151
|
*/
|
|
152
152
|
export declare function evaluateSensorEdge(input: SensorEdgeInput): SensorEdgeVerdict;
|
|
@@ -901,20 +901,20 @@ function chooseFfmpegBinary(input) {
|
|
|
901
901
|
//#endregion
|
|
902
902
|
//#region src/catalogs/sensor-active-state.ts
|
|
903
903
|
/**
|
|
904
|
-
*
|
|
905
|
-
*
|
|
904
|
+
* THE table "which boolean of this device type counts as HIGH", and the
|
|
905
|
+
* pure evaluator of its EDGE.
|
|
906
906
|
*
|
|
907
|
-
*
|
|
908
|
-
*
|
|
909
|
-
*
|
|
910
|
-
*
|
|
911
|
-
*
|
|
912
|
-
*
|
|
907
|
+
* ONE table for everyone who asks "is this device HIGH?": the
|
|
908
|
+
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
909
|
+
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
910
|
+
* the sources of a composite doorbell (`doorbellFeatureSources`, D671).
|
|
911
|
+
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
912
|
+
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
913
913
|
*
|
|
914
|
-
* ⚠
|
|
915
|
-
*
|
|
916
|
-
*
|
|
917
|
-
*
|
|
914
|
+
* ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
|
|
915
|
+
* two must not be unified: that one answers "what is the state WORD for a
|
|
916
|
+
* rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
|
|
917
|
+
* boolean's EDGE counts". Deliberately different vocabularies.
|
|
918
918
|
*/
|
|
919
919
|
/**
|
|
920
920
|
* Known binary / switch source caps → the boolean slice field whose
|
|
@@ -1030,17 +1030,17 @@ function evaluateSensorLevelEdge(input) {
|
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
1032
1032
|
/**
|
|
1033
|
-
*
|
|
1034
|
-
*
|
|
1033
|
+
* THE edge. Pure: no clock of its own, no memory — the caller
|
|
1034
|
+
* brings `prior`, `nowMs` and its own `startedAtMs`.
|
|
1035
1035
|
*
|
|
1036
|
-
*
|
|
1037
|
-
*
|
|
1038
|
-
* `startedAtMs` **
|
|
1039
|
-
*
|
|
1040
|
-
*
|
|
1041
|
-
*
|
|
1042
|
-
*
|
|
1043
|
-
*
|
|
1036
|
+
* The case of the FIRST slice already active is treated explicitly and counts as an
|
|
1037
|
+
* edge only if the UPSTREAM timestamp of the transition is later than
|
|
1038
|
+
* `startedAtMs` **and** within `firstSightingFreshnessMs`. Both halves
|
|
1039
|
+
* are needed: freshness alone would fire on a boot-time hydration of a
|
|
1040
|
+
* state flipped a few seconds before the restart, and "after we started"
|
|
1041
|
+
* alone would fire, on a long-lived process, for a source
|
|
1042
|
+
* adopted today whose state changed yesterday. The ambiguous case ERRS TOWARD
|
|
1043
|
+
* SILENCE and declares it (`baseline-seeded-stale-active`).
|
|
1044
1044
|
*/
|
|
1045
1045
|
function evaluateSensorEdge(input) {
|
|
1046
1046
|
const value = sliceActiveValue(input.capName, input.slice);
|
|
@@ -901,20 +901,20 @@ function chooseFfmpegBinary(input) {
|
|
|
901
901
|
//#endregion
|
|
902
902
|
//#region src/catalogs/sensor-active-state.ts
|
|
903
903
|
/**
|
|
904
|
-
*
|
|
905
|
-
*
|
|
904
|
+
* THE table "which boolean of this device type counts as HIGH", and the
|
|
905
|
+
* pure evaluator of its EDGE.
|
|
906
906
|
*
|
|
907
|
-
*
|
|
908
|
-
*
|
|
909
|
-
*
|
|
910
|
-
*
|
|
911
|
-
*
|
|
912
|
-
*
|
|
907
|
+
* ONE table for everyone who asks "is this device HIGH?": the
|
|
908
|
+
* recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
|
|
909
|
+
* sensor markers, the orchestrator's camera-sensors bridge and
|
|
910
|
+
* the sources of a composite doorbell (`doorbellFeatureSources`, D671).
|
|
911
|
+
* A second copy would diverge at the first cap added, and the symptom — "the
|
|
912
|
+
* sensor rings the doorbell but does not record" — is exactly D62.
|
|
913
913
|
*
|
|
914
|
-
* ⚠
|
|
915
|
-
*
|
|
916
|
-
*
|
|
917
|
-
*
|
|
914
|
+
* ⚠ NOT `DEVICE_STATE_READERS` (`catalogs/device-state-vocabulary.ts`), and the
|
|
915
|
+
* two must not be unified: that one answers "what is the state WORD for a
|
|
916
|
+
* rule" (and includes `presence`, `cover`, `alarm-panel`), this one "which
|
|
917
|
+
* boolean's EDGE counts". Deliberately different vocabularies.
|
|
918
918
|
*/
|
|
919
919
|
/**
|
|
920
920
|
* Known binary / switch source caps → the boolean slice field whose
|
|
@@ -1030,17 +1030,17 @@ function evaluateSensorLevelEdge(input) {
|
|
|
1030
1030
|
};
|
|
1031
1031
|
}
|
|
1032
1032
|
/**
|
|
1033
|
-
*
|
|
1034
|
-
*
|
|
1033
|
+
* THE edge. Pure: no clock of its own, no memory — the caller
|
|
1034
|
+
* brings `prior`, `nowMs` and its own `startedAtMs`.
|
|
1035
1035
|
*
|
|
1036
|
-
*
|
|
1037
|
-
*
|
|
1038
|
-
* `startedAtMs` **
|
|
1039
|
-
*
|
|
1040
|
-
*
|
|
1041
|
-
*
|
|
1042
|
-
*
|
|
1043
|
-
*
|
|
1036
|
+
* The case of the FIRST slice already active is treated explicitly and counts as an
|
|
1037
|
+
* edge only if the UPSTREAM timestamp of the transition is later than
|
|
1038
|
+
* `startedAtMs` **and** within `firstSightingFreshnessMs`. Both halves
|
|
1039
|
+
* are needed: freshness alone would fire on a boot-time hydration of a
|
|
1040
|
+
* state flipped a few seconds before the restart, and "after we started"
|
|
1041
|
+
* alone would fire, on a long-lived process, for a source
|
|
1042
|
+
* adopted today whose state changed yesterday. The ambiguous case ERRS TOWARD
|
|
1043
|
+
* SILENCE and declares it (`baseline-seeded-stale-active`).
|
|
1044
1044
|
*/
|
|
1045
1045
|
function evaluateSensorEdge(input) {
|
|
1046
1046
|
const value = sliceActiveValue(input.capName, input.slice);
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* system-scope cap that takes a deviceId was previously never device-filtered
|
|
7
7
|
* — see the generator header).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
10
|
-
*
|
|
9
|
+
* Coverage: 509 methods carry a device reference, of which
|
|
10
|
+
* 160 are on SYSTEM-scope caps.
|
|
11
11
|
*
|
|
12
12
|
* Top-level fields, number arrays, and one-level arrays of objects carrying
|
|
13
13
|
* a numeric device field (targets[].deviceId) are all mapped; the matcher
|