camstack 1.2.1 → 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.
@@ -19628,7 +19628,8 @@ var PipelineStepInputSchema = external_exports.lazy(() => external_exports.objec
19628
19628
  modelId: external_exports.string().optional(),
19629
19629
  enabled: external_exports.boolean().default(true),
19630
19630
  children: external_exports.array(PipelineStepInputSchema).optional(),
19631
- settings: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
19631
+ settings: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
19632
+ jumpDeviceKey: external_exports.string().optional()
19632
19633
  }));
19633
19634
  var ModelSubstitutionSchema = external_exports.object({
19634
19635
  addonId: external_exports.string(),
@@ -20050,8 +20051,24 @@ var NativeCropBboxSchema = external_exports.object({
20050
20051
  h: external_exports.number()
20051
20052
  });
20052
20053
  var NativeCropResultSchema = external_exports.object({
20053
- /** Packed rgb (24-bit) pixels of the crop. */
20054
- bytes: external_exports.instanceof(Uint8Array),
20054
+ /**
20055
+ * Packed rgb (24-bit) pixels of the crop. Present on the DEFAULT (raw) path —
20056
+ * same-node (in-process / UDS) callers get zero-copy RGB and encode locally.
20057
+ * OMITTED when the caller requested `encodeJpeg` (the cross-node compressed
20058
+ * path below), where shipping raw RGB is both an invariant violation and, for
20059
+ * a native full frame (~26 MB at 4K), larger than Moleculer's 10 MB
20060
+ * `maxPacketSize` → the packet is dropped and the call 60s-times-out. That is
20061
+ * the cross-node native-media miss: `bytes` is replaced by `jpeg`.
20062
+ */
20063
+ bytes: external_exports.instanceof(Uint8Array).optional(),
20064
+ /**
20065
+ * Base64 JPEG of the crop — the COMPRESSED cross-node payload. The OWNING node
20066
+ * (which holds the native surface) encodes it in-process, so a native 4K frame
20067
+ * ships as ~0.5–2 MB (well under `maxPacketSize`) and NO raw pixels ever cross
20068
+ * a process boundary (CLAUDE.md invariant #21). Present ONLY when the request
20069
+ * set `encodeJpeg: true`; `bytes` is then absent.
20070
+ */
20071
+ jpeg: external_exports.string().optional(),
20055
20072
  width: external_exports.number().int().positive(),
20056
20073
  height: external_exports.number().int().positive(),
20057
20074
  /**
@@ -20135,6 +20152,11 @@ var RunnerFrameSourceSchema = external_exports.discriminatedUnion("kind", [exter
20135
20152
  /** Operator override for the owner host the runner dials. */
20136
20153
  hubHostnameOverride: external_exports.string().optional()
20137
20154
  })]).describe("Per-camera frame-source mode for the runner (P2c)");
20155
+ var RunnerInferenceDeviceSchema = external_exports.object({
20156
+ deviceKey: external_exports.string(),
20157
+ weight: external_exports.number().positive().default(1),
20158
+ maxSessions: external_exports.number().int().positive().nullable().default(null)
20159
+ });
20138
20160
  var RunnerCameraConfigSchema = external_exports.object({
20139
20161
  deviceId: external_exports.number(),
20140
20162
  /**
@@ -20242,7 +20264,16 @@ var RunnerCameraConfigSchema = external_exports.object({
20242
20264
  * omitted ⇒ the runner's default device. The engine itself stays node-local —
20243
20265
  * this only selects WHICH device pool of that node runs the session.
20244
20266
  */
20245
- deviceKey: external_exports.string().optional()
20267
+ deviceKey: external_exports.string().optional(),
20268
+ /**
20269
+ * Step-tree device-jump roster (phase 1): the node's ENABLED inference
20270
+ * devices, populated by the orchestrator ONLY when `deviceKey` is set and the
20271
+ * node has ≥2 enabled devices. The runner uses it to AUTO-jump an enrichment
20272
+ * step whose model has no build for the elected device's format onto another
20273
+ * enabled device of the SAME node (weighted-least-loaded). Absent/single-entry
20274
+ * ⇒ no jump possible; the step runs on `deviceKey`.
20275
+ */
20276
+ inferenceDevices: external_exports.array(RunnerInferenceDeviceSchema).readonly().optional()
20246
20277
  });
