@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
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022-2026 Matter.js Authors
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { Diagnostic, Logger } from "@matter/general";
|
|
8
|
+
import { ClusterModel } from "@matter/model";
|
|
9
|
+
import {
|
|
10
|
+
ConformanceError,
|
|
11
|
+
ConstraintError,
|
|
12
|
+
DatatypeError,
|
|
13
|
+
UnknownEnumValueError,
|
|
14
|
+
ValidateError,
|
|
15
|
+
} from "@matter/protocol";
|
|
16
|
+
import { Status } from "@matter/types";
|
|
17
|
+
import type { RootSupervisor } from "../../supervision/RootSupervisor.js";
|
|
18
|
+
import type { ValueSupervisor } from "../../supervision/ValueSupervisor.js";
|
|
19
|
+
import type { ValidationLocation } from "./location.js";
|
|
20
|
+
|
|
21
|
+
const logger = Logger.get("ValueValidator");
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Wrap a validator so that a validation error of a value sent to or received from a remote node, a peer or a group, is
|
|
25
|
+
* left to the device to decide on rather than thrown locally.
|
|
26
|
+
*
|
|
27
|
+
* This applies only when the root schema of {@link supervisor} is a cluster, because only cluster state is a copy of a
|
|
28
|
+
* device's values and goes to the device on write. Other behavior state on a client node, such as commissioning or
|
|
29
|
+
* network parameters, stays local and is validated as on a server. For such a supervisor the validator is returned
|
|
30
|
+
* unchanged. Only the root schema is checked, so a typed local-only field added to a cluster client subclass is also
|
|
31
|
+
* left to the device.
|
|
32
|
+
*
|
|
33
|
+
* The device decides what it accepts: the local model cannot know the device's revision, its feature-dependent lists
|
|
34
|
+
* or the values it supports, and the specification places these checks on the server. So every error raised for a
|
|
35
|
+
* value the wire can still carry is left to the device, and the local copy takes the value only if the device accepts
|
|
36
|
+
* it. A command request is still checked against its TLV bounds when the invoke request is built (`Invoke.ts`):
|
|
37
|
+
*
|
|
38
|
+
* | Error | Raised for | Remote value |
|
|
39
|
+
* |----------------------------------------------|----------------------------------------------------|--------------|
|
|
40
|
+
* | {@link ConformanceError} (and subclasses) | element or enum value violates conformance | not thrown |
|
|
41
|
+
* | {@link ConstraintError} | model constraint: range, length, `in`, list size, …| not thrown |
|
|
42
|
+
* | {@link UnknownEnumValueError} | enum value Matter does not define for this enum | not thrown |
|
|
43
|
+
* | {@link DatatypeError} with CONSTRAINT_ERROR | enum value not among the enum's members, reserved | not thrown |
|
|
44
|
+
* | | bitmap bits set | |
|
|
45
|
+
* | {@link DatatypeError} with INVALID_DATA_TYPE | wrong JS type, unknown bitmap flag, bit field too | thrown |
|
|
46
|
+
* | | wide for its bits | |
|
|
47
|
+
* | `IntegerRangeError` | integer outside its wire type (uint8, int16, …) | thrown |
|
|
48
|
+
*
|
|
49
|
+
* The thrown errors stay local because the TLV encoder cannot write the value. A bit field set directly through
|
|
50
|
+
* `BitmapManager` throws {@link ConstraintError} from its setter, outside validation, so that error is also thrown.
|
|
51
|
+
*
|
|
52
|
+
* This applies where the validation location has a {@link ValidationLocation.remote}. Peer reports bypass validation
|
|
53
|
+
* entirely (DatasourceCache.externalSet). A command response the Remote API validates as received from the device goes
|
|
54
|
+
* through here too, so a response field that breaks a model constraint is accepted.
|
|
55
|
+
*
|
|
56
|
+
* An error left to the device is logged at debug.
|
|
57
|
+
*/
|
|
58
|
+
export function leaveErrorsToRemote(
|
|
59
|
+
supervisor: RootSupervisor,
|
|
60
|
+
validate: ValueSupervisor.Validate,
|
|
61
|
+
): ValueSupervisor.Validate {
|
|
62
|
+
if (!mayLeaveToRemote(supervisor)) {
|
|
63
|
+
return validate;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return (value, session, location) => {
|
|
67
|
+
try {
|
|
68
|
+
validate(value, session, location);
|
|
69
|
+
} catch (e) {
|
|
70
|
+
if (!leaveToRemote(location, e)) {
|
|
71
|
+
throw e;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Whether {@link leaveErrorsToRemote} applies to a validator built for {@link supervisor}.
|
|
79
|
+
*/
|
|
80
|
+
export function mayLeaveToRemote(supervisor: RootSupervisor) {
|
|
81
|
+
return supervisor.schema instanceof ClusterModel;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Decide whether a validation error of a value sent to or received from a remote node is left to the device, and log
|
|
86
|
+
* it at debug if so. Each check left to the device logs its own line, so a value that breaks several checks logs
|
|
87
|
+
* several lines.
|
|
88
|
+
*
|
|
89
|
+
* @returns true if the error is left to the device, false if the caller rethrows it
|
|
90
|
+
*/
|
|
91
|
+
export function leaveToRemote(location: ValidationLocation, error: unknown): boolean {
|
|
92
|
+
if ((location.remote !== "outbound" && location.remote !== "inbound") || !isLeftToRemote(error)) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
logger.debug("Not refusing a value the local model rejects; the device decides:", Diagnostic.errorMessage(error));
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function isLeftToRemote(error: unknown): error is ValidateError {
|
|
100
|
+
// IntegerRangeError carries CONSTRAINT_ERROR too, so the decision must not rely on the status code alone
|
|
101
|
+
return (
|
|
102
|
+
error instanceof ConformanceError ||
|
|
103
|
+
error instanceof ConstraintError ||
|
|
104
|
+
error instanceof UnknownEnumValueError ||
|
|
105
|
+
(error instanceof DatatypeError && error.code === Status.ConstraintError)
|
|
106
|
+
);
|
|
107
|
+
}
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
import type { Val } from "@matter/protocol";
|
|
8
8
|
import { Internal } from "../state/managed/Internal.js";
|
|
9
|
-
import type { ValReference } from "../state/managed/ValReference.js";
|
|
10
9
|
import { bareObjectConfigs, commandSupervisionConfigs, GlobalConfig } from "./SupervisionConfig.js";
|
|
11
10
|
|
|
12
11
|
/**
|
|
@@ -82,7 +81,7 @@ export function Supervision(
|
|
|
82
81
|
function supervisionForObject(object: Val.Struct, fieldName?: string): Supervision.Config | Supervision {
|
|
83
82
|
let config: Supervision.Config;
|
|
84
83
|
|
|
85
|
-
const ref = (object
|
|
84
|
+
const ref = Internal.referenceOf(object);
|
|
86
85
|
if (ref) {
|
|
87
86
|
if (!ref.supervisionConfig) {
|
|
88
87
|
ref.supervisionConfig = new GlobalConfig();
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
|
|
7
7
|
import type { Val } from "@matter/protocol";
|
|
8
8
|
import { Internal } from "../state/managed/Internal.js";
|
|
9
|
-
import type { ValReference } from "../state/managed/ValReference.js";
|
|
10
9
|
import type { Supervision } from "./Supervision.js";
|
|
11
10
|
|
|
12
11
|
/**
|
|
@@ -134,7 +133,7 @@ export function maybeConfigOf(
|
|
|
134
133
|
function maybeConfigOfObject(object: Val.Struct, fieldName?: string): Supervision.Config | Supervision | undefined {
|
|
135
134
|
let config: Supervision.Config | undefined;
|
|
136
135
|
|
|
137
|
-
const ref = (object
|
|
136
|
+
const ref = Internal.referenceOf(object);
|
|
138
137
|
if (ref) {
|
|
139
138
|
config = ref.supervisionConfig;
|
|
140
139
|
} else {
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
import type { AsyncObservable, Transaction } from "@matter/general";
|
|
8
8
|
import { DataModelPath, Schema } from "@matter/model";
|
|
9
9
|
import type { AccessControl, InteractionSettings, Val } from "@matter/protocol";
|
|
10
|
-
import type { FabricIndex } from "@matter/types";
|
|
11
10
|
import type { ValReference } from "../state/managed/ValReference.js";
|
|
12
11
|
import type { ValidationLocation } from "../state/validation/location.js";
|
|
13
12
|
import type { RootSupervisor } from "./RootSupervisor.js";
|
|
@@ -57,7 +56,9 @@ export interface ValueSupervisor {
|
|
|
57
56
|
readonly manage: ValueSupervisor.Manage;
|
|
58
57
|
|
|
59
58
|
/**
|
|
60
|
-
* Apply changes.
|
|
59
|
+
* Apply changes. The patch does not validate; a value assigned to a managed target is validated by the target. A
|
|
60
|
+
* target that mirrors a remote node takes each given member or entry as a whole value; any other target is
|
|
61
|
+
* patched. The rule is documented on `ValuePatcher`.
|
|
61
62
|
*/
|
|
62
63
|
readonly patch: ValueSupervisor.Patch;
|
|
63
64
|
|
|
@@ -83,17 +84,6 @@ export namespace ValueSupervisor {
|
|
|
83
84
|
*/
|
|
84
85
|
acceptInvalid?: boolean;
|
|
85
86
|
|
|
86
|
-
/**
|
|
87
|
-
* Present on contexts rooted at a ClientNode (peer node). Drives substitution of the
|
|
88
|
-
* {@link FabricIndex.OMIT_FABRIC} sentinel on fabric-scoped struct writes so the local cache mirrors the
|
|
89
|
-
* post-write peer state.
|
|
90
|
-
* @see {@link MatterSpecification.v161.Core} § 7.13.6
|
|
91
|
-
*/
|
|
92
|
-
clientPeerContext?: {
|
|
93
|
-
/** Fabric index the peer assigned to our identity, when known. */
|
|
94
|
-
fabricIndexOnPeer?: FabricIndex;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
87
|
/**
|
|
98
88
|
* Controls how per-instance supervision config is scoped.
|
|
99
89
|
*
|
|
@@ -70,6 +70,7 @@ import {
|
|
|
70
70
|
FabricRemovedError,
|
|
71
71
|
LocatedNodeCommissioningOptions,
|
|
72
72
|
OperationalAddress,
|
|
73
|
+
OperationalCertificateUpdateError,
|
|
73
74
|
PaseClient,
|
|
74
75
|
Peer,
|
|
75
76
|
PeerAddress,
|
|
@@ -127,10 +128,23 @@ export class CommissioningClient extends Behavior {
|
|
|
127
128
|
* Older versions stored a peer's session parameters under `sessionParameters`: the full effective set once a
|
|
128
129
|
* session existed, otherwise only the DNS-SD intervals. The first becomes the reported set, the second the
|
|
129
130
|
* advertised intervals. Values already under the new keys win.
|
|
131
|
+
*
|
|
132
|
+
* Stored discovery TTLs are dropped, so the default TTL applies. Versions before 0.16.11 stored TTLs inflated by
|
|
133
|
+
* powers of 1000 or `null`, which fail validation or keep an address from expiring. Current discovery stores no
|
|
134
|
+
* TTL.
|
|
130
135
|
*/
|
|
131
136
|
static override migrate(values: Val.Struct) {
|
|
132
137
|
super.migrate(values);
|
|
133
138
|
|
|
139
|
+
delete values.ttl;
|
|
140
|
+
if (Array.isArray(values.addresses)) {
|
|
141
|
+
for (const address of values.addresses) {
|
|
142
|
+
if (isObject(address)) {
|
|
143
|
+
delete address.ttl;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
134
148
|
const { sessionParameters } = values;
|
|
135
149
|
delete values.sessionParameters;
|
|
136
150
|
if (!isObject(sessionParameters)) {
|
|
@@ -477,6 +491,85 @@ export class CommissioningClient extends Behavior {
|
|
|
477
491
|
}
|
|
478
492
|
}
|
|
479
493
|
|
|
494
|
+
/**
|
|
495
|
+
* Replace the node's operational certificate (NOC) with one for a new operational key pair the node generates.
|
|
496
|
+
*
|
|
497
|
+
* Node ID, fabric, fabric index and ACL entries stay unchanged; only the NOC and the key pair change. The update
|
|
498
|
+
* runs under a fail-safe and ends with a CASE session that uses the new NOC. Existing sessions with the node close,
|
|
499
|
+
* and subscriptions re-establish over a new session.
|
|
500
|
+
*
|
|
501
|
+
* On failure the node keeps or returns to its previous NOC, unless another operation of the same fabric completed
|
|
502
|
+
* the fail-safe (the new NOC is then in place) or the outcome cannot be determined. When the update changed or may
|
|
503
|
+
* have changed the node, the error message says which NOC it holds, or that this could not be determined. If
|
|
504
|
+
* CommissioningComplete took effect but its answer was lost, the update resolves. Throws `OperationalCertificateUpdateBusyError` when the node's fail-safe may be in use
|
|
505
|
+
* (retry later), `OperationalCertificateUpdateRefusedError` when the node refused the fail-safe otherwise,
|
|
506
|
+
* `OperationalCertificateUpdateError` for any later failure once the node was reached, the
|
|
507
|
+
* connection error if it cannot be reached, and {@link ImplementationError} if the node is not commissioned, this
|
|
508
|
+
* controller is not the certificate authority of its fabric or {@link CommissioningClient.OperationalCertificateUpdateOptions.failsafe}
|
|
509
|
+
* is out of range.
|
|
510
|
+
*
|
|
511
|
+
* The update reads the node's CurrentFabricIndex first. Once that read succeeded, the read index replaces
|
|
512
|
+
* {@link CommissioningClient.State.fabricIndexOnPeer}, also when the update fails afterwards. On failure the index
|
|
513
|
+
* is stored and committed in its own transaction, because the caller's transaction rolls back with the error; if
|
|
514
|
+
* that store fails, the failure is logged and the update error is thrown unchanged. That transaction waits for the
|
|
515
|
+
* lock on this state, so do not call this method from a transaction that already holds that lock.
|
|
516
|
+
*
|
|
517
|
+
* @see {@link MatterSpecification.v161.Core} § 11.18.6.9
|
|
518
|
+
*/
|
|
519
|
+
async updateOperationalCertificate(options?: CommissioningClient.OperationalCertificateUpdateOptions) {
|
|
520
|
+
const { peerAddress } = this.state;
|
|
521
|
+
if (peerAddress === undefined) {
|
|
522
|
+
throw new ImplementationError(
|
|
523
|
+
`Cannot update the operational certificate of ${this.endpoint} because it is not commissioned`,
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
let fabricIndexOnPeer: FabricIndex;
|
|
528
|
+
try {
|
|
529
|
+
({ fabricIndexOnPeer } = await this.env.get(ControllerCommissioner).updateOperationalCertificate({
|
|
530
|
+
...options,
|
|
531
|
+
address: ProtocolPeerAddress(peerAddress),
|
|
532
|
+
}));
|
|
533
|
+
} catch (error) {
|
|
534
|
+
if (error instanceof OperationalCertificateUpdateError && error.fabricIndexOnPeer !== undefined) {
|
|
535
|
+
await this.#storeFabricIndexOfFailedUpdate(error.fabricIndexOnPeer);
|
|
536
|
+
}
|
|
537
|
+
throw error;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
await this.#storeReportedFabricIndex(fabricIndexOnPeer);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
/** Never rejects, so the update error stays the one the caller sees. */
|
|
544
|
+
async #storeFabricIndexOfFailedUpdate(fabricIndexOnPeer: FabricIndex) {
|
|
545
|
+
try {
|
|
546
|
+
await this.endpoint.act("store-fabric-index-on-peer", agent =>
|
|
547
|
+
agent.get(CommissioningClient).#storeReportedFabricIndex(fabricIndexOnPeer),
|
|
548
|
+
);
|
|
549
|
+
} catch (error) {
|
|
550
|
+
logger.warn(
|
|
551
|
+
`${this.endpoint} could not store fabric index ${fabricIndexOnPeer} read before its failed operational certificate update:`,
|
|
552
|
+
error,
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
async #storeReportedFabricIndex(fabricIndexOnPeer: FabricIndex) {
|
|
558
|
+
const { transaction } = this.context;
|
|
559
|
+
await transaction.addResources(this);
|
|
560
|
+
await transaction.begin();
|
|
561
|
+
|
|
562
|
+
const known = this.state.fabricIndexOnPeer;
|
|
563
|
+
if (fabricIndexOnPeer !== known) {
|
|
564
|
+
if (known !== undefined) {
|
|
565
|
+
logger.warn(
|
|
566
|
+
`${this.endpoint} reports fabric index ${fabricIndexOnPeer} for our fabric, but ${known} was stored; using the reported one`,
|
|
567
|
+
);
|
|
568
|
+
}
|
|
569
|
+
this.state.fabricIndexOnPeer = fabricIndexOnPeer;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
480
573
|
/**
|
|
481
574
|
* Open a Basic Commissioning Window (uses the passcode originally printed on the device).
|
|
482
575
|
*
|
|
@@ -832,6 +925,21 @@ export namespace CommissioningClient {
|
|
|
832
925
|
commissioningTimeout: Duration;
|
|
833
926
|
}
|
|
834
927
|
|
|
928
|
+
/**
|
|
929
|
+
* Options for {@link CommissioningClient.updateOperationalCertificate}.
|
|
930
|
+
*/
|
|
931
|
+
export interface OperationalCertificateUpdateOptions {
|
|
932
|
+
/**
|
|
933
|
+
* Fail-safe armed for the whole update, including the CASE reconnect with the new certificate. Defaults to one
|
|
934
|
+
* minute; must lie between 30 s and 65535 s. The node ends the fail-safe early at its
|
|
935
|
+
* `MaxCumulativeFailsafeSeconds`.
|
|
936
|
+
*/
|
|
937
|
+
failsafe?: Duration;
|
|
938
|
+
|
|
939
|
+
/** Aborts waiting for a CASE session with the node. */
|
|
940
|
+
abort?: AbortSignal;
|
|
941
|
+
}
|
|
942
|
+
|
|
835
943
|
/**
|
|
836
944
|
* Concrete version of {@link ProtocolPeerAddress}.
|
|
837
945
|
*/
|
|
@@ -964,7 +1072,10 @@ export namespace CommissioningClient {
|
|
|
964
1072
|
peerAddress?: PeerAddress;
|
|
965
1073
|
|
|
966
1074
|
/**
|
|
967
|
-
* Case Authenticated Tags (CATs)
|
|
1075
|
+
* Case Authenticated Tags (CATs) intended for sessions with this node.
|
|
1076
|
+
*
|
|
1077
|
+
* Stored, but not applied yet. Sessions present the CATs of this node's own NOC in the fabric
|
|
1078
|
+
* (`ControllerBehavior.caseAuthenticatedTags`). The CATs of the peer come from its NOC.
|
|
968
1079
|
*
|
|
969
1080
|
* See {@link PeerDescriptor}
|
|
970
1081
|
*/
|
|
@@ -1015,9 +1126,11 @@ export namespace CommissioningClient {
|
|
|
1015
1126
|
commissionedAt?: Timestamp;
|
|
1016
1127
|
|
|
1017
1128
|
/**
|
|
1018
|
-
* Fabric index the peer assigned to our identity
|
|
1019
|
-
*
|
|
1020
|
-
*
|
|
1129
|
+
* Fabric index the peer assigned to our identity. It is taken from the AddNoc response, from the
|
|
1130
|
+
* CurrentFabricIndex a certificate update reads, or, when none is stored, from the CurrentFabricIndex in the
|
|
1131
|
+
* cached OperationalCredentials state. A write of a fabric-scoped list sends our entries with this FabricIndex,
|
|
1132
|
+
* as the peer loads the accessing fabric into a written entry, so the local cache holds the value the peer
|
|
1133
|
+
* stores.
|
|
1021
1134
|
*
|
|
1022
1135
|
* Distinct from {@link peerAddress.fabricIndex} which is our local fabric index.
|
|
1023
1136
|
*/
|
|
@@ -1025,7 +1138,7 @@ export namespace CommissioningClient {
|
|
|
1025
1138
|
fabricIndexOnPeer?: FabricIndex;
|
|
1026
1139
|
|
|
1027
1140
|
/**
|
|
1028
|
-
* The TTL of the discovery record if applicable
|
|
1141
|
+
* The TTL of the discovery record if applicable.
|
|
1029
1142
|
*/
|
|
1030
1143
|
@field(duration, nonvolatile)
|
|
1031
1144
|
ttl?: Duration;
|
|
@@ -1225,7 +1338,10 @@ export namespace CommissioningClient {
|
|
|
1225
1338
|
autoStateInitialize?: boolean;
|
|
1226
1339
|
|
|
1227
1340
|
/**
|
|
1228
|
-
* Case Authenticated Tags (CATs)
|
|
1341
|
+
* Case Authenticated Tags (CATs) intended for sessions with this node.
|
|
1342
|
+
*
|
|
1343
|
+
* Stored, but not applied yet. Sessions present the CATs of this node's own NOC in the fabric
|
|
1344
|
+
* (`ControllerBehavior.caseAuthenticatedTags`). The CATs of the peer come from its NOC.
|
|
1229
1345
|
*/
|
|
1230
1346
|
caseAuthenticatedTags?: CaseAuthenticatedTag[];
|
|
1231
1347
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Immutable, ServerAddress } from "@matter/general";
|
|
7
|
+
import { Immutable, ServerAddress, Time } from "@matter/general";
|
|
8
8
|
import {
|
|
9
9
|
CommissionableDevice,
|
|
10
10
|
OperationalDevice,
|
|
@@ -164,6 +164,22 @@ export namespace RemoteDescriptor {
|
|
|
164
164
|
return result;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
/**
|
|
168
|
+
* Convert a peer record of the legacy controller storage (`commissionedNodes`) to the long form.
|
|
169
|
+
*
|
|
170
|
+
* Drops the discovery TTLs: versions before 0.16.11 stored them inflated by powers of 1000 or as `null`, which
|
|
171
|
+
* fails validation when the result is written to {@link CommissioningClient}. `discoveredAt` defaults to the
|
|
172
|
+
* current time.
|
|
173
|
+
*/
|
|
174
|
+
export function legacyRecordToLongForm(discoveryData?: RemoteDescriptor, operationalAddress?: ServerAddress) {
|
|
175
|
+
return toLongForm({
|
|
176
|
+
discoveredAt: Time.nowMs,
|
|
177
|
+
...discoveryData,
|
|
178
|
+
ttl: undefined,
|
|
179
|
+
addresses: operationalAddress ? [{ ...operationalAddress, ttl: undefined }] : [],
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
|
|
167
183
|
export function toLongForm(descriptor: RemoteDescriptor | undefined, long: Long = {}) {
|
|
168
184
|
if (!descriptor) {
|
|
169
185
|
return long;
|
|
@@ -314,7 +314,8 @@ export namespace ControllerBehavior {
|
|
|
314
314
|
adminNodeId?: NodeId = undefined;
|
|
315
315
|
|
|
316
316
|
/**
|
|
317
|
-
*
|
|
317
|
+
* Only used when this controller creates the fabric; sessions on that fabric present them in the controller's
|
|
318
|
+
* NOC.
|
|
318
319
|
*/
|
|
319
320
|
caseAuthenticatedTags?: CaseAuthenticatedTag[] = undefined;
|
|
320
321
|
|
|
@@ -172,9 +172,9 @@ export namespace DclBehavior {
|
|
|
172
172
|
fetchTestCertificates = false;
|
|
173
173
|
|
|
174
174
|
/**
|
|
175
|
-
* Whether
|
|
176
|
-
*
|
|
177
|
-
* `fetchTestCertificates`.
|
|
175
|
+
* Whether device attestation trusts test (non-production) certificates: test PAAs and the Matter test CD
|
|
176
|
+
* signer. When not trusted, each is reported as a `TrustedAsTestCertificate` finding. Independent of
|
|
177
|
+
* {@link fetchTestCertificates}. When unset, defaults to the value of `fetchTestCertificates`.
|
|
178
178
|
*/
|
|
179
179
|
@field(bool)
|
|
180
180
|
acceptTestCertificates?: boolean = undefined;
|
|
@@ -24,7 +24,8 @@ const JOIN_RETRY_INTERVAL = Seconds(30);
|
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Joins the multicast address of every group the fabrics use on the node's UDP transport and follows group changes.
|
|
27
|
-
*
|
|
27
|
+
* A fabric uses a group while the group has an entry in its {@link FabricGroups.endpoints}, and the address joined is
|
|
28
|
+
* {@link FabricGroups.multicastAddressFor} of that group. An address stays joined while any fabric still uses it.
|
|
28
29
|
*/
|
|
29
30
|
export class ServerGroupNetworking {
|
|
30
31
|
#construction: Construction<ServerGroupNetworking>;
|
|
@@ -202,7 +203,7 @@ export class ServerGroupNetworking {
|
|
|
202
203
|
const fabricIndex = fabric.fabricIndex;
|
|
203
204
|
|
|
204
205
|
// Multicast membership follows group existence (groups with endpoints to receive for), not key availability:
|
|
205
|
-
// a group whose key mapping was removed still receives datagrams so Groupcast testing can report
|
|
206
|
+
// a group whose key mapping was removed still receives datagrams so Groupcast testing can report them
|
|
206
207
|
const observers = this.#observersForFabric(fabricIndex);
|
|
207
208
|
observers.on(fabric.groups.endpoints.added, groupId => {
|
|
208
209
|
this.#want(groupId, fabric);
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { ValidationLocation } from "#behavior/state/validation/location.js";
|
|
7
8
|
import { RootSupervisor } from "#behavior/supervision/RootSupervisor.js";
|
|
8
9
|
import type { ValueSupervisor } from "#behavior/supervision/ValueSupervisor.js";
|
|
9
10
|
import { Abort, InternalError, MaybePromise, NotImplementedError } from "@matter/general";
|
|
@@ -134,6 +135,28 @@ export abstract class ApiResource {
|
|
|
134
135
|
return this.parent.session;
|
|
135
136
|
}
|
|
136
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Whether this resource subtree belongs to a remote node, a peer or a group, rather than to a server node. A value
|
|
140
|
+
* it validates is sent to or received from that node.
|
|
141
|
+
*/
|
|
142
|
+
get isRemote(): boolean {
|
|
143
|
+
return this.parent?.isRemote ?? false;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* The {@link ValidationLocation.remote} of a value this resource subtree sends to its node.
|
|
148
|
+
*/
|
|
149
|
+
get outbound(): ValidationLocation["remote"] {
|
|
150
|
+
return this.isRemote ? "outbound" : undefined;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* The {@link ValidationLocation.remote} of a value this resource subtree receives from its node.
|
|
155
|
+
*/
|
|
156
|
+
get inbound(): ValidationLocation["remote"] {
|
|
157
|
+
return this.isRemote ? "inbound" : undefined;
|
|
158
|
+
}
|
|
159
|
+
|
|
137
160
|
/**
|
|
138
161
|
* Execute a procedure.
|
|
139
162
|
*/
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import type { ValidationLocation } from "#behavior/state/validation/location.js";
|
|
7
8
|
import type { ValueSupervisor } from "#behavior/supervision/ValueSupervisor.js";
|
|
8
9
|
import { asJson, Bytes } from "@matter/general";
|
|
9
10
|
import { DataModelPath } from "@matter/model";
|
|
@@ -30,14 +31,15 @@ export class Envelope<T = unknown> {
|
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* Validate against the schema. Casts to appropriate types if necessary.
|
|
34
|
+
*
|
|
35
|
+
* @param remote the remote node the value is sent to or received from, if any
|
|
33
36
|
*/
|
|
34
|
-
validate(session: ValueSupervisor.Session,
|
|
35
|
-
if (!path) {
|
|
36
|
-
path = new DataModelPath(this.#supervisor.schema.path);
|
|
37
|
-
}
|
|
38
|
-
|
|
37
|
+
validate(session: ValueSupervisor.Session, remote?: ValidationLocation["remote"]) {
|
|
39
38
|
this.#js = this.#supervisor.cast(this.#js) as T;
|
|
40
|
-
this.#supervisor.validate?.(this.js, session, {
|
|
39
|
+
this.#supervisor.validate?.(this.js, session, {
|
|
40
|
+
path: new DataModelPath(this.#supervisor.schema.path),
|
|
41
|
+
remote,
|
|
42
|
+
});
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
/**
|
|
@@ -63,7 +63,7 @@ export class CommandResource extends ApiResource {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// Validate input
|
|
66
|
-
input.validate(this.session);
|
|
66
|
+
input.validate(this.session, this.outbound);
|
|
67
67
|
|
|
68
68
|
// Invoke
|
|
69
69
|
const result = await method.call(this.#behavior, input.js);
|
|
@@ -77,7 +77,7 @@ export class CommandResource extends ApiResource {
|
|
|
77
77
|
// Create and validate result
|
|
78
78
|
const output = new Envelope({ supervisor: this.supervisorFor(responseSchema), js: result });
|
|
79
79
|
try {
|
|
80
|
-
output.validate(this.session);
|
|
80
|
+
output.validate(this.session, this.inbound);
|
|
81
81
|
} catch (e) {
|
|
82
82
|
// If output validation fails it is an internal error
|
|
83
83
|
const error = new ImplementationError("Command output validation failed");
|
|
@@ -65,6 +65,10 @@ export class NodeResource extends EndpointResource {
|
|
|
65
65
|
return this.agent.endpoint as Node;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
override get isRemote() {
|
|
69
|
+
return this.node.nodeType !== "server";
|
|
70
|
+
}
|
|
71
|
+
|
|
68
72
|
get isSelfReferential() {
|
|
69
73
|
return this.parent instanceof NodeResource && this.parent.node === this.node;
|
|
70
74
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
+
import { ValReference } from "#behavior/state/managed/ValReference.js";
|
|
7
8
|
import { RootSupervisor } from "#behavior/supervision/RootSupervisor.js";
|
|
8
9
|
import { type ValueSupervisor } from "#behavior/supervision/ValueSupervisor.js";
|
|
9
10
|
import { InternalError, NotImplementedError } from "@matter/general";
|
|
@@ -46,13 +47,13 @@ export class PropertyResource extends ApiResource {
|
|
|
46
47
|
|
|
47
48
|
override write(request: Envelope.Data) {
|
|
48
49
|
const requestEnv = new Envelope({ supervisor: this.supervisor, ...request });
|
|
49
|
-
requestEnv.validate(this.session);
|
|
50
|
+
requestEnv.validate(this.session, this.outbound);
|
|
50
51
|
this.#target[this.id] = requestEnv.js;
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
override patch(request: Envelope) {
|
|
54
55
|
request = new Envelope({ supervisor: this.supervisor, ...request });
|
|
55
|
-
request.validate(this.session);
|
|
56
|
+
request.validate(this.session, this.outbound);
|
|
56
57
|
this.#targetSupervisor.patch({ [this.id]: request.js }, this.#target, this.dataModelPath);
|
|
57
58
|
}
|
|
58
59
|
|
|
@@ -64,7 +65,8 @@ export class PropertyResource extends ApiResource {
|
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
const entry = new Envelope({ supervisor: this.supervisorFor(entrySchema), ...request });
|
|
67
|
-
entry.validate(this.session);
|
|
68
|
+
entry.validate(this.session, this.outbound);
|
|
69
|
+
ValReference.assertWritableValue(list);
|
|
68
70
|
this.#target[this.id] = [...list, entry.js];
|
|
69
71
|
}
|
|
70
72
|
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import type { ActionContext } from "#behavior/context/ActionContext.js";
|
|
8
7
|
import type { ClientNode } from "#node/ClientNode.js";
|
|
9
8
|
import type { ServerNode } from "#node/ServerNode.js";
|
|
10
9
|
import { ChangesResource } from "./ChangesResource.js";
|
|
@@ -64,19 +63,9 @@ export class ServerNodeResource extends NodeResource {
|
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
/**
|
|
67
|
-
* A peer resource acts in this request's transaction
|
|
68
|
-
* rather than the local model decides on conformance.
|
|
66
|
+
* A peer resource acts in this request's transaction.
|
|
69
67
|
*/
|
|
70
68
|
#resourceForPeer(peer: ClientNode) {
|
|
71
|
-
return new NodeResource(peer.agentFor(
|
|
69
|
+
return new NodeResource(peer.agentFor(this.agent.context), this);
|
|
72
70
|
}
|
|
73
71
|
}
|
|
74
|
-
|
|
75
|
-
function withClientPeer(context: ActionContext, clientPeerContext: ClientNode["clientPeerContext"]): ActionContext {
|
|
76
|
-
return Object.freeze(
|
|
77
|
-
Object.create(Object.getPrototypeOf(context), {
|
|
78
|
-
...Object.getOwnPropertyDescriptors(context),
|
|
79
|
-
clientPeerContext: { value: clientPeerContext ?? {}, enumerable: true },
|
|
80
|
-
}),
|
|
81
|
-
);
|
|
82
|
-
}
|
|
@@ -25,6 +25,7 @@ export class SessionsBehavior extends Behavior {
|
|
|
25
25
|
|
|
26
26
|
declare readonly state: SessionsBehavior.State;
|
|
27
27
|
declare readonly events: SessionsBehavior.Events;
|
|
28
|
+
declare internal: SessionsBehavior.Internal;
|
|
28
29
|
|
|
29
30
|
override initialize() {
|
|
30
31
|
const env = this.env;
|
|
@@ -77,8 +78,9 @@ export class SessionsBehavior extends Behavior {
|
|
|
77
78
|
return;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
// When subscription was added then inform SubscriptionsBehavior
|
|
81
|
-
if (session.subscriptions.has(subscription)) {
|
|
81
|
+
// When subscription was added then inform SubscriptionsBehavior, but not again when it moves to another session
|
|
82
|
+
if (session.subscriptions.has(subscription) && !this.internal.announcedSubscriptions.has(subscription)) {
|
|
83
|
+
this.internal.announcedSubscriptions.add(subscription);
|
|
82
84
|
this.events.subscriptionAdded.emit(subscription);
|
|
83
85
|
}
|
|
84
86
|
|
|
@@ -120,6 +122,10 @@ export namespace SessionsBehavior {
|
|
|
120
122
|
intervals?: Partial<SessionIntervals>;
|
|
121
123
|
}
|
|
122
124
|
|
|
125
|
+
export class Internal {
|
|
126
|
+
announcedSubscriptions = new WeakSet<Subscription>();
|
|
127
|
+
}
|
|
128
|
+
|
|
123
129
|
export class Events extends EventEmitter {
|
|
124
130
|
opened = Observable<[session: Session]>();
|
|
125
131
|
closed = Observable<[session: Session]>();
|