@lspeasy/client 3.0.2 → 3.1.0
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/capability-guard.d.ts +78 -4
- package/dist/capability-guard.d.ts.map +1 -1
- package/dist/capability-guard.js +78 -4
- package/dist/capability-guard.js.map +1 -1
- package/dist/capability-proxy.js.map +1 -1
- package/dist/client.d.ts +166 -27
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +204 -18
- package/dist/client.js.map +1 -1
- package/dist/connection/health.d.ts +40 -0
- package/dist/connection/health.d.ts.map +1 -1
- package/dist/connection/health.js +40 -0
- package/dist/connection/health.js.map +1 -1
- package/dist/connection/heartbeat.d.ts +29 -0
- package/dist/connection/heartbeat.d.ts.map +1 -1
- package/dist/connection/heartbeat.js +29 -0
- package/dist/connection/heartbeat.js.map +1 -1
- package/dist/connection/partial-result-collector.js.map +1 -1
- package/dist/connection/registration-store.js.map +1 -1
- package/dist/connection/types.d.ts +46 -4
- package/dist/connection/types.d.ts.map +1 -1
- package/dist/connection/types.js +11 -3
- package/dist/connection/types.js.map +1 -1
- package/dist/index.d.ts +48 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +48 -1
- package/dist/index.js.map +1 -1
- package/dist/notifications/wait.d.ts +57 -2
- package/dist/notifications/wait.d.ts.map +1 -1
- package/dist/notifications/wait.js +44 -1
- package/dist/notifications/wait.js.map +1 -1
- package/dist/progress.js.map +1 -1
- package/dist/types.d.ts +70 -6
- package/dist/types.d.ts.map +1 -1
- package/dist/validation.d.ts +1 -1
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js.map +1 -1
- package/package.json +6 -7
|
@@ -7,28 +7,102 @@
|
|
|
7
7
|
import type { ClientCapabilities, ServerCapabilities } from '@lspeasy/core';
|
|
8
8
|
import type { Logger } from '@lspeasy/core';
|
|
9
9
|
/**
|
|
10
|
-
* Validates
|
|
11
|
-
* declared
|
|
10
|
+
* Validates outgoing client requests and notifications against the server's
|
|
11
|
+
* declared capabilities.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Created internally by `LSPClient` after a successful `initialize` handshake.
|
|
15
|
+
* In non-strict mode (default) violations are logged as warnings; in strict
|
|
16
|
+
* mode they throw.
|
|
17
|
+
*
|
|
18
|
+
* @useWhen
|
|
19
|
+
* You are implementing a custom client layer and need the same validation
|
|
20
|
+
* behaviour that `LSPClient` uses. Otherwise this is an internal detail.
|
|
21
|
+
*
|
|
22
|
+
* @see {@link ClientCapabilityGuard} for the companion guard that validates
|
|
23
|
+
* server-to-client handler registrations against client capabilities.
|
|
24
|
+
*
|
|
25
|
+
* @throws Error When `strict` is `true` and a method is not in the known
|
|
26
|
+
* method set or the required server capability has not been declared.
|
|
27
|
+
*
|
|
28
|
+
* @never
|
|
29
|
+
* NEVER construct `CapabilityGuard` before the `initialize` handshake completes.
|
|
30
|
+
* Server capabilities are only known after the `InitializeResult` is received;
|
|
31
|
+
* instantiating the guard too early will treat all methods as unsupported.
|
|
32
|
+
*
|
|
33
|
+
* @category Client
|
|
12
34
|
*/
|
|
13
35
|
export declare class CapabilityGuard {
|
|
14
36
|
private readonly capabilities;
|
|
15
37
|
private readonly logger;
|
|
16
38
|
private readonly strict;
|
|
17
39
|
constructor(capabilities: Partial<ServerCapabilities>, logger: Logger, strict?: boolean);
|
|
40
|
+
/**
|
|
41
|
+
* Returns `true` if the server capability for `method` is declared.
|
|
42
|
+
*
|
|
43
|
+
* @param method - The LSP request method string to check (e.g. `'textDocument/hover'`).
|
|
44
|
+
* @returns `true` if allowed; `false` (non-strict) if the required server capability
|
|
45
|
+
* is missing.
|
|
46
|
+
*
|
|
47
|
+
* @throws Error In strict mode, throws if `method` is unknown or its required
|
|
48
|
+
* server capability has not been declared.
|
|
49
|
+
*
|
|
50
|
+
* @see {@link CapabilityGuard} for full class documentation.
|
|
51
|
+
*/
|
|
18
52
|
canSendRequest(method: string): boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Returns `true` if the server capability for `method` is declared.
|
|
55
|
+
*
|
|
56
|
+
* @param method - The LSP notification method string to check.
|
|
57
|
+
* @returns `true` if allowed; `false` (or throws in strict mode) if the required
|
|
58
|
+
* server capability is missing.
|
|
59
|
+
*/
|
|
19
60
|
canSendNotification(method: string): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Returns a defensive copy of the server capabilities this guard was built from.
|
|
63
|
+
*
|
|
64
|
+
* @returns A shallow copy of the server capabilities object.
|
|
65
|
+
*/
|
|
20
66
|
getServerCapabilities(): Partial<ServerCapabilities>;
|
|
21
67
|
}
|
|
22
68
|
/**
|
|
23
|
-
* Validates that
|
|
24
|
-
* declared
|
|
69
|
+
* Validates that server-to-client handler registrations are backed by
|
|
70
|
+
* client capabilities declared in the `initialize` request.
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* Created internally by `LSPClient`. In non-strict mode violations are logged
|
|
74
|
+
* as warnings; in strict mode they throw.
|
|
75
|
+
*
|
|
76
|
+
* @never
|
|
77
|
+
* NEVER register server-to-client handlers for capabilities not declared in
|
|
78
|
+
* the original `initialize` request — the server may send the corresponding
|
|
79
|
+
* requests, but without the capability declaration the client has no contract
|
|
80
|
+
* to handle them, leading to silent failures or unexpected errors.
|
|
81
|
+
*
|
|
82
|
+
* @category Client
|
|
25
83
|
*/
|
|
26
84
|
export declare class ClientCapabilityGuard {
|
|
27
85
|
private readonly capabilities;
|
|
28
86
|
private readonly logger;
|
|
29
87
|
private readonly strict;
|
|
30
88
|
constructor(capabilities: Partial<ClientCapabilities>, logger: Logger, strict?: boolean);
|
|
89
|
+
/**
|
|
90
|
+
* Returns `true` if the client has declared the capability required to handle `method`.
|
|
91
|
+
*
|
|
92
|
+
* @param method - The LSP method string to validate against client capabilities.
|
|
93
|
+
* @returns `true` if the client capability is declared; `false` (non-strict) if missing.
|
|
94
|
+
*
|
|
95
|
+
* @throws Error In strict mode, throws if `method` is unknown or the required
|
|
96
|
+
* client capability was not declared in the `initialize` request.
|
|
97
|
+
*
|
|
98
|
+
* @see {@link ClientCapabilityGuard} for full class documentation.
|
|
99
|
+
*/
|
|
31
100
|
canRegisterHandler(method: string): boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Returns a defensive copy of the client capabilities this guard was built from.
|
|
103
|
+
*
|
|
104
|
+
* @returns A shallow copy of the client capabilities object.
|
|
105
|
+
*/
|
|
32
106
|
getClientCapabilities(): Partial<ClientCapabilities>;
|
|
33
107
|
}
|
|
34
108
|
//# sourceMappingURL=capability-guard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-guard.d.ts","sourceRoot":"","sources":["../src/capability-guard.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAa5C
|
|
1
|
+
{"version":3,"file":"capability-guard.d.ts","sourceRoot":"","sources":["../src/capability-guard.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAa5C;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,qBAAa,eAAe;IAExB,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHzB,YACmB,YAAY,EAAE,OAAO,CAAC,kBAAkB,CAAC,EACzC,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,OAAe,EACtC;IAEJ;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAWtC;IAED;;;;;;OAMG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAW3C;IAED;;;;OAIG;IACH,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAEnD;CACF;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,qBAAqB;IAE9B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHzB,YACmB,YAAY,EAAE,OAAO,CAAC,kBAAkB,CAAC,EACzC,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,OAAe,EACtC;IAEJ;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAgB1C;IAED;;;;OAIG;IACH,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAEnD;CACF"}
|
package/dist/capability-guard.js
CHANGED
|
@@ -6,8 +6,30 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { SERVER_METHODS, CLIENT_METHODS, checkMethod, getClientCapabilityForNotificationMethod, getClientCapabilityForRequestMethod, hasServerCapability, hasClientCapability, getCapabilityForNotificationMethod, getCapabilityForRequestMethod } from '@lspeasy/core';
|
|
8
8
|
/**
|
|
9
|
-
* Validates
|
|
10
|
-
* declared
|
|
9
|
+
* Validates outgoing client requests and notifications against the server's
|
|
10
|
+
* declared capabilities.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Created internally by `LSPClient` after a successful `initialize` handshake.
|
|
14
|
+
* In non-strict mode (default) violations are logged as warnings; in strict
|
|
15
|
+
* mode they throw.
|
|
16
|
+
*
|
|
17
|
+
* @useWhen
|
|
18
|
+
* You are implementing a custom client layer and need the same validation
|
|
19
|
+
* behaviour that `LSPClient` uses. Otherwise this is an internal detail.
|
|
20
|
+
*
|
|
21
|
+
* @see {@link ClientCapabilityGuard} for the companion guard that validates
|
|
22
|
+
* server-to-client handler registrations against client capabilities.
|
|
23
|
+
*
|
|
24
|
+
* @throws Error When `strict` is `true` and a method is not in the known
|
|
25
|
+
* method set or the required server capability has not been declared.
|
|
26
|
+
*
|
|
27
|
+
* @never
|
|
28
|
+
* NEVER construct `CapabilityGuard` before the `initialize` handshake completes.
|
|
29
|
+
* Server capabilities are only known after the `InitializeResult` is received;
|
|
30
|
+
* instantiating the guard too early will treat all methods as unsupported.
|
|
31
|
+
*
|
|
32
|
+
* @category Client
|
|
11
33
|
*/
|
|
12
34
|
export class CapabilityGuard {
|
|
13
35
|
capabilities;
|
|
@@ -18,6 +40,18 @@ export class CapabilityGuard {
|
|
|
18
40
|
this.logger = logger;
|
|
19
41
|
this.strict = strict;
|
|
20
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Returns `true` if the server capability for `method` is declared.
|
|
45
|
+
*
|
|
46
|
+
* @param method - The LSP request method string to check (e.g. `'textDocument/hover'`).
|
|
47
|
+
* @returns `true` if allowed; `false` (non-strict) if the required server capability
|
|
48
|
+
* is missing.
|
|
49
|
+
*
|
|
50
|
+
* @throws Error In strict mode, throws if `method` is unknown or its required
|
|
51
|
+
* server capability has not been declared.
|
|
52
|
+
*
|
|
53
|
+
* @see {@link CapabilityGuard} for full class documentation.
|
|
54
|
+
*/
|
|
21
55
|
canSendRequest(method) {
|
|
22
56
|
return checkMethod({
|
|
23
57
|
method,
|
|
@@ -30,6 +64,13 @@ export class CapabilityGuard {
|
|
|
30
64
|
strict: this.strict
|
|
31
65
|
});
|
|
32
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Returns `true` if the server capability for `method` is declared.
|
|
69
|
+
*
|
|
70
|
+
* @param method - The LSP notification method string to check.
|
|
71
|
+
* @returns `true` if allowed; `false` (or throws in strict mode) if the required
|
|
72
|
+
* server capability is missing.
|
|
73
|
+
*/
|
|
33
74
|
canSendNotification(method) {
|
|
34
75
|
return checkMethod({
|
|
35
76
|
method,
|
|
@@ -42,13 +83,30 @@ export class CapabilityGuard {
|
|
|
42
83
|
strict: this.strict
|
|
43
84
|
});
|
|
44
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Returns a defensive copy of the server capabilities this guard was built from.
|
|
88
|
+
*
|
|
89
|
+
* @returns A shallow copy of the server capabilities object.
|
|
90
|
+
*/
|
|
45
91
|
getServerCapabilities() {
|
|
46
92
|
return { ...this.capabilities };
|
|
47
93
|
}
|
|
48
94
|
}
|
|
49
95
|
/**
|
|
50
|
-
* Validates that
|
|
51
|
-
* declared
|
|
96
|
+
* Validates that server-to-client handler registrations are backed by
|
|
97
|
+
* client capabilities declared in the `initialize` request.
|
|
98
|
+
*
|
|
99
|
+
* @remarks
|
|
100
|
+
* Created internally by `LSPClient`. In non-strict mode violations are logged
|
|
101
|
+
* as warnings; in strict mode they throw.
|
|
102
|
+
*
|
|
103
|
+
* @never
|
|
104
|
+
* NEVER register server-to-client handlers for capabilities not declared in
|
|
105
|
+
* the original `initialize` request — the server may send the corresponding
|
|
106
|
+
* requests, but without the capability declaration the client has no contract
|
|
107
|
+
* to handle them, leading to silent failures or unexpected errors.
|
|
108
|
+
*
|
|
109
|
+
* @category Client
|
|
52
110
|
*/
|
|
53
111
|
export class ClientCapabilityGuard {
|
|
54
112
|
capabilities;
|
|
@@ -59,6 +117,17 @@ export class ClientCapabilityGuard {
|
|
|
59
117
|
this.logger = logger;
|
|
60
118
|
this.strict = strict;
|
|
61
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* Returns `true` if the client has declared the capability required to handle `method`.
|
|
122
|
+
*
|
|
123
|
+
* @param method - The LSP method string to validate against client capabilities.
|
|
124
|
+
* @returns `true` if the client capability is declared; `false` (non-strict) if missing.
|
|
125
|
+
*
|
|
126
|
+
* @throws Error In strict mode, throws if `method` is unknown or the required
|
|
127
|
+
* client capability was not declared in the `initialize` request.
|
|
128
|
+
*
|
|
129
|
+
* @see {@link ClientCapabilityGuard} for full class documentation.
|
|
130
|
+
*/
|
|
62
131
|
canRegisterHandler(method) {
|
|
63
132
|
return checkMethod({
|
|
64
133
|
method,
|
|
@@ -74,6 +143,11 @@ export class ClientCapabilityGuard {
|
|
|
74
143
|
strict: this.strict
|
|
75
144
|
});
|
|
76
145
|
}
|
|
146
|
+
/**
|
|
147
|
+
* Returns a defensive copy of the client capabilities this guard was built from.
|
|
148
|
+
*
|
|
149
|
+
* @returns A shallow copy of the client capabilities object.
|
|
150
|
+
*/
|
|
77
151
|
getClientCapabilities() {
|
|
78
152
|
return { ...this.capabilities };
|
|
79
153
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-guard.js","sourceRoot":"","sources":["../src/capability-guard.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EACL,cAAc,EACd,cAAc,EACd,WAAW,EACX,wCAAwC,EACxC,mCAAmC,EACnC,mBAAmB,EACnB,mBAAmB,EACnB,kCAAkC,EAClC,6BAA6B,EAC9B,MAAM,eAAe,CAAC;AAEvB
|
|
1
|
+
{"version":3,"file":"capability-guard.js","sourceRoot":"","sources":["../src/capability-guard.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EACL,cAAc,EACd,cAAc,EACd,WAAW,EACX,wCAAwC,EACxC,mCAAmC,EACnC,mBAAmB,EACnB,mBAAmB,EACnB,kCAAkC,EAClC,6BAA6B,EAC9B,MAAM,eAAe,CAAC;AAEvB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,OAAO,eAAe;IAEP,YAAY;IACZ,MAAM;IACN,MAAM;IAHzB,YACmB,YAAyC,EACzC,MAAc,EACd,MAAM,GAAY,KAAK;4BAFvB,YAAY;sBACZ,MAAM;sBACN,MAAM;IACtB,CAAC;IAEJ;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,MAAc;QAC3B,OAAO,WAAW,CAAC;YACjB,MAAM;YACN,UAAU,EAAE,cAAc;YAC1B,gBAAgB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,6BAA6B,CAAC,CAAQ,CAAC;YAChE,aAAa,EAAE,CAAC,GAAG,EAAE,EA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EAAE,EAAE,CAAC,mBAAmB,CAAC,IAAI,CAAC,YAAY,EAAE,GAAU,CAAC;YAC1E,WAAW,EAAE,kBAAkB;YAC/B,eAAe,EAAE,mBAAmB;YACpC,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,qBAAqB;QACnB,OAAO,EAAE,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;IAClC,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-proxy.js","sourceRoot":"","sources":["../src/capability-proxy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,UAAU,EACV,eAAe,EACf,uBAAuB,EACvB,4BAA4B,EAC5B,mBAAmB,EACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,SAAS,2BAA2B,CAAC,aAAqB,EAAE,eAAuB
|
|
1
|
+
{"version":3,"file":"capability-proxy.js","sourceRoot":"","sources":["../src/capability-proxy.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,UAAU,EACV,eAAe,EACf,uBAAuB,EACvB,4BAA4B,EAC5B,mBAAmB,EACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,SAAS,2BAA2B,CAAC,aAAqB,EAAE,eAAuB;IACjF,IAAI,eAAe,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QAC5C,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,SAAS,2BAA2B,CAElC,MAA6B;IAC7B,MAAM,OAAO,GAAG,MAAM,CAAC,sBAAsB,EAAE,CAAC;IAChD,OAAO,IAAI,GAAG,CAAC,OAAO,C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AkB,CAAC,GAAG,SAAS,CAAC;QAClD,CAAC;IACH,CAAC;IAED,gDAAgD;IAChD,KAAK,MAAM,CAAC,aAAa,EAAE,oBAAoB,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;QACpF,MAAM,kBAAkB,GAAG,SAAS,CAAC,aAAa,CAAC,CAAC;QACpD,IAAI,CAAE,MAAc,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACxC,MAAc,CAAC,kBAAkB,CAAC,GAAG,EAAE,CAAC;QAC3C,CAAC;QACD,KAAK,MAAM,YAAY,IAAI,oBAAoB,EAAE,CAAC;YAChD,MAAM,CAAC,GAAG,4BAA4B,CAAC,aAAoB,EAAE,YAAY,CAAC,CAAC;YAC3E,uEAAuE;YACvE,IACE,CAAC,CAAC,CAAC,gBAAgB;gBACnB,mBAAmB,CAAC,MAAM,CAAC,kBAAkB,EAAE,CAAC,CAAC,gBAAgB,CAAC;gBAClE,wBAAwB,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EACtC,CAAC;gBACD,MAAM,SAAS,GAAG,2BAA2B,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;gBAC1E,MAAc,CAAC,kBAAkB,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAM,EAAE,EAAE,CACrE,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;YACzC,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAErC,MAA6B;IAC7B,oEAAoE;IACpE,2BAA2B,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC"}
|
package/dist/client.d.ts
CHANGED
|
@@ -4,29 +4,6 @@
|
|
|
4
4
|
import type { Transport, Disposable, CancellationToken, DynamicRegistration, LSPRequestMethod, ParamsForRequest, ResultForRequest, LSPNotificationMethod, ParamsForNotification, ServerCapabilities, ClientCapabilities, Client } from '@lspeasy/core';
|
|
5
5
|
import type { ClientOptions, InitializeResult, CancellableRequest, NotebookDocumentNamespace, PartialRequestOptions, PartialRequestResult } from './types.js';
|
|
6
6
|
import type { ConnectionHealth, StateChangeEvent } from './connection/index.js';
|
|
7
|
-
/**
|
|
8
|
-
* Interface for dynamically added namespace methods
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* Type alias to add capability-aware methods to LSPClient
|
|
12
|
-
* These methods are added at runtime via capability-proxy.ts
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* LSP Client for connecting to language servers
|
|
16
|
-
*
|
|
17
|
-
* This class dynamically extends with capability-aware methods based on server capabilities.
|
|
18
|
-
* Use `.expect<ServerCaps>()` after initialization to get typed access to server capabilities.
|
|
19
|
-
*
|
|
20
|
-
* @template ClientCaps - Client capabilities (defaults to ClientCapabilities)
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* // Create a client, then narrow server capabilities after connecting
|
|
24
|
-
* const client = new LSPClient<MyClientCaps>();
|
|
25
|
-
* await client.connect(transport);
|
|
26
|
-
* const typed = client.expect<{ hoverProvider: true; completionProvider: {} }>();
|
|
27
|
-
* // typed.textDocument.hover is available (typed)
|
|
28
|
-
* // typed.textDocument.completion is available (typed)
|
|
29
|
-
*/
|
|
30
7
|
declare class BaseLSPClient<ClientCaps extends Partial<ClientCapabilities> = ClientCapabilities> {
|
|
31
8
|
private transport?;
|
|
32
9
|
private connected;
|
|
@@ -53,7 +30,22 @@ declare class BaseLSPClient<ClientCaps extends Partial<ClientCapabilities> = Cli
|
|
|
53
30
|
readonly notebookDocument: NotebookDocumentNamespace;
|
|
54
31
|
constructor(options?: ClientOptions<ClientCaps>);
|
|
55
32
|
/**
|
|
56
|
-
*
|
|
33
|
+
* Connects to the language server and performs the LSP initialization
|
|
34
|
+
* handshake (`initialize` → `initialized`).
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* Sends an `initialize` request with the client's declared capabilities,
|
|
38
|
+
* waits for the server's `InitializeResult`, then sends `initialized`.
|
|
39
|
+
* Throws and cleans up the transport on any failure during handshake.
|
|
40
|
+
*
|
|
41
|
+
* @param transport - The transport to use for the connection.
|
|
42
|
+
* @returns The server's `InitializeResult` including `capabilities` and
|
|
43
|
+
* optional `serverInfo`.
|
|
44
|
+
* @throws {Error} When already connected. Fix: call `disconnect()` first, then re-connect with a fresh transport instance.
|
|
45
|
+
* @throws {Error} When the server rejects the `initialize` request (e.g. unsupported protocol version, missing required capabilities). Fix: inspect the error message for the server's error code; match your `ClientCapabilities` to what the server advertises.
|
|
46
|
+
* @throws {Error} When the transport closes before `initialize` completes (server crash, TCP reset). Fix: subscribe to `onError` on the transport before calling `connect()` to detect the cause, then retry with a new transport.
|
|
47
|
+
*
|
|
48
|
+
* @category Lifecycle
|
|
57
49
|
*/
|
|
58
50
|
connect(transport: Transport): Promise<InitializeResult>;
|
|
59
51
|
/**
|
|
@@ -65,7 +57,18 @@ declare class BaseLSPClient<ClientCaps extends Partial<ClientCapabilities> = Cli
|
|
|
65
57
|
*/
|
|
66
58
|
isConnected(): boolean;
|
|
67
59
|
/**
|
|
68
|
-
* Send a request to the server
|
|
60
|
+
* Send a request to the server and await its response.
|
|
61
|
+
*
|
|
62
|
+
* @param method - The LSP request method name.
|
|
63
|
+
* @param params - Optional request parameters.
|
|
64
|
+
* @param token - Optional cancellation token.
|
|
65
|
+
* @returns A promise resolving to the server's result for the given method.
|
|
66
|
+
* @throws {Error} When the client is not connected. Fix: ensure `connect()` has resolved before calling `sendRequest()`.
|
|
67
|
+
* @throws {Error} When the server returns a JSON-RPC error response (e.g. `MethodNotFound`, `InvalidParams`). Fix: check `error.code` against `JSONRPCErrorCode` — if `-32601` (MethodNotFound), the server capability was not declared; gate the call with `serverSupportsRequest()`.
|
|
68
|
+
* @throws {Error} When the request times out (if `requestTimeout` is configured). Fix: increase `ClientOptions.requestTimeout`, or use `sendCancellableRequest()` to abort early and retry.
|
|
69
|
+
* @throws {Error} When the token is already cancelled before the call. Fix: check `token.isCancellationRequested` before calling, or handle the rejection in `.catch()`.
|
|
70
|
+
*
|
|
71
|
+
* @category Client
|
|
69
72
|
*/
|
|
70
73
|
sendRequest<K extends LSPRequestMethod<'clientToServer'>>(method: K, params?: ParamsForRequest<K>, token?: CancellationToken): Promise<ResultForRequest<K>>;
|
|
71
74
|
/**
|
|
@@ -73,11 +76,76 @@ declare class BaseLSPClient<ClientCaps extends Partial<ClientCapabilities> = Cli
|
|
|
73
76
|
*/
|
|
74
77
|
sendNotification<M extends LSPNotificationMethod<'clientToServer'>>(method: M, params?: ParamsForNotification<M>): Promise<void>;
|
|
75
78
|
/**
|
|
76
|
-
*
|
|
79
|
+
* Sends a request that can be cancelled via the returned `cancel()` function.
|
|
80
|
+
*
|
|
81
|
+
* @remarks
|
|
82
|
+
* Convenience wrapper that creates a `CancellationTokenSource` internally,
|
|
83
|
+
* attaches it to the request, and exposes `cancel()` on the result.
|
|
84
|
+
* Calling `cancel()` sends `$/cancelRequest` to the server and rejects
|
|
85
|
+
* `promise` with a cancellation error.
|
|
86
|
+
*
|
|
87
|
+
* @param method - The LSP request method string.
|
|
88
|
+
* @param params - Optional request parameters.
|
|
89
|
+
* @returns A `CancellableRequest` with `promise` and `cancel`.
|
|
90
|
+
*
|
|
91
|
+
* @never
|
|
92
|
+
* NEVER ignore the `CancellableRequest.promise` rejection after calling
|
|
93
|
+
* `cancel()`. Always attach a `.catch()` handler to avoid unhandled
|
|
94
|
+
* promise rejections.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```ts
|
|
98
|
+
* const req = client.sendCancellableRequest('textDocument/completion', params);
|
|
99
|
+
*
|
|
100
|
+
* // Cancel on user keystroke
|
|
101
|
+
* input.addEventListener('input', () => req.cancel());
|
|
102
|
+
*
|
|
103
|
+
* try {
|
|
104
|
+
* const result = await req.promise;
|
|
105
|
+
* } catch (e) {
|
|
106
|
+
* if (e.message.includes('cancel')) return; // User cancelled
|
|
107
|
+
* throw e;
|
|
108
|
+
* }
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* @category Client
|
|
77
112
|
*/
|
|
78
113
|
sendCancellableRequest<M extends LSPRequestMethod<'clientToServer'>>(method: M, params?: ParamsForRequest<M>): CancellableRequest<ResultForRequest<M>>;
|
|
79
114
|
/**
|
|
80
|
-
*
|
|
115
|
+
* Sends a request with partial-result streaming support (LSP
|
|
116
|
+
* `partialResultToken`).
|
|
117
|
+
*
|
|
118
|
+
* @remarks
|
|
119
|
+
* Attaches a `partialResultToken` to the outgoing request params, then
|
|
120
|
+
* collects `$/progress` notifications from the server as each partial
|
|
121
|
+
* result arrives. Returns a summary of all partial results plus the final
|
|
122
|
+
* result when the request completes.
|
|
123
|
+
*
|
|
124
|
+
* @param method - The LSP request method (must support `partialResultToken`).
|
|
125
|
+
* @param params - The request parameters (a `partialResultToken` is injected).
|
|
126
|
+
* @param options - Streaming options including an `onPartial` callback.
|
|
127
|
+
* @param token - Optional cancellation token.
|
|
128
|
+
* @returns A `PartialRequestResult` with `cancelled`, `partialResults`, and
|
|
129
|
+
* `finalResult` (undefined if cancelled).
|
|
130
|
+
*
|
|
131
|
+
* @useWhen
|
|
132
|
+
* The server supports incremental results for long-running operations like
|
|
133
|
+
* `textDocument/completion` or `workspace/symbol` with large result sets.
|
|
134
|
+
*
|
|
135
|
+
* @avoidWhen
|
|
136
|
+
* The server does not advertise partial result support — the token will be
|
|
137
|
+
* silently ignored and no `$/progress` notifications will arrive.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* const { partialResults, finalResult } = await client.sendRequestWithPartialResults(
|
|
142
|
+
* 'workspace/symbol',
|
|
143
|
+
* { query: 'MyClass' },
|
|
144
|
+
* { onPartial: (symbols) => updateUI(symbols) }
|
|
145
|
+
* );
|
|
146
|
+
* ```
|
|
147
|
+
*
|
|
148
|
+
* @category Client
|
|
81
149
|
*/
|
|
82
150
|
sendRequestWithPartialResults<M extends LSPRequestMethod<'clientToServer'>, TPartial = unknown>(method: M, params: ParamsForRequest<M>, options: PartialRequestOptions<TPartial>, token?: CancellationToken): Promise<PartialRequestResult<TPartial, ResultForRequest<M>>>;
|
|
83
151
|
/**
|
|
@@ -167,10 +235,16 @@ declare class BaseLSPClient<ClientCaps extends Partial<ClientCapabilities> = Cli
|
|
|
167
235
|
* Handle incoming message from transport
|
|
168
236
|
*/
|
|
169
237
|
private handleMessage;
|
|
238
|
+
/**
|
|
239
|
+
* Handle response message
|
|
240
|
+
*/
|
|
170
241
|
private handleResponse;
|
|
171
242
|
private resolveShortCircuitRequest;
|
|
172
243
|
private buildMiddlewareContext;
|
|
173
244
|
private sendWithMiddleware;
|
|
245
|
+
/**
|
|
246
|
+
* Handle request message from server
|
|
247
|
+
*/
|
|
174
248
|
private handleRequest;
|
|
175
249
|
private supportsDynamicRegistration;
|
|
176
250
|
private sendResponseMessage;
|
|
@@ -191,7 +265,72 @@ declare class BaseLSPClient<ClientCaps extends Partial<ClientCapabilities> = Cli
|
|
|
191
265
|
private handleClose;
|
|
192
266
|
private startHeartbeatIfConfigured;
|
|
193
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Typed LSP client that connects to a language server, manages the LSP
|
|
270
|
+
* handshake, and exposes capability-aware request namespaces.
|
|
271
|
+
*
|
|
272
|
+
* @remarks
|
|
273
|
+
* `LSPClient` handles the `initialize` / `initialized` handshake automatically
|
|
274
|
+
* on `connect()`. After connecting, call `expect<ServerCaps>()` to narrow the
|
|
275
|
+
* client type to the server's advertised capabilities, giving you typed access
|
|
276
|
+
* to namespaces like `client.textDocument.hover(params)`.
|
|
277
|
+
*
|
|
278
|
+
* @useWhen
|
|
279
|
+
* You are embedding an LSP client inside an editor extension, a CLI tool, a
|
|
280
|
+
* test harness, or any process that connects to a language server.
|
|
281
|
+
*
|
|
282
|
+
* @avoidWhen
|
|
283
|
+
* You need to build the server end — use `LSPServer` from `@lspeasy/server`.
|
|
284
|
+
*
|
|
285
|
+
* @never
|
|
286
|
+
* NEVER call `sendRequest` before `connect()` completes — the transport is not
|
|
287
|
+
* attached yet and the call throws.
|
|
288
|
+
*
|
|
289
|
+
* NEVER send requests after `disconnect()` is called — the transport has been
|
|
290
|
+
* closed; any pending promises will reject with a "Connection closed" error.
|
|
291
|
+
*
|
|
292
|
+
* NEVER share one `LSPClient` across two separate language server processes —
|
|
293
|
+
* each process is an independent JSON-RPC peer with its own ID sequence and
|
|
294
|
+
* lifecycle state.
|
|
295
|
+
*
|
|
296
|
+
* @throws Error When `connect()` is called while already connected.
|
|
297
|
+
* @throws Error When `sendRequest()` is called before `connect()` completes.
|
|
298
|
+
*
|
|
299
|
+
* @see {@link ClientOptions} for all configuration options.
|
|
300
|
+
* @see {@link ConnectionHealthTracker} for monitoring connection liveness.
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* ```ts
|
|
304
|
+
* import { LSPClient } from '@lspeasy/client';
|
|
305
|
+
* import { WebSocketTransport } from '@lspeasy/core';
|
|
306
|
+
*
|
|
307
|
+
* const client = new LSPClient({
|
|
308
|
+
* name: 'my-editor',
|
|
309
|
+
* capabilities: { textDocument: { hover: {} } },
|
|
310
|
+
* });
|
|
311
|
+
*
|
|
312
|
+
* const transport = new WebSocketTransport({ url: 'ws://localhost:2087' });
|
|
313
|
+
* await client.connect(transport);
|
|
314
|
+
*
|
|
315
|
+
* const typed = client.expect<{ hoverProvider: true }>();
|
|
316
|
+
* const hover = await typed.textDocument.hover({
|
|
317
|
+
* textDocument: { uri: 'file:///src/index.ts' },
|
|
318
|
+
* position: { line: 0, character: 5 },
|
|
319
|
+
* });
|
|
320
|
+
* ```
|
|
321
|
+
*
|
|
322
|
+
* @template ClientCaps - Client capabilities shape, defaults to `ClientCapabilities`.
|
|
323
|
+
* @category Client
|
|
324
|
+
*/
|
|
194
325
|
export type LSPClient<ClientCaps extends Partial<ClientCapabilities> = ClientCapabilities> = BaseLSPClient<ClientCaps> & Client<ClientCaps, ServerCapabilities>;
|
|
326
|
+
/**
|
|
327
|
+
* Constructs an {@link LSPClient} instance.
|
|
328
|
+
*
|
|
329
|
+
* @param options - Optional {@link ClientOptions} to configure the client.
|
|
330
|
+
* @returns A new `LSPClient` instance.
|
|
331
|
+
*
|
|
332
|
+
* @category Client
|
|
333
|
+
*/
|
|
195
334
|
export declare const LSPClient: new <ClientCaps extends Partial<ClientCapabilities> = ClientCapabilities>(options?: ClientOptions<ClientCaps>) => LSPClient<ClientCaps>;
|
|
196
335
|
export {};
|
|
197
336
|
//# sourceMappingURL=client.d.ts.map
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,SAAS,EAKT,UAAU,EAEV,iBAAiB,EACjB,mBAAmB,EAEnB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EAErB,kBAAkB,EAClB,kBAAkB,EAClB,MAAM,EAKP,MAAM,eAAe,CAAC;AAWvB,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAIpB,OAAO,KAAK,EAAE,gBAAgB,EAAmB,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,SAAS,EAKT,UAAU,EAEV,iBAAiB,EACjB,mBAAmB,EAEnB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EAErB,kBAAkB,EAClB,kBAAkB,EAClB,MAAM,EAKP,MAAM,eAAe,CAAC;AAWvB,OAAO,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