@camstack/addon-post-analysis 1.2.0 → 1.2.2

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.
@@ -11146,7 +11146,8 @@ var PipelineStepInputSchema = lazy(() => object({
11146
11146
  modelId: string().optional(),
11147
11147
  enabled: boolean().default(true),
11148
11148
  children: array(PipelineStepInputSchema).optional(),
11149
- settings: record(string(), unknown()).optional()
11149
+ settings: record(string(), unknown()).optional(),
11150
+ jumpDeviceKey: string().optional()
11150
11151
  }));
11151
11152
  var ModelSubstitutionSchema = object({
11152
11153
  addonId: string(),
@@ -11452,10 +11453,40 @@ var NativeCropBboxSchema = object({
11452
11453
  });
11453
11454
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
11454
11455
  var NativeCropResultSchema = object({
11455
- /** Packed rgb (24-bit) pixels of the crop. */
11456
- bytes: _instanceof(Uint8Array),
11456
+ /**
11457
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
11458
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
11459
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
11460
+ * path below), where shipping raw RGB is both an invariant violation and, for
11461
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
11462
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
11463
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
11464
+ */
11465
+ bytes: _instanceof(Uint8Array).optional(),
11466
+ /**
11467
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
11468
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
11469
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
11470
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
11471
+ * set `encodeJpeg: true`; `bytes` is then absent.
11472
+ */
11473
+ jpeg: string().optional(),
11457
11474
  width: number().int().positive(),
11458
- height: number().int().positive()
11475
+ height: number().int().positive(),
11476
+ /**
11477
+ * Which source served this crop, so a quality-sensitive consumer (the native
11478
+ * `keyFrame`) can reject a degraded fallback:
11479
+ * - `native` — cut from the decode worker's retained NATIVE surface (the
11480
+ * quality path).
11481
+ * - `ram-fullframe` — the native surface MISSED but the request was full-frame,
11482
+ * so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
11483
+ * the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
11484
+ *
11485
+ * OPTIONAL: a pre-tier runner (version skew) omits it — an ABSENT `tier` MUST be
11486
+ * treated as `native` (accepted) by every consumer so mixed-version clusters
11487
+ * keep the pre-tier behaviour. An ROI miss returns `null` (no tier at all).
11488
+ */
11489
+ tier: _enum(["native", "ram-fullframe"]).optional()
11459
11490
  });
11460
11491
  /** Parent detection context passed to `runDetailSubtree` — the crop's
11461
11492
  * originating detection, in FRAME-space coordinates. Reuses
@@ -11585,6 +11616,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
11585
11616
  hubHostnameOverride: string().optional()
11586
11617
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
11587
11618
  /**
11619
+ * One ENABLED inference device on the runner's node, as the step-tree
11620
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
11621
+ * roster on the attach payload whenever the camera is elected onto a specific
11622
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
11623
+ * runner auto-jumps an enrichment step to when the elected device's format
11624
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
11625
+ * per-device knobs so the auto choice is weighted-least-loaded.
11626
+ */
11627
+ var RunnerInferenceDeviceSchema = object({
11628
+ deviceKey: string(),
11629
+ weight: number().positive().default(1),
11630
+ maxSessions: number().int().positive().nullable().default(null)
11631
+ });
11632
+ /**
11588
11633
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
11589
11634
  * specific runner instance via `attachCamera`. Carries everything the
11590
11635
  * runner needs to subscribe to the local broker and execute inference.
@@ -11702,7 +11747,16 @@ var RunnerCameraConfigSchema = object({
11702
11747
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
11703
11748
  * this only selects WHICH device pool of that node runs the session.
11704
11749
  */
11705
- deviceKey: string().optional()
11750
+ deviceKey: string().optional(),
11751
+ /**
11752
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
11753
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
11754
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
11755
+ * step whose model has no build for the elected device's format onto another
11756
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
11757
+ * ⇒ no jump possible; the step runs on `deviceKey`.
11758
+ */
11759
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
11706
11760
  });
11707
11761
  motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
