@camstack/addon-provider-reolink 1.1.3 → 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.
package/dist/addon.js CHANGED
@@ -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.
package/dist/addon.mjs CHANGED
@@ -4650,7 +4650,7 @@ function _instanceof(cls, params = {}) {
4650
4650
  return inst;
4651
4651
  }
4652
4652
  //#endregion
4653
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4653
+ //#region ../types/dist/sleep-_J5S7OEP.mjs
4654
4654
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4655
4655
  EventCategory["SystemBoot"] = "system.boot";
4656
4656
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5765,15 +5765,24 @@ var BaseAddon = class {
5765
5765
  } catch {}
5766
5766
  }
5767
5767
  /**
5768
- * Resolve the shared models directory path via the storage capability.
5769
- * Falls back to `camstack-data/models` if storage is unavailable.
5770
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5768
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5769
+ *
5770
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5771
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5772
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5773
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5774
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5775
+ * whose real data dir differs (e.g. the macOS electron agent).
5776
+ *
5777
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5778
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5771
5779
  */
5772
5780
  async resolveModelsDir() {
5773
- return this.ctx.api.storage.resolve.query({
5774
- location: "models",
5775
- relativePath: ""
5776
- }).catch(() => "camstack-data/models");
5781
+ const { join } = await import("node:path");
5782
+ const { promises: fsp } = await import("node:fs");
5783
+ const dir = join(this.ctx.nodeDataDir, "models");
5784
+ await fsp.mkdir(dir, { recursive: true });
5785
+ return dir;
5777
5786
  }
5778
5787
  /**
5779
5788
  * 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-provider-reolink",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Reolink camera device provider addon for CamStack — native Baichuan protocol",
5
5
  "keywords": [
6
6
  "camstack",