@camstack/addon-model-studio 1.0.26 → 1.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MotionZonesSettings-DswyY6HP.mjs → MotionZonesSettings-JuOM4wpI.mjs} +1 -1
- package/dist/{PrivacyMaskSettings-eoxneoGu.mjs → PrivacyMaskSettings-B4AFKvVk.mjs} +2 -2
- package/dist/_stub.js +1697 -1685
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page--ScsoC58.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-NMFv_zoJ.mjs} +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BOsI55Qr.mjs +26 -0
- package/dist/addon-model-studio.css +1 -1
- package/dist/{hostInit-RsirfP3S.mjs → hostInit-CdGt-Tbt.mjs} +3 -3
- package/dist/model-studio.addon.js +511 -2
- package/dist/model-studio.addon.mjs +511 -2
- package/dist/{player-overlays-D4ghec6K.mjs → player-overlays-BR3IAbV5.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{trash-2-BofMNso1.mjs → trash-2-CCPJ47Sy.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DGVlW7T3.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DvnLvZMm.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Cu8_cMyT.mjs +0 -26
|
@@ -7339,6 +7339,62 @@ var RecordingConfigSchema = object({
|
|
|
7339
7339
|
scrubThumbnails: ScrubThumbnailPresetSchema.optional()
|
|
7340
7340
|
});
|
|
7341
7341
|
/**
|
|
7342
|
+
* Ops-log — the durable, append-only operations audit shared by the
|
|
7343
|
+
* recordings and events management surfaces.
|
|
7344
|
+
*
|
|
7345
|
+
* ONE row shape is reused for both domains so a single "Activity" view can
|
|
7346
|
+
* merge the recorder's DurableState ring (recordings ops-log) and the
|
|
7347
|
+
* pipeline-analytics SQLite collection (events ops-log). Each row records a
|
|
7348
|
+
* management operation, WHY it ran (reason), and its measurable effect
|
|
7349
|
+
* (itemsAffected + bytesReclaimed). Writes are best-effort — a failed log must
|
|
7350
|
+
* never fail the operation it records.
|
|
7351
|
+
*/
|
|
7352
|
+
/** Which management domain the operation belongs to. */
|
|
7353
|
+
var OpsLogDomainSchema = _enum(["recording", "events"]);
|
|
7354
|
+
/** The kind of management operation performed. */
|
|
7355
|
+
var OpsLogOpSchema = _enum([
|
|
7356
|
+
"prune",
|
|
7357
|
+
"manual-delete",
|
|
7358
|
+
"rescan",
|
|
7359
|
+
"retention-run"
|
|
7360
|
+
]);
|
|
7361
|
+
/** Why the operation ran. */
|
|
7362
|
+
var OpsLogReasonSchema = _enum([
|
|
7363
|
+
"retention",
|
|
7364
|
+
"quota",
|
|
7365
|
+
"manual",
|
|
7366
|
+
"operator"
|
|
7367
|
+
]);
|
|
7368
|
+
/** One audit row, shared verbatim by both domains. */
|
|
7369
|
+
var OpsLogEntrySchema = object({
|
|
7370
|
+
/** Unique row id. */
|
|
7371
|
+
id: string(),
|
|
7372
|
+
/** Epoch ms the operation completed. */
|
|
7373
|
+
at: number(),
|
|
7374
|
+
domain: OpsLogDomainSchema,
|
|
7375
|
+
op: OpsLogOpSchema,
|
|
7376
|
+
reason: OpsLogReasonSchema,
|
|
7377
|
+
/** The camera the op targeted; null for a cluster/global op. */
|
|
7378
|
+
deviceId: number().nullable(),
|
|
7379
|
+
/** Node that performed the op (the log carries nodeId — no cross-node aggregation). */
|
|
7380
|
+
nodeId: string(),
|
|
7381
|
+
/** Buckets / rows deleted (op-specific unit). */
|
|
7382
|
+
itemsAffected: number(),
|
|
7383
|
+
/** Bytes reclaimed by the op (0 when not measurable). */
|
|
7384
|
+
bytesReclaimed: number(),
|
|
7385
|
+
/** Free-text detail (e.g. "floor moved to <ts>"); null when none. */
|
|
7386
|
+
detail: string().nullable(),
|
|
7387
|
+
/** Who/what triggered the op. */
|
|
7388
|
+
actor: string()
|
|
7389
|
+
});
|
|
7390
|
+
/** Shared query input for the per-domain `listOpsLog` cap methods. */
|
|
7391
|
+
var OpsLogQueryInputSchema = object({
|
|
7392
|
+
/** Restrict to a single camera; omit for every row. */
|
|
7393
|
+
deviceId: number().optional(),
|
|
7394
|
+
/** Max rows returned, newest-first. */
|
|
7395
|
+
limit: number().int().min(1).max(1e3).optional()
|
|
7396
|
+
});
|
|
7397
|
+
/**
|
|
7342
7398
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
7343
7399
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
7344
7400
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -7612,6 +7668,160 @@ var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
|
|
|
7612
7668
|
function nodePin(nodeId) {
|
|
7613
7669
|
return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: nodeId } };
|
|
7614
7670
|
}
|
|
7671
|
+
var COCO_TO_MACRO = {
|
|
7672
|
+
mapping: {
|
|
7673
|
+
person: "person",
|
|
7674
|
+
bicycle: "vehicle",
|
|
7675
|
+
car: "vehicle",
|
|
7676
|
+
motorcycle: "vehicle",
|
|
7677
|
+
airplane: "vehicle",
|
|
7678
|
+
bus: "vehicle",
|
|
7679
|
+
train: "vehicle",
|
|
7680
|
+
truck: "vehicle",
|
|
7681
|
+
boat: "vehicle",
|
|
7682
|
+
bird: "animal",
|
|
7683
|
+
cat: "animal",
|
|
7684
|
+
dog: "animal",
|
|
7685
|
+
horse: "animal",
|
|
7686
|
+
sheep: "animal",
|
|
7687
|
+
cow: "animal",
|
|
7688
|
+
elephant: "animal",
|
|
7689
|
+
bear: "animal",
|
|
7690
|
+
zebra: "animal",
|
|
7691
|
+
giraffe: "animal",
|
|
7692
|
+
suitcase: "package",
|
|
7693
|
+
backpack: "package",
|
|
7694
|
+
handbag: "package"
|
|
7695
|
+
},
|
|
7696
|
+
preserveOriginal: false
|
|
7697
|
+
};
|
|
7698
|
+
var AUDIO_MACRO_LABELS = [
|
|
7699
|
+
{
|
|
7700
|
+
id: "speech",
|
|
7701
|
+
name: "Speech",
|
|
7702
|
+
icon: "🗣️"
|
|
7703
|
+
},
|
|
7704
|
+
{
|
|
7705
|
+
id: "scream",
|
|
7706
|
+
name: "Scream / Shout",
|
|
7707
|
+
icon: "😱"
|
|
7708
|
+
},
|
|
7709
|
+
{
|
|
7710
|
+
id: "crying",
|
|
7711
|
+
name: "Crying / Baby",
|
|
7712
|
+
icon: "😢"
|
|
7713
|
+
},
|
|
7714
|
+
{
|
|
7715
|
+
id: "laughter",
|
|
7716
|
+
name: "Laughter",
|
|
7717
|
+
icon: "😂"
|
|
7718
|
+
},
|
|
7719
|
+
{
|
|
7720
|
+
id: "music",
|
|
7721
|
+
name: "Music",
|
|
7722
|
+
icon: "🎵"
|
|
7723
|
+
},
|
|
7724
|
+
{
|
|
7725
|
+
id: "dog",
|
|
7726
|
+
name: "Dog",
|
|
7727
|
+
icon: "🐕"
|
|
7728
|
+
},
|
|
7729
|
+
{
|
|
7730
|
+
id: "cat",
|
|
7731
|
+
name: "Cat",
|
|
7732
|
+
icon: "🐈"
|
|
7733
|
+
},
|
|
7734
|
+
{
|
|
7735
|
+
id: "bird",
|
|
7736
|
+
name: "Bird",
|
|
7737
|
+
icon: "🐦"
|
|
7738
|
+
},
|
|
7739
|
+
{
|
|
7740
|
+
id: "animal",
|
|
7741
|
+
name: "Animal (other)",
|
|
7742
|
+
icon: "🐾"
|
|
7743
|
+
},
|
|
7744
|
+
{
|
|
7745
|
+
id: "alarm",
|
|
7746
|
+
name: "Alarm / Siren",
|
|
7747
|
+
icon: "🚨"
|
|
7748
|
+
},
|
|
7749
|
+
{
|
|
7750
|
+
id: "doorbell",
|
|
7751
|
+
name: "Doorbell / Knock",
|
|
7752
|
+
icon: "🔔"
|
|
7753
|
+
},
|
|
7754
|
+
{
|
|
7755
|
+
id: "glass_breaking",
|
|
7756
|
+
name: "Glass Breaking",
|
|
7757
|
+
icon: "💥"
|
|
7758
|
+
},
|
|
7759
|
+
{
|
|
7760
|
+
id: "gunshot",
|
|
7761
|
+
name: "Gunshot / Explosion",
|
|
7762
|
+
icon: "💣"
|
|
7763
|
+
},
|
|
7764
|
+
{
|
|
7765
|
+
id: "vehicle",
|
|
7766
|
+
name: "Vehicle",
|
|
7767
|
+
icon: "🚗"
|
|
7768
|
+
},
|
|
7769
|
+
{
|
|
7770
|
+
id: "siren",
|
|
7771
|
+
name: "Emergency Siren",
|
|
7772
|
+
icon: "🚑"
|
|
7773
|
+
},
|
|
7774
|
+
{
|
|
7775
|
+
id: "fire",
|
|
7776
|
+
name: "Fire / Smoke",
|
|
7777
|
+
icon: "🔥"
|
|
7778
|
+
},
|
|
7779
|
+
{
|
|
7780
|
+
id: "water",
|
|
7781
|
+
name: "Water",
|
|
7782
|
+
icon: "💧"
|
|
7783
|
+
},
|
|
7784
|
+
{
|
|
7785
|
+
id: "wind",
|
|
7786
|
+
name: "Wind / Weather",
|
|
7787
|
+
icon: "🌬️"
|
|
7788
|
+
},
|
|
7789
|
+
{
|
|
7790
|
+
id: "door",
|
|
7791
|
+
name: "Door",
|
|
7792
|
+
icon: "🚪"
|
|
7793
|
+
},
|
|
7794
|
+
{
|
|
7795
|
+
id: "footsteps",
|
|
7796
|
+
name: "Footsteps",
|
|
7797
|
+
icon: "👣"
|
|
7798
|
+
},
|
|
7799
|
+
{
|
|
7800
|
+
id: "crowd",
|
|
7801
|
+
name: "Crowd / Chatter",
|
|
7802
|
+
icon: "👥"
|
|
7803
|
+
},
|
|
7804
|
+
{
|
|
7805
|
+
id: "telephone",
|
|
7806
|
+
name: "Telephone",
|
|
7807
|
+
icon: "📞"
|
|
7808
|
+
},
|
|
7809
|
+
{
|
|
7810
|
+
id: "engine",
|
|
7811
|
+
name: "Engine / Motor",
|
|
7812
|
+
icon: "⚙️"
|
|
7813
|
+
},
|
|
7814
|
+
{
|
|
7815
|
+
id: "tools",
|
|
7816
|
+
name: "Tools / Construction",
|
|
7817
|
+
icon: "🔨"
|
|
7818
|
+
},
|
|
7819
|
+
{
|
|
7820
|
+
id: "silence",
|
|
7821
|
+
name: "Silence",
|
|
7822
|
+
icon: "🤫"
|
|
7823
|
+
}
|
|
7824
|
+
];
|
|
7615
7825
|
var YAMNET_TO_MACRO = {
|
|
7616
7826
|
mapping: {
|
|
7617
7827
|
Speech: "speech",
|
|
@@ -7878,6 +8088,125 @@ var _macroLookup = /* @__PURE__ */ new Map();
|
|
|
7878
8088
|
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7879
8089
|
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7880
8090
|
/**
|
|
8091
|
+
* Unified event-kind taxonomy — THE single source of truth for
|
|
8092
|
+
* `kind → { parentKind, category, level, color, iconId, labelKey, label,
|
|
8093
|
+
* icon }`.
|
|
8094
|
+
*
|
|
8095
|
+
* This dictionary folds together what used to be scattered across four
|
|
8096
|
+
* copies:
|
|
8097
|
+
* - `capabilities/sensor-event-kinds.ts` (sensor cap colors)
|
|
8098
|
+
* - `addon-post-analysis/.../services/event-kinds.ts`
|
|
8099
|
+
* (MOTION/PERSON/VEHICLE… _COLOR constants)
|
|
8100
|
+
* - `ui-library/composites/detection-colors.ts` (CLASS_COLORS)
|
|
8101
|
+
* - `addon-post-analysis/shared/frame/box-drawer.ts` (DEFAULT_COLOR)
|
|
8102
|
+
* - the COCO / audio class maps (macro ↔ sub relationships)
|
|
8103
|
+
*
|
|
8104
|
+
* The DATA (serializable — color/iconId/labelKey/parentKind) lives here in
|
|
8105
|
+
* `@camstack/types`. The UI-side mapping `iconId → lucide component` and
|
|
8106
|
+
* `labelKey → t()` lives in `@camstack/ui-library`. UIs never hardcode a
|
|
8107
|
+
* color or an icon: they read this dictionary (server descriptors carry the
|
|
8108
|
+
* fields inline; the client resolves color/icon/label from `iconId`/`kind`).
|
|
8109
|
+
*
|
|
8110
|
+
* Two levels only (v1 YAGNI): macro → sub. `person` is a leaf macro.
|
|
8111
|
+
*/
|
|
8112
|
+
var TAXONOMY_COLORS = {
|
|
8113
|
+
motion: "#f59e0b",
|
|
8114
|
+
audio: "#06b6d4",
|
|
8115
|
+
person: "#22c55e",
|
|
8116
|
+
vehicle: "#3b82f6",
|
|
8117
|
+
animal: "#f97316",
|
|
8118
|
+
package: "#a855f7",
|
|
8119
|
+
sensor: "#8b5cf6",
|
|
8120
|
+
control: "#10b981",
|
|
8121
|
+
genericDetection: "#64748b"
|
|
8122
|
+
};
|
|
8123
|
+
var DETECTION_SUB_COLORS = {
|
|
8124
|
+
car: "#f59e0b",
|
|
8125
|
+
truck: "#d97706",
|
|
8126
|
+
bus: "#b45309",
|
|
8127
|
+
motorcycle: "#eab308",
|
|
8128
|
+
bicycle: "#ca8a04",
|
|
8129
|
+
airplane: "#60a5fa",
|
|
8130
|
+
boat: "#2563eb",
|
|
8131
|
+
train: "#1d4ed8",
|
|
8132
|
+
bird: "#14b8a6",
|
|
8133
|
+
dog: "#84cc16",
|
|
8134
|
+
cat: "#f97316",
|
|
8135
|
+
horse: "#a16207",
|
|
8136
|
+
sheep: "#a3a3a3",
|
|
8137
|
+
cow: "#78716c",
|
|
8138
|
+
elephant: "#6b7280",
|
|
8139
|
+
bear: "#7c2d12",
|
|
8140
|
+
zebra: "#404040",
|
|
8141
|
+
giraffe: "#d4a373"
|
|
8142
|
+
};
|
|
8143
|
+
function titleCase(id) {
|
|
8144
|
+
return id.split(/[-_ ]/).filter((p) => p.length > 0).map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join(" ");
|
|
8145
|
+
}
|
|
8146
|
+
var entries = /* @__PURE__ */ new Map();
|
|
8147
|
+
function macro(kind, category, color, iconId, label) {
|
|
8148
|
+
entries.set(kind, {
|
|
8149
|
+
kind,
|
|
8150
|
+
parentKind: null,
|
|
8151
|
+
level: "macro",
|
|
8152
|
+
category,
|
|
8153
|
+
color,
|
|
8154
|
+
iconId,
|
|
8155
|
+
labelKey: `eventKind.${kind}`,
|
|
8156
|
+
label
|
|
8157
|
+
});
|
|
8158
|
+
}
|
|
8159
|
+
function sub(kind, parentKind, category, color, iconId, label) {
|
|
8160
|
+
entries.set(kind, {
|
|
8161
|
+
kind,
|
|
8162
|
+
parentKind,
|
|
8163
|
+
level: "sub",
|
|
8164
|
+
category,
|
|
8165
|
+
color,
|
|
8166
|
+
iconId,
|
|
8167
|
+
labelKey: `eventKind.${kind}`,
|
|
8168
|
+
label
|
|
8169
|
+
});
|
|
8170
|
+
}
|
|
8171
|
+
macro("motion", "motion", TAXONOMY_COLORS.motion, "motion", "Motion");
|
|
8172
|
+
macro("audio", "audio", TAXONOMY_COLORS.audio, "audio", "Audio");
|
|
8173
|
+
macro("person", "detection", TAXONOMY_COLORS.person, "person", "Person");
|
|
8174
|
+
macro("vehicle", "detection", TAXONOMY_COLORS.vehicle, "vehicle", "Vehicle");
|
|
8175
|
+
macro("animal", "detection", TAXONOMY_COLORS.animal, "animal", "Animal");
|
|
8176
|
+
macro("package", "package", TAXONOMY_COLORS.package, "package", "Package");
|
|
8177
|
+
macro("sensor", "sensor", TAXONOMY_COLORS.sensor, "sensor", "Sensor");
|
|
8178
|
+
macro("control", "control", TAXONOMY_COLORS.control, "control", "Control");
|
|
8179
|
+
for (const [cocoClass, macroClass] of Object.entries(COCO_TO_MACRO.mapping)) {
|
|
8180
|
+
if (macroClass !== "vehicle" && macroClass !== "animal") continue;
|
|
8181
|
+
if (entries.has(cocoClass)) continue;
|
|
8182
|
+
sub(cocoClass, macroClass, "detection", DETECTION_SUB_COLORS[cocoClass] ?? TAXONOMY_COLORS.genericDetection, cocoClass, titleCase(cocoClass));
|
|
8183
|
+
}
|
|
8184
|
+
sub("package-delivered", "package", "package", TAXONOMY_COLORS.package, "package", "Package delivered");
|
|
8185
|
+
sub("package-picked-up", "package", "package", TAXONOMY_COLORS.package, "package", "Package picked up");
|
|
8186
|
+
sub("contact", "sensor", "sensor", "#f59e0b", "door", "Contact");
|
|
8187
|
+
sub("motion-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "pir", "Motion sensor");
|
|
8188
|
+
sub("smoke", "sensor", "sensor", "#ef4444", "smoke", "Smoke");
|
|
8189
|
+
sub("flood", "sensor", "sensor", "#3b82f6", "water", "Water leak");
|
|
8190
|
+
sub("gas", "sensor", "sensor", "#ef4444", "gas", "Gas");
|
|
8191
|
+
sub("carbon-monoxide", "sensor", "sensor", "#dc2626", "smoke", "Carbon monoxide");
|
|
8192
|
+
sub("vibration", "sensor", "sensor", "#eab308", "vibration", "Vibration");
|
|
8193
|
+
sub("tamper", "sensor", "sensor", "#f97316", "tamper", "Tamper");
|
|
8194
|
+
sub("presence", "sensor", "sensor", "#22c55e", "presence", "Presence");
|
|
8195
|
+
sub("enum-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "generic", "Sensor state");
|
|
8196
|
+
sub("device-event", "sensor", "sensor", "#10b981", "button", "Device event");
|
|
8197
|
+
sub("lock", "control", "control", "#0ea5e9", "lock", "Lock");
|
|
8198
|
+
sub("switch", "control", "control", TAXONOMY_COLORS.control, "switch", "Switch");
|
|
8199
|
+
sub("siren", "control", "control", "#dc2626", "siren", "Siren");
|
|
8200
|
+
sub("button", "control", "control", "#10b981", "button", "Button");
|
|
8201
|
+
sub("doorbell", "control", "control", "#a855f7", "doorbell", "Doorbell");
|
|
8202
|
+
for (const l of AUDIO_MACRO_LABELS) {
|
|
8203
|
+
const kind = `audio-${l.id}`;
|
|
8204
|
+
if (entries.has(kind)) continue;
|
|
8205
|
+
sub(kind, "audio", "audio", TAXONOMY_COLORS.audio, kind, l.name);
|
|
8206
|
+
}
|
|
8207
|
+
/** The complete taxonomy dictionary, keyed by kind. */
|
|
8208
|
+
var EVENT_TAXONOMY = Object.freeze(Object.fromEntries(entries));
|
|
8209
|
+
/**
|
|
7881
8210
|
* Error types for the safe expression engine. Two distinct classes so callers
|
|
7882
8211
|
* can tell a compile-time (grammar) failure from a runtime (evaluation)
|
|
7883
8212
|
* failure — both are non-fatal to the host: read paths degrade to "skip link".
|
|
@@ -15866,17 +16195,30 @@ var EventKindCategorySchema = _enum([
|
|
|
15866
16195
|
"audio",
|
|
15867
16196
|
"detection",
|
|
15868
16197
|
"sensor",
|
|
16198
|
+
"control",
|
|
15869
16199
|
"custom",
|
|
15870
16200
|
"package"
|
|
15871
16201
|
]);
|
|
16202
|
+
/** Taxonomy level — macro (timeline lane) vs sub (events-page leaf). */
|
|
16203
|
+
var EventKindLevelSchema = _enum(["macro", "sub"]);
|
|
15872
16204
|
var EventKindDescriptorSchema = object({
|
|
15873
|
-
/** Stable kind id (e.g. 'motion', '
|
|
16205
|
+
/** Stable kind id (e.g. 'motion', 'vehicle', 'car', 'lock'). */
|
|
15874
16206
|
kind: string(),
|
|
16207
|
+
/** i18n key resolved on the UI side; `label` is the English fallback. */
|
|
16208
|
+
labelKey: string(),
|
|
16209
|
+
/** English fallback label (kept for clients that don't translate). */
|
|
15875
16210
|
label: string(),
|
|
15876
16211
|
/** Hex color for timeline/legend rendering. */
|
|
15877
16212
|
color: string(),
|
|
16213
|
+
/** Dictionary id → lucide component on the UI side. */
|
|
16214
|
+
iconId: string(),
|
|
16215
|
+
/** Legacy closed-vocab glyph — fallback for `iconId`. */
|
|
15878
16216
|
icon: EventKindIconSchema,
|
|
15879
16217
|
category: EventKindCategorySchema,
|
|
16218
|
+
/** Macro parent for this kind ('car' → 'vehicle'); null for a macro. */
|
|
16219
|
+
parentKind: string().nullable(),
|
|
16220
|
+
/** Derived from `parentKind`, explicit for the client tree. */
|
|
16221
|
+
level: EventKindLevelSchema,
|
|
15880
16222
|
/** Which cap + device contributes this kind. For built-ins the camera
|
|
15881
16223
|
* itself; for sensor kinds the LINKED source device. */
|
|
15882
16224
|
source: object({
|
|
@@ -15949,11 +16291,21 @@ var TrackAudioLabelSchema = object({
|
|
|
15949
16291
|
firstAt: number(),
|
|
15950
16292
|
lastAt: number()
|
|
15951
16293
|
});
|
|
16294
|
+
/**
|
|
16295
|
+
* How a track was produced. `pipeline` (default / absent) = the spatial
|
|
16296
|
+
* detection+tracking pipeline. `sensor` = a SYNTHETIC track projected from a
|
|
16297
|
+
* linked sensor/control state change (no positions; carries a snapshot). The
|
|
16298
|
+
* spatial subsystems (tracker association, occupancy count, re-id/embedding,
|
|
16299
|
+
* resurrection) MUST skip `sensor` tracks — they have no bbox trajectory.
|
|
16300
|
+
*/
|
|
16301
|
+
var TrackSourceSchema = _enum(["pipeline", "sensor"]);
|
|
15952
16302
|
var TrackSchema = object({
|
|
15953
16303
|
trackId: string(),
|
|
15954
16304
|
deviceId: number(),
|
|
15955
16305
|
className: string(),
|
|
15956
16306
|
label: string().optional(),
|
|
16307
|
+
/** Track provenance. Absent ⇒ `pipeline` (legacy rows). */
|
|
16308
|
+
source: TrackSourceSchema.optional(),
|
|
15957
16309
|
firstSeen: number(),
|
|
15958
16310
|
lastSeen: number(),
|
|
15959
16311
|
/** Frame-rate position history (subject to maxPositionHistory cap). */
|
|
@@ -16208,6 +16560,26 @@ var TrackCascadeCountsSchema = object({
|
|
|
16208
16560
|
/** Per-track CLIP search vectors removed (best-effort). */
|
|
16209
16561
|
embeddings: number().int()
|
|
16210
16562
|
});
|
|
16563
|
+
/** Event-store footprint for one camera. */
|
|
16564
|
+
var EventStoreDeviceFootprintSchema = object({
|
|
16565
|
+
deviceId: number(),
|
|
16566
|
+
/** Persisted event rows (motion + object + audio) for the camera. */
|
|
16567
|
+
rows: number().int(),
|
|
16568
|
+
/** Event-owned media bytes on disk for the camera. */
|
|
16569
|
+
bytes: number().int()
|
|
16570
|
+
});
|
|
16571
|
+
/** Aggregate event-store footprint: global totals + per-camera breakdown. */
|
|
16572
|
+
var EventStoreFootprintSchema = object({
|
|
16573
|
+
totalRows: number().int(),
|
|
16574
|
+
totalBytes: number().int(),
|
|
16575
|
+
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
16576
|
+
});
|
|
16577
|
+
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
16578
|
+
var EventPruneCountsSchema = object({
|
|
16579
|
+
motion: number().int(),
|
|
16580
|
+
object: number().int(),
|
|
16581
|
+
audio: number().int()
|
|
16582
|
+
});
|
|
16211
16583
|
DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
|
|
16212
16584
|
deviceId: number(),
|
|
16213
16585
|
trackId: string()
|
|
@@ -16271,6 +16643,21 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16271
16643
|
}), {
|
|
16272
16644
|
kind: "mutation",
|
|
16273
16645
|
auth: "admin"
|
|
16646
|
+
}), method(object({}), EventStoreFootprintSchema, {
|
|
16647
|
+
kind: "query",
|
|
16648
|
+
auth: "admin"
|
|
16649
|
+
}), method(object({
|
|
16650
|
+
olderThanMs: number(),
|
|
16651
|
+
reason: OpsLogReasonSchema.optional()
|
|
16652
|
+
}), EventPruneCountsSchema, {
|
|
16653
|
+
kind: "mutation",
|
|
16654
|
+
auth: "admin"
|
|
16655
|
+
}), method(object({ deviceId: number() }), EventPruneCountsSchema, {
|
|
16656
|
+
kind: "mutation",
|
|
16657
|
+
auth: "admin"
|
|
16658
|
+
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
16659
|
+
kind: "query",
|
|
16660
|
+
auth: "admin"
|
|
16274
16661
|
}), method(object({
|
|
16275
16662
|
eventId: string(),
|
|
16276
16663
|
kind: MediaFileKindEnum.optional()
|
|
@@ -16295,6 +16682,76 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16295
16682
|
eventId: string(),
|
|
16296
16683
|
timestamp: number()
|
|
16297
16684
|
});
|
|
16685
|
+
/**
|
|
16686
|
+
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
16687
|
+
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
16688
|
+
* caps into per-camera event-kind descriptors.
|
|
16689
|
+
*
|
|
16690
|
+
* The descriptor DATA (color / iconId / labelKey / parentKind / category)
|
|
16691
|
+
* is NOT duplicated here — every entry is derived from the single
|
|
16692
|
+
* `EVENT_TAXONOMY` dictionary (`catalogs/event-taxonomy.ts`). This file owns
|
|
16693
|
+
* ONLY the cap-name → taxonomy-kind mapping. Adding a new eventful sensor /
|
|
16694
|
+
* control cap means adding one line here (and a taxonomy entry); the anti-
|
|
16695
|
+
* drift guard `scripts/check-event-kind-coverage.ts` fails the build if an
|
|
16696
|
+
* eventful cap is missing.
|
|
16697
|
+
*/
|
|
16698
|
+
/** Map a taxonomy `iconId` onto the legacy closed `EventKindIcon` enum. */
|
|
16699
|
+
var LEGACY_ICON = {
|
|
16700
|
+
motion: "motion",
|
|
16701
|
+
audio: "audio",
|
|
16702
|
+
person: "person",
|
|
16703
|
+
vehicle: "vehicle",
|
|
16704
|
+
animal: "animal",
|
|
16705
|
+
package: "package",
|
|
16706
|
+
door: "door",
|
|
16707
|
+
pir: "pir",
|
|
16708
|
+
smoke: "smoke",
|
|
16709
|
+
water: "water",
|
|
16710
|
+
button: "button",
|
|
16711
|
+
generic: "generic",
|
|
16712
|
+
gas: "smoke",
|
|
16713
|
+
vibration: "generic",
|
|
16714
|
+
tamper: "generic",
|
|
16715
|
+
presence: "person",
|
|
16716
|
+
lock: "generic",
|
|
16717
|
+
siren: "generic",
|
|
16718
|
+
switch: "generic",
|
|
16719
|
+
doorbell: "button"
|
|
16720
|
+
};
|
|
16721
|
+
function legacyIcon(iconId) {
|
|
16722
|
+
return LEGACY_ICON[iconId] ?? "generic";
|
|
16723
|
+
}
|
|
16724
|
+
/**
|
|
16725
|
+
* Cap name → taxonomy kind id. Covers EVERY eventful sensor / control cap.
|
|
16726
|
+
* The anti-drift guard cross-checks this against the eventful caps declared
|
|
16727
|
+
* in `packages/types/src/capabilities/*.cap.ts`.
|
|
16728
|
+
*/
|
|
16729
|
+
var CAP_TO_KIND = {
|
|
16730
|
+
contact: "contact",
|
|
16731
|
+
motion: "motion-sensor",
|
|
16732
|
+
smoke: "smoke",
|
|
16733
|
+
flood: "flood",
|
|
16734
|
+
gas: "gas",
|
|
16735
|
+
"carbon-monoxide": "carbon-monoxide",
|
|
16736
|
+
vibration: "vibration",
|
|
16737
|
+
tamper: "tamper",
|
|
16738
|
+
presence: "presence",
|
|
16739
|
+
"enum-sensor": "enum-sensor",
|
|
16740
|
+
"event-emitter": "device-event",
|
|
16741
|
+
"lock-control": "lock",
|
|
16742
|
+
switch: "switch",
|
|
16743
|
+
button: "button",
|
|
16744
|
+
doorbell: "doorbell"
|
|
16745
|
+
};
|
|
16746
|
+
function buildDescriptor(capName, kind) {
|
|
16747
|
+
const t = EVENT_TAXONOMY[kind];
|
|
16748
|
+
if (t === void 0) throw new Error(`EVENT_KIND_BY_CAP: cap '${capName}' maps to unknown taxonomy kind '${kind}'`);
|
|
16749
|
+
return {
|
|
16750
|
+
...t,
|
|
16751
|
+
icon: legacyIcon(t.iconId)
|
|
16752
|
+
};
|
|
16753
|
+
}
|
|
16754
|
+
Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
|
|
16298
16755
|
var CameraPipelineConfigSchema = object({
|
|
16299
16756
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
16300
16757
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -19504,13 +19961,29 @@ method(object({
|
|
|
19504
19961
|
}), method(object({ deviceId: number() }), RecordingStatusSchema, {
|
|
19505
19962
|
kind: "mutation",
|
|
19506
19963
|
auth: "admin"
|
|
19507
|
-
}), method(object({
|
|
19964
|
+
}), method(object({
|
|
19965
|
+
deviceId: number(),
|
|
19966
|
+
reason: OpsLogReasonSchema.optional()
|
|
19967
|
+
}), object({
|
|
19508
19968
|
floorMs: number().nullable(),
|
|
19509
19969
|
deletedBuckets: number().int(),
|
|
19510
19970
|
reclaimedBytes: number().int()
|
|
19511
19971
|
}), {
|
|
19512
19972
|
kind: "mutation",
|
|
19513
19973
|
auth: "admin"
|
|
19974
|
+
}), method(object({
|
|
19975
|
+
deviceId: number(),
|
|
19976
|
+
fromMs: number().optional(),
|
|
19977
|
+
toMs: number().optional()
|
|
19978
|
+
}), object({
|
|
19979
|
+
deletedBuckets: number().int(),
|
|
19980
|
+
reclaimedBytes: number().int()
|
|
19981
|
+
}), {
|
|
19982
|
+
kind: "mutation",
|
|
19983
|
+
auth: "admin"
|
|
19984
|
+
}), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
|
|
19985
|
+
kind: "query",
|
|
19986
|
+
auth: "admin"
|
|
19514
19987
|
});
|
|
19515
19988
|
/**
|
|
19516
19989
|
* `recordingExport` cap — render a footage time range into a single downloadable
|
|
@@ -22632,6 +23105,12 @@ Object.freeze({
|
|
|
22632
23105
|
addonId: null,
|
|
22633
23106
|
access: "delete"
|
|
22634
23107
|
},
|
|
23108
|
+
"pipelineAnalytics.deleteDeviceEvents": {
|
|
23109
|
+
capName: "pipeline-analytics",
|
|
23110
|
+
capScope: "device",
|
|
23111
|
+
addonId: null,
|
|
23112
|
+
access: "delete"
|
|
23113
|
+
},
|
|
22635
23114
|
"pipelineAnalytics.deleteTracks": {
|
|
22636
23115
|
capName: "pipeline-analytics",
|
|
22637
23116
|
capScope: "device",
|
|
@@ -22662,6 +23141,12 @@ Object.freeze({
|
|
|
22662
23141
|
addonId: null,
|
|
22663
23142
|
access: "view"
|
|
22664
23143
|
},
|
|
23144
|
+
"pipelineAnalytics.getEventStoreFootprint": {
|
|
23145
|
+
capName: "pipeline-analytics",
|
|
23146
|
+
capScope: "device",
|
|
23147
|
+
addonId: null,
|
|
23148
|
+
access: "view"
|
|
23149
|
+
},
|
|
22665
23150
|
"pipelineAnalytics.getKeyEvents": {
|
|
22666
23151
|
capName: "pipeline-analytics",
|
|
22667
23152
|
capScope: "device",
|
|
@@ -22704,6 +23189,12 @@ Object.freeze({
|
|
|
22704
23189
|
addonId: null,
|
|
22705
23190
|
access: "view"
|
|
22706
23191
|
},
|
|
23192
|
+
"pipelineAnalytics.listOpsLog": {
|
|
23193
|
+
capName: "pipeline-analytics",
|
|
23194
|
+
capScope: "device",
|
|
23195
|
+
addonId: null,
|
|
23196
|
+
access: "view"
|
|
23197
|
+
},
|
|
22707
23198
|
"pipelineAnalytics.listRecentTracks": {
|
|
22708
23199
|
capName: "pipeline-analytics",
|
|
22709
23200
|
capScope: "device",
|
|
@@ -22716,6 +23207,12 @@ Object.freeze({
|
|
|
22716
23207
|
addonId: null,
|
|
22717
23208
|
access: "view"
|
|
22718
23209
|
},
|
|
23210
|
+
"pipelineAnalytics.pruneEvents": {
|
|
23211
|
+
capName: "pipeline-analytics",
|
|
23212
|
+
capScope: "device",
|
|
23213
|
+
addonId: null,
|
|
23214
|
+
access: "create"
|
|
23215
|
+
},
|
|
22719
23216
|
"pipelineAnalytics.pruneEventsBefore": {
|
|
22720
23217
|
capName: "pipeline-analytics",
|
|
22721
23218
|
capScope: "device",
|
|
@@ -23478,6 +23975,12 @@ Object.freeze({
|
|
|
23478
23975
|
addonId: null,
|
|
23479
23976
|
access: "create"
|
|
23480
23977
|
},
|
|
23978
|
+
"recording.deleteFootprint": {
|
|
23979
|
+
capName: "recording",
|
|
23980
|
+
capScope: "system",
|
|
23981
|
+
addonId: null,
|
|
23982
|
+
access: "delete"
|
|
23983
|
+
},
|
|
23481
23984
|
"recording.getAvailability": {
|
|
23482
23985
|
capName: "recording",
|
|
23483
23986
|
capScope: "system",
|
|
@@ -23508,6 +24011,12 @@ Object.freeze({
|
|
|
23508
24011
|
addonId: null,
|
|
23509
24012
|
access: "view"
|
|
23510
24013
|
},
|
|
24014
|
+
"recording.listOpsLog": {
|
|
24015
|
+
capName: "recording",
|
|
24016
|
+
capScope: "system",
|
|
24017
|
+
addonId: null,
|
|
24018
|
+
access: "view"
|
|
24019
|
+
},
|
|
23511
24020
|
"recording.locateSegment": {
|
|
23512
24021
|
capName: "recording",
|
|
23513
24022
|
capScope: "system",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as e, g as t, h as n, l as r, n as i, p as a, r as o, t as s, u as c, y as l } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs";
|
|
2
2
|
import { n as u, r as d, t as f } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { f as p } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BOsI55Qr.mjs";
|
|
4
4
|
//#region ../ui-library/src/lib/cap-error.ts
|
|
5
5
|
function m(e) {
|
|
6
6
|
if (typeof e != "object" || !e) return null;
|
package/dist/remoteEntry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-
|
|
1
|
+
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DvnLvZMm.mjs";
|
|
2
2
|
export { t as get, e as init };
|
|
@@ -2753,7 +2753,7 @@ async function rr(e) {
|
|
|
2753
2753
|
}
|
|
2754
2754
|
}
|
|
2755
2755
|
async function ir() {
|
|
2756
|
-
return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page
|
|
2756
|
+
return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-NMFv_zoJ.mjs")).catch((e) => {
|
|
2757
2757
|
throw tr = void 0, e;
|
|
2758
2758
|
}), tr;
|
|
2759
2759
|
}
|