@camstack/addon-post-analysis 1.2.617 → 1.2.619

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (15) hide show
  1. package/THIRD_PARTY_MODELS.md +3 -1
  2. package/dist/{clip-model-registry-CYWuH4Rx.js → clip-model-registry-B4VtQ3mk.js} +232 -24
  3. package/dist/{clip-model-registry-D6yfX_Xq.mjs → clip-model-registry-Clb51mcj.mjs} +203 -19
  4. package/dist/embedding-encoder/index.js +1 -1
  5. package/dist/embedding-encoder/index.mjs +1 -1
  6. package/dist/pipeline-analytics/_stub.js +2 -2
  7. package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DiTZe8LM.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BGo4IMTT.mjs} +3 -3
  8. package/dist/pipeline-analytics/{_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CSQBGkvs.mjs → _virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BSMSev-b.mjs} +1 -1
  9. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CssYIiFD.mjs +26 -0
  10. package/dist/pipeline-analytics/{hostInit-BXvwC4CQ.mjs → hostInit-p9APfKsm.mjs} +3 -3
  11. package/dist/pipeline-analytics/index.js +146 -209
  12. package/dist/pipeline-analytics/index.mjs +146 -208
  13. package/dist/pipeline-analytics/remoteEntry.js +1 -1
  14. package/package.json +1 -1
  15. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BB2kgLY1.mjs +0 -26
