@camstack/types 1.2.404 → 1.2.406

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 (58) hide show
  1. package/dist/addon.js +21 -2
  2. package/dist/addon.mjs +21 -2
  3. package/dist/capabilities/index.d.ts +6 -3
  4. package/dist/capabilities/notification-rules.cap.d.ts +3 -78
  5. package/dist/capabilities/osd-manager.cap.d.ts +0 -18
  6. package/dist/capabilities/pipeline-analytics.cap.d.ts +24 -0
  7. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +36 -0
  8. package/dist/capabilities/platform-probe.cap.d.ts +34 -0
  9. package/dist/capabilities/running-state.cap.d.ts +76 -0
  10. package/dist/capabilities/schemas/package-llm-verdict.d.ts +14 -0
  11. package/dist/capabilities/schemas/zone-rule.d.ts +4 -0
  12. package/dist/capabilities/zone-rules.cap.d.ts +10 -0
  13. package/dist/client.js +10 -62
  14. package/dist/client.mjs +10 -62
  15. package/dist/{composition-eoYYVfOp.js → composition-RmnnN39T.js} +86 -2
  16. package/dist/{composition-CB6PMT9p.mjs → composition-xz-ud5EQ.mjs} +86 -2
  17. package/dist/device/cap-vocabulary/entries/appliances.d.ts +1 -1
  18. package/dist/enums/event-category.d.ts +4 -0
  19. package/dist/enums.js +1 -1
  20. package/dist/enums.mjs +1 -1
  21. package/dist/{event-category-fDPduoeC.mjs → event-category-Ceif8n-v.mjs} +4 -0
  22. package/dist/{event-category-CXrwjC3e.js → event-category-DG6Vir8Z.js} +4 -0
  23. package/dist/expression/builtins.d.ts +7 -18
  24. package/dist/expression/expression-source.d.ts +14 -2
  25. package/dist/generated/addon-api.d.ts +14 -0
  26. package/dist/generated/addon-cap-facts.d.ts +1 -1
  27. package/dist/generated/cap-status-types.d.ts +3 -1
  28. package/dist/generated/capability-router-map.d.ts +5 -2
  29. package/dist/generated/device-local-state.d.ts +3 -0
  30. package/dist/generated/device-proxy.d.ts +3 -0
  31. package/dist/generated/device-scoped-caps.d.ts +1 -1
  32. package/dist/generated/history-catalog.d.ts +1 -1
  33. package/dist/generated/method-access-map.d.ts +1 -1
  34. package/dist/generated/method-device-selectors.d.ts +1 -1
  35. package/dist/generated/runtime-state-durability.d.ts +1 -1
  36. package/dist/index.d.ts +4 -0
  37. package/dist/index.js +2534 -1415
  38. package/dist/index.mjs +2471 -1415
  39. package/dist/interfaces/config-ui.d.ts +69 -2
  40. package/dist/interfaces/platform.d.ts +7 -0
  41. package/dist/node-color.d.ts +1 -1
  42. package/dist/node.js +1 -1
  43. package/dist/node.mjs +1 -1
  44. package/dist/pipeline/auto-tune/accelerator-compute.d.ts +116 -0
  45. package/dist/pipeline/auto-tune/detector-performance.d.ts +5 -0
  46. package/dist/pipeline/auto-tune/hardware-class.d.ts +5 -4
  47. package/dist/pipeline/auto-tune/index.d.ts +1 -0
  48. package/dist/pipeline/auto-tune/plan-schemas.d.ts +100 -0
  49. package/dist/pipeline/auto-tune/recommend.d.ts +31 -9
  50. package/dist/pipeline/second-pass/index.d.ts +2 -0
  51. package/dist/pipeline/second-pass/motion-crop-plan.d.ts +183 -0
  52. package/dist/pipeline/second-pass/small-subject-recovery.d.ts +216 -0
  53. package/dist/running-state/assignment.d.ts +34 -0
  54. package/dist/running-state/defaults.d.ts +3 -0
  55. package/dist/running-state/from-operation.d.ts +14 -0
  56. package/dist/{sleep-CHIEEJkY.mjs → sleep-CYfIZzGv.mjs} +7 -3
  57. package/dist/{sleep-BKS4OPMo.js → sleep-UP964hNP.js} +7 -3
  58. package/package.json +1 -1
@@ -86,7 +86,7 @@ export interface ConfigSection {
86
86
  readonly immediate?: boolean;
87
87
  readonly fields: readonly ConfigField[];
88
88
  }
