@camstack/addon-provider-rtsp 1.1.3 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.js CHANGED
@@ -4642,7 +4642,7 @@ function preprocess(fn, schema) {
4642
4642
  });
4643
4643
  }
4644
4644
  //#endregion
4645
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4645
+ //#region ../types/dist/sleep-NOH4yRwj.mjs
4646
4646
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4647
4647
  EventCategory["SystemBoot"] = "system.boot";
4648
4648
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5757,15 +5757,24 @@ var BaseAddon = class {
5757
5757
  } catch {}
5758
5758
  }
5759
5759
  /**
5760
- * Resolve the shared models directory path via the storage capability.
5761
- * Falls back to `camstack-data/models` if storage is unavailable.
5762
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5760
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5761
+ *
5762
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5763
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5764
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5765
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5766
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5767
+ * whose real data dir differs (e.g. the macOS electron agent).
5768
+ *
5769
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5770
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5763
5771
  */
5764
5772
  async resolveModelsDir() {
5765
- return this.ctx.api.storage.resolve.query({
5766
- location: "models",
5767
- relativePath: ""
5768
- }).catch(() => "camstack-data/models");
5773
+ const { join } = await import("node:path");
5774
+ const { promises: fsp } = await import("node:fs");
5775
+ const dir = join(this.ctx.nodeDataDir, "models");
5776
+ await fsp.mkdir(dir, { recursive: true });
5777
+ return dir;
5769
5778
  }
5770
5779
  /**
5771
5780
  * Access the runtime capability registry for in-process provider lookups.
@@ -15461,7 +15470,8 @@ method(object({
15461
15470
  sessionId: string().optional()
15462
15471
  }), ConvertResultSchema, {
15463
15472
  kind: "mutation",
15464
- auth: "admin"
15473
+ auth: "admin",
15474
+ timeoutMs: 6e5
15465
15475
  });
15466
15476
  var AddonHttpRouteSchema = object({
15467
15477
  method: _enum([
@@ -17040,7 +17050,14 @@ var NotificationRuleConditionsSchema = object({
17040
17050
  /** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
17041
17051
  * carrying a matching `data.eventType` string pass this condition. Rules without this field are
17042
17052
  * unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
17043
- eventTypeTokens: array(string()).readonly().optional()
17053
+ eventTypeTokens: array(string()).readonly().optional(),
17054
+ /** Match detections whose CLIP image embedding is semantically similar to this free-text
17055
+ * description. Requires the embedding-encoder cap to have pre-warmed the text vector.
17056
+ * `minSimilarity` is the cosine similarity threshold in [0, 1]. */
17057
+ clipDescription: object({
17058
+ text: string().min(1),
17059
+ minSimilarity: number().min(0).max(1)
17060
+ }).optional()
17044
17061
  });
