@camstack/addon-pipeline 1.2.45 → 1.2.46

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.
Files changed (35) hide show
  1. package/dist/audio-analyzer/index.js +1 -1
  2. package/dist/audio-analyzer/index.mjs +1 -1
  3. package/dist/detection-pipeline/index.js +43 -13
  4. package/dist/detection-pipeline/index.mjs +43 -13
  5. package/dist/{dist-QyZ7QSRP.js → dist-CPfFUIl9.js} +379 -3
  6. package/dist/{dist-BDkEhx4Z.mjs → dist-CUj9mdhh.mjs} +379 -3
  7. package/dist/{event-loop-stall-monitor-COEKVBQK.js → event-loop-stall-monitor-BGbgcrEN.js} +7 -1
  8. package/dist/{event-loop-stall-monitor-IAuNEdmG.mjs → event-loop-stall-monitor-md__iwWh.mjs} +7 -1
  9. package/dist/motion-wasm/index.js +1 -1
  10. package/dist/motion-wasm/index.mjs +1 -1
  11. package/dist/pipeline-runner/index.js +15 -6
  12. package/dist/pipeline-runner/index.mjs +15 -6
  13. package/dist/recorder/index.js +1 -1
  14. package/dist/recorder/index.mjs +1 -1
  15. package/dist/session-decode/decode-worker-child.js +1 -1
  16. package/dist/session-decode/decode-worker-child.mjs +1 -1
  17. package/dist/stream-broker/_stub.js +2 -2
  18. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-C68YfSUH.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-aUWVCncO.mjs} +2 -2
  19. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DN2e2GJL.mjs +26 -0
  20. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B3GxBnXM.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-2D_L2y3g.mjs} +1 -1
  21. package/dist/stream-broker/{hostInit-BMCrULpc.mjs → hostInit-CRwWRwJH.mjs} +2 -2
  22. package/dist/stream-broker/index.js +262 -8
  23. package/dist/stream-broker/index.mjs +262 -8
  24. package/dist/stream-broker/remoteEntry.js +1 -1
  25. package/dist/{worker-protocol-DFH_z2-q.mjs → worker-protocol-CD0M9YD7.mjs} +1 -1
  26. package/dist/{worker-protocol-le27Mw_8.js → worker-protocol-hdTR-F5q.js} +1 -1
  27. package/embed-dist/assets/{MaskShapeCanvas-DI4BY7W2-C7bsz4cP.js → MaskShapeCanvas-DI4BY7W2-C8eGXtf-.js} +1 -1
  28. package/embed-dist/assets/{MotionZonesSettings-NcxxQN8r-BmhLinUd.js → MotionZonesSettings-NcxxQN8r-vvEcAgxS.js} +1 -1
  29. package/embed-dist/assets/{PrivacyMaskSettings-APgPLF7p-BJjyGWFy.js → PrivacyMaskSettings-APgPLF7p-BLhx7VI-.js} +1 -1
  30. package/embed-dist/assets/{index-a4CMt-Uc.js → index-DvOgpqcE.js} +12 -12
  31. package/embed-dist/assets/index-ICnBEqOy.css +2 -0
  32. package/embed-dist/index.html +2 -2
  33. package/package.json +1 -1
  34. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CT2bGWqM.mjs +0 -26
  35. package/embed-dist/assets/index-DC63og2c.css +0 -2
@@ -16485,6 +16485,60 @@ var TrackFlagsSchema = object({
16485
16485
  * `trained` without a re-fetch. */
16486
16486
  retrainStatus: RetrainStatusSchema
16487
16487
  });
