@camstack/addon-export-alexa 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.
@@ -4655,7 +4655,7 @@ function _instanceof(cls, params = {}) {
4655
4655
  return inst;
4656
4656
  }
4657
4657
  //#endregion
4658
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4658
+ //#region ../types/dist/sleep-NOH4yRwj.mjs
4659
4659
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4660
4660
  EventCategory["SystemBoot"] = "system.boot";
4661
4661
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5770,15 +5770,24 @@ var BaseAddon = class {
5770
5770
  } catch {}
5771
5771
  }
5772
5772
  /**
5773
- * Resolve the shared models directory path via the storage capability.
5774
- * Falls back to `camstack-data/models` if storage is unavailable.
5775
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5773
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5774
+ *
5775
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5776
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5777
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5778
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5779
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5780
+ * whose real data dir differs (e.g. the macOS electron agent).
5781
+ *
5782
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5783
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5776
5784
  */
5777
5785
  async resolveModelsDir() {
5778
- return this.ctx.api.storage.resolve.query({
5779
- location: "models",
5780
- relativePath: ""
5781
- }).catch(() => "camstack-data/models");
5786
+ const { join } = await import("node:path");
5787
+ const { promises: fsp } = await import("node:fs");
5788
+ const dir = join(this.ctx.nodeDataDir, "models");
5789
+ await fsp.mkdir(dir, { recursive: true });
5790
+ return dir;
5782
5791
  }
5783
5792
  /**
5784
5793
  * Access the runtime capability registry for in-process provider lookups.
@@ -12920,7 +12929,8 @@ method(object({
12920
12929
  sessionId: string().optional()
12921
12930
  }), ConvertResultSchema, {
12922
12931
  kind: "mutation",
12923
- auth: "admin"
12932
+ auth: "admin",
12933
+ timeoutMs: 6e5
12924
12934
  });
12925
12935
  var AddonHttpRouteSchema = object({
12926
12936
  method: _enum([
@@ -14473,7 +14483,14 @@ var NotificationRuleConditionsSchema = object({
14473
14483
  /** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
14474
14484
  * carrying a matching `data.eventType` string pass this condition. Rules without this field are
14475
14485
  * unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
14476
- eventTypeTokens: array(string()).readonly().optional()
14486
+ eventTypeTokens: array(string()).readonly().optional(),
14487
+ /** Match detections whose CLIP image embedding is semantically similar to this free-text
14488
+ * description. Requires the embedding-encoder cap to have pre-warmed the text vector.
14489
+ * `minSimilarity` is the cosine similarity threshold in [0, 1]. */
14490
+ clipDescription: object({
14491
+ text: string().min(1),
14492
+ minSimilarity: number().min(0).max(1)
14493
+ }).optional()
14477
14494
  });
