camstack 1.2.149 → 1.2.151

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.
@@ -14522,7 +14522,7 @@ function date4(params) {
14522
14522
  // ../../node_modules/zod/v4/classic/external.js
14523
14523
  config(en_default());
14524
14524
 
14525
- // ../types/dist/sleep-DEuj7E3j.mjs
14525
+ // ../types/dist/sleep-BEyvfshj.mjs
14526
14526
  var AUDIO_CHUNK_FORMATS = [
14527
14527
  "f32le",
14528
14528
  "pcmu",
@@ -28984,6 +28984,7 @@ var MotionSourceEnum = external_exports.enum([
28984
28984
  "device-activity"
28985
28985
  ]);
28986
28986
  var MotionSourcesSchema = external_exports.array(MotionSourceEnum);
28987
+ var DetectionSourcesSchema = external_exports.array(DetectionSourceSchema);
28987
28988
  var ReportMotionInputSchema = external_exports.object({
28988
28989
  deviceId: external_exports.number(),
28989
28990
  detected: external_exports.boolean(),
@@ -29091,6 +29092,35 @@ var RunnerCameraConfigSchema = external_exports.object({
29091
29092
  * events; the orchestrator forwards to `reportMotion`.
29092
29093
  */
29093
29094
  motionSources: MotionSourcesSchema.default(["analyzer"]),
29095
+ /**
29096
+ * WHICH root detector runs for this camera. The detection counterpart of
29097
+ * {@link motionSources}, same shape and same discipline: a per-camera list
29098
+ * of sources the system understands, vendor-agnostic, owned here.
29099
+ *
29100
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
29101
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
29102
+ * here. Its boxes reach post-analysis on the same
29103
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
29104
+ * track gets the same tracker, the same overlay and the same detail
29105
+ * subtree (face / plate / embedding).
29106
+ *
29107
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
29108
+ * run, and that is where a camera with a usable onboard detector buys back
29109
+ * its share of the accelerator. It saves the root inference, not the decode
29110
+ * — the detail subtree still needs pixels to cut crops from.
29111
+ *
29112
+ * A camera whose onboard detections carry no geometry cannot serve as a root
29113
+ * step at all (there is nothing to track), and the cap that knows this says
29114
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
29115
+ * every battery camera: the boxes ride a sub-stream a battery camera never
29116
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
29117
+ * worth exactly what it already is — a wake signal with a class.
29118
+ *
29119
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
29120
+ * vendor never turns a detector on for the operator, and neither does a
29121
+ * default.
29122
+ */
29123
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
29094
29124
  pipelineEnabled: external_exports.boolean().default(true),
29095
29125
  /** Ordered tree of video steps. Absent → runner skips video detection. */
29096
29126
  steps: external_exports.array(PipelineStepInputSchema).readonly().optional(),
@@ -29213,6 +29243,19 @@ var RunnerCameraDeviceUIFields = [
29213
29243
  }
29214
29244
  ]
29215
29245
  },
29246
+ {
29247
+ key: "detectionSources",
29248
+ type: "multiselect",
29249
+ label: "Detection Sources",
29250
+ default: ["pipeline"],
29251
+ options: [{
29252
+ value: "pipeline",
29253
+ label: "This node (ML root step on decoded frames)"
29254
+ }, {
29255
+ value: "onboard",
29256
+ label: "Camera onboard AI (replaces the root step when picked alone)"
29257
+ }]
29258
+ },
29216
29259
  {
29217
29260
  key: "motionFps",
29218
29261
  type: "slider",
@@ -36569,11 +36612,27 @@ var NativeObjectDetectionStatusSchema = external_exports.object({
36569
36612
  supportedClasses: external_exports.array(NativeObjectClassEnum).readonly(),
36570
36613
  /**
36571
36614
  * Whether forwarding of onboard AI detections is enabled for this device.
36572
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
36573
- * churn the tracker, so forwarding stays off until the operator enables it.
36615
+ *
36616
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
36617
+ * camera runs — that is the operator's choice, and it is made where every
36618
+ * other detection choice is made. `geometry` on
36619
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
36620
+ * choice would buy this particular camera.
36574
36621
  */
36575
36622
  enabled: external_exports.boolean()
36576
36623
  });
36624
+ var NativeObjectGeometryEnum = external_exports.enum([
36625
+ "boxed",
36626
+ "while-streaming",
36627
+ "flag-only"
36628
+ ]);
36629
+ var NativeObjectDetectionOptionsSchema = external_exports.object({
36630
+ /** Classes this firmware can detect — the same list the status reports. */
36631
+ supportedClasses: external_exports.array(NativeObjectClassEnum).readonly(),
36632
+ /** What a detection from this camera carries. */
36633
+ geometry: NativeObjectGeometryEnum
36634
+ });
36635
+ var NativeObjectDetectionSettingsPatchSchema = external_exports.object({ enabled: external_exports.boolean().optional() });
36577
36636
  var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
36578
36637
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
36579
36638
  lastFetchedAt: external_exports.number()
@@ -36584,13 +36643,23 @@ var nativeObjectDetectionCapability = {
36584
36643
  deviceNative: true,
36585
36644
  mode: "singleton",
36586
36645
  deviceTypes: [DeviceType.Camera],
36587
- methods: { setEnabled: method(external_exports.object({
36588
- deviceId: external_exports.number(),
36589
- enabled: external_exports.boolean()
36590
- }), external_exports.void(), {
36591
- kind: "mutation",
36592
- auth: "admin"
36593
- }) },
36646
+ methods: {
36647
+ getOptions: method(external_exports.object({ deviceId: external_exports.number() }), NativeObjectDetectionOptionsSchema),
36648
+ setSettings: method(external_exports.object({
36649
+ deviceId: external_exports.number(),
36650
+ settings: NativeObjectDetectionSettingsPatchSchema
36651
+ }), external_exports.void(), {
36652
+ kind: "mutation",
36653
+ auth: "admin"
36654
+ }),
36655
+ setEnabled: method(external_exports.object({
36656
+ deviceId: external_exports.number(),
36657
+ enabled: external_exports.boolean()
36658
+ }), external_exports.void(), {
36659
+ kind: "mutation",
36660
+ auth: "admin"
36661
+ })
36662
+ },
36594
36663
  events: { onDetected: { data: external_exports.object({
36595
36664
  deviceId: external_exports.number(),
36596
36665
  detection: NativeDetectionSchema
@@ -44011,12 +44080,24 @@ var METHOD_ACCESS_MAP = Object.freeze({
44011
44080
  addonId: null,
44012
44081
  access: "create"
44013
44082
  },
44083
+ "nativeObjectDetection.getOptions": {
44084
+ capName: "native-object-detection",
44085
+ capScope: "device",
44086
+ addonId: null,
44087
+ access: "view"
44088
+ },
44014
44089
  "nativeObjectDetection.setEnabled": {
44015
44090
  capName: "native-object-detection",
44016
44091
  capScope: "device",
44017
44092
  addonId: null,
44018
44093
  access: "create"
44019
44094
  },
44095
+ "nativeObjectDetection.setSettings": {
44096
+ capName: "native-object-detection",
44097
+ capScope: "device",
44098
+ addonId: null,
44099
+ access: "create"
44100
+ },
44020
44101
  "navigation.getFeatures": {
44021
44102
  capName: "navigation",
44022
44103
  capScope: "device",
@@ -48243,11 +48324,21 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
48243
48324
  form: "single",
48244
48325
  optional: false
48245
48326
  }],
48327
+ "nativeObjectDetection.getOptions": [{
48328
+ name: "deviceId",
48329
+ form: "single",
48330
+ optional: false
48331
+ }],
48246
48332
  "nativeObjectDetection.setEnabled": [{
48247
48333
  name: "deviceId",
48248
48334
  form: "single",
48249
48335
  optional: false
48250
48336
  }],
48337
+ "nativeObjectDetection.setSettings": [{
48338
+ name: "deviceId",
48339
+ form: "single",
48340
+ optional: false
48341
+ }],
48251
48342
  "navigation.getFeatures": [{
48252
48343
  name: "deviceId",
48253
48344
  form: "single",
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runDiscover
4
- } from "./chunk-IGFZA22D.js";
4
+ } from "./chunk-G3ME646K.js";
5
5
  import "./chunk-LMMQX4CK.js";
6
6
 
7
7
  // src/cli.ts
@@ -38,7 +38,7 @@ async function runServe(args) {
38
38
  ...typeof values.data === "string" ? { data: values.data } : {}
39
39
  };
40
40
  Object.assign(process.env, buildServeEnv(opts));
41
- await import("./launcher-26BZ4JHD.js");
41
+ await import("./launcher-SQWBPN4O.js");
42
42
  }
43
43
 
44
44
  // src/commands/agent.ts
@@ -83,7 +83,7 @@ async function runAgent(args) {
83
83
  ...typeof values.port === "string" ? { port: values.port } : {}
84
84
  };
85
85
  Object.assign(process.env, buildAgentEnv(opts));
86
- await import("./launcher-26BZ4JHD.js");
86
+ await import("./launcher-SQWBPN4O.js");
87
87
  }
88
88
 
89
89
  // src/commands/setup.ts
@@ -1140,7 +1140,7 @@ function isUnknown(_value) {
1140
1140
  return true;
1141
1141
  }
1142
1142
  async function resolveServerInteractive(presetNamespace) {
1143
- const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-ZCOCQKSU.js");
1143
+ const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-DFMZ7HZD.js");
1144
1144
  if (presetNamespace) {
1145
1145
  const spinner4 = clack.spinner();
1146
1146
  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-IGFZA22D.js";
8
+ } from "./chunk-G3ME646K.js";
9
9
  import "./chunk-LMMQX4CK.js";
10
10
  export {
11
11
  DEFAULT_HUB_HTTPS_PORT,
@@ -23633,9 +23633,9 @@ var require_zod = __commonJS({
23633
23633
  }
23634
23634
  });
23635
23635
 
23636
- // ../system/dist/dist-CEIkHEdy.js
23637
- var require_dist_CEIkHEdy = __commonJS({
23638
- "../system/dist/dist-CEIkHEdy.js"(exports) {
23636
+ // ../system/dist/dist-DaSCLJVH.js
23637
+ var require_dist_DaSCLJVH = __commonJS({
23638
+ "../system/dist/dist-DaSCLJVH.js"(exports) {
23639
23639
  "use strict";
23640
23640
  var zod = require_zod();
23641
23641
  var EventCategory = /* @__PURE__ */ (function(EventCategory2) {
@@ -39745,6 +39745,7 @@ var require_dist_CEIkHEdy = __commonJS({
39745
39745
  "device-activity"
39746
39746
  ]);
39747
39747
  var MotionSourcesSchema = zod.z.array(MotionSourceEnum);
39748
+ var DetectionSourcesSchema = zod.z.array(DetectionSourceSchema);
39748
39749
  var ReportMotionInputSchema = zod.z.object({
39749
39750
  deviceId: zod.z.number(),
39750
39751
  detected: zod.z.boolean(),
@@ -39852,6 +39853,35 @@ var require_dist_CEIkHEdy = __commonJS({
39852
39853
  * events; the orchestrator forwards to `reportMotion`.
39853
39854
  */
39854
39855
  motionSources: MotionSourcesSchema.default(["analyzer"]),
39856
+ /**
39857
+ * WHICH root detector runs for this camera. The detection counterpart of
39858
+ * {@link motionSources}, same shape and same discipline: a per-camera list
39859
+ * of sources the system understands, vendor-agnostic, owned here.
39860
+ *
39861
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
39862
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
39863
+ * here. Its boxes reach post-analysis on the same
39864
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
39865
+ * track gets the same tracker, the same overlay and the same detail
39866
+ * subtree (face / plate / embedding).
39867
+ *
39868
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
39869
+ * run, and that is where a camera with a usable onboard detector buys back
39870
+ * its share of the accelerator. It saves the root inference, not the decode
39871
+ * — the detail subtree still needs pixels to cut crops from.
39872
+ *
39873
+ * A camera whose onboard detections carry no geometry cannot serve as a root
39874
+ * step at all (there is nothing to track), and the cap that knows this says
39875
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
39876
+ * every battery camera: the boxes ride a sub-stream a battery camera never
39877
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
39878
+ * worth exactly what it already is — a wake signal with a class.
39879
+ *
39880
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
39881
+ * vendor never turns a detector on for the operator, and neither does a
39882
+ * default.
39883
+ */
39884
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
39855
39885
  pipelineEnabled: zod.z.boolean().default(true),
39856
39886
  /** Ordered tree of video steps. Absent → runner skips video detection. */
39857
39887
  steps: zod.z.array(PipelineStepInputSchema).readonly().optional(),
@@ -47155,11 +47185,27 @@ var require_dist_CEIkHEdy = __commonJS({
47155
47185
  supportedClasses: zod.z.array(NativeObjectClassEnum).readonly(),
47156
47186
  /**
47157
47187
  * Whether forwarding of onboard AI detections is enabled for this device.
47158
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
47159
- * churn the tracker, so forwarding stays off until the operator enables it.
47188
+ *
47189
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
47190
+ * camera runs — that is the operator's choice, and it is made where every
47191
+ * other detection choice is made. `geometry` on
47192
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
47193
+ * choice would buy this particular camera.
47160
47194
  */
47161
47195
  enabled: zod.z.boolean()
47162
47196
  });
47197
+ var NativeObjectGeometryEnum = zod.z.enum([
47198
+ "boxed",
47199
+ "while-streaming",
47200
+ "flag-only"
47201
+ ]);
47202
+ var NativeObjectDetectionOptionsSchema = zod.z.object({
47203
+ /** Classes this firmware can detect — the same list the status reports. */
47204
+ supportedClasses: zod.z.array(NativeObjectClassEnum).readonly(),
47205
+ /** What a detection from this camera carries. */
47206
+ geometry: NativeObjectGeometryEnum
47207
+ });
47208
+ var NativeObjectDetectionSettingsPatchSchema = zod.z.object({ enabled: zod.z.boolean().optional() });
47163
47209
  var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
47164
47210
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
47165
47211
  lastFetchedAt: zod.z.number()
@@ -47170,13 +47216,23 @@ var require_dist_CEIkHEdy = __commonJS({
47170
47216
  deviceNative: true,
47171
47217
  mode: "singleton",
47172
47218
  deviceTypes: [DeviceType.Camera],
47173
- methods: { setEnabled: method(zod.z.object({
47174
- deviceId: zod.z.number(),
47175
- enabled: zod.z.boolean()
47176
- }), zod.z.void(), {
47177
- kind: "mutation",
47178
- auth: "admin"
47179
- }) },
47219
+ methods: {
47220
+ getOptions: method(zod.z.object({ deviceId: zod.z.number() }), NativeObjectDetectionOptionsSchema),
47221
+ setSettings: method(zod.z.object({
47222
+ deviceId: zod.z.number(),
47223
+ settings: NativeObjectDetectionSettingsPatchSchema
47224
+ }), zod.z.void(), {
47225
+ kind: "mutation",
47226
+ auth: "admin"
47227
+ }),
47228
+ setEnabled: method(zod.z.object({
47229
+ deviceId: zod.z.number(),
47230
+ enabled: zod.z.boolean()
47231
+ }), zod.z.void(), {
47232
+ kind: "mutation",
47233
+ auth: "admin"
47234
+ })
47235
+ },
47180
47236
  events: { onDetected: { data: zod.z.object({
47181
47237
  deviceId: zod.z.number(),
47182
47238
  detection: NativeDetectionSchema
@@ -55425,12 +55481,24 @@ var require_dist_CEIkHEdy = __commonJS({
55425
55481
  addonId: null,
55426
55482
  access: "create"
55427
55483
  },
55484
+ "nativeObjectDetection.getOptions": {
55485
+ capName: "native-object-detection",
55486
+ capScope: "device",
55487
+ addonId: null,
55488
+ access: "view"
55489
+ },
55428
55490
  "nativeObjectDetection.setEnabled": {
55429
55491
  capName: "native-object-detection",
55430
55492
  capScope: "device",
55431
55493
  addonId: null,
55432
55494
  access: "create"
55433
55495
  },
55496
+ "nativeObjectDetection.setSettings": {
55497
+ capName: "native-object-detection",
55498
+ capScope: "device",
55499
+ addonId: null,
55500
+ access: "create"
55501
+ },
55434
55502
  "navigation.getFeatures": {
55435
55503
  capName: "navigation",
55436
55504
  capScope: "device",
@@ -59657,11 +59725,21 @@ var require_dist_CEIkHEdy = __commonJS({
59657
59725
  form: "single",
59658
59726
  optional: false
59659
59727
  }],
59728
+ "nativeObjectDetection.getOptions": [{
59729
+ name: "deviceId",
59730
+ form: "single",
59731
+ optional: false
59732
+ }],
59660
59733
  "nativeObjectDetection.setEnabled": [{
59661
59734
  name: "deviceId",
59662
59735
  form: "single",
59663
59736
  optional: false
59664
59737
  }],
59738
+ "nativeObjectDetection.setSettings": [{
59739
+ name: "deviceId",
59740
+ form: "single",
59741
+ optional: false
59742
+ }],
59665
59743
  "navigation.getFeatures": [{
59666
59744
  name: "deviceId",
59667
59745
  form: "single",
@@ -62301,7 +62379,7 @@ var require_alerts_addon = __commonJS({
62301
62379
  [Symbol.toStringTag]: { value: "Module" }
62302
62380
  });
62303
62381
  require_chunk_Cek0wNdY();
62304
- var require_dist10 = require_dist_CEIkHEdy();
62382
+ var require_dist10 = require_dist_DaSCLJVH();
62305
62383
  function selectExpired(alerts, cutoffMs) {
62306
62384
  return alerts.filter((a) => a.createdAt < cutoffMs).sort((a, b) => a.createdAt - b.createdAt).map((a) => a.id);
62307
62385
  }
@@ -63120,7 +63198,7 @@ var require_console_logging = __commonJS({
63120
63198
  [Symbol.toStringTag]: { value: "Module" }
63121
63199
  });
63122
63200
  require_chunk_Cek0wNdY();
63123
- var require_dist10 = require_dist_CEIkHEdy();
63201
+ var require_dist10 = require_dist_DaSCLJVH();
63124
63202
  var require_formatter = require_formatter_DqAKDlvN();
63125
63203
  var LEVEL_RANK = {
63126
63204
  debug: 0,
@@ -63214,7 +63292,7 @@ var require_core_blocks_addon = __commonJS({
63214
63292
  "use strict";
63215
63293
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
63216
63294
  var require_chunk = require_chunk_Cek0wNdY();
63217
- var require_dist10 = require_dist_CEIkHEdy();
63295
+ var require_dist10 = require_dist_DaSCLJVH();
63218
63296
  var node_crypto = __require("crypto");
63219
63297
  var node_fs_promises = __require("fs/promises");
63220
63298
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -64111,11 +64189,11 @@ var require_core_blocks = __commonJS({
64111
64189
  }
64112
64190
  });
64113
64191
 
64114
- // ../system/dist/retired-settings-keys-FLZlwa2U.js
64115
- var require_retired_settings_keys_FLZlwa2U = __commonJS({
64116
- "../system/dist/retired-settings-keys-FLZlwa2U.js"(exports) {
64192
+ // ../system/dist/retired-settings-keys-CZISf623.js
64193
+ var require_retired_settings_keys_CZISf623 = __commonJS({
64194
+ "../system/dist/retired-settings-keys-CZISf623.js"(exports) {
64117
64195
  "use strict";
64118
- var require_dist10 = require_dist_CEIkHEdy();
64196
+ var require_dist10 = require_dist_DaSCLJVH();
64119
64197
  function settingsStoreIsAuthoritativeHere(env) {
64120
64198
  const raw = (env["CAMSTACK_ROLE"] ?? "").trim().toLowerCase();
64121
64199
  return raw === "" || raw === "hub";
@@ -66352,8 +66430,8 @@ var require_device_manager_addon = __commonJS({
66352
66430
  [Symbol.toStringTag]: { value: "Module" }
66353
66431
  });
66354
66432
  require_chunk_Cek0wNdY();
66355
- var require_dist10 = require_dist_CEIkHEdy();
66356
- var require_retired_settings_keys = require_retired_settings_keys_FLZlwa2U();
66433
+ var require_dist10 = require_dist_DaSCLJVH();
66434
+ var require_retired_settings_keys = require_retired_settings_keys_CZISf623();
66357
66435
  var node_crypto = __require("crypto");
66358
66436
  var _camstack_types_node = require_node();
66359
66437
  var JOB_HISTORY = 20;
@@ -71978,7 +72056,7 @@ var require_hub_forwarder = __commonJS({
71978
72056
  [Symbol.toStringTag]: { value: "Module" }
71979
72057
  });
71980
72058
  require_chunk_Cek0wNdY();
71981
- var require_dist10 = require_dist_CEIkHEdy();
72059
+ var require_dist10 = require_dist_DaSCLJVH();
71982
72060
  var require_formatter = require_formatter_DqAKDlvN();
71983
72061
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
71984
72062
  var HubForwarderDestination = class {
@@ -72115,7 +72193,7 @@ var require_liveness_monitor_addon = __commonJS({
72115
72193
  "use strict";
72116
72194
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
72117
72195
  require_chunk_Cek0wNdY();
72118
- var require_dist10 = require_dist_CEIkHEdy();
72196
+ var require_dist10 = require_dist_DaSCLJVH();
72119
72197
  var NO_DEVICES = "liveness:no-devices";
72120
72198
  var ALL_OFFLINE = "liveness:all-devices-offline";
72121
72199
  var NO_FOOTAGE_PREFIX = "liveness:no-footage:";
@@ -72311,7 +72389,7 @@ var require_local_auth_addon = __commonJS({
72311
72389
  [Symbol.toStringTag]: { value: "Module" }
72312
72390
  });
72313
72391
  var require_chunk = require_chunk_Cek0wNdY();
72314
- var require_dist10 = require_dist_CEIkHEdy();
72392
+ var require_dist10 = require_dist_DaSCLJVH();
72315
72393
  var node_crypto = __require("crypto");
72316
72394
  node_crypto = require_chunk.__toESM(node_crypto);
72317
72395
  var crypto$1 = __require("crypto");
@@ -80124,7 +80202,7 @@ var require_loki_logging = __commonJS({
80124
80202
  [Symbol.toStringTag]: { value: "Module" }
80125
80203
  });
80126
80204
  require_chunk_Cek0wNdY();
80127
- var require_dist10 = require_dist_CEIkHEdy();
80205
+ var require_dist10 = require_dist_DaSCLJVH();
80128
80206
  function sanitizeLabelName(raw) {
80129
80207
  const replaced = raw.replaceAll(/[^a-zA-Z0-9_]/g, "_");
80130
80208
  return /^[a-zA-Z_]/.test(replaced) ? replaced : `_${replaced}`;
@@ -80711,7 +80789,7 @@ var require_native_metrics_addon = __commonJS({
80711
80789
  [Symbol.toStringTag]: { value: "Module" }
80712
80790
  });
80713
80791
  var require_chunk = require_chunk_Cek0wNdY();
80714
- var require_dist10 = require_dist_CEIkHEdy();
80792
+ var require_dist10 = require_dist_DaSCLJVH();
80715
80793
  var node_fs_promises = __require("fs/promises");
80716
80794
  var node_fs = __require("fs");
80717
80795
  node_fs = require_chunk.__toESM(node_fs);
@@ -83464,7 +83542,7 @@ var require_filesystem_storage_addon = __commonJS({
83464
83542
  [Symbol.toStringTag]: { value: "Module" }
83465
83543
  });
83466
83544
  var require_chunk = require_chunk_Cek0wNdY();
83467
- var require_dist10 = require_dist_CEIkHEdy();
83545
+ var require_dist10 = require_dist_DaSCLJVH();
83468
83546
  var node_crypto = __require("crypto");
83469
83547
  var node_fs_promises = __require("fs/promises");
83470
83548
  var node_path = __require("path");
@@ -84691,8 +84769,8 @@ var require_sqlite_settings_addon = __commonJS({
84691
84769
  [Symbol.toStringTag]: { value: "Module" }
84692
84770
  });
84693
84771
  var require_chunk = require_chunk_Cek0wNdY();
84694
- var require_dist10 = require_dist_CEIkHEdy();
84695
- var require_retired_settings_keys = require_retired_settings_keys_FLZlwa2U();
84772
+ var require_dist10 = require_dist_DaSCLJVH();
84773
+ var require_retired_settings_keys = require_retired_settings_keys_CZISf623();
84696
84774
  var require_wal_checkpoint_policy = require_wal_checkpoint_policy_CCJZngds();
84697
84775
  var node_crypto = __require("crypto");
84698
84776
  var node_path = __require("path");
@@ -87479,7 +87557,7 @@ var require_storage_orchestrator_addon = __commonJS({
87479
87557
  [Symbol.toStringTag]: { value: "Module" }
87480
87558
  });
87481
87559
  var require_chunk = require_chunk_Cek0wNdY();
87482
- var require_dist10 = require_dist_CEIkHEdy();
87560
+ var require_dist10 = require_dist_DaSCLJVH();
87483
87561
  var require_hub_cap_forward = require_hub_cap_forward_DmHNjbB0();
87484
87562
  var zod = require_zod();
87485
87563
  var node_crypto = __require("crypto");
@@ -91206,7 +91284,7 @@ var require_system_config_addon = __commonJS({
91206
91284
  [Symbol.toStringTag]: { value: "Module" }
91207
91285
  });
91208
91286
  require_chunk_Cek0wNdY();
91209
- var require_dist10 = require_dist_CEIkHEdy();
91287
+ var require_dist10 = require_dist_DaSCLJVH();
91210
91288
  var SECTION_TITLES = {
91211
91289
  server: "Server",
91212
91290
  auth: "Authentication"
@@ -109267,7 +109345,7 @@ var require_winston_logging = __commonJS({
109267
109345
  [Symbol.toStringTag]: { value: "Module" }
109268
109346
  });
109269
109347
  var require_chunk = require_chunk_Cek0wNdY();
109270
- var require_dist10 = require_dist_CEIkHEdy();
109348
+ var require_dist10 = require_dist_DaSCLJVH();
109271
109349
  var require_formatter = require_formatter_DqAKDlvN();
109272
109350
  var node_path = __require("path");
109273
109351
  node_path = require_chunk.__toESM(node_path);
@@ -111305,9 +111383,9 @@ var require_event_category_BVfsrBYA = __commonJS({
111305
111383
  }
111306
111384
  });
111307
111385
 
111308
- // ../types/dist/sleep-D7dV-FZB.js
111309
- var require_sleep_D7dV_FZB = __commonJS({
111310
- "../types/dist/sleep-D7dV-FZB.js"(exports) {
111386
+ // ../types/dist/sleep-B8nfmQ8a.js
111387
+ var require_sleep_B8nfmQ8a = __commonJS({
111388
+ "../types/dist/sleep-B8nfmQ8a.js"(exports) {
111311
111389
  "use strict";
111312
111390
  var require_event_category = require_event_category_BVfsrBYA();
111313
111391
  var zod = require_zod();
@@ -114022,6 +114100,8 @@ var require_sleep_D7dV_FZB = __commonJS({
114022
114100
  getStatus: (input) => dispatch("motion-zones", "motionZones", "getStatus", "query", input)
114023
114101
  },
114024
114102
  nativeObjectDetection: {
114103
+ getOptions: (input) => dispatch("native-object-detection", "nativeObjectDetection", "getOptions", "query", input),
114104
+ setSettings: (input) => dispatch("native-object-detection", "nativeObjectDetection", "setSettings", "mutation", input),
114025
114105
  setEnabled: (input) => dispatch("native-object-detection", "nativeObjectDetection", "setEnabled", "mutation", input),
114026
114106
  getStatus: (input) => dispatch("native-object-detection", "nativeObjectDetection", "getStatus", "query", input)
114027
114107
  },
@@ -115144,7 +115224,7 @@ var require_addon = __commonJS({
115144
115224
  "../types/dist/addon.js"(exports) {
115145
115225
  "use strict";
115146
115226
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
115147
- var require_sleep = require_sleep_D7dV_FZB();
115227
+ var require_sleep = require_sleep_B8nfmQ8a();
115148
115228
  var require_event_category = require_event_category_BVfsrBYA();
115149
115229
  var require_err_msg = require_err_msg_COpsHMw2();
115150
115230
  var CAP_INPUT_DEFAULTS = Object.freeze({
@@ -115282,6 +115362,7 @@ var require_addon = __commonJS({
115282
115362
  "motionFps": 4,
115283
115363
  "detectionFps": 10,
115284
115364
  "motionSources": ["analyzer"],
115365
+ "detectionSources": ["pipeline"],
115285
115366
  "pipelineEnabled": true,
115286
115367
  "zones": [],
115287
115368
  "onboardMotionDrivesAnalyzer": true,
@@ -131554,11 +131635,11 @@ var require_manifest_system_deps_CrSP0Kkp = __commonJS({
131554
131635
  }
131555
131636
  });
131556
131637
 
131557
- // ../system/dist/custom-action-registry-YHpAdksL.js
131558
- var require_custom_action_registry_YHpAdksL = __commonJS({
131559
- "../system/dist/custom-action-registry-YHpAdksL.js"(exports) {
131638
+ // ../system/dist/custom-action-registry-DG-QIWxd.js
131639
+ var require_custom_action_registry_DG_QIWxd = __commonJS({
131640
+ "../system/dist/custom-action-registry-DG-QIWxd.js"(exports) {
131560
131641
  "use strict";
131561
- var require_dist10 = require_dist_CEIkHEdy();
131642
+ var require_dist10 = require_dist_DaSCLJVH();
131562
131643
  var CustomActionRegistry = class {
131563
131644
  byAddon = /* @__PURE__ */ new Map();
131564
131645
  registerAddon(addonId, catalog, handler) {
@@ -135372,7 +135453,7 @@ var require_dist3 = __commonJS({
135372
135453
  "use strict";
135373
135454
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
135374
135455
  var require_chunk = require_chunk_Cek0wNdY();
135375
- var require_dist10 = require_dist_CEIkHEdy();
135456
+ var require_dist10 = require_dist_DaSCLJVH();
135376
135457
  var require_builtins_alerts_alerts_addon = require_alerts_addon();
135377
135458
  require_alerts();
135378
135459
  var require_formatter = require_formatter_DqAKDlvN();
@@ -135401,7 +135482,7 @@ var require_dist3 = __commonJS({
135401
135482
  var require_tls$1 = require_tls_BFs4PzoW();
135402
135483
  var require_manifest_system_deps = require_manifest_system_deps_CrSP0Kkp();
135403
135484
  var require_resource_monitor = require_resource_monitor_LVE1BoLs();
135404
- var require_custom_action_registry = require_custom_action_registry_YHpAdksL();
135485
+ var require_custom_action_registry = require_custom_action_registry_DG_QIWxd();
135405
135486
  var zod = require_zod();
135406
135487
  var node_crypto = __require("crypto");
135407
135488
  var _camstack_types_node = require_node();
@@ -216510,7 +216591,7 @@ var require_dist4 = __commonJS({
216510
216591
  "../types/dist/index.js"(exports) {
216511
216592
  "use strict";
216512
216593
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
216513
- var require_sleep = require_sleep_D7dV_FZB();
216594
+ var require_sleep = require_sleep_B8nfmQ8a();
216514
216595
  var require_event_category = require_event_category_BVfsrBYA();
216515
216596
  var require_canonical_hash = require_canonical_hash_9lydiEzx();
216516
216597
  var require_enums2 = require_enums();
@@ -233420,6 +233501,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
233420
233501
  "device-activity"
233421
233502
  ]);
233422
233503
  var MotionSourcesSchema = zod.z.array(MotionSourceEnum);
233504
+ var DetectionSourcesSchema = zod.z.array(DetectionSourceSchema);
233423
233505
  var ReportMotionInputSchema = zod.z.object({
233424
233506
  deviceId: zod.z.number(),
233425
233507
  detected: zod.z.boolean(),
@@ -233527,6 +233609,35 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
233527
233609
  * events; the orchestrator forwards to `reportMotion`.
233528
233610
  */
233529
233611
  motionSources: MotionSourcesSchema.default(["analyzer"]),
233612
+ /**
233613
+ * WHICH root detector runs for this camera. The detection counterpart of
233614
+ * {@link motionSources}, same shape and same discipline: a per-camera list
233615
+ * of sources the system understands, vendor-agnostic, owned here.
233616
+ *
233617
+ * - `pipeline` — this runner's own root step on decoded pixels (`steps`).
233618
+ * - `onboard` — the CAMERA's own detector, admitted only when it is named
233619
+ * here. Its boxes reach post-analysis on the same
233620
+ * `PipelineInferenceResult` payload as the pipeline's, so an onboard-born
233621
+ * track gets the same tracker, the same overlay and the same detail
233622
+ * subtree (face / plate / embedding).
233623
+ *
233624
+ * `['onboard']` alone is the REPLACEMENT: this runner's root step does not
233625
+ * run, and that is where a camera with a usable onboard detector buys back
233626
+ * its share of the accelerator. It saves the root inference, not the decode
233627
+ * — the detail subtree still needs pixels to cut crops from.
233628
+ *
233629
+ * A camera whose onboard detections carry no geometry cannot serve as a root
233630
+ * step at all (there is nothing to track), and the cap that knows this says
233631
+ * so on `native-object-detection.getOptions().geometry`. On Reolink that is
233632
+ * every battery camera: the boxes ride a sub-stream a battery camera never
233633
+ * attaches, so such a camera stays on `['pipeline']` and its onboard AI is
233634
+ * worth exactly what it already is — a wake signal with a class.
233635
+ *
233636
+ * Defaults to `['pipeline']`, which is byte-for-byte today's behaviour: a
233637
+ * vendor never turns a detector on for the operator, and neither does a
233638
+ * default.
233639
+ */
233640
+ detectionSources: DetectionSourcesSchema.default(["pipeline"]),
233530
233641
  pipelineEnabled: zod.z.boolean().default(true),
233531
233642
  /** Ordered tree of video steps. Absent → runner skips video detection. */
233532
233643
  steps: zod.z.array(PipelineStepInputSchema).readonly().optional(),
@@ -233649,6 +233760,19 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
233649
233760
  }
233650
233761
  ]
233651
233762
  },
233763
+ {
233764
+ key: "detectionSources",
233765
+ type: "multiselect",
233766
+ label: "Detection Sources",
233767
+ default: ["pipeline"],
233768
+ options: [{
233769
+ value: "pipeline",
233770
+ label: "This node (ML root step on decoded frames)"
233771
+ }, {
233772
+ value: "onboard",
233773
+ label: "Camera onboard AI (replaces the root step when picked alone)"
233774
+ }]
233775
+ },
233652
233776
  {
233653
233777
  key: "motionFps",
233654
233778
  type: "slider",
@@ -241028,11 +241152,27 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
241028
241152
  supportedClasses: zod.z.array(NativeObjectClassEnum).readonly(),
241029
241153
  /**
241030
241154
  * Whether forwarding of onboard AI detections is enabled for this device.
241031
- * Default FALSE (opt-in, cold-start) — onboard AI pushes are noisy/sparse and
241032
- * churn the tracker, so forwarding stays off until the operator enables it.
241155
+ *
241156
+ * Cold-start OFF on every camera. A vendor does not decide which detector a
241157
+ * camera runs — that is the operator's choice, and it is made where every
241158
+ * other detection choice is made. `geometry` on
241159
+ * {@link NativeObjectDetectionOptionsSchema} is how the form says what the
241160
+ * choice would buy this particular camera.
241033
241161
  */
241034
241162
  enabled: zod.z.boolean()
241035
241163
  });
241164
+ var NativeObjectGeometryEnum = zod.z.enum([
241165
+ "boxed",
241166
+ "while-streaming",
241167
+ "flag-only"
241168
+ ]);
241169
+ var NativeObjectDetectionOptionsSchema = zod.z.object({
241170
+ /** Classes this firmware can detect — the same list the status reports. */
241171
+ supportedClasses: zod.z.array(NativeObjectClassEnum).readonly(),
241172
+ /** What a detection from this camera carries. */
241173
+ geometry: NativeObjectGeometryEnum
241174
+ });
241175
+ var NativeObjectDetectionSettingsPatchSchema = zod.z.object({ enabled: zod.z.boolean().optional() });
241036
241176
  var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
241037
241177
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
241038
241178
  lastFetchedAt: zod.z.number()
@@ -241043,13 +241183,23 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
241043
241183
  deviceNative: true,
241044
241184
  mode: "singleton",
241045
241185
  deviceTypes: [require_sleep.DeviceType.Camera],
241046
- methods: { setEnabled: require_sleep.method(zod.z.object({
241047
- deviceId: zod.z.number(),
241048
- enabled: zod.z.boolean()
241049
- }), zod.z.void(), {
241050
- kind: "mutation",
241051
- auth: "admin"
241052
- }) },
241186
+ methods: {
241187
+ getOptions: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), NativeObjectDetectionOptionsSchema),
241188
+ setSettings: require_sleep.method(zod.z.object({
241189
+ deviceId: zod.z.number(),
241190
+ settings: NativeObjectDetectionSettingsPatchSchema
241191
+ }), zod.z.void(), {
241192
+ kind: "mutation",
241193
+ auth: "admin"
241194
+ }),
241195
+ setEnabled: require_sleep.method(zod.z.object({
241196
+ deviceId: zod.z.number(),
241197
+ enabled: zod.z.boolean()
241198
+ }), zod.z.void(), {
241199
+ kind: "mutation",
241200
+ auth: "admin"
241201
+ })
241202
+ },
241053
241203
  events: { onDetected: { data: zod.z.object({
241054
241204
  deviceId: zod.z.number(),
241055
241205
  detection: NativeDetectionSchema
@@ -252817,12 +252967,24 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
252817
252967
  addonId: null,
252818
252968
  access: "create"
252819
252969
  },
252970
+ "nativeObjectDetection.getOptions": {
252971
+ capName: "native-object-detection",
252972
+ capScope: "device",
252973
+ addonId: null,
252974
+ access: "view"
252975
+ },
252820
252976
  "nativeObjectDetection.setEnabled": {
252821
252977
  capName: "native-object-detection",
252822
252978
  capScope: "device",
252823
252979
  addonId: null,
252824
252980
  access: "create"
252825
252981
  },
252982
+ "nativeObjectDetection.setSettings": {
252983
+ capName: "native-object-detection",
252984
+ capScope: "device",
252985
+ addonId: null,
252986
+ access: "create"
252987
+ },
252826
252988
  "navigation.getFeatures": {
252827
252989
  capName: "navigation",
252828
252990
  capScope: "device",
@@ -257315,11 +257477,21 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
257315
257477
  form: "single",
257316
257478
  optional: false
257317
257479
  }],
257480
+ "nativeObjectDetection.getOptions": [{
257481
+ name: "deviceId",
257482
+ form: "single",
257483
+ optional: false
257484
+ }],
257318
257485
  "nativeObjectDetection.setEnabled": [{
257319
257486
  name: "deviceId",
257320
257487
  form: "single",
257321
257488
  optional: false
257322
257489
  }],
257490
+ "nativeObjectDetection.setSettings": [{
257491
+ name: "deviceId",
257492
+ form: "single",
257493
+ optional: false
257494
+ }],
257323
257495
  "navigation.getFeatures": [{
257324
257496
  name: "deviceId",
257325
257497
  form: "single",
@@ -262582,6 +262754,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
262582
262754
  exports.DetailCropConventionSchema = DetailCropConventionSchema;
262583
262755
  exports.DetectionCatalogClassMapSchema = DetectionCatalogClassMapSchema;
262584
262756
  exports.DetectionSourceSchema = DetectionSourceSchema;
262757
+ exports.DetectionSourcesSchema = DetectionSourcesSchema;
262585
262758
  exports.DeviceCodeSeveritySchema = DeviceCodeSeveritySchema;
262586
262759
  exports.DeviceConfig = DeviceConfig;
262587
262760
  exports.DeviceDiscoveryStatusSchema = DeviceDiscoveryStatusSchema;
@@ -262925,8 +263098,11 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
262925
263098
  exports.NativeLeaseAdmissionSchema = NativeLeaseAdmissionSchema;
262926
263099
  exports.NativeLeaseSettingsSchema = NativeLeaseSettingsSchema;
262927
263100
  exports.NativeObjectClassEnum = NativeObjectClassEnum;
263101
+ exports.NativeObjectDetectionOptionsSchema = NativeObjectDetectionOptionsSchema;
262928
263102
  exports.NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionRuntimeStateSchema;
263103
+ exports.NativeObjectDetectionSettingsPatchSchema = NativeObjectDetectionSettingsPatchSchema;
262929
263104
  exports.NativeObjectDetectionStatusSchema = NativeObjectDetectionStatusSchema;
263105
+ exports.NativeObjectGeometryEnum = NativeObjectGeometryEnum;
262930
263106
  exports.NavigationActionEntrySchema = NavigationActionEntrySchema;
262931
263107
  exports.NavigationActionIdSchema = NavigationActionIdSchema;
262932
263108
  exports.NavigationEntryKindSchema = NavigationEntryKindSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstack",
3
- "version": "1.2.149",
3
+ "version": "1.2.151",
4
4
  "description": "CLI tool for managing and running CamStack server",
5
5
  "keywords": [
6
6
  "camstack",