@camstack/types 1.2.305 → 1.2.306
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 +18 -0
- package/dist/capabilities/device-manager.cap.d.ts +8 -8
- package/dist/capabilities/model-convert.cap.d.ts +9 -0
- package/dist/capabilities/model-distributor.cap.d.ts +18 -0
- package/dist/capabilities/notification-rules.cap.d.ts +2 -2
- package/dist/capabilities/pipeline-executor.cap.d.ts +45 -0
- package/dist/catalogs/classifier-fill.d.ts +104 -0
- package/dist/catalogs/frigate-plus-classmap.d.ts +49 -0
- package/dist/catalogs/index.d.ts +2 -0
- package/dist/client.d.ts +17 -0
- package/dist/client.js +10514 -0
- package/dist/client.mjs +10440 -0
- package/dist/composition/evaluate-field.d.ts +12 -0
- package/dist/device/location-icon.d.ts +4 -4
- package/dist/device/site-zone.d.ts +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +715 -398
- package/dist/index.mjs +696 -399
- package/dist/interfaces/event-bus.d.ts +9 -0
- package/dist/pipeline/native-lease.d.ts +3 -3
- package/dist/types/models.d.ts +29 -0
- package/package.json +7 -2
|
@@ -169,6 +169,15 @@ export declare const CustomModelDescriptorSchema: z.ZodObject<{
|
|
|
169
169
|
}>>;
|
|
170
170
|
preserveOriginal: z.ZodBoolean;
|
|
171
171
|
}, z.core.$strip>>;
|
|
172
|
+
fillsClassifierEffects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
173
|
+
stepId: z.ZodEnum<{
|
|
174
|
+
"animal-classifier": "animal-classifier";
|
|
175
|
+
"vehicle-classifier": "vehicle-classifier";
|
|
176
|
+
"package-detection": "package-detection";
|
|
177
|
+
}>;
|
|
178
|
+
labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
179
|
+
uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
180
|
+
}, z.core.$strip>>>>;
|
|
172
181
|
clip: z.ZodOptional<z.ZodObject<{
|
|
173
182
|
textModelId: z.ZodString;
|
|
174
183
|
embeddingDim: z.ZodNumber;
|
|
@@ -348,6 +357,15 @@ export declare const customModelRegistryCapability: {
|
|
|
348
357
|
}>>;
|
|
349
358
|
preserveOriginal: z.ZodBoolean;
|
|
350
359
|
}, z.core.$strip>>;
|
|
360
|
+
fillsClassifierEffects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
361
|
+
stepId: z.ZodEnum<{
|
|
362
|
+
"animal-classifier": "animal-classifier";
|
|
363
|
+
"vehicle-classifier": "vehicle-classifier";
|
|
364
|
+
"package-detection": "package-detection";
|
|
365
|
+
}>;
|
|
366
|
+
labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
367
|
+
uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
368
|
+
}, z.core.$strip>>>>;
|
|
351
369
|
clip: z.ZodOptional<z.ZodObject<{
|
|
352
370
|
textModelId: z.ZodString;
|
|
353
371
|
embeddingDim: z.ZodNumber;
|
|
@@ -781,6 +781,8 @@ export declare const deviceManagerCapability: {
|
|
|
781
781
|
locationKey: z.ZodString;
|
|
782
782
|
icon: z.ZodEnum<{
|
|
783
783
|
package: "package";
|
|
784
|
+
car: "car";
|
|
785
|
+
umbrella: "umbrella";
|
|
784
786
|
"map-pin": "map-pin";
|
|
785
787
|
house: "house";
|
|
786
788
|
"door-open": "door-open";
|
|
@@ -789,11 +791,9 @@ export declare const deviceManagerCapability: {
|
|
|
789
791
|
"bed-double": "bed-double";
|
|
790
792
|
bath: "bath";
|
|
791
793
|
briefcase: "briefcase";
|
|
792
|
-
car: "car";
|
|
793
794
|
"circle-parking": "circle-parking";
|
|
794
795
|
route: "route";
|
|
795
796
|
trees: "trees";
|
|
796
|
-
umbrella: "umbrella";
|
|
797
797
|
"waves-ladder": "waves-ladder";
|
|
798
798
|
fence: "fence";
|
|
799
799
|
warehouse: "warehouse";
|
|
@@ -815,6 +815,8 @@ export declare const deviceManagerCapability: {
|
|
|
815
815
|
location: z.ZodString;
|
|
816
816
|
icon: z.ZodNullable<z.ZodEnum<{
|
|
817
817
|
package: "package";
|
|
818
|
+
car: "car";
|
|
819
|
+
umbrella: "umbrella";
|
|
818
820
|
"map-pin": "map-pin";
|
|
819
821
|
house: "house";
|
|
820
822
|
"door-open": "door-open";
|
|
@@ -823,11 +825,9 @@ export declare const deviceManagerCapability: {
|
|
|
823
825
|
"bed-double": "bed-double";
|
|
824
826
|
bath: "bath";
|
|
825
827
|
briefcase: "briefcase";
|
|
826
|
-
car: "car";
|
|
827
828
|
"circle-parking": "circle-parking";
|
|
828
829
|
route: "route";
|
|
829
830
|
trees: "trees";
|
|
830
|
-
umbrella: "umbrella";
|
|
831
831
|
"waves-ladder": "waves-ladder";
|
|
832
832
|
fence: "fence";
|
|
833
833
|
warehouse: "warehouse";
|
|
@@ -882,6 +882,8 @@ export declare const deviceManagerCapability: {
|
|
|
882
882
|
label: z.ZodString;
|
|
883
883
|
icon: z.ZodNullable<z.ZodEnum<{
|
|
884
884
|
package: "package";
|
|
885
|
+
car: "car";
|
|
886
|
+
umbrella: "umbrella";
|
|
885
887
|
"map-pin": "map-pin";
|
|
886
888
|
house: "house";
|
|
887
889
|
"door-open": "door-open";
|
|
@@ -890,11 +892,9 @@ export declare const deviceManagerCapability: {
|
|
|
890
892
|
"bed-double": "bed-double";
|
|
891
893
|
bath: "bath";
|
|
892
894
|
briefcase: "briefcase";
|
|
893
|
-
car: "car";
|
|
894
895
|
"circle-parking": "circle-parking";
|
|
895
896
|
route: "route";
|
|
896
897
|
trees: "trees";
|
|
897
|
-
umbrella: "umbrella";
|
|
898
898
|
"waves-ladder": "waves-ladder";
|
|
899
899
|
fence: "fence";
|
|
900
900
|
warehouse: "warehouse";
|
|
@@ -915,6 +915,8 @@ export declare const deviceManagerCapability: {
|
|
|
915
915
|
name: z.ZodString;
|
|
916
916
|
icon: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
917
917
|
package: "package";
|
|
918
|
+
car: "car";
|
|
919
|
+
umbrella: "umbrella";
|
|
918
920
|
"map-pin": "map-pin";
|
|
919
921
|
house: "house";
|
|
920
922
|
"door-open": "door-open";
|
|
@@ -923,11 +925,9 @@ export declare const deviceManagerCapability: {
|
|
|
923
925
|
"bed-double": "bed-double";
|
|
924
926
|
bath: "bath";
|
|
925
927
|
briefcase: "briefcase";
|
|
926
|
-
car: "car";
|
|
927
928
|
"circle-parking": "circle-parking";
|
|
928
929
|
route: "route";
|
|
929
930
|
trees: "trees";
|
|
930
|
-
umbrella: "umbrella";
|
|
931
931
|
"waves-ladder": "waves-ladder";
|
|
932
932
|
fence: "fence";
|
|
933
933
|
warehouse: "warehouse";
|
|
@@ -279,6 +279,15 @@ export declare const modelConvertCapability: {
|
|
|
279
279
|
}>>;
|
|
280
280
|
preserveOriginal: z.ZodBoolean;
|
|
281
281
|
}, z.core.$strip>>;
|
|
282
|
+
fillsClassifierEffects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
283
|
+
stepId: z.ZodEnum<{
|
|
284
|
+
"animal-classifier": "animal-classifier";
|
|
285
|
+
"vehicle-classifier": "vehicle-classifier";
|
|
286
|
+
"package-detection": "package-detection";
|
|
287
|
+
}>;
|
|
288
|
+
labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
289
|
+
uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
290
|
+
}, z.core.$strip>>>>;
|
|
282
291
|
clip: z.ZodOptional<z.ZodObject<{
|
|
283
292
|
textModelId: z.ZodString;
|
|
284
293
|
embeddingDim: z.ZodNumber;
|
|
@@ -177,6 +177,15 @@ export declare const ModelDistributeInputSchema: z.ZodObject<{
|
|
|
177
177
|
}>>;
|
|
178
178
|
preserveOriginal: z.ZodBoolean;
|
|
179
179
|
}, z.core.$strip>>;
|
|
180
|
+
fillsClassifierEffects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
181
|
+
stepId: z.ZodEnum<{
|
|
182
|
+
"animal-classifier": "animal-classifier";
|
|
183
|
+
"vehicle-classifier": "vehicle-classifier";
|
|
184
|
+
"package-detection": "package-detection";
|
|
185
|
+
}>;
|
|
186
|
+
labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
187
|
+
uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
188
|
+
}, z.core.$strip>>>>;
|
|
180
189
|
clip: z.ZodOptional<z.ZodObject<{
|
|
181
190
|
textModelId: z.ZodString;
|
|
182
191
|
embeddingDim: z.ZodNumber;
|
|
@@ -361,6 +370,15 @@ export declare const modelDistributorCapability: {
|
|
|
361
370
|
}>>;
|
|
362
371
|
preserveOriginal: z.ZodBoolean;
|
|
363
372
|
}, z.core.$strip>>;
|
|
373
|
+
fillsClassifierEffects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
374
|
+
stepId: z.ZodEnum<{
|
|
375
|
+
"animal-classifier": "animal-classifier";
|
|
376
|
+
"vehicle-classifier": "vehicle-classifier";
|
|
377
|
+
"package-detection": "package-detection";
|
|
378
|
+
}>;
|
|
379
|
+
labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
380
|
+
uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
381
|
+
}, z.core.$strip>>>>;
|
|
364
382
|
clip: z.ZodOptional<z.ZodObject<{
|
|
365
383
|
textModelId: z.ZodString;
|
|
366
384
|
embeddingDim: z.ZodNumber;
|
|
@@ -740,8 +740,6 @@ export declare const NcLegacyRuleActionSequenceSchema: z.ZodObject<{
|
|
|
740
740
|
}, z.core.$strip>;
|
|
741
741
|
export type NcLegacyRuleActionSequence = z.infer<typeof NcLegacyRuleActionSequenceSchema>;
|
|
742
742
|
/** @deprecated Alias kept for call sites mid-migration; prefer {@link NcSharedSequence}. */
|
|
743
|
-
export type NcRuleActionSequence = NcLegacyRuleActionSequence;
|
|
744
|
-
/** @deprecated */
|
|
745
743
|
export declare const NcRuleActionSequenceSchema: z.ZodObject<{
|
|
746
744
|
name: z.ZodString;
|
|
747
745
|
enabled: z.ZodBoolean;
|
|
@@ -757,6 +755,8 @@ export declare const NcRuleActionSequenceSchema: z.ZodObject<{
|
|
|
757
755
|
args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
758
756
|
}, z.core.$strip>], "kind">>;
|
|
759
757
|
}, z.core.$strip>;
|
|
758
|
+
/** @deprecated */
|
|
759
|
+
export type NcRuleActionSequence = z.infer<typeof NcRuleActionSequenceSchema>;
|
|
760
760
|
/**
|
|
761
761
|
* "This rule applies only while `deviceId` is in one of `states`."
|
|
762
762
|
*
|
|
@@ -204,6 +204,15 @@ declare const PipelineModelOptionSchema: z.ZodObject<{
|
|
|
204
204
|
scrypted: "scrypted";
|
|
205
205
|
}>>;
|
|
206
206
|
defaultConfidence: z.ZodOptional<z.ZodNumber>;
|
|
207
|
+
fillsClassifierEffects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
208
|
+
stepId: z.ZodEnum<{
|
|
209
|
+
"animal-classifier": "animal-classifier";
|
|
210
|
+
"vehicle-classifier": "vehicle-classifier";
|
|
211
|
+
"package-detection": "package-detection";
|
|
212
|
+
}>;
|
|
213
|
+
labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
214
|
+
uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
215
|
+
}, z.core.$strip>>>>;
|
|
207
216
|
}, z.core.$strip>;
|
|
208
217
|
declare const PipelineAddonSchemaSchema: z.ZodObject<{
|
|
209
218
|
id: z.ZodString;
|
|
@@ -252,6 +261,15 @@ declare const PipelineAddonSchemaSchema: z.ZodObject<{
|
|
|
252
261
|
scrypted: "scrypted";
|
|
253
262
|
}>>;
|
|
254
263
|
defaultConfidence: z.ZodOptional<z.ZodNumber>;
|
|
264
|
+
fillsClassifierEffects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
265
|
+
stepId: z.ZodEnum<{
|
|
266
|
+
"animal-classifier": "animal-classifier";
|
|
267
|
+
"vehicle-classifier": "vehicle-classifier";
|
|
268
|
+
"package-detection": "package-detection";
|
|
269
|
+
}>;
|
|
270
|
+
labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
271
|
+
uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
272
|
+
}, z.core.$strip>>>>;
|
|
255
273
|
}, z.core.$strip>>>;
|
|
256
274
|
defaultModelId: z.ZodString;
|
|
257
275
|
defaultModelIdByFormat: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -325,6 +343,15 @@ declare const PipelineSlotSchemaSchema: z.ZodObject<{
|
|
|
325
343
|
scrypted: "scrypted";
|
|
326
344
|
}>>;
|
|
327
345
|
defaultConfidence: z.ZodOptional<z.ZodNumber>;
|
|
346
|
+
fillsClassifierEffects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
347
|
+
stepId: z.ZodEnum<{
|
|
348
|
+
"animal-classifier": "animal-classifier";
|
|
349
|
+
"vehicle-classifier": "vehicle-classifier";
|
|
350
|
+
"package-detection": "package-detection";
|
|
351
|
+
}>;
|
|
352
|
+
labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
353
|
+
uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
354
|
+
}, z.core.$strip>>>>;
|
|
328
355
|
}, z.core.$strip>>>;
|
|
329
356
|
defaultModelId: z.ZodString;
|
|
330
357
|
defaultModelIdByFormat: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -434,6 +461,15 @@ declare const PipelineSchemaSchema: z.ZodObject<{
|
|
|
434
461
|
scrypted: "scrypted";
|
|
435
462
|
}>>;
|
|
436
463
|
defaultConfidence: z.ZodOptional<z.ZodNumber>;
|
|
464
|
+
fillsClassifierEffects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
465
|
+
stepId: z.ZodEnum<{
|
|
466
|
+
"animal-classifier": "animal-classifier";
|
|
467
|
+
"vehicle-classifier": "vehicle-classifier";
|
|
468
|
+
"package-detection": "package-detection";
|
|
469
|
+
}>;
|
|
470
|
+
labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
471
|
+
uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
472
|
+
}, z.core.$strip>>>>;
|
|
437
473
|
}, z.core.$strip>>>;
|
|
438
474
|
defaultModelId: z.ZodString;
|
|
439
475
|
defaultModelIdByFormat: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -789,6 +825,15 @@ export declare const pipelineExecutorCapability: {
|
|
|
789
825
|
scrypted: "scrypted";
|
|
790
826
|
}>>;
|
|
791
827
|
defaultConfidence: z.ZodOptional<z.ZodNumber>;
|
|
828
|
+
fillsClassifierEffects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
829
|
+
stepId: z.ZodEnum<{
|
|
830
|
+
"animal-classifier": "animal-classifier";
|
|
831
|
+
"vehicle-classifier": "vehicle-classifier";
|
|
832
|
+
"package-detection": "package-detection";
|
|
833
|
+
}>;
|
|
834
|
+
labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
835
|
+
uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
836
|
+
}, z.core.$strip>>>>;
|
|
792
837
|
}, z.core.$strip>>>;
|
|
793
838
|
defaultModelId: z.ZodString;
|
|
794
839
|
defaultModelIdByFormat: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detector ↔ step label link — the ONE place that says which pipeline steps a
|
|
3
|
+
* root detector can stand in for, in whose vocabulary, and who writes tier 1.
|
|
4
|
+
*
|
|
5
|
+
* A Frigate+ detector already emits `deer`, `car`, `package`: the effect
|
|
6
|
+
* `animal-classifier`, `vehicle-classifier` and `package-detection` exist to
|
|
7
|
+
* produce. The model DECLARES that (`ModelCatalogEntry.fillsClassifierEffects`,
|
|
8
|
+
* derived here from its labelmap), and the step's own `labelLink` policy says
|
|
9
|
+
* whether the declaration is honoured. Pure — no I/O, no clock.
|
|
10
|
+
*/
|
|
11
|
+
import type { FillsClassifierEffect, ModelCatalogEntry } from '../types/models.js';
|
|
12
|
+
/** Steps a root detector may declare it fills. */
|
|
13
|
+
export declare const FILLABLE_STEP_IDS: readonly ["animal-classifier", "vehicle-classifier", "package-detection"];
|
|
14
|
+
export type FillableStepId = (typeof FILLABLE_STEP_IDS)[number];
|
|
15
|
+
/** Narrow a step id to a fillable one — type guard, not a cast. */
|
|
16
|
+
export declare function isFillableStepId(value: string): value is FillableStepId;
|
|
17
|
+
/**
|
|
18
|
+
* The EFFECT vocabulary of each fillable step: exactly the strings the step
|
|
19
|
+
* itself emits, in its own spelling. A linked label is one of these and nothing
|
|
20
|
+
* else, so a tier-1 value means the same thing whichever writer produced it.
|
|
21
|
+
*
|
|
22
|
+
* - `animal-classifier`: the PRIMARY model's `-labels.json` (Open Images V7,
|
|
23
|
+
* 8 classes) — also the species allow-list the step offers.
|
|
24
|
+
* - `vehicle-classifier`: `vehicle-type-v1-labels.json`, capitalised as the
|
|
25
|
+
* model emits them (the classifier writes `winner.class` verbatim).
|
|
26
|
+
* - `package-detection`: its one output class.
|
|
27
|
+
*
|
|
28
|
+
* `scripts/check-label-link-vocabulary.ts` fails the build if a model entry's
|
|
29
|
+
* `labelToEffect` names anything outside this table.
|
|
30
|
+
*/
|
|
31
|
+
export declare const FILLABLE_STEP_VOCABULARIES: Readonly<Record<FillableStepId, readonly string[]>>;
|
|
32
|
+
/** The macro a detection must carry for the step to apply to it. */
|
|
33
|
+
export declare const FILLABLE_STEP_MACRO: Readonly<Record<FillableStepId, string>>;
|
|
34
|
+
/** The policy values of a step's `labelLink` setting. */
|
|
35
|
+
export declare const LABEL_LINK_POLICIES: readonly ["run", "skip-when-filled"];
|
|
36
|
+
export type LabelLinkPolicy = (typeof LABEL_LINK_POLICIES)[number];
|
|
37
|
+
/** Absent setting ⇒ this. It changes nothing unless the root model declares a fill. */
|
|
38
|
+
export declare const DEFAULT_LABEL_LINK_POLICY: LabelLinkPolicy;
|
|
39
|
+
/** The step-settings key the policy is stored under (DeviceStepConfig.settings). */
|
|
40
|
+
export declare const LABEL_LINK_SETTING_KEY = "labelLink";
|
|
41
|
+
/** One fill a root model declares — the catalog schema's own type. */
|
|
42
|
+
export type ClassifierFillDeclaration = FillsClassifierEffect;
|
|
43
|
+
/** `ScoredLabel.stepId` prefix of a label the detector wrote for a step. */
|
|
44
|
+
export declare const LINKED_LABEL_STEP_PREFIX = "detector-link:";
|
|
45
|
+
/** `detector-link:<stepId>` — the attribution of a linked label. */
|
|
46
|
+
export declare function linkedLabelStepId(stepId: FillableStepId): string;
|
|
47
|
+
/** The step a linked label stands in for, or `undefined` for any other attribution. */
|
|
48
|
+
export declare function linkedStepOf(attributionStepId: string | undefined): FillableStepId | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* A labelmap is COCO when it carries at least half of the COCO-80 classes. A
|
|
51
|
+
* COCO detector NEVER fills a step (operator decision, D715): its `dog` / `car`
|
|
52
|
+
* is the generic class the classifier exists to refine, and its six animal
|
|
53
|
+
* classes would otherwise read as "fills animal-classifier 6/8". Frigate+
|
|
54
|
+
* shares about a dozen COCO names; a COCO-80 or COCO-91 labelmap carries ~80.
|
|
55
|
+
*/
|
|
56
|
+
export declare function isCocoLabelmap(labels: readonly string[]): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Which steps a root detector fills, from its labelmap and classMap. A label
|
|
59
|
+
* counts for a step only when the model's classMap sends it to that step's
|
|
60
|
+
* macro AND it names a vocabulary entry. A step none of the labels reach is
|
|
61
|
+
* not declared; a COCO labelmap declares nothing.
|
|
62
|
+
*/
|
|
63
|
+
export declare function deriveClassifierFills(labels: readonly string[], classMap: {
|
|
64
|
+
readonly mapping: Readonly<Record<string, string>>;
|
|
65
|
+
} | undefined): readonly ClassifierFillDeclaration[];
|
|
66
|
+
/** The fill a model declares for one step, if any. */
|
|
67
|
+
export declare function fillFor(entry: Pick<ModelCatalogEntry, 'fillsClassifierEffects'> | undefined, stepId: FillableStepId): ClassifierFillDeclaration | undefined;
|
|
68
|
+
/** Read the `labelLink` policy off a step's settings bag; anything else ⇒ the default. */
|
|
69
|
+
export declare function readLabelLinkPolicy(settings: Readonly<Record<string, unknown>> | undefined): LabelLinkPolicy;
|
|
70
|
+
/** The configured step the decision is about, as the attach tree carries it. */
|
|
71
|
+
export interface LinkedStepState {
|
|
72
|
+
readonly enabled: boolean;
|
|
73
|
+
readonly settings?: Readonly<Record<string, unknown>>;
|
|
74
|
+
}
|
|
75
|
+
/** Who writes the step's effect for this camera. */
|
|
76
|
+
export interface LabelLinkDecision {
|
|
77
|
+
/**
|
|
78
|
+
* The detector is the ONE writer of this effect: its linked label carries
|
|
79
|
+
* the detection's score. Otherwise it is written at score 0, a fallback any
|
|
80
|
+
* scored answer of the step outranks.
|
|
81
|
+
*/
|
|
82
|
+
readonly authoritative: boolean;
|
|
83
|
+
/** The step is configured to run and must NOT be dispatched. */
|
|
84
|
+
readonly skip: boolean;
|
|
85
|
+
readonly policy: LabelLinkPolicy;
|
|
86
|
+
/**
|
|
87
|
+
* Vocabulary entries the detector cannot produce that the step's
|
|
88
|
+
* `enabledClasses` still asks for (empty allow-list = all). The skip waits
|
|
89
|
+
* until the operator switches every one of them off.
|
|
90
|
+
*/
|
|
91
|
+
readonly openGaps: readonly string[];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Decide the writer of one filled effect for one camera.
|
|
95
|
+
*
|
|
96
|
+
* - The step is not running (disabled, or not in the camera's tree): the
|
|
97
|
+
* detector is the only writer — authoritative, nothing to skip.
|
|
98
|
+
* - The step runs, the policy is `skip-when-filled` and every coverage gap is
|
|
99
|
+
* switched off in `enabledClasses`: the detector is authoritative and the
|
|
100
|
+
* step is skipped.
|
|
101
|
+
* - Otherwise the step runs and is the writer; the linked label is a score-0
|
|
102
|
+
* fallback.
|
|
103
|
+
*/
|
|
104
|
+
export declare function resolveLabelLink(fill: ClassifierFillDeclaration, step: LinkedStepState | undefined): LabelLinkDecision;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { CLASS_MAP_MACRO_TARGETS, type DetectionCatalogClassMap } from '../types/labels.js';
|
|
2
|
+
import { type ClassifierFillDeclaration } from './classifier-fill.js';
|
|
3
|
+
/** A macro a detection catalog classMap may resolve to. */
|
|
4
|
+
export type ClassMapMacroTarget = (typeof CLASS_MAP_MACRO_TARGETS)[number];
|
|
5
|
+
/**
|
|
6
|
+
* Raw Frigate+ label → detection macro. Every label of the documented
|
|
7
|
+
* Frigate+ base set (docs.frigate.video/plus, verified 2026-08-21) is either
|
|
8
|
+
* here or in {@link FRIGATE_PLUS_UNMAPPED_LABELS}, with the reason it is not.
|
|
9
|
+
*
|
|
10
|
+
* Why this exists: a Frigate+ import used to carry NO classMap, so it inherited
|
|
11
|
+
* the step's `COCO_TO_MACRO` (`preserveOriginal: false`) and the executor
|
|
12
|
+
* dropped every label COCO does not name — deer, raccoon, fox, squirrel, goat,
|
|
13
|
+
* rabbit, skunk, kangaroo, possum, rodent, school_bus, garbage_truck and even
|
|
14
|
+
* `package` vanished as `class-filter` discards. The executor keeps the raw
|
|
15
|
+
* label as `originalClass` whenever the map resolves it, so the fine identity
|
|
16
|
+
* survives under the macro.
|
|
17
|
+
*/
|
|
18
|
+
export declare const FRIGATE_PLUS_TO_MACRO: Readonly<Record<string, ClassMapMacroTarget>>;
|
|
19
|
+
/**
|
|
20
|
+
* Frigate+ labels deliberately left OUT of {@link FRIGATE_PLUS_TO_MACRO}.
|
|
21
|
+
*
|
|
22
|
+
* - `attribute`: Frigate+ emits these INSIDE a parent box (a face inside a
|
|
23
|
+
* person, a plate or a carrier logo on a vehicle). Mapping one to its
|
|
24
|
+
* parent's macro would spawn a second, overlapping track for the same
|
|
25
|
+
* subject; CamStack derives faces and plates with its own detail steps.
|
|
26
|
+
* - `no-macro`: an object with no detection macro to live under.
|
|
27
|
+
*/
|
|
28
|
+
export declare const FRIGATE_PLUS_UNMAPPED_LABELS: Readonly<Record<string, 'attribute' | 'no-macro'>>;
|
|
29
|
+
/**
|
|
30
|
+
* The per-model classMap for a Frigate / Frigate+ detector, derived from ITS
|
|
31
|
+
* labelmap: each label resolves through {@link FRIGATE_PLUS_TO_MACRO} first,
|
|
32
|
+
* then `COCO_TO_MACRO` (Frigate's default model ships the COCO-91 labelmap, so
|
|
33
|
+
* a preset import may carry either vocabulary). A label neither knows is left
|
|
34
|
+
* out, and `preserveOriginal: false` drops it in the executor — the same
|
|
35
|
+
* contract as the COCO map, now with the Frigate+ vocabulary in it.
|
|
36
|
+
*/
|
|
37
|
+
export declare function buildFrigateClassMap(labels: readonly string[]): DetectionCatalogClassMap;
|
|
38
|
+
/** The label-derived fields of a Frigate catalog entry. */
|
|
39
|
+
export interface FrigateLabelFields {
|
|
40
|
+
readonly classMap: DetectionCatalogClassMap;
|
|
41
|
+
readonly fillsClassifierEffects?: readonly ClassifierFillDeclaration[];
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Everything a Frigate / Frigate+ entry derives from its labelmap: the classMap
|
|
45
|
+
* and the steps it fills (D715). Every Frigate builder spreads this, so the two
|
|
46
|
+
* cannot be derived from different label lists. A COCO labelmap gets its map
|
|
47
|
+
* and no fill.
|
|
48
|
+
*/
|
|
49
|
+
export declare function frigateLabelFields(labels: readonly string[]): FrigateLabelFields;
|
package/dist/catalogs/index.d.ts
CHANGED
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@camstack/types/client` — the runtime values a CLIENT bundle needs, and
|
|
3
|
+
* nothing it does not.
|
|
4
|
+
*
|
|
5
|
+
* The bare entry is one pre-bundled `index.mjs` (~1.1 MB minified) and Metro
|
|
6
|
+
* does not tree-shake, so the viewer's web bundle carried every capability
|
|
7
|
+
* schema the hub knows for the ~80 values it actually reads (D721). This entry
|
|
8
|
+
* is built on its own (`vite.client.config.ts`) with module side effects
|
|
9
|
+
* OFF, so only the modules these names reach are emitted.
|
|
10
|
+
*
|
|
11
|
+
* The list is the viewer's: every non-type import of `@camstack/types` in
|
|
12
|
+
* `camstack/src` + `app`, plus what `@camstack/sdk` imports at runtime.
|
|
13
|
+
* The viewer's guard (`types-client-entry.spec.ts`) fails when it imports a
|
|
14
|
+
* value this entry does not export — a missing name here is `undefined` at
|
|
15
|
+
* runtime, not a build error.
|
|
16
|
+
*/
|
|
17
|
+
export { APPLE_SA_TO_MACRO, AUDIO_MACRO_LABELS, AlarmArmModeSchema, CLIP_BROKER_PACED_RATES, COCO_TO_MACRO, CamProfileSchema, DEFAULT_TIMELAPSE_PREVIEW_TEXT, DeviceType, EVENTFUL_CAP_NAMES, EVENT_KIND_BY_CAP, EVENT_TAXONOMY, MACRO_LABELS, NC_ALARM_DELAY_MAX_SEC, NC_ALARM_SENSORS_MAX, NC_ALARM_SYSTEM_EVENT_KINDS, NC_ALARM_TRIGGERED_MAX_SEC, NC_BATTERY_CONSUMABLE_SYSTEM_EVENT_KINDS, NC_CAMERA_SCOPE_CAP_NAME, NC_CONSUMABLE_LOW_PERCENT_DEFAULT, NC_CONSUMABLE_LOW_PERCENT_MAX, NC_GROUPING_DEFAULT_SEC, NC_GROUPING_MAX_SEC, NC_GROUPING_MIN_SEC, NC_RULE_EDITOR_SECTION_ORDER, NC_RULE_KIND_SPECS, NC_SENSOR_TRANSITION_UNSUPPORTED_REASON, NC_SYSTEM_EVENT_FAMILY_FILTERS, NC_SYSTEM_EVENT_KIND_GROUP_SPECS, NC_SYSTEM_EVENT_SUMMARY_FAMILIES, NC_TEMPLATE_HELD_BACK_SYSTEM_EVENT_KINDS, NC_TEMPLATE_VARS, NcAlarmConfigSchema, NcAlarmSensorsSchema, NcAlarmSettingsPatchSchema, NcHistoryEntrySchema, NcRuleLastRunsSchema, NodeDirectorySchema, RECORDING_EXPORT_MAX_READ_BYTES, SystemMirror, TIMELAPSE_DENSE_FLOOR_SEC, TimelapseRuleSchema, YAMNET_TO_MACRO, alarmDeviceBlocksArming, alarmDeviceSecureOnArm, alarmPatchLanded, conditionVisibleForKind, createSystemProxy, droppedConditionsForKind, isHeldBackTemplateVar, isSystemRuleKind, kindsForDiscriminator, knownValues, nodePickerItems, packagePickerItems, pickerForCondition, pickerForRuleClasses, resolveModeDelays, ruleDeviceCompatCapNames, ruleEditorSectionsForKind, ruleGroupingApplies, ruleKindOf, ruleKindSpec, ruleSeedForSection, sensorTransitionNeverFires, sensorTransitionOffered, stateLabel, systemEventDeliveryProblems, systemEventFilterAppliesToAnyKind, systemEventKindsOfFamily, systemFamilyOfKind, templateCarriesSummary, templateVarDeliveryApplies, templateVarKindApplies, templateVarSystemEventApplies, } from './index.js';
|