@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,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Each type maps to a logical category of files.
|
|
4
|
-
* A storage provider declares which location types it supports.
|
|
5
|
-
*/
|
|
6
|
-
export type StorageLocationType = 'recordings-high' | 'recordings-low' | 'recordings-clips' | 'event-images' | 'models' | 'addons-data' | 'cache' | 'logs';
|
|
1
|
+
export type { StorageLocationType } from './storage-location.js';
|
|
2
|
+
import type { StorageLocationType } from './storage-location.js';
|
|
7
3
|
/** All location types as an array (for iteration) */
|
|
8
4
|
export declare const STORAGE_LOCATION_TYPES: readonly StorageLocationType[];
|
|
9
5
|
/** Default subdirectory names for filesystem storage */
|
|
@@ -13,60 +9,128 @@ export declare const DEFAULT_LOCATION_SUBDIRS: Readonly<Record<StorageLocationTy
|
|
|
13
9
|
* Multiple providers can coexist (local filesystem, NAS, S3, etc.).
|
|
14
10
|
* Each addon/system setting selects which provider to use per location type.
|
|
15
11
|
*/
|
|
12
|
+
export interface StorageResolveInput {
|
|
13
|
+
readonly location: StorageLocationType;
|
|
14
|
+
readonly relativePath: string;
|
|
15
|
+
}
|
|
16
|
+
export interface StorageWriteInput {
|
|
17
|
+
readonly location: StorageLocationType;
|
|
18
|
+
readonly relativePath: string;
|
|
19
|
+
readonly data: Buffer | NodeJS.ReadableStream;
|
|
20
|
+
}
|
|
21
|
+
export interface StorageReadInput {
|
|
22
|
+
readonly location: StorageLocationType;
|
|
23
|
+
readonly relativePath: string;
|
|
24
|
+
}
|
|
25
|
+
export interface StorageExistsInput {
|
|
26
|
+
readonly location: StorageLocationType;
|
|
27
|
+
readonly relativePath: string;
|
|
28
|
+
}
|
|
29
|
+
export interface StorageListInput {
|
|
30
|
+
readonly location: StorageLocationType;
|
|
31
|
+
readonly prefix?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface StorageDeleteInput {
|
|
34
|
+
readonly location: StorageLocationType;
|
|
35
|
+
readonly relativePath: string;
|
|
36
|
+
}
|
|
37
|
+
export interface StorageAvailableSpaceInput {
|
|
38
|
+
readonly location: StorageLocationType;
|
|
39
|
+
}
|
|
16
40
|
export interface IStorageProvider {
|
|
17
|
-
/** Unique provider ID (e.g., 'local', 'nas-synology', 's3-aws') */
|
|
18
41
|
readonly id: string;
|
|
19
|
-
/** Human-readable name (e.g., 'Local Filesystem', 'Synology NAS') */
|
|
20
42
|
readonly name: string;
|
|
21
|
-
/** Which location types this provider serves */
|
|
22
43
|
readonly supportedLocations: readonly StorageLocationType[];
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
exists(location: StorageLocationType, relativePath: string): Promise<boolean>;
|
|
31
|
-
/** List files/directories under a prefix within a location */
|
|
32
|
-
list(location: StorageLocationType, prefix?: string): Promise<readonly string[]>;
|
|
33
|
-
/** Delete a file */
|
|
34
|
-
delete(location: StorageLocationType, relativePath: string): Promise<void>;
|
|
35
|
-
/** Get available space in bytes, null if unknown (e.g., S3) */
|
|
36
|
-
getAvailableSpace(location: StorageLocationType): Promise<number | null>;
|
|
37
|
-
/** Lifecycle */
|
|
38
|
-
initialize(): Promise<void>;
|
|
39
|
-
shutdown(): Promise<void>;
|
|
44
|
+
resolve(input: StorageResolveInput): string;
|
|
45
|
+
write(input: StorageWriteInput): Promise<void>;
|
|
46
|
+
read(input: StorageReadInput): Promise<Buffer>;
|
|
47
|
+
exists(input: StorageExistsInput): Promise<boolean>;
|
|
48
|
+
list(input: StorageListInput): Promise<readonly string[]>;
|
|
49
|
+
delete(input: StorageDeleteInput): Promise<void>;
|
|
50
|
+
getAvailableSpace(input: StorageAvailableSpaceInput): Promise<number | null>;
|
|
40
51
|
}
|
|
41
52
|
/**
|
|
42
53
|
* All named collections that the settings backend manages.
|
|
43
54
|
* Each collection maps to a logical table/bucket in the backend.
|
|
44
55
|
*/
|
|
45
|
-
export type SettingsCollection = 'system-settings' | 'addon-settings' | 'provider-settings' | 'device-settings' | 'detection-events' | 'audio-levels' | 'track-trails' | 'recording-segments' | 'recording-thumbnails' | 'recording-policies' | 'recording-storage-config' | 'recording-cleanup-queue' | 'known-faces';
|
|
56
|
+
export type SettingsCollection = 'system-settings' | 'addon-settings' | 'provider-settings' | 'device-settings' | 'detection-events' | 'audio-levels' | 'track-trails' | 'recording-segments' | 'recording-thumbnails' | 'recording-policies' | 'recording-storage-config' | 'recording-cleanup-queue' | 'known-faces' | (string & {});
|
|
57
|
+
export interface SettingsGetInput {
|
|
58
|
+
readonly namespace?: string;
|
|
59
|
+
readonly collection: SettingsCollection;
|
|
60
|
+
readonly key: string;
|
|
61
|
+
}
|
|
62
|
+
export interface SettingsSetInput {
|
|
63
|
+
readonly namespace?: string;
|
|
64
|
+
readonly collection: SettingsCollection;
|
|
65
|
+
readonly key: string;
|
|
66
|
+
readonly value: unknown;
|
|
67
|
+
}
|
|
68
|
+
export interface SettingsQueryInput {
|
|
69
|
+
readonly namespace?: string;
|
|
70
|
+
readonly collection: SettingsCollection;
|
|
71
|
+
readonly filter?: QueryFilter;
|
|
72
|
+
}
|
|
73
|
+
export interface SettingsInsertInput<T extends object = Record<string, unknown>> {
|
|
74
|
+
readonly namespace?: string;
|
|
75
|
+
readonly collection: SettingsCollection;
|
|
76
|
+
readonly record: SettingsRecord<T>;
|
|
77
|
+
}
|
|
78
|
+
export interface SettingsUpdateInput {
|
|
79
|
+
readonly namespace?: string;
|
|
80
|
+
readonly collection: SettingsCollection;
|
|
81
|
+
readonly id: string;
|
|
82
|
+
readonly data: Record<string, unknown>;
|
|
83
|
+
}
|
|
84
|
+
export interface SettingsDeleteInput {
|
|
85
|
+
readonly namespace?: string;
|
|
86
|
+
readonly collection: SettingsCollection;
|
|
87
|
+
readonly key: string;
|
|
88
|
+
}
|
|
89
|
+
export interface SettingsCountInput {
|
|
90
|
+
readonly namespace?: string;
|
|
91
|
+
readonly collection: SettingsCollection;
|
|
92
|
+
readonly filter?: QueryFilter;
|
|
93
|
+
}
|
|
94
|
+
export interface SettingsIsEmptyInput {
|
|
95
|
+
readonly namespace?: string;
|
|
96
|
+
readonly collection: SettingsCollection;
|
|
97
|
+
}
|
|
46
98
|
/**
|
|
47
99
|
* Settings backend — persistent key-value and document storage.
|
|
48
100
|
* Default implementation: SQLite. Can be replaced by Postgres, etc.
|
|
101
|
+
* All methods use object-arg signatures for extensibility.
|
|
49
102
|
*/
|
|
50
103
|
export interface ISettingsBackend {
|
|
51
104
|
/** Get a single value by key from a collection */
|
|
52
|
-
get(
|
|
105
|
+
get(input: SettingsGetInput): Promise<unknown>;
|
|
53
106
|
/** Set a value by key in a collection (upsert) */
|
|
54
|
-
set(
|
|
107
|
+
set(input: SettingsSetInput): Promise<void>;
|
|
55
108
|
/** Get all entries matching an optional filter */
|
|
56
|
-
query
|
|
109
|
+
query<T extends object = Record<string, unknown>>(input: SettingsQueryInput): Promise<readonly SettingsRecord<T>[]>;
|
|
57
110
|
/** Insert a new record */
|
|
58
|
-
insert
|
|
111
|
+
insert<T extends object = Record<string, unknown>>(input: SettingsInsertInput<T>): Promise<void>;
|
|
59
112
|
/** Update an existing record by ID */
|
|
60
|
-
update(
|
|
113
|
+
update(input: SettingsUpdateInput): Promise<void>;
|
|
61
114
|
/** Delete a record by key/ID */
|
|
62
|
-
delete(
|
|
115
|
+
delete(input: SettingsDeleteInput): Promise<void>;
|
|
63
116
|
/** Count entries in a collection */
|
|
64
|
-
count(
|
|
117
|
+
count(input: SettingsCountInput): Promise<number>;
|
|
65
118
|
/** Check if a collection is empty (used for first-boot detection) */
|
|
66
|
-
isEmpty(
|
|
67
|
-
/**
|
|
68
|
-
|
|
69
|
-
|
|
119
|
+
isEmpty(input: SettingsIsEmptyInput): Promise<boolean>;
|
|
120
|
+
/**
|
|
121
|
+
* Declare a typed (SQL-backed) collection. After declaration, the
|
|
122
|
+
* standard `insert` / `update` / `delete` / `query` methods route to
|
|
123
|
+
* typed columns for this collection instead of the JSON-blob default.
|
|
124
|
+
* Idempotent — re-declaring the same shape is a no-op. Backends
|
|
125
|
+
* without typed-table support should implement this as a no-op so
|
|
126
|
+
* the cap contract stays uniform.
|
|
127
|
+
*/
|
|
128
|
+
declareCollection(input: {
|
|
129
|
+
namespace?: string;
|
|
130
|
+
collection: string;
|
|
131
|
+
columns: readonly import('../capabilities/settings-store.cap.js').CollectionColumn[];
|
|
132
|
+
indexes?: readonly import('../capabilities/settings-store.cap.js').CollectionIndex[];
|
|
133
|
+
}): Promise<void>;
|
|
70
134
|
/** Ensure a structured table exists (CREATE TABLE IF NOT EXISTS) */
|
|
71
135
|
ensureTable?(table: string, schema: TableSchema): Promise<void>;
|
|
72
136
|
/** Insert a row into a structured table */
|
|
@@ -82,9 +146,9 @@ export interface ISettingsBackend {
|
|
|
82
146
|
/** Count rows matching a filter */
|
|
83
147
|
tableCount?(table: string, filter?: Record<string, unknown>): Promise<number>;
|
|
84
148
|
}
|
|
85
|
-
export interface SettingsRecord {
|
|
149
|
+
export interface SettingsRecord<T extends object = Record<string, unknown>> {
|
|
86
150
|
readonly id: string;
|
|
87
|
-
readonly data:
|
|
151
|
+
readonly data: T;
|
|
88
152
|
}
|
|
89
153
|
export interface QueryFilter {
|
|
90
154
|
where?: Record<string, unknown>;
|
|
@@ -181,19 +245,21 @@ export interface EmbeddingFilter {
|
|
|
181
245
|
/** Filter by device */
|
|
182
246
|
readonly deviceId?: string;
|
|
183
247
|
}
|
|
184
|
-
/**
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
/** @deprecated Use SettingsRecord instead */
|
|
248
|
+
/**
|
|
249
|
+
* A document record in collection-based storage.
|
|
250
|
+
* Used by IStructuredStorage and ElementConfigStore.
|
|
251
|
+
* New code should prefer ISettingsBackend + SettingsRecord.
|
|
252
|
+
*/
|
|
191
253
|
export interface StorageRecord {
|
|
192
254
|
collection: string;
|
|
193
255
|
id: string;
|
|
194
256
|
data: Record<string, unknown>;
|
|
195
257
|
}
|
|
196
|
-
/**
|
|
258
|
+
/**
|
|
259
|
+
* Collection-based document storage (query, insert, update, delete).
|
|
260
|
+
* Used by ElementConfigStore and StorageManager shim layer.
|
|
261
|
+
* New code should prefer ISettingsBackend.
|
|
262
|
+
*/
|
|
197
263
|
export interface IStructuredStorage {
|
|
198
264
|
query(collection: string, filter?: QueryFilter): Promise<readonly StorageRecord[]>;
|
|
199
265
|
insert(record: StorageRecord): Promise<StorageRecord>;
|
|
@@ -201,7 +267,11 @@ export interface IStructuredStorage {
|
|
|
201
267
|
delete(collection: string, id: string): Promise<void>;
|
|
202
268
|
count(collection: string, filter?: QueryFilter): Promise<number>;
|
|
203
269
|
}
|
|
204
|
-
/**
|
|
270
|
+
/**
|
|
271
|
+
* File-based storage operations.
|
|
272
|
+
* Used by StorageManager and addons for media/model files.
|
|
273
|
+
* New code should prefer IStorageProvider.
|
|
274
|
+
*/
|
|
205
275
|
export interface IFileStorage {
|
|
206
276
|
readFile(path: string): Promise<Buffer>;
|
|
207
277
|
writeFile(path: string, data: Buffer): Promise<void>;
|
|
@@ -210,7 +280,11 @@ export interface IFileStorage {
|
|
|
210
280
|
getFileUrl(path: string): Promise<string>;
|
|
211
281
|
exists(path: string): Promise<boolean>;
|
|
212
282
|
}
|
|
213
|
-
/**
|
|
283
|
+
/**
|
|
284
|
+
* Combined storage location with optional structured + file storage.
|
|
285
|
+
* Used by StorageManager.getLocation() and ElementConfigStore.
|
|
286
|
+
* New code should prefer IStorageProvider + ISettingsBackend.
|
|
287
|
+
*/
|
|
214
288
|
export interface IStorageLocation {
|
|
215
289
|
structured?: IStructuredStorage;
|
|
216
290
|
files?: IFileStorage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/interfaces/storage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/interfaces/storage.ts"],"names":[],"mappings":"AAWA,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,OA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E,YAAY,CAAA;CACrB"}
|
|
@@ -1,10 +1,72 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import type { FrameFormat } from '../types/io.js';
|
|
3
|
+
export declare const DecoderStatsSchema: z.ZodObject<{
|
|
4
|
+
inputFps: z.ZodNumber;
|
|
5
|
+
outputFps: z.ZodNumber;
|
|
6
|
+
avgDecodeTimeMs: z.ZodNumber;
|
|
7
|
+
droppedFrames: z.ZodNumber;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const DecoderSessionConfigSchema: z.ZodObject<{
|
|
10
|
+
codec: z.ZodString;
|
|
11
|
+
maxFps: z.ZodDefault<z.ZodNumber>;
|
|
12
|
+
outputFormat: z.ZodDefault<z.ZodEnum<{
|
|
13
|
+
jpeg: "jpeg";
|
|
14
|
+
rgb: "rgb";
|
|
15
|
+
bgr: "bgr";
|
|
16
|
+
yuv420: "yuv420";
|
|
17
|
+
gray: "gray";
|
|
18
|
+
}>>;
|
|
19
|
+
scale: z.ZodDefault<z.ZodNumber>;
|
|
20
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
deviceId: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
24
|
+
}, z.core.$strip>;
|
|
1
25
|
export type Unsubscribe = () => void;
|
|
26
|
+
/**
|
|
27
|
+
* Discriminator for `StreamSource.type`. Values that the broker
|
|
28
|
+
* understands today:
|
|
29
|
+
*
|
|
30
|
+
* - `'rtsp'` — pull mode. Broker connects to a `rtsp://` URL,
|
|
31
|
+
* demuxes RTP, exposes raw RTP via `onVideoRtp`.
|
|
32
|
+
* - `'rtmp'` — pull mode. Broker connects to a `rtmp://` URL,
|
|
33
|
+
* demuxes flv into AnnexB packets. No source RTP
|
|
34
|
+
* available (RTMP carries no RTP), so the WebRTC
|
|
35
|
+
* path falls back to AnnexB → writeVideoNals.
|
|
36
|
+
* Reserved — implementation pending.
|
|
37
|
+
* - `'push'` — push mode. Provider addon delivers AnnexB packets
|
|
38
|
+
* via `pushEncodedPacket()` (Reolink Baichuan,
|
|
39
|
+
* Frigate event streams, etc.).
|
|
40
|
+
* - `'push-rtp'` — push mode with raw RTP packets. Provider addon
|
|
41
|
+
* delivers source RTP via `pushVideoRtp()` AND
|
|
42
|
+
* AnnexB-equivalents via `pushEncodedPacket()` so
|
|
43
|
+
* downstream consumers (decoder, restreamer) keep
|
|
44
|
+
* working. Lets the WebRTC path use the H.265
|
|
45
|
+
* repacketizer for push-mode H.265 streams. Reserved
|
|
46
|
+
* — implementation pending.
|
|
47
|
+
* - `'placeholder'` — silent black-image placeholder reader.
|
|
48
|
+
*
|
|
49
|
+
* String type instead of a literal union so addons remain free to
|
|
50
|
+
* add new source types — the broker's switch statement falls through
|
|
51
|
+
* to "data is pushed externally" for unknown values.
|
|
52
|
+
*/
|
|
53
|
+
export type StreamSourceType = 'rtsp' | 'rtmp' | 'push' | 'push-rtp' | 'rfc4571' | 'placeholder' | (string & {});
|
|
2
54
|
export interface StreamSource {
|
|
3
|
-
readonly type:
|
|
55
|
+
readonly type: StreamSourceType;
|
|
56
|
+
/** Stream URL — required for pull-based sources (rtsp, rtmp). Not used for push sources. */
|
|
4
57
|
readonly url: string;
|
|
5
58
|
readonly videoCodec?: string;
|
|
6
59
|
readonly audioCodec?: string;
|
|
7
60
|
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
61
|
+
/**
|
|
62
|
+
* Push-source flag — when true, a stall in the input stream is
|
|
63
|
+
* treated as a valid suspension (battery cameras intentionally go
|
|
64
|
+
* silent between motion events) rather than an error. The broker
|
|
65
|
+
* stops emitting the black-image placeholder and pauses the watchdog
|
|
66
|
+
* until the next packet arrives. Default: false (legacy behaviour —
|
|
67
|
+
* stall is an error).
|
|
68
|
+
*/
|
|
69
|
+
readonly allowStall?: boolean;
|
|
8
70
|
}
|
|
9
71
|
export interface StreamSourceOption {
|
|
10
72
|
readonly id: string;
|
|
@@ -23,12 +85,40 @@ export interface EncodedPacket {
|
|
|
23
85
|
readonly dts: number;
|
|
24
86
|
readonly keyframe: boolean;
|
|
25
87
|
readonly codec: string;
|
|
88
|
+
/**
|
|
89
|
+
* `true` when the packet was synthesized by the broker's placeholder
|
|
90
|
+
* pump (state-aware "RECONNECTING" / "SLEEPING" / etc. keyframes
|
|
91
|
+
* pushed at 1Hz while no real RTP is flowing). Consumers that
|
|
92
|
+
* accumulate per-stream codec state (sticky SPS/PPS, decoder config)
|
|
93
|
+
* MUST treat these as throwaway: the placeholder is a different
|
|
94
|
+
* resolution and parameter set than the live camera, so caching its
|
|
95
|
+
* SPS/PPS and prepending them to real keyframes silently corrupts
|
|
96
|
+
* the decoder state and freezes the WebRTC viewer on the last
|
|
97
|
+
* placeholder until the consumer is re-created. Absent on packets
|
|
98
|
+
* produced from real source data.
|
|
99
|
+
*/
|
|
100
|
+
readonly isPlaceholder?: boolean;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Audio metadata declared by push-source providers before they emit the
|
|
104
|
+
* first audio `EncodedPacket`. Mirrors the slice of an SDP audio track
|
|
105
|
+
* the broker actually consumes — `codec` is canonical lowercase
|
|
106
|
+
* ('aac' | 'opus' | 'pcmu' | 'pcma' | ...).
|
|
107
|
+
*
|
|
108
|
+
* `extraData` carries codec-specific config bytes (e.g. AAC
|
|
109
|
+
* AudioSpecificConfig) when the codec needs them at decoder-init time.
|
|
110
|
+
*/
|
|
111
|
+
export interface PushAudioInfo {
|
|
112
|
+
readonly codec: string;
|
|
113
|
+
readonly sampleRate: number;
|
|
114
|
+
readonly channels: number;
|
|
115
|
+
readonly extraData?: Uint8Array;
|
|
26
116
|
}
|
|
27
117
|
export interface DecodedFrame {
|
|
28
118
|
readonly data: Buffer;
|
|
29
119
|
readonly width: number;
|
|
30
120
|
readonly height: number;
|
|
31
|
-
readonly format:
|
|
121
|
+
readonly format: FrameFormat;
|
|
32
122
|
readonly timestamp: number;
|
|
33
123
|
}
|
|
34
124
|
export interface DecodedAudioChunk {
|
|
@@ -39,8 +129,20 @@ export interface DecodedAudioChunk {
|
|
|
39
129
|
}
|
|
40
130
|
export interface DecodeOptions {
|
|
41
131
|
readonly maxFps?: number;
|
|
42
|
-
readonly format?:
|
|
132
|
+
readonly format?: FrameFormat;
|
|
43
133
|
readonly scale?: number;
|
|
134
|
+
/**
|
|
135
|
+
* Caller identity tag (Phase 10). Surfaced by `listClients` so
|
|
136
|
+
* operators can tell who's holding the broker open. Short and stable:
|
|
137
|
+
* `motion`, `detection`, `snapshot`, `webrtc:<sessionId>`,
|
|
138
|
+
* `benchmark`. Missing tag → recorded as `'unknown'` with a broker-
|
|
139
|
+
* side warn log.
|
|
140
|
+
*/
|
|
141
|
+
readonly tag?: string;
|
|
142
|
+
}
|
|
143
|
+
export interface AudioSubscribeOptions {
|
|
144
|
+
/** Caller identity tag. See DecodeOptions.tag. */
|
|
145
|
+
readonly tag?: string;
|
|
44
146
|
}
|
|
45
147
|
export type BrokerStatus = 'idle' | 'connecting' | 'streaming' | 'error' | 'stopped';
|
|
46
148
|
export interface BrokerStats {
|
|
@@ -50,43 +152,209 @@ export interface BrokerStats {
|
|
|
50
152
|
readonly encodedSubscribers: number;
|
|
51
153
|
readonly decodedSubscribers: number;
|
|
52
154
|
readonly uptimeMs: number;
|
|
155
|
+
/** Measured bitrate in kbps (averaged over 2s window) */
|
|
156
|
+
readonly bitrateKbps: number;
|
|
157
|
+
/** Time between last two keyframes in ms (IDR interval) */
|
|
158
|
+
readonly idrIntervalMs: number;
|
|
159
|
+
/** Detected video codec (h264, h265) */
|
|
160
|
+
readonly codec?: string;
|
|
161
|
+
/** Total bytes received since broker start */
|
|
162
|
+
readonly totalBytes: number;
|
|
163
|
+
/** Total encoded packets received since broker start */
|
|
164
|
+
readonly packetCount: number;
|
|
165
|
+
/** Number of connected RTSP restream clients */
|
|
166
|
+
readonly rtspClients: number;
|
|
167
|
+
/** Number of connected TCP pipe clients */
|
|
168
|
+
readonly pipeClients: number;
|
|
169
|
+
/** Pre-buffer configured duration in seconds */
|
|
170
|
+
readonly preBufferSec: number;
|
|
171
|
+
/** Pre-buffer actual buffered duration in ms */
|
|
172
|
+
readonly preBufferMs: number;
|
|
173
|
+
/** Pre-buffer packet count */
|
|
174
|
+
readonly preBufferPackets: number;
|
|
175
|
+
/**
|
|
176
|
+
* Moleculer node id of the decoder provider currently servicing this
|
|
177
|
+
* stream's decoded subscribers. `null` until the deferred decoder is
|
|
178
|
+
* created (no decoded clients yet, or codec not detected).
|
|
179
|
+
*/
|
|
180
|
+
readonly decoderNodeId: string | null;
|
|
181
|
+
/**
|
|
182
|
+
* Detected audio track parameters from the RTSP DESCRIBE / SDP. Null
|
|
183
|
+
* when the stream has no audio track or the broker is still in cold
|
|
184
|
+
* start. `supported` reflects whether the local native + ffmpeg-based
|
|
185
|
+
* decoder pipeline can produce PCM chunks for downstream consumers
|
|
186
|
+
* (audio-analyzer). When `false`, the codec is detected but skipped.
|
|
187
|
+
*/
|
|
188
|
+
readonly audio?: {
|
|
189
|
+
readonly codec: string;
|
|
190
|
+
readonly sampleRate: number;
|
|
191
|
+
readonly channels: number;
|
|
192
|
+
readonly supported: boolean;
|
|
193
|
+
} | null;
|
|
53
194
|
}
|
|
54
195
|
export interface IStreamBroker {
|
|
55
196
|
readonly deviceId: string;
|
|
56
197
|
readonly status: BrokerStatus;
|
|
198
|
+
readonly suspended: boolean;
|
|
57
199
|
start(source: StreamSource): Promise<void>;
|
|
58
200
|
stop(): Promise<void>;
|
|
201
|
+
/**
|
|
202
|
+
* Push an encoded packet into the broker from an external source.
|
|
203
|
+
*
|
|
204
|
+
* Used by camera provider addons that deliver media data directly
|
|
205
|
+
* (e.g. Reolink Baichuan protocol, Frigate event streams) instead
|
|
206
|
+
* of exposing an RTSP URL for the broker to pull from.
|
|
207
|
+
*
|
|
208
|
+
* The broker fans out the packet to all consumers: pre-buffer, RTSP
|
|
209
|
+
* restreamer, TCP pipe, decoder sessions, and encoded subscribers.
|
|
210
|
+
*/
|
|
211
|
+
pushEncodedPacket(packet: EncodedPacket): void;
|
|
212
|
+
/**
|
|
213
|
+
* Push-source audio metadata. Push providers (Reolink Baichuan,
|
|
214
|
+
* Frigate, etc.) call this BEFORE the first audio EncodedPacket so
|
|
215
|
+
* the broker can wire the audio-codec capability — RTSP sources get
|
|
216
|
+
* the same data from the SDP audio track. Repeat calls update the
|
|
217
|
+
* declared codec; calling with `null` retracts (broker tears down
|
|
218
|
+
* any audio decode session).
|
|
219
|
+
*
|
|
220
|
+
* Typical Reolink Baichuan audio: AAC-LC 16 kHz mono. Cameras that
|
|
221
|
+
* push G.711 should still call this so the broker can bypass the
|
|
222
|
+
* codec cap for the supported native codecs.
|
|
223
|
+
*/
|
|
224
|
+
pushAudioInfo?(info: PushAudioInfo | null): void;
|
|
225
|
+
/**
|
|
226
|
+
* Push a raw video RTP packet from an external source (used by
|
|
227
|
+
* `'push-rtp'`-typed sources, e.g. Reolink Baichuan adapter that
|
|
228
|
+
* synthesizes RTP from its packetizer-friendly access units). The
|
|
229
|
+
* broker fans out to `onVideoRtp` subscribers, including the
|
|
230
|
+
* WebRTC server's H.265 repacketizer path.
|
|
231
|
+
*
|
|
232
|
+
* Sources that don't carry per-packet RTP MAY ignore this entirely
|
|
233
|
+
* and call only `pushEncodedPacket`. Implementations are free to
|
|
234
|
+
* be a no-op when no RTP subscribers exist.
|
|
235
|
+
*/
|
|
236
|
+
pushVideoRtp?(rtpData: Buffer): void;
|
|
59
237
|
onEncodedData(callback: (packet: EncodedPacket) => void): Unsubscribe;
|
|
238
|
+
/**
|
|
239
|
+
* Subscribe to source video RTP packets (raw on-wire bytes, before
|
|
240
|
+
* depacketization). Used by the WebRTC server's H.265 path to feed
|
|
241
|
+
* a packet-level repacketizer that preserves the original RTP header
|
|
242
|
+
* layout — Chrome's HEVC depacketizer is sensitive to it.
|
|
243
|
+
*
|
|
244
|
+
* Sources that don't have an underlying RTP wire (e.g. Frigate event
|
|
245
|
+
* streams that call `pushEncodedPacket`) MAY register zero callbacks
|
|
246
|
+
* and emit nothing.
|
|
247
|
+
*/
|
|
248
|
+
onVideoRtp(callback: (rtpData: Buffer) => void): Unsubscribe;
|
|
249
|
+
/**
|
|
250
|
+
* Codec parameter sets harvested from the camera's SDP (sprop-vps /
|
|
251
|
+
* sprop-sps / sprop-pps). Cameras like Reolink high-profile streams
|
|
252
|
+
* publish VPS/SPS/PPS only via SDP — Chrome's HEVC decoder needs them
|
|
253
|
+
* to initialise. Returns null when the broker hasn't connected yet
|
|
254
|
+
* or the camera ships param sets in-band.
|
|
255
|
+
*/
|
|
256
|
+
getSdpParameterSets(): ReadonlyArray<Buffer> | null;
|
|
257
|
+
/**
|
|
258
|
+
* Subscribe to SDP-derived VPS/SPS/PPS deliveries. Fires once
|
|
259
|
+
* synchronously if the broker already has them (late-subscriber
|
|
260
|
+
* shape), and again every time `onVideoTrack` repopulates them on a
|
|
261
|
+
* reader rebuild. Used by the WebRTC server's H.265 path so a
|
|
262
|
+
* session created during the wake-up window — when
|
|
263
|
+
* `getSdpParameterSets()` still returns null — can seed its
|
|
264
|
+
* `H265Repacketizer` once the camera's first RTP+SDP arrive.
|
|
265
|
+
*/
|
|
266
|
+
onSdpParameterSets(callback: (ps: ReadonlyArray<Buffer>) => void): Unsubscribe;
|
|
267
|
+
/**
|
|
268
|
+
* Source type as configured at `start()` — see `StreamSourceType`
|
|
269
|
+
* for the supported values. `null` before `start()` resolves.
|
|
270
|
+
*/
|
|
271
|
+
getSourceType(): StreamSourceType | null;
|
|
272
|
+
/**
|
|
273
|
+
* True when the broker can emit source RTP packets via
|
|
274
|
+
* `onVideoRtp` — i.e. the source is RTSP (pull) or push-rtp.
|
|
275
|
+
* RTMP and bare push (AnnexB-only) sources return false.
|
|
276
|
+
* Routing decisions in the WebRTC server (e.g. "use the H.265
|
|
277
|
+
* repacketizer") should consult this rather than string-comparing
|
|
278
|
+
* the source type.
|
|
279
|
+
*/
|
|
280
|
+
isRtpSource(): boolean;
|
|
281
|
+
/**
|
|
282
|
+
* Subscribe to decoded frames. Phase 10 added `options.tag` — a short
|
|
283
|
+
* caller-identity string (`motion`, `detection`, `snapshot`,
|
|
284
|
+
* `webrtc:<sessionId>`, `benchmark`) used by `listClients` so
|
|
285
|
+
* operators can see who is holding the broker open. Omitted tag
|
|
286
|
+
* yields a `'unknown'` entry with a warn log — not silently accepted.
|
|
287
|
+
*/
|
|
60
288
|
onDecodedFrame(callback: (frame: DecodedFrame) => void, options?: DecodeOptions): Unsubscribe;
|
|
61
|
-
|
|
289
|
+
/** Subscribe to decoded audio chunks. `options.tag` mirrors `onDecodedFrame`. */
|
|
290
|
+
onDecodedAudioChunk(callback: (chunk: DecodedAudioChunk) => void, options?: AudioSubscribeOptions): Unsubscribe;
|
|
62
291
|
getStats(): BrokerStats;
|
|
63
292
|
getLocalStreamUrl(): string;
|
|
293
|
+
/** Get the pre-buffer: recent encoded packets starting from last keyframe. */
|
|
294
|
+
getPreBuffer(): readonly EncodedPacket[];
|
|
295
|
+
/** Set the pre-buffer duration in seconds (0 to disable, max 30). */
|
|
296
|
+
setPreBufferDuration(seconds: number): void;
|
|
297
|
+
/** Get the current pre-buffer duration in seconds. */
|
|
298
|
+
getPreBufferDuration(): number;
|
|
299
|
+
setPreBufferEnabled(enabled: boolean): void;
|
|
64
300
|
}
|
|
65
301
|
/**
|
|
66
302
|
* Manager for stream brokers — the server interacts with this interface,
|
|
67
303
|
* while the concrete implementation lives in the addon-stream-broker package.
|
|
68
304
|
*/
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
destroyAll(): Promise<void>;
|
|
76
|
-
setRestreamers(restreamers: readonly unknown[]): void;
|
|
77
|
-
getRestreamers(): readonly unknown[];
|
|
305
|
+
/** Per-broker RTSP restream entry (absorbed from the former rtsp-restream capability). */
|
|
306
|
+
export interface RtspRestreamEntry {
|
|
307
|
+
readonly brokerId: string;
|
|
308
|
+
readonly url: string;
|
|
309
|
+
readonly mutedUrl: string;
|
|
310
|
+
readonly enabled: boolean;
|
|
78
311
|
}
|
|
79
|
-
|
|
80
|
-
export
|
|
312
|
+
/** Flat cap-shaped broker record returned by `listBrokers()`. */
|
|
313
|
+
export interface BrokerListEntry {
|
|
314
|
+
readonly brokerId: string;
|
|
315
|
+
readonly status: string;
|
|
316
|
+
readonly inputFps: number;
|
|
317
|
+
readonly decodeFps: number;
|
|
318
|
+
readonly encodedSubscribers: number;
|
|
319
|
+
readonly decodedSubscribers: number;
|
|
320
|
+
readonly uptimeMs: number;
|
|
321
|
+
readonly bitrateKbps: number;
|
|
322
|
+
readonly idrIntervalMs: number;
|
|
323
|
+
readonly codec?: string;
|
|
324
|
+
readonly totalBytes: number;
|
|
325
|
+
readonly packetCount: number;
|
|
326
|
+
readonly rtspClients: number;
|
|
327
|
+
readonly pipeClients: number;
|
|
328
|
+
readonly preBufferSec: number;
|
|
329
|
+
readonly preBufferMs: number;
|
|
330
|
+
readonly preBufferPackets: number;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Phase the runner's per-camera state machine occupies. `'idle'` is the
|
|
334
|
+
* `detectionMode === 'disabled'` resting state — runner registered the
|
|
335
|
+
* camera but never subscribed to detection frames. The other 4 are the
|
|
336
|
+
* historical motion-gated states; their transitions are now driven by
|
|
337
|
+
* `detectionMode` ('always-on' starts in 'active', 'on-motion' starts
|
|
338
|
+
* in 'watching').
|
|
339
|
+
*/
|
|
340
|
+
export type CameraPhase = 'idle' | 'watching' | 'active' | 'paused' | 'load-shed';
|
|
81
341
|
export interface CameraDetectionConfig {
|
|
82
342
|
readonly enabled: boolean;
|
|
83
|
-
readonly
|
|
84
|
-
|
|
343
|
+
readonly pipelineEnabled: boolean;
|
|
344
|
+
/** Motion sources that activate this camera's pipeline. At least one. */
|
|
345
|
+
readonly motionSources: import('./pipeline-orchestrator-capability.js').OrchestrationMotionSources;
|
|
85
346
|
readonly motionStreamId: string;
|
|
86
347
|
readonly detectionStreamId: string;
|
|
87
348
|
readonly motionFps: number;
|
|
88
349
|
readonly detectionFps: number;
|
|
89
350
|
readonly motionCooldownMs: number;
|
|
90
351
|
readonly audioStreamId?: string;
|
|
352
|
+
/**
|
|
353
|
+
* Operator-facing scheduling modes. Forwarded to `RunnerCameraConfig`;
|
|
354
|
+
* the runner uses these to gate its substream subscribers + phase
|
|
355
|
+
* machine. See `PipelinePhaseMode` for the semantics.
|
|
356
|
+
*/
|
|
357
|
+
readonly detectionMode: import('../device/device-profile.js').PipelinePhaseMode;
|
|
358
|
+
readonly audioMode: import('../device/device-profile.js').PipelinePhaseMode;
|
|
91
359
|
}
|
|
92
360
|
//# sourceMappingURL=stream-broker.d.ts.map
|