@@ -1,4 +1,4 @@
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";
1
+ import { $ as MediaFileKindEnum, $i as defineRecordKinds, $n as consumableLowPercentOf, $r as pipelineAnalyticsCapability, $t as NcTemplateVarDescriptorSchema, A as DeclaredDevices, Ai as systemEventDeliveryProblems, An as TrackSideSchema, Ar as isDrawableSubjectPath, At as NcAlarmSensorsInputSchema, B as FULL_IMAGE_BBOX, Bi as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, Bn as applyModeDelaysEdits, Br as isSystemEventSummaryRule, Bt as NcRuleSchema, C as ClearTrackRelationResultSchema, Ci as startMoverUnderClearance, Cn as TRACK_RELATIONS_DEFAULT_LIMIT, Cr as isAlarmControllableCap, Ct as NC_SNOOZE_MAX_MINUTES, D as DEFAULT_TIMELAPSE_PREVIEW_TEXT, Di as subjectPathSvgPoints, Dn as TrackPuritySchema, Dr as isAudioClassName, Dt as NC_TEMPLATE_VARS, E as DEFAULT_EVENT_COLOR, Ei as subjectPathSampleFromBox, En as TimelapseRuleSchema, Er as isAppLinkBase, Et as NC_TAXONOMY, F as EVENT_DENSITY_BATCH_MAX, Fi as templateCarriesSummary, Fn as alarmPanelCapability, Fr as isMediaOwnerType, Ft as NcLegacyRuleActionSequenceSchema, G as ListTrackRelationsResultSchema, Gi as errMsg, Gn as audioMetricsCapability, Gr as memoizePinnedFfmpeg, Gt as NcSnoozeInputSchema, H as LABEL_SUPPLY_MACRO, Hi as evaluateSensorEdge, Hn as applySecureOnArmEdit, Hr as kebabToCamel, Ht as NcRuleUpdateInputSchema, I as EVENT_KIND_BY_CAP, Ii as templateVarsFor, In as alertEpisodeId, Ir as isRetiredClearKey, It as NcRuleActionSchema, J as MAX_BIRTH_DECISION_RECORDS, Ji as RECORD_MAX_DATA_BYTES, Jn as buildSubjectPath, Jr as notificationRulesCapability, Jt as NcStateSummarySectionIdSchema, K as LockStateSchema, Ki as BaseAddon, Kn as audioModeOf, Kr as ncMediaPolicyError, Kt as NcSnoozeSchema, L as EVENT_OWNER_TYPES, Li as vectorDimFromBase64, Ln as alertEpisodeKind, Lr as isRootSuppliableStepId, Lt as NcRuleActionsSchema, M as EMBEDDING_MODEL_FAILED, Mi as systemEventFilterApplies, Mn as activateAlarmProfile, Mr as isEventOwnerType, Mt as NcAlarmSettingsPatchSchema, N as EMBEDDING_REQUIREMENTS_FAILED, Ni as systemEventSummaryScheduleOf, Nn as addonWidgetsSourceCapability, Nr as isKnownTemplateVar, Nt as NcConditionDescriptorSchema, O as DETECTION_MACRO_CLASSES, Oi as summarizeReview, On as TrackRelationKindSchema, Or as isDefaultAlarmProfileId, Ot as NcAlarmConfigSchema, P as EMBEDDING_REQUIREMENTS_UNAVAILABLE, Pi as systemEventSummarySplitOf, Pn as alarmDeviceSecureOnArm, Pr as isLabelSupplyStepId, Pt as NcConditionsSchema, Q as MOTION_CLOSE_AFTER_MS, Qi as defineCustomActions, Qn as cloneAlarmSettings, Qr as pickFaceRescoreIntervalMinutes, Qt as NcTemplatePreviewSchema, R as EXPORT_DENSE_MAX_RANGES, Ri as viewerLinkBaseOf, Rn as alertEpisodePayload, Rr as isScheduleActive, Rt as NcRuleInputSchema, S as ClearTrackRelationInputSchema, Sa as EventCategory, Si as servedTemplateVars, Sn as TIMELAPSE_DENSE_FLOOR_SEC, Sr as gifFromMp4Args, St as NC_SENSOR_TRANSITION_KINDS, T as DEFAULT_DETAIL_CROP_CONVENTION, Ti as subKindsOf, Tn as TimelapseRulePatchSchema, Tr as isAlertEpisodeSeverity, Tt as NC_TANK_SYSTEM_EVENT_KINDS, U as LabelAttributionSchema, Ui as isSourceCap, Un as armRemovalReconcile, Ur as linkedStepOf, Ut as NcScheduleSchema, V as FailureCounters, Vi as canonicalHash, Vn as applyNonBlockingEdit, Vr as isVectorIndexDimConflict, Vt as NcRuleTargetSchema, W as ListTrackRelationsInputSchema, Wi as DeviceType, Wn as assertTimelapseCadences, Wr as mayWriteToLocation, Wt as NcSharedSequenceSchema, X as MAX_TRACK_PURITIES, Xi as createEvent, Xn as calendarEventLocalSpan, Xr as parseAlertEpisodePayload, Xt as NcTaxonomySchema, Y as MAX_BIRTH_LATENCY_PROXY_MS, Yi as RECORD_QUERY_MAX, Yn as buildViewerLink, Yr as occupancyScope, Yt as NcSystemEventKindSchema, Z as MAX_TRACK_RELATIONS, Zi as customAction, Zn as classifyRetrainReview, Zt as NcTemplatePreviewInputSchema, _ as BIRTH_DECISION_DEFAULT_LIMIT, _a as string, _i as ruleGroupingApplies, _n as SCENE_RESET_RECAPTURES, _r as eventKindLabel, _t as NC_CONSUMABLE_SYSTEM_EVENT_KINDS, a as CLIP_EMBEDDING_STEP_ID, aa as ZodObject, ai as renameAlarmProfile, an as RebuildObjectEmbeddingsRefusalSchema, ar as derivePostTriggeredAction, at as NC_ALARM_NOTIFY_FIELDS, b as BucketAccumulator, ba as union, bi as secureActuationFor, bn as SetTrackPurityResultSchema, br as failureContributionCapability, bt as NC_GROUPING_MAX_SEC, c as readClusterModelPinStrict, ca as boolean, ci as resolveModeDelays, cn as RetrainStatusSchema, cr as describeSystemEventFamilyProblem, ct as NC_AUDIO_CONFIRM_HITS_DEFAULT, d as APPEARANCE_BLOCKS, da as looseObject, dn as SCENE_DEFAULT_ANCHOR_THRESHOLD, dt as NC_CLIP_PRE_ROLL_DEFAULT_SEC, ea as hydrateSchema, ei as plateGalleryCapability, en as OPS_LOG_DEFAULT_LIMIT, er as coreBlockIdFromAddonId, et as MotionTriggeredBySchema, f as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT, fa as number, fi as retrainRevisionConflictMessage, fn as SCENE_DEFAULT_CHECK_INTERVAL_SEC, fr as embeddingRefusalOf, ft as NC_CLIP_RETENTION_MAX_SEC, g as ArchivedDebugNoteSchema, ga as strictObject, gi as ruleDeviceCompatCapQueries, gn as SCENE_DIVERGED, gr as ensureAlarmProfiles, gt as NC_CONSUMABLE_LOW_PERCENT_DEFAULT, h as AlarmArmModeSchema, ha as record, hi as ruleBelongsToAlarm$1, hn as SCENE_DEFAULT_UNCOVERED_POLICY, hr as encodeVectorBase64, ht as NC_CONFIRM_DEFAULT_TIMEOUT_MS, ia as sleep$1, ii as readTimelapseGeneratedAt, in as RECORDING_SOURCE_CAMSTACK_ADDON, ir as deriveDetailCropRect, it as NC_ALARM_DELAY_MAX_SEC, j as DetectionSourceSchema, ji as systemEventFamilyProblems, jn as TrackSourceSchema, jr as isEventKindLabelKey, jt as NcAlarmSensorsSchema, k as DETECTION_PIPELINE_CAP_NAME, ki as syncActiveAlarmProfileSettings, kn as TrackRelationSchema, kr as isDetectionMacroClass, kt as NcAlarmPostTriggeredActionSchema, l as resolveClusterModelPin, la as discriminatedUnion, li as resolveModeNotifyPolicy, ln as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, lr as deviceRemovalHookCapability, lt as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, m as AUDIO_MACRO_LABELS, ma as partialRecord, mi as ruleAutoTriggersAlarm, mn as SCENE_DEFAULT_QUIET_SECONDS, mt as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, na as nodePin, ni as readDeviceStateFrom, nr as createAlarmProfile, nt as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, o as CLUSTER_MODEL_OWNER_ADDON_ID, oa as _enum, oi as resolveClipSearchMinScore, on as RetrainDismissedSchema, or as deriveRecordingMode, ot as NC_ALARM_SYSTEM_EVENT_KINDS, p as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, pa as object, pi as rootSupplyServes, pn as SCENE_DEFAULT_OBSERVATION_SPACING_SEC, pt as NC_CONDITION_CATALOG, q as MAX_ARCHIVED_DEBUG_NOTES, qi as CamProfileSchema, qn as buildEventKindDescriptor, qr as normalizeNcMediaPolicy, qt as NcSnoozeSuppressedSchema, ri as readMotionTriggeredBy, rn as RECORDING_EXPORT_MAX_READ_BYTES, rr as deleteAlarmProfile, rt as NC_ALARM_DELAY_FIELDS, s as FACE_EMBEDDING_STEP_ID, sa as array, si as resolveLocationMode, sn as RetrainOriginSchema, sr as describeSystemEventDeliveryProblem, st as NC_ALARM_TRIGGERED_MAX_SEC, t as BUILTIN_CLIP_MODELS, ta as isDeviceScopedCap, ti as projectSubjectPath, tn as OpsLogEntrySchema, tr as cosineSimilarity$1, tt as NC_ALARM_DEFAULT_PROFILE_ID, u as APPEARANCE_BIN_COUNT, ua as literal, ui as resolveNcMediaImage, un as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, ut as NC_CLIP_POST_ROLL_DEFAULT_SEC, v as BaseDevice, va as templateLiteral, vi as ruleKindOf, vn as SceneMonitorSchema, vr as evictionPolicyOfLocation, vt as NC_DEFAULT_SNOOZE_MINUTES, w as CoverStateSchema, wi as storageOccupancyCapability, wn as TimelapseRuleInputSchema, wr as isAlertEpisodeOpen, wt as NC_SYSTEM_EVENT_KIND_GROUP_SPECS, x as COCO_TO_MACRO, xa as unknown, xi as sensorRaisedOf, xn as SetTrackRelationInputSchema, xr as gifDeriveSpeed, xt as NC_GROUPING_MIN_SEC, y as BirthDecisionRecordSchema, ya as tuple, yi as sceneMonitorCapability, yn as SetTrackPurityInputSchema, yr as faceGalleryCapability, yt as NC_GROUPING_DEFAULT_SEC, z as FIRST_LEVEL_MACRO_CLASSES, zi as zoneAnalyticsCapability, zn as applyBlockingEdit, zr as isSystemDelivery, zt as NcRulePatchSchema } from "../clip-model-registry-Clb51mcj.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";
@@ -9385,7 +9385,7 @@ var IdentityConfigBodySchema = object({
9385
9385
  *
9386
9386
  * `addedAt` is ALSO in the body: the `identity_added` index names it, and an
9387
9387
  * index reads the body, never the header. Optional only because rows written
9388
- * before the fix lack it until `records.backfillIndexFields` runs.
9388
+ * before the fix lacked it (repaired on the operator hubs on 2026-10-22).
9389
9389
  */
9390
9390
  var IdentitySampleLedgerBodySchema = object({
9391
9391
  identityId: string(),
@@ -9468,7 +9468,7 @@ var FaceRescoreJobStatusSchema = object({
9468
9468
  *
9469
9469
  * Each kind replaced the legacy `pipeline-analytics:*` collection of the same
9470
9470
  * name; the records migration that copied them is closed (D900) and the tables
9471
- * are gone (`retired-legacy-tables.ts`). The addon declares no
9471
+ * are gone (dropped offline on the operator hubs). The addon declares no
9472
9472
  * `execution.group`, so the hub owner stamp is the addon id
9473
9473
  * (`pipeline-analytics`).
9474
9474
  */
@@ -11789,14 +11789,8 @@ var DebugNoteArchiveStore = class {
11789
11789
  };
11790
11790
  //#endregion
11791
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
- */
11796
11792
  /** Matches {@link EventStore.LEDGER_PAGE_SIZE} — kept local to avoid a circular import. */
11797
11793
  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"]);
11800
11794
  var EventLedgerCollection = class EventLedgerCollection {
11801
11795
  collection;
11802
11796
  store;
@@ -11805,8 +11799,6 @@ var EventLedgerCollection = class EventLedgerCollection {
11805
11799
  legacyAtField;
11806
11800
  deviceIdMode;
11807
11801
  logger;
11808
- /** Body fields a declared index names that the header also carries (see {@link backfillIndexFields}). */
11809
- headerIndexFields;
11810
11802
  constructor(deps) {
11811
11803
  this.collection = deps.collection;
11812
11804
  this.store = deps.store;
@@ -11814,7 +11806,6 @@ var EventLedgerCollection = class EventLedgerCollection {
11814
11806
  this.legacyAtField = deps.legacyAtField ?? "timestamp";
11815
11807
  this.deviceIdMode = deps.deviceIdMode ?? "required";
11816
11808
  this.logger = deps.logger;
11817
- this.headerIndexFields = headerIndexFieldsOf(deps.definition, this.legacyAtField);
11818
11809
  if (deps.records !== void 0) {
11819
11810
  const handle = deps.records.kind(deps.definition);
11820
11811
  this.kind = handle;
@@ -12061,73 +12052,6 @@ var EventLedgerCollection = class EventLedgerCollection {
12061
12052
  nextCursor: page.nextCursor
12062
12053
  };
12063
12054
  }
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
- }
12131
12055
  async getManyByIds(ids) {
12132
12056
  if (ids.length === 0) return [];
12133
12057
  if (this.kind === null) return (await this.store.query.query({
@@ -12367,20 +12291,6 @@ function eventBodyFromLegacyRecord(record) {
12367
12291
  }
12368
12292
  return out;
12369
12293
  }
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
- }
12384
12294
  function recordsRowToLegacy(row, legacyAtField) {
12385
12295
  const deviceId = row.deviceId ?? row.data["deviceId"];
12386
12296
  const clock = row.at ?? readLegacyClock(row.data, legacyAtField);
@@ -20110,7 +20020,7 @@ function isWriterBoundedOwnerKind(value) {
20110
20020
  * `'group'` is the co-moving group entity, removed on 2026-09-01 together with
20111
20021
  * `pipeline-analytics:track-groups` / `:track-group-members`
20112
20022
  * ([D183](../../../../../docs/decisions/adr-0183-code-that-is-deleted-takes-its-tables-with-it.md)).
20113
- * The tables are dropped at boot from `RETIRED_COLLECTIONS`, so a group-owned
20023
+ * The tables are gone (dropped on every hub), so a group-owned
20114
20024
  * media row can never be claimed again: `resolveMediaOwner` maps it to
20115
20025
  * `{ kind: 'retired-owner' }` and the orphan audit reclaims it under the same
20116
20026
  * grace window and ceilings as any other orphan.
@@ -41802,6 +41712,53 @@ function selectTriggerZoneCandidates(input) {
41802
41712
  }
41803
41713
  //#endregion
41804
41714
  //#region src/notification-center/notification-image.ts
41715
+ /**
41716
+ * notificationImage — ONE stage renders every notification picture (D897).
41717
+ *
41718
+ * ## The defect this replaces
41719
+ *
41720
+ * A rule's picture used to be a STORED kind picked by a ladder: `best` walked
41721
+ * subject crops and ended in the boxed `firstFrame`, so one rule shipped a
41722
+ * crop on one event and a boxed scene on the next depending on what had
41723
+ * landed; boxes were burnt only at WRITE time and only around the track's own
41724
+ * box; `zoneCrop` was a third mechanism, and the sensor, sound, linked-camera
41725
+ * and mosaic paths each had their own rules for what "the picture" was.
41726
+ *
41727
+ * ## The stage
41728
+ *
41729
+ * The dispatcher resolves a CLEAN source frame of the trigger moment
41730
+ * (`cleanSourcePreference`: keyFrame → sceneFrame → lastSceneFrame, after the
41731
+ * MOMENT and PLACE filters), and this stage renders it by the rule's mode:
41732
+ *
41733
+ * - `scene-boxes` — the whole scene; the subject outlined THICK in the accent
41734
+ * colour, every OTHER track visible at that instant outlined THIN, each
41735
+ * captioned with class and confidence ("dog 87%") on a dark plate that
41736
+ * reads on any background. Boxes are the tracks' normalised trail boxes AT
41737
+ * the source frame's timestamp — never the track envelope — scaled to the
41738
+ * JPEG.
41739
+ * - `crop` — the subject cut out of the clean frame around its box at that
41740
+ * instant.
41741
+ * - `clean` — the scene, nothing drawn.
41742
+ * - `showTriggerZone` adds the zone that fired the rule to a scene mode.
41743
+ * - `showSubjectPath` (D903) adds the subject's path — a line in the
41744
+ * subject's colour through its trail centres up to the frame shown — to
41745
+ * every mode; on a `crop` it is mapped into the crop and clipped. The
41746
+ * geometry is `buildSubjectPath` / `projectSubjectPath` from
41747
+ * `@camstack/types`, the same the debug views draw.
41748
+ *
41749
+ * A mode that cannot be honoured ships `clean` and says why, once per record
41750
+ * (D400: "a branch that fails to produce media names the reason"): no subject
41751
+ * box at that instant, no track visible at that instant, a source that is
41752
+ * already annotated (a track that holds no clean frame), a composite.
41753
+ *
41754
+ * ## Once per record
41755
+ *
41756
+ * N targets and every outbox retry resolve the same row; the render is
41757
+ * memoised per record + subject + mode + zone flag + camera for
41758
+ * {@link NC_IMAGE_MEMO_TTL_MS}, so a 4K decode happens once, not once per
41759
+ * phone. It runs in the process that hosts the Notification Center (the
41760
+ * pipeline-analytics runner), which already carries `sharp`.
41761
+ */
41805
41762
  /** How long a rendered picture is reused for the same record (N targets, retries). */
41806
41763
  var NC_IMAGE_MEMO_TTL_MS = 15 * 6e4;
41807
41764
  /** At most this many rendered pictures are held. */
@@ -41869,6 +41826,10 @@ function notificationOverlaySvg(input) {
41869
41826
  const points = zone.map((p) => `${String(clampPx(p.x * width, width))},${String(clampPx(p.y * height, height))}`).join(" ");
41870
41827
  parts.push(`<polygon data-role="zone" points="${points}" fill="${NC_IMAGE_ZONE_COLOR}" fill-opacity="0.18" stroke="${NC_IMAGE_ZONE_COLOR}" stroke-width="${String(strokes.other)}" stroke-dasharray="${String(strokes.subject * 2)},${String(strokes.subject)}"/>`);
41871
41828
  }
41829
+ for (const run of input.paths ?? []) {
41830
+ if (run.length < 2) continue;
41831
+ parts.push(`<polyline data-role="subject-path" points="${subjectPathSvgPoints(run, width, height)}" fill="none" stroke="${NC_IMAGE_SUBJECT_COLOR}" stroke-width="${String(strokes.subject)}" stroke-linejoin="round" stroke-linecap="round" stroke-opacity="0.9"/>`);
41832
+ }
41872
41833
  const ordered = [...input.boxes.filter((b) => b.role === "other"), ...input.boxes.filter((b) => b.role === "subject")];
41873
41834
  for (const box of ordered) {
41874
41835
  const subject = box.role === "subject";
@@ -41939,6 +41900,10 @@ function payloadZoneOverlayIds(payload) {
41939
41900
  if (payload.mediaImage === void 0) return payload.mediaZoneIds ?? [];
41940
41901
  return [];
41941
41902
  }
41903
+ /** True when a row's picture draws the subject's path (D903). */
41904
+ function payloadShowsSubjectPath(payload) {
41905
+ return payload.mediaShowSubjectPath === true;
41906
+ }
41942
41907
  /**
41943
41908
  * Which camera the primary still SHOWS, or `composite` when it is a composed
41944
41909
  * mosaic of several. A sensor row of a linked set names its cameras primary
@@ -41972,16 +41937,47 @@ async function renderNotificationImage(req) {
41972
41937
  if (srcW === 0 || srcH === 0) throw new Error("source frame has no dimensions");
41973
41938
  if (req.mode === "crop" && req.subject !== null) {
41974
41939
  const rect = subjectCropRect(req.subject, srcW, srcH);
41975
- if (rect !== null) return {
41976
- bytes: toArrayBufferBytes(await sharp(Buffer.from(req.bytes)).extract(rect).resize({
41940
+ if (rect !== null) {
41941
+ const view = {
41942
+ x: rect.left / srcW,
41943
+ y: rect.top / srcH,
41944
+ w: rect.width / srcW,
41945
+ h: rect.height / srcH
41946
+ };
41947
+ const paths = projectSubjectPath(req.path ?? [], view);
41948
+ const cut = sharp(Buffer.from(req.bytes)).extract(rect).resize({
41977
41949
  width: NC_IMAGE_CROP_MAX_EDGE,
41978
41950
  height: NC_IMAGE_CROP_MAX_EDGE,
41979
41951
  fit: "inside",
41980
41952
  withoutEnlargement: true
41981
- }).jpeg({ quality: JPEG_QUALITY }).toBuffer()),
41982
- name: "crop.jpg",
41983
- rendered: "crop"
41984
- };
41953
+ });
41954
+ if (paths.length === 0) return {
41955
+ bytes: toArrayBufferBytes(await cut.jpeg({ quality: JPEG_QUALITY }).toBuffer()),
41956
+ name: "crop.jpg",
41957
+ rendered: "crop"
41958
+ };
41959
+ const { data, info } = await cut.raw().toBuffer({ resolveWithObject: true });
41960
+ const svg = notificationOverlaySvg({
41961
+ width: info.width,
41962
+ height: info.height,
41963
+ boxes: [],
41964
+ zones: [],
41965
+ paths
41966
+ });
41967
+ return {
41968
+ bytes: toArrayBufferBytes(await sharp(data, { raw: {
41969
+ width: info.width,
41970
+ height: info.height,
41971
+ channels: info.channels
41972
+ } }).composite([{
41973
+ input: Buffer.from(svg),
41974
+ top: 0,
41975
+ left: 0
41976
+ }]).jpeg({ quality: JPEG_QUALITY }).toBuffer()),
41977
+ name: "crop.jpg",
41978
+ rendered: "crop"
41979
+ };
41980
+ }
41985
41981
  }
41986
41982
  const scale = Math.min(1, NC_IMAGE_SCENE_MAX_WIDTH / srcW);
41987
41983
  const outW = Math.max(1, Math.round(srcW * scale));
@@ -41996,17 +41992,24 @@ async function renderNotificationImage(req) {
41996
41992
  label: req.subject.label
41997
41993
  }] : []] : [];
41998
41994
  const zones = req.mode === "crop" ? [] : req.zones;
41995
+ const paths = projectSubjectPath(req.path ?? [], {
41996
+ x: 0,
41997
+ y: 0,
41998
+ w: 1,
41999
+ h: 1
42000
+ });
41999
42001
  let pipeline = sharp(Buffer.from(req.bytes)).resize({
42000
42002
  width: outW,
42001
42003
  height: outH,
42002
42004
  fit: "fill"
42003
42005
  });
42004
- if (boxes.length > 0 || zones.length > 0) {
42006
+ if (boxes.length > 0 || zones.length > 0 || paths.length > 0) {
42005
42007
  const svg = notificationOverlaySvg({
42006
42008
  width: outW,
42007
42009
  height: outH,
42008
42010
  boxes,
42009
- zones
42011
+ zones,
42012
+ paths
42010
42013
  });
42011
42014
  pipeline = pipeline.composite([{
42012
42015
  input: Buffer.from(svg),
@@ -42044,11 +42047,13 @@ var NcNotificationImageStage = class {
42044
42047
  const mode = payloadImageMode(payload);
42045
42048
  if (mode === "none") return null;
42046
42049
  const zoneIds = input.withSubject ? payloadZoneOverlayIds(payload) : [];
42050
+ const withPath = input.withSubject && payloadShowsSubjectPath(payload);
42047
42051
  const key = [
42048
42052
  input.entry.recordId,
42049
42053
  payload.subject.trackId ?? "",
42050
42054
  mode,
42051
42055
  zoneIds.length > 0 ? "z" : "-",
42056
+ withPath ? "p" : "-",
42052
42057
  String(input.camera)
42053
42058
  ].join("|");
42054
42059
  const now = this.deps.now();
@@ -42058,7 +42063,7 @@ var NcNotificationImageStage = class {
42058
42063
  this.memo.set(key, hit);
42059
42064
  return hit.value;
42060
42065
  }
42061
- const value = this.compute(input, mode, zoneIds);
42066
+ const value = this.compute(input, mode, zoneIds, withPath);
42062
42067
  this.remember(key, {
42063
42068
  at: now,
42064
42069
  value
@@ -42078,13 +42083,15 @@ var NcNotificationImageStage = class {
42078
42083
  }
42079
42084
  this.memo.set(key, entry);
42080
42085
  }
42081
- async compute(input, mode, zoneIds) {
42086
+ async compute(input, mode, zoneIds, withPath) {
42082
42087
  const { entry, source, camera } = input;
42083
42088
  const payload = entry.payload;
42084
42089
  if (source.annotated) return this.asStored(input, mode, "annotated-source");
42085
42090
  if (camera === "composite") return mode === "clean" ? this.asStored(input, mode) : this.asStored(input, mode, "composite-source");
42086
42091
  const subjectTrackId = input.withSubject ? payload.subject.trackId : void 0;
42087
- const subjectBox = hasTrackedSubject(subjectTrackId) ? await this.subjectBoxAt(camera, subjectTrackId, source.timestamp) : null;
42092
+ const trail = hasTrackedSubject(subjectTrackId) ? await this.subjectTrail(camera, subjectTrackId) : [];
42093
+ const subjectBox = trailAt(trail, source.timestamp, NC_IMAGE_BOX_MATCH_MAX_MS)?.bbox ?? null;
42094
+ const path = withPath ? this.subjectPath(input, trail) : [];
42088
42095
  const subject = subjectBox !== null ? {
42089
42096
  ...subjectBox,
42090
42097
  label: imageLabelText(payload.subject.label ?? payload.subject.className, payload.subject.confidence)
@@ -42100,7 +42107,8 @@ var NcNotificationImageStage = class {
42100
42107
  bytes: source.bytes,
42101
42108
  subject,
42102
42109
  others,
42103
- zones
42110
+ zones,
42111
+ ...path.length > 0 ? { path } : {}
42104
42112
  });
42105
42113
  const reason = image.rendered === mode ? void 0 : mode === "crop" ? "no-subject-box" : "no-tracks-at-instant";
42106
42114
  if (reason !== void 0) this.reportFallback(input, mode, reason);
@@ -42152,22 +42160,48 @@ var NcNotificationImageStage = class {
42152
42160
  }
42153
42161
  });
42154
42162
  }
42155
- async subjectBoxAt(camera, trackId, timestamp) {
42163
+ /** The subject's trail, read once per render for its box AND its path. */
42164
+ async subjectTrail(camera, trackId) {
42156
42165
  const read = this.deps.getSubjectTrail;
42157
- if (read === void 0) return null;
42166
+ if (read === void 0) return [];
42158
42167
  try {
42159
- return trailAt(await read(camera, trackId), timestamp, NC_IMAGE_BOX_MATCH_MAX_MS)?.bbox ?? null;
42168
+ return await read(camera, trackId);
42160
42169
  } catch (err) {
42161
- this.deps.logger.debug("subject trail read failed — no subject box on the picture", {
42170
+ this.deps.logger.debug("subject trail read failed — no subject box or path on the picture", {
42162
42171
  tags: { deviceId: camera },
42163
42172
  meta: {
42164
42173
  trackId,
42165
42174
  error: String(err)
42166
42175
  }
42167
42176
  });
42168
- return null;
42177
+ return [];
42169
42178
  }
42170
42179
  }
42180
+ /**
42181
+ * The subject's path up to the frame shown, normalised in that frame, or
42182
+ * empty when the trail has fewer than two drawable points — then the
42183
+ * picture ships without it, and the line below says so (D400: a branch
42184
+ * that produces nothing names why).
42185
+ */
42186
+ subjectPath(input, trail) {
42187
+ const path = buildSubjectPath(trail.map((p) => subjectPathSampleFromBox(p.bbox, p.timestamp)), { untilTimestamp: input.source.timestamp });
42188
+ if (isDrawableSubjectPath(path)) return path.nodes.map((n) => ({
42189
+ x: n.x,
42190
+ y: n.y
42191
+ }));
42192
+ const camera = input.camera === "composite" ? input.entry.payload.subject.deviceId : input.camera;
42193
+ this.deps.logger.debug("subject path not drawn — fewer than two trail points", {
42194
+ tags: { deviceId: camera },
42195
+ meta: {
42196
+ ruleId: input.entry.ruleId,
42197
+ recordId: input.entry.recordId,
42198
+ trailPoints: trail.length,
42199
+ nodes: path.nodes.length,
42200
+ unlocalized: path.unlocalized
42201
+ }
42202
+ });
42203
+ return [];
42204
+ }
42171
42205
  async tracksAt(camera, timestamp) {
42172
42206
  const read = this.deps.getTracksAt;
42173
42207
  if (read === void 0) return [];
@@ -56057,6 +56091,7 @@ function mediaPolicyFields(mediaRule, cropZoneIds) {
56057
56091
  media: image === "none" ? "none" : "best",
56058
56092
  mediaImage: image,
56059
56093
  ...media.showTriggerZone === true && cropZoneIds !== void 0 && cropZoneIds.length > 0 ? { mediaShowTriggerZone: true } : {},
56094
+ ...media.showSubjectPath === true && image !== "none" ? { mediaShowSubjectPath: true } : {},
56060
56095
  ...cropZoneIds !== void 0 ? { triggerZoneIds: [...cropZoneIds] } : {},
56061
56096
  ...media.profile !== void 0 ? { mediaProfile: media.profile } : {},
56062
56097
  ...media.gif === true ? { mediaGif: true } : {},
@@ -79453,96 +79488,6 @@ async function forgetMissingMediaRows(deps, rawInput) {
79453
79488
  };
79454
79489
  }
79455
79490
  //#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
79546
79491
  //#region src/pipeline-analytics/retention/media-reclaim.ts
79547
79492
  var MEDIA_RECLAIM_SCOPES = ["motion-still", "track-filmstrip"];
79548
79493
  var DEFAULT_MEDIA_RECLAIM_LIMITS = {
@@ -115544,7 +115489,6 @@ var customActions = {
115544
115489
  ...mediaReclaimActions,
115545
115490
  ...locationDiscardActions,
115546
115491
  ...mediaForgetActions,
115547
- ...ledgerIndexBackfillActions,
115548
115492
  ...photoEnrollActions,
115549
115493
  ...faceRescoreActions,
115550
115494
  ...stillnessCalibrationActions
@@ -117577,7 +117521,6 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
117577
117521
  ...mediaReclaimActions,
117578
117522
  ...locationDiscardActions,
117579
117523
  ...mediaForgetActions,
117580
- ...ledgerIndexBackfillActions,
117581
117524
  ...photoEnrollActions,
117582
117525
  ...faceRescoreActions,
117583
117526
  ...stillnessCalibrationActions
@@ -127388,11 +127331,6 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
127388
127331
  const deps = this.mediaForgetDeps;
127389
127332
  if (deps === null) throw new Error("storage.forgetMissingMedia: not initialised");
127390
127333
  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);
127396
127334
  }
127397
127335
  };
127398
127336
  }
@@ -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-DiTZe8LM.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BGo4IMTT.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.617",
3
+ "version": "1.2.619",
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",