@camstack/types 1.1.48 → 1.1.50

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
- const require_sleep = require("./sleep-BoTIF1d4.js");
3
- const require_event_category = require("./event-category-AkBNxg_X.js");
2
+ const require_sleep = require("./sleep-CF-UWPp0.js");
3
+ const require_event_category = require("./event-category-CGj9fI4L.js");
4
4
  const require_err_msg = require("./err-msg-COpsHMw2.js");
5
5
  exports.BaseAddon = require_sleep.BaseAddon;
6
6
  exports.DATAPLANE_SECRET_HEADER = require_sleep.DATAPLANE_SECRET_HEADER;
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { A as parseJsonUnknown, D as asString, I as scopeKey, M as ReadinessRegistry, N as ReadinessTimeoutError, S as DeviceType, T as asJsonObject, a as viewerUiCapability, bt as DisposerChain, ct as BaseAddon, ft as emitReadiness, i as deviceOpsCapability, j as DATAPLANE_SECRET_HEADER, lt as normalizeAddonInitResult, m as expandCapMethods, o as adminUiCapability, s as createDeviceProxy, t as sleep } from "./sleep-B3OHhFkL.mjs";
2
- import { t as EventCategory } from "./event-category-H4AVePnn.mjs";
1
+ import { A as parseJsonUnknown, D as asString, I as scopeKey, M as ReadinessRegistry, N as ReadinessTimeoutError, S as DeviceType, T as asJsonObject, a as viewerUiCapability, bt as DisposerChain, ct as BaseAddon, ft as emitReadiness, i as deviceOpsCapability, j as DATAPLANE_SECRET_HEADER, lt as normalizeAddonInitResult, m as expandCapMethods, o as adminUiCapability, s as createDeviceProxy, t as sleep } from "./sleep-D8ZkNoYz.mjs";
2
+ import { t as EventCategory } from "./event-category-D4HJq7Mw.mjs";
3
3
  import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
4
4
  export { BaseAddon, DATAPLANE_SECRET_HEADER, DeviceType, DisposerChain, EventCategory, ReadinessRegistry, ReadinessTimeoutError, adminUiCapability, asJsonObject, asString, createDeviceProxy, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, normalizeAddonInitResult, parseJsonUnknown, scopeKey, sleep, viewerUiCapability };
