@camstack/types 1.2.318 → 1.2.320

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 (31) hide show
  1. package/dist/addon.js +13 -4
  2. package/dist/addon.mjs +13 -4
  3. package/dist/capabilities/pipeline-executor.cap.d.ts +1 -1
  4. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +133 -79
  5. package/dist/client.js +5 -2
  6. package/dist/client.mjs +5 -2
  7. package/dist/generated/addon-api.d.ts +27 -6
  8. package/dist/generated/device-proxy.d.ts +1 -1
  9. package/dist/generated/method-access-map.d.ts +1 -1
  10. package/dist/generated/method-device-selectors.d.ts +2 -2
  11. package/dist/generated/system-proxy.d.ts +1 -1
  12. package/dist/index.d.ts +2 -1
  13. package/dist/index.js +734 -346
  14. package/dist/index.mjs +697 -335
  15. package/dist/pipeline/{best-settings → auto-tune}/hardware-class.d.ts +1 -1
  16. package/dist/pipeline/auto-tune/index.d.ts +9 -0
  17. package/dist/pipeline/{best-settings → auto-tune}/plan-schemas.d.ts +74 -166
  18. package/dist/pipeline/{best-settings → auto-tune}/recommend.d.ts +23 -13
  19. package/dist/pipeline/load-balancing/capacity-shares.d.ts +37 -0
  20. package/dist/pipeline/load-balancing/effective-shares.d.ts +33 -0
  21. package/dist/pipeline/load-balancing/index.d.ts +5 -2
  22. package/dist/pipeline/load-balancing/schemas.d.ts +157 -2
  23. package/dist/pipeline/model-bound-settings.d.ts +1 -1
  24. package/dist/pipeline/step-settings-layers.d.ts +69 -0
  25. package/dist/{sleep-DyF95STh.js → sleep-AalHiRYL.js} +1 -0
  26. package/dist/{sleep-C16NCZR2.mjs → sleep-DAJ9Er57.mjs} +1 -0
  27. package/dist/types/agent-pipeline-settings.d.ts +11 -0
  28. package/package.json +1 -1
  29. package/dist/pipeline/best-settings/demand.d.ts +0 -75
  30. package/dist/pipeline/best-settings/index.d.ts +0 -10
  31. /package/dist/pipeline/{best-settings → auto-tune}/detector-performance.d.ts +0 -0
@@ -17,10 +17,14 @@ export declare const SessionPlacementPolicySchema: z.ZodEnum<{
17
17
  share: "share";
18
18
  }>;
19
19
  export type SessionPlacementPolicy = z.infer<typeof SessionPlacementPolicySchema>;
20
+ /**
21
+ * `share` since D750: the percentages are held by default. `least-loaded` stays
22
+ * selectable.
23
+ */
20
24
  export declare const DEFAULT_SESSION_PLACEMENT_POLICY: SessionPlacementPolicy;
21
25
  /** The global-settings key the policy is stored under (orchestrator `load` section). */
22
26
  export declare const SESSION_PLACEMENT_SETTING_KEY = "sessionPlacement";
23
- /** Parse a stored value; anything unknown is the default (nothing changes on deploy). */
27
+ /** Parse a stored value; anything unknown is the default. */
24
28
  export declare function parseSessionPlacementPolicy(value: unknown): SessionPlacementPolicy;
25
29
  export declare const LoadBalancingSharesInputSchema: z.ZodObject<{
26
30
  nodes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
@@ -96,8 +100,30 @@ export declare const PlacementStatsSchema: z.ZodObject<{
96
100
  }, z.core.$strip>>>;
97
101
  }, z.core.$strip>;
98
102
  export type PlacementStats = z.infer<typeof PlacementStatsSchema>;
103
+ /**
104
+ * Where an automatic share's capacity comes from (D755).
105
+ * - `hardware` — the static capacity of each device at its Auto tune model:
106
+ * the measured latency table for the node's hardware class.
107
+ * - `benchmark` — the node's own measured capacity (node benchmark results).
108
+ * A node with no results falls back to `hardware`, and says so.
109
+ */
110
+ export declare const CapacitySourceSchema: z.ZodEnum<{
111
+ hardware: "hardware";
112
+ benchmark: "benchmark";
113
+ }>;
114
+ export type CapacitySource = z.infer<typeof CapacitySourceSchema>;
115
+ /** Why a node under the `benchmark` source was sized from hardware instead. */
116
+ export declare const CapacityFallbackSchema: z.ZodEnum<{
117
+ "no-benchmark-results": "no-benchmark-results";
118
+ "partial-benchmark-results": "partial-benchmark-results";
119
+ }>;
120
+ export type CapacityFallback = z.infer<typeof CapacityFallbackSchema>;
99
121
  export declare const SuggestSharesInputSchema: z.ZodObject<{
100
122
  headroom: z.ZodDefault<z.ZodNumber>;
123
+ source: z.ZodDefault<z.ZodEnum<{
124
+ hardware: "hardware";
125
+ benchmark: "benchmark";
126
+ }>>;
101
127
  }, z.core.$strip>;
