@camstack/types 1.2.127 → 1.2.129

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-CWWLTM6W.js");
3
+ const require_sleep = require("./sleep-D5821NGq.js");
4
4
  const require_err_msg = require("./err-msg-COpsHMw2.js");
5
5
  //#region src/generated/cap-input-defaults.ts
6
6
  /**
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-bm0x6zZF.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-BS40IUZZ.mjs";
3
3
  import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
4
4
  //#region src/generated/cap-input-defaults.ts
5
5
  /**
@@ -199,7 +199,7 @@ export declare const faceGalleryCapability: {
199
199
  }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
200
200
  key: z.ZodString;
201
201
  kind: z.ZodString;
202
- base64: z.ZodString;
202
+ url: z.ZodString;
203
203
  sizeBytes: z.ZodNumber;
204
204
  timestamp: z.ZodNumber;
205
205
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
@@ -55,17 +55,17 @@ export { DiscoveredDeviceSchema, deviceProviderCapability, ProviderStatusSchema,
55
55
  export { deviceStateCapability } from './device-state.cap.js';
56
56
  export type { IEmbeddingEncoderProvider } from './embedding-encoder.cap.js';
57
57
  export { EmbeddingInfoSchema, EmbeddingResultSchema, embeddingEncoderCapability, } from './embedding-encoder.cap.js';
58
+ export type { FailureContribution, IFailureContributionProvider, } from './failure-contribution.cap.js';
59
+ export { FailureContributionSchema, FailureReasonCountSchema, failureContributionCapability, } from './failure-contribution.cap.js';
58
60
  export { filesystemBrowseCapability, type IFilesystemBrowseProvider, } from './filesystem-browse.cap.js';
59
61
  export { type HfModelResolution, HfModelResolutionSchema, type ILlmProvider, type LlmDefault, LlmDefaultSchema, type LlmDefaultSelector, LlmDefaultSelectorSchema, type LlmProfile, type LlmProfileKind, type LlmProfileKindDescriptor, LlmProfileKindDescriptorSchema, LlmProfileKindSchema, LlmProfileSchema, type LlmRuntimeNode, LlmRuntimeNodeSchema, type LlmUsageRollup, LlmUsageRollupSchema, llmCapability, type ManagedModelCatalogEntry, ManagedModelCatalogEntrySchema, } from './llm.cap.js';
60
62
  export { type ILlmRuntimeProvider, type LlmDownloadProgress, LlmDownloadProgressSchema, type LlmNodeModel, LlmNodeModelSchema, type LlmRuntimeCompleteInput, LlmRuntimeCompleteInputSchema, type LlmRuntimeDiskUsage, LlmRuntimeDiskUsageSchema, type LlmRuntimeStatus, LlmRuntimeStatusSchema, llmRuntimeCapability, type ManagedModelExtraFile, ManagedModelExtraFileSchema, type ManagedModelRef, ManagedModelRefSchema, type ManagedRuntimeConfig, ManagedRuntimeConfigSchema, } from './llm-runtime.cap.js';
61
63
  export { type LlmErrorCode, LlmErrorCodeSchema, type LlmGenerateBaseInput, LlmGenerateBaseInputSchema, type LlmGenerateErr, LlmGenerateErrSchema, type LlmGenerateOk, LlmGenerateOkSchema, type LlmGenerateResult, LlmGenerateResultSchema, type LlmImage, LlmImageSchema, type LlmRetryPolicy, LlmRetryPolicySchema, LlmTimeoutDefaults, type LlmUsage, LlmUsageSchema, } from './llm-shared.js';
64
+ export type { ILoadContributionProvider, LoadContribution, LoadContributionAttribution, LoadContributionRole, } from './load-contribution.cap.js';
65
+ export { LOAD_CONTRIBUTION_ATTRIBUTIONS, LOAD_CONTRIBUTION_ROLES, LoadContributionSchema, loadContributionCapability, } from './load-contribution.cap.js';
62
66
  export type { ILogChannelsProvider, LogChannelApplyResult } from './log-channels.cap.js';
63
67
  export { LogChannelApplyResultSchema, logChannelsCapability } from './log-channels.cap.js';
64
68
  export { LogEntrySchema, LogLevelSchema, logDestinationCapability } from './log-destination.cap.js';
65
- export type { FailureContribution, IFailureContributionProvider, } from './failure-contribution.cap.js';
66
- export { FailureContributionSchema, FailureReasonCountSchema, failureContributionCapability, } from './failure-contribution.cap.js';
67
- export type { ILoadContributionProvider, LoadContribution, LoadContributionAttribution, LoadContributionRole, } from './load-contribution.cap.js';
68
- export { LOAD_CONTRIBUTION_ATTRIBUTIONS, LOAD_CONTRIBUTION_ROLES, LoadContributionSchema, loadContributionCapability, } from './load-contribution.cap.js';
69
69
  export type { ILoginMethodProvider, LoginMethodContribution, LoginStage, PasskeyLoginMethod, RedirectLoginMethod, WidgetLoginMethod, } from './login-method.cap.js';
70
70
  export { LoginMethodContributionSchema, LoginStageEnum, loginMethodCapability, PasskeyLoginMethodSchema, RedirectLoginMethodSchema, WidgetLoginMethodSchema, } from './login-method.cap.js';
71
71
  export { type IMetricsProvider, metricsProviderCapability, SystemMetricsSchema, } from './metrics-provider.cap.js';
@@ -82,13 +82,13 @@ 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 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 MediaFile, type MediaFileInfo, MediaFileInfoSchema, type MediaFileKind, MediaFileSchema, type MotionEvent, MotionEventSchema, type ObjectEvent, ObjectEventSchema, pipelineAnalyticsCapability, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type AnalyticsGroupDetail, AnalyticsGroupDetailSchema, type AnalyticsGroupMember, AnalyticsGroupMemberSchema, type AnalyticsGroupRecord, AnalyticsGroupRecordSchema, type ListGroupsPage, ListGroupsPageSchema, type ListGroupsQuery, ListGroupsQueryInput, 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 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';
89
89
  export { AgentLoadSummarySchema, CameraAssignmentStatusSchema, CameraAudioStatusSchema, CameraBrokerProfileSchema, CameraBrokerStatusSchema, CameraDecoderShmSchema, CameraDecoderStatusSchema, CameraDetectionPhaseSchema, CameraDetectionProvisioningSchema, CameraDetectionProvisioningStateSchema, CameraDetectionStatusSchema, CameraMotionStatusSchema, CameraRecordingModeSchema, CameraRecordingStatusSchema, CameraSourceStatusSchema, CameraSourceStreamSchema, CameraStatusDegradationReasonSchema, CameraStatusDegradationSchema, CameraStatusSchema, CameraStatusStageSchema, CapabilityBindingsSchema, DiskReconcileJobSchema, GlobalMetricsSchema, INFERENCE_DEVICE_EXCLUSION_REASONS, InferenceDeviceExclusionReasonSchema, IngestOwnerSchema, PipelineAssignmentSchema, pipelineOrchestratorCapability, } from './pipeline-orchestrator.cap.js';
90
90
  export type { DetailParent, DetailResult, MotionSource, MotionSources, ReportMotionInput, RunDetailSubtreeInput, RunDetailSubtreeResult, RunnerFrameSource, RunnerInferenceDevice, RunStatelessStepInput, RunStatelessStepResult, StatelessStepRefusal, } from './pipeline-runner.cap.js';
91
- export { MotionSourceEnum, MotionSourcesSchema, type NativeCropBbox, NativeCropBboxSchema, NativeCropResultSchema, pipelineRunnerCapability, ReportMotionInputSchema, RunnerCameraConfigSchema, RunnerCameraDeviceUIFields, RunnerFrameSourceSchema, RunnerInferenceDeviceSchema, FrameLazyCountersSchema, FrameLazyMetricsSchema, RunnerLocalLoadSchema, RunnerLocalMetricsSchema, } from './pipeline-runner.cap.js';
91
+ export { FrameLazyCountersSchema, FrameLazyMetricsSchema, MotionSourceEnum, MotionSourcesSchema, type NativeCropBbox, NativeCropBboxSchema, NativeCropResultSchema, pipelineRunnerCapability, ReportMotionInputSchema, RunnerCameraConfigSchema, RunnerCameraDeviceUIFields, RunnerFrameSourceSchema, RunnerInferenceDeviceSchema, RunnerLocalLoadSchema, RunnerLocalMetricsSchema, } from './pipeline-runner.cap.js';
92
92
  export { AudioChunkInputSchema, AudioClassificationLabelSchema, AudioLevelSchema, BoundingBoxSchema, FrameInputSchema, SpatialDetectionSchema, } from './schemas/detection-shared.js';
93
93
  export { CameraMetricsSchema, CameraMetricsWithDeviceIdSchema, OrchestratorMetricsSchema, } from './schemas/orchestrator-metrics.js';
94
94
  export type { CameraStream, CamProfile, CamStreamKind, DecodedAudioChunkWire, FrameHandleFormat, ProfileRtspEntry, ProfileSlot, ProfileSlotStatus, SubscribeAudioChunksInput, SubscribeAudioChunksResult, SubscribeFramesInput, SubscribeFramesResult, } from './schemas/streaming-shared.js';
@@ -267,6 +267,7 @@ import type { enumSensorCapability } from './enum-sensor.cap.js';
267
267
  import type { eventEmitterCapability } from './event-emitter.cap.js';
268
268
  import type { eventsCapability } from './events.cap.js';
269
269
  import type { faceGalleryCapability } from './face-gallery.cap.js';
270
+ import type { failureContributionCapability } from './failure-contribution.cap.js';
270
271
  import type { fanControlCapability } from './fan-control.cap.js';
271
272
  import type { featureProbeCapability } from './feature-probe.cap.js';
272
273
  import type { filesystemBrowseCapability } from './filesystem-browse.cap.js';
@@ -281,11 +282,10 @@ import type { intercomCapability } from './intercom.cap.js';
281
282
  import type { lawnMowerControlCapability } from './lawn-mower-control.cap.js';
282
283
  import type { llmCapability } from './llm.cap.js';
283
284
  import type { llmRuntimeCapability } from './llm-runtime.cap.js';
285
+ import type { loadContributionCapability } from './load-contribution.cap.js';
284
286
  import type { localNetworkCapability } from './local-network.cap.js';
285
287
  import type { lockControlCapability } from './lock-control.cap.js';
286
288
  import type { logChannelsCapability } from './log-channels.cap.js';
287
- import type { failureContributionCapability } from './failure-contribution.cap.js';
288
- import type { loadContributionCapability } from './load-contribution.cap.js';
289
289
  import type { logDestinationCapability } from './log-destination.cap.js';
290
290
  import type { loginMethodCapability } from './login-method.cap.js';
291
291
  import type { mediaPlayerCapability } from './media-player.cap.js';
@@ -619,6 +619,85 @@ declare const MediaFileKindEnum: z.ZodEnum<{
619
619
  thumbnailSmall: "thumbnailSmall";
620
620
  }>;
621
621
  export type MediaFileKind = z.infer<typeof MediaFileKindEnum>;
622
+ /**
623
+ * One media row's IDENTITY and shape, with no representation of its bytes.
624
+ *
625
+ * This is the half of a media row that is cheap: it comes out of the index
626
+ * without opening a blob, and it is everything a client needs to decide what
627
+ * to render before it renders anything. Both wire shapes below are this plus
628
+ * an address; the STORE's own read-back shape ({@link MediaFileBytes}) is this
629
+ * plus the bytes.
630
+ */
631
+ declare const MediaFileRefSchema: z.ZodObject<{
632
+ key: z.ZodString;
633
+ kind: z.ZodEnum<{
634
+ crop: "crop";
635
+ snapshot: "snapshot";
636
+ keyFrame: "keyFrame";
637
+ thumbnail: "thumbnail";
638
+ firstFrame: "firstFrame";
639
+ lastFrame: "lastFrame";
640
+ fullFrame: "fullFrame";
641
+ fullFrameBoxed: "fullFrameBoxed";
642
+ faceCrop: "faceCrop";
643
+ plateCrop: "plateCrop";
644
+ keyFrameSmall: "keyFrameSmall";
645
+ thumbnailSmall: "thumbnailSmall";
646
+ }>;
647
+ sizeBytes: z.ZodNumber;
648
+ timestamp: z.ZodNumber;
649
+ }, z.core.$strip>;
650
+ export type MediaFileRef = z.infer<typeof MediaFileRefSchema>;
651
+ /**
652
+ * A media row AS STORED — its ref plus its bytes, base64.
653
+ *
654
+ * **This is not a wire shape and must never become one.** It is what
655
+ * `MediaStore` reads back and what every server-side picker
656
+ * (`pickCleanMedia`, `pickTrackFallbackMedia`, the last-frame promotion, the
657
+ * track-close ladder) works over, because those decide BETWEEN blobs and then
658
+ * hand exactly one of them to something that needs the pixels. A client never
659
+ * gets this: it gets {@link MediaFile}, and fetches the bytes by URL.
660
+ */
661
+ export interface MediaFileBytes extends MediaFileRef {
662
+ readonly base64: string;
663
+ }
664
+ /**
665
+ * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
666
+ * ARE — never the bytes themselves.
667
+ *
668
+ * ## Why `url` and not `base64`
669
+ *
670
+ * Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
671
+ * with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
672
+ * was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
673
+ * wire. Forty events is ~144 MB. Every byte of it was read off disk,
674
+ * base64-encoded, held whole in a unary tRPC envelope, and materialised in
675
+ * hub-main's heap on the way past — for an `<img>` that would have cached it.
676
+ *
677
+ * `url` points at the `event-media` data plane
678
+ * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
679
+ * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
680
+ * render a `?variant=thumb`, and streams. The hub gate in front of it requires
681
+ * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
682
+ * no less protected than they were inside a `view`-level cap response — see
683
+ * `data-plane-access.ts` for the rule and the one gap it does not close
684
+ * (per-device scoping).
685
+ *
686
+ * The URL is built from the row's **stored** key, which is not always its
687
+ * published `kind`: a track's face/plate crop is stored as `crop` under
688
+ * `('face'|'plate', '<prefix>-<trackId>')` and published as
689
+ * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
690
+ *
691
+ * ## `base64` is TRANSITIONAL and is going away
692
+ *
693
+ * It is still populated for one reason: the deployed viewer's track-detail
694
+ * HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
695
+ * REQUIRES the field), and a row without it parses as a FAILED read — the red
696
+ * triangle — not as absence. Removing the field before that viewer ships is an
697
+ * outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
698
+ * delete this line and the `withBytes` pass-through in
699
+ * `analytics-query-facade.ts`; nothing else reads it.
700
+ */
622
701
  declare const MediaFileSchema: z.ZodObject<{
623
702
  key: z.ZodString;
624
703
  kind: z.ZodEnum<{
@@ -635,9 +714,10 @@ declare const MediaFileSchema: z.ZodObject<{
635
714
  keyFrameSmall: "keyFrameSmall";
636
715
  thumbnailSmall: "thumbnailSmall";
637
716
  }>;
638
- base64: z.ZodString;
639
717
  sizeBytes: z.ZodNumber;
640
718
  timestamp: z.ZodNumber;
719
+ url: z.ZodString;
720
+ base64: z.ZodString;
641
721
  }, z.core.$strip>;
642
722
  export type MediaFile = z.infer<typeof MediaFileSchema>;
643
723
  /**
@@ -650,7 +730,9 @@ export type MediaFile = z.infer<typeof MediaFileSchema>;
650
730
  * blocks the whole view.
651
731
  *
652
732
  * `sizeBytes` is carried because it is what lets a client decide between the
653
- * stored blob and a `?variant=thumb` rendering without fetching either.
733
+ * stored blob and a `?variant=thumb` rendering without fetching either, and
734
+ * `url` because a client that had to build the plane path itself is a second
735
+ * copy of a route — the embed, the viewer and the admin UI each grew one.
654
736
  */
655
737
  declare const MediaFileInfoSchema: z.ZodObject<{
656
738
  key: z.ZodString;
@@ -669,6 +751,7 @@ declare const MediaFileInfoSchema: z.ZodObject<{
669
751
  keyFrameSmall: "keyFrameSmall";
670
752
  thumbnailSmall: "thumbnailSmall";
671
753
  }>;
754
+ url: z.ZodString;
672
755
  sizeBytes: z.ZodNumber;
673
756
  }, z.core.$strip>;
674
757
  export type MediaFileInfo = z.infer<typeof MediaFileInfoSchema>;
@@ -1333,6 +1416,75 @@ declare const EventStoreFootprintSchema: z.ZodObject<{
1333
1416
  }, z.core.$strip>>>;
1334
1417
  }, z.core.$strip>;
