@camstack/types 1.2.118 → 1.2.120

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.
@@ -189,7 +189,65 @@ export declare abstract class BaseAddon<TConfig extends object = Record<string,
189
189
  protected globalSettingsSchema(_cap?: string): ConfigUISchema | null;
190
190
  /** Override to provide device-level settings UI schema. */
191
191
  protected deviceSettingsSchema(): ConfigUISchema | null;
192
+ /**
193
+ * INTEGRATION-LEVEL SETTINGS — declare which of this addon's global sections
194
+ * ARE the configuration of its integration.
195
+ *
196
+ * Return the `ConfigSection.id`s, from {@link globalSettingsSchema}, that an
197
+ * operator should find on the addon's integration page (System →
198
+ * Integrations → <name>) rather than only in the cluster-wide list of every
199
+ * addon. Empty (the default) means the addon has no integration-level
200
+ * settings and no such surface is offered — this is opt-in, because whether
201
+ * an addon's configuration IS its integration's configuration depends on the
202
+ * nature of the integration.
203
+ *
204
+ * WHAT THIS IS NOT. It is not a scope. The selected sections keep living in
205
+ * the ONE global schema, in the ONE addon store, written by the ONE
206
+ * `updateGlobalSettings` path. There is deliberately no
207
+ * `updateIntegrationSettings`: a second write path is how a surface acquires
208
+ * a second store key, and this repo has shipped that twice (`btmPath@hub`,
209
+ * D266). Selecting sections cannot introduce a key that selecting cannot.
210
+ *
211
+ * WHY IT IS A LIST OF SECTION IDS AND NOT A MARKER ON THE SECTION.
212
+ * `ConfigFieldBase` used to carry `scope?: 'device' | 'global'` and it was
213
+ * removed with the reason recorded at
214
+ * `packages/types/src/interfaces/config-ui.ts:249` — *"a field's scope is
215
+ * determined by WHICH schema it lives in, not by a field-level marker."* A
216
+ * marker sprinkled across sections also has to borrow a field that already
217
+ * means something else; borrowing `section.tab` put the literal word
218
+ * "integration" into an operator-facing tab bar, because `tab` means "how to
219
+ * GROUP this visually" and cannot also mean "where this lives" (D269
220
+ * supersedes D268). One declaration, in one place, next to the schema whose
221
+ * ids it names.
222
+ */
223
+ protected integrationSettingSections(): readonly string[];
192
224
  getGlobalSettings(overlay?: Record<string, unknown>, cap?: string, nodeId?: string): Promise<ConfigUISchemaWithValues | null>;
225
+ /**
226
+ * The integration-level view of this addon's settings: exactly the sections
227
+ * named by {@link integrationSettingSections}, hydrated from the SAME store
228
+ * `getGlobalSettings` reads, and narrowed to cluster-scoped fields.
229
+ *
230
+ * Returns `null` when the addon declared nothing — an addon that opts out has
231
+ * no integration settings surface at all, rather than an empty one that reads
232
+ * as a failed load.
233
+ *
234
+ * Three properties hold BY CONSTRUCTION, which is why they are here in core
235
+ * and not in whichever UI happens to render this:
236
+ *
237
+ * 1. **One key.** The payload is a SUBSET of the global schema, so a field
238
+ * shown here is the same field, with the same bare key, that the addon's
239
+ * own page shows. There is no integration-specific writer — callers save
240
+ * through `updateGlobalSettings` — so a second store key is unreachable,
241
+ * not merely discouraged.
242
+ * 2. **No node scope.** `perNode: true` fields are DROPPED. Their store key
243
+ * is `<key>@<nodeId>` and an integration is not a node; whichever node
244
+ * such a field silently picked would be a wrong answer for the operator
245
+ * who opened the page (D266).
246
+ * 3. **No silent typo.** A declared id that names no section throws. The
247
+ * alternative — skip it — turns a rename into a surface that quietly
248
+ * empties, which looks exactly like an addon with nothing to configure.
249
+ */
250
+ getIntegrationSettings(nodeId?: string): Promise<ConfigUISchemaWithValues | null>;
193
251
  /**
194
252
  * The raw addon store PROJECTED onto the target node's bare per-node keys:
195
253
  * every `perNode: true` field carries THAT node's scoped value on its bare
package/dist/addon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_event_category = require("./event-category-BaEgqJNv.js");
3
- const require_sleep = require("./sleep-9d8tJRbO.js");
3
+ const require_sleep = require("./sleep-DUxF5DdC.js");
4
4
  const require_err_msg = require("./err-msg-COpsHMw2.js");
5
5
  //#region src/generated/cap-input-defaults.ts
6
6
  /**
@@ -312,7 +312,7 @@ function materialise(defaults) {
312
312
  * barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
313
313
  * forked runner. See docs/decisions/adr-0028.md.
314
314
  *
315
- * Coverage: 19 collection caps, 32 array methods.
315
+ * Coverage: 20 collection caps, 33 array methods.
316
316
  */
