@camstack/types 1.2.127 → 1.2.128

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-C3AniWy-.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-ot6dTHCA.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 EventPruneCounts, type EventStoreDeviceFootprint, type EventStoreFootprint, type IPipelineAnalyticsProvider, type KeyEvent, KeyEventSchema, type LabelAttribution, LabelAttributionSchema, type LabelTier, LabelTierSchema, type ListGroupsPage, ListGroupsPageSchema, type ListGroupsQuery, ListGroupsQueryInput, type MediaFile, type MediaFileBytes, type MediaFileInfo, MediaFileInfoSchema, type MediaFileKind, type MediaFileRef, MediaFileRefSchema, MediaFileSchema, type MotionEvent, MotionEventSchema, type ObjectEvent, ObjectEventSchema, pipelineAnalyticsCapability, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type RetrainAnnotation, type RetrainAnnotationDraft, RetrainAnnotationDraftSchema, RetrainAnnotationKindSchema, RetrainAnnotationSchema, RetrainAnnotationSourceSchema, type RetrainAssistResult, RetrainAssistResultSchema, RetrainAssistSubjectSchema, RetrainCopyRefusalSchema, type RetrainFrame, type RetrainFrameCandidate, RetrainFrameCandidateSchema, type RetrainFrameList, RetrainFrameListSchema, RetrainFrameSchema, type RetrainFrameSelection, RetrainFrameSelectionSchema, type RetrainMacroClass, RetrainMacroClassSchema, type RetrainStatus, RetrainStatusSchema, type RetrainTrack, RetrainTrackSchema, type RetrainTransitionResult, RetrainTransitionResultSchema, type ScoredObjectEvent, ScoredObjectEventSchema, type SensorEvent, SensorEventSchema, type Track, type TrackCascadeCounts, TrackCascadeCountsSchema, type TrackEnvelope, TrackEnvelopeSchema, TrackedDetectionSchema, type TrackFlags, type TrackFlagsPatch, TrackFlagsPatchSchema, TrackFlagsSchema, type TrackProjection, TrackProjectionSchema, TrackSchema, type TrackSource, TrackSourceSchema, type TrackState, TrackStateSchema, type TrackZoneFilter, TrackZoneFilterSchema, type TrainingExportDeviceTotals, TrainingExportDeviceTotalsSchema, type TrainingExportSummary, TrainingExportSummarySchema, type ZoneCrossing, type ZoneCrossingDirection, ZoneCrossingDirectionSchema, ZoneCrossingSchema, } from './pipeline-analytics.cap.js';
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>;
@@ -3141,9 +3224,10 @@ export declare const pipelineAnalyticsCapability: {
3141
3224
  keyFrameSmall: "keyFrameSmall";
3142
3225
  thumbnailSmall: "thumbnailSmall";
3143
3226
  }>;
3144
- base64: z.ZodString;
3145
3227
  sizeBytes: z.ZodNumber;
3146
3228
  timestamp: z.ZodNumber;
