camstack 1.2.168 → 1.2.170

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-B1y0Fo1U.mjs
14525
+ // ../types/dist/sleep-Dk-BdnBf.mjs
14526
14526
  var AUDIO_CHUNK_FORMATS = [
14527
14527
  "f32le",
14528
14528
  "pcmu",
@@ -38767,6 +38767,10 @@ var PtzHomePresetSchema = external_exports.object({
38767
38767
  "none"
38768
38768
  ])
38769
38769
  });
38770
+ var PtzHomeReturnSchema = external_exports.object({
38771
+ enabled: external_exports.boolean(),
38772
+ seconds: external_exports.number().int()
38773
+ });
38770
38774
  var ptzCapability = {
38771
38775
  name: "ptz",
38772
38776
  scope: "device",
@@ -38826,6 +38830,54 @@ var ptzCapability = {
38826
38830
  auth: "admin"
38827
38831
  }),
38828
38832
  /**
38833
+ * Make WHERE THE HEAD IS POINTING RIGHT NOW this camera's home.
38834
+ *
38835
+ * `setHomePreset` takes a preset id, and a preset id is the wrong shape for
38836
+ * the most natural thing an operator does: aim the camera, then say "here".
38837
+ * It is also the only shape a camera whose home is NOT a preset can accept
38838
+ * -- Reolink's home is a guard point, a stored position with no id at all,
38839
+ * and hiding the control for that case (as the UI briefly did) left the one
38840
+ * vendor with a native home unable to set it.
38841
+ *
38842
+ * Each provider does it its own way:
38843
+ * reolink `setGrd` with `needSetPos`, pinning the guard point here
38844
+ * hikvision / amcrest save a preset, then pin it as home
38845
+ * onvif REFUSES -- its home is the PTZ origin and cannot be moved
38846
+ *
38847
+ * A provider that cannot honour it throws rather than silently doing
38848
+ * nothing: an operator who pressed "set home here" and saw no error would
38849
+ * believe it took.
38850
+ */
38851
+ captureHomeHere: method(external_exports.object({ deviceId: external_exports.number() }), external_exports.void(), {
38852
+ kind: "mutation",
38853
+ auth: "admin"
38854
+ }),
38855
+ /**
38856
+ * Whether the camera returns home on its own when left idle, and after how
38857
+ * long. `null` when it has no such behaviour at all.
38858
+ *
38859
+ * Reolink's guard point carries one (`timeout`, freely settable in
38860
+ * seconds). It is a real function of the camera that we did not expose at
38861
+ * all, and it belongs next to the home it governs rather than in a vendor
38862
+ * settings page nobody associates with Home.
38863
+ */
38864
+ getHomeReturn: method(external_exports.object({ deviceId: external_exports.number() }), PtzHomeReturnSchema.nullable()),
38865
+ /**
38866
+ * Set both together. Refused by a camera with no idle-return behaviour.
38867
+ *
38868
+ * They travel together for the same reason they are read together: the
38869
+ * underlying write carries both, so setting one alone means reading the
38870
+ * other back first and racing whoever else is writing.
38871
+ */
38872
+ setHomeReturn: method(external_exports.object({
38873
+ deviceId: external_exports.number(),
38874
+ enabled: external_exports.boolean(),
38875
+ seconds: external_exports.number().int().min(0).max(3600)
38876
+ }), external_exports.void(), {
38877
+ kind: "mutation",
38878
+ auth: "admin"
38879
+ }),
38880
+ /**
38829
38881
  * Pull the current PTZ position. Redundant with the auto-injected
38830
38882
  * `getStatus` method (see `status` below); kept for callers that
38831
38883
  * haven't migrated. Will be folded into `getStatus` in a future
@@ -46236,6 +46288,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
46236
46288
  addonId: null,
46237
46289
  access: "create"
46238
46290
  },
46291
+ "ptz.captureHomeHere": {
46292
+ capName: "ptz",
46293
+ capScope: "device",
46294
+ addonId: null,
46295
+ access: "create"
46296
+ },
46239
46297
  "ptz.continuousMove": {
46240
46298
  capName: "ptz",
46241
46299
  capScope: "device",
@@ -46254,6 +46312,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
46254
46312
  addonId: null,
46255
46313
  access: "view"
46256
46314
  },
46315
+ "ptz.getHomeReturn": {
46316
+ capName: "ptz",
46317
+ capScope: "device",
46318
+ addonId: null,
46319
+ access: "view"
46320
+ },
46257
46321
  "ptz.getOptions": {
46258
46322
  capName: "ptz",
46259
46323
  capScope: "device",
@@ -46308,6 +46372,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
46308
46372
  addonId: null,
46309
46373
  access: "create"
46310
46374
  },
46375
+ "ptz.setHomeReturn": {
46376
+ capName: "ptz",
46377
+ capScope: "device",
46378
+ addonId: null,
46379
+ access: "create"
46380
+ },
46311
46381
  "ptz.stop": {
46312
46382
  capName: "ptz",
46313
46383
  capScope: "device",
@@ -49471,6 +49541,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
49471
49541
  form: "single",
49472
49542
  optional: false
49473
49543
  }],
49544
+ "ptz.captureHomeHere": [{
49545
+ name: "deviceId",
49546
+ form: "single",
49547
+ optional: false
49548
+ }],
49474
49549
  "ptz.continuousMove": [{
49475
49550
  name: "deviceId",
49476
49551
  form: "single",
@@ -49486,6 +49561,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
49486
49561
  form: "single",
49487
49562
  optional: false
49488
49563
  }],
49564
+ "ptz.getHomeReturn": [{
49565
+ name: "deviceId",
49566
+ form: "single",
49567
+ optional: false
49568
+ }],
49489
49569
  "ptz.getOptions": [{
49490
49570
  name: "deviceId",
49491
49571
  form: "single",
@@ -49531,6 +49611,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
49531
49611
  form: "single",
49532
49612
  optional: false
49533
49613
  }],
49614
+ "ptz.setHomeReturn": [{
49615
+ name: "deviceId",
49616
+ form: "single",
49617
+ optional: false
49618
+ }],
49534
49619
  "ptz.stop": [{
49535
49620
  name: "deviceId",
49536
49621
  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-AWHVFK2L.js";
4
+ } from "./chunk-HGT3EBMM.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-PSI434KW.js");
41
+ await import("./launcher-4GC3GGPE.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-PSI434KW.js");
86
+ await import("./launcher-4GC3GGPE.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-BCCPZRN4.js");
1143
+ const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-GNXVHE5F.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-AWHVFK2L.js";
8
+ } from "./chunk-HGT3EBMM.js";
9
9
  import "./chunk-LMMQX4CK.js";
10
10
  export {
11
11
  DEFAULT_HUB_HTTPS_PORT,
@@ -23742,9 +23742,9 @@ var require_zod = __commonJS({
23742
23742
  }
23743
23743
  });
23744
23744
 
23745
- // ../system/dist/dist-BW7x4kAI.js
23746
- var require_dist_BW7x4kAI = __commonJS({
23747
- "../system/dist/dist-BW7x4kAI.js"(exports) {
23745
+ // ../system/dist/dist-Htt-fKD5.js
23746
+ var require_dist_Htt_fKD5 = __commonJS({
23747
+ "../system/dist/dist-Htt-fKD5.js"(exports) {
23748
23748
  "use strict";
23749
23749
  var zod = require_zod();
23750
23750
  var EventCategory = /* @__PURE__ */ (function(EventCategory2) {
@@ -49442,6 +49442,10 @@ var require_dist_BW7x4kAI = __commonJS({
49442
49442
  "none"
49443
49443
  ])
49444
49444
  });