317
317
  var COLLECTION_ARRAY_METHODS = Object.freeze({
318
318
  "addon-pages-source": ["listPages"],
@@ -323,6 +323,7 @@ var COLLECTION_ARRAY_METHODS = Object.freeze({
323
323
  "data-store-provider": ["histogram", "query"],
324
324
  "device-export": ["listExposedDevices", "listSupportedDeviceKinds"],
325
325
  "device-provider": ["discoverDevices", "getDevices"],
326
+ "failure-contribution": ["list"],
326
327
  "llm": [
327
328
  "getDefaults",
328
329
  "getUsage",
package/dist/addon.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as EventCategory } from "./event-category-BZL-fdNj.mjs";
2
- import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-Dolp38qx.mjs";
2
+ import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-C9C8EoK8.mjs";
3
3
  import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
4
4
  //#region src/generated/cap-input-defaults.ts
5
5
  /**
@@ -311,7 +311,7 @@ function materialise(defaults) {
311
311
  * barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
312
312
  * forked runner. See docs/decisions/adr-0028.md.
313
313
  *
314
- * Coverage: 19 collection caps, 32 array methods.
314
+ * Coverage: 20 collection caps, 33 array methods.
315
315
  */
316
316
  var COLLECTION_ARRAY_METHODS = Object.freeze({
317
317
  "addon-pages-source": ["listPages"],
@@ -322,6 +322,7 @@ var COLLECTION_ARRAY_METHODS = Object.freeze({
322
322
  "data-store-provider": ["histogram", "query"],
323
323
  "device-export": ["listExposedDevices", "listSupportedDeviceKinds"],
324
324
  "device-provider": ["discoverDevices", "getDevices"],
325
+ "failure-contribution": ["list"],
325
326
  "llm": [
326
327
  "getDefaults",
327
328
  "getUsage",
@@ -126,6 +126,35 @@ export declare const addonSettingsCapability: {
126
126
  }, z.core.$strip>, z.ZodObject<{
127
127
  success: z.ZodLiteral<true>;
128
128
  }, z.core.$strip>, "mutation">;
129
+ readonly getIntegrationSettings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
130
+ addonId: z.ZodString;
131
+ nodeId: z.ZodOptional<z.ZodString>;
132
+ }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
133
+ tabs: z.ZodOptional<z.ZodArray<z.ZodObject<{
134
+ id: z.ZodString;
135
+ label: z.ZodString;
136
+ icon: z.ZodString;
137
+ order: z.ZodOptional<z.ZodNumber>;
138
+ }, z.core.$strip>>>;
139
+ sections: z.ZodArray<z.ZodObject<{
140
+ id: z.ZodString;
141
+ title: z.ZodString;
142
+ description: z.ZodOptional<z.ZodString>;
143
+ style: z.ZodOptional<z.ZodEnum<{
144
+ card: "card";
145
+ accordion: "accordion";
146
+ }>>;
147
+ defaultCollapsed: z.ZodOptional<z.ZodBoolean>;
148
+ columns: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<3>, z.ZodLiteral<4>]>>;
149
+ tab: z.ZodOptional<z.ZodString>;
150
+ location: z.ZodOptional<z.ZodEnum<{
151
+ settings: "settings";
152
+ "top-tab": "top-tab";
153
+ }>>;
154
+ order: z.ZodOptional<z.ZodNumber>;
155
+ fields: z.ZodArray<z.ZodAny>;
156
+ }, z.core.$strip>>;
157
+ }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
129
158
  readonly getDeviceSettings: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
130
159
  addonId: z.ZodString;
131
160
  deviceId: z.ZodNumber;
@@ -61,9 +61,13 @@ export type AudioBackendChoice = (typeof AUDIO_BACKEND_CHOICES)[number]['value']
61
61
  /**
62
62
  * Shared shape of the audio-analyzer addon's global settings.
63
63
  * `audioBackend` = operator choice (wins); `probedBestAudioBackend`
64
- * = hint refreshed by `reprobeAudioEngine`. `selectedAudioModel`
65
- * replaces the orchestrator's legacy
66
- * `AgentPipelineSettings.audio.modelId`.
64
+ * = hint refreshed by `reprobeAudioEngine`.
65
+ *
66
+ * There is NO model id here. The backend IS the model: YAMNet ships one
67
+ * ONNX graph and Apple SoundAnalysis is a built-in with nothing swappable,
68
+ * so `createAudioPipeline` takes a backend and no model. A
69
+ * `selectedAudioModel` select shipped here until 2026-08-28 (D272) and
70
+ * reached inference on no path — it was a log field.
67
71
  *
68
72
  * NOTE — enable/disable is NOT stored here:
69
73
  * - per-device: `audio-analysis` wrapper cap + `setWrapperActive`
@@ -75,7 +79,6 @@ export type AudioBackendChoice = (typeof AUDIO_BACKEND_CHOICES)[number]['value']
75
79
  export interface AudioAnalyzerGlobalConfig {
76
80
  readonly audioBackend: AudioBackendChoice;
77
81
  readonly probedBestAudioBackend: string;
78
- readonly selectedAudioModel: string;
79
82
  }
80
83
  export declare const DEFAULT_AUDIO_ANALYZER_CONFIG: AudioAnalyzerGlobalConfig;
81
84
  export declare const audioAnalyzerCapability: {
@@ -0,0 +1,111 @@
1
+ /**
2
+ * `failure-contribution` — the capability an addon reports its OWN losses
3
+ * through, per camera, with the denominator attached. It stores nothing.
4
+ *
5
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
6
+ *
7
+ * `load-contribution` answers *what did this camera COST*. This answers *what
8
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
9
+ * copied: the contributor reports what it already knows, hub-main adds only
10
+ * `addonId`, nothing needs global knowledge, and there is no central list for
11
+ * somebody to forget to edit.
12
+ *
13
+ * They are not merged, because their invariants are opposites:
14
+ *
15
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
16
+ * claim a camera cost nothing, which is a measurement nobody made;
17
+ * - a `failure-contribution` zero is the **most valuable value on the
18
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
19
+ * and it is exactly what an absent entry cannot say.
20
+ *
21
+ * Putting a loss counter on a cost entry would also break the reconciliation
22
+ * that gives `load-contribution` its point: contributions are subtracted from
23
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
24
+ * has no process.
25
+ *
26
+ * ## Why not a log line, since the counters already exist
27
+ *
28
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
29
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
30
+ * ends in a log line, and a log line is the thing the operator asked to stop
31
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
32
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
33
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
34
+ * media blackout were both diagnosed. The counters stay; this is where they can
35
+ * be READ.
36
+ *
37
+ * ## The rate is served with its denominator or not at all
38
+ *
39
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
40
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
41
+ * than yesterday" and was **flat across twelve hours** once divided by the
42
+ * successes on the same path. A surface that publishes only the numerator
43
+ * reproduces that mistake on every read.
44
+ *
45
+ * ## Shape
46
+ *
47
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
48
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
49
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
50
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
51
+ * a forked runner's entries reach hub-main over transport that already exists.
52
+ * No new UDS message, no second registry (D3). The operator reads the assembled
53
+ * result through `system.getFailureContributions`.
54
+ */
55
+ import { z } from 'zod';
56
+ import { type InferProvider } from './capability-definition.js';
57
+ declare const FailureReasonCountSchema: z.ZodObject<{
58
+ reason: z.ZodString;
59
+ count: z.ZodNumber;
60
+ }, z.core.$strip>;
61
+ declare const FailureContributionSchema: z.ZodObject<{
62
+ family: z.ZodString;
63
+ deviceId: z.ZodNumber;
64
+ variant: z.ZodOptional<z.ZodString>;
65
+ sinceMs: z.ZodNumber;
66
+ atMs: z.ZodNumber;
67
+ attempts: z.ZodNumber;
68
+ succeeded: z.ZodNumber;
69
+ reasons: z.ZodReadonly<z.ZodArray<z.ZodObject<{
70
+ reason: z.ZodString;
71
+ count: z.ZodNumber;
72
+ }, z.core.$strip>>>;
73
+ }, z.core.$strip>;
74
+ export type FailureContribution = z.infer<typeof FailureContributionSchema>;
75
+ export declare const failureContributionCapability: {
76
+ readonly name: "failure-contribution";
77
+ readonly scope: "system";
78
+ readonly mode: "collection";
79
+ readonly internal: true;
80
+ readonly methods: {
81
+ /**
82
+ * This addon's per-camera failure counters, read live from bounded in-RAM
83
+ * state it already keeps. Inert: no persistence, no sampling, no timer.
84
+ *
85
+ * READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
86
+ * consumer that wants a rate differences two reads. A draining read would
87
+ * make two operators with the page open each destroy half of the other's
88
+ * numbers, and `load-contribution` already settled the same question the
89
+ * same way for `cpuSeconds`.
90
+ */
91
+ readonly list: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
92
+ family: z.ZodString;
93
+ deviceId: z.ZodNumber;
94
+ variant: z.ZodOptional<z.ZodString>;
95
+ sinceMs: z.ZodNumber;
96
+ atMs: z.ZodNumber;
97
+ attempts: z.ZodNumber;
98
+ succeeded: z.ZodNumber;
99
+ reasons: z.ZodReadonly<z.ZodArray<z.ZodObject<{
100
+ reason: z.ZodString;
101
+ count: z.ZodNumber;
102
+ }, z.core.$strip>>>;
103
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
104
+ };
105
+ /** In-process only — enumerated through `addons.listCapabilityProviders`. */
106
+ readonly mount: {
107
+ readonly kind: "skip";
108
+ };
109
+ };
110
+ export type IFailureContributionProvider = InferProvider<typeof failureContributionCapability>;
111
+ export { FailureContributionSchema, FailureReasonCountSchema };
@@ -62,6 +62,8 @@ export { type LlmErrorCode, LlmErrorCodeSchema, type LlmGenerateBaseInput, LlmGe
62
62
  export type { ILogChannelsProvider, LogChannelApplyResult } from './log-channels.cap.js';
63
63
  export { LogChannelApplyResultSchema, logChannelsCapability } from './log-channels.cap.js';
64
64
  export { LogEntrySchema, LogLevelSchema, logDestinationCapability } from './log-destination.cap.js';
65
+ export type { FailureContribution, IFailureContributionProvider, } from './failure-contribution.cap.js';
66
+ export { FailureContributionSchema, FailureReasonCountSchema, failureContributionCapability, } from './failure-contribution.cap.js';
65
67
  export type { ILoadContributionProvider, LoadContribution, LoadContributionAttribution, LoadContributionRole, } from './load-contribution.cap.js';
66
68
  export { LOAD_CONTRIBUTION_ATTRIBUTIONS, LOAD_CONTRIBUTION_ROLES, LoadContributionSchema, loadContributionCapability, } from './load-contribution.cap.js';
67
69
  export type { ILoginMethodProvider, LoginMethodContribution, LoginStage, PasskeyLoginMethod, RedirectLoginMethod, WidgetLoginMethod, } from './login-method.cap.js';
@@ -193,7 +195,7 @@ export { type CamStreamDescriptor, CamStreamDescriptorSchema, type IStreamCatalo
193
195
  export { type IStreamParamsProvider, type StreamParamsOptions, StreamParamsOptionsSchema, type StreamParamsStatus, StreamParamsStatusSchema, type StreamProfile, StreamProfileConfigSchema, StreamProfileOptionsSchema, type StreamProfilePatch, StreamProfilePatchSchema, StreamProfileSchema, streamParamsCapability, } from './stream-params.cap.js';
194
196
  export { buildStreamParamsConfigSchema, parseStreamParamsFormPatch, STREAM_PROFILE_META, type StreamProfileMeta, } from './stream-params-config-schema.js';
195
197
  export { type ISwitchProvider, type SwitchStatus, SwitchStatusSchema, switchCapability, } from './switch.cap.js';
196
- export { type DiagnosticId, DiagnosticIdSchema, type DiagnosticWindow, type DiagnosticWindowPatch, DiagnosticWindowPatchSchema, DiagnosticWindowSchema, FeatureManifestSchema, type GetLoggingSettingsInput, GetLoggingSettingsInputSchema, HealthStatusSchema, type ISystemProvider, type LogChannelWindowPatch, LogChannelWindowPatchSchema, type LogChannelWindowState, LogChannelWindowStateSchema, type LoggingEffective, LoggingEffectiveSchema, type LoggingExplicit, LoggingExplicitSchema, type LoggingLevelLayer, LoggingLevelLayerSchema, type LoggingLevelSource, LoggingLevelSourceSchema, type LoggingScopeKind, LoggingScopeKindSchema, type LoggingSettingsPatch, LoggingSettingsPatchSchema, type LoggingSettingsState, LoggingSettingsStateSchema, NetworkAddressSchema, type ReportedLoadContribution, ReportedLoadContributionSchema, type RequestCensusGroup, RequestCensusGroupSchema, type RequestCensusProcedure, RequestCensusProcedureSchema, type RequestCensusSnapshot, RequestCensusSnapshotSchema, type RequestCensusStatus, RequestCensusStatusSchema, type SetLoggingSettingsInput, SetLoggingSettingsInputSchema, type SetSiteLocationInput, SetSiteLocationInputSchema, type SiteLocation, SiteLocationSchema, type SiteLocationSource, SiteLocationSourceSchema, type SiteLocationStatus, SiteLocationStatusSchema, systemCapability, type TransportPlane, type TransportPlaneCounts, TransportPlaneCountsSchema, TransportPlaneSchema, } from './system.cap.js';
198
+ export { type DiagnosticId, DiagnosticIdSchema, type DiagnosticWindow, type DiagnosticWindowPatch, DiagnosticWindowPatchSchema, DiagnosticWindowSchema, FeatureManifestSchema, type GetLoggingSettingsInput, GetLoggingSettingsInputSchema, HealthStatusSchema, type ISystemProvider, type LogChannelWindowPatch, LogChannelWindowPatchSchema, type LogChannelWindowState, LogChannelWindowStateSchema, type LoggingEffective, LoggingEffectiveSchema, type LoggingExplicit, LoggingExplicitSchema, type LoggingLevelLayer, LoggingLevelLayerSchema, type LoggingLevelSource, LoggingLevelSourceSchema, type LoggingScopeKind, LoggingScopeKindSchema, type LoggingSettingsPatch, LoggingSettingsPatchSchema, type LoggingSettingsState, LoggingSettingsStateSchema, NetworkAddressSchema, type ReportedFailureContribution, ReportedFailureContributionSchema, type ReportedLoadContribution, ReportedLoadContributionSchema, type RequestCensusGroup, RequestCensusGroupSchema, type RequestCensusProcedure, RequestCensusProcedureSchema, type RequestCensusSnapshot, RequestCensusSnapshotSchema, type RequestCensusStatus, RequestCensusStatusSchema, type SetLoggingSettingsInput, SetLoggingSettingsInputSchema, type SetSiteLocationInput, SetSiteLocationInputSchema, type SiteLocation, SiteLocationSchema, type SiteLocationSource, SiteLocationSourceSchema, type SiteLocationStatus, SiteLocationStatusSchema, systemCapability, type TransportPlane, type TransportPlaneCounts, TransportPlaneCountsSchema, TransportPlaneSchema, } from './system.cap.js';
197
199
  export { type ITamperProvider, type TamperStatus, TamperStatusSchema, tamperCapability, } from './tamper.cap.js';
198
200
  export { type ITemperatureSensorProvider, type TemperatureSensorStatus, TemperatureSensorStatusSchema, temperatureSensorCapability, } from './temperature-sensor.cap.js';
199
201
  export { type IToastProvider, ToastSchema, toastCapability } from './toast.cap.js';
@@ -282,6 +284,7 @@ import type { llmRuntimeCapability } from './llm-runtime.cap.js';
282
284
  import type { localNetworkCapability } from './local-network.cap.js';
283
285
  import type { lockControlCapability } from './lock-control.cap.js';
284
286
  import type { logChannelsCapability } from './log-channels.cap.js';
287
+ import type { failureContributionCapability } from './failure-contribution.cap.js';
285
288
  import type { loadContributionCapability } from './load-contribution.cap.js';
286
289
  import type { logDestinationCapability } from './log-destination.cap.js';
287
290
  import type { loginMethodCapability } from './login-method.cap.js';
@@ -359,6 +362,6 @@ import type { webrtcSessionCapability } from './webrtc-session.cap.js';
359
362
  import type { zoneAnalyticsCapability } from './zone-analytics.cap.js';
360
363
  import type { zoneRulesCapability } from './zone-rules.cap.js';
361
364
  import type { zonesCapability } from './zones.cap.js';
362
- type AnyCapability = typeof addonSettingsCapability | typeof alertsCapability | typeof storageCapability | typeof storageMigrationCapability | typeof storageProviderCapability | typeof storageEvictableCapability | typeof filesystemBrowseCapability | typeof backupCapability | typeof terminalSessionCapability | typeof settingsStoreCapability | typeof dataStoreProviderCapability | typeof logChannelsCapability | typeof logDestinationCapability | typeof loadContributionCapability | typeof adminUiCapability | typeof viewerUiCapability | typeof ssoBridgeCapability | typeof userPasskeysCapability | typeof smtpProviderCapability | typeof mqttBrokerCapability | typeof brokerCapability | typeof deviceAdoptionCapability | typeof deviceExportCapability | typeof addonPagesCapability | typeof addonPagesSourceCapability | typeof addonWidgetsCapability | typeof addonWidgetsSourceCapability | typeof customModelRegistryCapability | typeof modelDistributorCapability | typeof modelConvertCapability | typeof addonRoutesCapability | typeof streamBrokerCapability | typeof decoderCapability | typeof webrtcSessionCapability | typeof cameraStreamsCapability | typeof motionDetectionCapability | typeof pipelineExecutorCapability | typeof detectionPipelineCapability | typeof cameraPipelineConfigCapability | typeof pipelineRunnerCapability | typeof pipelineOrchestratorCapability | typeof audioAnalyzerCapability | typeof audioAnalysisCapability | typeof audioCodecCapability | typeof embeddingEncoderCapability | typeof vectorStoreCapability | typeof deviceProviderCapability | typeof deviceManagerCapability | typeof deviceStateCapability | typeof authProviderCapability | typeof loginMethodCapability | typeof networkAccessCapability | typeof turnProviderCapability | typeof snapshotCapability | typeof llmCapability | typeof llmRuntimeCapability | typeof notificationOutputCapability | typeof coreBlocksCapability | typeof notificationRulesCapability | typeof pipelineAnalyticsCapability | typeof metricsProviderCapability | typeof ptzCapability | typeof ptzAutotrackCapability | typeof consumablesCapability | typeof connectionTestCapability | 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 | typeof osdCapability | typeof osdManagerCapability | typeof accessoriesCapability | typeof batteryCapability | typeof buttonCapability | typeof cameraCredentialsCapability | typeof deviceStatusCapability | typeof doorbellCapability | typeof eventEmitterCapability | typeof faceGalleryCapability | typeof featureProbeCapability | typeof intercomCapability | typeof nativeObjectDetectionCapability | typeof plateGalleryCapability | typeof switchCapability | typeof updateCapability | typeof videoclipsCapability;
365
+ type AnyCapability = typeof addonSettingsCapability | typeof alertsCapability | typeof storageCapability | typeof storageMigrationCapability | typeof storageProviderCapability | typeof storageEvictableCapability | typeof filesystemBrowseCapability | typeof backupCapability | typeof terminalSessionCapability | typeof settingsStoreCapability | typeof dataStoreProviderCapability | typeof logChannelsCapability | typeof logDestinationCapability | typeof loadContributionCapability | typeof failureContributionCapability | typeof adminUiCapability | typeof viewerUiCapability | typeof ssoBridgeCapability | typeof userPasskeysCapability | typeof smtpProviderCapability | typeof mqttBrokerCapability | typeof brokerCapability | typeof deviceAdoptionCapability | typeof deviceExportCapability | typeof addonPagesCapability | typeof addonPagesSourceCapability | typeof addonWidgetsCapability | typeof addonWidgetsSourceCapability | typeof customModelRegistryCapability | typeof modelDistributorCapability | typeof modelConvertCapability | typeof addonRoutesCapability | typeof streamBrokerCapability | typeof decoderCapability | typeof webrtcSessionCapability | typeof cameraStreamsCapability | typeof motionDetectionCapability | typeof pipelineExecutorCapability | typeof detectionPipelineCapability | typeof cameraPipelineConfigCapability | typeof pipelineRunnerCapability | typeof pipelineOrchestratorCapability | typeof audioAnalyzerCapability | typeof audioAnalysisCapability | typeof audioCodecCapability | typeof embeddingEncoderCapability | typeof vectorStoreCapability | typeof deviceProviderCapability | typeof deviceManagerCapability | typeof deviceStateCapability | typeof authProviderCapability | typeof loginMethodCapability | typeof networkAccessCapability | typeof turnProviderCapability | typeof snapshotCapability | typeof llmCapability | typeof llmRuntimeCapability | typeof notificationOutputCapability | typeof coreBlocksCapability | typeof notificationRulesCapability | typeof pipelineAnalyticsCapability | typeof metricsProviderCapability | typeof ptzCapability | typeof ptzAutotrackCapability | typeof consumablesCapability | typeof connectionTestCapability | 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 | typeof osdCapability | typeof osdManagerCapability | typeof accessoriesCapability | typeof batteryCapability | typeof buttonCapability | typeof cameraCredentialsCapability | typeof deviceStatusCapability | typeof doorbellCapability | typeof eventEmitterCapability | typeof faceGalleryCapability | typeof featureProbeCapability | typeof intercomCapability | typeof nativeObjectDetectionCapability | typeof plateGalleryCapability | typeof switchCapability | typeof updateCapability | typeof videoclipsCapability;
363
366
  export type CapabilityName = AnyCapability['name'];
364
367
  export type ITypedReadinessRegistry = IReadinessRegistry<CapabilityName>;
@@ -437,6 +437,7 @@ declare const TrackSchema: z.ZodObject<{
437
437
  hasFace: z.ZodOptional<z.ZodBoolean>;
438
438
  hasEmbeddedFace: z.ZodOptional<z.ZodBoolean>;
439
439
  hasRider: z.ZodOptional<z.ZodBoolean>;
440
+ previewMissReason: z.ZodOptional<z.ZodString>;
440
441
  label: z.ZodOptional<z.ZodString>;
441
442
  labelScore: z.ZodOptional<z.ZodNumber>;
442
443
  labelMeta: z.ZodOptional<z.ZodObject<{
@@ -1090,6 +1091,7 @@ declare const RecentTracksPageSchema: z.ZodObject<{
1090
1091
  hasFace: z.ZodOptional<z.ZodBoolean>;
1091
1092
  hasEmbeddedFace: z.ZodOptional<z.ZodBoolean>;
1092
1093
  hasRider: z.ZodOptional<z.ZodBoolean>;
1094
+ previewMissReason: z.ZodOptional<z.ZodString>;
1093
1095
  label: z.ZodOptional<z.ZodString>;
1094
1096
  labelScore: z.ZodOptional<z.ZodNumber>;
1095
1097
  labelMeta: z.ZodOptional<z.ZodObject<{
@@ -1451,6 +1453,7 @@ export declare const pipelineAnalyticsCapability: {
1451
1453
  hasFace: z.ZodOptional<z.ZodBoolean>;
1452
1454
  hasEmbeddedFace: z.ZodOptional<z.ZodBoolean>;
1453
1455
  hasRider: z.ZodOptional<z.ZodBoolean>;
1456
+ previewMissReason: z.ZodOptional<z.ZodString>;
1454
1457
  label: z.ZodOptional<z.ZodString>;
1455
1458
  labelScore: z.ZodOptional<z.ZodNumber>;
1456
1459
  labelMeta: z.ZodOptional<z.ZodObject<{
@@ -1548,6 +1551,7 @@ export declare const pipelineAnalyticsCapability: {
1548
1551
  hasFace: z.ZodOptional<z.ZodBoolean>;
1549
1552
  hasEmbeddedFace: z.ZodOptional<z.ZodBoolean>;
1550
1553
  hasRider: z.ZodOptional<z.ZodBoolean>;
1554
+ previewMissReason: z.ZodOptional<z.ZodString>;
1551
1555
  label: z.ZodOptional<z.ZodString>;
1552
1556
  labelScore: z.ZodOptional<z.ZodNumber>;
1553
1557
  labelMeta: z.ZodOptional<z.ZodObject<{
@@ -1668,6 +1672,7 @@ export declare const pipelineAnalyticsCapability: {
1668
1672
  hasFace: z.ZodOptional<z.ZodBoolean>;
1669
1673
  hasEmbeddedFace: z.ZodOptional<z.ZodBoolean>;
1670
1674
  hasRider: z.ZodOptional<z.ZodBoolean>;
1675
+ previewMissReason: z.ZodOptional<z.ZodString>;
1671
1676
  label: z.ZodOptional<z.ZodString>;
1672
1677
  labelScore: z.ZodOptional<z.ZodNumber>;
1673
1678
  labelMeta: z.ZodOptional<z.ZodObject<{
@@ -1784,6 +1789,7 @@ export declare const pipelineAnalyticsCapability: {
1784
1789
  hasFace: z.ZodOptional<z.ZodBoolean>;
1785
1790
  hasEmbeddedFace: z.ZodOptional<z.ZodBoolean>;
1786
1791
  hasRider: z.ZodOptional<z.ZodBoolean>;
1792
+ previewMissReason: z.ZodOptional<z.ZodString>;
1787
1793
  label: z.ZodOptional<z.ZodString>;
1788
1794
  labelScore: z.ZodOptional<z.ZodNumber>;
1789
1795
  labelMeta: z.ZodOptional<z.ZodObject<{
@@ -508,6 +508,27 @@ declare const ReportedLoadContributionSchema: z.ZodObject<{
508
508
  addonId: z.ZodString;
509
509
  }, z.core.$strip>;
510
510
  export type ReportedLoadContribution = z.infer<typeof ReportedLoadContributionSchema>;
511
+ /**
512
+ * One per-camera failure counter, plus WHO reported it.
513
+ *
514
+ * Same rule as {@link ReportedLoadContributionSchema}: `addonId` is stamped by
515
+ * the hub as it enumerates providers, never by the contributor.
516
+ */
517
+ declare const ReportedFailureContributionSchema: z.ZodObject<{
518
+ family: z.ZodString;
519
+ deviceId: z.ZodNumber;
520
+ variant: z.ZodOptional<z.ZodString>;
521
+ sinceMs: z.ZodNumber;
522
+ atMs: z.ZodNumber;
523
+ attempts: z.ZodNumber;
524
+ succeeded: z.ZodNumber;
525
+ reasons: z.ZodReadonly<z.ZodArray<z.ZodObject<{
526
+ reason: z.ZodString;
527
+ count: z.ZodNumber;
528
+ }, z.core.$strip>>>;
529
+ addonId: z.ZodString;
530
+ }, z.core.$strip>;
531
+ export type ReportedFailureContribution = z.infer<typeof ReportedFailureContributionSchema>;
511
532
  declare const GetLoggingSettingsInputSchema: z.ZodObject<{
512
533
  scopeNodeId: z.ZodOptional<z.ZodString>;
513
534
  scopeComponent: z.ZodOptional<z.ZodString>;
@@ -805,6 +826,41 @@ export declare const systemCapability: {
805
826
  rssBytes: z.ZodOptional<z.ZodNumber>;
806
827
  addonId: z.ZodString;
807
828
  }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
829
+ /**
830
+ * Every `failure-contribution` an addon on this cluster reports — per
831
+ * camera, per reason, **with the denominator attached**.
832
+ *
833
+ * This is the surface the operator asked for on 2026-08-28 (*"possiamo
834
+ * armare questi errori intanto? Così al prossimo giro ricontrolliamo tutti
835
+ * questi punti"*). Before it, four live failure modes could only be counted
836
+ * by grepping Loki and hand-correlating timestamps, which is exactly how a
837
+ * 22% thumbnail gap and a 3-hour media blackout were diagnosed — twice.
838
+ *
839
+ * Read it as a RATIO, never as a count. `attempts` is on every entry
840
+ * because the count on its own lies: `enrichment crop native miss` read as
841
+ * "35x worse than yesterday" and was flat across twelve hours once divided
842
+ * by the successes on the same path.
843
+ *
844
+ * The counters are CUMULATIVE since each entry's `sinceMs`. Reading does
845
+ * not reset them, and `sinceMs` changing means the reporting runner
846
+ * respawned — a consumer differencing two reads drops that interval.
847
+ *
848
+ * Admin-only: the rows name cameras and the paths that fail on them.
849
+ */
850
+ readonly getFailureContributions: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
851
+ family: z.ZodString;
852
+ deviceId: z.ZodNumber;
853
+ variant: z.ZodOptional<z.ZodString>;
854
+ sinceMs: z.ZodNumber;
855
+ atMs: z.ZodNumber;
856
+ attempts: z.ZodNumber;
857
+ succeeded: z.ZodNumber;
858
+ reasons: z.ZodReadonly<z.ZodArray<z.ZodObject<{
859
+ reason: z.ZodString;
860
+ count: z.ZodNumber;
861
+ }, z.core.$strip>>>;
862
+ addonId: z.ZodString;
863
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
808
864
  /**
809
865
  * The logging settings document — levels and armed diagnostics — resolved
810
866
  * for `nodeId`, or for the cluster when `nodeId` is absent.
@@ -1002,4 +1058,4 @@ export type SiteLocation = z.infer<typeof SiteLocationSchema>;
1002
1058
  export type SiteLocationSource = z.infer<typeof SiteLocationSourceSchema>;
1003
1059
  export type SiteLocationStatus = z.infer<typeof SiteLocationStatusSchema>;
1004
1060
  export type SetSiteLocationInput = z.infer<typeof SetSiteLocationInputSchema>;
1005
- export { DiagnosticIdSchema, DiagnosticWindowPatchSchema, DiagnosticWindowSchema, FeatureManifestSchema, GetLoggingSettingsInputSchema, HealthStatusSchema, LoggingEffectiveSchema, LoggingExplicitSchema, LoggingLevelLayerSchema, LoggingLevelSourceSchema, LoggingScopeKindSchema, LoggingSettingsPatchSchema, LoggingSettingsStateSchema, LogChannelWindowPatchSchema, LogChannelWindowStateSchema, LogLevelSchema, NetworkAddressSchema, ReportedLoadContributionSchema, RequestCensusGroupSchema, RequestCensusProcedureSchema, RequestCensusSnapshotSchema, RequestCensusStatusSchema, SetLoggingSettingsInputSchema, SetSiteLocationInputSchema, SiteLocationSchema, SiteLocationSourceSchema, SiteLocationStatusSchema, TransportPlaneCountsSchema, TransportPlaneSchema, };
1061
+ export { DiagnosticIdSchema, DiagnosticWindowPatchSchema, DiagnosticWindowSchema, FeatureManifestSchema, GetLoggingSettingsInputSchema, HealthStatusSchema, LoggingEffectiveSchema, LoggingExplicitSchema, LoggingLevelLayerSchema, LoggingLevelSourceSchema, LoggingScopeKindSchema, LoggingSettingsPatchSchema, LoggingSettingsStateSchema, LogChannelWindowPatchSchema, LogChannelWindowStateSchema, LogLevelSchema, NetworkAddressSchema, ReportedFailureContributionSchema, ReportedLoadContributionSchema, RequestCensusGroupSchema, RequestCensusProcedureSchema, RequestCensusSnapshotSchema, RequestCensusStatusSchema, SetLoggingSettingsInputSchema, SetSiteLocationInputSchema, SiteLocationSchema, SiteLocationSourceSchema, SiteLocationStatusSchema, TransportPlaneCountsSchema, TransportPlaneSchema, };
@@ -45,6 +45,7 @@ import type { deviceStateCapability } from '../capabilities/device-state.cap.js'
45
45
  import type { embeddingEncoderCapability } from '../capabilities/embedding-encoder.cap.js';
46
46
  import type { eventsCapability } from '../capabilities/events.cap.js';
47
47
  import type { faceGalleryCapability } from '../capabilities/face-gallery.cap.js';
48
+ import type { failureContributionCapability } from '../capabilities/failure-contribution.cap.js';
48
49
  import type { fanControlCapability } from '../capabilities/fan-control.cap.js';
49
50
  import type { filesystemBrowseCapability } from '../capabilities/filesystem-browse.cap.js';
50
51
  import type { humidifierCapability } from '../capabilities/humidifier.cap.js';
@@ -209,6 +210,13 @@ export type AppRouter = TrpcCoreRouter<{
209
210
  output: z.infer<typeof addonSettingsCapability.methods.updateGlobalSettings.output>;
210
211
  meta: object;
211
212
  }>;
213
+ getIntegrationSettings: TRPCQueryProcedure<{
214
+ input: {
215
+ [x: string]: unknown;
216
+ } & z.input<typeof addonSettingsCapability.methods.getIntegrationSettings.input>;
217
+ output: z.infer<typeof addonSettingsCapability.methods.getIntegrationSettings.output>;
218
+ meta: object;
219
+ }>;
212
220
  getDeviceSettings: TRPCQueryProcedure<{
213
221
  input: {
214
222
  [x: string]: unknown;
@@ -2998,6 +3006,21 @@ export type AppRouter = TrpcCoreRouter<{
2998
3006
  meta: object;
2999
3007
  }>;
3000
3008
  }>>;
3009
+ failureContribution: TRPCBuiltRouter<{
3010
+ ctx: TrpcContext;
3011
+ meta: object;
3012
+ errorShape: AugmentedErrorShape;
3013
+ transformer: true;
3014
+ }, TRPCDecorateCreateRouterOptions<{
3015
+ list: TRPCQueryProcedure<{
3016
+ input: {
3017
+ nodeId?: string | undefined;
3018
+ addonId?: string | undefined;
3019
+ } | undefined;
3020
+ output: z.infer<typeof failureContributionCapability.methods.list.output>;
3021
+ meta: object;
3022
+ }>;
3023
+ }>>;
3001
3024
  fanControl: TRPCBuiltRouter<{
3002
3025
  ctx: TrpcContext;
3003
3026
  meta: object;
@@ -7772,6 +7795,13 @@ export type AppRouter = TrpcCoreRouter<{
7772
7795
  output: z.infer<typeof systemCapability.methods.getLoadContributions.output>;
7773
7796
  meta: object;
7774
7797
  }>;
7798
+ getFailureContributions: TRPCQueryProcedure<{
7799
+ input: {
7800
+ nodeId?: string | undefined;
7801
+ } | undefined;
7802
+ output: z.infer<typeof systemCapability.methods.getFailureContributions.output>;
7803
+ meta: object;
7804
+ }>;
7775
7805
  getLoggingSettings: TRPCQueryProcedure<{
7776
7806
  input: {
7777
7807
  [x: string]: unknown;
@@ -55,6 +55,7 @@ export { enumSensorCapability } from '../capabilities/enum-sensor.cap.js';
55
55
  export { eventEmitterCapability } from '../capabilities/event-emitter.cap.js';
56
56
  export { eventsCapability } from '../capabilities/events.cap.js';
57
57
  export { faceGalleryCapability } from '../capabilities/face-gallery.cap.js';
58
+ export { failureContributionCapability } from '../capabilities/failure-contribution.cap.js';
58
59
  export { fanControlCapability } from '../capabilities/fan-control.cap.js';
59
60
  export { featureProbeCapability } from '../capabilities/feature-probe.cap.js';
60
61
  export { filesystemBrowseCapability } from '../capabilities/filesystem-browse.cap.js';
@@ -207,6 +208,7 @@ export declare const CAPABILITY_NAMES: {
207
208
  readonly eventEmitter: "event-emitter";
208
209
  readonly events: "events";
209
210
  readonly faceGallery: "face-gallery";
211
+ readonly failureContribution: "failure-contribution";
210
212
  readonly fanControl: "fan-control";
211
213
  readonly featureProbe: "feature-probe";
212
214
  readonly filesystemBrowse: "filesystem-browse";
@@ -372,6 +374,7 @@ export interface CapabilityRouterMap<TRouter = unknown> {
372
374
  readonly eventEmitter: TRouter;
373
375
  readonly events: TRouter;
374
376
  readonly faceGallery: TRouter;
377
+ readonly failureContribution: TRouter;
375
378
  readonly fanControl: TRouter;
376
379
  readonly featureProbe: TRouter;
377
380
  readonly filesystemBrowse: TRouter;
@@ -471,8 +474,8 @@ export interface CapabilityRouterMap<TRouter = unknown> {
471
474
  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", "osd-manager", "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", "recording-export", "scene-monitor", "script-runner", "server-management", "settings-store", "smoke", "snapshot", "sso-bridge", "storage", "storage-migration", "stream-broker", "stream-catalog", "stream-params", "switch", "system", "tamper", "temperature-sensor", "terminal-session", "toast", "update", "user-management", "vacuum-control", "valve", "vector-store", "vibration", "videoclips", "viewer-ui", "water-heater", "weather", "webrtc-session", "zone-analytics", "zone-rules", "zones"];
472
475
  /** Union of singleton capability names (literal string union). */
473
476
  export type SingletonCapabilityName = typeof SINGLETON_CAPABILITY_NAMES[number];
474
- /** Capability names whose mode is `collection` (26 caps). */
475
- export declare const COLLECTION_CAPABILITY_NAMES: readonly ["addon-pages-source", "addon-routes", "addon-widgets-source", "auth-provider", "broker", "connection-test", "custom-model-registry", "data-store-provider", "device-export", "device-provider", "embedding-encoder", "llm", "load-contribution", "log-channels", "log-destination", "login-method", "mesh-network", "mqtt-broker", "network-access", "notification-output", "oauth-integration", "smtp-provider", "storage-evictable", "storage-provider", "turn-provider", "user-passkeys"];
477
+ /** Capability names whose mode is `collection` (27 caps). */
478
+ export declare const COLLECTION_CAPABILITY_NAMES: readonly ["addon-pages-source", "addon-routes", "addon-widgets-source", "auth-provider", "broker", "connection-test", "custom-model-registry", "data-store-provider", "device-export", "device-provider", "embedding-encoder", "failure-contribution", "llm", "load-contribution", "log-channels", "log-destination", "login-method", "mesh-network", "mqtt-broker", "network-access", "notification-output", "oauth-integration", "smtp-provider", "storage-evictable", "storage-provider", "turn-provider", "user-passkeys"];
476
479
  /** Union of collection capability names (literal string union). */
477
480
  export type CollectionCapabilityName = typeof COLLECTION_CAPABILITY_NAMES[number];
478
481
  /** Capability mode lookup at runtime — mirrors the `.cap.ts` definitions. */
@@ -8,7 +8,7 @@
8
8
  * barrel (`ALL_CAPABILITY_DEFINITIONS`), which would cost ~144MB RSS per
9
9
  * forked runner. See docs/decisions/adr-0028.md.
10
10
  *
11
- * Coverage: 19 collection caps, 32 array methods.
11
+ * Coverage: 20 collection caps, 33 array methods.
12
12
  */
13
13
  export declare const COLLECTION_ARRAY_METHODS: Readonly<Record<string, readonly string[]>>;
14
14
  /**
@@ -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: 975 method paths across 125 capabilities.
9
+ * Coverage: 978 method paths across 126 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -56,7 +56,7 @@ import type { userManagementCapability } from '../capabilities/user-management.c
56
56
  export interface SystemProxy {
57
57
  readonly addonPages: Pick<InferProvider<typeof addonPagesCapability>, 'listPages'>;
58
58
  readonly addons: Pick<InferProvider<typeof addonsCapability>, 'list' | 'getLogs' | 'listPackages' | 'installPackage' | 'installFromWorkspace' | 'isWorkspaceAvailable' | 'listWorkspacePackages' | 'uninstallPackage' | 'reloadPackages' | 'searchAvailable' | 'listUpdates' | 'updatePackage' | 'rollbackPackage' | 'forceRefresh' | 'restartServer' | 'getLastRestart' | 'listFrameworkPackages' | 'listCapabilityProviders' | 'setCapabilityProviderEnabled' | 'getVersions' | 'restartAddon' | 'retryLoad' | 'getAutoUpdateSettings' | 'setAutoUpdateSettings' | 'getAddonAutoUpdate' | 'setAddonAutoUpdate' | 'applyAutoUpdateToAll' | 'custom' | 'startJob' | 'getJob' | 'listJobs' | 'cancelJob' | 'onAddonLogs'>;
59
- readonly addonSettings: Pick<InferProvider<typeof addonSettingsCapability>, 'getGlobalSettings' | 'updateGlobalSettings'>;
59
+ readonly addonSettings: Pick<InferProvider<typeof addonSettingsCapability>, 'getGlobalSettings' | 'updateGlobalSettings' | 'getIntegrationSettings'>;
60
60
  readonly addonWidgets: Pick<InferProvider<typeof addonWidgetsCapability>, 'listWidgets'>;
61
61
  readonly alerts: Pick<InferProvider<typeof alertsCapability>, 'emit' | 'update' | 'list' | 'getUnreadCount' | 'markRead' | 'markAllRead' | 'dismiss'>;
62
62
  readonly audioAnalyzer: Pick<InferProvider<typeof audioAnalyzerCapability>, 'analyseChunk' | 'classify' | 'isReady' | 'dispose' | 'reprobeAudioEngine'>;
@@ -94,7 +94,7 @@ export interface SystemProxy {
94
94
  readonly storage: Pick<InferProvider<typeof storageCapability>, 'resolve' | 'write' | 'read' | 'exists' | 'list' | 'delete' | 'getAvailableSpace' | 'beginUpload' | 'writeChunk' | 'finalizeUpload' | 'abortUpload' | 'beginDownload' | 'readChunk' | 'endDownload' | 'listLocations' | 'getDefaultLocation' | 'listLocationDeclarations' | 'upsertLocation' | 'deleteLocation' | 'testLocation' | 'listProviders' | 'testConfig'>;
95
95
  readonly storageMigration: Pick<InferProvider<typeof storageMigrationCapability>, 'plan' | 'start' | 'status' | 'cancel'>;
96
96
  readonly streamBroker: Pick<InferProvider<typeof streamBrokerCapability>, 'fetchEventMedia' | 'listAllCameraStreams' | 'listAllProfileSlots' | 'getBrokerStats' | 'probeStream' | 'listClients' | 'killClient' | 'getStreamUrl' | 'getStreamWithCodec' | 'releaseStreamWithCodec' | 'acquireEgressTranscode' | 'releaseEgressTranscode' | 'subscribeAudioChunks' | 'pullAudioChunks' | 'unsubscribeAudioChunks' | 'subscribeFrames' | 'pullFrameHandles' | 'unsubscribeFrames' | 'setPreBufferDuration' | 'getPreBufferInfo' | 'getRtspPort' | 'getAllRtspEntries' | 'getRtspEntry' | 'regenerateRtspToken' | 'setRtspEnabled' | 'isRtspEnabled'>;
97
- readonly system: Pick<InferProvider<typeof systemCapability>, 'info' | 'health' | 'featureFlags' | 'networkAddresses' | 'getRetentionConfig' | 'setRetentionConfig' | 'forceRetentionCleanup' | 'getSiteLocation' | 'setSiteLocation' | 'detectSiteLocation' | 'getRequestCensus' | 'getLoadContributions' | 'getLoggingSettings' | 'setLoggingSettings'>;
97
+ readonly system: Pick<InferProvider<typeof systemCapability>, 'info' | 'health' | 'featureFlags' | 'networkAddresses' | 'getRetentionConfig' | 'setRetentionConfig' | 'forceRetentionCleanup' | 'getSiteLocation' | 'setSiteLocation' | 'detectSiteLocation' | 'getRequestCensus' | 'getLoadContributions' | 'getFailureContributions' | 'getLoggingSettings' | 'setLoggingSettings'>;
98
98
  readonly terminalSession: Pick<InferProvider<typeof terminalSessionCapability>, 'listProfiles' | 'listInstances' | 'createInstance' | 'updateInstance' | 'deleteInstance' | 'setInstanceEnabled' | 'listLegacyCameras' | 'adoptLegacyMonitor' | 'listSessions' | 'openSession' | 'resize' | 'pullOutput' | 'writeInput' | 'close'>;
99
99
  readonly toast: Pick<InferProvider<typeof toastCapability>, 'onToast'>;
100
100
  readonly turnProvider: Pick<InferProvider<typeof turnProviderCapability>, 'getTurnServers'>;
package/dist/index.d.ts CHANGED
@@ -103,6 +103,8 @@ export { emitDownForOwnedCaps, ReadinessRegistry, ReadinessTimeoutError, readine
103
103
  export * from './stream-selection.js';
104
104
  export { ROOT_BUCKET_KEY, UNATTRIBUTED_BUCKET_KEY, foldSnapshotByFunction, reducePoints, resolveBucketMs, } from './metrics/load-series-fold.js';
105
105
  export type { LoadBucket, LoadBucketKind, LoadPoint, LoadProcessRow, } from './metrics/load-series-fold.js';
106
+ export { FailureCounters, MAX_KEYS, MAX_REASONS_PER_KEY, OVERFLOW_REASON, failureRate, } from './metrics/failure-counters.js';
107
+ export type { FailureCounterSample, FailureObservation, FailureReasonCount, } from './metrics/failure-counters.js';
106
108
  export type { AgentAddonConfig, AgentPipelineSettings, CameraPipelineSettings, CameraStepOverridePatch, DeviceStepConfig, } from './types/agent-pipeline-settings.js';
107
109
  export * from './types/analytics.js';
108
110
  export type { CameraPipelineConfig, PipelineTemplate as CameraPipelineTemplate, } from './types/camera-pipeline.js';