@camstack/addon-pipeline 1.2.227 → 1.2.229

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.
Files changed (39) hide show
  1. package/dist/audio-analyzer/index.js +2 -2
  2. package/dist/audio-analyzer/index.mjs +2 -2
  3. package/dist/{default-detection-model-C1etqCJk.js → default-detection-model-C7fsHtHQ.js} +1 -1
  4. package/dist/{default-detection-model-CNwum1uC.mjs → default-detection-model-DC4yVaFM.mjs} +1 -1
  5. package/dist/detection-pipeline/index.js +4 -4
  6. package/dist/detection-pipeline/index.mjs +4 -4
  7. package/dist/{dist-d1K9t4mU.mjs → dist-DTPYOq7J.mjs} +440 -19
  8. package/dist/{dist-BGdDektN.js → dist-p5lZW8pr.js} +445 -18
  9. package/dist/motion-wasm/index.js +1 -1
  10. package/dist/motion-wasm/index.mjs +1 -1
  11. package/dist/{node-CQ5yofm2.js → node-CGVUk5S9.js} +1 -1
  12. package/dist/{node-CpckZhmU.mjs → node-Cz92fVGW.mjs} +1 -1
  13. package/dist/pipeline-runner/index.js +4 -4
  14. package/dist/pipeline-runner/index.mjs +4 -4
  15. package/dist/{process-memory-iUDS4M_G.mjs → process-memory-BwijtYhM.mjs} +1 -1
  16. package/dist/{process-memory-D2NCFwt_.js → process-memory-COypUeEc.js} +1 -1
  17. package/dist/recorder/index.js +4 -3
  18. package/dist/recorder/index.mjs +4 -3
  19. package/dist/{restream-intent-B1Difcnq.js → restream-intent-C4adO0P8.js} +5 -0
  20. package/dist/{restream-intent-DWe2kInY.mjs → restream-intent-MeJhGCK9.mjs} +5 -0
  21. package/dist/{segment-demux-js-Dk_Pvocs.js → segment-demux-js-B-yzHYVc.js} +1 -1
  22. package/dist/{segment-demux-js-iVyZ1H9j.mjs → segment-demux-js-CyaNDtrw.mjs} +1 -1
  23. package/dist/stream-broker/_stub.js +2 -2
  24. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-7qCmXLC3.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-B9KO-igY.mjs} +3 -3
  25. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Bc-sSkWV.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-mnvO611B.mjs} +1 -1
  26. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CUMGe_Dp.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-JoG-yDpV.mjs} +1 -1
  27. package/dist/stream-broker/demux-worker-child.js +1 -1
  28. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  29. package/dist/stream-broker/{hostInit-D6wBZr7_.mjs → hostInit-CDwsQyIR.mjs} +3 -3
  30. package/dist/stream-broker/index.js +1357 -53
  31. package/dist/stream-broker/index.mjs +1357 -53
  32. package/dist/stream-broker/remoteEntry.js +1 -1
  33. package/package.json +1 -1
  34. package/python/__pycache__/inference_pool.cpython-314.pyc +0 -0
  35. package/python/__pycache__/test_inference_pool_layout.cpython-314.pyc +0 -0
  36. package/python/__pycache__/test_inference_pool_ov_requests.cpython-314.pyc +0 -0
  37. package/python/__pycache__/test_inference_pool_preprocess.cpython-314.pyc +0 -0
  38. package/python/inference_pool.py +39 -9
  39. package/python/test_inference_pool_ov_requests.py +79 -0
@@ -1,5 +1,5 @@
1
1
  let node_crypto = require("node:crypto");
2
- //#region ../types/dist/event-category-ZyX6jcse.mjs
2
+ //#region ../types/dist/event-category-BVDXG4tB.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -616,6 +616,20 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
616
616
  * pull-reconcile from the provider's `getStatus` on reconnect. */
617
617
  EventCategory["MeshNetworkChanged"] = "network.mesh.changed";
618
618
  EventCategory["BackupCompleted"] = "backup.completed";
619
+ /**
620
+ * A whole backup RUN finished — every destination attempted, win or lose.
621
+ *
622
+ * `backup.completed` fires once per DESTINATION, which is the right grain for
623
+ * a progress UI and the wrong one for a notification: an operator with three
624
+ * destinations would be told three times. And a run where two of three
625
+ * destinations succeeded is not a clean success — a single "backup
626
+ * completed" that hid the failed one would be a lie, so the count of each is
627
+ * carried here and the message says both.
628
+ *
629
+ * Emitted by the backup orchestrator only after the destination loop, so a
630
+ * run that dies during the BUILD phase produces no completion at all.
631
+ */
632
+ EventCategory["BackupRunCompleted"] = "backup.run-completed";
619
633
  EventCategory["BackupRestored"] = "backup.restored";
