@camstack/addon-provider-amcrest 0.2.89 → 0.2.91
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 +205 -2
- package/dist/addon.mjs +205 -2
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -7622,6 +7622,157 @@ var CameraSwitchGroupSchema = object({
|
|
|
7622
7622
|
/** Unix ms when the group was composed server-side. */
|
|
7623
7623
|
fetchedAt: number()
|
|
7624
7624
|
});
|
|
7625
|
+
/**
|
|
7626
|
+
* What the gate decided about a birth, from the CALLER's point of view.
|
|
7627
|
+
*
|
|
7628
|
+
* Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
|
|
7629
|
+
* at all — it is a deferral, and the row is written when the deferral ENDS.
|
|
7630
|
+
* The third member is the one the gate's own type cannot express, because
|
|
7631
|
+
* exhaustion is a property of how long the caller waited.
|
|
7632
|
+
*/
|
|
7633
|
+
var BirthDecisionVerdictSchema = _enum([
|
|
7634
|
+
"confirmed",
|
|
7635
|
+
"suppressed",
|
|
7636
|
+
"exhausted-fallback"
|
|
7637
|
+
]);
|
|
7638
|
+
/** One birth decision, as it is kept. */
|
|
7639
|
+
var BirthDecisionRecordSchema = object({
|
|
7640
|
+
id: string(),
|
|
7641
|
+
/** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
|
|
7642
|
+
at: number().int(),
|
|
7643
|
+
/** The camera. Required: every question here is asked per-camera. */
|
|
7644
|
+
deviceId: number().int(),
|
|
7645
|
+
/**
|
|
7646
|
+
* The track the decision was about. PROVENANCE, not ownership — a suppressed
|
|
7647
|
+
* birth has no track at all, and a confirmed one is expected to age out long
|
|
7648
|
+
* before this row does. Named `sourceTrackId` so the retention model's
|
|
7649
|
+
* ownership derivation (`collection-classification.ts`, which keys on a
|
|
7650
|
+
* column literally called `trackId`) cannot reach it.
|
|
7651
|
+
*/
|
|
7652
|
+
sourceTrackId: string(),
|
|
7653
|
+
/** The candidate's claimed class. The miss rate is asked per class too. */
|
|
7654
|
+
className: string(),
|
|
7655
|
+
verdict: BirthDecisionVerdictSchema,
|
|
7656
|
+
/**
|
|
7657
|
+
* The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
|
|
7658
|
+
* `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
|
|
7659
|
+
* when the gate is DISABLED and every birth is waved through. `null` is not
|
|
7660
|
+
* "unknown": it says the gate took no measurement because it was off, which
|
|
7661
|
+
* is a different population and must never be averaged in with the rest.
|
|
7662
|
+
*/
|
|
7663
|
+
reason: string().nullable(),
|
|
7664
|
+
/** Deferral attempts this birth used. 0 = decided on its first look. */
|
|
7665
|
+
attempts: number().int(),
|
|
7666
|
+
/** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
|
|
7667
|
+
deferredForMs: number().int(),
|
|
7668
|
+
/**
|
|
7669
|
+
* THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
|
|
7670
|
+
*
|
|
7671
|
+
* `true` when the frame the verdict was taken on carried no matched
|
|
7672
|
+
* detection for this track — the tracker was coasting a frozen box and the
|
|
7673
|
+
* subject was not observed. The deferred-birth re-offer pulls the candidate
|
|
7674
|
+
* straight out of `result.tracked` without checking, so this is reachable
|
|
7675
|
+
* today; the question is the RATE, per camera, and whether refusing those
|
|
7676
|
+
* frames would have cost real tracks (cross-read against `verdict` and
|
|
7677
|
+
* `decidedByBirthEvidence`).
|
|
7678
|
+
*/
|
|
7679
|
+
decidedOnCoastedFrame: boolean(),
|
|
7680
|
+
/** Were D379 birth-instant pixels in hand when this candidate was submitted? */
|
|
7681
|
+
birthEvidenceAvailable: boolean(),
|
|
7682
|
+
/**
|
|
7683
|
+
* Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
|
|
7684
|
+
* deciding are different: the carried crop is confirm-only, so a candidate
|
|
7685
|
+
* can hold evidence, be found inconclusive on it, and be decided by a native
|
|
7686
|
+
* crop of a later instant. A coasted decision backed by carried evidence is
|
|
7687
|
+
* a real observation of the birth instant; one without it is not.
|
|
7688
|
+
*/
|
|
7689
|
+
decidedByBirthEvidence: boolean(),
|
|
7690
|
+
/** Best class-compatible crop score, or `null` when nothing compatible was
|
|
7691
|
+
* found — deliberately not 0, which would be a measurement that never was. */
|
|
7692
|
+
bestScore: number().nullable(),
|
|
7693
|
+
/** The bar this candidate actually faced (the phantom-cell hook may raise it). */
|
|
7694
|
+
appliedMinConfidence: number().nullable(),
|
|
7695
|
+
/**
|
|
7696
|
+
* The track's own `firstSeen` — the candidate's first frame, which is where
|
|
7697
|
+
* the timeline starts. `null` for a suppressed birth, which has no track.
|
|
7698
|
+
*/
|
|
7699
|
+
firstSeen: number().int().nullable(),
|
|
7700
|
+
/**
|
|
7701
|
+
* The device's most recent motion RISING EDGE at the moment of the decision,
|
|
7702
|
+
* or `null` when there is none, it is older than
|
|
7703
|
+
* {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
|
|
7704
|
+
*/
|
|
7705
|
+
motionOnsetAt: number().int().nullable(),
|
|
7706
|
+
/**
|
|
7707
|
+
* `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
|
|
7708
|
+
* AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
|
|
7709
|
+
*
|
|
7710
|
+
* **Why motion onset and not something else.** Two other proxies were
|
|
7711
|
+
* considered and rejected:
|
|
7712
|
+
* - *the recording/pipeline session start*: for a camera on
|
|
7713
|
+
* `detectionMode: 'always'` the session opens at process start, hours
|
|
7714
|
+
* before any subject. It measures nothing.
|
|
7715
|
+
* - *the first detection on the device in this burst*: CIRCULAR. A track's
|
|
7716
|
+
* `firstSeen` IS the first detection of that object, so for the track that
|
|
7717
|
+
* OPENS a burst — the only one the operator is complaining about — the two
|
|
7718
|
+
* are the same instant and the latency is 0 by construction.
|
|
7719
|
+
* Motion onset is the only in-process signal produced by a DIFFERENT
|
|
7720
|
+
* mechanism from the object detector, so it is the only one that can precede
|
|
7721
|
+
* it. It is also already maintained per-device at frame rate on this very
|
|
7722
|
+
* node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
|
|
7723
|
+
* it free — and, decisively, the frame path and the motion path are gated to
|
|
7724
|
+
* the SAME designated post-processing node, so the mirror is never empty for
|
|
7725
|
+
* a camera whose births land here.
|
|
7726
|
+
*
|
|
7727
|
+
* **Error bars, all of them.**
|
|
7728
|
+
* 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
|
|
7729
|
+
* wall or a branch, and only later joined by the person, OVERSTATES the
|
|
7730
|
+
* latency without bound. Mitigated, never removed, by
|
|
7731
|
+
* {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
|
|
7732
|
+
* candidate for "this burst is this subject", and even then it is a
|
|
7733
|
+
* candidate, not a fact.
|
|
7734
|
+
* 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
|
|
7735
|
+
* intensity threshold. A subject entering slowly at the far edge of the
|
|
7736
|
+
* frame can clear the detector's confidence floor BEFORE it clears the
|
|
7737
|
+
* motion floor, making this negative. Negatives are stored as-is and
|
|
7738
|
+
* never clamped — clamping would fabricate the distribution's left tail,
|
|
7739
|
+
* which is the half that says the proxy is unreliable.
|
|
7740
|
+
* 3. *Onboard motion carries firmware latency of unknown, per-model offset*
|
|
7741
|
+
* (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
|
|
7742
|
+
* therefore comparable WITHIN a camera and not across cameras of
|
|
7743
|
+
* different motion sources. The motion source is deliberately not copied
|
|
7744
|
+
* here — it belongs to the addon that owns the device (D224) and this is
|
|
7745
|
+
* a write on the frame path — so group by `deviceId`, which is how the
|
|
7746
|
+
* question is always asked anyway.
|
|
7747
|
+
* 4. *Continuous motion.* On a busy scene the burst never closes and the
|
|
7748
|
+
* onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
|
|
7749
|
+
* past it this is `null`.
|
|
7750
|
+
* 5. *No motion signal at all* — analyzer off, onboard-only camera not
|
|
7751
|
+
* reporting, or nothing since boot: `null`. Which is the truth about a
|
|
7752
|
+
* camera nobody has a reference instant for.
|
|
7753
|
+
*
|
|
7754
|
+
* So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
|
|
7755
|
+
* as such. It is not a per-track fact and must never be shown as one.
|
|
7756
|
+
*/
|
|
7757
|
+
birthLatencyMs: number().int().nullable(),
|
|
7758
|
+
/**
|
|
7759
|
+
* How many births this device has already decided since that motion onset.
|
|
7760
|
+
* 0 = the first, i.e. the only index at which the burst plausibly belongs to
|
|
7761
|
+
* this subject. `null` when there is no usable onset.
|
|
7762
|
+
*/
|
|
7763
|
+
birthIndexInBurst: number().int().nullable()
|
|
7764
|
+
});
|
|
7765
|
+
/** Query input for `listBirthDecisions` — newest first, one camera or all. */
|
|
7766
|
+
var BirthDecisionQueryInputSchema = object({
|
|
7767
|
+
/** Restrict to a single camera; omit for every row. */
|
|
7768
|
+
deviceId: number().int().optional(),
|
|
7769
|
+
/** Only decisions at or after this epoch ms. */
|
|
7770
|
+
since: number().int().optional(),
|
|
7771
|
+
/** Restrict to one verdict — the miss rate is read one population at a time. */
|
|
7772
|
+
verdict: BirthDecisionVerdictSchema.optional(),
|
|
7773
|
+
/** Max rows returned, newest-first. */
|
|
7774
|
+
limit: number().int().min(1).max(5e3).optional()
|
|
7775
|
+
});
|
|
7625
7776
|
/** One archived note — the operator's words plus enough context to find what
|
|
7626
7777
|
* they were looking at, after the track itself is gone. */
|
|
7627
7778
|
var ArchivedDebugNoteSchema = object({
|
|
@@ -20114,7 +20265,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20114
20265
|
deviceId: number(),
|
|
20115
20266
|
trackId: string(),
|
|
20116
20267
|
flags: TrackFlagsPatchSchema
|
|
20117
|
-
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
20268
|
+
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
20118
20269
|
kind: "query",
|
|
20119
20270
|
auth: "admin"
|
|
20120
20271
|
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
@@ -20556,6 +20707,22 @@ var occupancyRecheckFramesField = {
|
|
|
20556
20707
|
step: 1
|
|
20557
20708
|
};
|
|
20558
20709
|
/**
|
|
20710
|
+
* Frames one PRE-ROLL catch-up burst may send to inference at session open.
|
|
20711
|
+
*
|
|
20712
|
+
* The default of 12 over a ~4 s retained window is one frame per ~333 ms of
|
|
20713
|
+
* footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
|
|
20714
|
+
* fleet measures — one-shot, and only ever taken while a permit would still be
|
|
20715
|
+
* spare for live. `0` turns the burst off entirely (the history is still
|
|
20716
|
+
* decoded, because that is how the dial reaches a decodable GOP, and is then
|
|
20717
|
+
* discarded — the pre-D411 behaviour).
|
|
20718
|
+
*/
|
|
20719
|
+
var preRollInferenceFramesField = {
|
|
20720
|
+
min: 0,
|
|
20721
|
+
max: 30,
|
|
20722
|
+
default: 12,
|
|
20723
|
+
step: 1
|
|
20724
|
+
};
|
|
20725
|
+
/**
|
|
20559
20726
|
* Source enum for motion signals fed to the runner. Extensible — add
|
|
20560
20727
|
* new variants here when new motion-trigger paths are wired in
|
|
20561
20728
|
* (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
|
|
@@ -20796,6 +20963,31 @@ var RunnerCameraConfigSchema = object({
|
|
|
20796
20963
|
* to every occupancy rule until something moved in front of it. The churn is
|
|
20797
20964
|
* now paid on the interval instead — see `occupancyRecheckSecField`.
|
|
20798
20965
|
*/
|
|
20966
|
+
/**
|
|
20967
|
+
* Infer the session's PRE-ROLL — the retained history the restreamer replays
|
|
20968
|
+
* at session open — instead of decoding it and throwing it away.
|
|
20969
|
+
*
|
|
20970
|
+
* DEFAULT `true`, and the default is the argument. This is not a new
|
|
20971
|
+
* capability being offered cautiously: the pre-roll is ALREADY requested,
|
|
20972
|
+
* already served, already decoded and already paid for on every on-motion
|
|
20973
|
+
* detection session that asks for history. What shipped was a last-moment
|
|
20974
|
+
* discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
|
|
20975
|
+
* arriving inside a few hundred ms of wall clock looks to it like one frame's
|
|
20976
|
+
* worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
|
|
20977
|
+
* recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
|
|
20978
|
+
* 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
|
|
20979
|
+
* was decoded, and was freed.
|
|
20980
|
+
*
|
|
20981
|
+
* Shipping that as opt-in would ship the bug: an operator cannot discover a
|
|
20982
|
+
* setting whose absence looks exactly like a camera that noticed the cyclist
|
|
20983
|
+
* late. What makes ON safe is not a switch but the BOUND —
|
|
20984
|
+
* `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
|
|
20985
|
+
* the last inference permit — so the switch exists for the camera where the
|
|
20986
|
+
* history is worthless (a doorbell whose subject is always already at the
|
|
20987
|
+
* door), not as a hedge against the feature.
|
|
20988
|
+
*/
|
|
20989
|
+
preRollInferenceEnabled: boolean().default(true),
|
|
20990
|
+
preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
|
|
20799
20991
|
occupancyRecheckEnabled: boolean().default(true),
|
|
20800
20992
|
occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
|
|
20801
20993
|
occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
|
|
@@ -20824,7 +21016,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20824
21016
|
*/
|
|
20825
21017
|
inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
|
|
20826
21018
|
});
|
|
20827
|
-
motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, audioMotionWindowMsField.min, audioMotionWindowMsField.max, audioMotionWindowMsField.step, audioMotionWindowMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
|
|
21019
|
+
motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, audioMotionWindowMsField.min, audioMotionWindowMsField.max, audioMotionWindowMsField.step, audioMotionWindowMsField.default, preRollInferenceFramesField.min, preRollInferenceFramesField.max, preRollInferenceFramesField.step, preRollInferenceFramesField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
|
|
20828
21020
|
/**
|
|
20829
21021
|
* Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
|
|
20830
21022
|
* load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
|
|
@@ -38130,6 +38322,12 @@ Object.freeze({
|
|
|
38130
38322
|
addonId: null,
|
|
38131
38323
|
access: "view"
|
|
38132
38324
|
},
|
|
38325
|
+
"pipelineAnalytics.listBirthDecisions": {
|
|
38326
|
+
capName: "pipeline-analytics",
|
|
38327
|
+
capScope: "device",
|
|
38328
|
+
addonId: null,
|
|
38329
|
+
access: "view"
|
|
38330
|
+
},
|
|
38133
38331
|
"pipelineAnalytics.listEventKinds": {
|
|
38134
38332
|
capName: "pipeline-analytics",
|
|
38135
38333
|
capScope: "device",
|
|
@@ -41922,6 +42120,11 @@ Object.freeze({
|
|
|
41922
42120
|
form: "single",
|
|
41923
42121
|
optional: true
|
|
41924
42122
|
}],
|
|
42123
|
+
"pipelineAnalytics.listBirthDecisions": [{
|
|
42124
|
+
name: "deviceId",
|
|
42125
|
+
form: "single",
|
|
42126
|
+
optional: true
|
|
42127
|
+
}],
|
|
41925
42128
|
"pipelineAnalytics.listEventKinds": [{
|
|
41926
42129
|
name: "deviceId",
|
|
41927
42130
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -7623,6 +7623,157 @@ var CameraSwitchGroupSchema = object({
|
|
|
7623
7623
|
/** Unix ms when the group was composed server-side. */
|
|
7624
7624
|
fetchedAt: number()
|
|
7625
7625
|
});
|
|
7626
|
+
/**
|
|
7627
|
+
* What the gate decided about a birth, from the CALLER's point of view.
|
|
7628
|
+
*
|
|
7629
|
+
* Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
|
|
7630
|
+
* at all — it is a deferral, and the row is written when the deferral ENDS.
|
|
7631
|
+
* The third member is the one the gate's own type cannot express, because
|
|
7632
|
+
* exhaustion is a property of how long the caller waited.
|
|
7633
|
+
*/
|
|
7634
|
+
var BirthDecisionVerdictSchema = _enum([
|
|
7635
|
+
"confirmed",
|
|
7636
|
+
"suppressed",
|
|
7637
|
+
"exhausted-fallback"
|
|
7638
|
+
]);
|
|
7639
|
+
/** One birth decision, as it is kept. */
|
|
7640
|
+
var BirthDecisionRecordSchema = object({
|
|
7641
|
+
id: string(),
|
|
7642
|
+
/** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
|
|
7643
|
+
at: number().int(),
|
|
7644
|
+
/** The camera. Required: every question here is asked per-camera. */
|
|
7645
|
+
deviceId: number().int(),
|
|
7646
|
+
/**
|
|
7647
|
+
* The track the decision was about. PROVENANCE, not ownership — a suppressed
|
|
7648
|
+
* birth has no track at all, and a confirmed one is expected to age out long
|
|
7649
|
+
* before this row does. Named `sourceTrackId` so the retention model's
|
|
7650
|
+
* ownership derivation (`collection-classification.ts`, which keys on a
|
|
7651
|
+
* column literally called `trackId`) cannot reach it.
|
|
7652
|
+
*/
|
|
7653
|
+
sourceTrackId: string(),
|
|
7654
|
+
/** The candidate's claimed class. The miss rate is asked per class too. */
|
|
7655
|
+
className: string(),
|
|
7656
|
+
verdict: BirthDecisionVerdictSchema,
|
|
7657
|
+
/**
|
|
7658
|
+
* The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
|
|
7659
|
+
* `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
|
|
7660
|
+
* when the gate is DISABLED and every birth is waved through. `null` is not
|
|
7661
|
+
* "unknown": it says the gate took no measurement because it was off, which
|
|
7662
|
+
* is a different population and must never be averaged in with the rest.
|
|
7663
|
+
*/
|
|
7664
|
+
reason: string().nullable(),
|
|
7665
|
+
/** Deferral attempts this birth used. 0 = decided on its first look. */
|
|
7666
|
+
attempts: number().int(),
|
|
7667
|
+
/** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
|
|
7668
|
+
deferredForMs: number().int(),
|
|
7669
|
+
/**
|
|
7670
|
+
* THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
|
|
7671
|
+
*
|
|
7672
|
+
* `true` when the frame the verdict was taken on carried no matched
|
|
7673
|
+
* detection for this track — the tracker was coasting a frozen box and the
|
|
7674
|
+
* subject was not observed. The deferred-birth re-offer pulls the candidate
|
|
7675
|
+
* straight out of `result.tracked` without checking, so this is reachable
|
|
7676
|
+
* today; the question is the RATE, per camera, and whether refusing those
|
|
7677
|
+
* frames would have cost real tracks (cross-read against `verdict` and
|
|
7678
|
+
* `decidedByBirthEvidence`).
|
|
7679
|
+
*/
|
|
7680
|
+
decidedOnCoastedFrame: boolean(),
|
|
7681
|
+
/** Were D379 birth-instant pixels in hand when this candidate was submitted? */
|
|
7682
|
+
birthEvidenceAvailable: boolean(),
|
|
7683
|
+
/**
|
|
7684
|
+
* Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
|
|
7685
|
+
* deciding are different: the carried crop is confirm-only, so a candidate
|
|
7686
|
+
* can hold evidence, be found inconclusive on it, and be decided by a native
|
|
7687
|
+
* crop of a later instant. A coasted decision backed by carried evidence is
|
|
7688
|
+
* a real observation of the birth instant; one without it is not.
|
|
7689
|
+
*/
|
|
7690
|
+
decidedByBirthEvidence: boolean(),
|
|
7691
|
+
/** Best class-compatible crop score, or `null` when nothing compatible was
|
|
7692
|
+
* found — deliberately not 0, which would be a measurement that never was. */
|
|
7693
|
+
bestScore: number().nullable(),
|
|
7694
|
+
/** The bar this candidate actually faced (the phantom-cell hook may raise it). */
|
|
7695
|
+
appliedMinConfidence: number().nullable(),
|
|
7696
|
+
/**
|
|
7697
|
+
* The track's own `firstSeen` — the candidate's first frame, which is where
|
|
7698
|
+
* the timeline starts. `null` for a suppressed birth, which has no track.
|
|
7699
|
+
*/
|
|
7700
|
+
firstSeen: number().int().nullable(),
|
|
7701
|
+
/**
|
|
7702
|
+
* The device's most recent motion RISING EDGE at the moment of the decision,
|
|
7703
|
+
* or `null` when there is none, it is older than
|
|
7704
|
+
* {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
|
|
7705
|
+
*/
|
|
7706
|
+
motionOnsetAt: number().int().nullable(),
|
|
7707
|
+
/**
|
|
7708
|
+
* `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
|
|
7709
|
+
* AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
|
|
7710
|
+
*
|
|
7711
|
+
* **Why motion onset and not something else.** Two other proxies were
|
|
7712
|
+
* considered and rejected:
|
|
7713
|
+
* - *the recording/pipeline session start*: for a camera on
|
|
7714
|
+
* `detectionMode: 'always'` the session opens at process start, hours
|
|
7715
|
+
* before any subject. It measures nothing.
|
|
7716
|
+
* - *the first detection on the device in this burst*: CIRCULAR. A track's
|
|
7717
|
+
* `firstSeen` IS the first detection of that object, so for the track that
|
|
7718
|
+
* OPENS a burst — the only one the operator is complaining about — the two
|
|
7719
|
+
* are the same instant and the latency is 0 by construction.
|
|
7720
|
+
* Motion onset is the only in-process signal produced by a DIFFERENT
|
|
7721
|
+
* mechanism from the object detector, so it is the only one that can precede
|
|
7722
|
+
* it. It is also already maintained per-device at frame rate on this very
|
|
7723
|
+
* node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
|
|
7724
|
+
* it free — and, decisively, the frame path and the motion path are gated to
|
|
7725
|
+
* the SAME designated post-processing node, so the mirror is never empty for
|
|
7726
|
+
* a camera whose births land here.
|
|
7727
|
+
*
|
|
7728
|
+
* **Error bars, all of them.**
|
|
7729
|
+
* 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
|
|
7730
|
+
* wall or a branch, and only later joined by the person, OVERSTATES the
|
|
7731
|
+
* latency without bound. Mitigated, never removed, by
|
|
7732
|
+
* {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
|
|
7733
|
+
* candidate for "this burst is this subject", and even then it is a
|
|
7734
|
+
* candidate, not a fact.
|
|
7735
|
+
* 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
|
|
7736
|
+
* intensity threshold. A subject entering slowly at the far edge of the
|
|
7737
|
+
* frame can clear the detector's confidence floor BEFORE it clears the
|
|
7738
|
+
* motion floor, making this negative. Negatives are stored as-is and
|
|
7739
|
+
* never clamped — clamping would fabricate the distribution's left tail,
|
|
7740
|
+
* which is the half that says the proxy is unreliable.
|
|
7741
|
+
* 3. *Onboard motion carries firmware latency of unknown, per-model offset*
|
|
7742
|
+
* (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
|
|
7743
|
+
* therefore comparable WITHIN a camera and not across cameras of
|
|
7744
|
+
* different motion sources. The motion source is deliberately not copied
|
|
7745
|
+
* here — it belongs to the addon that owns the device (D224) and this is
|
|
7746
|
+
* a write on the frame path — so group by `deviceId`, which is how the
|
|
7747
|
+
* question is always asked anyway.
|
|
7748
|
+
* 4. *Continuous motion.* On a busy scene the burst never closes and the
|
|
7749
|
+
* onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
|
|
7750
|
+
* past it this is `null`.
|
|
7751
|
+
* 5. *No motion signal at all* — analyzer off, onboard-only camera not
|
|
7752
|
+
* reporting, or nothing since boot: `null`. Which is the truth about a
|
|
7753
|
+
* camera nobody has a reference instant for.
|
|
7754
|
+
*
|
|
7755
|
+
* So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
|
|
7756
|
+
* as such. It is not a per-track fact and must never be shown as one.
|
|
7757
|
+
*/
|
|
7758
|
+
birthLatencyMs: number().int().nullable(),
|
|
7759
|
+
/**
|
|
7760
|
+
* How many births this device has already decided since that motion onset.
|
|
7761
|
+
* 0 = the first, i.e. the only index at which the burst plausibly belongs to
|
|
7762
|
+
* this subject. `null` when there is no usable onset.
|
|
7763
|
+
*/
|
|
7764
|
+
birthIndexInBurst: number().int().nullable()
|
|
7765
|
+
});
|
|
7766
|
+
/** Query input for `listBirthDecisions` — newest first, one camera or all. */
|
|
7767
|
+
var BirthDecisionQueryInputSchema = object({
|
|
7768
|
+
/** Restrict to a single camera; omit for every row. */
|
|
7769
|
+
deviceId: number().int().optional(),
|
|
7770
|
+
/** Only decisions at or after this epoch ms. */
|
|
7771
|
+
since: number().int().optional(),
|
|
7772
|
+
/** Restrict to one verdict — the miss rate is read one population at a time. */
|
|
7773
|
+
verdict: BirthDecisionVerdictSchema.optional(),
|
|
7774
|
+
/** Max rows returned, newest-first. */
|
|
7775
|
+
limit: number().int().min(1).max(5e3).optional()
|
|
7776
|
+
});
|
|
7626
7777
|
/** One archived note — the operator's words plus enough context to find what
|
|
7627
7778
|
* they were looking at, after the track itself is gone. */
|
|
7628
7779
|
var ArchivedDebugNoteSchema = object({
|
|
@@ -20115,7 +20266,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20115
20266
|
deviceId: number(),
|
|
20116
20267
|
trackId: string(),
|
|
20117
20268
|
flags: TrackFlagsPatchSchema
|
|
20118
|
-
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
20269
|
+
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
20119
20270
|
kind: "query",
|
|
20120
20271
|
auth: "admin"
|
|
20121
20272
|
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
@@ -20557,6 +20708,22 @@ var occupancyRecheckFramesField = {
|
|
|
20557
20708
|
step: 1
|
|
20558
20709
|
};
|
|
20559
20710
|
/**
|
|
20711
|
+
* Frames one PRE-ROLL catch-up burst may send to inference at session open.
|
|
20712
|
+
*
|
|
20713
|
+
* The default of 12 over a ~4 s retained window is one frame per ~333 ms of
|
|
20714
|
+
* footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
|
|
20715
|
+
* fleet measures — one-shot, and only ever taken while a permit would still be
|
|
20716
|
+
* spare for live. `0` turns the burst off entirely (the history is still
|
|
20717
|
+
* decoded, because that is how the dial reaches a decodable GOP, and is then
|
|
20718
|
+
* discarded — the pre-D411 behaviour).
|
|
20719
|
+
*/
|
|
20720
|
+
var preRollInferenceFramesField = {
|
|
20721
|
+
min: 0,
|
|
20722
|
+
max: 30,
|
|
20723
|
+
default: 12,
|
|
20724
|
+
step: 1
|
|
20725
|
+
};
|
|
20726
|
+
/**
|
|
20560
20727
|
* Source enum for motion signals fed to the runner. Extensible — add
|
|
20561
20728
|
* new variants here when new motion-trigger paths are wired in
|
|
20562
20729
|
* (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
|
|
@@ -20797,6 +20964,31 @@ var RunnerCameraConfigSchema = object({
|
|
|
20797
20964
|
* to every occupancy rule until something moved in front of it. The churn is
|
|
20798
20965
|
* now paid on the interval instead — see `occupancyRecheckSecField`.
|
|
20799
20966
|
*/
|
|
20967
|
+
/**
|
|
20968
|
+
* Infer the session's PRE-ROLL — the retained history the restreamer replays
|
|
20969
|
+
* at session open — instead of decoding it and throwing it away.
|
|
20970
|
+
*
|
|
20971
|
+
* DEFAULT `true`, and the default is the argument. This is not a new
|
|
20972
|
+
* capability being offered cautiously: the pre-roll is ALREADY requested,
|
|
20973
|
+
* already served, already decoded and already paid for on every on-motion
|
|
20974
|
+
* detection session that asks for history. What shipped was a last-moment
|
|
20975
|
+
* discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
|
|
20976
|
+
* arriving inside a few hundred ms of wall clock looks to it like one frame's
|
|
20977
|
+
* worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
|
|
20978
|
+
* recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
|
|
20979
|
+
* 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
|
|
20980
|
+
* was decoded, and was freed.
|
|
20981
|
+
*
|
|
20982
|
+
* Shipping that as opt-in would ship the bug: an operator cannot discover a
|
|
20983
|
+
* setting whose absence looks exactly like a camera that noticed the cyclist
|
|
20984
|
+
* late. What makes ON safe is not a switch but the BOUND —
|
|
20985
|
+
* `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
|
|
20986
|
+
* the last inference permit — so the switch exists for the camera where the
|
|
20987
|
+
* history is worthless (a doorbell whose subject is always already at the
|
|
20988
|
+
* door), not as a hedge against the feature.
|
|
20989
|
+
*/
|
|
20990
|
+
preRollInferenceEnabled: boolean().default(true),
|
|
20991
|
+
preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
|
|
20800
20992
|
occupancyRecheckEnabled: boolean().default(true),
|
|
20801
20993
|
occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
|
|
20802
20994
|
occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
|
|
@@ -20825,7 +21017,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20825
21017
|
*/
|
|
20826
21018
|
inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
|
|
20827
21019
|
});
|
|
20828
|
-
motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, audioMotionWindowMsField.min, audioMotionWindowMsField.max, audioMotionWindowMsField.step, audioMotionWindowMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
|
|
21020
|
+
motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, maxSessionHoldMsField.min, maxSessionHoldMsField.max, maxSessionHoldMsField.step, maxSessionHoldMsField.default, audioMotionWindowMsField.min, audioMotionWindowMsField.max, audioMotionWindowMsField.step, audioMotionWindowMsField.default, preRollInferenceFramesField.min, preRollInferenceFramesField.max, preRollInferenceFramesField.step, preRollInferenceFramesField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
|
|
20829
21021
|
/**
|
|
20830
21022
|
* Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
|
|
20831
21023
|
* load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
|
|
@@ -38131,6 +38323,12 @@ Object.freeze({
|
|
|
38131
38323
|
addonId: null,
|
|
38132
38324
|
access: "view"
|
|
38133
38325
|
},
|
|
38326
|
+
"pipelineAnalytics.listBirthDecisions": {
|
|
38327
|
+
capName: "pipeline-analytics",
|
|
38328
|
+
capScope: "device",
|
|
38329
|
+
addonId: null,
|
|
38330
|
+
access: "view"
|
|
38331
|
+
},
|
|
38134
38332
|
"pipelineAnalytics.listEventKinds": {
|
|
38135
38333
|
capName: "pipeline-analytics",
|
|
38136
38334
|
capScope: "device",
|
|
@@ -41923,6 +42121,11 @@ Object.freeze({
|
|
|
41923
42121
|
form: "single",
|
|
41924
42122
|
optional: true
|
|
41925
42123
|
}],
|
|
42124
|
+
"pipelineAnalytics.listBirthDecisions": [{
|
|
42125
|
+
name: "deviceId",
|
|
42126
|
+
form: "single",
|
|
42127
|
+
optional: true
|
|
42128
|
+
}],
|
|
41926
42129
|
"pipelineAnalytics.listEventKinds": [{
|
|
41927
42130
|
name: "deviceId",
|
|
41928
42131
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-amcrest",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.91",
|
|
4
4
|
"description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|