@camstack/addon-post-analysis 1.2.136 → 1.2.138

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.
@@ -5915,6 +5915,40 @@ var BaseAddon = class {
5915
5915
  deviceSettingsSchema() {
5916
5916
  return null;
5917
5917
  }
5918
+ /**
5919
+ * INTEGRATION-LEVEL SETTINGS — declare which of this addon's global sections
5920
+ * ARE the configuration of its integration.
5921
+ *
5922
+ * Return the `ConfigSection.id`s, from {@link globalSettingsSchema}, that an
5923
+ * operator should find on the addon's integration page (System →
5924
+ * Integrations → <name>) rather than only in the cluster-wide list of every
5925
+ * addon. Empty (the default) means the addon has no integration-level
5926
+ * settings and no such surface is offered — this is opt-in, because whether
5927
+ * an addon's configuration IS its integration's configuration depends on the
5928
+ * nature of the integration.
5929
+ *
5930
+ * WHAT THIS IS NOT. It is not a scope. The selected sections keep living in
5931
+ * the ONE global schema, in the ONE addon store, written by the ONE
5932
+ * `updateGlobalSettings` path. There is deliberately no
5933
+ * `updateIntegrationSettings`: a second write path is how a surface acquires
5934
+ * a second store key, and this repo has shipped that twice (`btmPath@hub`,
5935
+ * D266). Selecting sections cannot introduce a key that selecting cannot.
5936
+ *
5937
+ * WHY IT IS A LIST OF SECTION IDS AND NOT A MARKER ON THE SECTION.
5938
+ * `ConfigFieldBase` used to carry `scope?: 'device' | 'global'` and it was
5939
+ * removed with the reason recorded at
5940
+ * `packages/types/src/interfaces/config-ui.ts:249` — *"a field's scope is
5941
+ * determined by WHICH schema it lives in, not by a field-level marker."* A
5942
+ * marker sprinkled across sections also has to borrow a field that already
5943
+ * means something else; borrowing `section.tab` put the literal word
5944
+ * "integration" into an operator-facing tab bar, because `tab` means "how to
5945
+ * GROUP this visually" and cannot also mean "where this lives" (D269
5946
+ * supersedes D268). One declaration, in one place, next to the schema whose
5947
+ * ids it names.
5948
+ */
5949
+ integrationSettingSections() {
5950
+ return [];
5951
+ }
5918
5952
  async getGlobalSettings(overlay, cap, nodeId) {
5919
5953
  const schema = this.globalSettingsSchema(cap);
5920
5954
  if (!schema) return { sections: [] };
@@ -5925,6 +5959,55 @@ var BaseAddon = class {
5925
5959
  } : projected);
5926
5960
  }
5927
5961
  /**
5962
+ * The integration-level view of this addon's settings: exactly the sections
5963
+ * named by {@link integrationSettingSections}, hydrated from the SAME store
5964
+ * `getGlobalSettings` reads, and narrowed to cluster-scoped fields.
5965
+ *
5966
+ * Returns `null` when the addon declared nothing — an addon that opts out has
5967
+ * no integration settings surface at all, rather than an empty one that reads
5968
+ * as a failed load.
5969
+ *
5970
+ * Three properties hold BY CONSTRUCTION, which is why they are here in core
5971
+ * and not in whichever UI happens to render this:
5972
+ *
5973
+ * 1. **One key.** The payload is a SUBSET of the global schema, so a field
5974
+ * shown here is the same field, with the same bare key, that the addon's
5975
+ * own page shows. There is no integration-specific writer — callers save
5976
+ * through `updateGlobalSettings` — so a second store key is unreachable,
5977
+ * not merely discouraged.
5978
+ * 2. **No node scope.** `perNode: true` fields are DROPPED. Their store key
5979
+ * is `<key>@<nodeId>` and an integration is not a node; whichever node
5980
+ * such a field silently picked would be a wrong answer for the operator
5981
+ * who opened the page (D266).
5982
+ * 3. **No silent typo.** A declared id that names no section throws. The
5983
+ * alternative — skip it — turns a rename into a surface that quietly
5984
+ * empties, which looks exactly like an addon with nothing to configure.
5985
+ */
5986
+ async getIntegrationSettings(nodeId) {
5987
+ const declared = this.integrationSettingSections();
5988
+ if (declared.length === 0) return null;
5989
+ const schema = this.globalSettingsSchema();
5990
+ if (!schema) throw new Error(`${this.constructor.name}: integrationSettingSections() names [${declared.join(", ")}] but globalSettingsSchema() returns null.`);
5991
+ const byId = new Map(schema.sections.map((section) => [section.id, section]));
5992
+ const sections = [];
5993
+ for (const id of declared) {
5994
+ const section = byId.get(id);
5995
+ if (!section) throw new Error(`${this.constructor.name}: integrationSettingSections() names unknown section "${id}". Known sections: [${[...byId.keys()].join(", ")}].`);
5996
+ const fields = dropPerNodeFields(section.fields);
5997
+ if (fields.length === 0) continue;
5998
+ sections.push({
5999
+ ...section,
6000
+ fields
6001
+ });
6002
+ }
6003
+ if (sections.length === 0) return null;
6004
+ const projected = await this.resolveGlobalStore(nodeId);
6005
+ return hydrateSchema({
6006
+ ...schema,
6007
+ sections
6008
+ }, projected);
6009
+ }
6010
+ /**
5928
6011
  * The raw addon store PROJECTED onto the target node's bare per-node keys:
5929
6012
  * every `perNode: true` field carries THAT node's scoped value on its bare
5930
6013
  * key (absent scoped key ⇒ key absent, so the schema `default` wins — no
@@ -6228,6 +6311,41 @@ var BaseAddon = class {
6228
6311
  * `hydrateSchema` does. Valueless structural fields (separator/info/…)
6229
6312
  * don't declare `perNode` and are excluded by the `in` narrowing.
6230
6313
  */
