@camstack/addon-post-analysis 1.2.615 → 1.2.617

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.
@@ -87097,6 +87097,12 @@ Object.defineProperty(exports, "RebuildObjectEmbeddingsRefusalSchema", {
87097
87097
  return RebuildObjectEmbeddingsRefusalSchema;
87098
87098
  }
87099
87099
  });
87100
+ Object.defineProperty(exports, "RecordsError", {
87101
+ enumerable: true,
87102
+ get: function() {
87103
+ return RecordsError;
87104
+ }
87105
+ });
87100
87106
  Object.defineProperty(exports, "RetrainDismissedSchema", {
87101
87107
  enumerable: true,
87102
87108
  get: function() {
@@ -86358,4 +86358,4 @@ function buildClipModelRegistry(entries) {
86358
86358
  /** The built-in catalog's registry. */
86359
86359
  var BUILTIN_CLIP_MODELS = buildClipModelRegistry(CLIP_IMAGE_MODELS);
86360
86360
  //#endregion
86361
- export { MediaFileKindEnum as $, sleep as $i, coreBlockIdFromAddonId as $n, readDeviceStateFrom as $r, NcTemplateVarDescriptorSchema as $t, DeclaredDevices as A, templateCarriesSummary as Ai, TrackSideSchema as An, isEventOwnerType as Ar, NcAlarmSensorsInputSchema as At, FULL_IMAGE_BBOX as B, errMsg as Bi, applyModeDelaysEdits as Bn, kebabToCamel as Br, NcRuleSchema as Bt, ClearTrackRelationResultSchema as C, summarizeReview as Ci, TRACK_RELATIONS_DEFAULT_LIMIT as Cn, isAlertEpisodeOpen as Cr, NC_SNOOZE_MAX_MINUTES as Ct, DEFAULT_TIMELAPSE_PREVIEW_TEXT as D, systemEventFilterApplies as Di, TrackPuritySchema as Dn, isDefaultAlarmProfileId as Dr, NC_TEMPLATE_VARS as Dt, DEFAULT_EVENT_COLOR as E, systemEventFamilyProblems as Ei, TimelapseRuleSchema as En, isAudioClassName as Er, NC_TAXONOMY as Et, EVENT_DENSITY_BATCH_MAX as F, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as Fi, alarmPanelCapability as Fn, isRootSuppliableStepId as Fr, NcLegacyRuleActionSequenceSchema as Ft, ListTrackRelationsResultSchema as G, createEvent as Gi, audioMetricsCapability as Gn, normalizeNcMediaPolicy as Gr, NcSnoozeInputSchema as Gt, LABEL_SUPPLY_MACRO as H, CamProfileSchema as Hi, applySecureOnArmEdit as Hn, mayWriteToLocation as Hr, NcRuleUpdateInputSchema as Ht, EVENT_KIND_BY_CAP as I, canonicalHash as Ii, alertEpisodeId as In, isScheduleActive as Ir, NcRuleActionSchema as It, MAX_BIRTH_DECISION_RECORDS as J, defineRecordKinds as Ji, buildViewerLink as Jn, parseAlertEpisodePayload as Jr, NcStateSummarySectionIdSchema as Jt, LockStateSchema as K, customAction as Ki, audioModeOf as Kn, notificationRulesCapability as Kr, NcSnoozeSchema as Kt, EVENT_OWNER_TYPES as L, evaluateSensorEdge as Li, alertEpisodeKind as Ln, isSystemDelivery as Lr, NcRuleActionsSchema as Lt, EMBEDDING_MODEL_FAILED as M, vectorDimFromBase64 as Mi, activateAlarmProfile as Mn, isLabelSupplyStepId as Mr, NcAlarmSettingsPatchSchema as Mt, EMBEDDING_REQUIREMENTS_FAILED as N, viewerLinkBaseOf as Ni, addonWidgetsSourceCapability as Nn, isMediaOwnerType as Nr, NcConditionDescriptorSchema as Nt, DETECTION_MACRO_CLASSES as O, systemEventSummaryScheduleOf as Oi, TrackRelationKindSchema as On, isDetectionMacroClass as Or, NcAlarmConfigSchema as Ot, EMBEDDING_REQUIREMENTS_UNAVAILABLE as P, zoneAnalyticsCapability as Pi, alarmDeviceSecureOnArm as Pn, isRetiredClearKey as Pr, NcConditionsSchema as Pt, MOTION_CLOSE_AFTER_MS as Q, normalizeNodeId as Qi, consumableLowPercentOf as Qn, plateGalleryCapability as Qr, NcTemplatePreviewSchema as Qt, EXPORT_DENSE_MAX_RANGES as R, isSourceCap as Ri, alertEpisodePayload as Rn, isSystemEventSummaryRule as Rr, NcRuleInputSchema as Rt, ClearTrackRelationInputSchema as S, subKindsOf as Si, TIMELAPSE_DENSE_FLOOR_SEC as Sn, isAlarmControllableCap as Sr, NC_SENSOR_TRANSITION_KINDS as St, DEFAULT_DETAIL_CROP_CONVENTION as T, systemEventDeliveryProblems as Ti, TimelapseRulePatchSchema as Tn, isAppLinkBase as Tr, NC_TANK_SYSTEM_EVENT_KINDS as Tt, LabelAttributionSchema as U, RECORD_MAX_DATA_BYTES as Ui, armRemovalReconcile as Un, memoizePinnedFfmpeg as Ur, NcScheduleSchema as Ut, FailureCounters as V, BaseAddon as Vi, applyNonBlockingEdit as Vn, linkedStepOf as Vr, NcRuleTargetSchema as Vt, ListTrackRelationsInputSchema as W, RECORD_QUERY_MAX as Wi, assertTimelapseCadences as Wn, ncMediaPolicyError as Wr, NcSharedSequenceSchema as Wt, MAX_TRACK_PURITIES as X, isDeviceScopedCap as Xi, classifyRetrainReview as Xn, pickFaceRescoreIntervalMinutes as Xr, NcTaxonomySchema as Xt, MAX_BIRTH_LATENCY_PROXY_MS as Y, hydrateSchema as Yi, calendarEventLocalSpan as Yn, parseProcStatus as Yr, NcSystemEventKindSchema as Yt, MAX_TRACK_RELATIONS as Z, nodePin as Zi, cloneAlarmSettings as Zn, pipelineAnalyticsCapability as Zr, NcTemplatePreviewInputSchema as Zt, BIRTH_DECISION_DEFAULT_LIMIT as _, EventCategory as _a, secureActuationFor as _i, SCENE_RESET_RECAPTURES as _n, evictionPolicyOfLocation as _r, NC_CONSUMABLE_SYSTEM_EVENT_KINDS as _t, CLIP_EMBEDDING_STEP_ID as a, literal as aa, resolveModeDelays as ai, RebuildObjectEmbeddingsRefusalSchema as an, deriveRecordingMode as ar, NC_ALARM_NOTIFY_FIELDS as at, BucketAccumulator as b, startMoverUnderClearance as bi, SetTrackPurityResultSchema as bn, gifDeriveSpeed as br, NC_GROUPING_MAX_SEC as bt, readClusterModelPinStrict as c, object as ca, resolvePoolMemoryPolicy as ci, RetrainStatusSchema as cn, deviceRemovalHookCapability as cr, NC_AUDIO_CONFIRM_HITS_DEFAULT as ct, APPEARANCE_BLOCKS as d, strictObject as da, ruleAutoTriggersAlarm as di, SCENE_DEFAULT_ANCHOR_THRESHOLD as dn, embeddingRefusalOf as dr, NC_CLIP_PRE_ROLL_DEFAULT_SEC as dt, ZodObject as ea, readMotionTriggeredBy as ei, OPS_LOG_DEFAULT_LIMIT as en, cosineSimilarity as er, MotionTriggeredBySchema as et, APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT as f, string as fa, ruleBelongsToAlarm as fi, SCENE_DEFAULT_CHECK_INTERVAL_SEC as fn, embeddingRequirementsFailedError as fr, NC_CLIP_RETENTION_MAX_SEC as ft, ArchivedDebugNoteSchema as g, unknown as ga, sceneMonitorCapability as gi, SCENE_DIVERGED as gn, eventKindLabel as gr, NC_CONSUMABLE_LOW_PERCENT_DEFAULT as gt, AlarmArmModeSchema as h, union as ha, ruleKindOf as hi, SCENE_DEFAULT_UNCOVERED_POLICY as hn, ensureAlarmProfiles as hr, NC_CONFIRM_DEFAULT_TIMEOUT_MS as ht, CLIP_TEXT_MODELS as i, discriminatedUnion as ia, resolveLocationMode as ii, RECORDING_SOURCE_CAMSTACK_ADDON as in, derivePostTriggeredAction as ir, NC_ALARM_DELAY_MAX_SEC as it, DetectionSourceSchema as j, templateVarsFor as ji, TrackSourceSchema as jn, isKnownTemplateVar as jr, NcAlarmSensorsSchema as jt, DETECTION_PIPELINE_CAP_NAME as k, systemEventSummarySplitOf as ki, TrackRelationSchema as kn, isEventKindLabelKey as kr, NcAlarmPostTriggeredActionSchema as kt, resolveClusterModelPin as l, partialRecord as la, retrainRevisionConflictMessage as li, SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX as ln, embeddingEncoderCapability as lr, NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT as lt, AUDIO_MACRO_LABELS as m, tuple as ma, ruleGroupingApplies as mi, SCENE_DEFAULT_QUIET_SECONDS as mn, encodeVectorBase64 as mr, NC_CONFIRM_DEFAULT_MAX_IMAGE_PX as mt, DEFAULT_CLIP_MODEL as n, array as na, renameAlarmProfile as ni, PoolMemoryWatchdog as nn, deleteAlarmProfile as nr, NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC as nt, CLUSTER_MODEL_OWNER_ADDON_ID as o, looseObject as oa, resolveModeNotifyPolicy as oi, RetrainDismissedSchema as on, describeSystemEventDeliveryProblem as or, NC_ALARM_SYSTEM_EVENT_KINDS as ot, ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT as p, templateLiteral as pa, ruleDeviceCompatCapQueries as pi, SCENE_DEFAULT_OBSERVATION_SPACING_SEC as pn, embeddingRequirementsUnavailableError as pr, NC_CONDITION_CATALOG as pt, MAX_ARCHIVED_DEBUG_NOTES as q, defineCustomActions as qi, buildEventKindDescriptor as qn, occupancyScope as qr, NcSnoozeSuppressedSchema as qt, CLIP_IMAGE_MODELS as r, boolean as ra, resolveClipSearchMinScore as ri, RECORDING_EXPORT_MAX_READ_BYTES as rn, deriveDetailCropRect as rr, NC_ALARM_DELAY_FIELDS as rt, FACE_EMBEDDING_STEP_ID as s, number as sa, resolveNcMediaImage as si, RetrainOriginSchema as sn, describeSystemEventFamilyProblem as sr, NC_ALARM_TRIGGERED_MAX_SEC as st, BUILTIN_CLIP_MODELS as t, _enum as ta, readTimelapseGeneratedAt as ti, OpsLogEntrySchema as tn, createAlarmProfile as tr, NC_ALARM_DEFAULT_PROFILE_ID as tt, APPEARANCE_BIN_COUNT as u, record as ua, rootSupplyServes as ui, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS as un, embeddingModelFailedError as ur, NC_CLIP_POST_ROLL_DEFAULT_SEC as ut, BaseDevice as v, sensorRaisedOf as vi, SceneMonitorSchema as vn, faceGalleryCapability as vr, NC_DEFAULT_SNOOZE_MINUTES as vt, CoverStateSchema as w, syncActiveAlarmProfileSettings as wi, TimelapseRuleInputSchema as wn, isAlertEpisodeSeverity as wr, NC_SYSTEM_EVENT_KIND_GROUP_SPECS as wt, COCO_TO_MACRO as x, storageOccupancyCapability as xi, SetTrackRelationInputSchema as xn, gifFromMp4Args as xr, NC_GROUPING_MIN_SEC as xt, BirthDecisionRecordSchema as y, servedTemplateVars as yi, SetTrackPurityInputSchema as yn, failureContributionCapability as yr, NC_GROUPING_DEFAULT_SEC as yt, FIRST_LEVEL_MACRO_CLASSES as z, DeviceType as zi, applyBlockingEdit as zn, isVectorIndexDimConflict as zr, NcRulePatchSchema as zt };
86361
+ export { MediaFileKindEnum as $, normalizeNodeId as $i, coreBlockIdFromAddonId as $n, readDeviceStateFrom as $r, NcTemplateVarDescriptorSchema as $t, DeclaredDevices as A, templateCarriesSummary as Ai, TrackSideSchema as An, isEventOwnerType as Ar, NcAlarmSensorsInputSchema as At, FULL_IMAGE_BBOX as B, errMsg as Bi, applyModeDelaysEdits as Bn, kebabToCamel as Br, NcRuleSchema as Bt, ClearTrackRelationResultSchema as C, summarizeReview as Ci, TRACK_RELATIONS_DEFAULT_LIMIT as Cn, isAlertEpisodeOpen as Cr, NC_SNOOZE_MAX_MINUTES as Ct, DEFAULT_TIMELAPSE_PREVIEW_TEXT as D, systemEventFilterApplies as Di, TrackPuritySchema as Dn, isDefaultAlarmProfileId as Dr, NC_TEMPLATE_VARS as Dt, DEFAULT_EVENT_COLOR as E, systemEventFamilyProblems as Ei, TimelapseRuleSchema as En, isAudioClassName as Er, NC_TAXONOMY as Et, EVENT_DENSITY_BATCH_MAX as F, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as Fi, alarmPanelCapability as Fn, isRootSuppliableStepId as Fr, NcLegacyRuleActionSequenceSchema as Ft, ListTrackRelationsResultSchema as G, RecordsError as Gi, audioMetricsCapability as Gn, normalizeNcMediaPolicy as Gr, NcSnoozeInputSchema as Gt, LABEL_SUPPLY_MACRO as H, CamProfileSchema as Hi, applySecureOnArmEdit as Hn, mayWriteToLocation as Hr, NcRuleUpdateInputSchema as Ht, EVENT_KIND_BY_CAP as I, canonicalHash as Ii, alertEpisodeId as In, isScheduleActive as Ir, NcRuleActionSchema as It, MAX_BIRTH_DECISION_RECORDS as J, defineCustomActions as Ji, buildViewerLink as Jn, parseAlertEpisodePayload as Jr, NcStateSummarySectionIdSchema as Jt, LockStateSchema as K, createEvent as Ki, audioModeOf as Kn, notificationRulesCapability as Kr, NcSnoozeSchema as Kt, EVENT_OWNER_TYPES as L, evaluateSensorEdge as Li, alertEpisodeKind as Ln, isSystemDelivery as Lr, NcRuleActionsSchema as Lt, EMBEDDING_MODEL_FAILED as M, vectorDimFromBase64 as Mi, activateAlarmProfile as Mn, isLabelSupplyStepId as Mr, NcAlarmSettingsPatchSchema as Mt, EMBEDDING_REQUIREMENTS_FAILED as N, viewerLinkBaseOf as Ni, addonWidgetsSourceCapability as Nn, isMediaOwnerType as Nr, NcConditionDescriptorSchema as Nt, DETECTION_MACRO_CLASSES as O, systemEventSummaryScheduleOf as Oi, TrackRelationKindSchema as On, isDetectionMacroClass as Or, NcAlarmConfigSchema as Ot, EMBEDDING_REQUIREMENTS_UNAVAILABLE as P, zoneAnalyticsCapability as Pi, alarmDeviceSecureOnArm as Pn, isRetiredClearKey as Pr, NcConditionsSchema as Pt, MOTION_CLOSE_AFTER_MS as Q, nodePin as Qi, consumableLowPercentOf as Qn, plateGalleryCapability as Qr, NcTemplatePreviewSchema as Qt, EXPORT_DENSE_MAX_RANGES as R, isSourceCap as Ri, alertEpisodePayload as Rn, isSystemEventSummaryRule as Rr, NcRuleInputSchema as Rt, ClearTrackRelationInputSchema as S, subKindsOf as Si, TIMELAPSE_DENSE_FLOOR_SEC as Sn, isAlarmControllableCap as Sr, NC_SENSOR_TRANSITION_KINDS as St, DEFAULT_DETAIL_CROP_CONVENTION as T, systemEventDeliveryProblems as Ti, TimelapseRulePatchSchema as Tn, isAppLinkBase as Tr, NC_TANK_SYSTEM_EVENT_KINDS as Tt, LabelAttributionSchema as U, RECORD_MAX_DATA_BYTES as Ui, armRemovalReconcile as Un, memoizePinnedFfmpeg as Ur, NcScheduleSchema as Ut, FailureCounters as V, BaseAddon as Vi, applyNonBlockingEdit as Vn, linkedStepOf as Vr, NcRuleTargetSchema as Vt, ListTrackRelationsInputSchema as W, RECORD_QUERY_MAX as Wi, assertTimelapseCadences as Wn, ncMediaPolicyError as Wr, NcSharedSequenceSchema as Wt, MAX_TRACK_PURITIES as X, hydrateSchema as Xi, classifyRetrainReview as Xn, pickFaceRescoreIntervalMinutes as Xr, NcTaxonomySchema as Xt, MAX_BIRTH_LATENCY_PROXY_MS as Y, defineRecordKinds as Yi, calendarEventLocalSpan as Yn, parseProcStatus as Yr, NcSystemEventKindSchema as Yt, MAX_TRACK_RELATIONS as Z, isDeviceScopedCap as Zi, cloneAlarmSettings as Zn, pipelineAnalyticsCapability as Zr, NcTemplatePreviewInputSchema as Zt, BIRTH_DECISION_DEFAULT_LIMIT as _, unknown as _a, secureActuationFor as _i, SCENE_RESET_RECAPTURES as _n, evictionPolicyOfLocation as _r, NC_CONSUMABLE_SYSTEM_EVENT_KINDS as _t, CLIP_EMBEDDING_STEP_ID as a, discriminatedUnion as aa, resolveModeDelays as ai, RebuildObjectEmbeddingsRefusalSchema as an, deriveRecordingMode as ar, NC_ALARM_NOTIFY_FIELDS as at, BucketAccumulator as b, startMoverUnderClearance as bi, SetTrackPurityResultSchema as bn, gifDeriveSpeed as br, NC_GROUPING_MAX_SEC as bt, readClusterModelPinStrict as c, number as ca, resolvePoolMemoryPolicy as ci, RetrainStatusSchema as cn, deviceRemovalHookCapability as cr, NC_AUDIO_CONFIRM_HITS_DEFAULT as ct, APPEARANCE_BLOCKS as d, record as da, ruleAutoTriggersAlarm as di, SCENE_DEFAULT_ANCHOR_THRESHOLD as dn, embeddingRefusalOf as dr, NC_CLIP_PRE_ROLL_DEFAULT_SEC as dt, sleep as ea, readMotionTriggeredBy as ei, OPS_LOG_DEFAULT_LIMIT as en, cosineSimilarity as er, MotionTriggeredBySchema as et, APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT as f, strictObject as fa, ruleBelongsToAlarm as fi, SCENE_DEFAULT_CHECK_INTERVAL_SEC as fn, embeddingRequirementsFailedError as fr, NC_CLIP_RETENTION_MAX_SEC as ft, ArchivedDebugNoteSchema as g, union as ga, sceneMonitorCapability as gi, SCENE_DIVERGED as gn, eventKindLabel as gr, NC_CONSUMABLE_LOW_PERCENT_DEFAULT as gt, AlarmArmModeSchema as h, tuple as ha, ruleKindOf as hi, SCENE_DEFAULT_UNCOVERED_POLICY as hn, ensureAlarmProfiles as hr, NC_CONFIRM_DEFAULT_TIMEOUT_MS as ht, CLIP_TEXT_MODELS as i, boolean as ia, resolveLocationMode as ii, RECORDING_SOURCE_CAMSTACK_ADDON as in, derivePostTriggeredAction as ir, NC_ALARM_DELAY_MAX_SEC as it, DetectionSourceSchema as j, templateVarsFor as ji, TrackSourceSchema as jn, isKnownTemplateVar as jr, NcAlarmSensorsSchema as jt, DETECTION_PIPELINE_CAP_NAME as k, systemEventSummarySplitOf as ki, TrackRelationSchema as kn, isEventKindLabelKey as kr, NcAlarmPostTriggeredActionSchema as kt, resolveClusterModelPin as l, object as la, retrainRevisionConflictMessage as li, SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX as ln, embeddingEncoderCapability as lr, NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT as lt, AUDIO_MACRO_LABELS as m, templateLiteral as ma, ruleGroupingApplies as mi, SCENE_DEFAULT_QUIET_SECONDS as mn, encodeVectorBase64 as mr, NC_CONFIRM_DEFAULT_MAX_IMAGE_PX as mt, DEFAULT_CLIP_MODEL as n, _enum as na, renameAlarmProfile as ni, PoolMemoryWatchdog as nn, deleteAlarmProfile as nr, NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC as nt, CLUSTER_MODEL_OWNER_ADDON_ID as o, literal as oa, resolveModeNotifyPolicy as oi, RetrainDismissedSchema as on, describeSystemEventDeliveryProblem as or, NC_ALARM_SYSTEM_EVENT_KINDS as ot, ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT as p, string as pa, ruleDeviceCompatCapQueries as pi, SCENE_DEFAULT_OBSERVATION_SPACING_SEC as pn, embeddingRequirementsUnavailableError as pr, NC_CONDITION_CATALOG as pt, MAX_ARCHIVED_DEBUG_NOTES as q, customAction as qi, buildEventKindDescriptor as qn, occupancyScope as qr, NcSnoozeSuppressedSchema as qt, CLIP_IMAGE_MODELS as r, array as ra, resolveClipSearchMinScore as ri, RECORDING_EXPORT_MAX_READ_BYTES as rn, deriveDetailCropRect as rr, NC_ALARM_DELAY_FIELDS as rt, FACE_EMBEDDING_STEP_ID as s, looseObject as sa, resolveNcMediaImage as si, RetrainOriginSchema as sn, describeSystemEventFamilyProblem as sr, NC_ALARM_TRIGGERED_MAX_SEC as st, BUILTIN_CLIP_MODELS as t, ZodObject as ta, readTimelapseGeneratedAt as ti, OpsLogEntrySchema as tn, createAlarmProfile as tr, NC_ALARM_DEFAULT_PROFILE_ID as tt, APPEARANCE_BIN_COUNT as u, partialRecord as ua, rootSupplyServes as ui, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS as un, embeddingModelFailedError as ur, NC_CLIP_POST_ROLL_DEFAULT_SEC as ut, BaseDevice as v, EventCategory as va, sensorRaisedOf as vi, SceneMonitorSchema as vn, faceGalleryCapability as vr, NC_DEFAULT_SNOOZE_MINUTES as vt, CoverStateSchema as w, syncActiveAlarmProfileSettings as wi, TimelapseRuleInputSchema as wn, isAlertEpisodeSeverity as wr, NC_SYSTEM_EVENT_KIND_GROUP_SPECS as wt, COCO_TO_MACRO as x, storageOccupancyCapability as xi, SetTrackRelationInputSchema as xn, gifFromMp4Args as xr, NC_GROUPING_MIN_SEC as xt, BirthDecisionRecordSchema as y, servedTemplateVars as yi, SetTrackPurityInputSchema as yn, failureContributionCapability as yr, NC_GROUPING_DEFAULT_SEC as yt, FIRST_LEVEL_MACRO_CLASSES as z, DeviceType as zi, applyBlockingEdit as zn, isVectorIndexDimConflict as zr, NcRulePatchSchema 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_clip_model_registry = require("../clip-model-registry-ycbGgfo_.js");
5
+ const require_clip_model_registry = require("../clip-model-registry-CYWuH4Rx.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");
@@ -1,4 +1,4 @@
1
- import { Qi as normalizeNodeId, Vi as BaseAddon, Yr as parseProcStatus, a as CLIP_EMBEDDING_STEP_ID, ci as resolvePoolMemoryPolicy, fr as embeddingRequirementsFailedError, i as CLIP_TEXT_MODELS, l as resolveClusterModelPin, lr as embeddingEncoderCapability, n as DEFAULT_CLIP_MODEL, nn as PoolMemoryWatchdog, pr as embeddingRequirementsUnavailableError, r as CLIP_IMAGE_MODELS, t as BUILTIN_CLIP_MODELS, ur as embeddingModelFailedError } from "../clip-model-registry-BtK1fPgi.mjs";
1
+ import { $i as normalizeNodeId, Vi as BaseAddon, Yr as parseProcStatus, a as CLIP_EMBEDDING_STEP_ID, ci as resolvePoolMemoryPolicy, fr as embeddingRequirementsFailedError, i as CLIP_TEXT_MODELS, l as resolveClusterModelPin, lr as embeddingEncoderCapability, n as DEFAULT_CLIP_MODEL, nn as PoolMemoryWatchdog, pr as embeddingRequirementsUnavailableError, r as CLIP_IMAGE_MODELS, t as BUILTIN_CLIP_MODELS, ur as embeddingModelFailedError } from "../clip-model-registry-D6yfX_Xq.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";
@@ -3,7 +3,7 @@ import "./dist-CYZr2fwk.mjs";
3
3
  var e = {
4
4
  "@camstack/sdk": {
5
5
  name: "@camstack/sdk",
6
- version: "1.2.140",
6
+ version: "1.2.142",
7
7
  scope: ["default"],
8
8
  loaded: !1,
9
9
  from: "addon_pipeline_analytics_widgets",
@@ -18,7 +18,7 @@ var e = {
18
18
  },
19
19
  "@camstack/types": {
20
20
  name: "@camstack/types",
21
- version: "1.2.390",
21
+ version: "1.2.392",
22
22
  scope: ["default"],
23
23
  loaded: !1,
24
24
  from: "addon_pipeline_analytics_widgets",
@@ -33,7 +33,7 @@ var e = {
33
33
  },
34
34
  "@camstack/ui-library": {
35
35
  name: "@camstack/ui-library",
36
- version: "1.2.307",
36
+ version: "1.2.309",
37
37
  scope: ["default"],
38
38
  loaded: !1,
39
39
  from: "addon_pipeline_analytics_widgets",
@@ -36,7 +36,7 @@ async function r() {
36
36
  }
37
37
  },
38
38
  "@camstack/types": {
39
- version: "1.2.390",
39
+ version: "1.2.392",
40
40
  scope: "default",
41
41
  shareConfig: {
42
42
  singleton: !0,
@@ -45,7 +45,7 @@ async function r() {
45
45
  }
46
46
  },
47
47
  "@camstack/sdk": {
48
- version: "1.2.140",
48
+ version: "1.2.142",
49
49
  scope: "default",
50
50
  shareConfig: {
51
51
  singleton: !0,
@@ -81,7 +81,7 @@ async function r() {
81
81
  }
82
82
  },
83
83
  "@camstack/ui-library": {
84
- version: "1.2.307",
84
+ version: "1.2.309",
85
85
  scope: "default",
86
86
  shareConfig: {
87
87
  singleton: !0,
@@ -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-ycbGgfo_.js");
5
+ const require_clip_model_registry = require("../clip-model-registry-CYWuH4Rx.js");
6
6
  let node_fs = require("node:fs");
7
7
  node_fs = require_clip_model_registry.__toESM(node_fs, 1);
8
8
  let node_path = require("node:path");
@@ -5004,6 +5004,7 @@ function artifactShelfRefusal(locations, localNodeId) {
5004
5004
  //#endregion
5005
5005
  //#region ../types/dist/node.mjs
5006
5006
  var node_exports = /* @__PURE__ */ require_clip_model_registry.__exportAll({
5007
+ EDGETPU_DELEGATE_RELEASE: () => EDGETPU_DELEGATE_RELEASE,
5007
5008
  FilesystemStorageProvider: () => FilesystemStorageProvider,
5008
5009
  PYTHON_VERSION: () => PYTHON_VERSION,
5009
5010
  signExpiringUrl: () => signExpiringUrl,
@@ -5031,6 +5032,9 @@ process.platform, process.env["SystemRoot"];
5031
5032
  */
5032
5033
  var PYTHON_VERSION = "3.12.12";
5033
5034
  `${PYTHON_VERSION}`;
5035
+ /** The pinned feranick release. Changing it is the delegate version change. */
5036
+ var EDGETPU_DELEGATE_RELEASE = "16.0TF2.17.1-1";
5037
+ `${EDGETPU_DELEGATE_RELEASE}`;
5034
5038
  /** Errors a Windows rename over a file another process has open can raise. */
5035
5039
  var WINDOWS_RENAME_BUSY = new Set([
5036
5040
  "EPERM",
@@ -9384,9 +9388,16 @@ var IdentityConfigBodySchema = require_clip_model_registry.object({
9384
9388
  sampleCount: require_clip_model_registry.number(),
9385
9389
  coverMediaId: require_clip_model_registry.number().nullable().optional()
9386
9390
  });
9387
- /** Enrolled face sample (`addedAt` → record `at`; vector in index). */
9391
+ /**
9392
+ * Enrolled face sample (`addedAt` → record `at`; vector in index).
9393
+ *
9394
+ * `addedAt` is ALSO in the body: the `identity_added` index names it, and an
9395
+ * index reads the body, never the header. Optional only because rows written
9396
+ * before the fix lack it until `records.backfillIndexFields` runs.
9397
+ */
9388
9398
  var IdentitySampleLedgerBodySchema = require_clip_model_registry.object({
9389
9399
  identityId: require_clip_model_registry.string(),
9400
+ addedAt: require_clip_model_registry.number().optional(),
9390
9401
  embedding: require_clip_model_registry.array(require_clip_model_registry.number()).optional(),
9391
9402
  mediaId: require_clip_model_registry.number().optional(),
9392
9403
  sourceMediaId: require_clip_model_registry.number().optional(),
@@ -9406,9 +9417,10 @@ var VehicleConfigBodySchema = require_clip_model_registry.object({
9406
9417
  sampleCount: require_clip_model_registry.number(),
9407
9418
  coverMediaId: require_clip_model_registry.number().nullable().optional()
9408
9419
  });
9409
- /** Enrolled plate read (`addedAt` → record `at`). */
9420
+ /** Enrolled plate read (`addedAt` → record `at`, and in the body for `vehicle_added`). */
9410
9421
  var VehicleSampleLedgerBodySchema = require_clip_model_registry.object({
9411
9422
  vehicleId: require_clip_model_registry.string(),
9423
+ addedAt: require_clip_model_registry.number().optional(),
9412
9424
  text: require_clip_model_registry.string(),
9413
9425
  score: require_clip_model_registry.number(),
9414
9426
  sourcePlateId: require_clip_model_registry.string().optional(),
@@ -11785,8 +11797,14 @@ var DebugNoteArchiveStore = class {
11785
11797
  };
11786
11798
  //#endregion
11787
11799
  //#region src/pipeline-analytics/store/event-ledger-collection.ts
11800
+ /**
11801
+ * One trackless event ledger (motion, audio, or sensor) on settings-store
11802
+ * (agents) or `ctx.records` (hub after phase 5).
11803
+ */
11788
11804
  /** Matches {@link EventStore.LEDGER_PAGE_SIZE} — kept local to avoid a circular import. */
11789
11805
  var LEDGER_PAGE_SIZE = 500;
11806
+ /** A backfill patch refused for one of these lost a race with the row's writer, nothing more. */
11807
+ var RACED_CODES = new Set(["rev-conflict", "not-found"]);
11790
11808
  var EventLedgerCollection = class EventLedgerCollection {
11791
11809
  collection;
11792
11810
  store;
@@ -11795,6 +11813,8 @@ var EventLedgerCollection = class EventLedgerCollection {
11795
11813
  legacyAtField;
11796
11814
  deviceIdMode;
11797
11815
  logger;
11816
+ /** Body fields a declared index names that the header also carries (see {@link backfillIndexFields}). */
11817
+ headerIndexFields;
11798
11818
  constructor(deps) {
11799
11819
  this.collection = deps.collection;
11800
11820
  this.store = deps.store;
@@ -11802,6 +11822,7 @@ var EventLedgerCollection = class EventLedgerCollection {
11802
11822
  this.legacyAtField = deps.legacyAtField ?? "timestamp";
11803
11823
  this.deviceIdMode = deps.deviceIdMode ?? "required";
11804
11824
  this.logger = deps.logger;
11825
+ this.headerIndexFields = headerIndexFieldsOf(deps.definition, this.legacyAtField);
11805
11826
  if (deps.records !== void 0) {
11806
11827
  const handle = deps.records.kind(deps.definition);
11807
11828
  this.kind = handle;
@@ -12048,6 +12069,73 @@ var EventLedgerCollection = class EventLedgerCollection {
12048
12069
  nextCursor: page.nextCursor
12049
12070
  };
12050
12071
  }
12072
+ /**
12073
+ * Copy the header values a declared index needs into the body of rows that
12074
+ * lack them — a bounded keyset walk of the kind in `at` order per call.
12075
+ *
12076
+ * An index reads the BODY (`json_extract(data, …)`), never the header. Until
12077
+ * this fix the writer moved the clock (`timestamp`, `addedAt` …) into `at`
12078
+ * only, and the records adoption did the same with `deviceId`, so a `where`
12079
+ * page of such a kind found no ordering value on the last row and threw
12080
+ * "cannot be paged". The value is derivable — the header holds it — so the
12081
+ * repair is a merge patch guarded by `ifRev`: a row rewritten since it was
12082
+ * read is left to its writer (which now writes the field) and counted.
12083
+ *
12084
+ * `dryRun` patches nothing and reports the same counts.
12085
+ */
12086
+ async backfillIndexFields(input) {
12087
+ if (this.kind === null) throw new Error(`event ledger ${this.collection}: backfillIndexFields needs the records kind`);
12088
+ const missingByField = {};
12089
+ let scanned = 0;
12090
+ let missing = 0;
12091
+ let patched = 0;
12092
+ let raced = 0;
12093
+ let cursor = input.cursor;
12094
+ while (scanned < input.maxRows) {
12095
+ const page = await this.kind.query({
12096
+ order: "at",
12097
+ limit: Math.min(LEDGER_PAGE_SIZE, input.maxRows - scanned),
12098
+ ...cursor === null ? {} : { cursor }
12099
+ });
12100
+ for (const row of page.records) {
12101
+ scanned += 1;
12102
+ const patch = this.headerPatchFor(row);
12103
+ const fields = Object.keys(patch);
12104
+ if (fields.length === 0) continue;
12105
+ missing += 1;
12106
+ for (const f of fields) missingByField[f] = (missingByField[f] ?? 0) + 1;
12107
+ if (input.dryRun) continue;
12108
+ try {
12109
+ await this.kind.patch(row.id, patch, { ifRev: row.rev });
12110
+ patched += 1;
12111
+ } catch (err) {
12112
+ if (!(err instanceof require_clip_model_registry.RecordsError) || !RACED_CODES.has(err.code)) throw err;
12113
+ raced += 1;
12114
+ }
12115
+ }
12116
+ cursor = page.nextCursor;
12117
+ if (cursor === null) break;
12118
+ }
12119
+ return {
12120
+ kind: this.kind.name,
12121
+ fields: this.headerIndexFields.map((f) => f.field),
12122
+ scanned,
12123
+ missing,
12124
+ missingByField,
12125
+ patched,
12126
+ raced,
12127
+ nextCursor: cursor
12128
+ };
12129
+ }
12130
+ headerPatchFor(row) {
12131
+ const patch = {};
12132
+ for (const { field, from } of this.headerIndexFields) {
12133
+ if (row.data[field] !== void 0 && row.data[field] !== null) continue;
12134
+ const value = from === "at" ? row.at : row.deviceId;
12135
+ if (typeof value === "number") patch[field] = value;
12136
+ }
12137
+ return patch;
12138
+ }
12051
12139
  async getManyByIds(ids) {
12052
12140
  if (ids.length === 0) return [];
12053
12141
  if (this.kind === null) return (await this.store.query.query({
@@ -12126,7 +12214,7 @@ var EventLedgerCollection = class EventLedgerCollection {
12126
12214
  atFrom: mapped.atFrom,
12127
12215
  atTo: mapped.atTo,
12128
12216
  where: mapped.where,
12129
- order: "at",
12217
+ ...mapped.where === void 0 ? { order: "at" } : {},
12130
12218
  desc: mapped.desc,
12131
12219
  limit: LEDGER_PAGE_SIZE,
12132
12220
  ...cursor === void 0 ? {} : { cursor }
@@ -12203,7 +12291,6 @@ var EventLedgerCollection = class EventLedgerCollection {
12203
12291
  count: await this.kind.count({ where: { assigned: false } }),
12204
12292
  maxTimestamp: (await this.kind.query({
12205
12293
  where: { assigned: false },
12206
- order: "at",
12207
12294
  desc: true,
12208
12295
  limit: 1
12209
12296
  })).records[0]?.at ?? null
@@ -12259,7 +12346,7 @@ var EventLedgerCollection = class EventLedgerCollection {
12259
12346
  const at = readLegacyClock(record, this.legacyAtField);
12260
12347
  if (at === void 0) return null;
12261
12348
  if (this.deviceIdMode === "required" && typeof deviceId !== "number") return null;
12262
- const body = eventBodyFromLegacyRecord(record, this.legacyAtField);
12349
+ const body = eventBodyFromLegacyRecord(record);
12263
12350
  return {
12264
12351
  id,
12265
12352
  ...typeof deviceId === "number" ? { deviceId } : {},
@@ -12272,14 +12359,36 @@ function readLegacyClock(record, field) {
12272
12359
  const v = record[field];
12273
12360
  return typeof v === "number" ? v : void 0;
12274
12361
  }
12275
- function eventBodyFromLegacyRecord(record, legacyAtField) {
12362
+ /**
12363
+ * The record body of a legacy-shaped row: everything but `id`.
12364
+ *
12365
+ * The clock stays in the body although it is also the header's `at`: the
12366
+ * kinds' indexes name the BODY field (`assigned_ts` → `timestamp`,
12367
+ * `identity_added` → `addedAt` …), and a row without it cannot be paged
12368
+ * through any of them. Stripping it here is what broke every faces page.
12369
+ */
12370
+ function eventBodyFromLegacyRecord(record) {
12276
12371
  const out = {};
12277
12372
  for (const [key, value] of Object.entries(record)) {
12278
- if (key === "id" || key === "timestamp" || key === legacyAtField) continue;
12373
+ if (key === "id") continue;
12279
12374
  out[key] = value;
12280
12375
  }
12281
12376
  return out;
12282
12377
  }
12378
+ /** The body fields of `definition`'s indexes that mirror a header column. */
12379
+ function headerIndexFieldsOf(definition, legacyAtField) {
12380
+ const named = new Set(definition.declaration.indexes.flatMap((i) => i.fields));
12381
+ const out = [];
12382
+ if (named.has(legacyAtField)) out.push({
12383
+ field: legacyAtField,
12384
+ from: "at"
12385
+ });
12386
+ if (named.has("deviceId")) out.push({
12387
+ field: "deviceId",
12388
+ from: "deviceId"
12389
+ });
12390
+ return out;
12391
+ }
12283
12392
  function recordsRowToLegacy(row, legacyAtField) {
12284
12393
  const deviceId = row.deviceId ?? row.data["deviceId"];
12285
12394
  const clock = row.at ?? readLegacyClock(row.data, legacyAtField);
@@ -79389,6 +79498,97 @@ async function forgetMissingMediaRows(deps, rawInput) {
79389
79498
  };
79390
79499
  }
79391
79500
  //#endregion
79501
+ //#region src/pipeline-analytics/store/ledger-index-backfill.ts
79502
+ /**
79503
+ * The operator door for repairing ledger rows whose BODY lacks a field a
79504
+ * declared index names (`records.backfillIndexFields`).
79505
+ *
79506
+ * Until the fix the event-ledger writer moved the clock (`timestamp`,
79507
+ * `addedAt`, `updatedAt` …) into the record header `at` only, and the records
79508
+ * adoption also left `deviceId` header-only. Indexes read the body, so any
79509
+ * `where` page of such a kind (faces `assigned_ts`, plates `vehicle_ts`,
79510
+ * identity samples `identity_added` …) refused to page: "a row has no value for
79511
+ * an ordering field". The writer now keeps the body field; this copies the
79512
+ * header value into rows written before it. It is a repair of derivable data,
79513
+ * not a migration: nothing is read from anywhere but the row itself.
79514
+ *
79515
+ * One kind per call, bounded, resumable: `dryRun` defaults to `true` (counts
79516
+ * only); pass the returned `nextCursor` back until it is `null`.
79517
+ */
79518
+ /** Hard ceiling on rows one call examines — the call is synchronous. */
79519
+ var LEDGER_BACKFILL_MAX_ROWS = 5e4;
79520
+ var LEDGER_BACKFILL_DEFAULT_ROWS = 2e4;
79521
+ /** Every event ledger, by its records kind name. A kind with nothing to backfill reports `fields: []`. */
79522
+ var LEDGER_WIRES = {
79523
+ faces: wireFaceLedger,
79524
+ plates: wirePlateLedger,
79525
+ identities: wireIdentityLedger,
79526
+ "identity-samples": wireIdentitySampleLedger,
79527
+ vehicles: wireVehicleLedger,
79528
+ "vehicle-samples": wireVehicleSampleLedger,
79529
+ "track-aliases": wireTrackAliasLedger,
79530
+ "track-purity": wireTrackPurityLedger,
79531
+ "track-relations": wireTrackRelationsLedger,
79532
+ "tracking-tapes": wireTrackingTapeLedger,
79533
+ "motion-events": wireMotionEventLedger,
79534
+ "audio-events": wireAudioEventLedger,
79535
+ "sensor-events": wireSensorEventLedger,
79536
+ "birth-decision-ledger": wireBirthDecisionLedger,
79537
+ "debug-note-archive": wireDebugNoteArchiveLedger,
79538
+ "ops-log": wireOpsLogLedger,
79539
+ "retrain-frames": wireRetrainFrameLedger,
79540
+ "retrain-annotations": wireRetrainAnnotationLedger,
79541
+ "retrain-collections": wireRetrainCollectionLedger,
79542
+ "retrain-collection-frames": wireRetrainCollectionFrameLedger
79543
+ };
79544
+ function isLedgerKindName(name) {
79545
+ return Object.hasOwn(LEDGER_WIRES, name);
79546
+ }
79547
+ var [FIRST_LEDGER_KIND, ...OTHER_LEDGER_KINDS] = Object.keys(LEDGER_WIRES).filter(isLedgerKindName);
79548
+ if (FIRST_LEDGER_KIND === void 0) throw new Error("ledger-index-backfill: no ledger kinds");
79549
+ var LedgerBackfillInputSchema = require_clip_model_registry.object({
79550
+ kind: require_clip_model_registry._enum([FIRST_LEDGER_KIND, ...OTHER_LEDGER_KINDS]),
79551
+ dryRun: require_clip_model_registry.boolean().default(true),
79552
+ /** The previous call's `nextCursor`. Omitted / null starts from the top. */
79553
+ cursor: require_clip_model_registry.string().min(1).nullable().optional(),
79554
+ /** Rows examined in this call. Default 20 000, max {@link LEDGER_BACKFILL_MAX_ROWS}. */
79555
+ maxRows: require_clip_model_registry.number().int().min(1).max(LEDGER_BACKFILL_MAX_ROWS).optional()
79556
+ });
79557
+ var LedgerBackfillResultSchema = require_clip_model_registry.object({
79558
+ kind: require_clip_model_registry.string(),
79559
+ dryRun: require_clip_model_registry.boolean(),
79560
+ /** The body fields this kind's indexes need from the header (`[]` = nothing to repair). */
79561
+ fields: require_clip_model_registry.array(require_clip_model_registry.string()),
79562
+ scanned: require_clip_model_registry.number().int(),
79563
+ /** Rows lacking at least one of `fields`. */
79564
+ missing: require_clip_model_registry.number().int(),
79565
+ missingByField: require_clip_model_registry.record(require_clip_model_registry.string(), require_clip_model_registry.number().int()),
79566
+ /** Rows patched (0 on a dry run). */
79567
+ patched: require_clip_model_registry.number().int(),
79568
+ /** Rows rewritten or deleted between the read and the patch: left to their writer. */
79569
+ raced: require_clip_model_registry.number().int(),
79570
+ /** Pass back to continue; `null` = the kind has been walked to the end. */
79571
+ nextCursor: require_clip_model_registry.string().nullable()
79572
+ });
79573
+ var ledgerIndexBackfillActions = require_clip_model_registry.defineCustomActions({ "records.backfillIndexFields": require_clip_model_registry.customAction(LedgerBackfillInputSchema, LedgerBackfillResultSchema, {
79574
+ kind: "mutation",
79575
+ auth: "admin"
79576
+ }) });
79577
+ /** Run one bounded backfill page of `input.kind` through its ledger. */
79578
+ async function backfillLedgerIndexFields(wiring, rawInput) {
79579
+ const input = LedgerBackfillInputSchema.parse(rawInput);
79580
+ const page = await LEDGER_WIRES[input.kind](wiring).backfillIndexFields({
79581
+ dryRun: input.dryRun,
79582
+ cursor: input.cursor ?? null,
79583
+ maxRows: input.maxRows ?? LEDGER_BACKFILL_DEFAULT_ROWS
79584
+ });
79585
+ return {
79586
+ ...page,
79587
+ fields: [...page.fields],
79588
+ dryRun: input.dryRun
79589
+ };
79590
+ }
79591
+ //#endregion
79392
79592
  //#region src/pipeline-analytics/retention/media-reclaim.ts
79393
79593
  var MEDIA_RECLAIM_SCOPES = ["motion-still", "track-filmstrip"];
79394
79594
  var DEFAULT_MEDIA_RECLAIM_LIMITS = {
@@ -115440,6 +115640,7 @@ var customActions = {
115440
115640
  ...mediaReclaimActions,
115441
115641
  ...locationDiscardActions,
115442
115642
  ...mediaForgetActions,
115643
+ ...ledgerIndexBackfillActions,
115443
115644
  ...photoEnrollActions,
115444
115645
  ...faceRescoreActions,
115445
115646
  ...stillnessCalibrationActions
@@ -117472,6 +117673,7 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends require_clip_m
117472
117673
  ...mediaReclaimActions,
117473
117674
  ...locationDiscardActions,
117474
117675
  ...mediaForgetActions,
117676
+ ...ledgerIndexBackfillActions,
117475
117677
  ...photoEnrollActions,
117476
117678
  ...faceRescoreActions,
117477
117679
  ...stillnessCalibrationActions
@@ -127282,6 +127484,11 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends require_clip_m
127282
127484
  const deps = this.mediaForgetDeps;
127283
127485
  if (deps === null) throw new Error("storage.forgetMissingMedia: not initialised");
127284
127486
  return forgetMissingMediaRows(deps, input);
127487
+ },
127488
+ "records.backfillIndexFields": async (input) => {
127489
+ const settingsStore = this.settingsStore;
127490
+ if (!settingsStore) throw new Error("records.backfillIndexFields: not initialised");
127491
+ return backfillLedgerIndexFields(this.eventLedgerWiring(settingsStore), input);
127285
127492
  }
127286
127493
  };
127287
127494
  }
@@ -1,4 +1,4 @@
1
- import { $ as MediaFileKindEnum, $i as sleep$1, $n as coreBlockIdFromAddonId, $r as readDeviceStateFrom, $t as NcTemplateVarDescriptorSchema, A as DeclaredDevices, Ai as templateCarriesSummary, An as TrackSideSchema, Ar as isEventOwnerType, At as NcAlarmSensorsInputSchema, B as FULL_IMAGE_BBOX, Bi as errMsg, Bn as applyModeDelaysEdits, Br as kebabToCamel, Bt as NcRuleSchema, C as ClearTrackRelationResultSchema, Ci as summarizeReview, Cn as TRACK_RELATIONS_DEFAULT_LIMIT, Cr as isAlertEpisodeOpen, Ct as NC_SNOOZE_MAX_MINUTES, D as DEFAULT_TIMELAPSE_PREVIEW_TEXT, Di as systemEventFilterApplies, Dn as TrackPuritySchema, Dr as isDefaultAlarmProfileId, Dt as NC_TEMPLATE_VARS, E as DEFAULT_EVENT_COLOR, Ei as systemEventFamilyProblems, En as TimelapseRuleSchema, Er as isAudioClassName, Et as NC_TAXONOMY, F as EVENT_DENSITY_BATCH_MAX, Fi as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, Fn as alarmPanelCapability, Fr as isRootSuppliableStepId, Ft as NcLegacyRuleActionSequenceSchema, G as ListTrackRelationsResultSchema, Gi as createEvent, Gn as audioMetricsCapability, Gr as normalizeNcMediaPolicy, Gt as NcSnoozeInputSchema, H as LABEL_SUPPLY_MACRO, Hi as CamProfileSchema, Hn as applySecureOnArmEdit, Hr as mayWriteToLocation, Ht as NcRuleUpdateInputSchema, I as EVENT_KIND_BY_CAP, Ii as canonicalHash, In as alertEpisodeId, Ir as isScheduleActive, It as NcRuleActionSchema, J as MAX_BIRTH_DECISION_RECORDS, Ji as defineRecordKinds, Jn as buildViewerLink, Jr as parseAlertEpisodePayload, Jt as NcStateSummarySectionIdSchema, K as LockStateSchema, Ki as customAction, Kn as audioModeOf, Kr as notificationRulesCapability, Kt as NcSnoozeSchema, L as EVENT_OWNER_TYPES, Li as evaluateSensorEdge, Ln as alertEpisodeKind, Lr as isSystemDelivery, Lt as NcRuleActionsSchema, M as EMBEDDING_MODEL_FAILED, Mi as vectorDimFromBase64, Mn as activateAlarmProfile, Mr as isLabelSupplyStepId, Mt as NcAlarmSettingsPatchSchema, N as EMBEDDING_REQUIREMENTS_FAILED, Ni as viewerLinkBaseOf, Nn as addonWidgetsSourceCapability, Nr as isMediaOwnerType, Nt as NcConditionDescriptorSchema, O as DETECTION_MACRO_CLASSES, Oi as systemEventSummaryScheduleOf, On as TrackRelationKindSchema, Or as isDetectionMacroClass, Ot as NcAlarmConfigSchema, P as EMBEDDING_REQUIREMENTS_UNAVAILABLE, Pi as zoneAnalyticsCapability, Pn as alarmDeviceSecureOnArm, Pr as isRetiredClearKey, Pt as NcConditionsSchema, Q as MOTION_CLOSE_AFTER_MS, Qn as consumableLowPercentOf, Qr as plateGalleryCapability, Qt as NcTemplatePreviewSchema, R as EXPORT_DENSE_MAX_RANGES, Ri as isSourceCap, Rn as alertEpisodePayload, Rr as isSystemEventSummaryRule, Rt as NcRuleInputSchema, S as ClearTrackRelationInputSchema, Si as subKindsOf, Sn as TIMELAPSE_DENSE_FLOOR_SEC, Sr as isAlarmControllableCap, St as NC_SENSOR_TRANSITION_KINDS, T as DEFAULT_DETAIL_CROP_CONVENTION, Ti as systemEventDeliveryProblems, Tn as TimelapseRulePatchSchema, Tr as isAppLinkBase, Tt as NC_TANK_SYSTEM_EVENT_KINDS, U as LabelAttributionSchema, Ui as RECORD_MAX_DATA_BYTES, Un as armRemovalReconcile, Ur as memoizePinnedFfmpeg, Ut as NcScheduleSchema, V as FailureCounters, Vi as BaseAddon, Vn as applyNonBlockingEdit, Vr as linkedStepOf, Vt as NcRuleTargetSchema, W as ListTrackRelationsInputSchema, Wi as RECORD_QUERY_MAX, Wn as assertTimelapseCadences, Wr as ncMediaPolicyError, Wt as NcSharedSequenceSchema, X as MAX_TRACK_PURITIES, Xi as isDeviceScopedCap, Xn as classifyRetrainReview, Xr as pickFaceRescoreIntervalMinutes, Xt as NcTaxonomySchema, Y as MAX_BIRTH_LATENCY_PROXY_MS, Yi as hydrateSchema, Yn as calendarEventLocalSpan, Yt as NcSystemEventKindSchema, Z as MAX_TRACK_RELATIONS, Zi as nodePin, Zn as cloneAlarmSettings, Zr as pipelineAnalyticsCapability, Zt as NcTemplatePreviewInputSchema, _ as BIRTH_DECISION_DEFAULT_LIMIT, _a as EventCategory, _i as secureActuationFor, _n as SCENE_RESET_RECAPTURES, _r as evictionPolicyOfLocation, _t as NC_CONSUMABLE_SYSTEM_EVENT_KINDS, a as CLIP_EMBEDDING_STEP_ID, aa as literal, ai as resolveModeDelays, an as RebuildObjectEmbeddingsRefusalSchema, ar as deriveRecordingMode, at as NC_ALARM_NOTIFY_FIELDS, b as BucketAccumulator, bi as startMoverUnderClearance, bn as SetTrackPurityResultSchema, br as gifDeriveSpeed, bt as NC_GROUPING_MAX_SEC, c as readClusterModelPinStrict, ca as object, cn as RetrainStatusSchema, cr as deviceRemovalHookCapability, ct as NC_AUDIO_CONFIRM_HITS_DEFAULT, d as APPEARANCE_BLOCKS, da as strictObject, di as ruleAutoTriggersAlarm, dn as SCENE_DEFAULT_ANCHOR_THRESHOLD, dr as embeddingRefusalOf, dt as NC_CLIP_PRE_ROLL_DEFAULT_SEC, ea as ZodObject, ei as readMotionTriggeredBy, en as OPS_LOG_DEFAULT_LIMIT, er as cosineSimilarity$1, et as MotionTriggeredBySchema, f as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT, fa as string, fi as ruleBelongsToAlarm$1, fn as SCENE_DEFAULT_CHECK_INTERVAL_SEC, ft as NC_CLIP_RETENTION_MAX_SEC, g as ArchivedDebugNoteSchema, ga as unknown, gi as sceneMonitorCapability, gn as SCENE_DIVERGED, gr as eventKindLabel, gt as NC_CONSUMABLE_LOW_PERCENT_DEFAULT, h as AlarmArmModeSchema, ha as union, hi as ruleKindOf, hn as SCENE_DEFAULT_UNCOVERED_POLICY, hr as ensureAlarmProfiles, ht as NC_CONFIRM_DEFAULT_TIMEOUT_MS, ia as discriminatedUnion, ii as resolveLocationMode, in as RECORDING_SOURCE_CAMSTACK_ADDON, ir as derivePostTriggeredAction, it as NC_ALARM_DELAY_MAX_SEC, j as DetectionSourceSchema, ji as templateVarsFor, jn as TrackSourceSchema, jr as isKnownTemplateVar, jt as NcAlarmSensorsSchema, k as DETECTION_PIPELINE_CAP_NAME, ki as systemEventSummarySplitOf, kn as TrackRelationSchema, kr as isEventKindLabelKey, kt as NcAlarmPostTriggeredActionSchema, l as resolveClusterModelPin, la as partialRecord, li as retrainRevisionConflictMessage, ln as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, lt as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, m as AUDIO_MACRO_LABELS, ma as tuple, mi as ruleGroupingApplies, mn as SCENE_DEFAULT_QUIET_SECONDS, mr as encodeVectorBase64, mt as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, na as array, ni as renameAlarmProfile, nr as deleteAlarmProfile, nt as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, o as CLUSTER_MODEL_OWNER_ADDON_ID, oa as looseObject, oi as resolveModeNotifyPolicy, on as RetrainDismissedSchema, or as describeSystemEventDeliveryProblem, ot as NC_ALARM_SYSTEM_EVENT_KINDS, p as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, pa as templateLiteral, pi as ruleDeviceCompatCapQueries, pn as SCENE_DEFAULT_OBSERVATION_SPACING_SEC, pt as NC_CONDITION_CATALOG, q as MAX_ARCHIVED_DEBUG_NOTES, qi as defineCustomActions, qn as buildEventKindDescriptor, qr as occupancyScope, qt as NcSnoozeSuppressedSchema, ra as boolean, ri as resolveClipSearchMinScore, rn as RECORDING_EXPORT_MAX_READ_BYTES, rr as deriveDetailCropRect, rt as NC_ALARM_DELAY_FIELDS, s as FACE_EMBEDDING_STEP_ID, sa as number, si as resolveNcMediaImage, sn as RetrainOriginSchema, sr as describeSystemEventFamilyProblem, st as NC_ALARM_TRIGGERED_MAX_SEC, t as BUILTIN_CLIP_MODELS, ta as _enum, ti as readTimelapseGeneratedAt, tn as OpsLogEntrySchema, tr as createAlarmProfile, tt as NC_ALARM_DEFAULT_PROFILE_ID, u as APPEARANCE_BIN_COUNT, ua as record, ui as rootSupplyServes, un as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, ut as NC_CLIP_POST_ROLL_DEFAULT_SEC, v as BaseDevice, vi as sensorRaisedOf, vn as SceneMonitorSchema, vr as faceGalleryCapability, vt as NC_DEFAULT_SNOOZE_MINUTES, w as CoverStateSchema, wi as syncActiveAlarmProfileSettings, wn as TimelapseRuleInputSchema, wr as isAlertEpisodeSeverity, wt as NC_SYSTEM_EVENT_KIND_GROUP_SPECS, x as COCO_TO_MACRO, xi as storageOccupancyCapability, xn as SetTrackRelationInputSchema, xr as gifFromMp4Args, xt as NC_GROUPING_MIN_SEC, y as BirthDecisionRecordSchema, yi as servedTemplateVars, yn as SetTrackPurityInputSchema, yr as failureContributionCapability, yt as NC_GROUPING_DEFAULT_SEC, z as FIRST_LEVEL_MACRO_CLASSES, zi as DeviceType, zn as applyBlockingEdit, zr as isVectorIndexDimConflict, zt as NcRulePatchSchema } from "../clip-model-registry-BtK1fPgi.mjs";
1
+ import { $ as MediaFileKindEnum, $n as coreBlockIdFromAddonId, $r as readDeviceStateFrom, $t as NcTemplateVarDescriptorSchema, A as DeclaredDevices, Ai as templateCarriesSummary, An as TrackSideSchema, Ar as isEventOwnerType, At as NcAlarmSensorsInputSchema, B as FULL_IMAGE_BBOX, Bi as errMsg, Bn as applyModeDelaysEdits, Br as kebabToCamel, Bt as NcRuleSchema, C as ClearTrackRelationResultSchema, Ci as summarizeReview, Cn as TRACK_RELATIONS_DEFAULT_LIMIT, Cr as isAlertEpisodeOpen, Ct as NC_SNOOZE_MAX_MINUTES, D as DEFAULT_TIMELAPSE_PREVIEW_TEXT, Di as systemEventFilterApplies, Dn as TrackPuritySchema, Dr as isDefaultAlarmProfileId, Dt as NC_TEMPLATE_VARS, E as DEFAULT_EVENT_COLOR, Ei as systemEventFamilyProblems, En as TimelapseRuleSchema, Er as isAudioClassName, Et as NC_TAXONOMY, F as EVENT_DENSITY_BATCH_MAX, Fi as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, Fn as alarmPanelCapability, Fr as isRootSuppliableStepId, Ft as NcLegacyRuleActionSequenceSchema, G as ListTrackRelationsResultSchema, Gi as RecordsError, Gn as audioMetricsCapability, Gr as normalizeNcMediaPolicy, Gt as NcSnoozeInputSchema, H as LABEL_SUPPLY_MACRO, Hi as CamProfileSchema, Hn as applySecureOnArmEdit, Hr as mayWriteToLocation, Ht as NcRuleUpdateInputSchema, I as EVENT_KIND_BY_CAP, Ii as canonicalHash, In as alertEpisodeId, Ir as isScheduleActive, It as NcRuleActionSchema, J as MAX_BIRTH_DECISION_RECORDS, Ji as defineCustomActions, Jn as buildViewerLink, Jr as parseAlertEpisodePayload, Jt as NcStateSummarySectionIdSchema, K as LockStateSchema, Ki as createEvent, Kn as audioModeOf, Kr as notificationRulesCapability, Kt as NcSnoozeSchema, L as EVENT_OWNER_TYPES, Li as evaluateSensorEdge, Ln as alertEpisodeKind, Lr as isSystemDelivery, Lt as NcRuleActionsSchema, M as EMBEDDING_MODEL_FAILED, Mi as vectorDimFromBase64, Mn as activateAlarmProfile, Mr as isLabelSupplyStepId, Mt as NcAlarmSettingsPatchSchema, N as EMBEDDING_REQUIREMENTS_FAILED, Ni as viewerLinkBaseOf, Nn as addonWidgetsSourceCapability, Nr as isMediaOwnerType, Nt as NcConditionDescriptorSchema, O as DETECTION_MACRO_CLASSES, Oi as systemEventSummaryScheduleOf, On as TrackRelationKindSchema, Or as isDetectionMacroClass, Ot as NcAlarmConfigSchema, P as EMBEDDING_REQUIREMENTS_UNAVAILABLE, Pi as zoneAnalyticsCapability, Pn as alarmDeviceSecureOnArm, Pr as isRetiredClearKey, Pt as NcConditionsSchema, Q as MOTION_CLOSE_AFTER_MS, Qi as nodePin, Qn as consumableLowPercentOf, Qr as plateGalleryCapability, Qt as NcTemplatePreviewSchema, R as EXPORT_DENSE_MAX_RANGES, Ri as isSourceCap, Rn as alertEpisodePayload, Rr as isSystemEventSummaryRule, Rt as NcRuleInputSchema, S as ClearTrackRelationInputSchema, Si as subKindsOf, Sn as TIMELAPSE_DENSE_FLOOR_SEC, Sr as isAlarmControllableCap, St as NC_SENSOR_TRANSITION_KINDS, T as DEFAULT_DETAIL_CROP_CONVENTION, Ti as systemEventDeliveryProblems, Tn as TimelapseRulePatchSchema, Tr as isAppLinkBase, Tt as NC_TANK_SYSTEM_EVENT_KINDS, U as LabelAttributionSchema, Ui as RECORD_MAX_DATA_BYTES, Un as armRemovalReconcile, Ur as memoizePinnedFfmpeg, Ut as NcScheduleSchema, V as FailureCounters, Vi as BaseAddon, Vn as applyNonBlockingEdit, Vr as linkedStepOf, Vt as NcRuleTargetSchema, W as ListTrackRelationsInputSchema, Wi as RECORD_QUERY_MAX, Wn as assertTimelapseCadences, Wr as ncMediaPolicyError, Wt as NcSharedSequenceSchema, X as MAX_TRACK_PURITIES, Xi as hydrateSchema, Xn as classifyRetrainReview, Xr as pickFaceRescoreIntervalMinutes, Xt as NcTaxonomySchema, Y as MAX_BIRTH_LATENCY_PROXY_MS, Yi as defineRecordKinds, Yn as calendarEventLocalSpan, Yt as NcSystemEventKindSchema, Z as MAX_TRACK_RELATIONS, Zi as isDeviceScopedCap, Zn as cloneAlarmSettings, Zr as pipelineAnalyticsCapability, Zt as NcTemplatePreviewInputSchema, _ as BIRTH_DECISION_DEFAULT_LIMIT, _a as unknown, _i as secureActuationFor, _n as SCENE_RESET_RECAPTURES, _r as evictionPolicyOfLocation, _t as NC_CONSUMABLE_SYSTEM_EVENT_KINDS, a as CLIP_EMBEDDING_STEP_ID, aa as discriminatedUnion, ai as resolveModeDelays, an as RebuildObjectEmbeddingsRefusalSchema, ar as deriveRecordingMode, at as NC_ALARM_NOTIFY_FIELDS, b as BucketAccumulator, bi as startMoverUnderClearance, bn as SetTrackPurityResultSchema, br as gifDeriveSpeed, bt as NC_GROUPING_MAX_SEC, c as readClusterModelPinStrict, ca as number, cn as RetrainStatusSchema, cr as deviceRemovalHookCapability, ct as NC_AUDIO_CONFIRM_HITS_DEFAULT, d as APPEARANCE_BLOCKS, da as record, di as ruleAutoTriggersAlarm, dn as SCENE_DEFAULT_ANCHOR_THRESHOLD, dr as embeddingRefusalOf, dt as NC_CLIP_PRE_ROLL_DEFAULT_SEC, ea as sleep$1, ei as readMotionTriggeredBy, en as OPS_LOG_DEFAULT_LIMIT, er as cosineSimilarity$1, et as MotionTriggeredBySchema, f as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT, fa as strictObject, fi as ruleBelongsToAlarm$1, fn as SCENE_DEFAULT_CHECK_INTERVAL_SEC, ft as NC_CLIP_RETENTION_MAX_SEC, g as ArchivedDebugNoteSchema, ga as union, gi as sceneMonitorCapability, gn as SCENE_DIVERGED, gr as eventKindLabel, gt as NC_CONSUMABLE_LOW_PERCENT_DEFAULT, h as AlarmArmModeSchema, ha as tuple, hi as ruleKindOf, hn as SCENE_DEFAULT_UNCOVERED_POLICY, hr as ensureAlarmProfiles, ht as NC_CONFIRM_DEFAULT_TIMEOUT_MS, ia as boolean, ii as resolveLocationMode, in as RECORDING_SOURCE_CAMSTACK_ADDON, ir as derivePostTriggeredAction, it as NC_ALARM_DELAY_MAX_SEC, j as DetectionSourceSchema, ji as templateVarsFor, jn as TrackSourceSchema, jr as isKnownTemplateVar, jt as NcAlarmSensorsSchema, k as DETECTION_PIPELINE_CAP_NAME, ki as systemEventSummarySplitOf, kn as TrackRelationSchema, kr as isEventKindLabelKey, kt as NcAlarmPostTriggeredActionSchema, l as resolveClusterModelPin, la as object, li as retrainRevisionConflictMessage, ln as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, lt as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, m as AUDIO_MACRO_LABELS, ma as templateLiteral, mi as ruleGroupingApplies, mn as SCENE_DEFAULT_QUIET_SECONDS, mr as encodeVectorBase64, mt as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, na as _enum, ni as renameAlarmProfile, nr as deleteAlarmProfile, nt as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, o as CLUSTER_MODEL_OWNER_ADDON_ID, oa as literal, oi as resolveModeNotifyPolicy, on as RetrainDismissedSchema, or as describeSystemEventDeliveryProblem, ot as NC_ALARM_SYSTEM_EVENT_KINDS, p as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, pa as string, pi as ruleDeviceCompatCapQueries, pn as SCENE_DEFAULT_OBSERVATION_SPACING_SEC, pt as NC_CONDITION_CATALOG, q as MAX_ARCHIVED_DEBUG_NOTES, qi as customAction, qn as buildEventKindDescriptor, qr as occupancyScope, qt as NcSnoozeSuppressedSchema, ra as array, ri as resolveClipSearchMinScore, rn as RECORDING_EXPORT_MAX_READ_BYTES, rr as deriveDetailCropRect, rt as NC_ALARM_DELAY_FIELDS, s as FACE_EMBEDDING_STEP_ID, sa as looseObject, si as resolveNcMediaImage, sn as RetrainOriginSchema, sr as describeSystemEventFamilyProblem, st as NC_ALARM_TRIGGERED_MAX_SEC, t as BUILTIN_CLIP_MODELS, ta as ZodObject, ti as readTimelapseGeneratedAt, tn as OpsLogEntrySchema, tr as createAlarmProfile, tt as NC_ALARM_DEFAULT_PROFILE_ID, u as APPEARANCE_BIN_COUNT, ua as partialRecord, ui as rootSupplyServes, un as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, ut as NC_CLIP_POST_ROLL_DEFAULT_SEC, v as BaseDevice, va as EventCategory, vi as sensorRaisedOf, vn as SceneMonitorSchema, vr as faceGalleryCapability, vt as NC_DEFAULT_SNOOZE_MINUTES, w as CoverStateSchema, wi as syncActiveAlarmProfileSettings, wn as TimelapseRuleInputSchema, wr as isAlertEpisodeSeverity, wt as NC_SYSTEM_EVENT_KIND_GROUP_SPECS, x as COCO_TO_MACRO, xi as storageOccupancyCapability, xn as SetTrackRelationInputSchema, xr as gifFromMp4Args, xt as NC_GROUPING_MIN_SEC, y as BirthDecisionRecordSchema, yi as servedTemplateVars, yn as SetTrackPurityInputSchema, yr as failureContributionCapability, yt as NC_GROUPING_DEFAULT_SEC, z as FIRST_LEVEL_MACRO_CLASSES, zi as DeviceType, zn as applyBlockingEdit, zr as isVectorIndexDimConflict, zt as NcRulePatchSchema } from "../clip-model-registry-D6yfX_Xq.mjs";
2
2
  import { t as __exportAll } from "../embedding-encoder/index.mjs";
3
3
  import * as fs$1 from "node:fs";
4
4
  import { createWriteStream, promises } from "node:fs";
@@ -4996,6 +4996,7 @@ function artifactShelfRefusal(locations, localNodeId) {
4996
4996
  //#endregion
4997
4997
  //#region ../types/dist/node.mjs
4998
4998
  var node_exports = /* @__PURE__ */ __exportAll({
4999
+ EDGETPU_DELEGATE_RELEASE: () => EDGETPU_DELEGATE_RELEASE,
4999
5000
  FilesystemStorageProvider: () => FilesystemStorageProvider,
5000
5001
  PYTHON_VERSION: () => PYTHON_VERSION,
5001
5002
  signExpiringUrl: () => signExpiringUrl,
@@ -5023,6 +5024,9 @@ process.platform, process.env["SystemRoot"];
5023
5024
  */
5024
5025
  var PYTHON_VERSION = "3.12.12";
5025
5026
  `${PYTHON_VERSION}`;
5027
+ /** The pinned feranick release. Changing it is the delegate version change. */
5028
+ var EDGETPU_DELEGATE_RELEASE = "16.0TF2.17.1-1";
5029
+ `${EDGETPU_DELEGATE_RELEASE}`;
5026
5030
  /** Errors a Windows rename over a file another process has open can raise. */
5027
5031
  var WINDOWS_RENAME_BUSY = new Set([
5028
5032
  "EPERM",
@@ -9376,9 +9380,16 @@ var IdentityConfigBodySchema = object({
9376
9380
  sampleCount: number(),
9377
9381
  coverMediaId: number().nullable().optional()
9378
9382
  });
9379
- /** Enrolled face sample (`addedAt` → record `at`; vector in index). */
9383
+ /**
9384
+ * Enrolled face sample (`addedAt` → record `at`; vector in index).
9385
+ *
9386
+ * `addedAt` is ALSO in the body: the `identity_added` index names it, and an
9387
+ * index reads the body, never the header. Optional only because rows written
9388
+ * before the fix lack it until `records.backfillIndexFields` runs.
9389
+ */
9380
9390
  var IdentitySampleLedgerBodySchema = object({
9381
9391
  identityId: string(),
9392
+ addedAt: number().optional(),
9382
9393
  embedding: array(number()).optional(),
9383
9394
  mediaId: number().optional(),
9384
9395
  sourceMediaId: number().optional(),
@@ -9398,9 +9409,10 @@ var VehicleConfigBodySchema = object({
9398
9409
  sampleCount: number(),
9399
9410
  coverMediaId: number().nullable().optional()
9400
9411
  });
9401
- /** Enrolled plate read (`addedAt` → record `at`). */
9412
+ /** Enrolled plate read (`addedAt` → record `at`, and in the body for `vehicle_added`). */
9402
9413
  var VehicleSampleLedgerBodySchema = object({
9403
9414
  vehicleId: string(),
9415
+ addedAt: number().optional(),
9404
9416
  text: string(),
9405
9417
  score: number(),
9406
9418
  sourcePlateId: string().optional(),
@@ -11777,8 +11789,14 @@ var DebugNoteArchiveStore = class {
11777
11789
  };
11778
11790
  //#endregion
11779
11791
  //#region src/pipeline-analytics/store/event-ledger-collection.ts
11792
+ /**
11793
+ * One trackless event ledger (motion, audio, or sensor) on settings-store
11794
+ * (agents) or `ctx.records` (hub after phase 5).
11795
+ */
11780
11796
  /** Matches {@link EventStore.LEDGER_PAGE_SIZE} — kept local to avoid a circular import. */
11781
11797
  var LEDGER_PAGE_SIZE = 500;
11798
+ /** A backfill patch refused for one of these lost a race with the row's writer, nothing more. */
11799
+ var RACED_CODES = new Set(["rev-conflict", "not-found"]);
11782
11800
  var EventLedgerCollection = class EventLedgerCollection {
11783
11801
  collection;
11784
11802
  store;
@@ -11787,6 +11805,8 @@ var EventLedgerCollection = class EventLedgerCollection {
11787
11805
  legacyAtField;
11788
11806
  deviceIdMode;
11789
11807
  logger;
11808
+ /** Body fields a declared index names that the header also carries (see {@link backfillIndexFields}). */
11809
+ headerIndexFields;
11790
11810
  constructor(deps) {
11791
11811
  this.collection = deps.collection;
11792
11812
  this.store = deps.store;
@@ -11794,6 +11814,7 @@ var EventLedgerCollection = class EventLedgerCollection {
11794
11814
  this.legacyAtField = deps.legacyAtField ?? "timestamp";
11795
11815
  this.deviceIdMode = deps.deviceIdMode ?? "required";
11796
11816
  this.logger = deps.logger;
11817
+ this.headerIndexFields = headerIndexFieldsOf(deps.definition, this.legacyAtField);
11797
11818
  if (deps.records !== void 0) {
11798
11819
  const handle = deps.records.kind(deps.definition);
11799
11820
  this.kind = handle;
@@ -12040,6 +12061,73 @@ var EventLedgerCollection = class EventLedgerCollection {
12040
12061
  nextCursor: page.nextCursor
12041
12062
  };
12042
12063
  }
12064
+ /**
12065
+ * Copy the header values a declared index needs into the body of rows that
12066
+ * lack them — a bounded keyset walk of the kind in `at` order per call.
12067
+ *
12068
+ * An index reads the BODY (`json_extract(data, …)`), never the header. Until
12069
+ * this fix the writer moved the clock (`timestamp`, `addedAt` …) into `at`
12070
+ * only, and the records adoption did the same with `deviceId`, so a `where`
12071
+ * page of such a kind found no ordering value on the last row and threw
12072
+ * "cannot be paged". The value is derivable — the header holds it — so the
12073
+ * repair is a merge patch guarded by `ifRev`: a row rewritten since it was
12074
+ * read is left to its writer (which now writes the field) and counted.
12075
+ *
12076
+ * `dryRun` patches nothing and reports the same counts.
12077
+ */
12078
+ async backfillIndexFields(input) {
12079
+ if (this.kind === null) throw new Error(`event ledger ${this.collection}: backfillIndexFields needs the records kind`);
12080
+ const missingByField = {};
12081
+ let scanned = 0;
12082
+ let missing = 0;
12083
+ let patched = 0;
12084
+ let raced = 0;
12085
+ let cursor = input.cursor;
12086
+ while (scanned < input.maxRows) {
12087
+ const page = await this.kind.query({
12088
+ order: "at",
12089
+ limit: Math.min(LEDGER_PAGE_SIZE, input.maxRows - scanned),
12090
+ ...cursor === null ? {} : { cursor }
12091
+ });
12092
+ for (const row of page.records) {
12093
+ scanned += 1;
12094
+ const patch = this.headerPatchFor(row);
12095
+ const fields = Object.keys(patch);
12096
+ if (fields.length === 0) continue;
12097
+ missing += 1;
12098
+ for (const f of fields) missingByField[f] = (missingByField[f] ?? 0) + 1;
12099
+ if (input.dryRun) continue;
12100
+ try {
12101
+ await this.kind.patch(row.id, patch, { ifRev: row.rev });
12102
+ patched += 1;
12103
+ } catch (err) {
12104
+ if (!(err instanceof RecordsError) || !RACED_CODES.has(err.code)) throw err;
12105
+ raced += 1;
12106
+ }
12107
+ }
12108
+ cursor = page.nextCursor;
12109
+ if (cursor === null) break;
12110
+ }
12111
+ return {
12112
+ kind: this.kind.name,
12113
+ fields: this.headerIndexFields.map((f) => f.field),
12114
+ scanned,
12115
+ missing,
12116
+ missingByField,
12117
+ patched,
12118
+ raced,
12119
+ nextCursor: cursor
12120
+ };
12121
+ }
12122
+ headerPatchFor(row) {
12123
+ const patch = {};
12124
+ for (const { field, from } of this.headerIndexFields) {
12125
+ if (row.data[field] !== void 0 && row.data[field] !== null) continue;
12126
+ const value = from === "at" ? row.at : row.deviceId;
12127
+ if (typeof value === "number") patch[field] = value;
12128
+ }
12129
+ return patch;
12130
+ }
12043
12131
  async getManyByIds(ids) {
12044
12132
  if (ids.length === 0) return [];
12045
12133
  if (this.kind === null) return (await this.store.query.query({
@@ -12118,7 +12206,7 @@ var EventLedgerCollection = class EventLedgerCollection {
12118
12206
  atFrom: mapped.atFrom,
12119
12207
  atTo: mapped.atTo,
12120
12208
  where: mapped.where,
12121
- order: "at",
12209
+ ...mapped.where === void 0 ? { order: "at" } : {},
12122
12210
  desc: mapped.desc,
12123
12211
  limit: LEDGER_PAGE_SIZE,
12124
12212
  ...cursor === void 0 ? {} : { cursor }
@@ -12195,7 +12283,6 @@ var EventLedgerCollection = class EventLedgerCollection {
12195
12283
  count: await this.kind.count({ where: { assigned: false } }),
12196
12284
  maxTimestamp: (await this.kind.query({
12197
12285
  where: { assigned: false },
12198
- order: "at",
12199
12286
  desc: true,
12200
12287
  limit: 1
12201
12288
  })).records[0]?.at ?? null
@@ -12251,7 +12338,7 @@ var EventLedgerCollection = class EventLedgerCollection {
12251
12338
  const at = readLegacyClock(record, this.legacyAtField);
12252
12339
  if (at === void 0) return null;
12253
12340
  if (this.deviceIdMode === "required" && typeof deviceId !== "number") return null;
12254
- const body = eventBodyFromLegacyRecord(record, this.legacyAtField);
12341
+ const body = eventBodyFromLegacyRecord(record);
12255
12342
  return {
12256
12343
  id,
12257
12344
  ...typeof deviceId === "number" ? { deviceId } : {},
@@ -12264,14 +12351,36 @@ function readLegacyClock(record, field) {
12264
12351
  const v = record[field];
12265
12352
  return typeof v === "number" ? v : void 0;
12266
12353
  }
12267
- function eventBodyFromLegacyRecord(record, legacyAtField) {
12354
+ /**
12355
+ * The record body of a legacy-shaped row: everything but `id`.
12356
+ *
12357
+ * The clock stays in the body although it is also the header's `at`: the
12358
+ * kinds' indexes name the BODY field (`assigned_ts` → `timestamp`,
12359
+ * `identity_added` → `addedAt` …), and a row without it cannot be paged
12360
+ * through any of them. Stripping it here is what broke every faces page.
12361
+ */
12362
+ function eventBodyFromLegacyRecord(record) {
12268
12363
  const out = {};
12269
12364
  for (const [key, value] of Object.entries(record)) {
12270
- if (key === "id" || key === "timestamp" || key === legacyAtField) continue;
12365
+ if (key === "id") continue;
12271
12366
  out[key] = value;
12272
12367
  }
12273
12368
  return out;
12274
12369
  }
12370
+ /** The body fields of `definition`'s indexes that mirror a header column. */
12371
+ function headerIndexFieldsOf(definition, legacyAtField) {
12372
+ const named = new Set(definition.declaration.indexes.flatMap((i) => i.fields));
12373
+ const out = [];
12374
+ if (named.has(legacyAtField)) out.push({
12375
+ field: legacyAtField,
12376
+ from: "at"
12377
+ });
12378
+ if (named.has("deviceId")) out.push({
12379
+ field: "deviceId",
12380
+ from: "deviceId"
12381
+ });
12382
+ return out;
12383
+ }
12275
12384
  function recordsRowToLegacy(row, legacyAtField) {
12276
12385
  const deviceId = row.deviceId ?? row.data["deviceId"];
12277
12386
  const clock = row.at ?? readLegacyClock(row.data, legacyAtField);
@@ -79344,6 +79453,96 @@ async function forgetMissingMediaRows(deps, rawInput) {
79344
79453
  };
79345
79454
  }
79346
79455
  //#endregion
79456
+ //#region src/pipeline-analytics/store/ledger-index-backfill.ts
79457
+ /**
79458
+ * The operator door for repairing ledger rows whose BODY lacks a field a
79459
+ * declared index names (`records.backfillIndexFields`).
79460
+ *
79461
+ * Until the fix the event-ledger writer moved the clock (`timestamp`,
79462
+ * `addedAt`, `updatedAt` …) into the record header `at` only, and the records
79463
+ * adoption also left `deviceId` header-only. Indexes read the body, so any
79464
+ * `where` page of such a kind (faces `assigned_ts`, plates `vehicle_ts`,
79465
+ * identity samples `identity_added` …) refused to page: "a row has no value for
79466
+ * an ordering field". The writer now keeps the body field; this copies the
79467
+ * header value into rows written before it. It is a repair of derivable data,
79468
+ * not a migration: nothing is read from anywhere but the row itself.
79469
+ *
79470
+ * One kind per call, bounded, resumable: `dryRun` defaults to `true` (counts
79471
+ * only); pass the returned `nextCursor` back until it is `null`.
79472
+ */
79473
+ /** Hard ceiling on rows one call examines — the call is synchronous. */
79474
+ var LEDGER_BACKFILL_MAX_ROWS = 5e4;
79475
+ var LEDGER_BACKFILL_DEFAULT_ROWS = 2e4;
79476
+ /** Every event ledger, by its records kind name. A kind with nothing to backfill reports `fields: []`. */
79477
+ var LEDGER_WIRES = {
79478
+ faces: wireFaceLedger,
79479
+ plates: wirePlateLedger,
79480
+ identities: wireIdentityLedger,
79481
+ "identity-samples": wireIdentitySampleLedger,
79482
+ vehicles: wireVehicleLedger,
79483
+ "vehicle-samples": wireVehicleSampleLedger,
79484
+ "track-aliases": wireTrackAliasLedger,
79485
+ "track-purity": wireTrackPurityLedger,
79486
+ "track-relations": wireTrackRelationsLedger,
79487
+ "tracking-tapes": wireTrackingTapeLedger,
79488
+ "motion-events": wireMotionEventLedger,
79489
+ "audio-events": wireAudioEventLedger,
79490
+ "sensor-events": wireSensorEventLedger,
79491
+ "birth-decision-ledger": wireBirthDecisionLedger,
79492
+ "debug-note-archive": wireDebugNoteArchiveLedger,
79493
+ "ops-log": wireOpsLogLedger,
79494
+ "retrain-frames": wireRetrainFrameLedger,
79495
+ "retrain-annotations": wireRetrainAnnotationLedger,
79496
+ "retrain-collections": wireRetrainCollectionLedger,
79497
+ "retrain-collection-frames": wireRetrainCollectionFrameLedger
79498
+ };
79499
+ function isLedgerKindName(name) {
79500
+ return Object.hasOwn(LEDGER_WIRES, name);
79501
+ }
79502
+ var [FIRST_LEDGER_KIND, ...OTHER_LEDGER_KINDS] = Object.keys(LEDGER_WIRES).filter(isLedgerKindName);
79503
+ if (FIRST_LEDGER_KIND === void 0) throw new Error("ledger-index-backfill: no ledger kinds");
79504
+ var LedgerBackfillInputSchema = object({
79505
+ kind: _enum([FIRST_LEDGER_KIND, ...OTHER_LEDGER_KINDS]),
79506
+ dryRun: boolean().default(true),
79507
+ /** The previous call's `nextCursor`. Omitted / null starts from the top. */
79508
+ cursor: string().min(1).nullable().optional(),
79509
+ /** Rows examined in this call. Default 20 000, max {@link LEDGER_BACKFILL_MAX_ROWS}. */
79510
+ maxRows: number().int().min(1).max(LEDGER_BACKFILL_MAX_ROWS).optional()
79511
+ });
79512
+ var ledgerIndexBackfillActions = defineCustomActions({ "records.backfillIndexFields": customAction(LedgerBackfillInputSchema, object({
79513
+ kind: string(),
79514
+ dryRun: boolean(),
79515
+ /** The body fields this kind's indexes need from the header (`[]` = nothing to repair). */
79516
+ fields: array(string()),
79517
+ scanned: number().int(),
79518
+ /** Rows lacking at least one of `fields`. */
79519
+ missing: number().int(),
79520
+ missingByField: record(string(), number().int()),
79521
+ /** Rows patched (0 on a dry run). */
79522
+ patched: number().int(),
79523
+ /** Rows rewritten or deleted between the read and the patch: left to their writer. */
79524
+ raced: number().int(),
79525
+ /** Pass back to continue; `null` = the kind has been walked to the end. */
79526
+ nextCursor: string().nullable()
79527
+ }), {
79528
+ kind: "mutation",
79529
+ auth: "admin"
79530
+ }) });
79531
+ /** Run one bounded backfill page of `input.kind` through its ledger. */
79532
+ async function backfillLedgerIndexFields(wiring, rawInput) {
79533
+ const input = LedgerBackfillInputSchema.parse(rawInput);
79534
+ const page = await LEDGER_WIRES[input.kind](wiring).backfillIndexFields({
79535
+ dryRun: input.dryRun,
79536
+ cursor: input.cursor ?? null,
79537
+ maxRows: input.maxRows ?? LEDGER_BACKFILL_DEFAULT_ROWS
79538
+ });
79539
+ return {
79540
+ ...page,
79541
+ fields: [...page.fields],
79542
+ dryRun: input.dryRun
79543
+ };
79544
+ }
79545
+ //#endregion
79347
79546
  //#region src/pipeline-analytics/retention/media-reclaim.ts
79348
79547
  var MEDIA_RECLAIM_SCOPES = ["motion-still", "track-filmstrip"];
79349
79548
  var DEFAULT_MEDIA_RECLAIM_LIMITS = {
@@ -115345,6 +115544,7 @@ var customActions = {
115345
115544
  ...mediaReclaimActions,
115346
115545
  ...locationDiscardActions,
115347
115546
  ...mediaForgetActions,
115547
+ ...ledgerIndexBackfillActions,
115348
115548
  ...photoEnrollActions,
115349
115549
  ...faceRescoreActions,
115350
115550
  ...stillnessCalibrationActions
@@ -117377,6 +117577,7 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
117377
117577
  ...mediaReclaimActions,
117378
117578
  ...locationDiscardActions,
117379
117579
  ...mediaForgetActions,
117580
+ ...ledgerIndexBackfillActions,
117380
117581
  ...photoEnrollActions,
117381
117582
  ...faceRescoreActions,
117382
117583
  ...stillnessCalibrationActions
@@ -127187,6 +127388,11 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
127187
127388
  const deps = this.mediaForgetDeps;
127188
127389
  if (deps === null) throw new Error("storage.forgetMissingMedia: not initialised");
127189
127390
  return forgetMissingMediaRows(deps, input);
127391
+ },
127392
+ "records.backfillIndexFields": async (input) => {
127393
+ const settingsStore = this.settingsStore;
127394
+ if (!settingsStore) throw new Error("records.backfillIndexFields: not initialised");
127395
+ return backfillLedgerIndexFields(this.eventLedgerWiring(settingsStore), input);
127190
127396
  }
127191
127397
  };
127192
127398
  }
@@ -30,7 +30,7 @@ async function d(e) {
30
30
  }
31
31
  }
32
32
  async function f() {
33
- return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CnHfiisq.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DiTZe8LM.mjs")).catch((e) => {
34
34
  throw l = void 0, e;
35
35
  }), l;
36
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-post-analysis",
3
- "version": "1.2.615",
3
+ "version": "1.2.617",
4
4
  "description": "Post-Analysis bundle — enrichment, embedding-encoder, pipeline-analytics. Multi-entry npm package shipping addons that consume pipeline output.",
5
5
  "keywords": [
6
6
  "camstack",