@camstack/types 1.2.20 → 1.2.22

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
@@ -13,7 +13,7 @@ const require_err_msg = require("./err-msg-COpsHMw2.js");
13
13
  * barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
14
14
  * forked runner. See docs/decisions/adr-0028.md.
15
15
  *
16
- * Coverage: 16 collection caps, 28 array methods.
16
+ * Coverage: 17 collection caps, 30 array methods.
17
17
  */
18
18
  var COLLECTION_ARRAY_METHODS = Object.freeze({
19
19
  "addon-pages-source": ["listPages"],
@@ -21,6 +21,7 @@ var COLLECTION_ARRAY_METHODS = Object.freeze({
21
21
  "addon-widgets-source": ["listWidgets"],
22
22
  "broker": ["list", "listProviders"],
23
23
  "custom-model-registry": ["listModels"],
24
+ "data-store-provider": ["histogram", "query"],
24
25
  "device-export": ["listExposedDevices", "listSupportedDeviceKinds"],
25
26
  "device-provider": ["discoverDevices", "getDevices"],
26
27
  "llm": [
package/dist/addon.mjs CHANGED
@@ -12,7 +12,7 @@ import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
12
12
  * barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
13
13
  * forked runner. See docs/decisions/adr-0028.md.
14
14
  *
15
- * Coverage: 16 collection caps, 28 array methods.
15
+ * Coverage: 17 collection caps, 30 array methods.
16
16
  */
17
17
  var COLLECTION_ARRAY_METHODS = Object.freeze({
18
18
  "addon-pages-source": ["listPages"],
@@ -20,6 +20,7 @@ var COLLECTION_ARRAY_METHODS = Object.freeze({
20
20
  "addon-widgets-source": ["listWidgets"],
21
21
  "broker": ["list", "listProviders"],
22
22
  "custom-model-registry": ["listModels"],
23
+ "data-store-provider": ["histogram", "query"],
23
24
  "device-export": ["listExposedDevices", "listSupportedDeviceKinds"],
24
25
  "device-provider": ["discoverDevices", "getDevices"],
25
26
  "llm": [
@@ -0,0 +1,215 @@
1
+ import { z } from 'zod';
2
+ import { type InferProvider } from './capability-definition.js';
3
+ /**
4
+ * What one engine says about itself. The orchestrator uses `kind` to pick
5
+ * a registrant for a collection; `engineId` is what a log line names when
6
+ * a call is routed or refused.
7
+ */
8
+ declare const EngineInfoSchema: z.ZodObject<{
9
+ engineId: z.ZodString;
10
+ kind: z.ZodEnum<{
11
+ relational: "relational";
12
+ vector: "vector";
13
+ }>;
14
+ displayName: z.ZodString;
15
+ }, z.core.$strip>;
16
+ /**
17
+ * data-store-provider — the engine contract behind the data door.
18
+ *
19
+ * The sibling of `storage-provider`, for rows instead of bytes. The
20
+ * orchestrator (singleton `settings-store` cap, owned by the
21
+ * storage-orchestrator builtin) dispatches every call to the registrant
22
+ * that serves the collection.
23
+ *
24
+ * `internal: true` — consumed only by the orchestrator. Public consumers
25
+ * go through `settings-store`; they never see this cap, and an engine
26
+ * never sees a caller.
27
+ *
28
+ * Design notes:
29
+ * - **Stateless dispatch.** Every method carries its own
30
+ * `namespace` + `collection`, so an engine keeps no per-caller state
31
+ * and the orchestrator forwards the payload verbatim. Scoping is a
32
+ * property of the input, not of the connection — see the note on
33
+ * `settings-store` about what that does and does not guarantee.
34
+ * - **One registrant today** (`sqlite-settings`). The collection shape
35
+ * exists so a second engine is a registration rather than a second
36
+ * door ([D44](../../../../docs/decisions/adr-0044.md)).
37
+ *
38
+ * The method set is deliberately identical to `settings-store`'s: the
39
+ * orchestrator is a router, not a translator. A capability the door
40
+ * gains, an engine must be able to answer.
41
+ */
42
+ export declare const dataStoreProviderCapability: {
43
+ readonly name: "data-store-provider";
44
+ readonly scope: "system";
45
+ readonly mode: "collection";
46
+ readonly internal: true;
47
+ readonly methods: {
48
+ /** Self-description — how the orchestrator picks a registrant. */
49
+ readonly getEngineInfo: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
50
+ engineId: z.ZodString;
51
+ kind: z.ZodEnum<{
52
+ relational: "relational";
53
+ vector: "vector";
54
+ }>;
55
+ displayName: z.ZodString;
56
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
57
+ /** Get a single value by key from a collection. */
58
+ readonly get: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
59
+ namespace: z.ZodOptional<z.ZodString>;
60
+ collection: z.ZodString;
61
+ key: z.ZodString;
62
+ }, z.core.$strip>, z.ZodUnknown, import("./capability-definition.js").CapabilityMethodKind>;
63
+ /** Set a value by key in a collection (upsert). */
64
+ readonly set: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
65
+ namespace: z.ZodOptional<z.ZodString>;
66
+ collection: z.ZodString;
67
+ key: z.ZodString;
68
+ value: z.ZodUnknown;
69
+ }, z.core.$strip>, z.ZodVoid, "mutation">;
70
+ /** Get all entries matching an optional filter. */
71
+ readonly query: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
72
+ namespace: z.ZodOptional<z.ZodString>;
73
+ collection: z.ZodString;
74
+ filter: z.ZodOptional<z.ZodObject<{
75
+ where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
76
+ whereIn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown>>>;
77
+ whereBetween: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodUnknown, z.ZodUnknown], null>>>;
78
+ orderBy: z.ZodOptional<z.ZodObject<{
79
+ field: z.ZodString;
80
+ direction: z.ZodEnum<{
81
+ asc: "asc";
82
+ desc: "desc";
83
+ }>;
84
+ }, z.core.$strip>>;
85
+ limit: z.ZodOptional<z.ZodNumber>;
86
+ offset: z.ZodOptional<z.ZodNumber>;
87
+ }, z.core.$strip>>;
88
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
89
+ id: z.ZodString;
90
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
91
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
92
+ /** Insert a new record. */
93
+ readonly insert: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
94
+ namespace: z.ZodOptional<z.ZodString>;
95
+ collection: z.ZodString;
96
+ record: z.ZodObject<{
97
+ id: z.ZodString;
98
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
99
+ }, z.core.$strip>;
100
+ }, z.core.$strip>, z.ZodVoid, "mutation">;
101
+ /** Update an existing record by ID. */
102
+ readonly update: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
103
+ namespace: z.ZodOptional<z.ZodString>;
104
+ collection: z.ZodString;
105
+ id: z.ZodString;
106
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
107
+ }, z.core.$strip>, z.ZodVoid, "mutation">;
108
+ /** Delete a record by key/ID. */
109
+ readonly delete: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
110
+ namespace: z.ZodOptional<z.ZodString>;
111
+ collection: z.ZodString;
112
+ key: z.ZodString;
113
+ }, z.core.$strip>, z.ZodVoid, "mutation">;
114
+ /** Delete every record matching `filter`, in one statement. */
115
+ readonly deleteWhere: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
116
+ namespace: z.ZodOptional<z.ZodString>;
117
+ collection: z.ZodString;
118
+ filter: z.ZodObject<{
119
+ where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
120
+ whereIn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown>>>;
121
+ whereBetween: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodUnknown, z.ZodUnknown], null>>>;
122
+ }, z.core.$strip>;
123
+ }, z.core.$strip>, z.ZodObject<{
124
+ deleted: z.ZodNumber;
125
+ }, z.core.$strip>, "mutation">;
126
+ /** Apply `data` to every record matching `filter`, in one statement. */
127
+ readonly updateWhere: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
128
+ namespace: z.ZodOptional<z.ZodString>;
129
+ collection: z.ZodString;
130
+ filter: z.ZodObject<{
131
+ where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
132
+ whereIn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown>>>;
133
+ whereBetween: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodUnknown, z.ZodUnknown], null>>>;
134
+ }, z.core.$strip>;
135
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
136
+ }, z.core.$strip>, z.ZodObject<{
137
+ updated: z.ZodNumber;
138
+ }, z.core.$strip>, "mutation">;
139
+ /** Count entries in a collection, optionally filtered. */
140
+ readonly count: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
141
+ namespace: z.ZodOptional<z.ZodString>;
142
+ collection: z.ZodString;
143
+ filter: z.ZodOptional<z.ZodObject<{
144
+ where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
145
+ whereIn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown>>>;
146
+ whereBetween: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodUnknown, z.ZodUnknown], null>>>;
147
+ orderBy: z.ZodOptional<z.ZodObject<{
148
+ field: z.ZodString;
149
+ direction: z.ZodEnum<{
150
+ asc: "asc";
151
+ desc: "desc";
152
+ }>;
153
+ }, z.core.$strip>>;
154
+ limit: z.ZodOptional<z.ZodNumber>;
155
+ offset: z.ZodOptional<z.ZodNumber>;
156
+ }, z.core.$strip>>;
157
+ }, z.core.$strip>, z.ZodNumber, import("./capability-definition.js").CapabilityMethodKind>;
158
+ /** Grouped counts per ((field-origin)/bucketSize) bucket, filtered. */
159
+ readonly histogram: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
160
+ namespace: z.ZodOptional<z.ZodString>;
161
+ collection: z.ZodString;
162
+ field: z.ZodString;
163
+ bucketSize: z.ZodNumber;
164
+ origin: z.ZodNumber;
165
+ filter: z.ZodOptional<z.ZodObject<{
166
+ where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
167
+ whereIn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown>>>;
168
+ whereBetween: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodUnknown, z.ZodUnknown], null>>>;
169
+ orderBy: z.ZodOptional<z.ZodObject<{
170
+ field: z.ZodString;
171
+ direction: z.ZodEnum<{
172
+ asc: "asc";
173
+ desc: "desc";
174
+ }>;
175
+ }, z.core.$strip>>;
176
+ limit: z.ZodOptional<z.ZodNumber>;
177
+ offset: z.ZodOptional<z.ZodNumber>;
178
+ }, z.core.$strip>>;
179
+ }, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
180
+ bucket: z.ZodNumber;
181
+ count: z.ZodNumber;
182
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
183
+ /** Check if a collection is empty. */
184
+ readonly isEmpty: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
185
+ namespace: z.ZodOptional<z.ZodString>;
186
+ collection: z.ZodString;
187
+ }, z.core.$strip>, z.ZodBoolean, import("./capability-definition.js").CapabilityMethodKind>;
188
+ /** Declare a typed (SQL-backed) collection with columns + indexes. */
189
+ readonly declareCollection: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
190
+ namespace: z.ZodOptional<z.ZodString>;
191
+ collection: z.ZodString;
192
+ columns: z.ZodReadonly<z.ZodArray<z.ZodObject<{
193
+ name: z.ZodString;
194
+ type: z.ZodEnum<{
195
+ TEXT: "TEXT";
196
+ INTEGER: "INTEGER";
197
+ REAL: "REAL";
198
+ JSON: "JSON";
199
+ BOOLEAN: "BOOLEAN";
200
+ }>;
201
+ primaryKey: z.ZodOptional<z.ZodBoolean>;
202
+ notNull: z.ZodOptional<z.ZodBoolean>;
203
+ unique: z.ZodOptional<z.ZodBoolean>;
204
+ }, z.core.$strip>>>;
205
+ indexes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
206
+ name: z.ZodString;
207
+ columns: z.ZodReadonly<z.ZodArray<z.ZodString>>;
208
+ unique: z.ZodOptional<z.ZodBoolean>;
209
+ }, z.core.$strip>>>>;
210
+ }, z.core.$strip>, z.ZodVoid, "mutation">;
211
+ };
212
+ };
213
+ export type IDataStoreProvider = InferProvider<typeof dataStoreProviderCapability>;
214
+ export { EngineInfoSchema };
215
+ export type DataStoreEngineInfo = z.infer<typeof EngineInfoSchema>;
@@ -44,6 +44,7 @@ export type { CustomModelDescriptor, ICustomModelRegistryProvider, } from './cus
44
44
  export { CustomModelDescriptorSchema, customModelRegistryCapability, } from './custom-model-registry.cap.js';
