@camstack/addon-model-studio 1.1.209 → 1.1.211

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-DPVW36SY.mjs → MotionZonesSettings-B_oqRPy4.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-CE3p-uMG.mjs → PrivacyMaskSettings-D8qtXvxt.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-B0ZWDpU7.mjs → SceneMonitorEditor-D87pvPnW.mjs} +3 -3
  4. package/dist/_stub.js +13 -13
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-CXndlwsf.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-D5p_VLWW.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C9x9vbel.mjs +26 -0
  7. package/dist/{hostInit-DpDYa2D-.mjs → hostInit-C2sbjC2M.mjs} +2 -2
  8. package/dist/model-studio.addon.js +201 -30
  9. package/dist/model-studio.addon.mjs +201 -30
  10. package/dist/{player-overlays-B06LE_Gr.mjs → player-overlays-HkGtf6Z8.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-BV0NkBXa.mjs → responsive-MsnrmZeO.mjs} +1 -1
  13. package/dist/{scene-monitor-copy-BEsrfWnh.mjs → scene-monitor-copy-DUC8dxNl.mjs} +1 -1
  14. package/dist/{square-1mDEdKJ6.mjs → square--tUmo3yW.mjs} +1 -1
  15. package/dist/{trash-2-BJYsA9Vu.mjs → trash-2-m2KUou0G.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CmWc3NQd.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-O--sTiL_.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DMYNiT-L.mjs +0 -26
@@ -24293,7 +24293,143 @@ method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngi
24293
24293
  settings: record(string(), unknown()).optional()
24294
24294
  }), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
