@camstack/addon-post-analysis 1.2.11 → 1.2.13

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.
@@ -6450,6 +6450,36 @@ var ProfileRtspEntrySchema = object({
6450
6450
  codec: string().optional(),
6451
6451
  resolution: CamStreamResolutionSchema.optional()
6452
6452
  });
6453
+ /**
6454
+ * Per-call node pinning for `ctx.api` capability calls.
6455
+ *
6456
+ * A capability call normally resolves to its DEFAULT provider — a `singleton`
6457
+ * cap resolves to the hub, a device-scoped cap to the device's owning node. To
6458
+ * query a SPECIFIC node's provider instead (e.g. a remote agent's own
6459
+ * in-process `platform-probe` hardware, which the hub cannot probe), pin the
6460
+ * call to that node.
6461
+ *
6462
+ * The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
6463
+ * method args), so capability method signatures stay `nodeId`-free — node
6464
+ * targeting is a property of the CALL, not of the method. The transport lifts
6465
+ * it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
6466
+ * and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
6467
+ * which classifies a pinned agent node as `agent-child-forward`
6468
+ * (`$agent-cap-fwd.forward` → the agent's in-process provider).
6469
+ *
6470
+ * Usage at a call site:
6471
+ *
6472
+ * await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
6473
+ */
6474
+ /** tRPC `op.context` key carrying a per-call node pin. */
6475
+ var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
6476
+ /**
6477
+ * Build the tRPC request options that pin a single capability call to `nodeId`.
6478
+ * Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
6479
+ */
6480
+ function nodePin(nodeId) {
6481
+ return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: nodeId } };
6482
+ }
6453
6483
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
6454
6484
  DeviceType["Camera"] = "camera";
6455
6485
  DeviceType["Hub"] = "hub";
@@ -7665,36 +7695,6 @@ var EncodeProfileSchema = object({
7665
7695
  */
7666
7696
  outputArgs: array(string()).optional()
7667
7697
  });
7668
- /**
7669
- * Per-call node pinning for `ctx.api` capability calls.
7670
- *
7671
- * A capability call normally resolves to its DEFAULT provider — a `singleton`
7672
- * cap resolves to the hub, a device-scoped cap to the device's owning node. To
7673
- * query a SPECIFIC node's provider instead (e.g. a remote agent's own
7674
- * in-process `platform-probe` hardware, which the hub cannot probe), pin the
7675
- * call to that node.
7676
- *
7677
- * The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
7678
- * method args), so capability method signatures stay `nodeId`-free — node
7679
- * targeting is a property of the CALL, not of the method. The transport lifts
7680
- * it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
7681
- * and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
7682
- * which classifies a pinned agent node as `agent-child-forward`
7683
- * (`$agent-cap-fwd.forward` → the agent's in-process provider).
7684
- *
7685
- * Usage at a call site:
7686
- *
7687
- * await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
7688
- */
7689
- /** tRPC `op.context` key carrying a per-call node pin. */
7690
- var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
7691
- /**
7692
- * Build the tRPC request options that pin a single capability call to `nodeId`.
7693
- * Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
7694
- */
7695
- function nodePin(nodeId) {
7696
- return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: nodeId } };
7697
- }
7698
7698
  function hfModelUrl(repo, path) {
7699
7699
  return `https://huggingface.co/${repo}/resolve/main/${path}`;
7700
7700
  }
@@ -26797,4 +26797,4 @@ Object.freeze({
26797
26797
  "smtp-provider": "email"
26798
26798
  });
26799
26799
  //#endregion
