@camstack/addon-post-analysis 1.2.614 → 1.2.616

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.
@@ -1,4 +1,4 @@
1
- import { $ as MediaFileKindEnum, $i as sleep$1, $n as coreBlockIdFromAddonId, $r as readDeviceStateFrom, $t as NcTemplateVarDescriptorSchema, A as DeclaredDevices, Ai as templateCarriesSummary, An as TrackSideSchema, Ar as isEventOwnerType, At as NcAlarmSensorsInputSchema, B as FULL_IMAGE_BBOX, Bi as errMsg, Bn as applyModeDelaysEdits, Br as kebabToCamel, Bt as NcRuleSchema, C as ClearTrackRelationResultSchema, Ci as summarizeReview, Cn as TRACK_RELATIONS_DEFAULT_LIMIT, Cr as isAlertEpisodeOpen, Ct as NC_SNOOZE_MAX_MINUTES, D as DEFAULT_TIMELAPSE_PREVIEW_TEXT, Di as systemEventFilterApplies, Dn as TrackPuritySchema, Dr as isDefaultAlarmProfileId, Dt as NC_TEMPLATE_VARS, E as DEFAULT_EVENT_COLOR, Ei as systemEventFamilyProblems, En as TimelapseRuleSchema, Er as isAudioClassName, Et as NC_TAXONOMY, F as EVENT_DENSITY_BATCH_MAX, Fi as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, Fn as alarmPanelCapability, Fr as isRootSuppliableStepId, Ft as NcLegacyRuleActionSequenceSchema, G as ListTrackRelationsResultSchema, Gi as createEvent, Gn as audioMetricsCapability, Gr as normalizeNcMediaPolicy, Gt as NcSnoozeInputSchema, H as LABEL_SUPPLY_MACRO, Hi as CamProfileSchema, Hn as applySecureOnArmEdit, Hr as mayWriteToLocation, Ht as NcRuleUpdateInputSchema, I as EVENT_KIND_BY_CAP, Ii as canonicalHash, In as alertEpisodeId, Ir as isScheduleActive, It as NcRuleActionSchema, J as MAX_BIRTH_DECISION_RECORDS, Ji as defineRecordKinds, Jn as buildViewerLink, Jr as parseAlertEpisodePayload, Jt as NcStateSummarySectionIdSchema, K as LockStateSchema, Ki as customAction, Kn as audioModeOf, Kr as notificationRulesCapability, Kt as NcSnoozeSchema, L as EVENT_OWNER_TYPES, Li as evaluateSensorEdge, Ln as alertEpisodeKind, Lr as isSystemDelivery, Lt as NcRuleActionsSchema, M as EMBEDDING_MODEL_FAILED, Mi as vectorDimFromBase64, Mn as activateAlarmProfile, Mr as isLabelSupplyStepId, Mt as NcAlarmSettingsPatchSchema, N as EMBEDDING_REQUIREMENTS_FAILED, Ni as viewerLinkBaseOf, Nn as addonWidgetsSourceCapability, Nr as isMediaOwnerType, Nt as NcConditionDescriptorSchema, O as DETECTION_MACRO_CLASSES, Oi as systemEventSummaryScheduleOf, On as TrackRelationKindSchema, Or as isDetectionMacroClass, Ot as NcAlarmConfigSchema, P as EMBEDDING_REQUIREMENTS_UNAVAILABLE, Pi as zoneAnalyticsCapability, Pn as alarmDeviceSecureOnArm, Pr as isRetiredClearKey, Pt as NcConditionsSchema, Q as MOTION_CLOSE_AFTER_MS, Qn as consumableLowPercentOf, Qr as plateGalleryCapability, Qt as NcTemplatePreviewSchema, R as EXPORT_DENSE_MAX_RANGES, Ri as isSourceCap, Rn as alertEpisodePayload, Rr as isSystemEventSummaryRule, Rt as NcRuleInputSchema, S as ClearTrackRelationInputSchema, Si as subKindsOf, Sn as TIMELAPSE_DENSE_FLOOR_SEC, Sr as isAlarmControllableCap, St as NC_SENSOR_TRANSITION_KINDS, T as DEFAULT_DETAIL_CROP_CONVENTION, Ti as systemEventDeliveryProblems, Tn as TimelapseRulePatchSchema, Tr as isAppLinkBase, Tt as NC_TANK_SYSTEM_EVENT_KINDS, U as LabelAttributionSchema, Ui as RECORD_MAX_DATA_BYTES, Un as armRemovalReconcile, Ur as memoizePinnedFfmpeg, Ut as NcScheduleSchema, V as FailureCounters, Vi as BaseAddon, Vn as applyNonBlockingEdit, Vr as linkedStepOf, Vt as NcRuleTargetSchema, W as ListTrackRelationsInputSchema, Wi as RECORD_QUERY_MAX, Wn as assertTimelapseCadences, Wr as ncMediaPolicyError, Wt as NcSharedSequenceSchema, X as MAX_TRACK_PURITIES, Xi as isDeviceScopedCap, Xn as classifyRetrainReview, Xr as pickFaceRescoreIntervalMinutes, Xt as NcTaxonomySchema, Y as MAX_BIRTH_LATENCY_PROXY_MS, Yi as hydrateSchema, Yn as calendarEventLocalSpan, Yt as NcSystemEventKindSchema, Z as MAX_TRACK_RELATIONS, Zi as nodePin, Zn as cloneAlarmSettings, Zr as pipelineAnalyticsCapability, Zt as NcTemplatePreviewInputSchema, _ as BIRTH_DECISION_DEFAULT_LIMIT, _a as EventCategory, _i as secureActuationFor, _n as SCENE_RESET_RECAPTURES, _r as evictionPolicyOfLocation, _t as NC_CONSUMABLE_SYSTEM_EVENT_KINDS, a as CLIP_EMBEDDING_STEP_ID, aa as literal, ai as resolveModeDelays, an as RebuildObjectEmbeddingsRefusalSchema, ar as deriveRecordingMode, at as NC_ALARM_NOTIFY_FIELDS, b as BucketAccumulator, bi as startMoverUnderClearance, bn as SetTrackPurityResultSchema, br as gifDeriveSpeed, bt as NC_GROUPING_MAX_SEC, c as readClusterModelPinStrict, ca as object, cn as RetrainStatusSchema, cr as deviceRemovalHookCapability, ct as NC_AUDIO_CONFIRM_HITS_DEFAULT, d as APPEARANCE_BLOCKS, da as strictObject, di as ruleAutoTriggersAlarm, dn as SCENE_DEFAULT_ANCHOR_THRESHOLD, dr as embeddingRefusalOf, dt as NC_CLIP_PRE_ROLL_DEFAULT_SEC, ea as ZodObject, ei as readMotionTriggeredBy, en as OPS_LOG_DEFAULT_LIMIT, er as cosineSimilarity$1, et as MotionTriggeredBySchema, f as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT, fa as string, fi as ruleBelongsToAlarm$1, fn as SCENE_DEFAULT_CHECK_INTERVAL_SEC, ft as NC_CLIP_RETENTION_MAX_SEC, g as ArchivedDebugNoteSchema, ga as unknown, gi as sceneMonitorCapability, gn as SCENE_DIVERGED, gr as eventKindLabel, gt as NC_CONSUMABLE_LOW_PERCENT_DEFAULT, h as AlarmArmModeSchema, ha as union, hi as ruleKindOf, hn as SCENE_DEFAULT_UNCOVERED_POLICY, hr as ensureAlarmProfiles, ht as NC_CONFIRM_DEFAULT_TIMEOUT_MS, ia as discriminatedUnion, ii as resolveLocationMode, in as RECORDING_SOURCE_CAMSTACK_ADDON, ir as derivePostTriggeredAction, it as NC_ALARM_DELAY_MAX_SEC, j as DetectionSourceSchema, ji as templateVarsFor, jn as TrackSourceSchema, jr as isKnownTemplateVar, jt as NcAlarmSensorsSchema, k as DETECTION_PIPELINE_CAP_NAME, ki as systemEventSummarySplitOf, kn as TrackRelationSchema, kr as isEventKindLabelKey, kt as NcAlarmPostTriggeredActionSchema, l as resolveClusterModelPin, la as partialRecord, li as retrainRevisionConflictMessage, ln as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, lt as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, m as AUDIO_MACRO_LABELS, ma as tuple, mi as ruleGroupingApplies, mn as SCENE_DEFAULT_QUIET_SECONDS, mr as encodeVectorBase64, mt as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, na as array, ni as renameAlarmProfile, nr as deleteAlarmProfile, nt as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, o as CLUSTER_MODEL_OWNER_ADDON_ID, oa as looseObject, oi as resolveModeNotifyPolicy, on as RetrainDismissedSchema, or as describeSystemEventDeliveryProblem, ot as NC_ALARM_SYSTEM_EVENT_KINDS, p as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, pa as templateLiteral, pi as ruleDeviceCompatCapQueries, pn as SCENE_DEFAULT_OBSERVATION_SPACING_SEC, pt as NC_CONDITION_CATALOG, q as MAX_ARCHIVED_DEBUG_NOTES, qi as defineCustomActions, qn as buildEventKindDescriptor, qr as occupancyScope, qt as NcSnoozeSuppressedSchema, ra as boolean, ri as resolveClipSearchMinScore, rn as RECORDING_EXPORT_MAX_READ_BYTES, rr as deriveDetailCropRect, rt as NC_ALARM_DELAY_FIELDS, s as FACE_EMBEDDING_STEP_ID, sa as number, si as resolveNcMediaImage, sn as RetrainOriginSchema, sr as describeSystemEventFamilyProblem, st as NC_ALARM_TRIGGERED_MAX_SEC, t as BUILTIN_CLIP_MODELS, ta as _enum, ti as readTimelapseGeneratedAt, tn as OpsLogEntrySchema, tr as createAlarmProfile, tt as NC_ALARM_DEFAULT_PROFILE_ID, u as APPEARANCE_BIN_COUNT, ua as record, ui as rootSupplyServes, un as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, ut as NC_CLIP_POST_ROLL_DEFAULT_SEC, v as BaseDevice, vi as sensorRaisedOf, vn as SceneMonitorSchema, vr as faceGalleryCapability, vt as NC_DEFAULT_SNOOZE_MINUTES, w as CoverStateSchema, wi as syncActiveAlarmProfileSettings, wn as TimelapseRuleInputSchema, wr as isAlertEpisodeSeverity, wt as NC_SYSTEM_EVENT_KIND_GROUP_SPECS, x as COCO_TO_MACRO, xi as storageOccupancyCapability, xn as SetTrackRelationInputSchema, xr as gifFromMp4Args, xt as NC_GROUPING_MIN_SEC, y as BirthDecisionRecordSchema, yi as servedTemplateVars, yn as SetTrackPurityInputSchema, yr as failureContributionCapability, yt as NC_GROUPING_DEFAULT_SEC, z as FIRST_LEVEL_MACRO_CLASSES, zi as DeviceType, zn as applyBlockingEdit, zr as isVectorIndexDimConflict, zt as NcRulePatchSchema } from "../clip-model-registry-D6tdLEFB.mjs";
1
+ import { $ as MediaFileKindEnum, $i as sleep$1, $n as coreBlockIdFromAddonId, $r as readDeviceStateFrom, $t as NcTemplateVarDescriptorSchema, A as DeclaredDevices, Ai as templateCarriesSummary, An as TrackSideSchema, Ar as isEventOwnerType, At as NcAlarmSensorsInputSchema, B as FULL_IMAGE_BBOX, Bi as errMsg, Bn as applyModeDelaysEdits, Br as kebabToCamel, Bt as NcRuleSchema, C as ClearTrackRelationResultSchema, Ci as summarizeReview, Cn as TRACK_RELATIONS_DEFAULT_LIMIT, Cr as isAlertEpisodeOpen, Ct as NC_SNOOZE_MAX_MINUTES, D as DEFAULT_TIMELAPSE_PREVIEW_TEXT, Di as systemEventFilterApplies, Dn as TrackPuritySchema, Dr as isDefaultAlarmProfileId, Dt as NC_TEMPLATE_VARS, E as DEFAULT_EVENT_COLOR, Ei as systemEventFamilyProblems, En as TimelapseRuleSchema, Er as isAudioClassName, Et as NC_TAXONOMY, F as EVENT_DENSITY_BATCH_MAX, Fi as DEFAULT_FIRST_SIGHTING_FRESHNESS_MS, Fn as alarmPanelCapability, Fr as isRootSuppliableStepId, Ft as NcLegacyRuleActionSequenceSchema, G as ListTrackRelationsResultSchema, Gi as createEvent, Gn as audioMetricsCapability, Gr as normalizeNcMediaPolicy, Gt as NcSnoozeInputSchema, H as LABEL_SUPPLY_MACRO, Hi as CamProfileSchema, Hn as applySecureOnArmEdit, Hr as mayWriteToLocation, Ht as NcRuleUpdateInputSchema, I as EVENT_KIND_BY_CAP, Ii as canonicalHash, In as alertEpisodeId, Ir as isScheduleActive, It as NcRuleActionSchema, J as MAX_BIRTH_DECISION_RECORDS, Ji as defineRecordKinds, Jn as buildViewerLink, Jr as parseAlertEpisodePayload, Jt as NcStateSummarySectionIdSchema, K as LockStateSchema, Ki as customAction, Kn as audioModeOf, Kr as notificationRulesCapability, Kt as NcSnoozeSchema, L as EVENT_OWNER_TYPES, Li as evaluateSensorEdge, Ln as alertEpisodeKind, Lr as isSystemDelivery, Lt as NcRuleActionsSchema, M as EMBEDDING_MODEL_FAILED, Mi as vectorDimFromBase64, Mn as activateAlarmProfile, Mr as isLabelSupplyStepId, Mt as NcAlarmSettingsPatchSchema, N as EMBEDDING_REQUIREMENTS_FAILED, Ni as viewerLinkBaseOf, Nn as addonWidgetsSourceCapability, Nr as isMediaOwnerType, Nt as NcConditionDescriptorSchema, O as DETECTION_MACRO_CLASSES, Oi as systemEventSummaryScheduleOf, On as TrackRelationKindSchema, Or as isDetectionMacroClass, Ot as NcAlarmConfigSchema, P as EMBEDDING_REQUIREMENTS_UNAVAILABLE, Pi as zoneAnalyticsCapability, Pn as alarmDeviceSecureOnArm, Pr as isRetiredClearKey, Pt as NcConditionsSchema, Q as MOTION_CLOSE_AFTER_MS, Qn as consumableLowPercentOf, Qr as plateGalleryCapability, Qt as NcTemplatePreviewSchema, R as EXPORT_DENSE_MAX_RANGES, Ri as isSourceCap, Rn as alertEpisodePayload, Rr as isSystemEventSummaryRule, Rt as NcRuleInputSchema, S as ClearTrackRelationInputSchema, Si as subKindsOf, Sn as TIMELAPSE_DENSE_FLOOR_SEC, Sr as isAlarmControllableCap, St as NC_SENSOR_TRANSITION_KINDS, T as DEFAULT_DETAIL_CROP_CONVENTION, Ti as systemEventDeliveryProblems, Tn as TimelapseRulePatchSchema, Tr as isAppLinkBase, Tt as NC_TANK_SYSTEM_EVENT_KINDS, U as LabelAttributionSchema, Ui as RECORD_MAX_DATA_BYTES, Un as armRemovalReconcile, Ur as memoizePinnedFfmpeg, Ut as NcScheduleSchema, V as FailureCounters, Vi as BaseAddon, Vn as applyNonBlockingEdit, Vr as linkedStepOf, Vt as NcRuleTargetSchema, W as ListTrackRelationsInputSchema, Wi as RECORD_QUERY_MAX, Wn as assertTimelapseCadences, Wr as ncMediaPolicyError, Wt as NcSharedSequenceSchema, X as MAX_TRACK_PURITIES, Xi as isDeviceScopedCap, Xn as classifyRetrainReview, Xr as pickFaceRescoreIntervalMinutes, Xt as NcTaxonomySchema, Y as MAX_BIRTH_LATENCY_PROXY_MS, Yi as hydrateSchema, Yn as calendarEventLocalSpan, Yt as NcSystemEventKindSchema, Z as MAX_TRACK_RELATIONS, Zi as nodePin, Zn as cloneAlarmSettings, Zr as pipelineAnalyticsCapability, Zt as NcTemplatePreviewInputSchema, _ as BIRTH_DECISION_DEFAULT_LIMIT, _a as EventCategory, _i as secureActuationFor, _n as SCENE_RESET_RECAPTURES, _r as evictionPolicyOfLocation, _t as NC_CONSUMABLE_SYSTEM_EVENT_KINDS, a as CLIP_EMBEDDING_STEP_ID, aa as literal, ai as resolveModeDelays, an as RebuildObjectEmbeddingsRefusalSchema, ar as deriveRecordingMode, at as NC_ALARM_NOTIFY_FIELDS, b as BucketAccumulator, bi as startMoverUnderClearance, bn as SetTrackPurityResultSchema, br as gifDeriveSpeed, bt as NC_GROUPING_MAX_SEC, c as readClusterModelPinStrict, ca as object, cn as RetrainStatusSchema, cr as deviceRemovalHookCapability, ct as NC_AUDIO_CONFIRM_HITS_DEFAULT, d as APPEARANCE_BLOCKS, da as strictObject, di as ruleAutoTriggersAlarm, dn as SCENE_DEFAULT_ANCHOR_THRESHOLD, dr as embeddingRefusalOf, dt as NC_CLIP_PRE_ROLL_DEFAULT_SEC, ea as ZodObject, ei as readMotionTriggeredBy, en as OPS_LOG_DEFAULT_LIMIT, er as cosineSimilarity$1, et as MotionTriggeredBySchema, f as APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT, fa as string, fi as ruleBelongsToAlarm$1, fn as SCENE_DEFAULT_CHECK_INTERVAL_SEC, ft as NC_CLIP_RETENTION_MAX_SEC, g as ArchivedDebugNoteSchema, ga as unknown, gi as sceneMonitorCapability, gn as SCENE_DIVERGED, gr as eventKindLabel, gt as NC_CONSUMABLE_LOW_PERCENT_DEFAULT, h as AlarmArmModeSchema, ha as union, hi as ruleKindOf, hn as SCENE_DEFAULT_UNCOVERED_POLICY, hr as ensureAlarmProfiles, ht as NC_CONFIRM_DEFAULT_TIMEOUT_MS, ia as discriminatedUnion, ii as resolveLocationMode, in as RECORDING_SOURCE_CAMSTACK_ADDON, ir as derivePostTriggeredAction, it as NC_ALARM_DELAY_MAX_SEC, j as DetectionSourceSchema, ji as templateVarsFor, jn as TrackSourceSchema, jr as isKnownTemplateVar, jt as NcAlarmSensorsSchema, k as DETECTION_PIPELINE_CAP_NAME, ki as systemEventSummarySplitOf, kn as TrackRelationSchema, kr as isEventKindLabelKey, kt as NcAlarmPostTriggeredActionSchema, l as resolveClusterModelPin, la as partialRecord, li as retrainRevisionConflictMessage, ln as SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, lt as NC_AUDIO_CONFIRM_WINDOW_SEC_DEFAULT, m as AUDIO_MACRO_LABELS, ma as tuple, mi as ruleGroupingApplies, mn as SCENE_DEFAULT_QUIET_SECONDS, mr as encodeVectorBase64, mt as NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, na as array, ni as renameAlarmProfile, nr as deleteAlarmProfile, nt as NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC, o as CLUSTER_MODEL_OWNER_ADDON_ID, oa as looseObject, oi as resolveModeNotifyPolicy, on as RetrainDismissedSchema, or as describeSystemEventDeliveryProblem, ot as NC_ALARM_SYSTEM_EVENT_KINDS, p as ARCHIVED_DEBUG_NOTES_DEFAULT_LIMIT, pa as templateLiteral, pi as ruleDeviceCompatCapQueries, pn as SCENE_DEFAULT_OBSERVATION_SPACING_SEC, pt as NC_CONDITION_CATALOG, q as MAX_ARCHIVED_DEBUG_NOTES, qi as defineCustomActions, qn as buildEventKindDescriptor, qr as occupancyScope, qt as NcSnoozeSuppressedSchema, ra as boolean, ri as resolveClipSearchMinScore, rn as RECORDING_EXPORT_MAX_READ_BYTES, rr as deriveDetailCropRect, rt as NC_ALARM_DELAY_FIELDS, s as FACE_EMBEDDING_STEP_ID, sa as number, si as resolveNcMediaImage, sn as RetrainOriginSchema, sr as describeSystemEventFamilyProblem, st as NC_ALARM_TRIGGERED_MAX_SEC, t as BUILTIN_CLIP_MODELS, ta as _enum, ti as readTimelapseGeneratedAt, tn as OpsLogEntrySchema, tr as createAlarmProfile, tt as NC_ALARM_DEFAULT_PROFILE_ID, u as APPEARANCE_BIN_COUNT, ua as record, ui as rootSupplyServes, un as SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, ut as NC_CLIP_POST_ROLL_DEFAULT_SEC, v as BaseDevice, vi as sensorRaisedOf, vn as SceneMonitorSchema, vr as faceGalleryCapability, vt as NC_DEFAULT_SNOOZE_MINUTES, w as CoverStateSchema, wi as syncActiveAlarmProfileSettings, wn as TimelapseRuleInputSchema, wr as isAlertEpisodeSeverity, wt as NC_SYSTEM_EVENT_KIND_GROUP_SPECS, x as COCO_TO_MACRO, xi as storageOccupancyCapability, xn as SetTrackRelationInputSchema, xr as gifFromMp4Args, xt as NC_GROUPING_MIN_SEC, y as BirthDecisionRecordSchema, yi as servedTemplateVars, yn as SetTrackPurityInputSchema, yr as failureContributionCapability, yt as NC_GROUPING_DEFAULT_SEC, z as FIRST_LEVEL_MACRO_CLASSES, zi as DeviceType, zn as applyBlockingEdit, zr as isVectorIndexDimConflict, zt as NcRulePatchSchema } from "../clip-model-registry-BtK1fPgi.mjs";
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";
@@ -4071,6 +4071,224 @@ function ncAlarmPanelPort(panel) {
4071
4071
  };
