@camstack/types 1.2.116 → 1.2.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +4 -3
- package/dist/addon.mjs +4 -3
- package/dist/capabilities/data-store-provider.cap.d.ts +11 -0
- package/dist/capabilities/index.d.ts +6 -3
- package/dist/capabilities/load-contribution.cap.d.ts +146 -0
- package/dist/capabilities/metrics-provider.cap.d.ts +156 -38
- package/dist/capabilities/settings-store.cap.d.ts +48 -1
- package/dist/capabilities/system.cap.d.ts +67 -1
- package/dist/enums/event-category.d.ts +1 -1
- package/dist/enums.js +1 -1
- package/dist/enums.mjs +1 -1
- package/dist/{event-category-CIa_iT6b.mjs → event-category-BZL-fdNj.mjs} +1 -1
- package/dist/{event-category-EY0GNjV9.js → event-category-BaEgqJNv.js} +1 -1
- package/dist/generated/addon-api.d.ts +40 -3
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +585 -36
- package/dist/index.mjs +575 -37
- package/dist/interfaces/event-bus.d.ts +1 -1
- package/dist/interfaces/metrics-provider.d.ts +5 -3
- package/dist/metrics/load-series-fold.d.ts +142 -0
- package/dist/node.d.ts +2 -0
- package/dist/node.js +191 -0
- package/dist/node.mjs +186 -1
- package/dist/process/child-cost-registry.d.ts +105 -0
- package/dist/{sleep-CSodb2vQ.js → sleep-9d8tJRbO.js} +1 -1
- package/dist/{sleep-CdbM8ge4.mjs → sleep-Dolp38qx.mjs} +1 -1
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_event_category = require("./event-category-
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
2
|
+
const require_event_category = require("./event-category-BaEgqJNv.js");
|
|
3
|
+
const require_sleep = require("./sleep-9d8tJRbO.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:
|
|
315
|
+
* Coverage: 19 collection caps, 32 array methods.
|
|
316
316
|
*/
|
|
317
317
|
var COLLECTION_ARRAY_METHODS = Object.freeze({
|
|
318
318
|
"addon-pages-source": ["listPages"],
|
|
@@ -333,6 +333,7 @@ var COLLECTION_ARRAY_METHODS = Object.freeze({
|
|
|
333
333
|
"listProfiles",
|
|
334
334
|
"listRuntimeNodes"
|
|
335
335
|
],
|
|
336
|
+
"load-contribution": ["list"],
|
|
336
337
|
"log-channels": ["list"],
|
|
337
338
|
"log-destination": ["query"],
|
|
338
339
|
"login-method": ["getLoginMethods"],
|
package/dist/addon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as EventCategory } from "./event-category-
|
|
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-
|
|
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";
|
|
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:
|
|
314
|
+
* Coverage: 19 collection caps, 32 array methods.
|
|
315
315
|
*/
|
|
316
316
|
var COLLECTION_ARRAY_METHODS = Object.freeze({
|
|
317
317
|
"addon-pages-source": ["listPages"],
|
|
@@ -332,6 +332,7 @@ var COLLECTION_ARRAY_METHODS = Object.freeze({
|
|
|
332
332
|
"listProfiles",
|
|
333
333
|
"listRuntimeNodes"
|
|
334
334
|
],
|
|
335
|
+
"load-contribution": ["list"],
|
|
335
336
|
"log-channels": ["list"],
|
|
336
337
|
"log-destination": ["query"],
|
|
337
338
|
"login-method": ["getLoginMethods"],
|
|
@@ -117,6 +117,17 @@ export declare const dataStoreProviderCapability: {
|
|
|
117
117
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
118
118
|
}, z.core.$strip>;
|
|
119
119
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
120
|
+
/** Insert many records in ONE transaction. All or nothing. */
|
|
121
|
+
readonly insertMany: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
122
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
123
|
+
collection: z.ZodString;
|
|
124
|
+
records: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
125
|
+
id: z.ZodOptional<z.ZodString>;
|
|
126
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
127
|
+
}, z.core.$strip>>>;
|
|
128
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
129
|
+
inserted: z.ZodNumber;
|
|
130
|
+
}, z.core.$strip>, "mutation">;
|
|
120
131
|
/** Update an existing record by ID. */
|
|
121
132
|
readonly update: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
122
133
|
namespace: z.ZodOptional<z.ZodString>;
|
|
@@ -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 { ILoadContributionProvider, LoadContribution, LoadContributionAttribution, LoadContributionRole, } from './load-contribution.cap.js';
|
|
66
|
+
export { LOAD_CONTRIBUTION_ATTRIBUTIONS, LOAD_CONTRIBUTION_ROLES, LoadContributionSchema, loadContributionCapability, } from './load-contribution.cap.js';
|
|
65
67
|
export type { ILoginMethodProvider, LoginMethodContribution, LoginStage, PasskeyLoginMethod, RedirectLoginMethod, WidgetLoginMethod, } from './login-method.cap.js';
|
|
66
68
|
export { LoginMethodContributionSchema, LoginStageEnum, loginMethodCapability, PasskeyLoginMethodSchema, RedirectLoginMethodSchema, WidgetLoginMethodSchema, } from './login-method.cap.js';
|
|
67
69
|
export { type IMetricsProvider, metricsProviderCapability, SystemMetricsSchema, } from './metrics-provider.cap.js';
|
|
@@ -91,7 +93,7 @@ export type { CameraStream, CamProfile, CamStreamKind, DecodedAudioChunkWire, Fr
|
|
|
91
93
|
export { BrokerStatsSchema, BrokerStatusSchema, CAM_PROFILE_ORDER, CameraStreamSchema, CamProfileSchema, CamStreamKindSchema, CamStreamResolutionSchema, DecodedAudioChunkSchema, DecodedFrameSchema, EncodedPacketSchema, FrameHandleFormatSchema, FrameHandleSchema, makeProfileBrokerId, makeSourceBrokerId, ProfileRtspEntrySchema, ProfileSlotSchema, ProfileSlotStatusSchema, parseProfileBrokerId, StreamSourceEntrySchema, StreamSourceSchema, SubscribeAudioChunksInputSchema, SubscribeAudioChunksResultSchema, SubscribeFramesInputSchema, SubscribeFramesResultSchema, selectAssignedProfileSlots, } from './schemas/streaming-shared.js';
|
|
92
94
|
export { buildEventKindDescriptor, EVENT_KIND_BY_CAP, EVENTFUL_CAP_NAMES, type SensorEventKindDescriptor, } from './sensor-event-kinds.js';
|
|
93
95
|
export { type ImageContract, ImageContractSchema, type ImageContractState, ImageContractStateSchema, type IServerManagementProvider, type ServerBootMode, ServerBootModeSchema, type ServerPackageStatus, ServerPackageStatusSchema, type ServerRollbackInfo, ServerRollbackInfoSchema, type ServerUpdateActionResult, ServerUpdateActionResultSchema, type ServerUpdateCheckResult, ServerUpdateCheckResultSchema, type ServerUpdateState, ServerUpdateStateSchema, serverManagementCapability, } from './server-management.cap.js';
|
|
94
|
-
export { type CollectionColumn, CollectionColumnSchema, type CollectionIndex, CollectionIndexSchema, type ISettingsStoreProvider, type MutationFilter, MutationFilterSchema, QueryFilterSchema, SettingsRecordSchema, type SettingsStoreClient, settingsStoreCapability, } from './settings-store.cap.js';
|
|
96
|
+
export { type BulkRecord, BulkRecordSchema, type CollectionColumn, CollectionColumnSchema, type CollectionIndex, CollectionIndexSchema, type ISettingsStoreProvider, type MutationFilter, MutationFilterSchema, QueryFilterSchema, SettingsRecordSchema, type SettingsStoreClient, settingsStoreCapability, } from './settings-store.cap.js';
|
|
95
97
|
export type { ISmtpProvider } from './smtp-provider.cap.js';
|
|
96
98
|
export { SendEmailInputSchema, SendEmailResultSchema, SmtpStatusSchema, smtpProviderCapability, } from './smtp-provider.cap.js';
|
|
97
99
|
export { type ISnapshotOrchestrator, SnapshotImageSchema, snapshotCapability, } from './snapshot.cap.js';
|
|
@@ -191,7 +193,7 @@ export { type CamStreamDescriptor, CamStreamDescriptorSchema, type IStreamCatalo
|
|
|
191
193
|
export { type IStreamParamsProvider, type StreamParamsOptions, StreamParamsOptionsSchema, type StreamParamsStatus, StreamParamsStatusSchema, type StreamProfile, StreamProfileConfigSchema, StreamProfileOptionsSchema, type StreamProfilePatch, StreamProfilePatchSchema, StreamProfileSchema, streamParamsCapability, } from './stream-params.cap.js';
|
|
192
194
|
export { buildStreamParamsConfigSchema, parseStreamParamsFormPatch, STREAM_PROFILE_META, type StreamProfileMeta, } from './stream-params-config-schema.js';
|
|
193
195
|
export { type ISwitchProvider, type SwitchStatus, SwitchStatusSchema, switchCapability, } from './switch.cap.js';
|
|
194
|
-
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 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';
|
|
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';
|
|
195
197
|
export { type ITamperProvider, type TamperStatus, TamperStatusSchema, tamperCapability, } from './tamper.cap.js';
|
|
196
198
|
export { type ITemperatureSensorProvider, type TemperatureSensorStatus, TemperatureSensorStatusSchema, temperatureSensorCapability, } from './temperature-sensor.cap.js';
|
|
197
199
|
export { type IToastProvider, ToastSchema, toastCapability } from './toast.cap.js';
|
|
@@ -280,6 +282,7 @@ import type { llmRuntimeCapability } from './llm-runtime.cap.js';
|
|
|
280
282
|
import type { localNetworkCapability } from './local-network.cap.js';
|
|
281
283
|
import type { lockControlCapability } from './lock-control.cap.js';
|
|
282
284
|
import type { logChannelsCapability } from './log-channels.cap.js';
|
|
285
|
+
import type { loadContributionCapability } from './load-contribution.cap.js';
|
|
283
286
|
import type { logDestinationCapability } from './log-destination.cap.js';
|
|
284
287
|
import type { loginMethodCapability } from './login-method.cap.js';
|
|
285
288
|
import type { mediaPlayerCapability } from './media-player.cap.js';
|
|
@@ -356,6 +359,6 @@ import type { webrtcSessionCapability } from './webrtc-session.cap.js';
|
|
|
356
359
|
import type { zoneAnalyticsCapability } from './zone-analytics.cap.js';
|
|
357
360
|
import type { zoneRulesCapability } from './zone-rules.cap.js';
|
|
358
361
|
import type { zonesCapability } from './zones.cap.js';
|
|
359
|
-
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 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;
|
|
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;
|
|
360
363
|
export type CapabilityName = AnyCapability['name'];
|
|
361
364
|
export type ITypedReadinessRegistry = IReadinessRegistry<CapabilityName>;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `load-contribution` — the capability an addon reports its OWN cost through,
|
|
3
|
+
* already attributed. It stores nothing.
|
|
4
|
+
*
|
|
5
|
+
* ## Why this exists, and why it is not a pid→camera map
|
|
6
|
+
*
|
|
7
|
+
* Four of the five load families in
|
|
8
|
+
* `packages/addon-admin-ui/src/components/cluster/load/camera-load-attribution.ts`
|
|
9
|
+
* are per-camera by construction — one forked decode worker per decode
|
|
10
|
+
* session, one ffmpeg per (camera, encode plan), one ffmpeg per (camera,
|
|
11
|
+
* recording profile), one ffmpeg ingest per camera source — and none could be
|
|
12
|
+
* READ per camera. The obvious repair is to surface each child's pid so an
|
|
13
|
+
* observer can join it against the OS process table. That repair is wrong
|
|
14
|
+
* here, for a reason worth writing down:
|
|
15
|
+
*
|
|
16
|
+
* - the join needs an entity with GLOBAL knowledge (which pid belongs to
|
|
17
|
+
* which camera, for every addon), and every such entity is a list that a
|
|
18
|
+
* new addon has to be added to — the failure mode of a central list is that
|
|
19
|
+
* nothing breaks, the operator simply never sees what somebody added;
|
|
20
|
+
* - the pair has to be shipped somewhere it can outlive the process it
|
|
21
|
+
* describes, and pids are recycled. A stale entry charges one camera for
|
|
22
|
+
* another camera's work, silently and plausibly. This repo has already paid
|
|
23
|
+
* for a registry that answered while the truth was elsewhere (D49).
|
|
24
|
+
*
|
|
25
|
+
* The recorder does not need to be told which camera its ffmpeg serves. It
|
|
26
|
+
* spawned it. So each addon reports what it already knows, and no entity needs
|
|
27
|
+
* global knowledge. The shape is copied from `log-channels.cap.ts` /
|
|
28
|
+
* `log-destination.cap.ts` (`mode: 'collection'`, `internal: true`,
|
|
29
|
+
* `mount: { kind: 'skip' }`): no tRPC route, no generated hooks, while
|
|
30
|
+
* `addons.listCapabilityProviders` still enumerates it and the hub's
|
|
31
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider, so a forked
|
|
32
|
+
* runner's entries reach hub-main over transport that already exists. No new
|
|
33
|
+
* UDS message, no second registry (D3).
|
|
34
|
+
*
|
|
35
|
+
* ## The external observer still has a job
|
|
36
|
+
*
|
|
37
|
+
* `metrics.node-processes-snapshot` measures every camstack-shaped process on
|
|
38
|
+
* the node whether or not anybody claims it. Contributions cover what the
|
|
39
|
+
* addons know about; the snapshot covers what is actually running. **The
|
|
40
|
+
* difference is the finding** — a process nobody claims is either a leak or a
|
|
41
|
+
* cost family nobody has taught to report, and both are worth seeing. So an
|
|
42
|
+
* unclaimed process stays in an "unattributed" bucket and is never folded into
|
|
43
|
+
* a neighbour.
|
|
44
|
+
*
|
|
45
|
+
* ## Absent, never zero
|
|
46
|
+
*
|
|
47
|
+
* Every measurement here is optional. An addon that cannot produce a number
|
|
48
|
+
* omits it, and the consumer reads UNKNOWN. A zero would say "this camera cost
|
|
49
|
+
* nothing", which is a measurement, and a measurement nobody made is the one
|
|
50
|
+
* thing this whole surface exists to prevent.
|
|
51
|
+
*
|
|
52
|
+
* ## Detection declares its own renunciation
|
|
53
|
+
*
|
|
54
|
+
* The shared inference pool is one process per (node, runtime, hardware
|
|
55
|
+
* device) serving every camera. It contributes an entry with `deviceId: null`
|
|
56
|
+
* and `attribution: 'unattributable'` — the giving-up is DATA, reported by the
|
|
57
|
+
* only component that knows it, rather than a deduction an observer makes.
|
|
58
|
+
* `isChartablePerCamera` keeps refusing it.
|
|
59
|
+
*/
|
|
60
|
+
import { z } from 'zod';
|
|
61
|
+
import { type InferProvider } from './capability-definition.js';
|
|
62
|
+
/**
|
|
63
|
+
* The load families an addon can report. Kept as a tuple so the Zod enum and
|
|
64
|
+
* the TypeScript union have one source.
|
|
65
|
+
*
|
|
66
|
+
* `detection` is a member on purpose — see the module docblock. It is the one
|
|
67
|
+
* role that reports itself as unattributable.
|
|
68
|
+
*/
|
|
69
|
+
export declare const LOAD_CONTRIBUTION_ROLES: readonly ["decode", "transcode", "recording", "streaming", "detection"];
|
|
70
|
+
export type LoadContributionRole = (typeof LOAD_CONTRIBUTION_ROLES)[number];
|
|
71
|
+
/**
|
|
72
|
+
* How well the reporting addon can tie this entry to ONE camera. The
|
|
73
|
+
* contributor decides, because the contributor is the only one who knows.
|
|
74
|
+
*
|
|
75
|
+
* - `measured` — the numbers on this entry are this camera's, measured. The
|
|
76
|
+
* entry owns a process (or an equivalent exclusive resource) that serves
|
|
77
|
+
* exactly one camera.
|
|
78
|
+
* - `accounted` — per-camera work really is COUNTED (frames submitted,
|
|
79
|
+
* inference milliseconds), but the cost is shared and can only ever be
|
|
80
|
+
* apportioned. A consumer must label it as a share, never as a cost.
|
|
81
|
+
* - `unattributable` — no camera owns this. Reported anyway, with
|
|
82
|
+
* `deviceId: null`, so the shared cost is visible as shared instead of
|
|
83
|
+
* invisible.
|
|
84
|
+
*/
|
|
85
|
+
export declare const LOAD_CONTRIBUTION_ATTRIBUTIONS: readonly ["measured", "accounted", "unattributable"];
|
|
86
|
+
export type LoadContributionAttribution = (typeof LOAD_CONTRIBUTION_ATTRIBUTIONS)[number];
|
|
87
|
+
declare const LoadContributionSchema: z.ZodObject<{
|
|
88
|
+
role: z.ZodEnum<{
|
|
89
|
+
streaming: "streaming";
|
|
90
|
+
decode: "decode";
|
|
91
|
+
recording: "recording";
|
|
92
|
+
transcode: "transcode";
|
|
93
|
+
detection: "detection";
|
|
94
|
+
}>;
|
|
95
|
+
deviceId: z.ZodNullable<z.ZodNumber>;
|
|
96
|
+
attribution: z.ZodEnum<{
|
|
97
|
+
measured: "measured";
|
|
98
|
+
accounted: "accounted";
|
|
99
|
+
unattributable: "unattributable";
|
|
100
|
+
}>;
|
|
101
|
+
unit: z.ZodString;
|
|
102
|
+
pid: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
startedAtMs: z.ZodOptional<z.ZodNumber>;
|
|
104
|
+
cpuSeconds: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
rssBytes: z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
export type LoadContribution = z.infer<typeof LoadContributionSchema>;
|
|
108
|
+
export declare const loadContributionCapability: {
|
|
109
|
+
readonly name: "load-contribution";
|
|
110
|
+
readonly scope: "system";
|
|
111
|
+
readonly mode: "collection";
|
|
112
|
+
readonly internal: true;
|
|
113
|
+
readonly methods: {
|
|
114
|
+
/**
|
|
115
|
+
* This addon's own cost entries, computed live from state it already
|
|
116
|
+
* holds. Inert: no persistence, no sampling, no timer. It is answered on
|
|
117
|
+
* whatever beat the caller already has.
|
|
118
|
+
*/
|
|
119
|
+
readonly list: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
120
|
+
role: z.ZodEnum<{
|
|
121
|
+
streaming: "streaming";
|
|
122
|
+
decode: "decode";
|
|
123
|
+
recording: "recording";
|
|
124
|
+
transcode: "transcode";
|
|
125
|
+
detection: "detection";
|
|
126
|
+
}>;
|
|
127
|
+
deviceId: z.ZodNullable<z.ZodNumber>;
|
|
128
|
+
attribution: z.ZodEnum<{
|
|
129
|
+
measured: "measured";
|
|
130
|
+
accounted: "accounted";
|
|
131
|
+
unattributable: "unattributable";
|
|
132
|
+
}>;
|
|
133
|
+
unit: z.ZodString;
|
|
134
|
+
pid: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
startedAtMs: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
cpuSeconds: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
rssBytes: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
139
|
+
};
|
|
140
|
+
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
141
|
+
readonly mount: {
|
|
142
|
+
readonly kind: "skip";
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
export type ILoadContributionProvider = InferProvider<typeof loadContributionCapability>;
|
|
146
|
+
export { LoadContributionSchema };
|
|
@@ -185,27 +185,16 @@ declare const NodeProcessSchema: z.ZodObject<{
|
|
|
185
185
|
system: "system";
|
|
186
186
|
root: "root";
|
|
187
187
|
managed: "managed";
|
|
188
|
-
ghost: "ghost";
|
|
189
188
|
}>;
|
|
190
189
|
addonId: z.ZodNullable<z.ZodString>;
|
|
191
190
|
nodeId: z.ZodNullable<z.ZodString>;
|
|
192
191
|
command: z.ZodString;
|
|
193
192
|
cpuPercent: z.ZodNumber;
|
|
194
193
|
memoryRssBytes: z.ZodNumber;
|
|
194
|
+
cpuMainPercent: z.ZodNullable<z.ZodNumber>;
|
|
195
|
+
cpuGcPercent: z.ZodNullable<z.ZodNumber>;
|
|
196
|
+
threadCount: z.ZodNullable<z.ZodNumber>;
|
|
195
197
|
uptimeSec: z.ZodNumber;
|
|
196
|
-
orphaned: z.ZodBoolean;
|
|
197
|
-
}, z.core.$strip>;
|
|
198
|
-
declare const KillProcessInputSchema: z.ZodObject<{
|
|
199
|
-
pid: z.ZodNumber;
|
|
200
|
-
force: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
-
}, z.core.$strip>;
|
|
202
|
-
declare const KillProcessResultSchema: z.ZodObject<{
|
|
203
|
-
success: z.ZodBoolean;
|
|
204
|
-
reason: z.ZodOptional<z.ZodString>;
|
|
205
|
-
signal: z.ZodOptional<z.ZodEnum<{
|
|
206
|
-
SIGTERM: "SIGTERM";
|
|
207
|
-
SIGKILL: "SIGKILL";
|
|
208
|
-
}>>;
|
|
209
198
|
}, z.core.$strip>;
|
|
210
199
|
declare const DumpHeapSnapshotInputSchema: z.ZodObject<{
|
|
211
200
|
addonId: z.ZodString;
|
|
@@ -216,6 +205,92 @@ declare const DumpHeapSnapshotResultSchema: z.ZodObject<{
|
|
|
216
205
|
pid: z.ZodOptional<z.ZodNumber>;
|
|
217
206
|
reason: z.ZodOptional<z.ZodString>;
|
|
218
207
|
}, z.core.$strip>;
|
|
208
|
+
/**
|
|
209
|
+
* One point of one function's series.
|
|
210
|
+
*
|
|
211
|
+
* The unsuffixed fields are the bucket's **MAXIMUM**, and that choice is the
|
|
212
|
+
* point of the whole surface. The two obvious reductions both lie: a mean per
|
|
213
|
+
* bucket smears a spike away, and taking every Nth sample skips it outright.
|
|
214
|
+
* Either would give us a tool built to find peaks that does not show peaks.
|
|
215
|
+
* `...Min` carries the other end, `samples` says how many raw snapshots folded
|
|
216
|
+
* into the bucket, and a mean stays derivable where it is wanted.
|
|
217
|
+
*
|
|
218
|
+
* An UNREDUCED point is a one-sample bucket: `samples === 1` and each `...Min`
|
|
219
|
+
* equals its unsuffixed twin. Reduced and unreduced are the same shape, so a
|
|
220
|
+
* caller cannot tell which it received — which is what "one reader" means.
|
|
221
|
+
*/
|
|
222
|
+
declare const LoadPointSchema: z.ZodObject<{
|
|
223
|
+
atMs: z.ZodNumber;
|
|
224
|
+
samples: z.ZodNumber;
|
|
225
|
+
cpuMainPercent: z.ZodNullable<z.ZodNumber>;
|
|
226
|
+
cpuMainPercentMin: z.ZodNullable<z.ZodNumber>;
|
|
227
|
+
cpuGcPercent: z.ZodNullable<z.ZodNumber>;
|
|
228
|
+
cpuGcPercentMin: z.ZodNullable<z.ZodNumber>;
|
|
229
|
+
cpuLifetimePercent: z.ZodNumber;
|
|
230
|
+
cpuLifetimePercentMin: z.ZodNumber;
|
|
231
|
+
memoryRssBytes: z.ZodNumber;
|
|
232
|
+
memoryRssBytesMin: z.ZodNumber;
|
|
233
|
+
processCount: z.ZodNumber;
|
|
234
|
+
processCountMin: z.ZodNumber;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
/** One function's series. `key` is an addonId, `__root__` or `__unattributed__`. */
|
|
237
|
+
declare const LoadFunctionSeriesSchema: z.ZodObject<{
|
|
238
|
+
key: z.ZodString;
|
|
239
|
+
kind: z.ZodEnum<{
|
|
240
|
+
addon: "addon";
|
|
241
|
+
root: "root";
|
|
242
|
+
unattributed: "unattributed";
|
|
243
|
+
}>;
|
|
244
|
+
points: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
245
|
+
atMs: z.ZodNumber;
|
|
246
|
+
samples: z.ZodNumber;
|
|
247
|
+
cpuMainPercent: z.ZodNullable<z.ZodNumber>;
|
|
248
|
+
cpuMainPercentMin: z.ZodNullable<z.ZodNumber>;
|
|
249
|
+
cpuGcPercent: z.ZodNullable<z.ZodNumber>;
|
|
250
|
+
cpuGcPercentMin: z.ZodNullable<z.ZodNumber>;
|
|
251
|
+
cpuLifetimePercent: z.ZodNumber;
|
|
252
|
+
cpuLifetimePercentMin: z.ZodNumber;
|
|
253
|
+
memoryRssBytes: z.ZodNumber;
|
|
254
|
+
memoryRssBytesMin: z.ZodNumber;
|
|
255
|
+
processCount: z.ZodNumber;
|
|
256
|
+
processCountMin: z.ZodNumber;
|
|
257
|
+
}, z.core.$strip>>>;
|
|
258
|
+
}, z.core.$strip>;
|
|
259
|
+
declare const NodeLoadSeriesSchema: z.ZodObject<{
|
|
260
|
+
nodeId: z.ZodString;
|
|
261
|
+
series: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
262
|
+
key: z.ZodString;
|
|
263
|
+
kind: z.ZodEnum<{
|
|
264
|
+
addon: "addon";
|
|
265
|
+
root: "root";
|
|
266
|
+
unattributed: "unattributed";
|
|
267
|
+
}>;
|
|
268
|
+
points: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
269
|
+
atMs: z.ZodNumber;
|
|
270
|
+
samples: z.ZodNumber;
|
|
271
|
+
cpuMainPercent: z.ZodNullable<z.ZodNumber>;
|
|
272
|
+
cpuMainPercentMin: z.ZodNullable<z.ZodNumber>;
|
|
273
|
+
cpuGcPercent: z.ZodNullable<z.ZodNumber>;
|
|
274
|
+
cpuGcPercentMin: z.ZodNullable<z.ZodNumber>;
|
|
275
|
+
cpuLifetimePercent: z.ZodNumber;
|
|
276
|
+
cpuLifetimePercentMin: z.ZodNumber;
|
|
277
|
+
memoryRssBytes: z.ZodNumber;
|
|
278
|
+
memoryRssBytesMin: z.ZodNumber;
|
|
279
|
+
processCount: z.ZodNumber;
|
|
280
|
+
processCountMin: z.ZodNumber;
|
|
281
|
+
}, z.core.$strip>>>;
|
|
282
|
+
}, z.core.$strip>>>;
|
|
283
|
+
bucketMs: z.ZodNumber;
|
|
284
|
+
retainedSamples: z.ZodNumber;
|
|
285
|
+
oldestAtMs: z.ZodNullable<z.ZodNumber>;
|
|
286
|
+
cadenceMs: z.ZodNumber;
|
|
287
|
+
durable: z.ZodBoolean;
|
|
288
|
+
}, z.core.$strip>;
|
|
289
|
+
declare const GetLoadSeriesInputSchema: z.ZodObject<{
|
|
290
|
+
forNodeId: z.ZodString;
|
|
291
|
+
sinceMs: z.ZodOptional<z.ZodNumber>;
|
|
292
|
+
maxPoints: z.ZodOptional<z.ZodNumber>;
|
|
293
|
+
}, z.core.$strip>;
|
|
219
294
|
declare const SystemMetricsSchema: z.ZodObject<{
|
|
220
295
|
cpuPercent: z.ZodNumber;
|
|
221
296
|
memoryPercent: z.ZodNumber;
|
|
@@ -490,10 +565,17 @@ export declare const metricsProviderCapability: {
|
|
|
490
565
|
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
491
566
|
/**
|
|
492
567
|
* Snapshot of every camstack-related process on this node with a
|
|
493
|
-
*
|
|
494
|
-
* Processes tab: cross-references `$process.list` against a `ps` scan
|
|
495
|
-
*
|
|
496
|
-
*
|
|
568
|
+
* root/managed/system classification. Powers the Cluster → Agent →
|
|
569
|
+
* Processes tab: cross-references `$process.list` against a `ps` scan so
|
|
570
|
+
* per-addon CPU and RSS can be attributed, and so a process the cluster
|
|
571
|
+
* does not manage is still visible.
|
|
572
|
+
*
|
|
573
|
+
* **Read-only, by design.** This cap once carried a `killProcess`
|
|
574
|
+
* mutation; it was deleted on 2026-08-27. A runner's lifecycle belongs to
|
|
575
|
+
* `CrashSupervisor` and is driven through `addons.restartAddon` /
|
|
576
|
+
* `$process.restart` — signalling a raw pid went around the supervisor
|
|
577
|
+
* (D6), and the one class it was willing to signal turned out to be the
|
|
578
|
+
* container's own init and the operator's desktop app.
|
|
497
579
|
*/
|
|
498
580
|
readonly listNodeProcesses: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
499
581
|
pid: z.ZodNumber;
|
|
@@ -503,39 +585,75 @@ export declare const metricsProviderCapability: {
|
|
|
503
585
|
system: "system";
|
|
504
586
|
root: "root";
|
|
505
587
|
managed: "managed";
|
|
506
|
-
ghost: "ghost";
|
|
507
588
|
}>;
|
|
508
589
|
addonId: z.ZodNullable<z.ZodString>;
|
|
509
590
|
nodeId: z.ZodNullable<z.ZodString>;
|
|
510
591
|
command: z.ZodString;
|
|
511
592
|
cpuPercent: z.ZodNumber;
|
|
512
593
|
memoryRssBytes: z.ZodNumber;
|
|
594
|
+
cpuMainPercent: z.ZodNullable<z.ZodNumber>;
|
|
595
|
+
cpuGcPercent: z.ZodNullable<z.ZodNumber>;
|
|
596
|
+
threadCount: z.ZodNullable<z.ZodNumber>;
|
|
513
597
|
uptimeSec: z.ZodNumber;
|
|
514
|
-
orphaned: z.ZodBoolean;
|
|
515
598
|
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
516
599
|
/**
|
|
517
|
-
*
|
|
518
|
-
*
|
|
519
|
-
*
|
|
520
|
-
*
|
|
600
|
+
* The retained per-node load series — the ONE reader over BOTH tiers.
|
|
601
|
+
*
|
|
602
|
+
* The in-memory ring is the HOT window (the last 180 snapshots, held by
|
|
603
|
+
* every node's `native-metrics`); the hub's `metrics:node-load-samples`
|
|
604
|
+
* table is the COLD one (the operator's retention, six hours by default).
|
|
605
|
+
* This method merges them and DEDUPES on `atMs`, so a snapshot present in
|
|
606
|
+
* both contributes once and the caller never learns which tier a point
|
|
607
|
+
* came from. There is deliberately no second read surface: two readers is
|
|
608
|
+
* how two charts start disagreeing about the same node.
|
|
609
|
+
*
|
|
610
|
+
* Reads only; nothing is sampled to answer it. Normally called UNPINNED —
|
|
611
|
+
* the hub hears every node's snapshot and holds every node's rows — and
|
|
612
|
+
* answers for any `forNodeId`. Pinned to an agent it answers from that
|
|
613
|
+
* agent's ring alone (`durable: false`). Empty is a legitimate answer: a
|
|
614
|
+
* node nobody has heard from has no series, and saying so is the truth.
|
|
521
615
|
*/
|
|
522
|
-
readonly
|
|
523
|
-
|
|
524
|
-
|
|
616
|
+
readonly getLoadSeries: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
617
|
+
forNodeId: z.ZodString;
|
|
618
|
+
sinceMs: z.ZodOptional<z.ZodNumber>;
|
|
619
|
+
maxPoints: z.ZodOptional<z.ZodNumber>;
|
|
525
620
|
}, z.core.$strip>, z.ZodObject<{
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
621
|
+
nodeId: z.ZodString;
|
|
622
|
+
series: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
623
|
+
key: z.ZodString;
|
|
624
|
+
kind: z.ZodEnum<{
|
|
625
|
+
addon: "addon";
|
|
626
|
+
root: "root";
|
|
627
|
+
unattributed: "unattributed";
|
|
628
|
+
}>;
|
|
629
|
+
points: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
630
|
+
atMs: z.ZodNumber;
|
|
631
|
+
samples: z.ZodNumber;
|
|
632
|
+
cpuMainPercent: z.ZodNullable<z.ZodNumber>;
|
|
633
|
+
cpuMainPercentMin: z.ZodNullable<z.ZodNumber>;
|
|
634
|
+
cpuGcPercent: z.ZodNullable<z.ZodNumber>;
|
|
635
|
+
cpuGcPercentMin: z.ZodNullable<z.ZodNumber>;
|
|
636
|
+
cpuLifetimePercent: z.ZodNumber;
|
|
637
|
+
cpuLifetimePercentMin: z.ZodNumber;
|
|
638
|
+
memoryRssBytes: z.ZodNumber;
|
|
639
|
+
memoryRssBytesMin: z.ZodNumber;
|
|
640
|
+
processCount: z.ZodNumber;
|
|
641
|
+
processCountMin: z.ZodNumber;
|
|
642
|
+
}, z.core.$strip>>>;
|
|
643
|
+
}, z.core.$strip>>>;
|
|
644
|
+
bucketMs: z.ZodNumber;
|
|
645
|
+
retainedSamples: z.ZodNumber;
|
|
646
|
+
oldestAtMs: z.ZodNullable<z.ZodNumber>;
|
|
647
|
+
cadenceMs: z.ZodNumber;
|
|
648
|
+
durable: z.ZodBoolean;
|
|
649
|
+
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
533
650
|
/**
|
|
534
651
|
* Tell the addon's forked runner to write a V8 heap snapshot to disk (via
|
|
535
652
|
* SIGUSR2 — the runner's diagnostic handler). Also logs its
|
|
536
|
-
* `process.memoryUsage()` + heap-space breakdown.
|
|
537
|
-
*
|
|
538
|
-
* attribution; copy the returned path off the
|
|
653
|
+
* `process.memoryUsage()` + heap-space breakdown. Resolves the pid from
|
|
654
|
+
* `$process.list`, so it can only reach a runner this node spawned. Use
|
|
655
|
+
* for deep per-addon memory attribution; copy the returned path off the
|
|
656
|
+
* node to analyze.
|
|
539
657
|
*/
|
|
540
658
|
readonly dumpHeapSnapshot: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
541
659
|
addonId: z.ZodString;
|
|
@@ -548,4 +666,4 @@ export declare const metricsProviderCapability: {
|
|
|
548
666
|
};
|
|
549
667
|
};
|
|
550
668
|
export type IMetricsProvider = InferProvider<typeof metricsProviderCapability>;
|
|
551
|
-
export { SystemMetricsSchema, SystemResourceSnapshotSchema, DiskSpaceInfoSchema, MetricsGpuInfoSchema, PidResourceStatsSchema, AddonInstanceSchema, NodeProcessSchema,
|
|
669
|
+
export { SystemMetricsSchema, SystemResourceSnapshotSchema, DiskSpaceInfoSchema, MetricsGpuInfoSchema, PidResourceStatsSchema, AddonInstanceSchema, NodeProcessSchema, DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, LoadPointSchema, LoadFunctionSeriesSchema, NodeLoadSeriesSchema, GetLoadSeriesInputSchema, CpuBreakdownSchema, MemoryInfoSchema, DiskIoSnapshotSchema, NetworkIoSnapshotSchema, ProcessResourceInfoSchema, PressureInfoSchema, };
|
|
@@ -65,6 +65,19 @@ declare const SettingsRecordSchema: z.ZodObject<{
|
|
|
65
65
|
id: z.ZodString;
|
|
66
66
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
67
67
|
}, z.core.$strip>;
|
|
68
|
+
/**
|
|
69
|
+
* One record of a BULK insert — {@link SettingsRecordSchema} with the id made
|
|
70
|
+
* optional.
|
|
71
|
+
*
|
|
72
|
+
* A separate schema rather than loosening the shared one: every other method
|
|
73
|
+
* on this cap addresses a row BY its id, and making that field optional
|
|
74
|
+
* everywhere would turn a forgotten key into a silently generated one on
|
|
75
|
+
* `update` and `delete` as well.
|
|
76
|
+
*/
|
|
77
|
+
declare const BulkRecordSchema: z.ZodObject<{
|
|
78
|
+
id: z.ZodOptional<z.ZodString>;
|
|
79
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
80
|
+
}, z.core.$strip>;
|
|
68
81
|
/**
|
|
69
82
|
* Column declaration for a structured (SQL-backed) collection.
|
|
70
83
|
*
|
|
@@ -188,6 +201,39 @@ export declare const settingsStoreCapability: {
|
|
|
188
201
|
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
189
202
|
}, z.core.$strip>;
|
|
190
203
|
}, z.core.$strip>, z.ZodVoid, "mutation">;
|
|
204
|
+
/**
|
|
205
|
+
* Insert MANY records in ONE transaction, returning how many landed.
|
|
206
|
+
*
|
|
207
|
+
* The write-side twin of {@link deleteWhere}, and it exists for the same
|
|
208
|
+
* reason: without it, appending a batch is N round trips and N COMMITs on
|
|
209
|
+
* the single shared connection that also serves every cluster-wide
|
|
210
|
+
* configuration read. The durable load series writes one process row per
|
|
211
|
+
* process per sample — 76 rows every 10 s on the live fleet — and the
|
|
212
|
+
* operator's rule for it is *one transaction per sample, never one per
|
|
213
|
+
* row*. `insert` cannot express that; nothing else could.
|
|
214
|
+
*
|
|
215
|
+
* **All or nothing.** A batch that fails on its fifth row leaves none of
|
|
216
|
+
* the five behind. A half-written sample is worse than a missing one: the
|
|
217
|
+
* missing one reads as "nobody reported", which is true, while the half
|
|
218
|
+
* one reads as "these were the only processes running", which is not.
|
|
219
|
+
*
|
|
220
|
+
* `id` is OPTIONAL per record, and that is the difference from
|
|
221
|
+
* {@link insert}. A collection whose primary key is an `INTEGER` rowid
|
|
222
|
+
* alias has no id to supply — SQLite assigns it, for free, and inventing a
|
|
223
|
+
* `randomUUID()` for such a column would write a 36-character string into
|
|
224
|
+
* an integer key. Omitted on a TEXT key, a uuid is generated exactly as
|
|
225
|
+
* `insert` does.
|
|
226
|
+
*/
|
|
227
|
+
readonly insertMany: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
228
|
+
namespace: z.ZodOptional<z.ZodString>;
|
|
229
|
+
collection: z.ZodString;
|
|
230
|
+
records: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
231
|
+
id: z.ZodOptional<z.ZodString>;
|
|
232
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
233
|
+
}, z.core.$strip>>>;
|
|
234
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
235
|
+
inserted: z.ZodNumber;
|
|
236
|
+
}, z.core.$strip>, "mutation">;
|
|
191
237
|
/** Update an existing record by ID. */
|
|
192
238
|
readonly update: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
193
239
|
namespace: z.ZodOptional<z.ZodString>;
|
|
@@ -394,7 +440,8 @@ export type ISettingsStoreProvider = InferProvider<typeof settingsStoreCapabilit
|
|
|
394
440
|
* Methods are accessed as `client.get.query(input)`, `client.set.mutate(input)`, etc.
|
|
395
441
|
*/
|
|
396
442
|
export type SettingsStoreClient = import('../generated/addon-api.js').AddonApi['settingsStore'];
|
|
397
|
-
export { AggregateFieldSchema, AggregateResultSchema, CollectionColumnSchema, CollectionIndexSchema, MutationFilterSchema, QueryFilterSchema, SettingsRecordSchema, };
|
|
443
|
+
export { AggregateFieldSchema, AggregateResultSchema, BulkRecordSchema, CollectionColumnSchema, CollectionIndexSchema, MutationFilterSchema, QueryFilterSchema, SettingsRecordSchema, };
|
|
444
|
+
export type BulkRecord = z.infer<typeof BulkRecordSchema>;
|
|
398
445
|
export type AggregateField = z.infer<typeof AggregateFieldSchema>;
|
|
399
446
|
export type AggregateResult = z.infer<typeof AggregateResultSchema>;
|
|
400
447
|
export type MutationFilter = z.infer<typeof MutationFilterSchema>;
|