26800
- export { BaseAddon as A, EventCategory as B, notificationRulesCapability as C, videoclipsCapability as D, subKindsOf as E, boolean as F, literal as I, number as L, createEvent as M, hydrateSchema as N, zoneAnalyticsCapability as O, array as P, object as R, nodePin as S, plateGalleryCapability as T, customAction as _, NC_CONDITION_CATALOG as a, faceGalleryCapability as b, NcRuleInputSchema as c, NcTaxonomySchema as d, OpsLogEntrySchema as f, cosineSimilarity as g, buildEventKindDescriptor as h, MACRO_LABELS as i, DeviceType as j, errMsg as k, NcRulePatchSchema as l, audioMetricsCapability as m, EVENT_KIND_BY_CAP as n, NC_TAXONOMY as o, addonWidgetsSourceCapability as p, EVENT_PAD_MS as r, NcConditionDescriptorSchema as s, DEFAULT_EVENT_COLOR as t, NcRuleSchema as u, defineCustomActions as v, pipelineAnalyticsCapability as w, hfModelUrl as x, embeddingEncoderCapability as y, string as z };
26800
+ export { DeviceType as A, EventCategory as B, pipelineAnalyticsCapability as C, zoneAnalyticsCapability as D, videoclipsCapability as E, boolean as F, literal as I, number as L, hydrateSchema as M, nodePin as N, errMsg as O, array as P, object as R, notificationRulesCapability as S, subKindsOf as T, customAction as _, NC_CONDITION_CATALOG as a, faceGalleryCapability as b, NcRuleInputSchema as c, NcTaxonomySchema as d, OpsLogEntrySchema as f, cosineSimilarity as g, buildEventKindDescriptor as h, MACRO_LABELS as i, createEvent as j, BaseAddon as k, NcRulePatchSchema as l, audioMetricsCapability as m, EVENT_KIND_BY_CAP as n, NC_TAXONOMY as o, addonWidgetsSourceCapability as p, EVENT_PAD_MS as r, NcConditionDescriptorSchema as s, DEFAULT_EVENT_COLOR as t, NcRuleSchema as u, defineCustomActions as v, plateGalleryCapability as w, hfModelUrl as x, embeddingEncoderCapability as y, string as z };
@@ -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-B5fLGGEF.js");
5
+ const require_dist = require("../dist-BV2hm-VZ.js");
6
6
  let node_fs = require("node:fs");
7
7
  let node_fs$1 = require_dist.__toESM(node_fs, 1);
8
8
  node_fs = require_dist.__toESM(node_fs);
@@ -1,4 +1,4 @@
1
- import { A as BaseAddon, x as hfModelUrl, y as embeddingEncoderCapability } from "../dist-EaH6ywaC.mjs";
1
+ import { k as BaseAddon, x as hfModelUrl, y as embeddingEncoderCapability } from "../dist-BsUHqtgU.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import * as fs from "node:fs";
4
4
  import * as path$1 from "node:path";
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-B5fLGGEF.js");
1
+ const require_dist = require("./dist-BV2hm-VZ.js");
2
2
  let node_fs = require("node:fs");
3
3
  node_fs = require_dist.__toESM(node_fs, 1);
4
4
  let node_path = require("node:path");
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.2.14",
21
+ version: "1.2.15",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_pipeline_analytics_widgets",
@@ -36,7 +36,7 @@ async function r() {
36
36
  }
37
37
  },
