@camstack/types 1.2.126 → 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
  /**
@@ -982,6 +982,15 @@ export declare const deviceManagerCapability: {
982
982
  * calls are sync. Bindings change rarely (only on wrapper toggle or
983
983
  * device add/remove) — clients invalidate via the
984
984
  * `capability.binding-changed` event.
985
+ *
986
+ * "A single round-trip" describes the CLIENT's side and used not to
987
+ * describe the server's: until 2026-08-30 the resolver read the persisted
988
+ * wrapper activations once per device, so answering this cost one
989
+ * settings-door RPC per device — 1 020 on the live 1 019-device hub, and
990
+ * it did not return in 240 s against `SystemMirror.init`'s 15 s budget.
991
+ * The server side is now two reads for the whole fleet. Anything PERIODIC
992
+ * still belongs on `getBindings` / `getBindingsBatch` (D12); this remains
993
+ * a warm seed.
985
994
  */
986
995
  readonly getAllBindings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodArray<z.ZodObject<{
987
996
  deviceId: z.ZodNumber;
@@ -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>;
@@ -2421,6 +2504,7 @@ export declare const pipelineAnalyticsCapability: {
2421
2504
  filesMoved: z.ZodNumber;
2422
2505
  bytesMoved: z.ZodNumber;
2423
2506
  filesTotal: z.ZodNullable<z.ZodNumber>;
2507
+ rowsReconciled: z.ZodOptional<z.ZodNumber>;
2424
2508
  startedAt: z.ZodNumber;
2425
2509
  finishedAt: z.ZodNullable<z.ZodNumber>;
2426
2510
  error: z.ZodNullable<z.ZodString>;
@@ -2458,12 +2542,30 @@ export declare const pipelineAnalyticsCapability: {
2458
2542
  * happens to stamp it. This count is what the migration planner's
2459
2543
  * non-blocking gate reads; `relocateMedia({ mode: 'seal' })` is what drives
2460
2544
  * it to zero.
2545
+ *
2546
+ * TWO indexed statements per collection, not a walk. It used to page the
2547
+ * whole collection at 200 rows per RPC ordered by an unindexed column, so
2548
+ * on the live hub — 1 254 576 rows — it hit the 60 s RPC deadline every
2549
+ * time it was called, and the migration it gates could never start. The
2550
+ * cheap question (`present`: is there at least one) is asked first and
2551
+ * separately from the expensive one (`rows`), because only the first has
2552
+ * to be answerable for the gate to do its job.
2553
+ *
2554
+ * **`null` is "not measurable", never zero** — at either level. An
2555
+ * unreadable collection must not read as a sealed one.
2461
2556
  */
2462
- readonly countUnstampedEventMedia: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
2463
- media: z.ZodNumber;
2464
- retrainFrames: z.ZodNumber;
2465
- total: z.ZodNumber;
2466
- }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
2557
+ readonly countUnstampedEventMedia: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodNullable<z.ZodObject<{
2558
+ media: z.ZodObject<{
2559
+ present: z.ZodBoolean;
2560
+ rows: z.ZodNullable<z.ZodNumber>;
2561
+ }, z.core.$strip>;
2562
+ retrainFrames: z.ZodObject<{
2563
+ present: z.ZodBoolean;
2564
+ rows: z.ZodNullable<z.ZodNumber>;
2565
+ }, z.core.$strip>;
2566
+ anyPresent: z.ZodBoolean;
2567
+ total: z.ZodNullable<z.ZodNumber>;
2568
+ }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
2467
2569
  /**
2468
2570
  * How many rows a pass would STILL act on against `toLocationId`.
2469
2571
  *
@@ -2503,6 +2605,7 @@ export declare const pipelineAnalyticsCapability: {
2503
2605
  filesMoved: z.ZodNumber;
2504
2606
  bytesMoved: z.ZodNumber;
2505
2607
  filesTotal: z.ZodNullable<z.ZodNumber>;
2608
+ rowsReconciled: z.ZodOptional<z.ZodNumber>;
2506
2609
  startedAt: z.ZodNumber;
2507
2610
  finishedAt: z.ZodNullable<z.ZodNumber>;
2508
2611
  error: z.ZodNullable<z.ZodString>;
@@ -3121,9 +3224,10 @@ export declare const pipelineAnalyticsCapability: {
3121
3224
  keyFrameSmall: "keyFrameSmall";
3122
3225
  thumbnailSmall: "thumbnailSmall";
3123
3226
  }>;
3124
- base64: z.ZodString;
3125
3227
  sizeBytes: z.ZodNumber;
3126
3228
  timestamp: z.ZodNumber;
3229
+ url: z.ZodString;
3230
+ base64: z.ZodString;
3127
3231
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
3128
3232
  /** All media rows owned by a track. `kinds` narrows to a kind subset so a
3129
3233
  * client can fetch the SMALL display variants on open and pull the
@@ -3162,9 +3266,10 @@ export declare const pipelineAnalyticsCapability: {
3162
3266
  keyFrameSmall: "keyFrameSmall";
3163
3267
  thumbnailSmall: "thumbnailSmall";
3164
3268
  }>;
3165
- base64: z.ZodString;
3166
3269
  sizeBytes: z.ZodNumber;
3167
3270
  timestamp: z.ZodNumber;
3271
+ url: z.ZodString;
3272
+ base64: z.ZodString;
3168
3273
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
3169
3274
  /**
3170
3275
  * What media a track HAS, without any of it.
@@ -3201,6 +3306,46 @@ export declare const pipelineAnalyticsCapability: {
3201
3306
  keyFrameSmall: "keyFrameSmall";
3202
3307
  thumbnailSmall: "thumbnailSmall";
3203
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;
3204
3349
  sizeBytes: z.ZodNumber;
3205
3350
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
3206
3351
  /**
@@ -3377,6 +3522,6 @@ export declare const pipelineAnalyticsCapability: {
3377
3522
  };
3378
3523
  };
3379
3524
  export type IPipelineAnalyticsProvider = InferProvider<typeof pipelineAnalyticsCapability>;
3380
- 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,
3381
3526
  /** No longer carried on onFrameTracked (two-plane re-injection) — kept for compat. */
3382
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>;
@@ -665,6 +665,7 @@ export declare const recordingCapability: {
665
665
  filesMoved: z.ZodNumber;
666
666
  bytesMoved: z.ZodNumber;
667
667
  filesTotal: z.ZodNullable<z.ZodNumber>;
668
+ rowsReconciled: z.ZodOptional<z.ZodNumber>;
668
669
  startedAt: z.ZodNumber;
669
670
  finishedAt: z.ZodNullable<z.ZodNumber>;
670
671
  error: z.ZodNullable<z.ZodString>;
@@ -714,6 +715,7 @@ export declare const recordingCapability: {
714
715
  filesMoved: z.ZodNumber;
715
716
  bytesMoved: z.ZodNumber;
716
717
  filesTotal: z.ZodNullable<z.ZodNumber>;
718
+ rowsReconciled: z.ZodOptional<z.ZodNumber>;
717
719
  startedAt: z.ZodNumber;
718
720
  finishedAt: z.ZodNullable<z.ZodNumber>;
719
721
  error: z.ZodNullable<z.ZodString>;
@@ -133,6 +133,7 @@ export declare const storageMigrationCapability: {
133
133
  filesMoved: z.ZodNumber;
134
134
  filesTotal: z.ZodNullable<z.ZodNumber>;
135
135
  bytesMoved: z.ZodNumber;
136
+ rowsReconciled: z.ZodOptional<z.ZodNumber>;
136
137
  startedAt: z.ZodNumber;
137
138
  observedAt: z.ZodNumber;
138
139
  }, z.core.$strip>>;
@@ -185,6 +186,7 @@ export declare const storageMigrationCapability: {
185
186
  filesMoved: z.ZodNumber;
186
187
  bytesMoved: z.ZodNumber;
187
188
  filesTotal: z.ZodNullable<z.ZodNumber>;
189
+ rowsReconciled: z.ZodOptional<z.ZodNumber>;
188
190
  startedAt: z.ZodNumber;
189
191
  finishedAt: z.ZodNullable<z.ZodNumber>;
190
192
  error: z.ZodNullable<z.ZodString>;
@@ -57,6 +57,13 @@ export interface SystemMirrorApi extends SliceHandleApi {
57
57
  /**
58
58
  * Whole-fleet binding dump. WARM BOOT ONLY — 903 ms and 373 KB on a
59
59
  * 524-device hub. Anything on the event path uses `getBindings`.
60
+ *
61
+ * `init` gives this 15 s, and on 2026-08-30 it took longer than 240 s on a
62
+ * 1 019-device hub: the server-side resolver read the wrapper-activation
63
+ * blob once PER DEVICE, so answering cost 1 020 settings-door RPCs. Fixed
64
+ * in `device-bindings-store.ts` (two reads for the whole fleet). Worth
65
+ * knowing here because the symptom is always this timeout, and the cause
66
+ * is never in this file.
60
67
  */
61
68
  readonly getAllBindings: {
62
69
  query(input: Record<string, never>): Promise<ReadonlyArray<DeviceBinding>>;
@@ -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