@camstack/addon-provider-hikvision 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
@@ -4631,7 +4631,7 @@ function _instanceof(cls, params = {}) {
4631
4631
  return inst;
4632
4632
  }
4633
4633
  //#endregion
4634
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4634
+ //#region ../types/dist/sleep-NOH4yRwj.mjs
4635
4635
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4636
4636
  EventCategory["SystemBoot"] = "system.boot";
4637
4637
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5746,15 +5746,24 @@ var BaseAddon = class {
5746
5746
  } catch {}
5747
5747
  }
5748
5748
  /**
5749
- * Resolve the shared models directory path via the storage capability.
5750
- * Falls back to `camstack-data/models` if storage is unavailable.
5751
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5749
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5750
+ *
5751
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5752
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5753
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5754
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5755
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5756
+ * whose real data dir differs (e.g. the macOS electron agent).
5757
+ *
5758
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5759
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5752
5760
  */
5753
5761
  async resolveModelsDir() {
5754
- return this.ctx.api.storage.resolve.query({
5755
- location: "models",
5756
- relativePath: ""
5757
- }).catch(() => "camstack-data/models");
5762
+ const { join } = await import("node:path");
5763
+ const { promises: fsp } = await import("node:fs");
5764
+ const dir = join(this.ctx.nodeDataDir, "models");
5765
+ await fsp.mkdir(dir, { recursive: true });
5766
+ return dir;
5758
5767
  }
5759
5768
  /**
5760
5769
  * Access the runtime capability registry for in-process provider lookups.
@@ -15644,7 +15653,8 @@ method(object({
15644
15653
  sessionId: string().optional()
15645
15654
  }), ConvertResultSchema, {
15646
15655
  kind: "mutation",
15647
- auth: "admin"
15656
+ auth: "admin",
15657
+ timeoutMs: 6e5
15648
15658
  });
15649
15659
  var AddonHttpRouteSchema = object({
15650
15660
  method: _enum([
@@ -17223,7 +17233,14 @@ var NotificationRuleConditionsSchema = object({
17223
17233
  /** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
17224
17234
  * carrying a matching `data.eventType` string pass this condition. Rules without this field are
17225
17235
  * unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
17226
- eventTypeTokens: array(string()).readonly().optional()
17236
+ eventTypeTokens: array(string()).readonly().optional(),
17237
+ /** Match detections whose CLIP image embedding is semantically similar to this free-text
17238
+ * description. Requires the embedding-encoder cap to have pre-warmed the text vector.
17239
+ * `minSimilarity` is the cosine similarity threshold in [0, 1]. */
17240
+ clipDescription: object({
17241
+ text: string().min(1),
17242
+ minSimilarity: number().min(0).max(1)
17243
+ }).optional()
17227
17244
  });