38
38
  "@camstack/types": {
39
- version: "1.2.14",
39
+ version: "1.2.15",
40
40
  scope: "default",
41
41
  shareConfig: {
42
42
  singleton: !0,
@@ -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-B5fLGGEF.js");
5
+ const require_dist = require("../dist-BV2hm-VZ.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let sharp = require("sharp");
8
8
  sharp = require_dist.__toESM(sharp);
@@ -16097,7 +16097,7 @@ var FaceRecognizer = class {
16097
16097
  const prev = this.bestMatchScore.get(c.trackId);
16098
16098
  if (prev === void 0 || match.score > prev) this.bestMatchScore.set(c.trackId, match.score);
16099
16099
  }
16100
- const recognizedIdentityId = state.assignedIdentityId ?? match?.identityId ?? void 0;
16100
+ const recognizedIdentityId = state.assignedIdentityId ?? void 0;
16101
16101
  const held = this.bestFace.get(c.trackId);
16102
16102
  const isNewBest = this.bestTracker.observe(c.trackId, c.confidence, input.timestamp);
16103
16103
  const needsCrop = held !== void 0 && held.crop === void 0;
@@ -18725,7 +18725,7 @@ var PipelineAnalyticsAddon = class extends require_dist.BaseAddon {
18725
18725
  let storage = this.ctx.kernel.storage;
18726
18726
  const mediaRoot = process.env.CAMSTACK_MEDIA_ROOT?.trim();
18727
18727
  if (mediaRoot) {
18728
- const { FilesystemStorageProvider } = await Promise.resolve().then(() => require("../node-PvutBRd4.js"));
18728
+ const { FilesystemStorageProvider } = await Promise.resolve().then(() => require("../node-BY0XZAen.js"));
18729
18729
  storage = new FilesystemStorageProvider(mediaRoot);
18730
18730
  logger.info("pipeline-analytics: event media rooted at CAMSTACK_MEDIA_ROOT", { meta: { mediaRoot } });
18731
18731
  }
@@ -1,4 +1,4 @@
1
- import { A as BaseAddon, B as EventCategory, C as notificationRulesCapability, D as videoclipsCapability, E as subKindsOf, F as boolean, I as literal, L as number, M as createEvent, N as hydrateSchema, O as zoneAnalyticsCapability, P as array, R as object, S as nodePin, T as plateGalleryCapability, _ as customAction, a as NC_CONDITION_CATALOG, b as faceGalleryCapability, c as NcRuleInputSchema, d as NcTaxonomySchema, f as OpsLogEntrySchema, g as cosineSimilarity, h as buildEventKindDescriptor, i as MACRO_LABELS, j as DeviceType, k as errMsg, l as NcRulePatchSchema, m as audioMetricsCapability, n as EVENT_KIND_BY_CAP, o as NC_TAXONOMY, p as addonWidgetsSourceCapability, r as EVENT_PAD_MS, s as NcConditionDescriptorSchema, t as DEFAULT_EVENT_COLOR, u as NcRuleSchema, v as defineCustomActions, w as pipelineAnalyticsCapability, z as string } from "../dist-EaH6ywaC.mjs";
1
+ import { A as DeviceType, B as EventCategory, C as pipelineAnalyticsCapability, D as zoneAnalyticsCapability, E as videoclipsCapability, F as boolean, I as literal, L as number, M as hydrateSchema, N as nodePin, O as errMsg, P as array, R as object, S as notificationRulesCapability, T as subKindsOf, _ as customAction, a as NC_CONDITION_CATALOG, b as faceGalleryCapability, c as NcRuleInputSchema, d as NcTaxonomySchema, f as OpsLogEntrySchema, g as cosineSimilarity, h as buildEventKindDescriptor, i as MACRO_LABELS, j as createEvent, k as BaseAddon, l as NcRulePatchSchema, m as audioMetricsCapability, n as EVENT_KIND_BY_CAP, o as NC_TAXONOMY, p as addonWidgetsSourceCapability, r as EVENT_PAD_MS, s as NcConditionDescriptorSchema, t as DEFAULT_EVENT_COLOR, u as NcRuleSchema, v as defineCustomActions, w as plateGalleryCapability, z as string } from "../dist-BsUHqtgU.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import sharp from "sharp";
4
4
  //#region src/pipeline-analytics/videoclips-provider.ts
@@ -16092,7 +16092,7 @@ var FaceRecognizer = class {
16092
16092
  const prev = this.bestMatchScore.get(c.trackId);
16093
16093
  if (prev === void 0 || match.score > prev) this.bestMatchScore.set(c.trackId, match.score);
16094
16094
  }
16095
- const recognizedIdentityId = state.assignedIdentityId ?? match?.identityId ?? void 0;
16095
+ const recognizedIdentityId = state.assignedIdentityId ?? void 0;
16096
16096
  const held = this.bestFace.get(c.trackId);
16097
16097
  const isNewBest = this.bestTracker.observe(c.trackId, c.confidence, input.timestamp);
16098
16098
  const needsCrop = held !== void 0 && held.crop === void 0;
@@ -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-CziJ_lMq.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-pcMwP3TG.mjs")).catch((e) => {
34
34
  throw l = void 0, e;
35
35
  }), l;
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-post-analysis",
3
- "version": "1.2.11",
3
+ "version": "1.2.13",
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",
@@ -6472,6 +6472,36 @@ var ProfileRtspEntrySchema = object({
6472
6472
  codec: string().optional(),
6473
6473
  resolution: CamStreamResolutionSchema.optional()
6474
6474
  });
6475
+ /**
6476
+ * Per-call node pinning for `ctx.api` capability calls.
6477
+ *
6478
+ * A capability call normally resolves to its DEFAULT provider — a `singleton`
6479
+ * cap resolves to the hub, a device-scoped cap to the device's owning node. To
6480
+ * query a SPECIFIC node's provider instead (e.g. a remote agent's own
6481
+ * in-process `platform-probe` hardware, which the hub cannot probe), pin the
6482
+ * call to that node.
6483
+ *
6484
+ * The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
6485
+ * method args), so capability method signatures stay `nodeId`-free — node
6486
+ * targeting is a property of the CALL, not of the method. The transport lifts
6487
+ * it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
6488
+ * and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
6489
+ * which classifies a pinned agent node as `agent-child-forward`
6490
+ * (`$agent-cap-fwd.forward` → the agent's in-process provider).
6491
+ *
6492
+ * Usage at a call site:
6493
+ *
6494
+ * await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
6495
+ */
6496
+ /** tRPC `op.context` key carrying a per-call node pin. */
6497
+ var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
6498
+ /**
6499
+ * Build the tRPC request options that pin a single capability call to `nodeId`.
6500
+ * Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
6501
+ */
6502
+ function nodePin(nodeId) {
6503
+ return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: nodeId } };
6504
+ }
6475
6505
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
6476
6506
  DeviceType["Camera"] = "camera";
