@camstack/addon-post-analysis 1.1.25 → 1.1.27
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/{dist-Csk_yJr_.mjs → dist-BqOBYSWs.mjs} +181 -8
- package/dist/{dist-CCC79h7t.js → dist-CtnFKuWh.js} +186 -7
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/enrichment-engine/index.js +2 -2
- package/dist/enrichment-engine/index.mjs +1 -1
- package/dist/{node-CIEkEv1F.js → node-BN31iDiA.js} +1 -1
- package/dist/pipeline-analytics/_stub.js +1 -1
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-Cb6Z2H5K.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-Dvz_QBOD.mjs} +3 -3
- package/dist/pipeline-analytics/{_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DtOrjE2U.mjs → _virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BXQHc7Tq.mjs} +1 -1
- package/dist/pipeline-analytics/{hostInit-BrqCuPYQ.mjs → hostInit-C7nUOwbi.mjs} +3 -3
- package/dist/pipeline-analytics/index.js +1348 -43
- package/dist/pipeline-analytics/index.mjs +1346 -41
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/dist/{resolve-frame-sKYbstL-.js → resolve-frame-BAdpVnlx.js} +1 -1
- package/package.json +1 -1
|
@@ -4627,7 +4627,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4627
4627
|
return inst;
|
|
4628
4628
|
}
|
|
4629
4629
|
//#endregion
|
|
4630
|
-
//#region ../types/dist/sleep-
|
|
4630
|
+
//#region ../types/dist/sleep-Baang_XW.mjs
|
|
4631
4631
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4632
4632
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4633
4633
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -7465,6 +7465,36 @@ var EncodeProfileSchema = object({
|
|
|
7465
7465
|
*/
|
|
7466
7466
|
outputArgs: array(string()).optional()
|
|
7467
7467
|
});
|
|
7468
|
+
/**
|
|
7469
|
+
* Per-call node pinning for `ctx.api` capability calls.
|
|
7470
|
+
*
|
|
7471
|
+
* A capability call normally resolves to its DEFAULT provider — a `singleton`
|
|
7472
|
+
* cap resolves to the hub, a device-scoped cap to the device's owning node. To
|
|
7473
|
+
* query a SPECIFIC node's provider instead (e.g. a remote agent's own
|
|
7474
|
+
* in-process `platform-probe` hardware, which the hub cannot probe), pin the
|
|
7475
|
+
* call to that node.
|
|
7476
|
+
*
|
|
7477
|
+
* The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
|
|
7478
|
+
* method args), so capability method signatures stay `nodeId`-free — node
|
|
7479
|
+
* targeting is a property of the CALL, not of the method. The transport lifts
|
|
7480
|
+
* it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
|
|
7481
|
+
* and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
|
|
7482
|
+
* which classifies a pinned agent node as `agent-child-forward`
|
|
7483
|
+
* (`$agent-cap-fwd.forward` → the agent's in-process provider).
|
|
7484
|
+
*
|
|
7485
|
+
* Usage at a call site:
|
|
7486
|
+
*
|
|
7487
|
+
* await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
|
|
7488
|
+
*/
|
|
7489
|
+
/** tRPC `op.context` key carrying a per-call node pin. */
|
|
7490
|
+
var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
|
|
7491
|
+
/**
|
|
7492
|
+
* Build the tRPC request options that pin a single capability call to `nodeId`.
|
|
7493
|
+
* Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
|
|
7494
|
+
*/
|
|
7495
|
+
function nodePin(nodeId) {
|
|
7496
|
+
return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: nodeId } };
|
|
7497
|
+
}
|
|
7468
7498
|
function hfModelUrl(repo, path) {
|
|
7469
7499
|
return `https://huggingface.co/${repo}/resolve/main/${path}`;
|
|
7470
7500
|
}
|
|
@@ -10745,7 +10775,15 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
10745
10775
|
image: _instanceof(Uint8Array).optional(),
|
|
10746
10776
|
referenceImage: string().optional(),
|
|
10747
10777
|
deviceId: number().optional(),
|
|
10748
|
-
sessionId: string().optional()
|
|
10778
|
+
sessionId: string().optional(),
|
|
10779
|
+
/**
|
|
10780
|
+
* Execution plane. 'full' (default) runs the whole tree — benchmark,
|
|
10781
|
+
* reference-image, and detail-subtree calls. 'frame' is the live
|
|
10782
|
+
* per-frame dispatch: ONLY root-plane steps run; crop children
|
|
10783
|
+
* (inputClasses ≠ null) are skipped and served per-track via
|
|
10784
|
+
* pipelineRunner.runDetailSubtree (two-plane design).
|
|
10785
|
+
*/
|
|
10786
|
+
plane: _enum(["full", "frame"]).optional()
|
|
10749
10787
|
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
10750
10788
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
10751
10789
|
steps: array(PipelineStepInputSchema).min(1),
|
|
@@ -10870,6 +10908,47 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).read
|
|
|
10870
10908
|
auth: "admin"
|
|
10871
10909
|
}), object({ zones: array(ZoneSchema).readonly() });
|
|
10872
10910
|
/**
|
|
10911
|
+
* A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
|
|
10912
|
+
* decode worker resolves it against the RETAINED native frame's real pixel dims,
|
|
10913
|
+
* so the caller supplies only the detection-res bbox divided by the detection
|
|
10914
|
+
* dims — no native resolution to plumb.
|
|
10915
|
+
*/
|
|
10916
|
+
var NativeCropBboxSchema = object({
|
|
10917
|
+
x: number(),
|
|
10918
|
+
y: number(),
|
|
10919
|
+
w: number(),
|
|
10920
|
+
h: number()
|
|
10921
|
+
});
|
|
10922
|
+
/** Result of a best-effort native-resolution crop (`getNativeCrop`). */
|
|
10923
|
+
var NativeCropResultSchema = object({
|
|
10924
|
+
/** Packed rgb (24-bit) pixels of the crop. */
|
|
10925
|
+
bytes: _instanceof(Uint8Array),
|
|
10926
|
+
width: number().int().positive(),
|
|
10927
|
+
height: number().int().positive()
|
|
10928
|
+
});
|
|
10929
|
+
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
10930
|
+
* originating detection, in FRAME-space coordinates. Reuses
|
|
10931
|
+
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
10932
|
+
* the coordinates are frame-space rather than getNativeCrop's
|
|
10933
|
+
* normalized [0,1] convention). */
|
|
10934
|
+
var DetailParentSchema = object({
|
|
10935
|
+
bbox: NativeCropBboxSchema,
|
|
10936
|
+
className: string()
|
|
10937
|
+
});
|
|
10938
|
+
/** One child-step result from `runDetailSubtree` — an embedding, label,
|
|
10939
|
+
* or refined detection produced by running the crop-subtree on a
|
|
10940
|
+
* single tracked detection. */
|
|
10941
|
+
var DetailResultSchema = object({
|
|
10942
|
+
stepId: string(),
|
|
10943
|
+
className: string(),
|
|
10944
|
+
score: number(),
|
|
10945
|
+
/** FRAME-space bbox (already mapped back from crop space). */
|
|
10946
|
+
bbox: NativeCropBboxSchema.optional(),
|
|
10947
|
+
embedding: string().optional(),
|
|
10948
|
+
label: string().optional(),
|
|
10949
|
+
alignedCropJpeg: string().optional()
|
|
10950
|
+
});
|
|
10951
|
+
/**
|
|
10873
10952
|
* Per-camera tunable ranges + defaults. Single source of truth used
|
|
10874
10953
|
* by both the Zod data schema (validation + default fallback) and
|
|
10875
10954
|
* the device settings UI (slider min/max/step). Touch one place and
|
|
@@ -11125,7 +11204,17 @@ var RunnerLocalMetricsSchema = object({
|
|
|
11125
11204
|
avgInferenceTimeMs: number(),
|
|
11126
11205
|
queueDepth: number()
|
|
11127
11206
|
});
|
|
11128
|
-
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly())
|
|
11207
|
+
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
|
|
11208
|
+
handle: FrameHandleSchema,
|
|
11209
|
+
bbox: NativeCropBboxSchema,
|
|
11210
|
+
maxWidth: number().int().positive().optional()
|
|
11211
|
+
}), NativeCropResultSchema.nullable()), method(object({
|
|
11212
|
+
deviceId: number(),
|
|
11213
|
+
frameHandle: FrameHandleSchema.optional(),
|
|
11214
|
+
cropJpeg: string().optional(),
|
|
11215
|
+
parent: DetailParentSchema,
|
|
11216
|
+
steps: array(string()).optional()
|
|
11217
|
+
}), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" });
|
|
11129
11218
|
object({
|
|
11130
11219
|
detected: boolean(),
|
|
11131
11220
|
/** Ms epoch of the last detected-true observation. Null if never detected. */
|
|
@@ -15228,7 +15317,17 @@ var TrackSchema = object({
|
|
|
15228
15317
|
/** Cumulative normalized distance travelled (0..1 units = full frame width). */
|
|
15229
15318
|
totalDistance: number(),
|
|
15230
15319
|
state: TrackStateSchema,
|
|
15231
|
-
active: boolean()
|
|
15320
|
+
active: boolean(),
|
|
15321
|
+
/** Deterministic key-event importance score in [0,1] (server-computed at
|
|
15322
|
+
* track expiry, recomputed on late label). Absent on legacy rows written
|
|
15323
|
+
* before scoring shipped — consumers degrade to absence / compute-on-read. */
|
|
15324
|
+
importance: number().optional(),
|
|
15325
|
+
/** Id of the track's highest-confidence ObjectEvent (its representative
|
|
15326
|
+
* "best" frame). Absent when the track produced no object events. */
|
|
15327
|
+
bestEventId: string().optional(),
|
|
15328
|
+
/** Tag of the importance sub-signal that dominated the score
|
|
15329
|
+
* (identity|dwell|proximity|class|confidence|travel|zone). */
|
|
15330
|
+
importanceReason: string().optional()
|
|
15232
15331
|
});
|
|
15233
15332
|
var BaseEventFields = {
|
|
15234
15333
|
id: string(),
|
|
@@ -15293,8 +15392,18 @@ var ObjectEventSchema = object({
|
|
|
15293
15392
|
frameHeight: number().optional(),
|
|
15294
15393
|
/** MediaStore key for the crop attached to this event (if any). */
|
|
15295
15394
|
mediaKey: string().optional(),
|
|
15395
|
+
/** Design B: MediaStore key of the track's native-resolution key frame (the
|
|
15396
|
+
* best-detection full frame). Resolve via the event-media data-plane
|
|
15397
|
+
* (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
|
|
15398
|
+
* draws `bbox` over the native frame. Absent on legacy rows / non-decoded
|
|
15399
|
+
* sources — consumers fall back to `mediaKey` (the tight crop). */
|
|
15400
|
+
keyFrameMediaKey: string().optional(),
|
|
15296
15401
|
/** Populated by B5 (recording playback URL for this event). */
|
|
15297
|
-
mediaUrl: string().optional()
|
|
15402
|
+
mediaUrl: string().optional(),
|
|
15403
|
+
/** The parent track's key-event importance [0,1], propagated to every object
|
|
15404
|
+
* event of the track (so an event row can be sorted by importance without a
|
|
15405
|
+
* track join). Absent on legacy rows / before the track was scored. */
|
|
15406
|
+
importance: number().optional()
|
|
15298
15407
|
});
|
|
15299
15408
|
var AudioEventSchema = object({
|
|
15300
15409
|
...BaseEventFields,
|
|
@@ -15318,7 +15427,8 @@ var MediaFileKindEnum = _enum([
|
|
|
15318
15427
|
"fullFrame",
|
|
15319
15428
|
"fullFrameBoxed",
|
|
15320
15429
|
"faceCrop",
|
|
15321
|
-
"plateCrop"
|
|
15430
|
+
"plateCrop",
|
|
15431
|
+
"keyFrame"
|
|
15322
15432
|
]);
|
|
15323
15433
|
var MediaFileSchema = object({
|
|
15324
15434
|
key: string(),
|
|
@@ -15339,6 +15449,32 @@ var DeviceEventQueryInput = object({
|
|
|
15339
15449
|
projection: _enum(["full", "slim"]).optional()
|
|
15340
15450
|
});
|
|
15341
15451
|
var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
|
|
15452
|
+
var KeyEventQueryInput = object({
|
|
15453
|
+
deviceId: number(),
|
|
15454
|
+
/** Window lower bound (track firstSeen ≥ since). */
|
|
15455
|
+
since: number(),
|
|
15456
|
+
/** Window upper bound (track firstSeen ≤ until). */
|
|
15457
|
+
until: number(),
|
|
15458
|
+
limit: number().int().min(1).max(200).default(50),
|
|
15459
|
+
/** Drop tracks scoring below this importance. */
|
|
15460
|
+
minImportance: number().min(0).max(1).optional(),
|
|
15461
|
+
/** Restrict to a single class (e.g. 'person'). */
|
|
15462
|
+
classFilter: string().optional()
|
|
15463
|
+
});
|
|
15464
|
+
var KeyEventSchema = object({
|
|
15465
|
+
/** The representative event id (the track's best ObjectEvent, else its trackId). */
|
|
15466
|
+
id: string(),
|
|
15467
|
+
trackId: string(),
|
|
15468
|
+
/** Track start time (firstSeen). */
|
|
15469
|
+
timestamp: number(),
|
|
15470
|
+
className: string(),
|
|
15471
|
+
label: string().optional(),
|
|
15472
|
+
importance: number(),
|
|
15473
|
+
/** Highest-confidence ObjectEvent id for the track (empty when none). */
|
|
15474
|
+
bestEventId: string(),
|
|
15475
|
+
/** Track lifetime in ms (lastSeen - firstSeen). */
|
|
15476
|
+
windowMs: number().optional()
|
|
15477
|
+
});
|
|
15342
15478
|
var TrackedDetectionSchema = object({
|
|
15343
15479
|
trackId: string(),
|
|
15344
15480
|
className: string(),
|
|
@@ -15387,6 +15523,15 @@ var pipelineAnalyticsCapability = {
|
|
|
15387
15523
|
getMotionEvents: method(DeviceEventQueryInput, array(MotionEventSchema).readonly()),
|
|
15388
15524
|
getObjectEvents: method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()),
|
|
15389
15525
|
getAudioEvents: method(DeviceEventQueryInput, array(AudioEventSchema).readonly()),
|
|
15526
|
+
/**
|
|
15527
|
+
* Importance-ranked highlights for a device+window. Queries completed
|
|
15528
|
+
* tracks by (deviceId, firstSeen ∈ [since,until]), scores each (or reuses
|
|
15529
|
+
* the persisted score), filters by minImportance/classFilter, orders by
|
|
15530
|
+
* importance desc, and returns up to `limit` compact key events mapped to
|
|
15531
|
+
* each track's best event. Legacy tracks lacking a persisted score are
|
|
15532
|
+
* scored on-read (no write). Degrades to `[]` on error.
|
|
15533
|
+
*/
|
|
15534
|
+
getKeyEvents: method(KeyEventQueryInput, array(KeyEventSchema).readonly()),
|
|
15390
15535
|
/** Server-side bucketed event counts for the 24-hour timeline.
|
|
15391
15536
|
* Returns one entry per non-empty bucket; empty buckets are omitted. */
|
|
15392
15537
|
getEventDensity: method(object({
|
|
@@ -17353,7 +17498,17 @@ var FaceInfoSchema = object({
|
|
|
17353
17498
|
recognizedIdentityId: string().optional(),
|
|
17354
17499
|
identityName: string().optional(),
|
|
17355
17500
|
assigned: boolean(),
|
|
17356
|
-
base64: string().optional()
|
|
17501
|
+
base64: string().optional(),
|
|
17502
|
+
/** Design B: the face bbox (pixel space) on the key frame — lets a detail
|
|
17503
|
+
* view draw the box over the native `keyFrameMediaKey` frame. Absent on
|
|
17504
|
+
* legacy rows written before design B. */
|
|
17505
|
+
faceBbox: BoundingBoxSchema.optional(),
|
|
17506
|
+
/** Design B: MediaStore key of the track's native-resolution key frame.
|
|
17507
|
+
* Fetch the native JPEG via the event-media data-plane
|
|
17508
|
+
* (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
|
|
17509
|
+
* track produced no key frame (e.g. native/onboard source) — the UI falls
|
|
17510
|
+
* back to the inline `base64` face crop. */
|
|
17511
|
+
keyFrameMediaKey: string().optional()
|
|
17357
17512
|
});
|
|
17358
17513
|
var FaceFilterEnum = _enum([
|
|
17359
17514
|
"unassigned",
|
|
@@ -21522,6 +21677,12 @@ Object.freeze({
|
|
|
21522
21677
|
addonId: null,
|
|
21523
21678
|
access: "view"
|
|
21524
21679
|
},
|
|
21680
|
+
"pipelineAnalytics.getKeyEvents": {
|
|
21681
|
+
capName: "pipeline-analytics",
|
|
21682
|
+
capScope: "device",
|
|
21683
|
+
addonId: null,
|
|
21684
|
+
access: "view"
|
|
21685
|
+
},
|
|
21525
21686
|
"pipelineAnalytics.getMotionEvents": {
|
|
21526
21687
|
capName: "pipeline-analytics",
|
|
21527
21688
|
capScope: "device",
|
|
@@ -22050,12 +22211,24 @@ Object.freeze({
|
|
|
22050
22211
|
addonId: null,
|
|
22051
22212
|
access: "view"
|
|
22052
22213
|
},
|
|
22214
|
+
"pipelineRunner.getNativeCrop": {
|
|
22215
|
+
capName: "pipeline-runner",
|
|
22216
|
+
capScope: "system",
|
|
22217
|
+
addonId: null,
|
|
22218
|
+
access: "view"
|
|
22219
|
+
},
|
|
22053
22220
|
"pipelineRunner.reportMotion": {
|
|
22054
22221
|
capName: "pipeline-runner",
|
|
22055
22222
|
capScope: "system",
|
|
22056
22223
|
addonId: null,
|
|
22057
22224
|
access: "create"
|
|
22058
22225
|
},
|
|
22226
|
+
"pipelineRunner.runDetailSubtree": {
|
|
22227
|
+
capName: "pipeline-runner",
|
|
22228
|
+
capScope: "system",
|
|
22229
|
+
addonId: null,
|
|
22230
|
+
access: "create"
|
|
22231
|
+
},
|
|
22059
22232
|
"plateGallery.correctPlateText": {
|
|
22060
22233
|
capName: "plate-gallery",
|
|
22061
22234
|
capScope: "system",
|
|
@@ -23406,4 +23579,4 @@ object({
|
|
|
23406
23579
|
schemaVersion: literal(1)
|
|
23407
23580
|
});
|
|
23408
23581
|
//#endregion
|
|
23409
|
-
export {
|
|
23582
|
+
export { number as C, tuple as E, boolean as S, string as T, asJsonObject as _, embeddingEncoderCapability as a, _enum as b, nodePin as c, videoclipsCapability as d, zoneAnalyticsCapability as f, EventCategory as g, DeviceType as h, cosineSimilarity as i, pipelineAnalyticsCapability as l, BaseAddon as m, addonWidgetsSourceCapability as n, faceGalleryCapability as o, errMsg as p, audioMetricsCapability as r, hfModelUrl as s, EVENT_PAD_MS as t, plateGalleryCapability as u, createEvent as v, object as w, array as x, hydrateSchema as y };
|
|
@@ -4649,7 +4649,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4649
4649
|
return inst;
|
|
4650
4650
|
}
|
|
4651
4651
|
//#endregion
|
|
4652
|
-
//#region ../types/dist/sleep-
|
|
4652
|
+
//#region ../types/dist/sleep-Baang_XW.mjs
|
|
4653
4653
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4654
4654
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4655
4655
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -7487,6 +7487,36 @@ var EncodeProfileSchema = object({
|
|
|
7487
7487
|
*/
|
|
7488
7488
|
outputArgs: array(string()).optional()
|
|
7489
7489
|
});
|
|
7490
|
+
/**
|
|
7491
|
+
* Per-call node pinning for `ctx.api` capability calls.
|
|
7492
|
+
*
|
|
7493
|
+
* A capability call normally resolves to its DEFAULT provider — a `singleton`
|
|
7494
|
+
* cap resolves to the hub, a device-scoped cap to the device's owning node. To
|
|
7495
|
+
* query a SPECIFIC node's provider instead (e.g. a remote agent's own
|
|
7496
|
+
* in-process `platform-probe` hardware, which the hub cannot probe), pin the
|
|
7497
|
+
* call to that node.
|
|
7498
|
+
*
|
|
7499
|
+
* The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
|
|
7500
|
+
* method args), so capability method signatures stay `nodeId`-free — node
|
|
7501
|
+
* targeting is a property of the CALL, not of the method. The transport lifts
|
|
7502
|
+
* it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
|
|
7503
|
+
* and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
|
|
7504
|
+
* which classifies a pinned agent node as `agent-child-forward`
|
|
7505
|
+
* (`$agent-cap-fwd.forward` → the agent's in-process provider).
|
|
7506
|
+
*
|
|
7507
|
+
* Usage at a call site:
|
|
7508
|
+
*
|
|
7509
|
+
* await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
|
|
7510
|
+
*/
|
|
7511
|
+
/** tRPC `op.context` key carrying a per-call node pin. */
|
|
7512
|
+
var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
|
|
7513
|
+
/**
|
|
7514
|
+
* Build the tRPC request options that pin a single capability call to `nodeId`.
|
|
7515
|
+
* Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
|
|
7516
|
+
*/
|
|
7517
|
+
function nodePin(nodeId) {
|
|
7518
|
+
return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: nodeId } };
|
|
7519
|
+
}
|
|
7490
7520
|
function hfModelUrl(repo, path) {
|
|
7491
7521
|
return `https://huggingface.co/${repo}/resolve/main/${path}`;
|
|
7492
7522
|
}
|
|
@@ -10767,7 +10797,15 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
|
|
|
10767
10797
|
image: _instanceof(Uint8Array).optional(),
|
|
10768
10798
|
referenceImage: string().optional(),
|
|
10769
10799
|
deviceId: number().optional(),
|
|
10770
|
-
sessionId: string().optional()
|
|
10800
|
+
sessionId: string().optional(),
|
|
10801
|
+
/**
|
|
10802
|
+
* Execution plane. 'full' (default) runs the whole tree — benchmark,
|
|
10803
|
+
* reference-image, and detail-subtree calls. 'frame' is the live
|
|
10804
|
+
* per-frame dispatch: ONLY root-plane steps run; crop children
|
|
10805
|
+
* (inputClasses ≠ null) are skipped and served per-track via
|
|
10806
|
+
* pipelineRunner.runDetailSubtree (two-plane design).
|
|
10807
|
+
*/
|
|
10808
|
+
plane: _enum(["full", "frame"]).optional()
|
|
10771
10809
|
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
10772
10810
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
10773
10811
|
steps: array(PipelineStepInputSchema).min(1),
|
|
@@ -10892,6 +10930,47 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).read
|
|
|
10892
10930
|
auth: "admin"
|
|
10893
10931
|
}), object({ zones: array(ZoneSchema).readonly() });
|
|
10894
10932
|
/**
|
|
10933
|
+
* A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
|
|
10934
|
+
* decode worker resolves it against the RETAINED native frame's real pixel dims,
|
|
10935
|
+
* so the caller supplies only the detection-res bbox divided by the detection
|
|
10936
|
+
* dims — no native resolution to plumb.
|
|
10937
|
+
*/
|
|
10938
|
+
var NativeCropBboxSchema = object({
|
|
10939
|
+
x: number(),
|
|
10940
|
+
y: number(),
|
|
10941
|
+
w: number(),
|
|
10942
|
+
h: number()
|
|
10943
|
+
});
|
|
10944
|
+
/** Result of a best-effort native-resolution crop (`getNativeCrop`). */
|
|
10945
|
+
var NativeCropResultSchema = object({
|
|
10946
|
+
/** Packed rgb (24-bit) pixels of the crop. */
|
|
10947
|
+
bytes: _instanceof(Uint8Array),
|
|
10948
|
+
width: number().int().positive(),
|
|
10949
|
+
height: number().int().positive()
|
|
10950
|
+
});
|
|
10951
|
+
/** Parent detection context passed to `runDetailSubtree` — the crop's
|
|
10952
|
+
* originating detection, in FRAME-space coordinates. Reuses
|
|
10953
|
+
* `NativeCropBboxSchema`'s `{x,y,w,h}` shape (same numeric fields; here
|
|
10954
|
+
* the coordinates are frame-space rather than getNativeCrop's
|
|
10955
|
+
* normalized [0,1] convention). */
|
|
10956
|
+
var DetailParentSchema = object({
|
|
10957
|
+
bbox: NativeCropBboxSchema,
|
|
10958
|
+
className: string()
|
|
10959
|
+
});
|
|
10960
|
+
/** One child-step result from `runDetailSubtree` — an embedding, label,
|
|
10961
|
+
* or refined detection produced by running the crop-subtree on a
|
|
10962
|
+
* single tracked detection. */
|
|
10963
|
+
var DetailResultSchema = object({
|
|
10964
|
+
stepId: string(),
|
|
10965
|
+
className: string(),
|
|
10966
|
+
score: number(),
|
|
10967
|
+
/** FRAME-space bbox (already mapped back from crop space). */
|
|
10968
|
+
bbox: NativeCropBboxSchema.optional(),
|
|
10969
|
+
embedding: string().optional(),
|
|
10970
|
+
label: string().optional(),
|
|
10971
|
+
alignedCropJpeg: string().optional()
|
|
10972
|
+
});
|
|
10973
|
+
/**
|
|
10895
10974
|
* Per-camera tunable ranges + defaults. Single source of truth used
|
|
10896
10975
|
* by both the Zod data schema (validation + default fallback) and
|
|
10897
10976
|
* the device settings UI (slider min/max/step). Touch one place and
|
|
@@ -11147,7 +11226,17 @@ var RunnerLocalMetricsSchema = object({
|
|
|
11147
11226
|
avgInferenceTimeMs: number(),
|
|
11148
11227
|
queueDepth: number()
|
|
11149
11228
|
});
|
|
11150
|
-
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly())
|
|
11229
|
+
method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
|
|
11230
|
+
handle: FrameHandleSchema,
|
|
11231
|
+
bbox: NativeCropBboxSchema,
|
|
11232
|
+
maxWidth: number().int().positive().optional()
|
|
11233
|
+
}), NativeCropResultSchema.nullable()), method(object({
|
|
11234
|
+
deviceId: number(),
|
|
11235
|
+
frameHandle: FrameHandleSchema.optional(),
|
|
11236
|
+
cropJpeg: string().optional(),
|
|
11237
|
+
parent: DetailParentSchema,
|
|
11238
|
+
steps: array(string()).optional()
|
|
11239
|
+
}), object({ details: array(DetailResultSchema) }).nullable(), { kind: "mutation" });
|
|
11151
11240
|
object({
|
|
11152
11241
|
detected: boolean(),
|
|
11153
11242
|
/** Ms epoch of the last detected-true observation. Null if never detected. */
|
|
@@ -15250,7 +15339,17 @@ var TrackSchema = object({
|
|
|
15250
15339
|
/** Cumulative normalized distance travelled (0..1 units = full frame width). */
|
|
15251
15340
|
totalDistance: number(),
|
|
15252
15341
|
state: TrackStateSchema,
|
|
15253
|
-
active: boolean()
|
|
15342
|
+
active: boolean(),
|
|
15343
|
+
/** Deterministic key-event importance score in [0,1] (server-computed at
|
|
15344
|
+
* track expiry, recomputed on late label). Absent on legacy rows written
|
|
15345
|
+
* before scoring shipped — consumers degrade to absence / compute-on-read. */
|
|
15346
|
+
importance: number().optional(),
|
|
15347
|
+
/** Id of the track's highest-confidence ObjectEvent (its representative
|
|
15348
|
+
* "best" frame). Absent when the track produced no object events. */
|
|
15349
|
+
bestEventId: string().optional(),
|
|
15350
|
+
/** Tag of the importance sub-signal that dominated the score
|
|
15351
|
+
* (identity|dwell|proximity|class|confidence|travel|zone). */
|
|
15352
|
+
importanceReason: string().optional()
|
|
15254
15353
|
});
|
|
15255
15354
|
var BaseEventFields = {
|
|
15256
15355
|
id: string(),
|
|
@@ -15315,8 +15414,18 @@ var ObjectEventSchema = object({
|
|
|
15315
15414
|
frameHeight: number().optional(),
|
|
15316
15415
|
/** MediaStore key for the crop attached to this event (if any). */
|
|
15317
15416
|
mediaKey: string().optional(),
|
|
15417
|
+
/** Design B: MediaStore key of the track's native-resolution key frame (the
|
|
15418
|
+
* best-detection full frame). Resolve via the event-media data-plane
|
|
15419
|
+
* (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
|
|
15420
|
+
* draws `bbox` over the native frame. Absent on legacy rows / non-decoded
|
|
15421
|
+
* sources — consumers fall back to `mediaKey` (the tight crop). */
|
|
15422
|
+
keyFrameMediaKey: string().optional(),
|
|
15318
15423
|
/** Populated by B5 (recording playback URL for this event). */
|
|
15319
|
-
mediaUrl: string().optional()
|
|
15424
|
+
mediaUrl: string().optional(),
|
|
15425
|
+
/** The parent track's key-event importance [0,1], propagated to every object
|
|
15426
|
+
* event of the track (so an event row can be sorted by importance without a
|
|
15427
|
+
* track join). Absent on legacy rows / before the track was scored. */
|
|
15428
|
+
importance: number().optional()
|
|
15320
15429
|
});
|
|
15321
15430
|
var AudioEventSchema = object({
|
|
15322
15431
|
...BaseEventFields,
|
|
@@ -15340,7 +15449,8 @@ var MediaFileKindEnum = _enum([
|
|
|
15340
15449
|
"fullFrame",
|
|
15341
15450
|
"fullFrameBoxed",
|
|
15342
15451
|
"faceCrop",
|
|
15343
|
-
"plateCrop"
|
|
15452
|
+
"plateCrop",
|
|
15453
|
+
"keyFrame"
|
|
15344
15454
|
]);
|
|
15345
15455
|
var MediaFileSchema = object({
|
|
15346
15456
|
key: string(),
|
|
@@ -15361,6 +15471,32 @@ var DeviceEventQueryInput = object({
|
|
|
15361
15471
|
projection: _enum(["full", "slim"]).optional()
|
|
15362
15472
|
});
|
|
15363
15473
|
var ObjectEventQueryInput = DeviceEventQueryInput.extend({ classFilter: string().optional() });
|
|
15474
|
+
var KeyEventQueryInput = object({
|
|
15475
|
+
deviceId: number(),
|
|
15476
|
+
/** Window lower bound (track firstSeen ≥ since). */
|
|
15477
|
+
since: number(),
|
|
15478
|
+
/** Window upper bound (track firstSeen ≤ until). */
|
|
15479
|
+
until: number(),
|
|
15480
|
+
limit: number().int().min(1).max(200).default(50),
|
|
15481
|
+
/** Drop tracks scoring below this importance. */
|
|
15482
|
+
minImportance: number().min(0).max(1).optional(),
|
|
15483
|
+
/** Restrict to a single class (e.g. 'person'). */
|
|
15484
|
+
classFilter: string().optional()
|
|
15485
|
+
});
|
|
15486
|
+
var KeyEventSchema = object({
|
|
15487
|
+
/** The representative event id (the track's best ObjectEvent, else its trackId). */
|
|
15488
|
+
id: string(),
|
|
15489
|
+
trackId: string(),
|
|
15490
|
+
/** Track start time (firstSeen). */
|
|
15491
|
+
timestamp: number(),
|
|
15492
|
+
className: string(),
|
|
15493
|
+
label: string().optional(),
|
|
15494
|
+
importance: number(),
|
|
15495
|
+
/** Highest-confidence ObjectEvent id for the track (empty when none). */
|
|
15496
|
+
bestEventId: string(),
|
|
15497
|
+
/** Track lifetime in ms (lastSeen - firstSeen). */
|
|
15498
|
+
windowMs: number().optional()
|
|
15499
|
+
});
|
|
15364
15500
|
var TrackedDetectionSchema = object({
|
|
15365
15501
|
trackId: string(),
|
|
15366
15502
|
className: string(),
|
|
@@ -15409,6 +15545,15 @@ var pipelineAnalyticsCapability = {
|
|
|
15409
15545
|
getMotionEvents: method(DeviceEventQueryInput, array(MotionEventSchema).readonly()),
|
|
15410
15546
|
getObjectEvents: method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()),
|
|
15411
15547
|
getAudioEvents: method(DeviceEventQueryInput, array(AudioEventSchema).readonly()),
|
|
15548
|
+
/**
|
|
15549
|
+
* Importance-ranked highlights for a device+window. Queries completed
|
|
15550
|
+
* tracks by (deviceId, firstSeen ∈ [since,until]), scores each (or reuses
|
|
15551
|
+
* the persisted score), filters by minImportance/classFilter, orders by
|
|
15552
|
+
* importance desc, and returns up to `limit` compact key events mapped to
|
|
15553
|
+
* each track's best event. Legacy tracks lacking a persisted score are
|
|
15554
|
+
* scored on-read (no write). Degrades to `[]` on error.
|
|
15555
|
+
*/
|
|
15556
|
+
getKeyEvents: method(KeyEventQueryInput, array(KeyEventSchema).readonly()),
|
|
15412
15557
|
/** Server-side bucketed event counts for the 24-hour timeline.
|
|
15413
15558
|
* Returns one entry per non-empty bucket; empty buckets are omitted. */
|
|
15414
15559
|
getEventDensity: method(object({
|
|
@@ -17375,7 +17520,17 @@ var FaceInfoSchema = object({
|
|
|
17375
17520
|
recognizedIdentityId: string().optional(),
|
|
17376
17521
|
identityName: string().optional(),
|
|
17377
17522
|
assigned: boolean(),
|
|
17378
|
-
base64: string().optional()
|
|
17523
|
+
base64: string().optional(),
|
|
17524
|
+
/** Design B: the face bbox (pixel space) on the key frame — lets a detail
|
|
17525
|
+
* view draw the box over the native `keyFrameMediaKey` frame. Absent on
|
|
17526
|
+
* legacy rows written before design B. */
|
|
17527
|
+
faceBbox: BoundingBoxSchema.optional(),
|
|
17528
|
+
/** Design B: MediaStore key of the track's native-resolution key frame.
|
|
17529
|
+
* Fetch the native JPEG via the event-media data-plane
|
|
17530
|
+
* (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
|
|
17531
|
+
* track produced no key frame (e.g. native/onboard source) — the UI falls
|
|
17532
|
+
* back to the inline `base64` face crop. */
|
|
17533
|
+
keyFrameMediaKey: string().optional()
|
|
17379
17534
|
});
|
|
17380
17535
|
var FaceFilterEnum = _enum([
|
|
17381
17536
|
"unassigned",
|
|
@@ -21544,6 +21699,12 @@ Object.freeze({
|
|
|
21544
21699
|
addonId: null,
|
|
21545
21700
|
access: "view"
|
|
21546
21701
|
},
|
|
21702
|
+
"pipelineAnalytics.getKeyEvents": {
|
|
21703
|
+
capName: "pipeline-analytics",
|
|
21704
|
+
capScope: "device",
|
|
21705
|
+
addonId: null,
|
|
21706
|
+
access: "view"
|
|
21707
|
+
},
|
|
21547
21708
|
"pipelineAnalytics.getMotionEvents": {
|
|
21548
21709
|
capName: "pipeline-analytics",
|
|
21549
21710
|
capScope: "device",
|
|
@@ -22072,12 +22233,24 @@ Object.freeze({
|
|
|
22072
22233
|
addonId: null,
|
|
22073
22234
|
access: "view"
|
|
22074
22235
|
},
|
|
22236
|
+
"pipelineRunner.getNativeCrop": {
|
|
22237
|
+
capName: "pipeline-runner",
|
|
22238
|
+
capScope: "system",
|
|
22239
|
+
addonId: null,
|
|
22240
|
+
access: "view"
|
|
22241
|
+
},
|
|
22075
22242
|
"pipelineRunner.reportMotion": {
|
|
22076
22243
|
capName: "pipeline-runner",
|
|
22077
22244
|
capScope: "system",
|
|
22078
22245
|
addonId: null,
|
|
22079
22246
|
access: "create"
|
|
22080
22247
|
},
|
|
22248
|
+
"pipelineRunner.runDetailSubtree": {
|
|
22249
|
+
capName: "pipeline-runner",
|
|
22250
|
+
capScope: "system",
|
|
22251
|
+
addonId: null,
|
|
22252
|
+
access: "create"
|
|
22253
|
+
},
|
|
22081
22254
|
"plateGallery.correctPlateText": {
|
|
22082
22255
|
capName: "plate-gallery",
|
|
22083
22256
|
capScope: "system",
|
|
@@ -23536,6 +23709,12 @@ Object.defineProperty(exports, "hydrateSchema", {
|
|
|
23536
23709
|
return hydrateSchema;
|
|
23537
23710
|
}
|
|
23538
23711
|
});
|
|
23712
|
+
Object.defineProperty(exports, "nodePin", {
|
|
23713
|
+
enumerable: true,
|
|
23714
|
+
get: function() {
|
|
23715
|
+
return nodePin;
|
|
23716
|
+
}
|
|
23717
|
+
});
|
|
23539
23718
|
Object.defineProperty(exports, "number", {
|
|
23540
23719
|
enumerable: true,
|
|
23541
23720
|
get: function() {
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-CtnFKuWh.js");
|
|
6
6
|
let node_fs = require("node:fs");
|
|
7
7
|
let node_fs$1 = require_dist.__toESM(node_fs, 1);
|
|
8
8
|
node_fs = require_dist.__toESM(node_fs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as embeddingEncoderCapability,
|
|
1
|
+
import { a as embeddingEncoderCapability, m as BaseAddon, s as hfModelUrl } from "../dist-BqOBYSWs.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
6
|
-
const require_resolve_frame = require("../resolve-frame-
|
|
5
|
+
const require_dist = require("../dist-CtnFKuWh.js");
|
|
6
|
+
const require_resolve_frame = require("../resolve-frame-BAdpVnlx.js");
|
|
7
7
|
let _camstack_shm_ring = require("@camstack/shm-ring");
|
|
8
8
|
//#region src/enrichment-engine/types.ts
|
|
9
9
|
var DEFAULT_ENRICHMENT_CONFIG = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as
|
|
1
|
+
import { C as number, E as tuple, S as boolean, T as string, _ as asJsonObject, b as _enum, g as EventCategory, m as BaseAddon, v as createEvent, w as object, x as array } from "../dist-BqOBYSWs.mjs";
|
|
2
2
|
import { n as extractCrop, t as resolveFrame } from "../resolve-frame-CT1T1tWy.mjs";
|
|
3
3
|
import { FrameRingReaderCache } from "@camstack/shm-ring";
|
|
4
4
|
//#region src/enrichment-engine/types.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e, i as t, n, o as r, r as i, t as a } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.js-C0AuF9av.mjs";
|
|
2
2
|
import { t as o } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-B3Wx5J80.mjs";
|
|
3
|
-
import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-
|
|
3
|
+
import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BXQHc7Tq.mjs";
|
|
4
4
|
import { n as m, r as h, t as g } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-Bm-iyjmq.mjs";
|
|
5
5
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
|
|
6
6
|
var _ = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), v = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), y = (e) => {
|
|
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
|
|
|
3
3
|
var e = {
|
|
4
4
|
"@camstack/sdk": {
|
|
5
5
|
name: "@camstack/sdk",
|
|
6
|
-
version: "1.1.
|
|
6
|
+
version: "1.1.24",
|
|
7
7
|
scope: ["default"],
|
|
8
8
|
loaded: !1,
|
|
9
9
|
from: "addon_pipeline_analytics_widgets",
|
|
@@ -18,7 +18,7 @@ var e = {
|
|
|
18
18
|
},
|
|
19
19
|
"@camstack/types": {
|
|
20
20
|
name: "@camstack/types",
|
|
21
|
-
version: "1.1.
|
|
21
|
+
version: "1.1.43",
|
|
22
22
|
scope: ["default"],
|
|
23
23
|
loaded: !1,
|
|
24
24
|
from: "addon_pipeline_analytics_widgets",
|
|
@@ -33,7 +33,7 @@ var e = {
|
|
|
33
33
|
},
|
|
34
34
|
"@camstack/ui-library": {
|
|
35
35
|
name: "@camstack/ui-library",
|
|
36
|
-
version: "1.1.
|
|
36
|
+
version: "1.1.35",
|
|
37
37
|
scope: ["default"],
|
|
38
38
|
loaded: !1,
|
|
39
39
|
from: "addon_pipeline_analytics_widgets",
|