@aws/lsp-codewhisperer 0.0.109 → 0.0.111
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/CHANGELOG.md +31 -0
- package/out/language-server/agenticChat/agenticChatController.js +52 -27
- package/out/language-server/agenticChat/agenticChatController.js.map +1 -1
- package/out/language-server/agenticChat/context/additionalContextProvider.d.ts +27 -2
- package/out/language-server/agenticChat/context/additionalContextProvider.js +160 -32
- package/out/language-server/agenticChat/context/additionalContextProvider.js.map +1 -1
- package/out/language-server/agenticChat/tools/executeBash.d.ts +1 -1
- package/out/language-server/agenticChat/tools/executeBash.js +11 -2
- package/out/language-server/agenticChat/tools/executeBash.js.map +1 -1
- package/out/language-server/agenticChat/tools/fileSearch.d.ts +1 -1
- package/out/language-server/agenticChat/tools/fileSearch.js +1 -1
- package/out/language-server/agenticChat/tools/fileSearch.js.map +1 -1
- package/out/language-server/agenticChat/tools/fsRead.d.ts +1 -1
- package/out/language-server/agenticChat/tools/fsRead.js +1 -1
- package/out/language-server/agenticChat/tools/fsRead.js.map +1 -1
- package/out/language-server/agenticChat/tools/fsReplace.d.ts +1 -1
- package/out/language-server/agenticChat/tools/fsReplace.js +1 -1
- package/out/language-server/agenticChat/tools/fsReplace.js.map +1 -1
- package/out/language-server/agenticChat/tools/fsWrite.d.ts +1 -1
- package/out/language-server/agenticChat/tools/fsWrite.js +1 -1
- package/out/language-server/agenticChat/tools/fsWrite.js.map +1 -1
- package/out/language-server/agenticChat/tools/listDirectory.d.ts +1 -1
- package/out/language-server/agenticChat/tools/listDirectory.js +1 -1
- package/out/language-server/agenticChat/tools/listDirectory.js.map +1 -1
- package/out/language-server/agenticChat/tools/mcp/mcpManager.d.ts +1 -0
- package/out/language-server/agenticChat/tools/mcp/mcpManager.js +3 -0
- package/out/language-server/agenticChat/tools/mcp/mcpManager.js.map +1 -1
- package/out/language-server/agenticChat/tools/mcp/mcpOauthClient.d.ts +30 -13
- package/out/language-server/agenticChat/tools/mcp/mcpOauthClient.js +182 -115
- package/out/language-server/agenticChat/tools/mcp/mcpOauthClient.js.map +1 -1
- package/out/language-server/agenticChat/tools/mcp/mcpUtils.js +8 -0
- package/out/language-server/agenticChat/tools/mcp/mcpUtils.js.map +1 -1
- package/out/language-server/agenticChat/tools/toolShared.d.ts +9 -7
- package/out/language-server/agenticChat/tools/toolShared.js +18 -12
- package/out/language-server/agenticChat/tools/toolShared.js.map +1 -1
- package/out/language-server/chat/chatSessionService.d.ts +4 -3
- package/out/language-server/chat/chatSessionService.js +9 -5
- package/out/language-server/chat/chatSessionService.js.map +1 -1
- package/out/language-server/chat/telemetry/chatTelemetryController.js +1 -0
- package/out/language-server/chat/telemetry/chatTelemetryController.js.map +1 -1
- package/out/shared/telemetry/telemetryService.d.ts +1 -0
- package/out/shared/telemetry/telemetryService.js +1 -0
- package/out/shared/telemetry/telemetryService.js.map +1 -1
- package/out/shared/telemetry/types.d.ts +1 -0
- package/out/shared/telemetry/types.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.111](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.110...lsp-codewhisperer/v0.0.111) (2026-03-31)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **amazonq:** align mcp oauth client with mcp sdk auth patterns ([#2679](https://github.com/aws/language-servers/issues/2679)) ([4ff5ab0](https://github.com/aws/language-servers/commit/4ff5ab0e6ab4bf1659ffdb07a72bba4d6c358339))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* cache subscription status to prevent excessive CreateSubscriptionToken API calls ([#2680](https://github.com/aws/language-servers/issues/2680)) ([d26edb7](https://github.com/aws/language-servers/commit/d26edb7dfd321122515373e0d08b757f6e367561))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Reverts
|
|
17
|
+
|
|
18
|
+
* undo revert of fix for tool permissions in allowed paths per tool ([#2601](https://github.com/aws/language-servers/issues/2601)) ([#2683](https://github.com/aws/language-servers/issues/2683)) ([#2684](https://github.com/aws/language-servers/issues/2684)) ([8a615fa](https://github.com/aws/language-servers/commit/8a615faf27c6b519045263f5bddf0bfe98f609e0))
|
|
19
|
+
|
|
20
|
+
## [0.0.110](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.109...lsp-codewhisperer/v0.0.110) (2026-03-17)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* add cwsprChatHasWorkspaceContext metric to amazonq_addMessage event ([#2665](https://github.com/aws/language-servers/issues/2665)) ([#2668](https://github.com/aws/language-servers/issues/2668)) ([7d71d0a](https://github.com/aws/language-servers/commit/7d71d0a38d1e9adbb29210fff1c2b6b5e6d7d120))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* amazon q ignores rules for other os, so adding fallback ([#2663](https://github.com/aws/language-servers/issues/2663)) ([4be527a](https://github.com/aws/language-servers/commit/4be527a69b4cecc801e23009a63c8d3301b84f2d))
|
|
31
|
+
* deduplicate rules in multi workspace mode ([#2660](https://github.com/aws/language-servers/issues/2660)) ([c8022fe](https://github.com/aws/language-servers/commit/c8022feb7637c64f71330856ecb3cb96096dccb7))
|
|
32
|
+
* rules created in default file is not working ([#2652](https://github.com/aws/language-servers/issues/2652)) ([#2655](https://github.com/aws/language-servers/issues/2655)) ([b380e97](https://github.com/aws/language-servers/commit/b380e97051251a0ead0a7bc3314f8850f14073ac))
|
|
33
|
+
|
|
3
34
|
## [0.0.109](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.108...lsp-codewhisperer/v0.0.109) (2026-03-10)
|
|
4
35
|
|
|
5
36
|
|
|
@@ -89,6 +89,7 @@ class AgenticChatController {
|
|
|
89
89
|
#toolUseLatencies = [];
|
|
90
90
|
#mcpEventHandler;
|
|
91
91
|
#paidTierMode;
|
|
92
|
+
#subscriptionStatusPromise;
|
|
92
93
|
#origin;
|
|
93
94
|
#activeUserTracker;
|
|
94
95
|
// latency metrics
|
|
@@ -152,7 +153,17 @@ class AgenticChatController {
|
|
|
152
153
|
});
|
|
153
154
|
this.#chatHistoryDb = chatDb_1.ChatDatabase.getInstance(features);
|
|
154
155
|
this.#tabBarController = new tabBarController_1.TabBarController(features, this.#chatHistoryDb, telemetryService, (tabId) => this.sendPinnedContext(tabId));
|
|
155
|
-
|
|
156
|
+
// Inject McpManager.getResources as a callback to avoid importing McpManager directly
|
|
157
|
+
// in AdditionalContextProvider, which would pull Node.js-only MCP SDK dependencies
|
|
158
|
+
// (node:process, node:stream) into the webworker webpack bundle and break packaging.
|
|
159
|
+
this.#additionalContextProvider = new additionalContextProvider_1.AdditionalContextProvider(features, this.#chatHistoryDb, () => {
|
|
160
|
+
try {
|
|
161
|
+
return mcpManager_1.McpManager.isInitialized() ? mcpManager_1.McpManager.instance.getResources() : [];
|
|
162
|
+
}
|
|
163
|
+
catch {
|
|
164
|
+
return [];
|
|
165
|
+
}
|
|
166
|
+
});
|
|
156
167
|
this.#contextCommandsProvider = new contextCommandsProvider_1.ContextCommandsProvider(this.#features.logging, this.#features.chat, this.#features.workspace, this.#features.lsp);
|
|
157
168
|
this.#mcpEventHandler = new mcpEventHandler_1.McpEventHandler(features, telemetryService);
|
|
158
169
|
this.#origin = (0, utils_2.getOriginFromClientInfo)((0, utils_2.getClientName)(this.#features.lsp.getClientInitializeParams()));
|
|
@@ -1471,7 +1482,7 @@ class AgenticChatController {
|
|
|
1471
1482
|
// After approval, add the path to the approved paths in the session
|
|
1472
1483
|
const inputPath = toolUse.input?.path || toolUse.input?.cwd;
|
|
1473
1484
|
if (inputPath) {
|
|
1474
|
-
session.addApprovedPath(inputPath);
|
|
1485
|
+
session.addApprovedPath(inputPath, toolUse.name);
|
|
1475
1486
|
}
|
|
1476
1487
|
const ws = this.#getWritableStream(chatResultStream, toolUse);
|
|
1477
1488
|
const result = await this.#features.agent.runTool(toolUse.name, toolUse.input, token, ws);
|
|
@@ -2609,6 +2620,7 @@ class AgenticChatController {
|
|
|
2609
2620
|
if (triggerContext.contextInfo) {
|
|
2610
2621
|
metric.mergeWith({
|
|
2611
2622
|
cwsprChatHasContextList: triggerContext.documentReference?.filePaths?.length ? true : false,
|
|
2623
|
+
cwsprChatHasWorkspaceContext: triggerContext.hasWorkspace ?? false,
|
|
2612
2624
|
cwsprChatFolderContextCount: triggerContext.contextInfo.contextCount.folderContextCount,
|
|
2613
2625
|
cwsprChatFileContextCount: triggerContext.contextInfo.contextCount.fileContextCount,
|
|
2614
2626
|
cwsprChatRuleContextCount: triggerContext.contextInfo.contextCount.activeRuleContextCount,
|
|
@@ -3191,31 +3203,43 @@ class AgenticChatController {
|
|
|
3191
3203
|
this.showFreeTierLimitMsgOnClient(tabId);
|
|
3192
3204
|
}
|
|
3193
3205
|
else if (!mode) {
|
|
3194
|
-
//
|
|
3195
|
-
this.#
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3206
|
+
// Use cached status if already known, to avoid excessive CreateSubscriptionToken calls.
|
|
3207
|
+
if (this.#paidTierMode) {
|
|
3208
|
+
mode = this.#paidTierMode;
|
|
3209
|
+
}
|
|
3210
|
+
else {
|
|
3211
|
+
// Deduplicate in-flight requests: if a getSubscriptionStatus call is already
|
|
3212
|
+
// in progress (e.g. multiple tabs opened before the first promise settles),
|
|
3213
|
+
// reuse the same promise instead of firing additional API calls.
|
|
3214
|
+
if (!this.#subscriptionStatusPromise) {
|
|
3215
|
+
this.#subscriptionStatusPromise =
|
|
3216
|
+
this.#serviceManager
|
|
3217
|
+
?.getCodewhispererService()
|
|
3218
|
+
.getSubscriptionStatus(true)
|
|
3219
|
+
.then(o => {
|
|
3220
|
+
this.#log(`setPaidTierMode: getSubscriptionStatus: ${o.status} ${o.encodedVerificationUrl}`);
|
|
3221
|
+
this.setPaidTierMode(tabId, o.status !== 'none' ? 'paidtier' : 'freetier');
|
|
3222
|
+
})
|
|
3223
|
+
.catch(err => {
|
|
3224
|
+
// Clear the promise so the next call can retry.
|
|
3225
|
+
this.#subscriptionStatusPromise = undefined;
|
|
3226
|
+
this.#log(`setPaidTierMode: getSubscriptionStatus failed: ${err.message}`);
|
|
3227
|
+
const isAccessDenied = err.name === 'AccessDeniedException';
|
|
3228
|
+
const message = isAccessDenied
|
|
3229
|
+
? `To increase your limit, subscribe to a Kiro subscription. Choose the right [plan](https://kiro.dev/pricing/) and log in to [app.kiro.dev](https://app.kiro.dev/signin), pick the plan, and once active, you should be able to continue and use Q and Kiro services with the new limits. If you have questions, refer to our [FAQs](https://aws.amazon.com/q/developer/faqs/?p=qdev&z=subnav&loc=8#general)`
|
|
3230
|
+
: `setPaidTierMode: getSubscriptionStatus failed: ${(0, utils_2.fmtError)(err)}`;
|
|
3231
|
+
this.#features.lsp.window
|
|
3232
|
+
.showMessage({
|
|
3233
|
+
message,
|
|
3234
|
+
type: protocol_1.MessageType.Error,
|
|
3235
|
+
})
|
|
3236
|
+
.catch(e => {
|
|
3237
|
+
this.#log(`setPaidTierMode: showMessage failed: ${e.message}`);
|
|
3238
|
+
});
|
|
3239
|
+
}) ?? Promise.resolve();
|
|
3240
|
+
}
|
|
3241
|
+
return;
|
|
3242
|
+
}
|
|
3219
3243
|
}
|
|
3220
3244
|
this.#paidTierMode = mode;
|
|
3221
3245
|
this.#log(`setPaidTierMode: mode=${mode}`);
|
|
@@ -3599,6 +3623,7 @@ class AgenticChatController {
|
|
|
3599
3623
|
this.#log(`Chat configuration telemetry preference to ${updatedOptOutPreference}`);
|
|
3600
3624
|
// Force a service request to get current Q user subscription status.
|
|
3601
3625
|
this.#paidTierMode = undefined;
|
|
3626
|
+
this.#subscriptionStatusPromise = undefined;
|
|
3602
3627
|
};
|
|
3603
3628
|
#getTools(session) {
|
|
3604
3629
|
const builtInWriteTools = new Set(this.#features.agent.getBuiltInWriteToolNames());
|