camstack 1.2.104 → 1.2.105

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-CoV00zX3.mjs
14525
+ // ../types/dist/sleep-IaOr7P-z.mjs
14526
14526
  var WELL_KNOWN_TABS = [
14527
14527
  {
14528
14528
  id: "overview",
@@ -14742,6 +14742,21 @@ var CameraStreamSchema = external_exports.object({
14742
14742
  */
14743
14743
  autoEligible: external_exports.boolean().optional(),
14744
14744
  /**
14745
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
14746
+ * whose only sensible role is the low-bandwidth one, `high` for a main
14747
+ * stream. Consulted by the broker's automatic ranking
14748
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
14749
+ * an operator's manual assignment still wins, and an absent hint is the
14750
+ * pixel-ranked default every camera had before this field existed.
14751
+ *
14752
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
14753
+ * storage class is written for on its own (`recordings` is high|mid,
14754
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
14755
+ * camera's single 720p relay is a `low` in every respect except the slot the
14756
+ * heuristic put it in.
14757
+ */
14758
+ profileHint: CamProfileSchema.optional(),
14759
+ /**
14745
14760
  * Transport-specific opaque metadata. The broker passes it through to
14746
14761
  * the source reader without inspecting it. Currently used by
14747
14762
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -15715,7 +15730,22 @@ var RecordingTriggersSchema = external_exports.object({
15715
15730
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
15716
15731
  * registrare.
15717
15732
  */
15718
- sensorDeviceIds: external_exports.array(external_exports.number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
15733
+ sensorDeviceIds: external_exports.array(external_exports.number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
15734
+ /**
15735
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
15736
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
15737
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
15738
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
15739
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
15740
+ *
15741
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
15742
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
15743
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
15744
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
15745
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
15746
+ * (`holdTrigger` / `releaseTrigger`).
15747
+ */
15748
+ deviceSignal: external_exports.boolean().optional()
15719
15749
  });
15720
15750
  var RecordingBandModeSchema = external_exports.enum(["continuous", "events"]);
15721
15751
  var RecordingBandTriggersSchema = RecordingTriggersSchema;
@@ -18723,6 +18753,8 @@ var streamBrokerCapability = {
18723
18753
  label: external_exports.string().optional(),
18724
18754
  deviceFeatures: external_exports.array(external_exports.string()).optional(),
18725
18755
  autoEligible: external_exports.boolean().optional(),
18756
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
18757
+ profileHint: CamProfileSchema.optional(),
18726
18758
  metadata: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
18727
18759
  /** Required when kind === 'derived' — the source camStreamId the
18728
18760
  * derived broker reads its encoded plane from.
@@ -37817,6 +37849,50 @@ var recordingExportCapability = {
37817
37849
  })
37818
37850
  }
37819
37851
  };
37852
+ var RecordingSignalStatusSchema = external_exports.object({
37853
+ /** True while the device asks to be recorded. */
37854
+ active: external_exports.boolean(),
37855
+ /**
37856
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
37857
+ * …). Free text for the log line and the UI badge; the recorder never
37858
+ * branches on it.
37859
+ */
37860
+ reason: external_exports.string(),
37861
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
37862
+ lastChangedAt: external_exports.number()
37863
+ });
37864
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: external_exports.number() });
37865
+ var recordingSignalCapability = {
37866
+ name: "recording-signal",
37867
+ scope: "device",
37868
+ deviceNative: true,
37869
+ mode: "singleton",
37870
+ deviceTypes: [DeviceType.Camera],
37871
+ methods: {
37872
+ /** The current level, straight from the slice the provider keeps fresh. */
37873
+ getStatus: method(external_exports.object({ deviceId: external_exports.number() }), RecordingSignalStatusSchema)
37874
+ },
37875
+ status: {
37876
+ schema: RecordingSignalStatusSchema,
37877
+ kind: "push",
37878
+ empty: {
37879
+ active: false,
37880
+ reason: "unknown",
37881
+ lastChangedAt: 0
37882
+ }
37883
+ },
37884
+ runtimeState: RecordingSignalRuntimeStateSchema,
37885
+ /**
37886
+ * Runtime-state durability: **session** — a restored `active: true` from
37887
+ * before a restart is exactly the stale level the recorder's reconcile bound
37888
+ * exists to end, and the provider re-derives the true level on activation
37889
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
37890
+ *
37891
+ * See `RuntimeStateDurability`. Enforced by
37892
+ * `scripts/check-runtime-state-durability.ts`.
37893
+ */
37894
+ durability: "session"
37895
+ };
37820
37896
  var SceneConditionSchema = external_exports.string();
37821
37897
  var SceneUncoveredPolicySchema = external_exports.enum(["skip", "judge-anyway"]);
37822
37898
  var SceneVerdictSchema = external_exports.enum([
@@ -38185,6 +38261,8 @@ var CamStreamDescriptorSchema = external_exports.object({
38185
38261
  deviceFeatures: external_exports.array(external_exports.string()).optional(),
38186
38262
  /** Eligible for automatic profile assignment. Absent = `true`. */
38187
38263
  autoEligible: external_exports.boolean().optional(),
38264
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
38265
+ profileHint: CamProfileSchema.optional(),
38188
38266
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
38189
38267
  metadata: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
38190
38268
  });
@@ -44420,6 +44498,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
44420
44498
  addonId: null,
44421
44499
  access: "view"
44422
44500
  },
44501
+ "recordingSignal.getStatus": {
44502
+ capName: "recording-signal",
44503
+ capScope: "device",
44504
+ addonId: null,
44505
+ access: "view"
44506
+ },
44423
44507
  "sceneMonitor.captureReference": {
44424
44508
  capName: "scene-monitor",
44425
44509
  capScope: "device",
@@ -47412,6 +47496,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
47412
47496
  form: "single",
47413
47497
  optional: true
47414
47498
  }],
47499
+ "recordingSignal.getStatus": [{
47500
+ name: "deviceId",
47501
+ form: "single",
47502
+ optional: false
47503
+ }],
47415
47504
  "sceneMonitor.captureReference": [{
47416
47505
  name: "deviceId",
47417
47506
  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-N7GROSKE.js";
4
+ } from "./chunk-OLHRHGNY.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-Z3ZWTZS5.js");
41
+ await import("./launcher-P5VZSWZR.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-Z3ZWTZS5.js");
86
+ await import("./launcher-P5VZSWZR.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-MXRAOHEZ.js");
1133
+ const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-MHBOYSVK.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-N7GROSKE.js";
8
+ } from "./chunk-OLHRHGNY.js";
9
9
  import "./chunk-LMMQX4CK.js";
