@camstack/addon-osd-manager 0.1.178 → 0.1.180

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 (18) hide show
  1. package/dist/{MotionZonesSettings-Bvj0n89I.mjs → MotionZonesSettings-ZY8nEZ4A.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-Dg8I0QKQ.mjs → PrivacyMaskSettings-CBh-nVj6.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-B7gcNcHz.mjs → SceneMonitorEditor-CCZdsPeR.mjs} +3 -3
  4. package/dist/_stub.js +10 -10
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-DooJvhL_.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-odNWYe2P.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D4hHi1KB.mjs +26 -0
  7. package/dist/{hostInit-C89VbDl6.mjs → hostInit-C4sW45bX.mjs} +2 -2
  8. package/dist/index.js +359 -9
  9. package/dist/index.mjs +359 -9
  10. package/dist/{player-overlays-eA3CQbg5.mjs → player-overlays-ClqS_7qr.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-DkeTfJj6.mjs → responsive-OY2AYs2K.mjs} +1 -1
  13. package/dist/{scene-monitor-copy-Dp7L5KAz.mjs → scene-monitor-copy-D50g5tDa.mjs} +1 -1
  14. package/dist/{square-C3hFg2T6.mjs → square-CMXmMI2_.mjs} +1 -1
  15. package/dist/{trash-2-Y_FstTEx.mjs → trash-2-CS8cJOvy.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-5lxDThy0.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-Ga9h-wWR.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BPGj9pUC.mjs +0 -26
package/dist/index.js CHANGED
@@ -10614,7 +10614,53 @@ var ModelFormatEntrySchema = object({
10614
10614
  /** Multi-file payload (directory members or sibling files). */
10615
10615
  files: array(string()).readonly().optional(),
10616
10616
  /** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
10617
- runtimes: array(_enum(["python"])).readonly().optional()
10617
+ runtimes: array(_enum(["python"])).readonly().optional(),
10618
+ /**
10619
+ * Content revision of the artefact, for one hosted OFF the CamStack mirror.
10620
+ * A format on the mirror leaves it unset: its revision (the sha256 of its
10621
+ * weight file) comes from the downloader's generated table, kept in step
10622
+ * with the mirror by `scripts/check-hosted-model-revisions.ts` (D744). A
10623
+ * node records the revision it downloaded next to the file
10624
+ * (`<file>.revision`); a copy with no record or a different one is stale
10625
+ * unless its weight file hashes to the revision, and a stale copy is
10626
+ * downloaded again, the old one serving until the new one is complete. No
10627
+ * revision at all ⇒ a file on disk is current, whatever it holds (D743).
10628
+ */
10629
+ revision: string().min(1).optional()
10630
+ });
10631
+ /**
10632
+ * What a node holds for one (model, format) (D746). `current` is a complete
10633
+ * copy at its catalog revision — exactly what `downloaded: true` means.
10634
+ * `stale` is bytes on disk that are not (yet) proven current under D743/D744:
10635
+ * no or a different revision record, or a missing sibling. `missing` is no
10636
+ * copy. `downloaded` alone folds `stale` into "not downloaded", which hid
10637
+ * reclaimable bytes and a copy about to be replaced.
10638
+ */
10639
+ var ModelOnDiskStateSchema = _enum([
10640
+ "current",
10641
+ "stale",
10642
+ "missing"
10643
+ ]);
10644
+ /**
10645
+ * The numeric precision of one format's BUILD (D746) — reported only when the
10646
+ * build states it (file-name token, an INT8 variant, an EdgeTPU compile, a
10647
+ * CamStack Core ML export). Absent means "not stated", never "fp32".
10648
+ */
10649
+ var ModelFormatPrecisionSchema = _enum([
10650
+ "fp32",
10651
+ "fp16",
10652
+ "int8"
10653
+ ]);
10654
+ /**
10655
+ * One format of one model as a node's `pipelineExecutor.getSchema` reports it.
10656
+ * `onDisk` / `precision` are optional for version skew: a runner that predates
10657
+ * them omits them, and a reader falls back to `downloaded`.
10658
+ */
10659
+ var PipelineModelFormatStatusSchema = object({
10660
+ downloaded: boolean(),
10661
+ sizeMB: number(),
10662
+ onDisk: ModelOnDiskStateSchema.optional(),
10663
+ precision: ModelFormatPrecisionSchema.optional()
10618
10664
  });
10619
10665
  /**
10620
10666
  * Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
@@ -10823,6 +10869,35 @@ var ModelCatalogEntrySchema = object({
10823
10869
  */
10824
10870
  defaultConfidence: number().min(0).max(1).optional(),
10825
10871
  /**
10872
+ * Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
10873
+ * on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
10874
+ * absent here runs at the step slider's global default. The same row shape
10875
+ * the floor measurement produces (`model-floors.json`: modelId → floors), so
10876
+ * a measured table is copied in as-is. An operator override is bound to the
10877
+ * model it was made for and does not survive a model change (D738). A custom
10878
+ * / imported model may declare it; without it, the global defaults apply.
10879
+ */
10880
+ defaultClassFloors: record(string(), number().min(0).max(1)).optional(),
10881
+ /**
10882
+ * The inference precision this model's OpenVINO IR needs on an Intel GPU.
10883
+ * Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
10884
+ * that produces invalid output at f16 — measured 2026-10-07 for YOLO26
10885
+ * base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
10886
+ * scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
10887
+ * `PoolModelConfig.gpuInferencePrecision`; the pool sets
10888
+ * INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
10889
+ */
10890
+ gpuInferencePrecision: _enum(["f32", "f16"]).optional(),
10891
+ /**
10892
+ * ROOT detectors only: per supplied step (`animal-classifier`, …), the
10893
+ * minimum DETECTION score from which this root's own fine label (species,
10894
+ * vehicle type — D736 root supply) is taken (D741). Below it the detection
10895
+ * keeps its macro class without the fine label. `1` = never take it from
10896
+ * this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
10897
+ * `minConfidence` slider, bound to the ROOT model, overrides it.
10898
+ */
10899
+ suppliedLabelFloors: record(string(), number().min(0).max(1)).optional(),
10900
+ /**
10826
10901
  * When true, the executor produces a landmark-aligned crop (similarity warp
10827
10902
  * onto the canonical template) before this step runs, instead of a plain
10828
10903
  * axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
@@ -27348,7 +27423,7 @@ var FrameRefSchema = object({
27348
27423
  timestamp: number(),
27349
27424
  capturedAt: number().optional()
27350
27425
  });
27351
- var ModelFormatSchema$1 = _enum([
27426
+ var ModelFormatSchema$2 = _enum([
27352
27427
  "onnx",
27353
27428
  "coreml",
27354
27429
  "openvino",
@@ -27366,7 +27441,7 @@ var PipelineSlotSchema = _enum([
27366
27441
  var PipelineEngineChoiceSchema = object({
27367
27442
  runtime: literal("python"),
27368
27443
  backend: string(),
27369
- format: ModelFormatSchema$1,
27444
+ format: ModelFormatSchema$2,
27370
27445
  device: string().optional()
27371
27446
  });
27372
27447
  /**
@@ -27423,10 +27498,7 @@ var PipelineTemplateSchema$1 = object({
27423
27498
  var PipelineModelOptionSchema = object({
27424
27499
  id: string(),
27425
27500
  name: string(),
27426
- formats: record(string(), object({
27427
- downloaded: boolean(),
27428
- sizeMB: number()
27429
- })),
27501
+ formats: record(string(), PipelineModelFormatStatusSchema),
27430
27502
  group: ModelVariantGroupSchema.optional(),
27431
27503
  legacy: boolean().optional(),
27432
27504
  provider: ModelProviderIdSchema.optional(),
@@ -27641,6 +27713,32 @@ var pipelineExecutorCapability = {
27641
27713
  auth: "admin"
27642
27714
  }),
27643
27715
  /**
27716
+ * Best settings (D745): the MODEL-BOUND thresholds (`bindsToModel` keys of
27717
+ * the object-detection root, and their binding keys) stored in THIS node's
27718
+ * per-camera detector settings — and, unless `dryRun`, remove them so the
27719
+ * running model's own defaults apply. Every other key of a camera's store
27720
+ * is kept. `nodeId` is the ROUTING key. `deviceIds` absent ⇒ every camera
27721
+ * with a store. A camera whose store could not be read is `refused`, never
27722
+ * reported as clean.
27723
+ */
27724
+ clearModelBoundDeviceOverrides: method(object({
27725
+ nodeId: string(),
27726
+ deviceIds: array(number()).readonly().optional(),
27727
+ dryRun: boolean()
27728
+ }), object({
27729
+ entries: array(object({
27730
+ deviceId: number(),
27731
+ keys: array(string()).readonly()
27732
+ })).readonly(),
27733
+ refused: array(object({
27734
+ deviceId: number(),
27735
+ reason: string()
27736
+ })).readonly()
27737
+ }), {
27738
+ kind: "mutation",
27739
+ auth: "admin"
27740
+ }),
27741
+ /**
27644
27742
  * Which of THIS node's inference devices the executor currently refuses,
27645
27743
  * and why. `nodeId` is the ROUTING key (stripped by the generated router).
27646
27744
  *
@@ -27735,12 +27833,12 @@ var pipelineExecutorCapability = {
27735
27833
  downloadModel: method(object({
27736
27834
  addonId: string(),
27737
27835
  modelId: string(),
27738
- format: ModelFormatSchema$1
27836
+ format: ModelFormatSchema$2
27739
27837
  }), DownloadModelResultSchema, { kind: "mutation" }),
27740
27838
  deleteModel: method(object({
27741
27839
  addonId: string(),
27742
27840
  modelId: string(),
27743
- format: ModelFormatSchema$1
27841
+ format: ModelFormatSchema$2
27744
27842
  }), object({ success: literal(true) }), { kind: "mutation" }),
27745
27843
  /**
27746
27844
  * Stateless single-frame execution. Callers (runner, benchmark) pass
@@ -27986,6 +28084,204 @@ var pipelineExecutorCapability = {
27986
28084
  getDetectionConfigSchema: method(_void(), ConfigUISchemaNullableBridge)
27987
28085
  }
27988
28086
  };
28087
+ /**
28088
+ * The wire shapes of the Best settings plan and apply (D745), used by the
28089
+ * `pipeline-orchestrator` cap. The recommender's own types
28090
+ * (`recommend.ts`, `demand.ts`) are the TS face of the same data; these
28091
+ * schemas are what crosses the cap boundary.
28092
+ */
28093
+ var ModelFormatSchema$1 = _enum(MODEL_FORMATS);
28094
+ var HardwareClassIdSchema = _enum([
28095
+ "intel-core-ultra",
28096
+ "intel-n-series",
28097
+ "apple-m-base",
28098
+ "apple-m-pro",
28099
+ "unknown"
28100
+ ]);
28101
+ var AcceleratorKindSchema = _enum([
28102
+ "intel-npu",
28103
+ "intel-igpu",
28104
+ "x86-cpu",
28105
+ "arm-cpu",
28106
+ "apple-ane",
28107
+ "coral"
28108
+ ]);
28109
+ var RecommendationReasonSchema = discriminatedUnion("kind", [
28110
+ object({
28111
+ kind: literal("fits"),
28112
+ utilisation: number()
28113
+ }),
28114
+ object({
28115
+ kind: literal("tie-faster"),
28116
+ over: string(),
28117
+ recallDelta: number()
28118
+ }),
28119
+ object({
28120
+ kind: literal("stepped-down"),
28121
+ from: string(),
28122
+ to: string(),
28123
+ limitedBy: string()
28124
+ }),
28125
+ object({
28126
+ kind: literal("no-fit-lightest"),
28127
+ utilisation: number()
28128
+ }),
28129
+ object({
28130
+ kind: literal("derived-latency"),
28131
+ modelId: string()
28132
+ }),
28133
+ object({
28134
+ kind: literal("estimated-load"),
28135
+ observedForMs: number().nullable()
28136
+ }),
28137
+ object({ kind: literal("cpu-device") }),
28138
+ object({ kind: literal("coral-untouched") }),
28139
+ object({ kind: literal("device-disabled") }),
28140
+ object({ kind: literal("device-unavailable") }),
28141
+ object({ kind: literal("node-offline") }),
28142
+ object({ kind: literal("no-hardware-facts") }),
28143
+ object({
28144
+ kind: literal("no-measured-data"),
28145
+ hardwareClass: HardwareClassIdSchema
28146
+ }),
28147
+ object({
28148
+ kind: literal("no-family-build"),
28149
+ format: ModelFormatSchema$1
28150
+ })
28151
+ ]);
28152
+ var DeviceDemandSchema = object({
28153
+ nodeId: string(),
28154
+ deviceKey: string(),
28155
+ demandFps: number(),
28156
+ maxCameraFps: number(),
28157
+ alwaysOnCameras: number(),
28158
+ onMotionSessions: number(),
28159
+ onMotionSource: _enum([
28160
+ "observed-24h",
28161
+ "estimate",
28162
+ "none"
28163
+ ]),
28164
+ observedForMs: number().nullable()
28165
+ });
28166
+ var DeviceModelChoiceSchema = object({
28167
+ modelId: string(),
28168
+ p50Ms: number(),
28169
+ fps: number(),
28170
+ measured: boolean(),
28171
+ utilisation: number(),
28172
+ personRecall: number()
28173
+ });
28174
+ var DeviceRecommendationSchema = object({
28175
+ deviceKey: string(),
28176
+ accelerator: AcceleratorKindSchema.nullable(),
28177
+ enabled: boolean(),
28178
+ available: boolean(),
28179
+ demand: DeviceDemandSchema.nullable(),
28180
+ chosen: DeviceModelChoiceSchema.nullable(),
28181
+ reasons: array(RecommendationReasonSchema).readonly()
28182
+ });
28183
+ var NodeRecommendationSchema = object({
28184
+ nodeId: string(),
28185
+ reachable: boolean(),
28186
+ hardwareClass: HardwareClassIdSchema.nullable(),
28187
+ cpuModel: string().nullable(),
28188
+ skipped: boolean(),
28189
+ acceleratorModelId: string().nullable(),
28190
+ devices: array(DeviceRecommendationSchema).readonly(),
28191
+ reasons: array(RecommendationReasonSchema).readonly()
28192
+ });
28193
+ var ModelPinChangeSchema = object({
28194
+ stepId: string(),
28195
+ before: string().nullable(),
28196
+ after: string().nullable()
28197
+ });
28198
+ var NodeDeviceChangeSchema = object({
28199
+ nodeId: string(),
28200
+ deviceKey: string(),
28201
+ madeExplicit: boolean(),
28202
+ modelPins: array(ModelPinChangeSchema).readonly(),
28203
+ thresholds: array(object({
28204
+ stepId: string(),
28205
+ keys: array(string()).readonly()
28206
+ })).readonly()
28207
+ });
28208
+ var CameraOverrideClearSchema = object({
28209
+ deviceId: number(),
28210
+ source: _enum(["step-override", "wholesale"]),
28211
+ nodeId: string(),
28212
+ deviceKey: string().nullable(),
28213
+ stepId: string(),
28214
+ modelIdBefore: string().nullable(),
28215
+ keys: array(string()).readonly()
28216
+ });
28217
+ var DetectorStoreClearSchema = object({
28218
+ deviceId: number(),
28219
+ keys: array(string()).readonly()
28220
+ });
28221
+ var BestSettingsWarningSchema = discriminatedUnion("kind", [
28222
+ object({
28223
+ kind: literal("detector-store-cluster-wide"),
28224
+ skippedNodes: array(string()).readonly()
28225
+ }),
28226
+ object({
28227
+ kind: literal("detector-store-unreadable"),
28228
+ error: string()
28229
+ }),
28230
+ object({
28231
+ kind: literal("coral-enabled"),
28232
+ nodeId: string(),
28233
+ deviceKey: string()
28234
+ })
28235
+ ]);
28236
+ var BestSettingsOptionsSchema = object({
28237
+ /** Share of each accelerator's throughput kept free (0.3–0.5). */
28238
+ headroom: number().min(.3).max(.5).default(.4) });
28239
+ var BestSettingsPlanSchema = object({
28240
+ /** Hash of everything the apply will write — the apply refuses a different one. */
28241
+ planHash: string(),
28242
+ family: literal("yolov9"),
28243
+ headroom: number(),
28244
+ generatedAt: number(),
28245
+ nodes: array(NodeRecommendationSchema).readonly(),
28246
+ nodeChanges: array(NodeDeviceChangeSchema).readonly(),
28247
+ cameraClears: array(CameraOverrideClearSchema).readonly(),
28248
+ detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
28249
+ warnings: array(BestSettingsWarningSchema).readonly()
28250
+ });
28251
+ var BestSettingsApplyInputSchema = object({
28252
+ planHash: string(),
28253
+ headroom: number().min(.3).max(.5).default(.4)
28254
+ });
28255
+ var BestSettingsPhaseResultSchema = object({
28256
+ phase: _enum([
28257
+ "download",
28258
+ "camera-overrides",
28259
+ "detector-thresholds",
28260
+ "node-models",
28261
+ "redispatch"
28262
+ ]),
28263
+ ok: boolean(),
28264
+ detail: string()
28265
+ });
28266
+ var BestSettingsApplyResultSchema = discriminatedUnion("kind", [
28267
+ object({
28268
+ kind: literal("applied"),
28269
+ planHash: string(),
28270
+ phases: array(BestSettingsPhaseResultSchema).readonly()
28271
+ }),
28272
+ object({
28273
+ kind: literal("aborted"),
28274
+ phases: array(BestSettingsPhaseResultSchema).readonly()
28275
+ }),
28276
+ object({
28277
+ kind: literal("stale"),
28278
+ plan: BestSettingsPlanSchema
28279
+ }),
28280
+ object({
28281
+ kind: literal("refused"),
28282
+ reason: _enum(["apply-in-progress"])
28283
+ })
28284
+ ]);
27989
28285
  object({
27990
28286
  activeCameras: number(),
27991
28287
  throttledCameras: number(),
@@ -30176,6 +30472,27 @@ var pipelineOrchestratorCapability = {
30176
30472
  kind: "mutation",
30177
30473
  auth: "admin"
30178
30474
  }),
30475
+ /**
30476
+ * Best settings (D745) — DRY RUN. Recommends ONE detector family (YOLOv9)
30477
+ * for the whole cluster from each node's static hardware class, the
30478
+ * measured latency table and the detection demand, and lists every write
30479
+ * the apply would make: the node model pins set, the enrichment pins and
30480
+ * model-bound thresholds removed (node level and per camera), and the
30481
+ * per-camera detector thresholds cleared. Writes nothing. Step
30482
+ * enablement, device enablement, pins, recording, notifications, zones and
30483
+ * rules are never part of it. `planHash` names exactly this diff.
30484
+ */
30485
+ planBestSettings: method(BestSettingsOptionsSchema, BestSettingsPlanSchema, { auth: "admin" }),
30486
+ /**
30487
+ * Best settings (D745) — APPLY the plan the operator confirmed. Recomputes
30488
+ * the plan and refuses (`stale`, with the fresh plan) when its hash is not
30489
+ * `planHash`, so what is written is exactly the confirmed diff. Offline
30490
+ * nodes are skipped; there is no undo.
30491
+ */
30492
+ applyBestSettings: method(BestSettingsApplyInputSchema, BestSettingsApplyResultSchema, {
30493
+ kind: "mutation",
30494
+ auth: "admin"
30495
+ }),
30179
30496
  /** Read one camera's settings. Null when never touched (inherits agent defaults fully). */
30180
30497
  getCameraSettings: method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()),
30181
30498
  /** Set or clear the 3-state toggle for one (camera, addonId). Pass `enabled: null` to clear and revert to agent default. */
@@ -46448,6 +46765,16 @@ function tryConvertUnit(value, from, to) {
46448
46765
  return fromCanonical(toCanonical(value, fromSpec), toSpec);
46449
46766
  }
46450
46767
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
46768
+ Object.freeze({
46769
+ person: .5,
46770
+ vehicle: .5,
46771
+ animal: .5
46772
+ });
46773
+ Object.freeze({
46774
+ person: .65,
46775
+ vehicle: .65,
46776
+ animal: .65
46777
+ });
46451
46778
  /**
46452
46779
  * Most specific first. Extending this list is how a new device kind becomes
46453
46780
  * gateable; nothing else needs to change.
@@ -51019,6 +51346,12 @@ Object.freeze({
51019
51346
  addonId: null,
51020
51347
  access: "delete"
51021
51348
  },
51349
+ "pipelineExecutor.clearModelBoundDeviceOverrides": {
51350
+ capName: "pipeline-executor",
51351
+ capScope: "system",
51352
+ addonId: null,
51353
+ access: "delete"
51354
+ },
51022
51355
  "pipelineExecutor.deleteModel": {
51023
51356
  capName: "pipeline-executor",
51024
51357
  capScope: "system",
@@ -51235,6 +51568,12 @@ Object.freeze({
51235
51568
  addonId: null,
51236
51569
  access: "view"
51237
51570
  },
51571
+ "pipelineOrchestrator.applyBestSettings": {
51572
+ capName: "pipeline-orchestrator",
51573
+ capScope: "system",
51574
+ addonId: null,
51575
+ access: "create"
51576
+ },
51238
51577
  "pipelineOrchestrator.applyDeviceSettingsPatch": {
51239
51578
  capName: "pipeline-orchestrator",
51240
51579
  capScope: "system",
@@ -51409,6 +51748,12 @@ Object.freeze({
51409
51748
  addonId: null,
51410
51749
  access: "create"
51411
51750
  },
51751
+ "pipelineOrchestrator.planBestSettings": {
51752
+ capName: "pipeline-orchestrator",
51753
+ capScope: "system",
51754
+ addonId: null,
51755
+ access: "view"
51756
+ },
51412
51757
  "pipelineOrchestrator.rebalance": {
51413
51758
  capName: "pipeline-orchestrator",
51414
51759
  capScope: "system",
@@ -57007,6 +57352,11 @@ Object.freeze({
57007
57352
  form: "single",
57008
57353
  optional: false
57009
57354
  }],
57355
+ "pipelineExecutor.clearModelBoundDeviceOverrides": [{
57356
+ name: "deviceIds",
57357
+ form: "array",
57358
+ optional: true
57359
+ }],
57010
57360
  "pipelineExecutor.runPipeline": [{
57011
57361
  name: "deviceId",
57012
57362
  form: "single",