@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
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import type { PipelineEngineChoice, PipelineConfig } from '../types/pipeline.js';
|
|
2
|
+
import type { PipelineSchema, PipelineDefaultStep, PipelineTemplateStep, PipelineTemplate } from '../types/pipeline-schema.js';
|
|
3
|
+
import type { ModelFormat } from '../types/models.js';
|
|
4
|
+
import type { FrameInput } from '../types/io.js';
|
|
5
|
+
import type { FrameResult, DetectorOutput } from '../types/detection.js';
|
|
6
|
+
import type { ConfigUISchema } from './config-ui.js';
|
|
7
|
+
import type { InferenceCapabilities } from './inference-capabilities.js';
|
|
8
|
+
import type { IAddonResolver } from './pipeline-runner.js';
|
|
9
|
+
/**
|
|
10
|
+
* Step configuration for pipeline execution — no runtime/backend (comes
|
|
11
|
+
* from engine). Phase 7 (settings redesign) removed the generic
|
|
12
|
+
* `confidence: number` field; per-step thresholds live in `settings`
|
|
13
|
+
* and the runtime executor falls back to
|
|
14
|
+
* `StepDefinition.defaultConfidence` when unset.
|
|
15
|
+
*/
|
|
16
|
+
export interface PipelineStepInput {
|
|
17
|
+
readonly addonId: string;
|
|
18
|
+
readonly modelId: string;
|
|
19
|
+
readonly enabled: boolean;
|
|
20
|
+
readonly children?: readonly PipelineStepInput[];
|
|
21
|
+
readonly settings?: Readonly<Record<string, unknown>>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Input for pipeline execution. Exactly one image source must be provided:
|
|
25
|
+
* - `frame`: runtime dispatch (pipeline-runner — decoded broker frame)
|
|
26
|
+
* - `imageBase64`: one-shot benchmark (ImageTab "Run")
|
|
27
|
+
* - `referenceImage`: named file from the reference-image store
|
|
28
|
+
*
|
|
29
|
+
* `engine` + `deviceId` are optional contextual hints — the executor uses
|
|
30
|
+
* `deviceId` for per-device overrides and traces, and `engine` to select
|
|
31
|
+
* the factory (when absent, falls back to the executor's persisted
|
|
32
|
+
* selection during the migration window).
|
|
33
|
+
*/
|
|
34
|
+
export interface PipelineRunInput {
|
|
35
|
+
readonly steps: readonly PipelineStepInput[];
|
|
36
|
+
readonly engine?: PipelineEngineChoice;
|
|
37
|
+
readonly frame?: FrameInput;
|
|
38
|
+
readonly referenceImage?: string;
|
|
39
|
+
readonly imageBase64?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Binary JPEG bytes — preferred over `imageBase64` on internal worker
|
|
42
|
+
* hops (hub → forked worker via Moleculer MsgPack). Skips 33% base64
|
|
43
|
+
* overhead + per-call decode. Exactly one of `frame`/`image`/
|
|
44
|
+
* `imageBase64`/`referenceImage` is required.
|
|
45
|
+
*/
|
|
46
|
+
readonly image?: Uint8Array;
|
|
47
|
+
readonly deviceId?: number;
|
|
48
|
+
/**
|
|
49
|
+
* Correlation id tagged on every `pipeline.progress` event emitted
|
|
50
|
+
* by this run. When a UI-initiated one-shot (`runPipelineTest`)
|
|
51
|
+
* generates its own id and passes it here, the UI can filter the
|
|
52
|
+
* progress stream by `sessionId + nodeId` to ignore concurrent
|
|
53
|
+
* runtime dispatches from live camera frames. Server-side runs
|
|
54
|
+
* that omit this field get a generated id.
|
|
55
|
+
*/
|
|
56
|
+
readonly sessionId?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Singleton capability provided by the pipeline-executor addon.
|
|
60
|
+
* The server backend consumes this via the capability registry.
|
|
61
|
+
*/
|
|
62
|
+
export interface IPipelineExecutorProvider {
|
|
63
|
+
/** Build pipeline schema filtered by the selected (or provided) engine */
|
|
64
|
+
getSchema(engine?: PipelineEngineChoice): Promise<PipelineSchema>;
|
|
65
|
+
/** Get all available engines probed on this agent */
|
|
66
|
+
getAvailableEngines(): Promise<PipelineEngineChoice[]>;
|
|
67
|
+
/** Build default step tree for an engine */
|
|
68
|
+
getDefaultSteps(engine: PipelineEngineChoice): Promise<PipelineDefaultStep[]>;
|
|
69
|
+
/** Get persisted global steps (null if not yet configured). Kept read-only for benchmark fallback. */
|
|
70
|
+
getGlobalSteps(): Promise<PipelineDefaultStep[] | null>;
|
|
71
|
+
/** Get the runner-ready pipeline config */
|
|
72
|
+
getGlobalPipelineConfig(): Promise<PipelineConfig | null>;
|
|
73
|
+
/** Get the currently selected engine (bootstrap default on the node). */
|
|
74
|
+
getSelectedEngine(): Promise<PipelineEngineChoice>;
|
|
75
|
+
getOrchestratorConfigSchema(): Promise<ConfigUISchema>;
|
|
76
|
+
/** Get full inference capabilities (addon models, runtimes, etc.) */
|
|
77
|
+
getCapabilities(forceRefresh?: boolean): Promise<InferenceCapabilities>;
|
|
78
|
+
/** Get available models for a specific addon */
|
|
79
|
+
getAddonModels(input: {
|
|
80
|
+
addonId: string;
|
|
81
|
+
}): Promise<readonly import('./inference-capabilities.js').ModelAvailability[]>;
|
|
82
|
+
/** Download a specific model */
|
|
83
|
+
downloadModel(input: {
|
|
84
|
+
modelId: string;
|
|
85
|
+
format: ModelFormat;
|
|
86
|
+
addonId: string;
|
|
87
|
+
}): Promise<{
|
|
88
|
+
filePath: string;
|
|
89
|
+
sizeMB: number;
|
|
90
|
+
durationMs: number;
|
|
91
|
+
}>;
|
|
92
|
+
/** Delete a downloaded model from disk */
|
|
93
|
+
deleteModel(input: {
|
|
94
|
+
modelId: string;
|
|
95
|
+
format: ModelFormat;
|
|
96
|
+
addonId: string;
|
|
97
|
+
}): Promise<{
|
|
98
|
+
success: true;
|
|
99
|
+
}>;
|
|
100
|
+
/** Execute the full pipeline on a reference/base64 image (for UI/benchmark) */
|
|
101
|
+
runPipeline(input: PipelineRunInput, onProgress?: (message: string) => void): Promise<FrameResult>;
|
|
102
|
+
/**
|
|
103
|
+
* Batched execution — N raw frames packed into one cap call. Routes
|
|
104
|
+
* through `SharedInferencePool.inferBatch` (`MSG_INFER_BATCH = 0x03`)
|
|
105
|
+
* so IPC + JSON envelope cost is amortised N:1 vs N concurrent
|
|
106
|
+
* `runPipeline` calls. Constraints:
|
|
107
|
+
* - Single root step (no crop children) — multi-step trees fall
|
|
108
|
+
* back to sequential execution per-frame inside the provider.
|
|
109
|
+
* - Uniform model across the batch (Python pool resolves one model
|
|
110
|
+
* index per request).
|
|
111
|
+
* Used by the Scrypted-comparison benchmark to mirror
|
|
112
|
+
* `detectObjects(media, {batch})`.
|
|
113
|
+
*/
|
|
114
|
+
runPipelineBatch(input: {
|
|
115
|
+
readonly steps: readonly PipelineStepInput[];
|
|
116
|
+
readonly engine?: PipelineEngineChoice;
|
|
117
|
+
readonly frames: readonly FrameInput[];
|
|
118
|
+
readonly deviceId?: number;
|
|
119
|
+
readonly sessionId?: string;
|
|
120
|
+
}): Promise<{
|
|
121
|
+
readonly results: readonly FrameResult[];
|
|
122
|
+
}>;
|
|
123
|
+
/** Run single-addon detection on a frame */
|
|
124
|
+
detect(input: {
|
|
125
|
+
addonId: string;
|
|
126
|
+
frame: FrameInput;
|
|
127
|
+
config?: Record<string, unknown>;
|
|
128
|
+
}): Promise<DetectorOutput>;
|
|
129
|
+
listReferenceImages(): Promise<Array<{
|
|
130
|
+
id: string;
|
|
131
|
+
filename: string;
|
|
132
|
+
sizeKB: number;
|
|
133
|
+
}>>;
|
|
134
|
+
getReferenceImage(input: {
|
|
135
|
+
filename: string;
|
|
136
|
+
}): Promise<{
|
|
137
|
+
base64: string;
|
|
138
|
+
filename: string;
|
|
139
|
+
} | null>;
|
|
140
|
+
getReferenceAudioFiles(): Promise<readonly {
|
|
141
|
+
filename: string;
|
|
142
|
+
sizeKb: number;
|
|
143
|
+
}[]>;
|
|
144
|
+
getReferenceAudio(input: {
|
|
145
|
+
filename: string;
|
|
146
|
+
}): Promise<{
|
|
147
|
+
base64: string;
|
|
148
|
+
}>;
|
|
149
|
+
getAudioCapabilities(): Promise<{
|
|
150
|
+
activeBackend: string;
|
|
151
|
+
availableBackends: readonly {
|
|
152
|
+
id: string;
|
|
153
|
+
name: string;
|
|
154
|
+
description: string;
|
|
155
|
+
available: boolean;
|
|
156
|
+
}[];
|
|
157
|
+
sampleRate: number;
|
|
158
|
+
chunkDurationMs: number;
|
|
159
|
+
}>;
|
|
160
|
+
/**
|
|
161
|
+
* Run the audio classifier on a reference WAV file (benchmark path).
|
|
162
|
+
*
|
|
163
|
+
* Returns an `AudioResult` wrapped in a `{success, error?, frame?}`
|
|
164
|
+
* envelope so the UI can render a clean failure when the classifier
|
|
165
|
+
* cap isn't available. Each class above the step's `minScore`
|
|
166
|
+
* threshold becomes one `AudioDetection` entry; the full top-N ranked
|
|
167
|
+
* list lives in `frame.debug.alternateLabels['audio-classifier']`.
|
|
168
|
+
*/
|
|
169
|
+
runAudioTest(input: {
|
|
170
|
+
addonId: string;
|
|
171
|
+
modelId: string;
|
|
172
|
+
filename?: string;
|
|
173
|
+
settings?: Record<string, unknown>;
|
|
174
|
+
}): Promise<{
|
|
175
|
+
success: boolean;
|
|
176
|
+
error?: string;
|
|
177
|
+
frame?: import('../types/detection.js').AudioResult;
|
|
178
|
+
}>;
|
|
179
|
+
listTemplates(): Promise<PipelineTemplate[]>;
|
|
180
|
+
saveTemplate(input: {
|
|
181
|
+
name: string;
|
|
182
|
+
steps: readonly PipelineTemplateStep[];
|
|
183
|
+
engine: PipelineEngineChoice;
|
|
184
|
+
}): Promise<PipelineTemplate>;
|
|
185
|
+
updateTemplate(input: {
|
|
186
|
+
id: string;
|
|
187
|
+
name?: string;
|
|
188
|
+
steps?: readonly PipelineTemplateStep[];
|
|
189
|
+
}): Promise<PipelineTemplate>;
|
|
190
|
+
deleteTemplate(input: {
|
|
191
|
+
id: string;
|
|
192
|
+
}): Promise<void>;
|
|
193
|
+
/** Get the detection pipeline addon's config schema (for detection-config UI). */
|
|
194
|
+
getDetectionConfigSchema(): Promise<ConfigUISchema | null>;
|
|
195
|
+
/** Get the addon resolver for runtime pipeline execution */
|
|
196
|
+
getAddonResolver(): Promise<IAddonResolver>;
|
|
197
|
+
/** Set the in-process tRPC client for inter-capability calls. */
|
|
198
|
+
setApi(api: unknown): Promise<void>;
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=pipeline-executor-capability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-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,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,SAAS,oBAAoB,EAAE,CAAC;QAAC,MAAM,EAAE,oBAAoB,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;IACtI,cAAc,CAAC,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;IACxH,cAAc,CAAC,KAAK,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAEpD,kFAAkF;IAClF,wBAAwB,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAA;IAmB1D,4DAA4D;IAC5D,gBAAgB,IAAI,OAAO,CAAC,cAAc,CAAC,CAAA;IAI3C,iEAAiE;IACjE,MAAM,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACpC"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import type { RunnerLocalLoad } from './pipeline-runner-capability.js';
|
|
2
|
+
/** Stream profile quality values. */
|
|
3
|
+
export type OrchestrationStreamProfile = 'high' | 'mid' | 'low';
|
|
4
|
+
/**
|
|
5
|
+
* How motion is detected for a camera — list of active sources,
|
|
6
|
+
* OR-ed. Re-export of the cap-side type so orchestrator-facing code
|
|
7
|
+
* doesn't have to import from the pipeline-runner cap directly.
|
|
8
|
+
*/
|
|
9
|
+
export type OrchestrationMotionSources = import('../capabilities/pipeline-runner.cap.js').MotionSources;
|
|
10
|
+
/**
|
|
11
|
+
* Pipeline placement record persisted by `addon-pipeline-orchestrator` via
|
|
12
|
+
* the multi-level settings store. The orchestrator looks this up on every
|
|
13
|
+
* `DeviceStreamsRegistered` event to decide whether the camera has a
|
|
14
|
+
* manual pipeline node pin (L1 affinity) or whether the load balancer
|
|
15
|
+
* (L2 capacity / L3 hardware-aware) needs to pick one.
|
|
16
|
+
*
|
|
17
|
+
* Naming convention: `{Pipeline,Decoder}Assignment` — one record type per
|
|
18
|
+
* placement domain managed by the orchestrator. Future domains (recording,
|
|
19
|
+
* etc.) follow the same pattern.
|
|
20
|
+
*/
|
|
21
|
+
export interface PipelineAssignment {
|
|
22
|
+
readonly deviceId: number;
|
|
23
|
+
/** Moleculer node id of the runner currently responsible for this camera. */
|
|
24
|
+
readonly agentNodeId: string;
|
|
25
|
+
/** True when the assignment was set manually, false when chosen by the balancer. */
|
|
26
|
+
readonly pinned: boolean;
|
|
27
|
+
/** Why this assignment was made — useful for debugging the load balancer. */
|
|
28
|
+
readonly reason: 'manual' | 'capacity' | 'hardware-affinity' | 'failover' | 'rebalance';
|
|
29
|
+
/** Unix timestamp (ms) when the assignment was last updated. */
|
|
30
|
+
readonly assignedAt: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Decoder placement record. Symmetric to `PipelineAssignment` but for the
|
|
34
|
+
* decoder-node placement domain (`balanceDecoder` decision: manual pin →
|
|
35
|
+
* co-located with pipeline → capacity).
|
|
36
|
+
*/
|
|
37
|
+
export interface DecoderAssignment {
|
|
38
|
+
readonly deviceId: number;
|
|
39
|
+
/** Moleculer node id of the decoder provider currently responsible for this camera. */
|
|
40
|
+
readonly decoderNodeId: string;
|
|
41
|
+
/** True when the assignment was set manually via `assignDecoder`, false when chosen by the balancer. */
|
|
42
|
+
readonly pinned: boolean;
|
|
43
|
+
/** Why this assignment was made — useful for debugging the decoder balancer. */
|
|
44
|
+
readonly reason: 'manual' | 'co-located' | 'capacity' | 'hardware-affinity';
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Per-agent load summary surfaced to the load balancer + dashboards.
|
|
48
|
+
* Aggregated from each runner's `getLocalLoad` cap call.
|
|
49
|
+
*/
|
|
50
|
+
export interface AgentLoadSummary {
|
|
51
|
+
readonly nodeId: string;
|
|
52
|
+
readonly online: boolean;
|
|
53
|
+
readonly load: RunnerLocalLoad;
|
|
54
|
+
/** Computed score used by the L2 capacity balancer (lower = less loaded). */
|
|
55
|
+
readonly score: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Aggregate metrics across the whole detection cluster.
|
|
59
|
+
*
|
|
60
|
+
* Replaces the legacy `IPipelineExecutorProvider.orchestratorStatus()` cap
|
|
61
|
+
* method as the canonical source of truth for global pipeline health.
|
|
62
|
+
* The orchestrator computes this by aggregating each runner's local
|
|
63
|
+
* metrics over the cluster.
|
|
64
|
+
*/
|
|
65
|
+
export interface PipelineOrchestratorGlobalMetrics {
|
|
66
|
+
readonly totalAgents: number;
|
|
67
|
+
readonly onlineAgents: number;
|
|
68
|
+
readonly totalCameras: number;
|
|
69
|
+
readonly attachedCameras: number;
|
|
70
|
+
readonly activeCameras: number;
|
|
71
|
+
/** Average inference time across all agents weighted by their camera count. */
|
|
72
|
+
readonly avgInferenceTimeMs: number;
|
|
73
|
+
/** Total queue depth across all agents. */
|
|
74
|
+
readonly queueDepth: number;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Pipeline Orchestrator provider interface — implemented by
|
|
78
|
+
* `addon-pipeline-orchestrator`. Lives on the hub.
|
|
79
|
+
*
|
|
80
|
+
* Tracks the camera-to-agent assignment map, listens to device lifecycle
|
|
81
|
+
* events, queries each runner's capacity + hardware profile, and dispatches
|
|
82
|
+
* `attachCamera` / `detachCamera` cap calls to the appropriate runner
|
|
83
|
+
* instances. Persists assignments via the multi-level settings store so
|
|
84
|
+
* they survive hub restarts.
|
|
85
|
+
*
|
|
86
|
+
* Strictly the control plane: never sees a frame, never calls inference,
|
|
87
|
+
* never drains queues. The runner does that work locally on each agent.
|
|
88
|
+
*
|
|
89
|
+
* All methods are serializable so the orchestrator is routable across the
|
|
90
|
+
* cluster (in practice it's hub-only, but the interface enforces the
|
|
91
|
+
* discipline that nothing leaks across boundaries as live references).
|
|
92
|
+
*/
|
|
93
|
+
export interface IPipelineOrchestratorProvider {
|
|
94
|
+
/**
|
|
95
|
+
* Pin a camera's pipeline to a specific agent. Sets the manual L1
|
|
96
|
+
* affinity in the camera's per-device settings and re-evaluates the
|
|
97
|
+
* assignment immediately.
|
|
98
|
+
*/
|
|
99
|
+
assignPipeline(input: {
|
|
100
|
+
deviceId: number;
|
|
101
|
+
agentNodeId: string;
|
|
102
|
+
}): Promise<{
|
|
103
|
+
success: true;
|
|
104
|
+
}>;
|
|
105
|
+
/**
|
|
106
|
+
* Clear a camera's pipeline pin and stop detection on it.
|
|
107
|
+
* Removes the entry from the assignment map until the next
|
|
108
|
+
* `DeviceStreamsRegistered` event triggers a fresh assignment.
|
|
109
|
+
*/
|
|
110
|
+
unassignPipeline(input: {
|
|
111
|
+
deviceId: number;
|
|
112
|
+
}): Promise<{
|
|
113
|
+
success: true;
|
|
114
|
+
}>;
|
|
115
|
+
/**
|
|
116
|
+
* Trigger a full rebalance pass. Iterates over all assigned cameras,
|
|
117
|
+
* recomputes the optimal agent for each one based on current load +
|
|
118
|
+
* hardware affinity, and migrates cameras whose current agent is no
|
|
119
|
+
* longer optimal. Pinned cameras are never migrated.
|
|
120
|
+
*
|
|
121
|
+
* Returns the number of cameras that were migrated to a different agent.
|
|
122
|
+
*/
|
|
123
|
+
rebalance(): Promise<{
|
|
124
|
+
migrated: number;
|
|
125
|
+
}>;
|
|
126
|
+
/** Get every camera's pipeline placement. */
|
|
127
|
+
getPipelineAssignments(): readonly PipelineAssignment[];
|
|
128
|
+
/** Get one camera's pipeline placement, or null if unassigned. */
|
|
129
|
+
getPipelineAssignment(input: {
|
|
130
|
+
deviceId: number;
|
|
131
|
+
}): PipelineAssignment | null;
|
|
132
|
+
/**
|
|
133
|
+
* Get per-agent load summaries used by the load balancer + dashboards.
|
|
134
|
+
* Async so each call can refresh the in-memory cache from live runner
|
|
135
|
+
* state — the cache is only populated during dispatch / rebalance, so
|
|
136
|
+
* a sync accessor would return stale (empty) data after a server
|
|
137
|
+
* restart that rehydrated assignments from disk without
|
|
138
|
+
* re-dispatching.
|
|
139
|
+
*/
|
|
140
|
+
getAgentLoad(): Promise<readonly AgentLoadSummary[]>;
|
|
141
|
+
/** Aggregate global metrics across the whole detection cluster. */
|
|
142
|
+
getGlobalMetrics(): Promise<PipelineOrchestratorGlobalMetrics>;
|
|
143
|
+
/**
|
|
144
|
+
* Read the per-node capability binding map: which addon implements each
|
|
145
|
+
* well-known cap on the named node. Empty record = no overrides (the
|
|
146
|
+
* kernel's "first registered wins" lookup applies).
|
|
147
|
+
*/
|
|
148
|
+
getCapabilityBindings(input: {
|
|
149
|
+
nodeId: string;
|
|
150
|
+
}): Promise<Readonly<Record<string, string>>>;
|
|
151
|
+
/**
|
|
152
|
+
* Set the addon that implements `capName` on `nodeId`. Persisted in
|
|
153
|
+
* the orchestrator's settings store; emits a `capability.binding-changed`
|
|
154
|
+
* event so each kernel process updates its local preferred-provider
|
|
155
|
+
* registry on the fly.
|
|
156
|
+
*/
|
|
157
|
+
setCapabilityBinding(input: {
|
|
158
|
+
nodeId: string;
|
|
159
|
+
capName: string;
|
|
160
|
+
addonId: string;
|
|
161
|
+
}): Promise<{
|
|
162
|
+
success: true;
|
|
163
|
+
}>;
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=pipeline-orchestrator-capability.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pipeline-orchestrator-capability.d.ts","sourceRoot":"","sources":["../../src/interfaces/pipeline-orchestrator-capability.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAkBtE,qCAAqC;AACrC,MAAM,MAAM,0BAA0B,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAA;AAE/D;;;;GAIG;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,wCAAwC,EAAE,aAAa,CAAA;AAMvG;;;;;;;;;;GAUG;AACH,MA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A;KAAE,CAAC,CAAA;CAO/B"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { OrchestratorMetrics, CameraMetrics } from './api-shared.js';
|
|
2
|
+
import type { PipelineEngineChoice } from '../types/pipeline.js';
|
|
3
|
+
import type { PipelineStepInputOutput } from '../capabilities/pipeline-executor.cap.js';
|
|
4
|
+
import type { Zone } from '../capabilities/zones.cap.js';
|
|
5
|
+
import type { PipelinePhaseMode } from '../device/device-profile.js';
|
|
6
|
+
/**
|
|
7
|
+
* Camera assignment payload sent by the pipeline-orchestrator to a runner
|
|
8
|
+
* via `attachCamera`. Carries everything the runner needs to subscribe to
|
|
9
|
+
* the local stream-broker and dispatch frames to motion / detection caps.
|
|
10
|
+
*
|
|
11
|
+
* Stateless-pipeline model: `engine`, `steps`, and `audio` travel with the
|
|
12
|
+
* payload so the runner holds the full content in RAM for the lifetime of
|
|
13
|
+
* the attach. Re-sent on rebalance, edit, or restart. The fields are
|
|
14
|
+
* optional during the additive migration (Phase 1) — the runner treats
|
|
15
|
+
* absent content as "no inference" until Phase 3 makes them required.
|
|
16
|
+
*/
|
|
17
|
+
export interface RunnerCameraConfig {
|
|
18
|
+
readonly deviceId: number;
|
|
19
|
+
readonly motionCooldownMs: number;
|
|
20
|
+
readonly motionFps: number;
|
|
21
|
+
readonly detectionFps: number;
|
|
22
|
+
readonly motionStreamId: string;
|
|
23
|
+
readonly detectionStreamId: string;
|
|
24
|
+
/** Motion sources that can activate the pipeline. At least one entry. */
|
|
25
|
+
readonly motionSources: import('../capabilities/pipeline-runner.cap.js').MotionSources;
|
|
26
|
+
readonly pipelineEnabled: boolean;
|
|
27
|
+
/** Engine choice for video steps — Phase 1 optional, runner ignores until Phase 3. */
|
|
28
|
+
readonly engine?: PipelineEngineChoice;
|
|
29
|
+
/** Ordered tree of video steps — Phase 1 optional, runner ignores until Phase 3. */
|
|
30
|
+
readonly steps?: readonly PipelineStepInputOutput[];
|
|
31
|
+
/** Audio classification branch — Phase 1 optional, runner ignores until Phase 3. */
|
|
32
|
+
readonly audio?: {
|
|
33
|
+
readonly engine: PipelineEngineChoice;
|
|
34
|
+
readonly modelId: string;
|
|
35
|
+
readonly enabled: boolean;
|
|
36
|
+
} | null;
|
|
37
|
+
/**
|
|
38
|
+
* Per-camera detection zones (user + onboard) snapshot taken at
|
|
39
|
+
* dispatch time. Empty array → no zone filtering. Forwarded so
|
|
40
|
+
* motion-wasm + pipeline-executor running on the runner can apply
|
|
41
|
+
* include/exclude/monitor logic without an extra hub round-trip;
|
|
42
|
+
* the orchestrator re-attaches the camera whenever the `zones`
|
|
43
|
+
* device-state slice changes so the runner's copy stays in sync.
|
|
44
|
+
*/
|
|
45
|
+
readonly zones?: readonly Zone[];
|
|
46
|
+
/**
|
|
47
|
+
* Operator-facing scheduling modes. The runner uses these to gate
|
|
48
|
+
* its substream subscribers + phase machine:
|
|
49
|
+
*
|
|
50
|
+
* - `'disabled'` — runner skips the substream subscriber for
|
|
51
|
+
* this phase entirely. Bindings stay bound;
|
|
52
|
+
* this is the runtime-level off switch.
|
|
53
|
+
* - `'always-on'` — phase starts in `'active'` and stays active.
|
|
54
|
+
* - `'on-motion'` — phase starts in `'watching'`; transitions to
|
|
55
|
+
* `'active'` when a motion source fires; falls
|
|
56
|
+
* back after `motionCooldownMs`.
|
|
57
|
+
*
|
|
58
|
+
* `detectionMode` defaults to `'on-motion'` (battery profile keeps
|
|
59
|
+
* this); `audioMode` defaults to `'always-on'` (battery profile
|
|
60
|
+
* lowers to `'disabled'`).
|
|
61
|
+
*/
|
|
62
|
+
readonly detectionMode: PipelinePhaseMode;
|
|
63
|
+
readonly audioMode: PipelinePhaseMode;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Hardware capability flags reported by a runner instance. Consumed by the
|
|
67
|
+
* orchestrator's L3 hardware-aware load balancer to assign cameras to the
|
|
68
|
+
* agent best suited for their detection workload (e.g. high-FPS cameras
|
|
69
|
+
* onto GPU agents, motion-only onto CPU-only agents).
|
|
70
|
+
*/
|
|
71
|
+
export interface RunnerHardwareCapabilities {
|
|
72
|
+
readonly hasGpu: boolean;
|
|
73
|
+
/** Inference backend identifier (e.g. 'coreml', 'openvino', 'cpu', 'cuda'). */
|
|
74
|
+
readonly inferenceBackend?: string;
|
|
75
|
+
readonly cpuCores?: number;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Runtime load summary returned by `getLocalLoad`. The orchestrator's L2
|
|
79
|
+
* capacity-based balancer uses this to compute a "least-loaded agent"
|
|
80
|
+
* score when picking a target for new camera assignments.
|
|
81
|
+
*/
|
|
82
|
+
export interface RunnerLocalLoad {
|
|
83
|
+
readonly nodeId: string;
|
|
84
|
+
readonly attachedCameras: number;
|
|
85
|
+
readonly activeCameras: number;
|
|
86
|
+
readonly avgInferenceFps: number;
|
|
87
|
+
readonly avgInferenceTimeMs: number;
|
|
88
|
+
readonly queueDepthTotal: number;
|
|
89
|
+
readonly hardware: RunnerHardwareCapabilities;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Aggregate runtime metrics for a runner's whole local pool. Mirrors the
|
|
93
|
+
* legacy `OrchestratorMetrics` shape so dashboards keep working unchanged
|
|
94
|
+
* when they migrate from `pipeline-executor.orchestratorStatus` to the
|
|
95
|
+
* new runner cap.
|
|
96
|
+
*/
|
|
97
|
+
export interface RunnerLocalMetrics extends OrchestratorMetrics {
|
|
98
|
+
readonly nodeId: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Pipeline Runner provider interface — implemented by `addon-pipeline-runner`.
|
|
102
|
+
*
|
|
103
|
+
* One instance per node (singleton scope). Receives camera assignments from
|
|
104
|
+
* the hub orchestrator, owns the per-camera frame queues + semaphore +
|
|
105
|
+
* motion → detection phase machine, and emits typed events on the bus
|
|
106
|
+
* (`detection.motion-analysis`, `pipeline.inference-result`, `pipeline.trace`).
|
|
107
|
+
*
|
|
108
|
+
* All methods exposed here mirror the cap definition exactly — there are no
|
|
109
|
+
* "local-only" methods, no callbacks, no live object passing. Everything is
|
|
110
|
+
* serializable so the runner is transparently routable across the cluster.
|
|
111
|
+
*/
|
|
112
|
+
export interface IPipelineRunnerProvider {
|
|
113
|
+
/** Attach a camera to this runner. Subscribes to the local broker. */
|
|
114
|
+
attachCamera(config: RunnerCameraConfig): Promise<{
|
|
115
|
+
success: true;
|
|
116
|
+
}>;
|
|
117
|
+
/** Detach a camera. Unsubscribes from the broker, clears queues. */
|
|
118
|
+
detachCamera(input: {
|
|
119
|
+
deviceId: number;
|
|
120
|
+
}): Promise<{
|
|
121
|
+
success: true;
|
|
122
|
+
}>;
|
|
123
|
+
/**
|
|
124
|
+
* Report an external motion event for a camera. Drives the runner's
|
|
125
|
+
* unified phase machine — every `detected:true` (analyzer or onboard)
|
|
126
|
+
* rearms the cooldown timer; `detected:false` is a no-op. `regions`
|
|
127
|
+
* is populated only by `source: 'analyzer'`.
|
|
128
|
+
*/
|
|
129
|
+
reportMotion(input: import('../capabilities/pipeline-runner.cap.js').ReportMotionInput): Promise<{
|
|
130
|
+
success: true;
|
|
131
|
+
}>;
|
|
132
|
+
/** Return load summary used by the orchestrator's load balancer. */
|
|
133
|
+
getLocalLoad(): Promise<RunnerLocalLoad>;
|
|
134
|
+
/** Return aggregate runtime metrics for this runner instance. */
|
|
135
|
+
getLocalMetrics(): Promise<RunnerLocalMetrics>;
|
|
136
|
+
/** Per-camera metrics for cameras attached to this runner. */
|
|
137
|
+
getCameraMetrics(input: {
|
|
138
|
+
deviceId: number;
|
|
139
|
+
}): Promise<CameraMetrics | null>;
|
|
140
|
+
/** All per-camera metrics in one round-trip. */
|
|
141
|
+
getAllCameraMetrics(): ReadonlyArray<{
|
|
142
|
+
deviceId: number;
|
|
143
|
+
} & CameraMetrics>;
|
|
144
|
+
/** List the deviceIds currently attached to this runner. */
|
|
145
|
+
getLocalCameras(): readonly number[];
|
|
146
|
+
}
|
|
147
|
+
//# sourceMappingURL=pipeline-runner-capability.d.ts.map
|
|
@@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EAAE,iBAAiB,GACxE,OAAO,CAAC;QAAE,OAAO,EAAE,IAAI,CAAA;KAAE,CAAC,CAAA;IAE7B,oEAAoE;IACpE,YAAY,IAAI,OAAO,CAAC,eAAe,CAAC,CAAA;IACxC,iEAAiE;IACjE,eAAe,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAAA;IAC9C,8DAA8D;IAC9D,gBAAgB,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAAA;IAC5E,gDAAgD;IAChD,mBAAmB,IAAI,aAAa,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,aAAa,CAAC,CAAA;IAC1E,4DAA4D;IAC5D,eAAe,IAAI,SAAS,MAAM,EAAE,CAAA;CAQrC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FrameInput } from '../types/io.js';
|
|
2
|
-
import type { CropInput } from '../types/detection.js';
|
|
1
|
+
import type { FrameInput, AudioChunkInput } from '../types/io.js';
|
|
2
|
+
import type { CropInput, DetectorOutput, CropperOutput, ClassifierOutput, RefinerOutput } from '../types/detection.js';
|
|
3
3
|
import type { PipelineConfig, PipelineResult, StepResult, PipelineStatus } from '../types/pipeline.js';
|
|
4
4
|
export interface IPipelineRunner {
|
|
5
5
|
run(frame: FrameInput, config?: PipelineConfig): Promise<PipelineResult>;
|
|
@@ -20,4 +20,20 @@ export interface ValidationResult {
|
|
|
20
20
|
export interface IPipelineValidator {
|
|
21
21
|
validate(config: PipelineConfig): ValidationResult;
|
|
22
22
|
}
|
|
23
|
+
/** Output type from any inference addon */
|
|
24
|
+
export type InferenceOutput = DetectorOutput | CropperOutput | ClassifierOutput | RefinerOutput;
|
|
25
|
+
/** Callable addon instance — the result of resolving an addon */
|
|
26
|
+
export interface IAddonCaller {
|
|
27
|
+
/** Run inference on a frame or crop */
|
|
28
|
+
process(input: FrameInput | CropInput): Promise<InferenceOutput>;
|
|
29
|
+
/** Classify an audio chunk (optional — only audio addons implement this) */
|
|
30
|
+
classifyAudio?(input: AudioChunkInput): Promise<ClassifierOutput>;
|
|
31
|
+
}
|
|
32
|
+
/** Resolves addon IDs to callable instances — abstracts transport (in-process, forked, remote) */
|
|
33
|
+
export interface IAddonResolver {
|
|
34
|
+
/** Get a callable addon for the given ID and config */
|
|
35
|
+
resolve(addonId: string, config: Record<string, unknown>): Promise<IAddonCaller>;
|
|
36
|
+
/** Shutdown all resolved addons */
|
|
37
|
+
shutdownAll(): Promise<void>;
|
|
38
|
+
}
|
|
23
39
|
//# sourceMappingURL=pipeline-runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline-runner.d.ts","sourceRoot":"","sources":["../../src/interfaces/pipeline-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"pipeline-runner.d.ts","sourceRoot":"","sources":["../../src/interfaces/pipeline-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AACtH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEtG,MAAM,WAAW,eAAe;IAC9B,GAAG,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;IACxE,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,GAAG,SAAS,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,C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time: 'node' | 'python';
|
|
51
51
|
readonly backend: string;
|
|
52
|
-
readonly format:
|
|
52
|
+
readonly format: import('../types/models.js').ModelFormat;
|
|
53
53
|
readonly reason: string;
|
|
54
54
|
}
|
|
55
55
|
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/interfaces/platform.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAA;IAC/C,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,KAAK,CAAA;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAA;IAChC,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAA;IAC5B,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAAA;CAC7B;AAED,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,CAAA;IACnD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,WAAW,CAAA;CACzC;AAED,mDAAmD;AACnD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAA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AE,MAAM,CAAA;IACrB,yEAAyE;IACzE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,oCAAoC;IACpC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,6CAA6C;IAC7C,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CACpC;AAED,wEAAwE;AACxE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,EAAE,OAAO,oBAAoB,EAAE,WAAW,CAAA;IACzD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IQueryable — standard capability for addons to expose custom query methods
|
|
3
|
+
* discoverable by the hub and admin UI.
|
|
4
|
+
*
|
|
5
|
+
* Any addon implementing this capability can be queried from the hub via:
|
|
6
|
+
* broker.call("{addonId}.queryable.query", { name, params })
|
|
7
|
+
*
|
|
8
|
+
* The admin UI auto-generates forms from paramsSchema and renders results
|
|
9
|
+
* from resultSchema.
|
|
10
|
+
*/
|
|
11
|
+
interface QueryCatalogEntry {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly description: string;
|
|
14
|
+
/** Zod schema for query parameters — used for validation + auto-generated UI forms */
|
|
15
|
+
readonly paramsSchema?: unknown;
|
|
16
|
+
/** Zod schema for query results — used for auto-rendered result display */
|
|
17
|
+
readonly resultSchema?: unknown;
|
|
18
|
+
}
|
|
19
|
+
interface IQueryable {
|
|
20
|
+
/** List all queries this addon supports */
|
|
21
|
+
getQueryCatalog(): QueryCatalogEntry[];
|
|
22
|
+
/** Execute a named query with parameters */
|
|
23
|
+
query(name: string, params: Record<string, unknown>): Promise<unknown>;
|
|
24
|
+
}
|
|
25
|
+
export type { IQueryable, QueryCatalogEntry };
|
|
26
|
+
//# sourceMappingURL=queryable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryable.d.ts","sourceRoot":"","sources":["../../src/interfaces/queryable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,UAAU,iBAAiB;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;IAC5B,sFAAsF;IACtF,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;IAC/B,2EAA2E;IAC3E,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAChC;AAED,UAAU,UAAU;IAClB,2CAA2C;IAC3C,eAAe,IAAI,iBAAiB,EAAE,CAAA;IACtC,4CAA4C;IAC5C,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CACvE;AAED,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { DetectionRuntime, DetectionDevice } from '../types/config.js';
|
|
2
|
+
/**
|
|
3
|
+
* Raw tensor inference engine — runs inference on pre-processed tensor data.
|
|
4
|
+
* Used by addons that need custom preprocessing (e.g. CLIP embedding encoder).
|
|
5
|
+
*
|
|
6
|
+
* Unlike IInferenceEngine (JPEG in → EngineOutput out), this accepts
|
|
7
|
+
* raw Float32Array tensors with explicit shapes.
|
|
8
|
+
*/
|
|
9
|
+
export interface IRawTensorEngine {
|
|
10
|
+
readonly runtime: DetectionRuntime;
|
|
11
|
+
readonly device: DetectionDevice;
|
|
12
|
+
/** Run inference on a pre-processed tensor */
|
|
13
|
+
run(input: Float32Array, inputShape: readonly number[]): Promise<Float32Array>;
|
|
14
|
+
dispose(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=raw-tensor-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"raw-tensor-engine.d.ts","sourceRoot":"","sources":["../../src/interfaces/raw-tensor-engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAE3E;;;;;;GAMG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,eAAe,CAAA;IAEhC,8CAA8C;IAC9C,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,CAAA;IAE9E,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACzB"}
|