@camstack/types 1.2.27 → 1.2.29

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.
@@ -0,0 +1,248 @@
1
+ import { z } from 'zod';
2
+ import { type InferProvider } from './capability-definition.js';
3
+ /**
4
+ * core-blocks — user-authored TypeScript, stored in the kernel and executed in
5
+ * its own process.
6
+ *
7
+ * Spec: `docs/superpowers/specs/2026-08-04-core-blocks-and-synthetic-devices-design.md`.
8
+ *
9
+ * The first use is **owning devices without being a device provider**: a block
10
+ * declares devices under a system or custom integration and drives their state,
11
+ * with the same `ctx` an addon gets. Automations come later; nothing here
12
+ * models a trigger.
13
+ *
14
+ * **Stated plainly, because it does not change by being true:** a block has an
15
+ * addon's powers — devices, storage, the event bus, `ctx.api`. It is a plugin
16
+ * with no review step. What makes that survivable is not a sandbox, it is
17
+ * PROCESS ISOLATION: one process per block, supervised by `CrashSupervisor`,
18
+ * so a block that throws or never returns is marked `failed` and visible
19
+ * instead of taking the hub with it (D6). Every method here is admin-only, and
20
+ * must stay so.
21
+ */
22
+ /** Where a block runs. The operator chooses — a block driving a device on an
23
+ * agent is the reason placement is not fixed to the hub. */
24
+ export declare const CoreBlockPlacementSchema: z.ZodUnion<readonly [z.ZodLiteral<"hub">, z.ZodString]>;
25
+ export type CoreBlockPlacement = z.infer<typeof CoreBlockPlacementSchema>;
26
+ /** What a block's process is doing. Mirrors the addon runner's own lifecycle so
27
+ * a failing block reads the same way a failing addon does. */
28
+ export declare const CoreBlockStatusSchema: z.ZodEnum<{
29
+ failed: "failed";
30
+ running: "running";
31
+ stopped: "stopped";
32
+ starting: "starting";
33
+ }>;
34
+ export type CoreBlockStatus = z.infer<typeof CoreBlockStatusSchema>;
35
+ /** Client-authored fields. */
36
+ export declare const CoreBlockInputSchema: z.ZodObject<{
37
+ name: z.ZodString;
38
+ code: z.ZodString;
39
+ enabled: z.ZodBoolean;
40
+ placement: z.ZodUnion<readonly [z.ZodLiteral<"hub">, z.ZodString]>;
41
+ integrationId: z.ZodOptional<z.ZodString>;
42
+ }, z.core.$strip>;
43
+ export type CoreBlockInput = z.infer<typeof CoreBlockInputSchema>;
44
+ /** A stored block. */
45
+ export declare const CoreBlockSchema: z.ZodObject<{
46
+ name: z.ZodString;
47
+ code: z.ZodString;
48
+ enabled: z.ZodBoolean;
49
+ placement: z.ZodUnion<readonly [z.ZodLiteral<"hub">, z.ZodString]>;
50
+ integrationId: z.ZodOptional<z.ZodString>;
51
+ id: z.ZodString;
52
+ createdAt: z.ZodNumber;
53
+ updatedAt: z.ZodNumber;
54
+ createdBy: z.ZodString;
55
+ status: z.ZodEnum<{
56
+ failed: "failed";
57
+ running: "running";
58
+ stopped: "stopped";
59
+ starting: "starting";
60
+ }>;
61
+ lastError: z.ZodOptional<z.ZodString>;
62
+ lastChangedAt: z.ZodNumber;
63
+ }, z.core.$strip>;
64
+ export type CoreBlock = z.infer<typeof CoreBlockSchema>;
65
+ /** What a compile attempt produced. */
66
+ export declare const CoreBlockCompileResultSchema: z.ZodObject<{
67
+ ok: z.ZodBoolean;
68
+ error: z.ZodOptional<z.ZodString>;
69
+ line: z.ZodOptional<z.ZodNumber>;
70
+ column: z.ZodOptional<z.ZodNumber>;
71
+ }, z.core.$strip>;
72
+ export type CoreBlockCompileResult = z.infer<typeof CoreBlockCompileResultSchema>;
73
+ export declare const coreBlocksCapability: {
74
+ readonly name: "core-blocks";
75
+ readonly scope: "system";
76
+ readonly mode: "singleton";
77
+ readonly methods: {
78
+ readonly list: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
79
+ blocks: z.ZodArray<z.ZodObject<{
80
+ name: z.ZodString;
81
+ code: z.ZodString;
82
+ enabled: z.ZodBoolean;
83
+ placement: z.ZodUnion<readonly [z.ZodLiteral<"hub">, z.ZodString]>;
84
+ integrationId: z.ZodOptional<z.ZodString>;
85
+ id: z.ZodString;
86
+ createdAt: z.ZodNumber;
87
+ updatedAt: z.ZodNumber;
88
+ createdBy: z.ZodString;
89
+ status: z.ZodEnum<{
90
+ failed: "failed";
91
+ running: "running";
92
+ stopped: "stopped";
93
+ starting: "starting";
94
+ }>;
95
+ lastError: z.ZodOptional<z.ZodString>;
96
+ lastChangedAt: z.ZodNumber;
97
+ }, z.core.$strip>>;
98
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
99
+ readonly get: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
100
+ blockId: z.ZodString;
101
+ }, z.core.$strip>, z.ZodObject<{
102
+ block: z.ZodNullable<z.ZodObject<{
103
+ name: z.ZodString;
104
+ code: z.ZodString;
105
+ enabled: z.ZodBoolean;
106
+ placement: z.ZodUnion<readonly [z.ZodLiteral<"hub">, z.ZodString]>;
107
+ integrationId: z.ZodOptional<z.ZodString>;
108
+ id: z.ZodString;
109
+ createdAt: z.ZodNumber;
110
+ updatedAt: z.ZodNumber;
111
+ createdBy: z.ZodString;
112
+ status: z.ZodEnum<{
113
+ failed: "failed";
114
+ running: "running";
115
+ stopped: "stopped";
116
+ starting: "starting";
117
+ }>;
118
+ lastError: z.ZodOptional<z.ZodString>;
119
+ lastChangedAt: z.ZodNumber;
120
+ }, z.core.$strip>>;
121
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
122
+ /**
123
+ * Create a block. The code is COMPILED first: storing source that does not
124
+ * compile turns an editor error into a fork failure the operator meets
125
+ * minutes later in a log.
126
+ */
127
+ readonly create: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
128
+ block: z.ZodObject<{
129
+ name: z.ZodString;
130
+ code: z.ZodString;
131
+ enabled: z.ZodBoolean;
132
+ placement: z.ZodUnion<readonly [z.ZodLiteral<"hub">, z.ZodString]>;
133
+ integrationId: z.ZodOptional<z.ZodString>;
134
+ }, z.core.$strip>;
135
+ }, z.core.$strip>, z.ZodObject<{
136
+ block: z.ZodObject<{
137
+ name: z.ZodString;
138
+ code: z.ZodString;
139
+ enabled: z.ZodBoolean;
140
+ placement: z.ZodUnion<readonly [z.ZodLiteral<"hub">, z.ZodString]>;
141
+ integrationId: z.ZodOptional<z.ZodString>;
142
+ id: z.ZodString;
143
+ createdAt: z.ZodNumber;
144
+ updatedAt: z.ZodNumber;
145
+ createdBy: z.ZodString;
146
+ status: z.ZodEnum<{
147
+ failed: "failed";
148
+ running: "running";
149
+ stopped: "stopped";
150
+ starting: "starting";
151
+ }>;
152
+ lastError: z.ZodOptional<z.ZodString>;
153
+ lastChangedAt: z.ZodNumber;
154
+ }, z.core.$strip>;
155
+ }, z.core.$strip>, "mutation"> & {
156
+ readonly caller: "required";
157
+ };
158
+ readonly update: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
159
+ blockId: z.ZodString;
160
+ block: z.ZodObject<{
161
+ name: z.ZodOptional<z.ZodString>;
162
+ code: z.ZodOptional<z.ZodString>;
163
+ enabled: z.ZodOptional<z.ZodBoolean>;
164
+ placement: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"hub">, z.ZodString]>>;
165
+ integrationId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
166
+ }, z.core.$strip>;
167
+ }, z.core.$strip>, z.ZodObject<{
168
+ block: z.ZodObject<{
169
+ name: z.ZodString;
170
+ code: z.ZodString;
171
+ enabled: z.ZodBoolean;
172
+ placement: z.ZodUnion<readonly [z.ZodLiteral<"hub">, z.ZodString]>;
173
+ integrationId: z.ZodOptional<z.ZodString>;
174
+ id: z.ZodString;
175
+ createdAt: z.ZodNumber;
176
+ updatedAt: z.ZodNumber;
177
+ createdBy: z.ZodString;
178
+ status: z.ZodEnum<{
179
+ failed: "failed";
180
+ running: "running";
181
+ stopped: "stopped";
182
+ starting: "starting";
183
+ }>;
184
+ lastError: z.ZodOptional<z.ZodString>;
185
+ lastChangedAt: z.ZodNumber;
186
+ }, z.core.$strip>;
187
+ }, z.core.$strip>, "mutation"> & {
188
+ readonly caller: "required";
189
+ };
190
+ readonly delete: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
191
+ blockId: z.ZodString;
192
+ }, z.core.$strip>, z.ZodObject<{
193
+ success: z.ZodLiteral<true>;
194
+ }, z.core.$strip>, "mutation">;
195
+ readonly setEnabled: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
196
+ blockId: z.ZodString;
197
+ enabled: z.ZodBoolean;
198
+ }, z.core.$strip>, z.ZodObject<{
199
+ block: z.ZodObject<{
200
+ name: z.ZodString;
201
+ code: z.ZodString;
202
+ enabled: z.ZodBoolean;
203
+ placement: z.ZodUnion<readonly [z.ZodLiteral<"hub">, z.ZodString]>;
204
+ integrationId: z.ZodOptional<z.ZodString>;
205
+ id: z.ZodString;
206
+ createdAt: z.ZodNumber;
207
+ updatedAt: z.ZodNumber;
208
+ createdBy: z.ZodString;
209
+ status: z.ZodEnum<{
210
+ failed: "failed";
211
+ running: "running";
212
+ stopped: "stopped";
213
+ starting: "starting";
214
+ }>;
215
+ lastError: z.ZodOptional<z.ZodString>;
216
+ lastChangedAt: z.ZodNumber;
217
+ }, z.core.$strip>;
218
+ }, z.core.$strip>, "mutation">;
219
+ /**
220
+ * Type-check without saving — what the editor calls as the author types, so
221
+ * the compiler's verdict is the same one the server will reach.
222
+ */
223
+ readonly compile: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
224
+ code: z.ZodString;
225
+ }, z.core.$strip>, z.ZodObject<{
226
+ ok: z.ZodBoolean;
227
+ error: z.ZodOptional<z.ZodString>;
228
+ line: z.ZodOptional<z.ZodNumber>;
229
+ column: z.ZodOptional<z.ZodNumber>;
230
+ }, z.core.$strip>, "mutation">;
231
+ /**
232
+ * The declaration files the editor type-checks against.
233
+ *
234
+ * Served rather than bundled: the graph is 3.4 MB across 344 files, and
235
+ * bundling it would roughly double the admin remote. Served rather than
236
+ * hand-stubbed: a block runs with the same `ctx` an addon gets, so a stub
237
+ * would drift and the editor would confidently autocomplete methods that
238
+ * do not exist.
239
+ */
240
+ readonly getTypeDefs: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodObject<{
241
+ libs: z.ZodArray<z.ZodObject<{
242
+ filePath: z.ZodString;
243
+ content: z.ZodString;
244
+ }, z.core.$strip>>;
245
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
246
+ };
247
+ };
248
+ export type ICoreBlocksProvider = InferProvider<typeof coreBlocksCapability>;
@@ -748,9 +748,23 @@ export declare const deviceManagerCapability: {
748
748
  parentDeviceId: z.ZodNullable<z.ZodNumber>;
749
749
  role: z.ZodOptional<z.ZodNullable<z.ZodString>>;
750
750
  }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
