@camstack/types 1.2.100 → 1.2.102

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.d.ts CHANGED
@@ -30,6 +30,8 @@ export { EventCategory } from './enums/event-category.js';
30
30
  export { CAP_INPUT_DEFAULTS, withCapInputDefaults } from './generated/cap-input-defaults.js';
31
31
  export { COLLECTION_ARRAY_METHODS, isCollectionArrayMethodName, } from './generated/collection-array-methods.js';
32
32
  export { createDeviceProxy } from './generated/device-proxy.js';
33
+ export { createEventBusSliceSource } from './device/device-state-handle.js';
34
+ export type { SliceEventBus, SliceHandleApi } from './device/device-state-handle.js';
33
35
  export { DEVICE_SCOPED_CAPS, isDeviceScopedCap } from './generated/device-scoped-caps.js';
34
36
  export type { AddonDeclaration, AddonInitResult, ICamstackAddon, ProviderRegistration, } from './interfaces/addon.js';
35
37
  export { DATAPLANE_SECRET_HEADER } from './interfaces/addon-data-plane.js';
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-EY0GNjV9.js");
3
- const require_sleep = require("./sleep-C2XhJhkd.js");
3
+ const require_sleep = require("./sleep-BpMN2raG.js");
4
4
  const require_err_msg = require("./err-msg-COpsHMw2.js");
5
5
  //#region src/generated/cap-input-defaults.ts
6
6
  /**
@@ -16,7 +16,7 @@ const require_err_msg = require("./err-msg-COpsHMw2.js");
16
16
  * Plain data, zero Zod: a forked runner must not import the schema barrel
17
17
  * (~144MB RSS per runner — D28).
18
18
  *
19
- * Coverage: 24 caps, 52 methods with defaults.
19
+ * Coverage: 24 caps, 53 methods with defaults.
20
20
  */
