@camstack/addon-post-analysis 1.2.627 → 1.2.628

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/dist/{clip-model-registry-RSxtlgdN.js → clip-model-registry-CK0QHBLo.js} +77 -198
  2. package/dist/{clip-model-registry-CCMO8jrp.mjs → clip-model-registry-CXp8hOtz.mjs} +77 -198
  3. package/dist/embedding-encoder/index.js +1 -1
  4. package/dist/embedding-encoder/index.mjs +1 -1
  5. package/dist/pipeline-analytics/_stub.js +2 -2
  6. package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CB62NeGh.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BSMQI14W.mjs} +2 -2
  7. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CC5fsXdm.mjs +26 -0
  8. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DdDfkgWU.mjs +26 -0
  9. package/dist/pipeline-analytics/{hostInit-BUdkjx1s.mjs → hostInit-DZur54eI.mjs} +2 -2
  10. package/dist/pipeline-analytics/index.js +150 -118
  11. package/dist/pipeline-analytics/index.mjs +150 -118
  12. package/dist/pipeline-analytics/remoteEntry.js +1 -1
  13. package/package.json +1 -1
  14. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DY-_tUCM.mjs +0 -26
  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-_Ip2ZGVX.mjs +0 -26
@@ -1,4 +1,4 @@
1
- import { $ as MediaFileKindEnum, $i as customAction, $n as coreBlockIdFromAddonId, $r as pipelineAnalyticsCapability, $t as OpsLogEntrySchema, A as DeclaredDevices, Ai as systemEventDeliveryProblems, An as TrackSourceSchema, Ar as isDrawableSubjectPath, At as NcAlarmSensorsInputSchema, B as FULL_IMAGE_BBOX, Bi as zoneAnalyticsCapability, Bn as applyNonBlockingEdit, Br as isSystemEventSummaryRule, Bt as NcRuleUpdateInputSchema, C as ClearTrackRelationResultSchema, Ca as unknown, Ci as startMoverUnderClearance, Cn as TimelapseRulePatchSchema, Cr as isAlarmControllableCap, Ct as NC_SNOOZE_MAX_MINUTES, D as DEFAULT_TIMELAPSE_PREVIEW_TEXT, Di as subjectPathSvgPoints, Dn as TrackRelationKindSchema, Dr as isAudioClassName, Dt as NC_TEMPLATE_VARS, E as DEFAULT_EVENT_COLOR, Ei as subjectPathSampleFromBox, En as TrackPuritySchema, Er as isAppLinkBase, Et as NC_TAXONOMY, F as EVENT_DENSITY_BATCH_MAX, Fi as templateCarriesSummary, Fn as alertEpisodeId, Fr as isMediaOwnerType, Ft as NcRuleActionSchema, G as ListTrackRelationsResultSchema, Gi as DeviceType, Gn as audioModeOf, Gr as memoizePinnedFfmpeg, Gt as NcSnoozeSuppressedSchema, H as LABEL_SUPPLY_MACRO, Hi as canonicalHash, Hn as armRemovalReconcile, Hr as kebabToCamel, Ht as NcSharedSequenceSchema, I as EVENT_KIND_BY_CAP, Ii as templateVarsFor, In as alertEpisodeKind, Ir as isRetiredClearKey, It as NcRuleInputSchema, J as MAX_BIRTH_DECISION_RECORDS, Ji as CamProfileSchema, Jn as buildViewerLink, Jr as notificationRulesCapability, Jt as NcTaxonomySchema, K as LockStateSchema, Ki as errMsg, Kn as buildEventKindDescriptor, Kr as ncMediaPolicyError, Kt as NcStateSummarySectionIdSchema, L as EVENT_OWNER_TYPES, Li as vectorDimFromBase64, Ln as alertEpisodePayload, Lr as isRootSuppliableStepId, Lt as NcRulePatchSchema, M as EMBEDDING_MODEL_FAILED, Mi as systemEventFilterApplies, Mn as addonWidgetsSourceCapability, Mr as isEventOwnerType, Mt as NcAlarmSettingsPatchSchema, N as EMBEDDING_REQUIREMENTS_FAILED, Ni as systemEventSummaryScheduleOf, Nn as alarmDeviceSecureOnArm, Nr as isKnownTemplateVar, Nt as NcConditionDescriptorSchema, O as DETECTION_MACRO_CLASSES, Oi as summarizeReview, On as TrackRelationSchema, Or as isDefaultAlarmProfileId, Ot as NcAlarmConfigSchema, P as EMBEDDING_REQUIREMENTS_UNAVAILABLE, Pi as systemEventSummarySplitOf, Pn as alarmPanelCapability, Pr as isLabelSupplyStepId, Pt as NcConditionsSchema, Q as MOTION_CLOSE_AFTER_MS, Qi as createEvent, Qn as consumableLowPercentOf, Qr as pickFaceRescoreIntervalMinutes, Qt as OPS_LOG_DEFAULT_LIMIT, R as EXPORT_DENSE_MAX_RANGES, Ri as viewerLinkBaseOf, Rn as applyBlockingEdit, Rr as isScheduleActive, Rt as NcRuleSchema, S as ClearTrackRelationInputSchema, Sa as union, Si as servedTemplateVars, Sn as TimelapseRuleInputSchema, Sr as gifFromMp4Args, St as NC_SENSOR_TRANSITION_KINDS, T as DEFAULT_DETAIL_CROP_CONVENTION, Ti as subKindsOf, Tn as TrackPlacementSchema, Tr as isAlertEpisodeSeverity, Tt as NC_TANK_SYSTEM_EVENT_KINDS, U as LabelAttributionSchema, Ui as evaluateSensorEdge, Un as assertTimelapseCadences, Ur as linkedStepOf, Ut as NcSnoozeInputSchema, V as FailureCounters, Vi as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, Vn as applySecureOnArmEdit, Vr as isVectorIndexDimConflict, Vt as NcScheduleSchema, W as ListTrackRelationsInputSchema, Wi as isSourceCap, Wn as audioMetricsCapability, Wr as mayWriteToLocation, Wt as NcSnoozeSchema, X as MAX_TRACK_PURITIES, Xi as RECORD_MAX_DATA_BYTES, Xn as classifyRetrainReview, Xr as parseAlertEpisodePayload, Xt as NcTemplatePreviewSchema, Y as MAX_BIRTH_LATENCY_PROXY_MS, Yi as InvalidRecordError, Yn as calendarEventLocalSpan, Yr as occupancyScope, Yt as NcTemplatePreviewInputSchema, Z as MAX_TRACK_RELATIONS, Zi as RECORD_QUERY_MAX, Zn as cloneAlarmSettings, Zt as NcTemplateVarDescriptorSchema, _ as BIRTH_DECISION_DEFAULT_LIMIT, _a as record, _i as ruleGroupingApplies, _n as SetTrackPurityInputSchema, _r as eventKindLabel, _t as NC_CONSUMABLE_SYSTEM_EVENT_KINDS, a as CLIP_EMBEDDING_STEP_ID, ai as renameAlarmProfile, an as RetrainOriginSchema, ar as deriveRecordingMode, at as NC_ALARM_NOTIFY_FIELDS, b as BucketAccumulator, ba as templateLiteral, bi as secureActuationFor, bn as TIMELAPSE_DENSE_FLOOR_SEC, br as failureContributionCapability, bt as NC_GROUPING_MAX_SEC, c as readClusterModelPinStrict, ca as _enum, ci as resolveModeDelays, cn as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, cr as deviceAttentionKind, ct as NC_AUDIO_CONFIRM_HITS_DEFAULT, d as APPEARANCE_BLOCKS, da as discriminatedUnion, dn as SCENE_DEFAULT_OBSERVATION_SPACING_SEC, dt as NC_CLIP_PRE_ROLL_DEFAULT_SEC, ea as defineCustomActions, ei as plateGalleryCapability, er as cosineSimilarity$1, et as MotionTriggeredBySchema, f as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT, fa as literal, fi as retrainRevisionConflictMessage, fn as SCENE_DEFAULT_QUIET_SECONDS, fr as embeddingRefusalOf, ft as NC_CLIP_RETENTION_MAX_SEC, g as ArchivedDebugNoteSchema, ga as partialRecord, gi as ruleDeviceCompatCapQueries, gn as SceneMonitorSchema, gr as ensureAlarmProfiles, gt as NC_CONSUMABLE_LOW_PERCENT_DEFAULT, h as AlarmArmModeSchema, ha as object, hi as ruleBelongsToAlarm$1, hn as SCENE_RESET_RECAPTURES, hr as encodeVectorBase64, ht as NC_CONFIRM_DEFAULT_TIMEOUT_MS, ia as nodePin, ii as readTimelapseGeneratedAt, in as RetrainDismissedSchema, ir as derivePostTriggeredAction, it as NC_ALARM_DELAY_MAX_SEC, j as DetectionSourceSchema, ji as systemEventFamilyProblems, jn as activateAlarmProfile, jr as isEventKindLabelKey, jt as NcAlarmSensorsSchema, k as DETECTION_PIPELINE_CAP_NAME, ki as syncActiveAlarmProfileSettings, kn as TrackSideSchema, kr as isDetectionMacroClass, kt as NcAlarmPostTriggeredActionSchema, l as resolveClusterModelPin, la as array, li as resolveModeNotifyPolicy, ln as SCENE_DEFAULT_ANCHOR_THRESHOLD, lr as deviceRemovalHookCapability, lt as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, m as AUDIO_MACRO_LABELS, ma as number, mi as ruleAutoTriggersAlarm, mn as SCENE_DIVERGED, mt as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, na as hydrateSchema, ni as readDeviceStateFrom, nn as RECORDING_SOURCE_CAMSTACK_ADDON, nr as deleteAlarmProfile, nt as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, o as CLUSTER_MODEL_OWNER_ADDON_ID, oa as sleep$1, oi as resolveClipSearchMinScore, on as RetrainStatusSchema, or as describeSystemEventDeliveryProblem, ot as NC_ALARM_SYSTEM_EVENT_KINDS, p as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, pa as looseObject, pi as rootSupplyServes, pn as SCENE_DEFAULT_UNCOVERED_POLICY, pt as NC_CONDITION_CATALOG, q as MAX_ARCHIVED_DEBUG_NOTES, qi as BaseAddon, qn as buildSubjectPath, qr as normalizeNcMediaPolicy, qt as NcSystemEventKindSchema, ra as isDeviceScopedCap, ri as readMotionTriggeredBy, rn as RebuildObjectEmbeddingsRefusalSchema, rr as deriveDetailCropRect, rt as NC_ALARM_DELAY_FIELDS, s as FACE_EMBEDDING_STEP_ID, sa as ZodObject, si as resolveLocationMode, sn as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, sr as describeSystemEventFamilyProblem, st as NC_ALARM_TRIGGERED_MAX_SEC, t as BUILTIN_CLIP_MODELS, ta as defineRecordKinds, ti as projectSubjectPath, tn as RECORDING_EXPORT_MAX_READ_BYTES, tr as createAlarmProfile, tt as NC_ALARM_DEFAULT_PROFILE_ID, u as APPEARANCE_BIN_COUNT, ua as boolean, ui as resolveNcMediaImage, un as SCENE_DEFAULT_CHECK_INTERVAL_SEC, ut as NC_CLIP_POST_ROLL_DEFAULT_SEC, v as BaseDevice, va as strictObject, vi as ruleKindOf, vn as SetTrackPurityResultSchema, vr as evictionPolicyOfLocation, vt as NC_DEFAULT_SNOOZE_MINUTES, w as CoverStateSchema, wa as EventCategory, wi as storageOccupancyCapability, wn as TimelapseRuleSchema, wr as isAlertEpisodeOpen, wt as NC_SYSTEM_EVENT_KIND_GROUP_SPECS, x as COCO_TO_MACRO, xa as tuple, xi as sensorRaisedOf, xn as TRACK_RELATIONS_DEFAULT_LIMIT, xr as gifDeriveSpeed, xt as NC_GROUPING_MIN_SEC, y as BirthDecisionRecordSchema, ya as string, yi as sceneMonitorCapability, yn as SetTrackRelationInputSchema, yr as faceGalleryCapability, yt as NC_GROUPING_DEFAULT_SEC, z as FIRST_LEVEL_MACRO_CLASSES, zi as withSystemEventClasses, zn as applyModeDelaysEdits, zr as isSystemDelivery, zt as NcRuleTargetSchema } from "../clip-model-registry-CCMO8jrp.mjs";
1
+ import { $ as MediaFileKindEnum, $i as customAction, $n as coreBlockIdFromAddonId, $r as pipelineAnalyticsCapability, $t as OpsLogEntrySchema, A as DeclaredDevices, Ai as systemEventDeliveryProblems, An as TrackSourceSchema, Ar as isDrawableSubjectPath, At as NcAlarmSensorsInputSchema, B as FULL_IMAGE_BBOX, Bi as zoneAnalyticsCapability, Bn as applyNonBlockingEdit, Br as isSystemEventSummaryRule, Bt as NcRuleUpdateInputSchema, C as ClearTrackRelationResultSchema, Ca as unknown, Ci as startMoverUnderClearance, Cn as TimelapseRulePatchSchema, Cr as isAlarmControllableCap, Ct as NC_SNOOZE_MAX_MINUTES, D as DEFAULT_TIMELAPSE_PREVIEW_TEXT, Di as subjectPathSvgPoints, Dn as TrackRelationKindSchema, Dr as isAudioClassName, Dt as NC_TEMPLATE_VARS, E as DEFAULT_EVENT_COLOR, Ei as subjectPathSampleFromBox, En as TrackPuritySchema, Er as isAppLinkBase, Et as NC_TAXONOMY, F as EVENT_DENSITY_BATCH_MAX, Fi as templateCarriesSummary, Fn as alertEpisodeId, Fr as isMediaOwnerType, Ft as NcRuleActionSchema, G as ListTrackRelationsResultSchema, Gi as DeviceType, Gn as audioModeOf, Gr as memoizePinnedFfmpeg, Gt as NcSnoozeSuppressedSchema, H as LABEL_SUPPLY_MACRO, Hi as canonicalHash, Hn as armRemovalReconcile, Hr as kebabToCamel, Ht as NcSharedSequenceSchema, I as EVENT_KIND_BY_CAP, Ii as templateVarsFor, In as alertEpisodeKind, Ir as isRetiredClearKey, It as NcRuleInputSchema, J as MAX_BIRTH_DECISION_RECORDS, Ji as CamProfileSchema, Jn as buildViewerLink, Jr as notificationRulesCapability, Jt as NcTaxonomySchema, K as LockStateSchema, Ki as errMsg, Kn as buildEventKindDescriptor, Kr as ncMediaPolicyError, Kt as NcStateSummarySectionIdSchema, L as EVENT_OWNER_TYPES, Li as vectorDimFromBase64, Ln as alertEpisodePayload, Lr as isRootSuppliableStepId, Lt as NcRulePatchSchema, M as EMBEDDING_MODEL_FAILED, Mi as systemEventFilterApplies, Mn as addonWidgetsSourceCapability, Mr as isEventOwnerType, Mt as NcAlarmSettingsPatchSchema, N as EMBEDDING_REQUIREMENTS_FAILED, Ni as systemEventSummaryScheduleOf, Nn as alarmDeviceSecureOnArm, Nr as isKnownTemplateVar, Nt as NcConditionDescriptorSchema, O as DETECTION_MACRO_CLASSES, Oi as summarizeReview, On as TrackRelationSchema, Or as isDefaultAlarmProfileId, Ot as NcAlarmConfigSchema, P as EMBEDDING_REQUIREMENTS_UNAVAILABLE, Pi as systemEventSummarySplitOf, Pn as alarmPanelCapability, Pr as isLabelSupplyStepId, Pt as NcConditionsSchema, Q as MOTION_CLOSE_AFTER_MS, Qi as createEvent, Qn as consumableLowPercentOf, Qr as pickFaceRescoreIntervalMinutes, Qt as OPS_LOG_DEFAULT_LIMIT, R as EXPORT_DENSE_MAX_RANGES, Ri as viewerLinkBaseOf, Rn as applyBlockingEdit, Rr as isScheduleActive, Rt as NcRuleSchema, S as ClearTrackRelationInputSchema, Sa as union, Si as servedTemplateVars, Sn as TimelapseRuleInputSchema, Sr as gifFromMp4Args, St as NC_SENSOR_TRANSITION_KINDS, T as DEFAULT_DETAIL_CROP_CONVENTION, Ti as subKindsOf, Tn as TrackPlacementSchema, Tr as isAlertEpisodeSeverity, Tt as NC_TANK_SYSTEM_EVENT_KINDS, U as LabelAttributionSchema, Ui as evaluateSensorEdge, Un as assertTimelapseCadences, Ur as linkedStepOf, Ut as NcSnoozeInputSchema, V as FailureCounters, Vi as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, Vn as applySecureOnArmEdit, Vr as isVectorIndexDimConflict, Vt as NcScheduleSchema, W as ListTrackRelationsInputSchema, Wi as isSourceCap, Wn as audioMetricsCapability, Wr as mayWriteToLocation, Wt as NcSnoozeSchema, X as MAX_TRACK_PURITIES, Xi as RECORD_MAX_DATA_BYTES, Xn as classifyRetrainReview, Xr as parseAlertEpisodePayload, Xt as NcTemplatePreviewSchema, Y as MAX_BIRTH_LATENCY_PROXY_MS, Yi as InvalidRecordError, Yn as calendarEventLocalSpan, Yr as occupancyScope, Yt as NcTemplatePreviewInputSchema, Z as MAX_TRACK_RELATIONS, Zi as RECORD_QUERY_MAX, Zn as cloneAlarmSettings, Zt as NcTemplateVarDescriptorSchema, _ as BIRTH_DECISION_DEFAULT_LIMIT, _a as record, _i as ruleGroupingApplies, _n as SetTrackPurityInputSchema, _r as eventKindLabel, _t as NC_CONSUMABLE_SYSTEM_EVENT_KINDS, a as CLIP_EMBEDDING_STEP_ID, ai as renameAlarmProfile, an as RetrainOriginSchema, ar as deriveRecordingMode, at as NC_ALARM_NOTIFY_FIELDS, b as BucketAccumulator, ba as templateLiteral, bi as secureActuationFor, bn as TIMELAPSE_DENSE_FLOOR_SEC, br as failureContributionCapability, bt as NC_GROUPING_MAX_SEC, c as readClusterModelPinStrict, ca as _enum, ci as resolveModeDelays, cn as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, cr as deviceAttentionKind, ct as NC_AUDIO_CONFIRM_HITS_DEFAULT, d as APPEARANCE_BLOCKS, da as discriminatedUnion, dn as SCENE_DEFAULT_OBSERVATION_SPACING_SEC, dt as NC_CLIP_PRE_ROLL_DEFAULT_SEC, ea as defineCustomActions, ei as plateGalleryCapability, er as cosineSimilarity$1, et as MotionTriggeredBySchema, f as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT, fa as literal, fi as retrainRevisionConflictMessage, fn as SCENE_DEFAULT_QUIET_SECONDS, fr as embeddingRefusalOf, ft as NC_CLIP_RETENTION_MAX_SEC, g as ArchivedDebugNoteSchema, ga as partialRecord, gi as ruleDeviceCompatCapQueries, gn as SceneMonitorSchema, gr as ensureAlarmProfiles, gt as NC_CONSUMABLE_LOW_PERCENT_DEFAULT, h as AlarmArmModeSchema, ha as object, hi as ruleBelongsToAlarm$1, hn as SCENE_RESET_RECAPTURES, hr as encodeVectorBase64, ht as NC_CONFIRM_DEFAULT_TIMEOUT_MS, ia as nodePin, ii as readTimelapseGeneratedAt, in as RetrainDismissedSchema, ir as derivePostTriggeredAction, it as NC_ALARM_DELAY_MAX_SEC, j as DetectionSourceSchema, ji as systemEventFamilyProblems, jn as activateAlarmProfile, jr as isEventKindLabelKey, jt as NcAlarmSensorsSchema, k as DETECTION_PIPELINE_CAP_NAME, ki as syncActiveAlarmProfileSettings, kn as TrackSideSchema, kr as isDetectionMacroClass, kt as NcAlarmPostTriggeredActionSchema, l as resolveClusterModelPin, la as array, li as resolveModeNotifyPolicy, ln as SCENE_DEFAULT_ANCHOR_THRESHOLD, lr as deviceRemovalHookCapability, lt as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, m as AUDIO_MACRO_LABELS, ma as number, mi as ruleAutoTriggersAlarm, mn as SCENE_DIVERGED, mt as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, na as hydrateSchema, ni as readDeviceStateFrom, nn as RECORDING_SOURCE_CAMSTACK_ADDON, nr as deleteAlarmProfile, nt as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, o as CLUSTER_MODEL_OWNER_ADDON_ID, oa as sleep$1, oi as resolveClipSearchMinScore, on as RetrainStatusSchema, or as describeSystemEventDeliveryProblem, ot as NC_ALARM_SYSTEM_EVENT_KINDS, p as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, pa as looseObject, pi as rootSupplyServes, pn as SCENE_DEFAULT_UNCOVERED_POLICY, pt as NC_CONDITION_CATALOG, q as MAX_ARCHIVED_DEBUG_NOTES, qi as BaseAddon, qn as buildSubjectPath, qr as normalizeNcMediaPolicy, qt as NcSystemEventKindSchema, ra as isDeviceScopedCap, ri as readMotionTriggeredBy, rn as RebuildObjectEmbeddingsRefusalSchema, rr as deriveDetailCropRect, rt as NC_ALARM_DELAY_FIELDS, s as FACE_EMBEDDING_STEP_ID, sa as ZodObject, si as resolveLocationMode, sn as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, sr as describeSystemEventFamilyProblem, st as NC_ALARM_TRIGGERED_MAX_SEC, t as BUILTIN_CLIP_MODELS, ta as defineRecordKinds, ti as projectSubjectPath, tn as RECORDING_EXPORT_MAX_READ_BYTES, tr as createAlarmProfile, tt as NC_ALARM_DEFAULT_PROFILE_ID, u as APPEARANCE_BIN_COUNT, ua as boolean, ui as resolveNcMediaImage, un as SCENE_DEFAULT_CHECK_INTERVAL_SEC, ut as NC_CLIP_POST_ROLL_DEFAULT_SEC, v as BaseDevice, va as strictObject, vi as ruleKindOf, vn as SetTrackPurityResultSchema, vr as evictionPolicyOfLocation, vt as NC_DEFAULT_SNOOZE_MINUTES, w as CoverStateSchema, wa as EventCategory, wi as storageOccupancyCapability, wn as TimelapseRuleSchema, wr as isAlertEpisodeOpen, wt as NC_SYSTEM_EVENT_KIND_GROUP_SPECS, x as COCO_TO_MACRO, xa as tuple, xi as sensorRaisedOf, xn as TRACK_RELATIONS_DEFAULT_LIMIT, xr as gifDeriveSpeed, xt as NC_GROUPING_MIN_SEC, y as BirthDecisionRecordSchema, ya as string, yi as sceneMonitorCapability, yn as SetTrackRelationInputSchema, yr as faceGalleryCapability, yt as NC_GROUPING_DEFAULT_SEC, z as FIRST_LEVEL_MACRO_CLASSES, zi as withSystemEventClasses, zn as applyModeDelaysEdits, zr as isSystemDelivery, zt as NcRuleTargetSchema } from "../clip-model-registry-CXp8hOtz.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";
@@ -9905,7 +9905,6 @@ var SCENE_LATCH_SPEC = {
9905
9905
  fromRecord: latchFromRecord,
9906
9906
  deviceIdOf: (row) => row.deviceId
9907
9907
  };