620
634
  EventCategory["NotificationDispatched"] = "notification.dispatched";
621
635
  EventCategory["NotificationFailed"] = "notification.failed";
@@ -5346,7 +5360,7 @@ var ZodIssueCode = {
5346
5360
  var ZodFirstPartyTypeKind;
5347
5361
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5348
5362
  //#endregion
5349
- //#region ../types/dist/sleep-CnLyvg3w.mjs
5363
+ //#region ../types/dist/sleep-DEuj7E3j.mjs
5350
5364
  /**
5351
5365
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5352
5366
  * window to float samples (D455).
@@ -7541,7 +7555,7 @@ function sleep(ms) {
7541
7555
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
7542
7556
  }
7543
7557
  //#endregion
7544
- //#region ../types/dist/canonical-hash-rO1sRmEK.mjs
7558
+ //#region ../types/dist/canonical-hash-Ch5bSjFG.mjs
7545
7559
  var AUDIO_ENCODER_BY_CODEC = {
7546
7560
  opus: "libopus",
7547
7561
  aac: "aac",
@@ -7644,6 +7658,7 @@ function buildVideoArgs(video, outputArgs) {
7644
7658
  ];
7645
7659
  if (video.preset !== void 0) args.push("-preset", video.preset);
7646
7660
  if (video.tune !== void 0) args.push("-tune", video.tune);
7661
+ if (video.singleSlicePerFrame === true && video.encoder === "libx264") args.push("-x264-params", "sliced-threads=0");
7647
7662
  if (video.profile !== void 0) args.push("-profile:v", video.profile);
7648
7663
  if (video.level !== void 0) args.push("-level", video.level);
7649
7664
  if (video.pixelFormat !== void 0) args.push("-pix_fmt", video.pixelFormat);
@@ -7918,6 +7933,7 @@ function invocationFromEncodeProfile(input) {
7918
7933
  scale,
7919
7934
  ...v.preset !== void 0 ? { preset: v.preset } : {},
7920
7935
  ...v.tune !== void 0 ? { tune: v.tune } : {},
7936
+ ...v.singleSlicePerFrame !== void 0 ? { singleSlicePerFrame: v.singleSlicePerFrame } : {},
7921
7937
  ...v.profile !== void 0 ? { profile: v.profile } : {},
7922
7938
  ...v.level !== void 0 ? { level: v.level } : {},
7923
7939
  ...input.pixelFormat !== void 0 ? { pixelFormat: input.pixelFormat } : {},
@@ -8233,7 +8249,23 @@ var EncodeProfileSchema = object({
8233
8249
  "zerolatency",
8234
8250
  "film",
8235
8251
  "animation"
8236
- ]).optional()
8252
+ ]).optional(),
8253
+ /**
8254
+ * ONE slice per access unit.
8255
+ *
8256
+ * `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
8257
+ * the encoder as five NAL slices that share one RTP timestamp and carry one
8258
+ * marker bit. A libwebrtc depacketiser sees five frame-starts and one
8259
+ * frame-end per frame: the first pictures render and the video then freezes
8260
+ * for good while the audio, on its own plane, plays on. Measured on this hub
8261
+ * 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
8262
+ *
8263
+ * A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
8264
+ * `outputArgs` on purpose: an opaque array is part of the sharing key, so two
8265
+ * consumers meaning the same thing spelled differently would stop sharing one
8266
+ * child. Absent means "whatever the encoder does" — today's behaviour.
8267
+ */
8268
+ singleSlicePerFrame: boolean().optional()
8237
8269
  }),