89
- export type ConfigField = ConfigTextField | ConfigNumberField | ConfigBooleanField | ConfigSelectField | ConfigMultiSelectField | ConfigTimezoneField | ConfigDateTimeField | ConfigColorField | ConfigIconField | ConfigPasswordField | ConfigTextAreaField | ConfigSliderField | ConfigTagsField | ConfigScheduleField | ConfigGroupField | ConfigSubTabsField | ConfigSeparatorField | ConfigInfoField | ConfigQrCodeField | ConfigObjectArrayField | ConfigEditableArrayField | ConfigModelSelectorField | ConfigStorageLocationField | ConfigProbeField | ConfigButtonField | ConfigNodeSelectField | ConfigNodeMultiSelectField | ConfigDeviceSelectField | ConfigDeviceMultiSelectField | ConfigNotificationTargetSelectField | ConfigNotificationTargetMultiSelectField | ConfigWidgetField | ConfigAddonActionSelectField | ConfigAddonActionButtonField | ConfigDeviceActionButtonField;
89
+ export type ConfigField = ConfigTextField | ConfigNumberField | ConfigBooleanField | ConfigSelectField | ConfigMultiSelectField | ConfigTimezoneField | ConfigDateTimeField | ConfigColorField | ConfigIconField | ConfigPasswordField | ConfigTextAreaField | ConfigSliderField | ConfigTagsField | ConfigScheduleField | ConfigGroupField | ConfigSubTabsField | ConfigSeparatorField | ConfigInfoField | ConfigQrCodeField | ConfigObjectArrayField | ConfigEditableArrayField | ConfigModelSelectorField | ConfigStorageLocationField | ConfigProbeField | ConfigButtonField | ConfigNodeSelectField | ConfigNodeMultiSelectField | ConfigDeviceSelectField | ConfigDeviceMultiSelectField | ConfigNotificationTargetSelectField | ConfigNotificationTargetMultiSelectField | ConfigWidgetField | ConfigAddonActionSelectField | ConfigAddonActionButtonField | ConfigDeviceActionButtonField | ConfigAccountSignInField | ConfigSecretPresenceField;
90
90
  /**
91
91
  * Per-MODEL applicability of a pipeline-step setting (D214).
92
92
  *
@@ -903,6 +903,18 @@ export interface ConfigAddonActionSelectField extends ConfigFieldBase {
903
903
  emptyParamsMessage?: string;
904
904
  /** Optional message shown when the action returns no results. */
905
905
  emptyResultsMessage?: string;
906
+ /**
907
+ * When the action returns fewer than this many rows, render nothing.
908
+ * A single row is written into `writesKey`, or into this field's key.
909
+ * The manual fallback next to it stays the control the operator sees.
910
+ */
911
+ hideWhenFewerThan?: number;
912
+ /**
913
+ * Settings key the chosen value is written to when it is not this field's
914
+ * key. Use it so a discovery select and a manual text field do not share
915
+ * one React key.
916
+ */
917
+ writesKey?: string;
906
918
  }
907
919
  /**
908
920
  * Button that invokes an addon customAction. Used for "Verify token /
@@ -957,6 +969,61 @@ export interface ConfigAddonActionButtonField extends ConfigFieldBase {
957
969
  /** Confirmation prompt before executing. */
958
970
  confirmMessage?: string;
959
971
  }
