camstack 1.2.149 → 1.2.150

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",
@@ -36569,11 +36569,25 @@ var NativeObjectDetectionStatusSchema = external_exports.object({
36569
36569
  supportedClasses: external_exports.array(NativeObjectClassEnum).readonly(),
36570
36570
  /**
36571
36571
  * 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.
36572
+ *
36573
+ * The COLD-START default is the provider's, and it is not one value for
36574
+ * every camera: a mains camera carries the boxed side-channel and its
36575
+ * detections are usable subjects, so it defaults ON; a battery camera never
36576
+ * attaches that channel, so the same toggle would buy it nothing but a write
36577
+ * — it defaults OFF and an operator who wants it turns it on knowing what it
36578
+ * costs. {@link NativeObjectDetectionOptionsSchema.geometry} is how the UI
36579
+ * says which of the two a camera is.
36574
36580
  */
36575
36581
  enabled: external_exports.boolean()
36576
36582
  });
36583
+ var NativeObjectGeometryEnum = external_exports.enum(["boxed", "flag-only"]);
36584
+ var NativeObjectDetectionOptionsSchema = external_exports.object({
36585
+ /** Classes this firmware can detect — the same list the status reports. */
36586
+ supportedClasses: external_exports.array(NativeObjectClassEnum).readonly(),
36587
+ /** What a detection from this camera carries. */
36588
+ geometry: NativeObjectGeometryEnum
36589
+ });
36590
+ var NativeObjectDetectionSettingsPatchSchema = external_exports.object({ enabled: external_exports.boolean().optional() });
36577
36591
  var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
36578
36592
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
36579
36593
  lastFetchedAt: external_exports.number()
