@camstack/types 1.2.318 → 1.2.319

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.
package/dist/addon.js CHANGED
@@ -156,9 +156,9 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
156
156
  "searchObjectEvents": { "limit": 50 }
157
157
  },
158
158
  "pipeline-orchestrator": {
159
- "applyBestSettings": { "headroom": .4 },
159
+ "applyAutoTune": { "headroom": .4 },
160
160
  "getPlacementStats": { "windowMs": 36e5 },
161
- "planBestSettings": { "headroom": .4 },
161
+ "planAutoTune": { "headroom": .4 },
162
162
  "setLoadBalancingShares": {
163
163
  "nodes": {},
164
164
  "devices": {}
package/dist/addon.mjs CHANGED
@@ -155,9 +155,9 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
155
155
  "searchObjectEvents": { "limit": 50 }
156
156
  },
157
157
  "pipeline-orchestrator": {
158
- "applyBestSettings": { "headroom": .4 },
158
+ "applyAutoTune": { "headroom": .4 },
159
159
  "getPlacementStats": { "windowMs": 36e5 },
160
- "planBestSettings": { "headroom": .4 },
160
+ "planAutoTune": { "headroom": .4 },
161
161
  "setLoadBalancingShares": {
162
162
  "nodes": {},
163
163
  "devices": {}
@@ -822,7 +822,7 @@ export declare const pipelineExecutorCapability: {
822
822
  clearedDevices: z.ZodNumber;
823
823
  }, z.core.$strip>, "mutation">;
824
824
  /**
825
- * Best settings (D745): the MODEL-BOUND thresholds (`bindsToModel` keys of
825
+ * Auto tune (D745): the MODEL-BOUND thresholds (`bindsToModel` keys of
826
826
  * the object-detection root, and their binding keys) stored in THIS node's
827
827
  * per-camera detector settings — and, unless `dryRun`, remove them so the
828
828
  * running model's own defaults apply. Every other key of a camera's store
@@ -1326,7 +1326,7 @@ export declare const pipelineOrchestratorCapability: {
1326
1326
  clearedCameraOverrides: z.ZodNumber;
1327
1327
  }, z.core.$strip>, "mutation">;
1328
1328
  /**
1329
- * Best settings (D745) — DRY RUN. Recommends ONE detector family (YOLOv9)
1329
+ * Auto tune (D745) — DRY RUN. Recommends ONE detector family (YOLOv9)
1330
1330
  * for the whole cluster from each node's static hardware class, the
1331
1331
  * measured latency table and the detection demand, and lists every write
1332
1332
  * the apply would make: the node model pins set, the enrichment pins and
@@ -1335,7 +1335,7 @@ export declare const pipelineOrchestratorCapability: {
1335
1335
  * enablement, device enablement, pins, recording, notifications, zones and
1336
1336
  * rules are never part of it. `planHash` names exactly this diff.
1337
1337
  */
1338
- readonly planBestSettings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1338
+ readonly planAutoTune: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1339
1339
  headroom: z.ZodDefault<z.ZodNumber>;
1340
1340
  shares: z.ZodOptional<z.ZodObject<{
1341
1341
  nodes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
@@ -1549,12 +1549,12 @@ export declare const pipelineOrchestratorCapability: {
1549
1549
  }, z.core.$strip>], "kind">>>;
1550
1550
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
1551
1551
  /**
1552
- * Best settings (D745) — APPLY the plan the operator confirmed. Recomputes
1552
+ * Auto tune (D745) — APPLY the plan the operator confirmed. Recomputes
1553
1553
  * the plan and refuses (`stale`, with the fresh plan) when its hash is not
1554
1554
  * `planHash`, so what is written is exactly the confirmed diff. Offline
1555
1555
  * nodes are skipped; there is no undo.
1556
1556
  */
1557
- readonly applyBestSettings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1557
+ readonly applyAutoTune: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1558
1558
  planHash: z.ZodString;
1559
1559
  headroom: z.ZodDefault<z.ZodNumber>;
1560
1560
  }, z.core.$strip>, z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1856,7 +1856,7 @@ export declare const pipelineOrchestratorCapability: {
1856
1856
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
1857
1857
  /**
1858
1858
  * Load balancing (D748) — shares proportional to each node's measured
1859
- * capacity at the models Best settings would pick, iterated (≤ 3 rounds)
1859
+ * capacity at the models Auto tune would pick, iterated (≤ 3 rounds)
1860
1860
  * until the shares stop moving; per device, an ADVISORY session cap.
1861
1861
  * Writes nothing.
1862
1862
  */
@@ -1881,6 +1881,52 @@ export declare const pipelineOrchestratorCapability: {
1881
1881
  skippedReason: z.ZodNullable<z.ZodString>;
1882
1882
  }, z.core.$strip>>>;
1883
1883
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
1884
+ /**
1885
+ * Load balancing (D750) — the shares placement reads now: the source
1886
+ * (automatic capacity shares or the operator's sliders), each node's and
1887
+ * device's configured share, and the effective share after a node or
1888
+ * device that cannot take sessions gave its share to the others.
1889
+ */
1890
+ readonly getEffectiveShares: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
1891
+ source: z.ZodEnum<{
1892
+ manual: "manual";
1893
+ auto: "auto";
1894
+ }>;
1895
+ policy: z.ZodEnum<{
1896
+ "least-loaded": "least-loaded";
1897
+ share: "share";
1898
+ }>;
1899
+ autoPending: z.ZodBoolean;
1900
+ computedAt: z.ZodNullable<z.ZodNumber>;
1901
+ trigger: z.ZodNullable<z.ZodString>;
1902
+ nodes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1903
+ nodeId: z.ZodString;
1904
+ eligible: z.ZodBoolean;
1905
+ configuredPct: z.ZodNumber;
1906
+ effectivePct: z.ZodNumber;
1907
+ devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1908
+ deviceKey: z.ZodString;
1909
+ eligible: z.ZodBoolean;
1910
+ configuredPct: z.ZodNumber;
1911
+ effectivePct: z.ZodNumber;
1912
+ }, z.core.$strip>>>;
1913
+ }, z.core.$strip>>>;
1914
+ nodeWeights: z.ZodRecord<z.ZodString, z.ZodNumber>;
1915
+ deviceWeights: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
1916
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
1917
+ /**
1918
+ * Load balancing (D750) — switch between automatic and manual shares.
1919
+ * Going manual seeds the sliders with the current automatic shares (one
1920
+ * atomic write), so nothing jumps; going automatic recomputes at once.
1921
+ */
1922
+ readonly setShareSource: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1923
+ source: z.ZodEnum<{
1924
+ manual: "manual";
1925
+ auto: "auto";
1926
+ }>;
1927
+ }, z.core.$strip>, z.ZodObject<{
1928
+ success: z.ZodLiteral<true>;
1929
+ }, z.core.$strip>, "mutation">;
1884
1930
  /** Read one camera's settings. Null when never touched (inherits agent defaults fully). */
