camstack 1.2.127 → 1.2.129
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.
|
@@ -14522,7 +14522,7 @@ function date4(params) {
|
|
|
14522
14522
|
// ../../node_modules/zod/v4/classic/external.js
|
|
14523
14523
|
config(en_default());
|
|
14524
14524
|
|
|
14525
|
-
// ../types/dist/sleep-
|
|
14525
|
+
// ../types/dist/sleep-DMghvp8F.mjs
|
|
14526
14526
|
var WELL_KNOWN_TABS = [
|
|
14527
14527
|
{
|
|
14528
14528
|
id: "overview",
|
|
@@ -15582,6 +15582,147 @@ var CameraSwitchGroupSchema = external_exports.object({
|
|
|
15582
15582
|
/** Unix ms when the group was composed server-side. */
|
|
15583
15583
|
fetchedAt: external_exports.number()
|
|
15584
15584
|
});
|
|
15585
|
+
var BirthDecisionVerdictSchema = external_exports.enum([
|
|
15586
|
+
"confirmed",
|
|
15587
|
+
"suppressed",
|
|
15588
|
+
"exhausted-fallback"
|
|
15589
|
+
]);
|
|
15590
|
+
var BirthDecisionRecordSchema = external_exports.object({
|
|
15591
|
+
id: external_exports.string(),
|
|
15592
|
+
/** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
|
|
15593
|
+
at: external_exports.number().int(),
|
|
15594
|
+
/** The camera. Required: every question here is asked per-camera. */
|
|
15595
|
+
deviceId: external_exports.number().int(),
|
|
15596
|
+
/**
|
|
15597
|
+
* The track the decision was about. PROVENANCE, not ownership — a suppressed
|
|
15598
|
+
* birth has no track at all, and a confirmed one is expected to age out long
|
|
15599
|
+
* before this row does. Named `sourceTrackId` so the retention model's
|
|
15600
|
+
* ownership derivation (`collection-classification.ts`, which keys on a
|
|
15601
|
+
* column literally called `trackId`) cannot reach it.
|
|
15602
|
+
*/
|
|
15603
|
+
sourceTrackId: external_exports.string(),
|
|
15604
|
+
/** The candidate's claimed class. The miss rate is asked per class too. */
|
|
15605
|
+
className: external_exports.string(),
|
|
15606
|
+
verdict: BirthDecisionVerdictSchema,
|
|
15607
|
+
/**
|
|
15608
|
+
* The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
|
|
15609
|
+
* `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
|
|
15610
|
+
* when the gate is DISABLED and every birth is waved through. `null` is not
|
|
15611
|
+
* "unknown": it says the gate took no measurement because it was off, which
|
|
15612
|
+
* is a different population and must never be averaged in with the rest.
|
|
15613
|
+
*/
|
|
15614
|
+
reason: external_exports.string().nullable(),
|
|
15615
|
+
/** Deferral attempts this birth used. 0 = decided on its first look. */
|
|
15616
|
+
attempts: external_exports.number().int(),
|
|
15617
|
+
/** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
|
|
15618
|
+
deferredForMs: external_exports.number().int(),
|
|
15619
|
+
/**
|
|
15620
|
+
* THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
|
|
15621
|
+
*
|
|
15622
|
+
* `true` when the frame the verdict was taken on carried no matched
|
|
15623
|
+
* detection for this track — the tracker was coasting a frozen box and the
|
|
15624
|
+
* subject was not observed. The deferred-birth re-offer pulls the candidate
|
|
15625
|
+
* straight out of `result.tracked` without checking, so this is reachable
|
|
15626
|
+
* today; the question is the RATE, per camera, and whether refusing those
|
|
15627
|
+
* frames would have cost real tracks (cross-read against `verdict` and
|
|
15628
|
+
* `decidedByBirthEvidence`).
|
|
15629
|
+
*/
|
|
15630
|
+
decidedOnCoastedFrame: external_exports.boolean(),
|
|
15631
|
+
/** Were D379 birth-instant pixels in hand when this candidate was submitted? */
|
|
15632
|
+
birthEvidenceAvailable: external_exports.boolean(),
|
|
15633
|
+
/**
|
|
15634
|
+
* Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
|
|
15635
|
+
* deciding are different: the carried crop is confirm-only, so a candidate
|
|
15636
|
+
* can hold evidence, be found inconclusive on it, and be decided by a native
|
|
15637
|
+
* crop of a later instant. A coasted decision backed by carried evidence is
|
|
15638
|
+
* a real observation of the birth instant; one without it is not.
|
|
15639
|
+
*/
|
|
15640
|
+
decidedByBirthEvidence: external_exports.boolean(),
|
|
15641
|
+
/** Best class-compatible crop score, or `null` when nothing compatible was
|
|
15642
|
+
* found — deliberately not 0, which would be a measurement that never was. */
|
|
15643
|
+
bestScore: external_exports.number().nullable(),
|
|
15644
|
+
/** The bar this candidate actually faced (the phantom-cell hook may raise it). */
|
|
15645
|
+
appliedMinConfidence: external_exports.number().nullable(),
|
|
15646
|
+
/**
|
|
15647
|
+
* The track's own `firstSeen` — the candidate's first frame, which is where
|
|
15648
|
+
* the timeline starts. `null` for a suppressed birth, which has no track.
|
|
15649
|
+
*/
|
|
15650
|
+
firstSeen: external_exports.number().int().nullable(),
|
|
15651
|
+
/**
|
|
15652
|
+
* The device's most recent motion RISING EDGE at the moment of the decision,
|
|
15653
|
+
* or `null` when there is none, it is older than
|
|
15654
|
+
* {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
|
|
15655
|
+
*/
|
|
15656
|
+
motionOnsetAt: external_exports.number().int().nullable(),
|
|
15657
|
+
/**
|
|
15658
|
+
* `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
|
|
15659
|
+
* AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
|
|
15660
|
+
*
|
|
15661
|
+
* **Why motion onset and not something else.** Two other proxies were
|
|
15662
|
+
* considered and rejected:
|
|
15663
|
+
* - *the recording/pipeline session start*: for a camera on
|
|
15664
|
+
* `detectionMode: 'always'` the session opens at process start, hours
|
|
15665
|
+
* before any subject. It measures nothing.
|
|
15666
|
+
* - *the first detection on the device in this burst*: CIRCULAR. A track's
|
|
15667
|
+
* `firstSeen` IS the first detection of that object, so for the track that
|
|
15668
|
+
* OPENS a burst — the only one the operator is complaining about — the two
|
|
15669
|
+
* are the same instant and the latency is 0 by construction.
|
|
15670
|
+
* Motion onset is the only in-process signal produced by a DIFFERENT
|
|
15671
|
+
* mechanism from the object detector, so it is the only one that can precede
|
|
15672
|
+
* it. It is also already maintained per-device at frame rate on this very
|
|
15673
|
+
* node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
|
|
15674
|
+
* it free — and, decisively, the frame path and the motion path are gated to
|
|
15675
|
+
* the SAME designated post-processing node, so the mirror is never empty for
|
|
15676
|
+
* a camera whose births land here.
|
|
15677
|
+
*
|
|
15678
|
+
* **Error bars, all of them.**
|
|
15679
|
+
* 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
|
|
15680
|
+
* wall or a branch, and only later joined by the person, OVERSTATES the
|
|
15681
|
+
* latency without bound. Mitigated, never removed, by
|
|
15682
|
+
* {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
|
|
15683
|
+
* candidate for "this burst is this subject", and even then it is a
|
|
15684
|
+
* candidate, not a fact.
|
|
15685
|
+
* 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
|
|
15686
|
+
* intensity threshold. A subject entering slowly at the far edge of the
|
|
15687
|
+
* frame can clear the detector's confidence floor BEFORE it clears the
|
|
15688
|
+
* motion floor, making this negative. Negatives are stored as-is and
|
|
15689
|
+
* never clamped — clamping would fabricate the distribution's left tail,
|
|
15690
|
+
* which is the half that says the proxy is unreliable.
|
|
15691
|
+
* 3. *Onboard motion carries firmware latency of unknown, per-model offset*
|
|
15692
|
+
* (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
|
|
15693
|
+
* therefore comparable WITHIN a camera and not across cameras of
|
|
15694
|
+
* different motion sources. The motion source is deliberately not copied
|
|
15695
|
+
* here — it belongs to the addon that owns the device (D224) and this is
|
|
15696
|
+
* a write on the frame path — so group by `deviceId`, which is how the
|
|
15697
|
+
* question is always asked anyway.
|
|
15698
|
+
* 4. *Continuous motion.* On a busy scene the burst never closes and the
|
|
15699
|
+
* onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
|
|
15700
|
+
* past it this is `null`.
|
|
15701
|
+
* 5. *No motion signal at all* — analyzer off, onboard-only camera not
|
|
15702
|
+
* reporting, or nothing since boot: `null`. Which is the truth about a
|
|
15703
|
+
* camera nobody has a reference instant for.
|
|
15704
|
+
*
|
|
15705
|
+
* So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
|
|
15706
|
+
* as such. It is not a per-track fact and must never be shown as one.
|
|
15707
|
+
*/
|
|
15708
|
+
birthLatencyMs: external_exports.number().int().nullable(),
|
|
15709
|
+
/**
|
|
15710
|
+
* How many births this device has already decided since that motion onset.
|
|
15711
|
+
* 0 = the first, i.e. the only index at which the burst plausibly belongs to
|
|
15712
|
+
* this subject. `null` when there is no usable onset.
|
|
15713
|
+
*/
|
|
15714
|
+
birthIndexInBurst: external_exports.number().int().nullable()
|
|
15715
|
+
});
|
|
15716
|
+
var BirthDecisionQueryInputSchema = external_exports.object({
|
|
15717
|
+
/** Restrict to a single camera; omit for every row. */
|
|
15718
|
+
deviceId: external_exports.number().int().optional(),
|
|
15719
|
+
/** Only decisions at or after this epoch ms. */
|
|
15720
|
+
since: external_exports.number().int().optional(),
|
|
15721
|
+
/** Restrict to one verdict — the miss rate is read one population at a time. */
|
|
15722
|
+
verdict: BirthDecisionVerdictSchema.optional(),
|
|
15723
|
+
/** Max rows returned, newest-first. */
|
|
15724
|
+
limit: external_exports.number().int().min(1).max(5e3).optional()
|
|
15725
|
+
});
|
|
15585
15726
|
var ArchivedDebugNoteSchema = external_exports.object({
|
|
15586
15727
|
/** Archive row id. Derived from `(sourceTrackId, note)`, so re-archiving the
|
|
15587
15728
|
* same sentence about the same track lands on the row already there. */
|
|
@@ -27482,6 +27623,26 @@ var pipelineAnalyticsCapability = {
|
|
|
27482
27623
|
*/
|
|
27483
27624
|
listArchivedDebugNotes: method(ArchivedDebugNoteQueryInputSchema, external_exports.array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }),
|
|
27484
27625
|
/**
|
|
27626
|
+
* Birth decisions — one row per resolved confirmation-gate verdict (D409).
|
|
27627
|
+
*
|
|
27628
|
+
* The READ half of a measurement, and only that: it gates nothing and no
|
|
27629
|
+
* runtime path consults it. It exists because the two questions the
|
|
27630
|
+
* operator's "traccia partita in ritardo" marks raised are both multi-day
|
|
27631
|
+
* and `logs.query` holds under an hour of fleet traffic —
|
|
27632
|
+
* • how often is a birth DECIDED on a frame the subject was not observed
|
|
27633
|
+
* in (`decidedOnCoastedFrame`), and did D379's carried pixels make it a
|
|
27634
|
+
* real observation anyway (`decidedByBirthEvidence`);
|
|
27635
|
+
* • how long after the camera's motion onset does a track's `firstSeen`
|
|
27636
|
+
* land (`birthLatencyMs` — read its error bars in
|
|
27637
|
+
* `BirthDecisionRecordSchema` before quoting it).
|
|
27638
|
+
*
|
|
27639
|
+
* Newest-first, capped by `limit` (default
|
|
27640
|
+
* {@link BIRTH_DECISION_DEFAULT_LIMIT}), optionally scoped to one camera,
|
|
27641
|
+
* one verdict, or a `since`. The table is bounded by row count, not age —
|
|
27642
|
+
* see {@link MAX_BIRTH_DECISION_RECORDS}.
|
|
27643
|
+
*/
|
|
27644
|
+
listBirthDecisions: method(BirthDecisionQueryInputSchema, external_exports.array(BirthDecisionRecordSchema).readonly(), { kind: "query" }),
|
|
27645
|
+
/**
|
|
27485
27646
|
* Durable event-store footprint for the management UI: event rows
|
|
27486
27647
|
* (motion + object + audio) counted per camera + total, plus the
|
|
27487
27648
|
* event-owned media bytes on disk per camera + total. Stat/count-based,
|
|
@@ -43557,6 +43718,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
43557
43718
|
addonId: null,
|
|
43558
43719
|
access: "view"
|
|
43559
43720
|
},
|
|
43721
|
+
"pipelineAnalytics.listBirthDecisions": {
|
|
43722
|
+
capName: "pipeline-analytics",
|
|
43723
|
+
capScope: "device",
|
|
43724
|
+
addonId: null,
|
|
43725
|
+
access: "view"
|
|
43726
|
+
},
|
|
43560
43727
|
"pipelineAnalytics.listEventKinds": {
|
|
43561
43728
|
capName: "pipeline-analytics",
|
|
43562
43729
|
capScope: "device",
|
|
@@ -47349,6 +47516,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
47349
47516
|
form: "single",
|
|
47350
47517
|
optional: true
|
|
47351
47518
|
}],
|
|
47519
|
+
"pipelineAnalytics.listBirthDecisions": [{
|
|
47520
|
+
name: "deviceId",
|
|
47521
|
+
form: "single",
|
|
47522
|
+
optional: true
|
|
47523
|
+
}],
|
|
47352
47524
|
"pipelineAnalytics.listEventKinds": [{
|
|
47353
47525
|
name: "deviceId",
|
|
47354
47526
|
form: "single",
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runDiscover
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WZY4EJWR.js";
|
|
5
5
|
import "./chunk-LMMQX4CK.js";
|
|
6
6
|
|
|
7
7
|
// src/cli.ts
|
|
@@ -38,7 +38,7 @@ async function runServe(args) {
|
|
|
38
38
|
...typeof values.data === "string" ? { data: values.data } : {}
|
|
39
39
|
};
|
|
40
40
|
Object.assign(process.env, buildServeEnv(opts));
|
|
41
|
-
await import("./launcher-
|
|
41
|
+
await import("./launcher-JP2K4C4Y.js");
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// src/commands/agent.ts
|
|
@@ -83,7 +83,7 @@ async function runAgent(args) {
|
|
|
83
83
|
...typeof values.port === "string" ? { port: values.port } : {}
|
|
84
84
|
};
|
|
85
85
|
Object.assign(process.env, buildAgentEnv(opts));
|
|
86
|
-
await import("./launcher-
|
|
86
|
+
await import("./launcher-JP2K4C4Y.js");
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// src/commands/setup.ts
|
|
@@ -1130,7 +1130,7 @@ function isUnknown(_value) {
|
|
|
1130
1130
|
return true;
|
|
1131
1131
|
}
|
|
1132
1132
|
async function resolveServerInteractive(presetNamespace) {
|
|
1133
|
-
const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-
|
|
1133
|
+
const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-VXR5SN5P.js");
|
|
1134
1134
|
if (presetNamespace) {
|
|
1135
1135
|
const spinner4 = clack.spinner();
|
|
1136
1136
|
spinner4.start(`Discovering hub on LAN (namespace "${presetNamespace}")`);
|
|
@@ -23633,9 +23633,9 @@ var require_zod = __commonJS({
|
|
|
23633
23633
|
}
|
|
23634
23634
|
});
|
|
23635
23635
|
|
|
23636
|
-
// ../system/dist/dist-
|
|
23637
|
-
var
|
|
23638
|
-
"../system/dist/dist-
|
|
23636
|
+
// ../system/dist/dist-WLsoGpyn.js
|
|
23637
|
+
var require_dist_WLsoGpyn = __commonJS({
|
|
23638
|
+
"../system/dist/dist-WLsoGpyn.js"(exports) {
|
|
23639
23639
|
"use strict";
|
|
23640
23640
|
var zod = require_zod();
|
|
23641
23641
|
var EventCategory = /* @__PURE__ */ (function(EventCategory2) {
|
|
@@ -26065,6 +26065,147 @@ var require_dist_C5xJy_uL = __commonJS({
|
|
|
26065
26065
|
for (const tab of tabs) for (const child of fieldsOf(tab)) walkField(child, out);
|
|
26066
26066
|
}
|
|
26067
26067
|
}
|
|
26068
|
+
var BirthDecisionVerdictSchema = zod.z.enum([
|
|
26069
|
+
"confirmed",
|
|
26070
|
+
"suppressed",
|
|
26071
|
+
"exhausted-fallback"
|
|
26072
|
+
]);
|
|
26073
|
+
var BirthDecisionRecordSchema = zod.z.object({
|
|
26074
|
+
id: zod.z.string(),
|
|
26075
|
+
/** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
|
|
26076
|
+
at: zod.z.number().int(),
|
|
26077
|
+
/** The camera. Required: every question here is asked per-camera. */
|
|
26078
|
+
deviceId: zod.z.number().int(),
|
|
26079
|
+
/**
|
|
26080
|
+
* The track the decision was about. PROVENANCE, not ownership — a suppressed
|
|
26081
|
+
* birth has no track at all, and a confirmed one is expected to age out long
|
|
26082
|
+
* before this row does. Named `sourceTrackId` so the retention model's
|
|
26083
|
+
* ownership derivation (`collection-classification.ts`, which keys on a
|
|
26084
|
+
* column literally called `trackId`) cannot reach it.
|
|
26085
|
+
*/
|
|
26086
|
+
sourceTrackId: zod.z.string(),
|
|
26087
|
+
/** The candidate's claimed class. The miss rate is asked per class too. */
|
|
26088
|
+
className: zod.z.string(),
|
|
26089
|
+
verdict: BirthDecisionVerdictSchema,
|
|
26090
|
+
/**
|
|
26091
|
+
* The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
|
|
26092
|
+
* `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
|
|
26093
|
+
* when the gate is DISABLED and every birth is waved through. `null` is not
|
|
26094
|
+
* "unknown": it says the gate took no measurement because it was off, which
|
|
26095
|
+
* is a different population and must never be averaged in with the rest.
|
|
26096
|
+
*/
|
|
26097
|
+
reason: zod.z.string().nullable(),
|
|
26098
|
+
/** Deferral attempts this birth used. 0 = decided on its first look. */
|
|
26099
|
+
attempts: zod.z.number().int(),
|
|
26100
|
+
/** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
|
|
26101
|
+
deferredForMs: zod.z.number().int(),
|
|
26102
|
+
/**
|
|
26103
|
+
* THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
|
|
26104
|
+
*
|
|
26105
|
+
* `true` when the frame the verdict was taken on carried no matched
|
|
26106
|
+
* detection for this track — the tracker was coasting a frozen box and the
|
|
26107
|
+
* subject was not observed. The deferred-birth re-offer pulls the candidate
|
|
26108
|
+
* straight out of `result.tracked` without checking, so this is reachable
|
|
26109
|
+
* today; the question is the RATE, per camera, and whether refusing those
|
|
26110
|
+
* frames would have cost real tracks (cross-read against `verdict` and
|
|
26111
|
+
* `decidedByBirthEvidence`).
|
|
26112
|
+
*/
|
|
26113
|
+
decidedOnCoastedFrame: zod.z.boolean(),
|
|
26114
|
+
/** Were D379 birth-instant pixels in hand when this candidate was submitted? */
|
|
26115
|
+
birthEvidenceAvailable: zod.z.boolean(),
|
|
26116
|
+
/**
|
|
26117
|
+
* Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
|
|
26118
|
+
* deciding are different: the carried crop is confirm-only, so a candidate
|
|
26119
|
+
* can hold evidence, be found inconclusive on it, and be decided by a native
|
|
26120
|
+
* crop of a later instant. A coasted decision backed by carried evidence is
|
|
26121
|
+
* a real observation of the birth instant; one without it is not.
|
|
26122
|
+
*/
|
|
26123
|
+
decidedByBirthEvidence: zod.z.boolean(),
|
|
26124
|
+
/** Best class-compatible crop score, or `null` when nothing compatible was
|
|
26125
|
+
* found — deliberately not 0, which would be a measurement that never was. */
|
|
26126
|
+
bestScore: zod.z.number().nullable(),
|
|
26127
|
+
/** The bar this candidate actually faced (the phantom-cell hook may raise it). */
|
|
26128
|
+
appliedMinConfidence: zod.z.number().nullable(),
|
|
26129
|
+
/**
|
|
26130
|
+
* The track's own `firstSeen` — the candidate's first frame, which is where
|
|
26131
|
+
* the timeline starts. `null` for a suppressed birth, which has no track.
|
|
26132
|
+
*/
|
|
26133
|
+
firstSeen: zod.z.number().int().nullable(),
|
|
26134
|
+
/**
|
|
26135
|
+
* The device's most recent motion RISING EDGE at the moment of the decision,
|
|
26136
|
+
* or `null` when there is none, it is older than
|
|
26137
|
+
* {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
|
|
26138
|
+
*/
|
|
26139
|
+
motionOnsetAt: zod.z.number().int().nullable(),
|
|
26140
|
+
/**
|
|
26141
|
+
* `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
|
|
26142
|
+
* AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
|
|
26143
|
+
*
|
|
26144
|
+
* **Why motion onset and not something else.** Two other proxies were
|
|
26145
|
+
* considered and rejected:
|
|
26146
|
+
* - *the recording/pipeline session start*: for a camera on
|
|
26147
|
+
* `detectionMode: 'always'` the session opens at process start, hours
|
|
26148
|
+
* before any subject. It measures nothing.
|
|
26149
|
+
* - *the first detection on the device in this burst*: CIRCULAR. A track's
|
|
26150
|
+
* `firstSeen` IS the first detection of that object, so for the track that
|
|
26151
|
+
* OPENS a burst — the only one the operator is complaining about — the two
|
|
26152
|
+
* are the same instant and the latency is 0 by construction.
|
|
26153
|
+
* Motion onset is the only in-process signal produced by a DIFFERENT
|
|
26154
|
+
* mechanism from the object detector, so it is the only one that can precede
|
|
26155
|
+
* it. It is also already maintained per-device at frame rate on this very
|
|
26156
|
+
* node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
|
|
26157
|
+
* it free — and, decisively, the frame path and the motion path are gated to
|
|
26158
|
+
* the SAME designated post-processing node, so the mirror is never empty for
|
|
26159
|
+
* a camera whose births land here.
|
|
26160
|
+
*
|
|
26161
|
+
* **Error bars, all of them.**
|
|
26162
|
+
* 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
|
|
26163
|
+
* wall or a branch, and only later joined by the person, OVERSTATES the
|
|
26164
|
+
* latency without bound. Mitigated, never removed, by
|
|
26165
|
+
* {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
|
|
26166
|
+
* candidate for "this burst is this subject", and even then it is a
|
|
26167
|
+
* candidate, not a fact.
|
|
26168
|
+
* 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
|
|
26169
|
+
* intensity threshold. A subject entering slowly at the far edge of the
|
|
26170
|
+
* frame can clear the detector's confidence floor BEFORE it clears the
|
|
26171
|
+
* motion floor, making this negative. Negatives are stored as-is and
|
|
26172
|
+
* never clamped — clamping would fabricate the distribution's left tail,
|
|
26173
|
+
* which is the half that says the proxy is unreliable.
|
|
26174
|
+
* 3. *Onboard motion carries firmware latency of unknown, per-model offset*
|
|
26175
|
+
* (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
|
|
26176
|
+
* therefore comparable WITHIN a camera and not across cameras of
|
|
26177
|
+
* different motion sources. The motion source is deliberately not copied
|
|
26178
|
+
* here — it belongs to the addon that owns the device (D224) and this is
|
|
26179
|
+
* a write on the frame path — so group by `deviceId`, which is how the
|
|
26180
|
+
* question is always asked anyway.
|
|
26181
|
+
* 4. *Continuous motion.* On a busy scene the burst never closes and the
|
|
26182
|
+
* onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
|
|
26183
|
+
* past it this is `null`.
|
|
26184
|
+
* 5. *No motion signal at all* — analyzer off, onboard-only camera not
|
|
26185
|
+
* reporting, or nothing since boot: `null`. Which is the truth about a
|
|
26186
|
+
* camera nobody has a reference instant for.
|
|
26187
|
+
*
|
|
26188
|
+
* So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
|
|
26189
|
+
* as such. It is not a per-track fact and must never be shown as one.
|
|
26190
|
+
*/
|
|
26191
|
+
birthLatencyMs: zod.z.number().int().nullable(),
|
|
26192
|
+
/**
|
|
26193
|
+
* How many births this device has already decided since that motion onset.
|
|
26194
|
+
* 0 = the first, i.e. the only index at which the burst plausibly belongs to
|
|
26195
|
+
* this subject. `null` when there is no usable onset.
|
|
26196
|
+
*/
|
|
26197
|
+
birthIndexInBurst: zod.z.number().int().nullable()
|
|
26198
|
+
});
|
|
26199
|
+
var BirthDecisionQueryInputSchema = zod.z.object({
|
|
26200
|
+
/** Restrict to a single camera; omit for every row. */
|
|
26201
|
+
deviceId: zod.z.number().int().optional(),
|
|
26202
|
+
/** Only decisions at or after this epoch ms. */
|
|
26203
|
+
since: zod.z.number().int().optional(),
|
|
26204
|
+
/** Restrict to one verdict — the miss rate is read one population at a time. */
|
|
26205
|
+
verdict: BirthDecisionVerdictSchema.optional(),
|
|
26206
|
+
/** Max rows returned, newest-first. */
|
|
26207
|
+
limit: zod.z.number().int().min(1).max(5e3).optional()
|
|
26208
|
+
});
|
|
26068
26209
|
var ArchivedDebugNoteSchema = zod.z.object({
|
|
26069
26210
|
/** Archive row id. Derived from `(sourceTrackId, note)`, so re-archiving the
|
|
26070
26211
|
* same sentence about the same track lands on the row already there. */
|
|
@@ -38251,6 +38392,26 @@ var require_dist_C5xJy_uL = __commonJS({
|
|
|
38251
38392
|
*/
|
|
38252
38393
|
listArchivedDebugNotes: method(ArchivedDebugNoteQueryInputSchema, zod.z.array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }),
|
|
38253
38394
|
/**
|
|
38395
|
+
* Birth decisions — one row per resolved confirmation-gate verdict (D409).
|
|
38396
|
+
*
|
|
38397
|
+
* The READ half of a measurement, and only that: it gates nothing and no
|
|
38398
|
+
* runtime path consults it. It exists because the two questions the
|
|
38399
|
+
* operator's "traccia partita in ritardo" marks raised are both multi-day
|
|
38400
|
+
* and `logs.query` holds under an hour of fleet traffic —
|
|
38401
|
+
* • how often is a birth DECIDED on a frame the subject was not observed
|
|
38402
|
+
* in (`decidedOnCoastedFrame`), and did D379's carried pixels make it a
|
|
38403
|
+
* real observation anyway (`decidedByBirthEvidence`);
|
|
38404
|
+
* • how long after the camera's motion onset does a track's `firstSeen`
|
|
38405
|
+
* land (`birthLatencyMs` — read its error bars in
|
|
38406
|
+
* `BirthDecisionRecordSchema` before quoting it).
|
|
38407
|
+
*
|
|
38408
|
+
* Newest-first, capped by `limit` (default
|
|
38409
|
+
* {@link BIRTH_DECISION_DEFAULT_LIMIT}), optionally scoped to one camera,
|
|
38410
|
+
* one verdict, or a `since`. The table is bounded by row count, not age —
|
|
38411
|
+
* see {@link MAX_BIRTH_DECISION_RECORDS}.
|
|
38412
|
+
*/
|
|
38413
|
+
listBirthDecisions: method(BirthDecisionQueryInputSchema, zod.z.array(BirthDecisionRecordSchema).readonly(), { kind: "query" }),
|
|
38414
|
+
/**
|
|
38254
38415
|
* Durable event-store footprint for the management UI: event rows
|
|
38255
38416
|
* (motion + object + audio) counted per camera + total, plus the
|
|
38256
38417
|
* event-owned media bytes on disk per camera + total. Stat/count-based,
|
|
@@ -55001,6 +55162,12 @@ var require_dist_C5xJy_uL = __commonJS({
|
|
|
55001
55162
|
addonId: null,
|
|
55002
55163
|
access: "view"
|
|
55003
55164
|
},
|
|
55165
|
+
"pipelineAnalytics.listBirthDecisions": {
|
|
55166
|
+
capName: "pipeline-analytics",
|
|
55167
|
+
capScope: "device",
|
|
55168
|
+
addonId: null,
|
|
55169
|
+
access: "view"
|
|
55170
|
+
},
|
|
55004
55171
|
"pipelineAnalytics.listEventKinds": {
|
|
55005
55172
|
capName: "pipeline-analytics",
|
|
55006
55173
|
capScope: "device",
|
|
@@ -58793,6 +58960,11 @@ var require_dist_C5xJy_uL = __commonJS({
|
|
|
58793
58960
|
form: "single",
|
|
58794
58961
|
optional: true
|
|
58795
58962
|
}],
|
|
58963
|
+
"pipelineAnalytics.listBirthDecisions": [{
|
|
58964
|
+
name: "deviceId",
|
|
58965
|
+
form: "single",
|
|
58966
|
+
optional: true
|
|
58967
|
+
}],
|
|
58796
58968
|
"pipelineAnalytics.listEventKinds": [{
|
|
58797
58969
|
name: "deviceId",
|
|
58798
58970
|
form: "single",
|
|
@@ -61105,7 +61277,7 @@ var require_alerts_addon = __commonJS({
|
|
|
61105
61277
|
[Symbol.toStringTag]: { value: "Module" }
|
|
61106
61278
|
});
|
|
61107
61279
|
require_chunk_Cek0wNdY();
|
|
61108
|
-
var require_dist10 =
|
|
61280
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
61109
61281
|
function selectExpired(alerts, cutoffMs) {
|
|
61110
61282
|
return alerts.filter((a) => a.createdAt < cutoffMs).sort((a, b) => a.createdAt - b.createdAt).map((a) => a.id);
|
|
61111
61283
|
}
|
|
@@ -61924,7 +62096,7 @@ var require_console_logging = __commonJS({
|
|
|
61924
62096
|
[Symbol.toStringTag]: { value: "Module" }
|
|
61925
62097
|
});
|
|
61926
62098
|
require_chunk_Cek0wNdY();
|
|
61927
|
-
var require_dist10 =
|
|
62099
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
61928
62100
|
var require_formatter = require_formatter_DqAKDlvN();
|
|
61929
62101
|
var LEVEL_RANK = {
|
|
61930
62102
|
debug: 0,
|
|
@@ -62018,7 +62190,7 @@ var require_core_blocks_addon = __commonJS({
|
|
|
62018
62190
|
"use strict";
|
|
62019
62191
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
62020
62192
|
var require_chunk = require_chunk_Cek0wNdY();
|
|
62021
|
-
var require_dist10 =
|
|
62193
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
62022
62194
|
var node_crypto = __require("crypto");
|
|
62023
62195
|
var node_fs_promises = __require("fs/promises");
|
|
62024
62196
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -62915,11 +63087,11 @@ var require_core_blocks = __commonJS({
|
|
|
62915
63087
|
}
|
|
62916
63088
|
});
|
|
62917
63089
|
|
|
62918
|
-
// ../system/dist/retired-settings-keys-
|
|
62919
|
-
var
|
|
62920
|
-
"../system/dist/retired-settings-keys-
|
|
63090
|
+
// ../system/dist/retired-settings-keys-WShMmPM4.js
|
|
63091
|
+
var require_retired_settings_keys_WShMmPM4 = __commonJS({
|
|
63092
|
+
"../system/dist/retired-settings-keys-WShMmPM4.js"(exports) {
|
|
62921
63093
|
"use strict";
|
|
62922
|
-
var require_dist10 =
|
|
63094
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
62923
63095
|
function settingsStoreIsAuthoritativeHere(env) {
|
|
62924
63096
|
const raw = (env["CAMSTACK_ROLE"] ?? "").trim().toLowerCase();
|
|
62925
63097
|
return raw === "" || raw === "hub";
|
|
@@ -65154,8 +65326,8 @@ var require_device_manager_addon = __commonJS({
|
|
|
65154
65326
|
[Symbol.toStringTag]: { value: "Module" }
|
|
65155
65327
|
});
|
|
65156
65328
|
require_chunk_Cek0wNdY();
|
|
65157
|
-
var require_dist10 =
|
|
65158
|
-
var require_retired_settings_keys =
|
|
65329
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
65330
|
+
var require_retired_settings_keys = require_retired_settings_keys_WShMmPM4();
|
|
65159
65331
|
var node_crypto = __require("crypto");
|
|
65160
65332
|
var _camstack_types_node = require_node();
|
|
65161
65333
|
var JOB_HISTORY = 20;
|
|
@@ -70780,7 +70952,7 @@ var require_hub_forwarder = __commonJS({
|
|
|
70780
70952
|
[Symbol.toStringTag]: { value: "Module" }
|
|
70781
70953
|
});
|
|
70782
70954
|
require_chunk_Cek0wNdY();
|
|
70783
|
-
var require_dist10 =
|
|
70955
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
70784
70956
|
var require_formatter = require_formatter_DqAKDlvN();
|
|
70785
70957
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
70786
70958
|
var HubForwarderDestination = class {
|
|
@@ -70917,7 +71089,7 @@ var require_liveness_monitor_addon = __commonJS({
|
|
|
70917
71089
|
"use strict";
|
|
70918
71090
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
70919
71091
|
require_chunk_Cek0wNdY();
|
|
70920
|
-
var require_dist10 =
|
|
71092
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
70921
71093
|
var NO_DEVICES = "liveness:no-devices";
|
|
70922
71094
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
70923
71095
|
var NO_FOOTAGE_PREFIX = "liveness:no-footage:";
|
|
@@ -71113,7 +71285,7 @@ var require_local_auth_addon = __commonJS({
|
|
|
71113
71285
|
[Symbol.toStringTag]: { value: "Module" }
|
|
71114
71286
|
});
|
|
71115
71287
|
var require_chunk = require_chunk_Cek0wNdY();
|
|
71116
|
-
var require_dist10 =
|
|
71288
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
71117
71289
|
var node_crypto = __require("crypto");
|
|
71118
71290
|
node_crypto = require_chunk.__toESM(node_crypto);
|
|
71119
71291
|
var crypto$1 = __require("crypto");
|
|
@@ -78926,7 +79098,7 @@ var require_loki_logging = __commonJS({
|
|
|
78926
79098
|
[Symbol.toStringTag]: { value: "Module" }
|
|
78927
79099
|
});
|
|
78928
79100
|
require_chunk_Cek0wNdY();
|
|
78929
|
-
var require_dist10 =
|
|
79101
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
78930
79102
|
function sanitizeLabelName(raw) {
|
|
78931
79103
|
const replaced = raw.replaceAll(/[^a-zA-Z0-9_]/g, "_");
|
|
78932
79104
|
return /^[a-zA-Z_]/.test(replaced) ? replaced : `_${replaced}`;
|
|
@@ -79491,7 +79663,7 @@ var require_native_metrics_addon = __commonJS({
|
|
|
79491
79663
|
[Symbol.toStringTag]: { value: "Module" }
|
|
79492
79664
|
});
|
|
79493
79665
|
var require_chunk = require_chunk_Cek0wNdY();
|
|
79494
|
-
var require_dist10 =
|
|
79666
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
79495
79667
|
var node_fs_promises = __require("fs/promises");
|
|
79496
79668
|
var node_child_process = __require("child_process");
|
|
79497
79669
|
var node_util = __require("util");
|
|
@@ -82075,7 +82247,7 @@ var require_filesystem_storage_addon = __commonJS({
|
|
|
82075
82247
|
[Symbol.toStringTag]: { value: "Module" }
|
|
82076
82248
|
});
|
|
82077
82249
|
var require_chunk = require_chunk_Cek0wNdY();
|
|
82078
|
-
var require_dist10 =
|
|
82250
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
82079
82251
|
var node_crypto = __require("crypto");
|
|
82080
82252
|
var node_fs_promises = __require("fs/promises");
|
|
82081
82253
|
var node_path = __require("path");
|
|
@@ -83191,8 +83363,8 @@ var require_sqlite_settings_addon = __commonJS({
|
|
|
83191
83363
|
[Symbol.toStringTag]: { value: "Module" }
|
|
83192
83364
|
});
|
|
83193
83365
|
var require_chunk = require_chunk_Cek0wNdY();
|
|
83194
|
-
var require_dist10 =
|
|
83195
|
-
var require_retired_settings_keys =
|
|
83366
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
83367
|
+
var require_retired_settings_keys = require_retired_settings_keys_WShMmPM4();
|
|
83196
83368
|
var node_crypto = __require("crypto");
|
|
83197
83369
|
var node_fs = __require("fs");
|
|
83198
83370
|
var node_module = __require("module");
|
|
@@ -85696,7 +85868,7 @@ var require_storage_orchestrator_addon = __commonJS({
|
|
|
85696
85868
|
[Symbol.toStringTag]: { value: "Module" }
|
|
85697
85869
|
});
|
|
85698
85870
|
var require_chunk = require_chunk_Cek0wNdY();
|
|
85699
|
-
var require_dist10 =
|
|
85871
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
85700
85872
|
var require_hub_cap_forward = require_hub_cap_forward_DmHNjbB0();
|
|
85701
85873
|
var zod = require_zod();
|
|
85702
85874
|
var node_crypto = __require("crypto");
|
|
@@ -89346,7 +89518,7 @@ var require_system_config_addon = __commonJS({
|
|
|
89346
89518
|
[Symbol.toStringTag]: { value: "Module" }
|
|
89347
89519
|
});
|
|
89348
89520
|
require_chunk_Cek0wNdY();
|
|
89349
|
-
var require_dist10 =
|
|
89521
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
89350
89522
|
var SECTION_TITLES = {
|
|
89351
89523
|
server: "Server",
|
|
89352
89524
|
auth: "Authentication"
|
|
@@ -107407,7 +107579,7 @@ var require_winston_logging = __commonJS({
|
|
|
107407
107579
|
[Symbol.toStringTag]: { value: "Module" }
|
|
107408
107580
|
});
|
|
107409
107581
|
var require_chunk = require_chunk_Cek0wNdY();
|
|
107410
|
-
var require_dist10 =
|
|
107582
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
107411
107583
|
var require_formatter = require_formatter_DqAKDlvN();
|
|
107412
107584
|
var node_path = __require("path");
|
|
107413
107585
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -109352,9 +109524,9 @@ var require_event_category_BVo6ta6 = __commonJS({
|
|
|
109352
109524
|
}
|
|
109353
109525
|
});
|
|
109354
109526
|
|
|
109355
|
-
// ../types/dist/sleep-
|
|
109356
|
-
var
|
|
109357
|
-
"../types/dist/sleep-
|
|
109527
|
+
// ../types/dist/sleep-Bo9cUOXp.js
|
|
109528
|
+
var require_sleep_Bo9cUOXp = __commonJS({
|
|
109529
|
+
"../types/dist/sleep-Bo9cUOXp.js"(exports) {
|
|
109358
109530
|
"use strict";
|
|
109359
109531
|
var require_event_category = require_event_category_BVo6ta6();
|
|
109360
109532
|
var zod = require_zod();
|
|
@@ -112087,6 +112259,7 @@ var require_sleep_IjLtwkO5 = __commonJS({
|
|
|
112087
112259
|
deleteTracks: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "deleteTracks", "mutation", input),
|
|
112088
112260
|
setTrackFlags: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "setTrackFlags", "mutation", input),
|
|
112089
112261
|
listArchivedDebugNotes: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "listArchivedDebugNotes", "query", input),
|
|
112262
|
+
listBirthDecisions: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "listBirthDecisions", "query", input),
|
|
112090
112263
|
getEventStoreFootprint: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventStoreFootprint", "query", input),
|
|
112091
112264
|
getEventMediaFootprintByKind: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventMediaFootprintByKind", "query", input),
|
|
112092
112265
|
pruneEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneEvents", "mutation", input),
|
|
@@ -113087,7 +113260,7 @@ var require_addon = __commonJS({
|
|
|
113087
113260
|
"use strict";
|
|
113088
113261
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
113089
113262
|
var require_event_category = require_event_category_BVo6ta6();
|
|
113090
|
-
var require_sleep =
|
|
113263
|
+
var require_sleep = require_sleep_Bo9cUOXp();
|
|
113091
113264
|
var require_err_msg = require_err_msg_COpsHMw2();
|
|
113092
113265
|
var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
113093
113266
|
"addons": { "getLogs": { "limit": 100 } },
|
|
@@ -132018,7 +132191,7 @@ var require_dist3 = __commonJS({
|
|
|
132018
132191
|
"use strict";
|
|
132019
132192
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
132020
132193
|
var require_chunk = require_chunk_Cek0wNdY();
|
|
132021
|
-
var require_dist10 =
|
|
132194
|
+
var require_dist10 = require_dist_WLsoGpyn();
|
|
132022
132195
|
var require_builtins_alerts_alerts_addon = require_alerts_addon();
|
|
132023
132196
|
require_alerts();
|
|
132024
132197
|
var require_formatter = require_formatter_DqAKDlvN();
|
|
@@ -213135,7 +213308,7 @@ var require_dist4 = __commonJS({
|
|
|
213135
213308
|
"use strict";
|
|
213136
213309
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
213137
213310
|
var require_event_category = require_event_category_BVo6ta6();
|
|
213138
|
-
var require_sleep =
|
|
213311
|
+
var require_sleep = require_sleep_Bo9cUOXp();
|
|
213139
213312
|
var require_canonical_hash = require_canonical_hash_DNV8S5ET();
|
|
213140
213313
|
var require_enums2 = require_enums();
|
|
213141
213314
|
var require_err_msg = require_err_msg_COpsHMw2();
|
|
@@ -213888,6 +214061,150 @@ var require_dist4 = __commonJS({
|
|
|
213888
214061
|
for (const tab of tabs) for (const child of fieldsOf(tab)) walkField(child, out);
|
|
213889
214062
|
}
|
|
213890
214063
|
}
|
|
214064
|
+
var MAX_BIRTH_DECISION_RECORDS = 3e4;
|
|
214065
|
+
var BIRTH_DECISION_DEFAULT_LIMIT = 500;
|
|
214066
|
+
var MAX_BIRTH_LATENCY_PROXY_MS = 6e4;
|
|
214067
|
+
var BirthDecisionVerdictSchema = zod.z.enum([
|
|
214068
|
+
"confirmed",
|
|
214069
|
+
"suppressed",
|
|
214070
|
+
"exhausted-fallback"
|
|
214071
|
+
]);
|
|
214072
|
+
var BirthDecisionRecordSchema = zod.z.object({
|
|
214073
|
+
id: zod.z.string(),
|
|
214074
|
+
/** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
|
|
214075
|
+
at: zod.z.number().int(),
|
|
214076
|
+
/** The camera. Required: every question here is asked per-camera. */
|
|
214077
|
+
deviceId: zod.z.number().int(),
|
|
214078
|
+
/**
|
|
214079
|
+
* The track the decision was about. PROVENANCE, not ownership — a suppressed
|
|
214080
|
+
* birth has no track at all, and a confirmed one is expected to age out long
|
|
214081
|
+
* before this row does. Named `sourceTrackId` so the retention model's
|
|
214082
|
+
* ownership derivation (`collection-classification.ts`, which keys on a
|
|
214083
|
+
* column literally called `trackId`) cannot reach it.
|
|
214084
|
+
*/
|
|
214085
|
+
sourceTrackId: zod.z.string(),
|
|
214086
|
+
/** The candidate's claimed class. The miss rate is asked per class too. */
|
|
214087
|
+
className: zod.z.string(),
|
|
214088
|
+
verdict: BirthDecisionVerdictSchema,
|
|
214089
|
+
/**
|
|
214090
|
+
* The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
|
|
214091
|
+
* `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
|
|
214092
|
+
* when the gate is DISABLED and every birth is waved through. `null` is not
|
|
214093
|
+
* "unknown": it says the gate took no measurement because it was off, which
|
|
214094
|
+
* is a different population and must never be averaged in with the rest.
|
|
214095
|
+
*/
|
|
214096
|
+
reason: zod.z.string().nullable(),
|
|
214097
|
+
/** Deferral attempts this birth used. 0 = decided on its first look. */
|
|
214098
|
+
attempts: zod.z.number().int(),
|
|
214099
|
+
/** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
|
|
214100
|
+
deferredForMs: zod.z.number().int(),
|
|
214101
|
+
/**
|
|
214102
|
+
* THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
|
|
214103
|
+
*
|
|
214104
|
+
* `true` when the frame the verdict was taken on carried no matched
|
|
214105
|
+
* detection for this track — the tracker was coasting a frozen box and the
|
|
214106
|
+
* subject was not observed. The deferred-birth re-offer pulls the candidate
|
|
214107
|
+
* straight out of `result.tracked` without checking, so this is reachable
|
|
214108
|
+
* today; the question is the RATE, per camera, and whether refusing those
|
|
214109
|
+
* frames would have cost real tracks (cross-read against `verdict` and
|
|
214110
|
+
* `decidedByBirthEvidence`).
|
|
214111
|
+
*/
|
|
214112
|
+
decidedOnCoastedFrame: zod.z.boolean(),
|
|
214113
|
+
/** Were D379 birth-instant pixels in hand when this candidate was submitted? */
|
|
214114
|
+
birthEvidenceAvailable: zod.z.boolean(),
|
|
214115
|
+
/**
|
|
214116
|
+
* Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
|
|
214117
|
+
* deciding are different: the carried crop is confirm-only, so a candidate
|
|
214118
|
+
* can hold evidence, be found inconclusive on it, and be decided by a native
|
|
214119
|
+
* crop of a later instant. A coasted decision backed by carried evidence is
|
|
214120
|
+
* a real observation of the birth instant; one without it is not.
|
|
214121
|
+
*/
|
|
214122
|
+
decidedByBirthEvidence: zod.z.boolean(),
|
|
214123
|
+
/** Best class-compatible crop score, or `null` when nothing compatible was
|
|
214124
|
+
* found — deliberately not 0, which would be a measurement that never was. */
|
|
214125
|
+
bestScore: zod.z.number().nullable(),
|
|
214126
|
+
/** The bar this candidate actually faced (the phantom-cell hook may raise it). */
|
|
214127
|
+
appliedMinConfidence: zod.z.number().nullable(),
|
|
214128
|
+
/**
|
|
214129
|
+
* The track's own `firstSeen` — the candidate's first frame, which is where
|
|
214130
|
+
* the timeline starts. `null` for a suppressed birth, which has no track.
|
|
214131
|
+
*/
|
|
214132
|
+
firstSeen: zod.z.number().int().nullable(),
|
|
214133
|
+
/**
|
|
214134
|
+
* The device's most recent motion RISING EDGE at the moment of the decision,
|
|
214135
|
+
* or `null` when there is none, it is older than
|
|
214136
|
+
* {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
|
|
214137
|
+
*/
|
|
214138
|
+
motionOnsetAt: zod.z.number().int().nullable(),
|
|
214139
|
+
/**
|
|
214140
|
+
* `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
|
|
214141
|
+
* AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
|
|
214142
|
+
*
|
|
214143
|
+
* **Why motion onset and not something else.** Two other proxies were
|
|
214144
|
+
* considered and rejected:
|
|
214145
|
+
* - *the recording/pipeline session start*: for a camera on
|
|
214146
|
+
* `detectionMode: 'always'` the session opens at process start, hours
|
|
214147
|
+
* before any subject. It measures nothing.
|
|
214148
|
+
* - *the first detection on the device in this burst*: CIRCULAR. A track's
|
|
214149
|
+
* `firstSeen` IS the first detection of that object, so for the track that
|
|
214150
|
+
* OPENS a burst — the only one the operator is complaining about — the two
|
|
214151
|
+
* are the same instant and the latency is 0 by construction.
|
|
214152
|
+
* Motion onset is the only in-process signal produced by a DIFFERENT
|
|
214153
|
+
* mechanism from the object detector, so it is the only one that can precede
|
|
214154
|
+
* it. It is also already maintained per-device at frame rate on this very
|
|
214155
|
+
* node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
|
|
214156
|
+
* it free — and, decisively, the frame path and the motion path are gated to
|
|
214157
|
+
* the SAME designated post-processing node, so the mirror is never empty for
|
|
214158
|
+
* a camera whose births land here.
|
|
214159
|
+
*
|
|
214160
|
+
* **Error bars, all of them.**
|
|
214161
|
+
* 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
|
|
214162
|
+
* wall or a branch, and only later joined by the person, OVERSTATES the
|
|
214163
|
+
* latency without bound. Mitigated, never removed, by
|
|
214164
|
+
* {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
|
|
214165
|
+
* candidate for "this burst is this subject", and even then it is a
|
|
214166
|
+
* candidate, not a fact.
|
|
214167
|
+
* 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
|
|
214168
|
+
* intensity threshold. A subject entering slowly at the far edge of the
|
|
214169
|
+
* frame can clear the detector's confidence floor BEFORE it clears the
|
|
214170
|
+
* motion floor, making this negative. Negatives are stored as-is and
|
|
214171
|
+
* never clamped — clamping would fabricate the distribution's left tail,
|
|
214172
|
+
* which is the half that says the proxy is unreliable.
|
|
214173
|
+
* 3. *Onboard motion carries firmware latency of unknown, per-model offset*
|
|
214174
|
+
* (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
|
|
214175
|
+
* therefore comparable WITHIN a camera and not across cameras of
|
|
214176
|
+
* different motion sources. The motion source is deliberately not copied
|
|
214177
|
+
* here — it belongs to the addon that owns the device (D224) and this is
|
|
214178
|
+
* a write on the frame path — so group by `deviceId`, which is how the
|
|
214179
|
+
* question is always asked anyway.
|
|
214180
|
+
* 4. *Continuous motion.* On a busy scene the burst never closes and the
|
|
214181
|
+
* onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
|
|
214182
|
+
* past it this is `null`.
|
|
214183
|
+
* 5. *No motion signal at all* — analyzer off, onboard-only camera not
|
|
214184
|
+
* reporting, or nothing since boot: `null`. Which is the truth about a
|
|
214185
|
+
* camera nobody has a reference instant for.
|
|
214186
|
+
*
|
|
214187
|
+
* So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
|
|
214188
|
+
* as such. It is not a per-track fact and must never be shown as one.
|
|
214189
|
+
*/
|
|
214190
|
+
birthLatencyMs: zod.z.number().int().nullable(),
|
|
214191
|
+
/**
|
|
214192
|
+
* How many births this device has already decided since that motion onset.
|
|
214193
|
+
* 0 = the first, i.e. the only index at which the burst plausibly belongs to
|
|
214194
|
+
* this subject. `null` when there is no usable onset.
|
|
214195
|
+
*/
|
|
214196
|
+
birthIndexInBurst: zod.z.number().int().nullable()
|
|
214197
|
+
});
|
|
214198
|
+
var BirthDecisionQueryInputSchema = zod.z.object({
|
|
214199
|
+
/** Restrict to a single camera; omit for every row. */
|
|
214200
|
+
deviceId: zod.z.number().int().optional(),
|
|
214201
|
+
/** Only decisions at or after this epoch ms. */
|
|
214202
|
+
since: zod.z.number().int().optional(),
|
|
214203
|
+
/** Restrict to one verdict — the miss rate is read one population at a time. */
|
|
214204
|
+
verdict: BirthDecisionVerdictSchema.optional(),
|
|
214205
|
+
/** Max rows returned, newest-first. */
|
|
214206
|
+
limit: zod.z.number().int().min(1).max(5e3).optional()
|
|
214207
|
+
});
|
|
213891
214208
|
var MAX_ARCHIVED_DEBUG_NOTES = 5e3;
|
|
213892
214209
|
var ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT = 200;
|
|
213893
214210
|
var ArchivedDebugNoteSchema = zod.z.object({
|
|
@@ -228496,6 +228813,26 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
|
|
|
228496
228813
|
*/
|
|
228497
228814
|
listArchivedDebugNotes: require_sleep.method(ArchivedDebugNoteQueryInputSchema, zod.z.array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }),
|
|
228498
228815
|
/**
|
|
228816
|
+
* Birth decisions — one row per resolved confirmation-gate verdict (D409).
|
|
228817
|
+
*
|
|
228818
|
+
* The READ half of a measurement, and only that: it gates nothing and no
|
|
228819
|
+
* runtime path consults it. It exists because the two questions the
|
|
228820
|
+
* operator's "traccia partita in ritardo" marks raised are both multi-day
|
|
228821
|
+
* and `logs.query` holds under an hour of fleet traffic —
|
|
228822
|
+
* • how often is a birth DECIDED on a frame the subject was not observed
|
|
228823
|
+
* in (`decidedOnCoastedFrame`), and did D379's carried pixels make it a
|
|
228824
|
+
* real observation anyway (`decidedByBirthEvidence`);
|
|
228825
|
+
* • how long after the camera's motion onset does a track's `firstSeen`
|
|
228826
|
+
* land (`birthLatencyMs` — read its error bars in
|
|
228827
|
+
* `BirthDecisionRecordSchema` before quoting it).
|
|
228828
|
+
*
|
|
228829
|
+
* Newest-first, capped by `limit` (default
|
|
228830
|
+
* {@link BIRTH_DECISION_DEFAULT_LIMIT}), optionally scoped to one camera,
|
|
228831
|
+
* one verdict, or a `since`. The table is bounded by row count, not age —
|
|
228832
|
+
* see {@link MAX_BIRTH_DECISION_RECORDS}.
|
|
228833
|
+
*/
|
|
228834
|
+
listBirthDecisions: require_sleep.method(BirthDecisionQueryInputSchema, zod.z.array(BirthDecisionRecordSchema).readonly(), { kind: "query" }),
|
|
228835
|
+
/**
|
|
228499
228836
|
* Durable event-store footprint for the management UI: event rows
|
|
228500
228837
|
* (motion + object + audio) counted per camera + total, plus the
|
|
228501
228838
|
* event-owned media bytes on disk per camera + total. Stat/count-based,
|
|
@@ -248933,6 +249270,12 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
|
|
|
248933
249270
|
addonId: null,
|
|
248934
249271
|
access: "view"
|
|
248935
249272
|
},
|
|
249273
|
+
"pipelineAnalytics.listBirthDecisions": {
|
|
249274
|
+
capName: "pipeline-analytics",
|
|
249275
|
+
capScope: "device",
|
|
249276
|
+
addonId: null,
|
|
249277
|
+
access: "view"
|
|
249278
|
+
},
|
|
248936
249279
|
"pipelineAnalytics.listEventKinds": {
|
|
248937
249280
|
capName: "pipeline-analytics",
|
|
248938
249281
|
capScope: "device",
|
|
@@ -252989,6 +253332,11 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
|
|
|
252989
253332
|
form: "single",
|
|
252990
253333
|
optional: true
|
|
252991
253334
|
}],
|
|
253335
|
+
"pipelineAnalytics.listBirthDecisions": [{
|
|
253336
|
+
name: "deviceId",
|
|
253337
|
+
form: "single",
|
|
253338
|
+
optional: true
|
|
253339
|
+
}],
|
|
252992
253340
|
"pipelineAnalytics.listEventKinds": [{
|
|
252993
253341
|
name: "deviceId",
|
|
252994
253342
|
form: "single",
|
|
@@ -257720,6 +258068,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
|
|
|
257720
258068
|
exports.BASE_LIVE_EGRESS_PROFILE = BASE_LIVE_EGRESS_PROFILE;
|
|
257721
258069
|
exports.BATTERY_DEVICE_PROFILE = BATTERY_DEVICE_PROFILE;
|
|
257722
258070
|
exports.BATTERY_UNREACHABLE_AFTER_MS = BATTERY_UNREACHABLE_AFTER_MS;
|
|
258071
|
+
exports.BIRTH_DECISION_DEFAULT_LIMIT = BIRTH_DECISION_DEFAULT_LIMIT;
|
|
257723
258072
|
exports.BOOT_RECOVERY_BACKOFF_MS = require_sleep.BOOT_RECOVERY_BACKOFF_MS;
|
|
257724
258073
|
exports.BacklightModeSchema = BacklightModeSchema;
|
|
257725
258074
|
exports.BackupDestinationInfoSchema = BackupDestinationInfoSchema;
|
|
@@ -257733,6 +258082,9 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
|
|
|
257733
258082
|
exports.BaseDeviceProvider = BaseDeviceProvider;
|
|
257734
258083
|
exports.BatteryStatusSchema = BatteryStatusSchema;
|
|
257735
258084
|
exports.BinaryStatusSchema = BinaryStatusSchema;
|
|
258085
|
+
exports.BirthDecisionQueryInputSchema = BirthDecisionQueryInputSchema;
|
|
258086
|
+
exports.BirthDecisionRecordSchema = BirthDecisionRecordSchema;
|
|
258087
|
+
exports.BirthDecisionVerdictSchema = BirthDecisionVerdictSchema;
|
|
257736
258088
|
exports.BoundingBoxSchema = BoundingBoxSchema;
|
|
257737
258089
|
exports.BrightnessStatusSchema = BrightnessStatusSchema;
|
|
257738
258090
|
exports.BrokerAddInputSchema = AddInputSchema;
|
|
@@ -258109,6 +258461,8 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
|
|
|
258109
258461
|
exports.LoginStageEnum = LoginStageEnum;
|
|
258110
258462
|
exports.MACRO_LABELS = MACRO_LABELS;
|
|
258111
258463
|
exports.MAX_ARCHIVED_DEBUG_NOTES = MAX_ARCHIVED_DEBUG_NOTES;
|
|
258464
|
+
exports.MAX_BIRTH_DECISION_RECORDS = MAX_BIRTH_DECISION_RECORDS;
|
|
258465
|
+
exports.MAX_BIRTH_LATENCY_PROXY_MS = MAX_BIRTH_LATENCY_PROXY_MS;
|
|
258112
258466
|
exports.MAX_CLIP_EVENT_IDS = MAX_CLIP_EVENT_IDS;
|
|
258113
258467
|
exports.MAX_CLIP_LABELS = MAX_CLIP_LABELS;
|
|
258114
258468
|
exports.MAX_CONDITION_DEPTH = MAX_CONDITION_DEPTH;
|