972
+ /**
973
+ * "Sign in with <provider>". The button asks the addon for an authorize URL.
974
+ * PKCE verifier and state stay on the addon, keyed by `attemptId`. One paste
975
+ * box completes the sign-in. Tokens are written into secret fields and are
976
+ * not rendered here.
977
+ */
978
+ export interface ConfigAccountSignInField extends ConfigFieldBase {
979
+ readonly type: 'account-sign-in';
980
+ /** The paste box is local. Stored keys are the sibling fields. */
981
+ readonly value?: undefined;
982
+ readonly addonId: string;
983
+ /** "Sign in with {providerLabel}". */
984
+ readonly providerLabel: string;
985
+ readonly beginAction: string;
986
+ readonly completeAction: string;
987
+ readonly signOutAction: string;
988
+ /** Non-secret settings key holding the account label. */
989
+ readonly accountKey: string;
990
+ /** Optional numeric settings key shown after the account. */
991
+ readonly countKey?: string;
992
+ /** Singular noun for `countKey` ("gateway" → "gateways"). */
993
+ readonly countNoun?: string;
994
+ /**
995
+ * Settings key holding an array or a JSON array string whose length is the
996
+ * count when `countKey` is empty.
997
+ */
998
+ readonly countFromKey?: string;
999
+ /** Placeholder for the paste box. */
1000
+ readonly pastePlaceholder?: string;
1001
+ /**
1002
+ * Shown when the complete action returns more than one `choices` row.
1003
+ * Picking one writes `choiceKey` plus `brand` and `region` when the row has them.
1004
+ */
1005
+ readonly choiceKey?: string;
1006
+ readonly choiceLabel?: string;
1007
+ /** Secret settings keys cleared with the keychain clear instruction on sign-out. */
1008
+ readonly secretKeys: readonly string[];
1009
+ /**
1010
+ * Copy these result keys into the form after a successful paste.
1011
+ * Secret values are stored for save and rendered only by their own fields.
1012
+ */
1013
+ readonly assignResult?: Readonly<Record<string, string>>;
1014
+ }
1015
+ /**
1016
+ * "yes" / "no" for a secret that must not be shown. Reads another field's
1017
+ * value: a non-empty string or a keychain view counts as present.
1018
+ */
1019
+ export interface ConfigSecretPresenceField extends ConfigFieldBase {
1020
+ readonly type: 'secret-presence';
1021
+ /** Reads another field. This row stores nothing. */
1022
+ readonly value?: undefined;
1023
+ readonly sourceKey: string;
1024
+ readonly yesLabel: string;
1025
+ readonly noLabel: string;
1026
+ }
960
1027
  /**
961
1028
  * Button that invokes a DEVICE custom action (the device equivalent of
962
1029
  * `addon-action-button`). The deviceId comes from the form context, so it is
@@ -1052,7 +1119,7 @@ export type ConfigFieldWithValue = (ConfigTextField & {
1052
1119
  readonly value: unknown;
1053
1120
  }) | ConfigWidgetField | (ConfigAddonActionSelectField & {
1054
1121
  readonly value: unknown;
1055
- }) | ConfigAddonActionButtonField | ConfigDeviceActionButtonField;
1122
+ }) | ConfigAddonActionButtonField | ConfigDeviceActionButtonField | ConfigAccountSignInField | ConfigSecretPresenceField;
1056
1123
  /** Recursive version of `ConfigGroupField` with hydrated child fields. */
1057
1124
  export interface ConfigGroupFieldWithValue extends ConfigFieldBase {
1058
1125
  readonly type: 'group';
@@ -1,4 +1,5 @@
1
1
  import type { InferenceDeviceDescriptor } from '../inference/runtime-capabilities.js';
2
+ import type { AcceleratorCompute } from '../pipeline/auto-tune/accelerator-compute.js';
2
3
  /** Hardware information detected at boot */
3
4
  export interface HardwareInfo {
4
5
  readonly platform: 'darwin' | 'linux' | 'win32';
@@ -9,6 +10,12 @@ export interface HardwareInfo {
9
10
  readonly availableRAM_MB: number;
10
11
  readonly gpu: GpuInfo | null;
11
12
  readonly npu: NpuInfo | null;
13
+ /**
14
+ * Per-accelerator compute the probe reported (D930). Absent when the probe
15
+ * did not run; an empty list means it ran and found no accelerator. A
16
+ * failed field inside an entry is null, never 0.
17
+ */
18
+ readonly accelerators?: readonly AcceleratorCompute[];
12
19
  /**
13
20
  * Coral Edge TPU hardware (USB and/or PCIe), when found. Optional so existing
14
21
  * HardwareInfo construction sites and older cross-node probe reports stay
@@ -1,7 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  /** Fixed cluster node palette ids (maps to `--color-node-*` theme tokens). */
3
3
  export declare const NODE_COLOR_IDS: readonly ['node-a', 'node-b', 'node-c', 'node-d', 'node-e', 'node-f', 'node-g', 'node-h'];
4
- export type NodeColorId = (typeof NODE_COLOR_IDS)[number];
5
4
  export declare const NodeColorIdSchema: z.ZodEnum<{
6
5
  "node-a": "node-a";
7
6
  "node-b": "node-b";
@@ -12,4 +11,5 @@ export declare const NodeColorIdSchema: z.ZodEnum<{
12
11
  "node-g": "node-g";
13
12
  "node-h": "node-h";
14
13
  }>;
14
+ export type NodeColorId = z.infer<typeof NodeColorIdSchema>;
15
15
  export declare function assignNodeColorId(nodeId: string): NodeColorId;
package/dist/node.js CHANGED
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  enumerable: true
22
22
  }) : target, mod));
23
23
  //#endregion
24
- const require_composition = require("./composition-eoYYVfOp.js");
24
+ const require_composition = require("./composition-RmnnN39T.js");
25
25
  const require_err_msg = require("./err-msg-BhVbr0NX.js");
26
26
  let node_crypto = require("node:crypto");
27
27
  let node_fs = require("node:fs");
