@camstack/addon-export-alexa 1.1.2 → 1.1.4

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-_J5S7OEP.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.
@@ -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-_J5S7OEP.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-alexa",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
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",