@camstack/types 0.1.8 → 0.1.11

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.
Files changed (199) hide show
  1. package/dist/__tests__/addon-capability-provider.test.d.ts +2 -0
  2. package/dist/__tests__/addon-capability-provider.test.d.ts.map +1 -0
  3. package/dist/__tests__/addon-declaration.test.d.ts +2 -0
  4. package/dist/__tests__/addon-declaration.test.d.ts.map +1 -0
  5. package/dist/__tests__/capability.test.d.ts +2 -0
  6. package/dist/__tests__/capability.test.d.ts.map +1 -0
  7. package/dist/catalogs/coco-classmap.d.ts +5 -0
  8. package/dist/catalogs/coco-classmap.d.ts.map +1 -0
  9. package/dist/catalogs/index.d.ts +2 -0
  10. package/dist/catalogs/index.d.ts.map +1 -0
  11. package/dist/constants.d.ts +3 -0
  12. package/dist/constants.d.ts.map +1 -0
  13. package/dist/generated/addon-api.d.ts +4974 -0
  14. package/dist/generated/addon-api.d.ts.map +1 -0
  15. package/dist/index.d.ts +82 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +550 -744
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +529 -777
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/interfaces/addon-i18n.d.ts +41 -0
  22. package/dist/interfaces/addon-i18n.d.ts.map +1 -0
  23. package/dist/interfaces/addon-routes.d.ts +50 -0
  24. package/dist/interfaces/addon-routes.d.ts.map +1 -0
  25. package/dist/interfaces/addon.d.ts +294 -0
  26. package/dist/interfaces/addon.d.ts.map +1 -0
  27. package/dist/interfaces/advanced-notifier.d.ts +59 -0
  28. package/dist/interfaces/advanced-notifier.d.ts.map +1 -0
  29. package/dist/interfaces/agent-protocol.d.ts +189 -0
  30. package/dist/interfaces/agent-protocol.d.ts.map +1 -0
  31. package/dist/interfaces/agent.d.ts +87 -0
  32. package/dist/interfaces/agent.d.ts.map +1 -0
  33. package/dist/interfaces/analysis-persistence.d.ts +278 -0
  34. package/dist/interfaces/analysis-persistence.d.ts.map +1 -0
  35. package/dist/interfaces/analysis.d.ts +27 -0
  36. package/dist/interfaces/analysis.d.ts.map +1 -0
  37. package/dist/interfaces/api-shared.d.ts +176 -0
  38. package/dist/interfaces/api-shared.d.ts.map +1 -0
  39. package/dist/interfaces/auth-provider.d.ts +39 -0
  40. package/dist/interfaces/auth-provider.d.ts.map +1 -0
  41. package/dist/interfaces/auth.d.ts +47 -0
  42. package/dist/interfaces/auth.d.ts.map +1 -0
  43. package/dist/interfaces/camera-pipeline.d.ts +121 -0
  44. package/dist/interfaces/camera-pipeline.d.ts.map +1 -0
  45. package/dist/interfaces/capability.d.ts +84 -0
  46. package/dist/interfaces/capability.d.ts.map +1 -0
  47. package/dist/interfaces/classifier.d.ts +8 -0
  48. package/dist/interfaces/classifier.d.ts.map +1 -0
  49. package/dist/interfaces/config-ui.d.ts +152 -0
  50. package/dist/interfaces/config-ui.d.ts.map +1 -0
  51. package/dist/interfaces/context.d.ts +44 -0
  52. package/dist/interfaces/context.d.ts.map +1 -0
  53. package/dist/interfaces/cropper.d.ts +8 -0
  54. package/dist/interfaces/cropper.d.ts.map +1 -0
  55. package/dist/interfaces/decoder.d.ts +27 -0
  56. package/dist/interfaces/decoder.d.ts.map +1 -0
  57. package/dist/interfaces/detection-addon.d.ts +15 -0
  58. package/dist/interfaces/detection-addon.d.ts.map +1 -0
  59. package/dist/interfaces/detector.d.ts +8 -0
  60. package/dist/interfaces/detector.d.ts.map +1 -0
  61. package/dist/interfaces/device-capabilities/accessory.d.ts +14 -0
  62. package/dist/interfaces/device-capabilities/accessory.d.ts.map +1 -0
  63. package/dist/interfaces/device-capabilities/audio-detector.d.ts +12 -0
  64. package/dist/interfaces/device-capabilities/audio-detector.d.ts.map +1 -0
  65. package/dist/interfaces/device-capabilities/camera.d.ts +22 -0
  66. package/dist/interfaces/device-capabilities/camera.d.ts.map +1 -0
  67. package/dist/interfaces/device-capabilities/doorbell.d.ts +10 -0
  68. package/dist/interfaces/device-capabilities/doorbell.d.ts.map +1 -0
  69. package/dist/interfaces/device-capabilities/events.d.ts +47 -0
  70. package/dist/interfaces/device-capabilities/events.d.ts.map +1 -0
  71. package/dist/interfaces/device-capabilities/index.d.ts +15 -0
  72. package/dist/interfaces/device-capabilities/index.d.ts.map +1 -0
  73. package/dist/interfaces/device-capabilities/motion-sensor.d.ts +7 -0
  74. package/dist/interfaces/device-capabilities/motion-sensor.d.ts.map +1 -0
  75. package/dist/interfaces/device-capabilities/native-detection.d.ts +14 -0
  76. package/dist/interfaces/device-capabilities/native-detection.d.ts.map +1 -0
  77. package/dist/interfaces/device-capabilities/object-detector.d.ts +59 -0
  78. package/dist/interfaces/device-capabilities/object-detector.d.ts.map +1 -0
  79. package/dist/interfaces/device-capabilities/pan-tilt-zoom.d.ts +29 -0
  80. package/dist/interfaces/device-capabilities/pan-tilt-zoom.d.ts.map +1 -0
  81. package/dist/interfaces/device-capabilities/recording.d.ts +18 -0
  82. package/dist/interfaces/device-capabilities/recording.d.ts.map +1 -0
  83. package/dist/interfaces/device-capabilities/siren.d.ts +8 -0
  84. package/dist/interfaces/device-capabilities/siren.d.ts.map +1 -0
  85. package/dist/interfaces/device-capabilities/status-light.d.ts +7 -0
  86. package/dist/interfaces/device-capabilities/status-light.d.ts.map +1 -0
  87. package/dist/interfaces/device-capabilities/switch.d.ts +8 -0
  88. package/dist/interfaces/device-capabilities/switch.d.ts.map +1 -0
  89. package/dist/interfaces/device-capabilities/two-way-audio.d.ts +8 -0
  90. package/dist/interfaces/device-capabilities/two-way-audio.d.ts.map +1 -0
  91. package/dist/interfaces/device-capability.d.ts +14 -0
  92. package/dist/interfaces/device-capability.d.ts.map +1 -0
  93. package/dist/interfaces/device-provider.d.ts +43 -0
  94. package/dist/interfaces/device-provider.d.ts.map +1 -0
  95. package/dist/interfaces/device.d.ts +40 -0
  96. package/dist/interfaces/device.d.ts.map +1 -0
  97. package/dist/interfaces/event-bus.d.ts +244 -0
  98. package/dist/interfaces/event-bus.d.ts.map +1 -0
  99. package/dist/interfaces/feature-flags.d.ts +14 -0
  100. package/dist/interfaces/feature-flags.d.ts.map +1 -0
  101. package/dist/interfaces/ffmpeg.d.ts +10 -0
  102. package/dist/interfaces/ffmpeg.d.ts.map +1 -0
  103. package/dist/interfaces/inference-capabilities.d.ts +101 -0
  104. package/dist/interfaces/inference-capabilities.d.ts.map +1 -0
  105. package/dist/interfaces/inference-engine.d.ts +17 -0
  106. package/dist/interfaces/inference-engine.d.ts.map +1 -0
  107. package/dist/interfaces/lifecycle.d.ts +19 -0
  108. package/dist/interfaces/lifecycle.d.ts.map +1 -0
  109. package/dist/interfaces/logging.d.ts +33 -0
  110. package/dist/interfaces/logging.d.ts.map +1 -0
  111. package/dist/interfaces/model-catalog.d.ts +25 -0
  112. package/dist/interfaces/model-catalog.d.ts.map +1 -0
  113. package/dist/interfaces/network-quality.d.ts +25 -0
  114. package/dist/interfaces/network-quality.d.ts.map +1 -0
  115. package/dist/interfaces/network.d.ts +43 -0
  116. package/dist/interfaces/network.d.ts.map +1 -0
  117. package/dist/interfaces/notification.d.ts +53 -0
  118. package/dist/interfaces/notification.d.ts.map +1 -0
  119. package/dist/interfaces/pipeline-runner.d.ts +23 -0
  120. package/dist/interfaces/pipeline-runner.d.ts.map +1 -0
  121. package/dist/interfaces/pipeline-slot.d.ts +10 -0
  122. package/dist/interfaces/pipeline-slot.d.ts.map +1 -0
  123. package/dist/interfaces/platform.d.ts +55 -0
  124. package/dist/interfaces/platform.d.ts.map +1 -0
  125. package/dist/interfaces/process.d.ts +41 -0
  126. package/dist/interfaces/process.d.ts.map +1 -0
  127. package/dist/interfaces/python-env.d.ts +20 -0
  128. package/dist/interfaces/python-env.d.ts.map +1 -0
  129. package/dist/interfaces/refiner.d.ts +8 -0
  130. package/dist/interfaces/refiner.d.ts.map +1 -0
  131. package/dist/interfaces/repl.d.ts +26 -0
  132. package/dist/interfaces/repl.d.ts.map +1 -0
  133. package/dist/interfaces/repositories.d.ts +20 -0
  134. package/dist/interfaces/repositories.d.ts.map +1 -0
  135. package/dist/interfaces/restreamer.d.ts +24 -0
  136. package/dist/interfaces/restreamer.d.ts.map +1 -0
  137. package/dist/interfaces/router.d.ts +30 -0
  138. package/dist/interfaces/router.d.ts.map +1 -0
  139. package/dist/interfaces/scene-intelligence.d.ts +21 -0
  140. package/dist/interfaces/scene-intelligence.d.ts.map +1 -0
  141. package/dist/interfaces/scoped-token.d.ts +22 -0
  142. package/dist/interfaces/scoped-token.d.ts.map +1 -0
  143. package/dist/interfaces/server-analysis.d.ts +146 -0
  144. package/dist/interfaces/server-analysis.d.ts.map +1 -0
  145. package/dist/interfaces/server-network.d.ts +78 -0
  146. package/dist/interfaces/server-network.d.ts.map +1 -0
  147. package/dist/interfaces/storage-backend.d.ts +27 -0
  148. package/dist/interfaces/storage-backend.d.ts.map +1 -0
  149. package/dist/interfaces/storage.d.ts +174 -0
  150. package/dist/interfaces/storage.d.ts.map +1 -0
  151. package/dist/interfaces/stream-broker.d.ts +92 -0
  152. package/dist/interfaces/stream-broker.d.ts.map +1 -0
  153. package/dist/interfaces/streaming.d.ts +29 -0
  154. package/dist/interfaces/streaming.d.ts.map +1 -0
  155. package/dist/interfaces/task-handler.d.ts +46 -0
  156. package/dist/interfaces/task-handler.d.ts.map +1 -0
  157. package/dist/interfaces/webrtc-provider.d.ts +11 -0
  158. package/dist/interfaces/webrtc-provider.d.ts.map +1 -0
  159. package/dist/interfaces/worker-protocol.d.ts +110 -0
  160. package/dist/interfaces/worker-protocol.d.ts.map +1 -0
  161. package/dist/schemas/system-settings-schemas.d.ts +27 -0
  162. package/dist/schemas/system-settings-schemas.d.ts.map +1 -0
  163. package/dist/types/analytics.d.ts +75 -0
  164. package/dist/types/analytics.d.ts.map +1 -0
  165. package/dist/types/benchmark.d.ts +112 -0
  166. package/dist/types/benchmark.d.ts.map +1 -0
  167. package/dist/types/camera-detection.d.ts +34 -0
  168. package/dist/types/camera-detection.d.ts.map +1 -0
  169. package/dist/types/config.d.ts +37 -0
  170. package/dist/types/config.d.ts.map +1 -0
  171. package/dist/types/detection.d.ts +93 -0
  172. package/dist/types/detection.d.ts.map +1 -0
  173. package/dist/types/device-type.d.ts +10 -0
  174. package/dist/types/device-type.d.ts.map +1 -0
  175. package/dist/types/entities.d.ts +35 -0
  176. package/dist/types/entities.d.ts.map +1 -0
  177. package/dist/types/events.d.ts +35 -0
  178. package/dist/types/events.d.ts.map +1 -0
  179. package/dist/types/io.d.ts +25 -0
  180. package/dist/types/io.d.ts.map +1 -0
  181. package/dist/types/labels.d.ts +12 -0
  182. package/dist/types/labels.d.ts.map +1 -0
  183. package/dist/types/live-state.d.ts +47 -0
  184. package/dist/types/live-state.d.ts.map +1 -0
  185. package/dist/types/models.d.ts +79 -0
  186. package/dist/types/models.d.ts.map +1 -0
  187. package/dist/types/pipeline-schema.d.ts +78 -0
  188. package/dist/types/pipeline-schema.d.ts.map +1 -0
  189. package/dist/types/pipeline.d.ts +42 -0
  190. package/dist/types/pipeline.d.ts.map +1 -0
  191. package/dist/types/tracked.d.ts +21 -0
  192. package/dist/types/tracked.d.ts.map +1 -0
  193. package/dist/types/zones.d.ts +48 -0
  194. package/dist/types/zones.d.ts.map +1 -0
  195. package/dist/utils/cosine-similarity.d.ts +3 -0
  196. package/dist/utils/cosine-similarity.d.ts.map +1 -0
  197. package/dist/utils/hf-url.d.ts +2 -0
  198. package/dist/utils/hf-url.d.ts.map +1 -0
  199. package/package.json +5 -5