package/dist/node.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { At as Fmp4BoxSplitter, Ct as FFMPEG_PATH_ENV, Dt as getFfmpegArtifact, Et as FFMPEG_RELEASE, Ot as getFfmpegDownloadUrl, P as compositionSourceKey, Pt as buildFfmpegArgs, Rt as isSoftwareDecode, Tt as ffmpegBinaryName, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, kt as canonicalHash, wt as chooseFfmpegBinary } from "./composition-CB6PMT9p.mjs";
1
+ import { At as Fmp4BoxSplitter, Ct as FFMPEG_PATH_ENV, Dt as getFfmpegArtifact, Et as FFMPEG_RELEASE, Ot as getFfmpegDownloadUrl, P as compositionSourceKey, Pt as buildFfmpegArgs, Rt as isSoftwareDecode, Tt as ffmpegBinaryName, a as CUSTOMIZATION_BLOCK_NAME_PREFIX, kt as canonicalHash, wt as chooseFfmpegBinary } from "./composition-xz-ud5EQ.mjs";
2
2
  import { t as errMsg } from "./err-msg-BXKzRBwg.mjs";
3
3
  import { createHash, createHmac, randomUUID, timingSafeEqual } from "node:crypto";
4
4
  import * as fs from "node:fs";
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Capacity of an accelerator we have not measured (D930).
3
+ *
4
+ * The latency table stays the measured columns. A device that reports compute
5
+ * (OpenVINO GOPS, or execution units × clock, or compute units, or TOPS) is
6
+ * estimated from the nearest measured column of the same accelerator kind,
7
+ * scaled by the compute ratio and clamped. A node benchmark still replaces
8
+ * the estimate. A device that reports neither compute nor a known class stays
9
+ * `unknown`.
10
+ *
11
+ * A failed probe field is `null`, never `0` (D393): zero would be a compute
12
+ * ratio of zero and would size the device as if it could not run.
13
+ */
14
+ import { z } from 'zod';
15
+ import type { AcceleratorKind, HardwareClassId } from './plan-schemas.js';
16
+ import { type DetectorLatencyColumn, type DetectorPerfTable } from './detector-performance.js';
17
+ /**
18
+ * An unmeasured device is never estimated outside this band of its reference.
19
+ *
20
+ * Peak GOPS and detector latency do not move together: a 640 model is memory
21
+ * bound, a 320 model less so, and the N100→N305 public EU×clock ratio is
22
+ * about 2.2×. 2× is the widest that spread justifies without a measurement
23
+ * on the device; 0.5× is the symmetric floor so a tiny iGPU is not told it
24
+ * is many times slower than the weakest column we measured. A node benchmark
25
+ * replaces the estimate and is not clamped.
26
+ */
27
+ export declare const ESTIMATE_COMPUTE_RATIO_MIN = 0.5;
28
+ export declare const ESTIMATE_COMPUTE_RATIO_MAX = 2;
29
+ /**
30
+ * Within this of 1.0, a device whose class IS the reference is that measured
31
+ * machine (a probe clock a few percent off the spec), not a different chip.
32
+ * An unknown class is still estimated, so the plan says so.
33
+ */
34
+ export declare const REFERENCE_MATCH_FRACTION = 0.05;
35
+ /** N100 iGPU: 24 execution units, 750 MHz graphics max (Intel specification). */
36
+ export declare const N100_IGPU_EU = 24;
37
+ export declare const N100_IGPU_CLOCK_MHZ = 750;
38
+ /**
39
+ * Core Ultra 7 265K iGPU: 4 Xe-cores. OpenVINO's execution-unit count for
40
+ * Xe-LP is 16 per Xe-core, and the graphics max dynamic frequency is 2000 MHz.
41
+ * Used only to choose the nearest column for a chip that is not itself a
42
+ * Core Ultra — that class is the measurement and is never scaled.
43
+ */
44
+ export declare const CORE_ULTRA_265K_IGPU_EU = 64;
45
+ export declare const CORE_ULTRA_265K_IGPU_CLOCK_MHZ = 2000;
46
+ /** Phoenix / Hawk Point Radeon 780M: 12 compute units. */
47
+ export declare const PHOENIX_780M_CU = 12;
48
+ export declare const PrecisionGopsSchema: z.ZodObject<{
49
+ int8: z.ZodPipe<z.ZodNullable<z.ZodNumber>, z.ZodTransform<number | null, number | null>>;
50
+ fp16: z.ZodPipe<z.ZodNullable<z.ZodNumber>, z.ZodTransform<number | null, number | null>>;
51
+ }, z.core.$strip>;
52
+ export type PrecisionGops = z.infer<typeof PrecisionGopsSchema>;
53
+ /** What one accelerator device reported. Every failed query is null. */
54
+ export declare const AcceleratorComputeSchema: z.ZodObject<{
55
+ deviceKey: z.ZodString;
56
+ fullDeviceName: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string | null, string | null>>;
57
+ executionUnits: z.ZodPipe<z.ZodNullable<z.ZodNumber>, z.ZodTransform<number | null, number | null>>;
58
+ clockMHz: z.ZodPipe<z.ZodNullable<z.ZodNumber>, z.ZodTransform<number | null, number | null>>;
59
+ gops: z.ZodNullable<z.ZodObject<{
60
+ int8: z.ZodPipe<z.ZodNullable<z.ZodNumber>, z.ZodTransform<number | null, number | null>>;
61
+ fp16: z.ZodPipe<z.ZodNullable<z.ZodNumber>, z.ZodTransform<number | null, number | null>>;
62
+ }, z.core.$strip>>;
63
+ architecture: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string | null, string | null>>;
64
+ npuName: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string | null, string | null>>;
65
+ tops: z.ZodPipe<z.ZodNullable<z.ZodNumber>, z.ZodTransform<number | null, number | null>>;
66
+ vendor: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string | null, string | null>>;
67
+ webgpuArchitecture: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string | null, string | null>>;
68
+ webgpuDevice: z.ZodPipe<z.ZodNullable<z.ZodString>, z.ZodTransform<string | null, string | null>>;
69
+ computeUnits: z.ZodPipe<z.ZodNullable<z.ZodNumber>, z.ZodTransform<number | null, number | null>>;
70
+ }, z.core.$strip>;
71
+ export type AcceleratorCompute = z.infer<typeof AcceleratorComputeSchema>;
72
+ /** The unit a compute ratio is taken in. Two scores of different units are not compared. */
73
+ export type ComputeMetric = 'gops-int8' | 'gops-fp16' | 'eu-mhz' | 'cu' | 'tops';
74
+ export interface ComputeScore {
75
+ readonly metric: ComputeMetric;
76
+ readonly value: number;
77
+ }
78
+ /** The compute of one measured column, in the unit the probe reports. */
79
+ export interface ReferenceCompute {
80
+ readonly hardwareClass: HardwareClassId;
81
+ readonly accelerator: AcceleratorKind;
82
+ readonly score: ComputeScore;
83
+ }
84
+ /**
85
+ * Compute of the machines the latency columns were measured on.
86
+ * GOPS is preferred when a column carries it; none of these do yet — the
87
+ * boxes were measured before the probe reported `DEVICE_GOPS` — so the scale
88
+ * uses execution units × clock (Intel) or compute units (AMD) until a
89
+ * re-measure locks a GOPS figure on the column.
90
+ */
91
+ export declare const REFERENCE_COMPUTE: readonly ReferenceCompute[];
92
+ export interface ResolveLatencyInput {
93
+ readonly hardwareClass: HardwareClassId;
94
+ readonly accelerator: AcceleratorKind;
95
+ readonly report: AcceleratorCompute | null;
96
+ readonly perf?: DetectorPerfTable;
97
+ readonly references?: readonly ReferenceCompute[];
98
+ }
99
+ export interface ResolvedLatencyColumn {
100
+ readonly column: DetectorLatencyColumn;
101
+ /** Null when the column is the measurement itself. */
102
+ readonly estimatedFrom: HardwareClassId | null;
103
+ }
104
+ /** Parse a probe payload. `null` means the probe failed — not "no accelerators". */
105
+ export declare function parseAcceleratorFactsJson(raw: unknown): readonly AcceleratorCompute[] | null;
106
+ /** Scores in the order the estimate prefers. A non-positive field is absent. */
107
+ export declare function computeScores(report: AcceleratorCompute): readonly ComputeScore[];
108
+ /** True when this report can scale a measured column of `kind`. */
109
+ export declare function reportIsScalable(report: AcceleratorCompute, kind: AcceleratorKind, references?: readonly ReferenceCompute[]): boolean;
110
+ /**
111
+ * The latency column for one device. A measured class other than the N-series
112
+ * spread is returned unchanged — one class there is one measured machine.
113
+ * `intel-n-series` is the N100 column; a different reported compute scales it.
114
+ * An unknown class scales from the nearest reference of the same kind.
115
+ */
116
+ export declare function resolveLatencyColumn(input: ResolveLatencyInput): ResolvedLatencyColumn | null;
@@ -21,6 +21,11 @@ export interface DetectorLatencyCell {
21
21
  readonly fps: number;
22
22
  /** False for a cell derived from another column (scaled), not measured. */
23
23
  readonly measured: boolean;
24
+ /**
25
+ * Set when this cell was scaled from another class's measured column (D930).
26
+ * Absent on a measured cell and on a cell derived inside the same column.
27
+ */
28
+ readonly estimatedFrom?: HardwareClassId;
24
29
  }
