@camstack/types 0.1.7 → 0.1.10

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
@@ -0,0 +1,20 @@
1
+ import type { ZoneDefinition, KnownFace, KnownPlate } from '../types/entities.js';
2
+ export interface IZoneRepository {
3
+ getByCamera(cameraId: string): Promise<ZoneDefinition[]>;
4
+ save(zone: ZoneDefinition): Promise<void>;
5
+ delete(zoneId: string): Promise<void>;
6
+ }
7
+ export interface IKnownFaceRepository {
8
+ getAll(): Promise<KnownFace[]>;
9
+ findByEmbedding(embedding: Float32Array, threshold: number): Promise<KnownFace | null>;
10
+ save(face: KnownFace): Promise<void>;
11
+ addEmbedding(faceId: string, embedding: Float32Array): Promise<void>;
12
+ delete(faceId: string): Promise<void>;
13
+ }
14
+ export interface IKnownPlateRepository {
15
+ getAll(): Promise<KnownPlate[]>;
16
+ findByText(text: string): Promise<KnownPlate | null>;
17
+ save(plate: KnownPlate): Promise<void>;
18
+ delete(plateId: string): Promise<void>;
19
+ }
20
+ //# sourceMappingURL=repositories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repositories.d.ts","sourceRoot":"","sources":["../../src/interfaces/repositories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAEjF,MAAM,WAAW,eAAe;IAC9B,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAA;IACxD,IAAI,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACzC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACtC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC,CAAA;IAC9B,eAAe,CAAC,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAA;IACtF,IAAI,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpC,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACpE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACtC;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAAA;IAC/B,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAAA;IACpD,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtC,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACvC"}
@@ -0,0 +1,24 @@
1
+ import type { EncodedPacket } from './stream-broker.js';
2
+ export interface RegisteredStream {
3
+ readonly streamId: string;
4
+ readonly label: string;
5
+ readonly codec: string;
6
+ readonly type: 'video' | 'audio';
7
+ readonly sourceUrl?: string;
8
+ }
9
+ export interface RestreamerExposedResource {
10
+ readonly type: string;
11
+ readonly format: string;
12
+ readonly value: string;
13
+ readonly metadata?: Readonly<Record<string, unknown>>;
14
+ }
15
+ export interface IRestreamer {
16
+ readonly id: string;
17
+ readonly name: string;
18
+ registerDevice(deviceId: string, streams: readonly RegisteredStream[]): Promise<void>;
19
+ pushPacket(streamId: string, packet: EncodedPacket): void;
20
+ unregisterDevice(deviceId: string): Promise<void>;
21
+ getExposedResources(deviceId: string): readonly RestreamerExposedResource[];
22
+ proxyWhepOffer?(streamId: string, sdpOffer: string): Promise<string>;
23
+ }
24
+ //# sourceMappingURL=restreamer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restreamer.d.ts","sourceRoot":"","sources":["../../src/interfaces/restreamer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAEvD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAA;IAChC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CACtD;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,gBAAgB,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrF,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,IAAI,CAAA;IACzD,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACjD,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,yBAAyB,EAAE,CAAA;IAC3E,cAAc,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;CACrE"}
@@ -0,0 +1,30 @@
1
+ export interface RouteRequest {
2
+ readonly params: Readonly<Record<string, string>>;
3
+ readonly query: Readonly<Record<string, string | string[]>>;
4
+ readonly headers: Readonly<Record<string, string | undefined>>;
5
+ readonly body?: unknown;
6
+ }
7
+ export interface RouteResponse {
8
+ status(code: number): RouteResponse;
9
+ json(data: unknown): void;
10
+ send(data: string | Buffer): void;
11
+ sendFile(path: string): void;
12
+ header(name: string, value: string): RouteResponse;
13
+ }
14
+ export type RouteHandler = (req: RouteRequest, res: RouteResponse) => void | Promise<void>;
15
+ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
16
+ export interface IAddonRouter {
17
+ /** Public route — no auth required */
18
+ public(method: HttpMethod, path: string, handler: RouteHandler): void;
19
+ /** Protected route — requires valid JWT or API key */
20
+ protected(method: HttpMethod, path: string, handler: RouteHandler): void;
21
+ /** Admin route — requires admin role */
22
+ admin(method: HttpMethod, path: string, handler: RouteHandler): void;
23
+ /** Serve static directory */
24
+ static(urlPath: string, directory: string, options?: {
25
+ auth?: boolean;
26
+ }): void;
27
+ /** Get the base URL prefix for this addon's routes */
28
+ getBaseUrl(): string;
29
+ }
30
+ //# sourceMappingURL=router.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../src/interfaces/router.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;IACjD,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC,CAAA;IAC3D,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;IAC9D,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAA;IACnC,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACzB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,CAAA;CACnD;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,aAAa,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAC1F,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEpE,MAAM,WAAW,YAAY;IAC3B,sCAAsC;IACtC,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IACrE,sDAAsD;IACtD,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IACxE,wCAAwC;IACxC,KAAK,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,IAAI,CAAA;IACpE,6BAA6B;IAC7B,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;IAC9E,sDAAsD;IACtD,UAAU,IAAI,MAAM,CAAA;CACrB"}
@@ -0,0 +1,21 @@
1
+ import type { LabelData } from '../types/detection.js';
2
+ import type { EmbeddingFilter, VectorSearchResult } from './storage.js';
3
+ export interface EmbeddingMetadata {
4
+ readonly timestamp: number;
5
+ readonly className: string;
6
+ readonly deviceId: string;
7
+ readonly zoneId?: string;
8
+ readonly labelsData?: readonly LabelData[];
9
+ }
10
+ export interface SceneStateResult {
11
+ readonly previousState: string;
12
+ readonly currentState: string;
13
+ readonly confidence: number;
14
+ }
15
+ export interface ISceneIntelligence {
16
+ embed(deviceId: string, crop: Buffer, metadata: EmbeddingMetadata): Promise<string>;
17
+ search(query: string, topK: number, filter?: EmbeddingFilter): Promise<VectorSearchResult[]>;
18
+ searchByImage(image: Buffer, topK: number, filter?: EmbeddingFilter): Promise<VectorSearchResult[]>;
19
+ evaluateSceneState(deviceId: string, crop: Buffer): Promise<SceneStateResult | null>;
20
+ }
21
+ //# sourceMappingURL=scene-intelligence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scene-intelligence.d.ts","sourceRoot":"","sources":["../../src/interfaces/scene-intelligence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAEvE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,SAAS,EAAE,CAAA;CAC3C;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IACnF,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAA;IAC5F,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAA;IACnG,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;CACrF"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Scope restriction for a scoped token.
3
+ */
4
+ export interface TokenScope {
5
+ readonly type: 'addon' | 'route-prefix' | 'capability';
6
+ readonly target: string;
7
+ }
8
+ /**
9
+ * A per-user API token with restricted scopes.
10
+ */
11
+ export interface ScopedToken {
12
+ readonly id: string;
13
+ readonly userId: string;
14
+ readonly name: string;
15
+ readonly tokenHash: string;
16
+ readonly tokenPrefix: string;
17
+ readonly scopes: TokenScope[];
18
+ readonly expiresAt?: number;
19
+ readonly lastUsedAt?: number;
20
+ readonly createdAt: number;
21
+ }
22
+ //# sourceMappingURL=scoped-token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scoped-token.d.ts","sourceRoot":"","sources":["../../src/interfaces/scoped-token.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,cAAc,GAAG,YAAY,CAAA;IACtD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B"}
@@ -0,0 +1,146 @@
1
+ /**
2
+ * Detection Analysis Pipeline -- processes raw detections through
3
+ * configurable stages to produce tracked, enriched, actionable events.
4
+ */
5
+ import type { Detection } from './device-capabilities/object-detector.js';
6
+ import type { VideoFrame } from './camera-pipeline.js';
7
+ export declare const DETECTION_TYPES: readonly ["person", "vehicle", "animal", "package"];
8
+ export type DetectionType = typeof DETECTION_TYPES[number];
9
+ export declare const SUB_DETECTION_TYPES: readonly ["face", "plate"];
10
+ export type SubDetectionType = typeof SUB_DETECTION_TYPES[number];
11
+ export declare const RECOGNITION_TYPES: readonly ["face", "plate", "clip", "custom"];
12
+ export type RecognitionType = typeof RECOGNITION_TYPES[number];
13
+ export interface AnalysisContext {
14
+ readonly deviceId: string;
15
+ readonly frame: VideoFrame;
16
+ readonly timestamp: number;
17
+ readonly rawDetections: readonly Detection[];
18
+ readonly trackedDetections: readonly ServerTrackedDetection[];
19
+ readonly events: readonly AnalysisEvent[];
20
+ readonly metadata: Readonly<Record<string, unknown>>;
21
+ }
22
+ export interface ServerTrackedDetection {
23
+ readonly trackId: string;
24
+ readonly detection: Detection;
25
+ readonly crop?: Buffer;
26
+ readonly tracking: TrackingInfo;
27
+ readonly subDetections: readonly SubDetection[];
28
+ readonly recognitions: readonly RecognitionResult[];
29
+ readonly zones: readonly string[];
30
+ readonly previousZones: readonly string[];
31
+ }
32
+ export interface TrackingInfo {
33
+ readonly age: number;
34
+ readonly state: 'moving' | 'stationary' | 'new' | 'lost';
35
+ readonly stationaryDuration: number;
36
+ readonly velocity: {
37
+ readonly dx: number;
38
+ readonly dy: number;
39
+ };
40
+ readonly positionHistory: ReadonlyArray<{
41
+ readonly x: number;
42
+ readonly y: number;
43
+ readonly t: number;
44
+ }>;
45
+ }
46
+ export interface SubDetection {
47
+ readonly detectionType: SubDetectionType;
48
+ readonly boundingBox: readonly [number, number, number, number];
49
+ readonly score: number;
50
+ readonly crop?: Buffer;
51
+ }
52
+ export interface RecognitionResult {
53
+ readonly recognitionType: RecognitionType;
54
+ readonly label: string;
55
+ readonly score: number;
56
+ readonly embedding?: readonly number[];
57
+ readonly metadata?: Readonly<Record<string, unknown>>;
58
+ }
59
+ export interface AnalysisEvent {
60
+ readonly category: string;
61
+ readonly severity: 'info' | 'warning' | 'alert';
62
+ readonly detection: ServerTrackedDetection;
63
+ readonly description: string;
64
+ readonly data: Readonly<Record<string, unknown>>;
65
+ }
66
+ export interface IAnalysisStage {
67
+ readonly id: string;
68
+ readonly name: string;
69
+ readonly priority: number;
70
+ enabled: boolean;
71
+ process(ctx: AnalysisContext): Promise<AnalysisContext>;
72
+ }
73
+ export interface ISubDetector {
74
+ readonly detectionType: SubDetectionType;
75
+ readonly targetClasses: readonly string[];
76
+ detect(crop: Buffer, cropWidth: number, cropHeight: number): Promise<SubDetection[]>;
77
+ }
78
+ export interface IFaceDetector extends ISubDetector {
79
+ readonly detectionType: 'face';
80
+ }
81
+ export interface IPlateDetector extends ISubDetector {
82
+ readonly detectionType: 'plate';
83
+ }
84
+ export interface IRecognizer {
85
+ readonly recognitionType: RecognitionType;
86
+ recognize(crop: Buffer, width: number, height: number): Promise<RecognitionResult | null>;
87
+ }
88
+ export interface IFaceRecognizer extends IRecognizer {
89
+ getEmbedding(crop: Buffer): Promise<Float32Array>;
90
+ registerKnown(label: string, embedding: Float32Array): void;
91
+ }
92
+ export interface IPlateRecognizer extends IRecognizer {
93
+ readonly recognitionType: 'plate';
94
+ }
95
+ export interface IAudioClassifier {
96
+ readonly ready: boolean;
97
+ initialize(): Promise<void>;
98
+ classify(audioSamples: Float32Array, sampleRate: number, topN?: number): Promise<readonly AudioClassification[]>;
99
+ release(): Promise<void>;
100
+ }
101
+ export interface AudioClassification {
102
+ readonly classIndex: number;
103
+ readonly className: string;
104
+ readonly score: number;
105
+ readonly isSurveillanceRelevant: boolean;
106
+ }
107
+ export interface IClassFilterStage extends IAnalysisStage {
108
+ readonly id: 'class-filter';
109
+ setConfig(deviceId: string, config: Record<string, unknown>): void;
110
+ getConfig(deviceId: string): Record<string, unknown>;
111
+ }
112
+ export interface ITrackerStage extends IAnalysisStage {
113
+ readonly id: 'tracker';
114
+ setConfig(deviceId: string, config: Record<string, unknown>): void;
115
+ getConfig(deviceId: string): Record<string, unknown>;
116
+ resetDevice(deviceId: string): void;
117
+ }
118
+ export interface ISubDetectionStage extends IAnalysisStage {
119
+ readonly id: 'sub-detection';
120
+ registerDetector(detector: ISubDetector): void;
121
+ }
122
+ export interface IRecognitionStage extends IAnalysisStage {
123
+ readonly id: 'recognition';
124
+ registerRecognizer(recognizer: IRecognizer): void;
125
+ }
126
+ export interface IZoneAnalysisStage extends IAnalysisStage {
127
+ readonly id: 'zone-analysis';
128
+ setConfig(deviceId: string, config: Record<string, unknown>): void;
129
+ }
130
+ export interface IEventGenerationStage extends IAnalysisStage {
131
+ readonly id: 'event-generation';
132
+ setConfig(deviceId: string, config: Record<string, unknown>): void;
133
+ }
134
+ export interface IObjectSnapshotStage extends IAnalysisStage {
135
+ readonly id: 'object-snapshot';
136
+ setConfig(deviceId: string, config: Record<string, unknown>): void;
137
+ }
138
+ export interface IAnalysisPipeline {
139
+ addStage(stage: IAnalysisStage): void;
140
+ removeStage(stageId: string): void;
141
+ getStages(): readonly IAnalysisStage[];
142
+ analyze(deviceId: string, frame: VideoFrame, rawDetections: Detection[]): Promise<AnalysisContext>;
143
+ }
144
+ export declare function createAnalysisContext(deviceId: string, frame: VideoFrame, rawDetections: Detection[]): AnalysisContext;
145
+ export declare function enrichContext(ctx: AnalysisContext, updates: Partial<Pick<AnalysisContext, 'trackedDetections' | 'events' | 'metadata'>>): AnalysisContext;
146
+ //# sourceMappingURL=server-analysis.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-analysis.d.ts","sourceRoot":"","sources":["../../src/interfaces/server-analysis.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0CAA0C,CAAA;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AAItD,eAAO,MAAM,eAAe,qDAAsD,CAAA;AAClF,MAAM,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QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,UAAU,EACjB,aAAa,EAAE,SAAS,EAAE,GACzB,eAAe,CAUjB;AAED,wBAAgB,aAAa,CAC3B,GAAG,EAAE,eAAe,EACpB,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,GAAG,QAAQ,GAAG,UAAU,CAAC,CAAC,GACnF,eAAe,CAOjB"}
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Server-side network access interfaces.
3
+ * These cover tunnel/VPN/endpoint management, NOT the addon-facing INetworkProvider.
4
+ */
5
+ export interface INetworkEndpoint {
6
+ id: string;
7
+ type: 'lan' | 'mdns' | 'domain' | 'tunnel' | 'vpn' | 'custom';
8
+ provider: string;
9
+ url: string;
10
+ internal: boolean;
11
+ capabilities: EndpointCapabilities;
12
+ priority: number;
13
+ status: 'online' | 'offline' | 'unknown';
14
+ metadata?: Record<string, unknown>;
15
+ }
16
+ export interface EndpointCapabilities {
17
+ supportsWebRTC: boolean;
18
+ supportsWebSocket: boolean;
19
+ supportsSSE: boolean;
20
+ maxBandwidthMbps?: number;
21
+ }
22
+ export interface INetworkAccessProvider {
23
+ id: string;
24
+ type: string;
25
+ start(): Promise<INetworkEndpoint>;
26
+ stop(): Promise<void>;
27
+ getEndpoint(): INetworkEndpoint | null;
28
+ getStatus(): NetworkAccessStatus;
29
+ }
30
+ export interface NetworkAccessStatus {
31
+ connected: boolean;
32
+ publicUrl?: string;
33
+ error?: string;
34
+ connectedSince?: number;
35
+ }
36
+ export interface IExposedResource {
37
+ id: string;
38
+ providerId: string;
39
+ deviceId?: string;
40
+ type: ExposedResourceType;
41
+ path: string;
42
+ auth: ResourceAuthMode;
43
+ description: string;
44
+ contentType?: string;
45
+ enabled: boolean;
46
+ }
47
+ export type ExposedResourceType = 'snapshot' | 'stream' | 'webhook' | 'api' | 'media' | 'custom';
48
+ export type ResourceAuthMode = {
49
+ mode: 'public';
50
+ } | {
51
+ mode: 'token';
52
+ token: string;
53
+ } | {
54
+ mode: 'api-key';
55
+ } | {
56
+ mode: 'jwt';
57
+ } | {
58
+ mode: 'ip-whitelist';
59
+ ips: string[];
60
+ };
61
+ export interface IResourceExposer {
62
+ getExposedResources(): IExposedResource[];
63
+ handleResourceRequest(resourceId: string, request: ExposedResourceRequest): Promise<ExposedResourceResponse>;
64
+ }
65
+ export interface ExposedResourceRequest {
66
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE';
67
+ path: string;
68
+ headers: Record<string, string>;
69
+ query: Record<string, string>;
70
+ body?: Buffer | string;
71
+ remoteIp: string;
72
+ }
73
+ export interface ExposedResourceResponse {
74
+ status: number;
75
+ headers?: Record<string, string>;
76
+ body?: Buffer | string | NodeJS.ReadableStream;
77
+ }
78
+ //# sourceMappingURL=server-network.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server-network.d.ts","sourceRoot":"","sources":["../../src/interfaces/server-network.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,CAAA;IAC7D,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,oBAAoB,CAAA;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAA;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC;AAED,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,OAAO,CAAA;IACvB,iBAAiB,EAAE,OAAO,CAAA;IAC1B,WAAW,EAAE,OAAO,CAAA;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAID,MAAM,WAAW,sBAAsB;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AAU,EAAE,MAAM,EAClB,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,uBAAuB,CAAC,CAAA;CACpC;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAA;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,cAAc,CAAA;CAC/C"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @deprecated — This file contains legacy storage backend interfaces.
3
+ * Use the new interfaces from './storage.ts' instead:
4
+ * - IStorageProvider (capability: 'storage')
5
+ * - ISettingsBackend (capability: 'settings-store')
6
+ * - IEmbeddingsBackend (capability: 'embeddings')
7
+ */
8
+ import type { StorageLocationType } from './storage.js';
9
+ /** @deprecated Use IStorageProvider from storage.ts */
10
+ export interface IStorageBackend {
11
+ readonly type: string;
12
+ readonly basePath: string;
13
+ resolve(subpath: string): string;
14
+ resolve(location: StorageLocationType, ...segments: string[]): string;
15
+ isAvailable(location?: StorageLocationType): boolean;
16
+ initialize(): Promise<void>;
17
+ getLocationPath?(location: StorageLocationType): string;
18
+ }
19
+ /** @deprecated */
20
+ export interface StorageLocationConfig {
21
+ readonly name: string;
22
+ readonly basePath: string;
23
+ readonly backendType?: string;
24
+ }
25
+ /** @deprecated Use DEFAULT_LOCATION_SUBDIRS from storage.ts */
26
+ export declare const DEFAULT_LOCATION_SUBPATHS: Record<string, string>;
27
+ //# sourceMappingURL=storage-backend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage-backend.d.ts","sourceRoot":"","sources":["../../src/interfaces/storage-backend.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAEvD,uDAAuD;AACvD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAA;IAChC,OAAO,CAAC,QAAQ,EAAE,mBAAmB,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAAA;IACrE,WAAW,CAAC,QAAQ,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAA;IACpD,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC3B,eAAe,CAAC,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM,CAAA;CACxD;AAED,kBAAkB;AAClB,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAC9B;AAED,+DAA+D;AAC/D,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAS5D,CAAA"}
@@ -0,0 +1,174 @@
1
+ /**
2
+ * All location types that storage providers can serve.
3
+ * Each type maps to a logical category of files.
4
+ * A storage provider declares which location types it supports.
5
+ */
6
+ export type StorageLocationType = 'recordings-high' | 'recordings-low' | 'recordings-clips' | 'event-images' | 'models' | 'addons-data' | 'cache' | 'logs';
7
+ /** All location types as an array (for iteration) */
8
+ export declare const STORAGE_LOCATION_TYPES: readonly StorageLocationType[];
9
+ /** Default subdirectory names for filesystem storage */
10
+ export declare const DEFAULT_LOCATION_SUBDIRS: Readonly<Record<StorageLocationType, string>>;
11
+ /**
12
+ * A storage provider serves file-based storage for one or more location types.
13
+ * Multiple providers can coexist (local filesystem, NAS, S3, etc.).
14
+ * Each addon/system setting selects which provider to use per location type.
15
+ */
16
+ export interface IStorageProvider {
17
+ /** Unique provider ID (e.g., 'local', 'nas-synology', 's3-aws') */
18
+ readonly id: string;
19
+ /** Human-readable name (e.g., 'Local Filesystem', 'Synology NAS') */
20
+ readonly name: string;
21
+ /** Which location types this provider serves */
22
+ readonly supportedLocations: readonly StorageLocationType[];
23
+ /** Resolve an absolute path/URL for a file within a location */
24
+ resolve(location: StorageLocationType, relativePath: string): string;
25
+ /** Write file data */
26
+ write(location: StorageLocationType, relativePath: string, data: Buffer | NodeJS.ReadableStream): Promise<void>;
27
+ /** Read file data */
28
+ read(location: StorageLocationType, relativePath: string): Promise<Buffer>;
29
+ /** Check if a file exists */
30
+ exists(location: StorageLocationType, relativePath: string): Promise<boolean>;
31
+ /** List files/directories under a prefix within a location */
32
+ list(location: StorageLocationType, prefix?: string): Promise<readonly string[]>;
33
+ /** Delete a file */
34
+ delete(location: StorageLocationType, relativePath: string): Promise<void>;
35
+ /** Get available space in bytes, null if unknown (e.g., S3) */
36
+ getAvailableSpace(location: StorageLocationType): Promise<number | null>;
37
+ /** Lifecycle */
38
+ initialize(): Promise<void>;
39
+ shutdown(): Promise<void>;
40
+ }
41
+ /**
42
+ * All named collections that the settings backend manages.
43
+ * Each collection maps to a logical table/bucket in the backend.
44
+ */
45
+ export type SettingsCollection = 'system-settings' | 'addon-settings' | 'provider-settings' | 'device-settings' | 'detection-events' | 'audio-levels' | 'track-trails' | 'recording-segments' | 'recording-thumbnails' | 'recording-policies' | 'recording-storage-config' | 'recording-cleanup-queue' | 'known-faces';
46
+ /**
47
+ * Settings backend — persistent key-value and document storage.
48
+ * Default implementation: SQLite. Can be replaced by Postgres, etc.
49
+ */
50
+ export interface ISettingsBackend {
51
+ /** Get a single value by key from a collection */
52
+ get(collection: SettingsCollection, key: string): Promise<unknown>;
53
+ /** Set a value by key in a collection (upsert) */
54
+ set(collection: SettingsCollection, key: string, value: unknown): Promise<void>;
55
+ /** Get all entries matching an optional filter */
56
+ query(collection: SettingsCollection, filter?: QueryFilter): Promise<readonly SettingsRecord[]>;
57
+ /** Insert a new record */
58
+ insert(collection: SettingsCollection, record: SettingsRecord): Promise<void>;
59
+ /** Update an existing record by ID */
60
+ update(collection: SettingsCollection, id: string, data: Record<string, unknown>): Promise<void>;
61
+ /** Delete a record by key/ID */
62
+ delete(collection: SettingsCollection, key: string): Promise<void>;
63
+ /** Count entries in a collection */
64
+ count(collection: SettingsCollection, filter?: QueryFilter): Promise<number>;
65
+ /** Check if a collection is empty (used for first-boot detection) */
66
+ isEmpty(collection: SettingsCollection): Promise<boolean>;
67
+ /** Lifecycle */
68
+ initialize(): Promise<void>;
69
+ shutdown(): Promise<void>;
70
+ }
71
+ export interface SettingsRecord {
72
+ readonly id: string;
73
+ readonly data: Record<string, unknown>;
74
+ }
75
+ export interface QueryFilter {
76
+ where?: Record<string, unknown>;
77
+ whereIn?: Record<string, unknown[]>;
78
+ whereBetween?: Record<string, [unknown, unknown]>;
79
+ orderBy?: {
80
+ field: string;
81
+ direction: 'asc' | 'desc';
82
+ };
83
+ limit?: number;
84
+ offset?: number;
85
+ }
86
+ /**
87
+ * Embeddings backend — vector storage with approximate nearest neighbor search.
88
+ * Used for CLIP frame search, face recognition, plate matching.
89
+ * Default implementation: HNSW (usearch/hnswlib). Can be replaced by Qdrant, etc.
90
+ */
91
+ export interface IEmbeddingsBackend {
92
+ /** Create or open a named vector index */
93
+ openIndex(name: string, dimensions: number): Promise<IVectorIndex>;
94
+ /** List all index names */
95
+ listIndexes(): Promise<readonly string[]>;
96
+ /** Delete an index and its data */
97
+ deleteIndex(name: string): Promise<void>;
98
+ /** Lifecycle */
99
+ initialize(): Promise<void>;
100
+ shutdown(): Promise<void>;
101
+ }
102
+ export interface IVectorIndex {
103
+ /** Index name */
104
+ readonly name: string;
105
+ /** Vector dimensions */
106
+ readonly dimensions: number;
107
+ /** Insert a vector with ID and optional metadata */
108
+ insert(id: string, vector: Float32Array, metadata?: Record<string, unknown>): Promise<void>;
109
+ /** Batch insert for performance */
110
+ insertBatch(items: readonly VectorEntry[]): Promise<void>;
111
+ /** Search for nearest neighbors */
112
+ search(query: Float32Array, topK: number, filter?: EmbeddingFilter): Promise<readonly VectorSearchResult[]>;
113
+ /** Delete by ID */
114
+ delete(id: string): Promise<void>;
115
+ /** Count entries in the index */
116
+ count(): Promise<number>;
117
+ /** Flush pending writes to disk */
118
+ flush(): Promise<void>;
119
+ }
120
+ export interface VectorEntry {
121
+ readonly id: string;
122
+ readonly vector: Float32Array;
123
+ readonly metadata?: Record<string, unknown>;
124
+ }
125
+ export interface VectorSearchResult {
126
+ readonly id: string;
127
+ /** Similarity score (0-1, higher is more similar) */
128
+ readonly score: number;
129
+ readonly metadata?: Record<string, unknown>;
130
+ }
131
+ export interface EmbeddingFilter {
132
+ /** Filter by metadata key-value before vector search */
133
+ readonly where?: Record<string, unknown>;
134
+ /** Filter by timestamp range */
135
+ readonly timestampAfter?: number;
136
+ readonly timestampBefore?: number;
137
+ /** Filter by device */
138
+ readonly deviceId?: string;
139
+ }
140
+ /** @deprecated Use StorageLocationType instead */
141
+ export type StorageLocationName = StorageLocationType | 'data' | 'media' | 'recordings' | 'config' | 'events' | 'addon';
142
+ /** @deprecated Use IStorageProvider instead */
143
+ export interface StorageConfig {
144
+ locations: Record<string, string>;
145
+ }
146
+ /** @deprecated Use SettingsRecord instead */
147
+ export interface StorageRecord {
148
+ collection: string;
149
+ id: string;
150
+ data: Record<string, unknown>;
151
+ }
152
+ /** @deprecated Use ISettingsBackend instead */
153
+ export interface IStructuredStorage {
154
+ query(collection: string, filter?: QueryFilter): Promise<readonly StorageRecord[]>;
155
+ insert(record: StorageRecord): Promise<StorageRecord>;
156
+ update(collection: string, id: string, data: Record<string, unknown>): Promise<StorageRecord>;
157
+ delete(collection: string, id: string): Promise<void>;
158
+ count(collection: string, filter?: QueryFilter): Promise<number>;
159
+ }
160
+ /** @deprecated Use IStorageProvider.read/write instead */
161
+ export interface IFileStorage {
162
+ readFile(path: string): Promise<Buffer>;
163
+ writeFile(path: string, data: Buffer): Promise<void>;
164
+ deleteFile(path: string): Promise<void>;
165
+ listFiles(prefix?: string): Promise<readonly string[]>;
166
+ getFileUrl(path: string): Promise<string>;
167
+ exists(path: string): Promise<boolean>;
168
+ }
169
+ /** @deprecated Use IStorageProvider instead */
170
+ export interface IStorageLocation {
171
+ structured?: IStructuredStorage;
172
+ files?: IFileStorage;
173
+ }
174
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/interfaces/storage.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC3B,iBAAiB,GACjB,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,QAAQ,GACR,aAAa,GACb,OAAO,GACP,MAAM,CAAA;AAEV,qDAAqD;AACrD,eAAO,MAAM,sBAAsB,EAAE,SAAS,mBAAmB,EASvD,CAAA;AAEV,wDAAwD;AACxD,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CASlF,CAAA;AAMD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,mEAAmE;IACnE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IAEnB,qEAAqE;IACrE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAErB,gDAAgD;IAChD,QAAQ,CAAC,kBAAkB,EAAE,SAAS,mBAAmB,EAAE,CAAA;IAE3D,gEAAgE;IAChE,OAAO,CAAC,QAAQ,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,C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