1335
1418
  export type EventStoreFootprint = z.infer<typeof EventStoreFootprintSchema>;
1419
+ /** Event-media footprint for one {@link MediaFileKind}. */
1420
+ declare const EventMediaKindFootprintSchema: z.ZodObject<{
1421
+ kind: z.ZodEnum<{
1422
+ crop: "crop";
1423
+ snapshot: "snapshot";
1424
+ keyFrame: "keyFrame";
1425
+ thumbnail: "thumbnail";
1426
+ firstFrame: "firstFrame";
1427
+ lastFrame: "lastFrame";
1428
+ fullFrame: "fullFrame";
1429
+ fullFrameBoxed: "fullFrameBoxed";
1430
+ faceCrop: "faceCrop";
1431
+ plateCrop: "plateCrop";
1432
+ keyFrameSmall: "keyFrameSmall";
1433
+ thumbnailSmall: "thumbnailSmall";
1434
+ }>;
1435
+ rows: z.ZodNumber;
1436
+ bytes: z.ZodNumber;
1437
+ }, z.core.$strip>;
1438
+ export type EventMediaKindFootprint = z.infer<typeof EventMediaKindFootprintSchema>;
1439
+ /**
1440
+ * The media footprint broken down by KIND — the axis a deletion decision
1441
+ * actually turns on.
1442
+ *
1443
+ * A byte total says how much there is; it cannot say what is safe to remove.
1444
+ * The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
1445
+ * motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
1446
+ * `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
1447
+ * buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
1448
+ * nothing else, so sizing a deletion means summing per kind.
1449
+ *
1450
+ * ## Why `unaccounted*` exists
1451
+ *
1452
+ * `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
1453
+ * writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
1454
+ * from a SEPARATE unfiltered aggregate over the same rows, never from adding
1455
+ * `kinds` up. A row whose stored `kind` is not in the enum (written by a
1456
+ * retired code path, or by a version that knew a kind this one does not) would
1457
+ * otherwise vanish from the total silently, and an operator would delete
1458
+ * against a denominator smaller than the disk.
1459
+ *
1460
+ * `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
1461
+ * zero; a non-zero value is a real finding and must be shown, not rounded away.
1462
+ */
1463
+ declare const EventMediaKindBreakdownSchema: z.ZodObject<{
1464
+ totalRows: z.ZodNumber;
1465
+ totalBytes: z.ZodNumber;
1466
+ kinds: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1467
+ kind: z.ZodEnum<{
1468
+ crop: "crop";
1469
+ snapshot: "snapshot";
1470
+ keyFrame: "keyFrame";
1471
+ thumbnail: "thumbnail";
1472
+ firstFrame: "firstFrame";
1473
+ lastFrame: "lastFrame";
1474
+ fullFrame: "fullFrame";
1475
+ fullFrameBoxed: "fullFrameBoxed";
1476
+ faceCrop: "faceCrop";
1477
+ plateCrop: "plateCrop";
1478
+ keyFrameSmall: "keyFrameSmall";
1479
+ thumbnailSmall: "thumbnailSmall";
1480
+ }>;
1481
+ rows: z.ZodNumber;
1482
+ bytes: z.ZodNumber;
1483
+ }, z.core.$strip>>>;
1484
+ unaccountedRows: z.ZodNumber;
1485
+ unaccountedBytes: z.ZodNumber;
1486
+ }, z.core.$strip>;
1487
+ export type EventMediaKindBreakdown = z.infer<typeof EventMediaKindBreakdownSchema>;
1336
1488
  /** Per-kind counts returned by the event-prune / device-delete mutations. */