16488
+ union([literal(1), literal(2)]);
16489
+ /**
16490
+ * WHO decided a label, and when. Carried per tier so a value can be traced to
16491
+ * the step and model that produced it — which is what makes the write rule
16492
+ * arguable after the fact ("why is 592's label `dog` and not `Canis lupus`?")
16493
+ * and what lets a migrated, UNATTRIBUTED value be told apart from a real one.
16494
+ *
16495
+ * `stepId` is the pipeline step id (`animal-classifier`, `bird-classifier`,
16496
+ * `plate-ocr`, `face-embedding`, `object-detection`), or the sentinel
16497
+ * `migration:4g` for a value the 4g migration moved from the single-slot era —
16498
+ * that value has no provenance, and the write rule lets ANY properly-attributed
16499
+ * write of the same tier replace it regardless of score.
16500
+ */
16501
+ var LabelAttributionSchema = object({
16502
+ stepId: string(),
16503
+ modelId: string().optional(),
16504
+ decidedAt: number()
16505
+ });
16506
+ /**
16507
+ * The TIERED label model (roadmap 4g), spread into `TrackSchema` and
16508
+ * `ObjectEventSchema` from ONE place so the two surfaces cannot drift — a
16509
+ * track and its events always answer the same question the same way.
16510
+ *
16511
+ * Two scalar columns, not an array: every consumer wants "the coarse one" or
16512
+ * "the fine one", and an array made both a scan. `label` is tier 1, `subLabel`
16513
+ * is tier 2, and each carries its own score + attribution.
16514
+ *
16515
+ * **Reading it.** What a human should be shown is `subLabel ?? label` — the
16516
+ * finest thing known. Before 4g the single `label` column held the finest
16517
+ * value, so a consumer that has not been updated reads the tier-1 slot and
16518
+ * shows nothing on a species-only row; that is why the migration puts every
16519
+ * pre-4g value in tier 2 (it cannot regress a display that reads the fallback)
16520
+ * and why the read surfaces were changed in the same train.
16521
+ *
16522
+ * **Writing it.** The slots are independent, which is the whole point: a
16523
+ * tier-1 write (`bird`) can never overwrite a tier-2 value (`Turdus
16524
+ * migratorius`), so fineness cannot regress by construction. Within a tier the
16525
+ * higher score wins. One rule, one implementation — see
16526
+ * `pipeline/label-tier.ts` in addon-post-analysis.
16527
+ */
16528
+ var TieredLabelFields = {
16529
+ /** Tier 1 — the sub-class. See {@link LabelTierSchema}. */
16530
+ label: string().optional(),
16531
+ /** Confidence of the tier-1 value, as reported by the deciding step. */
16532
+ labelScore: number().optional(),
16533
+ /** Provenance of the tier-1 value. See {@link LabelAttributionSchema}. */
16534
+ labelMeta: LabelAttributionSchema.optional(),
16535
+ /** Tier 2 — the instance. See {@link LabelTierSchema}. */
16536
+ subLabel: string().optional(),
16537
+ /** Confidence of the tier-2 value, as reported by the deciding step. */
16538
+ subLabelScore: number().optional(),
16539
+ /** Provenance of the tier-2 value. See {@link LabelAttributionSchema}. */
16540
+ subLabelMeta: LabelAttributionSchema.optional()
16541
+ };
16488
16542
  /** Per-camera slice of a training-export estimate. */