25
30
  /** `modelId → cell` for one (hardware class, accelerator) column. */
26
31
  export type DetectorLatencyColumn = Readonly<Record<string, DetectorLatencyCell>>;
@@ -1,11 +1,12 @@
1
1
  /**
2
- * Static hardware classification for the Auto tune recommender (D745).
2
+ * Static hardware classification for the Auto tune recommender (D745, D930).
3
3
  *
4
4
  * A node is classified from the facts its platform probe already reports —
5
5
  * `cpuModel`, `arch`, `gpu`, `npu` — never from a benchmark. The class picks a
6
- * column of the measured latency table (`detector-performance.ts`); a node
7
- * whose CPU matches no measured class is `unknown` and the recommender leaves
8
- * it alone, saying so.
6
+ * column of the measured latency table (`detector-performance.ts`). A CPU that
7
+ * matches no measured class is `unknown`: the recommender then scales from
8
+ * reported accelerator compute when the probe supplied it, and leaves the
9
+ * node alone only when it has neither.
9
10
  *
10
11
  * `cpuModel` is the host's CPU string even inside Docker (`os.cpus()`), which
11
12
  * is why it is the discriminator: "Intel(R) Core(TM) Ultra 7 265K",
@@ -5,5 +5,6 @@
5
5
  */