45
45
  export type { DecoderHwAccelConfig, HwAccelChoice, IDecoderCapProvider, ShmRingStats, } from './decoder.cap.js';
46
46
  export { DEFAULT_DECODER_HWACCEL_CONFIG, DecoderSessionConfigSchema, decoderCapability, HWACCEL_OPTIONS, ShmRingStatsSchema, } from './decoder.cap.js';
47
+ export { type DataStoreEngineInfo, dataStoreProviderCapability, EngineInfoSchema as DataStoreEngineInfoSchema, type IDataStoreProvider, } from './data-store-provider.cap.js';
47
48
  export { detectionPipelineCapability, type IDetectionPipelineProvider, } from './detection-pipeline.cap.js';
48
49
  export { AdoptInputSchema as AdoptionAdoptInputSchema, type AdoptionFilter, AdoptionFilterSchema, type AdoptionStatus, AdoptionStatusSchema, AdoptResultSchema as AdoptionAdoptResultSchema, CandidateQueryFilterSchema, deviceAdoptionCapability, GetCandidateInputSchema as AdoptionGetCandidateInputSchema, type IDeviceAdoptionProvider, ListCandidatesInputSchema as AdoptionListCandidatesInputSchema, ListCandidatesOutputSchema as AdoptionListCandidatesOutputSchema, ReleaseInputSchema as AdoptionReleaseInputSchema, } from './device-adoption.cap.js';