package/dist/index.mjs CHANGED
@@ -1,825 +1,577 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
1
+ // src/interfaces/storage-backend.ts
2
+ var DEFAULT_LOCATION_SUBPATHS = {
3
+ "recordings-high": "recordings-high",
4
+ "recordings-low": "recordings-low",
5
+ "recordings-clips": "recordings-clips",
6
+ "event-images": "event-images",
7
+ "models": "models",
8
+ "addons-data": "addons-data",
9
+ "cache": "/tmp/camstack-cache",
10
+ "logs": "logs"
9
11
  };
10
- var __export = (target, all) => {
11
- for (var name in all)
12
- __defProp(target, name, { get: all[name], enumerable: true });
13
- };
14
- var __copyProps = (to, from, except, desc) => {
15
- if (from && typeof from === "object" || typeof from === "function") {
16
- for (let key of __getOwnPropNames(from))
17
- if (!__hasOwnProp.call(to, key) && key !== except)
18
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
- }
20
- return to;
21
- };
22
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
23
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
- // If the importer is in node compatibility mode or this is not an ESM
25
- // file that has been converted to a CommonJS file using a Babel-
26
- // compatible transform (i.e. "__esModule" has not been set), then set
27
- // "default" to the CommonJS "module.exports" for node compatibility.
28
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
- mod
30
- ));
31
-
32
- // src/types/io.js
33
- var require_io = __commonJS({
34
- "src/types/io.js"(exports) {
35
- "use strict";
36
- Object.defineProperty(exports, "__esModule", { value: true });
37
- }
38
- });
39
-
40
- // src/types/labels.js
41
- var require_labels = __commonJS({
42
- "src/types/labels.js"(exports) {
43
- "use strict";
44
- Object.defineProperty(exports, "__esModule", { value: true });
45
- }
46
- });
47
-
48
- // src/types/detection.js
49
- var require_detection = __commonJS({
50
- "src/types/detection.js"(exports) {
51
- "use strict";
52
- Object.defineProperty(exports, "__esModule", { value: true });
53
- }
54
- });
55
-
56
- // src/types/tracked.js
57
- var require_tracked = __commonJS({
58
- "src/types/tracked.js"(exports) {
59
- "use strict";
60
- Object.defineProperty(exports, "__esModule", { value: true });
61
- }
62
- });
63
-
64
- // src/types/events.js
65
- var require_events = __commonJS({
66
- "src/types/events.js"(exports) {
67
- "use strict";
68
- Object.defineProperty(exports, "__esModule", { value: true });
69
- }
70
- });
71
-
72
- // src/types/config.js
73
- var require_config = __commonJS({
74
- "src/types/config.js"(exports) {
75
- "use strict";
76
- Object.defineProperty(exports, "__esModule", { value: true });
77
- }
78
- });
79
12
 