4072
4072
  }
4073
4073
  //#endregion
4074
+ //#region src/durable/durable-record-body.ts
4075
+ /**
4076
+ * Zod body for phase-3 durable ledger record kinds. The engine validates on
4077
+ * write; each owner's `fromRecord` / `toValue` remain authoritative on read.
4078
+ */
4079
+ var DurableLedgerBodySchema = record(string(), unknown());
4080
+ //#endregion
4081
+ //#region src/notification-center/nc-durable-record-kinds.ts
4082
+ /**
4083
+ * Record kinds for NC live-state ledgers (records plan phase 3, steps 25–36).
4084
+ *
4085
+ * Hosted in the pipeline-analytics addon (`pipeline-analytics` owner stamp).
4086
+ * Declared by the hub; every node reads and writes them through `ctx.records`.
4087
+ * The legacy settings-store handles (`durableLegacyKind`, `legacyCollectionKind`)
4088
+ * serve only a centre built WITHOUT `records` — the specs.
4089
+ */
4090
+ /** The settings-store tables these kinds replaced; read only WITHOUT `ctx.records` (the specs). */
4091
+ var NC_LIVENESS_LEGACY = "notification-center:liveness";
4092
+ var NC_DEVICE_ALERTS_LEGACY = "notification-center:device-alerts";
4093
+ var NC_SYSTEM_STATE_LEGACY = "notification-center:system-state";
4094
+ var NC_OCCUPANCY_LEGACY = "notification-center:occupancy";
4095
+ var NC_DEVICE_PRUNES_LEGACY = "notification-center:device-prunes";
4096
+ var NC_STATE_SUMMARY_STAMPS_LEGACY = "notification-center:state-summary-stamps";
4097
+ var NC_ALERT_EPISODES_LEGACY = "notification-center:alert-episodes";
4098
+ var NC_META_LEGACY = "notification-center:meta";
4099
+ var NC_SNOOZES_LEGACY = "notification-center:snoozes";
4100
+ var NC_SNOOZE_SUPPRESSED_LEGACY = "notification-center:snooze-suppressed";
4101
+ var NC_TRACK_GROUPS_LEGACY = "notification-center:track-groups";
4102
+ var NC_OUTBOX_LEGACY = "notification-center:outbox";
4103
+ var NC_ARTIFACTS_LEGACY = "notification-center:artifacts";
4104
+ var ledger = (writeTrigger, database = "settings", retention = { none: "mirror load-all at boot; rows drop only via owner prune or device-removal hook" }) => ({
4105
+ schema: DurableLedgerBodySchema,
4106
+ class: "ledger",
4107
+ database,
4108
+ writeTrigger,
4109
+ device: "optional",
4110
+ at: "none",
4111
+ retention
4112
+ });
4113
+ /**
4114
+ * The shape the four QUERIED kinds share with the mirrors. Each spells its own
4115
+ * file, trigger, indexes and retention as literals (the records guards read them).
4116
+ * `device` and `at` stay what the first (empty) declaration said — the engine
4117
+ * refuses to change either — so every read is served by a DATA-field index, and
4118
+ * the camera rides the record envelope (`deviceId`) for the D865 removal.
4119
+ */
4120
+ var QUERIED = {
4121
+ schema: DurableLedgerBodySchema,
4122
+ device: "optional",
4123
+ at: "none"
4124
+ };
4125
+ var ncDurableRecordKinds = defineRecordKinds({
4126
+ liveness: ledger("a liveness state TRANSITION the centre accepted (seed or flip); a no-flip writes nothing"),
4127
+ "device-alerts": ledger("a sustained device alert episode the centre confirmed or cleared"),
4128
+ "system-state": ledger("a system-state subject flip the state summary accepted"),
4129
+ "alert-episodes": ledger("an alert episode the centre notified (critical or error); its resolution deletes the row"),
4130
+ occupancy: ledger("a confirmed occupancy level write-through after the watcher decided an edge"),
4131
+ "device-prunes": ledger("one row recording what a deleted-device prune removed"),
4132
+ "state-summary-stamps": ledger("digest delivery stamps per rule kind"),
4133
+ meta: ledger("outbox boot-reconcile watermark and other single-key meta rows", "settings", { none: "one fixed key (watermark), overwritten in place, never deleted" }),
4134
+ snoozes: ledger("operator opens or closes a snooze window (write-through)"),
4135
+ "snooze-suppressed": {
4136
+ ...QUERIED,
4137
+ class: "ledger",
4138
+ database: "events",
4139
+ writeTrigger: "aggregate count per (window, target, rule, camera) for suppressed notifications",
4140
+ indexes: [{
4141
+ name: "snooze",
4142
+ fields: ["snoozeId"]
4143
+ }],
4144
+ retention: {
4145
+ owner: "notification-center",
4146
+ reason: "deleted with its snooze window, 6 h after that window closes"
4147
+ }
4148
+ },
4149
+ "track-groups": {
4150
+ ...QUERIED,
4151
+ class: "ledger",
4152
+ database: "events",
4153
+ writeTrigger: "one row per grouped delivery window opened at admission time",
4154
+ indexes: [
4155
+ {
4156
+ name: "open",
4157
+ fields: ["sealed"]
4158
+ },
4159
+ {
4160
+ name: "opened",
4161
+ fields: ["openedAt"]
4162
+ },
4163
+ {
4164
+ name: "device_opened",
4165
+ fields: ["deviceId", "openedAt"]
4166
+ },
4167
+ {
4168
+ name: "rule_opened",
4169
+ fields: ["ruleId", "openedAt"]
4170
+ },
4171
+ {
4172
+ name: "rule_device_opened",
4173
+ fields: [
4174
+ "ruleId",
4175
+ "deviceId",
4176
+ "openedAt"
4177
+ ]
4178
+ }
4179
+ ],
4180
+ retention: {
4181
+ owner: "notification-center",
4182
+ reason: "ring: the newest NC_GROUP_MAX_ROWS_PER_DEVICE rows per camera, trimmed on write"
4183
+ }
4184
+ },
4185
+ outbox: {
4186
+ ...QUERIED,
4187
+ class: "ledger",
4188
+ database: "events",
4189
+ writeTrigger: "one row per (rule, dedupRef, target) enqueued for delivery",
4190
+ indexes: [
4191
+ {
4192
+ name: "created",
4193
+ fields: ["createdAt"]
4194
+ },
4195
+ {
4196
+ name: "rule_created",
4197
+ fields: ["ruleId", "createdAt"]
4198
+ },
4199
+ {
4200
+ name: "status_created",
4201
+ fields: ["status", "createdAt"]
4202
+ },
4203
+ {
4204
+ name: "device_created",
4205
+ fields: ["deviceId", "createdAt"]
4206
+ },
4207
+ {
4208
+ name: "rule_status_created",
4209
+ fields: [
4210
+ "ruleId",
4211
+ "status",
4212
+ "createdAt"
4213
+ ]
4214
+ },
4215
+ {
4216
+ name: "rule_device_created",
4217
+ fields: [
4218
+ "ruleId",
4219
+ "deviceId",
4220
+ "createdAt"
4221
+ ]
4222
+ },
4223
+ {
4224
+ name: "status_device_created",
4225
+ fields: [
4226
+ "status",
4227
+ "deviceId",
4228
+ "createdAt"
4229
+ ]
4230
+ },
4231
+ {
4232
+ name: "rule_status_device_created",
4233
+ fields: [
4234
+ "ruleId",
4235
+ "status",
4236
+ "deviceId",
4237
+ "createdAt"
4238
+ ]
4239
+ }
4240
+ ],
4241
+ retention: {
4242
+ owner: "notification-center",
4243
+ reason: "terminal (sent/dead) rows older than 7 days pruned at boot; a pending row retries to dead first"
4244
+ },
4245
+ maxDataBytes: RECORD_MAX_DATA_BYTES
4246
+ },
4247
+ artifacts: {
4248
+ ...QUERIED,
4249
+ class: "ledger",
4250
+ database: "events",
4251
+ writeTrigger: "retained notification artefact metadata indexed for lookup and expiry",
4252
+ indexes: [{
4253
+ name: "captured",
4254
+ fields: ["capturedAt"]
4255
+ }, {
4256
+ name: "expires",
4257
+ fields: ["expiresAt"]
4258
+ }],
4259
+ retention: {
4260
+ owner: "notification-center",
4261
+ reason: "falls with its bytes: expired rows on every node, orphans against the shelf on the producer node"
4262
+ }
4263
+ }
4264
+ });
4265
+ /**
4266
+ * The settings-store table each kind stands in for when a centre is built
4267
+ * WITHOUT `ctx.records` - the specs' fake store (`legacyCollectionKind`,
4268
+ * `durableLegacyKind`). Production never reads it: every node has
4269
+ * `ctx.records`, and the operator dropped these tables offline (D900).
4270
+ */
4271
+ var NC_DURABLE_LEGACY_TABLES = {
4272
+ liveness: NC_LIVENESS_LEGACY,
4273
+ "device-alerts": NC_DEVICE_ALERTS_LEGACY,
4274
+ "system-state": NC_SYSTEM_STATE_LEGACY,
4275
+ "alert-episodes": NC_ALERT_EPISODES_LEGACY,
4276
+ occupancy: NC_OCCUPANCY_LEGACY,
4277
+ "device-prunes": NC_DEVICE_PRUNES_LEGACY,
4278
+ "state-summary-stamps": NC_STATE_SUMMARY_STAMPS_LEGACY,
4279
+ meta: NC_META_LEGACY,
4280
+ snoozes: NC_SNOOZES_LEGACY,
4281
+ "snooze-suppressed": NC_SNOOZE_SUPPRESSED_LEGACY,
4282
+ "track-groups": NC_TRACK_GROUPS_LEGACY,
4283
+ outbox: NC_OUTBOX_LEGACY,
4284
+ artifacts: NC_ARTIFACTS_LEGACY
4285
+ };
4286
+ /** The legacy table of an NC durable kind by name, or `undefined` for any other kind. */
4287
+ function ncDurableLegacyTableOf(kind) {
4288
+ for (const [name, table] of Object.entries(NC_DURABLE_LEGACY_TABLES)) if (name === kind) return table;
4289
+ }
4290
+ Object.values(NC_DURABLE_LEGACY_TABLES);
4291
+ //#endregion
4074
4292
  //#region src/durable/legacy-collection-kind.ts
