@camstack/types 1.2.305 → 1.2.307

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/index.js CHANGED
@@ -5346,6 +5346,567 @@ function resolveClipSearchMinScore(meta, request) {
5346
5346
  return Math.min(1, Math.round(meta.searchMinScore * factor * 1e3) / 1e3);
5347
5347
  }
5348
5348
  //#endregion
5349
+ //#region src/catalogs/coco-classmap.ts
5350
+ var COCO_80_LABELS = [
5351
+ {
5352
+ id: "person",
5353
+ name: "Person"
5354
+ },
5355
+ {
5356
+ id: "bicycle",
5357
+ name: "Bicycle"
5358
+ },
5359
+ {
5360
+ id: "car",
5361
+ name: "Car"
5362
+ },
5363
+ {
5364
+ id: "motorcycle",
5365
+ name: "Motorcycle"
5366
+ },
5367
+ {
5368
+ id: "airplane",
5369
+ name: "Airplane"
5370
+ },
5371
+ {
5372
+ id: "bus",
5373
+ name: "Bus"
5374
+ },
5375
+ {
5376
+ id: "train",
5377
+ name: "Train"
5378
+ },
5379
+ {
5380
+ id: "truck",
5381
+ name: "Truck"
5382
+ },
5383
+ {
5384
+ id: "boat",
5385
+ name: "Boat"
5386
+ },
5387
+ {
5388
+ id: "traffic light",
5389
+ name: "Traffic Light"
5390
+ },
5391
+ {
5392
+ id: "fire hydrant",
5393
+ name: "Fire Hydrant"
5394
+ },
5395
+ {
5396
+ id: "stop sign",
5397
+ name: "Stop Sign"
5398
+ },
5399
+ {
5400
+ id: "parking meter",
5401
+ name: "Parking Meter"
5402
+ },
5403
+ {
5404
+ id: "bench",
5405
+ name: "Bench"
5406
+ },
5407
+ {
5408
+ id: "bird",
5409
+ name: "Bird"
5410
+ },
5411
+ {
5412
+ id: "cat",
5413
+ name: "Cat"
5414
+ },
5415
+ {
5416
+ id: "dog",
5417
+ name: "Dog"
5418
+ },
5419
+ {
5420
+ id: "horse",
5421
+ name: "Horse"
5422
+ },
5423
+ {
5424
+ id: "sheep",
5425
+ name: "Sheep"
5426
+ },
5427
+ {
5428
+ id: "cow",
5429
+ name: "Cow"
5430
+ },
5431
+ {
5432
+ id: "elephant",
5433
+ name: "Elephant"
5434
+ },
5435
+ {
5436
+ id: "bear",
5437
+ name: "Bear"
5438
+ },
5439
+ {
5440
+ id: "zebra",
5441
+ name: "Zebra"
5442
+ },
5443
+ {
5444
+ id: "giraffe",
5445
+ name: "Giraffe"
5446
+ },
5447
+ {
5448
+ id: "backpack",
5449
+ name: "Backpack"
5450
+ },
5451
+ {
5452
+ id: "umbrella",
5453
+ name: "Umbrella"
5454
+ },
5455
+ {
5456
+ id: "handbag",
5457
+ name: "Handbag"
5458
+ },
5459
+ {
5460
+ id: "tie",
5461
+ name: "Tie"
5462
+ },
5463
+ {
5464
+ id: "suitcase",
5465
+ name: "Suitcase"
5466
+ },
5467
+ {
5468
+ id: "frisbee",
5469
+ name: "Frisbee"
5470
+ },
5471
+ {
5472
+ id: "skis",
5473
+ name: "Skis"
5474
+ },
5475
+ {
5476
+ id: "snowboard",
5477
+ name: "Snowboard"
5478
+ },
5479
+ {
5480
+ id: "sports ball",
5481
+ name: "Sports Ball"
5482
+ },
5483
+ {
5484
+ id: "kite",
5485
+ name: "Kite"
5486
+ },
5487
+ {
5488
+ id: "baseball bat",
5489
+ name: "Baseball Bat"
5490
+ },
5491
+ {
5492
+ id: "baseball glove",
5493
+ name: "Baseball Glove"
5494
+ },
5495
+ {
5496
+ id: "skateboard",
5497
+ name: "Skateboard"
5498
+ },
5499
+ {
5500
+ id: "surfboard",
5501
+ name: "Surfboard"
5502
+ },
5503
+ {
5504
+ id: "tennis racket",
5505
+ name: "Tennis Racket"
5506
+ },
5507
+ {
5508
+ id: "bottle",
5509
+ name: "Bottle"
5510
+ },
5511
+ {
5512
+ id: "wine glass",
5513
+ name: "Wine Glass"
5514
+ },
5515
+ {
5516
+ id: "cup",
5517
+ name: "Cup"
5518
+ },
5519
+ {
5520
+ id: "fork",
5521
+ name: "Fork"
5522
+ },
5523
+ {
5524
+ id: "knife",
5525
+ name: "Knife"
5526
+ },
5527
+ {
5528
+ id: "spoon",
5529
+ name: "Spoon"
5530
+ },
5531
+ {
5532
+ id: "bowl",
5533
+ name: "Bowl"
5534
+ },
5535
+ {
5536
+ id: "banana",
5537
+ name: "Banana"
5538
+ },
5539
+ {
5540
+ id: "apple",
5541
+ name: "Apple"
5542
+ },
5543
+ {
5544
+ id: "sandwich",
5545
+ name: "Sandwich"
5546
+ },
5547
+ {
5548
+ id: "orange",
5549
+ name: "Orange"
5550
+ },
5551
+ {
5552
+ id: "broccoli",
5553
+ name: "Broccoli"
5554
+ },
5555
+ {
5556
+ id: "carrot",
5557
+ name: "Carrot"
5558
+ },
5559
+ {
5560
+ id: "hot dog",
5561
+ name: "Hot Dog"
5562
+ },
5563
+ {
5564
+ id: "pizza",
5565
+ name: "Pizza"
5566
+ },
5567
+ {
5568
+ id: "donut",
5569
+ name: "Donut"
5570
+ },
5571
+ {
5572
+ id: "cake",
5573
+ name: "Cake"
5574
+ },
5575
+ {
5576
+ id: "chair",
5577
+ name: "Chair"
5578
+ },
5579
+ {
5580
+ id: "couch",
5581
+ name: "Couch"
5582
+ },
5583
+ {
5584
+ id: "potted plant",
5585
+ name: "Potted Plant"
5586
+ },
5587
+ {
5588
+ id: "bed",
5589
+ name: "Bed"
5590
+ },
5591
+ {
5592
+ id: "dining table",
5593
+ name: "Dining Table"
5594
+ },
5595
+ {
5596
+ id: "toilet",
5597
+ name: "Toilet"
5598
+ },
5599
+ {
5600
+ id: "tv",
5601
+ name: "TV"
5602
+ },
5603
+ {
5604
+ id: "laptop",
5605
+ name: "Laptop"
5606
+ },
5607
+ {
5608
+ id: "mouse",
5609
+ name: "Mouse"
5610
+ },
5611
+ {
5612
+ id: "remote",
5613
+ name: "Remote"
5614
+ },
5615
+ {
5616
+ id: "keyboard",
5617
+ name: "Keyboard"
5618
+ },
5619
+ {
5620
+ id: "cell phone",
5621
+ name: "Cell Phone"
5622
+ },
5623
+ {
5624
+ id: "microwave",
5625
+ name: "Microwave"
5626
+ },
5627
+ {
5628
+ id: "oven",
5629
+ name: "Oven"
5630
+ },
5631
+ {
5632
+ id: "toaster",
5633
+ name: "Toaster"
5634
+ },
5635
+ {
5636
+ id: "sink",
5637
+ name: "Sink"
5638
+ },
5639
+ {
5640
+ id: "refrigerator",
5641
+ name: "Refrigerator"
5642
+ },
5643
+ {
5644
+ id: "book",
5645
+ name: "Book"
5646
+ },
5647
+ {
5648
+ id: "clock",
5649
+ name: "Clock"
5650
+ },
5651
+ {
5652
+ id: "vase",
5653
+ name: "Vase"
5654
+ },
5655
+ {
5656
+ id: "scissors",
5657
+ name: "Scissors"
5658
+ },
5659
+ {
5660
+ id: "teddy bear",
5661
+ name: "Teddy Bear"
5662
+ },
5663
+ {
5664
+ id: "hair drier",
5665
+ name: "Hair Drier"
5666
+ },
5667
+ {
5668
+ id: "toothbrush",
5669
+ name: "Toothbrush"
5670
+ }
5671
+ ];
5672
+ var MACRO_LABELS = [
5673
+ {
5674
+ id: "person",
5675
+ name: "Person"
5676
+ },
5677
+ {
5678
+ id: "vehicle",
5679
+ name: "Vehicle"
5680
+ },
5681
+ {
5682
+ id: "animal",
5683
+ name: "Animal"
5684
+ },
5685
+ {
5686
+ id: "package",
5687
+ name: "Package"
5688
+ }
5689
+ ];
5690
+ /**
5691
+ * The class names a per-class COUNT can ever be keyed on — the macro ids, and
5692
+ * only those.
5693
+ *
5694
+ * `preserveOriginal: false` below is the whole reason this set exists: the
5695
+ * executor maps each raw COCO label onto its macro and DROPS everything else,
5696
+ * so a tracked detection's `className` is always one of {@link MACRO_LABELS}.
5697
+ * Any surface that indexes counts by class name — the ZoneAnalytics occupancy
5698
+ * snapshot's `byClass`, and therefore every occupancy rule — can match nothing
5699
+ * else. Derived from the catalog, never hand-listed, so a new macro joins it by
5700
+ * being declared once.
5701
+ *
5702
+ * Cost of not having it, 2026-08-12: the notification rule editor offered the
5703
+ * full taxonomy for an occupancy class (occupancy is the one condition that
5704
+ * does not go through the engine's macro-expanding `expandClassSelector`), two
5705
+ * live rules were authored on `car`, and both counters read 0 forever.
5706
+ */
5707
+ var DETECTION_MACRO_CLASSES = new Set(MACRO_LABELS.map((l) => l.id));
5708
+ /** True when `className` is a macro the detector can actually emit (and hence a
5709
+ * class a count can be keyed on) — see {@link DETECTION_MACRO_CLASSES}. */
5710
+ function isDetectionMacroClass(className) {
5711
+ return DETECTION_MACRO_CLASSES.has(className.trim().toLowerCase());
5712
+ }
5713
+ var COCO_TO_MACRO = {
5714
+ mapping: {
5715
+ person: "person",
5716
+ bicycle: "vehicle",
5717
+ car: "vehicle",
5718
+ motorcycle: "vehicle",
5719
+ airplane: "vehicle",
5720
+ bus: "vehicle",
5721
+ train: "vehicle",
5722
+ truck: "vehicle",
5723
+ boat: "vehicle",
5724
+ bird: "animal",
5725
+ cat: "animal",
5726
+ dog: "animal",
5727
+ horse: "animal",
5728
+ sheep: "animal",
5729
+ cow: "animal",
5730
+ elephant: "animal",
5731
+ bear: "animal",
5732
+ zebra: "animal",
5733
+ giraffe: "animal",
5734
+ suitcase: "package",
5735
+ backpack: "package",
5736
+ handbag: "package"
5737
+ },
5738
+ preserveOriginal: false
5739
+ };
5740
+ //#endregion
5741
+ //#region src/catalogs/classifier-fill.ts
5742
+ /** Steps a root detector may declare it fills. */
5743
+ var FILLABLE_STEP_IDS = [
5744
+ "animal-classifier",
5745
+ "vehicle-classifier",
5746
+ "package-detection"
5747
+ ];
5748
+ /** Narrow a step id to a fillable one — type guard, not a cast. */
5749
+ function isFillableStepId(value) {
5750
+ return FILLABLE_STEP_IDS.some((id) => id === value);
5751
+ }
5752
+ /**
5753
+ * The EFFECT vocabulary of each fillable step: exactly the strings the step
5754
+ * itself emits, in its own spelling. A linked label is one of these and nothing
5755
+ * else, so a tier-1 value means the same thing whichever writer produced it.
5756
+ *
5757
+ * - `animal-classifier`: the PRIMARY model's `-labels.json` (Open Images V7,
5758
+ * 8 classes) — also the species allow-list the step offers.
5759
+ * - `vehicle-classifier`: `vehicle-type-v1-labels.json`, capitalised as the
5760
+ * model emits them (the classifier writes `winner.class` verbatim).
5761
+ * - `package-detection`: its one output class.
5762
+ *
5763
+ * `scripts/check-label-link-vocabulary.ts` fails the build if a model entry's
5764
+ * `labelToEffect` names anything outside this table.
5765
+ */
5766
+ var FILLABLE_STEP_VOCABULARIES = {
5767
+ "animal-classifier": [
5768
+ "bird",
5769
+ "cat",
5770
+ "cow",
5771
+ "deer",
5772
+ "dog",
5773
+ "horse",
5774
+ "sheep",
5775
+ "squirrel"
5776
+ ],
5777
+ "vehicle-classifier": [
5778
+ "Ambulance",
5779
+ "Bicycle",
5780
+ "Bus",
5781
+ "Car",
5782
+ "Motorcycle",
5783
+ "Taxi",
5784
+ "Truck",
5785
+ "Van"
5786
+ ],
5787
+ "package-detection": ["package"]
5788
+ };
5789
+ /** The macro a detection must carry for the step to apply to it. */
5790
+ var FILLABLE_STEP_MACRO = {
5791
+ "animal-classifier": "animal",
5792
+ "vehicle-classifier": "vehicle",
5793
+ "package-detection": "package"
5794
+ };
5795
+ /**
5796
+ * Raw detector labels that name a vocabulary entry under another spelling.
5797
+ * Case-insensitive equality covers the rest (`car` → `Car`).
5798
+ */
5799
+ var EFFECT_ALIASES = {
5800
+ "animal-classifier": {},
5801
+ "vehicle-classifier": {
5802
+ school_bus: "Bus",
5803
+ garbage_truck: "Truck"
5804
+ },
5805
+ "package-detection": {}
5806
+ };
5807
+ /** The policy values of a step's `labelLink` setting. */
5808
+ var LABEL_LINK_POLICIES = ["run", "skip-when-filled"];
5809
+ /** Absent setting ⇒ this. It changes nothing unless the root model declares a fill. */
5810
+ var DEFAULT_LABEL_LINK_POLICY = "skip-when-filled";
5811
+ /** The step-settings key the policy is stored under (DeviceStepConfig.settings). */
5812
+ var LABEL_LINK_SETTING_KEY = "labelLink";
5813
+ /** `ScoredLabel.stepId` prefix of a label the detector wrote for a step. */
5814
+ var LINKED_LABEL_STEP_PREFIX = "detector-link:";
5815
+ /** `detector-link:<stepId>` — the attribution of a linked label. */
5816
+ function linkedLabelStepId(stepId) {
5817
+ return `${LINKED_LABEL_STEP_PREFIX}${stepId}`;
5818
+ }
5819
+ /** The step a linked label stands in for, or `undefined` for any other attribution. */
5820
+ function linkedStepOf(attributionStepId) {
5821
+ if (attributionStepId === void 0) return void 0;
5822
+ if (!attributionStepId.startsWith("detector-link:")) return void 0;
5823
+ const stepId = attributionStepId.slice(14);
5824
+ return isFillableStepId(stepId) ? stepId : void 0;
5825
+ }
5826
+ /**
5827
+ * A labelmap is COCO when it carries at least half of the COCO-80 classes. A
5828
+ * COCO detector NEVER fills a step (operator decision, D715): its `dog` / `car`
5829
+ * is the generic class the classifier exists to refine, and its six animal
5830
+ * classes would otherwise read as "fills animal-classifier 6/8". Frigate+
5831
+ * shares about a dozen COCO names; a COCO-80 or COCO-91 labelmap carries ~80.
5832
+ */
5833
+ function isCocoLabelmap(labels) {
5834
+ const present = new Set(labels);
5835
+ return COCO_80_LABELS.filter((l) => present.has(l.id)).length * 2 >= COCO_80_LABELS.length;
5836
+ }
5837
+ function effectFor(stepId, label) {
5838
+ const alias = EFFECT_ALIASES[stepId][label];
5839
+ if (alias !== void 0) return alias;
5840
+ const folded = label.toLowerCase();
5841
+ return FILLABLE_STEP_VOCABULARIES[stepId].find((v) => v.toLowerCase() === folded);
5842
+ }
5843
+ /**
5844
+ * Which steps a root detector fills, from its labelmap and classMap. A label
5845
+ * counts for a step only when the model's classMap sends it to that step's
5846
+ * macro AND it names a vocabulary entry. A step none of the labels reach is
5847
+ * not declared; a COCO labelmap declares nothing.
5848
+ */
5849
+ function deriveClassifierFills(labels, classMap) {
5850
+ if (classMap === void 0 || isCocoLabelmap(labels)) return [];
5851
+ const fills = [];
5852
+ for (const stepId of FILLABLE_STEP_IDS) {
5853
+ const labelToEffect = {};
5854
+ for (const label of labels) {
5855
+ if (classMap.mapping[label] !== FILLABLE_STEP_MACRO[stepId]) continue;
5856
+ const effect = effectFor(stepId, label);
5857
+ if (effect !== void 0) labelToEffect[label] = effect;
5858
+ }
5859
+ const covered = new Set(Object.values(labelToEffect));
5860
+ if (covered.size === 0) continue;
5861
+ const uncovered = FILLABLE_STEP_VOCABULARIES[stepId].filter((v) => !covered.has(v));
5862
+ fills.push({
5863
+ stepId,
5864
+ labelToEffect,
5865
+ uncovered
5866
+ });
5867
+ }
5868
+ return fills;
5869
+ }
5870
+ /** The fill a model declares for one step, if any. */
5871
+ function fillFor(entry, stepId) {
5872
+ return entry?.fillsClassifierEffects?.find((f) => f.stepId === stepId);
5873
+ }
5874
+ /** Read the `labelLink` policy off a step's settings bag; anything else ⇒ the default. */
5875
+ function readLabelLinkPolicy(settings) {
5876
+ const raw = settings?.[LABEL_LINK_SETTING_KEY];
5877
+ return LABEL_LINK_POLICIES.find((p) => p === raw) ?? "skip-when-filled";
5878
+ }
5879
+ /**
5880
+ * Decide the writer of one filled effect for one camera.
5881
+ *
5882
+ * - The step is not running (disabled, or not in the camera's tree): the
5883
+ * detector is the only writer — authoritative, nothing to skip.
5884
+ * - The step runs, the policy is `skip-when-filled` and every coverage gap is
5885
+ * switched off in `enabledClasses`: the detector is authoritative and the
5886
+ * step is skipped.
5887
+ * - Otherwise the step runs and is the writer; the linked label is a score-0
5888
+ * fallback.
5889
+ */
5890
+ function resolveLabelLink(fill, step) {
5891
+ const policy = readLabelLinkPolicy(step?.settings);
5892
+ const rawEnabled = step?.settings?.["enabledClasses"];
5893
+ const allowList = Array.isArray(rawEnabled) && rawEnabled.length > 0 ? rawEnabled.filter((v) => typeof v === "string") : null;
5894
+ const openGaps = fill.uncovered.filter((g) => allowList === null || allowList.includes(g));
5895
+ if (step === void 0 || !step.enabled) return {
5896
+ authoritative: true,
5897
+ skip: false,
5898
+ policy,
5899
+ openGaps
5900
+ };
5901
+ const skip = policy === "skip-when-filled" && openGaps.length === 0;
5902
+ return {
5903
+ authoritative: skip,
5904
+ skip,
5905
+ policy,
5906
+ openGaps
5907
+ };
5908
+ }
5909
+ //#endregion
5349
5910
  //#region src/types/models.ts