17228
17245
  var NotificationRuleTemplateSchema = object({
17229
17246
  title: string(),
@@ -17465,6 +17482,16 @@ var TrackedDetectionSchema = object({
17465
17482
  zones: array(string()).readonly(),
17466
17483
  state: TrackStateSchema
17467
17484
  });
17485
+ var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
17486
+ var SearchObjectEventsInput = object({
17487
+ text: string(),
17488
+ deviceId: number().optional(),
17489
+ since: number().optional(),
17490
+ until: number().optional(),
17491
+ classFilter: string().optional(),
17492
+ limit: number().default(50),
17493
+ minScore: number().min(0).max(1).default(.2)
17494
+ });
17468
17495
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
17469
17496
  deviceId: number(),
17470
17497
  trackId: string()
@@ -17499,7 +17526,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17499
17526
  }), method(object({
17500
17527
  eventId: string(),
17501
17528
  kind: MediaFileKindEnum.optional()
17502
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
17529
+ }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
17503
17530
  deviceId: number(),
17504
17531
  timestamp: number(),
17505
17532
  frameWidth: number(),
@@ -22524,6 +22551,12 @@ Object.freeze({
22524
22551
  addonId: null,
22525
22552
  access: "create"
22526
22553
  },
22554
+ "pipelineAnalytics.searchObjectEvents": {
22555
+ capName: "pipeline-analytics",
22556
+ capScope: "device",
22557
+ addonId: null,
22558
+ access: "view"
22559
+ },
22527
22560
  "pipelineExecutor.cacheFrameInPool": {
22528
22561
  capName: "pipeline-executor",
22529
22562
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -4630,7 +4630,7 @@ function _instanceof(cls, params = {}) {
4630
4630
  return inst;
4631
4631
  }
4632
4632
  //#endregion
4633
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4633
+ //#region ../types/dist/sleep-NOH4yRwj.mjs
4634
4634
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4635
4635
  EventCategory["SystemBoot"] = "system.boot";
4636
4636
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5745,15 +5745,24 @@ var BaseAddon = class {
5745
5745
  } catch {}
5746
5746
  }
5747
5747
  /**
5748
- * Resolve the shared models directory path via the storage capability.
5749
- * Falls back to `camstack-data/models` if storage is unavailable.
5750
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5748
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5749
+ *
5750
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5751
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5752
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5753
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5754
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5755
+ * whose real data dir differs (e.g. the macOS electron agent).
5756
+ *
5757
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5758
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5751
5759
  */
5752
5760
  async resolveModelsDir() {
5753
- return this.ctx.api.storage.resolve.query({
5754
- location: "models",
5755
- relativePath: ""
5756
- }).catch(() => "camstack-data/models");
5761
+ const { join } = await import("node:path");
5762
+ const { promises: fsp } = await import("node:fs");
5763
+ const dir = join(this.ctx.nodeDataDir, "models");
5764
+ await fsp.mkdir(dir, { recursive: true });
5765
+ return dir;
5757
5766
  }
5758
5767
  /**
5759
5768
  * Access the runtime capability registry for in-process provider lookups.
@@ -15643,7 +15652,8 @@ method(object({
15643
15652
  sessionId: string().optional()
15644
15653
  }), ConvertResultSchema, {
15645
15654
  kind: "mutation",
15646
- auth: "admin"
15655
+ auth: "admin",
15656
+ timeoutMs: 6e5
15647
15657
  });
15648
15658
  var AddonHttpRouteSchema = object({
15649
15659
  method: _enum([
@@ -17222,7 +17232,14 @@ var NotificationRuleConditionsSchema = object({
17222
17232
  /** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
17223
17233
  * carrying a matching `data.eventType` string pass this condition. Rules without this field are
17224
17234
  * unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
17225
- eventTypeTokens: array(string()).readonly().optional()
17235
+ eventTypeTokens: array(string()).readonly().optional(),
17236
+ /** Match detections whose CLIP image embedding is semantically similar to this free-text
17237
+ * description. Requires the embedding-encoder cap to have pre-warmed the text vector.
17238
+ * `minSimilarity` is the cosine similarity threshold in [0, 1]. */
17239
+ clipDescription: object({
17240
+ text: string().min(1),
17241
+ minSimilarity: number().min(0).max(1)
17242
+ }).optional()
17226
17243
  });
17227
17244
  var NotificationRuleTemplateSchema = object({
17228
17245
  title: string(),
@@ -17464,6 +17481,16 @@ var TrackedDetectionSchema = object({
17464
17481
  zones: array(string()).readonly(),
17465
17482
  state: TrackStateSchema
17466
17483
  });
17484
+ var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
17485
+ var SearchObjectEventsInput = object({
17486
+ text: string(),
17487
+ deviceId: number().optional(),
17488
+ since: number().optional(),
17489
+ until: number().optional(),
17490
+ classFilter: string().optional(),
17491
+ limit: number().default(50),
17492
+ minScore: number().min(0).max(1).default(.2)
17493
+ });
17467
17494
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
17468
17495
  deviceId: number(),
17469
17496
  trackId: string()
@@ -17498,7 +17525,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17498
17525
  }), method(object({
17499
17526
  eventId: string(),
17500
17527
  kind: MediaFileKindEnum.optional()
17501
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
17528
+ }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
17502
17529
  deviceId: number(),
17503
17530
  timestamp: number(),
17504
17531
  frameWidth: number(),
@@ -22523,6 +22550,12 @@ Object.freeze({
22523
22550
  addonId: null,
22524
22551
  access: "create"
22525
22552
  },
22553
+ "pipelineAnalytics.searchObjectEvents": {
22554
+ capName: "pipeline-analytics",
22555
+ capScope: "device",
22556
+ addonId: null,
22557
+ access: "view"
22558
+ },
22526
22559
  "pipelineExecutor.cacheFrameInPool": {
22527
22560
  capName: "pipeline-executor",
22528
22561
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-hikvision",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Hikvision camera device provider addon for CamStack — ISAPI over HTTP(S) with digest auth (snapshot, alarm stream, RTSP discovery)",
5
5
  "keywords": [
6
6
  "camstack",