4075
4293
  /** Bounds of a half-open range on the legacy filter (the store has no `>=`). */
4076
4294
  var RANGE_MIN = -864e13;
@@ -4216,8 +4434,8 @@ var LegacyCollectionKind = class {
4216
4434
  /** The handle an NC owner reads and writes through: records when present, else the legacy table. */
4217
4435
  function queriedKind(definition, deps) {
4218
4436
  if (deps.records !== void 0) return deps.records.kind(definition);
4219
- const collection = definition.declaration.adoptsFrom;
4220
- if (collection === void 0) throw new Error(`kind "${definition.name}" names no legacy table (adoptsFrom)`);
4437
+ const collection = ncDurableLegacyTableOf(definition.name);
4438
+ if (collection === void 0) throw new Error(`kind "${definition.name}" has no legacy table to stand in for it`);
4221
4439
  return new LegacyCollectionKind({
4222
4440
  definition,
4223
4441
  collection,
@@ -4262,203 +4480,6 @@ async function collectRecordPages(kind, q, max) {
4262
4480
  }
4263
4481
  }
4264
4482
  //#endregion
4265
- //#region src/durable/durable-record-body.ts
4266
- /**
4267
- * Zod body for phase-3 durable ledger record kinds. The engine validates on
4268
- * write; each owner's `fromRecord` / `toValue` remain authoritative on read.
4269
- */
4270
- var DurableLedgerBodySchema = record(string(), unknown());
4271
- //#endregion
4272
- //#region src/notification-center/nc-durable-record-kinds.ts
4273
- /**
4274
- * Record kinds for NC live-state ledgers (records plan phase 3, steps 25–36).
4275
- *
4276
- * Hosted in the pipeline-analytics addon (`pipeline-analytics` owner stamp).
4277
- * Declared by the hub; every node reads and writes them through `ctx.records`.
4278
- * The legacy settings-store handles (`durableLegacyKind`, `legacyCollectionKind`)
4279
- * serve only a centre built WITHOUT `records` — the specs.
4280
- */
4281
- /** Legacy collection names — keep in sync with owner constants. */
4282
- var NC_LIVENESS_LEGACY = "notification-center:liveness";
4283
- var NC_DEVICE_ALERTS_LEGACY = "notification-center:device-alerts";
4284
- var NC_SYSTEM_STATE_LEGACY = "notification-center:system-state";
4285
- var NC_OCCUPANCY_LEGACY = "notification-center:occupancy";
4286
- var NC_DEVICE_PRUNES_LEGACY = "notification-center:device-prunes";
4287
- var NC_STATE_SUMMARY_STAMPS_LEGACY = "notification-center:state-summary-stamps";
4288
- var NC_ALERT_EPISODES_LEGACY = "notification-center:alert-episodes";
4289
- var NC_META_LEGACY = "notification-center:meta";
4290
- var NC_SNOOZES_LEGACY = "notification-center:snoozes";
4291
- var NC_SNOOZE_SUPPRESSED_LEGACY = "notification-center:snooze-suppressed";
4292
- var NC_TRACK_GROUPS_LEGACY = "notification-center:track-groups";
4293
- var NC_OUTBOX_LEGACY = "notification-center:outbox";
4294
- var NC_ARTIFACTS_LEGACY = "notification-center:artifacts";
4295
- var ledger = (adoptsFrom, writeTrigger, database = "settings", retention = { none: "mirror load-all at boot; rows drop only via owner prune or device-removal hook" }) => ({
4296
- schema: DurableLedgerBodySchema,
4297
- class: "ledger",
4298
- database,
4299
- writeTrigger,
4300
- device: "optional",
4301
- at: "none",
4302
- retention,
4303
- adoptsFrom
4304
- });
4305
- /**
4306
- * The shape the four QUERIED kinds share with the mirrors. Each spells its own
4307
- * file, trigger, indexes and retention as literals (the records guards read them).
4308
- * `device` and `at` stay what the first (empty) declaration said — the engine
4309
- * refuses to change either — so every read is served by a DATA-field index, and
4310
- * the camera rides the record envelope (`deviceId`) for the D865 removal.
4311
- */
4312
- var QUERIED = {
4313
- schema: DurableLedgerBodySchema,
4314
- device: "optional",
4315
- at: "none"
4316
- };
4317
- var ncDurableRecordKinds = defineRecordKinds({
4318
- liveness: ledger(NC_LIVENESS_LEGACY, "a liveness state TRANSITION the centre accepted (seed or flip); a no-flip writes nothing"),
4319
- "device-alerts": ledger(NC_DEVICE_ALERTS_LEGACY, "a sustained device alert episode the centre confirmed or cleared"),
4320
- "system-state": ledger(NC_SYSTEM_STATE_LEGACY, "a system-state subject flip the state summary accepted"),
4321
- "alert-episodes": ledger(NC_ALERT_EPISODES_LEGACY, "an alert episode the centre notified (critical or error); its resolution deletes the row"),
4322
- occupancy: ledger(NC_OCCUPANCY_LEGACY, "a confirmed occupancy level write-through after the watcher decided an edge"),
4323
- "device-prunes": ledger(NC_DEVICE_PRUNES_LEGACY, "one row recording what a deleted-device prune removed"),
4324
- "state-summary-stamps": ledger(NC_STATE_SUMMARY_STAMPS_LEGACY, "digest delivery stamps per rule kind"),
4325
- meta: ledger(NC_META_LEGACY, "outbox boot-reconcile watermark and other single-key meta rows", "settings", { none: "one fixed key (watermark), overwritten in place, never deleted" }),
4326
- snoozes: ledger(NC_SNOOZES_LEGACY, "operator opens or closes a snooze window (write-through)"),
4327
- "snooze-suppressed": {
4328
- ...QUERIED,
4329
- class: "ledger",
4330
- database: "events",
4331
- writeTrigger: "aggregate count per (window, target, rule, camera) for suppressed notifications",
4332
- indexes: [{
4333
- name: "snooze",
4334
- fields: ["snoozeId"]
4335
- }],
4336
- retention: {
4337
- owner: "notification-center",
4338
- reason: "deleted with its snooze window, 6 h after that window closes"
4339
- },
4340
- adoptsFrom: NC_SNOOZE_SUPPRESSED_LEGACY
4341
- },
4342
- "track-groups": {
4343
- ...QUERIED,
4344
- class: "ledger",
4345
- database: "events",
4346
- writeTrigger: "one row per grouped delivery window opened at admission time",
4347
- indexes: [
4348
- {
4349
- name: "open",
4350
- fields: ["sealed"]
4351
- },
4352
- {
4353
- name: "opened",
4354
- fields: ["openedAt"]
4355
- },
4356
- {
4357
- name: "device_opened",
4358
- fields: ["deviceId", "openedAt"]
4359
- },
4360
- {
4361
- name: "rule_opened",
4362
- fields: ["ruleId", "openedAt"]
4363
- },
4364
- {
4365
- name: "rule_device_opened",
4366
- fields: [
4367
- "ruleId",
4368
- "deviceId",
4369
- "openedAt"
4370
- ]
4371
- }
4372
- ],
4373
- retention: {
4374
- owner: "notification-center",
4375
- reason: "ring: the newest NC_GROUP_MAX_ROWS_PER_DEVICE rows per camera, trimmed on write"
4376
- },
4377
- adoptsFrom: NC_TRACK_GROUPS_LEGACY
4378
- },
4379
- outbox: {
4380
- ...QUERIED,
4381
- class: "ledger",
4382
- database: "events",
4383
- writeTrigger: "one row per (rule, dedupRef, target) enqueued for delivery",
4384
- indexes: [
4385
- {
4386
- name: "created",
4387
- fields: ["createdAt"]
4388
- },
4389
- {
4390
- name: "rule_created",
4391
- fields: ["ruleId", "createdAt"]
4392
- },
4393
- {
4394
- name: "status_created",
4395
- fields: ["status", "createdAt"]
4396
- },
4397
- {
4398
- name: "device_created",
4399
- fields: ["deviceId", "createdAt"]
4400
- },
4401
- {
4402
- name: "rule_status_created",
4403
- fields: [
4404
- "ruleId",
4405
- "status",
4406
- "createdAt"
4407
- ]
4408
- },
4409
- {
4410
- name: "rule_device_created",
4411
- fields: [
4412
- "ruleId",
4413
- "deviceId",
4414
- "createdAt"
4415
- ]
4416
- },
4417
- {
4418
- name: "status_device_created",
4419
- fields: [
4420
- "status",
4421
- "deviceId",
4422
- "createdAt"
4423
- ]
4424
- },
4425
- {
4426
- name: "rule_status_device_created",
4427
- fields: [
4428
- "ruleId",
4429
- "status",
4430
- "deviceId",
4431
- "createdAt"
4432
- ]
4433
- }
4434
- ],
4435
- retention: {
4436
- owner: "notification-center",
4437
- reason: "terminal (sent/dead) rows older than 7 days pruned at boot; a pending row retries to dead first"
4438
- },
4439
- maxDataBytes: RECORD_MAX_DATA_BYTES,
4440
- adoptsFrom: NC_OUTBOX_LEGACY
4441
- },
4442
- artifacts: {
4443
- ...QUERIED,
4444
- class: "ledger",
4445
- database: "events",
4446
- writeTrigger: "retained notification artefact metadata indexed for lookup and expiry",
4447
- indexes: [{
4448
- name: "captured",
4449
- fields: ["capturedAt"]
4450
- }, {
4451
- name: "expires",
4452
- fields: ["expiresAt"]
4453
- }],
4454
- retention: {
4455
- owner: "notification-center",
4456
- reason: "falls with its bytes: expired rows on every node, orphans against the shelf on the producer node"
4457
- },
4458
- adoptsFrom: NC_ARTIFACTS_LEGACY
4459
- }
4460
- });
4461
- //#endregion
4462
4483
  //#region src/notification-center/artifact-index.ts
4463
4484
  /**
4464
4485
  * @durable class=ledger owner=notification-center database=events
@@ -9433,38 +9454,12 @@ var FaceRescoreJobStatusSchema = object({
9433
9454
  * Record kinds owned by the pipeline-analytics addon (records plan phase 2,
9434
9455
  * steps 7-11).
9435
9456
  *
9436
- * Each kind adopts the legacy `pipeline-analytics:*` collection of the same
9437
- * name: the boot guard keeps the addon down until `scripts/hub/records-adopt.ts`
9438
- * has copied it. Declared only on the hub (agents have no `ctx.records`). The
9439
- * addon declares no `execution.group`, so the hub owner stamp is the addon id
9457
+ * Each kind replaced the legacy `pipeline-analytics:*` collection of the same
9458
+ * name; the records migration that copied them is closed (D900) and the tables
9459
+ * are gone (`retired-legacy-tables.ts`). The addon declares no
9460
+ * `execution.group`, so the hub owner stamp is the addon id
9440
9461
  * (`pipeline-analytics`).
9441
9462
  */
9442
- /** Legacy names for phase-3 analytics ledgers (keep in sync with owner constants). */
9443
- var PA_PHANTOM_CELLS = "pipeline-analytics:phantom-cells";
9444
- var PA_PACKAGE_BACKGROUND = "pipeline-analytics:package-background";
9445
- var PA_STATIONARY_EVIDENCE = "pipeline-analytics:stationary-evidence";
9446
- var PA_STATIONARY_OBJECTS = "pipeline-analytics:stationary-objects";
9447
- var PA_SCENE_LATCH = "pipeline-analytics:scene-latch";
9448
- var PA_MOTION_EVENTS = "pipeline-analytics:motion-events";
9449
- var PA_AUDIO_EVENTS = "pipeline-analytics:audio-events";
9450
- var PA_SENSOR_EVENTS = "pipeline-analytics:sensor-events";
9451
- var PA_FACES = "pipeline-analytics:faces";
9452
- var PA_PLATES = "pipeline-analytics:plates";
9453
- var PA_TRACK_ALIASES = "pipeline-analytics:track-aliases";
9454
- var PA_TRACK_PURITY = "pipeline-analytics:track-purity";
9455
- var PA_TRACK_RELATIONS = "pipeline-analytics:track-relations";
9456
- var PA_TRACKING_TAPES = "pipeline-analytics:tracking-tapes";
9457
- var PA_BIRTH_DECISION_LEDGER = "pipeline-analytics:birth-decision-ledger";
9458
- var PA_DEBUG_NOTE_ARCHIVE = "pipeline-analytics:debug-note-archive";
9459
- var PA_OPS_LOG = "pipeline-analytics:ops-log";
9460
- var PA_RETRAIN_FRAMES = "pipeline-analytics:retrain-frames";
9461
- var PA_RETRAIN_ANNOTATIONS = "pipeline-analytics:retrain-annotations";
9462
- var PA_RETRAIN_COLLECTIONS = "pipeline-analytics:retrain-collections";
9463
- var PA_RETRAIN_COLLECTION_FRAMES = "pipeline-analytics:retrain-collection-frames";
9464
- var PA_IDENTITIES = "pipeline-analytics:identities";
9465
- var PA_IDENTITY_SAMPLES = "pipeline-analytics:identity-samples";
9466
- var PA_VEHICLES = "pipeline-analytics:vehicles";
9467
- var PA_VEHICLE_SAMPLES = "pipeline-analytics:vehicle-samples";
9468
9463
  /**
9469
9464
  * Kinds that must agree through ONE `transact` sit in one file under one family
9470
9465
  * name, and the engine refuses a family split across files (records plan risk 8).
@@ -9518,8 +9513,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9518
9513
  fields: ["deviceId"]
9519
9514
  }],
9520
9515
  retention: { none: "operator intent: a scene goes only through deleteScene, never by age" },
9521
- maxDataBytes: RECORD_MAX_DATA_BYTES,
9522
- adoptsFrom: "pipeline-analytics:scenes"
9516
+ maxDataBytes: RECORD_MAX_DATA_BYTES
9523
9517
  },
9524
9518
  migrations: {
9525
9519
  schema: MigrationMarkerBodySchema,
@@ -9528,8 +9522,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9528
9522
  writeTrigger: "one marker row when a boot migration (label-tier-4g, audio-track-class-d189) completes without truncating",
9529
9523
  device: "none",
9530
9524
  at: "none",
9531
- retention: { none: "its PRESENCE stops the migration re-scanning every track, face and event row on the next boot; bounded by the number of migrations ever written (two today)" },
9532
- adoptsFrom: "pipeline-analytics:migrations"
9525
+ retention: { none: "its PRESENCE stops the migration re-scanning every track, face and event row on the next boot; bounded by the number of migrations ever written (two today)" }
9533
9526
  },
9534
9527
  "sweep-cursors": {
9535
9528
  schema: SweepCursorBodySchema,
@@ -9538,8 +9531,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9538
9531
  writeTrigger: "the end of every orphan-audit pass rewrites the one row holding every scope cursor",
9539
9532
  device: "none",
9540
9533
  at: "none",
9541
- retention: { none: "one row (id orphan-audit); losing it costs a re-walk from offset 0, never a wrong delete" },
9542
- adoptsFrom: "pipeline-analytics:sweep-cursors"
9534
+ retention: { none: "one row (id orphan-audit); losing it costs a re-walk from offset 0, never a wrong delete" }
9543
9535
  },
9544
9536
  "face-rescore-state": {
9545
9537
  schema: FaceRescoreStateBodySchema,
@@ -9547,8 +9539,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9547
9539
  writeTrigger: "a whole-archive face rescore (manual or scheduled) completes",
9548
9540
  device: "none",
9549
9541
  at: "none",
9550
- retention: { none: "one row (id last-run); losing it costs one idempotent rescore on the next scheduler tick" },
9551
- adoptsFrom: "pipeline-analytics:face-rescore-state"
9542
+ retention: { none: "one row (id last-run); losing it costs one idempotent rescore on the next scheduler tick" }
9552
9543
  },
9553
9544
  "phantom-cells": {
9554
9545
  schema: DurableLedgerBodySchema,
@@ -9556,8 +9547,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9556
9547
  writeTrigger: "a phantom cell closes and the short-motionless bar records it",
9557
9548
  device: "required",
9558
9549
  at: "none",
9559
- retention: { none: "bounded by per-device cap in application code" },
9560
- adoptsFrom: PA_PHANTOM_CELLS
9550
+ retention: { none: "bounded by per-device cap in application code" }
9561
9551
  },
9562
9552
  "package-background": {
9563
9553
  schema: DurableLedgerBodySchema,
@@ -9565,8 +9555,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9565
9555
  writeTrigger: "package background state accepted for a device",
9566
9556
  device: "required",
9567
9557
  at: "none",
9568
- retention: { none: "one row per device key the owner tracks" },
9569
- adoptsFrom: PA_PACKAGE_BACKGROUND
9558
+ retention: { none: "one row per device key the owner tracks" }
9570
9559
  },
9571
9560
  "stationary-evidence": {
9572
9561
  schema: DurableLedgerBodySchema,
@@ -9574,8 +9563,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9574
9563
  writeTrigger: "stationary evidence row written on the registry sweep",
9575
9564
  device: "required",
9576
9565
  at: "none",
9577
- retention: { none: "owner sweep drops idle evidence; maxRowsPerDevice in kind metadata" },
9578
- adoptsFrom: PA_STATIONARY_EVIDENCE
9566
+ retention: { none: "owner sweep drops idle evidence; maxRowsPerDevice in kind metadata" }
9579
9567
  },
9580
9568
  "stationary-objects": {
9581
9569
  schema: DurableLedgerBodySchema,
@@ -9583,8 +9571,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9583
9571
  writeTrigger: "parked object registry upsert or flush on the sweep interval",
9584
9572
  device: "required",
9585
9573
  at: "none",
9586
- retention: { none: "rows drop when the object moves or TTL expires" },
9587
- adoptsFrom: PA_STATIONARY_OBJECTS
9574
+ retention: { none: "rows drop when the object moves or TTL expires" }
9588
9575
  },
9589
9576
  "scene-latch": {
9590
9577
  schema: DurableLedgerBodySchema,
@@ -9592,8 +9579,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9592
9579
  writeTrigger: "scene monitor latch state write-through after a verdict",
9593
9580
  device: "required",
9594
9581
  at: "none",
9595
- retention: { none: "one row per (deviceId, monitorId) scene latch" },
9596
- adoptsFrom: PA_SCENE_LATCH
9582
+ retention: { none: "one row per (deviceId, monitorId) scene latch" }
9597
9583
  },
9598
9584
  "motion-events": {
9599
9585
  schema: MotionEventBodySchema,
@@ -9610,8 +9596,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9610
9596
  retention: {
9611
9597
  owner: "device-window",
9612
9598
  reason: "terminal age-keyed root swept with the device retention window (D61/D62)"
9613
- },
9614
- adoptsFrom: PA_MOTION_EVENTS
9599
+ }
9615
9600
  },
9616
9601
  "audio-events": {
9617
9602
  schema: AudioEventBodySchema,
@@ -9628,8 +9613,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9628
9613
  retention: {
9629
9614
  owner: "device-window",
9630
9615
  reason: "terminal age-keyed root on the device window, same as motion-events"
9631
- },
9632
- adoptsFrom: PA_AUDIO_EVENTS
9616
+ }
9633
9617
  },
9634
9618
  "sensor-events": {
9635
9619
  schema: SensorEventBodySchema,
@@ -9649,8 +9633,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9649
9633
  retention: {
9650
9634
  owner: "device-window",
9651
9635
  reason: "terminal age-keyed root on the camera retention window (D61)"
9652
- },
9653
- adoptsFrom: PA_SENSOR_EVENTS
9636
+ }
9654
9637
  },
9655
9638
  faces: {
9656
9639
  schema: FaceLedgerBodySchema,
@@ -9677,8 +9660,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9677
9660
  fields: ["trackId"]
9678
9661
  }
9679
9662
  ],
9680
- retention: { none: "track-owned (D61): rows leave with their track; enrolled faces exempt from capacity sweeps" },
9681
- adoptsFrom: PA_FACES
9663
+ retention: { none: "track-owned (D61): rows leave with their track; enrolled faces exempt from capacity sweeps" }
9682
9664
  },
9683
9665
  identities: {
9684
9666
  schema: IdentityConfigBodySchema,
@@ -9692,8 +9674,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9692
9674
  name: "name",
9693
9675
  fields: ["name"]
9694
9676
  }],
9695
- retention: { none: "operator delete only — losing the gallery un-enrols every person" },
9696
- adoptsFrom: PA_IDENTITIES
9677
+ retention: { none: "operator delete only — losing the gallery un-enrols every person" }
9697
9678
  },
9698
9679
  "identity-samples": {
9699
9680
  schema: IdentitySampleLedgerBodySchema,
@@ -9707,7 +9688,6 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9707
9688
  fields: ["identityId", "addedAt"]
9708
9689
  }],
9709
9690
  retention: { none: "enrollment exempt — rows leave only on removeSample or deleteIdentity" },
9710
- adoptsFrom: PA_IDENTITY_SAMPLES,
9711
9691
  transactFamily: IDENTITY_GALLERY
9712
9692
  },
9713
9693
  vehicles: {
@@ -9722,8 +9702,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9722
9702
  name: "name",
9723
9703
  fields: ["name"]
9724
9704
  }],
9725
- retention: { none: "operator delete only — losing the gallery un-enrols every vehicle" },
9726
- adoptsFrom: PA_VEHICLES
9705
+ retention: { none: "operator delete only — losing the gallery un-enrols every vehicle" }
9727
9706
  },
9728
9707
  "vehicle-samples": {
9729
9708
  schema: VehicleSampleLedgerBodySchema,
@@ -9737,7 +9716,6 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9737
9716
  fields: ["vehicleId", "addedAt"]
9738
9717
  }],
9739
9718
  retention: { none: "enrollment exempt — rows leave only on removeSample or deleteVehicle" },
9740
- adoptsFrom: PA_VEHICLE_SAMPLES,
9741
9719
  transactFamily: VEHICLE_GALLERY
9742
9720
  },
9743
9721
  plates: {
@@ -9761,8 +9739,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9761
9739
  fields: ["recognizedVehicleId", "timestamp"]
9762
9740
  }
9763
9741
  ],
9764
- retention: { none: "track-owned (D61): rows leave with their track; corrected and enrolled reads exempt" },
9765
- adoptsFrom: PA_PLATES
9742
+ retention: { none: "track-owned (D61): rows leave with their track; corrected and enrolled reads exempt" }
9766
9743
  },
9767
9744
  "track-aliases": {
9768
9745
  schema: PaEventsLedgerBodySchema,
@@ -9778,8 +9755,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9778
9755
  name: "device",
9779
9756
  fields: ["deviceId"]
9780
9757
  }],
9781
- retention: { none: "track-owned via survivor `trackId`; widens retention cascade (D683)" },
9782
- adoptsFrom: PA_TRACK_ALIASES
9758
+ retention: { none: "track-owned via survivor `trackId`; widens retention cascade (D683)" }
9783
9759
  },
9784
9760
  "track-purity": {
9785
9761
  schema: PaEventsLedgerBodySchema,
@@ -9795,8 +9771,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9795
9771
  name: "updated",
9796
9772
  fields: ["updatedAt"]
9797
9773
  }],
9798
- retention: { none: "row-count ceiling MAX_TRACK_PURITIES in application code (D681)" },
9799
- adoptsFrom: PA_TRACK_PURITY
9774
+ retention: { none: "row-count ceiling MAX_TRACK_PURITIES in application code (D681)" }
9800
9775
  },
9801
9776
  "track-relations": {
9802
9777
  schema: PaEventsLedgerBodySchema,
@@ -9812,8 +9787,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9812
9787
  name: "updated",
9813
9788
  fields: ["updatedAt"]
9814
9789
  }],
9815
- retention: { none: "row-count ceiling MAX_TRACK_RELATIONS in application code (D681)" },
9816
- adoptsFrom: PA_TRACK_RELATIONS
9790
+ retention: { none: "row-count ceiling MAX_TRACK_RELATIONS in application code (D681)" }
9817
9791
  },
9818
9792
  "tracking-tapes": {
9819
9793
  schema: PaEventsLedgerBodySchema,
@@ -9826,8 +9800,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9826
9800
  name: "device_created",
9827
9801
  fields: ["deviceId", "createdAt"]
9828
9802
  }],
9829
- retention: { none: "promotion budget MAX_PROMOTED_TAPES — refused, never evicted by age" },
9830
- adoptsFrom: PA_TRACKING_TAPES
9803
+ retention: { none: "promotion budget MAX_PROMOTED_TAPES — refused, never evicted by age" }
9831
9804
  },
9832
9805
  "birth-decision-ledger": {
9833
9806
  schema: PaEventsLedgerBodySchema,
@@ -9843,8 +9816,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9843
9816
  name: "device_at",
9844
9817
  fields: ["deviceId", "at"]
9845
9818
  }],
9846
- retention: { none: "row-count ceiling MAX_BIRTH_DECISION_RECORDS in application code" },
9847
- adoptsFrom: PA_BIRTH_DECISION_LEDGER
9819
+ retention: { none: "row-count ceiling MAX_BIRTH_DECISION_RECORDS in application code" }
9848
9820
  },
9849
9821
  "debug-note-archive": {
9850
9822
  schema: PaEventsLedgerBodySchema,
@@ -9860,8 +9832,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9860
9832
  name: "device_archived",
9861
9833
  fields: ["deviceId", "archivedAt"]
9862
9834
  }],
9863
- retention: { none: "row-count ceiling MAX_ARCHIVED_DEBUG_NOTES in application code" },
9864
- adoptsFrom: PA_DEBUG_NOTE_ARCHIVE
9835
+ retention: { none: "row-count ceiling MAX_ARCHIVED_DEBUG_NOTES in application code" }
9865
9836
  },
9866
9837
  "ops-log": {
9867
9838
  schema: PaEventsLedgerBodySchema,
@@ -9880,8 +9851,7 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9880
9851
  retention: {
9881
9852
  ttlMs: 720 * 60 * 60 * 1e3,
9882
9853
  from: "at"
9883
- },
9884
- adoptsFrom: PA_OPS_LOG
9854
+ }
9885
9855
  },
9886
9856
  "retrain-frames": {
9887
9857
  schema: PaEventsLedgerBodySchema,
@@ -9898,7 +9868,6 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9898
9868
  fields: ["deviceId", "complete"]
9899
9869
  }],
9900
9870
  retention: { none: "operator curation only; blobs on artifacts tenant (D781)" },
9901
- adoptsFrom: PA_RETRAIN_FRAMES,
9902
9871
  transactFamily: RETRAIN
9903
9872
  },
9904
9873
  "retrain-annotations": {
@@ -9923,7 +9892,6 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9923
9892
  }
9924
9893
  ],
9925
9894
  retention: { none: "leaves with frame deselect / operator delete" },
9926
- adoptsFrom: PA_RETRAIN_ANNOTATIONS,
9927
9895
  transactFamily: RETRAIN
9928
9896
  },
9929
9897
  "retrain-collections": {
@@ -9942,7 +9910,6 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9942
9910
  fields: ["createdAt"]
9943
9911
  }],
9944
9912
  retention: { none: "deleted with operator deleteCollection" },
9945
- adoptsFrom: PA_RETRAIN_COLLECTIONS,
9946
9913
  transactFamily: RETRAIN
9947
9914
  },
9948
9915
  "retrain-collection-frames": {
@@ -9960,7 +9927,6 @@ var pipelineAnalyticsRecordKinds = defineRecordKinds({
9960
9927
  fields: ["frameId"]
9961
9928
  }],
9962
9929
  retention: { none: "membership only; frame pixels live in retrain-frames" },
9963
- adoptsFrom: PA_RETRAIN_COLLECTION_FRAMES,
9964
9930
  transactFamily: RETRAIN
9965
9931
  }
9966
9932
  });
@@ -38444,22 +38410,8 @@ async function migrateLegacyRuleActions(actions, createSequence) {
38444
38410
  * The notification-center module is hosted inside the pipeline-analytics addon.
38445
38411
  * That addon declares no `execution.group`, so the UDS owner stamp is the addon
38446
38412
  * id: `pipeline-analytics`. Declared hub-only (agents have no `ctx.records`).
38447
- * One deploy covers all 7 kinds; adoption is kind-by-kind.
38448
- */
38449
- /** Legacy collection for the text-catalog document. */
38450
- var NC_TEXTS_COLLECTION$1 = "notification-center:texts";
38451
- /** Legacy collection for shared action sequences. */
38452
- var NC_SEQUENCES_COLLECTION$1 = "notification-center:sequences";
38453
- /** Legacy collection for per-rule AI sections. */
38454
- var NC_RULE_AI_COLLECTION$1 = "notification-center:rule-ai";
38455
- /** Legacy collection for calendar-events rules. */
38456
- var NC_CALENDAR_EVENTS_RULES_COLLECTION$1 = "notification-center:calendar-events-rules";
38457
- /** Legacy collection for multi-camera digest rules. */
38458
- var NC_SUMMARY_RULES_COLLECTION$1 = "notification-center:summary-rules";
38459
- /** Legacy collection for timelapse rules. */
38460
- var NC_TIMELAPSE_RULES_COLLECTION$1 = "notification-center:timelapse-rules";
38461
- /** Legacy collection for notification rules. */
38462
- var NC_RULES_COLLECTION$1 = "notification-center:rules";
38413
+ * One deploy covers all 7 kinds.
38414
+ */
38463
38415
  /**
38464
38416
  * The hub language and operator-authored per-key overrides.
38465
38417
  * One row, id `texts`. Losing it degrades to the shipped English catalog.
@@ -38501,8 +38453,7 @@ var ncRecordKinds = defineRecordKinds({
38501
38453
  writeTrigger: "an operator changes the hub language (setLanguage) or replaces the per-key override set (setOverrides)",
38502
38454
  device: "none",
38503
38455
  at: "none",
38504
- retention: { none: "one row (id `texts`); losing it costs the chosen language and household wording, never a notification — every read degrades to the shipped English catalog" },
38505
- adoptsFrom: NC_TEXTS_COLLECTION$1
38456
+ retention: { none: "one row (id `texts`); losing it costs the chosen language and household wording, never a notification — every read degrades to the shipped English catalog" }
38506
38457
  },
38507
38458
  /**
38508
38459
  * Shared action sequences — named, ordered runs of steps with their own throttle.
@@ -38514,8 +38465,7 @@ var ncRecordKinds = defineRecordKinds({
38514
38465
  writeTrigger: "an admin creates/edits/deletes a shared sequence via notificationRules.createSequence / updateSequence / deleteSequence, or the one-shot boot migration that materialises legacy inline sequences",
38515
38466
  device: "none",
38516
38467
  at: "none",
38517
- retention: { none: "a row goes only when an admin deletes it; bounded by the sequence set a human is willing to author" },
38518
- adoptsFrom: NC_SEQUENCES_COLLECTION$1
38468
+ retention: { none: "a row goes only when an admin deletes it; bounded by the sequence set a human is willing to author" }
38519
38469
  },
38520
38470
  /**
38521
38471
  * Per-rule AI section: whether and how a rule narrates itself.
@@ -38527,8 +38477,7 @@ var ncRecordKinds = defineRecordKinds({
38527
38477
  writeTrigger: "an operator switches the AI section of a notification rule on or off, or edits its prompt / word cap / language",
38528
38478
  device: "none",
38529
38479
  at: "none",
38530
- retention: { none: "a row goes when the operator clears the section or deletes the rule; bounded by the rule set a human is willing to author" },
38531
- adoptsFrom: NC_RULE_AI_COLLECTION$1
38480
+ retention: { none: "a row goes when the operator clears the section or deletes the rule; bounded by the rule set a human is willing to author" }
38532
38481
  },
38533
38482
  /**
38534
38483
  * Calendar-events rules. One row per rule, id = rule UUID.
@@ -38543,8 +38492,7 @@ var ncRecordKinds = defineRecordKinds({
38543
38492
  name: "enabled",
38544
38493
  fields: ["enabled"]
38545
38494
  }],
38546
- retention: { none: "a row goes only when the operator deletes the rule; bounded by the rule set a human is willing to author" },
38547
- adoptsFrom: NC_CALENDAR_EVENTS_RULES_COLLECTION$1
38495
+ retention: { none: "a row goes only when the operator deletes the rule; bounded by the rule set a human is willing to author" }
38548
38496
  },
38549
38497
  /**
38550
38498
  * Multi-camera digest rules. One row per rule, id = rule UUID.
@@ -38559,8 +38507,7 @@ var ncRecordKinds = defineRecordKinds({
38559
38507
  name: "enabled",
38560
38508
  fields: ["enabled"]
38561
38509
  }],
38562
- retention: { none: "a row goes only when the operator deletes the rule; bounded by the rule set a human is willing to author" },
38563
- adoptsFrom: NC_SUMMARY_RULES_COLLECTION$1
38510
+ retention: { none: "a row goes only when the operator deletes the rule; bounded by the rule set a human is willing to author" }
38564
38511
  },
38565
38512
  /**
38566
38513
  * Timelapse rules. One row per rule, id = rule UUID.
@@ -38576,8 +38523,7 @@ var ncRecordKinds = defineRecordKinds({
38576
38523
  name: "enabled",
38577
38524
  fields: ["enabled"]
38578
38525
  }],
38579
- retention: { none: "a row goes only when the operator deletes the rule; bounded by the rule set a human is willing to author" },
38580
- adoptsFrom: NC_TIMELAPSE_RULES_COLLECTION$1
38526
+ retention: { none: "a row goes only when the operator deletes the rule; bounded by the rule set a human is willing to author" }
38581
38527
  },
38582
38528
  /**
38583
38529
  * Notification rules — the main rule set. One row per rule, id = rule UUID.
@@ -38593,8 +38539,7 @@ var ncRecordKinds = defineRecordKinds({
38593
38539
  name: "delivery",
38594
38540
  fields: ["delivery"]
38595
38541
  }],
38596
- retention: { none: "a row goes only when the operator deletes the rule; bounded by the rule set a human is willing to author" },
38597
- adoptsFrom: NC_RULES_COLLECTION$1
38542
+ retention: { none: "a row goes only when the operator deletes the rule; bounded by the rule set a human is willing to author" }
38598
38543
  }
38599
38544
  });
38600
38545
  //#endregion