@camstack/types 0.1.4 → 0.1.6

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 (195) hide show
  1. package/package.json +3 -2
  2. package/dist/__tests__/addon-capability-provider.test.d.ts +0 -2
  3. package/dist/__tests__/addon-capability-provider.test.d.ts.map +0 -1
  4. package/dist/__tests__/addon-declaration.test.d.ts +0 -2
  5. package/dist/__tests__/addon-declaration.test.d.ts.map +0 -1
  6. package/dist/__tests__/capability.test.d.ts +0 -2
  7. package/dist/__tests__/capability.test.d.ts.map +0 -1
  8. package/dist/catalogs/coco-classmap.d.ts +0 -5
  9. package/dist/catalogs/coco-classmap.d.ts.map +0 -1
  10. package/dist/catalogs/index.d.ts +0 -2
  11. package/dist/catalogs/index.d.ts.map +0 -1
  12. package/dist/constants.d.ts +0 -3
  13. package/dist/constants.d.ts.map +0 -1
  14. package/dist/generated/addon-api.d.ts +0 -4870
  15. package/dist/generated/addon-api.d.ts.map +0 -1
  16. package/dist/index.d.ts +0 -82
  17. package/dist/index.d.ts.map +0 -1
  18. package/dist/interfaces/addon-i18n.d.ts +0 -41
  19. package/dist/interfaces/addon-i18n.d.ts.map +0 -1
  20. package/dist/interfaces/addon-routes.d.ts +0 -50
  21. package/dist/interfaces/addon-routes.d.ts.map +0 -1
  22. package/dist/interfaces/addon.d.ts +0 -294
  23. package/dist/interfaces/addon.d.ts.map +0 -1
  24. package/dist/interfaces/advanced-notifier.d.ts +0 -59
  25. package/dist/interfaces/advanced-notifier.d.ts.map +0 -1
  26. package/dist/interfaces/agent-protocol.d.ts +0 -189
  27. package/dist/interfaces/agent-protocol.d.ts.map +0 -1
  28. package/dist/interfaces/agent.d.ts +0 -87
  29. package/dist/interfaces/agent.d.ts.map +0 -1
  30. package/dist/interfaces/analysis-persistence.d.ts +0 -278
  31. package/dist/interfaces/analysis-persistence.d.ts.map +0 -1
  32. package/dist/interfaces/analysis.d.ts +0 -27
  33. package/dist/interfaces/analysis.d.ts.map +0 -1
  34. package/dist/interfaces/api-shared.d.ts +0 -169
  35. package/dist/interfaces/api-shared.d.ts.map +0 -1
  36. package/dist/interfaces/auth-provider.d.ts +0 -39
  37. package/dist/interfaces/auth-provider.d.ts.map +0 -1
  38. package/dist/interfaces/auth.d.ts +0 -47
  39. package/dist/interfaces/auth.d.ts.map +0 -1
  40. package/dist/interfaces/camera-pipeline.d.ts +0 -121
  41. package/dist/interfaces/camera-pipeline.d.ts.map +0 -1
  42. package/dist/interfaces/capability.d.ts +0 -84
  43. package/dist/interfaces/capability.d.ts.map +0 -1
  44. package/dist/interfaces/classifier.d.ts +0 -8
  45. package/dist/interfaces/classifier.d.ts.map +0 -1
  46. package/dist/interfaces/config-ui.d.ts +0 -152
  47. package/dist/interfaces/config-ui.d.ts.map +0 -1
  48. package/dist/interfaces/context.d.ts +0 -44
  49. package/dist/interfaces/context.d.ts.map +0 -1
  50. package/dist/interfaces/cropper.d.ts +0 -8
  51. package/dist/interfaces/cropper.d.ts.map +0 -1
  52. package/dist/interfaces/decoder.d.ts +0 -27
  53. package/dist/interfaces/decoder.d.ts.map +0 -1
  54. package/dist/interfaces/detection-addon.d.ts +0 -15
  55. package/dist/interfaces/detection-addon.d.ts.map +0 -1
  56. package/dist/interfaces/detector.d.ts +0 -8
  57. package/dist/interfaces/detector.d.ts.map +0 -1
  58. package/dist/interfaces/device-capabilities/accessory.d.ts +0 -14
  59. package/dist/interfaces/device-capabilities/accessory.d.ts.map +0 -1
  60. package/dist/interfaces/device-capabilities/audio-detector.d.ts +0 -12
  61. package/dist/interfaces/device-capabilities/audio-detector.d.ts.map +0 -1
  62. package/dist/interfaces/device-capabilities/camera.d.ts +0 -22
  63. package/dist/interfaces/device-capabilities/camera.d.ts.map +0 -1
  64. package/dist/interfaces/device-capabilities/doorbell.d.ts +0 -10
  65. package/dist/interfaces/device-capabilities/doorbell.d.ts.map +0 -1
  66. package/dist/interfaces/device-capabilities/events.d.ts +0 -47
  67. package/dist/interfaces/device-capabilities/events.d.ts.map +0 -1
  68. package/dist/interfaces/device-capabilities/index.d.ts +0 -15
  69. package/dist/interfaces/device-capabilities/index.d.ts.map +0 -1
  70. package/dist/interfaces/device-capabilities/motion-sensor.d.ts +0 -7
  71. package/dist/interfaces/device-capabilities/motion-sensor.d.ts.map +0 -1
  72. package/dist/interfaces/device-capabilities/native-detection.d.ts +0 -14
  73. package/dist/interfaces/device-capabilities/native-detection.d.ts.map +0 -1
  74. package/dist/interfaces/device-capabilities/object-detector.d.ts +0 -59
  75. package/dist/interfaces/device-capabilities/object-detector.d.ts.map +0 -1
  76. package/dist/interfaces/device-capabilities/pan-tilt-zoom.d.ts +0 -29
  77. package/dist/interfaces/device-capabilities/pan-tilt-zoom.d.ts.map +0 -1
  78. package/dist/interfaces/device-capabilities/recording.d.ts +0 -18
  79. package/dist/interfaces/device-capabilities/recording.d.ts.map +0 -1
  80. package/dist/interfaces/device-capabilities/siren.d.ts +0 -8
  81. package/dist/interfaces/device-capabilities/siren.d.ts.map +0 -1
  82. package/dist/interfaces/device-capabilities/status-light.d.ts +0 -7
  83. package/dist/interfaces/device-capabilities/status-light.d.ts.map +0 -1
  84. package/dist/interfaces/device-capabilities/switch.d.ts +0 -8
  85. package/dist/interfaces/device-capabilities/switch.d.ts.map +0 -1
  86. package/dist/interfaces/device-capabilities/two-way-audio.d.ts +0 -8
  87. package/dist/interfaces/device-capabilities/two-way-audio.d.ts.map +0 -1
  88. package/dist/interfaces/device-capability.d.ts +0 -14
  89. package/dist/interfaces/device-capability.d.ts.map +0 -1
  90. package/dist/interfaces/device-provider.d.ts +0 -43
  91. package/dist/interfaces/device-provider.d.ts.map +0 -1
  92. package/dist/interfaces/device.d.ts +0 -40
  93. package/dist/interfaces/device.d.ts.map +0 -1
  94. package/dist/interfaces/event-bus.d.ts +0 -22
  95. package/dist/interfaces/event-bus.d.ts.map +0 -1
  96. package/dist/interfaces/feature-flags.d.ts +0 -14
  97. package/dist/interfaces/feature-flags.d.ts.map +0 -1
  98. package/dist/interfaces/ffmpeg.d.ts +0 -10
  99. package/dist/interfaces/ffmpeg.d.ts.map +0 -1
  100. package/dist/interfaces/inference-capabilities.d.ts +0 -101
  101. package/dist/interfaces/inference-capabilities.d.ts.map +0 -1
  102. package/dist/interfaces/inference-engine.d.ts +0 -17
  103. package/dist/interfaces/inference-engine.d.ts.map +0 -1
  104. package/dist/interfaces/lifecycle.d.ts +0 -19
  105. package/dist/interfaces/lifecycle.d.ts.map +0 -1
  106. package/dist/interfaces/logging.d.ts +0 -33
  107. package/dist/interfaces/logging.d.ts.map +0 -1
  108. package/dist/interfaces/model-catalog.d.ts +0 -25
  109. package/dist/interfaces/model-catalog.d.ts.map +0 -1
  110. package/dist/interfaces/network-quality.d.ts +0 -25
  111. package/dist/interfaces/network-quality.d.ts.map +0 -1
  112. package/dist/interfaces/network.d.ts +0 -43
  113. package/dist/interfaces/network.d.ts.map +0 -1
  114. package/dist/interfaces/notification.d.ts +0 -53
  115. package/dist/interfaces/notification.d.ts.map +0 -1
  116. package/dist/interfaces/pipeline-runner.d.ts +0 -23
  117. package/dist/interfaces/pipeline-runner.d.ts.map +0 -1
  118. package/dist/interfaces/pipeline-slot.d.ts +0 -10
  119. package/dist/interfaces/pipeline-slot.d.ts.map +0 -1
  120. package/dist/interfaces/platform.d.ts +0 -55
  121. package/dist/interfaces/platform.d.ts.map +0 -1
  122. package/dist/interfaces/process.d.ts +0 -41
  123. package/dist/interfaces/process.d.ts.map +0 -1
  124. package/dist/interfaces/python-env.d.ts +0 -20
  125. package/dist/interfaces/python-env.d.ts.map +0 -1
  126. package/dist/interfaces/refiner.d.ts +0 -8
  127. package/dist/interfaces/refiner.d.ts.map +0 -1
  128. package/dist/interfaces/repl.d.ts +0 -26
  129. package/dist/interfaces/repl.d.ts.map +0 -1
  130. package/dist/interfaces/repositories.d.ts +0 -20
  131. package/dist/interfaces/repositories.d.ts.map +0 -1
  132. package/dist/interfaces/restreamer.d.ts +0 -24
  133. package/dist/interfaces/restreamer.d.ts.map +0 -1
  134. package/dist/interfaces/router.d.ts +0 -30
  135. package/dist/interfaces/router.d.ts.map +0 -1
  136. package/dist/interfaces/scene-intelligence.d.ts +0 -21
  137. package/dist/interfaces/scene-intelligence.d.ts.map +0 -1
  138. package/dist/interfaces/scoped-token.d.ts +0 -22
  139. package/dist/interfaces/scoped-token.d.ts.map +0 -1
  140. package/dist/interfaces/server-analysis.d.ts +0 -146
  141. package/dist/interfaces/server-analysis.d.ts.map +0 -1
  142. package/dist/interfaces/server-network.d.ts +0 -78
  143. package/dist/interfaces/server-network.d.ts.map +0 -1
  144. package/dist/interfaces/storage-backend.d.ts +0 -27
  145. package/dist/interfaces/storage-backend.d.ts.map +0 -1
  146. package/dist/interfaces/storage.d.ts +0 -174
  147. package/dist/interfaces/storage.d.ts.map +0 -1
  148. package/dist/interfaces/stream-broker.d.ts +0 -92
  149. package/dist/interfaces/stream-broker.d.ts.map +0 -1
  150. package/dist/interfaces/streaming.d.ts +0 -29
  151. package/dist/interfaces/streaming.d.ts.map +0 -1
  152. package/dist/interfaces/task-handler.d.ts +0 -46
  153. package/dist/interfaces/task-handler.d.ts.map +0 -1
  154. package/dist/interfaces/webrtc-provider.d.ts +0 -11
  155. package/dist/interfaces/webrtc-provider.d.ts.map +0 -1
  156. package/dist/interfaces/worker-protocol.d.ts +0 -110
  157. package/dist/interfaces/worker-protocol.d.ts.map +0 -1
  158. package/dist/schemas/system-settings-schemas.d.ts +0 -27
  159. package/dist/schemas/system-settings-schemas.d.ts.map +0 -1
  160. package/dist/types/analytics.d.ts +0 -75
  161. package/dist/types/analytics.d.ts.map +0 -1
  162. package/dist/types/benchmark.d.ts +0 -112
  163. package/dist/types/benchmark.d.ts.map +0 -1
  164. package/dist/types/camera-detection.d.ts +0 -34
  165. package/dist/types/camera-detection.d.ts.map +0 -1
  166. package/dist/types/config.d.ts +0 -37
  167. package/dist/types/config.d.ts.map +0 -1
  168. package/dist/types/detection.d.ts +0 -93
  169. package/dist/types/detection.d.ts.map +0 -1
  170. package/dist/types/device-type.d.ts +0 -10
  171. package/dist/types/device-type.d.ts.map +0 -1
  172. package/dist/types/entities.d.ts +0 -35
  173. package/dist/types/entities.d.ts.map +0 -1
  174. package/dist/types/events.d.ts +0 -35
  175. package/dist/types/events.d.ts.map +0 -1
  176. package/dist/types/io.d.ts +0 -25
  177. package/dist/types/io.d.ts.map +0 -1
  178. package/dist/types/labels.d.ts +0 -12
  179. package/dist/types/labels.d.ts.map +0 -1
  180. package/dist/types/live-state.d.ts +0 -47
  181. package/dist/types/live-state.d.ts.map +0 -1
  182. package/dist/types/models.d.ts +0 -79
  183. package/dist/types/models.d.ts.map +0 -1
  184. package/dist/types/pipeline-schema.d.ts +0 -78
  185. package/dist/types/pipeline-schema.d.ts.map +0 -1
  186. package/dist/types/pipeline.d.ts +0 -42
  187. package/dist/types/pipeline.d.ts.map +0 -1
  188. package/dist/types/tracked.d.ts +0 -21
  189. package/dist/types/tracked.d.ts.map +0 -1
  190. package/dist/types/zones.d.ts +0 -48
  191. package/dist/types/zones.d.ts.map +0 -1
  192. package/dist/utils/cosine-similarity.d.ts +0 -3
  193. package/dist/utils/cosine-similarity.d.ts.map +0 -1
  194. package/dist/utils/hf-url.d.ts +0 -2
  195. package/dist/utils/hf-url.d.ts.map +0 -1
