@camstack/system 1.2.390 → 1.2.392
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 +30 -30
- package/dist/addon-routes/addon-route-registry.d.ts +31 -31
- package/dist/addon-runner.js +1 -1
- package/dist/addon-runner.mjs +1 -1
- package/dist/addon-utils.d.ts +22 -22
- package/dist/addon-utils.js +1 -1
- package/dist/addon-utils.mjs +1 -1
- package/dist/amd-accelerators-CEuPFBBK.js +36 -0
- package/dist/amd-accelerators-U_RsoEDd.mjs +35 -0
- package/dist/amd-npu-B-QyyMyF.js +53 -0
- package/dist/amd-npu-Db_SoSuL.mjs +52 -0
- package/dist/auth/admin-token-manager.d.ts +37 -67
- package/dist/auth/api-key-manager.d.ts +8 -8
- package/dist/auth/auth-audit-log.d.ts +29 -49
- package/dist/auth/auth-manager.d.ts +127 -126
- package/dist/auth/cidr.d.ts +8 -8
- package/dist/auth/external-identity-manager.d.ts +46 -34
- package/dist/auth/jwt-signing-key.d.ts +14 -14
- package/dist/auth/login-session-manager.d.ts +95 -135
- package/dist/auth/parse-record.d.ts +13 -13
- package/dist/auth/scope-matcher.d.ts +7 -7
- package/dist/auth/scoped-token-manager.d.ts +62 -62
- package/dist/auth/token-expiry.d.ts +49 -26
- package/dist/auth/totp-manager.d.ts +48 -48
- package/dist/auth/user-management-internal.d.ts +67 -52
- package/dist/auth/user-manager.d.ts +58 -58
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.d.ts +54 -54
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-pages-aggregator/dedupe-pages.d.ts +22 -4
- package/dist/builtins/addon-pages-aggregator/index.d.ts +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.d.ts +54 -54
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/index.d.ts +1 -1
- package/dist/builtins/alerts/alerts.addon.d.ts +88 -87
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/alerts/device-label.d.ts +6 -6
- package/dist/builtins/alerts/index.d.ts +1 -1
- package/dist/builtins/alerts/prune-policy.d.ts +36 -36
- package/dist/builtins/autotrack/autotrack-cameras.d.ts +102 -79
- package/dist/builtins/autotrack/autotrack-config.d.ts +81 -81
- package/dist/builtins/autotrack/autotrack-decision.d.ts +69 -82
- package/dist/builtins/autotrack/autotrack-loop.d.ts +81 -61
- package/dist/builtins/autotrack/autotrack.addon.d.ts +103 -66
- package/dist/builtins/autotrack/frame-error.d.ts +38 -38
- package/dist/builtins/autotrack/frame-measurements.d.ts +79 -79
- package/dist/builtins/autotrack/index.d.ts +2 -2
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/autotrack/ptz-mirror.d.ts +46 -17
- package/dist/builtins/autotrack/target-selection.d.ts +33 -47
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +270 -269
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/dist/builtins/backup-orchestrator/cron-helpers.d.ts +17 -17
- package/dist/builtins/backup-orchestrator/destination-policy.d.ts +99 -82
- package/dist/builtins/backup-orchestrator/download-helpers.d.ts +9 -9
- package/dist/builtins/backup-orchestrator/encryption-key-store.d.ts +40 -29
- package/dist/builtins/backup-orchestrator/index.d.ts +2 -2
- package/dist/builtins/backup-orchestrator/manifest-store.d.ts +88 -69
- package/dist/builtins/backup-orchestrator/restore-archive.d.ts +14 -14
- package/dist/builtins/backup-orchestrator/run-queue.d.ts +86 -86
- package/dist/builtins/backup-orchestrator/schedule-store.d.ts +53 -37
- package/dist/builtins/backup-orchestrator/staging-paths.d.ts +23 -23
- package/dist/builtins/backup-orchestrator/write-targets.d.ts +53 -53
- package/dist/builtins/calendars/calendar-color.d.ts +5 -1
- package/dist/builtins/calendars/calendar-prefs-store.d.ts +18 -12
- package/dist/builtins/calendars/calendars.addon.d.ts +16 -11
- package/dist/builtins/calendars/calendars.addon.js +1 -1
- package/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/dist/builtins/calendars/index.d.ts +1 -1
- package/dist/builtins/camera-grid/acquire-retry.d.ts +26 -26
- package/dist/builtins/camera-grid/addon.d.ts +200 -174
- package/dist/builtins/camera-grid/flv-join.d.ts +32 -58
- package/dist/builtins/camera-grid/grid-activity-mirror.d.ts +37 -37
- package/dist/builtins/camera-grid/grid-activity.d.ts +83 -42
- package/dist/builtins/camera-grid/grid-camera-declarations.d.ts +46 -46
- package/dist/builtins/camera-grid/grid-camera-device.d.ts +60 -34
- package/dist/builtins/camera-grid/grid-canvas-derivation.d.ts +50 -15
- package/dist/builtins/camera-grid/grid-canvas-seed.d.ts +96 -46
- package/dist/builtins/camera-grid/grid-canvas.d.ts +74 -74
- package/dist/builtins/camera-grid/grid-child.d.ts +29 -16
- package/dist/builtins/camera-grid/grid-compositor-child.d.ts +2 -2
- package/dist/builtins/camera-grid/grid-compositor-invocation.d.ts +39 -11
- package/dist/builtins/camera-grid/grid-compositor.d.ts +50 -50
- package/dist/builtins/camera-grid/grid-detection-mapping.d.ts +52 -22
- package/dist/builtins/camera-grid/grid-device-settings.d.ts +31 -7
- package/dist/builtins/camera-grid/grid-filter-graph.d.ts +41 -41
- package/dist/builtins/camera-grid/grid-frame-sample.d.ts +45 -19
- package/dist/builtins/camera-grid/grid-instances.d.ts +20 -50
- package/dist/builtins/camera-grid/grid-last-frame-store.d.ts +51 -51
- package/dist/builtins/camera-grid/grid-layout-native-provider.d.ts +30 -4
- package/dist/builtins/camera-grid/grid-plan.d.ts +30 -20
- package/dist/builtins/camera-grid/grid-profiles.d.ts +85 -45
- package/dist/builtins/camera-grid/grid-row-normalization.d.ts +6 -6
- package/dist/builtins/camera-grid/grid-sentry-sources.d.ts +57 -57
- package/dist/builtins/camera-grid/grid-snapshot.d.ts +41 -41
- package/dist/builtins/camera-grid/grid-stream-descriptor.d.ts +49 -21
- package/dist/builtins/camera-grid/grid-stream-invocation.d.ts +37 -22
- package/dist/builtins/camera-grid/grid-stream-relay.d.ts +26 -26
- package/dist/builtins/camera-grid/grid-stream-session.d.ts +123 -93
- package/dist/builtins/camera-grid/grid-tile-feed.d.ts +47 -47
- package/dist/builtins/camera-grid/grid-tile-plan.d.ts +55 -20
- package/dist/builtins/camera-grid/grid-wire-format.d.ts +22 -6
- package/dist/builtins/camera-grid/index.d.ts +44 -44
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/camera-grid/silence-analysis.d.ts +31 -14
- package/dist/builtins/composer/claim-gate.d.ts +54 -27
- package/dist/builtins/composer/composed-device-set.d.ts +40 -26
- package/dist/builtins/composer/composed-device.d.ts +39 -17
- package/dist/builtins/composer/composer-apply-waits.d.ts +20 -13
- package/dist/builtins/composer/composer-grafts.d.ts +57 -38
- package/dist/builtins/composer/composer-live-set.d.ts +15 -15
- package/dist/builtins/composer/composer-plan.d.ts +76 -60
- package/dist/builtins/composer/composer-runtime-factory.d.ts +21 -14
- package/dist/builtins/composer/composer-seeds.d.ts +20 -14
- package/dist/builtins/composer/composer-verdict.d.ts +28 -14
- package/dist/builtins/composer/composer.addon.d.ts +23 -9
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- package/dist/builtins/composer/composer.d.ts +145 -100
- package/dist/builtins/composer/composition-declarations.d.ts +50 -39
- package/dist/builtins/composer/composition-evaluation.d.ts +38 -22
- package/dist/builtins/composer/composition-runtime.d.ts +178 -125
- package/dist/builtins/composer/composition-target.d.ts +38 -34
- package/dist/builtins/composer/confirmed-seed.d.ts +35 -23
- package/dist/builtins/composer/deadline-timer.d.ts +13 -13
- package/dist/builtins/composer/existing-target.d.ts +90 -73
- package/dist/builtins/composer/field-record.d.ts +26 -19
- package/dist/builtins/composer/graft-host.d.ts +56 -32
- package/dist/builtins/composer/held-claims.d.ts +26 -9
- package/dist/builtins/composer/index.d.ts +1 -1
- package/dist/builtins/composer/own-field-reads.d.ts +26 -15
- package/dist/builtins/composer/owned-fields-target.d.ts +75 -44
- package/dist/builtins/composer/slice-assembler.d.ts +19 -3
- package/dist/builtins/composer/source-readings.d.ts +67 -61
- package/dist/builtins/composer/source-tracker.d.ts +133 -69
- package/dist/builtins/console-logging/console-destination.d.ts +15 -8
- package/dist/builtins/console-logging/console-logging.addon.d.ts +20 -19
- package/dist/builtins/console-logging/index.d.ts +3 -3
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/block-package.d.ts +37 -37
- package/dist/builtins/core-blocks/block-settings-store.d.ts +34 -21
- package/dist/builtins/core-blocks/block-supervisor.d.ts +138 -117
- package/dist/builtins/core-blocks/block-type-defs.d.ts +21 -21
- package/dist/builtins/core-blocks/blocks-integration.d.ts +76 -49
- package/dist/builtins/core-blocks/compile-block.d.ts +37 -37
- package/dist/builtins/core-blocks/composition-api.d.ts +38 -24
- package/dist/builtins/core-blocks/composition-peers.d.ts +26 -4
- package/dist/builtins/core-blocks/composition-sources.d.ts +25 -10
- package/dist/builtins/core-blocks/core-block-store.d.ts +109 -109
- package/dist/builtins/core-blocks/core-blocks.addon.d.ts +72 -72
- package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/dist/builtins/core-blocks/extract-settings-schema.d.ts +4 -4
- package/dist/builtins/core-blocks/index.d.ts +8 -8
- package/dist/builtins/device-manager/adoption-job-engine.d.ts +141 -98
- package/dist/builtins/device-manager/claimed-status-overlay.d.ts +42 -9
- package/dist/builtins/device-manager/contribution-cache.d.ts +56 -56
- package/dist/builtins/device-manager/day-night-config-schema.d.ts +26 -12
- package/dist/builtins/device-manager/device-aggregation-merge.d.ts +17 -17
- package/dist/builtins/device-manager/device-aggregation.d.ts +277 -254
- package/dist/builtins/device-manager/device-bindings-store.d.ts +232 -220
- package/dist/builtins/device-manager/device-config-contribution.d.ts +29 -29
- package/dist/builtins/device-manager/device-config-secrets.d.ts +32 -13
- package/dist/builtins/device-manager/device-event-propagator.d.ts +22 -22
- package/dist/builtins/device-manager/device-extension-linked-slot.d.ts +17 -17
- package/dist/builtins/device-manager/device-form-secrets.d.ts +14 -14
- package/dist/builtins/device-manager/device-linked-devices.d.ts +159 -98
- package/dist/builtins/device-manager/device-manager.addon.d.ts +223 -197
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/device-manager/device-meta-actions.d.ts +306 -305
- package/dist/builtins/device-manager/device-meta-store.d.ts +100 -90
- package/dist/builtins/device-manager/device-meta-types.d.ts +250 -241
- package/dist/builtins/device-manager/device-online-fallback.d.ts +30 -30
- package/dist/builtins/device-manager/device-projection.d.ts +53 -67
- package/dist/builtins/device-manager/device-provider-context.d.ts +109 -94
- package/dist/builtins/device-manager/device-queries.d.ts +63 -63
- package/dist/builtins/device-manager/device-row-store.d.ts +417 -365
- package/dist/builtins/device-manager/device-source-activation.d.ts +91 -49
- package/dist/builtins/device-manager/device-state-claim-views.d.ts +76 -61
- package/dist/builtins/device-manager/device-state-claims.d.ts +53 -30
- package/dist/builtins/device-manager/device-state-mirror.d.ts +256 -264
- package/dist/builtins/device-manager/device-sync-resolvers.d.ts +25 -25
- package/dist/builtins/device-manager/field-claims-index.d.ts +85 -58
- package/dist/builtins/device-manager/field-ownership.d.ts +54 -36
- package/dist/builtins/device-manager/fleet-read-census.d.ts +99 -61
- package/dist/builtins/device-manager/image-settings-config-schema.d.ts +18 -8
- package/dist/builtins/device-manager/index.d.ts +2 -2
- package/dist/builtins/device-manager/linked-devices-manual-backfill.d.ts +20 -9
- package/dist/builtins/device-manager/location-alignment.d.ts +46 -46
- package/dist/builtins/device-manager/migrate-device.d.ts +178 -101
- package/dist/builtins/device-manager/migrate-guard.d.ts +66 -34
- package/dist/builtins/device-manager/migrate-hardware-state.d.ts +59 -59
- package/dist/builtins/device-manager/migrate-reload.d.ts +42 -4
- package/dist/builtins/device-manager/migration-refused.d.ts +20 -20
- package/dist/builtins/device-manager/mirror-row-writer.d.ts +205 -179
- package/dist/builtins/device-manager/recording-onboard-config-schema.d.ts +56 -32
- package/dist/builtins/device-manager/removal-fence.d.ts +48 -48
- package/dist/builtins/device-manager/runtime-state-persist-gate.d.ts +54 -26
- package/dist/builtins/device-manager/secret-config-paths.d.ts +17 -17
- package/dist/builtins/device-manager/stale-wrapper-activations.d.ts +52 -25
- package/dist/builtins/device-manager/write-lock.d.ts +13 -13
- package/dist/builtins/hub-forwarder/hub-forwarder-destination.d.ts +41 -41
- package/dist/builtins/hub-forwarder/hub-forwarder.addon.d.ts +13 -12
- package/dist/builtins/hub-forwarder/index.d.ts +3 -3
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.d.ts +1 -1
- package/dist/builtins/keychain/index.js +3 -3
- package/dist/builtins/keychain/index.mjs +3 -3
- package/dist/builtins/keychain/key-sources.d.ts +19 -19
- package/dist/builtins/keychain/keychain-crypto.d.ts +4 -4
- package/dist/builtins/keychain/keychain-reset-trigger.d.ts +13 -13
- package/dist/builtins/keychain/keychain-service.d.ts +128 -128
- package/dist/builtins/keychain/keychain-store.d.ts +96 -87
- package/dist/builtins/keychain/keychain-usage.d.ts +13 -2
- package/dist/builtins/keychain/keychain.addon.d.ts +31 -6
- package/dist/builtins/keychain/platform-key-source.d.ts +15 -15
- package/dist/builtins/keychain/system-held-secrets.d.ts +17 -4
- package/dist/builtins/liveness-monitor/index.d.ts +2 -2
- package/dist/builtins/liveness-monitor/liveness-checks.d.ts +73 -52
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.d.ts +57 -36
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/admin-account-boot.d.ts +14 -14
- package/dist/builtins/local-auth/auth-config-reader.d.ts +34 -17
- package/dist/builtins/local-auth/auth-schema.d.ts +92 -69
- package/dist/builtins/local-auth/index.d.ts +1 -1
- package/dist/builtins/local-auth/jwt-signing-key-keeper.d.ts +22 -22
- package/dist/builtins/local-auth/local-auth.addon.d.ts +41 -40
- package/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/dist/builtins/local-auth/oauth-grants.d.ts +57 -57
- package/dist/builtins/local-auth/oauth-session-manager.d.ts +62 -62
- package/dist/builtins/local-network/address-book.d.ts +61 -36
- package/dist/builtins/local-network/index.d.ts +2 -2
- package/dist/builtins/local-network/ipv6-lan.d.ts +12 -17
- package/dist/builtins/local-network/local-hostname.d.ts +10 -10
- package/dist/builtins/local-network/local-network.addon.d.ts +259 -258
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.d.ts +4 -4
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/loki-logging/loki-destination.d.ts +113 -87
- package/dist/builtins/loki-logging/loki-logging.addon.d.ts +61 -42
- package/dist/builtins/loki-logging/loki-payload.d.ts +82 -39
- package/dist/builtins/loki-logging/retire-enabled-flag.d.ts +37 -12
- package/dist/builtins/native-metrics/cgroup-memory.d.ts +206 -159
- package/dist/builtins/native-metrics/cgroup-pids.d.ts +138 -91
- package/dist/builtins/native-metrics/container-memory-series.d.ts +212 -178
- package/dist/builtins/native-metrics/gpu-probe.d.ts +9 -9
- package/dist/builtins/native-metrics/index.d.ts +2 -2
- package/dist/builtins/native-metrics/load-series-config.d.ts +29 -57
- package/dist/builtins/native-metrics/load-series-reader.d.ts +52 -26
- package/dist/builtins/native-metrics/load-series-store.d.ts +237 -176
- package/dist/builtins/native-metrics/native-metrics-provider.d.ts +43 -43
- package/dist/builtins/native-metrics/native-metrics.addon.d.ts +230 -230
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/native-metrics/node-load-ring.d.ts +196 -196
- package/dist/builtins/native-metrics/proc-process-table.d.ts +12 -12
- package/dist/builtins/native-metrics/process-classification.d.ts +95 -36
- package/dist/builtins/native-metrics/thread-cpu-sampler.d.ts +95 -95
- package/dist/builtins/platform-probe/amd-accelerators.d.ts +15 -0
- package/dist/builtins/platform-probe/amd-npu.d.ts +29 -0
- package/dist/builtins/platform-probe/coral-accelerators.d.ts +17 -17
- package/dist/builtins/platform-probe/index.d.ts +38 -30
- package/dist/builtins/platform-probe/index.js +59 -22
- package/dist/builtins/platform-probe/index.mjs +59 -22
- package/dist/builtins/platform-probe/inference-config-resolver.d.ts +27 -27
- package/dist/builtins/platform-probe/intel-accelerators.d.ts +8 -8
- package/dist/builtins/platform-probe/intel-npu.d.ts +30 -30
- package/dist/builtins/platform-probe/platform-scorer.d.ts +35 -35
- package/dist/builtins/platform-probe/runtime-packages.d.ts +3 -3
- package/dist/builtins/remote-access-orchestrator/enabled-providers-reconcile.d.ts +87 -87
- package/dist/builtins/remote-access-orchestrator/index.d.ts +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.d.ts +66 -35
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/shared/device-state-changed.d.ts +9 -9
- package/dist/builtins/shared/settle-sources.d.ts +16 -16
- package/dist/builtins/snapshot/index.d.ts +2 -2
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/snapshot/snapshot-cache.d.ts +92 -92
- package/dist/builtins/snapshot/snapshot-coalescing.d.ts +108 -108
- package/dist/builtins/snapshot/snapshot-courtesy.d.ts +48 -48
- package/dist/builtins/snapshot/snapshot-durable-store.d.ts +32 -32
- package/dist/builtins/snapshot/snapshot-fatigue.d.ts +34 -34
- package/dist/builtins/snapshot/snapshot-grab-pick.d.ts +14 -14
- package/dist/builtins/snapshot/snapshot-link-url.d.ts +49 -49
- package/dist/builtins/snapshot/snapshot-media-handler.d.ts +97 -97
- package/dist/builtins/snapshot/snapshot-resize.d.ts +64 -103
- package/dist/builtins/snapshot/snapshot.addon.d.ts +569 -568
- package/dist/builtins/sqlite-storage/analyze-stats.d.ts +73 -29
- package/dist/builtins/sqlite-storage/config-store.d.ts +6 -6
- package/dist/builtins/sqlite-storage/device-store.d.ts +16 -16
- package/dist/builtins/sqlite-storage/filesystem-browse-provider.d.ts +23 -23
- package/dist/builtins/sqlite-storage/filesystem-storage-provider.d.ts +79 -79
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.d.ts +27 -26
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/filter-compiler.d.ts +107 -107
- package/dist/builtins/sqlite-storage/index.d.ts +12 -12
- package/dist/builtins/sqlite-storage/integration-registry.d.ts +37 -37
- package/dist/builtins/sqlite-storage/path-guard.d.ts +5 -5
- package/dist/builtins/sqlite-storage/prefix-range.d.ts +44 -44
- package/dist/builtins/sqlite-storage/query-bounds.d.ts +100 -106
- package/dist/builtins/sqlite-storage/query-profiler.d.ts +217 -217
- package/dist/builtins/sqlite-storage/retired-collections.d.ts +124 -55
- package/dist/builtins/sqlite-storage/retired-settings-keys.d.ts +239 -189
- package/dist/builtins/sqlite-storage/shm-lock-canary.d.ts +41 -41
- package/dist/builtins/sqlite-storage/sqlite-pragmas.d.ts +162 -162
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +458 -458
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +59 -58
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/sqlite-storage/sqlite-snapshot-protocol.d.ts +37 -32
- package/dist/builtins/sqlite-storage/sqlite-snapshot-worker.d.ts +19 -19
- package/dist/builtins/sqlite-storage/sqlite-snapshotter.d.ts +76 -76
- package/dist/builtins/sqlite-storage/statement-shape.d.ts +54 -54
- package/dist/builtins/sqlite-storage/table-sizes.d.ts +71 -71
- package/dist/builtins/sqlite-storage/vector-index-shared.d.ts +63 -54
- package/dist/builtins/sqlite-storage/vector-index-vec.d.ts +133 -96
- package/dist/builtins/sqlite-storage/wal-checkpoint-policy.d.ts +161 -161
- package/dist/builtins/sqlite-storage/wal-checkpointer.d.ts +60 -60
- package/dist/builtins/sqlite-storage/wal-maintenance.d.ts +94 -94
- package/dist/builtins/storage-orchestrator/access-guards.d.ts +37 -26
- package/dist/builtins/storage-orchestrator/data-store-dispatch.d.ts +33 -18
- package/dist/builtins/storage-orchestrator/drain-ratchet.d.ts +85 -85
- package/dist/builtins/storage-orchestrator/drain-state-store.d.ts +20 -10
- package/dist/builtins/storage-orchestrator/hub-settings-forward.d.ts +113 -53
- package/dist/builtins/storage-orchestrator/index.d.ts +7 -7
- package/dist/builtins/storage-orchestrator/location-occupancy-slice.d.ts +64 -40
- package/dist/builtins/storage-orchestrator/location-occupancy.d.ts +14 -14
- package/dist/builtins/storage-orchestrator/location-protection.d.ts +13 -13
- package/dist/builtins/storage-orchestrator/location-repoint-move.d.ts +44 -44
- package/dist/builtins/storage-orchestrator/location-root-collision.d.ts +61 -25
- package/dist/builtins/storage-orchestrator/location-secrets.d.ts +99 -58
- package/dist/builtins/storage-orchestrator/location-store.d.ts +56 -47
- package/dist/builtins/storage-orchestrator/location-volume-capacity.d.ts +37 -37
- package/dist/builtins/storage-orchestrator/provider-discovery.d.ts +20 -6
- package/dist/builtins/storage-orchestrator/storage-cleanup-coordinator.d.ts +51 -51
- package/dist/builtins/storage-orchestrator/storage-migration-coordinator.d.ts +224 -224
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +292 -292
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +431 -450
- package/dist/builtins/storage-orchestrator/storage-pressure-manager.d.ts +104 -104
- package/dist/builtins/system-backup/backup-encryption.d.ts +60 -23
- package/dist/builtins/system-backup/system-backup.service.d.ts +240 -240
- package/dist/builtins/system-config/cluster-secret-keeper.d.ts +54 -34
- package/dist/builtins/system-config/index.d.ts +2 -2
- package/dist/builtins/system-config/mesh-actions.d.ts +2 -30
- package/dist/builtins/system-config/system-config.addon.d.ts +57 -100
- package/dist/builtins/system-config/system-config.addon.js +39 -35
- package/dist/builtins/system-config/system-config.addon.mjs +320 -316
- package/dist/builtins/winston-logging/index.d.ts +3 -3
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/builtins/winston-logging/winston-destination.d.ts +15 -15
- package/dist/builtins/winston-logging/winston-logging.addon.d.ts +14 -13
- package/dist/{child-cap-dispatch-nURMuVTX.js → child-cap-dispatch-Nx-lrlHR.js} +19 -1
- package/dist/{child-cap-dispatch-B1gyE35b.mjs → child-cap-dispatch-x-onDDiV.mjs} +2 -2
- package/dist/{composition-sources-wdAxs-uY.js → composition-sources-LUJsW0AQ.js} +1 -1
- package/dist/{composition-sources-xqhm2Ygr.mjs → composition-sources-R8TskGSV.mjs} +1 -1
- package/dist/{constants-Ca-Sgcl8.js → constants-D4lxxip7.js} +1 -1
- package/dist/{constants-D5z4EwY8.mjs → constants-DMvAcbbP.mjs} +1 -1
- package/dist/{dist-8LQ4lDEB.js → dist-XTkzsnz-.js} +35 -1
- package/dist/{dist-Biqn3TEn.mjs → dist-byg8IP4Q.mjs} +35 -1
- package/dist/download/hosted-model-revisions.d.ts +8 -8
- package/dist/download/model-download-service.d.ts +32 -32
- package/dist/download/model-downloader.d.ts +88 -88
- package/dist/{event-loop-stall-monitor-CNj73d4D.js → event-loop-stall-monitor-DPFghEFw.js} +1 -1
- package/dist/{event-loop-stall-monitor-BtK_0Pjc.mjs → event-loop-stall-monitor-TG8UcdY2.mjs} +1 -1
- package/dist/events/event-bus.d.ts +6 -6
- package/dist/events/system-event-bus.d.ts +11 -11
- package/dist/feature/feature-manager.d.ts +6 -6
- package/dist/http/asset-compression.d.ts +35 -73
- package/dist/http/authenticated-file-server.d.ts +32 -32
- package/dist/http/data-plane-registry.d.ts +49 -39
- package/dist/http/file-data-plane.d.ts +14 -14
- package/dist/http/lan-http-bind.d.ts +24 -13
- package/dist/http/reverse-proxy.d.ts +36 -24
- package/dist/index.d.ts +137 -137
- package/dist/index.js +9 -8
- package/dist/index.mjs +7 -9
- package/dist/{jwt-signing-key-DxV2ucvJ.js → jwt-signing-key-CD87HrHH.js} +1 -1
- package/dist/{jwt-signing-key-SnDgvVUQ.mjs → jwt-signing-key-DNBxSN5p.mjs} +1 -1
- package/dist/kernel/addon-class-resolver.d.ts +1 -1
- package/dist/kernel/addon-engine-manager.d.ts +20 -20
- package/dist/kernel/addon-health-monitor.d.ts +151 -151
- package/dist/kernel/addon-installer.d.ts +609 -609
- package/dist/kernel/addon-loader.d.ts +133 -133
- package/dist/kernel/addon-manifest.d.ts +118 -118
- package/dist/kernel/addon-residue.d.ts +28 -32
- package/dist/kernel/array-buffer-census.d.ts +84 -88
- package/dist/kernel/bootstrap-config.d.ts +3 -3
- package/dist/kernel/cap-router-builder.d.ts +145 -101
- package/dist/kernel/capability-handle.d.ts +41 -41
- package/dist/kernel/capability-registry.d.ts +588 -576
- package/dist/kernel/config-manager.d.ts +199 -199
- package/dist/kernel/config-schema.d.ts +132 -128
- package/dist/kernel/custom-action-registry.d.ts +25 -25
- package/dist/kernel/deps/addon-deps-manager.d.ts +17 -17
- package/dist/kernel/deps/closure-dedupe.d.ts +76 -76
- package/dist/kernel/deps/ensure-addon-natives.d.ts +34 -34
- package/dist/kernel/deps/ensure-native-prebuilds.d.ts +25 -25
- package/dist/kernel/deps/manifest-native-deps.d.ts +38 -38
- package/dist/kernel/deps/manifest-python-deps.d.ts +18 -18
- package/dist/kernel/deps/manifest-system-deps.d.ts +13 -13
- package/dist/kernel/deps/npm-command.d.ts +45 -45
- package/dist/kernel/deps/system-package-allowlist.d.ts +9 -9
- package/dist/kernel/deps/system-package-broker.d.ts +20 -20
- package/dist/kernel/deps/system-package-client.d.ts +3 -3
- package/dist/kernel/device-registry.d.ts +27 -27
- package/dist/kernel/event-loop-stall-monitor.d.ts +33 -33
- package/dist/kernel/event-plane-report.d.ts +174 -174
- package/dist/kernel/fs-utils.d.ts +70 -70
- package/dist/kernel/gc-census.d.ts +119 -119
- package/dist/kernel/heap-spaces.d.ts +87 -87
- package/dist/kernel/heap-watch.d.ts +706 -706
- package/dist/kernel/host-externals.d.ts +8 -8
- package/dist/kernel/hwaccel/hwaccel-resolver.d.ts +27 -27
- package/dist/kernel/index.d.ts +115 -113
- package/dist/kernel/inference/inference-resolver.d.ts +13 -13
- package/dist/kernel/infra-capabilities.d.ts +7 -7
- package/dist/kernel/isolated-builtin-phase.d.ts +42 -42
- package/dist/kernel/lifecycle/job-journal.d.ts +17 -17
- package/dist/kernel/lifecycle/lifecycle-job-engine.d.ts +99 -99
- package/dist/kernel/lifecycle/staging-area.d.ts +22 -22
- package/dist/kernel/moleculer/addon-context-factory.d.ts +90 -89
- package/dist/kernel/moleculer/addon-data-plane-facility.d.ts +12 -12
- package/dist/kernel/moleculer/addon-deploy-source.d.ts +11 -11
- package/dist/kernel/moleculer/addon-peer-bytes-facility.d.ts +18 -18
- package/dist/kernel/moleculer/addon-service-factory.d.ts +41 -41
- package/dist/kernel/moleculer/agent-mesh-authenticator.d.ts +60 -33
- package/dist/kernel/moleculer/agent-ui-unlock.d.ts +30 -30
- package/dist/kernel/moleculer/broker-factory.d.ts +61 -61
- package/dist/kernel/moleculer/cap-usage-registry.d.ts +108 -153
- package/dist/kernel/moleculer/capabilities-access.d.ts +19 -19
- package/dist/kernel/moleculer/child-addon-call-dispatch.d.ts +43 -43
- package/dist/kernel/moleculer/child-cap-descriptors.d.ts +26 -26
- package/dist/kernel/moleculer/child-cap-dispatch.d.ts +52 -52
- package/dist/kernel/moleculer/children-batch-loader.d.ts +86 -34
- package/dist/kernel/moleculer/cluster-secret.d.ts +19 -19
- package/dist/kernel/moleculer/core-cap-service.d.ts +53 -53
- package/dist/kernel/moleculer/crash-supervisor.d.ts +39 -39
- package/dist/kernel/moleculer/device-cap-proxy.d.ts +51 -51
- package/dist/kernel/moleculer/device-event-ring.d.ts +117 -75
- package/dist/kernel/moleculer/event-bus-core.d.ts +171 -159
- package/dist/kernel/moleculer/event-bus.d.ts +73 -73
- package/dist/kernel/moleculer/hub-log-forwarder.d.ts +30 -30
- package/dist/kernel/moleculer/hub-service.d.ts +42 -42
- package/dist/kernel/moleculer/init-watchdog.d.ts +49 -49
- package/dist/kernel/moleculer/mesh-access-middleware.d.ts +36 -21
- package/dist/kernel/moleculer/mesh-auth-mode.d.ts +33 -39
- package/dist/kernel/moleculer/mesh-authenticator.d.ts +58 -58
- package/dist/kernel/moleculer/mesh-auto-enforce.d.ts +38 -18
- package/dist/kernel/moleculer/mesh-join-client.d.ts +67 -45
- package/dist/kernel/moleculer/mesh-join-proof.d.ts +8 -8
- package/dist/kernel/moleculer/mesh-mtls/constants.d.ts +1 -1
- package/dist/kernel/moleculer/mesh-mtls/index.d.ts +10 -10
- package/dist/kernel/moleculer/mesh-mtls/mesh-ca-keeper.d.ts +43 -38
- package/dist/kernel/moleculer/mesh-mtls/mesh-ca.d.ts +29 -20
- package/dist/kernel/moleculer/mesh-mtls/mesh-clear-port.d.ts +32 -32
- package/dist/kernel/moleculer/mesh-mtls/mesh-crl.d.ts +11 -11
- package/dist/kernel/moleculer/mesh-mtls/mesh-enroll.d.ts +19 -16
- package/dist/kernel/moleculer/mesh-mtls/mesh-join-token.d.ts +40 -40
- package/dist/kernel/moleculer/mesh-mtls/mesh-tls-enabler.d.ts +5 -1
- package/dist/kernel/moleculer/mesh-mtls/tls-tcp-transporter.d.ts +131 -130
- package/dist/kernel/moleculer/mesh-queue-report.d.ts +39 -39
- package/dist/kernel/moleculer/node-registry.d.ts +120 -120
- package/dist/kernel/moleculer/process-context.d.ts +2 -2
- package/dist/kernel/moleculer/process-service.d.ts +168 -168
- package/dist/kernel/moleculer/provider-registry.d.ts +9 -9
- package/dist/kernel/moleculer/readiness-context.d.ts +58 -58
- package/dist/kernel/moleculer/readiness-service.d.ts +31 -16
- package/dist/kernel/moleculer/register-framework-resolver.d.ts +6 -6
- package/dist/kernel/moleculer/register-node-client.d.ts +34 -27
- package/dist/kernel/moleculer/remote-logger.d.ts +29 -29
- package/dist/kernel/moleculer/resilient-cap-call.d.ts +21 -21
- package/dist/kernel/moleculer/runner-native-allocator.d.ts +95 -95
- package/dist/kernel/moleculer/runner-process-group.d.ts +57 -57
- package/dist/kernel/moleculer/runtime-state-load.d.ts +21 -11
- package/dist/kernel/moleculer/settings-read-guard.d.ts +39 -39
- package/dist/kernel/moleculer/stream-probe-service.d.ts +25 -6
- package/dist/kernel/moleculer/trpc-links.d.ts +203 -203
- package/dist/kernel/moleculer/typed-array-serde.d.ts +9 -20
- package/dist/kernel/moleculer/worker-device-restore.d.ts +8 -8
- package/dist/kernel/outbound-queue-watch.d.ts +74 -74
- package/dist/kernel/process-cpu-census.d.ts +55 -55
- package/dist/kernel/provider-kind-drift.d.ts +17 -8
- package/dist/kernel/restart-coordinator.d.ts +71 -71
- package/dist/kernel/settings-door-view.d.ts +36 -25
- package/dist/kernel/settings-read-error.d.ts +29 -31
- package/dist/kernel/settings-view-types.d.ts +100 -95
- package/dist/kernel/socket-plane-report.d.ts +214 -153
- package/dist/kernel/status-overlay.d.ts +31 -11
- package/dist/kernel/storage-location-registry.d.ts +50 -50
- package/dist/kernel/store-settings-view.d.ts +13 -13
- package/dist/kernel/system-settings-mirror.d.ts +40 -28
- package/dist/kernel/system-settings-policy.d.ts +15 -34
- package/dist/kernel/transport/cap-action-census.d.ts +183 -183
- package/dist/kernel/transport/cap-action-name.d.ts +84 -84
- package/dist/kernel/transport/cap-child-index.d.ts +41 -41
- package/dist/kernel/transport/cap-route-resolver.d.ts +237 -212
- package/dist/kernel/transport/cap-route.d.ts +139 -139
- package/dist/kernel/transport/cap-routing-hints.d.ts +37 -37
- package/dist/kernel/transport/child-cap-protocol.d.ts +245 -245
- package/dist/kernel/transport/claimed-get-status.d.ts +30 -6
- package/dist/kernel/transport/create-local-transport.d.ts +5 -5
- package/dist/kernel/transport/frame-codec.d.ts +109 -109
- package/dist/kernel/transport/hub-cap-forward.d.ts +81 -59
- package/dist/kernel/transport/index.d.ts +36 -36
- package/dist/kernel/transport/local-child-client.d.ts +184 -184
- package/dist/kernel/transport/local-child-registry.d.ts +592 -592
- package/dist/kernel/transport/local-endpoint-path.d.ts +4 -4
- package/dist/kernel/transport/local-transport.d.ts +92 -92
- package/dist/kernel/transport/parent-unowned-call.d.ts +266 -237
- package/dist/kernel/transport/peer-answered-error.d.ts +14 -14
- package/dist/kernel/transport/socket-channel.d.ts +110 -110
- package/dist/kernel/transport/socket-traffic.d.ts +96 -96
- package/dist/kernel/transport/uds-event-bridge.d.ts +77 -50
- package/dist/kernel/transport/uds-event-bus.d.ts +75 -26
- package/dist/kernel/transport/uds-local-transport.d.ts +14 -14
- package/dist/kernel/transport/uds-log-ingest.d.ts +38 -23
- package/dist/kernel/transport/uds-logger.d.ts +33 -33
- package/dist/kernel/utils/ring-buffer.d.ts +12 -12
- package/dist/kernel/workspace-detect.d.ts +7 -7
- package/dist/lifecycle/lifecycle-state-machine.d.ts +24 -24
- package/dist/logging/formatter.d.ts +52 -25
- package/dist/logging/log-manager.d.ts +133 -133
- package/dist/logging/log-redactor.d.ts +22 -1
- package/dist/logging/log-ring-buffer.d.ts +57 -57
- package/dist/logging/logging-gate.d.ts +69 -25
- package/dist/logging/logging-gate.singleton.d.ts +12 -1
- package/dist/logging/partitioned-log-buffer.d.ts +161 -161
- package/dist/logging/scoped-logger.d.ts +14 -14
- package/dist/network/network-quality.d.ts +8 -8
- package/dist/notification/notification-service.d.ts +37 -37
- package/dist/notification/toast-service.d.ts +18 -18
- package/dist/pipeline/engine-manager-resolver.d.ts +12 -12
- package/dist/pipeline/pipeline-runner.d.ts +6 -6
- package/dist/pipeline/pipeline-validator.d.ts +8 -8
- package/dist/process/proc-stat.d.ts +51 -51
- package/dist/process/resource-monitor.d.ts +19 -19
- package/dist/python/python-env-manager.d.ts +10 -10
- package/dist/repl/interfaces.d.ts +21 -21
- package/dist/repl/repl-engine.d.ts +6 -6
- package/dist/{restore-archive-D4cmLoNe.mjs → restore-archive-Bmmmyp1M.mjs} +81 -81
- package/dist/{restore-archive-Do_Yu5rC.js → restore-archive-bvYTsnvp.js} +1 -1
- package/dist/{retired-settings-keys-BsgVxh8-.mjs → retired-settings-keys-R9CBo2lY.mjs} +1 -1
- package/dist/{retired-settings-keys-Cyn3OD0K.js → retired-settings-keys-V0yq5Bm6.js} +1 -1
- package/dist/storage/fs-storage-backend.d.ts +35 -35
- package/dist/storage/storage-location-manager.d.ts +21 -21
- package/dist/storage/storage-manager.d.ts +68 -68
- package/dist/tls/boot-tls.d.ts +24 -24
- package/dist/tls/cert-evaluation.d.ts +25 -25
- package/dist/tls/cert-identity.d.ts +39 -39
- package/dist/tls/cert-issue.d.ts +37 -17
- package/dist/tls/cert-manager.d.ts +86 -84
- package/dist/tls/https-listener.d.ts +16 -16
- package/dist/tls/index.d.ts +8 -8
- package/dist/tls/tls-actions.d.ts +18 -18
- package/dist/tls/tls-status.d.ts +15 -15
- package/dist/tls/uploaded-cert.d.ts +9 -9
- package/package.json +9 -3
|
@@ -1,621 +1,621 @@
|
|
|
1
|
-
import { IReadinessRegistryRecord, SystemEvent } from
|
|
2
|
-
import { CapUsageCallRecord } from
|
|
3
|
-
import { CapActionReading } from
|
|
4
|
-
import { CapRoutingHints } from
|
|
5
|
-
import { ClaimedStatusResolver } from
|
|
6
|
-
import { AddonCallInput, CapCallInput, ChildLogMessage, RegisteredChild } from
|
|
7
|
-
import { LocalTransportServer } from
|
|
8
|
-
import { SocketTrafficSample } from
|
|
1
|
+
import { type IReadinessRegistryRecord, type SystemEvent } from "@camstack/types";
|
|
2
|
+
import type { CapUsageCallRecord } from "../moleculer/cap-usage-registry.js";
|
|
3
|
+
import { type CapActionReading } from "./cap-action-census.js";
|
|
4
|
+
import { type CapRoutingHints } from "./cap-routing-hints.js";
|
|
5
|
+
import type { ClaimedStatusResolver } from "../status-overlay.js";
|
|
6
|
+
import type { AddonCallInput, CapCallInput, ChildLogMessage, RegisteredChild } from "./child-cap-protocol.js";
|
|
7
|
+
import type { LocalTransportServer } from "./local-transport.js";
|
|
8
|
+
import type { SocketTrafficSample } from "./socket-traffic.js";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
* How many child `cap-call-out`s this parent forwarded WITHOUT reading their
|
|
11
|
+
* args (`raw`) against how many it decoded (`decoded`: an inline-args frame,
|
|
12
|
+
* a target that cannot take a payload, or a call that left the sibling path
|
|
13
|
+
* for `onUnownedCall`). Cumulative; the heartbeat reports the window.
|
|
14
|
+
*
|
|
15
|
+
* It exists because raw-forward makes the parent blind to the bytes on
|
|
16
|
+
* purpose, and the one thing it must not be blind to is how often that
|
|
17
|
+
* happens. A plane that says "raw=0" under load is a plane where the
|
|
18
|
+
* negotiation failed, and nothing else would show it.
|
|
19
|
+
*/
|
|
20
20
|
export interface ForwardCensus {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
readonly raw: number;
|
|
22
|
+
readonly decoded: number;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
* Peer id the action census charges frames that arrived before `register`.
|
|
26
|
+
*
|
|
27
|
+
* One frame per connection, and it is named rather than dropped: a census is
|
|
28
|
+
* only worth its coverage, and coverage you cannot see is coverage you cannot
|
|
29
|
+
* check.
|
|
30
|
+
*/
|
|
31
31
|
export declare const PRE_REGISTER_PEER_ID = "(pre-register)";
|
|
32
32
|
/** Per-child event fan-out counters (sent = delivered, suppressed = gated/would-gate). */
|
|
33
33
|
export interface ChildEventStats {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
sent: number;
|
|
35
|
+
suppressed: number;
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
38
|
+
* D467 — one PRODUCED category over the life of the process.
|
|
39
|
+
*
|
|
40
|
+
* `broadcasts` counts emits, not deliveries: one call to
|
|
41
|
+
* {@link LocalChildRegistry.broadcastEventToChildren} is one broadcast no
|
|
42
|
+
* matter how many children are connected. This is the number the per-child
|
|
43
|
+
* `sent`/`suppressed` counters cannot give — those are (event × child) pairs,
|
|
44
|
+
* so on a 39-child node they read ~38x the production rate and a reader who
|
|
45
|
+
* sums them concludes the cluster emits an order of magnitude more than it does.
|
|
46
|
+
*
|
|
47
|
+
* `wanted` is the number of (event × child) pairs whose SUBSCRIPTION matched —
|
|
48
|
+
* the gate answer, which is also the delivery answer. `wanted === 0` over a window means
|
|
49
|
+
* the category was serialised and walked across every child and **nobody asked
|
|
50
|
+
* for it**: pure waste, and the one finding worth acting on.
|
|
51
|
+
*/
|
|
52
52
|
export interface CategoryFanoutSample {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
readonly category: string;
|
|
54
|
+
readonly broadcasts: number;
|
|
55
|
+
readonly wanted: number;
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
58
|
+
* Cap on the census map. `EventCategory` is a closed enum of ~120 members, so
|
|
59
|
+
* 256 holds every legitimate category twice over; the cap exists because a
|
|
60
|
+
* hand-rolled topic (forbidden, but this is the meter that would SEE one) could
|
|
61
|
+
* otherwise grow the map without bound in a long-lived process. Overflow is not
|
|
62
|
+
* silent — {@link LocalChildRegistry.categoryCensusOverflow} counts it and the
|
|
63
|
+
* heartbeat prints it.
|
|
64
|
+
*/
|
|
65
65
|
export declare const CATEGORY_CENSUS_MAX = 256;
|
|
66
66
|
/**
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
* Sentinel prefix used in the no-route error thrown when `cap-call-out` has no
|
|
68
|
+
* local sibling and no `onUnownedCall` fallback. `ipcParentLink` detects this
|
|
69
|
+
* prefix to distinguish routing failures (safe to retry via broker) from real
|
|
70
|
+
* provider errors (must NOT retry to avoid double-executing side effects).
|
|
71
|
+
*/
|
|
72
72
|
export declare const UDS_NO_ROUTE_PREFIX = "UDS_NO_ROUTE";
|
|
73
73
|
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
* Minimal logger interface accepted by `LocalChildRegistry`.
|
|
75
|
+
* Kept narrow so the registry doesn't depend on any concrete logger class.
|
|
76
|
+
*/
|
|
77
77
|
export interface LocalChildRegistryLogger {
|
|
78
|
-
|
|
78
|
+
info(msg: string, meta?: unknown): void;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
* Options accepted by `LocalChildRegistry`.
|
|
82
|
+
* The `server` field is the UDS server to listen on.
|
|
83
|
+
* The optional `onUnownedCall` is the parent-supplied fallback invoked when no
|
|
84
|
+
* local child owns the requested cap (the hub / agent will wire this to the
|
|
85
|
+
* cluster CapabilityRegistry).
|
|
86
|
+
* The optional `logger` receives a single deduplicated INFO line the first time
|
|
87
|
+
* each capName is routed child→sibling over UDS.
|
|
88
|
+
*/
|
|
89
89
|
/**
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
* Where the registry says that a runner came up or went away — the parent's
|
|
91
|
+
* kernel bus. A forked runner has no Moleculer broker (Phase F), so
|
|
92
|
+
* `$node.connected` never fires for it and the Moleculer-side emitter
|
|
93
|
+
* (`agent-registry.service.ts`) never sees one: this registry is the only place
|
|
94
|
+
* that knows (fix round 1 of the 2026-10-02 motion-release-order work, C1).
|
|
95
|
+
*/
|
|
96
96
|
export interface ChildLifecycleEvents {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
97
|
+
/** This parent's node id (`'hub'`, or the bare agent id): the `<node>` of `<node>/<childId>`. */
|
|
98
|
+
readonly parentNodeId: () => string;
|
|
99
|
+
/** The parent's kernel bus `emit`. Telemetry (D8): a consumer must survive a dropped event. */
|
|
100
|
+
readonly emit: (event: SystemEvent) => void;
|
|
101
|
+
/**
|
|
102
|
+
* After `WorkerOnline` is emitted and before the pre-init register is acked.
|
|
103
|
+
* Production omits this and the registry uses {@link afterWorkerOnlineAnnounce}.
|
|
104
|
+
* Tests inject a seam so dropping the await turns the lifecycle spec red.
|
|
105
|
+
*/
|
|
106
|
+
readonly afterOnlineAnnounce?: () => Promise<void>;
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
109
|
+
* One event-loop turn after `WorkerOnline` before the child's register is acked.
|
|
110
|
+
* Gives a UDS sibling that already holds the frame (the orchestrator provider
|
|
111
|
+
* gate) a turn to close its cameras before the child loads addons.
|
|
112
|
+
*/
|
|
113
113
|
export declare function afterWorkerOnlineAnnounce(): Promise<void>;
|
|
114
114
|
export interface LocalChildRegistryOptions {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
115
|
+
readonly server: LocalTransportServer;
|
|
116
|
+
/**
|
|
117
|
+
* Emit `WorkerOnline { workerId: '<parent>/<childId>' }` at a new
|
|
118
|
+
* incarnation's FIRST register — the pre-init frame `LocalChildClient.start()`
|
|
119
|
+
* sends before any addon module is loaded, so before `initialize()` and any
|
|
120
|
+
* device restore; it is emitted, then one event-loop turn is yielded, before
|
|
121
|
+
* that frame is acked — so a UDS consumer (the motion-slice provider gate)
|
|
122
|
+
* already has the frame in its socket and one turn to close the gate before
|
|
123
|
+
* the child proceeds to load — and `WorkerOffline` when the LIVE connection
|
|
124
|
+
* closes (never for a superseded one). Omitted: nothing is emitted.
|
|
125
|
+
*/
|
|
126
|
+
readonly lifecycleEvents?: ChildLifecycleEvents;
|
|
127
|
+
readonly onUnownedCall?: (input: CapCallInput) => Promise<unknown>;
|
|
128
|
+
readonly logger?: LocalChildRegistryLogger;
|
|
129
|
+
/**
|
|
130
|
+
* Resolver for the operator's active-singleton preference. When two or
|
|
131
|
+
* more local children register the SAME singleton capName (e.g. two
|
|
132
|
+
* addons both providing `webrtc-session`), the registry must consult
|
|
133
|
+
* `CapabilityRegistry` to pick the operator-selected provider instead of
|
|
134
|
+
* returning the first-registered child by insertion order. Returns the preferred
|
|
135
|
+
* addonId (== childId for solo-addon runners), or null when no
|
|
136
|
+
* preference is set or the cap is not a singleton.
|
|
137
|
+
*/
|
|
138
|
+
readonly getActiveSingletonAddonId?: (capName: string) => string | null;
|
|
139
|
+
/**
|
|
140
|
+
* Resolve an addonId to its runner/child id — the addon's
|
|
141
|
+
* `execution.group` when it declares one, else the addon id itself
|
|
142
|
+
* (`resolveRunnerId`). Needed so the active-singleton preference (which
|
|
143
|
+
* is expressed as an addonId) can be matched against the registry's
|
|
144
|
+
* candidate CHILD ids: a grouped addon's child id is the group name, not
|
|
145
|
+
* its own id. Omitted → identity (addonId === childId), preserving the
|
|
146
|
+
* solo-runner behaviour for every ungrouped addon.
|
|
147
|
+
*/
|
|
148
|
+
readonly resolveChildIdForAddon?: (addonId: string) => string;
|
|
149
|
+
/**
|
|
150
|
+
* This node's own Moleculer nodeId (`'hub'` on the hub, the bare agent id on
|
|
151
|
+
* an agent). Used ONLY to decide whether an explicit per-call `nodeId` pin
|
|
152
|
+
* bypasses the local-sibling short-circuit in the `cap-call-out` path:
|
|
153
|
+
* - a pin naming THIS node is satisfied by a co-resident sibling (the pin's
|
|
154
|
+
* target lives here), so it routes locally exactly like an unpinned call;
|
|
155
|
+
* - a pin naming ANOTHER node bypasses the sibling and reaches
|
|
156
|
+
* `onUnownedCall` (so it is never silently answered by a same-named
|
|
157
|
+
* provider on the wrong node).
|
|
158
|
+
*
|
|
159
|
+
* Omitted (legacy / positional construction) ⇒ prior behaviour EXACTLY: any
|
|
160
|
+
* pin bypasses the local sibling — without this node's id the registry cannot
|
|
161
|
+
* distinguish a pin-to-self from a pin-to-another-node.
|
|
162
|
+
*/
|
|
163
|
+
readonly ownNodeId?: string;
|
|
164
|
+
/**
|
|
165
|
+
* Does `(capName, method)` name a `mode:'collection'` array method whose
|
|
166
|
+
* contract is the UNION across every provider? Such a call must NOT be
|
|
167
|
+
* short-circuited to a local sibling: `resolveChildId` picks ONE provider
|
|
168
|
+
* (first-registered, or the singleton preference — meaningless here), so the
|
|
169
|
+
* caller would see a fraction of the catalog the hub's own tRPC router
|
|
170
|
+
* returns. It goes to `onUnownedCall`, which owns the aggregate over local
|
|
171
|
+
* siblings, in-process providers and remote nodes alike.
|
|
172
|
+
*
|
|
173
|
+
* `notification-output` has three provider siblings; the Notification Center
|
|
174
|
+
* landed on one holding no targets, read the empty list as "target deleted"
|
|
175
|
+
* and permanently dead-lettered every notification it ever produced
|
|
176
|
+
* (2026-07-30). Omitted ⇒ prior behaviour exactly (sibling short-circuit for
|
|
177
|
+
* everything). The kernel has no cap registry, so the wiring side injects it.
|
|
178
|
+
*/
|
|
179
|
+
readonly isAggregatedCollectionMethod?: (capName: string, method: string) => boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Does this call carry an explicit `{ addonId }` selector naming the provider
|
|
182
|
+
* it wants? Such a call must NOT be short-circuited to a local sibling
|
|
183
|
+
* either: `resolveChildId` picks the FIRST-registered child for the cap name,
|
|
184
|
+
* which is the one thing the caller took the trouble to say it did not want.
|
|
185
|
+
* It goes to `onUnownedCall`, which resolves the named provider.
|
|
186
|
+
*
|
|
187
|
+
* The third argument is the call's ROUTING HINTS (`{ nodeId?, addonId? }`,
|
|
188
|
+
* `cap-routing-hints.ts`) — the two top-level string fields the parent ever
|
|
189
|
+
* read out of the args — not the args themselves. Under raw-forward the
|
|
190
|
+
* parent does not decode the args at all; the sender lifts the hints, and
|
|
191
|
+
* for a legacy frame the parent lifts them itself. Both modes reach this
|
|
192
|
+
* predicate with the same shape.
|
|
193
|
+
*
|
|
194
|
+
* The array-method bypass above and this one are the same defect seen twice.
|
|
195
|
+
* `broker.getBrokerConfig({id:'ha_001', addonId:'provider-homeassistant'})`
|
|
196
|
+
* from the Home Assistant export was answered by `provider-homematic` — which
|
|
197
|
+
* returns `null` for a broker it does not own, indistinguishable from "no
|
|
198
|
+
* such broker" — so the export could never open a link. Fixing only
|
|
199
|
+
* `onUnownedCall` did nothing, because this decision is made first: measured
|
|
200
|
+
* on the live hub with a deliberately bogus addonId, which came back `null`
|
|
201
|
+
* instead of refused (2026-08-09, [D105]).
|
|
202
|
+
*
|
|
203
|
+
* Omitted ⇒ prior behaviour exactly. The kernel has no cap registry, so the
|
|
204
|
+
* wiring side injects it, sharing the predicate with the handler that then
|
|
205
|
+
* performs the routing — a rule implemented twice is a rule that drifts.
|
|
206
|
+
*/
|
|
207
|
+
readonly isAddonPinnedCall?: (capName: string, method: string, hints: CapRoutingHints) => boolean;
|
|
208
|
+
/**
|
|
209
|
+
* The hub's claim authority for a device-scoped `getStatus` (D663, ruling
|
|
210
|
+
* S3) — fifth member of the "an explicit intent must win over a co-located
|
|
211
|
+
* provider" family. A `getStatus` about a device whose cap is CLAIMED is
|
|
212
|
+
* answered HERE, from the hub mirror's merged slice, before `resolveChildId`
|
|
213
|
+
* is consulted: the sibling short-circuit would dispatch it straight to the
|
|
214
|
+
* owning child, whose `getStatus` is the NATIVE slice — an HA-MQTT / HomeKit
|
|
215
|
+
* exporter or the notification center (hub-local forked children) asking
|
|
216
|
+
* `battery.getStatus({ deviceId })` of a device owned by the hub-local
|
|
217
|
+
* `provider-homeassistant` child read the native value while the UI showed
|
|
218
|
+
* the merged one. The parent's `onUnownedCall` had the same answer, on a path
|
|
219
|
+
* this call never took. Same shared function (`answerClaimedGetStatus`) as
|
|
220
|
+
* that handler and the hub's `callCapabilityOnNode`, so the three entries
|
|
221
|
+
* cannot drift; a device whose claims are not yet known has them resolved
|
|
222
|
+
* first and is never answered native.
|
|
223
|
+
*
|
|
224
|
+
* Omitted (the agent has no claim authority) ⇒ prior behaviour exactly. The
|
|
225
|
+
* kernel has no cap registry, so the wiring side injects it.
|
|
226
|
+
*/
|
|
227
|
+
readonly claimedStatus?: ClaimedStatusResolver;
|
|
228
|
+
/**
|
|
229
|
+
* Per-cap-method bound for UDS cap calls, in ms — read from the cap
|
|
230
|
+
* definition's declared `timeoutMs`. The SAME resolver the remote plane uses
|
|
231
|
+
* (`CapRouteResolver.capTimeoutMs`), so the two planes agree by construction
|
|
232
|
+
* instead of by coincidence.
|
|
233
|
+
*
|
|
234
|
+
* Without this the channel default (60 s) would apply to everything, and a
|
|
235
|
+
* legitimately long method — `applyServerUpdate` declares 16 min because it
|
|
236
|
+
* awaits a full npm install — would be cut off mid-run. Omitted ⇒ the
|
|
237
|
+
* channel default for every cap call.
|
|
238
|
+
*/
|
|
239
|
+
readonly capTimeoutMs?: (capName: string, method: string) => number | undefined;
|
|
240
|
+
/**
|
|
241
|
+
* Sink for observed cap calls — the ONE place a forked addon's outbound
|
|
242
|
+
* `ctx.api` traffic can be recorded in the process that also holds the reader.
|
|
243
|
+
*
|
|
244
|
+
* ── Why here, and not in the caller ───────────────────────────────────────
|
|
245
|
+
* `getCapUsageRegistry()` is a per-process module singleton and the reader
|
|
246
|
+
* (`nodes.getCapUsageGraph`) runs on hub-main. The only writer used to be
|
|
247
|
+
* `addon-context-factory.ts`'s `localProviderLink` observer, which runs in
|
|
248
|
+
* the FORKED RUNNER — so every observation it made was written to an object
|
|
249
|
+
* hub-main can never read, and it fired only for co-located providers anyway
|
|
250
|
+
* (`ipcParentLink`, which carries every cross-process call, takes no
|
|
251
|
+
* observer). `nodes.getCapUsageGraph` therefore returned `[]` in 0.21 s
|
|
252
|
+
* against a hub running 64 addons and 1019 devices.
|
|
253
|
+
*
|
|
254
|
+
* ── Why here, and not in `onUnownedCall` ──────────────────────────────────
|
|
255
|
+
* Because most inter-addon traffic never gets there. `resolveChildId`
|
|
256
|
+
* short-circuits a cap owned by a sibling runner straight to `callCap`, and
|
|
257
|
+
* on the hub every addon IS a sibling runner. Recording in `onUnownedCall`
|
|
258
|
+
* would have seen `ctx.settings.*` (hub-in-process `settings-store`) and
|
|
259
|
+
* missed every addon→addon call — a graph with a whole plane silently
|
|
260
|
+
* missing, which is the defect it was meant to end.
|
|
261
|
+
*
|
|
262
|
+
* This handler is strictly upstream of BOTH branches, and it is where
|
|
263
|
+
* `callerAddonId` is already stamped off the UDS connection the frame
|
|
264
|
+
* arrived on — a caller identity the child cannot spoof.
|
|
265
|
+
*
|
|
266
|
+
* ── What it still cannot see (say it, do not hide it) ─────────────────────
|
|
267
|
+
* 1. **hub-main → hub-main.** An in-process builtin's `ctx.api` is
|
|
268
|
+
* `AddonRegistryService.getBrokerApi()` — ONE lazily-built tRPC client
|
|
269
|
+
* shared by every addon, so there is no per-caller identity to record.
|
|
270
|
+
* Giving it an observer needs a per-addon client first.
|
|
271
|
+
* 2. **A runner's co-located calls.** `localProviderLink` answers inside the
|
|
272
|
+
* runner and the frame never reaches this socket. Only the `detection` /
|
|
273
|
+
* `ml` execution groups have co-located providers at all (D9, D29).
|
|
274
|
+
* 3. **An agent's own runners.** Their parent is the agent process, whose
|
|
275
|
+
* `LocalChildRegistry` writes to the agent's singleton. Aggregating that
|
|
276
|
+
* needs a transport hop. `$hub-cap-fwd`'s envelope has carried the
|
|
277
|
+
* agent-stamped `callerAddonId` since D787 (the keychain owner-checks
|
|
278
|
+
* it), but the hub does not feed it to this observer — an
|
|
279
|
+
* agent-originated call is still not recorded here.
|
|
280
|
+
*
|
|
281
|
+
* MUST NOT throw; the call site catches anyway (see the record site).
|
|
282
|
+
*/
|
|
283
|
+
readonly capUsageObserver?: (obs: CapUsageCallRecord) => void;
|
|
284
284
|
}
|
|
285
285
|
/**
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
286
|
+
* Parent-side authority for local addon-runners reachable over a
|
|
287
|
+
* `LocalTransportServer` (UDS). Children register their cap manifest on
|
|
288
|
+
* connect; the registry routes `(capName, deviceId?)` cap calls to the
|
|
289
|
+
* owning child over the channel and drops a child's caps on disconnect.
|
|
290
|
+
*/
|
|
291
291
|
export declare class LocalChildRegistry {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
292
|
+
private readonly children;
|
|
293
|
+
private registeredHandler;
|
|
294
|
+
private goneHandler;
|
|
295
|
+
/** Source of {@link RegisteredChild.incarnation}; one bump per accepted connection. */
|
|
296
|
+
private nextIncarnation;
|
|
297
|
+
private eventHandler;
|
|
298
|
+
private logHandler;
|
|
299
|
+
private readinessHandler;
|
|
300
|
+
private readonly server;
|
|
301
|
+
private readonly onUnownedCall?;
|
|
302
|
+
private readonly logger?;
|
|
303
|
+
private readonly lifecycleEvents?;
|
|
304
|
+
/** Per childId: the incarnation `WorkerOnline` was last said for. */
|
|
305
|
+
private readonly announcedIncarnation;
|
|
306
|
+
private readonly getActiveSingletonAddonId?;
|
|
307
|
+
private readonly resolveChildIdForAddon?;
|
|
308
|
+
/** This node's own Moleculer nodeId (see {@link LocalChildRegistryOptions.ownNodeId}). */
|
|
309
|
+
private readonly ownNodeId?;
|
|
310
|
+
/** See {@link LocalChildRegistryOptions.isAggregatedCollectionMethod}. */
|
|
311
|
+
private readonly isAggregatedCollectionMethod?;
|
|
312
|
+
private readonly isAddonPinnedCall?;
|
|
313
|
+
/** See {@link ForwardCensus}. Mutable counters on the hot path, by design. */
|
|
314
|
+
private forwardedRaw;
|
|
315
|
+
private forwardedDecoded;
|
|
316
|
+
/**
|
|
317
|
+
* The per-ACTION byte census (D456). `ForwardCensus` above is the same
|
|
318
|
+
* question asked of the whole plane; this one asks it per `<cap>.<method>`,
|
|
319
|
+
* beside the bytes that method actually moved. Both are kept: `socketFwd=`
|
|
320
|
+
* says whether the negotiation is working at all, and a `raw=0` on ONE
|
|
321
|
+
* method with `raw>0` on its neighbours is a different fault.
|
|
322
|
+
*/
|
|
323
|
+
private readonly actionCensus;
|
|
324
|
+
/** See {@link LocalChildRegistryOptions.capTimeoutMs}. */
|
|
325
|
+
private readonly capTimeoutMs?;
|
|
326
|
+
/** See {@link LocalChildRegistryOptions.claimedStatus}. */
|
|
327
|
+
private readonly claimedStatus?;
|
|
328
|
+
/** See {@link LocalChildRegistryOptions.capUsageObserver}. */
|
|
329
|
+
private readonly capUsageObserver?;
|
|
330
|
+
/** Tracks capNames already logged as UDS-routed; one INFO line per capName per process. */
|
|
331
|
+
private readonly egressRoutedCaps;
|
|
332
|
+
/** Per-child event fan-out counters (sent / suppressed). */
|
|
333
|
+
private readonly childEventStats;
|
|
334
|
+
/** D467: per-category production census (cumulative). See {@link CategoryFanoutSample}. */
|
|
335
|
+
private readonly categoryStats;
|
|
336
|
+
/** Broadcasts whose category did not fit in {@link CATEGORY_CENSUS_MAX}. */
|
|
337
|
+
private categoryOverflow;
|
|
338
|
+
/** One INFO line the first time the census cap trips, never per event. */
|
|
339
|
+
private categoryOverflowLogged;
|
|
340
|
+
/** Last pattern-set string logged per child, to dedup the INFO line. */
|
|
341
|
+
private readonly loggedPatternSet;
|
|
342
|
+
/**
|
|
343
|
+
* Derived `(cap, device?) → child` index over {@link children}, or `null`
|
|
344
|
+
* when it must be rebuilt. See {@link capIndex} for why it is a cache and
|
|
345
|
+
* never a registry (D3, D457).
|
|
346
|
+
*/
|
|
347
|
+
private capChildIndex;
|
|
348
|
+
/**
|
|
349
|
+
* Accepts either a plain positional `server` argument (backward-compatible)
|
|
350
|
+
* or a full `LocalChildRegistryOptions` object.
|
|
351
|
+
*
|
|
352
|
+
* Positional overloads (existing call sites are unchanged):
|
|
353
|
+
* new LocalChildRegistry(server)
|
|
354
|
+
* new LocalChildRegistry(server, onUnownedCall)
|
|
355
|
+
*
|
|
356
|
+
* Options object (new call sites that pass a logger):
|
|
357
|
+
* new LocalChildRegistry({ server, onUnownedCall, logger })
|
|
358
|
+
*/
|
|
359
|
+
constructor(serverOrOptions: LocalTransportServer | LocalChildRegistryOptions, onUnownedCallArg?: (input: CapCallInput) => Promise<unknown>);
|
|
360
|
+
start(): Promise<void>;
|
|
361
|
+
/**
|
|
362
|
+
* Per-child event fan-out counters (`{ sent, suppressed }`) or `null` if the
|
|
363
|
+
* child has no recorded events yet. Exposed for the starvation-verification
|
|
364
|
+
* surface (operator debug).
|
|
365
|
+
*/
|
|
366
|
+
getChildEventStats(childId: string): ChildEventStats | null;
|
|
367
|
+
/**
|
|
368
|
+
* D467: every category this node has broadcast, with its emit count and how
|
|
369
|
+
* many child subscriptions matched. Cumulative for the life of the process —
|
|
370
|
+
* the heartbeat differences it, the same discipline as the per-child
|
|
371
|
+
* counters. Largest `broadcasts` first.
|
|
372
|
+
*/
|
|
373
|
+
categoryFanout(): readonly CategoryFanoutSample[];
|
|
374
|
+
/** Broadcasts the census could not attribute because it was full (cumulative). */
|
|
375
|
+
categoryCensusOverflow(): number;
|
|
376
|
+
/**
|
|
377
|
+
* This child's socket traffic — bytes and messages, both directions, split by
|
|
378
|
+
* frame kind — or `null` when the child is gone or its channel keeps no
|
|
379
|
+
* counters (an in-process or test transport).
|
|
380
|
+
*
|
|
381
|
+
* The event counters above cover ONE kind of frame and, once surfaced on
|
|
382
|
+
* 2026-08-29, accounted for 4% of hub-main's ~44 000 socket syscalls/s. This
|
|
383
|
+
* is the same question asked of every frame the channel moves, and it is the
|
|
384
|
+
* only per-peer attribution that exists: `/proc` reports one `rchar`/`wchar`
|
|
385
|
+
* pair for the whole process and has no per-socket breakdown.
|
|
386
|
+
*/
|
|
387
|
+
getChildSocketTraffic(childId: string): SocketTrafficSample | null;
|
|
388
|
+
/**
|
|
389
|
+
* Bytes this process has written to a child that the child has not yet
|
|
390
|
+
* taken, live, or `null` when the channel keeps no such reading. Read on
|
|
391
|
+
* every heartbeat probe (D446) — a child that stops draining is the shape
|
|
392
|
+
* of an outbound-queue episode, and the number lives on the channel.
|
|
393
|
+
*/
|
|
394
|
+
getChildQueuedBytes(childId: string): number | null;
|
|
395
|
+
/** Cumulative {@link ForwardCensus} of this parent's `cap-call-out` routing. */
|
|
396
|
+
readForwardCensus(): ForwardCensus;
|
|
397
|
+
/**
|
|
398
|
+
* Cumulative per-action byte census: peer → `<cap>.<method>` → bytes, calls
|
|
399
|
+
* and the raw/decoded split. A COPY (`cap-action-census.ts` explains why it
|
|
400
|
+
* must be one); the heartbeat subtracts the previous reading.
|
|
401
|
+
*
|
|
402
|
+
* This is the instrument D454 closed by asking for. `socketTopBytes=` names
|
|
403
|
+
* the peer that moves the bytes and `txkB=` says they are responses; neither
|
|
404
|
+
* can say WHICH method originates them, and after raw-forward the bytes that
|
|
405
|
+
* cross are no longer the proxy for what hub-main pays — 85.7 % of sibling
|
|
406
|
+
* calls cross unread. What costs is what hub-main LOOKS at, and that is the
|
|
407
|
+
* `decoded` half of an entry, next to the bytes it carried.
|
|
408
|
+
*/
|
|
409
|
+
readActionCensus(): CapActionReading;
|
|
410
|
+
/**
|
|
411
|
+
* Connected children that never declared a subscription pattern set.
|
|
412
|
+
*
|
|
413
|
+
* Each one is a fail-open on BOTH planes: `childWantsEvent` returns true for
|
|
414
|
+
* an undeclared child ({@link ChildEntry.eventPatterns} `=== null`), and
|
|
415
|
+
* `aggregateEventInterest` returns `null` — accept everything — if ANY
|
|
416
|
+
* connected child is undeclared, which disables the node's inbound cross-node
|
|
417
|
+
* gate as well. **One legacy runner silently turns off the filtering for the
|
|
418
|
+
* whole node**, and nothing reported it, so a zero here is as load-bearing as
|
|
419
|
+
* a non-zero one.
|
|
420
|
+
*/
|
|
421
|
+
undeclaredChildCount(): number;
|
|
422
|
+
/**
|
|
423
|
+
* Does `entry` want to receive an event in `category`? Undeclared patterns
|
|
424
|
+
* (`null`) → always (fail-open, counted by {@link undeclaredChildCount});
|
|
425
|
+
* else the child's declared set must match via `matchesPattern` — the SAME
|
|
426
|
+
* function the child's own `deliverShared` map-key gate uses, giving provable
|
|
427
|
+
* delivery parity. The parent always filters: the `CAMSTACK_UDS_EVENT_FANOUT`
|
|
428
|
+
* shadow/broadcast modes were removed on 2026-10-06.
|
|
429
|
+
*
|
|
430
|
+
* NOTE: this gate must NOT consult `RING_BUFFER_DENY_PATTERNS` /
|
|
431
|
+
* `isHighFrequencyCategory` — those are ring-buffer STORAGE policy; a child
|
|
432
|
+
* that explicitly subscribes to a ring-denied category must still RECEIVE it.
|
|
433
|
+
*/
|
|
434
|
+
private childWantsEvent;
|
|
435
|
+
/**
|
|
436
|
+
* D2: this node's aggregate cross-node event interest — the UNION of every
|
|
437
|
+
* connected child's declared category patterns. Consumed by the parent's
|
|
438
|
+
* `$event-bus` inbound gate (via `setNodeEventInterest`) so the node only
|
|
439
|
+
* accepts cross-node (Moleculer) categories at least one local child wants.
|
|
440
|
+
*
|
|
441
|
+
* Returns `null` (fail-open — accept everything) when:
|
|
442
|
+
* - NO child is currently connected (boot window before the first forked
|
|
443
|
+
* child completes its UDS handshake, or every child has disconnected): a
|
|
444
|
+
* node MUST NOT drop 100% of inbound cross-node events during that window,
|
|
445
|
+
* and a child may connect imminently. This is distinct from the
|
|
446
|
+
* declared-empty case below.
|
|
447
|
+
* - ANY connected child is UNDECLARED (`eventPatterns === null`, a legacy
|
|
448
|
+
* runner): a node cannot safely narrow its inbound set while a child's
|
|
449
|
+
* real interest is unknown. Mirrors the per-child fail-open in
|
|
450
|
+
* {@link childWantsEvent}, aggregated conservatively.
|
|
451
|
+
*
|
|
452
|
+
* Returns an EMPTY array only when ≥1 child is connected and EVERY connected
|
|
453
|
+
* child declared an explicit empty set — a genuine "wants nothing". Reads the
|
|
454
|
+
* live `children` map, so a child registering / disconnecting / sending
|
|
455
|
+
* `event-sub` is reflected on the next call with no extra bookkeeping.
|
|
456
|
+
*/
|
|
457
|
+
aggregateEventInterest(): readonly string[] | null;
|
|
458
|
+
private statsFor;
|
|
459
|
+
/** Deduped INFO line whenever a child's declared pattern set changes. */
|
|
460
|
+
private logPatternSet;
|
|
461
|
+
/**
|
|
462
|
+
* Child id that can service a call to `capName` (optionally addressing
|
|
463
|
+
* `deviceId`), or null.
|
|
464
|
+
*
|
|
465
|
+
* `deviceId` is a routing HINT, not a hard filter. A singleton cap
|
|
466
|
+
* (`pipeline-runner`, `stream-broker`, …) addresses devices through its
|
|
467
|
+
* METHOD ARGUMENTS — `attachCamera({ deviceId })` is one provider serving
|
|
468
|
+
* many cameras — so its descriptor carries no `deviceId`. Resolving on
|
|
469
|
+
* `deviceId` alone would never match it and would force the call onto the
|
|
470
|
+
* broker fallback (which then hangs in service discovery). Hence:
|
|
471
|
+
* 1. exact device-scoped owner (native per-device caps where each child
|
|
472
|
+
* owns a disjoint device subset) is preferred, then
|
|
473
|
+
* 2. a singleton owner (deviceId-less descriptor) is the fallback.
|
|
474
|
+
* A cap is globally singleton XOR device-scoped, so the two tiers never
|
|
475
|
+
* compete for the same capName.
|
|
476
|
+
*/
|
|
477
|
+
resolveChildId(capName: string, deviceId?: number): string | null;
|
|
478
|
+
/**
|
|
479
|
+
* Publish one cap-usage observation, if a sink is wired.
|
|
480
|
+
*
|
|
481
|
+
* Cost discipline — this is on the hot path (D181: hub-main's event loop is
|
|
482
|
+
* the cluster's only queue): no sink means one undefined check; with a sink
|
|
483
|
+
* it is one object literal and one `Date.now()`, and the sink itself is O(1).
|
|
484
|
+
* Wrapped so a broken observer can never fail the call it observes — the
|
|
485
|
+
* registry swallows too, and BOTH matter: this catch also covers a sink that
|
|
486
|
+
* is not the registry.
|
|
487
|
+
*/
|
|
488
|
+
private recordCapUsage;
|
|
489
|
+
/**
|
|
490
|
+
* The cap index over the CURRENT children, rebuilt on first use after any
|
|
491
|
+
* mutation of {@link children}.
|
|
492
|
+
*
|
|
493
|
+
* This replaced a linear walk of every child's cap manifest per
|
|
494
|
+
* `cap-call-out`, measured at **7.1 % of hub-main's busy main thread**
|
|
495
|
+
* across 39 children (D456). Why it did not exist before is the whole
|
|
496
|
+
* design: what it indexes moves — a runner is replaced on every update, a
|
|
497
|
+
* crash respawns one, a child re-registers with a replacement manifest after
|
|
498
|
+
* init — and an index that names a dead child routes work into a socket
|
|
499
|
+
* nobody is reading, which is strictly worse than a slow scan.
|
|
500
|
+
*
|
|
501
|
+
* So it is not maintained; it is DISCARDED. `buildCapChildIndex` is a pure
|
|
502
|
+
* function of `children.values()`, the only two writers of that map
|
|
503
|
+
* ({@link invalidateCapIndex}'s call sites) drop the index in the same
|
|
504
|
+
* statement, and nothing else can construct one. There is no add-on-register
|
|
505
|
+
* / remove-on-close path that could disagree with the map — i.e. no shadow
|
|
506
|
+
* registry (D3): the map remains the single authority and this holds no fact
|
|
507
|
+
* it does not.
|
|
508
|
+
*
|
|
509
|
+
* The operator's active-singleton preference is deliberately NOT indexed —
|
|
510
|
+
* it changes without any child connecting or leaving, so `resolveChildId`
|
|
511
|
+
* reads it live and the index only supplies the candidate list.
|
|
512
|
+
*/
|
|
513
|
+
private capIndex;
|
|
514
|
+
/** Drop the derived index. MUST follow every write to {@link children}. */
|
|
515
|
+
private invalidateCapIndex;
|
|
516
|
+
/**
|
|
517
|
+
* Does the named child currently provide `(capName, deviceId?)`?
|
|
518
|
+
*
|
|
519
|
+
* Used by the hub proxy seam, which knows the EXACT addon (→ runner →
|
|
520
|
+
* childId) a provider belongs to. Unlike `resolveChildId` (which picks the
|
|
521
|
+
* first child owning `capName`), this targets one child — required for
|
|
522
|
+
* COLLECTION caps (`addon-widgets-source`, …) where many children register
|
|
523
|
+
* the same capName: routing by capName alone collapses every provider to
|
|
524
|
+
* the first child. Same deviceId-as-hint semantics as `resolveChildId`:
|
|
525
|
+
* a device-scoped descriptor matching `deviceId` OR a deviceId-less
|
|
526
|
+
* (singleton/collection) descriptor counts.
|
|
527
|
+
*/
|
|
528
|
+
/**
|
|
529
|
+
* Is `childId` currently connected (has it completed its UDS handshake)?
|
|
530
|
+
* Coarser than {@link childProvides}: it answers "is the child reachable
|
|
531
|
+
* over UDS at all", regardless of which caps it has announced yet. Used by
|
|
532
|
+
* the route-mount fallback to decide between the handler-stripped
|
|
533
|
+
* `callAddonOnChild(target:'routes')` path (child reachable) and awaiting a
|
|
534
|
+
* cap proxy's `getRoutes()` (child not yet UDS-registered).
|
|
535
|
+
*/
|
|
536
|
+
isChildKnown(childId: string): boolean;
|
|
537
|
+
childProvides(childId: string, capName: string, deviceId?: number): boolean;
|
|
538
|
+
/**
|
|
539
|
+
* Per-request options for a cap call: the cap method's declared `timeoutMs`
|
|
540
|
+
* when one exists, else `undefined` so the channel applies its default.
|
|
541
|
+
* Mirrors `CapRouteResolver.callTimeout` for the remote plane.
|
|
542
|
+
*/
|
|
543
|
+
private capRequestOpts;
|
|
544
|
+
/** Forward a cap method call to a SPECIFIC child by id over UDS; rejects if that child is absent. */
|
|
545
|
+
callCapOnChild(childId: string, input: CapCallInput): Promise<unknown>;
|
|
546
|
+
/** Forward a cap method call to the owning child over UDS; rejects if none. */
|
|
547
|
+
callCap(input: CapCallInput): Promise<unknown>;
|
|
548
|
+
/**
|
|
549
|
+
* Forward an ADDON-LEVEL call (routes / custom-action) to a SPECIFIC child
|
|
550
|
+
* by id over UDS; rejects if that child is absent.
|
|
551
|
+
*
|
|
552
|
+
* The childId for a hub-local single-addon runner equals the addonId
|
|
553
|
+
* (`resolveRunnerId` returns the addonId when no `execution.group` is
|
|
554
|
+
* declared — no shipped addon declares one). Mirrors `callCapOnChild` for
|
|
555
|
+
* the cap plane; carries the two surfaces the removed per-addon Moleculer
|
|
556
|
+
* broker used to serve (`getRoutes` + `custom.<action>`).
|
|
557
|
+
*/
|
|
558
|
+
callAddonOnChild(childId: string, input: AddonCallInput): Promise<unknown>;
|
|
559
|
+
/** Build the parent→child `addon-call` wire message from an addon-call input. */
|
|
560
|
+
private toAddonCall;
|
|
561
|
+
/** Build the parent→child `cap-call` wire message from a routing input. */
|
|
562
|
+
private toCapCall;
|
|
563
|
+
listChildren(): readonly RegisteredChild[];
|
|
564
|
+
/** Register the (single) child-registered handler. Only one handler is active at a time. */
|
|
565
|
+
onChildRegistered(handler: (child: RegisteredChild) => void): void;
|
|
566
|
+
/**
|
|
567
|
+
* Register the (single) child-gone handler. Only one handler is active at a
|
|
568
|
+
* time. The handler receives the {@link RegisteredChild.incarnation} of the
|
|
569
|
+
* connection that closed — carry it into whatever teardown it triggers, so a
|
|
570
|
+
* dead generation cannot tear down its successor's work.
|
|
571
|
+
*/
|
|
572
|
+
onChildGone(handler: (childId: string, incarnation: number) => void): void;
|
|
573
|
+
/**
|
|
574
|
+
* Register the (single) child-event handler. Invoked when a child sends an
|
|
575
|
+
* event via `LocalChildClient.emitEvent`. Only one handler is active at a
|
|
576
|
+
* time; a new handler replaces the prior one. Pass `null` to clear the
|
|
577
|
+
* handler entirely (used by the UDS event bridge disposer on shutdown).
|
|
578
|
+
*/
|
|
579
|
+
onChildEvent(handler: ((childId: string, event: SystemEvent) => void) | null): void;
|
|
580
|
+
/**
|
|
581
|
+
* Register the (single) child-log handler. Invoked when a child sends a log
|
|
582
|
+
* entry via `LocalChildClient.sendLog`. Only one handler is active.
|
|
583
|
+
*/
|
|
584
|
+
onChildLog(handler: (childId: string, entry: ChildLogMessage) => void): void;
|
|
585
|
+
/**
|
|
586
|
+
* Register the handler that supplies the authoritative readiness snapshot
|
|
587
|
+
* when a child sends a `readiness-request`. Only one handler is active.
|
|
588
|
+
*/
|
|
589
|
+
onReadinessSnapshotRequest(handler: () => readonly IReadinessRegistryRecord[]): void;
|
|
590
|
+
/**
|
|
591
|
+
* Push a parent→child event to a specific child. Fire-and-forget (uses the
|
|
592
|
+
* one-way `emit` path on the channel). No-op if the child is not connected.
|
|
593
|
+
*/
|
|
594
|
+
sendEventToChild(childId: string, event: SystemEvent, sourceNodeId: string): void;
|
|
595
|
+
/**
|
|
596
|
+
* Push a parent→child event to every registered child, optionally skipping
|
|
597
|
+
* one (the originating child, to avoid echo). Fire-and-forget.
|
|
598
|
+
*/
|
|
599
|
+
broadcastEventToChildren(event: SystemEvent, sourceNodeId: string, exceptChildId?: string): void;
|
|
600
|
+
/**
|
|
601
|
+
* Record one PRODUCED event against its category. Called once per broadcast,
|
|
602
|
+
* outside the per-child loop, because production is what the census measures.
|
|
603
|
+
*/
|
|
604
|
+
private recordCategoryBroadcast;
|
|
605
|
+
/**
|
|
606
|
+
* E2: Send a `set-log-level` control message to a specific child.
|
|
607
|
+
* Returns `true` if the child is currently connected and the message was
|
|
608
|
+
* emitted; `false` if the child is not connected (no-op). The `false`
|
|
609
|
+
* return lets the caller (MoleculerService.setChildLogLevelByNodeId) fall
|
|
610
|
+
* back to the Moleculer `$node-mgmt.setLogLevel` action for the node.
|
|
611
|
+
* Mirrors the `$node-mgmt.setLogLevel` Moleculer action for UDS children.
|
|
612
|
+
*/
|
|
613
|
+
setChildLogLevel(childId: string, level: string): boolean;
|
|
614
|
+
close(): Promise<void>;
|
|
615
|
+
/** `WorkerOnline`, once per incarnation: a re-register of the same connection says nothing. */
|
|
616
|
+
private announceOnline;
|
|
617
|
+
/** `WorkerOffline` for the LIVE connection's close (a superseded close never reaches here). */
|
|
618
|
+
private announceOffline;
|
|
619
|
+
private emitLifecycle;
|
|
620
|
+
private onConnection;
|
|
621
621
|
}
|