9908
- SCENE_LATCH_SPEC.fromRecord, SCENE_LATCH_SPEC.toValue, SCENE_LATCH_SPEC.deviceIdOf;
9909
9908
  /**
9910
9909
  * The two ledgers behind one façade. Callers never see the split, but they can
9911
9910
  * never accidentally write one when they meant the other either: the config
@@ -22320,6 +22319,8 @@ function proposalOrigin(source, index, facts) {
22320
22319
  ...facts.modelId !== void 0 ? { modelId: facts.modelId } : {}
22321
22320
  };
22322
22321
  }
22322
+ //#endregion
22323
+ //#region src/pipeline-analytics/retrain/retrain-taxonomy.ts
22323
22324
  var MACRO_SET = new Set([
22324
22325
  "person",
22325
22326
  "vehicle",
@@ -25882,7 +25883,6 @@ var NC_ALERTS_SPEC = {
25882
25883
  equalFact: (held, incoming) => held.alerting === incoming.alerting,
25883
25884
  deviceIdOf: (row) => deviceIdOf(row.subject)
25884
25885
  };
25885
- NC_ALERTS_SPEC.fromRecord, NC_ALERTS_SPEC.toValue, NC_ALERTS_SPEC.deviceIdOf;
25886
25886
  /**
25887
25887
  * Which row the boot settle keeps for one subject observed inside the window
25888
25888
  * (D698's rule, applied to the alert ledger).
@@ -30615,7 +30615,6 @@ var NC_DEVICE_PRUNES_SPEC = {
30615
30615
  deviceIdOf: (row) => row.subjectKind === "device" ? Number(row.subject) : void 0,
30616
30616
  loadLimit: LOAD_LIMIT$1
30617
30617
  };
30618
- NC_DEVICE_PRUNES_SPEC.fromRecord, NC_DEVICE_PRUNES_SPEC.toValue, NC_DEVICE_PRUNES_SPEC.deviceIdOf;
30619
30618
  /** The outcomes that mean "this last reference was already dealt with". */
