@camstack/types 0.1.14 → 0.1.16
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/base-addon.d.ts +262 -0
- package/dist/addon/base-addon.d.ts.map +1 -0
- package/dist/auth-records-BDg37fy9.mjs +8297 -0
- package/dist/auth-records-BDg37fy9.mjs.map +1 -0
- package/dist/auth-records-D5ZNaUos.js +8296 -0
- package/dist/auth-records-D5ZNaUos.js.map +1 -0
- package/dist/capabilities/accessories.cap.d.ts +42 -0
- package/dist/capabilities/accessories.cap.d.ts.map +1 -0
- package/dist/capabilities/addon-pages-source.cap.d.ts +41 -0
- package/dist/capabilities/addon-pages-source.cap.d.ts.map +1 -0
- package/dist/capabilities/addon-pages.cap.d.ts +36 -0
- package/dist/capabilities/addon-pages.cap.d.ts.map +1 -0
- package/dist/capabilities/addon-routes.cap.d.ts +22 -0
- package/dist/capabilities/addon-routes.cap.d.ts.map +1 -0
- package/dist/capabilities/addon-settings.cap.d.ts +170 -0
- package/dist/capabilities/addon-settings.cap.d.ts.map +1 -0
- package/dist/capabilities/addon-widgets-source.cap.d.ts +103 -0
- package/dist/capabilities/addon-widgets-source.cap.d.ts.map +1 -0
- package/dist/capabilities/addon-widgets.cap.d.ts +98 -0
- package/dist/capabilities/addon-widgets.cap.d.ts.map +1 -0
- package/dist/capabilities/addons.cap.d.ts +356 -0
- package/dist/capabilities/addons.cap.d.ts.map +1 -0
- package/dist/capabilities/admin-ui.cap.d.ts +14 -0
- package/dist/capabilities/admin-ui.cap.d.ts.map +1 -0
- package/dist/capabilities/advanced-notifier.cap.d.ts +60 -0
- package/dist/capabilities/advanced-notifier.cap.d.ts.map +1 -0
- package/dist/capabilities/alerts.cap.d.ts +164 -0
- package/dist/capabilities/alerts.cap.d.ts.map +1 -0
- package/dist/capabilities/audio-analysis.cap.d.ts +46 -0
- package/dist/capabilities/audio-analysis.cap.d.ts.map +1 -0
- package/dist/capabilities/audio-analyzer.cap.d.ts +148 -0
- package/dist/capabilities/audio-analyzer.cap.d.ts.map +1 -0
- package/dist/capabilities/audio-codec.cap.d.ts +202 -0
- package/dist/capabilities/audio-codec.cap.d.ts.map +1 -0
- package/dist/capabilities/audio-metrics.cap.d.ts +174 -0
- package/dist/capabilities/audio-metrics.cap.d.ts.map +1 -0
- package/dist/capabilities/auth-provider.cap.d.ts +49 -0
- package/dist/capabilities/auth-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/authentication.cap.d.ts +83 -0
- package/dist/capabilities/authentication.cap.d.ts.map +1 -0
- package/dist/capabilities/backup.cap.d.ts +269 -0
- package/dist/capabilities/backup.cap.d.ts.map +1 -0
- package/dist/capabilities/battery.cap.d.ts +85 -0
- package/dist/capabilities/battery.cap.d.ts.map +1 -0
- package/dist/capabilities/brightness.cap.d.ts +64 -0
- package/dist/capabilities/brightness.cap.d.ts.map +1 -0
- package/dist/capabilities/camera-credentials.cap.d.ts +102 -0
- package/dist/capabilities/camera-credentials.cap.d.ts.map +1 -0
- package/dist/capabilities/camera-streams.cap.d.ts +214 -0
- package/dist/capabilities/camera-streams.cap.d.ts.map +1 -0
- package/dist/capabilities/capability-definition.d.ts +474 -0
- package/dist/capabilities/capability-definition.d.ts.map +1 -0
- package/dist/capabilities/custom-actions.d.ts +47 -0
- package/dist/capabilities/custom-actions.d.ts.map +1 -0
- package/dist/capabilities/decoder.cap.d.ts +173 -0
- package/dist/capabilities/decoder.cap.d.ts.map +1 -0
- package/dist/capabilities/detection-pipeline.cap.d.ts +34 -0
- package/dist/capabilities/detection-pipeline.cap.d.ts.map +1 -0
- package/dist/capabilities/device-discovery.cap.d.ts +247 -0
- package/dist/capabilities/device-discovery.cap.d.ts.map +1 -0
- package/dist/capabilities/device-manager.cap.d.ts +709 -0
- package/dist/capabilities/device-manager.cap.d.ts.map +1 -0
- package/dist/capabilities/device-ops.cap.d.ts +87 -0
- package/dist/capabilities/device-ops.cap.d.ts.map +1 -0
- package/dist/capabilities/device-provider.cap.d.ts +151 -0
- package/dist/capabilities/device-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/device-state.cap.d.ts +97 -0
- package/dist/capabilities/device-state.cap.d.ts.map +1 -0
- package/dist/capabilities/device-status.cap.d.ts +54 -0
- package/dist/capabilities/device-status.cap.d.ts.map +1 -0
- package/dist/capabilities/doorbell.cap.d.ts +62 -0
- package/dist/capabilities/doorbell.cap.d.ts.map +1 -0
- package/dist/capabilities/embedding-encoder.cap.d.ts +41 -0
- package/dist/capabilities/embedding-encoder.cap.d.ts.map +1 -0
- package/dist/capabilities/events.cap.d.ts +48 -0
- package/dist/capabilities/events.cap.d.ts.map +1 -0
- package/dist/capabilities/feature-probe.cap.d.ts +79 -0
- package/dist/capabilities/feature-probe.cap.d.ts.map +1 -0
- package/dist/capabilities/index.d.ts +191 -0
- package/dist/capabilities/index.d.ts.map +1 -0
- package/dist/capabilities/integrations.cap.d.ts +182 -0
- package/dist/capabilities/integrations.cap.d.ts.map +1 -0
- package/dist/capabilities/intercom.cap.d.ts +108 -0
- package/dist/capabilities/intercom.cap.d.ts.map +1 -0
- package/dist/capabilities/local-network.cap.d.ts +216 -0
- package/dist/capabilities/local-network.cap.d.ts.map +1 -0
- package/dist/capabilities/log-destination.cap.d.ts +70 -0
- package/dist/capabilities/log-destination.cap.d.ts.map +1 -0
- package/dist/capabilities/mesh-network.cap.d.ts +160 -0
- package/dist/capabilities/mesh-network.cap.d.ts.map +1 -0
- package/dist/capabilities/mesh-orchestrator.cap.d.ts +96 -0
- package/dist/capabilities/mesh-orchestrator.cap.d.ts.map +1 -0
- package/dist/capabilities/metrics-provider.cap.d.ts +522 -0
- package/dist/capabilities/metrics-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/motion-detection.cap.d.ts +107 -0
- package/dist/capabilities/motion-detection.cap.d.ts.map +1 -0
- package/dist/capabilities/motion-trigger.cap.d.ts +78 -0
- package/dist/capabilities/motion-trigger.cap.d.ts.map +1 -0
- package/dist/capabilities/motion.cap.d.ts +122 -0
- package/dist/capabilities/motion.cap.d.ts.map +1 -0
- package/dist/capabilities/native-object-detection.cap.d.ts +127 -0
- package/dist/capabilities/native-object-detection.cap.d.ts.map +1 -0
- package/dist/capabilities/network-access.cap.d.ts +67 -0
- package/dist/capabilities/network-access.cap.d.ts.map +1 -0
- package/dist/capabilities/network-quality.cap.d.ts +95 -0
- package/dist/capabilities/network-quality.cap.d.ts.map +1 -0
- package/dist/capabilities/nodes.cap.d.ts +200 -0
- package/dist/capabilities/nodes.cap.d.ts.map +1 -0
- package/dist/capabilities/notification-output.cap.d.ts +44 -0
- package/dist/capabilities/notification-output.cap.d.ts.map +1 -0
- package/dist/capabilities/osd.cap.d.ts +236 -0
- package/dist/capabilities/osd.cap.d.ts.map +1 -0
- package/dist/capabilities/pipeline-analytics.cap.d.ts +501 -0
- package/dist/capabilities/pipeline-analytics.cap.d.ts.map +1 -0
- package/dist/capabilities/pipeline-executor.cap.d.ts +922 -0
- package/dist/capabilities/pipeline-executor.cap.d.ts.map +1 -0
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +793 -0
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts.map +1 -0
- package/dist/capabilities/pipeline-runner.cap.d.ts +393 -0
- package/dist/capabilities/pipeline-runner.cap.d.ts.map +1 -0
- package/dist/capabilities/platform-probe.cap.d.ts +168 -0
- package/dist/capabilities/platform-probe.cap.d.ts.map +1 -0
- package/dist/capabilities/ptz-autotrack.cap.d.ts +188 -0
- package/dist/capabilities/ptz-autotrack.cap.d.ts.map +1 -0
- package/dist/capabilities/ptz.cap.d.ts +80 -0
- package/dist/capabilities/ptz.cap.d.ts.map +1 -0
- package/dist/capabilities/reboot.cap.d.ts +32 -0
- package/dist/capabilities/reboot.cap.d.ts.map +1 -0
- package/dist/capabilities/recording-engine.cap.d.ts +477 -0
- package/dist/capabilities/recording-engine.cap.d.ts.map +1 -0
- package/dist/capabilities/recording.cap.d.ts +43 -0
- package/dist/capabilities/recording.cap.d.ts.map +1 -0
- package/dist/capabilities/remote-access.cap.d.ts +103 -0
- package/dist/capabilities/remote-access.cap.d.ts.map +1 -0
- package/dist/capabilities/restreamer.cap.d.ts +51 -0
- package/dist/capabilities/restreamer.cap.d.ts.map +1 -0
- package/dist/capabilities/schemas/detection-shared.d.ts +63 -0
- package/dist/capabilities/schemas/detection-shared.d.ts.map +1 -0
- package/dist/capabilities/schemas/orchestrator-metrics.d.ts +44 -0
- package/dist/capabilities/schemas/orchestrator-metrics.d.ts.map +1 -0
- package/dist/capabilities/schemas/streaming-shared.d.ts +177 -0
- package/dist/capabilities/schemas/streaming-shared.d.ts.map +1 -0
- package/dist/capabilities/schemas/zone-rule.d.ts +74 -0
- package/dist/capabilities/schemas/zone-rule.d.ts.map +1 -0
- package/dist/capabilities/settings-store.cap.d.ts +198 -0
- package/dist/capabilities/settings-store.cap.d.ts.map +1 -0
- package/dist/capabilities/snapshot-provider.cap.d.ts +40 -0
- package/dist/capabilities/snapshot-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/snapshot.cap.d.ts +78 -0
- package/dist/capabilities/snapshot.cap.d.ts.map +1 -0
- package/dist/capabilities/storage-provider.cap.d.ts +432 -0
- package/dist/capabilities/storage-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/storage.cap.d.ts +367 -0
- package/dist/capabilities/storage.cap.d.ts.map +1 -0
- package/dist/capabilities/stream-broker.cap.d.ts +416 -0
- package/dist/capabilities/stream-broker.cap.d.ts.map +1 -0
- package/dist/capabilities/streaming-engine.cap.d.ts +58 -0
- package/dist/capabilities/streaming-engine.cap.d.ts.map +1 -0
- package/dist/capabilities/switch.cap.d.ts +66 -0
- package/dist/capabilities/switch.cap.d.ts.map +1 -0
- package/dist/capabilities/system.cap.d.ts +86 -0
- package/dist/capabilities/system.cap.d.ts.map +1 -0
- package/dist/capabilities/toast.cap.d.ts +56 -0
- package/dist/capabilities/toast.cap.d.ts.map +1 -0
- package/dist/capabilities/turn-orchestrator.cap.d.ts +74 -0
- package/dist/capabilities/turn-orchestrator.cap.d.ts.map +1 -0
- package/dist/capabilities/turn-provider.cap.d.ts +43 -0
- package/dist/capabilities/turn-provider.cap.d.ts.map +1 -0
- package/dist/capabilities/user-management.cap.d.ts +378 -0
- package/dist/capabilities/user-management.cap.d.ts.map +1 -0
- package/dist/capabilities/webrtc-session.cap.d.ts +181 -0
- package/dist/capabilities/webrtc-session.cap.d.ts.map +1 -0
- package/dist/capabilities/webrtc.cap.d.ts +72 -0
- package/dist/capabilities/webrtc.cap.d.ts.map +1 -0
- package/dist/capabilities/zone-analytics.cap.d.ts +213 -0
- package/dist/capabilities/zone-analytics.cap.d.ts.map +1 -0
- package/dist/capabilities/zone-rules.cap.d.ts +129 -0
- package/dist/capabilities/zone-rules.cap.d.ts.map +1 -0
- package/dist/capabilities/zones.cap.d.ts +151 -0
- package/dist/capabilities/zones.cap.d.ts.map +1 -0
- package/dist/catalogs/audio-classmap.d.ts +16 -0
- package/dist/catalogs/audio-classmap.d.ts.map +1 -0
- package/dist/catalogs/coco-classmap.d.ts.map +1 -1
- package/dist/constants.d.ts +50 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/deps/binary-downloader.d.ts +41 -0
- package/dist/deps/binary-downloader.d.ts.map +1 -0
- package/dist/deps/ffmpeg-downloader.d.ts +13 -0
- package/dist/deps/ffmpeg-downloader.d.ts.map +1 -0
- package/dist/deps/index.d.ts +4 -0
- package/dist/deps/index.d.ts.map +1 -0
- package/dist/deps/python-downloader.d.ts +34 -0
- package/dist/deps/python-downloader.d.ts.map +1 -0
- package/dist/device/accessory.d.ts +62 -0
- package/dist/device/accessory.d.ts.map +1 -0
- package/dist/device/base-device-provider.d.ts +178 -0
- package/dist/device/base-device-provider.d.ts.map +1 -0
- package/dist/device/base-device.d.ts +287 -0
- package/dist/device/base-device.d.ts.map +1 -0
- package/dist/device/camera-device.d.ts +49 -0
- package/dist/device/camera-device.d.ts.map +1 -0
- package/dist/device/device-binding.d.ts +23 -0
- package/dist/device/device-binding.d.ts.map +1 -0
- package/dist/device/device-config.d.ts +65 -0
- package/dist/device/device-config.d.ts.map +1 -0
- package/dist/device/device-context.d.ts +256 -0
- package/dist/device/device-context.d.ts.map +1 -0
- package/dist/device/device-management.d.ts +118 -0
- package/dist/device/device-management.d.ts.map +1 -0
- package/dist/device/device-profile.d.ts +161 -0
- package/dist/device/device-profile.d.ts.map +1 -0
- package/dist/device/device-runtime-state.d.ts +124 -0
- package/dist/device/device-runtime-state.d.ts.map +1 -0
- package/dist/device/device-state-handle.d.ts +161 -0
- package/dist/device/device-state-handle.d.ts.map +1 -0
- package/dist/device/device-type.d.ts +68 -0
- package/dist/device/device-type.d.ts.map +1 -0
- package/dist/device/device.d.ts +87 -0
- package/dist/device/device.d.ts.map +1 -0
- package/dist/device/features.d.ts +29 -0
- package/dist/device/features.d.ts.map +1 -0
- package/dist/device/index.d.ts +20 -0
- package/dist/device/index.d.ts.map +1 -0
- package/dist/device/runtime-state-helpers.d.ts +69 -0
- package/dist/device/runtime-state-helpers.d.ts.map +1 -0
- package/dist/device/system-mirror.d.ts +318 -0
- package/dist/device/system-mirror.d.ts.map +1 -0
- package/dist/device/zod-to-config-ui.d.ts +23 -0
- package/dist/device/zod-to-config-ui.d.ts.map +1 -0
- package/dist/disposer-chain.d.ts +32 -0
- package/dist/disposer-chain.d.ts.map +1 -0
- package/dist/enums/event-category.d.ts +361 -0
- package/dist/enums/event-category.d.ts.map +1 -0
- package/dist/enums/event-source-type.d.ts +8 -0
- package/dist/enums/event-source-type.d.ts.map +1 -0
- package/dist/enums/index.d.ts +3 -0
- package/dist/enums/index.d.ts.map +1 -0
- package/dist/generated/addon-api.d.ts +14604 -3217
- package/dist/generated/addon-api.d.ts.map +1 -1
- package/dist/generated/cap-status-types.d.ts +51 -0
- package/dist/generated/cap-status-types.d.ts.map +1 -0
- package/dist/generated/capability-router-map.d.ts +278 -0
- package/dist/generated/capability-router-map.d.ts.map +1 -0
- package/dist/generated/device-local-state.d.ts +82 -0
- package/dist/generated/device-local-state.d.ts.map +1 -0
- package/dist/generated/device-proxy.d.ts +146 -0
- package/dist/generated/device-proxy.d.ts.map +1 -0
- package/dist/generated/system-proxy.d.ts +92 -0
- package/dist/generated/system-proxy.d.ts.map +1 -0
- package/dist/helpers/bind-addon-actions.d.ts +19 -0
- package/dist/helpers/bind-addon-actions.d.ts.map +1 -0
- package/dist/index.d.ts +91 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4843 -477
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4832 -415
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/addon.d.ts +760 -132
- package/dist/interfaces/addon.d.ts.map +1 -1
- package/dist/interfaces/advanced-notifier.d.ts +3 -2
- package/dist/interfaces/advanced-notifier.d.ts.map +1 -1
- package/dist/interfaces/agent-protocol.d.ts +17 -173
- package/dist/interfaces/agent-protocol.d.ts.map +1 -1
- package/dist/interfaces/agent.d.ts +61 -0
- package/dist/interfaces/agent.d.ts.map +1 -1
- package/dist/interfaces/alerts.d.ts +14 -0
- package/dist/interfaces/alerts.d.ts.map +1 -0
- package/dist/interfaces/analysis-persistence.d.ts +37 -19
- package/dist/interfaces/analysis-persistence.d.ts.map +1 -1
- package/dist/interfaces/analysis.d.ts +33 -4
- package/dist/interfaces/analysis.d.ts.map +1 -1
- package/dist/interfaces/api-responses.d.ts +124 -0
- package/dist/interfaces/api-responses.d.ts.map +1 -0
- package/dist/interfaces/api-shared.d.ts +5 -79
- package/dist/interfaces/api-shared.d.ts.map +1 -1
- package/dist/interfaces/audio-analyzer.d.ts +49 -0
- package/dist/interfaces/audio-analyzer.d.ts.map +1 -0
- package/dist/interfaces/audio-codec.d.ts +123 -0
- package/dist/interfaces/audio-codec.d.ts.map +1 -0
- package/dist/interfaces/audio-inference-engine.d.ts +19 -0
- package/dist/interfaces/audio-inference-engine.d.ts.map +1 -0
- package/dist/interfaces/auth-provider.d.ts.map +1 -1
- package/dist/interfaces/auth.d.ts +4 -25
- package/dist/interfaces/auth.d.ts.map +1 -1
- package/dist/interfaces/camera-pipeline.d.ts +7 -20
- package/dist/interfaces/camera-pipeline.d.ts.map +1 -1
- package/dist/interfaces/capability.d.ts +171 -24
- package/dist/interfaces/capability.d.ts.map +1 -1
- package/dist/interfaces/config-ui.d.ts +746 -24
- package/dist/interfaces/config-ui.d.ts.map +1 -1
- package/dist/interfaces/context.d.ts +9 -4
- package/dist/interfaces/context.d.ts.map +1 -1
- package/dist/interfaces/decoder.d.ts +38 -3
- package/dist/interfaces/decoder.d.ts.map +1 -1
- package/dist/interfaces/detection-addon.d.ts +6 -6
- package/dist/interfaces/detection-addon.d.ts.map +1 -1
- package/dist/interfaces/device-capabilities/camera.d.ts +95 -18
- package/dist/interfaces/device-capabilities/camera.d.ts.map +1 -1
- package/dist/interfaces/device-capabilities/index.d.ts +0 -13
- package/dist/interfaces/device-capabilities/index.d.ts.map +1 -1
- package/dist/interfaces/device-provider.d.ts +18 -16
- package/dist/interfaces/device-provider.d.ts.map +1 -1
- package/dist/interfaces/device.d.ts +4 -21
- package/dist/interfaces/device.d.ts.map +1 -1
- package/dist/interfaces/embedding-encoder.d.ts +19 -0
- package/dist/interfaces/embedding-encoder.d.ts.map +1 -0
- package/dist/interfaces/engine-slots.d.ts +10 -0
- package/dist/interfaces/engine-slots.d.ts.map +1 -0
- package/dist/interfaces/event-bus.d.ts +710 -26
- package/dist/interfaces/event-bus.d.ts.map +1 -1
- package/dist/interfaces/inference-capabilities.d.ts +0 -17
- package/dist/interfaces/inference-capabilities.d.ts.map +1 -1
- package/dist/interfaces/inference-engine.d.ts +30 -10
- package/dist/interfaces/inference-engine.d.ts.map +1 -1
- package/dist/interfaces/integration-registry.d.ts +20 -20
- package/dist/interfaces/integration-registry.d.ts.map +1 -1
- package/dist/interfaces/kernel-abstractions.d.ts +83 -0
- package/dist/interfaces/kernel-abstractions.d.ts.map +1 -0
- package/dist/interfaces/logging.d.ts +89 -8
- package/dist/interfaces/logging.d.ts.map +1 -1
- package/dist/interfaces/metrics-provider.d.ts +17 -0
- package/dist/interfaces/metrics-provider.d.ts.map +1 -0
- package/dist/interfaces/network-quality.d.ts +4 -4
- package/dist/interfaces/network.d.ts +0 -16
- package/dist/interfaces/network.d.ts.map +1 -1
- package/dist/interfaces/notification.d.ts +1 -1
- package/dist/interfaces/pipeline-executor-capability.d.ts +200 -0
- package/dist/interfaces/pipeline-executor-capability.d.ts.map +1 -0
- package/dist/interfaces/pipeline-orchestrator-capability.d.ts +165 -0
- package/dist/interfaces/pipeline-orchestrator-capability.d.ts.map +1 -0
- package/dist/interfaces/pipeline-runner-capability.d.ts +147 -0
- package/dist/interfaces/pipeline-runner-capability.d.ts.map +1 -0
- package/dist/interfaces/pipeline-runner.d.ts +18 -2
- package/dist/interfaces/pipeline-runner.d.ts.map +1 -1
- package/dist/interfaces/platform.d.ts +1 -1
- package/dist/interfaces/platform.d.ts.map +1 -1
- package/dist/interfaces/queryable.d.ts +26 -0
- package/dist/interfaces/queryable.d.ts.map +1 -0
- package/dist/interfaces/raw-tensor-engine.d.ts +16 -0
- package/dist/interfaces/raw-tensor-engine.d.ts.map +1 -0
- package/dist/interfaces/readiness.d.ts +101 -0
- package/dist/interfaces/readiness.d.ts.map +1 -0
- package/dist/interfaces/repl.d.ts +1 -1
- package/dist/interfaces/restreamer.d.ts +3 -3
- package/dist/interfaces/scoped-token.d.ts +1 -21
- package/dist/interfaces/scoped-token.d.ts.map +1 -1
- package/dist/interfaces/server-analysis.d.ts +30 -87
- package/dist/interfaces/server-analysis.d.ts.map +1 -1
- package/dist/interfaces/storage-location.d.ts +120 -0
- package/dist/interfaces/storage-location.d.ts.map +1 -0
- package/dist/interfaces/storage.d.ts +124 -50
- package/dist/interfaces/storage.d.ts.map +1 -1
- package/dist/interfaces/stream-broker.d.ts +285 -17
- package/dist/interfaces/stream-broker.d.ts.map +1 -1
- package/dist/interfaces/webrtc-provider.d.ts +24 -0
- package/dist/interfaces/webrtc-provider.d.ts.map +1 -1
- package/dist/node.d.ts +6 -0
- package/dist/node.d.ts.map +1 -0
- package/dist/node.js +481 -0
- package/dist/node.js.map +1 -0
- package/dist/node.mjs +443 -0
- package/dist/node.mjs.map +1 -0
- package/dist/readiness/index.d.ts +3 -0
- package/dist/readiness/index.d.ts.map +1 -0
- package/dist/readiness/readiness-registry.d.ts +183 -0
- package/dist/readiness/readiness-registry.d.ts.map +1 -0
- package/dist/schemas/auth-records.d.ts +81 -0
- package/dist/schemas/auth-records.d.ts.map +1 -0
- package/dist/storage/filesystem-storage-provider.d.ts +37 -0
- package/dist/storage/filesystem-storage-provider.d.ts.map +1 -0
- package/dist/types/agent-pipeline-settings.d.ts +94 -0
- package/dist/types/agent-pipeline-settings.d.ts.map +1 -0
- package/dist/types/camera-pipeline.d.ts +58 -0
- package/dist/types/camera-pipeline.d.ts.map +1 -0
- package/dist/types/detection.d.ts +195 -38
- package/dist/types/detection.d.ts.map +1 -1
- package/dist/types/device-type.d.ts +4 -0
- package/dist/types/device-type.d.ts.map +1 -1
- package/dist/types/engine-output.d.ts +24 -0
- package/dist/types/engine-output.d.ts.map +1 -0
- package/dist/types/io.d.ts +57 -3
- package/dist/types/io.d.ts.map +1 -1
- package/dist/types/models.d.ts +3 -1
- package/dist/types/models.d.ts.map +1 -1
- package/dist/types/pipeline-schema.d.ts +15 -72
- package/dist/types/pipeline-schema.d.ts.map +1 -1
- package/dist/types/pipeline-step.d.ts +201 -0
- package/dist/types/pipeline-step.d.ts.map +1 -0
- package/dist/types/pipeline.d.ts +24 -1
- package/dist/types/pipeline.d.ts.map +1 -1
- package/dist/utils/element-config-store.d.ts +29 -0
- package/dist/utils/element-config-store.d.ts.map +1 -0
- package/dist/utils/err-msg.d.ts +7 -0
- package/dist/utils/err-msg.d.ts.map +1 -0
- package/dist/utils/json-safe.d.ts +33 -0
- package/dist/utils/json-safe.d.ts.map +1 -0
- package/dist/utils/mask-url.d.ts +10 -0
- package/dist/utils/mask-url.d.ts.map +1 -0
- package/dist/utils/ring-buffer.d.ts +16 -0
- package/dist/utils/ring-buffer.d.ts.map +1 -0
- package/dist/utils/run-inference-step.d.ts +26 -0
- package/dist/utils/run-inference-step.d.ts.map +1 -0
- package/dist/utils/runtime-mapping.d.ts +88 -0
- package/dist/utils/runtime-mapping.d.ts.map +1 -0
- package/dist/utils/zone-rule-eval.d.ts +47 -0
- package/dist/utils/zone-rule-eval.d.ts.map +1 -0
- package/package.json +11 -2
- package/dist/__tests__/addon-capability-provider.test.d.ts +0 -2
- package/dist/__tests__/addon-capability-provider.test.d.ts.map +0 -1
- package/dist/__tests__/addon-declaration.test.d.ts +0 -2
- package/dist/__tests__/addon-declaration.test.d.ts.map +0 -1
- package/dist/__tests__/capability.test.d.ts +0 -2
- package/dist/__tests__/capability.test.d.ts.map +0 -1
- package/dist/interfaces/addon-i18n.d.ts +0 -41
- package/dist/interfaces/addon-i18n.d.ts.map +0 -1
- package/dist/interfaces/classifier.d.ts +0 -8
- package/dist/interfaces/classifier.d.ts.map +0 -1
- package/dist/interfaces/cropper.d.ts +0 -8
- package/dist/interfaces/cropper.d.ts.map +0 -1
- package/dist/interfaces/detector.d.ts +0 -8
- package/dist/interfaces/detector.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/accessory.d.ts +0 -14
- package/dist/interfaces/device-capabilities/accessory.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/audio-detector.d.ts +0 -12
- package/dist/interfaces/device-capabilities/audio-detector.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/doorbell.d.ts +0 -10
- package/dist/interfaces/device-capabilities/doorbell.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/events.d.ts +0 -47
- package/dist/interfaces/device-capabilities/events.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/motion-sensor.d.ts +0 -7
- package/dist/interfaces/device-capabilities/motion-sensor.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/native-detection.d.ts +0 -14
- package/dist/interfaces/device-capabilities/native-detection.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/object-detector.d.ts +0 -59
- package/dist/interfaces/device-capabilities/object-detector.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/pan-tilt-zoom.d.ts +0 -29
- package/dist/interfaces/device-capabilities/pan-tilt-zoom.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/recording.d.ts +0 -18
- package/dist/interfaces/device-capabilities/recording.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/siren.d.ts +0 -8
- package/dist/interfaces/device-capabilities/siren.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/status-light.d.ts +0 -7
- package/dist/interfaces/device-capabilities/status-light.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/switch.d.ts +0 -8
- package/dist/interfaces/device-capabilities/switch.d.ts.map +0 -1
- package/dist/interfaces/device-capabilities/two-way-audio.d.ts +0 -8
- package/dist/interfaces/device-capabilities/two-way-audio.d.ts.map +0 -1
- package/dist/interfaces/device-capability.d.ts +0 -14
- package/dist/interfaces/device-capability.d.ts.map +0 -1
- package/dist/interfaces/model-catalog.d.ts +0 -25
- package/dist/interfaces/model-catalog.d.ts.map +0 -1
- package/dist/interfaces/refiner.d.ts +0 -8
- package/dist/interfaces/refiner.d.ts.map +0 -1
- package/dist/interfaces/repositories.d.ts +0 -20
- package/dist/interfaces/repositories.d.ts.map +0 -1
- package/dist/interfaces/scene-intelligence.d.ts +0 -21
- package/dist/interfaces/scene-intelligence.d.ts.map +0 -1
- package/dist/interfaces/storage-backend.d.ts +0 -27
- package/dist/interfaces/storage-backend.d.ts.map +0 -1
- package/dist/interfaces/worker-protocol.d.ts +0 -110
- package/dist/interfaces/worker-protocol.d.ts.map +0 -1
- package/dist/schemas/system-settings-schemas.d.ts +0 -27
- package/dist/schemas/system-settings-schemas.d.ts.map +0 -1
- package/dist/types/benchmark.d.ts +0 -112
- package/dist/types/benchmark.d.ts.map +0 -1
- package/dist/types/zones.d.ts +0 -48
- package/dist/types/zones.d.ts.map +0 -1
|
@@ -1,6 +1,264 @@
|
|
|
1
|
+
import type { FrameResult, AudioResult } from '../types/detection.js';
|
|
2
|
+
import type { PipelineExecutionTrace } from '../types/pipeline-step.js';
|
|
3
|
+
import type { MotionRegion } from '../capabilities/motion-detection.cap.js';
|
|
4
|
+
import type { CameraPipelineConfig } from '../types/camera-pipeline.js';
|
|
5
|
+
import type { CameraMetrics } from './api-shared.js';
|
|
6
|
+
import type { RunnerLocalLoad } from './pipeline-runner-capability.js';
|
|
7
|
+
import type { BrokerStats } from './stream-broker.js';
|
|
8
|
+
import type { PipelineEngineChoice } from '../types/pipeline.js';
|
|
9
|
+
import type { NodeProcess, SystemResourceSnapshot } from './metrics-provider.js';
|
|
1
10
|
export interface EventSource {
|
|
11
|
+
/** Primary source type: 'core', 'addon', 'device', 'pipeline', etc. */
|
|
2
12
|
type: string;
|
|
3
|
-
|
|
13
|
+
/** Primary identifier — addonId when type='addon', deviceId when type='device', etc. */
|
|
14
|
+
id: string | number;
|
|
15
|
+
/** Agent/node that originated the event (e.g. 'hub', 'agent-a1b2c3'). */
|
|
16
|
+
nodeId?: string;
|
|
17
|
+
/** Addon that originated the event (populated even when type='device'). */
|
|
18
|
+
addonId?: string;
|
|
19
|
+
/** Device the event relates to (populated even when type='addon'). */
|
|
20
|
+
deviceId?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* One detection entry emitted by a camera's firmware (not by the local
|
|
24
|
+
* AI pipeline). Carried inside `detection.camera-native` events —
|
|
25
|
+
* native providers fan out to this category for each ring/motion/AI
|
|
26
|
+
* alarm push they receive from the camera.
|
|
27
|
+
*/
|
|
28
|
+
export interface CameraNativeDetection {
|
|
29
|
+
/**
|
|
30
|
+
* Firmware-reported class. Loose string to accommodate heterogeneous
|
|
31
|
+
* firmwares (Reolink uses 'people'/'vehicle'/'animal'/…; ONVIF uses
|
|
32
|
+
* 'PeopleDetect'; etc.). Common values: 'motion', 'person', 'vehicle',
|
|
33
|
+
* 'animal', 'face', 'package', 'other', 'doorbell'.
|
|
34
|
+
*/
|
|
35
|
+
readonly class: string;
|
|
36
|
+
/** Ms epoch when the server observed the push from the camera. */
|
|
37
|
+
readonly timestamp: number;
|
|
38
|
+
/** Optional firmware-provided confidence [0..1]. Most firmwares don't expose it. */
|
|
39
|
+
readonly confidence?: number;
|
|
40
|
+
/** Optional bbox [x, y, w, h] normalised [0..1]. Rare on native events. */
|
|
41
|
+
readonly bbox?: readonly [number, number, number, number];
|
|
42
|
+
}
|
|
43
|
+
export interface MotionAnalysisPayload {
|
|
44
|
+
detected: boolean;
|
|
45
|
+
regionCount: number;
|
|
46
|
+
regions: readonly MotionRegion[];
|
|
47
|
+
frameWidth: number;
|
|
48
|
+
frameHeight: number;
|
|
49
|
+
analysisMs: number;
|
|
50
|
+
[key: string]: unknown;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Motion phase transition payload. Single source of truth lives in
|
|
54
|
+
* `motion.cap.ts` as `MotionOnMotionChangedDataSchema` — this alias
|
|
55
|
+
* just re-exports the inferred type with the `[key: string]: unknown`
|
|
56
|
+
* loose-index pattern the bus uses for forward-compat. Don't add
|
|
57
|
+
* fields here; extend the schema in motion.cap.ts.
|
|
58
|
+
*/
|
|
59
|
+
export type MotionOnMotionChangedPayload = import('../capabilities/motion.cap.js').MotionOnMotionChangedData & {
|
|
60
|
+
[key: string]: unknown;
|
|
61
|
+
};
|
|
62
|
+
/** Raw motion zone from CCL (before minArea filter). */
|
|
63
|
+
export interface MotionRawZone {
|
|
64
|
+
readonly bbox: readonly [number, number, number, number];
|
|
65
|
+
readonly pixelCount: number;
|
|
66
|
+
readonly changeScore: number;
|
|
67
|
+
}
|
|
68
|
+
/** All raw motion zones — emitted for UI debug overlay. */
|
|
69
|
+
export interface MotionZonesRawPayload {
|
|
70
|
+
readonly deviceId: number;
|
|
71
|
+
readonly zones: readonly MotionRawZone[];
|
|
72
|
+
readonly frameSize: {
|
|
73
|
+
readonly width: number;
|
|
74
|
+
readonly height: number;
|
|
75
|
+
};
|
|
76
|
+
readonly timestamp: number;
|
|
77
|
+
[key: string]: unknown;
|
|
78
|
+
}
|
|
79
|
+
export interface DetectionResultPayload {
|
|
80
|
+
/**
|
|
81
|
+
* The post-processed frame result the frontend consumes. Already
|
|
82
|
+
* contains `width`/`height` + `detections[]` + optional debug. No
|
|
83
|
+
* pipeline-raw wrapper — the new `FrameResult` shape IS the payload.
|
|
84
|
+
*/
|
|
85
|
+
frame: FrameResult;
|
|
86
|
+
/** Events emitted by the analysis pipeline (tracking, scene state, face rec). */
|
|
87
|
+
analysisResults: readonly unknown[];
|
|
88
|
+
[key: string]: unknown;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Raw inference output emitted by `addon-pipeline-runner` per detection
|
|
92
|
+
* frame. Carries the FrameResult produced by the runner — the hub-side
|
|
93
|
+
* wiring service subscribes, applies the analysis pipeline +
|
|
94
|
+
* notifications, and re-emits as `detection.result`.
|
|
95
|
+
*/
|
|
96
|
+
export interface PipelineInferenceResultPayload {
|
|
97
|
+
readonly deviceId: number;
|
|
98
|
+
readonly frame: FrameResult;
|
|
99
|
+
/** The Moleculer node id of the runner that produced this result. */
|
|
100
|
+
readonly nodeId: string;
|
|
101
|
+
readonly [key: string]: unknown;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Live per-audio-chunk output emitted by the pipeline-orchestrator for
|
|
105
|
+
* each camera with audio analysis enabled. Mirrors `PipelineInferenceResultPayload`
|
|
106
|
+
* but for audio: carries the canonical `AudioResult` produced by running
|
|
107
|
+
* the audio-analyzer + audio-classifier inline on the hub.
|
|
108
|
+
*
|
|
109
|
+
* Replaces the legacy split `detection.audio.level` /
|
|
110
|
+
* `detection.audio.classification` events — consumers should read
|
|
111
|
+
* `frame.level` for dBFS/RMS and `frame.detections` for classifier
|
|
112
|
+
* matches (both on the same single event).
|
|
113
|
+
*/
|
|
114
|
+
export interface PipelineAudioInferenceResultPayload {
|
|
115
|
+
readonly deviceId: number;
|
|
116
|
+
readonly frame: AudioResult;
|
|
117
|
+
/** Node id of the host that ran the analyzer — always `'hub'` today
|
|
118
|
+
* because audio runs inline on the hub, but the field is kept so the
|
|
119
|
+
* event shape matches `PipelineInferenceResultPayload`. */
|
|
120
|
+
readonly nodeId: string;
|
|
121
|
+
readonly [key: string]: unknown;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Camera assignment lifecycle payload emitted by `addon-pipeline-orchestrator`
|
|
125
|
+
* when a camera is assigned to or unassigned from an agent runner. Used by
|
|
126
|
+
* the UI / metrics dashboard. No frame data.
|
|
127
|
+
*/
|
|
128
|
+
export interface PipelineCameraAssignmentPayload {
|
|
129
|
+
readonly deviceId: number;
|
|
130
|
+
readonly agentNodeId: string;
|
|
131
|
+
/** True when the assignment was set manually (preferredAgent setting), false when chosen by the load balancer. */
|
|
132
|
+
readonly pinned: boolean;
|
|
133
|
+
readonly reason: 'manual' | 'capacity' | 'hardware-affinity' | 'failover' | 'rebalance' | 'unassigned';
|
|
134
|
+
readonly [key: string]: unknown;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Capability binding change payload emitted whenever an operator picks
|
|
138
|
+
* a different addon to implement a capability on a node. Each kernel
|
|
139
|
+
* process subscribes to this event and updates its local
|
|
140
|
+
* `preferredProviderRegistry` so subsequent capability lookups return
|
|
141
|
+
* the newly chosen provider.
|
|
142
|
+
*
|
|
143
|
+
* The event lives under `capability.binding-changed` because binding
|
|
144
|
+
* is a kernel-level concept used by any cap provider (not just the
|
|
145
|
+
* pipeline flow). It was renamed from `pipeline.binding-changed` to
|
|
146
|
+
* reflect that broader scope.
|
|
147
|
+
*/
|
|
148
|
+
export interface CapabilityBindingChangedPayload {
|
|
149
|
+
readonly nodeId: string;
|
|
150
|
+
readonly capName: string;
|
|
151
|
+
/** New preferred addon id, or null when the binding was cleared. */
|
|
152
|
+
readonly addonId: string | null;
|
|
153
|
+
readonly [key: string]: unknown;
|
|
154
|
+
}
|
|
155
|
+
export interface PhaseTransitionPayload {
|
|
156
|
+
deviceId: number;
|
|
157
|
+
from: 'watching' | 'active';
|
|
158
|
+
to: 'watching' | 'active';
|
|
159
|
+
reason: 'motion_detected' | 'cooldown_expired';
|
|
160
|
+
/** Motion source that armed the cooldown — present on both ON and OFF. */
|
|
161
|
+
source?: 'onboard' | 'analyzer';
|
|
162
|
+
/** Cooldown window in ms that was/is active for this transition. */
|
|
163
|
+
cooldownMs?: number;
|
|
164
|
+
/** Ms epoch of the transition. */
|
|
165
|
+
timestamp?: number;
|
|
166
|
+
[key: string]: unknown;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Scope of a readiness transition — the "who does this ready/down apply to".
|
|
170
|
+
*
|
|
171
|
+
* Two shapes today:
|
|
172
|
+
* - `global` for singletons that are cluster-wide (there is only one hub).
|
|
173
|
+
* - `node` for per-process providers (one readiness per broker nodeID).
|
|
174
|
+
*
|
|
175
|
+
* `device` scope covers per-device native caps registered via
|
|
176
|
+
* `DeviceContext.registerNativeCap(cap, provider)`. Consumers of cross-
|
|
177
|
+
* process per-device caps (stream-broker, orchestrator, snapshot, webrtc)
|
|
178
|
+
* `awaitReady(capName, {type:'device', deviceId})` before calling the
|
|
179
|
+
* native-cap bridge so they don't race the service-advertise window.
|
|
180
|
+
* On worker disconnect the hub-side registry's `agent.offline` demux
|
|
181
|
+
* synthesises `down` for every device-scoped cap whose `sourceNodeId`
|
|
182
|
+
* matches the offline node — same pattern as node-scoped synthesis.
|
|
183
|
+
*/
|
|
184
|
+
export type ReadinessScope = {
|
|
185
|
+
readonly type: 'global';
|
|
186
|
+
} | {
|
|
187
|
+
readonly type: 'node';
|
|
188
|
+
readonly nodeId: string;
|
|
189
|
+
} | {
|
|
190
|
+
readonly type: 'device';
|
|
191
|
+
readonly deviceId: number;
|
|
192
|
+
};
|
|
193
|
+
/** States a capability provider transitions through. */
|
|
194
|
+
export type ReadinessState = 'starting' | 'ready' | 'down';
|
|
195
|
+
/**
|
|
196
|
+
* Payload for `system.ready-state` events.
|
|
197
|
+
*
|
|
198
|
+
* `generation` is a per-process random identifier that stays constant
|
|
199
|
+
* for the producer's lifetime and changes whenever the producer process
|
|
200
|
+
* is restarted. The kernel's local `ReadinessRegistry` derives a
|
|
201
|
+
* monotonic `epoch` per `(capName, scope)` by counting generation
|
|
202
|
+
* transitions — emitters never stamp epoch themselves. Consumers that
|
|
203
|
+
* hold long-lived state compare `transition.epoch > lastSeenEpoch` to
|
|
204
|
+
* decide whether to rebuild.
|
|
205
|
+
*
|
|
206
|
+
* Same-generation repeated `ready` events are idempotent keepalives
|
|
207
|
+
* (e.g. re-emitted on every `$node.connected`) — the registry keeps
|
|
208
|
+
* epoch stable.
|
|
209
|
+
*/
|
|
210
|
+
export interface SystemReadyStatePayload {
|
|
211
|
+
readonly capName: string;
|
|
212
|
+
readonly scope: ReadinessScope;
|
|
213
|
+
readonly state: ReadinessState;
|
|
214
|
+
/** Per-process random id; changes on producer restart. */
|
|
215
|
+
readonly generation: string;
|
|
216
|
+
readonly sourceNodeId: string;
|
|
217
|
+
readonly ts: number;
|
|
218
|
+
readonly [key: string]: unknown;
|
|
219
|
+
}
|
|
220
|
+
/** One service entry inside a topology process — addon + capabilities. */
|
|
221
|
+
export interface TopologyService {
|
|
222
|
+
readonly addonId: string;
|
|
223
|
+
readonly capabilities: readonly string[];
|
|
224
|
+
readonly status: string;
|
|
225
|
+
}
|
|
226
|
+
/** One process under a topology node (main process + isolated workers). */
|
|
227
|
+
export interface TopologyProcess {
|
|
228
|
+
readonly pid: number;
|
|
229
|
+
readonly name: string;
|
|
230
|
+
readonly state: string;
|
|
231
|
+
readonly cpuPercent: number;
|
|
232
|
+
readonly memoryRss: number;
|
|
233
|
+
readonly uptimeSeconds: number;
|
|
234
|
+
readonly services: readonly TopologyService[];
|
|
235
|
+
readonly groupId?: string;
|
|
236
|
+
}
|
|
237
|
+
/** Top-level cluster node — hub or remote agent. */
|
|
238
|
+
export interface TopologyNode {
|
|
239
|
+
readonly id: string;
|
|
240
|
+
readonly name: string;
|
|
241
|
+
readonly hostname: string;
|
|
242
|
+
readonly platform: string;
|
|
243
|
+
readonly arch: string;
|
|
244
|
+
readonly cpuModel: string | null;
|
|
245
|
+
readonly cpuCores: number;
|
|
246
|
+
readonly memoryMB: number;
|
|
247
|
+
readonly engines: readonly string[];
|
|
248
|
+
readonly isHub: boolean;
|
|
249
|
+
readonly isOnline: boolean;
|
|
250
|
+
readonly cpuPercent: number;
|
|
251
|
+
readonly memoryPercent: number;
|
|
252
|
+
readonly uptime: number;
|
|
253
|
+
readonly lastSeen: string;
|
|
254
|
+
/** Local IP addresses visible on the network (non-internal, IPv4/IPv6). */
|
|
255
|
+
readonly localIps: readonly string[];
|
|
256
|
+
readonly addons: ReadonlyArray<{
|
|
257
|
+
readonly id: string;
|
|
258
|
+
readonly capabilities: readonly string[];
|
|
259
|
+
readonly status: string;
|
|
260
|
+
}>;
|
|
261
|
+
readonly processes: readonly TopologyProcess[];
|
|
4
262
|
}
|
|
5
263
|
/** All known event categories with their typed payloads */
|
|
6
264
|
export interface EventCatalog {
|
|
@@ -11,6 +269,7 @@ export interface EventCatalog {
|
|
|
11
269
|
activeAddons: readonly string[];
|
|
12
270
|
};
|
|
13
271
|
'system.restarting': Record<string, never>;
|
|
272
|
+
'system.ready-state': SystemReadyStatePayload;
|
|
14
273
|
'addon.started': {
|
|
15
274
|
addonId: string;
|
|
16
275
|
packageName?: string;
|
|
@@ -66,13 +325,89 @@ export interface EventCatalog {
|
|
|
66
325
|
phase?: string;
|
|
67
326
|
};
|
|
68
327
|
'device.registered': {
|
|
69
|
-
deviceId:
|
|
328
|
+
deviceId: number;
|
|
70
329
|
providerId: string;
|
|
71
330
|
name?: string;
|
|
72
331
|
};
|
|
73
332
|
'device.unregistered': {
|
|
74
|
-
deviceId:
|
|
333
|
+
deviceId: number;
|
|
334
|
+
providerId: string;
|
|
335
|
+
};
|
|
336
|
+
'device.streams-registered': {
|
|
337
|
+
deviceId: number;
|
|
338
|
+
providerId: string;
|
|
339
|
+
};
|
|
340
|
+
'device.streams-unregistered': {
|
|
341
|
+
deviceId: number;
|
|
342
|
+
};
|
|
343
|
+
'device.enabled': {
|
|
344
|
+
deviceId: number;
|
|
345
|
+
integrationId: string;
|
|
346
|
+
};
|
|
347
|
+
'device.disabled': {
|
|
348
|
+
deviceId: number;
|
|
349
|
+
integrationId: string;
|
|
350
|
+
};
|
|
351
|
+
'device.settings-updated': {
|
|
352
|
+
deviceId: number;
|
|
353
|
+
integrationId: string;
|
|
354
|
+
keys: string[];
|
|
355
|
+
};
|
|
356
|
+
/**
|
|
357
|
+
* Device online/offline aggregate. Emitted by the device's owning
|
|
358
|
+
* provider (rtsp / reolink / onvif / frigate) when the union of its
|
|
359
|
+
* stream-broker profile health flips. `online` fires when at least
|
|
360
|
+
* one profile becomes healthy after all were offline; `offline` fires
|
|
361
|
+
* when the last healthy profile goes stale (no packets for
|
|
362
|
+
* STREAM_STALE_TIMEOUT_MS).
|
|
363
|
+
*/
|
|
364
|
+
'device.online': {
|
|
365
|
+
deviceId: number;
|
|
366
|
+
providerId: string;
|
|
367
|
+
profileCount?: number;
|
|
368
|
+
reason?: string;
|
|
369
|
+
};
|
|
370
|
+
'device.offline': {
|
|
371
|
+
deviceId: number;
|
|
75
372
|
providerId: string;
|
|
373
|
+
reason?: string;
|
|
374
|
+
};
|
|
375
|
+
'device.awake': {
|
|
376
|
+
deviceId: number;
|
|
377
|
+
providerId: string;
|
|
378
|
+
reason?: string;
|
|
379
|
+
};
|
|
380
|
+
'device.sleeping': {
|
|
381
|
+
deviceId: number;
|
|
382
|
+
providerId: string;
|
|
383
|
+
reason?: string;
|
|
384
|
+
};
|
|
385
|
+
/**
|
|
386
|
+
* Emitted whenever the set of (device, capability) native providers or
|
|
387
|
+
* wrapper activations changes. Hub subscribers use this to keep a
|
|
388
|
+
* cross-process view of which addon/node currently serves each cap for
|
|
389
|
+
* each device. `nodeId` is the broker nodeID where the provider lives;
|
|
390
|
+
* 'hub' for hub-local. `addonId` is the provider (native or wrapper).
|
|
391
|
+
*/
|
|
392
|
+
'device.bindings-changed': {
|
|
393
|
+
deviceId: number;
|
|
394
|
+
capName: string;
|
|
395
|
+
reason: 'native-registered' | 'native-unregistered' | 'wrapper-activated' | 'wrapper-deactivated';
|
|
396
|
+
addonId: string;
|
|
397
|
+
nodeId: string;
|
|
398
|
+
};
|
|
399
|
+
'device.meta-changed': {
|
|
400
|
+
deviceId: number;
|
|
401
|
+
field: 'name' | 'location' | 'disabled';
|
|
402
|
+
value: string | null | boolean;
|
|
403
|
+
};
|
|
404
|
+
'integration.enabled': {
|
|
405
|
+
integrationId: string;
|
|
406
|
+
addonId: string;
|
|
407
|
+
};
|
|
408
|
+
'integration.disabled': {
|
|
409
|
+
integrationId: string;
|
|
410
|
+
addonId: string;
|
|
76
411
|
};
|
|
77
412
|
'provider.started': {
|
|
78
413
|
providerId: string;
|
|
@@ -95,33 +430,33 @@ export interface EventCatalog {
|
|
|
95
430
|
processId: string;
|
|
96
431
|
};
|
|
97
432
|
'recording.started': {
|
|
98
|
-
deviceId:
|
|
433
|
+
deviceId: number;
|
|
99
434
|
streamId?: string;
|
|
100
435
|
};
|
|
101
436
|
'recording.stopped': {
|
|
102
|
-
deviceId:
|
|
437
|
+
deviceId: number;
|
|
103
438
|
reason?: string;
|
|
104
439
|
};
|
|
105
440
|
'recording.error': {
|
|
106
|
-
deviceId:
|
|
441
|
+
deviceId: number;
|
|
107
442
|
error: string;
|
|
108
443
|
};
|
|
109
444
|
'recording.health.degraded': {
|
|
110
|
-
deviceId:
|
|
445
|
+
deviceId: number;
|
|
111
446
|
message: string;
|
|
112
447
|
};
|
|
113
448
|
'recording.storage.critical': {
|
|
114
|
-
deviceId:
|
|
449
|
+
deviceId: number;
|
|
115
450
|
usagePercent?: number;
|
|
116
451
|
};
|
|
117
452
|
'recording.segment.written': {
|
|
118
|
-
deviceId:
|
|
453
|
+
deviceId: number;
|
|
119
454
|
path?: string;
|
|
120
455
|
durationSec?: number;
|
|
121
456
|
sizeMB?: number;
|
|
122
457
|
};
|
|
123
458
|
'recording.policy.fallback': {
|
|
124
|
-
deviceId:
|
|
459
|
+
deviceId: number;
|
|
125
460
|
reason: string;
|
|
126
461
|
};
|
|
127
462
|
'recording.retention.completed': {
|
|
@@ -129,36 +464,269 @@ export interface EventCatalog {
|
|
|
129
464
|
freedMB?: number;
|
|
130
465
|
};
|
|
131
466
|
'detection.event': {
|
|
132
|
-
deviceId:
|
|
467
|
+
deviceId: number;
|
|
133
468
|
detections?: unknown[];
|
|
134
469
|
[key: string]: unknown;
|
|
135
470
|
};
|
|
471
|
+
'detection.result': DetectionResultPayload;
|
|
472
|
+
'detection.motion-analysis': MotionAnalysisPayload;
|
|
473
|
+
'detection.motion-zones-raw': MotionZonesRawPayload;
|
|
474
|
+
'motion.on-motion-changed': MotionOnMotionChangedPayload;
|
|
475
|
+
/**
|
|
476
|
+
* On-board detection coming straight from the camera firmware (Reolink
|
|
477
|
+
* AI alarms, ONVIF analytics, etc.) — as opposed to `detection.result`
|
|
478
|
+
* which is produced by the pipeline running locally.
|
|
479
|
+
*
|
|
480
|
+
* `source` discriminates the origin when multiple pipelines coexist for
|
|
481
|
+
* the same camera: `'onboard'` for native firmware events, `'camera-native'`
|
|
482
|
+
* kept as an alias for backwards compatibility with pre-Reolink emitters.
|
|
483
|
+
*
|
|
484
|
+
* `detections` is tightened from `unknown[]` to a structured shape. Each
|
|
485
|
+
* entry describes one firmware-reported class ('motion', 'person',
|
|
486
|
+
* 'vehicle', 'animal', 'face', 'package', 'other', …) at a point in time.
|
|
487
|
+
*/
|
|
488
|
+
'detection.camera-native': {
|
|
489
|
+
cameraId: number;
|
|
490
|
+
detections: readonly CameraNativeDetection[];
|
|
491
|
+
source: 'onboard' | 'camera-native';
|
|
492
|
+
};
|
|
493
|
+
'pipeline.audio-inference-result': PipelineAudioInferenceResultPayload;
|
|
494
|
+
'detection.phase-transition': PhaseTransitionPayload;
|
|
495
|
+
/**
|
|
496
|
+
* Emitted whenever a per-device override is written or cleared for any
|
|
497
|
+
* pipeline-participating addon (pipeline-orchestrator, motion-wasm,
|
|
498
|
+
* detection-pipeline, audio-analyzer, audio-classifier). The wiring
|
|
499
|
+
* service subscribes to this event and restarts detection for the
|
|
500
|
+
* affected camera so the new values take effect without a full reboot.
|
|
501
|
+
* `addonId` is informational — most consumers only care about
|
|
502
|
+
* `deviceId` and will rebuild the full RunnerCameraConfig anyway.
|
|
503
|
+
*/
|
|
504
|
+
'orchestration.settings-updated': {
|
|
505
|
+
deviceId: number;
|
|
506
|
+
addonId?: string;
|
|
507
|
+
};
|
|
508
|
+
'provider.motion': {
|
|
509
|
+
active: boolean;
|
|
510
|
+
};
|
|
511
|
+
'provider.detection': {
|
|
512
|
+
detections: unknown;
|
|
513
|
+
};
|
|
136
514
|
'session.track.new': {
|
|
137
|
-
deviceId:
|
|
515
|
+
deviceId: number;
|
|
138
516
|
trackId: string;
|
|
139
517
|
label?: string;
|
|
140
518
|
};
|
|
141
519
|
'session.track.expired': {
|
|
142
|
-
deviceId:
|
|
520
|
+
deviceId: number;
|
|
143
521
|
trackId: string;
|
|
144
522
|
durationMs?: number;
|
|
145
523
|
};
|
|
524
|
+
/**
|
|
525
|
+
* Progress from a running benchmark (pipeline image test, decoder perf test,
|
|
526
|
+
* …). The payload is intentionally open (`kind` discriminator + free-form
|
|
527
|
+
* additional fields) so different benchmark shapes share the same bus
|
|
528
|
+
* category and a single UI subscriber can filter by `kind` + `sessionId`.
|
|
529
|
+
*/
|
|
530
|
+
'benchmark.progress': {
|
|
531
|
+
kind: string;
|
|
532
|
+
sessionId: string;
|
|
533
|
+
phase?: string;
|
|
534
|
+
tSec?: number;
|
|
535
|
+
sample?: Record<string, unknown>;
|
|
536
|
+
message?: string;
|
|
537
|
+
};
|
|
146
538
|
'pipeline.progress': {
|
|
539
|
+
/** Node that executed the pipeline step. Same value is also set on `event.source.nodeId`
|
|
540
|
+
* but carried in the payload so admin-ui filters don't need to peek at the source shape. */
|
|
541
|
+
nodeId: string;
|
|
542
|
+
/** Stable identifier per `runPipeline()` invocation — every progress event from the same
|
|
543
|
+
* run shares this id so the UI can correlate a burst of messages into a single run card. */
|
|
544
|
+
sessionId: string;
|
|
147
545
|
step: string;
|
|
148
546
|
addonId?: string;
|
|
149
547
|
modelId?: string;
|
|
150
548
|
ms?: number;
|
|
151
549
|
message?: string;
|
|
152
550
|
};
|
|
551
|
+
/** Per-frame execution trace emitted by the pipeline executor for live observability. */
|
|
552
|
+
'pipeline.trace': PipelineExecutionTrace;
|
|
553
|
+
/** Raw inference output emitted by addon-pipeline-runner (no frame buffer). */
|
|
554
|
+
'pipeline.inference-result': PipelineInferenceResultPayload;
|
|
555
|
+
/** Camera assigned to an agent runner by addon-pipeline-orchestrator. */
|
|
556
|
+
'pipeline.camera-assigned': PipelineCameraAssignmentPayload;
|
|
557
|
+
/** Camera released from an agent runner. */
|
|
558
|
+
'pipeline.camera-unassigned': PipelineCameraAssignmentPayload;
|
|
559
|
+
/** Per-camera pipeline config changed — orchestrator hot-reloads the assigned runner. */
|
|
560
|
+
'pipeline.camera-updated': {
|
|
561
|
+
readonly deviceId: number;
|
|
562
|
+
readonly config: CameraPipelineConfig;
|
|
563
|
+
};
|
|
564
|
+
/**
|
|
565
|
+
* Periodic per-runner load snapshot (~1 Hz). Replaces UI polling on
|
|
566
|
+
* `pipelineRunner.getLocalLoad`. UI subscribes per agent node.
|
|
567
|
+
*/
|
|
568
|
+
'pipeline.runner-load-snapshot': {
|
|
569
|
+
readonly nodeId: string;
|
|
570
|
+
readonly load: RunnerLocalLoad;
|
|
571
|
+
/** Wall-clock ms when the snapshot was sampled. */
|
|
572
|
+
readonly timestamp: number;
|
|
573
|
+
};
|
|
574
|
+
/**
|
|
575
|
+
* Periodic per-camera metrics snapshot (~1 Hz). Replaces UI polling
|
|
576
|
+
* on `pipelineOrchestrator.getCameraMetrics` /
|
|
577
|
+
* `pipelineRunner.getCameraMetrics`. One event per attached camera
|
|
578
|
+
* per tick. UI consumers filter by `deviceId`.
|
|
579
|
+
*/
|
|
580
|
+
'pipeline.camera-metrics-snapshot': {
|
|
581
|
+
readonly deviceId: number;
|
|
582
|
+
readonly nodeId: string;
|
|
583
|
+
readonly metrics: CameraMetrics;
|
|
584
|
+
readonly timestamp: number;
|
|
585
|
+
};
|
|
586
|
+
/**
|
|
587
|
+
* Periodic per-broker stats snapshot (~1 Hz). Replaces polling on
|
|
588
|
+
* `streamBroker.getBrokerStats` and `streamBroker.listAllProfileSlots`.
|
|
589
|
+
* Carries the full `BrokerStats` payload so UI consumers can render
|
|
590
|
+
* the panel directly from the event without round-tripping the cap.
|
|
591
|
+
*/
|
|
592
|
+
'stream-broker.metrics-snapshot': {
|
|
593
|
+
readonly brokerId: string;
|
|
594
|
+
readonly deviceId: number;
|
|
595
|
+
readonly profile: string;
|
|
596
|
+
readonly nodeId: string;
|
|
597
|
+
readonly stats: BrokerStats;
|
|
598
|
+
readonly timestamp: number;
|
|
599
|
+
};
|
|
600
|
+
/**
|
|
601
|
+
* Cap event: stream-broker signals that a profile slot now has at
|
|
602
|
+
* least one consumer. Camera-provider addons (Reolink Baichuan push,
|
|
603
|
+
* etc.) start their underlying transport on receipt — see
|
|
604
|
+
* `EventCategory.StreamBrokerOnCamStreamDemand`.
|
|
605
|
+
*/
|
|
606
|
+
'stream-broker.onCamStreamDemand': {
|
|
607
|
+
readonly deviceId: number;
|
|
608
|
+
readonly camStreamId: string;
|
|
609
|
+
readonly profile: 'high' | 'mid' | 'low';
|
|
610
|
+
};
|
|
611
|
+
/**
|
|
612
|
+
* Cap event: stream-broker signals the last consumer left. Providers
|
|
613
|
+
* tear down their transport — see `EventCategory.StreamBrokerOnCamStreamIdle`.
|
|
614
|
+
*/
|
|
615
|
+
'stream-broker.onCamStreamIdle': {
|
|
616
|
+
readonly deviceId: number;
|
|
617
|
+
readonly camStreamId: string;
|
|
618
|
+
};
|
|
619
|
+
/**
|
|
620
|
+
* Cap event: device's battery status changed (firmware push or
|
|
621
|
+
* provider-side observation). Mirrors `batteryCapability.onStatusChanged`.
|
|
622
|
+
* Payload shape duplicated inline (rather than importing from
|
|
623
|
+
* `capabilities/battery.cap`) to avoid a cycle between the cap
|
|
624
|
+
* definitions and the event bus typing — they're kept in lock-step
|
|
625
|
+
* by hand (see also `BatteryStatus` in `capabilities/battery.cap.ts`).
|
|
626
|
+
*/
|
|
627
|
+
'battery.onStatusChanged': {
|
|
628
|
+
readonly deviceId: number;
|
|
629
|
+
readonly status: {
|
|
630
|
+
readonly percentage: number;
|
|
631
|
+
readonly charging: 'dc' | 'solar' | 'none';
|
|
632
|
+
readonly sleeping: boolean;
|
|
633
|
+
readonly lastUpdated: number;
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
/**
|
|
637
|
+
* Doorbell button press — emitted by every device that registers the
|
|
638
|
+
* `doorbell` capability. Mirrors `doorbellCapability.events.onPressed`.
|
|
639
|
+
* Subscribers (UI toast, advanced-notifier) react to physical rings
|
|
640
|
+
* without holding a cap reference.
|
|
641
|
+
*/
|
|
642
|
+
'doorbell.onPressed': {
|
|
643
|
+
readonly deviceId: number;
|
|
644
|
+
readonly timestamp: number;
|
|
645
|
+
};
|
|
646
|
+
/**
|
|
647
|
+
* Periodic per-node engine inventory snapshot (~0.2 Hz). Replaces
|
|
648
|
+
* polling on `pipelineExecutor.listLoadedEngines`. One event per
|
|
649
|
+
* detection-pipeline process per tick, carrying every loaded engine
|
|
650
|
+
* with the same shape the cap returns.
|
|
651
|
+
*/
|
|
652
|
+
'pipeline.engine-metrics-snapshot': {
|
|
653
|
+
readonly nodeId: string;
|
|
654
|
+
readonly engines: ReadonlyArray<{
|
|
655
|
+
readonly engineKey: string;
|
|
656
|
+
readonly engine: PipelineEngineChoice;
|
|
657
|
+
readonly modelsLoaded: readonly string[];
|
|
658
|
+
readonly inUseByCameras: readonly number[];
|
|
659
|
+
readonly kind: 'runtime' | 'warm-override';
|
|
660
|
+
readonly poolPid: number | null;
|
|
661
|
+
readonly idleMs: number | null;
|
|
662
|
+
readonly idleTtlMs: number | null;
|
|
663
|
+
}>;
|
|
664
|
+
readonly timestamp: number;
|
|
665
|
+
};
|
|
666
|
+
/**
|
|
667
|
+
* Cluster topology snapshot — same payload shape that
|
|
668
|
+
* `nodes.topology` returns. Emitted by the hub on any agent /
|
|
669
|
+
* addon lifecycle change (debounced ~200ms) plus a periodic safety
|
|
670
|
+
* net. UI dashboards subscribe to drive their cluster view
|
|
671
|
+
* directly from the event payload — zero round-trip.
|
|
672
|
+
*/
|
|
673
|
+
'cluster.topology-snapshot': {
|
|
674
|
+
readonly nodes: ReadonlyArray<TopologyNode>;
|
|
675
|
+
readonly timestamp: number;
|
|
676
|
+
};
|
|
677
|
+
/**
|
|
678
|
+
* Periodic per-node system metrics snapshot. Carries the full
|
|
679
|
+
* `SystemResourceSnapshot` returned by
|
|
680
|
+
* `metricsProvider.getCached()` so dashboards render CPU /
|
|
681
|
+
* memory / GPU / disk / network without polling.
|
|
682
|
+
*/
|
|
683
|
+
'metrics.node-resources-snapshot': {
|
|
684
|
+
readonly nodeId: string;
|
|
685
|
+
readonly snapshot: SystemResourceSnapshot;
|
|
686
|
+
readonly timestamp: number;
|
|
687
|
+
};
|
|
688
|
+
/**
|
|
689
|
+
* Periodic per-node process-tree snapshot (`NodeProcess[]` —
|
|
690
|
+
* camstack-related pids with ghost / managed / root classification).
|
|
691
|
+
* One event per node per tick. Replaces polling on
|
|
692
|
+
* `metricsProvider.listNodeProcesses`.
|
|
693
|
+
*/
|
|
694
|
+
'metrics.node-processes-snapshot': {
|
|
695
|
+
readonly nodeId: string;
|
|
696
|
+
readonly processes: ReadonlyArray<NodeProcess>;
|
|
697
|
+
readonly timestamp: number;
|
|
698
|
+
};
|
|
699
|
+
/**
|
|
700
|
+
* Per-agent hwaccel override changed (set / cleared / re-probed). Payload
|
|
701
|
+
* carries the new effective preference so UI consumers can toast or
|
|
702
|
+
* refresh their pipeline view without re-fetching. Decoders still pull
|
|
703
|
+
* from `pipeline-orchestrator.getAgentSettings` on session creation;
|
|
704
|
+
* this event is additive observability.
|
|
705
|
+
*/
|
|
706
|
+
'pipeline.agent-hwaccel-changed': {
|
|
707
|
+
readonly agentNodeId: string;
|
|
708
|
+
readonly userChoice: 'auto' | 'none' | string | null;
|
|
709
|
+
readonly probedBest: string;
|
|
710
|
+
readonly reason: 'user-set' | 'user-cleared' | 'reprobed' | 'seeded';
|
|
711
|
+
};
|
|
712
|
+
/** Capability binding changed for a node — kernels update their preferred-provider registry. */
|
|
713
|
+
'capability.binding-changed': CapabilityBindingChangedPayload;
|
|
153
714
|
'model.download.progress': {
|
|
154
715
|
modelId: string;
|
|
155
716
|
progress: number;
|
|
156
717
|
totalMB?: number;
|
|
157
718
|
};
|
|
158
|
-
'
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
719
|
+
'agent.online': {
|
|
720
|
+
agentId: string;
|
|
721
|
+
};
|
|
722
|
+
'agent.offline': {
|
|
723
|
+
agentId: string;
|
|
724
|
+
};
|
|
725
|
+
'worker.online': {
|
|
726
|
+
workerId: string;
|
|
727
|
+
};
|
|
728
|
+
'worker.offline': {
|
|
729
|
+
workerId: string;
|
|
162
730
|
};
|
|
163
731
|
'agent.task.assigned': {
|
|
164
732
|
agentId: string;
|
|
@@ -166,16 +734,89 @@ export interface EventCatalog {
|
|
|
166
734
|
taskType: string;
|
|
167
735
|
payload?: unknown;
|
|
168
736
|
};
|
|
169
|
-
'
|
|
170
|
-
|
|
171
|
-
|
|
737
|
+
'enrichment.embedding.stored': {
|
|
738
|
+
readonly deviceId: number;
|
|
739
|
+
readonly trackId: string;
|
|
740
|
+
readonly class: string;
|
|
741
|
+
readonly embeddingId: string;
|
|
742
|
+
readonly modelId: string;
|
|
743
|
+
readonly embeddingDim: number;
|
|
744
|
+
readonly inferenceMs: number;
|
|
745
|
+
readonly timestamp: number;
|
|
746
|
+
};
|
|
747
|
+
'enrichment.scene.state-changed': {
|
|
748
|
+
readonly deviceId: number;
|
|
749
|
+
readonly monitorId: string;
|
|
750
|
+
readonly monitorLabel: string;
|
|
751
|
+
readonly previousState: string;
|
|
752
|
+
readonly currentState: string;
|
|
753
|
+
readonly confidence: number;
|
|
754
|
+
readonly timestamp: number;
|
|
755
|
+
};
|
|
756
|
+
'enrichment.activity.summary': {
|
|
757
|
+
readonly deviceId: number;
|
|
758
|
+
readonly periodStart: number;
|
|
759
|
+
readonly periodEnd: number;
|
|
760
|
+
readonly objectCounts: Readonly<Record<string, number>>;
|
|
761
|
+
readonly zoneActivity: readonly {
|
|
762
|
+
readonly zoneId: string;
|
|
763
|
+
readonly entries: number;
|
|
764
|
+
readonly exits: number;
|
|
765
|
+
readonly avgDwellMs: number;
|
|
766
|
+
}[];
|
|
767
|
+
readonly stateChanges: readonly {
|
|
768
|
+
readonly monitorId: string;
|
|
769
|
+
readonly from: string;
|
|
770
|
+
readonly to: string;
|
|
771
|
+
readonly timestamp: number;
|
|
772
|
+
}[];
|
|
773
|
+
readonly activityLevel: 'none' | 'low' | 'medium' | 'high';
|
|
774
|
+
};
|
|
775
|
+
'alert.created': {
|
|
776
|
+
id: string;
|
|
777
|
+
category: string;
|
|
778
|
+
severity: string;
|
|
779
|
+
title: string;
|
|
780
|
+
status: string;
|
|
781
|
+
};
|
|
782
|
+
'alert.updated': {
|
|
783
|
+
alertId: string;
|
|
784
|
+
patch: Record<string, unknown>;
|
|
785
|
+
};
|
|
786
|
+
/**
|
|
787
|
+
* Per-broker stream health transition. Fired by the stream-broker
|
|
788
|
+
* watchdog. `camStreamId` is the canonical identity of the source
|
|
789
|
+
* (every broker is keyed by its cam stream now); `profile` is the
|
|
790
|
+
* profile slot currently bound to it (or `null` if the broker is
|
|
791
|
+
* only kept alive by a manual activation).
|
|
792
|
+
*/
|
|
793
|
+
'stream.online': {
|
|
794
|
+
readonly deviceId: number;
|
|
795
|
+
readonly camStreamId: string;
|
|
796
|
+
readonly profile: 'high' | 'mid' | 'low' | null;
|
|
797
|
+
readonly brokerId: string;
|
|
798
|
+
readonly sourceType: string;
|
|
799
|
+
readonly lastPacketAt: number;
|
|
800
|
+
readonly reason?: string;
|
|
801
|
+
};
|
|
802
|
+
'stream.offline': {
|
|
803
|
+
readonly deviceId: number;
|
|
804
|
+
readonly camStreamId: string;
|
|
805
|
+
readonly profile: 'high' | 'mid' | 'low' | null;
|
|
806
|
+
readonly brokerId: string;
|
|
807
|
+
readonly sourceType: string;
|
|
808
|
+
readonly lastPacketAt: number;
|
|
809
|
+
readonly reason?: string;
|
|
172
810
|
};
|
|
173
811
|
'retention.cleanup': {
|
|
174
|
-
|
|
175
|
-
|
|
812
|
+
readonly deletedEvents?: number;
|
|
813
|
+
readonly deletedAudioRecords?: number;
|
|
814
|
+
readonly deletedSnapshots?: number;
|
|
815
|
+
readonly deletedCount?: number;
|
|
816
|
+
readonly freedMB?: number;
|
|
176
817
|
};
|
|
177
818
|
}
|
|
178
|
-
/** All known event category strings */
|
|
819
|
+
/** All known event category strings (derived from EventCatalog keys) */
|
|
179
820
|
export type KnownEventCategory = keyof EventCatalog;
|
|
180
821
|
/**
|
|
181
822
|
* System event — `data` is `Record<string, unknown>` for backward compatibility.
|
|
@@ -187,6 +828,18 @@ export interface SystemEvent {
|
|
|
187
828
|
source: EventSource;
|
|
188
829
|
category: string;
|
|
189
830
|
data: Record<string, unknown>;
|
|
831
|
+
/**
|
|
832
|
+
* Propagation chain when the event was re-emitted by the
|
|
833
|
+
* `DeviceEventPropagator`. `via[0]` is the originating source (the
|
|
834
|
+
* child that produced the event); subsequent entries walk up the
|
|
835
|
+
* parent chain. Absent on the original emission and on events that
|
|
836
|
+
* don't belong to a device-rooted source.
|
|
837
|
+
*
|
|
838
|
+
* Consumers that want ONLY direct events filter `ev.via === undefined`.
|
|
839
|
+
* Consumers that want everything reaching a device (incl. children)
|
|
840
|
+
* filter by `source.id === parentId` and accept any `via`.
|
|
841
|
+
*/
|
|
842
|
+
via?: readonly EventSource[];
|
|
190
843
|
}
|
|
191
844
|
/**
|
|
192
845
|
* A system event with a known category — `data` is typed.
|
|
@@ -198,11 +851,25 @@ export type TypedSystemEvent<C extends KnownEventCategory> = {
|
|
|
198
851
|
source: EventSource;
|
|
199
852
|
category: C;
|
|
200
853
|
data: EventCatalog[C];
|
|
854
|
+
via?: readonly EventSource[];
|
|
201
855
|
};
|
|
856
|
+
/** A category filter value: a known category, a glob string, or an array of either */
|
|
857
|
+
export type EventCategoryFilter = KnownEventCategory | (string & {}) | readonly (KnownEventCategory | (string & {}))[];
|
|
202
858
|
export interface EventFilter {
|
|
203
859
|
source?: EventSource;
|
|
204
|
-
/**
|
|
205
|
-
|
|
860
|
+
/** Filter by top-level agent (e.g. 'hub', 'agent-a1b2c3'). Matches source.nodeId with prefix match so 'hub' includes 'hub/pipeline'. Same semantics as logs tags.agentId. */
|
|
861
|
+
agentId?: string;
|
|
862
|
+
/** Filter by addon that originated the event. Matches source.addonId or source.id when type='addon'. */
|
|
863
|
+
addonId?: string;
|
|
864
|
+
/** Filter by device the event relates to. Matches source.deviceId or source.id when type='device'. */
|
|
865
|
+
deviceId?: number;
|
|
866
|
+
/** Category — known category (typed), glob (e.g. 'device.*'), or array */
|
|
867
|
+
category?: EventCategoryFilter;
|
|
868
|
+
since?: Date;
|
|
869
|
+
}
|
|
870
|
+
export interface TypedEventFilter<C extends KnownEventCategory> {
|
|
871
|
+
source?: EventSource;
|
|
872
|
+
category: C | readonly C[];
|
|
206
873
|
since?: Date;
|
|
207
874
|
}
|
|
208
875
|
export interface IEventBus {
|
|
@@ -210,7 +877,9 @@ export interface IEventBus {
|
|
|
210
877
|
emit<C extends KnownEventCategory>(event: TypedSystemEvent<C>): void;
|
|
211
878
|
/** Emit an arbitrary event (custom/unknown category) */
|
|
212
879
|
emit(event: SystemEvent): void;
|
|
213
|
-
/** Subscribe to
|
|
880
|
+
/** Subscribe to a known category — handler receives typed event */
|
|
881
|
+
subscribe<C extends KnownEventCategory>(filter: TypedEventFilter<C>, handler: (event: TypedSystemEvent<C>) => void): () => void;
|
|
882
|
+
/** Subscribe with a generic filter — handler receives base SystemEvent */
|
|
214
883
|
subscribe(filter: EventFilter, handler: (event: SystemEvent) => void): () => void;
|
|
215
884
|
/** Get recent events */
|
|
216
885
|
getRecent(filter?: EventFilter, limit?: number): readonly SystemEvent[];
|
|
@@ -241,4 +910,19 @@ export declare function isEvent<C extends KnownEventCategory>(event: SystemEvent
|
|
|
241
910
|
* ```
|
|
242
911
|
*/
|
|
243
912
|
export declare function createEvent<C extends KnownEventCategory>(category: C, source: EventSource, data: EventCatalog[C]): TypedSystemEvent<C>;
|
|
913
|
+
/**
|
|
914
|
+
* Emit a `system.ready-state` event for a capability. Caller supplies a
|
|
915
|
+
* per-process `generation` string — stable across a single process
|
|
916
|
+
* lifetime, changes on restart — which consumer-side registries use to
|
|
917
|
+
* derive a monotonic `epoch` without requiring the emitter to
|
|
918
|
+
* coordinate.
|
|
919
|
+
*/
|
|
920
|
+
export declare function emitReadiness(bus: IEventBus, params: {
|
|
921
|
+
readonly capName: string;
|
|
922
|
+
readonly scope: ReadinessScope;
|
|
923
|
+
readonly state: ReadinessState;
|
|
924
|
+
readonly generation: string;
|
|
925
|
+
readonly sourceNodeId: string;
|
|
926
|
+
readonly ts?: number;
|
|
927
|
+
}): void;
|
|
244
928
|
//# sourceMappingURL=event-bus.d.ts.map
|