@lspeasy/client 3.0.1 → 3.0.3

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.
Files changed (38) hide show
  1. package/dist/capability-guard.d.ts +67 -21
  2. package/dist/capability-guard.d.ts.map +1 -1
  3. package/dist/capability-guard.js +101 -176
  4. package/dist/capability-guard.js.map +1 -1
  5. package/dist/capability-proxy.js.map +1 -1
  6. package/dist/client.d.ts +215 -13
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +162 -14
  9. package/dist/client.js.map +1 -1
  10. package/dist/connection/health.d.ts +40 -0
  11. package/dist/connection/health.d.ts.map +1 -1
  12. package/dist/connection/health.js +40 -0
  13. package/dist/connection/health.js.map +1 -1
  14. package/dist/connection/heartbeat.d.ts +29 -0
  15. package/dist/connection/heartbeat.d.ts.map +1 -1
  16. package/dist/connection/heartbeat.js +29 -0
  17. package/dist/connection/heartbeat.js.map +1 -1
  18. package/dist/connection/partial-result-collector.js.map +1 -1
  19. package/dist/connection/registration-store.js.map +1 -1
  20. package/dist/connection/types.d.ts +46 -4
  21. package/dist/connection/types.d.ts.map +1 -1
  22. package/dist/connection/types.js +11 -3
  23. package/dist/connection/types.js.map +1 -1
  24. package/dist/index.d.ts +48 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +48 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/notifications/wait.d.ts +57 -2
  29. package/dist/notifications/wait.d.ts.map +1 -1
  30. package/dist/notifications/wait.js +44 -1
  31. package/dist/notifications/wait.js.map +1 -1
  32. package/dist/progress.js.map +1 -1
  33. package/dist/types.d.ts +51 -6
  34. package/dist/types.d.ts.map +1 -1
  35. package/dist/validation.d.ts +1 -1
  36. package/dist/validation.d.ts.map +1 -1
  37. package/dist/validation.js.map +1 -1
  38. package/package.json +6 -7
@@ -1,13 +1,36 @@
1
1
  /**
2
2
  * Capability validation for client requests
3
3
  *
4
- * Ensures clients only send requests/notifications that the server supports
4
+ * Ensures clients only send requests/notifications that the server supports,
5
+ * and only register handlers for methods the client declared support for.
5
6
  */
6
7
  import type { ClientCapabilities, ServerCapabilities } from '@lspeasy/core';
7
8
  import type { Logger } from '@lspeasy/core';
8
9
  /**
9
- * Validates that a request/notification can be sent based on
10
- * declared server capabilities
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
11
34
  */