8238
8270
  audio: union([literal("passthrough"), object({
8239
8271
  codec: _enum([
@@ -8262,6 +8294,82 @@ var EncodeProfileSchema = object({
8262
8294
  outputArgs: array(string()).optional()
8263
8295
  });
8264
8296
  /**
8297
+ * THE target rule: which of two sizes serves a consumer better.
8298
+ *
8299
+ * "Prefer at or above the target so the consumer downscales instead of
8300
+ * upscaling; among those the SMALLEST, because the extra pixels are thrown
8301
+ * away and the decode is not; among the rest the LARGEST, because it is the
8302
+ * closest we can get." One sentence, and until now it was written twice — once
8303
+ * here in lines, once in `stream-selection.ts` in pixels, for the same two
8304
+ * exporters. The two agreed, which is luck, not a property.
8305
+ *
8306
+ * The `size` is whatever measure the caller ranks by: the cap ranks by LINES
8307
+ * (a consumer's requirement is stated in p), the RTSP picker by PIXELS (it
8308
+ * compares entries of possibly different aspect). The rule is the same either
8309
+ * way and the measure is the caller's business.
8310
+ *
8311
+ * Returns a sort delta: negative when `a` should come first.
8312
+ */
8313
+ function compareToTarget(a, b, target) {
8314
+ const aReaches = a >= target;
8315
+ if (aReaches !== b >= target) return aReaches ? -1 : 1;
8316
+ return aReaches ? a - b : b - a;
8317
+ }
8318
+ /** `h265` and `hevc` are one codec spelled two ways, and a camera publishes
8319
+ * whichever its vendor felt like. */
8320
+ function canonicalCodec(value) {
8321
+ const v = value.toLowerCase().replace(/[.\s-]/g, "");
8322
+ if (v === "hevc" || v === "hvc1" || v === "hev1") return "h265";
8323
+ if (v === "avc" || v === "avc1") return "h264";
8324
+ return v;
8325
+ }
8326
+ function codecIsAccepted(codec, accept) {
8327
+ if (accept.length === 0) return true;
8328
+ if (codec === void 0) return false;
8329
+ const c = canonicalCodec(codec);
8330
+ return accept.some((a) => canonicalCodec(a) === c);
8331
+ }
8332
+ function providerRank(camStreamId, preferred) {
8333
+ for (let i = 0; i < preferred.length; i += 1) if (camStreamId.startsWith(preferred[i])) return i;
8334
+ return preferred.length;
8335
+ }
8336
+ /**
8337
+ * Order the candidates and return the winner, or `null` when none qualifies.
8338
+ *
8339
+ * The order, and every term is there for a measured reason:
8340
+ *
8341
+ * 1. **A stream we can take AS IS beats one we must re-encode.** A transcode
8342
+ * is a decode plus an encode for as long as the session lasts, and on this
8343
+ * hub a concurrent HEVC decode is what exhausted the VAAPI device.
8344
+ * 2. **Provider preference**, unchanged — a native dial beats a relayed one.
8345
+ * 3. **The target**, when the consumer named one: the smallest stream that
8346
+ * reaches it, else the tallest that does not. Absent, the caller's
8347
+ * `resolutionPreference` decides, exactly as before.
8348
+ */
8349
+ function rankStreams(candidates, ranking) {
8350
+ const usable = candidates.filter((c) => ranking.allowTranscode || codecIsAccepted(c.codec, ranking.acceptCodecs));
8351
+ if (usable.length === 0) return null;
8352
+ const target = ranking.targetHeight;
8353
+ const scored = usable.map((candidate) => ({
8354
+ candidate,
8355
+ transcodes: !codecIsAccepted(candidate.codec, ranking.acceptCodecs),
8356
+ provider: providerRank(candidate.camStreamId, ranking.preferredProviders),
8357
+ height: candidate.height ?? 0
8358
+ }));
8359
+ scored.sort((a, b) => {
8360
+ if (a.transcodes !== b.transcodes) return a.transcodes ? 1 : -1;
8361
+ if (a.provider !== b.provider) return a.provider - b.provider;
8362
+ if (target !== void 0) return compareToTarget(a.height, b.height, target);
8363
+ return ranking.resolutionPreference === "highest" ? b.height - a.height : a.height - b.height;
8364
+ });
8365
+ const winner = scored[0];
8366
+ if (winner === void 0) return null;
8367
+ return {
8368
+ candidate: winner.candidate,
8369
+ transcodes: winner.transcodes
8370
+ };
8371
+ }
8372
+ /**
8265
8373
  * The shape every live egress starts from: H.264 Baseline 3.1 at 720p25.
8266
8374
  * Baseline because it is the one profile every consumer in this repo decodes
8267
8375
  * (Echo, iOS, an old browser); 3.1 because that is what the SDPs advertise.
@@ -8283,7 +8391,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
8283
8391
  audio: "passthrough"
8284
8392
  };
8285
8393
  ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
8286
- ({ ...BASE_LIVE_EGRESS_PROFILE });
8394
+ ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
8287
8395
  /** VBV window for a consumer whose budget is enforced per second (HomeKit). */
8288
8396
  var RATE_CONTROL_TIGHT = {
8289
8397
  kind: "cbr",
@@ -8392,7 +8500,8 @@ function canonicalVideo(video) {
8392
8500
  gopFrames: video.gopFrames ?? -1,
8393
8501
  bf: video.bf ?? -1,
8394
8502
  preset: video.preset ?? UNSET,
8395
- tune: video.tune ?? UNSET
8503
+ tune: video.tune ?? UNSET,
8504
+ singleSlicePerFrame: video.singleSlicePerFrame === void 0 ? UNSET : String(video.singleSlicePerFrame)
8396
8505
  };
8397
8506
  }
8398
8507
  function canonicalAudio(audio) {
@@ -13271,6 +13380,58 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
13271
13380
  auth: "admin"
13272
13381
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
13273
13382
  DeviceType.Camera;
13383
+ /**
13384
+ * The signals a device can emit to WAKE its own stream.
13385
+ *
13386
+ * A camera whose stream is built on demand sleeps until something asks for it,
13387
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
13388
+ * puller holds a session open for ever, and treating that as demand would keep
13389
+ * a battery camera awake for ever, which is the whole thing the battery is for
13390
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
13391
+ * itself, with no stream running.
13392
+ *
13393
+ * ## The vocabulary is the PROVIDER'S, not ours
13394
+ *
13395
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
13396
+ * names each signal with a `code` it chooses and a `label` an operator reads.
13397
+ * Reolink offers motion and camera-native detection; another provider may offer
13398
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
13399
+ * yet. A fixed enum here would mean every new signal is a framework release.
13400
+ *
13401
+ * It is deliberately NOT derived from the caps a device already binds. Whether
13402
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
13403
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
13404
+ * binding — but both answer "what drives the detection pipeline", which is a
13405
+ * different question from "what may wake a sleeping stream". A camera can do
13406
+ * the first and not be trusted with the second, and the operator picks per
13407
+ * camera. Two questions, two authorities.
13408
+ *
13409
+ * ## Availability is not permission
13410
+ *
13411
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
13412
+ * wakes the stream is the operator's per-camera choice, held by the broker
13413
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
13414
+ * provider declaring a signal is not a provider enabling it.
13415
+ */
13416
+ /** One signal a device can emit. */
13417
+ var StreamSignalSchema = object({
13418
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
13419
+ code: string().min(1),
13420
+ /** What an operator reads in the picker. The provider's own wording. */
13421
+ label: string().min(1),
13422
+ /**
13423
+ * Whether the provider recommends this signal ON when a camera is first set
13424
+ * up. A provider knows which of its signals are cheap and reliable; an
13425
+ * operator should not have to discover that by trial. Reolink recommends
13426
+ * both of its own.
13427
+ */
13428
+ recommended: boolean()
13429
+ });
13430
+ object({
13431
+ signals: array(StreamSignalSchema),
13432
+ lastFetchedAt: number()
13433
+ });
13434
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
13274
13435
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
13275
13436
  var StreamFormatSchema = _enum([
13276
13437
  "webrtc",
@@ -13672,6 +13833,46 @@ var streamBrokerCapability = {
13672
13833
  mode: "singleton",
13673
13834
  exposesDeviceSettings: true,
13674
13835
  methods: {
13836
+ /**
13837
+ * A device reporting that one of ITS OWN signals just fired.
13838
+ *
13839
+ * The provider calls this; nothing polls. The broker then decides whether
13840
+ * to wake the source, and the decision has two terms that must BOTH hold:
13841
+ *
13842
+ * - the signal is ENABLED for this camera (the operator's per-camera
13843
+ * choice — a camera may declare a signal the operator does not want
13844
+ * waking anything), and
13845
+ * - a consumer is actually attached and waiting on the prestream. Waking
13846
+ * a camera nobody is watching is the one thing a battery camera must
13847
+ * never do, and a signal arriving with no consumer is exactly that.
13848
+ *
13849
+ * Reported, never inferred: a signal that fires while the stream is
13850
+ * already up refreshes the hold instead of starting a second one, which is
13851
+ * what makes continuous motion keep a camera awake without stacking
13852
+ * timers.
13853
+ *
13854
+ * `code` is the provider's own, from `streamSignals.listSignals`. An
13855
+ * unknown code is REFUSED rather than treated as a wildcard wake — a
13856
+ * provider and an operator disagreeing about a name must not become a
13857
+ * camera that wakes for everything.
13858
+ */
13859
+ reportStreamSignal: method(object({
13860
+ deviceId: number().int().nonnegative(),
13861
+ /** The provider's signal code. */
13862
+ code: string().min(1),
13863
+ /** Ms epoch. Absent ⇒ now. */
13864
+ at: number().optional()
13865
+ }), object({
13866
+ /** Whether the broker acted on it, and if not, why. */
13867
+ accepted: boolean(),
13868
+ reason: _enum([
13869
+ "woke",
13870
+ "hold-extended",
13871
+ "not-enabled",
13872
+ "no-consumer",
13873
+ "unknown-code"
13874
+ ])
13875
+ }), { kind: "mutation" }),
13675
13876
  publishCameraStream: method(object({
13676
13877
  deviceId: number().int().nonnegative(),
13677
13878
  camStreamId: string().min(1),
@@ -14149,6 +14350,16 @@ var PickStreamRequirementsSchema = object({
14149
14350
  acceptCodecs: array(StreamCodecSchema).readonly().optional(),
14150
14351
  /** Minimum vertical resolution. Streams shorter than this are dropped. */
14151
14352
  minHeight: number().int().positive().optional(),
14353
+ /**
14354
+ * Maximum vertical resolution. Streams TALLER than this are dropped.
14355
+ *
14356
+ * A consumer can have a ceiling as real as its floor: Alexa documents
14357
+ * 480p to 1080p, and a 4K stream is as unusable to an Echo as a 360p one.
14358
+ * Without this the ceiling had to be re-implemented by every caller — and
14359
+ * one caller implementing it privately is how a second scoring authority
14360
+ * gets born.
14361
+ */
14362
+ maxHeight: number().int().positive().optional(),
14152
14363
  /** Minimum horizontal resolution. */
14153
14364
  minWidth: number().int().positive().optional(),
14154
14365
  /**
@@ -14165,7 +14376,22 @@ var PickStreamRequirementsSchema = object({
14165
14376
  * transcoded" guard: if the device is already serving the consumer's
14166
14377
  * codec end-to-end, there's nothing to optimise.
14167
14378
  */
14168
- requireSiblingCodec: array(StreamCodecSchema).readonly().optional()
14379
+ requireSiblingCodec: array(StreamCodecSchema).readonly().optional(),
14380
+ /**
14381
+ * Whether a stream the consumer CANNOT decode may still be picked, on the
14382
+ * understanding that it will be transcoded.
14383
+ *
14384
+ * Default `false` — today's behaviour, and the right one for a bypass
14385
+ * question ("is there a stream I can forward untouched?"). Set `true` to
14386
+ * ask the larger question: "what is the best stream for me, transcoding if
14387
+ * I must?" A stream that satisfies `acceptCodecs` always outranks one that
14388
+ * does not, so a passthrough is never lost to a transcode; the answer says
14389
+ * which it is in {@link PickedCamStreamSchema.transcodes}.
14390
+ *
14391
+ * This is what lets one picker serve both the bypass and the full source
14392
+ * choice, instead of a consumer scoring privately when the bypass misses.
14393
+ */
14394
+ allowTranscode: boolean().optional()
14169
14395
  }).readonly();
14170
14396
  var PickStreamPreferencesSchema = object({
14171
14397
  /**
@@ -14179,12 +14405,32 @@ var PickStreamPreferencesSchema = object({
14179
14405
  * picks the tallest stream; `'lowest'` picks the shortest (used by
14180
14406
  * memory-constrained consumers / Apple Home guest sessions).
14181
14407
  */
14182
- resolutionPreference: _enum(["highest", "lowest"]).optional()
14408
+ resolutionPreference: _enum(["highest", "lowest"]).optional(),
14409
+ /**
14410
+ * The height the consumer actually wants to DELIVER.
14411
+ *
14412
+ * Not a constraint — an ordering. With it set, the SMALLEST stream at or
14413
+ * above the target wins, and only if nothing reaches it does the tallest
14414
+ * take over. Pulling 1296 lines to draw 720 on a 1280x800 Echo panel costs
14415
+ * a decode and buys nothing, and `resolutionPreference: 'highest'` cannot
14416
+ * express that: it says "as big as possible", which is a different wish.
14417
+ *
14418
+ * Ignored when absent, so every existing caller keeps its ordering.
14419
+ */
14420
+ targetHeight: number().int().positive().optional()
14183
14421
  }).readonly();
14184
14422
  var PickedCamStreamSchema = object({
14185
14423
  camStreamId: string(),
14186
14424
  codec: string().optional(),
14187
14425
  resolution: CamStreamResolutionSchema.optional(),
14426
+ /**
14427
+ * Whether serving this stream requires a decode + re-encode.
14428
+ *
14429
+ * `false` is a stream the consumer can take as it stands. Only ever `true`
14430
+ * when the caller asked for it with `allowTranscode`, so a caller that did
14431
+ * not ask cannot be handed a cost it never agreed to pay.
14432
+ */
14433
+ transcodes: boolean(),
14188
14434
  /** One-line explanation of why this stream won — for logs / debug UI. */
14189
14435
  reason: string()
14190
14436
  });
@@ -18925,6 +19171,8 @@ var NcSystemEventKindSchema = _enum([
18925
19171
  "device-enabled",
18926
19172
  "device-battery-low",
18927
19173
  "device-battery-normal",
19174
+ "device-consumable-low",
19175
+ "device-consumable-normal",
18928
19176
  "stream-online",
18929
19177
  "stream-offline",
18930
19178
  "node-online",
@@ -18943,6 +19191,7 @@ var NcSystemEventKindSchema = _enum([
18943
19191
  "addon-updated",
18944
19192
  "server-updated",
18945
19193
  "export-completed",
19194
+ "backup-completed",
18946
19195
  "camera-online",
18947
19196
  "camera-offline",
18948
19197
  "camera-disabled",
@@ -22523,13 +22772,109 @@ var SummariesQueryInput = object({
22523
22772
  deviceIds: array(number()).min(1),
22524
22773
  since: number().optional(),
22525
22774
  until: number().optional(),
22526
- limit: number().int().min(1).max(200).default(50)
22775
+ limit: number().int().min(1).max(200).default(50),
22776
+ /** The same member-wise filter {@link listRecentSummaries} takes — one
22777
+ * meaning of "dog" on every summary surface. */
22778
+ classes: array(string().min(1).max(60)).max(40).optional()
22527
22779
  });
22528
- var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
22529
22780
  var SummaryDetailSchema = object({
22530
22781
  summary: SummarySchema,
22531
- /** Member track ids, in absorption order. */
22532
- trackIds: array(string()).readonly()
22782
+ /** Members in absorption order, oldest join first. */
22783
+ members: array(object({
22784
+ trackId: string(),
22785
+ /**
22786
+ * The track's class at the time it JOINED, or `null` when it was unresolved
22787
+ * and the track no longer exists to fill it.
22788
+ *
22789
+ * The join, not the latest opinion: class voting can re-decide a track's
22790
+ * class afterwards, and a group's composition is the history of who came
22791
+ * together. A consumer counts these to badge a thumbnail — "two people and a
22792
+ * dog" — rather than being handed a second, denormalised tally that would
22793
+ * drift from the members it claims to describe.
22794
+ */
22795
+ className: string().nullable(),
22796
+ /** `primary` is the one member that carries the group's identity. */
22797
+ role: _enum([
22798
+ "primary",
22799
+ "sibling",
22800
+ "child"
22801
+ ]).nullable(),
22802
+ joinedAt: number(),
22803
+ /** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
22804
+ * at read time. Absent when nothing resolved, never an empty string. */
22805
+ label: string().optional(),
22806
+ /** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
22807
+ * recognised nobody, and absent for a member whose track has been pruned —
22808
+ * a thumbnail that names the wrong person is worse than one naming nobody. */
22809
+ subLabel: string().optional()
22810
+ })).readonly()
22811
+ });
22812
+ /**
22813
+ * What a LIST of groups carries: the envelope plus what it is MADE OF.
22814
+ *
22815
+ * Coarse on purpose — the operator's rule is "only the rough data on the list,
22816
+ * we extend when we notice we need more". Enough to draw the card ("two people
22817
+ * and a dog") and no more. The MEMBERS, their names and the per-member links
22818
+ * are on {@link getSummary}: shipping every member of every group so a client
22819
+ * can count them turns a page of two hundred groups into a thousand records to
22820
+ * draw two hundred badges.
22821
+ */
22822
+ var SummaryListItemSchema = object({
22823
+ summary: SummarySchema,
22824
+ /** Class counts, most numerous first; `className: null` is a member whose
22825
+ * class never resolved, counted so the counts add up to `memberCount`. */
22826
+ classes: array(object({
22827
+ className: string().nullable(),
22828
+ count: number().int().positive()
22829
+ })).readonly()
22830
+ });
22831
+ var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
22832
+ /**
22833
+ * The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
22834
+ *
22835
+ * The reel on the cameras page and the Events gallery both ride a cursor, so a
22836
+ * summaries feed that could only answer "the last N for these cameras"
22837
+ * (`listSummaries`) would make groups available in the timeline and nowhere
22838
+ * else. Two feeds with different ordering contracts would be two ideas of what
22839
+ * "newest" means, on one screen.
22840
+ */
22841
+ var RecentSummariesQueryInput = object({
22842
+ /** Devices to merge. An empty array yields an empty page. */
22843
+ deviceIds: array(number()),
22844
+ /** Window lower bound on `lastActiveAt` (inclusive). */
22845
+ since: number().optional(),
22846
+ /** Window upper bound on `lastActiveAt` (inclusive). */
22847
+ until: number().optional(),
22848
+ limit: number().int().min(1).max(500).default(100),
22849
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
22850
+ cursor: string().optional(),
22851
+ /**
22852
+ * Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
22853
+ * deliberately the same name: the events filter tree emits one list of ticked
22854
+ * taxonomy nodes, and a summaries feed that called it something else would
22855
+ * make the operator's one filter component produce two shapes.
22856
+ *
22857
+ * A question about the MEMBERS: a group matches when ANY of them does. "Show
22858
+ * me the arrivals with a dog" has to return the group of four people who had
22859
+ * one with them; a filter on the group's own fields could only ever answer
22860
+ * about its primary.
22861
+ *
22862
+ * Matched against all THREE tiers of a member — the class (`animal`), the
22863
+ * sub-class (`dog`) and the instance (a name, a plate) — because which tier a
22864
+ * ticked node lives on is the taxonomy's business, not the caller's. `dog` is
22865
+ * an event kind in the tree and a tier-1 label on an `animal` track; a filter
22866
+ * that read only the class would answer "animal" and never "dog".
22867
+ *
22868
+ * ABSENT or EMPTY means no filter — absent is not a selection of none.
22869
+ */
22870
+ classes: array(string().min(1).max(60)).max(40).optional()
22871
+ });
22872
+ var RecentSummariesPageSchema = object({
22873
+ /** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
22874
+ * {@link listSummaries} — one list shape, so a card renders the same
22875
+ * whichever feed drew it. */
22876
+ summaries: array(SummaryListItemSchema).readonly(),
22877
+ nextCursor: string().nullable()
22533
22878
  });
22534
22879
  var RecentTracksPageSchema = object({
22535
22880
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -22943,7 +23288,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22943
23288
  classes: array(string()).optional(),
22944
23289
  /** See {@link ExcludeSourcesDoc}. */
22945
23290
  excludeSources: array(TrackSourceSchema).optional()
22946
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
23291
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
22947
23292
  kind: "mutation",
22948
23293
  auth: "admin"
22949
23294
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -26566,10 +26911,28 @@ var webrtcSessionCapability = {
26566
26911
  getSessionState: method(object({
26567
26912
  deviceId: number().int().nonnegative(),
26568
26913
  sessionId: string()
26569
- }), object({ pendingRenegotiation: object({
26570
- target: WebrtcStreamTargetSchema,
26571
- epoch: number()
26572
- }).nullable() }))
26914
+ }), object({
26915
+ pendingRenegotiation: object({
26916
+ target: WebrtcStreamTargetSchema,
26917
+ epoch: number()
26918
+ }).nullable(),
26919
+ /**
26920
+ * Whether the session still EXISTS.
26921
+ *
26922
+ * A consumer that holds a resource for the life of a session needs to
26923
+ * be able to ask, because a session does not always end the way it
26924
+ * began. Measured on this hub 2026-09-13: an Echo that got stuck never
26925
+ * sent `SessionDisconnected`, so the Alexa exporter's
26926
+ * `releaseEgressTranscode` never ran, and a 2304x1296 HEVC to 720p
26927
+ * H.264 transcode kept running for NOBODY for more than twenty
26928
+ * minutes. The WebRTC session had logged `WebRTC session closed`
26929
+ * minutes earlier — the broker knew; the holder had no way to ask.
26930
+ *
26931
+ * `false` for a session id the provider has never heard of, which is
26932
+ * the same answer as "it ended": either way nothing is holding it up.
26933
+ */
26934
+ alive: boolean()
26935
+ }))
26573
26936
  },
26574
26937
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
26575
26938
  mount: { kind: "server-provided" }
@@ -33194,7 +33557,29 @@ var LoggingSettingsPatchSchema = object({
33194
33557
  * disarmed the channels it did not mention would make the Levels page and
33195
33558
  * the Diagnostics page fight over the same value.
33196
33559
  */
33197
- channels: array(LogChannelWindowPatchSchema).readonly().optional()
33560
+ channels: array(LogChannelWindowPatchSchema).readonly().optional(),
33561
+ /**
33562
+ * How many days the analytics OPS LOG is kept — the audit trail of what
33563
+ * retention actually deleted.
33564
+ *
33565
+ * It lives HERE, on the logging document, and not on the analytics addon's
33566
+ * settings form, on the operator's instruction: every other log-ish window in
33567
+ * this system is configured through this one document, and a retention audit
33568
+ * configured somewhere else is a second place to look when the question is
33569
+ * "what happened to my data".
33570
+ *
33571
+ * That placement has a cost worth stating: this document ships in the
33572
+ * framework closure, so this knob needs a published `@camstack/server` while
33573
+ * the four windows beside it (D485) reach a node on `camstack deploy`.
33574
+ *
33575
+ * `retention-model.ts` argued this one must NOT follow a device window,
33576
+ * because the audit trail is the history of the SWEEP and not of the camera.
33577
+ * That argument stands and is untouched — what changes is that 30 days stops
33578
+ * being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
33579
+ * rather than 0-as-delete: an audit log truncated to nothing is precisely the
33580
+ * state in which the next 9.5 GiB leak cannot be explained.
33581
+ */
33582
+ opsLogRetentionDays: number().int().min(0).max(3650).optional()
33198
33583
  });
33199
33584
  /**
33200
33585
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -33267,6 +33652,14 @@ var LoggingSettingsStateSchema = object({
33267
33652
  channels: array(LogChannelDescriptorSchema).readonly(),
33268
33653
  /** The channels ARMED right now, each with its deadline. */
33269
33654
  activeChannels: array(LogChannelWindowStateSchema).readonly(),
33655
+ /**
33656
+ * The ops-log window in days, as it is in force. `0` = kept forever.
33657
+ *
33658
+ * Reported rather than left to the caller's memory of what it wrote: this is
33659
+ * the value the analytics sweep will actually use, and an operator asking how
33660
+ * long their audit trail lives should not have to infer it from a default.
33661
+ */
33662
+ opsLogRetentionDays: number().int().min(0),
33270
33663
  persisted: boolean()
33271
33664
  });
33272
33665
  method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string(), unknown()), _null(), {
@@ -37585,6 +37978,12 @@ Object.freeze({
37585
37978
  addonId: null,
37586
37979
  access: "view"
37587
37980
  },
37981
+ "pipelineAnalytics.listRecentSummaries": {
37982
+ capName: "pipeline-analytics",
37983
+ capScope: "device",
37984
+ addonId: null,
37985
+ access: "view"
37986
+ },
37588
37987
  "pipelineAnalytics.listRecentTracks": {
37589
37988
  capName: "pipeline-analytics",
37590
37989
  capScope: "device",
@@ -39547,6 +39946,12 @@ Object.freeze({
39547
39946
  addonId: null,
39548
39947
  access: "create"
39549
39948
  },
39949
+ "streamBroker.reportStreamSignal": {
39950
+ capName: "stream-broker",
39951
+ capScope: "system",
39952
+ addonId: null,
39953
+ access: "create"
39954
+ },
39550
39955
  "streamBroker.restartProfile": {
39551
39956
  capName: "stream-broker",
39552
39957
  capScope: "system",
@@ -39631,6 +40036,12 @@ Object.freeze({
39631
40036
  addonId: null,
39632
40037
  access: "create"
39633
40038
  },
40039
+ "streamSignals.listSignals": {
40040
+ capName: "stream-signals",
40041
+ capScope: "device",
40042
+ addonId: null,
40043
+ access: "view"
40044
+ },
39634
40045
  "switch.setState": {
39635
40046
  capName: "switch",
39636
40047
  capScope: "device",
@@ -41412,6 +41823,11 @@ Object.freeze({
41412
41823
  form: "single",
41413
41824
  optional: true
41414
41825
  }],
41826
+ "pipelineAnalytics.listRecentSummaries": [{
41827
+ name: "deviceIds",
41828
+ form: "array",
41829
+ optional: false
41830
+ }],
41415
41831
  "pipelineAnalytics.listRecentTracks": [{
41416
41832
  name: "deviceIds",
41417
41833
  form: "array",
@@ -41998,6 +42414,11 @@ Object.freeze({
41998
42414
  form: "single",
41999
42415
  optional: false
42000
42416
  }],
42417
+ "streamBroker.reportStreamSignal": [{
42418
+ name: "deviceId",
42419
+ form: "single",
42420
+ optional: false
42421
+ }],
42001
42422
  "streamBroker.restartProfile": [{
42002
42423
  name: "deviceId",
42003
42424
  form: "single",
@@ -44499,6 +44920,12 @@ Object.defineProperty(exports, "preprocess", {
44499
44920
  return preprocess;
44500
44921
  }
44501
44922
  });
44923
+ Object.defineProperty(exports, "rankStreams", {
44924
+ enumerable: true,
44925
+ get: function() {
44926
+ return rankStreams;
44927
+ }
44928
+ });
44502
44929
  Object.defineProperty(exports, "record", {
44503
44930
  enumerable: true,
44504
44931
  get: function() {
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-BGdDektN.js");
5
+ const require_dist = require("../dist-p5lZW8pr.js");
6
6
  const require_lazy_sharp = require("../lazy-sharp-BuwKlQLR.js");
7
7
  let node_fs = require("node:fs");
8
8
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Gt as BaseAddon, Jt as DeviceType, Q as evaluateZoneRules, Qt as hydrateSchema, mt as motionDetectionCapability } from "../dist-d1K9t4mU.mjs";
1
+ import { $t as hydrateSchema, Kt as BaseAddon, Q as evaluateZoneRules, Yt as DeviceType, mt as motionDetectionCapability } from "../dist-DTPYOq7J.mjs";
2
2
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-emK7D4bc.js");
2
- const require_dist = require("./dist-BGdDektN.js");
2
+ const require_dist = require("./dist-p5lZW8pr.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_fs = require("node:fs");
5
5
  node_fs = require_chunk.__toESM(node_fs, 1);