21
21
  var CAP_INPUT_DEFAULTS = Object.freeze({
22
22
  "addons": { "getLogs": { "limit": 100 } },
@@ -129,6 +129,7 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
129
129
  "getMotionEvents": { "limit": 1e3 },
130
130
  "getObjectEvents": { "limit": 1e3 },
131
131
  "getSensorEvents": { "limit": 1e3 },
132
+ "listGroups": { "limit": 40 },
132
133
  "listRecentTracks": { "limit": 200 },
133
134
  "searchObjectEvents": {
134
135
  "limit": 50,
@@ -370,6 +371,7 @@ exports.adminUiCapability = require_sleep.adminUiCapability;
370
371
  exports.asJsonObject = require_sleep.asJsonObject;
371
372
  exports.asString = require_sleep.asString;
372
373
  exports.createDeviceProxy = require_sleep.createDeviceProxy;
374
+ exports.createEventBusSliceSource = require_sleep.createEventBusSliceSource;
373
375
  exports.deviceOpsCapability = require_sleep.deviceOpsCapability;
374
376
  exports.emitReadiness = require_sleep.emitReadiness;
375
377
  exports.errMsg = require_err_msg.errMsg;
package/dist/addon.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as EventCategory } from "./event-category-CIa_iT6b.mjs";
2
- import { A as expandCapMethods, B as ReadinessTimeoutError, I as nodePin, L as readNodePin, T as adminUiCapability, U as scopeKey, _t as BaseAddon, a as asJsonObject, b as viewerUiCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DisposerChain, ht as DATAPLANE_SECRET_HEADER, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as normalizeAddonInitResult, w as DeviceType, xt as emitReadiness, y as deviceOpsCapability, z as ReadinessRegistry } from "./sleep-B8EIZt4h.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-Dt6MArUp.mjs";
3
3
  import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
4
4
  //#region src/generated/cap-input-defaults.ts
5
5
  /**
@@ -15,7 +15,7 @@ import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
15
15
  * Plain data, zero Zod: a forked runner must not import the schema barrel
16
16
  * (~144MB RSS per runner — D28).
17
17
  *
18
- * Coverage: 24 caps, 52 methods with defaults.
18
+ * Coverage: 24 caps, 53 methods with defaults.
19
19
  */
20
20
  var CAP_INPUT_DEFAULTS = Object.freeze({
21
21
  "addons": { "getLogs": { "limit": 100 } },
@@ -128,6 +128,7 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
128
128
  "getMotionEvents": { "limit": 1e3 },
129
129
  "getObjectEvents": { "limit": 1e3 },
130
130
  "getSensorEvents": { "limit": 1e3 },
131
+ "listGroups": { "limit": 40 },
131
132
  "listRecentTracks": { "limit": 200 },
132
133
  "searchObjectEvents": {
133
134
  "limit": 50,
@@ -354,4 +355,4 @@ function isCollectionArrayMethodName(capName, method) {
354
355
  return methods !== void 0 && methods.includes(method);
355
356
  }
356
357
  //#endregion
357
- export { BOOT_RECOVERY_BACKOFF_MS, BaseAddon, CAP_INPUT_DEFAULTS, COLLECTION_ARRAY_METHODS, DATAPLANE_SECRET_HEADER, DEVICE_SCOPED_CAPS, DeviceType, DisposerChain, EventCategory, ReadinessRegistry, ReadinessTimeoutError, adminUiCapability, asJsonObject, asString, createDeviceProxy, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, isCollectionArrayMethodName, isDeviceScopedCap, nodePin, normalizeAddonInitResult, parseJsonUnknown, readNodePin, scopeKey, sleep, viewerUiCapability, withCapInputDefaults };
358
+ export { BOOT_RECOVERY_BACKOFF_MS, BaseAddon, CAP_INPUT_DEFAULTS, COLLECTION_ARRAY_METHODS, DATAPLANE_SECRET_HEADER, DEVICE_SCOPED_CAPS, DeviceType, DisposerChain, EventCategory, ReadinessRegistry, ReadinessTimeoutError, adminUiCapability, asJsonObject, asString, createDeviceProxy, createEventBusSliceSource, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, isCollectionArrayMethodName, isDeviceScopedCap, nodePin, normalizeAddonInitResult, parseJsonUnknown, readNodePin, scopeKey, sleep, viewerUiCapability, withCapInputDefaults };
@@ -137,6 +137,12 @@ export declare const CustomModelDescriptorSchema: z.ZodObject<{
137
137
  }>>;
138
138
  resolution: z.ZodOptional<z.ZodNumber>;
139
139
  }, z.core.$strip>>;
140
+ provider: z.ZodOptional<z.ZodEnum<{
141
+ custom: "custom";
142
+ camstack: "camstack";
143
+ frigate: "frigate";
144
+ scrypted: "scrypted";
145
+ }>>;
140
146
  classMap: z.ZodOptional<z.ZodObject<{
141
147
  mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
142
148
  person: "person";
@@ -275,6 +281,12 @@ export declare const customModelRegistryCapability: {
275
281
  }>>;
276
282
  resolution: z.ZodOptional<z.ZodNumber>;
277
283
  }, z.core.$strip>>;
284
+ provider: z.ZodOptional<z.ZodEnum<{
285
+ custom: "custom";
286
+ camstack: "camstack";
287
+ frigate: "frigate";
288
+ scrypted: "scrypted";
289
+ }>>;
278
290
  classMap: z.ZodOptional<z.ZodObject<{
279
291
  mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
280
292
  person: "person";
@@ -76,7 +76,7 @@ export { NetworkAccessStatusSchema, NetworkEndpointSchema, networkAccessCapabili
76
76
  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';
77
77
  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';
78
78
  export { type IOauthIntegrationProvider, type OauthIntegrationDescriptor, OauthIntegrationDescriptorSchema, oauthIntegrationCapability, } from './oauth-integration.cap.js';
79
- 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 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';
79
+ 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';
80
80
  export type { NativeCropRef, PipelineStepInputOutput, PipelineValidationIssue, PipelineValidationResult, } from './pipeline-executor.cap.js';
81
81
  export { ModelSubstitutionSchema, NativeCropRefSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, pipelineExecutorCapability, } from './pipeline-executor.cap.js';
82
82
  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';
@@ -245,6 +245,12 @@ export declare const modelConvertCapability: {
245
245
  }>>;
246
246
  resolution: z.ZodOptional<z.ZodNumber>;
247
247
  }, z.core.$strip>>;
248
+ provider: z.ZodOptional<z.ZodEnum<{
249
+ custom: "custom";
250
+ camstack: "camstack";
251
+ frigate: "frigate";
252
+ scrypted: "scrypted";
253
+ }>>;
248
254
  classMap: z.ZodOptional<z.ZodObject<{
249
255
  mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
250
256
  person: "person";
@@ -139,6 +139,12 @@ export declare const ModelDistributeInputSchema: z.ZodObject<{
139
139
  }>>;
140
140
  resolution: z.ZodOptional<z.ZodNumber>;
141
141
  }, z.core.$strip>>;
142
+ provider: z.ZodOptional<z.ZodEnum<{
143
+ custom: "custom";
144
+ camstack: "camstack";
145
+ frigate: "frigate";
146
+ scrypted: "scrypted";
147
+ }>>;
142
148
  classMap: z.ZodOptional<z.ZodObject<{
143
149
  mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
144
150
  person: "person";
@@ -291,6 +297,12 @@ export declare const modelDistributorCapability: {
291
297
  }>>;
292
298
  resolution: z.ZodOptional<z.ZodNumber>;
293
299
  }, z.core.$strip>>;
300
+ provider: z.ZodOptional<z.ZodEnum<{
301
+ custom: "custom";
302
+ camstack: "camstack";
303
+ frigate: "frigate";
304
+ scrypted: "scrypted";
305
+ }>>;
294
306
  classMap: z.ZodOptional<z.ZodObject<{
295
307
  mapping: z.ZodRecord<z.ZodString, z.ZodEnum<{
296
308
  person: "person";
@@ -1113,6 +1113,76 @@ declare const RecentTracksPageSchema: z.ZodObject<{
1113
1113
  nextCursor: z.ZodNullable<z.ZodString>;
1114
1114
  }, z.core.$strip>;
1115
1115
  export type RecentTracksPage = z.infer<typeof RecentTracksPageSchema>;
1116
+ export declare const AnalyticsGroupRecordSchema: z.ZodObject<{
1117
+ id: z.ZodString;
1118
+ deviceId: z.ZodNumber;
1119
+ openedAt: z.ZodNumber;
1120
+ closedAt: z.ZodNumber;
1121
+ timestamp: z.ZodNumber;
1122
+ memberCount: z.ZodNumber;
1123
+ memberTrackIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1124
+ className: z.ZodString;
1125
+ classes: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1126
+ mediaUrl: z.ZodNullable<z.ZodString>;
1127
+ singleton: z.ZodBoolean;
1128
+ }, z.core.$strip>;
1129
+ export type AnalyticsGroupRecord = z.infer<typeof AnalyticsGroupRecordSchema>;
1130
+ export declare const AnalyticsGroupMemberSchema: z.ZodObject<{
1131
+ trackId: z.ZodString;
1132
+ deviceId: z.ZodNumber;
1133
+ className: z.ZodString;
1134
+ firstSeen: z.ZodNumber;
1135
+ lastSeen: z.ZodNumber;
1136
+ mediaUrl: z.ZodNullable<z.ZodString>;
1137
+ }, z.core.$strip>;
1138
+ export type AnalyticsGroupMember = z.infer<typeof AnalyticsGroupMemberSchema>;
1139
+ export declare const AnalyticsGroupDetailSchema: z.ZodObject<{
1140
+ id: z.ZodString;
1141
+ deviceId: z.ZodNumber;
1142
+ openedAt: z.ZodNumber;
1143
+ closedAt: z.ZodNumber;
1144
+ timestamp: z.ZodNumber;
1145
+ memberCount: z.ZodNumber;
1146
+ memberTrackIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1147
+ className: z.ZodString;
1148
+ classes: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1149
+ mediaUrl: z.ZodNullable<z.ZodString>;
1150
+ singleton: z.ZodBoolean;
1151
+ members: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1152
+ trackId: z.ZodString;
1153
+ deviceId: z.ZodNumber;
1154
+ className: z.ZodString;
1155
+ firstSeen: z.ZodNumber;
1156
+ lastSeen: z.ZodNumber;
1157
+ mediaUrl: z.ZodNullable<z.ZodString>;
1158
+ }, z.core.$strip>>>;
1159
+ }, z.core.$strip>;
1160
+ export type AnalyticsGroupDetail = z.infer<typeof AnalyticsGroupDetailSchema>;
1161
+ export declare const ListGroupsQueryInput: z.ZodObject<{
1162
+ deviceIds: z.ZodArray<z.ZodNumber>;
1163
+ since: z.ZodOptional<z.ZodNumber>;
1164
+ until: z.ZodOptional<z.ZodNumber>;
1165
+ limit: z.ZodDefault<z.ZodNumber>;
1166
+ cursor: z.ZodOptional<z.ZodString>;
1167
+ }, z.core.$strip>;
1168
+ export type ListGroupsQuery = z.infer<typeof ListGroupsQueryInput>;
1169
+ export declare const ListGroupsPageSchema: z.ZodObject<{
1170
+ groups: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1171
+ id: z.ZodString;
1172
+ deviceId: z.ZodNumber;
1173
+ openedAt: z.ZodNumber;
1174
+ closedAt: z.ZodNumber;
1175
+ timestamp: z.ZodNumber;
1176
+ memberCount: z.ZodNumber;
1177
+ memberTrackIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1178
+ className: z.ZodString;
1179
+ classes: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1180
+ mediaUrl: z.ZodNullable<z.ZodString>;
1181
+ singleton: z.ZodBoolean;
1182
+ }, z.core.$strip>>>;
1183
+ nextCursor: z.ZodNullable<z.ZodString>;
1184
+ }, z.core.$strip>;
1185
+ export type ListGroupsPage = z.infer<typeof ListGroupsPageSchema>;
1116
1186
  declare const KeyEventSchema: z.ZodObject<{
1117
1187
  retrainStatus: z.ZodOptional<z.ZodEnum<{
1118
1188
  none: "none";
@@ -1708,6 +1778,57 @@ export declare const pipelineAnalyticsCapability: {
1708
1778
  }, z.core.$strip>>>;
1709
1779
  nextCursor: z.ZodNullable<z.ZodString>;
1710
1780
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
1781
+ /**
1782
+ * Batched co-moving group listing — the Groups feed. Same merge/cursor
1783
+ * contract as {@link listRecentTracks}. A group is a sealed partition of
1784
+ * one session; `getGroup` is the detail with members.
1785
+ */
1786
+ readonly listGroups: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1787
+ deviceIds: z.ZodArray<z.ZodNumber>;
1788
+ since: z.ZodOptional<z.ZodNumber>;
1789
+ until: z.ZodOptional<z.ZodNumber>;
1790
+ limit: z.ZodDefault<z.ZodNumber>;
1791
+ cursor: z.ZodOptional<z.ZodString>;
1792
+ }, z.core.$strip>, z.ZodObject<{
1793
+ groups: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1794
+ id: z.ZodString;
1795
+ deviceId: z.ZodNumber;
1796
+ openedAt: z.ZodNumber;
1797
+ closedAt: z.ZodNumber;
1798
+ timestamp: z.ZodNumber;
1799
+ memberCount: z.ZodNumber;
1800
+ memberTrackIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1801
+ className: z.ZodString;
1802
+ classes: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1803
+ mediaUrl: z.ZodNullable<z.ZodString>;
1804
+ singleton: z.ZodBoolean;
1805
+ }, z.core.$strip>>>;
1806
+ nextCursor: z.ZodNullable<z.ZodString>;
1807
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
1808
+ readonly getGroup: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1809
+ deviceId: z.ZodNumber;
1810
+ groupId: z.ZodString;
1811
+ }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
1812
+ id: z.ZodString;
1813
+ deviceId: z.ZodNumber;
1814
+ openedAt: z.ZodNumber;
1815
+ closedAt: z.ZodNumber;
1816
+ timestamp: z.ZodNumber;
1817
+ memberCount: z.ZodNumber;
1818
+ memberTrackIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1819
+ className: z.ZodString;
1820
+ classes: z.ZodReadonly<z.ZodArray<z.ZodString>>;
1821
+ mediaUrl: z.ZodNullable<z.ZodString>;
1822
+ singleton: z.ZodBoolean;
1823
+ members: z.ZodReadonly<z.ZodArray<z.ZodObject<{
1824
+ trackId: z.ZodString;
1825
+ deviceId: z.ZodNumber;
1826
+ className: z.ZodString;
1827
+ firstSeen: z.ZodNumber;
1828
+ lastSeen: z.ZodNumber;
1829
+ mediaUrl: z.ZodNullable<z.ZodString>;
1830
+ }, z.core.$strip>>>;
1831
+ }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
1711
1832
  readonly clearTracks: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
1712
1833
  deviceId: z.ZodNumber;
1713
1834
  }, z.core.$strip>, z.ZodVoid, "mutation">;
@@ -1,10 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { type InferProvider } from './capability-definition.js';
3
- import type { ConfigUISchema, ConfigField } from '../interfaces/config-ui.js';
2
+ import type { ConfigField, ConfigUISchema } from '../interfaces/config-ui.js';
4
3
  import type { InferenceCapabilities, ModelAvailability } from '../interfaces/inference-capabilities.js';
5
- import type { PipelineConfig } from '../types/pipeline.js';
6
- import type { FrameResult, AudioResult } from '../types/detection.js';
4
+ import type { AudioResult, FrameResult } from '../types/detection.js';
7
5
  import type { FrameRef, FrameViewSpec } from '../types/frame-view.js';
6
+ import type { PipelineConfig } from '../types/pipeline.js';
7
+ import { type InferProvider } from './capability-definition.js';
8
8
  /**
9
9
  * Reference to the frame's retained NATIVE surface + the parent crop's placement
10
10
  * within the frame, so the executor can re-cut a leaf child ROI at native
@@ -149,6 +149,12 @@ declare const PipelineModelOptionSchema: z.ZodObject<{
149
149
  resolution: z.ZodOptional<z.ZodNumber>;
150
150
  }, z.core.$strip>>;
151
151
  legacy: z.ZodOptional<z.ZodBoolean>;
152
+ provider: z.ZodOptional<z.ZodEnum<{
153
+ custom: "custom";
154
+ camstack: "camstack";
155
+ frigate: "frigate";
156
+ scrypted: "scrypted";
157
+ }>>;
152
158
  }, z.core.$strip>;
153
159
  declare const PipelineAddonSchemaSchema: z.ZodObject<{
154
160
  id: z.ZodString;
@@ -190,6 +196,12 @@ declare const PipelineAddonSchemaSchema: z.ZodObject<{
190
196
  resolution: z.ZodOptional<z.ZodNumber>;
191
197
  }, z.core.$strip>>;
192
198
  legacy: z.ZodOptional<z.ZodBoolean>;
199
+ provider: z.ZodOptional<z.ZodEnum<{
200
+ custom: "custom";
201
+ camstack: "camstack";
202
+ frigate: "frigate";
203
+ scrypted: "scrypted";
204
+ }>>;
193
205
  }, z.core.$strip>>>;
194
206
  defaultModelId: z.ZodString;
195
207
  defaultModelIdByFormat: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -256,6 +268,12 @@ declare const PipelineSlotSchemaSchema: z.ZodObject<{
256
268
  resolution: z.ZodOptional<z.ZodNumber>;
257
269
  }, z.core.$strip>>;
258
270
  legacy: z.ZodOptional<z.ZodBoolean>;
271
+ provider: z.ZodOptional<z.ZodEnum<{
272
+ custom: "custom";
273
+ camstack: "camstack";
274
+ frigate: "frigate";
275
+ scrypted: "scrypted";
276
+ }>>;
259
277
  }, z.core.$strip>>>;
260
278
  defaultModelId: z.ZodString;
261
279
  defaultModelIdByFormat: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -364,6 +382,12 @@ declare const PipelineSchemaSchema: z.ZodObject<{
364
382
  resolution: z.ZodOptional<z.ZodNumber>;
365
383
  }, z.core.$strip>>;
366
384
  legacy: z.ZodOptional<z.ZodBoolean>;
385
+ provider: z.ZodOptional<z.ZodEnum<{
386
+ custom: "custom";
387
+ camstack: "camstack";
388
+ frigate: "frigate";
389
+ scrypted: "scrypted";
390
+ }>>;
367
391
  }, z.core.$strip>>>;
368
392
  defaultModelId: z.ZodString;
369
393
  defaultModelIdByFormat: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -675,6 +699,12 @@ export declare const pipelineExecutorCapability: {
675
699
  resolution: z.ZodOptional<z.ZodNumber>;
676
700
  }, z.core.$strip>>;
677
701
  legacy: z.ZodOptional<z.ZodBoolean>;
702
+ provider: z.ZodOptional<z.ZodEnum<{
703
+ custom: "custom";
704
+ camstack: "camstack";
705
+ frigate: "frigate";
706
+ scrypted: "scrypted";
707
+ }>>;
678
708
  }, z.core.$strip>>>;
679
709
  defaultModelId: z.ZodString;
680
710
  defaultModelIdByFormat: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -1181,4 +1211,4 @@ export declare const pipelineExecutorCapability: {
1181
1211
  };
1182
1212
  };
1183
1213
  export type IPipelineExecutorProvider = InferProvider<typeof pipelineExecutorCapability>;
1184
- export { PipelineEngineChoiceSchema, PipelineDefaultStepSchema, PipelineSchemaSchema, PipelineAddonSchemaSchema, PipelineSlotSchemaSchema, PipelineModelOptionSchema, AvailableEngineSchema, PipelineTemplateSchema, PipelineTemplateStepSchema, EngineDeviceInfoSchema, EngineProvisioningSchema, ModelSubstitutionSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, };
1214
+ export { AvailableEngineSchema, EngineDeviceInfoSchema, EngineProvisioningSchema, ModelSubstitutionSchema, PipelineAddonSchemaSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineModelOptionSchema, PipelineSchemaSchema, PipelineSlotSchemaSchema, PipelineTemplateSchema, PipelineTemplateStepSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, };
@@ -36,6 +36,7 @@ declare const PlateInfoSchema: z.ZodObject<{
36
36
  }, z.core.$strip>>;
37
37
  keyFrameMediaKey: z.ZodOptional<z.ZodString>;
38
38
  base64: z.ZodOptional<z.ZodString>;
39
+ cropUrl: z.ZodOptional<z.ZodString>;
39
40
  }, z.core.$strip>;
40
41
  export type PlateInfo = z.infer<typeof PlateInfoSchema>;
41
42
  /**
@@ -73,6 +74,7 @@ export declare const plateGalleryCapability: {
73
74
  }, z.core.$strip>>;
74
75
  keyFrameMediaKey: z.ZodOptional<z.ZodString>;
75
76
  base64: z.ZodOptional<z.ZodString>;
77
+ cropUrl: z.ZodOptional<z.ZodString>;
76
78
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
77
79
  readonly getPlateByTrack: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
78
80
  deviceId: z.ZodNumber;
@@ -96,6 +98,7 @@ export declare const plateGalleryCapability: {
96
98
  }, z.core.$strip>>;
97
99
  keyFrameMediaKey: z.ZodOptional<z.ZodString>;
98
100
  base64: z.ZodOptional<z.ZodString>;
101
+ cropUrl: z.ZodOptional<z.ZodString>;
99
102
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
100
103
  readonly getPlateMedia: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
101
104
  plateId: z.ZodString;
@@ -130,6 +133,7 @@ export declare const plateGalleryCapability: {
130
133
  }, z.core.$strip>>;
131
134
  keyFrameMediaKey: z.ZodOptional<z.ZodString>;
132
135
  base64: z.ZodOptional<z.ZodString>;
136
+ cropUrl: z.ZodOptional<z.ZodString>;
133
137
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
134
138
  /** Suggest groups of near-identical reads (same physical plate) for review/merge. */
135
139
  readonly suggestPlateClusters: import("./capability-definition.js").CapabilityMethodSchema<z.ZodOptional<z.ZodObject<{
@@ -93,8 +93,14 @@ export interface SliceHandleApi {
93
93
  *
94
94
  * - `createLazyTrpcSource(api)`: per-handle local cache, refresh
95
95
  * via `deviceState.getCapSlice`, subscribe via `live.onEvent`.
96
- * Default behavior, used by `createDeviceProxy(api, binding)`
97
- * when no source is passed.
96
+ * Default for browser / SDK clients. A forked addon child MUST NOT
97
+ * use this: `api.live.onEvent` is a hub-main tRPC subscription and
98
+ * never declares UDS `eventPatterns`, so `device.state-changed` never
99
+ * arrives. Use {@link createEventBusSliceSource} there.
100
+ * - `createEventBusSliceSource({ eventBus, api })`: same cache + RPC
101
+ * refresh, but the push channel is `ctx.eventBus.subscribe`. That is
102
+ * what reports `device.state-changed` to the parent, so the UDS fan-out
103
+ * actually delivers it.
98
104
  * - `createMirrorSource(mirror, listeners)`: reads from a shared
99
105
  * `Map<deviceId, Map<capName, slice>>` populated by a
100
106
  * `SystemManager` warm-boot. Refresh is a no-op; subscribe
@@ -121,6 +127,17 @@ export interface SliceHandleSource {
121
127
  * without an api reference). */
122
128
  write(deviceId: number, capName: string, slice: Record<string, unknown>): Promise<void>;
123
129
  }
130
+ /**
131
+ * Minimal bus surface the event-bus slice source needs. Structural so a test
132
+ * fake (and `IEventBus`) both satisfy it without importing the payload map.
133
+ */
134
+ export interface SliceEventBus {
135
+ subscribe(filter: {
136
+ readonly category: string;
137
+ }, handler: (event: {
138
+ readonly data: unknown;
139
+ }) => void): () => void;
140
+ }
124
141
  /**
125
142
  * Lazy tRPC source — the default behavior. Maintains a per-key local
126
143
  * cache (`{deviceId}:{capName}` → last slice), one shared
@@ -131,6 +148,21 @@ export interface SliceHandleSource {
131
148
  * watcher unsubscribes — keeps idle handles cheap.
132
149
  */
133
150
  export declare function createLazyTrpcSource(api: SliceHandleApi): SliceHandleSource;
151
+ /**
152
+ * Addon-process slice source — the one that actually reaches a forked child.
153
+ *
154
+ * Identical cache/refresh/write to {@link createLazyTrpcSource}. The push
155
+ * channel is `eventBus.subscribe({ category: 'device.state-changed' })`
156
+ * instead of `api.live.onEvent`. On a UDS child that subscribe is what
157
+ * populates `RegisterMessage.eventPatterns`, which is what the parent's
158
+ * `broadcastEventToChildren` filters on. Without it the child never
159
+ * declares interest and the 30 s `refresh()` timer was the only path a
160
+ * zone edit took to analytics (live, device 617, 2026-07-16).
161
+ */
162
+ export declare function createEventBusSliceSource(deps: {
163
+ readonly eventBus: SliceEventBus;
164
+ readonly api: SliceHandleApi;
165
+ }): SliceHandleSource;
134
166
  /**
135
167
  * Mirror source — reads from a shared map populated by a
136
168
  * `SystemManager` warm-boot + push event handler. Refresh is a no-op
@@ -4830,6 +4830,20 @@ export type AppRouter = TrpcCoreRouter<{
4830
4830
  output: z.infer<typeof pipelineAnalyticsCapability.methods.listRecentTracks.output>;
4831
4831
  meta: object;
4832
4832
  }>;
4833
+ listGroups: TRPCQueryProcedure<{
4834
+ input: {
4835
+ [x: string]: unknown;
4836
+ } & z.input<typeof pipelineAnalyticsCapability.methods.listGroups.input>;
4837
+ output: z.infer<typeof pipelineAnalyticsCapability.methods.listGroups.output>;
4838
+ meta: object;
4839
+ }>;
4840
+ getGroup: TRPCQueryProcedure<{
4841
+ input: {
4842
+ [x: string]: unknown;
4843
+ } & z.input<typeof pipelineAnalyticsCapability.methods.getGroup.input>;
4844
+ output: z.infer<typeof pipelineAnalyticsCapability.methods.getGroup.output>;
4845
+ meta: object;
4846
+ }>;
4833
4847
  clearTracks: TRPCMutationProcedure<{
4834
4848
  input: {
4835
4849
  [x: string]: unknown;
@@ -11,7 +11,7 @@
11
11
  * Plain data, zero Zod: a forked runner must not import the schema barrel
12
12
  * (~144MB RSS per runner — D28).
13
13
  *
14
- * Coverage: 24 caps, 52 methods with defaults.
14
+ * Coverage: 24 caps, 53 methods with defaults.
15
15
  */
16
16
  export declare const CAP_INPUT_DEFAULTS: Readonly<Record<string, Readonly<Record<string, Readonly<Record<string, unknown>>>>>>;
17
17
  /**
@@ -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: 951 method paths across 123 capabilities.
9
+ * Coverage: 953 method paths across 123 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: 337 methods carry a device reference, of which
9
+ * Coverage: 339 methods carry a device reference, of which
10
10
  * 124 are on SYSTEM-scope caps.
11
11
  *
12
12
  * Top-level fields, number arrays, and one-level arrays of objects carrying
package/dist/index.d.ts CHANGED
@@ -145,8 +145,8 @@ export type { DeviceProfile, DeviceProfileDefaults, DeviceProfileMatch, Pipeline
145
145
  export { BATTERY_DEVICE_PROFILE, DEVICE_PROFILES, deviceMatchesProfile, resolveDeviceProfile, } from './device/device-profile.js';
146
146
  export type { IDeviceRuntimeState } from './device/device-runtime-state.js';
147
147
  export { DeviceRuntimeState } from './device/device-runtime-state.js';
148
- export type { SliceHandle, SliceHandleApi, SliceHandleSource, } from './device/device-state-handle.js';
149
- export { createLazyTrpcSource, createMirrorSource, createSliceHandle, } from './device/device-state-handle.js';
148
+ export type { SliceEventBus, SliceHandle, SliceHandleApi, SliceHandleSource, } from './device/device-state-handle.js';
149
+ export { createEventBusSliceSource, createLazyTrpcSource, createMirrorSource, createSliceHandle, } from './device/device-state-handle.js';
150
150
  export { ChargingStatus, DeviceFeature, DeviceRole, DeviceType } from './device/device-type.js';
151
151
  export type { BatteryPresence, BatteryPresenceInput } from './device/battery-presence.js';
152
152
  export { BATTERY_UNREACHABLE_AFTER_MS, deriveBatteryPresence, isBatteryPresenceFault, } from './device/battery-presence.js';