@camstack/addon-provider-homematic 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
@@ -4651,7 +4651,7 @@ function preprocess(fn, schema) {
4651
4651
  });
4652
4652
  }
4653
4653
  //#endregion
4654
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4654
+ //#region ../types/dist/sleep-NOH4yRwj.mjs
4655
4655
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4656
4656
  EventCategory["SystemBoot"] = "system.boot";
4657
4657
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5766,15 +5766,24 @@ var BaseAddon = class {
5766
5766
  } catch {}
5767
5767
  }
5768
5768
  /**
5769
- * Resolve the shared models directory path via the storage capability.
5770
- * Falls back to `camstack-data/models` if storage is unavailable.
5771
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5769
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5770
+ *
5771
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5772
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5773
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5774
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5775
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5776
+ * whose real data dir differs (e.g. the macOS electron agent).
5777
+ *
5778
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5779
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5772
5780
  */
5773
5781
  async resolveModelsDir() {
5774
- return this.ctx.api.storage.resolve.query({
5775
- location: "models",
5776
- relativePath: ""
5777
- }).catch(() => "camstack-data/models");
5782
+ const { join } = await import("node:path");
5783
+ const { promises: fsp } = await import("node:fs");
5784
+ const dir = join(this.ctx.nodeDataDir, "models");
5785
+ await fsp.mkdir(dir, { recursive: true });
5786
+ return dir;
5778
5787
  }
5779
5788
  /**
5780
5789
  * Access the runtime capability registry for in-process provider lookups.
@@ -15516,7 +15525,8 @@ method(object({
15516
15525
  sessionId: string().optional()
15517
15526
  }), ConvertResultSchema, {
15518
15527
  kind: "mutation",
15519
- auth: "admin"
15528
+ auth: "admin",
15529
+ timeoutMs: 6e5
15520
15530
  });
15521
15531
  var AddonHttpRouteSchema = object({
15522
15532
  method: _enum([
@@ -17052,7 +17062,14 @@ var NotificationRuleConditionsSchema = object({
17052
17062
  /** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
17053
17063
  * carrying a matching `data.eventType` string pass this condition. Rules without this field are
17054
17064
  * unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
17055
- eventTypeTokens: array(string()).readonly().optional()
17065
+ eventTypeTokens: array(string()).readonly().optional(),
17066
+ /** Match detections whose CLIP image embedding is semantically similar to this free-text
17067
+ * description. Requires the embedding-encoder cap to have pre-warmed the text vector.
17068
+ * `minSimilarity` is the cosine similarity threshold in [0, 1]. */
17069
+ clipDescription: object({
17070
+ text: string().min(1),
17071
+ minSimilarity: number().min(0).max(1)
17072
+ }).optional()
17056
17073
  });
17057
17074
  var NotificationRuleTemplateSchema = object({
17058
17075
  title: string(),
@@ -17294,6 +17311,16 @@ var TrackedDetectionSchema = object({
17294
17311
  zones: array(string()).readonly(),
17295
17312
  state: TrackStateSchema
17296
17313
  });
17314
+ var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
17315
+ var SearchObjectEventsInput = object({
17316
+ text: string(),
17317
+ deviceId: number().optional(),
17318
+ since: number().optional(),
17319
+ until: number().optional(),
17320
+ classFilter: string().optional(),
17321
+ limit: number().default(50),
17322
+ minScore: number().min(0).max(1).default(.2)
17323
+ });
17297
17324
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
17298
17325
  deviceId: number(),
17299
17326
  trackId: string()
@@ -17328,7 +17355,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17328
17355
  }), method(object({
17329
17356
  eventId: string(),
17330
17357
  kind: MediaFileKindEnum.optional()
17331
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
17358
+ }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
17332
17359
  deviceId: number(),
17333
17360
  timestamp: number(),
17334
17361
  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/dist/addon.mjs CHANGED
@@ -4652,7 +4652,7 @@ function preprocess(fn, schema) {
4652
4652
  });
4653
4653
  }
4654
4654
  //#endregion
4655
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4655
+ //#region ../types/dist/sleep-NOH4yRwj.mjs
4656
4656
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4657
4657
  EventCategory["SystemBoot"] = "system.boot";
4658
4658
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5767,15 +5767,24 @@ var BaseAddon = class {
5767
5767
  } catch {}
5768
5768
  }
5769
5769
  /**
5770
- * Resolve the shared models directory path via the storage capability.
5771
- * Falls back to `camstack-data/models` if storage is unavailable.
5772
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5770
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5771
+ *
5772
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5773
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5774
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5775
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5776
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5777
+ * whose real data dir differs (e.g. the macOS electron agent).
5778
+ *
5779
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5780
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5773
5781
  */
5774
5782
  async resolveModelsDir() {
5775
- return this.ctx.api.storage.resolve.query({
5776
- location: "models",
5777
- relativePath: ""
5778
- }).catch(() => "camstack-data/models");
5783
+ const { join } = await import("node:path");
5784
+ const { promises: fsp } = await import("node:fs");
5785
+ const dir = join(this.ctx.nodeDataDir, "models");
5786
+ await fsp.mkdir(dir, { recursive: true });
5787
+ return dir;
5779
5788
  }
5780
5789
  /**
5781
5790
  * Access the runtime capability registry for in-process provider lookups.
@@ -15517,7 +15526,8 @@ method(object({
15517
15526
  sessionId: string().optional()
15518
15527
  }), ConvertResultSchema, {
15519
15528
  kind: "mutation",
15520
- auth: "admin"
15529
+ auth: "admin",
15530
+ timeoutMs: 6e5
15521
15531
  });
15522
15532
  var AddonHttpRouteSchema = object({
15523
15533
  method: _enum([
@@ -17053,7 +17063,14 @@ var NotificationRuleConditionsSchema = object({
17053
17063
  /** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
17054
17064
  * carrying a matching `data.eventType` string pass this condition. Rules without this field are
17055
17065
  * unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
17056
- eventTypeTokens: array(string()).readonly().optional()
17066
+ eventTypeTokens: array(string()).readonly().optional(),
17067
+ /** Match detections whose CLIP image embedding is semantically similar to this free-text
17068
+ * description. Requires the embedding-encoder cap to have pre-warmed the text vector.
17069
+ * `minSimilarity` is the cosine similarity threshold in [0, 1]. */
17070
+ clipDescription: object({
17071
+ text: string().min(1),
17072
+ minSimilarity: number().min(0).max(1)
17073
+ }).optional()
17057
17074
  });
17058
17075
  var NotificationRuleTemplateSchema = object({
17059
17076
  title: string(),
@@ -17295,6 +17312,16 @@ var TrackedDetectionSchema = object({
17295
17312
  zones: array(string()).readonly(),
17296
17313
  state: TrackStateSchema
17297
17314
  });
17315
+ var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
17316
+ var SearchObjectEventsInput = object({
17317
+ text: string(),
17318
+ deviceId: number().optional(),
17319
+ since: number().optional(),
17320
+ until: number().optional(),
17321
+ classFilter: string().optional(),
17322
+ limit: number().default(50),
17323
+ minScore: number().min(0).max(1).default(.2)
17324
+ });
17298
17325
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
17299
17326
  deviceId: number(),
17300
17327
  trackId: string()
@@ -17329,7 +17356,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
17329
17356
  }), method(object({
17330
17357
  eventId: string(),
17331
17358
  kind: MediaFileKindEnum.optional()
17332
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
17359
+ }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
17333
17360
  deviceId: number(),
17334
17361
  timestamp: number(),
17335
17362
  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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",