@camstack/addon-post-analysis 1.2.299 → 1.2.300

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.
@@ -7660,7 +7660,7 @@ function errMsg(err) {
7660
7660
  return String(err);
7661
7661
  }
7662
7662
  //#endregion
7663
- //#region ../types/dist/composition-BK-GTFYb.mjs
7663
+ //#region ../types/dist/composition-Dq42XWp0.mjs
7664
7664
  /**
7665
7665
  * Deterministic SHA-256 hash of an arbitrary serialisable value. The
7666
7666
  * canonical form sorts object keys alphabetically at every depth so two
@@ -7693,6 +7693,58 @@ function replaceWithSortedKeys(_key, value) {
7693
7693
  return value;
7694
7694
  }
7695
7695
  /**
7696
+ * The ffmpeg build every CamStack node downloads, per platform and arch.
7697
+ *
7698
+ * ## Why a download, on every node, including the container
7699
+ *
7700
+ * The version of ffmpeg used to be CODE: baked into the image, changeable only
7701
+ * by rebuilding and rolling it. Now it is DATA — this file states the release,
7702
+ * and a node that boots with a different one downloads it. Changing ffmpeg is a
7703
+ * framework bump, not an image rebuild.
7704
+ *
7705
+ * It also settles the licence question by removing it. FFmpeg's licence is
7706
+ * chosen at compile time: the core is LGPL 2.1+, `--enable-gpl` makes it GPL
7707
+ * (for x264/x265), `--enable-version3` makes that v3, and `--enable-nonfree`
7708
+ * makes the result undistributable. These are GPL v3 builds, and we do not
7709
+ * distribute them: the user's own node fetches the archive from the project
7710
+ * that publishes it, so we convey no GPL work and inherit none of the
7711
+ * obligations that come with conveying one. That is the whole reason the image
7712
+ * no longer installs ffmpeg at all — not a technical preference.
7713
+ *
7714
+ * ## Why jellyfin-ffmpeg
7715
+ *
7716
+ * One vendor covering linux-amd64, linux-arm64, darwin-arm64 and darwin-x64
7717
+ * from one release, with the widest hardware surface of anything maintained:
7718
+ * VAAPI, QSV, NVENC/NVDEC, AMF, Vulkan, OpenCL and DRM on amd64, plus Rockchip
7719
+ * MPP on arm64. It reaches the vendor libraries through dlopen trampolines,
7720
+ * so the binary is not linked against a driver stack it may not find.
7721
+ *
7722
+ * **What it still needs from the host, measured 2026-09-19.** On the Unraid
7723
+ * HOST, which has no libva, `-vaapi_device` aborts the process outright —
7724
+ * `implib-gen: libva-drm.so.2: failed to load library ... Assertion '0 &&
7725
+ * "Assertion in generated code"' failed`. Inside our container, which installs
7726
+ * libva plus the iHD driver, the same command encodes: verified end to end with
7727
+ * `testsrc → format=nv12,hwupload → h264_vaapi`. So the image drops ffmpeg and
7728
+ * KEEPS the Intel media stack; the drivers are the part a binary cannot bring.
7729
+ *
7730
+ * ## Why each artifact carries a checksum and a claim
7731
+ *
7732
+ * The download is now the only source, so `sha256` is verified before anything
7733
+ * is extracted — jellyfin publishes no checksums on its release assets, so
7734
+ * these are ours, taken at the version bump. And `expectedHwaccels` is what the
7735
+ * build is supposed to be able to do: a binary that probes short of its own
7736
+ * claim is a source that changed under us, which is precisely what went
7737
+ * unnoticed for months when a static build turned out to carry no VAAPI at all
7738
+ * (D536).
7739
+ */
7740
+ /** The pinned jellyfin-ffmpeg release. Changing this is the version change. */
7741
+ var FFMPEG_RELEASE = "8.1.2-5";
7742
+ var BASE = `https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v${FFMPEG_RELEASE}`;
7743
+ function portable(target) {
7744
+ return `${BASE}/jellyfin-ffmpeg_${FFMPEG_RELEASE}_portable_${target}-gpl.tar.xz`;
7745
+ }
7746
+ portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac64");
7747
+ /**
7696
7748
  * LA tabella "quale booleano di questo tipo di device conta come ALTO", e il
7697
7749
  * valutatore puro del suo FRONTE.
7698
7750
  *
@@ -8865,6 +8917,26 @@ function gifFromMp4Args(input) {
8865
8917
  ];
8866
8918
  }
8867
8919
  /**
8920
+ * Memoize `ensure` on SUCCESS only.
8921
+ *
8922
+ * A failure is not remembered: the next caller asks again, so a node whose
8923
+ * first download failed (no network at boot) recovers on the next spawn that
8924
+ * needs it — with no timer and no retry loop, because the ask is driven by
8925
+ * work that actually wants the binary.
8926
+ */
8927
+ function memoizePinnedFfmpeg(ensure) {
8928
+ let pending = null;
8929
+ return () => {
8930
+ if (pending !== null) return pending;
8931
+ const attempt = ensure();
8932
+ pending = attempt;
8933
+ attempt.catch(() => {
8934
+ if (pending === attempt) pending = null;
8935
+ });
8936
+ return attempt;
8937
+ };
8938
+ }
8939
+ /**
8868
8940
  * Deep wiring healthcheck — snapshot of active reachability probes across
8869
8941
  * every declared capability + widget of every installed plugin, on every
8870
8942
  * node. Produced by the backend `WiringHealthService` and surfaced via
@@ -9279,6 +9351,8 @@ var DETECTION_PIPELINE_CAP_NAME = "detection-pipeline";
9279
9351
  * oldest-first on append.
9280
9352
  */
