@camstack/addon-provider-petkit 0.2.86 → 0.2.88
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 +203 -1
- package/dist/addon.mjs +203 -1
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -8730,6 +8730,186 @@ var CameraSwitchGroupSchema = object({
|
|
|
8730
8730
|
fetchedAt: number()
|
|
8731
8731
|
});
|
|
8732
8732
|
/**
|
|
8733
|
+
* What the gate decided about a birth, from the CALLER's point of view.
|
|
8734
|
+
*
|
|
8735
|
+
* Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
|
|
8736
|
+
* at all — it is a deferral, and the row is written when the deferral ENDS.
|
|
8737
|
+
* The third member is the one the gate's own type cannot express, because
|
|
8738
|
+
* exhaustion is a property of how long the caller waited.
|
|
8739
|
+
*/
|
|
8740
|
+
var BirthDecisionVerdictSchema = _enum([
|
|
8741
|
+
"confirmed",
|
|
8742
|
+
"suppressed",
|
|
8743
|
+
"exhausted-fallback"
|
|
8744
|
+
]);
|
|
8745
|
+
/** One birth decision, as it is kept. */
|
|
8746
|
+
var BirthDecisionRecordSchema = object({
|
|
8747
|
+
id: string(),
|
|
8748
|
+
/** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
|
|
8749
|
+
at: number().int(),
|
|
8750
|
+
/** The camera. Required: every question here is asked per-camera. */
|
|
8751
|
+
deviceId: number().int(),
|
|
8752
|
+
/**
|
|
8753
|
+
* The track the decision was about. PROVENANCE, not ownership — a suppressed
|
|
8754
|
+
* birth has no track at all, and a confirmed one is expected to age out long
|
|
8755
|
+
* before this row does. Named `sourceTrackId` so the retention model's
|
|
8756
|
+
* ownership derivation (`collection-classification.ts`, which keys on a
|
|
8757
|
+
* column literally called `trackId`) cannot reach it.
|
|
8758
|
+
*/
|
|
8759
|
+
sourceTrackId: string(),
|
|
8760
|
+
/** The candidate's claimed class. The miss rate is asked per class too. */
|
|
8761
|
+
className: string(),
|
|
8762
|
+
verdict: BirthDecisionVerdictSchema,
|
|
8763
|
+
/**
|
|
8764
|
+
* The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
|
|
8765
|
+
* `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
|
|
8766
|
+
* when the gate is DISABLED and every birth is waved through. `null` is not
|
|
8767
|
+
* "unknown": it says the gate took no measurement because it was off, which
|
|
8768
|
+
* is a different population and must never be averaged in with the rest.
|
|
8769
|
+
*/
|
|
8770
|
+
reason: string().nullable(),
|
|
8771
|
+
/** Deferral attempts this birth used. 0 = decided on its first look. */
|
|
8772
|
+
attempts: number().int(),
|
|
8773
|
+
/** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
|
|
8774
|
+
deferredForMs: number().int(),
|
|
8775
|
+
/**
|
|
8776
|
+
* THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
|
|
8777
|
+
*
|
|
8778
|
+
* `true` when the frame the verdict was taken on carried no matched
|
|
8779
|
+
* detection for this track — the tracker was coasting a frozen box and the
|
|
8780
|
+
* subject was not observed. The deferred-birth re-offer pulls the candidate
|
|
8781
|
+
* straight out of `result.tracked` without checking, so this is reachable
|
|
8782
|
+
* today; the question is the RATE, per camera, and whether refusing those
|
|
8783
|
+
* frames would have cost real tracks (cross-read against `verdict` and
|
|
8784
|
+
* `decidedByBirthEvidence`).
|
|
8785
|
+
*/
|
|
8786
|
+
decidedOnCoastedFrame: boolean(),
|
|
8787
|
+
/** Were D379 birth-instant pixels in hand when this candidate was submitted? */
|
|
8788
|
+
birthEvidenceAvailable: boolean(),
|
|
8789
|
+
/**
|
|
8790
|
+
* Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
|
|
8791
|
+
* deciding are different: the carried crop is confirm-only, so a candidate
|
|
8792
|
+
* can hold evidence, be found inconclusive on it, and be decided by a native
|
|
8793
|
+
* crop of a later instant. A coasted decision backed by carried evidence is
|
|
8794
|
+
* a real observation of the birth instant; one without it is not.
|
|
8795
|
+
*/
|
|
8796
|
+
decidedByBirthEvidence: boolean(),
|
|
8797
|
+
/** Best class-compatible crop score, or `null` when nothing compatible was
|
|
8798
|
+
* found — deliberately not 0, which would be a measurement that never was. */
|
|
8799
|
+
bestScore: number().nullable(),
|
|
8800
|
+
/** The bar this candidate actually faced (the phantom-cell hook may raise it). */
|
|
8801
|
+
appliedMinConfidence: number().nullable(),
|
|
8802
|
+
/**
|
|
8803
|
+
* The track's own `firstSeen` — the candidate's first frame, which is where
|
|
8804
|
+
* the timeline starts. `null` for a suppressed birth, which has no track.
|
|
8805
|
+
*/
|
|
8806
|
+
firstSeen: number().int().nullable(),
|
|
8807
|
+
/**
|
|
8808
|
+
* The device's most recent motion RISING EDGE at the moment of the decision,
|
|
8809
|
+
* or `null` when there is none, it is older than
|
|
8810
|
+
* {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
|
|
8811
|
+
*/
|
|
8812
|
+
motionOnsetAt: number().int().nullable(),
|
|
8813
|
+
/**
|
|
8814
|
+
* `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
|
|
8815
|
+
* AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
|
|
8816
|
+
*
|
|
8817
|
+
* **Why motion onset and not something else.** Two other proxies were
|
|
8818
|
+
* considered and rejected:
|
|
8819
|
+
* - *the recording/pipeline session start*: for a camera on
|
|
8820
|
+
* `detectionMode: 'always'` the session opens at process start, hours
|
|
8821
|
+
* before any subject. It measures nothing.
|
|
8822
|
+
* - *the first detection on the device in this burst*: CIRCULAR. A track's
|
|
8823
|
+
* `firstSeen` IS the first detection of that object, so for the track that
|
|
8824
|
+
* OPENS a burst — the only one the operator is complaining about — the two
|
|
8825
|
+
* are the same instant and the latency is 0 by construction.
|
|
8826
|
+
* Motion onset is the only in-process signal produced by a DIFFERENT
|
|
8827
|
+
* mechanism from the object detector, so it is the only one that can precede
|
|
8828
|
+
* it. It is also already maintained per-device at frame rate on this very
|
|
8829
|
+
* node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
|
|
8830
|
+
* it free — and, decisively, the frame path and the motion path are gated to
|
|
8831
|
+
* the SAME designated post-processing node, so the mirror is never empty for
|
|
8832
|
+
* a camera whose births land here.
|
|
8833
|
+
*
|
|
8834
|
+
* **Error bars, all of them.**
|
|
8835
|
+
* 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
|
|
8836
|
+
* wall or a branch, and only later joined by the person, OVERSTATES the
|
|
8837
|
+
* latency without bound. Mitigated, never removed, by
|
|
8838
|
+
* {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
|
|
8839
|
+
* candidate for "this burst is this subject", and even then it is a
|
|
8840
|
+
* candidate, not a fact.
|
|
8841
|
+
* 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
|
|
8842
|
+
* intensity threshold. A subject entering slowly at the far edge of the
|
|
8843
|
+
* frame can clear the detector's confidence floor BEFORE it clears the
|
|
8844
|
+
* motion floor, making this negative. Negatives are stored as-is and
|
|
8845
|
+
* never clamped — clamping would fabricate the distribution's left tail,
|
|
8846
|
+
* which is the half that says the proxy is unreliable.
|
|
8847
|
+
* 3. *Onboard motion carries firmware latency of unknown, per-model offset*
|
|
8848
|
+
* (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
|
|
8849
|
+
* therefore comparable WITHIN a camera and not across cameras of
|
|
8850
|
+
* different motion sources. The motion source is deliberately not copied
|
|
8851
|
+
* here — it belongs to the addon that owns the device (D224) and this is
|
|
8852
|
+
* a write on the frame path — so group by `deviceId`, which is how the
|
|
8853
|
+
* question is always asked anyway.
|
|
8854
|
+
* 4. *Continuous motion.* On a busy scene the burst never closes and the
|
|
8855
|
+
* onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
|
|
8856
|
+
* past it this is `null`.
|
|
8857
|
+
* 5. *No motion signal at all* — analyzer off, onboard-only camera not
|
|
8858
|
+
* reporting, or nothing since boot: `null`. Which is the truth about a
|
|
8859
|
+
* camera nobody has a reference instant for.
|
|
8860
|
+
*
|
|
8861
|
+
* So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
|
|
8862
|
+
* as such. It is not a per-track fact and must never be shown as one.
|
|
8863
|
+
*/
|
|
8864
|
+
birthLatencyMs: number().int().nullable(),
|
|
8865
|
+
/**
|
|
8866
|
+
* How many births this device has already decided since that motion onset.
|
|
8867
|
+
* 0 = the first, i.e. the only index at which the burst plausibly belongs to
|
|
8868
|
+
* this subject. `null` when there is no usable onset.
|
|
8869
|
+
*/
|
|
8870
|
+
birthIndexInBurst: number().int().nullable()
|
|
8871
|
+
});
|
|
8872
|
+
/** Query input for `listBirthDecisions` — newest first, one camera or all. */
|
|
8873
|
+
var BirthDecisionQueryInputSchema = object({
|
|
8874
|
+
/** Restrict to a single camera; omit for every row. */
|
|
8875
|
+
deviceId: number().int().optional(),
|
|
8876
|
+
/** Only decisions at or after this epoch ms. */
|
|
8877
|
+
since: number().int().optional(),
|
|
8878
|
+
/** Restrict to one verdict — the miss rate is read one population at a time. */
|
|
8879
|
+
verdict: BirthDecisionVerdictSchema.optional(),
|
|
8880
|
+
/** Max rows returned, newest-first. */
|
|
8881
|
+
limit: number().int().min(1).max(5e3).optional()
|
|
8882
|
+
});
|
|
8883
|
+
/** One archived note — the operator's words plus enough context to find what
|
|
8884
|
+
* they were looking at, after the track itself is gone. */
|
|
8885
|
+
var ArchivedDebugNoteSchema = object({
|
|
8886
|
+
/** Archive row id. Derived from `(sourceTrackId, note)`, so re-archiving the
|
|
8887
|
+
* same sentence about the same track lands on the row already there. */
|
|
8888
|
+
id: string(),
|
|
8889
|
+
/** The operator's own words, verbatim. */
|
|
8890
|
+
note: string(),
|
|
8891
|
+
/** The camera. Required — every question here is asked per-camera. */
|
|
8892
|
+
deviceId: number().int(),
|
|
8893
|
+
/** The track the note was written on. PROVENANCE, not ownership: the track
|
|
8894
|
+
* is expected to be gone, and this row is not a reference to it. */
|
|
8895
|
+
sourceTrackId: string(),
|
|
8896
|
+
/** Epoch ms the note was moved here, i.e. when the operator reviewed it. */
|
|
8897
|
+
archivedAt: number().int(),
|
|
8898
|
+
/** The track's `firstSeen`, when the row still knew it; `null` otherwise. */
|
|
8899
|
+
trackStartedAt: number().int().nullable(),
|
|
8900
|
+
/** The track's detector class (`person`, `car`, …); `null` when unknown. */
|
|
8901
|
+
trackClass: string().nullable(),
|
|
8902
|
+
/** The track's display label at review time; `null` when it had none. */
|
|
8903
|
+
trackLabel: string().nullable()
|
|
8904
|
+
});
|
|
8905
|
+
/** Query input for `listArchivedDebugNotes` — newest first, one camera or all. */
|
|
8906
|
+
var ArchivedDebugNoteQueryInputSchema = object({
|
|
8907
|
+
/** Restrict to a single camera; omit for every row. */
|
|
8908
|
+
deviceId: number().int().optional(),
|
|
8909
|
+
/** Max rows returned, newest-first. */
|
|
8910
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
8911
|
+
});
|
|
8912
|
+
/**
|
|
8733
8913
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
8734
8914
|
* recordings and events management surfaces.
|
|
8735
8915
|
*
|
|
@@ -21209,7 +21389,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21209
21389
|
deviceId: number(),
|
|
21210
21390
|
trackId: string(),
|
|
21211
21391
|
flags: TrackFlagsPatchSchema
|
|
21212
|
-
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
21392
|
+
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
21213
21393
|
kind: "query",
|
|
21214
21394
|
auth: "admin"
|
|
21215
21395
|
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
@@ -38611,6 +38791,18 @@ Object.freeze({
|
|
|
38611
38791
|
addonId: null,
|
|
38612
38792
|
access: "view"
|
|
38613
38793
|
},
|
|
38794
|
+
"pipelineAnalytics.listArchivedDebugNotes": {
|
|
38795
|
+
capName: "pipeline-analytics",
|
|
38796
|
+
capScope: "device",
|
|
38797
|
+
addonId: null,
|
|
38798
|
+
access: "view"
|
|
38799
|
+
},
|
|
38800
|
+
"pipelineAnalytics.listBirthDecisions": {
|
|
38801
|
+
capName: "pipeline-analytics",
|
|
38802
|
+
capScope: "device",
|
|
38803
|
+
addonId: null,
|
|
38804
|
+
access: "view"
|
|
38805
|
+
},
|
|
38614
38806
|
"pipelineAnalytics.listEventKinds": {
|
|
38615
38807
|
capName: "pipeline-analytics",
|
|
38616
38808
|
capScope: "device",
|
|
@@ -42398,6 +42590,16 @@ Object.freeze({
|
|
|
42398
42590
|
form: "array",
|
|
42399
42591
|
optional: true
|
|
42400
42592
|
}],
|
|
42593
|
+
"pipelineAnalytics.listArchivedDebugNotes": [{
|
|
42594
|
+
name: "deviceId",
|
|
42595
|
+
form: "single",
|
|
42596
|
+
optional: true
|
|
42597
|
+
}],
|
|
42598
|
+
"pipelineAnalytics.listBirthDecisions": [{
|
|
42599
|
+
name: "deviceId",
|
|
42600
|
+
form: "single",
|
|
42601
|
+
optional: true
|
|
42602
|
+
}],
|
|
42401
42603
|
"pipelineAnalytics.listEventKinds": [{
|
|
42402
42604
|
name: "deviceId",
|
|
42403
42605
|
form: "single",
|
package/dist/addon.mjs
CHANGED
|
@@ -8729,6 +8729,186 @@ var CameraSwitchGroupSchema = object({
|
|
|
8729
8729
|
fetchedAt: number()
|
|
8730
8730
|
});
|
|
8731
8731
|
/**
|
|
8732
|
+
* What the gate decided about a birth, from the CALLER's point of view.
|
|
8733
|
+
*
|
|
8734
|
+
* Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
|
|
8735
|
+
* at all — it is a deferral, and the row is written when the deferral ENDS.
|
|
8736
|
+
* The third member is the one the gate's own type cannot express, because
|
|
8737
|
+
* exhaustion is a property of how long the caller waited.
|
|
8738
|
+
*/
|
|
8739
|
+
var BirthDecisionVerdictSchema = _enum([
|
|
8740
|
+
"confirmed",
|
|
8741
|
+
"suppressed",
|
|
8742
|
+
"exhausted-fallback"
|
|
8743
|
+
]);
|
|
8744
|
+
/** One birth decision, as it is kept. */
|
|
8745
|
+
var BirthDecisionRecordSchema = object({
|
|
8746
|
+
id: string(),
|
|
8747
|
+
/** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
|
|
8748
|
+
at: number().int(),
|
|
8749
|
+
/** The camera. Required: every question here is asked per-camera. */
|
|
8750
|
+
deviceId: number().int(),
|
|
8751
|
+
/**
|
|
8752
|
+
* The track the decision was about. PROVENANCE, not ownership — a suppressed
|
|
8753
|
+
* birth has no track at all, and a confirmed one is expected to age out long
|
|
8754
|
+
* before this row does. Named `sourceTrackId` so the retention model's
|
|
8755
|
+
* ownership derivation (`collection-classification.ts`, which keys on a
|
|
8756
|
+
* column literally called `trackId`) cannot reach it.
|
|
8757
|
+
*/
|
|
8758
|
+
sourceTrackId: string(),
|
|
8759
|
+
/** The candidate's claimed class. The miss rate is asked per class too. */
|
|
8760
|
+
className: string(),
|
|
8761
|
+
verdict: BirthDecisionVerdictSchema,
|
|
8762
|
+
/**
|
|
8763
|
+
* The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
|
|
8764
|
+
* `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
|
|
8765
|
+
* when the gate is DISABLED and every birth is waved through. `null` is not
|
|
8766
|
+
* "unknown": it says the gate took no measurement because it was off, which
|
|
8767
|
+
* is a different population and must never be averaged in with the rest.
|
|
8768
|
+
*/
|
|
8769
|
+
reason: string().nullable(),
|
|
8770
|
+
/** Deferral attempts this birth used. 0 = decided on its first look. */
|
|
8771
|
+
attempts: number().int(),
|
|
8772
|
+
/** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
|
|
8773
|
+
deferredForMs: number().int(),
|
|
8774
|
+
/**
|
|
8775
|
+
* THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
|
|
8776
|
+
*
|
|
8777
|
+
* `true` when the frame the verdict was taken on carried no matched
|
|
8778
|
+
* detection for this track — the tracker was coasting a frozen box and the
|
|
8779
|
+
* subject was not observed. The deferred-birth re-offer pulls the candidate
|
|
8780
|
+
* straight out of `result.tracked` without checking, so this is reachable
|
|
8781
|
+
* today; the question is the RATE, per camera, and whether refusing those
|
|
8782
|
+
* frames would have cost real tracks (cross-read against `verdict` and
|
|
8783
|
+
* `decidedByBirthEvidence`).
|
|
8784
|
+
*/
|
|
8785
|
+
decidedOnCoastedFrame: boolean(),
|
|
8786
|
+
/** Were D379 birth-instant pixels in hand when this candidate was submitted? */
|
|
8787
|
+
birthEvidenceAvailable: boolean(),
|
|
8788
|
+
/**
|
|
8789
|
+
* Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
|
|
8790
|
+
* deciding are different: the carried crop is confirm-only, so a candidate
|
|
8791
|
+
* can hold evidence, be found inconclusive on it, and be decided by a native
|
|
8792
|
+
* crop of a later instant. A coasted decision backed by carried evidence is
|
|
8793
|
+
* a real observation of the birth instant; one without it is not.
|
|
8794
|
+
*/
|
|
8795
|
+
decidedByBirthEvidence: boolean(),
|
|
8796
|
+
/** Best class-compatible crop score, or `null` when nothing compatible was
|
|
8797
|
+
* found — deliberately not 0, which would be a measurement that never was. */
|
|
8798
|
+
bestScore: number().nullable(),
|
|
8799
|
+
/** The bar this candidate actually faced (the phantom-cell hook may raise it). */
|
|
8800
|
+
appliedMinConfidence: number().nullable(),
|
|
8801
|
+
/**
|
|
8802
|
+
* The track's own `firstSeen` — the candidate's first frame, which is where
|
|
8803
|
+
* the timeline starts. `null` for a suppressed birth, which has no track.
|
|
8804
|
+
*/
|
|
8805
|
+
firstSeen: number().int().nullable(),
|
|
8806
|
+
/**
|
|
8807
|
+
* The device's most recent motion RISING EDGE at the moment of the decision,
|
|
8808
|
+
* or `null` when there is none, it is older than
|
|
8809
|
+
* {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
|
|
8810
|
+
*/
|
|
8811
|
+
motionOnsetAt: number().int().nullable(),
|
|
8812
|
+
/**
|
|
8813
|
+
* `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
|
|
8814
|
+
* AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
|
|
8815
|
+
*
|
|
8816
|
+
* **Why motion onset and not something else.** Two other proxies were
|
|
8817
|
+
* considered and rejected:
|
|
8818
|
+
* - *the recording/pipeline session start*: for a camera on
|
|
8819
|
+
* `detectionMode: 'always'` the session opens at process start, hours
|
|
8820
|
+
* before any subject. It measures nothing.
|
|
8821
|
+
* - *the first detection on the device in this burst*: CIRCULAR. A track's
|
|
8822
|
+
* `firstSeen` IS the first detection of that object, so for the track that
|
|
8823
|
+
* OPENS a burst — the only one the operator is complaining about — the two
|
|
8824
|
+
* are the same instant and the latency is 0 by construction.
|
|
8825
|
+
* Motion onset is the only in-process signal produced by a DIFFERENT
|
|
8826
|
+
* mechanism from the object detector, so it is the only one that can precede
|
|
8827
|
+
* it. It is also already maintained per-device at frame rate on this very
|
|
8828
|
+
* node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
|
|
8829
|
+
* it free — and, decisively, the frame path and the motion path are gated to
|
|
8830
|
+
* the SAME designated post-processing node, so the mirror is never empty for
|
|
8831
|
+
* a camera whose births land here.
|
|
8832
|
+
*
|
|
8833
|
+
* **Error bars, all of them.**
|
|
8834
|
+
* 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
|
|
8835
|
+
* wall or a branch, and only later joined by the person, OVERSTATES the
|
|
8836
|
+
* latency without bound. Mitigated, never removed, by
|
|
8837
|
+
* {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
|
|
8838
|
+
* candidate for "this burst is this subject", and even then it is a
|
|
8839
|
+
* candidate, not a fact.
|
|
8840
|
+
* 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
|
|
8841
|
+
* intensity threshold. A subject entering slowly at the far edge of the
|
|
8842
|
+
* frame can clear the detector's confidence floor BEFORE it clears the
|
|
8843
|
+
* motion floor, making this negative. Negatives are stored as-is and
|
|
8844
|
+
* never clamped — clamping would fabricate the distribution's left tail,
|
|
8845
|
+
* which is the half that says the proxy is unreliable.
|
|
8846
|
+
* 3. *Onboard motion carries firmware latency of unknown, per-model offset*
|
|
8847
|
+
* (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
|
|
8848
|
+
* therefore comparable WITHIN a camera and not across cameras of
|
|
8849
|
+
* different motion sources. The motion source is deliberately not copied
|
|
8850
|
+
* here — it belongs to the addon that owns the device (D224) and this is
|
|
8851
|
+
* a write on the frame path — so group by `deviceId`, which is how the
|
|
8852
|
+
* question is always asked anyway.
|
|
8853
|
+
* 4. *Continuous motion.* On a busy scene the burst never closes and the
|
|
8854
|
+
* onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
|
|
8855
|
+
* past it this is `null`.
|
|
8856
|
+
* 5. *No motion signal at all* — analyzer off, onboard-only camera not
|
|
8857
|
+
* reporting, or nothing since boot: `null`. Which is the truth about a
|
|
8858
|
+
* camera nobody has a reference instant for.
|
|
8859
|
+
*
|
|
8860
|
+
* So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
|
|
8861
|
+
* as such. It is not a per-track fact and must never be shown as one.
|
|
8862
|
+
*/
|
|
8863
|
+
birthLatencyMs: number().int().nullable(),
|
|
8864
|
+
/**
|
|
8865
|
+
* How many births this device has already decided since that motion onset.
|
|
8866
|
+
* 0 = the first, i.e. the only index at which the burst plausibly belongs to
|
|
8867
|
+
* this subject. `null` when there is no usable onset.
|
|
8868
|
+
*/
|
|
8869
|
+
birthIndexInBurst: number().int().nullable()
|
|
8870
|
+
});
|
|
8871
|
+
/** Query input for `listBirthDecisions` — newest first, one camera or all. */
|
|
8872
|
+
var BirthDecisionQueryInputSchema = object({
|
|
8873
|
+
/** Restrict to a single camera; omit for every row. */
|
|
8874
|
+
deviceId: number().int().optional(),
|
|
8875
|
+
/** Only decisions at or after this epoch ms. */
|
|
8876
|
+
since: number().int().optional(),
|
|
8877
|
+
/** Restrict to one verdict — the miss rate is read one population at a time. */
|
|
8878
|
+
verdict: BirthDecisionVerdictSchema.optional(),
|
|
8879
|
+
/** Max rows returned, newest-first. */
|
|
8880
|
+
limit: number().int().min(1).max(5e3).optional()
|
|
8881
|
+
});
|
|
8882
|
+
/** One archived note — the operator's words plus enough context to find what
|
|
8883
|
+
* they were looking at, after the track itself is gone. */
|
|
8884
|
+
var ArchivedDebugNoteSchema = object({
|
|
8885
|
+
/** Archive row id. Derived from `(sourceTrackId, note)`, so re-archiving the
|
|
8886
|
+
* same sentence about the same track lands on the row already there. */
|
|
8887
|
+
id: string(),
|
|
8888
|
+
/** The operator's own words, verbatim. */
|
|
8889
|
+
note: string(),
|
|
8890
|
+
/** The camera. Required — every question here is asked per-camera. */
|
|
8891
|
+
deviceId: number().int(),
|
|
8892
|
+
/** The track the note was written on. PROVENANCE, not ownership: the track
|
|
8893
|
+
* is expected to be gone, and this row is not a reference to it. */
|
|
8894
|
+
sourceTrackId: string(),
|
|
8895
|
+
/** Epoch ms the note was moved here, i.e. when the operator reviewed it. */
|
|
8896
|
+
archivedAt: number().int(),
|
|
8897
|
+
/** The track's `firstSeen`, when the row still knew it; `null` otherwise. */
|
|
8898
|
+
trackStartedAt: number().int().nullable(),
|
|
8899
|
+
/** The track's detector class (`person`, `car`, …); `null` when unknown. */
|
|
8900
|
+
trackClass: string().nullable(),
|
|
8901
|
+
/** The track's display label at review time; `null` when it had none. */
|
|
8902
|
+
trackLabel: string().nullable()
|
|
8903
|
+
});
|
|
8904
|
+
/** Query input for `listArchivedDebugNotes` — newest first, one camera or all. */
|
|
8905
|
+
var ArchivedDebugNoteQueryInputSchema = object({
|
|
8906
|
+
/** Restrict to a single camera; omit for every row. */
|
|
8907
|
+
deviceId: number().int().optional(),
|
|
8908
|
+
/** Max rows returned, newest-first. */
|
|
8909
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
8910
|
+
});
|
|
8911
|
+
/**
|
|
8732
8912
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
8733
8913
|
* recordings and events management surfaces.
|
|
8734
8914
|
*
|
|
@@ -21208,7 +21388,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21208
21388
|
deviceId: number(),
|
|
21209
21389
|
trackId: string(),
|
|
21210
21390
|
flags: TrackFlagsPatchSchema
|
|
21211
|
-
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
21391
|
+
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
21212
21392
|
kind: "query",
|
|
21213
21393
|
auth: "admin"
|
|
21214
21394
|
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
@@ -38610,6 +38790,18 @@ Object.freeze({
|
|
|
38610
38790
|
addonId: null,
|
|
38611
38791
|
access: "view"
|
|
38612
38792
|
},
|
|
38793
|
+
"pipelineAnalytics.listArchivedDebugNotes": {
|
|
38794
|
+
capName: "pipeline-analytics",
|
|
38795
|
+
capScope: "device",
|
|
38796
|
+
addonId: null,
|
|
38797
|
+
access: "view"
|
|
38798
|
+
},
|
|
38799
|
+
"pipelineAnalytics.listBirthDecisions": {
|
|
38800
|
+
capName: "pipeline-analytics",
|
|
38801
|
+
capScope: "device",
|
|
38802
|
+
addonId: null,
|
|
38803
|
+
access: "view"
|
|
38804
|
+
},
|
|
38613
38805
|
"pipelineAnalytics.listEventKinds": {
|
|
38614
38806
|
capName: "pipeline-analytics",
|
|
38615
38807
|
capScope: "device",
|
|
@@ -42397,6 +42589,16 @@ Object.freeze({
|
|
|
42397
42589
|
form: "array",
|
|
42398
42590
|
optional: true
|
|
42399
42591
|
}],
|
|
42592
|
+
"pipelineAnalytics.listArchivedDebugNotes": [{
|
|
42593
|
+
name: "deviceId",
|
|
42594
|
+
form: "single",
|
|
42595
|
+
optional: true
|
|
42596
|
+
}],
|
|
42597
|
+
"pipelineAnalytics.listBirthDecisions": [{
|
|
42598
|
+
name: "deviceId",
|
|
42599
|
+
form: "single",
|
|
42600
|
+
optional: true
|
|
42601
|
+
}],
|
|
42400
42602
|
"pipelineAnalytics.listEventKinds": [{
|
|
42401
42603
|
name: "deviceId",
|
|
42402
42604
|
form: "single",
|
package/package.json
CHANGED