17045
17062
  var NotificationRuleTemplateSchema = object({
17046
17063
  title: string(),
@@ -17282,6 +17299,16 @@ var TrackedDetectionSchema = object({
17282
17299
  zones: array(string()).readonly(),
17283
17300
  state: TrackStateSchema
17284
17301
  });
17302
+ var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
17303
+ var SearchObjectEventsInput = object({
17304
+ text: string(),
17305
+ deviceId: number().optional(),
17306
+ since: number().optional(),
17307
+ until: number().optional(),
17308
+ classFilter: string().optional(),
17309
+ limit: number().default(50),
17310
+ minScore: number().min(0).max(1).default(.2)
17311
+ });
17285
17312
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
17286
17313
  deviceId: number(),
17287
17314
  trackId: string()
@@ -17316,7 +17343,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17316
17343
  }), method(object({
17317
17344
  eventId: string(),
17318
17345
  kind: MediaFileKindEnum.optional()
17319
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
17346
+ }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
17320
17347
  deviceId: number(),
17321
17348
  timestamp: number(),
17322
17349
  frameWidth: number(),
@@ -21979,6 +22006,12 @@ Object.freeze({
21979
22006
  addonId: null,
21980
22007
  access: "create"
21981
22008
  },
22009
+ "pipelineAnalytics.searchObjectEvents": {
22010
+ capName: "pipeline-analytics",
22011
+ capScope: "device",
22012
+ addonId: null,
22013
+ access: "view"
22014
+ },
21982
22015
  "pipelineExecutor.cacheFrameInPool": {
21983
22016
  capName: "pipeline-executor",
21984
22017
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -4641,7 +4641,7 @@ function preprocess(fn, schema) {
4641
4641
  });
4642
4642
  }
4643
4643
  //#endregion
4644
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4644
+ //#region ../types/dist/sleep-NOH4yRwj.mjs
4645
4645
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4646
4646
  EventCategory["SystemBoot"] = "system.boot";
4647
4647
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5756,15 +5756,24 @@ var BaseAddon = class {
5756
5756
  } catch {}
5757
5757
  }
5758
5758
  /**
5759
- * Resolve the shared models directory path via the storage capability.
5760
- * Falls back to `camstack-data/models` if storage is unavailable.
5761
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5759
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5760
+ *
5761
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5762
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5763
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5764
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5765
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5766
+ * whose real data dir differs (e.g. the macOS electron agent).
5767
+ *
5768
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5769
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5762
5770
  */
5763
5771
  async resolveModelsDir() {
5764
- return this.ctx.api.storage.resolve.query({
5765
- location: "models",
5766
- relativePath: ""
5767
- }).catch(() => "camstack-data/models");
5772
+ const { join } = await import("node:path");
5773
+ const { promises: fsp } = await import("node:fs");
5774
+ const dir = join(this.ctx.nodeDataDir, "models");
5775
+ await fsp.mkdir(dir, { recursive: true });
5776
+ return dir;
5768
5777
  }
5769
5778
  /**
5770
5779
  * Access the runtime capability registry for in-process provider lookups.
@@ -15460,7 +15469,8 @@ method(object({
15460
15469
  sessionId: string().optional()
15461
15470
  }), ConvertResultSchema, {
15462
15471
  kind: "mutation",
15463
- auth: "admin"
15472
+ auth: "admin",
15473
+ timeoutMs: 6e5
15464
15474
  });
15465
15475
  var AddonHttpRouteSchema = object({
15466
15476
  method: _enum([
@@ -17039,7 +17049,14 @@ var NotificationRuleConditionsSchema = object({
17039
17049
  /** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
17040
17050
  * carrying a matching `data.eventType` string pass this condition. Rules without this field are
17041
17051
  * unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
17042
- eventTypeTokens: array(string()).readonly().optional()
17052
+ eventTypeTokens: array(string()).readonly().optional(),
17053
+ /** Match detections whose CLIP image embedding is semantically similar to this free-text
17054
+ * description. Requires the embedding-encoder cap to have pre-warmed the text vector.
17055
+ * `minSimilarity` is the cosine similarity threshold in [0, 1]. */
17056
+ clipDescription: object({
17057
+ text: string().min(1),
17058
+ minSimilarity: number().min(0).max(1)
17059
+ }).optional()
17043
17060
  });
17044
17061
  var NotificationRuleTemplateSchema = object({
17045
17062
  title: string(),
@@ -17281,6 +17298,16 @@ var TrackedDetectionSchema = object({
17281
17298
  zones: array(string()).readonly(),
17282
17299
  state: TrackStateSchema
17283
17300
  });
17301
+ var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
17302
+ var SearchObjectEventsInput = object({
17303
+ text: string(),
17304
+ deviceId: number().optional(),
17305
+ since: number().optional(),
17306
+ until: number().optional(),
17307
+ classFilter: string().optional(),
17308
+ limit: number().default(50),
17309
+ minScore: number().min(0).max(1).default(.2)
17310
+ });
17284
17311
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
17285
17312
  deviceId: number(),
17286
17313
  trackId: string()
@@ -17315,7 +17342,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17315
17342
  }), method(object({
17316
17343
  eventId: string(),
17317
17344
  kind: MediaFileKindEnum.optional()
17318
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
17345
+ }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
17319
17346
  deviceId: number(),
17320
17347
  timestamp: number(),
17321
17348
  frameWidth: number(),
@@ -21978,6 +22005,12 @@ Object.freeze({
21978
22005
  addonId: null,
21979
22006
  access: "create"
21980
22007
  },
22008
+ "pipelineAnalytics.searchObjectEvents": {
22009
+ capName: "pipeline-analytics",
22010
+ capScope: "device",
22011
+ addonId: null,
22012
+ access: "view"
22013
+ },
21981
22014
  "pipelineExecutor.cacheFrameInPool": {
21982
22015
  capName: "pipeline-executor",
21983
22016
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rtsp",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",