9281
9353
  var MAX_BIRTH_DECISION_RECORDS = 3e4;
9354
+ /** Default page size for `listBirthDecisions` when the caller omits one. */
9355
+ var BIRTH_DECISION_DEFAULT_LIMIT = 500;
9282
9356
  /**
9283
9357
  * How stale a motion onset may be and still be offered as the birth-latency
9284
9358
  * proxy. Beyond this the row records `null`, never a large number.
@@ -9491,6 +9565,8 @@ var BirthDecisionQueryInputSchema = object({
9491
9565
  * `tracks` table measured at 4.6 MB for a single 501-row page.
9492
9566
  */
9493
9567
  var MAX_ARCHIVED_DEBUG_NOTES = 5e3;
9568
+ /** Default page size for `listArchivedDebugNotes` when the caller omits one. */
9569
+ var ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT = 200;
9494
9570
  /** One archived note — the operator's words plus enough context to find what
9495
9571
  * they were looking at, after the track itself is gone. */
9496
9572
  var ArchivedDebugNoteSchema = object({
@@ -9580,6 +9656,8 @@ var OpsLogQueryInputSchema = object({
9580
9656
  /** Max rows returned, newest-first. */
9581
9657
  limit: number().int().min(1).max(1e3).optional()
9582
9658
  });
9659
+ /** Default page size for a `listOpsLog` query when the caller omits `limit`. */
9660
+ var OPS_LOG_DEFAULT_LIMIT = 200;
9583
9661
  var LabelDefinitionSchema = object({
9584
9662
  id: string(),
9585
9663
  name: string(),
@@ -19195,6 +19273,12 @@ var NC_TANK_SYSTEM_EVENT_KINDS = [
19195
19273
  "device-tank-normal"
19196
19274
  ];
19197
19275
  /**
19276
+ * The consumable threshold a rule that does not state one judges at (D642).
19277
+ * The operator's number ("default 15 %, configurable on the rule"), and the
19278
+ * value the cluster-wide setting it replaces shipped with.
19279
+ */
19280
+ var NC_CONSUMABLE_LOW_PERCENT_DEFAULT = 15;
19281
+ /**
19198
19282
  * One coherent system-event condition. `kinds` is the required opt-in safety
19199
19283
  * gate; the remaining lists are optional narrowing filters relevant to the
19200
19284
  * selected kinds.
@@ -19887,6 +19971,24 @@ var NcMediaFrameSchema = _enum([
19887
19971
  * sensor linked to one camera ships that camera's plain snapshot either way.
19888
19972
  */
19889
19973
  var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
19974
+ /**
19975
+ * The clip window a rule gets when it stores no `clipPreRollSec` /
19976
+ * `clipPostRollSec` (D654): 4 s before the moment, 6 s after.
19977
+ *
19978
+ * THE one owner. The Notification Center resolves an absent roll to these at
19979
+ * dispatch and sizes the broker's clip ring from them (`clip-retention-ask`).
19980
+ * The admin editor does not author the roll; the viewer editor still keeps its
19981
+ * own 3 / 7 until it imports these (viewer follow-up). A second copy is how the
19982
+ * viewer came to display 3 / 7 — copied from a stale comment on the schema
19983
+ * below — while the hub cut 4 / 6, and to prune a typed 3 back to "absent",
19984
+ * which the hub then read as 4.
19985
+ *
19986
+ * A product decision of the notification, not the broker's history window
19987
+ * (D381/D382): the clip is cut from the broker's per-camera clip ring, which
19988
+ * the rules size, not from a pre-roll dial.
19989
+ */
19990
+ var NC_CLIP_PRE_ROLL_DEFAULT_SEC = 4;
19991
+ var NC_CLIP_POST_ROLL_DEFAULT_SEC = 6;
19890
19992
  var NcMediaPolicySchema = object({
19891
19993
  attach: _enum([
19892
19994
  "best",
@@ -21419,6 +21521,24 @@ var NcAlarmConfigSchema = object({
21419
21521
  live: NcAlarmLiveSchema.optional()
21420
21522
  });
21421
21523
  /**
21524
+ * The most seconds of footage any notification rule may ask a camera to retain.
21525
+ *
21526
+ * Sixty, and it is the OCCUPANCY number. An occupancy edge is confirmed by an
21527
+ * independent read that lands long after the fact (D279) plus the condition's
21528
+ * own `sustainSeconds` (29 s on this hub), so its clip is anchored well in the
21529
+ * past — and the other source, the recordings, cannot cover a recent moment:
21530
+ * measured against `recording.getAvailability` for a 10 s window at several
21531
+ * anchors, full coverage arrived at −18 s on device 590 and −26 s on 615 and
21532
+ * 617. That edge is a PHASE of the 10-second segment cycle, not a number. The
21533
+ * ring therefore has to hold the moment until the recordings can take it over:
21534
+ * the worst measured phase (26 s) plus the confirmation lag (29 s) is 55 s, and
21535
+ * 60 is the round number above it.
21536
+ *
21537
+ * It is a ceiling, not a default. Every other rule kind asks for its own window
21538
+ * plus the dispatch margin, which is roughly a third of this.
21539
+ */
21540
+ var NC_CLIP_RETENTION_MAX_SEC = 60;
21541
+ /**
21422
21542
  * ONE rule's demand on ONE camera's clip ring.
21423
21543
  *
21424
21544
  * A rule, not a camera: the broker takes the MAX over the asks that reach a
@@ -23526,6 +23646,21 @@ var EventDensityBucketSchema = object({
23526
23646
  audioDbfs: number().optional()
23527
23647
  });
23528
23648
  /**
23649
+ * Most cameras one `getEventDensityBatch` may name.
23650
+ *
23651
+ * The same ceiling the sibling batches on this cap already carry
23652
+ * (`listEventKindsBatch`, `getKeyEventsBatch`): a tablet grid is tens of
23653
+ * cameras, never hundreds, and one call's answer is N × (window / bucketMs)
23654
+ * buckets crossing a process boundary.
23655
+ *
23656
+ * The ceiling is on the SCHEMA, not only on the caller. An over-eager ask is
23657
+ * REFUSED — never truncated to the first {@link EVENT_DENSITY_BATCH_MAX} ids,
23658
+ * because that answer is indistinguishable from a complete one and the caller
23659
+ * would never learn it asked too much. A caller with more cameras sends
23660
+ * ⌈n/max⌉ calls.
23661
+ */
23662
+ var EVENT_DENSITY_BATCH_MAX = 200;
23663
+ /**
23529
23664
  * One camera's row in a `getEventDensityBatch` answer.
23530
23665
  *
23531
23666
  * TWO facts, and the timeline draws them differently:
@@ -37674,6 +37809,16 @@ var ExportDenseRangeSchema = object({
37674
37809
  toSec: number().nonnegative()
37675
37810
  }).refine((r) => r.toSec > r.fromSec, { message: "dense range must have toSec > fromSec" });
37676
37811
  /**
37812
+ * Hard ceiling on dense ranges in ONE render.
37813
+ *
37814
+ * The ranges become terms of a single ffmpeg `select` expression, so the count
37815
+ * is the length of a command-line argument. The producer (the timelapse
37816
+ * scheduler) coalesces and then falls back to the base cadence alone rather
37817
+ * than trimming — a truncated range list is a video that quietly omits the
37818
+ * evening.
37819
+ */
37820
+ var EXPORT_DENSE_MAX_RANGES = 200;
37821
+ /**
37677
37822
  * Dense-interval overlay for a timelapse: sample at `dense.everyMs` INSIDE the
37678
37823
  * listed ranges and at the base `everyMs` everywhere else.
37679
37824
  *
@@ -38495,11 +38640,23 @@ var SceneCheckSchema = discriminatedUnion("mode", [object({
38495
38640
  profileId: string().optional(),
38496
38641
  hysteresisCount: number().int().positive()
38497
38642
  })]);
38643
+ /** Defaults, as CONSTANTS rather than only as Zod `.default()`. A Zod default
38644
+ * does NOT run on the addon→addon cap path, so every runtime seam reads these
38645
+ * as absent-with-a-constant (the `NcConfirmSchema` lesson, three production
38646
+ * failures in one day). The schema defaults and these values are the same
38647
+ * numbers on purpose. */
38648
+ var SCENE_DEFAULT_QUIET_SECONDS = 60;
38649
+ var SCENE_DEFAULT_OBSERVATION_SPACING_SEC = 120;
38650
+ var SCENE_DEFAULT_CHECK_INTERVAL_SEC = 60;
38498
38651
  var SCENE_DEFAULT_ANCHOR_THRESHOLD = .85;
38499
38652
  /** Night is OPTIONAL. A scene with only a daylight reference sits the IR hours
38500
38653
  * out in silence rather than reporting a fault every night. */
38501
38654
  var SCENE_DEFAULT_UNCOVERED_POLICY = "skip";
38502
38655
  var SCENE_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
38656
+ var SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX = 448;
38657
+ /** `resetScene({ recapture })` absent means TRUE — the operator decision. Read
38658
+ * at the seam, because a Zod `.optional()` carries no default at all. */
38659
+ var SCENE_RESET_RECAPTURES = true;
38503
38660
  /**
38504
38661
  * Vision-model adjudication of a candidate flip. Field names deliberately
38505
38662
  * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
@@ -52575,6 +52732,15 @@ function ituDbfsFromPreEpoch(law, authoredDbfs) {
52575
52732
  return authoredDbfs + G711_SCALE_CORRECTION_DB[law];
52576
52733
  }
52577
52734
  Math.round(ituDbfsFromPreEpoch("PCMU", -55));
52735
+ /**
52736
+ * LABEL-mode confirm-count defaults. Chosen against the live "Pianti" rule
52737
+ * (2026-08-23): 15 notifies in 12 h, each a single YAMNet `crying` frame,
52738
+ * nobody actually crying. Two labelled frames in 5 s drops the single-frame
52739
+ * false positives and still catches a real episode (YAMNet labels 2–3
52740
+ * frames of a genuine cry).
52741
+ */
52742
+ var NC_AUDIO_CONFIRM_HITS_DEFAULT = 2;
52743
+ var NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT = 5;
52578
52744
  /** Schema defaults — an untouched sub-field must author exactly these. */
52579
52745
  var NC_AUDIO_DEFAULTS = {
52580
52746
  hitPercent: 60,
@@ -55382,6 +55548,12 @@ function buildClipModelRegistry(entries) {
55382
55548
  /** The built-in catalog's registry. */
55383
55549
  var BUILTIN_CLIP_MODELS = buildClipModelRegistry(CLIP_IMAGE_MODELS);
55384
55550
  //#endregion
55551
+ Object.defineProperty(exports, "ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT", {
55552
+ enumerable: true,
55553
+ get: function() {
55554
+ return ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT;
55555
+ }
55556
+ });
55385
55557
  Object.defineProperty(exports, "AUDIO_MACRO_LABELS", {
55386
55558
  enumerable: true,
55387
55559
  get: function() {
@@ -55400,6 +55572,12 @@ Object.defineProperty(exports, "ArchivedDebugNoteSchema", {
55400
55572
  return ArchivedDebugNoteSchema;
55401
55573
  }
55402
55574
  });
55575
+ Object.defineProperty(exports, "BIRTH_DECISION_DEFAULT_LIMIT", {
55576
+ enumerable: true,
55577
+ get: function() {
55578
+ return BIRTH_DECISION_DEFAULT_LIMIT;
55579
+ }
55580
+ });
55403
55581
  Object.defineProperty(exports, "BUILTIN_CLIP_MODELS", {
55404
55582
  enumerable: true,
55405
55583
  get: function() {
@@ -55526,6 +55704,12 @@ Object.defineProperty(exports, "EMBEDDING_REQUIREMENTS_UNAVAILABLE", {
55526
55704
  return EMBEDDING_REQUIREMENTS_UNAVAILABLE;
55527
55705
  }
55528
55706
  });
55707
+ Object.defineProperty(exports, "EVENT_DENSITY_BATCH_MAX", {
55708
+ enumerable: true,
55709
+ get: function() {
55710
+ return EVENT_DENSITY_BATCH_MAX;
55711
+ }
55712
+ });
55529
55713
  Object.defineProperty(exports, "EVENT_KIND_BY_CAP", {
55530
55714
  enumerable: true,
55531
55715
  get: function() {
@@ -55538,6 +55722,12 @@ Object.defineProperty(exports, "EVENT_OWNER_TYPES", {
55538
55722
  return EVENT_OWNER_TYPES;
55539
55723
  }
55540
55724
  });
55725
+ Object.defineProperty(exports, "EXPORT_DENSE_MAX_RANGES", {
55726
+ enumerable: true,
55727
+ get: function() {
55728
+ return EXPORT_DENSE_MAX_RANGES;
55729
+ }
55730
+ });
55541
55731
  Object.defineProperty(exports, "EventCategory", {
55542
55732
  enumerable: true,
55543
55733
  get: function() {
@@ -55622,12 +55812,48 @@ Object.defineProperty(exports, "NC_ALARM_SYSTEM_EVENT_KINDS", {
55622
55812
  return NC_ALARM_SYSTEM_EVENT_KINDS;
55623
55813
  }
55624
55814
  });
55815
+ Object.defineProperty(exports, "NC_AUDIO_CONFIRM_HITS_DEFAULT", {
55816
+ enumerable: true,
55817
+ get: function() {
55818
+ return NC_AUDIO_CONFIRM_HITS_DEFAULT;
55819
+ }
55820
+ });
55821
+ Object.defineProperty(exports, "NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT", {
55822
+ enumerable: true,
55823
+ get: function() {
55824
+ return NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT;
55825
+ }
55826
+ });
55827
+ Object.defineProperty(exports, "NC_CLIP_POST_ROLL_DEFAULT_SEC", {
55828
+ enumerable: true,
55829
+ get: function() {
55830
+ return NC_CLIP_POST_ROLL_DEFAULT_SEC;
55831
+ }
55832
+ });
55833
+ Object.defineProperty(exports, "NC_CLIP_PRE_ROLL_DEFAULT_SEC", {
55834
+ enumerable: true,
55835
+ get: function() {
55836
+ return NC_CLIP_PRE_ROLL_DEFAULT_SEC;
55837
+ }
55838
+ });
55839
+ Object.defineProperty(exports, "NC_CLIP_RETENTION_MAX_SEC", {
55840
+ enumerable: true,
55841
+ get: function() {
55842
+ return NC_CLIP_RETENTION_MAX_SEC;
55843
+ }
55844
+ });
55625
55845
  Object.defineProperty(exports, "NC_CONDITION_CATALOG", {
55626
55846
  enumerable: true,
55627
55847
  get: function() {
55628
55848
  return NC_CONDITION_CATALOG;
55629
55849
  }
55630
55850
  });
55851
+ Object.defineProperty(exports, "NC_CONSUMABLE_LOW_PERCENT_DEFAULT", {
55852
+ enumerable: true,
55853
+ get: function() {
55854
+ return NC_CONSUMABLE_LOW_PERCENT_DEFAULT;
55855
+ }
55856
+ });
55631
55857
  Object.defineProperty(exports, "NC_CONSUMABLE_SYSTEM_EVENT_KINDS", {
55632
55858
  enumerable: true,
55633
55859
  get: function() {
@@ -55784,6 +56010,12 @@ Object.defineProperty(exports, "NcTemplateVarDescriptorSchema", {
55784
56010
  return NcTemplateVarDescriptorSchema;
55785
56011
  }
55786
56012
  });
56013
+ Object.defineProperty(exports, "OPS_LOG_DEFAULT_LIMIT", {
56014
+ enumerable: true,
56015
+ get: function() {
56016
+ return OPS_LOG_DEFAULT_LIMIT;
56017
+ }
56018
+ });
55787
56019
  Object.defineProperty(exports, "OpsLogEntrySchema", {
55788
56020
  enumerable: true,
55789
56021
  get: function() {
@@ -55820,6 +56052,12 @@ Object.defineProperty(exports, "RetrainStatusSchema", {
55820
56052
  return RetrainStatusSchema;
55821
56053
  }
55822
56054
  });
56055
+ Object.defineProperty(exports, "SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX", {
56056
+ enumerable: true,
56057
+ get: function() {
56058
+ return SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX;
56059
+ }
56060
+ });
55823
56061
  Object.defineProperty(exports, "SCENE_CONFIRM_DEFAULT_TIMEOUT_MS", {
55824
56062
  enumerable: true,
55825
56063
  get: function() {
@@ -55832,6 +56070,24 @@ Object.defineProperty(exports, "SCENE_DEFAULT_ANCHOR_THRESHOLD", {
55832
56070
  return SCENE_DEFAULT_ANCHOR_THRESHOLD;
55833
56071
  }
55834
56072
  });
56073
+ Object.defineProperty(exports, "SCENE_DEFAULT_CHECK_INTERVAL_SEC", {
56074
+ enumerable: true,
56075
+ get: function() {
56076
+ return SCENE_DEFAULT_CHECK_INTERVAL_SEC;
56077
+ }
56078
+ });
56079
+ Object.defineProperty(exports, "SCENE_DEFAULT_OBSERVATION_SPACING_SEC", {
56080
+ enumerable: true,
56081
+ get: function() {
56082
+ return SCENE_DEFAULT_OBSERVATION_SPACING_SEC;
56083
+ }
56084
+ });
56085
+ Object.defineProperty(exports, "SCENE_DEFAULT_QUIET_SECONDS", {
56086
+ enumerable: true,
56087
+ get: function() {
56088
+ return SCENE_DEFAULT_QUIET_SECONDS;
56089
+ }
56090
+ });
55835
56091
  Object.defineProperty(exports, "SCENE_DEFAULT_UNCOVERED_POLICY", {
55836
56092
  enumerable: true,
55837
56093
  get: function() {
@@ -55844,6 +56100,12 @@ Object.defineProperty(exports, "SCENE_DIVERGED", {
55844
56100
  return SCENE_DIVERGED;
55845
56101
  }
55846
56102
  });
56103
+ Object.defineProperty(exports, "SCENE_RESET_RECAPTURES", {
56104
+ enumerable: true,
56105
+ get: function() {
56106
+ return SCENE_RESET_RECAPTURES;
56107
+ }
56108
+ });
55847
56109
  Object.defineProperty(exports, "SceneMonitorSchema", {
55848
56110
  enumerable: true,
55849
56111
  get: function() {
@@ -56168,6 +56430,12 @@ Object.defineProperty(exports, "mayWriteToLocation", {
56168
56430
  return mayWriteToLocation;
56169
56431
  }
56170
56432
  });
56433
+ Object.defineProperty(exports, "memoizePinnedFfmpeg", {
56434
+ enumerable: true,
56435
+ get: function() {
56436
+ return memoizePinnedFfmpeg;
56437
+ }
56438
+ });
56171
56439
  Object.defineProperty(exports, "nodePin", {
56172
56440
  enumerable: true,
56173
56441
  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_clip_model_registry = require("../clip-model-registry-hTbsQ-z7.js");
5
+ const require_clip_model_registry = require("../clip-model-registry-BeJUe0vk.js");
6
6
  let node_fs = require("node:fs");
7
7
  node_fs = require_clip_model_registry.__toESM(node_fs);
8
8
  let node_path = require("node:path");
@@ -328,6 +328,10 @@ var PythonRawTensorEngine = class {
328
328
  await this.proc.dispose();
329
329
  }
330
330
  };
331
+ //#endregion
332
+ //#region src/embedding-encoder/addon/active-clip-model.ts
333
+ /** How long a cluster-row read is trusted. The operator's flip lands within this. */
334
+ var ENCODER_ROW_TTL_MS = 3e4;
331
335
  var ActiveClipModel = class {
332
336
  deps;
333
337
  cached = null;
@@ -345,7 +349,7 @@ var ActiveClipModel = class {
345
349
  }
346
350
  async get() {
347
351
  const now = this.deps.now();
348
- if (this.cached !== null && now - this.cached.at < 3e4) return this.cached.modelId;
352
+ if (this.cached !== null && now - this.cached.at < ENCODER_ROW_TTL_MS) return this.cached.modelId;
349
353
  const row = await this.deps.readRow();
350
354
  if (row === null) {
351
355
  const kept = this.lastRead ?? this.deps.fallbackModelId();
@@ -369,6 +373,10 @@ var ActiveClipModel = class {
369
373
  return row;
370
374
  }
371
375
  };
376
+ //#endregion
377
+ //#region src/embedding-encoder/addon/crash-budget.ts
378
+ var MAX_CRASHES = 3;
379
+ var CRASH_WINDOW_MS = 10 * 6e4;
372
380
  var CrashBudget = class {
373
381
  deps;
374
382
  recent = /* @__PURE__ */ new Map();
@@ -386,11 +394,11 @@ var CrashBudget = class {
386
394
  record(modelId, reason) {
387
395
  if (this.failedModels.has(modelId)) return false;
388
396
  const now = this.now();
389
- const windowMs = this.deps.windowMs ?? 6e5;
397
+ const windowMs = this.deps.windowMs ?? CRASH_WINDOW_MS;
390
398
  const times = (this.recent.get(modelId) ?? []).filter((t) => now - t < windowMs);
391
399
  times.push(now);
392
400
  this.recent.set(modelId, times);
393
- if (times.length < (this.deps.maxCrashes ?? 3)) return false;
401
+ if (times.length < (this.deps.maxCrashes ?? MAX_CRASHES)) return false;
394
402
  const failed = {
395
403
  modelId,
396
404
  tower: this.deps.tower,
@@ -566,6 +574,13 @@ var ModelEngineSlot = class {
566
574
  held.engine.dispose().catch(() => {});
567
575
  }
568
576
  };
577
+ //#endregion
578
+ //#region src/embedding-encoder/addon/model-requirements.ts
579
+ /** First cooldown after a failed attempt; doubles per failure up to the cap. */
580
+ var REQUIREMENTS_COOLDOWN_BASE_MS = 5e3;
581
+ var REQUIREMENTS_COOLDOWN_MAX_MS = 5 * 6e4;
582
+ /** Failed attempts at a PERMANENTLY unmeetable requirement before it is terminal. */
583
+ var MAX_REQUIREMENTS_ATTEMPTS = 3;
569
584
  /**
570
585
  * Thrown by the requirements stage when a retry can never help: the catalog
571
586
  * does not know the id, the server said the file does not exist (404/410), a
@@ -621,7 +636,7 @@ var RequirementsGate = class {
621
636
  const attempts = (prior?.attempts ?? 0) + 1;
622
637
  const permanent = isPermanentRequirementsFailure(err);
623
638
  const permanentAttempts = (prior?.permanentAttempts ?? 0) + (permanent ? 1 : 0);
624
- const cooldownMs = Math.min(this.deps.cooldownMaxMs ?? 3e5, (this.deps.cooldownBaseMs ?? 5e3) * 2 ** (attempts - 1));
639
+ const cooldownMs = Math.min(this.deps.cooldownMaxMs ?? REQUIREMENTS_COOLDOWN_MAX_MS, (this.deps.cooldownBaseMs ?? REQUIREMENTS_COOLDOWN_BASE_MS) * 2 ** (attempts - 1));
625
640
  const base = {
626
641
  sinceMs: prior?.sinceMs ?? now,
627
642
  reason,
@@ -638,7 +653,7 @@ var RequirementsGate = class {
638
653
  reason,
639
654
  cooldownMs
640
655
  } });
641
- if (permanent && permanentAttempts >= (this.deps.maxAttempts ?? 3)) {
656
+ if (permanent && permanentAttempts >= (this.deps.maxAttempts ?? MAX_REQUIREMENTS_ATTEMPTS)) {
642
657
  const terminal = {
643
658
  ...this.on(modelId),
644
659
  attempts: permanentAttempts,
@@ -750,6 +765,10 @@ function l2Normalize(vec) {
750
765
  if (norm > 0) for (let i = 0; i < vec.length; i++) vec[i] /= norm;
751
766
  return vec;
752
767
  }
768
+ //#endregion
769
+ //#region src/embedding-encoder/addon/clip-text-engines.ts
770
+ /** At most this many text towers stay loaded (SigLIP2's is ~565 MB). */
771
+ var MAX_TEXT_ENGINES = 2;
753
772
  /**
754
773
  * A tower unused this long is disposed ({@link ClipTextEngines.evictIdle}) —
755
774
  * EXCEPT the tower of the model the cluster row names, which stays loaded for
@@ -927,7 +946,7 @@ var ClipTextEngines = class {
927
946
  }
928
947
  /** Fire-and-log: eviction errors never reach an encode. */
929
948
  scheduleEviction() {
930
- this.evictBeyond(this.deps.maxEngines ?? 2).catch((err) => {
949
+ this.evictBeyond(this.deps.maxEngines ?? MAX_TEXT_ENGINES).catch((err) => {
931
950
  this.deps.logger.warn("CLIP text tower eviction failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
932
951
  });
933
952
  }
@@ -1,4 +1,4 @@
1
- import { Ht as embeddingRequirementsUnavailableError, In as BaseAddon, Rt as embeddingEncoderCapability, Vt as embeddingRequirementsFailedError, Wn as normalizeNodeId, a as CLIP_EMBEDDING_STEP_ID, c as resolveClusterModelPin, ft as PoolMemoryWatchdog, hn as resolvePoolMemoryPolicy, i as CLIP_TEXT_MODELS, n as DEFAULT_CLIP_MODEL, r as CLIP_IMAGE_MODELS, sn as parseProcStatus, t as BUILTIN_CLIP_MODELS, zt as embeddingModelFailedError } from "../clip-model-registry-DCztUu1G.mjs";
1
+ import { $n as BaseAddon, Ct as PoolMemoryWatchdog, Mn as resolvePoolMemoryPolicy, a as CLIP_EMBEDDING_STEP_ID, c as resolveClusterModelPin, en as embeddingEncoderCapability, i as CLIP_TEXT_MODELS, in as embeddingRequirementsUnavailableError, n as DEFAULT_CLIP_MODEL, r as CLIP_IMAGE_MODELS, rn as embeddingRequirementsFailedError, sr as normalizeNodeId, t as BUILTIN_CLIP_MODELS, tn as embeddingModelFailedError, wn as parseProcStatus } from "../clip-model-registry-B44A1-Xh.mjs";
2
2
  import { createRequire } from "node:module";
3
3
  import * as fs from "node:fs";
4
4
  import * as path$1 from "node:path";
@@ -336,6 +336,10 @@ var PythonRawTensorEngine = class {
336
336
  await this.proc.dispose();
337
337
  }
338
338
  };
339
+ //#endregion
340
+ //#region src/embedding-encoder/addon/active-clip-model.ts
341
+ /** How long a cluster-row read is trusted. The operator's flip lands within this. */
342
+ var ENCODER_ROW_TTL_MS = 3e4;
339
343
  var ActiveClipModel = class {
340
344
  deps;
341
345
  cached = null;
@@ -353,7 +357,7 @@ var ActiveClipModel = class {
353
357
  }
354
358
  async get() {
355
359
  const now = this.deps.now();
356
- if (this.cached !== null && now - this.cached.at < 3e4) return this.cached.modelId;
360
+ if (this.cached !== null && now - this.cached.at < ENCODER_ROW_TTL_MS) return this.cached.modelId;
357
361
  const row = await this.deps.readRow();
358
362
  if (row === null) {
359
363
  const kept = this.lastRead ?? this.deps.fallbackModelId();
@@ -377,6 +381,10 @@ var ActiveClipModel = class {
377
381
  return row;
378
382
  }
379
383
  };
384
+ //#endregion
385
+ //#region src/embedding-encoder/addon/crash-budget.ts
386
+ var MAX_CRASHES = 3;
387
+ var CRASH_WINDOW_MS = 10 * 6e4;
380
388
  var CrashBudget = class {
381
389
  deps;
382
390
  recent = /* @__PURE__ */ new Map();
@@ -394,11 +402,11 @@ var CrashBudget = class {
394
402
  record(modelId, reason) {
395
403
  if (this.failedModels.has(modelId)) return false;
396
404
  const now = this.now();
397
- const windowMs = this.deps.windowMs ?? 6e5;
405
+ const windowMs = this.deps.windowMs ?? CRASH_WINDOW_MS;
398
406
  const times = (this.recent.get(modelId) ?? []).filter((t) => now - t < windowMs);
399
407
  times.push(now);
400
408
  this.recent.set(modelId, times);
401
- if (times.length < (this.deps.maxCrashes ?? 3)) return false;
409
+ if (times.length < (this.deps.maxCrashes ?? MAX_CRASHES)) return false;
402
410
  const failed = {
403
411
  modelId,
404
412
  tower: this.deps.tower,
@@ -574,6 +582,13 @@ var ModelEngineSlot = class {
574
582
  held.engine.dispose().catch(() => {});
575
583
  }
576
584
  };
585
+ //#endregion
586
+ //#region src/embedding-encoder/addon/model-requirements.ts
587
+ /** First cooldown after a failed attempt; doubles per failure up to the cap. */
588
+ var REQUIREMENTS_COOLDOWN_BASE_MS = 5e3;
589
+ var REQUIREMENTS_COOLDOWN_MAX_MS = 5 * 6e4;
590
+ /** Failed attempts at a PERMANENTLY unmeetable requirement before it is terminal. */
591
+ var MAX_REQUIREMENTS_ATTEMPTS = 3;
577
592
  /**
578
593
  * Thrown by the requirements stage when a retry can never help: the catalog
579
594
  * does not know the id, the server said the file does not exist (404/410), a
@@ -629,7 +644,7 @@ var RequirementsGate = class {
629
644
  const attempts = (prior?.attempts ?? 0) + 1;
630
645
  const permanent = isPermanentRequirementsFailure(err);
631
646
  const permanentAttempts = (prior?.permanentAttempts ?? 0) + (permanent ? 1 : 0);
632
- const cooldownMs = Math.min(this.deps.cooldownMaxMs ?? 3e5, (this.deps.cooldownBaseMs ?? 5e3) * 2 ** (attempts - 1));
647
+ const cooldownMs = Math.min(this.deps.cooldownMaxMs ?? REQUIREMENTS_COOLDOWN_MAX_MS, (this.deps.cooldownBaseMs ?? REQUIREMENTS_COOLDOWN_BASE_MS) * 2 ** (attempts - 1));
633
648
  const base = {
634
649
  sinceMs: prior?.sinceMs ?? now,
635
650
  reason,
@@ -646,7 +661,7 @@ var RequirementsGate = class {
646
661
  reason,
647
662
  cooldownMs
648
663
  } });
649
- if (permanent && permanentAttempts >= (this.deps.maxAttempts ?? 3)) {
664
+ if (permanent && permanentAttempts >= (this.deps.maxAttempts ?? MAX_REQUIREMENTS_ATTEMPTS)) {
650
665
  const terminal = {
651
666
  ...this.on(modelId),
652
667
  attempts: permanentAttempts,
@@ -758,6 +773,10 @@ function l2Normalize(vec) {
758
773
  if (norm > 0) for (let i = 0; i < vec.length; i++) vec[i] /= norm;
759
774
  return vec;
760
775
  }
776
+ //#endregion
777
+ //#region src/embedding-encoder/addon/clip-text-engines.ts
778
+ /** At most this many text towers stay loaded (SigLIP2's is ~565 MB). */
779
+ var MAX_TEXT_ENGINES = 2;
761
780
  /**
762
781
  * A tower unused this long is disposed ({@link ClipTextEngines.evictIdle}) —
763
782
  * EXCEPT the tower of the model the cluster row names, which stays loaded for
@@ -935,7 +954,7 @@ var ClipTextEngines = class {
935
954
  }
936
955
  /** Fire-and-log: eviction errors never reach an encode. */
937
956
  scheduleEviction() {
938
- this.evictBeyond(this.deps.maxEngines ?? 2).catch((err) => {
957
+ this.evictBeyond(this.deps.maxEngines ?? MAX_TEXT_ENGINES).catch((err) => {
939
958
  this.deps.logger.warn("CLIP text tower eviction failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
940
959
  });
941
960
  }
@@ -2,7 +2,7 @@ import { a as e, i as t, n, o as r, r as i, t as a } from "./_virtual_mf___mfe_i
2
2
  import { t as o } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-B3Wx5J80.mjs";
3
3
  import { a as s, i as c, n as l, o as u, r as d, s as f, t as p } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Ckt8VrEv.mjs";
4
4
  import { n as m, r as h, t as g } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-Bm-iyjmq.mjs";
5
- import { t as _ } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C3QGV7zb.mjs";
5
+ import { t as _ } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BdQKTjgL.mjs";
6
6
  //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
7
7
  var v = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), y = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), b = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), x = (e) => {
8
8
  let t = b(e);
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.2.274",
21
+ version: "1.2.275",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_pipeline_analytics_widgets",