@camstack/addon-export-ha-mqtt 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.
|
@@ -4679,7 +4679,7 @@ function number(params) {
|
|
|
4679
4679
|
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
4680
4680
|
}
|
|
4681
4681
|
//#endregion
|
|
4682
|
-
//#region ../types/dist/sleep-
|
|
4682
|
+
//#region ../types/dist/sleep-_J5S7OEP.mjs
|
|
4683
4683
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4684
4684
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4685
4685
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5794,15 +5794,24 @@ var BaseAddon = class {
|
|
|
5794
5794
|
} catch {}
|
|
5795
5795
|
}
|
|
5796
5796
|
/**
|
|
5797
|
-
* Resolve the shared models directory
|
|
5798
|
-
*
|
|
5799
|
-
*
|
|
5797
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
5798
|
+
*
|
|
5799
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
5800
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
5801
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
5802
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
5803
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
5804
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
5805
|
+
*
|
|
5806
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
5807
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
5800
5808
|
*/
|
|
5801
5809
|
async resolveModelsDir() {
|
|
5802
|
-
|
|
5803
|
-
|
|
5804
|
-
|
|
5805
|
-
|
|
5810
|
+
const { join } = await import("node:path");
|
|
5811
|
+
const { promises: fsp } = await import("node:fs");
|
|
5812
|
+
const dir = join(this.ctx.nodeDataDir, "models");
|
|
5813
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
5814
|
+
return dir;
|
|
5806
5815
|
}
|
|
5807
5816
|
/**
|
|
5808
5817
|
* Access the runtime capability registry for in-process provider lookups.
|
|
@@ -4677,7 +4677,7 @@ function number(params) {
|
|
|
4677
4677
|
return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
|
|
4678
4678
|
}
|
|
4679
4679
|
//#endregion
|
|
4680
|
-
//#region ../types/dist/sleep-
|
|
4680
|
+
//#region ../types/dist/sleep-_J5S7OEP.mjs
|
|
4681
4681
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4682
4682
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4683
4683
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5792,15 +5792,24 @@ var BaseAddon = class {
|
|
|
5792
5792
|
} catch {}
|
|
5793
5793
|
}
|
|
5794
5794
|
/**
|
|
5795
|
-
* Resolve the shared models directory
|
|
5796
|
-
*
|
|
5797
|
-
*
|
|
5795
|
+
* Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
|
|
5796
|
+
*
|
|
5797
|
+
* This is the SINGLE centralized models-dir resolver for every inference addon
|
|
5798
|
+
* (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
|
|
5799
|
+
* anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
|
|
5800
|
+
* `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
|
|
5801
|
+
* cap, which returns the hub's `/data/models` to every node and breaks any node
|
|
5802
|
+
* whose real data dir differs (e.g. the macOS electron agent).
|
|
5803
|
+
*
|
|
5804
|
+
* `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
|
|
5805
|
+
* barrel (re-exported into browser bundles) stays free of node builtins.
|
|
5798
5806
|
*/
|
|
5799
5807
|
async resolveModelsDir() {
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
5803
|
-
|
|
5808
|
+
const { join } = await import("node:path");
|
|
5809
|
+
const { promises: fsp } = await import("node:fs");
|
|
5810
|
+
const dir = join(this.ctx.nodeDataDir, "models");
|
|
5811
|
+
await fsp.mkdir(dir, { recursive: true });
|
|
5812
|
+
return dir;
|
|
5804
5813
|
}
|
|
5805
5814
|
/**
|
|
5806
5815
|
* 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-ha-mqtt",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"description": "HomeAssistant MQTT discovery exporter for CamStack devices. Publishes discovery topics so HA auto-creates entities for exposed cameras/switches/intercoms/sensors.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|