20247
20278
  var RunnerCameraDeviceUIFields = [
20248
20279
  {
@@ -20447,7 +20478,18 @@ var pipelineRunnerCapability = {
20447
20478
  getNativeCrop: method(external_exports.object({
20448
20479
  handle: FrameHandleSchema,
20449
20480
  bbox: NativeCropBboxSchema,
20450
- maxWidth: external_exports.number().int().positive().optional()
20481
+ maxWidth: external_exports.number().int().positive().optional(),
20482
+ /**
20483
+ * When `true`, the runner encodes the resolved crop to JPEG ON THE
20484
+ * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
20485
+ * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
20486
+ * agent) so the compressed payload fits Moleculer's `maxPacketSize` and
20487
+ * no raw pixels cross the process boundary. Same-node callers omit it
20488
+ * and keep the zero-copy raw `bytes` path. Additive + optional: a
20489
+ * pre-encode runner (version skew) ignores it and returns `bytes`, so
20490
+ * the caller falls back to encoding locally.
20491
+ */
20492
+ encodeJpeg: external_exports.boolean().optional()
20451
20493
  }), NativeCropResultSchema.nullable()),
20452
20494
  /**
20453
20495
  * Two-plane design: run the DETAIL subtree (crop children —
@@ -26675,7 +26717,16 @@ var PipelineTemplateSchema = external_exports.object({
26675
26717
  });
26676
26718
  var DeviceStepConfigSchema = external_exports.object({
26677
26719
  modelId: external_exports.string().optional(),
26678
- settings: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
26720
+ settings: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
26721
+ /**
26722
+ * Step-tree device jump (same-node, phase 1) — OPTIONAL manual override.
26723
+ * When set, this step runs on the named enabled device of the SAME node
26724
+ * (`<backend>:<device>`) instead of the camera's elected device, bypassing
26725
+ * the runtime AUTO-jump. The orchestrator rejects a `jumpDeviceKey` pointing
26726
+ * at a disabled/absent device on that node at save time. Absent ⇒ the runner
26727
+ * auto-jumps only when the effective device's format cannot run the step.
26728
+ */
26729
+ jumpDeviceKey: external_exports.string().optional()
26679
26730
  });
26680
26731
  var AgentPipelineSettingsSchema = external_exports.object({
26681
26732
  maxCameras: external_exports.number().int().nonnegative().nullable().default(null),
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runDiscover
4
- } from "./chunk-UW26FXNH.js";
4
+ } from "./chunk-QCUR7GXB.js";
5
5
  import "./chunk-K3NQKI34.js";
6
6
 
7
7
  // src/cli.ts
@@ -1079,7 +1079,7 @@ function isUnknown(_value) {
1079
1079
  return true;
1080
1080
  }
1081
1081
  async function resolveServerInteractive(presetNamespace) {
1082
- const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-YZCMQEZ5.js");
1082
+ const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-4OS76PKO.js");
1083
1083
  if (presetNamespace) {
1084
1084
  const spinner4 = clack.spinner();
1085
1085
  spinner4.start(`Discovering hub on LAN (namespace "${presetNamespace}")`);
@@ -5,7 +5,7 @@ import {
5
5
  filterHubNodes,
6
6
  resolveHubFromDiscovered,
7
7
  runDiscover
8
- } from "./chunk-UW26FXNH.js";
8
+ } from "./chunk-QCUR7GXB.js";
9
9
  import "./chunk-K3NQKI34.js";
10
10
  export {
11
11
  DEFAULT_HUB_HTTPS_PORT,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstack",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "CLI tool for managing and running CamStack server",
5
5
  "keywords": [
6
6
  "camstack",