16489
16543
  var TrainingExportDeviceTotalsSchema = object({
16490
16544
  deviceId: number(),
@@ -16509,7 +16563,7 @@ var TrackSchema = object({
16509
16563
  trackId: string(),
16510
16564
  deviceId: number(),
16511
16565
  className: string(),
16512
- label: string().optional(),
16566
+ ...TieredLabelFields,
16513
16567
  producingDeviceName: string().optional(),
16514
16568
  /** Track provenance. Absent ⇒ `pipeline` (legacy rows). */
16515
16569
  source: TrackSourceSchema.optional(),
@@ -16622,7 +16676,7 @@ var ObjectEventSchema = object({
16622
16676
  /** Omitted in slim projection. */
16623
16677
  trackId: string().optional(),
16624
16678
  className: string(),
16625
- label: string().optional(),
16679
+ ...TieredLabelFields,
16626
16680
  /** Omitted in slim projection. */
16627
16681
  confidence: number().optional(),
16628
16682
  /** Heavy JSON — omitted in slim projection. */
@@ -16703,6 +16757,173 @@ var MediaFileSchema = object({
16703
16757
  * stored blob and a `?variant=thumb` rendering without fetching either.
16704
16758
  */
16705
16759
  var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
16760
+ /**
16761
+ * The MACRO tier of an annotation — a CLOSED set.
16762
+ *
16763
+ * This is what the exported detector predicts, so a typo here is a new class
16764
+ * with one example in it. `label` and `subLabel` are open strings by contrast:
16765
+ * the whole point of the page is teaching the model things it does not know
16766
+ * yet, and constraining that vocabulary would make it useless.
16767
+ *
16768
+ * A macro class is NEVER a label. The provider refuses a write whose `label` or
16769
+ * `subLabel` is one of these values, in any casing, because once `person`
16770
+ * exists in both tiers "every person box" stops being answerable without
16771
+ * knowing every string anyone ever typed — and the damage is retroactive.
16772
+ */
16773
+ var RetrainMacroClassSchema = _enum([
16774
+ "person",
16775
+ "vehicle",
16776
+ "animal",
16777
+ "package",
16778
+ "face",
16779
+ "plate"
16780
+ ]);
16781
+ /** A subject to learn, or a phantom to unlearn (taught by OMISSION). */
16782
+ var RetrainAnnotationKindSchema = _enum(["subject", "model_error"]);
16783
+ /** Did a human draw this box, or did the assist propose it? */
16784
+ var RetrainAnnotationSourceSchema = _enum(["operator", "assist"]);
16785
+ /** Normalised `[0,1]` rectangle against the FULL frame — the canonical form. */
16786
+ var RetrainBboxSchema = object({
16787
+ x: number(),
16788
+ y: number(),
16789
+ w: number(),
16790
+ h: number()
16791
+ });
16792
+ /**
16793
+ * One annotated subject.
16794
+ *
16795
+ * `bbox` is normalised against the full frame, ALWAYS. The per-model shapes
16796
+ * (letterboxed root / zone-cropped package / subject-cropped classifier) are
16797
+ * derived from it at export and never stored — storing them is how one feature
16798
+ * space ends up holding two crops of the same subject (D52).
16799
+ */
16800
+ var RetrainAnnotationSchema = object({
16801
+ id: string(),
16802
+ trackId: string(),
16803
+ deviceId: number(),
16804
+ /** The COPY in retrain storage — never the source track's media key. */
16805
+ mediaKey: string(),
16806
+ bbox: RetrainBboxSchema,
16807
+ macroClass: RetrainMacroClassSchema,
16808
+ label: string().optional(),
16809
+ subLabel: string().optional(),
16810
+ kind: RetrainAnnotationKindSchema,
16811
+ source: RetrainAnnotationSourceSchema,
16812
+ /** Which model proposed this box — or, on a `model_error`, drew the phantom. */
16813
+ assistModelId: string().optional(),
16814
+ assistScore: number().optional(),
16815
+ exportedInBatch: string().optional(),
16816
+ createdAt: number()
16817
+ });
16818
+ /** The write form — the server owns `id`, `createdAt` and the frame binding. */
16819
+ var RetrainAnnotationDraftSchema = RetrainAnnotationSchema.omit({
16820
+ id: true,
16821
+ trackId: true,
16822
+ deviceId: true,
16823
+ mediaKey: true,
16824
+ createdAt: true,
16825
+ exportedInBatch: true
16826
+ });
16827
+ /** A track sitting in `staging`, with everything the worklist needs to rank it. */
16828
+ var RetrainTrackSchema = object({
16829
+ trackId: string(),
16830
+ deviceId: number(),
16831
+ className: string(),
16832
+ label: string().optional(),
16833
+ firstSeen: number(),
16834
+ lastSeen: number(),
16835
+ /** How many frames the dataset already holds from this track. */
16836
+ frameCount: number().int(),
16837
+ /** How many subjects have been annotated on those frames. `0` with
16838
+ * `frameCount: 0` is exactly "staging, still to work". */
16839
+ annotationCount: number().int()
16840
+ });
16841
+ /** A frame the picker may offer — an index row, no blob was read to produce it. */
16842
+ var RetrainFrameCandidateSchema = object({
16843
+ mediaKey: string(),
16844
+ kind: MediaFileKindEnum,
16845
+ timestamp: number(),
16846
+ sizeBytes: number().int(),
16847
+ /** A copy of this original already exists — selecting it is free and cannot
16848
+ * fail, whatever became of the original. */
16849
+ copied: boolean()
16850
+ });
16851
+ /** A frame the dataset OWNS: bytes copied at selection time. */
16852
+ var RetrainFrameSchema = object({
16853
+ frameId: string(),
16854
+ deviceId: number(),
16855
+ trackId: string(),
16856
+ /** Provenance only. It may already point at nothing — that is expected. */
16857
+ sourceMediaKey: string(),
16858
+ sourceKind: MediaFileKindEnum,
16859
+ sizeBytes: number().int(),
16860
+ width: number().int(),
16861
+ height: number().int(),
16862
+ copiedAt: number()
16863
+ });
16864
+ /** Why a copy-on-select could not be honoured — named, never a silent skip. */
16865
+ var RetrainCopyRefusalSchema = _enum([
16866
+ "source-missing",
16867
+ "unreadable-image",
16868
+ "write-failed"
16869
+ ]);
16870
+ var RetrainFrameSelectionSchema = object({
16871
+ copied: array(RetrainFrameSchema).readonly(),
16872
+ refused: array(object({
16873
+ sourceMediaKey: string(),
16874
+ reason: RetrainCopyRefusalSchema
16875
+ })).readonly()
16876
+ });
16877
+ var RetrainFrameListSchema = object({
16878
+ candidates: array(RetrainFrameCandidateSchema).readonly(),
16879
+ copies: array(RetrainFrameSchema).readonly(),
16880
+ /** What the page pre-selects — the native key frame when one survives. */
16881
+ autoPickMediaKey: string().optional()
16882
+ });
16883
+ /** What the operator asked the assist to look for. */
16884
+ var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
16885
+ kind: literal("package"),
16886
+ zone: RetrainBboxSchema.optional()
16887
+ }), object({
16888
+ kind: literal("objects"),
16889
+ modelId: string(),
16890
+ minScore: number().optional()
16891
+ })]);
16892
+ /**
16893
+ * The assist's answer — a discriminated union, because "the model saw nothing"
16894
+ * and "this node cannot run that model" lead to different next moves and a
16895
+ * nullable result cannot tell them apart.
16896
+ */
16897
+ var RetrainAssistResultSchema = discriminatedUnion("kind", [object({
16898
+ kind: literal("proposed"),
16899
+ modelId: string(),
16900
+ stepId: string(),
16901
+ minScore: number(),
16902
+ /** Drafts, ready to edit. `source: 'assist'` until the operator touches one. */
16903
+ proposals: array(RetrainAnnotationDraftSchema).readonly(),
16904
+ /** Returned by the runner but removed by the threshold. */
16905
+ belowThreshold: number().int()
16906
+ }), object({
16907
+ kind: literal("refused"),
16908
+ /** `no-zone` is ours; the rest are the runner's own refusal vocabulary. */
16909
+ reason: string(),
16910
+ detail: string().optional()
16911
+ })]);
16912
+ /** The outcome of a lifecycle move owned by the retrain page. */
16913
+ var RetrainTransitionResultSchema = object({
16914
+ trackId: string(),
16915
+ /** Where the track ended up, whatever happened. */
16916
+ retrainStatus: RetrainStatusSchema,
16917
+ /** `false` ⇒ the move was refused or was a no-op; `reason` says which. */
16918
+ changed: boolean(),
16919
+ reason: _enum([
16920
+ "unknown-track",
16921
+ "no-frames-copied",
16922
+ "not-staging",
16923
+ "not-trained",
16924
+ "unchanged"
16925
+ ]).optional()
16926
+ });
16706
16927
  var DEFAULT_EVENT_QUERY_LIMIT = 1e3;
16707
16928
  var MAX_EVENT_QUERY_LIMIT = 5e3;
16708
16929
  var DeviceEventQueryInput = object({
@@ -16757,7 +16978,7 @@ var KeyEventSchema = object({
16757
16978
  /** Track start time (firstSeen). */
16758
16979
  timestamp: number(),
16759
16980
  className: string(),
16760
- label: string().optional(),
16981
+ ...TieredLabelFields,
16761
16982
  importance: number(),
16762
16983
  /** Highest-confidence ObjectEvent id for the track (empty when none). */
16763
16984
  bestEventId: string(),
@@ -17031,6 +17252,79 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17031
17252
  }), method(object({ deviceIds: array(number()).optional() }), object({ url: string() }), {
17032
17253
  kind: "query",
17033
17254
  auth: "admin"
17255
+ }), method(object({
17256
+ /** Empty ⇒ every camera that has staging tracks. A LIST, not a single
17257
+ * `deviceId`, deliberately: `deviceId` would make this device-bound and
17258
+ * route it at one camera's owner, and "every camera" would stop being
17259
+ * expressible at all. */
17260
+ deviceIds: array(number()).optional(),
17261
+ limit: number().int().min(1).max(500).optional()
17262
+ }), array(RetrainTrackSchema).readonly(), {
17263
+ kind: "query",
17264
+ auth: "admin"
17265
+ }), method(object({ trackId: string() }), RetrainFrameListSchema, {
17266
+ kind: "query",
17267
+ auth: "admin"
17268
+ }), method(object({
17269
+ deviceId: number(),
17270
+ trackId: string(),
17271
+ mediaKeys: array(string()).min(1)
17272
+ }), RetrainFrameSelectionSchema, {
17273
+ kind: "mutation",
17274
+ auth: "admin"
17275
+ }), method(object({
17276
+ deviceId: number(),
17277
+ trackId: string(),
17278
+ frameId: string()
17279
+ }), object({
17280
+ removed: boolean(),
17281
+ removedAnnotations: number().int()
17282
+ }), {
17283
+ kind: "mutation",
17284
+ auth: "admin"
17285
+ }), method(object({ frameId: string() }), object({
17286
+ base64: string(),
17287
+ width: number().int(),
17288
+ height: number().int()
17289
+ }), {
17290
+ kind: "query",
17291
+ auth: "admin"
17292
+ }), method(object({
17293
+ deviceId: number(),
17294
+ trackId: string(),
17295
+ frameId: string(),
17296
+ subject: RetrainAssistSubjectSchema,
17297
+ /** Which node runs it. Absent ⇒ wherever an unowned call lands. */
17298
+ nodeId: string().optional()
17299
+ }), RetrainAssistResultSchema, {
17300
+ kind: "mutation",
17301
+ auth: "admin"
17302
+ }), method(object({ trackId: string() }), array(RetrainAnnotationSchema).readonly(), {
17303
+ kind: "query",
17304
+ auth: "admin"
17305
+ }), method(object({
17306
+ deviceId: number(),
17307
+ trackId: string(),
17308
+ frameId: string(),
17309
+ annotations: array(RetrainAnnotationDraftSchema)
17310
+ }), array(RetrainAnnotationSchema).readonly(), {
17311
+ kind: "mutation",
17312
+ auth: "admin"
17313
+ }), method(object({
17314
+ deviceId: number(),
17315
+ trackId: string()
17316
+ }), RetrainTransitionResultSchema, {
17317
+ kind: "mutation",
17318
+ auth: "admin"
17319
+ }), method(object({
17320
+ deviceId: number(),
17321
+ trackId: string()
17322
+ }), RetrainTransitionResultSchema, {
17323
+ kind: "mutation",
17324
+ auth: "admin"
17325
+ }), method(object({ deviceIds: array(number()).optional() }), object({ url: string() }), {
17326
+ kind: "query",
17327
+ auth: "admin"
17034
17328
  }), method(object({
17035
17329
  eventId: string(),
17036
17330
  kind: MediaFileKindEnum.optional()
@@ -17762,6 +18056,22 @@ var DetailResultSchema = object({
17762
18056
  bbox: NativeCropBboxSchema.optional(),
17763
18057
  embedding: string().optional(),
17764
18058
  label: string().optional(),
18059
+ /**
18060
+ * The tier `label` occupies, copied VERBATIM from the producing step's
18061
+ * `StepDefinition.labelTier` (roadmap 4g). Present only when `label` is.
18062
+ *
18063
+ * It rides the wire rather than being resolved by the consumer because the
18064
+ * declaration lives with the step definition, which only the executing node
18065
+ * has: post-analysis holds no step registry, and re-deriving the tier from
18066
+ * `className` there would be exactly the inference this model exists to
18067
+ * forbid. A `label` that arrives WITHOUT this field is refused by the write
18068
+ * rule and logged (`label tier undeclared`) — an older runner therefore
18069
+ * stops enriching rather than guessing, which is why addon-pipeline is
18070
+ * deployed BEFORE addon-post-analysis.
18071
+ */
18072
+ labelTier: union([literal(1), literal(2)]).optional(),
18073
+ /** Model that produced `label` — carried into the tier's attribution. */
18074
+ labelModelId: string().optional(),
17765
18075
  alignedCropJpeg: string().optional(),
17766
18076
  /** Face short side (px) measured on the NATIVE crop surface. The `bbox`
17767
18077
  * above is detection-frame px (≈6× smaller on a 4K camera) — min-face-size
@@ -28417,6 +28727,12 @@ Object.freeze({
28417
28727
  addonId: null,
28418
28728
  access: "delete"
28419
28729
  },
28730
+ "pipelineAnalytics.completeRetrainTrack": {
28731
+ capName: "pipeline-analytics",
28732
+ capScope: "device",
28733
+ addonId: null,
28734
+ access: "create"
28735
+ },
28420
28736
  "pipelineAnalytics.deleteDeviceEvents": {
28421
28737
  capName: "pipeline-analytics",
28422
28738
  capScope: "device",
@@ -28429,6 +28745,12 @@ Object.freeze({
28429
28745
  addonId: null,
28430
28746
  access: "delete"
28431
28747
  },
28748
+ "pipelineAnalytics.deselectRetrainFrame": {
28749
+ capName: "pipeline-analytics",
28750
+ capScope: "device",
28751
+ addonId: null,
28752
+ access: "create"
28753
+ },
28432
28754
  "pipelineAnalytics.getActiveTracks": {
28433
28755
  capName: "pipeline-analytics",
28434
28756
  capScope: "device",
@@ -28489,6 +28811,18 @@ Object.freeze({
28489
28811
  addonId: null,
28490
28812
  access: "view"
28491
28813
  },
28814
+ "pipelineAnalytics.getRetrainExportUrl": {
28815
+ capName: "pipeline-analytics",
28816
+ capScope: "device",
28817
+ addonId: null,
28818
+ access: "view"
28819
+ },
28820
+ "pipelineAnalytics.getRetrainFrameImage": {
28821
+ capName: "pipeline-analytics",
28822
+ capScope: "device",
28823
+ addonId: null,
28824
+ access: "view"
28825
+ },
28492
28826
  "pipelineAnalytics.getSensorEvents": {
28493
28827
  capName: "pipeline-analytics",
28494
28828
  capScope: "device",
@@ -28543,6 +28877,24 @@ Object.freeze({
28543
28877
  addonId: null,
28544
28878
  access: "view"
28545
28879
  },
28880
+ "pipelineAnalytics.listRetrainAnnotations": {
28881
+ capName: "pipeline-analytics",
28882
+ capScope: "device",
28883
+ addonId: null,
28884
+ access: "view"
28885
+ },
28886
+ "pipelineAnalytics.listRetrainFrames": {
28887
+ capName: "pipeline-analytics",
28888
+ capScope: "device",
28889
+ addonId: null,
28890
+ access: "view"
28891
+ },
28892
+ "pipelineAnalytics.listRetrainStaging": {
28893
+ capName: "pipeline-analytics",
28894
+ capScope: "device",
28895
+ addonId: null,
28896
+ access: "view"
28897
+ },
28546
28898
  "pipelineAnalytics.listTrackMedia": {
28547
28899
  capName: "pipeline-analytics",
28548
28900
  capScope: "device",
@@ -28555,6 +28907,12 @@ Object.freeze({
28555
28907
  addonId: null,
28556
28908
  access: "view"
28557
28909
  },
28910
+ "pipelineAnalytics.proposeRetrainAnnotations": {
28911
+ capName: "pipeline-analytics",
28912
+ capScope: "device",
28913
+ addonId: null,
28914
+ access: "create"
28915
+ },
28558
28916
  "pipelineAnalytics.pruneEvents": {
28559
28917
  capName: "pipeline-analytics",
28560
28918
  capScope: "device",
@@ -28585,12 +28943,30 @@ Object.freeze({
28585
28943
  addonId: null,
28586
28944
  access: "create"
28587
28945
  },
28946
+ "pipelineAnalytics.restageRetrainTrack": {
28947
+ capName: "pipeline-analytics",
28948
+ capScope: "device",
28949
+ addonId: null,
28950
+ access: "create"
28951
+ },
28952
+ "pipelineAnalytics.saveRetrainAnnotations": {
28953
+ capName: "pipeline-analytics",
28954
+ capScope: "device",
28955
+ addonId: null,
28956
+ access: "create"
28957
+ },
28588
28958
  "pipelineAnalytics.searchObjectEvents": {
28589
28959
  capName: "pipeline-analytics",
28590
28960
  capScope: "device",
28591
28961
  addonId: null,
28592
28962
  access: "view"
28593
28963
  },
28964
+ "pipelineAnalytics.selectRetrainFrames": {
28965
+ capName: "pipeline-analytics",
28966
+ capScope: "device",
28967
+ addonId: null,
28968
+ access: "create"
28969
+ },
28594
28970
  "pipelineAnalytics.setTrackFlags": {
28595
28971
  capName: "pipeline-analytics",
28596
28972
  capScope: "device",
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-QyZ7QSRP.js");
1
+ const require_dist = require("./dist-CPfFUIl9.js");
2
2
  let node_perf_hooks = require("node:perf_hooks");
3
3
  //#region src/detection-pipeline/registry/model-catalogs.ts
4
4
  var HF_REPO = "camstack/camstack-models";
@@ -1258,6 +1258,7 @@ var ObjectDetectionStep = class {
1258
1258
  "animal",
1259
1259
  "package"
1260
1260
  ],
1261
+ labelTier: 1,
1261
1262
  models: [...OBJECT_DETECTION_MODELS],
1262
1263
  defaultModelId: "yolo26n",
1263
1264
  defaultModelIdByFormat: { tflite: "ssd-mobilenet-v2-coco-edgetpu" },
@@ -1427,6 +1428,7 @@ var AnimalClassifierStep = class {
1427
1428
  extractMode: "crop-roi",
1428
1429
  inputClasses: ["animal"],
1429
1430
  outputClasses: ["animal-type"],
1431
+ labelTier: 1,
1430
1432
  models: [...ANIMAL_CLASSIFIER_MODELS],
1431
1433
  defaultModelId: "animal-classifier",
1432
1434
  enabledByDefault: false,
@@ -1605,6 +1607,7 @@ var STEP_FACE_EMBEDDING = new PipelineStepBase({
1605
1607
  extractMode: "crop-roi",
1606
1608
  inputClasses: ["face"],
1607
1609
  outputClasses: ["identity"],
1610
+ labelTier: 2,
1608
1611
  models: [...FACE_EMBEDDING_MODELS],
1609
1612
  defaultModelId: "arcface-r100",
1610
1613
  defaultConfidence: 0,
@@ -1661,6 +1664,7 @@ var STEP_PLATE_OCR = new PlateOcrStep({
1661
1664
  extractMode: "crop-roi",
1662
1665
  inputClasses: ["plate"],
1663
1666
  outputClasses: ["plate-text"],
1667
+ labelTier: 2,
1664
1668
  models: [...PLATE_OCR_MODELS],
1665
1669
  defaultModelId: "vgg-english-g2",
1666
1670
  defaultConfidence: 0,
@@ -1695,6 +1699,7 @@ var STEP_BIRD_CLASSIFIER = new ClassifierWithMinConfidence({
1695
1699
  extractMode: "crop-roi",
1696
1700
  inputClasses: ["animal"],
1697
1701
  outputClasses: ["species"],
1702
+ labelTier: 2,
1698
1703
  models: [...BIRD_CLASSIFIER_MODELS],
1699
1704
  defaultModelId: "bird-classifier",
1700
1705
  enabledByDefault: false,
@@ -1714,6 +1719,7 @@ var STEP_VEHICLE_CLASSIFIER = new ClassifierWithMinConfidence({
1714
1719
  extractMode: "crop-roi",
1715
1720
  inputClasses: ["vehicle"],
1716
1721
  outputClasses: ["vehicle-type"],
1722
+ labelTier: 1,
1717
1723
  models: [...VEHICLE_CLASSIFIER_MODELS],
1718
1724
  defaultModelId: "vehicle-type-v1",
1719
1725
  enabledByDefault: false,
@@ -1,4 +1,4 @@
1
- import { L as hfModelUrl, a as COCO_TO_MACRO, i as COCO_80_LABELS, r as AUDIO_MACRO_LABELS } from "./dist-BDkEhx4Z.mjs";
1
+ import { L as hfModelUrl, a as COCO_TO_MACRO, i as COCO_80_LABELS, r as AUDIO_MACRO_LABELS } from "./dist-CUj9mdhh.mjs";
2
2
  import { PerformanceObserver } from "node:perf_hooks";
3
3
  //#region src/detection-pipeline/registry/model-catalogs.ts
4
4
  var HF_REPO = "camstack/camstack-models";
@@ -1258,6 +1258,7 @@ var ObjectDetectionStep = class {
1258
1258
  "animal",
1259
1259
  "package"
1260
1260
  ],
1261
+ labelTier: 1,
1261
1262
  models: [...OBJECT_DETECTION_MODELS],
1262
1263
  defaultModelId: "yolo26n",
1263
1264
  defaultModelIdByFormat: { tflite: "ssd-mobilenet-v2-coco-edgetpu" },
@@ -1427,6 +1428,7 @@ var AnimalClassifierStep = class {
1427
1428
  extractMode: "crop-roi",
1428
1429
  inputClasses: ["animal"],
1429
1430
  outputClasses: ["animal-type"],
1431
+ labelTier: 1,
1430
1432
  models: [...ANIMAL_CLASSIFIER_MODELS],
1431
1433
  defaultModelId: "animal-classifier",
1432
1434
  enabledByDefault: false,
@@ -1605,6 +1607,7 @@ var STEP_FACE_EMBEDDING = new PipelineStepBase({
1605
1607
  extractMode: "crop-roi",
1606
1608
  inputClasses: ["face"],
1607
1609
  outputClasses: ["identity"],
1610
+ labelTier: 2,
1608
1611
  models: [...FACE_EMBEDDING_MODELS],
1609
1612
  defaultModelId: "arcface-r100",
1610
1613
  defaultConfidence: 0,
@@ -1661,6 +1664,7 @@ var STEP_PLATE_OCR = new PlateOcrStep({
1661
1664
  extractMode: "crop-roi",
1662
1665
  inputClasses: ["plate"],
1663
1666
  outputClasses: ["plate-text"],
1667
+ labelTier: 2,
1664
1668
  models: [...PLATE_OCR_MODELS],
1665
1669
  defaultModelId: "vgg-english-g2",
1666
1670
  defaultConfidence: 0,
@@ -1695,6 +1699,7 @@ var STEP_BIRD_CLASSIFIER = new ClassifierWithMinConfidence({
1695
1699
  extractMode: "crop-roi",
1696
1700
  inputClasses: ["animal"],
1697
1701
  outputClasses: ["species"],
1702
+ labelTier: 2,
1698
1703
  models: [...BIRD_CLASSIFIER_MODELS],
1699
1704
  defaultModelId: "bird-classifier",
1700
1705
  enabledByDefault: false,
@@ -1714,6 +1719,7 @@ var STEP_VEHICLE_CLASSIFIER = new ClassifierWithMinConfidence({
1714
1719
  extractMode: "crop-roi",
1715
1720
  inputClasses: ["vehicle"],
1716
1721
  outputClasses: ["vehicle-type"],
1722
+ labelTier: 1,
1717
1723
  models: [...VEHICLE_CLASSIFIER_MODELS],
1718
1724
  defaultModelId: "vehicle-type-v1",
1719
1725
  enabledByDefault: false,
@@ -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-QyZ7QSRP.js");
5
+ const require_dist = require("../dist-CPfFUIl9.js");
6
6
  const require_lazy_sharp = require("../lazy-sharp-CcYuXtsa.js");
7
7
  let node_fs = require("node:fs");
8
8
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { B as motionDetectionCapability, I as evaluateZoneRules, at as BaseAddon, ct as DeviceType, ut as hydrateSchema } from "../dist-BDkEhx4Z.mjs";
1
+ import { B as motionDetectionCapability, I as evaluateZoneRules, at as BaseAddon, ct as DeviceType, ut as hydrateSchema } from "../dist-CUj9mdhh.mjs";
2
2
  import { t as getSharp } from "../lazy-sharp-B-mb8uWx.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../chunk-emK7D4bc.js");
6
- const require_dist = require("../dist-QyZ7QSRP.js");
7
- const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-COEKVBQK.js");
8
- const require_worker_protocol = require("../worker-protocol-le27Mw_8.js");
6
+ const require_dist = require("../dist-CPfFUIl9.js");
7
+ const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-BGbgcrEN.js");
8
+ const require_worker_protocol = require("../worker-protocol-hdTR-F5q.js");
9
9
  const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
10
10
  const require_lazy_sharp = require("../lazy-sharp-CcYuXtsa.js");
11
11
  const require_remote_restream = require("../remote-restream-CO36Sr30.js");
@@ -2020,9 +2020,14 @@ function mapBboxToFrameSpace(bbox, crop) {
2020
2020
  function encodeEmbeddingBase64(embedding) {
2021
2021
  return Buffer.from(Float32Array.from(embedding).buffer).toString("base64");
2022
2022
  }
2023
- /** First user-visible label — skips the opaque `embedding:*` marker (see `result-assembler.ts`). */
2023
+ /**
2024
+ * First user-visible label — skips the opaque `embedding:*` marker (see
2025
+ * `result-assembler.ts`). Returns the WHOLE `ScoredLabel`, not its text: since
2026
+ * 4g the tier and the attribution the assembler stamped travel with it, and
2027
+ * dropping them here is what would force post-analysis to guess a tier.
2028
+ */
2024
2029
  function pickLabel(detection) {
2025
- return detection.labels.find((l) => !l.label.startsWith("embedding:"))?.label;
2030
+ return detection.labels.find((l) => !l.label.startsWith("embedding:"));
2026
2031
  }
2027
2032
  /**
2028
2033
  * Turn one executor detection into the cap's `DetailResult`, reprojecting its
@@ -2041,7 +2046,11 @@ function toDetailResult(detection, stepId, crop) {
2041
2046
  score: detection.score,
2042
2047
  bbox: mapBboxToFrameSpace(detection.bbox, crop),
2043
2048
  ...detection.embedding !== void 0 ? { embedding: encodeEmbeddingBase64(detection.embedding) } : {},
2044
- ...label !== void 0 ? { label } : {},
2049
+ ...label !== void 0 ? {
2050
+ label: label.label,
2051
+ ...label.tier !== void 0 ? { labelTier: label.tier } : {},
2052
+ ...label.modelId !== void 0 ? { labelModelId: label.modelId } : {}
2053
+ } : {},
2045
2054
  ...detection.faceAlignedCrop !== void 0 ? { alignedCropJpeg: detection.faceAlignedCrop } : {},
2046
2055
  ...detection.nativeFaceShortSidePx !== void 0 ? { nativeFaceShortSidePx: detection.nativeFaceShortSidePx } : {}
2047
2056
  };
@@ -1,6 +1,6 @@
1
- import { $ as errMsg, A as deriveDetailCropRect, At as EventCategory, Ct as lazy, D as customAction, Et as object, H as pickNativeLeaseOverride, Ot as string, Tt as number, V as pickDetailCropConvention, W as pipelineRunnerCapability, at as BaseAddon, bt as array, k as defineCustomActions, l as DEVICE_BACKEND_TO_FORMAT, lt as createEvent, mt as nodePin, s as DEFAULT_DETAIL_CROP_CONVENTION, wt as literal, xt as boolean, yt as _enum } from "../dist-BDkEhx4Z.mjs";
2
- import { c as getStepDefinition, t as attributeStall } from "../event-loop-stall-monitor-IAuNEdmG.mjs";
3
- import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-DFH_z2-q.mjs";
1
+ import { $ as errMsg, A as deriveDetailCropRect, At as EventCategory, Ct as lazy, D as customAction, Et as object, H as pickNativeLeaseOverride, Ot as string, Tt as number, V as pickDetailCropConvention, W as pipelineRunnerCapability, at as BaseAddon, bt as array, k as defineCustomActions, l as DEVICE_BACKEND_TO_FORMAT, lt as createEvent, mt as nodePin, s as DEFAULT_DETAIL_CROP_CONVENTION, wt as literal, xt as boolean, yt as _enum } from "../dist-CUj9mdhh.mjs";
2
+ import { c as getStepDefinition, t as attributeStall } from "../event-loop-stall-monitor-md__iwWh.mjs";
3
+ import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-CD0M9YD7.mjs";
4
4
  import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
5
5
  import { t as getSharp } from "../lazy-sharp-B-mb8uWx.mjs";
6
6
  import { n as profileForStreamId, t as isRemoteRestream } from "../remote-restream-BeHi78PZ.mjs";
@@ -2012,9 +2012,14 @@ function mapBboxToFrameSpace(bbox, crop) {
2012
2012
  function encodeEmbeddingBase64(embedding) {
2013
2013
  return Buffer.from(Float32Array.from(embedding).buffer).toString("base64");
2014
2014
  }
2015
- /** First user-visible label — skips the opaque `embedding:*` marker (see `result-assembler.ts`). */
2015
+ /**
2016
+ * First user-visible label — skips the opaque `embedding:*` marker (see
2017
+ * `result-assembler.ts`). Returns the WHOLE `ScoredLabel`, not its text: since
2018
+ * 4g the tier and the attribution the assembler stamped travel with it, and
2019
+ * dropping them here is what would force post-analysis to guess a tier.
2020
+ */
2016
2021
  function pickLabel(detection) {
2017
- return detection.labels.find((l) => !l.label.startsWith("embedding:"))?.label;
2022
+ return detection.labels.find((l) => !l.label.startsWith("embedding:"));
2018
2023
  }
2019
2024
  /**
2020
2025
  * Turn one executor detection into the cap's `DetailResult`, reprojecting its
@@ -2033,7 +2038,11 @@ function toDetailResult(detection, stepId, crop) {
2033
2038
  score: detection.score,
2034
2039
  bbox: mapBboxToFrameSpace(detection.bbox, crop),
2035
2040
  ...detection.embedding !== void 0 ? { embedding: encodeEmbeddingBase64(detection.embedding) } : {},
2036
- ...label !== void 0 ? { label } : {},
2041
+ ...label !== void 0 ? {
2042
+ label: label.label,
2043
+ ...label.tier !== void 0 ? { labelTier: label.tier } : {},
2044
+ ...label.modelId !== void 0 ? { labelModelId: label.modelId } : {}
2045
+ } : {},
2037
2046
  ...detection.faceAlignedCrop !== void 0 ? { alignedCropJpeg: detection.faceAlignedCrop } : {},
2038
2047
  ...detection.nativeFaceShortSidePx !== void 0 ? { nativeFaceShortSidePx: detection.nativeFaceShortSidePx } : {}
2039
2048
  };