11708
11762
  /**
@@ -11758,7 +11812,18 @@ var RunnerLocalMetricsSchema = object({
11758
11812
  method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
11759
11813
  handle: FrameHandleSchema,
11760
11814
  bbox: NativeCropBboxSchema,
11761
- maxWidth: number().int().positive().optional()
11815
+ maxWidth: number().int().positive().optional(),
11816
+ /**
11817
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
11818
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
11819
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
11820
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
11821
+ * no raw pixels cross the process boundary. Same-node callers omit it
11822
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
11823
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
11824
+ * the caller falls back to encoding locally.
11825
+ */
11826
+ encodeJpeg: boolean().optional()
11762
11827
  }), NativeCropResultSchema.nullable()), method(object({
11763
11828
  deviceId: number(),
11764
11829
  frameHandle: FrameHandleSchema.optional(),
@@ -14841,7 +14906,8 @@ var LinkedDeviceSchema = object({
14841
14906
  deviceId: number(),
14842
14907
  name: string(),
14843
14908
  location: string().nullable(),
14844
- features: array(string())
14909
+ features: array(string()),
14910
+ producesTrackedEvents: boolean().optional()
14845
14911
  });
14846
14912
  var SavedDeviceRowSchema = object({
14847
14913
  /** Numeric id reserved at allocateDeviceId time. */
@@ -16481,6 +16547,7 @@ var TrackSchema = object({
16481
16547
  deviceId: number(),
16482
16548
  className: string(),
16483
16549
  label: string().optional(),
16550
+ producingDeviceName: string().optional(),
16484
16551
  /** Track provenance. Absent ⇒ `pipeline` (legacy rows). */
16485
16552
  source: TrackSourceSchema.optional(),
16486
16553
  firstSeen: number(),
@@ -16618,7 +16685,8 @@ var MediaFileKindEnum = _enum([
16618
16685
  "fullFrameBoxed",
16619
16686
  "faceCrop",
16620
16687
  "plateCrop",
16621
- "keyFrame"
16688
+ "keyFrame",
16689
+ "keyFrameSmall"
16622
16690
  ]);
16623
16691
  var MediaFileSchema = object({
16624
16692
  key: string(),
@@ -17130,7 +17198,16 @@ var PipelineTemplateSchema = object({
17130
17198
  });
17131
17199
  var DeviceStepConfigSchema = object({
17132
17200
  modelId: string().optional(),
17133
- settings: record(string(), unknown()).optional()
17201
+ settings: record(string(), unknown()).optional(),
17202
+ /**
17203
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
17204
+ * When set, this step runs on the named enabled device of the SAME node
17205
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
17206
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
17207
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
17208
+ * auto-jumps only when the effective device's format cannot run the step.
17209
+ */
17210
+ jumpDeviceKey: string().optional()
17134
17211
  });
17135
17212
  var AgentPipelineSettingsSchema = object({
17136
17213
  maxCameras: number().int().nonnegative().nullable().default(null),
@@ -11168,7 +11168,8 @@ var PipelineStepInputSchema = lazy(() => object({
11168
11168
  modelId: string().optional(),
11169
11169
  enabled: boolean().default(true),
11170
11170
  children: array(PipelineStepInputSchema).optional(),
11171
- settings: record(string(), unknown()).optional()
11171
+ settings: record(string(), unknown()).optional(),
11172
+ jumpDeviceKey: string().optional()
11172
11173
  }));
11173
11174
  var ModelSubstitutionSchema = object({
11174
11175
  addonId: string(),
@@ -11474,10 +11475,40 @@ var NativeCropBboxSchema = object({
11474
11475
  });
11475
11476
  /** Result of a best-effort native-resolution crop (`getNativeCrop`). */
11476
11477
  var NativeCropResultSchema = object({
11477
- /** Packed rgb (24-bit) pixels of the crop. */
11478
- bytes: _instanceof(Uint8Array),
11478
+ /**
11479
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
11480
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
11481
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
11482
+ * path below), where shipping raw RGB is both an invariant violation and, for
11483
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
11484
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
11485
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
11486
+ */
11487
+ bytes: _instanceof(Uint8Array).optional(),
11488
+ /**
11489
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
11490
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
11491
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
11492
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
11493
+ * set `encodeJpeg: true`; `bytes` is then absent.
11494
+ */
11495
+ jpeg: string().optional(),
11479
11496
  width: number().int().positive(),
11480
- height: number().int().positive()
11497
+ height: number().int().positive(),
11498
+ /**
11499
+ * Which source served this crop, so a quality-sensitive consumer (the native
11500
+ * `keyFrame`) can reject a degraded fallback:
11501
+ * - `native` — cut from the decode worker's retained NATIVE surface (the
11502
+ * quality path).
11503
+ * - `ram-fullframe` — the native surface MISSED but the request was full-frame,
11504
+ * so the ≤640 RAM `RetainedFrameStore` served it (honest lower-res; legit for
11505
+ * the blank-frame guard / 640-snapshot resolve, NOT for the clean keyFrame).
11506
+ *
11507
+ * OPTIONAL: a pre-tier runner (version skew) omits it — an ABSENT `tier` MUST be
11508
+ * treated as `native` (accepted) by every consumer so mixed-version clusters
11509
+ * keep the pre-tier behaviour. An ROI miss returns `null` (no tier at all).
11510
+ */
11511
+ tier: _enum(["native", "ram-fullframe"]).optional()
11481
11512
  });
11482
11513
  /** Parent detection context passed to `runDetailSubtree` — the crop's
11483
11514
  * originating detection, in FRAME-space coordinates. Reuses
@@ -11607,6 +11638,20 @@ var RunnerFrameSourceSchema = discriminatedUnion("kind", [object({ kind: literal
11607
11638
  hubHostnameOverride: string().optional()
11608
11639
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
11609
11640
  /**
11641
+ * One ENABLED inference device on the runner's node, as the step-tree
11642
+ * device-jump resolver sees it (phase 1). The orchestrator populates this
11643
+ * roster on the attach payload whenever the camera is elected onto a specific
11644
+ * `deviceKey` and the node has ≥2 enabled devices — it is the candidate set the
11645
+ * runner auto-jumps an enrichment step to when the elected device's format
11646
+ * cannot run that step's model. `weight`/`maxSessions` mirror the balancer's
11647
+ * per-device knobs so the auto choice is weighted-least-loaded.
11648
+ */
11649
+ var RunnerInferenceDeviceSchema = object({
11650
+ deviceKey: string(),
11651
+ weight: number().positive().default(1),
11652
+ maxSessions: number().int().positive().nullable().default(null)
11653
+ });
11654
+ /**
11610
11655
  * Camera assignment payload sent by `addon-pipeline-orchestrator` to a
11611
11656
  * specific runner instance via `attachCamera`. Carries everything the
11612
11657
  * runner needs to subscribe to the local broker and execute inference.
@@ -11724,7 +11769,16 @@ var RunnerCameraConfigSchema = object({
11724
11769
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
11725
11770
  * this only selects WHICH device pool of that node runs the session.
11726
11771
  */
11727
- deviceKey: string().optional()
11772
+ deviceKey: string().optional(),
11773
+ /**
11774
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
11775
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
11776
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
11777
+ * step whose model has no build for the elected device's format onto another
11778
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
11779
+ * ⇒ no jump possible; the step runs on `deviceKey`.
11780
+ */
11781
+ inferenceDevices: array(RunnerInferenceDeviceSchema).readonly().optional()
11728
11782
  });
11729
11783
  motionFpsField.min, motionFpsField.max, motionFpsField.step, motionFpsField.default, detectionFpsField.min, detectionFpsField.max, detectionFpsField.step, detectionFpsField.default, motionCooldownMsField.min, motionCooldownMsField.max, motionCooldownMsField.step, motionCooldownMsField.default, occupancyRecheckSecField.min, occupancyRecheckSecField.max, occupancyRecheckSecField.step, occupancyRecheckSecField.default, occupancyRecheckFramesField.min, occupancyRecheckFramesField.max, occupancyRecheckFramesField.step, occupancyRecheckFramesField.default;
11730
11784
  /**
@@ -11780,7 +11834,18 @@ var RunnerLocalMetricsSchema = object({
11780
11834
  method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mutation" }), method(object({ deviceId: number() }), object({ success: literal(true) }), { kind: "mutation" }), method(ReportMotionInputSchema, object({ success: literal(true) }), { kind: "mutation" }), method(_void(), RunnerLocalLoadSchema), method(_void(), RunnerLocalMetricsSchema), method(object({ deviceId: number() }), CameraMetricsSchema.nullable()), method(_void(), array(CameraMetricsWithDeviceIdSchema).readonly()), method(_void(), array(number()).readonly()), method(object({
11781
11835
  handle: FrameHandleSchema,
11782
11836
  bbox: NativeCropBboxSchema,
11783
- maxWidth: number().int().positive().optional()
11837
+ maxWidth: number().int().positive().optional(),
11838
+ /**
11839
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
11840
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
11841
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
11842
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
11843
+ * no raw pixels cross the process boundary. Same-node callers omit it
11844
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
11845
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
11846
+ * the caller falls back to encoding locally.
11847
+ */
11848
+ encodeJpeg: boolean().optional()
11784
11849
  }), NativeCropResultSchema.nullable()), method(object({
11785
11850
  deviceId: number(),
11786
11851
  frameHandle: FrameHandleSchema.optional(),
@@ -14863,7 +14928,8 @@ var LinkedDeviceSchema = object({
14863
14928
  deviceId: number(),
14864
14929
  name: string(),
14865
14930
  location: string().nullable(),
14866
- features: array(string())
14931
+ features: array(string()),
14932
+ producesTrackedEvents: boolean().optional()
14867
14933
  });
14868
14934
  var SavedDeviceRowSchema = object({
14869
14935
  /** Numeric id reserved at allocateDeviceId time. */
@@ -16503,6 +16569,7 @@ var TrackSchema = object({
16503
16569
  deviceId: number(),
16504
16570
  className: string(),
16505
16571
  label: string().optional(),
16572
+ producingDeviceName: string().optional(),
16506
16573
  /** Track provenance. Absent ⇒ `pipeline` (legacy rows). */
16507
16574
  source: TrackSourceSchema.optional(),
16508
16575
  firstSeen: number(),
@@ -16640,7 +16707,8 @@ var MediaFileKindEnum = _enum([
16640
16707
  "fullFrameBoxed",
16641
16708
  "faceCrop",
16642
16709
  "plateCrop",
16643
- "keyFrame"
16710
+ "keyFrame",
16711
+ "keyFrameSmall"
16644
16712
  ]);
16645
16713
  var MediaFileSchema = object({
16646
16714
  key: string(),
@@ -17152,7 +17220,16 @@ var PipelineTemplateSchema = object({
17152
17220
  });
17153
17221
  var DeviceStepConfigSchema = object({
17154
17222
  modelId: string().optional(),
17155
- settings: record(string(), unknown()).optional()
17223
+ settings: record(string(), unknown()).optional(),
17224
+ /**
17225
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
17226
+ * When set, this step runs on the named enabled device of the SAME node
17227
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
17228
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
17229
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
17230
+ * auto-jumps only when the effective device's format cannot run the step.
17231
+ */
17232
+ jumpDeviceKey: string().optional()
17156
17233
  });
17157
17234
  var AgentPipelineSettingsSchema = object({
17158
17235
  maxCameras: number().int().nonnegative().nullable().default(null),
@@ -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-MgnHaI0L.js");
5
+ const require_dist = require("../dist-DSP-cVM0.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 { b as BaseAddon, f as hfModelUrl, u as embeddingEncoderCapability } from "../dist-CirtGNcr.mjs";
1
+ import { b as BaseAddon, f as hfModelUrl, u as embeddingEncoderCapability } from "../dist-Bu9eXObI.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-MgnHaI0L.js");
1
+ const require_dist = require("./dist-DSP-cVM0.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");
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
3
3
  var e = {
4
4
  "@camstack/sdk": {
5
5
  name: "@camstack/sdk",
6
- version: "1.2.0",
6
+ version: "1.2.2",
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.2.0",
21
+ version: "1.2.2",
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.2.0",
36
+ version: "1.2.2",
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.2.0",
39
+ version: "1.2.2",
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.2.0",
48
+ version: "1.2.2",
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.2.0",
84
+ version: "1.2.2",
85
85
  scope: "default",
86
86
  shareConfig: {
87
87
  singleton: !0,