@@ -77,7 +77,7 @@ export { type ILlmProvider, type LlmDefault, type LlmDefaultSelector, LlmDefault
77
77
  export { type ILlmRuntimeProvider, llmRuntimeCapability, type LlmNodeModel, LlmNodeModelSchema, type LlmRuntimeCompleteInput, LlmRuntimeCompleteInputSchema, type LlmRuntimeDiskUsage, LlmRuntimeDiskUsageSchema, type LlmRuntimeStatus, LlmRuntimeStatusSchema, type ManagedModelRef, ManagedModelRefSchema, type ManagedRuntimeConfig, ManagedRuntimeConfigSchema, } from './llm-runtime.cap.js';
78
78
  export { type LlmErrorCode, LlmErrorCodeSchema, type LlmGenerateBaseInput, LlmGenerateBaseInputSchema, type LlmGenerateErr, LlmGenerateErrSchema, type LlmGenerateOk, LlmGenerateOkSchema, type LlmGenerateResult, LlmGenerateResultSchema, type LlmImage, LlmImageSchema, type LlmUsage, LlmUsageSchema, } from './llm-shared.js';
79
79
  export { type IOauthIntegrationProvider, type OauthIntegrationDescriptor, OauthIntegrationDescriptorSchema, oauthIntegrationCapability, } from './oauth-integration.cap.js';
80
- export { type AudioEvent, AudioEventSchema, type DetectionSource, DetectionSourceSchema, type EventKind, type EventKindCategory, EventKindCategorySchema, type EventKindDescriptor, EventKindDescriptorSchema, type EventKindIcon, EventKindIconSchema, EventKindSchema, type IPipelineAnalyticsProvider, type KeyEvent, KeyEventSchema, type MediaFile, type MediaFileKind, MediaFileSchema, type MotionEvent, MotionEventSchema, type ObjectEvent, ObjectEventSchema, pipelineAnalyticsCapability, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type ScoredObjectEvent, ScoredObjectEventSchema, type SensorEvent, SensorEventSchema, type Track, type TrackCascadeCounts, TrackCascadeCountsSchema, TrackedDetectionSchema, type TrackEnvelope, TrackEnvelopeSchema, type TrackProjection, TrackProjectionSchema, TrackSchema, type TrackState, TrackStateSchema, type TrackZoneFilter, TrackZoneFilterSchema, } from './pipeline-analytics.cap.js';
80
+ export { type AudioEvent, AudioEventSchema, type DetectionSource, DetectionSourceSchema, type EventKind, type EventKindCategory, EventKindCategorySchema, type EventKindDescriptor, EventKindDescriptorSchema, type EventKindIcon, EventKindIconSchema, EventKindSchema, type EventPruneCounts, type EventStoreDeviceFootprint, type EventStoreFootprint, type IPipelineAnalyticsProvider, type KeyEvent, KeyEventSchema, type MediaFile, type MediaFileKind, MediaFileSchema, type MotionEvent, MotionEventSchema, type ObjectEvent, ObjectEventSchema, pipelineAnalyticsCapability, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type ScoredObjectEvent, ScoredObjectEventSchema, type SensorEvent, SensorEventSchema, type Track, type TrackCascadeCounts, TrackCascadeCountsSchema, TrackedDetectionSchema, type TrackEnvelope, TrackEnvelopeSchema, type TrackProjection, TrackProjectionSchema, TrackSchema, type TrackState, TrackStateSchema, type TrackZoneFilter, TrackZoneFilterSchema, } from './pipeline-analytics.cap.js';
81
81
  export { EVENT_KIND_BY_CAP, type SensorEventKindDescriptor } from './sensor-event-kinds.js';
82
82
  export type { PipelineStepInputOutput, PipelineValidationIssue, PipelineValidationResult, } from './pipeline-executor.cap.js';
83
83
  export { ModelSubstitutionSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, pipelineExecutorCapability, } from './pipeline-executor.cap.js';
@@ -173,6 +173,7 @@ export { type IPtzProvider, PtzMoveCommandSchema, type PtzOptions, PtzPositionSc
173
173
  export { type IPtzAutotrackProvider, type PtzAutotrackRuntimeState, PtzAutotrackRuntimeStateSchema, type PtzAutotrackSettings, PtzAutotrackSettingsSchema, type PtzAutotrackStatus, PtzAutotrackStatusSchema, type PtzAutotrackTargetOption, PtzAutotrackTargetOptionSchema, ptzAutotrackCapability, } from './ptz-autotrack.cap.js';
174
174
  export { type IRebootProvider, rebootCapability } from './reboot.cap.js';
175
175
  export { type IRecordingProvider, type LocateSegmentResult, LocateSegmentResultSchema, type ReadSegmentBytesResult, ReadSegmentBytesResultSchema, type RecordingAvailability, RecordingAvailabilitySchema, type RecordingDays, RecordingDaysSchema, type RecordingDeviceUsage, RecordingDeviceUsageSchema, type RecordingLocationUsage, RecordingLocationUsageSchema, type RecordingManifest, RecordingManifestSchema, RecordingRangeSchema, type RecordingStatus, RecordingStatusSchema, type RecordingStorageUsage, RecordingStorageUsageSchema, recordingCapability, } from './recording.cap.js';
176
+ export { type ExportDownload, ExportDownloadSchema, type ExportOptions, ExportOptionsSchema, type ExportRecord, ExportRecordSchema, type ExportState, ExportStateSchema, ExportSpeedSchema, ExportTimelapseSchema, type IRecordingExportProvider, recordingExportCapability, } from './recording-export.cap.js';
176
177
  export { type ZoneRule, type ZoneRuleMode, ZoneRuleModeEnum, ZoneRuleSchema, type ZoneRules, ZoneRulesArraySchema, } from './schemas/zone-rule.js';
177
178
  export { type IScriptRunnerProvider, type ScriptRunnerStatus, ScriptRunnerStatusSchema, scriptRunnerCapability, } from './script-runner.cap.js';
178
179
  export { type ISmokeProvider, type SmokeStatus, SmokeStatusSchema, smokeCapability, } from './smoke.cap.js';
@@ -292,6 +293,7 @@ import type { ptzCapability } from './ptz.cap.js';
292
293
  import type { ptzAutotrackCapability } from './ptz-autotrack.cap.js';
293
294
  import type { rebootCapability } from './reboot.cap.js';
294
295
  import type { recordingCapability } from './recording.cap.js';
296
+ import type { recordingExportCapability } from './recording-export.cap.js';
295
297
  import type { scriptRunnerCapability } from './script-runner.cap.js';
296
298
  import type { serverManagementCapability } from './server-management.cap.js';
297
299
  import type { settingsStoreCapability } from './settings-store.cap.js';
@@ -321,6 +323,6 @@ import type { webrtcSessionCapability } from './webrtc-session.cap.js';
321
323
  import type { zoneAnalyticsCapability } from './zone-analytics.cap.js';
322
324
  import type { zoneRulesCapability } from './zone-rules.cap.js';
323
325
  import type { zonesCapability } from './zones.cap.js';
324
- type AnyCapability = typeof addonSettingsCapability | typeof alertsCapability | typeof storageCapability | typeof storageProviderCapability | typeof storageEvictableCapability | typeof filesystemBrowseCapability | typeof backupCapability | typeof settingsStoreCapability | typeof logDestinationCapability | typeof adminUiCapability | typeof viewerUiCapability | typeof ssoBridgeCapability | typeof userPasskeysCapability | typeof smtpProviderCapability | typeof mqttBrokerCapability | typeof brokerCapability | typeof deviceAdoptionCapability | typeof deviceExportCapability | typeof addonPagesCapability | typeof addonPagesSourceCapability | typeof addonWidgetsCapability | typeof addonWidgetsSourceCapability | typeof customModelRegistryCapability | typeof modelDistributorCapability | typeof modelConvertCapability | typeof addonRoutesCapability | typeof streamBrokerCapability | typeof decoderCapability | typeof webrtcSessionCapability | typeof cameraStreamsCapability | typeof motionDetectionCapability | typeof pipelineExecutorCapability | typeof detectionPipelineCapability | typeof cameraPipelineConfigCapability | typeof pipelineRunnerCapability | typeof pipelineOrchestratorCapability | typeof audioAnalyzerCapability | typeof audioAnalysisCapability | typeof audioCodecCapability | typeof embeddingEncoderCapability | typeof deviceProviderCapability | typeof deviceManagerCapability | typeof deviceStateCapability | typeof authProviderCapability | typeof loginMethodCapability | typeof networkAccessCapability | typeof turnProviderCapability | typeof snapshotCapability | typeof llmCapability | typeof llmRuntimeCapability | typeof notificationOutputCapability | typeof advancedNotifierCapability | typeof pipelineAnalyticsCapability | typeof metricsProviderCapability | typeof ptzCapability | typeof ptzAutotrackCapability | typeof consumablesCapability | typeof rebootCapability | typeof deviceDiscoveryCapability | typeof brightnessCapability | typeof colorCapability | typeof climateControlCapability | typeof coverCapability | typeof valveCapability | typeof humidifierCapability | typeof waterHeaterCapability | typeof weatherCapability | typeof imageCapability | typeof lockControlCapability | typeof vacuumControlCapability | typeof petFeederCapability | typeof lawnMowerControlCapability | typeof fanControlCapability | typeof controlCapability | typeof notifierCapability | typeof mediaPlayerCapability | typeof alarmPanelCapability | typeof presenceCapability | typeof scriptRunnerCapability | typeof automationControlCapability | typeof motionTriggerCapability | typeof eventsCapability | typeof zonesCapability | typeof zoneRulesCapability | typeof zoneAnalyticsCapability | typeof audioMetricsCapability | typeof motionCapability | typeof contactCapability | typeof floodCapability | typeof smokeCapability | typeof carbonMonoxideCapability | typeof gasCapability | typeof tamperCapability | typeof vibrationCapability | typeof connectivityCapability | typeof binaryCapability | typeof temperatureSensorCapability | typeof humiditySensorCapability | typeof ambientLightSensorCapability | typeof pressureSensorCapability | typeof powerMeterCapability | typeof airQualitySensorCapability | typeof numericSensorCapability | typeof enumSensorCapability | typeof recordingCapability | typeof deviceOpsCapability | typeof platformProbeCapability | typeof localNetworkCapability | typeof meshNetworkCapability | typeof userManagementCapability | typeof systemCapability | typeof networkQualityCapability | typeof toastCapability | typeof nodesCapability | typeof serverManagementCapability | typeof integrationsCapability | typeof addonsCapability | typeof oauthIntegrationCapability | typeof streamParamsCapability | typeof streamCatalogCapability | typeof motionZonesCapability | typeof sceneMonitorCapability | typeof privacyMaskCapability | typeof dayNightCapability | typeof imageSettingsCapability;
326
+ type AnyCapability = typeof addonSettingsCapability | typeof alertsCapability | typeof storageCapability | typeof storageProviderCapability | typeof storageEvictableCapability | typeof filesystemBrowseCapability | typeof backupCapability | typeof settingsStoreCapability | typeof logDestinationCapability | typeof adminUiCapability | typeof viewerUiCapability | typeof ssoBridgeCapability | typeof userPasskeysCapability | typeof smtpProviderCapability | typeof mqttBrokerCapability | typeof brokerCapability | typeof deviceAdoptionCapability | typeof deviceExportCapability | typeof addonPagesCapability | typeof addonPagesSourceCapability | typeof addonWidgetsCapability | typeof addonWidgetsSourceCapability | typeof customModelRegistryCapability | typeof modelDistributorCapability | typeof modelConvertCapability | typeof addonRoutesCapability | typeof streamBrokerCapability | typeof decoderCapability | typeof webrtcSessionCapability | typeof cameraStreamsCapability | typeof motionDetectionCapability | typeof pipelineExecutorCapability | typeof detectionPipelineCapability | typeof cameraPipelineConfigCapability | typeof pipelineRunnerCapability | typeof pipelineOrchestratorCapability | typeof audioAnalyzerCapability | typeof audioAnalysisCapability | typeof audioCodecCapability | typeof embeddingEncoderCapability | typeof deviceProviderCapability | typeof deviceManagerCapability | typeof deviceStateCapability | typeof authProviderCapability | typeof loginMethodCapability | typeof networkAccessCapability | typeof turnProviderCapability | typeof snapshotCapability | typeof llmCapability | typeof llmRuntimeCapability | typeof notificationOutputCapability | typeof advancedNotifierCapability | typeof pipelineAnalyticsCapability | typeof metricsProviderCapability | typeof ptzCapability | typeof ptzAutotrackCapability | typeof consumablesCapability | typeof rebootCapability | typeof deviceDiscoveryCapability | typeof brightnessCapability | typeof colorCapability | typeof climateControlCapability | typeof coverCapability | typeof valveCapability | typeof humidifierCapability | typeof waterHeaterCapability | typeof weatherCapability | typeof imageCapability | typeof lockControlCapability | typeof vacuumControlCapability | typeof petFeederCapability | typeof lawnMowerControlCapability | typeof fanControlCapability | typeof controlCapability | typeof notifierCapability | typeof mediaPlayerCapability | typeof alarmPanelCapability | typeof presenceCapability | typeof scriptRunnerCapability | typeof automationControlCapability | typeof motionTriggerCapability | typeof eventsCapability | typeof zonesCapability | typeof zoneRulesCapability | typeof zoneAnalyticsCapability | typeof audioMetricsCapability | typeof motionCapability | typeof contactCapability | typeof floodCapability | typeof smokeCapability | typeof carbonMonoxideCapability | typeof gasCapability | typeof tamperCapability | typeof vibrationCapability | typeof connectivityCapability | typeof binaryCapability | typeof temperatureSensorCapability | typeof humiditySensorCapability | typeof ambientLightSensorCapability | typeof pressureSensorCapability | typeof powerMeterCapability | typeof airQualitySensorCapability | typeof numericSensorCapability | typeof enumSensorCapability | typeof recordingCapability | typeof recordingExportCapability | typeof deviceOpsCapability | typeof platformProbeCapability | typeof localNetworkCapability | typeof meshNetworkCapability | typeof userManagementCapability | typeof systemCapability | typeof networkQualityCapability | typeof toastCapability | typeof nodesCapability | typeof serverManagementCapability | typeof integrationsCapability | typeof addonsCapability | typeof oauthIntegrationCapability | typeof streamParamsCapability | typeof streamCatalogCapability | typeof motionZonesCapability | typeof sceneMonitorCapability | typeof privacyMaskCapability | typeof dayNightCapability | typeof imageSettingsCapability;
325
327
  export type CapabilityName = AnyCapability['name'];
326
328
  export type ITypedReadinessRegistry = IReadinessRegistry<CapabilityName>;
@@ -67,6 +67,7 @@ export declare const EventKindIconSchema: z.ZodEnum<{
67
67
  vehicle: "vehicle";
68
68
  animal: "animal";
69
69
  motion: "motion";
70
+ package: "package";
70
71
  door: "door";
71
72
  pir: "pir";
72
73
  smoke: "smoke";
@@ -78,6 +79,7 @@ export declare const EventKindCategorySchema: z.ZodEnum<{
78
79
  audio: "audio";
79
80
  custom: "custom";
80
81
  motion: "motion";
82
+ package: "package";
81
83
  detection: "detection";
82
84
  }>;
83
85
  export type EventKindCategory = z.infer<typeof EventKindCategorySchema>;
@@ -93,6 +95,7 @@ declare const EventKindDescriptorSchema: z.ZodObject<{
93
95
  vehicle: "vehicle";
94
96
  animal: "animal";
95
97
  motion: "motion";
98
+ package: "package";
96
99
  door: "door";
97
100
  pir: "pir";
98
101
  smoke: "smoke";
@@ -103,6 +106,7 @@ declare const EventKindDescriptorSchema: z.ZodObject<{
103
106
  audio: "audio";
104
107
  custom: "custom";
105
108
  motion: "motion";
109
+ package: "package";
106
110
  detection: "detection";
107
111
  }>;
108
112
  source: z.ZodObject<{
@@ -496,6 +500,31 @@ declare const TrackCascadeCountsSchema: z.ZodObject<{
496
500
  embeddings: z.ZodNumber;
497
501
  }, z.core.$strip>;
498
502
  export type TrackCascadeCounts = z.infer<typeof TrackCascadeCountsSchema>;
503
+ /** Event-store footprint for one camera. */
504
+ declare const EventStoreDeviceFootprintSchema: z.ZodObject<{
505
+ deviceId: z.ZodNumber;
506
+ rows: z.ZodNumber;
507
+ bytes: z.ZodNumber;
508
+ }, z.core.$strip>;
509
+ export type EventStoreDeviceFootprint = z.infer<typeof EventStoreDeviceFootprintSchema>;
510
+ /** Aggregate event-store footprint: global totals + per-camera breakdown. */
511
+ declare const EventStoreFootprintSchema: z.ZodObject<{
512
+ totalRows: z.ZodNumber;
513
+ totalBytes: z.ZodNumber;
514
+ devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
515
+ deviceId: z.ZodNumber;
516
+ rows: z.ZodNumber;
517
+ bytes: z.ZodNumber;
518
+ }, z.core.$strip>>>;
519
+ }, z.core.$strip>;
520
+ export type EventStoreFootprint = z.infer<typeof EventStoreFootprintSchema>;
521
+ /** Per-kind counts returned by the event-prune / device-delete mutations. */
522
+ declare const EventPruneCountsSchema: z.ZodObject<{
523
+ motion: z.ZodNumber;
524
+ object: z.ZodNumber;
525
+ audio: z.ZodNumber;
526
+ }, z.core.$strip>;
527
+ export type EventPruneCounts = z.infer<typeof EventPruneCountsSchema>;
499
528
  export declare const pipelineAnalyticsCapability: {
500
529
  readonly name: "pipeline-analytics";
501
530
  readonly scope: "device";
@@ -922,6 +951,7 @@ export declare const pipelineAnalyticsCapability: {
922
951
  vehicle: "vehicle";
923
952
  animal: "animal";
924
953
  motion: "motion";
954
+ package: "package";
925
955
  door: "door";
926
956
  pir: "pir";
927
957
  smoke: "smoke";
@@ -932,6 +962,7 @@ export declare const pipelineAnalyticsCapability: {
932
962
  audio: "audio";
933
963
  custom: "custom";
934
964
  motion: "motion";
965
+ package: "package";
935
966
  detection: "detection";
936
967
  }>;
937
968
  source: z.ZodObject<{
@@ -1071,6 +1102,84 @@ export declare const pipelineAnalyticsCapability: {
1071
1102
  deleted: z.ZodNumber;
1072
1103
  failed: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1073
1104
  }, z.core.$strip>, "mutation">;
1105
+ /**
1106
+ * Durable event-store footprint for the management UI: event rows
1107
+ * (motion + object + audio) counted per camera + total, plus the
1108
+ * event-owned media bytes on disk per camera + total. Stat/count-based,
1109
+ * computed on demand.
1110
+ */
1111
+ readonly getEventStoreFootprint: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
1112
+ totalRows: z.ZodNumber;
1113
+ totalBytes: z.ZodNumber;
1114
+ devices: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1115
+ deviceId: z.ZodNumber;
1116
+ rows: z.ZodNumber;
1117
+ bytes: z.ZodNumber;
1118
+ }, z.core.$strip>>>;
1119
+ }, z.core.$strip>, "query">;
1120
+ /**
1121
+ * Cluster-wide prune of events older than `olderThanMs` (exclusive) across
1122
+ * every camera, deleting each event's media in lockstep. Logged to the
1123
+ * events ops-log with `reason` (default `'retention'`). Returns the summed
1124
+ * per-kind deleted counts.
1125
+ */
1126
+ readonly pruneEvents: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1127
+ olderThanMs: z.ZodNumber;
1128
+ reason: z.ZodOptional<z.ZodEnum<{
1129
+ manual: "manual";
1130
+ retention: "retention";
1131
+ quota: "quota";
1132
+ operator: "operator";
1133
+ }>>;
1134
+ }, z.core.$strip>, z.ZodObject<{
1135
+ motion: z.ZodNumber;
1136
+ object: z.ZodNumber;
1137
+ audio: z.ZodNumber;
1138
+ }, z.core.$strip>, "mutation">;
1139
+ /**
1140
+ * Manually delete EVERY event (motion + object + audio) for one camera and
1141
+ * its event-owned media in lockstep. Logged to the events ops-log as
1142
+ * `op:'manual-delete', reason:'manual'`. Destructive — the admin UI guards
1143
+ * it behind a confirm.
1144
+ */
1145
+ readonly deleteDeviceEvents: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1146
+ deviceId: z.ZodNumber;
1147
+ }, z.core.$strip>, z.ZodObject<{
1148
+ motion: z.ZodNumber;
1149
+ object: z.ZodNumber;
1150
+ audio: z.ZodNumber;
1151
+ }, z.core.$strip>, "mutation">;
1152
+ /** The events ops-log rows (newest-first), optionally scoped to one camera.
1153
+ * Backed by a declared pipeline-analytics SQLite collection. */
1154
+ readonly listOpsLog: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1155
+ deviceId: z.ZodOptional<z.ZodNumber>;
1156
+ limit: z.ZodOptional<z.ZodNumber>;
1157
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
1158
+ id: z.ZodString;
1159
+ at: z.ZodNumber;
1160
+ domain: z.ZodEnum<{
1161
+ events: "events";
1162
+ recording: "recording";
1163
+ }>;
1164
+ op: z.ZodEnum<{
1165
+ prune: "prune";
1166
+ "manual-delete": "manual-delete";
1167
+ rescan: "rescan";
1168
+ "retention-run": "retention-run";
1169
+ }>;
1170
+ reason: z.ZodEnum<{
1171
+ manual: "manual";
1172
+ retention: "retention";
1173
+ quota: "quota";
1174
+ operator: "operator";
1175
+ }>;
1176
+ deviceId: z.ZodNullable<z.ZodNumber>;
1177
+ nodeId: z.ZodString;
1178
+ itemsAffected: z.ZodNumber;
1179
+ bytesReclaimed: z.ZodNumber;
1180
+ detail: z.ZodNullable<z.ZodString>;
1181
+ actor: z.ZodString;
1182
+ }, z.core.$strip>>>, "query">;
1074
1183
  readonly getEventMedia: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1075
1184
  eventId: z.ZodString;
1076
1185
  kind: z.ZodOptional<z.ZodEnum<{
@@ -0,0 +1,305 @@
1
+ /**
2
+ * `recordingExport` cap — render a footage time range into a single downloadable
3
+ * MP4 (regular / accelerated / decelerated / timelapse, ± audio), kept for a
4
+ * bounded lifetime with a durable history, auto-expiry, and optional
5
+ * delete-after-download.
6
+ *
7
+ * Like `recording` this is a `scope:'system', mode:'singleton'` cap: the
8
+ * recorder self-gates so exactly ONE node (the designated `recordingNodeId`,
9
+ * default `hub`) registers it. Device-scoped methods carry `deviceId` in their
10
+ * input and dispatch to that single provider; the render runs on the node that
11
+ * owns the footage (no cross-node segment transfer). Download rides the
12
+ * framework addon data-plane. State persists in a DurableState blob (NOT
13
+ * SQLite); history rows survive file deletion for audit.
14
+ */
15
+ import { z } from 'zod';
16
+ import { type InferProvider } from './capability-definition.js';
17
+ /** Playback-speed multiplier for the render (1 = realtime). */
18
+ export declare const ExportSpeedSchema: z.ZodNumber;
19
+ /** Timelapse cadence — sample one source frame per `everyMs`, output at `outputFps`. */
20
+ export declare const ExportTimelapseSchema: z.ZodObject<{
21
+ everyMs: z.ZodNumber;
22
+ outputFps: z.ZodOptional<z.ZodNumber>;
23
+ }, z.core.$strip>;
24
+ /**
25
+ * Render options. `speed` and `timelapse` are mutually exclusive. `includeAudio`
26
+ * is honoured only for a realtime-ish speed (0.5–2×); timelapse is always
27
+ * silent. `maxLifeMs` bounds how long the finished file is kept;
28
+ * `deleteAfterDownload` removes it shortly after the first complete download.
29
+ */
30
+ export declare const ExportOptionsSchema: z.ZodObject<{
31
+ speed: z.ZodOptional<z.ZodNumber>;
32
+ timelapse: z.ZodOptional<z.ZodObject<{
33
+ everyMs: z.ZodNumber;
34
+ outputFps: z.ZodOptional<z.ZodNumber>;
35
+ }, z.core.$strip>>;
36
+ includeAudio: z.ZodBoolean;
37
+ maxLifeMs: z.ZodNumber;
38
+ deleteAfterDownload: z.ZodBoolean;
39
+ title: z.ZodOptional<z.ZodString>;
40
+ }, z.core.$strip>;
41
+ export type ExportOptions = z.infer<typeof ExportOptionsSchema>;
42
+ export declare const ExportStateSchema: z.ZodEnum<{
43
+ ready: "ready";
44
+ failed: "failed";
45
+ queued: "queued";
46
+ deleted: "deleted";
47
+ rendering: "rendering";
48
+ expired: "expired";
49
+ }>;
50
+ export type ExportState = z.infer<typeof ExportStateSchema>;
51
+ /** One export job / history row. */
52
+ export declare const ExportRecordSchema: z.ZodObject<{
53
+ id: z.ZodString;
54
+ deviceId: z.ZodNumber;
55
+ profile: z.ZodString;
56
+ fromMs: z.ZodNumber;
57
+ toMs: z.ZodNumber;
58
+ options: z.ZodObject<{
59
+ speed: z.ZodOptional<z.ZodNumber>;
60
+ timelapse: z.ZodOptional<z.ZodObject<{
61
+ everyMs: z.ZodNumber;
62
+ outputFps: z.ZodOptional<z.ZodNumber>;
63
+ }, z.core.$strip>>;
64
+ includeAudio: z.ZodBoolean;
65
+ maxLifeMs: z.ZodNumber;
66
+ deleteAfterDownload: z.ZodBoolean;
67
+ title: z.ZodOptional<z.ZodString>;
68
+ }, z.core.$strip>;
69
+ state: z.ZodEnum<{
70
+ ready: "ready";
71
+ failed: "failed";
72
+ queued: "queued";
73
+ deleted: "deleted";
74
+ rendering: "rendering";
75
+ expired: "expired";
76
+ }>;
77
+ progressPct: z.ZodNullable<z.ZodNumber>;
78
+ fileBytes: z.ZodNullable<z.ZodNumber>;
79
+ expiresAt: z.ZodNumber;
80
+ deleteAfterDownload: z.ZodBoolean;
81
+ downloadedAt: z.ZodNullable<z.ZodNumber>;
82
+ createdAt: z.ZodNumber;
83
+ createdBy: z.ZodString;
84
+ error: z.ZodNullable<z.ZodString>;
85
+ }, z.core.$strip>;
86
+ export type ExportRecord = z.infer<typeof ExportRecordSchema>;
87
+ /** Candidate download URLs (LAN first, then operator extra hosts). */
88
+ export declare const ExportDownloadSchema: z.ZodObject<{
89
+ url: z.ZodString;
90
+ endpoints: z.ZodArray<z.ZodString>;
91
+ }, z.core.$strip>;
92
+ export type ExportDownload = z.infer<typeof ExportDownloadSchema>;
93
+ export declare const recordingExportCapability: {
94
+ readonly name: "recordingExport";
95
+ readonly scope: "system";
96
+ readonly mode: "singleton";
97
+ readonly methods: {
98
+ /** Queue a render of `[fromMs,toMs)` for `deviceId`/`profile`. Fails fast
99
+ * when no footage covers the range. Returns the queued record. */
100
+ readonly createExport: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
101
+ deviceId: z.ZodNumber;
102
+ profile: z.ZodString;
103
+ fromMs: z.ZodNumber;
104
+ toMs: z.ZodNumber;
105
+ options: z.ZodObject<{
106
+ speed: z.ZodOptional<z.ZodNumber>;
107
+ timelapse: z.ZodOptional<z.ZodObject<{
108
+ everyMs: z.ZodNumber;
109
+ outputFps: z.ZodOptional<z.ZodNumber>;
110
+ }, z.core.$strip>>;
111
+ includeAudio: z.ZodBoolean;
112
+ maxLifeMs: z.ZodNumber;
113
+ deleteAfterDownload: z.ZodBoolean;
114
+ title: z.ZodOptional<z.ZodString>;
115
+ }, z.core.$strip>;
116
+ }, z.core.$strip>, z.ZodObject<{
117
+ id: z.ZodString;
118
+ deviceId: z.ZodNumber;
119
+ profile: z.ZodString;
120
+ fromMs: z.ZodNumber;
121
+ toMs: z.ZodNumber;
122
+ options: z.ZodObject<{
123
+ speed: z.ZodOptional<z.ZodNumber>;
124
+ timelapse: z.ZodOptional<z.ZodObject<{
125
+ everyMs: z.ZodNumber;
126
+ outputFps: z.ZodOptional<z.ZodNumber>;
127
+ }, z.core.$strip>>;
128
+ includeAudio: z.ZodBoolean;
129
+ maxLifeMs: z.ZodNumber;
130
+ deleteAfterDownload: z.ZodBoolean;
131
+ title: z.ZodOptional<z.ZodString>;
132
+ }, z.core.$strip>;
133
+ state: z.ZodEnum<{
134
+ ready: "ready";
135
+ failed: "failed";
136
+ queued: "queued";
137
+ deleted: "deleted";
138
+ rendering: "rendering";
139
+ expired: "expired";
140
+ }>;
141
+ progressPct: z.ZodNullable<z.ZodNumber>;
142
+ fileBytes: z.ZodNullable<z.ZodNumber>;
143
+ expiresAt: z.ZodNumber;
144
+ deleteAfterDownload: z.ZodBoolean;
145
+ downloadedAt: z.ZodNullable<z.ZodNumber>;
146
+ createdAt: z.ZodNumber;
147
+ createdBy: z.ZodString;
148
+ error: z.ZodNullable<z.ZodString>;
149
+ }, z.core.$strip>, "mutation">;
150
+ /** All export rows (history included), optionally scoped to one device. */
151
+ readonly listExports: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
152
+ deviceId: z.ZodOptional<z.ZodNumber>;
153
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
154
+ id: z.ZodString;
155
+ deviceId: z.ZodNumber;
156
+ profile: z.ZodString;
157
+ fromMs: z.ZodNumber;
158
+ toMs: z.ZodNumber;
159
+ options: z.ZodObject<{
160
+ speed: z.ZodOptional<z.ZodNumber>;
161
+ timelapse: z.ZodOptional<z.ZodObject<{
162
+ everyMs: z.ZodNumber;
163
+ outputFps: z.ZodOptional<z.ZodNumber>;
164
+ }, z.core.$strip>>;
165
+ includeAudio: z.ZodBoolean;
166
+ maxLifeMs: z.ZodNumber;
167
+ deleteAfterDownload: z.ZodBoolean;
168
+ title: z.ZodOptional<z.ZodString>;
169
+ }, z.core.$strip>;
170
+ state: z.ZodEnum<{
171
+ ready: "ready";
172
+ failed: "failed";
173
+ queued: "queued";
174
+ deleted: "deleted";
175
+ rendering: "rendering";
176
+ expired: "expired";
177
+ }>;
178
+ progressPct: z.ZodNullable<z.ZodNumber>;
179
+ fileBytes: z.ZodNullable<z.ZodNumber>;
180
+ expiresAt: z.ZodNumber;
181
+ deleteAfterDownload: z.ZodBoolean;
182
+ downloadedAt: z.ZodNullable<z.ZodNumber>;
183
+ createdAt: z.ZodNumber;
184
+ createdBy: z.ZodString;
185
+ error: z.ZodNullable<z.ZodString>;
186
+ }, z.core.$strip>>, "query">;
187
+ readonly getExport: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
188
+ exportId: z.ZodString;
189
+ }, z.core.$strip>, z.ZodObject<{
190
+ id: z.ZodString;
191
+ deviceId: z.ZodNumber;
192
+ profile: z.ZodString;
193
+ fromMs: z.ZodNumber;
194
+ toMs: z.ZodNumber;
195
+ options: z.ZodObject<{
196
+ speed: z.ZodOptional<z.ZodNumber>;
197
+ timelapse: z.ZodOptional<z.ZodObject<{
198
+ everyMs: z.ZodNumber;
199
+ outputFps: z.ZodOptional<z.ZodNumber>;
200
+ }, z.core.$strip>>;
201
+ includeAudio: z.ZodBoolean;
202
+ maxLifeMs: z.ZodNumber;
203
+ deleteAfterDownload: z.ZodBoolean;
204
+ title: z.ZodOptional<z.ZodString>;
205
+ }, z.core.$strip>;
206
+ state: z.ZodEnum<{
207
+ ready: "ready";
208
+ failed: "failed";
209
+ queued: "queued";
210
+ deleted: "deleted";
211
+ rendering: "rendering";
212
+ expired: "expired";
213
+ }>;
214
+ progressPct: z.ZodNullable<z.ZodNumber>;
215
+ fileBytes: z.ZodNullable<z.ZodNumber>;
216
+ expiresAt: z.ZodNumber;
217
+ deleteAfterDownload: z.ZodBoolean;
218
+ downloadedAt: z.ZodNullable<z.ZodNumber>;
219
+ createdAt: z.ZodNumber;
220
+ createdBy: z.ZodString;
221
+ error: z.ZodNullable<z.ZodString>;
222
+ }, z.core.$strip>, "query">;
223
+ /** Abort a queued/rendering export; the partial file is removed. */
224
+ readonly cancelExport: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
225
+ exportId: z.ZodString;
226
+ }, z.core.$strip>, z.ZodObject<{
227
+ id: z.ZodString;
228
+ deviceId: z.ZodNumber;
229
+ profile: z.ZodString;
230
+ fromMs: z.ZodNumber;
231
+ toMs: z.ZodNumber;
232
+ options: z.ZodObject<{
233
+ speed: z.ZodOptional<z.ZodNumber>;
234
+ timelapse: z.ZodOptional<z.ZodObject<{
235
+ everyMs: z.ZodNumber;
236
+ outputFps: z.ZodOptional<z.ZodNumber>;
237
+ }, z.core.$strip>>;
238
+ includeAudio: z.ZodBoolean;
239
+ maxLifeMs: z.ZodNumber;
240
+ deleteAfterDownload: z.ZodBoolean;
241
+ title: z.ZodOptional<z.ZodString>;
242
+ }, z.core.$strip>;
243
+ state: z.ZodEnum<{
244
+ ready: "ready";
245
+ failed: "failed";
246
+ queued: "queued";
247
+ deleted: "deleted";
248
+ rendering: "rendering";
249
+ expired: "expired";
250
+ }>;
251
+ progressPct: z.ZodNullable<z.ZodNumber>;
252
+ fileBytes: z.ZodNullable<z.ZodNumber>;
253
+ expiresAt: z.ZodNumber;
254
+ deleteAfterDownload: z.ZodBoolean;
255
+ downloadedAt: z.ZodNullable<z.ZodNumber>;
256
+ createdAt: z.ZodNumber;
257
+ createdBy: z.ZodString;
258
+ error: z.ZodNullable<z.ZodString>;
259
+ }, z.core.$strip>, "mutation">;
260
+ /** Remove the file but keep the history row (state → 'deleted'). */
261
+ readonly deleteExport: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
262
+ exportId: z.ZodString;
263
+ }, z.core.$strip>, z.ZodObject<{
264
+ id: z.ZodString;
265
+ deviceId: z.ZodNumber;
266
+ profile: z.ZodString;
267
+ fromMs: z.ZodNumber;
268
+ toMs: z.ZodNumber;
269
+ options: z.ZodObject<{
270
+ speed: z.ZodOptional<z.ZodNumber>;
271
+ timelapse: z.ZodOptional<z.ZodObject<{
272
+ everyMs: z.ZodNumber;
273
+ outputFps: z.ZodOptional<z.ZodNumber>;
274
+ }, z.core.$strip>>;
275
+ includeAudio: z.ZodBoolean;
276
+ maxLifeMs: z.ZodNumber;
277
+ deleteAfterDownload: z.ZodBoolean;
278
+ title: z.ZodOptional<z.ZodString>;
279
+ }, z.core.$strip>;
280
+ state: z.ZodEnum<{
281
+ ready: "ready";
282
+ failed: "failed";
283
+ queued: "queued";
284
+ deleted: "deleted";
285
+ rendering: "rendering";
286
+ expired: "expired";
287
+ }>;
288
+ progressPct: z.ZodNullable<z.ZodNumber>;
289
+ fileBytes: z.ZodNullable<z.ZodNumber>;
290
+ expiresAt: z.ZodNumber;
291
+ deleteAfterDownload: z.ZodBoolean;
292
+ downloadedAt: z.ZodNullable<z.ZodNumber>;
293
+ createdAt: z.ZodNumber;
294
+ createdBy: z.ZodString;
295
+ error: z.ZodNullable<z.ZodString>;
296
+ }, z.core.$strip>, "mutation">;
297
+ readonly getDownloadUrl: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
298
+ exportId: z.ZodString;
299
+ }, z.core.$strip>, z.ZodObject<{
300
+ url: z.ZodString;
301
+ endpoints: z.ZodArray<z.ZodString>;
302
+ }, z.core.$strip>, "query">;
303
+ };
304
+ };
305
+ export type IRecordingExportProvider = InferProvider<typeof recordingExportCapability>;
@@ -464,14 +464,68 @@ export declare const recordingCapability: {
464
464
  storageBytes: z.ZodNumber;
465
465
  }, z.core.$strip>, "mutation">;
