camstack 1.2.170 → 1.2.171

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-Dk-BdnBf.mjs
14525
+ // ../types/dist/sleep-Bs3xPtSh.mjs
14526
14526
  var AUDIO_CHUNK_FORMATS = [
14527
14527
  "f32le",
14528
14528
  "pcmu",
@@ -19073,6 +19073,24 @@ var GetStreamWithCodecInputSchema = external_exports.object({
19073
19073
  });
19074
19074
  var RtpSourceSchema = external_exports.object({
19075
19075
  url: external_exports.string(),
19076
+ /**
19077
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
19078
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
19079
+ *
19080
+ * The broker answers it because the broker is the only thing that can:
19081
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
19082
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
19083
+ * cap bindings would be a second authority, and two authorities on the same
19084
+ * question is how a composite camera ends up dialling a sleeping camera
19085
+ * because its own copy of the rule was a release behind.
19086
+ *
19087
+ * `null` is a real answer and is never a live url in disguise: a consumer
19088
+ * that silently fell back to {@link url} would perform exactly the wake this
19089
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
19090
+ * transcode hands back an egress the broker is feeding itself, which has no
19091
+ * sentry counterpart.
19092
+ */
19093
+ sentryUrl: external_exports.string().nullable().optional(),
19076
19094
  videoCodec: external_exports.enum(["H264", "H265"]),
19077
19095
  audioCodec: external_exports.string(),
19078
19096
  resolution: external_exports.object({
@@ -36884,6 +36902,84 @@ var motionTriggerCapability = {
36884
36902
  */
36885
36903
  durability: "session"
36886
36904
  };
36905
+ var GridNormalizedRectSchema = external_exports.object({
36906
+ x: external_exports.number().min(0).max(1),
36907
+ y: external_exports.number().min(0).max(1),
36908
+ width: external_exports.number().gt(0).max(1),
36909
+ height: external_exports.number().gt(0).max(1)
36910
+ });
36911
+ var GridLayoutCellSchema = external_exports.object({
36912
+ deviceId: external_exports.number().int().positive(),
36913
+ /** The part of the SOURCE taken, normalized against the source. */
36914
+ source: GridNormalizedRectSchema,
36915
+ /** Where it lands, normalized against the CANVAS. */
36916
+ cell: GridNormalizedRectSchema
36917
+ });
36918
+ var GridProfileOfferSchema = external_exports.object({
36919
+ profile: external_exports.enum([
36920
+ "high",
36921
+ "mid",
36922
+ "low"
36923
+ ]),
36924
+ offered: external_exports.boolean(),
36925
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
36926
+ missingSources: external_exports.array(external_exports.number().int().positive())
36927
+ });
36928
+ var GridLayoutViewSchema = external_exports.object({
36929
+ /** The persisted grid row this camera was declared from. */
36930
+ instanceId: external_exports.string(),
36931
+ deviceId: external_exports.number().int().nonnegative(),
36932
+ name: external_exports.string(),
36933
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
36934
+ width: external_exports.number().int(),
36935
+ height: external_exports.number().int(),
36936
+ fps: external_exports.number().int(),
36937
+ cells: external_exports.array(GridLayoutCellSchema),
36938
+ /** What the catalog will publish, and what it refuses to. Read-only. */
36939
+ profiles: external_exports.array(GridProfileOfferSchema)
36940
+ });
36941
+ var GridLayoutPatchSchema = external_exports.object({
36942
+ deviceId: external_exports.number().int().nonnegative(),
36943
+ name: external_exports.string().min(1).max(160).optional(),
36944
+ width: external_exports.number().int().min(160).max(7680).optional(),
36945
+ height: external_exports.number().int().min(120).max(4320).optional(),
36946
+ fps: external_exports.number().int().min(1).max(60).optional(),
36947
+ /**
36948
+ * The whole cell list at once. A per-cell patch would need an ordering the
36949
+ * editor does not have, and a half-applied layout is a picture nobody asked
36950
+ * for.
36951
+ */
36952
+ cells: external_exports.array(GridLayoutCellSchema).max(16)
36953
+ });
36954
+ var cameraGridLayoutCapability = {
36955
+ name: "camera-grid-layout",
36956
+ scope: "device",
36957
+ deviceNative: true,
36958
+ mode: "singleton",
36959
+ deviceTypes: [DeviceType.Camera],
36960
+ deviceConfig: { ui: {
36961
+ kind: "widget",
36962
+ widgetId: "host/camera-grid-layout",
36963
+ tab: "streaming",
36964
+ label: "Grid layout",
36965
+ order: 20
36966
+ } },
36967
+ methods: {
36968
+ /**
36969
+ * The grid behind this device.
36970
+ *
36971
+ * `null` means ANSWERED and this camera is not a grid — not "not yet
36972
+ * known". The widget renders its "this is not a grid camera" state only
36973
+ * from this answer, never from an unresolved query (D315).
36974
+ */
36975
+ getLayout: method(external_exports.object({ deviceId: external_exports.number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }),
36976
+ /** Write the geometry back. Returns the grid as it now stands, profiles included. */
36977
+ saveLayout: method(GridLayoutPatchSchema, GridLayoutViewSchema, {
36978
+ kind: "mutation",
36979
+ auth: "admin"
36980
+ })
36981
+ }
36982
+ };
36887
36983
  var MotionZoneRegionSchema = external_exports.object({
36888
36984
  id: external_exports.number(),
36889
36985
  enabled: external_exports.boolean(),
@@ -42562,6 +42658,18 @@ var METHOD_ACCESS_MAP = Object.freeze({
42562
42658
  addonId: null,
42563
42659
  access: "view"
42564
42660
  },
42661
+ "cameraGridLayout.getLayout": {
42662
+ capName: "camera-grid-layout",
42663
+ capScope: "device",
42664
+ addonId: null,
42665
+ access: "view"
42666
+ },
42667
+ "cameraGridLayout.saveLayout": {
42668
+ capName: "camera-grid-layout",
42669
+ capScope: "device",
42670
+ addonId: null,
42671
+ access: "create"
42672
+ },
42565
42673
  "cameraStreams.getBrokerStreams": {
42566
42674
  capName: "camera-streams",
42567
42675
  capScope: "device",
@@ -48261,6 +48369,21 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
48261
48369
  form: "single",
48262
48370
  optional: false
48263
48371
  }],
48372
+ "cameraGridLayout.getLayout": [{
48373
+ name: "deviceId",
48374
+ form: "single",
48375
+ optional: false
48376
+ }],
48377
+ "cameraGridLayout.saveLayout": [{
48378
+ name: "cells",
48379
+ form: "object-array",
48380
+ optional: false,
48381
+ itemField: "deviceId"
48382
+ }, {
48383
+ name: "deviceId",
48384
+ form: "single",
48385
+ optional: false
48386
+ }],
48264
48387
  "cameraStreams.getBrokerStreams": [{
48265
48388
  name: "deviceId",
48266
48389
  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-HGT3EBMM.js";
4
+ } from "./chunk-SLJH5H7K.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-4GC3GGPE.js");
41
+ await import("./launcher-YO2KRQNJ.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-4GC3GGPE.js");
86
+ await import("./launcher-YO2KRQNJ.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-GNXVHE5F.js");
1143
+ const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-IHA2UVS3.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-HGT3EBMM.js";
8
+ } from "./chunk-SLJH5H7K.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-Htt-fKD5.js
23746
- var require_dist_Htt_fKD5 = __commonJS({
23747
- "../system/dist/dist-Htt-fKD5.js"(exports) {
23745
+ // ../system/dist/dist-B9y-3rme.js
23746
+ var require_dist_B9y_3rme = __commonJS({
23747
+ "../system/dist/dist-B9y-3rme.js"(exports) {
23748
23748
  "use strict";
23749
23749
  var zod = require_zod();
23750
23750
  var EventCategory = /* @__PURE__ */ (function(EventCategory2) {
@@ -29841,6 +29841,24 @@ var require_dist_Htt_fKD5 = __commonJS({
29841
29841
  });
29842
29842
  var RtpSourceSchema = zod.z.object({
29843
29843
  url: zod.z.string(),
29844
+ /**
29845
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
29846
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
29847
+ *
29848
+ * The broker answers it because the broker is the only thing that can:
29849
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
29850
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
29851
+ * cap bindings would be a second authority, and two authorities on the same
29852
+ * question is how a composite camera ends up dialling a sleeping camera
29853
+ * because its own copy of the rule was a release behind.
29854
+ *
29855
+ * `null` is a real answer and is never a live url in disguise: a consumer
29856
+ * that silently fell back to {@link url} would perform exactly the wake this
29857
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
29858
+ * transcode hands back an egress the broker is feeding itself, which has no
29859
+ * sentry counterpart.
29860
+ */
29861
+ sentryUrl: zod.z.string().nullable().optional(),
29844
29862
  videoCodec: zod.z.enum(["H264", "H265"]),
29845
29863
  audioCodec: zod.z.string(),
29846
29864
  resolution: zod.z.object({
@@ -47561,6 +47579,84 @@ var require_dist_Htt_fKD5 = __commonJS({
47561
47579
  */
47562
47580
  durability: "session"
47563
47581
  };
47582
+ var GridNormalizedRectSchema = zod.z.object({
47583
+ x: zod.z.number().min(0).max(1),
47584
+ y: zod.z.number().min(0).max(1),
47585
+ width: zod.z.number().gt(0).max(1),
47586
+ height: zod.z.number().gt(0).max(1)
47587
+ });
47588
+ var GridLayoutCellSchema = zod.z.object({
47589
+ deviceId: zod.z.number().int().positive(),
47590
+ /** The part of the SOURCE taken, normalized against the source. */
47591
+ source: GridNormalizedRectSchema,
47592
+ /** Where it lands, normalized against the CANVAS. */
47593
+ cell: GridNormalizedRectSchema
47594
+ });
47595
+ var GridProfileOfferSchema = zod.z.object({
47596
+ profile: zod.z.enum([
47597
+ "high",
47598
+ "mid",
47599
+ "low"
47600
+ ]),
47601
+ offered: zod.z.boolean(),
47602
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
47603
+ missingSources: zod.z.array(zod.z.number().int().positive())
47604
+ });
47605
+ var GridLayoutViewSchema = zod.z.object({
47606
+ /** The persisted grid row this camera was declared from. */
47607
+ instanceId: zod.z.string(),
47608
+ deviceId: zod.z.number().int().nonnegative(),
47609
+ name: zod.z.string(),
47610
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
47611
+ width: zod.z.number().int(),
47612
+ height: zod.z.number().int(),
47613
+ fps: zod.z.number().int(),
47614
+ cells: zod.z.array(GridLayoutCellSchema),
47615
+ /** What the catalog will publish, and what it refuses to. Read-only. */
47616
+ profiles: zod.z.array(GridProfileOfferSchema)
47617
+ });
47618
+ var GridLayoutPatchSchema = zod.z.object({
47619
+ deviceId: zod.z.number().int().nonnegative(),
47620
+ name: zod.z.string().min(1).max(160).optional(),
47621
+ width: zod.z.number().int().min(160).max(7680).optional(),
47622
+ height: zod.z.number().int().min(120).max(4320).optional(),
47623
+ fps: zod.z.number().int().min(1).max(60).optional(),
47624
+ /**
47625
+ * The whole cell list at once. A per-cell patch would need an ordering the
47626
+ * editor does not have, and a half-applied layout is a picture nobody asked
47627
+ * for.
47628
+ */
47629
+ cells: zod.z.array(GridLayoutCellSchema).max(16)
47630
+ });
47631
+ var cameraGridLayoutCapability = {
47632
+ name: "camera-grid-layout",
47633
+ scope: "device",
47634
+ deviceNative: true,
47635
+ mode: "singleton",
47636
+ deviceTypes: [DeviceType.Camera],
47637
+ deviceConfig: { ui: {
47638
+ kind: "widget",
47639
+ widgetId: "host/camera-grid-layout",
47640
+ tab: "streaming",
47641
+ label: "Grid layout",
47642
+ order: 20
47643
+ } },
47644
+ methods: {
47645
+ /**
47646
+ * The grid behind this device.
47647
+ *
47648
+ * `null` means ANSWERED and this camera is not a grid — not "not yet
47649
+ * known". The widget renders its "this is not a grid camera" state only
47650
+ * from this answer, never from an unresolved query (D315).
47651
+ */
47652
+ getLayout: method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }),
47653
+ /** Write the geometry back. Returns the grid as it now stands, profiles included. */
47654
+ saveLayout: method(GridLayoutPatchSchema, GridLayoutViewSchema, {
47655
+ kind: "mutation",
47656
+ auth: "admin"
47657
+ })
47658
+ }
47659
+ };
47564
47660
  var MotionZoneRegionSchema = zod.z.object({
47565
47661
  id: zod.z.number(),
47566
47662
  enabled: zod.z.boolean(),
@@ -53214,6 +53310,7 @@ var require_dist_Htt_fKD5 = __commonJS({
53214
53310
  brokerCapability,
53215
53311
  buttonCapability,
53216
53312
  cameraCredentialsCapability,
53313
+ cameraGridLayoutCapability,
53217
53314
  cameraPipelineConfigCapability,
53218
53315
  cameraStreamsCapability,
53219
53316
  carbonMonoxideCapability,
@@ -54067,6 +54164,18 @@ var require_dist_Htt_fKD5 = __commonJS({
54067
54164
  addonId: null,
54068
54165
  access: "view"
54069
54166
  },
54167
+ "cameraGridLayout.getLayout": {
54168
+ capName: "camera-grid-layout",
54169
+ capScope: "device",
54170
+ addonId: null,
54171
+ access: "view"
54172
+ },
54173
+ "cameraGridLayout.saveLayout": {
54174
+ capName: "camera-grid-layout",
54175
+ capScope: "device",
54176
+ addonId: null,
54177
+ access: "create"
54178
+ },
54070
54179
  "cameraStreams.getBrokerStreams": {
54071
54180
  capName: "camera-streams",
54072
54181
  capScope: "device",
@@ -59766,6 +59875,21 @@ var require_dist_Htt_fKD5 = __commonJS({
59766
59875
  form: "single",
59767
59876
  optional: false
59768
59877
  }],
59878
+ "cameraGridLayout.getLayout": [{
59879
+ name: "deviceId",
59880
+ form: "single",
59881
+ optional: false
59882
+ }],
59883
+ "cameraGridLayout.saveLayout": [{
59884
+ name: "cells",
59885
+ form: "object-array",
59886
+ optional: false,
59887
+ itemField: "deviceId"
59888
+ }, {
59889
+ name: "deviceId",
59890
+ form: "single",
59891
+ optional: false
59892
+ }],
59769
59893
  "cameraStreams.getBrokerStreams": [{
59770
59894
  name: "deviceId",
59771
59895
  form: "single",
@@ -63148,7 +63272,7 @@ var require_alerts_addon = __commonJS({
63148
63272
  [Symbol.toStringTag]: { value: "Module" }
63149
63273
  });
63150
63274
  require_chunk_Cek0wNdY();
63151
- var require_dist10 = require_dist_Htt_fKD5();
63275
+ var require_dist10 = require_dist_B9y_3rme();
63152
63276
  function selectExpired(alerts, cutoffMs) {
63153
63277
  return alerts.filter((a) => a.createdAt < cutoffMs).sort((a, b) => a.createdAt - b.createdAt).map((a) => a.id);
63154
63278
  }
@@ -63967,7 +64091,7 @@ var require_console_logging = __commonJS({
63967
64091
  [Symbol.toStringTag]: { value: "Module" }
63968
64092
  });
63969
64093
  require_chunk_Cek0wNdY();
63970
- var require_dist10 = require_dist_Htt_fKD5();
64094
+ var require_dist10 = require_dist_B9y_3rme();
63971
64095
  var require_formatter = require_formatter_DqAKDlvN();
63972
64096
  var LEVEL_RANK = {
63973
64097
  debug: 0,
@@ -64061,7 +64185,7 @@ var require_core_blocks_addon = __commonJS({
64061
64185
  "use strict";
64062
64186
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
64063
64187
  var require_chunk = require_chunk_Cek0wNdY();
64064
- var require_dist10 = require_dist_Htt_fKD5();
64188
+ var require_dist10 = require_dist_B9y_3rme();
64065
64189
  var node_crypto = __require("crypto");
64066
64190
  var node_fs_promises = __require("fs/promises");
64067
64191
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -64958,11 +65082,11 @@ var require_core_blocks = __commonJS({
64958
65082
  }
64959
65083
  });
64960
65084
 
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) {
65085
+ // ../system/dist/retired-settings-keys-CnMg7wvS.js
65086
+ var require_retired_settings_keys_CnMg7wvS = __commonJS({
65087
+ "../system/dist/retired-settings-keys-CnMg7wvS.js"(exports) {
64964
65088
  "use strict";
64965
- var require_dist10 = require_dist_Htt_fKD5();
65089
+ var require_dist10 = require_dist_B9y_3rme();
64966
65090
  function settingsStoreIsAuthoritativeHere(env) {
64967
65091
  const raw = (env["CAMSTACK_ROLE"] ?? "").trim().toLowerCase();
64968
65092
  return raw === "" || raw === "hub";
@@ -67239,8 +67363,8 @@ var require_device_manager_addon = __commonJS({
67239
67363
  [Symbol.toStringTag]: { value: "Module" }
67240
67364
  });
67241
67365
  require_chunk_Cek0wNdY();
67242
- var require_dist10 = require_dist_Htt_fKD5();
67243
- var require_retired_settings_keys = require_retired_settings_keys_CaGqdEsM();
67366
+ var require_dist10 = require_dist_B9y_3rme();
67367
+ var require_retired_settings_keys = require_retired_settings_keys_CnMg7wvS();
67244
67368
  var node_crypto = __require("crypto");
67245
67369
  var _camstack_types_node = require_node();
67246
67370
  var JOB_HISTORY = 20;
@@ -73248,7 +73372,7 @@ var require_hub_forwarder = __commonJS({
73248
73372
  [Symbol.toStringTag]: { value: "Module" }
73249
73373
  });
73250
73374
  require_chunk_Cek0wNdY();
73251
- var require_dist10 = require_dist_Htt_fKD5();
73375
+ var require_dist10 = require_dist_B9y_3rme();
73252
73376
  var require_formatter = require_formatter_DqAKDlvN();
73253
73377
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
73254
73378
  var HubForwarderDestination = class {
@@ -73385,7 +73509,7 @@ var require_liveness_monitor_addon = __commonJS({
73385
73509
  "use strict";
73386
73510
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
73387
73511
  require_chunk_Cek0wNdY();
73388
- var require_dist10 = require_dist_Htt_fKD5();
73512
+ var require_dist10 = require_dist_B9y_3rme();
73389
73513
  var NO_DEVICES = "liveness:no-devices";
73390
73514
  var ALL_OFFLINE = "liveness:all-devices-offline";
73391
73515
  var NO_FOOTAGE_PREFIX = "liveness:no-footage:";
@@ -73581,7 +73705,7 @@ var require_local_auth_addon = __commonJS({
73581
73705
  [Symbol.toStringTag]: { value: "Module" }
73582
73706
  });
73583
73707
  var require_chunk = require_chunk_Cek0wNdY();
73584
- var require_dist10 = require_dist_Htt_fKD5();
73708
+ var require_dist10 = require_dist_B9y_3rme();
73585
73709
  var node_crypto = __require("crypto");
73586
73710
  node_crypto = require_chunk.__toESM(node_crypto);
73587
73711
  var crypto$1 = __require("crypto");
@@ -81394,7 +81518,7 @@ var require_loki_logging = __commonJS({
81394
81518
  [Symbol.toStringTag]: { value: "Module" }
81395
81519
  });
81396
81520
  require_chunk_Cek0wNdY();
81397
- var require_dist10 = require_dist_Htt_fKD5();
81521
+ var require_dist10 = require_dist_B9y_3rme();
81398
81522
  function sanitizeLabelName(raw) {
81399
81523
  const replaced = raw.replaceAll(/[^a-zA-Z0-9_]/g, "_");
81400
81524
  return /^[a-zA-Z_]/.test(replaced) ? replaced : `_${replaced}`;
@@ -81981,7 +82105,7 @@ var require_native_metrics_addon = __commonJS({
81981
82105
  [Symbol.toStringTag]: { value: "Module" }
81982
82106
  });
81983
82107
  var require_chunk = require_chunk_Cek0wNdY();
81984
- var require_dist10 = require_dist_Htt_fKD5();
82108
+ var require_dist10 = require_dist_B9y_3rme();
81985
82109
  var node_fs_promises = __require("fs/promises");
81986
82110
  var node_fs = __require("fs");
81987
82111
  node_fs = require_chunk.__toESM(node_fs);
@@ -84734,7 +84858,7 @@ var require_filesystem_storage_addon = __commonJS({
84734
84858
  [Symbol.toStringTag]: { value: "Module" }
84735
84859
  });
84736
84860
  var require_chunk = require_chunk_Cek0wNdY();
84737
- var require_dist10 = require_dist_Htt_fKD5();
84861
+ var require_dist10 = require_dist_B9y_3rme();
84738
84862
  var node_crypto = __require("crypto");
84739
84863
  var node_fs_promises = __require("fs/promises");
84740
84864
  var node_path = __require("path");
@@ -85961,8 +86085,8 @@ var require_sqlite_settings_addon = __commonJS({
85961
86085
  [Symbol.toStringTag]: { value: "Module" }
85962
86086
  });
85963
86087
  var require_chunk = require_chunk_Cek0wNdY();
85964
- var require_dist10 = require_dist_Htt_fKD5();
85965
- var require_retired_settings_keys = require_retired_settings_keys_CaGqdEsM();
86088
+ var require_dist10 = require_dist_B9y_3rme();
86089
+ var require_retired_settings_keys = require_retired_settings_keys_CnMg7wvS();
85966
86090
  var require_wal_checkpoint_policy = require_wal_checkpoint_policy_CCJZngds();
85967
86091
  var node_crypto = __require("crypto");
85968
86092
  var node_path = __require("path");
@@ -88749,7 +88873,7 @@ var require_storage_orchestrator_addon = __commonJS({
88749
88873
  [Symbol.toStringTag]: { value: "Module" }
88750
88874
  });
88751
88875
  var require_chunk = require_chunk_Cek0wNdY();
88752
- var require_dist10 = require_dist_Htt_fKD5();
88876
+ var require_dist10 = require_dist_B9y_3rme();
88753
88877
  var require_hub_cap_forward = require_hub_cap_forward_DmHNjbB0();
88754
88878
  var zod = require_zod();
88755
88879
  var node_crypto = __require("crypto");
@@ -92476,7 +92600,7 @@ var require_system_config_addon = __commonJS({
92476
92600
  [Symbol.toStringTag]: { value: "Module" }
92477
92601
  });
92478
92602
  require_chunk_Cek0wNdY();
92479
- var require_dist10 = require_dist_Htt_fKD5();
92603
+ var require_dist10 = require_dist_B9y_3rme();
92480
92604
  var SECTION_TITLES = {
92481
92605
  server: "Server",
92482
92606
  auth: "Authentication"
@@ -110537,7 +110661,7 @@ var require_winston_logging = __commonJS({
110537
110661
  [Symbol.toStringTag]: { value: "Module" }
110538
110662
  });
110539
110663
  var require_chunk = require_chunk_Cek0wNdY();
110540
- var require_dist10 = require_dist_Htt_fKD5();
110664
+ var require_dist10 = require_dist_B9y_3rme();
110541
110665
  var require_formatter = require_formatter_DqAKDlvN();
110542
110666
  var node_path = __require("path");
110543
110667
  node_path = require_chunk.__toESM(node_path);
@@ -112575,9 +112699,9 @@ var require_event_category_BVfsrBYA = __commonJS({
112575
112699
  }
112576
112700
  });
112577
112701
 
112578
- // ../types/dist/sleep-CDG4jaLR.js
112579
- var require_sleep_CDG4jaLR = __commonJS({
112580
- "../types/dist/sleep-CDG4jaLR.js"(exports) {
112702
+ // ../types/dist/sleep-OPlow2a9.js
112703
+ var require_sleep_OPlow2a9 = __commonJS({
112704
+ "../types/dist/sleep-OPlow2a9.js"(exports) {
112581
112705
  "use strict";
112582
112706
  var require_event_category = require_event_category_BVfsrBYA();
112583
112707
  var zod = require_zod();
@@ -115165,6 +115289,10 @@ var require_sleep_CDG4jaLR = __commonJS({
115165
115289
  getCredentials: (input) => dispatch("camera-credentials", "cameraCredentials", "getCredentials", "query", input),
115166
115290
  getStatus: (input) => dispatch("camera-credentials", "cameraCredentials", "getStatus", "query", input)
115167
115291
  },
115292
+ cameraGridLayout: {
115293
+ getLayout: (input) => dispatch("camera-grid-layout", "cameraGridLayout", "getLayout", "query", input),
115294
+ saveLayout: (input) => dispatch("camera-grid-layout", "cameraGridLayout", "saveLayout", "mutation", input)
115295
+ },
115168
115296
  cameraStreams: {
115169
115297
  getCameraStreams: (input) => dispatch("camera-streams", "cameraStreams", "getCameraStreams", "query", input),
115170
115298
  getBrokerStreams: (input) => dispatch("camera-streams", "cameraStreams", "getBrokerStreams", "query", input),
@@ -115774,6 +115902,7 @@ var require_sleep_CDG4jaLR = __commonJS({
115774
115902
  "brightness",
115775
115903
  "button",
115776
115904
  "camera-credentials",
115905
+ "camera-grid-layout",
115777
115906
  "camera-pipeline-config",
115778
115907
  "camera-streams",
115779
115908
  "carbon-monoxide",
@@ -116483,7 +116612,7 @@ var require_addon = __commonJS({
116483
116612
  "../types/dist/addon.js"(exports) {
116484
116613
  "use strict";
116485
116614
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
116486
- var require_sleep = require_sleep_CDG4jaLR();
116615
+ var require_sleep = require_sleep_OPlow2a9();
116487
116616
  var require_event_category = require_event_category_BVfsrBYA();
116488
116617
  var require_err_msg = require_err_msg_COpsHMw2();
116489
116618
  var CAP_INPUT_DEFAULTS = Object.freeze({
@@ -136809,7 +136938,7 @@ var require_dist3 = __commonJS({
136809
136938
  "use strict";
136810
136939
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
136811
136940
  var require_chunk = require_chunk_Cek0wNdY();
136812
- var require_dist10 = require_dist_Htt_fKD5();
136941
+ var require_dist10 = require_dist_B9y_3rme();
136813
136942
  var require_builtins_alerts_alerts_addon = require_alerts_addon();
136814
136943
  require_alerts();
136815
136944
  var require_formatter = require_formatter_DqAKDlvN();
@@ -217973,7 +218102,7 @@ var require_dist4 = __commonJS({
217973
218102
  "../types/dist/index.js"(exports) {
217974
218103
  "use strict";
217975
218104
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
217976
- var require_sleep = require_sleep_CDG4jaLR();
218105
+ var require_sleep = require_sleep_OPlow2a9();
217977
218106
  var require_event_category = require_event_category_BVfsrBYA();
217978
218107
  var require_canonical_hash = require_canonical_hash_CZ2JqJc3();
217979
218108
  var require_enums2 = require_enums();
@@ -223971,6 +224100,24 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
223971
224100
  });
223972
224101
  var RtpSourceSchema = zod.z.object({
223973
224102
  url: zod.z.string(),
224103
+ /**
224104
+ * The SENTRY counterpart of {@link url} — the dial that asks for the stream
224105
+ * WITHOUT asking for the camera — or `null` when this camera offers none.
224106
+ *
224107
+ * The broker answers it because the broker is the only thing that can:
224108
+ * eligibility is `sentryEligible` (a BATTERY camera that DECLARES the signals
224109
+ * cap), asked of facts only the broker holds. A consumer re-deriving it from
224110
+ * cap bindings would be a second authority, and two authorities on the same
224111
+ * question is how a composite camera ends up dialling a sleeping camera
224112
+ * because its own copy of the rule was a release behind.
224113
+ *
224114
+ * `null` is a real answer and is never a live url in disguise: a consumer
224115
+ * that silently fell back to {@link url} would perform exactly the wake this
224116
+ * field exists to prevent. Only a PASSTHROUGH acquisition can offer one — a
224117
+ * transcode hands back an egress the broker is feeding itself, which has no
224118
+ * sentry counterpart.
224119
+ */
224120
+ sentryUrl: zod.z.string().nullable().optional(),
223974
224121
  videoCodec: zod.z.enum(["H264", "H265"]),
223975
224122
  audioCodec: zod.z.string(),
223976
224123
  resolution: zod.z.object({
@@ -242840,6 +242987,84 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
242840
242987
  */
242841
242988
  durability: "session"
242842
242989
  };
242990
+ var GridNormalizedRectSchema = zod.z.object({
242991
+ x: zod.z.number().min(0).max(1),
242992
+ y: zod.z.number().min(0).max(1),
242993
+ width: zod.z.number().gt(0).max(1),
242994
+ height: zod.z.number().gt(0).max(1)
242995
+ });
242996
+ var GridLayoutCellSchema = zod.z.object({
242997
+ deviceId: zod.z.number().int().positive(),
242998
+ /** The part of the SOURCE taken, normalized against the source. */
242999
+ source: GridNormalizedRectSchema,
243000
+ /** Where it lands, normalized against the CANVAS. */
243001
+ cell: GridNormalizedRectSchema
243002
+ });
243003
+ var GridProfileOfferSchema = zod.z.object({
243004
+ profile: zod.z.enum([
243005
+ "high",
243006
+ "mid",
243007
+ "low"
243008
+ ]),
243009
+ offered: zod.z.boolean(),
243010
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
243011
+ missingSources: zod.z.array(zod.z.number().int().positive())
243012
+ });
243013
+ var GridLayoutViewSchema = zod.z.object({
243014
+ /** The persisted grid row this camera was declared from. */
243015
+ instanceId: zod.z.string(),
243016
+ deviceId: zod.z.number().int().nonnegative(),
243017
+ name: zod.z.string(),
243018
+ /** The canvas the operator laid out — this grid's `high`. mid/low are scaled from it. */
243019
+ width: zod.z.number().int(),
243020
+ height: zod.z.number().int(),
243021
+ fps: zod.z.number().int(),
243022
+ cells: zod.z.array(GridLayoutCellSchema),
243023
+ /** What the catalog will publish, and what it refuses to. Read-only. */
243024
+ profiles: zod.z.array(GridProfileOfferSchema)
243025
+ });
243026
+ var GridLayoutPatchSchema = zod.z.object({
243027
+ deviceId: zod.z.number().int().nonnegative(),
243028
+ name: zod.z.string().min(1).max(160).optional(),
243029
+ width: zod.z.number().int().min(160).max(7680).optional(),
243030
+ height: zod.z.number().int().min(120).max(4320).optional(),
243031
+ fps: zod.z.number().int().min(1).max(60).optional(),
243032
+ /**
243033
+ * The whole cell list at once. A per-cell patch would need an ordering the
243034
+ * editor does not have, and a half-applied layout is a picture nobody asked
243035
+ * for.
243036
+ */
243037
+ cells: zod.z.array(GridLayoutCellSchema).max(16)
243038
+ });
243039
+ var cameraGridLayoutCapability = {
243040
+ name: "camera-grid-layout",
243041
+ scope: "device",
243042
+ deviceNative: true,
243043
+ mode: "singleton",
243044
+ deviceTypes: [require_sleep.DeviceType.Camera],
243045
+ deviceConfig: { ui: {
243046
+ kind: "widget",
243047
+ widgetId: "host/camera-grid-layout",
243048
+ tab: "streaming",
243049
+ label: "Grid layout",
243050
+ order: 20
243051
+ } },
243052
+ methods: {
243053
+ /**
243054
+ * The grid behind this device.
243055
+ *
243056
+ * `null` means ANSWERED and this camera is not a grid — not "not yet
243057
+ * known". The widget renders its "this is not a grid camera" state only
243058
+ * from this answer, never from an unresolved query (D315).
243059
+ */
243060
+ getLayout: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }),
243061
+ /** Write the geometry back. Returns the grid as it now stands, profiles included. */
243062
+ saveLayout: require_sleep.method(GridLayoutPatchSchema, GridLayoutViewSchema, {
243063
+ kind: "mutation",
243064
+ auth: "admin"
243065
+ })
243066
+ }
243067
+ };
242843
243068
  var MotionZoneRegionSchema = zod.z.object({
242844
243069
  id: zod.z.number(),
242845
243070
  enabled: zod.z.boolean(),
@@ -251223,6 +251448,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
251223
251448
  broker: "broker",
251224
251449
  button: "button",
251225
251450
  cameraCredentials: "camera-credentials",
251451
+ cameraGridLayout: "camera-grid-layout",
251226
251452
  cameraPipelineConfig: "camera-pipeline-config",
251227
251453
  cameraStreams: "camera-streams",
251228
251454
  carbonMonoxide: "carbon-monoxide",
@@ -251460,6 +251686,10 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
251460
251686
  key: "cameraCredentials",
251461
251687
  name: "camera-credentials"
251462
251688
  },
251689
+ {
251690
+ key: "cameraGridLayout",
251691
+ name: "camera-grid-layout"
251692
+ },
251463
251693
  {
251464
251694
  key: "cameraPipelineConfig",
251465
251695
  name: "camera-pipeline-config"
@@ -252012,6 +252242,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
252012
252242
  brokerCapability,
252013
252243
  buttonCapability,
252014
252244
  cameraCredentialsCapability,
252245
+ cameraGridLayoutCapability,
252015
252246
  cameraPipelineConfigCapability,
252016
252247
  cameraStreamsCapability,
252017
252248
  carbonMonoxideCapability,
@@ -252865,6 +253096,18 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
252865
253096
  addonId: null,
252866
253097
  access: "view"
252867
253098
  },
253099
+ "cameraGridLayout.getLayout": {
253100
+ capName: "camera-grid-layout",
253101
+ capScope: "device",
253102
+ addonId: null,
253103
+ access: "view"
253104
+ },
253105
+ "cameraGridLayout.saveLayout": {
253106
+ capName: "camera-grid-layout",
253107
+ capScope: "device",
253108
+ addonId: null,
253109
+ access: "create"
253110
+ },
252868
253111
  "cameraStreams.getBrokerStreams": {
252869
253112
  capName: "camera-streams",
252870
253113
  capScope: "device",
@@ -258488,6 +258731,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
258488
258731
  "broker",
258489
258732
  "button",
258490
258733
  "camera-credentials",
258734
+ "camera-grid-layout",
258491
258735
  "camera-streams",
258492
258736
  "climate-control",
258493
258737
  "color",
@@ -258606,6 +258850,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
258606
258850
  "brightness",
258607
258851
  "button",
258608
258852
  "camera-credentials",
258853
+ "camera-grid-layout",
258609
258854
  "camera-streams",
258610
258855
  "climate-control",
258611
258856
  "color",
@@ -258830,6 +259075,21 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
258830
259075
  form: "single",
258831
259076
  optional: false
258832
259077
  }],
259078
+ "cameraGridLayout.getLayout": [{
259079
+ name: "deviceId",
259080
+ form: "single",
259081
+ optional: false
259082
+ }],
259083
+ "cameraGridLayout.saveLayout": [{
259084
+ name: "cells",
259085
+ form: "object-array",
259086
+ optional: false,
259087
+ itemField: "deviceId"
259088
+ }, {
259089
+ name: "deviceId",
259090
+ form: "single",
259091
+ optional: false
259092
+ }],
258833
259093
  "cameraStreams.getBrokerStreams": [{
258834
259094
  name: "deviceId",
258835
259095
  form: "single",
@@ -264944,6 +265204,8 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
264944
265204
  exports.GetLoggingSettingsInputSchema = GetLoggingSettingsInputSchema;
264945
265205
  exports.GetStreamWithCodecInputSchema = GetStreamWithCodecInputSchema;
264946
265206
  exports.GlobalMetricsSchema = GlobalMetricsSchema;
265207
+ exports.GridLayoutPatchSchema = GridLayoutPatchSchema;
265208
+ exports.GridLayoutViewSchema = GridLayoutViewSchema;
264947
265209
  exports.HAP_AUDIO_BASE = HAP_AUDIO_BASE;
264948
265210
  exports.HAP_AUDIO_BITRATE_KBPS = HAP_AUDIO_BITRATE_KBPS;
264949
265211
  exports.HAP_AUDIO_VBV_KBITS = HAP_AUDIO_VBV_KBITS;
@@ -265738,6 +266000,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
265738
266000
  exports.buildVideoArgs = require_canonical_hash.buildVideoArgs;
265739
266001
  exports.buttonCapability = buttonCapability;
265740
266002
  exports.cameraCredentialsCapability = cameraCredentialsCapability;
266003
+ exports.cameraGridLayoutCapability = cameraGridLayoutCapability;
265741
266004
  exports.cameraPipelineConfigCapability = cameraPipelineConfigCapability;
265742
266005
  exports.cameraStreamsCapability = cameraStreamsCapability;
265743
266006
  exports.canConvertUnit = canConvertUnit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstack",
3
- "version": "1.2.170",
3
+ "version": "1.2.171",
4
4
  "description": "CLI tool for managing and running CamStack server",
5
5
  "keywords": [
6
6
  "camstack",