1337
1489
  declare const EventPruneCountsSchema: z.ZodObject<{
1338
1490
  motion: z.ZodNumber;
@@ -2337,6 +2489,44 @@ export declare const pipelineAnalyticsCapability: {
2337
2489
  bytes: z.ZodNumber;
2338
2490
  }, z.core.$strip>>>;
2339
2491
  }, z.core.$strip>, "query">;
2492
+ /**
2493
+ * The same media footprint, broken down by {@link MediaFileKind} instead of
2494
+ * by camera — fleet-wide, or for one camera with `deviceId`.
2495
+ *
2496
+ * Separate from {@link getEventStoreFootprint} rather than a field on it:
2497
+ * the two answer different questions on different axes, the per-camera one
2498
+ * is what the management table renders on every open, and nothing should
2499
+ * pay for a per-kind pass to draw it. See
2500
+ * {@link EventMediaKindBreakdownSchema} for why `unaccounted*` exists —
2501
+ * `kinds` is enumerated, `totalBytes` is not, and the gap must be visible
2502
+ * to anyone sizing a deletion against it.
2503
+ */
2504
+ readonly getEventMediaFootprintByKind: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
2505
+ deviceId: z.ZodOptional<z.ZodNumber>;
2506
+ }, z.core.$strip>, z.ZodObject<{
2507
+ totalRows: z.ZodNumber;
2508
+ totalBytes: z.ZodNumber;
2509
+ kinds: z.ZodReadonly<z.ZodArray<z.ZodObject<{
2510
+ kind: z.ZodEnum<{
2511
+ crop: "crop";
2512
+ snapshot: "snapshot";
2513
+ keyFrame: "keyFrame";
2514
+ thumbnail: "thumbnail";
2515
+ firstFrame: "firstFrame";
2516
+ lastFrame: "lastFrame";
2517
+ fullFrame: "fullFrame";
2518
+ fullFrameBoxed: "fullFrameBoxed";
2519
+ faceCrop: "faceCrop";
2520
+ plateCrop: "plateCrop";
2521
+ keyFrameSmall: "keyFrameSmall";
2522
+ thumbnailSmall: "thumbnailSmall";
2523
+ }>;
2524
+ rows: z.ZodNumber;
2525
+ bytes: z.ZodNumber;
2526
+ }, z.core.$strip>>>;
2527
+ unaccountedRows: z.ZodNumber;
2528
+ unaccountedBytes: z.ZodNumber;
2529
+ }, z.core.$strip>, "query">;
2340
2530
  /**
2341
2531
  * Cluster-wide prune of events older than `olderThanMs` (exclusive) across
2342
2532
  * every camera, deleting each event's media in lockstep. Logged to the
@@ -3141,9 +3331,10 @@ export declare const pipelineAnalyticsCapability: {
3141
3331
  keyFrameSmall: "keyFrameSmall";
3142
3332
  thumbnailSmall: "thumbnailSmall";
3143
3333
  }>;
3144
- base64: z.ZodString;
3145
3334
  sizeBytes: z.ZodNumber;
3146
3335
  timestamp: z.ZodNumber;
3336
+ url: z.ZodString;
3337
+ base64: z.ZodString;
3147
3338
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
3148
3339
  /** All media rows owned by a track. `kinds` narrows to a kind subset so a
3149
3340
  * client can fetch the SMALL display variants on open and pull the
@@ -3182,9 +3373,10 @@ export declare const pipelineAnalyticsCapability: {
3182
3373
  keyFrameSmall: "keyFrameSmall";
3183
3374
  thumbnailSmall: "thumbnailSmall";
3184
3375
  }>;
3185
- base64: z.ZodString;
3186
3376
  sizeBytes: z.ZodNumber;
3187
3377
  timestamp: z.ZodNumber;
3378
+ url: z.ZodString;
3379
+ base64: z.ZodString;
3188
3380
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
3189
3381
  /**
3190
3382
  * What media a track HAS, without any of it.
@@ -3221,6 +3413,46 @@ export declare const pipelineAnalyticsCapability: {
3221
3413
  keyFrameSmall: "keyFrameSmall";
3222
3414
  thumbnailSmall: "thumbnailSmall";
3223
3415
  }>;
3416
+ url: z.ZodString;
3417
+ sizeBytes: z.ZodNumber;
3418
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
3419
+ /**
3420
+ * What media an EVENT has, without any of it — the twin `getEventMedia`
3421
+ * never had.
3422
+ *
3423
+ * `listTrackMedia` above got this treatment because a track's media is
3424
+ * 5-8 MB. An event's is worse per row, not better: an old-style event owns
3425
+ * a `crop` AND a native-resolution `fullFrameBoxed`, and the track DETAIL
3426
+ * modal — the one surface that legitimately shows the big kinds — unions
3427
+ * both listings to build its filmstrip. It then renders every tile from
3428
+ * the `event-media` plane by key and throws the bytes away. Measured on
3429
+ * the live hub: one event's `fullFrameBoxed` is 2 824 077 B, base64'd to
3430
+ * ~3.8 MB, allocated whole in hub-main's heap, for a list of keys.
3431
+ *
3432
+ * Same `deviceId` authorization subject as `getEventMedia`, and the same
3433
+ * rows — this is a projection of that method, never a different question.
3434
+ */
3435
+ readonly listEventMedia: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
3436
+ eventId: z.ZodString;
3437
+ deviceId: z.ZodNumber;
3438
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
3439
+ key: z.ZodString;
3440
+ timestamp: z.ZodNumber;
3441
+ kind: z.ZodEnum<{
3442
+ crop: "crop";
3443
+ snapshot: "snapshot";
3444
+ keyFrame: "keyFrame";
3445
+ thumbnail: "thumbnail";
3446
+ firstFrame: "firstFrame";
3447
+ lastFrame: "lastFrame";
3448
+ fullFrame: "fullFrame";
3449
+ fullFrameBoxed: "fullFrameBoxed";
3450
+ faceCrop: "faceCrop";
3451
+ plateCrop: "plateCrop";
3452
+ keyFrameSmall: "keyFrameSmall";
3453
+ thumbnailSmall: "thumbnailSmall";
3454
+ }>;
3455
+ url: z.ZodString;
3224
3456
  sizeBytes: z.ZodNumber;
