@camstack/core 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/addon-api-factory.d.ts +36 -0
- package/dist/addon/addon-api-factory.d.ts.map +1 -0
- package/dist/addon-routes/addon-route-registry.d.ts +38 -0
- package/dist/addon-routes/addon-route-registry.d.ts.map +1 -0
- package/dist/auth/api-key-manager.d.ts +27 -0
- package/dist/auth/api-key-manager.d.ts.map +1 -0
- package/dist/auth/auth-manager.d.ts +47 -0
- package/dist/auth/auth-manager.d.ts.map +1 -0
- package/dist/auth/parse-record.d.ts +19 -0
- package/dist/auth/parse-record.d.ts.map +1 -0
- package/dist/auth/scoped-token-manager.d.ts +18 -0
- package/dist/auth/scoped-token-manager.d.ts.map +1 -0
- package/dist/auth/user-manager.d.ts +34 -0
- package/dist/auth/user-manager.d.ts.map +1 -0
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.d.ts +54 -0
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.d.ts.map +1 -0
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +226 -0
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js.map +1 -0
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +218 -0
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs.map +1 -0
- package/dist/builtins/addon-pages-aggregator/index.d.ts +2 -0
- package/dist/builtins/addon-pages-aggregator/index.d.ts.map +1 -0
- package/dist/builtins/addon-pages-aggregator/index.js +7 -0
- package/dist/builtins/addon-pages-aggregator/index.mjs +2 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.d.ts +33 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.d.ts.map +1 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +202 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js.map +1 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +194 -0
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs.map +1 -0
- package/dist/builtins/addon-widgets-aggregator/index.d.ts +2 -0
- package/dist/builtins/addon-widgets-aggregator/index.d.ts.map +1 -0
- package/dist/builtins/addon-widgets-aggregator/index.js +7 -0
- package/dist/builtins/addon-widgets-aggregator/index.mjs +2 -0
- package/dist/builtins/alerts/alerts.addon.d.ts +82 -0
- package/dist/builtins/alerts/alerts.addon.d.ts.map +1 -0
- package/dist/builtins/alerts/alerts.addon.js +603 -0
- package/dist/builtins/alerts/alerts.addon.js.map +1 -0
- package/dist/builtins/alerts/alerts.addon.mjs +597 -0
- package/dist/builtins/alerts/alerts.addon.mjs.map +1 -0
- package/dist/builtins/alerts/index.d.ts +2 -0
- package/dist/builtins/alerts/index.d.ts.map +1 -0
- package/dist/builtins/alerts/index.js +3 -0
- package/dist/builtins/alerts/index.mjs +2 -0
- package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.d.ts +8 -0
- package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.d.ts.map +1 -0
- package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.js +56 -0
- package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.js.map +1 -0
- package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.mjs +50 -0
- package/dist/builtins/auth-orchestrator/auth-orchestrator.addon.mjs.map +1 -0
- package/dist/builtins/auth-orchestrator/index.d.ts +2 -0
- package/dist/builtins/auth-orchestrator/index.d.ts.map +1 -0
- package/dist/builtins/auth-orchestrator/index.js +7 -0
- package/dist/builtins/auth-orchestrator/index.mjs +2 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +148 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts.map +1 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +7639 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js.map +1 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +7627 -0
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs.map +1 -0
- package/dist/builtins/backup-orchestrator/cron-helpers.d.ts +24 -0
- package/dist/builtins/backup-orchestrator/cron-helpers.d.ts.map +1 -0
- package/dist/builtins/backup-orchestrator/destination-policy.d.ts +73 -0
- package/dist/builtins/backup-orchestrator/destination-policy.d.ts.map +1 -0
- package/dist/builtins/backup-orchestrator/download-helpers.d.ts +13 -0
- package/dist/builtins/backup-orchestrator/download-helpers.d.ts.map +1 -0
- package/dist/builtins/backup-orchestrator/index.d.ts +3 -0
- package/dist/builtins/backup-orchestrator/index.d.ts.map +1 -0
- package/dist/builtins/backup-orchestrator/index.js +7 -0
- package/dist/builtins/backup-orchestrator/index.mjs +2 -0
- package/dist/builtins/backup-orchestrator/manifest-store.d.ts +78 -0
- package/dist/builtins/backup-orchestrator/manifest-store.d.ts.map +1 -0
- package/dist/builtins/console-logging/console-destination.d.ts +14 -0
- package/dist/builtins/console-logging/console-destination.d.ts.map +1 -0
- package/dist/builtins/console-logging/console-logging.addon.d.ts +26 -0
- package/dist/builtins/console-logging/console-logging.addon.d.ts.map +1 -0
- package/dist/builtins/console-logging/index.d.ts +4 -0
- package/dist/builtins/console-logging/index.d.ts.map +1 -0
- package/dist/builtins/console-logging/index.js +106 -0
- package/dist/builtins/console-logging/index.js.map +1 -0
- package/dist/builtins/console-logging/index.mjs +97 -0
- package/dist/builtins/console-logging/index.mjs.map +1 -0
- package/dist/builtins/device-manager/device-event-propagator.d.ts +27 -0
- package/dist/builtins/device-manager/device-event-propagator.d.ts.map +1 -0
- package/dist/builtins/device-manager/device-manager.addon.d.ts +259 -0
- package/dist/builtins/device-manager/device-manager.addon.d.ts.map +1 -0
- package/dist/builtins/device-manager/device-manager.addon.js +2153 -0
- package/dist/builtins/device-manager/device-manager.addon.js.map +1 -0
- package/dist/builtins/device-manager/device-manager.addon.mjs +2147 -0
- package/dist/builtins/device-manager/device-manager.addon.mjs.map +1 -0
- package/dist/builtins/device-manager/index.d.ts +3 -0
- package/dist/builtins/device-manager/index.d.ts.map +1 -0
- package/dist/builtins/device-manager/index.js +7 -0
- package/dist/builtins/device-manager/index.mjs +2 -0
- package/dist/builtins/hub-forwarder/hub-forwarder-destination.d.ts +45 -0
- package/dist/builtins/hub-forwarder/hub-forwarder-destination.d.ts.map +1 -0
- package/dist/builtins/hub-forwarder/hub-forwarder.addon.d.ts +16 -0
- package/dist/builtins/hub-forwarder/hub-forwarder.addon.d.ts.map +1 -0
- package/dist/builtins/hub-forwarder/index.d.ts +4 -0
- package/dist/builtins/hub-forwarder/index.d.ts.map +1 -0
- package/dist/builtins/hub-forwarder/index.js +156 -0
- package/dist/builtins/hub-forwarder/index.js.map +1 -0
- package/dist/builtins/hub-forwarder/index.mjs +147 -0
- package/dist/builtins/hub-forwarder/index.mjs.map +1 -0
- package/dist/builtins/local-auth/auth-schema.d.ts +12 -0
- package/dist/builtins/local-auth/auth-schema.d.ts.map +1 -0
- package/dist/builtins/local-auth/index.d.ts +2 -0
- package/dist/builtins/local-auth/index.d.ts.map +1 -0
- package/dist/builtins/local-auth/index.js +3 -0
- package/dist/builtins/local-auth/index.mjs +2 -0
- package/dist/builtins/local-auth/local-auth.addon.d.ts +17 -0
- package/dist/builtins/local-auth/local-auth.addon.d.ts.map +1 -0
- package/dist/builtins/local-auth/local-auth.addon.js +6895 -0
- package/dist/builtins/local-auth/local-auth.addon.js.map +1 -0
- package/dist/builtins/local-auth/local-auth.addon.mjs +6885 -0
- package/dist/builtins/local-auth/local-auth.addon.mjs.map +1 -0
- package/dist/builtins/local-network/index.d.ts +3 -0
- package/dist/builtins/local-network/index.d.ts.map +1 -0
- package/dist/builtins/local-network/index.js +9 -0
- package/dist/builtins/local-network/index.mjs +2 -0
- package/dist/builtins/local-network/local-network.addon.d.ts +102 -0
- package/dist/builtins/local-network/local-network.addon.d.ts.map +1 -0
- package/dist/builtins/local-network/local-network.addon.js +404 -0
- package/dist/builtins/local-network/local-network.addon.js.map +1 -0
- package/dist/builtins/local-network/local-network.addon.mjs +392 -0
- package/dist/builtins/local-network/local-network.addon.mjs.map +1 -0
- package/dist/builtins/mesh-orchestrator/index.d.ts +2 -0
- package/dist/builtins/mesh-orchestrator/index.d.ts.map +1 -0
- package/dist/builtins/mesh-orchestrator/index.js +7 -0
- package/dist/builtins/mesh-orchestrator/index.mjs +2 -0
- package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.d.ts +9 -0
- package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.d.ts.map +1 -0
- package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.js +83 -0
- package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.js.map +1 -0
- package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.mjs +77 -0
- package/dist/builtins/mesh-orchestrator/mesh-orchestrator.addon.mjs.map +1 -0
- package/dist/builtins/native-metrics/index.d.ts +3 -0
- package/dist/builtins/native-metrics/index.d.ts.map +1 -0
- package/dist/builtins/native-metrics/native-metrics-provider.d.ts +49 -0
- package/dist/builtins/native-metrics/native-metrics-provider.d.ts.map +1 -0
- package/dist/builtins/native-metrics/native-metrics.addon.d.ts +74 -0
- package/dist/builtins/native-metrics/native-metrics.addon.d.ts.map +1 -0
- package/dist/builtins/native-metrics/native-metrics.addon.js +924 -0
- package/dist/builtins/native-metrics/native-metrics.addon.js.map +1 -0
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +916 -0
- package/dist/builtins/native-metrics/native-metrics.addon.mjs.map +1 -0
- package/dist/builtins/platform-probe/index.d.ts +12 -0
- package/dist/builtins/platform-probe/index.d.ts.map +1 -0
- package/dist/builtins/platform-probe/index.js +539 -0
- package/dist/builtins/platform-probe/index.js.map +1 -0
- package/dist/builtins/platform-probe/index.mjs +530 -0
- package/dist/builtins/platform-probe/index.mjs.map +1 -0
- package/dist/builtins/platform-probe/inference-config-resolver.d.ts +30 -0
- package/dist/builtins/platform-probe/inference-config-resolver.d.ts.map +1 -0
- package/dist/builtins/platform-probe/platform-scorer.d.ts +22 -0
- package/dist/builtins/platform-probe/platform-scorer.d.ts.map +1 -0
- package/dist/builtins/remote-access-orchestrator/index.d.ts +2 -0
- package/dist/builtins/remote-access-orchestrator/index.d.ts.map +1 -0
- package/dist/builtins/remote-access-orchestrator/index.js +7 -0
- package/dist/builtins/remote-access-orchestrator/index.mjs +2 -0
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.d.ts +9 -0
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.d.ts.map +1 -0
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +72 -0
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js.map +1 -0
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +66 -0
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs.map +1 -0
- package/dist/builtins/snapshot/index.d.ts +3 -0
- package/dist/builtins/snapshot/index.d.ts.map +1 -0
- package/dist/builtins/snapshot/index.js +494 -0
- package/dist/builtins/snapshot/index.js.map +1 -0
- package/dist/builtins/snapshot/index.mjs +488 -0
- package/dist/builtins/snapshot/index.mjs.map +1 -0
- package/dist/builtins/snapshot/snapshot.addon.d.ts +121 -0
- package/dist/builtins/snapshot/snapshot.addon.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/config-store.d.ts +9 -0
- package/dist/builtins/sqlite-storage/config-store.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/device-store.d.ts +24 -0
- package/dist/builtins/sqlite-storage/device-store.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/filesystem-storage-provider.d.ts +87 -0
- package/dist/builtins/sqlite-storage/filesystem-storage-provider.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.ts +32 -2
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +311 -205
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js.map +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +305 -7
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs.map +1 -1
- package/dist/builtins/sqlite-storage/index.d.ts +12 -4
- package/dist/builtins/sqlite-storage/index.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/index.js +258 -1097
- package/dist/builtins/sqlite-storage/index.js.map +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +268 -28
- package/dist/builtins/sqlite-storage/index.mjs.map +1 -1
- package/dist/builtins/sqlite-storage/integration-registry.d.ts +28 -0
- package/dist/builtins/sqlite-storage/integration-registry.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/settings-store.d.ts +40 -0
- package/dist/builtins/sqlite-storage/settings-store.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/sql-schema.d.ts +33 -0
- package/dist/builtins/sqlite-storage/sql-schema.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +94 -0
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +15 -2
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts.map +1 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +588 -417
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js.map +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +582 -7
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs.map +1 -1
- package/dist/builtins/storage-orchestrator/index.d.ts +7 -0
- package/dist/builtins/storage-orchestrator/index.d.ts.map +1 -0
- package/dist/builtins/storage-orchestrator/index.js +9 -0
- package/dist/builtins/storage-orchestrator/index.mjs +2 -0
- package/dist/builtins/storage-orchestrator/location-store.d.ts +50 -0
- package/dist/builtins/storage-orchestrator/location-store.d.ts.map +1 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +60 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts.map +1 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +755 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js.map +1 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +746 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs.map +1 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +121 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts.map +1 -0
- package/dist/builtins/system-backup/system-backup.service.d.ts +138 -0
- package/dist/builtins/system-backup/system-backup.service.d.ts.map +1 -0
- package/dist/builtins/system-config/index.d.ts +2 -0
- package/dist/builtins/system-config/index.d.ts.map +1 -0
- package/dist/builtins/system-config/index.js +7 -0
- package/dist/builtins/system-config/index.mjs +2 -0
- package/dist/builtins/system-config/system-config.addon.d.ts +11 -0
- package/dist/builtins/system-config/system-config.addon.d.ts.map +1 -0
- package/dist/builtins/system-config/system-config.addon.js +234 -0
- package/dist/builtins/system-config/system-config.addon.js.map +1 -0
- package/dist/builtins/system-config/system-config.addon.mjs +228 -0
- package/dist/builtins/system-config/system-config.addon.mjs.map +1 -0
- package/dist/builtins/turn-orchestrator/index.d.ts +2 -0
- package/dist/builtins/turn-orchestrator/index.d.ts.map +1 -0
- package/dist/builtins/turn-orchestrator/index.js +7 -0
- package/dist/builtins/turn-orchestrator/index.mjs +2 -0
- package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.d.ts +10 -0
- package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.d.ts.map +1 -0
- package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.js +78 -0
- package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.js.map +1 -0
- package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.mjs +72 -0
- package/dist/builtins/turn-orchestrator/turn-orchestrator.addon.mjs.map +1 -0
- package/dist/builtins/winston-logging/index.d.ts +4 -30
- package/dist/builtins/winston-logging/index.d.ts.map +1 -0
- package/dist/builtins/winston-logging/index.js +153 -180
- package/dist/builtins/winston-logging/index.js.map +1 -1
- package/dist/builtins/winston-logging/index.mjs +144 -8
- package/dist/builtins/winston-logging/index.mjs.map +1 -1
- package/dist/builtins/winston-logging/winston-destination.d.ts +22 -0
- package/dist/builtins/winston-logging/winston-destination.d.ts.map +1 -0
- package/dist/builtins/winston-logging/winston-logging.addon.d.ts +20 -0
- package/dist/builtins/winston-logging/winston-logging.addon.d.ts.map +1 -0
- package/dist/chunk-C13QxCFV.js +50 -0
- package/dist/chunk-hT5z_Zn9.mjs +35 -0
- package/dist/download/model-download-service.d.ts +42 -0
- package/dist/download/model-download-service.d.ts.map +1 -0
- package/dist/download/model-downloader.d.ts +32 -0
- package/dist/download/model-downloader.d.ts.map +1 -0
- package/dist/events/event-bus.d.ts +11 -0
- package/dist/events/event-bus.d.ts.map +1 -0
- package/dist/events/system-event-bus.d.ts +15 -0
- package/dist/events/system-event-bus.d.ts.map +1 -0
- package/dist/feature/feature-manager.d.ts +12 -0
- package/dist/feature/feature-manager.d.ts.map +1 -0
- package/dist/formatter-C-5An4Bl.mjs +164 -0
- package/dist/formatter-C-5An4Bl.mjs.map +1 -0
- package/dist/formatter-Dr_6NNZc.js +169 -0
- package/dist/formatter-Dr_6NNZc.js.map +1 -0
- package/dist/index.d.ts +76 -1137
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7761 -7017
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7699 -3798
- package/dist/index.mjs.map +1 -1
- package/dist/lifecycle/lifecycle-state-machine.d.ts +29 -0
- package/dist/lifecycle/lifecycle-state-machine.d.ts.map +1 -0
- package/dist/logging/formatter.d.ts +31 -0
- package/dist/logging/formatter.d.ts.map +1 -0
- package/dist/logging/log-manager.d.ts +52 -0
- package/dist/logging/log-manager.d.ts.map +1 -0
- package/dist/logging/log-ring-buffer.d.ts +48 -0
- package/dist/logging/log-ring-buffer.d.ts.map +1 -0
- package/dist/logging/scoped-logger.d.ts +18 -0
- package/dist/logging/scoped-logger.d.ts.map +1 -0
- package/dist/network/network-quality.d.ts +12 -0
- package/dist/network/network-quality.d.ts.map +1 -0
- package/dist/notification/notification-service.d.ts +38 -0
- package/dist/notification/notification-service.d.ts.map +1 -0
- package/dist/notification/toast-service.d.ts +23 -0
- package/dist/notification/toast-service.d.ts.map +1 -0
- package/dist/pipeline/engine-manager-resolver.d.ts +16 -0
- package/dist/pipeline/engine-manager-resolver.d.ts.map +1 -0
- package/dist/pipeline/pipeline-runner.d.ts +9 -0
- package/dist/pipeline/pipeline-runner.d.ts.map +1 -0
- package/dist/pipeline/pipeline-validator.d.ts +14 -0
- package/dist/pipeline/pipeline-validator.d.ts.map +1 -0
- package/dist/process/resource-monitor.d.ts +12 -0
- package/dist/process/resource-monitor.d.ts.map +1 -0
- package/dist/python/python-env-manager.d.ts +13 -0
- package/dist/python/python-env-manager.d.ts.map +1 -0
- package/dist/repl/interfaces.d.ts +32 -0
- package/dist/repl/interfaces.d.ts.map +1 -0
- package/dist/repl/repl-engine.d.ts +9 -0
- package/dist/repl/repl-engine.d.ts.map +1 -0
- package/dist/resource-monitor-CmuWlmap.js +76 -0
- package/dist/resource-monitor-CmuWlmap.js.map +1 -0
- package/dist/resource-monitor-DcQdKGYU.mjs +59 -0
- package/dist/resource-monitor-DcQdKGYU.mjs.map +1 -0
- package/dist/storage/fs-storage-backend.d.ts +41 -0
- package/dist/storage/fs-storage-backend.d.ts.map +1 -0
- package/dist/storage/storage-location-manager.d.ts +24 -0
- package/dist/storage/storage-location-manager.d.ts.map +1 -0
- package/dist/storage/storage-manager.d.ts +77 -0
- package/dist/storage/storage-manager.d.ts.map +1 -0
- package/dist/tls/cert-manager.d.ts +27 -0
- package/dist/tls/cert-manager.d.ts.map +1 -0
- package/dist/tls/index.d.ts +2 -0
- package/dist/tls/index.d.ts.map +1 -0
- package/package.json +230 -13
- package/dist/builtins/local-backup/index.d.mts +0 -42
- package/dist/builtins/local-backup/index.d.ts +0 -42
- package/dist/builtins/local-backup/index.js +0 -188
- package/dist/builtins/local-backup/index.js.map +0 -1
- package/dist/builtins/local-backup/index.mjs +0 -10
- package/dist/builtins/local-backup/index.mjs.map +0 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.mts +0 -2
- package/dist/builtins/sqlite-storage/index.d.mts +0 -4
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.mts +0 -2
- package/dist/builtins/winston-logging/index.d.mts +0 -30
- package/dist/chunk-2F3XZYRW.mjs +0 -89
- package/dist/chunk-2F3XZYRW.mjs.map +0 -1
- package/dist/chunk-LQFPAEQF.mjs +0 -147
- package/dist/chunk-LQFPAEQF.mjs.map +0 -1
- package/dist/chunk-R3DIIBBX.mjs +0 -532
- package/dist/chunk-R3DIIBBX.mjs.map +0 -1
- package/dist/chunk-SMNR44VG.mjs +0 -386
- package/dist/chunk-SMNR44VG.mjs.map +0 -1
- package/dist/chunk-SO4LROOT.mjs +0 -150
- package/dist/chunk-SO4LROOT.mjs.map +0 -1
- package/dist/chunk-SPA4JBKN.mjs +0 -175
- package/dist/chunk-SPA4JBKN.mjs.map +0 -1
- package/dist/dist-3BY63UQ5.mjs +0 -2151
- package/dist/dist-3BY63UQ5.mjs.map +0 -1
- package/dist/filesystem-storage.addon-C42r589X.d.mts +0 -57
- package/dist/filesystem-storage.addon-C42r589X.d.ts +0 -57
- package/dist/index.d.mts +0 -1137
- package/dist/sql-schema-CKz78rId.d.mts +0 -97
- package/dist/sql-schema-CKz78rId.d.ts +0 -97
- package/dist/sqlite-settings.addon-KwG-uKMP.d.mts +0 -79
- package/dist/sqlite-settings.addon-KwG-uKMP.d.ts +0 -79
- package/dist/storage-location-manager-KKDQNAKA.mjs +0 -7
- package/dist/storage-location-manager-KKDQNAKA.mjs.map +0 -1
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
require("../../chunk-C13QxCFV.js");
|
|
6
|
+
let _camstack_types = require("@camstack/types");
|
|
7
|
+
//#region src/builtins/system-config/system-config.addon.ts
|
|
8
|
+
/**
|
|
9
|
+
* Built-in `system-config` addon — Phase 4 of the settings redesign.
|
|
10
|
+
*
|
|
11
|
+
* Exposes the cluster-wide yml-backed sections that the bootstrap
|
|
12
|
+
* loader reads before any addon is instantiated — things that cannot
|
|
13
|
+
* live inside an addon because changing them requires a server
|
|
14
|
+
* restart (port, host, dataPath) or because they own no runtime
|
|
15
|
+
* state of their own (auth token expiry, global ffmpeg binary path).
|
|
16
|
+
*
|
|
17
|
+
* Sections exposed:
|
|
18
|
+
* - server (port, host, dataPath — READ-ONLY, loaded from config.yaml at bootstrap)
|
|
19
|
+
* - auth (tokenExpiry)
|
|
20
|
+
* - ffmpeg (binaryPath, hwAccel, threadCount)
|
|
21
|
+
*
|
|
22
|
+
* Sections NOT exposed (each owned by the addon that implements them):
|
|
23
|
+
* - logging → `winston-logging` addon (level + retention)
|
|
24
|
+
* - recording → `recording` addon (segment duration, retention)
|
|
25
|
+
* - retention → analytics / detection addons (per-table retention)
|
|
26
|
+
*
|
|
27
|
+
* Implementation notes:
|
|
28
|
+
* - Runs only on the hub process (yml sections are hub-side state).
|
|
29
|
+
* On agent nodes this addon would still instantiate, but every
|
|
30
|
+
* `ctx.settings.getSection(section)` call would hit an empty
|
|
31
|
+
* ConfigManager section so the UI would show the schema defaults.
|
|
32
|
+
* In practice the built-in loader can skip it on agents; for now we
|
|
33
|
+
* just let it run everywhere because it's harmless.
|
|
34
|
+
* - Reads via `ctx.settings.getSection(section)` and writes via
|
|
35
|
+
* `ctx.settings.setSection(section, patch)` — the explicit
|
|
36
|
+
* yml-section pair on `AddonSettingsApi`.
|
|
37
|
+
* - Does NOT register as a capability provider. It's a pure "settings
|
|
38
|
+
* surface" addon — its sole purpose is to expose the yml sections
|
|
39
|
+
* through the new three-level settings API.
|
|
40
|
+
*
|
|
41
|
+
* This addon is declared in `@camstack/core`'s package.json `camstack.addons[]`
|
|
42
|
+
* and loaded automatically via AddonLoader like any other core built-in.
|
|
43
|
+
*/
|
|
44
|
+
/** Section key → user-facing section title. */
|
|
45
|
+
var SECTION_TITLES = {
|
|
46
|
+
server: "Server",
|
|
47
|
+
auth: "Authentication",
|
|
48
|
+
ffmpeg: "FFmpeg"
|
|
49
|
+
};
|
|
50
|
+
/** Keys that map 1:1 to a given yml section — used by `updateGlobalSettings`
|
|
51
|
+
* to figure out which section owns each key in the incoming patch. */
|
|
52
|
+
var KEY_TO_SECTION = {
|
|
53
|
+
port: "server",
|
|
54
|
+
host: "server",
|
|
55
|
+
dataPath: "server",
|
|
56
|
+
tokenExpiry: "auth",
|
|
57
|
+
binaryPath: "ffmpeg",
|
|
58
|
+
hwAccel: "ffmpeg",
|
|
59
|
+
threadCount: "ffmpeg"
|
|
60
|
+
};
|
|
61
|
+
var SystemConfigAddon = class extends _camstack_types.BaseAddon {
|
|
62
|
+
id = "system-config";
|
|
63
|
+
constructor() {
|
|
64
|
+
super({});
|
|
65
|
+
}
|
|
66
|
+
async onInitialize() {
|
|
67
|
+
this.ctx.logger.info("Initialized — exposes yml-backed sections via getGlobalSettings");
|
|
68
|
+
}
|
|
69
|
+
buildGlobalSchema() {
|
|
70
|
+
return { sections: [
|
|
71
|
+
{
|
|
72
|
+
id: "system-config-server",
|
|
73
|
+
title: SECTION_TITLES["server"],
|
|
74
|
+
description: "Core server connection settings — read-only, loaded from config.yaml at bootstrap.",
|
|
75
|
+
columns: 2,
|
|
76
|
+
fields: [
|
|
77
|
+
{
|
|
78
|
+
type: "info",
|
|
79
|
+
key: "server-restart-note",
|
|
80
|
+
label: "Restart required",
|
|
81
|
+
content: "Server settings are read-only. Change them in config.yaml and restart.",
|
|
82
|
+
variant: "warning"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
type: "text",
|
|
86
|
+
key: "port",
|
|
87
|
+
label: "Port",
|
|
88
|
+
description: "Listening port",
|
|
89
|
+
disabled: true
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: "text",
|
|
93
|
+
key: "host",
|
|
94
|
+
label: "Host",
|
|
95
|
+
description: "Bind address",
|
|
96
|
+
disabled: true
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
type: "text",
|
|
100
|
+
key: "dataPath",
|
|
101
|
+
label: "Data Path",
|
|
102
|
+
description: "Root data directory",
|
|
103
|
+
disabled: true,
|
|
104
|
+
span: 2
|
|
105
|
+
}
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
id: "system-config-auth",
|
|
110
|
+
title: SECTION_TITLES["auth"],
|
|
111
|
+
description: "Token and session settings.",
|
|
112
|
+
columns: 1,
|
|
113
|
+
fields: [{
|
|
114
|
+
type: "text",
|
|
115
|
+
key: "tokenExpiry",
|
|
116
|
+
label: "Token Expiry",
|
|
117
|
+
description: "JWT token lifetime (e.g. 24h, 7d, 1h)",
|
|
118
|
+
placeholder: "24h",
|
|
119
|
+
default: "24h"
|
|
120
|
+
}]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: "system-config-ffmpeg",
|
|
124
|
+
title: SECTION_TITLES["ffmpeg"],
|
|
125
|
+
description: "FFmpeg binary and hardware acceleration settings.",
|
|
126
|
+
columns: 2,
|
|
127
|
+
fields: [
|
|
128
|
+
{
|
|
129
|
+
type: "text",
|
|
130
|
+
key: "binaryPath",
|
|
131
|
+
label: "Binary Path",
|
|
132
|
+
description: "Path to ffmpeg executable",
|
|
133
|
+
placeholder: "ffmpeg",
|
|
134
|
+
default: "ffmpeg",
|
|
135
|
+
span: 2
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
type: "select",
|
|
139
|
+
key: "hwAccel",
|
|
140
|
+
label: "Hardware Acceleration",
|
|
141
|
+
description: "GPU decoding/encoding backend",
|
|
142
|
+
default: "auto",
|
|
143
|
+
options: [
|
|
144
|
+
{
|
|
145
|
+
value: "auto",
|
|
146
|
+
label: "Auto-detect"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
value: "none",
|
|
150
|
+
label: "None (CPU only)"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
value: "videotoolbox",
|
|
154
|
+
label: "VideoToolbox (macOS)"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
value: "vaapi",
|
|
158
|
+
label: "VA-API (Linux Intel/AMD)"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
value: "qsv",
|
|
162
|
+
label: "QSV (Intel Quick Sync)"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
value: "cuda",
|
|
166
|
+
label: "CUDA (NVIDIA)"
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
type: "number",
|
|
172
|
+
key: "threadCount",
|
|
173
|
+
label: "Thread Count",
|
|
174
|
+
description: "0 = auto (let FFmpeg decide)",
|
|
175
|
+
min: 0,
|
|
176
|
+
max: 16,
|
|
177
|
+
step: 1,
|
|
178
|
+
default: 0
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
] };
|
|
183
|
+
}
|
|
184
|
+
async getGlobalSettings() {
|
|
185
|
+
const schema = this.buildGlobalSchema();
|
|
186
|
+
if (!this.ctx.settings) return (0, _camstack_types.hydrateSchema)(schema, {});
|
|
187
|
+
const sectionNames = Object.keys(SECTION_TITLES);
|
|
188
|
+
const merged = {};
|
|
189
|
+
for (const section of sectionNames) try {
|
|
190
|
+
const values = await this.ctx.settings.getSection(section);
|
|
191
|
+
Object.assign(merged, values);
|
|
192
|
+
} catch (err) {
|
|
193
|
+
const msg = (0, _camstack_types.errMsg)(err);
|
|
194
|
+
this.ctx.logger.debug("Failed to read section", { meta: {
|
|
195
|
+
section,
|
|
196
|
+
error: msg
|
|
197
|
+
} });
|
|
198
|
+
}
|
|
199
|
+
return (0, _camstack_types.hydrateSchema)(schema, merged);
|
|
200
|
+
}
|
|
201
|
+
async updateGlobalSettings(patch) {
|
|
202
|
+
if (!this.ctx.settings) throw new Error("system-config: ctx.settings not available — cannot write sections");
|
|
203
|
+
const perSection = /* @__PURE__ */ new Map();
|
|
204
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
205
|
+
const section = KEY_TO_SECTION[key];
|
|
206
|
+
if (section === void 0) {
|
|
207
|
+
this.ctx.logger.warn("update ignored unknown key (not mapped to any section)", { meta: { key } });
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
if (section === "server") {
|
|
211
|
+
this.ctx.logger.warn("update ignored read-only server-section key", { meta: { key } });
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
let bucket = perSection.get(section);
|
|
215
|
+
if (!bucket) {
|
|
216
|
+
bucket = {};
|
|
217
|
+
perSection.set(section, bucket);
|
|
218
|
+
}
|
|
219
|
+
bucket[key] = value;
|
|
220
|
+
}
|
|
221
|
+
for (const [section, sectionPatch] of perSection) {
|
|
222
|
+
await this.ctx.settings.setSection(section, sectionPatch);
|
|
223
|
+
this.ctx.logger.info("Wrote keys to section", { meta: {
|
|
224
|
+
section,
|
|
225
|
+
keyCount: Object.keys(sectionPatch).length
|
|
226
|
+
} });
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
//#endregion
|
|
231
|
+
exports.SystemConfigAddon = SystemConfigAddon;
|
|
232
|
+
exports.default = SystemConfigAddon;
|
|
233
|
+
|
|
234
|
+
//# sourceMappingURL=system-config.addon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-config.addon.js","names":[],"sources":["../../../src/builtins/system-config/system-config.addon.ts"],"sourcesContent":["import type {\n ConfigUISchema,\n ConfigUISchemaWithValues,\n} from '@camstack/types'\nimport { BaseAddon, hydrateSchema , errMsg } from '@camstack/types'\n\n/**\n * Built-in `system-config` addon — Phase 4 of the settings redesign.\n *\n * Exposes the cluster-wide yml-backed sections that the bootstrap\n * loader reads before any addon is instantiated — things that cannot\n * live inside an addon because changing them requires a server\n * restart (port, host, dataPath) or because they own no runtime\n * state of their own (auth token expiry, global ffmpeg binary path).\n *\n * Sections exposed:\n * - server (port, host, dataPath — READ-ONLY, loaded from config.yaml at bootstrap)\n * - auth (tokenExpiry)\n * - ffmpeg (binaryPath, hwAccel, threadCount)\n *\n * Sections NOT exposed (each owned by the addon that implements them):\n * - logging → `winston-logging` addon (level + retention)\n * - recording → `recording` addon (segment duration, retention)\n * - retention → analytics / detection addons (per-table retention)\n *\n * Implementation notes:\n * - Runs only on the hub process (yml sections are hub-side state).\n * On agent nodes this addon would still instantiate, but every\n * `ctx.settings.getSection(section)` call would hit an empty\n * ConfigManager section so the UI would show the schema defaults.\n * In practice the built-in loader can skip it on agents; for now we\n * just let it run everywhere because it's harmless.\n * - Reads via `ctx.settings.getSection(section)` and writes via\n * `ctx.settings.setSection(section, patch)` — the explicit\n * yml-section pair on `AddonSettingsApi`.\n * - Does NOT register as a capability provider. It's a pure \"settings\n * surface\" addon — its sole purpose is to expose the yml sections\n * through the new three-level settings API.\n *\n * This addon is declared in `@camstack/core`'s package.json `camstack.addons[]`\n * and loaded automatically via AddonLoader like any other core built-in.\n */\n\n/** Section key → user-facing section title. */\nconst SECTION_TITLES: Readonly<Record<string, string>> = {\n server: 'Server',\n auth: 'Authentication',\n ffmpeg: 'FFmpeg',\n}\n\n/** Keys that map 1:1 to a given yml section — used by `updateGlobalSettings`\n * to figure out which section owns each key in the incoming patch. */\nconst KEY_TO_SECTION: Readonly<Record<string, string>> = {\n // server (read-only)\n port: 'server',\n host: 'server',\n dataPath: 'server',\n // auth\n tokenExpiry: 'auth',\n // ffmpeg\n binaryPath: 'ffmpeg',\n hwAccel: 'ffmpeg',\n threadCount: 'ffmpeg',\n}\n\nexport class SystemConfigAddon extends BaseAddon {\n readonly id = 'system-config'\n\n constructor() { super({}) }\n\n protected async onInitialize(): Promise<void> {\n this.ctx.logger.info('Initialized — exposes yml-backed sections via getGlobalSettings')\n }\n\n // ── Three-level settings API (only `getGlobalSettings` is implemented) ──\n\n private buildGlobalSchema(): ConfigUISchema {\n return {\n sections: [\n {\n id: 'system-config-server',\n title: SECTION_TITLES['server']!,\n description: 'Core server connection settings — read-only, loaded from config.yaml at bootstrap.',\n columns: 2,\n fields: [\n {\n type: 'info',\n key: 'server-restart-note',\n label: 'Restart required',\n content: 'Server settings are read-only. Change them in config.yaml and restart.',\n variant: 'warning',\n },\n { type: 'text', key: 'port', label: 'Port', description: 'Listening port', disabled: true },\n { type: 'text', key: 'host', label: 'Host', description: 'Bind address', disabled: true },\n { type: 'text', key: 'dataPath', label: 'Data Path', description: 'Root data directory', disabled: true, span: 2 },\n ],\n },\n {\n id: 'system-config-auth',\n title: SECTION_TITLES['auth']!,\n description: 'Token and session settings.',\n columns: 1,\n fields: [\n {\n type: 'text',\n key: 'tokenExpiry',\n label: 'Token Expiry',\n description: 'JWT token lifetime (e.g. 24h, 7d, 1h)',\n placeholder: '24h',\n default: '24h',\n },\n ],\n },\n {\n id: 'system-config-ffmpeg',\n title: SECTION_TITLES['ffmpeg']!,\n description: 'FFmpeg binary and hardware acceleration settings.',\n columns: 2,\n fields: [\n {\n type: 'text',\n key: 'binaryPath',\n label: 'Binary Path',\n description: 'Path to ffmpeg executable',\n placeholder: 'ffmpeg',\n default: 'ffmpeg',\n span: 2,\n },\n {\n type: 'select',\n key: 'hwAccel',\n label: 'Hardware Acceleration',\n description: 'GPU decoding/encoding backend',\n default: 'auto',\n options: [\n { value: 'auto', label: 'Auto-detect' },\n { value: 'none', label: 'None (CPU only)' },\n { value: 'videotoolbox', label: 'VideoToolbox (macOS)' },\n { value: 'vaapi', label: 'VA-API (Linux Intel/AMD)' },\n { value: 'qsv', label: 'QSV (Intel Quick Sync)' },\n { value: 'cuda', label: 'CUDA (NVIDIA)' },\n ],\n },\n {\n type: 'number',\n key: 'threadCount',\n label: 'Thread Count',\n description: '0 = auto (let FFmpeg decide)',\n min: 0,\n max: 16,\n step: 1,\n default: 0,\n },\n ],\n },\n ],\n }\n }\n\n async getGlobalSettings(): Promise<ConfigUISchemaWithValues> {\n const schema = this.buildGlobalSchema()\n if (!this.ctx.settings) {\n return hydrateSchema(schema, {})\n }\n\n // Read all yml sections in parallel and merge their values into a\n // single flat record keyed by field name. The `KEY_TO_SECTION` map\n // guarantees uniqueness (each key belongs to exactly one section).\n const sectionNames = Object.keys(SECTION_TITLES)\n const merged: Record<string, unknown> = {}\n for (const section of sectionNames) {\n try {\n const values = await this.ctx.settings!.getSection(section)\n Object.assign(merged, values)\n } catch (err: unknown) {\n const msg = errMsg(err)\n this.ctx.logger.debug('Failed to read section', { meta: { section, error: msg } })\n }\n }\n\n return hydrateSchema(schema, merged)\n }\n\n async updateGlobalSettings(patch: Record<string, unknown>): Promise<void> {\n if (!this.ctx.settings) {\n throw new Error('system-config: ctx.settings not available — cannot write sections')\n }\n\n // Group the patch keys by the section they belong to, then write\n // each section in one shot via ctx.settings.setSection(). The\n // server section is read-only, so any keys targeting it are skipped\n // with a warning.\n const perSection = new Map<string, Record<string, unknown>>()\n for (const [key, value] of Object.entries(patch)) {\n const section = KEY_TO_SECTION[key]\n if (section === undefined) {\n this.ctx.logger.warn('update ignored unknown key (not mapped to any section)', { meta: { key } })\n continue\n }\n if (section === 'server') {\n this.ctx.logger.warn('update ignored read-only server-section key', { meta: { key } })\n continue\n }\n let bucket = perSection.get(section)\n if (!bucket) {\n bucket = {}\n perSection.set(section, bucket)\n }\n bucket[key] = value\n }\n\n for (const [section, sectionPatch] of perSection) {\n await this.ctx.settings!.setSection(section, sectionPatch)\n this.ctx.logger.info('Wrote keys to section', { meta: { section, keyCount: Object.keys(sectionPatch).length } })\n }\n }\n}\n\nexport default SystemConfigAddon\n"],"mappings":"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"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { BaseAddon, errMsg, hydrateSchema } from "@camstack/types";
|
|
2
|
+
//#region src/builtins/system-config/system-config.addon.ts
|
|
3
|
+
/**
|
|
4
|
+
* Built-in `system-config` addon — Phase 4 of the settings redesign.
|
|
5
|
+
*
|
|
6
|
+
* Exposes the cluster-wide yml-backed sections that the bootstrap
|
|
7
|
+
* loader reads before any addon is instantiated — things that cannot
|
|
8
|
+
* live inside an addon because changing them requires a server
|
|
9
|
+
* restart (port, host, dataPath) or because they own no runtime
|
|
10
|
+
* state of their own (auth token expiry, global ffmpeg binary path).
|
|
11
|
+
*
|
|
12
|
+
* Sections exposed:
|
|
13
|
+
* - server (port, host, dataPath — READ-ONLY, loaded from config.yaml at bootstrap)
|
|
14
|
+
* - auth (tokenExpiry)
|
|
15
|
+
* - ffmpeg (binaryPath, hwAccel, threadCount)
|
|
16
|
+
*
|
|
17
|
+
* Sections NOT exposed (each owned by the addon that implements them):
|
|
18
|
+
* - logging → `winston-logging` addon (level + retention)
|
|
19
|
+
* - recording → `recording` addon (segment duration, retention)
|
|
20
|
+
* - retention → analytics / detection addons (per-table retention)
|
|
21
|
+
*
|
|
22
|
+
* Implementation notes:
|
|
23
|
+
* - Runs only on the hub process (yml sections are hub-side state).
|
|
24
|
+
* On agent nodes this addon would still instantiate, but every
|
|
25
|
+
* `ctx.settings.getSection(section)` call would hit an empty
|
|
26
|
+
* ConfigManager section so the UI would show the schema defaults.
|
|
27
|
+
* In practice the built-in loader can skip it on agents; for now we
|
|
28
|
+
* just let it run everywhere because it's harmless.
|
|
29
|
+
* - Reads via `ctx.settings.getSection(section)` and writes via
|
|
30
|
+
* `ctx.settings.setSection(section, patch)` — the explicit
|
|
31
|
+
* yml-section pair on `AddonSettingsApi`.
|
|
32
|
+
* - Does NOT register as a capability provider. It's a pure "settings
|
|
33
|
+
* surface" addon — its sole purpose is to expose the yml sections
|
|
34
|
+
* through the new three-level settings API.
|
|
35
|
+
*
|
|
36
|
+
* This addon is declared in `@camstack/core`'s package.json `camstack.addons[]`
|
|
37
|
+
* and loaded automatically via AddonLoader like any other core built-in.
|
|
38
|
+
*/
|
|
39
|
+
/** Section key → user-facing section title. */
|
|
40
|
+
var SECTION_TITLES = {
|
|
41
|
+
server: "Server",
|
|
42
|
+
auth: "Authentication",
|
|
43
|
+
ffmpeg: "FFmpeg"
|
|
44
|
+
};
|
|
45
|
+
/** Keys that map 1:1 to a given yml section — used by `updateGlobalSettings`
|
|
46
|
+
* to figure out which section owns each key in the incoming patch. */
|
|
47
|
+
var KEY_TO_SECTION = {
|
|
48
|
+
port: "server",
|
|
49
|
+
host: "server",
|
|
50
|
+
dataPath: "server",
|
|
51
|
+
tokenExpiry: "auth",
|
|
52
|
+
binaryPath: "ffmpeg",
|
|
53
|
+
hwAccel: "ffmpeg",
|
|
54
|
+
threadCount: "ffmpeg"
|
|
55
|
+
};
|
|
56
|
+
var SystemConfigAddon = class extends BaseAddon {
|
|
57
|
+
id = "system-config";
|
|
58
|
+
constructor() {
|
|
59
|
+
super({});
|
|
60
|
+
}
|
|
61
|
+
async onInitialize() {
|
|
62
|
+
this.ctx.logger.info("Initialized — exposes yml-backed sections via getGlobalSettings");
|
|
63
|
+
}
|
|
64
|
+
buildGlobalSchema() {
|
|
65
|
+
return { sections: [
|
|
66
|
+
{
|
|
67
|
+
id: "system-config-server",
|
|
68
|
+
title: SECTION_TITLES["server"],
|
|
69
|
+
description: "Core server connection settings — read-only, loaded from config.yaml at bootstrap.",
|
|
70
|
+
columns: 2,
|
|
71
|
+
fields: [
|
|
72
|
+
{
|
|
73
|
+
type: "info",
|
|
74
|
+
key: "server-restart-note",
|
|
75
|
+
label: "Restart required",
|
|
76
|
+
content: "Server settings are read-only. Change them in config.yaml and restart.",
|
|
77
|
+
variant: "warning"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: "text",
|
|
81
|
+
key: "port",
|
|
82
|
+
label: "Port",
|
|
83
|
+
description: "Listening port",
|
|
84
|
+
disabled: true
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: "text",
|
|
88
|
+
key: "host",
|
|
89
|
+
label: "Host",
|
|
90
|
+
description: "Bind address",
|
|
91
|
+
disabled: true
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: "text",
|
|
95
|
+
key: "dataPath",
|
|
96
|
+
label: "Data Path",
|
|
97
|
+
description: "Root data directory",
|
|
98
|
+
disabled: true,
|
|
99
|
+
span: 2
|
|
100
|
+
}
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: "system-config-auth",
|
|
105
|
+
title: SECTION_TITLES["auth"],
|
|
106
|
+
description: "Token and session settings.",
|
|
107
|
+
columns: 1,
|
|
108
|
+
fields: [{
|
|
109
|
+
type: "text",
|
|
110
|
+
key: "tokenExpiry",
|
|
111
|
+
label: "Token Expiry",
|
|
112
|
+
description: "JWT token lifetime (e.g. 24h, 7d, 1h)",
|
|
113
|
+
placeholder: "24h",
|
|
114
|
+
default: "24h"
|
|
115
|
+
}]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: "system-config-ffmpeg",
|
|
119
|
+
title: SECTION_TITLES["ffmpeg"],
|
|
120
|
+
description: "FFmpeg binary and hardware acceleration settings.",
|
|
121
|
+
columns: 2,
|
|
122
|
+
fields: [
|
|
123
|
+
{
|
|
124
|
+
type: "text",
|
|
125
|
+
key: "binaryPath",
|
|
126
|
+
label: "Binary Path",
|
|
127
|
+
description: "Path to ffmpeg executable",
|
|
128
|
+
placeholder: "ffmpeg",
|
|
129
|
+
default: "ffmpeg",
|
|
130
|
+
span: 2
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
type: "select",
|
|
134
|
+
key: "hwAccel",
|
|
135
|
+
label: "Hardware Acceleration",
|
|
136
|
+
description: "GPU decoding/encoding backend",
|
|
137
|
+
default: "auto",
|
|
138
|
+
options: [
|
|
139
|
+
{
|
|
140
|
+
value: "auto",
|
|
141
|
+
label: "Auto-detect"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
value: "none",
|
|
145
|
+
label: "None (CPU only)"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
value: "videotoolbox",
|
|
149
|
+
label: "VideoToolbox (macOS)"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
value: "vaapi",
|
|
153
|
+
label: "VA-API (Linux Intel/AMD)"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
value: "qsv",
|
|
157
|
+
label: "QSV (Intel Quick Sync)"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
value: "cuda",
|
|
161
|
+
label: "CUDA (NVIDIA)"
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: "number",
|
|
167
|
+
key: "threadCount",
|
|
168
|
+
label: "Thread Count",
|
|
169
|
+
description: "0 = auto (let FFmpeg decide)",
|
|
170
|
+
min: 0,
|
|
171
|
+
max: 16,
|
|
172
|
+
step: 1,
|
|
173
|
+
default: 0
|
|
174
|
+
}
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
] };
|
|
178
|
+
}
|
|
179
|
+
async getGlobalSettings() {
|
|
180
|
+
const schema = this.buildGlobalSchema();
|
|
181
|
+
if (!this.ctx.settings) return hydrateSchema(schema, {});
|
|
182
|
+
const sectionNames = Object.keys(SECTION_TITLES);
|
|
183
|
+
const merged = {};
|
|
184
|
+
for (const section of sectionNames) try {
|
|
185
|
+
const values = await this.ctx.settings.getSection(section);
|
|
186
|
+
Object.assign(merged, values);
|
|
187
|
+
} catch (err) {
|
|
188
|
+
const msg = errMsg(err);
|
|
189
|
+
this.ctx.logger.debug("Failed to read section", { meta: {
|
|
190
|
+
section,
|
|
191
|
+
error: msg
|
|
192
|
+
} });
|
|
193
|
+
}
|
|
194
|
+
return hydrateSchema(schema, merged);
|
|
195
|
+
}
|
|
196
|
+
async updateGlobalSettings(patch) {
|
|
197
|
+
if (!this.ctx.settings) throw new Error("system-config: ctx.settings not available — cannot write sections");
|
|
198
|
+
const perSection = /* @__PURE__ */ new Map();
|
|
199
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
200
|
+
const section = KEY_TO_SECTION[key];
|
|
201
|
+
if (section === void 0) {
|
|
202
|
+
this.ctx.logger.warn("update ignored unknown key (not mapped to any section)", { meta: { key } });
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
if (section === "server") {
|
|
206
|
+
this.ctx.logger.warn("update ignored read-only server-section key", { meta: { key } });
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
let bucket = perSection.get(section);
|
|
210
|
+
if (!bucket) {
|
|
211
|
+
bucket = {};
|
|
212
|
+
perSection.set(section, bucket);
|
|
213
|
+
}
|
|
214
|
+
bucket[key] = value;
|
|
215
|
+
}
|
|
216
|
+
for (const [section, sectionPatch] of perSection) {
|
|
217
|
+
await this.ctx.settings.setSection(section, sectionPatch);
|
|
218
|
+
this.ctx.logger.info("Wrote keys to section", { meta: {
|
|
219
|
+
section,
|
|
220
|
+
keyCount: Object.keys(sectionPatch).length
|
|
221
|
+
} });
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
//#endregion
|
|
226
|
+
export { SystemConfigAddon, SystemConfigAddon as default };
|
|
227
|
+
|
|
228
|
+
//# sourceMappingURL=system-config.addon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-config.addon.mjs","names":[],"sources":["../../../src/builtins/system-config/system-config.addon.ts"],"sourcesContent":["import type {\n ConfigUISchema,\n ConfigUISchemaWithValues,\n} from '@camstack/types'\nimport { BaseAddon, hydrateSchema , errMsg } from '@camstack/types'\n\n/**\n * Built-in `system-config` addon — Phase 4 of the settings redesign.\n *\n * Exposes the cluster-wide yml-backed sections that the bootstrap\n * loader reads before any addon is instantiated — things that cannot\n * live inside an addon because changing them requires a server\n * restart (port, host, dataPath) or because they own no runtime\n * state of their own (auth token expiry, global ffmpeg binary path).\n *\n * Sections exposed:\n * - server (port, host, dataPath — READ-ONLY, loaded from config.yaml at bootstrap)\n * - auth (tokenExpiry)\n * - ffmpeg (binaryPath, hwAccel, threadCount)\n *\n * Sections NOT exposed (each owned by the addon that implements them):\n * - logging → `winston-logging` addon (level + retention)\n * - recording → `recording` addon (segment duration, retention)\n * - retention → analytics / detection addons (per-table retention)\n *\n * Implementation notes:\n * - Runs only on the hub process (yml sections are hub-side state).\n * On agent nodes this addon would still instantiate, but every\n * `ctx.settings.getSection(section)` call would hit an empty\n * ConfigManager section so the UI would show the schema defaults.\n * In practice the built-in loader can skip it on agents; for now we\n * just let it run everywhere because it's harmless.\n * - Reads via `ctx.settings.getSection(section)` and writes via\n * `ctx.settings.setSection(section, patch)` — the explicit\n * yml-section pair on `AddonSettingsApi`.\n * - Does NOT register as a capability provider. It's a pure \"settings\n * surface\" addon — its sole purpose is to expose the yml sections\n * through the new three-level settings API.\n *\n * This addon is declared in `@camstack/core`'s package.json `camstack.addons[]`\n * and loaded automatically via AddonLoader like any other core built-in.\n */\n\n/** Section key → user-facing section title. */\nconst SECTION_TITLES: Readonly<Record<string, string>> = {\n server: 'Server',\n auth: 'Authentication',\n ffmpeg: 'FFmpeg',\n}\n\n/** Keys that map 1:1 to a given yml section — used by `updateGlobalSettings`\n * to figure out which section owns each key in the incoming patch. */\nconst KEY_TO_SECTION: Readonly<Record<string, string>> = {\n // server (read-only)\n port: 'server',\n host: 'server',\n dataPath: 'server',\n // auth\n tokenExpiry: 'auth',\n // ffmpeg\n binaryPath: 'ffmpeg',\n hwAccel: 'ffmpeg',\n threadCount: 'ffmpeg',\n}\n\nexport class SystemConfigAddon extends BaseAddon {\n readonly id = 'system-config'\n\n constructor() { super({}) }\n\n protected async onInitialize(): Promise<void> {\n this.ctx.logger.info('Initialized — exposes yml-backed sections via getGlobalSettings')\n }\n\n // ── Three-level settings API (only `getGlobalSettings` is implemented) ──\n\n private buildGlobalSchema(): ConfigUISchema {\n return {\n sections: [\n {\n id: 'system-config-server',\n title: SECTION_TITLES['server']!,\n description: 'Core server connection settings — read-only, loaded from config.yaml at bootstrap.',\n columns: 2,\n fields: [\n {\n type: 'info',\n key: 'server-restart-note',\n label: 'Restart required',\n content: 'Server settings are read-only. Change them in config.yaml and restart.',\n variant: 'warning',\n },\n { type: 'text', key: 'port', label: 'Port', description: 'Listening port', disabled: true },\n { type: 'text', key: 'host', label: 'Host', description: 'Bind address', disabled: true },\n { type: 'text', key: 'dataPath', label: 'Data Path', description: 'Root data directory', disabled: true, span: 2 },\n ],\n },\n {\n id: 'system-config-auth',\n title: SECTION_TITLES['auth']!,\n description: 'Token and session settings.',\n columns: 1,\n fields: [\n {\n type: 'text',\n key: 'tokenExpiry',\n label: 'Token Expiry',\n description: 'JWT token lifetime (e.g. 24h, 7d, 1h)',\n placeholder: '24h',\n default: '24h',\n },\n ],\n },\n {\n id: 'system-config-ffmpeg',\n title: SECTION_TITLES['ffmpeg']!,\n description: 'FFmpeg binary and hardware acceleration settings.',\n columns: 2,\n fields: [\n {\n type: 'text',\n key: 'binaryPath',\n label: 'Binary Path',\n description: 'Path to ffmpeg executable',\n placeholder: 'ffmpeg',\n default: 'ffmpeg',\n span: 2,\n },\n {\n type: 'select',\n key: 'hwAccel',\n label: 'Hardware Acceleration',\n description: 'GPU decoding/encoding backend',\n default: 'auto',\n options: [\n { value: 'auto', label: 'Auto-detect' },\n { value: 'none', label: 'None (CPU only)' },\n { value: 'videotoolbox', label: 'VideoToolbox (macOS)' },\n { value: 'vaapi', label: 'VA-API (Linux Intel/AMD)' },\n { value: 'qsv', label: 'QSV (Intel Quick Sync)' },\n { value: 'cuda', label: 'CUDA (NVIDIA)' },\n ],\n },\n {\n type: 'number',\n key: 'threadCount',\n label: 'Thread Count',\n description: '0 = auto (let FFmpeg decide)',\n min: 0,\n max: 16,\n step: 1,\n default: 0,\n },\n ],\n },\n ],\n }\n }\n\n async getGlobalSettings(): Promise<ConfigUISchemaWithValues> {\n const schema = this.buildGlobalSchema()\n if (!this.ctx.settings) {\n return hydrateSchema(schema, {})\n }\n\n // Read all yml sections in parallel and merge their values into a\n // single flat record keyed by field name. The `KEY_TO_SECTION` map\n // guarantees uniqueness (each key belongs to exactly one section).\n const sectionNames = Object.keys(SECTION_TITLES)\n const merged: Record<string, unknown> = {}\n for (const section of sectionNames) {\n try {\n const values = await this.ctx.settings!.getSection(section)\n Object.assign(merged, values)\n } catch (err: unknown) {\n const msg = errMsg(err)\n this.ctx.logger.debug('Failed to read section', { meta: { section, error: msg } })\n }\n }\n\n return hydrateSchema(schema, merged)\n }\n\n async updateGlobalSettings(patch: Record<string, unknown>): Promise<void> {\n if (!this.ctx.settings) {\n throw new Error('system-config: ctx.settings not available — cannot write sections')\n }\n\n // Group the patch keys by the section they belong to, then write\n // each section in one shot via ctx.settings.setSection(). The\n // server section is read-only, so any keys targeting it are skipped\n // with a warning.\n const perSection = new Map<string, Record<string, unknown>>()\n for (const [key, value] of Object.entries(patch)) {\n const section = KEY_TO_SECTION[key]\n if (section === undefined) {\n this.ctx.logger.warn('update ignored unknown key (not mapped to any section)', { meta: { key } })\n continue\n }\n if (section === 'server') {\n this.ctx.logger.warn('update ignored read-only server-section key', { meta: { key } })\n continue\n }\n let bucket = perSection.get(section)\n if (!bucket) {\n bucket = {}\n perSection.set(section, bucket)\n }\n bucket[key] = value\n }\n\n for (const [section, sectionPatch] of perSection) {\n await this.ctx.settings!.setSection(section, sectionPatch)\n this.ctx.logger.info('Wrote keys to section', { meta: { section, keyCount: Object.keys(sectionPatch).length } })\n }\n }\n}\n\nexport default SystemConfigAddon\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/builtins/turn-orchestrator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_builtins_turn_orchestrator_turn_orchestrator_addon = require("./turn-orchestrator.addon.js");
|
|
6
|
+
exports.TurnOrchestratorAddon = require_builtins_turn_orchestrator_turn_orchestrator_addon.TurnOrchestratorAddon;
|
|
7
|
+
exports.default = require_builtins_turn_orchestrator_turn_orchestrator_addon.TurnOrchestratorAddon;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseAddon, ProviderRegistration } from '@camstack/types';
|
|
2
|
+
export declare class TurnOrchestratorAddon extends BaseAddon<Record<string, never>> {
|
|
3
|
+
constructor();
|
|
4
|
+
protected onInitialize(): Promise<ProviderRegistration[]>;
|
|
5
|
+
private getEntries;
|
|
6
|
+
private listProviders;
|
|
7
|
+
private getAllServers;
|
|
8
|
+
}
|
|
9
|
+
export default TurnOrchestratorAddon;
|
|
10
|
+
//# sourceMappingURL=turn-orchestrator.addon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-orchestrator.addon.d.ts","sourceRoot":"","sources":["../../../src/builtins/turn-orchestrator/turn-orchestrator.addon.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,SAAS,EAIT,KAAK,oBAAoB,EAC1B,MAAM,iBAAiB,CAAA;AAQxB,qBAAa,qBAAsB,SAAQ,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;;cAKzD,YAAY,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAc/D,OAAO,CAAC,UAAU;YAIJ,aAAa;YAyBb,aAAa;CAe5B;AAED,eAAe,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
require("../../chunk-C13QxCFV.js");
|
|
6
|
+
let _camstack_types = require("@camstack/types");
|
|
7
|
+
//#region src/builtins/turn-orchestrator/turn-orchestrator.addon.ts
|
|
8
|
+
/**
|
|
9
|
+
* TURN orchestrator — singleton facade over the `turn-provider`
|
|
10
|
+
* collection (Cloudflare TURN, coturn, Twilio, …). Mirrors the
|
|
11
|
+
* auth-orchestrator / remote-access-orchestrator patterns.
|
|
12
|
+
*
|
|
13
|
+
* Provides:
|
|
14
|
+
* - listProviders() — admin UI inventory
|
|
15
|
+
* - getAllServers() — combined ICE server list across enabled
|
|
16
|
+
* providers, consumed by the WebRTC layer at session creation
|
|
17
|
+
*/
|
|
18
|
+
var TurnOrchestratorAddon = class extends _camstack_types.BaseAddon {
|
|
19
|
+
constructor() {
|
|
20
|
+
super({});
|
|
21
|
+
}
|
|
22
|
+
async onInitialize() {
|
|
23
|
+
const provider = {
|
|
24
|
+
listProviders: async () => this.listProviders(),
|
|
25
|
+
getAllServers: async () => this.getAllServers(),
|
|
26
|
+
setProviderEnabled: async () => {
|
|
27
|
+
return { success: true };
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
this.ctx.logger.info("TURN orchestrator initialized");
|
|
31
|
+
return [{
|
|
32
|
+
capability: _camstack_types.turnOrchestratorCapability,
|
|
33
|
+
provider
|
|
34
|
+
}];
|
|
35
|
+
}
|
|
36
|
+
getEntries() {
|
|
37
|
+
return this.capabilities?.getCollectionEntries("turn-provider") ?? [];
|
|
38
|
+
}
|
|
39
|
+
async listProviders() {
|
|
40
|
+
const out = [];
|
|
41
|
+
for (const [addonId, impl] of this.getEntries()) {
|
|
42
|
+
let serverCount = 0;
|
|
43
|
+
let error;
|
|
44
|
+
if (impl.getTurnServers) try {
|
|
45
|
+
serverCount = (await impl.getTurnServers()).length;
|
|
46
|
+
} catch (err) {
|
|
47
|
+
error = err instanceof Error ? err.message : String(err);
|
|
48
|
+
}
|
|
49
|
+
out.push({
|
|
50
|
+
addonId,
|
|
51
|
+
displayName: impl.displayName ?? addonId,
|
|
52
|
+
kind: impl.kind ?? (addonId.includes("cloudflare") ? "cloudflare" : addonId.includes("coturn") ? "coturn" : "other"),
|
|
53
|
+
enabled: true,
|
|
54
|
+
serverCount,
|
|
55
|
+
...error !== void 0 ? { error } : {}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return out;
|
|
59
|
+
}
|
|
60
|
+
async getAllServers() {
|
|
61
|
+
const out = [];
|
|
62
|
+
for (const [, impl] of this.getEntries()) {
|
|
63
|
+
if (!impl.getTurnServers) continue;
|
|
64
|
+
try {
|
|
65
|
+
const servers = await impl.getTurnServers();
|
|
66
|
+
out.push(...servers);
|
|
67
|
+
} catch (err) {
|
|
68
|
+
this.ctx.logger.warn("TURN provider failed to enumerate servers", { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return out;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
//#endregion
|
|
75
|
+
exports.TurnOrchestratorAddon = TurnOrchestratorAddon;
|
|
76
|
+
exports.default = TurnOrchestratorAddon;
|
|
77
|
+
|
|
78
|
+
//# sourceMappingURL=turn-orchestrator.addon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-orchestrator.addon.js","names":[],"sources":["../../../src/builtins/turn-orchestrator/turn-orchestrator.addon.ts"],"sourcesContent":["/**\n * TURN orchestrator — singleton facade over the `turn-provider`\n * collection (Cloudflare TURN, coturn, Twilio, …). Mirrors the\n * auth-orchestrator / remote-access-orchestrator patterns.\n *\n * Provides:\n * - listProviders() — admin UI inventory\n * - getAllServers() — combined ICE server list across enabled\n * providers, consumed by the WebRTC layer at session creation\n */\nimport {\n BaseAddon,\n turnOrchestratorCapability,\n type ITurnOrchestratorProvider,\n type TurnProviderInfo,\n type ProviderRegistration,\n} from '@camstack/types'\n\ninterface TurnProviderLike {\n getTurnServers?: () => Promise<readonly { urls: string | string[]; username?: string; credential?: string }[]>\n readonly displayName?: string\n readonly kind?: TurnProviderInfo['kind']\n}\n\nexport class TurnOrchestratorAddon extends BaseAddon<Record<string, never>> {\n constructor() {\n super({})\n }\n\n protected async onInitialize(): Promise<ProviderRegistration[]> {\n const provider: ITurnOrchestratorProvider = {\n listProviders: async () => this.listProviders(),\n getAllServers: async () => this.getAllServers(),\n setProviderEnabled: async () => {\n // Persistence per-addon for now — see auth-orchestrator\n // rationale.\n return { success: true as const }\n },\n }\n this.ctx.logger.info('TURN orchestrator initialized')\n return [{ capability: turnOrchestratorCapability, provider }]\n }\n\n private getEntries(): readonly (readonly [string, TurnProviderLike])[] {\n return this.capabilities?.getCollectionEntries<TurnProviderLike>('turn-provider') ?? []\n }\n\n private async listProviders(): Promise<readonly TurnProviderInfo[]> {\n const out: TurnProviderInfo[] = []\n for (const [addonId, impl] of this.getEntries()) {\n let serverCount = 0\n let error: string | undefined\n if (impl.getTurnServers) {\n try {\n const servers = await impl.getTurnServers()\n serverCount = servers.length\n } catch (err) {\n error = err instanceof Error ? err.message : String(err)\n }\n }\n out.push({\n addonId,\n displayName: impl.displayName ?? addonId,\n kind: impl.kind ?? (addonId.includes('cloudflare') ? 'cloudflare' as const : addonId.includes('coturn') ? 'coturn' as const : 'other' as const),\n enabled: true,\n serverCount,\n ...(error !== undefined ? { error } : {}),\n })\n }\n return out\n }\n\n private async getAllServers(): Promise<readonly { urls: string | string[]; username?: string; credential?: string }[]> {\n const out: { urls: string | string[]; username?: string; credential?: string }[] = []\n for (const [, impl] of this.getEntries()) {\n if (!impl.getTurnServers) continue\n try {\n const servers = await impl.getTurnServers()\n out.push(...servers)\n } catch (err) {\n this.ctx.logger.warn('TURN provider failed to enumerate servers', {\n meta: { error: err instanceof Error ? err.message : String(err) },\n })\n }\n }\n return out\n }\n}\n\nexport default TurnOrchestratorAddon\n"],"mappings":";;;;;;;;;;;;;;;;;AAwBA,IAAa,wBAAb,cAA2C,gBAAA,UAAiC;CAC1E,cAAc;EACZ,MAAM,EAAE,CAAC;;CAGX,MAAgB,eAAgD;EAC9D,MAAM,WAAsC;GAC1C,eAAe,YAAY,KAAK,eAAe;GAC/C,eAAe,YAAY,KAAK,eAAe;GAC/C,oBAAoB,YAAY;IAG9B,OAAO,EAAE,SAAS,MAAe;;GAEpC;EACD,KAAK,IAAI,OAAO,KAAK,gCAAgC;EACrD,OAAO,CAAC;GAAE,YAAY,gBAAA;GAA4B;GAAU,CAAC;;CAG/D,aAAuE;EACrE,OAAO,KAAK,cAAc,qBAAuC,gBAAgB,IAAI,EAAE;;CAGzF,MAAc,gBAAsD;EAClE,MAAM,MAA0B,EAAE;EAClC,KAAK,MAAM,CAAC,SAAS,SAAS,KAAK,YAAY,EAAE;GAC/C,IAAI,cAAc;GAClB,IAAI;GACJ,IAAI,KAAK,gBACP,IAAI;IAEF,eAAc,MADQ,KAAK,gBAAgB,EACrB;YACf,KAAK;IACZ,QAAQ,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI;;GAG5D,IAAI,KAAK;IACP;IACA,aAAa,KAAK,eAAe;IACjC,MAAM,KAAK,SAAS,QAAQ,SAAS,aAAa,GAAG,eAAwB,QAAQ,SAAS,SAAS,GAAG,WAAoB;IAC9H,SAAS;IACT;IACA,GAAI,UAAU,KAAA,IAAY,EAAE,OAAO,GAAG,EAAE;IACzC,CAAC;;EAEJ,OAAO;;CAGT,MAAc,gBAAyG;EACrH,MAAM,MAA6E,EAAE;EACrF,KAAK,MAAM,GAAG,SAAS,KAAK,YAAY,EAAE;GACxC,IAAI,CAAC,KAAK,gBAAgB;GAC1B,IAAI;IACF,MAAM,UAAU,MAAM,KAAK,gBAAgB;IAC3C,IAAI,KAAK,GAAG,QAAQ;YACb,KAAK;IACZ,KAAK,IAAI,OAAO,KAAK,6CAA6C,EAChE,MAAM,EAAE,OAAO,eAAe,QAAQ,IAAI,UAAU,OAAO,IAAI,EAAE,EAClE,CAAC;;;EAGN,OAAO"}
|