@camstack/addon-remote-storage 1.1.28 → 1.1.29
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/s3.addon.js +1 -1
- package/dist/s3.addon.mjs +1 -1
- package/dist/sftp.addon.js +1 -1
- package/dist/sftp.addon.mjs +1 -1
- package/dist/{shared-EwybxG9c.js → shared-CZDYRlzo.js} +367 -1
- package/dist/{shared-DwOLwiOT.mjs → shared-DW5ccoQG.mjs} +367 -1
- package/dist/webdav.addon.js +1 -1
- package/dist/webdav.addon.mjs +1 -1
- package/package.json +1 -1
package/dist/s3.addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_shared = require("./shared-
|
|
5
|
+
const require_shared = require("./shared-CZDYRlzo.js");
|
|
6
6
|
let node_stream = require("node:stream");
|
|
7
7
|
let _aws_sdk_client_s3 = require("@aws-sdk/client-s3");
|
|
8
8
|
let _aws_sdk_lib_storage = require("@aws-sdk/lib-storage");
|
package/dist/s3.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-
|
|
1
|
+
import { c as BaseAddon, i as rearmIdleAbort, n as getOptionalBasePath, o as scheduleIdleAbort, s as storageProviderCapability, t as createSessionId } from "./shared-DW5ccoQG.mjs";
|
|
2
2
|
import { PassThrough } from "node:stream";
|
|
3
3
|
import { DeleteObjectCommand, GetObjectCommand, HeadBucketCommand, HeadObjectCommand, ListObjectsV2Command, PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
|
|
4
4
|
import { Upload } from "@aws-sdk/lib-storage";
|
package/dist/sftp.addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_shared = require("./shared-
|
|
5
|
+
const require_shared = require("./shared-CZDYRlzo.js");
|
|
6
6
|
let ssh2 = require("ssh2");
|
|
7
7
|
let node_path = require("node:path");
|
|
8
8
|
node_path = require_shared.__toESM(node_path);
|
package/dist/sftp.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-
|
|
1
|
+
import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-DW5ccoQG.mjs";
|
|
2
2
|
import { Client } from "ssh2";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
//#region src/providers/sftp/sftp-config-schema.ts
|
|
@@ -7651,6 +7651,160 @@ var EncodeProfileSchema = object({
|
|
|
7651
7651
|
*/
|
|
7652
7652
|
outputArgs: array(string()).optional()
|
|
7653
7653
|
});
|
|
7654
|
+
var COCO_TO_MACRO = {
|
|
7655
|
+
mapping: {
|
|
7656
|
+
person: "person",
|
|
7657
|
+
bicycle: "vehicle",
|
|
7658
|
+
car: "vehicle",
|
|
7659
|
+
motorcycle: "vehicle",
|
|
7660
|
+
airplane: "vehicle",
|
|
7661
|
+
bus: "vehicle",
|
|
7662
|
+
train: "vehicle",
|
|
7663
|
+
truck: "vehicle",
|
|
7664
|
+
boat: "vehicle",
|
|
7665
|
+
bird: "animal",
|
|
7666
|
+
cat: "animal",
|
|
7667
|
+
dog: "animal",
|
|
7668
|
+
horse: "animal",
|
|
7669
|
+
sheep: "animal",
|
|
7670
|
+
cow: "animal",
|
|
7671
|
+
elephant: "animal",
|
|
7672
|
+
bear: "animal",
|
|
7673
|
+
zebra: "animal",
|
|
7674
|
+
giraffe: "animal",
|
|
7675
|
+
suitcase: "package",
|
|
7676
|
+
backpack: "package",
|
|
7677
|
+
handbag: "package"
|
|
7678
|
+
},
|
|
7679
|
+
preserveOriginal: false
|
|
7680
|
+
};
|
|
7681
|
+
var AUDIO_MACRO_LABELS = [
|
|
7682
|
+
{
|
|
7683
|
+
id: "speech",
|
|
7684
|
+
name: "Speech",
|
|
7685
|
+
icon: "🗣️"
|
|
7686
|
+
},
|
|
7687
|
+
{
|
|
7688
|
+
id: "scream",
|
|
7689
|
+
name: "Scream / Shout",
|
|
7690
|
+
icon: "😱"
|
|
7691
|
+
},
|
|
7692
|
+
{
|
|
7693
|
+
id: "crying",
|
|
7694
|
+
name: "Crying / Baby",
|
|
7695
|
+
icon: "😢"
|
|
7696
|
+
},
|
|
7697
|
+
{
|
|
7698
|
+
id: "laughter",
|
|
7699
|
+
name: "Laughter",
|
|
7700
|
+
icon: "😂"
|
|
7701
|
+
},
|
|
7702
|
+
{
|
|
7703
|
+
id: "music",
|
|
7704
|
+
name: "Music",
|
|
7705
|
+
icon: "🎵"
|
|
7706
|
+
},
|
|
7707
|
+
{
|
|
7708
|
+
id: "dog",
|
|
7709
|
+
name: "Dog",
|
|
7710
|
+
icon: "🐕"
|
|
7711
|
+
},
|
|
7712
|
+
{
|
|
7713
|
+
id: "cat",
|
|
7714
|
+
name: "Cat",
|
|
7715
|
+
icon: "🐈"
|
|
7716
|
+
},
|
|
7717
|
+
{
|
|
7718
|
+
id: "bird",
|
|
7719
|
+
name: "Bird",
|
|
7720
|
+
icon: "🐦"
|
|
7721
|
+
},
|
|
7722
|
+
{
|
|
7723
|
+
id: "animal",
|
|
7724
|
+
name: "Animal (other)",
|
|
7725
|
+
icon: "🐾"
|
|
7726
|
+
},
|
|
7727
|
+
{
|
|
7728
|
+
id: "alarm",
|
|
7729
|
+
name: "Alarm / Siren",
|
|
7730
|
+
icon: "🚨"
|
|
7731
|
+
},
|
|
7732
|
+
{
|
|
7733
|
+
id: "doorbell",
|
|
7734
|
+
name: "Doorbell / Knock",
|
|
7735
|
+
icon: "🔔"
|
|
7736
|
+
},
|
|
7737
|
+
{
|
|
7738
|
+
id: "glass_breaking",
|
|
7739
|
+
name: "Glass Breaking",
|
|
7740
|
+
icon: "💥"
|
|
7741
|
+
},
|
|
7742
|
+
{
|
|
7743
|
+
id: "gunshot",
|
|
7744
|
+
name: "Gunshot / Explosion",
|
|
7745
|
+
icon: "💣"
|
|
7746
|
+
},
|
|
7747
|
+
{
|
|
7748
|
+
id: "vehicle",
|
|
7749
|
+
name: "Vehicle",
|
|
7750
|
+
icon: "🚗"
|
|
7751
|
+
},
|
|
7752
|
+
{
|
|
7753
|
+
id: "siren",
|
|
7754
|
+
name: "Emergency Siren",
|
|
7755
|
+
icon: "🚑"
|
|
7756
|
+
},
|
|
7757
|
+
{
|
|
7758
|
+
id: "fire",
|
|
7759
|
+
name: "Fire / Smoke",
|
|
7760
|
+
icon: "🔥"
|
|
7761
|
+
},
|
|
7762
|
+
{
|
|
7763
|
+
id: "water",
|
|
7764
|
+
name: "Water",
|
|
7765
|
+
icon: "💧"
|
|
7766
|
+
},
|
|
7767
|
+
{
|
|
7768
|
+
id: "wind",
|
|
7769
|
+
name: "Wind / Weather",
|
|
7770
|
+
icon: "🌬️"
|
|
7771
|
+
},
|
|
7772
|
+
{
|
|
7773
|
+
id: "door",
|
|
7774
|
+
name: "Door",
|
|
7775
|
+
icon: "🚪"
|
|
7776
|
+
},
|
|
7777
|
+
{
|
|
7778
|
+
id: "footsteps",
|
|
7779
|
+
name: "Footsteps",
|
|
7780
|
+
icon: "👣"
|
|
7781
|
+
},
|
|
7782
|
+
{
|
|
7783
|
+
id: "crowd",
|
|
7784
|
+
name: "Crowd / Chatter",
|
|
7785
|
+
icon: "👥"
|
|
7786
|
+
},
|
|
7787
|
+
{
|
|
7788
|
+
id: "telephone",
|
|
7789
|
+
name: "Telephone",
|
|
7790
|
+
icon: "📞"
|
|
7791
|
+
},
|
|
7792
|
+
{
|
|
7793
|
+
id: "engine",
|
|
7794
|
+
name: "Engine / Motor",
|
|
7795
|
+
icon: "⚙️"
|
|
7796
|
+
},
|
|
7797
|
+
{
|
|
7798
|
+
id: "tools",
|
|
7799
|
+
name: "Tools / Construction",
|
|
7800
|
+
icon: "🔨"
|
|
7801
|
+
},
|
|
7802
|
+
{
|
|
7803
|
+
id: "silence",
|
|
7804
|
+
name: "Silence",
|
|
7805
|
+
icon: "🤫"
|
|
7806
|
+
}
|
|
7807
|
+
];
|
|
7654
7808
|
var YAMNET_TO_MACRO = {
|
|
7655
7809
|
mapping: {
|
|
7656
7810
|
Speech: "speech",
|
|
@@ -7917,6 +8071,125 @@ var _macroLookup = /* @__PURE__ */ new Map();
|
|
|
7917
8071
|
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7918
8072
|
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7919
8073
|
/**
|
|
8074
|
+
* Unified event-kind taxonomy — THE single source of truth for
|
|
8075
|
+
* `kind → { parentKind, category, level, color, iconId, labelKey, label,
|
|
8076
|
+
* icon }`.
|
|
8077
|
+
*
|
|
8078
|
+
* This dictionary folds together what used to be scattered across four
|
|
8079
|
+
* copies:
|
|
8080
|
+
* - `capabilities/sensor-event-kinds.ts` (sensor cap colors)
|
|
8081
|
+
* - `addon-post-analysis/.../services/event-kinds.ts`
|
|
8082
|
+
* (MOTION/PERSON/VEHICLE… _COLOR constants)
|
|
8083
|
+
* - `ui-library/composites/detection-colors.ts` (CLASS_COLORS)
|
|
8084
|
+
* - `addon-post-analysis/shared/frame/box-drawer.ts` (DEFAULT_COLOR)
|
|
8085
|
+
* - the COCO / audio class maps (macro ↔ sub relationships)
|
|
8086
|
+
*
|
|
8087
|
+
* The DATA (serializable — color/iconId/labelKey/parentKind) lives here in
|
|
8088
|
+
* `@camstack/types`. The UI-side mapping `iconId → lucide component` and
|
|
8089
|
+
* `labelKey → t()` lives in `@camstack/ui-library`. UIs never hardcode a
|
|
8090
|
+
* color or an icon: they read this dictionary (server descriptors carry the
|
|
8091
|
+
* fields inline; the client resolves color/icon/label from `iconId`/`kind`).
|
|
8092
|
+
*
|
|
8093
|
+
* Two levels only (v1 YAGNI): macro → sub. `person` is a leaf macro.
|
|
8094
|
+
*/
|
|
8095
|
+
var TAXONOMY_COLORS = {
|
|
8096
|
+
motion: "#f59e0b",
|
|
8097
|
+
audio: "#06b6d4",
|
|
8098
|
+
person: "#22c55e",
|
|
8099
|
+
vehicle: "#3b82f6",
|
|
8100
|
+
animal: "#f97316",
|
|
8101
|
+
package: "#a855f7",
|
|
8102
|
+
sensor: "#8b5cf6",
|
|
8103
|
+
control: "#10b981",
|
|
8104
|
+
genericDetection: "#64748b"
|
|
8105
|
+
};
|
|
8106
|
+
var DETECTION_SUB_COLORS = {
|
|
8107
|
+
car: "#f59e0b",
|
|
8108
|
+
truck: "#d97706",
|
|
8109
|
+
bus: "#b45309",
|
|
8110
|
+
motorcycle: "#eab308",
|
|
8111
|
+
bicycle: "#ca8a04",
|
|
8112
|
+
airplane: "#60a5fa",
|
|
8113
|
+
boat: "#2563eb",
|
|
8114
|
+
train: "#1d4ed8",
|
|
8115
|
+
bird: "#14b8a6",
|
|
8116
|
+
dog: "#84cc16",
|
|
8117
|
+
cat: "#f97316",
|
|
8118
|
+
horse: "#a16207",
|
|
8119
|
+
sheep: "#a3a3a3",
|
|
8120
|
+
cow: "#78716c",
|
|
8121
|
+
elephant: "#6b7280",
|
|
8122
|
+
bear: "#7c2d12",
|
|
8123
|
+
zebra: "#404040",
|
|
8124
|
+
giraffe: "#d4a373"
|
|
8125
|
+
};
|
|
8126
|
+
function titleCase(id) {
|
|
8127
|
+
return id.split(/[-_ ]/).filter((p) => p.length > 0).map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join(" ");
|
|
8128
|
+
}
|
|
8129
|
+
var entries = /* @__PURE__ */ new Map();
|
|
8130
|
+
function macro(kind, category, color, iconId, label) {
|
|
8131
|
+
entries.set(kind, {
|
|
8132
|
+
kind,
|
|
8133
|
+
parentKind: null,
|
|
8134
|
+
level: "macro",
|
|
8135
|
+
category,
|
|
8136
|
+
color,
|
|
8137
|
+
iconId,
|
|
8138
|
+
labelKey: `eventKind.${kind}`,
|
|
8139
|
+
label
|
|
8140
|
+
});
|
|
8141
|
+
}
|
|
8142
|
+
function sub(kind, parentKind, category, color, iconId, label) {
|
|
8143
|
+
entries.set(kind, {
|
|
8144
|
+
kind,
|
|
8145
|
+
parentKind,
|
|
8146
|
+
level: "sub",
|
|
8147
|
+
category,
|
|
8148
|
+
color,
|
|
8149
|
+
iconId,
|
|
8150
|
+
labelKey: `eventKind.${kind}`,
|
|
8151
|
+
label
|
|
8152
|
+
});
|
|
8153
|
+
}
|
|
8154
|
+
macro("motion", "motion", TAXONOMY_COLORS.motion, "motion", "Motion");
|
|
8155
|
+
macro("audio", "audio", TAXONOMY_COLORS.audio, "audio", "Audio");
|
|
8156
|
+
macro("person", "detection", TAXONOMY_COLORS.person, "person", "Person");
|
|
8157
|
+
macro("vehicle", "detection", TAXONOMY_COLORS.vehicle, "vehicle", "Vehicle");
|
|
8158
|
+
macro("animal", "detection", TAXONOMY_COLORS.animal, "animal", "Animal");
|
|
8159
|
+
macro("package", "package", TAXONOMY_COLORS.package, "package", "Package");
|
|
8160
|
+
macro("sensor", "sensor", TAXONOMY_COLORS.sensor, "sensor", "Sensor");
|
|
8161
|
+
macro("control", "control", TAXONOMY_COLORS.control, "control", "Control");
|
|
8162
|
+
for (const [cocoClass, macroClass] of Object.entries(COCO_TO_MACRO.mapping)) {
|
|
8163
|
+
if (macroClass !== "vehicle" && macroClass !== "animal") continue;
|
|
8164
|
+
if (entries.has(cocoClass)) continue;
|
|
8165
|
+
sub(cocoClass, macroClass, "detection", DETECTION_SUB_COLORS[cocoClass] ?? TAXONOMY_COLORS.genericDetection, cocoClass, titleCase(cocoClass));
|
|
8166
|
+
}
|
|
8167
|
+
sub("package-delivered", "package", "package", TAXONOMY_COLORS.package, "package", "Package delivered");
|
|
8168
|
+
sub("package-picked-up", "package", "package", TAXONOMY_COLORS.package, "package", "Package picked up");
|
|
8169
|
+
sub("contact", "sensor", "sensor", "#f59e0b", "door", "Contact");
|
|
8170
|
+
sub("motion-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "pir", "Motion sensor");
|
|
8171
|
+
sub("smoke", "sensor", "sensor", "#ef4444", "smoke", "Smoke");
|
|
8172
|
+
sub("flood", "sensor", "sensor", "#3b82f6", "water", "Water leak");
|
|
8173
|
+
sub("gas", "sensor", "sensor", "#ef4444", "gas", "Gas");
|
|
8174
|
+
sub("carbon-monoxide", "sensor", "sensor", "#dc2626", "smoke", "Carbon monoxide");
|
|
8175
|
+
sub("vibration", "sensor", "sensor", "#eab308", "vibration", "Vibration");
|
|
8176
|
+
sub("tamper", "sensor", "sensor", "#f97316", "tamper", "Tamper");
|
|
8177
|
+
sub("presence", "sensor", "sensor", "#22c55e", "presence", "Presence");
|
|
8178
|
+
sub("enum-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "generic", "Sensor state");
|
|
8179
|
+
sub("device-event", "sensor", "sensor", "#10b981", "button", "Device event");
|
|
8180
|
+
sub("lock", "control", "control", "#0ea5e9", "lock", "Lock");
|
|
8181
|
+
sub("switch", "control", "control", TAXONOMY_COLORS.control, "switch", "Switch");
|
|
8182
|
+
sub("siren", "control", "control", "#dc2626", "siren", "Siren");
|
|
8183
|
+
sub("button", "control", "control", "#10b981", "button", "Button");
|
|
8184
|
+
sub("doorbell", "control", "control", "#a855f7", "doorbell", "Doorbell");
|
|
8185
|
+
for (const l of AUDIO_MACRO_LABELS) {
|
|
8186
|
+
const kind = `audio-${l.id}`;
|
|
8187
|
+
if (entries.has(kind)) continue;
|
|
8188
|
+
sub(kind, "audio", "audio", TAXONOMY_COLORS.audio, kind, l.name);
|
|
8189
|
+
}
|
|
8190
|
+
/** The complete taxonomy dictionary, keyed by kind. */
|
|
8191
|
+
var EVENT_TAXONOMY = Object.freeze(Object.fromEntries(entries));
|
|
8192
|
+
/**
|
|
7920
8193
|
* Error types for the safe expression engine. Two distinct classes so callers
|
|
7921
8194
|
* can tell a compile-time (grammar) failure from a runtime (evaluation)
|
|
7922
8195
|
* failure — both are non-fatal to the host: read paths degrade to "skip link".
|
|
@@ -15866,17 +16139,30 @@ var EventKindCategorySchema = _enum([
|
|
|
15866
16139
|
"audio",
|
|
15867
16140
|
"detection",
|
|
15868
16141
|
"sensor",
|
|
16142
|
+
"control",
|
|
15869
16143
|
"custom",
|
|
15870
16144
|
"package"
|
|
15871
16145
|
]);
|
|
16146
|
+
/** Taxonomy level — macro (timeline lane) vs sub (events-page leaf). */
|
|
16147
|
+
var EventKindLevelSchema = _enum(["macro", "sub"]);
|
|
15872
16148
|
var EventKindDescriptorSchema = object({
|
|
15873
|
-
/** Stable kind id (e.g. 'motion', '
|
|
16149
|
+
/** Stable kind id (e.g. 'motion', 'vehicle', 'car', 'lock'). */
|
|
15874
16150
|
kind: string(),
|
|
16151
|
+
/** i18n key resolved on the UI side; `label` is the English fallback. */
|
|
16152
|
+
labelKey: string(),
|
|
16153
|
+
/** English fallback label (kept for clients that don't translate). */
|
|
15875
16154
|
label: string(),
|
|
15876
16155
|
/** Hex color for timeline/legend rendering. */
|
|
15877
16156
|
color: string(),
|
|
16157
|
+
/** Dictionary id → lucide component on the UI side. */
|
|
16158
|
+
iconId: string(),
|
|
16159
|
+
/** Legacy closed-vocab glyph — fallback for `iconId`. */
|
|
15878
16160
|
icon: EventKindIconSchema,
|
|
15879
16161
|
category: EventKindCategorySchema,
|
|
16162
|
+
/** Macro parent for this kind ('car' → 'vehicle'); null for a macro. */
|
|
16163
|
+
parentKind: string().nullable(),
|
|
16164
|
+
/** Derived from `parentKind`, explicit for the client tree. */
|
|
16165
|
+
level: EventKindLevelSchema,
|
|
15880
16166
|
/** Which cap + device contributes this kind. For built-ins the camera
|
|
15881
16167
|
* itself; for sensor kinds the LINKED source device. */
|
|
15882
16168
|
source: object({
|
|
@@ -15949,11 +16235,21 @@ var TrackAudioLabelSchema = object({
|
|
|
15949
16235
|
firstAt: number(),
|
|
15950
16236
|
lastAt: number()
|
|
15951
16237
|
});
|
|
16238
|
+
/**
|
|
16239
|
+
* How a track was produced. `pipeline` (default / absent) = the spatial
|
|
16240
|
+
* detection+tracking pipeline. `sensor` = a SYNTHETIC track projected from a
|
|
16241
|
+
* linked sensor/control state change (no positions; carries a snapshot). The
|
|
16242
|
+
* spatial subsystems (tracker association, occupancy count, re-id/embedding,
|
|
16243
|
+
* resurrection) MUST skip `sensor` tracks — they have no bbox trajectory.
|
|
16244
|
+
*/
|
|
16245
|
+
var TrackSourceSchema = _enum(["pipeline", "sensor"]);
|
|
15952
16246
|
var TrackSchema = object({
|
|
15953
16247
|
trackId: string(),
|
|
15954
16248
|
deviceId: number(),
|
|
15955
16249
|
className: string(),
|
|
15956
16250
|
label: string().optional(),
|
|
16251
|
+
/** Track provenance. Absent ⇒ `pipeline` (legacy rows). */
|
|
16252
|
+
source: TrackSourceSchema.optional(),
|
|
15957
16253
|
firstSeen: number(),
|
|
15958
16254
|
lastSeen: number(),
|
|
15959
16255
|
/** Frame-rate position history (subject to maxPositionHistory cap). */
|
|
@@ -16330,6 +16626,76 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16330
16626
|
eventId: string(),
|
|
16331
16627
|
timestamp: number()
|
|
16332
16628
|
});
|
|
16629
|
+
/**
|
|
16630
|
+
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
16631
|
+
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
16632
|
+
* caps into per-camera event-kind descriptors.
|
|
16633
|
+
*
|
|
16634
|
+
* The descriptor DATA (color / iconId / labelKey / parentKind / category)
|
|
16635
|
+
* is NOT duplicated here — every entry is derived from the single
|
|
16636
|
+
* `EVENT_TAXONOMY` dictionary (`catalogs/event-taxonomy.ts`). This file owns
|
|
16637
|
+
* ONLY the cap-name → taxonomy-kind mapping. Adding a new eventful sensor /
|
|
16638
|
+
* control cap means adding one line here (and a taxonomy entry); the anti-
|
|
16639
|
+
* drift guard `scripts/check-event-kind-coverage.ts` fails the build if an
|
|
16640
|
+
* eventful cap is missing.
|
|
16641
|
+
*/
|
|
16642
|
+
/** Map a taxonomy `iconId` onto the legacy closed `EventKindIcon` enum. */
|
|
16643
|
+
var LEGACY_ICON = {
|
|
16644
|
+
motion: "motion",
|
|
16645
|
+
audio: "audio",
|
|
16646
|
+
person: "person",
|
|
16647
|
+
vehicle: "vehicle",
|
|
16648
|
+
animal: "animal",
|
|
16649
|
+
package: "package",
|
|
16650
|
+
door: "door",
|
|
16651
|
+
pir: "pir",
|
|
16652
|
+
smoke: "smoke",
|
|
16653
|
+
water: "water",
|
|
16654
|
+
button: "button",
|
|
16655
|
+
generic: "generic",
|
|
16656
|
+
gas: "smoke",
|
|
16657
|
+
vibration: "generic",
|
|
16658
|
+
tamper: "generic",
|
|
16659
|
+
presence: "person",
|
|
16660
|
+
lock: "generic",
|
|
16661
|
+
siren: "generic",
|
|
16662
|
+
switch: "generic",
|
|
16663
|
+
doorbell: "button"
|
|
16664
|
+
};
|
|
16665
|
+
function legacyIcon(iconId) {
|
|
16666
|
+
return LEGACY_ICON[iconId] ?? "generic";
|
|
16667
|
+
}
|
|
16668
|
+
/**
|
|
16669
|
+
* Cap name → taxonomy kind id. Covers EVERY eventful sensor / control cap.
|
|
16670
|
+
* The anti-drift guard cross-checks this against the eventful caps declared
|
|
16671
|
+
* in `packages/types/src/capabilities/*.cap.ts`.
|
|
16672
|
+
*/
|
|
16673
|
+
var CAP_TO_KIND = {
|
|
16674
|
+
contact: "contact",
|
|
16675
|
+
motion: "motion-sensor",
|
|
16676
|
+
smoke: "smoke",
|
|
16677
|
+
flood: "flood",
|
|
16678
|
+
gas: "gas",
|
|
16679
|
+
"carbon-monoxide": "carbon-monoxide",
|
|
16680
|
+
vibration: "vibration",
|
|
16681
|
+
tamper: "tamper",
|
|
16682
|
+
presence: "presence",
|
|
16683
|
+
"enum-sensor": "enum-sensor",
|
|
16684
|
+
"event-emitter": "device-event",
|
|
16685
|
+
"lock-control": "lock",
|
|
16686
|
+
switch: "switch",
|
|
16687
|
+
button: "button",
|
|
16688
|
+
doorbell: "doorbell"
|
|
16689
|
+
};
|
|
16690
|
+
function buildDescriptor(capName, kind) {
|
|
16691
|
+
const t = EVENT_TAXONOMY[kind];
|
|
16692
|
+
if (t === void 0) throw new Error(`EVENT_KIND_BY_CAP: cap '${capName}' maps to unknown taxonomy kind '${kind}'`);
|
|
16693
|
+
return {
|
|
16694
|
+
...t,
|
|
16695
|
+
icon: legacyIcon(t.iconId)
|
|
16696
|
+
};
|
|
16697
|
+
}
|
|
16698
|
+
Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
|
|
16333
16699
|
var CameraPipelineConfigSchema = object({
|
|
16334
16700
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
16335
16701
|
steps: array(PipelineStepInputSchema).readonly(),
|
|
@@ -7628,6 +7628,160 @@ var EncodeProfileSchema = object({
|
|
|
7628
7628
|
*/
|
|
7629
7629
|
outputArgs: array(string()).optional()
|
|
7630
7630
|
});
|
|
7631
|
+
var COCO_TO_MACRO = {
|
|
7632
|
+
mapping: {
|
|
7633
|
+
person: "person",
|
|
7634
|
+
bicycle: "vehicle",
|
|
7635
|
+
car: "vehicle",
|
|
7636
|
+
motorcycle: "vehicle",
|
|
7637
|
+
airplane: "vehicle",
|
|
7638
|
+
bus: "vehicle",
|
|
7639
|
+
train: "vehicle",
|
|
7640
|
+
truck: "vehicle",
|
|
7641
|
+
boat: "vehicle",
|
|
7642
|
+
bird: "animal",
|
|
7643
|
+
cat: "animal",
|
|
7644
|
+
dog: "animal",
|
|
7645
|
+
horse: "animal",
|
|
7646
|
+
sheep: "animal",
|
|
7647
|
+
cow: "animal",
|
|
7648
|
+
elephant: "animal",
|
|
7649
|
+
bear: "animal",
|
|
7650
|
+
zebra: "animal",
|
|
7651
|
+
giraffe: "animal",
|
|
7652
|
+
suitcase: "package",
|
|
7653
|
+
backpack: "package",
|
|
7654
|
+
handbag: "package"
|
|
7655
|
+
},
|
|
7656
|
+
preserveOriginal: false
|
|
7657
|
+
};
|
|
7658
|
+
var AUDIO_MACRO_LABELS = [
|
|
7659
|
+
{
|
|
7660
|
+
id: "speech",
|
|
7661
|
+
name: "Speech",
|
|
7662
|
+
icon: "🗣️"
|
|
7663
|
+
},
|
|
7664
|
+
{
|
|
7665
|
+
id: "scream",
|
|
7666
|
+
name: "Scream / Shout",
|
|
7667
|
+
icon: "😱"
|
|
7668
|
+
},
|
|
7669
|
+
{
|
|
7670
|
+
id: "crying",
|
|
7671
|
+
name: "Crying / Baby",
|
|
7672
|
+
icon: "😢"
|
|
7673
|
+
},
|
|
7674
|
+
{
|
|
7675
|
+
id: "laughter",
|
|
7676
|
+
name: "Laughter",
|
|
7677
|
+
icon: "😂"
|
|
7678
|
+
},
|
|
7679
|
+
{
|
|
7680
|
+
id: "music",
|
|
7681
|
+
name: "Music",
|
|
7682
|
+
icon: "🎵"
|
|
7683
|
+
},
|
|
7684
|
+
{
|
|
7685
|
+
id: "dog",
|
|
7686
|
+
name: "Dog",
|
|
7687
|
+
icon: "🐕"
|
|
7688
|
+
},
|
|
7689
|
+
{
|
|
7690
|
+
id: "cat",
|
|
7691
|
+
name: "Cat",
|
|
7692
|
+
icon: "🐈"
|
|
7693
|
+
},
|
|
7694
|
+
{
|
|
7695
|
+
id: "bird",
|
|
7696
|
+
name: "Bird",
|
|
7697
|
+
icon: "🐦"
|
|
7698
|
+
},
|
|
7699
|
+
{
|
|
7700
|
+
id: "animal",
|
|
7701
|
+
name: "Animal (other)",
|
|
7702
|
+
icon: "🐾"
|
|
7703
|
+
},
|
|
7704
|
+
{
|
|
7705
|
+
id: "alarm",
|
|
7706
|
+
name: "Alarm / Siren",
|
|
7707
|
+
icon: "🚨"
|
|
7708
|
+
},
|
|
7709
|
+
{
|
|
7710
|
+
id: "doorbell",
|
|
7711
|
+
name: "Doorbell / Knock",
|
|
7712
|
+
icon: "🔔"
|
|
7713
|
+
},
|
|
7714
|
+
{
|
|
7715
|
+
id: "glass_breaking",
|
|
7716
|
+
name: "Glass Breaking",
|
|
7717
|
+
icon: "💥"
|
|
7718
|
+
},
|
|
7719
|
+
{
|
|
7720
|
+
id: "gunshot",
|
|
7721
|
+
name: "Gunshot / Explosion",
|
|
7722
|
+
icon: "💣"
|
|
7723
|
+
},
|
|
7724
|
+
{
|
|
7725
|
+
id: "vehicle",
|
|
7726
|
+
name: "Vehicle",
|
|
7727
|
+
icon: "🚗"
|
|
7728
|
+
},
|
|
7729
|
+
{
|
|
7730
|
+
id: "siren",
|
|
7731
|
+
name: "Emergency Siren",
|
|
7732
|
+
icon: "🚑"
|
|
7733
|
+
},
|
|
7734
|
+
{
|
|
7735
|
+
id: "fire",
|
|
7736
|
+
name: "Fire / Smoke",
|
|
7737
|
+
icon: "🔥"
|
|
7738
|
+
},
|
|
7739
|
+
{
|
|
7740
|
+
id: "water",
|
|
7741
|
+
name: "Water",
|
|
7742
|
+
icon: "💧"
|
|
7743
|
+
},
|
|
7744
|
+
{
|
|
7745
|
+
id: "wind",
|
|
7746
|
+
name: "Wind / Weather",
|
|
7747
|
+
icon: "🌬️"
|
|
7748
|
+
},
|
|
7749
|
+
{
|
|
7750
|
+
id: "door",
|
|
7751
|
+
name: "Door",
|
|
7752
|
+
icon: "🚪"
|
|
7753
|
+
},
|
|
7754
|
+
{
|
|
7755
|
+
id: "footsteps",
|
|
7756
|
+
name: "Footsteps",
|
|
7757
|
+
icon: "👣"
|
|
7758
|
+
},
|
|
7759
|
+
{
|
|
7760
|
+
id: "crowd",
|
|
7761
|
+
name: "Crowd / Chatter",
|
|
7762
|
+
icon: "👥"
|
|
7763
|
+
},
|
|
7764
|
+
{
|
|
7765
|
+
id: "telephone",
|
|
7766
|
+
name: "Telephone",
|
|
7767
|
+
icon: "📞"
|
|
7768
|
+
},
|
|
7769
|
+
{
|
|
7770
|
+
id: "engine",
|
|
7771
|
+
name: "Engine / Motor",
|
|
7772
|
+
icon: "⚙️"
|
|
7773
|
+
},
|
|
7774
|
+
{
|
|
7775
|
+
id: "tools",
|
|
7776
|
+
name: "Tools / Construction",
|
|
7777
|
+
icon: "🔨"
|
|
7778
|
+
},
|
|
7779
|
+
{
|
|
7780
|
+
id: "silence",
|
|
7781
|
+
name: "Silence",
|
|
7782
|
+
icon: "🤫"
|
|
7783
|
+
}
|
|
7784
|
+
];
|
|
7631
7785
|
var YAMNET_TO_MACRO = {
|
|
7632
7786
|
mapping: {
|
|
7633
7787
|
Speech: "speech",
|
|
@@ -7894,6 +8048,125 @@ var _macroLookup = /* @__PURE__ */ new Map();
|
|
|
7894
8048
|
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7895
8049
|
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7896
8050
|
/**
|
|
8051
|
+
* Unified event-kind taxonomy — THE single source of truth for
|
|
8052
|
+
* `kind → { parentKind, category, level, color, iconId, labelKey, label,
|
|
8053
|
+
* icon }`.
|
|
8054
|
+
*
|
|
8055
|
+
* This dictionary folds together what used to be scattered across four
|
|
8056
|
+
* copies:
|
|
8057
|
+
* - `capabilities/sensor-event-kinds.ts` (sensor cap colors)
|
|
8058
|
+
* - `addon-post-analysis/.../services/event-kinds.ts`
|
|
8059
|
+
* (MOTION/PERSON/VEHICLE… _COLOR constants)
|
|
8060
|
+
* - `ui-library/composites/detection-colors.ts` (CLASS_COLORS)
|
|
8061
|
+
* - `addon-post-analysis/shared/frame/box-drawer.ts` (DEFAULT_COLOR)
|
|
8062
|
+
* - the COCO / audio class maps (macro ↔ sub relationships)
|
|
8063
|
+
*
|
|
8064
|
+
* The DATA (serializable — color/iconId/labelKey/parentKind) lives here in
|
|
8065
|
+
* `@camstack/types`. The UI-side mapping `iconId → lucide component` and
|
|
8066
|
+
* `labelKey → t()` lives in `@camstack/ui-library`. UIs never hardcode a
|
|
8067
|
+
* color or an icon: they read this dictionary (server descriptors carry the
|
|
8068
|
+
* fields inline; the client resolves color/icon/label from `iconId`/`kind`).
|
|
8069
|
+
*
|
|
8070
|
+
* Two levels only (v1 YAGNI): macro → sub. `person` is a leaf macro.
|
|
8071
|
+
*/
|
|
8072
|
+
var TAXONOMY_COLORS = {
|
|
8073
|
+
motion: "#f59e0b",
|
|
8074
|
+
audio: "#06b6d4",
|
|
8075
|
+
person: "#22c55e",
|
|
8076
|
+
vehicle: "#3b82f6",
|
|
8077
|
+
animal: "#f97316",
|
|
8078
|
+
package: "#a855f7",
|
|
8079
|
+
sensor: "#8b5cf6",
|
|
8080
|
+
control: "#10b981",
|
|
8081
|
+
genericDetection: "#64748b"
|
|
8082
|
+
};
|
|
8083
|
+
var DETECTION_SUB_COLORS = {
|
|
8084
|
+
car: "#f59e0b",
|
|
8085
|
+
truck: "#d97706",
|
|
8086
|
+
bus: "#b45309",
|
|
8087
|
+
motorcycle: "#eab308",
|
|
8088
|
+
bicycle: "#ca8a04",
|
|
8089
|
+
airplane: "#60a5fa",
|
|
8090
|
+
boat: "#2563eb",
|
|
8091
|
+
train: "#1d4ed8",
|
|
8092
|
+
bird: "#14b8a6",
|
|
8093
|
+
dog: "#84cc16",
|
|
8094
|
+
cat: "#f97316",
|
|
8095
|
+
horse: "#a16207",
|
|
8096
|
+
sheep: "#a3a3a3",
|
|
8097
|
+
cow: "#78716c",
|
|
8098
|
+
elephant: "#6b7280",
|
|
8099
|
+
bear: "#7c2d12",
|
|
8100
|
+
zebra: "#404040",
|
|
8101
|
+
giraffe: "#d4a373"
|
|
8102
|
+
};
|
|
8103
|
+
function titleCase(id) {
|
|
8104
|
+
return id.split(/[-_ ]/).filter((p) => p.length > 0).map((p) => p.charAt(0).toUpperCase() + p.slice(1)).join(" ");
|
|
8105
|
+
}
|
|
8106
|
+
var entries = /* @__PURE__ */ new Map();
|
|
8107
|
+
function macro(kind, category, color, iconId, label) {
|
|
8108
|
+
entries.set(kind, {
|
|
8109
|
+
kind,
|
|
8110
|
+
parentKind: null,
|
|
8111
|
+
level: "macro",
|
|
8112
|
+
category,
|
|
8113
|
+
color,
|
|
8114
|
+
iconId,
|
|
8115
|
+
labelKey: `eventKind.${kind}`,
|
|
8116
|
+
label
|
|
8117
|
+
});
|
|
8118
|
+
}
|
|
8119
|
+
function sub(kind, parentKind, category, color, iconId, label) {
|
|
8120
|
+
entries.set(kind, {
|
|
8121
|
+
kind,
|
|
8122
|
+
parentKind,
|
|
8123
|
+
level: "sub",
|
|
8124
|
+
category,
|
|
8125
|
+
color,
|
|
8126
|
+
iconId,
|
|
8127
|
+
labelKey: `eventKind.${kind}`,
|
|
8128
|
+
label
|
|
8129
|
+
});
|
|
8130
|
+
}
|
|
8131
|
+
macro("motion", "motion", TAXONOMY_COLORS.motion, "motion", "Motion");
|
|
8132
|
+
macro("audio", "audio", TAXONOMY_COLORS.audio, "audio", "Audio");
|
|
8133
|
+
macro("person", "detection", TAXONOMY_COLORS.person, "person", "Person");
|
|
8134
|
+
macro("vehicle", "detection", TAXONOMY_COLORS.vehicle, "vehicle", "Vehicle");
|
|
8135
|
+
macro("animal", "detection", TAXONOMY_COLORS.animal, "animal", "Animal");
|
|
8136
|
+
macro("package", "package", TAXONOMY_COLORS.package, "package", "Package");
|
|
8137
|
+
macro("sensor", "sensor", TAXONOMY_COLORS.sensor, "sensor", "Sensor");
|
|
8138
|
+
macro("control", "control", TAXONOMY_COLORS.control, "control", "Control");
|
|
8139
|
+
for (const [cocoClass, macroClass] of Object.entries(COCO_TO_MACRO.mapping)) {
|
|
8140
|
+
if (macroClass !== "vehicle" && macroClass !== "animal") continue;
|
|
8141
|
+
if (entries.has(cocoClass)) continue;
|
|
8142
|
+
sub(cocoClass, macroClass, "detection", DETECTION_SUB_COLORS[cocoClass] ?? TAXONOMY_COLORS.genericDetection, cocoClass, titleCase(cocoClass));
|
|
8143
|
+
}
|
|
8144
|
+
sub("package-delivered", "package", "package", TAXONOMY_COLORS.package, "package", "Package delivered");
|
|
8145
|
+
sub("package-picked-up", "package", "package", TAXONOMY_COLORS.package, "package", "Package picked up");
|
|
8146
|
+
sub("contact", "sensor", "sensor", "#f59e0b", "door", "Contact");
|
|
8147
|
+
sub("motion-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "pir", "Motion sensor");
|
|
8148
|
+
sub("smoke", "sensor", "sensor", "#ef4444", "smoke", "Smoke");
|
|
8149
|
+
sub("flood", "sensor", "sensor", "#3b82f6", "water", "Water leak");
|
|
8150
|
+
sub("gas", "sensor", "sensor", "#ef4444", "gas", "Gas");
|
|
8151
|
+
sub("carbon-monoxide", "sensor", "sensor", "#dc2626", "smoke", "Carbon monoxide");
|
|
8152
|
+
sub("vibration", "sensor", "sensor", "#eab308", "vibration", "Vibration");
|
|
8153
|
+
sub("tamper", "sensor", "sensor", "#f97316", "tamper", "Tamper");
|
|
8154
|
+
sub("presence", "sensor", "sensor", "#22c55e", "presence", "Presence");
|
|
8155
|
+
sub("enum-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "generic", "Sensor state");
|
|
8156
|
+
sub("device-event", "sensor", "sensor", "#10b981", "button", "Device event");
|
|
8157
|
+
sub("lock", "control", "control", "#0ea5e9", "lock", "Lock");
|
|
8158
|
+
sub("switch", "control", "control", TAXONOMY_COLORS.control, "switch", "Switch");
|
|
8159
|
+
sub("siren", "control", "control", "#dc2626", "siren", "Siren");
|
|
8160
|
+
sub("button", "control", "control", "#10b981", "button", "Button");
|
|
8161
|
+
sub("doorbell", "control", "control", "#a855f7", "doorbell", "Doorbell");
|
|
8162
|
+
for (const l of AUDIO_MACRO_LABELS) {
|
|
8163
|
+
const kind = `audio-${l.id}`;
|
|
8164
|
+
if (entries.has(kind)) continue;
|
|
8165
|
+
sub(kind, "audio", "audio", TAXONOMY_COLORS.audio, kind, l.name);
|
|
8166
|
+
}
|
|
8167
|
+
/** The complete taxonomy dictionary, keyed by kind. */
|
|
8168
|
+
var EVENT_TAXONOMY = Object.freeze(Object.fromEntries(entries));
|
|
8169
|
+
/**
|
|
7897
8170
|
* Error types for the safe expression engine. Two distinct classes so callers
|
|
7898
8171
|
* can tell a compile-time (grammar) failure from a runtime (evaluation)
|
|
7899
8172
|
* failure — both are non-fatal to the host: read paths degrade to "skip link".
|
|
@@ -15843,17 +16116,30 @@ var EventKindCategorySchema = _enum([
|
|
|
15843
16116
|
"audio",
|
|
15844
16117
|
"detection",
|
|
15845
16118
|
"sensor",
|
|
16119
|
+
"control",
|
|
15846
16120
|
"custom",
|
|
15847
16121
|
"package"
|
|
15848
16122
|
]);
|
|
16123
|
+
/** Taxonomy level — macro (timeline lane) vs sub (events-page leaf). */
|
|
16124
|
+
var EventKindLevelSchema = _enum(["macro", "sub"]);
|
|
15849
16125
|
var EventKindDescriptorSchema = object({
|
|
15850
|
-
/** Stable kind id (e.g. 'motion', '
|
|
16126
|
+
/** Stable kind id (e.g. 'motion', 'vehicle', 'car', 'lock'). */
|
|
15851
16127
|
kind: string(),
|
|
16128
|
+
/** i18n key resolved on the UI side; `label` is the English fallback. */
|
|
16129
|
+
labelKey: string(),
|
|
16130
|
+
/** English fallback label (kept for clients that don't translate). */
|
|
15852
16131
|
label: string(),
|
|
15853
16132
|
/** Hex color for timeline/legend rendering. */
|
|
15854
16133
|
color: string(),
|
|
16134
|
+
/** Dictionary id → lucide component on the UI side. */
|
|
16135
|
+
iconId: string(),
|
|
16136
|
+
/** Legacy closed-vocab glyph — fallback for `iconId`. */
|
|
15855
16137
|
icon: EventKindIconSchema,
|
|
15856
16138
|
category: EventKindCategorySchema,
|
|
16139
|
+
/** Macro parent for this kind ('car' → 'vehicle'); null for a macro. */
|
|
16140
|
+
parentKind: string().nullable(),
|
|
16141
|
+
/** Derived from `parentKind`, explicit for the client tree. */
|
|
16142
|
+
level: EventKindLevelSchema,
|
|
15857
16143
|
/** Which cap + device contributes this kind. For built-ins the camera
|
|
15858
16144
|
* itself; for sensor kinds the LINKED source device. */
|
|
15859
16145
|
source: object({
|
|
@@ -15926,11 +16212,21 @@ var TrackAudioLabelSchema = object({
|
|
|
15926
16212
|
firstAt: number(),
|
|
15927
16213
|
lastAt: number()
|
|
15928
16214
|
});
|
|
16215
|
+
/**
|
|
16216
|
+
* How a track was produced. `pipeline` (default / absent) = the spatial
|
|
16217
|
+
* detection+tracking pipeline. `sensor` = a SYNTHETIC track projected from a
|
|
16218
|
+
* linked sensor/control state change (no positions; carries a snapshot). The
|
|
16219
|
+
* spatial subsystems (tracker association, occupancy count, re-id/embedding,
|
|
16220
|
+
* resurrection) MUST skip `sensor` tracks — they have no bbox trajectory.
|
|
16221
|
+
*/
|
|
16222
|
+
var TrackSourceSchema = _enum(["pipeline", "sensor"]);
|
|
15929
16223
|
var TrackSchema = object({
|
|
15930
16224
|
trackId: string(),
|
|
15931
16225
|
deviceId: number(),
|
|
15932
16226
|
className: string(),
|
|
15933
16227
|
label: string().optional(),
|
|
16228
|
+
/** Track provenance. Absent ⇒ `pipeline` (legacy rows). */
|
|
16229
|
+
source: TrackSourceSchema.optional(),
|
|
15934
16230
|
firstSeen: number(),
|
|
15935
16231
|
lastSeen: number(),
|
|
15936
16232
|
/** Frame-rate position history (subject to maxPositionHistory cap). */
|
|
@@ -16307,6 +16603,76 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
16307
16603
|
eventId: string(),
|
|
16308
16604
|
timestamp: number()
|
|
16309
16605
|
});
|
|
16606
|
+
/**
|
|
16607
|
+
* Cap → event-kind mapping for the SENSOR / CONTROL cap families — the table
|
|
16608
|
+
* `pipeline-analytics.listEventKinds` uses to turn a linked device's bound
|
|
16609
|
+
* caps into per-camera event-kind descriptors.
|
|
16610
|
+
*
|
|
16611
|
+
* The descriptor DATA (color / iconId / labelKey / parentKind / category)
|
|
16612
|
+
* is NOT duplicated here — every entry is derived from the single
|
|
16613
|
+
* `EVENT_TAXONOMY` dictionary (`catalogs/event-taxonomy.ts`). This file owns
|
|
16614
|
+
* ONLY the cap-name → taxonomy-kind mapping. Adding a new eventful sensor /
|
|
16615
|
+
* control cap means adding one line here (and a taxonomy entry); the anti-
|
|
16616
|
+
* drift guard `scripts/check-event-kind-coverage.ts` fails the build if an
|
|
16617
|
+
* eventful cap is missing.
|
|
16618
|
+
*/
|
|
16619
|
+
/** Map a taxonomy `iconId` onto the legacy closed `EventKindIcon` enum. */
|
|
16620
|
+
var LEGACY_ICON = {
|
|
16621
|
+
motion: "motion",
|
|
16622
|
+
audio: "audio",
|
|
16623
|
+
person: "person",
|
|
16624
|
+
vehicle: "vehicle",
|
|
16625
|
+
animal: "animal",
|
|
16626
|
+
package: "package",
|
|
16627
|
+
door: "door",
|
|
16628
|
+
pir: "pir",
|
|
16629
|
+
smoke: "smoke",
|
|
16630
|
+
water: "water",
|
|
16631
|
+
button: "button",
|
|
16632
|
+
generic: "generic",
|
|
16633
|
+
gas: "smoke",
|
|
16634
|
+
vibration: "generic",
|
|
16635
|
+
tamper: "generic",
|
|
16636
|
+
presence: "person",
|
|
16637
|
+
lock: "generic",
|
|
16638
|
+
siren: "generic",
|
|
16639
|
+
switch: "generic",
|
|
16640
|
+
doorbell: "button"
|
|
16641
|
+
};
|
|
16642
|
+
function legacyIcon(iconId) {
|
|
16643
|
+
return LEGACY_ICON[iconId] ?? "generic";
|
|
16644
|
+
}
|
|
16645
|
+
/**
|
|
16646
|
+
* Cap name → taxonomy kind id. Covers EVERY eventful sensor / control cap.
|
|
16647
|
+
* The anti-drift guard cross-checks this against the eventful caps declared
|
|
16648
|
+
* in `packages/types/src/capabilities/*.cap.ts`.
|
|
16649
|
+
*/
|
|
16650
|
+
var CAP_TO_KIND = {
|
|
16651
|
+
contact: "contact",
|
|
16652
|
+
motion: "motion-sensor",
|
|
16653
|
+
smoke: "smoke",
|
|
16654
|
+
flood: "flood",
|
|
16655
|
+
gas: "gas",
|
|
16656
|
+
"carbon-monoxide": "carbon-monoxide",
|
|
16657
|
+
vibration: "vibration",
|
|
16658
|
+
tamper: "tamper",
|
|
16659
|
+
presence: "presence",
|
|
16660
|
+
"enum-sensor": "enum-sensor",
|
|
16661
|
+
"event-emitter": "device-event",
|
|
16662
|
+
"lock-control": "lock",
|
|
16663
|
+
switch: "switch",
|
|
16664
|
+
button: "button",
|
|
16665
|
+
doorbell: "doorbell"
|
|
16666
|
+
};
|
|
16667
|
+
function buildDescriptor(capName, kind) {
|
|
16668
|
+
const t = EVENT_TAXONOMY[kind];
|
|
16669
|
+
if (t === void 0) throw new Error(`EVENT_KIND_BY_CAP: cap '${capName}' maps to unknown taxonomy kind '${kind}'`);
|
|
16670
|
+
return {
|
|
16671
|
+
...t,
|
|
16672
|
+
icon: legacyIcon(t.iconId)
|
|
16673
|
+
};
|
|
16674
|
+
}
|
|
16675
|
+
Object.freeze(Object.fromEntries(Object.entries(CAP_TO_KIND).map(([capName, kind]) => [capName, buildDescriptor(capName, kind)])));
|
|
16310
16676
|
var CameraPipelineConfigSchema = object({
|
|
16311
16677
|
engine: PipelineEngineChoiceSchema.optional(),
|
|
16312
16678
|
steps: array(PipelineStepInputSchema).readonly(),
|
package/dist/webdav.addon.js
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_shared = require("./shared-
|
|
5
|
+
const require_shared = require("./shared-CZDYRlzo.js");
|
|
6
6
|
let node_stream = require("node:stream");
|
|
7
7
|
let webdav = require("webdav");
|
|
8
8
|
//#region src/providers/webdav/webdav-config-schema.ts
|
package/dist/webdav.addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-
|
|
1
|
+
import { a as safeJoinRemotePath, c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, r as getRequiredBasePath, s as storageProviderCapability, t as createSessionId } from "./shared-DW5ccoQG.mjs";
|
|
2
2
|
import { PassThrough } from "node:stream";
|
|
3
3
|
import { AuthType, createClient } from "webdav";
|
|
4
4
|
//#region src/providers/webdav/webdav-config-schema.ts
|
package/package.json
CHANGED