@matter/node 0.18.0 → 0.18.1-alpha.0-20261111-b84c5d1bc
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/cjs/behavior/Behavior.d.ts.map +1 -1
- package/dist/cjs/behavior/Behavior.js +2 -0
- package/dist/cjs/behavior/Behavior.js.map +1 -1
- package/dist/cjs/behavior/Events.d.ts.map +1 -1
- package/dist/cjs/behavior/Events.js +4 -2
- package/dist/cjs/behavior/Events.js.map +1 -1
- package/dist/cjs/behavior/cluster/ClusterBehavior.d.ts +17 -3
- package/dist/cjs/behavior/cluster/ClusterBehavior.d.ts.map +1 -1
- package/dist/cjs/behavior/cluster/ClusterBehavior.js +2 -20
- package/dist/cjs/behavior/cluster/ClusterBehavior.js.map +1 -1
- package/dist/cjs/behavior/cluster/ClusterBehaviorType.d.ts.map +1 -1
- package/dist/cjs/behavior/cluster/ClusterBehaviorType.js +8 -150
- package/dist/cjs/behavior/cluster/ClusterBehaviorType.js.map +1 -1
- package/dist/cjs/behavior/context/server/LocalActorContext.d.ts +1 -1
- package/dist/cjs/behavior/context/server/LocalActorContext.d.ts.map +1 -1
- package/dist/cjs/behavior/internal/BehaviorBacking.d.ts +2 -2
- package/dist/cjs/behavior/internal/BehaviorBacking.d.ts.map +1 -1
- package/dist/cjs/behavior/internal/BehaviorBacking.js +2 -0
- package/dist/cjs/behavior/internal/BehaviorBacking.js.map +1 -1
- package/dist/cjs/behavior/internal/ClusterDerivation.d.ts +45 -0
- package/dist/cjs/behavior/internal/ClusterDerivation.d.ts.map +1 -0
- package/dist/cjs/behavior/internal/ClusterDerivation.js +192 -0
- package/dist/cjs/behavior/internal/ClusterDerivation.js.map +6 -0
- package/dist/cjs/behavior/internal/ClusterStatics.d.ts +16 -0
- package/dist/cjs/behavior/internal/ClusterStatics.d.ts.map +1 -0
- package/dist/cjs/behavior/internal/ClusterStatics.js +138 -0
- package/dist/cjs/behavior/internal/ClusterStatics.js.map +6 -0
- package/dist/cjs/behavior/internal/ModeledState.d.ts +18 -0
- package/dist/cjs/behavior/internal/ModeledState.d.ts.map +1 -0
- package/dist/cjs/behavior/internal/ModeledState.js +54 -0
- package/dist/cjs/behavior/internal/ModeledState.js.map +6 -0
- package/dist/cjs/behavior/internal/ServerBehaviorBacking.d.ts +1 -1
- package/dist/cjs/behavior/internal/ServerBehaviorBacking.d.ts.map +1 -1
- package/dist/cjs/behavior/internal/ServerBehaviorBacking.js +3 -12
- package/dist/cjs/behavior/internal/ServerBehaviorBacking.js.map +1 -1
- package/dist/cjs/behavior/state/managed/Datasource.d.ts +54 -10
- package/dist/cjs/behavior/state/managed/Datasource.d.ts.map +1 -1
- package/dist/cjs/behavior/state/managed/Datasource.js +107 -38
- package/dist/cjs/behavior/state/managed/Datasource.js.map +1 -1
- package/dist/cjs/behavior/state/managed/Internal.d.ts +20 -5
- package/dist/cjs/behavior/state/managed/Internal.d.ts.map +1 -1
- package/dist/cjs/behavior/state/managed/Internal.js +28 -26
- package/dist/cjs/behavior/state/managed/Internal.js.map +1 -1
- package/dist/cjs/behavior/state/managed/ManagedReference.d.ts +56 -12
- package/dist/cjs/behavior/state/managed/ManagedReference.d.ts.map +1 -1
- package/dist/cjs/behavior/state/managed/ManagedReference.js +103 -43
- package/dist/cjs/behavior/state/managed/ManagedReference.js.map +1 -1
- package/dist/cjs/behavior/state/managed/NameResolver.js +1 -1
- package/dist/cjs/behavior/state/managed/NameResolver.js.map +1 -1
- package/dist/cjs/behavior/state/managed/ReadOnlyReference.d.ts +33 -0
- package/dist/cjs/behavior/state/managed/ReadOnlyReference.d.ts.map +1 -0
- package/dist/cjs/behavior/state/{validation/peer-forwarding.js → managed/ReadOnlyReference.js} +36 -17
- package/dist/cjs/behavior/state/managed/ReadOnlyReference.js.map +6 -0
- package/dist/cjs/behavior/state/managed/ValReference.d.ts +80 -13
- package/dist/cjs/behavior/state/managed/ValReference.d.ts.map +1 -1
- package/dist/cjs/behavior/state/managed/ValReference.js +32 -0
- package/dist/cjs/behavior/state/managed/ValReference.js.map +2 -2
- package/dist/cjs/behavior/state/managed/errors.d.ts +25 -0
- package/dist/cjs/behavior/state/managed/errors.d.ts.map +1 -0
- package/dist/cjs/behavior/state/{validation/FabricIndexSentinel.js → managed/errors.js} +15 -10
- package/dist/cjs/behavior/state/managed/errors.js.map +6 -0
- package/dist/cjs/behavior/state/managed/index.d.ts +1 -0
- package/dist/cjs/behavior/state/managed/index.d.ts.map +1 -1
- package/dist/cjs/behavior/state/managed/index.js +1 -0
- package/dist/cjs/behavior/state/managed/index.js.map +1 -1
- package/dist/cjs/behavior/state/managed/values/BitmapManager.js +5 -20
- package/dist/cjs/behavior/state/managed/values/BitmapManager.js.map +1 -1
- package/dist/cjs/behavior/state/managed/values/ListManager.d.ts +0 -5
- package/dist/cjs/behavior/state/managed/values/ListManager.d.ts.map +1 -1
- package/dist/cjs/behavior/state/managed/values/ListManager.js +274 -133
- package/dist/cjs/behavior/state/managed/values/ListManager.js.map +2 -2
- package/dist/cjs/behavior/state/managed/values/StructManager.d.ts.map +1 -1
- package/dist/cjs/behavior/state/managed/values/StructManager.js +30 -35
- package/dist/cjs/behavior/state/managed/values/StructManager.js.map +2 -2
- package/dist/cjs/behavior/state/managed/values/ValuePatcher.d.ts +8 -0
- package/dist/cjs/behavior/state/managed/values/ValuePatcher.d.ts.map +1 -1
- package/dist/cjs/behavior/state/managed/values/ValuePatcher.js +13 -2
- package/dist/cjs/behavior/state/managed/values/ValuePatcher.js.map +1 -1
- package/dist/cjs/behavior/state/validation/FabricIndexField.d.ts +30 -0
- package/dist/cjs/behavior/state/validation/FabricIndexField.d.ts.map +1 -0
- package/dist/cjs/behavior/state/validation/FabricIndexField.js +53 -0
- package/dist/cjs/behavior/state/validation/FabricIndexField.js.map +6 -0
- package/dist/cjs/behavior/state/validation/ValueValidator.d.ts.map +1 -1
- package/dist/cjs/behavior/state/validation/ValueValidator.js +16 -36
- package/dist/cjs/behavior/state/validation/ValueValidator.js.map +1 -1
- package/dist/cjs/behavior/state/validation/conformance.d.ts.map +1 -1
- package/dist/cjs/behavior/state/validation/conformance.js +6 -5
- package/dist/cjs/behavior/state/validation/conformance.js.map +1 -1
- package/dist/cjs/behavior/state/validation/constraint.d.ts.map +1 -1
- package/dist/cjs/behavior/state/validation/constraint.js +3 -1
- package/dist/cjs/behavior/state/validation/constraint.js.map +1 -1
- package/dist/cjs/behavior/state/validation/location.d.ts +6 -0
- package/dist/cjs/behavior/state/validation/location.d.ts.map +1 -1
- package/dist/cjs/behavior/state/validation/remote-validation.d.ts +57 -0
- package/dist/cjs/behavior/state/validation/remote-validation.d.ts.map +1 -0
- package/dist/cjs/behavior/state/validation/remote-validation.js +63 -0
- package/dist/cjs/behavior/state/validation/remote-validation.js.map +6 -0
- package/dist/cjs/behavior/supervision/Supervision.d.ts.map +1 -1
- package/dist/cjs/behavior/supervision/Supervision.js +1 -1
- package/dist/cjs/behavior/supervision/Supervision.js.map +1 -1
- package/dist/cjs/behavior/supervision/SupervisionConfig.d.ts.map +1 -1
- package/dist/cjs/behavior/supervision/SupervisionConfig.js +1 -1
- package/dist/cjs/behavior/supervision/SupervisionConfig.js.map +1 -1
- package/dist/cjs/behavior/supervision/ValueSupervisor.d.ts +3 -12
- package/dist/cjs/behavior/supervision/ValueSupervisor.d.ts.map +1 -1
- package/dist/cjs/behavior/system/commissioning/CommissioningClient.d.ts +57 -6
- package/dist/cjs/behavior/system/commissioning/CommissioningClient.d.ts.map +1 -1
- package/dist/cjs/behavior/system/commissioning/CommissioningClient.js +86 -0
- package/dist/cjs/behavior/system/commissioning/CommissioningClient.js.map +1 -1
- package/dist/cjs/behavior/system/commissioning/RemoteDescriptor.d.ts +9 -1
- package/dist/cjs/behavior/system/commissioning/RemoteDescriptor.d.ts.map +1 -1
- package/dist/cjs/behavior/system/commissioning/RemoteDescriptor.js +9 -0
- package/dist/cjs/behavior/system/commissioning/RemoteDescriptor.js.map +1 -1
- package/dist/cjs/behavior/system/controller/ControllerBehavior.d.ts +2 -1
- package/dist/cjs/behavior/system/controller/ControllerBehavior.d.ts.map +1 -1
- package/dist/cjs/behavior/system/controller/ControllerBehavior.js +2 -1
- package/dist/cjs/behavior/system/controller/ControllerBehavior.js.map +1 -1
- package/dist/cjs/behavior/system/dcl/DclBehavior.d.ts +3 -3
- package/dist/cjs/behavior/system/network/ServerGroupNetworking.d.ts +2 -1
- package/dist/cjs/behavior/system/network/ServerGroupNetworking.d.ts.map +1 -1
- package/dist/cjs/behavior/system/network/ServerGroupNetworking.js.map +1 -1
- package/dist/cjs/behavior/system/remote/api/ApiResource.d.ts +14 -0
- package/dist/cjs/behavior/system/remote/api/ApiResource.d.ts.map +1 -1
- package/dist/cjs/behavior/system/remote/api/ApiResource.js +19 -0
- package/dist/cjs/behavior/system/remote/api/ApiResource.js.map +1 -1
- package/dist/cjs/behavior/system/remote/api/Envelope.d.ts +4 -2
- package/dist/cjs/behavior/system/remote/api/Envelope.d.ts.map +1 -1
- package/dist/cjs/behavior/system/remote/api/Envelope.js +7 -5
- package/dist/cjs/behavior/system/remote/api/Envelope.js.map +1 -1
- package/dist/cjs/behavior/system/remote/api/resources/CommandResource.js +2 -2
- package/dist/cjs/behavior/system/remote/api/resources/CommandResource.js.map +1 -1
- package/dist/cjs/behavior/system/remote/api/resources/NodeResource.d.ts +1 -0
- package/dist/cjs/behavior/system/remote/api/resources/NodeResource.d.ts.map +1 -1
- package/dist/cjs/behavior/system/remote/api/resources/NodeResource.js +3 -0
- package/dist/cjs/behavior/system/remote/api/resources/NodeResource.js.map +1 -1
- package/dist/cjs/behavior/system/remote/api/resources/PropertyResource.d.ts.map +1 -1
- package/dist/cjs/behavior/system/remote/api/resources/PropertyResource.js +5 -3
- package/dist/cjs/behavior/system/remote/api/resources/PropertyResource.js.map +1 -1
- package/dist/cjs/behavior/system/remote/api/resources/ServerNodeResource.d.ts.map +1 -1
- package/dist/cjs/behavior/system/remote/api/resources/ServerNodeResource.js +2 -11
- package/dist/cjs/behavior/system/remote/api/resources/ServerNodeResource.js.map +1 -1
- package/dist/cjs/behavior/system/sessions/SessionsBehavior.d.ts +4 -0
- package/dist/cjs/behavior/system/sessions/SessionsBehavior.d.ts.map +1 -1
- package/dist/cjs/behavior/system/sessions/SessionsBehavior.js +6 -1
- package/dist/cjs/behavior/system/sessions/SessionsBehavior.js.map +1 -1
- package/dist/cjs/behavior/system/subscriptions/SubscriptionStore.d.ts +28 -0
- package/dist/cjs/behavior/system/subscriptions/SubscriptionStore.d.ts.map +1 -0
- package/dist/cjs/behavior/system/subscriptions/SubscriptionStore.js +74 -0
- package/dist/cjs/behavior/system/subscriptions/SubscriptionStore.js.map +6 -0
- package/dist/cjs/behavior/system/subscriptions/SubscriptionsServer.d.ts +8 -3
- package/dist/cjs/behavior/system/subscriptions/SubscriptionsServer.d.ts.map +1 -1
- package/dist/cjs/behavior/system/subscriptions/SubscriptionsServer.js +61 -30
- package/dist/cjs/behavior/system/subscriptions/SubscriptionsServer.js.map +1 -1
- package/dist/cjs/behaviors/access-control/AccessControlServer.d.ts +2 -2
- package/dist/cjs/behaviors/access-control/AccessControlServer.d.ts.map +1 -1
- package/dist/cjs/behaviors/administrator-commissioning/AdministratorCommissioningServer.d.ts.map +1 -1
- package/dist/cjs/behaviors/administrator-commissioning/AdministratorCommissioningServer.js +43 -21
- package/dist/cjs/behaviors/administrator-commissioning/AdministratorCommissioningServer.js.map +1 -1
- package/dist/cjs/behaviors/general-diagnostics/GeneralDiagnosticsServer.d.ts +29 -23
- package/dist/cjs/behaviors/general-diagnostics/GeneralDiagnosticsServer.d.ts.map +1 -1
- package/dist/cjs/behaviors/general-diagnostics/GeneralDiagnosticsServer.js +104 -60
- package/dist/cjs/behaviors/general-diagnostics/GeneralDiagnosticsServer.js.map +1 -1
- package/dist/cjs/behaviors/group-key-management/GroupKeyManagementServer.d.ts +9 -1
- package/dist/cjs/behaviors/group-key-management/GroupKeyManagementServer.d.ts.map +1 -1
- package/dist/cjs/behaviors/group-key-management/GroupKeyManagementServer.js +11 -7
- package/dist/cjs/behaviors/group-key-management/GroupKeyManagementServer.js.map +1 -1
- package/dist/cjs/behaviors/groupcast/GroupcastServer.d.ts.map +1 -1
- package/dist/cjs/behaviors/groupcast/GroupcastServer.js +41 -25
- package/dist/cjs/behaviors/groupcast/GroupcastServer.js.map +2 -2
- package/dist/cjs/behaviors/localization-configuration/LocalizationConfigurationServer.d.ts +1 -1
- package/dist/cjs/behaviors/localization-configuration/LocalizationConfigurationServer.d.ts.map +1 -1
- package/dist/cjs/behaviors/localization-configuration/LocalizationConfigurationServer.js +15 -4
- package/dist/cjs/behaviors/localization-configuration/LocalizationConfigurationServer.js.map +2 -2
- package/dist/cjs/behaviors/operational-credentials/VendorIdVerification.d.ts +2 -0
- package/dist/cjs/behaviors/operational-credentials/VendorIdVerification.d.ts.map +1 -1
- package/dist/cjs/behaviors/operational-credentials/VendorIdVerification.js +27 -23
- package/dist/cjs/behaviors/operational-credentials/VendorIdVerification.js.map +1 -1
- package/dist/cjs/behaviors/thermostat/ThermostatServer.d.ts +15 -4
- package/dist/cjs/behaviors/thermostat/ThermostatServer.d.ts.map +1 -1
- package/dist/cjs/behaviors/thermostat/ThermostatServer.js +66 -49
- package/dist/cjs/behaviors/thermostat/ThermostatServer.js.map +1 -1
- package/dist/cjs/behaviors/time-format-localization/TimeFormatLocalizationServer.d.ts +4 -4
- package/dist/cjs/behaviors/time-format-localization/TimeFormatLocalizationServer.d.ts.map +1 -1
- package/dist/cjs/behaviors/time-format-localization/TimeFormatLocalizationServer.js +19 -5
- package/dist/cjs/behaviors/time-format-localization/TimeFormatLocalizationServer.js.map +2 -2
- package/dist/cjs/behaviors/unit-localization/UnitLocalizationServer.d.ts.map +1 -1
- package/dist/cjs/behaviors/unit-localization/UnitLocalizationServer.js +13 -3
- package/dist/cjs/behaviors/unit-localization/UnitLocalizationServer.js.map +1 -1
- package/dist/cjs/endpoint/Endpoint.d.ts +5 -9
- package/dist/cjs/endpoint/Endpoint.d.ts.map +1 -1
- package/dist/cjs/endpoint/Endpoint.js +4 -23
- package/dist/cjs/endpoint/Endpoint.js.map +1 -1
- package/dist/cjs/endpoint/properties/Behaviors.d.ts.map +1 -1
- package/dist/cjs/endpoint/properties/Behaviors.js +5 -1
- package/dist/cjs/endpoint/properties/Behaviors.js.map +1 -1
- package/dist/cjs/node/ClientNode.d.ts +25 -0
- package/dist/cjs/node/ClientNode.d.ts.map +1 -1
- package/dist/cjs/node/ClientNode.js +41 -0
- package/dist/cjs/node/ClientNode.js.map +1 -1
- package/dist/cjs/node/ServerNode.d.ts.map +1 -1
- package/dist/cjs/node/ServerNode.js +2 -0
- package/dist/cjs/node/ServerNode.js.map +1 -1
- package/dist/cjs/node/client/ClientCommandMethod.d.ts.map +1 -1
- package/dist/cjs/node/client/ClientCommandMethod.js +3 -15
- package/dist/cjs/node/client/ClientCommandMethod.js.map +1 -1
- package/dist/cjs/node/client/ClientEventEmitter.d.ts.map +1 -1
- package/dist/cjs/node/client/ClientEventEmitter.js +6 -2
- package/dist/cjs/node/client/ClientEventEmitter.js.map +1 -1
- package/dist/cjs/node/client/ClientStructure.d.ts.map +1 -1
- package/dist/cjs/node/client/ClientStructure.js +181 -108
- package/dist/cjs/node/client/ClientStructure.js.map +2 -2
- package/dist/cjs/node/client/Peers.d.ts +18 -6
- package/dist/cjs/node/client/Peers.d.ts.map +1 -1
- package/dist/cjs/node/client/Peers.js +29 -13
- package/dist/cjs/node/client/Peers.js.map +1 -1
- package/dist/cjs/node/integration/ChangeNotificationService.d.ts +14 -3
- package/dist/cjs/node/integration/ChangeNotificationService.d.ts.map +1 -1
- package/dist/cjs/node/integration/ProtocolService.d.ts.map +1 -1
- package/dist/cjs/node/integration/ProtocolService.js +38 -56
- package/dist/cjs/node/integration/ProtocolService.js.map +1 -1
- package/dist/cjs/node/server/InteractionServer.d.ts.map +1 -1
- package/dist/cjs/node/server/InteractionServer.js +28 -24
- package/dist/cjs/node/server/InteractionServer.js.map +2 -2
- package/dist/cjs/node/server/ServerSubscription.d.ts +7 -2
- package/dist/cjs/node/server/ServerSubscription.d.ts.map +1 -1
- package/dist/cjs/node/server/ServerSubscription.js +83 -47
- package/dist/cjs/node/server/ServerSubscription.js.map +1 -1
- package/dist/cjs/storage/EndpointStore.d.ts +1 -1
- package/dist/cjs/storage/EndpointStore.js +1 -1
- package/dist/cjs/storage/client/ClientEndpointStore.d.ts +2 -2
- package/dist/cjs/storage/client/ClientEndpointStore.d.ts.map +1 -1
- package/dist/cjs/storage/client/ClientEndpointStore.js +1 -1
- package/dist/cjs/storage/client/DatasourceCache.d.ts +5 -3
- package/dist/cjs/storage/client/DatasourceCache.d.ts.map +1 -1
- package/dist/cjs/storage/client/DatasourceCache.js +68 -71
- package/dist/cjs/storage/client/DatasourceCache.js.map +1 -1
- package/dist/cjs/storage/client/FabricScopedListWrite.d.ts +73 -0
- package/dist/cjs/storage/client/FabricScopedListWrite.d.ts.map +1 -0
- package/dist/cjs/storage/client/FabricScopedListWrite.js +168 -0
- package/dist/cjs/storage/client/FabricScopedListWrite.js.map +6 -0
- package/dist/cjs/storage/client/RemoteWriteParticipant.d.ts +9 -6
- package/dist/cjs/storage/client/RemoteWriteParticipant.d.ts.map +1 -1
- package/dist/cjs/storage/client/RemoteWriteParticipant.js +11 -15
- package/dist/cjs/storage/client/RemoteWriteParticipant.js.map +1 -1
- package/dist/cjs/storage/client/RemoteWriter.d.ts +67 -7
- package/dist/cjs/storage/client/RemoteWriter.d.ts.map +1 -1
- package/dist/cjs/storage/client/RemoteWriter.js +61 -13
- package/dist/cjs/storage/client/RemoteWriter.js.map +1 -1
- package/dist/cjs/storage/server/DatasourceStore.d.ts +2 -2
- package/dist/cjs/storage/server/DatasourceStore.d.ts.map +1 -1
- package/dist/cjs/storage/server/DatasourceStore.js.map +1 -1
- package/dist/cjs/storage/server/ServerEndpointStore.d.ts +2 -2
- package/dist/cjs/storage/server/ServerEndpointStore.d.ts.map +1 -1
- package/dist/cjs/storage/server/ServerEndpointStore.js +1 -1
- package/dist/cjs/testing/mock-server-node.d.ts +2 -1
- package/dist/cjs/testing/mock-server-node.d.ts.map +1 -1
- package/dist/cjs/testing/mock-server-node.js +8 -5
- package/dist/cjs/testing/mock-server-node.js.map +2 -2
- package/dist/cjs/testing/node-helpers.d.ts +5 -0
- package/dist/cjs/testing/node-helpers.d.ts.map +1 -1
- package/dist/cjs/testing/node-helpers.js +4 -4
- package/dist/cjs/testing/node-helpers.js.map +1 -1
- package/dist/esm/behavior/Behavior.d.ts.map +1 -1
- package/dist/esm/behavior/Behavior.js +2 -0
- package/dist/esm/behavior/Behavior.js.map +1 -1
- package/dist/esm/behavior/Events.d.ts.map +1 -1
- package/dist/esm/behavior/Events.js +4 -2
- package/dist/esm/behavior/Events.js.map +1 -1
- package/dist/esm/behavior/cluster/ClusterBehavior.d.ts +17 -3
- package/dist/esm/behavior/cluster/ClusterBehavior.d.ts.map +1 -1
- package/dist/esm/behavior/cluster/ClusterBehavior.js +2 -20
- package/dist/esm/behavior/cluster/ClusterBehavior.js.map +1 -1
- package/dist/esm/behavior/cluster/ClusterBehaviorType.d.ts.map +1 -1
- package/dist/esm/behavior/cluster/ClusterBehaviorType.js +10 -159
- package/dist/esm/behavior/cluster/ClusterBehaviorType.js.map +1 -1
- package/dist/esm/behavior/context/server/LocalActorContext.d.ts +1 -1
- package/dist/esm/behavior/context/server/LocalActorContext.d.ts.map +1 -1
- package/dist/esm/behavior/internal/BehaviorBacking.d.ts +2 -2
- package/dist/esm/behavior/internal/BehaviorBacking.d.ts.map +1 -1
- package/dist/esm/behavior/internal/BehaviorBacking.js +2 -0
- package/dist/esm/behavior/internal/BehaviorBacking.js.map +1 -1
- package/dist/esm/behavior/internal/ClusterDerivation.d.ts +45 -0
- package/dist/esm/behavior/internal/ClusterDerivation.d.ts.map +1 -0
- package/dist/esm/behavior/internal/ClusterDerivation.js +172 -0
- package/dist/esm/behavior/internal/ClusterDerivation.js.map +6 -0
- package/dist/esm/behavior/internal/ClusterStatics.d.ts +16 -0
- package/dist/esm/behavior/internal/ClusterStatics.d.ts.map +1 -0
- package/dist/esm/behavior/internal/ClusterStatics.js +118 -0
- package/dist/esm/behavior/internal/ClusterStatics.js.map +6 -0
- package/dist/esm/behavior/internal/ModeledState.d.ts +18 -0
- package/dist/esm/behavior/internal/ModeledState.d.ts.map +1 -0
- package/dist/esm/behavior/internal/ModeledState.js +34 -0
- package/dist/esm/behavior/internal/ModeledState.js.map +6 -0
- package/dist/esm/behavior/internal/ServerBehaviorBacking.d.ts +1 -1
- package/dist/esm/behavior/internal/ServerBehaviorBacking.d.ts.map +1 -1
- package/dist/esm/behavior/internal/ServerBehaviorBacking.js +3 -12
- package/dist/esm/behavior/internal/ServerBehaviorBacking.js.map +1 -1
- package/dist/esm/behavior/state/managed/Datasource.d.ts +54 -10
- package/dist/esm/behavior/state/managed/Datasource.d.ts.map +1 -1
- package/dist/esm/behavior/state/managed/Datasource.js +107 -38
- package/dist/esm/behavior/state/managed/Datasource.js.map +1 -1
- package/dist/esm/behavior/state/managed/Internal.d.ts +20 -5
- package/dist/esm/behavior/state/managed/Internal.d.ts.map +1 -1
- package/dist/esm/behavior/state/managed/Internal.js +28 -26
- package/dist/esm/behavior/state/managed/Internal.js.map +1 -1
- package/dist/esm/behavior/state/managed/ManagedReference.d.ts +56 -12
- package/dist/esm/behavior/state/managed/ManagedReference.d.ts.map +1 -1
- package/dist/esm/behavior/state/managed/ManagedReference.js +103 -43
- package/dist/esm/behavior/state/managed/ManagedReference.js.map +1 -1
- package/dist/esm/behavior/state/managed/NameResolver.js +1 -1
- package/dist/esm/behavior/state/managed/NameResolver.js.map +1 -1
- package/dist/esm/behavior/state/managed/ReadOnlyReference.d.ts +33 -0
- package/dist/esm/behavior/state/managed/ReadOnlyReference.d.ts.map +1 -0
- package/dist/esm/behavior/state/managed/ReadOnlyReference.js +45 -0
- package/dist/esm/behavior/state/managed/ReadOnlyReference.js.map +6 -0
- package/dist/esm/behavior/state/managed/ValReference.d.ts +80 -13
- package/dist/esm/behavior/state/managed/ValReference.d.ts.map +1 -1
- package/dist/esm/behavior/state/managed/ValReference.js +28 -0
- package/dist/esm/behavior/state/managed/ValReference.js.map +2 -2
- package/dist/esm/behavior/state/managed/errors.d.ts +25 -0
- package/dist/esm/behavior/state/managed/errors.d.ts.map +1 -0
- package/dist/esm/behavior/state/managed/errors.js +20 -0
- package/dist/esm/behavior/state/managed/errors.js.map +6 -0
- package/dist/esm/behavior/state/managed/index.d.ts +1 -0
- package/dist/esm/behavior/state/managed/index.d.ts.map +1 -1
- package/dist/esm/behavior/state/managed/index.js +1 -0
- package/dist/esm/behavior/state/managed/index.js.map +1 -1
- package/dist/esm/behavior/state/managed/values/BitmapManager.js +6 -21
- package/dist/esm/behavior/state/managed/values/BitmapManager.js.map +1 -1
- package/dist/esm/behavior/state/managed/values/ListManager.d.ts +0 -5
- package/dist/esm/behavior/state/managed/values/ListManager.d.ts.map +1 -1
- package/dist/esm/behavior/state/managed/values/ListManager.js +277 -144
- package/dist/esm/behavior/state/managed/values/ListManager.js.map +2 -2
- package/dist/esm/behavior/state/managed/values/StructManager.d.ts.map +1 -1
- package/dist/esm/behavior/state/managed/values/StructManager.js +31 -36
- package/dist/esm/behavior/state/managed/values/StructManager.js.map +2 -2
- package/dist/esm/behavior/state/managed/values/ValuePatcher.d.ts +8 -0
- package/dist/esm/behavior/state/managed/values/ValuePatcher.d.ts.map +1 -1
- package/dist/esm/behavior/state/managed/values/ValuePatcher.js +13 -2
- package/dist/esm/behavior/state/managed/values/ValuePatcher.js.map +1 -1
- package/dist/esm/behavior/state/validation/FabricIndexField.d.ts +30 -0
- package/dist/esm/behavior/state/validation/FabricIndexField.d.ts.map +1 -0
- package/dist/esm/behavior/state/validation/FabricIndexField.js +33 -0
- package/dist/esm/behavior/state/validation/FabricIndexField.js.map +6 -0
- package/dist/esm/behavior/state/validation/ValueValidator.d.ts.map +1 -1
- package/dist/esm/behavior/state/validation/ValueValidator.js +17 -37
- package/dist/esm/behavior/state/validation/ValueValidator.js.map +1 -1
- package/dist/esm/behavior/state/validation/conformance.d.ts.map +1 -1
- package/dist/esm/behavior/state/validation/conformance.js +6 -5
- package/dist/esm/behavior/state/validation/conformance.js.map +1 -1
- package/dist/esm/behavior/state/validation/constraint.d.ts.map +1 -1
- package/dist/esm/behavior/state/validation/constraint.js +3 -1
- package/dist/esm/behavior/state/validation/constraint.js.map +1 -1
- package/dist/esm/behavior/state/validation/location.d.ts +6 -0
- package/dist/esm/behavior/state/validation/location.d.ts.map +1 -1
- package/dist/esm/behavior/state/validation/remote-validation.d.ts +57 -0
- package/dist/esm/behavior/state/validation/remote-validation.d.ts.map +1 -0
- package/dist/esm/behavior/state/validation/remote-validation.js +48 -0
- package/dist/esm/behavior/state/validation/remote-validation.js.map +6 -0
- package/dist/esm/behavior/supervision/Supervision.d.ts.map +1 -1
- package/dist/esm/behavior/supervision/Supervision.js +1 -1
- package/dist/esm/behavior/supervision/Supervision.js.map +1 -1
- package/dist/esm/behavior/supervision/SupervisionConfig.d.ts.map +1 -1
- package/dist/esm/behavior/supervision/SupervisionConfig.js +1 -1
- package/dist/esm/behavior/supervision/SupervisionConfig.js.map +1 -1
- package/dist/esm/behavior/supervision/ValueSupervisor.d.ts +3 -12
- package/dist/esm/behavior/supervision/ValueSupervisor.d.ts.map +1 -1
- package/dist/esm/behavior/system/commissioning/CommissioningClient.d.ts +57 -6
- package/dist/esm/behavior/system/commissioning/CommissioningClient.d.ts.map +1 -1
- package/dist/esm/behavior/system/commissioning/CommissioningClient.js +87 -0
- package/dist/esm/behavior/system/commissioning/CommissioningClient.js.map +1 -1
- package/dist/esm/behavior/system/commissioning/RemoteDescriptor.d.ts +9 -1
- package/dist/esm/behavior/system/commissioning/RemoteDescriptor.d.ts.map +1 -1
- package/dist/esm/behavior/system/commissioning/RemoteDescriptor.js +10 -1
- package/dist/esm/behavior/system/commissioning/RemoteDescriptor.js.map +1 -1
- package/dist/esm/behavior/system/controller/ControllerBehavior.d.ts +2 -1
- package/dist/esm/behavior/system/controller/ControllerBehavior.d.ts.map +1 -1
- package/dist/esm/behavior/system/controller/ControllerBehavior.js +2 -1
- package/dist/esm/behavior/system/controller/ControllerBehavior.js.map +1 -1
- package/dist/esm/behavior/system/dcl/DclBehavior.d.ts +3 -3
- package/dist/esm/behavior/system/network/ServerGroupNetworking.d.ts +2 -1
- package/dist/esm/behavior/system/network/ServerGroupNetworking.d.ts.map +1 -1
- package/dist/esm/behavior/system/network/ServerGroupNetworking.js.map +1 -1
- package/dist/esm/behavior/system/remote/api/ApiResource.d.ts +14 -0
- package/dist/esm/behavior/system/remote/api/ApiResource.d.ts.map +1 -1
- package/dist/esm/behavior/system/remote/api/ApiResource.js +19 -0
- package/dist/esm/behavior/system/remote/api/ApiResource.js.map +1 -1
- package/dist/esm/behavior/system/remote/api/Envelope.d.ts +4 -2
- package/dist/esm/behavior/system/remote/api/Envelope.d.ts.map +1 -1
- package/dist/esm/behavior/system/remote/api/Envelope.js +7 -5
- package/dist/esm/behavior/system/remote/api/Envelope.js.map +1 -1
- package/dist/esm/behavior/system/remote/api/resources/CommandResource.js +2 -2
- package/dist/esm/behavior/system/remote/api/resources/CommandResource.js.map +1 -1
- package/dist/esm/behavior/system/remote/api/resources/NodeResource.d.ts +1 -0
- package/dist/esm/behavior/system/remote/api/resources/NodeResource.d.ts.map +1 -1
- package/dist/esm/behavior/system/remote/api/resources/NodeResource.js +3 -0
- package/dist/esm/behavior/system/remote/api/resources/NodeResource.js.map +1 -1
- package/dist/esm/behavior/system/remote/api/resources/PropertyResource.d.ts.map +1 -1
- package/dist/esm/behavior/system/remote/api/resources/PropertyResource.js +5 -3
- package/dist/esm/behavior/system/remote/api/resources/PropertyResource.js.map +1 -1
- package/dist/esm/behavior/system/remote/api/resources/ServerNodeResource.d.ts.map +1 -1
- package/dist/esm/behavior/system/remote/api/resources/ServerNodeResource.js +2 -11
- package/dist/esm/behavior/system/remote/api/resources/ServerNodeResource.js.map +1 -1
- package/dist/esm/behavior/system/sessions/SessionsBehavior.d.ts +4 -0
- package/dist/esm/behavior/system/sessions/SessionsBehavior.d.ts.map +1 -1
- package/dist/esm/behavior/system/sessions/SessionsBehavior.js +6 -1
- package/dist/esm/behavior/system/sessions/SessionsBehavior.js.map +1 -1
- package/dist/esm/behavior/system/subscriptions/SubscriptionStore.d.ts +28 -0
- package/dist/esm/behavior/system/subscriptions/SubscriptionStore.d.ts.map +1 -0
- package/dist/esm/behavior/system/subscriptions/SubscriptionStore.js +54 -0
- package/dist/esm/behavior/system/subscriptions/SubscriptionStore.js.map +6 -0
- package/dist/esm/behavior/system/subscriptions/SubscriptionsServer.d.ts +8 -3
- package/dist/esm/behavior/system/subscriptions/SubscriptionsServer.d.ts.map +1 -1
- package/dist/esm/behavior/system/subscriptions/SubscriptionsServer.js +61 -30
- package/dist/esm/behavior/system/subscriptions/SubscriptionsServer.js.map +1 -1
- package/dist/esm/behaviors/access-control/AccessControlServer.d.ts +2 -2
- package/dist/esm/behaviors/access-control/AccessControlServer.d.ts.map +1 -1
- package/dist/esm/behaviors/administrator-commissioning/AdministratorCommissioningServer.d.ts.map +1 -1
- package/dist/esm/behaviors/administrator-commissioning/AdministratorCommissioningServer.js +43 -21
- package/dist/esm/behaviors/administrator-commissioning/AdministratorCommissioningServer.js.map +1 -1
- package/dist/esm/behaviors/general-diagnostics/GeneralDiagnosticsServer.d.ts +29 -23
- package/dist/esm/behaviors/general-diagnostics/GeneralDiagnosticsServer.d.ts.map +1 -1
- package/dist/esm/behaviors/general-diagnostics/GeneralDiagnosticsServer.js +105 -60
- package/dist/esm/behaviors/general-diagnostics/GeneralDiagnosticsServer.js.map +1 -1
- package/dist/esm/behaviors/group-key-management/GroupKeyManagementServer.d.ts +9 -1
- package/dist/esm/behaviors/group-key-management/GroupKeyManagementServer.d.ts.map +1 -1
- package/dist/esm/behaviors/group-key-management/GroupKeyManagementServer.js +11 -7
- package/dist/esm/behaviors/group-key-management/GroupKeyManagementServer.js.map +1 -1
- package/dist/esm/behaviors/groupcast/GroupcastServer.d.ts.map +1 -1
- package/dist/esm/behaviors/groupcast/GroupcastServer.js +42 -25
- package/dist/esm/behaviors/groupcast/GroupcastServer.js.map +2 -2
- package/dist/esm/behaviors/localization-configuration/LocalizationConfigurationServer.d.ts +1 -1
- package/dist/esm/behaviors/localization-configuration/LocalizationConfigurationServer.d.ts.map +1 -1
- package/dist/esm/behaviors/localization-configuration/LocalizationConfigurationServer.js +15 -4
- package/dist/esm/behaviors/localization-configuration/LocalizationConfigurationServer.js.map +2 -2
- package/dist/esm/behaviors/operational-credentials/VendorIdVerification.d.ts +2 -0
- package/dist/esm/behaviors/operational-credentials/VendorIdVerification.d.ts.map +1 -1
- package/dist/esm/behaviors/operational-credentials/VendorIdVerification.js +32 -24
- package/dist/esm/behaviors/operational-credentials/VendorIdVerification.js.map +1 -1
- package/dist/esm/behaviors/thermostat/ThermostatServer.d.ts +15 -4
- package/dist/esm/behaviors/thermostat/ThermostatServer.d.ts.map +1 -1
- package/dist/esm/behaviors/thermostat/ThermostatServer.js +66 -49
- package/dist/esm/behaviors/thermostat/ThermostatServer.js.map +1 -1
- package/dist/esm/behaviors/time-format-localization/TimeFormatLocalizationServer.d.ts +4 -4
- package/dist/esm/behaviors/time-format-localization/TimeFormatLocalizationServer.d.ts.map +1 -1
- package/dist/esm/behaviors/time-format-localization/TimeFormatLocalizationServer.js +19 -5
- package/dist/esm/behaviors/time-format-localization/TimeFormatLocalizationServer.js.map +2 -2
- package/dist/esm/behaviors/unit-localization/UnitLocalizationServer.d.ts.map +1 -1
- package/dist/esm/behaviors/unit-localization/UnitLocalizationServer.js +13 -3
- package/dist/esm/behaviors/unit-localization/UnitLocalizationServer.js.map +1 -1
- package/dist/esm/endpoint/Endpoint.d.ts +5 -9
- package/dist/esm/endpoint/Endpoint.d.ts.map +1 -1
- package/dist/esm/endpoint/Endpoint.js +5 -24
- package/dist/esm/endpoint/Endpoint.js.map +1 -1
- package/dist/esm/endpoint/properties/Behaviors.d.ts.map +1 -1
- package/dist/esm/endpoint/properties/Behaviors.js +6 -2
- package/dist/esm/endpoint/properties/Behaviors.js.map +1 -1
- package/dist/esm/node/ClientNode.d.ts +25 -0
- package/dist/esm/node/ClientNode.d.ts.map +1 -1
- package/dist/esm/node/ClientNode.js +41 -0
- package/dist/esm/node/ClientNode.js.map +1 -1
- package/dist/esm/node/ServerNode.d.ts.map +1 -1
- package/dist/esm/node/ServerNode.js +2 -0
- package/dist/esm/node/ServerNode.js.map +1 -1
- package/dist/esm/node/client/ClientCommandMethod.d.ts.map +1 -1
- package/dist/esm/node/client/ClientCommandMethod.js +4 -16
- package/dist/esm/node/client/ClientCommandMethod.js.map +1 -1
- package/dist/esm/node/client/ClientEventEmitter.d.ts.map +1 -1
- package/dist/esm/node/client/ClientEventEmitter.js +6 -2
- package/dist/esm/node/client/ClientEventEmitter.js.map +1 -1
- package/dist/esm/node/client/ClientStructure.d.ts.map +1 -1
- package/dist/esm/node/client/ClientStructure.js +181 -108
- package/dist/esm/node/client/ClientStructure.js.map +2 -2
- package/dist/esm/node/client/Peers.d.ts +18 -6
- package/dist/esm/node/client/Peers.d.ts.map +1 -1
- package/dist/esm/node/client/Peers.js +29 -14
- package/dist/esm/node/client/Peers.js.map +1 -1
- package/dist/esm/node/integration/ChangeNotificationService.d.ts +14 -3
- package/dist/esm/node/integration/ChangeNotificationService.d.ts.map +1 -1
- package/dist/esm/node/integration/ProtocolService.d.ts.map +1 -1
- package/dist/esm/node/integration/ProtocolService.js +40 -57
- package/dist/esm/node/integration/ProtocolService.js.map +1 -1
- package/dist/esm/node/server/InteractionServer.d.ts.map +1 -1
- package/dist/esm/node/server/InteractionServer.js +28 -25
- package/dist/esm/node/server/InteractionServer.js.map +2 -2
- package/dist/esm/node/server/ServerSubscription.d.ts +7 -2
- package/dist/esm/node/server/ServerSubscription.d.ts.map +1 -1
- package/dist/esm/node/server/ServerSubscription.js +83 -47
- package/dist/esm/node/server/ServerSubscription.js.map +1 -1
- package/dist/esm/storage/EndpointStore.d.ts +1 -1
- package/dist/esm/storage/EndpointStore.js +1 -1
- package/dist/esm/storage/client/ClientEndpointStore.d.ts +2 -2
- package/dist/esm/storage/client/ClientEndpointStore.d.ts.map +1 -1
- package/dist/esm/storage/client/ClientEndpointStore.js +1 -1
- package/dist/esm/storage/client/DatasourceCache.d.ts +5 -3
- package/dist/esm/storage/client/DatasourceCache.d.ts.map +1 -1
- package/dist/esm/storage/client/DatasourceCache.js +68 -71
- package/dist/esm/storage/client/DatasourceCache.js.map +1 -1
- package/dist/esm/storage/client/FabricScopedListWrite.d.ts +73 -0
- package/dist/esm/storage/client/FabricScopedListWrite.d.ts.map +1 -0
- package/dist/esm/storage/client/FabricScopedListWrite.js +148 -0
- package/dist/esm/storage/client/FabricScopedListWrite.js.map +6 -0
- package/dist/esm/storage/client/RemoteWriteParticipant.d.ts +9 -6
- package/dist/esm/storage/client/RemoteWriteParticipant.d.ts.map +1 -1
- package/dist/esm/storage/client/RemoteWriteParticipant.js +11 -15
- package/dist/esm/storage/client/RemoteWriteParticipant.js.map +1 -1
- package/dist/esm/storage/client/RemoteWriter.d.ts +67 -7
- package/dist/esm/storage/client/RemoteWriter.d.ts.map +1 -1
- package/dist/esm/storage/client/RemoteWriter.js +65 -14
- package/dist/esm/storage/client/RemoteWriter.js.map +1 -1
- package/dist/esm/storage/server/DatasourceStore.d.ts +2 -2
- package/dist/esm/storage/server/DatasourceStore.d.ts.map +1 -1
- package/dist/esm/storage/server/DatasourceStore.js.map +1 -1
- package/dist/esm/storage/server/ServerEndpointStore.d.ts +2 -2
- package/dist/esm/storage/server/ServerEndpointStore.d.ts.map +1 -1
- package/dist/esm/storage/server/ServerEndpointStore.js +1 -1
- package/dist/esm/testing/mock-server-node.d.ts +2 -1
- package/dist/esm/testing/mock-server-node.d.ts.map +1 -1
- package/dist/esm/testing/mock-server-node.js +16 -7
- package/dist/esm/testing/mock-server-node.js.map +2 -2
- package/dist/esm/testing/node-helpers.d.ts +5 -0
- package/dist/esm/testing/node-helpers.d.ts.map +1 -1
- package/dist/esm/testing/node-helpers.js +4 -4
- package/dist/esm/testing/node-helpers.js.map +1 -1
- package/package.json +6 -6
- package/src/behavior/Behavior.ts +2 -0
- package/src/behavior/Events.ts +6 -3
- package/src/behavior/cluster/ClusterBehavior.ts +22 -13
- package/src/behavior/cluster/ClusterBehaviorType.ts +9 -270
- package/src/behavior/context/server/LocalActorContext.ts +1 -4
- package/src/behavior/internal/BehaviorBacking.ts +10 -2
- package/src/behavior/internal/ClusterDerivation.ts +295 -0
- package/src/behavior/internal/ClusterStatics.ts +180 -0
- package/src/behavior/internal/ModeledState.ts +58 -0
- package/src/behavior/internal/ServerBehaviorBacking.ts +9 -16
- package/src/behavior/state/managed/Datasource.ts +181 -58
- package/src/behavior/state/managed/Internal.ts +44 -34
- package/src/behavior/state/managed/ManagedReference.ts +159 -70
- package/src/behavior/state/managed/NameResolver.ts +1 -1
- package/src/behavior/state/managed/ReadOnlyReference.ts +61 -0
- package/src/behavior/state/managed/ValReference.ts +104 -14
- package/src/behavior/state/managed/errors.ts +33 -0
- package/src/behavior/state/managed/index.ts +1 -0
- package/src/behavior/state/managed/values/BitmapManager.ts +6 -22
- package/src/behavior/state/managed/values/ListManager.ts +313 -164
- package/src/behavior/state/managed/values/StructManager.ts +48 -52
- package/src/behavior/state/managed/values/ValuePatcher.ts +25 -3
- package/src/behavior/state/validation/FabricIndexField.ts +51 -0
- package/src/behavior/state/validation/ValueValidator.ts +24 -54
- package/src/behavior/state/validation/conformance.ts +9 -7
- package/src/behavior/state/validation/constraint.ts +5 -1
- package/src/behavior/state/validation/location.ts +8 -0
- package/src/behavior/state/validation/remote-validation.ts +107 -0
- package/src/behavior/supervision/Supervision.ts +1 -2
- package/src/behavior/supervision/SupervisionConfig.ts +1 -2
- package/src/behavior/supervision/ValueSupervisor.ts +3 -13
- package/src/behavior/system/commissioning/CommissioningClient.ts +122 -6
- package/src/behavior/system/commissioning/RemoteDescriptor.ts +17 -1
- package/src/behavior/system/controller/ControllerBehavior.ts +2 -1
- package/src/behavior/system/dcl/DclBehavior.ts +3 -3
- package/src/behavior/system/network/ServerGroupNetworking.ts +3 -2
- package/src/behavior/system/remote/api/ApiResource.ts +23 -0
- package/src/behavior/system/remote/api/Envelope.ts +8 -6
- package/src/behavior/system/remote/api/resources/CommandResource.ts +2 -2
- package/src/behavior/system/remote/api/resources/NodeResource.ts +4 -0
- package/src/behavior/system/remote/api/resources/PropertyResource.ts +5 -3
- package/src/behavior/system/remote/api/resources/ServerNodeResource.ts +2 -13
- package/src/behavior/system/sessions/SessionsBehavior.ts +8 -2
- package/src/behavior/system/subscriptions/SubscriptionStore.ts +66 -0
- package/src/behavior/system/subscriptions/SubscriptionsServer.ts +73 -33
- package/src/behaviors/access-control/AccessControlServer.ts +3 -3
- package/src/behaviors/administrator-commissioning/AdministratorCommissioningServer.ts +47 -24
- package/src/behaviors/general-diagnostics/GeneralDiagnosticsServer.ts +138 -84
- package/src/behaviors/group-key-management/GroupKeyManagementServer.ts +12 -8
- package/src/behaviors/groupcast/GroupcastServer.ts +50 -34
- package/src/behaviors/localization-configuration/LocalizationConfigurationServer.ts +18 -6
- package/src/behaviors/operational-credentials/VendorIdVerification.ts +50 -35
- package/src/behaviors/thermostat/ThermostatServer.ts +93 -70
- package/src/behaviors/time-format-localization/TimeFormatLocalizationServer.ts +24 -9
- package/src/behaviors/unit-localization/UnitLocalizationServer.ts +17 -4
- package/src/endpoint/Endpoint.ts +5 -31
- package/src/endpoint/properties/Behaviors.ts +6 -2
- package/src/node/ClientNode.ts +41 -0
- package/src/node/ServerNode.ts +2 -0
- package/src/node/client/ClientCommandMethod.ts +4 -19
- package/src/node/client/ClientEventEmitter.ts +7 -3
- package/src/node/client/ClientStructure.ts +208 -135
- package/src/node/client/Peers.ts +36 -20
- package/src/node/integration/ChangeNotificationService.ts +18 -3
- package/src/node/integration/ProtocolService.ts +45 -57
- package/src/node/server/InteractionServer.ts +33 -35
- package/src/node/server/ServerSubscription.ts +88 -50
- package/src/storage/EndpointStore.ts +1 -1
- package/src/storage/client/ClientEndpointStore.ts +1 -1
- package/src/storage/client/DatasourceCache.ts +86 -79
- package/src/storage/client/FabricScopedListWrite.ts +245 -0
- package/src/storage/client/RemoteWriteParticipant.ts +20 -23
- package/src/storage/client/RemoteWriter.ts +156 -26
- package/src/storage/server/DatasourceStore.ts +2 -2
- package/src/storage/server/ServerEndpointStore.ts +1 -1
- package/src/testing/mock-server-node.ts +22 -9
- package/src/testing/node-helpers.ts +5 -1
- package/dist/cjs/behavior/state/validation/FabricIndexSentinel.d.ts +0 -14
- package/dist/cjs/behavior/state/validation/FabricIndexSentinel.d.ts.map +0 -1
- package/dist/cjs/behavior/state/validation/FabricIndexSentinel.js.map +0 -6
- package/dist/cjs/behavior/state/validation/peer-forwarding.d.ts +0 -20
- package/dist/cjs/behavior/state/validation/peer-forwarding.d.ts.map +0 -1
- package/dist/cjs/behavior/state/validation/peer-forwarding.js.map +0 -6
- package/dist/esm/behavior/state/validation/FabricIndexSentinel.d.ts +0 -14
- package/dist/esm/behavior/state/validation/FabricIndexSentinel.d.ts.map +0 -1
- package/dist/esm/behavior/state/validation/FabricIndexSentinel.js +0 -15
- package/dist/esm/behavior/state/validation/FabricIndexSentinel.js.map +0 -6
- package/dist/esm/behavior/state/validation/peer-forwarding.d.ts +0 -20
- package/dist/esm/behavior/state/validation/peer-forwarding.d.ts.map +0 -1
- package/dist/esm/behavior/state/validation/peer-forwarding.js +0 -26
- package/dist/esm/behavior/state/validation/peer-forwarding.js.map +0 -6
- package/src/behavior/state/validation/FabricIndexSentinel.ts +0 -20
- package/src/behavior/state/validation/peer-forwarding.ts +0 -47
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
MaybePromise,
|
|
25
25
|
Millis,
|
|
26
26
|
Minutes,
|
|
27
|
+
Network,
|
|
27
28
|
Seconds,
|
|
28
29
|
Time,
|
|
29
30
|
Timer,
|
|
@@ -57,6 +58,32 @@ const schema = Base.schema.extend(
|
|
|
57
58
|
FieldElement({ name: "totalOperationalHoursCounter", type: "uint64", quality: "N", conformance: "M" }),
|
|
58
59
|
);
|
|
59
60
|
|
|
61
|
+
/**
|
|
62
|
+
* The node's System Time: time since the node came online, or zero while it is offline.
|
|
63
|
+
*
|
|
64
|
+
* UpTime and the SystemTimeMs of TimeSnapshot both read this, so they share one base.
|
|
65
|
+
*
|
|
66
|
+
* Takes whichever clock elapsed more so a suspend (wall clock advances, monotonic clock does not) is counted. A
|
|
67
|
+
* forward wall-clock step is folded in the same way, which can make the value run ahead of real elapsed time; accepted
|
|
68
|
+
* since it has no deadline consequences. The high-water mark then keeps a later backward step from lowering what was
|
|
69
|
+
* already reported.
|
|
70
|
+
*
|
|
71
|
+
* @see {@link MatterSpecification.v161.Core} § 11.12.6.3
|
|
72
|
+
*/
|
|
73
|
+
function systemTime(internal: GeneralDiagnosticsServer.Internal): Duration {
|
|
74
|
+
const { onlineAtUs, onlineAtMs } = internal;
|
|
75
|
+
if (onlineAtUs === undefined || onlineAtMs === undefined) {
|
|
76
|
+
return 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const elapsed = Duration.max(
|
|
80
|
+
Duration.max(elapsedSince(onlineAtUs, Time.nowUs), elapsedSince(onlineAtMs, Time.nowMs)),
|
|
81
|
+
internal.systemTimeHighWaterMark,
|
|
82
|
+
);
|
|
83
|
+
internal.systemTimeHighWaterMark = elapsed;
|
|
84
|
+
return elapsed;
|
|
85
|
+
}
|
|
86
|
+
|
|
60
87
|
/**
|
|
61
88
|
* Time elapsed between {@link start} and {@link end}, floored at zero.
|
|
62
89
|
*
|
|
@@ -67,6 +94,29 @@ function elapsedSince(start: Timestamp, end: Timestamp): Duration {
|
|
|
67
94
|
return Duration.max(0, Timespan(start, end).duration);
|
|
68
95
|
}
|
|
69
96
|
|
|
97
|
+
const ENABLE_KEY_LENGTH = 16;
|
|
98
|
+
|
|
99
|
+
function isAllZero(bytes: Bytes) {
|
|
100
|
+
return Bytes.of(bytes).every(byte => byte === 0);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Compares the whole key in constant time, so the response time does not reveal how many leading bytes matched. Keys
|
|
105
|
+
* of any length other than 16 bytes never match.
|
|
106
|
+
*/
|
|
107
|
+
function enableKeysMatch(received: Bytes, configured: Bytes) {
|
|
108
|
+
const a = Bytes.of(received);
|
|
109
|
+
const b = Bytes.of(configured);
|
|
110
|
+
if (a.length !== ENABLE_KEY_LENGTH || b.length !== ENABLE_KEY_LENGTH) {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
let difference = 0;
|
|
114
|
+
for (let i = 0; i < ENABLE_KEY_LENGTH; i++) {
|
|
115
|
+
difference |= a[i] ^ b[i];
|
|
116
|
+
}
|
|
117
|
+
return difference === 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
70
120
|
/**
|
|
71
121
|
* This is the default server implementation of GeneralDiagnosticsBehavior.
|
|
72
122
|
*
|
|
@@ -74,7 +124,9 @@ function elapsedSince(start: Timestamp, end: Timestamp): Duration {
|
|
|
74
124
|
* handle test Event triggers.
|
|
75
125
|
*
|
|
76
126
|
* To handle test Event triggers please override the triggerTestEvent method. If these test events are used in
|
|
77
|
-
* certification please also set the EnableKey in the enhanced state as `deviceTestEnableKey
|
|
127
|
+
* certification please also set the EnableKey in the enhanced state as `deviceTestEnableKey` before the behavior
|
|
128
|
+
* initializes. The testEventTriggersEnabled attribute follows from that key: it is true exactly when the key is not
|
|
129
|
+
* all zeros.
|
|
78
130
|
*
|
|
79
131
|
* To register or clear hardware, radio, and network faults, please use the provided convenience methods:
|
|
80
132
|
* * registerHardwareFault and clearHardwareFault
|
|
@@ -89,13 +141,18 @@ export class GeneralDiagnosticsServer extends Base {
|
|
|
89
141
|
static override readonly schema = schema;
|
|
90
142
|
|
|
91
143
|
override initialize() {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
144
|
+
const { deviceTestEnableKey } = this.state;
|
|
145
|
+
const testEventTriggersEnabled = !isAllZero(deviceTestEnableKey);
|
|
146
|
+
if (this.state.testEventTriggersEnabled && !testEventTriggersEnabled) {
|
|
147
|
+
throw new ImplementationError("Test event triggers are enabled but no deviceTestEnableKey is set.");
|
|
148
|
+
}
|
|
149
|
+
if (testEventTriggersEnabled && deviceTestEnableKey.byteLength !== ENABLE_KEY_LENGTH) {
|
|
150
|
+
throw new ImplementationError(
|
|
151
|
+
`The deviceTestEnableKey must be ${ENABLE_KEY_LENGTH} bytes long, but it has ${deviceTestEnableKey.byteLength}.`,
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
this.state.testEventTriggersEnabled = testEventTriggersEnabled;
|
|
155
|
+
if (testEventTriggersEnabled) {
|
|
99
156
|
logger.warn("Test event triggers are enabled. Make sure to disable them in production.");
|
|
100
157
|
}
|
|
101
158
|
|
|
@@ -108,6 +165,10 @@ export class GeneralDiagnosticsServer extends Base {
|
|
|
108
165
|
const lifecycle = this.endpoint.lifecycle as NodeLifecycle;
|
|
109
166
|
this.reactTo(lifecycle.online, this.#online, { lock: true });
|
|
110
167
|
this.reactTo(lifecycle.goingOffline, this.#goingOffline, { lock: true });
|
|
168
|
+
this.reactTo(this.env.get(Network).interfacesChanged, this.#interfacesChanged, {
|
|
169
|
+
lock: true,
|
|
170
|
+
offline: true,
|
|
171
|
+
});
|
|
111
172
|
|
|
112
173
|
this.maybeReactTo(this.events.activeHardwareFaults$Changed, this.#triggerActiveHardwareFaultsChangedEvent);
|
|
113
174
|
|
|
@@ -142,21 +203,27 @@ export class GeneralDiagnosticsServer extends Base {
|
|
|
142
203
|
}
|
|
143
204
|
}
|
|
144
205
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
206
|
+
/**
|
|
207
|
+
* The gate of both test commands, so the commands accept exactly when testEventTriggersEnabled reports true.
|
|
208
|
+
*
|
|
209
|
+
* @see {@link MatterSpecification.v161.Core} § 11.12.7.1.1, § 11.12.7.4
|
|
210
|
+
* @throws {@link StatusResponseError} with CONSTRAINT_ERROR if test event triggers are disabled, or the key is all
|
|
211
|
+
* zeros or does not match
|
|
212
|
+
*/
|
|
213
|
+
#assertEnableKey(enableKey: Bytes) {
|
|
214
|
+
if (!this.state.testEventTriggersEnabled) {
|
|
215
|
+
throw new StatusResponseError("Test event triggers are disabled", Status.ConstraintError);
|
|
216
|
+
}
|
|
217
|
+
if (isAllZero(enableKey)) {
|
|
148
218
|
throw new StatusResponseError("Invalid test enable key, all zeros", Status.ConstraintError);
|
|
149
219
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
throw new StatusResponseError("Invalid test enable key", Status.ConstraintError);
|
|
154
|
-
}
|
|
155
|
-
});
|
|
220
|
+
if (!enableKeysMatch(enableKey, this.state.deviceTestEnableKey)) {
|
|
221
|
+
throw new StatusResponseError("Invalid test enable key", Status.ConstraintError);
|
|
222
|
+
}
|
|
156
223
|
}
|
|
157
224
|
|
|
158
225
|
override testEventTrigger({ eventTrigger, enableKey }: GeneralDiagnostics.TestEventTriggerRequest): MaybePromise {
|
|
159
|
-
this.#
|
|
226
|
+
this.#assertEnableKey(enableKey);
|
|
160
227
|
|
|
161
228
|
this.triggerTestEvent(eventTrigger);
|
|
162
229
|
}
|
|
@@ -178,7 +245,7 @@ export class GeneralDiagnosticsServer extends Base {
|
|
|
178
245
|
: null;
|
|
179
246
|
|
|
180
247
|
return {
|
|
181
|
-
systemTimeMs:
|
|
248
|
+
systemTimeMs: Math.floor(systemTime(this.internal)),
|
|
182
249
|
posixTimeMs,
|
|
183
250
|
};
|
|
184
251
|
}
|
|
@@ -188,11 +255,7 @@ export class GeneralDiagnosticsServer extends Base {
|
|
|
188
255
|
value,
|
|
189
256
|
count,
|
|
190
257
|
}: GeneralDiagnostics.PayloadTestRequest): MaybePromise<GeneralDiagnostics.PayloadTestResponse> {
|
|
191
|
-
this.#
|
|
192
|
-
|
|
193
|
-
if (!this.state.testEventTriggersEnabled) {
|
|
194
|
-
throw new StatusResponseError("Test event triggers are disabled", Status.ConstraintError);
|
|
195
|
-
}
|
|
258
|
+
this.#assertEnableKey(enableKey);
|
|
196
259
|
|
|
197
260
|
const payload = new Uint8Array(count).fill(value);
|
|
198
261
|
|
|
@@ -236,21 +299,21 @@ export class GeneralDiagnosticsServer extends Base {
|
|
|
236
299
|
|
|
237
300
|
/**
|
|
238
301
|
* Register a hardware fault. This convenience method updates the activeHardwareFaults attribute and sends out the
|
|
239
|
-
*
|
|
302
|
+
* HardwareFaultChange event. Make sure to clear the fault when it is resolved.
|
|
240
303
|
* This method requires that the activeHardwareFaults attribute is activated when the cluster gets initialized.
|
|
241
304
|
*
|
|
242
305
|
* @param faultType The hardware fault to register.
|
|
243
306
|
*/
|
|
244
307
|
registerHardwareFault(faultType: GeneralDiagnostics.HardwareFault) {
|
|
245
308
|
const currentFaults = this.requireAttributeEnabled("activeHardwareFaults");
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
309
|
+
if (!currentFaults.includes(faultType)) {
|
|
310
|
+
this.state.activeHardwareFaults = [...currentFaults, faultType];
|
|
311
|
+
}
|
|
249
312
|
}
|
|
250
313
|
|
|
251
314
|
/**
|
|
252
315
|
* Clear a hardware fault. This convenience method updates the activeHardwareFaults attribute and sends out the
|
|
253
|
-
*
|
|
316
|
+
* HardwareFaultChange event.
|
|
254
317
|
*
|
|
255
318
|
* @param faultType The hardware fault to clear.
|
|
256
319
|
*/
|
|
@@ -274,21 +337,21 @@ export class GeneralDiagnosticsServer extends Base {
|
|
|
274
337
|
|
|
275
338
|
/**
|
|
276
339
|
* Register a radio fault. This convenience method updates the activeRadioFaults attribute and sends out the
|
|
277
|
-
*
|
|
340
|
+
* RadioFaultChange event. Make sure to clear the fault when it is resolved.
|
|
278
341
|
* This method requires that the activeRadioFaults attribute is activated when the cluster gets initialized.
|
|
279
342
|
*
|
|
280
343
|
* @param faultType The radio fault to register.
|
|
281
344
|
*/
|
|
282
345
|
registerRadioFault(faultType: GeneralDiagnostics.RadioFault) {
|
|
283
346
|
const currentFaults = this.requireAttributeEnabled("activeRadioFaults");
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
347
|
+
if (!currentFaults.includes(faultType)) {
|
|
348
|
+
this.state.activeRadioFaults = [...currentFaults, faultType];
|
|
349
|
+
}
|
|
287
350
|
}
|
|
288
351
|
|
|
289
352
|
/**
|
|
290
353
|
* Clear a radio fault. This convenience method updates the activeRadioFaults attribute and sends out the
|
|
291
|
-
*
|
|
354
|
+
* RadioFaultChange event.
|
|
292
355
|
*
|
|
293
356
|
* @param faultType The radio fault to clear.
|
|
294
357
|
*/
|
|
@@ -312,21 +375,21 @@ export class GeneralDiagnosticsServer extends Base {
|
|
|
312
375
|
|
|
313
376
|
/**
|
|
314
377
|
* Register a network fault. This convenience method updates the activeNetworkFaults attribute and sends out the
|
|
315
|
-
*
|
|
378
|
+
* NetworkFaultChange event. Make sure to clear the fault when it is resolved.
|
|
316
379
|
* This method requires that the activeNetworkFaults attribute is activated when the cluster gets initialized.
|
|
317
380
|
*
|
|
318
381
|
* @param faultType The network fault to register.
|
|
319
382
|
*/
|
|
320
383
|
registerNetworkFault(faultType: GeneralDiagnostics.NetworkFault) {
|
|
321
384
|
const currentFaults = this.requireAttributeEnabled("activeNetworkFaults");
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
385
|
+
if (!currentFaults.includes(faultType)) {
|
|
386
|
+
this.state.activeNetworkFaults = [...currentFaults, faultType];
|
|
387
|
+
}
|
|
325
388
|
}
|
|
326
389
|
|
|
327
390
|
/**
|
|
328
391
|
* Clear a network fault. This convenience method updates the activeNetworkFaults attribute and sends out the
|
|
329
|
-
*
|
|
392
|
+
* NetworkFaultChange event.
|
|
330
393
|
*
|
|
331
394
|
* @param faultType The network fault to clear.
|
|
332
395
|
*/
|
|
@@ -361,7 +424,7 @@ export class GeneralDiagnosticsServer extends Base {
|
|
|
361
424
|
this.internal.lastTotalOperationalHoursCounterUpdateTime = now;
|
|
362
425
|
this.internal.onlineAtUs = now;
|
|
363
426
|
this.internal.onlineAtMs = Time.nowMs;
|
|
364
|
-
this.internal.
|
|
427
|
+
this.internal.systemTimeHighWaterMark = 0;
|
|
365
428
|
|
|
366
429
|
this.internal.lastTotalOperationalHoursTimer?.stop();
|
|
367
430
|
this.internal.lastTotalOperationalHoursTimer = this.periodicReactorTimer(
|
|
@@ -381,6 +444,18 @@ export class GeneralDiagnosticsServer extends Base {
|
|
|
381
444
|
this.internal.onlineAtMs = undefined;
|
|
382
445
|
}
|
|
383
446
|
|
|
447
|
+
async #interfacesChanged() {
|
|
448
|
+
// The network runtime exists only between start and stop, and coming online reads the interfaces again
|
|
449
|
+
if (!this.env.has(NetworkRuntime)) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
try {
|
|
453
|
+
await this.#updateNetworkList();
|
|
454
|
+
} catch (error) {
|
|
455
|
+
logger.warn("Cannot update the network interfaces after an interface change", error);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
|
|
384
459
|
#updateTotalOperationalHoursCounter() {
|
|
385
460
|
const now = Time.nowUs;
|
|
386
461
|
const elapsedTime = elapsedSince(this.internal.lastTotalOperationalHoursCounterUpdateTime, now);
|
|
@@ -463,7 +538,7 @@ export namespace GeneralDiagnosticsServer {
|
|
|
463
538
|
lastTotalOperationalHoursTimer: Timer | undefined;
|
|
464
539
|
|
|
465
540
|
/**
|
|
466
|
-
* Time the node came online, on the monotonic clock ({@link Time.nowUs}); used for {@link
|
|
541
|
+
* Time the node came online, on the monotonic clock ({@link Time.nowUs}); used for {@link systemTime}.
|
|
467
542
|
*
|
|
468
543
|
* Unlike {@link NodeLifecycle.onlineAt}, which is a wall-clock {@link Date}, this is unaffected by a clock
|
|
469
544
|
* step where {@link Time.nowUs} is monotonic. Where it falls back to the wall clock, a step still moves
|
|
@@ -472,30 +547,34 @@ export namespace GeneralDiagnosticsServer {
|
|
|
472
547
|
onlineAtUs: Timestamp | undefined;
|
|
473
548
|
|
|
474
549
|
/**
|
|
475
|
-
* Time the node came online, on the wall clock ({@link Time.nowMs}); used for {@link
|
|
550
|
+
* Time the node came online, on the wall clock ({@link Time.nowMs}); used for {@link systemTime}.
|
|
476
551
|
*
|
|
477
552
|
* Where the monotonic clock does not advance while the host is suspended (Node on Linux, and several other
|
|
478
|
-
* runtimes), {@link onlineAtUs} alone would stop counting upTime for the duration of a suspend. Comparing
|
|
479
|
-
* time back in wherever the wall clock actually advanced past
|
|
553
|
+
* runtimes), {@link onlineAtUs} alone would stop counting upTime for the duration of a suspend. Comparing
|
|
554
|
+
* against this wall-clock timestamp folds suspend time back in wherever the wall clock actually advanced past
|
|
555
|
+
* it.
|
|
480
556
|
*/
|
|
481
557
|
onlineAtMs: Timestamp | undefined;
|
|
482
558
|
|
|
483
559
|
/**
|
|
484
|
-
* Highest
|
|
560
|
+
* Highest System Time computed since the node came online.
|
|
485
561
|
*
|
|
486
562
|
* A suspend makes {@link onlineAtMs}'s elapsed time jump ahead of {@link onlineAtUs}'s; a later backward
|
|
487
|
-
* wall-clock step (an NTP correction) must not then make upTime, already reported at the
|
|
488
|
-
* down again.
|
|
563
|
+
* wall-clock step (an NTP correction) must not then make upTime or SystemTimeMs, already reported at the
|
|
564
|
+
* higher value, go down again.
|
|
489
565
|
*/
|
|
490
|
-
|
|
566
|
+
systemTimeHighWaterMark: Duration = 0;
|
|
491
567
|
}
|
|
492
568
|
|
|
493
569
|
export class State extends Base.State {
|
|
494
570
|
/** Internal counter of the total time, updated every 5 minutes. */
|
|
495
571
|
totalOperationalHoursCounter: Duration = 0;
|
|
496
572
|
|
|
497
|
-
/**
|
|
498
|
-
|
|
573
|
+
/**
|
|
574
|
+
* The 16-byte EnableKey of the test commands. The default of all zeros disables them. testEventTriggersEnabled
|
|
575
|
+
* is derived from this key when the behavior initializes, so a key set later leaves the commands disabled.
|
|
576
|
+
*/
|
|
577
|
+
deviceTestEnableKey: Bytes = new Uint8Array(ENABLE_KEY_LENGTH);
|
|
499
578
|
|
|
500
579
|
[Val.properties](endpoint: Endpoint, session: ValueSupervisor.Session) {
|
|
501
580
|
// Invoked on the underlying state, so read our own values from here. Reading them via the endpoint would
|
|
@@ -516,23 +595,7 @@ export namespace GeneralDiagnosticsServer {
|
|
|
516
595
|
* our boot time.
|
|
517
596
|
*/
|
|
518
597
|
get upTime() {
|
|
519
|
-
|
|
520
|
-
const { onlineAtUs, onlineAtMs } = internal;
|
|
521
|
-
if (onlineAtUs === undefined || onlineAtMs === undefined) {
|
|
522
|
-
return 0;
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
// Take whichever clock elapsed more so a suspend (wall clock advances, monotonic clock does
|
|
526
|
-
// not) is counted. A forward wall-clock step is folded in the same way, which can make upTime
|
|
527
|
-
// run ahead of real elapsed time; accepted since upTime has no deadline consequences. The
|
|
528
|
-
// high-water mark then keeps a later backward step from lowering what was already reported.
|
|
529
|
-
const elapsed = Duration.max(
|
|
530
|
-
Duration.max(elapsedSince(onlineAtUs, Time.nowUs), elapsedSince(onlineAtMs, Time.nowMs)),
|
|
531
|
-
internal.upTimeHighWaterMark,
|
|
532
|
-
);
|
|
533
|
-
internal.upTimeHighWaterMark = elapsed;
|
|
534
|
-
|
|
535
|
-
return Seconds.of(elapsed);
|
|
598
|
+
return Seconds.of(systemTime(endpoint.behaviors.internalsOf(GeneralDiagnosticsServer)));
|
|
536
599
|
},
|
|
537
600
|
|
|
538
601
|
/**
|
|
@@ -584,7 +647,7 @@ export namespace GeneralDiagnosticsServer {
|
|
|
584
647
|
|
|
585
648
|
let currentSubscriptions = 0;
|
|
586
649
|
let currentSubscriptionsForFabric = 0;
|
|
587
|
-
for (const sess of sessionManager.
|
|
650
|
+
for (const sess of sessionManager.registeredSessions) {
|
|
588
651
|
const count = sess.subscriptions.size;
|
|
589
652
|
currentSubscriptions += count;
|
|
590
653
|
if (sess.fabric?.fabricIndex === accessingFabric) {
|
|
@@ -611,21 +674,12 @@ export namespace GeneralDiagnosticsServer {
|
|
|
611
674
|
}
|
|
612
675
|
|
|
613
676
|
export declare const ExtensionInterface: {
|
|
614
|
-
triggerTestEvent
|
|
615
|
-
registerHardwareFault:
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
)
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
previous: GeneralDiagnostics.RadioFault[],
|
|
622
|
-
) => void;
|
|
623
|
-
registerNetworkFault: (
|
|
624
|
-
current: GeneralDiagnostics.NetworkFault[],
|
|
625
|
-
previous: GeneralDiagnostics.NetworkFault[],
|
|
626
|
-
) => void;
|
|
627
|
-
clearHardwareFault: (faultType: GeneralDiagnostics.HardwareFault) => void;
|
|
628
|
-
clearRadioFault: (faultType: GeneralDiagnostics.RadioFault) => void;
|
|
629
|
-
clearNetworkFault: (faultType: GeneralDiagnostics.NetworkFault) => void;
|
|
677
|
+
triggerTestEvent(eventTrigger: number | bigint): void;
|
|
678
|
+
registerHardwareFault(faultType: GeneralDiagnostics.HardwareFault): void;
|
|
679
|
+
registerRadioFault(faultType: GeneralDiagnostics.RadioFault): void;
|
|
680
|
+
registerNetworkFault(faultType: GeneralDiagnostics.NetworkFault): void;
|
|
681
|
+
clearHardwareFault(faultType: GeneralDiagnostics.HardwareFault): void;
|
|
682
|
+
clearRadioFault(faultType: GeneralDiagnostics.RadioFault): void;
|
|
683
|
+
clearNetworkFault(faultType: GeneralDiagnostics.NetworkFault): void;
|
|
630
684
|
};
|
|
631
685
|
}
|
|
@@ -284,12 +284,7 @@ export class GroupKeyManagementServer extends GroupKeyManagementBase {
|
|
|
284
284
|
fabricMaps.set(fabricIndex, fabricMap);
|
|
285
285
|
}
|
|
286
286
|
for (const fabric of fabrics) {
|
|
287
|
-
|
|
288
|
-
const map = fabricMaps.get(fabricIndex);
|
|
289
|
-
if (map === undefined) {
|
|
290
|
-
continue;
|
|
291
|
-
}
|
|
292
|
-
fabric.groups.groupKeyIdMap = map;
|
|
287
|
+
fabric.groups.groupKeyIdMap = fabricMaps.get(fabric.fabricIndex) ?? new Map<GroupId, number>();
|
|
293
288
|
}
|
|
294
289
|
}
|
|
295
290
|
|
|
@@ -462,7 +457,15 @@ export class GroupKeyManagementServer extends GroupKeyManagementBase {
|
|
|
462
457
|
};
|
|
463
458
|
}
|
|
464
459
|
|
|
465
|
-
|
|
460
|
+
/**
|
|
461
|
+
* Add {@link endpointId} to the group table entry of {@link groupId}, creating the entry if needed.
|
|
462
|
+
*
|
|
463
|
+
* {@link groupName} is the last name written for the group via the Groups cluster; leave it out for a group that has
|
|
464
|
+
* none, such as one that Groupcast JoinGroup created.
|
|
465
|
+
*
|
|
466
|
+
* @see {@link MatterSpecification.v161.Core} § 11.2.5.5.3
|
|
467
|
+
*/
|
|
468
|
+
addEndpointForGroup(fabric: Fabric, groupId: GroupId, endpointId: EndpointNumber, groupName?: string): void {
|
|
466
469
|
const fabricIndex = fabric.fabricIndex;
|
|
467
470
|
// Add the group to the group table
|
|
468
471
|
const existingGroupIndex = this.state.groupTable.findIndex(
|
|
@@ -496,7 +499,8 @@ export class GroupKeyManagementServer extends GroupKeyManagementBase {
|
|
|
496
499
|
fabric.groups.endpoints.set(groupId, [endpointId]);
|
|
497
500
|
}
|
|
498
501
|
logger.info(
|
|
499
|
-
`Added endpoint ${endpointId} to group ${groupId} on fabric ${fabricIndex}
|
|
502
|
+
`Added endpoint ${endpointId} to group ${groupId} on fabric ${fabricIndex}`,
|
|
503
|
+
...(groupName === undefined ? [] : [`with name "${groupName}"`]),
|
|
500
504
|
);
|
|
501
505
|
}
|
|
502
506
|
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
Fabric,
|
|
28
28
|
FabricManager,
|
|
29
29
|
GroupMessageEventInfo,
|
|
30
|
+
GroupMessageRejection,
|
|
30
31
|
IANA_GROUPCAST_MULTICAST_ADDRESS,
|
|
31
32
|
SessionManager,
|
|
32
33
|
} from "@matter/protocol";
|
|
@@ -262,7 +263,7 @@ export class GroupcastServer extends GroupcastBase {
|
|
|
262
263
|
const existing = gkm.state.groupTable.find(g => g.fabricIndex === fabricIndex && g.groupId === groupId);
|
|
263
264
|
// Snapshot: removeEndpoint mutates the live groupTable endpoints array, which would corrupt this loop.
|
|
264
265
|
const existingEndpoints = [...(existing?.endpoints ?? [])];
|
|
265
|
-
const groupName = existing?.groupName
|
|
266
|
+
const groupName = existing?.groupName;
|
|
266
267
|
const target = replaceEndpoints ? endpoints : [...new Set([...existingEndpoints, ...endpoints])];
|
|
267
268
|
keepsSenderOnly = target.length === 0 && existingEndpoints.length > 0;
|
|
268
269
|
for (const ep of existingEndpoints) {
|
|
@@ -459,50 +460,65 @@ export class GroupcastServer extends GroupcastBase {
|
|
|
459
460
|
return;
|
|
460
461
|
}
|
|
461
462
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
463
|
+
if (info.kind === "authenticated") {
|
|
464
|
+
if (info.fabric.fabricIndex !== fabricUnderTest) {
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
const { result, groupId, endpointId, clusterId, elementId, accessAllowed, sourceIp } = info;
|
|
468
|
+
this.#emitGroupcastTesting(fabricUnderTest, sourceIp, this.#arrivalAddress(fabricUnderTest, groupId), {
|
|
469
|
+
groupcastTestResult: result,
|
|
470
|
+
groupId,
|
|
471
|
+
endpointId,
|
|
472
|
+
clusterId,
|
|
473
|
+
elementId,
|
|
474
|
+
accessAllowed,
|
|
475
|
+
});
|
|
466
476
|
return;
|
|
467
477
|
}
|
|
468
478
|
|
|
469
|
-
//
|
|
470
|
-
//
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
const fabrics = this.env.get(FabricManager);
|
|
480
|
-
if (known && fabrics.has(fabricUnderTest)) {
|
|
481
|
-
destIp = fabrics.for(fabricUnderTest).groups.multicastAddressFor(groupIdForAddress);
|
|
482
|
-
} else {
|
|
483
|
-
destIp = IANA_GROUPCAST_MULTICAST_ADDRESS;
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
// Without any group knowledge (privacy-obfuscated header and no authenticating key set) the IANA address
|
|
487
|
-
// remains the only plausible arrival address
|
|
488
|
-
destIp ??= IANA_GROUPCAST_MULTICAST_ADDRESS;
|
|
479
|
+
// As in the CHIP SDK, a message for which no candidate key passed is reported on the fabric under test, without
|
|
480
|
+
// its group id
|
|
481
|
+
const { group, sourceIp } = info;
|
|
482
|
+
this.#emitGroupcastTesting(
|
|
483
|
+
fabricUnderTest,
|
|
484
|
+
sourceIp,
|
|
485
|
+
this.#arrivalAddress(group?.fabricIndex ?? fabricUnderTest, group?.groupId),
|
|
486
|
+
{ groupcastTestResult: GroupMessageRejection.resultFor(info, fabricUnderTest) },
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
489
|
|
|
490
|
+
#emitGroupcastTesting(
|
|
491
|
+
fabricIndex: FabricIndex,
|
|
492
|
+
sourceIp: string | undefined,
|
|
493
|
+
destinationIp: string,
|
|
494
|
+
details: Omit<Groupcast.GroupcastTestingEvent, "sourceIpAddress" | "destinationIpAddress" | "fabricIndex">,
|
|
495
|
+
) {
|
|
490
496
|
this.events.groupcastTesting?.emit(
|
|
491
497
|
{
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
clusterId: info.clusterId,
|
|
497
|
-
elementId: info.elementId,
|
|
498
|
-
accessAllowed: info.accessAllowed,
|
|
499
|
-
groupcastTestResult: info.result,
|
|
500
|
-
fabricIndex: fabricUnderTest,
|
|
498
|
+
...details,
|
|
499
|
+
sourceIpAddress: toIpv6EventAddress(sourceIp),
|
|
500
|
+
destinationIpAddress: toIpv6EventAddress(destinationIp),
|
|
501
|
+
fabricIndex,
|
|
501
502
|
},
|
|
502
503
|
this.context,
|
|
503
504
|
);
|
|
504
505
|
}
|
|
505
506
|
|
|
507
|
+
/**
|
|
508
|
+
* The multicast address a message for the group of the owning fabric most likely arrived on. The datagram
|
|
509
|
+
* destination is not available from the socket, so it is derived. {@link ServerGroupNetworking} joins
|
|
510
|
+
* {@link FabricGroups.multicastAddressFor} of each group with an entry in {@link FabricGroups.endpoints}, so a
|
|
511
|
+
* message for any other group, for an unknown group or for a fabric that is gone, most likely arrived on the
|
|
512
|
+
* shared IANA address.
|
|
513
|
+
*/
|
|
514
|
+
#arrivalAddress(owner: FabricIndex, groupId: GroupId | undefined) {
|
|
515
|
+
const groups = this.env.get(FabricManager).maybeFor(owner)?.groups;
|
|
516
|
+
if (groupId === undefined || groups === undefined || !groups.endpoints.has(groupId)) {
|
|
517
|
+
return IANA_GROUPCAST_MULTICAST_ADDRESS;
|
|
518
|
+
}
|
|
519
|
+
return groups.multicastAddressFor(groupId);
|
|
520
|
+
}
|
|
521
|
+
|
|
506
522
|
#handleFabricDeleted(fabric: Fabric) {
|
|
507
523
|
this.internal.pendingFabricCleanups.add(fabric.fabricIndex);
|
|
508
524
|
this.#deriveNow();
|
|
@@ -4,20 +4,32 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { MaybePromise } from "@matter/general";
|
|
7
|
+
import { Logger, MaybePromise } from "@matter/general";
|
|
8
8
|
import { LocalizationConfigurationBehavior } from "./LocalizationConfigurationBehavior.js";
|
|
9
9
|
|
|
10
|
+
const logger = Logger.get("LocalizationConfigurationServer");
|
|
11
|
+
|
|
10
12
|
/**
|
|
11
13
|
* This is the default server implementation of {@link LocalizationConfigurationBehavior}.
|
|
12
14
|
*/
|
|
13
15
|
export class LocalizationConfigurationServer extends LocalizationConfigurationBehavior {
|
|
14
16
|
override initialize(): MaybePromise {
|
|
15
|
-
if (this.state.
|
|
16
|
-
this.state.activeLocale
|
|
17
|
+
if (!this.state.supportedLocales?.length) {
|
|
18
|
+
const locale = this.state.activeLocale ?? this.detectedLocale;
|
|
19
|
+
this.state.supportedLocales = [locale];
|
|
20
|
+
this.state.activeLocale = locale;
|
|
21
|
+
}
|
|
22
|
+
const { activeLocale, supportedLocales } = this.state;
|
|
23
|
+
if (activeLocale !== undefined && supportedLocales.includes(activeLocale)) {
|
|
24
|
+
return;
|
|
17
25
|
}
|
|
18
|
-
|
|
19
|
-
|
|
26
|
+
|
|
27
|
+
const detected = this.detectedLocale;
|
|
28
|
+
const locale = supportedLocales.includes(detected) ? detected : supportedLocales[0];
|
|
29
|
+
if (activeLocale !== undefined) {
|
|
30
|
+
logger.warn(`Active locale "${activeLocale}" is not in supportedLocales, using "${locale}"`);
|
|
20
31
|
}
|
|
32
|
+
this.state.activeLocale = locale;
|
|
21
33
|
}
|
|
22
34
|
|
|
23
35
|
/** Override this getter with own implementation to detect the locale of the system. */
|
|
@@ -28,6 +40,6 @@ export class LocalizationConfigurationServer extends LocalizationConfigurationBe
|
|
|
28
40
|
|
|
29
41
|
export namespace LocalizationConfigurationServer {
|
|
30
42
|
export declare const ExtensionInterface: {
|
|
31
|
-
detectedLocale: string;
|
|
43
|
+
get detectedLocale(): string;
|
|
32
44
|
};
|
|
33
45
|
}
|