@@ -36584,13 +36598,28 @@ var nativeObjectDetectionCapability = {
36584
36598
  deviceNative: true,
36585
36599
  mode: "singleton",
36586
36600
  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
- }) },
36601
+ deviceConfig: { ui: {
36602
+ kind: "derived-form",
36603
+ builderId: "native-object-detection",
36604
+ tab: "motion"
36605
+ } },
36606
+ methods: {
36607
+ getOptions: method(external_exports.object({ deviceId: external_exports.number() }), NativeObjectDetectionOptionsSchema),
36608
+ setSettings: method(external_exports.object({
36609
+ deviceId: external_exports.number(),
36610
+ settings: NativeObjectDetectionSettingsPatchSchema
36611
+ }), external_exports.void(), {
36612
+ kind: "mutation",
36613
+ auth: "admin"
36614
+ }),
36615
+ setEnabled: method(external_exports.object({
36616
+ deviceId: external_exports.number(),
36617
+ enabled: external_exports.boolean()
36618
+ }), external_exports.void(), {
36619
+ kind: "mutation",
36620
+ auth: "admin"
36621
+ })
36622
+ },
36594
36623
  events: { onDetected: { data: external_exports.object({
36595
36624
  deviceId: external_exports.number(),
36596
36625
  detection: NativeDetectionSchema
@@ -44011,12 +44040,24 @@ var METHOD_ACCESS_MAP = Object.freeze({
44011
44040
  addonId: null,
44012
44041
  access: "create"
44013
44042
  },
44043
+ "nativeObjectDetection.getOptions": {
44044
+ capName: "native-object-detection",
44045
+ capScope: "device",
44046
+ addonId: null,
44047
+ access: "view"
44048
+ },
44014
44049
  "nativeObjectDetection.setEnabled": {
44015
44050
  capName: "native-object-detection",
44016
44051
  capScope: "device",
44017
44052
  addonId: null,
44018
44053
  access: "create"
44019
44054
  },
44055
+ "nativeObjectDetection.setSettings": {
44056
+ capName: "native-object-detection",
44057
+ capScope: "device",
44058
+ addonId: null,
44059
+ access: "create"
44060
+ },
44020
44061
  "navigation.getFeatures": {
44021
44062
  capName: "navigation",
44022
44063
  capScope: "device",
@@ -48243,11 +48284,21 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
48243
48284
  form: "single",
48244
48285
  optional: false
48245
48286
  }],
48287
+ "nativeObjectDetection.getOptions": [{
48288
+ name: "deviceId",
48289
+ form: "single",
48290
+ optional: false
48291
+ }],
48246
48292
  "nativeObjectDetection.setEnabled": [{
48247
48293
  name: "deviceId",
48248
48294
  form: "single",
48249
48295
  optional: false
48250
48296
  }],
48297
+ "nativeObjectDetection.setSettings": [{
48298
+ name: "deviceId",
48299
+ form: "single",
48300
+ optional: false
48301
+ }],
48251
48302
  "navigation.getFeatures": [{
48252
48303
  name: "deviceId",
48253
48304
  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-KU5WDW2X.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-WSNFPR5V.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-WSNFPR5V.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-4NUJXKXL.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-KU5WDW2X.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-D3lJV9M7.js
23637
+ var require_dist_D3lJV9M7 = __commonJS({
23638
+ "../system/dist/dist-D3lJV9M7.js"(exports) {
23639
23639
  "use strict";
23640
23640
  var zod = require_zod();
23641
23641
  var EventCategory = /* @__PURE__ */ (function(EventCategory2) {
@@ -47155,11 +47155,25 @@ var require_dist_CEIkHEdy = __commonJS({
47155
47155
  supportedClasses: zod.z.array(NativeObjectClassEnum).readonly(),
47156
47156
  /**
47157
47157
  * 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.
47158
+ *
47159
+ * The COLD-START default is the provider's, and it is not one value for
47160
+ * every camera: a mains camera carries the boxed side-channel and its
47161
+ * detections are usable subjects, so it defaults ON; a battery camera never
47162
+ * attaches that channel, so the same toggle would buy it nothing but a write
47163
+ * — it defaults OFF and an operator who wants it turns it on knowing what it
47164
+ * costs. {@link NativeObjectDetectionOptionsSchema.geometry} is how the UI
47165
+ * says which of the two a camera is.
47160
47166
  */
47161
47167
  enabled: zod.z.boolean()
47162
47168
  });
47169
+ var NativeObjectGeometryEnum = zod.z.enum(["boxed", "flag-only"]);
47170
+ var NativeObjectDetectionOptionsSchema = zod.z.object({
47171
+ /** Classes this firmware can detect — the same list the status reports. */
47172
+ supportedClasses: zod.z.array(NativeObjectClassEnum).readonly(),
47173
+ /** What a detection from this camera carries. */
47174
+ geometry: NativeObjectGeometryEnum
47175
+ });
47176
+ var NativeObjectDetectionSettingsPatchSchema = zod.z.object({ enabled: zod.z.boolean().optional() });
47163
47177
  var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
47164
47178
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
47165
47179
  lastFetchedAt: zod.z.number()
@@ -47170,13 +47184,28 @@ var require_dist_CEIkHEdy = __commonJS({
47170
47184
  deviceNative: true,
47171
47185
  mode: "singleton",
47172
47186
  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
- }) },
47187
+ deviceConfig: { ui: {
47188
+ kind: "derived-form",
47189
+ builderId: "native-object-detection",
47190
+ tab: "motion"
47191
+ } },
47192
+ methods: {
47193
+ getOptions: method(zod.z.object({ deviceId: zod.z.number() }), NativeObjectDetectionOptionsSchema),
47194
+ setSettings: method(zod.z.object({
47195
+ deviceId: zod.z.number(),
47196
+ settings: NativeObjectDetectionSettingsPatchSchema
47197
+ }), zod.z.void(), {
47198
+ kind: "mutation",
47199
+ auth: "admin"
47200
+ }),
47201
+ setEnabled: method(zod.z.object({
47202
+ deviceId: zod.z.number(),
47203
+ enabled: zod.z.boolean()
47204
+ }), zod.z.void(), {
47205
+ kind: "mutation",
47206
+ auth: "admin"
47207
+ })
47208
+ },
47180
47209
  events: { onDetected: { data: zod.z.object({
47181
47210
  deviceId: zod.z.number(),
47182
47211
  detection: NativeDetectionSchema
@@ -55425,12 +55454,24 @@ var require_dist_CEIkHEdy = __commonJS({
55425
55454
  addonId: null,
55426
55455
  access: "create"
55427
55456
  },
55457
+ "nativeObjectDetection.getOptions": {
55458
+ capName: "native-object-detection",
55459
+ capScope: "device",
55460
+ addonId: null,
55461
+ access: "view"
55462
+ },
55428
55463
  "nativeObjectDetection.setEnabled": {
55429
55464
  capName: "native-object-detection",
55430
55465
  capScope: "device",
55431
55466
  addonId: null,
55432
55467
  access: "create"
55433
55468
  },
55469
+ "nativeObjectDetection.setSettings": {
55470
+ capName: "native-object-detection",
55471
+ capScope: "device",
55472
+ addonId: null,
55473
+ access: "create"
55474
+ },
55434
55475
  "navigation.getFeatures": {
55435
55476
  capName: "navigation",
55436
55477
  capScope: "device",
@@ -59657,11 +59698,21 @@ var require_dist_CEIkHEdy = __commonJS({
59657
59698
  form: "single",
59658
59699
  optional: false
59659
59700
  }],
59701
+ "nativeObjectDetection.getOptions": [{
59702
+ name: "deviceId",
59703
+ form: "single",
59704
+ optional: false
59705
+ }],
59660
59706
  "nativeObjectDetection.setEnabled": [{
59661
59707
  name: "deviceId",
59662
59708
  form: "single",
59663
59709
  optional: false
59664
59710
  }],
59711
+ "nativeObjectDetection.setSettings": [{
59712
+ name: "deviceId",
59713
+ form: "single",
59714
+ optional: false
59715
+ }],
59665
59716
  "navigation.getFeatures": [{
59666
59717
  name: "deviceId",
59667
59718
  form: "single",
@@ -62301,7 +62352,7 @@ var require_alerts_addon = __commonJS({
62301
62352
  [Symbol.toStringTag]: { value: "Module" }
62302
62353
  });
62303
62354
  require_chunk_Cek0wNdY();
62304
- var require_dist10 = require_dist_CEIkHEdy();
62355
+ var require_dist10 = require_dist_D3lJV9M7();
62305
62356
  function selectExpired(alerts, cutoffMs) {
62306
62357
  return alerts.filter((a) => a.createdAt < cutoffMs).sort((a, b) => a.createdAt - b.createdAt).map((a) => a.id);
62307
62358
  }
@@ -63120,7 +63171,7 @@ var require_console_logging = __commonJS({
63120
63171
  [Symbol.toStringTag]: { value: "Module" }
63121
63172
  });
63122
63173
  require_chunk_Cek0wNdY();
63123
- var require_dist10 = require_dist_CEIkHEdy();
63174
+ var require_dist10 = require_dist_D3lJV9M7();
63124
63175
  var require_formatter = require_formatter_DqAKDlvN();
63125
63176
  var LEVEL_RANK = {
63126
63177
  debug: 0,
@@ -63214,7 +63265,7 @@ var require_core_blocks_addon = __commonJS({
63214
63265
  "use strict";
63215
63266
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
63216
63267
  var require_chunk = require_chunk_Cek0wNdY();
63217
- var require_dist10 = require_dist_CEIkHEdy();
63268
+ var require_dist10 = require_dist_D3lJV9M7();
63218
63269
  var node_crypto = __require("crypto");
63219
63270
  var node_fs_promises = __require("fs/promises");
63220
63271
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -64111,11 +64162,11 @@ var require_core_blocks = __commonJS({
64111
64162
  }
64112
64163
  });
64113
64164
 
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) {
64165
+ // ../system/dist/retired-settings-keys-YPsd2Exa.js
64166
+ var require_retired_settings_keys_YPsd2Exa = __commonJS({
64167
+ "../system/dist/retired-settings-keys-YPsd2Exa.js"(exports) {
64117
64168
  "use strict";
64118
- var require_dist10 = require_dist_CEIkHEdy();
64169
+ var require_dist10 = require_dist_D3lJV9M7();
64119
64170
  function settingsStoreIsAuthoritativeHere(env) {
64120
64171
  const raw = (env["CAMSTACK_ROLE"] ?? "").trim().toLowerCase();
64121
64172
  return raw === "" || raw === "hub";
@@ -66352,8 +66403,8 @@ var require_device_manager_addon = __commonJS({
66352
66403
  [Symbol.toStringTag]: { value: "Module" }
66353
66404
  });
66354
66405
  require_chunk_Cek0wNdY();
66355
- var require_dist10 = require_dist_CEIkHEdy();
66356
- var require_retired_settings_keys = require_retired_settings_keys_FLZlwa2U();
66406
+ var require_dist10 = require_dist_D3lJV9M7();
66407
+ var require_retired_settings_keys = require_retired_settings_keys_YPsd2Exa();
66357
66408
  var node_crypto = __require("crypto");
66358
66409
  var _camstack_types_node = require_node();
66359
66410
  var JOB_HISTORY = 20;
@@ -67245,9 +67296,39 @@ var require_device_manager_addon = __commonJS({
67245
67296
  if ("imageSettings_backlightMode" in patch && isBacklightMode(patch.imageSettings_backlightMode)) out.backlightMode = patch.imageSettings_backlightMode;
67246
67297
  return out;
67247
67298
  }
67299
+ var GEOMETRY_HELP = {
67300
+ boxed: "This camera ships a bounding box with each detection, so the pipeline tracks it as a subject: it gets a track, a best shot and the notification rules that address onboard detections.",
67301
+ "flag-only": "This camera ships the class with no bounding box \u2014 on Reolink that is every battery camera, because the boxes ride a sub-stream a battery camera never attaches. Turning this on makes the detections reach the tracker as motion and no further; it will not produce tracked subjects."
67302
+ };
67303
+ function buildNativeObjectDetectionConfigSchema(options, status) {
67304
+ if (options.supportedClasses.length === 0) return null;
67305
+ const fields = [{
67306
+ type: "boolean",
67307
+ key: "nativeObjectDetection_enabled",
67308
+ label: "Forward onboard AI detections",
67309
+ default: status?.enabled ?? false
67310
+ }];
67311
+ return { sections: [{
67312
+ id: "native-object-detection",
67313
+ tab: "motion",
67314
+ title: "Onboard AI detections",
67315
+ description: `${GEOMETRY_HELP[options.geometry]} Detected by this firmware: ${options.supportedClasses.join(", ")}.`,
67316
+ columns: 1,
67317
+ fields
67318
+ }] };
67319
+ }
67320
+ function parseNativeObjectDetectionFormPatch(patch) {
67321
+ const out = {};
67322
+ if ("nativeObjectDetection_enabled" in patch) {
67323
+ const value = patch.nativeObjectDetection_enabled;
67324
+ if (typeof value === "boolean") out.enabled = value;
67325
+ }
67326
+ return out;
67327
+ }
67248
67328
  var STREAM_PARAMS_BUILDER_ID = "stream-params";
67249
67329
  var DAY_NIGHT_BUILDER_ID = "day-night";
67250
67330
  var IMAGE_SETTINGS_BUILDER_ID = "image-settings";
67331
+ var NATIVE_OBJECT_DETECTION_BUILDER_ID = "native-object-detection";
67251
67332
  var STREAM_PARAMS_REDUCER = {
67252
67333
  kind: "profile",
67253
67334
  buildSchema: (options, status) => require_dist10.buildStreamParamsConfigSchema(options, status ?? null),
@@ -67268,10 +67349,16 @@ var require_device_manager_addon = __commonJS({
67268
67349
  buildSchema: (options, status) => buildImageSettingsConfigSchema(options, status ?? null),
67269
67350
  parsePatch: (patch) => parseImageSettingsFormPatch(patch)
67270
67351
  };
67352
+ var NATIVE_OBJECT_DETECTION_REDUCER = {
67353
+ kind: "settings",
67354
+ buildSchema: (options, status) => buildNativeObjectDetectionConfigSchema(options, status ?? null),
67355
+ parsePatch: (patch) => parseNativeObjectDetectionFormPatch(patch)
67356
+ };
67271
67357
  var BUILDER_REDUCERS = {
67272
67358
  [STREAM_PARAMS_BUILDER_ID]: STREAM_PARAMS_REDUCER,
67273
67359
  [DAY_NIGHT_BUILDER_ID]: DAY_NIGHT_REDUCER,
67274
- [IMAGE_SETTINGS_BUILDER_ID]: IMAGE_SETTINGS_REDUCER
67360
+ [IMAGE_SETTINGS_BUILDER_ID]: IMAGE_SETTINGS_REDUCER,
67361
+ [NATIVE_OBJECT_DETECTION_BUILDER_ID]: NATIVE_OBJECT_DETECTION_REDUCER
67275
67362
  };
67276
67363
  function resolveReducer(builderId) {
67277
67364
  const reducer = BUILDER_REDUCERS[builderId];
@@ -71978,7 +72065,7 @@ var require_hub_forwarder = __commonJS({
71978
72065
  [Symbol.toStringTag]: { value: "Module" }
71979
72066
  });
71980
72067
  require_chunk_Cek0wNdY();
71981
- var require_dist10 = require_dist_CEIkHEdy();
72068
+ var require_dist10 = require_dist_D3lJV9M7();
71982
72069
  var require_formatter = require_formatter_DqAKDlvN();
71983
72070
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
71984
72071
  var HubForwarderDestination = class {
@@ -72115,7 +72202,7 @@ var require_liveness_monitor_addon = __commonJS({
72115
72202
  "use strict";
72116
72203
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
72117
72204
  require_chunk_Cek0wNdY();
72118
- var require_dist10 = require_dist_CEIkHEdy();
72205
+ var require_dist10 = require_dist_D3lJV9M7();
72119
72206
  var NO_DEVICES = "liveness:no-devices";
72120
72207
  var ALL_OFFLINE = "liveness:all-devices-offline";
72121
72208
  var NO_FOOTAGE_PREFIX = "liveness:no-footage:";
@@ -72311,7 +72398,7 @@ var require_local_auth_addon = __commonJS({
72311
72398
  [Symbol.toStringTag]: { value: "Module" }
72312
72399
  });
72313
72400
  var require_chunk = require_chunk_Cek0wNdY();
72314
- var require_dist10 = require_dist_CEIkHEdy();
72401
+ var require_dist10 = require_dist_D3lJV9M7();
72315
72402
  var node_crypto = __require("crypto");
72316
72403
  node_crypto = require_chunk.__toESM(node_crypto);
72317
72404
  var crypto$1 = __require("crypto");
@@ -80124,7 +80211,7 @@ var require_loki_logging = __commonJS({
80124
80211
  [Symbol.toStringTag]: { value: "Module" }
80125
80212
  });
80126
80213
  require_chunk_Cek0wNdY();
80127
- var require_dist10 = require_dist_CEIkHEdy();
80214
+ var require_dist10 = require_dist_D3lJV9M7();
80128
80215
  function sanitizeLabelName(raw) {
80129
80216
  const replaced = raw.replaceAll(/[^a-zA-Z0-9_]/g, "_");
80130
80217
  return /^[a-zA-Z_]/.test(replaced) ? replaced : `_${replaced}`;
@@ -80711,7 +80798,7 @@ var require_native_metrics_addon = __commonJS({
80711
80798
  [Symbol.toStringTag]: { value: "Module" }
80712
80799
  });
80713
80800
  var require_chunk = require_chunk_Cek0wNdY();
80714
- var require_dist10 = require_dist_CEIkHEdy();
80801
+ var require_dist10 = require_dist_D3lJV9M7();
80715
80802
  var node_fs_promises = __require("fs/promises");
80716
80803
  var node_fs = __require("fs");
80717
80804
  node_fs = require_chunk.__toESM(node_fs);
@@ -83464,7 +83551,7 @@ var require_filesystem_storage_addon = __commonJS({
83464
83551
  [Symbol.toStringTag]: { value: "Module" }
83465
83552
  });
83466
83553
  var require_chunk = require_chunk_Cek0wNdY();
83467
- var require_dist10 = require_dist_CEIkHEdy();
83554
+ var require_dist10 = require_dist_D3lJV9M7();
83468
83555
  var node_crypto = __require("crypto");
83469
83556
  var node_fs_promises = __require("fs/promises");
83470
83557
  var node_path = __require("path");
@@ -84691,8 +84778,8 @@ var require_sqlite_settings_addon = __commonJS({
84691
84778
  [Symbol.toStringTag]: { value: "Module" }
84692
84779
  });
84693
84780
  var require_chunk = require_chunk_Cek0wNdY();
84694
- var require_dist10 = require_dist_CEIkHEdy();
84695
- var require_retired_settings_keys = require_retired_settings_keys_FLZlwa2U();
84781
+ var require_dist10 = require_dist_D3lJV9M7();
84782
+ var require_retired_settings_keys = require_retired_settings_keys_YPsd2Exa();
84696
84783
  var require_wal_checkpoint_policy = require_wal_checkpoint_policy_CCJZngds();
84697
84784
  var node_crypto = __require("crypto");
84698
84785
  var node_path = __require("path");
@@ -87479,7 +87566,7 @@ var require_storage_orchestrator_addon = __commonJS({
87479
87566
  [Symbol.toStringTag]: { value: "Module" }
87480
87567
  });
87481
87568
  var require_chunk = require_chunk_Cek0wNdY();
87482
- var require_dist10 = require_dist_CEIkHEdy();
87569
+ var require_dist10 = require_dist_D3lJV9M7();
87483
87570
  var require_hub_cap_forward = require_hub_cap_forward_DmHNjbB0();
87484
87571
  var zod = require_zod();
87485
87572
  var node_crypto = __require("crypto");
@@ -91206,7 +91293,7 @@ var require_system_config_addon = __commonJS({
91206
91293
  [Symbol.toStringTag]: { value: "Module" }
91207
91294
  });
91208
91295
  require_chunk_Cek0wNdY();
91209
- var require_dist10 = require_dist_CEIkHEdy();
91296
+ var require_dist10 = require_dist_D3lJV9M7();
91210
91297
  var SECTION_TITLES = {
91211
91298
  server: "Server",
91212
91299
  auth: "Authentication"
@@ -109267,7 +109354,7 @@ var require_winston_logging = __commonJS({
109267
109354
  [Symbol.toStringTag]: { value: "Module" }
109268
109355
  });
109269
109356
  var require_chunk = require_chunk_Cek0wNdY();
109270
- var require_dist10 = require_dist_CEIkHEdy();
109357
+ var require_dist10 = require_dist_D3lJV9M7();
109271
109358
  var require_formatter = require_formatter_DqAKDlvN();
109272
109359
  var node_path = __require("path");
109273
109360
  node_path = require_chunk.__toESM(node_path);
@@ -111305,9 +111392,9 @@ var require_event_category_BVfsrBYA = __commonJS({
111305
111392
  }
111306
111393
  });
111307
111394
 
111308
- // ../types/dist/sleep-D7dV-FZB.js
111309
- var require_sleep_D7dV_FZB = __commonJS({
111310
- "../types/dist/sleep-D7dV-FZB.js"(exports) {
111395
+ // ../types/dist/sleep-B8nfmQ8a.js
111396
+ var require_sleep_B8nfmQ8a = __commonJS({
111397
+ "../types/dist/sleep-B8nfmQ8a.js"(exports) {
111311
111398
  "use strict";
111312
111399
  var require_event_category = require_event_category_BVfsrBYA();
111313
111400
  var zod = require_zod();
@@ -114022,6 +114109,8 @@ var require_sleep_D7dV_FZB = __commonJS({
114022
114109
  getStatus: (input) => dispatch("motion-zones", "motionZones", "getStatus", "query", input)
114023
114110
  },
114024
114111
  nativeObjectDetection: {
114112
+ getOptions: (input) => dispatch("native-object-detection", "nativeObjectDetection", "getOptions", "query", input),
114113
+ setSettings: (input) => dispatch("native-object-detection", "nativeObjectDetection", "setSettings", "mutation", input),
114025
114114
  setEnabled: (input) => dispatch("native-object-detection", "nativeObjectDetection", "setEnabled", "mutation", input),
114026
114115
  getStatus: (input) => dispatch("native-object-detection", "nativeObjectDetection", "getStatus", "query", input)
114027
114116
  },
@@ -115144,7 +115233,7 @@ var require_addon = __commonJS({
115144
115233
  "../types/dist/addon.js"(exports) {
115145
115234
  "use strict";
115146
115235
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
115147
- var require_sleep = require_sleep_D7dV_FZB();
115236
+ var require_sleep = require_sleep_B8nfmQ8a();
115148
115237
  var require_event_category = require_event_category_BVfsrBYA();
115149
115238
  var require_err_msg = require_err_msg_COpsHMw2();
115150
115239
  var CAP_INPUT_DEFAULTS = Object.freeze({
@@ -131554,11 +131643,11 @@ var require_manifest_system_deps_CrSP0Kkp = __commonJS({
131554
131643
  }
131555
131644
  });
131556
131645
 
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) {
131646
+ // ../system/dist/custom-action-registry-CWFK5UDj.js
131647
+ var require_custom_action_registry_CWFK5UDj = __commonJS({
131648
+ "../system/dist/custom-action-registry-CWFK5UDj.js"(exports) {
131560
131649
  "use strict";
131561
- var require_dist10 = require_dist_CEIkHEdy();
131650
+ var require_dist10 = require_dist_D3lJV9M7();
131562
131651
  var CustomActionRegistry = class {
131563
131652
  byAddon = /* @__PURE__ */ new Map();
131564
131653
  registerAddon(addonId, catalog, handler) {
@@ -135372,7 +135461,7 @@ var require_dist3 = __commonJS({
135372
135461
  "use strict";
135373
135462
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
135374
135463
  var require_chunk = require_chunk_Cek0wNdY();
135375
- var require_dist10 = require_dist_CEIkHEdy();
135464
+ var require_dist10 = require_dist_D3lJV9M7();
135376
135465
  var require_builtins_alerts_alerts_addon = require_alerts_addon();
135377
135466
  require_alerts();
135378
135467
  var require_formatter = require_formatter_DqAKDlvN();
@@ -135401,7 +135490,7 @@ var require_dist3 = __commonJS({
135401
135490
  var require_tls$1 = require_tls_BFs4PzoW();
135402
135491
  var require_manifest_system_deps = require_manifest_system_deps_CrSP0Kkp();
135403
135492
  var require_resource_monitor = require_resource_monitor_LVE1BoLs();
135404
- var require_custom_action_registry = require_custom_action_registry_YHpAdksL();
135493
+ var require_custom_action_registry = require_custom_action_registry_CWFK5UDj();
135405
135494
  var zod = require_zod();
135406
135495
  var node_crypto = __require("crypto");
135407
135496
  var _camstack_types_node = require_node();
@@ -216510,7 +216599,7 @@ var require_dist4 = __commonJS({
216510
216599
  "../types/dist/index.js"(exports) {
216511
216600
  "use strict";
216512
216601
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
216513
- var require_sleep = require_sleep_D7dV_FZB();
216602
+ var require_sleep = require_sleep_B8nfmQ8a();
216514
216603
  var require_event_category = require_event_category_BVfsrBYA();
216515
216604
  var require_canonical_hash = require_canonical_hash_9lydiEzx();
216516
216605
  var require_enums2 = require_enums();
@@ -241028,11 +241117,25 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
241028
241117
  supportedClasses: zod.z.array(NativeObjectClassEnum).readonly(),
241029
241118
  /**
241030
241119
  * 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.
241120
+ *
241121
+ * The COLD-START default is the provider's, and it is not one value for
241122
+ * every camera: a mains camera carries the boxed side-channel and its
241123
+ * detections are usable subjects, so it defaults ON; a battery camera never
241124
+ * attaches that channel, so the same toggle would buy it nothing but a write
241125
+ * — it defaults OFF and an operator who wants it turns it on knowing what it
241126
+ * costs. {@link NativeObjectDetectionOptionsSchema.geometry} is how the UI
241127
+ * says which of the two a camera is.
241033
241128
  */
241034
241129
  enabled: zod.z.boolean()
241035
241130
  });
241131
+ var NativeObjectGeometryEnum = zod.z.enum(["boxed", "flag-only"]);
241132
+ var NativeObjectDetectionOptionsSchema = zod.z.object({
241133
+ /** Classes this firmware can detect — the same list the status reports. */
241134
+ supportedClasses: zod.z.array(NativeObjectClassEnum).readonly(),
241135
+ /** What a detection from this camera carries. */
241136
+ geometry: NativeObjectGeometryEnum
241137
+ });
241138
+ var NativeObjectDetectionSettingsPatchSchema = zod.z.object({ enabled: zod.z.boolean().optional() });
241036
241139
  var NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionStatusSchema.extend({
241037
241140
  /** Required by createRuntimeStateBridge — epoch ms of last refresh. */
241038
241141
  lastFetchedAt: zod.z.number()
@@ -241043,13 +241146,28 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
241043
241146
  deviceNative: true,
241044
241147
  mode: "singleton",
241045
241148
  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
- }) },
241149
+ deviceConfig: { ui: {
241150
+ kind: "derived-form",
241151
+ builderId: "native-object-detection",
241152
+ tab: "motion"
241153
+ } },
241154
+ methods: {
241155
+ getOptions: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), NativeObjectDetectionOptionsSchema),
241156
+ setSettings: require_sleep.method(zod.z.object({
241157
+ deviceId: zod.z.number(),
241158
+ settings: NativeObjectDetectionSettingsPatchSchema
241159
+ }), zod.z.void(), {
241160
+ kind: "mutation",
241161
+ auth: "admin"
241162
+ }),
241163
+ setEnabled: require_sleep.method(zod.z.object({
241164
+ deviceId: zod.z.number(),
241165
+ enabled: zod.z.boolean()
241166
+ }), zod.z.void(), {
241167
+ kind: "mutation",
241168
+ auth: "admin"
241169
+ })
241170
+ },
241053
241171
  events: { onDetected: { data: zod.z.object({
241054
241172
  deviceId: zod.z.number(),
241055
241173
  detection: NativeDetectionSchema
@@ -252817,12 +252935,24 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
252817
252935
  addonId: null,
252818
252936
  access: "create"
252819
252937
  },
252938
+ "nativeObjectDetection.getOptions": {
252939
+ capName: "native-object-detection",
252940
+ capScope: "device",
252941
+ addonId: null,
252942
+ access: "view"
252943
+ },
252820
252944
  "nativeObjectDetection.setEnabled": {
252821
252945
  capName: "native-object-detection",
252822
252946
  capScope: "device",
252823
252947
  addonId: null,
252824
252948
  access: "create"
252825
252949
  },
252950
+ "nativeObjectDetection.setSettings": {
252951
+ capName: "native-object-detection",
252952
+ capScope: "device",
252953
+ addonId: null,
252954
+ access: "create"
252955
+ },
252826
252956
  "navigation.getFeatures": {
252827
252957
  capName: "navigation",
252828
252958
  capScope: "device",
@@ -257315,11 +257445,21 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
257315
257445
  form: "single",
257316
257446
  optional: false
257317
257447
  }],
257448
+ "nativeObjectDetection.getOptions": [{
257449
+ name: "deviceId",
257450
+ form: "single",
257451
+ optional: false
257452
+ }],
257318
257453
  "nativeObjectDetection.setEnabled": [{
257319
257454
  name: "deviceId",
257320
257455
  form: "single",
257321
257456
  optional: false
257322
257457
  }],
257458
+ "nativeObjectDetection.setSettings": [{
257459
+ name: "deviceId",
257460
+ form: "single",
257461
+ optional: false
257462
+ }],
257323
257463
  "navigation.getFeatures": [{
257324
257464
  name: "deviceId",
257325
257465
  form: "single",
@@ -262925,8 +263065,11 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
262925
263065
  exports.NativeLeaseAdmissionSchema = NativeLeaseAdmissionSchema;
262926
263066
  exports.NativeLeaseSettingsSchema = NativeLeaseSettingsSchema;
262927
263067
  exports.NativeObjectClassEnum = NativeObjectClassEnum;
263068
+ exports.NativeObjectDetectionOptionsSchema = NativeObjectDetectionOptionsSchema;
262928
263069
  exports.NativeObjectDetectionRuntimeStateSchema = NativeObjectDetectionRuntimeStateSchema;
263070
+ exports.NativeObjectDetectionSettingsPatchSchema = NativeObjectDetectionSettingsPatchSchema;
262929
263071
  exports.NativeObjectDetectionStatusSchema = NativeObjectDetectionStatusSchema;
263072
+ exports.NativeObjectGeometryEnum = NativeObjectGeometryEnum;
262930
263073
  exports.NavigationActionEntrySchema = NavigationActionEntrySchema;
262931
263074
  exports.NavigationActionIdSchema = NavigationActionIdSchema;
262932
263075
  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.150",
4
4
  "description": "CLI tool for managing and running CamStack server",
5
5
  "keywords": [
6
6
  "camstack",