@camstack/addon-terminal 0.1.92 → 0.1.94
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
|
@@ -7726,6 +7726,157 @@ var CameraSwitchGroupSchema = object({
|
|
|
7726
7726
|
*/
|
|
7727
7727
|
var DETECTION_PIPELINE_CAP_NAME = "detection-pipeline";
|
|
7728
7728
|
var AUDIO_ANALYSIS_CAP_NAME = "audio-analysis";
|
|
7729
|
+
/**
|
|
7730
|
+
* What the gate decided about a birth, from the CALLER's point of view.
|
|
7731
|
+
*
|
|
7732
|
+
* Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
|
|
7733
|
+
* at all — it is a deferral, and the row is written when the deferral ENDS.
|
|
7734
|
+
* The third member is the one the gate's own type cannot express, because
|
|
7735
|
+
* exhaustion is a property of how long the caller waited.
|
|
7736
|
+
*/
|
|
7737
|
+
var BirthDecisionVerdictSchema = _enum([
|
|
7738
|
+
"confirmed",
|
|
7739
|
+
"suppressed",
|
|
7740
|
+
"exhausted-fallback"
|
|
7741
|
+
]);
|
|
7742
|
+
/** One birth decision, as it is kept. */
|
|
7743
|
+
var BirthDecisionRecordSchema = object({
|
|
7744
|
+
id: string(),
|
|
7745
|
+
/** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
|
|
7746
|
+
at: number().int(),
|
|
7747
|
+
/** The camera. Required: every question here is asked per-camera. */
|
|
7748
|
+
deviceId: number().int(),
|
|
7749
|
+
/**
|
|
7750
|
+
* The track the decision was about. PROVENANCE, not ownership — a suppressed
|
|
7751
|
+
* birth has no track at all, and a confirmed one is expected to age out long
|
|
7752
|
+
* before this row does. Named `sourceTrackId` so the retention model's
|
|
7753
|
+
* ownership derivation (`collection-classification.ts`, which keys on a
|
|
7754
|
+
* column literally called `trackId`) cannot reach it.
|
|
7755
|
+
*/
|
|
7756
|
+
sourceTrackId: string(),
|
|
7757
|
+
/** The candidate's claimed class. The miss rate is asked per class too. */
|
|
7758
|
+
className: string(),
|
|
7759
|
+
verdict: BirthDecisionVerdictSchema,
|
|
7760
|
+
/**
|
|
7761
|
+
* The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
|
|
7762
|
+
* `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
|
|
7763
|
+
* when the gate is DISABLED and every birth is waved through. `null` is not
|
|
7764
|
+
* "unknown": it says the gate took no measurement because it was off, which
|
|
7765
|
+
* is a different population and must never be averaged in with the rest.
|
|
7766
|
+
*/
|
|
7767
|
+
reason: string().nullable(),
|
|
7768
|
+
/** Deferral attempts this birth used. 0 = decided on its first look. */
|
|
7769
|
+
attempts: number().int(),
|
|
7770
|
+
/** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
|
|
7771
|
+
deferredForMs: number().int(),
|
|
7772
|
+
/**
|
|
7773
|
+
* THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
|
|
7774
|
+
*
|
|
7775
|
+
* `true` when the frame the verdict was taken on carried no matched
|
|
7776
|
+
* detection for this track — the tracker was coasting a frozen box and the
|
|
7777
|
+
* subject was not observed. The deferred-birth re-offer pulls the candidate
|
|
7778
|
+
* straight out of `result.tracked` without checking, so this is reachable
|
|
7779
|
+
* today; the question is the RATE, per camera, and whether refusing those
|
|
7780
|
+
* frames would have cost real tracks (cross-read against `verdict` and
|
|
7781
|
+
* `decidedByBirthEvidence`).
|
|
7782
|
+
*/
|
|
7783
|
+
decidedOnCoastedFrame: boolean(),
|
|
7784
|
+
/** Were D379 birth-instant pixels in hand when this candidate was submitted? */
|
|
7785
|
+
birthEvidenceAvailable: boolean(),
|
|
7786
|
+
/**
|
|
7787
|
+
* Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
|
|
7788
|
+
* deciding are different: the carried crop is confirm-only, so a candidate
|
|
7789
|
+
* can hold evidence, be found inconclusive on it, and be decided by a native
|
|
7790
|
+
* crop of a later instant. A coasted decision backed by carried evidence is
|
|
7791
|
+
* a real observation of the birth instant; one without it is not.
|
|
7792
|
+
*/
|
|
7793
|
+
decidedByBirthEvidence: boolean(),
|
|
7794
|
+
/** Best class-compatible crop score, or `null` when nothing compatible was
|
|
7795
|
+
* found — deliberately not 0, which would be a measurement that never was. */
|
|
7796
|
+
bestScore: number().nullable(),
|
|
7797
|
+
/** The bar this candidate actually faced (the phantom-cell hook may raise it). */
|
|
7798
|
+
appliedMinConfidence: number().nullable(),
|
|
7799
|
+
/**
|
|
7800
|
+
* The track's own `firstSeen` — the candidate's first frame, which is where
|
|
7801
|
+
* the timeline starts. `null` for a suppressed birth, which has no track.
|
|
7802
|
+
*/
|
|
7803
|
+
firstSeen: number().int().nullable(),
|
|
7804
|
+
/**
|
|
7805
|
+
* The device's most recent motion RISING EDGE at the moment of the decision,
|
|
7806
|
+
* or `null` when there is none, it is older than
|
|
7807
|
+
* {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
|
|
7808
|
+
*/
|
|
7809
|
+
motionOnsetAt: number().int().nullable(),
|
|
7810
|
+
/**
|
|
7811
|
+
* `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
|
|
7812
|
+
* AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
|
|
7813
|
+
*
|
|
7814
|
+
* **Why motion onset and not something else.** Two other proxies were
|
|
7815
|
+
* considered and rejected:
|
|
7816
|
+
* - *the recording/pipeline session start*: for a camera on
|
|
7817
|
+
* `detectionMode: 'always'` the session opens at process start, hours
|
|
7818
|
+
* before any subject. It measures nothing.
|
|
7819
|
+
* - *the first detection on the device in this burst*: CIRCULAR. A track's
|
|
7820
|
+
* `firstSeen` IS the first detection of that object, so for the track that
|
|
7821
|
+
* OPENS a burst — the only one the operator is complaining about — the two
|
|
7822
|
+
* are the same instant and the latency is 0 by construction.
|
|
7823
|
+
* Motion onset is the only in-process signal produced by a DIFFERENT
|
|
7824
|
+
* mechanism from the object detector, so it is the only one that can precede
|
|
7825
|
+
* it. It is also already maintained per-device at frame rate on this very
|
|
7826
|
+
* node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
|
|
7827
|
+
* it free — and, decisively, the frame path and the motion path are gated to
|
|
7828
|
+
* the SAME designated post-processing node, so the mirror is never empty for
|
|
7829
|
+
* a camera whose births land here.
|
|
7830
|
+
*
|
|
7831
|
+
* **Error bars, all of them.**
|
|
7832
|
+
* 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
|
|
7833
|
+
* wall or a branch, and only later joined by the person, OVERSTATES the
|
|
7834
|
+
* latency without bound. Mitigated, never removed, by
|
|
7835
|
+
* {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
|
|
7836
|
+
* candidate for "this burst is this subject", and even then it is a
|
|
7837
|
+
* candidate, not a fact.
|
|
7838
|
+
* 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
|
|
7839
|
+
* intensity threshold. A subject entering slowly at the far edge of the
|
|
7840
|
+
* frame can clear the detector's confidence floor BEFORE it clears the
|
|
7841
|
+
* motion floor, making this negative. Negatives are stored as-is and
|
|
7842
|
+
* never clamped — clamping would fabricate the distribution's left tail,
|
|
7843
|
+
* which is the half that says the proxy is unreliable.
|
|
7844
|
+
* 3. *Onboard motion carries firmware latency of unknown, per-model offset*
|
|
7845
|
+
* (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
|
|
7846
|
+
* therefore comparable WITHIN a camera and not across cameras of
|
|
7847
|
+
* different motion sources. The motion source is deliberately not copied
|
|
7848
|
+
* here — it belongs to the addon that owns the device (D224) and this is
|
|
7849
|
+
* a write on the frame path — so group by `deviceId`, which is how the
|
|
7850
|
+
* question is always asked anyway.
|
|
7851
|
+
* 4. *Continuous motion.* On a busy scene the burst never closes and the
|
|
7852
|
+
* onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
|
|
7853
|
+
* past it this is `null`.
|
|
7854
|
+
* 5. *No motion signal at all* — analyzer off, onboard-only camera not
|
|
7855
|
+
* reporting, or nothing since boot: `null`. Which is the truth about a
|
|
7856
|
+
* camera nobody has a reference instant for.
|
|
7857
|
+
*
|
|
7858
|
+
* So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
|
|
7859
|
+
* as such. It is not a per-track fact and must never be shown as one.
|
|
7860
|
+
*/
|
|
7861
|
+
birthLatencyMs: number().int().nullable(),
|
|
7862
|
+
/**
|
|
7863
|
+
* How many births this device has already decided since that motion onset.
|
|
7864
|
+
* 0 = the first, i.e. the only index at which the burst plausibly belongs to
|
|
7865
|
+
* this subject. `null` when there is no usable onset.
|
|
7866
|
+
*/
|
|
7867
|
+
birthIndexInBurst: number().int().nullable()
|
|
7868
|
+
});
|
|
7869
|
+
/** Query input for `listBirthDecisions` — newest first, one camera or all. */
|
|
7870
|
+
var BirthDecisionQueryInputSchema = object({
|
|
7871
|
+
/** Restrict to a single camera; omit for every row. */
|
|
7872
|
+
deviceId: number().int().optional(),
|
|
7873
|
+
/** Only decisions at or after this epoch ms. */
|
|
7874
|
+
since: number().int().optional(),
|
|
7875
|
+
/** Restrict to one verdict — the miss rate is read one population at a time. */
|
|
7876
|
+
verdict: BirthDecisionVerdictSchema.optional(),
|
|
7877
|
+
/** Max rows returned, newest-first. */
|
|
7878
|
+
limit: number().int().min(1).max(5e3).optional()
|
|
7879
|
+
});
|
|
7729
7880
|
/** One archived note — the operator's words plus enough context to find what
|
|
7730
7881
|
* they were looking at, after the track itself is gone. */
|
|
7731
7882
|
var ArchivedDebugNoteSchema = object({
|
|
@@ -20137,7 +20288,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20137
20288
|
deviceId: number(),
|
|
20138
20289
|
trackId: string(),
|
|
20139
20290
|
flags: TrackFlagsPatchSchema
|
|
20140
|
-
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
20291
|
+
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
20141
20292
|
kind: "query",
|
|
20142
20293
|
auth: "admin"
|
|
20143
20294
|
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
@@ -20579,6 +20730,22 @@ var occupancyRecheckFramesField = {
|
|
|
20579
20730
|
step: 1
|
|
20580
20731
|
};
|
|
20581
20732
|
/**
|
|
20733
|
+
* Frames one PRE-ROLL catch-up burst may send to inference at session open.
|
|
20734
|
+
*
|
|
20735
|
+
* The default of 12 over a ~4 s retained window is one frame per ~333 ms of
|
|
20736
|
+
* footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
|
|
20737
|
+
* fleet measures — one-shot, and only ever taken while a permit would still be
|
|
20738
|
+
* spare for live. `0` turns the burst off entirely (the history is still
|
|
20739
|
+
* decoded, because that is how the dial reaches a decodable GOP, and is then
|
|
20740
|
+
* discarded — the pre-D411 behaviour).
|
|
20741
|
+
*/
|
|
20742
|
+
var preRollInferenceFramesField = {
|
|
20743
|
+
min: 0,
|
|
20744
|
+
max: 30,
|
|
20745
|
+
default: 12,
|
|
20746
|
+
step: 1
|
|
20747
|
+
};
|
|
20748
|
+
/**
|
|
20582
20749
|
* Source enum for motion signals fed to the runner. Extensible — add
|
|
20583
20750
|
* new variants here when new motion-trigger paths are wired in
|
|
20584
20751
|
* (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
|
|
@@ -20819,6 +20986,31 @@ var RunnerCameraConfigSchema = object({
|
|
|
20819
20986
|
* to every occupancy rule until something moved in front of it. The churn is
|
|
20820
20987
|
* now paid on the interval instead — see `occupancyRecheckSecField`.
|
|
20821
20988
|
*/
|
|
20989
|
+
/**
|
|
20990
|
+
* Infer the session's PRE-ROLL — the retained history the restreamer replays
|
|
20991
|
+
* at session open — instead of decoding it and throwing it away.
|
|
20992
|
+
*
|
|
20993
|
+
* DEFAULT `true`, and the default is the argument. This is not a new
|
|
20994
|
+
* capability being offered cautiously: the pre-roll is ALREADY requested,
|
|
20995
|
+
* already served, already decoded and already paid for on every on-motion
|
|
20996
|
+
* detection session that asks for history. What shipped was a last-moment
|
|
20997
|
+
* discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
|
|
20998
|
+
* arriving inside a few hundred ms of wall clock looks to it like one frame's
|
|
20999
|
+
* worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
|
|
21000
|
+
* recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
|
|
21001
|
+
* 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
|
|
21002
|
+
* was decoded, and was freed.
|
|
21003
|
+
*
|
|
21004
|
+
* Shipping that as opt-in would ship the bug: an operator cannot discover a
|
|
21005
|
+
* setting whose absence looks exactly like a camera that noticed the cyclist
|
|
21006
|
+
* late. What makes ON safe is not a switch but the BOUND —
|
|
21007
|
+
* `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
|
|
21008
|
+
* the last inference permit — so the switch exists for the camera where the
|
|
21009
|
+
* history is worthless (a doorbell whose subject is always already at the
|
|
21010
|
+
* door), not as a hedge against the feature.
|
|
21011
|
+
*/
|
|
21012
|
+
preRollInferenceEnabled: boolean().default(true),
|
|
21013
|
+
preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
|
|
20822
21014
|
occupancyRecheckEnabled: boolean().default(true),
|
|
20823
21015
|
occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
|
|
20824
21016
|
occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
|
|
@@ -20847,7 +21039,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20847
21039
|
*/
|
|
20848
21040
|
inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
|
|
20849
21041
|
});
|
|
20850
|
-
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;
|
|
21042
|
+
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;
|
|
20851
21043
|
/**
|
|
20852
21044
|
* Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
|
|
20853
21045
|
* load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
|
|
@@ -37267,6 +37459,12 @@ Object.freeze({
|
|
|
37267
37459
|
addonId: null,
|
|
37268
37460
|
access: "view"
|
|
37269
37461
|
},
|
|
37462
|
+
"pipelineAnalytics.listBirthDecisions": {
|
|
37463
|
+
capName: "pipeline-analytics",
|
|
37464
|
+
capScope: "device",
|
|
37465
|
+
addonId: null,
|
|
37466
|
+
access: "view"
|
|
37467
|
+
},
|
|
37270
37468
|
"pipelineAnalytics.listEventKinds": {
|
|
37271
37469
|
capName: "pipeline-analytics",
|
|
37272
37470
|
capScope: "device",
|
|
@@ -41059,6 +41257,11 @@ Object.freeze({
|
|
|
41059
41257
|
form: "single",
|
|
41060
41258
|
optional: true
|
|
41061
41259
|
}],
|
|
41260
|
+
"pipelineAnalytics.listBirthDecisions": [{
|
|
41261
|
+
name: "deviceId",
|
|
41262
|
+
form: "single",
|
|
41263
|
+
optional: true
|
|
41264
|
+
}],
|
|
41062
41265
|
"pipelineAnalytics.listEventKinds": [{
|
|
41063
41266
|
name: "deviceId",
|
|
41064
41267
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -7703,6 +7703,157 @@ var CameraSwitchGroupSchema = object({
|
|
|
7703
7703
|
*/
|
|
7704
7704
|
var DETECTION_PIPELINE_CAP_NAME = "detection-pipeline";
|
|
7705
7705
|
var AUDIO_ANALYSIS_CAP_NAME = "audio-analysis";
|
|
7706
|
+
/**
|
|
7707
|
+
* What the gate decided about a birth, from the CALLER's point of view.
|
|
7708
|
+
*
|
|
7709
|
+
* Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
|
|
7710
|
+
* at all — it is a deferral, and the row is written when the deferral ENDS.
|
|
7711
|
+
* The third member is the one the gate's own type cannot express, because
|
|
7712
|
+
* exhaustion is a property of how long the caller waited.
|
|
7713
|
+
*/
|
|
7714
|
+
var BirthDecisionVerdictSchema = _enum([
|
|
7715
|
+
"confirmed",
|
|
7716
|
+
"suppressed",
|
|
7717
|
+
"exhausted-fallback"
|
|
7718
|
+
]);
|
|
7719
|
+
/** One birth decision, as it is kept. */
|
|
7720
|
+
var BirthDecisionRecordSchema = object({
|
|
7721
|
+
id: string(),
|
|
7722
|
+
/** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
|
|
7723
|
+
at: number().int(),
|
|
7724
|
+
/** The camera. Required: every question here is asked per-camera. */
|
|
7725
|
+
deviceId: number().int(),
|
|
7726
|
+
/**
|
|
7727
|
+
* The track the decision was about. PROVENANCE, not ownership — a suppressed
|
|
7728
|
+
* birth has no track at all, and a confirmed one is expected to age out long
|
|
7729
|
+
* before this row does. Named `sourceTrackId` so the retention model's
|
|
7730
|
+
* ownership derivation (`collection-classification.ts`, which keys on a
|
|
7731
|
+
* column literally called `trackId`) cannot reach it.
|
|
7732
|
+
*/
|
|
7733
|
+
sourceTrackId: string(),
|
|
7734
|
+
/** The candidate's claimed class. The miss rate is asked per class too. */
|
|
7735
|
+
className: string(),
|
|
7736
|
+
verdict: BirthDecisionVerdictSchema,
|
|
7737
|
+
/**
|
|
7738
|
+
* The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
|
|
7739
|
+
* `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
|
|
7740
|
+
* when the gate is DISABLED and every birth is waved through. `null` is not
|
|
7741
|
+
* "unknown": it says the gate took no measurement because it was off, which
|
|
7742
|
+
* is a different population and must never be averaged in with the rest.
|
|
7743
|
+
*/
|
|
7744
|
+
reason: string().nullable(),
|
|
7745
|
+
/** Deferral attempts this birth used. 0 = decided on its first look. */
|
|
7746
|
+
attempts: number().int(),
|
|
7747
|
+
/** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
|
|
7748
|
+
deferredForMs: number().int(),
|
|
7749
|
+
/**
|
|
7750
|
+
* THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
|
|
7751
|
+
*
|
|
7752
|
+
* `true` when the frame the verdict was taken on carried no matched
|
|
7753
|
+
* detection for this track — the tracker was coasting a frozen box and the
|
|
7754
|
+
* subject was not observed. The deferred-birth re-offer pulls the candidate
|
|
7755
|
+
* straight out of `result.tracked` without checking, so this is reachable
|
|
7756
|
+
* today; the question is the RATE, per camera, and whether refusing those
|
|
7757
|
+
* frames would have cost real tracks (cross-read against `verdict` and
|
|
7758
|
+
* `decidedByBirthEvidence`).
|
|
7759
|
+
*/
|
|
7760
|
+
decidedOnCoastedFrame: boolean(),
|
|
7761
|
+
/** Were D379 birth-instant pixels in hand when this candidate was submitted? */
|
|
7762
|
+
birthEvidenceAvailable: boolean(),
|
|
7763
|
+
/**
|
|
7764
|
+
* Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
|
|
7765
|
+
* deciding are different: the carried crop is confirm-only, so a candidate
|
|
7766
|
+
* can hold evidence, be found inconclusive on it, and be decided by a native
|
|
7767
|
+
* crop of a later instant. A coasted decision backed by carried evidence is
|
|
7768
|
+
* a real observation of the birth instant; one without it is not.
|
|
7769
|
+
*/
|
|
7770
|
+
decidedByBirthEvidence: boolean(),
|
|
7771
|
+
/** Best class-compatible crop score, or `null` when nothing compatible was
|
|
7772
|
+
* found — deliberately not 0, which would be a measurement that never was. */
|
|
7773
|
+
bestScore: number().nullable(),
|
|
7774
|
+
/** The bar this candidate actually faced (the phantom-cell hook may raise it). */
|
|
7775
|
+
appliedMinConfidence: number().nullable(),
|
|
7776
|
+
/**
|
|
7777
|
+
* The track's own `firstSeen` — the candidate's first frame, which is where
|
|
7778
|
+
* the timeline starts. `null` for a suppressed birth, which has no track.
|
|
7779
|
+
*/
|
|
7780
|
+
firstSeen: number().int().nullable(),
|
|
7781
|
+
/**
|
|
7782
|
+
* The device's most recent motion RISING EDGE at the moment of the decision,
|
|
7783
|
+
* or `null` when there is none, it is older than
|
|
7784
|
+
* {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
|
|
7785
|
+
*/
|
|
7786
|
+
motionOnsetAt: number().int().nullable(),
|
|
7787
|
+
/**
|
|
7788
|
+
* `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
|
|
7789
|
+
* AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
|
|
7790
|
+
*
|
|
7791
|
+
* **Why motion onset and not something else.** Two other proxies were
|
|
7792
|
+
* considered and rejected:
|
|
7793
|
+
* - *the recording/pipeline session start*: for a camera on
|
|
7794
|
+
* `detectionMode: 'always'` the session opens at process start, hours
|
|
7795
|
+
* before any subject. It measures nothing.
|
|
7796
|
+
* - *the first detection on the device in this burst*: CIRCULAR. A track's
|
|
7797
|
+
* `firstSeen` IS the first detection of that object, so for the track that
|
|
7798
|
+
* OPENS a burst — the only one the operator is complaining about — the two
|
|
7799
|
+
* are the same instant and the latency is 0 by construction.
|
|
7800
|
+
* Motion onset is the only in-process signal produced by a DIFFERENT
|
|
7801
|
+
* mechanism from the object detector, so it is the only one that can precede
|
|
7802
|
+
* it. It is also already maintained per-device at frame rate on this very
|
|
7803
|
+
* node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
|
|
7804
|
+
* it free — and, decisively, the frame path and the motion path are gated to
|
|
7805
|
+
* the SAME designated post-processing node, so the mirror is never empty for
|
|
7806
|
+
* a camera whose births land here.
|
|
7807
|
+
*
|
|
7808
|
+
* **Error bars, all of them.**
|
|
7809
|
+
* 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
|
|
7810
|
+
* wall or a branch, and only later joined by the person, OVERSTATES the
|
|
7811
|
+
* latency without bound. Mitigated, never removed, by
|
|
7812
|
+
* {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
|
|
7813
|
+
* candidate for "this burst is this subject", and even then it is a
|
|
7814
|
+
* candidate, not a fact.
|
|
7815
|
+
* 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
|
|
7816
|
+
* intensity threshold. A subject entering slowly at the far edge of the
|
|
7817
|
+
* frame can clear the detector's confidence floor BEFORE it clears the
|
|
7818
|
+
* motion floor, making this negative. Negatives are stored as-is and
|
|
7819
|
+
* never clamped — clamping would fabricate the distribution's left tail,
|
|
7820
|
+
* which is the half that says the proxy is unreliable.
|
|
7821
|
+
* 3. *Onboard motion carries firmware latency of unknown, per-model offset*
|
|
7822
|
+
* (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
|
|
7823
|
+
* therefore comparable WITHIN a camera and not across cameras of
|
|
7824
|
+
* different motion sources. The motion source is deliberately not copied
|
|
7825
|
+
* here — it belongs to the addon that owns the device (D224) and this is
|
|
7826
|
+
* a write on the frame path — so group by `deviceId`, which is how the
|
|
7827
|
+
* question is always asked anyway.
|
|
7828
|
+
* 4. *Continuous motion.* On a busy scene the burst never closes and the
|
|
7829
|
+
* onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
|
|
7830
|
+
* past it this is `null`.
|
|
7831
|
+
* 5. *No motion signal at all* — analyzer off, onboard-only camera not
|
|
7832
|
+
* reporting, or nothing since boot: `null`. Which is the truth about a
|
|
7833
|
+
* camera nobody has a reference instant for.
|
|
7834
|
+
*
|
|
7835
|
+
* So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
|
|
7836
|
+
* as such. It is not a per-track fact and must never be shown as one.
|
|
7837
|
+
*/
|
|
7838
|
+
birthLatencyMs: number().int().nullable(),
|
|
7839
|
+
/**
|
|
7840
|
+
* How many births this device has already decided since that motion onset.
|
|
7841
|
+
* 0 = the first, i.e. the only index at which the burst plausibly belongs to
|
|
7842
|
+
* this subject. `null` when there is no usable onset.
|
|
7843
|
+
*/
|
|
7844
|
+
birthIndexInBurst: number().int().nullable()
|
|
7845
|
+
});
|
|
7846
|
+
/** Query input for `listBirthDecisions` — newest first, one camera or all. */
|
|
7847
|
+
var BirthDecisionQueryInputSchema = object({
|
|
7848
|
+
/** Restrict to a single camera; omit for every row. */
|
|
7849
|
+
deviceId: number().int().optional(),
|
|
7850
|
+
/** Only decisions at or after this epoch ms. */
|
|
7851
|
+
since: number().int().optional(),
|
|
7852
|
+
/** Restrict to one verdict — the miss rate is read one population at a time. */
|
|
7853
|
+
verdict: BirthDecisionVerdictSchema.optional(),
|
|
7854
|
+
/** Max rows returned, newest-first. */
|
|
7855
|
+
limit: number().int().min(1).max(5e3).optional()
|
|
7856
|
+
});
|
|
7706
7857
|
/** One archived note — the operator's words plus enough context to find what
|
|
7707
7858
|
* they were looking at, after the track itself is gone. */
|
|
7708
7859
|
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
|
|
@@ -37244,6 +37436,12 @@ Object.freeze({
|
|
|
37244
37436
|
addonId: null,
|
|
37245
37437
|
access: "view"
|
|
37246
37438
|
},
|
|
37439
|
+
"pipelineAnalytics.listBirthDecisions": {
|
|
37440
|
+
capName: "pipeline-analytics",
|
|
37441
|
+
capScope: "device",
|
|
37442
|
+
addonId: null,
|
|
37443
|
+
access: "view"
|
|
37444
|
+
},
|
|
37247
37445
|
"pipelineAnalytics.listEventKinds": {
|
|
37248
37446
|
capName: "pipeline-analytics",
|
|
37249
37447
|
capScope: "device",
|
|
@@ -41036,6 +41234,11 @@ Object.freeze({
|
|
|
41036
41234
|
form: "single",
|
|
41037
41235
|
optional: true
|
|
41038
41236
|
}],
|
|
41237
|
+
"pipelineAnalytics.listBirthDecisions": [{
|
|
41238
|
+
name: "deviceId",
|
|
41239
|
+
form: "single",
|
|
41240
|
+
optional: true
|
|
41241
|
+
}],
|
|
41039
41242
|
"pipelineAnalytics.listEventKinds": [{
|
|
41040
41243
|
name: "deviceId",
|
|
41041
41244
|
form: "single",
|