5350
5911
  var MODEL_FORMATS = [
5351
5912
  "onnx",
@@ -5501,6 +6062,12 @@ var ModelLicenseRecordSchema = zod.z.object({
5501
6062
  * `camstack/docs` → `/docs/detection/models`.
5502
6063
  */
5503
6064
  var ModelLicenseSchema = zod.z.preprocess((value) => typeof value === "string" ? { weights: value } : value, ModelLicenseRecordSchema);
6065
+ /** One `fillsClassifierEffects` entry — see `ModelCatalogEntry.fillsClassifierEffects`. */
6066
+ var FillsClassifierEffectSchema = zod.z.object({
6067
+ stepId: zod.z.enum(FILLABLE_STEP_IDS),
6068
+ labelToEffect: zod.z.record(zod.z.string(), zod.z.string()),
6069
+ uncovered: zod.z.array(zod.z.string()).readonly()
6070
+ });
5504
6071
  var ModelCatalogEntrySchema = zod.z.object({
5505
6072
  id: zod.z.string(),
5506
6073
  name: zod.z.string(),
@@ -5627,6 +6194,16 @@ var ModelCatalogEntrySchema = zod.z.object({
5627
6194
  */
5628
6195
  classMap: DetectionCatalogClassMapSchema.optional(),
5629
6196
  /**
6197
+ * The pipeline steps this ROOT detector already does the work of (D715):
6198
+ * its labels name the effect the step exists to produce (`deer` for
6199
+ * `animal-classifier`, `package` for `package-detection`). Derived from the
6200
+ * labelmap by `deriveClassifierFills`, never hand-written; a COCO model
6201
+ * declares none. Whether a declaration is honoured is the step's own
6202
+ * `labelLink` policy (`resolveLabelLink`). `labelToEffect` values are in
6203
+ * `FILLABLE_STEP_VOCABULARIES` (guard `check-label-link-vocabulary`).
6204
+ */
6205
+ fillsClassifierEffects: zod.z.array(FillsClassifierEffectSchema).readonly().optional(),
6206
+ /**
5630
6207
  * The model's CLIP feature-space contract (text encoder, dimension, vector
5631
6208
  * index, token window, search floor) — see `clip-model.ts`. Present ONLY on a
5632
6209
  * CLIP image encoder; its absence is what "not a CLIP model" means to the
@@ -18014,398 +18591,6 @@ var notificationOutputCapability = {
18014
18591
  }
18015
18592
  };
18016
18593
  //#endregion
18017
- //#region src/catalogs/coco-classmap.ts
18018
- var COCO_80_LABELS = [
18019
- {
18020
- id: "person",
18021
- name: "Person"
18022
- },
18023
- {
18024
- id: "bicycle",
18025
- name: "Bicycle"
18026
- },
18027
- {
18028
- id: "car",
18029
- name: "Car"
18030
- },
18031
- {
18032
- id: "motorcycle",
18033
- name: "Motorcycle"
18034
- },
18035
- {
18036
- id: "airplane",
18037
- name: "Airplane"
18038
- },
18039
- {
18040
- id: "bus",
18041
- name: "Bus"
18042
- },
18043
- {
18044
- id: "train",
18045
- name: "Train"
18046
- },
18047
- {
18048
- id: "truck",
18049
- name: "Truck"
18050
- },
18051
- {
18052
- id: "boat",
18053
- name: "Boat"
18054
- },
18055
- {
18056
- id: "traffic light",
18057
- name: "Traffic Light"
18058
- },
18059
- {
18060
- id: "fire hydrant",
18061
- name: "Fire Hydrant"
18062
- },
18063
- {
18064
- id: "stop sign",
18065
- name: "Stop Sign"
18066
- },
18067
- {
18068
- id: "parking meter",
18069
- name: "Parking Meter"
18070
- },
18071
- {
18072
- id: "bench",
18073
- name: "Bench"
18074
- },
18075
- {
18076
- id: "bird",
18077
- name: "Bird"
18078
- },
18079
- {
18080
- id: "cat",
18081
- name: "Cat"
18082
- },
18083
- {
18084
- id: "dog",
18085
- name: "Dog"
18086
- },
18087
- {
18088
- id: "horse",
18089
- name: "Horse"
18090
- },
18091
- {
18092
- id: "sheep",
18093
- name: "Sheep"
18094
- },
18095
- {
18096
- id: "cow",
18097
- name: "Cow"
18098
- },
18099
- {
18100
- id: "elephant",
18101
- name: "Elephant"
18102
- },
18103
- {
18104
- id: "bear",
18105
- name: "Bear"
18106
- },
18107
- {
18108
- id: "zebra",
18109
- name: "Zebra"
18110
- },
18111
- {
18112
- id: "giraffe",
18113
- name: "Giraffe"
18114
- },
18115
- {
18116
- id: "backpack",
18117
- name: "Backpack"
18118
- },
18119
- {
18120
- id: "umbrella",
18121
- name: "Umbrella"
18122
- },
18123
- {
18124
- id: "handbag",
18125
- name: "Handbag"
18126
- },
18127
- {
18128
- id: "tie",
18129
- name: "Tie"
18130
- },
18131
- {
18132
- id: "suitcase",
18133
- name: "Suitcase"
18134
- },
18135
- {
18136
- id: "frisbee",
18137
- name: "Frisbee"
18138
- },
18139
- {
18140
- id: "skis",
18141
- name: "Skis"
18142
- },
18143
- {
18144
- id: "snowboard",
18145
- name: "Snowboard"
18146
- },
18147
- {
18148
- id: "sports ball",
18149
- name: "Sports Ball"
18150
- },
18151
- {
18152
- id: "kite",
18153
- name: "Kite"
18154
- },
18155
- {
18156
- id: "baseball bat",
18157
- name: "Baseball Bat"
18158
- },
18159
- {
18160
- id: "baseball glove",
18161
- name: "Baseball Glove"
18162
- },
18163
- {
18164
- id: "skateboard",
18165
- name: "Skateboard"
18166
- },
18167
- {
18168
- id: "surfboard",
18169
- name: "Surfboard"
18170
- },
18171
- {
18172
- id: "tennis racket",
18173
- name: "Tennis Racket"
18174
- },
18175
- {
18176
- id: "bottle",
18177
- name: "Bottle"
18178
- },
18179
- {
18180
- id: "wine glass",
18181
- name: "Wine Glass"
18182
- },
18183
- {
18184
- id: "cup",
18185
- name: "Cup"
18186
- },
18187
- {
18188
- id: "fork",
18189
- name: "Fork"
18190
- },
18191
- {
18192
- id: "knife",
18193
- name: "Knife"
18194
- },
18195
- {
18196
- id: "spoon",
18197
- name: "Spoon"
18198
- },
18199
- {
18200
- id: "bowl",
18201
- name: "Bowl"
18202
- },
18203
- {
18204
- id: "banana",
18205
- name: "Banana"
18206
- },
18207
- {
18208
- id: "apple",
18209
- name: "Apple"
18210
- },
18211
- {
18212
- id: "sandwich",
18213
- name: "Sandwich"
18214
- },
18215
- {
18216
- id: "orange",
18217
- name: "Orange"
18218
- },
18219
- {
18220
- id: "broccoli",
18221
- name: "Broccoli"
18222
- },
18223
- {
18224
- id: "carrot",
18225
- name: "Carrot"
18226
- },
18227
- {
18228
- id: "hot dog",
18229
- name: "Hot Dog"
18230
- },
18231
- {
18232
- id: "pizza",
18233
- name: "Pizza"
18234
- },
18235
- {
18236
- id: "donut",
18237
- name: "Donut"
18238
- },
18239
- {
18240
- id: "cake",
18241
- name: "Cake"
18242
- },
18243
- {
18244
- id: "chair",
18245
- name: "Chair"
18246
- },
18247
- {
18248
- id: "couch",
18249
- name: "Couch"
18250
- },
18251
- {
18252
- id: "potted plant",
18253
- name: "Potted Plant"
18254
- },
18255
- {
18256
- id: "bed",
18257
- name: "Bed"
18258
- },
18259
- {
18260
- id: "dining table",
18261
- name: "Dining Table"
18262
- },
18263
- {
18264
- id: "toilet",
18265
- name: "Toilet"
18266
- },
18267
- {
18268
- id: "tv",
18269
- name: "TV"
18270
- },
18271
- {
18272
- id: "laptop",
18273
- name: "Laptop"
18274
- },
18275
- {
18276
- id: "mouse",
18277
- name: "Mouse"
18278
- },
18279
- {
18280
- id: "remote",
18281
- name: "Remote"
18282
- },
18283
- {
18284
- id: "keyboard",
18285
- name: "Keyboard"
18286
- },
18287
- {
18288
- id: "cell phone",
18289
- name: "Cell Phone"
18290
- },
18291
- {
18292
- id: "microwave",
18293
- name: "Microwave"
18294
- },
18295
- {
18296
- id: "oven",
18297
- name: "Oven"
18298
- },
18299
- {
18300
- id: "toaster",
18301
- name: "Toaster"
18302
- },
18303
- {
18304
- id: "sink",
18305
- name: "Sink"
18306
- },
18307
- {
18308
- id: "refrigerator",
18309
- name: "Refrigerator"
18310
- },
18311
- {
18312
- id: "book",
18313
- name: "Book"
18314
- },
18315
- {
18316
- id: "clock",
18317
- name: "Clock"
18318
- },
18319
- {
18320
- id: "vase",
18321
- name: "Vase"
18322
- },
18323
- {
18324
- id: "scissors",
18325
- name: "Scissors"
18326
- },
18327
- {
18328
- id: "teddy bear",
18329
- name: "Teddy Bear"
18330
- },
18331
- {
18332
- id: "hair drier",
18333
- name: "Hair Drier"
18334
- },
18335
- {
18336
- id: "toothbrush",
18337
- name: "Toothbrush"
18338
- }
18339
- ];
18340
- var MACRO_LABELS = [
18341
- {
18342
- id: "person",
18343
- name: "Person"
18344
- },
18345
- {
18346
- id: "vehicle",
18347
- name: "Vehicle"
18348
- },
18349
- {
18350
- id: "animal",
18351
- name: "Animal"
18352
- },
18353
- {
18354
- id: "package",
18355
- name: "Package"
18356
- }
18357
- ];
18358
- /**
18359
- * The class names a per-class COUNT can ever be keyed on — the macro ids, and
18360
- * only those.
18361
- *
18362
- * `preserveOriginal: false` below is the whole reason this set exists: the
18363
- * executor maps each raw COCO label onto its macro and DROPS everything else,
18364
- * so a tracked detection's `className` is always one of {@link MACRO_LABELS}.
18365
- * Any surface that indexes counts by class name — the ZoneAnalytics occupancy
18366
- * snapshot's `byClass`, and therefore every occupancy rule — can match nothing
18367
- * else. Derived from the catalog, never hand-listed, so a new macro joins it by
18368
- * being declared once.
18369
- *
18370
- * Cost of not having it, 2026-08-12: the notification rule editor offered the
18371
- * full taxonomy for an occupancy class (occupancy is the one condition that
18372
- * does not go through the engine's macro-expanding `expandClassSelector`), two
18373
- * live rules were authored on `car`, and both counters read 0 forever.
18374
- */
18375
- var DETECTION_MACRO_CLASSES = new Set(MACRO_LABELS.map((l) => l.id));
18376
- /** True when `className` is a macro the detector can actually emit (and hence a
18377
- * class a count can be keyed on) — see {@link DETECTION_MACRO_CLASSES}. */
18378
- function isDetectionMacroClass(className) {
18379
- return DETECTION_MACRO_CLASSES.has(className.trim().toLowerCase());
18380
- }
18381
- var COCO_TO_MACRO = {
18382
- mapping: {
18383
- person: "person",
18384
- bicycle: "vehicle",
18385
- car: "vehicle",
18386
- motorcycle: "vehicle",
18387
- airplane: "vehicle",
18388
- bus: "vehicle",
18389
- train: "vehicle",
18390
- truck: "vehicle",
18391
- boat: "vehicle",
18392
- bird: "animal",
18393
- cat: "animal",
18394
- dog: "animal",
18395
- horse: "animal",
18396
- sheep: "animal",
18397
- cow: "animal",
18398
- elephant: "animal",
18399
- bear: "animal",
18400
- zebra: "animal",
18401
- giraffe: "animal",
18402
- suitcase: "package",
18403
- backpack: "package",
18404
- handbag: "package"
18405
- },
18406
- preserveOriginal: false
18407
- };
18408
- //#endregion
18409
18594
  //#region src/catalogs/audio-classmap.ts
18410
18595
  var AUDIO_MACRO_LABELS = [
18411
18596
  {
@@ -19240,6 +19425,8 @@ var NcSystemEventKindSchema = zod.z.enum([
19240
19425
  "stream-offline",
19241
19426
  "node-online",
19242
19427
  "node-offline",
19428
+ "node-restarting",
19429
+ "node-updating",
19243
19430
  "node-inference-unavailable",
19244
19431
  "detection-blind",
19245
19432
  "addon-crash-loop",
@@ -19768,7 +19955,7 @@ var NcLegacyRuleActionSequenceSchema = zod.z.object({
19768
19955
  minDelaySec: zod.z.number().int().min(0).max(86400).optional(),
19769
19956
  actions: zod.z.array(NcRuleActionSchema).min(1)
19770
19957
  });
19771
- /** @deprecated */
19958
+ /** @deprecated Alias kept for call sites mid-migration; prefer {@link NcSharedSequence}. */
19772
19959
  var NcRuleActionSequenceSchema = NcLegacyRuleActionSequenceSchema;
19773
19960
  /**
19774
19961
  * "This rule applies only while `deviceId` is in one of `states`."
@@ -20801,6 +20988,14 @@ var NC_CONDITION_CATALOG = [
20801
20988
  value: "node-offline",
20802
20989
  label: "Node offline"
20803
20990
  },
20991
+ {
20992
+ value: "node-restarting",
20993
+ label: "Node restarting"
20994
+ },
20995
+ {
20996
+ value: "node-updating",
20997
+ label: "Node updating (restart imminent)"
20998
+ },
20804
20999
  {
20805
21000
  value: "node-inference-unavailable",
20806
21001
  label: "Node has no usable inference device"
@@ -25783,7 +25978,8 @@ var PipelineModelOptionSchema = zod.z.object({
25783
25978
  group: ModelVariantGroupSchema.optional(),
25784
25979
  legacy: zod.z.boolean().optional(),
25785
25980
  provider: ModelProviderIdSchema.optional(),
25786
- defaultConfidence: zod.z.number().optional()
25981
+ defaultConfidence: zod.z.number().optional(),
25982
+ fillsClassifierEffects: zod.z.array(FillsClassifierEffectSchema).readonly().optional()
25787
25983
  });
25788
25984
  var ConfigFieldBridge = zod.z.custom();
25789
25985
  var PipelineAddonSchemaSchema = zod.z.object({
@@ -38140,7 +38336,8 @@ var MotionStatusSchema = zod.z.object({
38140
38336
  * writes this slice (not even a boot seed), and neither does the runner's
38141
38337
  * phase machine: its phase is "a session is attached" for every on-motion
38142
38338
  * session, not motion, and it now has its own `DetectionPhaseTransition`.
38143
- * A provider's `isDetected` answers from the hub's slice.
38339
+ * A provider's `isDetected` and `getStatus` answer from the hub's slice
38340
+ * (`hubMotionNativeProvider`).
38144
38341
  * - **Sensors** (Home Assistant binary sensors, Homematic, Matter, Alexa
38145
38342
  * imports) — the provider pushes both edges itself, from the upstream
38146
38343
  * system's own state change. That is the sensor's own fact.
@@ -47271,7 +47468,8 @@ function expressionOutcome(source, read, now, stateful) {
47271
47468
  value: null,
47272
47469
  reason: `the expression failed: ${result.error}`,
47273
47470
  fatal: false,
47274
- confirmed: true
47471
+ confirmed: true,
47472
+ expressionFailed: true
47275
47473
  };
47276
47474
  return {
47277
47475
  state: staleReasons.length > 0 ? "stale" : "fresh",
@@ -47621,6 +47819,116 @@ function convertPresetFeature(input) {
47621
47819
  };
47622
47820
  }
47623
47821
  //#endregion
47822
+ //#region src/catalogs/frigate-plus-classmap.ts
47823
+ function isClassMapMacroTarget(value) {
47824
+ return CLASS_MAP_MACRO_TARGETS.some((target) => target === value);
47825
+ }
47826
+ /**
47827
+ * Raw Frigate+ label → detection macro. Every label of the documented
47828
+ * Frigate+ base set (docs.frigate.video/plus, verified 2026-08-21) is either
47829
+ * here or in {@link FRIGATE_PLUS_UNMAPPED_LABELS}, with the reason it is not.
47830
+ *
47831
+ * Why this exists: a Frigate+ import used to carry NO classMap, so it inherited
47832
+ * the step's `COCO_TO_MACRO` (`preserveOriginal: false`) and the executor
47833
+ * dropped every label COCO does not name — deer, raccoon, fox, squirrel, goat,
47834
+ * rabbit, skunk, kangaroo, possum, rodent, school_bus, garbage_truck and even
47835
+ * `package` vanished as `class-filter` discards. The executor keeps the raw
47836
+ * label as `originalClass` whenever the map resolves it, so the fine identity
47837
+ * survives under the macro.
47838
+ */
47839
+ var FRIGATE_PLUS_TO_MACRO = {
47840
+ person: "person",
47841
+ baby: "person",
47842
+ car: "vehicle",
47843
+ motorcycle: "vehicle",
47844
+ bicycle: "vehicle",
47845
+ boat: "vehicle",
47846
+ school_bus: "vehicle",
47847
+ garbage_truck: "vehicle",
47848
+ dog: "animal",
47849
+ cat: "animal",
47850
+ deer: "animal",
47851
+ horse: "animal",
47852
+ bird: "animal",
47853
+ raccoon: "animal",
47854
+ fox: "animal",
47855
+ bear: "animal",
47856
+ cow: "animal",
47857
+ squirrel: "animal",
47858
+ goat: "animal",
47859
+ rabbit: "animal",
47860
+ skunk: "animal",
47861
+ kangaroo: "animal",
47862
+ possum: "animal",
47863
+ rodent: "animal",
47864
+ package: "package"
47865
+ };
47866
+ /**
47867
+ * Frigate+ labels deliberately left OUT of {@link FRIGATE_PLUS_TO_MACRO}.
47868
+ *
47869
+ * - `attribute`: Frigate+ emits these INSIDE a parent box (a face inside a
47870
+ * person, a plate or a carrier logo on a vehicle). Mapping one to its
47871
+ * parent's macro would spawn a second, overlapping track for the same
47872
+ * subject; CamStack derives faces and plates with its own detail steps.
47873
+ * - `no-macro`: an object with no detection macro to live under.
47874
+ */
47875
+ var FRIGATE_PLUS_UNMAPPED_LABELS = {
47876
+ face: "attribute",
47877
+ license_plate: "attribute",
47878
+ amazon: "attribute",
47879
+ usps: "attribute",
47880
+ ups: "attribute",
47881
+ fedex: "attribute",
47882
+ dhl: "attribute",
47883
+ an_post: "attribute",
47884
+ purolator: "attribute",
47885
+ postnl: "attribute",
47886
+ nzpost: "attribute",
47887
+ postnord: "attribute",
47888
+ gls: "attribute",
47889
+ dpd: "attribute",
47890
+ canada_post: "attribute",
47891
+ royal_mail: "attribute",
47892
+ waste_bin: "no-macro",
47893
+ bbq_grill: "no-macro",
47894
+ robot_lawnmower: "no-macro",
47895
+ umbrella: "no-macro",
47896
+ baby_stroller: "no-macro"
47897
+ };
47898
+ /**
47899
+ * The per-model classMap for a Frigate / Frigate+ detector, derived from ITS
47900
+ * labelmap: each label resolves through {@link FRIGATE_PLUS_TO_MACRO} first,
47901
+ * then `COCO_TO_MACRO` (Frigate's default model ships the COCO-91 labelmap, so
47902
+ * a preset import may carry either vocabulary). A label neither knows is left
47903
+ * out, and `preserveOriginal: false` drops it in the executor — the same
47904
+ * contract as the COCO map, now with the Frigate+ vocabulary in it.
47905
+ */
47906
+ function buildFrigateClassMap(labels) {
47907
+ const mapping = {};
47908
+ for (const label of labels) {
47909
+ const target = FRIGATE_PLUS_TO_MACRO[label] ?? COCO_TO_MACRO.mapping[label];
47910
+ if (target !== void 0 && isClassMapMacroTarget(target)) mapping[label] = target;
47911
+ }
47912
+ return {
47913
+ mapping,
47914
+ preserveOriginal: false
47915
+ };
47916
+ }
47917
+ /**
47918
+ * Everything a Frigate / Frigate+ entry derives from its labelmap: the classMap
47919
+ * and the steps it fills (D715). Every Frigate builder spreads this, so the two
47920
+ * cannot be derived from different label lists. A COCO labelmap gets its map
47921
+ * and no fill.
47922
+ */
47923
+ function frigateLabelFields(labels) {
47924
+ const classMap = buildFrigateClassMap(labels);
47925
+ const fills = deriveClassifierFills(labels, classMap);
47926
+ return fills.length > 0 ? {
47927
+ classMap,
47928
+ fillsClassifierEffects: fills
47929
+ } : { classMap };
47930
+ }
47931
+ //#endregion
47624
47932
  //#region src/catalogs/device-state-vocabulary.ts
47625
47933
  /**
47626
47934
  * Most specific first. Extending this list is how a new device kind becomes
@@ -66922,7 +67230,7 @@ function systemEventFilterApplies(kind, filter) {
66922
67230
  case "deviceIds": return kind.startsWith("device-") || kind.startsWith("stream-") || kind === "detection-blind" || kind === "alarm-triggered";
66923
67231
  case "deviceTypes": return kind.startsWith("device-") || kind === "detection-blind";
66924
67232
  case "nodeIds": return kind.startsWith("node-") || kind === "addon-crash-loop" || kind === "addon-update-available" || kind === "addon-updated" || kind === "server-update-available" || kind === "wrapper-update-available" || kind === "server-updated";
66925
- case "packageNames": return kind.endsWith("update-available") || kind === "addon-updated" || kind === "server-updated";
67233
+ case "packageNames": return kind.endsWith("update-available") || kind === "addon-updated" || kind === "node-updating" || kind === "server-updated";
66926
67234
  case "consumableLowPercent": return NC_CONSUMABLE_SYSTEM_EVENT_KINDS.includes(kind);
66927
67235
  }
66928
67236
  }
@@ -66980,6 +67288,8 @@ var NC_SYSTEM_EVENT_FAMILY = {
66980
67288
  "detection-blind": "device-events",
66981
67289
  "node-online": "system",
66982
67290
  "node-offline": "system",
67291
+ "node-restarting": "system",
67292
+ "node-updating": "system",
66983
67293
  "node-inference-unavailable": "system",
66984
67294
  "addon-crash-loop": "system",
66985
67295
  "addon-update-available": "system",
@@ -67075,6 +67385,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
67075
67385
  kinds: [
67076
67386
  "node-offline",
67077
67387
  "node-online",
67388
+ "node-restarting",
67078
67389
  "node-inference-unavailable"
67079
67390
  ]
67080
67391
  },
@@ -67096,6 +67407,7 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
67096
67407
  label: "Server & container updates",
67097
67408
  kinds: [
67098
67409
  "server-update-available",
67410
+ "node-updating",
67099
67411
  "server-updated",
67100
67412
  "wrapper-update-available"
67101
67413
  ]
@@ -68595,6 +68907,7 @@ var STATE_SUMMARY_SECTION_VARS = [
68595
68907
  kinds: [
68596
68908
  "node-offline",
68597
68909
  "node-online",
68910
+ "node-restarting",
68598
68911
  "node-inference-unavailable"
68599
68912
  ]
68600
68913
  },
@@ -68616,6 +68929,7 @@ var STATE_SUMMARY_SECTION_VARS = [
68616
68929
  example: "server 1.2.377 → 1.2.378",
68617
68930
  kinds: [
68618
68931
  "server-update-available",
68932
+ "node-updating",
68619
68933
  "server-updated",
68620
68934
  "wrapper-update-available"
68621
68935
  ]
@@ -69021,6 +69335,8 @@ var NC_TEMPLATE_VARS = [
69021
69335
  systemEventKinds: [
69022
69336
  "node-online",
69023
69337
  "node-offline",
69338
+ "node-restarting",
69339
+ "node-updating",
69024
69340
  "node-inference-unavailable",
69025
69341
  "addon-crash-loop",
69026
69342
  ...UPDATES,
@@ -69039,6 +69355,8 @@ var NC_TEMPLATE_VARS = [
69039
69355
  systemEventKinds: [
69040
69356
  "node-online",
69041
69357
  "node-offline",
69358
+ "node-restarting",
69359
+ "node-updating",
69042
69360
  "node-inference-unavailable",
69043
69361
  "addon-crash-loop",
69044
69362
  ...UPDATES,
@@ -69092,6 +69410,7 @@ var NC_TEMPLATE_VARS = [
69092
69410
  systemEventKinds: [
69093
69411
  ...UPDATES,
69094
69412
  "addon-updated",
69413
+ "node-updating",
69095
69414
  "server-updated"
69096
69415
  ]
69097
69416
  },
@@ -69103,7 +69422,11 @@ var NC_TEMPLATE_VARS = [
69103
69422
  families: ["rule"],
69104
69423
  fields: [...RULE_TEXT],
69105
69424
  kinds: ["system"],
69106
- systemEventKinds: [...PACKAGE_UPDATES, "server-updated"]
69425
+ systemEventKinds: [
69426
+ ...PACKAGE_UPDATES,
69427
+ "node-updating",
69428
+ "server-updated"
69429
+ ]
69107
69430
  },
69108
69431
  {
69109
69432
  name: "nodes",
@@ -69155,7 +69478,7 @@ var NC_TEMPLATE_VARS = [
69155
69478
  families: ["rule"],
69156
69479
  fields: [...RULE_TEXT],
69157
69480
  kinds: ["system"],
69158
- systemEventKinds: ["server-updated"]
69481
+ systemEventKinds: ["node-updating", "server-updated"]
69159
69482
  },
69160
69483
  {
69161
69484
  name: "toVersion",
@@ -69165,7 +69488,7 @@ var NC_TEMPLATE_VARS = [
69165
69488
  families: ["rule"],
69166
69489
  fields: [...RULE_TEXT],
69167
69490
  kinds: ["system"],
69168
- systemEventKinds: ["server-updated"]
69491
+ systemEventKinds: ["node-updating", "server-updated"]
69169
69492
  },
69170
69493
  {
69171
69494
  name: "destinationsOk",
@@ -69434,7 +69757,9 @@ var NC_TEMPLATE_VARS = [
69434
69757
  var NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS = [
69435
69758
  "device-tank-low",
69436
69759
  "device-tank-full",
69437
- "device-tank-normal"
69760
+ "device-tank-normal",
69761
+ "node-restarting",
69762
+ "node-updating"
69438
69763
  ];
69439
69764
  /**
69440
69765
  * The catalog as `getTemplateCatalog` SERVES it: every descriptor, with the
@@ -70607,10 +70932,9 @@ function cameraOwnsMotionViaSensor(motionSources) {
70607
70932
  }
70608
70933
  //#endregion
70609
70934
  //#region src/device/hub-motion-read.ts
70610
- async function readHubMotionDetected(deviceState, deviceId) {
70611
- let slice;
70935
+ async function readSlice(deviceState, deviceId) {
70612
70936
  try {
70613
- slice = await deviceState.getCapSlice.query({
70937
+ return await deviceState.getCapSlice.query({
70614
70938
  deviceId,
70615
70939
  capName: "motion"
70616
70940
  });
@@ -70618,10 +70942,44 @@ async function readHubMotionDetected(deviceState, deviceId) {
70618
70942
  const reason = err instanceof Error ? err.message : String(err);
70619
70943
  throw new Error(`motion state of device ${deviceId} is unreadable: ${reason}`, { cause: err });
70620
70944
  }
70621
- const detected = slice?.["detected"];
70945
+ }
70946
+ /**
70947
+ * The hub's `motion` slice as a `MotionStatus`, or `null` when nobody has
70948
+ * published it since the hub started. Throws when the hub does not answer or
70949
+ * the slice is malformed — never a made-up "no motion".
70950
+ */
70951
+ async function readHubMotionStatus(deviceState, deviceId) {
70952
+ const slice = await readSlice(deviceState, deviceId);
70953
+ if (slice === null) return null;
70954
+ const parsed = MotionStatusSchema.safeParse(slice);
70955
+ if (!parsed.success) throw new Error(`motion state of device ${deviceId} is malformed on the hub: ${parsed.error.message}`);
70956
+ return parsed.data;
70957
+ }
70958
+ async function readHubMotionDetected(deviceState, deviceId) {
70959
+ const detected = (await readSlice(deviceState, deviceId))?.["detected"];
70622
70960
  if (typeof detected !== "boolean") throw new Error(`motion state of device ${deviceId} is not published yet (unknown)`);
70623
70961
  return detected;
70624
70962
  }
70963
+ /**
70964
+ * The native `motion` provider of a camera whose slice the orchestrator writes
70965
+ * (D696): `isDetected` AND `getStatus`, both from the hub. `owner` names the
70966
+ * provider class in the deviceId-mismatch error.
70967
+ */
70968
+ function hubMotionNativeProvider(deviceState, deviceId, owner) {
70969
+ const ownDevice = (asked) => {
70970
+ if (asked !== deviceId) throw new Error(`${owner}: motion deviceId mismatch, expected ${deviceId}, got ${asked}`);
70971
+ };
70972
+ return {
70973
+ isDetected: async ({ deviceId: asked }) => {
70974
+ ownDevice(asked);
70975
+ return readHubMotionDetected(deviceState, deviceId);
70976
+ },
70977
+ getStatus: async ({ deviceId: asked }) => {
70978
+ ownDevice(asked);
70979
+ return readHubMotionStatus(deviceState, deviceId);
70980
+ }
70981
+ };
70982
+ }
70625
70983
  //#endregion
70626
70984
  //#region src/pipeline/provider-motion.ts
70627
70985
  /** The motion event's data without `triggeredBy`: only the bridge names a trigger. */
@@ -70894,9 +71252,9 @@ function slideInsideFrame(rect, frameWidth, frameHeight) {
70894
71252
  * ## What each knob costs
70895
71253
  *
70896
71254
  * A HELD frame is a full NATIVE-resolution copy in system RAM. With the
70897
- * default pinned-RGB24 lease path (`CAMSTACK_SESSION_PINNED_RGB_CROP`, on):
70898
- * 4K ≈ 24.9 MB/frame, 1080p ≈ 6.2 MB/frame. On the YUV420P path (flag off, and
70899
- * for software-decoded sessions): 4K ≈ 12.4 MB, 1080p ≈ 3.1 MB. Worst-case
71255
+ * pinned-RGB24 lease path (hardware sessions):
71256
+ * 4K ≈ 24.9 MB/frame, 1080p ≈ 6.2 MB/frame. On the YUV420P path (software-decoded
71257
+ * sessions): 4K ≈ 12.4 MB, 1080p ≈ 3.1 MB. Worst-case
70900
71258
  * resident RAM for ONE busy camera is now `frameBytes × holdFrames`, clamped by
70901
71259
  * the budget ceiling — bounded by a COUNT because a held frame is waiting for
70902
71260
  * one specific event (its own detection result), not for a clock.
@@ -73118,6 +73476,7 @@ exports.DEFAULT_EVENTS_BAND_BUFFER_SEC = DEFAULT_EVENTS_BAND_BUFFER_SEC;
73118
73476
  exports.DEFAULT_EVENT_COLOR = DEFAULT_EVENT_COLOR;
73119
73477
  exports.DEFAULT_FEATURES = DEFAULT_FEATURES;
73120
73478
  exports.DEFAULT_FIRST_SIGHTING_FRESHNESS_MS = require_composition.DEFAULT_FIRST_SIGHTING_FRESHNESS_MS;
73479
+ exports.DEFAULT_LABEL_LINK_POLICY = DEFAULT_LABEL_LINK_POLICY;
73121
73480
  exports.DEFAULT_MIN_LANDMARK_FACE_SIZE_PX = DEFAULT_MIN_LANDMARK_FACE_SIZE_PX;
73122
73481
  exports.DEFAULT_NATIVE_LEASE_SETTINGS = DEFAULT_NATIVE_LEASE_SETTINGS;
73123
73482
  exports.DEFAULT_OVERLAY_LAYERS = DEFAULT_OVERLAY_LAYERS;
@@ -73294,7 +73653,12 @@ exports.ExtensionSourceSchema = ExtensionSourceSchema;
73294
73653
  exports.FEEDER_EXAMPLE_ADDON_ID = FEEDER_EXAMPLE_ADDON_ID;
73295
73654
  exports.FEEDER_EXAMPLE_HA_DEVICE_ID = FEEDER_EXAMPLE_HA_DEVICE_ID;
73296
73655
  exports.FFMPEG_PATH_ENV = require_composition.FFMPEG_PATH_ENV;
73656
+ exports.FILLABLE_STEP_IDS = FILLABLE_STEP_IDS;
73657
+ exports.FILLABLE_STEP_MACRO = FILLABLE_STEP_MACRO;
73658
+ exports.FILLABLE_STEP_VOCABULARIES = FILLABLE_STEP_VOCABULARIES;
73297
73659
  exports.FIRST_LEVEL_MACRO_CLASSES = FIRST_LEVEL_MACRO_CLASSES;
73660
+ exports.FRIGATE_PLUS_TO_MACRO = FRIGATE_PLUS_TO_MACRO;
73661
+ exports.FRIGATE_PLUS_UNMAPPED_LABELS = FRIGATE_PLUS_UNMAPPED_LABELS;
73298
73662
  exports.FULL_IMAGE_BBOX = FULL_IMAGE_BBOX;
73299
73663
  exports.FailureContributionSchema = FailureContributionSchema;
73300
73664
  exports.FailureCounters = FailureCounters;
@@ -73305,6 +73669,7 @@ exports.FeatureManifestSchema = FeatureManifestSchema;
73305
73669
  exports.FeatureProbeStatusSchema = FeatureProbeStatusSchema;
73306
73670
  exports.FieldClaimModeSchema = FieldClaimModeSchema;
73307
73671
  exports.FieldClaimSchema = FieldClaimSchema;
73672
+ exports.FillsClassifierEffectSchema = FillsClassifierEffectSchema;
73308
73673
  exports.FloodStatusSchema = FloodStatusSchema;
73309
73674
  exports.Fmp4BoxSplitter = require_composition.Fmp4BoxSplitter;
73310
73675
  exports.FrameHandleFormatSchema = require_sleep.FrameHandleFormatSchema;
@@ -73353,8 +73718,11 @@ exports.IntercomAbilitySchema = IntercomAbilitySchema;
73353
73718
  exports.IntercomStatusSchema = IntercomStatusSchema;
73354
73719
  exports.KNOWN_CAP_NAMES = KNOWN_CAP_NAMES;
73355
73720
  exports.KeyEventSchema = KeyEventSchema;
73721
+ exports.LABEL_LINK_POLICIES = LABEL_LINK_POLICIES;
73722
+ exports.LABEL_LINK_SETTING_KEY = LABEL_LINK_SETTING_KEY;
73356
73723
  exports.LEGACY_READ_ONLY_CONFIG_KEY = LEGACY_READ_ONLY_CONFIG_KEY;
73357
73724
  exports.LINKED_DEVICES_SLOT = LINKED_DEVICES_SLOT;
73725
+ exports.LINKED_LABEL_STEP_PREFIX = LINKED_LABEL_STEP_PREFIX;
73358
73726
  exports.LOAD_CONTRIBUTION_ATTRIBUTIONS = LOAD_CONTRIBUTION_ATTRIBUTIONS;
73359
73727
  exports.LOAD_CONTRIBUTION_ROLES = LOAD_CONTRIBUTION_ROLES;
73360
73728
  exports.LOCATION_DESCRIPTION_MAX = LOCATION_DESCRIPTION_MAX;
@@ -74302,6 +74670,7 @@ exports.buildDeviceAdminUrl = buildDeviceAdminUrl;
74302
74670
  exports.buildDoorbellCompositionFeature = buildDoorbellCompositionFeature;
74303
74671
  exports.buildEventKindDescriptor = buildEventKindDescriptor;
74304
74672
  exports.buildFfmpegArgs = require_composition.buildFfmpegArgs;
74673
+ exports.buildFrigateClassMap = buildFrigateClassMap;
74305
74674
  exports.buildInputArgs = require_composition.buildInputArgs;
74306
74675
  exports.buildModelVariantGroups = buildModelVariantGroups;
74307
74676
  exports.buildNcTaxonomy = buildNcTaxonomy;
@@ -74408,6 +74777,7 @@ exports.defineExtensionSlotProvider = defineExtensionSlotProvider;
74408
74777
  exports.deleteAlarmProfile = deleteAlarmProfile;
74409
74778
  exports.deriveBatteryPresence = deriveBatteryPresence;
74410
74779
  exports.deriveCameraSwitches = deriveCameraSwitches;
74780
+ exports.deriveClassifierFills = deriveClassifierFills;
74411
74781
  exports.deriveDetailCropRect = deriveDetailCropRect;
74412
74782
  exports.derivePostTriggeredAction = derivePostTriggeredAction;
74413
74783
  exports.deriveRecordingMode = deriveRecordingMode;
@@ -74499,6 +74869,7 @@ exports.feederExampleSources = feederExampleSources;
74499
74869
  exports.ffmpegRate = ffmpegRate;
74500
74870
  exports.fieldReads = require_composition.fieldReads;
74501
74871
  exports.filesystemBrowseCapability = filesystemBrowseCapability;
74872
+ exports.fillFor = fillFor;
74502
74873
  exports.findCandidateCycles = findCandidateCycles;
74503
74874
  exports.findCompositionCycles = findCompositionCycles;
74504
74875
  exports.findTimezone = findTimezone;
@@ -74508,6 +74879,7 @@ exports.formatForRuntime = formatForRuntime;
74508
74879
  exports.formatMediaOwnerKey = formatMediaOwnerKey;
74509
74880
  exports.formatMinutes = formatMinutes;
74510
74881
  exports.formatParkedFor = formatParkedFor;
74882
+ exports.frigateLabelFields = frigateLabelFields;
74511
74883
  exports.gasCapability = gasCapability;
74512
74884
  exports.gbToBytes = gbToBytes;
74513
74885
  exports.generateAutomationBlock = generateAutomationBlock;
@@ -74522,6 +74894,7 @@ exports.gifFromMp4Args = gifFromMp4Args;
74522
74894
  exports.hasMotionTrigger = hasMotionTrigger;
74523
74895
  exports.hfModelUrl = hfModelUrl;
74524
74896
  exports.htmlToText = htmlToText;
74897
+ exports.hubMotionNativeProvider = hubMotionNativeProvider;
74525
74898
  exports.humidifierCapability = humidifierCapability;
74526
74899
  exports.humiditySensorCapability = humiditySensorCapability;
74527
74900
  exports.hydrateSchema = require_sleep.hydrateSchema;
@@ -74547,6 +74920,7 @@ exports.isAudioRule = isAudioRule;
74547
74920
  exports.isBaseConditionKey = isBaseConditionKey;
74548
74921
  exports.isBatteryPresenceFault = isBatteryPresenceFault;
74549
74922
  exports.isClusterScopedStep = isClusterScopedStep;
74923
+ exports.isCocoLabelmap = isCocoLabelmap;
74550
74924
  exports.isCollectionArrayMethod = isCollectionArrayMethod;
74551
74925
  exports.isDefaultAlarmProfileId = isDefaultAlarmProfileId;
74552
74926
  exports.isDeployableToAgent = isDeployableToAgent;
@@ -74560,6 +74934,7 @@ exports.isEmbeddingModelFailed = isEmbeddingModelFailed;
74560
74934
  exports.isEvent = require_sleep.isEvent;
74561
74935
  exports.isEventKindLabelKey = isEventKindLabelKey;
74562
74936
  exports.isEventOwnerType = isEventOwnerType;
74937
+ exports.isFillableStepId = isFillableStepId;
74563
74938
  exports.isFirstLevelMacroClass = isFirstLevelMacroClass;
74564
74939
  exports.isHeldBackTemplateVar = isHeldBackTemplateVar;
74565
74940
  exports.isIsolatedBuiltin = isIsolatedBuiltin;
@@ -74599,6 +74974,8 @@ exports.lifecycleJobSchema = lifecycleJobSchema;
74599
74974
  exports.lifecycleJobScopeSchema = lifecycleJobScopeSchema;
74600
74975
  exports.lifecycleJobStateSchema = lifecycleJobStateSchema;
74601
74976
  exports.lifecycleTaskSchema = lifecycleTaskSchema;
74977
+ exports.linkedLabelStepId = linkedLabelStepId;
74978
+ exports.linkedStepOf = linkedStepOf;
74602
74979
  exports.llmCapability = llmCapability;
74603
74980
  exports.llmRuntimeCapability = llmRuntimeCapability;
74604
74981
  exports.loadContributionCapability = loadContributionCapability;
@@ -74724,6 +75101,8 @@ exports.readClusterStepSettings = readClusterStepSettings;
74724
75101
  exports.readDetailCropConvention = readDetailCropConvention;
74725
75102
  exports.readDeviceStateFrom = readDeviceStateFrom;
74726
75103
  exports.readHubMotionDetected = readHubMotionDetected;
75104
+ exports.readHubMotionStatus = readHubMotionStatus;
75105
+ exports.readLabelLinkPolicy = readLabelLinkPolicy;
74727
75106
  exports.readMotionTriggeredBy = readMotionTriggeredBy;
74728
75107
  exports.readNativeLeaseOverride = readNativeLeaseOverride;
74729
75108
  exports.readNodePin = require_sleep.readNodePin;
@@ -74761,6 +75140,7 @@ exports.resolveEgressDecodeHwAccel = resolveEgressDecodeHwAccel;
74761
75140
  exports.resolveExportProfiles = resolveExportProfiles;
74762
75141
  exports.resolveFormat = resolveFormat;
74763
75142
  exports.resolveHydratedFieldValue = require_sleep.resolveHydratedFieldValue;
75143
+ exports.resolveLabelLink = resolveLabelLink;
74764
75144
  exports.resolveLocationIcon = resolveLocationIcon;
74765
75145
  exports.resolveLocationMode = resolveLocationMode;
74766
75146
  exports.resolveMethodAuth = resolveMethodAuth;