3229
+ url: z.ZodString;
3230
+ base64: z.ZodString;
3147
3231
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
3148
3232
  /** All media rows owned by a track. `kinds` narrows to a kind subset so a
3149
3233
  * client can fetch the SMALL display variants on open and pull the
@@ -3182,9 +3266,10 @@ export declare const pipelineAnalyticsCapability: {
3182
3266
  keyFrameSmall: "keyFrameSmall";
3183
3267
  thumbnailSmall: "thumbnailSmall";
3184
3268
  }>;
3185
- base64: z.ZodString;
3186
3269
  sizeBytes: z.ZodNumber;
3187
3270
  timestamp: z.ZodNumber;
3271
+ url: z.ZodString;
3272
+ base64: z.ZodString;
3188
3273
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
3189
3274
  /**
3190
3275
  * What media a track HAS, without any of it.
@@ -3221,6 +3306,46 @@ export declare const pipelineAnalyticsCapability: {
3221
3306
  keyFrameSmall: "keyFrameSmall";
3222
3307
  thumbnailSmall: "thumbnailSmall";
3223
3308
  }>;
3309
+ url: z.ZodString;
3310
+ sizeBytes: z.ZodNumber;
3311
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
3312
+ /**
3313
+ * What media an EVENT has, without any of it — the twin `getEventMedia`
3314
+ * never had.
3315
+ *
3316
+ * `listTrackMedia` above got this treatment because a track's media is
3317
+ * 5-8 MB. An event's is worse per row, not better: an old-style event owns
3318
+ * a `crop` AND a native-resolution `fullFrameBoxed`, and the track DETAIL
3319
+ * modal — the one surface that legitimately shows the big kinds — unions
3320
+ * both listings to build its filmstrip. It then renders every tile from
3321
+ * the `event-media` plane by key and throws the bytes away. Measured on
3322
+ * the live hub: one event's `fullFrameBoxed` is 2 824 077 B, base64'd to
3323
+ * ~3.8 MB, allocated whole in hub-main's heap, for a list of keys.
3324
+ *
3325
+ * Same `deviceId` authorization subject as `getEventMedia`, and the same
3326
+ * rows — this is a projection of that method, never a different question.
3327
+ */
3328
+ readonly listEventMedia: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
3329
+ eventId: z.ZodString;
3330
+ deviceId: z.ZodNumber;
3331
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
3332
+ key: z.ZodString;
3333
+ timestamp: z.ZodNumber;
3334
+ kind: z.ZodEnum<{
3335
+ crop: "crop";
3336
+ snapshot: "snapshot";
3337
+ keyFrame: "keyFrame";
3338
+ thumbnail: "thumbnail";
3339
+ firstFrame: "firstFrame";
3340
+ lastFrame: "lastFrame";
3341
+ fullFrame: "fullFrame";
3342
+ fullFrameBoxed: "fullFrameBoxed";
3343
+ faceCrop: "faceCrop";
3344
+ plateCrop: "plateCrop";
3345
+ keyFrameSmall: "keyFrameSmall";
3346
+ thumbnailSmall: "thumbnailSmall";
3347
+ }>;
3348
+ url: z.ZodString;
3224
3349
  sizeBytes: z.ZodNumber;
3225
3350
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
3226
3351
  /**
@@ -3397,6 +3522,6 @@ export declare const pipelineAnalyticsCapability: {
3397
3522
  };
3398
3523
  };
3399
3524
  export type IPipelineAnalyticsProvider = InferProvider<typeof pipelineAnalyticsCapability>;
3400
- export { AudioEventSchema, EventKindDescriptorSchema, EventKindSchema, EventKindsForDeviceSchema, KeyEventSchema, MediaFileInfoSchema, MediaFileKindEnum, MediaFileSchema, MotionEventSchema, ObjectEventSchema, RecentTracksPageSchema, RecentTracksQueryInput, SensorEventSchema, TrackAudioLabelSchema, TrackCascadeCountsSchema, TrackEnvelopeSchema,
3525
+ export { AudioEventSchema, EventKindDescriptorSchema, EventKindSchema, EventKindsForDeviceSchema, KeyEventSchema, MediaFileInfoSchema, MediaFileKindEnum, MediaFileRefSchema, MediaFileSchema, MotionEventSchema, ObjectEventSchema, RecentTracksPageSchema, RecentTracksQueryInput, SensorEventSchema, TrackAudioLabelSchema, TrackCascadeCountsSchema, TrackEnvelopeSchema,
3401
3526
  /** No longer carried on onFrameTracked (two-plane re-injection) — kept for compat. */
3402
3527
  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>;
@@ -5275,6 +5275,13 @@ export type AppRouter = TrpcCoreRouter<{
5275
5275
  output: z.infer<typeof pipelineAnalyticsCapability.methods.listTrackMedia.output>;
5276
5276
  meta: object;
5277
5277
  }>;
5278
+ listEventMedia: TRPCQueryProcedure<{
5279
+ input: {
5280
+ [x: string]: unknown;
5281
+ } & z.input<typeof pipelineAnalyticsCapability.methods.listEventMedia.input>;
5282
+ output: z.infer<typeof pipelineAnalyticsCapability.methods.listEventMedia.output>;
5283
+ meta: object;
5284
+ }>;
5278
5285
  searchObjectEvents: TRPCQueryProcedure<{
5279
5286
  input: {
5280
5287
  [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: 987 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: 346 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