camstack 1.2.26 → 1.2.28

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-DlC2kJYf.mjs
14525
+ // ../types/dist/sleep-BxO5xNe6.mjs
14526
14526
  var WELL_KNOWN_TABS = [
14527
14527
  {
14528
14528
  id: "overview",
@@ -27729,6 +27729,39 @@ var snapshotCapability = {
27729
27729
  etag: external_exports.string().nullable()
27730
27730
  }))),
27731
27731
  /**
27732
+ * The full decision chain for ONE device, for the viewer's debug readout —
27733
+ * the answer to "why does this tile show what it shows" in a single poll:
27734
+ * the battery slice the state was derived from, the resolved state + its
27735
+ * reason, the cached frame's identity/age, whether a wake window is open,
27736
+ * and whether a fresh capture is in flight. Cache-only and capture-free:
27737
+ * a debug read must never wake a battery camera.
27738
+ */
27739
+ getDebugState: systemMethod(external_exports.object({ deviceId: external_exports.number() }), external_exports.object({
27740
+ /** The battery slice as read, or null when the device has none. */
27741
+ battery: external_exports.object({
27742
+ sleeping: external_exports.boolean(),
27743
+ lastUpdated: external_exports.number(),
27744
+ lastContactAt: external_exports.number().optional()
27745
+ }).nullable(),
27746
+ /** The resolved snapshot state (what the overlay decision used). */
27747
+ state: external_exports.object({
27748
+ isBattery: external_exports.boolean(),
27749
+ reason: external_exports.enum([
27750
+ "disabled",
27751
+ "sleeping",
27752
+ "unreachable",
27753
+ "waking"
27754
+ ]).nullable()
27755
+ }),
27756
+ /** The cached frame behind the next paint. */
27757
+ frame: external_exports.object({
27758
+ capturedAt: external_exports.number().nullable(),
27759
+ ageMs: external_exports.number().nullable()
27760
+ }),
27761
+ /** A wake window is currently open (the Waking overlay's source). */
27762
+ waking: external_exports.boolean()
27763
+ })),
27764
+ /**
27732
27765
  * Signed, expiring links to a CLIENT-SIZED frame — and the demand signal
27733
27766
  * that makes those frames current.
27734
27767
  *
@@ -27811,7 +27844,14 @@ var snapshotCapability = {
27811
27844
  "sleeping",
27812
27845
  "unreachable",
27813
27846
  "waking"
27814
- ]).nullable()
27847
+ ]).nullable(),
27848
+ /** A battery camera (whatever its current state). An AWAKE battery
27849
+ * camera is deliberately NOT recaptured on the poll cadence — every
27850
+ * capture is a camera hit that would keep it out of sleep — so its
27851
+ * cached frame legitimately ages past the currency ceiling while
27852
+ * nothing is streaming. A surface must keep painting it (a fresh
27853
+ * frame is captured at each wake), not blank to "unavailable". */
27854
+ battery: external_exports.boolean()
27815
27855
  })))
27816
27856
  },
27817
27857
  status: {
@@ -40814,6 +40854,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
40814
40854
  addonId: null,
40815
40855
  access: "view"
40816
40856
  },
40857
+ "snapshot.getDebugState": {
40858
+ capName: "snapshot",
40859
+ capScope: "device",
40860
+ addonId: null,
40861
+ access: "view"
40862
+ },
40817
40863
  "snapshot.getSnapshot": {
40818
40864
  capName: "snapshot",
40819
40865
  capScope: "device",
@@ -43411,6 +43457,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
43411
43457
  form: "single",
43412
43458
  optional: false
43413
43459
  }],
43460
+ "snapshot.getDebugState": [{
43461
+ name: "deviceId",
43462
+ form: "single",
43463
+ optional: false
43464
+ }],
43414
43465
  "snapshot.getSnapshot": [{
43415
43466
  name: "deviceId",
43416
43467
  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-LGVHKS3K.js";
4
+ } from "./chunk-2THGXGK3.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-UHXHTYD4.js");
41
+ await import("./launcher-XHGXNFNV.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-UHXHTYD4.js");
86
+ await import("./launcher-XHGXNFNV.js");
87
87
  }
88
88
 
89
89
  // src/commands/setup.ts
@@ -1130,7 +1130,7 @@ function isUnknown(_value) {
1130
1130
  return true;
1131
1131
  }