1885
1931
  readonly getCameraSettings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1886
1932
  deviceId: z.ZodNumber;
package/dist/client.js CHANGED
@@ -7499,11 +7499,13 @@ function createSystemProxy(api) {
7499
7499
  setAgentInferenceDevices: (input) => dispatch("pipelineOrchestrator", "setAgentInferenceDevices", "mutation", input),
7500
7500
  getNodeInferenceDevices: (input) => dispatch("pipelineOrchestrator", "getNodeInferenceDevices", "query", input),
7501
7501
  resetNodePipelineDefaults: (input) => dispatch("pipelineOrchestrator", "resetNodePipelineDefaults", "mutation", input),
7502
- planBestSettings: (input) => dispatch("pipelineOrchestrator", "planBestSettings", "query", input),
7503
- applyBestSettings: (input) => dispatch("pipelineOrchestrator", "applyBestSettings", "mutation", input),
7502
+ planAutoTune: (input) => dispatch("pipelineOrchestrator", "planAutoTune", "query", input),
7503
+ applyAutoTune: (input) => dispatch("pipelineOrchestrator", "applyAutoTune", "mutation", input),
7504
7504
  setLoadBalancingShares: (input) => dispatch("pipelineOrchestrator", "setLoadBalancingShares", "mutation", input),
7505
7505
  getPlacementStats: (input) => dispatch("pipelineOrchestrator", "getPlacementStats", "query", input),
7506
7506
  suggestShares: (input) => dispatch("pipelineOrchestrator", "suggestShares", "query", input),
7507
+ getEffectiveShares: (input) => dispatch("pipelineOrchestrator", "getEffectiveShares", "query", input),
7508
+ setShareSource: (input) => dispatch("pipelineOrchestrator", "setShareSource", "mutation", input),
7507
7509
  getCameraStatuses: (input) => dispatch("pipelineOrchestrator", "getCameraStatuses", "query", input),
7508
7510
  setCameraSensors: (input) => dispatch("pipelineOrchestrator", "setCameraSensors", "mutation", input),
7509
7511
  reconcileFromDisk: (input) => dispatch("pipelineOrchestrator", "reconcileFromDisk", "mutation", input),
package/dist/client.mjs CHANGED
@@ -7498,11 +7498,13 @@ function createSystemProxy(api) {
7498
7498
  setAgentInferenceDevices: (input) => dispatch("pipelineOrchestrator", "setAgentInferenceDevices", "mutation", input),
7499
7499
  getNodeInferenceDevices: (input) => dispatch("pipelineOrchestrator", "getNodeInferenceDevices", "query", input),
7500
7500
  resetNodePipelineDefaults: (input) => dispatch("pipelineOrchestrator", "resetNodePipelineDefaults", "mutation", input),
7501
- planBestSettings: (input) => dispatch("pipelineOrchestrator", "planBestSettings", "query", input),
7502
- applyBestSettings: (input) => dispatch("pipelineOrchestrator", "applyBestSettings", "mutation", input),
7501
+ planAutoTune: (input) => dispatch("pipelineOrchestrator", "planAutoTune", "query", input),
7502
+ applyAutoTune: (input) => dispatch("pipelineOrchestrator", "applyAutoTune", "mutation", input),
7503
7503
  setLoadBalancingShares: (input) => dispatch("pipelineOrchestrator", "setLoadBalancingShares", "mutation", input),
7504
7504
  getPlacementStats: (input) => dispatch("pipelineOrchestrator", "getPlacementStats", "query", input),
7505
7505
  suggestShares: (input) => dispatch("pipelineOrchestrator", "suggestShares", "query", input),
7506
+ getEffectiveShares: (input) => dispatch("pipelineOrchestrator", "getEffectiveShares", "query", input),
7507
+ setShareSource: (input) => dispatch("pipelineOrchestrator", "setShareSource", "mutation", input),
7506
7508
  getCameraStatuses: (input) => dispatch("pipelineOrchestrator", "getCameraStatuses", "query", input),
7507
7509
  setCameraSensors: (input) => dispatch("pipelineOrchestrator", "setCameraSensors", "mutation", input),
7508
7510
  reconcileFromDisk: (input) => dispatch("pipelineOrchestrator", "reconcileFromDisk", "mutation", input),
@@ -6595,18 +6595,18 @@ export type AppRouter = TrpcCoreRouter<{
6595
6595
  output: z.infer<typeof pipelineOrchestratorCapability.methods.resetNodePipelineDefaults.output>;
6596
6596
  meta: object;
6597
6597
  }>;
6598
- planBestSettings: TRPCQueryProcedure<{
6598
+ planAutoTune: TRPCQueryProcedure<{
6599
6599
  input: {
6600
6600
  [x: string]: unknown;
6601
- } & z.input<typeof pipelineOrchestratorCapability.methods.planBestSettings.input>;
6602
- output: z.infer<typeof pipelineOrchestratorCapability.methods.planBestSettings.output>;
6601
+ } & z.input<typeof pipelineOrchestratorCapability.methods.planAutoTune.input>;
6602
+ output: z.infer<typeof pipelineOrchestratorCapability.methods.planAutoTune.output>;
6603
6603
  meta: object;
6604
6604
  }>;
6605
- applyBestSettings: TRPCMutationProcedure<{
6605
+ applyAutoTune: TRPCMutationProcedure<{
6606
6606
  input: {
6607
6607
  [x: string]: unknown;
6608
- } & z.input<typeof pipelineOrchestratorCapability.methods.applyBestSettings.input>;
6609
- output: z.infer<typeof pipelineOrchestratorCapability.methods.applyBestSettings.output>;
6608
+ } & z.input<typeof pipelineOrchestratorCapability.methods.applyAutoTune.input>;
6609
+ output: z.infer<typeof pipelineOrchestratorCapability.methods.applyAutoTune.output>;
6610
6610
  meta: object;
6611
6611
  }>;
6612
6612
  setLoadBalancingShares: TRPCMutationProcedure<{
@@ -6630,6 +6630,20 @@ export type AppRouter = TrpcCoreRouter<{
6630
6630
  output: z.infer<typeof pipelineOrchestratorCapability.methods.suggestShares.output>;
6631
6631
  meta: object;
6632
6632
  }>;
6633
+ getEffectiveShares: TRPCQueryProcedure<{
6634
+ input: {
6635
+ nodeId?: string | undefined;
6636
+ } | undefined;
6637
+ output: z.infer<typeof pipelineOrchestratorCapability.methods.getEffectiveShares.output>;
6638
+ meta: object;
6639
+ }>;
6640
+ setShareSource: TRPCMutationProcedure<{
6641
+ input: {
6642
+ [x: string]: unknown;
6643
+ } & z.input<typeof pipelineOrchestratorCapability.methods.setShareSource.input>;
6644
+ output: z.infer<typeof pipelineOrchestratorCapability.methods.setShareSource.output>;
6645
+ meta: object;
6646
+ }>;
6633
6647
  getCameraSettings: TRPCQueryProcedure<{
6634
6648
  input: {
6635
6649
  [x: string]: unknown;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 1232 method paths across 165 capabilities.
9
+ * Coverage: 1234 method paths across 165 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -88,7 +88,7 @@ export interface SystemProxy {
88
88
  readonly notificationRules: Pick<InferProvider<typeof notificationRulesCapability>, 'listRules' | 'getRule' | 'createRule' | 'updateRule' | 'deleteRule' | 'setRuleEnabled' | 'listSequences' | 'getSequence' | 'createSequence' | 'updateSequence' | 'deleteSequence' | 'getClipRetentionAsks' | 'listDeviceMutes' | 'testRule' | 'previewStateSummary' | 'getConditionCatalog' | 'getTemplateCatalog' | 'previewTemplate' | 'getHistory' | 'getRuleLastRuns' | 'resolveArtifactUrl' | 'listSnoozes' | 'createSnooze' | 'cancelSnooze' | 'getAlarmConfig' | 'setAlarmConfig' | 'createAlarmProfile' | 'renameAlarmProfile' | 'deleteAlarmProfile' | 'activateAlarmProfile' | 'getAlarmSensors'>;
89
89
  readonly osdManager: Pick<InferProvider<typeof osdManagerCapability>, 'getConditionSupport' | 'copyDeviceConfiguration' | 'listTemplates' | 'upsertTemplate' | 'deleteTemplate'>;
90
90
  readonly pipelineExecutor: Pick<InferProvider<typeof pipelineExecutorCapability>, 'getAvailableEngines' | 'getSelectedEngine' | 'getDefaultSteps' | 'getEngineProvisioning' | 'getVideoPipelineSteps' | 'setVideoPipelineSteps' | 'clearDeviceOverrides' | 'clearModelBoundDeviceOverrides' | 'getInferenceDeviceHealth' | 'rearmInferenceDevice' | 'getSchema' | 'getGlobalSteps' | 'getGlobalPipelineConfig' | 'getOrchestratorConfigSchema' | 'validatePipeline' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate' | 'getCapabilities' | 'getAddonModels' | 'downloadModel' | 'deleteModel' | 'cacheFrameInPool' | 'inferCached' | 'uncacheFrame' | 'getEffectiveTuning' | 'listLoadedEngines' | 'spinEngine' | 'killEngine' | 'listReferenceImages' | 'getReferenceImage' | 'getReferenceAudioFiles' | 'getReferenceAudio' | 'getAudioCapabilities' | 'runAudioTest' | 'getDetectionConfigSchema'>;
91
- readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'requestOccupancyLook' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getClusterModelChoice' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getAudioNodeLoad' | 'getAudioAssignments' | 'getAgentSettings' | 'listAgentSettings' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentCapabilities' | 'setAgentDecodeLimits' | 'setAgentReachableHost' | 'setAgentInferenceDevices' | 'getNodeInferenceDevices' | 'resetNodePipelineDefaults' | 'planBestSettings' | 'applyBestSettings' | 'setLoadBalancingShares' | 'getPlacementStats' | 'suggestShares' | 'getCameraStatuses' | 'setCameraSensors' | 'reconcileFromDisk' | 'getReconcileFromDiskStatus' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate'>;
91
+ readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'requestOccupancyLook' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getClusterModelChoice' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getAudioNodeLoad' | 'getAudioAssignments' | 'getAgentSettings' | 'listAgentSettings' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentCapabilities' | 'setAgentDecodeLimits' | 'setAgentReachableHost' | 'setAgentInferenceDevices' | 'getNodeInferenceDevices' | 'resetNodePipelineDefaults' | 'planAutoTune' | 'applyAutoTune' | 'setLoadBalancingShares' | 'getPlacementStats' | 'suggestShares' | 'getEffectiveShares' | 'setShareSource' | 'getCameraStatuses' | 'setCameraSensors' | 'reconcileFromDisk' | 'getReconcileFromDiskStatus' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate'>;
92
92
  readonly pipelineRunner: Pick<InferProvider<typeof pipelineRunnerCapability>, 'attachCamera' | 'reportMotion' | 'getLocalLoad' | 'getLocalMetrics' | 'getAllCameraMetrics' | 'getLocalCameras' | 'getNativeCrop' | 'runStatelessStep'>;
93
93
  readonly plateGallery: Pick<InferProvider<typeof plateGalleryCapability>, 'getPlateMedia' | 'searchPlates' | 'suggestPlateClusters' | 'correctPlateText' | 'deletePlate' | 'listVehicles' | 'createVehicle' | 'renameVehicle' | 'deleteVehicle' | 'listVehicleSamples' | 'removeVehicleSample' | 'assignPlate' | 'unassignPlate' | 'assignPlates' | 'unassignPlates'>;
94
94
  readonly recordingArchive: Pick<InferProvider<typeof recordingArchiveCapability>, 'getAvailabilityBatch' | 'getDaysWithRecordingsBatch' | 'getStorageUsage' | 'listOpsLog' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'refreshStorageLocationsForMigration' | 'startStorageMigrationMove' | 'getStorageMigrationMoveStatus' | 'cancelStorageMigrationMove' | 'relocateFootage' | 'listRelocateJobs' | 'getRelocateResidue' | 'reconcileLedgerAgainstDisk' | 'cancelRelocateJob' | 'planStorageRebalance' | 'startStorageRebalance' | 'getPlacement' | 'setDevicePlacement'>;
package/dist/index.d.ts CHANGED
@@ -268,7 +268,7 @@ export { type ProviderMotionData, ProviderMotionDataSchema, providerMotionEvent,
268
268
  export { type FormatRunnableModel, stepModelRunsOnFormat, } from './pipeline/step-format-runnable.js';
269
269
  export { isRemovedModelId, REMOVED_MODEL_IDS } from './pipeline/removed-model-ids.js';
270
270
  export { applyModelBoundSettings, clearModelBoundOverrides, clearModelBoundSetting, collectModelBoundKeys, hasModelBoundOverrides, type InapplicableModelBoundOverride, modelBindingKey, type ModelBoundSettingsBag, type ModelBoundSettingSource, type ModelBoundSettingState, resolveModelBoundSetting, writeModelBoundSetting, } from './pipeline/model-bound-settings.js';
271
- export * from './pipeline/best-settings/index.js';
271
+ export * from './pipeline/auto-tune/index.js';
272
272
  export * from './pipeline/load-balancing/index.js';
273
273
  export { deriveRootFaceRefineRect, ROOT_FACE_REFINE_INPUT_PX, ROOT_FACE_REFINE_SCALE, } from './pipeline/root-face-crop.js';
274
274
  export { DEFAULT_DETAIL_CROP_CONVENTION, DETAIL_CROP_PADDING_FIELD, DETAIL_CROP_PADDING_KEY, DETAIL_CROP_SECTION_ID, DETAIL_CROP_SQUARE_KEY, type DetailCropConvention, DetailCropConventionSchema, type DetailCropRect, deriveDetailCropRect, FULL_IMAGE_BBOX, type HydratedSettingsSection, type HydratedSettingsView, pickDetailCropConvention, readDetailCropConvention, } from './pipeline/detail-crop.js';