@trillboards/edge-sdk 0.2.230 → 0.2.234
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/DetectorFieldProducer.d.ts +17 -1
- package/dist/DetectorFieldProducer.d.ts.map +1 -1
- package/dist/DetectorFieldProducer.js +24 -2
- package/dist/DetectorFieldProducer.js.map +1 -1
- package/dist/DetectorFields.d.ts +6 -0
- package/dist/DetectorFields.d.ts.map +1 -1
- package/dist/DetectorFields.js +11 -2
- package/dist/DetectorFields.js.map +1 -1
- package/dist/EdgeAgent.js +1 -1
- package/dist/PhoneHeldInHand.d.ts +31 -5
- package/dist/PhoneHeldInHand.d.ts.map +1 -1
- package/dist/PhoneHeldInHand.js +46 -28
- package/dist/PhoneHeldInHand.js.map +1 -1
- package/dist/SceneMarks.d.ts +72 -0
- package/dist/SceneMarks.d.ts.map +1 -0
- package/dist/SceneMarks.js +119 -0
- package/dist/SceneMarks.js.map +1 -0
- package/dist/ScopedVlmReview.d.ts +12 -0
- package/dist/ScopedVlmReview.d.ts.map +1 -1
- package/dist/ScopedVlmReview.js +54 -11
- package/dist/ScopedVlmReview.js.map +1 -1
- package/dist/SensingProfileClient.d.ts +7 -0
- package/dist/SensingProfileClient.d.ts.map +1 -1
- package/dist/SensingProfileClient.js +5 -1
- package/dist/SensingProfileClient.js.map +1 -1
- package/dist/UniformSceneStore.d.ts +15 -6
- package/dist/UniformSceneStore.d.ts.map +1 -1
- package/dist/UniformSceneStore.js +28 -9
- package/dist/UniformSceneStore.js.map +1 -1
- package/dist/diagnose.d.ts +1 -1
- package/dist/diagnose.js +1 -1
- package/dist/localSensing.d.ts +32 -8
- package/dist/localSensing.d.ts.map +1 -1
- package/dist/localSensing.js +82 -31
- package/dist/localSensing.js.map +1 -1
- package/package.json +1 -1
- package/retained/__tests__/evidence-uploads.test.cjs +25 -1
- package/retained/manager.cjs +3 -1
- package/retained/website-api-capability.cjs +5 -2
|
@@ -37,23 +37,28 @@ exports.UniformSceneStore = void 0;
|
|
|
37
37
|
const fs = __importStar(require("fs"));
|
|
38
38
|
const path = __importStar(require("path"));
|
|
39
39
|
const DetectorFields_1 = require("./DetectorFields");
|
|
40
|
+
const SceneMarks_1 = require("./SceneMarks");
|
|
40
41
|
/** At most this many fields per feed are kept: a camera holds a handful of alert areas. */
|
|
41
42
|
const MAX_FIELDS = 16;
|
|
42
43
|
/** A field not looked at for this long (capture time) is dropped when the file is next written. */
|
|
43
44
|
const STALE_MS = 7 * 24 * 3600000;
|
|
44
45
|
/**
|
|
45
|
-
* One feed's
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
46
|
+
* One feed's scene memory: what this camera has learned to ignore. The uniform_colour_absence_v2 memories
|
|
47
|
+
* (its screens and fixtures, per alert field) and the owner's real/false marks on its alerts (SceneMarks.ts,
|
|
48
|
+
* the same per-camera memory, section 5h), kept in the connector's data directory so a restart (an update, a
|
|
49
|
+
* reboot) does not relearn every screen and fixture: a relearn is holdMs of looks in which a fixture still
|
|
50
|
+
* reads as a customer (docs/runbooks/cctv-detector-tier.md section 5f). The marks are the server's: each
|
|
51
|
+
* profile replaces them whole, and the box never edits one. Written when the looks it holds have moved
|
|
52
|
+
* saveEveryMs of capture time past the last write, or when the marks change, atomically (temp file, rename).
|
|
53
|
+
* Reading or writing the file never fails a review: an unreadable file starts empty, and a failed write costs
|
|
54
|
+
* at most a relearn after a restart.
|
|
51
55
|
*/
|
|
52
56
|
class UniformSceneStore {
|
|
53
57
|
constructor(file, saveEveryMs = 60000) {
|
|
54
58
|
this.file = file;
|
|
55
59
|
this.saveEveryMs = saveEveryMs;
|
|
56
60
|
this.memories = new Map();
|
|
61
|
+
this.ownerMarks = [];
|
|
57
62
|
this.savedAtMs = -Infinity;
|
|
58
63
|
this.dirty = false;
|
|
59
64
|
if (!file)
|
|
@@ -67,6 +72,7 @@ class UniformSceneStore {
|
|
|
67
72
|
if (memory.lastAtMs >= 0)
|
|
68
73
|
this.memories.set(field, memory);
|
|
69
74
|
}
|
|
75
|
+
this.ownerMarks = (0, SceneMarks_1.parseSceneMarks)(raw.marks === undefined ? undefined : { version: 1, marks: raw.marks }) ?? [];
|
|
70
76
|
}
|
|
71
77
|
catch { /* no file yet, or unreadable: start empty */ }
|
|
72
78
|
}
|
|
@@ -77,19 +83,32 @@ class UniformSceneStore {
|
|
|
77
83
|
if (memory.lastAtMs - this.savedAtMs >= this.saveEveryMs)
|
|
78
84
|
this.flush();
|
|
79
85
|
}
|
|
86
|
+
/** The owner's marks of one family on this camera (all of them without a family). */
|
|
87
|
+
marks(family) {
|
|
88
|
+
return family ? this.ownerMarks.filter(m => m.family === family) : [...this.ownerMarks];
|
|
89
|
+
}
|
|
90
|
+
/** The marks the latest profile carries, replacing every earlier one. */
|
|
91
|
+
setMarks(marks) {
|
|
92
|
+
if (JSON.stringify(marks) === JSON.stringify(this.ownerMarks))
|
|
93
|
+
return;
|
|
94
|
+
this.ownerMarks = JSON.parse(JSON.stringify(marks));
|
|
95
|
+
this.dirty = true;
|
|
96
|
+
this.flush();
|
|
97
|
+
}
|
|
80
98
|
/** Write the memories now if they changed since the last write. */
|
|
81
99
|
flush() {
|
|
82
100
|
if (!this.file || !this.dirty)
|
|
83
101
|
return;
|
|
84
|
-
const newest = Math.max(...[...this.memories.values()].map(m => m.lastAtMs));
|
|
102
|
+
const newest = Math.max(-1, ...[...this.memories.values()].map(m => m.lastAtMs));
|
|
85
103
|
const fields = [...this.memories].filter(([, m]) => newest - m.lastAtMs <= STALE_MS)
|
|
86
104
|
.sort((a, b) => b[1].lastAtMs - a[1].lastAtMs).slice(0, MAX_FIELDS);
|
|
87
105
|
const tmp = `${this.file}.${process.pid}.tmp`;
|
|
88
106
|
try {
|
|
89
107
|
fs.mkdirSync(path.dirname(this.file), { recursive: true });
|
|
90
|
-
fs.writeFileSync(tmp, JSON.stringify({ version: 1, fields: Object.fromEntries(fields)
|
|
108
|
+
fs.writeFileSync(tmp, JSON.stringify({ version: 1, fields: Object.fromEntries(fields),
|
|
109
|
+
...(this.ownerMarks.length ? { marks: this.ownerMarks } : {}) }), { mode: 0o600 });
|
|
91
110
|
fs.renameSync(tmp, this.file);
|
|
92
|
-
this.savedAtMs = newest;
|
|
111
|
+
this.savedAtMs = Math.max(this.savedAtMs, newest);
|
|
93
112
|
this.dirty = false;
|
|
94
113
|
}
|
|
95
114
|
catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UniformSceneStore.js","sourceRoot":"","sources":["../src/UniformSceneStore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,qDAAiF;
|
|
1
|
+
{"version":3,"file":"UniformSceneStore.js","sourceRoot":"","sources":["../src/UniformSceneStore.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,qDAAiF;AACjF,6CAAmF;AAEnF,2FAA2F;AAC3F,MAAM,UAAU,GAAC,EAAE,CAAC;AACpB,mGAAmG;AACnG,MAAM,QAAQ,GAAC,CAAC,GAAC,EAAE,GAAC,OAAQ,CAAC;AAE7B;;;;;;;;;;GAUG;AACH,MAAa,iBAAiB;IAK5B,YAA6B,IAAY,EAAkB,cAAY,KAAM;QAAhD,SAAI,GAAJ,IAAI,CAAQ;QAAkB,gBAAW,GAAX,WAAW,CAAO;QAJ5D,aAAQ,GAAC,IAAI,GAAG,EAA6B,CAAC;QACvD,eAAU,GAAa,EAAE,CAAC;QAC1B,cAAS,GAAC,CAAC,QAAQ,CAAC;QACpB,UAAK,GAAC,KAAK,CAAC;QAElB,IAAG,CAAC,IAAI;YAAC,OAAO;QAChB,IAAG,CAAC;YACF,MAAM,GAAG,GAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAAC,MAAM,CAAC,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,UAAU,CAAC,CAAC;QAChE,MAAM,GAAG,GAAC,GAAG,IAAI,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,MAAM,CAAC;QAC5C,IAAG,CAAC;YACF,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC,EAAC,SAAS,EAAC,IAAI,EAAC,CAAC,CAAC;YACvD,EAAE,CAAC,aAAa,CAAC,GAAG,EAAC,IAAI,CAAC,SAAS,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,MAAM,EAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC;gBAC9E,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAA,CAAC,CAAA,EAAC,KAAK,EAAC,IAAI,CAAC,UAAU,EAAC,CAAA,CAAC,CAAA,EAAE,CAAC,EAAC,CAAC,EAAC,EAAC,IAAI,EAAC,KAAK,EAAC,CAAC,CAAC;YACzE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC7B,IAAI,CAAC,SAAS,GAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAC,MAAM,CAAC,CAAC;YAC/C,IAAI,CAAC,KAAK,GAAC,KAAK,CAAC;QACnB,CAAC;QAAA,MAAK,CAAC;YACL,IAAG,CAAC;gBAAA,EAAE,CAAC,MAAM,CAAC,GAAG,EAAC,EAAC,KAAK,EAAC,IAAI,EAAC,CAAC,CAAC;YAAA,CAAC;YAAA,MAAK,CAAC,CAAC,sBAAsB,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;CACF;AApDD,8CAoDC"}
|
package/dist/diagnose.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export interface DiagnosticReport {
|
|
|
31
31
|
skipped: number;
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
declare const SDK_VERSION = "0.2.
|
|
34
|
+
declare const SDK_VERSION = "0.2.234";
|
|
35
35
|
declare function checkNodeVersion(): CheckResult;
|
|
36
36
|
declare function checkPlatform(): CheckResult;
|
|
37
37
|
declare function checkMemory(): CheckResult;
|
package/dist/diagnose.js
CHANGED
|
@@ -63,7 +63,7 @@ const localNetworkAccess_1 = require("./localNetworkAccess");
|
|
|
63
63
|
// ---------------------------------------------------------------------------
|
|
64
64
|
// SDK version — mirrors package.json; kept in sync by CI
|
|
65
65
|
// ---------------------------------------------------------------------------
|
|
66
|
-
const SDK_VERSION = '0.2.
|
|
66
|
+
const SDK_VERSION = '0.2.234';
|
|
67
67
|
exports._SDK_VERSION = SDK_VERSION;
|
|
68
68
|
// ---------------------------------------------------------------------------
|
|
69
69
|
// ANSI helpers (no external deps)
|
package/dist/localSensing.d.ts
CHANGED
|
@@ -45,15 +45,23 @@ export declare function alertPositiveKeys(o: {
|
|
|
45
45
|
export declare function isAlertOnset(now: ReadonlySet<string>, previous: ReadonlySet<string> | null): boolean;
|
|
46
46
|
/**
|
|
47
47
|
* Why a retained review does or does not carry its photo.
|
|
48
|
-
* alert
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
48
|
+
* alert an alert field is positive and something positive now was not on
|
|
49
|
+
* the camera's previous live look (an onset), or the review is a
|
|
50
|
+
* per-person (actor) review: the photo is the alert's evidence;
|
|
51
|
+
* recheck the look that decides a wait-and-recheck alert (its follow-up slot);
|
|
52
|
+
* sample the camera's one sampled photo of its 10-minute slot. While an
|
|
53
|
+
* alert stays open this is the photo that shows it continued;
|
|
54
|
+
* continuing an alert field still positive on a look that adds nothing positive
|
|
55
|
+
* to the previous live look, against an API that takes such a look
|
|
56
|
+
* without its photo (`evidenceImage.episodeContinuation`): the alert
|
|
57
|
+
* fired at its onset and this look only continues it. The API
|
|
58
|
+
* refuses (422) one that still needs its photo, and it is resent
|
|
59
|
+
* with it;
|
|
60
|
+
* withheld everything else: the structured answer alone;
|
|
61
|
+
* legacy the server cannot take a review without its photo, or this camera's
|
|
62
|
+
* alert fields are unknown: every review keeps its photo.
|
|
55
63
|
*/
|
|
56
|
-
export type EvidenceImageReason = 'alert' | 'recheck' | 'sample' | 'withheld' | 'legacy';
|
|
64
|
+
export type EvidenceImageReason = 'alert' | 'recheck' | 'sample' | 'continuing' | 'withheld' | 'legacy';
|
|
57
65
|
/** One sampled photo per camera per this long, by capture time. */
|
|
58
66
|
export declare const EVIDENCE_SAMPLE_INTERVAL_MS: number;
|
|
59
67
|
/**
|
|
@@ -83,6 +91,13 @@ export declare function evidenceImageReason(o: {
|
|
|
83
91
|
followUp: boolean;
|
|
84
92
|
capturedAtMs: number;
|
|
85
93
|
lastSampleCapturedAtMs: number | null;
|
|
94
|
+
/**
|
|
95
|
+
* The server takes a look that only continues an open alert without its photo
|
|
96
|
+
* (capabilities `evidenceImage.episodeContinuation`).
|
|
97
|
+
*/
|
|
98
|
+
continuationImageless?: boolean;
|
|
99
|
+
/** `alertOnset` of this answer: false when nothing positive is new since the previous live look. */
|
|
100
|
+
alertOnset?: boolean;
|
|
86
101
|
}): EvidenceImageReason;
|
|
87
102
|
/**
|
|
88
103
|
* Map a deployed profile's SELF-DESCRIBING type to the on-device field set.
|
|
@@ -128,6 +143,12 @@ export interface LocalSensingClientOptions {
|
|
|
128
143
|
* the photo of a look that supports no alert (`evidenceImageReason`).
|
|
129
144
|
*/
|
|
130
145
|
imagelessReview?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* The paired API also takes a look that only continues an open alert without
|
|
148
|
+
* its photo (capabilities `evidenceImage.episodeContinuation`): such a look is
|
|
149
|
+
* `continuing` instead of `alert` (`evidenceImageReason`).
|
|
150
|
+
*/
|
|
151
|
+
continuingImagelessReview?: boolean;
|
|
131
152
|
/**
|
|
132
153
|
* A retained review that supported an alert was accepted: its receipt will
|
|
133
154
|
* name the clip to cut. `critical`: the review could have fired a new alert
|
|
@@ -410,6 +431,7 @@ export declare class LocalSensingClient implements SensingClient {
|
|
|
410
431
|
private readonly attachEvidenceFrame;
|
|
411
432
|
/** The paired API takes a retained review without its photo. */
|
|
412
433
|
private readonly imagelessReview;
|
|
434
|
+
private readonly continuingImagelessReview;
|
|
413
435
|
private readonly onAlertEvidenceAccepted?;
|
|
414
436
|
/** The fields this camera's enabled alerts read (current profile); null = unknown. */
|
|
415
437
|
private cachedAlertFields;
|
|
@@ -573,6 +595,8 @@ export interface BuildLocalSensingDeps {
|
|
|
573
595
|
websiteManagedProfiles?: boolean;
|
|
574
596
|
/** Does the paired API take this feed's retained reviews without a photo (its `imagelessReview` capability)? */
|
|
575
597
|
imagelessReview?: (feed: ResolvedFeed) => boolean;
|
|
598
|
+
/** ...and a look that only continues an open alert without one (`evidenceImage.episodeContinuation`)? */
|
|
599
|
+
continuingImagelessReview?: (feed: ResolvedFeed) => boolean;
|
|
576
600
|
rtspProviderFactory?: (feed: ResolvedFeed) => CameraProvider;
|
|
577
601
|
streamUrlResolver?: (feed: ResolvedFeed, currentUrl: string, error: Error) => Promise<string | null>;
|
|
578
602
|
localProviderFactory?: (feed: ResolvedFeed) => LiteRtVlmProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localSensing.d.ts","sourceRoot":"","sources":["../src/localSensing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAwB,MAAM,wBAAwB,CAAC;AAInF,OAAO,EAA2B,KAAK,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACnG,OAAO,EACL,qBAAqB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAGtF,OAAO,EAAyC,KAAK,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC5H,OAAO,EACL,qBAAqB,EAGrB,KA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E,MAAM,EAAE,CAAC;CACxB;AAID,qEAAqE;AACrE,wBAAgB,qBAAqB,IAAI,kBAAkB,CAM1D;AAmBD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,eAAe,EACvB,IAAI,CAAC,EAAE,qBAAqB,GAC3B,eAAe,EAAE,CAgRnB"}
|
package/dist/localSensing.js
CHANGED
|
@@ -69,6 +69,7 @@ const PhoneEmbeddingClassifier_1 = require("./PhoneEmbeddingClassifier");
|
|
|
69
69
|
const PhoneHeldInHand_1 = require("./PhoneHeldInHand");
|
|
70
70
|
const DetectorFields_1 = require("./DetectorFields");
|
|
71
71
|
const UniformSceneStore_1 = require("./UniformSceneStore");
|
|
72
|
+
const SceneMarks_1 = require("./SceneMarks");
|
|
72
73
|
const CloudSensingManager_1 = require("./CloudSensingManager");
|
|
73
74
|
const localInferenceSchema_1 = require("./localInferenceSchema");
|
|
74
75
|
const legacyRecorderProfile_1 = require("./legacyRecorderProfile");
|
|
@@ -144,13 +145,18 @@ function evidenceImageReason(o) {
|
|
|
144
145
|
if (Object.prototype.hasOwnProperty.call(o.structured, field))
|
|
145
146
|
picked[field] = o.structured[field];
|
|
146
147
|
}
|
|
147
|
-
|
|
148
|
+
const sampleDue = o.lastSampleCapturedAtMs === null
|
|
149
|
+
|| o.capturedAtMs - o.lastSampleCapturedAtMs >= exports.EVIDENCE_SAMPLE_INTERVAL_MS
|
|
150
|
+
|| o.capturedAtMs < o.lastSampleCapturedAtMs;
|
|
151
|
+
if (isAlertWorthy(picked, o.absenceWatchedFields)) {
|
|
152
|
+
// A positive that adds nothing to the previous live look continues an alert
|
|
153
|
+
// that fired at its onset (Texas camera 3: one car parked backwards kept
|
|
154
|
+
// 1,090 photos an hour). Only an API that says so takes it without its photo.
|
|
155
|
+
if (o.continuationImageless === true && o.alertOnset === false)
|
|
156
|
+
return sampleDue ? 'sample' : 'continuing';
|
|
148
157
|
return 'alert';
|
|
149
|
-
if (o.lastSampleCapturedAtMs === null || o.capturedAtMs - o.lastSampleCapturedAtMs >= exports.EVIDENCE_SAMPLE_INTERVAL_MS
|
|
150
|
-
|| o.capturedAtMs < o.lastSampleCapturedAtMs) {
|
|
151
|
-
return 'sample';
|
|
152
158
|
}
|
|
153
|
-
return 'withheld';
|
|
159
|
+
return sampleDue ? 'sample' : 'withheld';
|
|
154
160
|
}
|
|
155
161
|
/**
|
|
156
162
|
* The server's own name for a Sense-Anything profile — one an operator authored
|
|
@@ -581,6 +587,7 @@ class LocalSensingClient {
|
|
|
581
587
|
this.cachedPrompt = this.basePrompt;
|
|
582
588
|
this.attachEvidenceFrame = options.attachEvidenceFrame !== false;
|
|
583
589
|
this.imagelessReview = options.imagelessReview === true;
|
|
590
|
+
this.continuingImagelessReview = this.imagelessReview && options.continuingImagelessReview === true;
|
|
584
591
|
this.onAlertEvidenceAccepted = options.onAlertEvidenceAccepted;
|
|
585
592
|
this.detectorCountsEnabled = options.detectorCounts === true;
|
|
586
593
|
if (this.detectorCountsEnabled)
|
|
@@ -598,8 +605,12 @@ class LocalSensingClient {
|
|
|
598
605
|
if (!this.scopedVlmReviewEnabled)
|
|
599
606
|
throw Error('Declared profile review requires scoped review');
|
|
600
607
|
}
|
|
601
|
-
this.producerOptions = options.detectorFieldProducerOptions ?? {};
|
|
602
608
|
this.sceneMemory = new UniformSceneStore_1.UniformSceneStore(options.sceneMemoryFile);
|
|
609
|
+
// The owner's person marks (SceneMarks.ts) ride every producer this camera builds: a detection they name
|
|
610
|
+
// is not counted by person_count, person_present or any drawn area.
|
|
611
|
+
this.producerOptions = { ...(options.detectorFieldProducerOptions ?? {}),
|
|
612
|
+
ignoreDetection: (detection, frame) => detection.label === 'person'
|
|
613
|
+
&& (0, SceneMarks_1.ignoredByMarks)(this.sceneMemory.marks('person'), 'person', (0, SceneMarks_1.normalizedBox)(detection.box, frame), detection.confidence) };
|
|
603
614
|
this.nativeReadinessProbe = options.nativeReadinessProbe ?? (0, NativeReadiness_1.createNativeReadinessProbe)(this.producerOptions);
|
|
604
615
|
this.actorActionProducer = new ActorActionProducer_1.ActorActionProducer(options.actorActionClient ?? new ActorActionClient_1.ActorActionClient({
|
|
605
616
|
baseUrl: this.producerOptions.baseUrl, timeoutMs: this.producerOptions.timeoutMs
|
|
@@ -738,6 +749,8 @@ class LocalSensingClient {
|
|
|
738
749
|
this.cachedAbsenceWatchedFields = new Set(profile.absenceWatchedFields || []);
|
|
739
750
|
// Absent = unknown, and unknown keeps every photo (evidenceImageReason 'legacy').
|
|
740
751
|
this.cachedAlertFields = Array.isArray(profile.alertFields) ? new Set(profile.alertFields) : null;
|
|
752
|
+
// The owner's marks: each profile replaces them whole, absent = none (SceneMarks.ts).
|
|
753
|
+
this.sceneMemory.setMarks(profile.sceneMarks ?? []);
|
|
741
754
|
const fieldSet = declaredWebsiteProfile ? 'operator' : fieldSetForProfileType(profile.profileType);
|
|
742
755
|
this.activeFieldSet = fieldSet;
|
|
743
756
|
// `?? []` is load-bearing. This assignment predates any consumer, so a
|
|
@@ -1386,11 +1399,13 @@ class LocalSensingClient {
|
|
|
1386
1399
|
progress: request.scopedVlmProgress, checkpoint: request.checkpointScopedReview,
|
|
1387
1400
|
...(scopedReview.phonePersonViews ? { proposePeople: this.phonePersonDetector } : {}),
|
|
1388
1401
|
...(scopedReview.phoneHeldInHand ? { detectHeldPhone: this.heldPhoneDetector } : {}),
|
|
1402
|
+
// The camera's scene memory: the uniform scenes, and the owner's marks every box method applies.
|
|
1403
|
+
sceneMemory: { get: (field) => this.sceneMemory.get(field),
|
|
1404
|
+
set: (field, memory) => this.sceneMemory.set(field, memory),
|
|
1405
|
+
marks: family => this.sceneMemory.marks(family) },
|
|
1389
1406
|
...(scopedReview.detectorFields ? { detectFields, capturedAtMs,
|
|
1390
1407
|
gateMemory: { get: (field) => this.vehicleGateMemory.get(field),
|
|
1391
1408
|
set: (field, memory) => { this.vehicleGateMemory.set(field, memory); } },
|
|
1392
|
-
sceneMemory: { get: (field) => this.sceneMemory.get(field),
|
|
1393
|
-
set: (field, memory) => this.sceneMemory.set(field, memory) },
|
|
1394
1409
|
orientVehicles: (jpeg, method, boxes) => this.vehicleOrienter(jpeg, {
|
|
1395
1410
|
model: { modelId: method.orientation.model.modelId, sha256: method.orientation.model.sha256 },
|
|
1396
1411
|
buildingSide: method.orientation.buildingSide, preprocessing: DetectorFields_1.VEHICLE_END_PREPROCESSING, boxes
|
|
@@ -1505,24 +1520,11 @@ class LocalSensingClient {
|
|
|
1505
1520
|
}
|
|
1506
1521
|
const analyzeMs = Date.now() - startedAt;
|
|
1507
1522
|
this.analyzeCost.record(analyzeMs);
|
|
1508
|
-
// A retained review decides its photo now, with the answer it is about,
|
|
1509
|
-
// and saves the decision so every upload retry sends the same bytes.
|
|
1510
|
-
const evidenceImage = request.reviewWindowMs === undefined ? undefined : evidenceImageReason({
|
|
1511
|
-
structured,
|
|
1512
|
-
alertFields: this.cachedAlertFields,
|
|
1513
|
-
absenceWatchedFields: absence,
|
|
1514
|
-
imagelessAccepted: this.imagelessReview,
|
|
1515
|
-
actorReview: actorProduction !== undefined && actorProduction !== null,
|
|
1516
|
-
followUp: request.reviewSchedule?.slot === 'follow_up',
|
|
1517
|
-
capturedAtMs,
|
|
1518
|
-
lastSampleCapturedAtMs: this.lastEvidenceSampleAtMs,
|
|
1519
|
-
});
|
|
1520
|
-
if (evidenceImage === 'sample')
|
|
1521
|
-
this.lastEvidenceSampleAtMs = capturedAtMs;
|
|
1522
1523
|
// Onset against the camera's previous LIVE look; a backlog frame is
|
|
1523
|
-
// history and neither starts nor ends anything live.
|
|
1524
|
-
//
|
|
1525
|
-
// the marker counts as an onset, the
|
|
1524
|
+
// history and neither starts nor ends anything live. It sets the update's
|
|
1525
|
+
// safe point and whether a positive look carries its photo; it can never
|
|
1526
|
+
// fail a look (an answer without the marker counts as an onset, the
|
|
1527
|
+
// cautious reading, and an onset keeps its photo).
|
|
1526
1528
|
let alertOnset;
|
|
1527
1529
|
try {
|
|
1528
1530
|
const positives = request.reviewWindowMs === undefined ? null : alertPositiveKeys({
|
|
@@ -1542,8 +1544,36 @@ class LocalSensingClient {
|
|
|
1542
1544
|
alertOnset = undefined;
|
|
1543
1545
|
this.lastAlertPositives = null;
|
|
1544
1546
|
}
|
|
1547
|
+
// A retained review decides its photo now, with the answer it is about,
|
|
1548
|
+
// and saves the decision so every upload retry sends the same bytes. A
|
|
1549
|
+
// backlog frame is history: it never continues a live alert.
|
|
1550
|
+
const evidenceImage = request.reviewWindowMs === undefined ? undefined : evidenceImageReason({
|
|
1551
|
+
structured,
|
|
1552
|
+
alertFields: this.cachedAlertFields,
|
|
1553
|
+
absenceWatchedFields: absence,
|
|
1554
|
+
imagelessAccepted: this.imagelessReview,
|
|
1555
|
+
actorReview: actorProduction !== undefined && actorProduction !== null,
|
|
1556
|
+
followUp: request.reviewSchedule?.slot === 'follow_up',
|
|
1557
|
+
capturedAtMs,
|
|
1558
|
+
lastSampleCapturedAtMs: this.lastEvidenceSampleAtMs,
|
|
1559
|
+
continuationImageless: this.continuingImagelessReview && request.reviewSchedule?.slot !== 'backlog',
|
|
1560
|
+
alertOnset,
|
|
1561
|
+
});
|
|
1562
|
+
if (evidenceImage === 'sample')
|
|
1563
|
+
this.lastEvidenceSampleAtMs = capturedAtMs;
|
|
1564
|
+
// The boxes behind each box-decided yes, for the upload (SceneMarks.ts): the scoped review's native and
|
|
1565
|
+
// phone answers, then the producer's people. Only an answer that is yes and box-decided carries one.
|
|
1566
|
+
const causeMap = {};
|
|
1567
|
+
for (const trace of scopeReviews ?? [])
|
|
1568
|
+
Object.assign(causeMap, trace.sceneCauses ?? {});
|
|
1569
|
+
for (const p of produced?.produced ?? [])
|
|
1570
|
+
if (p.value === true && p.boxes?.length)
|
|
1571
|
+
causeMap[p.field] = { family: 'person', boxes: p.boxes };
|
|
1572
|
+
const detectorCauses = (0, SceneMarks_1.readSceneCauses)(Object.fromEntries(Object.entries(causeMap)
|
|
1573
|
+
.filter(([field]) => structured[field] === true && typeof detectorProduced?.[field] === 'string')));
|
|
1545
1574
|
saved = {
|
|
1546
1575
|
version: 1, structured, detectorProduced, analyzeMs, promptText,
|
|
1576
|
+
...(detectorCauses ? { detectorCauses } : {}),
|
|
1547
1577
|
...(actorProduction ?? {}),
|
|
1548
1578
|
reviewedAtMs: Date.now(), evidenceSha256,
|
|
1549
1579
|
...(selection ? { runtimeSelectionSha256: (0, ProfileReviewWork_1.reviewContextHash)(context) } : {}),
|
|
@@ -1605,7 +1635,8 @@ class LocalSensingClient {
|
|
|
1605
1635
|
// saved before the decision existed keeps the photo it always carried, and
|
|
1606
1636
|
// a per-person (actor) review always carries it.
|
|
1607
1637
|
const attachJpeg = this.attachEvidenceFrame
|
|
1608
|
-
&& (review ? saved.evidenceImage !== 'withheld'
|
|
1638
|
+
&& (review ? (saved.evidenceImage !== 'withheld' && saved.evidenceImage !== 'continuing')
|
|
1639
|
+
|| saved.actorReview !== undefined : saved.hasSignal);
|
|
1609
1640
|
const uploadOptions = {
|
|
1610
1641
|
capturedAt: capturedAtMs,
|
|
1611
1642
|
captureMode: request.captureMode,
|
|
@@ -1616,6 +1647,9 @@ class LocalSensingClient {
|
|
|
1616
1647
|
...(saved.detectorProduced ? { detectorProduced: saved.detectorProduced } : {}),
|
|
1617
1648
|
...((request.extra || review || saved.actorReview) ? {
|
|
1618
1649
|
extra: { ...request.extra, ...(review ? { evidenceReview: review } : {}),
|
|
1650
|
+
// The boxes behind each box-decided yes, so the owner's mark on its alert can be learned (SceneMarks.ts).
|
|
1651
|
+
...(review && (0, SceneMarks_1.readSceneCauses)(saved.detectorCauses) ? { detectorCauses: { version: 1,
|
|
1652
|
+
fields: (0, SceneMarks_1.readSceneCauses)(saved.detectorCauses) } } : {}),
|
|
1619
1653
|
...(saved.actorReview ? { actorReview: saved.actorReview } : {}),
|
|
1620
1654
|
// Keep the screening decision in durable server evidence. The existing
|
|
1621
1655
|
// source channel describes the VLM route; this trace identifies work
|
|
@@ -1628,6 +1662,19 @@ class LocalSensingClient {
|
|
|
1628
1662
|
...(trace.region ? { region: trace.region } : {}), classifier: trace.phoneEmbeddingClassifier,
|
|
1629
1663
|
})),
|
|
1630
1664
|
} } : {}),
|
|
1665
|
+
// The held-phone rule's own answer for each scope it decided: which method answered, whether a staff
|
|
1666
|
+
// member had the phone in hand, and, when the alone rule (staff_v4+) refused that hold, the person in view
|
|
1667
|
+
// who refused it. phone_use alone cannot say which rule answered or why a hold was not an alert.
|
|
1668
|
+
...(saved.scopeReviews?.some(trace => trace.phoneHeldInHand) ? { phoneHeldReview: {
|
|
1669
|
+
version: 1,
|
|
1670
|
+
scopes: saved.scopeReviews.filter(trace => trace.phoneHeldInHand).map(trace => {
|
|
1671
|
+
const held = trace.phoneHeldInHand, refused = held.notAlone;
|
|
1672
|
+
return { fields: trace.fields, method: held.method, phoneInHand: held.held !== null || refused !== undefined,
|
|
1673
|
+
refusal: refused ? { reason: 'customer_in_view', personConfidence: Math.round(refused.customer.confidence * 1e4) / 1e4,
|
|
1674
|
+
uniformFraction: refused.customer.uniformFraction === null ? null
|
|
1675
|
+
: Math.round(refused.customer.uniformFraction * 1e4) / 1e4 } : null };
|
|
1676
|
+
}),
|
|
1677
|
+
} } : {}),
|
|
1631
1678
|
...(selectedDetectorOnly ? { selectedDetectorReview: {
|
|
1632
1679
|
version: 1, selectionSha256: saved.runtimeSelectionSha256,
|
|
1633
1680
|
fields: selection.fieldOwners.map(owner => owner.field), confidence: 'not_measured',
|
|
@@ -1652,13 +1699,16 @@ class LocalSensingClient {
|
|
|
1652
1699
|
};
|
|
1653
1700
|
const withJpeg = { ...uploadOptions, jpeg: request.jpeg, evidenceId, evidenceSha256 };
|
|
1654
1701
|
let response = await this.uploadClient.analyzePreAnalyzed(result, attachJpeg ? withJpeg : uploadOptions);
|
|
1702
|
+
let photoRequested = false;
|
|
1655
1703
|
if (review && !attachJpeg && this.attachEvidenceFrame && response.statusCode === 422
|
|
1656
1704
|
&& response.body?.reason === exports.EVIDENCE_IMAGE_REQUIRED) {
|
|
1705
|
+
photoRequested = true;
|
|
1657
1706
|
// The server read this answer against its own snapshot of the camera's
|
|
1658
|
-
// routes as
|
|
1659
|
-
// canonical key derived from the answer
|
|
1660
|
-
//
|
|
1661
|
-
//
|
|
1707
|
+
// routes as needing its photo (a field the box does not watch, a
|
|
1708
|
+
// canonical key derived from the answer, a positive the box took as
|
|
1709
|
+
// continuing that opens an alert on the server). An alert is delivered
|
|
1710
|
+
// with its photo or not at all: resend with the JPEG, and save the
|
|
1711
|
+
// decision so every later retry of this evidence carries it too.
|
|
1662
1712
|
saved.evidenceImage = 'alert';
|
|
1663
1713
|
try {
|
|
1664
1714
|
request.checkpointAnalysis?.(saved);
|
|
@@ -1674,7 +1724,7 @@ class LocalSensingClient {
|
|
|
1674
1724
|
|| (saved.evidenceImage === 'legacy' && saved.hasSignal);
|
|
1675
1725
|
if (review && supportsAlert && response.ok && response.body?.accepted === true && this.onAlertEvidenceAccepted) {
|
|
1676
1726
|
try {
|
|
1677
|
-
this.onAlertEvidenceAccepted(evidenceId, { critical: saved.evidenceImage === 'recheck' || saved.alertOnset !== false });
|
|
1727
|
+
this.onAlertEvidenceAccepted(evidenceId, { critical: saved.evidenceImage === 'recheck' || saved.alertOnset !== false || photoRequested });
|
|
1678
1728
|
}
|
|
1679
1729
|
catch {
|
|
1680
1730
|
/* the clip is an addition to the alert, never a condition of the upload */
|
|
@@ -2009,6 +2059,7 @@ function buildLocalSensingLoops(config, deps) {
|
|
|
2009
2059
|
profileClient: profileClientFactory(feed),
|
|
2010
2060
|
attachEvidenceFrame,
|
|
2011
2061
|
imagelessReview: deps?.imagelessReview?.(feed) === true,
|
|
2062
|
+
continuingImagelessReview: deps?.continuingImagelessReview?.(feed) === true,
|
|
2012
2063
|
// Only a feed that records its own camera has a buffer to cut a clip from
|
|
2013
2064
|
// (a mosaic tile's recording belongs to its source feed's camera).
|
|
2014
2065
|
onAlertEvidenceAccepted: (evidenceId, opts) => recorderByFeed.get(feed.name)?.watchReceipt?.(evidenceId, opts),
|