3225
3457
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
3226
3458
  /**
@@ -3397,6 +3629,6 @@ export declare const pipelineAnalyticsCapability: {
3397
3629
  };
3398
3630
  };
3399
3631
  export type IPipelineAnalyticsProvider = InferProvider<typeof pipelineAnalyticsCapability>;
3400
- export { AudioEventSchema, EventKindDescriptorSchema, EventKindSchema, EventKindsForDeviceSchema, KeyEventSchema, MediaFileInfoSchema, MediaFileKindEnum, MediaFileSchema, MotionEventSchema, ObjectEventSchema, RecentTracksPageSchema, RecentTracksQueryInput, SensorEventSchema, TrackAudioLabelSchema, TrackCascadeCountsSchema, TrackEnvelopeSchema,
3632
+ export { AudioEventSchema, EventKindDescriptorSchema, EventKindSchema, EventKindsForDeviceSchema, KeyEventSchema, MediaFileInfoSchema, MediaFileKindEnum, MediaFileRefSchema, MediaFileSchema, MotionEventSchema, ObjectEventSchema, RecentTracksPageSchema, RecentTracksQueryInput, SensorEventSchema, TrackAudioLabelSchema, TrackCascadeCountsSchema, TrackEnvelopeSchema,
3401
3633
  /** No longer carried on onFrameTracked (two-plane re-injection) — kept for compat. */
