@camstack/addon-mqtt-broker 1.2.87 → 1.2.89
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/mqtt-broker.addon.js +205 -2
- package/dist/mqtt-broker.addon.mjs +205 -2
- package/package.json +1 -1
|
@@ -7656,6 +7656,157 @@ var CameraSwitchGroupSchema = object({
|
|
|
7656
7656
|
/** Unix ms when the group was composed server-side. */
|
|
7657
7657
|
fetchedAt: number()
|
|
7658
7658
|
});
|
|
7659
|
+
/**
|
|
7660
|
+
* What the gate decided about a birth, from the CALLER's point of view.
|
|
7661
|
+
*
|
|
7662
|
+
* Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
|
|
7663
|
+
* at all — it is a deferral, and the row is written when the deferral ENDS.
|
|
7664
|
+
* The third member is the one the gate's own type cannot express, because
|
|
7665
|
+
* exhaustion is a property of how long the caller waited.
|
|
7666
|
+
*/
|
|
7667
|
+
var BirthDecisionVerdictSchema = _enum([
|
|
7668
|
+
"confirmed",
|
|
7669
|
+
"suppressed",
|
|
7670
|
+
"exhausted-fallback"
|
|
7671
|
+
]);
|
|
7672
|
+
/** One birth decision, as it is kept. */
|
|
7673
|
+
var BirthDecisionRecordSchema = object({
|
|
7674
|
+
id: string(),
|
|
7675
|
+
/** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
|
|
7676
|
+
at: number().int(),
|
|
7677
|
+
/** The camera. Required: every question here is asked per-camera. */
|
|
7678
|
+
deviceId: number().int(),
|
|
7679
|
+
/**
|
|
7680
|
+
* The track the decision was about. PROVENANCE, not ownership — a suppressed
|
|
7681
|
+
* birth has no track at all, and a confirmed one is expected to age out long
|
|
7682
|
+
* before this row does. Named `sourceTrackId` so the retention model's
|
|
7683
|
+
* ownership derivation (`collection-classification.ts`, which keys on a
|
|
7684
|
+
* column literally called `trackId`) cannot reach it.
|
|
7685
|
+
*/
|
|
7686
|
+
sourceTrackId: string(),
|
|
7687
|
+
/** The candidate's claimed class. The miss rate is asked per class too. */
|
|
7688
|
+
className: string(),
|
|
7689
|
+
verdict: BirthDecisionVerdictSchema,
|
|
7690
|
+
/**
|
|
7691
|
+
* The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
|
|
7692
|
+
* `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
|
|
7693
|
+
* when the gate is DISABLED and every birth is waved through. `null` is not
|
|
7694
|
+
* "unknown": it says the gate took no measurement because it was off, which
|
|
7695
|
+
* is a different population and must never be averaged in with the rest.
|
|
7696
|
+
*/
|
|
7697
|
+
reason: string().nullable(),
|
|
7698
|
+
/** Deferral attempts this birth used. 0 = decided on its first look. */
|
|
7699
|
+
attempts: number().int(),
|
|
7700
|
+
/** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
|
|
7701
|
+
deferredForMs: number().int(),
|
|
7702
|
+
/**
|
|
7703
|
+
* THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
|
|
7704
|
+
*
|
|
7705
|
+
* `true` when the frame the verdict was taken on carried no matched
|
|
7706
|
+
* detection for this track — the tracker was coasting a frozen box and the
|
|
7707
|
+
* subject was not observed. The deferred-birth re-offer pulls the candidate
|
|
7708
|
+
* straight out of `result.tracked` without checking, so this is reachable
|
|
7709
|
+
* today; the question is the RATE, per camera, and whether refusing those
|
|
7710
|
+
* frames would have cost real tracks (cross-read against `verdict` and
|
|
7711
|
+
* `decidedByBirthEvidence`).
|
|
7712
|
+
*/
|
|
7713
|
+
decidedOnCoastedFrame: boolean(),
|
|
7714
|
+
/** Were D379 birth-instant pixels in hand when this candidate was submitted? */
|
|
7715
|
+
birthEvidenceAvailable: boolean(),
|
|
7716
|
+
/**
|
|
7717
|
+
* Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
|
|
7718
|
+
* deciding are different: the carried crop is confirm-only, so a candidate
|
|
7719
|
+
* can hold evidence, be found inconclusive on it, and be decided by a native
|
|
7720
|
+
* crop of a later instant. A coasted decision backed by carried evidence is
|
|
7721
|
+
* a real observation of the birth instant; one without it is not.
|
|
7722
|
+
*/
|
|
7723
|
+
decidedByBirthEvidence: boolean(),
|
|
7724
|
+
/** Best class-compatible crop score, or `null` when nothing compatible was
|
|
7725
|
+
* found — deliberately not 0, which would be a measurement that never was. */
|
|
7726
|
+
bestScore: number().nullable(),
|
|
7727
|
+
/** The bar this candidate actually faced (the phantom-cell hook may raise it). */
|
|
7728
|
+
appliedMinConfidence: number().nullable(),
|
|
7729
|
+
/**
|
|
7730
|
+
* The track's own `firstSeen` — the candidate's first frame, which is where
|
|
7731
|
+
* the timeline starts. `null` for a suppressed birth, which has no track.
|
|
7732
|
+
*/
|
|
7733
|
+
firstSeen: number().int().nullable(),
|
|
7734
|
+
/**
|
|
7735
|
+
* The device's most recent motion RISING EDGE at the moment of the decision,
|
|
7736
|
+
* or `null` when there is none, it is older than
|
|
7737
|
+
* {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
|
|
7738
|
+
*/
|
|
7739
|
+
motionOnsetAt: number().int().nullable(),
|
|
7740
|
+
/**
|
|
7741
|
+
* `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
|
|
7742
|
+
* AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
|
|
7743
|
+
*
|
|
7744
|
+
* **Why motion onset and not something else.** Two other proxies were
|
|
7745
|
+
* considered and rejected:
|
|
7746
|
+
* - *the recording/pipeline session start*: for a camera on
|
|
7747
|
+
* `detectionMode: 'always'` the session opens at process start, hours
|
|
7748
|
+
* before any subject. It measures nothing.
|
|
7749
|
+
* - *the first detection on the device in this burst*: CIRCULAR. A track's
|
|
7750
|
+
* `firstSeen` IS the first detection of that object, so for the track that
|
|
7751
|
+
* OPENS a burst — the only one the operator is complaining about — the two
|
|
7752
|
+
* are the same instant and the latency is 0 by construction.
|
|
7753
|
+
* Motion onset is the only in-process signal produced by a DIFFERENT
|
|
7754
|
+
* mechanism from the object detector, so it is the only one that can precede
|
|
7755
|
+
* it. It is also already maintained per-device at frame rate on this very
|
|
7756
|
+
* node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
|
|
7757
|
+
* it free — and, decisively, the frame path and the motion path are gated to
|
|
7758
|
+
* the SAME designated post-processing node, so the mirror is never empty for
|
|
7759
|
+
* a camera whose births land here.
|
|
7760
|
+
*
|
|
7761
|
+
* **Error bars, all of them.**
|
|
7762
|
+
* 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
|
|
7763
|
+
* wall or a branch, and only later joined by the person, OVERSTATES the
|
|
7764
|
+
* latency without bound. Mitigated, never removed, by
|
|
7765
|
+
* {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
|
|
7766
|
+
* candidate for "this burst is this subject", and even then it is a
|
|
7767
|
+
* candidate, not a fact.
|
|
7768
|
+
* 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
|
|
7769
|
+
* intensity threshold. A subject entering slowly at the far edge of the
|
|
7770
|
+
* frame can clear the detector's confidence floor BEFORE it clears the
|
|
7771
|
+
* motion floor, making this negative. Negatives are stored as-is and
|
|
7772
|
+
* never clamped — clamping would fabricate the distribution's left tail,
|
|
7773
|
+
* which is the half that says the proxy is unreliable.
|
|
7774
|
+
* 3. *Onboard motion carries firmware latency of unknown, per-model offset*
|
|
7775
|
+
* (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
|
|
7776
|
+
* therefore comparable WITHIN a camera and not across cameras of
|
|
7777
|
+
* different motion sources. The motion source is deliberately not copied
|
|
7778
|
+
* here — it belongs to the addon that owns the device (D224) and this is
|
|
7779
|
+
* a write on the frame path — so group by `deviceId`, which is how the
|
|
7780
|
+
* question is always asked anyway.
|
|
7781
|
+
* 4. *Continuous motion.* On a busy scene the burst never closes and the
|
|
7782
|
+
* onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
|
|
7783
|
+
* past it this is `null`.
|
|
7784
|
+
* 5. *No motion signal at all* — analyzer off, onboard-only camera not
|
|
7785
|
+
* reporting, or nothing since boot: `null`. Which is the truth about a
|
|
7786
|
+
* camera nobody has a reference instant for.
|
|
7787
|
+
*
|
|
7788
|
+
* So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
|
|
7789
|
+
* as such. It is not a per-track fact and must never be shown as one.
|
|
7790
|
+
*/
|
|
7791
|
+
birthLatencyMs: number().int().nullable(),
|
|
7792
|
+
/**
|
|
7793
|
+
* How many births this device has already decided since that motion onset.
|
|
7794
|
+
* 0 = the first, i.e. the only index at which the burst plausibly belongs to
|
|
7795
|
+
* this subject. `null` when there is no usable onset.
|
|
7796
|
+
*/
|
|
7797
|
+
birthIndexInBurst: number().int().nullable()
|
|
7798
|
+
});
|
|
7799
|
+
/** Query input for `listBirthDecisions` — newest first, one camera or all. */
|
|
7800
|
+
var BirthDecisionQueryInputSchema = object({
|
|
7801
|
+
/** Restrict to a single camera; omit for every row. */
|
|
7802
|
+
deviceId: number().int().optional(),
|
|
7803
|
+
/** Only decisions at or after this epoch ms. */
|
|
7804
|
+
since: number().int().optional(),
|
|
7805
|
+
/** Restrict to one verdict — the miss rate is read one population at a time. */
|
|
7806
|
+
verdict: BirthDecisionVerdictSchema.optional(),
|
|
7807
|
+
/** Max rows returned, newest-first. */
|
|
7808
|
+
limit: number().int().min(1).max(5e3).optional()
|
|
7809
|
+
});
|
|
7659
7810
|
/** One archived note — the operator's words plus enough context to find what
|
|
7660
7811
|
* they were looking at, after the track itself is gone. */
|
|
7661
7812
|
var ArchivedDebugNoteSchema = object({
|
|
@@ -19848,7 +19999,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19848
19999
|
deviceId: number(),
|
|
19849
20000
|
trackId: string(),
|
|
19850
20001
|
flags: TrackFlagsPatchSchema
|
|
19851
|
-
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
20002
|
+
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
19852
20003
|
kind: "query",
|
|
19853
20004
|
auth: "admin"
|
|
19854
20005
|
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
@@ -20290,6 +20441,22 @@ var occupancyRecheckFramesField = {
|
|
|
20290
20441
|
step: 1
|
|
20291
20442
|
};
|
|
20292
20443
|
/**
|
|
20444
|
+
* Frames one PRE-ROLL catch-up burst may send to inference at session open.
|
|
20445
|
+
*
|
|
20446
|
+
* The default of 12 over a ~4 s retained window is one frame per ~333 ms of
|
|
20447
|
+
* footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
|
|
20448
|
+
* fleet measures — one-shot, and only ever taken while a permit would still be
|
|
20449
|
+
* spare for live. `0` turns the burst off entirely (the history is still
|
|
20450
|
+
* decoded, because that is how the dial reaches a decodable GOP, and is then
|
|
20451
|
+
* discarded — the pre-D411 behaviour).
|
|
20452
|
+
*/
|
|
20453
|
+
var preRollInferenceFramesField = {
|
|
20454
|
+
min: 0,
|
|
20455
|
+
max: 30,
|
|
20456
|
+
default: 12,
|
|
20457
|
+
step: 1
|
|
20458
|
+
};
|
|
20459
|
+
/**
|
|
20293
20460
|
* Source enum for motion signals fed to the runner. Extensible — add
|
|
20294
20461
|
* new variants here when new motion-trigger paths are wired in
|
|
20295
20462
|
* (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
|
|
@@ -20530,6 +20697,31 @@ var RunnerCameraConfigSchema = object({
|
|
|
20530
20697
|
* to every occupancy rule until something moved in front of it. The churn is
|
|
20531
20698
|
* now paid on the interval instead — see `occupancyRecheckSecField`.
|
|
20532
20699
|
*/
|
|
20700
|
+
/**
|
|
20701
|
+
* Infer the session's PRE-ROLL — the retained history the restreamer replays
|
|
20702
|
+
* at session open — instead of decoding it and throwing it away.
|
|
20703
|
+
*
|
|
20704
|
+
* DEFAULT `true`, and the default is the argument. This is not a new
|
|
20705
|
+
* capability being offered cautiously: the pre-roll is ALREADY requested,
|
|
20706
|
+
* already served, already decoded and already paid for on every on-motion
|
|
20707
|
+
* detection session that asks for history. What shipped was a last-moment
|
|
20708
|
+
* discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
|
|
20709
|
+
* arriving inside a few hundred ms of wall clock looks to it like one frame's
|
|
20710
|
+
* worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
|
|
20711
|
+
* recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
|
|
20712
|
+
* 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
|
|
20713
|
+
* was decoded, and was freed.
|
|
20714
|
+
*
|
|
20715
|
+
* Shipping that as opt-in would ship the bug: an operator cannot discover a
|
|
20716
|
+
* setting whose absence looks exactly like a camera that noticed the cyclist
|
|
20717
|
+
* late. What makes ON safe is not a switch but the BOUND —
|
|
20718
|
+
* `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
|
|
20719
|
+
* the last inference permit — so the switch exists for the camera where the
|
|
20720
|
+
* history is worthless (a doorbell whose subject is always already at the
|
|
20721
|
+
* door), not as a hedge against the feature.
|
|
20722
|
+
*/
|
|
20723
|
+
preRollInferenceEnabled: boolean().default(true),
|
|
20724
|
+
preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
|
|
20533
20725
|
occupancyRecheckEnabled: boolean().default(true),
|
|
20534
20726
|
occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
|
|
20535
20727
|
occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
|
|
@@ -20558,7 +20750,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20558
20750
|
*/
|
|
20559
20751
|
inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
|
|
20560
20752
|
});
|
|
20561
|
-
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;
|
|
20753
|
+
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;
|
|
20562
20754
|
/**
|
|
20563
20755
|
* Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
|
|
20564
20756
|
* load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
|
|
@@ -33252,6 +33444,12 @@ Object.freeze({
|
|
|
33252
33444
|
addonId: null,
|
|
33253
33445
|
access: "view"
|
|
33254
33446
|
},
|
|
33447
|
+
"pipelineAnalytics.listBirthDecisions": {
|
|
33448
|
+
capName: "pipeline-analytics",
|
|
33449
|
+
capScope: "device",
|
|
33450
|
+
addonId: null,
|
|
33451
|
+
access: "view"
|
|
33452
|
+
},
|
|
33255
33453
|
"pipelineAnalytics.listEventKinds": {
|
|
33256
33454
|
capName: "pipeline-analytics",
|
|
33257
33455
|
capScope: "device",
|
|
@@ -37044,6 +37242,11 @@ Object.freeze({
|
|
|
37044
37242
|
form: "single",
|
|
37045
37243
|
optional: true
|
|
37046
37244
|
}],
|
|
37245
|
+
"pipelineAnalytics.listBirthDecisions": [{
|
|
37246
|
+
name: "deviceId",
|
|
37247
|
+
form: "single",
|
|
37248
|
+
optional: true
|
|
37249
|
+
}],
|
|
37047
37250
|
"pipelineAnalytics.listEventKinds": [{
|
|
37048
37251
|
name: "deviceId",
|
|
37049
37252
|
form: "single",
|
|
@@ -7651,6 +7651,157 @@ var CameraSwitchGroupSchema = object({
|
|
|
7651
7651
|
/** Unix ms when the group was composed server-side. */
|
|
7652
7652
|
fetchedAt: number()
|
|
7653
7653
|
});
|
|
7654
|
+
/**
|
|
7655
|
+
* What the gate decided about a birth, from the CALLER's point of view.
|
|
7656
|
+
*
|
|
7657
|
+
* Deliberately not `ConfirmationVerdict`: `undecided` is not a birth decision
|
|
7658
|
+
* at all — it is a deferral, and the row is written when the deferral ENDS.
|
|
7659
|
+
* The third member is the one the gate's own type cannot express, because
|
|
7660
|
+
* exhaustion is a property of how long the caller waited.
|
|
7661
|
+
*/
|
|
7662
|
+
var BirthDecisionVerdictSchema = _enum([
|
|
7663
|
+
"confirmed",
|
|
7664
|
+
"suppressed",
|
|
7665
|
+
"exhausted-fallback"
|
|
7666
|
+
]);
|
|
7667
|
+
/** One birth decision, as it is kept. */
|
|
7668
|
+
var BirthDecisionRecordSchema = object({
|
|
7669
|
+
id: string(),
|
|
7670
|
+
/** Epoch ms the VERDICT was taken (not the birth instant — see `firstSeen`). */
|
|
7671
|
+
at: number().int(),
|
|
7672
|
+
/** The camera. Required: every question here is asked per-camera. */
|
|
7673
|
+
deviceId: number().int(),
|
|
7674
|
+
/**
|
|
7675
|
+
* The track the decision was about. PROVENANCE, not ownership — a suppressed
|
|
7676
|
+
* birth has no track at all, and a confirmed one is expected to age out long
|
|
7677
|
+
* before this row does. Named `sourceTrackId` so the retention model's
|
|
7678
|
+
* ownership derivation (`collection-classification.ts`, which keys on a
|
|
7679
|
+
* column literally called `trackId`) cannot reach it.
|
|
7680
|
+
*/
|
|
7681
|
+
sourceTrackId: string(),
|
|
7682
|
+
/** The candidate's claimed class. The miss rate is asked per class too. */
|
|
7683
|
+
className: string(),
|
|
7684
|
+
verdict: BirthDecisionVerdictSchema,
|
|
7685
|
+
/**
|
|
7686
|
+
* The gate's own `ConfirmationReason` (`confirmed`, `suppressed`,
|
|
7687
|
+
* `native-pass`, `no-crop`, `timeout`, `carried-inconclusive`, …), or `null`
|
|
7688
|
+
* when the gate is DISABLED and every birth is waved through. `null` is not
|
|
7689
|
+
* "unknown": it says the gate took no measurement because it was off, which
|
|
7690
|
+
* is a different population and must never be averaged in with the rest.
|
|
7691
|
+
*/
|
|
7692
|
+
reason: string().nullable(),
|
|
7693
|
+
/** Deferral attempts this birth used. 0 = decided on its first look. */
|
|
7694
|
+
attempts: number().int(),
|
|
7695
|
+
/** Ms from the FIRST undecided attempt to this verdict. 0 = never deferred. */
|
|
7696
|
+
deferredForMs: number().int(),
|
|
7697
|
+
/**
|
|
7698
|
+
* THE COLUMN THE RE-OFFER DEFECT IS COUNTED IN.
|
|
7699
|
+
*
|
|
7700
|
+
* `true` when the frame the verdict was taken on carried no matched
|
|
7701
|
+
* detection for this track — the tracker was coasting a frozen box and the
|
|
7702
|
+
* subject was not observed. The deferred-birth re-offer pulls the candidate
|
|
7703
|
+
* straight out of `result.tracked` without checking, so this is reachable
|
|
7704
|
+
* today; the question is the RATE, per camera, and whether refusing those
|
|
7705
|
+
* frames would have cost real tracks (cross-read against `verdict` and
|
|
7706
|
+
* `decidedByBirthEvidence`).
|
|
7707
|
+
*/
|
|
7708
|
+
decidedOnCoastedFrame: boolean(),
|
|
7709
|
+
/** Were D379 birth-instant pixels in hand when this candidate was submitted? */
|
|
7710
|
+
birthEvidenceAvailable: boolean(),
|
|
7711
|
+
/**
|
|
7712
|
+
* Did those pixels DECIDE it (`cropSource === 'carried'`)? Available and
|
|
7713
|
+
* deciding are different: the carried crop is confirm-only, so a candidate
|
|
7714
|
+
* can hold evidence, be found inconclusive on it, and be decided by a native
|
|
7715
|
+
* crop of a later instant. A coasted decision backed by carried evidence is
|
|
7716
|
+
* a real observation of the birth instant; one without it is not.
|
|
7717
|
+
*/
|
|
7718
|
+
decidedByBirthEvidence: boolean(),
|
|
7719
|
+
/** Best class-compatible crop score, or `null` when nothing compatible was
|
|
7720
|
+
* found — deliberately not 0, which would be a measurement that never was. */
|
|
7721
|
+
bestScore: number().nullable(),
|
|
7722
|
+
/** The bar this candidate actually faced (the phantom-cell hook may raise it). */
|
|
7723
|
+
appliedMinConfidence: number().nullable(),
|
|
7724
|
+
/**
|
|
7725
|
+
* The track's own `firstSeen` — the candidate's first frame, which is where
|
|
7726
|
+
* the timeline starts. `null` for a suppressed birth, which has no track.
|
|
7727
|
+
*/
|
|
7728
|
+
firstSeen: number().int().nullable(),
|
|
7729
|
+
/**
|
|
7730
|
+
* The device's most recent motion RISING EDGE at the moment of the decision,
|
|
7731
|
+
* or `null` when there is none, it is older than
|
|
7732
|
+
* {@link MAX_BIRTH_LATENCY_PROXY_MS}, or this runner never saw one.
|
|
7733
|
+
*/
|
|
7734
|
+
motionOnsetAt: number().int().nullable(),
|
|
7735
|
+
/**
|
|
7736
|
+
* `firstSeen − motionOnsetAt` — THE OPERATOR'S COMPLAINT, IN MILLISECONDS,
|
|
7737
|
+
* AND THE WEAKEST NUMBER IN THIS ROW. Read the error bars before quoting it.
|
|
7738
|
+
*
|
|
7739
|
+
* **Why motion onset and not something else.** Two other proxies were
|
|
7740
|
+
* considered and rejected:
|
|
7741
|
+
* - *the recording/pipeline session start*: for a camera on
|
|
7742
|
+
* `detectionMode: 'always'` the session opens at process start, hours
|
|
7743
|
+
* before any subject. It measures nothing.
|
|
7744
|
+
* - *the first detection on the device in this burst*: CIRCULAR. A track's
|
|
7745
|
+
* `firstSeen` IS the first detection of that object, so for the track that
|
|
7746
|
+
* OPENS a burst — the only one the operator is complaining about — the two
|
|
7747
|
+
* are the same instant and the latency is 0 by construction.
|
|
7748
|
+
* Motion onset is the only in-process signal produced by a DIFFERENT
|
|
7749
|
+
* mechanism from the object detector, so it is the only one that can precede
|
|
7750
|
+
* it. It is also already maintained per-device at frame rate on this very
|
|
7751
|
+
* node (`handleMotionAnalysis` / `handleOnboardMotion`), which is what makes
|
|
7752
|
+
* it free — and, decisively, the frame path and the motion path are gated to
|
|
7753
|
+
* the SAME designated post-processing node, so the mirror is never empty for
|
|
7754
|
+
* a camera whose births land here.
|
|
7755
|
+
*
|
|
7756
|
+
* **Error bars, all of them.**
|
|
7757
|
+
* 1. *Motion has no class.* A burst opened by rain, a headlight sweeping a
|
|
7758
|
+
* wall or a branch, and only later joined by the person, OVERSTATES the
|
|
7759
|
+
* latency without bound. Mitigated, never removed, by
|
|
7760
|
+
* {@link BirthDecisionRecord.birthIndexInBurst}: only index 0 is a
|
|
7761
|
+
* candidate for "this burst is this subject", and even then it is a
|
|
7762
|
+
* candidate, not a fact.
|
|
7763
|
+
* 2. *The sign is not guaranteed.* The analyzer needs a pixel-count and
|
|
7764
|
+
* intensity threshold. A subject entering slowly at the far edge of the
|
|
7765
|
+
* frame can clear the detector's confidence floor BEFORE it clears the
|
|
7766
|
+
* motion floor, making this negative. Negatives are stored as-is and
|
|
7767
|
+
* never clamped — clamping would fabricate the distribution's left tail,
|
|
7768
|
+
* which is the half that says the proxy is unreliable.
|
|
7769
|
+
* 3. *Onboard motion carries firmware latency of unknown, per-model offset*
|
|
7770
|
+
* (hundreds of ms), plus camera-vs-hub clock skew on top. Numbers are
|
|
7771
|
+
* therefore comparable WITHIN a camera and not across cameras of
|
|
7772
|
+
* different motion sources. The motion source is deliberately not copied
|
|
7773
|
+
* here — it belongs to the addon that owns the device (D224) and this is
|
|
7774
|
+
* a write on the frame path — so group by `deviceId`, which is how the
|
|
7775
|
+
* question is always asked anyway.
|
|
7776
|
+
* 4. *Continuous motion.* On a busy scene the burst never closes and the
|
|
7777
|
+
* onset is minutes old. Bounded by {@link MAX_BIRTH_LATENCY_PROXY_MS};
|
|
7778
|
+
* past it this is `null`.
|
|
7779
|
+
* 5. *No motion signal at all* — analyzer off, onboard-only camera not
|
|
7780
|
+
* reporting, or nothing since boot: `null`. Which is the truth about a
|
|
7781
|
+
* camera nobody has a reference instant for.
|
|
7782
|
+
*
|
|
7783
|
+
* So this is a per-camera DISTRIBUTION over index-0 births, and it is honest
|
|
7784
|
+
* as such. It is not a per-track fact and must never be shown as one.
|
|
7785
|
+
*/
|
|
7786
|
+
birthLatencyMs: number().int().nullable(),
|
|
7787
|
+
/**
|
|
7788
|
+
* How many births this device has already decided since that motion onset.
|
|
7789
|
+
* 0 = the first, i.e. the only index at which the burst plausibly belongs to
|
|
7790
|
+
* this subject. `null` when there is no usable onset.
|
|
7791
|
+
*/
|
|
7792
|
+
birthIndexInBurst: number().int().nullable()
|
|
7793
|
+
});
|
|
7794
|
+
/** Query input for `listBirthDecisions` — newest first, one camera or all. */
|
|
7795
|
+
var BirthDecisionQueryInputSchema = object({
|
|
7796
|
+
/** Restrict to a single camera; omit for every row. */
|
|
7797
|
+
deviceId: number().int().optional(),
|
|
7798
|
+
/** Only decisions at or after this epoch ms. */
|
|
7799
|
+
since: number().int().optional(),
|
|
7800
|
+
/** Restrict to one verdict — the miss rate is read one population at a time. */
|
|
7801
|
+
verdict: BirthDecisionVerdictSchema.optional(),
|
|
7802
|
+
/** Max rows returned, newest-first. */
|
|
7803
|
+
limit: number().int().min(1).max(5e3).optional()
|
|
7804
|
+
});
|
|
7654
7805
|
/** One archived note — the operator's words plus enough context to find what
|
|
7655
7806
|
* they were looking at, after the track itself is gone. */
|
|
7656
7807
|
var ArchivedDebugNoteSchema = object({
|
|
@@ -19843,7 +19994,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19843
19994
|
deviceId: number(),
|
|
19844
19995
|
trackId: string(),
|
|
19845
19996
|
flags: TrackFlagsPatchSchema
|
|
19846
|
-
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
19997
|
+
}), TrackFlagsSchema, { kind: "mutation" }), method(ArchivedDebugNoteQueryInputSchema, array(ArchivedDebugNoteSchema).readonly(), { kind: "query" }), method(BirthDecisionQueryInputSchema, array(BirthDecisionRecordSchema).readonly(), { kind: "query" }), method(object({}), EventStoreFootprintSchema, {
|
|
19847
19998
|
kind: "query",
|
|
19848
19999
|
auth: "admin"
|
|
19849
20000
|
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
@@ -20285,6 +20436,22 @@ var occupancyRecheckFramesField = {
|
|
|
20285
20436
|
step: 1
|
|
20286
20437
|
};
|
|
20287
20438
|
/**
|
|
20439
|
+
* Frames one PRE-ROLL catch-up burst may send to inference at session open.
|
|
20440
|
+
*
|
|
20441
|
+
* The default of 12 over a ~4 s retained window is one frame per ~333 ms of
|
|
20442
|
+
* footage, and costs ~480 ms of ONE inference permit at the 40 ms/frame this
|
|
20443
|
+
* fleet measures — one-shot, and only ever taken while a permit would still be
|
|
20444
|
+
* spare for live. `0` turns the burst off entirely (the history is still
|
|
20445
|
+
* decoded, because that is how the dial reaches a decodable GOP, and is then
|
|
20446
|
+
* discarded — the pre-D411 behaviour).
|
|
20447
|
+
*/
|
|
20448
|
+
var preRollInferenceFramesField = {
|
|
20449
|
+
min: 0,
|
|
20450
|
+
max: 30,
|
|
20451
|
+
default: 12,
|
|
20452
|
+
step: 1
|
|
20453
|
+
};
|
|
20454
|
+
/**
|
|
20288
20455
|
* Source enum for motion signals fed to the runner. Extensible — add
|
|
20289
20456
|
* new variants here when new motion-trigger paths are wired in
|
|
20290
20457
|
* (`wasm-cross-camera`, `event-bus-relay`, etc.). The runner uses
|
|
@@ -20525,6 +20692,31 @@ var RunnerCameraConfigSchema = object({
|
|
|
20525
20692
|
* to every occupancy rule until something moved in front of it. The churn is
|
|
20526
20693
|
* now paid on the interval instead — see `occupancyRecheckSecField`.
|
|
20527
20694
|
*/
|
|
20695
|
+
/**
|
|
20696
|
+
* Infer the session's PRE-ROLL — the retained history the restreamer replays
|
|
20697
|
+
* at session open — instead of decoding it and throwing it away.
|
|
20698
|
+
*
|
|
20699
|
+
* DEFAULT `true`, and the default is the argument. This is not a new
|
|
20700
|
+
* capability being offered cautiously: the pre-roll is ALREADY requested,
|
|
20701
|
+
* already served, already decoded and already paid for on every on-motion
|
|
20702
|
+
* detection session that asks for history. What shipped was a last-moment
|
|
20703
|
+
* discard — `FrameSlot`'s throttle compares wall clocks, and ~4 s of media
|
|
20704
|
+
* arriving inside a few hundred ms of wall clock looks to it like one frame's
|
|
20705
|
+
* worth. Device 617, 2026-09-08: a re-run of the SAME model over the stored
|
|
20706
|
+
* recording scored the subject `vehicle 0.5669` — above the 0.50 floor —
|
|
20707
|
+
* 1.68 s BEFORE the live track was born, on a frame that was in the pre-roll,
|
|
20708
|
+
* was decoded, and was freed.
|
|
20709
|
+
*
|
|
20710
|
+
* Shipping that as opt-in would ship the bug: an operator cannot discover a
|
|
20711
|
+
* setting whose absence looks exactly like a camera that noticed the cyclist
|
|
20712
|
+
* late. What makes ON safe is not a switch but the BOUND —
|
|
20713
|
+
* `preRollInferenceFrames`, a wall-clock ceiling, and a lane that never takes
|
|
20714
|
+
* the last inference permit — so the switch exists for the camera where the
|
|
20715
|
+
* history is worthless (a doorbell whose subject is always already at the
|
|
20716
|
+
* door), not as a hedge against the feature.
|
|
20717
|
+
*/
|
|
20718
|
+
preRollInferenceEnabled: boolean().default(true),
|
|
20719
|
+
preRollInferenceFrames: number().min(preRollInferenceFramesField.min).max(preRollInferenceFramesField.max).default(preRollInferenceFramesField.default),
|
|
20528
20720
|
occupancyRecheckEnabled: boolean().default(true),
|
|
20529
20721
|
occupancyRecheckSec: number().min(occupancyRecheckSecField.min).max(occupancyRecheckSecField.max).default(occupancyRecheckSecField.default),
|
|
20530
20722
|
occupancyRecheckFrames: number().min(occupancyRecheckFramesField.min).max(occupancyRecheckFramesField.max).default(occupancyRecheckFramesField.default),
|
|
@@ -20553,7 +20745,7 @@ var RunnerCameraConfigSchema = object({
|
|
|
20553
20745
|
*/
|
|
20554
20746
|
inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
|
|
20555
20747
|
});
|
|
20556
|
-
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;
|
|
20748
|
+
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;
|
|
20557
20749
|
/**
|
|
20558
20750
|
* Runtime load summary returned by `getLocalLoad`. Used by the orchestrator's
|
|
20559
20751
|
* load-balancing levels (L2 capacity-based, L3 hardware-aware) to decide
|
|
@@ -33247,6 +33439,12 @@ Object.freeze({
|
|
|
33247
33439
|
addonId: null,
|
|
33248
33440
|
access: "view"
|
|
33249
33441
|
},
|
|
33442
|
+
"pipelineAnalytics.listBirthDecisions": {
|
|
33443
|
+
capName: "pipeline-analytics",
|
|
33444
|
+
capScope: "device",
|
|
33445
|
+
addonId: null,
|
|
33446
|
+
access: "view"
|
|
33447
|
+
},
|
|
33250
33448
|
"pipelineAnalytics.listEventKinds": {
|
|
33251
33449
|
capName: "pipeline-analytics",
|
|
33252
33450
|
capScope: "device",
|
|
@@ -37039,6 +37237,11 @@ Object.freeze({
|
|
|
37039
37237
|
form: "single",
|
|
37040
37238
|
optional: true
|
|
37041
37239
|
}],
|
|
37240
|
+
"pipelineAnalytics.listBirthDecisions": [{
|
|
37241
|
+
name: "deviceId",
|
|
37242
|
+
form: "single",
|
|
37243
|
+
optional: true
|
|
37244
|
+
}],
|
|
37042
37245
|
"pipelineAnalytics.listEventKinds": [{
|
|
37043
37246
|
name: "deviceId",
|
|
37044
37247
|
form: "single",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-mqtt-broker",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.89",
|
|
4
4
|
"description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|