@camstack/types 1.2.34 → 1.2.35
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 +3 -2
- package/dist/addon.mjs +3 -2
- package/dist/capabilities/index.d.ts +14 -11
- package/dist/capabilities/vector-store.cap.d.ts +223 -0
- package/dist/generated/addon-api.d.ts +54 -4
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/index.d.ts +166 -165
- package/dist/index.js +25622 -25360
- package/dist/index.mjs +25604 -25361
- package/dist/{sleep-NRXhq0dh.mjs → sleep-BeLSE-Rr.mjs} +517 -517
- package/dist/utils/vector-codec.d.ts +28 -0
- package/package.json +1 -1
- package/dist/{sleep-CJ-cpJTN.js → sleep-C6W2qcHX.js} +516 -516
package/dist/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_sleep = require("./sleep-CJ-cpJTN.js");
|
|
3
2
|
const require_event_category = require("./event-category-BE4PDZ_3.js");
|
|
3
|
+
const require_sleep = require("./sleep-C6W2qcHX.js");
|
|
4
4
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
5
5
|
//#region src/generated/collection-array-methods.ts
|
|
6
6
|
/**
|
|
@@ -71,7 +71,7 @@ function isCollectionArrayMethodName(capName, method) {
|
|
|
71
71
|
* Plain data, zero Zod: a forked runner must not import the schema barrel
|
|
72
72
|
* (~144MB RSS per runner — D28).
|
|
73
73
|
*
|
|
74
|
-
* Coverage:
|
|
74
|
+
* Coverage: 22 caps, 49 methods with defaults.
|
|
75
75
|
*/
|
|
76
76
|
var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
77
77
|
"addons": { "getLogs": { "limit": 100 } },
|
|
@@ -256,6 +256,7 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
|
256
256
|
"createApiKey": { "isAdmin": false },
|
|
257
257
|
"createUser": { "isAdmin": false }
|
|
258
258
|
},
|
|
259
|
+
"vector-store": { "declareIndex": { "metric": "cosine" } },
|
|
259
260
|
"zones": {
|
|
260
261
|
"addZone": { "zone": { "__nested__": {
|
|
261
262
|
"kind": "polygon",
|
package/dist/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as DEVICE_SCOPED_CAPS, D as asJsonObject, F as readNodePin, I as DATAPLANE_SECRET_HEADER, L as ReadinessRegistry, M as parseJsonUnknown, P as nodePin, R as ReadinessTimeoutError, S as DeviceType, Tt as DisposerChain, V as scopeKey, _t as emitReadiness, a as viewerUiCapability, i as deviceOpsCapability, k as asString, m as expandCapMethods, mt as normalizeAddonInitResult, o as adminUiCapability, pt as BaseAddon, s as createDeviceProxy, t as sleep, w as isDeviceScopedCap } from "./sleep-NRXhq0dh.mjs";
|
|
2
1
|
import { t as EventCategory } from "./event-category-41fKf-q9.mjs";
|
|
2
|
+
import { B as scopeKey, C as DeviceType, F as readNodePin, I as ReadinessRegistry, L as ReadinessTimeoutError, O as expandCapMethods, P as nodePin, a as asJsonObject, d as DEVICE_SCOPED_CAPS, f as isDeviceScopedCap, ft as DATAPLANE_SECRET_HEADER, ht as normalizeAddonInitResult, mt as BaseAddon, p as createDeviceProxy, pt as DisposerChain, s as asString, t as sleep, u as parseJsonUnknown, v as deviceOpsCapability, vt as emitReadiness, w as adminUiCapability, y as viewerUiCapability } from "./sleep-BeLSE-Rr.mjs";
|
|
3
3
|
import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
|
|
4
4
|
//#region src/generated/collection-array-methods.ts
|
|
5
5
|
/**
|
|
@@ -70,7 +70,7 @@ function isCollectionArrayMethodName(capName, method) {
|
|
|
70
70
|
* Plain data, zero Zod: a forked runner must not import the schema barrel
|
|
71
71
|
* (~144MB RSS per runner — D28).
|
|
72
72
|
*
|
|
73
|
-
* Coverage:
|
|
73
|
+
* Coverage: 22 caps, 49 methods with defaults.
|
|
74
74
|
*/
|
|
75
75
|
var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
76
76
|
"addons": { "getLogs": { "limit": 100 } },
|
|
@@ -255,6 +255,7 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
|
255
255
|
"createApiKey": { "isAdmin": false },
|
|
256
256
|
"createUser": { "isAdmin": false }
|
|
257
257
|
},
|
|
258
|
+
"vector-store": { "declareIndex": { "metric": "cosine" } },
|
|
258
259
|
"zones": {
|
|
259
260
|
"addZone": { "zone": { "__nested__": {
|
|
260
261
|
"kind": "polygon",
|
|
@@ -31,7 +31,6 @@ export type { AudioAnalyzerGlobalConfig, AudioBackendChoice, IAudioAnalyzerProvi
|
|
|
31
31
|
export { AUDIO_BACKEND_CHOICES, AudioAnalysisResultSchema, AudioAnalysisSettingsSchema, AudioClassificationResultSchema, audioAnalyzerCapability, DEFAULT_AUDIO_ANALYZER_CONFIG, } from './audio-analyzer.cap.js';
|
|
32
32
|
export { AudioCodecInfoSchema, AudioDecodeSessionConfigSchema, AudioEncodedChunkSchema, AudioEncodeSessionConfigSchema, AudioPcmChunkSchema, audioCodecCapability, type IAudioCodecCapProvider, PcmSampleFormatSchema, } from './audio-codec.cap.js';
|
|
33
33
|
export { AuthResultSchema, authProviderCapability } from './auth-provider.cap.js';
|
|
34
|
-
export { terminalSessionCapability, type ITerminalSessionProvider, type TerminalSessionInfo, type TerminalProfileInfo, TerminalSessionInfoSchema, TerminalProfileInfoSchema, } from './terminal-session.cap.js';
|
|
35
34
|
export { ArchiveEntrySchema, ArchiveManifestSchema, BackupDestinationInfoSchema, BackupEntrySchema, backupCapability, type IBackupProvider, LocationStatSchema, } from './backup.cap.js';
|
|
36
35
|
export { BrokerAddInputSchema, BrokerGetStateInputSchema, type BrokerInfo as UnifiedBrokerInfo, BrokerInfoSchema as UnifiedBrokerInfoSchema, type BrokerProviderInfo, BrokerProviderInfoSchema, BrokerPublishInputSchema, BrokerRegistryStatusSchema, type BrokerStatus as UnifiedBrokerStatus, BrokerStatusEnum, BrokerSubscribeInputSchema, BrokerSubscribeResultSchema, BrokerTestConnectionResultSchema, BrokerUnsubscribeInputSchema, brokerCapability, type IBrokerProvider, } from './broker.cap.js';
|
|
37
36
|
export { cameraPipelineConfigCapability, type ICameraPipelineConfigProvider, } from './camera-pipeline-config.cap.js';
|
|
@@ -39,12 +38,13 @@ export { cameraStreamsCapability, type ICameraStreamsProvider, type PickedCamStr
|
|
|
39
38
|
export { extractNestedAddonId, isArrayOutputSchema, isCollectionArrayMethod, isObjectInput, isVoidInput, kebabToCamel, looseSchema, objectInputDeclaresAddonId, procedureAuthKey, } from './cap-router-predicates.js';
|
|
40
39
|
export type { CapabilityDefinition, CapabilityEventSchema, CapabilityMethodAuth, CapabilityMethodCaller, CapabilityMethodKind, CapabilityMethodOptions, CapabilityMethodSchema, CapabilityMountHint, CapabilityMountKind, CapabilityStatusItemArray, CapabilityStatusKind, CapabilityStatusSchema, CapCaller, DeviceConfigDerivedFormUi, DeviceConfigSpec, DeviceConfigUiSpec, DeviceConfigWidgetUi, DeviceSettingsContribution, InferDeviceProxyCap, InferEvents, InferName, InferNativeProvider, InferProvider, InferRuntimeState, ProviderKind, UiContribution, UiContributionKind, UiContributionRemote, } from './capability-definition.js';
|
|
41
40
|
export { DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, event, expandCapMethods, isDeviceConfigCap, method, resolveCapMount, } from './capability-definition.js';
|
|
41
|
+
export { type CoreBlock, type CoreBlockCompileResult, CoreBlockCompileResultSchema, type CoreBlockInput, CoreBlockInputSchema, type CoreBlockPlacement, CoreBlockPlacementSchema, CoreBlockSchema, type CoreBlockStatus, CoreBlockStatusSchema, coreBlocksCapability, type ICoreBlocksProvider, } from './core-blocks.cap.js';
|
|
42
42
|
export * from './custom-actions.js';
|
|
43
43
|
export type { CustomModelDescriptor, ICustomModelRegistryProvider, } from './custom-model-registry.cap.js';
|
|
44
44
|
export { CustomModelDescriptorSchema, customModelRegistryCapability, } from './custom-model-registry.cap.js';
|
|
45
|
+
export { type DataStoreEngineInfo, dataStoreProviderCapability, EngineInfoSchema as DataStoreEngineInfoSchema, type IDataStoreProvider, } from './data-store-provider.cap.js';
|
|
45
46
|
export type { DecoderHwAccelConfig, HwAccelChoice, IDecoderCapProvider, ShmRingStats, } from './decoder.cap.js';
|
|
46
47
|
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';
|
|
48
48
|
export { detectionPipelineCapability, type IDetectionPipelineProvider, } from './detection-pipeline.cap.js';
|
|
49
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';
|
|
50
50
|
export type { IDeviceExportProvider } from './device-export.cap.js';
|
|
@@ -73,11 +73,10 @@ export type { BrokerConnectionDetails, BrokerInfo, BrokerStatus as MqttBrokerLiv
|
|
|
73
73
|
export { AddBrokerInputSchema, BrokerConnectionDetailsSchema, BrokerInfoSchema, MqttBrokerStatusSchema, mqttBrokerCapability, StartEmbeddedInputSchema, } from './mqtt-broker.cap.js';
|
|
74
74
|
export type { NetworkAccessStatus, NetworkEndpoint } from './network-access.cap.js';
|
|
75
75
|
export { NetworkAccessStatusSchema, NetworkEndpointSchema, networkAccessCapability, } from './network-access.cap.js';
|
|
76
|
-
export { type Attachment, type AttachmentMediaType, AttachmentMediaTypeSchema, AttachmentSchema, type DiscoveredTarget, DiscoveredTargetSchema, type INotificationOutputProvider, type NotificationAction,
|
|
77
|
-
export { type
|
|
78
|
-
export { type INotificationRulesProvider, NC_CONDITION_CATALOG, 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 NcConditionDescriptor, NcConditionDescriptorSchema, type NcConditions, NcConditionsSchema, type NcCrossing, NcCrossingSchema, type NcDeviceStateCondition, NcDeviceStateConditionSchema, type NcDelivery, NcDeliverySchema, 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 NcRuleNotificationButton, NcRuleNotificationButtonSchema, type NcRuleInput, NcRuleInputSchema, type NcRulePatch, NcRulePatchSchema, NcRuleSchema, type NcRuleTarget, NcRuleTargetSchema, type NcSchedule, NcScheduleSchema, type NcScheduleWindow, NcScheduleWindowSchema, type NcSnooze, type NcSnoozeInput, NcSnoozeInputSchema, NcSnoozeSchema, type NcSnoozeScope, NcSnoozeScopeSchema, type NcSnoozeSuppressed, NcSnoozeSuppressedSchema, type NcTestResult, NcTestResultSchema, type NcThrottle, type NcThrottleGranularity, NcThrottleGranularitySchema, NcThrottleSchema, type NcZoneCondition, NcZoneConditionSchema, notificationRulesCapability, } from './notification-rules.cap.js';
|
|
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
|
+
export { type INotificationRulesProvider, NC_CONDITION_CATALOG, 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 NcConditionDescriptor, NcConditionDescriptorSchema, type NcConditions, NcConditionsSchema, 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 NcSchedule, NcScheduleSchema, type NcScheduleWindow, NcScheduleWindowSchema, type NcSnooze, type NcSnoozeInput, NcSnoozeInputSchema, NcSnoozeSchema, type NcSnoozeScope, NcSnoozeScopeSchema, type NcSnoozeSuppressed, NcSnoozeSuppressedSchema, type NcTestResult, NcTestResultSchema, type NcThrottle, type NcThrottleGranularity, NcThrottleGranularitySchema, NcThrottleSchema, type NcZoneCondition, NcZoneConditionSchema, notificationRulesCapability, } from './notification-rules.cap.js';
|
|
79
78
|
export { type IOauthIntegrationProvider, type OauthIntegrationDescriptor, OauthIntegrationDescriptorSchema, oauthIntegrationCapability, } from './oauth-integration.cap.js';
|
|
80
|
-
export { type AudioEvent, AudioEventSchema, type DetectionSource, DetectionSourceSchema, type EventKind, type EventKindCategory, EventKindCategorySchema, type EventKindDescriptor, EventKindDescriptorSchema, type
|
|
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 MediaFile, type MediaFileInfo, MediaFileInfoSchema, type MediaFileKind, MediaFileSchema, type MotionEvent, MotionEventSchema, type ObjectEvent, ObjectEventSchema, pipelineAnalyticsCapability, type RecentTracksPage, RecentTracksPageSchema, type RecentTracksQuery, RecentTracksQueryInput, type ScoredObjectEvent, ScoredObjectEventSchema, type SensorEvent, SensorEventSchema, type Track, type TrackCascadeCounts, TrackCascadeCountsSchema, type TrackEnvelope, TrackEnvelopeSchema, TrackedDetectionSchema, type TrackProjection, TrackProjectionSchema, TrackSchema, type TrackState, TrackStateSchema, type TrackZoneFilter, TrackZoneFilterSchema, type ZoneCrossing, type ZoneCrossingDirection, ZoneCrossingDirectionSchema, ZoneCrossingSchema, } from './pipeline-analytics.cap.js';
|
|
81
80
|
export type { NativeCropRef, PipelineStepInputOutput, PipelineValidationIssue, PipelineValidationResult, } from './pipeline-executor.cap.js';
|
|
82
81
|
export { ModelSubstitutionSchema, NativeCropRefSchema, PipelineDefaultStepSchema, PipelineEngineChoiceSchema, PipelineRunResultBridge, PipelineStepInputSchema, PipelineValidationIssueSchema, PipelineValidationResultSchema, pipelineExecutorCapability, } from './pipeline-executor.cap.js';
|
|
83
82
|
export type { CameraAssignmentStatus, CameraAudioStatus, CameraBrokerProfile, CameraBrokerStatus, CameraDecoderShm, CameraDecoderStatus, CameraDetectionPhase, CameraDetectionProvisioning, CameraDetectionProvisioningState, CameraDetectionStatus, CameraMotionStatus, CameraRecordingMode, CameraRecordingStatus, CameraSourceStatus, CameraSourceStream, CameraStatus, IngestOwner, NodeInferenceDevice, NodeInferenceDevices, } from './pipeline-orchestrator.cap.js';
|
|
@@ -100,11 +99,14 @@ export { type IStorageCapProvider, StorageLocationTypeSchema, storageCapability,
|
|
|
100
99
|
export { type EvictableUsage, type EvictResult, type IStorageEvictableProvider, storageEvictableCapability, } from './storage-evictable.cap.js';
|
|
101
100
|
export { AbortUploadInputSchema as StorageAbortUploadInputSchema, BeginDownloadInputSchema as StorageBeginDownloadInputSchema, BeginDownloadResultSchema as StorageBeginDownloadResultSchema, BeginUploadInputSchema as StorageBeginUploadInputSchema, BeginUploadResultSchema as StorageBeginUploadResultSchema, EndDownloadInputSchema as StorageEndDownloadInputSchema, FinalizeUploadInputSchema as StorageFinalizeUploadInputSchema, type IStorageProviderImpl, ProviderInfoSchema as StorageProviderInfoSchema, ReadChunkInputSchema as StorageReadChunkInputSchema, storageProviderCapability, TestLocationResultSchema as StorageTestLocationResultSchema, WriteChunkInputSchema as StorageWriteChunkInputSchema, } from './storage-provider.cap.js';
|
|
102
101
|
export type { AudioCodecTarget, BrokerAudioClient, BrokerClients, BrokerConsumerAttribution, BrokerConsumerKind, BrokerDecodedClient, BrokerEncodedClient, BrokerRtspClient, GetStreamWithCodecInput, PlaceholderReason, RtpSource, VideoCodecTarget, } from './stream-broker.cap.js';
|
|
103
|
-
export { BrokerAudioClientSchema, BrokerClientsSchema, BrokerConsumerAttributionSchema, BrokerConsumerKindSchema, BrokerDecodedClientSchema, BrokerEncodedClientSchema, BrokerRtspClientSchema, GetStreamWithCodecInputSchema, PlaceholderReasonSchema, RtpSourceSchema, RtspRestreamEntrySchema, type StreamFormat, StreamFormatSchema, streamBrokerCapability,
|
|
102
|
+
export { BrokerAudioClientSchema, BrokerClientsSchema, BrokerConsumerAttributionSchema, BrokerConsumerKindSchema, BrokerDecodedClientSchema, BrokerEncodedClientSchema, BrokerRtspClientSchema, GetStreamWithCodecInputSchema, PlaceholderReasonSchema, RtpSourceSchema, RtspRestreamEntrySchema, type StreamBrokerClient, type StreamFormat, StreamFormatSchema, streamBrokerCapability, } from './stream-broker.cap.js';
|
|
103
|
+
export { type ITerminalSessionProvider, type TerminalProfileInfo, TerminalProfileInfoSchema, type TerminalSessionInfo, TerminalSessionInfoSchema, terminalSessionCapability, } from './terminal-session.cap.js';
|
|
104
104
|
export type { ITurnProvider } from './turn-provider.cap.js';
|
|
105
105
|
export { TurnServerSchema, turnProviderCapability } from './turn-provider.cap.js';
|
|
106
106
|
export type { IUserPasskeysProvider, PasskeySummary } from './user-passkeys.cap.js';
|
|
107
107
|
export { PasskeySummarySchema, userPasskeysCapability } from './user-passkeys.cap.js';
|
|
108
|
+
export type { IVectorStoreProvider } from './vector-store.cap.js';
|
|
109
|
+
export { VectorDeclareIndexInputSchema, VectorDeleteByFilterInputSchema, VectorDeleteInputSchema, VectorDeleteResultSchema, type VectorFilter, VectorFilterSchema, type VectorItem, VectorItemSchema, type VectorMatch, VectorMatchSchema, type VectorMetadata, VectorMetadataSchema, type VectorMetric, VectorMetricSchema, VectorQueryInputSchema, VectorQueryResultSchema, VectorStatsInputSchema, VectorStatsResultSchema, VectorUpsertInputSchema, VectorUpsertResultSchema, vectorStoreCapability, } from './vector-store.cap.js';
|
|
108
110
|
export type { Clip, ClipPlayback, IVideoclipsProvider } from './videoclips.cap.js';
|
|
109
111
|
export { ClipPlaybackSchema, ClipSchema, videoclipsCapability } from './videoclips.cap.js';
|
|
110
112
|
export type { IViewerUiProvider } from './viewer-ui.cap.js';
|
|
@@ -230,8 +232,10 @@ import type { connectivityCapability } from './connectivity.cap.js';
|
|
|
230
232
|
import type { consumablesCapability } from './consumables.cap.js';
|
|
231
233
|
import type { contactCapability } from './contact.cap.js';
|
|
232
234
|
import type { controlCapability } from './control.cap.js';
|
|
235
|
+
import type { coreBlocksCapability } from './core-blocks.cap.js';
|
|
233
236
|
import type { coverCapability } from './cover.cap.js';
|
|
234
237
|
import type { customModelRegistryCapability } from './custom-model-registry.cap.js';
|
|
238
|
+
import type { dataStoreProviderCapability } from './data-store-provider.cap.js';
|
|
235
239
|
import type { dayNightCapability } from './day-night.cap.js';
|
|
236
240
|
import type { decoderCapability } from './decoder.cap.js';
|
|
237
241
|
import type { detectionPipelineCapability } from './detection-pipeline.cap.js';
|
|
@@ -275,7 +279,6 @@ import type { networkAccessCapability } from './network-access.cap.js';
|
|
|
275
279
|
import type { networkQualityCapability } from './network-quality.cap.js';
|
|
276
280
|
import type { nodesCapability } from './nodes.cap.js';
|
|
277
281
|
import type { notificationOutputCapability } from './notification-output.cap.js';
|
|
278
|
-
import type { coreBlocksCapability } from './core-blocks.cap.js';
|
|
279
282
|
import type { notificationRulesCapability } from './notification-rules.cap.js';
|
|
280
283
|
import type { notifierCapability } from './notifier.cap.js';
|
|
281
284
|
import type { numericSensorCapability } from './numeric-sensor.cap.js';
|
|
@@ -298,7 +301,6 @@ import type { recordingExportCapability } from './recording-export.cap.js';
|
|
|
298
301
|
import type { sceneMonitorCapability } from './scene-monitor.cap.js';
|
|
299
302
|
import type { scriptRunnerCapability } from './script-runner.cap.js';
|
|
300
303
|
import type { serverManagementCapability } from './server-management.cap.js';
|
|
301
|
-
import type { dataStoreProviderCapability } from './data-store-provider.cap.js';
|
|
302
304
|
import type { settingsStoreCapability } from './settings-store.cap.js';
|
|
303
305
|
import type { smokeCapability } from './smoke.cap.js';
|
|
304
306
|
import type { smtpProviderCapability } from './smtp-provider.cap.js';
|
|
@@ -313,21 +315,22 @@ import type { streamParamsCapability } from './stream-params.cap.js';
|
|
|
313
315
|
import type { systemCapability } from './system.cap.js';
|
|
314
316
|
import type { tamperCapability } from './tamper.cap.js';
|
|
315
317
|
import type { temperatureSensorCapability } from './temperature-sensor.cap.js';
|
|
318
|
+
import type { terminalSessionCapability } from './terminal-session.cap.js';
|
|
316
319
|
import type { toastCapability } from './toast.cap.js';
|
|
317
320
|
import type { turnProviderCapability } from './turn-provider.cap.js';
|
|
318
321
|
import type { userManagementCapability } from './user-management.cap.js';
|
|
319
322
|
import type { userPasskeysCapability } from './user-passkeys.cap.js';
|
|
320
323
|
import type { vacuumControlCapability } from './vacuum-control.cap.js';
|
|
321
324
|
import type { valveCapability } from './valve.cap.js';
|
|
325
|
+
import type { vectorStoreCapability } from './vector-store.cap.js';
|
|
322
326
|
import type { vibrationCapability } from './vibration.cap.js';
|
|
323
327
|
import type { viewerUiCapability } from './viewer-ui.cap.js';
|
|
324
|
-
import type { terminalSessionCapability } from './terminal-session.cap.js';
|
|
325
328
|
import type { waterHeaterCapability } from './water-heater.cap.js';
|
|
326
329
|
import type { weatherCapability } from './weather.cap.js';
|
|
327
330
|
import type { webrtcSessionCapability } from './webrtc-session.cap.js';
|
|
328
331
|
import type { zoneAnalyticsCapability } from './zone-analytics.cap.js';
|
|
329
332
|
import type { zoneRulesCapability } from './zone-rules.cap.js';
|
|
330
333
|
import type { zonesCapability } from './zones.cap.js';
|
|
331
|
-
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 coreBlocksCapability | 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;
|
|
334
|
+
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 vectorStoreCapability | typeof deviceProviderCapability | typeof deviceManagerCapability | typeof deviceStateCapability | typeof authProviderCapability | typeof loginMethodCapability | typeof networkAccessCapability | typeof turnProviderCapability | typeof snapshotCapability | typeof llmCapability | typeof llmRuntimeCapability | typeof notificationOutputCapability | typeof coreBlocksCapability | 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;
|
|
332
335
|
export type CapabilityName = AnyCapability['name'];
|
|
333
336
|
export type ITypedReadinessRegistry = IReadinessRegistry<CapabilityName>;
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { type InferProvider } from './capability-definition.js';
|
|
3
|
+
/**
|
|
4
|
+
* vector-store — the dedicated home for embedding vectors and similarity search.
|
|
5
|
+
*
|
|
6
|
+
* ## Why this is a capability and not a helper
|
|
7
|
+
*
|
|
8
|
+
* Six stores in `addon-post-analysis` already hold vectors — object CLIP, face,
|
|
9
|
+
* plate, vehicle, identity, and the event store's derivatives — and every one of
|
|
10
|
+
* them keeps its vectors in a `JSON` settings-store column and ranks them by
|
|
11
|
+
* brute-force cosine in JS. Measured on the live hub that costs ~11.7 KB per row
|
|
12
|
+
* (512 floats as TEXT, `JSON.parse`d on every search) and made semantic search
|
|
13
|
+
* load 5,000 rows before ranking anything.
|
|
14
|
+
*
|
|
15
|
+
* The fix is not a faster loop, it is a different backend — and the backend
|
|
16
|
+
* should be replaceable without touching six callers. So: a singleton
|
|
17
|
+
* capability. The provider shipped today is SQLite-backed brute force over
|
|
18
|
+
* COMPACT rows; an ANN index (sqlite-vec, usearch, …) can replace it later by
|
|
19
|
+
* registering a different provider and `setActiveSingleton`, with no caller
|
|
20
|
+
* change. That is the whole point of putting it here.
|
|
21
|
+
*
|
|
22
|
+
* ## Wire format: base64, deliberately
|
|
23
|
+
*
|
|
24
|
+
* `vector` is base64 of little-endian Float32 — NOT `number[]`, and NOT a
|
|
25
|
+
* `Float32Array`. Both alternatives have already cost this repo:
|
|
26
|
+
* a `Float32Array` does not survive msgpack across the UDS transport (it arrived
|
|
27
|
+
* as an empty object and froze audio dBFS), and `number[]` is the ~5x-larger
|
|
28
|
+
* encoding this capability exists to stop paying. A 512-dim vector is 2,048
|
|
29
|
+
* bytes raw, 2,732 as base64, against ~10-12 KB as JSON text.
|
|
30
|
+
*
|
|
31
|
+
* Helpers for both directions live in `@camstack/types` —
|
|
32
|
+
* `encodeVectorBase64` / `decodeVectorBase64` — so no caller hand-rolls the
|
|
33
|
+
* byte order.
|
|
34
|
+
*/
|
|
35
|
+
/** Similarity metric an index ranks by. */
|
|
36
|
+
export declare const VectorMetricSchema: z.ZodEnum<{
|
|
37
|
+
cosine: "cosine";
|
|
38
|
+
dot: "dot";
|
|
39
|
+
euclidean: "euclidean";
|
|
40
|
+
}>;
|
|
41
|
+
export type VectorMetric = z.infer<typeof VectorMetricSchema>;
|
|
42
|
+
/**
|
|
43
|
+
* Scalar metadata carried alongside a vector.
|
|
44
|
+
*
|
|
45
|
+
* Deliberately flat and scalar: it is what {@link VectorFilterSchema} can filter
|
|
46
|
+
* on, and a nested object cannot be indexed by any backend worth swapping in.
|
|
47
|
+
* Callers keep their rich records in their own store and put only the filterable
|
|
48
|
+
* columns here (deviceId, timestamp, className, modelId, …).
|
|
49
|
+
*/
|
|
50
|
+
export declare const VectorMetadataSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
51
|
+
export type VectorMetadata = z.infer<typeof VectorMetadataSchema>;
|
|
52
|
+
/**
|
|
53
|
+
* Prefilter applied BEFORE ranking.
|
|
54
|
+
*
|
|
55
|
+
* `equals` and `between` are ANDed. A backend that cannot push a clause down
|
|
56
|
+
* must still apply it — a filter that is silently ignored returns results the
|
|
57
|
+
* caller will treat as matches.
|
|
58
|
+
*/
|
|
59
|
+
export declare const VectorFilterSchema: z.ZodObject<{
|
|
60
|
+
equals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
61
|
+
between: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
export type VectorFilter = z.infer<typeof VectorFilterSchema>;
|
|
64
|
+
/** One vector plus its identity and filterable metadata. */
|
|
65
|
+
export declare const VectorItemSchema: z.ZodObject<{
|
|
66
|
+
id: z.ZodString;
|
|
67
|
+
vector: z.ZodString;
|
|
68
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
export type VectorItem = z.infer<typeof VectorItemSchema>;
|
|
71
|
+
/** A ranked hit. */
|
|
72
|
+
export declare const VectorMatchSchema: z.ZodObject<{
|
|
73
|
+
id: z.ZodString;
|
|
74
|
+
score: z.ZodNumber;
|
|
75
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
export type VectorMatch = z.infer<typeof VectorMatchSchema>;
|
|
78
|
+
export declare const VectorDeclareIndexInputSchema: z.ZodObject<{
|
|
79
|
+
index: z.ZodString;
|
|
80
|
+
dim: z.ZodNumber;
|
|
81
|
+
metric: z.ZodDefault<z.ZodEnum<{
|
|
82
|
+
cosine: "cosine";
|
|
83
|
+
dot: "dot";
|
|
84
|
+
euclidean: "euclidean";
|
|
85
|
+
}>>;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
export declare const VectorUpsertInputSchema: z.ZodObject<{
|
|
88
|
+
index: z.ZodString;
|
|
89
|
+
items: z.ZodArray<z.ZodObject<{
|
|
90
|
+
id: z.ZodString;
|
|
91
|
+
vector: z.ZodString;
|
|
92
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
export declare const VectorUpsertResultSchema: z.ZodObject<{
|
|
96
|
+
upserted: z.ZodNumber;
|
|
97
|
+
rejected: z.ZodNumber;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
export declare const VectorQueryInputSchema: z.ZodObject<{
|
|
100
|
+
index: z.ZodString;
|
|
101
|
+
vector: z.ZodString;
|
|
102
|
+
topK: z.ZodNumber;
|
|
103
|
+
minScore: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
105
|
+
equals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
106
|
+
between: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
107
|
+
}, z.core.$strip>>;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
export declare const VectorQueryResultSchema: z.ZodObject<{
|
|
110
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
111
|
+
id: z.ZodString;
|
|
112
|
+
score: z.ZodNumber;
|
|
113
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
114
|
+
}, z.core.$strip>>;
|
|
115
|
+
scanned: z.ZodNumber;
|
|
116
|
+
truncated: z.ZodBoolean;
|
|
117
|
+
}, z.core.$strip>;
|
|
118
|
+
export declare const VectorDeleteInputSchema: z.ZodObject<{
|
|
119
|
+
index: z.ZodString;
|
|
120
|
+
ids: z.ZodArray<z.ZodString>;
|
|
121
|
+
}, z.core.$strip>;
|
|
122
|
+
export declare const VectorDeleteByFilterInputSchema: z.ZodObject<{
|
|
123
|
+
index: z.ZodString;
|
|
124
|
+
filter: z.ZodObject<{
|
|
125
|
+
equals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
126
|
+
between: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
export declare const VectorDeleteResultSchema: z.ZodObject<{
|
|
130
|
+
deleted: z.ZodNumber;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
export declare const VectorStatsInputSchema: z.ZodObject<{
|
|
133
|
+
index: z.ZodString;
|
|
134
|
+
}, z.core.$strip>;
|
|
135
|
+
export declare const VectorStatsResultSchema: z.ZodObject<{
|
|
136
|
+
backend: z.ZodString;
|
|
137
|
+
count: z.ZodNumber;
|
|
138
|
+
dim: z.ZodNumber;
|
|
139
|
+
metric: z.ZodEnum<{
|
|
140
|
+
cosine: "cosine";
|
|
141
|
+
dot: "dot";
|
|
142
|
+
euclidean: "euclidean";
|
|
143
|
+
}>;
|
|
144
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
exact: z.ZodBoolean;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
export declare const vectorStoreCapability: {
|
|
148
|
+
readonly name: "vector-store";
|
|
149
|
+
readonly scope: "system";
|
|
150
|
+
readonly mode: "singleton";
|
|
151
|
+
readonly internal: true;
|
|
152
|
+
readonly methods: {
|
|
153
|
+
/** Idempotent. Re-declaring with a different `dim` is an error, not a wipe. */
|
|
154
|
+
readonly declareIndex: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
155
|
+
index: z.ZodString;
|
|
156
|
+
dim: z.ZodNumber;
|
|
157
|
+
metric: z.ZodDefault<z.ZodEnum<{
|
|
158
|
+
cosine: "cosine";
|
|
159
|
+
dot: "dot";
|
|
160
|
+
euclidean: "euclidean";
|
|
161
|
+
}>>;
|
|
162
|
+
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
163
|
+
readonly upsert: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
164
|
+
index: z.ZodString;
|
|
165
|
+
items: z.ZodArray<z.ZodObject<{
|
|
166
|
+
id: z.ZodString;
|
|
167
|
+
vector: z.ZodString;
|
|
168
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
169
|
+
}, z.core.$strip>>;
|
|
170
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
171
|
+
upserted: z.ZodNumber;
|
|
172
|
+
rejected: z.ZodNumber;
|
|
173
|
+
}, z.core.$strip>, "mutation">;
|
|
174
|
+
readonly query: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
175
|
+
index: z.ZodString;
|
|
176
|
+
vector: z.ZodString;
|
|
177
|
+
topK: z.ZodNumber;
|
|
178
|
+
minScore: z.ZodOptional<z.ZodNumber>;
|
|
179
|
+
filter: z.ZodOptional<z.ZodObject<{
|
|
180
|
+
equals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
181
|
+
between: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
182
|
+
}, z.core.$strip>>;
|
|
183
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
184
|
+
matches: z.ZodArray<z.ZodObject<{
|
|
185
|
+
id: z.ZodString;
|
|
186
|
+
score: z.ZodNumber;
|
|
187
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
|
|
188
|
+
}, z.core.$strip>>;
|
|
189
|
+
scanned: z.ZodNumber;
|
|
190
|
+
truncated: z.ZodBoolean;
|
|
191
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
192
|
+
readonly deleteByIds: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
193
|
+
index: z.ZodString;
|
|
194
|
+
ids: z.ZodArray<z.ZodString>;
|
|
195
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
196
|
+
deleted: z.ZodNumber;
|
|
197
|
+
}, z.core.$strip>, "mutation">;
|
|
198
|
+
readonly deleteByFilter: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
199
|
+
index: z.ZodString;
|
|
200
|
+
filter: z.ZodObject<{
|
|
201
|
+
equals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
202
|
+
between: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>>;
|
|
203
|
+
}, z.core.$strip>;
|
|
204
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
205
|
+
deleted: z.ZodNumber;
|
|
206
|
+
}, z.core.$strip>, "mutation">;
|
|
207
|
+
readonly stats: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
208
|
+
index: z.ZodString;
|
|
209
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
210
|
+
backend: z.ZodString;
|
|
211
|
+
count: z.ZodNumber;
|
|
212
|
+
dim: z.ZodNumber;
|
|
213
|
+
metric: z.ZodEnum<{
|
|
214
|
+
cosine: "cosine";
|
|
215
|
+
dot: "dot";
|
|
216
|
+
euclidean: "euclidean";
|
|
217
|
+
}>;
|
|
218
|
+
bytes: z.ZodOptional<z.ZodNumber>;
|
|
219
|
+
exact: z.ZodBoolean;
|
|
220
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
221
|
+
};
|
|
222
|
+
};
|
|
223
|
+
export type IVectorStoreProvider = InferProvider<typeof vectorStoreCapability>;
|
|
@@ -111,6 +111,7 @@ import type { userManagementCapability } from '../capabilities/user-management.c
|
|
|
111
111
|
import type { userPasskeysCapability } from '../capabilities/user-passkeys.cap.js';
|
|
112
112
|
import type { vacuumControlCapability } from '../capabilities/vacuum-control.cap.js';
|
|
113
113
|
import type { valveCapability } from '../capabilities/valve.cap.js';
|
|
114
|
+
import type { vectorStoreCapability } from '../capabilities/vector-store.cap.js';
|
|
114
115
|
import type { videoclipsCapability } from '../capabilities/videoclips.cap.js';
|
|
115
116
|
import type { viewerUiCapability } from '../capabilities/viewer-ui.cap.js';
|
|
116
117
|
import type { waterHeaterCapability } from '../capabilities/water-heater.cap.js';
|
|
@@ -7510,6 +7511,55 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
7510
7511
|
meta: object;
|
|
7511
7512
|
}>;
|
|
7512
7513
|
}>>;
|
|
7514
|
+
vectorStore: TRPCBuiltRouter<{
|
|
7515
|
+
ctx: TrpcContext;
|
|
7516
|
+
meta: object;
|
|
7517
|
+
errorShape: AugmentedErrorShape;
|
|
7518
|
+
transformer: true;
|
|
7519
|
+
}, TRPCDecorateCreateRouterOptions<{
|
|
7520
|
+
declareIndex: TRPCMutationProcedure<{
|
|
7521
|
+
input: {
|
|
7522
|
+
[x: string]: unknown;
|
|
7523
|
+
} & z.input<typeof vectorStoreCapability.methods.declareIndex.input>;
|
|
7524
|
+
output: z.infer<typeof vectorStoreCapability.methods.declareIndex.output>;
|
|
7525
|
+
meta: object;
|
|
7526
|
+
}>;
|
|
7527
|
+
upsert: TRPCMutationProcedure<{
|
|
7528
|
+
input: {
|
|
7529
|
+
[x: string]: unknown;
|
|
7530
|
+
} & z.input<typeof vectorStoreCapability.methods.upsert.input>;
|
|
7531
|
+
output: z.infer<typeof vectorStoreCapability.methods.upsert.output>;
|
|
7532
|
+
meta: object;
|
|
7533
|
+
}>;
|
|
7534
|
+
query: TRPCQueryProcedure<{
|
|
7535
|
+
input: {
|
|
7536
|
+
[x: string]: unknown;
|
|
7537
|
+
} & z.input<typeof vectorStoreCapability.methods.query.input>;
|
|
7538
|
+
output: z.infer<typeof vectorStoreCapability.methods.query.output>;
|
|
7539
|
+
meta: object;
|
|
7540
|
+
}>;
|
|
7541
|
+
deleteByIds: TRPCMutationProcedure<{
|
|
7542
|
+
input: {
|
|
7543
|
+
[x: string]: unknown;
|
|
7544
|
+
} & z.input<typeof vectorStoreCapability.methods.deleteByIds.input>;
|
|
7545
|
+
output: z.infer<typeof vectorStoreCapability.methods.deleteByIds.output>;
|
|
7546
|
+
meta: object;
|
|
7547
|
+
}>;
|
|
7548
|
+
deleteByFilter: TRPCMutationProcedure<{
|
|
7549
|
+
input: {
|
|
7550
|
+
[x: string]: unknown;
|
|
7551
|
+
} & z.input<typeof vectorStoreCapability.methods.deleteByFilter.input>;
|
|
7552
|
+
output: z.infer<typeof vectorStoreCapability.methods.deleteByFilter.output>;
|
|
7553
|
+
meta: object;
|
|
7554
|
+
}>;
|
|
7555
|
+
stats: TRPCQueryProcedure<{
|
|
7556
|
+
input: {
|
|
7557
|
+
[x: string]: unknown;
|
|
7558
|
+
} & z.input<typeof vectorStoreCapability.methods.stats.input>;
|
|
7559
|
+
output: z.infer<typeof vectorStoreCapability.methods.stats.output>;
|
|
7560
|
+
meta: object;
|
|
7561
|
+
}>;
|
|
7562
|
+
}>>;
|
|
7513
7563
|
vibration: TRPCBuiltRouter<{
|
|
7514
7564
|
ctx: TrpcContext;
|
|
7515
7565
|
meta: object;
|
|
@@ -8196,14 +8246,14 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
8196
8246
|
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
8197
8247
|
listCapabilities: import("@trpc/server").TRPCQueryProcedure<{
|
|
8198
8248
|
input: void;
|
|
8199
|
-
output: import("
|
|
8249
|
+
output: import("packages/types/dist").CapabilityInfo[];
|
|
8200
8250
|
meta: object;
|
|
8201
8251
|
}>;
|
|
8202
8252
|
getCapability: import("@trpc/server").TRPCQueryProcedure<{
|
|
8203
8253
|
input: {
|
|
8204
8254
|
name: string;
|
|
8205
8255
|
};
|
|
8206
|
-
output: import("
|
|
8256
|
+
output: import("packages/types/dist").CapabilityInfo | null;
|
|
8207
8257
|
meta: object;
|
|
8208
8258
|
}>;
|
|
8209
8259
|
setActiveSingleton: import("@trpc/server").TRPCMutationProcedure<{
|
|
@@ -8275,14 +8325,14 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
8275
8325
|
}>> & import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
8276
8326
|
listCapabilities: import("@trpc/server").TRPCQueryProcedure<{
|
|
8277
8327
|
input: void;
|
|
8278
|
-
output: import("
|
|
8328
|
+
output: import("packages/types/dist").CapabilityInfo[];
|
|
8279
8329
|
meta: object;
|
|
8280
8330
|
}>;
|
|
8281
8331
|
getCapability: import("@trpc/server").TRPCQueryProcedure<{
|
|
8282
8332
|
input: {
|
|
8283
8333
|
name: string;
|
|
8284
8334
|
};
|
|
8285
|
-
output: import("
|
|
8335
|
+
output: import("packages/types/dist").CapabilityInfo | null;
|
|
8286
8336
|
meta: object;
|
|
8287
8337
|
}>;
|
|
8288
8338
|
setActiveSingleton: import("@trpc/server").TRPCMutationProcedure<{
|
|
@@ -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:
|
|
14
|
+
* Coverage: 22 caps, 49 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
|
/**
|
|
@@ -134,6 +134,7 @@ export { userManagementCapability } from '../capabilities/user-management.cap.js
|
|
|
134
134
|
export { userPasskeysCapability } from '../capabilities/user-passkeys.cap.js';
|
|
135
135
|
export { vacuumControlCapability } from '../capabilities/vacuum-control.cap.js';
|
|
136
136
|
export { valveCapability } from '../capabilities/valve.cap.js';
|
|
137
|
+
export { vectorStoreCapability } from '../capabilities/vector-store.cap.js';
|
|
137
138
|
export { vibrationCapability } from '../capabilities/vibration.cap.js';
|
|
138
139
|
export { videoclipsCapability } from '../capabilities/videoclips.cap.js';
|
|
139
140
|
export { viewerUiCapability } from '../capabilities/viewer-ui.cap.js';
|
|
@@ -280,6 +281,7 @@ export declare const CAPABILITY_NAMES: {
|
|
|
280
281
|
readonly userPasskeys: "user-passkeys";
|
|
281
282
|
readonly vacuumControl: "vacuum-control";
|
|
282
283
|
readonly valve: "valve";
|
|
284
|
+
readonly vectorStore: "vector-store";
|
|
283
285
|
readonly vibration: "vibration";
|
|
284
286
|
readonly videoclips: "videoclips";
|
|
285
287
|
readonly viewerUi: "viewer-ui";
|
|
@@ -439,6 +441,7 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
439
441
|
readonly userPasskeys: TRouter;
|
|
440
442
|
readonly vacuumControl: TRouter;
|
|
441
443
|
readonly valve: TRouter;
|
|
444
|
+
readonly vectorStore: TRouter;
|
|
442
445
|
readonly vibration: TRouter;
|
|
443
446
|
readonly videoclips: TRouter;
|
|
444
447
|
readonly viewerUi: TRouter;
|
|
@@ -449,8 +452,8 @@ export interface CapabilityRouterMap<TRouter = unknown> {
|
|
|
449
452
|
readonly zoneRules: TRouter;
|
|
450
453
|
readonly zones: TRouter;
|
|
451
454
|
}
|
|
452
|
-
/** Capability names whose mode is `singleton` (
|
|
453
|
-
export declare const SINGLETON_CAPABILITY_NAMES: readonly ["accessories", "addon-pages", "addon-settings", "addon-widgets", "addons", "admin-ui", "air-quality-sensor", "alarm-panel", "alerts", "ambient-light-sensor", "audio-analysis", "audio-analyzer", "audio-codec", "audio-metrics", "automation-control", "backup", "battery", "binary", "brightness", "button", "camera-credentials", "camera-pipeline-config", "camera-streams", "carbon-monoxide", "climate-control", "color", "connectivity", "consumables", "contact", "control", "core-blocks", "cover", "day-night", "decoder", "detection-pipeline", "device-adoption", "device-discovery", "device-manager", "device-ops", "device-state", "device-status", "doorbell", "enum-sensor", "event-emitter", "events", "face-gallery", "fan-control", "feature-probe", "filesystem-browse", "flood", "gas", "humidifier", "humidity-sensor", "image", "image-settings", "integrations", "intercom", "lawn-mower-control", "llm-runtime", "local-network", "lock-control", "media-player", "metrics-provider", "model-convert", "model-distributor", "motion", "motion-detection", "motion-trigger", "motion-zones", "native-object-detection", "network-quality", "nodes", "notification-rules", "notifier", "numeric-sensor", "osd", "pet-feeder", "pipeline-analytics", "pipeline-executor", "pipeline-orchestrator", "pipeline-runner", "plate-gallery", "platform-probe", "power-meter", "presence", "pressure-sensor", "privacy-mask", "ptz", "ptz-autotrack", "reboot", "recording", "recordingExport", "scene-monitor", "script-runner", "server-management", "settings-store", "smoke", "snapshot", "sso-bridge", "storage", "stream-broker", "stream-catalog", "stream-params", "switch", "system", "tamper", "temperature-sensor", "terminal-session", "toast", "update", "user-management", "vacuum-control", "valve", "vibration", "videoclips", "viewer-ui", "water-heater", "weather", "webrtc-session", "zone-analytics", "zone-rules", "zones"];
|
|
455
|
+
/** Capability names whose mode is `singleton` (123 caps). */
|
|
456
|
+
export declare const SINGLETON_CAPABILITY_NAMES: readonly ["accessories", "addon-pages", "addon-settings", "addon-widgets", "addons", "admin-ui", "air-quality-sensor", "alarm-panel", "alerts", "ambient-light-sensor", "audio-analysis", "audio-analyzer", "audio-codec", "audio-metrics", "automation-control", "backup", "battery", "binary", "brightness", "button", "camera-credentials", "camera-pipeline-config", "camera-streams", "carbon-monoxide", "climate-control", "color", "connectivity", "consumables", "contact", "control", "core-blocks", "cover", "day-night", "decoder", "detection-pipeline", "device-adoption", "device-discovery", "device-manager", "device-ops", "device-state", "device-status", "doorbell", "enum-sensor", "event-emitter", "events", "face-gallery", "fan-control", "feature-probe", "filesystem-browse", "flood", "gas", "humidifier", "humidity-sensor", "image", "image-settings", "integrations", "intercom", "lawn-mower-control", "llm-runtime", "local-network", "lock-control", "media-player", "metrics-provider", "model-convert", "model-distributor", "motion", "motion-detection", "motion-trigger", "motion-zones", "native-object-detection", "network-quality", "nodes", "notification-rules", "notifier", "numeric-sensor", "osd", "pet-feeder", "pipeline-analytics", "pipeline-executor", "pipeline-orchestrator", "pipeline-runner", "plate-gallery", "platform-probe", "power-meter", "presence", "pressure-sensor", "privacy-mask", "ptz", "ptz-autotrack", "reboot", "recording", "recordingExport", "scene-monitor", "script-runner", "server-management", "settings-store", "smoke", "snapshot", "sso-bridge", "storage", "stream-broker", "stream-catalog", "stream-params", "switch", "system", "tamper", "temperature-sensor", "terminal-session", "toast", "update", "user-management", "vacuum-control", "valve", "vector-store", "vibration", "videoclips", "viewer-ui", "water-heater", "weather", "webrtc-session", "zone-analytics", "zone-rules", "zones"];
|
|
454
457
|
/** Union of singleton capability names (literal string union). */
|
|
455
458
|
export type SingletonCapabilityName = typeof SINGLETON_CAPABILITY_NAMES[number];
|
|
456
459
|
/** Capability names whose mode is `collection` (23 caps). */
|
|
@@ -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:
|
|
9
|
+
* Coverage: 862 method paths across 120 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|