49
50
  export type { IDeviceExportProvider } from './device-export.cap.js';
@@ -87,8 +88,8 @@ export { CameraMetricsSchema, CameraMetricsWithDeviceIdSchema, OrchestratorMetri
87
88
  export type { CameraStream, CamProfile, CamStreamKind, DecodedAudioChunkWire, FrameHandleFormat, ProfileRtspEntry, ProfileSlot, ProfileSlotStatus, SubscribeAudioChunksInput, SubscribeAudioChunksResult, SubscribeFramesInput, SubscribeFramesResult, } from './schemas/streaming-shared.js';
88
89
  export { BrokerStatsSchema, BrokerStatusSchema, CAM_PROFILE_ORDER, CameraStreamSchema, CamProfileSchema, CamStreamKindSchema, CamStreamResolutionSchema, DecodedAudioChunkSchema, DecodedFrameSchema, EncodedPacketSchema, FrameHandleFormatSchema, FrameHandleSchema, makeProfileBrokerId, makeSourceBrokerId, ProfileRtspEntrySchema, ProfileSlotSchema, ProfileSlotStatusSchema, parseProfileBrokerId, StreamSourceEntrySchema, StreamSourceSchema, SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, SubscribeFramesInputSchema, SubscribeFramesResultSchema, selectAssignedProfileSlots, } from './schemas/streaming-shared.js';
89
90
  export { buildEventKindDescriptor, EVENT_KIND_BY_CAP, EVENTFUL_CAP_NAMES, type SensorEventKindDescriptor, } from './sensor-event-kinds.js';
90
- export { type IServerManagementProvider, type ServerBootMode, ServerBootModeSchema, type ServerPackageStatus, ServerPackageStatusSchema, type ServerRollbackInfo, ServerRollbackInfoSchema, type ServerUpdateActionResult, ServerUpdateActionResultSchema, type ServerUpdateCheckResult, ServerUpdateCheckResultSchema, type ServerUpdateState, ServerUpdateStateSchema, serverManagementCapability, } from './server-management.cap.js';
91
- export { type CollectionColumn, CollectionColumnSchema, type CollectionIndex, CollectionIndexSchema, type ISettingsStoreProvider, QueryFilterSchema, SettingsRecordSchema, type SettingsStoreClient, settingsStoreCapability, } from './settings-store.cap.js';
91
+ export { type ImageContract, ImageContractSchema, type ImageContractState, ImageContractStateSchema, type IServerManagementProvider, type ServerBootMode, ServerBootModeSchema, type ServerPackageStatus, ServerPackageStatusSchema, type ServerRollbackInfo, ServerRollbackInfoSchema, type ServerUpdateActionResult, ServerUpdateActionResultSchema, type ServerUpdateCheckResult, ServerUpdateCheckResultSchema, type ServerUpdateState, ServerUpdateStateSchema, serverManagementCapability, } from './server-management.cap.js';
92
+ export { type CollectionColumn, CollectionColumnSchema, type CollectionIndex, CollectionIndexSchema, type ISettingsStoreProvider, type MutationFilter, MutationFilterSchema, QueryFilterSchema, SettingsRecordSchema, type SettingsStoreClient, settingsStoreCapability, } from './settings-store.cap.js';
92
93
  export type { ISmtpProvider } from './smtp-provider.cap.js';
93
94
  export { SendEmailInputSchema, SendEmailResultSchema, SmtpStatusSchema, smtpProviderCapability, } from './smtp-provider.cap.js';
94
95
  export { type ISnapshotOrchestrator, SnapshotImageSchema, snapshotCapability, } from './snapshot.cap.js';
@@ -295,6 +296,7 @@ import type { recordingExportCapability } from './recording-export.cap.js';
295
296
  import type { sceneMonitorCapability } from './scene-monitor.cap.js';
296
297
  import type { scriptRunnerCapability } from './script-runner.cap.js';
297
298
  import type { serverManagementCapability } from './server-management.cap.js';
299
+ import type { dataStoreProviderCapability } from './data-store-provider.cap.js';
298
300
  import type { settingsStoreCapability } from './settings-store.cap.js';
299
301
  import type { smokeCapability } from './smoke.cap.js';
300
302
  import type { smtpProviderCapability } from './smtp-provider.cap.js';
@@ -324,6 +326,6 @@ import type { webrtcSessionCapability } from './webrtc-session.cap.js';
324
326
  import type { zoneAnalyticsCapability } from './zone-analytics.cap.js';
325
327
  import type { zoneRulesCapability } from './zone-rules.cap.js';
326
328
  import type { zonesCapability } from './zones.cap.js';
327
- type AnyCapability = typeof addonSettingsCapability | typeof alertsCapability | typeof storageCapability | typeof storageProviderCapability | typeof storageEvictableCapability | typeof filesystemBrowseCapability | typeof backupCapability | typeof terminalSessionCapability | typeof settingsStoreCapability | typeof logDestinationCapability | typeof adminUiCapability | typeof viewerUiCapability | typeof ssoBridgeCapability | typeof userPasskeysCapability | typeof smtpProviderCapability | typeof mqttBrokerCapability | typeof brokerCapability | typeof deviceAdoptionCapability | typeof deviceExportCapability | typeof addonPagesCapability | typeof addonPagesSourceCapability | typeof addonWidgetsCapability | typeof addonWidgetsSourceCapability | typeof customModelRegistryCapability | typeof modelDistributorCapability | typeof modelConvertCapability | typeof addonRoutesCapability | typeof streamBrokerCapability | typeof decoderCapability | typeof webrtcSessionCapability | typeof cameraStreamsCapability | typeof motionDetectionCapability | typeof pipelineExecutorCapability | typeof detectionPipelineCapability | typeof cameraPipelineConfigCapability | typeof pipelineRunnerCapability | typeof pipelineOrchestratorCapability | typeof audioAnalyzerCapability | typeof audioAnalysisCapability | typeof audioCodecCapability | typeof embeddingEncoderCapability | typeof deviceProviderCapability | typeof deviceManagerCapability | typeof deviceStateCapability | typeof authProviderCapability | typeof loginMethodCapability | typeof networkAccessCapability | typeof turnProviderCapability | typeof snapshotCapability | typeof llmCapability | typeof llmRuntimeCapability | typeof notificationOutputCapability | typeof notificationRulesCapability | typeof pipelineAnalyticsCapability | typeof metricsProviderCapability | typeof ptzCapability | typeof ptzAutotrackCapability | typeof consumablesCapability | typeof rebootCapability | typeof deviceDiscoveryCapability | typeof brightnessCapability | typeof colorCapability | typeof climateControlCapability | typeof coverCapability | typeof valveCapability | typeof humidifierCapability | typeof waterHeaterCapability | typeof weatherCapability | typeof imageCapability | typeof lockControlCapability | typeof vacuumControlCapability | typeof petFeederCapability | typeof lawnMowerControlCapability | typeof fanControlCapability | typeof controlCapability | typeof notifierCapability | typeof mediaPlayerCapability | typeof alarmPanelCapability | typeof presenceCapability | typeof scriptRunnerCapability | typeof automationControlCapability | typeof motionTriggerCapability | typeof eventsCapability | typeof zonesCapability | typeof zoneRulesCapability | typeof zoneAnalyticsCapability | typeof audioMetricsCapability | typeof motionCapability | typeof contactCapability | typeof floodCapability | typeof smokeCapability | typeof carbonMonoxideCapability | typeof gasCapability | typeof tamperCapability | typeof vibrationCapability | typeof connectivityCapability | typeof binaryCapability | typeof temperatureSensorCapability | typeof humiditySensorCapability | typeof ambientLightSensorCapability | typeof pressureSensorCapability | typeof powerMeterCapability | typeof airQualitySensorCapability | typeof numericSensorCapability | typeof enumSensorCapability | typeof recordingCapability | typeof recordingExportCapability | typeof deviceOpsCapability | typeof platformProbeCapability | typeof localNetworkCapability | typeof meshNetworkCapability | typeof userManagementCapability | typeof systemCapability | typeof networkQualityCapability | typeof toastCapability | typeof nodesCapability | typeof serverManagementCapability | typeof integrationsCapability | typeof addonsCapability | typeof oauthIntegrationCapability | typeof streamParamsCapability | typeof streamCatalogCapability | typeof motionZonesCapability | typeof sceneMonitorCapability | typeof privacyMaskCapability | typeof dayNightCapability | typeof imageSettingsCapability;
329
+ type AnyCapability = typeof addonSettingsCapability | typeof alertsCapability | typeof storageCapability | typeof storageProviderCapability | typeof storageEvictableCapability | typeof filesystemBrowseCapability | typeof backupCapability | typeof terminalSessionCapability | typeof settingsStoreCapability | typeof dataStoreProviderCapability | typeof logDestinationCapability | typeof adminUiCapability | typeof viewerUiCapability | typeof ssoBridgeCapability | typeof userPasskeysCapability | typeof smtpProviderCapability | typeof mqttBrokerCapability | typeof brokerCapability | typeof deviceAdoptionCapability | typeof deviceExportCapability | typeof addonPagesCapability | typeof addonPagesSourceCapability | typeof addonWidgetsCapability | typeof addonWidgetsSourceCapability | typeof customModelRegistryCapability | typeof modelDistributorCapability | typeof modelConvertCapability | typeof addonRoutesCapability | typeof streamBrokerCapability | typeof decoderCapability | typeof webrtcSessionCapability | typeof cameraStreamsCapability | typeof motionDetectionCapability | typeof pipelineExecutorCapability | typeof detectionPipelineCapability | typeof cameraPipelineConfigCapability | typeof pipelineRunnerCapability | typeof pipelineOrchestratorCapability | typeof audioAnalyzerCapability | typeof audioAnalysisCapability | typeof audioCodecCapability | typeof embeddingEncoderCapability | typeof deviceProviderCapability | typeof deviceManagerCapability | typeof deviceStateCapability | typeof authProviderCapability | typeof loginMethodCapability | typeof networkAccessCapability | typeof turnProviderCapability | typeof snapshotCapability | typeof llmCapability | typeof llmRuntimeCapability | typeof notificationOutputCapability | typeof notificationRulesCapability | typeof pipelineAnalyticsCapability | typeof metricsProviderCapability | typeof ptzCapability | typeof ptzAutotrackCapability | typeof consumablesCapability | typeof rebootCapability | typeof deviceDiscoveryCapability | typeof brightnessCapability | typeof colorCapability | typeof climateControlCapability | typeof coverCapability | typeof valveCapability | typeof humidifierCapability | typeof waterHeaterCapability | typeof weatherCapability | typeof imageCapability | typeof lockControlCapability | typeof vacuumControlCapability | typeof petFeederCapability | typeof lawnMowerControlCapability | typeof fanControlCapability | typeof controlCapability | typeof notifierCapability | typeof mediaPlayerCapability | typeof alarmPanelCapability | typeof presenceCapability | typeof scriptRunnerCapability | typeof automationControlCapability | typeof motionTriggerCapability | typeof eventsCapability | typeof zonesCapability | typeof zoneRulesCapability | typeof zoneAnalyticsCapability | typeof audioMetricsCapability | typeof motionCapability | typeof contactCapability | typeof floodCapability | typeof smokeCapability | typeof carbonMonoxideCapability | typeof gasCapability | typeof tamperCapability | typeof vibrationCapability | typeof connectivityCapability | typeof binaryCapability | typeof temperatureSensorCapability | typeof humiditySensorCapability | typeof ambientLightSensorCapability | typeof pressureSensorCapability | typeof powerMeterCapability | typeof airQualitySensorCapability | typeof numericSensorCapability | typeof enumSensorCapability | typeof recordingCapability | typeof recordingExportCapability | typeof deviceOpsCapability | typeof platformProbeCapability | typeof localNetworkCapability | typeof meshNetworkCapability | typeof userManagementCapability | typeof systemCapability | typeof networkQualityCapability | typeof toastCapability | typeof nodesCapability | typeof serverManagementCapability | typeof integrationsCapability | typeof addonsCapability | typeof oauthIntegrationCapability | typeof streamParamsCapability | typeof streamCatalogCapability | typeof motionZonesCapability | typeof sceneMonitorCapability | typeof privacyMaskCapability | typeof dayNightCapability | typeof imageSettingsCapability;
328
330
  export type CapabilityName = AnyCapability['name'];
329
331
  export type ITypedReadinessRegistry = IReadinessRegistry<CapabilityName>;
@@ -42,8 +42,8 @@ export type ExportOptions = z.infer<typeof ExportOptionsSchema>;
42
42
  export declare const ExportStateSchema: z.ZodEnum<{
43
43
  queued: "queued";
44
44
  failed: "failed";
45
- ready: "ready";
46
45
  deleted: "deleted";
46
+ ready: "ready";
47
47
  rendering: "rendering";
48
48
  expired: "expired";
49
49
  }>;
@@ -69,8 +69,8 @@ export declare const ExportRecordSchema: z.ZodObject<{
69
69
  state: z.ZodEnum<{
70
70
  queued: "queued";
71
71
  failed: "failed";
72
- ready: "ready";
73
72
  deleted: "deleted";
73
+ ready: "ready";
74
74
  rendering: "rendering";
75
75
  expired: "expired";
76
76
  }>;
@@ -133,8 +133,8 @@ export declare const recordingExportCapability: {
133
133
  state: z.ZodEnum<{
134
134
  queued: "queued";
135
135
  failed: "failed";
136
- ready: "ready";
137
136
  deleted: "deleted";
137
+ ready: "ready";
138
138
  rendering: "rendering";
139
139
  expired: "expired";
140
140
  }>;
@@ -170,8 +170,8 @@ export declare const recordingExportCapability: {
170
170
  state: z.ZodEnum<{
171
171
  queued: "queued";
172
172
  failed: "failed";
173
- ready: "ready";
174
173
  deleted: "deleted";
174
+ ready: "ready";
175
175
  rendering: "rendering";
176
176
  expired: "expired";
177
177
  }>;
@@ -206,8 +206,8 @@ export declare const recordingExportCapability: {
206
206
  state: z.ZodEnum<{
207
207
  queued: "queued";
208
208
  failed: "failed";
209
- ready: "ready";
210
209
  deleted: "deleted";
210
+ ready: "ready";
211
211
  rendering: "rendering";
212
212
  expired: "expired";
213
213
  }>;
@@ -243,8 +243,8 @@ export declare const recordingExportCapability: {
243
243
  state: z.ZodEnum<{
244
244
  queued: "queued";
245
245
  failed: "failed";
246
- ready: "ready";
247
246
  deleted: "deleted";
247
+ ready: "ready";
248
248
  rendering: "rendering";
249
249
  expired: "expired";
250
250
  }>;
@@ -280,8 +280,8 @@ export declare const recordingExportCapability: {
280
280
  state: z.ZodEnum<{
281
281
  queued: "queued";
282
282
  failed: "failed";
283
- ready: "ready";
284
283
  deleted: "deleted";
284
+ ready: "ready";
285
285
  rendering: "rendering";
286
286
  expired: "expired";
287
287
  }>;
@@ -219,7 +219,6 @@ export declare const recordingCapability: {
219
219
  max: "max";
220
220
  minimal: "minimal";
221
221
  }>>;
222
- stripsEnabled: z.ZodOptional<z.ZodBoolean>;
223
222
  }, z.core.$strict>, "query">;
224
223
  /** Locate footage at a wall-clock instant: the covering segment's window,
225
224
  * or a gap with the forward nearest covered edge. Used by a feeder running
@@ -288,7 +287,6 @@ export declare const recordingCapability: {
288
287
  max: "max";
289
288
  minimal: "minimal";
290
289
  }>>;
291
- stripsEnabled: z.ZodOptional<z.ZodBoolean>;
292
290
  }, z.core.$strict>;
293
291
  }, z.core.$strip>, z.ZodObject<{
294
292
  enabled: z.ZodBoolean;
@@ -329,7 +327,6 @@ export declare const recordingCapability: {
329
327
  max: "max";
330
328
  minimal: "minimal";
331
329
  }>>;
332
- stripsEnabled: z.ZodOptional<z.ZodBoolean>;
333
330
  }, z.core.$strict>, "mutation">;
334
331
  /** Re-scan this device's footage from disk (stat sizes) and reseed the
335
332
  * index, then return the fresh status. */
@@ -411,7 +408,7 @@ export declare const recordingCapability: {
411
408
  actor: z.ZodString;
412
409
  }, z.core.$strip>>>, "query">;
413
410
  /**
414
- * Move footage (segments and/or strips) from one recordings location to
411
+ * Move footage (recorded segments) from one recordings location to
415
412
  * another — the drain workflow's mover (entity-routing spec Phase 4).
416
413
  * Throttled copy → size-verify → delete source → index refresh; resumable
417
414
  * by construction (copy-if-absent). Single-flight: one job at a time.
@@ -468,7 +465,6 @@ export declare const recordingCapability: {
468
465
  toLocationId: z.ZodString;
469
466
  entities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
470
467
  segments: "segments";
471
- strips: "strips";
472
468
  }>>>;
473
469
  throttleMbps: z.ZodOptional<z.ZodNumber>;
474
470
  }, z.core.$strip>, z.ZodObject<{
@@ -55,6 +55,52 @@ declare const ServerUpdateStateSchema: z.ZodEnum<{
55
55
  "pending-restart": "pending-restart";
56
56
  "awaiting-confirmation": "awaiting-confirmation";
57
57
  }>;
58
+ /**
59
+ * Verdict of comparing the node's IMMUTABLE baked seed (the Docker image / the
60
+ * desktop app bundle) against the release the deployment contract would
61
+ * deliver today. `applyServerUpdate` swaps the data-root closure and NEVER
62
+ * touches the image, so `runningVersion` can be perfectly current while the
63
+ * container is weeks old, from a renamed repository nothing rebuilds — which
64
+ * is exactly what happened on 2026-08-02 (hub on `camstack-server:intel-1.1.74`
65
+ * while every existing surface said "up to date"). The seed version is the one
66
+ * image fingerprint a container can see from inside (no docker socket).
67
+ *
68
+ * - `in-sync` — seed equals the current release; the node runs the
69
+ * contract image.
70
+ * - `behind-patch` — same release series, older patch: the image predates
71
+ * the current release. Normal between deliberate image
72
+ * refreshes, but the starter/entrypoint are still old.
73
+ * - `behind-series` — the seed's major/minor predates the current release
74
+ * series. The shape of a pinned tag or a dead image
75
+ * repository; a `docker pull` may fix nothing.
76
+ * - `ahead` — seed newer than the best-known release (stale registry
77
+ * check).
78
+ * - `unknown` — no seed (dev workspace) or nothing to compare against
79
+ * yet.
80
+ */
81
+ declare const ImageContractStateSchema: z.ZodEnum<{
82
+ unknown: "unknown";
83
+ "in-sync": "in-sync";
84
+ "behind-patch": "behind-patch";
85
+ "behind-series": "behind-series";
86
+ ahead: "ahead";
87
+ }>;
88
+ declare const ImageContractSchema: z.ZodObject<{
89
+ state: z.ZodEnum<{
90
+ unknown: "unknown";
91
+ "in-sync": "in-sync";
92
+ "behind-patch": "behind-patch";
93
+ "behind-series": "behind-series";
94
+ ahead: "ahead";
95
+ }>;
96
+ seedVersion: z.ZodNullable<z.ZodString>;
97
+ contractVersion: z.ZodNullable<z.ZodString>;
98
+ contractSource: z.ZodNullable<z.ZodEnum<{
99
+ running: "running";
100
+ registry: "registry";
101
+ }>>;
102
+ message: z.ZodString;
103
+ }, z.core.$strip>;
58
104
  declare const ServerRollbackInfoSchema: z.ZodObject<{
59
105
  fromVersion: z.ZodString;
60
106
  toVersion: z.ZodNullable<z.ZodString>;
@@ -91,6 +137,22 @@ declare const ServerPackageStatusSchema: z.ZodObject<{
91
137
  }, z.core.$strip>>;
92
138
  stateFileCorrupt: z.ZodBoolean;
93
139
  lastCheckedAtMs: z.ZodNullable<z.ZodNumber>;
140
+ imageContract: z.ZodOptional<z.ZodObject<{
141
+ state: z.ZodEnum<{
142
+ unknown: "unknown";
143
+ "in-sync": "in-sync";
144
+ "behind-patch": "behind-patch";
145
+ "behind-series": "behind-series";
146
+ ahead: "ahead";
147
+ }>;
148
+ seedVersion: z.ZodNullable<z.ZodString>;
149
+ contractVersion: z.ZodNullable<z.ZodString>;
150
+ contractSource: z.ZodNullable<z.ZodEnum<{
151
+ running: "running";
152
+ registry: "registry";
153
+ }>>;
154
+ message: z.ZodString;
155
+ }, z.core.$strip>>;
94
156
  }, z.core.$strip>;
95
157
  declare const ServerUpdateCheckResultSchema: z.ZodObject<{
96
158
  packageName: z.ZodString;
@@ -141,6 +203,22 @@ export declare const serverManagementCapability: {
141
203
  }, z.core.$strip>>;
142
204
  stateFileCorrupt: z.ZodBoolean;
143
205
  lastCheckedAtMs: z.ZodNullable<z.ZodNumber>;
206
+ imageContract: z.ZodOptional<z.ZodObject<{
207
+ state: z.ZodEnum<{
208
+ unknown: "unknown";
209
+ "in-sync": "in-sync";
210
+ "behind-patch": "behind-patch";
211
+ "behind-series": "behind-series";
212
+ ahead: "ahead";
213
+ }>;
214
+ seedVersion: z.ZodNullable<z.ZodString>;
215
+ contractVersion: z.ZodNullable<z.ZodString>;
216
+ contractSource: z.ZodNullable<z.ZodEnum<{
217
+ running: "running";
218
+ registry: "registry";
219
+ }>>;
220
+ message: z.ZodString;
221
+ }, z.core.$strip>>;
144
222
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
145
223
  readonly checkServerUpdate: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
146
224
  packageName: z.ZodString;
@@ -186,8 +264,10 @@ export declare const serverManagementCapability: {
186
264
  export type IServerManagementProvider = InferProvider<typeof serverManagementCapability>;
187
265
  export type ServerBootMode = z.infer<typeof ServerBootModeSchema>;
188
266
  export type ServerUpdateState = z.infer<typeof ServerUpdateStateSchema>;
267
+ export type ImageContractState = z.infer<typeof ImageContractStateSchema>;
268
+ export type ImageContract = z.infer<typeof ImageContractSchema>;
189
269
  export type ServerRollbackInfo = z.infer<typeof ServerRollbackInfoSchema>;
190
270
  export type ServerPackageStatus = z.infer<typeof ServerPackageStatusSchema>;
191
271
  export type ServerUpdateCheckResult = z.infer<typeof ServerUpdateCheckResultSchema>;
192
272
  export type ServerUpdateActionResult = z.infer<typeof ServerUpdateActionResultSchema>;
193
- export { ServerBootModeSchema, ServerUpdateStateSchema, ServerRollbackInfoSchema, ServerPackageStatusSchema, ServerUpdateCheckResultSchema, ServerUpdateActionResultSchema, };
273
+ export { ServerBootModeSchema, ServerUpdateStateSchema, ImageContractStateSchema, ImageContractSchema, ServerRollbackInfoSchema, ServerPackageStatusSchema, ServerUpdateCheckResultSchema, ServerUpdateActionResultSchema, };
@@ -17,6 +17,20 @@ declare const QueryFilterSchema: z.ZodObject<{
17
17
  limit: z.ZodOptional<z.ZodNumber>;
18
18
  offset: z.ZodOptional<z.ZodNumber>;
19
19
  }, z.core.$strip>;
20
+ /**
21
+ * The predicate half of a filter, for BULK MUTATIONS.
22
+ *
23
+ * Deliberately not `QueryFilterSchema`: `orderBy` / `limit` / `offset` have no
24
+ * meaning for a statement that rewrites a set, and accepting them would invite
25
+ * a caller to believe `limit` bounds the damage. Every field is optional here
26
+ * only so the shape stays composable — the implementation REJECTS a filter
27
+ * that compiles to no predicate, because that is the whole collection.
28
+ */
29
+ declare const MutationFilterSchema: z.ZodObject<{
30
+ where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
31
+ whereIn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown>>>;
32
+ whereBetween: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodUnknown, z.ZodUnknown], null>>>;
33
+ }, z.core.$strip>;
20
34
  /** A single stored record: `{ id, data }`. */
21
35
  declare const SettingsRecordSchema: z.ZodObject<{
22
36
  id: z.ZodString;
@@ -56,14 +70,27 @@ declare const CollectionIndexSchema: z.ZodObject<{
56
70
  * field provides access to additional data spaces beyond the default
57
71
  * addon settings — useful for business data (events, tracks, faces, etc.).
58
72
  *
59
- * Scoping: the implementation prefixes every collection with the calling
60
- * addon's ID automatically. Addons never see each other's data.
73
+ * **Scoping is the CALLER's, and it is opt-in.** The table is
74
+ * `namespace ? `${namespace}:${collection}` : collection` nothing
75
+ * consults the identity of the caller. An earlier version of this comment
76
+ * claimed the implementation prefixes every collection with the calling
77
+ * addon's ID and that "addons never see each other's data"; that was never
78
+ * true, and this same file contradicted it under `declareCollection`. What
79
+ * exists is `addon-context-factory`, which passes `namespace: addonId` ON
80
+ * THE ADDON'S BEHALF for the `addon-settings` / `addon-devices` paths only.
81
+ * Business collections use bare names, and any caller may name any
82
+ * namespace, or none. Making the door enforce it is tracked separately —
83
+ * it renames tables, so it needs a migration.
61
84
  *
62
- * - No namespace (default): `"addon-settings"` → `"<addonId>:addon-settings"`
63
- * - With namespace: `{ namespace: 'events', collection: 'detections' }` →
64
- * `"<addonId>:events:detections"`
85
+ * - `{ collection: 'addon-settings' }` → table `addon-settings`
86
+ * - `{ namespace: 'my-addon', collection: 'addon-settings' }` →
87
+ * table `my-addon:addon-settings`
65
88
  *
66
- * Implemented by `@camstack/system/builtins/sqlite-settings` (SQLite WAL backend).
89
+ * Served by the **storage-orchestrator** builtin, which dispatches to the
90
+ * `data-store-provider` engine registered for the collection
91
+ * (`sqlite-settings`, a SQLite WAL backend, today). One addon owns the
92
+ * data door; engines sit behind it
93
+ * ([D44](../../../../docs/decisions/adr-0044.md)).
67
94
  * Addons access it via `ctx.api.settingsStore.*`.
68
95
  */
69
96
  export declare const settingsStoreCapability: {
@@ -128,6 +155,48 @@ export declare const settingsStoreCapability: {
128
155
  collection: z.ZodString;
129
156
  key: z.ZodString;
130
157
  }, z.core.$strip>, z.ZodVoid, "mutation">;
158
+ /**
159
+ * Delete every record matching `filter`, in ONE statement, returning how
160
+ * many rows went. This exists because its absence made every retention
161
+ * path in the system an N+1 drain loop: `delete` takes a key, so a sweep
162
+ * had to SELECT a page of full rows — every column, including the fat
163
+ * ones — purely to learn their ids, then issue one call per row.
164
+ *
165
+ * **The filter is required and must resolve.** A predicate naming
166
+ * something the collection cannot express is an ERROR here, not a
167
+ * widening as it is on `query`, and a filter with no predicates is an
168
+ * error rather than "every row". Deleting a whole collection is a
169
+ * legitimate intent, but it must be asked for by name — not reached by
170
+ * an empty object.
171
+ */
172
+ readonly deleteWhere: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
173
+ namespace: z.ZodOptional<z.ZodString>;
174
+ collection: z.ZodString;
175
+ filter: z.ZodObject<{
176
+ where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
177
+ whereIn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown>>>;
178
+ whereBetween: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodUnknown, z.ZodUnknown], null>>>;
179
+ }, z.core.$strip>;
180
+ }, z.core.$strip>, z.ZodObject<{
181
+ deleted: z.ZodNumber;
182
+ }, z.core.$strip>, "mutation">;
183
+ /**
184
+ * Apply `data` to every record matching `filter`, in one statement,
185
+ * returning how many rows changed. Same filter contract as
186
+ * {@link deleteWhere} — an unresolvable predicate is an error.
187
+ */
188
+ readonly updateWhere: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
189
+ namespace: z.ZodOptional<z.ZodString>;
190
+ collection: z.ZodString;
191
+ filter: z.ZodObject<{
192
+ where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
193
+ whereIn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown>>>;
194
+ whereBetween: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodUnknown, z.ZodUnknown], null>>>;
195
+ }, z.core.$strip>;
196
+ data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
197
+ }, z.core.$strip>, z.ZodObject<{
198
+ updated: z.ZodNumber;
199
+ }, z.core.$strip>, "mutation">;
131
200
  /** Count entries in a collection, optionally filtered. */
132
201
  readonly count: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
133
202
  namespace: z.ZodOptional<z.ZodString>;
@@ -223,6 +292,7 @@ export type ISettingsStoreProvider = InferProvider<typeof settingsStoreCapabilit
223
292
  * Methods are accessed as `client.get.query(input)`, `client.set.mutate(input)`, etc.
224
293
  */
225
294
  export type SettingsStoreClient = import('../generated/addon-api.js').AddonApi['settingsStore'];
226
- export { QueryFilterSchema, SettingsRecordSchema, CollectionColumnSchema, CollectionIndexSchema };
295
+ export { QueryFilterSchema, MutationFilterSchema, SettingsRecordSchema, CollectionColumnSchema, CollectionIndexSchema, };
296
+ export type MutationFilter = z.infer<typeof MutationFilterSchema>;
227
297
  export type CollectionColumn = z.infer<typeof CollectionColumnSchema>;
228
298
  export type CollectionIndex = z.infer<typeof CollectionIndexSchema>;