@camstack/addon-model-studio 1.1.289 → 1.1.291
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/{MotionZonesSettings-mlU-VSe5.mjs → MotionZonesSettings-DXxWq7vE.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-Cx5oEsjP.mjs → PrivacyMaskSettings-DvOLfWNI.mjs} +4 -4
- package/dist/{SceneMonitorEditor-GMAcbbJ0.mjs → SceneMonitorEditor-DqBJBxj1.mjs} +3 -3
- package/dist/_stub.js +4019 -3997
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DvHxq6CH.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BPa3rRsT.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BNQVBn-8.mjs +26 -0
- package/dist/addon-model-studio.css +1 -1
- package/dist/{hostInit-Beh8D27N.mjs → hostInit-7KFbe0cc.mjs} +2 -2
- package/dist/model-studio.addon.js +293 -155
- package/dist/model-studio.addon.mjs +293 -155
- package/dist/{player-overlays-BNm3QxNX.mjs → player-overlays-DfIeB2mX.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-BBGHW8J6.mjs → responsive-CISBqF_G.mjs} +1 -1
- package/dist/{scene-monitor-copy-BEIH363L.mjs → scene-monitor-copy-CScGmaG7.mjs} +1 -1
- package/dist/{square-DiTXshc8.mjs → square-BtvqwHZc.mjs} +1 -1
- package/dist/{trash-2-BVSkUDtB.mjs → trash-2-DIqyhuDF.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-ohPGd04S.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-C-xXOFlf.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BL63cAWe.mjs +0 -26
|
@@ -368,7 +368,7 @@ function buildScryptedRegistryDescriptor(entry) {
|
|
|
368
368
|
};
|
|
369
369
|
}
|
|
370
370
|
//#endregion
|
|
371
|
-
//#region ../types/dist/event-category-
|
|
371
|
+
//#region ../types/dist/event-category-Ceif8n-v.mjs
|
|
372
372
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
373
373
|
EventCategory["SystemBoot"] = "system.boot";
|
|
374
374
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -840,6 +840,10 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
840
840
|
* on the device detail page.
|
|
841
841
|
*/
|
|
842
842
|
EventCategory["DoorbellOnPressed"] = "doorbell.onPressed";
|
|
843
|
+
/** Mirrors `runningStateCapability.events.onStarted`. */
|
|
844
|
+
EventCategory["RunningStarted"] = "running.started";
|
|
845
|
+
/** Mirrors `runningStateCapability.events.onFinished`. */
|
|
846
|
+
EventCategory["RunningFinished"] = "running.finished";
|
|
843
847
|
/**
|
|
844
848
|
* Cap event fired by every device that registers the `event-emitter`
|
|
845
849
|
* capability. Mirrors `eventEmitterCapability.events.onEvent`. Carries
|
|
@@ -5799,7 +5803,7 @@ var ZodIssueCode = {
|
|
|
5799
5803
|
var ZodFirstPartyTypeKind;
|
|
5800
5804
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5801
5805
|
//#endregion
|
|
5802
|
-
//#region ../types/dist/sleep-
|
|
5806
|
+
//#region ../types/dist/sleep-CYfIZzGv.mjs
|
|
5803
5807
|
/**
|
|
5804
5808
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5805
5809
|
* window to float samples (D455).
|
|
@@ -6138,7 +6142,7 @@ Object.fromEntries([
|
|
|
6138
6142
|
* `hydrateSchema` to skip the `value` injection for structural-only fields.
|
|
6139
6143
|
*/
|
|
6140
6144
|
function isValuelessField(field) {
|
|
6141
|
-
return field.type === "separator" || field.type === "info" || field.type === "qr-code" || field.type === "button" || field.type === "object-array" || field.type === "widget" || field.type === "addon-action-button" || field.type === "device-action-button";
|
|
6145
|
+
return field.type === "separator" || field.type === "info" || field.type === "qr-code" || field.type === "button" || field.type === "object-array" || field.type === "widget" || field.type === "addon-action-button" || field.type === "device-action-button" || field.type === "account-sign-in" || field.type === "secret-presence";
|
|
6142
6146
|
}
|
|
6143
6147
|
function hydrateSchema(schema, values, options = {}) {
|
|
6144
6148
|
return {
|
|
@@ -9180,7 +9184,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
9180
9184
|
return DeviceRole;
|
|
9181
9185
|
}({});
|
|
9182
9186
|
//#endregion
|
|
9183
|
-
//#region ../types/dist/composition-
|
|
9187
|
+
//#region ../types/dist/composition-xz-ud5EQ.mjs
|
|
9184
9188
|
/**
|
|
9185
9189
|
* The ffmpeg build every CamStack node downloads, per platform and arch.
|
|
9186
9190
|
*
|
|
@@ -9481,6 +9485,20 @@ var table = {
|
|
|
9481
9485
|
apply: () => {
|
|
9482
9486
|
throw new ExpressionEvalError("count: stateful evaluation context is required");
|
|
9483
9487
|
}
|
|
9488
|
+
},
|
|
9489
|
+
dwell: {
|
|
9490
|
+
minArgs: 3,
|
|
9491
|
+
maxArgs: 3,
|
|
9492
|
+
apply: () => {
|
|
9493
|
+
throw new ExpressionEvalError("dwell: stateful evaluation context is required");
|
|
9494
|
+
}
|
|
9495
|
+
},
|
|
9496
|
+
latchedAt: {
|
|
9497
|
+
minArgs: 1,
|
|
9498
|
+
maxArgs: 1,
|
|
9499
|
+
apply: () => {
|
|
9500
|
+
throw new ExpressionEvalError("latchedAt: stateful evaluation context is required");
|
|
9501
|
+
}
|
|
9484
9502
|
}
|
|
9485
9503
|
};
|
|
9486
9504
|
Object.freeze(Object.assign(Object.create(null), table));
|
|
@@ -16480,7 +16498,15 @@ Object.freeze({
|
|
|
16480
16498
|
kind: "fixed",
|
|
16481
16499
|
result: ["number", "null"]
|
|
16482
16500
|
},
|
|
16483
|
-
count: NUMBER
|
|
16501
|
+
count: NUMBER,
|
|
16502
|
+
dwell: {
|
|
16503
|
+
kind: "fixed",
|
|
16504
|
+
result: ["boolean", "null"]
|
|
16505
|
+
},
|
|
16506
|
+
latchedAt: {
|
|
16507
|
+
kind: "fixed",
|
|
16508
|
+
result: ["number", "null"]
|
|
16509
|
+
}
|
|
16484
16510
|
});
|
|
16485
16511
|
`${COMPOSED_DEVICE_STABLE_ID_PREFIX}`;
|
|
16486
16512
|
/**
|
|
@@ -42708,9 +42734,6 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42708
42734
|
"device-battery-normal",
|
|
42709
42735
|
"device-consumable-low",
|
|
42710
42736
|
"device-consumable-normal",
|
|
42711
|
-
"device-tank-low",
|
|
42712
|
-
"device-tank-full",
|
|
42713
|
-
"device-tank-normal",
|
|
42714
42737
|
"stream-online",
|
|
42715
42738
|
"stream-offline",
|
|
42716
42739
|
"node-online",
|
|
@@ -42757,13 +42780,14 @@ var NcSystemEventKindSchema = _enum([
|
|
|
42757
42780
|
"camera-enabled"
|
|
42758
42781
|
]);
|
|
42759
42782
|
/** The legacy tail of {@link NcSystemEventKindSchema} — see its docblock. */
|
|
42760
|
-
var NC_LEGACY_SYSTEM_EVENT_KINDS =
|
|
42783
|
+
var NC_LEGACY_SYSTEM_EVENT_KINDS = [
|
|
42761
42784
|
"camera-online",
|
|
42762
42785
|
"camera-offline",
|
|
42763
42786
|
"camera-disabled",
|
|
42764
42787
|
"camera-enabled"
|
|
42765
|
-
]
|
|
42766
|
-
|
|
42788
|
+
];
|
|
42789
|
+
var NC_LEGACY_SYSTEM_EVENT_KIND_SET = new Set(NC_LEGACY_SYSTEM_EVENT_KINDS);
|
|
42790
|
+
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KIND_SET.has(kind));
|
|
42767
42791
|
/**
|
|
42768
42792
|
* The panel's transitions, as ONE list.
|
|
42769
42793
|
*
|
|
@@ -43882,18 +43906,11 @@ var NcRuleSchema = NcRuleInputSchema.extend({
|
|
|
43882
43906
|
*/
|
|
43883
43907
|
disabledTargetIds: array(string()).default([])
|
|
43884
43908
|
});
|
|
43885
|
-
/**
|
|
43886
|
-
* The state-summary SECTIONS (D647 / D698 / D708): the D637 kind groups that
|
|
43887
|
-
* report a still-true state. `addons` is the crash-looped addons only and
|
|
43888
|
-
* `addon-updates` the addons that are behind (D708 split them). `backups-exports` and `alarm` are not sections — a completed
|
|
43889
|
-
* job is not an open state, and the alarm stays instant.
|
|
43890
|
-
*/
|
|
43891
43909
|
var NcStateSummarySectionIdSchema = _enum([
|
|
43892
43910
|
"device-state",
|
|
43893
43911
|
"streams",
|
|
43894
43912
|
"battery",
|
|
43895
43913
|
"consumables",
|
|
43896
|
-
"tanks",
|
|
43897
43914
|
"detection-blind",
|
|
43898
43915
|
"nodes",
|
|
43899
43916
|
"addons",
|
|
@@ -45194,6 +45211,18 @@ Object.freeze({
|
|
|
45194
45211
|
reason: "camera sensor mappings not loaded"
|
|
45195
45212
|
});
|
|
45196
45213
|
/**
|
|
45214
|
+
* What the vision model must answer before a package event is emitted
|
|
45215
|
+
* when a packages rule has "Confirm with the LLM" on.
|
|
45216
|
+
*
|
|
45217
|
+
* `package` is the verdict. `confidence` is 0..1. `reason` is the model's
|
|
45218
|
+
* one-line explanation, stored on the event so a drop is not silent.
|
|
45219
|
+
*/
|
|
45220
|
+
var PackageLlmVerdictSchema = object({
|
|
45221
|
+
package: boolean(),
|
|
45222
|
+
confidence: number().min(0).max(1),
|
|
45223
|
+
reason: string().min(1)
|
|
45224
|
+
});
|
|
45225
|
+
/**
|
|
45197
45226
|
* A model choice has a SCOPE, and a scope change has a workflow.
|
|
45198
45227
|
*
|
|
45199
45228
|
* ## The two scopes
|
|
@@ -46130,6 +46159,21 @@ var ObjectEventSchema = object({
|
|
|
46130
46159
|
* pick-up written before D684 — UNKNOWN, never 0 and never `timestamp`.
|
|
46131
46160
|
*/
|
|
46132
46161
|
observedAt: number().optional(),
|
|
46162
|
+
/**
|
|
46163
|
+
* The delivery was emitted without a vision-model yes (D931).
|
|
46164
|
+
*
|
|
46165
|
+
* Set only when the packages rule asked for an LLM confirm and the model
|
|
46166
|
+
* was unreachable, timed out, or answered something that did not parse.
|
|
46167
|
+
* A notification reads it so it can say "possible" instead of a definite
|
|
46168
|
+
* delivery. Absent on every other row, and on a confirm that said yes.
|
|
46169
|
+
*/
|
|
46170
|
+
packagePossible: boolean().optional(),
|
|
46171
|
+
/**
|
|
46172
|
+
* The vision model's verdict, when a packages rule asked for one and the
|
|
46173
|
+
* model answered the schema (D931). A "no" never becomes a row — the
|
|
46174
|
+
* detector drops it and logs the reason. Present on a yes.
|
|
46175
|
+
*/
|
|
46176
|
+
packageLlmVerdict: PackageLlmVerdictSchema.optional(),
|
|
46133
46177
|
/** The parent track's key-event importance [0,1], propagated to every object
|
|
46134
46178
|
* event of the track (so an event row can be sorted by importance without a
|
|
46135
46179
|
* track join). Absent on legacy rows / before the track was scored. */
|
|
@@ -48337,11 +48381,18 @@ var KeptReasonSchema = _enum(["custom-pin"]);
|
|
|
48337
48381
|
* Where a choice's latency came from (D791): this node's own benchmark
|
|
48338
48382
|
* result, or the hardware-class table. Measured on the node beats the table.
|
|
48339
48383
|
*/
|
|
48340
|
-
var LatencySourceSchema = discriminatedUnion("kind", [
|
|
48341
|
-
kind: literal("
|
|
48342
|
-
|
|
48343
|
-
|
|
48344
|
-
|
|
48384
|
+
var LatencySourceSchema = discriminatedUnion("kind", [
|
|
48385
|
+
object({ kind: literal("table") }),
|
|
48386
|
+
object({
|
|
48387
|
+
kind: literal("node-benchmark"),
|
|
48388
|
+
resultId: string(),
|
|
48389
|
+
measuredAtMs: number()
|
|
48390
|
+
}),
|
|
48391
|
+
object({
|
|
48392
|
+
kind: literal("estimated"),
|
|
48393
|
+
estimatedFrom: HardwareClassIdSchema
|
|
48394
|
+
})
|
|
48395
|
+
]);
|
|
48345
48396
|
var DeviceModelChoiceSchema = object({
|
|
48346
48397
|
modelId: string(),
|
|
48347
48398
|
p50Ms: number(),
|
|
@@ -48349,6 +48400,11 @@ var DeviceModelChoiceSchema = object({
|
|
|
48349
48400
|
measured: boolean(),
|
|
48350
48401
|
/** Absent on a plan from before D791 — read as the table. */
|
|
48351
48402
|
source: LatencySourceSchema.optional(),
|
|
48403
|
+
/**
|
|
48404
|
+
* The measured class this latency was scaled from (D930). Absent when the
|
|
48405
|
+
* cell is the table or a node benchmark.
|
|
48406
|
+
*/
|
|
48407
|
+
estimatedFrom: HardwareClassIdSchema.optional(),
|
|
48352
48408
|
/** Parallel sessions at the camera rate with the headroom kept free: ⌊fps × (1 − headroom) / camera fps⌋. */
|
|
48353
48409
|
capacitySessions: number(),
|
|
48354
48410
|
personRecall: number()
|
|
@@ -58578,6 +58634,30 @@ includeCrops: boolean().optional() }).optional(), array(VehicleSchema).readonly(
|
|
|
58578
58634
|
kind: "mutation",
|
|
58579
58635
|
auth: "admin"
|
|
58580
58636
|
});
|
|
58637
|
+
var CORE_ULTRA_265K_IGPU_CLOCK_MHZ = 2e3;
|
|
58638
|
+
var positiveOrNull = number().nullable().transform((value) => value !== null && Number.isFinite(value) && value > 0 ? value : null);
|
|
58639
|
+
var textOrNull = string().nullable().transform((value) => value !== null && value.trim() !== "" ? value : null);
|
|
58640
|
+
var PrecisionGopsSchema = object({
|
|
58641
|
+
int8: positiveOrNull,
|
|
58642
|
+
fp16: positiveOrNull
|
|
58643
|
+
});
|
|
58644
|
+
/** What one accelerator device reported. Every failed query is null. */
|
|
58645
|
+
var AcceleratorComputeSchema = object({
|
|
58646
|
+
deviceKey: string(),
|
|
58647
|
+
fullDeviceName: textOrNull,
|
|
58648
|
+
executionUnits: positiveOrNull,
|
|
58649
|
+
clockMHz: positiveOrNull,
|
|
58650
|
+
gops: PrecisionGopsSchema.nullable(),
|
|
58651
|
+
architecture: textOrNull,
|
|
58652
|
+
npuName: textOrNull,
|
|
58653
|
+
tops: positiveOrNull,
|
|
58654
|
+
vendor: textOrNull,
|
|
58655
|
+
webgpuArchitecture: textOrNull,
|
|
58656
|
+
webgpuDevice: textOrNull,
|
|
58657
|
+
computeUnits: positiveOrNull
|
|
58658
|
+
});
|
|
58659
|
+
object({ accelerators: array(AcceleratorComputeSchema).nullable() });
|
|
58660
|
+
64 * CORE_ULTRA_265K_IGPU_CLOCK_MHZ;
|
|
58581
58661
|
var ModelFormatSchema = _enum(MODEL_FORMATS);
|
|
58582
58662
|
var HwAccelBackendInputSchema = _enum([
|
|
58583
58663
|
"videotoolbox",
|
|
@@ -58691,7 +58771,12 @@ var HardwareInfoSchema = object({
|
|
|
58691
58771
|
availableRAM_MB: number(),
|
|
58692
58772
|
gpu: GpuInfoSchema.nullable(),
|
|
58693
58773
|
npu: NpuInfoSchema.nullable(),
|
|
58694
|
-
coral: CoralInfoSchema.nullable().optional()
|
|
58774
|
+
coral: CoralInfoSchema.nullable().optional(),
|
|
58775
|
+
/**
|
|
58776
|
+
* Per-accelerator compute (D930). Omitted by a node that has not probed it.
|
|
58777
|
+
* `null` fields inside an entry are a failed query, never a zero.
|
|
58778
|
+
*/
|
|
58779
|
+
accelerators: array(AcceleratorComputeSchema).readonly().optional()
|
|
58695
58780
|
});
|
|
58696
58781
|
var PlatformScoreSchema = object({
|
|
58697
58782
|
runtime: literal("python"),
|
|
@@ -59224,6 +59309,22 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
59224
59309
|
deviceId: number(),
|
|
59225
59310
|
status: PtzAutotrackStatusSchema
|
|
59226
59311
|
});
|
|
59312
|
+
var RunningStateSourceSchema = _enum(["native", "assigned"]);
|
|
59313
|
+
object({
|
|
59314
|
+
/** null = unknown — never coerced to false (D393). */
|
|
59315
|
+
running: boolean().nullable(),
|
|
59316
|
+
/** Epoch ms the current boolean began; null while `running` is null. */
|
|
59317
|
+
since: number().nullable(),
|
|
59318
|
+
source: RunningStateSourceSchema,
|
|
59319
|
+
phase: string().nullable(),
|
|
59320
|
+
lastFetchedAt: number()
|
|
59321
|
+
});
|
|
59322
|
+
object({
|
|
59323
|
+
deviceId: number(),
|
|
59324
|
+
since: number().nullable(),
|
|
59325
|
+
phase: string().nullable()
|
|
59326
|
+
});
|
|
59327
|
+
Object.values(DeviceType);
|
|
59227
59328
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
59228
59329
|
kind: "mutation",
|
|
59229
59330
|
auth: "admin"
|
|
@@ -61063,7 +61164,20 @@ var ZoneRuleSchema = object({
|
|
|
61063
61164
|
* Defaults to `true` so operators creating a rule via the UI
|
|
61064
61165
|
* see it active immediately.
|
|
61065
61166
|
*/
|
|
61066
|
-
enabled: boolean().default(true)
|
|
61167
|
+
enabled: boolean().default(true),
|
|
61168
|
+
/**
|
|
61169
|
+
* Package stage only. When true, a package candidate may open from a
|
|
61170
|
+
* scene difference in this rule's zone after a person leaves. The
|
|
61171
|
+
* package model, when it boxes something overlapping, is extra evidence
|
|
61172
|
+
* and is not the gate. Absent or false keeps today's model path.
|
|
61173
|
+
*/
|
|
61174
|
+
detectBySceneDifference: boolean().optional(),
|
|
61175
|
+
/**
|
|
61176
|
+
* Package stage only. When true, a promoted package is shown to the
|
|
61177
|
+
* `llm` cap before the delivery event is emitted. Absent or false emits
|
|
61178
|
+
* as today. Usable with or without `detectBySceneDifference`.
|
|
61179
|
+
*/
|
|
61180
|
+
confirmWithLlm: boolean().optional()
|
|
61067
61181
|
});
|
|
61068
61182
|
array(ZoneRuleSchema).readonly();
|
|
61069
61183
|
object({
|
|
@@ -70603,6 +70717,13 @@ Object.freeze({
|
|
|
70603
70717
|
access: "create",
|
|
70604
70718
|
role: "admin"
|
|
70605
70719
|
},
|
|
70720
|
+
"runningState.getStatus": {
|
|
70721
|
+
capName: "running-state",
|
|
70722
|
+
capScope: "device",
|
|
70723
|
+
addonId: null,
|
|
70724
|
+
access: "view",
|
|
70725
|
+
role: "viewer"
|
|
70726
|
+
},
|
|
70606
70727
|
"sceneMonitor.captureReference": {
|
|
70607
70728
|
capName: "scene-monitor",
|
|
70608
70729
|
capScope: "device",
|
|
@@ -75317,6 +75438,32 @@ var APPLIANCE_CAP_VOCABULARY = {
|
|
|
75317
75438
|
}],
|
|
75318
75439
|
events: { onSent: { notOperatorFacing: "a delivery receipt of a send this system made — not a fact about the world" } }
|
|
75319
75440
|
},
|
|
75441
|
+
"running-state": {
|
|
75442
|
+
scope: "device",
|
|
75443
|
+
noun: t("Running", "In funzione"),
|
|
75444
|
+
state: [{
|
|
75445
|
+
kind: "boolean",
|
|
75446
|
+
field: "running",
|
|
75447
|
+
label: t("Running", "In funzione"),
|
|
75448
|
+
whenTrue: t("When {device} starts", "Quando {device} inizia"),
|
|
75449
|
+
whenFalse: t("When {device} finishes", "Quando {device} finisce"),
|
|
75450
|
+
icon: "play"
|
|
75451
|
+
}],
|
|
75452
|
+
events: {
|
|
75453
|
+
onStarted: {
|
|
75454
|
+
category: EventCategory.RunningStarted,
|
|
75455
|
+
label: t("Started running", "Ha iniziato a funzionare"),
|
|
75456
|
+
phrase: t("When {device} starts running", "Quando {device} inizia a funzionare"),
|
|
75457
|
+
icon: "play"
|
|
75458
|
+
},
|
|
75459
|
+
onFinished: {
|
|
75460
|
+
category: EventCategory.RunningFinished,
|
|
75461
|
+
label: t("Finished", "Ha finito"),
|
|
75462
|
+
phrase: t("When {device} finishes", "Quando {device} finisce"),
|
|
75463
|
+
icon: "square"
|
|
75464
|
+
}
|
|
75465
|
+
}
|
|
75466
|
+
},
|
|
75320
75467
|
update: {
|
|
75321
75468
|
scope: "device",
|
|
75322
75469
|
noun: t("Firmware update", "Aggiornamento firmware"),
|
|
@@ -78857,6 +79004,11 @@ Object.freeze({
|
|
|
78857
79004
|
form: "single",
|
|
78858
79005
|
optional: true
|
|
78859
79006
|
}],
|
|
79007
|
+
"runningState.getStatus": [{
|
|
79008
|
+
name: "deviceId",
|
|
79009
|
+
form: "single",
|
|
79010
|
+
optional: false
|
|
79011
|
+
}],
|
|
78860
79012
|
"sceneMonitor.captureReference": [{
|
|
78861
79013
|
name: "deviceId",
|
|
78862
79014
|
form: "single",
|
|
@@ -79407,40 +79559,7 @@ var NC_AUDIO_DEFAULTS = {
|
|
|
79407
79559
|
samplingSeconds: 10
|
|
79408
79560
|
};
|
|
79409
79561
|
new Set(["devices", "classes"]);
|
|
79410
|
-
|
|
79411
|
-
* WHICH narrowing filter speaks about WHICH system-event kind — one predicate,
|
|
79412
|
-
* consumed by the rule ENGINE and by every rule EDITOR.
|
|
79413
|
-
*
|
|
79414
|
-
* ── The failure this file exists for ───────────────────────────────────────
|
|
79415
|
-
* `NcSystemEventConditionSchema` carries four optional narrowing lists
|
|
79416
|
-
* (`deviceIds`, `deviceTypes`, `nodeIds`, `packageNames`) beside a required
|
|
79417
|
-
* `kinds` gate. They are not four filters over one vocabulary: each belongs to
|
|
79418
|
-
* a FAMILY of kinds and is meaningless outside it. A node going away has no
|
|
79419
|
-
* device type; a completed export has no package; `stream-offline` deliberately
|
|
79420
|
-
* carries no device type at all (a stream belongs to a camera by construction).
|
|
79421
|
-
*
|
|
79422
|
-
* The engine applied all four to every kind, so a filter from one family failed
|
|
79423
|
-
* a kind from another family CLOSED. The operator's live rule "Eventi di
|
|
79424
|
-
* sistema" selected eleven kinds and set `deviceTypes: ['camera']` — the only
|
|
79425
|
-
* way to say "only my cameras" about the two liveness kinds — and NINE of the
|
|
79426
|
-
* eleven silently stopped being deliverable. Four days of history contained
|
|
79427
|
-
* `device-online` and `device-offline` and nothing else, across a window in
|
|
79428
|
-
* which agents were restarted and addons were updated.
|
|
79429
|
-
*
|
|
79430
|
-
* Both editors already computed this scoping, to decide which filter boxes to
|
|
79431
|
-
* render; the cap's own docblock already promised it ("Narrow a `device-*` kind
|
|
79432
|
-
* to these device TYPES"). Only the engine disagreed, and it disagreed in the
|
|
79433
|
-
* destructive direction. So the rule is stated ONCE, here, and the engine and
|
|
79434
|
-
* the editors are readers of it rather than three independent authors.
|
|
79435
|
-
*
|
|
79436
|
-
* ── The direction ─────────────────────────────────────────────────────────
|
|
79437
|
-
* Out of family ⇒ the filter is IGNORED, never fail-closed. An editor that
|
|
79438
|
-
* hides a box has already told the operator this filter does not speak about
|
|
79439
|
-
* these kinds, so honouring it as an exclusion contradicts the only
|
|
79440
|
-
* explanation the operator was ever given. Inside its family the filter still
|
|
79441
|
-
* narrows, and still fails CLOSED on a subject that cannot produce the identity
|
|
79442
|
-
* it tests (a device the mirror cannot name is not evidence of a camera).
|
|
79443
|
-
*/
|
|
79562
|
+
new Set(NC_LEGACY_SYSTEM_EVENT_KINDS);
|
|
79444
79563
|
/**
|
|
79445
79564
|
* Every filter, for the callers that must cover all of them (guards, tests).
|
|
79446
79565
|
*
|
|
@@ -79466,9 +79585,6 @@ new Map(Object.entries({
|
|
|
79466
79585
|
"device-battery-normal": "device-events",
|
|
79467
79586
|
"device-consumable-low": "device-events",
|
|
79468
79587
|
"device-consumable-normal": "device-events",
|
|
79469
|
-
"device-tank-low": "device-events",
|
|
79470
|
-
"device-tank-full": "device-events",
|
|
79471
|
-
"device-tank-normal": "device-events",
|
|
79472
79588
|
"stream-online": "device-events",
|
|
79473
79589
|
"stream-offline": "device-events",
|
|
79474
79590
|
"detection-blind": "device-events",
|
|
@@ -79545,16 +79661,6 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
|
79545
79661
|
label: "Consumables",
|
|
79546
79662
|
kinds: ["device-consumable-low", "device-consumable-normal"]
|
|
79547
79663
|
},
|
|
79548
|
-
{
|
|
79549
|
-
id: "tanks",
|
|
79550
|
-
family: "device-events",
|
|
79551
|
-
label: "Tanks",
|
|
79552
|
-
kinds: [
|
|
79553
|
-
"device-tank-low",
|
|
79554
|
-
"device-tank-full",
|
|
79555
|
-
"device-tank-normal"
|
|
79556
|
-
]
|
|
79557
|
-
},
|
|
79558
79664
|
{
|
|
79559
79665
|
id: "detection-blind",
|
|
79560
79666
|
family: "device-events",
|
|
@@ -79712,11 +79818,6 @@ var RULE_BODY_ONLY = ["body"];
|
|
|
79712
79818
|
var RULE_TEXT = ["title", "body"];
|
|
79713
79819
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
79714
79820
|
var CONSUMABLE = ["device-consumable-low", "device-consumable-normal"];
|
|
79715
|
-
var TANK = [
|
|
79716
|
-
"device-tank-low",
|
|
79717
|
-
"device-tank-full",
|
|
79718
|
-
"device-tank-normal"
|
|
79719
|
-
];
|
|
79720
79821
|
var ALERT_EPISODE = [
|
|
79721
79822
|
"alert-critical",
|
|
79722
79823
|
"alert-error",
|
|
@@ -79748,7 +79849,6 @@ var DEVICE_EVENTS = [
|
|
|
79748
79849
|
"device-enabled",
|
|
79749
79850
|
...BATTERY,
|
|
79750
79851
|
...CONSUMABLE,
|
|
79751
|
-
...TANK,
|
|
79752
79852
|
"stream-online",
|
|
79753
79853
|
"stream-offline",
|
|
79754
79854
|
"detection-blind",
|
|
@@ -79794,12 +79894,6 @@ var STATE_SUMMARY_SECTION_VARS = [
|
|
|
79794
79894
|
example: "Robot — filter 10 %",
|
|
79795
79895
|
kinds: CONSUMABLE
|
|
79796
79896
|
},
|
|
79797
|
-
{
|
|
79798
|
-
name: "summaryTanks",
|
|
79799
|
-
label: "Summary: tanks",
|
|
79800
|
-
example: "Robot — clean water low",
|
|
79801
|
-
kinds: TANK
|
|
79802
|
-
},
|
|
79803
79897
|
{
|
|
79804
79898
|
name: "summaryDetection",
|
|
79805
79899
|
label: "Summary: cameras detecting nothing",
|
|
@@ -79915,8 +80009,7 @@ var STATE_SUMMARY_VARS = [
|
|
|
79915
80009
|
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
79916
80010
|
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
79917
80011
|
([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
|
|
79918
|
-
([...RULE_TEXT], [...CONSUMABLE
|
|
79919
|
-
([...RULE_TEXT], [...TANK]),
|
|
80012
|
+
([...RULE_TEXT], [...CONSUMABLE]),
|
|
79920
80013
|
[...RULE_TEXT],
|
|
79921
80014
|
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
79922
80015
|
([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
|
|
@@ -80020,15 +80113,6 @@ new Map([
|
|
|
80020
80113
|
snapshotLabel: "Consumables low now",
|
|
80021
80114
|
snapshotSection: "consumables"
|
|
80022
80115
|
},
|
|
80023
|
-
{
|
|
80024
|
-
id: "tanks",
|
|
80025
|
-
family: "device-events",
|
|
80026
|
-
label: "Tanks (low or full / back to normal)",
|
|
80027
|
-
bad: ["device-tank-low", "device-tank-full"],
|
|
80028
|
-
recovery: ["device-tank-normal"],
|
|
80029
|
-
snapshotLabel: "Tanks low or full now",
|
|
80030
|
-
snapshotSection: "tanks"
|
|
80031
|
-
},
|
|
80032
80116
|
{
|
|
80033
80117
|
id: "motion-noise",
|
|
80034
80118
|
family: "device-events",
|
|
@@ -80430,6 +80514,10 @@ TimelapseRuleInputSchema.extend({
|
|
|
80430
80514
|
updatedAt: number()
|
|
80431
80515
|
});
|
|
80432
80516
|
MotionOnMotionChangedDataSchema.omit({ triggeredBy: true });
|
|
80517
|
+
Object.freeze({
|
|
80518
|
+
person: .8,
|
|
80519
|
+
vehicle: .8
|
|
80520
|
+
});
|
|
80433
80521
|
object({
|
|
80434
80522
|
/**
|
|
80435
80523
|
* Fraction of the box's own size added on EACH side before cutting.
|
|
@@ -81577,6 +81665,91 @@ async function moveInto(source, target) {
|
|
|
81577
81665
|
}
|
|
81578
81666
|
}
|
|
81579
81667
|
//#endregion
|
|
81668
|
+
//#region src/frigate/plus-decode.ts
|
|
81669
|
+
var UnsupportedPlusDecodeError = class extends Error {
|
|
81670
|
+
type;
|
|
81671
|
+
format;
|
|
81672
|
+
detectors;
|
|
81673
|
+
constructor(type, format, detectors) {
|
|
81674
|
+
const detList = detectors.length > 0 ? detectors.join(", ") : "(none)";
|
|
81675
|
+
super(`Frigate+ import refused — no decoder for type "${type}", format "${format}", detectors ${detList}`);
|
|
81676
|
+
this.name = "UnsupportedPlusDecodeError";
|
|
81677
|
+
this.type = type;
|
|
81678
|
+
this.format = format;
|
|
81679
|
+
this.detectors = detectors;
|
|
81680
|
+
}
|
|
81681
|
+
};
|
|
81682
|
+
var YOLO_FAMILIES = new Set(["yolo-generic", "yolov9"]);
|
|
81683
|
+
var SSD_FAMILIES = new Set(["mobiledet", "ssd"]);
|
|
81684
|
+
var YOLONAS_FAMILIES = new Set(["yolonas"]);
|
|
81685
|
+
function familyDefaultArtifact(type) {
|
|
81686
|
+
if (YOLO_FAMILIES.has(type) || YOLONAS_FAMILIES.has(type)) return "onnx";
|
|
81687
|
+
if (SSD_FAMILIES.has(type)) return "tflite";
|
|
81688
|
+
return null;
|
|
81689
|
+
}
|
|
81690
|
+
function matrixDecode(type, format) {
|
|
81691
|
+
if (YOLO_FAMILIES.has(type)) {
|
|
81692
|
+
if (format === "onnx") return {
|
|
81693
|
+
format: "onnx",
|
|
81694
|
+
extension: ".onnx",
|
|
81695
|
+
postprocessor: "yolo"
|
|
81696
|
+
};
|
|
81697
|
+
return {
|
|
81698
|
+
format: "tflite",
|
|
81699
|
+
extension: ".tflite",
|
|
81700
|
+
postprocessor: "yolo-split-dfl"
|
|
81701
|
+
};
|
|
81702
|
+
}
|
|
81703
|
+
if (YOLONAS_FAMILIES.has(type)) {
|
|
81704
|
+
if (format === "onnx") return {
|
|
81705
|
+
format: "onnx",
|
|
81706
|
+
extension: ".onnx",
|
|
81707
|
+
postprocessor: "yolonas"
|
|
81708
|
+
};
|
|
81709
|
+
return null;
|
|
81710
|
+
}
|
|
81711
|
+
if (SSD_FAMILIES.has(type)) {
|
|
81712
|
+
if (format === "tflite") return {
|
|
81713
|
+
format: "tflite",
|
|
81714
|
+
extension: ".tflite",
|
|
81715
|
+
postprocessor: "ssd"
|
|
81716
|
+
};
|
|
81717
|
+
return null;
|
|
81718
|
+
}
|
|
81719
|
+
return null;
|
|
81720
|
+
}
|
|
81721
|
+
function assertOverrideBacked(type, formatOverride, detectors) {
|
|
81722
|
+
if (formatOverride === "onnx") {
|
|
81723
|
+
if (!detectors.includes("onnx") && !detectors.includes("openvino")) throw new UnsupportedPlusDecodeError(type, formatOverride, detectors);
|
|
81724
|
+
return;
|
|
81725
|
+
}
|
|
81726
|
+
if (!detectors.includes("edgetpu")) throw new UnsupportedPlusDecodeError(type, formatOverride, detectors);
|
|
81727
|
+
}
|
|
81728
|
+
function plusArtifactFormat(format) {
|
|
81729
|
+
if (format === "onnx" || format === "tflite") return format;
|
|
81730
|
+
return null;
|
|
81731
|
+
}
|
|
81732
|
+
function resolvePlusDecode(info, formatOverride) {
|
|
81733
|
+
const type = info.type;
|
|
81734
|
+
const detectors = info.supportedDetectors ?? [];
|
|
81735
|
+
let format;
|
|
81736
|
+
if (formatOverride !== void 0) {
|
|
81737
|
+
const artifact = plusArtifactFormat(formatOverride);
|
|
81738
|
+
if (artifact === null) throw new UnsupportedPlusDecodeError(type, formatOverride, detectors);
|
|
81739
|
+
if (detectors.length > 0) assertOverrideBacked(type, artifact, detectors);
|
|
81740
|
+
format = artifact;
|
|
81741
|
+
} else if (detectors.includes("onnx") || detectors.includes("openvino")) format = "onnx";
|
|
81742
|
+
else if (detectors.includes("edgetpu")) format = "tflite";
|
|
81743
|
+
else if (detectors.length === 0) {
|
|
81744
|
+
const fallback = familyDefaultArtifact(type);
|
|
81745
|
+
if (fallback === null) throw new UnsupportedPlusDecodeError(type, "(default)", detectors);
|
|
81746
|
+
format = fallback;
|
|
81747
|
+
} else throw new UnsupportedPlusDecodeError(type, "(detectors)", detectors);
|
|
81748
|
+
const decode = matrixDecode(type, format);
|
|
81749
|
+
if (decode === null) throw new UnsupportedPlusDecodeError(type, format, detectors);
|
|
81750
|
+
return decode;
|
|
81751
|
+
}
|
|
81752
|
+
//#endregion
|
|
81580
81753
|
//#region src/frigate/frigate-plus.ts
|
|
81581
81754
|
/**
|
|
81582
81755
|
* Frigate+ API client — the REAL api.frigate.video contract, verified against
|
|
@@ -81671,12 +81844,17 @@ function toModelInfo(raw, modelId) {
|
|
|
81671
81844
|
if (isRecord(raw.labelMap)) {
|
|
81672
81845
|
for (const [k, v] of Object.entries(raw.labelMap)) if (typeof v === "string") labelMap[k] = v;
|
|
81673
81846
|
}
|
|
81847
|
+
const supportedDetectors = [];
|
|
81848
|
+
if (Array.isArray(raw.supportedDetectors)) {
|
|
81849
|
+
for (const d of raw.supportedDetectors) if (typeof d === "string") supportedDetectors.push(d);
|
|
81850
|
+
}
|
|
81674
81851
|
return {
|
|
81675
81852
|
id: typeof raw.id === "string" ? raw.id : modelId,
|
|
81676
81853
|
type: typeof raw.type === "string" ? raw.type : "unknown",
|
|
81677
81854
|
width: typeof raw.width === "number" ? raw.width : 320,
|
|
81678
81855
|
height: typeof raw.height === "number" ? raw.height : 320,
|
|
81679
|
-
labelMap
|
|
81856
|
+
labelMap,
|
|
81857
|
+
supportedDetectors
|
|
81680
81858
|
};
|
|
81681
81859
|
}
|
|
81682
81860
|
/** Resolve one model's metadata + presigned artifact URL. */
|
|
@@ -81691,39 +81869,6 @@ async function requestPlusModelDownload(fetchFn, apiKey, plusModelId) {
|
|
|
81691
81869
|
downloadUrl: url
|
|
81692
81870
|
};
|
|
81693
81871
|
}
|
|
81694
|
-
/** Frigate+ model type → our format + decode. Mirrors the Frigate presets. */
|
|
81695
|
-
var PLUS_TYPE_MAP = {
|
|
81696
|
-
mobiledet: {
|
|
81697
|
-
format: "tflite",
|
|
81698
|
-
postprocessor: "ssd",
|
|
81699
|
-
extension: ".tflite"
|
|
81700
|
-
},
|
|
81701
|
-
/** List API uses `ssd` for MobileDet rows. */
|
|
81702
|
-
ssd: {
|
|
81703
|
-
format: "tflite",
|
|
81704
|
-
postprocessor: "ssd",
|
|
81705
|
-
extension: ".tflite"
|
|
81706
|
-
},
|
|
81707
|
-
yolonas: {
|
|
81708
|
-
format: "onnx",
|
|
81709
|
-
postprocessor: "yolonas",
|
|
81710
|
-
extension: ".onnx"
|
|
81711
|
-
},
|
|
81712
|
-
yolov9: {
|
|
81713
|
-
format: "onnx",
|
|
81714
|
-
extension: ".onnx"
|
|
81715
|
-
},
|
|
81716
|
-
"yolo-generic": {
|
|
81717
|
-
format: "onnx",
|
|
81718
|
-
extension: ".onnx"
|
|
81719
|
-
}
|
|
81720
|
-
};
|
|
81721
|
-
function plusTypeTraits(type) {
|
|
81722
|
-
return PLUS_TYPE_MAP[type] ?? {
|
|
81723
|
-
format: "onnx",
|
|
81724
|
-
extension: ".onnx"
|
|
81725
|
-
};
|
|
81726
|
-
}
|
|
81727
81872
|
/** Ordered labels from the API's `index → label` map; holes keep alignment. */
|
|
81728
81873
|
function orderedLabels(labelMap) {
|
|
81729
81874
|
const indices = Object.keys(labelMap).map((k) => Number.parseInt(k, 10)).filter((n) => Number.isInteger(n) && n >= 0);
|
|
@@ -81740,16 +81885,7 @@ function orderedLabels(labelMap) {
|
|
|
81740
81885
|
* Distribute.
|
|
81741
81886
|
*/
|
|
81742
81887
|
function plusInfoToDescriptor(info, opts) {
|
|
81743
|
-
const
|
|
81744
|
-
const traits = opts.format === "tflite" ? {
|
|
81745
|
-
format: "tflite",
|
|
81746
|
-
extension: ".tflite",
|
|
81747
|
-
...info.type === "ssd" || info.type === "mobiledet" ? { postprocessor: "ssd" } : {}
|
|
81748
|
-
} : opts.format === "onnx" ? {
|
|
81749
|
-
format: "onnx",
|
|
81750
|
-
extension: ".onnx",
|
|
81751
|
-
...base.postprocessor !== void 0 ? { postprocessor: base.postprocessor } : {}
|
|
81752
|
-
} : base;
|
|
81888
|
+
const decode = resolvePlusDecode(info, opts.format);
|
|
81753
81889
|
const labels = orderedLabels(info.labelMap);
|
|
81754
81890
|
return {
|
|
81755
81891
|
stepId: "object-detection",
|
|
@@ -81757,7 +81893,7 @@ function plusInfoToDescriptor(info, opts) {
|
|
|
81757
81893
|
id: opts.modelId,
|
|
81758
81894
|
name: opts.name,
|
|
81759
81895
|
description: `Frigate+ personal model (${info.type}) — imported via Model Studio`,
|
|
81760
|
-
formats: { [
|
|
81896
|
+
formats: { [decode.format]: {
|
|
81761
81897
|
url: `camstack-local://${opts.modelId}/${opts.filename}`,
|
|
81762
81898
|
sizeMB: opts.sizeMB,
|
|
81763
81899
|
runtimes: ["python"]
|
|
@@ -81775,7 +81911,7 @@ function plusInfoToDescriptor(info, opts) {
|
|
|
81775
81911
|
preprocessMode: "letterbox",
|
|
81776
81912
|
provider: "frigate",
|
|
81777
81913
|
group: frigateVariantGroup(info.type, info.width),
|
|
81778
|
-
|
|
81914
|
+
postprocessor: decode.postprocessor
|
|
81779
81915
|
}
|
|
81780
81916
|
};
|
|
81781
81917
|
}
|
|
@@ -82790,17 +82926,19 @@ var ModelStudioAddon = class ModelStudioAddon extends BaseAddon {
|
|
|
82790
82926
|
const operatorName = optionalImportName(input.name);
|
|
82791
82927
|
const key = this.config.frigatePlusApiKey ?? "";
|
|
82792
82928
|
const { info, downloadUrl } = await requestPlusModelDownload(plusFetch, key, input.plusModelId);
|
|
82793
|
-
|
|
82794
|
-
|
|
82795
|
-
|
|
82796
|
-
|
|
82797
|
-
|
|
82798
|
-
|
|
82799
|
-
|
|
82800
|
-
|
|
82801
|
-
|
|
82802
|
-
|
|
82803
|
-
|
|
82929
|
+
let decode;
|
|
82930
|
+
try {
|
|
82931
|
+
decode = resolvePlusDecode(info, input.format);
|
|
82932
|
+
} catch (err) {
|
|
82933
|
+
if (err instanceof UnsupportedPlusDecodeError) this.ctx.logger.warn("Frigate+ model import refused — no decoder", { meta: {
|
|
82934
|
+
plusModelId: input.plusModelId,
|
|
82935
|
+
type: err.type,
|
|
82936
|
+
format: err.format,
|
|
82937
|
+
detectors: [...err.detectors]
|
|
82938
|
+
} });
|
|
82939
|
+
throw err;
|
|
82940
|
+
}
|
|
82941
|
+
const filename = `${modelId}${decode.extension}`;
|
|
82804
82942
|
const modelsDir = await this.resolveModelsDir();
|
|
82805
82943
|
const destPath = path.join(modelsDir, filename);
|
|
82806
82944
|
await downloadFile(downloadUrl, destPath);
|
|
@@ -82822,7 +82960,7 @@ var ModelStudioAddon = class ModelStudioAddon extends BaseAddon {
|
|
|
82822
82960
|
...nameOriginOf(operatorName)
|
|
82823
82961
|
});
|
|
82824
82962
|
await this.availability_.update((prev) => upsertAvailability(prev, modelId, "hub", {
|
|
82825
|
-
format:
|
|
82963
|
+
format: decode.format,
|
|
82826
82964
|
sha256,
|
|
82827
82965
|
bytes,
|
|
82828
82966
|
at: Date.now()
|
|
@@ -82832,11 +82970,11 @@ var ModelStudioAddon = class ModelStudioAddon extends BaseAddon {
|
|
|
82832
82970
|
modelId,
|
|
82833
82971
|
type: info.type,
|
|
82834
82972
|
bytes,
|
|
82835
|
-
format:
|
|
82973
|
+
format: decode.format
|
|
82836
82974
|
} });
|
|
82837
82975
|
const wanted = input.ensureFormats ?? [];
|
|
82838
82976
|
let conversions = [];
|
|
82839
|
-
if (
|
|
82977
|
+
if (decode.format === "onnx" && wanted.length > 0) {
|
|
82840
82978
|
conversions = (await ensureEngineFormats(descriptor.entry, this.plusConversionDeps(async () => (await requestPlusModelDownload(plusFetch, key, input.plusModelId)).downloadUrl, descriptor.stepId), { targetFormats: wanted })).conversions;
|
|
82841
82979
|
this.ctx.logger.info("Frigate+ import — engine conversions", { meta: {
|
|
82842
82980
|
modelId,
|