camstack 1.2.168 → 1.2.169

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-vl6nBE8d.mjs
14526
14526
  var AUDIO_CHUNK_FORMATS = [
14527
14527
  "f32le",
14528
14528
  "pcmu",
@@ -38826,6 +38826,47 @@ var ptzCapability = {
38826
38826
  auth: "admin"
38827
38827
  }),
38828
38828
  /**
38829
+ * Make WHERE THE HEAD IS POINTING RIGHT NOW this camera's home.
38830
+ *
38831
+ * `setHomePreset` takes a preset id, and a preset id is the wrong shape for
38832
+ * the most natural thing an operator does: aim the camera, then say "here".
38833
+ * It is also the only shape a camera whose home is NOT a preset can accept
38834
+ * -- Reolink's home is a guard point, a stored position with no id at all,
38835
+ * and hiding the control for that case (as the UI briefly did) left the one
38836
+ * vendor with a native home unable to set it.
38837
+ *
38838
+ * Each provider does it its own way:
38839
+ * reolink `setGrd` with `needSetPos`, pinning the guard point here
38840
+ * hikvision / amcrest save a preset, then pin it as home
38841
+ * onvif REFUSES -- its home is the PTZ origin and cannot be moved
38842
+ *
38843
+ * A provider that cannot honour it throws rather than silently doing
38844
+ * nothing: an operator who pressed "set home here" and saw no error would
38845
+ * believe it took.
38846
+ */
38847
+ captureHomeHere: method(external_exports.object({ deviceId: external_exports.number() }), external_exports.void(), {
38848
+ kind: "mutation",
38849
+ auth: "admin"
38850
+ }),
38851
+ /**
38852
+ * How long the camera waits, idle, before returning home on its own --
38853
+ * `null` when it has no such behaviour.
38854
+ *
38855
+ * Reolink's guard point carries one (`timeout`, freely settable in
38856
+ * seconds). It is a real function of the camera that we did not expose at
38857
+ * all, and it belongs next to the home it governs rather than in a vendor
38858
+ * settings page nobody associates with Home.
38859
+ */
38860
+ getHomeReturnSeconds: method(external_exports.object({ deviceId: external_exports.number() }), external_exports.number().int().nullable()),
38861
+ /** Set the idle-return delay. Refused by a camera that has no such timer. */
38862
+ setHomeReturnSeconds: method(external_exports.object({
38863
+ deviceId: external_exports.number(),
38864
+ seconds: external_exports.number().int().min(0).max(3600)
38865
+ }), external_exports.void(), {
38866
+ kind: "mutation",
38867
+ auth: "admin"
38868
+ }),
38869
+ /**
38829
38870
  * Pull the current PTZ position. Redundant with the auto-injected
38830
38871
  * `getStatus` method (see `status` below); kept for callers that
38831
38872
  * haven't migrated. Will be folded into `getStatus` in a future
@@ -46236,6 +46277,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
46236
46277
  addonId: null,
46237
46278
  access: "create"
46238
46279
  },
46280
+ "ptz.captureHomeHere": {
46281
+ capName: "ptz",
46282
+ capScope: "device",
46283
+ addonId: null,
46284
+ access: "create"
46285
+ },
46239
46286
  "ptz.continuousMove": {
46240
46287
  capName: "ptz",
46241
46288
  capScope: "device",
@@ -46254,6 +46301,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
46254
46301
  addonId: null,
46255
46302
  access: "view"
46256
46303
  },
46304
+ "ptz.getHomeReturnSeconds": {
46305
+ capName: "ptz",
46306
+ capScope: "device",
46307
+ addonId: null,
46308
+ access: "view"
46309
+ },
46257
46310
  "ptz.getOptions": {
46258
46311
  capName: "ptz",
46259
46312
  capScope: "device",
@@ -46308,6 +46361,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
46308
46361
  addonId: null,
46309
46362
  access: "create"
46310
46363
  },
46364
+ "ptz.setHomeReturnSeconds": {
46365
+ capName: "ptz",
46366
+ capScope: "device",
46367
+ addonId: null,
46368
+ access: "create"
46369
+ },
46311
46370
  "ptz.stop": {
46312
46371
  capName: "ptz",
46313
46372
  capScope: "device",
@@ -49471,6 +49530,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
49471
49530
  form: "single",
49472
49531
  optional: false
49473
49532
  }],
49533
+ "ptz.captureHomeHere": [{
49534
+ name: "deviceId",
49535
+ form: "single",
49536
+ optional: false
49537
+ }],
49474
49538
  "ptz.continuousMove": [{
49475
49539
  name: "deviceId",
49476
49540
  form: "single",
@@ -49486,6 +49550,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
49486
49550
  form: "single",
49487
49551
  optional: false
49488
49552
  }],
49553
+ "ptz.getHomeReturnSeconds": [{
49554
+ name: "deviceId",
49555
+ form: "single",
49556
+ optional: false
49557
+ }],
49489
49558
  "ptz.getOptions": [{
49490
49559
  name: "deviceId",
49491
49560
  form: "single",
@@ -49531,6 +49600,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
49531
49600
  form: "single",
49532
49601
  optional: false
49533
49602
  }],
49603
+ "ptz.setHomeReturnSeconds": [{
49604
+ name: "deviceId",
49605
+ form: "single",
49606
+ optional: false
49607
+ }],
49534
49608
  "ptz.stop": [{
49535
49609
  name: "deviceId",
49536
49610
  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-T3N5WXL6.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-TE2XQWET.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-TE2XQWET.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-XEKNY5LK.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-T3N5WXL6.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-BG0p9Azt.js
23746
+ var require_dist_BG0p9Azt = __commonJS({
23747
+ "../system/dist/dist-BG0p9Azt.js"(exports) {
23748
23748
  "use strict";
23749
23749
  var zod = require_zod();
23750
23750
  var EventCategory = /* @__PURE__ */ (function(EventCategory2) {
@@ -49501,6 +49501,47 @@ var require_dist_BW7x4kAI = __commonJS({
49501
49501
  auth: "admin"
49502
49502
  }),
49503
49503
  /**
49504
+ * Make WHERE THE HEAD IS POINTING RIGHT NOW this camera's home.
49505
+ *
49506
+ * `setHomePreset` takes a preset id, and a preset id is the wrong shape for
49507
+ * the most natural thing an operator does: aim the camera, then say "here".
49508
+ * It is also the only shape a camera whose home is NOT a preset can accept
49509
+ * -- Reolink's home is a guard point, a stored position with no id at all,
49510
+ * and hiding the control for that case (as the UI briefly did) left the one
49511
+ * vendor with a native home unable to set it.
49512
+ *
49513
+ * Each provider does it its own way:
49514
+ * reolink `setGrd` with `needSetPos`, pinning the guard point here
49515
+ * hikvision / amcrest save a preset, then pin it as home
49516
+ * onvif REFUSES -- its home is the PTZ origin and cannot be moved
49517
+ *
49518
+ * A provider that cannot honour it throws rather than silently doing
49519
+ * nothing: an operator who pressed "set home here" and saw no error would
49520
+ * believe it took.
49521
+ */
49522
+ captureHomeHere: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
49523
+ kind: "mutation",
49524
+ auth: "admin"
49525
+ }),
49526
+ /**
49527
+ * How long the camera waits, idle, before returning home on its own --
49528
+ * `null` when it has no such behaviour.
49529
+ *
49530
+ * Reolink's guard point carries one (`timeout`, freely settable in
49531
+ * seconds). It is a real function of the camera that we did not expose at
49532
+ * all, and it belongs next to the home it governs rather than in a vendor
49533
+ * settings page nobody associates with Home.
49534
+ */
49535
+ getHomeReturnSeconds: method(zod.z.object({ deviceId: zod.z.number() }), zod.z.number().int().nullable()),
49536
+ /** Set the idle-return delay. Refused by a camera that has no such timer. */
49537
+ setHomeReturnSeconds: method(zod.z.object({
49538
+ deviceId: zod.z.number(),
49539
+ seconds: zod.z.number().int().min(0).max(3600)
49540
+ }), zod.z.void(), {
49541
+ kind: "mutation",
49542
+ auth: "admin"
49543
+ }),
49544
+ /**
49504
49545
  * Pull the current PTZ position. Redundant with the auto-injected
49505
49546
  * `getStatus` method (see `status` below); kept for callers that
49506
49547
  * haven't migrated. Will be folded into `getStatus` in a future
@@ -57741,6 +57782,12 @@ var require_dist_BW7x4kAI = __commonJS({
57741
57782
  addonId: null,
57742
57783
  access: "create"
57743
57784
  },
57785
+ "ptz.captureHomeHere": {
57786
+ capName: "ptz",
57787
+ capScope: "device",
57788
+ addonId: null,
57789
+ access: "create"
57790
+ },
57744
57791
  "ptz.continuousMove": {
57745
57792
  capName: "ptz",
57746
57793
  capScope: "device",
@@ -57759,6 +57806,12 @@ var require_dist_BW7x4kAI = __commonJS({
57759
57806
  addonId: null,
57760
57807
  access: "view"
57761
57808
  },
57809
+ "ptz.getHomeReturnSeconds": {
57810
+ capName: "ptz",
57811
+ capScope: "device",
57812
+ addonId: null,
57813
+ access: "view"
57814
+ },
57762
57815
  "ptz.getOptions": {
57763
57816
  capName: "ptz",
57764
57817
  capScope: "device",
@@ -57813,6 +57866,12 @@ var require_dist_BW7x4kAI = __commonJS({
57813
57866
  addonId: null,
57814
57867
  access: "create"
57815
57868
  },
57869
+ "ptz.setHomeReturnSeconds": {
57870
+ capName: "ptz",
57871
+ capScope: "device",
57872
+ addonId: null,
57873
+ access: "create"
57874
+ },
57816
57875
  "ptz.stop": {
57817
57876
  capName: "ptz",
57818
57877
  capScope: "device",
@@ -60976,6 +61035,11 @@ var require_dist_BW7x4kAI = __commonJS({
60976
61035
  form: "single",
60977
61036
  optional: false
60978
61037
  }],
61038
+ "ptz.captureHomeHere": [{
61039
+ name: "deviceId",
61040
+ form: "single",
61041
+ optional: false
61042
+ }],
60979
61043
  "ptz.continuousMove": [{
60980
61044
  name: "deviceId",
60981
61045
  form: "single",
@@ -60991,6 +61055,11 @@ var require_dist_BW7x4kAI = __commonJS({
60991
61055
  form: "single",
60992
61056
  optional: false
60993
61057
  }],
61058
+ "ptz.getHomeReturnSeconds": [{
61059
+ name: "deviceId",
61060
+ form: "single",
61061
+ optional: false
61062
+ }],
60994
61063
  "ptz.getOptions": [{
60995
61064
  name: "deviceId",
60996
61065
  form: "single",
@@ -61036,6 +61105,11 @@ var require_dist_BW7x4kAI = __commonJS({
61036
61105
  form: "single",
61037
61106
  optional: false
61038
61107
  }],
61108
+ "ptz.setHomeReturnSeconds": [{
61109
+ name: "deviceId",
61110
+ form: "single",
61111
+ optional: false
61112
+ }],
61039
61113
  "ptz.stop": [{
61040
61114
  name: "deviceId",
61041
61115
  form: "single",
@@ -63063,7 +63137,7 @@ var require_alerts_addon = __commonJS({
63063
63137
  [Symbol.toStringTag]: { value: "Module" }
63064
63138
  });
63065
63139
  require_chunk_Cek0wNdY();
63066
- var require_dist10 = require_dist_BW7x4kAI();
63140
+ var require_dist10 = require_dist_BG0p9Azt();
63067
63141
  function selectExpired(alerts, cutoffMs) {
63068
63142
  return alerts.filter((a) => a.createdAt < cutoffMs).sort((a, b) => a.createdAt - b.createdAt).map((a) => a.id);
63069
63143
  }
@@ -63882,7 +63956,7 @@ var require_console_logging = __commonJS({
63882
63956
  [Symbol.toStringTag]: { value: "Module" }
63883
63957
  });
63884
63958
  require_chunk_Cek0wNdY();
63885
- var require_dist10 = require_dist_BW7x4kAI();
63959
+ var require_dist10 = require_dist_BG0p9Azt();
63886
63960
  var require_formatter = require_formatter_DqAKDlvN();
63887
63961
  var LEVEL_RANK = {
63888
63962
  debug: 0,
@@ -63976,7 +64050,7 @@ var require_core_blocks_addon = __commonJS({
63976
64050
  "use strict";
63977
64051
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
63978
64052
  var require_chunk = require_chunk_Cek0wNdY();
63979
- var require_dist10 = require_dist_BW7x4kAI();
64053
+ var require_dist10 = require_dist_BG0p9Azt();
63980
64054
  var node_crypto = __require("crypto");
63981
64055
  var node_fs_promises = __require("fs/promises");
63982
64056
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -64873,11 +64947,11 @@ var require_core_blocks = __commonJS({
64873
64947
  }
64874
64948
  });
64875
64949
 
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) {
64950
+ // ../system/dist/retired-settings-keys-Cmv1q2hJ.js
64951
+ var require_retired_settings_keys_Cmv1q2hJ = __commonJS({
64952
+ "../system/dist/retired-settings-keys-Cmv1q2hJ.js"(exports) {
64879
64953
  "use strict";
64880
- var require_dist10 = require_dist_BW7x4kAI();
64954
+ var require_dist10 = require_dist_BG0p9Azt();
64881
64955
  function settingsStoreIsAuthoritativeHere(env) {
64882
64956
  const raw = (env["CAMSTACK_ROLE"] ?? "").trim().toLowerCase();
64883
64957
  return raw === "" || raw === "hub";
@@ -67154,8 +67228,8 @@ var require_device_manager_addon = __commonJS({
67154
67228
  [Symbol.toStringTag]: { value: "Module" }
67155
67229
  });
67156
67230
  require_chunk_Cek0wNdY();
67157
- var require_dist10 = require_dist_BW7x4kAI();
67158
- var require_retired_settings_keys = require_retired_settings_keys_CeaYCDU4();
67231
+ var require_dist10 = require_dist_BG0p9Azt();
67232
+ var require_retired_settings_keys = require_retired_settings_keys_Cmv1q2hJ();
67159
67233
  var node_crypto = __require("crypto");
67160
67234
  var _camstack_types_node = require_node();
67161
67235
  var JOB_HISTORY = 20;
@@ -73163,7 +73237,7 @@ var require_hub_forwarder = __commonJS({
73163
73237
  [Symbol.toStringTag]: { value: "Module" }
73164
73238
  });
73165
73239
  require_chunk_Cek0wNdY();
73166
- var require_dist10 = require_dist_BW7x4kAI();
73240
+ var require_dist10 = require_dist_BG0p9Azt();
73167
73241
  var require_formatter = require_formatter_DqAKDlvN();
73168
73242
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
73169
73243
  var HubForwarderDestination = class {
@@ -73300,7 +73374,7 @@ var require_liveness_monitor_addon = __commonJS({
73300
73374
  "use strict";
73301
73375
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
73302
73376
  require_chunk_Cek0wNdY();
73303
- var require_dist10 = require_dist_BW7x4kAI();
73377
+ var require_dist10 = require_dist_BG0p9Azt();
73304
73378
  var NO_DEVICES = "liveness:no-devices";
73305
73379
  var ALL_OFFLINE = "liveness:all-devices-offline";
73306
73380
  var NO_FOOTAGE_PREFIX = "liveness:no-footage:";
@@ -73496,7 +73570,7 @@ var require_local_auth_addon = __commonJS({
73496
73570
  [Symbol.toStringTag]: { value: "Module" }
73497
73571
  });
73498
73572
  var require_chunk = require_chunk_Cek0wNdY();
73499
- var require_dist10 = require_dist_BW7x4kAI();
73573
+ var require_dist10 = require_dist_BG0p9Azt();
73500
73574
  var node_crypto = __require("crypto");
73501
73575
  node_crypto = require_chunk.__toESM(node_crypto);
73502
73576
  var crypto$1 = __require("crypto");
@@ -81309,7 +81383,7 @@ var require_loki_logging = __commonJS({
81309
81383
  [Symbol.toStringTag]: { value: "Module" }
81310
81384
  });
81311
81385
  require_chunk_Cek0wNdY();
81312
- var require_dist10 = require_dist_BW7x4kAI();
81386
+ var require_dist10 = require_dist_BG0p9Azt();
81313
81387
  function sanitizeLabelName(raw) {
81314
81388
  const replaced = raw.replaceAll(/[^a-zA-Z0-9_]/g, "_");
81315
81389
  return /^[a-zA-Z_]/.test(replaced) ? replaced : `_${replaced}`;
@@ -81896,7 +81970,7 @@ var require_native_metrics_addon = __commonJS({
81896
81970
  [Symbol.toStringTag]: { value: "Module" }
81897
81971
  });
81898
81972
  var require_chunk = require_chunk_Cek0wNdY();
81899
- var require_dist10 = require_dist_BW7x4kAI();
81973
+ var require_dist10 = require_dist_BG0p9Azt();
81900
81974
  var node_fs_promises = __require("fs/promises");
81901
81975
  var node_fs = __require("fs");
81902
81976
  node_fs = require_chunk.__toESM(node_fs);
@@ -84649,7 +84723,7 @@ var require_filesystem_storage_addon = __commonJS({
84649
84723
  [Symbol.toStringTag]: { value: "Module" }
84650
84724
  });
84651
84725
  var require_chunk = require_chunk_Cek0wNdY();
84652
- var require_dist10 = require_dist_BW7x4kAI();
84726
+ var require_dist10 = require_dist_BG0p9Azt();
84653
84727
  var node_crypto = __require("crypto");
84654
84728
  var node_fs_promises = __require("fs/promises");
84655
84729
  var node_path = __require("path");
@@ -85876,8 +85950,8 @@ var require_sqlite_settings_addon = __commonJS({
85876
85950
  [Symbol.toStringTag]: { value: "Module" }
85877
85951
  });
85878
85952
  var require_chunk = require_chunk_Cek0wNdY();
85879
- var require_dist10 = require_dist_BW7x4kAI();
85880
- var require_retired_settings_keys = require_retired_settings_keys_CeaYCDU4();
85953
+ var require_dist10 = require_dist_BG0p9Azt();
85954
+ var require_retired_settings_keys = require_retired_settings_keys_Cmv1q2hJ();
85881
85955
  var require_wal_checkpoint_policy = require_wal_checkpoint_policy_CCJZngds();
85882
85956
  var node_crypto = __require("crypto");
85883
85957
  var node_path = __require("path");
@@ -88664,7 +88738,7 @@ var require_storage_orchestrator_addon = __commonJS({
88664
88738
  [Symbol.toStringTag]: { value: "Module" }
88665
88739
  });
88666
88740
  var require_chunk = require_chunk_Cek0wNdY();
88667
- var require_dist10 = require_dist_BW7x4kAI();
88741
+ var require_dist10 = require_dist_BG0p9Azt();
88668
88742
  var require_hub_cap_forward = require_hub_cap_forward_DmHNjbB0();
88669
88743
  var zod = require_zod();
88670
88744
  var node_crypto = __require("crypto");
@@ -92391,7 +92465,7 @@ var require_system_config_addon = __commonJS({
92391
92465
  [Symbol.toStringTag]: { value: "Module" }
92392
92466
  });
92393
92467
  require_chunk_Cek0wNdY();
92394
- var require_dist10 = require_dist_BW7x4kAI();
92468
+ var require_dist10 = require_dist_BG0p9Azt();
92395
92469
  var SECTION_TITLES = {
92396
92470
  server: "Server",
92397
92471
  auth: "Authentication"
@@ -110452,7 +110526,7 @@ var require_winston_logging = __commonJS({
110452
110526
  [Symbol.toStringTag]: { value: "Module" }
110453
110527
  });
110454
110528
  var require_chunk = require_chunk_Cek0wNdY();
110455
- var require_dist10 = require_dist_BW7x4kAI();
110529
+ var require_dist10 = require_dist_BG0p9Azt();
110456
110530
  var require_formatter = require_formatter_DqAKDlvN();
110457
110531
  var node_path = __require("path");
110458
110532
  node_path = require_chunk.__toESM(node_path);
@@ -112490,9 +112564,9 @@ var require_event_category_BVfsrBYA = __commonJS({
112490
112564
  }
112491
112565
  });
112492
112566
 
112493
- // ../types/dist/sleep-BAAUFDCk.js
112494
- var require_sleep_BAAUFDCk = __commonJS({
112495
- "../types/dist/sleep-BAAUFDCk.js"(exports) {
112567
+ // ../types/dist/sleep-WeJUxTv-.js
112568
+ var require_sleep_WeJUxTv = __commonJS({
112569
+ "../types/dist/sleep-WeJUxTv-.js"(exports) {
112496
112570
  "use strict";
112497
112571
  var require_event_category = require_event_category_BVfsrBYA();
112498
112572
  var zod = require_zod();
@@ -115397,6 +115471,9 @@ var require_sleep_BAAUFDCk = __commonJS({
115397
115471
  goHome: (input) => dispatch("ptz", "ptz", "goHome", "mutation", input),
115398
115472
  getHomePreset: (input) => dispatch("ptz", "ptz", "getHomePreset", "query", input),
115399
115473
  setHomePreset: (input) => dispatch("ptz", "ptz", "setHomePreset", "mutation", input),
115474
+ captureHomeHere: (input) => dispatch("ptz", "ptz", "captureHomeHere", "mutation", input),
115475
+ getHomeReturnSeconds: (input) => dispatch("ptz", "ptz", "getHomeReturnSeconds", "query", input),
115476
+ setHomeReturnSeconds: (input) => dispatch("ptz", "ptz", "setHomeReturnSeconds", "mutation", input),
115400
115477
  getPosition: (input) => dispatch("ptz", "ptz", "getPosition", "query", input),
115401
115478
  setAutofocus: (input) => dispatch("ptz", "ptz", "setAutofocus", "mutation", input),
115402
115479
  getStatus: (input) => dispatch("ptz", "ptz", "getStatus", "query", input)
@@ -116395,7 +116472,7 @@ var require_addon = __commonJS({
116395
116472
  "../types/dist/addon.js"(exports) {
116396
116473
  "use strict";
116397
116474
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
116398
- var require_sleep = require_sleep_BAAUFDCk();
116475
+ var require_sleep = require_sleep_WeJUxTv();
116399
116476
  var require_event_category = require_event_category_BVfsrBYA();
116400
116477
  var require_err_msg = require_err_msg_COpsHMw2();
116401
116478
  var CAP_INPUT_DEFAULTS = Object.freeze({
@@ -136721,7 +136798,7 @@ var require_dist3 = __commonJS({
136721
136798
  "use strict";
136722
136799
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
136723
136800
  var require_chunk = require_chunk_Cek0wNdY();
136724
- var require_dist10 = require_dist_BW7x4kAI();
136801
+ var require_dist10 = require_dist_BG0p9Azt();
136725
136802
  var require_builtins_alerts_alerts_addon = require_alerts_addon();
136726
136803
  require_alerts();
136727
136804
  var require_formatter = require_formatter_DqAKDlvN();
@@ -217885,7 +217962,7 @@ var require_dist4 = __commonJS({
217885
217962
  "../types/dist/index.js"(exports) {
217886
217963
  "use strict";
217887
217964
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
217888
- var require_sleep = require_sleep_BAAUFDCk();
217965
+ var require_sleep = require_sleep_WeJUxTv();
217889
217966
  var require_event_category = require_event_category_BVfsrBYA();
217890
217967
  var require_canonical_hash = require_canonical_hash_CZ2JqJc3();
217891
217968
  var require_enums2 = require_enums();
@@ -244837,6 +244914,47 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
244837
244914
  auth: "admin"
244838
244915
  }),
244839
244916
  /**
244917
+ * Make WHERE THE HEAD IS POINTING RIGHT NOW this camera's home.
244918
+ *
244919
+ * `setHomePreset` takes a preset id, and a preset id is the wrong shape for
244920
+ * the most natural thing an operator does: aim the camera, then say "here".
244921
+ * It is also the only shape a camera whose home is NOT a preset can accept
244922
+ * -- Reolink's home is a guard point, a stored position with no id at all,
244923
+ * and hiding the control for that case (as the UI briefly did) left the one
244924
+ * vendor with a native home unable to set it.
244925
+ *
244926
+ * Each provider does it its own way:
244927
+ * reolink `setGrd` with `needSetPos`, pinning the guard point here
244928
+ * hikvision / amcrest save a preset, then pin it as home
244929
+ * onvif REFUSES -- its home is the PTZ origin and cannot be moved
244930
+ *
244931
+ * A provider that cannot honour it throws rather than silently doing
244932
+ * nothing: an operator who pressed "set home here" and saw no error would
244933
+ * believe it took.
244934
+ */
244935
+ captureHomeHere: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.void(), {
244936
+ kind: "mutation",
244937
+ auth: "admin"
244938
+ }),
244939
+ /**
244940
+ * How long the camera waits, idle, before returning home on its own --
244941
+ * `null` when it has no such behaviour.
244942
+ *
244943
+ * Reolink's guard point carries one (`timeout`, freely settable in
244944
+ * seconds). It is a real function of the camera that we did not expose at
244945
+ * all, and it belongs next to the home it governs rather than in a vendor
244946
+ * settings page nobody associates with Home.
244947
+ */
244948
+ getHomeReturnSeconds: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), zod.z.number().int().nullable()),
244949
+ /** Set the idle-return delay. Refused by a camera that has no such timer. */
244950
+ setHomeReturnSeconds: require_sleep.method(zod.z.object({
244951
+ deviceId: zod.z.number(),
244952
+ seconds: zod.z.number().int().min(0).max(3600)
244953
+ }), zod.z.void(), {
244954
+ kind: "mutation",
244955
+ auth: "admin"
244956
+ }),
244957
+ /**
244840
244958
  * Pull the current PTZ position. Redundant with the auto-injected
244841
244959
  * `getStatus` method (see `status` below); kept for callers that
244842
244960
  * haven't migrated. Will be folded into `getStatus` in a future
@@ -256451,6 +256569,12 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
256451
256569
  addonId: null,
256452
256570
  access: "create"
256453
256571
  },
256572
+ "ptz.captureHomeHere": {
256573
+ capName: "ptz",
256574
+ capScope: "device",
256575
+ addonId: null,
256576
+ access: "create"
256577
+ },
256454
256578
  "ptz.continuousMove": {
256455
256579
  capName: "ptz",
256456
256580
  capScope: "device",
@@ -256469,6 +256593,12 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
256469
256593
  addonId: null,
256470
256594
  access: "view"
256471
256595
  },
256596
+ "ptz.getHomeReturnSeconds": {
256597
+ capName: "ptz",
256598
+ capScope: "device",
256599
+ addonId: null,
256600
+ access: "view"
256601
+ },
256472
256602
  "ptz.getOptions": {
256473
256603
  capName: "ptz",
256474
256604
  capScope: "device",
@@ -256523,6 +256653,12 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
256523
256653
  addonId: null,
256524
256654
  access: "create"
256525
256655
  },
256656
+ "ptz.setHomeReturnSeconds": {
256657
+ capName: "ptz",
256658
+ capScope: "device",
256659
+ addonId: null,
256660
+ access: "create"
256661
+ },
256526
256662
  "ptz.stop": {
256527
256663
  capName: "ptz",
256528
256664
  capScope: "device",
@@ -259952,6 +260088,11 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
259952
260088
  form: "single",
259953
260089
  optional: false
259954
260090
  }],
260091
+ "ptz.captureHomeHere": [{
260092
+ name: "deviceId",
260093
+ form: "single",
260094
+ optional: false
260095
+ }],
259955
260096
  "ptz.continuousMove": [{
259956
260097
  name: "deviceId",
259957
260098
  form: "single",
@@ -259967,6 +260108,11 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
259967
260108
  form: "single",
259968
260109
  optional: false
259969
260110
  }],
260111
+ "ptz.getHomeReturnSeconds": [{
260112
+ name: "deviceId",
260113
+ form: "single",
260114
+ optional: false
260115
+ }],
259970
260116
  "ptz.getOptions": [{
259971
260117
  name: "deviceId",
259972
260118
  form: "single",
@@ -260012,6 +260158,11 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
260012
260158
  form: "single",
260013
260159
  optional: false
260014
260160
  }],
260161
+ "ptz.setHomeReturnSeconds": [{
260162
+ name: "deviceId",
260163
+ form: "single",
260164
+ optional: false
260165
+ }],
260015
260166
  "ptz.stop": [{
260016
260167
  name: "deviceId",
260017
260168
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstack",
3
- "version": "1.2.168",
3
+ "version": "1.2.169",
4
4
  "description": "CLI tool for managing and running CamStack server",
5
5
  "keywords": [
6
6
  "camstack",