@camstack/addon-agent-ui 1.2.183 → 1.2.184

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 (2) hide show
  1. package/dist/addon.js +76 -16
  2. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -23750,7 +23750,52 @@ var SuggestSharesResultSchema = object({
23750
23750
  nodes: array(SuggestedNodeShareSchema).readonly()
23751
23751
  });
23752
23752
  /**
23753
- * The wire shapes of the Best settings plan and apply (D745), used by the
23753
+ * Where the node and device shares come from (D750).
23754
+ * - `auto` — computed by the system from the cluster's measured capacity at
23755
+ * the Auto tune models, and recomputed whenever a node or device joins,
23756
+ * leaves, is switched on or off, or changes model.
23757
+ * - `manual` — the operator's stored sliders. A node or device that cannot
23758
+ * take sessions gives its share to the others in proportion; the stored
23759
+ * values are never rewritten for that.
23760
+ */
23761
+ var ShareSourceSchema = _enum(["auto", "manual"]);
23762
+ var SetShareSourceInputSchema = object({ source: ShareSourceSchema });
23763
+ object({
23764
+ nodes: record(string(), number()),
23765
+ devices: record(string(), record(string(), number()))
23766
+ });
23767
+ var EffectiveDeviceShareSchema = object({
23768
+ deviceKey: string(),
23769
+ /** Can take sessions now (enabled, available, can run the root). */
23770
+ eligible: boolean(),
23771
+ /** The share the source assigns, as a percentage of the node's devices. */
23772
+ configuredPct: number(),
23773
+ /** The share actually used, after an ineligible device's share went to the others. */
23774
+ effectivePct: number()
23775
+ });
23776
+ var EffectiveNodeShareSchema = object({
23777
+ nodeId: string(),
23778
+ eligible: boolean(),
23779
+ configuredPct: number(),
23780
+ effectivePct: number(),
23781
+ devices: array(EffectiveDeviceShareSchema).readonly()
23782
+ });
23783
+ var EffectiveSharesSchema = object({
23784
+ source: ShareSourceSchema,
23785
+ policy: SessionPlacementPolicySchema,
23786
+ /** `auto` with no computed answer yet: the stored sliders are used meanwhile. */
23787
+ autoPending: boolean(),
23788
+ /** When the automatic shares were last computed (ms epoch); null = never. */
23789
+ computedAt: number().nullable(),
23790
+ /** What made the system recompute them last. */
23791
+ trigger: string().nullable(),
23792
+ nodes: array(EffectiveNodeShareSchema).readonly(),
23793
+ /** The relative weights the election reads (before eligibility). */
23794
+ nodeWeights: record(string(), number()),
23795
+ deviceWeights: record(string(), record(string(), number()))
23796
+ });
23797
+ /**
23798
+ * The wire shapes of the Auto tune plan and apply (D745), used by the
23754
23799
  * `pipeline-orchestrator` cap. The recommender's own types
23755
23800
  * (`recommend.ts`, `demand.ts`) are the TS face of the same data; these
23756
23801
  * schemas are what crosses the cap boundary.
@@ -23885,7 +23930,7 @@ var DetectorStoreClearSchema = object({
23885
23930
  deviceId: number(),
23886
23931
  keys: array(string()).readonly()
23887
23932
  });
23888
- var BestSettingsWarningSchema = discriminatedUnion("kind", [
23933
+ var AutoTuneWarningSchema = discriminatedUnion("kind", [
23889
23934
  object({
23890
23935
  kind: literal("detector-store-cluster-wide"),
23891
23936
  skippedNodes: array(string()).readonly()
@@ -23900,7 +23945,7 @@ var BestSettingsWarningSchema = discriminatedUnion("kind", [
23900
23945
  deviceKey: string()
23901
23946
  })
23902
23947
  ]);
23903
- var BestSettingsOptionsSchema = object({
23948
+ var AutoTuneOptionsSchema = object({
23904
23949
  /** Share of each accelerator's throughput kept free (0.3–0.5). */
23905
23950
  headroom: number().min(.3).max(.5).default(.4),
23906
23951
  /**
@@ -23911,7 +23956,7 @@ var BestSettingsOptionsSchema = object({
23911
23956
  */
23912
23957
  shares: LoadBalancingSharesInputSchema.optional()
23913
23958
  });