1132
1132
  async function resolveServerInteractive(presetNamespace) {
1133
- const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-OGDGUAC5.js");
1133
+ const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-5Y5DI4XF.js");
1134
1134
  if (presetNamespace) {
1135
1135
  const spinner4 = clack.spinner();
1136
1136
  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-LGVHKS3K.js";
8
+ } from "./chunk-2THGXGK3.js";
9
9
  import "./chunk-LMMQX4CK.js";
10
10
  export {
11
11
  DEFAULT_HUB_HTTPS_PORT,
@@ -23631,9 +23631,9 @@ var require_zod = __commonJS({
23631
23631
  }
23632
23632
  });
23633
23633
 
23634
- // ../system/dist/dist-uhKRdmyc.js
23635
- var require_dist_uhKRdmyc = __commonJS({
23636
- "../system/dist/dist-uhKRdmyc.js"(exports) {
23634
+ // ../system/dist/dist-tMrPAfpF.js
23635
+ var require_dist_tMrPAfpF = __commonJS({
23636
+ "../system/dist/dist-tMrPAfpF.js"(exports) {
23637
23637
  "use strict";
23638
23638
  var zod = require_zod();
23639
23639
  var EventCategory = /* @__PURE__ */ (function(EventCategory2) {
@@ -38011,6 +38011,39 @@ var require_dist_uhKRdmyc = __commonJS({
38011
38011
  etag: zod.z.string().nullable()
38012
38012
  }))),
38013
38013
  /**
38014
+ * The full decision chain for ONE device, for the viewer's debug readout —
38015
+ * the answer to "why does this tile show what it shows" in a single poll:
38016
+ * the battery slice the state was derived from, the resolved state + its
38017
+ * reason, the cached frame's identity/age, whether a wake window is open,
38018
+ * and whether a fresh capture is in flight. Cache-only and capture-free:
38019
+ * a debug read must never wake a battery camera.
38020
+ */
38021
+ getDebugState: systemMethod(zod.z.object({ deviceId: zod.z.number() }), zod.z.object({
38022
+ /** The battery slice as read, or null when the device has none. */
38023
+ battery: zod.z.object({
38024
+ sleeping: zod.z.boolean(),
38025
+ lastUpdated: zod.z.number(),
38026
+ lastContactAt: zod.z.number().optional()
38027
+ }).nullable(),
38028
+ /** The resolved snapshot state (what the overlay decision used). */
38029
+ state: zod.z.object({
38030
+ isBattery: zod.z.boolean(),
38031
+ reason: zod.z.enum([
38032
+ "disabled",
38033
+ "sleeping",
38034
+ "unreachable",
38035
+ "waking"
38036
+ ]).nullable()
38037
+ }),
38038
+ /** The cached frame behind the next paint. */
38039
+ frame: zod.z.object({
38040
+ capturedAt: zod.z.number().nullable(),
38041
+ ageMs: zod.z.number().nullable()
38042
+ }),
38043
+ /** A wake window is currently open (the Waking overlay's source). */
38044
+ waking: zod.z.boolean()
38045
+ })),
38046
+ /**
38014
38047
  * Signed, expiring links to a CLIENT-SIZED frame — and the demand signal
38015
38048
  * that makes those frames current.
38016
38049
  *
@@ -38093,7 +38126,14 @@ var require_dist_uhKRdmyc = __commonJS({
38093
38126
  "sleeping",
38094
38127
  "unreachable",
38095
38128
  "waking"
38096
- ]).nullable()
38129
+ ]).nullable(),
38130
+ /** A battery camera (whatever its current state). An AWAKE battery
38131
+ * camera is deliberately NOT recaptured on the poll cadence — every
38132
+ * capture is a camera hit that would keep it out of sleep — so its
38133
+ * cached frame legitimately ages past the currency ceiling while
38134
+ * nothing is streaming. A surface must keep painting it (a fresh
38135
+ * frame is captured at each wake), not blank to "unavailable". */
38136
+ battery: zod.z.boolean()
38097
38137
  })))
38098
38138
  },
38099
38139
  status: {
@@ -51787,6 +51827,12 @@ var require_dist_uhKRdmyc = __commonJS({
51787
51827
  addonId: null,
51788
51828
  access: "view"
51789
51829
  },
51830
+ "snapshot.getDebugState": {
51831
+ capName: "snapshot",
51832
+ capScope: "device",
51833
+ addonId: null,
51834
+ access: "view"
51835
+ },
51790
51836
  "snapshot.getSnapshot": {
51791
51837
  capName: "snapshot",
51792
51838
  capScope: "device",
@@ -54384,6 +54430,11 @@ var require_dist_uhKRdmyc = __commonJS({
54384
54430
  form: "single",
54385
54431
  optional: false
54386
54432
  }],
54433
+ "snapshot.getDebugState": [{
54434
+ name: "deviceId",
54435
+ form: "single",
54436
+ optional: false
54437
+ }],
54387
54438
  "snapshot.getSnapshot": [{
54388
54439
  name: "deviceId",
54389
54440
  form: "single",
@@ -55862,7 +55913,7 @@ var require_alerts_addon = __commonJS({
55862
55913
  [Symbol.toStringTag]: { value: "Module" }
55863
55914
  });
55864
55915
  require_chunk_Cek0wNdY();
55865
- var require_dist10 = require_dist_uhKRdmyc();
55916
+ var require_dist10 = require_dist_tMrPAfpF();
55866
55917
  function selectExpired(alerts, cutoffMs) {
55867
55918
  return alerts.filter((a) => a.createdAt < cutoffMs).sort((a, b) => a.createdAt - b.createdAt).map((a) => a.id);
55868
55919
  }
@@ -56675,7 +56726,7 @@ var require_console_logging = __commonJS({
56675
56726
  [Symbol.toStringTag]: { value: "Module" }
56676
56727
  });
56677
56728
  require_chunk_Cek0wNdY();
56678
- var require_dist10 = require_dist_uhKRdmyc();
56729
+ var require_dist10 = require_dist_tMrPAfpF();
56679
56730
  var require_formatter = require_formatter_DqAKDlvN();
56680
56731
  var LEVEL_RANK = {
56681
56732
  debug: 0,
@@ -56769,7 +56820,7 @@ var require_core_blocks_addon = __commonJS({
56769
56820
  "use strict";
56770
56821
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
56771
56822
  var require_chunk = require_chunk_Cek0wNdY();
56772
- var require_dist10 = require_dist_uhKRdmyc();
56823
+ var require_dist10 = require_dist_tMrPAfpF();
56773
56824
  var node_crypto = __require("crypto");
56774
56825
  var node_fs_promises = __require("fs/promises");
56775
56826
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -59489,7 +59540,7 @@ var require_device_manager_addon = __commonJS({
59489
59540
  [Symbol.toStringTag]: { value: "Module" }
59490
59541
  });
59491
59542
  require_chunk_Cek0wNdY();
59492
- var require_dist10 = require_dist_uhKRdmyc();
59543
+ var require_dist10 = require_dist_tMrPAfpF();
59493
59544
  var node_crypto = __require("crypto");
59494
59545
  var _camstack_types_node = require_node();
59495
59546
  var JOB_HISTORY = 20;
@@ -63477,7 +63528,7 @@ var require_hub_forwarder = __commonJS({
63477
63528
  [Symbol.toStringTag]: { value: "Module" }
63478
63529
  });
63479
63530
  require_chunk_Cek0wNdY();
63480
- var require_dist10 = require_dist_uhKRdmyc();
63531
+ var require_dist10 = require_dist_tMrPAfpF();
63481
63532
  var require_formatter = require_formatter_DqAKDlvN();
63482
63533
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
63483
63534
  var HubForwarderDestination = class {
@@ -63614,7 +63665,7 @@ var require_liveness_monitor_addon = __commonJS({
63614
63665
  "use strict";
63615
63666
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
63616
63667
  require_chunk_Cek0wNdY();
63617
- var require_dist10 = require_dist_uhKRdmyc();
63668
+ var require_dist10 = require_dist_tMrPAfpF();
63618
63669
  var NO_DEVICES = "liveness:no-devices";
63619
63670
  var ALL_OFFLINE = "liveness:all-devices-offline";
63620
63671
  var NO_FOOTAGE_PREFIX = "liveness:no-footage:";
@@ -63804,7 +63855,7 @@ var require_local_auth_addon = __commonJS({
63804
63855
  [Symbol.toStringTag]: { value: "Module" }
63805
63856
  });
63806
63857
  var require_chunk = require_chunk_Cek0wNdY();
63807
- var require_dist10 = require_dist_uhKRdmyc();
63858
+ var require_dist10 = require_dist_tMrPAfpF();
63808
63859
  var node_crypto = __require("crypto");
63809
63860
  node_crypto = require_chunk.__toESM(node_crypto);
63810
63861
  var crypto$1 = __require("crypto");
@@ -71488,7 +71539,7 @@ var require_loki_logging = __commonJS({
71488
71539
  [Symbol.toStringTag]: { value: "Module" }
71489
71540
  });
71490
71541
  require_chunk_Cek0wNdY();
71491
- var require_dist10 = require_dist_uhKRdmyc();
71542
+ var require_dist10 = require_dist_tMrPAfpF();
71492
71543
  function sanitizeLabelName(raw) {
71493
71544
  const replaced = raw.replaceAll(/[^a-zA-Z0-9_]/g, "_");
71494
71545
  return /^[a-zA-Z_]/.test(replaced) ? replaced : `_${replaced}`;
@@ -72053,7 +72104,7 @@ var require_native_metrics_addon = __commonJS({
72053
72104
  [Symbol.toStringTag]: { value: "Module" }
72054
72105
  });
72055
72106
  var require_chunk = require_chunk_Cek0wNdY();
72056
- var require_dist10 = require_dist_uhKRdmyc();
72107
+ var require_dist10 = require_dist_tMrPAfpF();
72057
72108
  var node_child_process = __require("child_process");
72058
72109
  var node_util = __require("util");
72059
72110
  var node_os = __require("os");
@@ -72995,7 +73046,7 @@ var require_filesystem_storage_addon = __commonJS({
72995
73046
  [Symbol.toStringTag]: { value: "Module" }
72996
73047
  });
72997
73048
  var require_chunk = require_chunk_Cek0wNdY();
72998
- var require_dist10 = require_dist_uhKRdmyc();
73049
+ var require_dist10 = require_dist_tMrPAfpF();
72999
73050
  var node_crypto = __require("crypto");
73000
73051
  var node_fs_promises = __require("fs/promises");
73001
73052
  var node_path = __require("path");
@@ -74111,7 +74162,7 @@ var require_sqlite_settings_addon = __commonJS({
74111
74162
  [Symbol.toStringTag]: { value: "Module" }
74112
74163
  });
74113
74164
  var require_chunk = require_chunk_Cek0wNdY();
74114
- var require_dist10 = require_dist_uhKRdmyc();
74165
+ var require_dist10 = require_dist_tMrPAfpF();
74115
74166
  var node_crypto = __require("crypto");
74116
74167
  var node_fs = __require("fs");
74117
74168
  var node_module = __require("module");
@@ -75679,7 +75730,7 @@ var require_storage_orchestrator_addon = __commonJS({
75679
75730
  [Symbol.toStringTag]: { value: "Module" }
75680
75731
  });
75681
75732
  var require_chunk = require_chunk_Cek0wNdY();
75682
- var require_dist10 = require_dist_uhKRdmyc();
75733
+ var require_dist10 = require_dist_tMrPAfpF();
75683
75734
  var node_crypto = __require("crypto");
75684
75735
  var node_fs_promises = __require("fs/promises");
75685
75736
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -77558,7 +77609,7 @@ var require_system_config_addon = __commonJS({
77558
77609
  [Symbol.toStringTag]: { value: "Module" }
77559
77610
  });
77560
77611
  require_chunk_Cek0wNdY();
77561
- var require_dist10 = require_dist_uhKRdmyc();
77612
+ var require_dist10 = require_dist_tMrPAfpF();
77562
77613
  var SECTION_TITLES = {
77563
77614
  server: "Server",
77564
77615
  auth: "Authentication"
@@ -95619,7 +95670,7 @@ var require_winston_logging = __commonJS({
95619
95670
  [Symbol.toStringTag]: { value: "Module" }
95620
95671
  });
95621
95672
  var require_chunk = require_chunk_Cek0wNdY();
95622
- var require_dist10 = require_dist_uhKRdmyc();
95673
+ var require_dist10 = require_dist_tMrPAfpF();
95623
95674
  var require_formatter = require_formatter_DqAKDlvN();
95624
95675
  var node_path = __require("path");
95625
95676
  node_path = require_chunk.__toESM(node_path);
@@ -96772,9 +96823,9 @@ var require_event_category_D3gG7oil = __commonJS({
96772
96823
  }
96773
96824
  });
96774
96825
 
96775
- // ../types/dist/sleep-CoL-9qhR.js
96776
- var require_sleep_CoL_9qhR = __commonJS({
96777
- "../types/dist/sleep-CoL-9qhR.js"(exports) {
96826
+ // ../types/dist/sleep-EYtyUX0L.js
96827
+ var require_sleep_EYtyUX0L = __commonJS({
96828
+ "../types/dist/sleep-EYtyUX0L.js"(exports) {
96778
96829
  "use strict";
96779
96830
  var require_event_category = require_event_category_D3gG7oil();
96780
96831
  var zod = require_zod();
@@ -99334,6 +99385,7 @@ var require_sleep_CoL_9qhR = __commonJS({
99334
99385
  getSnapshot: (input) => dispatch("snapshot", "snapshot", "getSnapshot", "query", input),
99335
99386
  invalidateCache: (input) => dispatch("snapshot", "snapshot", "invalidateCache", "mutation", input),
99336
99387
  getSnapshotOverview: (input) => dispatch("snapshot", "snapshot", "getSnapshotOverview", "query", input),
99388
+ getDebugState: (input) => dispatch("snapshot", "snapshot", "getDebugState", "query", input),
99337
99389
  getSnapshotLinks: (input) => dispatch("snapshot", "snapshot", "getSnapshotLinks", "query", input),
99338
99390
  getStatus: (input) => dispatch("snapshot", "snapshot", "getStatus", "query", input),
99339
99391
  getDeviceSettingsContribution: (input) => dispatch("snapshot", "snapshot", "getDeviceSettingsContribution", "query", input),
@@ -100215,7 +100267,7 @@ var require_addon = __commonJS({
100215
100267
  "use strict";
100216
100268
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
100217
100269
  var require_event_category = require_event_category_D3gG7oil();
100218
- var require_sleep = require_sleep_CoL_9qhR();
100270
+ var require_sleep = require_sleep_EYtyUX0L();
100219
100271
  var require_err_msg = require_err_msg_COpsHMw2();
100220
100272
  var CAP_INPUT_DEFAULTS = Object.freeze({
100221
100273
  "addons": { "getLogs": { "limit": 100 } },
@@ -107089,9 +107141,9 @@ var require_dist2 = __commonJS({
107089
107141
  }
107090
107142
  });
107091
107143
 
107092
- // ../system/dist/manifest-python-deps-BZO_eMn-.js
107093
- var require_manifest_python_deps_BZO_eMn = __commonJS({
107094
- "../system/dist/manifest-python-deps-BZO_eMn-.js"(exports) {
107144
+ // ../system/dist/manifest-python-deps-BtVjvfvj.js
107145
+ var require_manifest_python_deps_BtVjvfvj = __commonJS({
107146
+ "../system/dist/manifest-python-deps-BtVjvfvj.js"(exports) {
107095
107147
  "use strict";
107096
107148
  var require_chunk = require_chunk_Cek0wNdY();
107097
107149
  var node_crypto = __require("crypto");
@@ -108223,7 +108275,7 @@ var require_manifest_python_deps_BZO_eMn = __commonJS({
108223
108275
  id,
108224
108276
  stableId,
108225
108277
  addonId,
108226
- type: _camstack_types_addon.DeviceType.Camera,
108278
+ type: _camstack_types_addon.DeviceType.Generic,
108227
108279
  name: stableId,
108228
108280
  location: null,
108229
108281
  disabled: false,
@@ -117672,7 +117724,7 @@ var require_dist3 = __commonJS({
117672
117724
  "use strict";
117673
117725
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
117674
117726
  var require_chunk = require_chunk_Cek0wNdY();
117675
- var require_dist10 = require_dist_uhKRdmyc();
117727
+ var require_dist10 = require_dist_tMrPAfpF();
117676
117728
  var require_builtins_alerts_alerts_addon = require_alerts_addon();
117677
117729
  require_alerts();
117678
117730
  var require_formatter = require_formatter_DqAKDlvN();
@@ -117697,7 +117749,7 @@ var require_dist3 = __commonJS({
117697
117749
  require_system_config();
117698
117750
  var require_builtins_winston_logging_index = require_winston_logging();
117699
117751
  var require_file_data_plane = require_file_data_plane_DUHPHa_Y();
117700
- var require_manifest_python_deps = require_manifest_python_deps_BZO_eMn();
117752
+ var require_manifest_python_deps = require_manifest_python_deps_BtVjvfvj();
117701
117753
  var require_resource_monitor = require_resource_monitor_CdnzxBLP();
117702
117754
  var require_custom_action_registry = require_custom_action_registry_jY0NOZK8();
117703
117755
  var zod = require_zod();
@@ -237004,7 +237056,7 @@ var require_dist9 = __commonJS({
237004
237056
  "use strict";
237005
237057
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
237006
237058
  var require_event_category = require_event_category_D3gG7oil();
237007
- var require_sleep = require_sleep_CoL_9qhR();
237059
+ var require_sleep = require_sleep_EYtyUX0L();
237008
237060
  var require_canonical_hash = require_canonical_hash_DNV8S5ET();
237009
237061
  var require_enums2 = require_enums();
237010
237062
  var require_err_msg = require_err_msg_COpsHMw2();
@@ -252079,6 +252131,39 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
252079
252131
  etag: zod.z.string().nullable()
252080
252132
  }))),
252081
252133
  /**
252134
+ * The full decision chain for ONE device, for the viewer's debug readout —
252135
+ * the answer to "why does this tile show what it shows" in a single poll:
252136
+ * the battery slice the state was derived from, the resolved state + its
252137
+ * reason, the cached frame's identity/age, whether a wake window is open,
252138
+ * and whether a fresh capture is in flight. Cache-only and capture-free:
252139
+ * a debug read must never wake a battery camera.
252140
+ */
252141
+ getDebugState: require_sleep.systemMethod(zod.z.object({ deviceId: zod.z.number() }), zod.z.object({
252142
+ /** The battery slice as read, or null when the device has none. */
252143
+ battery: zod.z.object({
252144
+ sleeping: zod.z.boolean(),
252145
+ lastUpdated: zod.z.number(),
252146
+ lastContactAt: zod.z.number().optional()
252147
+ }).nullable(),
252148
+ /** The resolved snapshot state (what the overlay decision used). */
252149
+ state: zod.z.object({
252150
+ isBattery: zod.z.boolean(),
252151
+ reason: zod.z.enum([
252152
+ "disabled",
252153
+ "sleeping",
252154
+ "unreachable",
252155
+ "waking"
252156
+ ]).nullable()
252157
+ }),
252158
+ /** The cached frame behind the next paint. */
252159
+ frame: zod.z.object({
252160
+ capturedAt: zod.z.number().nullable(),
252161
+ ageMs: zod.z.number().nullable()
252162
+ }),
252163
+ /** A wake window is currently open (the Waking overlay's source). */
252164
+ waking: zod.z.boolean()
252165
+ })),
252166
+ /**
252082
252167
  * Signed, expiring links to a CLIENT-SIZED frame — and the demand signal
252083
252168
  * that makes those frames current.
252084
252169
  *
@@ -252161,7 +252246,14 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
252161
252246
  "sleeping",
252162
252247
  "unreachable",
252163
252248
  "waking"
252164
- ]).nullable()
252249
+ ]).nullable(),
252250
+ /** A battery camera (whatever its current state). An AWAKE battery
252251
+ * camera is deliberately NOT recaptured on the poll cadence — every
252252
+ * capture is a camera hit that would keep it out of sleep — so its
252253
+ * cached frame legitimately ages past the currency ceiling while
252254
+ * nothing is streaming. A surface must keep painting it (a fresh
252255
+ * frame is captured at each wake), not blank to "unavailable". */
252256
+ battery: zod.z.boolean()
252165
252257
  })))
252166
252258
  },
252167
252259
  status: {
@@ -268771,6 +268863,12 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
268771
268863
  addonId: null,
268772
268864
  access: "view"
268773
268865
  },
268866
+ "snapshot.getDebugState": {
268867
+ capName: "snapshot",
268868
+ capScope: "device",
268869
+ addonId: null,
268870
+ access: "view"
268871
+ },
268774
268872
  "snapshot.getSnapshot": {
268775
268873
  capName: "snapshot",
268776
268874
  capScope: "device",
@@ -271620,6 +271718,11 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
271620
271718
  form: "single",
271621
271719
  optional: false
271622
271720
  }],
271721
+ "snapshot.getDebugState": [{
271722
+ name: "deviceId",
271723
+ form: "single",
271724
+ optional: false
271725
+ }],
271623
271726
  "snapshot.getSnapshot": [{
271624
271727
  name: "deviceId",
271625
271728
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstack",
3
- "version": "1.2.26",
3
+ "version": "1.2.28",
4
4
  "description": "CLI tool for managing and running CamStack server",
5
5
  "keywords": [
6
6
  "camstack",