6
6
  export * from './hardware-class.js';
7
7
  export * from './detector-performance.js';
8
+ export * from './accelerator-compute.js';
8
9
  export * from './recommend.js';
9
10
  export * from './plan-schemas.js';
@@ -99,6 +99,16 @@ export declare const LatencySourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
99
99
  kind: z.ZodLiteral<"node-benchmark">;
100
100
  resultId: z.ZodString;
101
101
  measuredAtMs: z.ZodNumber;
102
+ }, z.core.$strip>, z.ZodObject<{
103
+ kind: z.ZodLiteral<"estimated">;
104
+ estimatedFrom: z.ZodEnum<{
105
+ "amd-phoenix": "amd-phoenix";
106
+ "apple-m-base": "apple-m-base";
107
+ "apple-m-pro": "apple-m-pro";
108
+ "intel-core-ultra": "intel-core-ultra";
109
+ "intel-n-series": "intel-n-series";
110
+ unknown: "unknown";
111
+ }>;
102
112
  }, z.core.$strip>], "kind">;
103
113
  export type LatencySource = z.infer<typeof LatencySourceSchema>;
104
114
  export declare const DeviceModelChoiceSchema: z.ZodObject<{
@@ -112,7 +122,25 @@ export declare const DeviceModelChoiceSchema: z.ZodObject<{
112
122
  kind: z.ZodLiteral<"node-benchmark">;
113
123
  resultId: z.ZodString;
114
124
  measuredAtMs: z.ZodNumber;
125
+ }, z.core.$strip>, z.ZodObject<{
126
+ kind: z.ZodLiteral<"estimated">;
127
+ estimatedFrom: z.ZodEnum<{
128
+ "amd-phoenix": "amd-phoenix";
129
+ "apple-m-base": "apple-m-base";
130
+ "apple-m-pro": "apple-m-pro";
131
+ "intel-core-ultra": "intel-core-ultra";
132
+ "intel-n-series": "intel-n-series";
133
+ unknown: "unknown";
134
+ }>;
115
135
  }, z.core.$strip>], "kind">>;
136
+ estimatedFrom: z.ZodOptional<z.ZodEnum<{
137
+ "amd-phoenix": "amd-phoenix";
138
+ "apple-m-base": "apple-m-base";
139
+ "apple-m-pro": "apple-m-pro";
140
+ "intel-core-ultra": "intel-core-ultra";
141
+ "intel-n-series": "intel-n-series";
142
+ unknown: "unknown";
143
+ }>>;
116
144
  capacitySessions: z.ZodNumber;
117
145
  personRecall: z.ZodNumber;
118
146
  }, z.core.$strip>;
@@ -141,7 +169,25 @@ export declare const DeviceRecommendationSchema: z.ZodObject<{
141
169
  kind: z.ZodLiteral<"node-benchmark">;
142
170
  resultId: z.ZodString;
143
171
  measuredAtMs: z.ZodNumber;
172
+ }, z.core.$strip>, z.ZodObject<{
173
+ kind: z.ZodLiteral<"estimated">;
174
+ estimatedFrom: z.ZodEnum<{
175
+ "amd-phoenix": "amd-phoenix";
176
+ "apple-m-base": "apple-m-base";
177
+ "apple-m-pro": "apple-m-pro";
178
+ "intel-core-ultra": "intel-core-ultra";
179
+ "intel-n-series": "intel-n-series";
180
+ unknown: "unknown";
181
+ }>;
144
182
  }, z.core.$strip>], "kind">>;
