@camstack/types 1.2.20 → 1.2.21
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 +2 -1
- package/dist/addon.mjs +2 -1
- package/dist/capabilities/data-store-provider.cap.d.ts +190 -0
- package/dist/capabilities/index.d.ts +4 -2
- package/dist/capabilities/recording.cap.d.ts +1 -5
- package/dist/capabilities/server-management.cap.d.ts +81 -1
- package/dist/capabilities/settings-store.cap.d.ts +19 -6
- package/dist/generated/addon-api.d.ts +86 -222
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/index.js +425 -167
- package/dist/index.mjs +422 -168
- package/dist/interfaces/recording-config.d.ts +0 -1
- package/dist/interfaces/relocate.d.ts +1 -2
- package/dist/types/detection.d.ts +13 -0
- package/package.json +1 -1
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
|
+
* 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:
|
|
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,190 @@
|
|
|
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
|
+
/** Count entries in a collection, optionally filtered. */
|
|
115
|
+
readonly count: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
116
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
117
|
+
collection: z.ZodString;
|
|
118
|
+
filter: z.ZodOptional<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
|
+
orderBy: z.ZodOptional<z.ZodObject<{
|
|
123
|
+
field: z.ZodString;
|
|
124
|
+
direction: z.ZodEnum<{
|
|
125
|
+
asc: "asc";
|
|
126
|
+
desc: "desc";
|
|
127
|
+
}>;
|
|
128
|
+
}, z.core.$strip>>;
|
|
129
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
130
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
}, z.core.$strip>, z.ZodNumber, import("./capability-definition.js").CapabilityMethodKind>;
|
|
133
|
+
/** Grouped counts per ((field-origin)/bucketSize) bucket, filtered. */
|
|
134
|
+
readonly histogram: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
135
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
136
|
+
collection: z.ZodString;
|
|
137
|
+
field: z.ZodString;
|
|
138
|
+
bucketSize: z.ZodNumber;
|
|
139
|
+
origin: z.ZodNumber;
|
|
140
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
141
|
+
where: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
142
|
+
whereIn: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnknown>>>;
|
|
143
|
+
whereBetween: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodUnknown, z.ZodUnknown], null>>>;
|
|
144
|
+
orderBy: z.ZodOptional<z.ZodObject<{
|
|
145
|
+
field: z.ZodString;
|
|
146
|
+
direction: z.ZodEnum<{
|
|
147
|
+
asc: "asc";
|
|
148
|
+
desc: "desc";
|
|
149
|
+
}>;
|
|
150
|
+
}, z.core.$strip>>;
|
|
151
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
152
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
}, z.core.$strip>>;
|
|
154
|
+
}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
155
|
+
bucket: z.ZodNumber;
|
|
156
|
+
count: z.ZodNumber;
|
|
157
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
158
|
+
/** Check if a collection is empty. */
|
|
159
|
+
readonly isEmpty: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
160
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
161
|
+
collection: z.ZodString;
|
|
162
|
+
}, z.core.$strip>, z.ZodBoolean, import("./capability-definition.js").CapabilityMethodKind>;
|
|
163
|
+
/** Declare a typed (SQL-backed) collection with columns + indexes. */
|
|
164
|
+
readonly declareCollection: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
165
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
166
|
+
collection: z.ZodString;
|
|
167
|
+
columns: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
168
|
+
name: z.ZodString;
|
|
169
|
+
type: z.ZodEnum<{
|
|
170
|
+
TEXT: "TEXT";
|
|
171
|
+
INTEGER: "INTEGER";
|
|
172
|
+
REAL: "REAL";
|
|
173
|
+
JSON: "JSON";
|
|
174
|
+
BOOLEAN: "BOOLEAN";
|
|
175
|
+
}>;
|
|
176
|
+
primaryKey: z.ZodOptional<z.ZodBoolean>;
|
|
177
|
+
notNull: z.ZodOptional<z.ZodBoolean>;
|
|
178
|
+
unique: z.ZodOptional<z.ZodBoolean>;
|
|
179
|
+
}, z.core.$strip>>>;
|
|
180
|
+
indexes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
181
|
+
name: z.ZodString;
|
|
182
|
+
columns: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
183
|
+
unique: z.ZodOptional<z.ZodBoolean>;
|
|
184
|
+
}, z.core.$strip>>>>;
|
|
185
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
export type IDataStoreProvider = InferProvider<typeof dataStoreProviderCapability>;
|
|
189
|
+
export { EngineInfoSchema };
|
|
190
|
+
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,7 +88,7 @@ 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 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';
|
|
91
92
|
export { type CollectionColumn, CollectionColumnSchema, type CollectionIndex, CollectionIndexSchema, type ISettingsStoreProvider, 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';
|
|
@@ -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>;
|
|
@@ -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
|
|
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, };
|
|
@@ -56,14 +56,27 @@ declare const CollectionIndexSchema: z.ZodObject<{
|
|
|
56
56
|
* field provides access to additional data spaces beyond the default
|
|
57
57
|
* addon settings — useful for business data (events, tracks, faces, etc.).
|
|
58
58
|
*
|
|
59
|
-
* Scoping
|
|
60
|
-
*
|
|
59
|
+
* **Scoping is the CALLER's, and it is opt-in.** The table is
|
|
60
|
+
* `namespace ? `${namespace}:${collection}` : collection` — nothing
|
|
61
|
+
* consults the identity of the caller. An earlier version of this comment
|
|
62
|
+
* claimed the implementation prefixes every collection with the calling
|
|
63
|
+
* addon's ID and that "addons never see each other's data"; that was never
|
|
64
|
+
* true, and this same file contradicted it under `declareCollection`. What
|
|
65
|
+
* exists is `addon-context-factory`, which passes `namespace: addonId` ON
|
|
66
|
+
* THE ADDON'S BEHALF for the `addon-settings` / `addon-devices` paths only.
|
|
67
|
+
* Business collections use bare names, and any caller may name any
|
|
68
|
+
* namespace, or none. Making the door enforce it is tracked separately —
|
|
69
|
+
* it renames tables, so it needs a migration.
|
|
61
70
|
*
|
|
62
|
-
* -
|
|
63
|
-
* -
|
|
64
|
-
* `
|
|
71
|
+
* - `{ collection: 'addon-settings' }` → table `addon-settings`
|
|
72
|
+
* - `{ namespace: 'my-addon', collection: 'addon-settings' }` →
|
|
73
|
+
* table `my-addon:addon-settings`
|
|
65
74
|
*
|
|
66
|
-
*
|
|
75
|
+
* Served by the **storage-orchestrator** builtin, which dispatches to the
|
|
76
|
+
* `data-store-provider` engine registered for the collection
|
|
77
|
+
* (`sqlite-settings`, a SQLite WAL backend, today). One addon owns the
|
|
78
|
+
* data door; engines sit behind it
|
|
79
|
+
* ([D44](../../../../docs/decisions/adr-0044.md)).
|
|
67
80
|
* Addons access it via `ctx.api.settingsStore.*`.
|
|
68
81
|
*/
|
|
69
82
|
export declare const settingsStoreCapability: {
|