24295
24295
  /**
24296
- * The wire shapes of the Best settings plan and apply (D745), used by the
24296
+ * Wire shapes of the Load balancing surface (D748): the session placement
24297
+ * policy, the atomic share write, the observed placement statistics, the
24298
+ * hardware share suggestion and the stale device pins.
24299
+ */
24300
+ /**
24301
+ * How a new detection session picks its node and device.
24302
+ * - `least-loaded` — the historical rule: lowest `attached / weight`, a
24303
+ * constant node order at a tie (D37). An idle node always ties at 0, so a
24304
+ * weight only bites once a node already holds a session.
24305
+ * - `share` — the share of PARALLEL sessions is held to the weights, and a
24306
+ * full or drowning node yields to a free one (D748).
24307
+ */
24308
+ var SessionPlacementPolicySchema = _enum(["least-loaded", "share"]);
24309
+ var LoadBalancingSharesInputSchema = object({
24310
+ /** nodeId → share (> 0). A node left out keeps its weight. */
24311
+ nodes: record(string(), number().positive()).default({}),
24312
+ /** nodeId → deviceKey → share (> 0). A device left out keeps its weight. */
24313
+ devices: record(string(), record(string(), number().positive())).default({})
24314
+ });
24315
+ var PlacementStatsInputSchema = object({
24316
+ /** Window the observed shares are averaged over (default 1 h, max 24 h). */
24317
+ windowMs: number().int().min(6e4).max(1440 * 60 * 1e3).default(3600 * 1e3) });
24318
+ var PlacementDeviceStatsSchema = object({
24319
+ deviceKey: string(),
24320
+ /** Sessions running on this device now. */
24321
+ sessionsNow: number(),
24322
+ /** Sessions started on this device inside the window. */
24323
+ sessionsStarted: number(),
24324
+ /** Time-weighted share of the node's parallel sessions over the window (0–1); null = no session ran. */
24325
+ observedShare: number().nullable()
24326
+ });
24327
+ var PlacementNodeStatsSchema = object({
24328
+ nodeId: string(),
24329
+ sessionsNow: number(),
24330
+ sessionsStarted: number(),
24331
+ /** Time-weighted share of the cluster's parallel sessions over the window (0–1); null = none ran. */
24332
+ observedShare: number().nullable(),
24333
+ /** Most sessions this node ran at once inside the window. */
24334
+ peakSessions: number(),
24335
+ /** Sessions a share election handed elsewhere because this node was full or drowning. */
24336
+ yieldsAway: number(),
24337
+ devices: array(PlacementDeviceStatsSchema).readonly()
24338
+ });
24339
+ /** A camera's device pin that the session path cannot honour. */
24340
+ var StaleDevicePinSchema = object({
24341
+ deviceId: number(),
24342
+ deviceKey: string(),
24343
+ /** `disabled` — the key exists on some node but is not enabled anywhere; `absent` — no node has it. */
24344
+ reason: _enum(["disabled", "absent"])
24345
+ });
24346
+ var PlacementStatsSchema = object({
24347
+ policy: SessionPlacementPolicySchema,
24348
+ windowMs: number(),
24349
+ /** How much of the window was actually observed (the hub keeps it in memory). */
24350
+ observedForMs: number(),
24351
+ sessionsNow: number(),
24352
+ /** Most parallel sessions across the cluster inside the window. */
24353
+ clusterPeakSessions: number(),
24354
+ nodes: array(PlacementNodeStatsSchema).readonly(),
24355
+ stalePins: array(StaleDevicePinSchema).readonly()
24356
+ });
24357
+ var SuggestSharesInputSchema = object({ headroom: number().min(.3).max(.5).default(.4) });
24358
+ var SuggestedDeviceShareSchema = object({
24359
+ deviceKey: string(),
24360
+ /** Share of the node (0–100, rounded). */
24361
+ share: number(),
24362
+ modelId: string().nullable(),
24363
+ /** Inferences per second at that model, from the measured table. */
24364
+ fps: number().nullable(),
24365
+ measured: boolean(),
24366
+ /** Advisory session cap: ⌊fps × (1 − headroom) / camera fps⌋. Never enforced. */
24367
+ suggestedMaxSessions: number().nullable()
24368
+ });
24369
+ var SuggestedNodeShareSchema = object({
24370
+ nodeId: string(),
24371
+ /** Share of the cluster (0–100, rounded); null = node skipped (offline, unknown hardware). */
24372
+ share: number().nullable(),
24373
+ /** Parallel sessions the node sustains at the suggested models with the headroom kept free. */
24374
+ capacitySessions: number(),
24375
+ devices: array(SuggestedDeviceShareSchema).readonly(),
24376
+ skippedReason: string().nullable()
24377
+ });
24378
+ var SuggestSharesResultSchema = object({
24379
+ headroom: number(),
24380
+ /** Camera detection rate the capacity is counted in (the fastest camera's fps). */
24381
+ cameraFps: number(),
24382
+ /** How many share → model → capacity rounds ran before the shares stopped moving (≤ 3). */
24383
+ iterations: number(),
24384
+ nodes: array(SuggestedNodeShareSchema).readonly()
24385
+ });
24386
+ /**
24387
+ * Where the node and device shares come from (D750).
24388
+ * - `auto` — computed by the system from the cluster's measured capacity at
24389
+ * the Auto tune models, and recomputed whenever a node or device joins,
24390
+ * leaves, is switched on or off, or changes model.
24391
+ * - `manual` — the operator's stored sliders. A node or device that cannot
24392
+ * take sessions gives its share to the others in proportion; the stored
24393
+ * values are never rewritten for that.
24394
+ */
24395
+ var ShareSourceSchema = _enum(["auto", "manual"]);
24396
+ var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
24397
+ object({
24398
+ nodes: record(string(), number()),
24399
+ devices: record(string(), record(string(), number()))
24400
+ });
24401
+ var EffectiveDeviceShareSchema = object({
24402
+ deviceKey: string(),
24403
+ /** Can take sessions now (enabled, available, can run the root). */
24404
+ eligible: boolean(),
24405
+ /** The share the source assigns, as a percentage of the node's devices. */
24406
+ configuredPct: number(),
24407
+ /** The share actually used, after an ineligible device's share went to the others. */
24408
+ effectivePct: number()
24409
+ });
24410
+ var EffectiveNodeShareSchema = object({
24411
+ nodeId: string(),
24412
+ eligible: boolean(),
24413
+ configuredPct: number(),
24414
+ effectivePct: number(),
24415
+ devices: array(EffectiveDeviceShareSchema).readonly()
24416
+ });
24417
+ var EffectiveSharesSchema = object({
24418
+ source: ShareSourceSchema,
24419
+ policy: SessionPlacementPolicySchema,
24420
+ /** `auto` with no computed answer yet: the stored sliders are used meanwhile. */
24421
+ autoPending: boolean(),
24422
+ /** When the automatic shares were last computed (ms epoch); null = never. */
24423
+ computedAt: number().nullable(),
24424
+ /** What made the system recompute them last. */
24425
+ trigger: string().nullable(),
24426
+ nodes: array(EffectiveNodeShareSchema).readonly(),
24427
+ /** The relative weights the election reads (before eligibility). */
24428
+ nodeWeights: record(string(), number()),
24429
+ deviceWeights: record(string(), record(string(), number()))
24430
+ });
24431
+ /**
24432
+ * The wire shapes of the Auto tune plan and apply (D745), used by the
24297
24433
  * `pipeline-orchestrator` cap. The recommender's own types
24298
24434
  * (`recommend.ts`, `demand.ts`) are the TS face of the same data; these
24299
24435
  * schemas are what crosses the cap boundary.
@@ -24369,7 +24505,9 @@ var DeviceDemandSchema = object({
24369
24505
  "estimate",
24370
24506
  "none"
24371
24507
  ]),
24372
- observedForMs: number().nullable()
24508
+ observedForMs: number().nullable(),
24509
+ /** How on-motion sessions were charged: per-device observation, or split by share (D748). */
24510
+ placement: SessionPlacementPolicySchema
24373
24511
  });