183
+ estimatedFrom: z.ZodOptional<z.ZodEnum<{
184
+ "amd-phoenix": "amd-phoenix";
185
+ "apple-m-base": "apple-m-base";
186
+ "apple-m-pro": "apple-m-pro";
187
+ "intel-core-ultra": "intel-core-ultra";
188
+ "intel-n-series": "intel-n-series";
189
+ unknown: "unknown";
190
+ }>>;
145
191
  capacitySessions: z.ZodNumber;
146
192
  personRecall: z.ZodNumber;
147
193
  }, z.core.$strip>>;
@@ -243,7 +289,25 @@ export declare const NodeRecommendationSchema: z.ZodObject<{
243
289
  kind: z.ZodLiteral<"node-benchmark">;
244
290
  resultId: z.ZodString;
245
291
  measuredAtMs: z.ZodNumber;
292
+ }, z.core.$strip>, z.ZodObject<{
293
+ kind: z.ZodLiteral<"estimated">;
294
+ estimatedFrom: z.ZodEnum<{
295
+ "amd-phoenix": "amd-phoenix";
296
+ "apple-m-base": "apple-m-base";
297
+ "apple-m-pro": "apple-m-pro";
298
+ "intel-core-ultra": "intel-core-ultra";
299
+ "intel-n-series": "intel-n-series";
300
+ unknown: "unknown";
301
+ }>;
246
302
  }, z.core.$strip>], "kind">>;
303
+ estimatedFrom: z.ZodOptional<z.ZodEnum<{
304
+ "amd-phoenix": "amd-phoenix";
305
+ "apple-m-base": "apple-m-base";
306
+ "apple-m-pro": "apple-m-pro";
307
+ "intel-core-ultra": "intel-core-ultra";
308
+ "intel-n-series": "intel-n-series";
309
+ unknown: "unknown";
310
+ }>>;
247
311
  capacitySessions: z.ZodNumber;
248
312
  personRecall: z.ZodNumber;
249
313
  }, z.core.$strip>>;
@@ -445,7 +509,25 @@ export declare const AutoTunePlanSchema: z.ZodObject<{
445
509
  kind: z.ZodLiteral<"node-benchmark">;
446
510
  resultId: z.ZodString;
447
511
  measuredAtMs: z.ZodNumber;
512
+ }, z.core.$strip>, z.ZodObject<{
513
+ kind: z.ZodLiteral<"estimated">;
514
+ estimatedFrom: z.ZodEnum<{
515
+ "amd-phoenix": "amd-phoenix";
516
+ "apple-m-base": "apple-m-base";
517
+ "apple-m-pro": "apple-m-pro";
518
+ "intel-core-ultra": "intel-core-ultra";
519
+ "intel-n-series": "intel-n-series";
520
+ unknown: "unknown";
521
+ }>;
448
522
  }, z.core.$strip>], "kind">>;
523
+ estimatedFrom: z.ZodOptional<z.ZodEnum<{
524
+ "amd-phoenix": "amd-phoenix";
525
+ "apple-m-base": "apple-m-base";
526
+ "apple-m-pro": "apple-m-pro";
527
+ "intel-core-ultra": "intel-core-ultra";
528
+ "intel-n-series": "intel-n-series";
529
+ unknown: "unknown";
530
+ }>>;
449
531
  capacitySessions: z.ZodNumber;
450
532
  personRecall: z.ZodNumber;
451
533
  }, z.core.$strip>>;
@@ -673,7 +755,25 @@ export declare const AutoTuneApplyResultSchema: z.ZodDiscriminatedUnion<[z.ZodOb
673
755
  kind: z.ZodLiteral<"node-benchmark">;
674
756
  resultId: z.ZodString;
675
757
  measuredAtMs: z.ZodNumber;
758
+ }, z.core.$strip>, z.ZodObject<{
759
+ kind: z.ZodLiteral<"estimated">;
760
+ estimatedFrom: z.ZodEnum<{
761
+ "amd-phoenix": "amd-phoenix";
762
+ "apple-m-base": "apple-m-base";
763
+ "apple-m-pro": "apple-m-pro";
764
+ "intel-core-ultra": "intel-core-ultra";
765
+ "intel-n-series": "intel-n-series";
766
+ unknown: "unknown";
767
+ }>;
676
768
  }, z.core.$strip>], "kind">>;
769
+ estimatedFrom: z.ZodOptional<z.ZodEnum<{
770
+ "amd-phoenix": "amd-phoenix";
771
+ "apple-m-base": "apple-m-base";
772
+ "apple-m-pro": "apple-m-pro";
773
+ "intel-core-ultra": "intel-core-ultra";
774
+ "intel-n-series": "intel-n-series";
775
+ unknown: "unknown";
776
+ }>>;
677
777
  capacitySessions: z.ZodNumber;
678
778
  personRecall: z.ZodNumber;
679
779
  }, z.core.$strip>>;
@@ -7,18 +7,21 @@
7
7
  * Per node:
8
8
  * 1. Classify the hardware (`classifyInferenceHardware`). An unknown class,
9
9
  * an offline node or a node with nothing to recommend is left untouched —
10
- * unless the node has its own measurements (below).
11
- * 1b. MEASURED ON THE NODE BEATS THE TABLE (D791): a fresh node benchmark
12
- * result for (device, model) replaces the table's cell, and the choice
13
- * names it as its source. A node of unknown hardware with measurements is
14
- * recommended from them alone.
10
+ * unless the node has its own measurements (below) or a device reported
11
+ * compute that can be scaled from a measured column (D930).
12
+ * 1b. MEASURED ON THE NODE BEATS THE TABLE (D791), and the table beats an
13
+ * estimate: a fresh node benchmark result for (device, model) replaces
14
+ * whatever cell the class or the compute scale produced. A node of
15
+ * unknown hardware with measurements is recommended from them alone.
15
16
  * 2. The node's ACCELERATORS (NPU, iGPU, Neural Engine) that are enabled and
16
17
  * available share ONE model — so a camera's floors never flip with the
17
18
  * device the balancer rotated it onto. A candidate must have a build for
18
19
  * every accelerator's format and a latency cell for each.
19
20
  * 3. A candidate FITS a device when the device sustains at least
20
21
  * `minSessionsPerDevice` parallel sessions with it:
21
- * ⌊fps × (1 − headroom) / camera fps⌋ ≥ minSessionsPerDevice.
22
+ * ⌊fps × factor × (1 − headroom) / camera fps⌋ ≥ minSessionsPerDevice.
23
+ * factor is 1 at 10 fps; below that an Intel iGPU uses the measured
24
+ * overlap (D930).
22
25
  * 4. Among candidates that fit everywhere, the most accurate wins (person
23
26
  * recall at the shipped floor); within `RECALL_TIE` of the best, the
24
27
  * fastest wins. That IS the step-down order the data gives: the first
@@ -37,7 +40,7 @@
37
40
  import type { HardwareInfo } from '../../interfaces/platform.js';
38
41
  import type { ModelFormat } from '../../types/models.js';
39
42
  import { type DetectorPerfTable } from './detector-performance.js';
40
- import { type NodeRecommendation } from './plan-schemas.js';
43
+ import { type AcceleratorKind, type NodeRecommendation } from './plan-schemas.js';
41
44
  /** The family the cluster runs. */
42
45
  export declare const AUTO_TUNE_FAMILY = "yolov9";
43
46
  /**
@@ -51,8 +54,27 @@ export declare const RECALL_TIE = 0.02;
51
54
  export declare const DEFAULT_HEADROOM = 0.4;
52
55
  /** Detection rate a session is counted at when no camera says otherwise. */
53
56
  export declare const DEFAULT_CAMERA_FPS = 10;
54
- /** Parallel sessions one device sustains at `fps` with `headroom` kept free. */
55
- export declare function capacitySessionsOf(fps: number, headroom: number, cameraFps: number): number;
57
+ /**
58
+ * Camera rate at which serial `1000/p50` matched the cameras that held
59
+ * (N100 iGPU, 2026-10-24). Below this the second InferRequest's overlap
60
+ * becomes extra sessions; at and above it the serial ceiling is the count.
61
+ */
62
+ export declare const SERIAL_CAPACITY_CAMERA_FPS = 10;
63
+ /**
64
+ * Aggregate throughput ÷ serial throughput when the frame interval is wide
65
+ * enough to hide the second request. intel-igpu is the N100 measurement
66
+ * (~1.4× under LATENCY with 2 InferRequests). Every other kind stays 1
67
+ * until it is measured the same way.
68
+ */
69
+ export declare const AGGREGATE_THROUGHPUT_BY_KIND: Readonly<Partial<Record<AcceleratorKind, number>>>;
70
+ /** The overlap factor for this kind at this camera rate. 1 at {@link SERIAL_CAPACITY_CAMERA_FPS} and above. */
71
+ export declare function aggregateThroughputFactor(kind: AcceleratorKind, cameraFps: number): number;
72
+ /**
73
+ * Parallel sessions one device sustains at `fps` with `headroom` kept free.
74
+ * `aggregateFactor` is the kind's overlap (1 unless the caller measured
75
+ * extra throughput at this camera rate).
76
+ */
77
+ export declare function capacitySessionsOf(fps: number, headroom: number, cameraFps: number, aggregateFactor?: number): number;
56
78
  /** A latency measured on the node itself (a fresh node benchmark result, D791). */
57
79
  export interface MeasuredLatencyCell {
58
80
  readonly p50Ms: number;
@@ -0,0 +1,2 @@
1
+ export * from './small-subject-recovery.js';
2
+ export * from './motion-crop-plan.js';