102
128
  export type SuggestSharesInput = z.infer<typeof SuggestSharesInputSchema>;
103
129
  export declare const SuggestedDeviceShareSchema: z.ZodObject<{
@@ -122,12 +148,24 @@ export declare const SuggestedNodeShareSchema: z.ZodObject<{
122
148
  suggestedMaxSessions: z.ZodNullable<z.ZodNumber>;
123
149
  }, z.core.$strip>>>;
124
150
  skippedReason: z.ZodNullable<z.ZodString>;
151
+ capacitySource: z.ZodNullable<z.ZodEnum<{
152
+ hardware: "hardware";
153
+ benchmark: "benchmark";
154
+ }>>;
155
+ capacityFallback: z.ZodNullable<z.ZodEnum<{
156
+ "no-benchmark-results": "no-benchmark-results";
157
+ "partial-benchmark-results": "partial-benchmark-results";
158
+ }>>;
125
159
  }, z.core.$strip>;
126
160
  export type SuggestedNodeShare = z.infer<typeof SuggestedNodeShareSchema>;
127
161
  export declare const SuggestSharesResultSchema: z.ZodObject<{
128
162
  headroom: z.ZodNumber;
163
+ source: z.ZodEnum<{
164
+ hardware: "hardware";
165
+ benchmark: "benchmark";
166
+ }>;
129
167
  cameraFps: z.ZodNumber;
130
- iterations: z.ZodNumber;
168
+ minSessionsPerDevice: z.ZodNumber;
131
169
  nodes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
132
170
  nodeId: z.ZodString;
133
171
  share: z.ZodNullable<z.ZodNumber>;
@@ -141,6 +179,123 @@ export declare const SuggestSharesResultSchema: z.ZodObject<{
141
179
  suggestedMaxSessions: z.ZodNullable<z.ZodNumber>;
142
180
  }, z.core.$strip>>>;
143
181
  skippedReason: z.ZodNullable<z.ZodString>;
182
+ capacitySource: z.ZodNullable<z.ZodEnum<{
183
+ hardware: "hardware";
184
+ benchmark: "benchmark";
185
+ }>>;
186
+ capacityFallback: z.ZodNullable<z.ZodEnum<{
187
+ "no-benchmark-results": "no-benchmark-results";
188
+ "partial-benchmark-results": "partial-benchmark-results";
189
+ }>>;
144
190
  }, z.core.$strip>>>;
145
191
  }, z.core.$strip>;
146
192
  export type SuggestSharesResult = z.infer<typeof SuggestSharesResultSchema>;