30620
30619
  var KEPT_OUTCOMES = new Set(["kept-disabled", "kept"]);
30621
30620
  var NcPruneLedger = class {
@@ -45607,7 +45606,6 @@ var NC_ALERT_EPISODES_SPEC = {
45607
45606
  };
45608
45607
  }
45609
45608
  };
45610
- NC_ALERT_EPISODES_SPEC.fromRecord, NC_ALERT_EPISODES_SPEC.toValue;
45611
45609
  var NcAlertEpisodeLedger = class {
45612
45610
  ledger;
45613
45611
  constructor(deps) {
@@ -45765,6 +45763,8 @@ function occupancyClassWarning(className) {
45765
45763
  if (className === void 0 || isDetectionMacroClass(className)) return null;
45766
45764
  return `⚠ “${className}” is a sub-type, not a macro class: this counter is always 0 (use ${[...DETECTION_MACRO_CLASSES].join(" / ")})`;
45767
45765
  }
45766
+ //#endregion
45767
+ //#region src/notification-center/occupancy-store.ts
45768
45768
  /**
45769
45769
  * The mechanics, declared once.
45770
45770
  *
@@ -45916,7 +45916,6 @@ function recordToRow(key, data) {
45916
45916
  updatedAt
45917
45917
  };
45918
45918
  }
45919
- NC_OCCUPANCY_SPEC.fromRecord, NC_OCCUPANCY_SPEC.toValue, NC_OCCUPANCY_SPEC.deviceIdOf;
45920
45919
  //#endregion
45921
45920
  //#region src/notification-center/outbox.ts
45922
45921
  /**
@@ -48387,7 +48386,6 @@ var NC_SNOOZES_SPEC = {
48387
48386
  },
48388
48387
  loadLimit: 1e3
48389
48388
  };
48390
- NC_SNOOZES_SPEC.fromRecord, NC_SNOOZES_SPEC.toValue;
48391
48389
  var NcSnoozeStore = class {
48392
48390
  windows;
48393
48391
  /** The `snooze-suppressed` records kind (events.db): the counters. */
@@ -52485,7 +52483,6 @@ var NC_SYSTEM_STATE_SPEC = {
52485
52483
  },
52486
52484
  deviceIdOf: (row) => row.deviceId
52487
52485
  };
52488
- NC_SYSTEM_STATE_SPEC.fromRecord, NC_SYSTEM_STATE_SPEC.toValue, NC_SYSTEM_STATE_SPEC.deviceIdOf;
52489
52486
  /** The hub's own node id when an update row names none. */
52490
52487
  var HUB_NODE = "hub";
52491
52488
  function isUpdateTarget(value) {
@@ -53571,6 +53568,8 @@ var NcStateSummaryScheduler = class {
53571
53568
  }
53572
53569
  }
53573
53570
  };
