@camstack/types 1.1.44 → 1.1.45
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/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/cap-router-predicates.d.ts +43 -0
- package/dist/capabilities/custom-model-registry.cap.d.ts +4 -0
- package/dist/capabilities/index.d.ts +2 -2
- package/dist/capabilities/model-convert.cap.d.ts +2 -0
- package/dist/capabilities/model-distributor.cap.d.ts +4 -0
- package/dist/capabilities/pipeline-analytics.cap.d.ts +44 -1
- package/dist/capabilities/pipeline-executor.cap.d.ts +2 -0
- package/dist/capabilities/platform-probe.cap.d.ts +8 -0
- package/dist/capabilities/zone-analytics.cap.d.ts +78 -1
- package/dist/enums/event-category.d.ts +8 -0
- package/dist/generated/addon-api.d.ts +108 -4
- package/dist/index.js +158 -6
- package/dist/index.mjs +156 -7
- package/dist/inference/runtime-capabilities.d.ts +1 -1
- package/dist/interfaces/addon.d.ts +5 -1
- package/dist/interfaces/event-bus.d.ts +11 -1
- package/dist/interfaces/platform.d.ts +17 -0
- package/dist/{sleep-k6I1e98_.js → sleep-BdhADtqT.js} +8 -0
- package/dist/{sleep-DkhOVOjW.mjs → sleep-_sv7WKkq.mjs} +8 -0
- package/dist/types/models.d.ts +5 -0
- package/dist/types/pipeline-step.d.ts +20 -2
- package/package.json +1 -1
|
@@ -3422,9 +3422,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
3422
3422
|
description?: string | undefined;
|
|
3423
3423
|
icon?: string | undefined;
|
|
3424
3424
|
}[];
|
|
3425
|
+
inputChannels?: number | undefined;
|
|
3425
3426
|
inputLayout?: "nchw" | "nhwc" | undefined;
|
|
3426
3427
|
inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
|
|
3427
3428
|
preprocessMode?: "letterbox" | "resize" | undefined;
|
|
3429
|
+
postprocessor?: import("@camstack/types").PostprocessorType | undefined;
|
|
3428
3430
|
faceAlignment?: boolean | undefined;
|
|
3429
3431
|
extraFiles?: readonly {
|
|
3430
3432
|
url: string;
|
|
@@ -8046,7 +8048,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
8046
8048
|
width: number;
|
|
8047
8049
|
height: number;
|
|
8048
8050
|
};
|
|
8049
|
-
outputFormat: "classification" | "
|
|
8051
|
+
outputFormat: "classification" | "yolo" | "ssd" | "embedding" | "ocr" | "segmentation";
|
|
8050
8052
|
inputLayout?: "nchw" | "nhwc" | undefined;
|
|
8051
8053
|
inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
|
|
8052
8054
|
preprocessMode?: "letterbox" | "resize" | undefined;
|
|
@@ -8121,9 +8123,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
8121
8123
|
description?: string | undefined;
|
|
8122
8124
|
icon?: string | undefined;
|
|
8123
8125
|
}[];
|
|
8126
|
+
inputChannels?: number | undefined;
|
|
8124
8127
|
inputLayout?: "nchw" | "nhwc" | undefined;
|
|
8125
8128
|
inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
|
|
8126
8129
|
preprocessMode?: "letterbox" | "resize" | undefined;
|
|
8130
|
+
postprocessor?: import("@camstack/types").PostprocessorType | undefined;
|
|
8127
8131
|
faceAlignment?: boolean | undefined;
|
|
8128
8132
|
extraFiles?: readonly {
|
|
8129
8133
|
url: string;
|
|
@@ -8226,9 +8230,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
8226
8230
|
description?: string | undefined;
|
|
8227
8231
|
icon?: string | undefined;
|
|
8228
8232
|
}[];
|
|
8233
|
+
inputChannels?: number | undefined;
|
|
8229
8234
|
inputLayout?: "nchw" | "nhwc" | undefined;
|
|
8230
8235
|
inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
|
|
8231
8236
|
preprocessMode?: "letterbox" | "resize" | undefined;
|
|
8237
|
+
postprocessor?: import("@camstack/types").PostprocessorType | undefined;
|
|
8232
8238
|
faceAlignment?: boolean | undefined;
|
|
8233
8239
|
extraFiles?: readonly {
|
|
8234
8240
|
url: string;
|
|
@@ -9523,6 +9529,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
9523
9529
|
importance?: number | undefined;
|
|
9524
9530
|
bestEventId?: string | undefined;
|
|
9525
9531
|
importanceReason?: string | undefined;
|
|
9532
|
+
audioLabels?: readonly {
|
|
9533
|
+
label: string;
|
|
9534
|
+
peakScore: number;
|
|
9535
|
+
count: number;
|
|
9536
|
+
firstAt: number;
|
|
9537
|
+
lastAt: number;
|
|
9538
|
+
}[] | undefined;
|
|
9526
9539
|
}[];
|
|
9527
9540
|
meta: object;
|
|
9528
9541
|
}>;
|
|
@@ -9573,6 +9586,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
9573
9586
|
importance?: number | undefined;
|
|
9574
9587
|
bestEventId?: string | undefined;
|
|
9575
9588
|
importanceReason?: string | undefined;
|
|
9589
|
+
audioLabels?: readonly {
|
|
9590
|
+
label: string;
|
|
9591
|
+
peakScore: number;
|
|
9592
|
+
count: number;
|
|
9593
|
+
firstAt: number;
|
|
9594
|
+
lastAt: number;
|
|
9595
|
+
}[] | undefined;
|
|
9576
9596
|
} | null;
|
|
9577
9597
|
meta: object;
|
|
9578
9598
|
}>;
|
|
@@ -9625,6 +9645,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
9625
9645
|
importance?: number | undefined;
|
|
9626
9646
|
bestEventId?: string | undefined;
|
|
9627
9647
|
importanceReason?: string | undefined;
|
|
9648
|
+
audioLabels?: readonly {
|
|
9649
|
+
label: string;
|
|
9650
|
+
peakScore: number;
|
|
9651
|
+
count: number;
|
|
9652
|
+
firstAt: number;
|
|
9653
|
+
lastAt: number;
|
|
9654
|
+
}[] | undefined;
|
|
9628
9655
|
}[];
|
|
9629
9656
|
meta: object;
|
|
9630
9657
|
}>;
|
|
@@ -9953,7 +9980,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
9953
9980
|
nodeId: string;
|
|
9954
9981
|
};
|
|
9955
9982
|
output: {
|
|
9956
|
-
runtimeId: "onnx" | "coreml" | "openvino" | null;
|
|
9983
|
+
runtimeId: "onnx" | "coreml" | "openvino" | "edgetpu" | null;
|
|
9957
9984
|
device: string | null;
|
|
9958
9985
|
state: "idle" | "failed" | "ready" | "installing" | "verifying";
|
|
9959
9986
|
progress?: number | undefined;
|
|
@@ -11813,6 +11840,10 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
11813
11840
|
npu: {
|
|
11814
11841
|
type: "apple-ane" | "intel-npu";
|
|
11815
11842
|
} | null;
|
|
11843
|
+
coral?: {
|
|
11844
|
+
type: "coral-edgetpu";
|
|
11845
|
+
bus?: string | undefined;
|
|
11846
|
+
} | null | undefined;
|
|
11816
11847
|
};
|
|
11817
11848
|
scores: readonly {
|
|
11818
11849
|
runtime: "node" | "python";
|
|
@@ -11853,6 +11884,10 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
11853
11884
|
npu: {
|
|
11854
11885
|
type: "apple-ane" | "intel-npu";
|
|
11855
11886
|
} | null;
|
|
11887
|
+
coral?: {
|
|
11888
|
+
type: "coral-edgetpu";
|
|
11889
|
+
bus?: string | undefined;
|
|
11890
|
+
} | null | undefined;
|
|
11856
11891
|
};
|
|
11857
11892
|
meta: object;
|
|
11858
11893
|
}>;
|
|
@@ -15932,6 +15967,23 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
15932
15967
|
totalObjects: number;
|
|
15933
15968
|
byClass: Record<string, number>;
|
|
15934
15969
|
};
|
|
15970
|
+
stationaryObjects?: readonly {
|
|
15971
|
+
id: string;
|
|
15972
|
+
className: string;
|
|
15973
|
+
bbox: {
|
|
15974
|
+
x: number;
|
|
15975
|
+
y: number;
|
|
15976
|
+
w: number;
|
|
15977
|
+
h: number;
|
|
15978
|
+
};
|
|
15979
|
+
frameWidth: number;
|
|
15980
|
+
frameHeight: number;
|
|
15981
|
+
firstSeenAt: number;
|
|
15982
|
+
becameStationaryAt: number;
|
|
15983
|
+
lastConfirmedAt: number;
|
|
15984
|
+
label?: string | undefined;
|
|
15985
|
+
keyFrameMediaKey?: string | undefined;
|
|
15986
|
+
}[] | undefined;
|
|
15935
15987
|
} | null;
|
|
15936
15988
|
meta: object;
|
|
15937
15989
|
}>;
|
|
@@ -19514,9 +19566,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
19514
19566
|
description?: string | undefined;
|
|
19515
19567
|
icon?: string | undefined;
|
|
19516
19568
|
}[];
|
|
19569
|
+
inputChannels?: number | undefined;
|
|
19517
19570
|
inputLayout?: "nchw" | "nhwc" | undefined;
|
|
19518
19571
|
inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
|
|
19519
19572
|
preprocessMode?: "letterbox" | "resize" | undefined;
|
|
19573
|
+
postprocessor?: import("@camstack/types").PostprocessorType | undefined;
|
|
19520
19574
|
faceAlignment?: boolean | undefined;
|
|
19521
19575
|
extraFiles?: readonly {
|
|
19522
19576
|
url: string;
|
|
@@ -24138,7 +24192,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
24138
24192
|
width: number;
|
|
24139
24193
|
height: number;
|
|
24140
24194
|
};
|
|
24141
|
-
outputFormat: "classification" | "
|
|
24195
|
+
outputFormat: "classification" | "yolo" | "ssd" | "embedding" | "ocr" | "segmentation";
|
|
24142
24196
|
inputLayout?: "nchw" | "nhwc" | undefined;
|
|
24143
24197
|
inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
|
|
24144
24198
|
preprocessMode?: "letterbox" | "resize" | undefined;
|
|
@@ -24213,9 +24267,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
24213
24267
|
description?: string | undefined;
|
|
24214
24268
|
icon?: string | undefined;
|
|
24215
24269
|
}[];
|
|
24270
|
+
inputChannels?: number | undefined;
|
|
24216
24271
|
inputLayout?: "nchw" | "nhwc" | undefined;
|
|
24217
24272
|
inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
|
|
24218
24273
|
preprocessMode?: "letterbox" | "resize" | undefined;
|
|
24274
|
+
postprocessor?: import("@camstack/types").PostprocessorType | undefined;
|
|
24219
24275
|
faceAlignment?: boolean | undefined;
|
|
24220
24276
|
extraFiles?: readonly {
|
|
24221
24277
|
url: string;
|
|
@@ -24318,9 +24374,11 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
24318
24374
|
description?: string | undefined;
|
|
24319
24375
|
icon?: string | undefined;
|
|
24320
24376
|
}[];
|
|
24377
|
+
inputChannels?: number | undefined;
|
|
24321
24378
|
inputLayout?: "nchw" | "nhwc" | undefined;
|
|
24322
24379
|
inputNormalization?: "none" | "zero-one" | "imagenet" | undefined;
|
|
24323
24380
|
preprocessMode?: "letterbox" | "resize" | undefined;
|
|
24381
|
+
postprocessor?: import("@camstack/types").PostprocessorType | undefined;
|
|
24324
24382
|
faceAlignment?: boolean | undefined;
|
|
24325
24383
|
extraFiles?: readonly {
|
|
24326
24384
|
url: string;
|
|
@@ -25615,6 +25673,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
25615
25673
|
importance?: number | undefined;
|
|
25616
25674
|
bestEventId?: string | undefined;
|
|
25617
25675
|
importanceReason?: string | undefined;
|
|
25676
|
+
audioLabels?: readonly {
|
|
25677
|
+
label: string;
|
|
25678
|
+
peakScore: number;
|
|
25679
|
+
count: number;
|
|
25680
|
+
firstAt: number;
|
|
25681
|
+
lastAt: number;
|
|
25682
|
+
}[] | undefined;
|
|
25618
25683
|
}[];
|
|
25619
25684
|
meta: object;
|
|
25620
25685
|
}>;
|
|
@@ -25665,6 +25730,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
25665
25730
|
importance?: number | undefined;
|
|
25666
25731
|
bestEventId?: string | undefined;
|
|
25667
25732
|
importanceReason?: string | undefined;
|
|
25733
|
+
audioLabels?: readonly {
|
|
25734
|
+
label: string;
|
|
25735
|
+
peakScore: number;
|
|
25736
|
+
count: number;
|
|
25737
|
+
firstAt: number;
|
|
25738
|
+
lastAt: number;
|
|
25739
|
+
}[] | undefined;
|
|
25668
25740
|
} | null;
|
|
25669
25741
|
meta: object;
|
|
25670
25742
|
}>;
|
|
@@ -25717,6 +25789,13 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
25717
25789
|
importance?: number | undefined;
|
|
25718
25790
|
bestEventId?: string | undefined;
|
|
25719
25791
|
importanceReason?: string | undefined;
|
|
25792
|
+
audioLabels?: readonly {
|
|
25793
|
+
label: string;
|
|
25794
|
+
peakScore: number;
|
|
25795
|
+
count: number;
|
|
25796
|
+
firstAt: number;
|
|
25797
|
+
lastAt: number;
|
|
25798
|
+
}[] | undefined;
|
|
25720
25799
|
}[];
|
|
25721
25800
|
meta: object;
|
|
25722
25801
|
}>;
|
|
@@ -26045,7 +26124,7 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
26045
26124
|
nodeId: string;
|
|
26046
26125
|
};
|
|
26047
26126
|
output: {
|
|
26048
|
-
runtimeId: "onnx" | "coreml" | "openvino" | null;
|
|
26127
|
+
runtimeId: "onnx" | "coreml" | "openvino" | "edgetpu" | null;
|
|
26049
26128
|
device: string | null;
|
|
26050
26129
|
state: "idle" | "failed" | "ready" | "installing" | "verifying";
|
|
26051
26130
|
progress?: number | undefined;
|
|
@@ -27905,6 +27984,10 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
27905
27984
|
npu: {
|
|
27906
27985
|
type: "apple-ane" | "intel-npu";
|
|
27907
27986
|
} | null;
|
|
27987
|
+
coral?: {
|
|
27988
|
+
type: "coral-edgetpu";
|
|
27989
|
+
bus?: string | undefined;
|
|
27990
|
+
} | null | undefined;
|
|
27908
27991
|
};
|
|
27909
27992
|
scores: readonly {
|
|
27910
27993
|
runtime: "node" | "python";
|
|
@@ -27945,6 +28028,10 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
27945
28028
|
npu: {
|
|
27946
28029
|
type: "apple-ane" | "intel-npu";
|
|
27947
28030
|
} | null;
|
|
28031
|
+
coral?: {
|
|
28032
|
+
type: "coral-edgetpu";
|
|
28033
|
+
bus?: string | undefined;
|
|
28034
|
+
} | null | undefined;
|
|
27948
28035
|
};
|
|
27949
28036
|
meta: object;
|
|
27950
28037
|
}>;
|
|
@@ -32024,6 +32111,23 @@ export type AppRouter = import("@trpc/server/unstable-core-do-not-import").Route
|
|
|
32024
32111
|
totalObjects: number;
|
|
32025
32112
|
byClass: Record<string, number>;
|
|
32026
32113
|
};
|
|
32114
|
+
stationaryObjects?: readonly {
|
|
32115
|
+
id: string;
|
|
32116
|
+
className: string;
|
|
32117
|
+
bbox: {
|
|
32118
|
+
x: number;
|
|
32119
|
+
y: number;
|
|
32120
|
+
w: number;
|
|
32121
|
+
h: number;
|
|
32122
|
+
};
|
|
32123
|
+
frameWidth: number;
|
|
32124
|
+
frameHeight: number;
|
|
32125
|
+
firstSeenAt: number;
|
|
32126
|
+
becameStationaryAt: number;
|
|
32127
|
+
lastConfirmedAt: number;
|
|
32128
|
+
label?: string | undefined;
|
|
32129
|
+
keyFrameMediaKey?: string | undefined;
|
|
32130
|
+
}[] | undefined;
|
|
32027
32131
|
} | null;
|
|
32028
32132
|
meta: object;
|
|
32029
32133
|
}>;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_sleep = require("./sleep-BdhADtqT.js");
|
|
3
3
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
//#region src/health/wiring-health.ts
|
|
@@ -156,6 +156,15 @@ var ModelCatalogEntrySchema = zod.z.object({
|
|
|
156
156
|
width: zod.z.number(),
|
|
157
157
|
height: zod.z.number()
|
|
158
158
|
}),
|
|
159
|
+
/**
|
|
160
|
+
* Channel count of the model input tensor. Omit ⇒ 3 (RGB), the default for
|
|
161
|
+
* every detector / classifier / embedder. Set to 1 for a grayscale CTC text
|
|
162
|
+
* recognizer (EasyOCR VGG plate-OCR: input `[N,1,H,W]`) so the preprocess
|
|
163
|
+
* feeds a single-channel, EasyOCR-normalized tensor instead of the default
|
|
164
|
+
* 3-channel RGB one. Threaded through `PoolModelConfig.inputChannels` to the
|
|
165
|
+
* Python inference pool.
|
|
166
|
+
*/
|
|
167
|
+
inputChannels: zod.z.number().int().positive().optional(),
|
|
159
168
|
labels: zod.z.array(LabelDefinitionSchema).readonly(),
|
|
160
169
|
inputLayout: zod.z.enum(["nchw", "nhwc"]).optional(),
|
|
161
170
|
inputNormalization: zod.z.enum([
|
|
@@ -165,6 +174,16 @@ var ModelCatalogEntrySchema = zod.z.object({
|
|
|
165
174
|
]).optional(),
|
|
166
175
|
preprocessMode: zod.z.enum(["letterbox", "resize"]).optional(),
|
|
167
176
|
/**
|
|
177
|
+
* Per-MODEL postprocessor override. Absent ⇒ the step's own
|
|
178
|
+
* `StepDefinition.postprocessor` applies (the normal case — every model in a
|
|
179
|
+
* step shares its decode). Set it when a step hosts models with DIFFERENT raw
|
|
180
|
+
* output layouts under one slot: e.g. object-detection is `'yolo'` by default,
|
|
181
|
+
* but a Coral SSD MobileNet build emits the `TFLite_Detection_PostProcess`
|
|
182
|
+
* 4-tensor layout and needs `'ssd'`. Threaded into `PoolModelConfig.postprocessor`
|
|
183
|
+
* by the engine factory (`modelEntry.postprocessor ?? def.postprocessor`).
|
|
184
|
+
*/
|
|
185
|
+
postprocessor: zod.z.custom().optional(),
|
|
186
|
+
/**
|
|
168
187
|
* When true, the executor produces a landmark-aligned crop (similarity warp
|
|
169
188
|
* onto the canonical template) before this step runs, instead of a plain
|
|
170
189
|
* axis-aligned bbox crop. Required for face-recognition embedders (ArcFace):
|
|
@@ -7613,7 +7632,8 @@ var EngineProvisioningSchema = zod.z.object({
|
|
|
7613
7632
|
runtimeId: zod.z.enum([
|
|
7614
7633
|
"onnx",
|
|
7615
7634
|
"openvino",
|
|
7616
|
-
"coreml"
|
|
7635
|
+
"coreml",
|
|
7636
|
+
"edgetpu"
|
|
7617
7637
|
]).nullable(),
|
|
7618
7638
|
device: zod.z.string().nullable(),
|
|
7619
7639
|
state: zod.z.enum([
|
|
@@ -10654,6 +10674,36 @@ var ZoneScopeBreakdownSchema = PerScopeBreakdownSchema.extend({
|
|
|
10654
10674
|
* with the per-track detail panel and live overlay. */
|
|
10655
10675
|
trackIds: zod.z.array(zod.z.string()).readonly()
|
|
10656
10676
|
});
|
|
10677
|
+
/**
|
|
10678
|
+
* A parked ("stationary") object surfaced alongside occupancy — an object that
|
|
10679
|
+
* settled and stopped moving. It is NO LONGER a tracked object (the tracker was
|
|
10680
|
+
* told to forget it so it stops re-spawning tracks/events), but it IS still
|
|
10681
|
+
* physically present, so it keeps counting toward `frame` occupancy and is
|
|
10682
|
+
* listed here so the UI can show it in a dedicated "Stationary" section instead
|
|
10683
|
+
* of flooding the live event feed.
|
|
10684
|
+
*/
|
|
10685
|
+
var StationaryObjectSchema = zod.z.object({
|
|
10686
|
+
id: zod.z.string(),
|
|
10687
|
+
className: zod.z.string(),
|
|
10688
|
+
bbox: zod.z.object({
|
|
10689
|
+
x: zod.z.number(),
|
|
10690
|
+
y: zod.z.number(),
|
|
10691
|
+
w: zod.z.number(),
|
|
10692
|
+
h: zod.z.number()
|
|
10693
|
+
}),
|
|
10694
|
+
frameWidth: zod.z.number().int().nonnegative(),
|
|
10695
|
+
frameHeight: zod.z.number().int().nonnegative(),
|
|
10696
|
+
/** When the source track was first seen. */
|
|
10697
|
+
firstSeenAt: zod.z.number().int(),
|
|
10698
|
+
/** When the object was recognised as parked (promotion time). */
|
|
10699
|
+
becameStationaryAt: zod.z.number().int(),
|
|
10700
|
+
/** Last frame a detection confirmed the object is still there. */
|
|
10701
|
+
lastConfirmedAt: zod.z.number().int(),
|
|
10702
|
+
/** Enrichment label carried from the source track (identity / plate). */
|
|
10703
|
+
label: zod.z.string().optional(),
|
|
10704
|
+
/** Native-resolution key-frame media key for the parked object's best image. */
|
|
10705
|
+
keyFrameMediaKey: zod.z.string().optional()
|
|
10706
|
+
});
|
|
10657
10707
|
var CameraOccupancySnapshotSchema = zod.z.object({
|
|
10658
10708
|
/** Frame timestamp of the inference result that produced this snapshot. */
|
|
10659
10709
|
ts: zod.z.number().int(),
|
|
@@ -10662,10 +10712,15 @@ var CameraOccupancySnapshotSchema = zod.z.object({
|
|
|
10662
10712
|
frameHeight: zod.z.number().int().nonnegative(),
|
|
10663
10713
|
/** Per-zone breakdown — one entry per defined zone (user + onboard). */
|
|
10664
10714
|
zones: zod.z.array(ZoneScopeBreakdownSchema).readonly(),
|
|
10665
|
-
/** Frame-wide aggregate (everywhere, regardless of zone membership).
|
|
10715
|
+
/** Frame-wide aggregate (everywhere, regardless of zone membership).
|
|
10716
|
+
* INCLUDES currently-confirmed stationary objects (they are still present). */
|
|
10666
10717
|
frame: PerScopeBreakdownSchema,
|
|
10667
10718
|
/** Detections that landed outside every zone. Empty when no zones defined. */
|
|
10668
|
-
unzoned: PerScopeBreakdownSchema
|
|
10719
|
+
unzoned: PerScopeBreakdownSchema,
|
|
10720
|
+
/** Parked objects on this camera (additive — absent on legacy snapshots).
|
|
10721
|
+
* Surfaced separately so the UI shows them in a dedicated section rather
|
|
10722
|
+
* than as repeated tracks/events. */
|
|
10723
|
+
stationaryObjects: zod.z.array(StationaryObjectSchema).readonly().optional()
|
|
10669
10724
|
});
|
|
10670
10725
|
/**
|
|
10671
10726
|
* Time-series resolution. The history methods return one bucket per
|
|
@@ -15203,6 +15258,64 @@ function looseSchema(schema) {
|
|
|
15203
15258
|
const loose = schema.loose;
|
|
15204
15259
|
return typeof loose === "function" ? loose.call(schema) : schema;
|
|
15205
15260
|
}
|
|
15261
|
+
/**
|
|
15262
|
+
* Derive a COLLECTION-cap routing `addonId` from a NON-array mutation input
|
|
15263
|
+
* when the caller did NOT supply the top-level `{ addonId }` selector.
|
|
15264
|
+
*
|
|
15265
|
+
* Background: a `scope:'system', mode:'collection'` cap fans its ARRAY methods
|
|
15266
|
+
* (`listTargets`, `listTargetKinds`, …) across every provider, but routes each
|
|
15267
|
+
* single-object method (`send` / CRUD) to ONE provider. The runtime router
|
|
15268
|
+
* strips a TOP-LEVEL `addonId` selector and routes it via
|
|
15269
|
+
* `getProviderByAddonId`; absent that selector it falls through to the FIRST
|
|
15270
|
+
* registered provider — which misroutes (or hard-crashes on a partial provider)
|
|
15271
|
+
* when the target is owned by a DIFFERENT provider. See
|
|
15272
|
+
* `notification-output.cap.ts` (`Target.addonId` / `TargetKind.addonId` are
|
|
15273
|
+
* "stamped by each provider so the concat-fanned catalog stays routable").
|
|
15274
|
+
*
|
|
15275
|
+
* That routing `addonId` is ALREADY carried inside the mutation payload the
|
|
15276
|
+
* caller sends — e.g. `upsertTarget({ target: { …, addonId } })`. This helper
|
|
15277
|
+
* recovers it: it scans the input's DIRECT child object properties (bounded to
|
|
15278
|
+
* one level, first match wins) for a string `addonId`. Mirrors the child-side
|
|
15279
|
+
* `extractArgsAddonId` fallback in `child-cap-dispatch.ts`, which reads a
|
|
15280
|
+
* top-level `addonId` off the raw args; this covers the one-level-nested case
|
|
15281
|
+
* the top-level scan misses.
|
|
15282
|
+
*
|
|
15283
|
+
* Only used for non-array collection methods (array fan-out is never rerouted),
|
|
15284
|
+
* so it can never collapse a catalog aggregation onto a single provider. `null`
|
|
15285
|
+
* / non-object inputs yield `undefined` (fall back to the first provider,
|
|
15286
|
+
* preserving single-provider and id-only-payload back-compat).
|
|
15287
|
+
*/
|
|
15288
|
+
function extractNestedAddonId(input) {
|
|
15289
|
+
if (input === null || typeof input !== "object") return void 0;
|
|
15290
|
+
for (const value of Object.values(input)) if (value !== null && typeof value === "object") {
|
|
15291
|
+
const nested = value.addonId;
|
|
15292
|
+
if (typeof nested === "string") return nested;
|
|
15293
|
+
}
|
|
15294
|
+
}
|
|
15295
|
+
/**
|
|
15296
|
+
* True when an OBJECT input schema declares a top-level `addonId` field.
|
|
15297
|
+
*
|
|
15298
|
+
* Such a cap method routes explicitly via the top-level `{ addonId }` selector
|
|
15299
|
+
* (the `llm.generate` / `deleteProfile` posture). The runtime router therefore
|
|
15300
|
+
* MUST NOT also fall back to {@link extractNestedAddonId} for it — that would
|
|
15301
|
+
* let an incidental nested `addonId` (e.g. a key inside a free-form `jsonSchema`
|
|
15302
|
+
* record) hijack routing. Nested recovery is reserved for methods whose input
|
|
15303
|
+
* carries NO top-level selector but embeds the owning `addonId` inside a domain
|
|
15304
|
+
* entity (`upsertTarget({ target: { addonId } })`, `upsertProfile({ profile })`).
|
|
15305
|
+
*
|
|
15306
|
+
* Accepts both Zod 4 (`.shape` / `_def.shape`) and legacy shapes; returns false
|
|
15307
|
+
* for non-object schemas.
|
|
15308
|
+
*/
|
|
15309
|
+
function objectInputDeclaresAddonId(schema) {
|
|
15310
|
+
if (schema === null || typeof schema !== "object" && typeof schema !== "function") return false;
|
|
15311
|
+
const direct = schema.shape;
|
|
15312
|
+
const shape = direct !== void 0 && direct !== null ? direct : resolveDefShape(schema._def?.shape);
|
|
15313
|
+
return shape !== void 0 && shape !== null && typeof shape === "object" && Object.prototype.hasOwnProperty.call(shape, "addonId");
|
|
15314
|
+
}
|
|
15315
|
+
/** `_def.shape` may be a thunk (Zod defers object-shape evaluation) or a plain record. */
|
|
15316
|
+
function resolveDefShape(defShape) {
|
|
15317
|
+
return typeof defShape === "function" ? defShape() : defShape;
|
|
15318
|
+
}
|
|
15206
15319
|
/** Auth level → base-procedure key. `superAdmin` collapses to `admin`. */
|
|
15207
15320
|
function procedureAuthKey(auth) {
|
|
15208
15321
|
if (auth === "public") return "public";
|
|
@@ -18086,6 +18199,22 @@ var TrackSnapshotSchema = zod.z.object({
|
|
|
18086
18199
|
/** MediaStore key; resolve via `getTrackMedia({ trackId })`. */
|
|
18087
18200
|
mediaKey: zod.z.string()
|
|
18088
18201
|
});
|
|
18202
|
+
/**
|
|
18203
|
+
* One audio-classification label heard on the track's camera while the
|
|
18204
|
+
* track was alive, aggregated per label. An "episode" is one persisted
|
|
18205
|
+
* audio event (the confident-classification path: score ≥ the device's
|
|
18206
|
+
* `classificationMinScore`, class-change-or-heartbeat coalesced) — NOT
|
|
18207
|
+
* one 32 ms inference chunk, so counts stay human-scaled.
|
|
18208
|
+
*/
|
|
18209
|
+
var TrackAudioLabelSchema = zod.z.object({
|
|
18210
|
+
label: zod.z.string(),
|
|
18211
|
+
/** Highest classification score observed across the label's episodes. */
|
|
18212
|
+
peakScore: zod.z.number(),
|
|
18213
|
+
/** Number of coalesced audio-event episodes carrying this label. */
|
|
18214
|
+
count: zod.z.number(),
|
|
18215
|
+
firstAt: zod.z.number(),
|
|
18216
|
+
lastAt: zod.z.number()
|
|
18217
|
+
});
|
|
18089
18218
|
var TrackSchema = zod.z.object({
|
|
18090
18219
|
trackId: zod.z.string(),
|
|
18091
18220
|
deviceId: zod.z.number(),
|
|
@@ -18117,7 +18246,11 @@ var TrackSchema = zod.z.object({
|
|
|
18117
18246
|
bestEventId: zod.z.string().optional(),
|
|
18118
18247
|
/** Tag of the importance sub-signal that dominated the score
|
|
18119
18248
|
* (identity|dwell|proximity|class|confidence|travel|zone). */
|
|
18120
|
-
importanceReason: zod.z.string().optional()
|
|
18249
|
+
importanceReason: zod.z.string().optional(),
|
|
18250
|
+
/** Audio-classification labels heard on the camera during the track's
|
|
18251
|
+
* life (score ≥ device `classificationMinScore`), aggregated per label.
|
|
18252
|
+
* Absent on legacy rows / tracks with no confident audio. */
|
|
18253
|
+
audioLabels: zod.z.array(TrackAudioLabelSchema).readonly().optional()
|
|
18121
18254
|
});
|
|
18122
18255
|
var BaseEventFields = {
|
|
18123
18256
|
id: zod.z.string(),
|
|
@@ -22752,6 +22885,10 @@ var GpuInfoSchema = zod.z.object({
|
|
|
22752
22885
|
memoryMB: zod.z.number().optional()
|
|
22753
22886
|
});
|
|
22754
22887
|
var NpuInfoSchema = zod.z.object({ type: zod.z.enum(["apple-ane", "intel-npu"]) });
|
|
22888
|
+
var CoralInfoSchema = zod.z.object({
|
|
22889
|
+
type: zod.z.literal("coral-edgetpu"),
|
|
22890
|
+
bus: zod.z.string().optional()
|
|
22891
|
+
});
|
|
22755
22892
|
var HardwareInfoSchema = zod.z.object({
|
|
22756
22893
|
platform: HardwarePlatformSchema,
|
|
22757
22894
|
arch: HardwareArchSchema,
|
|
@@ -22760,7 +22897,8 @@ var HardwareInfoSchema = zod.z.object({
|
|
|
22760
22897
|
totalRAM_MB: zod.z.number(),
|
|
22761
22898
|
availableRAM_MB: zod.z.number(),
|
|
22762
22899
|
gpu: GpuInfoSchema.nullable(),
|
|
22763
|
-
npu: NpuInfoSchema.nullable()
|
|
22900
|
+
npu: NpuInfoSchema.nullable(),
|
|
22901
|
+
coral: CoralInfoSchema.nullable().optional()
|
|
22764
22902
|
});
|
|
22765
22903
|
var PlatformScoreSchema = zod.z.object({
|
|
22766
22904
|
runtime: zod.z.enum(["node", "python"]),
|
|
@@ -30099,6 +30237,10 @@ var CPU = {
|
|
|
30099
30237
|
value: "cpu",
|
|
30100
30238
|
label: "CPU"
|
|
30101
30239
|
};
|
|
30240
|
+
var USB = {
|
|
30241
|
+
value: "usb",
|
|
30242
|
+
label: "Coral USB"
|
|
30243
|
+
};
|
|
30102
30244
|
var RUNTIMES = [
|
|
30103
30245
|
{
|
|
30104
30246
|
id: "onnx",
|
|
@@ -30157,6 +30299,12 @@ var RUNTIMES = [
|
|
|
30157
30299
|
return out;
|
|
30158
30300
|
},
|
|
30159
30301
|
defaultDevice: "all"
|
|
30302
|
+
},
|
|
30303
|
+
{
|
|
30304
|
+
id: "edgetpu",
|
|
30305
|
+
supports: (hw) => hw?.coral != null,
|
|
30306
|
+
devices: () => [USB],
|
|
30307
|
+
defaultDevice: "usb"
|
|
30160
30308
|
}
|
|
30161
30309
|
];
|
|
30162
30310
|
function def(id) {
|
|
@@ -30189,6 +30337,7 @@ function defaultDeviceFor(id) {
|
|
|
30189
30337
|
* Delegates to `formatForRuntime` from runtime-mapping.ts.
|
|
30190
30338
|
*/
|
|
30191
30339
|
function modelFormatForRuntime(id) {
|
|
30340
|
+
if (id === "edgetpu") return "tflite";
|
|
30192
30341
|
return formatForRuntime(id);
|
|
30193
30342
|
}
|
|
30194
30343
|
/**
|
|
@@ -30735,6 +30884,7 @@ exports.SourceInfoSchema = SourceInfoSchema;
|
|
|
30735
30884
|
exports.SpatialDetectionSchema = SpatialDetectionSchema;
|
|
30736
30885
|
exports.SsoBridgeClaimsSchema = SsoBridgeClaimsSchema;
|
|
30737
30886
|
exports.StartEmbeddedInputSchema = StartEmbeddedInputSchema;
|
|
30887
|
+
exports.StationaryObjectSchema = StationaryObjectSchema;
|
|
30738
30888
|
exports.StorageAbortUploadInputSchema = AbortUploadInputSchema;
|
|
30739
30889
|
exports.StorageBeginDownloadInputSchema = BeginDownloadInputSchema;
|
|
30740
30890
|
exports.StorageBeginDownloadResultSchema = BeginDownloadResultSchema;
|
|
@@ -30925,6 +31075,7 @@ exports.event = require_sleep.event;
|
|
|
30925
31075
|
exports.eventEmitterCapability = eventEmitterCapability;
|
|
30926
31076
|
exports.eventsCapability = eventsCapability;
|
|
30927
31077
|
exports.expandCapMethods = require_sleep.expandCapMethods;
|
|
31078
|
+
exports.extractNestedAddonId = extractNestedAddonId;
|
|
30928
31079
|
exports.extractSourceInfoFromMetadata = extractSourceInfoFromMetadata;
|
|
30929
31080
|
exports.faceGalleryCapability = faceGalleryCapability;
|
|
30930
31081
|
exports.fanControlCapability = fanControlCapability;
|
|
@@ -31003,6 +31154,7 @@ exports.notificationOutputCapability = notificationOutputCapability;
|
|
|
31003
31154
|
exports.notifierCapability = notifierCapability;
|
|
31004
31155
|
exports.numericSensorCapability = numericSensorCapability;
|
|
31005
31156
|
exports.oauthIntegrationCapability = oauthIntegrationCapability;
|
|
31157
|
+
exports.objectInputDeclaresAddonId = objectInputDeclaresAddonId;
|
|
31006
31158
|
exports.osdCapability = osdCapability;
|
|
31007
31159
|
exports.parseCameraStreamConfig = parseCameraStreamConfig;
|
|
31008
31160
|
exports.parseExpression = parseExpression;
|