@@ -1,294 +0,0 @@
1
- import type { PipelineSlot } from '../types/pipeline.js';
2
- import type { ConfigUISchema } from './config-ui.js';
3
- import type { IAddonRouter } from './router.js';
4
- import type { INetworkProvider } from './network.js';
5
- import type { IScopedLogger } from './logging.js';
6
- import type { IEventBus } from './event-bus.js';
7
- import type { IStorageProvider, IStorageLocation, ISettingsBackend, IEmbeddingsBackend } from './storage.js';
8
- import type { CapabilityDeclaration, CapabilityProviderMap } from './capability.js';
9
- import type { IElementConfig } from './context.js';
10
- import type { ITaskHandler } from './task-handler.js';
11
- import type { SubProcessInfo, WorkerProcessStats } from './worker-protocol.js';
12
- /** Storage interface for addon file operations */
13
- export interface IAddonFileStorage {
14
- readFile(path: string): Promise<Buffer>;
15
- writeFile(path: string, data: Buffer): Promise<void>;
16
- deleteFile(path: string): Promise<void>;
17
- listFiles(prefix?: string): Promise<readonly string[]>;
18
- exists(path: string): Promise<boolean>;
19
- }
20
- /** Storage interface for addon structured data (DB) */
21
- export interface IAddonStructuredStorage {
22
- query(collection: string, filter?: Record<string, unknown>): Promise<readonly unknown[]>;
23
- insert(collection: string, data: Record<string, unknown>): Promise<void>;
24
- update(collection: string, id: string, data: Record<string, unknown>): Promise<void>;
25
- delete(collection: string, id: string): Promise<void>;
26
- }
27
- /** Named file storage locations available to addons */
28
- export type AddonFileLocationName = 'data' | 'media' | 'recordings' | 'models' | 'cache' | 'logs';
29
- /** Named structured storage locations available to addons */
30
- export type AddonStructuredLocationName = 'data' | 'events' | 'config';
31
- /** Combined storage location name (union of file and structured) */
32
- export type AddonStorageLocationName = AddonFileLocationName | AddonStructuredLocationName;
33
- /** Storage access for addons -- replaces raw AddonLocationPaths */
34
- export interface AddonStorageLocations {
35
- /** Get file storage for a named location */
36
- getFiles(location: AddonFileLocationName): IAddonFileStorage;
37
- /** Get structured storage (DB) for a named location */
38
- getStructured(location: AddonStructuredLocationName): IAddonStructuredStorage;
39
- }
40
- export type AddonCapability = 'storage' | 'backup' | 'log-destination' | 'device-exporter' | 'network-access' | 'turn-provider' | 'webrtc-provider' | 'remote-access' | 'recording-engine' | 'notification-output' | 'streaming-engine' | 'pipeline-consumer' | 'detection-engine' | 'object-detector' | 'motion-analyzer' | 'sub-detector' | 'face-detector' | 'plate-detector' | 'recognizer' | 'face-recognizer' | 'plate-recognizer' | 'audio-classifier' | 'device-provider' | 'stream-broker' | 'analysis-data-persistence' | 'analysis-pipeline';
41
- export interface RequiredStep {
42
- readonly slot: PipelineSlot;
43
- readonly outputClasses: readonly string[];
44
- readonly description: string;
45
- }
46
- export interface AddonManifest {
47
- readonly id: string;
48
- readonly name: string;
49
- readonly version: string;
50
- readonly description?: string;
51
- /** Relative path to SVG icon asset within the addon package */
52
- readonly icon?: string;
53
- /** Brand hex color for UI display (e.g., "#3b82f6") */
54
- readonly color?: string;
55
- /**
56
- * Whether multiple instances of this provider can be created.
57
- * 'unique' — only one instance allowed (e.g., RTSP, ONVIF)
58
- * 'multiple' — user can create N instances (e.g., Frigate, Scrypted)
59
- * Default: 'multiple'
60
- */
61
- readonly instanceMode?: 'unique' | 'multiple';
62
- /** Whether this addon is protected (required by the system, cannot be uninstalled) */
63
- readonly protected?: boolean;
64
- readonly packageName?: string;
65
- readonly capabilities?: readonly (AddonCapability | {
66
- name: string;
67
- mode: string;
68
- })[];
69
- readonly requiredFeatures?: readonly string[];
70
- readonly slot?: PipelineSlot;
71
- readonly inputClasses?: readonly string[];
72
- readonly outputClasses?: readonly string[];
73
- readonly requiredSteps?: readonly RequiredStep[];
74
- readonly supportsCustomModels?: boolean;
75
- readonly mayRequirePython?: boolean;
76
- readonly defaultConfig?: Readonly<Record<string, unknown>>;
77
- /** Whether this addon performs active inference with models.
78
- * Passive addons (e.g. motion-detection) set this to false
79
- * and are excluded from the inference pipeline schema. Default: true. */
80
- readonly passive?: boolean;
81
- /**
82
- * Label output type — declares what kind of label this addon produces
83
- * when used as a classifier/recognizer in the pipeline.
84
- * Used to tag LabelData.origin so the UI can render labels appropriately.
85
- */
86
- readonly labelOutputType?: import('../types/detection.js').LabelOrigin;
87
- }
88
- /** @deprecated Use IStorageProvider.resolve() instead of raw paths */
89
- export interface AddonLocationPaths {
90
- readonly data: string;
91
- readonly media: string;
92
- readonly recordings: string;
93
- readonly models: string;
94
- readonly logs: string;
95
- readonly cache: string;
96
- }
97
- /**
98
- * Minimal model-management API exposed to addons via AddonContext.
99
- */
100
- export interface IAddonModelManager {
101
- /** Ensure a model is downloaded. Returns the local file path. */
102
- ensure(modelId: string, format?: import('../types/models.js').ModelFormat): Promise<string>;
103
- /** Ensure extra files for a model are downloaded. Returns paths. */
104
- ensureExtraFiles(modelId: string): Promise<readonly string[]>;
105
- /** Absolute path to the shared models directory. */
106
- getModelsDir(): string;
107
- /** Check if a model is already downloaded. */
108
- isDownloaded(modelId: string, format?: import('../types/models.js').ModelFormat): boolean;
109
- /** @deprecated Use ensure() instead. Legacy API kept for backward compatibility. */
110
- downloadModel(id: string): Promise<string>;
111
- }
112
- /** Process management for addon sub-processes (ffmpeg, python, etc.) */
113
- export interface IAddonProcessManager {
114
- /** Spawn a child process managed by this addon's worker */
115
- spawn(config: SubProcessConfig): Promise<IManagedSubProcess>;
116
- /** List all sub-processes spawned by this addon */
117
- listProcesses(): readonly SubProcessInfo[];
118
- /** Get worker stats (this addon's worker process) */
119
- getWorkerStats(): WorkerProcessStats;
120
- }
121
- export interface SubProcessConfig {
122
- readonly name: string;
123
- readonly command: string;
124
- readonly args?: readonly string[];
125
- readonly cwd?: string;
126
- readonly env?: Readonly<Record<string, string>>;
127
- readonly autoRestart?: boolean;
128
- readonly maxRestarts?: number;
129
- }
130
- export interface IManagedSubProcess {
131
- readonly pid: number;
132
- readonly name: string;
133
- getStats(): WorkerProcessStats;
134
- write(data: Buffer): void;
135
- readonly stdout: AsyncIterable<Buffer>;
136
- readonly stderr: AsyncIterable<Buffer>;
137
- kill(signal?: NodeJS.Signals): void;
138
- wait(): Promise<{
139
- code: number | null;
140
- signal: string | null;
141
- }>;
142
- onExit(handler: (code: number | null) => void): void;
143
- onError(handler: (error: Error) => void): void;
144
- }
145
- /** Dependency manager — ensures binaries/tools are available for addons */
146
- export interface IAddonDepsManager {
147
- /** Ensure a named binary is available (check local -> PATH -> download) */
148
- ensureBinary(opts: {
149
- readonly name: string;
150
- readonly downloadUrl: string;
151
- readonly isArchive?: boolean;
152
- readonly archiveFormat?: 'zip' | 'tar.gz' | 'tar.xz';
153
- readonly archiveInnerPath?: string;
154
- }): Promise<string>;
155
- /** Ensure ffmpeg is available */
156
- ensureFfmpeg(): Promise<string>;
157
- /** Ensure Python is available, returns path or null if unavailable */
158
- ensurePython(): Promise<string | null>;
159
- /** Install Python packages in the managed Python environment */
160
- installPythonPackages(packages: readonly string[]): Promise<void>;
161
- /** Get the deps directory path */
162
- getDepsDir(): string;
163
- }
164
- /**
165
- * AddonContext -- injected into every addon at initialize().
166
- *
167
- * The context includes both the CamstackContext fields (id, logger, eventBus, storage, config)
168
- * and addon-specific extras (addonConfig, models, locationPaths, router, network).
169
- */
170
- /**
171
- * AddonContext -- injected into every addon at initialize().
172
- *
173
- * The `api` field is typed as `AddonApi` — a generated interface that
174
- * mirrors the server's tRPC router namespaces. This gives addons type-safe
175
- * access to server procedures without depending on the server package.
176
- *
177
- * To regenerate after changing routers: npx tsx scripts/generate-api-types.ts
178
- */
179
- export interface AddonContext {
180
- /** Immutable progressive ID */
181
- readonly id: string;
182
- /** Pre-scoped logger */
183
- readonly logger: IScopedLogger;
184
- /** System event bus */
185
- readonly eventBus: IEventBus;
186
- /** Scoped storage location (legacy — use storageProvider instead) */
187
- readonly storage: IStorageLocation;
188
- /** Persisted config store */
189
- readonly config: IElementConfig;
190
- /** Bootstrap configuration from server settings (read-only) */
191
- readonly addonConfig: Readonly<Record<string, unknown>>;
192
- /** Model management -- download default models or retrieve cached paths. */
193
- models?: IAddonModelManager;
194
- /** @deprecated Use storageProvider.resolve() instead */
195
- readonly locationPaths: AddonLocationPaths;
196
- /** File storage provider — resolve paths, read/write files per location type */
197
- readonly storageProvider?: IStorageProvider;
198
- /** Settings backend — query/insert structured data (events, settings, metadata) */
199
- readonly settingsBackend?: ISettingsBackend;
200
- /** Embeddings backend — vector storage for similarity search */
201
- readonly embeddingsBackend?: IEmbeddingsBackend;
202
- /**
203
- * Private data directory for this addon.
204
- * Resolved via storageProvider.resolve('addons-data', '{addonId}/').
205
- * The addon owns this directory exclusively.
206
- */
207
- readonly dataDir: string;
208
- /** HTTP router for registering addon routes */
209
- readonly router?: IAddonRouter;
210
- /** Network access provider */
211
- readonly network?: INetworkProvider;
212
- /**
213
- * Register a task handler that can be dispatched by the hub.
214
- * Only effective in agent mode — in hub mode, handlers are stored but not dispatched.
215
- */
216
- registerTaskHandler?(handler: ITaskHandler): void;
217
- /** Process management — spawn and monitor sub-processes */
218
- readonly process?: IAddonProcessManager;
219
- /** Dependency management — ensure binary/tool availability */
220
- readonly deps?: IAddonDepsManager;
221
- /**
222
- * Full tRPC client — same API as the frontend.
223
- * Transport is transparent: direct caller (in-process), WSS (worker), or WSS (remote agent).
224
- * Use this for all server interactions: storage, events, devices, streaming, etc.
225
- */
226
- readonly api?: import('../generated/addon-api.js').AddonApi;
227
- }
228
- export interface ICamstackAddon {
229
- readonly id?: string;
230
- readonly manifest: AddonManifest;
231
- initialize(context: AddonContext): Promise<void>;
232
- shutdown(): Promise<void>;
233
- getConfigSchema?(): ConfigUISchema;
234
- /**
235
- * Return the provider instance for a declared capability.
236
- * Called by CapabilityRegistry after initialize() succeeds.
237
- * Returns null if this addon does not provide the requested capability.
238
- */
239
- getCapabilityProvider?<K extends keyof CapabilityProviderMap>(name: K): CapabilityProviderMap[K] | null;
240
- }
241
- /** Declaration of a UI page provided by an addon */
242
- export interface AddonPageDeclaration {
243
- /** Unique page ID (scoped to addon) */
244
- readonly id: string;
245
- /** Display label for sidebar */
246
- readonly label: string;
247
- /** Lucide icon name for sidebar */
248
- readonly icon: string;
249
- /** Route path (e.g., '/benchmark') */
250
- readonly path: string;
251
- /** Relative path to JS bundle within addon package (default export = React component) */
252
- readonly bundle: string;
253
- /** @deprecated Web component element name — addon pages now export React components */
254
- readonly element?: string;
255
- }
256
- /** Provider interface for addons that expose UI pages */
257
- export interface IAddonPageProvider {
258
- readonly id: string;
259
- getPages(): readonly AddonPageDeclaration[];
260
- }
261
- /** Provider interface for the admin UI shell (singleton capability) */
262
- export interface IAdminUI {
263
- getStaticDir(): string;
264
- getVersion(): string;
265
- }
266
- export interface AddonDeclaration {
267
- readonly id: string;
268
- readonly entry: string;
269
- readonly slot: PipelineSlot;
270
- /** Relative path to SVG icon asset within the addon package */
271
- readonly icon?: string;
272
- /** Brand hex color for UI display */
273
- readonly color?: string;
274
- /** Instance mode: 'unique' or 'multiple'. Default: 'multiple' */
275
- readonly instanceMode?: 'unique' | 'multiple';
276
- /** @deprecated Use inProcess instead. Legacy opt-in flag for forking. */
277
- readonly forkable?: boolean;
278
- /**
279
- * Force this addon to stay in-process (no forking).
280
- * Default: false — all non-infra addons are forked by default.
281
- * Use CAMSTACK_FORCE_INPROCESS=true env var for emergency global fallback.
282
- */
283
- readonly inProcess?: boolean;
284
- /** Capabilities this addon provides. Declared in package.json camstack.addons[].capabilities */
285
- readonly capabilities?: readonly CapabilityDeclaration[];
286
- /** UI pages provided by this addon */
287
- readonly pages?: readonly AddonPageDeclaration[];
288
- }
289
- export interface AddonPackageManifest {
290
- /** Human-readable package name for UI display (e.g., "CamStack Vision") */
291
- readonly displayName?: string;
292
- readonly addons: readonly AddonDeclaration[];
293
- }
294
- //# sourceMappingURL=addon.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addon.d.ts","sourceRoot":"","sources":["../../src/interfaces/addon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAC5G,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AACnF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,M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I,SAAS,oBAAoB,EAAE,CAAA;CAC5C;AAED,uEAAuE;AACvE,MAAM,WAAW,QAAQ;IACvB,YAAY,IAAI,MAAM,CAAA;IACtB,UAAU,IAAI,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,+DAA+D;IAC/D,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,qCAAqC;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,iEAAiE;IACjE,QAAQ,CAAC,YAAY,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAA;IAC7C,yEAAyE;IACzE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAC5B,gGAAgG;IAChG,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAA;IACxD,sCAAsC;IACtC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAA;CACjD;AAED,MAAM,WAAW,oBAAoB;IACnC,2EAA2E;IAC3E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,MAAM,EAAE,SAAS,gBAAgB,EAAE,CAAA;CAC7C"}
@@ -1,59 +0,0 @@
1
- export interface NotificationRule {
2
- readonly id: string;
3
- readonly name: string;
4
- readonly enabled: boolean;
5
- readonly eventTypes: readonly string[];
6
- readonly conditions: {
7
- readonly deviceIds?: readonly string[];
8
- readonly classNames?: readonly string[];
9
- readonly zoneIds?: readonly string[];
10
- readonly minConfidence?: number;
11
- readonly source?: 'pipeline' | 'onboard' | 'any';
12
- readonly schedule?: {
13
- readonly days: readonly number[];
14
- readonly startHour: number;
15
- readonly endHour: number;
16
- };
17
- readonly cooldownSeconds?: number;
18
- readonly minDwellSeconds?: number;
19
- };
20
- readonly outputs: readonly string[];
21
- readonly template?: {
22
- readonly title: string;
23
- readonly body: string;
24
- readonly imageMode: 'crop' | 'annotated' | 'full' | 'none';
25
- };
26
- readonly priority: 'low' | 'normal' | 'high' | 'critical';
27
- }
28
- export interface NotificationTestResult {
29
- readonly ruleId: string;
30
- readonly eventId: string;
31
- readonly timestamp: number;
32
- readonly wouldFire: boolean;
33
- readonly reason?: string;
34
- }
35
- export interface NotificationHistoryFilter {
36
- readonly ruleId?: string;
37
- readonly deviceId?: string;
38
- readonly from?: number;
39
- readonly to?: number;
40
- readonly limit?: number;
41
- }
42
- export interface NotificationHistoryEntry {
43
- readonly id: string;
44
- readonly ruleId: string;
45
- readonly ruleName: string;
46
- readonly eventId: string;
47
- readonly timestamp: number;
48
- readonly outputs: readonly string[];
49
- readonly success: boolean;
50
- readonly error?: string;
51
- }
52
- export interface IAdvancedNotifier {
53
- getRules(): readonly NotificationRule[];
54
- upsertRule(rule: NotificationRule): void;
55
- deleteRule(ruleId: string): void;
56
- testRule(ruleId: string, lookbackMinutes: number): Promise<NotificationTestResult[]>;
57
- getHistory(filter?: NotificationHistoryFilter): Promise<NotificationHistoryEntry[]>;
58
- }
59
- //# sourceMappingURL=advanced-notifier.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"advanced-notifier.d.ts","sourceRoot":"","sources":["../../src/interfaces/advanced-notifier.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;IACtC,QAAQ,CAAC,UAAU,EAAE;QACnB,QAAQ,CAAC,SAAS,C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QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,IAAI,SAAS,gBAAgB,EAAE,CAAA;IACvC,UAAU,CAAC,IAAI,EAAE,gBAAgB,GAAG,IAAI,CAAA;IACxC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAAA;IACpF,UAAU,CAAC,MAAM,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAAA;CACpF"}
@@ -1,189 +0,0 @@
1
- import type { TaskProgress } from './task-handler.js';
2
- export type AgentCapability = 'decoder' | 'transcoder' | 'detector' | 'recorder';
3
- export type RolePriority = 'primary' | 'backup' | 'overflow';
4
- export interface CameraRoleAssignment {
5
- cameraId: string;
6
- role: AgentCapability;
7
- agentId: string;
8
- priority: RolePriority;
9
- rtspUrl?: string;
10
- detectionConfig?: {
11
- modelId: string;
12
- runtime: string;
13
- confidence: number;
14
- fps: number;
15
- classes?: string[];
16
- };
17
- }
18
- export type HubToAgentMessage = {
19
- type: 'assign';
20
- assignment: CameraRoleAssignment;
21
- } | {
22
- type: 'unassign';
23
- cameraId: string;
24
- role: AgentCapability;
25
- } | {
26
- type: 'recording.start';
27
- cameraId: string;
28
- rtspUrl: string;
29
- } | {
30
- type: 'recording.stop';
31
- cameraId: string;
32
- } | {
33
- type: 'benchmark.run';
34
- config: RemoteBenchmarkConfig;
35
- } | {
36
- type: 'config.update';
37
- addonId: string;
38
- config: Record<string, unknown>;
39
- } | {
40
- type: 'task.execute';
41
- taskId: string;
42
- taskType: string;
43
- payload: unknown;
44
- } | {
45
- type: 'task.cancel';
46
- taskId: string;
47
- } | {
48
- type: 'addon.install';
49
- package: string;
50
- version?: string;
51
- } | {
52
- type: 'addon.uninstall';
53
- package: string;
54
- } | {
55
- type: 'addon.update';
56
- package: string;
57
- version?: string;
58
- } | {
59
- type: 'addon.restart';
60
- } | {
61
- type: 'ping';
62
- };
63
- export type AgentToHubMessage = {
64
- type: 'register';
65
- info: AgentRegistrationInfo;
66
- } | {
67
- type: 'heartbeat';
68
- status: AgentRuntimeStatus;
69
- } | {
70
- type: 'detection.result';
71
- cameraId: string;
72
- detections: DetectionResult[];
73
- timestamp: number;
74
- inferenceMs: number;
75
- } | {
76
- type: 'recording.segment';
77
- cameraId: string;
78
- segment: RecordingSegmentInfo;
79
- } | {
80
- type: 'recording.status';
81
- cameraId: string;
82
- recording: boolean;
83
- } | {
84
- type: 'benchmark.progress';
85
- event: BenchmarkStreamEvent;
86
- } | {
87
- type: 'benchmark.result';
88
- report: BenchmarkReport;
89
- } | {
90
- type: 'task.result';
91
- taskId: string;
92
- success: boolean;
93
- result?: unknown;
94
- error?: string;
95
- } | {
96
- type: 'task.progress';
97
- taskId: string;
98
- progress: TaskProgress;
99
- } | {
100
- type: 'addon.install-result';
101
- package: string;
102
- success: boolean;
103
- version?: string;
104
- error?: string;
105
- } | {
106
- type: 'addon.uninstall-result';
107
- package: string;
108
- success: boolean;
109
- error?: string;
110
- } | {
111
- type: 'addon.update-result';
112
- package: string;
113
- success: boolean;
114
- version?: string;
115
- error?: string;
116
- } | {
117
- type: 'log';
118
- level: string;
119
- scope: string;
120
- message: string;
121
- } | {
122
- type: 'pong';
123
- };
124
- export declare const BINARY_FRAME_HEADER_SIZE = 29;
125
- export declare const BINARY_FRAME_TYPE = 1;
126
- export interface AgentRegistrationInfo {
127
- id: string;
128
- name: string;
129
- capabilities: AgentCapability[];
130
- host: string;
131
- port: number;
132
- platform: string;
133
- arch: string;
134
- cpuCores: number;
135
- memoryMB: number;
136
- gpuModel?: string;
137
- pythonRuntimes: string[];
138
- httpPort: number;
139
- /** Task types this agent can handle (e.g., 'pipeline.decode', 'system.info') */
140
- taskTypes?: string[];
141
- /** Installed addons on this agent */
142
- installedAddons?: string[];
143
- }
144
- export interface AgentRuntimeStatus {
145
- activeCameras: number;
146
- cpuPercent: number;
147
- memoryPercent: number;
148
- fps: Record<string, number>;
149
- errors: string[];
150
- }
151
- export interface DetectionResult {
152
- className: string;
153
- score: number;
154
- bbox: [number, number, number, number];
155
- }
156
- export interface RecordingSegmentInfo {
157
- id: string;
158
- startTime: number;
159
- endTime: number;
160
- duration: number;
161
- sizeBytes: number;
162
- path: string;
163
- format: 'mp4' | 'ts';
164
- }
165
- export interface RemoteBenchmarkConfig {
166
- runtime: string;
167
- modelId?: string;
168
- durationMs: number;
169
- warmupMs: number;
170
- inputWidth: number;
171
- inputHeight: number;
172
- }
173
- export interface BenchmarkStreamEvent {
174
- phase: 'warmup' | 'running';
175
- iteration: number;
176
- inferenceMs: number;
177
- }
178
- export interface BenchmarkReport {
179
- runtime: string;
180
- modelId?: string;
181
- iterations: number;
182
- meanMs: number;
183
- p50Ms: number;
184
- p95Ms: number;
185
- p99Ms: number;
186
- minMs: number;
187
- maxMs: number;
188
- }
189
- //# sourceMappingURL=agent-protocol.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-protocol.d.ts","sourceRoot":"","sources":["../../src/interfaces/agent-protocol.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGrD,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAA;AAChF,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAA;AAE5D,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,eAAe,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,YAAY,CAAA;IACtB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE;QAChB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,EAAE,MAAM,CAAA;QACf,UAAU,EAAE,MAAM,CAAA;QAClB,GAAG,EAAE,MAAM,CAAA;QACX,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;KACnB,CAAA;CACF;AAGD,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,UAAU,EAAE,oBAAoB,CAAA;CAAE,GACpD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,GAC7D;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,qBAAqB,CAAA;CAAE,GACxD;IAAE,IAAI,EAAE,eAAe,CAAC;IA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AA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd"}
@@ -1,87 +0,0 @@
1
- export interface AgentInfo {
2
- readonly id: string;
3
- readonly name: string;
4
- readonly capabilities: readonly string[];
5
- readonly host: string;
6
- readonly port: number;
7
- readonly resources?: AgentResources;
8
- }
9
- export interface AgentResources {
10
- readonly cpuCores?: number;
11
- readonly memoryMB?: number;
12
- readonly gpuAvailable?: boolean;
13
- readonly gpuModel?: string;
14
- }
15
- export interface AgentStatus {
16
- readonly id: string;
17
- readonly name: string;
18
- readonly state: 'online' | 'offline' | 'degraded';
19
- readonly capabilities: readonly string[];
20
- readonly lastHeartbeat: number;
21
- readonly connectedSince?: number;
22
- readonly resources?: AgentResources;
23
- readonly activeTaskCount: number;
24
- readonly completedTaskCount: number;
25
- readonly failedTaskCount: number;
26
- }
27
- export interface AgentTask {
28
- readonly id: string;
29
- readonly capability: string;
30
- readonly input: Record<string, unknown>;
31
- readonly timeout: number;
32
- readonly priority: 'low' | 'normal' | 'high';
33
- readonly label?: string;
34
- }
35
- export interface AgentTaskResult {
36
- readonly taskId: string;
37
- readonly agentId: string;
38
- readonly status: 'success' | 'error' | 'timeout';
39
- readonly output?: Record<string, unknown>;
40
- readonly error?: string;
41
- readonly durationMs: number;
42
- }
43
- export interface TaskDispatchOptions {
44
- readonly preferredAgent?: string;
45
- readonly capability: string;
46
- readonly remoteOnly?: boolean;
47
- }
48
- export interface AgentEntry {
49
- readonly info: AgentInfo;
50
- state: 'online' | 'offline' | 'degraded';
51
- connectedSince: number;
52
- lastHeartbeat: number;
53
- activeTaskCount: number;
54
- completedTaskCount: number;
55
- failedTaskCount: number;
56
- }
57
- /** Shape returned by agents.listAgents — enriched agent entry with status and process info */
58
- export interface AgentListItem {
59
- readonly info: {
60
- readonly id: string;
61
- readonly name: string;
62
- readonly capabilities: readonly string[];
63
- readonly host?: string;
64
- readonly port?: number;
65
- readonly platform?: string;
66
- readonly arch?: string;
67
- readonly cpuModel?: string;
68
- readonly cpuCores?: number;
69
- readonly memoryMB?: number;
70
- readonly gpuAvailable?: boolean;
71
- readonly gpuModel?: string;
72
- readonly pythonRuntimes?: readonly string[];
73
- readonly httpPort?: number;
74
- readonly installedAddons?: readonly string[];
75
- };
76
- readonly status: {
77
- readonly activeCameras: number;
78
- readonly cpuPercent: number;
79
- readonly memoryPercent: number;
80
- readonly fps: Readonly<Record<string, number>>;
81
- readonly errors: readonly string[];
82
- };
83
- readonly connectedSince: number;
84
- readonly isHub: boolean;
85
- readonly subProcesses: readonly unknown[];
86
- }
87
- //# sourceMappingURL=agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../src/interfaces/agent.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAA;IACxC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IAC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