53571
+ //#endregion
53572
+ //#region src/notification-center/state-summary/state-summary-stamps.ts
53574
53573
  var SPEC = {
53575
53574
  collection: "notification-center:state-summary-stamps",
53576
53575
  columns: [
@@ -53618,7 +53617,6 @@ var SPEC = {
53618
53617
  },
53619
53618
  loadLimit: 1e4
53620
53619
  };
53621
- SPEC.fromRecord, SPEC.toValue;
53622
53620
  var NcStateSummaryStampStore = class {
53623
53621
  ledger;
53624
53622
  constructor(deps) {
@@ -74844,8 +74842,8 @@ var TrackCloser = class {
74844
74842
  }
74845
74843
  });
74846
74844
  }
74847
- /** Emit the deprecated thin `TrackEnded` alias + the unified lifecycle
74848
- * `end` event (the FULL final summary — fires ONCE per real track). */
74845
+ /** Emit the thin `TrackEnded` event + the unified lifecycle `end` event
74846
+ * (the FULL final summary — fires ONCE per real track). */
74849
74847
  emitEndEvents(t, duration, trackerPeakConfidence, keyFrameMediaId, summary) {
74850
74848
  this.deps.emitTrackEnded({
74851
74849
  deviceId: t.deviceId,
@@ -79120,22 +79118,22 @@ function buildTapeDeleteDeps(src) {
79120
79118
  removeFile: src.removeFile
79121
79119
  };
79122
79120
  }
79123
- function unavailable(reason) {
79121
+ function unavailable$1(reason) {
79124
79122
  return {
79125
79123
  status: "unavailable",
79126
79124
  reason
79127
79125
  };
79128
79126
  }
79129
79127
  async function releaseOrUnavailable(deps, tapeId, queue) {
79130
- if (typeof deps === "string") return unavailable(deps);
79128
+ if (typeof deps === "string") return unavailable$1(deps);
79131
79129
  return queue.run((signal) => releaseTape(deps, tapeId, signal), { name: "release" });
79132
79130
  }
79133
79131
  async function deleteOrUnavailable(deps, tapeId, queue) {
79134
- if (typeof deps === "string") return unavailable(deps);
79132
+ if (typeof deps === "string") return unavailable$1(deps);
79135
79133
  return queue.run((signal) => deleteTape(deps, tapeId, signal), { name: "delete" });
79136
79134
  }
79137
79135
  async function reconcileOrUnavailable(deps, queue) {
79138
- if (typeof deps === "string") return unavailable(deps);
79136
+ if (typeof deps === "string") return unavailable$1(deps);
79139
79137
  return queue.run((signal) => reconcileTapePins(deps, signal), { name: "reconcile" });
79140
79138
  }
79141
79139
  /**
@@ -83699,6 +83697,9 @@ function isConfirmationCompatible(trackClassName, detectionMacroClass) {
83699
83697
  if (track === "other" || det === "other") return true;
83700
83698
  return track === det;
83701
83699
  }
83700
+ function isSessionDetectorUnavailable(answer) {
83701
+ return answer !== null && "unavailable" in answer;
83702
+ }
83702
83703
  var undecided = (candidate, reason) => ({
83703
83704
  trackId: candidate.trackId,
83704
83705
  verdict: "undecided",
@@ -83721,7 +83722,7 @@ async function runConfirmation(candidate, config, deps, exhausted) {
83721
83722
  const carried = candidate.evidenceCrop ?? null;
83722
83723
  if (carried) {
83723
83724
  const verdict = await measure(candidate, carried, config, deps, "carried");
83724
- if (verdict.verdict === "confirmed" || verdict.reason === "redetect-error") return verdict;
83725
+ if (verdict.verdict === "confirmed" || verdict.reason === "redetect-error" || verdict.reason === "session-device-unavailable") return verdict;
83725
83726
  }
83726
83727
  let crop = await deps.fetchCrop(candidate);
83727
83728
  let cropSource = "native";
@@ -83743,32 +83744,26 @@ async function measure(candidate, crop, config, deps, cropSource) {
83743
83744
  deps.keepCrop?.(candidate, crop, cropSource);
83744
83745
  const detections = await deps.redetect(crop);
83745
83746
  if (detections === null) return undecided(candidate, "redetect-error");
83747
+ if (isSessionDetectorUnavailable(detections)) return undecided(candidate, "session-device-unavailable");
83746
83748
  let best;
83747
83749
  let bestIncompatible;
83748
- let bestRefused;
83749
- for (const d of detections) {
83750
- const compatible = isConfirmationCompatible(candidate.className, d.macroClass);
83751
- if (d.refusedByDetectorFloor === true) {
83752
- if (compatible && (!bestRefused || d.score > bestRefused.score)) bestRefused = d;
83753
- continue;
83754
- }
83755
- if (compatible) {
83756
- if (!best || d.score > best.score) best = d;
83757
- } else if (!bestIncompatible || d.score > bestIncompatible.score) bestIncompatible = d;
83750
+ for (const d of detections) if (isConfirmationCompatible(candidate.className, d.macroClass)) {
83751
+ if (!best || d.score > best.score) best = d;
83752
+ } else if (d.refusedByDetectorFloor !== true) {
83753
+ if (!bestIncompatible || d.score > bestIncompatible.score) bestIncompatible = d;
83758
83754
  }
83759
83755
  const bar = barFor(candidate, config, deps);
83760
83756
  const confirmed = best !== void 0 && best.score >= bar;
83761
83757
  if (!confirmed && cropSource !== "native") return undecided(candidate, cropSource === "fallback" ? "fallback-inconclusive" : "carried-inconclusive");
83762
83758
  const secondary = bestIncompatible ? promoteSecondary(candidate, bestIncompatible, bar, deps) : null;
83763
- const scored = best ?? bestRefused;
83764
83759
  return {
83765
83760
  trackId: candidate.trackId,
83766
83761
  verdict: confirmed ? "confirmed" : "suppressed",
83767
- reason: confirmed ? "confirmed" : suppressionReason(best, bestRefused, bestIncompatible),
83762
+ reason: confirmed ? "confirmed" : suppressionReason(best, bestIncompatible),
83768
83763
  className: candidate.className,
83769
83764
  appliedMinConfidence: bar,
83770
83765
  cropSource,
83771
- ...scored ? { bestScore: scored.score } : {},
83766
+ ...best ? { bestScore: best.score } : {},
83772
83767
  ...bestIncompatible ? {
83773
83768
  bestIncompatibleClass: bestIncompatible.macroClass,
83774
83769
  bestIncompatibleScore: bestIncompatible.score
@@ -83776,10 +83771,13 @@ async function measure(candidate, crop, config, deps, cropSource) {
83776
83771
  ...secondary ? { secondary } : {}
83777
83772
  };
83778
83773
  }
83779
- /** Why a measured native crop said no — first matching rule wins (D922). */
83780
- function suppressionReason(best, bestRefused, bestIncompatible) {
83781
- if (best !== void 0) return "scored-below-threshold";
83782
- if (bestRefused !== void 0) return "below-detector-floor";
83774
+ /**
83775
+ * Why a measured native crop said no — first matching rule wins (D922). The
83776
+ * best compatible box is under the gate's bar either way; `below-detector-floor`
83777
+ * says the detector's own floor had refused it too (D925).
83778
+ */
83779
+ function suppressionReason(best, bestIncompatible) {
83780
+ if (best !== void 0) return best.refusedByDetectorFloor === true ? "below-detector-floor" : "scored-below-threshold";
83783
83781
  if (bestIncompatible !== void 0) return "incompatible-class";
83784
83782
  return "no-detection";
83785
83783
  }
@@ -86529,11 +86527,9 @@ function faceSizeScore(detectionFrameShortSidePx) {
86529
86527
  return detectionFrameShortSidePx / FACE_SIZE_SCORE_REFERENCE_PX;
86530
86528
  }
86531
86529
  //#endregion
86532
- //#region src/pipeline-analytics/face-identity-retraction.ts
86530
+ //#region src/pipeline-analytics/face-recognizer.ts
86533
86531
  /** The recognizer's step id — the attribution a face identity label carries. */
86534
86532
  var FACE_RECOGNIZER_STEP_ID = "face-recognizer";
86535
- //#endregion
86536
- //#region src/pipeline-analytics/face-recognizer.ts
86537
86533
  /** At most one "dropping imageless track" log per this interval, per recognizer. */
86538
86534
  var FACE_IMAGELESS_LOG_THROTTLE_MS = 6e4;
86539
86535
  /** At most one 'embedding magnitude' sample line per device per this interval. */
@@ -92973,6 +92969,9 @@ function buildBirthDecisionRecord(input) {
92973
92969
  bestScore: input.bestScore ?? null,
92974
92970
  appliedMinConfidence: input.appliedMinConfidence ?? null,
92975
92971
  cropSource: input.cropSource ?? null,
92972
+ detectorModelId: input.detector?.modelId ?? null,
92973
+ detectorDeviceKey: input.detector?.deviceKey ?? null,
92974
+ detectorNodeId: input.detector?.nodeId ?? null,
92976
92975
  firstSeen,
92977
92976
  ...latency
92978
92977
  };
@@ -93003,6 +93002,85 @@ function toConfirmationDetections(result) {
93003
93002
  return [...kept, ...refused];
93004
93003
  }
93005
93004
  //#endregion
93005
+ //#region src/pipeline-analytics/confirmation-session-detector.ts
93006
+ /**
93007
+ * The detector the birth confirmation gate re-judges a birth WITH: the
93008
+ * session's own (D925).
93009
+ *
93010
+ * A birth is a claim made by one detector — the root model of the session that
93011
+ * produced the frame, on the inference-device pool it ran on. The gate asks
93012
+ * whether that claim holds on better pixels, so it must ask the SAME detector:
93013
+ * a different model has a different score scale and a different floor, and its
93014
+ * "no" says nothing about the claim. It used to ask the node's global default
93015
+ * (`getGlobalSteps`), which on a Coral node meant a CPU `yolov9t` re-judging an
93016
+ * `edgetpu` model's births.
93017
+ *
93018
+ * The identity rides the frame result (`rootStepId` / `rootModelId` /
93019
+ * `rootDeviceKey`, stamped by the executor with what it RAN), and the node is
93020
+ * the frame handle's — the same node the crop is cut on, so no new bytes cross
93021
+ * anywhere.
93022
+ *
93023
+ * When that detector cannot answer — no identity on the frame (an onboard
93024
+ * detector), the device in backoff or failed, or the executor running anything
93025
+ * other than exactly that model on exactly that pool — the answer is
93026
+ * `session-device-unavailable`: NO measurement. The gate defers the birth and
93027
+ * admits it once the deferral is exhausted. Another model is never asked.
93028
+ *
93029
+ * PURE apart from the injected `run`, so the matrix is testable without an
93030
+ * executor.
93031
+ */
93032
+ /** The session detector named by a frame, or `null` when the frame names none in full. */
93033
+ function sessionDetectorOf(frame, nodeId) {
93034
+ const { rootStepId, rootModelId, rootDeviceKey } = frame;
93035
+ if (!rootStepId || !rootModelId || !rootDeviceKey || !nodeId) return null;
93036
+ return {
93037
+ stepId: rootStepId,
93038
+ modelId: rootModelId,
93039
+ deviceKey: rootDeviceKey,
93040
+ nodeId
93041
+ };
93042
+ }
93043
+ /**
93044
+ * The executor's refusal of a device it will not dispatch to: the liveness
93045
+ * refusal (`InferenceDeviceUnusableError`), a device key whose backend this
93046
+ * node does not know, or a pinned pool that cannot serve. Read from the
93047
+ * message because the error crosses a process boundary without its class.
93048
+ */
93049
+ var DEVICE_REFUSAL = /inference device ".+" is (failed|backoff)|unknown backend|device-not-servable|model-not-servable/;
93050
+ /** Re-detect a crop with the session detector, or say why it could not. */
93051
+ async function redetectWithSessionDetector(detector, cropJpeg, deviceId, run) {
93052
+ if (detector === null) return unavailable("the frame names no session detector");
93053
+ let result;
93054
+ try {
93055
+ result = await run({
93056
+ steps: [{
93057
+ addonId: detector.stepId,
93058
+ modelId: detector.modelId,
93059
+ enabled: true
93060
+ }],
93061
+ image: new Uint8Array(cropJpeg),
93062
+ deviceId,
93063
+ plane: "frame",
93064
+ deviceKey: detector.deviceKey
93065
+ }, detector.nodeId);
93066
+ } catch (err) {
93067
+ const message = errMsg(err);
93068
+ if (DEVICE_REFUSAL.test(message)) return unavailable(message);
93069
+ return {
93070
+ answer: null,
93071
+ error: message
93072
+ };
93073
+ }
93074
+ if (result !== null && (result.rootModelId !== detector.modelId || result.rootDeviceKey !== detector.deviceKey)) return unavailable(`ran ${result.rootModelId ?? "an unnamed model"} on ${result.rootDeviceKey ?? "an unnamed pool"}, not ${detector.modelId} on ${detector.deviceKey}`);
93075
+ return { answer: toConfirmationDetections(result) };
93076
+ }
93077
+ function unavailable(detail) {
93078
+ return { answer: {
93079
+ unavailable: "session-device-unavailable",
93080
+ detail
93081
+ } };
93082
+ }
93083
+ //#endregion
93006
93084
  //#region src/pipeline-analytics/pipeline/birth-evidence-store.ts
93007
93085
  /**
93008
93086
  * The pixels a birth arrived with, held for as long as its deferral can last —
@@ -93912,7 +93990,6 @@ var PHANTOM_CELLS_SPEC = {
93912
93990
  },
93913
93991
  deviceIdOf: (row) => row.deviceId
93914
93992
  };
93915
- PHANTOM_CELLS_SPEC.fromRecord, PHANTOM_CELLS_SPEC.toValue, PHANTOM_CELLS_SPEC.deviceIdOf;
93916
93993
  /**
93917
93994
  * The durable cell memory. Reads answer from RAM only (D49) — a gate that
93918
93995
  * consulted SQLite would be a gate that fails when SQLite is slow.
@@ -94112,7 +94189,6 @@ var PACKAGE_BACKGROUND_SPEC = {
94112
94189
  },
94113
94190
  deviceIdOf: (row) => row.deviceId
94114
94191
  };
94115
- PACKAGE_BACKGROUND_SPEC.fromRecord, PACKAGE_BACKGROUND_SPEC.toValue, PACKAGE_BACKGROUND_SPEC.deviceIdOf;
94116
94192
  /**
94117
94193
  * The durable ghost-cycle memory. Reads answer from RAM only (D49); writes go
94118
94194
  * write-behind — a lost write costs one under-counted cycle, which is the
@@ -96677,7 +96753,6 @@ var STATIONARY_EVIDENCE_SPEC = {
96677
96753
  },
96678
96754
  deviceIdOf: (row) => row.deviceId
96679
96755
  };
96680
- STATIONARY_EVIDENCE_SPEC.fromRecord, STATIONARY_EVIDENCE_SPEC.toValue, STATIONARY_EVIDENCE_SPEC.deviceIdOf;
96681
96756
  var StationaryEvidenceLedger = class {
96682
96757
  ledger;
96683
96758
  spec = STATIONARY_EVIDENCE_SPEC;
@@ -97212,7 +97287,6 @@ var STATIONARY_SPEC = {
97212
97287
  fromRecord: rowToEntry,
97213
97288
  deviceIdOf: (entry) => entry.deviceId
97214
97289
  };
97215
- STATIONARY_SPEC.fromRecord, STATIONARY_SPEC.toValue, STATIONARY_SPEC.deviceIdOf;
97216
97290
  var StationaryObjectRegistry = class {
97217
97291
  /** Entry ids per device — an INDEX over the ledger's mirror, not a second
97218
97292
  * copy of it. The entries themselves live in exactly one place. */
@@ -113293,9 +113367,6 @@ var KEYFRAME_CROP_MIN_SUBJECT_IOU = .5;
113293
113367
  * evidence" and the temporal bound takes over. */
113294
113368
  var KEYFRAME_CROP_MAX_SAMPLE_GAP_MS = 1e3;
113295
113369
  var SETTINGS_CACHE_TTL_MS = 5e3;
113296
- /** TTL for the per-node confirmation-gate detector-step cache (the node's
113297
- * default object-detector step rarely changes). */
113298
- var CONFIRMATION_DETECTOR_CACHE_TTL_MS = 6e4;
113299
113370
  /** Padding applied to a birth box before re-detecting it — a little context
113300
113371
  * around the subject improves the confirmation detector's recall. */
113301
113372
  var CONFIRMATION_CROP_PADDING = .15;
@@ -114083,11 +114154,6 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
114083
114154
  trackingSettingsCache = this.settingsCaches.registerDeviceCache("tracking", SETTINGS_CACHE_TTL_MS);
114084
114155
  /** Per-device confirmation-gate settings cache (default off), TTL-mirrored. */
114085
114156
  confirmationGateSettingsCache = this.settingsCaches.registerDeviceCache("confirmation-gate", SETTINGS_CACHE_TTL_MS);
114086
- /** Per-node detector-step cache for the confirmation gate's re-detection —
114087
- * the node's default root object-detector reduced to a single childless
114088
- * step, resolved lazily from `pipelineExecutor.getGlobalSteps` and reused.
114089
- * NOT part of the settings-cache hub: node-keyed, not device-keyed. */
114090
- confirmationDetectorStepByNode = /* @__PURE__ */ new Map();
114091
114157
  faceSettingsCache = this.settingsCaches.registerDeviceCache("face", SETTINGS_CACHE_TTL_MS);
114092
114158
  /** GLOBAL face-recognition master switch (addon store), TTL-cached. */
114093
114159
  faceGlobalEnabledCache = this.settingsCaches.registerGlobalCache("face-global-enabled", SETTINGS_CACHE_TTL_MS);
@@ -118357,7 +118423,6 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
118357
118423
  this.settingsCaches.clearAll();
118358
118424
  this.rawDeviceBlobMirror.invalidateAll();
118359
118425
  this.rawGlobalStoreMirror.invalidate();
118360
- this.confirmationDetectorStepByNode.clear();
118361
118426
  this.trackStore?.clearAll();
118362
118427
  this.stationaryRegistry = null;
118363
118428
  this.bindingCache?.clearAll();
@@ -119015,6 +119080,7 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
119015
119080
  this.birthEvidence.remember(key, id, Buffer.from(t.birthEvidence.jpegBase64, "base64"), exhaustionNowMs);
119016
119081
  }
119017
119082
  const withBirthEvidence = /* @__PURE__ */ new Set();
119083
+ const sessionDetector = frameHandle ? sessionDetectorOf(frame, frameHandle.nodeId) : null;
119018
119084
  const run = await this.confirmTrackBirths(bornCandidates.map(({ id, t }) => {
119019
119085
  const evidenceCrop = this.birthEvidence.get(key, id, exhaustionNowMs);
119020
119086
  if (evidenceCrop !== null) withBirthEvidence.add(id);
@@ -119030,7 +119096,9 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
119030
119096
  source,
119031
119097
  frameHandle,
119032
119098
  frameWidth: result.frameWidth,
119033
- frameHeight: result.frameHeight
119099
+ frameHeight: result.frameHeight,
119100
+ sessionDetector,
119101
+ attemptsFor: (trackId) => this.deferredBirths.attemptsFor(key, trackId)
119034
119102
  }, exhaustedIds);
119035
119103
  const outcome = run.outcome;
119036
119104
  const gateNowMs = Date.now();
@@ -119085,6 +119153,7 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
119085
119153
  matchedThisFrame: t.matchedThisFrame,
119086
119154
  birthEvidenceAvailable: withBirthEvidence.has(id),
119087
119155
  decision: run.decisions.get(id),
119156
+ sessionDetector,
119088
119157
  decidedAtMs: gateNowMs,
119089
119158
  firstSeen: this.trackStore?.peekActive(id)?.firstSeen ?? null
119090
119159
  });
@@ -119854,74 +119923,30 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
119854
119923
  return this.confirmationGateSettingsCache.get(deviceId, (id) => this.readDeviceSettings(id, resolveConfirmationGateSettings));
119855
119924
  }
119856
119925
  /**
119857
- * Narrowed, version-skew-safe handle onto the `pipelineExecutor` cap — same
119858
- * structural-cast pattern as the `pipelineRunner` handle above. A node whose
119859
- * executor predates these methods simply yields `undefined`, and the
119860
- * confirmation gate then fails open (allows the birth).
119861
- */
119862
- pipelineExecutorApi() {
119863
- const api = this.ctx?.api;
119864
- if (!api) return void 0;
119865
- return api.pipelineExecutor;
119866
- }
119867
- /**
119868
- * Resolve (and cache) the confirmation gate's re-detection step for a node:
119869
- * the node's DEFAULT root object-detector (from `getGlobalSteps`) reduced to a
119870
- * single CHILDLESS step, so the confirmation run does detection ONLY — no
119871
- * crop/classifier subtree. Cached per node (TTL) since the node default rarely
119872
- * changes. `null` ⇒ no detector available ⇒ the gate fails open.
119926
+ * Re-run object detection on a confirmation crop JPEG with the SESSION'S
119927
+ * detector (D925): the root model the birth's frame ran, on the device pool
119928
+ * it ran on, pinned to that frame's node — the node the crop is cut on, so
119929
+ * no new bytes cross anywhere. A session detector that cannot answer is
119930
+ * `session-device-unavailable` (no measurement, the birth defers); another
119931
+ * model is never asked. An inference failure is `null` (`redetect-error`).
119873
119932
  */
119874
- async resolveConfirmationDetectorStep(nodeId) {
119875
- const now = Date.now();
119876
- const cached = this.confirmationDetectorStepByNode.get(nodeId);
119877
- if (cached && now < cached.expiresAt) return cached.step;
119878
- let step = null;
119879
- const executor = this.pipelineExecutorApi();
119880
- if (executor?.getGlobalSteps) try {
119881
- const steps = await executor.getGlobalSteps.query(void 0, nodePin(nodeId));
119882
- const detector = steps?.find((s) => s.slot === "detector" && s.enabled) ?? steps?.find((s) => s.slot === "detector");
119883
- if (detector) step = {
119884
- addonId: detector.addonId,
119885
- ...detector.modelId ? { modelId: detector.modelId } : {},
119886
- enabled: true
119887
- };
119888
- } catch (err) {
119889
- this.ctx.logger.debug("confirmation gate: getGlobalSteps failed", { meta: {
119890
- nodeId,
119891
- error: errMsg(err)
119892
- } });
119893
- }
119894
- this.confirmationDetectorStepByNode.set(nodeId, {
119895
- step,
119896
- expiresAt: now + CONFIRMATION_DETECTOR_CACHE_TTL_MS
119933
+ async redetectCropForConfirmation(detector, deviceId, cropJpeg) {
119934
+ const outcome = await redetectWithSessionDetector(detector, cropJpeg, deviceId, (request, nodeId) => this.ctx.api.pipelineExecutor.runPipeline.mutate({
119935
+ ...request,
119936
+ steps: [...request.steps]
119937
+ }, nodePin(nodeId)));
119938
+ if (outcome.error !== void 0) this.ctx.logger.warn("confirmation gate: re-detection failed — birth deferred", {
119939
+ tags: { deviceId },
119940
+ meta: {
119941
+ error: outcome.error,
119942
+ ...detector !== null ? {
119943
+ modelId: detector.modelId,
119944
+ deviceKey: detector.deviceKey,
119945
+ node: detector.nodeId
119946
+ } : {}
119947
+ }
119897
119948
  });
119898
- return step;
119899
- }
119900
- /**
119901
- * Re-run object detection on a confirmation crop JPEG via the frame-owning
119902
- * node's `pipelineExecutor` (pinned by `nodeId`, matching the native-crop
119903
- * fetch). Returns the crop's detections, or `null` on any unavailability /
119904
- * error so the gate fails open.
119905
- */
119906
- async redetectCropForConfirmation(nodeId, deviceId, cropJpeg) {
119907
- const step = await this.resolveConfirmationDetectorStep(nodeId);
119908
- if (!step) return null;
119909
- const executor = this.pipelineExecutorApi();
119910
- if (!executor?.runPipeline) return null;
119911
- try {
119912
- return toConfirmationDetections(await executor.runPipeline.mutate({
119913
- steps: [step],
119914
- image: new Uint8Array(cropJpeg),
119915
- deviceId,
119916
- plane: "frame"
119917
- }, nodePin(nodeId)));
119918
- } catch (err) {
119919
- this.ctx.logger.debug("confirmation gate: re-detection failed — fail-open", {
119920
- tags: { deviceId },
119921
- meta: { error: errMsg(err) }
119922
- });
119923
- return null;
119924
- }
119949
+ return outcome.answer;
119925
119950
  }
119926
119951
  /**
119927
119952
  * Confirm a batch of track-birth candidates before they are created. Returns
@@ -119976,6 +120001,7 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
119976
120001
  bestScore: decision?.bestScore ?? null,
119977
120002
  appliedMinConfidence: decision?.appliedMinConfidence ?? null,
119978
120003
  cropSource: decision?.cropSource ?? null,
120004
+ detector: decision !== void 0 && (decision.cropSource !== void 0 || decision.reason === "session-device-unavailable") ? input.sessionDetector ?? null : null,
119979
120005
  decidedAtMs: input.decidedAtMs,
119980
120006
  firstSeen: input.firstSeen,
119981
120007
  motionOnsetAtMs,
@@ -120013,7 +120039,7 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
120013
120039
  });
120014
120040
  return allConfirmed();
120015
120041
  }
120016
- const nodeId = frameHandle.nodeId;
120042
+ const { sessionDetector } = params;
120017
120043
  const candidateNativeRecovery = /* @__PURE__ */ new Map();
120018
120044
  for (const c of candidates) if (c.nativeRecovery !== void 0) candidateNativeRecovery.set(c.trackId, c.nativeRecovery);
120019
120045
  return {
@@ -120040,7 +120066,7 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
120040
120066
  h: candidate.bbox.h
120041
120067
  }, frameWidth, frameHeight, CONFIRMATION_CROP_PADDING, candidate.trackId, CONFIRMATION_CROP_MAX_WIDTH);
120042
120068
  },
120043
- redetect: (cropJpeg) => this.redetectCropForConfirmation(nodeId, deviceId, cropJpeg),
120069
+ redetect: (cropJpeg) => this.redetectCropForConfirmation(sessionDetector, deviceId, cropJpeg),
120044
120070
  keepCrop: (candidate, cropJpeg) => {
120045
120071
  offeredCrops.set(candidate.trackId, cropJpeg);
120046
120072
  },
@@ -120065,6 +120091,12 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
120065
120091
  reason: decision.reason,
120066
120092
  className: decision.className,
120067
120093
  ...decision.bestScore !== void 0 ? { bestScore: decision.bestScore } : {},
120094
+ ...sessionDetector !== null ? {
120095
+ modelId: sessionDetector.modelId,
120096
+ deviceKey: sessionDetector.deviceKey,
120097
+ node: sessionDetector.nodeId
120098
+ } : {},
120099
+ attempts: params.attemptsFor(decision.trackId),
120068
120100
  ...decision.bestIncompatibleClass !== void 0 ? {
120069
120101
  bestIncompatibleClass: decision.bestIncompatibleClass,
120070
120102
  bestIncompatibleScore: decision.bestIncompatibleScore
@@ -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-CB62NeGh.mjs")).catch((e) => {
33
+ return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BSMQI14W.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.627",
3
+ "version": "1.2.628",
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",