49445
+ var PtzHomeReturnSchema = zod.z.object({
49446
+ enabled: zod.z.boolean(),
49447
+ seconds: zod.z.number().int()
49448
+ });
49445
49449
  var ptzCapability = {
49446
49450
  name: "ptz",
49447
49451
  scope: "device",
@@ -49501,6 +49505,54 @@ var require_dist_BW7x4kAI = __commonJS({
49501
49505
  auth: "admin"
49502
49506
  }),
49503
49507
  /**
49508
+ * Make WHERE THE HEAD IS POINTING RIGHT NOW this camera's home.
49509
+ *
49510
+ * `setHomePreset` takes a preset id, and a preset id is the wrong shape for
49511
+ * the most natural thing an operator does: aim the camera, then say "here".
49512
+ * It is also the only shape a camera whose home is NOT a preset can accept
49513
+ * -- Reolink's home is a guard point, a stored position with no id at all,
49514
+ * and hiding the control for that case (as the UI briefly did) left the one
49515
+ * vendor with a native home unable to set it.
49516
+ *
49517
+ * Each provider does it its own way:
49518
+ * reolink `setGrd` with `needSetPos`, pinning the guard point here
49519
+ * hikvision / amcrest save a preset, then pin it as home
49520
+ * onvif REFUSES -- its home is the PTZ origin and cannot be moved
49521
+ *
49522
+ * A provider that cannot honour it throws rather than silently doing
49523
+ * nothing: an operator who pressed "set home here" and saw no error would
49524
+ * believe it took.
49525
+ */
49526
+ captureHomeHere: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
49527
+ kind: "mutation",
49528
+ auth: "admin"
49529
+ }),
49530
+ /**
49531
+ * Whether the camera returns home on its own when left idle, and after how
49532
+ * long. `null` when it has no such behaviour at all.
49533
+ *
49534
+ * Reolink's guard point carries one (`timeout`, freely settable in
49535
+ * seconds). It is a real function of the camera that we did not expose at
49536
+ * all, and it belongs next to the home it governs rather than in a vendor
49537
+ * settings page nobody associates with Home.
49538
+ */
49539
+ getHomeReturn: method(zod.z.object({ deviceId: zod.z.number() }), PtzHomeReturnSchema.nullable()),
49540
+ /**
49541
+ * Set both together. Refused by a camera with no idle-return behaviour.
49542
+ *
49543
+ * They travel together for the same reason they are read together: the
49544
+ * underlying write carries both, so setting one alone means reading the
49545
+ * other back first and racing whoever else is writing.
49546
+ */
49547
+ setHomeReturn: method(zod.z.object({
49548
+ deviceId: zod.z.number(),
49549
+ enabled: zod.z.boolean(),
49550
+ seconds: zod.z.number().int().min(0).max(3600)
49551
+ }), zod.z.void(), {
49552
+ kind: "mutation",
49553
+ auth: "admin"
49554
+ }),
49555
+ /**
49504
49556
  * Pull the current PTZ position. Redundant with the auto-injected
49505
49557
  * `getStatus` method (see `status` below); kept for callers that
49506
49558
  * haven't migrated. Will be folded into `getStatus` in a future
@@ -57741,6 +57793,12 @@ var require_dist_BW7x4kAI = __commonJS({
57741
57793
  addonId: null,
57742
57794
  access: "create"
57743
57795
  },
57796
+ "ptz.captureHomeHere": {
57797
+ capName: "ptz",
57798
+ capScope: "device",
57799
+ addonId: null,
57800
+ access: "create"
57801
+ },
57744
57802
  "ptz.continuousMove": {
57745
57803
  capName: "ptz",
57746
57804
  capScope: "device",
@@ -57759,6 +57817,12 @@ var require_dist_BW7x4kAI = __commonJS({
57759
57817
  addonId: null,
57760
57818
  access: "view"
57761
57819
  },
57820
+ "ptz.getHomeReturn": {
57821
+ capName: "ptz",
57822
+ capScope: "device",
57823
+ addonId: null,
57824
+ access: "view"
57825
+ },
57762
57826
  "ptz.getOptions": {
57763
57827
  capName: "ptz",
57764
57828
  capScope: "device",
@@ -57813,6 +57877,12 @@ var require_dist_BW7x4kAI = __commonJS({
57813
57877
  addonId: null,
57814
57878
  access: "create"
57815
57879
  },
57880
+ "ptz.setHomeReturn": {
57881
+ capName: "ptz",
57882
+ capScope: "device",
57883
+ addonId: null,
57884
+ access: "create"
57885
+ },
57816
57886
  "ptz.stop": {
57817
57887
  capName: "ptz",
57818
57888
  capScope: "device",
@@ -60976,6 +61046,11 @@ var require_dist_BW7x4kAI = __commonJS({
60976
61046
  form: "single",
60977
61047
  optional: false
60978
61048
  }],
61049
+ "ptz.captureHomeHere": [{
61050
+ name: "deviceId",
61051
+ form: "single",
61052
+ optional: false
61053
+ }],
60979
61054
  "ptz.continuousMove": [{
60980
61055
  name: "deviceId",
60981
61056
  form: "single",
@@ -60991,6 +61066,11 @@ var require_dist_BW7x4kAI = __commonJS({
60991
61066
  form: "single",
60992
61067
  optional: false
60993
61068
  }],
61069
+ "ptz.getHomeReturn": [{
61070
+ name: "deviceId",
61071
+ form: "single",
61072
+ optional: false
61073
+ }],
60994
61074
  "ptz.getOptions": [{
60995
61075
  name: "deviceId",
60996
61076
  form: "single",
@@ -61036,6 +61116,11 @@ var require_dist_BW7x4kAI = __commonJS({
61036
61116
  form: "single",
61037
61117
  optional: false
61038
61118
  }],
61119
+ "ptz.setHomeReturn": [{
61120
+ name: "deviceId",
61121
+ form: "single",
61122
+ optional: false
61123
+ }],
61039
61124
  "ptz.stop": [{
61040
61125
  name: "deviceId",
61041
61126
  form: "single",
@@ -63063,7 +63148,7 @@ var require_alerts_addon = __commonJS({
63063
63148
  [Symbol.toStringTag]: { value: "Module" }
63064
63149
  });
63065
63150
  require_chunk_Cek0wNdY();
63066
- var require_dist10 = require_dist_BW7x4kAI();
63151
+ var require_dist10 = require_dist_Htt_fKD5();
63067
63152
  function selectExpired(alerts, cutoffMs) {
63068
63153
  return alerts.filter((a) => a.createdAt < cutoffMs).sort((a, b) => a.createdAt - b.createdAt).map((a) => a.id);
63069
63154
  }
@@ -63882,7 +63967,7 @@ var require_console_logging = __commonJS({
63882
63967
  [Symbol.toStringTag]: { value: "Module" }
63883
63968
  });
63884
63969
  require_chunk_Cek0wNdY();
63885
- var require_dist10 = require_dist_BW7x4kAI();
63970
+ var require_dist10 = require_dist_Htt_fKD5();
63886
63971
  var require_formatter = require_formatter_DqAKDlvN();
63887
63972
  var LEVEL_RANK = {
63888
63973
  debug: 0,
@@ -63976,7 +64061,7 @@ var require_core_blocks_addon = __commonJS({
63976
64061
  "use strict";
63977
64062
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
63978
64063
  var require_chunk = require_chunk_Cek0wNdY();
63979
- var require_dist10 = require_dist_BW7x4kAI();
64064
+ var require_dist10 = require_dist_Htt_fKD5();
63980
64065
  var node_crypto = __require("crypto");
63981
64066
  var node_fs_promises = __require("fs/promises");
63982
64067
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -64873,11 +64958,11 @@ var require_core_blocks = __commonJS({
64873
64958
  }
64874
64959
  });
64875
64960
 
64876
- // ../system/dist/retired-settings-keys-CeaYCDU4.js
64877
- var require_retired_settings_keys_CeaYCDU4 = __commonJS({
64878
- "../system/dist/retired-settings-keys-CeaYCDU4.js"(exports) {
64961
+ // ../system/dist/retired-settings-keys-CaGqdEsM.js
64962
+ var require_retired_settings_keys_CaGqdEsM = __commonJS({
64963
+ "../system/dist/retired-settings-keys-CaGqdEsM.js"(exports) {
64879
64964
  "use strict";
64880
- var require_dist10 = require_dist_BW7x4kAI();
64965
+ var require_dist10 = require_dist_Htt_fKD5();
64881
64966
  function settingsStoreIsAuthoritativeHere(env) {
64882
64967
  const raw = (env["CAMSTACK_ROLE"] ?? "").trim().toLowerCase();
64883
64968
  return raw === "" || raw === "hub";
@@ -67154,8 +67239,8 @@ var require_device_manager_addon = __commonJS({
67154
67239
  [Symbol.toStringTag]: { value: "Module" }
67155
67240
  });
67156
67241
  require_chunk_Cek0wNdY();
67157
- var require_dist10 = require_dist_BW7x4kAI();
67158
- var require_retired_settings_keys = require_retired_settings_keys_CeaYCDU4();
67242
+ var require_dist10 = require_dist_Htt_fKD5();
67243
+ var require_retired_settings_keys = require_retired_settings_keys_CaGqdEsM();
67159
67244
  var node_crypto = __require("crypto");
67160
67245
  var _camstack_types_node = require_node();
67161
67246
  var JOB_HISTORY = 20;
@@ -73163,7 +73248,7 @@ var require_hub_forwarder = __commonJS({
73163
73248
  [Symbol.toStringTag]: { value: "Module" }
73164
73249
  });
73165
73250
  require_chunk_Cek0wNdY();
73166
- var require_dist10 = require_dist_BW7x4kAI();
73251
+ var require_dist10 = require_dist_Htt_fKD5();
73167
73252
  var require_formatter = require_formatter_DqAKDlvN();
73168
73253
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
73169
73254
  var HubForwarderDestination = class {
@@ -73300,7 +73385,7 @@ var require_liveness_monitor_addon = __commonJS({
73300
73385
  "use strict";
73301
73386
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
73302
73387
  require_chunk_Cek0wNdY();
73303
- var require_dist10 = require_dist_BW7x4kAI();
73388
+ var require_dist10 = require_dist_Htt_fKD5();
73304
73389
  var NO_DEVICES = "liveness:no-devices";
73305
73390
  var ALL_OFFLINE = "liveness:all-devices-offline";
73306
73391
  var NO_FOOTAGE_PREFIX = "liveness:no-footage:";
@@ -73496,7 +73581,7 @@ var require_local_auth_addon = __commonJS({
73496
73581
  [Symbol.toStringTag]: { value: "Module" }
73497
73582
  });
73498
73583
  var require_chunk = require_chunk_Cek0wNdY();
73499
- var require_dist10 = require_dist_BW7x4kAI();
73584
+ var require_dist10 = require_dist_Htt_fKD5();
73500
73585
  var node_crypto = __require("crypto");
73501
73586
  node_crypto = require_chunk.__toESM(node_crypto);
73502
73587
  var crypto$1 = __require("crypto");
@@ -81309,7 +81394,7 @@ var require_loki_logging = __commonJS({
81309
81394
  [Symbol.toStringTag]: { value: "Module" }
81310
81395
  });
81311
81396
  require_chunk_Cek0wNdY();
81312
- var require_dist10 = require_dist_BW7x4kAI();
81397
+ var require_dist10 = require_dist_Htt_fKD5();
81313
81398
  function sanitizeLabelName(raw) {
81314
81399
  const replaced = raw.replaceAll(/[^a-zA-Z0-9_]/g, "_");
81315
81400
  return /^[a-zA-Z_]/.test(replaced) ? replaced : `_${replaced}`;
@@ -81896,7 +81981,7 @@ var require_native_metrics_addon = __commonJS({
81896
81981
  [Symbol.toStringTag]: { value: "Module" }
81897
81982
  });
81898
81983
  var require_chunk = require_chunk_Cek0wNdY();
81899
- var require_dist10 = require_dist_BW7x4kAI();
81984
+ var require_dist10 = require_dist_Htt_fKD5();
81900
81985
  var node_fs_promises = __require("fs/promises");
81901
81986
  var node_fs = __require("fs");
81902
81987
  node_fs = require_chunk.__toESM(node_fs);
@@ -84649,7 +84734,7 @@ var require_filesystem_storage_addon = __commonJS({
84649
84734
  [Symbol.toStringTag]: { value: "Module" }
84650
84735
  });
84651
84736
  var require_chunk = require_chunk_Cek0wNdY();
84652
- var require_dist10 = require_dist_BW7x4kAI();
84737
+ var require_dist10 = require_dist_Htt_fKD5();
84653
84738
  var node_crypto = __require("crypto");
84654
84739
  var node_fs_promises = __require("fs/promises");
84655
84740
  var node_path = __require("path");
@@ -85876,8 +85961,8 @@ var require_sqlite_settings_addon = __commonJS({
85876
85961
  [Symbol.toStringTag]: { value: "Module" }
85877
85962
  });
85878
85963
  var require_chunk = require_chunk_Cek0wNdY();
85879
- var require_dist10 = require_dist_BW7x4kAI();
85880
- var require_retired_settings_keys = require_retired_settings_keys_CeaYCDU4();
85964
+ var require_dist10 = require_dist_Htt_fKD5();
85965
+ var require_retired_settings_keys = require_retired_settings_keys_CaGqdEsM();
85881
85966
  var require_wal_checkpoint_policy = require_wal_checkpoint_policy_CCJZngds();
85882
85967
  var node_crypto = __require("crypto");
85883
85968
  var node_path = __require("path");
@@ -88664,7 +88749,7 @@ var require_storage_orchestrator_addon = __commonJS({
88664
88749
  [Symbol.toStringTag]: { value: "Module" }
88665
88750
  });
88666
88751
  var require_chunk = require_chunk_Cek0wNdY();
88667
- var require_dist10 = require_dist_BW7x4kAI();
88752
+ var require_dist10 = require_dist_Htt_fKD5();
88668
88753
  var require_hub_cap_forward = require_hub_cap_forward_DmHNjbB0();
88669
88754
  var zod = require_zod();
88670
88755
  var node_crypto = __require("crypto");
@@ -92391,7 +92476,7 @@ var require_system_config_addon = __commonJS({
92391
92476
  [Symbol.toStringTag]: { value: "Module" }
92392
92477
  });
92393
92478
  require_chunk_Cek0wNdY();
92394
- var require_dist10 = require_dist_BW7x4kAI();
92479
+ var require_dist10 = require_dist_Htt_fKD5();
92395
92480
  var SECTION_TITLES = {
92396
92481
  server: "Server",
92397
92482
  auth: "Authentication"
@@ -110452,7 +110537,7 @@ var require_winston_logging = __commonJS({
110452
110537
  [Symbol.toStringTag]: { value: "Module" }
110453
110538
  });
110454
110539
  var require_chunk = require_chunk_Cek0wNdY();
110455
- var require_dist10 = require_dist_BW7x4kAI();
110540
+ var require_dist10 = require_dist_Htt_fKD5();
110456
110541
  var require_formatter = require_formatter_DqAKDlvN();
110457
110542
  var node_path = __require("path");
110458
110543
  node_path = require_chunk.__toESM(node_path);
@@ -112490,9 +112575,9 @@ var require_event_category_BVfsrBYA = __commonJS({
112490
112575
  }
112491
112576
  });
112492
112577
 
112493
- // ../types/dist/sleep-BAAUFDCk.js
112494
- var require_sleep_BAAUFDCk = __commonJS({
112495
- "../types/dist/sleep-BAAUFDCk.js"(exports) {
112578
+ // ../types/dist/sleep-CDG4jaLR.js
112579
+ var require_sleep_CDG4jaLR = __commonJS({
112580
+ "../types/dist/sleep-CDG4jaLR.js"(exports) {
112496
112581
  "use strict";
112497
112582
  var require_event_category = require_event_category_BVfsrBYA();
112498
112583
  var zod = require_zod();
@@ -115397,6 +115482,9 @@ var require_sleep_BAAUFDCk = __commonJS({
115397
115482
  goHome: (input) => dispatch("ptz", "ptz", "goHome", "mutation", input),
115398
115483
  getHomePreset: (input) => dispatch("ptz", "ptz", "getHomePreset", "query", input),
115399
115484
  setHomePreset: (input) => dispatch("ptz", "ptz", "setHomePreset", "mutation", input),
115485
+ captureHomeHere: (input) => dispatch("ptz", "ptz", "captureHomeHere", "mutation", input),
115486
+ getHomeReturn: (input) => dispatch("ptz", "ptz", "getHomeReturn", "query", input),
115487
+ setHomeReturn: (input) => dispatch("ptz", "ptz", "setHomeReturn", "mutation", input),
115400
115488
  getPosition: (input) => dispatch("ptz", "ptz", "getPosition", "query", input),
115401
115489
  setAutofocus: (input) => dispatch("ptz", "ptz", "setAutofocus", "mutation", input),
115402
115490
  getStatus: (input) => dispatch("ptz", "ptz", "getStatus", "query", input)
@@ -116395,7 +116483,7 @@ var require_addon = __commonJS({
116395
116483
  "../types/dist/addon.js"(exports) {
116396
116484
  "use strict";
116397
116485
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
116398
- var require_sleep = require_sleep_BAAUFDCk();
116486
+ var require_sleep = require_sleep_CDG4jaLR();
116399
116487
  var require_event_category = require_event_category_BVfsrBYA();
116400
116488
  var require_err_msg = require_err_msg_COpsHMw2();
116401
116489
  var CAP_INPUT_DEFAULTS = Object.freeze({
@@ -136721,7 +136809,7 @@ var require_dist3 = __commonJS({
136721
136809
  "use strict";
136722
136810
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
136723
136811
  var require_chunk = require_chunk_Cek0wNdY();
136724
- var require_dist10 = require_dist_BW7x4kAI();
136812
+ var require_dist10 = require_dist_Htt_fKD5();
136725
136813
  var require_builtins_alerts_alerts_addon = require_alerts_addon();
136726
136814
  require_alerts();
136727
136815
  var require_formatter = require_formatter_DqAKDlvN();
@@ -217885,7 +217973,7 @@ var require_dist4 = __commonJS({
217885
217973
  "../types/dist/index.js"(exports) {
217886
217974
  "use strict";
217887
217975
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
217888
- var require_sleep = require_sleep_BAAUFDCk();
217976
+ var require_sleep = require_sleep_CDG4jaLR();
217889
217977
  var require_event_category = require_event_category_BVfsrBYA();
217890
217978
  var require_canonical_hash = require_canonical_hash_CZ2JqJc3();
217891
217979
  var require_enums2 = require_enums();
@@ -244778,6 +244866,10 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
244778
244866
  "none"
244779
244867
  ])
244780
244868
  });
244869
+ var PtzHomeReturnSchema = zod.z.object({
244870
+ enabled: zod.z.boolean(),
244871
+ seconds: zod.z.number().int()
244872
+ });
244781
244873
  var ptzCapability = {
244782
244874
  name: "ptz",
244783
244875
  scope: "device",
@@ -244837,6 +244929,54 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
244837
244929
  auth: "admin"
244838
244930
  }),
244839
244931
  /**
244932
+ * Make WHERE THE HEAD IS POINTING RIGHT NOW this camera's home.
244933
+ *
244934
+ * `setHomePreset` takes a preset id, and a preset id is the wrong shape for
244935
+ * the most natural thing an operator does: aim the camera, then say "here".
244936
+ * It is also the only shape a camera whose home is NOT a preset can accept
244937
+ * -- Reolink's home is a guard point, a stored position with no id at all,
244938
+ * and hiding the control for that case (as the UI briefly did) left the one
244939
+ * vendor with a native home unable to set it.
244940
+ *
244941
+ * Each provider does it its own way:
244942
+ * reolink `setGrd` with `needSetPos`, pinning the guard point here
244943
+ * hikvision / amcrest save a preset, then pin it as home
244944
+ * onvif REFUSES -- its home is the PTZ origin and cannot be moved
244945
+ *
244946
+ * A provider that cannot honour it throws rather than silently doing
244947
+ * nothing: an operator who pressed "set home here" and saw no error would
244948
+ * believe it took.
244949
+ */
244950
+ captureHomeHere: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
244951
+ kind: "mutation",
244952
+ auth: "admin"
244953
+ }),
244954
+ /**
244955
+ * Whether the camera returns home on its own when left idle, and after how
244956
+ * long. `null` when it has no such behaviour at all.
244957
+ *
244958
+ * Reolink's guard point carries one (`timeout`, freely settable in
244959
+ * seconds). It is a real function of the camera that we did not expose at
244960
+ * all, and it belongs next to the home it governs rather than in a vendor
244961
+ * settings page nobody associates with Home.
244962
+ */
244963
+ getHomeReturn: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), PtzHomeReturnSchema.nullable()),
244964
+ /**
244965
+ * Set both together. Refused by a camera with no idle-return behaviour.
244966
+ *
244967
+ * They travel together for the same reason they are read together: the
244968
+ * underlying write carries both, so setting one alone means reading the
244969
+ * other back first and racing whoever else is writing.
244970
+ */
244971
+ setHomeReturn: require_sleep.method(zod.z.object({
244972
+ deviceId: zod.z.number(),
244973
+ enabled: zod.z.boolean(),
244974
+ seconds: zod.z.number().int().min(0).max(3600)
244975
+ }), zod.z.void(), {
244976
+ kind: "mutation",
244977
+ auth: "admin"
244978
+ }),
244979
+ /**
244840
244980
  * Pull the current PTZ position. Redundant with the auto-injected
244841
244981
  * `getStatus` method (see `status` below); kept for callers that
244842
244982
  * haven't migrated. Will be folded into `getStatus` in a future
@@ -256451,6 +256591,12 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
256451
256591
  addonId: null,
256452
256592
  access: "create"
256453
256593
  },
256594
+ "ptz.captureHomeHere": {
256595
+ capName: "ptz",
256596
+ capScope: "device",
256597
+ addonId: null,
256598
+ access: "create"
256599
+ },
256454
256600
  "ptz.continuousMove": {
256455
256601
  capName: "ptz",
256456
256602
  capScope: "device",
@@ -256469,6 +256615,12 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
256469
256615
  addonId: null,
256470
256616
  access: "view"
256471
256617
  },
256618
+ "ptz.getHomeReturn": {
256619
+ capName: "ptz",
256620
+ capScope: "device",
256621
+ addonId: null,
256622
+ access: "view"
256623
+ },
256472
256624
  "ptz.getOptions": {
256473
256625
  capName: "ptz",
256474
256626
  capScope: "device",
@@ -256523,6 +256675,12 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
256523
256675
  addonId: null,
256524
256676
  access: "create"
256525
256677
  },
256678
+ "ptz.setHomeReturn": {
256679
+ capName: "ptz",
256680
+ capScope: "device",
256681
+ addonId: null,
256682
+ access: "create"
256683
+ },
256526
256684
  "ptz.stop": {
256527
256685
  capName: "ptz",
256528
256686
  capScope: "device",
@@ -259952,6 +260110,11 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
259952
260110
  form: "single",
259953
260111
  optional: false
259954
260112
  }],
260113
+ "ptz.captureHomeHere": [{
260114
+ name: "deviceId",
260115
+ form: "single",
260116
+ optional: false
260117
+ }],
259955
260118
  "ptz.continuousMove": [{
259956
260119
  name: "deviceId",
259957
260120
  form: "single",
@@ -259967,6 +260130,11 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
259967
260130
  form: "single",
259968
260131
  optional: false
259969
260132
  }],
260133
+ "ptz.getHomeReturn": [{
260134
+ name: "deviceId",
260135
+ form: "single",
260136
+ optional: false
260137
+ }],
259970
260138
  "ptz.getOptions": [{
259971
260139
  name: "deviceId",
259972
260140
  form: "single",
@@ -260012,6 +260180,11 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
260012
260180
  form: "single",
260013
260181
  optional: false
260014
260182
  }],
260183
+ "ptz.setHomeReturn": [{
260184
+ name: "deviceId",
260185
+ form: "single",
260186
+ optional: false
260187
+ }],
260015
260188
  "ptz.stop": [{
260016
260189
  name: "deviceId",
260017
260190
  form: "single",
@@ -265162,6 +265335,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
265162
265335
  exports.PtzAutotrackStatusSchema = PtzAutotrackStatusSchema;
265163
265336
  exports.PtzAutotrackTargetOptionSchema = PtzAutotrackTargetOptionSchema;
265164
265337
  exports.PtzHomePresetSchema = PtzHomePresetSchema;
265338
+ exports.PtzHomeReturnSchema = PtzHomeReturnSchema;
265165
265339
  exports.PtzMoveCommandSchema = PtzMoveCommandSchema;
265166
265340
  exports.PtzOptionsSchema = PtzOptionsSchema;
265167
265341
  exports.PtzPositionSchema = PtzPositionSchema;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstack",
3
- "version": "1.2.168",
3
+ "version": "1.2.170",
4
4
  "description": "CLI tool for managing and running CamStack server",
5
5
  "keywords": [
6
6
  "camstack",