@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,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ReadinessRegistry — kernel-side tracker for capability readiness
|
|
3
|
+
* transitions. Spec: `docs/superpowers/specs/2026-04-19-system-readiness-design.md`.
|
|
4
|
+
*
|
|
5
|
+
* Each process owns one registry. The registry:
|
|
6
|
+
* - Listens to `system.ready-state` events on the event bus.
|
|
7
|
+
* - Maintains a `Map<key, ReadinessRecord>` snapshot of the most
|
|
8
|
+
* recently observed state + generation + derived epoch.
|
|
9
|
+
* - Exposes `emitReady` / `emitStarting` / `emitDown` helpers for
|
|
10
|
+
* local producers (which stamp the process-wide `generation`).
|
|
11
|
+
* - Exposes `awaitReady(capName, scope, {timeoutMs, signal})` and
|
|
12
|
+
* `onReadyState(capName, scope, handler)` for consumers.
|
|
13
|
+
*
|
|
14
|
+
* Epoch derivation:
|
|
15
|
+
* - First `ready` observed for a `(capName, scope)` → epoch = 1.
|
|
16
|
+
* - `ready` received with a generation different from the last
|
|
17
|
+
* `currentGeneration` → epoch++.
|
|
18
|
+
* - Same-generation repeated `ready` events → epoch unchanged
|
|
19
|
+
* (idempotent keepalive; e.g. re-emit on `$node.connected`).
|
|
20
|
+
*
|
|
21
|
+
* Not persisted. Rebuilt from the event stream + optional boot-time
|
|
22
|
+
* snapshot rehydration by the caller.
|
|
23
|
+
*/
|
|
24
|
+
import type { IEventBus, ReadinessScope, ReadinessState } from '../interfaces/event-bus.js';
|
|
25
|
+
import type { IScopedLogger } from '../interfaces/logging.js';
|
|
26
|
+
import type { IReadinessRegistry, IReadinessHandler, IAwaitReadyOptions, IReadinessTransition } from '../interfaces/readiness.js';
|
|
27
|
+
/**
|
|
28
|
+
* Concrete types live here; `interfaces/readiness.ts` declares the
|
|
29
|
+
* matching narrow interfaces (`IReadinessTransition`,
|
|
30
|
+
* `IReadinessHandler`, `IAwaitReadyOptions`) used by `AddonContext`
|
|
31
|
+
* and other consumer-facing types.
|
|
32
|
+
*/
|
|
33
|
+
export type ReadinessTransition = IReadinessTransition;
|
|
34
|
+
export type ReadinessHandler = IReadinessHandler;
|
|
35
|
+
export type AwaitReadyOptions = IAwaitReadyOptions;
|
|
36
|
+
export declare class ReadinessTimeoutError extends Error {
|
|
37
|
+
readonly capName: string;
|
|
38
|
+
readonly scope: ReadinessScope;
|
|
39
|
+
readonly waitedMs: number;
|
|
40
|
+
constructor(capName: string, scope: ReadinessScope, waitedMs: number);
|
|
41
|
+
}
|
|
42
|
+
interface ReadinessRecord {
|
|
43
|
+
capName: string;
|
|
44
|
+
scope: ReadinessScope;
|
|
45
|
+
state: ReadinessState;
|
|
46
|
+
generation: string;
|
|
47
|
+
epoch: number;
|
|
48
|
+
lastChange: number;
|
|
49
|
+
/**
|
|
50
|
+
* Node that emitted the latest transition for this record. Needed for
|
|
51
|
+
* `agent.offline` demux of `device`-scoped caps (scope itself carries
|
|
52
|
+
* no node info). For `node`-scoped caps this matches `scope.nodeId`.
|
|
53
|
+
*/
|
|
54
|
+
sourceNodeId: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Build a canonical string key for a `(capName, scope)` pair. Used as
|
|
58
|
+
* the snapshot map key and for log/debug output.
|
|
59
|
+
*/
|
|
60
|
+
export declare function readinessKey(capName: string, scope: ReadinessScope): string;
|
|
61
|
+
declare function scopeKey(scope: ReadinessScope): string;
|
|
62
|
+
export interface ReadinessRegistryOptions {
|
|
63
|
+
readonly eventBus: IEventBus;
|
|
64
|
+
readonly sourceNodeId: string;
|
|
65
|
+
/**
|
|
66
|
+
* Per-process generation id — stamped on every emit made via this
|
|
67
|
+
* registry's `emitReady`/`emitStarting`/`emitDown` helpers. Caller
|
|
68
|
+
* owns the value so it can survive across subsystem re-bindings
|
|
69
|
+
* within the same process. Default: a random 12-char id.
|
|
70
|
+
*/
|
|
71
|
+
readonly generation?: string;
|
|
72
|
+
readonly logger?: IScopedLogger;
|
|
73
|
+
/**
|
|
74
|
+
* Clock source. Injectable for tests.
|
|
75
|
+
*/
|
|
76
|
+
readonly now?: () => number;
|
|
77
|
+
}
|
|
78
|
+
export declare class ReadinessRegistry implements IReadinessRegistry {
|
|
79
|
+
private readonly bus;
|
|
80
|
+
private readonly sourceNodeId;
|
|
81
|
+
private readonly logger;
|
|
82
|
+
private readonly now;
|
|
83
|
+
private readonly generation;
|
|
84
|
+
private readonly snapshot;
|
|
85
|
+
private readonly subscriptions;
|
|
86
|
+
private readonly unsubscribeBus;
|
|
87
|
+
private readonly unsubscribeAgentOffline;
|
|
88
|
+
constructor(options: ReadinessRegistryOptions);
|
|
89
|
+
/** Release the event-bus subscription. Idempotent. */
|
|
90
|
+
close(): void;
|
|
91
|
+
/** Current snapshot for a `(capName, scope)` pair, or `null` if never seen. */
|
|
92
|
+
get(capName: string, scope: ReadinessScope): ReadinessRecord | null;
|
|
93
|
+
/**
|
|
94
|
+
* Serializable snapshot for cross-process transport. Returns an array
|
|
95
|
+
* of `ReadinessRecord` plain objects — safe for MsgPack / JSON
|
|
96
|
+
* transport. Used by the hub's `$readiness.getSnapshot` Moleculer
|
|
97
|
+
* action; consumers hydrate their local registry from the result.
|
|
98
|
+
*/
|
|
99
|
+
getSnapshotForTransport(): readonly ReadinessRecord[];
|
|
100
|
+
/**
|
|
101
|
+
* Hydrate the snapshot from an authoritative source. Entries already
|
|
102
|
+
* present locally are skipped — live deltas (received via the event
|
|
103
|
+
* bus subscription) always take precedence over the snapshot. For
|
|
104
|
+
* each newly hydrated entry, a one-shot transition is dispatched to
|
|
105
|
+
* matching subscriptions so pending `awaitReady` callers unblock
|
|
106
|
+
* without having to wait for a fresh event.
|
|
107
|
+
*
|
|
108
|
+
* Local `epoch` is reset to 1 per entry — consumer-side epoch is
|
|
109
|
+
* derived from observed generation transitions, so this mirrors the
|
|
110
|
+
* value that would have been assigned had the consumer observed the
|
|
111
|
+
* first `ready` event directly.
|
|
112
|
+
*/
|
|
113
|
+
hydrate(records: readonly ReadinessRecord[]): void;
|
|
114
|
+
/** Shallow copy of the full snapshot — mainly for diagnostics/tests. */
|
|
115
|
+
getAll(): ReadonlyMap<string, ReadinessRecord>;
|
|
116
|
+
/**
|
|
117
|
+
* Emit a `ready` transition for a locally-owned capability. The
|
|
118
|
+
* payload carries this registry's `generation` so remote registries
|
|
119
|
+
* can derive their own `epoch`.
|
|
120
|
+
*/
|
|
121
|
+
emitReady(capName: string, scope: ReadinessScope): void;
|
|
122
|
+
emitStarting(capName: string, scope: ReadinessScope): void;
|
|
123
|
+
emitDown(capName: string, scope: ReadinessScope): void;
|
|
124
|
+
/**
|
|
125
|
+
* One-shot: resolve once the cap is `ready`. Reads the snapshot
|
|
126
|
+
* first — if already ready, resolves synchronously on the next tick.
|
|
127
|
+
*
|
|
128
|
+
* Default behaviour is **wait indefinitely** (timeoutMs = `Infinity`):
|
|
129
|
+
* the orchestrator and other callers never want to attach a camera
|
|
130
|
+
* with empty steps just because a cap took longer than 30s to come
|
|
131
|
+
* up. Pass an explicit finite `timeoutMs` to bound the wait, or an
|
|
132
|
+
* `AbortSignal` to cancel externally. `Infinity` is honoured natively
|
|
133
|
+
* — no `setTimeout` is registered (Node's setTimeout silently clamps
|
|
134
|
+
* values above ~24.8d, so we must skip the timer entirely).
|
|
135
|
+
*/
|
|
136
|
+
awaitReady(capName: string, scope: ReadinessScope, opts?: AwaitReadyOptions): Promise<void>;
|
|
137
|
+
/**
|
|
138
|
+
* Observable: every transition (starting/ready/down) dispatches to
|
|
139
|
+
* `handler`. On subscription, if the snapshot has a current state,
|
|
140
|
+
* the handler fires ONCE asynchronously with that state as the
|
|
141
|
+
* initial transition (duration = 0) so late subscribers can pick up
|
|
142
|
+
* current state without racing the next transition.
|
|
143
|
+
*
|
|
144
|
+
* Returns an unsubscribe function.
|
|
145
|
+
*/
|
|
146
|
+
onReadyState(capName: string, scope: ReadinessScope, handler: ReadinessHandler): () => void;
|
|
147
|
+
private emitTransition;
|
|
148
|
+
/**
|
|
149
|
+
* Update snapshot + dispatch to subscribers. Idempotent: same
|
|
150
|
+
* `generation + state` replay is a no-op for both snapshot and
|
|
151
|
+
* subscribers.
|
|
152
|
+
*
|
|
153
|
+
* Defensive against malformed payloads (legal reason: a mock bus's
|
|
154
|
+
* `getRecent` may ignore the category filter and replay unrelated
|
|
155
|
+
* events when we hydrate at construction time).
|
|
156
|
+
*/
|
|
157
|
+
private ingest;
|
|
158
|
+
/**
|
|
159
|
+
* `agent.offline` demux. When an agent disconnects ungracefully,
|
|
160
|
+
* its BaseAddon's shutdown hook doesn't fire — consumers would
|
|
161
|
+
* otherwise keep waiting on a stale `ready`. Walk the snapshot and
|
|
162
|
+
* synthesize a `down` transition for every node-scoped record bound
|
|
163
|
+
* to the disconnected `nodeId`, skipping records already `down`.
|
|
164
|
+
*
|
|
165
|
+
* Synthesis is LOCAL: we don't re-emit on the bus. Every registry
|
|
166
|
+
* (one per process) receives the same `agent.offline` and reacts
|
|
167
|
+
* independently, which means no duplicated downs and no central
|
|
168
|
+
* supervisor required.
|
|
169
|
+
*/
|
|
170
|
+
private synthesizeDownForNode;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Given a list of `(capName, scope)` pairs that a just-disconnected
|
|
174
|
+
* node owned, emit a `down` transition for each. Callers (kernel
|
|
175
|
+
* supervisor, hub `$node.disconnected` handler) wire this up once they
|
|
176
|
+
* know which caps the node held.
|
|
177
|
+
*/
|
|
178
|
+
export declare function emitDownForOwnedCaps(registry: ReadinessRegistry, owned: ReadonlyArray<{
|
|
179
|
+
readonly capName: string;
|
|
180
|
+
readonly scope: ReadinessScope;
|
|
181
|
+
}>): void;
|
|
182
|
+
export { scopeKey };
|
|
183
|
+
//# sourceMappingURL=readiness-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readiness-registry.d.ts","sourceRoot":"","sources":["../../src/readiness/readiness-registry.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zod schemas for persisted record types.
|
|
3
|
+
*
|
|
4
|
+
* These schemas serve as the single source of truth for types that are
|
|
5
|
+
* stored in the settings-store backend and retrieved via tRPC. They
|
|
6
|
+
* replace the manual TypeScript interfaces with schema-derived types,
|
|
7
|
+
* enabling runtime validation when reading from the backend.
|
|
8
|
+
*
|
|
9
|
+
* Convention: each schema is named `<Type>Schema`, the inferred TS type
|
|
10
|
+
* keeps the original name for backward compatibility.
|
|
11
|
+
*/
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
export declare const UserRoleSchema: z.ZodEnum<{
|
|
14
|
+
admin: "admin";
|
|
15
|
+
viewer: "viewer";
|
|
16
|
+
super_admin: "super_admin";
|
|
17
|
+
agent: "agent";
|
|
18
|
+
}>;
|
|
19
|
+
export type UserRole = z.infer<typeof UserRoleSchema>;
|
|
20
|
+
export declare const UserRecordSchema: z.ZodObject<{
|
|
21
|
+
id: z.ZodString;
|
|
22
|
+
username: z.ZodString;
|
|
23
|
+
passwordHash: z.ZodString;
|
|
24
|
+
role: z.ZodEnum<{
|
|
25
|
+
admin: "admin";
|
|
26
|
+
viewer: "viewer";
|
|
27
|
+
super_admin: "super_admin";
|
|
28
|
+
agent: "agent";
|
|
29
|
+
}>;
|
|
30
|
+
allowedProviders: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
31
|
+
allowedDevices: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>>;
|
|
32
|
+
createdAt: z.ZodNumber;
|
|
33
|
+
updatedAt: z.ZodNumber;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type UserRecord = z.infer<typeof UserRecordSchema>;
|
|
36
|
+
export declare const ApiKeyRecordSchema: z.ZodObject<{
|
|
37
|
+
id: z.ZodString;
|
|
38
|
+
label: z.ZodString;
|
|
39
|
+
role: z.ZodEnum<{
|
|
40
|
+
admin: "admin";
|
|
41
|
+
viewer: "viewer";
|
|
42
|
+
super_admin: "super_admin";
|
|
43
|
+
agent: "agent";
|
|
44
|
+
}>;
|
|
45
|
+
allowedProviders: z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>;
|
|
46
|
+
allowedDevices: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodArray<z.ZodString>]>>;
|
|
47
|
+
tokenHash: z.ZodString;
|
|
48
|
+
tokenPrefix: z.ZodString;
|
|
49
|
+
createdAt: z.ZodNumber;
|
|
50
|
+
lastUsedAt: z.ZodOptional<z.ZodNumber>;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
export type ApiKeyRecord = z.infer<typeof ApiKeyRecordSchema>;
|
|
53
|
+
export declare const TokenScopeSchema: z.ZodObject<{
|
|
54
|
+
type: z.ZodEnum<{
|
|
55
|
+
addon: "addon";
|
|
56
|
+
capability: "capability";
|
|
57
|
+
"route-prefix": "route-prefix";
|
|
58
|
+
}>;
|
|
59
|
+
target: z.ZodString;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
export type TokenScope = z.infer<typeof TokenScopeSchema>;
|
|
62
|
+
export declare const ScopedTokenSchema: z.ZodObject<{
|
|
63
|
+
id: z.ZodString;
|
|
64
|
+
userId: z.ZodString;
|
|
65
|
+
name: z.ZodString;
|
|
66
|
+
tokenHash: z.ZodString;
|
|
67
|
+
tokenPrefix: z.ZodString;
|
|
68
|
+
scopes: z.ZodArray<z.ZodObject<{
|
|
69
|
+
type: z.ZodEnum<{
|
|
70
|
+
addon: "addon";
|
|
71
|
+
capability: "capability";
|
|
72
|
+
"route-prefix": "route-prefix";
|
|
73
|
+
}>;
|
|
74
|
+
target: z.ZodString;
|
|
75
|
+
}, z.core.$strip>>;
|
|
76
|
+
expiresAt: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
lastUsedAt: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
createdAt: z.ZodNumber;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
export type ScopedToken = z.infer<typeof ScopedTokenSchema>;
|
|
81
|
+
//# sourceMappingURL=auth-records.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-records.d.ts","sourceRoot":"","sources":["../../src/schemas/auth-records.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,eAAO,MAAM,cAAc;;;;;EAAsD,CAAA;AACjF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAKrD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;iBAS3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;iBAU7B,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAI7D,eAAO,MAAM,gBAAgB;;;;;;;iBAG3B,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAEzD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;iBAU5B,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { IStorageProvider, StorageLocationType, StorageResolveInput, StorageWriteInput, StorageReadInput, StorageExistsInput, StorageListInput, StorageDeleteInput, StorageAvailableSpaceInput } from '../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Filesystem storage provider — serves all location types from a local directory tree.
|
|
4
|
+
*
|
|
5
|
+
* Default layout:
|
|
6
|
+
* {rootPath}/recordings-high/
|
|
7
|
+
* {rootPath}/recordings-low/
|
|
8
|
+
* {rootPath}/recordings-clips/
|
|
9
|
+
* {rootPath}/event-images/
|
|
10
|
+
* {rootPath}/models/
|
|
11
|
+
* {rootPath}/addons-data/
|
|
12
|
+
* {rootPath}/logs/
|
|
13
|
+
* /tmp/camstack-cache/ (cache is always local)
|
|
14
|
+
*
|
|
15
|
+
* Individual location paths can be overridden.
|
|
16
|
+
*/
|
|
17
|
+
export declare class FilesystemStorageProvider implements IStorageProvider {
|
|
18
|
+
readonly id = "local";
|
|
19
|
+
readonly name = "Local Filesystem";
|
|
20
|
+
readonly supportedLocations: readonly StorageLocationType[];
|
|
21
|
+
private readonly rootPath;
|
|
22
|
+
private readonly locationPaths;
|
|
23
|
+
constructor(rootPath: string, overrides?: Partial<Record<StorageLocationType, string>>);
|
|
24
|
+
resolve({ location, relativePath }: StorageResolveInput): string;
|
|
25
|
+
write({ location, relativePath, data }: StorageWriteInput): Promise<void>;
|
|
26
|
+
read({ location, relativePath }: StorageReadInput): Promise<Buffer>;
|
|
27
|
+
exists({ location, relativePath }: StorageExistsInput): Promise<boolean>;
|
|
28
|
+
list({ location, prefix }: StorageListInput): Promise<readonly string[]>;
|
|
29
|
+
delete({ location, relativePath }: StorageDeleteInput): Promise<void>;
|
|
30
|
+
getAvailableSpace({ location }: StorageAvailableSpaceInput): Promise<number | null>;
|
|
31
|
+
/** Get the resolved path for a location type */
|
|
32
|
+
getLocationPath(location: StorageLocationType): string;
|
|
33
|
+
/** Get the root path */
|
|
34
|
+
getRootPath(): string;
|
|
35
|
+
}
|
|
36
|
+
export default FilesystemStorageProvider;
|
|
37
|
+
//# sourceMappingURL=filesystem-storage-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filesystem-storage-provider.d.ts","sourceRoot":"","sources":["../../src/storage/filesystem-storage-provider.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,EAC3B,MAAM,aAAa,CAAA;AAyBpB;;;;;;;;;;;;;;GAcG;AACH,qBAAa,yBAA0B,YAAW,gBAAgB;IAChE,QAAQ,CAAC,EAAE,WAAU;IACrB,QAAQ,CAAC,IAAI,sBAAqB;IAClC,QAAQ,CAAC,kBAAkB,EAAE,SAAS,mBAAmB,EAAE,CAA8B;IAEzF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAQ;IACjC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAkC;gBAEpD,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;IAmBtF,OAAO,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,mBAAmB,GAAG,MAAM;IAM1D,KAAK,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiBzE,IAAI,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IAInE,MAAM,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;IASxE,IAAI,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,gBAAgB,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC;IAYxE,MAAM,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKrE,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE,0BAA0B,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAsBzF,gDAAgD;IAChD,eAAe,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM;IAMtD,wBAAwB;IACxB,WAAW,IAAI,MAAM;CAGtB;AAED,eAAe,yBAAyB,CAAA"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent + camera pipeline settings — the persisted shapes that back the
|
|
3
|
+
* 3-level resolution model:
|
|
4
|
+
*
|
|
5
|
+
* 1. Agent declares which addons it runs by default (every addonId in
|
|
6
|
+
* the catalog gets an entry with enabled/modelId/settings). Seeded
|
|
7
|
+
* automatically from the catalog on first boot, editable after.
|
|
8
|
+
*
|
|
9
|
+
* 2. Camera opts in or out of specific addonIds via a boolean overlay
|
|
10
|
+
* (`stepToggles`). Absent = inherit agent. Present = force.
|
|
11
|
+
*
|
|
12
|
+
* 3. Escape hatch: camera can pin a full pipeline wholesale for a
|
|
13
|
+
* specific agent via `pipelineByAgent[agentNodeId]`. When set, it
|
|
14
|
+
* bypasses addonDefaults + stepToggles entirely.
|
|
15
|
+
*
|
|
16
|
+
* The resolver walks this chain and emits the existing
|
|
17
|
+
* `CameraPipelineConfig` shape that the runner consumes — no changes
|
|
18
|
+
* required downstream of the orchestrator.
|
|
19
|
+
*/
|
|
20
|
+
import type { CameraPipelineConfig } from './camera-pipeline.js';
|
|
21
|
+
/**
|
|
22
|
+
* Per-addon configuration stored under `agent.addonDefaults[addonId]`.
|
|
23
|
+
* Every addon in the catalog gets one entry — whether enabled or not.
|
|
24
|
+
* Operators edit these to pick models, tune settings, flip default
|
|
25
|
+
* enabled state for their hardware.
|
|
26
|
+
*/
|
|
27
|
+
export interface AgentAddonConfig {
|
|
28
|
+
readonly enabled: boolean;
|
|
29
|
+
readonly modelId: string;
|
|
30
|
+
readonly settings: Readonly<Record<string, unknown>>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Partial override of a single addon's config for one (device, agent) pair.
|
|
34
|
+
* Every field is optional — the resolver shallow-merges this patch on top
|
|
35
|
+
* of the agent.addonDefaults base, so operators can override one field
|
|
36
|
+
* (e.g. just the model) without redeclaring the whole config. The merge is
|
|
37
|
+
* per-field on the top-level interface keys only: when `settings` is present
|
|
38
|
+
* on the patch, it fully replaces the base `settings` map (no key-level
|
|
39
|
+
* deep merge inside `settings`).
|
|
40
|
+
*/
|
|
41
|
+
export interface CameraStepOverridePatch {
|
|
42
|
+
readonly enabled?: boolean;
|
|
43
|
+
readonly modelId?: string;
|
|
44
|
+
readonly settings?: Readonly<Record<string, unknown>>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Per-agent pipeline settings. Phase 2f: engine + hwaccel + audio
|
|
48
|
+
* ownership moved to per-addon global settings (detection-pipeline,
|
|
49
|
+
* decoder-nodeav/ffmpeg, audio-analyzer). What's left on the
|
|
50
|
+
* orchestrator is the per-step defaults map (modelId / step settings)
|
|
51
|
+
* consumed by the resolver. The authoritative engine triple is read
|
|
52
|
+
* from the `detection-pipeline` addon's global settings via
|
|
53
|
+
* `readDetectionPipelineEngine()`.
|
|
54
|
+
*/
|
|
55
|
+
export interface AgentPipelineSettings {
|
|
56
|
+
readonly addonDefaults: Readonly<Record<string, AgentAddonConfig>>;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Per-camera pipeline settings. Sparse by design — a camera that has
|
|
60
|
+
* accepted every agent default has an empty record here. `stepToggles`
|
|
61
|
+
* are keyed on `addonId` (flat), not on tree-path, so operators can
|
|
62
|
+
* enable/disable an addon irrespective of where it sits in the
|
|
63
|
+
* resolved tree.
|
|
64
|
+
*/
|
|
65
|
+
export interface CameraPipelineSettings {
|
|
66
|
+
readonly pinnedAgentNodeId?: string;
|
|
67
|
+
readonly stepToggles?: Readonly<Record<string, boolean>>;
|
|
68
|
+
/**
|
|
69
|
+
* L2.5 per-agent per-step override. Shallow-merged on top of the L1
|
|
70
|
+
* agent defaults AFTER the L2 flat stepToggles overlay but BEFORE the
|
|
71
|
+
* L3 wholesale bypass. `pipelineByAgent[agent]` still takes full
|
|
72
|
+
* precedence when present — the L2.5 map for that agent is ignored.
|
|
73
|
+
* When an L2.5 patch has `enabled` set, it supersedes the corresponding
|
|
74
|
+
* L2 `stepToggles` entry for that (agent, addonId) pair; L2 still
|
|
75
|
+
* applies when the L2.5 patch leaves `enabled` undefined.
|
|
76
|
+
*/
|
|
77
|
+
readonly stepOverridesByAgent?: Readonly<Record<string, Readonly<Record<string, CameraStepOverridePatch>>>>;
|
|
78
|
+
/**
|
|
79
|
+
* Per-agent wholesale pipeline override. Engine is NOT stored here —
|
|
80
|
+
* the override runs under the engine selected on that agent via the
|
|
81
|
+
* detection-pipeline addon's global settings. Operator picks steps
|
|
82
|
+
* + audio model/enabled only. This keeps the override portable
|
|
83
|
+
* across agent-moves and prevents a camera from being pinned to an
|
|
84
|
+
* engine the agent doesn't host.
|
|
85
|
+
*/
|
|
86
|
+
readonly pipelineByAgent?: Readonly<Record<string, {
|
|
87
|
+
readonly steps: CameraPipelineConfig['steps'];
|
|
88
|
+
readonly audio: {
|
|
89
|
+
readonly modelId: string;
|
|
90
|
+
readonly enabled: boolean;
|
|
91
|
+
} | null;
|
|
92
|
+
}>>;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=agent-pipeline-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-pipeline-settings.d.ts","sourceRoot":"","sources":["../../src/types/agent-pipeline-settings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAOhE;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CACrD;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CACtD;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAgB,gBAAgB,CAAC,CAAC,CAAA;CACjF;AAED;;;;;;GAMG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IACnC,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAgB,OAAO,CAAC,CAAC,CAAA;IACtE;;;;;;;;OAQG;IACH,QAAQ,CAAC,oBAAoB,CAAC,EAAE,QAAQ,CACtC,MAAM,CAAC,MAAM,EAAoB,QAAQ,CACvC,MAAM,CAAC,MAAM,EAAgB,uBAAuB,CAAC,CACtD,CAAC,CACH,CAAA;IACD;;;;;;;OAOG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,QAAQ,CACjC,MAAM,CAAC,MAAM,EAAoB;QAC/B,QAAQ,CAAC,KAAK,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAA;QAC7C,QAAQ,CAAC,KAAK,EAAE;YAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;SAAE,GAAG,IAAI,CAAA;KAC/E,CAAC,CACH,CAAA;CACF"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-camera pipeline configuration — the canonical shape carried by the
|
|
3
|
+
* orchestrator's `pipelines/<deviceId>` store and pushed to the runner
|
|
4
|
+
* inside every `attachCamera` payload.
|
|
5
|
+
*
|
|
6
|
+
* Model: a camera declares WHAT to execute (ordered tree of steps) and
|
|
7
|
+
* WHERE to execute it (engine runtime+backend+format). The runner holds
|
|
8
|
+
* this in RAM for the lifetime of the attach, swaps it atomically when
|
|
9
|
+
* the orchestrator re-sends (hot reload on edit or rebalance).
|
|
10
|
+
*
|
|
11
|
+
* `PipelineStepInput` already exists in `pipeline-executor.cap.ts` and is
|
|
12
|
+
* the stateless step shape accepted by `runPipeline`. Reusing it here
|
|
13
|
+
* keeps the edit → persist → execute round-trip shape-identical with
|
|
14
|
+
* zero conversion.
|
|
15
|
+
*/
|
|
16
|
+
import type { PipelineStepInputOutput } from '../capabilities/pipeline-executor.cap.js';
|
|
17
|
+
import type { PipelineEngineChoice } from './pipeline.js';
|
|
18
|
+
/**
|
|
19
|
+
* A camera's end-to-end pipeline: which engine to run on, which video
|
|
20
|
+
* steps (ordered tree), and optional audio classification. Null `audio`
|
|
21
|
+
* or `audio.enabled === false` means audio classification is disabled
|
|
22
|
+
* for this camera — metering (dB/RMS) stays orthogonal, it's part of
|
|
23
|
+
* `audio-analyzer` not tied to this config.
|
|
24
|
+
*/
|
|
25
|
+
export interface CameraPipelineConfig {
|
|
26
|
+
readonly engine: PipelineEngineChoice;
|
|
27
|
+
readonly steps: readonly PipelineStepInputOutput[];
|
|
28
|
+
readonly audio?: {
|
|
29
|
+
readonly engine: PipelineEngineChoice;
|
|
30
|
+
readonly modelId: string;
|
|
31
|
+
readonly enabled: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Audio-classifier step settings (`enabledAudioClasses`,
|
|
34
|
+
* `minConfidence`) sourced from the agent's
|
|
35
|
+
* `addonDefaults['audio-classifier'].settings` and overlaid by any
|
|
36
|
+
* per-device patch. The audio-analyzer reads these at runtime to
|
|
37
|
+
* filter macro classes and gate by score.
|
|
38
|
+
*/
|
|
39
|
+
readonly settings?: Readonly<Record<string, unknown>>;
|
|
40
|
+
} | null;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Named preset applied to one or more cameras. The camera stores a
|
|
44
|
+
* copy of the template's config at apply time — no live reference.
|
|
45
|
+
* Templates let operators curate reusable pipelines without re-authoring
|
|
46
|
+
* step trees per-camera.
|
|
47
|
+
*/
|
|
48
|
+
export interface PipelineTemplate {
|
|
49
|
+
readonly id: string;
|
|
50
|
+
readonly name: string;
|
|
51
|
+
readonly description?: string;
|
|
52
|
+
readonly config: CameraPipelineConfig;
|
|
53
|
+
/** ISO 8601 — creation timestamp. */
|
|
54
|
+
readonly createdAt: string;
|
|
55
|
+
/** ISO 8601 — last modification timestamp. */
|
|
56
|
+
readonly updatedAt: string;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=camera-pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"camera-pipeline.d.ts","sourceRoot":"","sources":["../../src/types/camera-pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAA;AACvF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAEzD;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAA;IACrC,QAAQ,CAAC,KAAK,EAAE,SAAS,uBAAuB,EAAE,CAAA;IAClD,QAAQ,CAAC,KAAK,CAAC,EAAE;QACf,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAA;QACrC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;QACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;QACzB;;;;;;WAMG;QACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;KACtD,GAAG,IAAI,CAAA;CACT;AAED;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,QAAQ,CAAC,MAAM,EAAE,oBAAoB,CAAA;IACrC,qCAAqC;IACrC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;IAC1B,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B"}
|