@camstack/addon-agent-ui 1.2.147 → 1.2.148
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 +1178 -734
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -5361,7 +5361,7 @@ var ZodIssueCode = {
|
|
|
5361
5361
|
var ZodFirstPartyTypeKind;
|
|
5362
5362
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5363
5363
|
//#endregion
|
|
5364
|
-
//#region ../types/dist/sleep-
|
|
5364
|
+
//#region ../types/dist/sleep-BaRu0bS5.mjs
|
|
5365
5365
|
/**
|
|
5366
5366
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5367
5367
|
* window to float samples (D455).
|
|
@@ -9434,7 +9434,7 @@ var ModelFormatEntrySchema = object({
|
|
|
9434
9434
|
/** Multi-file payload (directory members or sibling files). */
|
|
9435
9435
|
files: array(string()).readonly().optional(),
|
|
9436
9436
|
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
9437
|
-
runtimes: array(_enum(["
|
|
9437
|
+
runtimes: array(_enum(["python"])).readonly().optional()
|
|
9438
9438
|
});
|
|
9439
9439
|
/**
|
|
9440
9440
|
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
@@ -9515,10 +9515,17 @@ var ModelCatalogEntrySchema = object({
|
|
|
9515
9515
|
inputChannels: number().int().positive().optional(),
|
|
9516
9516
|
labels: array(LabelDefinitionSchema).readonly(),
|
|
9517
9517
|
inputLayout: _enum(["nchw", "nhwc"]).optional(),
|
|
9518
|
+
/**
|
|
9519
|
+
* `'scrfd'` applies InsightFace's SCRFD input contract, `(x - 127.5) / 128`
|
|
9520
|
+
* (upstream `insightface/model_zoo/scrfd.py`), instead of the historical
|
|
9521
|
+
* plain `/255`. Measured against COCO GT: 188 → 196 faces found on the
|
|
9522
|
+
* `scrfd-2.5g` catalog entry (2026-09-26 model-replacement spike, §2.4-2).
|
|
9523
|
+
*/
|
|
9518
9524
|
inputNormalization: _enum([
|
|
9519
9525
|
"zero-one",
|
|
9520
9526
|
"imagenet",
|
|
9521
|
-
"none"
|
|
9527
|
+
"none",
|
|
9528
|
+
"scrfd"
|
|
9522
9529
|
]).optional(),
|
|
9523
9530
|
/**
|
|
9524
9531
|
* The model already applies softmax IN-GRAPH — its raw output is a
|
|
@@ -9620,7 +9627,8 @@ var ModelConvertMetadataSchema = object({
|
|
|
9620
9627
|
inputNormalization: _enum([
|
|
9621
9628
|
"zero-one",
|
|
9622
9629
|
"imagenet",
|
|
9623
|
-
"none"
|
|
9630
|
+
"none",
|
|
9631
|
+
"scrfd"
|
|
9624
9632
|
]).optional(),
|
|
9625
9633
|
preprocessMode: _enum(["letterbox", "resize"]).optional(),
|
|
9626
9634
|
outputFormat: _enum([
|
|
@@ -16998,6 +17006,9 @@ var NcSystemEventKindSchema = _enum([
|
|
|
16998
17006
|
"device-battery-normal",
|
|
16999
17007
|
"device-consumable-low",
|
|
17000
17008
|
"device-consumable-normal",
|
|
17009
|
+
"device-tank-low",
|
|
17010
|
+
"device-tank-full",
|
|
17011
|
+
"device-tank-normal",
|
|
17001
17012
|
"stream-online",
|
|
17002
17013
|
"stream-offline",
|
|
17003
17014
|
"node-online",
|
|
@@ -17035,6 +17046,29 @@ var NC_LEGACY_SYSTEM_EVENT_KINDS = new Set([
|
|
|
17035
17046
|
]);
|
|
17036
17047
|
NcSystemEventKindSchema.options.filter((kind) => !NC_LEGACY_SYSTEM_EVENT_KINDS.has(kind));
|
|
17037
17048
|
/**
|
|
17049
|
+
* The panel's transitions, as ONE list.
|
|
17050
|
+
*
|
|
17051
|
+
* Named here rather than spelled out at each of the four sites that need them
|
|
17052
|
+
* (the emitter, the intake, the editor group, the combined-notification gate),
|
|
17053
|
+
* because a transition added to the enum and forgotten at one of them is an
|
|
17054
|
+
* alarm state nobody can be notified about. That is exactly what this list
|
|
17055
|
+
* failed to prevent while it held three: `alarm-arming` was the fourth.
|
|
17056
|
+
*
|
|
17057
|
+
* In LIFECYCLE order, which is the order an editor lists them in and the order
|
|
17058
|
+
* a person experiences them — not the order they were added.
|
|
17059
|
+
*/
|
|
17060
|
+
var NC_ALARM_SYSTEM_EVENT_KINDS = [
|
|
17061
|
+
"alarm-arm-refused",
|
|
17062
|
+
"alarm-check-failed",
|
|
17063
|
+
"alarm-arming",
|
|
17064
|
+
"alarm-armed",
|
|
17065
|
+
"alarm-pending",
|
|
17066
|
+
"alarm-triggered",
|
|
17067
|
+
"alarm-rearmed",
|
|
17068
|
+
"alarm-sensor-bypass",
|
|
17069
|
+
"alarm-disarmed"
|
|
17070
|
+
];
|
|
17071
|
+
/**
|
|
17038
17072
|
* One coherent system-event condition. `kinds` is the required opt-in safety
|
|
17039
17073
|
* gate; the remaining lists are optional narrowing filters relevant to the
|
|
17040
17074
|
* selected kinds.
|
|
@@ -17068,7 +17102,22 @@ var NcSystemEventConditionSchema = object({
|
|
|
17068
17102
|
*/
|
|
17069
17103
|
excludeDeviceIds: array(number().int()).min(1).optional(),
|
|
17070
17104
|
nodeIds: array(string().min(1)).min(1).optional(),
|
|
17071
|
-
packageNames: array(string().min(1)).min(1).optional()
|
|
17105
|
+
packageNames: array(string().min(1)).min(1).optional(),
|
|
17106
|
+
/**
|
|
17107
|
+
* At or below this remaining-life %, a consumable is LOW for THIS rule
|
|
17108
|
+
* (D642). Absent = {@link NC_CONSUMABLE_LOW_PERCENT_DEFAULT}; at most
|
|
17109
|
+
* {@link NC_CONSUMABLE_LOW_PERCENT_MAX}, so every episode can recover. Scoped to the
|
|
17110
|
+
* consumable kinds (`systemEventFilterApplies`) and to the device-events
|
|
17111
|
+
* family; ignored on every other kind.
|
|
17112
|
+
*
|
|
17113
|
+
* It is a property of the RULE because the operator decided so: a rule at
|
|
17114
|
+
* 25 must be told about a filter at 20 %, a rule at 10 must not. The hub
|
|
17115
|
+
* keeps one episode per (threshold, device, item) — its own hysteresis, its
|
|
17116
|
+
* own reminder — and a rule hears only the episode judged at ITS threshold,
|
|
17117
|
+
* exactly as an occupancy rule hears only the edge of its own count. A
|
|
17118
|
+
* provider's own `replace` verdict is low at every threshold.
|
|
17119
|
+
*/
|
|
17120
|
+
consumableLowPercent: number().int().min(1).max(95).optional()
|
|
17072
17121
|
});
|
|
17073
17122
|
/** Hard ceiling on a window (24h). A snooze that could not expire would be an
|
|
17074
17123
|
* outage the operator asked for once and forgot. */
|
|
@@ -17086,6 +17135,25 @@ var NcScheduleSchema = object({
|
|
|
17086
17135
|
/** Active OUTSIDE the windows (e.g. "only outside business hours"). */
|
|
17087
17136
|
invert: boolean().optional()
|
|
17088
17137
|
});
|
|
17138
|
+
/**
|
|
17139
|
+
* How a system-event rule of the `device-events` or `system` family speaks
|
|
17140
|
+
* (D647): at once, per event (`instant`, the only behaviour before D647), or
|
|
17141
|
+
* as a STATE SUMMARY at the end of each window of `schedule`.
|
|
17142
|
+
*/
|
|
17143
|
+
var NcSystemEventDeliveryModeSchema = _enum(["instant", "summary"]);
|
|
17144
|
+
/**
|
|
17145
|
+
* `summary`: the rule sends NOTHING per event. When a window of `schedule`
|
|
17146
|
+
* CLOSES, it sends one notification with the current state of its kinds
|
|
17147
|
+
* (low batteries, consumables to replace, devices offline, updates
|
|
17148
|
+
* available, ...), after its own filters. Nothing to report sends nothing.
|
|
17149
|
+
* The schedule is the ordinary `NcSchedule` (weekly windows, IANA timezone,
|
|
17150
|
+
* midnight crossing); the send time is each window's END. Refused on the
|
|
17151
|
+
* `alarm` family, which stays instant (`systemEventDeliveryProblems`).
|
|
17152
|
+
*/
|
|
17153
|
+
var NcSystemEventDeliverySchema = discriminatedUnion("mode", [object({ mode: literal("instant") }), object({
|
|
17154
|
+
mode: literal("summary"),
|
|
17155
|
+
schedule: NcScheduleSchema
|
|
17156
|
+
})]);
|
|
17089
17157
|
/** Fuzzy plate matcher — OCR noise makes exact match useless (spec row 12/13). */
|
|
17090
17158
|
var NcPlateMatcherSchema = object({
|
|
17091
17159
|
/**
|
|
@@ -17821,6 +17889,16 @@ var NcRuleInputSchema = object({
|
|
|
17821
17889
|
delivery: NcDeliverySchema,
|
|
17822
17890
|
conditions: NcConditionsSchema.default({}),
|
|
17823
17891
|
schedule: NcScheduleSchema.optional(),
|
|
17892
|
+
/**
|
|
17893
|
+
* A `device-events` / `system` rule's delivery (D647): absent or `instant`
|
|
17894
|
+
* is a notification per event; `summary` is one state summary per closed
|
|
17895
|
+
* window of its schedule. `.optional()` and never defaulted: absent must
|
|
17896
|
+
* keep meaning what every rule authored before D647 meant, with no
|
|
17897
|
+
* migration. Top-level rather than inside `conditions.systemEvent`, so a
|
|
17898
|
+
* client that does not know it (an older viewer re-sending `conditions`
|
|
17899
|
+
* whole) leaves it standing through the store's patch merge.
|
|
17900
|
+
*/
|
|
17901
|
+
systemEventDelivery: NcSystemEventDeliverySchema.optional(),
|
|
17824
17902
|
/** May be empty when `targetUsers` addresses at least one user — the
|
|
17825
17903
|
* "at least one addressee" invariant is enforced by the provider, because
|
|
17826
17904
|
* a cross-field refine here would break `NcRulePatchSchema.partial()`. */
|
|
@@ -18049,6 +18127,28 @@ var NcRuleSchema = NcRuleInputSchema.extend({
|
|
|
18049
18127
|
*/
|
|
18050
18128
|
disabledTargetIds: array(string()).default([])
|
|
18051
18129
|
});
|
|
18130
|
+
/** One section of a previewed state summary. `unavailable` = its state could not be read. */
|
|
18131
|
+
var NcStateSummaryPreviewSectionSchema = object({
|
|
18132
|
+
id: string(),
|
|
18133
|
+
status: _enum(["read", "unavailable"]),
|
|
18134
|
+
items: number().int().nonnegative(),
|
|
18135
|
+
reason: string().optional()
|
|
18136
|
+
});
|
|
18137
|
+
/**
|
|
18138
|
+
* The summary a rule would send now. `empty` = nothing to report and every
|
|
18139
|
+
* section read: such a summary is NOT sent. `dropped` counts the open states
|
|
18140
|
+
* the rule's own filters (or a camera mute) left out, by reason.
|
|
18141
|
+
* `excludedGroups` names the kind groups selected that have no state to report
|
|
18142
|
+
* (backups & exports).
|
|
18143
|
+
*/
|
|
18144
|
+
var NcStateSummaryPreviewSchema = object({
|
|
18145
|
+
empty: boolean(),
|
|
18146
|
+
count: number().int().nonnegative(),
|
|
18147
|
+
text: string(),
|
|
18148
|
+
sections: array(NcStateSummaryPreviewSectionSchema),
|
|
18149
|
+
dropped: record(string(), number().int().nonnegative()),
|
|
18150
|
+
excludedGroups: array(string())
|
|
18151
|
+
});
|
|
18052
18152
|
var NcTestResultSchema = object({
|
|
18053
18153
|
recordId: string(),
|
|
18054
18154
|
recordKind: _enum([
|
|
@@ -18140,6 +18240,13 @@ var NcTemplateVarDescriptorSchema = object({
|
|
|
18140
18240
|
kinds: array(NcTemplateVarKindSchema).optional(),
|
|
18141
18241
|
deliveries: array(NcDeliverySchema).optional(),
|
|
18142
18242
|
systemEventKinds: array(NcSystemEventKindSchema).optional(),
|
|
18243
|
+
/**
|
|
18244
|
+
* Which system-event DELIVERY has a value for it (D647). Absent = an
|
|
18245
|
+
* instant row only when the descriptor names `systemEventKinds` (a
|
|
18246
|
+
* per-event fact: a summary row has no single device), and both otherwise.
|
|
18247
|
+
* `['summary']` marks the state-summary vocabulary (`{{summaryText}}`, ...).
|
|
18248
|
+
*/
|
|
18249
|
+
systemEventDeliveries: array(NcSystemEventDeliveryModeSchema).optional(),
|
|
18143
18250
|
dynamic: object({
|
|
18144
18251
|
prefix: literal("count_"),
|
|
18145
18252
|
from: literal("classes")
|
|
@@ -18152,7 +18259,9 @@ var NcTemplatePreviewInputSchema = object({
|
|
|
18152
18259
|
field: NcTemplateFieldSchema,
|
|
18153
18260
|
kind: NcRuleKindSchema.optional(),
|
|
18154
18261
|
delivery: NcDeliverySchema.optional(),
|
|
18155
|
-
systemEventKinds: array(NcSystemEventKindSchema).optional()
|
|
18262
|
+
systemEventKinds: array(NcSystemEventKindSchema).optional(),
|
|
18263
|
+
/** The rule's system-event delivery (D647); absent = instant. */
|
|
18264
|
+
systemEventDelivery: NcSystemEventDeliveryModeSchema.optional()
|
|
18156
18265
|
}),
|
|
18157
18266
|
template: object({
|
|
18158
18267
|
title: string().max(500).optional(),
|
|
@@ -18686,6 +18795,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
|
|
|
18686
18795
|
}), object({ results: array(NcTestResultSchema) }), {
|
|
18687
18796
|
kind: "mutation",
|
|
18688
18797
|
auth: "admin"
|
|
18798
|
+
}), method(object({ rule: NcRuleInputSchema }), NcStateSummaryPreviewSchema, {
|
|
18799
|
+
kind: "mutation",
|
|
18800
|
+
auth: "admin",
|
|
18801
|
+
access: "view"
|
|
18689
18802
|
}), method(object({}), object({
|
|
18690
18803
|
catalog: array(NcConditionDescriptorSchema),
|
|
18691
18804
|
taxonomy: NcTaxonomySchema.optional()
|
|
@@ -19032,606 +19145,6 @@ var OauthIntegrationDescriptorSchema = object({
|
|
|
19032
19145
|
});
|
|
19033
19146
|
method(_void(), OauthIntegrationDescriptorSchema, { auth: "admin" });
|
|
19034
19147
|
/**
|
|
19035
|
-
* Reference to the frame's retained NATIVE surface + the parent crop's placement
|
|
19036
|
-
* within the frame, so the executor can re-cut a leaf child ROI at native
|
|
19037
|
-
* resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
|
|
19038
|
-
*/
|
|
19039
|
-
var NativeCropRefSchema = object({
|
|
19040
|
-
/** Handle keying the retained native surface (node-pinned to its owner). */
|
|
19041
|
-
handle: FrameHandleSchema,
|
|
19042
|
-
/** The parent crop's padded/clamped rectangle in FRAME-space pixels. */
|
|
19043
|
-
cropFrameSpace: object({
|
|
19044
|
-
x: number(),
|
|
19045
|
-
y: number(),
|
|
19046
|
-
w: number(),
|
|
19047
|
-
h: number()
|
|
19048
|
-
})
|
|
19049
|
-
});
|
|
19050
|
-
object({
|
|
19051
|
-
crop: object({
|
|
19052
|
-
left: number(),
|
|
19053
|
-
top: number(),
|
|
19054
|
-
width: number().positive(),
|
|
19055
|
-
height: number().positive()
|
|
19056
|
-
}).optional(),
|
|
19057
|
-
content: object({
|
|
19058
|
-
width: number().int().positive(),
|
|
19059
|
-
height: number().int().positive()
|
|
19060
|
-
}),
|
|
19061
|
-
fit: _enum(["stretch", "contain"]),
|
|
19062
|
-
format: _enum([
|
|
19063
|
-
"rgb",
|
|
19064
|
-
"gray",
|
|
19065
|
-
"jpeg"
|
|
19066
|
-
])
|
|
19067
|
-
});
|
|
19068
|
-
/**
|
|
19069
|
-
* Process-local frame identity. It is serializable so it can ride an in-process
|
|
19070
|
-
* capability call, but `registryId` deliberately prevents resolution in any
|
|
19071
|
-
* other process or execution group.
|
|
19072
|
-
*/
|
|
19073
|
-
var FrameRefSchema = object({
|
|
19074
|
-
registryId: string().min(1),
|
|
19075
|
-
id: string().min(1),
|
|
19076
|
-
width: number().int().positive(),
|
|
19077
|
-
height: number().int().positive(),
|
|
19078
|
-
format: _enum(["rgb", "gray"]),
|
|
19079
|
-
timestamp: number(),
|
|
19080
|
-
capturedAt: number().optional()
|
|
19081
|
-
});
|
|
19082
|
-
var ModelFormatSchema$1 = _enum([
|
|
19083
|
-
"onnx",
|
|
19084
|
-
"coreml",
|
|
19085
|
-
"openvino",
|
|
19086
|
-
"tflite",
|
|
19087
|
-
"pt",
|
|
19088
|
-
"gguf"
|
|
19089
|
-
]);
|
|
19090
|
-
var PipelineSlotSchema = _enum([
|
|
19091
|
-
"detector",
|
|
19092
|
-
"cropper",
|
|
19093
|
-
"classifier",
|
|
19094
|
-
"refiner",
|
|
19095
|
-
"audio-classifier"
|
|
19096
|
-
]);
|
|
19097
|
-
var PipelineEngineChoiceSchema = object({
|
|
19098
|
-
runtime: _enum(["node", "python"]),
|
|
19099
|
-
backend: string(),
|
|
19100
|
-
format: ModelFormatSchema$1,
|
|
19101
|
-
device: string().optional()
|
|
19102
|
-
});
|
|
19103
|
-
var AvailableEngineSchema = object({
|
|
19104
|
-
engine: PipelineEngineChoiceSchema,
|
|
19105
|
-
devices: array(object({
|
|
19106
|
-
id: string(),
|
|
19107
|
-
label: string(),
|
|
19108
|
-
description: string().optional()
|
|
19109
|
-
})).readonly(),
|
|
19110
|
-
defaultDevice: string()
|
|
19111
|
-
});
|
|
19112
|
-
var PipelineDefaultStepSchema = lazy(() => object({
|
|
19113
|
-
addonId: string(),
|
|
19114
|
-
addonName: string(),
|
|
19115
|
-
slot: PipelineSlotSchema,
|
|
19116
|
-
inputClasses: array(string()).readonly(),
|
|
19117
|
-
outputClasses: array(string()).readonly(),
|
|
19118
|
-
enabled: boolean(),
|
|
19119
|
-
modelId: string(),
|
|
19120
|
-
children: array(PipelineDefaultStepSchema).readonly(),
|
|
19121
|
-
group: string().optional(),
|
|
19122
|
-
settings: record(string(), unknown()).optional()
|
|
19123
|
-
}));
|
|
19124
|
-
var PipelineTemplateStepSchema = lazy(() => object({
|
|
19125
|
-
addonId: string(),
|
|
19126
|
-
enabled: boolean(),
|
|
19127
|
-
modelId: string(),
|
|
19128
|
-
children: array(PipelineTemplateStepSchema).readonly(),
|
|
19129
|
-
settings: record(string(), unknown()).optional()
|
|
19130
|
-
}));
|
|
19131
|
-
var PipelineTemplateSchema$1 = object({
|
|
19132
|
-
id: string(),
|
|
19133
|
-
name: string(),
|
|
19134
|
-
createdAt: string(),
|
|
19135
|
-
updatedAt: string(),
|
|
19136
|
-
engine: PipelineEngineChoiceSchema,
|
|
19137
|
-
steps: array(PipelineTemplateStepSchema).readonly()
|
|
19138
|
-
});
|
|
19139
|
-
var PipelineModelOptionSchema = object({
|
|
19140
|
-
id: string(),
|
|
19141
|
-
name: string(),
|
|
19142
|
-
formats: record(string(), object({
|
|
19143
|
-
downloaded: boolean(),
|
|
19144
|
-
sizeMB: number()
|
|
19145
|
-
})),
|
|
19146
|
-
group: ModelVariantGroupSchema.optional(),
|
|
19147
|
-
legacy: boolean().optional(),
|
|
19148
|
-
provider: ModelProviderIdSchema.optional()
|
|
19149
|
-
});
|
|
19150
|
-
var ConfigFieldBridge = custom();
|
|
19151
|
-
var PipelineAddonSchemaSchema = object({
|
|
19152
|
-
id: string(),
|
|
19153
|
-
name: string(),
|
|
19154
|
-
slot: PipelineSlotSchema,
|
|
19155
|
-
inputClasses: array(string()).readonly(),
|
|
19156
|
-
outputClasses: array(string()).readonly(),
|
|
19157
|
-
childSlots: array(PipelineSlotSchema).readonly(),
|
|
19158
|
-
models: array(PipelineModelOptionSchema).readonly(),
|
|
19159
|
-
defaultModelId: string(),
|
|
19160
|
-
defaultModelIdByFormat: record(string(), string()).optional(),
|
|
19161
|
-
enabledByDefault: boolean().optional(),
|
|
19162
|
-
backfillIntoExistingOverrides: boolean().optional(),
|
|
19163
|
-
defaultConfidence: number(),
|
|
19164
|
-
group: string().optional(),
|
|
19165
|
-
configSchema: array(ConfigFieldBridge).readonly().optional()
|
|
19166
|
-
});
|
|
19167
|
-
var PipelineSlotSchemaSchema = object({
|
|
19168
|
-
id: PipelineSlotSchema,
|
|
19169
|
-
label: string(),
|
|
19170
|
-
priority: number(),
|
|
19171
|
-
parentSlot: PipelineSlotSchema.nullable(),
|
|
19172
|
-
addons: array(PipelineAddonSchemaSchema).readonly()
|
|
19173
|
-
});
|
|
19174
|
-
var PipelineSchemaSchema = object({
|
|
19175
|
-
availableEngines: array(AvailableEngineSchema).readonly(),
|
|
19176
|
-
selectedEngine: PipelineEngineChoiceSchema,
|
|
19177
|
-
slots: array(PipelineSlotSchemaSchema).readonly()
|
|
19178
|
-
});
|
|
19179
|
-
var EngineProvisioningSchema = object({
|
|
19180
|
-
runtimeId: _enum([
|
|
19181
|
-
"onnx",
|
|
19182
|
-
"openvino",
|
|
19183
|
-
"coreml",
|
|
19184
|
-
"edgetpu"
|
|
19185
|
-
]).nullable(),
|
|
19186
|
-
device: string().nullable(),
|
|
19187
|
-
state: _enum([
|
|
19188
|
-
"idle",
|
|
19189
|
-
"installing",
|
|
19190
|
-
"verifying",
|
|
19191
|
-
"ready",
|
|
19192
|
-
"failed"
|
|
19193
|
-
]),
|
|
19194
|
-
progress: number().optional(),
|
|
19195
|
-
error: string().optional(),
|
|
19196
|
-
nextRetryAt: number().optional(),
|
|
19197
|
-
/**
|
|
19198
|
-
* Gate A (config-correctness gate at engine change): human-readable
|
|
19199
|
-
* config issues surfaced EAGERLY when the node's engine changes — model
|
|
19200
|
-
* substitutions ("chose X, running Y") and zero-build steps ("no model
|
|
19201
|
-
* has a <format> build"). Additive/optional: informational only, never
|
|
19202
|
-
* enforced here — `assertEngineReady` (readiness) still gates inference.
|
|
19203
|
-
* Absent/empty when the node-default tree resolves cleanly.
|
|
19204
|
-
*/
|
|
19205
|
-
configIssues: array(string()).optional()
|
|
19206
|
-
});
|
|
19207
|
-
var PipelineStepInputSchema = lazy(() => object({
|
|
19208
|
-
addonId: string(),
|
|
19209
|
-
modelId: string().optional(),
|
|
19210
|
-
enabled: boolean().default(true),
|
|
19211
|
-
children: array(PipelineStepInputSchema).optional(),
|
|
19212
|
-
settings: record(string(), unknown()).optional(),
|
|
19213
|
-
jumpDeviceKey: string().optional()
|
|
19214
|
-
}));
|
|
19215
|
-
var ModelSubstitutionSchema = object({
|
|
19216
|
-
addonId: string(),
|
|
19217
|
-
chosen: string(),
|
|
19218
|
-
running: string(),
|
|
19219
|
-
format: string()
|
|
19220
|
-
});
|
|
19221
|
-
var PipelineValidationIssueSchema = object({
|
|
19222
|
-
addonId: string(),
|
|
19223
|
-
kind: _enum(["unknown-addon", "no-format-build"]),
|
|
19224
|
-
detail: string()
|
|
19225
|
-
});
|
|
19226
|
-
var PipelineValidationResultSchema = object({
|
|
19227
|
-
ok: boolean(),
|
|
19228
|
-
issues: array(PipelineValidationIssueSchema).readonly(),
|
|
19229
|
-
substitutions: array(ModelSubstitutionSchema).readonly(),
|
|
19230
|
-
/** The node's `currentEngine.format` this validation ran against. */
|
|
19231
|
-
format: string()
|
|
19232
|
-
});
|
|
19233
|
-
var ReferenceImageEntrySchema = object({
|
|
19234
|
-
filename: string(),
|
|
19235
|
-
stepIds: array(string()).readonly().optional()
|
|
19236
|
-
});
|
|
19237
|
-
var ReferenceImageBodySchema = object({
|
|
19238
|
-
base64: string(),
|
|
19239
|
-
filename: string()
|
|
19240
|
-
});
|
|
19241
|
-
var ReferenceAudioEntrySchema = object({
|
|
19242
|
-
filename: string(),
|
|
19243
|
-
sizeKb: number()
|
|
19244
|
-
});
|
|
19245
|
-
var ReferenceAudioBodySchema = object({ base64: string() });
|
|
19246
|
-
var AudioBackendSchema = object({
|
|
19247
|
-
id: string(),
|
|
19248
|
-
name: string(),
|
|
19249
|
-
description: string(),
|
|
19250
|
-
available: boolean(),
|
|
19251
|
-
/**
|
|
19252
|
-
* Raw classifier labels this backend can emit (e.g. YAMNet's
|
|
19253
|
-
* 521-class set or Apple SoundAnalysis's 303-class set). Used by
|
|
19254
|
-
* the benchmark UI to populate the `enabledMicroClasses` filter
|
|
19255
|
-
* specific to the selected backend without a separate fetch.
|
|
19256
|
-
*/
|
|
19257
|
-
rawLabels: array(string()).readonly().optional()
|
|
19258
|
-
});
|
|
19259
|
-
var AudioCapabilitiesSchema = object({
|
|
19260
|
-
activeBackend: string(),
|
|
19261
|
-
availableBackends: array(AudioBackendSchema).readonly(),
|
|
19262
|
-
sampleRate: number(),
|
|
19263
|
-
chunkDurationMs: number()
|
|
19264
|
-
});
|
|
19265
|
-
var DownloadModelResultSchema = object({
|
|
19266
|
-
filePath: string(),
|
|
19267
|
-
sizeMB: number(),
|
|
19268
|
-
durationMs: number()
|
|
19269
|
-
});
|
|
19270
|
-
/**
|
|
19271
|
-
* Wrapper carrying a single test run's result. Replaces the legacy
|
|
19272
|
-
* ad-hoc `{labels: [{className, originalClass, score}]}` shape with the
|
|
19273
|
-
* canonical `AudioResult` from the Phase 6 output rework: one
|
|
19274
|
-
* `AudioDetection` per class above `minScore`, top-N candidates in
|
|
19275
|
-
* `debug.alternateLabels['audio-classifier']`, per-source timings in
|
|
19276
|
-
* `debug.stepTimings`. The outer `success`/`error` fields stay so the
|
|
19277
|
-
* benchmark UI can still report a clean failure when the classifier
|
|
19278
|
-
* cap isn't available.
|
|
19279
|
-
*/
|
|
19280
|
-
var AudioTestResultSchema = object({
|
|
19281
|
-
success: boolean(),
|
|
19282
|
-
error: string().optional(),
|
|
19283
|
-
frame: custom().optional()
|
|
19284
|
-
});
|
|
19285
|
-
var PipelineConfigBridge = custom();
|
|
19286
|
-
var ConfigUISchemaBridge = custom();
|
|
19287
|
-
var ConfigUISchemaNullableBridge = custom();
|
|
19288
|
-
var InferenceCapabilitiesBridge = custom();
|
|
19289
|
-
var ModelAvailabilityListBridge = custom();
|
|
19290
|
-
var PipelineRunResultBridge = custom();
|
|
19291
|
-
method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
|
|
19292
|
-
modelId: string(),
|
|
19293
|
-
settings: record(string(), unknown()).readonly()
|
|
19294
|
-
}))), method(object({ steps: record(string(), object({
|
|
19295
|
-
modelId: string(),
|
|
19296
|
-
settings: record(string(), unknown()).readonly()
|
|
19297
|
-
})) }), object({ success: literal(true) }), {
|
|
19298
|
-
kind: "mutation",
|
|
19299
|
-
auth: "admin"
|
|
19300
|
-
}), method(object({ nodeId: string() }), object({
|
|
19301
|
-
success: literal(true),
|
|
19302
|
-
clearedDevices: number()
|
|
19303
|
-
}), {
|
|
19304
|
-
kind: "mutation",
|
|
19305
|
-
auth: "admin"
|
|
19306
|
-
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
19307
|
-
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
19308
|
-
deviceKey: string(),
|
|
19309
|
-
/**
|
|
19310
|
-
* `failed` — the per-device restart budget is exhausted; no pool
|
|
19311
|
-
* will be spawned until an operator re-arms it or the runner
|
|
19312
|
-
* respawns. `backoff` — under budget, waiting out the backoff (or
|
|
19313
|
-
* a cached pool observed dead and not yet condemned).
|
|
19314
|
-
*/
|
|
19315
|
-
state: _enum(["failed", "backoff"]),
|
|
19316
|
-
/** Epoch ms of the death that produced this state. */
|
|
19317
|
-
since: number(),
|
|
19318
|
-
/** Pool deaths inside the current window. */
|
|
19319
|
-
deaths: number(),
|
|
19320
|
-
/** The last death's message. */
|
|
19321
|
-
lastError: string()
|
|
19322
|
-
})).readonly() })), method(object({
|
|
19323
|
-
nodeId: string(),
|
|
19324
|
-
deviceKey: string()
|
|
19325
|
-
}), object({ rearmed: boolean() }), {
|
|
19326
|
-
kind: "mutation",
|
|
19327
|
-
auth: "admin"
|
|
19328
|
-
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({ steps: array(PipelineStepInputSchema) }), PipelineValidationResultSchema), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
|
|
19329
|
-
name: string(),
|
|
19330
|
-
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
19331
|
-
engine: PipelineEngineChoiceSchema
|
|
19332
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
19333
|
-
id: string(),
|
|
19334
|
-
name: string().optional(),
|
|
19335
|
-
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
19336
|
-
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
19337
|
-
addonId: string(),
|
|
19338
|
-
modelId: string(),
|
|
19339
|
-
format: ModelFormatSchema$1
|
|
19340
|
-
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
19341
|
-
addonId: string(),
|
|
19342
|
-
modelId: string(),
|
|
19343
|
-
format: ModelFormatSchema$1
|
|
19344
|
-
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
19345
|
-
engine: PipelineEngineChoiceSchema.optional(),
|
|
19346
|
-
steps: array(PipelineStepInputSchema).min(1),
|
|
19347
|
-
frame: FrameInputSchema.optional(),
|
|
19348
|
-
/**
|
|
19349
|
-
* Process-local lazy frame. Valid only when caller and provider resolve
|
|
19350
|
-
* in the same execution-group process; split/cross-node callers use
|
|
19351
|
-
* `frame`/`image` inline compatibility instead.
|
|
19352
|
-
*/
|
|
19353
|
-
frameRef: FrameRefSchema.optional(),
|
|
19354
|
-
/**
|
|
19355
|
-
* CB5 shm passthrough — a `FrameHandle` naming the same ring slot
|
|
19356
|
-
* the decoded pixels live in. One more member of the one-of
|
|
19357
|
-
* frame/frameHandle/image/imageBase64/referenceImage group.
|
|
19358
|
-
*/
|
|
19359
|
-
frameHandle: FrameHandleSchema.optional(),
|
|
19360
|
-
imageBase64: string().optional(),
|
|
19361
|
-
/**
|
|
19362
|
-
* Binary JPEG bytes — preferred over `imageBase64` on internal
|
|
19363
|
-
* hops (hub → forked worker via Moleculer MsgPack) because it
|
|
19364
|
-
* skips the 33% base64 overhead + the per-call base64 decode on
|
|
19365
|
-
* the detection-pipeline worker. Callers can pass either; exactly
|
|
19366
|
-
* one of `frame`/`image`/`imageBase64`/`referenceImage` is required.
|
|
19367
|
-
*/
|
|
19368
|
-
image: _instanceof(Uint8Array).optional(),
|
|
19369
|
-
referenceImage: string().optional(),
|
|
19370
|
-
deviceId: number().optional(),
|
|
19371
|
-
sessionId: string().optional(),
|
|
19372
|
-
/**
|
|
19373
|
-
* Execution plane. 'full' (default) runs the whole tree — benchmark,
|
|
19374
|
-
* reference-image, and detail-subtree calls. 'frame' is the live
|
|
19375
|
-
* per-frame dispatch: ONLY root-plane steps run; crop children
|
|
19376
|
-
* (inputClasses ≠ null) are skipped and served per-track via
|
|
19377
|
-
* pipelineRunner.runDetailSubtree (two-plane design).
|
|
19378
|
-
*/
|
|
19379
|
-
plane: _enum(["full", "frame"]).optional(),
|
|
19380
|
-
/**
|
|
19381
|
-
* Inference-device selector (Phase 2 multi-device). Format
|
|
19382
|
-
* `<backend>:<device>` (e.g. `openvino:gpu`, `edgetpu:usb`, `cpu`).
|
|
19383
|
-
* Omitted ⇒ the runner's default device (current single-engine
|
|
19384
|
-
* behaviour). Selects WHICH device pool of the node runs the call.
|
|
19385
|
-
*/
|
|
19386
|
-
deviceKey: string().optional(),
|
|
19387
|
-
/**
|
|
19388
|
-
* Two-plane NATIVE child-crop reference. Set by `runDetailSubtree` ONLY
|
|
19389
|
-
* when the parent crop was resolved from the frame's retained NATIVE
|
|
19390
|
-
* surface (a frameHandle HIT). Lets the executor re-cut a LEAF crop
|
|
19391
|
-
* child's ROI (plate-ocr, face-embedding, leaf classifiers) at native
|
|
19392
|
-
* resolution from that surface — the SAME quality path faces already
|
|
19393
|
-
* had — instead of the downscaled parent tile. `handle` keys the native
|
|
19394
|
-
* surface (node-pinned to its owner); `cropFrameSpace` is the parent
|
|
19395
|
-
* crop's padded/clamped rectangle in FRAME-space pixels, used to compose
|
|
19396
|
-
* the executor's crop-normalized child ROI back into frame-normalized
|
|
19397
|
-
* coordinates. Auxiliary to the image source (`image`/`frame`/…), NOT one
|
|
19398
|
-
* of the mutually-exclusive image inputs. Absent ⇒ tile-crop children
|
|
19399
|
-
* (today's behaviour on the fallback path).
|
|
19400
|
-
*/
|
|
19401
|
-
nativeCropRef: NativeCropRefSchema.optional()
|
|
19402
|
-
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
19403
|
-
engine: PipelineEngineChoiceSchema.optional(),
|
|
19404
|
-
steps: array(PipelineStepInputSchema).min(1),
|
|
19405
|
-
frames: array(FrameInputSchema).min(1).max(255),
|
|
19406
|
-
deviceId: number().optional(),
|
|
19407
|
-
sessionId: string().optional(),
|
|
19408
|
-
/**
|
|
19409
|
-
* Pure-inference benchmark hint. A NONZERO uint32 pins every frame in
|
|
19410
|
-
* the batch to the Python pool's bench preprocess cache
|
|
19411
|
-
* (`_bench_frame_id`) so a REPEATED benchmark frame is decoded +
|
|
19412
|
-
* preprocessed ONCE and every later inference is a pure-inference cache
|
|
19413
|
-
* hit — the sustained-throughput run measures inference, not
|
|
19414
|
-
* decode+preprocess+infer. Omitted/0 for live frames (all different →
|
|
19415
|
-
* full preprocess every call, correct). Fresh per sustained run;
|
|
19416
|
-
* released via `uncacheFrame`.
|
|
19417
|
-
*/
|
|
19418
|
-
frameId: number().int().nonnegative().optional(),
|
|
19419
|
-
/** Inference-device selector (Phase 2 multi-device); see runPipeline. */
|
|
19420
|
-
deviceKey: string().optional()
|
|
19421
|
-
}), object({ results: array(PipelineRunResultBridge).readonly() }), { kind: "mutation" }), method(object({
|
|
19422
|
-
data: _instanceof(Uint8Array),
|
|
19423
|
-
width: number().int().positive(),
|
|
19424
|
-
height: number().int().positive(),
|
|
19425
|
-
format: _enum([
|
|
19426
|
-
"rgb",
|
|
19427
|
-
"bgr",
|
|
19428
|
-
"gray"
|
|
19429
|
-
])
|
|
19430
|
-
}), object({
|
|
19431
|
-
frameId: number(),
|
|
19432
|
-
width: number(),
|
|
19433
|
-
height: number()
|
|
19434
|
-
}), { kind: "mutation" }), method(object({
|
|
19435
|
-
stepId: string(),
|
|
19436
|
-
frameId: number().int()
|
|
19437
|
-
}), record(string(), unknown()), { kind: "mutation" }), method(object({ frameId: number().int() }), _void(), { kind: "mutation" }), method(_void(), object({
|
|
19438
|
-
batchMode: string(),
|
|
19439
|
-
windowMs: number(),
|
|
19440
|
-
maxBatchSize: number(),
|
|
19441
|
-
concurrency: number()
|
|
19442
|
-
})), method(_void(), array(object({
|
|
19443
|
-
engineKey: string(),
|
|
19444
|
-
engine: PipelineEngineChoiceSchema,
|
|
19445
|
-
modelsLoaded: array(string()).readonly(),
|
|
19446
|
-
inUseByCameras: array(number()).readonly(),
|
|
19447
|
-
/**
|
|
19448
|
-
* Origin of this resident factory.
|
|
19449
|
-
* - `runtime` — main camera-serving engine (no idle TTL).
|
|
19450
|
-
* - `warm-override` — benchmark/test override held in the warm
|
|
19451
|
-
* cache; auto-disposed after the idle TTL.
|
|
19452
|
-
* - `device-pool` — a concurrent per-device pool (Phase 2
|
|
19453
|
-
* multi-device, keyed by `deviceKey`) resolved
|
|
19454
|
-
* via `resolveDeviceFactory`. Runs alongside the
|
|
19455
|
-
* `runtime` engine on a DIFFERENT accelerator
|
|
19456
|
-
* (NPU / iGPU / Coral) — this is how the
|
|
19457
|
-
* Engines tab shows all pools running at once.
|
|
19458
|
-
*/
|
|
19459
|
-
kind: _enum([
|
|
19460
|
-
"runtime",
|
|
19461
|
-
"warm-override",
|
|
19462
|
-
"device-pool"
|
|
19463
|
-
]),
|
|
19464
|
-
/** Native pid of the underlying Python pool (null when no pool). */
|
|
19465
|
-
poolPid: number().nullable(),
|
|
19466
|
-
/** ms since this factory was last used (null when not warm-tracked). */
|
|
19467
|
-
idleMs: number().nullable(),
|
|
19468
|
-
/** Idle TTL after which `warm-override` factories self-evict (null when not applicable). */
|
|
19469
|
-
idleTtlMs: number().nullable()
|
|
19470
|
-
})).readonly()), method(object({ engine: PipelineEngineChoiceSchema }), object({ success: literal(true) }), {
|
|
19471
|
-
kind: "mutation",
|
|
19472
|
-
auth: "admin"
|
|
19473
|
-
}), method(object({
|
|
19474
|
-
engine: PipelineEngineChoiceSchema,
|
|
19475
|
-
force: boolean().optional()
|
|
19476
|
-
}), object({
|
|
19477
|
-
success: boolean(),
|
|
19478
|
-
reason: string().optional()
|
|
19479
|
-
}), {
|
|
19480
|
-
kind: "mutation",
|
|
19481
|
-
auth: "admin"
|
|
19482
|
-
}), method(_void(), array(ReferenceImageEntrySchema).readonly()), method(object({ filename: string() }), ReferenceImageBodySchema.nullable()), method(_void(), array(ReferenceAudioEntrySchema).readonly()), method(object({ filename: string() }), ReferenceAudioBodySchema.nullable()), method(_void(), AudioCapabilitiesSchema), method(object({
|
|
19483
|
-
addonId: string(),
|
|
19484
|
-
modelId: string(),
|
|
19485
|
-
filename: string().optional(),
|
|
19486
|
-
settings: record(string(), unknown()).optional()
|
|
19487
|
-
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
19488
|
-
/**
|
|
19489
|
-
* Per-stage gating mode applied to the zones a rule references.
|
|
19490
|
-
*
|
|
19491
|
-
* - `include`: the rule contributes to a **whitelist** for its stage.
|
|
19492
|
-
* When at least one `include` rule fires for a stage, only entities
|
|
19493
|
-
* inside one of those zones pass that stage.
|
|
19494
|
-
* - `exclude`: the rule contributes to a **blacklist** for its stage.
|
|
19495
|
-
* Entities inside one of those zones are dropped at that stage.
|
|
19496
|
-
*
|
|
19497
|
-
* `monitor`-style observation (count without filtering) is not a rule
|
|
19498
|
-
* mode — zones without any matching rule are observed naturally by
|
|
19499
|
-
* `zone-analytics` (live snapshot + history), so an "I just want to
|
|
19500
|
-
* count, not filter" use case needs no rule at all.
|
|
19501
|
-
*/
|
|
19502
|
-
var ZoneRuleModeEnum = _enum(["include", "exclude"]);
|
|
19503
|
-
/**
|
|
19504
|
-
* Per-consumer rule that references existing zones (geometry) and
|
|
19505
|
-
* defines how a specific pipeline stage should treat them. Each
|
|
19506
|
-
* consumer addon owns its own `ZoneRule[]` array in its per-device
|
|
19507
|
-
* settings:
|
|
19508
|
-
*
|
|
19509
|
-
* - `addon-motion-wasm` → `motionZoneRules: ZoneRule[]` (motion stage)
|
|
19510
|
-
* - `addon-detection-pipeline` → `detectionZoneRules: ZoneRule[]` (detection stage)
|
|
19511
|
-
* - future: notification rules, audio gating, etc.
|
|
19512
|
-
*
|
|
19513
|
-
* One rule applies to N zones (`zoneIds[]`) so the operator can
|
|
19514
|
-
* express "ignore motion in ALL of {garden, street}" with a single
|
|
19515
|
-
* rule. `classFilter` narrows the rule to specific object classes —
|
|
19516
|
-
* "drop person detections in the street, but keep cars" is one
|
|
19517
|
-
* `exclude` rule with `classFilter: ['person']`.
|
|
19518
|
-
*
|
|
19519
|
-
* `enabled` is a soft toggle — the operator can keep the rule
|
|
19520
|
-
* configured but inert without deleting it.
|
|
19521
|
-
*/
|
|
19522
|
-
var ZoneRuleSchema = object({
|
|
19523
|
-
/** Stable rule id — survives edits, used by the UI for diffing. */
|
|
19524
|
-
id: string(),
|
|
19525
|
-
/** Optional human-readable label rendered in the rule editor. */
|
|
19526
|
-
name: string().optional(),
|
|
19527
|
-
/** Zones this rule targets. The rule's `mode` applies to ALL
|
|
19528
|
-
* listed zones (OR-set: a detection in any one of them counts).
|
|
19529
|
-
* At least one zone id required — a rule with no targets is a
|
|
19530
|
-
* configuration mistake and the form validator rejects it. */
|
|
19531
|
-
zoneIds: array(string()).min(1).readonly(),
|
|
19532
|
-
mode: ZoneRuleModeEnum,
|
|
19533
|
-
/**
|
|
19534
|
-
* Class names this rule applies to. Empty / undefined ⇒ rule
|
|
19535
|
-
* applies to every class. Class strings match the `macroClass`
|
|
19536
|
-
* field on detections (e.g. `person`, `car`, `dog`).
|
|
19537
|
-
*/
|
|
19538
|
-
classFilter: array(string()).readonly().optional(),
|
|
19539
|
-
/**
|
|
19540
|
-
* Minimum bbox/mask overlap (0–1) with any of the rule's zones
|
|
19541
|
-
* required to consider an entity "in the zone". Defaults to the
|
|
19542
|
-
* consumer's stage default when omitted. Kept for back-compat with
|
|
19543
|
-
* existing per-rule overrides; new operators pick the value via
|
|
19544
|
-
* `bboxInclusionPct` (operator-friendly 0–100). Whichever field is
|
|
19545
|
-
* set, the lower-level engine reads it as a 0–1 fraction.
|
|
19546
|
-
*/
|
|
19547
|
-
overlapThreshold: number().min(0).max(1).optional(),
|
|
19548
|
-
/**
|
|
19549
|
-
* Operator-friendly version of `overlapThreshold` — the percentage
|
|
19550
|
-
* of the detection's bbox that must lie inside the zone for the
|
|
19551
|
-
* rule to match. Documented default is 85%; the engine substitutes
|
|
19552
|
-
* that when the field is omitted (kept optional so existing rules
|
|
19553
|
-
* stored without it stay valid).
|
|
19554
|
-
*
|
|
19555
|
-
* When BOTH `overlapThreshold` and `bboxInclusionPct` are set on a
|
|
19556
|
-
* rule, the engine prefers `bboxInclusionPct` because it's the
|
|
19557
|
-
* field exposed in the UI. Internally both feed the same gate.
|
|
19558
|
-
*/
|
|
19559
|
-
bboxInclusionPct: number().min(0).max(100).optional(),
|
|
19560
|
-
/**
|
|
19561
|
-
* When `true` and a detection has a segmentation mask, use the
|
|
19562
|
-
* mask for overlap instead of the bbox. Detection-stage only;
|
|
19563
|
-
* motion rules ignore this field.
|
|
19564
|
-
*/
|
|
19565
|
-
preferMask: boolean().optional(),
|
|
19566
|
-
/**
|
|
19567
|
-
* Soft-toggle: `false` disables the rule without deleting it.
|
|
19568
|
-
* Defaults to `true` so operators creating a rule via the UI
|
|
19569
|
-
* see it active immediately.
|
|
19570
|
-
*/
|
|
19571
|
-
enabled: boolean().default(true)
|
|
19572
|
-
});
|
|
19573
|
-
array(ZoneRuleSchema).readonly();
|
|
19574
|
-
/**
|
|
19575
|
-
* Zone — pure geometry + identity. NO filtering behaviour.
|
|
19576
|
-
*
|
|
19577
|
-
* Zones describe **where** in the frame the operator wants to flag
|
|
19578
|
-
* something; consumer-owned {@link ZoneRule} arrays describe **how**
|
|
19579
|
-
* each pipeline stage uses them. Splitting the two means a single
|
|
19580
|
-
* polygon "Driveway" can simultaneously back a motion-exclude rule,
|
|
19581
|
-
* a detection-include rule on `['car']`, and an occupancy aggregate
|
|
19582
|
-
* — without three duplicated polygons.
|
|
19583
|
-
*
|
|
19584
|
-
* Owned by the orchestrator addon (provider) and mirrored into the
|
|
19585
|
-
* `zones` device-state slice on every mutation. Consumers
|
|
19586
|
-
* (motion-wasm, pipeline-executor, analytics, admin UI) read either
|
|
19587
|
-
* via `api.zones.listZones` (one-shot) or via `dev.state.zones` (live
|
|
19588
|
-
* mirror with `onChanged`).
|
|
19589
|
-
*
|
|
19590
|
-
* Coordinates are normalised fractions of the frame (0–1) so zones
|
|
19591
|
-
* survive resolution changes and stream profile switches.
|
|
19592
|
-
*
|
|
19593
|
-
* `kind` discriminates between full polygons (closed regions used
|
|
19594
|
-
* for intrusion / occupancy filters) and tripwires (open 2-point
|
|
19595
|
-
* line segments used for cross events). Onboard / firmware-reported
|
|
19596
|
-
* zones (Reolink, ONVIF) are out of scope for now — see the deferred
|
|
19597
|
-
* task list.
|
|
19598
|
-
*/
|
|
19599
|
-
var ZoneKindEnum = _enum(["polygon", "tripwire"]);
|
|
19600
|
-
/** Polygon vertex in fraction-of-frame coordinates (0–1). */
|
|
19601
|
-
var PolygonPointSchema = object({
|
|
19602
|
-
x: number(),
|
|
19603
|
-
y: number()
|
|
19604
|
-
});
|
|
19605
|
-
/** A camera detection zone — pure geometry/identity. */
|
|
19606
|
-
var ZoneSchema = object({
|
|
19607
|
-
id: string(),
|
|
19608
|
-
name: string(),
|
|
19609
|
-
kind: ZoneKindEnum.default("polygon"),
|
|
19610
|
-
/** Polygon vertices, fraction of frame (0–1). */
|
|
19611
|
-
polygon: array(PolygonPointSchema).readonly(),
|
|
19612
|
-
/** Visual color for UI rendering. */
|
|
19613
|
-
color: string().default("#3b82f6")
|
|
19614
|
-
});
|
|
19615
|
-
DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).readonly()), method(object({
|
|
19616
|
-
deviceId: number(),
|
|
19617
|
-
zone: ZoneSchema
|
|
19618
|
-
}), _void(), {
|
|
19619
|
-
kind: "mutation",
|
|
19620
|
-
auth: "admin"
|
|
19621
|
-
}), method(object({
|
|
19622
|
-
deviceId: number(),
|
|
19623
|
-
zoneId: string()
|
|
19624
|
-
}), _void(), {
|
|
19625
|
-
kind: "mutation",
|
|
19626
|
-
auth: "admin"
|
|
19627
|
-
}), method(object({
|
|
19628
|
-
deviceId: number(),
|
|
19629
|
-
zone: ZoneSchema
|
|
19630
|
-
}), _void(), {
|
|
19631
|
-
kind: "mutation",
|
|
19632
|
-
auth: "admin"
|
|
19633
|
-
}), object({ zones: array(ZoneSchema).readonly() });
|
|
19634
|
-
/**
|
|
19635
19148
|
* pipeline-analytics — device-scoped wrapper cap. Refines raw
|
|
19636
19149
|
* per-frame detections emitted by the pipeline runner into tracked
|
|
19637
19150
|
* objects, per-kind event collections (motion / object / audio), and
|
|
@@ -20202,6 +19715,22 @@ var TrackSchema = object({
|
|
|
20202
19715
|
* omit it. Render nothing when absent.
|
|
20203
19716
|
*/
|
|
20204
19717
|
previewMissReason: string().optional(),
|
|
19718
|
+
/**
|
|
19719
|
+
* The ROOT model that produced this track — the `FrameResult.rootModelId` of
|
|
19720
|
+
* the frame it was BORN on (D646). What a later replay compares against, so
|
|
19721
|
+
* "the original model" is named rather than assumed. A birth fact: never
|
|
19722
|
+
* rewritten by a later frame. **Absent ≠ unknown-model**: a row from before
|
|
19723
|
+
* the column, and a track the camera's own detector produced, carry none.
|
|
19724
|
+
*/
|
|
19725
|
+
modelId: string().optional(),
|
|
19726
|
+
/**
|
|
19727
|
+
* Size (px) of the detection frame this track's `positions[].bbox` live in —
|
|
19728
|
+
* the frame it was born on, else the camera's latest analysis frame at
|
|
19729
|
+
* persist time. Divide a position by these to normalise it. Absent when the
|
|
19730
|
+
* size was never known.
|
|
19731
|
+
*/
|
|
19732
|
+
frameWidth: number().optional(),
|
|
19733
|
+
frameHeight: number().optional(),
|
|
20205
19734
|
...TrackFlagFields,
|
|
20206
19735
|
...TrackRetrainFields
|
|
20207
19736
|
});
|
|
@@ -21208,24 +20737,6 @@ var MediaReclaimStatusSchema = object({
|
|
|
21208
20737
|
finishedAtMs: number().nullable(),
|
|
21209
20738
|
error: string().nullable()
|
|
21210
20739
|
});
|
|
21211
|
-
var ReplayFrameInputSchema = object({
|
|
21212
|
-
timestamp: number(),
|
|
21213
|
-
frame: PipelineRunResultBridge
|
|
21214
|
-
});
|
|
21215
|
-
var RunReplayFrameProcessorResultSchema = object({ tracks: array(object({
|
|
21216
|
-
className: string(),
|
|
21217
|
-
firstSeenMs: number(),
|
|
21218
|
-
lastSeenMs: number(),
|
|
21219
|
-
/** Bbox of the track's FIRST matched detection, pixel-space in the clip's
|
|
21220
|
-
* frame — a representative box for the diff's `(className, window, IoU)`
|
|
21221
|
-
* pairing (`replay-diff.ts`). A replay does not need the full per-frame
|
|
21222
|
-
* trajectory production's `Track.positions` keeps. */
|
|
21223
|
-
bbox: BoundingBoxSchema,
|
|
21224
|
-
/** How many of the input frames this track matched a real detection on
|
|
21225
|
-
* (never a coasted/extrapolated frame) — the replay's own signal for "how
|
|
21226
|
-
* solid is this track", cheaper than re-deriving it from a trajectory. */
|
|
21227
|
-
framesMatched: number().int()
|
|
21228
|
-
})).readonly() });
|
|
21229
20740
|
/**
|
|
21230
20741
|
* The long-term series a camera produces. A closed union so a typo cannot
|
|
21231
20742
|
* invent one, and the ONE declaration of it — the addon's `AnalyticsLtsSeries`
|
|
@@ -21439,108 +20950,570 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21439
20950
|
}), {
|
|
21440
20951
|
kind: "mutation",
|
|
21441
20952
|
auth: "admin"
|
|
21442
|
-
}), method(object({ frameId: string() }), object({
|
|
21443
|
-
base64: string(),
|
|
21444
|
-
width: number().int(),
|
|
21445
|
-
height: number().int()
|
|
20953
|
+
}), method(object({ frameId: string() }), object({
|
|
20954
|
+
base64: string(),
|
|
20955
|
+
width: number().int(),
|
|
20956
|
+
height: number().int()
|
|
20957
|
+
}), {
|
|
20958
|
+
kind: "query",
|
|
20959
|
+
auth: "admin"
|
|
20960
|
+
}), method(object({
|
|
20961
|
+
deviceId: number(),
|
|
20962
|
+
trackId: string(),
|
|
20963
|
+
frameId: string(),
|
|
20964
|
+
subject: RetrainAssistSubjectSchema,
|
|
20965
|
+
/** Which node runs it. Absent ⇒ wherever an unowned call lands. */
|
|
20966
|
+
nodeId: string().optional()
|
|
20967
|
+
}), RetrainAssistResultSchema, {
|
|
20968
|
+
kind: "mutation",
|
|
20969
|
+
auth: "admin"
|
|
20970
|
+
}), method(object({ trackId: string() }), array(RetrainAnnotationSchema).readonly(), {
|
|
20971
|
+
kind: "query",
|
|
20972
|
+
auth: "admin"
|
|
20973
|
+
}), method(object({
|
|
20974
|
+
deviceId: number(),
|
|
20975
|
+
trackId: string(),
|
|
20976
|
+
frameId: string(),
|
|
20977
|
+
annotations: array(RetrainAnnotationDraftSchema)
|
|
20978
|
+
}), array(RetrainAnnotationSchema).readonly(), {
|
|
20979
|
+
kind: "mutation",
|
|
20980
|
+
auth: "admin"
|
|
20981
|
+
}), method(object({
|
|
20982
|
+
deviceId: number(),
|
|
20983
|
+
trackId: string()
|
|
20984
|
+
}), RetrainTransitionResultSchema, {
|
|
20985
|
+
kind: "mutation",
|
|
20986
|
+
auth: "admin"
|
|
20987
|
+
}), method(object({
|
|
20988
|
+
deviceId: number(),
|
|
20989
|
+
trackId: string()
|
|
20990
|
+
}), RetrainTransitionResultSchema, {
|
|
20991
|
+
kind: "mutation",
|
|
20992
|
+
auth: "admin"
|
|
20993
|
+
}), method(object({ deviceIds: array(number()).optional() }), object({ url: string() }), {
|
|
20994
|
+
kind: "query",
|
|
20995
|
+
auth: "admin"
|
|
20996
|
+
}), method(object({
|
|
20997
|
+
/** Which of the three event tables owns the row. */
|
|
20998
|
+
ownerType: EventOwnerTypeSchema,
|
|
20999
|
+
/** The event's rowid in that table (D474: an event id is a number). */
|
|
21000
|
+
eventId: number().int(),
|
|
21001
|
+
kind: MediaFileKindEnum.optional(),
|
|
21002
|
+
deviceId: number()
|
|
21003
|
+
}), array(MediaFileSchema).readonly()), method(object({
|
|
21004
|
+
trackId: string(),
|
|
21005
|
+
kinds: array(MediaFileKindEnum).optional(),
|
|
21006
|
+
deviceId: number()
|
|
21007
|
+
}), array(MediaFileSchema).readonly()), method(object({
|
|
21008
|
+
trackId: string(),
|
|
21009
|
+
deviceId: number()
|
|
21010
|
+
}), array(MediaFileInfoSchema).readonly()), method(object({
|
|
21011
|
+
ownerType: EventOwnerTypeSchema,
|
|
21012
|
+
eventId: number().int(),
|
|
21013
|
+
deviceId: number()
|
|
21014
|
+
}), array(MediaFileInfoSchema).readonly()), method(object({
|
|
21015
|
+
deviceId: number(),
|
|
21016
|
+
ownerKind: MediaPresenceOwnerKindSchema,
|
|
21017
|
+
ownerIds: array(string()).max(5e3)
|
|
21018
|
+
}), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
21019
|
+
kind: "mutation",
|
|
21020
|
+
auth: "admin"
|
|
21021
|
+
}), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
|
|
21022
|
+
kind: "mutation",
|
|
21023
|
+
auth: "admin"
|
|
21024
|
+
}), method(object({}), RebuildStatusSchema), object({
|
|
21025
|
+
deviceId: number(),
|
|
21026
|
+
timestamp: number(),
|
|
21027
|
+
frameWidth: number(),
|
|
21028
|
+
frameHeight: number(),
|
|
21029
|
+
detections: array(OverlayDetectionSchema).readonly()
|
|
21030
|
+
}), object({
|
|
21031
|
+
deviceId: number(),
|
|
21032
|
+
trackId: string(),
|
|
21033
|
+
className: string()
|
|
21034
|
+
}), object({
|
|
21035
|
+
deviceId: number(),
|
|
21036
|
+
trackId: string(),
|
|
21037
|
+
className: string(),
|
|
21038
|
+
durationMs: number()
|
|
21039
|
+
}), object({
|
|
21040
|
+
deviceId: number(),
|
|
21041
|
+
kind: EventKindSchema,
|
|
21042
|
+
eventId: string(),
|
|
21043
|
+
timestamp: number()
|
|
21044
|
+
});
|
|
21045
|
+
/**
|
|
21046
|
+
* Reference to the frame's retained NATIVE surface + the parent crop's placement
|
|
21047
|
+
* within the frame, so the executor can re-cut a leaf child ROI at native
|
|
21048
|
+
* resolution on the detail plane. See the `runPipeline` `nativeCropRef` field.
|
|
21049
|
+
*/
|
|
21050
|
+
var NativeCropRefSchema = object({
|
|
21051
|
+
/** Handle keying the retained native surface (node-pinned to its owner). */
|
|
21052
|
+
handle: FrameHandleSchema,
|
|
21053
|
+
/** The parent crop's padded/clamped rectangle in FRAME-space pixels. */
|
|
21054
|
+
cropFrameSpace: object({
|
|
21055
|
+
x: number(),
|
|
21056
|
+
y: number(),
|
|
21057
|
+
w: number(),
|
|
21058
|
+
h: number()
|
|
21059
|
+
})
|
|
21060
|
+
});
|
|
21061
|
+
object({
|
|
21062
|
+
crop: object({
|
|
21063
|
+
left: number(),
|
|
21064
|
+
top: number(),
|
|
21065
|
+
width: number().positive(),
|
|
21066
|
+
height: number().positive()
|
|
21067
|
+
}).optional(),
|
|
21068
|
+
content: object({
|
|
21069
|
+
width: number().int().positive(),
|
|
21070
|
+
height: number().int().positive()
|
|
21071
|
+
}),
|
|
21072
|
+
fit: _enum(["stretch", "contain"]),
|
|
21073
|
+
format: _enum([
|
|
21074
|
+
"rgb",
|
|
21075
|
+
"gray",
|
|
21076
|
+
"jpeg"
|
|
21077
|
+
])
|
|
21078
|
+
});
|
|
21079
|
+
/**
|
|
21080
|
+
* Process-local frame identity. It is serializable so it can ride an in-process
|
|
21081
|
+
* capability call, but `registryId` deliberately prevents resolution in any
|
|
21082
|
+
* other process or execution group.
|
|
21083
|
+
*/
|
|
21084
|
+
var FrameRefSchema = object({
|
|
21085
|
+
registryId: string().min(1),
|
|
21086
|
+
id: string().min(1),
|
|
21087
|
+
width: number().int().positive(),
|
|
21088
|
+
height: number().int().positive(),
|
|
21089
|
+
format: _enum(["rgb", "gray"]),
|
|
21090
|
+
timestamp: number(),
|
|
21091
|
+
capturedAt: number().optional()
|
|
21092
|
+
});
|
|
21093
|
+
var ModelFormatSchema$1 = _enum([
|
|
21094
|
+
"onnx",
|
|
21095
|
+
"coreml",
|
|
21096
|
+
"openvino",
|
|
21097
|
+
"tflite",
|
|
21098
|
+
"pt",
|
|
21099
|
+
"gguf"
|
|
21100
|
+
]);
|
|
21101
|
+
var PipelineSlotSchema = _enum([
|
|
21102
|
+
"detector",
|
|
21103
|
+
"cropper",
|
|
21104
|
+
"classifier",
|
|
21105
|
+
"refiner",
|
|
21106
|
+
"audio-classifier"
|
|
21107
|
+
]);
|
|
21108
|
+
var PipelineEngineChoiceSchema = object({
|
|
21109
|
+
runtime: literal("python"),
|
|
21110
|
+
backend: string(),
|
|
21111
|
+
format: ModelFormatSchema$1,
|
|
21112
|
+
device: string().optional()
|
|
21113
|
+
});
|
|
21114
|
+
/**
|
|
21115
|
+
* One pool's resolved provisioning (`getEffectiveTuning`). `numWorkers` is the
|
|
21116
|
+
* knob that lifts a saturated pool (`inference-devices.md`); `concurrency` is
|
|
21117
|
+
* per-worker in-flight requests. `deviceKey` echoes the pool asked about —
|
|
21118
|
+
* `null` for the node-default pool.
|
|
21119
|
+
*/
|
|
21120
|
+
var EffectiveTuningSchema = object({
|
|
21121
|
+
deviceKey: string().nullable(),
|
|
21122
|
+
runtime: string(),
|
|
21123
|
+
batchMode: string(),
|
|
21124
|
+
windowMs: number(),
|
|
21125
|
+
maxBatchSize: number(),
|
|
21126
|
+
concurrency: number(),
|
|
21127
|
+
numWorkers: number()
|
|
21128
|
+
});
|
|
21129
|
+
var AvailableEngineSchema = object({
|
|
21130
|
+
engine: PipelineEngineChoiceSchema,
|
|
21131
|
+
devices: array(object({
|
|
21132
|
+
id: string(),
|
|
21133
|
+
label: string(),
|
|
21134
|
+
description: string().optional()
|
|
21135
|
+
})).readonly(),
|
|
21136
|
+
defaultDevice: string()
|
|
21137
|
+
});
|
|
21138
|
+
var PipelineDefaultStepSchema = lazy(() => object({
|
|
21139
|
+
addonId: string(),
|
|
21140
|
+
addonName: string(),
|
|
21141
|
+
slot: PipelineSlotSchema,
|
|
21142
|
+
inputClasses: array(string()).readonly(),
|
|
21143
|
+
outputClasses: array(string()).readonly(),
|
|
21144
|
+
enabled: boolean(),
|
|
21145
|
+
modelId: string(),
|
|
21146
|
+
children: array(PipelineDefaultStepSchema).readonly(),
|
|
21147
|
+
group: string().optional(),
|
|
21148
|
+
settings: record(string(), unknown()).optional()
|
|
21149
|
+
}));
|
|
21150
|
+
var PipelineTemplateStepSchema = lazy(() => object({
|
|
21151
|
+
addonId: string(),
|
|
21152
|
+
enabled: boolean(),
|
|
21153
|
+
modelId: string(),
|
|
21154
|
+
children: array(PipelineTemplateStepSchema).readonly(),
|
|
21155
|
+
settings: record(string(), unknown()).optional()
|
|
21156
|
+
}));
|
|
21157
|
+
var PipelineTemplateSchema$1 = object({
|
|
21158
|
+
id: string(),
|
|
21159
|
+
name: string(),
|
|
21160
|
+
createdAt: string(),
|
|
21161
|
+
updatedAt: string(),
|
|
21162
|
+
engine: PipelineEngineChoiceSchema,
|
|
21163
|
+
steps: array(PipelineTemplateStepSchema).readonly()
|
|
21164
|
+
});
|
|
21165
|
+
var PipelineModelOptionSchema = object({
|
|
21166
|
+
id: string(),
|
|
21167
|
+
name: string(),
|
|
21168
|
+
formats: record(string(), object({
|
|
21169
|
+
downloaded: boolean(),
|
|
21170
|
+
sizeMB: number()
|
|
21171
|
+
})),
|
|
21172
|
+
group: ModelVariantGroupSchema.optional(),
|
|
21173
|
+
legacy: boolean().optional(),
|
|
21174
|
+
provider: ModelProviderIdSchema.optional()
|
|
21175
|
+
});
|
|
21176
|
+
var ConfigFieldBridge = custom();
|
|
21177
|
+
var PipelineAddonSchemaSchema = object({
|
|
21178
|
+
id: string(),
|
|
21179
|
+
name: string(),
|
|
21180
|
+
slot: PipelineSlotSchema,
|
|
21181
|
+
inputClasses: array(string()).readonly(),
|
|
21182
|
+
outputClasses: array(string()).readonly(),
|
|
21183
|
+
childSlots: array(PipelineSlotSchema).readonly(),
|
|
21184
|
+
models: array(PipelineModelOptionSchema).readonly(),
|
|
21185
|
+
defaultModelId: string(),
|
|
21186
|
+
defaultModelIdByFormat: record(string(), string()).optional(),
|
|
21187
|
+
enabledByDefault: boolean().optional(),
|
|
21188
|
+
backfillIntoExistingOverrides: boolean().optional(),
|
|
21189
|
+
defaultConfidence: number(),
|
|
21190
|
+
group: string().optional(),
|
|
21191
|
+
configSchema: array(ConfigFieldBridge).readonly().optional()
|
|
21192
|
+
});
|
|
21193
|
+
var PipelineSlotSchemaSchema = object({
|
|
21194
|
+
id: PipelineSlotSchema,
|
|
21195
|
+
label: string(),
|
|
21196
|
+
priority: number(),
|
|
21197
|
+
parentSlot: PipelineSlotSchema.nullable(),
|
|
21198
|
+
addons: array(PipelineAddonSchemaSchema).readonly()
|
|
21199
|
+
});
|
|
21200
|
+
var PipelineSchemaSchema = object({
|
|
21201
|
+
availableEngines: array(AvailableEngineSchema).readonly(),
|
|
21202
|
+
selectedEngine: PipelineEngineChoiceSchema,
|
|
21203
|
+
slots: array(PipelineSlotSchemaSchema).readonly()
|
|
21204
|
+
});
|
|
21205
|
+
var EngineProvisioningSchema = object({
|
|
21206
|
+
runtimeId: _enum([
|
|
21207
|
+
"onnx",
|
|
21208
|
+
"openvino",
|
|
21209
|
+
"coreml",
|
|
21210
|
+
"edgetpu"
|
|
21211
|
+
]).nullable(),
|
|
21212
|
+
device: string().nullable(),
|
|
21213
|
+
state: _enum([
|
|
21214
|
+
"idle",
|
|
21215
|
+
"installing",
|
|
21216
|
+
"verifying",
|
|
21217
|
+
"ready",
|
|
21218
|
+
"failed"
|
|
21219
|
+
]),
|
|
21220
|
+
progress: number().optional(),
|
|
21221
|
+
error: string().optional(),
|
|
21222
|
+
nextRetryAt: number().optional(),
|
|
21223
|
+
/**
|
|
21224
|
+
* Gate A (config-correctness gate at engine change): human-readable
|
|
21225
|
+
* config issues surfaced EAGERLY when the node's engine changes — model
|
|
21226
|
+
* substitutions ("chose X, running Y") and zero-build steps ("no model
|
|
21227
|
+
* has a <format> build"). Additive/optional: informational only, never
|
|
21228
|
+
* enforced here — `assertEngineReady` (readiness) still gates inference.
|
|
21229
|
+
* Absent/empty when the node-default tree resolves cleanly.
|
|
21230
|
+
*/
|
|
21231
|
+
configIssues: array(string()).optional()
|
|
21232
|
+
});
|
|
21233
|
+
var PipelineStepInputSchema = lazy(() => object({
|
|
21234
|
+
addonId: string(),
|
|
21235
|
+
modelId: string().optional(),
|
|
21236
|
+
enabled: boolean().default(true),
|
|
21237
|
+
children: array(PipelineStepInputSchema).optional(),
|
|
21238
|
+
settings: record(string(), unknown()).optional(),
|
|
21239
|
+
jumpDeviceKey: string().optional()
|
|
21240
|
+
}));
|
|
21241
|
+
var ModelSubstitutionSchema = object({
|
|
21242
|
+
addonId: string(),
|
|
21243
|
+
chosen: string(),
|
|
21244
|
+
running: string(),
|
|
21245
|
+
format: string()
|
|
21246
|
+
});
|
|
21247
|
+
var PipelineValidationIssueSchema = object({
|
|
21248
|
+
addonId: string(),
|
|
21249
|
+
kind: _enum([
|
|
21250
|
+
"unknown-addon",
|
|
21251
|
+
"no-format-build",
|
|
21252
|
+
"unknown-device"
|
|
21253
|
+
]),
|
|
21254
|
+
detail: string()
|
|
21255
|
+
});
|
|
21256
|
+
var PipelineValidationResultSchema = object({
|
|
21257
|
+
ok: boolean(),
|
|
21258
|
+
issues: array(PipelineValidationIssueSchema).readonly(),
|
|
21259
|
+
substitutions: array(ModelSubstitutionSchema).readonly(),
|
|
21260
|
+
/** The node's `currentEngine.format` this validation ran against. */
|
|
21261
|
+
format: string()
|
|
21262
|
+
});
|
|
21263
|
+
var ReferenceImageEntrySchema = object({
|
|
21264
|
+
filename: string(),
|
|
21265
|
+
stepIds: array(string()).readonly().optional()
|
|
21266
|
+
});
|
|
21267
|
+
var ReferenceImageBodySchema = object({
|
|
21268
|
+
base64: string(),
|
|
21269
|
+
filename: string()
|
|
21270
|
+
});
|
|
21271
|
+
var ReferenceAudioEntrySchema = object({
|
|
21272
|
+
filename: string(),
|
|
21273
|
+
sizeKb: number()
|
|
21274
|
+
});
|
|
21275
|
+
var ReferenceAudioBodySchema = object({ base64: string() });
|
|
21276
|
+
var AudioBackendSchema = object({
|
|
21277
|
+
id: string(),
|
|
21278
|
+
name: string(),
|
|
21279
|
+
description: string(),
|
|
21280
|
+
available: boolean(),
|
|
21281
|
+
/**
|
|
21282
|
+
* Raw classifier labels this backend can emit (e.g. YAMNet's
|
|
21283
|
+
* 521-class set or Apple SoundAnalysis's 303-class set). Used by
|
|
21284
|
+
* the benchmark UI to populate the `enabledMicroClasses` filter
|
|
21285
|
+
* specific to the selected backend without a separate fetch.
|
|
21286
|
+
*/
|
|
21287
|
+
rawLabels: array(string()).readonly().optional()
|
|
21288
|
+
});
|
|
21289
|
+
var AudioCapabilitiesSchema = object({
|
|
21290
|
+
activeBackend: string(),
|
|
21291
|
+
availableBackends: array(AudioBackendSchema).readonly(),
|
|
21292
|
+
sampleRate: number(),
|
|
21293
|
+
chunkDurationMs: number()
|
|
21294
|
+
});
|
|
21295
|
+
var DownloadModelResultSchema = object({
|
|
21296
|
+
filePath: string(),
|
|
21297
|
+
sizeMB: number(),
|
|
21298
|
+
durationMs: number()
|
|
21299
|
+
});
|
|
21300
|
+
/**
|
|
21301
|
+
* Wrapper carrying a single test run's result. Replaces the legacy
|
|
21302
|
+
* ad-hoc `{labels: [{className, originalClass, score}]}` shape with the
|
|
21303
|
+
* canonical `AudioResult` from the Phase 6 output rework: one
|
|
21304
|
+
* `AudioDetection` per class above `minScore`, top-N candidates in
|
|
21305
|
+
* `debug.alternateLabels['audio-classifier']`, per-source timings in
|
|
21306
|
+
* `debug.stepTimings`. The outer `success`/`error` fields stay so the
|
|
21307
|
+
* benchmark UI can still report a clean failure when the classifier
|
|
21308
|
+
* cap isn't available.
|
|
21309
|
+
*/
|
|
21310
|
+
var AudioTestResultSchema = object({
|
|
21311
|
+
success: boolean(),
|
|
21312
|
+
error: string().optional(),
|
|
21313
|
+
frame: custom().optional()
|
|
21314
|
+
});
|
|
21315
|
+
var PipelineConfigBridge = custom();
|
|
21316
|
+
var ConfigUISchemaBridge = custom();
|
|
21317
|
+
var ConfigUISchemaNullableBridge = custom();
|
|
21318
|
+
var InferenceCapabilitiesBridge = custom();
|
|
21319
|
+
var ModelAvailabilityListBridge = custom();
|
|
21320
|
+
var PipelineRunResultBridge = custom();
|
|
21321
|
+
method(_void(), array(PipelineEngineChoiceSchema)), method(_void(), PipelineEngineChoiceSchema), method(PipelineEngineChoiceSchema, array(PipelineDefaultStepSchema)), method(object({ nodeId: string() }), EngineProvisioningSchema), method(_void(), record(string(), object({
|
|
21322
|
+
modelId: string(),
|
|
21323
|
+
settings: record(string(), unknown()).readonly()
|
|
21324
|
+
}))), method(object({ steps: record(string(), object({
|
|
21325
|
+
modelId: string(),
|
|
21326
|
+
settings: record(string(), unknown()).readonly()
|
|
21327
|
+
})) }), object({ success: literal(true) }), {
|
|
21328
|
+
kind: "mutation",
|
|
21329
|
+
auth: "admin"
|
|
21330
|
+
}), method(object({ nodeId: string() }), object({
|
|
21331
|
+
success: literal(true),
|
|
21332
|
+
clearedDevices: number()
|
|
21446
21333
|
}), {
|
|
21447
|
-
kind: "query",
|
|
21448
|
-
auth: "admin"
|
|
21449
|
-
}), method(object({
|
|
21450
|
-
deviceId: number(),
|
|
21451
|
-
trackId: string(),
|
|
21452
|
-
frameId: string(),
|
|
21453
|
-
subject: RetrainAssistSubjectSchema,
|
|
21454
|
-
/** Which node runs it. Absent ⇒ wherever an unowned call lands. */
|
|
21455
|
-
nodeId: string().optional()
|
|
21456
|
-
}), RetrainAssistResultSchema, {
|
|
21457
|
-
kind: "mutation",
|
|
21458
|
-
auth: "admin"
|
|
21459
|
-
}), method(object({
|
|
21460
|
-
deviceId: number(),
|
|
21461
|
-
source: DetectionSourceSchema,
|
|
21462
|
-
zones: array(ZoneSchema).readonly().optional(),
|
|
21463
|
-
detectionRules: array(ZoneRuleSchema).readonly().optional(),
|
|
21464
|
-
zoneMembershipMinOverlap: number().min(0).max(1).optional(),
|
|
21465
|
-
frames: array(ReplayFrameInputSchema).min(1)
|
|
21466
|
-
}), RunReplayFrameProcessorResultSchema, {
|
|
21467
|
-
kind: "mutation",
|
|
21468
|
-
auth: "admin"
|
|
21469
|
-
}), method(object({ trackId: string() }), array(RetrainAnnotationSchema).readonly(), {
|
|
21470
|
-
kind: "query",
|
|
21471
|
-
auth: "admin"
|
|
21472
|
-
}), method(object({
|
|
21473
|
-
deviceId: number(),
|
|
21474
|
-
trackId: string(),
|
|
21475
|
-
frameId: string(),
|
|
21476
|
-
annotations: array(RetrainAnnotationDraftSchema)
|
|
21477
|
-
}), array(RetrainAnnotationSchema).readonly(), {
|
|
21478
21334
|
kind: "mutation",
|
|
21479
21335
|
auth: "admin"
|
|
21480
|
-
}), method(object({
|
|
21481
|
-
|
|
21482
|
-
|
|
21483
|
-
|
|
21336
|
+
}), method(object({ nodeId: string() }), object({ unhealthy: array(object({
|
|
21337
|
+
/** `<backend>:<device>`, e.g. `openvino:gpu`. */
|
|
21338
|
+
deviceKey: string(),
|
|
21339
|
+
/**
|
|
21340
|
+
* `failed` — the per-device restart budget is exhausted; no pool
|
|
21341
|
+
* will be spawned until an operator re-arms it or the runner
|
|
21342
|
+
* respawns. `backoff` — under budget, waiting out the backoff (or
|
|
21343
|
+
* a cached pool observed dead and not yet condemned).
|
|
21344
|
+
*/
|
|
21345
|
+
state: _enum(["failed", "backoff"]),
|
|
21346
|
+
/** Epoch ms of the death that produced this state. */
|
|
21347
|
+
since: number(),
|
|
21348
|
+
/** Pool deaths inside the current window. */
|
|
21349
|
+
deaths: number(),
|
|
21350
|
+
/** The last death's message. */
|
|
21351
|
+
lastError: string()
|
|
21352
|
+
})).readonly() })), method(object({
|
|
21353
|
+
nodeId: string(),
|
|
21354
|
+
deviceKey: string()
|
|
21355
|
+
}), object({ rearmed: boolean() }), {
|
|
21484
21356
|
kind: "mutation",
|
|
21485
21357
|
auth: "admin"
|
|
21486
|
-
}), method(object({
|
|
21487
|
-
|
|
21488
|
-
|
|
21489
|
-
}),
|
|
21358
|
+
}), method(_void(), PipelineSchemaSchema), method(_void(), array(PipelineDefaultStepSchema).readonly().nullable()), method(_void(), PipelineConfigBridge), method(_void(), ConfigUISchemaBridge), method(object({
|
|
21359
|
+
steps: array(PipelineStepInputSchema),
|
|
21360
|
+
deviceKey: string().optional()
|
|
21361
|
+
}), PipelineValidationResultSchema), method(_void(), array(PipelineTemplateSchema$1).readonly()), method(object({
|
|
21362
|
+
name: string(),
|
|
21363
|
+
steps: array(PipelineTemplateStepSchema).readonly(),
|
|
21364
|
+
engine: PipelineEngineChoiceSchema
|
|
21365
|
+
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({
|
|
21366
|
+
id: string(),
|
|
21367
|
+
name: string().optional(),
|
|
21368
|
+
steps: array(PipelineTemplateStepSchema).readonly().optional()
|
|
21369
|
+
}), PipelineTemplateSchema$1, { kind: "mutation" }), method(object({ id: string() }), _void(), { kind: "mutation" }), method(_void(), InferenceCapabilitiesBridge), method(object({ addonId: string() }), ModelAvailabilityListBridge), method(object({
|
|
21370
|
+
addonId: string(),
|
|
21371
|
+
modelId: string(),
|
|
21372
|
+
format: ModelFormatSchema$1
|
|
21373
|
+
}), DownloadModelResultSchema, { kind: "mutation" }), method(object({
|
|
21374
|
+
addonId: string(),
|
|
21375
|
+
modelId: string(),
|
|
21376
|
+
format: ModelFormatSchema$1
|
|
21377
|
+
}), object({ success: literal(true) }), { kind: "mutation" }), method(object({
|
|
21378
|
+
steps: array(PipelineStepInputSchema).min(1),
|
|
21379
|
+
frame: FrameInputSchema.optional(),
|
|
21380
|
+
/**
|
|
21381
|
+
* Process-local lazy frame. Valid only when caller and provider resolve
|
|
21382
|
+
* in the same execution-group process; split/cross-node callers use
|
|
21383
|
+
* `frame`/`image` inline compatibility instead.
|
|
21384
|
+
*/
|
|
21385
|
+
frameRef: FrameRefSchema.optional(),
|
|
21386
|
+
/**
|
|
21387
|
+
* CB5 shm passthrough — a `FrameHandle` naming the same ring slot
|
|
21388
|
+
* the decoded pixels live in. One more member of the one-of
|
|
21389
|
+
* frame/frameHandle/image/imageBase64/referenceImage group.
|
|
21390
|
+
*/
|
|
21391
|
+
frameHandle: FrameHandleSchema.optional(),
|
|
21392
|
+
imageBase64: string().optional(),
|
|
21393
|
+
/**
|
|
21394
|
+
* Binary JPEG bytes — preferred over `imageBase64` on internal
|
|
21395
|
+
* hops (hub → forked worker via Moleculer MsgPack) because it
|
|
21396
|
+
* skips the 33% base64 overhead + the per-call base64 decode on
|
|
21397
|
+
* the detection-pipeline worker. Callers can pass either; exactly
|
|
21398
|
+
* one of `frame`/`image`/`imageBase64`/`referenceImage` is required.
|
|
21399
|
+
*/
|
|
21400
|
+
image: _instanceof(Uint8Array).optional(),
|
|
21401
|
+
referenceImage: string().optional(),
|
|
21402
|
+
deviceId: number().optional(),
|
|
21403
|
+
sessionId: string().optional(),
|
|
21404
|
+
/**
|
|
21405
|
+
* Execution plane. 'full' (default) runs the whole tree — benchmark,
|
|
21406
|
+
* reference-image, and detail-subtree calls. 'frame' is the live
|
|
21407
|
+
* per-frame dispatch: ONLY root-plane steps run; crop children
|
|
21408
|
+
* (inputClasses ≠ null) are skipped and served per-track via
|
|
21409
|
+
* pipelineRunner.runDetailSubtree (two-plane design).
|
|
21410
|
+
*/
|
|
21411
|
+
plane: _enum(["full", "frame"]).optional(),
|
|
21412
|
+
/**
|
|
21413
|
+
* Inference-device selector (Phase 2 multi-device). Format
|
|
21414
|
+
* `<backend>:<device>` (e.g. `openvino:gpu`, `edgetpu:usb`, `cpu`).
|
|
21415
|
+
* Omitted ⇒ the runner's default device (current single-engine
|
|
21416
|
+
* behaviour). Selects WHICH device pool of the node runs the call.
|
|
21417
|
+
*/
|
|
21418
|
+
deviceKey: string().optional(),
|
|
21419
|
+
/**
|
|
21420
|
+
* Two-plane NATIVE child-crop reference. Set by `runDetailSubtree` ONLY
|
|
21421
|
+
* when the parent crop was resolved from the frame's retained NATIVE
|
|
21422
|
+
* surface (a frameHandle HIT). Lets the executor re-cut a LEAF crop
|
|
21423
|
+
* child's ROI (plate-ocr, face-embedding, leaf classifiers) at native
|
|
21424
|
+
* resolution from that surface — the SAME quality path faces already
|
|
21425
|
+
* had — instead of the downscaled parent tile. `handle` keys the native
|
|
21426
|
+
* surface (node-pinned to its owner); `cropFrameSpace` is the parent
|
|
21427
|
+
* crop's padded/clamped rectangle in FRAME-space pixels, used to compose
|
|
21428
|
+
* the executor's crop-normalized child ROI back into frame-normalized
|
|
21429
|
+
* coordinates. Auxiliary to the image source (`image`/`frame`/…), NOT one
|
|
21430
|
+
* of the mutually-exclusive image inputs. Absent ⇒ tile-crop children
|
|
21431
|
+
* (today's behaviour on the fallback path).
|
|
21432
|
+
*/
|
|
21433
|
+
nativeCropRef: NativeCropRefSchema.optional(),
|
|
21434
|
+
/**
|
|
21435
|
+
* Offline REPLAY of stored media for `deviceId` (D56, D646): the
|
|
21436
|
+
* camera's zone gate and overrides apply as live, every executing
|
|
21437
|
+
* step runs EXACTLY the model it names on the `deviceKey` pool it
|
|
21438
|
+
* names or the call refuses (`model-not-servable` /
|
|
21439
|
+
* `device-not-servable`), and nothing reaches the camera's live
|
|
21440
|
+
* trace stream. Absent ⇒ unchanged behaviour.
|
|
21441
|
+
*/
|
|
21442
|
+
replay: literal(true).optional()
|
|
21443
|
+
}), PipelineRunResultBridge, { kind: "mutation" }), method(object({
|
|
21444
|
+
steps: array(PipelineStepInputSchema).min(1),
|
|
21445
|
+
frames: array(FrameInputSchema).min(1).max(255),
|
|
21446
|
+
deviceId: number().optional(),
|
|
21447
|
+
sessionId: string().optional(),
|
|
21448
|
+
/**
|
|
21449
|
+
* Pure-inference benchmark hint. A NONZERO uint32 pins every frame in
|
|
21450
|
+
* the batch to the Python pool's bench preprocess cache
|
|
21451
|
+
* (`_bench_frame_id`) so a REPEATED benchmark frame is decoded +
|
|
21452
|
+
* preprocessed ONCE and every later inference is a pure-inference cache
|
|
21453
|
+
* hit — the sustained-throughput run measures inference, not
|
|
21454
|
+
* decode+preprocess+infer. Omitted/0 for live frames (all different →
|
|
21455
|
+
* full preprocess every call, correct). Fresh per sustained run;
|
|
21456
|
+
* released via `uncacheFrame`.
|
|
21457
|
+
*/
|
|
21458
|
+
frameId: number().int().nonnegative().optional(),
|
|
21459
|
+
/** Inference-device selector (Phase 2 multi-device); see runPipeline. */
|
|
21460
|
+
deviceKey: string().optional()
|
|
21461
|
+
}), object({ results: array(PipelineRunResultBridge).readonly() }), { kind: "mutation" }), method(object({
|
|
21462
|
+
data: _instanceof(Uint8Array),
|
|
21463
|
+
width: number().int().positive(),
|
|
21464
|
+
height: number().int().positive(),
|
|
21465
|
+
format: _enum([
|
|
21466
|
+
"rgb",
|
|
21467
|
+
"bgr",
|
|
21468
|
+
"gray"
|
|
21469
|
+
])
|
|
21470
|
+
}), object({
|
|
21471
|
+
frameId: number(),
|
|
21472
|
+
width: number(),
|
|
21473
|
+
height: number()
|
|
21474
|
+
}), { kind: "mutation" }), method(object({
|
|
21475
|
+
stepId: string(),
|
|
21476
|
+
frameId: number().int()
|
|
21477
|
+
}), record(string(), unknown()), { kind: "mutation" }), method(object({ frameId: number().int() }), _void(), { kind: "mutation" }), method(object({ deviceKey: string().optional() }), EffectiveTuningSchema), method(_void(), array(object({
|
|
21478
|
+
engineKey: string(),
|
|
21479
|
+
engine: PipelineEngineChoiceSchema,
|
|
21480
|
+
modelsLoaded: array(string()).readonly(),
|
|
21481
|
+
inUseByCameras: array(number()).readonly(),
|
|
21482
|
+
/**
|
|
21483
|
+
* Origin of this resident factory.
|
|
21484
|
+
* - `runtime` — main camera-serving engine (no idle TTL).
|
|
21485
|
+
* - `device-pool` — a concurrent per-device pool (Phase 2
|
|
21486
|
+
* multi-device, keyed by `deviceKey`) resolved
|
|
21487
|
+
* via `resolveDeviceFactory`. Runs alongside the
|
|
21488
|
+
* `runtime` engine on a DIFFERENT accelerator
|
|
21489
|
+
* (NPU / iGPU / Coral) — this is how the
|
|
21490
|
+
* Engines tab shows all pools running at once.
|
|
21491
|
+
*/
|
|
21492
|
+
kind: _enum(["runtime", "device-pool"]),
|
|
21493
|
+
/** Native pid of the underlying Python pool (null when no pool). */
|
|
21494
|
+
poolPid: number().nullable(),
|
|
21495
|
+
/** ms since this factory was last used (null when not warm-tracked). */
|
|
21496
|
+
idleMs: number().nullable(),
|
|
21497
|
+
/** Idle TTL after which the factory self-evicts (null when not applicable). */
|
|
21498
|
+
idleTtlMs: number().nullable()
|
|
21499
|
+
})).readonly()), method(object({ engine: PipelineEngineChoiceSchema }), object({ success: literal(true) }), {
|
|
21490
21500
|
kind: "mutation",
|
|
21491
21501
|
auth: "admin"
|
|
21492
|
-
}), method(object({ deviceIds: array(number()).optional() }), object({ url: string() }), {
|
|
21493
|
-
kind: "query",
|
|
21494
|
-
auth: "admin"
|
|
21495
21502
|
}), method(object({
|
|
21496
|
-
|
|
21497
|
-
|
|
21498
|
-
|
|
21499
|
-
|
|
21500
|
-
|
|
21501
|
-
|
|
21502
|
-
}), array(MediaFileSchema).readonly()), method(object({
|
|
21503
|
-
trackId: string(),
|
|
21504
|
-
kinds: array(MediaFileKindEnum).optional(),
|
|
21505
|
-
deviceId: number()
|
|
21506
|
-
}), array(MediaFileSchema).readonly()), method(object({
|
|
21507
|
-
trackId: string(),
|
|
21508
|
-
deviceId: number()
|
|
21509
|
-
}), array(MediaFileInfoSchema).readonly()), method(object({
|
|
21510
|
-
ownerType: EventOwnerTypeSchema,
|
|
21511
|
-
eventId: number().int(),
|
|
21512
|
-
deviceId: number()
|
|
21513
|
-
}), array(MediaFileInfoSchema).readonly()), method(object({
|
|
21514
|
-
deviceId: number(),
|
|
21515
|
-
ownerKind: MediaPresenceOwnerKindSchema,
|
|
21516
|
-
ownerIds: array(string()).max(5e3)
|
|
21517
|
-
}), array(string()).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
21518
|
-
kind: "mutation",
|
|
21519
|
-
auth: "admin"
|
|
21520
|
-
}), method(RebuildObjectEmbeddingsInput, RebuildObjectEmbeddingsResultSchema, {
|
|
21503
|
+
engine: PipelineEngineChoiceSchema,
|
|
21504
|
+
force: boolean().optional()
|
|
21505
|
+
}), object({
|
|
21506
|
+
success: boolean(),
|
|
21507
|
+
reason: string().optional()
|
|
21508
|
+
}), {
|
|
21521
21509
|
kind: "mutation",
|
|
21522
21510
|
auth: "admin"
|
|
21523
|
-
}), method(object({}),
|
|
21524
|
-
|
|
21525
|
-
|
|
21526
|
-
|
|
21527
|
-
|
|
21528
|
-
|
|
21529
|
-
}), object({
|
|
21530
|
-
deviceId: number(),
|
|
21531
|
-
trackId: string(),
|
|
21532
|
-
className: string()
|
|
21533
|
-
}), object({
|
|
21534
|
-
deviceId: number(),
|
|
21535
|
-
trackId: string(),
|
|
21536
|
-
className: string(),
|
|
21537
|
-
durationMs: number()
|
|
21538
|
-
}), object({
|
|
21539
|
-
deviceId: number(),
|
|
21540
|
-
kind: EventKindSchema,
|
|
21541
|
-
eventId: string(),
|
|
21542
|
-
timestamp: number()
|
|
21543
|
-
});
|
|
21511
|
+
}), method(_void(), array(ReferenceImageEntrySchema).readonly()), method(object({ filename: string() }), ReferenceImageBodySchema.nullable()), method(_void(), array(ReferenceAudioEntrySchema).readonly()), method(object({ filename: string() }), ReferenceAudioBodySchema.nullable()), method(_void(), AudioCapabilitiesSchema), method(object({
|
|
21512
|
+
addonId: string(),
|
|
21513
|
+
modelId: string(),
|
|
21514
|
+
filename: string().optional(),
|
|
21515
|
+
settings: record(string(), unknown()).optional()
|
|
21516
|
+
}), AudioTestResultSchema, { kind: "mutation" }), method(_void(), ConfigUISchemaNullableBridge);
|
|
21544
21517
|
object({
|
|
21545
21518
|
activeCameras: number(),
|
|
21546
21519
|
throttledCameras: number(),
|
|
@@ -21566,6 +21539,66 @@ var CameraMetricsSchema = object({
|
|
|
21566
21539
|
});
|
|
21567
21540
|
var CameraMetricsWithDeviceIdSchema = CameraMetricsSchema.extend({ deviceId: number() });
|
|
21568
21541
|
/**
|
|
21542
|
+
* Zone — pure geometry + identity. NO filtering behaviour.
|
|
21543
|
+
*
|
|
21544
|
+
* Zones describe **where** in the frame the operator wants to flag
|
|
21545
|
+
* something; consumer-owned {@link ZoneRule} arrays describe **how**
|
|
21546
|
+
* each pipeline stage uses them. Splitting the two means a single
|
|
21547
|
+
* polygon "Driveway" can simultaneously back a motion-exclude rule,
|
|
21548
|
+
* a detection-include rule on `['car']`, and an occupancy aggregate
|
|
21549
|
+
* — without three duplicated polygons.
|
|
21550
|
+
*
|
|
21551
|
+
* Owned by the orchestrator addon (provider) and mirrored into the
|
|
21552
|
+
* `zones` device-state slice on every mutation. Consumers
|
|
21553
|
+
* (motion-wasm, pipeline-executor, analytics, admin UI) read either
|
|
21554
|
+
* via `api.zones.listZones` (one-shot) or via `dev.state.zones` (live
|
|
21555
|
+
* mirror with `onChanged`).
|
|
21556
|
+
*
|
|
21557
|
+
* Coordinates are normalised fractions of the frame (0–1) so zones
|
|
21558
|
+
* survive resolution changes and stream profile switches.
|
|
21559
|
+
*
|
|
21560
|
+
* `kind` discriminates between full polygons (closed regions used
|
|
21561
|
+
* for intrusion / occupancy filters) and tripwires (open 2-point
|
|
21562
|
+
* line segments used for cross events). Onboard / firmware-reported
|
|
21563
|
+
* zones (Reolink, ONVIF) are out of scope for now — see the deferred
|
|
21564
|
+
* task list.
|
|
21565
|
+
*/
|
|
21566
|
+
var ZoneKindEnum = _enum(["polygon", "tripwire"]);
|
|
21567
|
+
/** Polygon vertex in fraction-of-frame coordinates (0–1). */
|
|
21568
|
+
var PolygonPointSchema = object({
|
|
21569
|
+
x: number(),
|
|
21570
|
+
y: number()
|
|
21571
|
+
});
|
|
21572
|
+
/** A camera detection zone — pure geometry/identity. */
|
|
21573
|
+
var ZoneSchema = object({
|
|
21574
|
+
id: string(),
|
|
21575
|
+
name: string(),
|
|
21576
|
+
kind: ZoneKindEnum.default("polygon"),
|
|
21577
|
+
/** Polygon vertices, fraction of frame (0–1). */
|
|
21578
|
+
polygon: array(PolygonPointSchema).readonly(),
|
|
21579
|
+
/** Visual color for UI rendering. */
|
|
21580
|
+
color: string().default("#3b82f6")
|
|
21581
|
+
});
|
|
21582
|
+
DeviceType.Camera, method(object({ deviceId: number() }), array(ZoneSchema).readonly()), method(object({
|
|
21583
|
+
deviceId: number(),
|
|
21584
|
+
zone: ZoneSchema
|
|
21585
|
+
}), _void(), {
|
|
21586
|
+
kind: "mutation",
|
|
21587
|
+
auth: "admin"
|
|
21588
|
+
}), method(object({
|
|
21589
|
+
deviceId: number(),
|
|
21590
|
+
zoneId: string()
|
|
21591
|
+
}), _void(), {
|
|
21592
|
+
kind: "mutation",
|
|
21593
|
+
auth: "admin"
|
|
21594
|
+
}), method(object({
|
|
21595
|
+
deviceId: number(),
|
|
21596
|
+
zone: ZoneSchema
|
|
21597
|
+
}), _void(), {
|
|
21598
|
+
kind: "mutation",
|
|
21599
|
+
auth: "admin"
|
|
21600
|
+
}), object({ zones: array(ZoneSchema).readonly() });
|
|
21601
|
+
/**
|
|
21569
21602
|
* A bounding box in NORMALIZED [0,1] frame coordinates for `getNativeCrop`. The
|
|
21570
21603
|
* decode worker resolves it against the RETAINED native frame's real pixel dims,
|
|
21571
21604
|
* so the caller supplies only the detection-res bbox divided by the detection
|
|
@@ -21752,7 +21785,17 @@ var DetailResultSchema = object({
|
|
|
21752
21785
|
/** Face short side (px) measured on the NATIVE crop surface. The `bbox`
|
|
21753
21786
|
* above is detection-frame px (≈6× smaller on a 4K camera) — min-face-size
|
|
21754
21787
|
* consumers MUST prefer this when present (2026-07-22 native-gate fix). */
|
|
21755
|
-
nativeFaceShortSidePx: number().optional()
|
|
21788
|
+
nativeFaceShortSidePx: number().optional(),
|
|
21789
|
+
/**
|
|
21790
|
+
* The five facial landmarks of a `face` detail, in the SAME frame space as
|
|
21791
|
+
* `bbox` (D644). Additive and optional: post-analysis stores them beside the
|
|
21792
|
+
* face's source frame so a future alignment can be re-derived exactly; a
|
|
21793
|
+
* runner that predates the field sends none and the face is stored without.
|
|
21794
|
+
*/
|
|
21795
|
+
landmarks: array(object({
|
|
21796
|
+
x: number(),
|
|
21797
|
+
y: number()
|
|
21798
|
+
})).optional()
|
|
21756
21799
|
});
|
|
21757
21800
|
/**
|
|
21758
21801
|
* Why an executing node REFUSED a stateless step run (`runStatelessStep`).
|
|
@@ -30077,7 +30120,7 @@ var HardwareInfoSchema = object({
|
|
|
30077
30120
|
coral: CoralInfoSchema.nullable().optional()
|
|
30078
30121
|
});
|
|
30079
30122
|
var PlatformScoreSchema = object({
|
|
30080
|
-
runtime:
|
|
30123
|
+
runtime: literal("python"),
|
|
30081
30124
|
backend: string(),
|
|
30082
30125
|
format: _enum([
|
|
30083
30126
|
"onnx",
|
|
@@ -30114,7 +30157,7 @@ var ModelRequirementSchema = object({
|
|
|
30114
30157
|
});
|
|
30115
30158
|
var ResolvedInferenceConfigSchema = object({
|
|
30116
30159
|
modelId: string(),
|
|
30117
|
-
runtime:
|
|
30160
|
+
runtime: literal("python"),
|
|
30118
30161
|
backend: string(),
|
|
30119
30162
|
format: ModelFormatSchema,
|
|
30120
30163
|
reason: string()
|
|
@@ -32321,6 +32364,92 @@ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSche
|
|
|
32321
32364
|
kind: "mutation",
|
|
32322
32365
|
auth: "admin"
|
|
32323
32366
|
});
|
|
32367
|
+
/**
|
|
32368
|
+
* Per-stage gating mode applied to the zones a rule references.
|
|
32369
|
+
*
|
|
32370
|
+
* - `include`: the rule contributes to a **whitelist** for its stage.
|
|
32371
|
+
* When at least one `include` rule fires for a stage, only entities
|
|
32372
|
+
* inside one of those zones pass that stage.
|
|
32373
|
+
* - `exclude`: the rule contributes to a **blacklist** for its stage.
|
|
32374
|
+
* Entities inside one of those zones are dropped at that stage.
|
|
32375
|
+
*
|
|
32376
|
+
* `monitor`-style observation (count without filtering) is not a rule
|
|
32377
|
+
* mode — zones without any matching rule are observed naturally by
|
|
32378
|
+
* `zone-analytics` (live snapshot + history), so an "I just want to
|
|
32379
|
+
* count, not filter" use case needs no rule at all.
|
|
32380
|
+
*/
|
|
32381
|
+
var ZoneRuleModeEnum = _enum(["include", "exclude"]);
|
|
32382
|
+
/**
|
|
32383
|
+
* Per-consumer rule that references existing zones (geometry) and
|
|
32384
|
+
* defines how a specific pipeline stage should treat them. Each
|
|
32385
|
+
* consumer addon owns its own `ZoneRule[]` array in its per-device
|
|
32386
|
+
* settings:
|
|
32387
|
+
*
|
|
32388
|
+
* - `addon-motion-wasm` → `motionZoneRules: ZoneRule[]` (motion stage)
|
|
32389
|
+
* - `addon-detection-pipeline` → `detectionZoneRules: ZoneRule[]` (detection stage)
|
|
32390
|
+
* - future: notification rules, audio gating, etc.
|
|
32391
|
+
*
|
|
32392
|
+
* One rule applies to N zones (`zoneIds[]`) so the operator can
|
|
32393
|
+
* express "ignore motion in ALL of {garden, street}" with a single
|
|
32394
|
+
* rule. `classFilter` narrows the rule to specific object classes —
|
|
32395
|
+
* "drop person detections in the street, but keep cars" is one
|
|
32396
|
+
* `exclude` rule with `classFilter: ['person']`.
|
|
32397
|
+
*
|
|
32398
|
+
* `enabled` is a soft toggle — the operator can keep the rule
|
|
32399
|
+
* configured but inert without deleting it.
|
|
32400
|
+
*/
|
|
32401
|
+
var ZoneRuleSchema = object({
|
|
32402
|
+
/** Stable rule id — survives edits, used by the UI for diffing. */
|
|
32403
|
+
id: string(),
|
|
32404
|
+
/** Optional human-readable label rendered in the rule editor. */
|
|
32405
|
+
name: string().optional(),
|
|
32406
|
+
/** Zones this rule targets. The rule's `mode` applies to ALL
|
|
32407
|
+
* listed zones (OR-set: a detection in any one of them counts).
|
|
32408
|
+
* At least one zone id required — a rule with no targets is a
|
|
32409
|
+
* configuration mistake and the form validator rejects it. */
|
|
32410
|
+
zoneIds: array(string()).min(1).readonly(),
|
|
32411
|
+
mode: ZoneRuleModeEnum,
|
|
32412
|
+
/**
|
|
32413
|
+
* Class names this rule applies to. Empty / undefined ⇒ rule
|
|
32414
|
+
* applies to every class. Class strings match the `macroClass`
|
|
32415
|
+
* field on detections (e.g. `person`, `car`, `dog`).
|
|
32416
|
+
*/
|
|
32417
|
+
classFilter: array(string()).readonly().optional(),
|
|
32418
|
+
/**
|
|
32419
|
+
* Minimum bbox/mask overlap (0–1) with any of the rule's zones
|
|
32420
|
+
* required to consider an entity "in the zone". Defaults to the
|
|
32421
|
+
* consumer's stage default when omitted. Kept for back-compat with
|
|
32422
|
+
* existing per-rule overrides; new operators pick the value via
|
|
32423
|
+
* `bboxInclusionPct` (operator-friendly 0–100). Whichever field is
|
|
32424
|
+
* set, the lower-level engine reads it as a 0–1 fraction.
|
|
32425
|
+
*/
|
|
32426
|
+
overlapThreshold: number().min(0).max(1).optional(),
|
|
32427
|
+
/**
|
|
32428
|
+
* Operator-friendly version of `overlapThreshold` — the percentage
|
|
32429
|
+
* of the detection's bbox that must lie inside the zone for the
|
|
32430
|
+
* rule to match. Documented default is 85%; the engine substitutes
|
|
32431
|
+
* that when the field is omitted (kept optional so existing rules
|
|
32432
|
+
* stored without it stay valid).
|
|
32433
|
+
*
|
|
32434
|
+
* When BOTH `overlapThreshold` and `bboxInclusionPct` are set on a
|
|
32435
|
+
* rule, the engine prefers `bboxInclusionPct` because it's the
|
|
32436
|
+
* field exposed in the UI. Internally both feed the same gate.
|
|
32437
|
+
*/
|
|
32438
|
+
bboxInclusionPct: number().min(0).max(100).optional(),
|
|
32439
|
+
/**
|
|
32440
|
+
* When `true` and a detection has a segmentation mask, use the
|
|
32441
|
+
* mask for overlap instead of the bbox. Detection-stage only;
|
|
32442
|
+
* motion rules ignore this field.
|
|
32443
|
+
*/
|
|
32444
|
+
preferMask: boolean().optional(),
|
|
32445
|
+
/**
|
|
32446
|
+
* Soft-toggle: `false` disables the rule without deleting it.
|
|
32447
|
+
* Defaults to `true` so operators creating a rule via the UI
|
|
32448
|
+
* see it active immediately.
|
|
32449
|
+
*/
|
|
32450
|
+
enabled: boolean().default(true)
|
|
32451
|
+
});
|
|
32452
|
+
array(ZoneRuleSchema).readonly();
|
|
32324
32453
|
object({
|
|
32325
32454
|
/** Whether the script is currently executing. */
|
|
32326
32455
|
isRunning: boolean(),
|
|
@@ -38673,6 +38802,12 @@ Object.freeze({
|
|
|
38673
38802
|
addonId: null,
|
|
38674
38803
|
access: "view"
|
|
38675
38804
|
},
|
|
38805
|
+
"notificationRules.previewStateSummary": {
|
|
38806
|
+
capName: "notification-rules",
|
|
38807
|
+
capScope: "system",
|
|
38808
|
+
addonId: null,
|
|
38809
|
+
access: "view"
|
|
38810
|
+
},
|
|
38676
38811
|
"notificationRules.previewTemplate": {
|
|
38677
38812
|
capName: "notification-rules",
|
|
38678
38813
|
capScope: "system",
|
|
@@ -39249,12 +39384,6 @@ Object.freeze({
|
|
|
39249
39384
|
addonId: null,
|
|
39250
39385
|
access: "create"
|
|
39251
39386
|
},
|
|
39252
|
-
"pipelineAnalytics.runReplayFrameProcessor": {
|
|
39253
|
-
capName: "pipeline-analytics",
|
|
39254
|
-
capScope: "device",
|
|
39255
|
-
addonId: null,
|
|
39256
|
-
access: "create"
|
|
39257
|
-
},
|
|
39258
39387
|
"pipelineAnalytics.saveRetrainAnnotations": {
|
|
39259
39388
|
capName: "pipeline-analytics",
|
|
39260
39389
|
capScope: "device",
|
|
@@ -43352,11 +43481,6 @@ Object.freeze({
|
|
|
43352
43481
|
form: "single",
|
|
43353
43482
|
optional: false
|
|
43354
43483
|
}],
|
|
43355
|
-
"pipelineAnalytics.runReplayFrameProcessor": [{
|
|
43356
|
-
name: "deviceId",
|
|
43357
|
-
form: "single",
|
|
43358
|
-
optional: false
|
|
43359
|
-
}],
|
|
43360
43484
|
"pipelineAnalytics.saveRetrainAnnotations": [{
|
|
43361
43485
|
name: "deviceId",
|
|
43362
43486
|
form: "single",
|
|
@@ -44245,12 +44369,55 @@ var NC_AUDIO_DEFAULTS = {
|
|
|
44245
44369
|
samplingSeconds: 10
|
|
44246
44370
|
};
|
|
44247
44371
|
new Set(["devices", "classes"]);
|
|
44248
|
-
/**
|
|
44372
|
+
/**
|
|
44373
|
+
* WHICH narrowing filter speaks about WHICH system-event kind — one predicate,
|
|
44374
|
+
* consumed by the rule ENGINE and by every rule EDITOR.
|
|
44375
|
+
*
|
|
44376
|
+
* ── The failure this file exists for ───────────────────────────────────────
|
|
44377
|
+
* `NcSystemEventConditionSchema` carries four optional narrowing lists
|
|
44378
|
+
* (`deviceIds`, `deviceTypes`, `nodeIds`, `packageNames`) beside a required
|
|
44379
|
+
* `kinds` gate. They are not four filters over one vocabulary: each belongs to
|
|
44380
|
+
* a FAMILY of kinds and is meaningless outside it. A node going away has no
|
|
44381
|
+
* device type; a completed export has no package; `stream-offline` deliberately
|
|
44382
|
+
* carries no device type at all (a stream belongs to a camera by construction).
|
|
44383
|
+
*
|
|
44384
|
+
* The engine applied all four to every kind, so a filter from one family failed
|
|
44385
|
+
* a kind from another family CLOSED. The operator's live rule "Eventi di
|
|
44386
|
+
* sistema" selected eleven kinds and set `deviceTypes: ['camera']` — the only
|
|
44387
|
+
* way to say "only my cameras" about the two liveness kinds — and NINE of the
|
|
44388
|
+
* eleven silently stopped being deliverable. Four days of history contained
|
|
44389
|
+
* `device-online` and `device-offline` and nothing else, across a window in
|
|
44390
|
+
* which agents were restarted and addons were updated.
|
|
44391
|
+
*
|
|
44392
|
+
* Both editors already computed this scoping, to decide which filter boxes to
|
|
44393
|
+
* render; the cap's own docblock already promised it ("Narrow a `device-*` kind
|
|
44394
|
+
* to these device TYPES"). Only the engine disagreed, and it disagreed in the
|
|
44395
|
+
* destructive direction. So the rule is stated ONCE, here, and the engine and
|
|
44396
|
+
* the editors are readers of it rather than three independent authors.
|
|
44397
|
+
*
|
|
44398
|
+
* ── The direction ─────────────────────────────────────────────────────────
|
|
44399
|
+
* Out of family ⇒ the filter is IGNORED, never fail-closed. An editor that
|
|
44400
|
+
* hides a box has already told the operator this filter does not speak about
|
|
44401
|
+
* these kinds, so honouring it as an exclusion contradicts the only
|
|
44402
|
+
* explanation the operator was ever given. Inside its family the filter still
|
|
44403
|
+
* narrows, and still fails CLOSED on a subject that cannot produce the identity
|
|
44404
|
+
* it tests (a device the mirror cannot name is not evidence of a camera).
|
|
44405
|
+
*/
|
|
44406
|
+
/**
|
|
44407
|
+
* Every filter, for the callers that must cover all of them (guards, tests).
|
|
44408
|
+
*
|
|
44409
|
+
* `consumableLowPercent` (D642) is not a list but it is a filter in exactly
|
|
44410
|
+
* this sense: it belongs to a family of kinds (the consumable pair) and the
|
|
44411
|
+
* engine consults it only there. It differs in one way the readers must know —
|
|
44412
|
+
* its ABSENCE is not "no narrowing" but the default threshold, because a
|
|
44413
|
+
* consumable episode is always judged at SOME threshold.
|
|
44414
|
+
*/
|
|
44249
44415
|
var NC_SYSTEM_EVENT_FILTER_KEYS = [
|
|
44250
44416
|
"deviceIds",
|
|
44251
44417
|
"deviceTypes",
|
|
44252
44418
|
"nodeIds",
|
|
44253
|
-
"packageNames"
|
|
44419
|
+
"packageNames",
|
|
44420
|
+
"consumableLowPercent"
|
|
44254
44421
|
];
|
|
44255
44422
|
new Map(Object.entries({
|
|
44256
44423
|
"device-online": "device-events",
|
|
@@ -44261,6 +44428,9 @@ new Map(Object.entries({
|
|
|
44261
44428
|
"device-battery-normal": "device-events",
|
|
44262
44429
|
"device-consumable-low": "device-events",
|
|
44263
44430
|
"device-consumable-normal": "device-events",
|
|
44431
|
+
"device-tank-low": "device-events",
|
|
44432
|
+
"device-tank-full": "device-events",
|
|
44433
|
+
"device-tank-normal": "device-events",
|
|
44264
44434
|
"stream-online": "device-events",
|
|
44265
44435
|
"stream-offline": "device-events",
|
|
44266
44436
|
"detection-blind": "device-events",
|
|
@@ -44290,6 +44460,98 @@ new Map(Object.entries({
|
|
|
44290
44460
|
"camera-enabled": null
|
|
44291
44461
|
}));
|
|
44292
44462
|
[...NC_SYSTEM_EVENT_FILTER_KEYS];
|
|
44463
|
+
var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
|
|
44464
|
+
{
|
|
44465
|
+
id: "device-state",
|
|
44466
|
+
family: "device-events",
|
|
44467
|
+
label: "Device state",
|
|
44468
|
+
kinds: [
|
|
44469
|
+
"device-offline",
|
|
44470
|
+
"device-online",
|
|
44471
|
+
"device-disabled",
|
|
44472
|
+
"device-enabled"
|
|
44473
|
+
]
|
|
44474
|
+
},
|
|
44475
|
+
{
|
|
44476
|
+
id: "streams",
|
|
44477
|
+
family: "device-events",
|
|
44478
|
+
label: "Streams",
|
|
44479
|
+
kinds: ["stream-offline", "stream-online"]
|
|
44480
|
+
},
|
|
44481
|
+
{
|
|
44482
|
+
id: "battery",
|
|
44483
|
+
family: "device-events",
|
|
44484
|
+
label: "Battery",
|
|
44485
|
+
kinds: ["device-battery-low", "device-battery-normal"]
|
|
44486
|
+
},
|
|
44487
|
+
{
|
|
44488
|
+
id: "consumables",
|
|
44489
|
+
family: "device-events",
|
|
44490
|
+
label: "Consumables",
|
|
44491
|
+
kinds: ["device-consumable-low", "device-consumable-normal"]
|
|
44492
|
+
},
|
|
44493
|
+
{
|
|
44494
|
+
id: "tanks",
|
|
44495
|
+
family: "device-events",
|
|
44496
|
+
label: "Tanks",
|
|
44497
|
+
kinds: [
|
|
44498
|
+
"device-tank-low",
|
|
44499
|
+
"device-tank-full",
|
|
44500
|
+
"device-tank-normal"
|
|
44501
|
+
]
|
|
44502
|
+
},
|
|
44503
|
+
{
|
|
44504
|
+
id: "detection-blind",
|
|
44505
|
+
family: "device-events",
|
|
44506
|
+
label: "Detecting nothing",
|
|
44507
|
+
kinds: ["detection-blind"]
|
|
44508
|
+
},
|
|
44509
|
+
{
|
|
44510
|
+
id: "nodes",
|
|
44511
|
+
family: "system",
|
|
44512
|
+
label: "Nodes",
|
|
44513
|
+
kinds: [
|
|
44514
|
+
"node-offline",
|
|
44515
|
+
"node-online",
|
|
44516
|
+
"node-inference-unavailable"
|
|
44517
|
+
]
|
|
44518
|
+
},
|
|
44519
|
+
{
|
|
44520
|
+
id: "addons",
|
|
44521
|
+
family: "system",
|
|
44522
|
+
label: "Addons",
|
|
44523
|
+
kinds: [
|
|
44524
|
+
"addon-crash-loop",
|
|
44525
|
+
"addon-update-available",
|
|
44526
|
+
"addon-updated"
|
|
44527
|
+
]
|
|
44528
|
+
},
|
|
44529
|
+
{
|
|
44530
|
+
id: "updates",
|
|
44531
|
+
family: "system",
|
|
44532
|
+
label: "Server & container updates",
|
|
44533
|
+
kinds: [
|
|
44534
|
+
"server-update-available",
|
|
44535
|
+
"server-updated",
|
|
44536
|
+
"wrapper-update-available"
|
|
44537
|
+
]
|
|
44538
|
+
},
|
|
44539
|
+
{
|
|
44540
|
+
id: "backups-exports",
|
|
44541
|
+
family: "system",
|
|
44542
|
+
label: "Backups & exports",
|
|
44543
|
+
kinds: ["backup-completed", "export-completed"]
|
|
44544
|
+
},
|
|
44545
|
+
{
|
|
44546
|
+
id: "alarm",
|
|
44547
|
+
family: "alarm",
|
|
44548
|
+
label: "Alarm",
|
|
44549
|
+
kinds: NC_ALARM_SYSTEM_EVENT_KINDS
|
|
44550
|
+
}
|
|
44551
|
+
];
|
|
44552
|
+
function systemEventKindsOfFamily(family) {
|
|
44553
|
+
return NC_SYSTEM_EVENT_KIND_GROUP_SPECS.filter((g) => g.family === family).flatMap((g) => g.kinds);
|
|
44554
|
+
}
|
|
44293
44555
|
NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
|
|
44294
44556
|
/**
|
|
44295
44557
|
* WHICH WAY A BOOLEAN SENSOR MOVED — read off the one slice a sensor event
|
|
@@ -44328,6 +44590,11 @@ var RULE_BODY_ONLY = ["body"];
|
|
|
44328
44590
|
var RULE_TEXT = ["title", "body"];
|
|
44329
44591
|
var BATTERY = ["device-battery-low", "device-battery-normal"];
|
|
44330
44592
|
var CONSUMABLE = ["device-consumable-low", "device-consumable-normal"];
|
|
44593
|
+
var TANK = [
|
|
44594
|
+
"device-tank-low",
|
|
44595
|
+
"device-tank-full",
|
|
44596
|
+
"device-tank-normal"
|
|
44597
|
+
];
|
|
44331
44598
|
var UPDATES = [
|
|
44332
44599
|
"addon-update-available",
|
|
44333
44600
|
"server-update-available",
|
|
@@ -44353,12 +44620,189 @@ var DEVICE_EVENTS = [
|
|
|
44353
44620
|
"device-enabled",
|
|
44354
44621
|
...BATTERY,
|
|
44355
44622
|
...CONSUMABLE,
|
|
44623
|
+
...TANK,
|
|
44356
44624
|
"stream-online",
|
|
44357
44625
|
"stream-offline",
|
|
44358
44626
|
"detection-blind",
|
|
44359
44627
|
...ALARM
|
|
44360
44628
|
];
|
|
44361
|
-
|
|
44629
|
+
/** Every kind a summary may speak about — the two summarisable families. */
|
|
44630
|
+
var SUMMARISABLE = [...systemEventKindsOfFamily("device-events"), ...systemEventKindsOfFamily("system")];
|
|
44631
|
+
/** One per summary SECTION (`NC_STATE_SUMMARY_SECTIONS` in the notification
|
|
44632
|
+
* centre): the section's lines, offered when one of its kinds is selected. */
|
|
44633
|
+
var STATE_SUMMARY_SECTION_VARS = [
|
|
44634
|
+
{
|
|
44635
|
+
name: "summaryDevices",
|
|
44636
|
+
label: "Summary: devices offline / switched off",
|
|
44637
|
+
example: "Garage — offline since 07:12",
|
|
44638
|
+
kinds: [
|
|
44639
|
+
"device-offline",
|
|
44640
|
+
"device-online",
|
|
44641
|
+
"device-disabled",
|
|
44642
|
+
"device-enabled"
|
|
44643
|
+
]
|
|
44644
|
+
},
|
|
44645
|
+
{
|
|
44646
|
+
name: "summaryStreams",
|
|
44647
|
+
label: "Summary: streams offline",
|
|
44648
|
+
example: "Ingresso (high) — since 06:40",
|
|
44649
|
+
kinds: ["stream-offline", "stream-online"]
|
|
44650
|
+
},
|
|
44651
|
+
{
|
|
44652
|
+
name: "summaryBattery",
|
|
44653
|
+
label: "Summary: low batteries",
|
|
44654
|
+
example: "Sensore porta — 8 %",
|
|
44655
|
+
kinds: BATTERY
|
|
44656
|
+
},
|
|
44657
|
+
{
|
|
44658
|
+
name: "summaryConsumables",
|
|
44659
|
+
label: "Summary: consumables",
|
|
44660
|
+
example: "Robot — filter 10 %",
|
|
44661
|
+
kinds: CONSUMABLE
|
|
44662
|
+
},
|
|
44663
|
+
{
|
|
44664
|
+
name: "summaryTanks",
|
|
44665
|
+
label: "Summary: tanks",
|
|
44666
|
+
example: "Robot — clean water low",
|
|
44667
|
+
kinds: TANK
|
|
44668
|
+
},
|
|
44669
|
+
{
|
|
44670
|
+
name: "summaryDetection",
|
|
44671
|
+
label: "Summary: cameras detecting nothing",
|
|
44672
|
+
example: "Ingresso — since 05:10",
|
|
44673
|
+
kinds: ["detection-blind"]
|
|
44674
|
+
},
|
|
44675
|
+
{
|
|
44676
|
+
name: "summaryNodes",
|
|
44677
|
+
label: "Summary: nodes",
|
|
44678
|
+
example: "little-unraid — offline since 03:00",
|
|
44679
|
+
kinds: [
|
|
44680
|
+
"node-offline",
|
|
44681
|
+
"node-online",
|
|
44682
|
+
"node-inference-unavailable"
|
|
44683
|
+
]
|
|
44684
|
+
},
|
|
44685
|
+
{
|
|
44686
|
+
name: "summaryAddons",
|
|
44687
|
+
label: "Summary: addons",
|
|
44688
|
+
example: "@camstack/addon-recorder 1.2.3 → 1.2.4",
|
|
44689
|
+
kinds: [
|
|
44690
|
+
"addon-crash-loop",
|
|
44691
|
+
"addon-update-available",
|
|
44692
|
+
"addon-updated"
|
|
44693
|
+
]
|
|
44694
|
+
},
|
|
44695
|
+
{
|
|
44696
|
+
name: "summaryUpdates",
|
|
44697
|
+
label: "Summary: server & container updates",
|
|
44698
|
+
example: "server 1.2.377 → 1.2.378",
|
|
44699
|
+
kinds: [
|
|
44700
|
+
"server-update-available",
|
|
44701
|
+
"server-updated",
|
|
44702
|
+
"wrapper-update-available"
|
|
44703
|
+
]
|
|
44704
|
+
}
|
|
44705
|
+
];
|
|
44706
|
+
var STATE_SUMMARY_VARS = [
|
|
44707
|
+
{
|
|
44708
|
+
name: "summaryText",
|
|
44709
|
+
label: "Summary: every section",
|
|
44710
|
+
description: "One block per section with something to report, one line per item.",
|
|
44711
|
+
example: "Batterie scariche: Sensore porta — 8 %",
|
|
44712
|
+
group: "system",
|
|
44713
|
+
families: ["rule"],
|
|
44714
|
+
fields: [...RULE_TEXT],
|
|
44715
|
+
kinds: ["system"],
|
|
44716
|
+
systemEventKinds: [...SUMMARISABLE],
|
|
44717
|
+
systemEventDeliveries: ["summary"]
|
|
44718
|
+
},
|
|
44719
|
+
{
|
|
44720
|
+
name: "summaryCount",
|
|
44721
|
+
label: "Summary: items reported",
|
|
44722
|
+
example: "3",
|
|
44723
|
+
group: "system",
|
|
44724
|
+
families: ["rule"],
|
|
44725
|
+
fields: [...RULE_TEXT],
|
|
44726
|
+
kinds: ["system"],
|
|
44727
|
+
systemEventKinds: [...SUMMARISABLE],
|
|
44728
|
+
systemEventDeliveries: ["summary"]
|
|
44729
|
+
},
|
|
44730
|
+
...STATE_SUMMARY_SECTION_VARS.map((v) => ({
|
|
44731
|
+
name: v.name,
|
|
44732
|
+
label: v.label,
|
|
44733
|
+
example: v.example,
|
|
44734
|
+
group: "system",
|
|
44735
|
+
families: ["rule"],
|
|
44736
|
+
fields: [...RULE_TEXT],
|
|
44737
|
+
kinds: ["system"],
|
|
44738
|
+
systemEventKinds: [...v.kinds],
|
|
44739
|
+
systemEventDeliveries: ["summary"]
|
|
44740
|
+
}))
|
|
44741
|
+
];
|
|
44742
|
+
[
|
|
44743
|
+
[...DEVICE_EVENTS],
|
|
44744
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
44745
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
44746
|
+
[...RULE_TEXT],
|
|
44747
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
44748
|
+
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|
|
44749
|
+
[...RULE_TEXT],
|
|
44750
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
44751
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
44752
|
+
([...RULE_TEXT], [...COMBINED_ALARM]),
|
|
44753
|
+
[...RULE_TEXT],
|
|
44754
|
+
[...RULE_TEXT],
|
|
44755
|
+
[...RULE_TEXT],
|
|
44756
|
+
[...RULE_TEXT],
|
|
44757
|
+
[...RULE_TEXT],
|
|
44758
|
+
[...RULE_TEXT],
|
|
44759
|
+
[...RULE_TEXT],
|
|
44760
|
+
[...RULE_TEXT],
|
|
44761
|
+
[...RULE_BODY_ONLY],
|
|
44762
|
+
[...RULE_TEXT],
|
|
44763
|
+
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
44764
|
+
([...RULE_TEXT], [...DEVICE_EVENTS]),
|
|
44765
|
+
([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
|
|
44766
|
+
([...RULE_TEXT], [...CONSUMABLE]),
|
|
44767
|
+
([...RULE_TEXT], [...TANK]),
|
|
44768
|
+
[...RULE_TEXT],
|
|
44769
|
+
([...RULE_TEXT], [...UPDATES]),
|
|
44770
|
+
([...RULE_TEXT], [...UPDATES]),
|
|
44771
|
+
[...RULE_TEXT],
|
|
44772
|
+
[...RULE_TEXT],
|
|
44773
|
+
[...RULE_TEXT],
|
|
44774
|
+
([...RULE_TEXT], [...UPDATES]),
|
|
44775
|
+
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|
|
44776
|
+
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|
|
44777
|
+
([...RULE_TEXT], [...UPDATES]),
|
|
44778
|
+
([...RULE_TEXT], [...UPDATES]),
|
|
44779
|
+
([...RULE_TEXT], [...PACKAGE_UPDATES]),
|
|
44780
|
+
[...RULE_TEXT],
|
|
44781
|
+
[...RULE_TEXT],
|
|
44782
|
+
[...RULE_TEXT],
|
|
44783
|
+
[...RULE_TEXT],
|
|
44784
|
+
[...RULE_TEXT],
|
|
44785
|
+
[...RULE_TEXT],
|
|
44786
|
+
[...RULE_TEXT],
|
|
44787
|
+
[...RULE_TEXT],
|
|
44788
|
+
[...RULE_TEXT],
|
|
44789
|
+
[...RULE_TEXT],
|
|
44790
|
+
[...RULE_TEXT],
|
|
44791
|
+
[...RULE_TEXT],
|
|
44792
|
+
[...RULE_TEXT],
|
|
44793
|
+
[...RULE_TEXT],
|
|
44794
|
+
[...RULE_TEXT],
|
|
44795
|
+
[...RULE_TEXT],
|
|
44796
|
+
[...RULE_TEXT],
|
|
44797
|
+
[...RULE_TEXT],
|
|
44798
|
+
[...RULE_TEXT],
|
|
44799
|
+
[...RULE_TEXT],
|
|
44800
|
+
[...RULE_TEXT],
|
|
44801
|
+
[...RULE_TEXT],
|
|
44802
|
+
[...RULE_TEXT],
|
|
44803
|
+
[...RULE_TEXT],
|
|
44804
|
+
...STATE_SUMMARY_VARS
|
|
44805
|
+
];
|
|
44362
44806
|
/**
|
|
44363
44807
|
* TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
|
|
44364
44808
|
*
|
|
@@ -44855,7 +45299,7 @@ var AgentUIAddon = class extends BaseAddon {
|
|
|
44855
45299
|
capability: adminUiCapability,
|
|
44856
45300
|
provider: {
|
|
44857
45301
|
getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
|
|
44858
|
-
getVersion: async () => ({ version: "1.2.
|
|
45302
|
+
getVersion: async () => ({ version: "1.2.148" })
|
|
44859
45303
|
}
|
|
44860
45304
|
}];
|
|
44861
45305
|
}
|