466
466
  /** Apply this device's retention policy to footage now; returns the oldest
467
- * surviving footage start (the retention floor) or null if no footage. */
467
+ * surviving footage start (the retention floor) or null if no footage. The
468
+ * prune is logged to the recordings ops-log with `reason` (default
469
+ * `'retention'` — the policy-driven prune; `'quota'` when disk-pressure
470
+ * triggered). */
468
471
  readonly pruneFootage: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
469
472
  deviceId: z.ZodNumber;
473
+ reason: z.ZodOptional<z.ZodEnum<{
474
+ manual: "manual";
475
+ retention: "retention";
476
+ quota: "quota";
477
+ operator: "operator";
478
+ }>>;
470
479
  }, z.core.$strip>, z.ZodObject<{
471
480
  floorMs: z.ZodNullable<z.ZodNumber>;
472
481
  deletedBuckets: z.ZodNumber;
473
482
  reclaimedBytes: z.ZodNumber;
474
483
  }, z.core.$strip>, "mutation">;
484
+ /**
485
+ * Manually delete a camera's footage — the whole footprint, or a
486
+ * `[fromMs, toMs)` window when either bound is given. Logged to the
487
+ * recordings ops-log as `op:'manual-delete', reason:'manual'`. Destructive:
488
+ * the admin UI guards it behind a confirm.
489
+ */
490
+ readonly deleteFootprint: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
491
+ deviceId: z.ZodNumber;
492
+ fromMs: z.ZodOptional<z.ZodNumber>;
493
+ toMs: z.ZodOptional<z.ZodNumber>;
494
+ }, z.core.$strip>, z.ZodObject<{
495
+ deletedBuckets: z.ZodNumber;
496
+ reclaimedBytes: z.ZodNumber;
497
+ }, z.core.$strip>, "mutation">;
498
+ /** The recordings ops-log rows (newest-first), optionally scoped to one
499
+ * camera. Backed by the recorder's bounded DurableState ring. */
500
+ readonly listOpsLog: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
501
+ deviceId: z.ZodOptional<z.ZodNumber>;
502
+ limit: z.ZodOptional<z.ZodNumber>;
503
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
504
+ id: z.ZodString;
505
+ at: z.ZodNumber;
506
+ domain: z.ZodEnum<{
507
+ events: "events";
508
+ recording: "recording";
509
+ }>;
510
+ op: z.ZodEnum<{
511
+ prune: "prune";
512
+ "manual-delete": "manual-delete";
513
+ rescan: "rescan";
514
+ "retention-run": "retention-run";
515
+ }>;
516
+ reason: z.ZodEnum<{
517
+ manual: "manual";
518
+ retention: "retention";
519
+ quota: "quota";
520
+ operator: "operator";
521
+ }>;
522
+ deviceId: z.ZodNullable<z.ZodNumber>;
523
+ nodeId: z.ZodString;
524
+ itemsAffected: z.ZodNumber;
525
+ bytesReclaimed: z.ZodNumber;
526
+ detail: z.ZodNullable<z.ZodString>;
527
+ actor: z.ZodString;
528
+ }, z.core.$strip>>>, "query">;
475
529
  };
476
530
  };
477
531
  export type IRecordingProvider = InferProvider<typeof recordingCapability>;