24374
24512
  var DeviceModelChoiceSchema = object({
24375
24513
  modelId: string(),
@@ -24426,7 +24564,7 @@ var DetectorStoreClearSchema = object({
24426
24564
  deviceId: number(),
24427
24565
  keys: array(string()).readonly()
24428
24566
  });
24429
- var BestSettingsWarningSchema = discriminatedUnion("kind", [
24567
+ var AutoTuneWarningSchema = discriminatedUnion("kind", [
24430
24568
  object({
24431
24569
  kind: literal("detector-store-cluster-wide"),
24432
24570
  skippedNodes: array(string()).readonly()
@@ -24441,26 +24579,36 @@ var BestSettingsWarningSchema = discriminatedUnion("kind", [
24441
24579
  deviceKey: string()
24442
24580
  })
24443
24581
  ]);
24444
- var BestSettingsOptionsSchema = object({
24445
- /** Share of each accelerator's throughput kept free (0.3–0.5). */
24446
- headroom: number().min(.3).max(.5).default(.4) });
24447
- var BestSettingsPlanSchema = object({
24582
+ var AutoTuneOptionsSchema = object({
24583
+ /** Share of each accelerator's throughput kept free (0.3–0.5). */
24584
+ headroom: number().min(.3).max(.5).default(.4),
24585
+ /**
24586
+ * What-if shares (D748): plan as if these node/device shares were stored
24587
+ * and the policy were `share`. Absent = the stored shares under the stored
24588
+ * policy. A what-if plan is for display; apply always re-plans from what
24589
+ * is stored.
24590
+ */
24591
+ shares: LoadBalancingSharesInputSchema.optional()
24592
+ });
24593
+ var AutoTunePlanSchema = object({
24448
24594
  /** Hash of everything the apply will write — the apply refuses a different one. */
24449
24595
  planHash: string(),
24450
24596
  family: literal("yolov9"),
24451
24597
  headroom: number(),
24598
+ /** Planned under what-if shares (D748): for display — apply refuses it as stale. */
24599
+ whatIf: boolean(),
24452
24600
  generatedAt: number(),
24453
24601
  nodes: array(NodeRecommendationSchema).readonly(),
24454
24602
  nodeChanges: array(NodeDeviceChangeSchema).readonly(),
24455
24603
  cameraClears: array(CameraOverrideClearSchema).readonly(),
24456
24604
  detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
24457
- warnings: array(BestSettingsWarningSchema).readonly()
24605
+ warnings: array(AutoTuneWarningSchema).readonly()
24458
24606
  });
24459
- var BestSettingsApplyInputSchema = object({
24607
+ var AutoTuneApplyInputSchema = object({
24460
24608
  planHash: string(),
24461
24609
  headroom: number().min(.3).max(.5).default(.4)
24462
24610
  });
24463
- var BestSettingsPhaseResultSchema = object({
24611
+ var AutoTunePhaseResultSchema = object({
24464
24612
  phase: _enum([
24465
24613
  "download",
24466
24614
  "camera-overrides",
@@ -24471,19 +24619,19 @@ var BestSettingsPhaseResultSchema = object({
24471
24619
  ok: boolean(),
24472
24620
  detail: string()
24473
24621
  });
24474
- var BestSettingsApplyResultSchema = discriminatedUnion("kind", [
24622
+ var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
24475
24623
  object({
24476
24624
  kind: literal("applied"),
24477
24625
  planHash: string(),
24478
- phases: array(BestSettingsPhaseResultSchema).readonly()
24626
+ phases: array(AutoTunePhaseResultSchema).readonly()
24479
24627
  }),
24480
24628
  object({
24481
24629
  kind: literal("aborted"),
24482
- phases: array(BestSettingsPhaseResultSchema).readonly()
24630
+ phases: array(AutoTunePhaseResultSchema).readonly()
24483
24631
  }),
24484
24632
  object({
24485
24633
  kind: literal("stale"),
24486
- plan: BestSettingsPlanSchema
24634
+ plan: AutoTunePlanSchema
24487
24635
  }),
24488
24636
  object({
24489
24637
  kind: literal("refused"),
@@ -25670,7 +25818,6 @@ var CameraStepOverridePatchSchema = object({
25670
25818
  settings: record(string(), unknown()).readonly().optional()
25671
25819
  });
25672
25820
  var CameraPipelineSettingsSchema = object({
25673
- pinnedAgentNodeId: string().optional(),
25674
25821
  stepToggles: record(string(), boolean()).optional(),
25675
25822
  stepOverridesByDevice: record(string(), record(string(), record(string(), CameraStepOverridePatchSchema))).optional(),
25676
25823
  pipelineByAgent: record(string(), CameraPipelineForAgentSchema).optional()
@@ -26169,12 +26316,6 @@ method(object({
26169
26316
  }), object({ success: literal(true) }), {
26170
26317
  kind: "mutation",
26171
26318
  auth: "admin"
26172
- }), method(object({
26173
- agentNodeId: string(),
26174
- detectWeight: number().positive().nullable()
26175
- }), object({ success: literal(true) }), {
26176
- kind: "mutation",
26177
- auth: "admin"
26178
26319
  }), method(object({
26179
26320
  agentNodeId: string(),
26180
26321
  detect: boolean().nullable().optional(),
@@ -26216,7 +26357,13 @@ method(object({
26216
26357
  }), {
26217
26358
  kind: "mutation",
26218
26359
  auth: "admin"
26219
- }), method(BestSettingsOptionsSchema, BestSettingsPlanSchema, { auth: "admin" }), method(BestSettingsApplyInputSchema, BestSettingsApplyResultSchema, {
26360
+ }), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
26361
+ kind: "mutation",
26362
+ auth: "admin"
26363
+ }), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
26364
+ kind: "mutation",
26365
+ auth: "admin"
26366
+ }), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
26220
26367
  kind: "mutation",
26221
26368
  auth: "admin"
26222
26369
  }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
@@ -42114,7 +42261,7 @@ Object.freeze({
42114
42261
  addonId: null,
42115
42262
  access: "view"
42116
42263
  },
42117
- "pipelineOrchestrator.applyBestSettings": {
42264
+ "pipelineOrchestrator.applyAutoTune": {
42118
42265
  capName: "pipeline-orchestrator",
42119
42266
  capScope: "system",
42120
42267
  addonId: null,
@@ -42234,6 +42381,12 @@ Object.freeze({
42234
42381
  addonId: null,
42235
42382
  access: "view"
42236
42383
  },
42384
+ "pipelineOrchestrator.getEffectiveShares": {
42385
+ capName: "pipeline-orchestrator",
42386
+ capScope: "system",
42387
+ addonId: null,
42388
+ access: "view"
42389
+ },
42237
42390
  "pipelineOrchestrator.getGlobalMetrics": {
42238
42391
  capName: "pipeline-orchestrator",
42239
42392
  capScope: "system",
@@ -42270,6 +42423,12 @@ Object.freeze({
42270
42423
  addonId: null,
42271
42424
  access: "view"
42272
42425
  },
42426
+ "pipelineOrchestrator.getPlacementStats": {
42427
+ capName: "pipeline-orchestrator",
42428
+ capScope: "system",
42429
+ addonId: null,
42430
+ access: "view"
42431
+ },
42273
42432
  "pipelineOrchestrator.getReconcileFromDiskStatus": {
42274
42433
  capName: "pipeline-orchestrator",
42275
42434
  capScope: "system",
@@ -42294,7 +42453,7 @@ Object.freeze({
42294
42453
  addonId: null,
42295
42454
  access: "create"
42296
42455
  },
42297
- "pipelineOrchestrator.planBestSettings": {
42456
+ "pipelineOrchestrator.planAutoTune": {
42298
42457
  capName: "pipeline-orchestrator",
42299
42458
  capScope: "system",
42300
42459
  addonId: null,
@@ -42360,12 +42519,6 @@ Object.freeze({
42360
42519
  addonId: null,
42361
42520
  access: "create"
42362
42521
  },
42363
- "pipelineOrchestrator.setAgentDetectWeight": {
42364
- capName: "pipeline-orchestrator",
42365
- capScope: "system",
42366
- addonId: null,
42367
- access: "create"
42368
- },
42369
42522
  "pipelineOrchestrator.setAgentInferenceDevices": {
42370
42523
  capName: "pipeline-orchestrator",
42371
42524
  capScope: "system",
@@ -42420,12 +42573,30 @@ Object.freeze({
42420
42573
  addonId: null,
42421
42574
  access: "create"
42422
42575
  },
42576
+ "pipelineOrchestrator.setLoadBalancingShares": {
42577
+ capName: "pipeline-orchestrator",
42578
+ capScope: "system",
42579
+ addonId: null,
42580
+ access: "create"
42581
+ },
42423
42582
  "pipelineOrchestrator.setPipelineDevicePin": {
42424
42583
  capName: "pipeline-orchestrator",
42425
42584
  capScope: "system",
42426
42585
  addonId: null,
42427
42586
  access: "create"
42428
42587
  },
42588
+ "pipelineOrchestrator.setShareSource": {
42589
+ capName: "pipeline-orchestrator",
42590
+ capScope: "system",
42591
+ addonId: null,
42592
+ access: "create"
42593
+ },
42594
+ "pipelineOrchestrator.suggestShares": {
42595
+ capName: "pipeline-orchestrator",
42596
+ capScope: "system",
42597
+ addonId: null,
42598
+ access: "view"
42599
+ },
42429
42600
  "pipelineOrchestrator.unassignAudio": {
42430
42601
  capName: "pipeline-orchestrator",
42431
42602
  capScope: "system",