@trillboards/edge-sdk 0.2.39 → 0.2.41
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/README.md +1 -1
- package/deploy/docker/{Dockerfile.cloud-sense → Dockerfile.connector} +52 -39
- package/deploy/docker/README.md +73 -1
- package/deploy/docker/connector-entrypoint.sh +46 -80
- package/deploy/macos/README.md +1 -1
- package/deploy/macos/test-install-pair.sh +9 -9
- package/deploy/systemd/install.sh +16 -1
- package/deploy/systemd/setup-litertlm.sh +201 -0
- package/deploy/systemd/trillboards-edge.service +8 -4
- package/deploy/systemd/trillboards-litertlm.service +46 -0
- package/deploy/windows/register-task.ps1 +6 -3
- package/deploy/windows/run-connector.ps1 +1 -1
- package/deploy/windows/trillboards-edge-task.vbs +5 -1
- package/dist/CloudSensingManager.d.ts +45 -19
- package/dist/CloudSensingManager.d.ts.map +1 -1
- package/dist/CloudSensingManager.js +89 -46
- package/dist/CloudSensingManager.js.map +1 -1
- package/dist/EdgeAgent.js +1 -1
- package/dist/SensingProfileClient.d.ts +9 -0
- package/dist/SensingProfileClient.d.ts.map +1 -1
- package/dist/SensingProfileClient.js +4 -0
- package/dist/SensingProfileClient.js.map +1 -1
- package/dist/SetupSessionClient.d.ts +0 -1
- package/dist/SetupSessionClient.d.ts.map +1 -1
- package/dist/autoSense.d.ts +42 -31
- package/dist/autoSense.d.ts.map +1 -1
- package/dist/autoSense.js +127 -99
- package/dist/autoSense.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +25 -84
- package/dist/cli.js.map +1 -1
- package/dist/combinedSense.d.ts +1 -3
- package/dist/combinedSense.d.ts.map +1 -1
- package/dist/combinedSense.js +0 -1
- package/dist/combinedSense.js.map +1 -1
- package/dist/config.d.ts +17 -64
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -10
- package/dist/config.js.map +1 -1
- package/dist/deployedCadence.d.ts +37 -75
- package/dist/deployedCadence.d.ts.map +1 -1
- package/dist/deployedCadence.js +45 -105
- package/dist/deployedCadence.js.map +1 -1
- package/dist/deployedCadenceSource.d.ts +0 -2
- package/dist/deployedCadenceSource.d.ts.map +1 -1
- package/dist/deployedCadenceSource.js +0 -1
- package/dist/deployedCadenceSource.js.map +1 -1
- package/dist/diagnose.d.ts +1 -1
- package/dist/diagnose.js +1 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -8
- package/dist/index.js.map +1 -1
- package/dist/localInferenceSchema.d.ts +19 -0
- package/dist/localInferenceSchema.d.ts.map +1 -1
- package/dist/localInferenceSchema.js +23 -0
- package/dist/localInferenceSchema.js.map +1 -1
- package/dist/localSensing.d.ts +48 -107
- package/dist/localSensing.d.ts.map +1 -1
- package/dist/localSensing.js +80 -171
- package/dist/localSensing.js.map +1 -1
- package/dist/sensingCatchRate.d.ts +246 -0
- package/dist/sensingCatchRate.d.ts.map +1 -0
- package/dist/sensingCatchRate.js +514 -0
- package/dist/sensingCatchRate.js.map +1 -0
- package/dist/sensingRunMode.d.ts +14 -11
- package/dist/sensingRunMode.d.ts.map +1 -1
- package/dist/sensingRunMode.js +9 -92
- package/dist/sensingRunMode.js.map +1 -1
- package/dist/setupMode.d.ts +0 -1
- package/dist/setupMode.d.ts.map +1 -1
- package/dist/setupMode.js +5 -3
- package/dist/setupMode.js.map +1 -1
- package/dist/startupDiscovery.d.ts +43 -0
- package/dist/startupDiscovery.d.ts.map +1 -0
- package/dist/startupDiscovery.js +72 -0
- package/dist/startupDiscovery.js.map +1 -0
- package/package.json +1 -1
- package/dist/CloudEscalationPolicy.d.ts +0 -143
- package/dist/CloudEscalationPolicy.d.ts.map +0 -1
- package/dist/CloudEscalationPolicy.js +0 -137
- package/dist/CloudEscalationPolicy.js.map +0 -1
package/dist/config.js
CHANGED
|
@@ -121,16 +121,6 @@ function resolveConfig(partial) {
|
|
|
121
121
|
// "unattended-provisioned" is a fact about this machine, never a default.
|
|
122
122
|
connector: partial.connector ? { ...partial.connector } : undefined,
|
|
123
123
|
};
|
|
124
|
-
// Cloud escalation sends a frame off the premises, so the operator's "no frame
|
|
125
|
-
// ever leaves" switch outranks it. LocalSensingClient ENFORCES that; say so
|
|
126
|
-
// here rather than letting the setting look active and do nothing.
|
|
127
|
-
if (config.localSensing?.cloudEscalation?.enabled === true &&
|
|
128
|
-
config.localSensing.attachEvidenceFrame === false) {
|
|
129
|
-
// eslint-disable-next-line no-console
|
|
130
|
-
console.warn('localSensing.cloudEscalation is enabled but localSensing.attachEvidenceFrame is false — ' +
|
|
131
|
-
'escalation sends the analyzed frame to the cloud VLM, so it stays OFF. ' +
|
|
132
|
-
'Remove attachEvidenceFrame:false to allow candidate frames to be confirmed in the cloud.');
|
|
133
|
-
}
|
|
134
124
|
// Auto-detect platform
|
|
135
125
|
if (!config.platform) {
|
|
136
126
|
config.platform = process.platform === 'win32' ? 'windows' : 'linux';
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6eA,gCAeC;AAED,sCAiFC;AA/kBD,uCAAyB;AACzB,2CAA6B;AA+d7B,MAAM,QAAQ,GAA6B;IACzC,UAAU,EAAE,6BAA6B;IACzC,SAAS,EAAE,6BAA6B;IACxC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,MAAM,EAAE,cAAc,CAAC;IACzF,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;IACzB,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAA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CACV,WAAW,KAAK,MAAM,IAAI,CAAC,IAAI,IAAI,SAAS,kBAAkB;YAC5D,CAAC,IAAI,CAAC,YAAY;gBAChB,CAAC,CAAC,0BAA0B,IAAI,CAAC,YAAY,6DAA6D;gBAC1G,CAAC,CAAC,EAAE,CAAC;YACP,yBAAyB;YACzB,wFAAwF,CAC3F,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO;QACL,GAAG,IAAI;QACP,OAAO;QACP,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,UAAU,KAAK,GAAG,CAAC,EAAE;QACxC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC,MAAM,EAAE,KAAK;QAC1C,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,EAAE,MAAM;QAC7C,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,OAAO,CAAC,MAAM,EAAE,GAAG;QACpC,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,EAAE,SAAS;QACtD,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,OAAO,CAAC,MAAM,EAAE,UAAU;KAC1D,CAAC;AACJ,CAAC"}
|
|
@@ -21,75 +21,50 @@
|
|
|
21
21
|
*
|
|
22
22
|
* ── Why it is not simply "use what the profile says" ───────────────────────
|
|
23
23
|
*
|
|
24
|
-
* Because the
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* Against a $100-500 subscription. So "sensing within 30 seconds" is not a
|
|
51
|
-
* config default on the cloud path — it is a $605/camera/month line item, and
|
|
52
|
-
* a 16-camera store would be $9 688/month of COGS. The same 30 s cadence on
|
|
53
|
-
* the LOCAL path costs nothing per frame; it costs one machine.
|
|
24
|
+
* Because the connector is metered by a MACHINE, and the profile's numbers
|
|
25
|
+
* describe a different one.
|
|
26
|
+
*
|
|
27
|
+
* `litert-lm serve` is a single-conversation server with exactly one admission
|
|
28
|
+
* slot at a measured 7.30 s/frame, so the whole connector has a hard ceiling of
|
|
29
|
+
* 493 analyses/hour however many cameras it runs. That ceiling is what
|
|
30
|
+
* `connectorCadence.periodicIntervalMsForFeedCount` already computes, and it is
|
|
31
|
+
* why the profile's own 5-30 s values were rejected as a cadence source when
|
|
32
|
+
* that module was written: they are the ANDROID tablet's capture rate, where a
|
|
33
|
+
* frame costs a BlazeFace pass rather than a VLM generation, and feeding 5 s to
|
|
34
|
+
* a connector would demand 11,520 analyses/hour against a budget of 493.
|
|
35
|
+
*
|
|
36
|
+
* ── There used to be a second meter: MONEY ─────────────────────────────────
|
|
37
|
+
*
|
|
38
|
+
* The cloud path was metered per frame — measured 2026-08-12 over 255,812
|
|
39
|
+
* image-bearing cloud VLM calls, $0.007008 each, so a 30 s cadence was
|
|
40
|
+
* $605/camera/month and a 16-camera store was $9,688/month against a $99-500
|
|
41
|
+
* subscription. This module held the arithmetic that kept that bill inside a
|
|
42
|
+
* budget: `MEASURED_CLOUD_USD_PER_FRAME`, `cloudFloorMsForBudget`,
|
|
43
|
+
* `monthlyUsdPerCamera`, and the `cloud_cost_budget` clamp reason.
|
|
44
|
+
*
|
|
45
|
+
* All of it is gone with the cloud path itself. Rationing a per-frame cost was
|
|
46
|
+
* the wrong shape of answer inside a flat-rate product — the cadence knob was
|
|
47
|
+
* how the earlier plan (plans/cctv-byo-sensing-plan.md:26) proposed to control
|
|
48
|
+
* cost, and this supersedes it. On-device inference has no per-frame cost, so
|
|
49
|
+
* the only question left is how fast the machine can actually go.
|
|
54
50
|
*
|
|
55
51
|
* The honest resolution is therefore not to pick a number. It is to let the
|
|
56
|
-
* operator's request through, clamp it at the floor
|
|
57
|
-
* make the clamp legible — `resolve()` returns the reason
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* ── The default is deliberately a no-op ────────────────────────────────────
|
|
62
|
-
*
|
|
63
|
-
* `DEFAULT_CLOUD_MONTHLY_BUDGET_USD_PER_CAMERA` is 60, which at the measured
|
|
64
|
-
* price is a 302 746 ms floor — within 1% of the 300 000 ms every cloud
|
|
65
|
-
* connector already runs. Fixing the wire therefore cannot change anybody's
|
|
66
|
-
* bill: it changes who is ALLOWED to change it, and makes buying a faster
|
|
67
|
-
* cadence an explicit purchase instead of an invisible one.
|
|
68
|
-
*/
|
|
69
|
-
export type SensingRunModeName = 'cloud' | 'local';
|
|
70
|
-
/**
|
|
71
|
-
* Mean USD per analyzed frame on the cloud VLM path. MEASURED, not listed:
|
|
72
|
-
* 255,812 successful image-bearing `vision_call_log` rows over the 7 days ending
|
|
73
|
-
* 2026-08-12. Re-measure with:
|
|
52
|
+
* operator's request through, clamp it at the floor the machine implies, and
|
|
53
|
+
* make the clamp legible — `resolve()` returns the reason, so
|
|
54
|
+
* `getSensingHealth()` can say "you asked for 5 s; running 7.3 s; one local
|
|
55
|
+
* inference slot" instead of silently sampling every 5 minutes.
|
|
74
56
|
*
|
|
75
|
-
*
|
|
76
|
-
* WHERE called_at >= now() - interval '7 days'
|
|
77
|
-
* AND success AND image_s3_key IS NOT NULL;
|
|
57
|
+
* ── MAX_CADENCE_MS stays, and is NOT a cost bound ──────────────────────────
|
|
78
58
|
*
|
|
79
|
-
*
|
|
80
|
-
* bigger response schema moves it (per-screen means ranged $0.0054-$0.0158 over
|
|
81
|
-
* the same window, tracking prompt size).
|
|
59
|
+
* It is a 32-bit `setTimeout` overflow guard. See its own docs below.
|
|
82
60
|
*/
|
|
83
|
-
export declare const MEASURED_CLOUD_USD_PER_FRAME = 0.007008;
|
|
84
61
|
/**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
62
|
+
* Kept as a single-member type rather than deleted: it names the axis (WHICH
|
|
63
|
+
* run mode is being metered) that the callers still pass, and re-introducing a
|
|
64
|
+
* mode later must be a compile-time decision at every call site rather than a
|
|
65
|
+
* silently-ignored argument.
|
|
89
66
|
*/
|
|
90
|
-
export
|
|
91
|
-
/** A 30-day month, in ms — the unit the budget is quoted in. */
|
|
92
|
-
export declare const MONTH_MS: number;
|
|
67
|
+
export type SensingRunModeName = 'local';
|
|
93
68
|
/**
|
|
94
69
|
* The SLOWEST cadence a deployed profile may put on a running connector.
|
|
95
70
|
*
|
|
@@ -120,8 +95,6 @@ export type CadenceReason =
|
|
|
120
95
|
'no_request'
|
|
121
96
|
/** The operator's request was affordable and is being run verbatim. */
|
|
122
97
|
| 'operator_request'
|
|
123
|
-
/** Slowed to fit the cloud spend budget. */
|
|
124
|
-
| 'cloud_cost_budget'
|
|
125
98
|
/** Slowed to fit the single local inference slot. */
|
|
126
99
|
| 'local_inference_budget'
|
|
127
100
|
/** Faster than the connector ever looks — a cadence finer than a look is meaningless. */
|
|
@@ -140,16 +113,7 @@ export interface DeployedCadence {
|
|
|
140
113
|
/** True when the request is NOT being run verbatim (floor OR ceiling). */
|
|
141
114
|
clamped: boolean;
|
|
142
115
|
reason: CadenceReason;
|
|
143
|
-
/** Projected cloud spend at `intervalMs`. null for local (no per-frame cost). */
|
|
144
|
-
estimatedMonthlyUsdPerCamera: number | null;
|
|
145
116
|
}
|
|
146
|
-
/**
|
|
147
|
-
* The fastest cloud cadence that keeps ONE camera inside `budgetUsd` per month
|
|
148
|
-
* at `usdPerFrame`.
|
|
149
|
-
*/
|
|
150
|
-
export declare function cloudFloorMsForBudget(budgetUsd?: number, usdPerFrame?: number): number;
|
|
151
|
-
/** Projected cloud spend for one camera at `intervalMs`. */
|
|
152
|
-
export declare function monthlyUsdPerCamera(intervalMs: number, usdPerFrame?: number): number;
|
|
153
117
|
/**
|
|
154
118
|
* Reconcile a deployed cadence with what this mode can afford.
|
|
155
119
|
*
|
|
@@ -161,7 +125,5 @@ export declare function resolveDeployedCadence(input: {
|
|
|
161
125
|
requestedMs: unknown;
|
|
162
126
|
mode: SensingRunModeName;
|
|
163
127
|
feedCount: number;
|
|
164
|
-
monthlyBudgetUsdPerCamera?: number;
|
|
165
|
-
usdPerFrame?: number;
|
|
166
128
|
}): DeployedCadence;
|
|
167
129
|
//# sourceMappingURL=deployedCadence.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployedCadence.d.ts","sourceRoot":"","sources":["../src/deployedCadence.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"deployedCadence.d.ts","sourceRoot":"","sources":["../src/deployedCadence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAQH;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,cAAc,QAAmB,CAAC;AAE/C,MAAM,MAAM,aAAa;AACvB,4EAA4E;AAC1E,YAAY;AACd,uEAAuE;GACrE,kBAAkB;AACpB,qDAAqD;GACnD,wBAAwB;AAC1B,yFAAyF;GACvF,eAAe;AACjB,2FAA2F;GACzF,iBAAiB,CAAC;AAEtB,MAAM,WAAW,eAAe;IAC9B,qEAAqE;IACrE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,mFAAmF;IACnF,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC;CACvB;AASD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,eAAe,CA8ClB"}
|
package/dist/deployedCadence.js
CHANGED
|
@@ -22,80 +22,47 @@
|
|
|
22
22
|
*
|
|
23
23
|
* ── Why it is not simply "use what the profile says" ───────────────────────
|
|
24
24
|
*
|
|
25
|
-
* Because the
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* Against a $100-500 subscription. So "sensing within 30 seconds" is not a
|
|
52
|
-
* config default on the cloud path — it is a $605/camera/month line item, and
|
|
53
|
-
* a 16-camera store would be $9 688/month of COGS. The same 30 s cadence on
|
|
54
|
-
* the LOCAL path costs nothing per frame; it costs one machine.
|
|
25
|
+
* Because the connector is metered by a MACHINE, and the profile's numbers
|
|
26
|
+
* describe a different one.
|
|
27
|
+
*
|
|
28
|
+
* `litert-lm serve` is a single-conversation server with exactly one admission
|
|
29
|
+
* slot at a measured 7.30 s/frame, so the whole connector has a hard ceiling of
|
|
30
|
+
* 493 analyses/hour however many cameras it runs. That ceiling is what
|
|
31
|
+
* `connectorCadence.periodicIntervalMsForFeedCount` already computes, and it is
|
|
32
|
+
* why the profile's own 5-30 s values were rejected as a cadence source when
|
|
33
|
+
* that module was written: they are the ANDROID tablet's capture rate, where a
|
|
34
|
+
* frame costs a BlazeFace pass rather than a VLM generation, and feeding 5 s to
|
|
35
|
+
* a connector would demand 11,520 analyses/hour against a budget of 493.
|
|
36
|
+
*
|
|
37
|
+
* ── There used to be a second meter: MONEY ─────────────────────────────────
|
|
38
|
+
*
|
|
39
|
+
* The cloud path was metered per frame — measured 2026-08-12 over 255,812
|
|
40
|
+
* image-bearing cloud VLM calls, $0.007008 each, so a 30 s cadence was
|
|
41
|
+
* $605/camera/month and a 16-camera store was $9,688/month against a $99-500
|
|
42
|
+
* subscription. This module held the arithmetic that kept that bill inside a
|
|
43
|
+
* budget: `MEASURED_CLOUD_USD_PER_FRAME`, `cloudFloorMsForBudget`,
|
|
44
|
+
* `monthlyUsdPerCamera`, and the `cloud_cost_budget` clamp reason.
|
|
45
|
+
*
|
|
46
|
+
* All of it is gone with the cloud path itself. Rationing a per-frame cost was
|
|
47
|
+
* the wrong shape of answer inside a flat-rate product — the cadence knob was
|
|
48
|
+
* how the earlier plan (plans/cctv-byo-sensing-plan.md:26) proposed to control
|
|
49
|
+
* cost, and this supersedes it. On-device inference has no per-frame cost, so
|
|
50
|
+
* the only question left is how fast the machine can actually go.
|
|
55
51
|
*
|
|
56
52
|
* The honest resolution is therefore not to pick a number. It is to let the
|
|
57
|
-
* operator's request through, clamp it at the floor
|
|
58
|
-
* make the clamp legible — `resolve()` returns the reason
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* ──
|
|
63
|
-
*
|
|
64
|
-
* `
|
|
65
|
-
* price is a 302 746 ms floor — within 1% of the 300 000 ms every cloud
|
|
66
|
-
* connector already runs. Fixing the wire therefore cannot change anybody's
|
|
67
|
-
* bill: it changes who is ALLOWED to change it, and makes buying a faster
|
|
68
|
-
* cadence an explicit purchase instead of an invisible one.
|
|
53
|
+
* operator's request through, clamp it at the floor the machine implies, and
|
|
54
|
+
* make the clamp legible — `resolve()` returns the reason, so
|
|
55
|
+
* `getSensingHealth()` can say "you asked for 5 s; running 7.3 s; one local
|
|
56
|
+
* inference slot" instead of silently sampling every 5 minutes.
|
|
57
|
+
*
|
|
58
|
+
* ── MAX_CADENCE_MS stays, and is NOT a cost bound ──────────────────────────
|
|
59
|
+
*
|
|
60
|
+
* It is a 32-bit `setTimeout` overflow guard. See its own docs below.
|
|
69
61
|
*/
|
|
70
62
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
71
|
-
exports.MAX_CADENCE_MS =
|
|
72
|
-
exports.cloudFloorMsForBudget = cloudFloorMsForBudget;
|
|
73
|
-
exports.monthlyUsdPerCamera = monthlyUsdPerCamera;
|
|
63
|
+
exports.MAX_CADENCE_MS = void 0;
|
|
74
64
|
exports.resolveDeployedCadence = resolveDeployedCadence;
|
|
75
65
|
const connectorCadence_1 = require("./connectorCadence");
|
|
76
|
-
/**
|
|
77
|
-
* Mean USD per analyzed frame on the cloud VLM path. MEASURED, not listed:
|
|
78
|
-
* 255,812 successful image-bearing `vision_call_log` rows over the 7 days ending
|
|
79
|
-
* 2026-08-12. Re-measure with:
|
|
80
|
-
*
|
|
81
|
-
* SELECT avg(cost_usd) FROM vision_call_log
|
|
82
|
-
* WHERE called_at >= now() - interval '7 days'
|
|
83
|
-
* AND success AND image_s3_key IS NOT NULL;
|
|
84
|
-
*
|
|
85
|
-
* and update this when the model tier or the profile schema size changes — a
|
|
86
|
-
* bigger response schema moves it (per-screen means ranged $0.0054-$0.0158 over
|
|
87
|
-
* the same window, tracking prompt size).
|
|
88
|
-
*/
|
|
89
|
-
exports.MEASURED_CLOUD_USD_PER_FRAME = 0.007008;
|
|
90
|
-
/**
|
|
91
|
-
* Cloud spend per camera per month the connector may commit to WITHOUT the
|
|
92
|
-
* operator raising it. 60 USD is today's actual spend at the 300 s default, so
|
|
93
|
-
* this default changes no bill; it exists so that going faster is a decision
|
|
94
|
-
* somebody makes rather than a constant somebody edits.
|
|
95
|
-
*/
|
|
96
|
-
exports.DEFAULT_CLOUD_MONTHLY_BUDGET_USD_PER_CAMERA = 60;
|
|
97
|
-
/** A 30-day month, in ms — the unit the budget is quoted in. */
|
|
98
|
-
exports.MONTH_MS = 30 * 24 * 3600 * 1000;
|
|
99
66
|
/**
|
|
100
67
|
* The SLOWEST cadence a deployed profile may put on a running connector.
|
|
101
68
|
*
|
|
@@ -121,28 +88,6 @@ exports.MONTH_MS = 30 * 24 * 3600 * 1000;
|
|
|
121
88
|
* silently applied, so a nonsense row shows up as a nonsense row.
|
|
122
89
|
*/
|
|
123
90
|
exports.MAX_CADENCE_MS = 24 * 3600 * 1000;
|
|
124
|
-
/**
|
|
125
|
-
* The fastest cloud cadence that keeps ONE camera inside `budgetUsd` per month
|
|
126
|
-
* at `usdPerFrame`.
|
|
127
|
-
*/
|
|
128
|
-
function cloudFloorMsForBudget(budgetUsd = exports.DEFAULT_CLOUD_MONTHLY_BUDGET_USD_PER_CAMERA, usdPerFrame = exports.MEASURED_CLOUD_USD_PER_FRAME) {
|
|
129
|
-
const budget = Number(budgetUsd);
|
|
130
|
-
const price = Number(usdPerFrame);
|
|
131
|
-
if (!Number.isFinite(budget) || budget <= 0 || !Number.isFinite(price) || price <= 0) {
|
|
132
|
-
// An unusable budget must not read as "unlimited" — fall back to the
|
|
133
|
-
// observed default cadence rather than opening the tap.
|
|
134
|
-
return connectorCadence_1.DOOH_PERIODIC_MS;
|
|
135
|
-
}
|
|
136
|
-
const framesPerMonth = budget / price;
|
|
137
|
-
return Math.ceil(exports.MONTH_MS / framesPerMonth);
|
|
138
|
-
}
|
|
139
|
-
/** Projected cloud spend for one camera at `intervalMs`. */
|
|
140
|
-
function monthlyUsdPerCamera(intervalMs, usdPerFrame = exports.MEASURED_CLOUD_USD_PER_FRAME) {
|
|
141
|
-
const ms = Number(intervalMs);
|
|
142
|
-
if (!Number.isFinite(ms) || ms <= 0)
|
|
143
|
-
return 0;
|
|
144
|
-
return (exports.MONTH_MS / ms) * usdPerFrame;
|
|
145
|
-
}
|
|
146
91
|
/** Normalize a server-reported cadence; anything unusable is "no request". */
|
|
147
92
|
function normalizeRequest(value) {
|
|
148
93
|
const n = Number(value);
|
|
@@ -159,19 +104,16 @@ function normalizeRequest(value) {
|
|
|
159
104
|
*/
|
|
160
105
|
function resolveDeployedCadence(input) {
|
|
161
106
|
const requestedMs = normalizeRequest(input.requestedMs);
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
// connector with no countable feeds gets the DOOH default rather than a
|
|
168
|
-
// cadence derived from nothing.
|
|
169
|
-
: ((0, connectorCadence_1.periodicIntervalMsForFeedCount)(input.feedCount) ?? connectorCadence_1.DOOH_PERIODIC_MS);
|
|
107
|
+
// The floor is the machine's own ceiling, already derived and already
|
|
108
|
+
// measured. periodicIntervalMsForFeedCount returns null on a bad count; a
|
|
109
|
+
// connector with no countable feeds gets the DOOH default rather than a
|
|
110
|
+
// cadence derived from nothing.
|
|
111
|
+
const floorMs = (0, connectorCadence_1.periodicIntervalMsForFeedCount)(input.feedCount) ?? connectorCadence_1.DOOH_PERIODIC_MS;
|
|
170
112
|
// A cadence finer than the LOOK interval cannot be delivered by a loop that
|
|
171
|
-
// only looks that often, so it is a floor
|
|
172
|
-
//
|
|
173
|
-
//
|
|
174
|
-
//
|
|
113
|
+
// only looks that often, so it is a floor. The ceiling wins over the floor:
|
|
114
|
+
// honouring a floor slower than a whole day would hand a capture loop a delay
|
|
115
|
+
// it cannot express (see MAX_CADENCE_MS) — the one clamp that must never be
|
|
116
|
+
// negotiable.
|
|
175
117
|
const effectiveFloor = Math.min(exports.MAX_CADENCE_MS, Math.max(floorMs, connectorCadence_1.LOOK_INTERVAL_MS));
|
|
176
118
|
if (requestedMs === null) {
|
|
177
119
|
return {
|
|
@@ -181,7 +123,6 @@ function resolveDeployedCadence(input) {
|
|
|
181
123
|
ceilingMs: exports.MAX_CADENCE_MS,
|
|
182
124
|
clamped: false,
|
|
183
125
|
reason: 'no_request',
|
|
184
|
-
estimatedMonthlyUsdPerCamera: null,
|
|
185
126
|
};
|
|
186
127
|
}
|
|
187
128
|
const intervalMs = Math.min(exports.MAX_CADENCE_MS, Math.max(requestedMs, effectiveFloor));
|
|
@@ -194,7 +135,7 @@ function resolveDeployedCadence(input) {
|
|
|
194
135
|
if (effectiveFloor === connectorCadence_1.LOOK_INTERVAL_MS && floorMs <= connectorCadence_1.LOOK_INTERVAL_MS)
|
|
195
136
|
reason = 'look_interval';
|
|
196
137
|
else
|
|
197
|
-
reason =
|
|
138
|
+
reason = 'local_inference_budget';
|
|
198
139
|
}
|
|
199
140
|
return {
|
|
200
141
|
intervalMs,
|
|
@@ -203,7 +144,6 @@ function resolveDeployedCadence(input) {
|
|
|
203
144
|
ceilingMs: exports.MAX_CADENCE_MS,
|
|
204
145
|
clamped,
|
|
205
146
|
reason,
|
|
206
|
-
estimatedMonthlyUsdPerCamera: isCloud ? monthlyUsdPerCamera(intervalMs, input.usdPerFrame) : null,
|
|
207
147
|
};
|
|
208
148
|
}
|
|
209
149
|
//# sourceMappingURL=deployedCadence.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployedCadence.js","sourceRoot":"","sources":["../src/deployedCadence.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"deployedCadence.js","sourceRoot":"","sources":["../src/deployedCadence.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;;;AAkFH,wDAkDC;AAlID,yDAI4B;AAU5B;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACU,QAAA,cAAc,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AA4B/C,8EAA8E;AAC9E,SAAS,gBAAgB,CAAC,KAAc;IACtC,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACxB,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IA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AAG,wBAAwB,CAAC;IACzC,CAAC;IAED,OAAO;QACL,UAAU;QACV,WAAW;QACX,OAAO,EAAE,cAAc;QACvB,SAAS,EAAE,sBAAc;QACzB,OAAO;QACP,MAAM;KACP,CAAC;AACJ,CAAC"}
|
|
@@ -36,8 +36,6 @@ export interface DeployedCadenceSourceOptions {
|
|
|
36
36
|
mode: SensingRunModeName;
|
|
37
37
|
/** Total feeds this connector runs (drives the LOCAL single-slot floor). */
|
|
38
38
|
feedCount: number;
|
|
39
|
-
/** Cloud spend ceiling per camera per month. Default 60 (today's actual spend). */
|
|
40
|
-
monthlyBudgetUsdPerCamera?: number;
|
|
41
39
|
}
|
|
42
40
|
/**
|
|
43
41
|
* Build the connector's cadence source. Returns `undefined` when there are no
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployedCadenceSource.d.ts","sourceRoot":"","sources":["../src/deployedCadenceSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,
|
|
1
|
+
{"version":3,"file":"deployedCadenceSource.d.ts","sourceRoot":"","sources":["../src/deployedCadenceSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,4BAA4B;IAC3C,kFAAkF;IAClF,cAAc,EAAE,oBAAoB,EAAE,CAAC;IACvC,IAAI,EAAE,kBAAkB,CAAC;IACzB,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,4BAA4B,GACpC,aAAa,GAAG,SAAS,CAkC3B"}
|
|
@@ -66,7 +66,6 @@ function buildDeployedCadenceSource(options) {
|
|
|
66
66
|
requestedMs: fastest,
|
|
67
67
|
mode: options.mode,
|
|
68
68
|
feedCount: options.feedCount,
|
|
69
|
-
monthlyBudgetUsdPerCamera: options.monthlyBudgetUsdPerCamera ?? deployedCadence_1.DEFAULT_CLOUD_MONTHLY_BUDGET_USD_PER_CAMERA,
|
|
70
69
|
});
|
|
71
70
|
},
|
|
72
71
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployedCadenceSource.js","sourceRoot":"","sources":["../src/deployedCadenceSource.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;
|
|
1
|
+
{"version":3,"file":"deployedCadenceSource.js","sourceRoot":"","sources":["../src/deployedCadenceSource.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;AAuBH,gEAoCC;AAvDD,uDAI2B;AAU3B;;;;GAIG;AACH,SAAgB,0BAA0B,CACxC,OAAqC;IAErC,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,cAAc,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC/D,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAE3C,OAAO;QACL,KAAK,CAAC,OAAO;YACX,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,GAAG,CAC/B,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CACvD,CAAC;YAEF,qEAAqE;YACrE,gDAAgD;YAChD,IAAI,OAAO,GAAkB,IAAI,CAAC;YAClC,IAAI,WAAW,GAAG,KAAK,CAAC;YACxB,KAAK,MAAM,OAAO,IAAI,OAAO,EAAE,CAAC;gBAC9B,IAAI,CAAC,OAAO;oBAAE,SAAS;gBACvB,WAAW,GAAG,IAAI,CAAC;gBACnB,MAAM,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC;gBACrC,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;oBAAE,SAAS;gBACxE,IAAI,OAAO,KAAK,IAAI,IAAI,EAAE,GAAG,OAAO;oBAAE,OAAO,GAAG,EAAE,CAAC;YACrD,CAAC;YAED,uEAAuE;YACvE,wEAAwE;YACxE,qEAAqE;YACrE,IAAI,CAAC,WAAW;gBAAE,OAAO,IAAI,CAAC;YAE9B,OAAO,IAAA,wCAAsB,EAAC;gBAC5B,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,SAAS,EAAE,OAAO,CAAC,SAAS;aAC7B,CAAC,CAAC;QACL,CAAC;KACF,CAAC;AACJ,CAAC"}
|
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.41";
|
|
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.41';
|
|
67
67
|
exports._SDK_VERSION = SDK_VERSION;
|
|
68
68
|
// ---------------------------------------------------------------------------
|
|
69
69
|
// ANSI helpers (no external deps)
|
package/dist/index.d.ts
CHANGED
|
@@ -28,9 +28,6 @@ export { VlmCandidateBuffer, DEFAULT_CANDIDATE_TTL_MS } from './VlmCandidateBuff
|
|
|
28
28
|
export type { VlmCandidate, VlmCandidateBufferOptions, VlmCandidateBufferStats, VlmCandidateFeedStats, VlmCandidateOfferResult, } from './VlmCandidateBuffer';
|
|
29
29
|
export { MotionGate, SceneChangeDetector, isChangeCandidate, decodeGreyFrame, downscaleRgbaToGrey, motionSignature, } from './SceneChangeDetector';
|
|
30
30
|
export type { GreyFrame, MotionBox, MotionDetectResult, MotionGateOptions, MotionGateReason, MotionGateResult, MotionGateStats, SceneChangeDetectorOptions, } from './SceneChangeDetector';
|
|
31
|
-
export { CloudEscalationPolicy } from './CloudEscalationPolicy';
|
|
32
|
-
export { isCloudEscalationEnabled } from './localSensing';
|
|
33
|
-
export type { CloudEscalationPolicyOptions, CloudEscalationStats, EscalationInput, EscalationReason, EscalationVerdict, } from './CloudEscalationPolicy';
|
|
34
31
|
export { SharedFrameSource, CropViewProvider } from './MosaicSource';
|
|
35
32
|
export type { CropViewProviderOptions } from './MosaicSource';
|
|
36
33
|
export type { AudienceMetricsPayload, DetectedFace, EdgeQualityReport, VASResult, DeviceCapabilityMatrix, PlatformAdapter, CameraProvider, AudioProvider, EdgeSDKConfig, } from '@trillboards/edge-core';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACpF,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,UA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 @@
|
|
|
3
3
|
// Install: npm install @trillboards/edge-sdk
|
|
4
4
|
// Run: npx trillboards-edge start --config trillboards.config.json
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.CropViewProvider = exports.SharedFrameSource = exports.
|
|
6
|
+
exports.CropViewProvider = exports.SharedFrameSource = exports.motionSignature = exports.downscaleRgbaToGrey = exports.decodeGreyFrame = exports.isChangeCandidate = exports.SceneChangeDetector = exports.MotionGate = exports.DEFAULT_CANDIDATE_TTL_MS = exports.VlmCandidateBuffer = exports.VlmAdmissionGate = exports.shouldAttemptRecorderAddressRecovery = exports.rewriteStreamHost = exports.normalizeMacAddress = exports.lookupMacAddress = exports.RecorderAddressRecovery = exports.resolveFeeds = exports.classifyRtspFailureClass = exports.buildTiledCameras = exports.buildSensingLoops = exports.CloudSensingManager = exports.defaultHttpPoster = exports.AudienceAnalyzeClient = exports.LOCAL_NETWORK_DENIED_SUMMARY = exports.LOCAL_NETWORK_DENIED_SUGGESTION = exports.decideLocalNetworkVerdict = exports.probeLocalNetworkAccess = exports.describeProxy = exports.resolveProxyForUrl = exports.describeTrustAnchors = exports.resolveTrustAnchors = exports.isTrustFailure = exports.formatTransportFailure = exports.classifyTransportError = exports.TransportFailure = exports.EnterpriseHttpsAgent = exports.resetEnterpriseNetworkCaches = exports.diagnoseTransportError = exports.getEnterpriseAgent = exports.describeNetworkPosture = exports.installEnterpriseNetworking = exports.runDiagnose = exports.runInit = exports.CommandRouter = exports.resolveConfig = exports.loadConfig = exports.EdgeAgent = void 0;
|
|
7
7
|
var EdgeAgent_1 = require("./EdgeAgent");
|
|
8
8
|
Object.defineProperty(exports, "EdgeAgent", { enumerable: true, get: function () { return EdgeAgent_1.EdgeAgent; } });
|
|
9
9
|
var config_1 = require("./config");
|
|
@@ -76,13 +76,6 @@ Object.defineProperty(exports, "isChangeCandidate", { enumerable: true, get: fun
|
|
|
76
76
|
Object.defineProperty(exports, "decodeGreyFrame", { enumerable: true, get: function () { return SceneChangeDetector_1.decodeGreyFrame; } });
|
|
77
77
|
Object.defineProperty(exports, "downscaleRgbaToGrey", { enumerable: true, get: function () { return SceneChangeDetector_1.downscaleRgbaToGrey; } });
|
|
78
78
|
Object.defineProperty(exports, "motionSignature", { enumerable: true, get: function () { return SceneChangeDetector_1.motionSignature; } });
|
|
79
|
-
// Confidence-based cloud escalation: local Gemma gates, the cloud VLM
|
|
80
|
-
// adjudicates the candidate frames — bounded by novelty, pacing and an hourly
|
|
81
|
-
// budget so a busy camera cannot escalate every frame.
|
|
82
|
-
var CloudEscalationPolicy_1 = require("./CloudEscalationPolicy");
|
|
83
|
-
Object.defineProperty(exports, "CloudEscalationPolicy", { enumerable: true, get: function () { return CloudEscalationPolicy_1.CloudEscalationPolicy; } });
|
|
84
|
-
var localSensing_1 = require("./localSensing");
|
|
85
|
-
Object.defineProperty(exports, "isCloudEscalationEnabled", { enumerable: true, get: function () { return localSensing_1.isCloudEscalationEnabled; } });
|
|
86
79
|
// Mosaic tiling: carve one composite ("mosaic"/quad) RTSP feed into per-screen
|
|
87
80
|
// tiles, pulling the source once and cropping each tile in ffmpeg.
|
|
88
81
|
var MosaicSource_1 = require("./MosaicSource");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,gEAAgE;AAChE,6CAA6C;AAC7C,mEAAmE;;;AAEnE,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAElB,mCAAqD;AAA5C,oGAAA,UAAU,OAAA;AAAE,uGAAA,aAAa,OAAA;AAClC,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AAEtB,+BAAiC;AAAxB,+FAAA,OAAO,OAAA;AAChB,uCAAyC;AAAhC,uGAAA,WAAW,OAAA;AAGpB,8EAA8E;AAC9E,yEAAyE;AACzE,iFAAiF;AACjF,yDAO6B;AAN3B,gIAAA,2BAA2B,OAAA;AAC3B,2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AA,iBAAiB,OAAA;AACjB,wHAAA,iBAAiB,OAAA;AACjB,+HAAA,wBAAwB,OAAA;AACxB,mHAAA,YAAY,OAAA;AAEd,qEAMmC;AALjC,kIAAA,uBAAuB,OAAA;AACvB,2HAAA,gBAAgB,OAAA;AAChB,8HAAA,mBAAmB,OAAA;AACnB,4HAAA,iBAAiB,OAAA;AACjB,+IAAA,oCAAoC,OAAA;AAStC,+DAA+D;AAC/D,6EAA6E;AAC7E,uBAAuB;AACvB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AAMzB,wEAAwE;AACxE,sEAAsE;AACtE,2DAAoF;AAA3E,wHAAA,kBAAkB,OAAA;AAAE,8HAAA,wBAAwB,OAAA;AAQrD,6DAO+B;AAN7B,iHAAA,UAAU,OAAA;AACV,0HAAA,mBAAmB,OAAA;AACnB,wHAAA,iBAAiB,OAAA;AACjB,sHAAA,eAAe,OAAA;AACf,0HAAA,mBAAmB,OAAA;AACnB,sHAAA,eAAe,OAAA;AAajB,+EAA+E;AAC/E,mEAAmE;AACnE,+CAAqE;AAA5D,iHAAA,iBAAiB,OAAA;AAAE,gHAAA,gBAAgB,OAAA"}
|
|
@@ -114,6 +114,25 @@ export interface LocalSensingSchemaOptions {
|
|
|
114
114
|
*/
|
|
115
115
|
extraFields?: ProfileField[];
|
|
116
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Every field key the SDK itself puts in the schema — the union of the presence
|
|
119
|
+
* primitives and the DOOH audience block, whichever field set a profile resolves to.
|
|
120
|
+
*
|
|
121
|
+
* These are the SCENE-OCCUPANCY vocabulary: each one describes the people in front of
|
|
122
|
+
* the camera (or the frame as a whole), and each reads its own "nobody here" value on an
|
|
123
|
+
* empty scene — `person_count: 0`, `people_present: false`, `crowd_density: 'empty'`,
|
|
124
|
+
* `audience_intent_stage: 'none'`. The 'none'/'empty'/'unknown' members are the SDK's own
|
|
125
|
+
* invention (see DEFAULT_FIELD_PROPS: enums that had no "no people" member in the cloud
|
|
126
|
+
* contract were GIVEN one so the model never has to emit null), which is exactly why an
|
|
127
|
+
* empty reading here means "the scene is empty" and nothing more.
|
|
128
|
+
*
|
|
129
|
+
* `localSensing.isAlertWorthy` uses this as the privacy FLOOR: an operator's route may
|
|
130
|
+
* make the absence of their own subject alert-worthy, but it can never do so for these —
|
|
131
|
+
* a blank-room frame is the harm the evidence gate exists to prevent, and no route
|
|
132
|
+
* condition may unlock it. Exported (rather than re-listed in localSensing) so the gate
|
|
133
|
+
* and the schema builder can never drift apart on what counts as a scene field.
|
|
134
|
+
*/
|
|
135
|
+
export declare const DEFAULT_SCENE_FIELD_KEYS: ReadonlySet<string>;
|
|
117
136
|
/**
|
|
118
137
|
* Build the JSON Schema the on-device model is asked to fill (rendered as a
|
|
119
138
|
* readable key list by LiteRtVlmProvider, validated client-side). All fields
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localInferenceSchema.d.ts","sourceRoot":"","sources":["../src/localInferenceSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AAEH;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,IAAI,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,cAAc,GAAG,QAAQ,CAAC;IAC5G,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACpD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,UAAU,CAAC;AAE1D,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,QAAQ,CAAC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