10
10
  export {
11
11
  DEFAULT_HUB_HTTPS_PORT,
@@ -23633,9 +23633,9 @@ var require_zod = __commonJS({
23633
23633
  }
23634
23634
  });
23635
23635
 
23636
- // ../system/dist/dist-Qnc3kuba.js
23637
- var require_dist_Qnc3kuba = __commonJS({
23638
- "../system/dist/dist-Qnc3kuba.js"(exports) {
23636
+ // ../system/dist/dist-BNaW68aZ.js
23637
+ var require_dist_BNaW68aZ = __commonJS({
23638
+ "../system/dist/dist-BNaW68aZ.js"(exports) {
23639
23639
  "use strict";
23640
23640
  var zod = require_zod();
23641
23641
  var EventCategory = /* @__PURE__ */ (function(EventCategory2) {
@@ -24732,6 +24732,21 @@ var require_dist_Qnc3kuba = __commonJS({
24732
24732
  */
24733
24733
  autoEligible: zod.z.boolean().optional(),
24734
24734
  /**
24735
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
24736
+ * whose only sensible role is the low-bandwidth one, `high` for a main
24737
+ * stream. Consulted by the broker's automatic ranking
24738
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
24739
+ * an operator's manual assignment still wins, and an absent hint is the
24740
+ * pixel-ranked default every camera had before this field existed.
24741
+ *
24742
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
24743
+ * storage class is written for on its own (`recordings` is high|mid,
24744
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
24745
+ * camera's single 720p relay is a `low` in every respect except the slot the
24746
+ * heuristic put it in.
24747
+ */
24748
+ profileHint: CamProfileSchema.optional(),
24749
+ /**
24735
24750
  * Transport-specific opaque metadata. The broker passes it through to
24736
24751
  * the source reader without inspecting it. Currently used by
24737
24752
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -26214,7 +26229,22 @@ var require_dist_Qnc3kuba = __commonJS({
26214
26229
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
26215
26230
  * registrare.
26216
26231
  */
26217
- sensorDeviceIds: zod.z.array(zod.z.number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
26232
+ sensorDeviceIds: zod.z.array(zod.z.number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
26233
+ /**
26234
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
26235
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
26236
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
26237
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
26238
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
26239
+ *
26240
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
26241
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
26242
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
26243
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
26244
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
26245
+ * (`holdTrigger` / `releaseTrigger`).
26246
+ */
26247
+ deviceSignal: zod.z.boolean().optional()
26218
26248
  });
26219
26249
  var RecordingBandModeSchema = zod.z.enum(["continuous", "events"]);
26220
26250
  var RecordingBandTriggersSchema = RecordingTriggersSchema;
@@ -29337,6 +29367,8 @@ var require_dist_Qnc3kuba = __commonJS({
29337
29367
  label: zod.z.string().optional(),
29338
29368
  deviceFeatures: zod.z.array(zod.z.string()).optional(),
29339
29369
  autoEligible: zod.z.boolean().optional(),
29370
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
29371
+ profileHint: CamProfileSchema.optional(),
29340
29372
  metadata: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
29341
29373
  /** Required when kind === 'derived' — the source camStreamId the
29342
29374
  * derived broker reads its encoded plane from.
@@ -48375,6 +48407,50 @@ var require_dist_Qnc3kuba = __commonJS({
48375
48407
  })
48376
48408
  }
48377
48409
  };
48410
+ var RecordingSignalStatusSchema = zod.z.object({
48411
+ /** True while the device asks to be recorded. */
48412
+ active: zod.z.boolean(),
48413
+ /**
48414
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
48415
+ * …). Free text for the log line and the UI badge; the recorder never
48416
+ * branches on it.
48417
+ */
48418
+ reason: zod.z.string(),
48419
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
48420
+ lastChangedAt: zod.z.number()
48421
+ });
48422
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: zod.z.number() });
48423
+ var recordingSignalCapability = {
48424
+ name: "recording-signal",
48425
+ scope: "device",
48426
+ deviceNative: true,
48427
+ mode: "singleton",
48428
+ deviceTypes: [DeviceType.Camera],
48429
+ methods: {
48430
+ /** The current level, straight from the slice the provider keeps fresh. */
48431
+ getStatus: method(zod.z.object({ deviceId: zod.z.number() }), RecordingSignalStatusSchema)
48432
+ },
48433
+ status: {
48434
+ schema: RecordingSignalStatusSchema,
48435
+ kind: "push",
48436
+ empty: {
48437
+ active: false,
48438
+ reason: "unknown",
48439
+ lastChangedAt: 0
48440
+ }
48441
+ },
48442
+ runtimeState: RecordingSignalRuntimeStateSchema,
48443
+ /**
48444
+ * Runtime-state durability: **session** — a restored `active: true` from
48445
+ * before a restart is exactly the stale level the recorder's reconcile bound
48446
+ * exists to end, and the provider re-derives the true level on activation
48447
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
48448
+ *
48449
+ * See `RuntimeStateDurability`. Enforced by
48450
+ * `scripts/check-runtime-state-durability.ts`.
48451
+ */
48452
+ durability: "session"
48453
+ };
48378
48454
  var SceneConditionSchema = zod.z.string();
48379
48455
  var SceneUncoveredPolicySchema = zod.z.enum(["skip", "judge-anyway"]);
48380
48456
  var SceneVerdictSchema = zod.z.enum([
@@ -48742,6 +48818,8 @@ var require_dist_Qnc3kuba = __commonJS({
48742
48818
  deviceFeatures: zod.z.array(zod.z.string()).optional(),
48743
48819
  /** Eligible for automatic profile assignment. Absent = `true`. */
48744
48820
  autoEligible: zod.z.boolean().optional(),
48821
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
48822
+ profileHint: CamProfileSchema.optional(),
48745
48823
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
48746
48824
  metadata: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
48747
48825
  });
@@ -50995,6 +51073,7 @@ var require_dist_Qnc3kuba = __commonJS({
50995
51073
  "ptz",
50996
51074
  "ptz-autotrack",
50997
51075
  "recording",
51076
+ "recording-signal",
50998
51077
  "scene-monitor",
50999
51078
  "script-runner",
51000
51079
  "smoke",
@@ -51128,6 +51207,7 @@ var require_dist_Qnc3kuba = __commonJS({
51128
51207
  rebootCapability,
51129
51208
  recordingCapability,
51130
51209
  recordingExportCapability,
51210
+ recordingSignalCapability,
51131
51211
  sceneMonitorCapability,
51132
51212
  scriptRunnerCapability,
51133
51213
  serverManagementCapability,
@@ -55805,6 +55885,12 @@ var require_dist_Qnc3kuba = __commonJS({
55805
55885
  addonId: null,
55806
55886
  access: "view"
55807
55887
  },
55888
+ "recordingSignal.getStatus": {
55889
+ capName: "recording-signal",
55890
+ capScope: "device",
55891
+ addonId: null,
55892
+ access: "view"
55893
+ },
55808
55894
  "sceneMonitor.captureReference": {
55809
55895
  capName: "scene-monitor",
55810
55896
  capScope: "device",
@@ -58797,6 +58883,11 @@ var require_dist_Qnc3kuba = __commonJS({
58797
58883
  form: "single",
58798
58884
  optional: true
58799
58885
  }],
58886
+ "recordingSignal.getStatus": [{
58887
+ name: "deviceId",
58888
+ form: "single",
58889
+ optional: false
58890
+ }],
58800
58891
  "sceneMonitor.captureReference": [{
58801
58892
  name: "deviceId",
58802
58893
  form: "single",
@@ -59345,6 +59436,10 @@ var require_dist_Qnc3kuba = __commonJS({
59345
59436
  durability: "session",
59346
59437
  volatileFields: []
59347
59438
  },
59439
+ "recording-signal": {
59440
+ durability: "session",
59441
+ volatileFields: []
59442
+ },
59348
59443
  "scene-monitor": {
59349
59444
  durability: "session",
59350
59445
  volatileFields: []
@@ -60563,7 +60658,7 @@ var require_alerts_addon = __commonJS({
60563
60658
  [Symbol.toStringTag]: { value: "Module" }
60564
60659
  });
60565
60660
  require_chunk_Cek0wNdY();
60566
- var require_dist10 = require_dist_Qnc3kuba();
60661
+ var require_dist10 = require_dist_BNaW68aZ();
60567
60662
  function selectExpired(alerts, cutoffMs) {
60568
60663
  return alerts.filter((a) => a.createdAt < cutoffMs).sort((a, b) => a.createdAt - b.createdAt).map((a) => a.id);
60569
60664
  }
@@ -61382,7 +61477,7 @@ var require_console_logging = __commonJS({
61382
61477
  [Symbol.toStringTag]: { value: "Module" }
61383
61478
  });
61384
61479
  require_chunk_Cek0wNdY();
61385
- var require_dist10 = require_dist_Qnc3kuba();
61480
+ var require_dist10 = require_dist_BNaW68aZ();
61386
61481
  var require_formatter = require_formatter_DqAKDlvN();
61387
61482
  var LEVEL_RANK = {
61388
61483
  debug: 0,
@@ -61476,7 +61571,7 @@ var require_core_blocks_addon = __commonJS({
61476
61571
  "use strict";
61477
61572
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
61478
61573
  var require_chunk = require_chunk_Cek0wNdY();
61479
- var require_dist10 = require_dist_Qnc3kuba();
61574
+ var require_dist10 = require_dist_BNaW68aZ();
61480
61575
  var node_crypto = __require("crypto");
61481
61576
  var node_fs_promises = __require("fs/promises");
61482
61577
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -62373,11 +62468,11 @@ var require_core_blocks = __commonJS({
62373
62468
  }
62374
62469
  });
62375
62470
 
62376
- // ../system/dist/retired-settings-keys-C_h6HXZi.js
62377
- var require_retired_settings_keys_C_h6HXZi = __commonJS({
62378
- "../system/dist/retired-settings-keys-C_h6HXZi.js"(exports) {
62471
+ // ../system/dist/retired-settings-keys-FwgzdSHJ.js
62472
+ var require_retired_settings_keys_FwgzdSHJ = __commonJS({
62473
+ "../system/dist/retired-settings-keys-FwgzdSHJ.js"(exports) {
62379
62474
  "use strict";
62380
- var require_dist10 = require_dist_Qnc3kuba();
62475
+ var require_dist10 = require_dist_BNaW68aZ();
62381
62476
  function settingsStoreIsAuthoritativeHere(env) {
62382
62477
  const raw = (env["CAMSTACK_ROLE"] ?? "").trim().toLowerCase();
62383
62478
  return raw === "" || raw === "hub";
@@ -64591,8 +64686,8 @@ var require_device_manager_addon = __commonJS({
64591
64686
  [Symbol.toStringTag]: { value: "Module" }
64592
64687
  });
64593
64688
  require_chunk_Cek0wNdY();
64594
- var require_dist10 = require_dist_Qnc3kuba();
64595
- var require_retired_settings_keys = require_retired_settings_keys_C_h6HXZi();
64689
+ var require_dist10 = require_dist_BNaW68aZ();
64690
+ var require_retired_settings_keys = require_retired_settings_keys_FwgzdSHJ();
64596
64691
  var node_crypto = __require("crypto");
64597
64692
  var _camstack_types_node = require_node();
64598
64693
  var JOB_HISTORY = 20;
@@ -70107,7 +70202,7 @@ var require_hub_forwarder = __commonJS({
70107
70202
  [Symbol.toStringTag]: { value: "Module" }
70108
70203
  });
70109
70204
  require_chunk_Cek0wNdY();
70110
- var require_dist10 = require_dist_Qnc3kuba();
70205
+ var require_dist10 = require_dist_BNaW68aZ();
70111
70206
  var require_formatter = require_formatter_DqAKDlvN();
70112
70207
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
70113
70208
  var HubForwarderDestination = class {
@@ -70244,7 +70339,7 @@ var require_liveness_monitor_addon = __commonJS({
70244
70339
  "use strict";
70245
70340
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
70246
70341
  require_chunk_Cek0wNdY();
70247
- var require_dist10 = require_dist_Qnc3kuba();
70342
+ var require_dist10 = require_dist_BNaW68aZ();
70248
70343
  var NO_DEVICES = "liveness:no-devices";
70249
70344
  var ALL_OFFLINE = "liveness:all-devices-offline";
70250
70345
  var NO_FOOTAGE_PREFIX = "liveness:no-footage:";
@@ -70440,7 +70535,7 @@ var require_local_auth_addon = __commonJS({
70440
70535
  [Symbol.toStringTag]: { value: "Module" }
70441
70536
  });
70442
70537
  var require_chunk = require_chunk_Cek0wNdY();
70443
- var require_dist10 = require_dist_Qnc3kuba();
70538
+ var require_dist10 = require_dist_BNaW68aZ();
70444
70539
  var node_crypto = __require("crypto");
70445
70540
  node_crypto = require_chunk.__toESM(node_crypto);
70446
70541
  var crypto$1 = __require("crypto");
@@ -78253,7 +78348,7 @@ var require_loki_logging = __commonJS({
78253
78348
  [Symbol.toStringTag]: { value: "Module" }
78254
78349
  });
78255
78350
  require_chunk_Cek0wNdY();
78256
- var require_dist10 = require_dist_Qnc3kuba();
78351
+ var require_dist10 = require_dist_BNaW68aZ();
78257
78352
  function sanitizeLabelName(raw) {
78258
78353
  const replaced = raw.replaceAll(/[^a-zA-Z0-9_]/g, "_");
78259
78354
  return /^[a-zA-Z_]/.test(replaced) ? replaced : `_${replaced}`;
@@ -78818,7 +78913,7 @@ var require_native_metrics_addon = __commonJS({
78818
78913
  [Symbol.toStringTag]: { value: "Module" }
78819
78914
  });
78820
78915
  var require_chunk = require_chunk_Cek0wNdY();
78821
- var require_dist10 = require_dist_Qnc3kuba();
78916
+ var require_dist10 = require_dist_BNaW68aZ();
78822
78917
  var node_fs_promises = __require("fs/promises");
78823
78918
  var node_child_process = __require("child_process");
78824
78919
  var node_util = __require("util");
@@ -81402,7 +81497,7 @@ var require_filesystem_storage_addon = __commonJS({
81402
81497
  [Symbol.toStringTag]: { value: "Module" }
81403
81498
  });
81404
81499
  var require_chunk = require_chunk_Cek0wNdY();
81405
- var require_dist10 = require_dist_Qnc3kuba();
81500
+ var require_dist10 = require_dist_BNaW68aZ();
81406
81501
  var node_crypto = __require("crypto");
81407
81502
  var node_fs_promises = __require("fs/promises");
81408
81503
  var node_path = __require("path");
@@ -82518,8 +82613,8 @@ var require_sqlite_settings_addon = __commonJS({
82518
82613
  [Symbol.toStringTag]: { value: "Module" }
82519
82614
  });
82520
82615
  var require_chunk = require_chunk_Cek0wNdY();
82521
- var require_dist10 = require_dist_Qnc3kuba();
82522
- var require_retired_settings_keys = require_retired_settings_keys_C_h6HXZi();
82616
+ var require_dist10 = require_dist_BNaW68aZ();
82617
+ var require_retired_settings_keys = require_retired_settings_keys_FwgzdSHJ();
82523
82618
  var node_crypto = __require("crypto");
82524
82619
  var node_fs = __require("fs");
82525
82620
  var node_module = __require("module");
@@ -85009,7 +85104,7 @@ var require_storage_orchestrator_addon = __commonJS({
85009
85104
  [Symbol.toStringTag]: { value: "Module" }
85010
85105
  });
85011
85106
  var require_chunk = require_chunk_Cek0wNdY();
85012
- var require_dist10 = require_dist_Qnc3kuba();
85107
+ var require_dist10 = require_dist_BNaW68aZ();
85013
85108
  var require_hub_cap_forward = require_hub_cap_forward_DmHNjbB0();
85014
85109
  var zod = require_zod();
85015
85110
  var node_crypto = __require("crypto");
@@ -87960,7 +88055,7 @@ var require_system_config_addon = __commonJS({
87960
88055
  [Symbol.toStringTag]: { value: "Module" }
87961
88056
  });
87962
88057
  require_chunk_Cek0wNdY();
87963
- var require_dist10 = require_dist_Qnc3kuba();
88058
+ var require_dist10 = require_dist_BNaW68aZ();
87964
88059
  var SECTION_TITLES = {
87965
88060
  server: "Server",
87966
88061
  auth: "Authentication"
@@ -106021,7 +106116,7 @@ var require_winston_logging = __commonJS({
106021
106116
  [Symbol.toStringTag]: { value: "Module" }
106022
106117
  });
106023
106118
  var require_chunk = require_chunk_Cek0wNdY();
106024
- var require_dist10 = require_dist_Qnc3kuba();
106119
+ var require_dist10 = require_dist_BNaW68aZ();
106025
106120
  var require_formatter = require_formatter_DqAKDlvN();
106026
106121
  var node_path = __require("path");
106027
106122
  node_path = require_chunk.__toESM(node_path);
@@ -107965,9 +108060,9 @@ var require_event_category_b8kBSOTT = __commonJS({
107965
108060
  }
107966
108061
  });
107967
108062
 
107968
- // ../types/dist/sleep-QEBby1J6.js
107969
- var require_sleep_QEBby1J6 = __commonJS({
107970
- "../types/dist/sleep-QEBby1J6.js"(exports) {
108063
+ // ../types/dist/sleep-BGiOgxye.js
108064
+ var require_sleep_BGiOgxye = __commonJS({
108065
+ "../types/dist/sleep-BGiOgxye.js"(exports) {
107971
108066
  "use strict";
107972
108067
  var require_event_category = require_event_category_b8kBSOTT();
107973
108068
  var zod = require_zod();
@@ -109025,6 +109120,21 @@ var require_sleep_QEBby1J6 = __commonJS({
109025
109120
  */
109026
109121
  autoEligible: zod.z.boolean().optional(),
109027
109122
  /**
109123
+ * The profile slot the PUBLISHER says this stream is: `low` for a stream
109124
+ * whose only sensible role is the low-bandwidth one, `high` for a main
109125
+ * stream. Consulted by the broker's automatic ranking
109126
+ * (`rankInitialAssignment`) BEFORE the pixel-count heuristic, and only there:
109127
+ * an operator's manual assignment still wins, and an absent hint is the
109128
+ * pixel-ranked default every camera had before this field existed.
109129
+ *
109130
+ * Why it exists: a camera with ONE stream ranked to `mid` — the slot no
109131
+ * storage class is written for on its own (`recordings` is high|mid,
109132
+ * `recordingsLow` is low) and the one profile scrub does not read. The robot
109133
+ * camera's single 720p relay is a `low` in every respect except the slot the
109134
+ * heuristic put it in.
109135
+ */
109136
+ profileHint: CamProfileSchema.optional(),
109137
+ /**
109028
109138
  * Transport-specific opaque metadata. The broker passes it through to
109029
109139
  * the source reader without inspecting it. Currently used by
109030
109140
  * `pull-rfc4571` streams to carry the upstream SDP (so the reader can
@@ -110378,6 +110488,7 @@ var require_sleep_QEBby1J6 = __commonJS({
110378
110488
  pressureSensor: createSliceHandle(stateSource, binding.deviceId, "pressure-sensor"),
110379
110489
  privacyMask: createSliceHandle(stateSource, binding.deviceId, "privacy-mask"),
110380
110490
  ptzAutotrack: createSliceHandle(stateSource, binding.deviceId, "ptz-autotrack"),
110491
+ recordingSignal: createSliceHandle(stateSource, binding.deviceId, "recording-signal"),
110381
110492
  sceneMonitor: createSliceHandle(stateSource, binding.deviceId, "scene-monitor"),
110382
110493
  scriptRunner: createSliceHandle(stateSource, binding.deviceId, "script-runner"),
110383
110494
  smoke: createSliceHandle(stateSource, binding.deviceId, "smoke"),
@@ -110757,6 +110868,7 @@ var require_sleep_QEBby1J6 = __commonJS({
110757
110868
  setSettings: (input) => dispatch("ptz-autotrack", "ptzAutotrack", "setSettings", "mutation", input)
110758
110869
  },
110759
110870
  reboot: { reboot: (input) => dispatch("reboot", "reboot", "reboot", "mutation", input) },
110871
+ recordingSignal: { getStatus: (input) => dispatch("recording-signal", "recordingSignal", "getStatus", "query", input) },
110760
110872
  sceneMonitor: {
110761
110873
  listScenes: (input) => dispatch("scene-monitor", "sceneMonitor", "listScenes", "query", input),
110762
110874
  listScenesBatch: (input) => dispatch("scene-monitor", "sceneMonitor", "listScenesBatch", "query", input),
@@ -111681,7 +111793,7 @@ var require_addon = __commonJS({
111681
111793
  "use strict";
111682
111794
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
111683
111795
  var require_event_category = require_event_category_b8kBSOTT();
111684
- var require_sleep = require_sleep_QEBby1J6();
111796
+ var require_sleep = require_sleep_BGiOgxye();
111685
111797
  var require_err_msg = require_err_msg_COpsHMw2();
111686
111798
  var CAP_INPUT_DEFAULTS = Object.freeze({
111687
111799
  "addons": { "getLogs": { "limit": 100 } },
@@ -130641,7 +130753,7 @@ var require_dist3 = __commonJS({
130641
130753
  "use strict";
130642
130754
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
130643
130755
  var require_chunk = require_chunk_Cek0wNdY();
130644
- var require_dist10 = require_dist_Qnc3kuba();
130756
+ var require_dist10 = require_dist_BNaW68aZ();
130645
130757
  var require_builtins_alerts_alerts_addon = require_alerts_addon();
130646
130758
  require_alerts();
130647
130759
  var require_formatter = require_formatter_DqAKDlvN();
@@ -211758,7 +211870,7 @@ var require_dist4 = __commonJS({
211758
211870
  "use strict";
211759
211871
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
211760
211872
  var require_event_category = require_event_category_b8kBSOTT();
211761
- var require_sleep = require_sleep_QEBby1J6();
211873
+ var require_sleep = require_sleep_BGiOgxye();
211762
211874
  var require_canonical_hash = require_canonical_hash_DNV8S5ET();
211763
211875
  var require_enums2 = require_enums();
211764
211876
  var require_err_msg = require_err_msg_COpsHMw2();
@@ -213013,7 +213125,22 @@ var require_dist4 = __commonJS({
213013
213125
  * il livello: un contatto trovato già aperto al riavvio del runner non fa
213014
213126
  * registrare.
213015
213127
  */
213016
- sensorDeviceIds: zod.z.array(zod.z.number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional()
213128
+ sensorDeviceIds: zod.z.array(zod.z.number().int().positive()).min(1).max(16).refine(noDuplicates, { message: "sensorDeviceIds must not repeat a device" }).optional(),
213129
+ /**
213130
+ * La camera registra per tutta la durata del SEGNALE che lei stessa
213131
+ * pubblica — la cap `recording-signal` (`active: true` mentre il device è in
213132
+ * funzione: un robot che pulisce). È un LIVELLO, non un fronte: la finestra
213133
+ * resta aperta finché il segnale è alto e si chiude `postBufferSec` dopo la
213134
+ * caduta, così una pulizia di quaranta minuti è UNA clip.
213135
+ *
213136
+ * Non nomina un device: il segnale è della camera stessa, tenuto fresco dal
213137
+ * suo provider (D224); il recorder lo ascolta su `DeviceStateChanged` e lo
213138
+ * riconcilia leggendo la slice via RPC, con un tetto oltre il quale un
213139
+ * segnale mai abbassato (un evento perso) non può tenere aperta una
213140
+ * registrazione (D11). Vedi `recorder/addon/band-decision.ts`
213141
+ * (`holdTrigger` / `releaseTrigger`).
213142
+ */
213143
+ deviceSignal: zod.z.boolean().optional()
213017
213144
  });
213018
213145
  var RecordingBandModeSchema = zod.z.enum(["continuous", "events"]);
213019
213146
  var RecordingBandTriggersSchema = RecordingTriggersSchema;
@@ -217210,6 +217337,8 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
217210
217337
  label: zod.z.string().optional(),
217211
217338
  deviceFeatures: zod.z.array(zod.z.string()).optional(),
217212
217339
  autoEligible: zod.z.boolean().optional(),
217340
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
217341
+ profileHint: require_sleep.CamProfileSchema.optional(),
217213
217342
  metadata: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
217214
217343
  /** Required when kind === 'derived' — the source camStreamId the
217215
217344
  * derived broker reads its encoded plane from.
@@ -237490,6 +237619,50 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
237490
237619
  })
237491
237620
  }
237492
237621
  };
237622
+ var RecordingSignalStatusSchema = zod.z.object({
237623
+ /** True while the device asks to be recorded. */
237624
+ active: zod.z.boolean(),
237625
+ /**
237626
+ * Why, in the provider's own vocabulary (a vacuum's `cleaning` / `docked`,
237627
+ * …). Free text for the log line and the UI badge; the recorder never
237628
+ * branches on it.
237629
+ */
237630
+ reason: zod.z.string(),
237631
+ /** Ms epoch of the last `active` transition. 0 if never observed. */
237632
+ lastChangedAt: zod.z.number()
237633
+ });
237634
+ var RecordingSignalRuntimeStateSchema = RecordingSignalStatusSchema.extend({ lastFetchedAt: zod.z.number() });
237635
+ var recordingSignalCapability = {
237636
+ name: "recording-signal",
237637
+ scope: "device",
237638
+ deviceNative: true,
237639
+ mode: "singleton",
237640
+ deviceTypes: [require_sleep.DeviceType.Camera],
237641
+ methods: {
237642
+ /** The current level, straight from the slice the provider keeps fresh. */
237643
+ getStatus: require_sleep.method(zod.z.object({ deviceId: zod.z.number() }), RecordingSignalStatusSchema)
237644
+ },
237645
+ status: {
237646
+ schema: RecordingSignalStatusSchema,
237647
+ kind: "push",
237648
+ empty: {
237649
+ active: false,
237650
+ reason: "unknown",
237651
+ lastChangedAt: 0
237652
+ }
237653
+ },
237654
+ runtimeState: RecordingSignalRuntimeStateSchema,
237655
+ /**
237656
+ * Runtime-state durability: **session** — a restored `active: true` from
237657
+ * before a restart is exactly the stale level the recorder's reconcile bound
237658
+ * exists to end, and the provider re-derives the true level on activation
237659
+ * anyway. Nothing is lost by forgetting it; a lie is avoided.
237660
+ *
237661
+ * See `RuntimeStateDurability`. Enforced by
237662
+ * `scripts/check-runtime-state-durability.ts`.
237663
+ */
237664
+ durability: "session"
237665
+ };
237493
237666
  var SceneConditionSchema = zod.z.string();
237494
237667
  var SCENE_CONDITIONS = [
237495
237668
  "day",
@@ -237871,6 +238044,8 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
237871
238044
  deviceFeatures: zod.z.array(zod.z.string()).optional(),
237872
238045
  /** Eligible for automatic profile assignment. Absent = `true`. */
237873
238046
  autoEligible: zod.z.boolean().optional(),
238047
+ /** The slot the publisher says this stream IS — see `CameraStreamSchema.profileHint`. */
238048
+ profileHint: require_sleep.CamProfileSchema.optional(),
237874
238049
  /** Transport-specific opaque metadata (e.g. rfc4571 SDP). */
237875
238050
  metadata: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
237876
238051
  });
@@ -240154,6 +240329,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
240154
240329
  pressureSensor: pressureSensorCapability,
240155
240330
  privacyMask: privacyMaskCapability,
240156
240331
  ptzAutotrack: ptzAutotrackCapability,
240332
+ recordingSignal: recordingSignalCapability,
240157
240333
  sceneMonitor: sceneMonitorCapability,
240158
240334
  scriptRunner: scriptRunnerCapability,
240159
240335
  smoke: smokeCapability,
@@ -242638,6 +242814,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
242638
242814
  "ptz",
242639
242815
  "ptz-autotrack",
242640
242816
  "recording",
242817
+ "recording-signal",
242641
242818
  "scene-monitor",
242642
242819
  "script-runner",
242643
242820
  "smoke",
@@ -242771,6 +242948,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
242771
242948
  reboot: "reboot",
242772
242949
  recording: "recording",
242773
242950
  recordingExport: "recording-export",
242951
+ recordingSignal: "recording-signal",
242774
242952
  sceneMonitor: "scene-monitor",
242775
242953
  scriptRunner: "script-runner",
242776
242954
  serverManagement: "server-management",
@@ -243278,6 +243456,10 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
243278
243456
  key: "recordingExport",
243279
243457
  name: "recording-export"
243280
243458
  },
243459
+ {
243460
+ key: "recordingSignal",
243461
+ name: "recording-signal"
243462
+ },
243281
243463
  {
243282
243464
  key: "sceneMonitor",
243283
243465
  name: "scene-monitor"
@@ -243545,6 +243727,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
243545
243727
  rebootCapability,
243546
243728
  recordingCapability,
243547
243729
  recordingExportCapability,
243730
+ recordingSignalCapability,
243548
243731
  sceneMonitorCapability,
243549
243732
  scriptRunnerCapability,
243550
243733
  serverManagementCapability,
@@ -248222,6 +248405,12 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
248222
248405
  addonId: null,
248223
248406
  access: "view"
248224
248407
  },
248408
+ "recordingSignal.getStatus": {
248409
+ capName: "recording-signal",
248410
+ capScope: "device",
248411
+ addonId: null,
248412
+ access: "view"
248413
+ },
248225
248414
  "sceneMonitor.captureReference": {
248226
248415
  capName: "scene-monitor",
248227
248416
  capScope: "device",
@@ -249795,6 +249984,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
249795
249984
  "reboot",
249796
249985
  "recording",
249797
249986
  "recording-export",
249987
+ "recording-signal",
249798
249988
  "scene-monitor",
249799
249989
  "script-runner",
249800
249990
  "server-management",
@@ -249869,6 +250059,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
249869
250059
  "ptz",
249870
250060
  "ptz-autotrack",
249871
250061
  "reboot",
250062
+ "recording-signal",
249872
250063
  "scene-monitor",
249873
250064
  "script-runner",
249874
250065
  "snapshot",
@@ -251474,6 +251665,11 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
251474
251665
  form: "single",
251475
251666
  optional: true
251476
251667
  }],
251668
+ "recordingSignal.getStatus": [{
251669
+ name: "deviceId",
251670
+ form: "single",
251671
+ optional: false
251672
+ }],
251477
251673
  "sceneMonitor.captureReference": [{
251478
251674
  name: "deviceId",
251479
251675
  form: "single",
@@ -252172,6 +252368,10 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
252172
252368
  durability: "session",
252173
252369
  volatileFields: []
252174
252370
  },
252371
+ "recording-signal": {
252372
+ durability: "session",
252373
+ volatileFields: []
252374
+ },
252175
252375
  "scene-monitor": {
252176
252376
  durability: "session",
252177
252377
  volatileFields: []
@@ -256430,6 +256630,8 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
256430
256630
  exports.RecordingRebalanceSkipReasonSchema = RecordingRebalanceSkipReasonSchema;
256431
256631
  exports.RecordingRebalanceSkipSchema = RecordingRebalanceSkipSchema;
256432
256632
  exports.RecordingRetentionSchema = RecordingRetentionSchema;
256633
+ exports.RecordingSignalRuntimeStateSchema = RecordingSignalRuntimeStateSchema;
256634
+ exports.RecordingSignalStatusSchema = RecordingSignalStatusSchema;
256433
256635
  exports.RecordingStatusSchema = RecordingStatusSchema;
256434
256636
  exports.RecordingStorageModeSchema = RecordingStorageModeSchema;
256435
256637
  exports.RecordingStorageUsageSchema = RecordingStorageUsageSchema;
@@ -257033,6 +257235,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
257033
257235
  exports.rebootCapability = rebootCapability;
257034
257236
  exports.recordingCapability = recordingCapability;
257035
257237
  exports.recordingExportCapability = recordingExportCapability;
257238
+ exports.recordingSignalCapability = recordingSignalCapability;
257036
257239
  exports.rectsToCells = rectsToCells;
257037
257240
  exports.reducePoints = reducePoints;
257038
257241
  exports.requiresPython = requiresPython;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstack",
3
- "version": "1.2.104",
3
+ "version": "1.2.105",
4
4
  "description": "CLI tool for managing and running CamStack server",
5
5
  "keywords": [
6
6
  "camstack",