@matter/protocol 0.16.0-alpha.0-20251020-3f6e46245 → 0.16.0-alpha.0-20251022-5a69ce65a
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/action/client/ClientInteraction.d.ts.map +1 -1
- package/dist/cjs/action/client/ClientInteraction.js +2 -2
- package/dist/cjs/action/client/ClientInteraction.js.map +1 -1
- package/dist/cjs/certificate/DeviceCertification.d.ts.map +1 -1
- package/dist/cjs/certificate/DeviceCertification.js +5 -0
- package/dist/cjs/certificate/DeviceCertification.js.map +1 -1
- package/dist/cjs/fabric/FabricAuthority.d.ts +12 -18
- package/dist/cjs/fabric/FabricAuthority.d.ts.map +1 -1
- package/dist/cjs/fabric/FabricAuthority.js +16 -29
- package/dist/cjs/fabric/FabricAuthority.js.map +2 -2
- package/dist/cjs/fabric/TestFabric.d.ts +1 -1
- package/dist/cjs/fabric/TestFabric.d.ts.map +1 -1
- package/dist/cjs/fabric/TestFabric.js +15 -15
- package/dist/cjs/fabric/TestFabric.js.map +1 -1
- package/dist/cjs/interaction/FabricAccessControl.d.ts.map +1 -1
- package/dist/cjs/interaction/FabricAccessControl.js +4 -1
- package/dist/cjs/interaction/FabricAccessControl.js.map +1 -1
- package/dist/cjs/mdns/MdnsClient.d.ts.map +1 -1
- package/dist/cjs/mdns/MdnsClient.js +34 -19
- package/dist/cjs/mdns/MdnsClient.js.map +1 -1
- package/dist/cjs/peer/ControllerDiscovery.d.ts.map +1 -1
- package/dist/cjs/peer/ControllerDiscovery.js +6 -7
- package/dist/cjs/peer/ControllerDiscovery.js.map +1 -1
- package/dist/cjs/protocol/DeviceAdvertiser.js +2 -2
- package/dist/cjs/protocol/DeviceAdvertiser.js.map +1 -1
- package/dist/cjs/protocol/MessageExchange.js +2 -2
- package/dist/cjs/protocol/MessageExchange.js.map +1 -1
- package/dist/cjs/session/SessionManager.d.ts +13 -12
- package/dist/cjs/session/SessionManager.d.ts.map +1 -1
- package/dist/cjs/session/SessionManager.js.map +1 -1
- package/dist/esm/action/client/ClientInteraction.d.ts.map +1 -1
- package/dist/esm/action/client/ClientInteraction.js +1 -1
- package/dist/esm/action/client/ClientInteraction.js.map +1 -1
- package/dist/esm/certificate/DeviceCertification.d.ts.map +1 -1
- package/dist/esm/certificate/DeviceCertification.js +5 -0
- package/dist/esm/certificate/DeviceCertification.js.map +1 -1
- package/dist/esm/fabric/FabricAuthority.d.ts +12 -18
- package/dist/esm/fabric/FabricAuthority.d.ts.map +1 -1
- package/dist/esm/fabric/FabricAuthority.js +16 -29
- package/dist/esm/fabric/FabricAuthority.js.map +2 -2
- package/dist/esm/fabric/TestFabric.d.ts +1 -1
- package/dist/esm/fabric/TestFabric.d.ts.map +1 -1
- package/dist/esm/fabric/TestFabric.js +15 -15
- package/dist/esm/fabric/TestFabric.js.map +1 -1
- package/dist/esm/interaction/FabricAccessControl.d.ts.map +1 -1
- package/dist/esm/interaction/FabricAccessControl.js +5 -2
- package/dist/esm/interaction/FabricAccessControl.js.map +1 -1
- package/dist/esm/mdns/MdnsClient.d.ts.map +1 -1
- package/dist/esm/mdns/MdnsClient.js +34 -19
- package/dist/esm/mdns/MdnsClient.js.map +1 -1
- package/dist/esm/peer/ControllerDiscovery.d.ts.map +1 -1
- package/dist/esm/peer/ControllerDiscovery.js +6 -7
- package/dist/esm/peer/ControllerDiscovery.js.map +1 -1
- package/dist/esm/protocol/DeviceAdvertiser.js +2 -2
- package/dist/esm/protocol/DeviceAdvertiser.js.map +1 -1
- package/dist/esm/protocol/MessageExchange.js +2 -2
- package/dist/esm/protocol/MessageExchange.js.map +1 -1
- package/dist/esm/session/SessionManager.d.ts +13 -12
- package/dist/esm/session/SessionManager.d.ts.map +1 -1
- package/dist/esm/session/SessionManager.js.map +1 -1
- package/package.json +6 -6
- package/src/action/client/ClientInteraction.ts +1 -1
- package/src/certificate/DeviceCertification.ts +10 -0
- package/src/fabric/FabricAuthority.ts +24 -38
- package/src/fabric/TestFabric.ts +15 -16
- package/src/interaction/FabricAccessControl.ts +5 -2
- package/src/mdns/MdnsClient.ts +36 -19
- package/src/peer/ControllerDiscovery.ts +6 -7
- package/src/protocol/DeviceAdvertiser.ts +2 -2
- package/src/protocol/MessageExchange.ts +2 -2
- package/src/session/SessionManager.ts +14 -2
|
@@ -88,9 +88,9 @@ export class ControllerDiscovery {
|
|
|
88
88
|
): Promise<CommissionableDevice[]> {
|
|
89
89
|
const discoveredDevices = new Map<string, CommissionableDevice>();
|
|
90
90
|
|
|
91
|
-
await Promise.all(
|
|
92
|
-
scanners.map(async scanner =>
|
|
93
|
-
|
|
91
|
+
const results = await Promise.all(
|
|
92
|
+
scanners.map(async scanner =>
|
|
93
|
+
scanner.findCommissionableDevicesContinuously(
|
|
94
94
|
identifier,
|
|
95
95
|
device => {
|
|
96
96
|
const { deviceIdentifier } = device;
|
|
@@ -100,14 +100,13 @@ export class ControllerDiscovery {
|
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
timeout,
|
|
103
|
-
)
|
|
104
|
-
|
|
103
|
+
),
|
|
104
|
+
),
|
|
105
105
|
);
|
|
106
106
|
|
|
107
107
|
// The final answer only consists the devices still left, so expired ones will be excluded
|
|
108
108
|
const finalDiscoveredDevices = new Map<string, CommissionableDevice>();
|
|
109
|
-
|
|
110
|
-
const devices = scanner.getDiscoveredCommissionableDevices(identifier);
|
|
109
|
+
results.forEach(devices => {
|
|
111
110
|
devices.forEach(device => {
|
|
112
111
|
const { deviceIdentifier } = device;
|
|
113
112
|
if (!discoveredDevices.has(deviceIdentifier)) {
|
|
@@ -166,7 +166,7 @@ export class DeviceAdvertiser {
|
|
|
166
166
|
* Advertise the device as operational.
|
|
167
167
|
*/
|
|
168
168
|
enterOperationalMode() {
|
|
169
|
-
if (this.#isOperational) {
|
|
169
|
+
if (this.#isOperational || this.#isClosing) {
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
172
|
|
|
@@ -179,7 +179,7 @@ export class DeviceAdvertiser {
|
|
|
179
179
|
* Begin automatic broadcast for fabrics if in operational mode.
|
|
180
180
|
*/
|
|
181
181
|
#startOperationalAdvertisement() {
|
|
182
|
-
if (!this.#isOperational) {
|
|
182
|
+
if (!this.#isOperational || this.#isClosing) {
|
|
183
183
|
return;
|
|
184
184
|
}
|
|
185
185
|
|
|
@@ -494,10 +494,10 @@ export class MessageExchange {
|
|
|
494
494
|
|
|
495
495
|
#retransmitMessage(message: Message, expectedProcessingTime?: Duration) {
|
|
496
496
|
this.#retransmissionCounter++;
|
|
497
|
-
if (this.#retransmissionCounter >= MRP.MAX_TRANSMISSIONS) {
|
|
497
|
+
if (this.#isClosing || this.#retransmissionCounter >= MRP.MAX_TRANSMISSIONS) {
|
|
498
498
|
// Ok all 4 resubmissions are done, but we need to wait a bit longer because of processing time and
|
|
499
499
|
// the resubmissions from the other side
|
|
500
|
-
if (expectedProcessingTime) {
|
|
500
|
+
if (expectedProcessingTime && !this.#isClosing) {
|
|
501
501
|
// We already have waited after the last message was sent, so deduct this time from the final wait time
|
|
502
502
|
const finalWaitTime = Millis(
|
|
503
503
|
this.channel.calculateMaximumPeerResponseTime(
|
|
@@ -31,7 +31,7 @@ import { PeerAddress, PeerAddressMap } from "#peer/PeerAddress.js";
|
|
|
31
31
|
import { GroupSession } from "#session/GroupSession.js";
|
|
32
32
|
import { CaseAuthenticatedTag, DEFAULT_MAX_PATHS_PER_INVOKE, FabricId, FabricIndex, GroupId, NodeId } from "#types";
|
|
33
33
|
import { UnexpectedDataError } from "@matter/general";
|
|
34
|
-
import { Fabric } from "../fabric/Fabric.js";
|
|
34
|
+
import { ExposedFabricInformation, Fabric } from "../fabric/Fabric.js";
|
|
35
35
|
import { MessageCounter } from "../protocol/MessageCounter.js";
|
|
36
36
|
import { InsecureSession } from "./InsecureSession.js";
|
|
37
37
|
import { NodeSession } from "./NodeSession.js";
|
|
@@ -90,6 +90,18 @@ type ResumptionStorageRecord = {
|
|
|
90
90
|
caseAuthenticatedTags?: CaseAuthenticatedTag[];
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
export interface ActiveSessionInformation {
|
|
94
|
+
name: string;
|
|
95
|
+
nodeId: NodeId;
|
|
96
|
+
peerNodeId: NodeId;
|
|
97
|
+
fabric?: ExposedFabricInformation;
|
|
98
|
+
isPeerActive: boolean;
|
|
99
|
+
secure: boolean;
|
|
100
|
+
lastInteractionTimestamp?: number;
|
|
101
|
+
lastActiveTimestamp?: number;
|
|
102
|
+
numberOfActiveSubscriptions: number;
|
|
103
|
+
}
|
|
104
|
+
|
|
93
105
|
/**
|
|
94
106
|
* Interfaces {@link SessionManager} with other components.
|
|
95
107
|
*/
|
|
@@ -654,7 +666,7 @@ export class SessionManager {
|
|
|
654
666
|
);
|
|
655
667
|
}
|
|
656
668
|
|
|
657
|
-
getActiveSessionInformation() {
|
|
669
|
+
getActiveSessionInformation(): ActiveSessionInformation[] {
|
|
658
670
|
this.#construction.assert();
|
|
659
671
|
return [...this.#sessions]
|
|
660
672
|
.filter(session => session.isSecure && !session.isPase)
|