diff --git a/package-lock.json b/package-lock.json index 3b8c86ec9..309e26074 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "polykey", - "version": "2.2.0", + "version": "2.3.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "polykey", - "version": "2.2.0", + "version": "2.3.0", "license": "GPL-3.0", "dependencies": { "@matrixai/async-cancellable": "^2.0.1", diff --git a/package.json b/package.json index fc565925f..c00a03fa4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "polykey", - "version": "2.2.0", + "version": "2.3.0", "homepage": "https://polykey.com", "author": "Matrix AI", "contributors": [ diff --git a/src/PolykeyAgent.ts b/src/PolykeyAgent.ts index bd9664772..30590d9e0 100644 --- a/src/PolykeyAgent.ts +++ b/src/PolykeyAgent.ts @@ -182,7 +182,7 @@ class PolykeyAgent { let nodeConnectionManager: | NodeConnectionManager | undefined; - let nodeManager: NodeManager | undefined; + let nodeManager: NodeManager | undefined; let discovery: Discovery | undefined; let notificationsManager: NotificationsManager | undefined; let vaultManager: VaultManager | undefined; @@ -475,7 +475,7 @@ class PolykeyAgent { public readonly nodeGraph: NodeGraph; public readonly taskManager: TaskManager; public readonly nodeConnectionManager: NodeConnectionManager; - public readonly nodeManager: NodeManager; + public readonly nodeManager: NodeManager; public readonly discovery: Discovery; public readonly vaultManager: VaultManager; public readonly notificationsManager: NotificationsManager; @@ -546,7 +546,7 @@ class PolykeyAgent { nodeGraph: NodeGraph; taskManager: TaskManager; nodeConnectionManager: NodeConnectionManager; - nodeManager: NodeManager; + nodeManager: NodeManager; discovery: Discovery; vaultManager: VaultManager; notificationsManager: NotificationsManager; diff --git a/src/bootstrap/utils.ts b/src/bootstrap/utils.ts index a56b280b9..500c2e00a 100644 --- a/src/bootstrap/utils.ts +++ b/src/bootstrap/utils.ts @@ -5,6 +5,7 @@ import type { PasswordOpsLimit, PasswordMemLimit, } from '../keys/types.js'; +import type { AgentClientManifest } from '#nodes/agent/callers/index.js'; import path from 'node:path'; import Logger from '@matrixai/logger'; import { DB } from '@matrixai/db'; @@ -168,7 +169,7 @@ async function bootstrapState({ logger: logger.getChild(NodeGraph.name), }); - const nodeManager = new NodeManager({ + const nodeManager = new NodeManager({ db, keyRing, nodeGraph, diff --git a/src/client/handlers/NodesAdd.ts b/src/client/handlers/NodesAdd.ts index a93757961..9ad91b477 100644 --- a/src/client/handlers/NodesAdd.ts +++ b/src/client/handlers/NodesAdd.ts @@ -9,6 +9,7 @@ import type { import type { NodeId } from '../../ids/index.js'; import type { Host, Port } from '../../network/types.js'; import type NodeManager from '../../nodes/NodeManager.js'; +import type { AgentClientManifest } from '#nodes/agent/callers/index.js'; import { UnaryHandler } from '@matrixai/rpc'; import { matchSync } from '../../utils/index.js'; import { validateSync } from '../../validation/index.js'; @@ -19,7 +20,7 @@ import * as nodeErrors from '../../nodes/errors.js'; class NodesAdd extends UnaryHandler< { db: DB; - nodeManager: NodeManager; + nodeManager: NodeManager; }, ClientRPCRequestParams, ClientRPCResponseResult @@ -30,7 +31,10 @@ class NodesAdd extends UnaryHandler< _meta: Record, ctx: ContextTimed, ): Promise => { - const { db, nodeManager }: { db: DB; nodeManager: NodeManager } = + const { + db, + nodeManager, + }: { db: DB; nodeManager: NodeManager } = this.container; const { nodeId, diff --git a/src/client/handlers/NodesClaim.ts b/src/client/handlers/NodesClaim.ts index eb7babf39..fb27aa263 100644 --- a/src/client/handlers/NodesClaim.ts +++ b/src/client/handlers/NodesClaim.ts @@ -7,6 +7,7 @@ import type { } from '../types.js'; import type { NodeId } from '../../ids/index.js'; import type NodeManager from '../../nodes/NodeManager.js'; +import type { AgentClientManifest } from '#nodes/agent/callers/index.js'; import { UnaryHandler } from '@matrixai/rpc'; import * as ids from '../../ids/index.js'; import { matchSync } from '../../utils/index.js'; @@ -15,7 +16,7 @@ import { validateSync } from '../../validation/index.js'; class NodesClaim extends UnaryHandler< { db: DB; - nodeManager: NodeManager; + nodeManager: NodeManager; }, ClientRPCRequestParams, ClientRPCResponseResult @@ -23,7 +24,10 @@ class NodesClaim extends UnaryHandler< public handle = async ( input: ClientRPCRequestParams, ): Promise> => { - const { db, nodeManager }: { db: DB; nodeManager: NodeManager } = + const { + db, + nodeManager, + }: { db: DB; nodeManager: NodeManager } = this.container; const { nodeId, diff --git a/src/client/handlers/NodesFind.ts b/src/client/handlers/NodesFind.ts index 690927d40..83b2ab0d4 100644 --- a/src/client/handlers/NodesFind.ts +++ b/src/client/handlers/NodesFind.ts @@ -8,6 +8,7 @@ import type { } from '../types.js'; import type { NodeId } from '../../ids/index.js'; import type NodeManager from '../../nodes/NodeManager.js'; +import type { AgentClientManifest } from '#nodes/agent/callers/index.js'; import { UnaryHandler } from '@matrixai/rpc'; import { validateSync } from '../../validation/index.js'; import { matchSync } from '../../utils/index.js'; @@ -16,7 +17,7 @@ import * as nodesErrors from '../../nodes/errors.js'; class NodesFind extends UnaryHandler< { - nodeManager: NodeManager; + nodeManager: NodeManager; }, ClientRPCRequestParams, ClientRPCResponseResult @@ -27,7 +28,8 @@ class NodesFind extends UnaryHandler< _meta: Record, ctx: ContextTimed, ): Promise> => { - const { nodeManager }: { nodeManager: NodeManager } = this.container; + const { nodeManager }: { nodeManager: NodeManager } = + this.container; const { nodeId, }: { diff --git a/src/client/handlers/NodesPing.ts b/src/client/handlers/NodesPing.ts index ed6914095..70db69829 100644 --- a/src/client/handlers/NodesPing.ts +++ b/src/client/handlers/NodesPing.ts @@ -6,6 +6,7 @@ import type { } from '../types.js'; import type { NodeId } from '../../ids/index.js'; import type NodeManager from '../../nodes/NodeManager.js'; +import type { AgentClientManifest } from '#nodes/agent/callers/index.js'; import { UnaryHandler } from '@matrixai/rpc'; import * as ids from '../../ids/index.js'; import { validateSync } from '../../validation/index.js'; @@ -13,7 +14,7 @@ import { matchSync } from '../../utils/index.js'; class NodesPing extends UnaryHandler< { - nodeManager: NodeManager; + nodeManager: NodeManager; }, ClientRPCRequestParams, ClientRPCResponseResult @@ -21,7 +22,8 @@ class NodesPing extends UnaryHandler< public handle = async ( input: ClientRPCRequestParams, ): Promise> => { - const { nodeManager }: { nodeManager: NodeManager } = this.container; + const { nodeManager }: { nodeManager: NodeManager } = + this.container; const { nodeId, }: { diff --git a/src/client/handlers/index.ts b/src/client/handlers/index.ts index 66888757f..037eb0318 100644 --- a/src/client/handlers/index.ts +++ b/src/client/handlers/index.ts @@ -108,7 +108,7 @@ const serverManifest = (container: { acl: ACL; audit: Audit; notificationsManager: NotificationsManager; - nodeManager: NodeManager; + nodeManager: NodeManager; nodeConnectionManager: NodeConnectionManager; nodeGraph: NodeGraph; vaultManager: VaultManager; diff --git a/src/discovery/Discovery.ts b/src/discovery/Discovery.ts index c9cc2d349..ebd5c1b9f 100644 --- a/src/discovery/Discovery.ts +++ b/src/discovery/Discovery.ts @@ -28,6 +28,7 @@ import type { ClaimLinkNode, } from '../claims/payloads/index.js'; import type { DiscoveryQueueInfo } from './types.js'; +import type { AgentClientManifest } from '#nodes/agent/callers/index.js'; import Logger from '@matrixai/logger'; import { createDestroyStartStop } from '@matrixai/async-init'; import { decorators } from '@matrixai/contexts'; @@ -90,7 +91,7 @@ class Discovery { keyRing: KeyRing; gestaltGraph: GestaltGraph; identitiesManager: IdentitiesManager; - nodeManager: NodeManager; + nodeManager: NodeManager; taskManager: TaskManager; discoverVertexTimeoutTime?: number; rediscoverCheckIntervalTime?: number; @@ -125,7 +126,7 @@ class Discovery { protected keyRing: KeyRing; protected gestaltGraph: GestaltGraph; protected identitiesManager: IdentitiesManager; - protected nodeManager: NodeManager; + protected nodeManager: NodeManager; protected taskManager: TaskManager; protected discoverVertexTimeoutTime: number; /** @@ -242,7 +243,7 @@ class Discovery { keyRing: KeyRing; gestaltGraph: GestaltGraph; identitiesManager: IdentitiesManager; - nodeManager: NodeManager; + nodeManager: NodeManager; taskManager: TaskManager; discoverVertexTimeoutTime: number; rediscoverCheckIntervalTime: number; diff --git a/src/nodes/NodeConnectionManager.ts b/src/nodes/NodeConnectionManager.ts index 861d38e4c..05baefdb4 100644 --- a/src/nodes/NodeConnectionManager.ts +++ b/src/nodes/NodeConnectionManager.ts @@ -17,7 +17,7 @@ import type { SuccessMessage, } from './agent/types.js'; import type { AgentServerManifest } from './agent/handlers/index.js'; -import type { AgentClientManifestCore } from './agent/callers/index.js'; +import type { AgentClientManifestNodeConnectionManager } from './agent/callers/index.js'; import type KeyRing from '../keys/KeyRing.js'; import type { CertificatePEM } from '../keys/types.js'; import type { @@ -125,16 +125,19 @@ const rpcMethodsWhitelist = ['nodesAuthenticateConnection']; * The NodeConnectionManager encapsulates `QUICServer`. * While the NodeConnection encapsulates `QUICClient`. */ -// eslint-disable-next-line -interface NodeConnectionManager - extends startStop.StartStop {} +interface NodeConnectionManager< + // eslint-disable-next-line + Manifest extends AgentClientManifestNodeConnectionManager, +> extends startStop.StartStop {} @startStop.StartStop({ eventStart: nodesEvents.EventNodeConnectionManagerStart, eventStarted: nodesEvents.EventNodeConnectionManagerStarted, eventStop: nodesEvents.EventNodeConnectionManagerStop, eventStopped: nodesEvents.EventNodeConnectionManagerStopped, }) -class NodeConnectionManager { +class NodeConnectionManager< + Manifest extends AgentClientManifestNodeConnectionManager, +> { /** * Alpha constant for kademlia * The number of the closest nodes to contact initially diff --git a/src/nodes/NodeManager.ts b/src/nodes/NodeManager.ts index 275e07997..486d1389f 100644 --- a/src/nodes/NodeManager.ts +++ b/src/nodes/NodeManager.ts @@ -33,7 +33,7 @@ import type { import type NodeConnectionManager from './NodeConnectionManager.js'; import type NodeGraph from './NodeGraph.js'; import type { ServicePOJO } from '@matrixai/mdns'; -import type { AgentClientManifest } from './agent/callers/index.js'; +import type { AgentClientManifestNodeManager } from './agent/callers/index.js'; import { withF } from '@matrixai/resources'; import { events as mdnsEvents, MDNS, utils as mdnsUtils } from '@matrixai/mdns'; import Logger from '@matrixai/logger'; @@ -67,14 +67,16 @@ const abortPendingConnectionsReason = Symbol( * It encapsulates mutations to the NodeGraph. * It listens to the NodeConnectionManager events. */ -interface NodeManager extends startStop.StartStop {} +// eslint-disable-next-line +interface NodeManager + extends startStop.StartStop {} @startStop.StartStop({ eventStart: nodesEvents.EventNodeManagerStart, eventStarted: nodesEvents.EventNodeManagerStarted, eventStop: nodesEvents.EventNodeManagerStop, eventStopped: nodesEvents.EventNodeManagerStopped, }) -class NodeManager { +class NodeManager { /** * Time used to establish `NodeConnection` */ @@ -101,7 +103,7 @@ class NodeManager { protected gestaltGraph: GestaltGraph; protected taskManager: TaskManager; protected nodeGraph: NodeGraph; - protected nodeConnectionManager: NodeConnectionManager; + protected nodeConnectionManager: NodeConnectionManager; protected mdnsOptions: | { groups: Array; @@ -244,7 +246,7 @@ class NodeManager { ); const successfulConnections = connectionResults.filter( (r) => r.status === 'fulfilled', - ) as Array>>; + ) as Array>>; if (successfulConnections.length === 0) { const failedConnectionErrors = connectionResults .filter((r) => r.status === 'rejected') @@ -344,7 +346,7 @@ class NodeManager { groups: Array; port: Port; }; - nodeConnectionManager: NodeConnectionManager; + nodeConnectionManager: NodeConnectionManager; connectionConnectTimeoutTime?: number; refreshBucketDelayTime?: number; refreshBucketDelayJitter?: number; @@ -460,7 +462,7 @@ class NodeManager { public acquireConnection( nodeId: NodeId, ctx: ContextTimed, - ): ResourceAcquire> { + ): ResourceAcquire> { if (this.keyRing.getNodeId().equals(nodeId)) { throw new nodesErrors.ErrorNodeManagerNodeIdOwn(); } @@ -498,13 +500,13 @@ class NodeManager { public async withConnF( nodeId: NodeId, ctx: Partial | undefined, - f: (conn: NodeConnection) => Promise, + f: (conn: NodeConnection) => Promise, ): Promise; @startStop.ready(new nodesErrors.ErrorNodeManagerNotRunning()) public async withConnF( nodeId: NodeId, @decorators.context ctx: ContextTimed, - f: (conn: NodeConnection) => Promise, + f: (conn: NodeConnection) => Promise, ): Promise { return await withF( [this.acquireConnection(nodeId, ctx)], @@ -526,18 +528,14 @@ class NodeManager { public withConnG( nodeId: NodeId, ctx: Partial | undefined, - g: ( - conn: NodeConnection, - ) => AsyncGenerator, + g: (conn: NodeConnection) => AsyncGenerator, ): AsyncGenerator; @startStop.ready(new nodesErrors.ErrorNodeManagerNotRunning()) @decorators.timed() public async *withConnG( nodeId: NodeId, @decorators.context ctx: ContextTimed, - g: ( - conn: NodeConnection, - ) => AsyncGenerator, + g: (conn: NodeConnection) => AsyncGenerator, ): AsyncGenerator { const acquire = this.acquireConnection(nodeId, ctx); const [release, conn] = await acquire(); @@ -712,7 +710,7 @@ class NodeManager { ctx.signal.throwIfAborted(); const isDone = await nodeConnectionsQueue.withNodeSignal( async (nodeIdTarget, nodeIdSignaller) => { - let nodeConnection: NodeConnection | undefined; + let nodeConnection: NodeConnection | undefined; if ( !this.nodeConnectionManager.hasConnection(nodeIdTarget) && nodeIdSignaller != null @@ -958,7 +956,8 @@ class NodeManager { ): PromiseCancellable>; @decorators.timedCancellable( true, - (nodeManager: NodeManager) => nodeManager.connectionConnectTimeoutTime, + (nodeManager: NodeManager) => + nodeManager.connectionConnectTimeoutTime, ) public async queryMDNS( nodeId: NodeId, @@ -1055,7 +1054,8 @@ class NodeManager { ): PromiseCancellable<[[Host, Port], NodeContactAddressData]>; @decorators.timedCancellable( true, - (nodeManager: NodeManager) => nodeManager.connectionFindMDNSTimeoutTime, + (nodeManager: NodeManager) => + nodeManager.connectionFindMDNSTimeoutTime, ) public async findNodeByMDNS( nodeId: NodeId, @@ -1167,7 +1167,7 @@ class NodeManager { @startStop.ready(new nodesErrors.ErrorNodeConnectionManagerNotRunning()) @decorators.timedCancellable( true, - (nodeConnectionManager: NodeConnectionManager) => + (nodeConnectionManager: NodeConnectionManager) => nodeConnectionManager.connectionConnectTimeoutTime, ) public async pingNode( @@ -1199,7 +1199,7 @@ class NodeManager { @startStop.ready(new nodesErrors.ErrorNodeConnectionManagerNotRunning()) @decorators.timedCancellable( true, - (nodeConnectionManager: NodeConnectionManager) => + (nodeConnectionManager: NodeConnectionManager) => nodeConnectionManager.connectionConnectTimeoutTime, ) public async pingNodeAddress( @@ -1230,18 +1230,18 @@ class NodeManager { * For node1 -> node2 claims, the verification process also involves connecting * to node2 to verify the claim (to retrieve its signing public key). * @param targetNodeId Id of the node to connect request the chain data of. - * @param claimId If set then we get the claims newer that this claim ID. + * @param _claimId If set then we get the claims newer that this claim ID. * @param ctx */ public requestChainData( targetNodeId: NodeId, - claimId?: ClaimId, + _claimId?: ClaimId, ctx?: Partial, ): PromiseCancellable>; @decorators.timedCancellable(true) public async requestChainData( targetNodeId: NodeId, - claimId: ClaimId | undefined, + _claimId: ClaimId | undefined, @decorators.context ctx: ContextTimed, ): Promise> { // Verify the node's chain with its own public key diff --git a/src/nodes/agent/callers/index.ts b/src/nodes/agent/callers/index.ts index 60b738638..a1636354a 100644 --- a/src/nodes/agent/callers/index.ts +++ b/src/nodes/agent/callers/index.ts @@ -14,24 +14,33 @@ import vaultsGitInfoGet from './vaultsGitInfoGet.js'; import vaultsGitPackGet from './vaultsGitPackGet.js'; import vaultsScan from './vaultsScan.js'; -const manifestClientCore = { +const manifestClientNodeConnectionManager = { nodesConnectionSignalFinal, nodesConnectionSignalInitial, nodesAuthenticateConnection, } satisfies ClientManifest; -type AgentClientManifestCore = typeof manifestClientCore & ClientManifest; +type AgentClientManifestNodeConnectionManager = + typeof manifestClientNodeConnectionManager & ClientManifest; + +const manifestClientNodeManager = { + nodesClaimsGet, + nodesClosestActiveConnectionsGet, + nodesClosestLocalNodesGet, + nodesCrossSignClaim, + ...manifestClientNodeConnectionManager, +} satisfies ClientManifest; + +type AgentClientManifestNodeManager = typeof manifestClientNodeManager & + ClientManifest; /** * Client manifest */ const manifestClient = { - ...manifestClientCore, + ...manifestClientNodeConnectionManager, + ...manifestClientNodeManager, nodesAuditEventsGet, - nodesClaimsGet, - nodesClosestActiveConnectionsGet, - nodesClosestLocalNodesGet, - nodesCrossSignClaim, nodesClaimNetworkSign, nodesClaimNetworkVerify, notificationsSend, @@ -45,7 +54,8 @@ type AgentClientManifest = typeof manifestClient; export default manifestClient; export { - manifestClientCore, + manifestClientNodeConnectionManager, + manifestClientNodeManager, nodesAuthenticateConnection, nodesAuditEventsGet, nodesClaimsGet, @@ -62,4 +72,8 @@ export { vaultsScan, }; -export type { AgentClientManifestCore, AgentClientManifest }; +export type { + AgentClientManifestNodeConnectionManager, + AgentClientManifestNodeManager, + AgentClientManifest, +}; diff --git a/src/nodes/agent/handlers/NodesClaimNetworkSign.ts b/src/nodes/agent/handlers/NodesClaimNetworkSign.ts index 0f588b7a4..c56498b42 100644 --- a/src/nodes/agent/handlers/NodesClaimNetworkSign.ts +++ b/src/nodes/agent/handlers/NodesClaimNetworkSign.ts @@ -5,13 +5,14 @@ import type { } from '../types.js'; import type NodeManager from '../../../nodes/NodeManager.js'; import type { JSONValue } from '../../../types.js'; +import type { AgentClientManifest } from '#nodes/agent/callers/index.js'; import { UnaryHandler } from '@matrixai/rpc'; import * as agentUtils from '../utils.js'; import * as nodesErrors from '../../errors.js'; class NodesClaimNetworkSign extends UnaryHandler< { - nodeManager: NodeManager; + nodeManager: NodeManager; }, AgentRPCRequestParams, AgentRPCResponseResult @@ -21,7 +22,8 @@ class NodesClaimNetworkSign extends UnaryHandler< _cancel: (reason?: any) => void, meta: Record | undefined, ): Promise> => { - const { nodeManager }: { nodeManager: NodeManager } = this.container; + const { nodeManager }: { nodeManager: NodeManager } = + this.container; // Connections should always be validated const requestingNodeId = agentUtils.nodeIdFromMeta(meta); if (requestingNodeId == null) { diff --git a/src/nodes/agent/handlers/NodesClaimNetworkVerify.ts b/src/nodes/agent/handlers/NodesClaimNetworkVerify.ts index 81fd83b86..9561cded4 100644 --- a/src/nodes/agent/handlers/NodesClaimNetworkVerify.ts +++ b/src/nodes/agent/handlers/NodesClaimNetworkVerify.ts @@ -5,13 +5,14 @@ import type { } from '../types.js'; import type NodeManager from '../../../nodes/NodeManager.js'; import type { JSONValue } from '../../../types.js'; +import type { AgentClientManifest } from '#nodes/agent/callers/index.js'; import { UnaryHandler } from '@matrixai/rpc'; import * as agentUtils from '../utils.js'; import * as nodesErrors from '../../errors.js'; class NodesClaimNetworkVerify extends UnaryHandler< { - nodeManager: NodeManager; + nodeManager: NodeManager; }, AgentRPCRequestParams, AgentRPCResponseResult<{ success: true }> @@ -21,7 +22,8 @@ class NodesClaimNetworkVerify extends UnaryHandler< _cancel: (reason?: any) => void, meta: Record | undefined, ): Promise> => { - const { nodeManager }: { nodeManager: NodeManager } = this.container; + const { nodeManager }: { nodeManager: NodeManager } = + this.container; const requestingNodeId = agentUtils.nodeIdFromMeta(meta); if (requestingNodeId == null) { throw new nodesErrors.ErrorNodeConnectionInvalidIdentity(); diff --git a/src/nodes/agent/handlers/NodesCrossSignClaim.ts b/src/nodes/agent/handlers/NodesCrossSignClaim.ts index a1cef64b8..7d635f36a 100644 --- a/src/nodes/agent/handlers/NodesCrossSignClaim.ts +++ b/src/nodes/agent/handlers/NodesCrossSignClaim.ts @@ -6,6 +6,7 @@ import type { } from '../types.js'; import type NodeManager from '../../NodeManager.js'; import type ACL from '../../../acl/ACL.js'; +import type { AgentClientManifest } from '#nodes/agent/callers/index.js'; import { DuplexHandler } from '@matrixai/rpc'; import * as agentUtils from '../utils.js'; import * as nodesErrors from '../../errors.js'; @@ -16,7 +17,7 @@ import * as nodesErrors from '../../errors.js'; class NodesCrossSignClaim extends DuplexHandler< { acl: ACL; - nodeManager: NodeManager; + nodeManager: NodeManager; }, AgentRPCRequestParams, AgentRPCResponseResult @@ -31,7 +32,7 @@ class NodesCrossSignClaim extends DuplexHandler< nodeManager, }: { acl: ACL; - nodeManager: NodeManager; + nodeManager: NodeManager; } = this.container; const requestingNodeId = agentUtils.nodeIdFromMeta(meta); if (requestingNodeId == null) { diff --git a/src/nodes/agent/handlers/index.ts b/src/nodes/agent/handlers/index.ts index 83d667182..19d18332a 100644 --- a/src/nodes/agent/handlers/index.ts +++ b/src/nodes/agent/handlers/index.ts @@ -33,7 +33,7 @@ const manifestServer = (container: { sigchain: Sigchain; nodeGraph: NodeGraph; acl: ACL; - nodeManager: NodeManager; + nodeManager: NodeManager; nodeConnectionManager: NodeConnectionManager; keyRing: KeyRing; logger: Logger; diff --git a/src/notifications/NotificationsManager.ts b/src/notifications/NotificationsManager.ts index 23d4adaaa..9bfc04298 100644 --- a/src/notifications/NotificationsManager.ts +++ b/src/notifications/NotificationsManager.ts @@ -16,6 +16,7 @@ import type { } from '../ids/types.js'; import type { Task, TaskHandler, TaskInfo } from '../tasks/types.js'; import type { TaskManager } from '../tasks/index.js'; +import type { AgentClientManifest } from '#nodes/agent/callers/index.js'; import Logger from '@matrixai/logger'; import { IdInternal } from '@matrixai/id'; import { createDestroyStartStop } from '@matrixai/async-init'; @@ -67,7 +68,7 @@ class NotificationsManager { }: { acl: ACL; db: DB; - nodeManager: NodeManager; + nodeManager: NodeManager; taskManager: TaskManager; keyRing: KeyRing; messageCap?: number; @@ -100,7 +101,7 @@ class NotificationsManager { protected acl: ACL; protected db: DB; protected keyRing: KeyRing; - protected nodeManager: NodeManager; + protected nodeManager: NodeManager; protected taskManager: TaskManager; protected messageCap: number; protected sendNotificationRetries: number; @@ -225,7 +226,7 @@ class NotificationsManager { }: { acl: ACL; db: DB; - nodeManager: NodeManager; + nodeManager: NodeManager; taskManager: TaskManager; keyRing: KeyRing; messageCap: number; diff --git a/src/types.ts b/src/types.ts index 9369f42e5..60baf50bc 100644 --- a/src/types.ts +++ b/src/types.ts @@ -195,7 +195,7 @@ type InverseRecord< * Used when an empty object is needed. * Defined here with a linter override to avoid a false positive. */ -// eslint-disable-next-line +// eslint-disable-next-line @typescript-eslint/ban-types type ObjectEmpty = {}; /** diff --git a/src/vaults/VaultInternal.ts b/src/vaults/VaultInternal.ts index be229e0d8..6981e12fc 100644 --- a/src/vaults/VaultInternal.ts +++ b/src/vaults/VaultInternal.ts @@ -19,6 +19,7 @@ import type { POJO } from '../types.js'; import type { NodeId, NodeIdEncoded } from '../ids/types.js'; import type KeyRing from '../keys/KeyRing.js'; import type NodeManager from '../nodes/NodeManager.js'; +import type { AgentClientManifest } from '../nodes/agent/callers/index.js'; import type agentClientManifest from '../nodes/agent/callers/index.js'; import path from 'node:path'; import git from 'isomorphic-git'; @@ -164,7 +165,7 @@ class VaultInternal { vaultsDbPath: LevelPath; efs: EncryptedFS; keyRing: KeyRing; - nodeManager: NodeManager; + nodeManager: NodeManager; logger?: Logger; }, tran?: DBTransaction, @@ -190,7 +191,7 @@ class VaultInternal { vaultsDbPath: LevelPath; efs: EncryptedFS; keyRing: KeyRing; - nodeManager: NodeManager; + nodeManager: NodeManager; logger?: Logger; }, tran: DBTransaction | undefined, @@ -721,7 +722,7 @@ class VaultInternal { pullNodeId, pullVaultNameOrId, }: { - nodeManager: NodeManager; + nodeManager: NodeManager; pullNodeId?: NodeId; pullVaultNameOrId?: VaultId | VaultName; }, @@ -736,7 +737,7 @@ class VaultInternal { pullNodeId, pullVaultNameOrId, }: { - nodeManager: NodeManager; + nodeManager: NodeManager; pullNodeId?: NodeId; pullVaultNameOrId?: VaultId | VaultName; }, diff --git a/src/vaults/VaultManager.ts b/src/vaults/VaultManager.ts index 96e7f907a..ab470ce56 100644 --- a/src/vaults/VaultManager.ts +++ b/src/vaults/VaultManager.ts @@ -19,6 +19,7 @@ import type ACL from '../acl/ACL.js'; import type { PolykeyWorkerManager } from '../workers/types.js'; import type { RemoteInfo } from './VaultInternal.js'; import type { VaultAction } from './types.js'; +import type { AgentClientManifest } from '#nodes/agent/callers/index.js'; import path from 'node:path'; import { DB } from '@matrixai/db'; import { EncryptedFS, errors as encryptedFsErrors } from 'encryptedfs'; @@ -82,7 +83,7 @@ class VaultManager { db: DB; acl: ACL; keyRing: KeyRing; - nodeManager: NodeManager; + nodeManager: NodeManager; gestaltGraph: GestaltGraph; notificationsManager: NotificationsManager; fs?: FileSystem; @@ -116,7 +117,7 @@ class VaultManager { protected db: DB; protected acl: ACL; protected keyRing: KeyRing; - protected nodeManager: NodeManager; + protected nodeManager: NodeManager; protected gestaltGraph: GestaltGraph; protected notificationsManager: NotificationsManager; protected vaultsDbPath: LevelPath = [this.constructor.name]; @@ -144,7 +145,7 @@ class VaultManager { db: DB; acl: ACL; keyRing: KeyRing; - nodeManager: NodeManager; + nodeManager: NodeManager; gestaltGraph: GestaltGraph; notificationsManager: NotificationsManager; fs: FileSystem; diff --git a/tests/client/handlers/gestalts.test.ts b/tests/client/handlers/gestalts.test.ts index 24469bb22..6ac913f3d 100644 --- a/tests/client/handlers/gestalts.test.ts +++ b/tests/client/handlers/gestalts.test.ts @@ -394,7 +394,7 @@ describe('gestaltsDiscoveryByIdentity', () => { let identitiesManager: IdentitiesManager; let nodeGraph: NodeGraph; let sigchain: Sigchain; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let nodeConnectionManager: NodeConnectionManager; let discovery: Discovery; beforeEach(async () => { @@ -581,7 +581,7 @@ describe('gestaltsDiscoveryByNode', () => { let identitiesManager: IdentitiesManager; let nodeGraph: NodeGraph; let sigchain: Sigchain; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let nodeConnectionManager: NodeConnectionManager; let discovery: Discovery; @@ -766,7 +766,7 @@ describe('gestaltsDiscoveryQueue', () => { let identitiesManager: IdentitiesManager; let nodeGraph: NodeGraph; let sigchain: Sigchain; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let nodeConnectionManager: NodeConnectionManager; let discovery: Discovery; @@ -1397,7 +1397,7 @@ describe('gestaltsGestaltTrustByIdentity', () => { let identitiesManager: IdentitiesManager; let nodeGraph: NodeGraph; let sigchain: Sigchain; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let nodeConnectionManager: NodeConnectionManager; let discovery: Discovery; let testProvider: TestProvider; @@ -1752,7 +1752,7 @@ describe('gestaltsGestaltTrustByNode', () => { let identitiesManager: IdentitiesManager; let nodeGraph: NodeGraph; let sigchain: Sigchain; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let nodeConnectionManager: NodeConnectionManager; let discovery: Discovery; let testProvider: TestProvider; diff --git a/tests/client/handlers/nodes.test.ts b/tests/client/handlers/nodes.test.ts index 34be7af0b..f21b29d23 100644 --- a/tests/client/handlers/nodes.test.ts +++ b/tests/client/handlers/nodes.test.ts @@ -67,7 +67,7 @@ describe('nodesAdd', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let sigchain: Sigchain; beforeEach(async () => { dataDir = await fs.promises.mkdtemp( @@ -270,7 +270,7 @@ describe('nodesClaim', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let notificationsManager: NotificationsManager; let acl: ACL; let sigchain: Sigchain; @@ -459,7 +459,7 @@ describe('nodesFind', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let sigchain: Sigchain; let mockedFindNode: jest.SpiedFunction; beforeEach(async () => { @@ -616,7 +616,7 @@ describe('nodesPing', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let sigchain: Sigchain; let mockedPingNode: jest.SpiedFunction; beforeEach(async () => { @@ -773,7 +773,7 @@ describe('nodesGetAll', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let sigchain: Sigchain; beforeEach(async () => { dataDir = await fs.promises.mkdtemp( @@ -922,7 +922,7 @@ describe('nodesListConnections', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let sigchain: Sigchain; let mockedConnection: jest.SpiedFunction< typeof NodeConnectionManager.prototype.listConnections diff --git a/tests/client/handlers/notifications.test.ts b/tests/client/handlers/notifications.test.ts index 0db2f05ce..79c721887 100644 --- a/tests/client/handlers/notifications.test.ts +++ b/tests/client/handlers/notifications.test.ts @@ -84,7 +84,7 @@ describe('notificationsInboxClear', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let notificationsManager: NotificationsManager; let acl: ACL; let sigchain: Sigchain; @@ -254,7 +254,7 @@ describe('notificationsInboxRead', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let notificationsManager: NotificationsManager; let acl: ACL; let sigchain: Sigchain; @@ -683,7 +683,7 @@ describe('notificationsInboxRemove', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let notificationsManager: NotificationsManager; let acl: ACL; let sigchain: Sigchain; @@ -859,7 +859,7 @@ describe('notificationsOutboxClear', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let notificationsManager: NotificationsManager; let acl: ACL; let sigchain: Sigchain; @@ -1029,7 +1029,7 @@ describe('notificationsOutboxRead', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let notificationsManager: NotificationsManager; let acl: ACL; let sigchain: Sigchain; @@ -1388,7 +1388,7 @@ describe('notificationsOutboxRemove', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let notificationsManager: NotificationsManager; let acl: ACL; let sigchain: Sigchain; @@ -1564,7 +1564,7 @@ describe('notificationsSend', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let notificationsManager: NotificationsManager; let acl: ACL; let sigchain: Sigchain; diff --git a/tests/client/handlers/vaults.test.ts b/tests/client/handlers/vaults.test.ts index abe1c9687..b16e37846 100644 --- a/tests/client/handlers/vaults.test.ts +++ b/tests/client/handlers/vaults.test.ts @@ -16,6 +16,7 @@ import type { VaultPermissionMessage, VaultsLogMessage, } from '#client/types.js'; +import type { AgentClientManifest } from '#nodes/agent/callers/index.js'; import fs from 'node:fs'; import path from 'node:path'; import os from 'node:os'; @@ -122,7 +123,7 @@ describe('vaultsClone', () => { db, acl: {} as ACL, keyRing: {} as KeyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -188,7 +189,7 @@ describe('vaultsCreate and vaultsDelete and vaultsList', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -323,7 +324,7 @@ describe('vaultsLog', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -555,7 +556,7 @@ describe('vaultsPermissionSet and vaultsPermissionUnset and vaultsPermissionGet' await NotificationsManager.createNotificationsManager({ acl, db, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, taskManager, keyRing, logger, @@ -567,7 +568,7 @@ describe('vaultsPermissionSet and vaultsPermissionUnset and vaultsPermissionGet' db, acl, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph, notificationsManager, logger, @@ -738,7 +739,7 @@ describe('vaultsPull', () => { await NotificationsManager.createNotificationsManager({ acl, db, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, taskManager, keyRing, logger, @@ -750,7 +751,7 @@ describe('vaultsPull', () => { db, acl, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph, notificationsManager, logger, @@ -815,7 +816,7 @@ describe('vaultsRename', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -910,7 +911,7 @@ describe('vaultsScan', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -972,7 +973,7 @@ describe('vaultsSecretsWriteFile', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -1222,7 +1223,7 @@ describe('vaultsSecretEnv', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -1554,7 +1555,7 @@ describe('vaultsSecretsMkdir', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -1888,7 +1889,7 @@ describe('vaultsSecretsCat', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -2270,7 +2271,7 @@ describe('vaultsSecretsRemove', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -2886,7 +2887,7 @@ describe('vaultsSecretsNewDir', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -3015,7 +3016,7 @@ describe('vaultsSecretsList', () => { db: db, acl: {} as ACL, keyRing: keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger: logger, @@ -3334,7 +3335,7 @@ describe('vaultsSecretsRename', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -3485,7 +3486,7 @@ describe('vaultsSecretsStat', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, @@ -3590,7 +3591,7 @@ describe('vaultsSecretsTouch', () => { db: db, acl: {} as ACL, keyRing: keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger: logger, @@ -4275,7 +4276,7 @@ describe('vaultsVersion', () => { db, acl: {} as ACL, keyRing, - nodeManager: {} as NodeManager, + nodeManager: {} as NodeManager, gestaltGraph: {} as GestaltGraph, notificationsManager: {} as NotificationsManager, logger, diff --git a/tests/discovery/Discovery.test.ts b/tests/discovery/Discovery.test.ts index 4050ea6b7..b121fa7e6 100644 --- a/tests/discovery/Discovery.test.ts +++ b/tests/discovery/Discovery.test.ts @@ -61,7 +61,7 @@ describe('Discovery', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let db: DB; let acl: ACL; let keyRing: KeyRing; diff --git a/tests/nodes/NodeConnectionManager.test.ts b/tests/nodes/NodeConnectionManager.test.ts index 2d5ecbeaf..d1e986c47 100644 --- a/tests/nodes/NodeConnectionManager.test.ts +++ b/tests/nodes/NodeConnectionManager.test.ts @@ -30,7 +30,7 @@ import NodesConnectionSignalInitial from '#nodes/agent/handlers/NodesConnectionS import * as utils from '#utils/index.js'; import * as nodesUtils from '#nodes/utils.js'; import rpcClientManifest, { - manifestClientCore, + manifestClientNodeConnectionManager, } from '#nodes/agent/callers/index.js'; class DummyNodesAuthenticateConnection extends UnaryHandler< @@ -121,7 +121,7 @@ describe(`${NodeConnectionManager.name}`, () => { } as KeyRing; const newManifest = { - ...manifestClientCore, + ...manifestClientNodeConnectionManager, echo: new UnaryCaller<{ message: string }, { response: string }>(), }; diff --git a/tests/nodes/NodeManager.test.ts b/tests/nodes/NodeManager.test.ts index 10a89afed..777b14a2b 100644 --- a/tests/nodes/NodeManager.test.ts +++ b/tests/nodes/NodeManager.test.ts @@ -97,7 +97,7 @@ describe(`${NodeManager.name}`, () => { test('NodeManager readiness', async () => { let db: DB | undefined; let taskManager: TaskManager | undefined; - let nodeManager: NodeManager | undefined; + let nodeManager: NodeManager | undefined; try { // Creating dependencies const dbPath = path.join(dataDir, 'db'); @@ -158,7 +158,7 @@ describe(`${NodeManager.name}`, () => { let nodeGraph: NodeGraph; let nodeConnectionManager: NodeConnectionManager; let taskManager: TaskManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; beforeEach(async () => { basePath = path.join(dataDir, 'local'); @@ -436,7 +436,7 @@ describe(`${NodeManager.name}`, () => { let nodeGraph: NodeGraph; let nodeConnectionManager: NodeConnectionManager; let taskManager: TaskManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let basePathPeer: string; let keyRingPeer: KeyRing; @@ -447,7 +447,7 @@ describe(`${NodeManager.name}`, () => { let nodeGraphPeer: NodeGraph; let nodeConnectionManagerPeer: NodeConnectionManager; let taskManagerPeer: TaskManager; - let nodeManagerPeer: NodeManager; + let nodeManagerPeer: NodeManager; beforeEach(async () => { basePath = path.join(dataDir, 'local'); @@ -951,7 +951,7 @@ describe(`${NodeManager.name}`, () => { let nodeGraph: NodeGraph; let nodeConnectionManager: NodeConnectionManager; let taskManager: TaskManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let basePathPeer: string; let keyRingPeer: KeyRing; @@ -962,7 +962,7 @@ describe(`${NodeManager.name}`, () => { let nodeGraphPeer: NodeGraph; let nodeConnectionManagerPeer: NodeConnectionManager; let taskManagerPeer: TaskManager; - let nodeManagerPeer: NodeManager; + let nodeManagerPeer: NodeManager; beforeEach(async () => { basePath = path.join(dataDir, 'local'); @@ -1179,7 +1179,7 @@ describe(`${NodeManager.name}`, () => { let nodeGraph: NodeGraph; let nodeConnectionManager: NodeConnectionManager; let taskManager: TaskManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; // Will create 6 peers forming a simple network let ncmPeers: Array< diff --git a/tests/nodes/agent/handlers/notificationsSend.test.ts b/tests/nodes/agent/handlers/notificationsSend.test.ts index d9f36db13..ca41b4103 100644 --- a/tests/nodes/agent/handlers/notificationsSend.test.ts +++ b/tests/nodes/agent/handlers/notificationsSend.test.ts @@ -49,7 +49,7 @@ describe('notificationsSend', () => { let sigchain: Sigchain; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let notificationsManager: NotificationsManager; let rpcServer: RPCServer; let quicServer: QUICServer; diff --git a/tests/notifications/NotificationsManager.test.ts b/tests/notifications/NotificationsManager.test.ts index 3b41ecfc9..05cf15549 100644 --- a/tests/notifications/NotificationsManager.test.ts +++ b/tests/notifications/NotificationsManager.test.ts @@ -62,7 +62,7 @@ describe('NotificationsManager', () => { let nodeGraph: NodeGraph; let taskManager: TaskManager; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let keyRing: KeyRing; let sigchain: Sigchain; diff --git a/tests/vaults/VaultManager.test.ts b/tests/vaults/VaultManager.test.ts index ac31d8d3a..992c59a1c 100644 --- a/tests/vaults/VaultManager.test.ts +++ b/tests/vaults/VaultManager.test.ts @@ -74,7 +74,7 @@ describe('VaultManager', () => { const dummyGestaltGraph = {} as GestaltGraph; const dummySigchain = {} as Sigchain; const dummyACL = {} as ACL; - const dummyNodeManager = {} as NodeManager; + const dummyNodeManager = {} as NodeManager; const dummyNotificationsManager = {} as NotificationsManager; beforeEach(async () => { @@ -599,7 +599,7 @@ describe('VaultManager', () => { let keyRing: KeyRing; let nodeGraph: NodeGraph; let nodeConnectionManager: NodeConnectionManager; - let nodeManager: NodeManager; + let nodeManager: NodeManager; let remoteKeynode1: PolykeyAgent, remoteKeynode2: PolykeyAgent; let localNodeId: NodeId; let taskManager: TaskManager;