@camstack/types 1.2.128 → 1.2.130

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/dist/addon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_event_category = require("./event-category-BaEgqJNv.js");
3
- const require_sleep = require("./sleep-C3AniWy-.js");
3
+ const require_sleep = require("./sleep-DIg3xuEw.js");
4
4
  const require_err_msg = require("./err-msg-COpsHMw2.js");
5
5
  //#region src/generated/cap-input-defaults.ts
6
6
  /**
@@ -16,7 +16,7 @@ const require_err_msg = require("./err-msg-COpsHMw2.js");
16
16
  * Plain data, zero Zod: a forked runner must not import the schema barrel
17
17
  * (~144MB RSS per runner — D28).
18
18
  *
19
- * Coverage: 24 caps, 54 methods with defaults.
19
+ * Coverage: 24 caps, 55 methods with defaults.
20
20
  */
21
21
  var CAP_INPUT_DEFAULTS = Object.freeze({
22
22
  "addons": { "getLogs": { "limit": 100 } },
@@ -126,6 +126,7 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
126
126
  "pipeline-analytics": {
127
127
  "getAudioEvents": { "limit": 1e3 },
128
128
  "getKeyEvents": { "limit": 50 },
129
+ "getKeyEventsBatch": { "limit": 50 },
129
130
  "getMotionEvents": { "limit": 1e3 },
130
131
  "getObjectEvents": { "limit": 1e3 },
131
132
  "getSensorEvents": { "limit": 1e3 },
package/dist/addon.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as EventCategory } from "./event-category-BZL-fdNj.mjs";
2
- import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-ot6dTHCA.mjs";
2
+ import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-DcA-CgqX.mjs";
3
3
  import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
4
4
  //#region src/generated/cap-input-defaults.ts
5
5
  /**
@@ -15,7 +15,7 @@ import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
15
15
  * Plain data, zero Zod: a forked runner must not import the schema barrel
16
16
  * (~144MB RSS per runner — D28).
17
17
  *
18
- * Coverage: 24 caps, 54 methods with defaults.
18
+ * Coverage: 24 caps, 55 methods with defaults.
19
19
  */
20
20
  var CAP_INPUT_DEFAULTS = Object.freeze({
21
21
  "addons": { "getLogs": { "limit": 100 } },
@@ -125,6 +125,7 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
125
125
  "pipeline-analytics": {
126
126
  "getAudioEvents": { "limit": 1e3 },
127
127
  "getKeyEvents": { "limit": 50 },
128
+ "getKeyEventsBatch": { "limit": 50 },
128
129
  "getMotionEvents": { "limit": 1e3 },
129
130
  "getObjectEvents": { "limit": 1e3 },
130
131
  "getSensorEvents": { "limit": 1e3 },
@@ -82,7 +82,7 @@ export { NetworkAccessStatusSchema, NetworkEndpointSchema, networkAccessCapabili
82
82
  export { type Attachment, type AttachmentMediaType, AttachmentMediaTypeSchema, AttachmentSchema, type DiscoveredTarget, DiscoveredTargetSchema, type INotificationOutputProvider, type NotificationAction, type NotificationActionIcon, NotificationActionIconSchema, NotificationActionSchema, type NotificationFormat, NotificationFormatSchema, NotificationSchema, notificationOutputCapability, type RenderedAs, RenderedAsSchema, type SendResult, SendResultSchema, type Target, type TargetKind, type TargetKindCaps, TargetKindCapsSchema, type TargetKindLevel, TargetKindLevelSchema, TargetKindSchema, TargetSchema, type TestResult, TestResultSchema, } from './notification-output.cap.js';
83
83
  export { type INotificationRulesProvider, NC_ALARM_SYSTEM_EVENT_KINDS, NC_AUDIO_DBFS_FLOOR, NC_AUTHORABLE_SYSTEM_EVENT_KINDS, NC_CONDITION_CATALOG, NC_CONFIRM_DEFAULT_MAX_IMAGE_PX, NC_CONFIRM_DEFAULT_TIMEOUT_MS, NC_CONFIRM_MAX_TIMEOUT_MS, NC_CONFIRM_MIN_TIMEOUT_MS, NC_DEFAULT_SNOOZE_MINUTES, NC_HISTORY_LIMIT_DEFAULT, NC_HISTORY_LIMIT_MAX, NC_MAX_PER_TRACK_IMMEDIATE, NC_SNOOZE_MAX_MINUTES, type NcAlarmConfig, NcAlarmConfigSchema, type NcAlarmModeCoverage, NcAlarmModeCoverageSchema, type NcAlarmSettings, type NcAlarmSettingsPatch, NcAlarmSettingsPatchSchema, NcAlarmSettingsSchema, type NcAlarmSkippedDevice, NcAlarmSkippedDeviceSchema, type NcAlarmSkipReason, NcAlarmSkipReasonSchema, type NcAudioCondition, NcAudioConditionSchema, type NcConditionDescriptor, NcConditionDescriptorSchema, type NcConditions, NcConditionsSchema, type NcConfirm, type NcConfirmExpect, NcConfirmExpectSchema, NcConfirmSchema, type NcCrossing, NcCrossingSchema, type NcDelivery, NcDeliverySchema, type NcDeviceStateCondition, NcDeviceStateConditionSchema, type NcHistoryEntry, NcHistoryEntrySchema, type NcHistoryFilter, NcHistoryFilterSchema, type NcHistoryRecordKind, NcHistoryRecordKindSchema, type NcHistoryStatus, NcHistoryStatusSchema, type NcHistorySubject, NcHistorySubjectSchema, type NcMediaFrame, NcMediaFrameSchema, type NcMediaPolicy, NcMediaPolicySchema, type NcOccupancyCondition, NcOccupancyConditionSchema, type NcPlateMatcher, NcPlateMatcherSchema, type NcRule, type NcRuleAction, NcRuleActionSchema, type NcRuleActionSequence, NcRuleActionSequenceSchema, type NcRuleActions, NcRuleActionsSchema, type NcRuleInput, NcRuleInputSchema, type NcRuleNotificationButton, NcRuleNotificationButtonSchema, type NcRulePatch, NcRulePatchSchema, NcRuleSchema, type NcRuleTarget, NcRuleTargetSchema, type NcSceneCondition, NcSceneConditionSchema, type NcSchedule, NcScheduleSchema, type NcScheduleWindow, NcScheduleWindowSchema, type NcSnooze, type NcSnoozeInput, NcSnoozeInputSchema, NcSnoozeSchema, type NcSnoozeScope, NcSnoozeScopeSchema, type NcSnoozeSuppressed, NcSnoozeSuppressedSchema, type NcSystemEventCondition, NcSystemEventConditionSchema, type NcSystemEventKind, NcSystemEventKindSchema, type NcTestResult, NcTestResultSchema, type NcThrottle, type NcThrottleGranularity, NcThrottleGranularitySchema, NcThrottleSchema, type NcZoneCondition, NcZoneConditionSchema, notificationRulesCapability, } from './notification-rules.cap.js';
84
84
  export { type IOauthIntegrationProvider, type OauthIntegrationDescriptor, OauthIntegrationDescriptorSchema, oauthIntegrationCapability, } from './oauth-integration.cap.js';
85
- export { type AnalyticsGroupDetail, AnalyticsGroupDetailSchema, type AnalyticsGroupMember, AnalyticsGroupMemberSchema, type AnalyticsGroupRecord, AnalyticsGroupRecordSchema, type AudioEvent, AudioEventSchema, type DetectionSource, DetectionSourceSchema, type EventKind, type EventKindCategory, EventKindCategorySchema, type EventKindDescriptor, EventKindDescriptorSchema, type EventKindIcon, EventKindIconSchema, EventKindSchema, type EventKindsForDevice, EventKindsForDeviceSchema, type EventPruneCounts, type EventStoreDeviceFootprint, type EventStoreFootprint, type IPipelineAnalyticsProvider, type KeyEvent, KeyEventSchema, type LabelAttribution, LabelAttributionSchema, type LabelTier, LabelTierSchema, type ListGroupsPage, ListGroupsPageSchema, type ListGroupsQuery, ListGroupsQueryInput, type MediaFile, type MediaFileBytes, type MediaFileInfo, MediaFileInfoSchema, type MediaFileKind, type MediaFileRef, MediaFileRefSchema, MediaFileSchema, type MotionEvent, MotionEventSchema, type ObjectEvent, ObjectEventSchema, pipelineAnalyticsCapability, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type RetrainAnnotation, type RetrainAnnotationDraft, RetrainAnnotationDraftSchema, RetrainAnnotationKindSchema, RetrainAnnotationSchema, RetrainAnnotationSourceSchema, type RetrainAssistResult, RetrainAssistResultSchema, RetrainAssistSubjectSchema, RetrainCopyRefusalSchema, type RetrainFrame, type RetrainFrameCandidate, RetrainFrameCandidateSchema, type RetrainFrameList, RetrainFrameListSchema, RetrainFrameSchema, type RetrainFrameSelection, RetrainFrameSelectionSchema, type RetrainMacroClass, RetrainMacroClassSchema, type RetrainStatus, RetrainStatusSchema, type RetrainTrack, RetrainTrackSchema, type RetrainTransitionResult, RetrainTransitionResultSchema, type ScoredObjectEvent, ScoredObjectEventSchema, type SensorEvent, SensorEventSchema, type Track, type TrackCascadeCounts, TrackCascadeCountsSchema, type TrackEnvelope, TrackEnvelopeSchema, TrackedDetectionSchema, type TrackFlags, type TrackFlagsPatch, TrackFlagsPatchSchema, TrackFlagsSchema, type TrackProjection, TrackProjectionSchema, TrackSchema, type TrackSource, TrackSourceSchema, type TrackState, TrackStateSchema, type TrackZoneFilter, TrackZoneFilterSchema, type TrainingExportDeviceTotals, TrainingExportDeviceTotalsSchema, type TrainingExportSummary, TrainingExportSummarySchema, type ZoneCrossing, type ZoneCrossingDirection, ZoneCrossingDirectionSchema, ZoneCrossingSchema, } from './pipeline-analytics.cap.js';
85
+ export { type AnalyticsGroupDetail, AnalyticsGroupDetailSchema, type AnalyticsGroupMember, AnalyticsGroupMemberSchema, type AnalyticsGroupRecord, AnalyticsGroupRecordSchema, type AudioEvent, AudioEventSchema, type DetectionSource, DetectionSourceSchema, type EventKind, type EventKindCategory, EventKindCategorySchema, type EventKindDescriptor, EventKindDescriptorSchema, type EventKindIcon, EventKindIconSchema, EventKindSchema, type EventKindsForDevice, EventKindsForDeviceSchema, type EventMediaKindBreakdown, type EventMediaKindFootprint, type EventPruneCounts, type EventStoreDeviceFootprint, type EventStoreFootprint, type IPipelineAnalyticsProvider, type KeyEvent, KeyEventSchema, type KeyEventsForDevice, type LabelAttribution, LabelAttributionSchema, type LabelTier, LabelTierSchema, type ListGroupsPage, ListGroupsPageSchema, type ListGroupsQuery, ListGroupsQueryInput, type MediaFile, type MediaFileBytes, type MediaFileInfo, MediaFileInfoSchema, type MediaFileKind, MediaFileKindEnum, type MediaFileRef, MediaFileRefSchema, MediaFileSchema, type MotionEvent, MotionEventSchema, type ObjectEvent, ObjectEventSchema, pipelineAnalyticsCapability, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type RetrainAnnotation, type RetrainAnnotationDraft, RetrainAnnotationDraftSchema, RetrainAnnotationKindSchema, RetrainAnnotationSchema, RetrainAnnotationSourceSchema, type RetrainAssistResult, RetrainAssistResultSchema, RetrainAssistSubjectSchema, RetrainCopyRefusalSchema, type RetrainFrame, type RetrainFrameCandidate, RetrainFrameCandidateSchema, type RetrainFrameList, RetrainFrameListSchema, RetrainFrameSchema, type RetrainFrameSelection, RetrainFrameSelectionSchema, type RetrainMacroClass, RetrainMacroClassSchema, type RetrainStatus, RetrainStatusSchema, type RetrainTrack, RetrainTrackSchema, type RetrainTransitionResult, RetrainTransitionResultSchema, type ScoredObjectEvent, ScoredObjectEventSchema, type SensorEvent, SensorEventSchema, type Track, type TrackCascadeCounts, TrackCascadeCountsSchema, type TrackEnvelope, TrackEnvelopeSchema, TrackedDetectionSchema, type TrackFlags, type TrackFlagsPatch, TrackFlagsPatchSchema, TrackFlagsSchema, type TrackProjection, TrackProjectionSchema, TrackSchema, type TrackSource, TrackSourceSchema, type TrackState, TrackStateSchema, type TrackZoneFilter, TrackZoneFilterSchema, type TrainingExportDeviceTotals, TrainingExportDeviceTotalsSchema, type TrainingExportSummary, TrainingExportSummarySchema, type ZoneCrossing, type ZoneCrossingDirection, ZoneCrossingDirectionSchema, ZoneCrossingSchema, } from './pipeline-analytics.cap.js';
86
86
  export type { NativeCropRef, PipelineStepInputOutput, PipelineValidationIssue, PipelineValidationResult, } from './pipeline-executor.cap.js';
87
87
  export { ModelSubstitutionSchema, NativeCropRefSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, pipelineExecutorCapability, } from './pipeline-executor.cap.js';
88
88
  export type { CameraAssignmentStatus, CameraAudioStatus, CameraBrokerProfile, CameraBrokerStatus, CameraDecoderShm, CameraDecoderStatus, CameraDetectionPhase, CameraDetectionProvisioning, CameraDetectionProvisioningState, CameraDetectionStatus, CameraMotionStatus, CameraRecordingMode, CameraRecordingStatus, CameraSourceStatus, CameraSourceStream, CameraStatus, CameraStatusDegradation, CameraStatusDegradationReason, CameraStatusStage, DiskReconcileJob, InferenceDeviceExclusionReason, IngestOwner, NodeInferenceDevice, NodeInferenceDevices, } from './pipeline-orchestrator.cap.js';
@@ -187,7 +187,7 @@ export { type IPtzAutotrackProvider, type PtzAutotrackRuntimeState, PtzAutotrack
187
187
  export { type IRebootProvider, rebootCapability } from './reboot.cap.js';
188
188
  export { type IRecordingProvider, type LocateSegmentResult, LocateSegmentResultSchema, type ReadGopBytesResult, ReadGopBytesResultSchema, type ReadSegmentBytesResult, ReadSegmentBytesResultSchema, type ReadWindowBytesResult, ReadWindowBytesResultSchema, type RecordingAvailability, RecordingAvailabilitySchema, type RecordingDays, RecordingDaysSchema, type RecordingDeviceUsage, RecordingDeviceUsageSchema, type RecordingLocationUsage, RecordingLocationUsageSchema, type RecordingManifest, RecordingManifestSchema, RecordingRangeSchema, type RecordingRebalanceInput, RecordingRebalanceInputSchema, type RecordingRebalanceMove, RecordingRebalanceMoveSchema, type RecordingRebalancePlan, RecordingRebalancePlanSchema, type RecordingRebalanceSkip, type RecordingRebalanceSkipReason, RecordingRebalanceSkipReasonSchema, RecordingRebalanceSkipSchema, type RecordingStatus, RecordingStatusSchema, type RecordingStorageUsage, RecordingStorageUsageSchema, recordingCapability, } from './recording.cap.js';
189
189
  export { EXPORT_DENSE_MAX_RANGES, type ExportBytes, ExportBytesSchema, type ExportDense, type ExportDenseRange, ExportDenseRangeSchema, ExportDenseSchema, type ExportDownload, ExportDownloadSchema, type ExportOptions, ExportOptionsSchema, type ExportRecord, ExportRecordSchema, ExportSpeedSchema, type ExportState, ExportStateSchema, ExportTimelapseSchema, type IRecordingExportProvider, RECORDING_EXPORT_MAX_READ_BYTES, recordingExportCapability, } from './recording-export.cap.js';
190
- export { type ISceneMonitorProvider, SCENE_CONDITIONS, SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, SCENE_DEFAULT_ANCHOR_THRESHOLD, SCENE_DEFAULT_CHECK_INTERVAL_SEC, SCENE_DEFAULT_OBSERVATION_SPACING_SEC, SCENE_DEFAULT_QUIET_SECONDS, SCENE_DEFAULT_UNCOVERED_POLICY, SCENE_DIVERGED, SCENE_RESET_RECAPTURES, type SceneCheck, SceneCheckSchema, type SceneCondition, SceneConditionSchema, type SceneConfirm, SceneConfirmSchema, type SceneMonitor, SceneMonitorSchema, type SceneMonitorState, SceneMonitorStateSchema, type SceneMonitorStatus, SceneMonitorStatusSchema, type SceneReference, SceneReferenceSchema, type SceneUnavailable, SceneUnavailableSchema, type SceneUncoveredPolicy, SceneUncoveredPolicySchema, type SceneVerdict, SceneVerdictSchema, sceneMonitorCapability, } from './scene-monitor.cap.js';
190
+ export { type ISceneMonitorProvider, SCENE_CONDITIONS, SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX, SCENE_CONFIRM_DEFAULT_TIMEOUT_MS, SCENE_DEFAULT_ANCHOR_THRESHOLD, SCENE_DEFAULT_CHECK_INTERVAL_SEC, SCENE_DEFAULT_OBSERVATION_SPACING_SEC, SCENE_DEFAULT_QUIET_SECONDS, SCENE_DEFAULT_UNCOVERED_POLICY, SCENE_DIVERGED, SCENE_RESET_RECAPTURES, type SceneCheck, SceneCheckSchema, type SceneCondition, SceneConditionSchema, type SceneConfirm, SceneConfirmSchema, type SceneMonitor, SceneMonitorSchema, type SceneMonitorState, SceneMonitorStateSchema, type SceneMonitorStatus, type SceneMonitorStatusForDevice, SceneMonitorStatusForDeviceSchema, SceneMonitorStatusSchema, type SceneReference, SceneReferenceSchema, type SceneUnavailable, SceneUnavailableSchema, type SceneUncoveredPolicy, SceneUncoveredPolicySchema, type SceneVerdict, SceneVerdictSchema, sceneMonitorCapability, } from './scene-monitor.cap.js';
191
191
  export { type ZoneRule, type ZoneRuleMode, ZoneRuleModeEnum, ZoneRuleSchema, type ZoneRules, ZoneRulesArraySchema, } from './schemas/zone-rule.js';
192
192
  export { type IScriptRunnerProvider, type ScriptRunnerStatus, ScriptRunnerStatusSchema, scriptRunnerCapability, } from './script-runner.cap.js';
193
193
  export { type ISmokeProvider, type SmokeStatus, SmokeStatusSchema, smokeCapability, } from './smoke.cap.js';
@@ -206,7 +206,7 @@ export { type IValveProvider, type ValveState, ValveStateSchema, type ValveStatu
206
206
  export { type IVibrationProvider, type VibrationStatus, VibrationStatusSchema, vibrationCapability, } from './vibration.cap.js';
207
207
  export { type IWaterHeaterProvider, type WaterHeaterStatus, WaterHeaterStatusSchema, waterHeaterCapability, } from './water-heater.cap.js';
208
208
  export { type IWeatherProvider, type WeatherStatus, WeatherStatusSchema, weatherCapability, } from './weather.cap.js';
209
- export { type CameraOccupancySnapshot, type HistoryPoint, HistoryPointSchema, type HistoryResolution, HistoryResolutionEnum, type IZoneAnalyticsProvider, type PerScopeBreakdown, PerScopeBreakdownSchema, type StationaryObject, StationaryObjectSchema, type ZoneScopeBreakdown, ZoneScopeBreakdownSchema, zoneAnalyticsCapability, } from './zone-analytics.cap.js';
209
+ export { type CameraOccupancySnapshot, type CameraOccupancySnapshotForDevice, CameraOccupancySnapshotForDeviceSchema, type HistoryPoint, HistoryPointSchema, type HistoryResolution, HistoryResolutionEnum, type IZoneAnalyticsProvider, type PerScopeBreakdown, PerScopeBreakdownSchema, type StationaryObject, StationaryObjectSchema, type ZoneScopeBreakdown, ZoneScopeBreakdownSchema, zoneAnalyticsCapability, } from './zone-analytics.cap.js';
210
210
  export { type IZoneRulesProvider, type ZoneRuleStage, ZoneRuleStageEnum, zoneRulesCapability, } from './zone-rules.cap.js';
211
211
  export { type IZonesProvider, type PolygonPoint, PolygonPointSchema, type Zone, type ZoneKind, ZoneKindEnum, ZoneSchema, zonesCapability, } from './zones.cap.js';
212
212
  import type { IReadinessRegistry } from '../interfaces/readiness.js';
@@ -1302,6 +1302,53 @@ declare const KeyEventSchema: z.ZodObject<{
1302
1302
  className: z.ZodString;
1303
1303
  }, z.core.$strip>;
1304
1304
  export type KeyEvent = z.infer<typeof KeyEventSchema>;
1305
+ /**
1306
+ * One camera's key events in a batch answer.
1307
+ *
1308
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
1309
+ * error rather than throwing, so a camera whose store read failed and one with
1310
+ * no events in the window were ALREADY indistinguishable per camera — the
1311
+ * batch does not make that worse, and the row keeps the deviceId the single
1312
+ * method's output never carried (the caller used to stamp it from the fan-out
1313
+ * key, which only worked because there was one query per camera).
1314
+ */
1315
+ declare const KeyEventsForDeviceSchema: z.ZodObject<{
1316
+ deviceId: z.ZodNumber;
1317
+ events: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1318
+ retrainStatus: z.ZodOptional<z.ZodEnum<{
1319
+ none: "none";
1320
+ staging: "staging";
1321
+ trained: "trained";
1322
+ }>>;
1323
+ markForTrain: z.ZodOptional<z.ZodBoolean>;
1324
+ debug: z.ZodOptional<z.ZodBoolean>;
1325
+ favourited: z.ZodOptional<z.ZodBoolean>;
1326
+ importance: z.ZodNumber;
1327
+ bestEventId: z.ZodString;
1328
+ windowMs: z.ZodOptional<z.ZodNumber>;
1329
+ label: z.ZodOptional<z.ZodString>;
1330
+ labelScore: z.ZodOptional<z.ZodNumber>;
1331
+ labelMeta: z.ZodOptional<z.ZodObject<{
1332
+ stepId: z.ZodString;
1333
+ modelId: z.ZodOptional<z.ZodString>;
1334
+ decidedAt: z.ZodNumber;
1335
+ identityId: z.ZodOptional<z.ZodString>;
1336
+ }, z.core.$strip>>;
1337
+ subLabel: z.ZodOptional<z.ZodString>;
1338
+ subLabelScore: z.ZodOptional<z.ZodNumber>;
1339
+ subLabelMeta: z.ZodOptional<z.ZodObject<{
1340
+ stepId: z.ZodString;
1341
+ modelId: z.ZodOptional<z.ZodString>;
1342
+ decidedAt: z.ZodNumber;
1343
+ identityId: z.ZodOptional<z.ZodString>;
1344
+ }, z.core.$strip>>;
1345
+ id: z.ZodString;
1346
+ trackId: z.ZodString;
1347
+ timestamp: z.ZodNumber;
1348
+ className: z.ZodString;
1349
+ }, z.core.$strip>>>;
1350
+ }, z.core.$strip>;
1351
+ export type KeyEventsForDevice = z.infer<typeof KeyEventsForDeviceSchema>;
1305
1352
  declare const TrackedDetectionSchema: z.ZodObject<{
1306
1353
  trackId: z.ZodString;
1307
1354
  className: z.ZodString;
@@ -1416,6 +1463,75 @@ declare const EventStoreFootprintSchema: z.ZodObject<{
1416
1463
  }, z.core.$strip>>>;
1417
1464
  }, z.core.$strip>;
1418
1465
  export type EventStoreFootprint = z.infer<typeof EventStoreFootprintSchema>;
1466
+ /** Event-media footprint for one {@link MediaFileKind}. */
1467
+ declare const EventMediaKindFootprintSchema: z.ZodObject<{
1468
+ kind: z.ZodEnum<{
1469
+ crop: "crop";
1470
+ snapshot: "snapshot";
1471
+ keyFrame: "keyFrame";
1472
+ thumbnail: "thumbnail";
1473
+ firstFrame: "firstFrame";
1474
+ lastFrame: "lastFrame";
1475
+ fullFrame: "fullFrame";
1476
+ fullFrameBoxed: "fullFrameBoxed";
1477
+ faceCrop: "faceCrop";
1478
+ plateCrop: "plateCrop";
1479
+ keyFrameSmall: "keyFrameSmall";
1480
+ thumbnailSmall: "thumbnailSmall";
1481
+ }>;
1482
+ rows: z.ZodNumber;
1483
+ bytes: z.ZodNumber;
1484
+ }, z.core.$strip>;
1485
+ export type EventMediaKindFootprint = z.infer<typeof EventMediaKindFootprintSchema>;
1486
+ /**
1487
+ * The media footprint broken down by KIND — the axis a deletion decision
1488
+ * actually turns on.
1489
+ *
1490
+ * A byte total says how much there is; it cannot say what is safe to remove.
1491
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
1492
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
1493
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
1494
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
1495
+ * nothing else, so sizing a deletion means summing per kind.
1496
+ *
1497
+ * ## Why `unaccounted*` exists
1498
+ *
1499
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
1500
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
1501
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
1502
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
1503
+ * retired code path, or by a version that knew a kind this one does not) would
1504
+ * otherwise vanish from the total silently, and an operator would delete
1505
+ * against a denominator smaller than the disk.
1506
+ *
1507
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
1508
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
1509
+ */
1510
+ declare const EventMediaKindBreakdownSchema: z.ZodObject<{
1511
+ totalRows: z.ZodNumber;
1512
+ totalBytes: z.ZodNumber;
1513
+ kinds: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1514
+ kind: z.ZodEnum<{
1515
+ crop: "crop";
1516
+ snapshot: "snapshot";
1517
+ keyFrame: "keyFrame";
1518
+ thumbnail: "thumbnail";
1519
+ firstFrame: "firstFrame";
1520
+ lastFrame: "lastFrame";
1521
+ fullFrame: "fullFrame";
1522
+ fullFrameBoxed: "fullFrameBoxed";
1523
+ faceCrop: "faceCrop";
1524
+ plateCrop: "plateCrop";
1525
+ keyFrameSmall: "keyFrameSmall";
1526
+ thumbnailSmall: "thumbnailSmall";
1527
+ }>;
1528
+ rows: z.ZodNumber;
1529
+ bytes: z.ZodNumber;
1530
+ }, z.core.$strip>>>;
1531
+ unaccountedRows: z.ZodNumber;
1532
+ unaccountedBytes: z.ZodNumber;
1533
+ }, z.core.$strip>;
1534
+ export type EventMediaKindBreakdown = z.infer<typeof EventMediaKindBreakdownSchema>;
1419
1535
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
1420
1536
  declare const EventPruneCountsSchema: z.ZodObject<{
1421
1537
  motion: z.ZodNumber;
@@ -2246,6 +2362,63 @@ export declare const pipelineAnalyticsCapability: {
2246
2362
  timestamp: z.ZodNumber;
2247
2363
  className: z.ZodString;
2248
2364
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
2365
+ /**
2366
+ * The same ranking, for a SET of cameras, in one round trip.
2367
+ *
2368
+ * The Detection Intelligence events feed asks this of every selected
2369
+ * camera and re-asks on a 30s timer. Fanned out client-side that is N
2370
+ * round trips — browser → hub → post-analysis — for N independent,
2371
+ * already-indexed store queries. Batched, the queries are unchanged and
2372
+ * run concurrently INSIDE the owner; only the transport collapses.
2373
+ *
2374
+ * Deliberately per-device rather than pre-merged: `limit` stays per
2375
+ * camera (a total would let a busy camera starve a quiet one), and a
2376
+ * caller that renders one camera's lane needs to know which camera a row
2377
+ * came from. `getKeyEvents` stays for single-device callers.
2378
+ */
2379
+ readonly getKeyEventsBatch: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
2380
+ deviceIds: z.ZodArray<z.ZodNumber>;
2381
+ since: z.ZodNumber;
2382
+ until: z.ZodNumber;
2383
+ limit: z.ZodDefault<z.ZodNumber>;
2384
+ minImportance: z.ZodOptional<z.ZodNumber>;
2385
+ classFilter: z.ZodOptional<z.ZodString>;
2386
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
2387
+ deviceId: z.ZodNumber;
2388
+ events: z.ZodReadonly<z.ZodArray<z.ZodObject<{
2389
+ retrainStatus: z.ZodOptional<z.ZodEnum<{
2390
+ none: "none";
2391
+ staging: "staging";
2392
+ trained: "trained";
2393
+ }>>;
2394
+ markForTrain: z.ZodOptional<z.ZodBoolean>;
2395
+ debug: z.ZodOptional<z.ZodBoolean>;
2396
+ favourited: z.ZodOptional<z.ZodBoolean>;
2397
+ importance: z.ZodNumber;
2398
+ bestEventId: z.ZodString;
2399
+ windowMs: z.ZodOptional<z.ZodNumber>;
2400
+ label: z.ZodOptional<z.ZodString>;
2401
+ labelScore: z.ZodOptional<z.ZodNumber>;
2402
+ labelMeta: z.ZodOptional<z.ZodObject<{
2403
+ stepId: z.ZodString;
2404
+ modelId: z.ZodOptional<z.ZodString>;
2405
+ decidedAt: z.ZodNumber;
2406
+ identityId: z.ZodOptional<z.ZodString>;
2407
+ }, z.core.$strip>>;
2408
+ subLabel: z.ZodOptional<z.ZodString>;
2409
+ subLabelScore: z.ZodOptional<z.ZodNumber>;
2410
+ subLabelMeta: z.ZodOptional<z.ZodObject<{
2411
+ stepId: z.ZodString;
2412
+ modelId: z.ZodOptional<z.ZodString>;
2413
+ decidedAt: z.ZodNumber;
2414
+ identityId: z.ZodOptional<z.ZodString>;
2415
+ }, z.core.$strip>>;
2416
+ id: z.ZodString;
2417
+ trackId: z.ZodString;
2418
+ timestamp: z.ZodNumber;
2419
+ className: z.ZodString;
2420
+ }, z.core.$strip>>>;
2421
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
2249
2422
  /** Server-side bucketed event counts for the 24-hour timeline.
2250
2423
  * Returns one entry per non-empty bucket; empty buckets are omitted. */
2251
2424
  readonly getEventDensity: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
@@ -2420,6 +2593,44 @@ export declare const pipelineAnalyticsCapability: {
2420
2593
  bytes: z.ZodNumber;
2421
2594
  }, z.core.$strip>>>;
2422
2595
  }, z.core.$strip>, "query">;
2596
+ /**
2597
+ * The same media footprint, broken down by {@link MediaFileKind} instead of
2598
+ * by camera — fleet-wide, or for one camera with `deviceId`.
2599
+ *
2600
+ * Separate from {@link getEventStoreFootprint} rather than a field on it:
2601
+ * the two answer different questions on different axes, the per-camera one
2602
+ * is what the management table renders on every open, and nothing should
2603
+ * pay for a per-kind pass to draw it. See
2604
+ * {@link EventMediaKindBreakdownSchema} for why `unaccounted*` exists —
2605
+ * `kinds` is enumerated, `totalBytes` is not, and the gap must be visible
2606
+ * to anyone sizing a deletion against it.
2607
+ */
2608
+ readonly getEventMediaFootprintByKind: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
2609
+ deviceId: z.ZodOptional<z.ZodNumber>;
2610
+ }, z.core.$strip>, z.ZodObject<{
2611
+ totalRows: z.ZodNumber;
2612
+ totalBytes: z.ZodNumber;
2613
+ kinds: z.ZodReadonly<z.ZodArray<z.ZodObject<{
2614
+ kind: z.ZodEnum<{
2615
+ crop: "crop";
2616
+ snapshot: "snapshot";
2617
+ keyFrame: "keyFrame";
2618
+ thumbnail: "thumbnail";
2619
+ firstFrame: "firstFrame";
2620
+ lastFrame: "lastFrame";
2621
+ fullFrame: "fullFrame";
2622
+ fullFrameBoxed: "fullFrameBoxed";
2623
+ faceCrop: "faceCrop";
2624
+ plateCrop: "plateCrop";
2625
+ keyFrameSmall: "keyFrameSmall";
2626
+ thumbnailSmall: "thumbnailSmall";
2627
+ }>;
2628
+ rows: z.ZodNumber;
2629
+ bytes: z.ZodNumber;
2630
+ }, z.core.$strip>>>;
2631
+ unaccountedRows: z.ZodNumber;
2632
+ unaccountedBytes: z.ZodNumber;
2633
+ }, z.core.$strip>, "query">;
2423
2634
  /**
2424
2635
  * Cluster-wide prune of events older than `olderThanMs` (exclusive) across
2425
2636
  * every camera, deleting each event's media in lockstep. Logged to the
@@ -2505,6 +2716,7 @@ export declare const pipelineAnalyticsCapability: {
2505
2716
  bytesMoved: z.ZodNumber;
2506
2717
  filesTotal: z.ZodNullable<z.ZodNumber>;
2507
2718
  rowsReconciled: z.ZodOptional<z.ZodNumber>;
2719
+ rowsForgotten: z.ZodOptional<z.ZodNumber>;
2508
2720
  startedAt: z.ZodNumber;
2509
2721
  finishedAt: z.ZodNullable<z.ZodNumber>;
2510
2722
  error: z.ZodNullable<z.ZodString>;
@@ -2606,6 +2818,7 @@ export declare const pipelineAnalyticsCapability: {
2606
2818
  bytesMoved: z.ZodNumber;
2607
2819
  filesTotal: z.ZodNullable<z.ZodNumber>;
2608
2820
  rowsReconciled: z.ZodOptional<z.ZodNumber>;
2821
+ rowsForgotten: z.ZodOptional<z.ZodNumber>;
2609
2822
  startedAt: z.ZodNumber;
2610
2823
  finishedAt: z.ZodNullable<z.ZodNumber>;
2611
2824
  error: z.ZodNullable<z.ZodString>;
@@ -666,6 +666,7 @@ export declare const recordingCapability: {
666
666
  bytesMoved: z.ZodNumber;
667
667
  filesTotal: z.ZodNullable<z.ZodNumber>;
668
668
  rowsReconciled: z.ZodOptional<z.ZodNumber>;
669
+ rowsForgotten: z.ZodOptional<z.ZodNumber>;
669
670
  startedAt: z.ZodNumber;
670
671
  finishedAt: z.ZodNullable<z.ZodNumber>;
671
672
  error: z.ZodNullable<z.ZodString>;
@@ -716,6 +717,7 @@ export declare const recordingCapability: {
716
717
  bytesMoved: z.ZodNumber;
717
718
  filesTotal: z.ZodNullable<z.ZodNumber>;
718
719
  rowsReconciled: z.ZodOptional<z.ZodNumber>;
720
+ rowsForgotten: z.ZodOptional<z.ZodNumber>;
719
721
  startedAt: z.ZodNumber;
720
722
  finishedAt: z.ZodNullable<z.ZodNumber>;
721
723
  error: z.ZodNullable<z.ZodString>;
@@ -740,6 +742,68 @@ export declare const recordingCapability: {
740
742
  segments: z.ZodNumber;
741
743
  bytes: z.ZodNumber;
742
744
  }, z.core.$strip>>, "query">;
745
+ /**
746
+ * Does this location's LEDGER tell the truth about its disk? (D319)
747
+ *
748
+ * One `readdir` per claimed hour, diffed both ways: durable rows whose file
749
+ * is not there, and files no durable row names. `apply` defaults to FALSE —
750
+ * the report is the product, and the dry run is how an operator
751
+ * sanity-checks the destructive run before authorising it.
752
+ *
753
+ * REFUSES a source that is still a write target: a listing of a live
754
+ * location is a lower bound, which is not the strong evidence that lets
755
+ * this pass forget without a budget. A live location is reconciled by the
756
+ * mover, under D318's bound.
757
+ */
758
+ readonly reconcileLedgerAgainstDisk: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
759
+ locationId: z.ZodString;
760
+ apply: z.ZodOptional<z.ZodBoolean>;
761
+ deviceId: z.ZodOptional<z.ZodNumber>;
762
+ profiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
763
+ }, z.core.$strip>, z.ZodObject<{
764
+ locationId: z.ZodString;
765
+ applied: z.ZodBoolean;
766
+ refused: z.ZodNullable<z.ZodEnum<{
767
+ "location-unknown": "location-unknown";
768
+ "source-writable": "source-writable";
769
+ "no-ledger": "no-ledger";
770
+ "archive-unreadable": "archive-unreadable";
771
+ "anchor-absent": "anchor-absent";
772
+ "anchor-unreadable": "anchor-unreadable";
773
+ "anchor-moved": "anchor-moved";
774
+ }>>;
775
+ archiveSegments: z.ZodNullable<z.ZodNumber>;
776
+ archiveBytes: z.ZodNullable<z.ZodNumber>;
777
+ hoursClaimed: z.ZodNumber;
778
+ hoursWalked: z.ZodNumber;
779
+ hoursMissing: z.ZodNumber;
780
+ listings: z.ZodNumber;
781
+ segmentsClaimed: z.ZodNumber;
782
+ ghostSegments: z.ZodNumber;
783
+ ghostBytes: z.ZodNumber;
784
+ ghostHoursWhole: z.ZodNumber;
785
+ forgottenSegments: z.ZodNumber;
786
+ forgottenBytes: z.ZodNumber;
787
+ orphanFiles: z.ZodNumber;
788
+ orphanSample: z.ZodReadonly<z.ZodArray<z.ZodString>>;
789
+ hoursSkipped: z.ZodNumber;
790
+ skippedByReason: z.ZodObject<{
791
+ 'live-tail': z.ZodNumber;
792
+ 'listing-error': z.ZodNumber;
793
+ 'path-mismatch': z.ZodNumber;
794
+ 'durable-refused': z.ZodNumber;
795
+ }, z.core.$strip>;
796
+ bounded: z.ZodBoolean;
797
+ byDevice: z.ZodReadonly<z.ZodArray<z.ZodObject<{
798
+ deviceId: z.ZodNumber;
799
+ hoursWalked: z.ZodNumber;
800
+ hoursMissing: z.ZodNumber;
801
+ ghostSegments: z.ZodNumber;
802
+ ghostBytes: z.ZodNumber;
803
+ forgottenSegments: z.ZodNumber;
804
+ orphanFiles: z.ZodNumber;
805
+ }, z.core.$strip>>>;
806
+ }, z.core.$strip>, "mutation">;
743
807
  /** Cancel a running or queued relocate job. A queued job never runs. */
744
808
  readonly cancelRelocateJob: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
745
809
  jobId: z.ZodString;