@camstack/addon-provider-rtsp 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
@@ -4642,7 +4642,7 @@ function preprocess(fn, schema) {
4642
4642
  });
4643
4643
  }
4644
4644
  //#endregion
4645
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4645
+ //#region ../types/dist/sleep-_J5S7OEP.mjs
4646
4646
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4647
4647
  EventCategory["SystemBoot"] = "system.boot";
4648
4648
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5757,15 +5757,24 @@ var BaseAddon = class {
5757
5757
  } catch {}
5758
5758
  }
5759
5759
  /**
5760
- * Resolve the shared models directory path via the storage capability.
5761
- * Falls back to `camstack-data/models` if storage is unavailable.
5762
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5760
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5761
+ *
5762
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5763
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5764
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5765
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5766
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5767
+ * whose real data dir differs (e.g. the macOS electron agent).
5768
+ *
5769
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5770
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5763
5771
  */
5764
5772
  async resolveModelsDir() {
5765
- return this.ctx.api.storage.resolve.query({
5766
- location: "models",
5767
- relativePath: ""
5768
- }).catch(() => "camstack-data/models");
5773
+ const { join } = await import("node:path");
5774
+ const { promises: fsp } = await import("node:fs");
5775
+ const dir = join(this.ctx.nodeDataDir, "models");
5776
+ await fsp.mkdir(dir, { recursive: true });
5777
+ return dir;
5769
5778
  }
5770
5779
  /**
5771
5780
  * Access the runtime capability registry for in-process provider lookups.
package/dist/addon.mjs CHANGED
@@ -4641,7 +4641,7 @@ function preprocess(fn, schema) {
4641
4641
  });
4642
4642
  }
4643
4643
  //#endregion
4644
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4644
+ //#region ../types/dist/sleep-_J5S7OEP.mjs
4645
4645
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4646
4646
  EventCategory["SystemBoot"] = "system.boot";
4647
4647
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5756,15 +5756,24 @@ var BaseAddon = class {
5756
5756
  } catch {}
5757
5757
  }
5758
5758
  /**
5759
- * Resolve the shared models directory path via the storage capability.
5760
- * Falls back to `camstack-data/models` if storage is unavailable.
5761
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5759
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5760
+ *
5761
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5762
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5763
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5764
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5765
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5766
+ * whose real data dir differs (e.g. the macOS electron agent).
5767
+ *
5768
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5769
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5762
5770
  */
5763
5771
  async resolveModelsDir() {
5764
- return this.ctx.api.storage.resolve.query({
5765
- location: "models",
5766
- relativePath: ""
5767
- }).catch(() => "camstack-data/models");
5772
+ const { join } = await import("node:path");
5773
+ const { promises: fsp } = await import("node:fs");
5774
+ const dir = join(this.ctx.nodeDataDir, "models");
5775
+ await fsp.mkdir(dir, { recursive: true });
5776
+ return dir;
5768
5777
  }
5769
5778
  /**
5770
5779
  * 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-rtsp",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Generic RTSP camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",