3402
3634
  TrackedDetectionSchema, TrackProjectionSchema, TrackSchema, TrackStateSchema, TrackZoneFilterSchema, };
@@ -106,7 +106,7 @@ export declare const plateGalleryCapability: {
106
106
  }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
107
107
  key: z.ZodString;
108
108
  kind: z.ZodString;
109
- base64: z.ZodString;
109
+ url: z.ZodString;
110
110
  sizeBytes: z.ZodNumber;
111
111
  timestamp: z.ZodNumber;
112
112
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { type InferProvider } from './capability-definition.js';
3
2
  import { StorageLocationTypeSchema } from '../interfaces/storage-location.js';
3
+ import { type InferProvider } from './capability-definition.js';
4
4
  /**
5
5
  * `storage` — singleton consumer-facing capability owned by the
6
6
  * `storage-orchestrator` builtin (Task 4 of the storage-unification
@@ -214,6 +214,7 @@ export declare const storageCapability: {
214
214
  }, z.core.$strip>], "shouldSaveDiskSpace">>>, import("./capability-definition.js").CapabilityMethodKind>;
215
215
  readonly testConfig: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
216
216
  providerId: z.ZodString;
217
+ locationId: z.ZodOptional<z.ZodString>;
217
218
  config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
218
219
  }, z.core.$strip>, z.ZodObject<{
219
220
  ok: z.ZodBoolean;
@@ -5058,6 +5058,13 @@ export type AppRouter = TrpcCoreRouter<{
5058
5058
  output: z.infer<typeof pipelineAnalyticsCapability.methods.getEventStoreFootprint.output>;
5059
5059
  meta: object;
5060
5060
  }>;
5061
+ getEventMediaFootprintByKind: TRPCQueryProcedure<{
5062
+ input: {
5063
+ [x: string]: unknown;
5064
+ } & z.input<typeof pipelineAnalyticsCapability.methods.getEventMediaFootprintByKind.input>;
5065
+ output: z.infer<typeof pipelineAnalyticsCapability.methods.getEventMediaFootprintByKind.output>;
5066
+ meta: object;
5067
+ }>;
5061
5068
  pruneEvents: TRPCMutationProcedure<{
5062
5069
  input: {
5063
5070
  [x: string]: unknown;
@@ -5275,6 +5282,13 @@ export type AppRouter = TrpcCoreRouter<{
5275
5282
  output: z.infer<typeof pipelineAnalyticsCapability.methods.listTrackMedia.output>;
5276
5283
  meta: object;
5277
5284
  }>;
5285
+ listEventMedia: TRPCQueryProcedure<{
5286
+ input: {
5287
+ [x: string]: unknown;
5288
+ } & z.input<typeof pipelineAnalyticsCapability.methods.listEventMedia.input>;
5289
+ output: z.infer<typeof pipelineAnalyticsCapability.methods.listEventMedia.output>;
5290
+ meta: object;
5291
+ }>;
5278
5292
  searchObjectEvents: TRPCQueryProcedure<{
5279
5293
  input: {
5280
5294
  [x: string]: unknown;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 986 method paths across 126 capabilities.
9
+ * Coverage: 988 method paths across 126 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -6,7 +6,7 @@
6
6
  * system-scope cap that takes a deviceId was previously never device-filtered
7
7
  * — see the generator header).
8
8
  *
9
- * Coverage: 345 methods carry a device reference, of which
9
+ * Coverage: 347 methods carry a device reference, of which
10
10
  * 129 are on SYSTEM-scope caps.
11
11
  *
12
12
  * Top-level fields, number arrays, and one-level arrays of objects carrying