23914
- var BestSettingsPlanSchema = object({
23959
+ var AutoTunePlanSchema = object({
23915
23960
  /** Hash of everything the apply will write — the apply refuses a different one. */
23916
23961
  planHash: string(),
23917
23962
  family: literal("yolov9"),
@@ -23923,13 +23968,13 @@ var BestSettingsPlanSchema = object({
23923
23968
  nodeChanges: array(NodeDeviceChangeSchema).readonly(),
23924
23969
  cameraClears: array(CameraOverrideClearSchema).readonly(),
23925
23970
  detectorStoreClears: array(DetectorStoreClearSchema).readonly(),
23926
- warnings: array(BestSettingsWarningSchema).readonly()
23971
+ warnings: array(AutoTuneWarningSchema).readonly()
23927
23972
  });
23928
- var BestSettingsApplyInputSchema = object({
23973
+ var AutoTuneApplyInputSchema = object({
23929
23974
  planHash: string(),
23930
23975
  headroom: number().min(.3).max(.5).default(.4)
23931
23976
  });
23932
- var BestSettingsPhaseResultSchema = object({
23977
+ var AutoTunePhaseResultSchema = object({
23933
23978
  phase: _enum([
23934
23979
  "download",
23935
23980
  "camera-overrides",
@@ -23940,19 +23985,19 @@ var BestSettingsPhaseResultSchema = object({
23940
23985
  ok: boolean(),
23941
23986
  detail: string()
23942
23987
  });
23943
- var BestSettingsApplyResultSchema = discriminatedUnion("kind", [
23988
+ var AutoTuneApplyResultSchema = discriminatedUnion("kind", [
23944
23989
  object({
23945
23990
  kind: literal("applied"),
23946
23991
  planHash: string(),
23947
- phases: array(BestSettingsPhaseResultSchema).readonly()
23992
+ phases: array(AutoTunePhaseResultSchema).readonly()
23948
23993
  }),
23949
23994
  object({
23950
23995
  kind: literal("aborted"),
23951
- phases: array(BestSettingsPhaseResultSchema).readonly()
23996
+ phases: array(AutoTunePhaseResultSchema).readonly()
23952
23997
  }),
23953
23998
  object({
23954
23999
  kind: literal("stale"),
23955
- plan: BestSettingsPlanSchema
24000
+ plan: AutoTunePlanSchema
23956
24001
  }),
23957
24002
  object({
23958
24003
  kind: literal("refused"),
@@ -25678,13 +25723,16 @@ method(object({
25678
25723
  }), {
25679
25724
  kind: "mutation",
25680
25725
  auth: "admin"
25681
- }), method(BestSettingsOptionsSchema, BestSettingsPlanSchema, { auth: "admin" }), method(BestSettingsApplyInputSchema, BestSettingsApplyResultSchema, {
25726
+ }), method(AutoTuneOptionsSchema, AutoTunePlanSchema, { auth: "admin" }), method(AutoTuneApplyInputSchema, AutoTuneApplyResultSchema, {
25682
25727
  kind: "mutation",
25683
25728
  auth: "admin"
25684
25729
  }), method(LoadBalancingSharesInputSchema, object({ success: literal(true) }), {
25685
25730
  kind: "mutation",
25686
25731
  auth: "admin"
25687
- }), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
25732
+ }), method(PlacementStatsInputSchema, PlacementStatsSchema, { auth: "admin" }), method(SuggestSharesInputSchema, SuggestSharesResultSchema, { auth: "admin" }), method(_void(), EffectiveSharesSchema, { auth: "admin" }), method(SetShareSourceInputSchema, object({ success: literal(true) }), {
25733
+ kind: "mutation",
25734
+ auth: "admin"
25735
+ }), method(object({ deviceId: number() }), CameraPipelineSettingsSchema.nullable()), method(object({
25688
25736
  deviceId: number(),
25689
25737
  addonId: string(),
25690
25738
  enabled: boolean().nullable()
@@ -41481,7 +41529,7 @@ Object.freeze({
41481
41529
  addonId: null,
41482
41530
  access: "view"
41483
41531
  },
41484
- "pipelineOrchestrator.applyBestSettings": {
41532
+ "pipelineOrchestrator.applyAutoTune": {
41485
41533
  capName: "pipeline-orchestrator",
41486
41534
  capScope: "system",
41487
41535
  addonId: null,
@@ -41601,6 +41649,12 @@ Object.freeze({
41601
41649
  addonId: null,
41602
41650
  access: "view"
41603
41651
  },
41652
+ "pipelineOrchestrator.getEffectiveShares": {
41653
+ capName: "pipeline-orchestrator",
41654
+ capScope: "system",
41655
+ addonId: null,
41656
+ access: "view"
41657
+ },
41604
41658
  "pipelineOrchestrator.getGlobalMetrics": {
41605
41659
  capName: "pipeline-orchestrator",
41606
41660
  capScope: "system",
@@ -41667,7 +41721,7 @@ Object.freeze({
41667
41721
  addonId: null,
41668
41722
  access: "create"
41669
41723
  },
41670
- "pipelineOrchestrator.planBestSettings": {
41724
+ "pipelineOrchestrator.planAutoTune": {
41671
41725
  capName: "pipeline-orchestrator",
41672
41726
  capScope: "system",
41673
41727
  addonId: null,
@@ -41799,6 +41853,12 @@ Object.freeze({
41799
41853
  addonId: null,
41800
41854
  access: "create"
41801
41855
  },
41856
+ "pipelineOrchestrator.setShareSource": {
41857
+ capName: "pipeline-orchestrator",
41858
+ capScope: "system",
41859
+ addonId: null,
41860
+ access: "create"
41861
+ },
41802
41862
  "pipelineOrchestrator.suggestShares": {
41803
41863
  capName: "pipeline-orchestrator",
41804
41864
  capScope: "system",
@@ -49147,7 +49207,7 @@ var AgentUIAddon = class extends BaseAddon {
49147
49207
  capability: adminUiCapability,
49148
49208
  provider: {
49149
49209
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
49150
- getVersion: async () => ({ version: "1.2.183" })
49210
+ getVersion: async () => ({ version: "1.2.184" })
49151
49211
  }
49152
49212
  }];
49153
49213
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.2.183",
3
+ "version": "1.2.184",
4
4
  "description": "Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",