@camstack/addon-agent-ui 1.1.3 → 1.1.5

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.
Files changed (2) hide show
  1. package/dist/addon.js +45 -12
  2. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -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-NOH4yRwj.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.
@@ -12657,7 +12666,8 @@ method(object({
12657
12666
  sessionId: string().optional()
12658
12667
  }), ConvertResultSchema, {
12659
12668
  kind: "mutation",
12660
- auth: "admin"
12669
+ auth: "admin",
12670
+ timeoutMs: 6e5
12661
12671
  });
12662
12672
  var AddonHttpRouteSchema = object({
12663
12673
  method: _enum([
@@ -14193,7 +14203,14 @@ var NotificationRuleConditionsSchema = object({
14193
14203
  /** Match against `event.data.eventType` token (e.g. `'press_long'`). When non-empty, only events
14194
14204
  * carrying a matching `data.eventType` string pass this condition. Rules without this field are
14195
14205
  * unaffected (back-compat). Distinct from `rule.eventTypes` which holds EventCategory strings. */
14196
- eventTypeTokens: array(string()).readonly().optional()
14206
+ eventTypeTokens: array(string()).readonly().optional(),
14207
+ /** Match detections whose CLIP image embedding is semantically similar to this free-text
14208
+ * description. Requires the embedding-encoder cap to have pre-warmed the text vector.
14209
+ * `minSimilarity` is the cosine similarity threshold in [0, 1]. */
14210
+ clipDescription: object({
14211
+ text: string().min(1),
14212
+ minSimilarity: number().min(0).max(1)
14213
+ }).optional()
14197
14214
  });
14198
14215
  var NotificationRuleTemplateSchema = object({
14199
14216
  title: string(),
@@ -14435,6 +14452,16 @@ var TrackedDetectionSchema = object({
14435
14452
  zones: array(string()).readonly(),
14436
14453
  state: TrackStateSchema
14437
14454
  });
14455
+ var ScoredObjectEventSchema = ObjectEventSchema.extend({ score: number() });
14456
+ var SearchObjectEventsInput = object({
14457
+ text: string(),
14458
+ deviceId: number().optional(),
14459
+ since: number().optional(),
14460
+ until: number().optional(),
14461
+ classFilter: string().optional(),
14462
+ limit: number().default(50),
14463
+ minScore: number().min(0).max(1).default(.2)
14464
+ });
14438
14465
  DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).readonly()), method(object({
14439
14466
  deviceId: number(),
14440
14467
  trackId: string()
@@ -14469,7 +14496,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
14469
14496
  }), method(object({
14470
14497
  eventId: string(),
14471
14498
  kind: MediaFileKindEnum.optional()
14472
- }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), object({
14499
+ }), array(MediaFileSchema).readonly()), method(object({ trackId: string() }), array(MediaFileSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), object({
14473
14500
  deviceId: number(),
14474
14501
  timestamp: number(),
14475
14502
  frameWidth: number(),
@@ -19119,6 +19146,12 @@ Object.freeze({
19119
19146
  addonId: null,
19120
19147
  access: "create"
19121
19148
  },
19149
+ "pipelineAnalytics.searchObjectEvents": {
19150
+ capName: "pipeline-analytics",
19151
+ capScope: "device",
19152
+ addonId: null,
19153
+ access: "view"
19154
+ },
19122
19155
  "pipelineExecutor.cacheFrameInPool": {
19123
19156
  capName: "pipeline-executor",
19124
19157
  capScope: "system",
@@ -21023,7 +21056,7 @@ var AgentUIAddon = class extends BaseAddon {
21023
21056
  capability: adminUiCapability,
21024
21057
  provider: {
21025
21058
  getStaticDir: async () => ({ staticDir: path.resolve(__dirname) }),
21026
- getVersion: async () => ({ version: "1.1.3" })
21059
+ getVersion: async () => ({ version: "1.1.5" })
21027
21060
  }
21028
21061
  }];
21029
21062
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-agent-ui",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "CamStack Agent UI — lightweight status dashboard served by every agent node",
5
5
  "keywords": [
6
6
  "camstack",