193
+ /**
194
+ * Where the node and device shares come from (D750, D755).
195
+ * - `hardware` (default) — computed by the system from each node's static
196
+ * capacity (its accelerators at their Auto tune models, from the measured
197
+ * latency table), recomputed whenever a node or device joins, leaves, is
198
+ * switched on or off, or changes model. No load input.
199
+ * - `benchmark` — the same, from each node's measured capacity (node
200
+ * benchmark results); a node without results falls back to `hardware`.
201
+ * - `manual` — the operator's stored sliders.
202
+ * Either way a node or device that cannot take sessions gives its share to
203
+ * the others in proportion; the stored values are never rewritten for that.
204
+ */
205
+ export declare const ShareSourceSchema: z.ZodEnum<{
206
+ manual: "manual";
207
+ hardware: "hardware";
208
+ benchmark: "benchmark";
209
+ }>;
210
+ export type ShareSource = z.infer<typeof ShareSourceSchema>;
211
+ export declare const DEFAULT_SHARE_SOURCE: ShareSource;
212
+ /** `hardware` or `benchmark`: the system computes the shares. */
213
+ export declare function isAutomaticShareSource(source: ShareSource): source is Exclude<ShareSource, 'manual'>;
214
+ /** Headroom the automatic shares are computed at (Auto tune's default). */
215
+ export declare const AUTO_SHARE_HEADROOM = 0.4;
216
+ /** The global-settings key the share source is stored under (orchestrator `load` section). */
217
+ export declare const SHARE_SOURCE_SETTING_KEY = "shareSource";
218
+ /**
219
+ * Parse a stored value; anything unknown is the default. `auto` (D750, before
220
+ * D755 split it) reads as `hardware` — that is what it computed.
221
+ */
222
+ export declare function parseShareSource(value: unknown): ShareSource;
223
+ export declare const SetShareSourceInputSchema: z.ZodObject<{
224
+ source: z.ZodEnum<{
225
+ manual: "manual";
226
+ hardware: "hardware";
227
+ benchmark: "benchmark";
228
+ }>;
229
+ }, z.core.$strip>;
230
+ export type SetShareSourceInput = z.infer<typeof SetShareSourceInputSchema>;
231
+ /** Raw relative weights (any scale) per node and per node's device. */
232
+ export declare const ShareWeightsSchema: z.ZodObject<{
233
+ nodes: z.ZodRecord<z.ZodString, z.ZodNumber>;
234
+ devices: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
235
+ }, z.core.$strip>;
236
+ export type ShareWeights = z.infer<typeof ShareWeightsSchema>;
237
+ export declare const EffectiveDeviceShareSchema: z.ZodObject<{
238
+ deviceKey: z.ZodString;
239
+ eligible: z.ZodBoolean;
240
+ configuredPct: z.ZodNumber;
241
+ effectivePct: z.ZodNumber;
242
+ }, z.core.$strip>;
243
+ export type EffectiveDeviceShare = z.infer<typeof EffectiveDeviceShareSchema>;
244
+ export declare const EffectiveNodeShareSchema: z.ZodObject<{
245
+ nodeId: z.ZodString;
246
+ eligible: z.ZodBoolean;
247
+ configuredPct: z.ZodNumber;
248
+ effectivePct: z.ZodNumber;
249
+ capacitySource: z.ZodNullable<z.ZodEnum<{
250
+ hardware: "hardware";
251
+ benchmark: "benchmark";
252
+ }>>;
253
+ capacityFallback: z.ZodNullable<z.ZodEnum<{
254
+ "no-benchmark-results": "no-benchmark-results";
255
+ "partial-benchmark-results": "partial-benchmark-results";
256
+ }>>;
257
+ devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
258
+ deviceKey: z.ZodString;
259
+ eligible: z.ZodBoolean;
260
+ configuredPct: z.ZodNumber;
261
+ effectivePct: z.ZodNumber;
262
+ }, z.core.$strip>>>;
263
+ }, z.core.$strip>;
264
+ export type EffectiveNodeShare = z.infer<typeof EffectiveNodeShareSchema>;
265
+ export declare const EffectiveSharesSchema: z.ZodObject<{
266
+ source: z.ZodEnum<{
267
+ manual: "manual";
268
+ hardware: "hardware";
269
+ benchmark: "benchmark";
270
+ }>;
271
+ policy: z.ZodEnum<{
272
+ "least-loaded": "least-loaded";
273
+ share: "share";
274
+ }>;
275
+ autoPending: z.ZodBoolean;
276
+ computedAt: z.ZodNullable<z.ZodNumber>;
277
+ trigger: z.ZodNullable<z.ZodString>;
278
+ nodes: z.ZodReadonly<z.ZodArray<z.ZodObject<{
279
+ nodeId: z.ZodString;
280
+ eligible: z.ZodBoolean;
281
+ configuredPct: z.ZodNumber;
282
+ effectivePct: z.ZodNumber;
283
+ capacitySource: z.ZodNullable<z.ZodEnum<{
284
+ hardware: "hardware";
285
+ benchmark: "benchmark";
286
+ }>>;
287
+ capacityFallback: z.ZodNullable<z.ZodEnum<{
288
+ "no-benchmark-results": "no-benchmark-results";
289
+ "partial-benchmark-results": "partial-benchmark-results";
290
+ }>>;
291
+ devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
292
+ deviceKey: z.ZodString;
293
+ eligible: z.ZodBoolean;
294
+ configuredPct: z.ZodNumber;
295
+ effectivePct: z.ZodNumber;
296
+ }, z.core.$strip>>>;
297
+ }, z.core.$strip>>>;
298
+ nodeWeights: z.ZodRecord<z.ZodString, z.ZodNumber>;
299
+ deviceWeights: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
300
+ }, z.core.$strip>;
301
+ export type EffectiveShares = z.infer<typeof EffectiveSharesSchema>;
@@ -84,6 +84,6 @@ export declare function clearModelBoundOverrides(settings: ModelBoundSettingsBag
84
84
  /**
85
85
  * The keys of every `bindsToModel` field of a step's config schema, groups
86
86
  * flattened (D738). One definition for the runner (which applies the binding)
87
- * and the orchestrator's Best settings (which clears those overrides, D745).
87
+ * and the orchestrator's Auto tune (which clears those overrides, D745).
88
88
  */
89
89
  export declare function collectModelBoundKeys(fields: readonly ConfigField[]): string[];
@@ -0,0 +1,69 @@
1
+ /**
2
+ * The layers of a detection step's settings, and the field-level edits on them
3
+ * (D754).
4
+ *
5
+ * A step's settings reach a session through up to three stored layers, merged
6
+ * key by key — a key in a higher layer wins:
7
+ *
8
+ * node the node's folded base (`inferenceDevices[node][*].steps`)
9
+ * camera `cameraSettings[cam].stepSettings[step]` — every accelerator
10
+ * accelerator `cameraSettings[cam].stepOverridesByDevice[node][key][step].settings`
11
+ *
12
+ * Below them sits the default: the running model's (D738) or the field's own.
13
+ *
14
+ * Every layer is SPARSE and FIELD-LEVEL. A key present in a layer is an
15
+ * override; an absent key inherits. Two consequences that every editor must
16
+ * respect, and why this module exists:
17
+ *
18
+ * - A model-bound field (D738) occupies TWO keys, its value and
19
+ * `<key>ModelId`. They are written, compared and removed as one unit — a
20
+ * value without its binding over a lower layer's binding would be judged
21
+ * against the wrong model.
22
+ * - An editor writes a DIFF against the merged layers below, never a copy of
23
+ * them. A copy pins every field at the value it had that day, so later
24
+ * edits below never reach it (the full-copy "Override" this replaced).
25
+ */
26
+ /** One stored settings layer. */
27
+ export type StepSettingsBag = Readonly<Record<string, unknown>>;
28
+ /** The stored layers, from the top. `undefined` = the layer stores nothing for this step. */
29
+ export interface StepSettingsLayers {
30
+ readonly accelerator?: StepSettingsBag;
31
+ readonly camera?: StepSettingsBag;
32
+ readonly node?: StepSettingsBag;
33
+ }
34
+ /** Which stored layer supplies a field, or `default` when none does. */
35
+ export type StepSettingSource = 'accelerator' | 'camera' | 'node' | 'default';
36
+ /**
37
+ * The keys one field occupies in a bag: its own, plus its binding key when it
38
+ * binds to a model. `boundKeys` = `collectModelBoundKeys(schema)`.
39
+ */
40
+ export declare function fieldUnitKeys(key: string, boundKeys: readonly string[]): readonly string[];
41
+ /** Structural equality for stored values (numbers, strings, booleans, arrays, plain objects). */
42
+ export declare function settingValuesEqual(a: unknown, b: unknown): boolean;
43
+ /** Merge bags bottom-up (later wins, per key). Fresh object. */
44
+ export declare function mergeSettingsBags(...bags: readonly (StepSettingsBag | undefined)[]): Record<string, unknown>;
45
+ /** The merged value of the layers BELOW `layer` (what removing a key from `layer` falls back to). */
46
+ export declare function settingsBelow(layers: StepSettingsLayers, layer: Exclude<StepSettingSource, 'default'>): Record<string, unknown>;
47
+ /** The effective bag: every stored layer merged. */
48
+ export declare function effectiveStepSettings(layers: StepSettingsLayers): Record<string, unknown>;
49
+ /** The highest stored layer that holds any key of `key`'s unit, or `default`. */
50
+ export declare function stepSettingSource(layers: StepSettingsLayers, key: string, boundKeys: readonly string[]): StepSettingSource;
51
+ /**
52
+ * `layer` with `key`'s unit set from `values` (a bag carrying the unit's new
53
+ * value — e.g. the editor's whole next settings bag). A unit key that `values`
54
+ * does not carry is removed from the layer. Fresh object.
55
+ */
56
+ export declare function withFieldFrom(layer: StepSettingsBag | undefined, key: string, values: StepSettingsBag, boundKeys: readonly string[]): Record<string, unknown>;
57
+ /** `layer` without `key`'s unit — "reset to the next level". Fresh object. */
58
+ export declare function withoutField(layer: StepSettingsBag | undefined, key: string, boundKeys: readonly string[]): Record<string, unknown>;
59
+ /**
60
+ * `layer` reduced to the fields that DIFFER from `below` — what an editor
61
+ * stores. A unit is kept or dropped whole. `undefined` when nothing is left.
62
+ */
63
+ export declare function diffStepSettings(layer: StepSettingsBag | undefined, below: StepSettingsBag, boundKeys: readonly string[]): Record<string, unknown> | undefined;
64
+ /**
65
+ * The fields `layer` stores at exactly the value of the layers below — a
66
+ * legacy full copy's leftovers. They change nothing today and stop every
67
+ * later edit below from reaching this layer. Sorted.
68
+ */
69
+ export declare function fieldsPinnedAtValueBelow(layer: StepSettingsBag | undefined, below: StepSettingsBag, boundKeys: readonly string[]): readonly string[];
@@ -3757,6 +3757,7 @@ function createDeviceProxy(api, binding, opts) {
3757
3757
  setCameraStepToggle: (input) => dispatchSystem("pipelineOrchestrator", "setCameraStepToggle", "mutation", input),
3758
3758
  getCameraStepOverrides: (input) => dispatchSystem("pipelineOrchestrator", "getCameraStepOverrides", "query", input),
3759
3759
  setCameraStepOverride: (input) => dispatchSystem("pipelineOrchestrator", "setCameraStepOverride", "mutation", input),
3760
+ setCameraStepSettings: (input) => dispatchSystem("pipelineOrchestrator", "setCameraStepSettings", "mutation", input),
3760
3761
  setCameraPipelineForAgent: (input) => dispatchSystem("pipelineOrchestrator", "setCameraPipelineForAgent", "mutation", input),
3761
3762
  resolvePipeline: (input) => dispatchSystem("pipelineOrchestrator", "resolvePipeline", "query", input),
3762
3763
  getCameraSwitches: (input) => dispatchSystem("pipelineOrchestrator", "getCameraSwitches", "query", input),
@@ -3757,6 +3757,7 @@ function createDeviceProxy(api, binding, opts) {
3757
3757
  setCameraStepToggle: (input) => dispatchSystem("pipelineOrchestrator", "setCameraStepToggle", "mutation", input),
3758
3758
  getCameraStepOverrides: (input) => dispatchSystem("pipelineOrchestrator", "getCameraStepOverrides", "query", input),
3759
3759
  setCameraStepOverride: (input) => dispatchSystem("pipelineOrchestrator", "setCameraStepOverride", "mutation", input),
3760
+ setCameraStepSettings: (input) => dispatchSystem("pipelineOrchestrator", "setCameraStepSettings", "mutation", input),
3760
3761
  setCameraPipelineForAgent: (input) => dispatchSystem("pipelineOrchestrator", "setCameraPipelineForAgent", "mutation", input),
3761
3762
  resolvePipeline: (input) => dispatchSystem("pipelineOrchestrator", "resolvePipeline", "query", input),
3762
3763
  getCameraSwitches: (input) => dispatchSystem("pipelineOrchestrator", "getCameraSwitches", "query", input),
@@ -158,6 +158,17 @@ export interface AgentPipelineSettings {
158
158
  */
159
159
  export interface CameraPipelineSettings {
160
160
  readonly stepToggles?: Readonly<Record<string, boolean>>;
161
+ /**
162
+ * Camera-wide step SETTINGS (D754): `[addonId] → { fieldKey → value }`, the
163
+ * fields this camera overrides on EVERY accelerator it is balanced onto. A
164
+ * sparse, field-level bag — a key present here is an override, an absent key
165
+ * inherits the node. Merge order at dispatch, per key:
166
+ * node (folded base) ⊕ this ⊕ `stepOverridesByDevice[node][deviceKey]`.
167
+ * A model-bound field (D738) is always written with its binding key.
168
+ * Settings only: a model is a per-accelerator question (formats differ), so
169
+ * it stays in `stepOverridesByDevice`.
170
+ */
171
+ readonly stepSettings?: Readonly<Record<string, Readonly<Record<string, unknown>>>>;
161
172
  /**
162
173
  * Per-(camera,node,device) model/settings override. Addressed by
163
174
  * `[agentNodeId][deviceKey][addonId]` because the camera is balanced onto
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.318",
3
+ "version": "1.2.320",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",
@@ -1,75 +0,0 @@
1
- import type { DeviceDemand } from './plan-schemas.js';
2
- /** How a camera's detection runs. `disabled` cameras charge nothing. */
3
- export type BestSettingsDetectionMode = 'always-on' | 'on-motion' | 'disabled';
4
- /** One camera's detection load. */
5
- export interface BestSettingsCameraLoad {
6
- readonly deviceId: number;
7
- readonly mode: BestSettingsDetectionMode;
8
- /** Detection frames per second while a session runs. */
9
- readonly fps: number;
10
- /** False when only the camera's own (onboard) detector runs — no pipeline root. */
11
- readonly runsPipelineRoot: boolean;
12
- /** The node an always-on camera stands on; null when not placed (on-motion). */
13
- readonly standingNodeId: string | null;
14
- /** The operator's node pin (`pipelineNodeId`), or null. */
15
- readonly nodePinId: string | null;
16
- /**
17
- * An operator pin of this camera to one device. `nodeId` null = the pin
18
- * names only a deviceKey (no node pin, no standing node): it resolves to the
19
- * one node that has that key, or is ignored when several or none do.
20
- */
21
- readonly devicePin: {
22
- readonly nodeId: string | null;
23
- readonly deviceKey: string;
24
- } | null;
25
- }
26
- /** The cluster-wide peak of parallel sessions (sum over every device at one census). */
27
- export interface ObservedClusterPeak {
28
- readonly peakSessions: number;
29
- readonly observedForMs: number;
30
- }
31
- /** Share placement input: node shares and the cluster-wide peak. */
32
- export interface DemandShares {
33
- /** nodeId → share (any scale). Device shares are the eligible devices' weights. */
34
- readonly nodes: Readonly<Record<string, number>>;
35
- readonly clusterPeak: ObservedClusterPeak | null;
36
- }
37
- /** A device the balancer may place a session on. */
38
- export interface BestSettingsEligibleDevice {
39
- readonly nodeId: string;
40
- readonly deviceKey: string;
41
- readonly weight: number;
42
- }
43
- /** The observed peak of concurrent sessions on one device. */
44
- export interface ObservedDevicePeak {
45
- readonly nodeId: string;
46
- /** `''` = the node's sessions as a whole (a single-device node reports no per-device rows). */
47
- readonly deviceKey: string;
48
- /** Most sessions attached at once in the window. */
49
- readonly peakSessions: number;
50
- /** How long the device has been observed (ms) — the window is complete at 24 h. */
51
- readonly observedForMs: number;
52
- }
53
- /** The on-motion load model's knobs. */
54
- export interface DemandOptions {
55
- /** Share of on-motion cameras assumed concurrent when there is no full observation. */
56
- readonly onMotionConcurrency: number;
57
- /** Minimum concurrent on-motion sessions assumed (capped at the camera count). */
58
- readonly onMotionMinConcurrent: number;
59
- }
60
- export declare const DEFAULT_DEMAND_OPTIONS: DemandOptions;
61
- /** A full observation window. */
62
- export declare const OBSERVATION_WINDOW_MS: number;
63
- /** Concurrent on-motion sessions assumed cluster-wide without an observation. */
64
- export declare function estimatedConcurrentSessions(cameraCount: number, options: DemandOptions): number;
65
- /**
66
- * Demand on every eligible device of the cluster.
67
- */
68
- export declare function estimateDeviceDemand(input: {
69
- readonly cameras: readonly BestSettingsCameraLoad[];
70
- readonly eligible: readonly BestSettingsEligibleDevice[];
71
- readonly peaks: readonly ObservedDevicePeak[];
72
- readonly options?: DemandOptions;
73
- /** Present ⇒ share placement (D748); absent ⇒ least-loaded. */
74
- readonly shares?: DemandShares;
75
- }): readonly DeviceDemand[];
@@ -1,10 +0,0 @@
1
- /**
2
- * Best settings (D745): the static-hardware × measured-latency × demand
3
- * recommender of ONE detector family for the whole cluster, and the shapes of
4
- * its plan. See `recommend.ts`.
5
- */
6
- export * from './hardware-class.js';
7
- export * from './detector-performance.js';
8
- export * from './demand.js';
9
- export * from './recommend.js';
10
- export * from './plan-schemas.js';