14478
14495
  var NotificationRuleTemplateSchema = object({
14479
14496
  title: string(),
@@ -14715,6 +14732,16 @@ var TrackedDetectionSchema = object({
14715
14732
  zones: array(string()).readonly(),
14716
14733
  state: TrackStateSchema
14717
14734
  });
14735
+ var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
14736
+ var SearchObjectEventsInput = object({
14737
+ text: string(),
14738
+ deviceId: number().optional(),
14739
+ since: number().optional(),
14740
+ until: number().optional(),
14741
+ classFilter: string().optional(),
14742
+ limit: number().default(50),
14743
+ minScore: number().min(0).max(1).default(.2)
14744
+ });
14718
14745
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
14719
14746
  deviceId: number(),
14720
14747
  trackId: string()
@@ -14749,7 +14776,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
14749
14776
  }), method(object({
14750
14777
  eventId: string(),
14751
14778
  kind: MediaFileKindEnum.optional()
14752
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
14779
+ }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
14753
14780
  deviceId: number(),
14754
14781
  timestamp: number(),
14755
14782
  frameWidth: number(),
@@ -19399,6 +19426,12 @@ Object.freeze({
19399
19426
  addonId: null,
19400
19427
  access: "create"
19401
19428
  },
19429
+ "pipelineAnalytics.searchObjectEvents": {
19430
+ capName: "pipeline-analytics",
19431
+ capScope: "device",
19432
+ addonId: null,
19433
+ access: "view"
19434
+ },
19402
19435
  "pipelineExecutor.cacheFrameInPool": {
19403
19436
  capName: "pipeline-executor",
19404
19437
  capScope: "system",
@@ -4629,7 +4629,7 @@ function _instanceof(cls, params = {}) {
4629
4629
  return inst;
4630
4630
  }
4631
4631
  //#endregion
4632
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4632
+ //#region ../types/dist/sleep-NOH4yRwj.mjs
4633
4633
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4634
4634
  EventCategory["SystemBoot"] = "system.boot";
4635
4635
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5744,15 +5744,24 @@ var BaseAddon = class {
5744
5744
  } catch {}
5745
5745
  }
5746
5746
  /**
5747
- * Resolve the shared models directory path via the storage capability.
5748
- * Falls back to `camstack-data/models` if storage is unavailable.
5749
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5747
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5748
+ *
5749
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5750
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5751
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5752
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5753
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5754
+ * whose real data dir differs (e.g. the macOS electron agent).
5755
+ *
5756
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5757
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5750
5758
  */
5751
5759
  async resolveModelsDir() {
5752
- return this.ctx.api.storage.resolve.query({
5753
- location: "models",
5754
- relativePath: ""
5755
- }).catch(() => "camstack-data/models");
5760
+ const { join } = await import("node:path");
5761
+ const { promises: fsp } = await import("node:fs");
5762
+ const dir = join(this.ctx.nodeDataDir, "models");
5763
+ await fsp.mkdir(dir, { recursive: true });
5764
+ return dir;
5756
5765
  }
5757
5766
  /**
5758
5767
  * Access the runtime capability registry for in-process provider lookups.
@@ -12894,7 +12903,8 @@ method(object({
12894
12903
  sessionId: string().optional()
12895
12904
  }), ConvertResultSchema, {
12896
12905
  kind: "mutation",
12897
- auth: "admin"
12906
+ auth: "admin",
12907
+ timeoutMs: 6e5
12898
12908
  });
12899
12909
  var AddonHttpRouteSchema = object({
12900
12910
  method: _enum([
@@ -14447,7 +14457,14 @@ var NotificationRuleConditionsSchema = object({
14447
14457
  /** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
14448
14458
  * carrying a matching `data.eventType` string pass this condition. Rules without this field are
14449
14459
  * unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
14450
- eventTypeTokens: array(string()).readonly().optional()
14460
+ eventTypeTokens: array(string()).readonly().optional(),
14461
+ /** Match detections whose CLIP image embedding is semantically similar to this free-text
14462
+ * description. Requires the embedding-encoder cap to have pre-warmed the text vector.
14463
+ * `minSimilarity` is the cosine similarity threshold in [0, 1]. */
14464
+ clipDescription: object({
14465
+ text: string().min(1),
14466
+ minSimilarity: number().min(0).max(1)
14467
+ }).optional()
14451
14468
  });
14452
14469
  var NotificationRuleTemplateSchema = object({
14453
14470
  title: string(),
@@ -14689,6 +14706,16 @@ var TrackedDetectionSchema = object({
14689
14706
  zones: array(string()).readonly(),
14690
14707
  state: TrackStateSchema
14691
14708
  });
14709
+ var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
14710
+ var SearchObjectEventsInput = object({
14711
+ text: string(),
14712
+ deviceId: number().optional(),
14713
+ since: number().optional(),
14714
+ until: number().optional(),
14715
+ classFilter: string().optional(),
14716
+ limit: number().default(50),
14717
+ minScore: number().min(0).max(1).default(.2)
14718
+ });
14692
14719
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
14693
14720
  deviceId: number(),
14694
14721
  trackId: string()
@@ -14723,7 +14750,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
14723
14750
  }), method(object({
14724
14751
  eventId: string(),
14725
14752
  kind: MediaFileKindEnum.optional()
14726
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
14753
+ }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
14727
14754
  deviceId: number(),
14728
14755
  timestamp: number(),
14729
14756
  frameWidth: number(),
@@ -19373,6 +19400,12 @@ Object.freeze({
19373
19400
  addonId: null,
19374
19401
  access: "create"
19375
19402
  },
19403
+ "pipelineAnalytics.searchObjectEvents": {
19404
+ capName: "pipeline-analytics",
19405
+ capScope: "device",
19406
+ addonId: null,
19407
+ access: "view"
19408
+ },
19376
19409
  "pipelineExecutor.cacheFrameInPool": {
19377
19410
  capName: "pipeline-executor",
19378
19411
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
5
5
  "keywords": [
6
6
  "camstack",