12
35
  export declare class CapabilityGuard {
13
36
  private readonly capabilities;
@@ -15,29 +38,48 @@ export declare class CapabilityGuard {
15
38
  private readonly strict;
16
39
  constructor(capabilities: Partial<ServerCapabilities>, logger: Logger, strict?: boolean);
17
40
  /**
18
- * Check if a request can be sent to the server
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.
19
49
  *
20
- * @param method - LSP method name
21
- * @returns true if allowed, false otherwise
22
- * @throws Error if strict mode enabled and server capability not declared
50
+ * @see {@link CapabilityGuard} for full class documentation.
23
51
  */
24
52
  canSendRequest(method: string): boolean;
25
53
  /**
26
- * Check if a notification can be sent to the server
54
+ * Returns `true` if the server capability for `method` is declared.
27
55
  *
28
- * @param method - LSP method name
29
- * @returns true if allowed, false otherwise
30
- * @throws Error if strict mode enabled and server capability not declared
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.
31
59
  */
32
60
  canSendNotification(method: string): boolean;
33
61
  /**
34
- * Get list of capabilities the server declared
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.
35
65
  */
36
66
  getServerCapabilities(): Partial<ServerCapabilities>;
37
67
  }
38
68
  /**
39
- * Validates that handlers can be registered based on
40
- * declared client capabilities
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
41
83
  */
42
84
  export declare class ClientCapabilityGuard {
43
85
  private readonly capabilities;
@@ -45,18 +87,22 @@ export declare class ClientCapabilityGuard {
45
87
  private readonly strict;
46
88
  constructor(capabilities: Partial<ClientCapabilities>, logger: Logger, strict?: boolean);
47
89
  /**
48
- * Check if handler registration is allowed for this method
90
+ * Returns `true` if the client has declared the capability required to handle `method`.
49
91
  *
50
- * @param method - LSP method name
51
- * @returns true if allowed, false otherwise
52
- * @throws Error if strict mode enabled and client capability not declared
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.
53
99
  */
54
100
  canRegisterHandler(method: string): boolean;
55
101
  /**
56
- * Get list of capabilities the client declared
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.
57
105
  */
58
106
  getClientCapabilities(): Partial<ClientCapabilities>;
59
- private isRequestAllowed;
60
- private isNotificationAllowed;
61
107
  }
62
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;;;;GAIG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AA+C5C;;;GAGG;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;;;;;;OAMG;IACH,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAgDtC;IAED;;;;;;OAMG;IACH,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAgD3C;IAED;;OAEG;IACH,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAEnD;CACF;AAED;;;GAGG;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;;;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AM,EAAE,MAAM,GAAG,OAAO,CAgB1C;IAED;;;;OAIG;IACH,qBAAqB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAEnD;CACF"}
@@ -1,37 +1,35 @@
1
1
  /**
2
2
  * Capability validation for client requests
3
3
  *
4
- * Ensures clients only send requests/notifications that the server supports
4
+ * Ensures clients only send requests/notifications that the server supports,
5
+ * and only register handlers for methods the client declared support for.
5
6
  */
6
- import { LSPNotification, LSPRequest, getClientCapabilityForNotificationMethod, getClientCapabilityForRequestMethod, hasServerCapability, hasClientCapability, getCapabilityForNotificationMethod, getCapabilityForRequestMethod } from '@lspeasy/core';
7
- function buildMethodSets(capabilityKey) {
8
- const all = new Set();
9
- const alwaysAllowed = new Set();
10
- for (const namespaceDefinitions of Object.values(LSPRequest)) {
11
- for (const definition of Object.values(namespaceDefinitions)) {
12
- const entry = definition;
13
- all.add(entry.Method);
14
- if (!entry[capabilityKey]) {
15
- alwaysAllowed.add(entry.Method);
16
- }
17
- }
18
- }
19
- for (const namespaceDefinitions of Object.values(LSPNotification)) {
20
- for (const definition of Object.values(namespaceDefinitions)) {
21
- const entry = definition;
22
- all.add(entry.Method);
23
- if (!entry[capabilityKey]) {
24
- alwaysAllowed.add(entry.Method);
25
- }
26
- }
27
- }
28
- return { all, alwaysAllowed };
29
- }
30
- const SERVER_METHODS = buildMethodSets('ServerCapability');
31
- const CLIENT_METHODS = buildMethodSets('ClientCapability');
7
+ import { SERVER_METHODS, CLIENT_METHODS, checkMethod, getClientCapabilityForNotificationMethod, getClientCapabilityForRequestMethod, hasServerCapability, hasClientCapability, getCapabilityForNotificationMethod, getCapabilityForRequestMethod } from '@lspeasy/core';
32
8
  /**
33
- * Validates that a request/notification can be sent based on
34
- * declared server capabilities
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
35
33
  */
36
34
  export class CapabilityGuard {
37
35
  capabilities;
@@ -43,109 +41,72 @@ export class CapabilityGuard {
43
41
  this.strict = strict;
44
42
  }
45
43
  /**
46
- * Check if a request can be sent to the server
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.
47
49
  *
48
- * @param method - LSP method name
49
- * @returns true if allowed, false otherwise
50
- * @throws Error if strict mode enabled and server capability not declared
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.
51
54
  */
52
55
  canSendRequest(method) {
53
- if (!SERVER_METHODS.all.has(method)) {
54
- if (!this.strict) {
55
- this.logger.debug(`Unknown request method ${method}, allowing in non-strict mode`);
56
- return true;
57
- }
58
- const error = `Cannot send request for unknown method: ${method}`;
59
- this.logger.error(error);
60
- throw new Error(error);
61
- }
62
- if (SERVER_METHODS.alwaysAllowed.has(method)) {
63
- return true;
64
- }
65
- // Check if server supports this request method
66
- const capabilityKey = getCapabilityForRequestMethod(method);
67
- if (!capabilityKey) {
68
- // Unknown method - allow in non-strict mode with warning
69
- if (!this.strict) {
70
- this.logger.debug(`Unknown request method ${method}, allowing in non-strict mode`);
71
- return true;
72
- }
73
- const error = `Cannot send request for unknown method: ${method}`;
74
- this.logger.error(error);
75
- throw new Error(error);
76
- }
77
- // Methods marked as 'alwaysOn' don't require explicit capabilities
78
- if (capabilityKey === 'alwaysOn') {
79
- return true;
80
- }
81
- // Check if server declared this capability
82
- if (!hasServerCapability(this.capabilities, capabilityKey)) {
83
- const error = `Cannot send request ${method}: server capability '${capabilityKey}' not declared`;
84
- this.logger.warn(error);
85
- if (this.strict) {
86
- throw new Error(error);
87
- }
88
- return false;
89
- }
90
- return true;
56
+ return checkMethod({
57
+ method,
58
+ methodSets: SERVER_METHODS,
59
+ getCapabilityKey: (m) => getCapabilityForRequestMethod(m),
60
+ hasCapability: (key) => hasServerCapability(this.capabilities, key),
61
+ actionLabel: 'send request',
62
+ capabilityLabel: 'server capability',
63
+ logger: this.logger,
64
+ strict: this.strict
65
+ });
91
66
  }
92
67
  /**
93
- * Check if a notification can be sent to the server
68
+ * Returns `true` if the server capability for `method` is declared.
94
69
  *
95
- * @param method - LSP method name
96
- * @returns true if allowed, false otherwise
97
- * @throws Error if strict mode enabled and server capability not declared
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.
98
73
  */
99
74
  canSendNotification(method) {
100
- if (!SERVER_METHODS.all.has(method)) {
101
- if (!this.strict) {
102
- this.logger.debug(`Unknown notification method ${method}, allowing in non-strict mode`);
103
- return true;
104
- }
105
- const error = `Cannot send notification for unknown method: ${method}`;
106
- this.logger.error(error);
107
- throw new Error(error);
108
- }
109
- if (SERVER_METHODS.alwaysAllowed.has(method)) {
110
- return true;
111
- }
112
- // Check if server supports this notification method
113
- const capabilityKey = getCapabilityForNotificationMethod(method);
114
- if (!capabilityKey) {
115
- // Unknown method - allow in non-strict mode with warning
116
- if (!this.strict) {
117
- this.logger.debug(`Unknown notification method ${method}, allowing in non-strict mode`);
118
- return true;
119
- }
120
- const error = `Cannot send notification for unknown method: ${method}`;
121
- this.logger.error(error);
122
- throw new Error(error);
123
- }
124
- // Methods marked as 'alwaysOn' don't require explicit capabilities
125
- if (capabilityKey === 'alwaysOn') {
126
- return true;
127
- }
128
- // Check if server declared this capability
129
- if (!hasServerCapability(this.capabilities, capabilityKey)) {
130
- const error = `Cannot send notification ${method}: server capability '${capabilityKey}' not declared`;
131
- this.logger.warn(error);
132
- if (this.strict) {
133
- throw new Error(error);
134
- }
135
- return false;
136
- }
137
- return true;
75
+ return checkMethod({
76
+ method,
77
+ methodSets: SERVER_METHODS,
78
+ getCapabilityKey: (m) => getCapabilityForNotificationMethod(m),
79
+ hasCapability: (key) => hasServerCapability(this.capabilities, key),
80
+ actionLabel: 'send notification',
81
+ capabilityLabel: 'server capability',
82
+ logger: this.logger,
83
+ strict: this.strict
84
+ });
138
85
  }
139
86
  /**
140
- * Get list of capabilities the server declared
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.
141
90
  */
142
91
  getServerCapabilities() {
143
92
  return { ...this.capabilities };
144
93
  }
145
94
  }
146
95
  /**
147
- * Validates that handlers can be registered based on
148
- * declared client capabilities
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
149
110
  */
150
111
  export class ClientCapabilityGuard {
151
112
  capabilities;
@@ -157,74 +118,38 @@ export class ClientCapabilityGuard {
157
118
  this.strict = strict;
158
119
  }
159
120
  /**
160
- * Check if handler registration is allowed for this method
121
+ * Returns `true` if the client has declared the capability required to handle `method`.
161
122
  *
162
- * @param method - LSP method name
163
- * @returns true if allowed, false otherwise
164
- * @throws Error if strict mode enabled and client capability not declared
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.
165
130
  */
166
131
  canRegisterHandler(method) {
167
- if (!CLIENT_METHODS.all.has(method)) {
168
- if (!this.strict) {
169
- this.logger.debug(`Unknown method ${method}, allowing in non-strict mode`);
170
- return true;
171
- }
172
- const error = `Cannot register handler for unknown method: ${method}`;
173
- this.logger.error(error);
174
- throw new Error(error);
175
- }
176
- if (CLIENT_METHODS.alwaysAllowed.has(method)) {
177
- return true;
178
- }
179
- const capabilityKey = getClientCapabilityForRequestMethod(method);
180
- if (!capabilityKey) {
181
- const notificationCapability = getClientCapabilityForNotificationMethod(method);
182
- if (!notificationCapability) {
183
- if (!this.strict) {
184
- this.logger.debug(`Unknown method ${method}, allowing in non-strict mode`);
185
- return true;
186
- }
187
- const error = `Cannot register handler for unknown method: ${method}`;
188
- this.logger.error(error);
189
- throw new Error(error);
190
- }
191
- return this.isNotificationAllowed(method, notificationCapability);
192
- }
193
- return this.isRequestAllowed(method, capabilityKey);
132
+ return checkMethod({
133
+ method,
134
+ methodSets: CLIENT_METHODS,
135
+ getCapabilityKey: (m) => {
136
+ return (getClientCapabilityForRequestMethod(m) ??
137
+ getClientCapabilityForNotificationMethod(m));
138
+ },
139
+ hasCapability: (key) => hasClientCapability(this.capabilities, key),
140
+ actionLabel: 'register handler',
141
+ capabilityLabel: 'client capability',
142
+ logger: this.logger,
143
+ strict: this.strict
144
+ });
194
145
  }
195
146
  /**
196
- * Get list of capabilities the client declared
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.
197
150
  */
198
151
  getClientCapabilities() {
199
152
  return { ...this.capabilities };
200
153
  }
201
- isRequestAllowed(method, capabilityKey) {
202
- if (capabilityKey === 'alwaysOn') {
203
- return true;
204
- }
205
- if (!hasClientCapability(this.capabilities, capabilityKey)) {
206
- const error = `Cannot register handler for ${method}: client capability '${capabilityKey}' not declared`;
207
- this.logger.warn(error);
208
- if (this.strict) {
209
- throw new Error(error);
210
- }
211
- return false;
212
- }
213
- return true;
214
- }
215
- isNotificationAllowed(method, capabilityKey) {
216
- if (capabilityKey === 'alwaysOn') {
217
- return true;
218
- }
219
- if (!hasClientCapability(this.capabilities, capabilityKey)) {
220
- const error = `Cannot register handler for ${method}: client capability '${capabilityKey}' not declared`;
221
- this.logger.warn(error);
222
- if (this.strict) {
223
- throw new Error(error);
224
- }
225
- return false;
226
- }
227
- return true;
228
- }
229
154
  }
230
155
  //# sourceMappingURL=capability-guard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"capability-guard.js","sourceRoot":"","sources":["../src/capability-guard.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EACL,eAAe,EACf,UAAU,EACV,wCAAwC,EACxC,mCAAmC,EACnC,mBAAmB,EACnB,mBAAmB,EACnB,kCAAkC,EAClC,6BAA6B,EAC9B,MAAM,eAAe,CAAC;AAIvB,SAAS,eAAe,CAAC,aAA4B,EAGnD;IACA,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAC;IAC9B,MAAM,aAAa,GAAG,IAAI,GAAG,EAAU,CAAC;IAExC,KAAK,MAAM,oBAAoB,IAAI,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,EAAE,CAAC;QAC7D,KAAK,MAAM,UAAU,IAAI,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAC,EAAE,CAAC;YAC7D,MAAM,KAAK,GAAG,UAA4E,CAAC;YAC3F,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACtB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC;gBAC1B,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAClC,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