@camstack/server 0.1.7 → 0.2.0
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/package.json +11 -9
- package/src/__tests__/addon-install-e2e.test.ts +0 -1
- package/src/__tests__/addon-pages-e2e.test.ts +40 -18
- package/src/__tests__/addon-settings-router.spec.ts +6 -1
- package/src/__tests__/addon-upload.spec.ts +91 -29
- package/src/__tests__/agent-registry.spec.ts +26 -9
- package/src/__tests__/agent-status-page.spec.ts +1 -3
- package/src/__tests__/auth-session-cookie.test.ts +28 -1
- package/src/__tests__/bulk-update-coordinator.spec.ts +48 -31
- package/src/__tests__/cap-ownership-authority.spec.ts +39 -8
- package/src/__tests__/cap-providers/cap-providers-location-import.spec.ts +206 -0
- package/src/__tests__/cap-providers/cap-usage-graph.spec.ts +17 -3
- package/src/__tests__/cap-providers/compute-topology-categories.spec.ts +57 -11
- package/src/__tests__/cap-providers/integrations-delete-cascade.spec.ts +292 -0
- package/src/__tests__/cap-providers-bulk-update.spec.ts +27 -7
- package/src/__tests__/cap-route-adapter.spec.ts +28 -15
- package/src/__tests__/cap-routers/_meta.spec.ts +6 -7
- package/src/__tests__/cap-routers/addon-settings.router.spec.ts +19 -10
- package/src/__tests__/cap-routers/broker-routing.router.spec.ts +177 -0
- package/src/__tests__/cap-routers/cap-route-error-formatter.spec.ts +3 -1
- package/src/__tests__/cap-routers/capabilities-node.spec.ts +18 -5
- package/src/__tests__/cap-routers/device-link-overlay.spec.ts +137 -0
- package/src/__tests__/cap-routers/device-manager-aggregate.router.spec.ts +72 -20
- package/src/__tests__/cap-routers/harness.ts +11 -7
- package/src/__tests__/cap-routers/metrics-provider.router.spec.ts +17 -3
- package/src/__tests__/cap-routers/null-provider-guard.spec.ts +5 -7
- package/src/__tests__/cap-routers/pipeline-executor.router.spec.ts +35 -11
- package/src/__tests__/cap-routers/settings-store.router.spec.ts +59 -15
- package/src/__tests__/capability-e2e.test.ts +9 -11
- package/src/__tests__/cli-e2e.test.ts +80 -59
- package/src/__tests__/core-cap-bridge.spec.ts +3 -1
- package/src/__tests__/dev-bootstrap-shm-ring.spec.ts +12 -2
- package/src/__tests__/device-settings-contribution-dispatch.spec.ts +61 -30
- package/src/__tests__/embedded-deps-e2e.test.ts +35 -19
- package/src/__tests__/event-bus-proxy-router.spec.ts +3 -0
- package/src/__tests__/framework-allowlist.spec.ts +5 -4
- package/src/__tests__/https-e2e.test.ts +12 -6
- package/src/__tests__/lifecycle-e2e.test.ts +60 -11
- package/src/__tests__/live-events-subscription.spec.ts +17 -18
- package/src/__tests__/moleculer/uds-readiness.spec.ts +11 -4
- package/src/__tests__/moleculer/uds-topology.spec.ts +39 -11
- package/src/__tests__/moleculer/uds-unowned-call.spec.ts +265 -5
- package/src/__tests__/moleculer-register-node-idempotency.spec.ts +16 -7
- package/src/__tests__/native-cap-route.spec.ts +42 -19
- package/src/__tests__/oauth2-account-linking.spec.ts +63 -17
- package/src/__tests__/singleton-contention.test.ts +23 -11
- package/src/__tests__/streaming-diagnostic.test.ts +156 -53
- package/src/__tests__/streaming-scale.test.ts +69 -35
- package/src/__tests__/uds-addon-call-wiring.spec.ts +6 -1
- package/src/agent-status-page.ts +4 -3
- package/src/api/__tests__/addons-custom.spec.ts +22 -8
- package/src/api/__tests__/capabilities.router.test.ts +18 -9
- package/src/api/addon-upload.ts +46 -15
- package/src/api/addons-custom.router.ts +7 -6
- package/src/api/auth-whoami.ts +3 -1
- package/src/api/bridge-addons.router.ts +3 -1
- package/src/api/capabilities.router.ts +117 -78
- package/src/api/core/__tests__/auth-router-totp.spec.ts +57 -16
- package/src/api/core/__tests__/integration-markers.spec.ts +10 -0
- package/src/api/core/addon-settings.router.ts +4 -1
- package/src/api/core/agents.router.ts +52 -53
- package/src/api/core/auth.router.ts +55 -36
- package/src/api/core/bulk-update-coordinator.ts +25 -22
- package/src/api/core/cap-providers.ts +459 -166
- package/src/api/core/capabilities.router.ts +30 -23
- package/src/api/core/hwaccel.router.ts +37 -10
- package/src/api/core/live-events.router.ts +16 -9
- package/src/api/core/logs.router.ts +58 -25
- package/src/api/core/notifications.router.ts +2 -1
- package/src/api/core/repl.router.ts +1 -3
- package/src/api/core/settings-backend.router.ts +68 -70
- package/src/api/core/system-events.router.ts +41 -32
- package/src/api/health/health.routes.ts +7 -13
- package/src/api/oauth2/__tests__/oauth2-routes.spec.ts +12 -2
- package/src/api/oauth2/consent-page.ts +4 -3
- package/src/api/oauth2/oauth2-routes.ts +41 -12
- package/src/api/trpc/__tests__/client-ip.spec.ts +27 -1
- package/src/api/trpc/__tests__/scope-access-device.spec.ts +68 -23
- package/src/api/trpc/__tests__/scope-access.spec.ts +8 -13
- package/src/api/trpc/__tests__/webrtc-session-ua-enrich.spec.ts +136 -0
- package/src/api/trpc/cap-mount-helpers.ts +64 -44
- package/src/api/trpc/cap-route-error-formatter.ts +17 -9
- package/src/api/trpc/client-ip.ts +17 -0
- package/src/api/trpc/core-cap-bridge.ts +3 -1
- package/src/api/trpc/generated-cap-mounts.ts +801 -286
- package/src/api/trpc/generated-cap-routers.ts +5723 -719
- package/src/api/trpc/scope-access.ts +7 -7
- package/src/api/trpc/trpc.context.ts +7 -4
- package/src/api/trpc/trpc.middleware.ts +4 -2
- package/src/api/trpc/trpc.router.ts +117 -48
- package/src/auth/session-cookie.ts +10 -0
- package/src/boot/__tests__/integration-id-backfill.spec.ts +131 -0
- package/src/boot/boot-config.ts +103 -122
- package/src/boot/integration-id-backfill.ts +109 -0
- package/src/boot/post-boot.service.ts +5 -3
- package/src/core/addon/__tests__/addon-registry-capability.test.ts +12 -3
- package/src/core/addon/__tests__/addon-row-manifest.spec.ts +62 -0
- package/src/core/addon/addon-call-gateway.ts +20 -6
- package/src/core/addon/addon-package.service.ts +183 -89
- package/src/core/addon/addon-registry.service.ts +1212 -1267
- package/src/core/addon/addon-row-manifest.ts +29 -0
- package/src/core/addon/addon-search.service.ts +2 -1
- package/src/core/addon/addon-settings-provider.ts +27 -7
- package/src/core/addon-bridge/addon-bridge.service.ts +11 -6
- package/src/core/addon-pages/addon-pages.service.ts +3 -1
- package/src/core/addon-widgets/addon-widgets.service.ts +5 -2
- package/src/core/agent/agent-registry.service.ts +60 -38
- package/src/core/auth/auth.service.spec.ts +6 -8
- package/src/core/config/config.service.spec.ts +1 -1
- package/src/core/events/event-bus.service.spec.ts +44 -21
- package/src/core/events/event-bus.service.ts +5 -1
- package/src/core/feature/feature.service.spec.ts +4 -1
- package/src/core/lifecycle/lifecycle-state-machine.spec.ts +8 -10
- package/src/core/logging/logging.service.spec.ts +61 -21
- package/src/core/logging/logging.service.ts +19 -5
- package/src/core/moleculer/cap-call-fn.spec.ts +17 -10
- package/src/core/moleculer/cap-call-fn.ts +5 -1
- package/src/core/moleculer/cap-route-authority.ts +18 -6
- package/src/core/moleculer/moleculer.service.ts +145 -29
- package/src/core/network/network-quality.service.spec.ts +7 -1
- package/src/core/notification/notification-wrapper.service.ts +1 -3
- package/src/core/notification/toast-wrapper.service.ts +1 -5
- package/src/core/repl/repl-engine.service.spec.ts +66 -39
- package/src/core/repl/repl-engine.service.ts +11 -12
- package/src/core/storage/storage-location-manager.spec.ts +12 -3
- package/src/core/streaming/stream-probe.service.ts +22 -13
- package/src/core/topology/topology-emitter.service.ts +5 -1
- package/src/launcher.ts +14 -9
- package/src/main.ts +658 -495
- package/src/manual-boot.ts +133 -154
- package/tsconfig.json +20 -8
- package/src/core/storage/settings-store.spec.ts +0 -213
- package/src/core/storage/settings-store.ts +0 -2
- package/src/core/storage/sql-schema.spec.ts +0 -140
- package/src/core/storage/sql-schema.ts +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// AUTO-GENERATED by scripts/generate-cap-mounts.ts — DO NOT EDIT
|
|
2
2
|
// Re-run: npx tsx scripts/generate-cap-mounts.ts
|
|
3
3
|
//
|
|
4
|
-
// Mounted:
|
|
4
|
+
// Mounted: 127 Skipped (legacy): 6
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Single auto-mount entrypoint for every codegen'd cap router.
|
|
@@ -39,19 +39,35 @@ import {
|
|
|
39
39
|
addonsCapability,
|
|
40
40
|
adminUiCapability,
|
|
41
41
|
advancedNotifierCapability,
|
|
42
|
+
airQualitySensorCapability,
|
|
43
|
+
alarmPanelCapability,
|
|
42
44
|
alertsCapability,
|
|
45
|
+
ambientLightSensorCapability,
|
|
43
46
|
audioAnalysisCapability,
|
|
44
47
|
audioAnalyzerCapability,
|
|
45
48
|
audioCodecCapability,
|
|
46
49
|
audioMetricsCapability,
|
|
50
|
+
automationControlCapability,
|
|
47
51
|
backupCapability,
|
|
48
52
|
batteryCapability,
|
|
53
|
+
binaryCapability,
|
|
49
54
|
brightnessCapability,
|
|
55
|
+
brokerCapability,
|
|
56
|
+
buttonCapability,
|
|
50
57
|
cameraCredentialsCapability,
|
|
51
58
|
cameraPipelineConfigCapability,
|
|
52
59
|
cameraStreamsCapability,
|
|
60
|
+
carbonMonoxideCapability,
|
|
61
|
+
climateControlCapability,
|
|
62
|
+
colorCapability,
|
|
63
|
+
connectivityCapability,
|
|
64
|
+
consumablesCapability,
|
|
65
|
+
contactCapability,
|
|
66
|
+
controlCapability,
|
|
67
|
+
coverCapability,
|
|
53
68
|
decoderCapability,
|
|
54
69
|
detectionPipelineCapability,
|
|
70
|
+
deviceAdoptionCapability,
|
|
55
71
|
deviceDiscoveryCapability,
|
|
56
72
|
deviceExportCapability,
|
|
57
73
|
deviceManagerCapability,
|
|
@@ -61,11 +77,24 @@ import {
|
|
|
61
77
|
deviceStatusCapability,
|
|
62
78
|
doorbellCapability,
|
|
63
79
|
embeddingEncoderCapability,
|
|
80
|
+
enumSensorCapability,
|
|
81
|
+
eventEmitterCapability,
|
|
64
82
|
eventsCapability,
|
|
83
|
+
faceGalleryCapability,
|
|
84
|
+
fanControlCapability,
|
|
65
85
|
featureProbeCapability,
|
|
86
|
+
filesystemBrowseCapability,
|
|
87
|
+
floodCapability,
|
|
88
|
+
gasCapability,
|
|
89
|
+
humidifierCapability,
|
|
90
|
+
humiditySensorCapability,
|
|
91
|
+
imageCapability,
|
|
66
92
|
integrationsCapability,
|
|
67
93
|
intercomCapability,
|
|
94
|
+
lawnMowerControlCapability,
|
|
68
95
|
localNetworkCapability,
|
|
96
|
+
lockControlCapability,
|
|
97
|
+
mediaPlayerCapability,
|
|
69
98
|
meshNetworkCapability,
|
|
70
99
|
metricsProviderCapability,
|
|
71
100
|
motionCapability,
|
|
@@ -78,35 +107,52 @@ import {
|
|
|
78
107
|
networkQualityCapability,
|
|
79
108
|
nodesCapability,
|
|
80
109
|
notificationOutputCapability,
|
|
110
|
+
notifierCapability,
|
|
111
|
+
numericSensorCapability,
|
|
81
112
|
oauthIntegrationCapability,
|
|
82
113
|
osdCapability,
|
|
83
114
|
pipelineAnalyticsCapability,
|
|
84
115
|
pipelineExecutorCapability,
|
|
85
116
|
pipelineOrchestratorCapability,
|
|
86
117
|
pipelineRunnerCapability,
|
|
118
|
+
plateGalleryCapability,
|
|
87
119
|
platformProbeCapability,
|
|
120
|
+
powerMeterCapability,
|
|
121
|
+
presenceCapability,
|
|
122
|
+
pressureSensorCapability,
|
|
88
123
|
privacyMaskCapability,
|
|
89
124
|
ptzAutotrackCapability,
|
|
90
125
|
ptzCapability,
|
|
91
126
|
rebootCapability,
|
|
92
127
|
recordingCapability,
|
|
93
|
-
|
|
128
|
+
scriptRunnerCapability,
|
|
94
129
|
settingsStoreCapability,
|
|
130
|
+
smokeCapability,
|
|
95
131
|
smtpProviderCapability,
|
|
96
132
|
snapshotCapability,
|
|
97
133
|
snapshotProviderCapability,
|
|
98
134
|
ssoBridgeCapability,
|
|
99
135
|
storageCapability,
|
|
136
|
+
storageEvictableCapability,
|
|
100
137
|
storageProviderCapability,
|
|
101
138
|
streamBrokerCapability,
|
|
102
139
|
streamCatalogCapability,
|
|
103
140
|
streamParamsCapability,
|
|
104
141
|
switchCapability,
|
|
105
142
|
systemCapability,
|
|
143
|
+
tamperCapability,
|
|
144
|
+
temperatureSensorCapability,
|
|
106
145
|
toastCapability,
|
|
107
146
|
turnProviderCapability,
|
|
147
|
+
updateCapability,
|
|
108
148
|
userManagementCapability,
|
|
109
149
|
userPasskeysCapability,
|
|
150
|
+
vacuumControlCapability,
|
|
151
|
+
valveCapability,
|
|
152
|
+
vibrationCapability,
|
|
153
|
+
videoclipsCapability,
|
|
154
|
+
waterHeaterCapability,
|
|
155
|
+
weatherCapability,
|
|
110
156
|
webrtcSessionCapability,
|
|
111
157
|
zoneAnalyticsCapability,
|
|
112
158
|
zoneRulesCapability,
|
|
@@ -124,19 +170,35 @@ import {
|
|
|
124
170
|
createCapRouter_addons,
|
|
125
171
|
createCapRouter_adminUi,
|
|
126
172
|
createCapRouter_advancedNotifier,
|
|
173
|
+
createCapRouter_airQualitySensor,
|
|
174
|
+
createCapRouter_alarmPanel,
|
|
127
175
|
createCapRouter_alerts,
|
|
176
|
+
createCapRouter_ambientLightSensor,
|
|
128
177
|
createCapRouter_audioAnalysis,
|
|
129
178
|
createCapRouter_audioAnalyzer,
|
|
130
179
|
createCapRouter_audioCodec,
|
|
131
180
|
createCapRouter_audioMetrics,
|
|
181
|
+
createCapRouter_automationControl,
|
|
132
182
|
createCapRouter_backup,
|
|
133
183
|
createCapRouter_battery,
|
|
184
|
+
createCapRouter_binary,
|
|
134
185
|
createCapRouter_brightness,
|
|
186
|
+
createCapRouter_broker,
|
|
187
|
+
createCapRouter_button,
|
|
135
188
|
createCapRouter_cameraCredentials,
|
|
136
189
|
createCapRouter_cameraPipelineConfig,
|
|
137
190
|
createCapRouter_cameraStreams,
|
|
191
|
+
createCapRouter_carbonMonoxide,
|
|
192
|
+
createCapRouter_climateControl,
|
|
193
|
+
createCapRouter_color,
|
|
194
|
+
createCapRouter_connectivity,
|
|
195
|
+
createCapRouter_consumables,
|
|
196
|
+
createCapRouter_contact,
|
|
197
|
+
createCapRouter_control,
|
|
198
|
+
createCapRouter_cover,
|
|
138
199
|
createCapRouter_decoder,
|
|
139
200
|
createCapRouter_detectionPipeline,
|
|
201
|
+
createCapRouter_deviceAdoption,
|
|
140
202
|
createCapRouter_deviceDiscovery,
|
|
141
203
|
createCapRouter_deviceExport,
|
|
142
204
|
createCapRouter_deviceManager,
|
|
@@ -146,11 +208,24 @@ import {
|
|
|
146
208
|
createCapRouter_deviceStatus,
|
|
147
209
|
createCapRouter_doorbell,
|
|
148
210
|
createCapRouter_embeddingEncoder,
|
|
211
|
+
createCapRouter_enumSensor,
|
|
212
|
+
createCapRouter_eventEmitter,
|
|
149
213
|
createCapRouter_events,
|
|
214
|
+
createCapRouter_faceGallery,
|
|
215
|
+
createCapRouter_fanControl,
|
|
150
216
|
createCapRouter_featureProbe,
|
|
217
|
+
createCapRouter_filesystemBrowse,
|
|
218
|
+
createCapRouter_flood,
|
|
219
|
+
createCapRouter_gas,
|
|
220
|
+
createCapRouter_humidifier,
|
|
221
|
+
createCapRouter_humiditySensor,
|
|
222
|
+
createCapRouter_image,
|
|
151
223
|
createCapRouter_integrations,
|
|
152
224
|
createCapRouter_intercom,
|
|
225
|
+
createCapRouter_lawnMowerControl,
|
|
153
226
|
createCapRouter_localNetwork,
|
|
227
|
+
createCapRouter_lockControl,
|
|
228
|
+
createCapRouter_mediaPlayer,
|
|
154
229
|
createCapRouter_meshNetwork,
|
|
155
230
|
createCapRouter_metricsProvider,
|
|
156
231
|
createCapRouter_motion,
|
|
@@ -163,35 +238,52 @@ import {
|
|
|
163
238
|
createCapRouter_networkQuality,
|
|
164
239
|
createCapRouter_nodes,
|
|
165
240
|
createCapRouter_notificationOutput,
|
|
241
|
+
createCapRouter_notifier,
|
|
242
|
+
createCapRouter_numericSensor,
|
|
166
243
|
createCapRouter_oauthIntegration,
|
|
167
244
|
createCapRouter_osd,
|
|
168
245
|
createCapRouter_pipelineAnalytics,
|
|
169
246
|
createCapRouter_pipelineExecutor,
|
|
170
247
|
createCapRouter_pipelineOrchestrator,
|
|
171
248
|
createCapRouter_pipelineRunner,
|
|
249
|
+
createCapRouter_plateGallery,
|
|
172
250
|
createCapRouter_platformProbe,
|
|
251
|
+
createCapRouter_powerMeter,
|
|
252
|
+
createCapRouter_presence,
|
|
253
|
+
createCapRouter_pressureSensor,
|
|
173
254
|
createCapRouter_privacyMask,
|
|
174
255
|
createCapRouter_ptz,
|
|
175
256
|
createCapRouter_ptzAutotrack,
|
|
176
257
|
createCapRouter_reboot,
|
|
177
258
|
createCapRouter_recording,
|
|
178
|
-
|
|
259
|
+
createCapRouter_scriptRunner,
|
|
179
260
|
createCapRouter_settingsStore,
|
|
261
|
+
createCapRouter_smoke,
|
|
180
262
|
createCapRouter_smtpProvider,
|
|
181
263
|
createCapRouter_snapshot,
|
|
182
264
|
createCapRouter_snapshotProvider,
|
|
183
265
|
createCapRouter_ssoBridge,
|
|
184
266
|
createCapRouter_storage,
|
|
267
|
+
createCapRouter_storageEvictable,
|
|
185
268
|
createCapRouter_storageProvider,
|
|
186
269
|
createCapRouter_streamBroker,
|
|
187
270
|
createCapRouter_streamCatalog,
|
|
188
271
|
createCapRouter_streamParams,
|
|
189
272
|
createCapRouter_switch,
|
|
190
273
|
createCapRouter_system,
|
|
274
|
+
createCapRouter_tamper,
|
|
275
|
+
createCapRouter_temperatureSensor,
|
|
191
276
|
createCapRouter_toast,
|
|
192
277
|
createCapRouter_turnProvider,
|
|
278
|
+
createCapRouter_update,
|
|
193
279
|
createCapRouter_userManagement,
|
|
194
280
|
createCapRouter_userPasskeys,
|
|
281
|
+
createCapRouter_vacuumControl,
|
|
282
|
+
createCapRouter_valve,
|
|
283
|
+
createCapRouter_vibration,
|
|
284
|
+
createCapRouter_videoclips,
|
|
285
|
+
createCapRouter_waterHeater,
|
|
286
|
+
createCapRouter_weather,
|
|
195
287
|
createCapRouter_webrtcSession,
|
|
196
288
|
createCapRouter_zoneAnalytics,
|
|
197
289
|
createCapRouter_zoneRules,
|
|
@@ -237,55 +329,71 @@ export function mountAllCaps(services: MountAllCapsServices) {
|
|
|
237
329
|
services.moleculer.createCapabilityProxy(capName, nodeId) as unknown as T | null
|
|
238
330
|
return {
|
|
239
331
|
accessories: createCapRouter_accessories(
|
|
240
|
-
(_ctx) =>
|
|
332
|
+
(_ctx) =>
|
|
333
|
+
requireDeviceScoped(reg, 'accessories') as InferProvider<
|
|
334
|
+
typeof accessoriesCapability
|
|
335
|
+
> | null,
|
|
241
336
|
remoteCapProxy,
|
|
242
337
|
),
|
|
243
338
|
addonPages: createCapRouter_addonPages(
|
|
244
|
-
(_ctx) =>
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
339
|
+
(_ctx) =>
|
|
340
|
+
reg?.getSingleton<InferProvider<typeof addonPagesCapability>>('addon-pages') ?? null,
|
|
341
|
+
remoteCapProxy,
|
|
342
|
+
),
|
|
343
|
+
addonPagesSource: createCapRouter_addonPagesSource((_ctx, addonId) => {
|
|
344
|
+
if (!reg) return null
|
|
345
|
+
if (addonId !== undefined) {
|
|
346
|
+
return reg.getProviderByAddonId<InferProvider<typeof addonPagesSourceCapability>>(
|
|
347
|
+
'addon-pages-source',
|
|
348
|
+
addonId,
|
|
349
|
+
)
|
|
350
|
+
}
|
|
351
|
+
const entries =
|
|
352
|
+
reg.getCollectionEntries<InferProvider<typeof addonPagesSourceCapability>>(
|
|
353
|
+
'addon-pages-source',
|
|
354
|
+
)
|
|
355
|
+
if (entries.length === 0) return null
|
|
356
|
+
const providers = entries.map(([, p]) => p)
|
|
357
|
+
const first = providers[0]!
|
|
358
|
+
return {
|
|
359
|
+
...first,
|
|
360
|
+
listPages: concatCollection(providers, 'listPages') as InferProvider<
|
|
361
|
+
typeof addonPagesSourceCapability
|
|
362
|
+
>['listPages'],
|
|
363
|
+
}
|
|
364
|
+
}, remoteCapProxy),
|
|
264
365
|
addonSettings: createCapRouter_addonSettings(
|
|
265
|
-
(_ctx) =>
|
|
366
|
+
(_ctx) =>
|
|
367
|
+
reg?.getSingleton<InferProvider<typeof addonSettingsCapability>>('addon-settings') ?? null,
|
|
266
368
|
remoteCapProxy,
|
|
267
369
|
),
|
|
268
370
|
addonWidgets: createCapRouter_addonWidgets(
|
|
269
|
-
(_ctx) =>
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
371
|
+
(_ctx) =>
|
|
372
|
+
reg?.getSingleton<InferProvider<typeof addonWidgetsCapability>>('addon-widgets') ?? null,
|
|
373
|
+
remoteCapProxy,
|
|
374
|
+
),
|
|
375
|
+
addonWidgetsSource: createCapRouter_addonWidgetsSource((_ctx, addonId) => {
|
|
376
|
+
if (!reg) return null
|
|
377
|
+
if (addonId !== undefined) {
|
|
378
|
+
return reg.getProviderByAddonId<InferProvider<typeof addonWidgetsSourceCapability>>(
|
|
379
|
+
'addon-widgets-source',
|
|
380
|
+
addonId,
|
|
381
|
+
)
|
|
382
|
+
}
|
|
383
|
+
const entries =
|
|
384
|
+
reg.getCollectionEntries<InferProvider<typeof addonWidgetsSourceCapability>>(
|
|
385
|
+
'addon-widgets-source',
|
|
386
|
+
)
|
|
387
|
+
if (entries.length === 0) return null
|
|
388
|
+
const providers = entries.map(([, p]) => p)
|
|
389
|
+
const first = providers[0]!
|
|
390
|
+
return {
|
|
391
|
+
...first,
|
|
392
|
+
listWidgets: concatCollection(providers, 'listWidgets') as InferProvider<
|
|
393
|
+
typeof addonWidgetsSourceCapability
|
|
394
|
+
>['listWidgets'],
|
|
395
|
+
}
|
|
396
|
+
}, remoteCapProxy),
|
|
289
397
|
addons: createCapRouter_addons(
|
|
290
398
|
(_ctx) => reg?.getSingleton<InferProvider<typeof addonsCapability>>('addons') ?? null,
|
|
291
399
|
remoteCapProxy,
|
|
@@ -295,27 +403,61 @@ export function mountAllCaps(services: MountAllCapsServices) {
|
|
|
295
403
|
remoteCapProxy,
|
|
296
404
|
),
|
|
297
405
|
advancedNotifier: createCapRouter_advancedNotifier(
|
|
298
|
-
(_ctx) =>
|
|
406
|
+
(_ctx) =>
|
|
407
|
+
reg?.getSingleton<InferProvider<typeof advancedNotifierCapability>>('advanced-notifier') ??
|
|
408
|
+
null,
|
|
409
|
+
remoteCapProxy,
|
|
410
|
+
),
|
|
411
|
+
airQualitySensor: createCapRouter_airQualitySensor(
|
|
412
|
+
(_ctx) =>
|
|
413
|
+
requireDeviceScoped(reg, 'air-quality-sensor') as InferProvider<
|
|
414
|
+
typeof airQualitySensorCapability
|
|
415
|
+
> | null,
|
|
416
|
+
remoteCapProxy,
|
|
417
|
+
),
|
|
418
|
+
alarmPanel: createCapRouter_alarmPanel(
|
|
419
|
+
(_ctx) =>
|
|
420
|
+
requireDeviceScoped(reg, 'alarm-panel') as InferProvider<
|
|
421
|
+
typeof alarmPanelCapability
|
|
422
|
+
> | null,
|
|
299
423
|
remoteCapProxy,
|
|
300
424
|
),
|
|
301
425
|
alerts: createCapRouter_alerts(
|
|
302
426
|
(_ctx) => reg?.getSingleton<InferProvider<typeof alertsCapability>>('alerts') ?? null,
|
|
303
427
|
remoteCapProxy,
|
|
304
428
|
),
|
|
429
|
+
ambientLightSensor: createCapRouter_ambientLightSensor(
|
|
430
|
+
(_ctx) =>
|
|
431
|
+
requireDeviceScoped(reg, 'ambient-light-sensor') as InferProvider<
|
|
432
|
+
typeof ambientLightSensorCapability
|
|
433
|
+
> | null,
|
|
434
|
+
remoteCapProxy,
|
|
435
|
+
),
|
|
305
436
|
audioAnalysis: createCapRouter_audioAnalysis(
|
|
306
|
-
(_ctx) =>
|
|
437
|
+
(_ctx) =>
|
|
438
|
+
reg?.getSingleton<InferProvider<typeof audioAnalysisCapability>>('audio-analysis') ?? null,
|
|
307
439
|
remoteCapProxy,
|
|
308
440
|
),
|
|
309
441
|
audioAnalyzer: createCapRouter_audioAnalyzer(
|
|
310
|
-
(_ctx) =>
|
|
442
|
+
(_ctx) =>
|
|
443
|
+
reg?.getSingleton<InferProvider<typeof audioAnalyzerCapability>>('audio-analyzer') ?? null,
|
|
311
444
|
remoteCapProxy,
|
|
312
445
|
),
|
|
313
446
|
audioCodec: createCapRouter_audioCodec(
|
|
314
|
-
(_ctx) =>
|
|
447
|
+
(_ctx) =>
|
|
448
|
+
reg?.getSingleton<InferProvider<typeof audioCodecCapability>>('audio-codec') ?? null,
|
|
315
449
|
remoteCapProxy,
|
|
316
450
|
),
|
|
317
451
|
audioMetrics: createCapRouter_audioMetrics(
|
|
318
|
-
(_ctx) =>
|
|
452
|
+
(_ctx) =>
|
|
453
|
+
reg?.getSingleton<InferProvider<typeof audioMetricsCapability>>('audio-metrics') ?? null,
|
|
454
|
+
remoteCapProxy,
|
|
455
|
+
),
|
|
456
|
+
automationControl: createCapRouter_automationControl(
|
|
457
|
+
(_ctx) =>
|
|
458
|
+
requireDeviceScoped(reg, 'automation-control') as InferProvider<
|
|
459
|
+
typeof automationControlCapability
|
|
460
|
+
> | null,
|
|
319
461
|
remoteCapProxy,
|
|
320
462
|
),
|
|
321
463
|
backup: createCapRouter_backup(
|
|
@@ -323,23 +465,103 @@ export function mountAllCaps(services: MountAllCapsServices) {
|
|
|
323
465
|
remoteCapProxy,
|
|
324
466
|
),
|
|
325
467
|
battery: createCapRouter_battery(
|
|
326
|
-
(_ctx) =>
|
|
468
|
+
(_ctx) =>
|
|
469
|
+
requireDeviceScoped(reg, 'battery') as InferProvider<typeof batteryCapability> | null,
|
|
470
|
+
remoteCapProxy,
|
|
471
|
+
),
|
|
472
|
+
binary: createCapRouter_binary(
|
|
473
|
+
(_ctx) => requireDeviceScoped(reg, 'binary') as InferProvider<typeof binaryCapability> | null,
|
|
327
474
|
remoteCapProxy,
|
|
328
475
|
),
|
|
329
476
|
brightness: createCapRouter_brightness(
|
|
330
|
-
(_ctx) =>
|
|
477
|
+
(_ctx) =>
|
|
478
|
+
requireDeviceScoped(reg, 'brightness') as InferProvider<typeof brightnessCapability> | null,
|
|
479
|
+
remoteCapProxy,
|
|
480
|
+
),
|
|
481
|
+
broker: createCapRouter_broker((_ctx, addonId) => {
|
|
482
|
+
if (!reg) return null
|
|
483
|
+
if (addonId !== undefined) {
|
|
484
|
+
return reg.getProviderByAddonId<InferProvider<typeof brokerCapability>>('broker', addonId)
|
|
485
|
+
}
|
|
486
|
+
const entries = reg.getCollectionEntries<InferProvider<typeof brokerCapability>>('broker')
|
|
487
|
+
if (entries.length === 0) return null
|
|
488
|
+
const providers = entries.map(([, p]) => p)
|
|
489
|
+
const first = providers[0]!
|
|
490
|
+
return {
|
|
491
|
+
...first,
|
|
492
|
+
list: concatCollection(providers, 'list') as InferProvider<typeof brokerCapability>['list'],
|
|
493
|
+
listProviders: concatCollection(providers, 'listProviders') as InferProvider<
|
|
494
|
+
typeof brokerCapability
|
|
495
|
+
>['listProviders'],
|
|
496
|
+
}
|
|
497
|
+
}, remoteCapProxy),
|
|
498
|
+
button: createCapRouter_button(
|
|
499
|
+
(_ctx) => requireDeviceScoped(reg, 'button') as InferProvider<typeof buttonCapability> | null,
|
|
331
500
|
remoteCapProxy,
|
|
332
501
|
),
|
|
333
502
|
cameraCredentials: createCapRouter_cameraCredentials(
|
|
334
|
-
(_ctx) =>
|
|
503
|
+
(_ctx) =>
|
|
504
|
+
requireDeviceScoped(reg, 'camera-credentials') as InferProvider<
|
|
505
|
+
typeof cameraCredentialsCapability
|
|
506
|
+
> | null,
|
|
335
507
|
remoteCapProxy,
|
|
336
508
|
),
|
|
337
509
|
cameraPipelineConfig: createCapRouter_cameraPipelineConfig(
|
|
338
|
-
(_ctx) =>
|
|
510
|
+
(_ctx) =>
|
|
511
|
+
reg?.getSingleton<InferProvider<typeof cameraPipelineConfigCapability>>(
|
|
512
|
+
'camera-pipeline-config',
|
|
513
|
+
) ?? null,
|
|
339
514
|
remoteCapProxy,
|
|
340
515
|
),
|
|
341
516
|
cameraStreams: createCapRouter_cameraStreams(
|
|
342
|
-
(_ctx) =>
|
|
517
|
+
(_ctx) =>
|
|
518
|
+
reg?.getSingleton<InferProvider<typeof cameraStreamsCapability>>('camera-streams') ?? null,
|
|
519
|
+
remoteCapProxy,
|
|
520
|
+
),
|
|
521
|
+
carbonMonoxide: createCapRouter_carbonMonoxide(
|
|
522
|
+
(_ctx) =>
|
|
523
|
+
requireDeviceScoped(reg, 'carbon-monoxide') as InferProvider<
|
|
524
|
+
typeof carbonMonoxideCapability
|
|
525
|
+
> | null,
|
|
526
|
+
remoteCapProxy,
|
|
527
|
+
),
|
|
528
|
+
climateControl: createCapRouter_climateControl(
|
|
529
|
+
(_ctx) =>
|
|
530
|
+
requireDeviceScoped(reg, 'climate-control') as InferProvider<
|
|
531
|
+
typeof climateControlCapability
|
|
532
|
+
> | null,
|
|
533
|
+
remoteCapProxy,
|
|
534
|
+
),
|
|
535
|
+
color: createCapRouter_color(
|
|
536
|
+
(_ctx) => requireDeviceScoped(reg, 'color') as InferProvider<typeof colorCapability> | null,
|
|
537
|
+
remoteCapProxy,
|
|
538
|
+
),
|
|
539
|
+
connectivity: createCapRouter_connectivity(
|
|
540
|
+
(_ctx) =>
|
|
541
|
+
requireDeviceScoped(reg, 'connectivity') as InferProvider<
|
|
542
|
+
typeof connectivityCapability
|
|
543
|
+
> | null,
|
|
544
|
+
remoteCapProxy,
|
|
545
|
+
),
|
|
546
|
+
consumables: createCapRouter_consumables(
|
|
547
|
+
(_ctx) =>
|
|
548
|
+
requireDeviceScoped(reg, 'consumables') as InferProvider<
|
|
549
|
+
typeof consumablesCapability
|
|
550
|
+
> | null,
|
|
551
|
+
remoteCapProxy,
|
|
552
|
+
),
|
|
553
|
+
contact: createCapRouter_contact(
|
|
554
|
+
(_ctx) =>
|
|
555
|
+
requireDeviceScoped(reg, 'contact') as InferProvider<typeof contactCapability> | null,
|
|
556
|
+
remoteCapProxy,
|
|
557
|
+
),
|
|
558
|
+
control: createCapRouter_control(
|
|
559
|
+
(_ctx) =>
|
|
560
|
+
requireDeviceScoped(reg, 'control') as InferProvider<typeof controlCapability> | null,
|
|
561
|
+
remoteCapProxy,
|
|
562
|
+
),
|
|
563
|
+
cover: createCapRouter_cover(
|
|
564
|
+
(_ctx) => requireDeviceScoped(reg, 'cover') as InferProvider<typeof coverCapability> | null,
|
|
343
565
|
remoteCapProxy,
|
|
344
566
|
),
|
|
345
567
|
decoder: createCapRouter_decoder(
|
|
@@ -347,113 +569,232 @@ export function mountAllCaps(services: MountAllCapsServices) {
|
|
|
347
569
|
remoteCapProxy,
|
|
348
570
|
),
|
|
349
571
|
detectionPipeline: createCapRouter_detectionPipeline(
|
|
350
|
-
(_ctx) =>
|
|
572
|
+
(_ctx) =>
|
|
573
|
+
reg?.getSingleton<InferProvider<typeof detectionPipelineCapability>>(
|
|
574
|
+
'detection-pipeline',
|
|
575
|
+
) ?? null,
|
|
351
576
|
remoteCapProxy,
|
|
352
577
|
),
|
|
353
|
-
|
|
354
|
-
(_ctx) =>
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
deviceExport: createCapRouter_deviceExport(
|
|
358
|
-
(_ctx, addonId) => {
|
|
359
|
-
if (!reg) return null
|
|
360
|
-
if (addonId !== undefined) {
|
|
361
|
-
return reg.getProviderByAddonId<InferProvider<typeof deviceExportCapability>>('device-export', addonId)
|
|
362
|
-
}
|
|
363
|
-
const entries = reg.getCollectionEntries<InferProvider<typeof deviceExportCapability>>('device-export')
|
|
364
|
-
if (entries.length === 0) return null
|
|
365
|
-
const providers = entries.map(([, p]) => p)
|
|
366
|
-
const first = providers[0]!
|
|
367
|
-
return {
|
|
368
|
-
...first,
|
|
369
|
-
listSupportedDeviceKinds: concatCollection(providers, 'listSupportedDeviceKinds') as InferProvider<typeof deviceExportCapability>['listSupportedDeviceKinds'],
|
|
370
|
-
listExposedDevices: concatCollection(providers, 'listExposedDevices') as InferProvider<typeof deviceExportCapability>['listExposedDevices'],
|
|
371
|
-
}
|
|
372
|
-
},
|
|
578
|
+
deviceAdoption: createCapRouter_deviceAdoption(
|
|
579
|
+
(_ctx) =>
|
|
580
|
+
reg?.getSingleton<InferProvider<typeof deviceAdoptionCapability>>('device-adoption') ??
|
|
581
|
+
null,
|
|
373
582
|
remoteCapProxy,
|
|
374
583
|
),
|
|
584
|
+
deviceDiscovery: createCapRouter_deviceDiscovery(
|
|
585
|
+
(_ctx) =>
|
|
586
|
+
requireDeviceScoped(reg, 'device-discovery') as InferProvider<
|
|
587
|
+
typeof deviceDiscoveryCapability
|
|
588
|
+
> | null,
|
|
589
|
+
remoteCapProxy,
|
|
590
|
+
),
|
|
591
|
+
deviceExport: createCapRouter_deviceExport((_ctx, addonId) => {
|
|
592
|
+
if (!reg) return null
|
|
593
|
+
if (addonId !== undefined) {
|
|
594
|
+
return reg.getProviderByAddonId<InferProvider<typeof deviceExportCapability>>(
|
|
595
|
+
'device-export',
|
|
596
|
+
addonId,
|
|
597
|
+
)
|
|
598
|
+
}
|
|
599
|
+
const entries =
|
|
600
|
+
reg.getCollectionEntries<InferProvider<typeof deviceExportCapability>>('device-export')
|
|
601
|
+
if (entries.length === 0) return null
|
|
602
|
+
const providers = entries.map(([, p]) => p)
|
|
603
|
+
const first = providers[0]!
|
|
604
|
+
return {
|
|
605
|
+
...first,
|
|
606
|
+
listSupportedDeviceKinds: concatCollection(
|
|
607
|
+
providers,
|
|
608
|
+
'listSupportedDeviceKinds',
|
|
609
|
+
) as InferProvider<typeof deviceExportCapability>['listSupportedDeviceKinds'],
|
|
610
|
+
listExposedDevices: concatCollection(providers, 'listExposedDevices') as InferProvider<
|
|
611
|
+
typeof deviceExportCapability
|
|
612
|
+
>['listExposedDevices'],
|
|
613
|
+
}
|
|
614
|
+
}, remoteCapProxy),
|
|
375
615
|
deviceManager: createCapRouter_deviceManager(
|
|
376
|
-
(_ctx) =>
|
|
616
|
+
(_ctx) =>
|
|
617
|
+
reg?.getSingleton<InferProvider<typeof deviceManagerCapability>>('device-manager') ?? null,
|
|
377
618
|
remoteCapProxy,
|
|
378
619
|
),
|
|
379
620
|
deviceOps: createCapRouter_deviceOps(
|
|
380
|
-
(_ctx) =>
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
621
|
+
(_ctx) =>
|
|
622
|
+
requireDeviceScoped(reg, 'device-ops') as InferProvider<typeof deviceOpsCapability> | null,
|
|
623
|
+
remoteCapProxy,
|
|
624
|
+
),
|
|
625
|
+
deviceProvider: createCapRouter_deviceProvider((_ctx, addonId) => {
|
|
626
|
+
if (!reg) return null
|
|
627
|
+
if (addonId !== undefined) {
|
|
628
|
+
return reg.getProviderByAddonId<InferProvider<typeof deviceProviderCapability>>(
|
|
629
|
+
'device-provider',
|
|
630
|
+
addonId,
|
|
631
|
+
)
|
|
632
|
+
}
|
|
633
|
+
const entries =
|
|
634
|
+
reg.getCollectionEntries<InferProvider<typeof deviceProviderCapability>>('device-provider')
|
|
635
|
+
if (entries.length === 0) return null
|
|
636
|
+
const providers = entries.map(([, p]) => p)
|
|
637
|
+
const first = providers[0]!
|
|
638
|
+
return {
|
|
639
|
+
...first,
|
|
640
|
+
getDevices: concatCollection(providers, 'getDevices') as InferProvider<
|
|
641
|
+
typeof deviceProviderCapability
|
|
642
|
+
>['getDevices'],
|
|
643
|
+
discoverDevices: concatCollection(providers, 'discoverDevices') as InferProvider<
|
|
644
|
+
typeof deviceProviderCapability
|
|
645
|
+
>['discoverDevices'],
|
|
646
|
+
}
|
|
647
|
+
}, remoteCapProxy),
|
|
401
648
|
deviceState: createCapRouter_deviceState(
|
|
402
|
-
(_ctx) =>
|
|
649
|
+
(_ctx) =>
|
|
650
|
+
reg?.getSingleton<InferProvider<typeof deviceStateCapability>>('device-state') ?? null,
|
|
403
651
|
remoteCapProxy,
|
|
404
652
|
),
|
|
405
653
|
deviceStatus: createCapRouter_deviceStatus(
|
|
406
|
-
(_ctx) =>
|
|
654
|
+
(_ctx) =>
|
|
655
|
+
requireDeviceScoped(reg, 'device-status') as InferProvider<
|
|
656
|
+
typeof deviceStatusCapability
|
|
657
|
+
> | null,
|
|
407
658
|
remoteCapProxy,
|
|
408
659
|
),
|
|
409
660
|
doorbell: createCapRouter_doorbell(
|
|
410
|
-
(_ctx) =>
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
}
|
|
661
|
+
(_ctx) =>
|
|
662
|
+
requireDeviceScoped(reg, 'doorbell') as InferProvider<typeof doorbellCapability> | null,
|
|
663
|
+
remoteCapProxy,
|
|
664
|
+
),
|
|
665
|
+
embeddingEncoder: createCapRouter_embeddingEncoder((_ctx, addonId) => {
|
|
666
|
+
if (!reg) return null
|
|
667
|
+
if (addonId !== undefined) {
|
|
668
|
+
return reg.getProviderByAddonId<InferProvider<typeof embeddingEncoderCapability>>(
|
|
669
|
+
'embedding-encoder',
|
|
670
|
+
addonId,
|
|
671
|
+
)
|
|
672
|
+
}
|
|
673
|
+
const entries =
|
|
674
|
+
reg.getCollectionEntries<InferProvider<typeof embeddingEncoderCapability>>(
|
|
675
|
+
'embedding-encoder',
|
|
676
|
+
)
|
|
677
|
+
return entries[0]?.[1] ?? null
|
|
678
|
+
}, remoteCapProxy),
|
|
679
|
+
enumSensor: createCapRouter_enumSensor(
|
|
680
|
+
(_ctx) =>
|
|
681
|
+
requireDeviceScoped(reg, 'enum-sensor') as InferProvider<
|
|
682
|
+
typeof enumSensorCapability
|
|
683
|
+
> | null,
|
|
684
|
+
remoteCapProxy,
|
|
685
|
+
),
|
|
686
|
+
eventEmitter: createCapRouter_eventEmitter(
|
|
687
|
+
(_ctx) =>
|
|
688
|
+
requireDeviceScoped(reg, 'event-emitter') as InferProvider<
|
|
689
|
+
typeof eventEmitterCapability
|
|
690
|
+
> | null,
|
|
422
691
|
remoteCapProxy,
|
|
423
692
|
),
|
|
424
693
|
events: createCapRouter_events(
|
|
425
694
|
(_ctx) => reg?.getSingleton<InferProvider<typeof eventsCapability>>('events') ?? null,
|
|
426
695
|
remoteCapProxy,
|
|
427
696
|
),
|
|
697
|
+
faceGallery: createCapRouter_faceGallery(
|
|
698
|
+
(_ctx) =>
|
|
699
|
+
reg?.getSingleton<InferProvider<typeof faceGalleryCapability>>('face-gallery') ?? null,
|
|
700
|
+
remoteCapProxy,
|
|
701
|
+
),
|
|
702
|
+
fanControl: createCapRouter_fanControl(
|
|
703
|
+
(_ctx) =>
|
|
704
|
+
requireDeviceScoped(reg, 'fan-control') as InferProvider<
|
|
705
|
+
typeof fanControlCapability
|
|
706
|
+
> | null,
|
|
707
|
+
remoteCapProxy,
|
|
708
|
+
),
|
|
428
709
|
featureProbe: createCapRouter_featureProbe(
|
|
429
|
-
(_ctx) =>
|
|
710
|
+
(_ctx) =>
|
|
711
|
+
requireDeviceScoped(reg, 'feature-probe') as InferProvider<
|
|
712
|
+
typeof featureProbeCapability
|
|
713
|
+
> | null,
|
|
430
714
|
remoteCapProxy,
|
|
431
715
|
),
|
|
432
|
-
|
|
433
|
-
(_ctx) =>
|
|
716
|
+
filesystemBrowse: createCapRouter_filesystemBrowse(
|
|
717
|
+
(_ctx) =>
|
|
718
|
+
reg?.getSingleton<InferProvider<typeof filesystemBrowseCapability>>('filesystem-browse') ??
|
|
719
|
+
null,
|
|
434
720
|
remoteCapProxy,
|
|
435
721
|
),
|
|
436
|
-
|
|
437
|
-
(_ctx) => requireDeviceScoped(reg, '
|
|
722
|
+
flood: createCapRouter_flood(
|
|
723
|
+
(_ctx) => requireDeviceScoped(reg, 'flood') as InferProvider<typeof floodCapability> | null,
|
|
438
724
|
remoteCapProxy,
|
|
439
725
|
),
|
|
440
|
-
|
|
441
|
-
(_ctx) => reg
|
|
726
|
+
gas: createCapRouter_gas(
|
|
727
|
+
(_ctx) => requireDeviceScoped(reg, 'gas') as InferProvider<typeof gasCapability> | null,
|
|
728
|
+
remoteCapProxy,
|
|
729
|
+
),
|
|
730
|
+
humidifier: createCapRouter_humidifier(
|
|
731
|
+
(_ctx) =>
|
|
732
|
+
requireDeviceScoped(reg, 'humidifier') as InferProvider<typeof humidifierCapability> | null,
|
|
733
|
+
remoteCapProxy,
|
|
734
|
+
),
|
|
735
|
+
humiditySensor: createCapRouter_humiditySensor(
|
|
736
|
+
(_ctx) =>
|
|
737
|
+
requireDeviceScoped(reg, 'humidity-sensor') as InferProvider<
|
|
738
|
+
typeof humiditySensorCapability
|
|
739
|
+
> | null,
|
|
740
|
+
remoteCapProxy,
|
|
741
|
+
),
|
|
742
|
+
image: createCapRouter_image(
|
|
743
|
+
(_ctx) => requireDeviceScoped(reg, 'image') as InferProvider<typeof imageCapability> | null,
|
|
442
744
|
remoteCapProxy,
|
|
443
745
|
),
|
|
444
|
-
|
|
445
|
-
(_ctx
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
},
|
|
746
|
+
integrations: createCapRouter_integrations(
|
|
747
|
+
(_ctx) =>
|
|
748
|
+
reg?.getSingleton<InferProvider<typeof integrationsCapability>>('integrations') ?? null,
|
|
749
|
+
remoteCapProxy,
|
|
750
|
+
),
|
|
751
|
+
intercom: createCapRouter_intercom(
|
|
752
|
+
(_ctx) =>
|
|
753
|
+
requireDeviceScoped(reg, 'intercom') as InferProvider<typeof intercomCapability> | null,
|
|
453
754
|
remoteCapProxy,
|
|
454
755
|
),
|
|
756
|
+
lawnMowerControl: createCapRouter_lawnMowerControl(
|
|
757
|
+
(_ctx) =>
|
|
758
|
+
requireDeviceScoped(reg, 'lawn-mower-control') as InferProvider<
|
|
759
|
+
typeof lawnMowerControlCapability
|
|
760
|
+
> | null,
|
|
761
|
+
remoteCapProxy,
|
|
762
|
+
),
|
|
763
|
+
localNetwork: createCapRouter_localNetwork(
|
|
764
|
+
(_ctx) =>
|
|
765
|
+
reg?.getSingleton<InferProvider<typeof localNetworkCapability>>('local-network') ?? null,
|
|
766
|
+
remoteCapProxy,
|
|
767
|
+
),
|
|
768
|
+
lockControl: createCapRouter_lockControl(
|
|
769
|
+
(_ctx) =>
|
|
770
|
+
requireDeviceScoped(reg, 'lock-control') as InferProvider<
|
|
771
|
+
typeof lockControlCapability
|
|
772
|
+
> | null,
|
|
773
|
+
remoteCapProxy,
|
|
774
|
+
),
|
|
775
|
+
mediaPlayer: createCapRouter_mediaPlayer(
|
|
776
|
+
(_ctx) =>
|
|
777
|
+
requireDeviceScoped(reg, 'media-player') as InferProvider<
|
|
778
|
+
typeof mediaPlayerCapability
|
|
779
|
+
> | null,
|
|
780
|
+
remoteCapProxy,
|
|
781
|
+
),
|
|
782
|
+
meshNetwork: createCapRouter_meshNetwork((_ctx, addonId) => {
|
|
783
|
+
if (!reg) return null
|
|
784
|
+
if (addonId !== undefined) {
|
|
785
|
+
return reg.getProviderByAddonId<InferProvider<typeof meshNetworkCapability>>(
|
|
786
|
+
'mesh-network',
|
|
787
|
+
addonId,
|
|
788
|
+
)
|
|
789
|
+
}
|
|
790
|
+
const entries =
|
|
791
|
+
reg.getCollectionEntries<InferProvider<typeof meshNetworkCapability>>('mesh-network')
|
|
792
|
+
return entries[0]?.[1] ?? null
|
|
793
|
+
}, remoteCapProxy),
|
|
455
794
|
metricsProvider: createCapRouter_metricsProvider(
|
|
456
|
-
(_ctx) =>
|
|
795
|
+
(_ctx) =>
|
|
796
|
+
reg?.getSingleton<InferProvider<typeof metricsProviderCapability>>('metrics-provider') ??
|
|
797
|
+
null,
|
|
457
798
|
remoteCapProxy,
|
|
458
799
|
),
|
|
459
800
|
motion: createCapRouter_motion(
|
|
@@ -461,111 +802,186 @@ export function mountAllCaps(services: MountAllCapsServices) {
|
|
|
461
802
|
remoteCapProxy,
|
|
462
803
|
),
|
|
463
804
|
motionDetection: createCapRouter_motionDetection(
|
|
464
|
-
(_ctx) =>
|
|
805
|
+
(_ctx) =>
|
|
806
|
+
reg?.getSingleton<InferProvider<typeof motionDetectionCapability>>('motion-detection') ??
|
|
807
|
+
null,
|
|
465
808
|
remoteCapProxy,
|
|
466
809
|
),
|
|
467
810
|
motionTrigger: createCapRouter_motionTrigger(
|
|
468
|
-
(_ctx) =>
|
|
811
|
+
(_ctx) =>
|
|
812
|
+
requireDeviceScoped(reg, 'motion-trigger') as InferProvider<
|
|
813
|
+
typeof motionTriggerCapability
|
|
814
|
+
> | null,
|
|
469
815
|
remoteCapProxy,
|
|
470
816
|
),
|
|
471
817
|
motionZones: createCapRouter_motionZones(
|
|
472
|
-
(_ctx) =>
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
818
|
+
(_ctx) =>
|
|
819
|
+
requireDeviceScoped(reg, 'motion-zones') as InferProvider<
|
|
820
|
+
typeof motionZonesCapability
|
|
821
|
+
> | null,
|
|
822
|
+
remoteCapProxy,
|
|
823
|
+
),
|
|
824
|
+
mqttBroker: createCapRouter_mqttBroker((_ctx, addonId) => {
|
|
825
|
+
if (!reg) return null
|
|
826
|
+
if (addonId !== undefined) {
|
|
827
|
+
return reg.getProviderByAddonId<InferProvider<typeof mqttBrokerCapability>>(
|
|
828
|
+
'mqtt-broker',
|
|
829
|
+
addonId,
|
|
830
|
+
)
|
|
831
|
+
}
|
|
832
|
+
const entries =
|
|
833
|
+
reg.getCollectionEntries<InferProvider<typeof mqttBrokerCapability>>('mqtt-broker')
|
|
834
|
+
if (entries.length === 0) return null
|
|
835
|
+
const providers = entries.map(([, p]) => p)
|
|
836
|
+
const first = providers[0]!
|
|
837
|
+
return {
|
|
838
|
+
...first,
|
|
839
|
+
listBrokers: concatCollection(providers, 'listBrokers') as InferProvider<
|
|
840
|
+
typeof mqttBrokerCapability
|
|
841
|
+
>['listBrokers'],
|
|
842
|
+
}
|
|
843
|
+
}, remoteCapProxy),
|
|
492
844
|
nativeObjectDetection: createCapRouter_nativeObjectDetection(
|
|
493
|
-
(_ctx) =>
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
845
|
+
(_ctx) =>
|
|
846
|
+
requireDeviceScoped(reg, 'native-object-detection') as InferProvider<
|
|
847
|
+
typeof nativeObjectDetectionCapability
|
|
848
|
+
> | null,
|
|
849
|
+
remoteCapProxy,
|
|
850
|
+
),
|
|
851
|
+
networkAccess: createCapRouter_networkAccess((_ctx, addonId) => {
|
|
852
|
+
if (!reg) return null
|
|
853
|
+
if (addonId !== undefined) {
|
|
854
|
+
return reg.getProviderByAddonId<InferProvider<typeof networkAccessCapability>>(
|
|
855
|
+
'network-access',
|
|
856
|
+
addonId,
|
|
857
|
+
)
|
|
858
|
+
}
|
|
859
|
+
const entries =
|
|
860
|
+
reg.getCollectionEntries<InferProvider<typeof networkAccessCapability>>('network-access')
|
|
861
|
+
if (entries.length === 0) return null
|
|
862
|
+
const providers = entries.map(([, p]) => p)
|
|
863
|
+
const first = providers[0]!
|
|
864
|
+
return {
|
|
865
|
+
...first,
|
|
866
|
+
listEndpoints: concatCollection(providers, 'listEndpoints') as InferProvider<
|
|
867
|
+
typeof networkAccessCapability
|
|
868
|
+
>['listEndpoints'],
|
|
869
|
+
}
|
|
870
|
+
}, remoteCapProxy),
|
|
513
871
|
networkQuality: createCapRouter_networkQuality(
|
|
514
|
-
(_ctx) =>
|
|
872
|
+
(_ctx) =>
|
|
873
|
+
reg?.getSingleton<InferProvider<typeof networkQualityCapability>>('network-quality') ??
|
|
874
|
+
null,
|
|
515
875
|
remoteCapProxy,
|
|
516
876
|
),
|
|
517
877
|
nodes: createCapRouter_nodes(
|
|
518
878
|
(_ctx) => reg?.getSingleton<InferProvider<typeof nodesCapability>>('nodes') ?? null,
|
|
519
879
|
remoteCapProxy,
|
|
520
880
|
),
|
|
521
|
-
notificationOutput: createCapRouter_notificationOutput(
|
|
522
|
-
(
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
881
|
+
notificationOutput: createCapRouter_notificationOutput((_ctx, addonId) => {
|
|
882
|
+
if (!reg) return null
|
|
883
|
+
if (addonId !== undefined) {
|
|
884
|
+
return reg.getProviderByAddonId<InferProvider<typeof notificationOutputCapability>>(
|
|
885
|
+
'notification-output',
|
|
886
|
+
addonId,
|
|
887
|
+
)
|
|
888
|
+
}
|
|
889
|
+
const entries =
|
|
890
|
+
reg.getCollectionEntries<InferProvider<typeof notificationOutputCapability>>(
|
|
891
|
+
'notification-output',
|
|
892
|
+
)
|
|
893
|
+
return entries[0]?.[1] ?? null
|
|
894
|
+
}, remoteCapProxy),
|
|
895
|
+
notifier: createCapRouter_notifier(
|
|
896
|
+
(_ctx) =>
|
|
897
|
+
requireDeviceScoped(reg, 'notifier') as InferProvider<typeof notifierCapability> | null,
|
|
898
|
+
remoteCapProxy,
|
|
899
|
+
),
|
|
900
|
+
numericSensor: createCapRouter_numericSensor(
|
|
901
|
+
(_ctx) =>
|
|
902
|
+
requireDeviceScoped(reg, 'numeric-sensor') as InferProvider<
|
|
903
|
+
typeof numericSensorCapability
|
|
904
|
+
> | null,
|
|
905
|
+
remoteCapProxy,
|
|
906
|
+
),
|
|
907
|
+
oauthIntegration: createCapRouter_oauthIntegration((_ctx, addonId) => {
|
|
908
|
+
if (!reg) return null
|
|
909
|
+
if (addonId !== undefined) {
|
|
910
|
+
return reg.getProviderByAddonId<InferProvider<typeof oauthIntegrationCapability>>(
|
|
911
|
+
'oauth-integration',
|
|
912
|
+
addonId,
|
|
913
|
+
)
|
|
914
|
+
}
|
|
915
|
+
const entries =
|
|
916
|
+
reg.getCollectionEntries<InferProvider<typeof oauthIntegrationCapability>>(
|
|
917
|
+
'oauth-integration',
|
|
918
|
+
)
|
|
919
|
+
return entries[0]?.[1] ?? null
|
|
920
|
+
}, remoteCapProxy),
|
|
543
921
|
osd: createCapRouter_osd(
|
|
544
922
|
(_ctx) => requireDeviceScoped(reg, 'osd') as InferProvider<typeof osdCapability> | null,
|
|
545
923
|
remoteCapProxy,
|
|
546
924
|
),
|
|
547
925
|
pipelineAnalytics: createCapRouter_pipelineAnalytics(
|
|
548
|
-
(_ctx) =>
|
|
926
|
+
(_ctx) =>
|
|
927
|
+
reg?.getSingleton<InferProvider<typeof pipelineAnalyticsCapability>>(
|
|
928
|
+
'pipeline-analytics',
|
|
929
|
+
) ?? null,
|
|
549
930
|
remoteCapProxy,
|
|
550
931
|
),
|
|
551
932
|
pipelineExecutor: createCapRouter_pipelineExecutor(
|
|
552
|
-
(_ctx) =>
|
|
933
|
+
(_ctx) =>
|
|
934
|
+
reg?.getSingleton<InferProvider<typeof pipelineExecutorCapability>>('pipeline-executor') ??
|
|
935
|
+
null,
|
|
553
936
|
remoteCapProxy,
|
|
554
937
|
),
|
|
555
938
|
pipelineOrchestrator: createCapRouter_pipelineOrchestrator(
|
|
556
|
-
(_ctx) =>
|
|
939
|
+
(_ctx) =>
|
|
940
|
+
reg?.getSingleton<InferProvider<typeof pipelineOrchestratorCapability>>(
|
|
941
|
+
'pipeline-orchestrator',
|
|
942
|
+
) ?? null,
|
|
557
943
|
remoteCapProxy,
|
|
558
944
|
),
|
|
559
945
|
pipelineRunner: createCapRouter_pipelineRunner(
|
|
560
|
-
(_ctx) =>
|
|
946
|
+
(_ctx) =>
|
|
947
|
+
reg?.getSingleton<InferProvider<typeof pipelineRunnerCapability>>('pipeline-runner') ??
|
|
948
|
+
null,
|
|
949
|
+
remoteCapProxy,
|
|
950
|
+
),
|
|
951
|
+
plateGallery: createCapRouter_plateGallery(
|
|
952
|
+
(_ctx) =>
|
|
953
|
+
reg?.getSingleton<InferProvider<typeof plateGalleryCapability>>('plate-gallery') ?? null,
|
|
561
954
|
remoteCapProxy,
|
|
562
955
|
),
|
|
563
956
|
platformProbe: createCapRouter_platformProbe(
|
|
564
|
-
(_ctx) =>
|
|
957
|
+
(_ctx) =>
|
|
958
|
+
reg?.getSingleton<InferProvider<typeof platformProbeCapability>>('platform-probe') ?? null,
|
|
959
|
+
remoteCapProxy,
|
|
960
|
+
),
|
|
961
|
+
powerMeter: createCapRouter_powerMeter(
|
|
962
|
+
(_ctx) =>
|
|
963
|
+
requireDeviceScoped(reg, 'power-meter') as InferProvider<
|
|
964
|
+
typeof powerMeterCapability
|
|
965
|
+
> | null,
|
|
966
|
+
remoteCapProxy,
|
|
967
|
+
),
|
|
968
|
+
presence: createCapRouter_presence(
|
|
969
|
+
(_ctx) =>
|
|
970
|
+
requireDeviceScoped(reg, 'presence') as InferProvider<typeof presenceCapability> | null,
|
|
971
|
+
remoteCapProxy,
|
|
972
|
+
),
|
|
973
|
+
pressureSensor: createCapRouter_pressureSensor(
|
|
974
|
+
(_ctx) =>
|
|
975
|
+
requireDeviceScoped(reg, 'pressure-sensor') as InferProvider<
|
|
976
|
+
typeof pressureSensorCapability
|
|
977
|
+
> | null,
|
|
565
978
|
remoteCapProxy,
|
|
566
979
|
),
|
|
567
980
|
privacyMask: createCapRouter_privacyMask(
|
|
568
|
-
(_ctx) =>
|
|
981
|
+
(_ctx) =>
|
|
982
|
+
requireDeviceScoped(reg, 'privacy-mask') as InferProvider<
|
|
983
|
+
typeof privacyMaskCapability
|
|
984
|
+
> | null,
|
|
569
985
|
remoteCapProxy,
|
|
570
986
|
),
|
|
571
987
|
ptz: createCapRouter_ptz(
|
|
@@ -573,7 +989,10 @@ export function mountAllCaps(services: MountAllCapsServices) {
|
|
|
573
989
|
remoteCapProxy,
|
|
574
990
|
),
|
|
575
991
|
ptzAutotrack: createCapRouter_ptzAutotrack(
|
|
576
|
-
(_ctx) =>
|
|
992
|
+
(_ctx) =>
|
|
993
|
+
requireDeviceScoped(reg, 'ptz-autotrack') as InferProvider<
|
|
994
|
+
typeof ptzAutotrackCapability
|
|
995
|
+
> | null,
|
|
577
996
|
remoteCapProxy,
|
|
578
997
|
),
|
|
579
998
|
reboot: createCapRouter_reboot(
|
|
@@ -584,40 +1003,53 @@ export function mountAllCaps(services: MountAllCapsServices) {
|
|
|
584
1003
|
(_ctx) => reg?.getSingleton<InferProvider<typeof recordingCapability>>('recording') ?? null,
|
|
585
1004
|
remoteCapProxy,
|
|
586
1005
|
),
|
|
587
|
-
|
|
588
|
-
(_ctx) =>
|
|
1006
|
+
scriptRunner: createCapRouter_scriptRunner(
|
|
1007
|
+
(_ctx) =>
|
|
1008
|
+
requireDeviceScoped(reg, 'script-runner') as InferProvider<
|
|
1009
|
+
typeof scriptRunnerCapability
|
|
1010
|
+
> | null,
|
|
589
1011
|
remoteCapProxy,
|
|
590
1012
|
),
|
|
591
1013
|
settingsStore: createCapRouter_settingsStore(
|
|
592
|
-
(_ctx) =>
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
1014
|
+
(_ctx) =>
|
|
1015
|
+
reg?.getSingleton<InferProvider<typeof settingsStoreCapability>>('settings-store') ?? null,
|
|
1016
|
+
remoteCapProxy,
|
|
1017
|
+
),
|
|
1018
|
+
smoke: createCapRouter_smoke(
|
|
1019
|
+
(_ctx) => requireDeviceScoped(reg, 'smoke') as InferProvider<typeof smokeCapability> | null,
|
|
1020
|
+
remoteCapProxy,
|
|
1021
|
+
),
|
|
1022
|
+
smtpProvider: createCapRouter_smtpProvider((_ctx, addonId) => {
|
|
1023
|
+
if (!reg) return null
|
|
1024
|
+
if (addonId !== undefined) {
|
|
1025
|
+
return reg.getProviderByAddonId<InferProvider<typeof smtpProviderCapability>>(
|
|
1026
|
+
'smtp-provider',
|
|
1027
|
+
addonId,
|
|
1028
|
+
)
|
|
1029
|
+
}
|
|
1030
|
+
const entries =
|
|
1031
|
+
reg.getCollectionEntries<InferProvider<typeof smtpProviderCapability>>('smtp-provider')
|
|
1032
|
+
return entries[0]?.[1] ?? null
|
|
1033
|
+
}, remoteCapProxy),
|
|
606
1034
|
snapshot: createCapRouter_snapshot(
|
|
607
|
-
(_ctx) =>
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
|
|
1035
|
+
(_ctx) =>
|
|
1036
|
+
requireDeviceScoped(reg, 'snapshot') as InferProvider<typeof snapshotCapability> | null,
|
|
1037
|
+
remoteCapProxy,
|
|
1038
|
+
),
|
|
1039
|
+
snapshotProvider: createCapRouter_snapshotProvider((_ctx, addonId) => {
|
|
1040
|
+
if (!reg) return null
|
|
1041
|
+
if (addonId !== undefined) {
|
|
1042
|
+
return reg.getProviderByAddonId<InferProvider<typeof snapshotProviderCapability>>(
|
|
1043
|
+
'snapshot-provider',
|
|
1044
|
+
addonId,
|
|
1045
|
+
)
|
|
1046
|
+
}
|
|
1047
|
+
const entries =
|
|
1048
|
+
reg.getCollectionEntries<InferProvider<typeof snapshotProviderCapability>>(
|
|
1049
|
+
'snapshot-provider',
|
|
1050
|
+
)
|
|
1051
|
+
return entries[0]?.[1] ?? null
|
|
1052
|
+
}, remoteCapProxy),
|
|
621
1053
|
ssoBridge: createCapRouter_ssoBridge(
|
|
622
1054
|
(_ctx) => reg?.getSingleton<InferProvider<typeof ssoBridgeCapability>>('sso-bridge') ?? null,
|
|
623
1055
|
remoteCapProxy,
|
|
@@ -626,33 +1058,59 @@ export function mountAllCaps(services: MountAllCapsServices) {
|
|
|
626
1058
|
(_ctx) => reg?.getSingleton<InferProvider<typeof storageCapability>>('storage') ?? null,
|
|
627
1059
|
remoteCapProxy,
|
|
628
1060
|
),
|
|
629
|
-
|
|
630
|
-
(
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
1061
|
+
storageEvictable: createCapRouter_storageEvictable((_ctx, addonId) => {
|
|
1062
|
+
if (!reg) return null
|
|
1063
|
+
if (addonId !== undefined) {
|
|
1064
|
+
return reg.getProviderByAddonId<InferProvider<typeof storageEvictableCapability>>(
|
|
1065
|
+
'storage-evictable',
|
|
1066
|
+
addonId,
|
|
1067
|
+
)
|
|
1068
|
+
}
|
|
1069
|
+
const entries =
|
|
1070
|
+
reg.getCollectionEntries<InferProvider<typeof storageEvictableCapability>>(
|
|
1071
|
+
'storage-evictable',
|
|
1072
|
+
)
|
|
1073
|
+
return entries[0]?.[1] ?? null
|
|
1074
|
+
}, remoteCapProxy),
|
|
1075
|
+
storageProvider: createCapRouter_storageProvider((_ctx, addonId) => {
|
|
1076
|
+
if (!reg) return null
|
|
1077
|
+
if (addonId !== undefined) {
|
|
1078
|
+
return reg.getProviderByAddonId<InferProvider<typeof storageProviderCapability>>(
|
|
1079
|
+
'storage-provider',
|
|
1080
|
+
addonId,
|
|
1081
|
+
)
|
|
1082
|
+
}
|
|
1083
|
+
const entries =
|
|
1084
|
+
reg.getCollectionEntries<InferProvider<typeof storageProviderCapability>>(
|
|
1085
|
+
'storage-provider',
|
|
1086
|
+
)
|
|
1087
|
+
if (entries.length === 0) return null
|
|
1088
|
+
const providers = entries.map(([, p]) => p)
|
|
1089
|
+
const first = providers[0]!
|
|
1090
|
+
return {
|
|
1091
|
+
...first,
|
|
1092
|
+
list: concatCollection(providers, 'list') as InferProvider<
|
|
1093
|
+
typeof storageProviderCapability
|
|
1094
|
+
>['list'],
|
|
1095
|
+
}
|
|
1096
|
+
}, remoteCapProxy),
|
|
646
1097
|
streamBroker: createCapRouter_streamBroker(
|
|
647
|
-
(_ctx) =>
|
|
1098
|
+
(_ctx) =>
|
|
1099
|
+
reg?.getSingleton<InferProvider<typeof streamBrokerCapability>>('stream-broker') ?? null,
|
|
648
1100
|
remoteCapProxy,
|
|
649
1101
|
),
|
|
650
1102
|
streamCatalog: createCapRouter_streamCatalog(
|
|
651
|
-
(_ctx) =>
|
|
1103
|
+
(_ctx) =>
|
|
1104
|
+
requireDeviceScoped(reg, 'stream-catalog') as InferProvider<
|
|
1105
|
+
typeof streamCatalogCapability
|
|
1106
|
+
> | null,
|
|
652
1107
|
remoteCapProxy,
|
|
653
1108
|
),
|
|
654
1109
|
streamParams: createCapRouter_streamParams(
|
|
655
|
-
(_ctx) =>
|
|
1110
|
+
(_ctx) =>
|
|
1111
|
+
requireDeviceScoped(reg, 'stream-params') as InferProvider<
|
|
1112
|
+
typeof streamParamsCapability
|
|
1113
|
+
> | null,
|
|
656
1114
|
remoteCapProxy,
|
|
657
1115
|
),
|
|
658
1116
|
switch: createCapRouter_switch(
|
|
@@ -663,54 +1121,111 @@ export function mountAllCaps(services: MountAllCapsServices) {
|
|
|
663
1121
|
(_ctx) => reg?.getSingleton<InferProvider<typeof systemCapability>>('system') ?? null,
|
|
664
1122
|
remoteCapProxy,
|
|
665
1123
|
),
|
|
1124
|
+
tamper: createCapRouter_tamper(
|
|
1125
|
+
(_ctx) => requireDeviceScoped(reg, 'tamper') as InferProvider<typeof tamperCapability> | null,
|
|
1126
|
+
remoteCapProxy,
|
|
1127
|
+
),
|
|
1128
|
+
temperatureSensor: createCapRouter_temperatureSensor(
|
|
1129
|
+
(_ctx) =>
|
|
1130
|
+
requireDeviceScoped(reg, 'temperature-sensor') as InferProvider<
|
|
1131
|
+
typeof temperatureSensorCapability
|
|
1132
|
+
> | null,
|
|
1133
|
+
remoteCapProxy,
|
|
1134
|
+
),
|
|
666
1135
|
toast: createCapRouter_toast(
|
|
667
1136
|
(_ctx) => reg?.getSingleton<InferProvider<typeof toastCapability>>('toast') ?? null,
|
|
668
1137
|
remoteCapProxy,
|
|
669
1138
|
),
|
|
670
|
-
turnProvider: createCapRouter_turnProvider(
|
|
671
|
-
(
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
1139
|
+
turnProvider: createCapRouter_turnProvider((_ctx, addonId) => {
|
|
1140
|
+
if (!reg) return null
|
|
1141
|
+
if (addonId !== undefined) {
|
|
1142
|
+
return reg.getProviderByAddonId<InferProvider<typeof turnProviderCapability>>(
|
|
1143
|
+
'turn-provider',
|
|
1144
|
+
addonId,
|
|
1145
|
+
)
|
|
1146
|
+
}
|
|
1147
|
+
const entries =
|
|
1148
|
+
reg.getCollectionEntries<InferProvider<typeof turnProviderCapability>>('turn-provider')
|
|
1149
|
+
if (entries.length === 0) return null
|
|
1150
|
+
const providers = entries.map(([, p]) => p)
|
|
1151
|
+
const first = providers[0]!
|
|
1152
|
+
return {
|
|
1153
|
+
...first,
|
|
1154
|
+
getTurnServers: concatCollection(providers, 'getTurnServers') as InferProvider<
|
|
1155
|
+
typeof turnProviderCapability
|
|
1156
|
+
>['getTurnServers'],
|
|
1157
|
+
}
|
|
1158
|
+
}, remoteCapProxy),
|
|
1159
|
+
update: createCapRouter_update(
|
|
1160
|
+
(_ctx) => requireDeviceScoped(reg, 'update') as InferProvider<typeof updateCapability> | null,
|
|
685
1161
|
remoteCapProxy,
|
|
686
1162
|
),
|
|
687
1163
|
userManagement: createCapRouter_userManagement(
|
|
688
|
-
(_ctx) =>
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
1164
|
+
(_ctx) =>
|
|
1165
|
+
reg?.getSingleton<InferProvider<typeof userManagementCapability>>('user-management') ??
|
|
1166
|
+
null,
|
|
1167
|
+
remoteCapProxy,
|
|
1168
|
+
),
|
|
1169
|
+
userPasskeys: createCapRouter_userPasskeys((_ctx, addonId) => {
|
|
1170
|
+
if (!reg) return null
|
|
1171
|
+
if (addonId !== undefined) {
|
|
1172
|
+
return reg.getProviderByAddonId<InferProvider<typeof userPasskeysCapability>>(
|
|
1173
|
+
'user-passkeys',
|
|
1174
|
+
addonId,
|
|
1175
|
+
)
|
|
1176
|
+
}
|
|
1177
|
+
const entries =
|
|
1178
|
+
reg.getCollectionEntries<InferProvider<typeof userPasskeysCapability>>('user-passkeys')
|
|
1179
|
+
if (entries.length === 0) return null
|
|
1180
|
+
const providers = entries.map(([, p]) => p)
|
|
1181
|
+
const first = providers[0]!
|
|
1182
|
+
return {
|
|
1183
|
+
...first,
|
|
1184
|
+
listPasskeys: concatCollection(providers, 'listPasskeys') as InferProvider<
|
|
1185
|
+
typeof userPasskeysCapability
|
|
1186
|
+
>['listPasskeys'],
|
|
1187
|
+
}
|
|
1188
|
+
}, remoteCapProxy),
|
|
1189
|
+
vacuumControl: createCapRouter_vacuumControl(
|
|
1190
|
+
(_ctx) =>
|
|
1191
|
+
requireDeviceScoped(reg, 'vacuum-control') as InferProvider<
|
|
1192
|
+
typeof vacuumControlCapability
|
|
1193
|
+
> | null,
|
|
1194
|
+
remoteCapProxy,
|
|
1195
|
+
),
|
|
1196
|
+
valve: createCapRouter_valve(
|
|
1197
|
+
(_ctx) => requireDeviceScoped(reg, 'valve') as InferProvider<typeof valveCapability> | null,
|
|
1198
|
+
remoteCapProxy,
|
|
1199
|
+
),
|
|
1200
|
+
vibration: createCapRouter_vibration(
|
|
1201
|
+
(_ctx) =>
|
|
1202
|
+
requireDeviceScoped(reg, 'vibration') as InferProvider<typeof vibrationCapability> | null,
|
|
1203
|
+
remoteCapProxy,
|
|
1204
|
+
),
|
|
1205
|
+
videoclips: createCapRouter_videoclips(
|
|
1206
|
+
(_ctx) => reg?.getSingleton<InferProvider<typeof videoclipsCapability>>('videoclips') ?? null,
|
|
1207
|
+
remoteCapProxy,
|
|
1208
|
+
),
|
|
1209
|
+
waterHeater: createCapRouter_waterHeater(
|
|
1210
|
+
(_ctx) =>
|
|
1211
|
+
requireDeviceScoped(reg, 'water-heater') as InferProvider<
|
|
1212
|
+
typeof waterHeaterCapability
|
|
1213
|
+
> | null,
|
|
1214
|
+
remoteCapProxy,
|
|
1215
|
+
),
|
|
1216
|
+
weather: createCapRouter_weather(
|
|
1217
|
+
(_ctx) =>
|
|
1218
|
+
requireDeviceScoped(reg, 'weather') as InferProvider<typeof weatherCapability> | null,
|
|
706
1219
|
remoteCapProxy,
|
|
707
1220
|
),
|
|
708
1221
|
webrtcSession: createCapRouter_webrtcSession(
|
|
709
|
-
(_ctx) =>
|
|
1222
|
+
(_ctx) =>
|
|
1223
|
+
reg?.getSingleton<InferProvider<typeof webrtcSessionCapability>>('webrtc-session') ?? null,
|
|
710
1224
|
remoteCapProxy,
|
|
711
1225
|
),
|
|
712
1226
|
zoneAnalytics: createCapRouter_zoneAnalytics(
|
|
713
|
-
(_ctx) =>
|
|
1227
|
+
(_ctx) =>
|
|
1228
|
+
reg?.getSingleton<InferProvider<typeof zoneAnalyticsCapability>>('zone-analytics') ?? null,
|
|
714
1229
|
remoteCapProxy,
|
|
715
1230
|
),
|
|
716
1231
|
zoneRules: createCapRouter_zoneRules(
|