diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e2ae92303c..90080d6ba5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,9 +1,9 @@ { - "chat-client": "0.1.55", - "core/aws-lsp-core": "0.0.21", - "server/aws-lsp-antlr4": "0.1.25", - "server/aws-lsp-codewhisperer": "0.0.124", - "server/aws-lsp-json": "0.1.26", - "server/aws-lsp-partiql": "0.0.23", - "server/aws-lsp-yaml": "0.1.26" + "chat-client": "0.1.56", + "core/aws-lsp-core": "0.0.22", + "server/aws-lsp-antlr4": "0.1.26", + "server/aws-lsp-codewhisperer": "0.0.125", + "server/aws-lsp-json": "0.1.27", + "server/aws-lsp-partiql": "0.0.24", + "server/aws-lsp-yaml": "0.1.27" } diff --git a/chat-client/CHANGELOG.md b/chat-client/CHANGELOG.md index b6ec7991b8..ab8096741e 100644 --- a/chat-client/CHANGELOG.md +++ b/chat-client/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.1.56](https://github.com/Amazon-Q-Developer/language-servers/compare/chat-client/v0.1.55...chat-client/v0.1.56) (2026-08-18) + + +### Bug Fixes + +* repoint CODEOWNERS and package repository URLs to the new org ([#2838](https://github.com/Amazon-Q-Developer/language-servers/issues/2838)) ([43e44dc](https://github.com/Amazon-Q-Developer/language-servers/commit/43e44dc5af94703f51456cd8a913f0d61af7570e)) + ## [0.1.55](https://github.com/aws/language-servers/compare/chat-client/v0.1.54...chat-client/v0.1.55) (2026-06-30) diff --git a/chat-client/package.json b/chat-client/package.json index 1def952379..b3a1aa46b7 100644 --- a/chat-client/package.json +++ b/chat-client/package.json @@ -1,6 +1,6 @@ { "name": "@aws/chat-client", - "version": "0.1.55", + "version": "0.1.56", "description": "AWS Chat Client", "main": "out/index.js", "repository": { diff --git a/core/aws-lsp-core/CHANGELOG.md b/core/aws-lsp-core/CHANGELOG.md index 868606d0ac..9967096253 100644 --- a/core/aws-lsp-core/CHANGELOG.md +++ b/core/aws-lsp-core/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.0.22](https://github.com/Amazon-Q-Developer/language-servers/compare/lsp-core/v0.0.21...lsp-core/v0.0.22) (2026-08-18) + + +### Bug Fixes + +* repoint CODEOWNERS and package repository URLs to the new org ([#2838](https://github.com/Amazon-Q-Developer/language-servers/issues/2838)) ([43e44dc](https://github.com/Amazon-Q-Developer/language-servers/commit/43e44dc5af94703f51456cd8a913f0d61af7570e)) + ## [0.0.21](https://github.com/aws/language-servers/compare/lsp-core/v0.0.20...lsp-core/v0.0.21) (2026-02-17) diff --git a/core/aws-lsp-core/package.json b/core/aws-lsp-core/package.json index 0874682d04..9aec44109c 100644 --- a/core/aws-lsp-core/package.json +++ b/core/aws-lsp-core/package.json @@ -1,6 +1,6 @@ { "name": "@aws/lsp-core", - "version": "0.0.21", + "version": "0.0.22", "description": "Core library, contains common code and utilities", "main": "out/index.js", "repository": { diff --git a/package-lock.json b/package-lock.json index 3f193aa49e..13c9c30348 100644 --- a/package-lock.json +++ b/package-lock.json @@ -251,7 +251,7 @@ }, "chat-client": { "name": "@aws/chat-client", - "version": "0.1.55", + "version": "0.1.56", "license": "Apache-2.0", "dependencies": { "@aws/chat-client-ui-types": "0.1.71", @@ -302,7 +302,7 @@ }, "core/aws-lsp-core": { "name": "@aws/lsp-core", - "version": "0.0.21", + "version": "0.0.22", "license": "Apache-2.0", "dependencies": { "@aws/language-server-runtimes": "^0.3.14", @@ -30287,11 +30287,11 @@ }, "server/aws-lsp-antlr4": { "name": "@aws/lsp-antlr4", - "version": "0.1.25", + "version": "0.1.26", "license": "Apache-2.0", "dependencies": { "@aws/language-server-runtimes": "^0.3.14", - "@aws/lsp-core": "^0.0.21" + "@aws/lsp-core": "^0.0.22" }, "devDependencies": { "@babel/plugin-transform-modules-commonjs": "^7.24.1", @@ -30351,7 +30351,7 @@ }, "server/aws-lsp-codewhisperer": { "name": "@aws/lsp-codewhisperer", - "version": "0.0.124", + "version": "0.0.125", "bundleDependencies": [ "@amzn/codewhisperer", "@amzn/codewhisperer-runtime", @@ -30372,7 +30372,7 @@ "@aws-sdk/util-retry": "^3.374.0", "@aws/chat-client-ui-types": "0.1.71", "@aws/language-server-runtimes": "^0.3.21", - "@aws/lsp-core": "^0.0.21", + "@aws/lsp-core": "^0.0.22", "@modelcontextprotocol/sdk": "^1.23.0", "@mozilla/readability": "^0.6.0", "@smithy/node-http-handler": "^2.5.0", @@ -30642,11 +30642,11 @@ }, "server/aws-lsp-json": { "name": "@aws/lsp-json", - "version": "0.1.26", + "version": "0.1.27", "license": "Apache-2.0", "dependencies": { "@aws/language-server-runtimes": "^0.3.14", - "@aws/lsp-core": "^0.0.21", + "@aws/lsp-core": "^0.0.22", "vscode-languageserver": "^9.0.1", "vscode-languageserver-textdocument": "^1.0.8" }, @@ -30718,7 +30718,7 @@ }, "server/aws-lsp-partiql": { "name": "@aws/lsp-partiql", - "version": "0.0.23", + "version": "0.0.24", "license": "Apache-2.0", "dependencies": { "@aws/language-server-runtimes": "^0.3.14", @@ -30768,12 +30768,12 @@ }, "server/aws-lsp-yaml": { "name": "@aws/lsp-yaml", - "version": "0.1.26", + "version": "0.1.27", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "@aws/language-server-runtimes": "^0.3.14", - "@aws/lsp-core": "^0.0.21", + "@aws/lsp-core": "^0.0.22", "vscode-languageserver": "^9.0.1", "vscode-languageserver-textdocument": "^1.0.8", "yaml-language-server": "1.13.0" diff --git a/server/aws-lsp-antlr4/CHANGELOG.md b/server/aws-lsp-antlr4/CHANGELOG.md index 85c4542684..ad6bffd9a3 100644 --- a/server/aws-lsp-antlr4/CHANGELOG.md +++ b/server/aws-lsp-antlr4/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.1.26](https://github.com/Amazon-Q-Developer/language-servers/compare/lsp-antlr4/v0.1.25...lsp-antlr4/v0.1.26) (2026-08-18) + + +### Bug Fixes + +* repoint CODEOWNERS and package repository URLs to the new org ([#2838](https://github.com/Amazon-Q-Developer/language-servers/issues/2838)) ([43e44dc](https://github.com/Amazon-Q-Developer/language-servers/commit/43e44dc5af94703f51456cd8a913f0d61af7570e)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.21 to ^0.0.22 + ## [0.1.25](https://github.com/aws/language-servers/compare/lsp-antlr4/v0.1.24...lsp-antlr4/v0.1.25) (2026-02-17) diff --git a/server/aws-lsp-antlr4/package.json b/server/aws-lsp-antlr4/package.json index 918f2ef5f7..ac12cf53b5 100644 --- a/server/aws-lsp-antlr4/package.json +++ b/server/aws-lsp-antlr4/package.json @@ -1,6 +1,6 @@ { "name": "@aws/lsp-antlr4", - "version": "0.1.25", + "version": "0.1.26", "description": "ANTLR4 language server", "main": "out/index.js", "repository": { @@ -29,7 +29,7 @@ }, "dependencies": { "@aws/language-server-runtimes": "^0.3.14", - "@aws/lsp-core": "^0.0.21" + "@aws/lsp-core": "^0.0.22" }, "peerDependencies": { "antlr4-c3": ">=3.4 < 4", diff --git a/server/aws-lsp-codewhisperer/CHANGELOG.md b/server/aws-lsp-codewhisperer/CHANGELOG.md index 22eb2e02df..17d1d801a6 100644 --- a/server/aws-lsp-codewhisperer/CHANGELOG.md +++ b/server/aws-lsp-codewhisperer/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [0.0.125](https://github.com/Amazon-Q-Developer/language-servers/compare/lsp-codewhisperer/v0.0.124...lsp-codewhisperer/v0.0.125) (2026-08-18) + + +### Features + +* **amazonq:** initialize Q services when credentials arrive ([#2840](https://github.com/Amazon-Q-Developer/language-servers/issues/2840)) ([4e0d3b0](https://github.com/Amazon-Q-Developer/language-servers/commit/4e0d3b0d69e0aa7a230f64a1b168a09bcfd4b7cd)) + + +### Bug Fixes + +* **amazonq:** retry truncated tool-use streams instead of dropping them silently ([#2841](https://github.com/Amazon-Q-Developer/language-servers/issues/2841)) ([368a099](https://github.com/Amazon-Q-Developer/language-servers/commit/368a099cc9b5cc3cf7bb1f2298718824a1ab1118)) +* repoint CODEOWNERS and package repository URLs to the new org ([#2838](https://github.com/Amazon-Q-Developer/language-servers/issues/2838)) ([43e44dc](https://github.com/Amazon-Q-Developer/language-servers/commit/43e44dc5af94703f51456cd8a913f0d61af7570e)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.21 to ^0.0.22 + ## [0.0.124](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.123...lsp-codewhisperer/v0.0.124) (2026-08-13) diff --git a/server/aws-lsp-codewhisperer/package.json b/server/aws-lsp-codewhisperer/package.json index 120744dc41..201e72d402 100644 --- a/server/aws-lsp-codewhisperer/package.json +++ b/server/aws-lsp-codewhisperer/package.json @@ -1,6 +1,6 @@ { "name": "@aws/lsp-codewhisperer", - "version": "0.0.124", + "version": "0.0.125", "description": "CodeWhisperer Language Server", "main": "out/index.js", "repository": { @@ -39,7 +39,7 @@ "@aws-sdk/util-retry": "^3.374.0", "@aws/chat-client-ui-types": "0.1.71", "@aws/language-server-runtimes": "^0.3.21", - "@aws/lsp-core": "^0.0.21", + "@aws/lsp-core": "^0.0.22", "@modelcontextprotocol/sdk": "^1.23.0", "@mozilla/readability": "^0.6.0", "@smithy/node-http-handler": "^2.5.0", diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.ts index be67753637..269ba474bf 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.ts @@ -4668,7 +4668,10 @@ export class AgenticChatController implements ChatHandlers { cwsprChatResponseLength: chatEventParser.body?.length ?? 0, }) - return chatEventParser.getResult() + // Use finalize() (not getResult()) so a tool use whose stream ended before its + // terminating `stop` event is surfaced as an incomplete-input error and retried, + // rather than being silently dropped and reported as a successful turn. + return chatEventParser.finalize() } /** diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatEventParser.test.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatEventParser.test.ts index 917ae28179..a772fc808c 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatEventParser.test.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatEventParser.test.ts @@ -304,4 +304,56 @@ describe('AgenticChatEventParser', () => { assert.deepStrictEqual(chatEventParser.getResult(), { success: true, data: expectedData }) }) + + it('finalize flags an unterminated tool use (no stop event) as incomplete and marks it stopped', () => { + const chatEventParser = new AgenticChatEventParser(mockMessageId, new Metric(), logging) + + // A tool use whose input streams in fragments but never receives a `stop` event + // (e.g. the response hit the output-token limit mid tool-input). + chatEventParser.processPartialEvent({ + toolUseEvent: { + toolUseId: 'tool-1', + name: 'fsWrite', + input: '{"path":"out.py","fileText":"import os', + stop: false, + }, + }) + const midStream = chatEventParser.processPartialEvent({ + toolUseEvent: { + toolUseId: 'tool-1', + name: 'fsWrite', + input: '\\nprint(1)', + stop: false, + }, + }) + + // Mid-stream this looks like a clean success and would be filtered out (dropped) by the loop. + assert.strictEqual(midStream.success, true) + assert.strictEqual(midStream.data?.toolUses['tool-1'].stop, false) + + // After the stream ends, finalize() surfaces it as an error and marks it stopped so it + // survives the pending-tool-use filter and is routed into the existing retry path. + const result = chatEventParser.finalize() + assert.strictEqual(result.success, false) + assert.ok(result.error?.startsWith('ToolUse input is invalid JSON:')) + assert.strictEqual(result.data?.toolUses['tool-1'].stop, true) + }) + + it('finalize leaves a properly stopped tool use untouched', () => { + const chatEventParser = new AgenticChatEventParser(mockMessageId, new Metric(), logging) + + chatEventParser.processPartialEvent({ + toolUseEvent: { + toolUseId: 'tool-1', + name: 'fsWrite', + input: '{"path":"out.py","fileText":"print(1)"}', + stop: true, + }, + }) + + const result = chatEventParser.finalize() + assert.strictEqual(result.success, true) + assert.strictEqual(result.data?.toolUses['tool-1'].stop, true) + assert.deepStrictEqual(result.data?.toolUses['tool-1'].input, { path: 'out.py', fileText: 'print(1)' }) + }) }) diff --git a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatEventParser.ts b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatEventParser.ts index 6878e19caf..c424524992 100644 --- a/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatEventParser.ts +++ b/server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatEventParser.ts @@ -229,4 +229,42 @@ export class AgenticChatEventParser implements ChatResult { data: chatResultWithMetadata, } } + + /** + * Finalizes parsing after the response stream has been fully consumed. + * + * A tool use only becomes executable once its terminating `stop` event arrives — that + * is also the only point at which its streamed input is JSON-parsed. If the stream ends + * before that event (for example, the response reaches the output-token limit mid + * tool-input), the tool use is left with `stop === false` and no error is recorded, so + * `getResult()` reports success. The agentic loop then filters it out (only stopped tool + * uses are treated as pending) and completes the turn without ever running the tool — a + * silent no-op with no error and no retry. + * + * To avoid that, treat any still-unstopped tool use as incomplete/truncated input: + * record an error (reusing the malformed-JSON prefix so it is handled by the existing + * recovery branch) and mark it `stop` so it survives the pending-tool-use filter and the + * model is re-prompted to split the work into smaller tool uses. + */ + public finalize(): Result { + for (const toolUseId of Object.keys(this.toolUses)) { + const toolUse = this.toolUses[toolUseId] + if (!toolUse.stop) { + const received = typeof toolUse.input === 'string' ? toolUse.input.length : 0 + this.#logging.error( + `ToolUse ${toolUseId} (${toolUse.name}) stream ended before a stop event after ${received} characters; input was truncated` + ) + // Reuse the malformed-JSON error prefix so this routes into the same recovery + // branch in the agentic loop. Keep the message short so the (potentially very + // large) partial input is not echoed back to the model in the tool result. + this.error = `ToolUse input is invalid JSON: incomplete tool input, stream ended after ${received} characters before completion.` + this.toolUses[toolUseId] = { + ...toolUse, + input: {}, + stop: true, + } + } + } + return this.getResult() + } } diff --git a/server/aws-lsp-json/CHANGELOG.md b/server/aws-lsp-json/CHANGELOG.md index 15449049b7..977d7dda14 100644 --- a/server/aws-lsp-json/CHANGELOG.md +++ b/server/aws-lsp-json/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.1.27](https://github.com/Amazon-Q-Developer/language-servers/compare/lsp-json/v0.1.26...lsp-json/v0.1.27) (2026-08-18) + + +### Bug Fixes + +* repoint CODEOWNERS and package repository URLs to the new org ([#2838](https://github.com/Amazon-Q-Developer/language-servers/issues/2838)) ([43e44dc](https://github.com/Amazon-Q-Developer/language-servers/commit/43e44dc5af94703f51456cd8a913f0d61af7570e)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.21 to ^0.0.22 + ## [0.1.26](https://github.com/aws/language-servers/compare/lsp-json/v0.1.25...lsp-json/v0.1.26) (2026-02-17) diff --git a/server/aws-lsp-json/package.json b/server/aws-lsp-json/package.json index b1c22c3601..b9f6ea357c 100644 --- a/server/aws-lsp-json/package.json +++ b/server/aws-lsp-json/package.json @@ -1,6 +1,6 @@ { "name": "@aws/lsp-json", - "version": "0.1.26", + "version": "0.1.27", "description": "JSON Language Server", "main": "out/index.js", "repository": { @@ -27,7 +27,7 @@ }, "dependencies": { "@aws/language-server-runtimes": "^0.3.14", - "@aws/lsp-core": "^0.0.21", + "@aws/lsp-core": "^0.0.22", "vscode-languageserver": "^9.0.1", "vscode-languageserver-textdocument": "^1.0.8" }, diff --git a/server/aws-lsp-partiql/CHANGELOG.md b/server/aws-lsp-partiql/CHANGELOG.md index ddd53ffcdf..8577629e33 100644 --- a/server/aws-lsp-partiql/CHANGELOG.md +++ b/server/aws-lsp-partiql/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.0.24](https://github.com/Amazon-Q-Developer/language-servers/compare/lsp-partiql/v0.0.23...lsp-partiql/v0.0.24) (2026-08-18) + + +### Bug Fixes + +* repoint CODEOWNERS and package repository URLs to the new org ([#2838](https://github.com/Amazon-Q-Developer/language-servers/issues/2838)) ([43e44dc](https://github.com/Amazon-Q-Developer/language-servers/commit/43e44dc5af94703f51456cd8a913f0d61af7570e)) + ## [0.0.23](https://github.com/aws/language-servers/compare/lsp-partiql/v0.0.22...lsp-partiql/v0.0.23) (2026-02-17) diff --git a/server/aws-lsp-partiql/package.json b/server/aws-lsp-partiql/package.json index cf735c6184..12cf012af8 100644 --- a/server/aws-lsp-partiql/package.json +++ b/server/aws-lsp-partiql/package.json @@ -3,7 +3,7 @@ "author": "Amazon Web Services", "license": "Apache-2.0", "description": "PartiQL language server", - "version": "0.0.23", + "version": "0.0.24", "repository": { "type": "git", "url": "https://github.com/Amazon-Q-Developer/language-servers" diff --git a/server/aws-lsp-yaml/CHANGELOG.md b/server/aws-lsp-yaml/CHANGELOG.md index 4b20d35253..fe6850ee84 100644 --- a/server/aws-lsp-yaml/CHANGELOG.md +++ b/server/aws-lsp-yaml/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.1.27](https://github.com/Amazon-Q-Developer/language-servers/compare/lsp-yaml/v0.1.26...lsp-yaml/v0.1.27) (2026-08-18) + + +### Bug Fixes + +* repoint CODEOWNERS and package repository URLs to the new org ([#2838](https://github.com/Amazon-Q-Developer/language-servers/issues/2838)) ([43e44dc](https://github.com/Amazon-Q-Developer/language-servers/commit/43e44dc5af94703f51456cd8a913f0d61af7570e)) + + +### Dependencies + +* The following workspace dependencies were updated + * dependencies + * @aws/lsp-core bumped from ^0.0.21 to ^0.0.22 + ## [0.1.26](https://github.com/aws/language-servers/compare/lsp-yaml/v0.1.25...lsp-yaml/v0.1.26) (2026-02-17) diff --git a/server/aws-lsp-yaml/package.json b/server/aws-lsp-yaml/package.json index 64119bdcf2..cd5348b36b 100644 --- a/server/aws-lsp-yaml/package.json +++ b/server/aws-lsp-yaml/package.json @@ -1,6 +1,6 @@ { "name": "@aws/lsp-yaml", - "version": "0.1.26", + "version": "0.1.27", "description": "YAML Language Server", "main": "out/index.js", "repository": { @@ -27,7 +27,7 @@ }, "dependencies": { "@aws/language-server-runtimes": "^0.3.14", - "@aws/lsp-core": "^0.0.21", + "@aws/lsp-core": "^0.0.22", "vscode-languageserver": "^9.0.1", "vscode-languageserver-textdocument": "^1.0.8", "yaml-language-server": "1.13.0"