@camstack/addon-osd-manager 0.1.179 → 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-B5aXZahp.mjs → MotionZonesSettings-ZY8nEZ4A.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-CCZyGdiM.mjs → PrivacyMaskSettings-CBh-nVj6.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-CzAhKl5N.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-COWlbxsR.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-Bcrn7TOt.mjs → hostInit-C4sW45bX.mjs} +2 -2
  8. package/dist/index.js +320 -9
  9. package/dist/index.mjs +320 -9
  10. package/dist/{player-overlays-UBW4zDFH.mjs → player-overlays-ClqS_7qr.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-DXhNKsuH.mjs → responsive-OY2AYs2K.mjs} +1 -1
  13. package/dist/{scene-monitor-copy-C2sIrKPI.mjs → scene-monitor-copy-D50g5tDa.mjs} +1 -1
  14. package/dist/{square-BA6S8jxe.mjs → square-CMXmMI2_.mjs} +1 -1
  15. package/dist/{trash-2-ou0dJwcr.mjs → trash-2-CS8cJOvy.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-BnoZzYog.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-t6WKuxCf.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).
@@ -27377,7 +27423,7 @@ var FrameRefSchema = object({
27377
27423
  timestamp: number(),
27378
27424
  capturedAt: number().optional()
27379
27425
  });
27380
- var ModelFormatSchema$1 = _enum([
27426
+ var ModelFormatSchema$2 = _enum([
27381
27427
  "onnx",
27382
27428
  "coreml",
27383
27429
  "openvino",
@@ -27395,7 +27441,7 @@ var PipelineSlotSchema = _enum([
27395
27441
  var PipelineEngineChoiceSchema = object({
27396
27442
  runtime: literal("python"),
27397
27443
  backend: string(),
27398
- format: ModelFormatSchema$1,
27444
+ format: ModelFormatSchema$2,
27399
27445
  device: string().optional()
27400
27446
  });
27401
27447
  /**
@@ -27452,10 +27498,7 @@ var PipelineTemplateSchema$1 = object({
27452
27498
  var PipelineModelOptionSchema = object({
27453
27499
  id: string(),
27454
27500
  name: string(),
27455
- formats: record(string(), object({
27456
- downloaded: boolean(),
27457
- sizeMB: number()
27458
- })),
27501
+ formats: record(string(), PipelineModelFormatStatusSchema),
27459
27502
  group: ModelVariantGroupSchema.optional(),
27460
27503
  legacy: boolean().optional(),
27461
27504
  provider: ModelProviderIdSchema.optional(),
@@ -27670,6 +27713,32 @@ var pipelineExecutorCapability = {
27670
27713
  auth: "admin"
27671
27714
  }),
27672
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
+ /**
27673
27742
  * Which of THIS node's inference devices the executor currently refuses,
27674
27743
  * and why. `nodeId` is the ROUTING key (stripped by the generated router).
27675
27744
  *
@@ -27764,12 +27833,12 @@ var pipelineExecutorCapability = {
27764
27833
  downloadModel: method(object({
27765
27834
  addonId: string(),
27766
27835
  modelId: string(),
27767
- format: ModelFormatSchema$1
27836
+ format: ModelFormatSchema$2
27768
27837
  }), DownloadModelResultSchema, { kind: "mutation" }),
27769
27838
  deleteModel: method(object({
27770
27839
  addonId: string(),
27771
27840
  modelId: string(),
27772
- format: ModelFormatSchema$1
27841
+ format: ModelFormatSchema$2
27773
27842
  }), object({ success: literal(true) }), { kind: "mutation" }),
27774
27843
  /**
27775
27844
  * Stateless single-frame execution. Callers (runner, benchmark) pass
@@ -28015,6 +28084,204 @@ var pipelineExecutorCapability = {
28015
28084
  getDetectionConfigSchema: method(_void(), ConfigUISchemaNullableBridge)
28016
28085
  }
28017
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
+ ]);
28018
28285
  object({
28019
28286
  activeCameras: number(),
28020
28287
  throttledCameras: number(),
@@ -30205,6 +30472,27 @@ var pipelineOrchestratorCapability = {
30205
30472
  kind: "mutation",
30206
30473
  auth: "admin"
30207
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
+ }),
30208
30496
  /** Read one camera's settings. Null when never touched (inherits agent defaults fully). */
30209
30497
  getCameraSettings: method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()),
30210
30498
  /** Set or clear the 3-state toggle for one (camera, addonId). Pass `enabled: null` to clear and revert to agent default. */
@@ -51058,6 +51346,12 @@ Object.freeze({
51058
51346
  addonId: null,
51059
51347
  access: "delete"
51060
51348
  },
51349
+ "pipelineExecutor.clearModelBoundDeviceOverrides": {
51350
+ capName: "pipeline-executor",
51351
+ capScope: "system",
51352
+ addonId: null,
51353
+ access: "delete"
51354
+ },
51061
51355
  "pipelineExecutor.deleteModel": {
51062
51356
  capName: "pipeline-executor",
51063
51357
  capScope: "system",
@@ -51274,6 +51568,12 @@ Object.freeze({
51274
51568
  addonId: null,
51275
51569
  access: "view"
51276
51570
  },
51571
+ "pipelineOrchestrator.applyBestSettings": {
51572
+ capName: "pipeline-orchestrator",
51573
+ capScope: "system",
51574
+ addonId: null,
51575
+ access: "create"
51576
+ },
51277
51577
  "pipelineOrchestrator.applyDeviceSettingsPatch": {
51278
51578
  capName: "pipeline-orchestrator",
51279
51579
  capScope: "system",
@@ -51448,6 +51748,12 @@ Object.freeze({
51448
51748
  addonId: null,
51449
51749
  access: "create"
51450
51750
  },
51751
+ "pipelineOrchestrator.planBestSettings": {
51752
+ capName: "pipeline-orchestrator",
51753
+ capScope: "system",
51754
+ addonId: null,
51755
+ access: "view"
51756
+ },
51451
51757
  "pipelineOrchestrator.rebalance": {
51452
51758
  capName: "pipeline-orchestrator",
51453
51759
  capScope: "system",
@@ -57046,6 +57352,11 @@ Object.freeze({
57046
57352
  form: "single",
57047
57353
  optional: false
57048
57354
  }],
57355
+ "pipelineExecutor.clearModelBoundDeviceOverrides": [{
57356
+ name: "deviceIds",
57357
+ form: "array",
57358
+ optional: true
57359
+ }],
57049
57360
  "pipelineExecutor.runPipeline": [{
57050
57361
  name: "deviceId",
57051
57362
  form: "single",