@camstack/addon-post-analysis 1.2.662 → 1.2.664
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.
- package/CHANGELOG.md +12 -0
- package/dist/{clip-model-registry-ELaSS9jq.mjs → clip-model-registry-Ch9Sz-Qb.mjs} +33939 -33004
- package/dist/{clip-model-registry-C3N1NpST.js → clip-model-registry-TeNUAAPP.js} +33939 -33004
- package/dist/embedding-encoder/index.js +1 -1
- package/dist/embedding-encoder/index.mjs +1 -1
- package/dist/pipeline-analytics/_stub.js +2 -2
- package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BvOlyiL9.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CXG7YPYq.mjs} +2 -2
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CIt_RDlm.mjs +26 -0
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-4TTlyJ66.mjs +26 -0
- package/dist/pipeline-analytics/{hostInit-BjZchMMh.mjs → hostInit-BZ_D3_sF.mjs} +2 -2
- package/dist/pipeline-analytics/index.js +337 -50
- package/dist/pipeline-analytics/index.mjs +337 -50
- package/dist/pipeline-analytics/remoteEntry.js +1 -1
- package/package.json +2 -2
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D4zkNcgf.mjs +0 -26
- package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-vaatUWY6.mjs +0 -26
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as MAX_TRACK_RELATIONS, $i as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, $n as bundledCamstack, $r as normalizeNcAction, $t as NcTemplateVarDescriptorSchema, A as DETECTION_MACRO_CLASSES, Aa as strictObject, Ai as sceneMonitorCapability, An as TrackPuritySchema, Ar as isAlertEpisodeOpen, At as NcAlarmConfigSchema, B as EXPORT_DENSE_MAX_RANGES, Bi as sunTimes, Bn as alertEpisodeKind, Br as isLabelSupplyStepId, Bt as NcRuleSchema, C as COCO_TO_MACRO, Ca as discriminatedUnion, Ci as retrainRevisionConflictMessage, Cn as SetTrackRelationInputSchema, Cr as eventKindLabel, Ct as NC_GROUPING_MIN_SEC, D as DEFAULT_DETAIL_CROP_CONVENTION, Da as object, Di as ruleDeviceCompatCapQueries, Dn as TimelapseRulePatchSchema, Dr as gifDeriveSpeed, Dt as NC_SYSTEM_EVENT_KIND_GROUP_SPECS, E as CoverStateSchema, Ea as number, Ei as ruleBelongsToAlarm$1, En as TimelapseRuleInputSchema, Er as failureContributionCapability, Et as NC_STATE_SUMMARY_SECTION_IDS, F as EMBEDDING_REQUIREMENTS_FAILED, Fa as unknown, Fi as storageOccupancyCapability, Fn as activateAlarmProfile, Fr as isDetectionMacroClass, Ft as NcConditionDescriptorSchema, G as LabelAttributionSchema, Gi as systemEventSummaryScheduleOf, Gn as applySecureOnArmEdit, Gr as isSystemDelivery, Gt as NcSnoozeInputSchema, H as FULL_IMAGE_BBOX, Hi as systemEventDeliveryProblems, Hn as applyBlockingEdit, Hr as isRetiredClearKey, Ht as NcRuleUpdateInputSchema, I as EMBEDDING_REQUIREMENTS_UNAVAILABLE, Ia as DeviceType, Ii as subKindsOf, In as addonWidgetsSourceCapability, Ir as isDrawableSubjectPath, It as NcConditionsSchema, J as LockStateSchema, Ji as templateVarsFor, Jn as audioMetricsCapability, Jr as kebabToCamel, Jt as NcStateSummarySectionIdSchema, K as ListTrackRelationsInputSchema, Ki as systemEventSummarySplitOf, Kn as armRemovalReconcile, Kr as isSystemEventSummaryRule, Kt as NcSnoozeSchema, L as EVENT_DENSITY_BATCH_MAX, La as errMsg, Li as subjectPathSampleFromBox, Ln as alarmDeviceSecureOnArm, Lr as isEventKindLabelKey, Lt as NcRuleActionSchema, M as DeclaredDevices, Ma as templateLiteral, Mi as sensorRaisedOf, Mn as TrackRelationSchema, Mr as isAppLinkBase, Mt as NcAlarmSensorsInputSchema, N as DetectionSourceSchema, Na as tuple, Ni as servedTemplateVars, Nn as TrackSideSchema, Nr as isAudioClassName, Nt as NcAlarmSensorsSchema, O as DEFAULT_EVENT_COLOR, Oa as partialRecord, Oi as ruleGroupingApplies, On as TimelapseRuleSchema, Or as gifFromMp4Args, Ot as NC_TAXONOMY, P as EMBEDDING_MODEL_FAILED, Pa as union, Pi as startMoverUnderClearance, Pn as TrackSourceSchema, Pr as isDefaultAlarmProfileId, Pt as NcAlarmSettingsPatchSchema, Q as MAX_TRACK_PURITIES, Qi as zoneAnalyticsCapability, Qn as buildViewerLink, Qr as ncMediaPolicyError, Qt as NcTemplatePreviewSchema, R as EVENT_KIND_BY_CAP, Ra as EventCategory, Ri as subjectPathSvgPoints, Rn as alarmPanelCapability, Rr as isEventOwnerType, Rt as NcRuleInputSchema, S as BucketAccumulator, Sa as boolean, Sn as SetTrackPurityResultSchema, Sr as ensureAlarmProfiles, St as NC_GROUPING_MAX_SEC, T as ClearTrackRelationResultSchema, Ta as looseObject, Ti as ruleAutoTriggersAlarm, Tn as TRACK_RELATIONS_DEFAULT_LIMIT, Tr as faceGalleryCapability, Tt as NC_SNOOZE_MAX_MINUTES, U as FailureCounters, Ui as systemEventFamilyProblems, Un as applyModeDelaysEdits, Ur as isRootSuppliableStepId, Ut as NcScheduleSchema, V as FIRST_LEVEL_MACRO_CLASSES, Vi as syncActiveAlarmProfileSettings, Vn as alertEpisodePayload, Vr as isMediaOwnerType, Vt as NcRuleTargetSchema, W as LABEL_SUPPLY_MACRO, Wi as systemEventFilterApplies, Wn as applyNonBlockingEdit, Wr as isScheduleActive, Wt as NcSharedSequenceSchema, X as MAX_BIRTH_DECISION_RECORDS, Xi as viewerLinkBaseOf, Xn as buildEventKindDescriptor, Xr as mayWriteToLocation, Xt as NcTaxonomySchema, Y as MAX_ARCHIVED_DEBUG_NOTES, Yi as vectorDimFromBase64, Yn as audioModeOf, Yr as linkedStepOf, Yt as NcSystemEventKindSchema, Z as MAX_BIRTH_LATENCY_PROXY_MS, Zi as withSystemEventClasses, Zn as buildSubjectPath, Zr as memoizePinnedFfmpeg, Zt as NcTemplatePreviewInputSchema, _ as AlarmArmModeSchema, _i as resolveDeliveryParams, _n as SCENE_DEFAULT_UNCOVERED_POLICY, _t as NC_CONFIRM_DEFAULT_TIMEOUT_MS, a as CLIP_EMBEDDING_STEP_ID, aa as CamProfileSchema, ai as paletteResultSchema, an as RECORDING_SOURCE_CAMSTACK_ADDON, ar as coreBlockIdFromAddonId, at as NC_ALARM_DELAY_FIELDS, b as BaseDevice, ba as _enum, bi as resolveModeNotifyPolicy, bn as SceneMonitorSchema, bt as NC_DEFAULT_SNOOZE_MINUTES, c as readClusterModelPinStrict, ca as RECORD_QUERY_MAX, ci as pickFaceRescoreIntervalMinutes, cn as RetrainOriginSchema, cr as deleteAlarmProfile, ct as NC_ALARM_SYSTEM_EVENT_KINDS, d as APPEARANCE_BIN_COUNT, da as defineAddonMigrations, di as projectSubjectPath, dn as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, dr as deriveRecordingMode, dt as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, ea as canonicalHash, ei as normalizeNcCapTarget, en as OPS_LOG_DEFAULT_LIMIT, er as calendarEventLocalSpan, et as MOTION_CLOSE_AFTER_MS, f as APPEARANCE_BLOCKS, fa as defineCustomActions, fi as readDeviceStateFrom, fn as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, fr as describeSystemEventDeliveryProblem, ft as NC_CLIP_POST_ROLL_DEFAULT_SEC, g as ActionTargetResolver, ga as nodePin, gi as resolveClipSearchMinScore, gn as SCENE_DEFAULT_QUIET_SECONDS, gt as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, h as AUDIO_MACRO_LABELS, ha as isDeviceScopedCap, hi as renameAlarmProfile, hn as SCENE_DEFAULT_OBSERVATION_SPACING_SEC, hr as deviceRemovalHookCapability, ht as NC_CONDITION_CATALOG, ia as CAP_ADVANCE_FIELDS, ii as paintHex, in as RECORDING_EXPORT_MAX_READ_BYTES, ir as consumableLowPercentOf, it as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, j as DETECTION_PIPELINE_CAP_NAME, ja as string, ji as secureActuationFor, jn as TrackRelationKindSchema, jr as isAlertEpisodeSeverity, jt as NcAlarmPostTriggeredActionSchema, k as DEFAULT_TIMELAPSE_PREVIEW_TEXT, ka as record, ki as ruleKindOf, kn as TrackPlacementSchema, kr as isAlarmControllableCap, kt as NC_TEMPLATE_VARS, l as resolveClusterModelPin, la as createEvent, li as pipelineAnalyticsCapability, ln as RetrainStatusSchema, lr as deriveDetailCropRect, lt as NC_ALARM_TRIGGERED_MAX_SEC, m as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, ma as hydrateSchema, mi as readTimelapseGeneratedAt, mn as SCENE_DEFAULT_CHECK_INTERVAL_SEC, mr as deviceAttentionKind, mt as NC_CLIP_RETENTION_MAX_SEC, na as isSourceCap, ni as notificationRulesCapability, nn as PackageLlmVerdictSchema, nr as cloneAlarmSettings, nt as MotionTriggeredBySchema, o as CLUSTER_MODEL_OWNER_ADDON_ID, oa as InvalidRecordError, oi as parseAlertEpisodePayload, on as RebuildObjectEmbeddingsRefusalSchema, or as cosineSimilarity$1, ot as NC_ALARM_DELAY_MAX_SEC, p as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT, pa as defineRecordKinds, pi as readMotionTriggeredBy, pn as SCENE_DEFAULT_ANCHOR_THRESHOLD, pr as describeSystemEventFamilyProblem, pt as NC_CLIP_PRE_ROLL_DEFAULT_SEC, q as ListTrackRelationsResultSchema, qi as templateCarriesSummary, qn as assertTimelapseCadences, qr as isVectorIndexDimConflict, qt as NcSnoozeSuppressedSchema, ra as BaseAddon, ri as occupancyScope, rr as consumableFormOf, rt as NC_ALARM_DEFAULT_PROFILE_ID, s as FACE_EMBEDDING_STEP_ID, sa as RECORD_MAX_DATA_BYTES, sn as RetrainDismissedSchema, sr as createAlarmProfile, st as NC_ALARM_NOTIFY_FIELDS, t as BUILTIN_CLIP_MODELS, ta as evaluateSensorEdge, ti as normalizeNcMediaPolicy, tn as OpsLogEntrySchema, tr as classifyRetrainReview, tt as MediaFileKindEnum, u as ACTION_TARGET_INVALIDATION_EVENTS, ua as customAction, ui as plateGalleryCapability, un as RetrainVerdictSubjectSchema, ur as derivePostTriggeredAction, ut as NC_AUDIO_CONFIRM_HITS_DEFAULT, v as ArchivedDebugNoteSchema, va as sleep$1, vi as resolveLocationMode, vn as SCENE_DIVERGED, vr as embeddingRefusalOf, vt as NC_CONSUMABLE_LOW_PERCENT_DEFAULT, w as ClearTrackRelationInputSchema, wa as literal, wi as rootSupplyServes, wn as TIMELAPSE_DENSE_FLOOR_SEC, wr as evictionPolicyOfLocation, wt as NC_SENSOR_TRANSITION_KINDS, x as BirthDecisionRecordSchema, xa as array, xi as resolveNcMediaImage, xn as SetTrackPurityInputSchema, xr as encodeVectorBase64, xt as NC_GROUPING_DEFAULT_SEC, y as BIRTH_DECISION_DEFAULT_LIMIT, ya as ZodObject, yi as resolveModeDelays, yn as SCENE_RESET_RECAPTURES, yt as NC_CONSUMABLE_SYSTEM_EVENT_KINDS, z as EVENT_OWNER_TYPES, zi as summarizeReview, zn as alertEpisodeId, zr as isKnownTemplateVar, zt as NcRulePatchSchema } from "../clip-model-registry-
|
|
1
|
+
import { $ as MAX_TRACK_RELATIONS, $i as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, $n as bundledCamstack, $r as normalizeNcAction, $t as NcTemplateVarDescriptorSchema, A as DETECTION_MACRO_CLASSES, Aa as strictObject, Ai as sceneMonitorCapability, An as TrackPuritySchema, Ar as isAlertEpisodeOpen, At as NcAlarmConfigSchema, B as EXPORT_DENSE_MAX_RANGES, Bi as sunTimes, Bn as alertEpisodeKind, Br as isLabelSupplyStepId, Bt as NcRuleSchema, C as COCO_TO_MACRO, Ca as discriminatedUnion, Ci as retrainRevisionConflictMessage, Cn as SetTrackRelationInputSchema, Cr as eventKindLabel, Ct as NC_GROUPING_MIN_SEC, D as DEFAULT_DETAIL_CROP_CONVENTION, Da as object, Di as ruleDeviceCompatCapQueries, Dn as TimelapseRulePatchSchema, Dr as gifDeriveSpeed, Dt as NC_SYSTEM_EVENT_KIND_GROUP_SPECS, E as CoverStateSchema, Ea as number, Ei as ruleBelongsToAlarm$1, En as TimelapseRuleInputSchema, Er as failureContributionCapability, Et as NC_STATE_SUMMARY_SECTION_IDS, F as EMBEDDING_REQUIREMENTS_FAILED, Fa as unknown, Fi as storageOccupancyCapability, Fn as activateAlarmProfile, Fr as isDetectionMacroClass, Ft as NcConditionDescriptorSchema, G as LabelAttributionSchema, Gi as systemEventSummaryScheduleOf, Gn as applySecureOnArmEdit, Gr as isSystemDelivery, Gt as NcSnoozeInputSchema, H as FULL_IMAGE_BBOX, Hi as systemEventDeliveryProblems, Hn as applyBlockingEdit, Hr as isRetiredClearKey, Ht as NcRuleUpdateInputSchema, I as EMBEDDING_REQUIREMENTS_UNAVAILABLE, Ia as DeviceType, Ii as subKindsOf, In as addonWidgetsSourceCapability, Ir as isDrawableSubjectPath, It as NcConditionsSchema, J as LockStateSchema, Ji as templateVarsFor, Jn as audioMetricsCapability, Jr as kebabToCamel, Jt as NcStateSummarySectionIdSchema, K as ListTrackRelationsInputSchema, Ki as systemEventSummarySplitOf, Kn as armRemovalReconcile, Kr as isSystemEventSummaryRule, Kt as NcSnoozeSchema, L as EVENT_DENSITY_BATCH_MAX, La as errMsg, Li as subjectPathSampleFromBox, Ln as alarmDeviceSecureOnArm, Lr as isEventKindLabelKey, Lt as NcRuleActionSchema, M as DeclaredDevices, Ma as templateLiteral, Mi as sensorRaisedOf, Mn as TrackRelationSchema, Mr as isAppLinkBase, Mt as NcAlarmSensorsInputSchema, N as DetectionSourceSchema, Na as tuple, Ni as servedTemplateVars, Nn as TrackSideSchema, Nr as isAudioClassName, Nt as NcAlarmSensorsSchema, O as DEFAULT_EVENT_COLOR, Oa as partialRecord, Oi as ruleGroupingApplies, On as TimelapseRuleSchema, Or as gifFromMp4Args, Ot as NC_TAXONOMY, P as EMBEDDING_MODEL_FAILED, Pa as union, Pi as startMoverUnderClearance, Pn as TrackSourceSchema, Pr as isDefaultAlarmProfileId, Pt as NcAlarmSettingsPatchSchema, Q as MAX_TRACK_PURITIES, Qi as zoneAnalyticsCapability, Qn as buildViewerLink, Qr as ncMediaPolicyError, Qt as NcTemplatePreviewSchema, R as EVENT_KIND_BY_CAP, Ra as EventCategory, Ri as subjectPathSvgPoints, Rn as alarmPanelCapability, Rr as isEventOwnerType, Rt as NcRuleInputSchema, S as BucketAccumulator, Sa as boolean, Sn as SetTrackPurityResultSchema, Sr as ensureAlarmProfiles, St as NC_GROUPING_MAX_SEC, T as ClearTrackRelationResultSchema, Ta as looseObject, Ti as ruleAutoTriggersAlarm, Tn as TRACK_RELATIONS_DEFAULT_LIMIT, Tr as faceGalleryCapability, Tt as NC_SNOOZE_MAX_MINUTES, U as FailureCounters, Ui as systemEventFamilyProblems, Un as applyModeDelaysEdits, Ur as isRootSuppliableStepId, Ut as NcScheduleSchema, V as FIRST_LEVEL_MACRO_CLASSES, Vi as syncActiveAlarmProfileSettings, Vn as alertEpisodePayload, Vr as isMediaOwnerType, Vt as NcRuleTargetSchema, W as LABEL_SUPPLY_MACRO, Wi as systemEventFilterApplies, Wn as applyNonBlockingEdit, Wr as isScheduleActive, Wt as NcSharedSequenceSchema, X as MAX_BIRTH_DECISION_RECORDS, Xi as viewerLinkBaseOf, Xn as buildEventKindDescriptor, Xr as mayWriteToLocation, Xt as NcTaxonomySchema, Y as MAX_ARCHIVED_DEBUG_NOTES, Yi as vectorDimFromBase64, Yn as audioModeOf, Yr as linkedStepOf, Yt as NcSystemEventKindSchema, Z as MAX_BIRTH_LATENCY_PROXY_MS, Zi as withSystemEventClasses, Zn as buildSubjectPath, Zr as memoizePinnedFfmpeg, Zt as NcTemplatePreviewInputSchema, _ as AlarmArmModeSchema, _i as resolveDeliveryParams, _n as SCENE_DEFAULT_UNCOVERED_POLICY, _t as NC_CONFIRM_DEFAULT_TIMEOUT_MS, a as CLIP_EMBEDDING_STEP_ID, aa as CamProfileSchema, ai as paletteResultSchema, an as RECORDING_SOURCE_CAMSTACK_ADDON, ar as coreBlockIdFromAddonId, at as NC_ALARM_DELAY_FIELDS, b as BaseDevice, ba as _enum, bi as resolveModeNotifyPolicy, bn as SceneMonitorSchema, bt as NC_DEFAULT_SNOOZE_MINUTES, c as readClusterModelPinStrict, ca as RECORD_QUERY_MAX, ci as pickFaceRescoreIntervalMinutes, cn as RetrainOriginSchema, cr as deleteAlarmProfile, ct as NC_ALARM_SYSTEM_EVENT_KINDS, d as APPEARANCE_BIN_COUNT, da as defineAddonMigrations, di as projectSubjectPath, dn as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, dr as deriveRecordingMode, dt as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, ea as canonicalHash, ei as normalizeNcCapTarget, en as OPS_LOG_DEFAULT_LIMIT, er as calendarEventLocalSpan, et as MOTION_CLOSE_AFTER_MS, f as APPEARANCE_BLOCKS, fa as defineCustomActions, fi as readDeviceStateFrom, fn as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, fr as describeSystemEventDeliveryProblem, ft as NC_CLIP_POST_ROLL_DEFAULT_SEC, g as ActionTargetResolver, ga as nodePin, gi as resolveClipSearchMinScore, gn as SCENE_DEFAULT_QUIET_SECONDS, gt as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, h as AUDIO_MACRO_LABELS, ha as isDeviceScopedCap, hi as renameAlarmProfile, hn as SCENE_DEFAULT_OBSERVATION_SPACING_SEC, hr as deviceRemovalHookCapability, ht as NC_CONDITION_CATALOG, ia as CAP_ADVANCE_FIELDS, ii as paintHex, in as RECORDING_EXPORT_MAX_READ_BYTES, ir as consumableLowPercentOf, it as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, j as DETECTION_PIPELINE_CAP_NAME, ja as string, ji as secureActuationFor, jn as TrackRelationKindSchema, jr as isAlertEpisodeSeverity, jt as NcAlarmPostTriggeredActionSchema, k as DEFAULT_TIMELAPSE_PREVIEW_TEXT, ka as record, ki as ruleKindOf, kn as TrackPlacementSchema, kr as isAlarmControllableCap, kt as NC_TEMPLATE_VARS, l as resolveClusterModelPin, la as createEvent, li as pipelineAnalyticsCapability, ln as RetrainStatusSchema, lr as deriveDetailCropRect, lt as NC_ALARM_TRIGGERED_MAX_SEC, m as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, ma as hydrateSchema, mi as readTimelapseGeneratedAt, mn as SCENE_DEFAULT_CHECK_INTERVAL_SEC, mr as deviceAttentionKind, mt as NC_CLIP_RETENTION_MAX_SEC, na as isSourceCap, ni as notificationRulesCapability, nn as PackageLlmVerdictSchema, nr as cloneAlarmSettings, nt as MotionTriggeredBySchema, o as CLUSTER_MODEL_OWNER_ADDON_ID, oa as InvalidRecordError, oi as parseAlertEpisodePayload, on as RebuildObjectEmbeddingsRefusalSchema, or as cosineSimilarity$1, ot as NC_ALARM_DELAY_MAX_SEC, p as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT, pa as defineRecordKinds, pi as readMotionTriggeredBy, pn as SCENE_DEFAULT_ANCHOR_THRESHOLD, pr as describeSystemEventFamilyProblem, pt as NC_CLIP_PRE_ROLL_DEFAULT_SEC, q as ListTrackRelationsResultSchema, qi as templateCarriesSummary, qn as assertTimelapseCadences, qr as isVectorIndexDimConflict, qt as NcSnoozeSuppressedSchema, ra as BaseAddon, ri as occupancyScope, rr as consumableFormOf, rt as NC_ALARM_DEFAULT_PROFILE_ID, s as FACE_EMBEDDING_STEP_ID, sa as RECORD_MAX_DATA_BYTES, sn as RetrainDismissedSchema, sr as createAlarmProfile, st as NC_ALARM_NOTIFY_FIELDS, t as BUILTIN_CLIP_MODELS, ta as evaluateSensorEdge, ti as normalizeNcMediaPolicy, tn as OpsLogEntrySchema, tr as classifyRetrainReview, tt as MediaFileKindEnum, u as ACTION_TARGET_INVALIDATION_EVENTS, ua as customAction, ui as plateGalleryCapability, un as RetrainVerdictSubjectSchema, ur as derivePostTriggeredAction, ut as NC_AUDIO_CONFIRM_HITS_DEFAULT, v as ArchivedDebugNoteSchema, va as sleep$1, vi as resolveLocationMode, vn as SCENE_DIVERGED, vr as embeddingRefusalOf, vt as NC_CONSUMABLE_LOW_PERCENT_DEFAULT, w as ClearTrackRelationInputSchema, wa as literal, wi as rootSupplyServes, wn as TIMELAPSE_DENSE_FLOOR_SEC, wr as evictionPolicyOfLocation, wt as NC_SENSOR_TRANSITION_KINDS, x as BirthDecisionRecordSchema, xa as array, xi as resolveNcMediaImage, xn as SetTrackPurityInputSchema, xr as encodeVectorBase64, xt as NC_GROUPING_DEFAULT_SEC, y as BIRTH_DECISION_DEFAULT_LIMIT, ya as ZodObject, yi as resolveModeDelays, yn as SCENE_RESET_RECAPTURES, yt as NC_CONSUMABLE_SYSTEM_EVENT_KINDS, z as EVENT_OWNER_TYPES, zi as summarizeReview, zn as alertEpisodeId, zr as isKnownTemplateVar, zt as NcRulePatchSchema } from "../clip-model-registry-Ch9Sz-Qb.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";
|
|
@@ -59243,56 +59243,143 @@ function sweepOne(deps, deviceId) {
|
|
|
59243
59243
|
}
|
|
59244
59244
|
//#endregion
|
|
59245
59245
|
//#region src/pipeline-analytics/pipeline/package/package-still-capture.ts
|
|
59246
|
-
/**
|
|
59247
|
-
|
|
59246
|
+
/**
|
|
59247
|
+
* The runner's native lease on a look frame (holdFrames 8) is released about
|
|
59248
|
+
* 100 ms after inference, so a handle older than this answers `native-miss` or
|
|
59249
|
+
* `preview-only` — promotion runs seconds to minutes after the look (D60).
|
|
59250
|
+
*/
|
|
59251
|
+
var PACKAGE_NATIVE_HANDLE_MAX_AGE_MS = 1e3;
|
|
59252
|
+
/** Total time a promotion may spend landing its still before it ships without (D60). */
|
|
59253
|
+
var PACKAGE_STILL_BOUND_MS = 6e3;
|
|
59254
|
+
/** One live-source attempt never takes longer than this (a sleeping camera). */
|
|
59255
|
+
var PACKAGE_STILL_ATTEMPT_TIMEOUT_MS = 3e3;
|
|
59256
|
+
/** Pause between two live attempts. */
|
|
59257
|
+
var PACKAGE_STILL_RETRY_PAUSE_MS = 750;
|
|
59258
|
+
var PACKAGE_STILL_LIVE_ATTEMPTS = 3;
|
|
59259
|
+
var realPause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
59248
59260
|
async function jpegOf(reply) {
|
|
59249
59261
|
if (reply.tier === "ram-fullframe") return "preview-only";
|
|
59250
59262
|
if (reply.jpegBytes !== void 0 && reply.jpegBytes.byteLength > 0) return reply.jpegBytes;
|
|
59251
59263
|
if (reply.bytes !== void 0 && reply.bytes.length === reply.width * reply.height * 3) return encodeRgbCropToJpeg(reply.bytes, reply.width, reply.height);
|
|
59252
59264
|
return "empty-frame";
|
|
59253
59265
|
}
|
|
59266
|
+
/** One live read, cut off after `limitMs` so a hung camera cannot hold the delivery. */
|
|
59267
|
+
async function readLive(source, limitMs) {
|
|
59268
|
+
let timer;
|
|
59269
|
+
const timeout = new Promise((resolve) => {
|
|
59270
|
+
timer = setTimeout(() => resolve(null), limitMs);
|
|
59271
|
+
});
|
|
59272
|
+
try {
|
|
59273
|
+
return await Promise.race([source(), timeout]);
|
|
59274
|
+
} finally {
|
|
59275
|
+
if (timer !== void 0) clearTimeout(timer);
|
|
59276
|
+
}
|
|
59277
|
+
}
|
|
59278
|
+
/** Retry the live source under {@link PACKAGE_STILL_BOUND_MS} until a frame lands (D60). */
|
|
59279
|
+
async function liveStill(input, source) {
|
|
59280
|
+
const now = input.now ?? Date.now;
|
|
59281
|
+
const pause = input.pause ?? realPause;
|
|
59282
|
+
const deadline = now() + PACKAGE_STILL_BOUND_MS;
|
|
59283
|
+
let reason = "live-unavailable";
|
|
59284
|
+
let attempts = 0;
|
|
59285
|
+
while (attempts < PACKAGE_STILL_LIVE_ATTEMPTS) {
|
|
59286
|
+
const remaining = deadline - now();
|
|
59287
|
+
if (remaining <= 0) return {
|
|
59288
|
+
jpeg: null,
|
|
59289
|
+
reason: "bound-exhausted",
|
|
59290
|
+
attempts
|
|
59291
|
+
};
|
|
59292
|
+
attempts += 1;
|
|
59293
|
+
try {
|
|
59294
|
+
const jpeg = await readLive(source, Math.min(PACKAGE_STILL_ATTEMPT_TIMEOUT_MS, remaining));
|
|
59295
|
+
if (jpeg !== null && jpeg.byteLength > 0) return {
|
|
59296
|
+
jpeg,
|
|
59297
|
+
reason,
|
|
59298
|
+
attempts
|
|
59299
|
+
};
|
|
59300
|
+
reason = jpeg === null ? "live-unavailable" : "empty-frame";
|
|
59301
|
+
} catch {
|
|
59302
|
+
reason = "live-unavailable";
|
|
59303
|
+
}
|
|
59304
|
+
if (attempts < PACKAGE_STILL_LIVE_ATTEMPTS) await pause(PACKAGE_STILL_RETRY_PAUSE_MS);
|
|
59305
|
+
}
|
|
59306
|
+
return {
|
|
59307
|
+
jpeg: null,
|
|
59308
|
+
reason,
|
|
59309
|
+
attempts
|
|
59310
|
+
};
|
|
59311
|
+
}
|
|
59254
59312
|
/**
|
|
59255
59313
|
* The entry carrying its still's `keyFrameMediaId`, or the entry unchanged when
|
|
59256
59314
|
* it already had one or none could be stored (said, with the reason).
|
|
59315
|
+
*
|
|
59316
|
+
* Ladder: the native handle while its lease can still be alive, then a frame
|
|
59317
|
+
* that exists now (retried under a bound). Every landed still is logged next to
|
|
59318
|
+
* every miss (D400).
|
|
59257
59319
|
*/
|
|
59258
59320
|
async function withParcelStill(input) {
|
|
59259
59321
|
const { entry, logger } = input;
|
|
59260
59322
|
if (entry.keyFrameMediaId !== void 0) return entry;
|
|
59261
|
-
const
|
|
59323
|
+
const tags = { deviceId: entry.deviceId };
|
|
59324
|
+
const miss = (reason, extra = {}) => {
|
|
59262
59325
|
logger.warn("package still NOT stored — the delivery ships without a picture of the parcel", {
|
|
59263
|
-
tags
|
|
59326
|
+
tags,
|
|
59264
59327
|
meta: {
|
|
59265
59328
|
entryId: entry.id,
|
|
59266
59329
|
reason,
|
|
59267
|
-
...
|
|
59330
|
+
...extra
|
|
59268
59331
|
}
|
|
59269
59332
|
});
|
|
59270
59333
|
return entry;
|
|
59271
59334
|
};
|
|
59272
|
-
if (input.handle === null) return miss("no-frame-handle");
|
|
59273
59335
|
if (input.writer === null) return miss("no-media-store");
|
|
59336
|
+
const now = input.now ?? Date.now;
|
|
59337
|
+
let jpeg = null;
|
|
59338
|
+
let source = "native";
|
|
59339
|
+
let stamp = input.timestamp;
|
|
59340
|
+
let nativeMiss = "no-frame-handle";
|
|
59341
|
+
let liveReason = null;
|
|
59342
|
+
let attempts = 0;
|
|
59274
59343
|
try {
|
|
59275
|
-
|
|
59276
|
-
|
|
59277
|
-
|
|
59278
|
-
|
|
59279
|
-
|
|
59280
|
-
|
|
59281
|
-
|
|
59282
|
-
|
|
59283
|
-
|
|
59284
|
-
|
|
59285
|
-
|
|
59344
|
+
if (input.handle !== null) {
|
|
59345
|
+
const reply = await input.query({
|
|
59346
|
+
handle: input.handle,
|
|
59347
|
+
bbox: {
|
|
59348
|
+
x: 0,
|
|
59349
|
+
y: 0,
|
|
59350
|
+
w: entry.frameWidth,
|
|
59351
|
+
h: entry.frameHeight
|
|
59352
|
+
},
|
|
59353
|
+
acceptJpegBytes: true,
|
|
59354
|
+
encodeJpeg: true,
|
|
59355
|
+
pin: nodePin(input.handle.nodeId)
|
|
59356
|
+
});
|
|
59357
|
+
if (reply === null) nativeMiss = "native-miss";
|
|
59358
|
+
else {
|
|
59359
|
+
const out = await jpegOf(reply);
|
|
59360
|
+
if (typeof out === "string") nativeMiss = out;
|
|
59361
|
+
else jpeg = out;
|
|
59362
|
+
}
|
|
59363
|
+
}
|
|
59364
|
+
if (jpeg === null && input.live !== null) {
|
|
59365
|
+
const live = await liveStill(input, input.live);
|
|
59366
|
+
attempts = live.attempts;
|
|
59367
|
+
if (live.jpeg !== null) {
|
|
59368
|
+
jpeg = live.jpeg;
|
|
59369
|
+
source = "live";
|
|
59370
|
+
stamp = now();
|
|
59371
|
+
} else liveReason = live.reason;
|
|
59372
|
+
}
|
|
59373
|
+
if (jpeg === null) return miss(liveReason ?? nativeMiss, {
|
|
59374
|
+
...input.handle !== null ? { nativeMiss } : {},
|
|
59375
|
+
...liveReason !== null ? { liveAttempts: attempts } : {}
|
|
59286
59376
|
});
|
|
59287
|
-
if (reply === null) return miss("native-miss");
|
|
59288
|
-
const jpeg = await jpegOf(reply);
|
|
59289
|
-
if (typeof jpeg === "string") return miss(jpeg);
|
|
59290
59377
|
const keyFrameMediaId = await input.writer.putReplacing({
|
|
59291
59378
|
deviceId: entry.deviceId,
|
|
59292
59379
|
ownerKind: "track",
|
|
59293
59380
|
ownerId: entry.id,
|
|
59294
59381
|
kind: "keyFrame",
|
|
59295
|
-
timestamp:
|
|
59382
|
+
timestamp: stamp,
|
|
59296
59383
|
data: Buffer.from(jpeg),
|
|
59297
59384
|
subjectBox: {
|
|
59298
59385
|
x: entry.bbox.x,
|
|
@@ -59303,12 +59390,20 @@ async function withParcelStill(input) {
|
|
|
59303
59390
|
frameHeight: entry.frameHeight
|
|
59304
59391
|
}
|
|
59305
59392
|
});
|
|
59393
|
+
logger.info("package still stored", {
|
|
59394
|
+
tags,
|
|
59395
|
+
meta: {
|
|
59396
|
+
entryId: entry.id,
|
|
59397
|
+
mediaId: keyFrameMediaId,
|
|
59398
|
+
source
|
|
59399
|
+
}
|
|
59400
|
+
});
|
|
59306
59401
|
return {
|
|
59307
59402
|
...entry,
|
|
59308
59403
|
keyFrameMediaId
|
|
59309
59404
|
};
|
|
59310
59405
|
} catch (err) {
|
|
59311
|
-
return miss("write-failed", errMsg(err));
|
|
59406
|
+
return miss("write-failed", { error: errMsg(err) });
|
|
59312
59407
|
}
|
|
59313
59408
|
}
|
|
59314
59409
|
/**
|
|
@@ -70695,6 +70790,7 @@ Object.freeze({
|
|
|
70695
70790
|
"pageSize": 50
|
|
70696
70791
|
} },
|
|
70697
70792
|
"device-runs": { "listRuns": { "limit": 50 } },
|
|
70793
|
+
"fan-presets": { "capturePreset": { "steps": [] } },
|
|
70698
70794
|
"llm": { "upsertProfile": { "profile": { "__nested__": {
|
|
70699
70795
|
"timeoutMs": 6e4,
|
|
70700
70796
|
"connectTimeoutMs": 1e4,
|
|
@@ -70935,6 +71031,10 @@ Object.freeze({
|
|
|
70935
71031
|
"speed": 2
|
|
70936
71032
|
}
|
|
70937
71033
|
},
|
|
71034
|
+
"system": { "debugWatch": {
|
|
71035
|
+
"channels": [],
|
|
71036
|
+
"deviceIds": []
|
|
71037
|
+
} },
|
|
70938
71038
|
"terminal-session": { "pullOutput": { "waitMs": 0 } },
|
|
70939
71039
|
"training": {
|
|
70940
71040
|
"planJob": { "selection": { "__nested__": { "workState": "complete" } } },
|
|
@@ -70981,6 +71081,7 @@ Object.freeze({
|
|
|
70981
71081
|
],
|
|
70982
71082
|
"device-removal-hook": ["listDeviceData"],
|
|
70983
71083
|
"failure-contribution": ["list"],
|
|
71084
|
+
"integration-instances": ["listInstances"],
|
|
70984
71085
|
"llm": [
|
|
70985
71086
|
"getDefaults",
|
|
70986
71087
|
"getUsage",
|
|
@@ -71022,6 +71123,7 @@ Object.freeze({
|
|
|
71022
71123
|
"listSupportedEntityKinds",
|
|
71023
71124
|
"unexposeEntity"
|
|
71024
71125
|
],
|
|
71126
|
+
"integration-instances": ["testInstance"],
|
|
71025
71127
|
"log-destination": [
|
|
71026
71128
|
"cancelRead",
|
|
71027
71129
|
"describeRead",
|
|
@@ -85120,6 +85222,9 @@ async function renderMosaic(request, logger) {
|
|
|
85120
85222
|
* one composition are decisions about the set, and none of them belongs in a
|
|
85121
85223
|
* shelf that photographs one camera for an absence.
|
|
85122
85224
|
*
|
|
85225
|
+
* A SLEEPING battery camera is woken by one forced capture when the rule leaves
|
|
85226
|
+
* it allowed (D998) — bounded, once per gap per camera, never by a poll.
|
|
85227
|
+
*
|
|
85123
85228
|
* Two reads can only ever ADD a camera back, never take one away on their own
|
|
85124
85229
|
* failure (D49): a wrapper-state read (run in parallel with the capture) that
|
|
85125
85230
|
* misses or throws keeps the tile, and a freshness read that misses or throws
|
|
@@ -85133,6 +85238,15 @@ var NC_LINKED_CAMERA_PREFIX = "nc-linked:";
|
|
|
85133
85238
|
function isLinkedStillId(id) {
|
|
85134
85239
|
return id.startsWith(NC_LINKED_MOSAIC_PREFIX) || id.startsWith(NC_LINKED_CAMERA_PREFIX);
|
|
85135
85240
|
}
|
|
85241
|
+
/**
|
|
85242
|
+
* D998 — the one forced capture that wakes a sleeping battery camera for a
|
|
85243
|
+
* sensor notification: the bound it may take, the pause between re-polls of a
|
|
85244
|
+
* camera another wake already started, and the gap per camera before it is
|
|
85245
|
+
* woken again (a flapping contact must not drain a battery).
|
|
85246
|
+
*/
|
|
85247
|
+
var NC_LINKED_WAKE_CAPTURE_TIMEOUT_MS = 15e3;
|
|
85248
|
+
var NC_LINKED_WAKE_POLL_MS = 1e3;
|
|
85249
|
+
var NC_LINKED_WAKE_MIN_GAP_MS = 6e4;
|
|
85136
85250
|
/** Per camera — the marker's own bound (`SENSOR_MARKER_SNAPSHOT_TIMEOUT_MS`). */
|
|
85137
85251
|
var SENSOR_LINKED_CAPTURE_TIMEOUT_MS = 2500;
|
|
85138
85252
|
/** The capture-free wrapper-state read, per camera. It runs IN PARALLEL with
|
|
@@ -85165,11 +85279,14 @@ var NcLinkedStillShelf = class {
|
|
|
85165
85279
|
deps;
|
|
85166
85280
|
sets = /* @__PURE__ */ new Map();
|
|
85167
85281
|
owners = /* @__PURE__ */ new Map();
|
|
85282
|
+
/** setId → when its in-flight wake gives up (the dispatcher waits that long). */
|
|
85283
|
+
pendingWakes = /* @__PURE__ */ new Map();
|
|
85284
|
+
lastWakeAt = /* @__PURE__ */ new Map();
|
|
85168
85285
|
constructor(deps) {
|
|
85169
85286
|
this.deps = deps;
|
|
85170
85287
|
}
|
|
85171
85288
|
/** SYNCHRONOUS: the evaluation that follows names these owners. */
|
|
85172
|
-
captureSet(sensorId, cameraIds, atMs) {
|
|
85289
|
+
captureSet(sensorId, cameraIds, atMs, options = { wakeSleeping: false }) {
|
|
85173
85290
|
const now = this.deps.now();
|
|
85174
85291
|
this.prune(now);
|
|
85175
85292
|
const setId = randomUUID();
|
|
@@ -85197,7 +85314,7 @@ var NcLinkedStillShelf = class {
|
|
|
85197
85314
|
camera: cameraId
|
|
85198
85315
|
});
|
|
85199
85316
|
});
|
|
85200
|
-
this.run(setId, stills, atMs, now).catch((err) => {
|
|
85317
|
+
this.run(setId, stills, atMs, now, options).catch((err) => {
|
|
85201
85318
|
this.deps.logger.warn("sensor notification pictures failed — it ships text-only", {
|
|
85202
85319
|
tags: { deviceId: sensorId },
|
|
85203
85320
|
meta: { error: String(err) }
|
|
@@ -85205,6 +85322,15 @@ var NcLinkedStillShelf = class {
|
|
|
85205
85322
|
});
|
|
85206
85323
|
return stills;
|
|
85207
85324
|
}
|
|
85325
|
+
/**
|
|
85326
|
+
* While a wake of one of this owner's cameras is in flight: the instant it
|
|
85327
|
+
* gives up (its bound plus one poll). `undefined` otherwise — the dispatcher
|
|
85328
|
+
* then keeps its ordinary still-wait.
|
|
85329
|
+
*/
|
|
85330
|
+
pendingUntil(ownerId) {
|
|
85331
|
+
const ref = this.owners.get(ownerId);
|
|
85332
|
+
return ref === void 0 ? void 0 : this.pendingWakes.get(ref.setId);
|
|
85333
|
+
}
|
|
85208
85334
|
/** `undefined` = not an owner this shelf minted (or pruned); `[]` = nothing (yet). */
|
|
85209
85335
|
get(ownerId) {
|
|
85210
85336
|
const ref = this.owners.get(ownerId);
|
|
@@ -85226,20 +85352,37 @@ var NcLinkedStillShelf = class {
|
|
|
85226
85352
|
clear() {
|
|
85227
85353
|
this.sets.clear();
|
|
85228
85354
|
this.owners.clear();
|
|
85355
|
+
this.pendingWakes.clear();
|
|
85229
85356
|
}
|
|
85230
|
-
async run(setId, stills, atMs, startedAt) {
|
|
85231
|
-
const
|
|
85357
|
+
async run(setId, stills, atMs, startedAt, options) {
|
|
85358
|
+
const ctx = {
|
|
85359
|
+
setId,
|
|
85360
|
+
sensorId: stills.sensorId,
|
|
85361
|
+
startedAt,
|
|
85362
|
+
options
|
|
85363
|
+
};
|
|
85364
|
+
let results;
|
|
85365
|
+
try {
|
|
85366
|
+
results = await Promise.all(stills.cameraIds.map((id) => this.captureOne(id, ctx)));
|
|
85367
|
+
} finally {
|
|
85368
|
+
this.pendingWakes.delete(setId);
|
|
85369
|
+
}
|
|
85232
85370
|
const judged = await this.judgeFreshness(stills.sensorId, results, atMs);
|
|
85233
85371
|
for (const r of judged) this.logTile(stills.sensorId, r);
|
|
85234
85372
|
const landed = judged.filter(isLandedTile);
|
|
85235
85373
|
const composed = await this.compose(stills.sensorId, landed, atMs);
|
|
85236
85374
|
const undrawable = landed.length - composed.drawn;
|
|
85375
|
+
const woken = judged.filter((r) => r.woken === true).map((r) => r.cameraId);
|
|
85237
85376
|
this.deps.logger.info(composed.mosaic.length === 0 ? "sensor notification has no linked picture — it ships text-only" : "sensor notification pictures ready", {
|
|
85238
85377
|
tags: { deviceId: stills.sensorId },
|
|
85239
85378
|
meta: {
|
|
85240
85379
|
cameras: stills.cameraIds.length,
|
|
85241
85380
|
landed: composed.drawn,
|
|
85242
85381
|
...undrawable > 0 ? { undrawable } : {},
|
|
85382
|
+
...woken.length > 0 ? {
|
|
85383
|
+
woken,
|
|
85384
|
+
waitedMs: this.deps.now() - startedAt
|
|
85385
|
+
} : {},
|
|
85243
85386
|
dropped: Object.fromEntries(judged.filter((r) => r.outcome !== "landed").map((r) => [String(r.cameraId), r.outcome])),
|
|
85244
85387
|
tookMs: this.deps.now() - startedAt
|
|
85245
85388
|
}
|
|
@@ -85252,21 +85395,25 @@ var NcLinkedStillShelf = class {
|
|
|
85252
85395
|
mosaic: composed.mosaic
|
|
85253
85396
|
});
|
|
85254
85397
|
}
|
|
85255
|
-
async captureOne(cameraId,
|
|
85256
|
-
const took = () => this.deps.now() - startedAt;
|
|
85398
|
+
async captureOne(cameraId, ctx) {
|
|
85399
|
+
const took = () => this.deps.now() - ctx.startedAt;
|
|
85257
85400
|
if (this.deps.isOnline(cameraId) === false) return {
|
|
85258
85401
|
cameraId,
|
|
85259
85402
|
outcome: "excluded",
|
|
85260
85403
|
reason: "offline",
|
|
85261
85404
|
tookMs: took()
|
|
85262
85405
|
};
|
|
85263
|
-
const [verdict, capture] = await Promise.all([this.wrapperVerdict(cameraId), this.captureStill(cameraId)]);
|
|
85264
|
-
|
|
85406
|
+
const [verdict, capture] = await Promise.all([this.wrapperVerdict(cameraId), this.captureStill(cameraId, false, SENSOR_LINKED_CAPTURE_TIMEOUT_MS)]);
|
|
85407
|
+
const excluded = (reason) => ({
|
|
85265
85408
|
cameraId,
|
|
85266
85409
|
outcome: "excluded",
|
|
85267
|
-
reason
|
|
85410
|
+
reason,
|
|
85268
85411
|
tookMs: took()
|
|
85269
|
-
};
|
|
85412
|
+
});
|
|
85413
|
+
if (verdict.reason === "sleeping") return this.wakeOne(cameraId, ctx);
|
|
85414
|
+
if (verdict.reason === "waking" && ctx.options.wakeSleeping) return this.awaitWaking(cameraId, ctx);
|
|
85415
|
+
if (verdict.reason === "unreachable" && ctx.options.wakeSleeping) return excluded("wake-skipped:unreachable");
|
|
85416
|
+
if (verdict.reason !== null) return excluded(verdict.reason);
|
|
85270
85417
|
return {
|
|
85271
85418
|
cameraId,
|
|
85272
85419
|
...capture,
|
|
@@ -85274,9 +85421,84 @@ var NcLinkedStillShelf = class {
|
|
|
85274
85421
|
tookMs: took()
|
|
85275
85422
|
};
|
|
85276
85423
|
}
|
|
85277
|
-
|
|
85424
|
+
/** D998: one forced capture, by the rule's leave, at most once per gap per camera. */
|
|
85425
|
+
async wakeOne(cameraId, ctx) {
|
|
85426
|
+
const took = () => this.deps.now() - ctx.startedAt;
|
|
85427
|
+
const skipped = (reason) => ({
|
|
85428
|
+
cameraId,
|
|
85429
|
+
outcome: "excluded",
|
|
85430
|
+
reason,
|
|
85431
|
+
tookMs: took()
|
|
85432
|
+
});
|
|
85433
|
+
if (!ctx.options.wakeSleeping) return skipped("wake-skipped:policy");
|
|
85434
|
+
const last = this.lastWakeAt.get(cameraId);
|
|
85435
|
+
if (last !== void 0 && ctx.startedAt - last < NC_LINKED_WAKE_MIN_GAP_MS) return skipped("wake-skipped:recent-wake");
|
|
85436
|
+
this.lastWakeAt.set(cameraId, ctx.startedAt);
|
|
85437
|
+
this.markPending(ctx);
|
|
85438
|
+
this.deps.logger.info("linked battery camera woken for the sensor notification", {
|
|
85439
|
+
tags: { deviceId: cameraId },
|
|
85440
|
+
meta: {
|
|
85441
|
+
sensorId: ctx.sensorId,
|
|
85442
|
+
ruleIds: ctx.options.ruleIds ?? [],
|
|
85443
|
+
boundMs: NC_LINKED_WAKE_CAPTURE_TIMEOUT_MS
|
|
85444
|
+
}
|
|
85445
|
+
});
|
|
85446
|
+
const capture = await this.captureStill(cameraId, true, NC_LINKED_WAKE_CAPTURE_TIMEOUT_MS);
|
|
85447
|
+
return {
|
|
85448
|
+
cameraId,
|
|
85449
|
+
...this.asWakeResult(capture),
|
|
85450
|
+
woken: true,
|
|
85451
|
+
tookMs: took()
|
|
85452
|
+
};
|
|
85453
|
+
}
|
|
85454
|
+
/** A camera another wake already started: never forced, re-polled within the bound. */
|
|
85455
|
+
async awaitWaking(cameraId, ctx) {
|
|
85456
|
+
const took = () => this.deps.now() - ctx.startedAt;
|
|
85457
|
+
this.markPending(ctx);
|
|
85458
|
+
const polls = Math.floor(NC_LINKED_WAKE_CAPTURE_TIMEOUT_MS / NC_LINKED_WAKE_POLL_MS);
|
|
85459
|
+
for (let i = 0; i < polls; i++) {
|
|
85460
|
+
await new Promise((resolve) => setTimeout(resolve, NC_LINKED_WAKE_POLL_MS));
|
|
85461
|
+
const verdict = await this.wrapperVerdict(cameraId);
|
|
85462
|
+
if (verdict.reason === "waking") continue;
|
|
85463
|
+
if (verdict.reason !== null) return {
|
|
85464
|
+
cameraId,
|
|
85465
|
+
outcome: "excluded",
|
|
85466
|
+
reason: verdict.reason,
|
|
85467
|
+
tookMs: took()
|
|
85468
|
+
};
|
|
85469
|
+
const capture = await this.captureStill(cameraId, false, SENSOR_LINKED_CAPTURE_TIMEOUT_MS);
|
|
85470
|
+
return {
|
|
85471
|
+
cameraId,
|
|
85472
|
+
...this.asWakeResult(capture),
|
|
85473
|
+
woken: true,
|
|
85474
|
+
tookMs: took()
|
|
85475
|
+
};
|
|
85476
|
+
}
|
|
85477
|
+
return {
|
|
85478
|
+
cameraId,
|
|
85479
|
+
outcome: "wake-timeout",
|
|
85480
|
+
woken: true,
|
|
85481
|
+
tookMs: took()
|
|
85482
|
+
};
|
|
85483
|
+
}
|
|
85484
|
+
markPending(ctx) {
|
|
85485
|
+
const until = ctx.startedAt + NC_LINKED_WAKE_CAPTURE_TIMEOUT_MS + NC_LINKED_WAKE_POLL_MS;
|
|
85486
|
+
this.pendingWakes.set(ctx.setId, Math.max(this.pendingWakes.get(ctx.setId) ?? 0, until));
|
|
85487
|
+
}
|
|
85488
|
+
/** A wake that brought nothing back names itself, not the generic `empty`. */
|
|
85489
|
+
asWakeResult(capture) {
|
|
85490
|
+
if (capture.outcome === "timeout") return {
|
|
85491
|
+
...capture,
|
|
85492
|
+
outcome: "wake-timeout"
|
|
85493
|
+
};
|
|
85494
|
+
return capture.outcome === "empty" || capture.outcome === "error" && capture.reason !== "undecodable" ? {
|
|
85495
|
+
...capture,
|
|
85496
|
+
outcome: "wake-refused"
|
|
85497
|
+
} : capture;
|
|
85498
|
+
}
|
|
85499
|
+
async captureStill(cameraId, force, timeoutMs) {
|
|
85278
85500
|
try {
|
|
85279
|
-
const shot = await withTimeout$2(this.deps.getSnapshot(cameraId),
|
|
85501
|
+
const shot = await withTimeout$2(force ? this.deps.getSnapshot(cameraId, { force: true }) : this.deps.getSnapshot(cameraId), timeoutMs, "snapshot cap");
|
|
85280
85502
|
if (shot === null || shot.base64.length === 0) return { outcome: "empty" };
|
|
85281
85503
|
const jpeg = await this.decodableStill(Buffer.from(shot.base64, "base64"));
|
|
85282
85504
|
if (jpeg === null) return {
|
|
@@ -86835,6 +87057,13 @@ var NC_RECORDED_FOOTAGE_WAIT_MS = 3e4;
|
|
|
86835
87057
|
var NC_STILL_WAIT_MS = 3e3;
|
|
86836
87058
|
var NC_STILL_WAIT_INTERVAL_MS = 500;
|
|
86837
87059
|
/**
|
|
87060
|
+
* D998 — the longest a sensor notification holds for a linked battery camera
|
|
87061
|
+
* that is being woken (`stillDeadline`). A `sent` row is final, so the picture
|
|
87062
|
+
* cannot follow the push: it is waited for here, bounded, or never attached.
|
|
87063
|
+
* Owners with no wake in flight keep {@link NC_STILL_WAIT_MS}.
|
|
87064
|
+
*/
|
|
87065
|
+
var NC_LINKED_WAKE_WAIT_MS = 15e3;
|
|
87066
|
+
/**
|
|
86838
87067
|
* How far a still's OWN instant may sit from the trigger and still count as
|
|
86839
87068
|
* being ABOUT the trigger, for a `delivery: 'immediate'` rule.
|
|
86840
87069
|
*
|
|
@@ -88051,7 +88280,15 @@ var NcDispatcher = class {
|
|
|
88051
88280
|
const firstLook = groupTiles !== null ? null : await this.resolveAttachment(entry, canStillGainMedia(entry) ? "trigger-only" : "any");
|
|
88052
88281
|
const footagePending = this.renderFootage(entry);
|
|
88053
88282
|
const mosaic = groupView !== void 0 && groupTiles !== null ? await this.groupedMosaic(entry, groupView, groupTiles) : null;
|
|
88054
|
-
|
|
88283
|
+
let waitedMs = 0;
|
|
88284
|
+
let still;
|
|
88285
|
+
if (mosaic !== null) still = mosaic.attachment;
|
|
88286
|
+
else if (firstLook !== null || entry.payload.media === "none") still = firstLook;
|
|
88287
|
+
else {
|
|
88288
|
+
const waited = await this.waitForStill(entry);
|
|
88289
|
+
still = waited.still;
|
|
88290
|
+
waitedMs = waited.waitedMs;
|
|
88291
|
+
}
|
|
88055
88292
|
const grouped = groupView !== void 0 && groupMembers !== null ? {
|
|
88056
88293
|
windowKey: groupView.key,
|
|
88057
88294
|
members: groupView.members.length,
|
|
@@ -88076,6 +88313,7 @@ var NcDispatcher = class {
|
|
|
88076
88313
|
recordKind: entry.recordKind,
|
|
88077
88314
|
recordId: entry.recordId,
|
|
88078
88315
|
policy: entry.payload.media,
|
|
88316
|
+
waitedMs,
|
|
88079
88317
|
...entry.payload.mediaImage !== void 0 ? { image: entry.payload.mediaImage } : {},
|
|
88080
88318
|
...memberTrackIds.length > 1 ? { memberTrackIds } : {},
|
|
88081
88319
|
owners: [...entry.payload.subject.eventId !== void 0 ? [`object:${entry.payload.subject.eventId}`] : [], ...entry.payload.subject.trackId !== void 0 ? [`track:${entry.payload.subject.trackId}`] : []]
|
|
@@ -88102,7 +88340,13 @@ var NcDispatcher = class {
|
|
|
88102
88340
|
const subject = entry.payload.subject;
|
|
88103
88341
|
const out = [];
|
|
88104
88342
|
for (const { ownerId, cameraId } of subject.extraStills ?? []) {
|
|
88105
|
-
|
|
88343
|
+
let file = await this.linkedStillFile(entry, ownerId, cameraId);
|
|
88344
|
+
for (let polls = 0; file === void 0 && polls < NC_LINKED_WAKE_WAIT_MS / NC_STILL_WAIT_INTERVAL_MS; polls += 1) {
|
|
88345
|
+
const deadline = this.deps.stillDeadline?.(ownerId);
|
|
88346
|
+
if (deadline === void 0 || this.now() >= deadline) break;
|
|
88347
|
+
await this.sleep(NC_STILL_WAIT_INTERVAL_MS);
|
|
88348
|
+
file = await this.linkedStillFile(entry, ownerId, cameraId);
|
|
88349
|
+
}
|
|
88106
88350
|
const bytes = file === void 0 ? null : decodeStillBytes(file.base64);
|
|
88107
88351
|
if (file === void 0 || bytes === null) {
|
|
88108
88352
|
this.deps.logger.info("linked camera picture missing at send — skipped", {
|
|
@@ -88589,11 +88833,19 @@ var NcDispatcher = class {
|
|
|
88589
88833
|
*/
|
|
88590
88834
|
async waitForStill(entry) {
|
|
88591
88835
|
const subject = entry.payload.subject;
|
|
88592
|
-
if (this.now() - subject.timestamp > NC_STILL_WAIT_MAX_AGE_MS) return
|
|
88593
|
-
|
|
88594
|
-
|
|
88595
|
-
|
|
88836
|
+
if (this.now() - subject.timestamp > NC_STILL_WAIT_MAX_AGE_MS) return {
|
|
88837
|
+
still: await this.resolveAttachment(entry, "any"),
|
|
88838
|
+
waitedMs: 0
|
|
88839
|
+
};
|
|
88840
|
+
if (subject.eventId === void 0 && subject.trackId === void 0) return {
|
|
88841
|
+
still: null,
|
|
88842
|
+
waitedMs: 0
|
|
88843
|
+
};
|
|
88844
|
+
const startedAt = this.now();
|
|
88845
|
+
let waitedMs = 0;
|
|
88846
|
+
for (let i = 0; waitedMs < this.stillWaitBoundMs(entry, startedAt); i += 1) {
|
|
88596
88847
|
await this.sleep(NC_STILL_WAIT_INTERVAL_MS);
|
|
88848
|
+
waitedMs += NC_STILL_WAIT_INTERVAL_MS;
|
|
88597
88849
|
const still = await this.resolveAttachment(entry, "trigger-only");
|
|
88598
88850
|
if (still !== null) {
|
|
88599
88851
|
this.deps.logger.info("the still landed during the bounded wait", {
|
|
@@ -88605,10 +88857,32 @@ var NcDispatcher = class {
|
|
|
88605
88857
|
kind: still.name
|
|
88606
88858
|
}
|
|
88607
88859
|
});
|
|
88608
|
-
return
|
|
88860
|
+
return {
|
|
88861
|
+
still,
|
|
88862
|
+
waitedMs
|
|
88863
|
+
};
|
|
88609
88864
|
}
|
|
88610
88865
|
}
|
|
88611
|
-
return
|
|
88866
|
+
return {
|
|
88867
|
+
still: await this.resolveAttachment(entry, "any"),
|
|
88868
|
+
waitedMs
|
|
88869
|
+
};
|
|
88870
|
+
}
|
|
88871
|
+
/**
|
|
88872
|
+
* How long this row's still poll may run: {@link NC_STILL_WAIT_MS}, or — while
|
|
88873
|
+
* the shelf says a linked camera of this row is being woken — until that
|
|
88874
|
+
* wake gives up, at most {@link NC_LINKED_WAKE_WAIT_MS} (D998).
|
|
88875
|
+
*/
|
|
88876
|
+
stillWaitBoundMs(entry, startedAt) {
|
|
88877
|
+
const subject = entry.payload.subject;
|
|
88878
|
+
const owners = [...subject.trackId !== void 0 ? [subject.trackId] : [], ...(subject.extraStills ?? []).map((extra) => extra.ownerId)];
|
|
88879
|
+
let deadline;
|
|
88880
|
+
for (const ownerId of owners) {
|
|
88881
|
+
const until = this.deps.stillDeadline?.(ownerId);
|
|
88882
|
+
if (until !== void 0 && (deadline === void 0 || until > deadline)) deadline = until;
|
|
88883
|
+
}
|
|
88884
|
+
if (deadline === void 0) return NC_STILL_WAIT_MS;
|
|
88885
|
+
return Math.max(NC_STILL_WAIT_MS, Math.min(NC_LINKED_WAKE_WAIT_MS, deadline - startedAt));
|
|
88612
88886
|
}
|
|
88613
88887
|
/**
|
|
88614
88888
|
* The grouped MOSAIC (D692 §6.2): one tile per member, at most
|
|
@@ -88756,8 +89030,8 @@ var NcDispatcher = class {
|
|
|
88756
89030
|
return ts !== void 0 && this.now() - ts <= NC_STILL_WAIT_MAX_AGE_MS;
|
|
88757
89031
|
});
|
|
88758
89032
|
await look("trigger-only", pollable());
|
|
88759
|
-
const
|
|
88760
|
-
for (let
|
|
89033
|
+
const startedAt = this.now();
|
|
89034
|
+
for (let waited = 0; waited < this.stillWaitBoundMs(entry, startedAt) && pollable().length > 0; waited += NC_STILL_WAIT_INTERVAL_MS) {
|
|
88761
89035
|
await this.sleep(NC_STILL_WAIT_INTERVAL_MS);
|
|
88762
89036
|
await look("trigger-only", pollable());
|
|
88763
89037
|
}
|
|
@@ -104277,7 +104551,7 @@ function beginLinkedStills(host, request) {
|
|
|
104277
104551
|
if (rowCameraIds.length > 0 && rowShown.length === 0) return void 0;
|
|
104278
104552
|
const shown = host.unmutedCameras(cameraIds);
|
|
104279
104553
|
const involved = [sensorId, ...rowShown];
|
|
104280
|
-
|
|
104554
|
+
const wanting = host.rules.listEnabled("device-event").filter((rule) => {
|
|
104281
104555
|
if (ruleShipsNoStill(rule)) return false;
|
|
104282
104556
|
if (!deviceEventRuleMayFireOnKind(rule, sensorKind, sensorRaised)) return false;
|
|
104283
104557
|
const excluded = rule.conditions.devicesExclude;
|
|
@@ -104288,9 +104562,14 @@ function beginLinkedStills(host, request) {
|
|
|
104288
104562
|
})) return false;
|
|
104289
104563
|
const devices = rule.conditions.devices;
|
|
104290
104564
|
return devices === void 0 || devices.length === 0 || devices.some((id) => involved.includes(id));
|
|
104291
|
-
})
|
|
104565
|
+
});
|
|
104566
|
+
if (wanting.length === 0) return void 0;
|
|
104567
|
+
const wakeSleeping = wanting.some((rule) => rule.media?.wakeSleepingCamera !== false);
|
|
104292
104568
|
for (const cameraId of cameraIds) if (!shown.includes(cameraId)) host.reportLinkedCameraMuted(cameraId, sensorId);
|
|
104293
|
-
return shown.length > 0 ? shelf.captureSet(sensorId, shown, atMs
|
|
104569
|
+
return shown.length > 0 ? shelf.captureSet(sensorId, shown, atMs, {
|
|
104570
|
+
wakeSleeping,
|
|
104571
|
+
ruleIds: wanting.map((rule) => rule.id)
|
|
104572
|
+
}) : void 0;
|
|
104294
104573
|
}
|
|
104295
104574
|
/**
|
|
104296
104575
|
* A muted camera left out of a linked set — one INFO line per camera per
|
|
@@ -107013,6 +107292,7 @@ var NotificationCenter = class {
|
|
|
107013
107292
|
...deps.dispatcher,
|
|
107014
107293
|
logger: this.logger.child("dispatch"),
|
|
107015
107294
|
texts: this.texts,
|
|
107295
|
+
stillDeadline: (ownerId) => isLinkedStillId(ownerId) ? this.linkedStills?.pendingUntil(ownerId) : void 0,
|
|
107016
107296
|
getMediaForOwner: async (ownerKind, ownerId, eventScope) => {
|
|
107017
107297
|
const held = isSyntheticId(ownerId) ? this.syntheticMedia.get(ownerId) : void 0;
|
|
107018
107298
|
if (held !== void 0) return held.files;
|
|
@@ -109596,7 +109876,10 @@ var BuildNotificationCenter = class extends BuildNotificationCenterBase {
|
|
|
109596
109876
|
},
|
|
109597
109877
|
readAlerts: () => api.alerts.list.query({ limit: 5e3 }),
|
|
109598
109878
|
emitBusEvent: (event) => this.ctx.eventBus.emit(event),
|
|
109599
|
-
getSnapshot: (deviceId) => api.snapshot.getSnapshot.query(
|
|
109879
|
+
getSnapshot: (deviceId, opts) => api.snapshot.getSnapshot.query(opts?.force === true ? {
|
|
109880
|
+
deviceId,
|
|
109881
|
+
force: true
|
|
109882
|
+
} : { deviceId }),
|
|
109600
109883
|
recognitionOutlook: ({ deviceId, trackId, className, labelKind, now }) => recognitionOutlook({
|
|
109601
109884
|
className,
|
|
109602
109885
|
...labelKind !== void 0 ? { labelKind } : {},
|
|
@@ -127961,11 +128244,15 @@ var PipelineAnalyticsAddon = class PipelineAnalyticsAddon extends BaseAddon {
|
|
|
127961
128244
|
const lookFrame = this.frameState.packageLookFrames.get(input.deviceId);
|
|
127962
128245
|
promoteWithStill({
|
|
127963
128246
|
entry,
|
|
127964
|
-
handle: lookFrame !== void 0 && input.timestamp - lookFrame.at <=
|
|
128247
|
+
handle: lookFrame !== void 0 && input.timestamp - lookFrame.at <= PACKAGE_NATIVE_HANDLE_MAX_AGE_MS ? lookFrame.handle : null,
|
|
127965
128248
|
timestamp: lookFrame?.at ?? input.timestamp,
|
|
127966
128249
|
query: (request) => this.queryPackageSceneCrop(request),
|
|
127967
128250
|
writer: this.mediaStore,
|
|
127968
128251
|
logger: this.ctx.logger,
|
|
128252
|
+
live: async () => {
|
|
128253
|
+
const snap = await this.ctx.api.snapshot.getSnapshot.query({ deviceId: input.deviceId });
|
|
128254
|
+
return snap === null ? null : Uint8Array.from(Buffer.from(snap.base64, "base64"));
|
|
128255
|
+
},
|
|
127969
128256
|
detector: this.packageDropDetector
|
|
127970
128257
|
}).catch((err) => {
|
|
127971
128258
|
this.ctx.logger.warn("package promotion failed", {
|
|
@@ -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-
|
|
33
|
+
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-CXG7YPYq.mjs")).catch((e) => {
|
|
34
34
|
throw l = void 0, e;
|
|
35
35
|
}), l;
|
|
36
36
|
}
|