751
- /** List all devices (live registry), optionally filtered by addonId. */
751
+ /**
752
+ * List all devices (live registry), optionally filtered by addonId.
753
+ *
754
+ * **Ask for `projection: 'slim'` unless you need `config`.** A full listing
755
+ * of 293 devices measured 271 KB, of which `config` was 113 KB and
756
+ * `metadata` 22 KB — half the payload — and the viewer's camera list, the
757
+ * largest consumer, reads 1.8 KB of it. Worse, the persisted branch reads
758
+ * each device's settings row one at a time, so `config` costs a
759
+ * per-device round-trip as well as its bytes.
760
+ */
752
761
  readonly listAll: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
753
762
  addonId: z.ZodOptional<z.ZodString>;
763
+ projection: z.ZodOptional<z.ZodEnum<{
764
+ full: "full";
765
+ slim: "slim";
766
+ }>>;
767
+ isCamera: z.ZodOptional<z.ZodBoolean>;
754
768
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
755
769
  id: z.ZodNumber;
756
770
  stableId: z.ZodString;
@@ -74,6 +74,7 @@ export { AddBrokerInputSchema, BrokerConnectionDetailsSchema, BrokerInfoSchema,
74
74
  export type { NetworkAccessStatus, NetworkEndpoint } from './network-access.cap.js';
75
75
  export { NetworkAccessStatusSchema, NetworkEndpointSchema, networkAccessCapability, } from './network-access.cap.js';
76
76
  export { type Attachment, type AttachmentMediaType, AttachmentMediaTypeSchema, AttachmentSchema, type DiscoveredTarget, DiscoveredTargetSchema, type INotificationOutputProvider, type NotificationAction, 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 CoreBlock, type CoreBlockCompileResult, CoreBlockCompileResultSchema, type CoreBlockInput, CoreBlockInputSchema, type CoreBlockPlacement, CoreBlockPlacementSchema, CoreBlockSchema, type CoreBlockStatus, CoreBlockStatusSchema, coreBlocksCapability, type ICoreBlocksProvider, } from './core-blocks.cap.js';
77
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 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 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';
78
79
  export { type IOauthIntegrationProvider, type OauthIntegrationDescriptor, OauthIntegrationDescriptorSchema, oauthIntegrationCapability, } from './oauth-integration.cap.js';
79
80
  export { type AudioEvent, AudioEventSchema, type DetectionSource, DetectionSourceSchema, type EventKind, type EventKindCategory, EventKindCategorySchema, type EventKindDescriptor, EventKindDescriptorSchema, type EventKindIcon, EventKindIconSchema, EventKindSchema, type EventPruneCounts, type EventStoreDeviceFootprint, type EventStoreFootprint, type IPipelineAnalyticsProvider, type KeyEvent, KeyEventSchema, type MediaFile, 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';
@@ -274,6 +275,7 @@ import type { networkAccessCapability } from './network-access.cap.js';
274
275
  import type { networkQualityCapability } from './network-quality.cap.js';
275
276
  import type { nodesCapability } from './nodes.cap.js';
276
277
  import type { notificationOutputCapability } from './notification-output.cap.js';
278
+ import type { coreBlocksCapability } from './core-blocks.cap.js';
277
279
  import type { notificationRulesCapability } from './notification-rules.cap.js';
278
280
  import type { notifierCapability } from './notifier.cap.js';
279
281
  import type { numericSensorCapability } from './numeric-sensor.cap.js';
@@ -326,6 +328,6 @@ import type { webrtcSessionCapability } from './webrtc-session.cap.js';
326
328
  import type { zoneAnalyticsCapability } from './zone-analytics.cap.js';
327
329
  import type { zoneRulesCapability } from './zone-rules.cap.js';
328
330
  import type { zonesCapability } from './zones.cap.js';
329
- type AnyCapability = typeof addonSettingsCapability | typeof alertsCapability | typeof storageCapability | typeof storageProviderCapability | typeof storageEvictableCapability | typeof filesystemBrowseCapability | typeof backupCapability | typeof terminalSessionCapability | typeof settingsStoreCapability | typeof dataStoreProviderCapability | typeof logDestinationCapability | typeof adminUiCapability | typeof viewerUiCapability | typeof ssoBridgeCapability | typeof userPasskeysCapability | typeof smtpProviderCapability | typeof mqttBrokerCapability | typeof brokerCapability | typeof deviceAdoptionCapability | typeof deviceExportCapability | typeof addonPagesCapability | typeof addonPagesSourceCapability | typeof addonWidgetsCapability | typeof addonWidgetsSourceCapability | typeof customModelRegistryCapability | typeof modelDistributorCapability | typeof modelConvertCapability | typeof addonRoutesCapability | typeof streamBrokerCapability | typeof decoderCapability | typeof webrtcSessionCapability | typeof cameraStreamsCapability | typeof motionDetectionCapability | typeof pipelineExecutorCapability | typeof detectionPipelineCapability | typeof cameraPipelineConfigCapability | typeof pipelineRunnerCapability | typeof pipelineOrchestratorCapability | typeof audioAnalyzerCapability | typeof audioAnalysisCapability | typeof audioCodecCapability | typeof embeddingEncoderCapability | typeof deviceProviderCapability | typeof deviceManagerCapability | typeof deviceStateCapability | typeof authProviderCapability | typeof loginMethodCapability | typeof networkAccessCapability | typeof turnProviderCapability | typeof snapshotCapability | typeof llmCapability | typeof llmRuntimeCapability | typeof notificationOutputCapability | typeof notificationRulesCapability | typeof pipelineAnalyticsCapability | typeof metricsProviderCapability | typeof ptzCapability | typeof ptzAutotrackCapability | typeof consumablesCapability | typeof rebootCapability | typeof deviceDiscoveryCapability | typeof brightnessCapability | typeof colorCapability | typeof climateControlCapability | typeof coverCapability | typeof valveCapability | typeof humidifierCapability | typeof waterHeaterCapability | typeof weatherCapability | typeof imageCapability | typeof lockControlCapability | typeof vacuumControlCapability | typeof petFeederCapability | typeof lawnMowerControlCapability | typeof fanControlCapability | typeof controlCapability | typeof notifierCapability | typeof mediaPlayerCapability | typeof alarmPanelCapability | typeof presenceCapability | typeof scriptRunnerCapability | typeof automationControlCapability | typeof motionTriggerCapability | typeof eventsCapability | typeof zonesCapability | typeof zoneRulesCapability | typeof zoneAnalyticsCapability | typeof audioMetricsCapability | typeof motionCapability | typeof contactCapability | typeof floodCapability | typeof smokeCapability | typeof carbonMonoxideCapability | typeof gasCapability | typeof tamperCapability | typeof vibrationCapability | typeof connectivityCapability | typeof binaryCapability | typeof temperatureSensorCapability | typeof humiditySensorCapability | typeof ambientLightSensorCapability | typeof pressureSensorCapability | typeof powerMeterCapability | typeof airQualitySensorCapability | typeof numericSensorCapability | typeof enumSensorCapability | typeof recordingCapability | typeof recordingExportCapability | typeof deviceOpsCapability | typeof platformProbeCapability | typeof localNetworkCapability | typeof meshNetworkCapability | typeof userManagementCapability | typeof systemCapability | typeof networkQualityCapability | typeof toastCapability | typeof nodesCapability | typeof serverManagementCapability | typeof integrationsCapability | typeof addonsCapability | typeof oauthIntegrationCapability | typeof streamParamsCapability | typeof streamCatalogCapability | typeof motionZonesCapability | typeof sceneMonitorCapability | typeof privacyMaskCapability | typeof dayNightCapability | typeof imageSettingsCapability;
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;
330
332
  export type CapabilityName = AnyCapability['name'];
331
333
  export type ITypedReadinessRegistry = IReadinessRegistry<CapabilityName>;
@@ -18,8 +18,8 @@ export declare const IntercomAbilitySchema: z.ZodObject<{
18
18
  codecs: z.ZodArray<z.ZodString>;
19
19
  sampleRate: z.ZodNumber;
20
20
  duplex: z.ZodEnum<{
21
- half: "half";
22
21
  full: "full";
22
+ half: "half";
23
23
  }>;
24
24
  maxBacklogMs: z.ZodNumber;
25
25
  }, z.core.$strip>;
@@ -31,8 +31,8 @@ export declare const IntercomStatusSchema: z.ZodObject<{
31
31
  codecs: z.ZodArray<z.ZodString>;
32
32
  sampleRate: z.ZodNumber;
33
33
  duplex: z.ZodEnum<{
34
- half: "half";
35
34
  full: "full";
35
+ half: "half";
36
36
  }>;
37
37
  maxBacklogMs: z.ZodNumber;
38
38
  }, z.core.$strip>>;
@@ -152,8 +152,8 @@ export declare const intercomCapability: {
152
152
  codecs: z.ZodArray<z.ZodString>;
153
153
  sampleRate: z.ZodNumber;
154
154
  duplex: z.ZodEnum<{
155
- half: "half";
156
155
  full: "full";
156
+ half: "half";
157
157
  }>;
158
158
  maxBacklogMs: z.ZodNumber;
159
159
  }, z.core.$strip>>;
@@ -169,8 +169,8 @@ export declare const intercomCapability: {
169
169
  codecs: z.ZodArray<z.ZodString>;
170
170
  sampleRate: z.ZodNumber;
171
171
  duplex: z.ZodEnum<{
172
- half: "half";
173
172
  full: "full";
173
+ half: "half";
174
174
  }>;
175
175
  maxBacklogMs: z.ZodNumber;
176
176
  }, z.core.$strip>>;
@@ -52,8 +52,8 @@ export declare const LlmRuntimeStatusSchema: z.ZodObject<{
52
52
  state: z.ZodEnum<{
53
53
  failed: "failed";
54
54
  stopped: "stopped";
55
- ready: "ready";
56
55
  starting: "starting";
56
+ ready: "ready";
57
57
  downloading: "downloading";
58
58
  crashed: "crashed";
59
59
  }>;
@@ -218,8 +218,8 @@ export declare const llmRuntimeCapability: {
218
218
  state: z.ZodEnum<{
219
219
  failed: "failed";
220
220
  stopped: "stopped";
221
- ready: "ready";
222
221
  starting: "starting";
222
+ ready: "ready";
223
223
  downloading: "downloading";
224
224
  crashed: "crashed";
225
225
  }>;
@@ -239,8 +239,8 @@ export declare const llmRuntimeCapability: {
239
239
  state: z.ZodEnum<{
240
240
  failed: "failed";
241
241
  stopped: "stopped";
242
- ready: "ready";
243
242
  starting: "starting";
243
+ ready: "ready";
244
244
  downloading: "downloading";
245
245
  crashed: "crashed";
246
246
  }>;
@@ -141,8 +141,8 @@ export declare const LlmRuntimeNodeSchema: z.ZodObject<{
141
141
  state: z.ZodEnum<{
142
142
  failed: "failed";
143
143
  stopped: "stopped";
144
- ready: "ready";
145
144
  starting: "starting";
145
+ ready: "ready";
146
146
  downloading: "downloading";
147
147
  crashed: "crashed";
148
148
  }>;
@@ -493,8 +493,8 @@ export declare const llmCapability: {
493
493
  state: z.ZodEnum<{
494
494
  failed: "failed";
495
495
  stopped: "stopped";
496
- ready: "ready";
497
496
  starting: "starting";
497
+ ready: "ready";
498
498
  downloading: "downloading";
499
499
  crashed: "crashed";
500
500
  }>;
@@ -549,8 +549,8 @@ export declare const llmCapability: {
549
549
  state: z.ZodEnum<{
550
550
  failed: "failed";
551
551
  stopped: "stopped";
552
- ready: "ready";
553
552
  starting: "starting";
553
+ ready: "ready";
554
554
  downloading: "downloading";
555
555
  crashed: "crashed";
556
556
  }>;
@@ -572,8 +572,8 @@ export declare const llmCapability: {
572
572
  state: z.ZodEnum<{
573
573
  failed: "failed";
574
574
  stopped: "stopped";
575
- ready: "ready";
576
575
  starting: "starting";
576
+ ready: "ready";
577
577
  downloading: "downloading";
578
578
  crashed: "crashed";
579
579
  }>;
@@ -72,10 +72,10 @@ export declare const MaskShapeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
72
72
  }, z.core.$strip>], "kind">;
73
73
  /** Every shape-kind discriminant, for `supportedShapes` advertisement. */
74
74
  export declare const MaskShapeKindSchema: z.ZodEnum<{
75
+ line: "line";
75
76
  polygon: "polygon";
76
77
  rect: "rect";
77
78
  grid: "grid";
78
- line: "line";
79
79
  }>;
80
80
  /** Polygon vertex bounds when a cap supports 'polygon' (e.g. Hikvision {min:4,max:4}). */
81
81
  export declare const MaskPolygonVerticesSchema: z.ZodObject<{
@@ -40,10 +40,10 @@ export declare const MotionZoneStatusSchema: z.ZodObject<{
40
40
  export declare const MotionZoneOptionsSchema: z.ZodObject<{
41
41
  maxRegions: z.ZodNumber;
42
42
  supportedShapes: z.ZodArray<z.ZodEnum<{
43
+ line: "line";
43
44
  polygon: "polygon";
44
45
  rect: "rect";
45
46
  grid: "grid";
46
- line: "line";
47
47
  }>>;
48
48
  grid: z.ZodObject<{
49
49
  width: z.ZodNumber;
@@ -94,10 +94,10 @@ export declare const motionZonesCapability: {
94
94
  }, z.core.$strip>, z.ZodObject<{
95
95
  maxRegions: z.ZodNumber;
96
96
  supportedShapes: z.ZodArray<z.ZodEnum<{
97
+ line: "line";
97
98
  polygon: "polygon";
98
99
  rect: "rect";
99
100
  grid: "grid";
100
- line: "line";
101
101
  }>>;
102
102
  grid: z.ZodObject<{
103
103
  width: z.ZodNumber;
@@ -67,10 +67,10 @@ export declare const PrivacyMaskStatusSchema: z.ZodObject<{
67
67
  export declare const PrivacyMaskOptionsSchema: z.ZodObject<{
68
68
  maxRegions: z.ZodNumber;
69
69
  supportedShapes: z.ZodArray<z.ZodEnum<{
70
+ line: "line";
70
71
  polygon: "polygon";
71
72
  rect: "rect";
72
73
  grid: "grid";
73
- line: "line";
74
74
  }>>;
75
75
  polygonVertices: z.ZodOptional<z.ZodObject<{
76
76
  min: z.ZodNumber;
@@ -123,10 +123,10 @@ export declare const privacyMaskCapability: {
123
123
  }, z.core.$strip>, z.ZodObject<{
124
124
  maxRegions: z.ZodNumber;
125
125
  supportedShapes: z.ZodArray<z.ZodEnum<{
126
+ line: "line";
126
127
  polygon: "polygon";
127
128
  rect: "rect";
128
129
  grid: "grid";
129
- line: "line";
130
130
  }>>;
131
131
  polygonVertices: z.ZodOptional<z.ZodObject<{
132
132
  min: z.ZodNumber;
@@ -28,6 +28,7 @@ import type { climateControlCapability } from '../capabilities/climate-control.c
28
28
  import type { colorCapability } from '../capabilities/color.cap.js';
29
29
  import type { consumablesCapability } from '../capabilities/consumables.cap.js';
30
30
  import type { controlCapability } from '../capabilities/control.cap.js';
31
+ import type { coreBlocksCapability } from '../capabilities/core-blocks.cap.js';
31
32
  import type { coverCapability } from '../capabilities/cover.cap.js';
32
33
  import type { customModelRegistryCapability } from '../capabilities/custom-model-registry.cap.js';
33
34
  import type { dataStoreProviderCapability } from '../capabilities/data-store-provider.cap.js';
@@ -1390,6 +1391,69 @@ export type AppRouter = TrpcCoreRouter<{
1390
1391
  meta: object;
1391
1392
  }>;
1392
1393
  }>>;
1394
+ coreBlocks: TRPCBuiltRouter<{
1395
+ ctx: TrpcContext;
1396
+ meta: object;
1397
+ errorShape: AugmentedErrorShape;
1398
+ transformer: true;
1399
+ }, TRPCDecorateCreateRouterOptions<{
1400
+ list: TRPCQueryProcedure<{
1401
+ input: {
1402
+ [x: string]: unknown;
1403
+ } & z.input<typeof coreBlocksCapability.methods.list.input>;
1404
+ output: z.infer<typeof coreBlocksCapability.methods.list.output>;
1405
+ meta: object;
1406
+ }>;
1407
+ get: TRPCQueryProcedure<{
1408
+ input: {
1409
+ [x: string]: unknown;
1410
+ } & z.input<typeof coreBlocksCapability.methods.get.input>;
1411
+ output: z.infer<typeof coreBlocksCapability.methods.get.output>;
1412
+ meta: object;
1413
+ }>;
1414
+ create: TRPCMutationProcedure<{
1415
+ input: {
1416
+ [x: string]: unknown;
1417
+ } & z.input<typeof coreBlocksCapability.methods.create.input>;
1418
+ output: z.infer<typeof coreBlocksCapability.methods.create.output>;
1419
+ meta: object;
1420
+ }>;
1421
+ update: TRPCMutationProcedure<{
1422
+ input: {
1423
+ [x: string]: unknown;
1424
+ } & z.input<typeof coreBlocksCapability.methods.update.input>;
1425
+ output: z.infer<typeof coreBlocksCapability.methods.update.output>;
1426
+ meta: object;
1427
+ }>;
1428
+ delete: TRPCMutationProcedure<{
1429
+ input: {
1430
+ [x: string]: unknown;
1431
+ } & z.input<typeof coreBlocksCapability.methods.delete.input>;
1432
+ output: z.infer<typeof coreBlocksCapability.methods.delete.output>;
1433
+ meta: object;
1434
+ }>;
1435
+ setEnabled: TRPCMutationProcedure<{
1436
+ input: {
1437
+ [x: string]: unknown;
1438
+ } & z.input<typeof coreBlocksCapability.methods.setEnabled.input>;
1439
+ output: z.infer<typeof coreBlocksCapability.methods.setEnabled.output>;
1440
+ meta: object;
1441
+ }>;
1442
+ compile: TRPCMutationProcedure<{
1443
+ input: {
1444
+ [x: string]: unknown;
1445
+ } & z.input<typeof coreBlocksCapability.methods.compile.input>;
1446
+ output: z.infer<typeof coreBlocksCapability.methods.compile.output>;
1447
+ meta: object;
1448
+ }>;
1449
+ getTypeDefs: TRPCQueryProcedure<{
1450
+ input: {
1451
+ [x: string]: unknown;
1452
+ } & z.input<typeof coreBlocksCapability.methods.getTypeDefs.input>;
1453
+ output: z.infer<typeof coreBlocksCapability.methods.getTypeDefs.output>;
1454
+ meta: object;
1455
+ }>;
1456
+ }>>;
1393
1457
  cover: TRPCBuiltRouter<{
1394
1458
  ctx: TrpcContext;
1395
1459
  meta: object;
@@ -33,6 +33,7 @@ export { connectivityCapability } from '../capabilities/connectivity.cap.js';
33
33
  export { consumablesCapability } from '../capabilities/consumables.cap.js';
34
34
  export { contactCapability } from '../capabilities/contact.cap.js';
35
35
  export { controlCapability } from '../capabilities/control.cap.js';
36
+ export { coreBlocksCapability } from '../capabilities/core-blocks.cap.js';
36
37
  export { coverCapability } from '../capabilities/cover.cap.js';
37
38
  export { customModelRegistryCapability } from '../capabilities/custom-model-registry.cap.js';
38
39
  export { dataStoreProviderCapability } from '../capabilities/data-store-provider.cap.js';
@@ -178,6 +179,7 @@ export declare const CAPABILITY_NAMES: {
178
179
  readonly consumables: "consumables";
179
180
  readonly contact: "contact";
180
181
  readonly control: "control";
182
+ readonly coreBlocks: "core-blocks";
181
183
  readonly cover: "cover";
182
184
  readonly customModelRegistry: "custom-model-registry";
183
185
  readonly dataStoreProvider: "data-store-provider";
@@ -336,6 +338,7 @@ export interface CapabilityRouterMap<TRouter = unknown> {
336
338
  readonly consumables: TRouter;
337
339
  readonly contact: TRouter;
338
340
  readonly control: TRouter;
341
+ readonly coreBlocks: TRouter;
339
342
  readonly cover: TRouter;
340
343
  readonly customModelRegistry: TRouter;
341
344
  readonly dataStoreProvider: TRouter;
@@ -446,8 +449,8 @@ export interface CapabilityRouterMap<TRouter = unknown> {
446
449
  readonly zoneRules: TRouter;
447
450
  readonly zones: TRouter;
448
451
  }
449
- /** Capability names whose mode is `singleton` (121 caps). */
450
- 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", "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"];
452
+ /** Capability names whose mode is `singleton` (122 caps). */
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"];
451
454
  /** Union of singleton capability names (literal string union). */
452
455
  export type SingletonCapabilityName = typeof SINGLETON_CAPABILITY_NAMES[number];
453
456
  /** 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: 844 method paths across 118 capabilities.
9
+ * Coverage: 852 method paths across 119 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -9,6 +9,7 @@ import type { audioAnalyzerCapability } from '../capabilities/audio-analyzer.cap
9
9
  import type { audioCodecCapability } from '../capabilities/audio-codec.cap.js';
10
10
  import type { backupCapability } from '../capabilities/backup.cap.js';
11
11
  import type { brokerCapability } from '../capabilities/broker.cap.js';
12
+ import type { coreBlocksCapability } from '../capabilities/core-blocks.cap.js';
12
13
  import type { decoderCapability } from '../capabilities/decoder.cap.js';
13
14
  import type { deviceAdoptionCapability } from '../capabilities/device-adoption.cap.js';
14
15
  import type { deviceExportCapability } from '../capabilities/device-export.cap.js';
@@ -59,6 +60,7 @@ export interface SystemProxy {
59
60
  readonly audioCodec: Pick<InferProvider<typeof audioCodecCapability>, 'listSupportedCodecs' | 'canHandle' | 'createDecodeSession' | 'createEncodeSession' | 'closeSession' | 'pushEncodedFrame' | 'pullPcm' | 'pushPcm' | 'pullEncoded' | 'flushEncode' | 'listActiveSessions'>;
60
61
  readonly backup: Pick<InferProvider<typeof backupCapability>, 'listDestinations' | 'trigger' | 'list' | 'listLocations' | 'getEntries' | 'restore' | 'delete' | 'listArchives' | 'upsertDestinationPolicy' | 'previewSchedule' | 'listSchedules' | 'upsertSchedule' | 'deleteSchedule'>;
61
62
  readonly broker: Pick<InferProvider<typeof brokerCapability>, 'list' | 'get' | 'listProviders' | 'add' | 'remove' | 'testConnection' | 'getSettings' | 'setSettings' | 'getBrokerConfig' | 'getSettingsSchema' | 'testSettings' | 'publish' | 'subscribe' | 'unsubscribe' | 'getState' | 'getStatus'>;
63
+ readonly coreBlocks: Pick<InferProvider<typeof coreBlocksCapability>, 'list' | 'get' | 'create' | 'update' | 'delete' | 'setEnabled' | 'compile' | 'getTypeDefs'>;
62
64
  readonly decoder: Pick<InferProvider<typeof decoderCapability>, 'supportsCodec' | 'getInfo' | 'createSession' | 'destroySession' | 'pushPacket' | 'openStream' | 'pullFrames' | 'pullHandles' | 'getFrame' | 'getShmStats' | 'updateConfig' | 'getStats' | 'listActiveSessions' | 'reprobeHwaccel'>;
63
65
  readonly deviceAdoption: Pick<InferProvider<typeof deviceAdoptionCapability>, 'listCandidateFilters' | 'listCandidates' | 'getCandidate' | 'refresh' | 'adopt' | 'release' | 'resync'>;
64
66
  readonly deviceExport: Pick<InferProvider<typeof deviceExportCapability>, 'getStatus' | 'listSupportedDeviceKinds' | 'listExposedDevices' | 'exposeDevice' | 'unexposeDevice'>;