@camstack/types 1.1.48 → 1.1.49

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-BfvNtyu8.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-DOq2moJx.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 };
@@ -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<{
@@ -922,6 +926,7 @@ export declare const pipelineAnalyticsCapability: {
922
926
  vehicle: "vehicle";
923
927
  animal: "animal";
924
928
  motion: "motion";
929
+ package: "package";
925
930
  door: "door";
926
931
  pir: "pir";
927
932
  smoke: "smoke";
@@ -932,6 +937,7 @@ export declare const pipelineAnalyticsCapability: {
932
937
  audio: "audio";
933
938
  custom: "custom";
934
939
  motion: "motion";
940
+ package: "package";
935
941
  detection: "detection";
936
942
  }>;
937
943
  source: z.ZodObject<{
@@ -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>;
@@ -12,6 +12,7 @@ import { DeviceType } from '../device/device-type.js';
12
12
  */
13
13
  export declare const ZoneRuleStageEnum: z.ZodEnum<{
14
14
  motion: "motion";
15
+ package: "package";
15
16
  detection: "detection";
16
17
  }>;
17
18
  export type ZoneRuleStage = z.infer<typeof ZoneRuleStageEnum>;
@@ -44,6 +45,7 @@ export declare const zoneRulesCapability: {
44
45
  deviceId: z.ZodNumber;
45
46
  stage: z.ZodEnum<{
46
47
  motion: "motion";
48
+ package: "package";
47
49
  detection: "detection";
48
50
  }>;
49
51
  }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -68,6 +70,7 @@ export declare const zoneRulesCapability: {
68
70
  deviceId: z.ZodNumber;
69
71
  stage: z.ZodEnum<{
70
72
  motion: "motion";
73
+ package: "package";
71
74
  detection: "detection";
72
75
  }>;
73
76
  rules: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -87,12 +90,19 @@ export declare const zoneRulesCapability: {
87
90
  }, z.core.$strip>, z.ZodVoid, "mutation">;
88
91
  };
89
92
  /**
90
- * Runtime-state slice — both stages mirrored together so consumers
93
+ * Runtime-state slice — every stage mirrored together so consumers
91
94
  * see one reactive handle (`device.state.zoneRules.value`) instead
92
- * of two. Bulk-replace mutations on either stage write the full
93
- * `{motion, detection}` shape, so subscribers always get the
95
+ * of one per stage. Bulk-replace mutations on any stage write the full
96
+ * `{motion, detection, package}` shape, so subscribers always get the
94
97
  * complete current set. Consumers that only care about one stage
95
98
  * just read the matching property.
99
+ *
100
+ * `package` backs the package-drop detector — a package zone is a
101
+ * `ZoneRule` on the `'package'` stage referencing drawn polygons
102
+ * (see docs/superpowers/specs/2026-07-17-package-zones-design.md §3.1).
103
+ * The orchestrator provider that writes this stage lands in a later
104
+ * slice; until then the mirror carries only `{motion, detection}` and
105
+ * consumers read `package` as absent (treat as `[]`).
96
106
  */
97
107
  readonly runtimeState: z.ZodObject<{
98
108
  motion: z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -123,6 +133,20 @@ export declare const zoneRulesCapability: {
123
133
  preferMask: z.ZodOptional<z.ZodBoolean>;
124
134
  enabled: z.ZodDefault<z.ZodBoolean>;
125
135
  }, z.core.$strip>>>;
136
+ package: z.ZodReadonly<z.ZodArray<z.ZodObject<{
137
+ id: z.ZodString;
138
+ name: z.ZodOptional<z.ZodString>;
139
+ zoneIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
140
+ mode: z.ZodEnum<{
141
+ include: "include";
142
+ exclude: "exclude";
143
+ }>;
144
+ classFilter: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
145
+ overlapThreshold: z.ZodOptional<z.ZodNumber>;
146
+ bboxInclusionPct: z.ZodOptional<z.ZodNumber>;
147
+ preferMask: z.ZodOptional<z.ZodBoolean>;
148
+ enabled: z.ZodDefault<z.ZodBoolean>;
149
+ }, z.core.$strip>>>;
126
150
  }, z.core.$strip>;
127
151
  };
128
152
  export type IZoneRulesProvider = InferProvider<typeof zoneRulesCapability>;
@@ -150,6 +150,11 @@ export declare enum EventCategory {
150
150
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
151
151
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
152
152
  RecordingThumbSampled = "recording.thumb-sampled",
153
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
154
+ * progress bar the client reconciles via `recordingExport.getExport`. */
155
+ RecordingExportProgress = "recording.export.progress",
156
+ RecordingExportCompleted = "recording.export.completed",
157
+ RecordingExportFailed = "recording.export.failed",
153
158
  DetectionEvent = "detection.event",
154
159
  SessionTrackNew = "session.track.new",
155
160
  SessionTrackExpired = "session.track.expired",
@@ -438,6 +443,25 @@ export declare enum EventCategory {
438
443
  * `{ deviceId, entryId, className, phase:'appeared'|'departed', timestamp }`.
439
444
  */
440
445
  PipelineAnalyticsStationaryChanged = "pipeline-analytics.stationary-changed",
446
+ /**
447
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
448
+ * a package zone — a newly-appeared stationary object of a package class
449
+ * that cleared the class / zone / dwell / size gates. Payload:
450
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
451
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
452
+ * Telemetry (D8): the durable record is the `package-events` store row;
453
+ * this bus topic drives notifier rules + live UI. See
454
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
455
+ */
456
+ PipelineAnalyticsPackageDelivered = "pipeline-analytics.package-delivered",
457
+ /**
458
+ * Fired by `addon-post-analysis` when a previously-delivered package
459
+ * leaves its zone (the stationary entry departed — moved or swept).
460
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
461
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
462
+ * Telemetry (D8). See package-zones-design §5.2.
463
+ */
464
+ PipelineAnalyticsPackagePickedUp = "pipeline-analytics.package-picked-up",
441
465
  /**
442
466
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
443
467
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
package/dist/enums.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_event_category = require("./event-category-AkBNxg_X.js");
2
+ const require_event_category = require("./event-category-CGj9fI4L.js");
3
3
  //#region src/enums/event-source-type.ts
4
4
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
5
5
  EventSourceType["Addon"] = "addon";
package/dist/enums.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as EventCategory } from "./event-category-H4AVePnn.mjs";
1
+ import { t as EventCategory } from "./event-category-D4HJq7Mw.mjs";
2
2
  //#region src/enums/event-source-type.ts
3
3
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
4
4
  EventSourceType["Addon"] = "addon";
@@ -151,6 +151,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
151
151
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
152
152
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
153
153
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
154
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
155
+ * progress bar the client reconciles via `recordingExport.getExport`. */
156
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
157
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
158
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
154
159
  EventCategory["DetectionEvent"] = "detection.event";
155
160
  EventCategory["SessionTrackNew"] = "session.track.new";
156
161
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -440,6 +445,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
440
445
  */
441
446
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
442
447
  /**
448
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
449
+ * a package zone — a newly-appeared stationary object of a package class
450
+ * that cleared the class / zone / dwell / size gates. Payload:
451
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
452
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
453
+ * Telemetry (D8): the durable record is the `package-events` store row;
454
+ * this bus topic drives notifier rules + live UI. See
455
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
456
+ */
457
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
458
+ /**
459
+ * Fired by `addon-post-analysis` when a previously-delivered package
460
+ * leaves its zone (the stationary entry departed — moved or swept).
461
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
462
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
463
+ * Telemetry (D8). See package-zones-design §5.2.
464
+ */
465
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
466
+ /**
443
467
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
444
468
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
445
469
  * `'unassigned'` its identity link changed, `'deleted'` the row was
@@ -151,6 +151,11 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
151
151
  /** Runner-sampled scrub thumbnail (~1/5 s/camera). Telemetry (D8): a lost
152
152
  * thumb is a scrub gap the recorder's keyframe backfill covers. */
153
153
  EventCategory["RecordingThumbSampled"] = "recording.thumb-sampled";
154
+ /** Export render progress (0–100). Telemetry (D8): a lost tick is a stale
155
+ * progress bar the client reconciles via `recordingExport.getExport`. */
156
+ EventCategory["RecordingExportProgress"] = "recording.export.progress";
157
+ EventCategory["RecordingExportCompleted"] = "recording.export.completed";
158
+ EventCategory["RecordingExportFailed"] = "recording.export.failed";
154
159
  EventCategory["DetectionEvent"] = "detection.event";
155
160
  EventCategory["SessionTrackNew"] = "session.track.new";
156
161
  EventCategory["SessionTrackExpired"] = "session.track.expired";
@@ -440,6 +445,25 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
440
445
  */
441
446
  EventCategory["PipelineAnalyticsStationaryChanged"] = "pipeline-analytics.stationary-changed";
442
447
  /**
448
+ * Fired by `addon-post-analysis` when a package-drop is confirmed inside
449
+ * a package zone — a newly-appeared stationary object of a package class
450
+ * that cleared the class / zone / dwell / size gates. Payload:
451
+ * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
452
+ * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
453
+ * Telemetry (D8): the durable record is the `package-events` store row;
454
+ * this bus topic drives notifier rules + live UI. See
455
+ * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
456
+ */
457
+ EventCategory["PipelineAnalyticsPackageDelivered"] = "pipeline-analytics.package-delivered";
458
+ /**
459
+ * Fired by `addon-post-analysis` when a previously-delivered package
460
+ * leaves its zone (the stationary entry departed — moved or swept).
461
+ * Payload: `PipelineAnalyticsPackagePickedUpPayload` carrying
462
+ * `{ deviceId, entryId, deliveredEventId, className, timestamp }`.
463
+ * Telemetry (D8). See package-zones-design §5.2.
464
+ */
465
+ EventCategory["PipelineAnalyticsPackagePickedUp"] = "pipeline-analytics.package-picked-up";
466
+ /**
443
467
  * Fired by `addon-post-analysis` whenever a gallery face row changes:
444
468
  * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
445
469
  * `'unassigned'` its identity link changed, `'deleted'` the row was