@camstack/addon-post-analysis 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.
@@ -4627,7 +4627,7 @@ function _instanceof(cls, params = {}) {
4627
4627
  return inst;
4628
4628
  }
4629
4629
  //#endregion
4630
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4630
+ //#region ../types/dist/sleep-_J5S7OEP.mjs
4631
4631
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4632
4632
  EventCategory["SystemBoot"] = "system.boot";
4633
4633
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5742,15 +5742,24 @@ var BaseAddon = class {
5742
5742
  } catch {}
5743
5743
  }
5744
5744
  /**
5745
- * Resolve the shared models directory path via the storage capability.
5746
- * Falls back to `camstack-data/models` if storage is unavailable.
5747
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5745
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5746
+ *
5747
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5748
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5749
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5750
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5751
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5752
+ * whose real data dir differs (e.g. the macOS electron agent).
5753
+ *
5754
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5755
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5748
5756
  */
5749
5757
  async resolveModelsDir() {
5750
- return this.ctx.api.storage.resolve.query({
5751
- location: "models",
5752
- relativePath: ""
5753
- }).catch(() => "camstack-data/models");
5758
+ const { join } = await import("node:path");
5759
+ const { promises: fsp } = await import("node:fs");
5760
+ const dir = join(this.ctx.nodeDataDir, "models");
5761
+ await fsp.mkdir(dir, { recursive: true });
5762
+ return dir;
5754
5763
  }
5755
5764
  /**
5756
5765
  * Access the runtime capability registry for in-process provider lookups.
@@ -4649,7 +4649,7 @@ function _instanceof(cls, params = {}) {
4649
4649
  return inst;
4650
4650
  }
4651
4651
  //#endregion
4652
- //#region ../types/dist/sleep-BV7rLc6Y.mjs
4652
+ //#region ../types/dist/sleep-_J5S7OEP.mjs
4653
4653
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4654
4654
  EventCategory["SystemBoot"] = "system.boot";
4655
4655
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -5764,15 +5764,24 @@ var BaseAddon = class {
5764
5764
  } catch {}
5765
5765
  }
5766
5766
  /**
5767
- * Resolve the shared models directory path via the storage capability.
5768
- * Falls back to `camstack-data/models` if storage is unavailable.
5769
- * Used by inference addons (detection-pipeline, audio-classifier, embedding-encoder).
5767
+ * Resolve the shared, node-local models directory: `<nodeDataDir>/models`.
5768
+ *
5769
+ * This is the SINGLE centralized models-dir resolver for every inference addon
5770
+ * (detection-pipeline, audio-analyzer, embedding-encoder, model-studio). It is
5771
+ * anchored at the node's own writable data root (`ctx.nodeDataDir`, i.e.
5772
+ * `CAMSTACK_DATA` ?? the kernel boot dir) — never the hub-singleton `storage`
5773
+ * cap, which returns the hub's `/data/models` to every node and breaks any node
5774
+ * whose real data dir differs (e.g. the macOS electron agent).
5775
+ *
5776
+ * `node:path`/`node:fs` are imported dynamically so the `@camstack/types` root
5777
+ * barrel (re-exported into browser bundles) stays free of node builtins.
5770
5778
  */
5771
5779
  async resolveModelsDir() {
5772
- return this.ctx.api.storage.resolve.query({
5773
- location: "models",
5774
- relativePath: ""
5775
- }).catch(() => "camstack-data/models");
5780
+ const { join } = await import("node:path");
5781
+ const { promises: fsp } = await import("node:fs");
5782
+ const dir = join(this.ctx.nodeDataDir, "models");
5783
+ await fsp.mkdir(dir, { recursive: true });
5784
+ return dir;
5776
5785
  }