80
- // src/types/entities.js
81
- var require_entities = __commonJS({
82
- "src/types/entities.js"(exports) {
83
- "use strict";
84
- Object.defineProperty(exports, "__esModule", { value: true });
85
- }
86
- });
87
-
88
- // src/types/zones.js
89
- var require_zones = __commonJS({
90
- "src/types/zones.js"(exports) {
91
- "use strict";
92
- Object.defineProperty(exports, "__esModule", { value: true });
13
+ // src/interfaces/addon-i18n.ts
14
+ function resolveTranslation(provider, locale, key) {
15
+ if (provider.getTranslations) {
16
+ const map = provider.getTranslations(locale);
17
+ if (map && key in map) return map[key];
18
+ if (locale !== "en") {
19
+ const fallback = provider.getTranslations("en");
20
+ if (fallback && key in fallback) return fallback[key];
21
+ }
93
22
  }
94
- });
95
-
96
- // src/types/models.js
97
- var require_models = __commonJS({
98
- "src/types/models.js"(exports) {
99
- "use strict";
100
- Object.defineProperty(exports, "__esModule", { value: true });
23
+ if (provider.getTranslationBundle) {
24
+ const bundle = provider.getTranslationBundle();
25
+ const map = bundle[locale];
26
+ if (map && key in map) return map[key];
27
+ if (locale !== "en") {
28
+ const fallback = bundle["en"];
29
+ if (fallback && key in fallback) return fallback[key];
30
+ }
101
31
  }
102
- });
32
+ return key;
33
+ }
103
34
 
104
- // src/types/pipeline.js
105
- var require_pipeline = __commonJS({
106
- "src/types/pipeline.js"(exports) {
107
- "use strict";
108
- Object.defineProperty(exports, "__esModule", { value: true });
109
- }
110
- });
35
+ // src/interfaces/feature-flags.ts
36
+ var DEFAULT_FEATURES = {
37
+ streaming: true,
38
+ notifications: true,
39
+ objectDetection: false,
40
+ remoteAccess: true,
41
+ agentCluster: false,
42
+ smartHome: true,
43
+ recordings: true,
44
+ backup: true,
45
+ repl: true
46
+ };
111
47
 
112
- // src/types/live-state.js
113
- var require_live_state = __commonJS({
114
- "src/types/live-state.js"(exports) {
115
- "use strict";
116
- Object.defineProperty(exports, "__esModule", { value: true });
117
- }
118
- });
48
+ // src/interfaces/agent-protocol.ts
49
+ var BINARY_FRAME_HEADER_SIZE = 29;
50
+ var BINARY_FRAME_TYPE = 1;
119
51
 
120
- // src/types/analytics.js
121
- var require_analytics = __commonJS({
122
- "src/types/analytics.js"(exports) {
123
- "use strict";
124
- Object.defineProperty(exports, "__esModule", { value: true });
125
- }
126
- });
52
+ // src/interfaces/server-analysis.ts
53
+ var DETECTION_TYPES = ["person", "vehicle", "animal", "package"];
54
+ var SUB_DETECTION_TYPES = ["face", "plate"];
55
+ var RECOGNITION_TYPES = ["face", "plate", "clip", "custom"];
56
+ function createAnalysisContext(deviceId, frame, rawDetections) {
57
+ return {
58
+ deviceId,
59
+ frame,
60
+ timestamp: frame.timestamp,
61
+ rawDetections,
62
+ trackedDetections: [],
63
+ events: [],
64
+ metadata: {}
65
+ };
66
+ }
67
+ function enrichContext(ctx, updates) {
68
+ return {
69
+ ...ctx,
70
+ trackedDetections: updates.trackedDetections ?? ctx.trackedDetections,
71
+ events: updates.events ?? ctx.events,
72
+ metadata: updates.metadata ? { ...ctx.metadata, ...updates.metadata } : ctx.metadata
73
+ };
74
+ }
127
75
 
128
- // src/interfaces/storage-backend.js
129
- var require_storage_backend = __commonJS({
130
- "src/interfaces/storage-backend.js"(exports) {
131
- "use strict";
132
- Object.defineProperty(exports, "__esModule", { value: true });
133
- exports.DEFAULT_LOCATION_SUBPATHS = void 0;
134
- exports.DEFAULT_LOCATION_SUBPATHS = {
135
- "recordings-high": "recordings-high",
136
- "recordings-low": "recordings-low",
137
- "recordings-clips": "recordings-clips",
138
- "event-images": "event-images",
139
- "models": "models",
140
- "addons-data": "addons-data",
141
- "cache": "/tmp/camstack-cache",
142
- "logs": "logs"
143
- };
144
- }
145
- });
76
+ // src/interfaces/analysis-persistence.ts
77
+ var DEFAULT_RETENTION = {
78
+ cleanupIntervalMs: 60 * 60 * 1e3,
79
+ detectionEventsDays: 30,
80
+ audioLevelsDays: 7,
81
+ snapshotsDays: 14
82
+ };
146
83
 
147
- // src/interfaces/addon-i18n.js
148
- var require_addon_i18n = __commonJS({
149
- "src/interfaces/addon-i18n.js"(exports) {
150
- "use strict";
151
- Object.defineProperty(exports, "__esModule", { value: true });
152
- exports.resolveTranslation = resolveTranslation2;
153
- function resolveTranslation2(provider, locale, key) {
154
- if (provider.getTranslations) {
155
- const map = provider.getTranslations(locale);
156
- if (map && key in map)
157
- return map[key];
158
- if (locale !== "en") {
159
- const fallback = provider.getTranslations("en");
160
- if (fallback && key in fallback)
161
- return fallback[key];
162
- }
163
- }
164
- if (provider.getTranslationBundle) {
165
- const bundle = provider.getTranslationBundle();
166
- const map = bundle[locale];
167
- if (map && key in map)
168
- return map[key];
169
- if (locale !== "en") {
170
- const fallback = bundle["en"];
171
- if (fallback && key in fallback)
172
- return fallback[key];
84
+ // src/schemas/system-settings-schemas.ts
85
+ var READ_ONLY_SECTIONS = /* @__PURE__ */ new Set([
86
+ "server"
87
+ ]);
88
+ var SETTINGS_TABS = [
89
+ { id: "server", label: "Server" },
90
+ { id: "logging", label: "Logs" },
91
+ { id: "recording", label: "Recording" },
92
+ { id: "ffmpeg", label: "FFmpeg" },
93
+ { id: "detection", label: "Detection" },
94
+ { id: "auth", label: "Auth" },
95
+ { id: "retention", label: "Retention" }
96
+ ];
97
+ var SERVER_SCHEMA = {
98
+ sections: [
99
+ {
100
+ id: "server-info",
101
+ title: "Server",
102
+ description: "Core server connection settings (read-only)",
103
+ columns: 2,
104
+ fields: [
105
+ {
106
+ type: "info",
107
+ key: "server-restart-note",
108
+ label: "Restart required",
109
+ content: "Server settings are read-only. Change them in config.yaml and restart.",
110
+ variant: "warning"
111
+ },
112
+ {
113
+ type: "text",
114
+ key: "port",
115
+ label: "Port",
116
+ disabled: true,
117
+ description: "Listening port"
118
+ },
119
+ {
120
+ type: "text",
121
+ key: "host",
122
+ label: "Host",
123
+ disabled: true,
124
+ description: "Bind address"
125
+ },
126
+ {
127
+ type: "text",
128
+ key: "dataPath",
129
+ label: "Data Path",
130
+ disabled: true,
131
+ description: "Root data directory",
132
+ span: 2
173
133
  }
174
- }
175
- return key;
176
- }
177
- }
178
- });
179
-
180
- // src/interfaces/feature-flags.js
181
- var require_feature_flags = __commonJS({
182
- "src/interfaces/feature-flags.js"(exports) {
183
- "use strict";
184
- Object.defineProperty(exports, "__esModule", { value: true });
185
- exports.DEFAULT_FEATURES = void 0;
186
- exports.DEFAULT_FEATURES = {
187
- streaming: true,
188
- notifications: true,
189
- objectDetection: false,
190
- remoteAccess: true,
191
- agentCluster: false,
192
- smartHome: true,
193
- recordings: true,
194
- backup: true,
195
- repl: true
196
- };
197
- }
198
- });
199
-
200
- // src/interfaces/agent-protocol.js
201
- var require_agent_protocol = __commonJS({
202
- "src/interfaces/agent-protocol.js"(exports) {
203
- "use strict";
204
- Object.defineProperty(exports, "__esModule", { value: true });
205
- exports.BINARY_FRAME_TYPE = exports.BINARY_FRAME_HEADER_SIZE = void 0;
206
- exports.BINARY_FRAME_HEADER_SIZE = 29;
207
- exports.BINARY_FRAME_TYPE = 1;
208
- }
209
- });
210
-
211
- // src/interfaces/server-analysis.js
212
- var require_server_analysis = __commonJS({
213
- "src/interfaces/server-analysis.js"(exports) {
214
- "use strict";
215
- Object.defineProperty(exports, "__esModule", { value: true });
216
- exports.RECOGNITION_TYPES = exports.SUB_DETECTION_TYPES = exports.DETECTION_TYPES = void 0;
217
- exports.createAnalysisContext = createAnalysisContext;
218
- exports.enrichContext = enrichContext;
219
- exports.DETECTION_TYPES = ["person", "vehicle", "animal", "package"];
220
- exports.SUB_DETECTION_TYPES = ["face", "plate"];
221
- exports.RECOGNITION_TYPES = ["face", "plate", "clip", "custom"];
222
- function createAnalysisContext(deviceId, frame, rawDetections) {
223
- return {
224
- deviceId,
225
- frame,
226
- timestamp: frame.timestamp,
227
- rawDetections,
228
- trackedDetections: [],
229
- events: [],
230
- metadata: {}
231
- };
232
- }
233
- function enrichContext(ctx, updates) {
234
- return {
235
- ...ctx,
236
- trackedDetections: updates.trackedDetections ?? ctx.trackedDetections,
237
- events: updates.events ?? ctx.events,
238
- metadata: updates.metadata ? { ...ctx.metadata, ...updates.metadata } : ctx.metadata
239
- };
134
+ ]
240
135
  }
241
- }
242
- });
243
-
244
- // src/interfaces/analysis-persistence.js
245
- var require_analysis_persistence = __commonJS({
246
- "src/interfaces/analysis-persistence.js"(exports) {
247
- "use strict";
248
- Object.defineProperty(exports, "__esModule", { value: true });
249
- exports.DEFAULT_RETENTION = void 0;
250
- exports.DEFAULT_RETENTION = {
251
- cleanupIntervalMs: 60 * 60 * 1e3,
252
- detectionEventsDays: 30,
253
- audioLevelsDays: 7,
254
- snapshotsDays: 14
255
- };
256
- }
257
- });
258
-
259
- // src/schemas/system-settings-schemas.js
260
- var require_system_settings_schemas = __commonJS({
261
- "src/schemas/system-settings-schemas.js"(exports) {
262
- "use strict";
263
- Object.defineProperty(exports, "__esModule", { value: true });
264
- exports.SYSTEM_SETTINGS_SCHEMAS = exports.SETTINGS_TABS = exports.READ_ONLY_SECTIONS = void 0;
265
- exports.getSystemSettingsSchema = getSystemSettingsSchema;
266
- exports.READ_ONLY_SECTIONS = /* @__PURE__ */ new Set([
267
- "server"
268
- ]);
269
- exports.SETTINGS_TABS = [
270
- { id: "server", label: "Server" },
271
- { id: "logging", label: "Logs" },
272
- { id: "recording", label: "Recording" },
273
- { id: "ffmpeg", label: "FFmpeg" },
274
- { id: "detection", label: "Detection" },
275
- { id: "auth", label: "Auth" },
276
- { id: "retention", label: "Retention" }
277
- ];
278
- var SERVER_SCHEMA = {
279
- sections: [
136
+ ]
137
+ };
138
+ var STORAGE_SCHEMA = {
139
+ sections: []
140
+ };
141
+ var LOGGING_SCHEMA = {
142
+ sections: [
143
+ {
144
+ id: "logging-settings",
145
+ title: "Logging",
146
+ description: "Global log verbosity. Retention is managed per log-destination addon.",
147
+ columns: 1,
148
+ fields: [
280
149
  {
281
- id: "server-info",
282
- title: "Server",
283
- description: "Core server connection settings (read-only)",
284
- columns: 2,
285
- fields: [
286
- {
287
- type: "info",
288
- key: "server-restart-note",
289
- label: "Restart required",
290
- content: "Server settings are read-only. Change them in config.yaml and restart.",
291
- variant: "warning"
292
- },
293
- {
294
- type: "text",
295
- key: "port",
296
- label: "Port",
297
- disabled: true,
298
- description: "Listening port"
299
- },
300
- {
301
- type: "text",
302
- key: "host",
303
- label: "Host",
304
- disabled: true,
305
- description: "Bind address"
306
- },
307
- {
308
- type: "text",
309
- key: "dataPath",
310
- label: "Data Path",
311
- disabled: true,
312
- description: "Root data directory",
313
- span: 2
314
- }
150
+ type: "select",
151
+ key: "level",
152
+ label: "Log Level",
153
+ options: [
154
+ { value: "debug", label: "Debug" },
155
+ { value: "info", label: "Info" },
156
+ { value: "warn", label: "Warn" },
157
+ { value: "error", label: "Error" }
315
158
  ]
316
159
  }
317
160
  ]
318
- };
319
- var STORAGE_SCHEMA = {
320
- sections: []
321
- };
322
- var LOGGING_SCHEMA = {
323
- sections: [
161
+ }
162
+ ]
163
+ };
164
+ var RECORDING_SCHEMA = {
165
+ sections: [
166
+ {
167
+ id: "recording-settings",
168
+ title: "Recording",
169
+ description: "Video recording segment and retention defaults",
170
+ columns: 2,
171
+ fields: [
324
172
  {
325
- id: "logging-settings",
326
- title: "Logging",
327
- description: "Global log verbosity. Retention is managed per log-destination addon.",
328
- columns: 1,
329
- fields: [
330
- {
331
- type: "select",
332
- key: "level",
333
- label: "Log Level",
334
- options: [
335
- { value: "debug", label: "Debug" },
336
- { value: "info", label: "Info" },
337
- { value: "warn", label: "Warn" },
338
- { value: "error", label: "Error" }
339
- ]
340
- }
341
- ]
173
+ type: "number",
174
+ key: "segmentDurationSeconds",
175
+ label: "Segment Duration",
176
+ description: "Length of each recording segment",
177
+ min: 1,
178
+ max: 60,
179
+ step: 1,
180
+ unit: "seconds"
181
+ },
182
+ {
183
+ type: "number",
184
+ key: "defaultRetentionDays",
185
+ label: "Default Retention",
186
+ description: "Days to keep recordings before auto-delete",
187
+ min: 1,
188
+ max: 365,
189
+ step: 1,
190
+ unit: "days"
342
191
  }
343
192
  ]
344
- };
345
- var RECORDING_SCHEMA = {
346
- sections: [
193
+ }
194
+ ]
195
+ };
196
+ var FFMPEG_SCHEMA = {
197
+ sections: [
198
+ {
199
+ id: "ffmpeg-settings",
200
+ title: "FFmpeg",
201
+ description: "FFmpeg binary and hardware acceleration settings",
202
+ columns: 2,
203
+ fields: [
347
204
  {
348
- id: "recording-settings",
349
- title: "Recording",
350
- description: "Video recording segment and retention defaults",
351
- columns: 2,
352
- fields: [
353
- {
354
- type: "number",
355
- key: "segmentDurationSeconds",
356
- label: "Segment Duration",
357
- description: "Length of each recording segment",
358
- min: 1,
359
- max: 60,
360
- step: 1,
361
- unit: "seconds"
362
- },
363
- {
364
- type: "number",
365
- key: "defaultRetentionDays",
366
- label: "Default Retention",
367
- description: "Days to keep recordings before auto-delete",
368
- min: 1,
369
- max: 365,
370
- step: 1,
371
- unit: "days"
372
- }
205
+ type: "text",
206
+ key: "binaryPath",
207
+ label: "Binary Path",
208
+ description: "Path to ffmpeg executable",
209
+ placeholder: "ffmpeg",
210
+ span: 2
211
+ },
212
+ {
213
+ type: "select",
214
+ key: "hwAccel",
215
+ label: "Hardware Acceleration",
216
+ description: "GPU decoding/encoding backend",
217
+ options: [
218
+ { value: "auto", label: "Auto-detect" },
219
+ { value: "none", label: "None (CPU only)" },
220
+ { value: "videotoolbox", label: "VideoToolbox (macOS)" },
221
+ { value: "vaapi", label: "VA-API (Linux Intel/AMD)" },
222
+ { value: "qsv", label: "QSV (Intel Quick Sync)" },
223
+ { value: "cuda", label: "CUDA (NVIDIA)" }
373
224
  ]
225
+ },
226
+ {
227
+ type: "number",
228
+ key: "threadCount",
229
+ label: "Thread Count",
230
+ description: "0 = auto (let FFmpeg decide)",
231
+ min: 0,
232
+ max: 16,
233
+ step: 1
374
234
  }
375
235
  ]
376
- };
377
- var FFMPEG_SCHEMA = {
378
- sections: [
236
+ }
237
+ ]
238
+ };
239
+ var DETECTION_SCHEMA = {
240
+ sections: [
241
+ {
242
+ id: "detection-fps",
243
+ title: "Frame Rates",
244
+ description: "Default analysis frame rates for new cameras",
245
+ columns: 2,
246
+ fields: [
379
247
  {
380
- id: "ffmpeg-settings",
381
- title: "FFmpeg",
382
- description: "FFmpeg binary and hardware acceleration settings",
383
- columns: 2,
384
- fields: [
385
- {
386
- type: "text",
387
- key: "binaryPath",
388
- label: "Binary Path",
389
- description: "Path to ffmpeg executable",
390
- placeholder: "ffmpeg",
391
- span: 2
392
- },
393
- {
394
- type: "select",
395
- key: "hwAccel",
396
- label: "Hardware Acceleration",
397
- description: "GPU decoding/encoding backend",
398
- options: [
399
- { value: "auto", label: "Auto-detect" },
400
- { value: "none", label: "None (CPU only)" },
401
- { value: "videotoolbox", label: "VideoToolbox (macOS)" },
402
- { value: "vaapi", label: "VA-API (Linux Intel/AMD)" },
403
- { value: "qsv", label: "QSV (Intel Quick Sync)" },
404
- { value: "cuda", label: "CUDA (NVIDIA)" }
405
- ]
406
- },
407
- {
408
- type: "number",
409
- key: "threadCount",
410
- label: "Thread Count",
411
- description: "0 = auto (let FFmpeg decide)",
412
- min: 0,
413
- max: 16,
414
- step: 1
415
- }
416
- ]
248
+ type: "number",
249
+ key: "defaultMotionFps",
250
+ label: "Motion FPS",
251
+ description: "Frames per second for motion detection",
252
+ min: 1,
253
+ max: 30,
254
+ step: 1,
255
+ unit: "fps"
256
+ },
257
+ {
258
+ type: "number",
259
+ key: "defaultDetectionFps",
260
+ label: "Detection FPS",
261
+ description: "Frames per second for object detection",
262
+ min: 1,
263
+ max: 30,
264
+ step: 1,
265
+ unit: "fps"
417
266
  }
418
267
  ]
419
- };
420
- var DETECTION_SCHEMA = {
421
- sections: [
268
+ },
269
+ {
270
+ id: "detection-thresholds",
271
+ title: "Thresholds",
272
+ description: "Default confidence and cooldown for detections",
273
+ columns: 2,
274
+ fields: [
422
275
  {
423
- id: "detection-fps",
424
- title: "Frame Rates",
425
- description: "Default analysis frame rates for new cameras",
426
- columns: 2,
427
- fields: [
428
- {
429
- type: "number",
430
- key: "defaultMotionFps",
431
- label: "Motion FPS",
432
- description: "Frames per second for motion detection",
433
- min: 1,
434
- max: 30,
435
- step: 1,
436
- unit: "fps"
437
- },
438
- {
439
- type: "number",
440
- key: "defaultDetectionFps",
441
- label: "Detection FPS",
442
- description: "Frames per second for object detection",
443
- min: 1,
444
- max: 30,
445
- step: 1,
446
- unit: "fps"
447
- }
448
- ]
276
+ type: "slider",
277
+ key: "defaultConfidenceThreshold",
278
+ label: "Confidence Threshold",
279
+ description: "Minimum confidence to trigger a detection event",
280
+ min: 0.1,
281
+ max: 1,
282
+ step: 0.05,
283
+ showValue: true
449
284
  },
450
285
  {
451
- id: "detection-thresholds",
452
- title: "Thresholds",
453
- description: "Default confidence and cooldown for detections",
454
- columns: 2,
455
- fields: [
456
- {
457
- type: "slider",
458
- key: "defaultConfidenceThreshold",
459
- label: "Confidence Threshold",
460
- description: "Minimum confidence to trigger a detection event",
461
- min: 0.1,
462
- max: 1,
463
- step: 0.05,
464
- showValue: true
465
- },
466
- {
467
- type: "number",
468
- key: "defaultCooldownSeconds",
469
- label: "Cooldown",
470
- description: "Seconds between duplicate events",
471
- min: 0,
472
- max: 300,
473
- step: 1,
474
- unit: "seconds"
475
- }
476
- ]
286
+ type: "number",
287
+ key: "defaultCooldownSeconds",
288
+ label: "Cooldown",
289
+ description: "Seconds between duplicate events",
290
+ min: 0,
291
+ max: 300,
292
+ step: 1,
293
+ unit: "seconds"
294
+ }
295
+ ]
296
+ },
297
+ {
298
+ id: "detection-tracker",
299
+ title: "Tracker",
300
+ description: "SORT/IoU tracker parameters",
301
+ columns: 3,
302
+ fields: [
303
+ {
304
+ type: "number",
305
+ key: "trackerMaxAgeFrames",
306
+ label: "Max Age",
307
+ description: "Frames before a lost track is removed",
308
+ min: 1,
309
+ max: 120,
310
+ step: 1,
311
+ unit: "frames"
477
312
  },
478
313
  {
479
- id: "detection-tracker",
480
- title: "Tracker",
481
- description: "SORT/IoU tracker parameters",
482
- columns: 3,
483
- fields: [
484
- {
485
- type: "number",
486
- key: "trackerMaxAgeFrames",
487
- label: "Max Age",
488
- description: "Frames before a lost track is removed",
489
- min: 1,
490
- max: 120,
491
- step: 1,
492
- unit: "frames"
493
- },
494
- {
495
- type: "number",
496
- key: "trackerMinHits",
497
- label: "Min Hits",
498
- description: "Consecutive detections to confirm a track",
499
- min: 1,
500
- max: 20,
501
- step: 1
502
- },
503
- {
504
- type: "slider",
505
- key: "trackerIouThreshold",
506
- label: "IoU Threshold",
507
- description: "Minimum IoU to associate detection with track",
508
- min: 0.1,
509
- max: 0.9,
510
- step: 0.05,
511
- showValue: true
512
- }
513
- ]
314
+ type: "number",
315
+ key: "trackerMinHits",
316
+ label: "Min Hits",
317
+ description: "Consecutive detections to confirm a track",
318
+ min: 1,
319
+ max: 20,
320
+ step: 1
321
+ },
322
+ {
323
+ type: "slider",
324
+ key: "trackerIouThreshold",
325
+ label: "IoU Threshold",
326
+ description: "Minimum IoU to associate detection with track",
327
+ min: 0.1,
328
+ max: 0.9,
329
+ step: 0.05,
330
+ showValue: true
514
331
  }
515
332
  ]
516
- };
517
- var AUTH_SCHEMA = {
518
- sections: [
333
+ }
334
+ ]
335
+ };
336
+ var AUTH_SCHEMA = {
337
+ sections: [
338
+ {
339
+ id: "auth-settings",
340
+ title: "Authentication",
341
+ description: "Token and session settings",
342
+ columns: 1,
343
+ fields: [
519
344
  {
520
- id: "auth-settings",
521
- title: "Authentication",
522
- description: "Token and session settings",
523
- columns: 1,
524
- fields: [
525
- {
526
- type: "text",
527
- key: "tokenExpiry",
528
- label: "Token Expiry",
529
- description: "JWT token lifetime (e.g. 24h, 7d, 1h)",
530
- placeholder: "24h"
531
- }
532
- ]
345
+ type: "text",
346
+ key: "tokenExpiry",
347
+ label: "Token Expiry",
348
+ description: "JWT token lifetime (e.g. 24h, 7d, 1h)",
349
+ placeholder: "24h"
533
350
  }
534
351
  ]
535
- };
536
- var RETENTION_SCHEMA = {
537
- sections: [
352
+ }
353
+ ]
354
+ };
355
+ var RETENTION_SCHEMA = {
356
+ sections: [
357
+ {
358
+ id: "retention-settings",
359
+ title: "Retention",
360
+ description: "Data retention periods for analytics data",
361
+ columns: 1,
362
+ fields: [
538
363
  {
539
- id: "retention-settings",
540
- title: "Retention",
541
- description: "Data retention periods for analytics data",
542
- columns: 1,
543
- fields: [
544
- {
545
- type: "slider",
546
- key: "detectionEventsDays",
547
- label: "Detection Events Retention",
548
- min: 1,
549
- max: 365,
550
- unit: "days",
551
- showValue: true,
552
- span: 1
553
- },
554
- {
555
- type: "slider",
556
- key: "audioLevelsDays",
557
- label: "Audio Levels Retention",
558
- min: 1,
559
- max: 90,
560
- unit: "days",
561
- showValue: true,
562
- span: 1
563
- }
564
- ]
364
+ type: "slider",
365
+ key: "detectionEventsDays",
366
+ label: "Detection Events Retention",
367
+ min: 1,
368
+ max: 365,
369
+ unit: "days",
370
+ showValue: true,
371
+ span: 1
372
+ },
373
+ {
374
+ type: "slider",
375
+ key: "audioLevelsDays",
376
+ label: "Audio Levels Retention",
377
+ min: 1,
378
+ max: 90,
379
+ unit: "days",
380
+ showValue: true,
381
+ span: 1
565
382
  }
566
383
  ]
567
- };
568
- exports.SYSTEM_SETTINGS_SCHEMAS = {
569
- server: SERVER_SCHEMA,
570
- storage: STORAGE_SCHEMA,
571
- logging: LOGGING_SCHEMA,
572
- recording: RECORDING_SCHEMA,
573
- ffmpeg: FFMPEG_SCHEMA,
574
- detection: DETECTION_SCHEMA,
575
- auth: AUTH_SCHEMA,
576
- retention: RETENTION_SCHEMA,
577
- // These sections have no UI form — managed programmatically or addon-specific
578
- streaming: { sections: [] },
579
- backup: { sections: [] },
580
- features: { sections: [] },
581
- addons: { sections: [] }
582
- };
583
- function getSystemSettingsSchema(section) {
584
- return exports.SYSTEM_SETTINGS_SCHEMAS[section];
585
384
  }
586
- }
587
- });
385
+ ]
386
+ };
387
+ var SYSTEM_SETTINGS_SCHEMAS = {
388
+ server: SERVER_SCHEMA,
389
+ storage: STORAGE_SCHEMA,
390
+ logging: LOGGING_SCHEMA,
391
+ recording: RECORDING_SCHEMA,
392
+ ffmpeg: FFMPEG_SCHEMA,
393
+ detection: DETECTION_SCHEMA,
394
+ auth: AUTH_SCHEMA,
395
+ retention: RETENTION_SCHEMA,
396
+ // These sections have no UI form — managed programmatically or addon-specific
397
+ streaming: { sections: [] },
398
+ backup: { sections: [] },
399
+ features: { sections: [] },
400
+ addons: { sections: [] }
401
+ };
402
+ function getSystemSettingsSchema(section) {
403
+ return SYSTEM_SETTINGS_SCHEMAS[section];
404
+ }
588
405
 
589
- // src/constants.js
590
- var require_constants = __commonJS({
591
- "src/constants.js"(exports) {
592
- "use strict";
593
- Object.defineProperty(exports, "__esModule", { value: true });
594
- exports.HF_BASE_URL = exports.HF_REPO = void 0;
595
- exports.HF_REPO = "camstack/camstack-models";
596
- exports.HF_BASE_URL = `https://huggingface.co/${exports.HF_REPO}/resolve/main`;
597
- }
598
- });
406
+ // src/constants.ts
407
+ var HF_REPO = "camstack/camstack-models";
408
+ var HF_BASE_URL = `https://huggingface.co/${HF_REPO}/resolve/main`;
599
409
 
600
- // src/utils/hf-url.js
601
- var require_hf_url = __commonJS({
602
- "src/utils/hf-url.js"(exports) {
603
- "use strict";
604
- Object.defineProperty(exports, "__esModule", { value: true });
605
- exports.hfModelUrl = hfModelUrl2;
606
- function hfModelUrl2(repo, path) {
607
- return `https://huggingface.co/${repo}/resolve/main/${path}`;
608
- }
609
- }
610
- });
410
+ // src/utils/hf-url.ts
411
+ function hfModelUrl(repo, path) {
412
+ return `https://huggingface.co/${repo}/resolve/main/${path}`;
413
+ }
611
414
 
612
- // src/utils/cosine-similarity.js
613
- var require_cosine_similarity = __commonJS({
614
- "src/utils/cosine-similarity.js"(exports) {
615
- "use strict";
616
- Object.defineProperty(exports, "__esModule", { value: true });
617
- exports.cosineSimilarity = cosineSimilarity2;
618
- function cosineSimilarity2(a, b) {
619
- if (a.length !== b.length)
620
- return 0;
621
- let dotProduct = 0;
622
- let normA = 0;
623
- let normB = 0;
624
- for (let i = 0; i < a.length; i++) {
625
- dotProduct += a[i] * b[i];
626
- normA += a[i] * a[i];
627
- normB += b[i] * b[i];
628
- }
629
- const denom = Math.sqrt(normA) * Math.sqrt(normB);
630
- return denom === 0 ? 0 : dotProduct / denom;
631
- }
415
+ // src/utils/cosine-similarity.ts
416
+ function cosineSimilarity(a, b) {
417
+ if (a.length !== b.length) return 0;
418
+ let dotProduct = 0;
419
+ let normA = 0;
420
+ let normB = 0;
421
+ for (let i = 0; i < a.length; i++) {
422
+ dotProduct += a[i] * b[i];
423
+ normA += a[i] * a[i];
424
+ normB += b[i] * b[i];
632
425
  }
633
- });
426
+ const denom = Math.sqrt(normA) * Math.sqrt(normB);
427
+ return denom === 0 ? 0 : dotProduct / denom;
428
+ }
634
429
 
635
- // src/catalogs/coco-classmap.js
636
- var require_coco_classmap = __commonJS({
637
- "src/catalogs/coco-classmap.js"(exports) {
638
- "use strict";
639
- Object.defineProperty(exports, "__esModule", { value: true });
640
- exports.COCO_TO_MACRO = exports.MACRO_LABELS = exports.COCO_80_LABELS = void 0;
641
- exports.COCO_80_LABELS = [
642
- { id: "person", name: "Person" },
643
- { id: "bicycle", name: "Bicycle" },
644
- { id: "car", name: "Car" },
645
- { id: "motorcycle", name: "Motorcycle" },
646
- { id: "airplane", name: "Airplane" },
647
- { id: "bus", name: "Bus" },
648
- { id: "train", name: "Train" },
649
- { id: "truck", name: "Truck" },
650
- { id: "boat", name: "Boat" },
651
- { id: "traffic light", name: "Traffic Light" },
652
- { id: "fire hydrant", name: "Fire Hydrant" },
653
- { id: "stop sign", name: "Stop Sign" },
654
- { id: "parking meter", name: "Parking Meter" },
655
- { id: "bench", name: "Bench" },
656
- { id: "bird", name: "Bird" },
657
- { id: "cat", name: "Cat" },
658
- { id: "dog", name: "Dog" },
659
- { id: "horse", name: "Horse" },
660
- { id: "sheep", name: "Sheep" },
661
- { id: "cow", name: "Cow" },
662
- { id: "elephant", name: "Elephant" },
663
- { id: "bear", name: "Bear" },
664
- { id: "zebra", name: "Zebra" },
665
- { id: "giraffe", name: "Giraffe" },
666
- { id: "backpack", name: "Backpack" },
667
- { id: "umbrella", name: "Umbrella" },
668
- { id: "handbag", name: "Handbag" },
669
- { id: "tie", name: "Tie" },
670
- { id: "suitcase", name: "Suitcase" },
671
- { id: "frisbee", name: "Frisbee" },
672
- { id: "skis", name: "Skis" },
673
- { id: "snowboard", name: "Snowboard" },
674
- { id: "sports ball", name: "Sports Ball" },
675
- { id: "kite", name: "Kite" },
676
- { id: "baseball bat", name: "Baseball Bat" },
677
- { id: "baseball glove", name: "Baseball Glove" },
678
- { id: "skateboard", name: "Skateboard" },
679
- { id: "surfboard", name: "Surfboard" },
680
- { id: "tennis racket", name: "Tennis Racket" },
681
- { id: "bottle", name: "Bottle" },
682
- { id: "wine glass", name: "Wine Glass" },
683
- { id: "cup", name: "Cup" },
684
- { id: "fork", name: "Fork" },
685
- { id: "knife", name: "Knife" },
686
- { id: "spoon", name: "Spoon" },
687
- { id: "bowl", name: "Bowl" },
688
- { id: "banana", name: "Banana" },
689
- { id: "apple", name: "Apple" },
690
- { id: "sandwich", name: "Sandwich" },
691
- { id: "orange", name: "Orange" },
692
- { id: "broccoli", name: "Broccoli" },
693
- { id: "carrot", name: "Carrot" },
694
- { id: "hot dog", name: "Hot Dog" },
695
- { id: "pizza", name: "Pizza" },
696
- { id: "donut", name: "Donut" },
697
- { id: "cake", name: "Cake" },
698
- { id: "chair", name: "Chair" },
699
- { id: "couch", name: "Couch" },
700
- { id: "potted plant", name: "Potted Plant" },
701
- { id: "bed", name: "Bed" },
702
- { id: "dining table", name: "Dining Table" },
703
- { id: "toilet", name: "Toilet" },
704
- { id: "tv", name: "TV" },
705
- { id: "laptop", name: "Laptop" },
706
- { id: "mouse", name: "Mouse" },
707
- { id: "remote", name: "Remote" },
708
- { id: "keyboard", name: "Keyboard" },
709
- { id: "cell phone", name: "Cell Phone" },
710
- { id: "microwave", name: "Microwave" },
711
- { id: "oven", name: "Oven" },
712
- { id: "toaster", name: "Toaster" },
713
- { id: "sink", name: "Sink" },
714
- { id: "refrigerator", name: "Refrigerator" },
715
- { id: "book", name: "Book" },
716
- { id: "clock", name: "Clock" },
717
- { id: "vase", name: "Vase" },
718
- { id: "scissors", name: "Scissors" },
719
- { id: "teddy bear", name: "Teddy Bear" },
720
- { id: "hair drier", name: "Hair Drier" },
721
- { id: "toothbrush", name: "Toothbrush" }
722
- ];
723
- exports.MACRO_LABELS = [
724
- { id: "person", name: "Person" },
725
- { id: "vehicle", name: "Vehicle" },
726
- { id: "animal", name: "Animal" }
727
- ];
728
- exports.COCO_TO_MACRO = {
729
- mapping: {
730
- person: "person",
731
- bicycle: "vehicle",
732
- car: "vehicle",
733
- motorcycle: "vehicle",
734
- airplane: "vehicle",
735
- bus: "vehicle",
736
- train: "vehicle",
737
- truck: "vehicle",
738
- boat: "vehicle",
739
- bird: "animal",
740
- cat: "animal",
741
- dog: "animal",
742
- horse: "animal",
743
- sheep: "animal",
744
- cow: "animal",
745
- elephant: "animal",
746
- bear: "animal",
747
- zebra: "animal",
748
- giraffe: "animal"
749
- },
750
- preserveOriginal: true
751
- };
752
- }
753
- });
754
-
755
- // src/types/device-type.js
756
- var require_device_type = __commonJS({
757
- "src/types/device-type.js"(exports) {
758
- "use strict";
759
- Object.defineProperty(exports, "__esModule", { value: true });
760
- exports.DEVICE_TYPE_INFO = exports.DeviceType = void 0;
761
- var DeviceType2;
762
- (function(DeviceType3) {
763
- DeviceType3["Camera"] = "camera";
764
- })(DeviceType2 || (exports.DeviceType = DeviceType2 = {}));
765
- exports.DEVICE_TYPE_INFO = {
766
- [DeviceType2.Camera]: { type: DeviceType2.Camera, label: "Camera", icon: "camera" }
767
- };
768
- }
769
- });
430
+ // src/catalogs/coco-classmap.ts
431
+ var COCO_80_LABELS = [
432
+ { id: "person", name: "Person" },
433
+ { id: "bicycle", name: "Bicycle" },
434
+ { id: "car", name: "Car" },
435
+ { id: "motorcycle", name: "Motorcycle" },
436
+ { id: "airplane", name: "Airplane" },
437
+ { id: "bus", name: "Bus" },
438
+ { id: "train", name: "Train" },
439
+ { id: "truck", name: "Truck" },
440
+ { id: "boat", name: "Boat" },
441
+ { id: "traffic light", name: "Traffic Light" },
442
+ { id: "fire hydrant", name: "Fire Hydrant" },
443
+ { id: "stop sign", name: "Stop Sign" },
444
+ { id: "parking meter", name: "Parking Meter" },
445
+ { id: "bench", name: "Bench" },
446
+ { id: "bird", name: "Bird" },
447
+ { id: "cat", name: "Cat" },
448
+ { id: "dog", name: "Dog" },
449
+ { id: "horse", name: "Horse" },
450
+ { id: "sheep", name: "Sheep" },
451
+ { id: "cow", name: "Cow" },
452
+ { id: "elephant", name: "Elephant" },
453
+ { id: "bear", name: "Bear" },
454
+ { id: "zebra", name: "Zebra" },
455
+ { id: "giraffe", name: "Giraffe" },
456
+ { id: "backpack", name: "Backpack" },
457
+ { id: "umbrella", name: "Umbrella" },
458
+ { id: "handbag", name: "Handbag" },
459
+ { id: "tie", name: "Tie" },
460
+ { id: "suitcase", name: "Suitcase" },
461
+ { id: "frisbee", name: "Frisbee" },
462
+ { id: "skis", name: "Skis" },
463
+ { id: "snowboard", name: "Snowboard" },
464
+ { id: "sports ball", name: "Sports Ball" },
465
+ { id: "kite", name: "Kite" },
466
+ { id: "baseball bat", name: "Baseball Bat" },
467
+ { id: "baseball glove", name: "Baseball Glove" },
468
+ { id: "skateboard", name: "Skateboard" },
469
+ { id: "surfboard", name: "Surfboard" },
470
+ { id: "tennis racket", name: "Tennis Racket" },
471
+ { id: "bottle", name: "Bottle" },
472
+ { id: "wine glass", name: "Wine Glass" },
473
+ { id: "cup", name: "Cup" },
474
+ { id: "fork", name: "Fork" },
475
+ { id: "knife", name: "Knife" },
476
+ { id: "spoon", name: "Spoon" },
477
+ { id: "bowl", name: "Bowl" },
478
+ { id: "banana", name: "Banana" },
479
+ { id: "apple", name: "Apple" },
480
+ { id: "sandwich", name: "Sandwich" },
481
+ { id: "orange", name: "Orange" },
482
+ { id: "broccoli", name: "Broccoli" },
483
+ { id: "carrot", name: "Carrot" },
484
+ { id: "hot dog", name: "Hot Dog" },
485
+ { id: "pizza", name: "Pizza" },
486
+ { id: "donut", name: "Donut" },
487
+ { id: "cake", name: "Cake" },
488
+ { id: "chair", name: "Chair" },
489
+ { id: "couch", name: "Couch" },
490
+ { id: "potted plant", name: "Potted Plant" },
491
+ { id: "bed", name: "Bed" },
492
+ { id: "dining table", name: "Dining Table" },
493
+ { id: "toilet", name: "Toilet" },
494
+ { id: "tv", name: "TV" },
495
+ { id: "laptop", name: "Laptop" },
496
+ { id: "mouse", name: "Mouse" },
497
+ { id: "remote", name: "Remote" },
498
+ { id: "keyboard", name: "Keyboard" },
499
+ { id: "cell phone", name: "Cell Phone" },
500
+ { id: "microwave", name: "Microwave" },
501
+ { id: "oven", name: "Oven" },
502
+ { id: "toaster", name: "Toaster" },
503
+ { id: "sink", name: "Sink" },
504
+ { id: "refrigerator", name: "Refrigerator" },
505
+ { id: "book", name: "Book" },
506
+ { id: "clock", name: "Clock" },
507
+ { id: "vase", name: "Vase" },
508
+ { id: "scissors", name: "Scissors" },
509
+ { id: "teddy bear", name: "Teddy Bear" },
510
+ { id: "hair drier", name: "Hair Drier" },
511
+ { id: "toothbrush", name: "Toothbrush" }
512
+ ];
513
+ var MACRO_LABELS = [
514
+ { id: "person", name: "Person" },
515
+ { id: "vehicle", name: "Vehicle" },
516
+ { id: "animal", name: "Animal" }
517
+ ];
518
+ var COCO_TO_MACRO = {
519
+ mapping: {
520
+ person: "person",
521
+ bicycle: "vehicle",
522
+ car: "vehicle",
523
+ motorcycle: "vehicle",
524
+ airplane: "vehicle",
525
+ bus: "vehicle",
526
+ train: "vehicle",
527
+ truck: "vehicle",
528
+ boat: "vehicle",
529
+ bird: "animal",
530
+ cat: "animal",
531
+ dog: "animal",
532
+ horse: "animal",
533
+ sheep: "animal",
534
+ cow: "animal",
535
+ elephant: "animal",
536
+ bear: "animal",
537
+ zebra: "animal",
538
+ giraffe: "animal"
539
+ },
540
+ preserveOriginal: true
541
+ };
770
542
 
771
- // src/index.ts
772
- var src_exports = {};
773
- __export(src_exports, {
774
- COCO_80_LABELS: () => import_coco_classmap.COCO_80_LABELS,
775
- COCO_TO_MACRO: () => import_coco_classmap.COCO_TO_MACRO,
776
- DEVICE_TYPE_INFO: () => import_device_type.DEVICE_TYPE_INFO,
777
- DeviceType: () => import_device_type.DeviceType,
778
- MACRO_LABELS: () => import_coco_classmap.MACRO_LABELS,
779
- cosineSimilarity: () => import_cosine_similarity.cosineSimilarity,
780
- hfModelUrl: () => import_hf_url.hfModelUrl,
781
- resolveTranslation: () => import_addon_i18n.resolveTranslation
782
- });
783
- __reExport(src_exports, __toESM(require_io()));
784
- __reExport(src_exports, __toESM(require_labels()));
785
- __reExport(src_exports, __toESM(require_detection()));
786
- __reExport(src_exports, __toESM(require_tracked()));
787
- __reExport(src_exports, __toESM(require_events()));
788
- __reExport(src_exports, __toESM(require_config()));
789
- __reExport(src_exports, __toESM(require_entities()));
790
- __reExport(src_exports, __toESM(require_zones()));
791
- __reExport(src_exports, __toESM(require_models()));
792
- __reExport(src_exports, __toESM(require_pipeline()));
793
- __reExport(src_exports, __toESM(require_live_state()));
794
- __reExport(src_exports, __toESM(require_analytics()));
795
- __reExport(src_exports, __toESM(require_storage_backend()));
796
- var import_addon_i18n = __toESM(require_addon_i18n());
797
- __reExport(src_exports, __toESM(require_feature_flags()));
798
- __reExport(src_exports, __toESM(require_agent_protocol()));
799
- __reExport(src_exports, __toESM(require_server_analysis()));
800
- __reExport(src_exports, __toESM(require_analysis_persistence()));
801
- __reExport(src_exports, __toESM(require_system_settings_schemas()));
802
- __reExport(src_exports, __toESM(require_constants()));
803
- var import_hf_url = __toESM(require_hf_url());
804
- var import_cosine_similarity = __toESM(require_cosine_similarity());
805
- var import_coco_classmap = __toESM(require_coco_classmap());
806
- var import_device_type = __toESM(require_device_type());
807
- var export_COCO_80_LABELS = import_coco_classmap.COCO_80_LABELS;
808
- var export_COCO_TO_MACRO = import_coco_classmap.COCO_TO_MACRO;
809
- var export_DEVICE_TYPE_INFO = import_device_type.DEVICE_TYPE_INFO;
810
- var export_DeviceType = import_device_type.DeviceType;
811
- var export_MACRO_LABELS = import_coco_classmap.MACRO_LABELS;
812
- var export_cosineSimilarity = import_cosine_similarity.cosineSimilarity;
813
- var export_hfModelUrl = import_hf_url.hfModelUrl;
814
- var export_resolveTranslation = import_addon_i18n.resolveTranslation;
543
+ // src/types/device-type.ts
544
+ var DeviceType = /* @__PURE__ */ ((DeviceType2) => {
545
+ DeviceType2["Camera"] = "camera";
546
+ return DeviceType2;
547
+ })(DeviceType || {});
548
+ var DEVICE_TYPE_INFO = {
549
+ ["camera" /* Camera */]: { type: "camera" /* Camera */, label: "Camera", icon: "camera" }
550
+ };
815
551
  export {
816
- export_COCO_80_LABELS as COCO_80_LABELS,
817
- export_COCO_TO_MACRO as COCO_TO_MACRO,
818
- export_DEVICE_TYPE_INFO as DEVICE_TYPE_INFO,
819
- export_DeviceType as DeviceType,
820
- export_MACRO_LABELS as MACRO_LABELS,
821
- export_cosineSimilarity as cosineSimilarity,
822
- export_hfModelUrl as hfModelUrl,
823
- export_resolveTranslation as resolveTranslation
552
+ BINARY_FRAME_HEADER_SIZE,
553
+ BINARY_FRAME_TYPE,
554
+ COCO_80_LABELS,
555
+ COCO_TO_MACRO,
556
+ DEFAULT_FEATURES,
557
+ DEFAULT_LOCATION_SUBPATHS,
558
+ DEFAULT_RETENTION,
559
+ DETECTION_TYPES,
560
+ DEVICE_TYPE_INFO,
561
+ DeviceType,
562
+ HF_BASE_URL,
563
+ HF_REPO,
564
+ MACRO_LABELS,
565
+ READ_ONLY_SECTIONS,
566
+ RECOGNITION_TYPES,
567
+ SETTINGS_TABS,
568
+ SUB_DETECTION_TYPES,
569
+ SYSTEM_SETTINGS_SCHEMAS,
570
+ cosineSimilarity,
571
+ createAnalysisContext,
572
+ enrichContext,
573
+ getSystemSettingsSchema,
574
+ hfModelUrl,
575
+ resolveTranslation
824
576
  };
825
577
  //# sourceMappingURL=index.mjs.map