@camstack/types 1.2.312 → 1.2.314
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/capabilities/custom-model-registry.cap.d.ts +22 -0
- package/dist/capabilities/model-convert.cap.d.ts +13 -2
- package/dist/capabilities/model-distributor.cap.d.ts +22 -0
- package/dist/capabilities/pipeline-executor.cap.d.ts +25 -0
- package/dist/catalogs/frigate-plus-classmap.d.ts +20 -0
- package/dist/catalogs/root-model-supply.d.ts +34 -7
- package/dist/index.d.ts +3 -2
- package/dist/index.js +281 -26
- package/dist/index.mjs +269 -27
- package/dist/interfaces/config-ui.d.ts +14 -0
- package/dist/pipeline/model-bound-settings.d.ts +82 -0
- package/dist/types/model-variant-groups.d.ts +2 -0
- package/dist/types/models.d.ts +32 -1
- package/dist/types/pipeline-step.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5124,11 +5124,18 @@ var FORMAT_KEYS = [
|
|
|
5124
5124
|
*/
|
|
5125
5125
|
var FAMILY_LABEL = {
|
|
5126
5126
|
yolo26: "YOLO26",
|
|
5127
|
+
"yolo26-seg": "YOLO26-seg",
|
|
5127
5128
|
yolov9: "YOLOv9"
|
|
5128
5129
|
};
|
|
5129
5130
|
function familyLabel(family) {
|
|
5130
5131
|
return FAMILY_LABEL[family] ?? family.toUpperCase();
|
|
5131
5132
|
}
|
|
5133
|
+
/**
|
|
5134
|
+
* The picker's one-line hint for a family whose choice changes more than
|
|
5135
|
+
* accuracy and speed. A YOLO26-seg root detects like YOLO26 and also supplies
|
|
5136
|
+
* the Segmentation step its masks (D737).
|
|
5137
|
+
*/
|
|
5138
|
+
var FAMILY_HINT = { "yolo26-seg": "detection + masks, slightly heavier" };
|
|
5132
5139
|
/** `@640`, `@320×320`, `@ 256` — a resolution stated inside a model name. */
|
|
5133
5140
|
var RESOLUTION_IN_NAME = /\s*@\s*\d+\s*(?:[x×]\s*\d+)?/gi;
|
|
5134
5141
|
/**
|
|
@@ -5224,9 +5231,11 @@ function buildModelVariantGroups(models) {
|
|
|
5224
5231
|
if (ib !== -1) return 1;
|
|
5225
5232
|
return a.tier.localeCompare(b.tier);
|
|
5226
5233
|
});
|
|
5234
|
+
const hint = FAMILY_HINT[family];
|
|
5227
5235
|
families.push({
|
|
5228
5236
|
family,
|
|
5229
5237
|
label: familyLabel(family),
|
|
5238
|
+
...hint !== void 0 ? { hint } : {},
|
|
5230
5239
|
tiers: tierList
|
|
5231
5240
|
});
|
|
5232
5241
|
}
|
|
@@ -5355,8 +5364,19 @@ var LABEL_SUPPLY_STEP_IDS = [
|
|
|
5355
5364
|
];
|
|
5356
5365
|
/** Steps whose box a root detection can BE. */
|
|
5357
5366
|
var CROP_SUPPLY_STEP_IDS = ["plate-detection", "face-detection"];
|
|
5367
|
+
/**
|
|
5368
|
+
* Steps whose per-detection MASK a root detection can carry (D737). The live
|
|
5369
|
+
* mask step is `segmentation` — a frame-plane refiner that runs its own model
|
|
5370
|
+
* once per detection crop. (`instance-segmentation` is a dormant step id that
|
|
5371
|
+
* no camera tree carries.)
|
|
5372
|
+
*/
|
|
5373
|
+
var MASK_SUPPLY_STEP_IDS = ["segmentation"];
|
|
5358
5374
|
/** Every step a root model can supply. */
|
|
5359
|
-
var ROOT_SUPPLIABLE_STEP_IDS = [
|
|
5375
|
+
var ROOT_SUPPLIABLE_STEP_IDS = [
|
|
5376
|
+
...LABEL_SUPPLY_STEP_IDS,
|
|
5377
|
+
...CROP_SUPPLY_STEP_IDS,
|
|
5378
|
+
...MASK_SUPPLY_STEP_IDS
|
|
5379
|
+
];
|
|
5360
5380
|
/** Narrow a step id to a suppliable one — type guard, not a cast. */
|
|
5361
5381
|
function isRootSuppliableStepId(value) {
|
|
5362
5382
|
return ROOT_SUPPLIABLE_STEP_IDS.some((id) => id === value);
|
|
@@ -5441,7 +5461,12 @@ var CROP_SUPPLY_SOURCES = {
|
|
|
5441
5461
|
* Whether an operator intends a step to take the root's output when the
|
|
5442
5462
|
* root declares it — the default of the `useRootModel` flag. The label kinds
|
|
5443
5463
|
* default ON: the detector's answer is the cheaper one and the classifier
|
|
5444
|
-
* keeps its model for the day the root changes. The
|
|
5464
|
+
* keeps its model for the day the root changes. The animal and vehicle
|
|
5465
|
+
* classifiers are also ENABLED by default (their catalog `enabledByDefault`,
|
|
5466
|
+
* D736), so out of the box a root that declares them names animals and
|
|
5467
|
+
* vehicles and a root that does not runs the classifier; `package-detection`
|
|
5468
|
+
* stays zone-driven and takes this default whenever a zone switches it on.
|
|
5469
|
+
* The crop kinds default OFF: a
|
|
5445
5470
|
* root plate box has an uncalibrated OCR margin, and root-face refinement has
|
|
5446
5471
|
* not run on live traffic yet.
|
|
5447
5472
|
*/
|
|
@@ -5450,7 +5475,8 @@ var USE_ROOT_MODEL_DEFAULTS = {
|
|
|
5450
5475
|
"vehicle-classifier": true,
|
|
5451
5476
|
"package-detection": true,
|
|
5452
5477
|
"plate-detection": false,
|
|
5453
|
-
"face-detection": false
|
|
5478
|
+
"face-detection": false,
|
|
5479
|
+
segmentation: true
|
|
5454
5480
|
};
|
|
5455
5481
|
/** The step-settings key the flag is stored under (DeviceStepConfig.settings, camera overrides). */
|
|
5456
5482
|
var USE_ROOT_MODEL_SETTING_KEY = "useRootModel";
|
|
@@ -5527,13 +5553,32 @@ function deriveRootSupplies(labels, classMap) {
|
|
|
5527
5553
|
return supplies;
|
|
5528
5554
|
}
|
|
5529
5555
|
/**
|
|
5556
|
+
* The decodes that emit an instance mask with every detection — a fact of the
|
|
5557
|
+
* model's OUTPUT, read from its postprocessor (`yolo-seg`: per-instance mask
|
|
5558
|
+
* coefficients times the prototype masks), never assumed per family.
|
|
5559
|
+
*/
|
|
5560
|
+
var MASK_EMITTING_POSTPROCESSORS = ["yolo-seg"];
|
|
5561
|
+
/**
|
|
5562
|
+
* The mask supplies a root declares from its decode: `segmentation` when the
|
|
5563
|
+
* postprocessor emits a mask per detection, nothing otherwise.
|
|
5564
|
+
*/
|
|
5565
|
+
function deriveMaskSupplies(postprocessor) {
|
|
5566
|
+
if (postprocessor === void 0 || !MASK_EMITTING_POSTPROCESSORS.includes(postprocessor)) return [];
|
|
5567
|
+
return MASK_SUPPLY_STEP_IDS.map((stepId) => ({
|
|
5568
|
+
kind: "mask",
|
|
5569
|
+
stepId
|
|
5570
|
+
}));
|
|
5571
|
+
}
|
|
5572
|
+
/**
|
|
5530
5573
|
* The supplies a root model declares. A row registered with a declaration
|
|
5531
5574
|
* carries it (`suppliesSteps`, computed at import from the model's own
|
|
5532
5575
|
* labelmap); a row without one — a built-in entry, or a custom row registered
|
|
5533
5576
|
* before the field existed — is derived here, on read, from the same inputs.
|
|
5534
5577
|
*/
|
|
5535
5578
|
function rootSuppliesOf(entry, stepDefaults) {
|
|
5536
|
-
const
|
|
5579
|
+
const fromLabels = entry?.suppliesSteps ?? deriveRootSupplies(entry !== void 0 && entry.labels.length > 0 ? entry.labels.map((l) => l.id) : stepDefaults.labels, entry?.classMap ?? stepDefaults.classMap);
|
|
5580
|
+
const masks = deriveMaskSupplies(entry?.postprocessor).filter((m) => !fromLabels.some((s) => s.stepId === m.stepId));
|
|
5581
|
+
const declared = masks.length > 0 ? [...fromLabels, ...masks] : fromLabels;
|
|
5537
5582
|
const inputPx = entry !== void 0 ? Math.min(entry.inputSize.width, entry.inputSize.height) : void 0;
|
|
5538
5583
|
if (inputPx === void 0) return declared;
|
|
5539
5584
|
return declared.map((s) => s.kind === "crop" ? {
|
|
@@ -5626,17 +5671,18 @@ var SUPPLY_NOUN = {
|
|
|
5626
5671
|
"vehicle-classifier": "vehicles",
|
|
5627
5672
|
"package-detection": "packages",
|
|
5628
5673
|
"plate-detection": "plates",
|
|
5629
|
-
"face-detection": "faces"
|
|
5674
|
+
"face-detection": "faces",
|
|
5675
|
+
segmentation: "masks"
|
|
5630
5676
|
};
|
|
5631
|
-
/** One short phrase per supply — `animals 6/8`, `plates`. */
|
|
5677
|
+
/** One short phrase per supply — `animals 6/8`, `plates`, `masks`. */
|
|
5632
5678
|
function describeRootSupply(supply) {
|
|
5633
5679
|
const noun = SUPPLY_NOUN[supply.stepId];
|
|
5634
|
-
if (supply.kind
|
|
5680
|
+
if (supply.kind !== "label") return noun;
|
|
5635
5681
|
const total = LABEL_SUPPLY_VOCABULARIES[supply.stepId].length;
|
|
5636
5682
|
if (total <= 1) return noun;
|
|
5637
5683
|
return `${noun} ${String(total - supply.uncovered.length)}/${String(total)}`;
|
|
5638
5684
|
}
|
|
5639
|
-
/** `animals 6/8 · vehicles 5/8 · plates · faces` — empty string for none. */
|
|
5685
|
+
/** `animals 6/8 · vehicles 5/8 · plates · faces · masks` — empty string for none. */
|
|
5640
5686
|
function describeRootSupplies(supplies) {
|
|
5641
5687
|
return (supplies ?? []).map(describeRootSupply).join(" · ");
|
|
5642
5688
|
}
|
|
@@ -5806,25 +5852,36 @@ var ModelLicenseSchema = zod.z.preprocess((value) => typeof value === "string" ?
|
|
|
5806
5852
|
* - `crop`: the root draws the box the step would have found (`license_plate`
|
|
5807
5853
|
* for plate-detection, `face` for face-detection). The box becomes a detail
|
|
5808
5854
|
* child of the `parentMacro` detection that contains it — never a track.
|
|
5855
|
+
* - `mask`: the root's decode emits an instance mask with every detection (a
|
|
5856
|
+
* YOLO26-seg root, D737) — the `segmentation` step's result, carried on the
|
|
5857
|
+
* detection in the shape that step produces. Derived from the model's
|
|
5858
|
+
* postprocessor on read, never stored by an import.
|
|
5809
5859
|
*/
|
|
5810
|
-
var RootStepSupplySchema = zod.z.discriminatedUnion("kind", [
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
|
|
5822
|
-
|
|
5823
|
-
|
|
5824
|
-
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5860
|
+
var RootStepSupplySchema = zod.z.discriminatedUnion("kind", [
|
|
5861
|
+
zod.z.object({
|
|
5862
|
+
kind: zod.z.literal("label"),
|
|
5863
|
+
stepId: zod.z.enum(LABEL_SUPPLY_STEP_IDS),
|
|
5864
|
+
labelToEffect: zod.z.record(zod.z.string(), zod.z.string()),
|
|
5865
|
+
uncovered: zod.z.array(zod.z.string()).readonly()
|
|
5866
|
+
}),
|
|
5867
|
+
zod.z.object({
|
|
5868
|
+
kind: zod.z.literal("crop"),
|
|
5869
|
+
stepId: zod.z.enum(CROP_SUPPLY_STEP_IDS),
|
|
5870
|
+
rootLabels: zod.z.array(zod.z.string()).readonly(),
|
|
5871
|
+
parentMacro: zod.z.enum(["vehicle", "person"]),
|
|
5872
|
+
childClass: zod.z.enum(["plate", "face"]),
|
|
5873
|
+
/**
|
|
5874
|
+
* The root's smaller input side, stamped on read by `rootSuppliesOf` from
|
|
5875
|
+
* the model entry — what a step's `minRootInputPx` gate judges. Never
|
|
5876
|
+
* stored by an import.
|
|
5877
|
+
*/
|
|
5878
|
+
rootInputPx: zod.z.number().int().positive().optional()
|
|
5879
|
+
}),
|
|
5880
|
+
zod.z.object({
|
|
5881
|
+
kind: zod.z.literal("mask"),
|
|
5882
|
+
stepId: zod.z.enum(MASK_SUPPLY_STEP_IDS)
|
|
5883
|
+
})
|
|
5884
|
+
]);
|
|
5828
5885
|
var ModelCatalogEntrySchema = zod.z.object({
|
|
5829
5886
|
id: zod.z.string(),
|
|
5830
5887
|
name: zod.z.string(),
|
|
@@ -5890,6 +5947,35 @@ var ModelCatalogEntrySchema = zod.z.object({
|
|
|
5890
5947
|
*/
|
|
5891
5948
|
defaultConfidence: zod.z.number().min(0).max(1).optional(),
|
|
5892
5949
|
/**
|
|
5950
|
+
* Per-MODEL default of the per-class confidence floors (`minConfidence<Macro>`
|
|
5951
|
+
* on a detector step), keyed by macro class: `{ person: 0.45 }`. A class
|
|
5952
|
+
* absent here runs at the step slider's global default. The same row shape
|
|
5953
|
+
* the floor measurement produces (`model-floors.json`: modelId → floors), so
|
|
5954
|
+
* a measured table is copied in as-is. An operator override is bound to the
|
|
5955
|
+
* model it was made for and does not survive a model change (D738). A custom
|
|
5956
|
+
* / imported model may declare it; without it, the global defaults apply.
|
|
5957
|
+
*/
|
|
5958
|
+
defaultClassFloors: zod.z.record(zod.z.string(), zod.z.number().min(0).max(1)).optional(),
|
|
5959
|
+
/**
|
|
5960
|
+
* The inference precision this model's OpenVINO IR needs on an Intel GPU.
|
|
5961
|
+
* Absent ⇒ the device default (f16 on a GPU). Set to `'f32'` for an FP32 IR
|
|
5962
|
+
* that produces invalid output at f16 — measured 2026-10-07 for YOLO26
|
|
5963
|
+
* base IRs (`yolo26s`: 0 true / 146 false positives; `yolo26m*`: NaN
|
|
5964
|
+
* scores) on the Core Ultra iGPU and the N100. Threaded to the pool as
|
|
5965
|
+
* `PoolModelConfig.gpuInferencePrecision`; the pool sets
|
|
5966
|
+
* INFERENCE_PRECISION_HINT on a GPU only. Costs ~60% latency on the GPU.
|
|
5967
|
+
*/
|
|
5968
|
+
gpuInferencePrecision: zod.z.enum(["f32", "f16"]).optional(),
|
|
5969
|
+
/**
|
|
5970
|
+
* ROOT detectors only: per supplied step (`animal-classifier`, …), the
|
|
5971
|
+
* minimum DETECTION score from which this root's own fine label (species,
|
|
5972
|
+
* vehicle type — D736 root supply) is taken (D741). Below it the detection
|
|
5973
|
+
* keeps its macro class without the fine label. `1` = never take it from
|
|
5974
|
+
* this root. Absent ⇒ no floor beyond the macro floor. The supplied step's
|
|
5975
|
+
* `minConfidence` slider, bound to the ROOT model, overrides it.
|
|
5976
|
+
*/
|
|
5977
|
+
suppliedLabelFloors: zod.z.record(zod.z.string(), zod.z.number().min(0).max(1)).optional(),
|
|
5978
|
+
/**
|
|
5893
5979
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
5894
5980
|
* onto the canonical template) before this step runs, instead of a plain
|
|
5895
5981
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -48546,6 +48632,37 @@ function frigateLabelFields(labels) {
|
|
|
48546
48632
|
suppliesSteps: supplies
|
|
48547
48633
|
} : { classMap };
|
|
48548
48634
|
}
|
|
48635
|
+
/**
|
|
48636
|
+
* Per-class confidence-floor defaults of an imported stock Frigate detector
|
|
48637
|
+
* (D738): its per-detection `min_score` default, 0.5, for every class. Its
|
|
48638
|
+
* track-level `threshold` (the median of a track's recent scores) has no
|
|
48639
|
+
* counterpart in CamStack's per-detection floors and is not carried.
|
|
48640
|
+
*/
|
|
48641
|
+
var FRIGATE_STOCK_CLASS_FLOORS = Object.freeze({
|
|
48642
|
+
person: .5,
|
|
48643
|
+
vehicle: .5,
|
|
48644
|
+
animal: .5
|
|
48645
|
+
});
|
|
48646
|
+
/**
|
|
48647
|
+
* Per-class floor defaults of an imported Frigate+ detector (D738): the
|
|
48648
|
+
* documented starting `min_score` values for Frigate+ models, which score
|
|
48649
|
+
* higher than the stock ones (person 0.65, car 0.65, cat 0.65, dog 0.70). The
|
|
48650
|
+
* macro `animal` takes the lower of its classes, so no class is cut above its
|
|
48651
|
+
* documented value.
|
|
48652
|
+
*/
|
|
48653
|
+
var FRIGATE_PLUS_CLASS_FLOORS = Object.freeze({
|
|
48654
|
+
person: .65,
|
|
48655
|
+
vehicle: .65,
|
|
48656
|
+
animal: .65
|
|
48657
|
+
});
|
|
48658
|
+
/**
|
|
48659
|
+
* The `defaultClassFloors` an imported Frigate entry carries: the import's
|
|
48660
|
+
* own, when it states them, else the defaults of its kind. A fresh object.
|
|
48661
|
+
*/
|
|
48662
|
+
function frigateDefaultClassFloors(kind, carried) {
|
|
48663
|
+
if (carried !== void 0) return { ...carried };
|
|
48664
|
+
return { ...kind === "plus" ? FRIGATE_PLUS_CLASS_FLOORS : FRIGATE_STOCK_CLASS_FLOORS };
|
|
48665
|
+
}
|
|
48549
48666
|
//#endregion
|
|
48550
48667
|
//#region src/catalogs/device-state-vocabulary.ts
|
|
48551
48668
|
/**
|
|
@@ -71716,6 +71833,131 @@ function isRemovedModelId(stepId, modelId) {
|
|
|
71716
71833
|
return REMOVED_MODEL_IDS[stepId]?.includes(modelId) ?? false;
|
|
71717
71834
|
}
|
|
71718
71835
|
//#endregion
|
|
71836
|
+
//#region src/pipeline/model-bound-settings.ts
|
|
71837
|
+
/**
|
|
71838
|
+
* Model-bound step settings (D738): an operator value that is only meaningful
|
|
71839
|
+
* for ONE model, stored together with that model's id.
|
|
71840
|
+
*
|
|
71841
|
+
* The per-class confidence floors are the case it exists for. A score is a
|
|
71842
|
+
* property of one detector's output scale — on this hub the median score of a
|
|
71843
|
+
* correct person was 0.78 on `yolov9m-320-int8`, 0.68 on `yolo26s-320-int8`,
|
|
71844
|
+
* 0.40 on `yolo26n-320-int8` and 0.89 on `yolo26s` (640) — so a floor tuned on
|
|
71845
|
+
* one model is wrong on the next. The DEFAULT of such a field belongs to the
|
|
71846
|
+
* model (the catalog entry); an operator OVERRIDE belongs to the model it was
|
|
71847
|
+
* made for.
|
|
71848
|
+
*
|
|
71849
|
+
* The binding is checked at READ time against the model that RUNS, never
|
|
71850
|
+
* enforced by a write on the model-change path: a model can change without any
|
|
71851
|
+
* operator write at all (an unpinned root follows the elected device's
|
|
71852
|
+
* hardware-aware default, D736), and an event-driven reset could be dropped
|
|
71853
|
+
* (events are telemetry, D8/D11). So:
|
|
71854
|
+
*
|
|
71855
|
+
* effective = override when the stored binding names the running model
|
|
71856
|
+
* | override when no binding is stored (a legacy / programmatic
|
|
71857
|
+
* value — it applies to whatever runs, as before D738)
|
|
71858
|
+
* | the running model's default, when it declares one
|
|
71859
|
+
* | the field's global default.
|
|
71860
|
+
*
|
|
71861
|
+
* Storage shape: the value stays a plain number under its own key (every
|
|
71862
|
+
* reader of the raw settings bag keeps working), and the binding is a SIBLING
|
|
71863
|
+
* key, {@link modelBindingKey}. Both are flat so the shallow per-key merges of
|
|
71864
|
+
* the settings layers (node fold, camera override) carry a value and its
|
|
71865
|
+
* binding together whenever one layer writes both — which every writer here
|
|
71866
|
+
* does.
|
|
71867
|
+
*
|
|
71868
|
+
* Lives in the bare `@camstack/types` entry, which every addon bundles, so the
|
|
71869
|
+
* runner (`addon-pipeline`) and the editors (`ui-library`, `addon-admin-ui`)
|
|
71870
|
+
* apply the same rule.
|
|
71871
|
+
*/
|
|
71872
|
+
/** Suffix of the sibling key that names the model a stored value was made for. */
|
|
71873
|
+
var MODEL_BINDING_SUFFIX = "ModelId";
|
|
71874
|
+
/** `minConfidencePerson` → `minConfidencePersonModelId`. */
|
|
71875
|
+
function modelBindingKey(key) {
|
|
71876
|
+
return `${key}${MODEL_BINDING_SUFFIX}`;
|
|
71877
|
+
}
|
|
71878
|
+
/** The model a stored value was made for, or `undefined` when unbound. */
|
|
71879
|
+
function storedBinding(settings, key) {
|
|
71880
|
+
const binding = settings?.[modelBindingKey(key)];
|
|
71881
|
+
return typeof binding === "string" && binding.length > 0 ? binding : void 0;
|
|
71882
|
+
}
|
|
71883
|
+
/**
|
|
71884
|
+
* The effective value of `key` for the model that runs (`runningModelId`,
|
|
71885
|
+
* `undefined` when unknown — it then matches no binding).
|
|
71886
|
+
*/
|
|
71887
|
+
function resolveModelBoundSetting(settings, key, runningModelId, modelDefault, globalDefault) {
|
|
71888
|
+
const stored = settings?.[key];
|
|
71889
|
+
const binding = storedBinding(settings, key);
|
|
71890
|
+
if (stored !== void 0 && binding === void 0) return {
|
|
71891
|
+
value: stored,
|
|
71892
|
+
source: "override"
|
|
71893
|
+
};
|
|
71894
|
+
if (stored !== void 0 && binding !== void 0 && binding === runningModelId) return {
|
|
71895
|
+
value: stored,
|
|
71896
|
+
source: "override",
|
|
71897
|
+
boundModelId: binding
|
|
71898
|
+
};
|
|
71899
|
+
const inapplicable = stored !== void 0 && binding !== void 0 ? { inapplicableOverride: {
|
|
71900
|
+
value: stored,
|
|
71901
|
+
modelId: binding
|
|
71902
|
+
} } : {};
|
|
71903
|
+
if (modelDefault !== void 0) return {
|
|
71904
|
+
value: modelDefault,
|
|
71905
|
+
source: "model-default",
|
|
71906
|
+
...inapplicable
|
|
71907
|
+
};
|
|
71908
|
+
return {
|
|
71909
|
+
value: globalDefault,
|
|
71910
|
+
source: "global-default",
|
|
71911
|
+
...inapplicable
|
|
71912
|
+
};
|
|
71913
|
+
}
|
|
71914
|
+
/**
|
|
71915
|
+
* The OPERATOR layer of a step's settings as the running model sees it: every
|
|
71916
|
+
* model-bound value made for another model is removed (so the default
|
|
71917
|
+
* underneath — the running model's — wins the merge), and every binding key is
|
|
71918
|
+
* stripped. Unbound values are kept. Returns a fresh object; `undefined` stays
|
|
71919
|
+
* `undefined`.
|
|
71920
|
+
*/
|
|
71921
|
+
function applyModelBoundSettings(settings, boundKeys, runningModelId) {
|
|
71922
|
+
if (settings === void 0) return void 0;
|
|
71923
|
+
const out = { ...settings };
|
|
71924
|
+
for (const key of boundKeys) {
|
|
71925
|
+
const binding = storedBinding(settings, key);
|
|
71926
|
+
if (binding !== void 0 && binding !== runningModelId) delete out[key];
|
|
71927
|
+
delete out[modelBindingKey(key)];
|
|
71928
|
+
}
|
|
71929
|
+
return out;
|
|
71930
|
+
}
|
|
71931
|
+
/** Store `value` for `key`, made for `modelId`. Returns a fresh object. */
|
|
71932
|
+
function writeModelBoundSetting(settings, key, value, modelId) {
|
|
71933
|
+
return {
|
|
71934
|
+
...settings,
|
|
71935
|
+
[key]: value,
|
|
71936
|
+
[modelBindingKey(key)]: modelId
|
|
71937
|
+
};
|
|
71938
|
+
}
|
|
71939
|
+
/** Remove an override and its binding — "reset to the model default". */
|
|
71940
|
+
function clearModelBoundSetting(settings, key) {
|
|
71941
|
+
const out = { ...settings };
|
|
71942
|
+
delete out[key];
|
|
71943
|
+
delete out[modelBindingKey(key)];
|
|
71944
|
+
return out;
|
|
71945
|
+
}
|
|
71946
|
+
/** True when any of `boundKeys` has an override IN FORCE for `modelId`. */
|
|
71947
|
+
function hasModelBoundOverrides(settings, boundKeys, modelId) {
|
|
71948
|
+
return boundKeys.some((key) => resolveModelBoundSetting(settings, key, modelId, void 0, void 0).source === "override");
|
|
71949
|
+
}
|
|
71950
|
+
/**
|
|
71951
|
+
* "Reset thresholds to model defaults": remove every override of `boundKeys`
|
|
71952
|
+
* that is in force for `modelId` (bound to it, or unbound), with its binding —
|
|
71953
|
+
* one result, so the editor writes it in one save. An override stored for
|
|
71954
|
+
* ANOTHER model is kept: it is not in force here, and it applies again when
|
|
71955
|
+
* that model runs.
|
|
71956
|
+
*/
|
|
71957
|
+
function clearModelBoundOverrides(settings, boundKeys, modelId) {
|
|
71958
|
+
return boundKeys.reduce((acc, key) => resolveModelBoundSetting(acc, key, modelId, void 0, void 0).source === "override" ? clearModelBoundSetting(acc, key) : acc, { ...settings });
|
|
71959
|
+
}
|
|
71960
|
+
//#endregion
|
|
71719
71961
|
//#region src/pipeline/root-face-crop.ts
|
|
71720
71962
|
/** Side of the square, as a multiple of the face box's longer side. */
|
|
71721
71963
|
var ROOT_FACE_REFINE_SCALE = 1.6;
|
|
@@ -74394,8 +74636,10 @@ exports.FEEDER_EXAMPLE_ADDON_ID = FEEDER_EXAMPLE_ADDON_ID;
|
|
|
74394
74636
|
exports.FEEDER_EXAMPLE_HA_DEVICE_ID = FEEDER_EXAMPLE_HA_DEVICE_ID;
|
|
74395
74637
|
exports.FFMPEG_PATH_ENV = require_composition.FFMPEG_PATH_ENV;
|
|
74396
74638
|
exports.FIRST_LEVEL_MACRO_CLASSES = FIRST_LEVEL_MACRO_CLASSES;
|
|
74639
|
+
exports.FRIGATE_PLUS_CLASS_FLOORS = FRIGATE_PLUS_CLASS_FLOORS;
|
|
74397
74640
|
exports.FRIGATE_PLUS_TO_MACRO = FRIGATE_PLUS_TO_MACRO;
|
|
74398
74641
|
exports.FRIGATE_PLUS_UNMAPPED_LABELS = FRIGATE_PLUS_UNMAPPED_LABELS;
|
|
74642
|
+
exports.FRIGATE_STOCK_CLASS_FLOORS = FRIGATE_STOCK_CLASS_FLOORS;
|
|
74399
74643
|
exports.FULL_IMAGE_BBOX = FULL_IMAGE_BBOX;
|
|
74400
74644
|
exports.FailureContributionSchema = FailureContributionSchema;
|
|
74401
74645
|
exports.FailureCounters = FailureCounters;
|
|
@@ -74541,6 +74785,8 @@ exports.LoginMethodContributionSchema = LoginMethodContributionSchema;
|
|
|
74541
74785
|
exports.LoginStageEnum = LoginStageEnum;
|
|
74542
74786
|
exports.LtsBucketSchema = LtsBucketSchema;
|
|
74543
74787
|
exports.MACRO_LABELS = MACRO_LABELS;
|
|
74788
|
+
exports.MASK_EMITTING_POSTPROCESSORS = MASK_EMITTING_POSTPROCESSORS;
|
|
74789
|
+
exports.MASK_SUPPLY_STEP_IDS = MASK_SUPPLY_STEP_IDS;
|
|
74544
74790
|
exports.MAX_ARCHIVED_DEBUG_NOTES = MAX_ARCHIVED_DEBUG_NOTES;
|
|
74545
74791
|
exports.MAX_BIRTH_DECISION_RECORDS = MAX_BIRTH_DECISION_RECORDS;
|
|
74546
74792
|
exports.MAX_BIRTH_LATENCY_PROXY_MS = MAX_BIRTH_LATENCY_PROXY_MS;
|
|
@@ -75383,6 +75629,7 @@ exports.ambientLightSensorCapability = ambientLightSensorCapability;
|
|
|
75383
75629
|
exports.applyBlockingEdit = applyBlockingEdit;
|
|
75384
75630
|
exports.applyModeDelaysEdits = applyModeDelaysEdits;
|
|
75385
75631
|
exports.applyModeDeviceListEdit = applyModeDeviceListEdit;
|
|
75632
|
+
exports.applyModelBoundSettings = applyModelBoundSettings;
|
|
75386
75633
|
exports.applyNonBlockingEdit = applyNonBlockingEdit;
|
|
75387
75634
|
exports.applySecureOnArmEdit = applySecureOnArmEdit;
|
|
75388
75635
|
exports.asBoolean = require_sleep.asBoolean;
|
|
@@ -75447,6 +75694,8 @@ exports.checkRoleAddress = checkRoleAddress;
|
|
|
75447
75694
|
exports.classifyBearerPrincipal = classifyBearerPrincipal;
|
|
75448
75695
|
exports.classifyStream = classifyStream;
|
|
75449
75696
|
exports.classifyStreams = classifyStreams;
|
|
75697
|
+
exports.clearModelBoundOverrides = clearModelBoundOverrides;
|
|
75698
|
+
exports.clearModelBoundSetting = clearModelBoundSetting;
|
|
75450
75699
|
exports.climateControlCapability = climateControlCapability;
|
|
75451
75700
|
exports.clipExportFailure = clipExportFailure;
|
|
75452
75701
|
exports.clipExportFailureOf = clipExportFailureOf;
|
|
@@ -75531,6 +75780,7 @@ exports.deleteAlarmProfile = deleteAlarmProfile;
|
|
|
75531
75780
|
exports.deriveBatteryPresence = deriveBatteryPresence;
|
|
75532
75781
|
exports.deriveCameraSwitches = deriveCameraSwitches;
|
|
75533
75782
|
exports.deriveDetailCropRect = deriveDetailCropRect;
|
|
75783
|
+
exports.deriveMaskSupplies = deriveMaskSupplies;
|
|
75534
75784
|
exports.derivePostTriggeredAction = derivePostTriggeredAction;
|
|
75535
75785
|
exports.deriveRecordingMode = deriveRecordingMode;
|
|
75536
75786
|
exports.deriveRootFaceRefineRect = deriveRootFaceRefineRect;
|
|
@@ -75634,6 +75884,7 @@ exports.formatForRuntime = formatForRuntime;
|
|
|
75634
75884
|
exports.formatMediaOwnerKey = formatMediaOwnerKey;
|
|
75635
75885
|
exports.formatMinutes = formatMinutes;
|
|
75636
75886
|
exports.formatParkedFor = formatParkedFor;
|
|
75887
|
+
exports.frigateDefaultClassFloors = frigateDefaultClassFloors;
|
|
75637
75888
|
exports.frigateLabelFields = frigateLabelFields;
|
|
75638
75889
|
exports.gasCapability = gasCapability;
|
|
75639
75890
|
exports.gbToBytes = gbToBytes;
|
|
@@ -75646,6 +75897,7 @@ exports.getTaxonomyEntry = getTaxonomyEntry;
|
|
|
75646
75897
|
exports.gifDeriveSpeed = gifDeriveSpeed;
|
|
75647
75898
|
exports.gifFilterComplex = gifFilterComplex;
|
|
75648
75899
|
exports.gifFromMp4Args = gifFromMp4Args;
|
|
75900
|
+
exports.hasModelBoundOverrides = hasModelBoundOverrides;
|
|
75649
75901
|
exports.hasMotionTrigger = hasMotionTrigger;
|
|
75650
75902
|
exports.hfModelUrl = hfModelUrl;
|
|
75651
75903
|
exports.htmlToText = htmlToText;
|
|
@@ -75768,6 +76020,7 @@ exports.migrateLegacyDeviceSignalConfig = migrateLegacyDeviceSignalConfig;
|
|
|
75768
76020
|
exports.minutesToTimeOfDay = minutesToTimeOfDay;
|
|
75769
76021
|
exports.modeMayRead = modeMayRead;
|
|
75770
76022
|
exports.modeMayWrite = modeMayWrite;
|
|
76023
|
+
exports.modelBindingKey = modelBindingKey;
|
|
75771
76024
|
exports.modelConvertCapability = modelConvertCapability;
|
|
75772
76025
|
exports.modelDistributorCapability = modelDistributorCapability;
|
|
75773
76026
|
exports.modelFormatForRuntime = modelFormatForRuntime;
|
|
@@ -75907,6 +76160,7 @@ exports.resolveLocationMode = resolveLocationMode;
|
|
|
75907
76160
|
exports.resolveMethodAuth = resolveMethodAuth;
|
|
75908
76161
|
exports.resolveModeDelays = resolveModeDelays;
|
|
75909
76162
|
exports.resolveModeNotifyPolicy = resolveModeNotifyPolicy;
|
|
76163
|
+
exports.resolveModelBoundSetting = resolveModelBoundSetting;
|
|
75910
76164
|
exports.resolveMutate = resolveMutate;
|
|
75911
76165
|
exports.resolveNotificationTapAddress = resolveNotificationTapAddress;
|
|
75912
76166
|
exports.resolvePoolMemoryPolicy = resolvePoolMemoryPolicy;
|
|
@@ -76067,6 +76321,7 @@ exports.wiringNodeHealthSchema = wiringNodeHealthSchema;
|
|
|
76067
76321
|
exports.wiringProbeKindSchema = wiringProbeKindSchema;
|
|
76068
76322
|
exports.wiringProbeResultSchema = wiringProbeResultSchema;
|
|
76069
76323
|
exports.withLocationMode = withLocationMode;
|
|
76324
|
+
exports.writeModelBoundSetting = writeModelBoundSetting;
|
|
76070
76325
|
exports.zodEntriesToConfigUI = zodEntriesToConfigUI;
|
|
76071
76326
|
exports.zoneAnalyticsCapability = zoneAnalyticsCapability;
|
|
76072
76327
|
exports.zoneRulesCapability = zoneRulesCapability;
|