6314
+ /**
6315
+ * The same fields with every `perNode: true` one removed, recursing into layout
6316
+ * containers exactly as {@link collectPerNodeFieldKeys} does. A container left
6317
+ * with no child is dropped rather than rendered empty.
6318
+ *
6319
+ * Used by `getIntegrationSettings`: an integration is not a node, so a field
6320
+ * whose store key is `<key>@<nodeId>` has no node to belong to there.
6321
+ */
6322
+ function dropPerNodeFields(fields) {
6323
+ const kept = [];
6324
+ for (const field of fields) {
6325
+ if (field.type === "group") {
6326
+ const inner = dropPerNodeFields(field.fields);
6327
+ if (inner.length > 0) kept.push({
6328
+ ...field,
6329
+ fields: inner
6330
+ });
6331
+ continue;
6332
+ }
6333
+ if (field.type === "sub-tabs") {
6334
+ const tabs = field.tabs.map((tab) => ({
6335
+ ...tab,
6336
+ fields: dropPerNodeFields(tab.fields)
6337
+ })).filter((tab) => tab.fields.length > 0);
6338
+ if (tabs.length > 0) kept.push({
6339
+ ...field,
6340
+ tabs
6341
+ });
6342
+ continue;
6343
+ }
6344
+ if ("perNode" in field && field.perNode === true) continue;
6345
+ kept.push(field);
6346
+ }
6347
+ return kept;
6348
+ }
6231
6349
  function collectPerNodeFieldKeys(fields) {
6232
6350
  const collected = [];
6233
6351
  for (const field of fields) {
@@ -8453,6 +8571,112 @@ var DecoderSessionConfigSchema = object({
8453
8571
  */
8454
8572
  debug: boolean().optional()
8455
8573
  });
8574
+ /**
8575
+ * Distinct (device, family, variant) counters one instance will hold.
8576
+ *
8577
+ * A large fleet x the handful of families any single addon reports, with
8578
+ * slack. At ~200 B per counter this is a ~100 KB ceiling on a process that
8579
+ * already declares an RSS budget in the gigabytes.
8580
+ */
8581
+ var MAX_KEYS = 1024;
8582
+ /**
8583
+ * Where reasons past {@link MAX_REASONS_PER_KEY} go.
8584
+ *
8585
+ * They are FOLDED, never dropped: `attempts - succeeded` must always equal the
8586
+ * sum of the reason counts, or the ratio stops adding up.
8587
+ */
8588
+ var OVERFLOW_REASON = "other";
8589
+ /** `deviceId` + `family` + optional `variant`, flattened into the map key. */
8590
+ function counterKey(deviceId, family, variant) {
8591
+ return variant === void 0 ? `${deviceId}${family}` : `${deviceId}${family}${variant}`;
8592
+ }
8593
+ /**
8594
+ * A bounded set of per-camera, cumulative failure counters.
8595
+ *
8596
+ * One instance per contributing subsystem. `note` is O(1) and allocation-free
8597
+ * on the steady path; `snapshot` reads without mutating anything.
8598
+ */
8599
+ var FailureCounters = class {
8600
+ maxKeys;
8601
+ maxReasons;
8602
+ counters = /* @__PURE__ */ new Map();
8603
+ refused = 0;
8604
+ constructor(maxKeys = MAX_KEYS, maxReasons = 16) {
8605
+ this.maxKeys = maxKeys;
8606
+ this.maxReasons = maxReasons;
8607
+ }
8608
+ /**
8609
+ * Counters refused because {@link MAX_KEYS} was already held.
8610
+ *
8611
+ * Cumulative for the life of the instance: a bound that bit is a fact about
8612
+ * the deployment, and a surface that hid it would under-report a fleet
8613
+ * precisely when the fleet got large enough to matter.
8614
+ */
8615
+ get keysRefused() {
8616
+ return this.refused;
8617
+ }
8618
+ /** Counters currently held. */
8619
+ get size() {
8620
+ return this.counters.size;
8621
+ }
8622
+ /**
8623
+ * Fold one observation in.
8624
+ *
8625
+ * A non-positive or non-integer `deviceId` is REFUSED rather than bucketed:
8626
+ * see the module docblock — an entry that cannot name its camera is worse
8627
+ * than no entry.
8628
+ */
8629
+ note(observation, nowMs) {
8630
+ if (!Number.isInteger(observation.deviceId) || observation.deviceId <= 0) return;
8631
+ const key = counterKey(observation.deviceId, observation.family, observation.variant);
8632
+ let counter = this.counters.get(key);
8633
+ if (counter === void 0) {
8634
+ if (this.counters.size >= this.maxKeys) {
8635
+ this.refused += 1;
8636
+ return;
8637
+ }
8638
+ counter = {
8639
+ deviceId: observation.deviceId,
8640
+ family: observation.family,
8641
+ variant: observation.variant,
8642
+ sinceMs: nowMs,
8643
+ attempts: 0,
8644
+ succeeded: 0,
8645
+ reasons: /* @__PURE__ */ new Map()
8646
+ };
8647
+ this.counters.set(key, counter);
8648
+ }
8649
+ counter.attempts += 1;
8650
+ if (observation.reason === void 0) {
8651
+ counter.succeeded += 1;
8652
+ return;
8653
+ }
8654
+ const reason = counter.reasons.has(observation.reason) || counter.reasons.size < this.maxReasons ? observation.reason : OVERFLOW_REASON;
8655
+ counter.reasons.set(reason, (counter.reasons.get(reason) ?? 0) + 1);
8656
+ }
8657
+ /** Read every counter. Never mutates — see the module docblock. */
8658
+ snapshot(nowMs) {
8659
+ const out = [];
8660
+ for (const counter of this.counters.values()) out.push({
8661
+ deviceId: counter.deviceId,
8662
+ family: counter.family,
8663
+ ...counter.variant !== void 0 ? { variant: counter.variant } : {},
8664
+ sinceMs: counter.sinceMs,
8665
+ atMs: nowMs,
8666
+ attempts: counter.attempts,
8667
+ succeeded: counter.succeeded,
8668
+ reasons: [...counter.reasons.entries()].map(([reason, count]) => ({
8669
+ reason,
8670
+ count
8671
+ })).toSorted((a, b) => b.count - a.count)
8672
+ });
8673
+ return out;
8674
+ }
8675
+ /** Drop everything (host disposal). */
8676
+ clear() {
8677
+ this.counters.clear();
8678
+ }
8679
+ };
8456
8680
  var MODEL_FORMATS = [
8457
8681
  "onnx",
8458
8682
  "coreml",
@@ -9638,6 +9862,9 @@ method(object({
9638
9862
  kind: "mutation",
9639
9863
  auth: "admin"
9640
9864
  }), method(object({
9865
+ addonId: string(),
9866
+ nodeId: string().optional()
9867
+ }), SettingsSchemaWithValuesSchema.nullable()), method(object({
9641
9868
  addonId: string(),
9642
9869
  deviceId: number(),
9643
9870
  nodeId: string().optional()
@@ -13593,6 +13820,133 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
13593
13820
  limit: number().optional(),
13594
13821
  tags: record(string(), string()).optional()
13595
13822
  }), array(LogEntrySchema).readonly());
13823
+ /**
13824
+ * `failure-contribution` — the capability an addon reports its OWN losses
13825
+ * through, per camera, with the denominator attached. It stores nothing.
13826
+ *
13827
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
13828
+ *
13829
+ * `load-contribution` answers *what did this camera COST*. This answers *what
13830
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
13831
+ * copied: the contributor reports what it already knows, hub-main adds only
13832
+ * `addonId`, nothing needs global knowledge, and there is no central list for
13833
+ * somebody to forget to edit.
13834
+ *
13835
+ * They are not merged, because their invariants are opposites:
13836
+ *
13837
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
13838
+ * claim a camera cost nothing, which is a measurement nobody made;
13839
+ * - a `failure-contribution` zero is the **most valuable value on the
13840
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13841
+ * and it is exactly what an absent entry cannot say.
13842
+ *
13843
+ * Putting a loss counter on a cost entry would also break the reconciliation
13844
+ * that gives `load-contribution` its point: contributions are subtracted from
13845
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13846
+ * has no process.
13847
+ *
13848
+ * ## Why not a log line, since the counters already exist
13849
+ *
13850
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13851
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13852
+ * ends in a log line, and a log line is the thing the operator asked to stop
13853
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13854
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13855
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13856
+ * media blackout were both diagnosed. The counters stay; this is where they can
13857
+ * be READ.
13858
+ *
13859
+ * ## The rate is served with its denominator or not at all
13860
+ *
13861
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13862
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13863
+ * than yesterday" and was **flat across twelve hours** once divided by the
13864
+ * successes on the same path. A surface that publishes only the numerator
13865
+ * reproduces that mistake on every read.
13866
+ *
13867
+ * ## Shape
13868
+ *
13869
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13870
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13871
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13872
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13873
+ * a forked runner's entries reach hub-main over transport that already exists.
13874
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13875
+ * result through `system.getFailureContributions`.
13876
+ */
13877
+ var FailureReasonCountSchema = object({
13878
+ /**
13879
+ * Why the attempt did not land, in the contributor's own vocabulary —
13880
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13881
+ * strings that already appear in this repo's logs and, where one exists, the
13882
+ * same string the per-track `previewMissReason` records (D276): a second
13883
+ * vocabulary for the same loss would make the row and the counter
13884
+ * un-joinable.
13885
+ */
13886
+ reason: string(),
13887
+ count: number().int().nonnegative()
13888
+ });
13889
+ var FailureContributionSchema = object({
13890
+ /**
13891
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13892
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13893
+ * `unit` free: the families are owned by different addons and a shared enum
13894
+ * is a central list that rots invisibly.
13895
+ */
13896
+ family: string(),
13897
+ /**
13898
+ * The NUMERIC device id — the same value every log line carries as
13899
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13900
+ * cannot name the camera must not emit the entry, because a fleet total
13901
+ * cannot answer the only question anybody asks of this surface.
13902
+ */
13903
+ deviceId: number().int().positive(),
13904
+ /**
13905
+ * A second dimension inside the family: the model / step id for an inference
13906
+ * timeout, so "which camera AND which model" is one read. Absent when the
13907
+ * family has a single variant.
13908
+ */
13909
+ variant: string().optional(),
13910
+ /**
13911
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13912
+ * differencing two reads must drop the interval when it changes, because the
13913
+ * counter restarted from zero in a respawned runner. Same discipline as
13914
+ * `LoadContribution.startedAtMs`.
13915
+ */
13916
+ sinceMs: number(),
13917
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13918
+ atMs: number(),
13919
+ /**
13920
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13921
+ * window. A failure count published without it is the mistake this schema
13922
+ * exists to make impossible.
13923
+ */
13924
+ attempts: number().int().nonnegative(),
13925
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13926
+ succeeded: number().int().nonnegative(),
13927
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13928
+ reasons: array(FailureReasonCountSchema).readonly()
13929
+ });
13930
+ var failureContributionCapability = {
13931
+ name: "failure-contribution",
13932
+ scope: "system",
13933
+ mode: "collection",
13934
+ internal: true,
13935
+ methods: {
13936
+ /**
13937
+ * This addon's per-camera failure counters, read live from bounded in-RAM
13938
+ * state it already keeps. Inert: no persistence, no sampling, no timer.
13939
+ *
13940
+ * READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
13941
+ * consumer that wants a rate differences two reads. A draining read would
13942
+ * make two operators with the page open each destroy half of the other's
13943
+ * numbers, and `load-contribution` already settled the same question the
13944
+ * same way for `cpuSeconds`.
13945
+ */
13946
+ list: method(_void(), array(FailureContributionSchema).readonly()) },
13947
+ /** In-process only — enumerated through `addons.listCapabilityProviders`. */
13948
+ mount: { kind: "skip" }
13949
+ };
13596
13950
  var LoadContributionSchema = object({
13597
13951
  role: _enum([
13598
13952
  "decode",
@@ -18811,6 +19165,20 @@ var TrackSchema = object({
18811
19165
  * `=== true` and render nothing otherwise — never infer "no rider".
18812
19166
  */
18813
19167
  hasRider: boolean().optional(),
19168
+ /**
19169
+ * WHY this track ended without a NATIVE best-shot tile
19170
+ * ([D276](../decisions/adr-0276-a-stand-in-tile-is-provisional-and-a-close-says-why.md)) —
19171
+ * a composed token line (`no-key-frame capture=keyframe:native-missx4`,
19172
+ * `derive-returned-null tile=standin`, …) written at close and CLEARED by
19173
+ * the late-keyFrame upgrade when a native tile lands after all. The
19174
+ * operator-facing answer to "perché manca l'immagine?" on a track whose
19175
+ * tile is a face/plate stand-in, a raster crop, or an icon.
19176
+ *
19177
+ * **Absent ≠ "missed silently"**: a row written before the column, a hub
19178
+ * that predates the field, and every track whose tile landed native all
19179
+ * omit it. Render nothing when absent.
19180
+ */
19181
+ previewMissReason: string().optional(),
18814
19182
  ...TrackFlagFields,
18815
19183
  ...TrackRetrainFields
18816
19184
  });
@@ -30553,6 +30921,13 @@ var LoggingSettingsPatchSchema = object({
30553
30921
  * anyone but its owner.
30554
30922
  */
30555
30923
  var ReportedLoadContributionSchema = LoadContributionSchema.extend({ addonId: string() });
30924
+ /**
30925
+ * One per-camera failure counter, plus WHO reported it.
30926
+ *
30927
+ * Same rule as {@link ReportedLoadContributionSchema}: `addonId` is stamped by
30928
+ * the hub as it enumerates providers, never by the contributor.
30929
+ */
30930
+ var ReportedFailureContributionSchema = FailureContributionSchema.extend({ addonId: string() });
30556
30931
  var GetLoggingSettingsInputSchema = object({
30557
30932
  scopeNodeId: string().optional(),
30558
30933
  /**
@@ -30611,7 +30986,7 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
30611
30986
  }), method(_void(), SiteLocationStatusSchema, {
30612
30987
  kind: "mutation",
30613
30988
  auth: "admin"
30614
- }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
30989
+ }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(_void(), array(ReportedFailureContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
30615
30990
  kind: "mutation",
30616
30991
  auth: "admin"
30617
30992
  });
@@ -32985,6 +33360,12 @@ Object.freeze({
32985
33360
  addonId: null,
32986
33361
  access: "view"
32987
33362
  },
33363
+ "addonSettings.getIntegrationSettings": {
33364
+ capName: "addon-settings",
33365
+ capScope: "system",
33366
+ addonId: null,
33367
+ access: "view"
33368
+ },
32988
33369
  "addonSettings.updateDeviceSettings": {
32989
33370
  capName: "addon-settings",
32990
33371
  capScope: "system",
@@ -34647,6 +35028,12 @@ Object.freeze({
34647
35028
  addonId: null,
34648
35029
  access: "create"
34649
35030
  },
35031
+ "failureContribution.list": {
35032
+ capName: "failure-contribution",
35033
+ capScope: "system",
35034
+ addonId: null,
35035
+ access: "view"
35036
+ },
34650
35037
  "fanControl.setDirection": {
34651
35038
  capName: "fan-control",
34652
35039
  capScope: "device",
@@ -37953,6 +38340,12 @@ Object.freeze({
37953
38340
  addonId: null,
37954
38341
  access: "create"
37955
38342
  },
38343
+ "system.getFailureContributions": {
38344
+ capName: "system",
38345
+ capScope: "system",
38346
+ addonId: null,
38347
+ access: "view"
38348
+ },
37956
38349
  "system.getLoadContributions": {
37957
38350
  capName: "system",
37958
38351
  capScope: "system",
@@ -41462,4 +41855,4 @@ function vectorDimFromBase64(encoded) {
41462
41855
  return Math.floor(Buffer.from(encoded, "base64").byteLength / 4);
41463
41856
  }
41464
41857
  //#endregion
41465
- export { customAction as $, NcTaxonomySchema as A, sleep as At, TIMELAPSE_DENSE_FLOOR_SEC as B, string as Bt, NcRuleSchema as C, errMsg as Ct, NcSnoozeSchema as D, hydrateSchema as Dt, NcSnoozeInputSchema as E, createEvent as Et, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS as F, literal as Ft, VISIT_MERGE_GAP_MS as G, TimelapseRulePatchSchema as H, EventCategory as Ht, SCENE_DEFAULT_ANCHOR_THRESHOLD as I, number as It, assertTimelapseCadences as J, addonWidgetsSourceCapability as K, SCENE_DEFAULT_UNCOVERED_POLICY as L, object as Lt, PoolMemoryWatchdog as M, array as Mt, RECORDING_EXPORT_MAX_READ_BYTES as N, boolean as Nt, NcSnoozeSuppressedSchema as O, isDeviceScopedCap as Ot, RetrainStatusSchema as P, discriminatedUnion as Pt, cosineSimilarity as Q, SCENE_DIVERGED as R, partialRecord as Rt, NcRulePatchSchema as S, zoneAnalyticsCapability as St, NcScheduleSchema as T, DeviceType as Tt, TimelapseRuleSchema as U, TimelapseRuleInputSchema as V, unknown as Vt, TrackSourceSchema as W, audioModeOf as X, audioMetricsCapability as Y, buildEventKindDescriptor as Z, NC_DEFAULT_SNOOZE_MINUTES as _, sceneMonitorCapability as _t, DEFAULT_EVENT_COLOR as a, hfModelUrl as at, NcConditionDescriptorSchema as b, vectorDimFromBase64 as bt, DETECTION_PIPELINE_CAP_NAME as c, kebabToCamel as ct, EVENT_PAD_MS as d, pickClusterStepModels as dt, defineCustomActions as et, FULL_IMAGE_BBOX as f, pipelineAnalyticsCapability as ft, NC_CONDITION_CATALOG as g, resolvePoolMemoryPolicy as gt, NC_ALARM_SYSTEM_EVENT_KINDS as h, readTimelapseGeneratedAt as ht, CLUSTER_MODEL_SCOPED_STEPS as i, faceGalleryCapability as it, OpsLogEntrySchema as j, _enum as jt, NcSystemEventKindSchema as k, nodePin as kt, DeclaredDevices as l, notificationRulesCapability as lt, MACRO_LABELS as m, readDeviceStateFrom as mt, AnalyticsGroupRecordSchema as n, embeddingEncoderCapability as nt, DEFAULT_TIMELAPSE_PREVIEW_TEXT as o, isDetectionMacroClass as ot, LabelAttributionSchema as p, plateGalleryCapability as pt, alarmPanelCapability as q, BaseDevice as r, encodeVectorBase64 as rt, DETECTION_MACRO_CLASSES as s, isScheduleActive as st, AnalyticsGroupDetailSchema as t, deriveRecordingMode as tt, EVENT_KIND_BY_CAP as u, parseProcStatus as ut, NC_SNOOZE_MAX_MINUTES as v, subKindsOf as vt, NcRuleTargetSchema as w, BaseAddon as wt, NcRuleInputSchema as x, videoclipsCapability as xt, NC_TAXONOMY as y, systemEventFilterApplies as yt, SceneMonitorSchema as z, record as zt };
41858
+ export { buildEventKindDescriptor as $, NcSnoozeSuppressedSchema as A, hydrateSchema as At, SCENE_DIVERGED as B, object as Bt, NcRuleInputSchema as C, vectorDimFromBase64 as Ct, NcScheduleSchema as D, BaseAddon as Dt, NcRuleTargetSchema as E, errMsg as Et, RECORDING_EXPORT_MAX_READ_BYTES as F, array as Ft, TimelapseRuleSchema as G, EventCategory as Gt, TIMELAPSE_DENSE_FLOOR_SEC as H, record as Ht, RetrainStatusSchema as I, boolean as It, addonWidgetsSourceCapability as J, TrackSourceSchema as K, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS as L, discriminatedUnion as Lt, NcTaxonomySchema as M, nodePin as Mt, OpsLogEntrySchema as N, sleep as Nt, NcSnoozeInputSchema as O, DeviceType as Ot, PoolMemoryWatchdog as P, _enum as Pt, audioModeOf as Q, SCENE_DEFAULT_ANCHOR_THRESHOLD as R, literal as Rt, NcConditionDescriptorSchema as S, systemEventFilterApplies as St, NcRuleSchema as T, zoneAnalyticsCapability as Tt, TimelapseRuleInputSchema as U, string as Ut, SceneMonitorSchema as V, partialRecord as Vt, TimelapseRulePatchSchema as W, unknown as Wt, assertTimelapseCadences as X, alarmPanelCapability as Y, audioMetricsCapability as Z, NC_ALARM_SYSTEM_EVENT_KINDS as _, readDeviceStateFrom as _t, COCO_TO_MACRO as a, encodeVectorBase64 as at, NC_SNOOZE_MAX_MINUTES as b, sceneMonitorCapability as bt, DETECTION_MACRO_CLASSES as c, hfModelUrl as ct, EVENT_KIND_BY_CAP as d, kebabToCamel as dt, cosineSimilarity as et, EVENT_PAD_MS as f, notificationRulesCapability as ft, MACRO_LABELS as g, plateGalleryCapability as gt, LabelAttributionSchema as h, pipelineAnalyticsCapability as ht, CLUSTER_MODEL_SCOPED_STEPS as i, embeddingEncoderCapability as it, NcSystemEventKindSchema as j, isDeviceScopedCap as jt, NcSnoozeSchema as k, createEvent as kt, DETECTION_PIPELINE_CAP_NAME as l, isDetectionMacroClass as lt, FailureCounters as m, pickClusterStepModels as mt, AnalyticsGroupRecordSchema as n, defineCustomActions as nt, DEFAULT_EVENT_COLOR as o, faceGalleryCapability as ot, FULL_IMAGE_BBOX as p, parseProcStatus as pt, VISIT_MERGE_GAP_MS as q, BaseDevice as r, deriveRecordingMode as rt, DEFAULT_TIMELAPSE_PREVIEW_TEXT as s, failureContributionCapability as st, AnalyticsGroupDetailSchema as t, customAction as tt, DeclaredDevices as u, isScheduleActive as ut, NC_CONDITION_CATALOG as v, readTimelapseGeneratedAt as vt, NcRulePatchSchema as w, videoclipsCapability as wt, NC_TAXONOMY as x, subKindsOf as xt, NC_DEFAULT_SNOOZE_MINUTES as y, resolvePoolMemoryPolicy as yt, SCENE_DEFAULT_UNCOVERED_POLICY as z, number as zt };
@@ -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-kn_4KEmG.js");
5
+ const require_dist = require("../dist-C6oVj0QW.js");
6
6
  let node_fs = require("node:fs");
7
7
  node_fs = require_dist.__toESM(node_fs);
8
8
  let node_path = require("node:path");
@@ -543,11 +543,7 @@ var EmbeddingEncoderAddon = class extends require_dist.BaseAddon {
543
543
  imageEngineInflight = null;
544
544
  textEngineInflight = null;
545
545
  constructor() {
546
- super({
547
- modelId: DEFAULT_CLIP_MODEL,
548
- runtime: "auto",
549
- backend: "cpu"
550
- });
546
+ super({ modelId: DEFAULT_CLIP_MODEL });
551
547
  }
552
548
  async onInitialize() {
553
549
  const modelsDir = await this.resolveModelsDir();
@@ -691,11 +687,7 @@ var EmbeddingEncoderAddon = class extends require_dist.BaseAddon {
691
687
  }
692
688
  }
693
689
  async resolveForEntry(entry, target) {
694
- const engineLogger = this.ctx.logger.withTags({
695
- modelId: entry.id,
696
- runtime: this.config.runtime,
697
- backend: this.config.backend
698
- });
690
+ const engineLogger = this.ctx.logger.withTags({ modelId: entry.id });
699
691
  const modelPath = await this.models.ensure(entry.id, "onnx");
700
692
  const pythonPath = await this.ctx.deps.ensurePython();
701
693
  if (!pythonPath) throw new Error("EmbeddingEncoder: embedded Python is unavailable — cannot run ONNX embeddings. ctx.deps.ensurePython() returned null (portable Python download likely failed).");
@@ -724,50 +716,13 @@ var EmbeddingEncoderAddon = class extends require_dist.BaseAddon {
724
716
  id: "embedding-encoder-settings",
725
717
  title: "Embedding Encoder",
726
718
  columns: 2,
727
- fields: [
728
- {
729
- type: "text",
730
- key: "modelId",
731
- label: "Model ID",
732
- description: "CLIP model identifier to use for image/text embedding",
733
- default: DEFAULT_CLIP_MODEL
734
- },
735
- {
736
- type: "select",
737
- key: "runtime",
738
- label: "Runtime",
739
- description: "Inference runtime — ONNX runs in the embedded Python.",
740
- default: "auto",
741
- options: [{
742
- label: "Auto",
743
- value: "auto"
744
- }, {
745
- label: "Python",
746
- value: "python"
747
- }]
748
- },
749
- {
750
- type: "select",
751
- key: "backend",
752
- label: "Backend",
753
- description: "Hardware backend for inference acceleration",
754
- default: "cpu",
755
- options: [
756
- {
757
- label: "CPU",
758
- value: "cpu"
759
- },
760
- {
761
- label: "CUDA",
762
- value: "cuda"
763
- },
764
- {
765
- label: "CoreML",
766
- value: "coreml"
767
- }
768
- ]
769
- }
770
- ]
719
+ fields: [{
720
+ type: "text",
721
+ key: "modelId",
722
+ label: "Model ID",
723
+ description: "CLIP model identifier to use for image/text embedding",
724
+ default: DEFAULT_CLIP_MODEL
725
+ }]
771
726
  }] });
772
727
  }
773
728
  async onConfigChanged() {}
@@ -1,4 +1,4 @@
1
- import { M as PoolMemoryWatchdog, at as hfModelUrl, gt as resolvePoolMemoryPolicy, nt as embeddingEncoderCapability, ut as parseProcStatus, wt as BaseAddon } from "../dist-BAN19J7s.mjs";
1
+ import { Dt as BaseAddon, P as PoolMemoryWatchdog, ct as hfModelUrl, it as embeddingEncoderCapability, pt as parseProcStatus, yt as resolvePoolMemoryPolicy } from "../dist-CQGjLREi.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";
@@ -551,11 +551,7 @@ var EmbeddingEncoderAddon = class extends BaseAddon {
551
551
  imageEngineInflight = null;
552
552
  textEngineInflight = null;
553
553
  constructor() {
554
- super({
555
- modelId: DEFAULT_CLIP_MODEL,
556
- runtime: "auto",
557
- backend: "cpu"
558
- });
554
+ super({ modelId: DEFAULT_CLIP_MODEL });
559
555
  }
560
556
  async onInitialize() {
561
557
  const modelsDir = await this.resolveModelsDir();
@@ -699,11 +695,7 @@ var EmbeddingEncoderAddon = class extends BaseAddon {
699
695
  }
700
696
  }
701
697
  async resolveForEntry(entry, target) {
702
- const engineLogger = this.ctx.logger.withTags({
703
- modelId: entry.id,
704
- runtime: this.config.runtime,
705
- backend: this.config.backend
706
- });
698
+ const engineLogger = this.ctx.logger.withTags({ modelId: entry.id });
707
699
  const modelPath = await this.models.ensure(entry.id, "onnx");
708
700
  const pythonPath = await this.ctx.deps.ensurePython();
709
701
  if (!pythonPath) throw new Error("EmbeddingEncoder: embedded Python is unavailable — cannot run ONNX embeddings. ctx.deps.ensurePython() returned null (portable Python download likely failed).");
@@ -732,50 +724,13 @@ var EmbeddingEncoderAddon = class extends BaseAddon {
732
724
  id: "embedding-encoder-settings",
733
725
  title: "Embedding Encoder",
734
726
  columns: 2,
735
- fields: [
736
- {
737
- type: "text",
738
- key: "modelId",
739
- label: "Model ID",
740
- description: "CLIP model identifier to use for image/text embedding",
741
- default: DEFAULT_CLIP_MODEL
742
- },
743
- {
744
- type: "select",
745
- key: "runtime",
746
- label: "Runtime",
747
- description: "Inference runtime — ONNX runs in the embedded Python.",
748
- default: "auto",
749
- options: [{
750
- label: "Auto",
751
- value: "auto"
752
- }, {
753
- label: "Python",
754
- value: "python"
755
- }]
756
- },
757
- {
758
- type: "select",
759
- key: "backend",
760
- label: "Backend",
761
- description: "Hardware backend for inference acceleration",
762
- default: "cpu",
763
- options: [
764
- {
765
- label: "CPU",
766
- value: "cpu"
767
- },
768
- {
769
- label: "CUDA",
770
- value: "cuda"
771
- },
772
- {
773
- label: "CoreML",
774
- value: "coreml"
775
- }
776
- ]
777
- }
778
- ]
727
+ fields: [{
728
+ type: "text",
729
+ key: "modelId",
730
+ label: "Model ID",
731
+ description: "CLIP model identifier to use for image/text embedding",
732
+ default: DEFAULT_CLIP_MODEL
733
+ }]
779
734
  }] });
780
735
  }
781
736
  async onConfigChanged() {}
@@ -1,6 +1,6 @@
1
1
  import { a as e, i as t, n, o as r, r as i, t as a } from "./_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare__react__loadShare__.js-C0AuF9av.mjs";
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
- 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-D_xOplZC.mjs";
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-DC69_fX2.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
5
  //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils.js
6
6
  var _ = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), v = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), y = (e) => {