6477
6507
  DeviceType["Hub"] = "hub";
@@ -7687,36 +7717,6 @@ var EncodeProfileSchema = object({
7687
7717
  */
7688
7718
  outputArgs: array(string()).optional()
7689
7719
  });
7690
- /**
7691
- * Per-call node pinning for `ctx.api` capability calls.
7692
- *
7693
- * A capability call normally resolves to its DEFAULT provider — a `singleton`
7694
- * cap resolves to the hub, a device-scoped cap to the device's owning node. To
7695
- * query a SPECIFIC node's provider instead (e.g. a remote agent's own
7696
- * in-process `platform-probe` hardware, which the hub cannot probe), pin the
7697
- * call to that node.
7698
- *
7699
- * The nodeId rides OUT-OF-BAND in the tRPC call context (NOT in the validated
7700
- * method args), so capability method signatures stay `nodeId`-free — node
7701
- * targeting is a property of the CALL, not of the method. The transport lifts
7702
- * it from `op.context` onto the `CapCallInput.nodeId` field (`ipcParentLink`),
7703
- * and the hub parent's `onUnownedCall` passes it to the `CapRouteResolver`,
7704
- * which classifies a pinned agent node as `agent-child-forward`
7705
- * (`$agent-cap-fwd.forward` → the agent's in-process provider).
7706
- *
7707
- * Usage at a call site:
7708
- *
7709
- * await api.platformProbe.getCapabilities.query(undefined, nodePin(nodeId))
7710
- */
7711
- /** tRPC `op.context` key carrying a per-call node pin. */
7712
- var CAP_NODE_PIN_CONTEXT_KEY = "__camstackNodePin";
7713
- /**
7714
- * Build the tRPC request options that pin a single capability call to `nodeId`.
7715
- * Pass as the second argument to `.query(input, …)` / `.mutate(input, …)`.
7716
- */
7717
- function nodePin(nodeId) {
7718
- return { context: { [CAP_NODE_PIN_CONTEXT_KEY]: nodeId } };
7719
- }
7720
7720
  function hfModelUrl(repo, path) {
7721
7721
  return `https://huggingface.co/${repo}/resolve/main/${path}`;
7722
7722
  }