5777
5786
  /**
5778
5787
  * Access the runtime capability registry for in-process provider lookups.
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-BY1NQ5oi.js");
5
+ const require_dist = require("../dist-B6aOcq5T.js");
6
6
  let node_path = require("node:path");
7
7
  let node_path$1 = require_dist.__toESM(node_path, 1);
8
8
  node_path = require_dist.__toESM(node_path);
@@ -569,10 +569,7 @@ var EmbeddingEncoderAddon = class extends require_dist.BaseAddon {
569
569
  });
570
570
  }
571
571
  async onInitialize() {
572
- const modelsDir = await this.ctx.api.storage.resolve.query({
573
- location: "models",
574
- relativePath: ""
575
- }).catch(() => "camstack-data/models");
572
+ const modelsDir = await this.resolveModelsDir();
576
573
  this.models = new ModelDownloadService(modelsDir, []);
577
574
  return [{
578
575
  capability: require_dist.embeddingEncoderCapability,
@@ -1,4 +1,4 @@
1
- import { d as BaseAddon, i as embeddingEncoderCapability } from "../dist-BUE-vLMt.mjs";
1
+ import { d as BaseAddon, i as embeddingEncoderCapability } from "../dist-B2FbCLNx.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import * as path$1 from "node:path";
4
4
  import * as fs from "node:fs";
@@ -564,10 +564,7 @@ var EmbeddingEncoderAddon = class extends BaseAddon {
564
564
  });
565
565
  }
566
566
  async onInitialize() {
567
- const modelsDir = await this.ctx.api.storage.resolve.query({
568
- location: "models",
569
- relativePath: ""
570
- }).catch(() => "camstack-data/models");
567
+ const modelsDir = await this.resolveModelsDir();
571
568
  this.models = new ModelDownloadService(modelsDir, []);
572
569
  return [{
573
570
  capability: embeddingEncoderCapability,
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-BY1NQ5oi.js");
6
- const require_resolve_frame = require("../resolve-frame-B2Do-e7z.js");
5
+ const require_dist = require("../dist-B6aOcq5T.js");
6
+ const require_resolve_frame = require("../resolve-frame-B6a1wzQb.js");
7
7
  let _camstack_shm_ring = require("@camstack/shm-ring");
8
8
  //#region src/enrichment-engine/types.ts
9
9
  var DEFAULT_ENRICHMENT_CONFIG = {
@@ -1,4 +1,4 @@
1
- import { C as tuple, S as string, _ as _enum, b as number, d as BaseAddon, h as createEvent, m as asJsonObject, p as EventCategory, v as array, x as object, y as boolean } from "../dist-BUE-vLMt.mjs";
1
+ import { C as tuple, S as string, _ as _enum, b as number, d as BaseAddon, h as createEvent, m as asJsonObject, p as EventCategory, v as array, x as object, y as boolean } from "../dist-B2FbCLNx.mjs";
2
2
  import { n as extractCrop, t as resolveFrame } from "../resolve-frame-CT1T1tWy.mjs";
3
3
  import { FrameRingReaderCache } from "@camstack/shm-ring";
4
4
  //#region src/enrichment-engine/types.ts
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
3
3
  var e = {
4
4
  "@camstack/sdk": {
5
5
  name: "@camstack/sdk",
6
- version: "1.1.3",
6
+ version: "1.1.4",
7
7
  scope: ["default"],
8
8
  loaded: !1,
9
9
  from: "addon_pipeline_analytics_widgets",
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.1.3",
21
+ version: "1.1.4",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_pipeline_analytics_widgets",
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.1.3",
36
+ version: "1.1.4",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_pipeline_analytics_widgets",
@@ -36,7 +36,7 @@ async function r() {
36
36
  }
37
37
  },
38
38
  "@camstack/types": {
39
- version: "1.1.3",
39
+ version: "1.1.4",
40
40
  scope: "default",
41
41
  shareConfig: {
42
42
  singleton: !0,
@@ -45,7 +45,7 @@ async function r() {
45
45
  }
46
46
  },
47
47
  "@camstack/sdk": {
48
- version: "1.1.3",
48
+ version: "1.1.4",
49
49
  scope: "default",
50
50
  shareConfig: {
51
51
  singleton: !0,
@@ -81,7 +81,7 @@ async function r() {
81
81
  }
82
82
  },
83
83
  "@camstack/ui-library": {
84
- version: "1.1.3",
84
+ version: "1.1.4",
85
85
  scope: "default",
86
86
  shareConfig: {
87
87
  singleton: !0,
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-BY1NQ5oi.js");
6
- const require_resolve_frame = require("../resolve-frame-B2Do-e7z.js");
5
+ const require_dist = require("../dist-B6aOcq5T.js");
6
+ const require_resolve_frame = require("../resolve-frame-B6a1wzQb.js");
7
7
  let _camstack_shm_ring = require("@camstack/shm-ring");
8
8
  let sharp = require("sharp");
9
9
  sharp = require_dist.__toESM(sharp);
@@ -1,4 +1,4 @@
1
- import { a as faceGalleryCapability, b as number, c as videoclipsCapability, d as BaseAddon, f as DeviceType, g as hydrateSchema, l as zoneAnalyticsCapability, n as audioMetricsCapability, o as pipelineAnalyticsCapability, p as EventCategory, r as cosineSimilarity, s as plateGalleryCapability, t as addonWidgetsSourceCapability, u as errMsg, x as object, y as boolean } from "../dist-BUE-vLMt.mjs";
1
+ import { a as faceGalleryCapability, b as number, c as videoclipsCapability, d as BaseAddon, f as DeviceType, g as hydrateSchema, l as zoneAnalyticsCapability, n as audioMetricsCapability, o as pipelineAnalyticsCapability, p as EventCategory, r as cosineSimilarity, s as plateGalleryCapability, t as addonWidgetsSourceCapability, u as errMsg, x as object, y as boolean } from "../dist-B2FbCLNx.mjs";
2
2
  import { n as extractCrop, t as resolveFrame } from "../resolve-frame-CT1T1tWy.mjs";
3
3
  import { FrameRingReaderCache } from "@camstack/shm-ring";
4
4
  import sharp from "sharp";
@@ -30,7 +30,7 @@ async function d(e) {
30
30
  }
31
31
  }
32
32
  async function f() {
33
- return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-D5LAGg5T.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-Bcn1PmOA.mjs")).catch((e) => {
34
34
  throw l = void 0, e;
35
35
  }), l;
36
36
  }
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-BY1NQ5oi.js");
1
+ const require_dist = require("./dist-B6aOcq5T.js");
2
2
  let sharp = require("sharp");
3
3
  sharp = require_dist.__toESM(sharp);
4
4
  //#region src/shared/frame/crop-extractor.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-post-analysis",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "CamStack Post-Analysis bundle — enrichment, embedding-encoder, pipeline-analytics. Multi-entry npm package shipping addons that consume pipeline output.",
5
5
  "keywords": [
6
6
  "camstack",